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/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Nat.sub_le_iff_left
[677, 1]
[686, 13]
exact h
case mp.h a b c : Nat h : a - b ≤ c ⊢ a - b ≤ c
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Nat.sub_le_iff_left
[677, 1]
[686, 13]
intros h
case mpr a b c : Nat ⊢ a ≤ b + c → a - b ≤ c
case mpr a b c : Nat h : a ≤ b + c ⊢ a - b ≤ c
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Nat.sub_le_iff_left
[677, 1]
[686, 13]
apply Nat.sub_le_of_le_add
case mpr a b c : Nat h : a ≤ b + c ⊢ a - b ≤ c
case mpr.h a b c : Nat h : a ≤ b + c ⊢ a ≤ c + b
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Nat.sub_le_iff_left
[677, 1]
[686, 13]
rw [Nat.add_comm]
case mpr.h a b c : Nat h : a ≤ b + c ⊢ a ≤ c + b
case mpr.h a b c : Nat h : a ≤ b + c ⊢ a ≤ b + c
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Nat.sub_le_iff_left
[677, 1]
[686, 13]
exact h
case mpr.h a b c : Nat h : a ≤ b + c ⊢ a ≤ b + c
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Nat.sub_add_eq_sub_sub
[693, 1]
[699, 26]
apply Nat.le_antisymm (Nat.sub_le_iff_left.mpr _) (Nat.sub_le_iff_left.mpr $ Nat.sub_le_iff_left.mpr _)
a b c : Nat ⊢ a - (b + c) = a - b - c
a b c : Nat ⊢ a ≤ b + c + (a - b - c) a b c : Nat ⊢ a ≤ b + (c + (a - (b + c)))
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Nat.sub_add_eq_sub_sub
[693, 1]
[699, 26]
. rw [Nat.add_assoc] apply Nat.le_trans Nat.le_add_sub (Nat.add_le_add_left Nat.le_add_sub _)
a b c : Nat ⊢ a ≤ b + c + (a - b - c) a b c : Nat ⊢ a ≤ b + (c + (a - (b + c)))
a b c : Nat ⊢ a ≤ b + (c + (a - (b + c)))
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Nat.sub_add_eq_sub_sub
[693, 1]
[699, 26]
. rw [←Nat.add_assoc] apply Nat.le_add_sub
a b c : Nat ⊢ a ≤ b + (c + (a - (b + c)))
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Nat.sub_add_eq_sub_sub
[693, 1]
[699, 26]
rw [Nat.add_assoc]
a b c : Nat ⊢ a ≤ b + c + (a - b - c)
a b c : Nat ⊢ a ≤ b + (c + (a - b - c))
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Nat.sub_add_eq_sub_sub
[693, 1]
[699, 26]
apply Nat.le_trans Nat.le_add_sub (Nat.add_le_add_left Nat.le_add_sub _)
a b c : Nat ⊢ a ≤ b + (c + (a - b - c))
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Nat.sub_add_eq_sub_sub
[693, 1]
[699, 26]
rw [←Nat.add_assoc]
a b c : Nat ⊢ a ≤ b + (c + (a - (b + c)))
a b c : Nat ⊢ a ≤ b + c + (a - (b + c))
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Nat.sub_add_eq_sub_sub
[693, 1]
[699, 26]
apply Nat.le_add_sub
a b c : Nat ⊢ a ≤ b + c + (a - (b + c))
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Nat.lt_of_sub_add
[701, 1]
[711, 15]
intros m k n hkm hn
⊢ ∀ (m k n : Nat), k < m → n > 0 → m - (k + n) < m - k
m k n : Nat hkm : k < m hn : n > 0 ⊢ m - (k + n) < m - k
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Nat.lt_of_sub_add
[701, 1]
[711, 15]
apply Nat.lt_of_le_of_lt (m := m - k - n)
m k n : Nat hkm : k < m hn : n > 0 ⊢ m - (k + n) < m - k
case h₁ m k n : Nat hkm : k < m hn : n > 0 ⊢ m - (k + n) ≤ m - k - n case h₂ m k n : Nat hkm : k < m hn : n > 0 ⊢ m - k - n < m - k
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Nat.lt_of_sub_add
[701, 1]
[711, 15]
. apply Nat.le_of_eq (@Nat.sub_add_eq_sub_sub m k n)
case h₁ m k n : Nat hkm : k < m hn : n > 0 ⊢ m - (k + n) ≤ m - k - n case h₂ m k n : Nat hkm : k < m hn : n > 0 ⊢ m - k - n < m - k
case h₂ m k n : Nat hkm : k < m hn : n > 0 ⊢ m - k - n < m - k
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Nat.lt_of_sub_add
[701, 1]
[711, 15]
. apply Nat.sub_lt . exact Nat.zero_lt_sub_of_lt hkm . exact hn
case h₂ m k n : Nat hkm : k < m hn : n > 0 ⊢ m - k - n < m - k
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Nat.lt_of_sub_add
[701, 1]
[711, 15]
apply Nat.le_of_eq (@Nat.sub_add_eq_sub_sub m k n)
case h₁ m k n : Nat hkm : k < m hn : n > 0 ⊢ m - (k + n) ≤ m - k - n
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Nat.lt_of_sub_add
[701, 1]
[711, 15]
apply Nat.sub_lt
case h₂ m k n : Nat hkm : k < m hn : n > 0 ⊢ m - k - n < m - k
case h₂.a m k n : Nat hkm : k < m hn : n > 0 ⊢ 0 < m - k case h₂.a m k n : Nat hkm : k < m hn : n > 0 ⊢ 0 < n
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Nat.lt_of_sub_add
[701, 1]
[711, 15]
. exact Nat.zero_lt_sub_of_lt hkm
case h₂.a m k n : Nat hkm : k < m hn : n > 0 ⊢ 0 < m - k case h₂.a m k n : Nat hkm : k < m hn : n > 0 ⊢ 0 < n
case h₂.a m k n : Nat hkm : k < m hn : n > 0 ⊢ 0 < n
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Nat.lt_of_sub_add
[701, 1]
[711, 15]
. exact hn
case h₂.a m k n : Nat hkm : k < m hn : n > 0 ⊢ 0 < n
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Nat.lt_of_sub_add
[701, 1]
[711, 15]
exact Nat.zero_lt_sub_of_lt hkm
case h₂.a m k n : Nat hkm : k < m hn : n > 0 ⊢ 0 < m - k
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Nat.lt_of_sub_add
[701, 1]
[711, 15]
exact hn
case h₂.a m k n : Nat hkm : k < m hn : n > 0 ⊢ 0 < n
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Nat.lt_of_not_ge
[714, 1]
[722, 11]
unfold LT.lt
x y : Nat h : ¬x ≥ y ⊢ x < y
x y : Nat h : ¬x ≥ y ⊢ instLTNat.1 x y
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Nat.lt_of_not_ge
[714, 1]
[722, 11]
unfold instLTNat
x y : Nat h : ¬x ≥ y ⊢ instLTNat.1 x y
x y : Nat h : ¬x ≥ y ⊢ { lt := Nat.lt }.1 x y
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Nat.lt_of_not_ge
[714, 1]
[722, 11]
unfold Nat.lt
x y : Nat h : ¬x ≥ y ⊢ { lt := Nat.lt }.1 x y
x y : Nat h : ¬x ≥ y ⊢ { lt := fun n m => Nat.le (succ n) m }.1 x y
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Nat.lt_of_not_ge
[714, 1]
[722, 11]
simp only
x y : Nat h : ¬x ≥ y ⊢ { lt := fun n m => Nat.le (succ n) m }.1 x y
x y : Nat h : ¬x ≥ y ⊢ Nat.le (succ x) y
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Nat.lt_of_not_ge
[714, 1]
[722, 11]
have h' : Nat.le (Nat.succ x) y = ((x + 1) ≤ y) := rfl
x y : Nat h : ¬x ≥ y ⊢ Nat.le (succ x) y
x y : Nat h : ¬x ≥ y h' : Nat.le (succ x) y = (x + 1 ≤ y) ⊢ Nat.le (succ x) y
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Nat.lt_of_not_ge
[714, 1]
[722, 11]
rw [h']
x y : Nat h : ¬x ≥ y h' : Nat.le (succ x) y = (x + 1 ≤ y) ⊢ Nat.le (succ x) y
x y : Nat h : ¬x ≥ y h' : Nat.le (succ x) y = (x + 1 ≤ y) ⊢ x + 1 ≤ y
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Nat.lt_of_not_ge
[714, 1]
[722, 11]
rw [←Nat.not_le_eq]
x y : Nat h : ¬x ≥ y h' : Nat.le (succ x) y = (x + 1 ≤ y) ⊢ x + 1 ≤ y
x y : Nat h : ¬x ≥ y h' : Nat.le (succ x) y = (x + 1 ≤ y) ⊢ ¬y ≤ x
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Nat.lt_of_not_ge
[714, 1]
[722, 11]
apply h
x y : Nat h : ¬x ≥ y h' : Nat.le (succ x) y = (x + 1 ≤ y) ⊢ ¬y ≤ x
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Int.toNat_of_ofNat_inj
[728, 1]
[732, 32]
intros z h
⊢ ∀ (z : Int), z ≥ 0 → ofNat (toNat z) = z
z : Int h : z ≥ 0 ⊢ ofNat (toNat z) = z
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Int.toNat_of_ofNat_inj
[728, 1]
[732, 32]
cases z with | ofNat n => simp [toNat, ofNat] | negSucc n => contradiction
z : Int h : z ≥ 0 ⊢ ofNat (toNat z) = z
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Int.toNat_of_ofNat_inj
[728, 1]
[732, 32]
simp [toNat, ofNat]
case ofNat n : Nat h : ofNat n ≥ 0 ⊢ ofNat (toNat (ofNat n)) = ofNat n
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Int.toNat_of_ofNat_inj
[728, 1]
[732, 32]
contradiction
case negSucc n : Nat h : negSucc n ≥ 0 ⊢ ofNat (toNat (negSucc n)) = negSucc n
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Int.abs_of_nonneg_eq_toNat
[734, 1]
[738, 32]
intros z h
⊢ ∀ (z : Int), z ≥ 0 → abs z = toNat z
z : Int h : z ≥ 0 ⊢ abs z = toNat z
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Int.abs_of_nonneg_eq_toNat
[734, 1]
[738, 32]
cases z with | ofNat n => simp [toNat, ofNat, abs] | negSucc n => contradiction
z : Int h : z ≥ 0 ⊢ abs z = toNat z
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Int.abs_of_nonneg_eq_toNat
[734, 1]
[738, 32]
simp [toNat, ofNat, abs]
case ofNat n : Nat h : ofNat n ≥ 0 ⊢ abs (ofNat n) = toNat (ofNat n)
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Int.abs_of_nonneg_eq_toNat
[734, 1]
[738, 32]
contradiction
case negSucc n : Nat h : negSucc n ≥ 0 ⊢ abs (negSucc n) = toNat (negSucc n)
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Int.neg_succ_eq_neg_ofNat_succ
[740, 1]
[745, 24]
unfold Neg.neg
n : Nat ⊢ negSucc n = -ofNat (Nat.succ n)
n : Nat ⊢ negSucc n = instNegInt.1 (ofNat (Nat.succ n))
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Int.neg_succ_eq_neg_ofNat_succ
[740, 1]
[745, 24]
unfold instNegInt
n : Nat ⊢ negSucc n = instNegInt.1 (ofNat (Nat.succ n))
n : Nat ⊢ negSucc n = { neg := Int.neg }.1 (ofNat (Nat.succ n))
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Int.neg_succ_eq_neg_ofNat_succ
[740, 1]
[745, 24]
unfold Int.neg
n : Nat ⊢ negSucc n = { neg := Int.neg }.1 (ofNat (Nat.succ n))
n : Nat ⊢ negSucc n = { neg := fun n => match n with | ofNat n => negOfNat n | negSucc n => ofNat (Nat.succ n) }.1 (ofNat (Nat.succ n))
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Int.neg_succ_eq_neg_ofNat_succ
[740, 1]
[745, 24]
simp only [negOfNat]
n : Nat ⊢ negSucc n = { neg := fun n => match n with | ofNat n => negOfNat n | negSucc n => ofNat (Nat.succ n) }.1 (ofNat (Nat.succ n))
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Int.add_neg_eq_sub
[747, 1]
[759, 37]
intros h
m n : Int ⊢ n < 0 → m + n = m - ofNat (abs n)
m n : Int h : n < 0 ⊢ m + n = m - ofNat (abs n)
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Int.add_neg_eq_sub
[747, 1]
[759, 37]
cases n with | ofNat n => contradiction | negSucc n => simp only [abs] unfold HSub.hSub unfold instHSub unfold Sub.sub unfold Int.instSubInt unfold Int.sub simp only rw [neg_succ_eq_neg_ofNat_succ]
m n : Int h : n < 0 ⊢ m + n = m - ofNat (abs n)
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Int.add_neg_eq_sub
[747, 1]
[759, 37]
contradiction
case ofNat m : Int n : Nat h : ofNat n < 0 ⊢ m + ofNat n = m - ofNat (abs (ofNat n))
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Int.add_neg_eq_sub
[747, 1]
[759, 37]
simp only [abs]
case negSucc m : Int n : Nat h : negSucc n < 0 ⊢ m + negSucc n = m - ofNat (abs (negSucc n))
case negSucc m : Int n : Nat h : negSucc n < 0 ⊢ m + negSucc n = m - ofNat (Nat.succ n)
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Int.add_neg_eq_sub
[747, 1]
[759, 37]
unfold HSub.hSub
case negSucc m : Int n : Nat h : negSucc n < 0 ⊢ m + negSucc n = m - ofNat (Nat.succ n)
case negSucc m : Int n : Nat h : negSucc n < 0 ⊢ m + negSucc n = instHSub.1 m (ofNat (Nat.succ n))
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Int.add_neg_eq_sub
[747, 1]
[759, 37]
unfold instHSub
case negSucc m : Int n : Nat h : negSucc n < 0 ⊢ m + negSucc n = instHSub.1 m (ofNat (Nat.succ n))
case negSucc m : Int n : Nat h : negSucc n < 0 ⊢ m + negSucc n = { hSub := fun a b => Sub.sub a b }.1 m (ofNat (Nat.succ n))
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Int.add_neg_eq_sub
[747, 1]
[759, 37]
unfold Sub.sub
case negSucc m : Int n : Nat h : negSucc n < 0 ⊢ m + negSucc n = { hSub := fun a b => Sub.sub a b }.1 m (ofNat (Nat.succ n))
case negSucc m : Int n : Nat h : negSucc n < 0 ⊢ m + negSucc n = { hSub := fun a b => instSubInt.1 a b }.1 m (ofNat (Nat.succ n))
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Int.add_neg_eq_sub
[747, 1]
[759, 37]
unfold Int.instSubInt
case negSucc m : Int n : Nat h : negSucc n < 0 ⊢ m + negSucc n = { hSub := fun a b => instSubInt.1 a b }.1 m (ofNat (Nat.succ n))
case negSucc m : Int n : Nat h : negSucc n < 0 ⊢ m + negSucc n = { hSub := fun a b => { sub := Int.sub }.1 a b }.1 m (ofNat (Nat.succ n))
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Int.add_neg_eq_sub
[747, 1]
[759, 37]
unfold Int.sub
case negSucc m : Int n : Nat h : negSucc n < 0 ⊢ m + negSucc n = { hSub := fun a b => { sub := Int.sub }.1 a b }.1 m (ofNat (Nat.succ n))
case negSucc m : Int n : Nat h : negSucc n < 0 ⊢ m + negSucc n = { hSub := fun a b => { sub := fun m n => m + -n }.1 a b }.1 m (ofNat (Nat.succ n))
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Int.add_neg_eq_sub
[747, 1]
[759, 37]
simp only
case negSucc m : Int n : Nat h : negSucc n < 0 ⊢ m + negSucc n = { hSub := fun a b => { sub := fun m n => m + -n }.1 a b }.1 m (ofNat (Nat.succ n))
case negSucc m : Int n : Nat h : negSucc n < 0 ⊢ m + negSucc n = m + -ofNat (Nat.succ n)
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Int.add_neg_eq_sub
[747, 1]
[759, 37]
rw [neg_succ_eq_neg_ofNat_succ]
case negSucc m : Int n : Nat h : negSucc n < 0 ⊢ m + negSucc n = m + -ofNat (Nat.succ n)
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Int.add_comm
[761, 1]
[776, 40]
intros x y
⊢ ∀ (x y : Int), x + y = y + x
x y : Int ⊢ x + y = y + x
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Int.add_comm
[761, 1]
[776, 40]
unfold HAdd.hAdd
x y : Int ⊢ x + y = y + x
x y : Int ⊢ instHAdd.1 x y = instHAdd.1 y x
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Int.add_comm
[761, 1]
[776, 40]
unfold instHAdd
x y : Int ⊢ instHAdd.1 x y = instHAdd.1 y x
x y : Int ⊢ { hAdd := fun a b => Add.add a b }.1 x y = { hAdd := fun a b => Add.add a b }.1 y x
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Int.add_comm
[761, 1]
[776, 40]
unfold Add.add
x y : Int ⊢ { hAdd := fun a b => Add.add a b }.1 x y = { hAdd := fun a b => Add.add a b }.1 y x
x y : Int ⊢ { hAdd := fun a b => instAddInt.1 a b }.1 x y = { hAdd := fun a b => instAddInt.1 a b }.1 y x
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Int.add_comm
[761, 1]
[776, 40]
unfold instAddInt
x y : Int ⊢ { hAdd := fun a b => instAddInt.1 a b }.1 x y = { hAdd := fun a b => instAddInt.1 a b }.1 y x
x y : Int ⊢ { hAdd := fun a b => { add := Int.add }.1 a b }.1 x y = { hAdd := fun a b => { add := Int.add }.1 a b }.1 y x
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Int.add_comm
[761, 1]
[776, 40]
unfold Int.add
x y : Int ⊢ { hAdd := fun a b => { add := Int.add }.1 a b }.1 x y = { hAdd := fun a b => { add := Int.add }.1 a b }.1 y x
x y : Int ⊢ { hAdd := fun a b => { add := fun m n => match m, n with | ofNat m, ofNat n => ofNat (m + n) | ofNat m, negSucc n => subNatNat m (Nat.succ n) | negSucc m, ofNat n => subNatNat n (Nat.succ m) | negSucc m, negSucc n => negSucc (Nat.succ (m + n)) }.1 a b }.1 x y = { hAdd := fun a b => { add := fun m n => match m, n with | ofNat m, ofNat n => ofNat (m + n) | ofNat m, negSucc n => subNatNat m (Nat.succ n) | negSucc m, ofNat n => subNatNat n (Nat.succ m) | negSucc m, negSucc n => negSucc (Nat.succ (m + n)) }.1 a b }.1 y x
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Int.add_comm
[761, 1]
[776, 40]
induction x with | ofNat n => cases y with | ofNat m => simp [Nat.add_comm] | negSucc m => simp | negSucc n => cases y with | ofNat m => simp | negSucc m => simp [Nat.add_comm]
x y : Int ⊢ { hAdd := fun a b => { add := fun m n => match m, n with | ofNat m, ofNat n => ofNat (m + n) | ofNat m, negSucc n => subNatNat m (Nat.succ n) | negSucc m, ofNat n => subNatNat n (Nat.succ m) | negSucc m, negSucc n => negSucc (Nat.succ (m + n)) }.1 a b }.1 x y = { hAdd := fun a b => { add := fun m n => match m, n with | ofNat m, ofNat n => ofNat (m + n) | ofNat m, negSucc n => subNatNat m (Nat.succ n) | negSucc m, ofNat n => subNatNat n (Nat.succ m) | negSucc m, negSucc n => negSucc (Nat.succ (m + n)) }.1 a b }.1 y x
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Int.add_comm
[761, 1]
[776, 40]
cases y with | ofNat m => simp [Nat.add_comm] | negSucc m => simp
case ofNat y : Int n : Nat ⊢ { hAdd := fun a b => { add := fun m n => match m, n with | ofNat m, ofNat n => ofNat (m + n) | ofNat m, negSucc n => subNatNat m (Nat.succ n) | negSucc m, ofNat n => subNatNat n (Nat.succ m) | negSucc m, negSucc n => negSucc (Nat.succ (m + n)) }.1 a b }.1 (ofNat n) y = { hAdd := fun a b => { add := fun m n => match m, n with | ofNat m, ofNat n => ofNat (m + n) | ofNat m, negSucc n => subNatNat m (Nat.succ n) | negSucc m, ofNat n => subNatNat n (Nat.succ m) | negSucc m, negSucc n => negSucc (Nat.succ (m + n)) }.1 a b }.1 y (ofNat n)
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Int.add_comm
[761, 1]
[776, 40]
simp [Nat.add_comm]
case ofNat.ofNat n m : Nat ⊢ { hAdd := fun a b => { add := fun m n => match m, n with | ofNat m, ofNat n => ofNat (m + n) | ofNat m, negSucc n => subNatNat m (Nat.succ n) | negSucc m, ofNat n => subNatNat n (Nat.succ m) | negSucc m, negSucc n => negSucc (Nat.succ (m + n)) }.1 a b }.1 (ofNat n) (ofNat m) = { hAdd := fun a b => { add := fun m n => match m, n with | ofNat m, ofNat n => ofNat (m + n) | ofNat m, negSucc n => subNatNat m (Nat.succ n) | negSucc m, ofNat n => subNatNat n (Nat.succ m) | negSucc m, negSucc n => negSucc (Nat.succ (m + n)) }.1 a b }.1 (ofNat m) (ofNat n)
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Int.add_comm
[761, 1]
[776, 40]
simp
case ofNat.negSucc n m : Nat ⊢ { hAdd := fun a b => { add := fun m n => match m, n with | ofNat m, ofNat n => ofNat (m + n) | ofNat m, negSucc n => subNatNat m (Nat.succ n) | negSucc m, ofNat n => subNatNat n (Nat.succ m) | negSucc m, negSucc n => negSucc (Nat.succ (m + n)) }.1 a b }.1 (ofNat n) (negSucc m) = { hAdd := fun a b => { add := fun m n => match m, n with | ofNat m, ofNat n => ofNat (m + n) | ofNat m, negSucc n => subNatNat m (Nat.succ n) | negSucc m, ofNat n => subNatNat n (Nat.succ m) | negSucc m, negSucc n => negSucc (Nat.succ (m + n)) }.1 a b }.1 (negSucc m) (ofNat n)
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Int.add_comm
[761, 1]
[776, 40]
cases y with | ofNat m => simp | negSucc m => simp [Nat.add_comm]
case negSucc y : Int n : Nat ⊢ { hAdd := fun a b => { add := fun m n => match m, n with | ofNat m, ofNat n => ofNat (m + n) | ofNat m, negSucc n => subNatNat m (Nat.succ n) | negSucc m, ofNat n => subNatNat n (Nat.succ m) | negSucc m, negSucc n => negSucc (Nat.succ (m + n)) }.1 a b }.1 (negSucc n) y = { hAdd := fun a b => { add := fun m n => match m, n with | ofNat m, ofNat n => ofNat (m + n) | ofNat m, negSucc n => subNatNat m (Nat.succ n) | negSucc m, ofNat n => subNatNat n (Nat.succ m) | negSucc m, negSucc n => negSucc (Nat.succ (m + n)) }.1 a b }.1 y (negSucc n)
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Int.add_comm
[761, 1]
[776, 40]
simp
case negSucc.ofNat n m : Nat ⊢ { hAdd := fun a b => { add := fun m n => match m, n with | ofNat m, ofNat n => ofNat (m + n) | ofNat m, negSucc n => subNatNat m (Nat.succ n) | negSucc m, ofNat n => subNatNat n (Nat.succ m) | negSucc m, negSucc n => negSucc (Nat.succ (m + n)) }.1 a b }.1 (negSucc n) (ofNat m) = { hAdd := fun a b => { add := fun m n => match m, n with | ofNat m, ofNat n => ofNat (m + n) | ofNat m, negSucc n => subNatNat m (Nat.succ n) | negSucc m, ofNat n => subNatNat n (Nat.succ m) | negSucc m, negSucc n => negSucc (Nat.succ (m + n)) }.1 a b }.1 (ofNat m) (negSucc n)
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Int.add_comm
[761, 1]
[776, 40]
simp [Nat.add_comm]
case negSucc.negSucc n m : Nat ⊢ { hAdd := fun a b => { add := fun m n => match m, n with | ofNat m, ofNat n => ofNat (m + n) | ofNat m, negSucc n => subNatNat m (Nat.succ n) | negSucc m, ofNat n => subNatNat n (Nat.succ m) | negSucc m, negSucc n => negSucc (Nat.succ (m + n)) }.1 a b }.1 (negSucc n) (negSucc m) = { hAdd := fun a b => { add := fun m n => match m, n with | ofNat m, ofNat n => ofNat (m + n) | ofNat m, negSucc n => subNatNat m (Nat.succ n) | negSucc m, ofNat n => subNatNat n (Nat.succ m) | negSucc m, negSucc n => negSucc (Nat.succ (m + n)) }.1 a b }.1 (negSucc m) (negSucc n)
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Decidable.prop_eq_of_decide_eq
[794, 1]
[802, 11]
cases h
p q : Prop ip : Decidable p iq : Decidable q h : p = q ⊢ decide p = decide q
case refl p : Prop ip iq : Decidable p ⊢ decide p = decide p
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Decidable.prop_eq_of_decide_eq
[794, 1]
[802, 11]
apply congr
case refl p : Prop ip iq : Decidable p ⊢ decide p = decide p
case refl.h₁ p : Prop ip iq : Decidable p ⊢ @decide p = @decide p case refl.h₂ p : Prop ip iq : Decidable p ⊢ ip = iq
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Decidable.prop_eq_of_decide_eq
[794, 1]
[802, 11]
. simp
case refl.h₁ p : Prop ip iq : Decidable p ⊢ @decide p = @decide p case refl.h₂ p : Prop ip iq : Decidable p ⊢ ip = iq
case refl.h₂ p : Prop ip iq : Decidable p ⊢ ip = iq
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Decidable.prop_eq_of_decide_eq
[794, 1]
[802, 11]
. apply eq_of_heq apply Subsingleton.helim rfl
case refl.h₂ p : Prop ip iq : Decidable p ⊢ ip = iq
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Decidable.prop_eq_of_decide_eq
[794, 1]
[802, 11]
simp
case refl.h₁ p : Prop ip iq : Decidable p ⊢ @decide p = @decide p
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Decidable.prop_eq_of_decide_eq
[794, 1]
[802, 11]
apply eq_of_heq
case refl.h₂ p : Prop ip iq : Decidable p ⊢ ip = iq
case refl.h₂.h p : Prop ip iq : Decidable p ⊢ HEq ip iq
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Decidable.prop_eq_of_decide_eq
[794, 1]
[802, 11]
apply Subsingleton.helim
case refl.h₂.h p : Prop ip iq : Decidable p ⊢ HEq ip iq
case refl.h₂.h.h₂ p : Prop ip iq : Decidable p ⊢ Decidable p = Decidable p
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Decidable.prop_eq_of_decide_eq
[794, 1]
[802, 11]
rfl
case refl.h₂.h.h₂ p : Prop ip iq : Decidable p ⊢ Decidable p = Decidable p
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.matchKey_snd_length
[818, 1]
[837, 16]
intros xs k
κ : Type u_1 ν : Type u_2 inst✝ : DecidableEq κ ⊢ ∀ (xs : List (κ × ν)) (k : κ), length (matchKey xs k).snd ≤ length xs
κ : Type u_1 ν : Type u_2 inst✝ : DecidableEq κ xs : List (κ × ν) k : κ ⊢ length (matchKey xs k).snd ≤ length xs
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.matchKey_snd_length
[818, 1]
[837, 16]
induction xs with | nil => exact Nat.le.refl | cons x xs ih => simp only [matchKey] apply @Decidable.byCases (x.1=k) _ . intros heq simp only [heq] rw [ite_true] simp only [Prod.snd] apply Nat.le_step exact ih . intros hneq simp only [hneq] rw [ite_false] simp only [Prod.fst] apply Nat.succ_le_succ exact ih
κ : Type u_1 ν : Type u_2 inst✝ : DecidableEq κ xs : List (κ × ν) k : κ ⊢ length (matchKey xs k).snd ≤ length xs
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.matchKey_snd_length
[818, 1]
[837, 16]
exact Nat.le.refl
case nil κ : Type u_1 ν : Type u_2 inst✝ : DecidableEq κ k : κ ⊢ length (matchKey [] k).snd ≤ length []
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.matchKey_snd_length
[818, 1]
[837, 16]
simp only [matchKey]
case cons κ : Type u_1 ν : Type u_2 inst✝ : DecidableEq κ k : κ x : κ × ν xs : List (κ × ν) ih : length (matchKey xs k).snd ≤ length xs ⊢ length (matchKey (x :: xs) k).snd ≤ length (x :: xs)
case cons κ : Type u_1 ν : Type u_2 inst✝ : DecidableEq κ k : κ x : κ × ν xs : List (κ × ν) ih : length (matchKey xs k).snd ≤ length xs ⊢ length (if x.fst = k then (x.snd :: (matchKey xs k).fst, (matchKey xs k).snd) else ((matchKey xs k).fst, (x.fst, x.snd) :: (matchKey xs k).snd)).snd ≤ length (x :: xs)
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.matchKey_snd_length
[818, 1]
[837, 16]
apply @Decidable.byCases (x.1=k) _
case cons κ : Type u_1 ν : Type u_2 inst✝ : DecidableEq κ k : κ x : κ × ν xs : List (κ × ν) ih : length (matchKey xs k).snd ≤ length xs ⊢ length (if x.fst = k then (x.snd :: (matchKey xs k).fst, (matchKey xs k).snd) else ((matchKey xs k).fst, (x.fst, x.snd) :: (matchKey xs k).snd)).snd ≤ length (x :: xs)
case cons.h1 κ : Type u_1 ν : Type u_2 inst✝ : DecidableEq κ k : κ x : κ × ν xs : List (κ × ν) ih : length (matchKey xs k).snd ≤ length xs ⊢ x.fst = k → length (if x.fst = k then (x.snd :: (matchKey xs k).fst, (matchKey xs k).snd) else ((matchKey xs k).fst, (x.fst, x.snd) :: (matchKey xs k).snd)).snd ≤ length (x :: xs) case cons.h2 κ : Type u_1 ν : Type u_2 inst✝ : DecidableEq κ k : κ x : κ × ν xs : List (κ × ν) ih : length (matchKey xs k).snd ≤ length xs ⊢ ¬x.fst = k → length (if x.fst = k then (x.snd :: (matchKey xs k).fst, (matchKey xs k).snd) else ((matchKey xs k).fst, (x.fst, x.snd) :: (matchKey xs k).snd)).snd ≤ length (x :: xs)
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.matchKey_snd_length
[818, 1]
[837, 16]
. intros heq simp only [heq] rw [ite_true] simp only [Prod.snd] apply Nat.le_step exact ih
case cons.h1 κ : Type u_1 ν : Type u_2 inst✝ : DecidableEq κ k : κ x : κ × ν xs : List (κ × ν) ih : length (matchKey xs k).snd ≤ length xs ⊢ x.fst = k → length (if x.fst = k then (x.snd :: (matchKey xs k).fst, (matchKey xs k).snd) else ((matchKey xs k).fst, (x.fst, x.snd) :: (matchKey xs k).snd)).snd ≤ length (x :: xs) case cons.h2 κ : Type u_1 ν : Type u_2 inst✝ : DecidableEq κ k : κ x : κ × ν xs : List (κ × ν) ih : length (matchKey xs k).snd ≤ length xs ⊢ ¬x.fst = k → length (if x.fst = k then (x.snd :: (matchKey xs k).fst, (matchKey xs k).snd) else ((matchKey xs k).fst, (x.fst, x.snd) :: (matchKey xs k).snd)).snd ≤ length (x :: xs)
case cons.h2 κ : Type u_1 ν : Type u_2 inst✝ : DecidableEq κ k : κ x : κ × ν xs : List (κ × ν) ih : length (matchKey xs k).snd ≤ length xs ⊢ ¬x.fst = k → length (if x.fst = k then (x.snd :: (matchKey xs k).fst, (matchKey xs k).snd) else ((matchKey xs k).fst, (x.fst, x.snd) :: (matchKey xs k).snd)).snd ≤ length (x :: xs)
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.matchKey_snd_length
[818, 1]
[837, 16]
. intros hneq simp only [hneq] rw [ite_false] simp only [Prod.fst] apply Nat.succ_le_succ exact ih
case cons.h2 κ : Type u_1 ν : Type u_2 inst✝ : DecidableEq κ k : κ x : κ × ν xs : List (κ × ν) ih : length (matchKey xs k).snd ≤ length xs ⊢ ¬x.fst = k → length (if x.fst = k then (x.snd :: (matchKey xs k).fst, (matchKey xs k).snd) else ((matchKey xs k).fst, (x.fst, x.snd) :: (matchKey xs k).snd)).snd ≤ length (x :: xs)
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.matchKey_snd_length
[818, 1]
[837, 16]
intros heq
case cons.h1 κ : Type u_1 ν : Type u_2 inst✝ : DecidableEq κ k : κ x : κ × ν xs : List (κ × ν) ih : length (matchKey xs k).snd ≤ length xs ⊢ x.fst = k → length (if x.fst = k then (x.snd :: (matchKey xs k).fst, (matchKey xs k).snd) else ((matchKey xs k).fst, (x.fst, x.snd) :: (matchKey xs k).snd)).snd ≤ length (x :: xs)
case cons.h1 κ : Type u_1 ν : Type u_2 inst✝ : DecidableEq κ k : κ x : κ × ν xs : List (κ × ν) ih : length (matchKey xs k).snd ≤ length xs heq : x.fst = k ⊢ length (if x.fst = k then (x.snd :: (matchKey xs k).fst, (matchKey xs k).snd) else ((matchKey xs k).fst, (x.fst, x.snd) :: (matchKey xs k).snd)).snd ≤ length (x :: xs)
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.matchKey_snd_length
[818, 1]
[837, 16]
simp only [heq]
case cons.h1 κ : Type u_1 ν : Type u_2 inst✝ : DecidableEq κ k : κ x : κ × ν xs : List (κ × ν) ih : length (matchKey xs k).snd ≤ length xs heq : x.fst = k ⊢ length (if x.fst = k then (x.snd :: (matchKey xs k).fst, (matchKey xs k).snd) else ((matchKey xs k).fst, (x.fst, x.snd) :: (matchKey xs k).snd)).snd ≤ length (x :: xs)
case cons.h1 κ : Type u_1 ν : Type u_2 inst✝ : DecidableEq κ k : κ x : κ × ν xs : List (κ × ν) ih : length (matchKey xs k).snd ≤ length xs heq : x.fst = k ⊢ length (if True then (x.snd :: (matchKey xs k).fst, (matchKey xs k).snd) else ((matchKey xs k).fst, (k, x.snd) :: (matchKey xs k).snd)).snd ≤ length (x :: xs)
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.matchKey_snd_length
[818, 1]
[837, 16]
rw [ite_true]
case cons.h1 κ : Type u_1 ν : Type u_2 inst✝ : DecidableEq κ k : κ x : κ × ν xs : List (κ × ν) ih : length (matchKey xs k).snd ≤ length xs heq : x.fst = k ⊢ length (if True then (x.snd :: (matchKey xs k).fst, (matchKey xs k).snd) else ((matchKey xs k).fst, (k, x.snd) :: (matchKey xs k).snd)).snd ≤ length (x :: xs)
case cons.h1 κ : Type u_1 ν : Type u_2 inst✝ : DecidableEq κ k : κ x : κ × ν xs : List (κ × ν) ih : length (matchKey xs k).snd ≤ length xs heq : x.fst = k ⊢ length (x.snd :: (matchKey xs k).fst, (matchKey xs k).snd).snd ≤ length (x :: xs)
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.matchKey_snd_length
[818, 1]
[837, 16]
simp only [Prod.snd]
case cons.h1 κ : Type u_1 ν : Type u_2 inst✝ : DecidableEq κ k : κ x : κ × ν xs : List (κ × ν) ih : length (matchKey xs k).snd ≤ length xs heq : x.fst = k ⊢ length (x.snd :: (matchKey xs k).fst, (matchKey xs k).snd).snd ≤ length (x :: xs)
case cons.h1 κ : Type u_1 ν : Type u_2 inst✝ : DecidableEq κ k : κ x : κ × ν xs : List (κ × ν) ih : length (matchKey xs k).snd ≤ length xs heq : x.fst = k ⊢ length (matchKey xs k).snd ≤ length (x :: xs)
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.matchKey_snd_length
[818, 1]
[837, 16]
apply Nat.le_step
case cons.h1 κ : Type u_1 ν : Type u_2 inst✝ : DecidableEq κ k : κ x : κ × ν xs : List (κ × ν) ih : length (matchKey xs k).snd ≤ length xs heq : x.fst = k ⊢ length (matchKey xs k).snd ≤ length (x :: xs)
case cons.h1.h κ : Type u_1 ν : Type u_2 inst✝ : DecidableEq κ k : κ x : κ × ν xs : List (κ × ν) ih : length (matchKey xs k).snd ≤ length xs heq : x.fst = k ⊢ length (matchKey xs k).snd ≤ length xs
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.matchKey_snd_length
[818, 1]
[837, 16]
exact ih
case cons.h1.h κ : Type u_1 ν : Type u_2 inst✝ : DecidableEq κ k : κ x : κ × ν xs : List (κ × ν) ih : length (matchKey xs k).snd ≤ length xs heq : x.fst = k ⊢ length (matchKey xs k).snd ≤ length xs
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.matchKey_snd_length
[818, 1]
[837, 16]
intros hneq
case cons.h2 κ : Type u_1 ν : Type u_2 inst✝ : DecidableEq κ k : κ x : κ × ν xs : List (κ × ν) ih : length (matchKey xs k).snd ≤ length xs ⊢ ¬x.fst = k → length (if x.fst = k then (x.snd :: (matchKey xs k).fst, (matchKey xs k).snd) else ((matchKey xs k).fst, (x.fst, x.snd) :: (matchKey xs k).snd)).snd ≤ length (x :: xs)
case cons.h2 κ : Type u_1 ν : Type u_2 inst✝ : DecidableEq κ k : κ x : κ × ν xs : List (κ × ν) ih : length (matchKey xs k).snd ≤ length xs hneq : ¬x.fst = k ⊢ length (if x.fst = k then (x.snd :: (matchKey xs k).fst, (matchKey xs k).snd) else ((matchKey xs k).fst, (x.fst, x.snd) :: (matchKey xs k).snd)).snd ≤ length (x :: xs)
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.matchKey_snd_length
[818, 1]
[837, 16]
simp only [hneq]
case cons.h2 κ : Type u_1 ν : Type u_2 inst✝ : DecidableEq κ k : κ x : κ × ν xs : List (κ × ν) ih : length (matchKey xs k).snd ≤ length xs hneq : ¬x.fst = k ⊢ length (if x.fst = k then (x.snd :: (matchKey xs k).fst, (matchKey xs k).snd) else ((matchKey xs k).fst, (x.fst, x.snd) :: (matchKey xs k).snd)).snd ≤ length (x :: xs)
case cons.h2 κ : Type u_1 ν : Type u_2 inst✝ : DecidableEq κ k : κ x : κ × ν xs : List (κ × ν) ih : length (matchKey xs k).snd ≤ length xs hneq : ¬x.fst = k ⊢ length (if False then (x.snd :: (matchKey xs k).fst, (matchKey xs k).snd) else ((matchKey xs k).fst, (x.fst, x.snd) :: (matchKey xs k).snd)).snd ≤ length (x :: xs)
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.matchKey_snd_length
[818, 1]
[837, 16]
rw [ite_false]
case cons.h2 κ : Type u_1 ν : Type u_2 inst✝ : DecidableEq κ k : κ x : κ × ν xs : List (κ × ν) ih : length (matchKey xs k).snd ≤ length xs hneq : ¬x.fst = k ⊢ length (if False then (x.snd :: (matchKey xs k).fst, (matchKey xs k).snd) else ((matchKey xs k).fst, (x.fst, x.snd) :: (matchKey xs k).snd)).snd ≤ length (x :: xs)
case cons.h2 κ : Type u_1 ν : Type u_2 inst✝ : DecidableEq κ k : κ x : κ × ν xs : List (κ × ν) ih : length (matchKey xs k).snd ≤ length xs hneq : ¬x.fst = k ⊢ length ((matchKey xs k).fst, (x.fst, x.snd) :: (matchKey xs k).snd).snd ≤ length (x :: xs)
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.matchKey_snd_length
[818, 1]
[837, 16]
simp only [Prod.fst]
case cons.h2 κ : Type u_1 ν : Type u_2 inst✝ : DecidableEq κ k : κ x : κ × ν xs : List (κ × ν) ih : length (matchKey xs k).snd ≤ length xs hneq : ¬x.fst = k ⊢ length ((matchKey xs k).fst, (x.fst, x.snd) :: (matchKey xs k).snd).snd ≤ length (x :: xs)
case cons.h2 κ : Type u_1 ν : Type u_2 inst✝ : DecidableEq κ k : κ x : κ × ν xs : List (κ × ν) ih : length (matchKey xs k).snd ≤ length xs hneq : ¬x.fst = k ⊢ length ((x.fst, x.snd) :: (matchKey xs k).snd) ≤ length (x :: xs)
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.matchKey_snd_length
[818, 1]
[837, 16]
apply Nat.succ_le_succ
case cons.h2 κ : Type u_1 ν : Type u_2 inst✝ : DecidableEq κ k : κ x : κ × ν xs : List (κ × ν) ih : length (matchKey xs k).snd ≤ length xs hneq : ¬x.fst = k ⊢ length ((x.fst, x.snd) :: (matchKey xs k).snd) ≤ length (x :: xs)
case cons.h2.a κ : Type u_1 ν : Type u_2 inst✝ : DecidableEq κ k : κ x : κ × ν xs : List (κ × ν) ih : length (matchKey xs k).snd ≤ length xs hneq : ¬x.fst = k ⊢ length (matchKey xs k).snd ≤ length xs
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.matchKey_snd_length
[818, 1]
[837, 16]
exact ih
case cons.h2.a κ : Type u_1 ν : Type u_2 inst✝ : DecidableEq κ k : κ x : κ × ν xs : List (κ × ν) ih : length (matchKey xs k).snd ≤ length xs hneq : ¬x.fst = k ⊢ length (matchKey xs k).snd ≤ length xs
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.matchKey_lengths_sum
[839, 1]
[855, 31]
intros xs k
κ : Type u_1 ν : Type u_2 inst : DecidableEq κ ⊢ ∀ (xs : List (κ × ν)) (k : κ), length (matchKey xs k).fst + length (matchKey xs k).snd = length xs
κ : Type u_1 ν : Type u_2 inst : DecidableEq κ xs : List (κ × ν) k : κ ⊢ length (matchKey xs k).fst + length (matchKey xs k).snd = length xs
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.matchKey_lengths_sum
[839, 1]
[855, 31]
rfl
case nil κ : Type u_1 ν : Type u_2 inst : DecidableEq κ k : κ ⊢ length (matchKey [] k).fst + length (matchKey [] k).snd = length []
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.matchKey_lengths_sum
[839, 1]
[855, 31]
simp only [matchKey]
case cons κ : Type u_1 ν : Type u_2 inst : DecidableEq κ k : κ x : κ × ν xs : List (κ × ν) ih : length (matchKey xs k).fst + length (matchKey xs k).snd = length xs ⊢ length (matchKey (x :: xs) k).fst + length (matchKey (x :: xs) k).snd = length (x :: xs)
case cons κ : Type u_1 ν : Type u_2 inst : DecidableEq κ k : κ x : κ × ν xs : List (κ × ν) ih : length (matchKey xs k).fst + length (matchKey xs k).snd = length xs ⊢ length (if x.fst = k then (x.snd :: (matchKey xs k).fst, (matchKey xs k).snd) else ((matchKey xs k).fst, (x.fst, x.snd) :: (matchKey xs k).snd)).fst + length (if x.fst = k then (x.snd :: (matchKey xs k).fst, (matchKey xs k).snd) else ((matchKey xs k).fst, (x.fst, x.snd) :: (matchKey xs k).snd)).snd = length (x :: xs)
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.matchKey_lengths_sum
[839, 1]
[855, 31]
simp only [hfalse, ite_false, List.length]
case cons.isFalse κ : Type u_1 ν : Type u_2 inst : DecidableEq κ k : κ x : κ × ν xs : List (κ × ν) ih : length (matchKey xs k).fst + length (matchKey xs k).snd = length xs hfalse : ¬x.fst = k ⊢ length (if x.fst = k then (x.snd :: (matchKey xs k).fst, (matchKey xs k).snd) else ((matchKey xs k).fst, (x.fst, x.snd) :: (matchKey xs k).snd)).fst + length (if x.fst = k then (x.snd :: (matchKey xs k).fst, (matchKey xs k).snd) else ((matchKey xs k).fst, (x.fst, x.snd) :: (matchKey xs k).snd)).snd = length (x :: xs)
case cons.isFalse κ : Type u_1 ν : Type u_2 inst : DecidableEq κ k : κ x : κ × ν xs : List (κ × ν) ih : length (matchKey xs k).fst + length (matchKey xs k).snd = length xs hfalse : ¬x.fst = k ⊢ length (matchKey xs k).fst + (length (matchKey xs k).snd + 1) = length xs + 1
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.matchKey_lengths_sum
[839, 1]
[855, 31]
rw [←Nat.add_assoc]
case cons.isFalse κ : Type u_1 ν : Type u_2 inst : DecidableEq κ k : κ x : κ × ν xs : List (κ × ν) ih : length (matchKey xs k).fst + length (matchKey xs k).snd = length xs hfalse : ¬x.fst = k ⊢ length (matchKey xs k).fst + (length (matchKey xs k).snd + 1) = length xs + 1
case cons.isFalse κ : Type u_1 ν : Type u_2 inst : DecidableEq κ k : κ x : κ × ν xs : List (κ × ν) ih : length (matchKey xs k).fst + length (matchKey xs k).snd = length xs hfalse : ¬x.fst = k ⊢ length (matchKey xs k).fst + length (matchKey xs k).snd + 1 = length xs + 1
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.matchKey_lengths_sum
[839, 1]
[855, 31]
simp only [htrue, ite_true, List.length]
case cons.isTrue κ : Type u_1 ν : Type u_2 inst : DecidableEq κ k : κ x : κ × ν xs : List (κ × ν) ih : length (matchKey xs k).fst + length (matchKey xs k).snd = length xs htrue : x.fst = k ⊢ length (if x.fst = k then (x.snd :: (matchKey xs k).fst, (matchKey xs k).snd) else ((matchKey xs k).fst, (x.fst, x.snd) :: (matchKey xs k).snd)).fst + length (if x.fst = k then (x.snd :: (matchKey xs k).fst, (matchKey xs k).snd) else ((matchKey xs k).fst, (x.fst, x.snd) :: (matchKey xs k).snd)).snd = length (x :: xs)
case cons.isTrue κ : Type u_1 ν : Type u_2 inst : DecidableEq κ k : κ x : κ × ν xs : List (κ × ν) ih : length (matchKey xs k).fst + length (matchKey xs k).snd = length xs htrue : x.fst = k ⊢ length (matchKey xs k).fst + 1 + length (matchKey xs k).snd = length xs + 1
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.matchKey_lengths_sum
[839, 1]
[855, 31]
rw [Nat.add_assoc, Nat.add_comm 1, ←Nat.add_assoc]
case cons.isTrue κ : Type u_1 ν : Type u_2 inst : DecidableEq κ k : κ x : κ × ν xs : List (κ × ν) ih : length (matchKey xs k).fst + length (matchKey xs k).snd = length xs htrue : x.fst = k ⊢ length (matchKey xs k).fst + 1 + length (matchKey xs k).snd = length xs + 1
case cons.isTrue κ : Type u_1 ν : Type u_2 inst : DecidableEq κ k : κ x : κ × ν xs : List (κ × ν) ih : length (matchKey xs k).fst + length (matchKey xs k).snd = length xs htrue : x.fst = k ⊢ length (matchKey xs k).fst + length (matchKey xs k).snd + 1 = length xs + 1