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/ex4.lean
two_pow_three_pow_unique_factorization'
[295, 1]
[327, 21]
simp at h3
case intro m n q p : ℕ h₁ : p ≤ m h₂ : q ≤ n hdvd3 : 3 ^ q ∣ 2 ^ m * 3 ^ n hdvd2 : 2 ^ p ∣ 2 ^ m * 3 ^ (n - q) h2 : m ≤ p heq₁ : m = p h3 : n - q = Nat.log 3 1 ⊢ m = p ∧ n = q
case intro m n q p : ℕ h₁ : p ≤ m h₂ : q ≤ n hdvd3 : 3 ^ q ∣ 2 ^ m * 3 ^ n hdvd2 : 2 ^ p ∣ 2 ^ m * 3 ^ (n - q) h2 : m ≤ p heq₁ : m = p h3 : n ≤ q ⊢ m = p ∧ n = q
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
two_pow_three_pow_unique_factorization'
[295, 1]
[327, 21]
have heq₂ : n = q := by linarith
case intro m n q p : ℕ h₁ : p ≤ m h₂ : q ≤ n hdvd3 : 3 ^ q ∣ 2 ^ m * 3 ^ n hdvd2 : 2 ^ p ∣ 2 ^ m * 3 ^ (n - q) h2 : m ≤ p heq₁ : m = p h3 : n ≤ q ⊢ m = p ∧ n = q
case intro m n q p : ℕ h₁ : p ≤ m h₂ : q ≤ n hdvd3 : 3 ^ q ∣ 2 ^ m * 3 ^ n hdvd2 : 2 ^ p ∣ 2 ^ m * 3 ^ (n - q) h2 : m ≤ p heq₁ : m = p h3 : n ≤ q heq₂ : n = q ⊢ m = p ∧ n = q
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
two_pow_three_pow_unique_factorization'
[295, 1]
[327, 21]
exact ⟨heq₁, heq₂⟩
case intro m n q p : ℕ h₁ : p ≤ m h₂ : q ≤ n hdvd3 : 3 ^ q ∣ 2 ^ m * 3 ^ n hdvd2 : 2 ^ p ∣ 2 ^ m * 3 ^ (n - q) h2 : m ≤ p heq₁ : m = p h3 : n ≤ q heq₂ : n = q ⊢ m = p ∧ n = q
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
two_pow_three_pow_unique_factorization'
[295, 1]
[327, 21]
exact dvd_mul_of_dvd_right (pow_dvd_pow 3 h₂) (2 ^ m)
m n q p : ℕ h₁ : p ≤ m h₂ : q ≤ n hfac : 2 ^ m * 3 ^ n = 2 ^ p * 3 ^ q ⊢ 3 ^ q ∣ 2 ^ m * 3 ^ n
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
two_pow_three_pow_unique_factorization'
[295, 1]
[327, 21]
simp
m n q p : ℕ h₁ : p ≤ m h₂ : q ≤ n hfac : 2 ^ m * 3 ^ n = 2 ^ p * 3 ^ q hdvd3 : 3 ^ q ∣ 2 ^ m * 3 ^ n ⊢ 0 < 3 ^ q
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
two_pow_three_pow_unique_factorization'
[295, 1]
[327, 21]
rw [pow_dvd_pow_iff (by simp) (by simp)]
m n q p : ℕ h₁ : p ≤ m h₂ : q ≤ n hfac : 2 ^ m * 3 ^ n / 3 ^ q = 2 ^ p hdvd3 : 3 ^ q ∣ 2 ^ m * 3 ^ n ⊢ 3 ^ q ∣ 3 ^ n
m n q p : ℕ h₁ : p ≤ m h₂ : q ≤ n hfac : 2 ^ m * 3 ^ n / 3 ^ q = 2 ^ p hdvd3 : 3 ^ q ∣ 2 ^ m * 3 ^ n ⊢ q ≤ n
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
two_pow_three_pow_unique_factorization'
[295, 1]
[327, 21]
exact h₂
m n q p : ℕ h₁ : p ≤ m h₂ : q ≤ n hfac : 2 ^ m * 3 ^ n / 3 ^ q = 2 ^ p hdvd3 : 3 ^ q ∣ 2 ^ m * 3 ^ n ⊢ q ≤ n
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
two_pow_three_pow_unique_factorization'
[295, 1]
[327, 21]
simp
m n q p : ℕ h₁ : p ≤ m h₂ : q ≤ n hfac : 2 ^ m * 3 ^ n / 3 ^ q = 2 ^ p hdvd3 : 3 ^ q ∣ 2 ^ m * 3 ^ n ⊢ 3 ≠ 0
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
two_pow_three_pow_unique_factorization'
[295, 1]
[327, 21]
simp
m n q p : ℕ h₁ : p ≤ m h₂ : q ≤ n hfac : 2 ^ m * 3 ^ n / 3 ^ q = 2 ^ p hdvd3 : 3 ^ q ∣ 2 ^ m * 3 ^ n ⊢ ¬IsUnit 3
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
two_pow_three_pow_unique_factorization'
[295, 1]
[327, 21]
simp
m n q p : ℕ h₁ : p ≤ m h₂ : q ≤ n hfac : 2 ^ m * (3 ^ n / 3 ^ q) = 2 ^ p hdvd3 : 3 ^ q ∣ 2 ^ m * 3 ^ n ⊢ 0 < 3
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
two_pow_three_pow_unique_factorization'
[295, 1]
[327, 21]
exact dvd_mul_of_dvd_right (pow_dvd_pow 2 h₁) (3 ^ (n - q))
m n q p : ℕ h₁ : p ≤ m h₂ : q ≤ n hfac : 3 ^ (n - q) * 2 ^ m = 1 * 2 ^ p hdvd3 : 3 ^ q ∣ 2 ^ m * 3 ^ n ⊢ 2 ^ p ∣ 3 ^ (n - q) * 2 ^ m
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
two_pow_three_pow_unique_factorization'
[295, 1]
[327, 21]
simp
m n q p : ℕ h₁ : p ≤ m h₂ : q ≤ n hfac : 3 ^ (n - q) * 2 ^ m = 1 * 2 ^ p hdvd3 : 3 ^ q ∣ 2 ^ m * 3 ^ n hdvd2 : 2 ^ p ∣ 3 ^ (n - q) * 2 ^ m ⊢ 0 < 2 ^ p
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
two_pow_three_pow_unique_factorization'
[295, 1]
[327, 21]
rw [pow_dvd_pow_iff (by simp) (by simp)]
m n q p : ℕ h₁ : p ≤ m h₂ : q ≤ n hfac : 3 ^ (n - q) * 2 ^ m / 2 ^ p = 1 hdvd3 : 3 ^ q ∣ 2 ^ m * 3 ^ n hdvd2 : 2 ^ p ∣ 3 ^ (n - q) * 2 ^ m ⊢ 2 ^ p ∣ 2 ^ m
m n q p : ℕ h₁ : p ≤ m h₂ : q ≤ n hfac : 3 ^ (n - q) * 2 ^ m / 2 ^ p = 1 hdvd3 : 3 ^ q ∣ 2 ^ m * 3 ^ n hdvd2 : 2 ^ p ∣ 3 ^ (n - q) * 2 ^ m ⊢ p ≤ m
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
two_pow_three_pow_unique_factorization'
[295, 1]
[327, 21]
exact h₁
m n q p : ℕ h₁ : p ≤ m h₂ : q ≤ n hfac : 3 ^ (n - q) * 2 ^ m / 2 ^ p = 1 hdvd3 : 3 ^ q ∣ 2 ^ m * 3 ^ n hdvd2 : 2 ^ p ∣ 3 ^ (n - q) * 2 ^ m ⊢ p ≤ m
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
two_pow_three_pow_unique_factorization'
[295, 1]
[327, 21]
simp
m n q p : ℕ h₁ : p ≤ m h₂ : q ≤ n hfac : 3 ^ (n - q) * 2 ^ m / 2 ^ p = 1 hdvd3 : 3 ^ q ∣ 2 ^ m * 3 ^ n hdvd2 : 2 ^ p ∣ 3 ^ (n - q) * 2 ^ m ⊢ 2 ≠ 0
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
two_pow_three_pow_unique_factorization'
[295, 1]
[327, 21]
simp
m n q p : ℕ h₁ : p ≤ m h₂ : q ≤ n hfac : 3 ^ (n - q) * 2 ^ m / 2 ^ p = 1 hdvd3 : 3 ^ q ∣ 2 ^ m * 3 ^ n hdvd2 : 2 ^ p ∣ 3 ^ (n - q) * 2 ^ m ⊢ ¬IsUnit 2
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
two_pow_three_pow_unique_factorization'
[295, 1]
[327, 21]
simp
m n q p : ℕ h₁ : p ≤ m h₂ : q ≤ n hfac : 3 ^ (n - q) * (2 ^ m / 2 ^ p) = 1 hdvd3 : 3 ^ q ∣ 2 ^ m * 3 ^ n hdvd2 : 2 ^ p ∣ 3 ^ (n - q) * 2 ^ m ⊢ 0 < 2
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
two_pow_three_pow_unique_factorization'
[295, 1]
[327, 21]
simp
m n q p : ℕ h₁ : p ≤ m h₂ : q ≤ n hdvd3 : 3 ^ q ∣ 2 ^ m * 3 ^ n h3 : 3 ^ (n - q) = 1 hdvd2 : 2 ^ p ∣ 2 ^ m * 3 ^ (n - q) h2 : Nat.log 2 (2 ^ (m - p)) = Nat.log 2 1 ⊢ 1 < 2
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
two_pow_three_pow_unique_factorization'
[295, 1]
[327, 21]
linarith
m n q p : ℕ h₁ : p ≤ m h₂ : q ≤ n hdvd3 : 3 ^ q ∣ 2 ^ m * 3 ^ n h3 : 3 ^ (n - q) = 1 hdvd2 : 2 ^ p ∣ 2 ^ m * 3 ^ (n - q) h2 : m ≤ p ⊢ m = p
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
two_pow_three_pow_unique_factorization'
[295, 1]
[327, 21]
simp
m n q p : ℕ h₁ : p ≤ m h₂ : q ≤ n hdvd3 : 3 ^ q ∣ 2 ^ m * 3 ^ n hdvd2 : 2 ^ p ∣ 2 ^ m * 3 ^ (n - q) h2 : m ≤ p heq₁ : m = p h3 : Nat.log 3 (3 ^ (n - q)) = Nat.log 3 1 ⊢ 1 < 3
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
two_pow_three_pow_unique_factorization'
[295, 1]
[327, 21]
linarith
m n q p : ℕ h₁ : p ≤ m h₂ : q ≤ n hdvd3 : 3 ^ q ∣ 2 ^ m * 3 ^ n hdvd2 : 2 ^ p ∣ 2 ^ m * 3 ^ (n - q) h2 : m ≤ p heq₁ : m = p h3 : n ≤ q ⊢ n = q
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
two_pow_three_pow_unique_factorization
[329, 1]
[345, 23]
apply_fun Nat.factorization at h
m n q p : ℕ h : 2 ^ m * 3 ^ n = 2 ^ p * 3 ^ q ⊢ m = p ∧ n = q
m n q p : ℕ h : Nat.factorization (2 ^ m * 3 ^ n) = Nat.factorization (2 ^ p * 3 ^ q) ⊢ m = p ∧ n = q
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
two_pow_three_pow_unique_factorization
[329, 1]
[345, 23]
rw [Nat.factorization_mul, Nat.factorization_mul] at h
m n q p : ℕ h : Nat.factorization (2 ^ m * 3 ^ n) = Nat.factorization (2 ^ p * 3 ^ q) ⊢ m = p ∧ n = q
m n q p : ℕ h : Nat.factorization (2 ^ m) + Nat.factorization (3 ^ n) = Nat.factorization (2 ^ p) + Nat.factorization (3 ^ q) ⊢ m = p ∧ n = q case ha m n q p : ℕ h : Nat.factorization (2 ^ m) + Nat.factorization (3 ^ n) = Nat.factorization (2 ^ p * 3 ^ q) ⊢ 2 ^ p ≠ 0 case hb m n q p : ℕ h : Nat.factorization (2 ^ m) + Nat.factorization (3 ^ n) = Nat.factorization (2 ^ p * 3 ^ q) ⊢ 3 ^ q ≠ 0 case ha m n q p : ℕ h : Nat.factorization (2 ^ m * 3 ^ n) = Nat.factorization (2 ^ p * 3 ^ q) ⊢ 2 ^ m ≠ 0 case hb m n q p : ℕ h : Nat.factorization (2 ^ m * 3 ^ n) = Nat.factorization (2 ^ p * 3 ^ q) ⊢ 3 ^ n ≠ 0
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
two_pow_three_pow_unique_factorization
[329, 1]
[345, 23]
all_goals positivity
case ha m n q p : ℕ h : Nat.factorization (2 ^ m) + Nat.factorization (3 ^ n) = Nat.factorization (2 ^ p * 3 ^ q) ⊢ 2 ^ p ≠ 0 case hb m n q p : ℕ h : Nat.factorization (2 ^ m) + Nat.factorization (3 ^ n) = Nat.factorization (2 ^ p * 3 ^ q) ⊢ 3 ^ q ≠ 0 case ha m n q p : ℕ h : Nat.factorization (2 ^ m * 3 ^ n) = Nat.factorization (2 ^ p * 3 ^ q) ⊢ 2 ^ m ≠ 0 case hb m n q p : ℕ h : Nat.factorization (2 ^ m * 3 ^ n) = Nat.factorization (2 ^ p * 3 ^ q) ⊢ 3 ^ n ≠ 0
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
two_pow_three_pow_unique_factorization
[329, 1]
[345, 23]
simp_rw [Nat.factorization_pow] at h
m n q p : ℕ h : Nat.factorization (2 ^ m) + Nat.factorization (3 ^ n) = Nat.factorization (2 ^ p) + Nat.factorization (3 ^ q) ⊢ m = p ∧ n = q
m n q p : ℕ h : m • Nat.factorization 2 + n • Nat.factorization 3 = p • Nat.factorization 2 + q • Nat.factorization 3 ⊢ m = p ∧ n = q
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
two_pow_three_pow_unique_factorization
[329, 1]
[345, 23]
constructor
m n q p : ℕ h : m • Nat.factorization 2 + n • Nat.factorization 3 = p • Nat.factorization 2 + q • Nat.factorization 3 ⊢ m = p ∧ n = q
case left m n q p : ℕ h : m • Nat.factorization 2 + n • Nat.factorization 3 = p • Nat.factorization 2 + q • Nat.factorization 3 ⊢ m = p case right m n q p : ℕ h : m • Nat.factorization 2 + n • Nat.factorization 3 = p • Nat.factorization 2 + q • Nat.factorization 3 ⊢ n = q
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
two_pow_three_pow_unique_factorization
[329, 1]
[345, 23]
replace h := FunLike.congr_fun h 2
case left m n q p : ℕ h : m • Nat.factorization 2 + n • Nat.factorization 3 = p • Nat.factorization 2 + q • Nat.factorization 3 ⊢ m = p
case left m n q p : ℕ h : ↑(m • Nat.factorization 2 + n • Nat.factorization 3) 2 = ↑(p • Nat.factorization 2 + q • Nat.factorization 3) 2 ⊢ m = p
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
two_pow_three_pow_unique_factorization
[329, 1]
[345, 23]
have : ¬ 2 ∣ 3 := by norm_num
case left m n q p : ℕ h : ↑(m • Nat.factorization 2 + n • Nat.factorization 3) 2 = ↑(p • Nat.factorization 2 + q • Nat.factorization 3) 2 ⊢ m = p
case left m n q p : ℕ h : ↑(m • Nat.factorization 2 + n • Nat.factorization 3) 2 = ↑(p • Nat.factorization 2 + q • Nat.factorization 3) 2 this : ¬2 ∣ 3 ⊢ m = p
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
two_pow_three_pow_unique_factorization
[329, 1]
[345, 23]
simp_rw [Finsupp.add_apply, Finsupp.smul_apply, Nat.prime_two.factorization_self, nsmul_one, Nat.factorization_eq_zero_of_not_dvd this, smul_zero, add_zero] at h
case left m n q p : ℕ h : ↑(m • Nat.factorization 2 + n • Nat.factorization 3) 2 = ↑(p • Nat.factorization 2 + q • Nat.factorization 3) 2 this : ¬2 ∣ 3 ⊢ m = p
case left m n q p : ℕ this : ¬2 ∣ 3 h : ↑m = ↑p ⊢ m = p
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
two_pow_three_pow_unique_factorization
[329, 1]
[345, 23]
exact h
case left m n q p : ℕ this : ¬2 ∣ 3 h : ↑m = ↑p ⊢ m = p
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
two_pow_three_pow_unique_factorization
[329, 1]
[345, 23]
norm_num
m n q p : ℕ h : ↑(m • Nat.factorization 2 + n • Nat.factorization 3) 2 = ↑(p • Nat.factorization 2 + q • Nat.factorization 3) 2 ⊢ ¬2 ∣ 3
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
two_pow_three_pow_unique_factorization
[329, 1]
[345, 23]
replace h := FunLike.congr_fun h 3
case right m n q p : ℕ h : m • Nat.factorization 2 + n • Nat.factorization 3 = p • Nat.factorization 2 + q • Nat.factorization 3 ⊢ n = q
case right m n q p : ℕ h : ↑(m • Nat.factorization 2 + n • Nat.factorization 3) 3 = ↑(p • Nat.factorization 2 + q • Nat.factorization 3) 3 ⊢ n = q
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
two_pow_three_pow_unique_factorization
[329, 1]
[345, 23]
have : ¬ 3 ∣ 2 := Nat.not_dvd_of_pos_of_lt (by simp) (by simp)
case right m n q p : ℕ h : ↑(m • Nat.factorization 2 + n • Nat.factorization 3) 3 = ↑(p • Nat.factorization 2 + q • Nat.factorization 3) 3 ⊢ n = q
case right m n q p : ℕ h : ↑(m • Nat.factorization 2 + n • Nat.factorization 3) 3 = ↑(p • Nat.factorization 2 + q • Nat.factorization 3) 3 this : ¬3 ∣ 2 ⊢ n = q
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
two_pow_three_pow_unique_factorization
[329, 1]
[345, 23]
simp_rw [Finsupp.add_apply, Finsupp.smul_apply, Nat.prime_three.factorization_self, nsmul_one, Nat.factorization_eq_zero_of_not_dvd this, smul_zero, zero_add] at h
case right m n q p : ℕ h : ↑(m • Nat.factorization 2 + n • Nat.factorization 3) 3 = ↑(p • Nat.factorization 2 + q • Nat.factorization 3) 3 this : ¬3 ∣ 2 ⊢ n = q
case right m n q p : ℕ this : ¬3 ∣ 2 h : ↑n = ↑q ⊢ n = q
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
two_pow_three_pow_unique_factorization
[329, 1]
[345, 23]
exact h
case right m n q p : ℕ this : ¬3 ∣ 2 h : ↑n = ↑q ⊢ n = q
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
two_pow_three_pow_unique_factorization
[329, 1]
[345, 23]
simp
m n q p : ℕ h : ↑(m • Nat.factorization 2 + n • Nat.factorization 3) 3 = ↑(p • Nat.factorization 2 + q • Nat.factorization 3) 3 ⊢ 0 < 2
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
two_pow_three_pow_unique_factorization
[329, 1]
[345, 23]
simp
m n q p : ℕ h : ↑(m • Nat.factorization 2 + n • Nat.factorization 3) 3 = ↑(p • Nat.factorization 2 + q • Nat.factorization 3) 3 ⊢ 2 < 3
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
two_pow_three_pow_unique_factorization
[329, 1]
[345, 23]
positivity
case hb m n q p : ℕ h : Nat.factorization (2 ^ m * 3 ^ n) = Nat.factorization (2 ^ p * 3 ^ q) ⊢ 3 ^ n ≠ 0
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
countably_infinite
[347, 1]
[370, 10]
constructor
⊢ Set.Infinite A ∧ Set.Countable A
case left ⊢ Set.Infinite A case right ⊢ Set.Countable A
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
countably_infinite
[347, 1]
[370, 10]
let f (n : ℕ) : ℕ × ℕ := (n, n + 1)
case left ⊢ Set.Infinite A
case left f : ℕ → ℕ × ℕ := fun n => (n, n + 1) ⊢ Set.Infinite A
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
countably_infinite
[347, 1]
[370, 10]
have inj_f : Function.Injective f := by intros a b heq simp only [f] at heq simp only [Prod.mk.inj_iff] at heq exact heq.1
case left f : ℕ → ℕ × ℕ := fun n => (n, n + 1) ⊢ Set.Infinite A
case left f : ℕ → ℕ × ℕ := fun n => (n, n + 1) inj_f : Function.Injective f ⊢ Set.Infinite A
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
countably_infinite
[347, 1]
[370, 10]
have hf : ∀ (x : ℕ), f x ∈ A := by intro x simp only [A, f] simp only [Set.mem_setOf_eq, le_add_iff_nonneg_right, zero_le]
case left f : ℕ → ℕ × ℕ := fun n => (n, n + 1) inj_f : Function.Injective f ⊢ Set.Infinite A
case left f : ℕ → ℕ × ℕ := fun n => (n, n + 1) inj_f : Function.Injective f hf : ∀ (x : ℕ), f x ∈ A ⊢ Set.Infinite A
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
countably_infinite
[347, 1]
[370, 10]
exact Set.infinite_of_injective_forall_mem inj_f hf
case left f : ℕ → ℕ × ℕ := fun n => (n, n + 1) inj_f : Function.Injective f hf : ∀ (x : ℕ), f x ∈ A ⊢ Set.Infinite A
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
countably_infinite
[347, 1]
[370, 10]
intros a b heq
f : ℕ → ℕ × ℕ := fun n => (n, n + 1) ⊢ Function.Injective f
f : ℕ → ℕ × ℕ := fun n => (n, n + 1) a b : ℕ heq : f a = f b ⊢ a = b
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
countably_infinite
[347, 1]
[370, 10]
simp only [f] at heq
f : ℕ → ℕ × ℕ := fun n => (n, n + 1) a b : ℕ heq : f a = f b ⊢ a = b
f : ℕ → ℕ × ℕ := fun n => (n, n + 1) a b : ℕ heq : (a, a + 1) = (b, b + 1) ⊢ a = b
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
countably_infinite
[347, 1]
[370, 10]
simp only [Prod.mk.inj_iff] at heq
f : ℕ → ℕ × ℕ := fun n => (n, n + 1) a b : ℕ heq : (a, a + 1) = (b, b + 1) ⊢ a = b
f : ℕ → ℕ × ℕ := fun n => (n, n + 1) a b : ℕ heq : a = b ∧ a + 1 = b + 1 ⊢ a = b
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
countably_infinite
[347, 1]
[370, 10]
exact heq.1
f : ℕ → ℕ × ℕ := fun n => (n, n + 1) a b : ℕ heq : a = b ∧ a + 1 = b + 1 ⊢ a = b
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
countably_infinite
[347, 1]
[370, 10]
intro x
f : ℕ → ℕ × ℕ := fun n => (n, n + 1) inj_f : Function.Injective f ⊢ ∀ (x : ℕ), f x ∈ A
f : ℕ → ℕ × ℕ := fun n => (n, n + 1) inj_f : Function.Injective f x : ℕ ⊢ f x ∈ A
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
countably_infinite
[347, 1]
[370, 10]
simp only [A, f]
f : ℕ → ℕ × ℕ := fun n => (n, n + 1) inj_f : Function.Injective f x : ℕ ⊢ f x ∈ A
f : ℕ → ℕ × ℕ := fun n => (n, n + 1) inj_f : Function.Injective f x : ℕ ⊢ (x, x + 1) ∈ {p | p.1 ≤ p.2}
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
countably_infinite
[347, 1]
[370, 10]
simp only [Set.mem_setOf_eq, le_add_iff_nonneg_right, zero_le]
f : ℕ → ℕ × ℕ := fun n => (n, n + 1) inj_f : Function.Injective f x : ℕ ⊢ (x, x + 1) ∈ {p | p.1 ≤ p.2}
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
countably_infinite
[347, 1]
[370, 10]
rw [Set.countable_iff_exists_injective]
case right ⊢ Set.Countable A
case right ⊢ ∃ f, Function.Injective f
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
countably_infinite
[347, 1]
[370, 10]
let f (n : A) : ℕ := 2^n.val.1 * 3^n.val.2
case right ⊢ ∃ f, Function.Injective f
case right f : ↑A → ℕ := fun n => 2 ^ (↑n).1 * 3 ^ (↑n).2 ⊢ ∃ f, Function.Injective f
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
countably_infinite
[347, 1]
[370, 10]
have inj_f : Function.Injective f := by intros a b heq simp only [f] at heq have unique_fac := two_pow_three_pow_unique_factorization heq rw [←Prod.eq_iff_fst_eq_snd_eq] at unique_fac exact SetCoe.ext unique_fac
case right f : ↑A → ℕ := fun n => 2 ^ (↑n).1 * 3 ^ (↑n).2 ⊢ ∃ f, Function.Injective f
case right f : ↑A → ℕ := fun n => 2 ^ (↑n).1 * 3 ^ (↑n).2 inj_f : Function.Injective f ⊢ ∃ f, Function.Injective f
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
countably_infinite
[347, 1]
[370, 10]
use f
case right f : ↑A → ℕ := fun n => 2 ^ (↑n).1 * 3 ^ (↑n).2 inj_f : Function.Injective f ⊢ ∃ f, Function.Injective f
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
countably_infinite
[347, 1]
[370, 10]
intros a b heq
f : ↑A → ℕ := fun n => 2 ^ (↑n).1 * 3 ^ (↑n).2 ⊢ Function.Injective f
f : ↑A → ℕ := fun n => 2 ^ (↑n).1 * 3 ^ (↑n).2 a b : ↑A heq : f a = f b ⊢ a = b
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
countably_infinite
[347, 1]
[370, 10]
simp only [f] at heq
f : ↑A → ℕ := fun n => 2 ^ (↑n).1 * 3 ^ (↑n).2 a b : ↑A heq : f a = f b ⊢ a = b
f : ↑A → ℕ := fun n => 2 ^ (↑n).1 * 3 ^ (↑n).2 a b : ↑A heq : 2 ^ (↑a).1 * 3 ^ (↑a).2 = 2 ^ (↑b).1 * 3 ^ (↑b).2 ⊢ a = b
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
countably_infinite
[347, 1]
[370, 10]
have unique_fac := two_pow_three_pow_unique_factorization heq
f : ↑A → ℕ := fun n => 2 ^ (↑n).1 * 3 ^ (↑n).2 a b : ↑A heq : 2 ^ (↑a).1 * 3 ^ (↑a).2 = 2 ^ (↑b).1 * 3 ^ (↑b).2 ⊢ a = b
f : ↑A → ℕ := fun n => 2 ^ (↑n).1 * 3 ^ (↑n).2 a b : ↑A heq : 2 ^ (↑a).1 * 3 ^ (↑a).2 = 2 ^ (↑b).1 * 3 ^ (↑b).2 unique_fac : (↑a).1 = (↑b).1 ∧ (↑a).2 = (↑b).2 ⊢ a = b
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
countably_infinite
[347, 1]
[370, 10]
rw [←Prod.eq_iff_fst_eq_snd_eq] at unique_fac
f : ↑A → ℕ := fun n => 2 ^ (↑n).1 * 3 ^ (↑n).2 a b : ↑A heq : 2 ^ (↑a).1 * 3 ^ (↑a).2 = 2 ^ (↑b).1 * 3 ^ (↑b).2 unique_fac : (↑a).1 = (↑b).1 ∧ (↑a).2 = (↑b).2 ⊢ a = b
f : ↑A → ℕ := fun n => 2 ^ (↑n).1 * 3 ^ (↑n).2 a b : ↑A heq : 2 ^ (↑a).1 * 3 ^ (↑a).2 = 2 ^ (↑b).1 * 3 ^ (↑b).2 unique_fac : ↑a = ↑b ⊢ a = b
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
countably_infinite
[347, 1]
[370, 10]
exact SetCoe.ext unique_fac
f : ↑A → ℕ := fun n => 2 ^ (↑n).1 * 3 ^ (↑n).2 a b : ↑A heq : 2 ^ (↑a).1 * 3 ^ (↑a).2 = 2 ^ (↑b).1 * 3 ^ (↑b).2 unique_fac : ↑a = ↑b ⊢ a = b
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
iterate_monotone_eq_zero
[381, 1]
[397, 12]
intro eq
α : Type inst✝ : Preorder α f : α → α x : α n : ℕ hper : Function.periodicPts f = ∅ ⊢ f^[n] x = x → n = 0
α : Type inst✝ : Preorder α f : α → α x : α n : ℕ hper : Function.periodicPts f = ∅ eq : f^[n] x = x ⊢ n = 0
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
iterate_monotone_eq_zero
[381, 1]
[397, 12]
simp_rw [Function.periodicPts, Function.IsPeriodicPt, Function.IsFixedPt] at hper
α : Type inst✝ : Preorder α f : α → α x : α n : ℕ hper : Function.periodicPts f = ∅ eq : f^[n] x = x ⊢ n = 0
α : Type inst✝ : Preorder α f : α → α x : α n : ℕ hper : {x | ∃ n > 0, f^[n] x = x} = ∅ eq : f^[n] x = x ⊢ n = 0
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
iterate_monotone_eq_zero
[381, 1]
[397, 12]
rw [Set.ext_iff] at hper
α : Type inst✝ : Preorder α f : α → α x : α n : ℕ hper : {x | ∃ n > 0, f^[n] x = x} = ∅ eq : f^[n] x = x ⊢ n = 0
α : Type inst✝ : Preorder α f : α → α x : α n : ℕ hper : ∀ (x : α), x ∈ {x | ∃ n > 0, f^[n] x = x} ↔ x ∈ ∅ eq : f^[n] x = x ⊢ n = 0
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
iterate_monotone_eq_zero
[381, 1]
[397, 12]
simp at hper
α : Type inst✝ : Preorder α f : α → α x : α n : ℕ hper : ∀ (x : α), x ∈ {x | ∃ n > 0, f^[n] x = x} ↔ x ∈ ∅ eq : f^[n] x = x ⊢ n = 0
α : Type inst✝ : Preorder α f : α → α x : α n : ℕ eq : f^[n] x = x hper : ∀ (x : α) (x_1 : ℕ), 0 < x_1 → ¬f^[x_1] x = x ⊢ n = 0
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
iterate_monotone_eq_zero
[381, 1]
[397, 12]
specialize hper x
α : Type inst✝ : Preorder α f : α → α x : α n : ℕ eq : f^[n] x = x hper : ∀ (x : α) (x_1 : ℕ), 0 < x_1 → ¬f^[x_1] x = x ⊢ n = 0
α : Type inst✝ : Preorder α f : α → α x : α n : ℕ eq : f^[n] x = x hper : ∀ (x_1 : ℕ), 0 < x_1 → ¬f^[x_1] x = x ⊢ n = 0
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
iterate_monotone_eq_zero
[381, 1]
[397, 12]
specialize hper n
α : Type inst✝ : Preorder α f : α → α x : α n : ℕ eq : f^[n] x = x hper : ∀ (x_1 : ℕ), 0 < x_1 → ¬f^[x_1] x = x ⊢ n = 0
α : Type inst✝ : Preorder α f : α → α x : α n : ℕ eq : f^[n] x = x hper : 0 < n → ¬f^[n] x = x ⊢ n = 0
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
iterate_monotone_eq_zero
[381, 1]
[397, 12]
by_cases h : 0 < n
α : Type inst✝ : Preorder α f : α → α x : α n : ℕ eq : f^[n] x = x hper : 0 < n → ¬f^[n] x = x ⊢ n = 0
case pos α : Type inst✝ : Preorder α f : α → α x : α n : ℕ eq : f^[n] x = x hper : 0 < n → ¬f^[n] x = x h : 0 < n ⊢ n = 0 case neg α : Type inst✝ : Preorder α f : α → α x : α n : ℕ eq : f^[n] x = x hper : 0 < n → ¬f^[n] x = x h : ¬0 < n ⊢ n = 0
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
iterate_monotone_eq_zero
[381, 1]
[397, 12]
exact absurd eq (hper h)
case pos α : Type inst✝ : Preorder α f : α → α x : α n : ℕ eq : f^[n] x = x hper : 0 < n → ¬f^[n] x = x h : 0 < n ⊢ n = 0
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
iterate_monotone_eq_zero
[381, 1]
[397, 12]
simp only [not_lt, nonpos_iff_eq_zero] at h
case neg α : Type inst✝ : Preorder α f : α → α x : α n : ℕ eq : f^[n] x = x hper : 0 < n → ¬f^[n] x = x h : ¬0 < n ⊢ n = 0
case neg α : Type inst✝ : Preorder α f : α → α x : α n : ℕ eq : f^[n] x = x hper : 0 < n → ¬f^[n] x = x h : n = 0 ⊢ n = 0
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
iterate_monotone_eq_zero
[381, 1]
[397, 12]
exact h
case neg α : Type inst✝ : Preorder α f : α → α x : α n : ℕ eq : f^[n] x = x hper : 0 < n → ¬f^[n] x = x h : n = 0 ⊢ n = 0
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
aperiodic_next
[399, 1]
[409, 14]
simp_rw [Function.periodicPts, Function.IsPeriodicPt, Function.IsFixedPt]
⊢ Function.periodicPts next = ∅
⊢ {x | ∃ n > 0, next^[n] x = x} = ∅
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
aperiodic_next
[399, 1]
[409, 14]
ext x
⊢ {x | ∃ n > 0, next^[n] x = x} = ∅
case h x : ℕ × ℕ ⊢ x ∈ {x | ∃ n > 0, next^[n] x = x} ↔ x ∈ ∅
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
aperiodic_next
[399, 1]
[409, 14]
simp only [gt_iff_lt, Set.mem_setOf_eq, Set.mem_empty_iff_false, iff_false, not_exists, not_and]
case h x : ℕ × ℕ ⊢ x ∈ {x | ∃ n > 0, next^[n] x = x} ↔ x ∈ ∅
case h x : ℕ × ℕ ⊢ ∀ (x_1 : ℕ), 0 < x_1 → ¬next^[x_1] x = x
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
aperiodic_next
[399, 1]
[409, 14]
intro n hlt heq
case h x : ℕ × ℕ ⊢ ∀ (x_1 : ℕ), 0 < x_1 → ¬next^[x_1] x = x
case h x : ℕ × ℕ n : ℕ hlt : 0 < n heq : next^[n] x = x ⊢ False
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
aperiodic_next
[399, 1]
[409, 14]
simp_rw [next_apply] at heq
case h x : ℕ × ℕ n : ℕ hlt : 0 < n heq : next^[n] x = x ⊢ False
case h x : ℕ × ℕ n : ℕ hlt : 0 < n heq : (fun p => if p.1 = p.2 then (0, p.2 + 1) else (p.1 + 1, p.2))^[n] x = x ⊢ False
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
aperiodic_next
[399, 1]
[409, 14]
induction' n with n ih
case h x : ℕ × ℕ n : ℕ hlt : 0 < n heq : (fun p => if p.1 = p.2 then (0, p.2 + 1) else (p.1 + 1, p.2))^[n] x = x ⊢ False
case h.zero x : ℕ × ℕ hlt : 0 < Nat.zero heq : (fun p => if p.1 = p.2 then (0, p.2 + 1) else (p.1 + 1, p.2))^[Nat.zero] x = x ⊢ False case h.succ x : ℕ × ℕ n : ℕ ih : 0 < n → (fun p => if p.1 = p.2 then (0, p.2 + 1) else (p.1 + 1, p.2))^[n] x = x → False hlt : 0 < Nat.succ n heq : (fun p => if p.1 = p.2 then (0, p.2 + 1) else (p.1 + 1, p.2))^[Nat.succ n] x = x ⊢ False
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
aperiodic_next
[399, 1]
[409, 14]
simp only [Nat.zero_eq, lt_self_iff_false] at hlt
case h.zero x : ℕ × ℕ hlt : 0 < Nat.zero heq : (fun p => if p.1 = p.2 then (0, p.2 + 1) else (p.1 + 1, p.2))^[Nat.zero] x = x ⊢ False
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
aperiodic_next
[399, 1]
[409, 14]
simp at *
case h.succ x : ℕ × ℕ n : ℕ ih : 0 < n → (fun p => if p.1 = p.2 then (0, p.2 + 1) else (p.1 + 1, p.2))^[n] x = x → False hlt : 0 < Nat.succ n heq : (fun p => if p.1 = p.2 then (0, p.2 + 1) else (p.1 + 1, p.2))^[Nat.succ n] x = x ⊢ False
case h.succ x : ℕ × ℕ n : ℕ ih : 0 < n → (fun p => if p.1 = p.2 then (0, p.2 + 1) else (p.1 + 1, p.2))^[n] x = x → False heq : (fun p => if p.1 = p.2 then (0, p.2 + 1) else (p.1 + 1, p.2))^[n] (if x.1 = x.2 then (0, x.2 + 1) else (x.1 + 1, x.2)) = x hlt : True ⊢ False
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
enumerator_bijective
[420, 1]
[436, 43]
simp_rw [Function.Bijective, enumerator_apply]
⊢ Function.Bijective enumerator
⊢ (Function.Injective fun n => next^[n] (0, 0)) ∧ Function.Surjective fun n => next^[n] (0, 0)
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
enumerator_bijective
[420, 1]
[436, 43]
constructor
⊢ (Function.Injective fun n => next^[n] (0, 0)) ∧ Function.Surjective fun n => next^[n] (0, 0)
case left ⊢ Function.Injective fun n => next^[n] (0, 0) case right ⊢ Function.Surjective fun n => next^[n] (0, 0)
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
enumerator_bijective
[420, 1]
[436, 43]
intros a b heq
case left ⊢ Function.Injective fun n => next^[n] (0, 0)
case left a b : ℕ heq : (fun n => next^[n] (0, 0)) a = (fun n => next^[n] (0, 0)) b ⊢ a = b
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
enumerator_bijective
[420, 1]
[436, 43]
simp only at heq
case left a b : ℕ heq : (fun n => next^[n] (0, 0)) a = (fun n => next^[n] (0, 0)) b ⊢ a = b
case left a b : ℕ heq : next^[a] (0, 0) = next^[b] (0, 0) ⊢ a = b
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
enumerator_bijective
[420, 1]
[436, 43]
rw [Function.iterate_eq_iterate_iff_of_lt_minimalPeriod] at heq
case left a b : ℕ heq : next^[a] (0, 0) = next^[b] (0, 0) ⊢ a = b
case left a b : ℕ heq : a = b ⊢ a = b case left.hm a b : ℕ heq : next^[a] (0, 0) = next^[b] (0, 0) ⊢ a < Function.minimalPeriod next (0, 0) case left.hn a b : ℕ heq : next^[a] (0, 0) = next^[b] (0, 0) ⊢ b < Function.minimalPeriod next (0, 0)
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
enumerator_bijective
[420, 1]
[436, 43]
exact heq
case left a b : ℕ heq : a = b ⊢ a = b
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
enumerator_bijective
[420, 1]
[436, 43]
rw [Function.minimalPeriod]
case left.hm a b : ℕ heq : next^[a] (0, 0) = next^[b] (0, 0) ⊢ a < Function.minimalPeriod next (0, 0)
case left.hm a b : ℕ heq : next^[a] (0, 0) = next^[b] (0, 0) ⊢ a < if h : (0, 0) ∈ Function.periodicPts next then Nat.find h else 0
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
enumerator_bijective
[420, 1]
[436, 43]
simp
case left.hm a b : ℕ heq : next^[a] (0, 0) = next^[b] (0, 0) ⊢ a < if h : (0, 0) ∈ Function.periodicPts next then Nat.find h else 0
case left.hm a b : ℕ heq : next^[a] (0, 0) = next^[b] (0, 0) ⊢ a < if h : (0, 0) ∈ Function.periodicPts next then Nat.find (_ : ∃ n, (fun n => 0 < n ∧ Function.IsPeriodicPt next n (0, 0)) n) else 0
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
enumerator_bijective
[420, 1]
[436, 43]
split
case left.hm a b : ℕ heq : next^[a] (0, 0) = next^[b] (0, 0) ⊢ a < if h : (0, 0) ∈ Function.periodicPts next then Nat.find (_ : ∃ n, (fun n => 0 < n ∧ Function.IsPeriodicPt next n (0, 0)) n) else 0
case left.hm.inl a b : ℕ heq : next^[a] (0, 0) = next^[b] (0, 0) h✝ : (0, 0) ∈ Function.periodicPts next ⊢ a < Nat.find (_ : ∃ n, (fun n => 0 < n ∧ Function.IsPeriodicPt next n (0, 0)) n) case left.hm.inr a b : ℕ heq : next^[a] (0, 0) = next^[b] (0, 0) h✝ : (0, 0) ∉ Function.periodicPts next ⊢ a < 0
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
enumerator_bijective
[420, 1]
[436, 43]
rw [Nat.lt_find_iff sorry a]
case left.hm.inl a b : ℕ heq : next^[a] (0, 0) = next^[b] (0, 0) h✝ : (0, 0) ∈ Function.periodicPts next ⊢ a < Nat.find (_ : ∃ n, (fun n => 0 < n ∧ Function.IsPeriodicPt next n (0, 0)) n)
case left.hm.inl a b : ℕ heq : next^[a] (0, 0) = next^[b] (0, 0) h✝ : (0, 0) ∈ Function.periodicPts next ⊢ ∀ m ≤ a, ¬(0 < m ∧ Function.IsPeriodicPt next m (0, 0))
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
enumerator_bijective
[420, 1]
[436, 43]
have foo := Function.iterate_cancel sorry heq
case left.hm.inr a b : ℕ heq : next^[a] (0, 0) = next^[b] (0, 0) h✝ : (0, 0) ∉ Function.periodicPts next ⊢ a < 0
case left.hm.inr a b : ℕ heq : next^[a] (0, 0) = next^[b] (0, 0) h✝ : (0, 0) ∉ Function.periodicPts next foo : next^[a - b] (0, 0) = (0, 0) ⊢ a < 0
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
enumerator_bijective
[420, 1]
[436, 43]
rw [←Function.IsFixedPt] at foo
case left.hm.inr a b : ℕ heq : next^[a] (0, 0) = next^[b] (0, 0) h✝ : (0, 0) ∉ Function.periodicPts next foo : next^[a - b] (0, 0) = (0, 0) ⊢ a < 0
case left.hm.inr a b : ℕ heq : next^[a] (0, 0) = next^[b] (0, 0) h✝ : (0, 0) ∉ Function.periodicPts next foo : Function.IsFixedPt next^[a - b] (0, 0) ⊢ a < 0
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
enumerator_bijective
[420, 1]
[436, 43]
rw [←Function.IsPeriodicPt] at foo
case left.hm.inr a b : ℕ heq : next^[a] (0, 0) = next^[b] (0, 0) h✝ : (0, 0) ∉ Function.periodicPts next foo : Function.IsFixedPt next^[a - b] (0, 0) ⊢ a < 0
case left.hm.inr a b : ℕ heq : next^[a] (0, 0) = next^[b] (0, 0) h✝ : (0, 0) ∉ Function.periodicPts next foo : Function.IsPeriodicPt next (a - b) (0, 0) ⊢ a < 0
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/Foundations.lean
distrib
[4, 1]
[8, 8]
tauto
r p q R : Prop ⊢ p ∨ q ∧ r ↔ (p ∨ q) ∧ (p ∨ r)
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/Foundations.lean
not_and_iff_or_not
[10, 1]
[28, 4]
constructor
p q r : Prop ⊢ ¬(p ∧ q) ↔ ¬p ∨ ¬q
case mp p q r : Prop ⊢ ¬(p ∧ q) → ¬p ∨ ¬q case mpr p q r : Prop ⊢ ¬p ∨ ¬q → ¬(p ∧ q)
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/Foundations.lean
not_and_iff_or_not
[10, 1]
[28, 4]
{ intro hnand by_cases p { exact Or.inr λ hq => hnand ⟨h, hq⟩} { left exact h } }
case mp p q r : Prop ⊢ ¬(p ∧ q) → ¬p ∨ ¬q case mpr p q r : Prop ⊢ ¬p ∨ ¬q → ¬(p ∧ q)
case mpr p q r : Prop ⊢ ¬p ∨ ¬q → ¬(p ∧ q)
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/Foundations.lean
not_and_iff_or_not
[10, 1]
[28, 4]
{ intros hnor hand rcases hand with ⟨hp, hq⟩ cases hnor with | inl hnp => exact hnp hp | inr hnq => exact hnq hq }
case mpr p q r : Prop ⊢ ¬p ∨ ¬q → ¬(p ∧ q)
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/Foundations.lean
not_and_iff_or_not
[10, 1]
[28, 4]
intro hnand
case mp p q r : Prop ⊢ ¬(p ∧ q) → ¬p ∨ ¬q
case mp p q r : Prop hnand : ¬(p ∧ q) ⊢ ¬p ∨ ¬q
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/Foundations.lean
not_and_iff_or_not
[10, 1]
[28, 4]
by_cases p
case mp p q r : Prop hnand : ¬(p ∧ q) ⊢ ¬p ∨ ¬q
case pos p q r : Prop hnand : ¬(p ∧ q) h : p ⊢ ¬p ∨ ¬q case neg p q r : Prop hnand : ¬(p ∧ q) h : ¬p ⊢ ¬p ∨ ¬q
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/Foundations.lean
not_and_iff_or_not
[10, 1]
[28, 4]
{ exact Or.inr λ hq => hnand ⟨h, hq⟩}
case pos p q r : Prop hnand : ¬(p ∧ q) h : p ⊢ ¬p ∨ ¬q case neg p q r : Prop hnand : ¬(p ∧ q) h : ¬p ⊢ ¬p ∨ ¬q
case neg p q r : Prop hnand : ¬(p ∧ q) h : ¬p ⊢ ¬p ∨ ¬q
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/Foundations.lean
not_and_iff_or_not
[10, 1]
[28, 4]
{ left exact h }
case neg p q r : Prop hnand : ¬(p ∧ q) h : ¬p ⊢ ¬p ∨ ¬q
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/Foundations.lean
not_and_iff_or_not
[10, 1]
[28, 4]
exact Or.inr λ hq => hnand ⟨h, hq⟩
case pos p q r : Prop hnand : ¬(p ∧ q) h : p ⊢ ¬p ∨ ¬q
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/Foundations.lean
not_and_iff_or_not
[10, 1]
[28, 4]
left
case neg p q r : Prop hnand : ¬(p ∧ q) h : ¬p ⊢ ¬p ∨ ¬q
case neg.h p q r : Prop hnand : ¬(p ∧ q) h : ¬p ⊢ ¬p