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
input
stringlengths
73
2.09M
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/ProdPrimes.lean
prodPrimesRealLePowFour
[106, 1]
[116, 15]
apply prodPrimesLePowFour
x : ℝ hx : 1 ≀ x ⊒ prodPrimes ⌊xβŒ‹β‚Š ≀ 4 ^ (⌊xβŒ‹β‚Š - 1)
no goals
Please generate a tactic in lean4 to solve the state. STATE: x : ℝ hx : 1 ≀ x ⊒ prodPrimes ⌊xβŒ‹β‚Š ≀ 4 ^ (⌊xβŒ‹β‚Š - 1) TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/ProdPrimes.lean
prodPrimesRealLePowFour
[106, 1]
[116, 15]
norm_cast
x : ℝ hx : 1 ≀ x ⊒ ↑(4 ^ (⌊xβŒ‹β‚Š - 1)) = 4 ^ ↑(⌊xβŒ‹β‚Š - 1)
no goals
Please generate a tactic in lean4 to solve the state. STATE: x : ℝ hx : 1 ≀ x ⊒ ↑(4 ^ (⌊xβŒ‹β‚Š - 1)) = 4 ^ ↑(⌊xβŒ‹β‚Š - 1) TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/ProdPrimes.lean
prodPrimesRealLePowFour
[106, 1]
[116, 15]
rw [Real.rpow_le_rpow_left_iff (by norm_num)]
x : ℝ hx : 1 ≀ x ⊒ 4 ^ ↑(⌊xβŒ‹β‚Š - 1) ≀ 4 ^ (x - 1)
x : ℝ hx : 1 ≀ x ⊒ ↑(⌊xβŒ‹β‚Š - 1) ≀ x - 1
Please generate a tactic in lean4 to solve the state. STATE: x : ℝ hx : 1 ≀ x ⊒ 4 ^ ↑(⌊xβŒ‹β‚Š - 1) ≀ 4 ^ (x - 1) TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/ProdPrimes.lean
prodPrimesRealLePowFour
[106, 1]
[116, 15]
rw [← Nat.floor_sub_one]
x : ℝ hx : 1 ≀ x ⊒ ↑(⌊xβŒ‹β‚Š - 1) ≀ x - 1
x : ℝ hx : 1 ≀ x ⊒ β†‘βŒŠx - 1βŒ‹β‚Š ≀ x - 1
Please generate a tactic in lean4 to solve the state. STATE: x : ℝ hx : 1 ≀ x ⊒ ↑(⌊xβŒ‹β‚Š - 1) ≀ x - 1 TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/ProdPrimes.lean
prodPrimesRealLePowFour
[106, 1]
[116, 15]
apply Nat.floor_le
x : ℝ hx : 1 ≀ x ⊒ β†‘βŒŠx - 1βŒ‹β‚Š ≀ x - 1
case ha x : ℝ hx : 1 ≀ x ⊒ 0 ≀ x - 1
Please generate a tactic in lean4 to solve the state. STATE: x : ℝ hx : 1 ≀ x ⊒ β†‘βŒŠx - 1βŒ‹β‚Š ≀ x - 1 TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/ProdPrimes.lean
prodPrimesRealLePowFour
[106, 1]
[116, 15]
linarith
case ha x : ℝ hx : 1 ≀ x ⊒ 0 ≀ x - 1
no goals
Please generate a tactic in lean4 to solve the state. STATE: case ha x : ℝ hx : 1 ≀ x ⊒ 0 ≀ x - 1 TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/ProdPrimes.lean
prodPrimesRealLePowFour
[106, 1]
[116, 15]
norm_num
x : ℝ hx : 1 ≀ x ⊒ 1 < 4
no goals
Please generate a tactic in lean4 to solve the state. STATE: x : ℝ hx : 1 ≀ x ⊒ 1 < 4 TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/LandauTrick.lean
allPrimeNums
[9, 1]
[16, 7]
simp (config := {decide := false}) [nums]
⊒ List.Allβ‚‚ Nat.Prime nums
⊒ Nat.Prime 2 ∧ Nat.Prime 3 ∧ Nat.Prime 5 ∧ Nat.Prime 7 ∧ Nat.Prime 13 ∧ Nat.Prime 23 ∧ Nat.Prime 43 ∧ Nat.Prime 83 ∧ Nat.Prime 163 ∧ Nat.Prime 317 ∧ Nat.Prime 631 ∧ Nat.Prime 1259 ∧ Nat.Prime 2503 ∧ Nat.Prime 4001
Please generate a tactic in lean4 to solve the state. STATE: ⊒ List.Allβ‚‚ Nat.Prime nums TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/LandauTrick.lean
allPrimeNums
[9, 1]
[16, 7]
norm_num1
⊒ Nat.Prime 2 ∧ Nat.Prime 3 ∧ Nat.Prime 5 ∧ Nat.Prime 7 ∧ Nat.Prime 13 ∧ Nat.Prime 23 ∧ Nat.Prime 43 ∧ Nat.Prime 83 ∧ Nat.Prime 163 ∧ Nat.Prime 317 ∧ Nat.Prime 631 ∧ Nat.Prime 1259 ∧ Nat.Prime 2503 ∧ Nat.Prime 4001
⊒ True ∧ True ∧ True ∧ True ∧ True ∧ True ∧ True ∧ True ∧ True ∧ True ∧ True ∧ True ∧ True ∧ True
Please generate a tactic in lean4 to solve the state. STATE: ⊒ Nat.Prime 2 ∧ Nat.Prime 3 ∧ Nat.Prime 5 ∧ Nat.Prime 7 ∧ Nat.Prime 13 ∧ Nat.Prime 23 ∧ Nat.Prime 43 ∧ Nat.Prime 83 ∧ Nat.Prime 163 ∧ Nat.Prime 317 ∧ Nat.Prime 631 ∧ Nat.Prime 1259 ∧ Nat.Prime 2503 ∧ Nat.Prime 4001 TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/LandauTrick.lean
allPrimeNums
[9, 1]
[16, 7]
simp
⊒ True ∧ True ∧ True ∧ True ∧ True ∧ True ∧ True ∧ True ∧ True ∧ True ∧ True ∧ True ∧ True ∧ True
no goals
Please generate a tactic in lean4 to solve the state. STATE: ⊒ True ∧ True ∧ True ∧ True ∧ True ∧ True ∧ True ∧ True ∧ True ∧ True ∧ True ∧ True ∧ True ∧ True TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/LandauTrick.lean
existsOfSlowMono
[18, 1]
[52, 37]
cases l with | nil => contradiction | cons x l => induction l generalizing a x with | nil => intro n hn simp at * apply And.intro <;> linarith | cons y l h => rw [List.chain_cons] at hl_mono rw [List.chain_cons] at hl_slow simp at hb specialize @h x y hl_mono.right hl_slow.right (List.cons_ne_nil y l) hb intro n hn specialize h n have : βˆ€ lα΅’, lα΅’ ∈ x :: y :: l ↔ lα΅’ = x ∨ lα΅’ ∈ y :: l := by simp simp_rw [this] simp only [or_and_right] rw [exists_or] cases le_or_lt x n with | inl hx => apply Or.inr simp only [Set.mem_Ico] at * specialize h (And.intro hx hn.right) exact h | inr hx => apply Or.inl simp at * apply And.intro <;> linarith
a b : β„• l : List β„• hl_mono : List.Chain (fun u v => u < v) a l hl_slow : List.Chain (fun u v => v ≀ 2 * u) a l hl_cons : l β‰  [] hb : b < List.getLast l hl_cons ⊒ βˆ€ (n : β„•), n ∈ Set.Icc a b β†’ βˆƒ lα΅’, lα΅’ ∈ l ∧ lα΅’ ∈ Set.Ioc n (2 * n)
no goals
Please generate a tactic in lean4 to solve the state. STATE: a b : β„• l : List β„• hl_mono : List.Chain (fun u v => u < v) a l hl_slow : List.Chain (fun u v => v ≀ 2 * u) a l hl_cons : l β‰  [] hb : b < List.getLast l hl_cons ⊒ βˆ€ (n : β„•), n ∈ Set.Icc a b β†’ βˆƒ lα΅’, lα΅’ ∈ l ∧ lα΅’ ∈ Set.Ioc n (2 * n) TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/LandauTrick.lean
existsOfSlowMono
[18, 1]
[52, 37]
contradiction
case nil a b : β„• hl_mono : List.Chain (fun u v => u < v) a [] hl_slow : List.Chain (fun u v => v ≀ 2 * u) a [] hl_cons : [] β‰  [] hb : b < List.getLast [] hl_cons ⊒ βˆ€ (n : β„•), n ∈ Set.Icc a b β†’ βˆƒ lα΅’, lα΅’ ∈ [] ∧ lα΅’ ∈ Set.Ioc n (2 * n)
no goals
Please generate a tactic in lean4 to solve the state. STATE: case nil a b : β„• hl_mono : List.Chain (fun u v => u < v) a [] hl_slow : List.Chain (fun u v => v ≀ 2 * u) a [] hl_cons : [] β‰  [] hb : b < List.getLast [] hl_cons ⊒ βˆ€ (n : β„•), n ∈ Set.Icc a b β†’ βˆƒ lα΅’, lα΅’ ∈ [] ∧ lα΅’ ∈ Set.Ioc n (2 * n) TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/LandauTrick.lean
existsOfSlowMono
[18, 1]
[52, 37]
induction l generalizing a x with | nil => intro n hn simp at * apply And.intro <;> linarith | cons y l h => rw [List.chain_cons] at hl_mono rw [List.chain_cons] at hl_slow simp at hb specialize @h x y hl_mono.right hl_slow.right (List.cons_ne_nil y l) hb intro n hn specialize h n have : βˆ€ lα΅’, lα΅’ ∈ x :: y :: l ↔ lα΅’ = x ∨ lα΅’ ∈ y :: l := by simp simp_rw [this] simp only [or_and_right] rw [exists_or] cases le_or_lt x n with | inl hx => apply Or.inr simp only [Set.mem_Ico] at * specialize h (And.intro hx hn.right) exact h | inr hx => apply Or.inl simp at * apply And.intro <;> linarith
case cons a b x : β„• l : List β„• hl_mono : List.Chain (fun u v => u < v) a (x :: l) hl_slow : List.Chain (fun u v => v ≀ 2 * u) a (x :: l) hl_cons : x :: l β‰  [] hb : b < List.getLast (x :: l) hl_cons ⊒ βˆ€ (n : β„•), n ∈ Set.Icc a b β†’ βˆƒ lα΅’, lα΅’ ∈ x :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n)
no goals
Please generate a tactic in lean4 to solve the state. STATE: case cons a b x : β„• l : List β„• hl_mono : List.Chain (fun u v => u < v) a (x :: l) hl_slow : List.Chain (fun u v => v ≀ 2 * u) a (x :: l) hl_cons : x :: l β‰  [] hb : b < List.getLast (x :: l) hl_cons ⊒ βˆ€ (n : β„•), n ∈ Set.Icc a b β†’ βˆƒ lα΅’, lα΅’ ∈ x :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n) TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/LandauTrick.lean
existsOfSlowMono
[18, 1]
[52, 37]
intro n hn
case cons.nil b a x : β„• hl_mono : List.Chain (fun u v => u < v) a [x] hl_slow : List.Chain (fun u v => v ≀ 2 * u) a [x] hl_cons : [x] β‰  [] hb : b < List.getLast [x] hl_cons ⊒ βˆ€ (n : β„•), n ∈ Set.Icc a b β†’ βˆƒ lα΅’, lα΅’ ∈ [x] ∧ lα΅’ ∈ Set.Ioc n (2 * n)
case cons.nil b a x : β„• hl_mono : List.Chain (fun u v => u < v) a [x] hl_slow : List.Chain (fun u v => v ≀ 2 * u) a [x] hl_cons : [x] β‰  [] hb : b < List.getLast [x] hl_cons n : β„• hn : n ∈ Set.Icc a b ⊒ βˆƒ lα΅’, lα΅’ ∈ [x] ∧ lα΅’ ∈ Set.Ioc n (2 * n)
Please generate a tactic in lean4 to solve the state. STATE: case cons.nil b a x : β„• hl_mono : List.Chain (fun u v => u < v) a [x] hl_slow : List.Chain (fun u v => v ≀ 2 * u) a [x] hl_cons : [x] β‰  [] hb : b < List.getLast [x] hl_cons ⊒ βˆ€ (n : β„•), n ∈ Set.Icc a b β†’ βˆƒ lα΅’, lα΅’ ∈ [x] ∧ lα΅’ ∈ Set.Ioc n (2 * n) TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/LandauTrick.lean
existsOfSlowMono
[18, 1]
[52, 37]
simp at *
case cons.nil b a x : β„• hl_mono : List.Chain (fun u v => u < v) a [x] hl_slow : List.Chain (fun u v => v ≀ 2 * u) a [x] hl_cons : [x] β‰  [] hb : b < List.getLast [x] hl_cons n : β„• hn : n ∈ Set.Icc a b ⊒ βˆƒ lα΅’, lα΅’ ∈ [x] ∧ lα΅’ ∈ Set.Ioc n (2 * n)
case cons.nil b a x : β„• hl_cons : [x] β‰  [] hb : b < x n : β„• hl_mono : a < x hl_slow : x ≀ 2 * a hn : a ≀ n ∧ n ≀ b ⊒ n < x ∧ x ≀ 2 * n
Please generate a tactic in lean4 to solve the state. STATE: case cons.nil b a x : β„• hl_mono : List.Chain (fun u v => u < v) a [x] hl_slow : List.Chain (fun u v => v ≀ 2 * u) a [x] hl_cons : [x] β‰  [] hb : b < List.getLast [x] hl_cons n : β„• hn : n ∈ Set.Icc a b ⊒ βˆƒ lα΅’, lα΅’ ∈ [x] ∧ lα΅’ ∈ Set.Ioc n (2 * n) TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/LandauTrick.lean
existsOfSlowMono
[18, 1]
[52, 37]
apply And.intro <;> linarith
case cons.nil b a x : β„• hl_cons : [x] β‰  [] hb : b < x n : β„• hl_mono : a < x hl_slow : x ≀ 2 * a hn : a ≀ n ∧ n ≀ b ⊒ n < x ∧ x ≀ 2 * n
no goals
Please generate a tactic in lean4 to solve the state. STATE: case cons.nil b a x : β„• hl_cons : [x] β‰  [] hb : b < x n : β„• hl_mono : a < x hl_slow : x ≀ 2 * a hn : a ≀ n ∧ n ≀ b ⊒ n < x ∧ x ≀ 2 * n TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/LandauTrick.lean
existsOfSlowMono
[18, 1]
[52, 37]
rw [List.chain_cons] at hl_mono
case cons.cons b y : β„• l : List β„• h : βˆ€ {a : β„•} (x : β„•), List.Chain (fun u v => u < v) a (x :: l) β†’ List.Chain (fun u v => v ≀ 2 * u) a (x :: l) β†’ βˆ€ (hl_cons : x :: l β‰  []), b < List.getLast (x :: l) hl_cons β†’ βˆ€ (n : β„•), n ∈ Set.Icc a b β†’ βˆƒ lα΅’, lα΅’ ∈ x :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n) a x : β„• hl_mono : List.Chain (fun u v => u < v) a (x :: y :: l) hl_slow : List.Chain (fun u v => v ≀ 2 * u) a (x :: y :: l) hl_cons : x :: y :: l β‰  [] hb : b < List.getLast (x :: y :: l) hl_cons ⊒ βˆ€ (n : β„•), n ∈ Set.Icc a b β†’ βˆƒ lα΅’, lα΅’ ∈ x :: y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n)
case cons.cons b y : β„• l : List β„• h : βˆ€ {a : β„•} (x : β„•), List.Chain (fun u v => u < v) a (x :: l) β†’ List.Chain (fun u v => v ≀ 2 * u) a (x :: l) β†’ βˆ€ (hl_cons : x :: l β‰  []), b < List.getLast (x :: l) hl_cons β†’ βˆ€ (n : β„•), n ∈ Set.Icc a b β†’ βˆƒ lα΅’, lα΅’ ∈ x :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n) a x : β„• hl_mono : a < x ∧ List.Chain (fun u v => u < v) x (y :: l) hl_slow : List.Chain (fun u v => v ≀ 2 * u) a (x :: y :: l) hl_cons : x :: y :: l β‰  [] hb : b < List.getLast (x :: y :: l) hl_cons ⊒ βˆ€ (n : β„•), n ∈ Set.Icc a b β†’ βˆƒ lα΅’, lα΅’ ∈ x :: y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n)
Please generate a tactic in lean4 to solve the state. STATE: case cons.cons b y : β„• l : List β„• h : βˆ€ {a : β„•} (x : β„•), List.Chain (fun u v => u < v) a (x :: l) β†’ List.Chain (fun u v => v ≀ 2 * u) a (x :: l) β†’ βˆ€ (hl_cons : x :: l β‰  []), b < List.getLast (x :: l) hl_cons β†’ βˆ€ (n : β„•), n ∈ Set.Icc a b β†’ βˆƒ lα΅’, lα΅’ ∈ x :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n) a x : β„• hl_mono : List.Chain (fun u v => u < v) a (x :: y :: l) hl_slow : List.Chain (fun u v => v ≀ 2 * u) a (x :: y :: l) hl_cons : x :: y :: l β‰  [] hb : b < List.getLast (x :: y :: l) hl_cons ⊒ βˆ€ (n : β„•), n ∈ Set.Icc a b β†’ βˆƒ lα΅’, lα΅’ ∈ x :: y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n) TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/LandauTrick.lean
existsOfSlowMono
[18, 1]
[52, 37]
rw [List.chain_cons] at hl_slow
case cons.cons b y : β„• l : List β„• h : βˆ€ {a : β„•} (x : β„•), List.Chain (fun u v => u < v) a (x :: l) β†’ List.Chain (fun u v => v ≀ 2 * u) a (x :: l) β†’ βˆ€ (hl_cons : x :: l β‰  []), b < List.getLast (x :: l) hl_cons β†’ βˆ€ (n : β„•), n ∈ Set.Icc a b β†’ βˆƒ lα΅’, lα΅’ ∈ x :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n) a x : β„• hl_mono : a < x ∧ List.Chain (fun u v => u < v) x (y :: l) hl_slow : List.Chain (fun u v => v ≀ 2 * u) a (x :: y :: l) hl_cons : x :: y :: l β‰  [] hb : b < List.getLast (x :: y :: l) hl_cons ⊒ βˆ€ (n : β„•), n ∈ Set.Icc a b β†’ βˆƒ lα΅’, lα΅’ ∈ x :: y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n)
case cons.cons b y : β„• l : List β„• h : βˆ€ {a : β„•} (x : β„•), List.Chain (fun u v => u < v) a (x :: l) β†’ List.Chain (fun u v => v ≀ 2 * u) a (x :: l) β†’ βˆ€ (hl_cons : x :: l β‰  []), b < List.getLast (x :: l) hl_cons β†’ βˆ€ (n : β„•), n ∈ Set.Icc a b β†’ βˆƒ lα΅’, lα΅’ ∈ x :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n) a x : β„• hl_mono : a < x ∧ List.Chain (fun u v => u < v) x (y :: l) hl_slow : x ≀ 2 * a ∧ List.Chain (fun u v => v ≀ 2 * u) x (y :: l) hl_cons : x :: y :: l β‰  [] hb : b < List.getLast (x :: y :: l) hl_cons ⊒ βˆ€ (n : β„•), n ∈ Set.Icc a b β†’ βˆƒ lα΅’, lα΅’ ∈ x :: y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n)
Please generate a tactic in lean4 to solve the state. STATE: case cons.cons b y : β„• l : List β„• h : βˆ€ {a : β„•} (x : β„•), List.Chain (fun u v => u < v) a (x :: l) β†’ List.Chain (fun u v => v ≀ 2 * u) a (x :: l) β†’ βˆ€ (hl_cons : x :: l β‰  []), b < List.getLast (x :: l) hl_cons β†’ βˆ€ (n : β„•), n ∈ Set.Icc a b β†’ βˆƒ lα΅’, lα΅’ ∈ x :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n) a x : β„• hl_mono : a < x ∧ List.Chain (fun u v => u < v) x (y :: l) hl_slow : List.Chain (fun u v => v ≀ 2 * u) a (x :: y :: l) hl_cons : x :: y :: l β‰  [] hb : b < List.getLast (x :: y :: l) hl_cons ⊒ βˆ€ (n : β„•), n ∈ Set.Icc a b β†’ βˆƒ lα΅’, lα΅’ ∈ x :: y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n) TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/LandauTrick.lean
existsOfSlowMono
[18, 1]
[52, 37]
simp at hb
case cons.cons b y : β„• l : List β„• h : βˆ€ {a : β„•} (x : β„•), List.Chain (fun u v => u < v) a (x :: l) β†’ List.Chain (fun u v => v ≀ 2 * u) a (x :: l) β†’ βˆ€ (hl_cons : x :: l β‰  []), b < List.getLast (x :: l) hl_cons β†’ βˆ€ (n : β„•), n ∈ Set.Icc a b β†’ βˆƒ lα΅’, lα΅’ ∈ x :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n) a x : β„• hl_mono : a < x ∧ List.Chain (fun u v => u < v) x (y :: l) hl_slow : x ≀ 2 * a ∧ List.Chain (fun u v => v ≀ 2 * u) x (y :: l) hl_cons : x :: y :: l β‰  [] hb : b < List.getLast (x :: y :: l) hl_cons ⊒ βˆ€ (n : β„•), n ∈ Set.Icc a b β†’ βˆƒ lα΅’, lα΅’ ∈ x :: y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n)
case cons.cons b y : β„• l : List β„• h : βˆ€ {a : β„•} (x : β„•), List.Chain (fun u v => u < v) a (x :: l) β†’ List.Chain (fun u v => v ≀ 2 * u) a (x :: l) β†’ βˆ€ (hl_cons : x :: l β‰  []), b < List.getLast (x :: l) hl_cons β†’ βˆ€ (n : β„•), n ∈ Set.Icc a b β†’ βˆƒ lα΅’, lα΅’ ∈ x :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n) a x : β„• hl_mono : a < x ∧ List.Chain (fun u v => u < v) x (y :: l) hl_slow : x ≀ 2 * a ∧ List.Chain (fun u v => v ≀ 2 * u) x (y :: l) hl_cons : x :: y :: l β‰  [] hb : b < List.getLast (y :: l) (_ : Β¬y :: l = []) ⊒ βˆ€ (n : β„•), n ∈ Set.Icc a b β†’ βˆƒ lα΅’, lα΅’ ∈ x :: y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n)
Please generate a tactic in lean4 to solve the state. STATE: case cons.cons b y : β„• l : List β„• h : βˆ€ {a : β„•} (x : β„•), List.Chain (fun u v => u < v) a (x :: l) β†’ List.Chain (fun u v => v ≀ 2 * u) a (x :: l) β†’ βˆ€ (hl_cons : x :: l β‰  []), b < List.getLast (x :: l) hl_cons β†’ βˆ€ (n : β„•), n ∈ Set.Icc a b β†’ βˆƒ lα΅’, lα΅’ ∈ x :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n) a x : β„• hl_mono : a < x ∧ List.Chain (fun u v => u < v) x (y :: l) hl_slow : x ≀ 2 * a ∧ List.Chain (fun u v => v ≀ 2 * u) x (y :: l) hl_cons : x :: y :: l β‰  [] hb : b < List.getLast (x :: y :: l) hl_cons ⊒ βˆ€ (n : β„•), n ∈ Set.Icc a b β†’ βˆƒ lα΅’, lα΅’ ∈ x :: y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n) TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/LandauTrick.lean
existsOfSlowMono
[18, 1]
[52, 37]
specialize @h x y hl_mono.right hl_slow.right (List.cons_ne_nil y l) hb
case cons.cons b y : β„• l : List β„• h : βˆ€ {a : β„•} (x : β„•), List.Chain (fun u v => u < v) a (x :: l) β†’ List.Chain (fun u v => v ≀ 2 * u) a (x :: l) β†’ βˆ€ (hl_cons : x :: l β‰  []), b < List.getLast (x :: l) hl_cons β†’ βˆ€ (n : β„•), n ∈ Set.Icc a b β†’ βˆƒ lα΅’, lα΅’ ∈ x :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n) a x : β„• hl_mono : a < x ∧ List.Chain (fun u v => u < v) x (y :: l) hl_slow : x ≀ 2 * a ∧ List.Chain (fun u v => v ≀ 2 * u) x (y :: l) hl_cons : x :: y :: l β‰  [] hb : b < List.getLast (y :: l) (_ : Β¬y :: l = []) ⊒ βˆ€ (n : β„•), n ∈ Set.Icc a b β†’ βˆƒ lα΅’, lα΅’ ∈ x :: y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n)
case cons.cons b y : β„• l : List β„• a x : β„• hl_mono : a < x ∧ List.Chain (fun u v => u < v) x (y :: l) hl_slow : x ≀ 2 * a ∧ List.Chain (fun u v => v ≀ 2 * u) x (y :: l) hl_cons : x :: y :: l β‰  [] hb : b < List.getLast (y :: l) (_ : Β¬y :: l = []) h : βˆ€ (n : β„•), n ∈ Set.Icc x b β†’ βˆƒ lα΅’, lα΅’ ∈ y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n) ⊒ βˆ€ (n : β„•), n ∈ Set.Icc a b β†’ βˆƒ lα΅’, lα΅’ ∈ x :: y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n)
Please generate a tactic in lean4 to solve the state. STATE: case cons.cons b y : β„• l : List β„• h : βˆ€ {a : β„•} (x : β„•), List.Chain (fun u v => u < v) a (x :: l) β†’ List.Chain (fun u v => v ≀ 2 * u) a (x :: l) β†’ βˆ€ (hl_cons : x :: l β‰  []), b < List.getLast (x :: l) hl_cons β†’ βˆ€ (n : β„•), n ∈ Set.Icc a b β†’ βˆƒ lα΅’, lα΅’ ∈ x :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n) a x : β„• hl_mono : a < x ∧ List.Chain (fun u v => u < v) x (y :: l) hl_slow : x ≀ 2 * a ∧ List.Chain (fun u v => v ≀ 2 * u) x (y :: l) hl_cons : x :: y :: l β‰  [] hb : b < List.getLast (y :: l) (_ : Β¬y :: l = []) ⊒ βˆ€ (n : β„•), n ∈ Set.Icc a b β†’ βˆƒ lα΅’, lα΅’ ∈ x :: y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n) TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/LandauTrick.lean
existsOfSlowMono
[18, 1]
[52, 37]
intro n hn
case cons.cons b y : β„• l : List β„• a x : β„• hl_mono : a < x ∧ List.Chain (fun u v => u < v) x (y :: l) hl_slow : x ≀ 2 * a ∧ List.Chain (fun u v => v ≀ 2 * u) x (y :: l) hl_cons : x :: y :: l β‰  [] hb : b < List.getLast (y :: l) (_ : Β¬y :: l = []) h : βˆ€ (n : β„•), n ∈ Set.Icc x b β†’ βˆƒ lα΅’, lα΅’ ∈ y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n) ⊒ βˆ€ (n : β„•), n ∈ Set.Icc a b β†’ βˆƒ lα΅’, lα΅’ ∈ x :: y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n)
case cons.cons b y : β„• l : List β„• a x : β„• hl_mono : a < x ∧ List.Chain (fun u v => u < v) x (y :: l) hl_slow : x ≀ 2 * a ∧ List.Chain (fun u v => v ≀ 2 * u) x (y :: l) hl_cons : x :: y :: l β‰  [] hb : b < List.getLast (y :: l) (_ : Β¬y :: l = []) h : βˆ€ (n : β„•), n ∈ Set.Icc x b β†’ βˆƒ lα΅’, lα΅’ ∈ y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n) n : β„• hn : n ∈ Set.Icc a b ⊒ βˆƒ lα΅’, lα΅’ ∈ x :: y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n)
Please generate a tactic in lean4 to solve the state. STATE: case cons.cons b y : β„• l : List β„• a x : β„• hl_mono : a < x ∧ List.Chain (fun u v => u < v) x (y :: l) hl_slow : x ≀ 2 * a ∧ List.Chain (fun u v => v ≀ 2 * u) x (y :: l) hl_cons : x :: y :: l β‰  [] hb : b < List.getLast (y :: l) (_ : Β¬y :: l = []) h : βˆ€ (n : β„•), n ∈ Set.Icc x b β†’ βˆƒ lα΅’, lα΅’ ∈ y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n) ⊒ βˆ€ (n : β„•), n ∈ Set.Icc a b β†’ βˆƒ lα΅’, lα΅’ ∈ x :: y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n) TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/LandauTrick.lean
existsOfSlowMono
[18, 1]
[52, 37]
specialize h n
case cons.cons b y : β„• l : List β„• a x : β„• hl_mono : a < x ∧ List.Chain (fun u v => u < v) x (y :: l) hl_slow : x ≀ 2 * a ∧ List.Chain (fun u v => v ≀ 2 * u) x (y :: l) hl_cons : x :: y :: l β‰  [] hb : b < List.getLast (y :: l) (_ : Β¬y :: l = []) h : βˆ€ (n : β„•), n ∈ Set.Icc x b β†’ βˆƒ lα΅’, lα΅’ ∈ y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n) n : β„• hn : n ∈ Set.Icc a b ⊒ βˆƒ lα΅’, lα΅’ ∈ x :: y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n)
case cons.cons b y : β„• l : List β„• a x : β„• hl_mono : a < x ∧ List.Chain (fun u v => u < v) x (y :: l) hl_slow : x ≀ 2 * a ∧ List.Chain (fun u v => v ≀ 2 * u) x (y :: l) hl_cons : x :: y :: l β‰  [] hb : b < List.getLast (y :: l) (_ : Β¬y :: l = []) n : β„• hn : n ∈ Set.Icc a b h : n ∈ Set.Icc x b β†’ βˆƒ lα΅’, lα΅’ ∈ y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n) ⊒ βˆƒ lα΅’, lα΅’ ∈ x :: y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n)
Please generate a tactic in lean4 to solve the state. STATE: case cons.cons b y : β„• l : List β„• a x : β„• hl_mono : a < x ∧ List.Chain (fun u v => u < v) x (y :: l) hl_slow : x ≀ 2 * a ∧ List.Chain (fun u v => v ≀ 2 * u) x (y :: l) hl_cons : x :: y :: l β‰  [] hb : b < List.getLast (y :: l) (_ : Β¬y :: l = []) h : βˆ€ (n : β„•), n ∈ Set.Icc x b β†’ βˆƒ lα΅’, lα΅’ ∈ y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n) n : β„• hn : n ∈ Set.Icc a b ⊒ βˆƒ lα΅’, lα΅’ ∈ x :: y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n) TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/LandauTrick.lean
existsOfSlowMono
[18, 1]
[52, 37]
have : βˆ€ lα΅’, lα΅’ ∈ x :: y :: l ↔ lα΅’ = x ∨ lα΅’ ∈ y :: l := by simp
case cons.cons b y : β„• l : List β„• a x : β„• hl_mono : a < x ∧ List.Chain (fun u v => u < v) x (y :: l) hl_slow : x ≀ 2 * a ∧ List.Chain (fun u v => v ≀ 2 * u) x (y :: l) hl_cons : x :: y :: l β‰  [] hb : b < List.getLast (y :: l) (_ : Β¬y :: l = []) n : β„• hn : n ∈ Set.Icc a b h : n ∈ Set.Icc x b β†’ βˆƒ lα΅’, lα΅’ ∈ y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n) ⊒ βˆƒ lα΅’, lα΅’ ∈ x :: y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n)
case cons.cons b y : β„• l : List β„• a x : β„• hl_mono : a < x ∧ List.Chain (fun u v => u < v) x (y :: l) hl_slow : x ≀ 2 * a ∧ List.Chain (fun u v => v ≀ 2 * u) x (y :: l) hl_cons : x :: y :: l β‰  [] hb : b < List.getLast (y :: l) (_ : Β¬y :: l = []) n : β„• hn : n ∈ Set.Icc a b h : n ∈ Set.Icc x b β†’ βˆƒ lα΅’, lα΅’ ∈ y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n) this : βˆ€ (lα΅’ : β„•), lα΅’ ∈ x :: y :: l ↔ lα΅’ = x ∨ lα΅’ ∈ y :: l ⊒ βˆƒ lα΅’, lα΅’ ∈ x :: y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n)
Please generate a tactic in lean4 to solve the state. STATE: case cons.cons b y : β„• l : List β„• a x : β„• hl_mono : a < x ∧ List.Chain (fun u v => u < v) x (y :: l) hl_slow : x ≀ 2 * a ∧ List.Chain (fun u v => v ≀ 2 * u) x (y :: l) hl_cons : x :: y :: l β‰  [] hb : b < List.getLast (y :: l) (_ : Β¬y :: l = []) n : β„• hn : n ∈ Set.Icc a b h : n ∈ Set.Icc x b β†’ βˆƒ lα΅’, lα΅’ ∈ y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n) ⊒ βˆƒ lα΅’, lα΅’ ∈ x :: y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n) TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/LandauTrick.lean
existsOfSlowMono
[18, 1]
[52, 37]
simp_rw [this]
case cons.cons b y : β„• l : List β„• a x : β„• hl_mono : a < x ∧ List.Chain (fun u v => u < v) x (y :: l) hl_slow : x ≀ 2 * a ∧ List.Chain (fun u v => v ≀ 2 * u) x (y :: l) hl_cons : x :: y :: l β‰  [] hb : b < List.getLast (y :: l) (_ : Β¬y :: l = []) n : β„• hn : n ∈ Set.Icc a b h : n ∈ Set.Icc x b β†’ βˆƒ lα΅’, lα΅’ ∈ y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n) this : βˆ€ (lα΅’ : β„•), lα΅’ ∈ x :: y :: l ↔ lα΅’ = x ∨ lα΅’ ∈ y :: l ⊒ βˆƒ lα΅’, lα΅’ ∈ x :: y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n)
case cons.cons b y : β„• l : List β„• a x : β„• hl_mono : a < x ∧ List.Chain (fun u v => u < v) x (y :: l) hl_slow : x ≀ 2 * a ∧ List.Chain (fun u v => v ≀ 2 * u) x (y :: l) hl_cons : x :: y :: l β‰  [] hb : b < List.getLast (y :: l) (_ : Β¬y :: l = []) n : β„• hn : n ∈ Set.Icc a b h : n ∈ Set.Icc x b β†’ βˆƒ lα΅’, lα΅’ ∈ y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n) this : βˆ€ (lα΅’ : β„•), lα΅’ ∈ x :: y :: l ↔ lα΅’ = x ∨ lα΅’ ∈ y :: l ⊒ βˆƒ lα΅’, (lα΅’ = x ∨ lα΅’ ∈ y :: l) ∧ lα΅’ ∈ Set.Ioc n (2 * n)
Please generate a tactic in lean4 to solve the state. STATE: case cons.cons b y : β„• l : List β„• a x : β„• hl_mono : a < x ∧ List.Chain (fun u v => u < v) x (y :: l) hl_slow : x ≀ 2 * a ∧ List.Chain (fun u v => v ≀ 2 * u) x (y :: l) hl_cons : x :: y :: l β‰  [] hb : b < List.getLast (y :: l) (_ : Β¬y :: l = []) n : β„• hn : n ∈ Set.Icc a b h : n ∈ Set.Icc x b β†’ βˆƒ lα΅’, lα΅’ ∈ y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n) this : βˆ€ (lα΅’ : β„•), lα΅’ ∈ x :: y :: l ↔ lα΅’ = x ∨ lα΅’ ∈ y :: l ⊒ βˆƒ lα΅’, lα΅’ ∈ x :: y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n) TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/LandauTrick.lean
existsOfSlowMono
[18, 1]
[52, 37]
simp only [or_and_right]
case cons.cons b y : β„• l : List β„• a x : β„• hl_mono : a < x ∧ List.Chain (fun u v => u < v) x (y :: l) hl_slow : x ≀ 2 * a ∧ List.Chain (fun u v => v ≀ 2 * u) x (y :: l) hl_cons : x :: y :: l β‰  [] hb : b < List.getLast (y :: l) (_ : Β¬y :: l = []) n : β„• hn : n ∈ Set.Icc a b h : n ∈ Set.Icc x b β†’ βˆƒ lα΅’, lα΅’ ∈ y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n) this : βˆ€ (lα΅’ : β„•), lα΅’ ∈ x :: y :: l ↔ lα΅’ = x ∨ lα΅’ ∈ y :: l ⊒ βˆƒ lα΅’, (lα΅’ = x ∨ lα΅’ ∈ y :: l) ∧ lα΅’ ∈ Set.Ioc n (2 * n)
case cons.cons b y : β„• l : List β„• a x : β„• hl_mono : a < x ∧ List.Chain (fun u v => u < v) x (y :: l) hl_slow : x ≀ 2 * a ∧ List.Chain (fun u v => v ≀ 2 * u) x (y :: l) hl_cons : x :: y :: l β‰  [] hb : b < List.getLast (y :: l) (_ : Β¬y :: l = []) n : β„• hn : n ∈ Set.Icc a b h : n ∈ Set.Icc x b β†’ βˆƒ lα΅’, lα΅’ ∈ y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n) this : βˆ€ (lα΅’ : β„•), lα΅’ ∈ x :: y :: l ↔ lα΅’ = x ∨ lα΅’ ∈ y :: l ⊒ βˆƒ lα΅’, lα΅’ = x ∧ lα΅’ ∈ Set.Ioc n (2 * n) ∨ lα΅’ ∈ y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n)
Please generate a tactic in lean4 to solve the state. STATE: case cons.cons b y : β„• l : List β„• a x : β„• hl_mono : a < x ∧ List.Chain (fun u v => u < v) x (y :: l) hl_slow : x ≀ 2 * a ∧ List.Chain (fun u v => v ≀ 2 * u) x (y :: l) hl_cons : x :: y :: l β‰  [] hb : b < List.getLast (y :: l) (_ : Β¬y :: l = []) n : β„• hn : n ∈ Set.Icc a b h : n ∈ Set.Icc x b β†’ βˆƒ lα΅’, lα΅’ ∈ y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n) this : βˆ€ (lα΅’ : β„•), lα΅’ ∈ x :: y :: l ↔ lα΅’ = x ∨ lα΅’ ∈ y :: l ⊒ βˆƒ lα΅’, (lα΅’ = x ∨ lα΅’ ∈ y :: l) ∧ lα΅’ ∈ Set.Ioc n (2 * n) TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/LandauTrick.lean
existsOfSlowMono
[18, 1]
[52, 37]
rw [exists_or]
case cons.cons b y : β„• l : List β„• a x : β„• hl_mono : a < x ∧ List.Chain (fun u v => u < v) x (y :: l) hl_slow : x ≀ 2 * a ∧ List.Chain (fun u v => v ≀ 2 * u) x (y :: l) hl_cons : x :: y :: l β‰  [] hb : b < List.getLast (y :: l) (_ : Β¬y :: l = []) n : β„• hn : n ∈ Set.Icc a b h : n ∈ Set.Icc x b β†’ βˆƒ lα΅’, lα΅’ ∈ y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n) this : βˆ€ (lα΅’ : β„•), lα΅’ ∈ x :: y :: l ↔ lα΅’ = x ∨ lα΅’ ∈ y :: l ⊒ βˆƒ lα΅’, lα΅’ = x ∧ lα΅’ ∈ Set.Ioc n (2 * n) ∨ lα΅’ ∈ y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n)
case cons.cons b y : β„• l : List β„• a x : β„• hl_mono : a < x ∧ List.Chain (fun u v => u < v) x (y :: l) hl_slow : x ≀ 2 * a ∧ List.Chain (fun u v => v ≀ 2 * u) x (y :: l) hl_cons : x :: y :: l β‰  [] hb : b < List.getLast (y :: l) (_ : Β¬y :: l = []) n : β„• hn : n ∈ Set.Icc a b h : n ∈ Set.Icc x b β†’ βˆƒ lα΅’, lα΅’ ∈ y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n) this : βˆ€ (lα΅’ : β„•), lα΅’ ∈ x :: y :: l ↔ lα΅’ = x ∨ lα΅’ ∈ y :: l ⊒ (βˆƒ x_1, x_1 = x ∧ x_1 ∈ Set.Ioc n (2 * n)) ∨ βˆƒ x, x ∈ y :: l ∧ x ∈ Set.Ioc n (2 * n)
Please generate a tactic in lean4 to solve the state. STATE: case cons.cons b y : β„• l : List β„• a x : β„• hl_mono : a < x ∧ List.Chain (fun u v => u < v) x (y :: l) hl_slow : x ≀ 2 * a ∧ List.Chain (fun u v => v ≀ 2 * u) x (y :: l) hl_cons : x :: y :: l β‰  [] hb : b < List.getLast (y :: l) (_ : Β¬y :: l = []) n : β„• hn : n ∈ Set.Icc a b h : n ∈ Set.Icc x b β†’ βˆƒ lα΅’, lα΅’ ∈ y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n) this : βˆ€ (lα΅’ : β„•), lα΅’ ∈ x :: y :: l ↔ lα΅’ = x ∨ lα΅’ ∈ y :: l ⊒ βˆƒ lα΅’, lα΅’ = x ∧ lα΅’ ∈ Set.Ioc n (2 * n) ∨ lα΅’ ∈ y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n) TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/LandauTrick.lean
existsOfSlowMono
[18, 1]
[52, 37]
cases le_or_lt x n with | inl hx => apply Or.inr simp only [Set.mem_Ico] at * specialize h (And.intro hx hn.right) exact h | inr hx => apply Or.inl simp at * apply And.intro <;> linarith
case cons.cons b y : β„• l : List β„• a x : β„• hl_mono : a < x ∧ List.Chain (fun u v => u < v) x (y :: l) hl_slow : x ≀ 2 * a ∧ List.Chain (fun u v => v ≀ 2 * u) x (y :: l) hl_cons : x :: y :: l β‰  [] hb : b < List.getLast (y :: l) (_ : Β¬y :: l = []) n : β„• hn : n ∈ Set.Icc a b h : n ∈ Set.Icc x b β†’ βˆƒ lα΅’, lα΅’ ∈ y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n) this : βˆ€ (lα΅’ : β„•), lα΅’ ∈ x :: y :: l ↔ lα΅’ = x ∨ lα΅’ ∈ y :: l ⊒ (βˆƒ x_1, x_1 = x ∧ x_1 ∈ Set.Ioc n (2 * n)) ∨ βˆƒ x, x ∈ y :: l ∧ x ∈ Set.Ioc n (2 * n)
no goals
Please generate a tactic in lean4 to solve the state. STATE: case cons.cons b y : β„• l : List β„• a x : β„• hl_mono : a < x ∧ List.Chain (fun u v => u < v) x (y :: l) hl_slow : x ≀ 2 * a ∧ List.Chain (fun u v => v ≀ 2 * u) x (y :: l) hl_cons : x :: y :: l β‰  [] hb : b < List.getLast (y :: l) (_ : Β¬y :: l = []) n : β„• hn : n ∈ Set.Icc a b h : n ∈ Set.Icc x b β†’ βˆƒ lα΅’, lα΅’ ∈ y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n) this : βˆ€ (lα΅’ : β„•), lα΅’ ∈ x :: y :: l ↔ lα΅’ = x ∨ lα΅’ ∈ y :: l ⊒ (βˆƒ x_1, x_1 = x ∧ x_1 ∈ Set.Ioc n (2 * n)) ∨ βˆƒ x, x ∈ y :: l ∧ x ∈ Set.Ioc n (2 * n) TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/LandauTrick.lean
existsOfSlowMono
[18, 1]
[52, 37]
simp
b y : β„• l : List β„• a x : β„• hl_mono : a < x ∧ List.Chain (fun u v => u < v) x (y :: l) hl_slow : x ≀ 2 * a ∧ List.Chain (fun u v => v ≀ 2 * u) x (y :: l) hl_cons : x :: y :: l β‰  [] hb : b < List.getLast (y :: l) (_ : Β¬y :: l = []) n : β„• hn : n ∈ Set.Icc a b h : n ∈ Set.Icc x b β†’ βˆƒ lα΅’, lα΅’ ∈ y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n) ⊒ βˆ€ (lα΅’ : β„•), lα΅’ ∈ x :: y :: l ↔ lα΅’ = x ∨ lα΅’ ∈ y :: l
no goals
Please generate a tactic in lean4 to solve the state. STATE: b y : β„• l : List β„• a x : β„• hl_mono : a < x ∧ List.Chain (fun u v => u < v) x (y :: l) hl_slow : x ≀ 2 * a ∧ List.Chain (fun u v => v ≀ 2 * u) x (y :: l) hl_cons : x :: y :: l β‰  [] hb : b < List.getLast (y :: l) (_ : Β¬y :: l = []) n : β„• hn : n ∈ Set.Icc a b h : n ∈ Set.Icc x b β†’ βˆƒ lα΅’, lα΅’ ∈ y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n) ⊒ βˆ€ (lα΅’ : β„•), lα΅’ ∈ x :: y :: l ↔ lα΅’ = x ∨ lα΅’ ∈ y :: l TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/LandauTrick.lean
existsOfSlowMono
[18, 1]
[52, 37]
apply Or.inr
case cons.cons.inl b y : β„• l : List β„• a x : β„• hl_mono : a < x ∧ List.Chain (fun u v => u < v) x (y :: l) hl_slow : x ≀ 2 * a ∧ List.Chain (fun u v => v ≀ 2 * u) x (y :: l) hl_cons : x :: y :: l β‰  [] hb : b < List.getLast (y :: l) (_ : Β¬y :: l = []) n : β„• hn : n ∈ Set.Icc a b h : n ∈ Set.Icc x b β†’ βˆƒ lα΅’, lα΅’ ∈ y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n) this : βˆ€ (lα΅’ : β„•), lα΅’ ∈ x :: y :: l ↔ lα΅’ = x ∨ lα΅’ ∈ y :: l hx : x ≀ n ⊒ (βˆƒ x_1, x_1 = x ∧ x_1 ∈ Set.Ioc n (2 * n)) ∨ βˆƒ x, x ∈ y :: l ∧ x ∈ Set.Ioc n (2 * n)
case cons.cons.inl.h b y : β„• l : List β„• a x : β„• hl_mono : a < x ∧ List.Chain (fun u v => u < v) x (y :: l) hl_slow : x ≀ 2 * a ∧ List.Chain (fun u v => v ≀ 2 * u) x (y :: l) hl_cons : x :: y :: l β‰  [] hb : b < List.getLast (y :: l) (_ : Β¬y :: l = []) n : β„• hn : n ∈ Set.Icc a b h : n ∈ Set.Icc x b β†’ βˆƒ lα΅’, lα΅’ ∈ y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n) this : βˆ€ (lα΅’ : β„•), lα΅’ ∈ x :: y :: l ↔ lα΅’ = x ∨ lα΅’ ∈ y :: l hx : x ≀ n ⊒ βˆƒ x, x ∈ y :: l ∧ x ∈ Set.Ioc n (2 * n)
Please generate a tactic in lean4 to solve the state. STATE: case cons.cons.inl b y : β„• l : List β„• a x : β„• hl_mono : a < x ∧ List.Chain (fun u v => u < v) x (y :: l) hl_slow : x ≀ 2 * a ∧ List.Chain (fun u v => v ≀ 2 * u) x (y :: l) hl_cons : x :: y :: l β‰  [] hb : b < List.getLast (y :: l) (_ : Β¬y :: l = []) n : β„• hn : n ∈ Set.Icc a b h : n ∈ Set.Icc x b β†’ βˆƒ lα΅’, lα΅’ ∈ y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n) this : βˆ€ (lα΅’ : β„•), lα΅’ ∈ x :: y :: l ↔ lα΅’ = x ∨ lα΅’ ∈ y :: l hx : x ≀ n ⊒ (βˆƒ x_1, x_1 = x ∧ x_1 ∈ Set.Ioc n (2 * n)) ∨ βˆƒ x, x ∈ y :: l ∧ x ∈ Set.Ioc n (2 * n) TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/LandauTrick.lean
existsOfSlowMono
[18, 1]
[52, 37]
specialize h (And.intro hx hn.right)
case cons.cons.inl.h b y : β„• l : List β„• a x : β„• hl_mono : a < x ∧ List.Chain (fun u v => u < v) x (y :: l) hl_slow : x ≀ 2 * a ∧ List.Chain (fun u v => v ≀ 2 * u) x (y :: l) hl_cons : x :: y :: l β‰  [] hb : b < List.getLast (y :: l) (_ : Β¬y :: l = []) n : β„• hn : n ∈ Set.Icc a b h : n ∈ Set.Icc x b β†’ βˆƒ lα΅’, lα΅’ ∈ y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n) this : βˆ€ (lα΅’ : β„•), lα΅’ ∈ x :: y :: l ↔ lα΅’ = x ∨ lα΅’ ∈ y :: l hx : x ≀ n ⊒ βˆƒ x, x ∈ y :: l ∧ x ∈ Set.Ioc n (2 * n)
case cons.cons.inl.h b y : β„• l : List β„• a x : β„• hl_mono : a < x ∧ List.Chain (fun u v => u < v) x (y :: l) hl_slow : x ≀ 2 * a ∧ List.Chain (fun u v => v ≀ 2 * u) x (y :: l) hl_cons : x :: y :: l β‰  [] hb : b < List.getLast (y :: l) (_ : Β¬y :: l = []) n : β„• hn : n ∈ Set.Icc a b this : βˆ€ (lα΅’ : β„•), lα΅’ ∈ x :: y :: l ↔ lα΅’ = x ∨ lα΅’ ∈ y :: l hx : x ≀ n h : βˆƒ lα΅’, lα΅’ ∈ y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n) ⊒ βˆƒ x, x ∈ y :: l ∧ x ∈ Set.Ioc n (2 * n)
Please generate a tactic in lean4 to solve the state. STATE: case cons.cons.inl.h b y : β„• l : List β„• a x : β„• hl_mono : a < x ∧ List.Chain (fun u v => u < v) x (y :: l) hl_slow : x ≀ 2 * a ∧ List.Chain (fun u v => v ≀ 2 * u) x (y :: l) hl_cons : x :: y :: l β‰  [] hb : b < List.getLast (y :: l) (_ : Β¬y :: l = []) n : β„• hn : n ∈ Set.Icc a b h : n ∈ Set.Icc x b β†’ βˆƒ lα΅’, lα΅’ ∈ y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n) this : βˆ€ (lα΅’ : β„•), lα΅’ ∈ x :: y :: l ↔ lα΅’ = x ∨ lα΅’ ∈ y :: l hx : x ≀ n ⊒ βˆƒ x, x ∈ y :: l ∧ x ∈ Set.Ioc n (2 * n) TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/LandauTrick.lean
existsOfSlowMono
[18, 1]
[52, 37]
exact h
case cons.cons.inl.h b y : β„• l : List β„• a x : β„• hl_mono : a < x ∧ List.Chain (fun u v => u < v) x (y :: l) hl_slow : x ≀ 2 * a ∧ List.Chain (fun u v => v ≀ 2 * u) x (y :: l) hl_cons : x :: y :: l β‰  [] hb : b < List.getLast (y :: l) (_ : Β¬y :: l = []) n : β„• hn : n ∈ Set.Icc a b this : βˆ€ (lα΅’ : β„•), lα΅’ ∈ x :: y :: l ↔ lα΅’ = x ∨ lα΅’ ∈ y :: l hx : x ≀ n h : βˆƒ lα΅’, lα΅’ ∈ y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n) ⊒ βˆƒ x, x ∈ y :: l ∧ x ∈ Set.Ioc n (2 * n)
no goals
Please generate a tactic in lean4 to solve the state. STATE: case cons.cons.inl.h b y : β„• l : List β„• a x : β„• hl_mono : a < x ∧ List.Chain (fun u v => u < v) x (y :: l) hl_slow : x ≀ 2 * a ∧ List.Chain (fun u v => v ≀ 2 * u) x (y :: l) hl_cons : x :: y :: l β‰  [] hb : b < List.getLast (y :: l) (_ : Β¬y :: l = []) n : β„• hn : n ∈ Set.Icc a b this : βˆ€ (lα΅’ : β„•), lα΅’ ∈ x :: y :: l ↔ lα΅’ = x ∨ lα΅’ ∈ y :: l hx : x ≀ n h : βˆƒ lα΅’, lα΅’ ∈ y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n) ⊒ βˆƒ x, x ∈ y :: l ∧ x ∈ Set.Ioc n (2 * n) TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/LandauTrick.lean
existsOfSlowMono
[18, 1]
[52, 37]
apply Or.inl
case cons.cons.inr b y : β„• l : List β„• a x : β„• hl_mono : a < x ∧ List.Chain (fun u v => u < v) x (y :: l) hl_slow : x ≀ 2 * a ∧ List.Chain (fun u v => v ≀ 2 * u) x (y :: l) hl_cons : x :: y :: l β‰  [] hb : b < List.getLast (y :: l) (_ : Β¬y :: l = []) n : β„• hn : n ∈ Set.Icc a b h : n ∈ Set.Icc x b β†’ βˆƒ lα΅’, lα΅’ ∈ y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n) this : βˆ€ (lα΅’ : β„•), lα΅’ ∈ x :: y :: l ↔ lα΅’ = x ∨ lα΅’ ∈ y :: l hx : n < x ⊒ (βˆƒ x_1, x_1 = x ∧ x_1 ∈ Set.Ioc n (2 * n)) ∨ βˆƒ x, x ∈ y :: l ∧ x ∈ Set.Ioc n (2 * n)
case cons.cons.inr.h b y : β„• l : List β„• a x : β„• hl_mono : a < x ∧ List.Chain (fun u v => u < v) x (y :: l) hl_slow : x ≀ 2 * a ∧ List.Chain (fun u v => v ≀ 2 * u) x (y :: l) hl_cons : x :: y :: l β‰  [] hb : b < List.getLast (y :: l) (_ : Β¬y :: l = []) n : β„• hn : n ∈ Set.Icc a b h : n ∈ Set.Icc x b β†’ βˆƒ lα΅’, lα΅’ ∈ y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n) this : βˆ€ (lα΅’ : β„•), lα΅’ ∈ x :: y :: l ↔ lα΅’ = x ∨ lα΅’ ∈ y :: l hx : n < x ⊒ βˆƒ x_1, x_1 = x ∧ x_1 ∈ Set.Ioc n (2 * n)
Please generate a tactic in lean4 to solve the state. STATE: case cons.cons.inr b y : β„• l : List β„• a x : β„• hl_mono : a < x ∧ List.Chain (fun u v => u < v) x (y :: l) hl_slow : x ≀ 2 * a ∧ List.Chain (fun u v => v ≀ 2 * u) x (y :: l) hl_cons : x :: y :: l β‰  [] hb : b < List.getLast (y :: l) (_ : Β¬y :: l = []) n : β„• hn : n ∈ Set.Icc a b h : n ∈ Set.Icc x b β†’ βˆƒ lα΅’, lα΅’ ∈ y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n) this : βˆ€ (lα΅’ : β„•), lα΅’ ∈ x :: y :: l ↔ lα΅’ = x ∨ lα΅’ ∈ y :: l hx : n < x ⊒ (βˆƒ x_1, x_1 = x ∧ x_1 ∈ Set.Ioc n (2 * n)) ∨ βˆƒ x, x ∈ y :: l ∧ x ∈ Set.Ioc n (2 * n) TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/LandauTrick.lean
existsOfSlowMono
[18, 1]
[52, 37]
simp at *
case cons.cons.inr.h b y : β„• l : List β„• a x : β„• hl_mono : a < x ∧ List.Chain (fun u v => u < v) x (y :: l) hl_slow : x ≀ 2 * a ∧ List.Chain (fun u v => v ≀ 2 * u) x (y :: l) hl_cons : x :: y :: l β‰  [] hb : b < List.getLast (y :: l) (_ : Β¬y :: l = []) n : β„• hn : n ∈ Set.Icc a b h : n ∈ Set.Icc x b β†’ βˆƒ lα΅’, lα΅’ ∈ y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n) this : βˆ€ (lα΅’ : β„•), lα΅’ ∈ x :: y :: l ↔ lα΅’ = x ∨ lα΅’ ∈ y :: l hx : n < x ⊒ βˆƒ x_1, x_1 = x ∧ x_1 ∈ Set.Ioc n (2 * n)
case cons.cons.inr.h b y : β„• l : List β„• a x : β„• hb : b < List.getLast (y :: l) (_ : Β¬y :: l = []) n : β„• hx : n < x hl_mono : a < x ∧ x < y ∧ List.Chain (fun u v => u < v) y l hl_slow : x ≀ 2 * a ∧ y ≀ 2 * x ∧ List.Chain (fun u v => v ≀ 2 * u) y l hl_cons : True hn : a ≀ n ∧ n ≀ b h : x ≀ n β†’ n ≀ b β†’ n < y ∧ y ≀ 2 * n ∨ βˆƒ a, a ∈ l ∧ n < a ∧ a ≀ 2 * n this : True ⊒ n < x ∧ x ≀ 2 * n
Please generate a tactic in lean4 to solve the state. STATE: case cons.cons.inr.h b y : β„• l : List β„• a x : β„• hl_mono : a < x ∧ List.Chain (fun u v => u < v) x (y :: l) hl_slow : x ≀ 2 * a ∧ List.Chain (fun u v => v ≀ 2 * u) x (y :: l) hl_cons : x :: y :: l β‰  [] hb : b < List.getLast (y :: l) (_ : Β¬y :: l = []) n : β„• hn : n ∈ Set.Icc a b h : n ∈ Set.Icc x b β†’ βˆƒ lα΅’, lα΅’ ∈ y :: l ∧ lα΅’ ∈ Set.Ioc n (2 * n) this : βˆ€ (lα΅’ : β„•), lα΅’ ∈ x :: y :: l ↔ lα΅’ = x ∨ lα΅’ ∈ y :: l hx : n < x ⊒ βˆƒ x_1, x_1 = x ∧ x_1 ∈ Set.Ioc n (2 * n) TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/LandauTrick.lean
existsOfSlowMono
[18, 1]
[52, 37]
apply And.intro <;> linarith
case cons.cons.inr.h b y : β„• l : List β„• a x : β„• hb : b < List.getLast (y :: l) (_ : Β¬y :: l = []) n : β„• hx : n < x hl_mono : a < x ∧ x < y ∧ List.Chain (fun u v => u < v) y l hl_slow : x ≀ 2 * a ∧ y ≀ 2 * x ∧ List.Chain (fun u v => v ≀ 2 * u) y l hl_cons : True hn : a ≀ n ∧ n ≀ b h : x ≀ n β†’ n ≀ b β†’ n < y ∧ y ≀ 2 * n ∨ βˆƒ a, a ∈ l ∧ n < a ∧ a ≀ 2 * n this : True ⊒ n < x ∧ x ≀ 2 * n
no goals
Please generate a tactic in lean4 to solve the state. STATE: case cons.cons.inr.h b y : β„• l : List β„• a x : β„• hb : b < List.getLast (y :: l) (_ : Β¬y :: l = []) n : β„• hx : n < x hl_mono : a < x ∧ x < y ∧ List.Chain (fun u v => u < v) y l hl_slow : x ≀ 2 * a ∧ y ≀ 2 * x ∧ List.Chain (fun u v => v ≀ 2 * u) y l hl_cons : True hn : a ≀ n ∧ n ≀ b h : x ≀ n β†’ n ≀ b β†’ n < y ∧ y ≀ 2 * n ∨ βˆƒ a, a ∈ l ∧ n < a ∧ a ≀ 2 * n this : True ⊒ n < x ∧ x ≀ 2 * n TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/LandauTrick.lean
landauTrick
[54, 1]
[67, 23]
have hp : n ∈ Set.Icc 1 4000 β†’ βˆƒ p, p ∈ nums ∧ p ∈ Set.Ioc n (2*n)
n : β„• hn_pos : 0 < n hn_lt : n ≀ 4000 ⊒ βˆƒ p, p ∈ Set.Ioc n (2 * n) ∧ Nat.Prime p
case hp n : β„• hn_pos : 0 < n hn_lt : n ≀ 4000 ⊒ n ∈ Set.Icc 1 4000 β†’ βˆƒ p, p ∈ nums ∧ p ∈ Set.Ioc n (2 * n) n : β„• hn_pos : 0 < n hn_lt : n ≀ 4000 hp : n ∈ Set.Icc 1 4000 β†’ βˆƒ p, p ∈ nums ∧ p ∈ Set.Ioc n (2 * n) ⊒ βˆƒ p, p ∈ Set.Ioc n (2 * n) ∧ Nat.Prime p
Please generate a tactic in lean4 to solve the state. STATE: n : β„• hn_pos : 0 < n hn_lt : n ≀ 4000 ⊒ βˆƒ p, p ∈ Set.Ioc n (2 * n) ∧ Nat.Prime p TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/LandauTrick.lean
landauTrick
[54, 1]
[67, 23]
. apply existsOfSlowMono <;> simp [nums]
case hp n : β„• hn_pos : 0 < n hn_lt : n ≀ 4000 ⊒ n ∈ Set.Icc 1 4000 β†’ βˆƒ p, p ∈ nums ∧ p ∈ Set.Ioc n (2 * n) n : β„• hn_pos : 0 < n hn_lt : n ≀ 4000 hp : n ∈ Set.Icc 1 4000 β†’ βˆƒ p, p ∈ nums ∧ p ∈ Set.Ioc n (2 * n) ⊒ βˆƒ p, p ∈ Set.Ioc n (2 * n) ∧ Nat.Prime p
n : β„• hn_pos : 0 < n hn_lt : n ≀ 4000 hp : n ∈ Set.Icc 1 4000 β†’ βˆƒ p, p ∈ nums ∧ p ∈ Set.Ioc n (2 * n) ⊒ βˆƒ p, p ∈ Set.Ioc n (2 * n) ∧ Nat.Prime p
Please generate a tactic in lean4 to solve the state. STATE: case hp n : β„• hn_pos : 0 < n hn_lt : n ≀ 4000 ⊒ n ∈ Set.Icc 1 4000 β†’ βˆƒ p, p ∈ nums ∧ p ∈ Set.Ioc n (2 * n) n : β„• hn_pos : 0 < n hn_lt : n ≀ 4000 hp : n ∈ Set.Icc 1 4000 β†’ βˆƒ p, p ∈ nums ∧ p ∈ Set.Ioc n (2 * n) ⊒ βˆƒ p, p ∈ Set.Ioc n (2 * n) ∧ Nat.Prime p TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/LandauTrick.lean
landauTrick
[54, 1]
[67, 23]
have hp : βˆƒ p, p ∈ nums ∧ p ∈ Set.Ioc n (2*n)
n : β„• hn_pos : 0 < n hn_lt : n ≀ 4000 hp : n ∈ Set.Icc 1 4000 β†’ βˆƒ p, p ∈ nums ∧ p ∈ Set.Ioc n (2 * n) ⊒ βˆƒ p, p ∈ Set.Ioc n (2 * n) ∧ Nat.Prime p
case hp n : β„• hn_pos : 0 < n hn_lt : n ≀ 4000 hp : n ∈ Set.Icc 1 4000 β†’ βˆƒ p, p ∈ nums ∧ p ∈ Set.Ioc n (2 * n) ⊒ βˆƒ p, p ∈ nums ∧ p ∈ Set.Ioc n (2 * n) n : β„• hn_pos : 0 < n hn_lt : n ≀ 4000 hp✝ : n ∈ Set.Icc 1 4000 β†’ βˆƒ p, p ∈ nums ∧ p ∈ Set.Ioc n (2 * n) hp : βˆƒ p, p ∈ nums ∧ p ∈ Set.Ioc n (2 * n) ⊒ βˆƒ p, p ∈ Set.Ioc n (2 * n) ∧ Nat.Prime p
Please generate a tactic in lean4 to solve the state. STATE: n : β„• hn_pos : 0 < n hn_lt : n ≀ 4000 hp : n ∈ Set.Icc 1 4000 β†’ βˆƒ p, p ∈ nums ∧ p ∈ Set.Ioc n (2 * n) ⊒ βˆƒ p, p ∈ Set.Ioc n (2 * n) ∧ Nat.Prime p TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/LandauTrick.lean
landauTrick
[54, 1]
[67, 23]
. apply hp apply And.intro <;> linarith
case hp n : β„• hn_pos : 0 < n hn_lt : n ≀ 4000 hp : n ∈ Set.Icc 1 4000 β†’ βˆƒ p, p ∈ nums ∧ p ∈ Set.Ioc n (2 * n) ⊒ βˆƒ p, p ∈ nums ∧ p ∈ Set.Ioc n (2 * n) n : β„• hn_pos : 0 < n hn_lt : n ≀ 4000 hp✝ : n ∈ Set.Icc 1 4000 β†’ βˆƒ p, p ∈ nums ∧ p ∈ Set.Ioc n (2 * n) hp : βˆƒ p, p ∈ nums ∧ p ∈ Set.Ioc n (2 * n) ⊒ βˆƒ p, p ∈ Set.Ioc n (2 * n) ∧ Nat.Prime p
n : β„• hn_pos : 0 < n hn_lt : n ≀ 4000 hp✝ : n ∈ Set.Icc 1 4000 β†’ βˆƒ p, p ∈ nums ∧ p ∈ Set.Ioc n (2 * n) hp : βˆƒ p, p ∈ nums ∧ p ∈ Set.Ioc n (2 * n) ⊒ βˆƒ p, p ∈ Set.Ioc n (2 * n) ∧ Nat.Prime p
Please generate a tactic in lean4 to solve the state. STATE: case hp n : β„• hn_pos : 0 < n hn_lt : n ≀ 4000 hp : n ∈ Set.Icc 1 4000 β†’ βˆƒ p, p ∈ nums ∧ p ∈ Set.Ioc n (2 * n) ⊒ βˆƒ p, p ∈ nums ∧ p ∈ Set.Ioc n (2 * n) n : β„• hn_pos : 0 < n hn_lt : n ≀ 4000 hp✝ : n ∈ Set.Icc 1 4000 β†’ βˆƒ p, p ∈ nums ∧ p ∈ Set.Ioc n (2 * n) hp : βˆƒ p, p ∈ nums ∧ p ∈ Set.Ioc n (2 * n) ⊒ βˆƒ p, p ∈ Set.Ioc n (2 * n) ∧ Nat.Prime p TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/LandauTrick.lean
landauTrick
[54, 1]
[67, 23]
cases hp with | intro p hp => exists p apply And.intro hp.right refine List.allβ‚‚_iff_forall.mp ?_ p hp.left exact allPrimeNums
n : β„• hn_pos : 0 < n hn_lt : n ≀ 4000 hp✝ : n ∈ Set.Icc 1 4000 β†’ βˆƒ p, p ∈ nums ∧ p ∈ Set.Ioc n (2 * n) hp : βˆƒ p, p ∈ nums ∧ p ∈ Set.Ioc n (2 * n) ⊒ βˆƒ p, p ∈ Set.Ioc n (2 * n) ∧ Nat.Prime p
no goals
Please generate a tactic in lean4 to solve the state. STATE: n : β„• hn_pos : 0 < n hn_lt : n ≀ 4000 hp✝ : n ∈ Set.Icc 1 4000 β†’ βˆƒ p, p ∈ nums ∧ p ∈ Set.Ioc n (2 * n) hp : βˆƒ p, p ∈ nums ∧ p ∈ Set.Ioc n (2 * n) ⊒ βˆƒ p, p ∈ Set.Ioc n (2 * n) ∧ Nat.Prime p TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/LandauTrick.lean
landauTrick
[54, 1]
[67, 23]
apply existsOfSlowMono <;> simp [nums]
case hp n : β„• hn_pos : 0 < n hn_lt : n ≀ 4000 ⊒ n ∈ Set.Icc 1 4000 β†’ βˆƒ p, p ∈ nums ∧ p ∈ Set.Ioc n (2 * n)
no goals
Please generate a tactic in lean4 to solve the state. STATE: case hp n : β„• hn_pos : 0 < n hn_lt : n ≀ 4000 ⊒ n ∈ Set.Icc 1 4000 β†’ βˆƒ p, p ∈ nums ∧ p ∈ Set.Ioc n (2 * n) TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/LandauTrick.lean
landauTrick
[54, 1]
[67, 23]
apply hp
case hp n : β„• hn_pos : 0 < n hn_lt : n ≀ 4000 hp : n ∈ Set.Icc 1 4000 β†’ βˆƒ p, p ∈ nums ∧ p ∈ Set.Ioc n (2 * n) ⊒ βˆƒ p, p ∈ nums ∧ p ∈ Set.Ioc n (2 * n)
case hp n : β„• hn_pos : 0 < n hn_lt : n ≀ 4000 hp : n ∈ Set.Icc 1 4000 β†’ βˆƒ p, p ∈ nums ∧ p ∈ Set.Ioc n (2 * n) ⊒ n ∈ Set.Icc 1 4000
Please generate a tactic in lean4 to solve the state. STATE: case hp n : β„• hn_pos : 0 < n hn_lt : n ≀ 4000 hp : n ∈ Set.Icc 1 4000 β†’ βˆƒ p, p ∈ nums ∧ p ∈ Set.Ioc n (2 * n) ⊒ βˆƒ p, p ∈ nums ∧ p ∈ Set.Ioc n (2 * n) TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/LandauTrick.lean
landauTrick
[54, 1]
[67, 23]
apply And.intro <;> linarith
case hp n : β„• hn_pos : 0 < n hn_lt : n ≀ 4000 hp : n ∈ Set.Icc 1 4000 β†’ βˆƒ p, p ∈ nums ∧ p ∈ Set.Ioc n (2 * n) ⊒ n ∈ Set.Icc 1 4000
no goals
Please generate a tactic in lean4 to solve the state. STATE: case hp n : β„• hn_pos : 0 < n hn_lt : n ≀ 4000 hp : n ∈ Set.Icc 1 4000 β†’ βˆƒ p, p ∈ nums ∧ p ∈ Set.Ioc n (2 * n) ⊒ n ∈ Set.Icc 1 4000 TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/LandauTrick.lean
landauTrick
[54, 1]
[67, 23]
exists p
case intro n : β„• hn_pos : 0 < n hn_lt : n ≀ 4000 hp✝ : n ∈ Set.Icc 1 4000 β†’ βˆƒ p, p ∈ nums ∧ p ∈ Set.Ioc n (2 * n) p : β„• hp : p ∈ nums ∧ p ∈ Set.Ioc n (2 * n) ⊒ βˆƒ p, p ∈ Set.Ioc n (2 * n) ∧ Nat.Prime p
case intro n : β„• hn_pos : 0 < n hn_lt : n ≀ 4000 hp✝ : n ∈ Set.Icc 1 4000 β†’ βˆƒ p, p ∈ nums ∧ p ∈ Set.Ioc n (2 * n) p : β„• hp : p ∈ nums ∧ p ∈ Set.Ioc n (2 * n) ⊒ p ∈ Set.Ioc n (2 * n) ∧ Nat.Prime p
Please generate a tactic in lean4 to solve the state. STATE: case intro n : β„• hn_pos : 0 < n hn_lt : n ≀ 4000 hp✝ : n ∈ Set.Icc 1 4000 β†’ βˆƒ p, p ∈ nums ∧ p ∈ Set.Ioc n (2 * n) p : β„• hp : p ∈ nums ∧ p ∈ Set.Ioc n (2 * n) ⊒ βˆƒ p, p ∈ Set.Ioc n (2 * n) ∧ Nat.Prime p TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/LandauTrick.lean
landauTrick
[54, 1]
[67, 23]
apply And.intro hp.right
case intro n : β„• hn_pos : 0 < n hn_lt : n ≀ 4000 hp✝ : n ∈ Set.Icc 1 4000 β†’ βˆƒ p, p ∈ nums ∧ p ∈ Set.Ioc n (2 * n) p : β„• hp : p ∈ nums ∧ p ∈ Set.Ioc n (2 * n) ⊒ p ∈ Set.Ioc n (2 * n) ∧ Nat.Prime p
case intro n : β„• hn_pos : 0 < n hn_lt : n ≀ 4000 hp✝ : n ∈ Set.Icc 1 4000 β†’ βˆƒ p, p ∈ nums ∧ p ∈ Set.Ioc n (2 * n) p : β„• hp : p ∈ nums ∧ p ∈ Set.Ioc n (2 * n) ⊒ Nat.Prime p
Please generate a tactic in lean4 to solve the state. STATE: case intro n : β„• hn_pos : 0 < n hn_lt : n ≀ 4000 hp✝ : n ∈ Set.Icc 1 4000 β†’ βˆƒ p, p ∈ nums ∧ p ∈ Set.Ioc n (2 * n) p : β„• hp : p ∈ nums ∧ p ∈ Set.Ioc n (2 * n) ⊒ p ∈ Set.Ioc n (2 * n) ∧ Nat.Prime p TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/LandauTrick.lean
landauTrick
[54, 1]
[67, 23]
refine List.allβ‚‚_iff_forall.mp ?_ p hp.left
case intro n : β„• hn_pos : 0 < n hn_lt : n ≀ 4000 hp✝ : n ∈ Set.Icc 1 4000 β†’ βˆƒ p, p ∈ nums ∧ p ∈ Set.Ioc n (2 * n) p : β„• hp : p ∈ nums ∧ p ∈ Set.Ioc n (2 * n) ⊒ Nat.Prime p
case intro n : β„• hn_pos : 0 < n hn_lt : n ≀ 4000 hp✝ : n ∈ Set.Icc 1 4000 β†’ βˆƒ p, p ∈ nums ∧ p ∈ Set.Ioc n (2 * n) p : β„• hp : p ∈ nums ∧ p ∈ Set.Ioc n (2 * n) ⊒ List.Allβ‚‚ Nat.Prime nums
Please generate a tactic in lean4 to solve the state. STATE: case intro n : β„• hn_pos : 0 < n hn_lt : n ≀ 4000 hp✝ : n ∈ Set.Icc 1 4000 β†’ βˆƒ p, p ∈ nums ∧ p ∈ Set.Ioc n (2 * n) p : β„• hp : p ∈ nums ∧ p ∈ Set.Ioc n (2 * n) ⊒ Nat.Prime p TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/LandauTrick.lean
landauTrick
[54, 1]
[67, 23]
exact allPrimeNums
case intro n : β„• hn_pos : 0 < n hn_lt : n ≀ 4000 hp✝ : n ∈ Set.Icc 1 4000 β†’ βˆƒ p, p ∈ nums ∧ p ∈ Set.Ioc n (2 * n) p : β„• hp : p ∈ nums ∧ p ∈ Set.Ioc n (2 * n) ⊒ List.Allβ‚‚ Nat.Prime nums
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro n : β„• hn_pos : 0 < n hn_lt : n ≀ 4000 hp✝ : n ∈ Set.Icc 1 4000 β†’ βˆƒ p, p ∈ nums ∧ p ∈ Set.Ioc n (2 * n) p : β„• hp : p ∈ nums ∧ p ∈ Set.Ioc n (2 * n) ⊒ List.Allβ‚‚ Nat.Prime nums TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/UnboundedGaps.lean
PrimeRange.prodNeZero
[11, 1]
[12, 43]
simp [prod, PrimeRange, List.mem_filter]
k : β„• ⊒ prod k β‰  0
no goals
Please generate a tactic in lean4 to solve the state. STATE: k : β„• ⊒ prod k β‰  0 TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/UnboundedGaps.lean
PrimeRange.prodDvdOfLt
[17, 1]
[22, 17]
intro hk
k p : β„• hp : Nat.Prime p ⊒ p < k β†’ p ∣ prod k
k p : β„• hp : Nat.Prime p hk : p < k ⊒ p ∣ prod k
Please generate a tactic in lean4 to solve the state. STATE: k p : β„• hp : Nat.Prime p ⊒ p < k β†’ p ∣ prod k TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/UnboundedGaps.lean
PrimeRange.prodDvdOfLt
[17, 1]
[22, 17]
apply List.dvd_prod
k p : β„• hp : Nat.Prime p hk : p < k ⊒ p ∣ prod k
case ha k p : β„• hp : Nat.Prime p hk : p < k ⊒ p ∈ PrimeRange k
Please generate a tactic in lean4 to solve the state. STATE: k p : β„• hp : Nat.Prime p hk : p < k ⊒ p ∣ prod k TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/UnboundedGaps.lean
PrimeRange.prodDvdOfLt
[17, 1]
[22, 17]
simp [PrimeRange, List.mem_filter]
case ha k p : β„• hp : Nat.Prime p hk : p < k ⊒ p ∈ PrimeRange k
case ha k p : β„• hp : Nat.Prime p hk : p < k ⊒ p < k ∧ Nat.Prime p
Please generate a tactic in lean4 to solve the state. STATE: case ha k p : β„• hp : Nat.Prime p hk : p < k ⊒ p ∈ PrimeRange k TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/UnboundedGaps.lean
PrimeRange.prodDvdOfLt
[17, 1]
[22, 17]
exact ⟨hk, hp⟩
case ha k p : β„• hp : Nat.Prime p hk : p < k ⊒ p < k ∧ Nat.Prime p
no goals
Please generate a tactic in lean4 to solve the state. STATE: case ha k p : β„• hp : Nat.Prime p hk : p < k ⊒ p < k ∧ Nat.Prime p TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/UnboundedGaps.lean
gapAfterProdPrimeRange
[27, 1]
[49, 17]
intros
k u : β„• ⊒ 2 ≀ u ∧ u ≀ Nat.succ k β†’ Β¬Nat.Prime (PrimeRange.prod (Nat.succ (Nat.succ k)) + u)
k u : β„• a✝ : 2 ≀ u ∧ u ≀ Nat.succ k ⊒ Β¬Nat.Prime (PrimeRange.prod (Nat.succ (Nat.succ k)) + u)
Please generate a tactic in lean4 to solve the state. STATE: k u : β„• ⊒ 2 ≀ u ∧ u ≀ Nat.succ k β†’ Β¬Nat.Prime (PrimeRange.prod (Nat.succ (Nat.succ k)) + u) TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/UnboundedGaps.lean
gapAfterProdPrimeRange
[27, 1]
[49, 17]
rw [Nat.prime_def_lt']
k u : β„• a✝ : 2 ≀ u ∧ u ≀ Nat.succ k ⊒ Β¬Nat.Prime (PrimeRange.prod (Nat.succ (Nat.succ k)) + u)
k u : β„• a✝ : 2 ≀ u ∧ u ≀ Nat.succ k ⊒ Β¬(2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u ∧ βˆ€ (m : β„•), 2 ≀ m β†’ m < PrimeRange.prod (Nat.succ (Nat.succ k)) + u β†’ Β¬m ∣ PrimeRange.prod (Nat.succ (Nat.succ k)) + u)
Please generate a tactic in lean4 to solve the state. STATE: k u : β„• a✝ : 2 ≀ u ∧ u ≀ Nat.succ k ⊒ Β¬Nat.Prime (PrimeRange.prod (Nat.succ (Nat.succ k)) + u) TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/UnboundedGaps.lean
gapAfterProdPrimeRange
[27, 1]
[49, 17]
simp
k u : β„• a✝ : 2 ≀ u ∧ u ≀ Nat.succ k ⊒ Β¬(2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u ∧ βˆ€ (m : β„•), 2 ≀ m β†’ m < PrimeRange.prod (Nat.succ (Nat.succ k)) + u β†’ Β¬m ∣ PrimeRange.prod (Nat.succ (Nat.succ k)) + u)
k u : β„• a✝ : 2 ≀ u ∧ u ≀ Nat.succ k ⊒ 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u β†’ βˆƒ x, x < PrimeRange.prod (Nat.succ (Nat.succ k)) + u ∧ 2 ≀ x ∧ x ∣ PrimeRange.prod (Nat.succ (Nat.succ k)) + u
Please generate a tactic in lean4 to solve the state. STATE: k u : β„• a✝ : 2 ≀ u ∧ u ≀ Nat.succ k ⊒ Β¬(2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u ∧ βˆ€ (m : β„•), 2 ≀ m β†’ m < PrimeRange.prod (Nat.succ (Nat.succ k)) + u β†’ Β¬m ∣ PrimeRange.prod (Nat.succ (Nat.succ k)) + u) TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/UnboundedGaps.lean
gapAfterProdPrimeRange
[27, 1]
[49, 17]
intros
k u : β„• a✝ : 2 ≀ u ∧ u ≀ Nat.succ k ⊒ 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u β†’ βˆƒ x, x < PrimeRange.prod (Nat.succ (Nat.succ k)) + u ∧ 2 ≀ x ∧ x ∣ PrimeRange.prod (Nat.succ (Nat.succ k)) + u
k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u ⊒ βˆƒ x, x < PrimeRange.prod (Nat.succ (Nat.succ k)) + u ∧ 2 ≀ x ∧ x ∣ PrimeRange.prod (Nat.succ (Nat.succ k)) + u
Please generate a tactic in lean4 to solve the state. STATE: k u : β„• a✝ : 2 ≀ u ∧ u ≀ Nat.succ k ⊒ 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u β†’ βˆƒ x, x < PrimeRange.prod (Nat.succ (Nat.succ k)) + u ∧ 2 ≀ x ∧ x ∣ PrimeRange.prod (Nat.succ (Nat.succ k)) + u TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/UnboundedGaps.lean
gapAfterProdPrimeRange
[27, 1]
[49, 17]
have : u β‰  1
k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u ⊒ βˆƒ x, x < PrimeRange.prod (Nat.succ (Nat.succ k)) + u ∧ 2 ≀ x ∧ x ∣ PrimeRange.prod (Nat.succ (Nat.succ k)) + u
case this k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u ⊒ u β‰  1 k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 ⊒ βˆƒ x, x < PrimeRange.prod (Nat.succ (Nat.succ k)) + u ∧ 2 ≀ x ∧ x ∣ PrimeRange.prod (Nat.succ (Nat.succ k)) + u
Please generate a tactic in lean4 to solve the state. STATE: k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u ⊒ βˆƒ x, x < PrimeRange.prod (Nat.succ (Nat.succ k)) + u ∧ 2 ≀ x ∧ x ∣ PrimeRange.prod (Nat.succ (Nat.succ k)) + u TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/UnboundedGaps.lean
gapAfterProdPrimeRange
[27, 1]
[49, 17]
. linarith
case this k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u ⊒ u β‰  1 k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 ⊒ βˆƒ x, x < PrimeRange.prod (Nat.succ (Nat.succ k)) + u ∧ 2 ≀ x ∧ x ∣ PrimeRange.prod (Nat.succ (Nat.succ k)) + u
k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 ⊒ βˆƒ x, x < PrimeRange.prod (Nat.succ (Nat.succ k)) + u ∧ 2 ≀ x ∧ x ∣ PrimeRange.prod (Nat.succ (Nat.succ k)) + u
Please generate a tactic in lean4 to solve the state. STATE: case this k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u ⊒ u β‰  1 k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 ⊒ βˆƒ x, x < PrimeRange.prod (Nat.succ (Nat.succ k)) + u ∧ 2 ≀ x ∧ x ∣ PrimeRange.prod (Nat.succ (Nat.succ k)) + u TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/UnboundedGaps.lean
gapAfterProdPrimeRange
[27, 1]
[49, 17]
cases Nat.exists_prime_and_dvd this with | intro p hp => exists p have hu_pos : 0 < u . linarith have hpu : p ≀ u := Nat.le_of_dvd hu_pos hp.right apply And.intro . apply lt_of_le_of_lt hpu apply Nat.lt_add_of_pos_left apply PrimeRange.prodPos . apply And.intro . exact Nat.Prime.two_le hp.left . apply Nat.dvd_add _ hp.right apply PrimeRange.prodDvdOfLt hp.left linarith
k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 ⊒ βˆƒ x, x < PrimeRange.prod (Nat.succ (Nat.succ k)) + u ∧ 2 ≀ x ∧ x ∣ PrimeRange.prod (Nat.succ (Nat.succ k)) + u
no goals
Please generate a tactic in lean4 to solve the state. STATE: k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 ⊒ βˆƒ x, x < PrimeRange.prod (Nat.succ (Nat.succ k)) + u ∧ 2 ≀ x ∧ x ∣ PrimeRange.prod (Nat.succ (Nat.succ k)) + u TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/UnboundedGaps.lean
gapAfterProdPrimeRange
[27, 1]
[49, 17]
linarith
case this k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u ⊒ u β‰  1
no goals
Please generate a tactic in lean4 to solve the state. STATE: case this k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u ⊒ u β‰  1 TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/UnboundedGaps.lean
gapAfterProdPrimeRange
[27, 1]
[49, 17]
exists p
case intro k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 p : β„• hp : Nat.Prime p ∧ p ∣ u ⊒ βˆƒ x, x < PrimeRange.prod (Nat.succ (Nat.succ k)) + u ∧ 2 ≀ x ∧ x ∣ PrimeRange.prod (Nat.succ (Nat.succ k)) + u
case intro k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 p : β„• hp : Nat.Prime p ∧ p ∣ u ⊒ p < PrimeRange.prod (Nat.succ (Nat.succ k)) + u ∧ 2 ≀ p ∧ p ∣ PrimeRange.prod (Nat.succ (Nat.succ k)) + u
Please generate a tactic in lean4 to solve the state. STATE: case intro k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 p : β„• hp : Nat.Prime p ∧ p ∣ u ⊒ βˆƒ x, x < PrimeRange.prod (Nat.succ (Nat.succ k)) + u ∧ 2 ≀ x ∧ x ∣ PrimeRange.prod (Nat.succ (Nat.succ k)) + u TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/UnboundedGaps.lean
gapAfterProdPrimeRange
[27, 1]
[49, 17]
have hu_pos : 0 < u
case intro k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 p : β„• hp : Nat.Prime p ∧ p ∣ u ⊒ p < PrimeRange.prod (Nat.succ (Nat.succ k)) + u ∧ 2 ≀ p ∧ p ∣ PrimeRange.prod (Nat.succ (Nat.succ k)) + u
case hu_pos k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 p : β„• hp : Nat.Prime p ∧ p ∣ u ⊒ 0 < u case intro k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 p : β„• hp : Nat.Prime p ∧ p ∣ u hu_pos : 0 < u ⊒ p < PrimeRange.prod (Nat.succ (Nat.succ k)) + u ∧ 2 ≀ p ∧ p ∣ PrimeRange.prod (Nat.succ (Nat.succ k)) + u
Please generate a tactic in lean4 to solve the state. STATE: case intro k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 p : β„• hp : Nat.Prime p ∧ p ∣ u ⊒ p < PrimeRange.prod (Nat.succ (Nat.succ k)) + u ∧ 2 ≀ p ∧ p ∣ PrimeRange.prod (Nat.succ (Nat.succ k)) + u TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/UnboundedGaps.lean
gapAfterProdPrimeRange
[27, 1]
[49, 17]
. linarith
case hu_pos k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 p : β„• hp : Nat.Prime p ∧ p ∣ u ⊒ 0 < u case intro k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 p : β„• hp : Nat.Prime p ∧ p ∣ u hu_pos : 0 < u ⊒ p < PrimeRange.prod (Nat.succ (Nat.succ k)) + u ∧ 2 ≀ p ∧ p ∣ PrimeRange.prod (Nat.succ (Nat.succ k)) + u
case intro k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 p : β„• hp : Nat.Prime p ∧ p ∣ u hu_pos : 0 < u ⊒ p < PrimeRange.prod (Nat.succ (Nat.succ k)) + u ∧ 2 ≀ p ∧ p ∣ PrimeRange.prod (Nat.succ (Nat.succ k)) + u
Please generate a tactic in lean4 to solve the state. STATE: case hu_pos k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 p : β„• hp : Nat.Prime p ∧ p ∣ u ⊒ 0 < u case intro k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 p : β„• hp : Nat.Prime p ∧ p ∣ u hu_pos : 0 < u ⊒ p < PrimeRange.prod (Nat.succ (Nat.succ k)) + u ∧ 2 ≀ p ∧ p ∣ PrimeRange.prod (Nat.succ (Nat.succ k)) + u TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/UnboundedGaps.lean
gapAfterProdPrimeRange
[27, 1]
[49, 17]
have hpu : p ≀ u := Nat.le_of_dvd hu_pos hp.right
case intro k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 p : β„• hp : Nat.Prime p ∧ p ∣ u hu_pos : 0 < u ⊒ p < PrimeRange.prod (Nat.succ (Nat.succ k)) + u ∧ 2 ≀ p ∧ p ∣ PrimeRange.prod (Nat.succ (Nat.succ k)) + u
case intro k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 p : β„• hp : Nat.Prime p ∧ p ∣ u hu_pos : 0 < u hpu : p ≀ u ⊒ p < PrimeRange.prod (Nat.succ (Nat.succ k)) + u ∧ 2 ≀ p ∧ p ∣ PrimeRange.prod (Nat.succ (Nat.succ k)) + u
Please generate a tactic in lean4 to solve the state. STATE: case intro k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 p : β„• hp : Nat.Prime p ∧ p ∣ u hu_pos : 0 < u ⊒ p < PrimeRange.prod (Nat.succ (Nat.succ k)) + u ∧ 2 ≀ p ∧ p ∣ PrimeRange.prod (Nat.succ (Nat.succ k)) + u TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/UnboundedGaps.lean
gapAfterProdPrimeRange
[27, 1]
[49, 17]
apply And.intro
case intro k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 p : β„• hp : Nat.Prime p ∧ p ∣ u hu_pos : 0 < u hpu : p ≀ u ⊒ p < PrimeRange.prod (Nat.succ (Nat.succ k)) + u ∧ 2 ≀ p ∧ p ∣ PrimeRange.prod (Nat.succ (Nat.succ k)) + u
case intro.left k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 p : β„• hp : Nat.Prime p ∧ p ∣ u hu_pos : 0 < u hpu : p ≀ u ⊒ p < PrimeRange.prod (Nat.succ (Nat.succ k)) + u case intro.right k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 p : β„• hp : Nat.Prime p ∧ p ∣ u hu_pos : 0 < u hpu : p ≀ u ⊒ 2 ≀ p ∧ p ∣ PrimeRange.prod (Nat.succ (Nat.succ k)) + u
Please generate a tactic in lean4 to solve the state. STATE: case intro k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 p : β„• hp : Nat.Prime p ∧ p ∣ u hu_pos : 0 < u hpu : p ≀ u ⊒ p < PrimeRange.prod (Nat.succ (Nat.succ k)) + u ∧ 2 ≀ p ∧ p ∣ PrimeRange.prod (Nat.succ (Nat.succ k)) + u TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/UnboundedGaps.lean
gapAfterProdPrimeRange
[27, 1]
[49, 17]
. apply lt_of_le_of_lt hpu apply Nat.lt_add_of_pos_left apply PrimeRange.prodPos
case intro.left k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 p : β„• hp : Nat.Prime p ∧ p ∣ u hu_pos : 0 < u hpu : p ≀ u ⊒ p < PrimeRange.prod (Nat.succ (Nat.succ k)) + u case intro.right k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 p : β„• hp : Nat.Prime p ∧ p ∣ u hu_pos : 0 < u hpu : p ≀ u ⊒ 2 ≀ p ∧ p ∣ PrimeRange.prod (Nat.succ (Nat.succ k)) + u
case intro.right k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 p : β„• hp : Nat.Prime p ∧ p ∣ u hu_pos : 0 < u hpu : p ≀ u ⊒ 2 ≀ p ∧ p ∣ PrimeRange.prod (Nat.succ (Nat.succ k)) + u
Please generate a tactic in lean4 to solve the state. STATE: case intro.left k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 p : β„• hp : Nat.Prime p ∧ p ∣ u hu_pos : 0 < u hpu : p ≀ u ⊒ p < PrimeRange.prod (Nat.succ (Nat.succ k)) + u case intro.right k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 p : β„• hp : Nat.Prime p ∧ p ∣ u hu_pos : 0 < u hpu : p ≀ u ⊒ 2 ≀ p ∧ p ∣ PrimeRange.prod (Nat.succ (Nat.succ k)) + u TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/UnboundedGaps.lean
gapAfterProdPrimeRange
[27, 1]
[49, 17]
. apply And.intro . exact Nat.Prime.two_le hp.left . apply Nat.dvd_add _ hp.right apply PrimeRange.prodDvdOfLt hp.left linarith
case intro.right k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 p : β„• hp : Nat.Prime p ∧ p ∣ u hu_pos : 0 < u hpu : p ≀ u ⊒ 2 ≀ p ∧ p ∣ PrimeRange.prod (Nat.succ (Nat.succ k)) + u
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro.right k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 p : β„• hp : Nat.Prime p ∧ p ∣ u hu_pos : 0 < u hpu : p ≀ u ⊒ 2 ≀ p ∧ p ∣ PrimeRange.prod (Nat.succ (Nat.succ k)) + u TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/UnboundedGaps.lean
gapAfterProdPrimeRange
[27, 1]
[49, 17]
linarith
case hu_pos k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 p : β„• hp : Nat.Prime p ∧ p ∣ u ⊒ 0 < u
no goals
Please generate a tactic in lean4 to solve the state. STATE: case hu_pos k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 p : β„• hp : Nat.Prime p ∧ p ∣ u ⊒ 0 < u TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/UnboundedGaps.lean
gapAfterProdPrimeRange
[27, 1]
[49, 17]
apply lt_of_le_of_lt hpu
case intro.left k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 p : β„• hp : Nat.Prime p ∧ p ∣ u hu_pos : 0 < u hpu : p ≀ u ⊒ p < PrimeRange.prod (Nat.succ (Nat.succ k)) + u
case intro.left k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 p : β„• hp : Nat.Prime p ∧ p ∣ u hu_pos : 0 < u hpu : p ≀ u ⊒ u < PrimeRange.prod (Nat.succ (Nat.succ k)) + u
Please generate a tactic in lean4 to solve the state. STATE: case intro.left k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 p : β„• hp : Nat.Prime p ∧ p ∣ u hu_pos : 0 < u hpu : p ≀ u ⊒ p < PrimeRange.prod (Nat.succ (Nat.succ k)) + u TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/UnboundedGaps.lean
gapAfterProdPrimeRange
[27, 1]
[49, 17]
apply Nat.lt_add_of_pos_left
case intro.left k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 p : β„• hp : Nat.Prime p ∧ p ∣ u hu_pos : 0 < u hpu : p ≀ u ⊒ u < PrimeRange.prod (Nat.succ (Nat.succ k)) + u
case intro.left.h k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 p : β„• hp : Nat.Prime p ∧ p ∣ u hu_pos : 0 < u hpu : p ≀ u ⊒ 0 < PrimeRange.prod (Nat.succ (Nat.succ k))
Please generate a tactic in lean4 to solve the state. STATE: case intro.left k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 p : β„• hp : Nat.Prime p ∧ p ∣ u hu_pos : 0 < u hpu : p ≀ u ⊒ u < PrimeRange.prod (Nat.succ (Nat.succ k)) + u TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/UnboundedGaps.lean
gapAfterProdPrimeRange
[27, 1]
[49, 17]
apply PrimeRange.prodPos
case intro.left.h k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 p : β„• hp : Nat.Prime p ∧ p ∣ u hu_pos : 0 < u hpu : p ≀ u ⊒ 0 < PrimeRange.prod (Nat.succ (Nat.succ k))
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro.left.h k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 p : β„• hp : Nat.Prime p ∧ p ∣ u hu_pos : 0 < u hpu : p ≀ u ⊒ 0 < PrimeRange.prod (Nat.succ (Nat.succ k)) TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/UnboundedGaps.lean
gapAfterProdPrimeRange
[27, 1]
[49, 17]
apply And.intro
case intro.right k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 p : β„• hp : Nat.Prime p ∧ p ∣ u hu_pos : 0 < u hpu : p ≀ u ⊒ 2 ≀ p ∧ p ∣ PrimeRange.prod (Nat.succ (Nat.succ k)) + u
case intro.right.left k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 p : β„• hp : Nat.Prime p ∧ p ∣ u hu_pos : 0 < u hpu : p ≀ u ⊒ 2 ≀ p case intro.right.right k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 p : β„• hp : Nat.Prime p ∧ p ∣ u hu_pos : 0 < u hpu : p ≀ u ⊒ p ∣ PrimeRange.prod (Nat.succ (Nat.succ k)) + u
Please generate a tactic in lean4 to solve the state. STATE: case intro.right k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 p : β„• hp : Nat.Prime p ∧ p ∣ u hu_pos : 0 < u hpu : p ≀ u ⊒ 2 ≀ p ∧ p ∣ PrimeRange.prod (Nat.succ (Nat.succ k)) + u TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/UnboundedGaps.lean
gapAfterProdPrimeRange
[27, 1]
[49, 17]
. exact Nat.Prime.two_le hp.left
case intro.right.left k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 p : β„• hp : Nat.Prime p ∧ p ∣ u hu_pos : 0 < u hpu : p ≀ u ⊒ 2 ≀ p case intro.right.right k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 p : β„• hp : Nat.Prime p ∧ p ∣ u hu_pos : 0 < u hpu : p ≀ u ⊒ p ∣ PrimeRange.prod (Nat.succ (Nat.succ k)) + u
case intro.right.right k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 p : β„• hp : Nat.Prime p ∧ p ∣ u hu_pos : 0 < u hpu : p ≀ u ⊒ p ∣ PrimeRange.prod (Nat.succ (Nat.succ k)) + u
Please generate a tactic in lean4 to solve the state. STATE: case intro.right.left k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 p : β„• hp : Nat.Prime p ∧ p ∣ u hu_pos : 0 < u hpu : p ≀ u ⊒ 2 ≀ p case intro.right.right k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 p : β„• hp : Nat.Prime p ∧ p ∣ u hu_pos : 0 < u hpu : p ≀ u ⊒ p ∣ PrimeRange.prod (Nat.succ (Nat.succ k)) + u TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/UnboundedGaps.lean
gapAfterProdPrimeRange
[27, 1]
[49, 17]
. apply Nat.dvd_add _ hp.right apply PrimeRange.prodDvdOfLt hp.left linarith
case intro.right.right k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 p : β„• hp : Nat.Prime p ∧ p ∣ u hu_pos : 0 < u hpu : p ≀ u ⊒ p ∣ PrimeRange.prod (Nat.succ (Nat.succ k)) + u
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro.right.right k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 p : β„• hp : Nat.Prime p ∧ p ∣ u hu_pos : 0 < u hpu : p ≀ u ⊒ p ∣ PrimeRange.prod (Nat.succ (Nat.succ k)) + u TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/UnboundedGaps.lean
gapAfterProdPrimeRange
[27, 1]
[49, 17]
exact Nat.Prime.two_le hp.left
case intro.right.left k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 p : β„• hp : Nat.Prime p ∧ p ∣ u hu_pos : 0 < u hpu : p ≀ u ⊒ 2 ≀ p
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro.right.left k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 p : β„• hp : Nat.Prime p ∧ p ∣ u hu_pos : 0 < u hpu : p ≀ u ⊒ 2 ≀ p TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/UnboundedGaps.lean
gapAfterProdPrimeRange
[27, 1]
[49, 17]
apply Nat.dvd_add _ hp.right
case intro.right.right k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 p : β„• hp : Nat.Prime p ∧ p ∣ u hu_pos : 0 < u hpu : p ≀ u ⊒ p ∣ PrimeRange.prod (Nat.succ (Nat.succ k)) + u
k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 p : β„• hp : Nat.Prime p ∧ p ∣ u hu_pos : 0 < u hpu : p ≀ u ⊒ p ∣ PrimeRange.prod (Nat.succ (Nat.succ k))
Please generate a tactic in lean4 to solve the state. STATE: case intro.right.right k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 p : β„• hp : Nat.Prime p ∧ p ∣ u hu_pos : 0 < u hpu : p ≀ u ⊒ p ∣ PrimeRange.prod (Nat.succ (Nat.succ k)) + u TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/UnboundedGaps.lean
gapAfterProdPrimeRange
[27, 1]
[49, 17]
apply PrimeRange.prodDvdOfLt hp.left
k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 p : β„• hp : Nat.Prime p ∧ p ∣ u hu_pos : 0 < u hpu : p ≀ u ⊒ p ∣ PrimeRange.prod (Nat.succ (Nat.succ k))
k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 p : β„• hp : Nat.Prime p ∧ p ∣ u hu_pos : 0 < u hpu : p ≀ u ⊒ p < Nat.succ (Nat.succ k)
Please generate a tactic in lean4 to solve the state. STATE: k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 p : β„• hp : Nat.Prime p ∧ p ∣ u hu_pos : 0 < u hpu : p ≀ u ⊒ p ∣ PrimeRange.prod (Nat.succ (Nat.succ k)) TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/UnboundedGaps.lean
gapAfterProdPrimeRange
[27, 1]
[49, 17]
linarith
k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 p : β„• hp : Nat.Prime p ∧ p ∣ u hu_pos : 0 < u hpu : p ≀ u ⊒ p < Nat.succ (Nat.succ k)
no goals
Please generate a tactic in lean4 to solve the state. STATE: k u : β„• a✝¹ : 2 ≀ u ∧ u ≀ Nat.succ k a✝ : 2 ≀ PrimeRange.prod (Nat.succ (Nat.succ k)) + u this : u β‰  1 p : β„• hp : Nat.Prime p ∧ p ∣ u hu_pos : 0 < u hpu : p ≀ u ⊒ p < Nat.succ (Nat.succ k) TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/UnboundedGaps.lean
existsGap
[51, 1]
[57, 11]
exists PrimeRange.prod k.succ.succ + 2
k : β„• ⊒ βˆƒ m, βˆ€ (x : β„•), x < k β†’ Β¬Nat.Prime (m + x)
k : β„• ⊒ βˆ€ (x : β„•), x < k β†’ Β¬Nat.Prime (PrimeRange.prod (Nat.succ (Nat.succ k)) + 2 + x)
Please generate a tactic in lean4 to solve the state. STATE: k : β„• ⊒ βˆƒ m, βˆ€ (x : β„•), x < k β†’ Β¬Nat.Prime (m + x) TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/UnboundedGaps.lean
existsGap
[51, 1]
[57, 11]
intros x hx
k : β„• ⊒ βˆ€ (x : β„•), x < k β†’ Β¬Nat.Prime (PrimeRange.prod (Nat.succ (Nat.succ k)) + 2 + x)
k x : β„• hx : x < k ⊒ Β¬Nat.Prime (PrimeRange.prod (Nat.succ (Nat.succ k)) + 2 + x)
Please generate a tactic in lean4 to solve the state. STATE: k : β„• ⊒ βˆ€ (x : β„•), x < k β†’ Β¬Nat.Prime (PrimeRange.prod (Nat.succ (Nat.succ k)) + 2 + x) TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/UnboundedGaps.lean
existsGap
[51, 1]
[57, 11]
rw [add_assoc]
k x : β„• hx : x < k ⊒ Β¬Nat.Prime (PrimeRange.prod (Nat.succ (Nat.succ k)) + 2 + x)
k x : β„• hx : x < k ⊒ Β¬Nat.Prime (PrimeRange.prod (Nat.succ (Nat.succ k)) + (2 + x))
Please generate a tactic in lean4 to solve the state. STATE: k x : β„• hx : x < k ⊒ Β¬Nat.Prime (PrimeRange.prod (Nat.succ (Nat.succ k)) + 2 + x) TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/UnboundedGaps.lean
existsGap
[51, 1]
[57, 11]
apply gapAfterProdPrimeRange
k x : β„• hx : x < k ⊒ Β¬Nat.Prime (PrimeRange.prod (Nat.succ (Nat.succ k)) + (2 + x))
case a k x : β„• hx : x < k ⊒ 2 ≀ 2 + x ∧ 2 + x ≀ Nat.succ k
Please generate a tactic in lean4 to solve the state. STATE: k x : β„• hx : x < k ⊒ Β¬Nat.Prime (PrimeRange.prod (Nat.succ (Nat.succ k)) + (2 + x)) TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/UnboundedGaps.lean
existsGap
[51, 1]
[57, 11]
simp
case a k x : β„• hx : x < k ⊒ 2 ≀ 2 + x ∧ 2 + x ≀ Nat.succ k
case a k x : β„• hx : x < k ⊒ 2 + x ≀ Nat.succ k
Please generate a tactic in lean4 to solve the state. STATE: case a k x : β„• hx : x < k ⊒ 2 ≀ 2 + x ∧ 2 + x ≀ Nat.succ k TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/UnboundedGaps.lean
existsGap
[51, 1]
[57, 11]
linarith
case a k x : β„• hx : x < k ⊒ 2 + x ≀ Nat.succ k
no goals
Please generate a tactic in lean4 to solve the state. STATE: case a k x : β„• hx : x < k ⊒ 2 + x ≀ Nat.succ k TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
powNeOneIff'
[23, 1]
[30, 14]
cases i with | zero => simp | succ i => simp [not_iff_not] simp [pow_succ] intro hx simp [hx]
x i : β„• ⊒ x ^ i β‰  1 ↔ i β‰  0 ∧ x β‰  1
no goals
Please generate a tactic in lean4 to solve the state. STATE: x i : β„• ⊒ x ^ i β‰  1 ↔ i β‰  0 ∧ x β‰  1 TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
powNeOneIff'
[23, 1]
[30, 14]
simp
case zero x : β„• ⊒ x ^ Nat.zero β‰  1 ↔ Nat.zero β‰  0 ∧ x β‰  1
no goals
Please generate a tactic in lean4 to solve the state. STATE: case zero x : β„• ⊒ x ^ Nat.zero β‰  1 ↔ Nat.zero β‰  0 ∧ x β‰  1 TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
powNeOneIff'
[23, 1]
[30, 14]
simp [not_iff_not]
case succ x i : β„• ⊒ x ^ Nat.succ i β‰  1 ↔ Nat.succ i β‰  0 ∧ x β‰  1
case succ x i : β„• ⊒ x ^ Nat.succ i = 1 ↔ x = 1
Please generate a tactic in lean4 to solve the state. STATE: case succ x i : β„• ⊒ x ^ Nat.succ i β‰  1 ↔ Nat.succ i β‰  0 ∧ x β‰  1 TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
powNeOneIff'
[23, 1]
[30, 14]
simp [pow_succ]
case succ x i : β„• ⊒ x ^ Nat.succ i = 1 ↔ x = 1
case succ x i : β„• ⊒ x = 1 β†’ x ^ i = 1
Please generate a tactic in lean4 to solve the state. STATE: case succ x i : β„• ⊒ x ^ Nat.succ i = 1 ↔ x = 1 TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
powNeOneIff'
[23, 1]
[30, 14]
intro hx
case succ x i : β„• ⊒ x = 1 β†’ x ^ i = 1
case succ x i : β„• hx : x = 1 ⊒ x ^ i = 1
Please generate a tactic in lean4 to solve the state. STATE: case succ x i : β„• ⊒ x = 1 β†’ x ^ i = 1 TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
powNeOneIff'
[23, 1]
[30, 14]
simp [hx]
case succ x i : β„• hx : x = 1 ⊒ x ^ i = 1
no goals
Please generate a tactic in lean4 to solve the state. STATE: case succ x i : β„• hx : x = 1 ⊒ x ^ i = 1 TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
primeOfPowFactorizationNeOne
[34, 1]
[41, 52]
intro hx
x n p : β„• ⊒ p ^ ↑(Nat.factorization n) x β‰  1 β†’ Nat.Prime x
x n p : β„• hx : p ^ ↑(Nat.factorization n) x β‰  1 ⊒ Nat.Prime x
Please generate a tactic in lean4 to solve the state. STATE: x n p : β„• ⊒ p ^ ↑(Nat.factorization n) x β‰  1 β†’ Nat.Prime x TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
primeOfPowFactorizationNeOne
[34, 1]
[41, 52]
rw [powNeOneIff'] at hx
x n p : β„• hx : p ^ ↑(Nat.factorization n) x β‰  1 ⊒ Nat.Prime x
x n p : β„• hx : ↑(Nat.factorization n) x β‰  0 ∧ p β‰  1 ⊒ Nat.Prime x
Please generate a tactic in lean4 to solve the state. STATE: x n p : β„• hx : p ^ ↑(Nat.factorization n) x β‰  1 ⊒ Nat.Prime x TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
primeOfPowFactorizationNeOne
[34, 1]
[41, 52]
by_contra hp
x n p : β„• hx : ↑(Nat.factorization n) x β‰  0 ∧ p β‰  1 ⊒ Nat.Prime x
x n p : β„• hx : ↑(Nat.factorization n) x β‰  0 ∧ p β‰  1 hp : Β¬Nat.Prime x ⊒ False
Please generate a tactic in lean4 to solve the state. STATE: x n p : β„• hx : ↑(Nat.factorization n) x β‰  0 ∧ p β‰  1 ⊒ Nat.Prime x TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
primeOfPowFactorizationNeOne
[34, 1]
[41, 52]
cases hx with | intro h hx => apply h simp exact Nat.factorization_eq_zero_of_non_prime _ hp
x n p : β„• hx : ↑(Nat.factorization n) x β‰  0 ∧ p β‰  1 hp : Β¬Nat.Prime x ⊒ False
no goals
Please generate a tactic in lean4 to solve the state. STATE: x n p : β„• hx : ↑(Nat.factorization n) x β‰  0 ∧ p β‰  1 hp : Β¬Nat.Prime x ⊒ False TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
primeOfPowFactorizationNeOne
[34, 1]
[41, 52]
apply h
case intro x n p : β„• hp : Β¬Nat.Prime x h : ↑(Nat.factorization n) x β‰  0 hx : p β‰  1 ⊒ False
case intro x n p : β„• hp : Β¬Nat.Prime x h : ↑(Nat.factorization n) x β‰  0 hx : p β‰  1 ⊒ ↑(Nat.factorization n) x = 0
Please generate a tactic in lean4 to solve the state. STATE: case intro x n p : β„• hp : Β¬Nat.Prime x h : ↑(Nat.factorization n) x β‰  0 hx : p β‰  1 ⊒ False TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
primeOfPowFactorizationNeOne
[34, 1]
[41, 52]
exact Nat.factorization_eq_zero_of_non_prime _ hp
case intro x n p : β„• hp : Β¬Nat.Prime x h : ↑(Nat.factorization n) x β‰  0 hx : p β‰  1 ⊒ ↑(Nat.factorization n) x = 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro x n p : β„• hp : Β¬Nat.Prime x h : ↑(Nat.factorization n) x β‰  0 hx : p β‰  1 ⊒ ↑(Nat.factorization n) x = 0 TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
FactorizationCentralBinom.leOne
[47, 1]
[59, 13]
intro hnp
n p : β„• hp : Nat.Prime p ⊒ 2 * n < p ^ 2 β†’ ↑(Nat.factorization (Nat.centralBinom n)) p ≀ 1
n p : β„• hp : Nat.Prime p hnp : 2 * n < p ^ 2 ⊒ ↑(Nat.factorization (Nat.centralBinom n)) p ≀ 1
Please generate a tactic in lean4 to solve the state. STATE: n p : β„• hp : Nat.Prime p ⊒ 2 * n < p ^ 2 β†’ ↑(Nat.factorization (Nat.centralBinom n)) p ≀ 1 TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
FactorizationCentralBinom.leOne
[47, 1]
[59, 13]
apply le_trans (Nat.factorization_choose_le_log)
n p : β„• hp : Nat.Prime p hnp : 2 * n < p ^ 2 ⊒ ↑(Nat.factorization (Nat.centralBinom n)) p ≀ 1
n p : β„• hp : Nat.Prime p hnp : 2 * n < p ^ 2 ⊒ Nat.log p (2 * n) ≀ 1
Please generate a tactic in lean4 to solve the state. STATE: n p : β„• hp : Nat.Prime p hnp : 2 * n < p ^ 2 ⊒ ↑(Nat.factorization (Nat.centralBinom n)) p ≀ 1 TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
FactorizationCentralBinom.leOne
[47, 1]
[59, 13]
have hnp := Nat.le_pred_of_lt hnp
n p : β„• hp : Nat.Prime p hnp : 2 * n < p ^ 2 ⊒ Nat.log p (2 * n) ≀ 1
n p : β„• hp : Nat.Prime p hnp✝ : 2 * n < p ^ 2 hnp : 2 * n ≀ p ^ 2 - 1 ⊒ Nat.log p (2 * n) ≀ 1
Please generate a tactic in lean4 to solve the state. STATE: n p : β„• hp : Nat.Prime p hnp : 2 * n < p ^ 2 ⊒ Nat.log p (2 * n) ≀ 1 TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
FactorizationCentralBinom.leOne
[47, 1]
[59, 13]
apply le_trans (Nat.log_mono_right hnp)
n p : β„• hp : Nat.Prime p hnp✝ : 2 * n < p ^ 2 hnp : 2 * n ≀ p ^ 2 - 1 ⊒ Nat.log p (2 * n) ≀ 1
n p : β„• hp : Nat.Prime p hnp✝ : 2 * n < p ^ 2 hnp : 2 * n ≀ p ^ 2 - 1 ⊒ Nat.log p (p ^ 2 - 1) ≀ 1
Please generate a tactic in lean4 to solve the state. STATE: n p : β„• hp : Nat.Prime p hnp✝ : 2 * n < p ^ 2 hnp : 2 * n ≀ p ^ 2 - 1 ⊒ Nat.log p (2 * n) ≀ 1 TACTIC:
https://github.com/jvlmdr/from_the_book.git
9fb6080539a2f32bb24719600a9e7531abf2328d
FromTheBook/Ch02/Bertrand/CentralBinom.lean
FactorizationCentralBinom.leOne
[47, 1]
[59, 13]
rw [← Nat.lt_succ_iff]
n p : β„• hp : Nat.Prime p hnp✝ : 2 * n < p ^ 2 hnp : 2 * n ≀ p ^ 2 - 1 ⊒ Nat.log p (p ^ 2 - 1) ≀ 1
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
Please generate a tactic in lean4 to solve the state. STATE: n p : β„• hp : Nat.Prime p hnp✝ : 2 * n < p ^ 2 hnp : 2 * n ≀ p ^ 2 - 1 ⊒ Nat.log p (p ^ 2 - 1) ≀ 1 TACTIC: