if hx : lt x[i] x[lhs] then
  simp only [if_pos hx]
  exact node_odd_next x i hi hl (Nat.le_of_not_lt hr) hx
else
  simp only [if_neg hx]
  exact node_odd_end x i hi hl (Nat.le_of_not_lt hr) (Bool.of_not_eq_true hx)
α : Type u
lt : α → α → Bool
x : Subarray α
i : Nat
lhs : Nat := 2 * i + 1
rhs : Nat := lhs + 1
hr : ¬rhs < Subarray.size x
hl : lhs < Subarray.size x
hi : i < Subarray.size x
⊢ heapifyDown.OpSpec lt x i
    (if lt x[i] x[lhs] = true then Subarray.swap x { val := i, isLt := hi } { val := lhs, isLt := hl } else x)
no goals