split at h
α : Type u_1
p : α → Bool
a : α
as : Array α
idx : Nat
hi : idx < size as
h : (if p as[idx] = true then some as[idx] else findP?.loop (idx + 1) as p) = some a
⊢ p a = true
case inl
α : Type u_1
p : α → Bool
a : α
as : Array α
idx : Nat
hi : idx < size as
h✝ : p as[idx] = true
h : some as[idx] = some a
⊢ p a = true

case inr
α : Type u_1
p : α → Bool
a : α
as : Array α
idx : Nat
hi : idx < size as
h✝ : ¬p as[idx] = true
h : findP?.loop (idx + 1) as p = some a
⊢ p a = true