Theorem: project.deleteMin_non_empty
Proof state before:
α : Type u_1
le : α → α → Bool
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 α)
ts : List (BinTree α)
n : ℕ
btxn : BinTree α × ℕ
bt : BinTree α
ts₂ : List (BinTree α)
bt₂ : BinTree α
n₂ : ℕ
lebt : le bt₂.val bt.val = true
not_le_le : ∀ (x y : α), le x y = false → le y x = true
eqeq : t₁ = bt₂ ∧ 0 = n₂
hne₂ : True
heqh : h = t₁ ∧ hs = bt :: ts₂
dmeq :
  (findMin le ts₂ (1 + 1) (bt₂, n₂)).fst.val = y ∧
    merge le (Heap.heap (List.eraseIdx (t₁ :: bt :: ts₂) (findMin le ts₂ (1 + 1) (bt₂, n₂)).snd))
        (findMin le ts₂ (1 + 1) (bt₂, n₂)).fst.children =
      ys
ys₂ xs₃ : Heap α
ts₃ ts₄ : List (HeapNodeAux α (Heap α))
heq₂ : (findMin le ts₂ (1 + 1) (bt₂, n₂)).fst.children = Heap.heap ts₄
x✝¹ : List (HeapNodeAux α (Heap α))
x✝ : ℕ
head✝ : HeapNodeAux α (Heap α)
ts₅ : List (HeapNodeAux α (Heap α))
heq₃ : t₁ :: hs = head✝ :: ts₅
heq✝ : (findMin le ts₂ (1 + 1) (bt₂, n₂)).snd = 0
heq : ts₅ = ts₃
⊢ hs = ts₅
Tactic:
apply List.tail_eq_of_cons_eq
Proof state after:
case H
α : Type u_1
le : α → α → Bool
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 α)
ts : List (BinTree α)
n : ℕ
btxn : BinTree α × ℕ
bt : BinTree α
ts₂ : List (BinTree α)
bt₂ : BinTree α
n₂ : ℕ
lebt : le bt₂.val bt.val = true
not_le_le : ∀ (x y : α), le x y = false → le y x = true
eqeq : t₁ = bt₂ ∧ 0 = n₂
hne₂ : True
heqh : h = t₁ ∧ hs = bt :: ts₂
dmeq :
  (findMin le ts₂ (1 + 1) (bt₂, n₂)).fst.val = y ∧
    merge le (Heap.heap (List.eraseIdx (t₁ :: bt :: ts₂) (findMin le ts₂ (1 + 1) (bt₂, n₂)).snd))
        (findMin le ts₂ (1 + 1) (bt₂, n₂)).fst.children =
      ys
ys₂ xs₃ : Heap α
ts₃ ts₄ : List (HeapNodeAux α (Heap α))
heq₂ : (findMin le ts₂ (1 + 1) (bt₂, n₂)).fst.children = Heap.heap ts₄
x✝¹ : List (HeapNodeAux α (Heap α))
x✝ : ℕ
head✝ : HeapNodeAux α (Heap α)
ts₅ : List (HeapNodeAux α (Heap α))
heq₃ : t₁ :: hs = head✝ :: ts₅
heq✝ : (findMin le ts₂ (1 + 1) (bt₂, n₂)).snd = 0
heq : ts₅ = ts₃
⊢ ?h₁ :: hs = ?h₂ :: ts₅

case h₁
α : Type u_1
le : α → α → Bool
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 α)
ts : List (BinTree α)
n : ℕ
btxn : BinTree α × ℕ
bt : BinTree α
ts₂ : List (BinTree α)
bt₂ : BinTree α
n₂ : ℕ
lebt : le bt₂.val bt.val = true
not_le_le : ∀ (x y : α), le x y = false → le y x = true
eqeq : t₁ = bt₂ ∧ 0 = n₂
hne₂ : True
heqh : h = t₁ ∧ hs = bt :: ts₂
dmeq :
  (findMin le ts₂ (1 + 1) (bt₂, n₂)).fst.val = y ∧
    merge le (Heap.heap (List.eraseIdx (t₁ :: bt :: ts₂) (findMin le ts₂ (1 + 1) (bt₂, n₂)).snd))
        (findMin le ts₂ (1 + 1) (bt₂, n₂)).fst.children =
      ys
ys₂ xs₃ : Heap α
ts₃ ts₄ : List (HeapNodeAux α (Heap α))
heq₂ : (findMin le ts₂ (1 + 1) (bt₂, n₂)).fst.children = Heap.heap ts₄
x✝¹ : List (HeapNodeAux α (Heap α))
x✝ : ℕ
head✝ : HeapNodeAux α (Heap α)
ts₅ : List (HeapNodeAux α (Heap α))
heq₃ : t₁ :: hs = head✝ :: ts₅
heq✝ : (findMin le ts₂ (1 + 1) (bt₂, n₂)).snd = 0
heq : ts₅ = ts₃
⊢ HeapNodeAux α (Heap α)

case h₂
α : Type u_1
le : α → α → Bool
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 α)
ts : List (BinTree α)
n : ℕ
btxn : BinTree α × ℕ
bt : BinTree α
ts₂ : List (BinTree α)
bt₂ : BinTree α
n₂ : ℕ
lebt : le bt₂.val bt.val = true
not_le_le : ∀ (x y : α), le x y = false → le y x = true
eqeq : t₁ = bt₂ ∧ 0 = n₂
hne₂ : True
heqh : h = t₁ ∧ hs = bt :: ts₂
dmeq :
  (findMin le ts₂ (1 + 1) (bt₂, n₂)).fst.val = y ∧
    merge le (Heap.heap (List.eraseIdx (t₁ :: bt :: ts₂) (findMin le ts₂ (1 + 1) (bt₂, n₂)).snd))
        (findMin le ts₂ (1 + 1) (bt₂, n₂)).fst.children =
      ys
ys₂ xs₃ : Heap α
ts₃ ts₄ : List (HeapNodeAux α (Heap α))
heq₂ : (findMin le ts₂ (1 + 1) (bt₂, n₂)).fst.children = Heap.heap ts₄
x✝¹ : List (HeapNodeAux α (Heap α))
x✝ : ℕ
head✝ : HeapNodeAux α (Heap α)
ts₅ : List (HeapNodeAux α (Heap α))
heq₃ : t₁ :: hs = head✝ :: ts₅
heq✝ : (findMin le ts₂ (1 + 1) (bt₂, n₂)).snd = 0
heq : ts₅ = ts₃
⊢ HeapNodeAux α (Heap α)