split at h <;> simp at h
α : Type u_1
p : α → Bool
a : α
as : Array α
idx : Nat
h :
  (if h : idx < size as then
      let a := as[idx];
      if p a = true then some a else findP?.loop (idx + 1) as p
    else none) =
    some a
⊢ p a = true
case inl
α : Type u_1
p : α → Bool
a : α
as : Array α
idx : Nat
h✝ : 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