Theorem: Algdata.BinaryHeap.stop_mkHeap_loop (Algdata/Data/BinaryHeap/Basic.lean)

State before:
α : Type u
lt : α → α → Bool
x : Subarray α
n : Nat
⊢ (mkHeap.loop lt x n).stop = x.stop
Tactic:
induction n generalizing x with
| zero => rfl
| succ n IH => dsimp [mkHeap.loop]; rw [IH, stop_heapifyDown]
State after:
no goals

State before:
case zero
α : Type u
lt : α → α → Bool
x : Subarray α
⊢ (mkHeap.loop lt x Nat.zero).stop = x.stop
Tactic:
rfl
State after:
no goals

State before:
case succ
α : Type u
lt : α → α → Bool
n : Nat
IH : ∀ (x : Subarray α), (mkHeap.loop lt x n).stop = x.stop
x : Subarray α
⊢ (mkHeap.loop lt x (Nat.succ n)).stop = x.stop
Tactic:
dsimp [mkHeap.loop]
State after:
case succ
α : Type u
lt : α → α → Bool
n : Nat
IH : ∀ (x : Subarray α), (mkHeap.loop lt x n).stop = x.stop
x : Subarray α
⊢ (mkHeap.loop lt (heapifyDown lt x n) n).stop = x.stop

State before:
case succ
α : Type u
lt : α → α → Bool
n : Nat
IH : ∀ (x : Subarray α), (mkHeap.loop lt x n).stop = x.stop
x : Subarray α
⊢ (mkHeap.loop lt (heapifyDown lt x n) n).stop = x.stop
Tactic:
rw [IH, stop_heapifyDown]
State after:
no goals