{ simp[List.toVector]
  by_cases hlw : w.length = Fintype.card (β a) <;> simp[hlw, elim, elim']
  { simp[Vector.get_mk_eq_get, List.ofFn_get_eq_map_cast]; congr
    rw[Encodable.fintypeArrowEquivFinArrow_fintypeEquivFin (fun i =>
      WType.elim γ (fun x => f x.fst (List.ofFn (fintypeArrowEquivFinArrow x.snd))) (w.get (i.cast hlw.symm)).val)];
    rw[List.ofFn_get_eq_map_cast (fun z => WType.elim γ (fun x => f x.fst (List.ofFn (fintypeArrowEquivFinArrow x.snd))) z.val) w];rfl } }
case succ.e_a.h.some
α : Type u_1
β : α → Type u_2
inst✝⁴ : Primcodable α
inst✝³ : (a : α) → Fintype (β a)
inst✝² : (a : α) → DecidableEq (β a)
inst✝¹ : (a : α) → Primcodable (β a)
inst✝ : PrimrecCard β
σ : Type u_3
γ : Type u_4
f : α → List γ → γ
e s : ℕ
a : α
w : List (SubWType β s)
⊢ Option.map
      (fun x =>
        elim' γ (fun x => f x.fst (List.ofFn (fintypeArrowEquivFinArrow x.snd))) (s + 1)
          (ofWType (WType.mk a fun b => ↑(x.get (fintypeEquivFin b))) (s + 1) ⋯))
      (List.toVector (Fintype.card (β a)) w) =
    Option.map (fun v => f a v)
      (if w.length = Fintype.card (β a) then
        some (List.map (elim' γ (fun x => f x.fst (List.ofFn (fintypeArrowEquivFinArrow x.snd))) s) w)
      else none)
no goals