rcases as with (_ | ⟨a, as⟩)
case some.some
α : Type u_1
α₁ : Type u_2
α₂ : Type u_3
β : Type u_4
γ : Type u_5
σ : Type u_6
τ : Type u_7
inst✝⁶ : Primcodable α
inst✝⁵ : Primcodable α₁
inst✝⁴ : Primcodable α₂
inst✝³ : Primcodable β
inst✝² : Primcodable γ
inst✝¹ : Primcodable σ
inst✝ : Primcodable τ
f : σ → α × β → γ
hf : Primrec₂ f
h : Primrec₂ fun x p => some (Primrec.decodeZipWithRec f x p)
F : σ → ℕ → Option (List γ) := fun x n => (decode n).bind fun p => some (List.zipWith (fun a b => f x (a, b)) p.1 p.2)
x : σ
e : ℕ
as : List α
has : decode e.unpair.1 = some as
bs : List β
hbs : decode e.unpair.2 = some bs
⊢ List.rec (some [])
      (fun head tail tail_ih =>
        List.rec (some [])
          (fun head_1 tail tail_ih =>
            Option.map
              ((fun cs => f x (head, head_1) :: cs.iget) ∘ fun n =>
                ((decode n.unpair.1).bind fun a => Option.map (Prod.mk a) (decode n.unpair.2)).bind fun a =>
                  some (List.zipWith (fun a b => f x (a, b)) a.1 a.2))
              ((List.range e).get? (e.unpair.1.pred.unpair.2.pair e.unpair.2.pred.unpair.2)))
          bs)
      as =
    some (List.zipWith (fun a b => f x (a, b)) as bs)
case some.some.nil
α : Type u_1
α₁ : Type u_2
α₂ : Type u_3
β : Type u_4
γ : Type u_5
σ : Type u_6
τ : Type u_7
inst✝⁶ : Primcodable α
inst✝⁵ : Primcodable α₁
inst✝⁴ : Primcodable α₂
inst✝³ : Primcodable β
inst✝² : Primcodable γ
inst✝¹ : Primcodable σ
inst✝ : Primcodable τ
f : σ → α × β → γ
hf : Primrec₂ f
h : Primrec₂ fun x p => some (Primrec.decodeZipWithRec f x p)
F : σ → ℕ → Option (List γ) := fun x n => (decode n).bind fun p => some (List.zipWith (fun a b => f x (a, b)) p.1 p.2)
x : σ
e : ℕ
bs : List β
hbs : decode e.unpair.2 = some bs
has : decode e.unpair.1 = some []
⊢ List.rec (some [])
      (fun head tail tail_ih =>
        List.rec (some [])
          (fun head_1 tail tail_ih =>
            Option.map
              ((fun cs => f x (head, head_1) :: cs.iget) ∘ fun n =>
                ((decode n.unpair.1).bind fun a => Option.map (Prod.mk a) (decode n.unpair.2)).bind fun a =>
                  some (List.zipWith (fun a b => f x (a, b)) a.1 a.2))
              ((List.range e).get? (e.unpair.1.pred.unpair.2.pair e.unpair.2.pred.unpair.2)))
          bs)
      [] =
    some (List.zipWith (fun a b => f x (a, b)) [] bs)

case some.some.cons
α : Type u_1
α₁ : Type u_2
α₂ : Type u_3
β : Type u_4
γ : Type u_5
σ : Type u_6
τ : Type u_7
inst✝⁶ : Primcodable α
inst✝⁵ : Primcodable α₁
inst✝⁴ : Primcodable α₂
inst✝³ : Primcodable β
inst✝² : Primcodable γ
inst✝¹ : Primcodable σ
inst✝ : Primcodable τ
f : σ → α × β → γ
hf : Primrec₂ f
h : Primrec₂ fun x p => some (Primrec.decodeZipWithRec f x p)
F : σ → ℕ → Option (List γ) := fun x n => (decode n).bind fun p => some (List.zipWith (fun a b => f x (a, b)) p.1 p.2)
x : σ
e : ℕ
bs : List β
hbs : decode e.unpair.2 = some bs
a : α
as : List α
has : decode e.unpair.1 = some (a :: as)
⊢ List.rec (some [])
      (fun head tail tail_ih =>
        List.rec (some [])
          (fun head_1 tail tail_ih =>
            Option.map
              ((fun cs => f x (head, head_1) :: cs.iget) ∘ fun n =>
                ((decode n.unpair.1).bind fun a => Option.map (Prod.mk a) (decode n.unpair.2)).bind fun a =>
                  some (List.zipWith (fun a b => f x (a, b)) a.1 a.2))
              ((List.range e).get? (e.unpair.1.pred.unpair.2.pair e.unpair.2.pred.unpair.2)))
          bs)
      (a :: as) =
    some (List.zipWith (fun a b => f x (a, b)) (a :: as) bs)