url
stringclasses 147
values | commit
stringclasses 147
values | file_path
stringlengths 7
101
| full_name
stringlengths 1
94
| start
stringlengths 6
10
| end
stringlengths 6
11
| tactic
stringlengths 1
11.2k
| state_before
stringlengths 3
2.09M
| state_after
stringlengths 6
2.09M
|
---|---|---|---|---|---|---|---|---|
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred2.lean | Notes.totally_ordered_of_sorted | [180, 1] | [216, 42] | linarith | case h
α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l : List α
h✝ : Sorted r l
i✝ j✝ : ℕ
a✝ : α
h : i✝ < j✝
hi : i✝ < 1
hj : j✝ < 1
⊢ False | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred2.lean | Notes.totally_ordered_of_sorted | [180, 1] | [216, 42] | intro h' hi hj | α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l : List α
h : Sorted r l
i✝ j✝ : ℕ
a₁✝ a₂✝ : α
as✝ : List α
h₁ : r a₁✝ a₂✝
h₂ : Sorted r (a₂✝ :: as✝)
⊢ i✝ < j✝ →
∀ (x : i✝ < List.length (a₁✝ :: a₂✝ :: as✝)) (x_1 : j✝ < List.length (a₁✝ :: a₂✝ :: as✝)),
r (a₁✝ :: a₂✝ :: as✝)[i✝] (a₁✝ :: a₂✝ :: as✝)[j✝] | α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l : List α
h : Sorted r l
i✝ j✝ : ℕ
a₁✝ a₂✝ : α
as✝ : List α
h₁ : r a₁✝ a₂✝
h₂ : Sorted r (a₂✝ :: as✝)
h' : i✝ < j✝
hi : i✝ < List.length (a₁✝ :: a₂✝ :: as✝)
hj : j✝ < List.length (a₁✝ :: a₂✝ :: as✝)
⊢ r (a₁✝ :: a₂✝ :: as✝)[i✝] (a₁✝ :: a₂✝ :: as✝)[j✝] |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred2.lean | Notes.totally_ordered_of_sorted | [180, 1] | [216, 42] | rename_i i j a₁ a₂ as | α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l : List α
h : Sorted r l
i✝ j✝ : ℕ
a₁✝ a₂✝ : α
as✝ : List α
h₁ : r a₁✝ a₂✝
h₂ : Sorted r (a₂✝ :: as✝)
h' : i✝ < j✝
hi : i✝ < List.length (a₁✝ :: a₂✝ :: as✝)
hj : j✝ < List.length (a₁✝ :: a₂✝ :: as✝)
⊢ r (a₁✝ :: a₂✝ :: as✝)[i✝] (a₁✝ :: a₂✝ :: as✝)[j✝] | α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l : List α
h : Sorted r l
i j : ℕ
a₁ a₂ : α
as : List α
h₁ : r a₁ a₂
h₂ : Sorted r (a₂ :: as)
h' : i < j
hi : i < List.length (a₁ :: a₂ :: as)
hj : j < List.length (a₁ :: a₂ :: as)
⊢ r (a₁ :: a₂ :: as)[i] (a₁ :: a₂ :: as)[j] |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred2.lean | Notes.totally_ordered_of_sorted | [180, 1] | [216, 42] | have ⟨l,hl⟩ := Nat.succ_of_lt h' | α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l : List α
h : Sorted r l
i j : ℕ
a₁ a₂ : α
as : List α
h₁ : r a₁ a₂
h₂ : Sorted r (a₂ :: as)
h' : i < j
hi : i < List.length (a₁ :: a₂ :: as)
hj : j < List.length (a₁ :: a₂ :: as)
⊢ r (a₁ :: a₂ :: as)[i] (a₁ :: a₂ :: as)[j] | α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l✝ : List α
h : Sorted r l✝
i j : ℕ
a₁ a₂ : α
as : List α
h₁ : r a₁ a₂
h₂ : Sorted r (a₂ :: as)
h' : i < j
hi : i < List.length (a₁ :: a₂ :: as)
hj : j < List.length (a₁ :: a₂ :: as)
l : ℕ
hl : l + 1 = j
⊢ r (a₁ :: a₂ :: as)[i] (a₁ :: a₂ :: as)[j] |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred2.lean | Notes.totally_ordered_of_sorted | [180, 1] | [216, 42] | rw [←hl] at hj h' | α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l✝ : List α
h : Sorted r l✝
i j : ℕ
a₁ a₂ : α
as : List α
h₁ : r a₁ a₂
h₂ : Sorted r (a₂ :: as)
h' : i < j
hi : i < List.length (a₁ :: a₂ :: as)
hj : j < List.length (a₁ :: a₂ :: as)
l : ℕ
hl : l + 1 = j
⊢ r (a₁ :: a₂ :: as)[i] (a₁ :: a₂ :: as)[j] | α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l✝ : List α
h : Sorted r l✝
i j : ℕ
a₁ a₂ : α
as : List α
h₁ : r a₁ a₂
h₂ : Sorted r (a₂ :: as)
hi : i < List.length (a₁ :: a₂ :: as)
hj✝ : j < List.length (a₁ :: a₂ :: as)
l : ℕ
h' : i < l + 1
hj : l + 1 < List.length (a₁ :: a₂ :: as)
hl : l + 1 = j
⊢ r (a₁ :: a₂ :: as)[i] (a₁ :: a₂ :: as)[j] |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred2.lean | Notes.totally_ordered_of_sorted | [180, 1] | [216, 42] | simp only [←hl] | α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l✝ : List α
h : Sorted r l✝
i j : ℕ
a₁ a₂ : α
as : List α
h₁ : r a₁ a₂
h₂ : Sorted r (a₂ :: as)
hi : i < List.length (a₁ :: a₂ :: as)
hj✝ : j < List.length (a₁ :: a₂ :: as)
l : ℕ
h' : i < l + 1
hj : l + 1 < List.length (a₁ :: a₂ :: as)
hl : l + 1 = j
⊢ r (a₁ :: a₂ :: as)[i] (a₁ :: a₂ :: as)[j] | α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l✝ : List α
h : Sorted r l✝
i j : ℕ
a₁ a₂ : α
as : List α
h₁ : r a₁ a₂
h₂ : Sorted r (a₂ :: as)
hi : i < List.length (a₁ :: a₂ :: as)
hj✝ : j < List.length (a₁ :: a₂ :: as)
l : ℕ
h' : i < l + 1
hj : l + 1 < List.length (a₁ :: a₂ :: as)
hl : l + 1 = j
⊢ r (a₁ :: a₂ :: as)[i] (a₁ :: a₂ :: as)[l + 1] |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred2.lean | Notes.totally_ordered_of_sorted | [180, 1] | [216, 42] | have : l < (a₂ :: as).length :=
Nat.pred_lt_pred (by simp) hj | α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l✝ : List α
h : Sorted r l✝
i j : ℕ
a₁ a₂ : α
as : List α
h₁ : r a₁ a₂
h₂ : Sorted r (a₂ :: as)
hi : i < List.length (a₁ :: a₂ :: as)
hj✝ : j < List.length (a₁ :: a₂ :: as)
l : ℕ
h' : i < l + 1
hj : l + 1 < List.length (a₁ :: a₂ :: as)
hl : l + 1 = j
⊢ r (a₁ :: a₂ :: as)[i] (a₁ :: a₂ :: as)[l + 1] | α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l✝ : List α
h : Sorted r l✝
i j : ℕ
a₁ a₂ : α
as : List α
h₁ : r a₁ a₂
h₂ : Sorted r (a₂ :: as)
hi : i < List.length (a₁ :: a₂ :: as)
hj✝ : j < List.length (a₁ :: a₂ :: as)
l : ℕ
h' : i < l + 1
hj : l + 1 < List.length (a₁ :: a₂ :: as)
hl : l + 1 = j
this : l < List.length (a₂ :: as)
⊢ r (a₁ :: a₂ :: as)[i] (a₁ :: a₂ :: as)[l + 1] |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred2.lean | Notes.totally_ordered_of_sorted | [180, 1] | [216, 42] | have hl' : (a₁::a₂::as)[l+1] = (a₂::as)[l] := rfl | α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l✝ : List α
h : Sorted r l✝
i j : ℕ
a₁ a₂ : α
as : List α
h₁ : r a₁ a₂
h₂ : Sorted r (a₂ :: as)
hi : i < List.length (a₁ :: a₂ :: as)
hj✝ : j < List.length (a₁ :: a₂ :: as)
l : ℕ
h' : i < l + 1
hj : l + 1 < List.length (a₁ :: a₂ :: as)
hl : l + 1 = j
this : l < List.length (a₂ :: as)
⊢ r (a₁ :: a₂ :: as)[i] (a₁ :: a₂ :: as)[l + 1] | α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l✝ : List α
h : Sorted r l✝
i j : ℕ
a₁ a₂ : α
as : List α
h₁ : r a₁ a₂
h₂ : Sorted r (a₂ :: as)
hi : i < List.length (a₁ :: a₂ :: as)
hj✝ : j < List.length (a₁ :: a₂ :: as)
l : ℕ
h' : i < l + 1
hj : l + 1 < List.length (a₁ :: a₂ :: as)
hl : l + 1 = j
this : l < List.length (a₂ :: as)
hl' : (a₁ :: a₂ :: as)[l + 1] = (a₂ :: as)[l]
⊢ r (a₁ :: a₂ :: as)[i] (a₁ :: a₂ :: as)[l + 1] |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred2.lean | Notes.totally_ordered_of_sorted | [180, 1] | [216, 42] | by_cases i = 0 | α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l✝ : List α
h : Sorted r l✝
i j : ℕ
a₁ a₂ : α
as : List α
h₁ : r a₁ a₂
h₂ : Sorted r (a₂ :: as)
hi : i < List.length (a₁ :: a₂ :: as)
hj✝ : j < List.length (a₁ :: a₂ :: as)
l : ℕ
h' : i < l + 1
hj : l + 1 < List.length (a₁ :: a₂ :: as)
hl : l + 1 = j
this : l < List.length (a₂ :: as)
hl' : (a₁ :: a₂ :: as)[l + 1] = (a₂ :: as)[l]
⊢ r (a₁ :: a₂ :: as)[i] (a₁ :: a₂ :: as)[l + 1] | case pos
α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l✝ : List α
h✝ : Sorted r l✝
i j : ℕ
a₁ a₂ : α
as : List α
h₁ : r a₁ a₂
h₂ : Sorted r (a₂ :: as)
hi : i < List.length (a₁ :: a₂ :: as)
hj✝ : j < List.length (a₁ :: a₂ :: as)
l : ℕ
h' : i < l + 1
hj : l + 1 < List.length (a₁ :: a₂ :: as)
hl : l + 1 = j
this : l < List.length (a₂ :: as)
hl' : (a₁ :: a₂ :: as)[l + 1] = (a₂ :: as)[l]
h : i = 0
⊢ r (a₁ :: a₂ :: as)[i] (a₁ :: a₂ :: as)[l + 1]
case neg
α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l✝ : List α
h✝ : Sorted r l✝
i j : ℕ
a₁ a₂ : α
as : List α
h₁ : r a₁ a₂
h₂ : Sorted r (a₂ :: as)
hi : i < List.length (a₁ :: a₂ :: as)
hj✝ : j < List.length (a₁ :: a₂ :: as)
l : ℕ
h' : i < l + 1
hj : l + 1 < List.length (a₁ :: a₂ :: as)
hl : l + 1 = j
this : l < List.length (a₂ :: as)
hl' : (a₁ :: a₂ :: as)[l + 1] = (a₂ :: as)[l]
h : ¬i = 0
⊢ r (a₁ :: a₂ :: as)[i] (a₁ :: a₂ :: as)[l + 1] |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred2.lean | Notes.totally_ordered_of_sorted | [180, 1] | [216, 42] | simp | α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l✝ : List α
h : Sorted r l✝
i j : ℕ
a₁ a₂ : α
as : List α
h₁ : r a₁ a₂
h₂ : Sorted r (a₂ :: as)
hi : i < List.length (a₁ :: a₂ :: as)
hj✝ : j < List.length (a₁ :: a₂ :: as)
l : ℕ
h' : i < l + 1
hj : l + 1 < List.length (a₁ :: a₂ :: as)
hl : l + 1 = j
⊢ l + 1 ≠ 0 | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred2.lean | Notes.totally_ordered_of_sorted | [180, 1] | [216, 42] | simp [h,hl'] at * | case pos
α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l✝ : List α
h✝ : Sorted r l✝
i j : ℕ
a₁ a₂ : α
as : List α
h₁ : r a₁ a₂
h₂ : Sorted r (a₂ :: as)
hi : i < List.length (a₁ :: a₂ :: as)
hj✝ : j < List.length (a₁ :: a₂ :: as)
l : ℕ
h' : i < l + 1
hj : l + 1 < List.length (a₁ :: a₂ :: as)
hl : l + 1 = j
this : l < List.length (a₂ :: as)
hl' : (a₁ :: a₂ :: as)[l + 1] = (a₂ :: as)[l]
h : i = 0
⊢ r (a₁ :: a₂ :: as)[i] (a₁ :: a₂ :: as)[l + 1] | case pos
α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l✝ : List α
h✝ : Sorted r l✝
i j : ℕ
a₁ a₂ : α
as : List α
h₁ : r a₁ a₂
h₂ : Sorted r (a₂ :: as)
hi : i < List.length (a₁ :: a₂ :: as)
hj✝ : j < List.length (a₁ :: a₂ :: as)
l : ℕ
hj : l + 1 < List.length (a₁ :: a₂ :: as)
hl : l + 1 = j
this : l < List.length (a₂ :: as)
h' hl' h : True
⊢ r a₁ (List.get (a₂ :: as) { val := l, isLt := (_ : l < List.length (a₂ :: as)) }) |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred2.lean | Notes.totally_ordered_of_sorted | [180, 1] | [216, 42] | by_cases l = 0 | case pos
α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l✝ : List α
h✝ : Sorted r l✝
i j : ℕ
a₁ a₂ : α
as : List α
h₁ : r a₁ a₂
h₂ : Sorted r (a₂ :: as)
hi : i < List.length (a₁ :: a₂ :: as)
hj✝ : j < List.length (a₁ :: a₂ :: as)
l : ℕ
hj : l + 1 < List.length (a₁ :: a₂ :: as)
hl : l + 1 = j
this : l < List.length (a₂ :: as)
h' hl' h : True
⊢ r a₁ (List.get (a₂ :: as) { val := l, isLt := (_ : l < List.length (a₂ :: as)) }) | case pos
α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l✝ : List α
h✝¹ : Sorted r l✝
i j : ℕ
a₁ a₂ : α
as : List α
h₁ : r a₁ a₂
h₂ : Sorted r (a₂ :: as)
hi : i < List.length (a₁ :: a₂ :: as)
hj✝ : j < List.length (a₁ :: a₂ :: as)
l : ℕ
hj : l + 1 < List.length (a₁ :: a₂ :: as)
hl : l + 1 = j
this : l < List.length (a₂ :: as)
h' hl' h✝ : True
h : l = 0
⊢ r a₁ (List.get (a₂ :: as) { val := l, isLt := (_ : l < List.length (a₂ :: as)) })
case neg
α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l✝ : List α
h✝¹ : Sorted r l✝
i j : ℕ
a₁ a₂ : α
as : List α
h₁ : r a₁ a₂
h₂ : Sorted r (a₂ :: as)
hi : i < List.length (a₁ :: a₂ :: as)
hj✝ : j < List.length (a₁ :: a₂ :: as)
l : ℕ
hj : l + 1 < List.length (a₁ :: a₂ :: as)
hl : l + 1 = j
this : l < List.length (a₂ :: as)
h' hl' h✝ : True
h : ¬l = 0
⊢ r a₁ (List.get (a₂ :: as) { val := l, isLt := (_ : l < List.length (a₂ :: as)) }) |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred2.lean | Notes.totally_ordered_of_sorted | [180, 1] | [216, 42] | simp [h,h₁] | case pos
α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l✝ : List α
h✝¹ : Sorted r l✝
i j : ℕ
a₁ a₂ : α
as : List α
h₁ : r a₁ a₂
h₂ : Sorted r (a₂ :: as)
hi : i < List.length (a₁ :: a₂ :: as)
hj✝ : j < List.length (a₁ :: a₂ :: as)
l : ℕ
hj : l + 1 < List.length (a₁ :: a₂ :: as)
hl : l + 1 = j
this : l < List.length (a₂ :: as)
h' hl' h✝ : True
h : l = 0
⊢ r a₁ (List.get (a₂ :: as) { val := l, isLt := (_ : l < List.length (a₂ :: as)) }) | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred2.lean | Notes.totally_ordered_of_sorted | [180, 1] | [216, 42] | apply trans' | case neg
α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l✝ : List α
h✝¹ : Sorted r l✝
i j : ℕ
a₁ a₂ : α
as : List α
h₁ : r a₁ a₂
h₂ : Sorted r (a₂ :: as)
hi : i < List.length (a₁ :: a₂ :: as)
hj✝ : j < List.length (a₁ :: a₂ :: as)
l : ℕ
hj : l + 1 < List.length (a₁ :: a₂ :: as)
hl : l + 1 = j
this : l < List.length (a₂ :: as)
h' hl' h✝ : True
h : ¬l = 0
⊢ r a₁ (List.get (a₂ :: as) { val := l, isLt := (_ : l < List.length (a₂ :: as)) }) | case neg.a
α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l✝ : List α
h✝¹ : Sorted r l✝
i j : ℕ
a₁ a₂ : α
as : List α
h₁ : r a₁ a₂
h₂ : Sorted r (a₂ :: as)
hi : i < List.length (a₁ :: a₂ :: as)
hj✝ : j < List.length (a₁ :: a₂ :: as)
l : ℕ
hj : l + 1 < List.length (a₁ :: a₂ :: as)
hl : l + 1 = j
this : l < List.length (a₂ :: as)
h' hl' h✝ : True
h : ¬l = 0
⊢ r a₁ ?neg.a₂✝
case neg.a
α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l✝ : List α
h✝¹ : Sorted r l✝
i j : ℕ
a₁ a₂ : α
as : List α
h₁ : r a₁ a₂
h₂ : Sorted r (a₂ :: as)
hi : i < List.length (a₁ :: a₂ :: as)
hj✝ : j < List.length (a₁ :: a₂ :: as)
l : ℕ
hj : l + 1 < List.length (a₁ :: a₂ :: as)
hl : l + 1 = j
this : l < List.length (a₂ :: as)
h' hl' h✝ : True
h : ¬l = 0
⊢ r ?neg.a₂✝ (List.get (a₂ :: as) { val := l, isLt := (_ : l < List.length (a₂ :: as)) })
case neg.a₂
α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l✝ : List α
h✝¹ : Sorted r l✝
i j : ℕ
a₁ a₂ : α
as : List α
h₁ : r a₁ a₂
h₂ : Sorted r (a₂ :: as)
hi : i < List.length (a₁ :: a₂ :: as)
hj✝ : j < List.length (a₁ :: a₂ :: as)
l : ℕ
hj : l + 1 < List.length (a₁ :: a₂ :: as)
hl : l + 1 = j
this : l < List.length (a₂ :: as)
h' hl' h✝ : True
h : ¬l = 0
⊢ α |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred2.lean | Notes.totally_ordered_of_sorted | [180, 1] | [216, 42] | . exact h₁ | case neg.a
α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l✝ : List α
h✝¹ : Sorted r l✝
i j : ℕ
a₁ a₂ : α
as : List α
h₁ : r a₁ a₂
h₂ : Sorted r (a₂ :: as)
hi : i < List.length (a₁ :: a₂ :: as)
hj✝ : j < List.length (a₁ :: a₂ :: as)
l : ℕ
hj : l + 1 < List.length (a₁ :: a₂ :: as)
hl : l + 1 = j
this : l < List.length (a₂ :: as)
h' hl' h✝ : True
h : ¬l = 0
⊢ r a₁ ?neg.a₂✝
case neg.a
α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l✝ : List α
h✝¹ : Sorted r l✝
i j : ℕ
a₁ a₂ : α
as : List α
h₁ : r a₁ a₂
h₂ : Sorted r (a₂ :: as)
hi : i < List.length (a₁ :: a₂ :: as)
hj✝ : j < List.length (a₁ :: a₂ :: as)
l : ℕ
hj : l + 1 < List.length (a₁ :: a₂ :: as)
hl : l + 1 = j
this : l < List.length (a₂ :: as)
h' hl' h✝ : True
h : ¬l = 0
⊢ r ?neg.a₂✝ (List.get (a₂ :: as) { val := l, isLt := (_ : l < List.length (a₂ :: as)) })
case neg.a₂
α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l✝ : List α
h✝¹ : Sorted r l✝
i j : ℕ
a₁ a₂ : α
as : List α
h₁ : r a₁ a₂
h₂ : Sorted r (a₂ :: as)
hi : i < List.length (a₁ :: a₂ :: as)
hj✝ : j < List.length (a₁ :: a₂ :: as)
l : ℕ
hj : l + 1 < List.length (a₁ :: a₂ :: as)
hl : l + 1 = j
this : l < List.length (a₂ :: as)
h' hl' h✝ : True
h : ¬l = 0
⊢ α | case neg.a
α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l✝ : List α
h✝¹ : Sorted r l✝
i j : ℕ
a₁ a₂ : α
as : List α
h₁ : r a₁ a₂
h₂ : Sorted r (a₂ :: as)
hi : i < List.length (a₁ :: a₂ :: as)
hj✝ : j < List.length (a₁ :: a₂ :: as)
l : ℕ
hj : l + 1 < List.length (a₁ :: a₂ :: as)
hl : l + 1 = j
this : l < List.length (a₂ :: as)
h' hl' h✝ : True
h : ¬l = 0
⊢ r a₂ (List.get (a₂ :: as) { val := l, isLt := (_ : l < List.length (a₂ :: as)) }) |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred2.lean | Notes.totally_ordered_of_sorted | [180, 1] | [216, 42] | exact h₁ | case neg.a
α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l✝ : List α
h✝¹ : Sorted r l✝
i j : ℕ
a₁ a₂ : α
as : List α
h₁ : r a₁ a₂
h₂ : Sorted r (a₂ :: as)
hi : i < List.length (a₁ :: a₂ :: as)
hj✝ : j < List.length (a₁ :: a₂ :: as)
l : ℕ
hj : l + 1 < List.length (a₁ :: a₂ :: as)
hl : l + 1 = j
this : l < List.length (a₂ :: as)
h' hl' h✝ : True
h : ¬l = 0
⊢ r a₁ ?neg.a₂✝ | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred2.lean | Notes.totally_ordered_of_sorted | [180, 1] | [216, 42] | change r (a₂::as)[0] (a₂::as)[l] | case neg.a
α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l✝ : List α
h✝¹ : Sorted r l✝
i j : ℕ
a₁ a₂ : α
as : List α
h₁ : r a₁ a₂
h₂ : Sorted r (a₂ :: as)
hi : i < List.length (a₁ :: a₂ :: as)
hj✝ : j < List.length (a₁ :: a₂ :: as)
l : ℕ
hj : l + 1 < List.length (a₁ :: a₂ :: as)
hl : l + 1 = j
this : l < List.length (a₂ :: as)
h' hl' h✝ : True
h : ¬l = 0
⊢ r a₂ (List.get (a₂ :: as) { val := l, isLt := (_ : l < List.length (a₂ :: as)) }) | case neg.a
α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l✝ : List α
h✝¹ : Sorted r l✝
i j : ℕ
a₁ a₂ : α
as : List α
h₁ : r a₁ a₂
h₂ : Sorted r (a₂ :: as)
hi : i < List.length (a₁ :: a₂ :: as)
hj✝ : j < List.length (a₁ :: a₂ :: as)
l : ℕ
hj : l + 1 < List.length (a₁ :: a₂ :: as)
hl : l + 1 = j
this : l < List.length (a₂ :: as)
h' hl' h✝ : True
h : ¬l = 0
⊢ r (a₂ :: as)[0] (a₂ :: as)[l] |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred2.lean | Notes.totally_ordered_of_sorted | [180, 1] | [216, 42] | apply totally_ordered_of_sorted h₂ | case neg.a
α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l✝ : List α
h✝¹ : Sorted r l✝
i j : ℕ
a₁ a₂ : α
as : List α
h₁ : r a₁ a₂
h₂ : Sorted r (a₂ :: as)
hi : i < List.length (a₁ :: a₂ :: as)
hj✝ : j < List.length (a₁ :: a₂ :: as)
l : ℕ
hj : l + 1 < List.length (a₁ :: a₂ :: as)
hl : l + 1 = j
this : l < List.length (a₂ :: as)
h' hl' h✝ : True
h : ¬l = 0
⊢ r (a₂ :: as)[0] (a₂ :: as)[l] | case neg.a.a
α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l✝ : List α
h✝¹ : Sorted r l✝
i j : ℕ
a₁ a₂ : α
as : List α
h₁ : r a₁ a₂
h₂ : Sorted r (a₂ :: as)
hi : i < List.length (a₁ :: a₂ :: as)
hj✝ : j < List.length (a₁ :: a₂ :: as)
l : ℕ
hj : l + 1 < List.length (a₁ :: a₂ :: as)
hl : l + 1 = j
this : l < List.length (a₂ :: as)
h' hl' h✝ : True
h : ¬l = 0
⊢ 0 < l |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred2.lean | Notes.totally_ordered_of_sorted | [180, 1] | [216, 42] | apply Nat.one_le_iff_ne_zero.mpr h | case neg.a.a
α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l✝ : List α
h✝¹ : Sorted r l✝
i j : ℕ
a₁ a₂ : α
as : List α
h₁ : r a₁ a₂
h₂ : Sorted r (a₂ :: as)
hi : i < List.length (a₁ :: a₂ :: as)
hj✝ : j < List.length (a₁ :: a₂ :: as)
l : ℕ
hj : l + 1 < List.length (a₁ :: a₂ :: as)
hl : l + 1 = j
this : l < List.length (a₂ :: as)
h' hl' h✝ : True
h : ¬l = 0
⊢ 0 < l | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred2.lean | Notes.totally_ordered_of_sorted | [180, 1] | [216, 42] | have ⟨k,hk⟩ := Nat.exists_eq_succ_of_ne_zero h | case neg
α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l✝ : List α
h✝ : Sorted r l✝
i j : ℕ
a₁ a₂ : α
as : List α
h₁ : r a₁ a₂
h₂ : Sorted r (a₂ :: as)
hi : i < List.length (a₁ :: a₂ :: as)
hj✝ : j < List.length (a₁ :: a₂ :: as)
l : ℕ
h' : i < l + 1
hj : l + 1 < List.length (a₁ :: a₂ :: as)
hl : l + 1 = j
this : l < List.length (a₂ :: as)
hl' : (a₁ :: a₂ :: as)[l + 1] = (a₂ :: as)[l]
h : ¬i = 0
⊢ r (a₁ :: a₂ :: as)[i] (a₁ :: a₂ :: as)[l + 1] | case neg
α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l✝ : List α
h✝ : Sorted r l✝
i j : ℕ
a₁ a₂ : α
as : List α
h₁ : r a₁ a₂
h₂ : Sorted r (a₂ :: as)
hi : i < List.length (a₁ :: a₂ :: as)
hj✝ : j < List.length (a₁ :: a₂ :: as)
l : ℕ
h' : i < l + 1
hj : l + 1 < List.length (a₁ :: a₂ :: as)
hl : l + 1 = j
this : l < List.length (a₂ :: as)
hl' : (a₁ :: a₂ :: as)[l + 1] = (a₂ :: as)[l]
h : ¬i = 0
k : ℕ
hk : i = Nat.succ k
⊢ r (a₁ :: a₂ :: as)[i] (a₁ :: a₂ :: as)[l + 1] |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred2.lean | Notes.totally_ordered_of_sorted | [180, 1] | [216, 42] | rw [hk] at hi h' | case neg
α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l✝ : List α
h✝ : Sorted r l✝
i j : ℕ
a₁ a₂ : α
as : List α
h₁ : r a₁ a₂
h₂ : Sorted r (a₂ :: as)
hi : i < List.length (a₁ :: a₂ :: as)
hj✝ : j < List.length (a₁ :: a₂ :: as)
l : ℕ
h' : i < l + 1
hj : l + 1 < List.length (a₁ :: a₂ :: as)
hl : l + 1 = j
this : l < List.length (a₂ :: as)
hl' : (a₁ :: a₂ :: as)[l + 1] = (a₂ :: as)[l]
h : ¬i = 0
k : ℕ
hk : i = Nat.succ k
⊢ r (a₁ :: a₂ :: as)[i] (a₁ :: a₂ :: as)[l + 1] | case neg
α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l✝ : List α
h✝ : Sorted r l✝
i j : ℕ
a₁ a₂ : α
as : List α
h₁ : r a₁ a₂
h₂ : Sorted r (a₂ :: as)
hi✝ : i < List.length (a₁ :: a₂ :: as)
hj✝ : j < List.length (a₁ :: a₂ :: as)
l : ℕ
hj : l + 1 < List.length (a₁ :: a₂ :: as)
hl : l + 1 = j
this : l < List.length (a₂ :: as)
hl' : (a₁ :: a₂ :: as)[l + 1] = (a₂ :: as)[l]
h : ¬i = 0
k : ℕ
h' : Nat.succ k < l + 1
hi : Nat.succ k < List.length (a₁ :: a₂ :: as)
hk : i = Nat.succ k
⊢ r (a₁ :: a₂ :: as)[i] (a₁ :: a₂ :: as)[l + 1] |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred2.lean | Notes.totally_ordered_of_sorted | [180, 1] | [216, 42] | simp only [hk] | case neg
α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l✝ : List α
h✝ : Sorted r l✝
i j : ℕ
a₁ a₂ : α
as : List α
h₁ : r a₁ a₂
h₂ : Sorted r (a₂ :: as)
hi✝ : i < List.length (a₁ :: a₂ :: as)
hj✝ : j < List.length (a₁ :: a₂ :: as)
l : ℕ
hj : l + 1 < List.length (a₁ :: a₂ :: as)
hl : l + 1 = j
this : l < List.length (a₂ :: as)
hl' : (a₁ :: a₂ :: as)[l + 1] = (a₂ :: as)[l]
h : ¬i = 0
k : ℕ
h' : Nat.succ k < l + 1
hi : Nat.succ k < List.length (a₁ :: a₂ :: as)
hk : i = Nat.succ k
⊢ r (a₁ :: a₂ :: as)[i] (a₁ :: a₂ :: as)[l + 1] | case neg
α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l✝ : List α
h✝ : Sorted r l✝
i j : ℕ
a₁ a₂ : α
as : List α
h₁ : r a₁ a₂
h₂ : Sorted r (a₂ :: as)
hi✝ : i < List.length (a₁ :: a₂ :: as)
hj✝ : j < List.length (a₁ :: a₂ :: as)
l : ℕ
hj : l + 1 < List.length (a₁ :: a₂ :: as)
hl : l + 1 = j
this : l < List.length (a₂ :: as)
hl' : (a₁ :: a₂ :: as)[l + 1] = (a₂ :: as)[l]
h : ¬i = 0
k : ℕ
h' : Nat.succ k < l + 1
hi : Nat.succ k < List.length (a₁ :: a₂ :: as)
hk : i = Nat.succ k
⊢ r (a₁ :: a₂ :: as)[Nat.succ k] (a₁ :: a₂ :: as)[l + 1] |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred2.lean | Notes.totally_ordered_of_sorted | [180, 1] | [216, 42] | have : k < (a₂::as).length :=
Nat.pred_lt_pred (by simp) hi | case neg
α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l✝ : List α
h✝ : Sorted r l✝
i j : ℕ
a₁ a₂ : α
as : List α
h₁ : r a₁ a₂
h₂ : Sorted r (a₂ :: as)
hi✝ : i < List.length (a₁ :: a₂ :: as)
hj✝ : j < List.length (a₁ :: a₂ :: as)
l : ℕ
hj : l + 1 < List.length (a₁ :: a₂ :: as)
hl : l + 1 = j
this : l < List.length (a₂ :: as)
hl' : (a₁ :: a₂ :: as)[l + 1] = (a₂ :: as)[l]
h : ¬i = 0
k : ℕ
h' : Nat.succ k < l + 1
hi : Nat.succ k < List.length (a₁ :: a₂ :: as)
hk : i = Nat.succ k
⊢ r (a₁ :: a₂ :: as)[Nat.succ k] (a₁ :: a₂ :: as)[l + 1] | case neg
α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l✝ : List α
h✝ : Sorted r l✝
i j : ℕ
a₁ a₂ : α
as : List α
h₁ : r a₁ a₂
h₂ : Sorted r (a₂ :: as)
hi✝ : i < List.length (a₁ :: a₂ :: as)
hj✝ : j < List.length (a₁ :: a₂ :: as)
l : ℕ
hj : l + 1 < List.length (a₁ :: a₂ :: as)
hl : l + 1 = j
this✝ : l < List.length (a₂ :: as)
hl' : (a₁ :: a₂ :: as)[l + 1] = (a₂ :: as)[l]
h : ¬i = 0
k : ℕ
h' : Nat.succ k < l + 1
hi : Nat.succ k < List.length (a₁ :: a₂ :: as)
hk : i = Nat.succ k
this : k < List.length (a₂ :: as)
⊢ r (a₁ :: a₂ :: as)[Nat.succ k] (a₁ :: a₂ :: as)[l + 1] |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred2.lean | Notes.totally_ordered_of_sorted | [180, 1] | [216, 42] | have hk' : (a₁::a₂::as)[k+1] = (a₂::as)[k] := rfl | case neg
α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l✝ : List α
h✝ : Sorted r l✝
i j : ℕ
a₁ a₂ : α
as : List α
h₁ : r a₁ a₂
h₂ : Sorted r (a₂ :: as)
hi✝ : i < List.length (a₁ :: a₂ :: as)
hj✝ : j < List.length (a₁ :: a₂ :: as)
l : ℕ
hj : l + 1 < List.length (a₁ :: a₂ :: as)
hl : l + 1 = j
this✝ : l < List.length (a₂ :: as)
hl' : (a₁ :: a₂ :: as)[l + 1] = (a₂ :: as)[l]
h : ¬i = 0
k : ℕ
h' : Nat.succ k < l + 1
hi : Nat.succ k < List.length (a₁ :: a₂ :: as)
hk : i = Nat.succ k
this : k < List.length (a₂ :: as)
⊢ r (a₁ :: a₂ :: as)[Nat.succ k] (a₁ :: a₂ :: as)[l + 1] | case neg
α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l✝ : List α
h✝ : Sorted r l✝
i j : ℕ
a₁ a₂ : α
as : List α
h₁ : r a₁ a₂
h₂ : Sorted r (a₂ :: as)
hi✝ : i < List.length (a₁ :: a₂ :: as)
hj✝ : j < List.length (a₁ :: a₂ :: as)
l : ℕ
hj : l + 1 < List.length (a₁ :: a₂ :: as)
hl : l + 1 = j
this✝ : l < List.length (a₂ :: as)
hl' : (a₁ :: a₂ :: as)[l + 1] = (a₂ :: as)[l]
h : ¬i = 0
k : ℕ
h' : Nat.succ k < l + 1
hi : Nat.succ k < List.length (a₁ :: a₂ :: as)
hk : i = Nat.succ k
this : k < List.length (a₂ :: as)
hk' : (a₁ :: a₂ :: as)[k + 1] = (a₂ :: as)[k]
⊢ r (a₁ :: a₂ :: as)[Nat.succ k] (a₁ :: a₂ :: as)[l + 1] |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred2.lean | Notes.totally_ordered_of_sorted | [180, 1] | [216, 42] | rw [hk',hl'] | case neg
α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l✝ : List α
h✝ : Sorted r l✝
i j : ℕ
a₁ a₂ : α
as : List α
h₁ : r a₁ a₂
h₂ : Sorted r (a₂ :: as)
hi✝ : i < List.length (a₁ :: a₂ :: as)
hj✝ : j < List.length (a₁ :: a₂ :: as)
l : ℕ
hj : l + 1 < List.length (a₁ :: a₂ :: as)
hl : l + 1 = j
this✝ : l < List.length (a₂ :: as)
hl' : (a₁ :: a₂ :: as)[l + 1] = (a₂ :: as)[l]
h : ¬i = 0
k : ℕ
h' : Nat.succ k < l + 1
hi : Nat.succ k < List.length (a₁ :: a₂ :: as)
hk : i = Nat.succ k
this : k < List.length (a₂ :: as)
hk' : (a₁ :: a₂ :: as)[k + 1] = (a₂ :: as)[k]
⊢ r (a₁ :: a₂ :: as)[Nat.succ k] (a₁ :: a₂ :: as)[l + 1] | case neg
α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l✝ : List α
h✝ : Sorted r l✝
i j : ℕ
a₁ a₂ : α
as : List α
h₁ : r a₁ a₂
h₂ : Sorted r (a₂ :: as)
hi✝ : i < List.length (a₁ :: a₂ :: as)
hj✝ : j < List.length (a₁ :: a₂ :: as)
l : ℕ
hj : l + 1 < List.length (a₁ :: a₂ :: as)
hl : l + 1 = j
this✝ : l < List.length (a₂ :: as)
hl' : (a₁ :: a₂ :: as)[l + 1] = (a₂ :: as)[l]
h : ¬i = 0
k : ℕ
h' : Nat.succ k < l + 1
hi : Nat.succ k < List.length (a₁ :: a₂ :: as)
hk : i = Nat.succ k
this : k < List.length (a₂ :: as)
hk' : (a₁ :: a₂ :: as)[k + 1] = (a₂ :: as)[k]
⊢ r (a₂ :: as)[k] (a₂ :: as)[l] |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred2.lean | Notes.totally_ordered_of_sorted | [180, 1] | [216, 42] | apply totally_ordered_of_sorted h₂ | case neg
α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l✝ : List α
h✝ : Sorted r l✝
i j : ℕ
a₁ a₂ : α
as : List α
h₁ : r a₁ a₂
h₂ : Sorted r (a₂ :: as)
hi✝ : i < List.length (a₁ :: a₂ :: as)
hj✝ : j < List.length (a₁ :: a₂ :: as)
l : ℕ
hj : l + 1 < List.length (a₁ :: a₂ :: as)
hl : l + 1 = j
this✝ : l < List.length (a₂ :: as)
hl' : (a₁ :: a₂ :: as)[l + 1] = (a₂ :: as)[l]
h : ¬i = 0
k : ℕ
h' : Nat.succ k < l + 1
hi : Nat.succ k < List.length (a₁ :: a₂ :: as)
hk : i = Nat.succ k
this : k < List.length (a₂ :: as)
hk' : (a₁ :: a₂ :: as)[k + 1] = (a₂ :: as)[k]
⊢ r (a₂ :: as)[k] (a₂ :: as)[l] | case neg.a
α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l✝ : List α
h✝ : Sorted r l✝
i j : ℕ
a₁ a₂ : α
as : List α
h₁ : r a₁ a₂
h₂ : Sorted r (a₂ :: as)
hi✝ : i < List.length (a₁ :: a₂ :: as)
hj✝ : j < List.length (a₁ :: a₂ :: as)
l : ℕ
hj : l + 1 < List.length (a₁ :: a₂ :: as)
hl : l + 1 = j
this✝ : l < List.length (a₂ :: as)
hl' : (a₁ :: a₂ :: as)[l + 1] = (a₂ :: as)[l]
h : ¬i = 0
k : ℕ
h' : Nat.succ k < l + 1
hi : Nat.succ k < List.length (a₁ :: a₂ :: as)
hk : i = Nat.succ k
this : k < List.length (a₂ :: as)
hk' : (a₁ :: a₂ :: as)[k + 1] = (a₂ :: as)[k]
⊢ k < l |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred2.lean | Notes.totally_ordered_of_sorted | [180, 1] | [216, 42] | apply Nat.pred_lt_pred (by simp) h' | case neg.a
α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l✝ : List α
h✝ : Sorted r l✝
i j : ℕ
a₁ a₂ : α
as : List α
h₁ : r a₁ a₂
h₂ : Sorted r (a₂ :: as)
hi✝ : i < List.length (a₁ :: a₂ :: as)
hj✝ : j < List.length (a₁ :: a₂ :: as)
l : ℕ
hj : l + 1 < List.length (a₁ :: a₂ :: as)
hl : l + 1 = j
this✝ : l < List.length (a₂ :: as)
hl' : (a₁ :: a₂ :: as)[l + 1] = (a₂ :: as)[l]
h : ¬i = 0
k : ℕ
h' : Nat.succ k < l + 1
hi : Nat.succ k < List.length (a₁ :: a₂ :: as)
hk : i = Nat.succ k
this : k < List.length (a₂ :: as)
hk' : (a₁ :: a₂ :: as)[k + 1] = (a₂ :: as)[k]
⊢ k < l | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred2.lean | Notes.totally_ordered_of_sorted | [180, 1] | [216, 42] | simp | α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l✝ : List α
h✝ : Sorted r l✝
i j : ℕ
a₁ a₂ : α
as : List α
h₁ : r a₁ a₂
h₂ : Sorted r (a₂ :: as)
hi✝ : i < List.length (a₁ :: a₂ :: as)
hj✝ : j < List.length (a₁ :: a₂ :: as)
l : ℕ
hj : l + 1 < List.length (a₁ :: a₂ :: as)
hl : l + 1 = j
this : l < List.length (a₂ :: as)
hl' : (a₁ :: a₂ :: as)[l + 1] = (a₂ :: as)[l]
h : ¬i = 0
k : ℕ
h' : Nat.succ k < l + 1
hi : Nat.succ k < List.length (a₁ :: a₂ :: as)
hk : i = Nat.succ k
⊢ Nat.succ k ≠ 0 | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred2.lean | Notes.totally_ordered_of_sorted | [180, 1] | [216, 42] | simp | α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l✝ : List α
h✝ : Sorted r l✝
i j : ℕ
a₁ a₂ : α
as : List α
h₁ : r a₁ a₂
h₂ : Sorted r (a₂ :: as)
hi✝ : i < List.length (a₁ :: a₂ :: as)
hj✝ : j < List.length (a₁ :: a₂ :: as)
l : ℕ
hj : l + 1 < List.length (a₁ :: a₂ :: as)
hl : l + 1 = j
this✝ : l < List.length (a₂ :: as)
hl' : (a₁ :: a₂ :: as)[l + 1] = (a₂ :: as)[l]
h : ¬i = 0
k : ℕ
h' : Nat.succ k < l + 1
hi : Nat.succ k < List.length (a₁ :: a₂ :: as)
hk : i = Nat.succ k
this : k < List.length (a₂ :: as)
hk' : (a₁ :: a₂ :: as)[k + 1] = (a₂ :: as)[k]
⊢ Nat.succ k ≠ 0 | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/MoreTacs.lean | leq_succ_of_leq | [96, 1] | [106, 45] | match n with
| 0 =>
have meq0 : m = 0 := Nat.eq_zero_of_le_zero h
rw [meq0]
simp
| n'+1 =>
simp [plus]
calc
m ≤ n'+1 := by exact h
_ ≤ (n'+1)+1 := by exact Nat.le_succ _ | α β γ δ : Type
f : α → β
g : β → γ
h✝ : γ → δ
m n : ℕ
h : m ≤ n
⊢ m ≤ plus n 1 | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/MoreTacs.lean | leq_succ_of_leq | [96, 1] | [106, 45] | have meq0 : m = 0 := Nat.eq_zero_of_le_zero h | α β γ δ : Type
f : α → β
g : β → γ
h✝ : γ → δ
m n : ℕ
h : m ≤ 0
⊢ m ≤ plus 0 1 | α β γ δ : Type
f : α → β
g : β → γ
h✝ : γ → δ
m n : ℕ
h : m ≤ 0
meq0 : m = 0
⊢ m ≤ plus 0 1 |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/MoreTacs.lean | leq_succ_of_leq | [96, 1] | [106, 45] | rw [meq0] | α β γ δ : Type
f : α → β
g : β → γ
h✝ : γ → δ
m n : ℕ
h : m ≤ 0
meq0 : m = 0
⊢ m ≤ plus 0 1 | α β γ δ : Type
f : α → β
g : β → γ
h✝ : γ → δ
m n : ℕ
h : m ≤ 0
meq0 : m = 0
⊢ 0 ≤ plus 0 1 |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/MoreTacs.lean | leq_succ_of_leq | [96, 1] | [106, 45] | simp | α β γ δ : Type
f : α → β
g : β → γ
h✝ : γ → δ
m n : ℕ
h : m ≤ 0
meq0 : m = 0
⊢ 0 ≤ plus 0 1 | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/MoreTacs.lean | leq_succ_of_leq | [96, 1] | [106, 45] | simp [plus] | α β γ δ : Type
f : α → β
g : β → γ
h✝ : γ → δ
m n n' : ℕ
h : m ≤ n' + 1
⊢ m ≤ plus (n' + 1) 1 | α β γ δ : Type
f : α → β
g : β → γ
h✝ : γ → δ
m n n' : ℕ
h : m ≤ n' + 1
⊢ m ≤ Nat.succ (n' + 1) |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/MoreTacs.lean | leq_succ_of_leq | [96, 1] | [106, 45] | calc
m ≤ n'+1 := by exact h
_ ≤ (n'+1)+1 := by exact Nat.le_succ _ | α β γ δ : Type
f : α → β
g : β → γ
h✝ : γ → δ
m n n' : ℕ
h : m ≤ n' + 1
⊢ m ≤ Nat.succ (n' + 1) | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/MoreTacs.lean | leq_succ_of_leq | [96, 1] | [106, 45] | exact h | α β γ δ : Type
f : α → β
g : β → γ
h✝ : γ → δ
m n n' : ℕ
h : m ≤ n' + 1
⊢ m ≤ n' + 1 | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/MoreTacs.lean | leq_succ_of_leq | [96, 1] | [106, 45] | exact Nat.le_succ _ | α β γ δ : Type
f : α → β
g : β → γ
h✝ : γ → δ
m n n' : ℕ
h : m ≤ n' + 1
⊢ n' + 1 ≤ n' + 1 + 1 | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/MoreTacs.lean | succ_leq_succ_of_leq | [108, 1] | [114, 39] | match a with
| 0 => simp [plus]; assumption
| b+1 =>
simp [plus]
apply Nat.succ_le_succ
exact succ_leq_succ_of_leq m n b h | α β γ δ : Type
f : α → β
g : β → γ
h✝ : γ → δ
m n a : ℕ
h : m ≤ n
⊢ plus m a ≤ plus n a | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/MoreTacs.lean | succ_leq_succ_of_leq | [108, 1] | [114, 39] | simp [plus] | α β γ δ : Type
f : α → β
g : β → γ
h✝ : γ → δ
m n a : ℕ
h : m ≤ n
⊢ plus m 0 ≤ plus n 0 | α β γ δ : Type
f : α → β
g : β → γ
h✝ : γ → δ
m n a : ℕ
h : m ≤ n
⊢ m ≤ n |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/MoreTacs.lean | succ_leq_succ_of_leq | [108, 1] | [114, 39] | assumption | α β γ δ : Type
f : α → β
g : β → γ
h✝ : γ → δ
m n a : ℕ
h : m ≤ n
⊢ m ≤ n | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/MoreTacs.lean | succ_leq_succ_of_leq | [108, 1] | [114, 39] | simp [plus] | α β γ δ : Type
f : α → β
g : β → γ
h✝ : γ → δ
m n a : ℕ
h : m ≤ n
b : ℕ
⊢ plus m (b + 1) ≤ plus n (b + 1) | α β γ δ : Type
f : α → β
g : β → γ
h✝ : γ → δ
m n a : ℕ
h : m ≤ n
b : ℕ
⊢ Nat.succ (plus m b) ≤ Nat.succ (plus n b) |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/MoreTacs.lean | succ_leq_succ_of_leq | [108, 1] | [114, 39] | apply Nat.succ_le_succ | α β γ δ : Type
f : α → β
g : β → γ
h✝ : γ → δ
m n a : ℕ
h : m ≤ n
b : ℕ
⊢ Nat.succ (plus m b) ≤ Nat.succ (plus n b) | case a
α β γ δ : Type
f : α → β
g : β → γ
h✝ : γ → δ
m n a : ℕ
h : m ≤ n
b : ℕ
⊢ plus m b ≤ plus n b |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/MoreTacs.lean | succ_leq_succ_of_leq | [108, 1] | [114, 39] | exact succ_leq_succ_of_leq m n b h | case a
α β γ δ : Type
f : α → β
g : β → γ
h✝ : γ → δ
m n a : ℕ
h : m ≤ n
b : ℕ
⊢ plus m b ≤ plus n b | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/Theorems.lean | exp_eq_exp' | [98, 1] | [104, 25] | match e with
| 0 => simp [exp,exp']
| n+1 =>
simp only [exp,exp']
simp only [Nat.add]
rw [exp_eq_exp' b n] | b e : ℕ
⊢ exp b e = exp' b e | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/Theorems.lean | exp_eq_exp' | [98, 1] | [104, 25] | simp [exp,exp'] | b e : ℕ
⊢ exp b 0 = exp' b 0 | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/Theorems.lean | exp_eq_exp' | [98, 1] | [104, 25] | simp only [exp,exp'] | b e n : ℕ
⊢ exp b (n + 1) = exp' b (n + 1) | b e n : ℕ
⊢ exp b (Nat.add n 0) * b = exp' b (Nat.add n 0) * b |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/Theorems.lean | exp_eq_exp' | [98, 1] | [104, 25] | simp only [Nat.add] | b e n : ℕ
⊢ exp b (Nat.add n 0) * b = exp' b (Nat.add n 0) * b | b e n : ℕ
⊢ exp b n * b = exp' b n * b |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/Theorems.lean | exp_eq_exp' | [98, 1] | [104, 25] | rw [exp_eq_exp' b n] | b e n : ℕ
⊢ exp b n * b = exp' b n * b | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred.lean | Notes.sorted_tail_of_sorted | [49, 1] | [53, 30] | match h with
| single => apply nil
| longer _ h'' => exact h'' | α : Type
f : α → α → Bool
r : α → α → Prop
a : α
as : List α
h : Sorted f (a :: as)
⊢ Sorted f as | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred.lean | Notes.sorted_tail_of_sorted | [49, 1] | [53, 30] | apply nil | α : Type
f : α → α → Bool
r : α → α → Prop
a : α
as : List α
h : Sorted f (a :: as)
⊢ Sorted f [] | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred.lean | Notes.sorted_tail_of_sorted | [49, 1] | [53, 30] | exact h'' | α : Type
f : α → α → Bool
r : α → α → Prop
a : α
as : List α
h : Sorted f (a :: as)
a₂✝ : α
as✝ : List α
h✝ : f a a₂✝ = true
h'' : Sorted f (a₂✝ :: as✝)
⊢ Sorted f (a₂✝ :: as✝) | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred.lean | Notes.len_insert_eq_succ_len | [80, 1] | [87, 62] | match l with
| [] => simp [insert]
| a'::as =>
match h : f a a' with
| true => simp [insert, h]
| false => simp [insert, h]; apply len_insert_eq_succ_len | α : Type
f : α → α → Bool
r : α → α → Prop
a : α
l : List α
⊢ List.length (insert f a l) = List.length l + 1 | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred.lean | Notes.len_insert_eq_succ_len | [80, 1] | [87, 62] | simp [insert] | α : Type
f : α → α → Bool
r : α → α → Prop
a : α
l : List α
⊢ List.length (insert f a []) = List.length [] + 1 | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred.lean | Notes.len_insert_eq_succ_len | [80, 1] | [87, 62] | match h : f a a' with
| true => simp [insert, h]
| false => simp [insert, h]; apply len_insert_eq_succ_len | α : Type
f : α → α → Bool
r : α → α → Prop
a : α
l : List α
a' : α
as : List α
⊢ List.length (insert f a (a' :: as)) = List.length (a' :: as) + 1 | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred.lean | Notes.len_insert_eq_succ_len | [80, 1] | [87, 62] | simp [insert, h] | α : Type
f : α → α → Bool
r : α → α → Prop
a : α
l : List α
a' : α
as : List α
h : f a a' = true
⊢ List.length (insert f a (a' :: as)) = List.length (a' :: as) + 1 | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred.lean | Notes.len_insert_eq_succ_len | [80, 1] | [87, 62] | simp [insert, h] | α : Type
f : α → α → Bool
r : α → α → Prop
a : α
l : List α
a' : α
as : List α
h : f a a' = false
⊢ List.length (insert f a (a' :: as)) = List.length (a' :: as) + 1 | α : Type
f : α → α → Bool
r : α → α → Prop
a : α
l : List α
a' : α
as : List α
h : f a a' = false
⊢ List.length (insert f a as) = List.length as + 1 |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred.lean | Notes.len_insert_eq_succ_len | [80, 1] | [87, 62] | apply len_insert_eq_succ_len | α : Type
f : α → α → Bool
r : α → α → Prop
a : α
l : List α
a' : α
as : List α
h : f a a' = false
⊢ List.length (insert f a as) = List.length as + 1 | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred.lean | Notes.ordered_cons_insert_of_unordered | [136, 1] | [143, 66] | simpa [insert] | α : Type
f : α → α → Bool
r : α → α → Prop
a a' : α
as : List α
h' : f a' a = true
h : Sorted f [a']
⊢ f a' (insert f a [])[0] = true | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred.lean | Notes.ordered_cons_insert_of_unordered | [136, 1] | [143, 66] | simpa [insert, h''] | α : Type
f : α → α → Bool
r : α → α → Prop
a a' : α
as : List α
h' : f a' a = true
a'' : α
as' : List α
h : Sorted f (a' :: a'' :: as')
h'' : f a a'' = true
⊢ f a' (insert f a (a'' :: as'))[0] = true | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred.lean | Notes.ordered_cons_insert_of_unordered | [136, 1] | [143, 66] | simp [insert, h''] | α : Type
f : α → α → Bool
r : α → α → Prop
a a' : α
as : List α
h' : f a' a = true
a'' : α
as' : List α
h : Sorted f (a' :: a'' :: as')
h'' : f a a'' = false
⊢ f a' (insert f a (a'' :: as'))[0] = true | α : Type
f : α → α → Bool
r : α → α → Prop
a a' : α
as : List α
h' : f a' a = true
a'' : α
as' : List α
h : Sorted f (a' :: a'' :: as')
h'' : f a a'' = false
⊢ f a' a'' = true |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred.lean | Notes.ordered_cons_insert_of_unordered | [136, 1] | [143, 66] | apply ordered_of_sorted f h | α : Type
f : α → α → Bool
r : α → α → Prop
a a' : α
as : List α
h' : f a' a = true
a'' : α
as' : List α
h : Sorted f (a' :: a'' :: as')
h'' : f a a'' = false
⊢ f a' a'' = true | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred.lean | Notes.insert_sorted_of_sorted | [147, 1] | [159, 39] | simp [insert, h'] | α : Type
f : α → α → Bool
r : α → α → Prop
a : α
l : List α
inst✝ : Asymmetric f
a' : α
as : List α
h : Sorted f (a' :: as)
h' : f a a' = true
⊢ Sorted f (insert f a (a' :: as)) | α : Type
f : α → α → Bool
r : α → α → Prop
a : α
l : List α
inst✝ : Asymmetric f
a' : α
as : List α
h : Sorted f (a' :: as)
h' : f a a' = true
⊢ Sorted f (a :: a' :: as) |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred.lean | Notes.insert_sorted_of_sorted | [147, 1] | [159, 39] | apply longer h' h | α : Type
f : α → α → Bool
r : α → α → Prop
a : α
l : List α
inst✝ : Asymmetric f
a' : α
as : List α
h : Sorted f (a' :: as)
h' : f a a' = true
⊢ Sorted f (a :: a' :: as) | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred.lean | Notes.insert_sorted_of_sorted | [147, 1] | [159, 39] | simp [insert, h'] | α : Type
f : α → α → Bool
r : α → α → Prop
a : α
l : List α
inst✝ : Asymmetric f
a' : α
as : List α
h : Sorted f (a' :: as)
h' : f a a' = false
⊢ Sorted f (insert f a (a' :: as)) | α : Type
f : α → α → Bool
r : α → α → Prop
a : α
l : List α
inst✝ : Asymmetric f
a' : α
as : List α
h : Sorted f (a' :: as)
h' : f a a' = false
⊢ Sorted f (a' :: insert f a as) |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred.lean | Notes.insert_sorted_of_sorted | [147, 1] | [159, 39] | apply cons f | α : Type
f : α → α → Bool
r : α → α → Prop
a : α
l : List α
inst✝ : Asymmetric f
a' : α
as : List α
h : Sorted f (a' :: as)
h' : f a a' = false
⊢ Sorted f (a' :: insert f a as) | case h₁
α : Type
f : α → α → Bool
r : α → α → Prop
a : α
l : List α
inst✝ : Asymmetric f
a' : α
as : List α
h : Sorted f (a' :: as)
h' : f a a' = false
⊢ Sorted f (insert f a as)
case h₃
α : Type
f : α → α → Bool
r : α → α → Prop
a : α
l : List α
inst✝ : Asymmetric f
a' : α
as : List α
h : Sorted f (a' :: as)
h' : f a a' = false
⊢ f a' (insert f a as)[0] = true
case h₂
α : Type
f : α → α → Bool
r : α → α → Prop
a : α
l : List α
inst✝ : Asymmetric f
a' : α
as : List α
h : Sorted f (a' :: as)
h' : f a a' = false
⊢ List.length (insert f a as) > 0 |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred.lean | Notes.insert_sorted_of_sorted | [147, 1] | [159, 39] | apply insert_sorted_of_sorted <| sorted_tail_of_sorted f a' as h | case h₁
α : Type
f : α → α → Bool
r : α → α → Prop
a : α
l : List α
inst✝ : Asymmetric f
a' : α
as : List α
h : Sorted f (a' :: as)
h' : f a a' = false
⊢ Sorted f (insert f a as) | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred.lean | Notes.insert_sorted_of_sorted | [147, 1] | [159, 39] | apply ordered_cons_insert_of_unordered f h | case h₃
α : Type
f : α → α → Bool
r : α → α → Prop
a : α
l : List α
inst✝ : Asymmetric f
a' : α
as : List α
h : Sorted f (a' :: as)
h' : f a a' = false
⊢ f a' (insert f a as)[0] = true | case h₃
α : Type
f : α → α → Bool
r : α → α → Prop
a : α
l : List α
inst✝ : Asymmetric f
a' : α
as : List α
h : Sorted f (a' :: as)
h' : f a a' = false
⊢ f a' a = true |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred.lean | Notes.insert_sorted_of_sorted | [147, 1] | [159, 39] | apply asym | case h₃
α : Type
f : α → α → Bool
r : α → α → Prop
a : α
l : List α
inst✝ : Asymmetric f
a' : α
as : List α
h : Sorted f (a' :: as)
h' : f a a' = false
⊢ f a' a = true | case h₃.a
α : Type
f : α → α → Bool
r : α → α → Prop
a : α
l : List α
inst✝ : Asymmetric f
a' : α
as : List α
h : Sorted f (a' :: as)
h' : f a a' = false
⊢ (!f a a') = true |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred.lean | Notes.insert_sorted_of_sorted | [147, 1] | [159, 39] | simp | case h₃.a
α : Type
f : α → α → Bool
r : α → α → Prop
a : α
l : List α
inst✝ : Asymmetric f
a' : α
as : List α
h : Sorted f (a' :: as)
h' : f a a' = false
⊢ (!f a a') = true | case h₃.a
α : Type
f : α → α → Bool
r : α → α → Prop
a : α
l : List α
inst✝ : Asymmetric f
a' : α
as : List α
h : Sorted f (a' :: as)
h' : f a a' = false
⊢ f a a' = false |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred.lean | Notes.insert_sorted_of_sorted | [147, 1] | [159, 39] | assumption | case h₃.a
α : Type
f : α → α → Bool
r : α → α → Prop
a : α
l : List α
inst✝ : Asymmetric f
a' : α
as : List α
h : Sorted f (a' :: as)
h' : f a a' = false
⊢ f a a' = false | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred.lean | Notes.sorted_of_insertSort | [163, 1] | [169, 63] | dsimp [insertSort] | α : Type
f : α → α → Bool
r : α → α → Prop
l : List α
inst✝ : Asymmetric f
a : α
as : List α
⊢ Sorted f (insertSort f (a :: as)) | α : Type
f : α → α → Bool
r : α → α → Prop
l : List α
inst✝ : Asymmetric f
a : α
as : List α
⊢ Sorted f (insert f a (insertSort f as)) |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred.lean | Notes.sorted_of_insertSort | [163, 1] | [169, 63] | apply insert_sorted_of_sorted f <| sorted_of_insertSort as | α : Type
f : α → α → Bool
r : α → α → Prop
l : List α
inst✝ : Asymmetric f
a : α
as : List α
⊢ Sorted f (insert f a (insertSort f as)) | no goals |
https://github.com/kmill/msri2023_graphs.git | c87c12d835cabc843f7f9c83d4c947c11d8ff043 | GraphProjects/DigraphInduction.lean | Digraph.deleteEdges_induction | [6, 1] | [35, 24] | have : Fintype V := Fintype.ofFinite V | V : Type u_1
inst✝ : Finite V
motive : Digraph V → Prop
hbot : motive ⊥
hdelete : ∀ (G : Digraph V) (v w : V), G.Adj v w → motive (deleteEdges G {(v, w)}) → motive G
G : Digraph V
⊢ motive G | V : Type u_1
inst✝ : Finite V
motive : Digraph V → Prop
hbot : motive ⊥
hdelete : ∀ (G : Digraph V) (v w : V), G.Adj v w → motive (deleteEdges G {(v, w)}) → motive G
G : Digraph V
this : Fintype V
⊢ motive G |
https://github.com/kmill/msri2023_graphs.git | c87c12d835cabc843f7f9c83d4c947c11d8ff043 | GraphProjects/DigraphInduction.lean | Digraph.deleteEdges_induction | [6, 1] | [35, 24] | generalize hs : G.edgeSet.toFinset = s | V : Type u_1
inst✝ : Finite V
motive : Digraph V → Prop
hbot : motive ⊥
hdelete : ∀ (G : Digraph V) (v w : V), G.Adj v w → motive (deleteEdges G {(v, w)}) → motive G
G : Digraph V
this : Fintype V
⊢ motive G | V : Type u_1
inst✝ : Finite V
motive : Digraph V → Prop
hbot : motive ⊥
hdelete : ∀ (G : Digraph V) (v w : V), G.Adj v w → motive (deleteEdges G {(v, w)}) → motive G
G : Digraph V
this : Fintype V
s : Finset (V × V)
hs : Set.toFinset (edgeSet G) = s
⊢ motive G |
https://github.com/kmill/msri2023_graphs.git | c87c12d835cabc843f7f9c83d4c947c11d8ff043 | GraphProjects/DigraphInduction.lean | Digraph.deleteEdges_induction | [6, 1] | [35, 24] | rw [← Set.toFinset_empty, Set.toFinset_inj, ← edgeSet_bot, edgeSet_inj] at hs | case empty
V : Type u_1
inst✝ : Finite V
motive : Digraph V → Prop
hbot : motive ⊥
hdelete : ∀ (G : Digraph V) (v w : V), G.Adj v w → motive (deleteEdges G {(v, w)}) → motive G
this : Fintype V
G : Digraph V
hs : Set.toFinset (edgeSet G) = ∅
⊢ motive G | case empty
V : Type u_1
inst✝ : Finite V
motive : Digraph V → Prop
hbot : motive ⊥
hdelete : ∀ (G : Digraph V) (v w : V), G.Adj v w → motive (deleteEdges G {(v, w)}) → motive G
this : Fintype V
G : Digraph V
hs✝ : Set.toFinset (edgeSet G) = ∅
hs : G = ⊥
⊢ motive G |
https://github.com/kmill/msri2023_graphs.git | c87c12d835cabc843f7f9c83d4c947c11d8ff043 | GraphProjects/DigraphInduction.lean | Digraph.deleteEdges_induction | [6, 1] | [35, 24] | rwa [hs] | case empty
V : Type u_1
inst✝ : Finite V
motive : Digraph V → Prop
hbot : motive ⊥
hdelete : ∀ (G : Digraph V) (v w : V), G.Adj v w → motive (deleteEdges G {(v, w)}) → motive G
this : Fintype V
G : Digraph V
hs✝ : Set.toFinset (edgeSet G) = ∅
hs : G = ⊥
⊢ motive G | no goals |
https://github.com/kmill/msri2023_graphs.git | c87c12d835cabc843f7f9c83d4c947c11d8ff043 | GraphProjects/DigraphInduction.lean | Digraph.deleteEdges_induction | [6, 1] | [35, 24] | have : e ∈ G.edgeSet | case insert
V : Type u_1
inst✝ : Finite V
motive : Digraph V → Prop
hbot : motive ⊥
hdelete : ∀ (G : Digraph V) (v w : V), G.Adj v w → motive (deleteEdges G {(v, w)}) → motive G
this : Fintype V
e : V × V
s : Finset (V × V)
he : ¬e ∈ s
ih : ∀ (G : Digraph V), Set.toFinset (edgeSet G) = s → motive G
G : Digraph V
hs : Set.toFinset (edgeSet G) = insert e s
⊢ motive G | case this
V : Type u_1
inst✝ : Finite V
motive : Digraph V → Prop
hbot : motive ⊥
hdelete : ∀ (G : Digraph V) (v w : V), G.Adj v w → motive (deleteEdges G {(v, w)}) → motive G
this : Fintype V
e : V × V
s : Finset (V × V)
he : ¬e ∈ s
ih : ∀ (G : Digraph V), Set.toFinset (edgeSet G) = s → motive G
G : Digraph V
hs : Set.toFinset (edgeSet G) = insert e s
⊢ e ∈ edgeSet G
case insert
V : Type u_1
inst✝ : Finite V
motive : Digraph V → Prop
hbot : motive ⊥
hdelete : ∀ (G : Digraph V) (v w : V), G.Adj v w → motive (deleteEdges G {(v, w)}) → motive G
this✝ : Fintype V
e : V × V
s : Finset (V × V)
he : ¬e ∈ s
ih : ∀ (G : Digraph V), Set.toFinset (edgeSet G) = s → motive G
G : Digraph V
hs : Set.toFinset (edgeSet G) = insert e s
this : e ∈ edgeSet G
⊢ motive G |
https://github.com/kmill/msri2023_graphs.git | c87c12d835cabc843f7f9c83d4c947c11d8ff043 | GraphProjects/DigraphInduction.lean | Digraph.deleteEdges_induction | [6, 1] | [35, 24] | apply hdelete G e.1 e.2 this | case insert
V : Type u_1
inst✝ : Finite V
motive : Digraph V → Prop
hbot : motive ⊥
hdelete : ∀ (G : Digraph V) (v w : V), G.Adj v w → motive (deleteEdges G {(v, w)}) → motive G
this✝ : Fintype V
e : V × V
s : Finset (V × V)
he : ¬e ∈ s
ih : ∀ (G : Digraph V), Set.toFinset (edgeSet G) = s → motive G
G : Digraph V
hs : Set.toFinset (edgeSet G) = insert e s
this : e ∈ edgeSet G
⊢ motive G | case insert
V : Type u_1
inst✝ : Finite V
motive : Digraph V → Prop
hbot : motive ⊥
hdelete : ∀ (G : Digraph V) (v w : V), G.Adj v w → motive (deleteEdges G {(v, w)}) → motive G
this✝ : Fintype V
e : V × V
s : Finset (V × V)
he : ¬e ∈ s
ih : ∀ (G : Digraph V), Set.toFinset (edgeSet G) = s → motive G
G : Digraph V
hs : Set.toFinset (edgeSet G) = insert e s
this : e ∈ edgeSet G
⊢ motive (deleteEdges G {(e.fst, e.snd)}) |
https://github.com/kmill/msri2023_graphs.git | c87c12d835cabc843f7f9c83d4c947c11d8ff043 | GraphProjects/DigraphInduction.lean | Digraph.deleteEdges_induction | [6, 1] | [35, 24] | apply ih | case insert
V : Type u_1
inst✝ : Finite V
motive : Digraph V → Prop
hbot : motive ⊥
hdelete : ∀ (G : Digraph V) (v w : V), G.Adj v w → motive (deleteEdges G {(v, w)}) → motive G
this✝ : Fintype V
e : V × V
s : Finset (V × V)
he : ¬e ∈ s
ih : ∀ (G : Digraph V), Set.toFinset (edgeSet G) = s → motive G
G : Digraph V
hs : Set.toFinset (edgeSet G) = insert e s
this : e ∈ edgeSet G
⊢ motive (deleteEdges G {(e.fst, e.snd)}) | case insert.hs
V : Type u_1
inst✝ : Finite V
motive : Digraph V → Prop
hbot : motive ⊥
hdelete : ∀ (G : Digraph V) (v w : V), G.Adj v w → motive (deleteEdges G {(v, w)}) → motive G
this✝ : Fintype V
e : V × V
s : Finset (V × V)
he : ¬e ∈ s
ih : ∀ (G : Digraph V), Set.toFinset (edgeSet G) = s → motive G
G : Digraph V
hs : Set.toFinset (edgeSet G) = insert e s
this : e ∈ edgeSet G
⊢ Set.toFinset (edgeSet (deleteEdges G {(e.fst, e.snd)})) = s |
https://github.com/kmill/msri2023_graphs.git | c87c12d835cabc843f7f9c83d4c947c11d8ff043 | GraphProjects/DigraphInduction.lean | Digraph.deleteEdges_induction | [6, 1] | [35, 24] | ext ⟨v, w⟩ | case insert.hs
V : Type u_1
inst✝ : Finite V
motive : Digraph V → Prop
hbot : motive ⊥
hdelete : ∀ (G : Digraph V) (v w : V), G.Adj v w → motive (deleteEdges G {(v, w)}) → motive G
this✝ : Fintype V
e : V × V
s : Finset (V × V)
he : ¬e ∈ s
ih : ∀ (G : Digraph V), Set.toFinset (edgeSet G) = s → motive G
G : Digraph V
hs : Set.toFinset (edgeSet G) = insert e s
this : e ∈ edgeSet G
⊢ Set.toFinset (edgeSet (deleteEdges G {(e.fst, e.snd)})) = s | case insert.hs.a.mk
V : Type u_1
inst✝ : Finite V
motive : Digraph V → Prop
hbot : motive ⊥
hdelete : ∀ (G : Digraph V) (v w : V), G.Adj v w → motive (deleteEdges G {(v, w)}) → motive G
this✝ : Fintype V
e : V × V
s : Finset (V × V)
he : ¬e ∈ s
ih : ∀ (G : Digraph V), Set.toFinset (edgeSet G) = s → motive G
G : Digraph V
hs : Set.toFinset (edgeSet G) = insert e s
this : e ∈ edgeSet G
v w : V
⊢ (v, w) ∈ Set.toFinset (edgeSet (deleteEdges G {(e.fst, e.snd)})) ↔ (v, w) ∈ s |
https://github.com/kmill/msri2023_graphs.git | c87c12d835cabc843f7f9c83d4c947c11d8ff043 | GraphProjects/DigraphInduction.lean | Digraph.deleteEdges_induction | [6, 1] | [35, 24] | simp only [Prod.mk.eta, Set.mem_toFinset, mem_edgeSet, deleteEdges_adj, Set.mem_singleton_iff] | case insert.hs.a.mk
V : Type u_1
inst✝ : Finite V
motive : Digraph V → Prop
hbot : motive ⊥
hdelete : ∀ (G : Digraph V) (v w : V), G.Adj v w → motive (deleteEdges G {(v, w)}) → motive G
this✝ : Fintype V
e : V × V
s : Finset (V × V)
he : ¬e ∈ s
ih : ∀ (G : Digraph V), Set.toFinset (edgeSet G) = s → motive G
G : Digraph V
hs : Set.toFinset (edgeSet G) = insert e s
this : e ∈ edgeSet G
v w : V
⊢ (v, w) ∈ Set.toFinset (edgeSet (deleteEdges G {(e.fst, e.snd)})) ↔ (v, w) ∈ s | case insert.hs.a.mk
V : Type u_1
inst✝ : Finite V
motive : Digraph V → Prop
hbot : motive ⊥
hdelete : ∀ (G : Digraph V) (v w : V), G.Adj v w → motive (deleteEdges G {(v, w)}) → motive G
this✝ : Fintype V
e : V × V
s : Finset (V × V)
he : ¬e ∈ s
ih : ∀ (G : Digraph V), Set.toFinset (edgeSet G) = s → motive G
G : Digraph V
hs : Set.toFinset (edgeSet G) = insert e s
this : e ∈ edgeSet G
v w : V
⊢ G.Adj v w ∧ ¬(v, w) = e ↔ (v, w) ∈ s |
https://github.com/kmill/msri2023_graphs.git | c87c12d835cabc843f7f9c83d4c947c11d8ff043 | GraphProjects/DigraphInduction.lean | Digraph.deleteEdges_induction | [6, 1] | [35, 24] | simp only [Set.mem_toFinset, mem_edgeSet, Finset.mem_insert, eq_iff_iff] at hs | case insert.hs.a.mk
V : Type u_1
inst✝ : Finite V
motive : Digraph V → Prop
hbot : motive ⊥
hdelete : ∀ (G : Digraph V) (v w : V), G.Adj v w → motive (deleteEdges G {(v, w)}) → motive G
this✝ : Fintype V
e : V × V
s : Finset (V × V)
he : ¬e ∈ s
ih : ∀ (G : Digraph V), Set.toFinset (edgeSet G) = s → motive G
G : Digraph V
this : e ∈ edgeSet G
v w : V
hs : ((v, w) ∈ Set.toFinset (edgeSet G)) = ((v, w) ∈ insert e s)
⊢ G.Adj v w ∧ ¬(v, w) = e ↔ (v, w) ∈ s | case insert.hs.a.mk
V : Type u_1
inst✝ : Finite V
motive : Digraph V → Prop
hbot : motive ⊥
hdelete : ∀ (G : Digraph V) (v w : V), G.Adj v w → motive (deleteEdges G {(v, w)}) → motive G
this✝ : Fintype V
e : V × V
s : Finset (V × V)
he : ¬e ∈ s
ih : ∀ (G : Digraph V), Set.toFinset (edgeSet G) = s → motive G
G : Digraph V
this : e ∈ edgeSet G
v w : V
hs : G.Adj v w ↔ (v, w) = e ∨ (v, w) ∈ s
⊢ G.Adj v w ∧ ¬(v, w) = e ↔ (v, w) ∈ s |
https://github.com/kmill/msri2023_graphs.git | c87c12d835cabc843f7f9c83d4c947c11d8ff043 | GraphProjects/DigraphInduction.lean | Digraph.deleteEdges_induction | [6, 1] | [35, 24] | rw [hs] | case insert.hs.a.mk
V : Type u_1
inst✝ : Finite V
motive : Digraph V → Prop
hbot : motive ⊥
hdelete : ∀ (G : Digraph V) (v w : V), G.Adj v w → motive (deleteEdges G {(v, w)}) → motive G
this✝ : Fintype V
e : V × V
s : Finset (V × V)
he : ¬e ∈ s
ih : ∀ (G : Digraph V), Set.toFinset (edgeSet G) = s → motive G
G : Digraph V
this : e ∈ edgeSet G
v w : V
hs : G.Adj v w ↔ (v, w) = e ∨ (v, w) ∈ s
⊢ G.Adj v w ∧ ¬(v, w) = e ↔ (v, w) ∈ s | case insert.hs.a.mk
V : Type u_1
inst✝ : Finite V
motive : Digraph V → Prop
hbot : motive ⊥
hdelete : ∀ (G : Digraph V) (v w : V), G.Adj v w → motive (deleteEdges G {(v, w)}) → motive G
this✝ : Fintype V
e : V × V
s : Finset (V × V)
he : ¬e ∈ s
ih : ∀ (G : Digraph V), Set.toFinset (edgeSet G) = s → motive G
G : Digraph V
this : e ∈ edgeSet G
v w : V
hs : G.Adj v w ↔ (v, w) = e ∨ (v, w) ∈ s
⊢ ((v, w) = e ∨ (v, w) ∈ s) ∧ ¬(v, w) = e ↔ (v, w) ∈ s |
https://github.com/kmill/msri2023_graphs.git | c87c12d835cabc843f7f9c83d4c947c11d8ff043 | GraphProjects/DigraphInduction.lean | Digraph.deleteEdges_induction | [6, 1] | [35, 24] | constructor | case insert.hs.a.mk
V : Type u_1
inst✝ : Finite V
motive : Digraph V → Prop
hbot : motive ⊥
hdelete : ∀ (G : Digraph V) (v w : V), G.Adj v w → motive (deleteEdges G {(v, w)}) → motive G
this✝ : Fintype V
e : V × V
s : Finset (V × V)
he : ¬e ∈ s
ih : ∀ (G : Digraph V), Set.toFinset (edgeSet G) = s → motive G
G : Digraph V
this : e ∈ edgeSet G
v w : V
hs : G.Adj v w ↔ (v, w) = e ∨ (v, w) ∈ s
⊢ ((v, w) = e ∨ (v, w) ∈ s) ∧ ¬(v, w) = e ↔ (v, w) ∈ s | case insert.hs.a.mk.mp
V : Type u_1
inst✝ : Finite V
motive : Digraph V → Prop
hbot : motive ⊥
hdelete : ∀ (G : Digraph V) (v w : V), G.Adj v w → motive (deleteEdges G {(v, w)}) → motive G
this✝ : Fintype V
e : V × V
s : Finset (V × V)
he : ¬e ∈ s
ih : ∀ (G : Digraph V), Set.toFinset (edgeSet G) = s → motive G
G : Digraph V
this : e ∈ edgeSet G
v w : V
hs : G.Adj v w ↔ (v, w) = e ∨ (v, w) ∈ s
⊢ ((v, w) = e ∨ (v, w) ∈ s) ∧ ¬(v, w) = e → (v, w) ∈ s
case insert.hs.a.mk.mpr
V : Type u_1
inst✝ : Finite V
motive : Digraph V → Prop
hbot : motive ⊥
hdelete : ∀ (G : Digraph V) (v w : V), G.Adj v w → motive (deleteEdges G {(v, w)}) → motive G
this✝ : Fintype V
e : V × V
s : Finset (V × V)
he : ¬e ∈ s
ih : ∀ (G : Digraph V), Set.toFinset (edgeSet G) = s → motive G
G : Digraph V
this : e ∈ edgeSet G
v w : V
hs : G.Adj v w ↔ (v, w) = e ∨ (v, w) ∈ s
⊢ (v, w) ∈ s → ((v, w) = e ∨ (v, w) ∈ s) ∧ ¬(v, w) = e |
https://github.com/kmill/msri2023_graphs.git | c87c12d835cabc843f7f9c83d4c947c11d8ff043 | GraphProjects/DigraphInduction.lean | Digraph.deleteEdges_induction | [6, 1] | [35, 24] | rw [← Set.mem_toFinset, hs] | case this
V : Type u_1
inst✝ : Finite V
motive : Digraph V → Prop
hbot : motive ⊥
hdelete : ∀ (G : Digraph V) (v w : V), G.Adj v w → motive (deleteEdges G {(v, w)}) → motive G
this : Fintype V
e : V × V
s : Finset (V × V)
he : ¬e ∈ s
ih : ∀ (G : Digraph V), Set.toFinset (edgeSet G) = s → motive G
G : Digraph V
hs : Set.toFinset (edgeSet G) = insert e s
⊢ e ∈ edgeSet G | case this
V : Type u_1
inst✝ : Finite V
motive : Digraph V → Prop
hbot : motive ⊥
hdelete : ∀ (G : Digraph V) (v w : V), G.Adj v w → motive (deleteEdges G {(v, w)}) → motive G
this : Fintype V
e : V × V
s : Finset (V × V)
he : ¬e ∈ s
ih : ∀ (G : Digraph V), Set.toFinset (edgeSet G) = s → motive G
G : Digraph V
hs : Set.toFinset (edgeSet G) = insert e s
⊢ e ∈ insert e s |
https://github.com/kmill/msri2023_graphs.git | c87c12d835cabc843f7f9c83d4c947c11d8ff043 | GraphProjects/DigraphInduction.lean | Digraph.deleteEdges_induction | [6, 1] | [35, 24] | exact Finset.mem_insert_self e s | case this
V : Type u_1
inst✝ : Finite V
motive : Digraph V → Prop
hbot : motive ⊥
hdelete : ∀ (G : Digraph V) (v w : V), G.Adj v w → motive (deleteEdges G {(v, w)}) → motive G
this : Fintype V
e : V × V
s : Finset (V × V)
he : ¬e ∈ s
ih : ∀ (G : Digraph V), Set.toFinset (edgeSet G) = s → motive G
G : Digraph V
hs : Set.toFinset (edgeSet G) = insert e s
⊢ e ∈ insert e s | no goals |
https://github.com/kmill/msri2023_graphs.git | c87c12d835cabc843f7f9c83d4c947c11d8ff043 | GraphProjects/DigraphInduction.lean | Digraph.deleteEdges_induction | [6, 1] | [35, 24] | rintro ⟨(rfl | ha), hne⟩ | case insert.hs.a.mk.mp
V : Type u_1
inst✝ : Finite V
motive : Digraph V → Prop
hbot : motive ⊥
hdelete : ∀ (G : Digraph V) (v w : V), G.Adj v w → motive (deleteEdges G {(v, w)}) → motive G
this✝ : Fintype V
e : V × V
s : Finset (V × V)
he : ¬e ∈ s
ih : ∀ (G : Digraph V), Set.toFinset (edgeSet G) = s → motive G
G : Digraph V
this : e ∈ edgeSet G
v w : V
hs : G.Adj v w ↔ (v, w) = e ∨ (v, w) ∈ s
⊢ ((v, w) = e ∨ (v, w) ∈ s) ∧ ¬(v, w) = e → (v, w) ∈ s | case insert.hs.a.mk.mp.intro.inl
V : Type u_1
inst✝ : Finite V
motive : Digraph V → Prop
hbot : motive ⊥
hdelete : ∀ (G : Digraph V) (v w : V), G.Adj v w → motive (deleteEdges G {(v, w)}) → motive G
this✝ : Fintype V
s : Finset (V × V)
ih : ∀ (G : Digraph V), Set.toFinset (edgeSet G) = s → motive G
G : Digraph V
v w : V
he : ¬(v, w) ∈ s
this : (v, w) ∈ edgeSet G
hs : G.Adj v w ↔ (v, w) = (v, w) ∨ (v, w) ∈ s
hne : ¬(v, w) = (v, w)
⊢ (v, w) ∈ s
case insert.hs.a.mk.mp.intro.inr
V : Type u_1
inst✝ : Finite V
motive : Digraph V → Prop
hbot : motive ⊥
hdelete : ∀ (G : Digraph V) (v w : V), G.Adj v w → motive (deleteEdges G {(v, w)}) → motive G
this✝ : Fintype V
e : V × V
s : Finset (V × V)
he : ¬e ∈ s
ih : ∀ (G : Digraph V), Set.toFinset (edgeSet G) = s → motive G
G : Digraph V
this : e ∈ edgeSet G
v w : V
hs : G.Adj v w ↔ (v, w) = e ∨ (v, w) ∈ s
hne : ¬(v, w) = e
ha : (v, w) ∈ s
⊢ (v, w) ∈ s |
https://github.com/kmill/msri2023_graphs.git | c87c12d835cabc843f7f9c83d4c947c11d8ff043 | GraphProjects/DigraphInduction.lean | Digraph.deleteEdges_induction | [6, 1] | [35, 24] | simp at hne | case insert.hs.a.mk.mp.intro.inl
V : Type u_1
inst✝ : Finite V
motive : Digraph V → Prop
hbot : motive ⊥
hdelete : ∀ (G : Digraph V) (v w : V), G.Adj v w → motive (deleteEdges G {(v, w)}) → motive G
this✝ : Fintype V
s : Finset (V × V)
ih : ∀ (G : Digraph V), Set.toFinset (edgeSet G) = s → motive G
G : Digraph V
v w : V
he : ¬(v, w) ∈ s
this : (v, w) ∈ edgeSet G
hs : G.Adj v w ↔ (v, w) = (v, w) ∨ (v, w) ∈ s
hne : ¬(v, w) = (v, w)
⊢ (v, w) ∈ s | no goals |
https://github.com/kmill/msri2023_graphs.git | c87c12d835cabc843f7f9c83d4c947c11d8ff043 | GraphProjects/DigraphInduction.lean | Digraph.deleteEdges_induction | [6, 1] | [35, 24] | assumption | case insert.hs.a.mk.mp.intro.inr
V : Type u_1
inst✝ : Finite V
motive : Digraph V → Prop
hbot : motive ⊥
hdelete : ∀ (G : Digraph V) (v w : V), G.Adj v w → motive (deleteEdges G {(v, w)}) → motive G
this✝ : Fintype V
e : V × V
s : Finset (V × V)
he : ¬e ∈ s
ih : ∀ (G : Digraph V), Set.toFinset (edgeSet G) = s → motive G
G : Digraph V
this : e ∈ edgeSet G
v w : V
hs : G.Adj v w ↔ (v, w) = e ∨ (v, w) ∈ s
hne : ¬(v, w) = e
ha : (v, w) ∈ s
⊢ (v, w) ∈ s | no goals |
https://github.com/kmill/msri2023_graphs.git | c87c12d835cabc843f7f9c83d4c947c11d8ff043 | GraphProjects/DigraphInduction.lean | Digraph.deleteEdges_induction | [6, 1] | [35, 24] | intro h | case insert.hs.a.mk.mpr
V : Type u_1
inst✝ : Finite V
motive : Digraph V → Prop
hbot : motive ⊥
hdelete : ∀ (G : Digraph V) (v w : V), G.Adj v w → motive (deleteEdges G {(v, w)}) → motive G
this✝ : Fintype V
e : V × V
s : Finset (V × V)
he : ¬e ∈ s
ih : ∀ (G : Digraph V), Set.toFinset (edgeSet G) = s → motive G
G : Digraph V
this : e ∈ edgeSet G
v w : V
hs : G.Adj v w ↔ (v, w) = e ∨ (v, w) ∈ s
⊢ (v, w) ∈ s → ((v, w) = e ∨ (v, w) ∈ s) ∧ ¬(v, w) = e | case insert.hs.a.mk.mpr
V : Type u_1
inst✝ : Finite V
motive : Digraph V → Prop
hbot : motive ⊥
hdelete : ∀ (G : Digraph V) (v w : V), G.Adj v w → motive (deleteEdges G {(v, w)}) → motive G
this✝ : Fintype V
e : V × V
s : Finset (V × V)
he : ¬e ∈ s
ih : ∀ (G : Digraph V), Set.toFinset (edgeSet G) = s → motive G
G : Digraph V
this : e ∈ edgeSet G
v w : V
hs : G.Adj v w ↔ (v, w) = e ∨ (v, w) ∈ s
h : (v, w) ∈ s
⊢ ((v, w) = e ∨ (v, w) ∈ s) ∧ ¬(v, w) = e |
https://github.com/kmill/msri2023_graphs.git | c87c12d835cabc843f7f9c83d4c947c11d8ff043 | GraphProjects/DigraphInduction.lean | Digraph.deleteEdges_induction | [6, 1] | [35, 24] | simp only [h, or_true, true_and] | case insert.hs.a.mk.mpr
V : Type u_1
inst✝ : Finite V
motive : Digraph V → Prop
hbot : motive ⊥
hdelete : ∀ (G : Digraph V) (v w : V), G.Adj v w → motive (deleteEdges G {(v, w)}) → motive G
this✝ : Fintype V
e : V × V
s : Finset (V × V)
he : ¬e ∈ s
ih : ∀ (G : Digraph V), Set.toFinset (edgeSet G) = s → motive G
G : Digraph V
this : e ∈ edgeSet G
v w : V
hs : G.Adj v w ↔ (v, w) = e ∨ (v, w) ∈ s
h : (v, w) ∈ s
⊢ ((v, w) = e ∨ (v, w) ∈ s) ∧ ¬(v, w) = e | case insert.hs.a.mk.mpr
V : Type u_1
inst✝ : Finite V
motive : Digraph V → Prop
hbot : motive ⊥
hdelete : ∀ (G : Digraph V) (v w : V), G.Adj v w → motive (deleteEdges G {(v, w)}) → motive G
this✝ : Fintype V
e : V × V
s : Finset (V × V)
he : ¬e ∈ s
ih : ∀ (G : Digraph V), Set.toFinset (edgeSet G) = s → motive G
G : Digraph V
this : e ∈ edgeSet G
v w : V
hs : G.Adj v w ↔ (v, w) = e ∨ (v, w) ∈ s
h : (v, w) ∈ s
⊢ ¬(v, w) = e |
https://github.com/kmill/msri2023_graphs.git | c87c12d835cabc843f7f9c83d4c947c11d8ff043 | GraphProjects/DigraphInduction.lean | Digraph.deleteEdges_induction | [6, 1] | [35, 24] | rintro rfl | case insert.hs.a.mk.mpr
V : Type u_1
inst✝ : Finite V
motive : Digraph V → Prop
hbot : motive ⊥
hdelete : ∀ (G : Digraph V) (v w : V), G.Adj v w → motive (deleteEdges G {(v, w)}) → motive G
this✝ : Fintype V
e : V × V
s : Finset (V × V)
he : ¬e ∈ s
ih : ∀ (G : Digraph V), Set.toFinset (edgeSet G) = s → motive G
G : Digraph V
this : e ∈ edgeSet G
v w : V
hs : G.Adj v w ↔ (v, w) = e ∨ (v, w) ∈ s
h : (v, w) ∈ s
⊢ ¬(v, w) = e | case insert.hs.a.mk.mpr
V : Type u_1
inst✝ : Finite V
motive : Digraph V → Prop
hbot : motive ⊥
hdelete : ∀ (G : Digraph V) (v w : V), G.Adj v w → motive (deleteEdges G {(v, w)}) → motive G
this✝ : Fintype V
s : Finset (V × V)
ih : ∀ (G : Digraph V), Set.toFinset (edgeSet G) = s → motive G
G : Digraph V
v w : V
h : (v, w) ∈ s
he : ¬(v, w) ∈ s
this : (v, w) ∈ edgeSet G
hs : G.Adj v w ↔ (v, w) = (v, w) ∨ (v, w) ∈ s
⊢ False |
https://github.com/kmill/msri2023_graphs.git | c87c12d835cabc843f7f9c83d4c947c11d8ff043 | GraphProjects/DigraphInduction.lean | Digraph.deleteEdges_induction | [6, 1] | [35, 24] | exact absurd h he | case insert.hs.a.mk.mpr
V : Type u_1
inst✝ : Finite V
motive : Digraph V → Prop
hbot : motive ⊥
hdelete : ∀ (G : Digraph V) (v w : V), G.Adj v w → motive (deleteEdges G {(v, w)}) → motive G
this✝ : Fintype V
s : Finset (V × V)
ih : ∀ (G : Digraph V), Set.toFinset (edgeSet G) = s → motive G
G : Digraph V
v w : V
h : (v, w) ∈ s
he : ¬(v, w) ∈ s
this : (v, w) ∈ edgeSet G
hs : G.Adj v w ↔ (v, w) = (v, w) ∨ (v, w) ∈ s
⊢ False | no goals |
https://github.com/kmill/msri2023_graphs.git | c87c12d835cabc843f7f9c83d4c947c11d8ff043 | GraphProjects/DigraphInduction.lean | Digraph.deleteEdges_induction' | [39, 1] | [55, 19] | exact hbot | case hbot
V : Type u_1
inst✝ : Finite V
motive : Digraph V → Prop
hbot : motive ⊥
hdelete : ∀ (G : Digraph V) (v w : V), ¬G.Adj v w → motive G → motive (G ⊔ ↑(OrderIso.symm (edgeSetIso V)) {(v, w)})
⊢ motive ⊥ | no goals |
https://github.com/kmill/msri2023_graphs.git | c87c12d835cabc843f7f9c83d4c947c11d8ff043 | GraphProjects/DigraphInduction.lean | Digraph.deleteEdges_induction' | [39, 1] | [55, 19] | convert hdelete (G.deleteEdges {(v, w)}) v w (by simp) ih | case hdelete
V : Type u_1
inst✝ : Finite V
motive : Digraph V → Prop
hbot : motive ⊥
hdelete : ∀ (G : Digraph V) (v w : V), ¬G.Adj v w → motive G → motive (G ⊔ ↑(OrderIso.symm (edgeSetIso V)) {(v, w)})
G : Digraph V
v w : V
hvw : G.Adj v w
ih : motive (deleteEdges G {(v, w)})
⊢ motive G | case h.e'_1
V : Type u_1
inst✝ : Finite V
motive : Digraph V → Prop
hbot : motive ⊥
hdelete : ∀ (G : Digraph V) (v w : V), ¬G.Adj v w → motive G → motive (G ⊔ ↑(OrderIso.symm (edgeSetIso V)) {(v, w)})
G : Digraph V
v w : V
hvw : G.Adj v w
ih : motive (deleteEdges G {(v, w)})
⊢ G = deleteEdges G {(v, w)} ⊔ ↑(OrderIso.symm (edgeSetIso V)) {(v, w)} |
https://github.com/kmill/msri2023_graphs.git | c87c12d835cabc843f7f9c83d4c947c11d8ff043 | GraphProjects/DigraphInduction.lean | Digraph.deleteEdges_induction' | [39, 1] | [55, 19] | ext a b | case h.e'_1
V : Type u_1
inst✝ : Finite V
motive : Digraph V → Prop
hbot : motive ⊥
hdelete : ∀ (G : Digraph V) (v w : V), ¬G.Adj v w → motive G → motive (G ⊔ ↑(OrderIso.symm (edgeSetIso V)) {(v, w)})
G : Digraph V
v w : V
hvw : G.Adj v w
ih : motive (deleteEdges G {(v, w)})
⊢ G = deleteEdges G {(v, w)} ⊔ ↑(OrderIso.symm (edgeSetIso V)) {(v, w)} | case h.e'_1.Adj.h.h.a
V : Type u_1
inst✝ : Finite V
motive : Digraph V → Prop
hbot : motive ⊥
hdelete : ∀ (G : Digraph V) (v w : V), ¬G.Adj v w → motive G → motive (G ⊔ ↑(OrderIso.symm (edgeSetIso V)) {(v, w)})
G : Digraph V
v w : V
hvw : G.Adj v w
ih : motive (deleteEdges G {(v, w)})
a b : V
⊢ G.Adj a b ↔ (deleteEdges G {(v, w)} ⊔ ↑(OrderIso.symm (edgeSetIso V)) {(v, w)}).Adj a b |
https://github.com/kmill/msri2023_graphs.git | c87c12d835cabc843f7f9c83d4c947c11d8ff043 | GraphProjects/DigraphInduction.lean | Digraph.deleteEdges_induction' | [39, 1] | [55, 19] | simp only [Set.le_eq_subset, ge_iff_le, sup_adj, deleteEdges_adj, Set.mem_singleton_iff, Prod.mk.injEq, not_and] | case h.e'_1.Adj.h.h.a
V : Type u_1
inst✝ : Finite V
motive : Digraph V → Prop
hbot : motive ⊥
hdelete : ∀ (G : Digraph V) (v w : V), ¬G.Adj v w → motive G → motive (G ⊔ ↑(OrderIso.symm (edgeSetIso V)) {(v, w)})
G : Digraph V
v w : V
hvw : G.Adj v w
ih : motive (deleteEdges G {(v, w)})
a b : V
⊢ G.Adj a b ↔ (deleteEdges G {(v, w)} ⊔ ↑(OrderIso.symm (edgeSetIso V)) {(v, w)}).Adj a b | case h.e'_1.Adj.h.h.a
V : Type u_1
inst✝ : Finite V
motive : Digraph V → Prop
hbot : motive ⊥
hdelete : ∀ (G : Digraph V) (v w : V), ¬G.Adj v w → motive G → motive (G ⊔ ↑(OrderIso.symm (edgeSetIso V)) {(v, w)})
G : Digraph V
v w : V
hvw : G.Adj v w
ih : motive (deleteEdges G {(v, w)})
a b : V
⊢ G.Adj a b ↔ G.Adj a b ∧ (a = v → ¬b = w) ∨ (↑(OrderIso.symm (edgeSetIso V)) {(v, w)}).Adj a b |
https://github.com/kmill/msri2023_graphs.git | c87c12d835cabc843f7f9c83d4c947c11d8ff043 | GraphProjects/DigraphInduction.lean | Digraph.deleteEdges_induction' | [39, 1] | [55, 19] | rw [edgeSetIso_symm_adj] | case h.e'_1.Adj.h.h.a
V : Type u_1
inst✝ : Finite V
motive : Digraph V → Prop
hbot : motive ⊥
hdelete : ∀ (G : Digraph V) (v w : V), ¬G.Adj v w → motive G → motive (G ⊔ ↑(OrderIso.symm (edgeSetIso V)) {(v, w)})
G : Digraph V
v w : V
hvw : G.Adj v w
ih : motive (deleteEdges G {(v, w)})
a b : V
⊢ G.Adj a b ↔ G.Adj a b ∧ (a = v → ¬b = w) ∨ (↑(OrderIso.symm (edgeSetIso V)) {(v, w)}).Adj a b | case h.e'_1.Adj.h.h.a
V : Type u_1
inst✝ : Finite V
motive : Digraph V → Prop
hbot : motive ⊥
hdelete : ∀ (G : Digraph V) (v w : V), ¬G.Adj v w → motive G → motive (G ⊔ ↑(OrderIso.symm (edgeSetIso V)) {(v, w)})
G : Digraph V
v w : V
hvw : G.Adj v w
ih : motive (deleteEdges G {(v, w)})
a b : V
⊢ G.Adj a b ↔ G.Adj a b ∧ (a = v → ¬b = w) ∨ (a, b) ∈ {(v, w)} |
https://github.com/kmill/msri2023_graphs.git | c87c12d835cabc843f7f9c83d4c947c11d8ff043 | GraphProjects/DigraphInduction.lean | Digraph.deleteEdges_induction' | [39, 1] | [55, 19] | simp only [Set.mem_singleton_iff, Prod.mk.injEq] | case h.e'_1.Adj.h.h.a
V : Type u_1
inst✝ : Finite V
motive : Digraph V → Prop
hbot : motive ⊥
hdelete : ∀ (G : Digraph V) (v w : V), ¬G.Adj v w → motive G → motive (G ⊔ ↑(OrderIso.symm (edgeSetIso V)) {(v, w)})
G : Digraph V
v w : V
hvw : G.Adj v w
ih : motive (deleteEdges G {(v, w)})
a b : V
⊢ G.Adj a b ↔ G.Adj a b ∧ (a = v → ¬b = w) ∨ (a, b) ∈ {(v, w)} | case h.e'_1.Adj.h.h.a
V : Type u_1
inst✝ : Finite V
motive : Digraph V → Prop
hbot : motive ⊥
hdelete : ∀ (G : Digraph V) (v w : V), ¬G.Adj v w → motive G → motive (G ⊔ ↑(OrderIso.symm (edgeSetIso V)) {(v, w)})
G : Digraph V
v w : V
hvw : G.Adj v w
ih : motive (deleteEdges G {(v, w)})
a b : V
⊢ G.Adj a b ↔ G.Adj a b ∧ (a = v → ¬b = w) ∨ a = v ∧ b = w |
https://github.com/kmill/msri2023_graphs.git | c87c12d835cabc843f7f9c83d4c947c11d8ff043 | GraphProjects/DigraphInduction.lean | Digraph.deleteEdges_induction' | [39, 1] | [55, 19] | constructor | case h.e'_1.Adj.h.h.a
V : Type u_1
inst✝ : Finite V
motive : Digraph V → Prop
hbot : motive ⊥
hdelete : ∀ (G : Digraph V) (v w : V), ¬G.Adj v w → motive G → motive (G ⊔ ↑(OrderIso.symm (edgeSetIso V)) {(v, w)})
G : Digraph V
v w : V
hvw : G.Adj v w
ih : motive (deleteEdges G {(v, w)})
a b : V
⊢ G.Adj a b ↔ G.Adj a b ∧ (a = v → ¬b = w) ∨ a = v ∧ b = w | case h.e'_1.Adj.h.h.a.mp
V : Type u_1
inst✝ : Finite V
motive : Digraph V → Prop
hbot : motive ⊥
hdelete : ∀ (G : Digraph V) (v w : V), ¬G.Adj v w → motive G → motive (G ⊔ ↑(OrderIso.symm (edgeSetIso V)) {(v, w)})
G : Digraph V
v w : V
hvw : G.Adj v w
ih : motive (deleteEdges G {(v, w)})
a b : V
⊢ G.Adj a b → G.Adj a b ∧ (a = v → ¬b = w) ∨ a = v ∧ b = w
case h.e'_1.Adj.h.h.a.mpr
V : Type u_1
inst✝ : Finite V
motive : Digraph V → Prop
hbot : motive ⊥
hdelete : ∀ (G : Digraph V) (v w : V), ¬G.Adj v w → motive G → motive (G ⊔ ↑(OrderIso.symm (edgeSetIso V)) {(v, w)})
G : Digraph V
v w : V
hvw : G.Adj v w
ih : motive (deleteEdges G {(v, w)})
a b : V
⊢ G.Adj a b ∧ (a = v → ¬b = w) ∨ a = v ∧ b = w → G.Adj a b |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.