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/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
fourPowLeMulProdPrimes
[162, 1]
[216, 45]
apply Nat.mul_le_mul
case h.hβ‚‚ n : β„• hn : 2 < n ⊒ (∏ x in Finset.Ioc (Nat.sqrt (2 * n)) (2 * n / 3), x ^ ↑(Nat.factorization (Nat.centralBinom n)) x) * ∏ x in Finset.Ioc (2 * n / 3) (2 * n), x ^ ↑(Nat.factorization (Nat.centralBinom n)) x ≀ 4 ^ Nat.pred (2 * n / 3) * ∏ p in primes (Finset.Ioc n (2 * n)), p
case h.hβ‚‚.h₁ n : β„• hn : 2 < n ⊒ ∏ x in Finset.Ioc (Nat.sqrt (2 * n)) (2 * n / 3), x ^ ↑(Nat.factorization (Nat.centralBinom n)) x ≀ 4 ^ Nat.pred (2 * n / 3) case h.hβ‚‚.hβ‚‚ n : β„• hn : 2 < n ⊒ ∏ x in Finset.Ioc (2 * n / 3) (2 * n), x ^ ↑(Nat.factorization (Nat.centralBinom n)) x ≀ ∏ p in primes (Finset.Ioc n (2 * n)), p
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
fourPowLeMulProdPrimes
[162, 1]
[216, 45]
. apply le_trans FactorizationCentralBinom.prodIocSqrtPowLeProdPrimes apply le_trans _ (@prodPrimesLePowFour (2*n/3)) rw [prodPrimes, Finset.range_eq_Ico, Nat.Ico_succ_right] apply Finset.prod_le_prod_of_subset_of_one_le' <;> rw [primes] . apply Finset.monotone_filter_left exact Finset.Ioc_subset_Iic_self . intro p hp _ simp at hp replace hp := Nat.Prime.one_lt hp.right linarith
case h.hβ‚‚.h₁ n : β„• hn : 2 < n ⊒ ∏ x in Finset.Ioc (Nat.sqrt (2 * n)) (2 * n / 3), x ^ ↑(Nat.factorization (Nat.centralBinom n)) x ≀ 4 ^ Nat.pred (2 * n / 3) case h.hβ‚‚.hβ‚‚ n : β„• hn : 2 < n ⊒ ∏ x in Finset.Ioc (2 * n / 3) (2 * n), x ^ ↑(Nat.factorization (Nat.centralBinom n)) x ≀ ∏ p in primes (Finset.Ioc n (2 * n)), p
case h.hβ‚‚.hβ‚‚ n : β„• hn : 2 < n ⊒ ∏ x in Finset.Ioc (2 * n / 3) (2 * n), x ^ ↑(Nat.factorization (Nat.centralBinom n)) x ≀ ∏ p in primes (Finset.Ioc n (2 * n)), p
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
fourPowLeMulProdPrimes
[162, 1]
[216, 45]
. conv => lhs; rw [← Finset.prod_Ioc_consecutive _ (mulDivLeSelf (by norm_num)) (by linarith : n ≀ 2*n)] apply mulRightLeOfLeOne . apply le_of_eq apply Finset.prod_eq_one intro x hx simp at hx rw [Nat.factorization_centralBinom_of_two_mul_self_lt_three_mul hn hx.right] . simp . apply @Nat.lt_of_div_lt_div _ _ 3 simp exact hx.left . apply FactorizationCentralBinom.prodIocSqrtLePowLeProdPrimes exact sqrtTwoMulLeSelf (le_of_lt hn)
case h.hβ‚‚.hβ‚‚ n : β„• hn : 2 < n ⊒ ∏ x in Finset.Ioc (2 * n / 3) (2 * n), x ^ ↑(Nat.factorization (Nat.centralBinom n)) x ≀ ∏ p in primes (Finset.Ioc n (2 * n)), p
no goals
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
fourPowLeMulProdPrimes
[162, 1]
[216, 45]
repeat rw [← Nat.Ico_succ_succ]
case hs n : β„• hn : 2 < n ⊒ Finset.Ioc (Nat.sqrt (2 * n)) (2 * n) βŠ† Finset.Ioc (Nat.sqrt (2 * n)) (2 * n / 3) βˆͺ Finset.Ioc (2 * n / 3) (2 * n)
case hs n : β„• hn : 2 < n ⊒ Finset.Ico (Nat.succ (Nat.sqrt (2 * n))) (Nat.succ (2 * n)) βŠ† Finset.Ico (Nat.succ (Nat.sqrt (2 * n))) (Nat.succ (2 * n / 3)) βˆͺ Finset.Ico (Nat.succ (2 * n / 3)) (Nat.succ (2 * n))
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
fourPowLeMulProdPrimes
[162, 1]
[216, 45]
apply Finset.Ico_subset_Ico_union_Ico
case hs n : β„• hn : 2 < n ⊒ Finset.Ico (Nat.succ (Nat.sqrt (2 * n))) (Nat.succ (2 * n)) βŠ† Finset.Ico (Nat.succ (Nat.sqrt (2 * n))) (Nat.succ (2 * n / 3)) βˆͺ Finset.Ico (Nat.succ (2 * n / 3)) (Nat.succ (2 * n))
no goals
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
fourPowLeMulProdPrimes
[162, 1]
[216, 45]
rw [← Nat.Ico_succ_succ]
case hs n : β„• hn : 2 < n ⊒ Finset.Ico (Nat.succ (Nat.sqrt (2 * n))) (Nat.succ (2 * n)) βŠ† Finset.Ico (Nat.succ (Nat.sqrt (2 * n))) (Nat.succ (2 * n / 3)) βˆͺ Finset.Ioc (2 * n / 3) (2 * n)
case hs n : β„• hn : 2 < n ⊒ Finset.Ico (Nat.succ (Nat.sqrt (2 * n))) (Nat.succ (2 * n)) βŠ† Finset.Ico (Nat.succ (Nat.sqrt (2 * n))) (Nat.succ (2 * n / 3)) βˆͺ Finset.Ico (Nat.succ (2 * n / 3)) (Nat.succ (2 * n))
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
fourPowLeMulProdPrimes
[162, 1]
[216, 45]
apply le_trans FactorizationCentralBinom.prodIocSqrtPowLeProdPrimes
case h.hβ‚‚.h₁ n : β„• hn : 2 < n ⊒ ∏ x in Finset.Ioc (Nat.sqrt (2 * n)) (2 * n / 3), x ^ ↑(Nat.factorization (Nat.centralBinom n)) x ≀ 4 ^ Nat.pred (2 * n / 3)
case h.hβ‚‚.h₁ n : β„• hn : 2 < n ⊒ ∏ p in primes (Finset.Ioc (Nat.sqrt (2 * n)) (2 * n / 3)), p ≀ 4 ^ Nat.pred (2 * n / 3)
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
fourPowLeMulProdPrimes
[162, 1]
[216, 45]
apply le_trans _ (@prodPrimesLePowFour (2*n/3))
case h.hβ‚‚.h₁ n : β„• hn : 2 < n ⊒ ∏ p in primes (Finset.Ioc (Nat.sqrt (2 * n)) (2 * n / 3)), p ≀ 4 ^ Nat.pred (2 * n / 3)
n : β„• hn : 2 < n ⊒ ∏ p in primes (Finset.Ioc (Nat.sqrt (2 * n)) (2 * n / 3)), p ≀ prodPrimes (2 * n / 3)
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
fourPowLeMulProdPrimes
[162, 1]
[216, 45]
rw [prodPrimes, Finset.range_eq_Ico, Nat.Ico_succ_right]
n : β„• hn : 2 < n ⊒ ∏ p in primes (Finset.Ioc (Nat.sqrt (2 * n)) (2 * n / 3)), p ≀ prodPrimes (2 * n / 3)
n : β„• hn : 2 < n ⊒ ∏ p in primes (Finset.Ioc (Nat.sqrt (2 * n)) (2 * n / 3)), p ≀ ∏ p in primes (Finset.Icc 0 (2 * n / 3)), p
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
fourPowLeMulProdPrimes
[162, 1]
[216, 45]
apply Finset.prod_le_prod_of_subset_of_one_le' <;> rw [primes]
n : β„• hn : 2 < n ⊒ ∏ p in primes (Finset.Ioc (Nat.sqrt (2 * n)) (2 * n / 3)), p ≀ ∏ p in primes (Finset.Icc 0 (2 * n / 3)), p
case h n : β„• hn : 2 < n ⊒ Finset.filter Nat.Prime (Finset.Ioc (Nat.sqrt (2 * n)) (2 * n / 3)) βŠ† Finset.filter Nat.Prime (Finset.Icc 0 (2 * n / 3)) case hf n : β„• hn : 2 < n ⊒ βˆ€ (i : β„•), i ∈ Finset.filter Nat.Prime (Finset.Icc 0 (2 * n / 3)) β†’ Β¬i ∈ Finset.filter Nat.Prime (Finset.Ioc (Nat.sqrt (2 * n)) (2 * n / 3)) β†’ 1 ≀ i
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
fourPowLeMulProdPrimes
[162, 1]
[216, 45]
. apply Finset.monotone_filter_left exact Finset.Ioc_subset_Iic_self
case h n : β„• hn : 2 < n ⊒ Finset.filter Nat.Prime (Finset.Ioc (Nat.sqrt (2 * n)) (2 * n / 3)) βŠ† Finset.filter Nat.Prime (Finset.Icc 0 (2 * n / 3)) case hf n : β„• hn : 2 < n ⊒ βˆ€ (i : β„•), i ∈ Finset.filter Nat.Prime (Finset.Icc 0 (2 * n / 3)) β†’ Β¬i ∈ Finset.filter Nat.Prime (Finset.Ioc (Nat.sqrt (2 * n)) (2 * n / 3)) β†’ 1 ≀ i
case hf n : β„• hn : 2 < n ⊒ βˆ€ (i : β„•), i ∈ Finset.filter Nat.Prime (Finset.Icc 0 (2 * n / 3)) β†’ Β¬i ∈ Finset.filter Nat.Prime (Finset.Ioc (Nat.sqrt (2 * n)) (2 * n / 3)) β†’ 1 ≀ i
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
fourPowLeMulProdPrimes
[162, 1]
[216, 45]
. intro p hp _ simp at hp replace hp := Nat.Prime.one_lt hp.right linarith
case hf n : β„• hn : 2 < n ⊒ βˆ€ (i : β„•), i ∈ Finset.filter Nat.Prime (Finset.Icc 0 (2 * n / 3)) β†’ Β¬i ∈ Finset.filter Nat.Prime (Finset.Ioc (Nat.sqrt (2 * n)) (2 * n / 3)) β†’ 1 ≀ i
no goals
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
fourPowLeMulProdPrimes
[162, 1]
[216, 45]
apply Finset.monotone_filter_left
case h n : β„• hn : 2 < n ⊒ Finset.filter Nat.Prime (Finset.Ioc (Nat.sqrt (2 * n)) (2 * n / 3)) βŠ† Finset.filter Nat.Prime (Finset.Icc 0 (2 * n / 3))
case h.a n : β„• hn : 2 < n ⊒ Finset.Ioc (Nat.sqrt (2 * n)) (2 * n / 3) ≀ Finset.Icc 0 (2 * n / 3)
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
fourPowLeMulProdPrimes
[162, 1]
[216, 45]
exact Finset.Ioc_subset_Iic_self
case h.a n : β„• hn : 2 < n ⊒ Finset.Ioc (Nat.sqrt (2 * n)) (2 * n / 3) ≀ Finset.Icc 0 (2 * n / 3)
no goals
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
fourPowLeMulProdPrimes
[162, 1]
[216, 45]
intro p hp _
case hf n : β„• hn : 2 < n ⊒ βˆ€ (i : β„•), i ∈ Finset.filter Nat.Prime (Finset.Icc 0 (2 * n / 3)) β†’ Β¬i ∈ Finset.filter Nat.Prime (Finset.Ioc (Nat.sqrt (2 * n)) (2 * n / 3)) β†’ 1 ≀ i
case hf n : β„• hn : 2 < n p : β„• hp : p ∈ Finset.filter Nat.Prime (Finset.Icc 0 (2 * n / 3)) a✝ : Β¬p ∈ Finset.filter Nat.Prime (Finset.Ioc (Nat.sqrt (2 * n)) (2 * n / 3)) ⊒ 1 ≀ p
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
fourPowLeMulProdPrimes
[162, 1]
[216, 45]
simp at hp
case hf n : β„• hn : 2 < n p : β„• hp : p ∈ Finset.filter Nat.Prime (Finset.Icc 0 (2 * n / 3)) a✝ : Β¬p ∈ Finset.filter Nat.Prime (Finset.Ioc (Nat.sqrt (2 * n)) (2 * n / 3)) ⊒ 1 ≀ p
case hf n : β„• hn : 2 < n p : β„• a✝ : Β¬p ∈ Finset.filter Nat.Prime (Finset.Ioc (Nat.sqrt (2 * n)) (2 * n / 3)) hp : p ≀ 2 * n / 3 ∧ Nat.Prime p ⊒ 1 ≀ p
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
fourPowLeMulProdPrimes
[162, 1]
[216, 45]
replace hp := Nat.Prime.one_lt hp.right
case hf n : β„• hn : 2 < n p : β„• a✝ : Β¬p ∈ Finset.filter Nat.Prime (Finset.Ioc (Nat.sqrt (2 * n)) (2 * n / 3)) hp : p ≀ 2 * n / 3 ∧ Nat.Prime p ⊒ 1 ≀ p
case hf n : β„• hn : 2 < n p : β„• a✝ : Β¬p ∈ Finset.filter Nat.Prime (Finset.Ioc (Nat.sqrt (2 * n)) (2 * n / 3)) hp : 1 < p ⊒ 1 ≀ p
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
fourPowLeMulProdPrimes
[162, 1]
[216, 45]
linarith
case hf n : β„• hn : 2 < n p : β„• a✝ : Β¬p ∈ Finset.filter Nat.Prime (Finset.Ioc (Nat.sqrt (2 * n)) (2 * n / 3)) hp : 1 < p ⊒ 1 ≀ p
no goals
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
fourPowLeMulProdPrimes
[162, 1]
[216, 45]
conv => lhs; rw [← Finset.prod_Ioc_consecutive _ (mulDivLeSelf (by norm_num)) (by linarith : n ≀ 2*n)]
case h.hβ‚‚.hβ‚‚ n : β„• hn : 2 < n ⊒ ∏ x in Finset.Ioc (2 * n / 3) (2 * n), x ^ ↑(Nat.factorization (Nat.centralBinom n)) x ≀ ∏ p in primes (Finset.Ioc n (2 * n)), p
case h.hβ‚‚.hβ‚‚ n : β„• hn : 2 < n ⊒ (∏ i in Finset.Ioc (2 * n / 3) n, i ^ ↑(Nat.factorization (Nat.centralBinom n)) i) * ∏ i in Finset.Ioc n (2 * n), i ^ ↑(Nat.factorization (Nat.centralBinom n)) i ≀ ∏ p in primes (Finset.Ioc n (2 * n)), p
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
fourPowLeMulProdPrimes
[162, 1]
[216, 45]
apply mulRightLeOfLeOne
case h.hβ‚‚.hβ‚‚ n : β„• hn : 2 < n ⊒ (∏ i in Finset.Ioc (2 * n / 3) n, i ^ ↑(Nat.factorization (Nat.centralBinom n)) i) * ∏ i in Finset.Ioc n (2 * n), i ^ ↑(Nat.factorization (Nat.centralBinom n)) i ≀ ∏ p in primes (Finset.Ioc n (2 * n)), p
case h.hβ‚‚.hβ‚‚.h1 n : β„• hn : 2 < n ⊒ ∏ i in Finset.Ioc (2 * n / 3) n, i ^ ↑(Nat.factorization (Nat.centralBinom n)) i ≀ 1 case h.hβ‚‚.hβ‚‚.h n : β„• hn : 2 < n ⊒ ∏ i in Finset.Ioc n (2 * n), i ^ ↑(Nat.factorization (Nat.centralBinom n)) i ≀ ∏ p in primes (Finset.Ioc n (2 * n)), p
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
fourPowLeMulProdPrimes
[162, 1]
[216, 45]
. apply le_of_eq apply Finset.prod_eq_one intro x hx simp at hx rw [Nat.factorization_centralBinom_of_two_mul_self_lt_three_mul hn hx.right] . simp . apply @Nat.lt_of_div_lt_div _ _ 3 simp exact hx.left
case h.hβ‚‚.hβ‚‚.h1 n : β„• hn : 2 < n ⊒ ∏ i in Finset.Ioc (2 * n / 3) n, i ^ ↑(Nat.factorization (Nat.centralBinom n)) i ≀ 1 case h.hβ‚‚.hβ‚‚.h n : β„• hn : 2 < n ⊒ ∏ i in Finset.Ioc n (2 * n), i ^ ↑(Nat.factorization (Nat.centralBinom n)) i ≀ ∏ p in primes (Finset.Ioc n (2 * n)), p
case h.hβ‚‚.hβ‚‚.h n : β„• hn : 2 < n ⊒ ∏ i in Finset.Ioc n (2 * n), i ^ ↑(Nat.factorization (Nat.centralBinom n)) i ≀ ∏ p in primes (Finset.Ioc n (2 * n)), p
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
fourPowLeMulProdPrimes
[162, 1]
[216, 45]
. apply FactorizationCentralBinom.prodIocSqrtLePowLeProdPrimes exact sqrtTwoMulLeSelf (le_of_lt hn)
case h.hβ‚‚.hβ‚‚.h n : β„• hn : 2 < n ⊒ ∏ i in Finset.Ioc n (2 * n), i ^ ↑(Nat.factorization (Nat.centralBinom n)) i ≀ ∏ p in primes (Finset.Ioc n (2 * n)), p
no goals
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
fourPowLeMulProdPrimes
[162, 1]
[216, 45]
norm_num
n : β„• hn : 2 < n ⊒ 2 ≀ 3
no goals
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
fourPowLeMulProdPrimes
[162, 1]
[216, 45]
linarith
n : β„• hn : 2 < n ⊒ n ≀ 2 * n
no goals
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
fourPowLeMulProdPrimes
[162, 1]
[216, 45]
apply le_of_eq
case h.hβ‚‚.hβ‚‚.h1 n : β„• hn : 2 < n ⊒ ∏ i in Finset.Ioc (2 * n / 3) n, i ^ ↑(Nat.factorization (Nat.centralBinom n)) i ≀ 1
case h.hβ‚‚.hβ‚‚.h1.a n : β„• hn : 2 < n ⊒ ∏ i in Finset.Ioc (2 * n / 3) n, i ^ ↑(Nat.factorization (Nat.centralBinom n)) i = 1
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
fourPowLeMulProdPrimes
[162, 1]
[216, 45]
apply Finset.prod_eq_one
case h.hβ‚‚.hβ‚‚.h1.a n : β„• hn : 2 < n ⊒ ∏ i in Finset.Ioc (2 * n / 3) n, i ^ ↑(Nat.factorization (Nat.centralBinom n)) i = 1
case h.hβ‚‚.hβ‚‚.h1.a.h n : β„• hn : 2 < n ⊒ βˆ€ (x : β„•), x ∈ Finset.Ioc (2 * n / 3) n β†’ x ^ ↑(Nat.factorization (Nat.centralBinom n)) x = 1
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
fourPowLeMulProdPrimes
[162, 1]
[216, 45]
intro x hx
case h.hβ‚‚.hβ‚‚.h1.a.h n : β„• hn : 2 < n ⊒ βˆ€ (x : β„•), x ∈ Finset.Ioc (2 * n / 3) n β†’ x ^ ↑(Nat.factorization (Nat.centralBinom n)) x = 1
case h.hβ‚‚.hβ‚‚.h1.a.h n : β„• hn : 2 < n x : β„• hx : x ∈ Finset.Ioc (2 * n / 3) n ⊒ x ^ ↑(Nat.factorization (Nat.centralBinom n)) x = 1
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
fourPowLeMulProdPrimes
[162, 1]
[216, 45]
simp at hx
case h.hβ‚‚.hβ‚‚.h1.a.h n : β„• hn : 2 < n x : β„• hx : x ∈ Finset.Ioc (2 * n / 3) n ⊒ x ^ ↑(Nat.factorization (Nat.centralBinom n)) x = 1
case h.hβ‚‚.hβ‚‚.h1.a.h n : β„• hn : 2 < n x : β„• hx : 2 * n / 3 < x ∧ x ≀ n ⊒ x ^ ↑(Nat.factorization (Nat.centralBinom n)) x = 1
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
fourPowLeMulProdPrimes
[162, 1]
[216, 45]
rw [Nat.factorization_centralBinom_of_two_mul_self_lt_three_mul hn hx.right]
case h.hβ‚‚.hβ‚‚.h1.a.h n : β„• hn : 2 < n x : β„• hx : 2 * n / 3 < x ∧ x ≀ n ⊒ x ^ ↑(Nat.factorization (Nat.centralBinom n)) x = 1
case h.hβ‚‚.hβ‚‚.h1.a.h n : β„• hn : 2 < n x : β„• hx : 2 * n / 3 < x ∧ x ≀ n ⊒ x ^ 0 = 1 case h.hβ‚‚.hβ‚‚.h1.a.h n : β„• hn : 2 < n x : β„• hx : 2 * n / 3 < x ∧ x ≀ n ⊒ 2 * n < 3 * x
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
fourPowLeMulProdPrimes
[162, 1]
[216, 45]
. simp
case h.hβ‚‚.hβ‚‚.h1.a.h n : β„• hn : 2 < n x : β„• hx : 2 * n / 3 < x ∧ x ≀ n ⊒ x ^ 0 = 1 case h.hβ‚‚.hβ‚‚.h1.a.h n : β„• hn : 2 < n x : β„• hx : 2 * n / 3 < x ∧ x ≀ n ⊒ 2 * n < 3 * x
case h.hβ‚‚.hβ‚‚.h1.a.h n : β„• hn : 2 < n x : β„• hx : 2 * n / 3 < x ∧ x ≀ n ⊒ 2 * n < 3 * x
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
fourPowLeMulProdPrimes
[162, 1]
[216, 45]
. apply @Nat.lt_of_div_lt_div _ _ 3 simp exact hx.left
case h.hβ‚‚.hβ‚‚.h1.a.h n : β„• hn : 2 < n x : β„• hx : 2 * n / 3 < x ∧ x ≀ n ⊒ 2 * n < 3 * x
no goals
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
fourPowLeMulProdPrimes
[162, 1]
[216, 45]
simp
case h.hβ‚‚.hβ‚‚.h1.a.h n : β„• hn : 2 < n x : β„• hx : 2 * n / 3 < x ∧ x ≀ n ⊒ x ^ 0 = 1
no goals
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
fourPowLeMulProdPrimes
[162, 1]
[216, 45]
apply @Nat.lt_of_div_lt_div _ _ 3
case h.hβ‚‚.hβ‚‚.h1.a.h n : β„• hn : 2 < n x : β„• hx : 2 * n / 3 < x ∧ x ≀ n ⊒ 2 * n < 3 * x
case h.hβ‚‚.hβ‚‚.h1.a.h n : β„• hn : 2 < n x : β„• hx : 2 * n / 3 < x ∧ x ≀ n ⊒ 2 * n / 3 < 3 * x / 3
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
fourPowLeMulProdPrimes
[162, 1]
[216, 45]
simp
case h.hβ‚‚.hβ‚‚.h1.a.h n : β„• hn : 2 < n x : β„• hx : 2 * n / 3 < x ∧ x ≀ n ⊒ 2 * n / 3 < 3 * x / 3
case h.hβ‚‚.hβ‚‚.h1.a.h n : β„• hn : 2 < n x : β„• hx : 2 * n / 3 < x ∧ x ≀ n ⊒ 2 * n / 3 < x
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
fourPowLeMulProdPrimes
[162, 1]
[216, 45]
exact hx.left
case h.hβ‚‚.hβ‚‚.h1.a.h n : β„• hn : 2 < n x : β„• hx : 2 * n / 3 < x ∧ x ≀ n ⊒ 2 * n / 3 < x
no goals
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
fourPowLeMulProdPrimes
[162, 1]
[216, 45]
apply FactorizationCentralBinom.prodIocSqrtLePowLeProdPrimes
case h.hβ‚‚.hβ‚‚.h n : β„• hn : 2 < n ⊒ ∏ i in Finset.Ioc n (2 * n), i ^ ↑(Nat.factorization (Nat.centralBinom n)) i ≀ ∏ p in primes (Finset.Ioc n (2 * n)), p
case h.hβ‚‚.hβ‚‚.h.ha n : β„• hn : 2 < n ⊒ Nat.sqrt (2 * n) ≀ n
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
fourPowLeMulProdPrimes
[162, 1]
[216, 45]
exact sqrtTwoMulLeSelf (le_of_lt hn)
case h.hβ‚‚.hβ‚‚.h.ha n : β„• hn : 2 < n ⊒ Nat.sqrt (2 * n) ≀ n
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
generic_recursor
[31, 1]
[52, 12]
let A := {x : N0 | motive x}
motive : ↑N0 β†’ Prop hz : motive z hs : βˆ€ (n : ↑N0), motive n β†’ motive (S n) x : ↑N0 ⊒ motive x
motive : ↑N0 β†’ Prop hz : motive z hs : βˆ€ (n : ↑N0), motive n β†’ motive (S n) x : ↑N0 A : Set ↑N0 := {x | motive x} ⊒ motive x
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
generic_recursor
[31, 1]
[52, 12]
have hzmem : z ∈ A := by simp only [Set.mem_setOf_eq] exact hz
motive : ↑N0 β†’ Prop hz : motive z hs : βˆ€ (n : ↑N0), motive n β†’ motive (S n) x : ↑N0 A : Set ↑N0 := {x | motive x} ⊒ motive x
motive : ↑N0 β†’ Prop hz : motive z hs : βˆ€ (n : ↑N0), motive n β†’ motive (S n) x : ↑N0 A : Set ↑N0 := {x | motive x} hzmem : z ∈ A ⊒ motive x
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
generic_recursor
[31, 1]
[52, 12]
have hind : (βˆ€ n : N0, n ∈ A β†’ (S n) ∈ A) := by intros n hel simp only [Set.mem_setOf_eq] simp only [Set.mem_setOf_eq] at hel specialize hs n exact hs hel
motive : ↑N0 β†’ Prop hz : motive z hs : βˆ€ (n : ↑N0), motive n β†’ motive (S n) x : ↑N0 A : Set ↑N0 := {x | motive x} hzmem : z ∈ A ⊒ motive x
motive : ↑N0 β†’ Prop hz : motive z hs : βˆ€ (n : ↑N0), motive n β†’ motive (S n) x : ↑N0 A : Set ↑N0 := {x | motive x} hzmem : z ∈ A hind : βˆ€ n ∈ A, S n ∈ A ⊒ motive x
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
generic_recursor
[31, 1]
[52, 12]
have heq := p3 A ⟨hzmem, hind⟩
motive : ↑N0 β†’ Prop hz : motive z hs : βˆ€ (n : ↑N0), motive n β†’ motive (S n) x : ↑N0 A : Set ↑N0 := {x | motive x} hzmem : z ∈ A hind : βˆ€ n ∈ A, S n ∈ A ⊒ motive x
motive : ↑N0 β†’ Prop hz : motive z hs : βˆ€ (n : ↑N0), motive n β†’ motive (S n) x : ↑N0 A : Set ↑N0 := {x | motive x} hzmem : z ∈ A hind : βˆ€ n ∈ A, S n ∈ A heq : Subtype.val '' A = N0 ⊒ motive x
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
generic_recursor
[31, 1]
[52, 12]
simp [A, Set.ext_iff] at heq
motive : ↑N0 β†’ Prop hz : motive z hs : βˆ€ (n : ↑N0), motive n β†’ motive (S n) x : ↑N0 A : Set ↑N0 := {x | motive x} hzmem : z ∈ A hind : βˆ€ n ∈ A, S n ∈ A heq : Subtype.val '' A = N0 ⊒ motive x
motive : ↑N0 β†’ Prop hz : motive z hs : βˆ€ (n : ↑N0), motive n β†’ motive (S n) x : ↑N0 A : Set ↑N0 := {x | motive x} hzmem : z ∈ A hind : βˆ€ n ∈ A, S n ∈ A heq : βˆ€ (x : Ξ±), (βˆƒ (x_1 : x ∈ N0), motive { val := x, property := (_ : x ∈ N0) }) ↔ x ∈ N0 ⊒ motive x
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
generic_recursor
[31, 1]
[52, 12]
specialize heq x
motive : ↑N0 β†’ Prop hz : motive z hs : βˆ€ (n : ↑N0), motive n β†’ motive (S n) x : ↑N0 A : Set ↑N0 := {x | motive x} hzmem : z ∈ A hind : βˆ€ n ∈ A, S n ∈ A heq : βˆ€ (x : Ξ±), (βˆƒ (x_1 : x ∈ N0), motive { val := x, property := (_ : x ∈ N0) }) ↔ x ∈ N0 ⊒ motive x
motive : ↑N0 β†’ Prop hz : motive z hs : βˆ€ (n : ↑N0), motive n β†’ motive (S n) x : ↑N0 A : Set ↑N0 := {x | motive x} hzmem : z ∈ A hind : βˆ€ n ∈ A, S n ∈ A heq : (βˆƒ (x_1 : ↑x ∈ N0), motive { val := ↑x, property := (_ : ↑x ∈ N0) }) ↔ ↑x ∈ N0 ⊒ motive x
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
generic_recursor
[31, 1]
[52, 12]
simp only [Subtype.coe_eta, Subtype.coe_prop, exists_const, iff_true] at heq
motive : ↑N0 β†’ Prop hz : motive z hs : βˆ€ (n : ↑N0), motive n β†’ motive (S n) x : ↑N0 A : Set ↑N0 := {x | motive x} hzmem : z ∈ A hind : βˆ€ n ∈ A, S n ∈ A heq : (βˆƒ (x_1 : ↑x ∈ N0), motive { val := ↑x, property := (_ : ↑x ∈ N0) }) ↔ ↑x ∈ N0 ⊒ motive x
motive : ↑N0 β†’ Prop hz : motive z hs : βˆ€ (n : ↑N0), motive n β†’ motive (S n) x : ↑N0 A : Set ↑N0 := {x | motive x} hzmem : z ∈ A hind : βˆ€ n ∈ A, S n ∈ A heq : motive x ⊒ motive x
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
generic_recursor
[31, 1]
[52, 12]
exact heq
motive : ↑N0 β†’ Prop hz : motive z hs : βˆ€ (n : ↑N0), motive n β†’ motive (S n) x : ↑N0 A : Set ↑N0 := {x | motive x} hzmem : z ∈ A hind : βˆ€ n ∈ A, S n ∈ A heq : motive x ⊒ motive x
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
generic_recursor
[31, 1]
[52, 12]
simp only [Set.mem_setOf_eq]
motive : ↑N0 β†’ Prop hz : motive z hs : βˆ€ (n : ↑N0), motive n β†’ motive (S n) x : ↑N0 A : Set ↑N0 := {x | motive x} ⊒ z ∈ A
motive : ↑N0 β†’ Prop hz : motive z hs : βˆ€ (n : ↑N0), motive n β†’ motive (S n) x : ↑N0 A : Set ↑N0 := {x | motive x} ⊒ motive z
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
generic_recursor
[31, 1]
[52, 12]
exact hz
motive : ↑N0 β†’ Prop hz : motive z hs : βˆ€ (n : ↑N0), motive n β†’ motive (S n) x : ↑N0 A : Set ↑N0 := {x | motive x} ⊒ motive z
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
generic_recursor
[31, 1]
[52, 12]
intros n hel
motive : ↑N0 β†’ Prop hz : motive z hs : βˆ€ (n : ↑N0), motive n β†’ motive (S n) x : ↑N0 A : Set ↑N0 := {x | motive x} hzmem : z ∈ A ⊒ βˆ€ n ∈ A, S n ∈ A
motive : ↑N0 β†’ Prop hz : motive z hs : βˆ€ (n : ↑N0), motive n β†’ motive (S n) x : ↑N0 A : Set ↑N0 := {x | motive x} hzmem : z ∈ A n : ↑N0 hel : n ∈ A ⊒ S n ∈ A
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
generic_recursor
[31, 1]
[52, 12]
simp only [Set.mem_setOf_eq]
motive : ↑N0 β†’ Prop hz : motive z hs : βˆ€ (n : ↑N0), motive n β†’ motive (S n) x : ↑N0 A : Set ↑N0 := {x | motive x} hzmem : z ∈ A n : ↑N0 hel : n ∈ A ⊒ S n ∈ A
motive : ↑N0 β†’ Prop hz : motive z hs : βˆ€ (n : ↑N0), motive n β†’ motive (S n) x : ↑N0 A : Set ↑N0 := {x | motive x} hzmem : z ∈ A n : ↑N0 hel : n ∈ A ⊒ motive (S n)
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
generic_recursor
[31, 1]
[52, 12]
simp only [Set.mem_setOf_eq] at hel
motive : ↑N0 β†’ Prop hz : motive z hs : βˆ€ (n : ↑N0), motive n β†’ motive (S n) x : ↑N0 A : Set ↑N0 := {x | motive x} hzmem : z ∈ A n : ↑N0 hel : n ∈ A ⊒ motive (S n)
motive : ↑N0 β†’ Prop hz : motive z hs : βˆ€ (n : ↑N0), motive n β†’ motive (S n) x : ↑N0 A : Set ↑N0 := {x | motive x} hzmem : z ∈ A n : ↑N0 hel : motive n ⊒ motive (S n)
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
generic_recursor
[31, 1]
[52, 12]
specialize hs n
motive : ↑N0 β†’ Prop hz : motive z hs : βˆ€ (n : ↑N0), motive n β†’ motive (S n) x : ↑N0 A : Set ↑N0 := {x | motive x} hzmem : z ∈ A n : ↑N0 hel : motive n ⊒ motive (S n)
motive : ↑N0 β†’ Prop hz : motive z x : ↑N0 A : Set ↑N0 := {x | motive x} hzmem : z ∈ A n : ↑N0 hel : motive n hs : motive n β†’ motive (S n) ⊒ motive (S n)
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
generic_recursor
[31, 1]
[52, 12]
exact hs hel
motive : ↑N0 β†’ Prop hz : motive z x : ↑N0 A : Set ↑N0 := {x | motive x} hzmem : z ∈ A n : ↑N0 hel : motive n hs : motive n β†’ motive (S n) ⊒ motive (S n)
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
zero_plus_x_eq_eq
[57, 1]
[63, 19]
apply generic_recursor
⊒ βˆ€ (x : ↑N0), plus (z, x) = x
case hz ⊒ plus (z, z) = z case hs ⊒ βˆ€ (n : ↑N0), plus (z, n) = n β†’ plus (z, S n) = S n
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
zero_plus_x_eq_eq
[57, 1]
[63, 19]
exact zplus z
case hz ⊒ plus (z, z) = z
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
zero_plus_x_eq_eq
[57, 1]
[63, 19]
intros n hi
case hs ⊒ βˆ€ (n : ↑N0), plus (z, n) = n β†’ plus (z, S n) = S n
case hs n : ↑N0 hi : plus (z, n) = n ⊒ plus (z, S n) = S n
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
zero_plus_x_eq_eq
[57, 1]
[63, 19]
rw [splus, hi]
case hs n : ↑N0 hi : plus (z, n) = n ⊒ plus (z, S n) = S n
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
plus_assoc
[66, 1]
[74, 33]
apply generic_recursor
⊒ βˆ€ (c a b : ↑N0), plus (a, plus (b, c)) = plus (plus (a, b), c)
case hz ⊒ βˆ€ (a b : ↑N0), plus (a, plus (b, z)) = plus (plus (a, b), z) case hs ⊒ βˆ€ (n : ↑N0), (βˆ€ (a b : ↑N0), plus (a, plus (b, n)) = plus (plus (a, b), n)) β†’ βˆ€ (a b : ↑N0), plus (a, plus (b, S n)) = plus (plus (a, b), S n)
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
plus_assoc
[66, 1]
[74, 33]
intro a b
case hz ⊒ βˆ€ (a b : ↑N0), plus (a, plus (b, z)) = plus (plus (a, b), z)
case hz a b : ↑N0 ⊒ plus (a, plus (b, z)) = plus (plus (a, b), z)
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
plus_assoc
[66, 1]
[74, 33]
rw [zplus, zplus]
case hz a b : ↑N0 ⊒ plus (a, plus (b, z)) = plus (plus (a, b), z)
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
plus_assoc
[66, 1]
[74, 33]
intro c hi a b
case hs ⊒ βˆ€ (n : ↑N0), (βˆ€ (a b : ↑N0), plus (a, plus (b, n)) = plus (plus (a, b), n)) β†’ βˆ€ (a b : ↑N0), plus (a, plus (b, S n)) = plus (plus (a, b), S n)
case hs c : ↑N0 hi : βˆ€ (a b : ↑N0), plus (a, plus (b, c)) = plus (plus (a, b), c) a b : ↑N0 ⊒ plus (a, plus (b, S c)) = plus (plus (a, b), S c)
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
plus_assoc
[66, 1]
[74, 33]
specialize hi a b
case hs c : ↑N0 hi : βˆ€ (a b : ↑N0), plus (a, plus (b, c)) = plus (plus (a, b), c) a b : ↑N0 ⊒ plus (a, plus (b, S c)) = plus (plus (a, b), S c)
case hs c a b : ↑N0 hi : plus (a, plus (b, c)) = plus (plus (a, b), c) ⊒ plus (a, plus (b, S c)) = plus (plus (a, b), S c)
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
plus_assoc
[66, 1]
[74, 33]
rw [splus, splus, hi, splus]
case hs c a b : ↑N0 hi : plus (a, plus (b, c)) = plus (plus (a, b), c) ⊒ plus (a, plus (b, S c)) = plus (plus (a, b), S c)
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
mul_distrib_add
[76, 1]
[84, 43]
apply generic_recursor
⊒ βˆ€ (c a b : ↑N0), mul (a, plus (b, c)) = plus (mul (a, b), mul (a, c))
case hz ⊒ βˆ€ (a b : ↑N0), mul (a, plus (b, z)) = plus (mul (a, b), mul (a, z)) case hs ⊒ βˆ€ (n : ↑N0), (βˆ€ (a b : ↑N0), mul (a, plus (b, n)) = plus (mul (a, b), mul (a, n))) β†’ βˆ€ (a b : ↑N0), mul (a, plus (b, S n)) = plus (mul (a, b), mul (a, S n))
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
mul_distrib_add
[76, 1]
[84, 43]
intro a b
case hz ⊒ βˆ€ (a b : ↑N0), mul (a, plus (b, z)) = plus (mul (a, b), mul (a, z))
case hz a b : ↑N0 ⊒ mul (a, plus (b, z)) = plus (mul (a, b), mul (a, z))
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
mul_distrib_add
[76, 1]
[84, 43]
rw [zplus, zmul, zplus]
case hz a b : ↑N0 ⊒ mul (a, plus (b, z)) = plus (mul (a, b), mul (a, z))
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
mul_distrib_add
[76, 1]
[84, 43]
intro c hi a b
case hs ⊒ βˆ€ (n : ↑N0), (βˆ€ (a b : ↑N0), mul (a, plus (b, n)) = plus (mul (a, b), mul (a, n))) β†’ βˆ€ (a b : ↑N0), mul (a, plus (b, S n)) = plus (mul (a, b), mul (a, S n))
case hs c : ↑N0 hi : βˆ€ (a b : ↑N0), mul (a, plus (b, c)) = plus (mul (a, b), mul (a, c)) a b : ↑N0 ⊒ mul (a, plus (b, S c)) = plus (mul (a, b), mul (a, S c))
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
mul_distrib_add
[76, 1]
[84, 43]
specialize hi a b
case hs c : ↑N0 hi : βˆ€ (a b : ↑N0), mul (a, plus (b, c)) = plus (mul (a, b), mul (a, c)) a b : ↑N0 ⊒ mul (a, plus (b, S c)) = plus (mul (a, b), mul (a, S c))
case hs c a b : ↑N0 hi : mul (a, plus (b, c)) = plus (mul (a, b), mul (a, c)) ⊒ mul (a, plus (b, S c)) = plus (mul (a, b), mul (a, S c))
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
mul_distrib_add
[76, 1]
[84, 43]
rw [splus, smul, smul, hi, plus_assoc]
case hs c a b : ↑N0 hi : mul (a, plus (b, c)) = plus (mul (a, b), mul (a, c)) ⊒ mul (a, plus (b, S c)) = plus (mul (a, b), mul (a, S c))
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
mul_assoc'
[86, 1]
[94, 41]
apply generic_recursor
⊒ βˆ€ (c a b : ↑N0), mul (mul (a, b), c) = mul (a, mul (b, c))
case hz ⊒ βˆ€ (a b : ↑N0), mul (mul (a, b), z) = mul (a, mul (b, z)) case hs ⊒ βˆ€ (n : ↑N0), (βˆ€ (a b : ↑N0), mul (mul (a, b), n) = mul (a, mul (b, n))) β†’ βˆ€ (a b : ↑N0), mul (mul (a, b), S n) = mul (a, mul (b, S n))
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
mul_assoc'
[86, 1]
[94, 41]
intro a b
case hz ⊒ βˆ€ (a b : ↑N0), mul (mul (a, b), z) = mul (a, mul (b, z))
case hz a b : ↑N0 ⊒ mul (mul (a, b), z) = mul (a, mul (b, z))
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
mul_assoc'
[86, 1]
[94, 41]
rw [zmul, zmul, zmul]
case hz a b : ↑N0 ⊒ mul (mul (a, b), z) = mul (a, mul (b, z))
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
mul_assoc'
[86, 1]
[94, 41]
intro c hi a b
case hs ⊒ βˆ€ (n : ↑N0), (βˆ€ (a b : ↑N0), mul (mul (a, b), n) = mul (a, mul (b, n))) β†’ βˆ€ (a b : ↑N0), mul (mul (a, b), S n) = mul (a, mul (b, S n))
case hs c : ↑N0 hi : βˆ€ (a b : ↑N0), mul (mul (a, b), c) = mul (a, mul (b, c)) a b : ↑N0 ⊒ mul (mul (a, b), S c) = mul (a, mul (b, S c))
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
mul_assoc'
[86, 1]
[94, 41]
specialize hi a b
case hs c : ↑N0 hi : βˆ€ (a b : ↑N0), mul (mul (a, b), c) = mul (a, mul (b, c)) a b : ↑N0 ⊒ mul (mul (a, b), S c) = mul (a, mul (b, S c))
case hs c a b : ↑N0 hi : mul (mul (a, b), c) = mul (a, mul (b, c)) ⊒ mul (mul (a, b), S c) = mul (a, mul (b, S c))
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
mul_assoc'
[86, 1]
[94, 41]
rw [smul, smul, hi, mul_distrib_add]
case hs c a b : ↑N0 hi : mul (mul (a, b), c) = mul (a, mul (b, c)) ⊒ mul (mul (a, b), S c) = mul (a, mul (b, S c))
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
exp_add_eq_mul_exp_exp
[96, 1]
[104, 43]
apply generic_recursor
⊒ βˆ€ (r m n : ↑N0), exp (m, plus (n, r)) = mul (exp (m, n), exp (m, r))
case hz ⊒ βˆ€ (m n : ↑N0), exp (m, plus (n, z)) = mul (exp (m, n), exp (m, z)) case hs ⊒ βˆ€ (n : ↑N0), (βˆ€ (m n_1 : ↑N0), exp (m, plus (n_1, n)) = mul (exp (m, n_1), exp (m, n))) β†’ βˆ€ (m n_1 : ↑N0), exp (m, plus (n_1, S n)) = mul (exp (m, n_1), exp (m, S n))
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
exp_add_eq_mul_exp_exp
[96, 1]
[104, 43]
intros m n
case hz ⊒ βˆ€ (m n : ↑N0), exp (m, plus (n, z)) = mul (exp (m, n), exp (m, z))
case hz m n : ↑N0 ⊒ exp (m, plus (n, z)) = mul (exp (m, n), exp (m, z))
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
exp_add_eq_mul_exp_exp
[96, 1]
[104, 43]
rw [zplus, zexp, smul, zmul, zero_plus_x_eq_eq]
case hz m n : ↑N0 ⊒ exp (m, plus (n, z)) = mul (exp (m, n), exp (m, z))
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
exp_add_eq_mul_exp_exp
[96, 1]
[104, 43]
intros r hi m n
case hs ⊒ βˆ€ (n : ↑N0), (βˆ€ (m n_1 : ↑N0), exp (m, plus (n_1, n)) = mul (exp (m, n_1), exp (m, n))) β†’ βˆ€ (m n_1 : ↑N0), exp (m, plus (n_1, S n)) = mul (exp (m, n_1), exp (m, S n))
case hs r : ↑N0 hi : βˆ€ (m n : ↑N0), exp (m, plus (n, r)) = mul (exp (m, n), exp (m, r)) m n : ↑N0 ⊒ exp (m, plus (n, S r)) = mul (exp (m, n), exp (m, S r))
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
exp_add_eq_mul_exp_exp
[96, 1]
[104, 43]
specialize hi m n
case hs r : ↑N0 hi : βˆ€ (m n : ↑N0), exp (m, plus (n, r)) = mul (exp (m, n), exp (m, r)) m n : ↑N0 ⊒ exp (m, plus (n, S r)) = mul (exp (m, n), exp (m, S r))
case hs r m n : ↑N0 hi : exp (m, plus (n, r)) = mul (exp (m, n), exp (m, r)) ⊒ exp (m, plus (n, S r)) = mul (exp (m, n), exp (m, S r))
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
exp_add_eq_mul_exp_exp
[96, 1]
[104, 43]
rw [splus, sexp, sexp, hi, mul_assoc']
case hs r m n : ↑N0 hi : exp (m, plus (n, r)) = mul (exp (m, n), exp (m, r)) ⊒ exp (m, plus (n, S r)) = mul (exp (m, n), exp (m, S r))
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
exp_assoc
[107, 1]
[115, 48]
apply generic_recursor
⊒ βˆ€ (r m n : ↑N0), exp (exp (m, n), r) = exp (m, mul (n, r))
case hz ⊒ βˆ€ (m n : ↑N0), exp (exp (m, n), z) = exp (m, mul (n, z)) case hs ⊒ βˆ€ (n : ↑N0), (βˆ€ (m n_1 : ↑N0), exp (exp (m, n_1), n) = exp (m, mul (n_1, n))) β†’ βˆ€ (m n_1 : ↑N0), exp (exp (m, n_1), S n) = exp (m, mul (n_1, S n))
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
exp_assoc
[107, 1]
[115, 48]
intros m n
case hz ⊒ βˆ€ (m n : ↑N0), exp (exp (m, n), z) = exp (m, mul (n, z))
case hz m n : ↑N0 ⊒ exp (exp (m, n), z) = exp (m, mul (n, z))
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
exp_assoc
[107, 1]
[115, 48]
rw [zexp, zmul, zexp]
case hz m n : ↑N0 ⊒ exp (exp (m, n), z) = exp (m, mul (n, z))
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
exp_assoc
[107, 1]
[115, 48]
intros r hi m n
case hs ⊒ βˆ€ (n : ↑N0), (βˆ€ (m n_1 : ↑N0), exp (exp (m, n_1), n) = exp (m, mul (n_1, n))) β†’ βˆ€ (m n_1 : ↑N0), exp (exp (m, n_1), S n) = exp (m, mul (n_1, S n))
case hs r : ↑N0 hi : βˆ€ (m n : ↑N0), exp (exp (m, n), r) = exp (m, mul (n, r)) m n : ↑N0 ⊒ exp (exp (m, n), S r) = exp (m, mul (n, S r))
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
exp_assoc
[107, 1]
[115, 48]
specialize hi m n
case hs r : ↑N0 hi : βˆ€ (m n : ↑N0), exp (exp (m, n), r) = exp (m, mul (n, r)) m n : ↑N0 ⊒ exp (exp (m, n), S r) = exp (m, mul (n, S r))
case hs r m n : ↑N0 hi : exp (exp (m, n), r) = exp (m, mul (n, r)) ⊒ exp (exp (m, n), S r) = exp (m, mul (n, S r))
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
exp_assoc
[107, 1]
[115, 48]
rw [smul, sexp, exp_add_eq_mul_exp_exp, hi]
case hs r m n : ↑N0 hi : exp (exp (m, n), r) = exp (m, mul (n, r)) ⊒ exp (exp (m, n), S r) = exp (m, mul (n, S r))
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
succ_zero_mul_eq_self'
[120, 1]
[126, 32]
apply generic_recursor
⊒ βˆ€ (x : ↑N0), mul (S z, x) = x
case hz ⊒ mul (S z, z) = z case hs ⊒ βˆ€ (n : ↑N0), mul (S z, n) = n β†’ mul (S z, S n) = S n
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
succ_zero_mul_eq_self'
[120, 1]
[126, 32]
rw [zmul]
case hz ⊒ mul (S z, z) = z
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
succ_zero_mul_eq_self'
[120, 1]
[126, 32]
intros x hi
case hs ⊒ βˆ€ (n : ↑N0), mul (S z, n) = n β†’ mul (S z, S n) = S n
case hs x : ↑N0 hi : mul (S z, x) = x ⊒ mul (S z, S x) = S x
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
succ_zero_mul_eq_self'
[120, 1]
[126, 32]
rw [smul, hi, splus, zplus]
case hs x : ↑N0 hi : mul (S z, x) = x ⊒ mul (S z, S x) = S x
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
zero_mul_eq_zero
[128, 1]
[134, 37]
apply generic_recursor
⊒ βˆ€ (x : ↑N0), mul (z, x) = z
case hz ⊒ mul (z, z) = z case hs ⊒ βˆ€ (n : ↑N0), mul (z, n) = z β†’ mul (z, S n) = z
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
zero_mul_eq_zero
[128, 1]
[134, 37]
rw [zmul]
case hz ⊒ mul (z, z) = z
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
zero_mul_eq_zero
[128, 1]
[134, 37]
intro x hi
case hs ⊒ βˆ€ (n : ↑N0), mul (z, n) = z β†’ mul (z, S n) = z
case hs x : ↑N0 hi : mul (z, x) = z ⊒ mul (z, S x) = z
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
zero_mul_eq_zero
[128, 1]
[134, 37]
rw [smul, hi, zero_plus_x_eq_eq]
case hs x : ↑N0 hi : mul (z, x) = z ⊒ mul (z, S x) = z
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
succ_plus_eq_succ_plus
[136, 1]
[144, 27]
apply generic_recursor
⊒ βˆ€ (b a : ↑N0), plus (S a, b) = S (plus (a, b))
case hz ⊒ βˆ€ (a : ↑N0), plus (S a, z) = S (plus (a, z)) case hs ⊒ βˆ€ (n : ↑N0), (βˆ€ (a : ↑N0), plus (S a, n) = S (plus (a, n))) β†’ βˆ€ (a : ↑N0), plus (S a, S n) = S (plus (a, S n))
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
succ_plus_eq_succ_plus
[136, 1]
[144, 27]
intro a
case hz ⊒ βˆ€ (a : ↑N0), plus (S a, z) = S (plus (a, z))
case hz a : ↑N0 ⊒ plus (S a, z) = S (plus (a, z))
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
succ_plus_eq_succ_plus
[136, 1]
[144, 27]
rw [zplus, zplus]
case hz a : ↑N0 ⊒ plus (S a, z) = S (plus (a, z))
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
succ_plus_eq_succ_plus
[136, 1]
[144, 27]
intro b hi a
case hs ⊒ βˆ€ (n : ↑N0), (βˆ€ (a : ↑N0), plus (S a, n) = S (plus (a, n))) β†’ βˆ€ (a : ↑N0), plus (S a, S n) = S (plus (a, S n))
case hs b : ↑N0 hi : βˆ€ (a : ↑N0), plus (S a, b) = S (plus (a, b)) a : ↑N0 ⊒ plus (S a, S b) = S (plus (a, S b))
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
succ_plus_eq_succ_plus
[136, 1]
[144, 27]
specialize hi a
case hs b : ↑N0 hi : βˆ€ (a : ↑N0), plus (S a, b) = S (plus (a, b)) a : ↑N0 ⊒ plus (S a, S b) = S (plus (a, S b))
case hs b a : ↑N0 hi : plus (S a, b) = S (plus (a, b)) ⊒ plus (S a, S b) = S (plus (a, S b))
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex6.lean
succ_plus_eq_succ_plus
[136, 1]
[144, 27]
rw [splus, hi, ←splus]
case hs b a : ↑N0 hi : plus (S a, b) = S (plus (a, b)) ⊒ plus (S a, S b) = S (plus (a, S b))
no goals