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/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
plus_comm
[146, 1]
[154, 43]
apply generic_recursor
⊢ ∀ (a b : ↑N0), plus (a, b) = plus (b, a)
case hz ⊢ ∀ (b : ↑N0), plus (z, b) = plus (b, z) case hs ⊢ ∀ (n : ↑N0), (∀ (b : ↑N0), plus (n, b) = plus (b, n)) → ∀ (b : ↑N0), plus (S n, b) = plus (b, S n)
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
plus_comm
[146, 1]
[154, 43]
intro a
case hz ⊢ ∀ (b : ↑N0), plus (z, b) = plus (b, z)
case hz a : ↑N0 ⊢ plus (z, a) = plus (a, z)
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
plus_comm
[146, 1]
[154, 43]
rw [zplus, zero_plus_x_eq_eq]
case hz a : ↑N0 ⊢ plus (z, a) = plus (a, z)
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
plus_comm
[146, 1]
[154, 43]
intro a hi b
case hs ⊢ ∀ (n : ↑N0), (∀ (b : ↑N0), plus (n, b) = plus (b, n)) → ∀ (b : ↑N0), plus (S n, b) = plus (b, S n)
case hs a : ↑N0 hi : ∀ (b : ↑N0), plus (a, b) = plus (b, a) b : ↑N0 ⊢ plus (S a, b) = plus (b, S a)
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
plus_comm
[146, 1]
[154, 43]
specialize hi b
case hs a : ↑N0 hi : ∀ (b : ↑N0), plus (a, b) = plus (b, a) b : ↑N0 ⊢ plus (S a, b) = plus (b, S a)
case hs a b : ↑N0 hi : plus (a, b) = plus (b, a) ⊢ plus (S a, b) = plus (b, S a)
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
plus_comm
[146, 1]
[154, 43]
rw [splus, succ_plus_eq_succ_plus, hi]
case hs a b : ↑N0 hi : plus (a, b) = plus (b, a) ⊢ plus (S a, b) = plus (b, S a)
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
muls
[156, 1]
[164, 76]
apply generic_recursor
⊢ ∀ (b a : ↑N0), mul (S a, b) = plus (mul (a, b), b)
case hz ⊢ ∀ (a : ↑N0), mul (S a, z) = plus (mul (a, z), z) case hs ⊢ ∀ (n : ↑N0), (∀ (a : ↑N0), mul (S a, n) = plus (mul (a, n), n)) → ∀ (a : ↑N0), mul (S a, S n) = plus (mul (a, S n), S n)
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
muls
[156, 1]
[164, 76]
intro a
case hz ⊢ ∀ (a : ↑N0), mul (S a, z) = plus (mul (a, z), z)
case hz a : ↑N0 ⊢ mul (S a, z) = plus (mul (a, z), z)
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
muls
[156, 1]
[164, 76]
rw [zmul, zmul, zplus]
case hz a : ↑N0 ⊢ mul (S a, z) = plus (mul (a, z), z)
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
muls
[156, 1]
[164, 76]
intro b hi a
case hs ⊢ ∀ (n : ↑N0), (∀ (a : ↑N0), mul (S a, n) = plus (mul (a, n), n)) → ∀ (a : ↑N0), mul (S a, S n) = plus (mul (a, S n), S n)
case hs b : ↑N0 hi : ∀ (a : ↑N0), mul (S a, b) = plus (mul (a, b), b) a : ↑N0 ⊢ mul (S a, S b) = plus (mul (a, S b), S b)
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
muls
[156, 1]
[164, 76]
specialize hi a
case hs b : ↑N0 hi : ∀ (a : ↑N0), mul (S a, b) = plus (mul (a, b), b) a : ↑N0 ⊢ mul (S a, S b) = plus (mul (a, S b), S b)
case hs b a : ↑N0 hi : mul (S a, b) = plus (mul (a, b), b) ⊢ mul (S a, S b) = plus (mul (a, S b), S b)
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
muls
[156, 1]
[164, 76]
rw [smul, smul, hi, splus, splus, ←plus_assoc, plus_comm b, plus_assoc]
case hs b a : ↑N0 hi : mul (S a, b) = plus (mul (a, b), b) ⊢ mul (S a, S b) = plus (mul (a, S b), S b)
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
mul_comm'
[166, 1]
[174, 24]
apply generic_recursor
⊢ ∀ (a b : ↑N0), mul (a, b) = mul (b, a)
case hz ⊢ ∀ (b : ↑N0), mul (z, b) = mul (b, z) case hs ⊢ ∀ (n : ↑N0), (∀ (b : ↑N0), mul (n, b) = mul (b, n)) → ∀ (b : ↑N0), mul (S n, b) = mul (b, S n)
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
mul_comm'
[166, 1]
[174, 24]
intro a
case hz ⊢ ∀ (b : ↑N0), mul (z, b) = mul (b, z)
case hz a : ↑N0 ⊢ mul (z, a) = mul (a, z)
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
mul_comm'
[166, 1]
[174, 24]
rw [zmul, zero_mul_eq_zero]
case hz a : ↑N0 ⊢ mul (z, a) = mul (a, z)
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
mul_comm'
[166, 1]
[174, 24]
intro a hi b
case hs ⊢ ∀ (n : ↑N0), (∀ (b : ↑N0), mul (n, b) = mul (b, n)) → ∀ (b : ↑N0), mul (S n, b) = mul (b, S n)
case hs a : ↑N0 hi : ∀ (b : ↑N0), mul (a, b) = mul (b, a) b : ↑N0 ⊢ mul (S a, b) = mul (b, S a)
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
mul_comm'
[166, 1]
[174, 24]
specialize hi b
case hs a : ↑N0 hi : ∀ (b : ↑N0), mul (a, b) = mul (b, a) b : ↑N0 ⊢ mul (S a, b) = mul (b, S a)
case hs a b : ↑N0 hi : mul (a, b) = mul (b, a) ⊢ mul (S a, b) = mul (b, S a)
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
mul_comm'
[166, 1]
[174, 24]
rw [smul, muls, hi]
case hs a b : ↑N0 hi : mul (a, b) = mul (b, a) ⊢ mul (S a, b) = mul (b, S a)
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
exp_distrib_mul
[176, 1]
[184, 98]
apply generic_recursor
⊢ ∀ (r m n : ↑N0), exp (mul (m, n), r) = mul (exp (m, r), exp (n, r))
case hz ⊢ ∀ (m n : ↑N0), exp (mul (m, n), z) = mul (exp (m, z), exp (n, z)) case hs ⊢ ∀ (n : ↑N0), (∀ (m n_1 : ↑N0), exp (mul (m, n_1), n) = mul (exp (m, n), exp (n_1, n))) → ∀ (m n_1 : ↑N0), exp (mul (m, n_1), S n) = mul (exp (m, S n), exp (n_1, S n))
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
exp_distrib_mul
[176, 1]
[184, 98]
intro m n
case hz ⊢ ∀ (m n : ↑N0), exp (mul (m, n), z) = mul (exp (m, z), exp (n, z))
case hz m n : ↑N0 ⊢ exp (mul (m, n), z) = mul (exp (m, z), exp (n, z))
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
exp_distrib_mul
[176, 1]
[184, 98]
rw [zexp, zexp, zexp, succ_zero_mul_eq_self']
case hz m n : ↑N0 ⊢ exp (mul (m, n), z) = mul (exp (m, z), exp (n, z))
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
exp_distrib_mul
[176, 1]
[184, 98]
intro r hi m n
case hs ⊢ ∀ (n : ↑N0), (∀ (m n_1 : ↑N0), exp (mul (m, n_1), n) = mul (exp (m, n), exp (n_1, n))) → ∀ (m n_1 : ↑N0), exp (mul (m, n_1), S n) = mul (exp (m, S n), exp (n_1, S n))
case hs r : ↑N0 hi : ∀ (m n : ↑N0), exp (mul (m, n), r) = mul (exp (m, r), exp (n, r)) m n : ↑N0 ⊢ exp (mul (m, n), S r) = mul (exp (m, S r), exp (n, S r))
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
exp_distrib_mul
[176, 1]
[184, 98]
specialize hi m n
case hs r : ↑N0 hi : ∀ (m n : ↑N0), exp (mul (m, n), r) = mul (exp (m, r), exp (n, r)) m n : ↑N0 ⊢ exp (mul (m, n), S r) = mul (exp (m, S r), exp (n, S r))
case hs r m n : ↑N0 hi : exp (mul (m, n), r) = mul (exp (m, r), exp (n, r)) ⊢ exp (mul (m, n), S r) = mul (exp (m, S r), exp (n, S r))
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
exp_distrib_mul
[176, 1]
[184, 98]
rw [sexp, sexp, sexp, hi, ←mul_assoc', mul_assoc' m, mul_comm' _ m, ←mul_assoc', ←mul_assoc']
case hs r m n : ↑N0 hi : exp (mul (m, n), r) = mul (exp (m, r), exp (n, r)) ⊢ exp (mul (m, n), S r) = mul (exp (m, S r), exp (n, S r))
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
false_proof
[204, 1]
[211, 16]
let baldie : Person := ⟨[]⟩
⊢ False
baldie : Person := { hair := [] } ⊢ False
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
false_proof
[204, 1]
[211, 16]
have bald : Bald baldie := rfl
baldie : Person := { hair := [] } ⊢ False
baldie : Person := { hair := [] } bald : Bald baldie ⊢ False
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
false_proof
[204, 1]
[211, 16]
have still_bald := add_one_hair_still_bald bald
baldie : Person := { hair := [] } bald : Bald baldie ⊢ False
baldie : Person := { hair := [] } bald : Bald baldie still_bald : Bald (add_one_hair baldie) ⊢ False
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
false_proof
[204, 1]
[211, 16]
rw [Bald, add_one_hair] at still_bald
baldie : Person := { hair := [] } bald : Bald baldie still_bald : Bald (add_one_hair baldie) ⊢ False
baldie : Person := { hair := [] } bald : Bald baldie still_bald : { hair := Strand.strand :: baldie.hair }.hair = ∅ ⊢ False
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
false_proof
[204, 1]
[211, 16]
contradiction
baldie : Person := { hair := [] } bald : Bald baldie still_bald : { hair := Strand.strand :: baldie.hair }.hair = ∅ ⊢ False
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
all_people_bald
[213, 1]
[222, 17]
intro person
⊢ ∀ (person : Person), Bald person
person : Person ⊢ Bald person
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
all_people_bald
[213, 1]
[222, 17]
rw [Bald]
person : Person ⊢ Bald person
person : Person ⊢ person.hair = ∅
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
all_people_bald
[213, 1]
[222, 17]
induction' person.hair with _ h ih
person : Person ⊢ person.hair = ∅
case nil person : Person ⊢ [] = ∅ case cons person : Person head✝ : Strand h : List Strand ih : h = ∅ ⊢ head✝ :: h = ∅
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
all_people_bald
[213, 1]
[222, 17]
rfl
case nil person : Person ⊢ [] = ∅
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
all_people_bald
[213, 1]
[222, 17]
have baldie := add_one_hair_still_bald ih
case cons person : Person head✝ : Strand h : List Strand ih : h = ∅ ⊢ head✝ :: h = ∅
case cons person : Person head✝ : Strand h : List Strand ih : h = ∅ baldie : Bald (add_one_hair { hair := h }) ⊢ head✝ :: h = ∅
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
all_people_bald
[213, 1]
[222, 17]
rw [add_one_hair, Bald] at baldie
case cons person : Person head✝ : Strand h : List Strand ih : h = ∅ baldie : Bald (add_one_hair { hair := h }) ⊢ head✝ :: h = ∅
case cons person : Person head✝ : Strand h : List Strand ih : h = ∅ baldie : { hair := Strand.strand :: { hair := h }.hair }.hair = ∅ ⊢ head✝ :: h = ∅
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
all_people_bald
[213, 1]
[222, 17]
exact baldie
case cons person : Person head✝ : Strand h : List Strand ih : h = ∅ baldie : { hair := Strand.strand :: { hair := h }.hair }.hair = ∅ ⊢ head✝ :: h = ∅
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
ℕplus.mul_def
[254, 1]
[261, 8]
simp only [ne_eq, mul_eq_zero, not_or]
a b : ℕplus ⊢ ↑a * ↑b ≠ 0
a b : ℕplus ⊢ ¬↑a = 0 ∧ ¬↑b = 0
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
ℕplus.mul_def
[254, 1]
[261, 8]
exact ⟨a.property, b.property⟩
a b : ℕplus ⊢ ¬↑a = 0 ∧ ¬↑b = 0
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
dvd_iff_nat_dvd
[274, 1]
[292, 13]
constructor
a b : ℕplus ⊢ R3 a b ↔ ↑a ∣ ↑b
case mp a b : ℕplus ⊢ R3 a b → ↑a ∣ ↑b case mpr a b : ℕplus ⊢ ↑a ∣ ↑b → R3 a b
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
dvd_iff_nat_dvd
[274, 1]
[292, 13]
intro hdvd
case mp a b : ℕplus ⊢ R3 a b → ↑a ∣ ↑b
case mp a b : ℕplus hdvd : R3 a b ⊢ ↑a ∣ ↑b
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
dvd_iff_nat_dvd
[274, 1]
[292, 13]
rcases hdvd with ⟨c, hc⟩
case mp a b : ℕplus hdvd : R3 a b ⊢ ↑a ∣ ↑b
case mp.intro a b c : ℕplus hc : b = a * c ⊢ ↑a ∣ ↑b
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
dvd_iff_nat_dvd
[274, 1]
[292, 13]
use c.val
case mp.intro a b c : ℕplus hc : b = a * c ⊢ ↑a ∣ ↑b
case h a b c : ℕplus hc : b = a * c ⊢ ↑b = ↑a * ↑c
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
dvd_iff_nat_dvd
[274, 1]
[292, 13]
rw [ℕplus.mul_def] at hc
case h a b c : ℕplus hc : b = a * c ⊢ ↑b = ↑a * ↑c
case h a b c : ℕplus hc : b = { val := ↑a * ↑c, property := (_ : ↑a * ↑c ≠ 0) } ⊢ ↑b = ↑a * ↑c
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
dvd_iff_nat_dvd
[274, 1]
[292, 13]
apply_fun Subtype.val at hc
case h a b c : ℕplus hc : b = { val := ↑a * ↑c, property := (_ : ↑a * ↑c ≠ 0) } ⊢ ↑b = ↑a * ↑c
case h a b c : ℕplus hc : ↑b = ↑{ val := ↑a * ↑c, property := (_ : ↑a * ↑c ≠ 0) } ⊢ ↑b = ↑a * ↑c
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
dvd_iff_nat_dvd
[274, 1]
[292, 13]
exact hc
case h a b c : ℕplus hc : ↑b = ↑{ val := ↑a * ↑c, property := (_ : ↑a * ↑c ≠ 0) } ⊢ ↑b = ↑a * ↑c
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
dvd_iff_nat_dvd
[274, 1]
[292, 13]
intro hdvd
case mpr a b : ℕplus ⊢ ↑a ∣ ↑b → R3 a b
case mpr a b : ℕplus hdvd : ↑a ∣ ↑b ⊢ R3 a b
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
dvd_iff_nat_dvd
[274, 1]
[292, 13]
rcases hdvd with ⟨c, hc⟩
case mpr a b : ℕplus hdvd : ↑a ∣ ↑b ⊢ R3 a b
case mpr.intro a b : ℕplus c : ℕ hc : ↑b = ↑a * c ⊢ R3 a b
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
dvd_iff_nat_dvd
[274, 1]
[292, 13]
have hb := b.property
case mpr.intro a b : ℕplus c : ℕ hc : ↑b = ↑a * c ⊢ R3 a b
case mpr.intro a b : ℕplus c : ℕ hc : ↑b = ↑a * c hb : ↑b ≠ 0 ⊢ R3 a b
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
dvd_iff_nat_dvd
[274, 1]
[292, 13]
rw [hc, mul_ne_zero_iff] at hb
case mpr.intro a b : ℕplus c : ℕ hc : ↑b = ↑a * c hb : ↑b ≠ 0 ⊢ R3 a b
case mpr.intro a b : ℕplus c : ℕ hc : ↑b = ↑a * c hb : ↑a ≠ 0 ∧ c ≠ 0 ⊢ R3 a b
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
dvd_iff_nat_dvd
[274, 1]
[292, 13]
let lc : ℕplus := ⟨c, hb.2⟩
case mpr.intro a b : ℕplus c : ℕ hc : ↑b = ↑a * c hb : ↑a ≠ 0 ∧ c ≠ 0 ⊢ R3 a b
case mpr.intro a b : ℕplus c : ℕ hc : ↑b = ↑a * c hb : ↑a ≠ 0 ∧ c ≠ 0 lc : ℕplus := { val := c, property := (_ : c ≠ 0) } ⊢ R3 a b
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
dvd_iff_nat_dvd
[274, 1]
[292, 13]
use lc
case mpr.intro a b : ℕplus c : ℕ hc : ↑b = ↑a * c hb : ↑a ≠ 0 ∧ c ≠ 0 lc : ℕplus := { val := c, property := (_ : c ≠ 0) } ⊢ R3 a b
case h a b : ℕplus c : ℕ hc : ↑b = ↑a * c hb : ↑a ≠ 0 ∧ c ≠ 0 lc : ℕplus := { val := c, property := (_ : c ≠ 0) } ⊢ b = a * lc
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
dvd_iff_nat_dvd
[274, 1]
[292, 13]
rw [Subtype.ext_iff]
case h a b : ℕplus c : ℕ hc : ↑b = ↑a * c hb : ↑a ≠ 0 ∧ c ≠ 0 lc : ℕplus := { val := c, property := (_ : c ≠ 0) } ⊢ b = a * lc
case h a b : ℕplus c : ℕ hc : ↑b = ↑a * c hb : ↑a ≠ 0 ∧ c ≠ 0 lc : ℕplus := { val := c, property := (_ : c ≠ 0) } ⊢ ↑b = ↑(a * lc)
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
dvd_iff_nat_dvd
[274, 1]
[292, 13]
exact hc
case h a b : ℕplus c : ℕ hc : ↑b = ↑a * c hb : ↑a ≠ 0 ∧ c ≠ 0 lc : ℕplus := { val := c, property := (_ : c ≠ 0) } ⊢ ↑b = ↑(a * lc)
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
r3_not_weak_order
[330, 1]
[348, 18]
intro hwo
⊢ ¬WeakOrder R3
hwo : WeakOrder R3 ⊢ False
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
r3_not_weak_order
[330, 1]
[348, 18]
simp_rw [WeakOrder, PartialOrder', R3] at hwo
hwo : WeakOrder R3 ⊢ False
hwo : (∀ (a b c : ℕplus), (a ∣ b → b ∣ c → a ∣ c) ∧ (a ∣ b → b ∣ a → a = b)) ∧ ∀ (a b : ℕplus), a ∣ b ∨ b ∣ a ⊢ False
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
r3_not_weak_order
[330, 1]
[348, 18]
have hf := hwo.2 2 3
hwo : (∀ (a b c : ℕplus), (a ∣ b → b ∣ c → a ∣ c) ∧ (a ∣ b → b ∣ a → a = b)) ∧ ∀ (a b : ℕplus), a ∣ b ∨ b ∣ a ⊢ False
hwo : (∀ (a b c : ℕplus), (a ∣ b → b ∣ c → a ∣ c) ∧ (a ∣ b → b ∣ a → a = b)) ∧ ∀ (a b : ℕplus), a ∣ b ∨ b ∣ a hf : 2 ∣ 3 ∨ 3 ∣ 2 ⊢ False
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
r3_not_weak_order
[330, 1]
[348, 18]
rcases hf with (hdvd3 | hdvd2)
hwo : (∀ (a b c : ℕplus), (a ∣ b → b ∣ c → a ∣ c) ∧ (a ∣ b → b ∣ a → a = b)) ∧ ∀ (a b : ℕplus), a ∣ b ∨ b ∣ a hf : 2 ∣ 3 ∨ 3 ∣ 2 ⊢ False
case inl hwo : (∀ (a b c : ℕplus), (a ∣ b → b ∣ c → a ∣ c) ∧ (a ∣ b → b ∣ a → a = b)) ∧ ∀ (a b : ℕplus), a ∣ b ∨ b ∣ a hdvd3 : 2 ∣ 3 ⊢ False case inr hwo : (∀ (a b c : ℕplus), (a ∣ b → b ∣ c → a ∣ c) ∧ (a ∣ b → b ∣ a → a = b)) ∧ ∀ (a b : ℕplus), a ∣ b ∨ b ∣ a hdvd2 : 3 ∣ 2 ⊢ False
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
r3_not_weak_order
[330, 1]
[348, 18]
rw [dvd_def] at hdvd3
case inl hwo : (∀ (a b c : ℕplus), (a ∣ b → b ∣ c → a ∣ c) ∧ (a ∣ b → b ∣ a → a = b)) ∧ ∀ (a b : ℕplus), a ∣ b ∨ b ∣ a hdvd3 : 2 ∣ 3 ⊢ False
case inl hwo : (∀ (a b c : ℕplus), (a ∣ b → b ∣ c → a ∣ c) ∧ (a ∣ b → b ∣ a → a = b)) ∧ ∀ (a b : ℕplus), a ∣ b ∨ b ∣ a hdvd3 : ∃ c, 3 = 2 * c ⊢ False
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
r3_not_weak_order
[330, 1]
[348, 18]
rcases hdvd3 with ⟨c, hc⟩
case inl hwo : (∀ (a b c : ℕplus), (a ∣ b → b ∣ c → a ∣ c) ∧ (a ∣ b → b ∣ a → a = b)) ∧ ∀ (a b : ℕplus), a ∣ b ∨ b ∣ a hdvd3 : ∃ c, 3 = 2 * c ⊢ False
case inl.intro hwo : (∀ (a b c : ℕplus), (a ∣ b → b ∣ c → a ∣ c) ∧ (a ∣ b → b ∣ a → a = b)) ∧ ∀ (a b : ℕplus), a ∣ b ∨ b ∣ a c : ℕplus hc : 3 = 2 * c ⊢ False
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
r3_not_weak_order
[330, 1]
[348, 18]
rw [Subtype.ext_iff] at hc
case inl.intro hwo : (∀ (a b c : ℕplus), (a ∣ b → b ∣ c → a ∣ c) ∧ (a ∣ b → b ∣ a → a = b)) ∧ ∀ (a b : ℕplus), a ∣ b ∨ b ∣ a c : ℕplus hc : 3 = 2 * c ⊢ False
case inl.intro hwo : (∀ (a b c : ℕplus), (a ∣ b → b ∣ c → a ∣ c) ∧ (a ∣ b → b ∣ a → a = b)) ∧ ∀ (a b : ℕplus), a ∣ b ∨ b ∣ a c : ℕplus hc : ↑3 = ↑(2 * c) ⊢ False
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
r3_not_weak_order
[330, 1]
[348, 18]
have hdvd : ∃ c : ℕ, (3 : ℕ) = 2 * c := ⟨c.val, hc⟩
case inl.intro hwo : (∀ (a b c : ℕplus), (a ∣ b → b ∣ c → a ∣ c) ∧ (a ∣ b → b ∣ a → a = b)) ∧ ∀ (a b : ℕplus), a ∣ b ∨ b ∣ a c : ℕplus hc : ↑3 = ↑(2 * c) ⊢ False
case inl.intro hwo : (∀ (a b c : ℕplus), (a ∣ b → b ∣ c → a ∣ c) ∧ (a ∣ b → b ∣ a → a = b)) ∧ ∀ (a b : ℕplus), a ∣ b ∨ b ∣ a c : ℕplus hc : ↑3 = ↑(2 * c) hdvd : ∃ c, 3 = 2 * c ⊢ False
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
r3_not_weak_order
[330, 1]
[348, 18]
rw [←dvd_def] at hdvd
case inl.intro hwo : (∀ (a b c : ℕplus), (a ∣ b → b ∣ c → a ∣ c) ∧ (a ∣ b → b ∣ a → a = b)) ∧ ∀ (a b : ℕplus), a ∣ b ∨ b ∣ a c : ℕplus hc : ↑3 = ↑(2 * c) hdvd : ∃ c, 3 = 2 * c ⊢ False
case inl.intro hwo : (∀ (a b c : ℕplus), (a ∣ b → b ∣ c → a ∣ c) ∧ (a ∣ b → b ∣ a → a = b)) ∧ ∀ (a b : ℕplus), a ∣ b ∨ b ∣ a c : ℕplus hc : ↑3 = ↑(2 * c) hdvd : 2 ∣ 3 ⊢ False
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
r3_not_weak_order
[330, 1]
[348, 18]
contradiction
case inl.intro hwo : (∀ (a b c : ℕplus), (a ∣ b → b ∣ c → a ∣ c) ∧ (a ∣ b → b ∣ a → a = b)) ∧ ∀ (a b : ℕplus), a ∣ b ∨ b ∣ a c : ℕplus hc : ↑3 = ↑(2 * c) hdvd : 2 ∣ 3 ⊢ False
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
r3_not_weak_order
[330, 1]
[348, 18]
rw [dvd_def] at hdvd2
case inr hwo : (∀ (a b c : ℕplus), (a ∣ b → b ∣ c → a ∣ c) ∧ (a ∣ b → b ∣ a → a = b)) ∧ ∀ (a b : ℕplus), a ∣ b ∨ b ∣ a hdvd2 : 3 ∣ 2 ⊢ False
case inr hwo : (∀ (a b c : ℕplus), (a ∣ b → b ∣ c → a ∣ c) ∧ (a ∣ b → b ∣ a → a = b)) ∧ ∀ (a b : ℕplus), a ∣ b ∨ b ∣ a hdvd2 : ∃ c, 2 = 3 * c ⊢ False
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
r3_not_weak_order
[330, 1]
[348, 18]
rcases hdvd2 with ⟨c, hc⟩
case inr hwo : (∀ (a b c : ℕplus), (a ∣ b → b ∣ c → a ∣ c) ∧ (a ∣ b → b ∣ a → a = b)) ∧ ∀ (a b : ℕplus), a ∣ b ∨ b ∣ a hdvd2 : ∃ c, 2 = 3 * c ⊢ False
case inr.intro hwo : (∀ (a b c : ℕplus), (a ∣ b → b ∣ c → a ∣ c) ∧ (a ∣ b → b ∣ a → a = b)) ∧ ∀ (a b : ℕplus), a ∣ b ∨ b ∣ a c : ℕplus hc : 2 = 3 * c ⊢ False
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
r3_not_weak_order
[330, 1]
[348, 18]
rw [Subtype.ext_iff] at hc
case inr.intro hwo : (∀ (a b c : ℕplus), (a ∣ b → b ∣ c → a ∣ c) ∧ (a ∣ b → b ∣ a → a = b)) ∧ ∀ (a b : ℕplus), a ∣ b ∨ b ∣ a c : ℕplus hc : 2 = 3 * c ⊢ False
case inr.intro hwo : (∀ (a b c : ℕplus), (a ∣ b → b ∣ c → a ∣ c) ∧ (a ∣ b → b ∣ a → a = b)) ∧ ∀ (a b : ℕplus), a ∣ b ∨ b ∣ a c : ℕplus hc : ↑2 = ↑(3 * c) ⊢ False
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
r3_not_weak_order
[330, 1]
[348, 18]
have hdvd : ∃ c : ℕ, (2 : ℕ) = 3 * c := ⟨c.val, hc⟩
case inr.intro hwo : (∀ (a b c : ℕplus), (a ∣ b → b ∣ c → a ∣ c) ∧ (a ∣ b → b ∣ a → a = b)) ∧ ∀ (a b : ℕplus), a ∣ b ∨ b ∣ a c : ℕplus hc : ↑2 = ↑(3 * c) ⊢ False
case inr.intro hwo : (∀ (a b c : ℕplus), (a ∣ b → b ∣ c → a ∣ c) ∧ (a ∣ b → b ∣ a → a = b)) ∧ ∀ (a b : ℕplus), a ∣ b ∨ b ∣ a c : ℕplus hc : ↑2 = ↑(3 * c) hdvd : ∃ c, 2 = 3 * c ⊢ False
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
r3_not_weak_order
[330, 1]
[348, 18]
rw [←dvd_def] at hdvd
case inr.intro hwo : (∀ (a b c : ℕplus), (a ∣ b → b ∣ c → a ∣ c) ∧ (a ∣ b → b ∣ a → a = b)) ∧ ∀ (a b : ℕplus), a ∣ b ∨ b ∣ a c : ℕplus hc : ↑2 = ↑(3 * c) hdvd : ∃ c, 2 = 3 * c ⊢ False
case inr.intro hwo : (∀ (a b c : ℕplus), (a ∣ b → b ∣ c → a ∣ c) ∧ (a ∣ b → b ∣ a → a = b)) ∧ ∀ (a b : ℕplus), a ∣ b ∨ b ∣ a c : ℕplus hc : ↑2 = ↑(3 * c) hdvd : 3 ∣ 2 ⊢ False
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
r3_not_weak_order
[330, 1]
[348, 18]
contradiction
case inr.intro hwo : (∀ (a b c : ℕplus), (a ∣ b → b ∣ c → a ∣ c) ∧ (a ∣ b → b ∣ a → a = b)) ∧ ∀ (a b : ℕplus), a ∣ b ∨ b ∣ a c : ℕplus hc : ↑2 = ↑(3 * c) hdvd : 3 ∣ 2 ⊢ False
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
r3_not_strict_order
[350, 1]
[360, 18]
intro hso
⊢ ¬StrictOrder R3
hso : StrictOrder R3 ⊢ False
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
r3_not_strict_order
[350, 1]
[360, 18]
rw [StrictOrder] at hso
hso : StrictOrder R3 ⊢ False
hso : ∀ (a b c : ℕplus), (R3 a b → R3 b c → R3 a c) ∧ Trichotomy (R3 a b) (R3 b a) (a = b) ⊢ False
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
r3_not_strict_order
[350, 1]
[360, 18]
specialize hso 2 3 1
hso : ∀ (a b c : ℕplus), (R3 a b → R3 b c → R3 a c) ∧ Trichotomy (R3 a b) (R3 b a) (a = b) ⊢ False
hso : (R3 2 3 → R3 3 1 → R3 2 1) ∧ Trichotomy (R3 2 3) (R3 3 2) (2 = 3) ⊢ False
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
r3_not_strict_order
[350, 1]
[360, 18]
rcases hso with ⟨_, (⟨_, _, heq⟩ | ⟨_, hdvd3, _⟩ | ⟨hdvd2, _, _⟩)⟩
hso : (R3 2 3 → R3 3 1 → R3 2 1) ∧ Trichotomy (R3 2 3) (R3 3 2) (2 = 3) ⊢ False
case intro.inl.intro.intro left✝² : R3 2 3 → R3 3 1 → R3 2 1 left✝¹ : ¬R3 2 3 left✝ : ¬R3 3 2 heq : 2 = 3 ⊢ False case intro.inr.inl.intro.intro left✝¹ : R3 2 3 → R3 3 1 → R3 2 1 left✝ : ¬R3 2 3 hdvd3 : R3 3 2 right✝ : ¬2 = 3 ⊢ False case intro.inr.inr.intro.intro left✝¹ : R3 2 3 → R3 3 1 → R3 2 1 hdvd2 : R3 2 3 left✝ : ¬R3 3 2 right✝ : ¬2 = 3 ⊢ False
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
r3_not_strict_order
[350, 1]
[360, 18]
rw [←Subtype.coe_inj] at heq
case intro.inl.intro.intro left✝² : R3 2 3 → R3 3 1 → R3 2 1 left✝¹ : ¬R3 2 3 left✝ : ¬R3 3 2 heq : 2 = 3 ⊢ False
case intro.inl.intro.intro left✝² : R3 2 3 → R3 3 1 → R3 2 1 left✝¹ : ¬R3 2 3 left✝ : ¬R3 3 2 heq : ↑2 = ↑3 ⊢ False
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
r3_not_strict_order
[350, 1]
[360, 18]
contradiction
case intro.inl.intro.intro left✝² : R3 2 3 → R3 3 1 → R3 2 1 left✝¹ : ¬R3 2 3 left✝ : ¬R3 3 2 heq : ↑2 = ↑3 ⊢ False
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
r3_not_strict_order
[350, 1]
[360, 18]
contradiction
case intro.inr.inl.intro.intro left✝¹ : R3 2 3 → R3 3 1 → R3 2 1 left✝ : ¬R3 2 3 hdvd3 : R3 3 2 right✝ : ¬2 = 3 ⊢ False
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
r3_not_strict_order
[350, 1]
[360, 18]
contradiction
case intro.inr.inr.intro.intro left✝¹ : R3 2 3 → R3 3 1 → R3 2 1 hdvd2 : R3 2 3 left✝ : ¬R3 3 2 right✝ : ¬2 = 3 ⊢ False
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
r3_partial_order
[362, 1]
[398, 13]
intros hpo b c
⊢ PartialOrder' R3
hpo b c : ℕplus ⊢ (R3 hpo b → R3 b c → R3 hpo c) ∧ (R3 hpo b → R3 b hpo → hpo = b)
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
r3_partial_order
[362, 1]
[398, 13]
simp [R3]
hpo b c : ℕplus ⊢ (R3 hpo b → R3 b c → R3 hpo c) ∧ (R3 hpo b → R3 b hpo → hpo = b)
hpo b c : ℕplus ⊢ (hpo ∣ b → b ∣ c → hpo ∣ c) ∧ (hpo ∣ b → b ∣ hpo → hpo = b)
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
r3_partial_order
[362, 1]
[398, 13]
constructor
hpo b c : ℕplus ⊢ (hpo ∣ b → b ∣ c → hpo ∣ c) ∧ (hpo ∣ b → b ∣ hpo → hpo = b)
case left hpo b c : ℕplus ⊢ hpo ∣ b → b ∣ c → hpo ∣ c case right hpo b c : ℕplus ⊢ hpo ∣ b → b ∣ hpo → hpo = b
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
r3_partial_order
[362, 1]
[398, 13]
intro hdvdb hdvdc
case left hpo b c : ℕplus ⊢ hpo ∣ b → b ∣ c → hpo ∣ c
case left hpo b c : ℕplus hdvdb : hpo ∣ b hdvdc : b ∣ c ⊢ hpo ∣ c
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
r3_partial_order
[362, 1]
[398, 13]
rw [dvd_def] at hdvdb
case left hpo b c : ℕplus hdvdb : hpo ∣ b hdvdc : b ∣ c ⊢ hpo ∣ c
case left hpo b c : ℕplus hdvdb : ∃ c, b = hpo * c hdvdc : b ∣ c ⊢ hpo ∣ c
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
r3_partial_order
[362, 1]
[398, 13]
rw [dvd_def] at hdvdc
case left hpo b c : ℕplus hdvdb : ∃ c, b = hpo * c hdvdc : b ∣ c ⊢ hpo ∣ c
case left hpo b c : ℕplus hdvdb : ∃ c, b = hpo * c hdvdc : ∃ c_1, c = b * c_1 ⊢ hpo ∣ c
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
r3_partial_order
[362, 1]
[398, 13]
rw [dvd_def]
case left hpo b c : ℕplus hdvdb : ∃ c, b = hpo * c hdvdc : ∃ c_1, c = b * c_1 ⊢ hpo ∣ c
case left hpo b c : ℕplus hdvdb : ∃ c, b = hpo * c hdvdc : ∃ c_1, c = b * c_1 ⊢ ∃ c_1, c = hpo * c_1
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
r3_partial_order
[362, 1]
[398, 13]
rcases hdvdb with ⟨k, hk⟩
case left hpo b c : ℕplus hdvdb : ∃ c, b = hpo * c hdvdc : ∃ c_1, c = b * c_1 ⊢ ∃ c_1, c = hpo * c_1
case left.intro hpo b c : ℕplus hdvdc : ∃ c_1, c = b * c_1 k : ℕplus hk : b = hpo * k ⊢ ∃ c_1, c = hpo * c_1
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
r3_partial_order
[362, 1]
[398, 13]
rcases hdvdc with ⟨l, hl⟩
case left.intro hpo b c : ℕplus hdvdc : ∃ c_1, c = b * c_1 k : ℕplus hk : b = hpo * k ⊢ ∃ c_1, c = hpo * c_1
case left.intro.intro hpo b c k : ℕplus hk : b = hpo * k l : ℕplus hl : c = b * l ⊢ ∃ c_1, c = hpo * c_1
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
r3_partial_order
[362, 1]
[398, 13]
rw [Subtype.ext_iff] at hk
case left.intro.intro hpo b c k : ℕplus hk : b = hpo * k l : ℕplus hl : c = b * l ⊢ ∃ c_1, c = hpo * c_1
case left.intro.intro hpo b c k : ℕplus hk : ↑b = ↑(hpo * k) l : ℕplus hl : c = b * l ⊢ ∃ c_1, c = hpo * c_1
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
r3_partial_order
[362, 1]
[398, 13]
rw [Subtype.ext_iff] at hl
case left.intro.intro hpo b c k : ℕplus hk : ↑b = ↑(hpo * k) l : ℕplus hl : c = b * l ⊢ ∃ c_1, c = hpo * c_1
case left.intro.intro hpo b c k : ℕplus hk : ↑b = ↑(hpo * k) l : ℕplus hl : ↑c = ↑(b * l) ⊢ ∃ c_1, c = hpo * c_1
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
r3_partial_order
[362, 1]
[398, 13]
use (k * l)
case left.intro.intro hpo b c k : ℕplus hk : ↑b = ↑(hpo * k) l : ℕplus hl : ↑c = ↑(b * l) ⊢ ∃ c_1, c = hpo * c_1
case h hpo b c k : ℕplus hk : ↑b = ↑(hpo * k) l : ℕplus hl : ↑c = ↑(b * l) ⊢ c = hpo * (k * l)
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
r3_partial_order
[362, 1]
[398, 13]
rw [Subtype.ext_iff]
case h hpo b c k : ℕplus hk : ↑b = ↑(hpo * k) l : ℕplus hl : ↑c = ↑(b * l) ⊢ c = hpo * (k * l)
case h hpo b c k : ℕplus hk : ↑b = ↑(hpo * k) l : ℕplus hl : ↑c = ↑(b * l) ⊢ ↑c = ↑(hpo * (k * l))
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
r3_partial_order
[362, 1]
[398, 13]
simp_rw [hl, ℕplus.mul_def]
case h hpo b c k : ℕplus hk : ↑b = ↑(hpo * k) l : ℕplus hl : ↑c = ↑(b * l) ⊢ ↑c = ↑(hpo * (k * l))
case h hpo b c k : ℕplus hk : ↑b = ↑(hpo * k) l : ℕplus hl : ↑c = ↑(b * l) ⊢ ↑b * ↑l = ↑hpo * (↑k * ↑l)
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
r3_partial_order
[362, 1]
[398, 13]
simp_rw [hk, ℕplus.mul_def]
case h hpo b c k : ℕplus hk : ↑b = ↑(hpo * k) l : ℕplus hl : ↑c = ↑(b * l) ⊢ ↑b * ↑l = ↑hpo * (↑k * ↑l)
case h hpo b c k : ℕplus hk : ↑b = ↑(hpo * k) l : ℕplus hl : ↑c = ↑(b * l) ⊢ ↑hpo * ↑k * ↑l = ↑hpo * (↑k * ↑l)
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
r3_partial_order
[362, 1]
[398, 13]
exact Nat.mul_assoc hpo.val k.val l.val
case h hpo b c k : ℕplus hk : ↑b = ↑(hpo * k) l : ℕplus hl : ↑c = ↑(b * l) ⊢ ↑hpo * ↑k * ↑l = ↑hpo * (↑k * ↑l)
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
r3_partial_order
[362, 1]
[398, 13]
intro hdvdb hdvdhpo
case right hpo b c : ℕplus ⊢ hpo ∣ b → b ∣ hpo → hpo = b
case right hpo b c : ℕplus hdvdb : hpo ∣ b hdvdhpo : b ∣ hpo ⊢ hpo = b
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
r3_partial_order
[362, 1]
[398, 13]
rw [dvd_def] at hdvdb
case right hpo b c : ℕplus hdvdb : hpo ∣ b hdvdhpo : b ∣ hpo ⊢ hpo = b
case right hpo b c : ℕplus hdvdb : ∃ c, b = hpo * c hdvdhpo : b ∣ hpo ⊢ hpo = b
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
r3_partial_order
[362, 1]
[398, 13]
rw [dvd_def] at hdvdhpo
case right hpo b c : ℕplus hdvdb : ∃ c, b = hpo * c hdvdhpo : b ∣ hpo ⊢ hpo = b
case right hpo b c : ℕplus hdvdb : ∃ c, b = hpo * c hdvdhpo : ∃ c, hpo = b * c ⊢ hpo = b
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
r3_partial_order
[362, 1]
[398, 13]
rcases hdvdb with ⟨k, hk⟩
case right hpo b c : ℕplus hdvdb : ∃ c, b = hpo * c hdvdhpo : ∃ c, hpo = b * c ⊢ hpo = b
case right.intro hpo b c : ℕplus hdvdhpo : ∃ c, hpo = b * c k : ℕplus hk : b = hpo * k ⊢ hpo = b
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
r3_partial_order
[362, 1]
[398, 13]
rcases hdvdhpo with ⟨l, hl⟩
case right.intro hpo b c : ℕplus hdvdhpo : ∃ c, hpo = b * c k : ℕplus hk : b = hpo * k ⊢ hpo = b
case right.intro.intro hpo b c k : ℕplus hk : b = hpo * k l : ℕplus hl : hpo = b * l ⊢ hpo = b
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
r3_partial_order
[362, 1]
[398, 13]
rw [Subtype.ext_iff, ℕplus.mul_def] at hk
case right.intro.intro hpo b c k : ℕplus hk : b = hpo * k l : ℕplus hl : hpo = b * l ⊢ hpo = b
case right.intro.intro hpo b c k : ℕplus hk : ↑b = ↑{ val := ↑hpo * ↑k, property := (_ : ↑hpo * ↑k ≠ 0) } l : ℕplus hl : hpo = b * l ⊢ hpo = b
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
r3_partial_order
[362, 1]
[398, 13]
simp at hk
case right.intro.intro hpo b c k : ℕplus hk : ↑b = ↑{ val := ↑hpo * ↑k, property := (_ : ↑hpo * ↑k ≠ 0) } l : ℕplus hl : hpo = b * l ⊢ hpo = b
case right.intro.intro hpo b c k : ℕplus hk : ↑b = ↑hpo * ↑k l : ℕplus hl : hpo = b * l ⊢ hpo = b