internlm/Lean-Github huggingface dataset:
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
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₄
ihts₃ : IsHeap (Heap.heap ts₃)
⊢ IsHeap (findMin le ts₂ (1 + 1) (t₁, 0)).fst.children
Tactic:
apply children_IsHeap
Proof state after:
case a
α : 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
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₄
ihts₃ : IsHeap (Heap.heap ts₃)
⊢ IsHeap (Heap.heap [(findMin le ts₂ (1 + 1) (t₁, 0)).fst])
Theorem: project.deleteMin_non_empty
Proof state before:
case a.a
α : 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
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₄
ihts₃ : IsHeap (Heap.heap ts₃)
⊢ IsHeapForest' (findMin le ts₂ (1 + 1) (t₁, 0)).fst.rank []
Tactic:
. constructor
Proof state after:
no goals
Theorem: project.deleteMin_non_empty
Proof state before:
case a
α : 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
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₄
ihts₃ : IsHeap (Heap.heap ts₃)
⊢ IsBinTree t₁
Tactic:
. cases h₁
  simp_all
Proof state after:
no goals
Theorem: project.deleteMin_non_empty
Proof state before:
case a.cons
α : 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₂ : 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
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₄
ihts₃ : IsHeap (Heap.heap ts₃)
a✝¹ : IsBinTree h
a✝ : 0 < h.rank
hf : IsHeapForest' h.rank hs
⊢ IsHeapForest' (?m.262680 (_ : IsHeapForest' 0 (h :: hs))) ts₂
Tactic:
rw[heqh.right] at hf
Proof state after:
case a.cons
α : 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₂ : 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
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₄
ihts₃ : IsHeap (Heap.heap ts₃)
a✝¹ : IsBinTree h
a✝ : 0 < h.rank
hf✝ : IsHeapForest' h.rank hs
hf : IsHeapForest' h.rank (bt :: ts₂)
⊢ IsHeapForest' (?m.262680 (_ : IsHeapForest' 0 (h :: hs))) ts₂
Theorem: project.deleteMin_non_empty
Proof state before:
case a.cons
α : 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₂ : 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
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₄
ihts₃ : IsHeap (Heap.heap ts₃)
a✝¹ : IsBinTree h
a✝ : 0 < h.rank
hf✝ : IsHeapForest' h.rank hs
hf : IsHeapForest' h.rank (bt :: ts₂)
⊢ IsHeapForest' (?m.262680 (_ : IsHeapForest' 0 (h :: hs))) ts₂
Tactic:
cases hf
Proof state after:
case a.cons.cons
α : 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₂ : 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
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₄
ihts₃ : IsHeap (Heap.heap ts₃)
a✝⁴ : IsBinTree h
a✝³ : 0 < h.rank
hf : IsHeapForest' h.rank hs
a✝² : IsBinTree bt
a✝¹ : h.rank < bt.rank
a✝ : IsHeapForest' bt.rank ts₂
⊢ IsHeapForest' (?m.262680 (_ : IsHeapForest' 0 (h :: hs))) ts₂
Theorem: project.deleteMin_non_empty
Proof state before:
case a.cons.cons
α : 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₂ : 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
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₄
ihts₃ : IsHeap (Heap.heap ts₃)
a✝⁴ : IsBinTree h
a✝³ : 0 < h.rank
hf : IsHeapForest' h.rank hs
a✝² : IsBinTree bt
a✝¹ : h.rank < bt.rank
a✝ : IsHeapForest' bt.rank ts₂
⊢ IsHeapForest' (?m.262680 (_ : IsHeapForest' 0 (h :: hs))) ts₂
Tactic:
assumption
Proof state after:
no goals
Theorem: project.deleteMin_non_empty
Proof state before:
case a.a.a.cons
α : 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
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₄
ihts₃ : IsHeap (Heap.heap ts₃)
a✝¹ : IsBinTree h
a✝ : 0 < h.rank
hf : IsHeapForest' h.rank (bt :: ts₂)
⊢ IsHeapForest' (?m.269014 bt₂ n₂ lebt not_le_le hne₂ heqh dmeq ys₂ xs₃ ts₃ ts₄ heq₂ ihts₃) ts₂
Tactic:
cases hf
Proof state after:
case a.a.a.cons.cons
α : 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
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₄
ihts₃ : IsHeap (Heap.heap ts₃)
a✝⁴ : IsBinTree h
a✝³ : 0 < h.rank
a✝² : IsBinTree bt
a✝¹ : h.rank < bt.rank
a✝ : IsHeapForest' bt.rank ts₂
⊢ IsHeapForest' (?m.269014 bt₂ n₂ lebt not_le_le hne₂ heqh dmeq ys₂ xs₃ ts₃ ts₄ heq₂ ihts₃) ts₂
Theorem: project.deleteMin_non_empty
Proof state before:
case a.a.a.cons.cons
α : 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
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₄
ihts₃ : IsHeap (Heap.heap ts₃)
a✝⁴ : IsBinTree h
a✝³ : 0 < h.rank
a✝² : IsBinTree bt
a✝¹ : h.rank < bt.rank
a✝ : IsHeapForest' bt.rank ts₂
⊢ IsHeapForest' (?m.269014 bt₂ n₂ lebt not_le_le hne₂ heqh dmeq ys₂ xs₃ ts₃ ts₄ heq₂ ihts₃) ts₂
Tactic:
assumption
Proof state after:
no goals
Theorem: project.deleteMin_non_empty
Proof state before:
case a.a.a.cons
α : 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₂ : 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
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₄
ihts₃ : IsHeap (Heap.heap ts₃)
ht : IsBinTree h
a✝¹ : 0 < h.rank
a✝ : IsHeapForest' h.rank hs
⊢ IsBinTree t₁
Tactic:
rw[heqh.left] at ht
Proof state after:
case a.a.a.cons
α : 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₂ : 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
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₄
ihts₃ : IsHeap (Heap.heap ts₃)
ht : IsBinTree t₁
a✝¹ : 0 < h.rank
a✝ : IsHeapForest' h.rank hs
⊢ IsBinTree t₁
Theorem: project.deleteMin_non_empty
Proof state before:
case a.a.a.cons
α : 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₂ : 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
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₄
ihts₃ : IsHeap (Heap.heap ts₃)
ht : IsBinTree t₁
a✝¹ : 0 < h.rank
a✝ : IsHeapForest' h.rank hs
⊢ IsBinTree t₁
Tactic:
assumption
Proof state after:
no goals
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₁ : IsHeapForest' 0 (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₄
heq :
  (match t₁ :: bt :: ts₂, (findMin le ts₂ (1 + 1) (bt₂, n₂)).snd with
    | [], x => []
    | head :: as, 0 => as
    | a :: as, Nat.succ n => a :: List.eraseIdx as n) =
    ts₃
