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
FactorizationCentralBinom.leOne
[47, 1]
[59, 13]
have hp := Nat.Prime.one_lt hp
n p : β„• hp : Nat.Prime p hnp✝ : 2 * n < p ^ 2 hnp : 2 * n ≀ p ^ 2 - 1 ⊒ Nat.log p (p ^ 2 - 1) < Nat.succ 1
n p : β„• hp✝ : Nat.Prime p hnp✝ : 2 * n < p ^ 2 hnp : 2 * n ≀ p ^ 2 - 1 hp : 1 < p ⊒ Nat.log p (p ^ 2 - 1) < Nat.succ 1
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
FactorizationCentralBinom.leOne
[47, 1]
[59, 13]
apply Nat.log_lt_of_lt_pow
n p : β„• hp✝ : Nat.Prime p hnp✝ : 2 * n < p ^ 2 hnp : 2 * n ≀ p ^ 2 - 1 hp : 1 < p ⊒ Nat.log p (p ^ 2 - 1) < Nat.succ 1
case hy n p : β„• hp✝ : Nat.Prime p hnp✝ : 2 * n < p ^ 2 hnp : 2 * n ≀ p ^ 2 - 1 hp : 1 < p ⊒ p ^ 2 - 1 β‰  0 case a n p : β„• hp✝ : Nat.Prime p hnp✝ : 2 * n < p ^ 2 hnp : 2 * n ≀ p ^ 2 - 1 hp : 1 < p ⊒ p ^ 2 - 1 < p ^ Nat.succ 1
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
FactorizationCentralBinom.leOne
[47, 1]
[59, 13]
. simp [hp]
case hy n p : β„• hp✝ : Nat.Prime p hnp✝ : 2 * n < p ^ 2 hnp : 2 * n ≀ p ^ 2 - 1 hp : 1 < p ⊒ p ^ 2 - 1 β‰  0 case a n p : β„• hp✝ : Nat.Prime p hnp✝ : 2 * n < p ^ 2 hnp : 2 * n ≀ p ^ 2 - 1 hp : 1 < p ⊒ p ^ 2 - 1 < p ^ Nat.succ 1
case a n p : β„• hp✝ : Nat.Prime p hnp✝ : 2 * n < p ^ 2 hnp : 2 * n ≀ p ^ 2 - 1 hp : 1 < p ⊒ p ^ 2 - 1 < p ^ Nat.succ 1
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
FactorizationCentralBinom.leOne
[47, 1]
[59, 13]
. apply Nat.pred_lt simp [hp] linarith
case a n p : β„• hp✝ : Nat.Prime p hnp✝ : 2 * n < p ^ 2 hnp : 2 * n ≀ p ^ 2 - 1 hp : 1 < p ⊒ p ^ 2 - 1 < p ^ Nat.succ 1
no goals
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
FactorizationCentralBinom.leOne
[47, 1]
[59, 13]
simp [hp]
case hy n p : β„• hp✝ : Nat.Prime p hnp✝ : 2 * n < p ^ 2 hnp : 2 * n ≀ p ^ 2 - 1 hp : 1 < p ⊒ p ^ 2 - 1 β‰  0
no goals
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
FactorizationCentralBinom.leOne
[47, 1]
[59, 13]
apply Nat.pred_lt
case a n p : β„• hp✝ : Nat.Prime p hnp✝ : 2 * n < p ^ 2 hnp : 2 * n ≀ p ^ 2 - 1 hp : 1 < p ⊒ p ^ 2 - 1 < p ^ Nat.succ 1
case a.a n p : β„• hp✝ : Nat.Prime p hnp✝ : 2 * n < p ^ 2 hnp : 2 * n ≀ p ^ 2 - 1 hp : 1 < p ⊒ Nat.sub (p ^ 2) 0 β‰  0
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
FactorizationCentralBinom.leOne
[47, 1]
[59, 13]
simp [hp]
case a.a n p : β„• hp✝ : Nat.Prime p hnp✝ : 2 * n < p ^ 2 hnp : 2 * n ≀ p ^ 2 - 1 hp : 1 < p ⊒ Nat.sub (p ^ 2) 0 β‰  0
case a.a n p : β„• hp✝ : Nat.Prime p hnp✝ : 2 * n < p ^ 2 hnp : 2 * n ≀ p ^ 2 - 1 hp : 1 < p ⊒ Β¬p = 0
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
FactorizationCentralBinom.leOne
[47, 1]
[59, 13]
linarith
case a.a n p : β„• hp✝ : Nat.Prime p hnp✝ : 2 * n < p ^ 2 hnp : 2 * n ≀ p ^ 2 - 1 hp : 1 < p ⊒ Β¬p = 0
no goals
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
FactorizationCentralBinom.prodIcoPowLePow
[62, 1]
[67, 11]
apply Finset.prod_le_pow_card
n : β„• s : Finset β„• hn : 0 < n ⊒ ∏ p in s, p ^ ↑(Nat.factorization (Nat.centralBinom n)) p ≀ (2 * n) ^ Finset.card s
case h n : β„• s : Finset β„• hn : 0 < n ⊒ βˆ€ (x : β„•), x ∈ s β†’ x ^ ↑(Nat.factorization (Nat.centralBinom n)) x ≀ 2 * n
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
FactorizationCentralBinom.prodIcoPowLePow
[62, 1]
[67, 11]
intro x _
case h n : β„• s : Finset β„• hn : 0 < n ⊒ βˆ€ (x : β„•), x ∈ s β†’ x ^ ↑(Nat.factorization (Nat.centralBinom n)) x ≀ 2 * n
case h n : β„• s : Finset β„• hn : 0 < n x : β„• a✝ : x ∈ s ⊒ x ^ ↑(Nat.factorization (Nat.centralBinom n)) x ≀ 2 * n
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
FactorizationCentralBinom.prodIcoPowLePow
[62, 1]
[67, 11]
apply Nat.pow_factorization_choose_le
case h n : β„• s : Finset β„• hn : 0 < n x : β„• a✝ : x ∈ s ⊒ x ^ ↑(Nat.factorization (Nat.centralBinom n)) x ≀ 2 * n
case h.hn n : β„• s : Finset β„• hn : 0 < n x : β„• a✝ : x ∈ s ⊒ 0 < 2 * n
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
FactorizationCentralBinom.prodIcoPowLePow
[62, 1]
[67, 11]
linarith
case h.hn n : β„• s : Finset β„• hn : 0 < n x : β„• a✝ : x ∈ s ⊒ 0 < 2 * n
no goals
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
FactorizationCentralBinom.prodIcoPowLePow'
[70, 1]
[76, 58]
apply Finset.prod_le_pow_card
n : β„• s : Finset β„• hs : n = 0 β†’ s = βˆ… ⊒ ∏ p in s, p ^ ↑(Nat.factorization (Nat.centralBinom n)) p ≀ (2 * n) ^ Finset.card s
case h n : β„• s : Finset β„• hs : n = 0 β†’ s = βˆ… ⊒ βˆ€ (x : β„•), x ∈ s β†’ x ^ ↑(Nat.factorization (Nat.centralBinom n)) x ≀ 2 * n
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
FactorizationCentralBinom.prodIcoPowLePow'
[70, 1]
[76, 58]
intro x hx
case h n : β„• s : Finset β„• hs : n = 0 β†’ s = βˆ… ⊒ βˆ€ (x : β„•), x ∈ s β†’ x ^ ↑(Nat.factorization (Nat.centralBinom n)) x ≀ 2 * n
case h n : β„• s : Finset β„• hs : n = 0 β†’ s = βˆ… x : β„• hx : x ∈ s ⊒ x ^ ↑(Nat.factorization (Nat.centralBinom n)) x ≀ 2 * n
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
FactorizationCentralBinom.prodIcoPowLePow'
[70, 1]
[76, 58]
cases n with | zero => simp at hs; rw [hs] at hx; contradiction | succ n => apply Nat.pow_factorization_choose_le; simp
case h n : β„• s : Finset β„• hs : n = 0 β†’ s = βˆ… x : β„• hx : x ∈ s ⊒ x ^ ↑(Nat.factorization (Nat.centralBinom n)) x ≀ 2 * n
no goals
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
FactorizationCentralBinom.prodIcoPowLePow'
[70, 1]
[76, 58]
simp at hs
case h.zero s : Finset β„• x : β„• hx : x ∈ s hs : Nat.zero = 0 β†’ s = βˆ… ⊒ x ^ ↑(Nat.factorization (Nat.centralBinom Nat.zero)) x ≀ 2 * Nat.zero
case h.zero s : Finset β„• x : β„• hx : x ∈ s hs : s = βˆ… ⊒ x ^ ↑(Nat.factorization (Nat.centralBinom Nat.zero)) x ≀ 2 * Nat.zero
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
FactorizationCentralBinom.prodIcoPowLePow'
[70, 1]
[76, 58]
rw [hs] at hx
case h.zero s : Finset β„• x : β„• hx : x ∈ s hs : s = βˆ… ⊒ x ^ ↑(Nat.factorization (Nat.centralBinom Nat.zero)) x ≀ 2 * Nat.zero
case h.zero s : Finset β„• x : β„• hx : x ∈ βˆ… hs : s = βˆ… ⊒ x ^ ↑(Nat.factorization (Nat.centralBinom Nat.zero)) x ≀ 2 * Nat.zero
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
FactorizationCentralBinom.prodIcoPowLePow'
[70, 1]
[76, 58]
contradiction
case h.zero s : Finset β„• x : β„• hx : x ∈ βˆ… hs : s = βˆ… ⊒ x ^ ↑(Nat.factorization (Nat.centralBinom Nat.zero)) x ≀ 2 * Nat.zero
no goals
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
FactorizationCentralBinom.prodIcoPowLePow'
[70, 1]
[76, 58]
apply Nat.pow_factorization_choose_le
case h.succ s : Finset β„• x : β„• hx : x ∈ s n : β„• hs : Nat.succ n = 0 β†’ s = βˆ… ⊒ x ^ ↑(Nat.factorization (Nat.centralBinom (Nat.succ n))) x ≀ 2 * Nat.succ n
case h.succ.hn s : Finset β„• x : β„• hx : x ∈ s n : β„• hs : Nat.succ n = 0 β†’ s = βˆ… ⊒ 0 < 2 * Nat.succ n
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
FactorizationCentralBinom.prodIcoPowLePow'
[70, 1]
[76, 58]
simp
case h.succ.hn s : Finset β„• x : β„• hx : x ∈ s n : β„• hs : Nat.succ n = 0 β†’ s = βˆ… ⊒ 0 < 2 * Nat.succ n
no goals
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
FactorizationCentralBinom.prodRangePowEqProdIcoPowOfLeTwo
[79, 1]
[90, 11]
rw [Finset.range_eq_Ico]
n a b : β„• ha : a ≀ 2 ⊒ ∏ p in Finset.range b, p ^ ↑(Nat.factorization (Nat.centralBinom n)) p = ∏ p in Finset.Ico a b, p ^ ↑(Nat.factorization (Nat.centralBinom n)) p
n a b : β„• ha : a ≀ 2 ⊒ ∏ p in Finset.Ico 0 b, p ^ ↑(Nat.factorization (Nat.centralBinom n)) p = ∏ p in Finset.Ico a b, p ^ ↑(Nat.factorization (Nat.centralBinom n)) p
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
FactorizationCentralBinom.prodRangePowEqProdIcoPowOfLeTwo
[79, 1]
[90, 11]
rw [← Finset.prod_subset (Finset.Ico_subset_Ico_left (Nat.zero_le a)) _]
n a b : β„• ha : a ≀ 2 ⊒ ∏ p in Finset.Ico 0 b, p ^ ↑(Nat.factorization (Nat.centralBinom n)) p = ∏ p in Finset.Ico a b, p ^ ↑(Nat.factorization (Nat.centralBinom n)) p
n a b : β„• ha : a ≀ 2 ⊒ βˆ€ (x : β„•), x ∈ Finset.Ico 0 b β†’ Β¬x ∈ Finset.Ico a b β†’ x ^ ↑(Nat.factorization (Nat.centralBinom n)) x = 1
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
FactorizationCentralBinom.prodRangePowEqProdIcoPowOfLeTwo
[79, 1]
[90, 11]
simp
n a b : β„• ha : a ≀ 2 ⊒ βˆ€ (x : β„•), x ∈ Finset.Ico 0 b β†’ Β¬x ∈ Finset.Ico a b β†’ x ^ ↑(Nat.factorization (Nat.centralBinom n)) x = 1
n a b : β„• ha : a ≀ 2 ⊒ βˆ€ (x : β„•), x < b β†’ (a ≀ x β†’ b ≀ x) β†’ x ^ ↑(Nat.factorization (Nat.centralBinom n)) x = 1
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
FactorizationCentralBinom.prodRangePowEqProdIcoPowOfLeTwo
[79, 1]
[90, 11]
intro x hxb hbx
n a b : β„• ha : a ≀ 2 ⊒ βˆ€ (x : β„•), x < b β†’ (a ≀ x β†’ b ≀ x) β†’ x ^ ↑(Nat.factorization (Nat.centralBinom n)) x = 1
n a b : β„• ha : a ≀ 2 x : β„• hxb : x < b hbx : a ≀ x β†’ b ≀ x ⊒ x ^ ↑(Nat.factorization (Nat.centralBinom n)) x = 1
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
FactorizationCentralBinom.prodRangePowEqProdIcoPowOfLeTwo
[79, 1]
[90, 11]
rw [Nat.factorization_eq_zero_of_non_prime]
n a b : β„• ha : a ≀ 2 x : β„• hxb : x < b hbx : a ≀ x β†’ b ≀ x ⊒ x ^ ↑(Nat.factorization (Nat.centralBinom n)) x = 1
n a b : β„• ha : a ≀ 2 x : β„• hxb : x < b hbx : a ≀ x β†’ b ≀ x ⊒ x ^ 0 = 1 case hp n a b : β„• ha : a ≀ 2 x : β„• hxb : x < b hbx : a ≀ x β†’ b ≀ x ⊒ Β¬Nat.Prime x
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
FactorizationCentralBinom.prodRangePowEqProdIcoPowOfLeTwo
[79, 1]
[90, 11]
simp
n a b : β„• ha : a ≀ 2 x : β„• hxb : x < b hbx : a ≀ x β†’ b ≀ x ⊒ x ^ 0 = 1 case hp n a b : β„• ha : a ≀ 2 x : β„• hxb : x < b hbx : a ≀ x β†’ b ≀ x ⊒ Β¬Nat.Prime x
case hp n a b : β„• ha : a ≀ 2 x : β„• hxb : x < b hbx : a ≀ x β†’ b ≀ x ⊒ Β¬Nat.Prime x
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
FactorizationCentralBinom.prodRangePowEqProdIcoPowOfLeTwo
[79, 1]
[90, 11]
intro hp
case hp n a b : β„• ha : a ≀ 2 x : β„• hxb : x < b hbx : a ≀ x β†’ b ≀ x ⊒ Β¬Nat.Prime x
case hp n a b : β„• ha : a ≀ 2 x : β„• hxb : x < b hbx : a ≀ x β†’ b ≀ x hp : Nat.Prime x ⊒ False
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
FactorizationCentralBinom.prodRangePowEqProdIcoPowOfLeTwo
[79, 1]
[90, 11]
have hp := Nat.Prime.two_le hp
case hp n a b : β„• ha : a ≀ 2 x : β„• hxb : x < b hbx : a ≀ x β†’ b ≀ x hp : Nat.Prime x ⊒ False
case hp n a b : β„• ha : a ≀ 2 x : β„• hxb : x < b hbx : a ≀ x β†’ b ≀ x hp✝ : Nat.Prime x hp : 2 ≀ x ⊒ False
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
FactorizationCentralBinom.prodRangePowEqProdIcoPowOfLeTwo
[79, 1]
[90, 11]
specialize hbx (le_trans ha hp)
case hp n a b : β„• ha : a ≀ 2 x : β„• hxb : x < b hbx : a ≀ x β†’ b ≀ x hp✝ : Nat.Prime x hp : 2 ≀ x ⊒ False
case hp n a b : β„• ha : a ≀ 2 x : β„• hxb : x < b hp✝ : Nat.Prime x hp : 2 ≀ x hbx : b ≀ x ⊒ False
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
FactorizationCentralBinom.prodRangePowEqProdIcoPowOfLeTwo
[79, 1]
[90, 11]
linarith
case hp n a b : β„• ha : a ≀ 2 x : β„• hxb : x < b hp✝ : Nat.Prime x hp : 2 ≀ x hbx : b ≀ x ⊒ False
no goals
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
FactorizationCentralBinom.prodIocSqrtLePowLeProdPrimes
[93, 1]
[107, 39]
rw [primes]
n a b : β„• ha : Nat.sqrt (2 * n) ≀ a ⊒ ∏ p in Finset.Ioc a b, p ^ ↑(Nat.factorization (Nat.centralBinom n)) p ≀ ∏ p in primes (Finset.Ioc a b), p
n a b : β„• ha : Nat.sqrt (2 * n) ≀ a ⊒ ∏ p in Finset.Ioc a b, p ^ ↑(Nat.factorization (Nat.centralBinom n)) p ≀ ∏ p in Finset.filter Nat.Prime (Finset.Ioc a b), p
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
FactorizationCentralBinom.prodIocSqrtLePowLeProdPrimes
[93, 1]
[107, 39]
rw [← @Finset.prod_filter_of_ne _ _ _ _ _ Nat.Prime]
n a b : β„• ha : Nat.sqrt (2 * n) ≀ a ⊒ ∏ p in Finset.Ioc a b, p ^ ↑(Nat.factorization (Nat.centralBinom n)) p ≀ ∏ p in Finset.filter Nat.Prime (Finset.Ioc a b), p
n a b : β„• ha : Nat.sqrt (2 * n) ≀ a ⊒ ∏ x in Finset.filter Nat.Prime (Finset.Ioc a b), x ^ ↑(Nat.factorization (Nat.centralBinom n)) x ≀ ∏ p in Finset.filter Nat.Prime (Finset.Ioc a b), p case hp n a b : β„• ha : Nat.sqrt (2 * n) ≀ a ⊒ βˆ€ (x : β„•), x ∈ Finset.Ioc a b β†’ x ^ ↑(Nat.factorization (Nat.centralBinom n)) x β‰  1 β†’ Nat.Prime x
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
FactorizationCentralBinom.prodIocSqrtLePowLeProdPrimes
[93, 1]
[107, 39]
. apply Finset.prod_le_prod' simp intro p hbp _ hp replace hbp := lt_of_le_of_lt ha hbp conv => rhs; rw [← Nat.pow_one p] rw [pow_le_pow_iff (Nat.Prime.one_lt hp)] rw [Nat.sqrt_lt'] at hbp exact leOne hp hbp
n a b : β„• ha : Nat.sqrt (2 * n) ≀ a ⊒ ∏ x in Finset.filter Nat.Prime (Finset.Ioc a b), x ^ ↑(Nat.factorization (Nat.centralBinom n)) x ≀ ∏ p in Finset.filter Nat.Prime (Finset.Ioc a b), p case hp n a b : β„• ha : Nat.sqrt (2 * n) ≀ a ⊒ βˆ€ (x : β„•), x ∈ Finset.Ioc a b β†’ x ^ ↑(Nat.factorization (Nat.centralBinom n)) x β‰  1 β†’ Nat.Prime x
case hp n a b : β„• ha : Nat.sqrt (2 * n) ≀ a ⊒ βˆ€ (x : β„•), x ∈ Finset.Ioc a b β†’ x ^ ↑(Nat.factorization (Nat.centralBinom n)) x β‰  1 β†’ Nat.Prime x
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
FactorizationCentralBinom.prodIocSqrtLePowLeProdPrimes
[93, 1]
[107, 39]
. intro p _ apply primeOfPowFactorizationNeOne
case hp n a b : β„• ha : Nat.sqrt (2 * n) ≀ a ⊒ βˆ€ (x : β„•), x ∈ Finset.Ioc a b β†’ x ^ ↑(Nat.factorization (Nat.centralBinom n)) x β‰  1 β†’ Nat.Prime x
no goals
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
FactorizationCentralBinom.prodIocSqrtLePowLeProdPrimes
[93, 1]
[107, 39]
apply Finset.prod_le_prod'
n a b : β„• ha : Nat.sqrt (2 * n) ≀ a ⊒ ∏ x in Finset.filter Nat.Prime (Finset.Ioc a b), x ^ ↑(Nat.factorization (Nat.centralBinom n)) x ≀ ∏ p in Finset.filter Nat.Prime (Finset.Ioc a b), p
case h n a b : β„• ha : Nat.sqrt (2 * n) ≀ a ⊒ βˆ€ (i : β„•), i ∈ Finset.filter Nat.Prime (Finset.Ioc a b) β†’ i ^ ↑(Nat.factorization (Nat.centralBinom n)) i ≀ i
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
FactorizationCentralBinom.prodIocSqrtLePowLeProdPrimes
[93, 1]
[107, 39]
simp
case h n a b : β„• ha : Nat.sqrt (2 * n) ≀ a ⊒ βˆ€ (i : β„•), i ∈ Finset.filter Nat.Prime (Finset.Ioc a b) β†’ i ^ ↑(Nat.factorization (Nat.centralBinom n)) i ≀ i
case h n a b : β„• ha : Nat.sqrt (2 * n) ≀ a ⊒ βˆ€ (i : β„•), a < i β†’ i ≀ b β†’ Nat.Prime i β†’ i ^ ↑(Nat.factorization (Nat.centralBinom n)) i ≀ i
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
FactorizationCentralBinom.prodIocSqrtLePowLeProdPrimes
[93, 1]
[107, 39]
intro p hbp _ hp
case h n a b : β„• ha : Nat.sqrt (2 * n) ≀ a ⊒ βˆ€ (i : β„•), a < i β†’ i ≀ b β†’ Nat.Prime i β†’ i ^ ↑(Nat.factorization (Nat.centralBinom n)) i ≀ i
case h n a b : β„• ha : Nat.sqrt (2 * n) ≀ a p : β„• hbp : a < p a✝ : p ≀ b hp : Nat.Prime p ⊒ p ^ ↑(Nat.factorization (Nat.centralBinom n)) p ≀ p
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
FactorizationCentralBinom.prodIocSqrtLePowLeProdPrimes
[93, 1]
[107, 39]
replace hbp := lt_of_le_of_lt ha hbp
case h n a b : β„• ha : Nat.sqrt (2 * n) ≀ a p : β„• hbp : a < p a✝ : p ≀ b hp : Nat.Prime p ⊒ p ^ ↑(Nat.factorization (Nat.centralBinom n)) p ≀ p
case h n a b : β„• ha : Nat.sqrt (2 * n) ≀ a p : β„• a✝ : p ≀ b hp : Nat.Prime p hbp : Nat.sqrt (2 * n) < p ⊒ p ^ ↑(Nat.factorization (Nat.centralBinom n)) p ≀ p
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
FactorizationCentralBinom.prodIocSqrtLePowLeProdPrimes
[93, 1]
[107, 39]
conv => rhs; rw [← Nat.pow_one p]
case h n a b : β„• ha : Nat.sqrt (2 * n) ≀ a p : β„• a✝ : p ≀ b hp : Nat.Prime p hbp : Nat.sqrt (2 * n) < p ⊒ p ^ ↑(Nat.factorization (Nat.centralBinom n)) p ≀ p
case h n a b : β„• ha : Nat.sqrt (2 * n) ≀ a p : β„• a✝ : p ≀ b hp : Nat.Prime p hbp : Nat.sqrt (2 * n) < p ⊒ p ^ ↑(Nat.factorization (Nat.centralBinom n)) p ≀ p ^ 1
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
FactorizationCentralBinom.prodIocSqrtLePowLeProdPrimes
[93, 1]
[107, 39]
rw [pow_le_pow_iff (Nat.Prime.one_lt hp)]
case h n a b : β„• ha : Nat.sqrt (2 * n) ≀ a p : β„• a✝ : p ≀ b hp : Nat.Prime p hbp : Nat.sqrt (2 * n) < p ⊒ p ^ ↑(Nat.factorization (Nat.centralBinom n)) p ≀ p ^ 1
case h n a b : β„• ha : Nat.sqrt (2 * n) ≀ a p : β„• a✝ : p ≀ b hp : Nat.Prime p hbp : Nat.sqrt (2 * n) < p ⊒ ↑(Nat.factorization (Nat.centralBinom n)) p ≀ 1
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
FactorizationCentralBinom.prodIocSqrtLePowLeProdPrimes
[93, 1]
[107, 39]
rw [Nat.sqrt_lt'] at hbp
case h n a b : β„• ha : Nat.sqrt (2 * n) ≀ a p : β„• a✝ : p ≀ b hp : Nat.Prime p hbp : Nat.sqrt (2 * n) < p ⊒ ↑(Nat.factorization (Nat.centralBinom n)) p ≀ 1
case h n a b : β„• ha : Nat.sqrt (2 * n) ≀ a p : β„• a✝ : p ≀ b hp : Nat.Prime p hbp : 2 * n < p ^ 2 ⊒ ↑(Nat.factorization (Nat.centralBinom n)) p ≀ 1
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
FactorizationCentralBinom.prodIocSqrtLePowLeProdPrimes
[93, 1]
[107, 39]
exact leOne hp hbp
case h n a b : β„• ha : Nat.sqrt (2 * n) ≀ a p : β„• a✝ : p ≀ b hp : Nat.Prime p hbp : 2 * n < p ^ 2 ⊒ ↑(Nat.factorization (Nat.centralBinom n)) p ≀ 1
no goals
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
FactorizationCentralBinom.prodIocSqrtLePowLeProdPrimes
[93, 1]
[107, 39]
intro p _
case hp n a b : β„• ha : Nat.sqrt (2 * n) ≀ a ⊒ βˆ€ (x : β„•), x ∈ Finset.Ioc a b β†’ x ^ ↑(Nat.factorization (Nat.centralBinom n)) x β‰  1 β†’ Nat.Prime x
case hp n a b : β„• ha : Nat.sqrt (2 * n) ≀ a p : β„• a✝ : p ∈ Finset.Ioc a b ⊒ p ^ ↑(Nat.factorization (Nat.centralBinom n)) p β‰  1 β†’ Nat.Prime p
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
FactorizationCentralBinom.prodIocSqrtLePowLeProdPrimes
[93, 1]
[107, 39]
apply primeOfPowFactorizationNeOne
case hp n a b : β„• ha : Nat.sqrt (2 * n) ≀ a p : β„• a✝ : p ∈ Finset.Ioc a b ⊒ p ^ ↑(Nat.factorization (Nat.centralBinom n)) p β‰  1 β†’ Nat.Prime p
no goals
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
sqrtTwoMulLeSelf
[117, 1]
[120, 34]
conv => rhs; rw [← Nat.sqrt_eq n]
n : β„• hn : 2 ≀ n ⊒ Nat.sqrt (2 * n) ≀ n
n : β„• hn : 2 ≀ n ⊒ Nat.sqrt (2 * n) ≀ Nat.sqrt (n * n)
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
sqrtTwoMulLeSelf
[117, 1]
[120, 34]
apply Nat.sqrt_le_sqrt
n : β„• hn : 2 ≀ n ⊒ Nat.sqrt (2 * n) ≀ Nat.sqrt (n * n)
case h n : β„• hn : 2 ≀ n ⊒ 2 * n ≀ n * n
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
sqrtTwoMulLeSelf
[117, 1]
[120, 34]
exact Nat.mul_le_mul_right _ hn
case h n : β„• hn : 2 ≀ n ⊒ 2 * n ≀ n * n
no goals
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
prodRangePowFactorization
[122, 1]
[129, 9]
cases b with | zero => simp | succ b => rw [← Finset.prod_range_mul_prod_Ico _ (Nat.zero_lt_succ _)] simp
b n : β„• ⊒ ∏ p in Finset.range b, p ^ ↑(Nat.factorization n) p = ∏ p in Finset.Ico 1 b, p ^ ↑(Nat.factorization n) p
no goals
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
prodRangePowFactorization
[122, 1]
[129, 9]
simp
case zero n : β„• ⊒ ∏ p in Finset.range Nat.zero, p ^ ↑(Nat.factorization n) p = ∏ p in Finset.Ico 1 Nat.zero, p ^ ↑(Nat.factorization n) p
no goals
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
prodRangePowFactorization
[122, 1]
[129, 9]
rw [← Finset.prod_range_mul_prod_Ico _ (Nat.zero_lt_succ _)]
case succ n b : β„• ⊒ ∏ p in Finset.range (Nat.succ b), p ^ ↑(Nat.factorization n) p = ∏ p in Finset.Ico 1 (Nat.succ b), p ^ ↑(Nat.factorization n) p
case succ n b : β„• ⊒ (∏ k in Finset.range (Nat.succ 0), k ^ ↑(Nat.factorization n) k) * ∏ k in Finset.Ico (Nat.succ 0) (Nat.succ b), k ^ ↑(Nat.factorization n) k = ∏ p in Finset.Ico 1 (Nat.succ b), p ^ ↑(Nat.factorization n) p
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
prodRangePowFactorization
[122, 1]
[129, 9]
simp
case succ n b : β„• ⊒ (∏ k in Finset.range (Nat.succ 0), k ^ ↑(Nat.factorization n) k) * ∏ k in Finset.Ico (Nat.succ 0) (Nat.succ b), k ^ ↑(Nat.factorization n) k = ∏ p in Finset.Ico 1 (Nat.succ b), p ^ ↑(Nat.factorization n) p
no goals
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
powFactorizationPos
[131, 1]
[134, 60]
cases p with | zero => simp | succ p => exact Nat.one_le_pow _ _ (Nat.zero_lt_succ _)
n p : β„• ⊒ 0 < p ^ ↑(Nat.factorization n) p
no goals
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
powFactorizationPos
[131, 1]
[134, 60]
simp
case zero n : β„• ⊒ 0 < Nat.zero ^ ↑(Nat.factorization n) Nat.zero
no goals
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
powFactorizationPos
[131, 1]
[134, 60]
exact Nat.one_le_pow _ _ (Nat.zero_lt_succ _)
case succ n p : β„• ⊒ 0 < Nat.succ p ^ ↑(Nat.factorization n) (Nat.succ p)
no goals
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
prodLeProdMulProdOfUnionOfOneLe
[136, 1]
[144, 13]
rw [← Finset.prod_union_inter]
s t₁ tβ‚‚ : Finset β„• f : β„• β†’ β„• hs : s βŠ† t₁ βˆͺ tβ‚‚ hf : βˆ€ (y : β„•), 1 ≀ f y ⊒ ∏ x in s, f x ≀ (∏ x in t₁, f x) * ∏ x in tβ‚‚, f x
s t₁ tβ‚‚ : Finset β„• f : β„• β†’ β„• hs : s βŠ† t₁ βˆͺ tβ‚‚ hf : βˆ€ (y : β„•), 1 ≀ f y ⊒ ∏ x in s, f x ≀ (∏ x in t₁ βˆͺ tβ‚‚, f x) * ∏ x in t₁ ∩ tβ‚‚, f x
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
prodLeProdMulProdOfUnionOfOneLe
[136, 1]
[144, 13]
apply le_trans _ (Nat.le_mul_of_pos_right _)
s t₁ tβ‚‚ : Finset β„• f : β„• β†’ β„• hs : s βŠ† t₁ βˆͺ tβ‚‚ hf : βˆ€ (y : β„•), 1 ≀ f y ⊒ ∏ x in s, f x ≀ (∏ x in t₁ βˆͺ tβ‚‚, f x) * ∏ x in t₁ ∩ tβ‚‚, f x
s t₁ tβ‚‚ : Finset β„• f : β„• β†’ β„• hs : s βŠ† t₁ βˆͺ tβ‚‚ hf : βˆ€ (y : β„•), 1 ≀ f y ⊒ ∏ x in s, f x ≀ ∏ x in t₁ βˆͺ tβ‚‚, f x s t₁ tβ‚‚ : Finset β„• f : β„• β†’ β„• hs : s βŠ† t₁ βˆͺ tβ‚‚ hf : βˆ€ (y : β„•), 1 ≀ f y ⊒ 0 < ∏ x in t₁ ∩ tβ‚‚, f x
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
prodLeProdMulProdOfUnionOfOneLe
[136, 1]
[144, 13]
. exact Finset.prod_mono_set_of_one_le' hf hs
s t₁ tβ‚‚ : Finset β„• f : β„• β†’ β„• hs : s βŠ† t₁ βˆͺ tβ‚‚ hf : βˆ€ (y : β„•), 1 ≀ f y ⊒ ∏ x in s, f x ≀ ∏ x in t₁ βˆͺ tβ‚‚, f x s t₁ tβ‚‚ : Finset β„• f : β„• β†’ β„• hs : s βŠ† t₁ βˆͺ tβ‚‚ hf : βˆ€ (y : β„•), 1 ≀ f y ⊒ 0 < ∏ x in t₁ ∩ tβ‚‚, f x
s t₁ tβ‚‚ : Finset β„• f : β„• β†’ β„• hs : s βŠ† t₁ βˆͺ tβ‚‚ hf : βˆ€ (y : β„•), 1 ≀ f y ⊒ 0 < ∏ x in t₁ ∩ tβ‚‚, f x
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
prodLeProdMulProdOfUnionOfOneLe
[136, 1]
[144, 13]
. apply Finset.prod_pos intro x _ apply hf
s t₁ tβ‚‚ : Finset β„• f : β„• β†’ β„• hs : s βŠ† t₁ βˆͺ tβ‚‚ hf : βˆ€ (y : β„•), 1 ≀ f y ⊒ 0 < ∏ x in t₁ ∩ tβ‚‚, f x
no goals
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
prodLeProdMulProdOfUnionOfOneLe
[136, 1]
[144, 13]
exact Finset.prod_mono_set_of_one_le' hf hs
s t₁ tβ‚‚ : Finset β„• f : β„• β†’ β„• hs : s βŠ† t₁ βˆͺ tβ‚‚ hf : βˆ€ (y : β„•), 1 ≀ f y ⊒ ∏ x in s, f x ≀ ∏ x in t₁ βˆͺ tβ‚‚, f x
no goals
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
prodLeProdMulProdOfUnionOfOneLe
[136, 1]
[144, 13]
apply Finset.prod_pos
s t₁ tβ‚‚ : Finset β„• f : β„• β†’ β„• hs : s βŠ† t₁ βˆͺ tβ‚‚ hf : βˆ€ (y : β„•), 1 ≀ f y ⊒ 0 < ∏ x in t₁ ∩ tβ‚‚, f x
case h0 s t₁ tβ‚‚ : Finset β„• f : β„• β†’ β„• hs : s βŠ† t₁ βˆͺ tβ‚‚ hf : βˆ€ (y : β„•), 1 ≀ f y ⊒ βˆ€ (i : β„•), i ∈ t₁ ∩ tβ‚‚ β†’ 0 < f i
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
prodLeProdMulProdOfUnionOfOneLe
[136, 1]
[144, 13]
intro x _
case h0 s t₁ tβ‚‚ : Finset β„• f : β„• β†’ β„• hs : s βŠ† t₁ βˆͺ tβ‚‚ hf : βˆ€ (y : β„•), 1 ≀ f y ⊒ βˆ€ (i : β„•), i ∈ t₁ ∩ tβ‚‚ β†’ 0 < f i
case h0 s t₁ tβ‚‚ : Finset β„• f : β„• β†’ β„• hs : s βŠ† t₁ βˆͺ tβ‚‚ hf : βˆ€ (y : β„•), 1 ≀ f y x : β„• a✝ : x ∈ t₁ ∩ tβ‚‚ ⊒ 0 < f x
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
prodLeProdMulProdOfUnionOfOneLe
[136, 1]
[144, 13]
apply hf
case h0 s t₁ tβ‚‚ : Finset β„• f : β„• β†’ β„• hs : s βŠ† t₁ βˆͺ tβ‚‚ hf : βˆ€ (y : β„•), 1 ≀ f y x : β„• a✝ : x ∈ t₁ ∩ tβ‚‚ ⊒ 0 < f x
no goals
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
mulDivLeSelf
[146, 1]
[152, 37]
cases b with | zero => simp | succ b => conv => rhs; rw [← Nat.mul_div_right n (Nat.zero_lt_succ b)] apply Nat.div_le_div_right exact Nat.mul_le_mul_right _ hab
n a b : β„• hab : a ≀ b ⊒ a * n / b ≀ n
no goals
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
mulDivLeSelf
[146, 1]
[152, 37]
simp
case zero n a : β„• hab : a ≀ Nat.zero ⊒ a * n / Nat.zero ≀ n
no goals
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
mulDivLeSelf
[146, 1]
[152, 37]
conv => rhs; rw [← Nat.mul_div_right n (Nat.zero_lt_succ b)]
case succ n a b : β„• hab : a ≀ Nat.succ b ⊒ a * n / Nat.succ b ≀ n
case succ n a b : β„• hab : a ≀ Nat.succ b ⊒ a * n / Nat.succ b ≀ Nat.succ b * n / Nat.succ b
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
mulDivLeSelf
[146, 1]
[152, 37]
apply Nat.div_le_div_right
case succ n a b : β„• hab : a ≀ Nat.succ b ⊒ a * n / Nat.succ b ≀ Nat.succ b * n / Nat.succ b
case succ.h n a b : β„• hab : a ≀ Nat.succ b ⊒ a * n ≀ Nat.succ b * n
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
mulDivLeSelf
[146, 1]
[152, 37]
exact Nat.mul_le_mul_right _ hab
case succ.h n a b : β„• hab : a ≀ Nat.succ b ⊒ a * n ≀ Nat.succ b * n
no goals
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
mulRightLeOfLeOne
[154, 1]
[156, 28]
rw [← Nat.one_mul z]
x y z : β„• h1 : x ≀ 1 h : y ≀ z ⊒ x * y ≀ z
x y z : β„• h1 : x ≀ 1 h : y ≀ z ⊒ x * y ≀ 1 * z
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
mulRightLeOfLeOne
[154, 1]
[156, 28]
apply Nat.mul_le_mul h1 h
x y z : β„• h1 : x ≀ 1 h : y ≀ z ⊒ x * y ≀ 1 * z
no goals
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
mulLeftLeOfLeOne
[158, 1]
[160, 28]
rw [← Nat.mul_one z]
x y z : β„• h1 : y ≀ 1 h : x ≀ z ⊒ x * y ≀ z
x y z : β„• h1 : y ≀ 1 h : x ≀ z ⊒ x * y ≀ z * 1
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
mulLeftLeOfLeOne
[158, 1]
[160, 28]
apply Nat.mul_le_mul h h1
x y z : β„• h1 : y ≀ 1 h : x ≀ z ⊒ x * y ≀ z * 1
no goals
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
fourPowLeMulProdPrimes
[162, 1]
[216, 45]
apply le_trans (Nat.four_pow_le_two_mul_self_mul_centralBinom _ (by linarith))
n : β„• hn : 2 < n ⊒ 4 ^ n ≀ (2 * n) ^ (1 + Nat.sqrt (2 * n)) * 4 ^ Nat.pred (2 * n / 3) * ∏ p in primes (Finset.Ioc n (2 * n)), p
n : β„• hn : 2 < n ⊒ 2 * n * Nat.centralBinom n ≀ (2 * n) ^ (1 + Nat.sqrt (2 * n)) * 4 ^ Nat.pred (2 * n / 3) * ∏ 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]
rw [Nat.one_add, Nat.pow_succ]
n : β„• hn : 2 < n ⊒ 2 * n * Nat.centralBinom n ≀ (2 * n) ^ (1 + Nat.sqrt (2 * n)) * 4 ^ Nat.pred (2 * n / 3) * ∏ p in primes (Finset.Ioc n (2 * n)), p
n : β„• hn : 2 < n ⊒ 2 * n * Nat.centralBinom n ≀ (2 * n) ^ Nat.sqrt (2 * n) * (2 * n) * 4 ^ Nat.pred (2 * n / 3) * ∏ 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]
have : βˆ€ {x y z : β„•}, x * (2*n) * y * z = (2*n) * (x * y * z) := by intro x y z; linarith
n : β„• hn : 2 < n ⊒ 2 * n * Nat.centralBinom n ≀ (2 * n) ^ Nat.sqrt (2 * n) * (2 * n) * 4 ^ Nat.pred (2 * n / 3) * ∏ p in primes (Finset.Ioc n (2 * n)), p
n : β„• hn : 2 < n this : βˆ€ {x y z : β„•}, x * (2 * n) * y * z = 2 * n * (x * y * z) ⊒ 2 * n * Nat.centralBinom n ≀ (2 * n) ^ Nat.sqrt (2 * n) * (2 * n) * 4 ^ Nat.pred (2 * n / 3) * ∏ 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]
rw [this]
n : β„• hn : 2 < n this : βˆ€ {x y z : β„•}, x * (2 * n) * y * z = 2 * n * (x * y * z) ⊒ 2 * n * Nat.centralBinom n ≀ (2 * n) ^ Nat.sqrt (2 * n) * (2 * n) * 4 ^ Nat.pred (2 * n / 3) * ∏ p in primes (Finset.Ioc n (2 * n)), p
n : β„• hn : 2 < n this : βˆ€ {x y z : β„•}, x * (2 * n) * y * z = 2 * n * (x * y * z) ⊒ 2 * n * Nat.centralBinom n ≀ 2 * n * ((2 * n) ^ Nat.sqrt (2 * n) * 4 ^ Nat.pred (2 * n / 3) * ∏ 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]
clear this
n : β„• hn : 2 < n this : βˆ€ {x y z : β„•}, x * (2 * n) * y * z = 2 * n * (x * y * z) ⊒ 2 * n * Nat.centralBinom n ≀ 2 * n * ((2 * n) ^ Nat.sqrt (2 * n) * 4 ^ Nat.pred (2 * n / 3) * ∏ p in primes (Finset.Ioc n (2 * n)), p)
n : β„• hn : 2 < n ⊒ 2 * n * Nat.centralBinom n ≀ 2 * n * ((2 * n) ^ Nat.sqrt (2 * n) * 4 ^ Nat.pred (2 * n / 3) * ∏ 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 Nat.mul_le_mul_left
n : β„• hn : 2 < n ⊒ 2 * n * Nat.centralBinom n ≀ 2 * n * ((2 * n) ^ Nat.sqrt (2 * n) * 4 ^ Nat.pred (2 * n / 3) * ∏ p in primes (Finset.Ioc n (2 * n)), p)
case h n : β„• hn : 2 < n ⊒ Nat.centralBinom n ≀ (2 * n) ^ Nat.sqrt (2 * n) * 4 ^ Nat.pred (2 * n / 3) * ∏ 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]
rw [← Nat.prod_pow_factorization_centralBinom]
case h n : β„• hn : 2 < n ⊒ Nat.centralBinom n ≀ (2 * n) ^ Nat.sqrt (2 * n) * 4 ^ Nat.pred (2 * n / 3) * ∏ p in primes (Finset.Ioc n (2 * n)), p
case h n : β„• hn : 2 < n ⊒ ∏ p in Finset.range (2 * n + 1), p ^ ↑(Nat.factorization (Nat.centralBinom n)) p ≀ (2 * n) ^ Nat.sqrt (2 * n) * 4 ^ Nat.pred (2 * n / 3) * ∏ 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]
rw [Finset.range_eq_Ico]
case h n : β„• hn : 2 < n ⊒ ∏ p in Finset.range (2 * n + 1), p ^ ↑(Nat.factorization (Nat.centralBinom n)) p ≀ (2 * n) ^ Nat.sqrt (2 * n) * 4 ^ Nat.pred (2 * n / 3) * ∏ p in primes (Finset.Ioc n (2 * n)), p
case h n : β„• hn : 2 < n ⊒ ∏ p in Finset.Ico 0 (2 * n + 1), p ^ ↑(Nat.factorization (Nat.centralBinom n)) p ≀ (2 * n) ^ Nat.sqrt (2 * n) * 4 ^ Nat.pred (2 * n / 3) * ∏ 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_Ico_consecutive _ (Nat.zero_le _) (Nat.succ_le_succ (Nat.sqrt_le_self _))]
case h n : β„• hn : 2 < n ⊒ ∏ p in Finset.Ico 0 (2 * n + 1), p ^ ↑(Nat.factorization (Nat.centralBinom n)) p ≀ (2 * n) ^ Nat.sqrt (2 * n) * 4 ^ Nat.pred (2 * n / 3) * ∏ p in primes (Finset.Ioc n (2 * n)), p
case h n : β„• hn : 2 < n ⊒ (∏ i in Finset.Ico 0 (Nat.succ (Nat.sqrt (2 * n))), i ^ ↑(Nat.factorization (Nat.centralBinom n)) i) * ∏ i in Finset.Ico (Nat.succ (Nat.sqrt (2 * n))) (Nat.succ (2 * n)), i ^ ↑(Nat.factorization (Nat.centralBinom n)) i ≀ (2 * n) ^ Nat.sqrt (2 * n) * 4 ^ Nat.pred (2 * n / 3) * ∏ 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]
simp [Nat.Ico_succ_succ]
case h n : β„• hn : 2 < n ⊒ (∏ i in Finset.Ico 0 (Nat.succ (Nat.sqrt (2 * n))), i ^ ↑(Nat.factorization (Nat.centralBinom n)) i) * ∏ i in Finset.Ico (Nat.succ (Nat.sqrt (2 * n))) (Nat.succ (2 * n)), i ^ ↑(Nat.factorization (Nat.centralBinom n)) i ≀ (2 * n) ^ Nat.sqrt (2 * n) * 4 ^ Nat.pred (2 * n / 3) * ∏ p in primes (Finset.Ioc n (2 * n)), p
case h n : β„• hn : 2 < n ⊒ (∏ x in Finset.range (Nat.succ (Nat.sqrt (2 * n))), x ^ ↑(Nat.factorization (Nat.centralBinom n)) x) * ∏ x in Finset.Ioc (Nat.sqrt (2 * n)) (2 * n), x ^ ↑(Nat.factorization (Nat.centralBinom n)) x ≀ (2 * n) ^ Nat.sqrt (2 * n) * 4 ^ Nat.pred (2 * n / 3) * ∏ 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 => rhs; rw [mul_assoc]
case h n : β„• hn : 2 < n ⊒ (∏ x in Finset.range (Nat.succ (Nat.sqrt (2 * n))), x ^ ↑(Nat.factorization (Nat.centralBinom n)) x) * ∏ x in Finset.Ioc (Nat.sqrt (2 * n)) (2 * n), x ^ ↑(Nat.factorization (Nat.centralBinom n)) x ≀ (2 * n) ^ Nat.sqrt (2 * n) * 4 ^ Nat.pred (2 * n / 3) * ∏ p in primes (Finset.Ioc n (2 * n)), p
case h n : β„• hn : 2 < n ⊒ (∏ x in Finset.range (Nat.succ (Nat.sqrt (2 * n))), x ^ ↑(Nat.factorization (Nat.centralBinom n)) x) * ∏ x in Finset.Ioc (Nat.sqrt (2 * n)) (2 * n), x ^ ↑(Nat.factorization (Nat.centralBinom n)) x ≀ (2 * n) ^ Nat.sqrt (2 * n) * (4 ^ Nat.pred (2 * n / 3) * ∏ 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 Nat.mul_le_mul
case h n : β„• hn : 2 < n ⊒ (∏ x in Finset.range (Nat.succ (Nat.sqrt (2 * n))), x ^ ↑(Nat.factorization (Nat.centralBinom n)) x) * ∏ x in Finset.Ioc (Nat.sqrt (2 * n)) (2 * n), x ^ ↑(Nat.factorization (Nat.centralBinom n)) x ≀ (2 * n) ^ Nat.sqrt (2 * n) * (4 ^ Nat.pred (2 * n / 3) * ∏ p in primes (Finset.Ioc n (2 * n)), p)
case h.h₁ n : β„• hn : 2 < n ⊒ ∏ x in Finset.range (Nat.succ (Nat.sqrt (2 * n))), x ^ ↑(Nat.factorization (Nat.centralBinom n)) x ≀ (2 * n) ^ Nat.sqrt (2 * n) case h.hβ‚‚ n : β„• hn : 2 < n ⊒ ∏ x in Finset.Ioc (Nat.sqrt (2 * n)) (2 * n), x ^ ↑(Nat.factorization (Nat.centralBinom n)) x ≀ 4 ^ Nat.pred (2 * n / 3) * ∏ 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]
. rw [FactorizationCentralBinom.prodRangePowEqProdIcoPowOfLeTwo (Nat.le_succ _ : 1 ≀ 2)] apply le_of_le_of_eq (FactorizationCentralBinom.prodIcoPowLePow' _) . norm_num . intro hn; rw [hn]; norm_num
case h.h₁ n : β„• hn : 2 < n ⊒ ∏ x in Finset.range (Nat.succ (Nat.sqrt (2 * n))), x ^ ↑(Nat.factorization (Nat.centralBinom n)) x ≀ (2 * n) ^ Nat.sqrt (2 * n) case h.hβ‚‚ n : β„• hn : 2 < n ⊒ ∏ x in Finset.Ioc (Nat.sqrt (2 * n)) (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β‚‚ n : β„• hn : 2 < n ⊒ ∏ x in Finset.Ioc (Nat.sqrt (2 * n)) (2 * n), x ^ ↑(Nat.factorization (Nat.centralBinom n)) x ≀ 4 ^ Nat.pred (2 * n / 3) * ∏ 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]
. have hs : Finset.Ioc (Nat.sqrt (2*n)) (2*n) βŠ† Finset.Ioc (Nat.sqrt (2*n)) (2*n/3) βˆͺ Finset.Ioc (2*n/3) (2*n) . repeat rw [← Nat.Ico_succ_succ] apply Finset.Ico_subset_Ico_union_Ico apply le_trans (prodLeProdMulProdOfUnionOfOneLe hs (powFactorizationPos _)) clear hs apply Nat.mul_le_mul . 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 . 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β‚‚ n : β„• hn : 2 < n ⊒ ∏ x in Finset.Ioc (Nat.sqrt (2 * n)) (2 * n), x ^ ↑(Nat.factorization (Nat.centralBinom n)) x ≀ 4 ^ Nat.pred (2 * n / 3) * ∏ 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]
linarith
n : β„• hn : 2 < n ⊒ 0 < n
no goals
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
fourPowLeMulProdPrimes
[162, 1]
[216, 45]
intro x y z
n : β„• hn : 2 < n ⊒ βˆ€ {x y z : β„•}, x * (2 * n) * y * z = 2 * n * (x * y * z)
n : β„• hn : 2 < n x y z : β„• ⊒ x * (2 * n) * y * z = 2 * n * (x * y * z)
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
fourPowLeMulProdPrimes
[162, 1]
[216, 45]
linarith
n : β„• hn : 2 < n x y z : β„• ⊒ x * (2 * n) * y * z = 2 * n * (x * y * z)
no goals
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
fourPowLeMulProdPrimes
[162, 1]
[216, 45]
rw [FactorizationCentralBinom.prodRangePowEqProdIcoPowOfLeTwo (Nat.le_succ _ : 1 ≀ 2)]
case h.h₁ n : β„• hn : 2 < n ⊒ ∏ x in Finset.range (Nat.succ (Nat.sqrt (2 * n))), x ^ ↑(Nat.factorization (Nat.centralBinom n)) x ≀ (2 * n) ^ Nat.sqrt (2 * n)
case h.h₁ n : β„• hn : 2 < n ⊒ ∏ p in Finset.Ico 1 (Nat.succ (Nat.sqrt (2 * n))), p ^ ↑(Nat.factorization (Nat.centralBinom n)) p ≀ (2 * n) ^ Nat.sqrt (2 * n)
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
fourPowLeMulProdPrimes
[162, 1]
[216, 45]
apply le_of_le_of_eq (FactorizationCentralBinom.prodIcoPowLePow' _)
case h.h₁ n : β„• hn : 2 < n ⊒ ∏ p in Finset.Ico 1 (Nat.succ (Nat.sqrt (2 * n))), p ^ ↑(Nat.factorization (Nat.centralBinom n)) p ≀ (2 * n) ^ Nat.sqrt (2 * n)
case h.h₁ n : β„• hn : 2 < n ⊒ (2 * n) ^ Finset.card (Finset.Ico 1 (Nat.succ (Nat.sqrt (2 * n)))) = (2 * n) ^ Nat.sqrt (2 * n) n : β„• hn : 2 < n ⊒ n = 0 β†’ Finset.Ico 1 (Nat.succ (Nat.sqrt (2 * n))) = βˆ…
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
fourPowLeMulProdPrimes
[162, 1]
[216, 45]
. norm_num
case h.h₁ n : β„• hn : 2 < n ⊒ (2 * n) ^ Finset.card (Finset.Ico 1 (Nat.succ (Nat.sqrt (2 * n)))) = (2 * n) ^ Nat.sqrt (2 * n) n : β„• hn : 2 < n ⊒ n = 0 β†’ Finset.Ico 1 (Nat.succ (Nat.sqrt (2 * n))) = βˆ…
n : β„• hn : 2 < n ⊒ n = 0 β†’ Finset.Ico 1 (Nat.succ (Nat.sqrt (2 * n))) = βˆ…
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
fourPowLeMulProdPrimes
[162, 1]
[216, 45]
. intro hn; rw [hn]; norm_num
n : β„• hn : 2 < n ⊒ n = 0 β†’ Finset.Ico 1 (Nat.succ (Nat.sqrt (2 * n))) = βˆ…
no goals
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
fourPowLeMulProdPrimes
[162, 1]
[216, 45]
norm_num
case h.h₁ n : β„• hn : 2 < n ⊒ (2 * n) ^ Finset.card (Finset.Ico 1 (Nat.succ (Nat.sqrt (2 * n)))) = (2 * n) ^ Nat.sqrt (2 * n)
no goals
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
fourPowLeMulProdPrimes
[162, 1]
[216, 45]
intro hn
n : β„• hn : 2 < n ⊒ n = 0 β†’ Finset.Ico 1 (Nat.succ (Nat.sqrt (2 * n))) = βˆ…
n : β„• hn✝ : 2 < n hn : n = 0 ⊒ Finset.Ico 1 (Nat.succ (Nat.sqrt (2 * n))) = βˆ…
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
fourPowLeMulProdPrimes
[162, 1]
[216, 45]
rw [hn]
n : β„• hn✝ : 2 < n hn : n = 0 ⊒ Finset.Ico 1 (Nat.succ (Nat.sqrt (2 * n))) = βˆ…
n : β„• hn✝ : 2 < n hn : n = 0 ⊒ Finset.Ico 1 (Nat.succ (Nat.sqrt (2 * 0))) = βˆ…
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 hn : n = 0 ⊒ Finset.Ico 1 (Nat.succ (Nat.sqrt (2 * 0))) = βˆ…
no goals
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
fourPowLeMulProdPrimes
[162, 1]
[216, 45]
have hs : 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 h.hβ‚‚ n : β„• hn : 2 < n ⊒ ∏ x in Finset.Ioc (Nat.sqrt (2 * n)) (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 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 h.hβ‚‚ n : β„• hn : 2 < n hs : Finset.Ioc (Nat.sqrt (2 * n)) (2 * n) βŠ† Finset.Ioc (Nat.sqrt (2 * n)) (2 * n / 3) βˆͺ Finset.Ioc (2 * n / 3) (2 * n) ⊒ ∏ x in Finset.Ioc (Nat.sqrt (2 * n)) (2 * n), x ^ ↑(Nat.factorization (Nat.centralBinom n)) x ≀ 4 ^ Nat.pred (2 * n / 3) * ∏ 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]
. repeat rw [← Nat.Ico_succ_succ] apply Finset.Ico_subset_Ico_union_Ico
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 h.hβ‚‚ n : β„• hn : 2 < n hs : Finset.Ioc (Nat.sqrt (2 * n)) (2 * n) βŠ† Finset.Ioc (Nat.sqrt (2 * n)) (2 * n / 3) βˆͺ Finset.Ioc (2 * n / 3) (2 * n) ⊒ ∏ x in Finset.Ioc (Nat.sqrt (2 * n)) (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β‚‚ n : β„• hn : 2 < n hs : Finset.Ioc (Nat.sqrt (2 * n)) (2 * n) βŠ† Finset.Ioc (Nat.sqrt (2 * n)) (2 * n / 3) βˆͺ Finset.Ioc (2 * n / 3) (2 * n) ⊒ ∏ x in Finset.Ioc (Nat.sqrt (2 * n)) (2 * n), x ^ ↑(Nat.factorization (Nat.centralBinom n)) x ≀ 4 ^ Nat.pred (2 * n / 3) * ∏ 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 (prodLeProdMulProdOfUnionOfOneLe hs (powFactorizationPos _))
case h.hβ‚‚ n : β„• hn : 2 < n hs : Finset.Ioc (Nat.sqrt (2 * n)) (2 * n) βŠ† Finset.Ioc (Nat.sqrt (2 * n)) (2 * n / 3) βˆͺ Finset.Ioc (2 * n / 3) (2 * n) ⊒ ∏ x in Finset.Ioc (Nat.sqrt (2 * n)) (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β‚‚ n : β„• hn : 2 < n hs : Finset.Ioc (Nat.sqrt (2 * n)) (2 * n) βŠ† Finset.Ioc (Nat.sqrt (2 * n)) (2 * n / 3) βˆͺ Finset.Ioc (2 * n / 3) (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
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
fourPowLeMulProdPrimes
[162, 1]
[216, 45]
clear hs
case h.hβ‚‚ n : β„• hn : 2 < n hs : Finset.Ioc (Nat.sqrt (2 * n)) (2 * n) βŠ† Finset.Ioc (Nat.sqrt (2 * n)) (2 * n / 3) βˆͺ Finset.Ioc (2 * n / 3) (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β‚‚ 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