match hpi : p (x[i]'(trans (r:=LT.lt) (s:=LE.le) histop h)) with
| true =>
  rewrite [hpi, cond_true] at hk'
  exact absurd hk' <| Nat.not_lt_of_le hk
| false =>
  rewrite [hpi, cond_false] at hk'
  cases Nat.eq_or_lt_of_le hk with
  | inl heq => exact heq ▸ hpi
  | inr hlt => exact get_findIdx_loop_of_lt x p stop h (i+1) k hlt hk'
α : Type u
n : Nat
x : SizedArray α n
p : α → Bool
stop : Nat
h : stop ≤ n
i k : Nat
hk : k ≥ i
x✝ : k < n
hkstop : k < stop
histop : i < stop
hk' : k < bif p x[i] then i else findIdx.loop x p stop h (i + 1)
⊢ p x[k] = false
no goals