ihts₃ : IsHeapForest' 0 ts₃
ihts₄ : IsHeapForest' 0 ts₄
⊢ 0 = min 0 0
Tactic:
simp
Proof state after:
no goals
Theorem: project.deleteMin_non_empty
Proof state before:
case h_3
α : 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✝ : ℕ
a✝ : HeapNodeAux α (Heap α)
as✝ : List (HeapNodeAux α (Heap α))
n✝ : ℕ
heq✝¹ : t₁ :: bt :: ts₂ = a✝ :: as✝
heq✝ : (findMin le ts₂ (1 + 1) (bt₂, n₂)).snd = Nat.succ n✝
heq : a✝ :: List.eraseIdx as✝ n✝ = ts₃
⊢ IsMinHeap le (Heap.heap ts₃)
Tactic:
. rename_i heq₃ _
  rw[← heq]
  apply IsMinHeap_delete_BinTree
  rw[← heq₃, ← heqh.left, ← heqh.right]
  assumption
Proof state after:
no goals
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₄
heq :
  (match t₁ :: bt :: ts₂, (findMin le ts₂ (1 + 1) (bt₂, n₂)).snd with
    | [], x => []
    | head :: as, 0 => as
    | a :: as, Nat.succ n => a :: List.eraseIdx as n) =
    ts₃
h₁₂ : IsMinHeap le (Heap.heap ts₃)
⊢ IsMinHeap le (Heap.heap ts₄)
Tactic:
rw[← heq₂]
Proof state after:
α : 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₄
heq :
  (match t₁ :: bt :: ts₂, (findMin le ts₂ (1 + 1) (bt₂, n₂)).snd with
    | [], x => []
    | head :: as, 0 => as
    | a :: as, Nat.succ n => a :: List.eraseIdx as n) =
    ts₃
h₁₂ : IsMinHeap le (Heap.heap ts₃)
⊢ IsMinHeap le (findMin le ts₂ (1 + 1) (bt₂, n₂)).fst.children