exact Primrec₂.encode_iff.mp (this.of_eq $ fun x ⟨w₁, w₂⟩ => by
  simp[mkL, h]
  have := (fintypeArrowEquivFinArrow' (α := WType β) (h x)).injective
  apply this
  funext i; simp
  cases i using Fin.cases <;> simp)
τ : Type u_1
σ : Type u_2
α : Type u_3
γ : Type u_4
β : α → Type u_5
inst✝⁷ : Primcodable τ
inst✝⁶ : Primcodable σ
inst✝⁵ : Primcodable α
inst✝⁴ : (a : α) → Fintype (β a)
inst✝³ : (a : α) → DecidableEq (β a)
inst✝² : (a : α) → Primcodable (β a)
inst✝¹ : PrimrecCard β
inst✝ : Primcodable γ
f : σ → α
h : ∀ (x : σ), Fintype.card (β (f x)) = 2
hf : Primrec f
this : Primrec₂ fun x w => (encode (mkL (f x) [w.1, w.2])).pred
⊢ Primrec₂ fun x w => WType.mk (f x) ((fintypeArrowEquivFinArrow' ⋯).symm ![w.1, w.2])
no goals