Theorem: project.deleteMin_non_empty
Proof state before:
case a.a
α : Type u_1
le : α → α → Bool
not_le_le : ∀ (x y : α), ¬le x y = true → le y x = true
le_trans : ∀ (x y z : α), le x y = true → le y z = true → le x z = true
le_rfl : ∀ (z : α), le z z = true
xs : Heap α
y : α
ys : Heap α
h : HeapNodeAux α (Heap α)
hs : List (HeapNodeAux α (Heap α))
h₁ : IsHeap (Heap.heap (h :: hs))
h₂ : IsMinHeap le (Heap.heap (h :: hs))
xs₂ : Heap α
t₁ : HeapNodeAux α (Heap α)
x✝⁴ : List (BinTree α)
x✝³ : ℕ
x✝² : BinTree α × ℕ
bt : BinTree α
ts : List (BinTree α)
h'✝ : BinTree α
idx'✝ : ℕ
heq✝ : (t₁, 0) = (h'✝, idx'✝)
hne₂ : bt :: ts = [] → False
h✝ : ¬le h'✝.val bt.val = true
left✝ : (findMin le ts (1 + 1) (bt, 1)).fst.val = y
x✝¹ x✝ : Heap α
ts₂ ts₃ : List (HeapNodeAux α (Heap α))
heq₃ : Heap.heap (List.eraseIdx (t₁ :: bt :: ts) (findMin le ts (1 + 1) (bt, 1)).snd) = Heap.heap ts₂
heq₄ : (findMin le ts (1 + 1) (bt, 1)).fst.children = Heap.heap ts₃
heq : Heap.heap (mergeNodes le ts₂ ts₃) = ys
heqh : h = t₁ ∧ hs = bt :: ts
imhts₂ : IsMinHeap le (Heap.heap ts₂)
⊢ IsSearchTree le (findMin le ts (1 + 1) (bt, 1)).fst

case a.a
α : Type u_1
le : α → α → Bool
not_le_le : ∀ (x y : α), ¬le x y = true → le y x = true
le_trans : ∀ (x y z : α), le x y = true → le y z = true → le x z = true
le_rfl : ∀ (z : α), le z z = true
xs : Heap α
y : α
ys : Heap α
h : HeapNodeAux α (Heap α)
hs : List (HeapNodeAux α (Heap α))
h₁ : IsHeap (Heap.heap (h :: hs))
h₂ : IsMinHeap le (Heap.heap (h :: hs))
xs₂ : Heap α
t₁ : HeapNodeAux α (Heap α)
x✝⁴ : List (BinTree α)
x✝³ : ℕ
x✝² : BinTree α × ℕ
bt : BinTree α
ts : List (BinTree α)
h'✝ : BinTree α
idx'✝ : ℕ
heq✝ : (t₁, 0) = (h'✝, idx'✝)
hne₂ : bt :: ts = [] → False
h✝ : ¬le h'✝.val bt.val = true
left✝ : (findMin le ts (1 + 1) (bt, 1)).fst.val = y
x✝¹ x✝ : Heap α
ts₂ ts₃ : List (HeapNodeAux α (Heap α))
heq₃ : Heap.heap (List.eraseIdx (t₁ :: bt :: ts) (findMin le ts (1 + 1) (bt, 1)).snd) = Heap.heap ts₂
heq₄ : (findMin le ts (1 + 1) (bt, 1)).fst.children = Heap.heap ts₃
heq : Heap.heap (mergeNodes le ts₂ ts₃) = ys
heqh : h = t₁ ∧ hs = bt :: ts
imhts₂ : IsMinHeap le (Heap.heap ts₂)
⊢ IsMinHeap le (Heap.heap [])
Tactic:
. apply IsSearchTree_findMin <;>
  . rw[heqh.right] at h₂
    cases h₂ with | cons _ mh =>
    cases mh
    assumption
Proof state after:
case a.a
α : Type u_1
le : α → α → Bool
not_le_le : ∀ (x y : α), ¬le x y = true → le y x = true
le_trans : ∀ (x y z : α), le x y = true → le y z = true → le x z = true
le_rfl : ∀ (z : α), le z z = true
xs : Heap α
y : α
ys : Heap α
h : HeapNodeAux α (Heap α)
hs : List (HeapNodeAux α (Heap α))
h₁ : IsHeap (Heap.heap (h :: hs))
h₂ : IsMinHeap le (Heap.heap (h :: hs))
xs₂ : Heap α
t₁ : HeapNodeAux α (Heap α)
x✝⁴ : List (BinTree α)
x✝³ : ℕ
x✝² : BinTree α × ℕ
bt : BinTree α
ts : List (BinTree α)
h'✝ : BinTree α
idx'✝ : ℕ
heq✝ : (t₁, 0) = (h'✝, idx'✝)
hne₂ : bt :: ts = [] → False
h✝ : ¬le h'✝.val bt.val = true
left✝ : (findMin le ts (1 + 1) (bt, 1)).fst.val = y
x✝¹ x✝ : Heap α
ts₂ ts₃ : List (HeapNodeAux α (Heap α))
heq₃ : Heap.heap (List.eraseIdx (t₁ :: bt :: ts) (findMin le ts (1 + 1) (bt, 1)).snd) = Heap.heap ts₂
heq₄ : (findMin le ts (1 + 1) (bt, 1)).fst.children = Heap.heap ts₃
heq : Heap.heap (mergeNodes le ts₂ ts₃) = ys
heqh : h = t₁ ∧ hs = bt :: ts
imhts₂ : IsMinHeap le (Heap.heap ts₂)
⊢ IsMinHeap le (Heap.heap [])