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/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/Assignments/Assignment4.lean
exercise4_5
[66, 1]
[89, 8]
sorry
a b : ℕ ha : 2 ≤ a hb : 2 ≤ b hn : Nat.Prime (2 ^ (a * b) - 1) h : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1 h2 : 2 ^ 2 ≤ 2 ^ a h3 : 1 ≤ 2 ^ a h4 : 2 ^ a - 1 ≠ 1 h5 : 2 ^ a - 1 < 2 ^ (a * b) - 1 ⊢ 2 ^ 0 ≤ 2 ^ (a * b)
no goals
Please generate a tactic in lean4 to solve the state. STATE: a b : ℕ ha : 2 ≤ a hb : 2 ≤ b hn : Nat.Prime (2 ^ (a * b) - 1) h : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1 h2 : 2 ^ 2 ≤ 2 ^ a h3 : 1 ≤ 2 ^ a h4 : 2 ^ a - 1 ≠ 1 h5 : 2 ^ a - 1 < 2 ^ (a * b) - 1 ⊢ 2 ^ 0 ≤ 2 ^ (a * b) TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/Assignments/Assignment4.lean
exercise4_5
[66, 1]
[89, 8]
norm_cast at h
case h' a b : ℕ ha : 2 ≤ a hb : 2 ≤ b hn : Nat.Prime (2 ^ (a * b) - 1) h : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1 h2 : 2 ^ 2 ≤ 2 ^ a h3 : 1 ≤ 2 ^ a h4 : 2 ^ a - 1 ≠ 1 h5 : 2 ^ a - 1 < 2 ^ (a * b) - 1 h6' : 2 ^ 0 ≤ 2 ^ (a * b) h6 : 1 ≤ 2 ^ (a * b) ⊢ 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
no goals
Please generate a tactic in lean4 to solve the state. STATE: case h' a b : ℕ ha : 2 ≤ a hb : 2 ≤ b hn : Nat.Prime (2 ^ (a * b) - 1) h : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1 h2 : 2 ^ 2 ≤ 2 ^ a h3 : 1 ≤ 2 ^ a h4 : 2 ^ a - 1 ≠ 1 h5 : 2 ^ a - 1 < 2 ^ (a * b) - 1 h6' : 2 ^ 0 ≤ 2 ^ (a * b) h6 : 1 ≤ 2 ^ (a * b) ⊢ 2 ^ a - 1 ∣ 2 ^ (a * b) - 1 TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/Assignments/Assignment4.lean
exercise4_6
[94, 1]
[95, 64]
sorry
a b : ℕ ha : 0 < a hb : 0 < b ⊢ ¬IsSquare (a ^ 2 + b) ∨ ¬IsSquare (b ^ 2 + a)
no goals
Please generate a tactic in lean4 to solve the state. STATE: a b : ℕ ha : 0 < a hb : 0 < b ⊢ ¬IsSquare (a ^ 2 + b) ∨ ¬IsSquare (b ^ 2 + a) TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/S01_Irrational_Roots.lean
even_of_even_sqr
[42, 1]
[44, 25]
rw [pow_two, Nat.prime_two.dvd_mul] at h
m : ℕ h : 2 ∣ m ^ 2 ⊢ 2 ∣ m
m : ℕ h : 2 ∣ m ∨ 2 ∣ m ⊢ 2 ∣ m
Please generate a tactic in lean4 to solve the state. STATE: m : ℕ h : 2 ∣ m ^ 2 ⊢ 2 ∣ m TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/S01_Irrational_Roots.lean
even_of_even_sqr
[42, 1]
[44, 25]
cases h <;> assumption
m : ℕ h : 2 ∣ m ∨ 2 ∣ m ⊢ 2 ∣ m
no goals
Please generate a tactic in lean4 to solve the state. STATE: m : ℕ h : 2 ∣ m ∨ 2 ∣ m ⊢ 2 ∣ m TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/S01_Irrational_Roots.lean
factorization_mul'
[78, 1]
[81, 6]
rw [Nat.factorization_mul mnez nnez]
m n : ℕ mnez : m ≠ 0 nnez : n ≠ 0 p : ℕ ⊢ ↑(Nat.factorization (m * n)) p = ↑(Nat.factorization m) p + ↑(Nat.factorization n) p
m n : ℕ mnez : m ≠ 0 nnez : n ≠ 0 p : ℕ ⊢ ↑(Nat.factorization m + Nat.factorization n) p = ↑(Nat.factorization m) p + ↑(Nat.factorization n) p
Please generate a tactic in lean4 to solve the state. STATE: m n : ℕ mnez : m ≠ 0 nnez : n ≠ 0 p : ℕ ⊢ ↑(Nat.factorization (m * n)) p = ↑(Nat.factorization m) p + ↑(Nat.factorization n) p TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/S01_Irrational_Roots.lean
factorization_mul'
[78, 1]
[81, 6]
rfl
m n : ℕ mnez : m ≠ 0 nnez : n ≠ 0 p : ℕ ⊢ ↑(Nat.factorization m + Nat.factorization n) p = ↑(Nat.factorization m) p + ↑(Nat.factorization n) p
no goals
Please generate a tactic in lean4 to solve the state. STATE: m n : ℕ mnez : m ≠ 0 nnez : n ≠ 0 p : ℕ ⊢ ↑(Nat.factorization m + Nat.factorization n) p = ↑(Nat.factorization m) p + ↑(Nat.factorization n) p TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/S01_Irrational_Roots.lean
factorization_pow'
[83, 1]
[86, 6]
rw [Nat.factorization_pow]
n k p : ℕ ⊢ ↑(Nat.factorization (n ^ k)) p = k * ↑(Nat.factorization n) p
n k p : ℕ ⊢ ↑(k • Nat.factorization n) p = k * ↑(Nat.factorization n) p
Please generate a tactic in lean4 to solve the state. STATE: n k p : ℕ ⊢ ↑(Nat.factorization (n ^ k)) p = k * ↑(Nat.factorization n) p TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/S01_Irrational_Roots.lean
factorization_pow'
[83, 1]
[86, 6]
rfl
n k p : ℕ ⊢ ↑(k • Nat.factorization n) p = k * ↑(Nat.factorization n) p
no goals
Please generate a tactic in lean4 to solve the state. STATE: n k p : ℕ ⊢ ↑(k • Nat.factorization n) p = k * ↑(Nat.factorization n) p TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/S01_Irrational_Roots.lean
Nat.Prime.factorization'
[88, 1]
[91, 7]
rw [prime_p.factorization]
p : ℕ prime_p : Prime p ⊢ ↑(Nat.factorization p) p = 1
p : ℕ prime_p : Prime p ⊢ (↑fun₀ | p => 1) p = 1
Please generate a tactic in lean4 to solve the state. STATE: p : ℕ prime_p : Prime p ⊢ ↑(Nat.factorization p) p = 1 TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/S01_Irrational_Roots.lean
Nat.Prime.factorization'
[88, 1]
[91, 7]
simp
p : ℕ prime_p : Prime p ⊢ (↑fun₀ | p => 1) p = 1
no goals
Please generate a tactic in lean4 to solve the state. STATE: p : ℕ prime_p : Prime p ⊢ (↑fun₀ | p => 1) p = 1 TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/Assignments/Assignment1.lean
exercise1_1
[22, 1]
[22, 78]
sorry
a b c d : ℝ ⊢ a + b + c + d = d + (b + a) + c
no goals
Please generate a tactic in lean4 to solve the state. STATE: a b c d : ℝ ⊢ a + b + c + d = d + (b + a) + c TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/Assignments/Assignment1.lean
exercise1_2
[27, 1]
[27, 78]
sorry
a b c d : ℝ ⊢ a + b + c + d = d + (b + a) + c
no goals
Please generate a tactic in lean4 to solve the state. STATE: a b c d : ℝ ⊢ a + b + c + d = d + (b + a) + c TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/Assignments/Assignment1.lean
exercise1_3
[48, 1]
[48, 72]
sorry
a b : ℝ ⊢ (a + b) * (a - b) = a ^ 2 - b ^ 2
no goals
Please generate a tactic in lean4 to solve the state. STATE: a b : ℝ ⊢ (a + b) * (a - b) = a ^ 2 - b ^ 2 TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/Assignments/Assignment1.lean
exercise1_4
[52, 1]
[52, 72]
sorry
a b : ℝ ⊢ (a + b) * (a - b) = a ^ 2 - b ^ 2
no goals
Please generate a tactic in lean4 to solve the state. STATE: a b : ℝ ⊢ (a + b) * (a - b) = a ^ 2 - b ^ 2 TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C09_Topology/S02_Metric_Spaces.lean
cauchySeq_of_le_geometric_two'
[146, 1]
[160, 19]
rw [Metric.cauchySeq_iff']
X : Type u_1 inst✝ : MetricSpace X a b c : X r : ℝ u : ℕ → X hu : ∀ (n : ℕ), dist (u n) (u (n + 1)) ≤ (1 / 2) ^ n ⊢ CauchySeq u
X : Type u_1 inst✝ : MetricSpace X a b c : X r : ℝ u : ℕ → X hu : ∀ (n : ℕ), dist (u n) (u (n + 1)) ≤ (1 / 2) ^ n ⊢ ∀ ε > 0, ∃ N, ∀ n ≥ N, dist (u n) (u N) < ε
Please generate a tactic in lean4 to solve the state. STATE: X : Type u_1 inst✝ : MetricSpace X a b c : X r : ℝ u : ℕ → X hu : ∀ (n : ℕ), dist (u n) (u (n + 1)) ≤ (1 / 2) ^ n ⊢ CauchySeq u TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C09_Topology/S02_Metric_Spaces.lean
cauchySeq_of_le_geometric_two'
[146, 1]
[160, 19]
intro ε ε_pos
X : Type u_1 inst✝ : MetricSpace X a b c : X r : ℝ u : ℕ → X hu : ∀ (n : ℕ), dist (u n) (u (n + 1)) ≤ (1 / 2) ^ n ⊢ ∀ ε > 0, ∃ N, ∀ n ≥ N, dist (u n) (u N) < ε
X : Type u_1 inst✝ : MetricSpace X a b c : X r : ℝ u : ℕ → X hu : ∀ (n : ℕ), dist (u n) (u (n + 1)) ≤ (1 / 2) ^ n ε : ℝ ε_pos : ε > 0 ⊢ ∃ N, ∀ n ≥ N, dist (u n) (u N) < ε
Please generate a tactic in lean4 to solve the state. STATE: X : Type u_1 inst✝ : MetricSpace X a b c : X r : ℝ u : ℕ → X hu : ∀ (n : ℕ), dist (u n) (u (n + 1)) ≤ (1 / 2) ^ n ⊢ ∀ ε > 0, ∃ N, ∀ n ≥ N, dist (u n) (u N) < ε TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C09_Topology/S02_Metric_Spaces.lean
cauchySeq_of_le_geometric_two'
[146, 1]
[160, 19]
obtain ⟨N, hN⟩ : ∃ N : ℕ, 1 / 2 ^ N * 2 < ε := by sorry
X : Type u_1 inst✝ : MetricSpace X a b c : X r : ℝ u : ℕ → X hu : ∀ (n : ℕ), dist (u n) (u (n + 1)) ≤ (1 / 2) ^ n ε : ℝ ε_pos : ε > 0 ⊢ ∃ N, ∀ n ≥ N, dist (u n) (u N) < ε
case intro X : Type u_1 inst✝ : MetricSpace X a b c : X r : ℝ u : ℕ → X hu : ∀ (n : ℕ), dist (u n) (u (n + 1)) ≤ (1 / 2) ^ n ε : ℝ ε_pos : ε > 0 N : ℕ hN : 1 / 2 ^ N * 2 < ε ⊢ ∃ N, ∀ n ≥ N, dist (u n) (u N) < ε
Please generate a tactic in lean4 to solve the state. STATE: X : Type u_1 inst✝ : MetricSpace X a b c : X r : ℝ u : ℕ → X hu : ∀ (n : ℕ), dist (u n) (u (n + 1)) ≤ (1 / 2) ^ n ε : ℝ ε_pos : ε > 0 ⊢ ∃ N, ∀ n ≥ N, dist (u n) (u N) < ε TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C09_Topology/S02_Metric_Spaces.lean
cauchySeq_of_le_geometric_two'
[146, 1]
[160, 19]
use N
case intro X : Type u_1 inst✝ : MetricSpace X a b c : X r : ℝ u : ℕ → X hu : ∀ (n : ℕ), dist (u n) (u (n + 1)) ≤ (1 / 2) ^ n ε : ℝ ε_pos : ε > 0 N : ℕ hN : 1 / 2 ^ N * 2 < ε ⊢ ∃ N, ∀ n ≥ N, dist (u n) (u N) < ε
case h X : Type u_1 inst✝ : MetricSpace X a b c : X r : ℝ u : ℕ → X hu : ∀ (n : ℕ), dist (u n) (u (n + 1)) ≤ (1 / 2) ^ n ε : ℝ ε_pos : ε > 0 N : ℕ hN : 1 / 2 ^ N * 2 < ε ⊢ ∀ n ≥ N, dist (u n) (u N) < ε
Please generate a tactic in lean4 to solve the state. STATE: case intro X : Type u_1 inst✝ : MetricSpace X a b c : X r : ℝ u : ℕ → X hu : ∀ (n : ℕ), dist (u n) (u (n + 1)) ≤ (1 / 2) ^ n ε : ℝ ε_pos : ε > 0 N : ℕ hN : 1 / 2 ^ N * 2 < ε ⊢ ∃ N, ∀ n ≥ N, dist (u n) (u N) < ε TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C09_Topology/S02_Metric_Spaces.lean
cauchySeq_of_le_geometric_two'
[146, 1]
[160, 19]
intro n hn
case h X : Type u_1 inst✝ : MetricSpace X a b c : X r : ℝ u : ℕ → X hu : ∀ (n : ℕ), dist (u n) (u (n + 1)) ≤ (1 / 2) ^ n ε : ℝ ε_pos : ε > 0 N : ℕ hN : 1 / 2 ^ N * 2 < ε ⊢ ∀ n ≥ N, dist (u n) (u N) < ε
case h X : Type u_1 inst✝ : MetricSpace X a b c : X r : ℝ u : ℕ → X hu : ∀ (n : ℕ), dist (u n) (u (n + 1)) ≤ (1 / 2) ^ n ε : ℝ ε_pos : ε > 0 N : ℕ hN : 1 / 2 ^ N * 2 < ε n : ℕ hn : n ≥ N ⊢ dist (u n) (u N) < ε
Please generate a tactic in lean4 to solve the state. STATE: case h X : Type u_1 inst✝ : MetricSpace X a b c : X r : ℝ u : ℕ → X hu : ∀ (n : ℕ), dist (u n) (u (n + 1)) ≤ (1 / 2) ^ n ε : ℝ ε_pos : ε > 0 N : ℕ hN : 1 / 2 ^ N * 2 < ε ⊢ ∀ n ≥ N, dist (u n) (u N) < ε TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C09_Topology/S02_Metric_Spaces.lean
cauchySeq_of_le_geometric_two'
[146, 1]
[160, 19]
obtain ⟨k, rfl : n = N + k⟩ := le_iff_exists_add.mp hn
case h X : Type u_1 inst✝ : MetricSpace X a b c : X r : ℝ u : ℕ → X hu : ∀ (n : ℕ), dist (u n) (u (n + 1)) ≤ (1 / 2) ^ n ε : ℝ ε_pos : ε > 0 N : ℕ hN : 1 / 2 ^ N * 2 < ε n : ℕ hn : n ≥ N ⊢ dist (u n) (u N) < ε
case h.intro X : Type u_1 inst✝ : MetricSpace X a b c : X r : ℝ u : ℕ → X hu : ∀ (n : ℕ), dist (u n) (u (n + 1)) ≤ (1 / 2) ^ n ε : ℝ ε_pos : ε > 0 N : ℕ hN : 1 / 2 ^ N * 2 < ε k : ℕ hn : N + k ≥ N ⊢ dist (u (N + k)) (u N) < ε
Please generate a tactic in lean4 to solve the state. STATE: case h X : Type u_1 inst✝ : MetricSpace X a b c : X r : ℝ u : ℕ → X hu : ∀ (n : ℕ), dist (u n) (u (n + 1)) ≤ (1 / 2) ^ n ε : ℝ ε_pos : ε > 0 N : ℕ hN : 1 / 2 ^ N * 2 < ε n : ℕ hn : n ≥ N ⊢ dist (u n) (u N) < ε TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C09_Topology/S02_Metric_Spaces.lean
cauchySeq_of_le_geometric_two'
[146, 1]
[160, 19]
calc dist (u (N + k)) (u N) = dist (u (N + 0)) (u (N + k)) := sorry _ ≤ ∑ i in range k, dist (u (N + i)) (u (N + (i + 1))) := sorry _ ≤ ∑ i in range k, (1 / 2 : ℝ) ^ (N + i) := sorry _ = 1 / 2 ^ N * ∑ i in range k, (1 / 2 : ℝ) ^ i := sorry _ ≤ 1 / 2 ^ N * 2 := sorry _ < ε := sorry
case h.intro X : Type u_1 inst✝ : MetricSpace X a b c : X r : ℝ u : ℕ → X hu : ∀ (n : ℕ), dist (u n) (u (n + 1)) ≤ (1 / 2) ^ n ε : ℝ ε_pos : ε > 0 N : ℕ hN : 1 / 2 ^ N * 2 < ε k : ℕ hn : N + k ≥ N ⊢ dist (u (N + k)) (u N) < ε
no goals
Please generate a tactic in lean4 to solve the state. STATE: case h.intro X : Type u_1 inst✝ : MetricSpace X a b c : X r : ℝ u : ℕ → X hu : ∀ (n : ℕ), dist (u n) (u (n + 1)) ≤ (1 / 2) ^ n ε : ℝ ε_pos : ε > 0 N : ℕ hN : 1 / 2 ^ N * 2 < ε k : ℕ hn : N + k ≥ N ⊢ dist (u (N + k)) (u N) < ε TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C09_Topology/S02_Metric_Spaces.lean
cauchySeq_of_le_geometric_two'
[146, 1]
[160, 19]
sorry
X : Type u_1 inst✝ : MetricSpace X a b c : X r : ℝ u : ℕ → X hu : ∀ (n : ℕ), dist (u n) (u (n + 1)) ≤ (1 / 2) ^ n ε : ℝ ε_pos : ε > 0 ⊢ ∃ N, 1 / 2 ^ N * 2 < ε
no goals
Please generate a tactic in lean4 to solve the state. STATE: X : Type u_1 inst✝ : MetricSpace X a b c : X r : ℝ u : ℕ → X hu : ∀ (n : ℕ), dist (u n) (u (n + 1)) ≤ (1 / 2) ^ n ε : ℝ ε_pos : ε > 0 ⊢ ∃ N, 1 / 2 ^ N * 2 < ε TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/Extra.lean
odd_succ_even
[12, 1]
[14, 11]
refine Even.add_odd h ?_
n : ℕ h : EvenNat n ⊢ OddNat (n + 1)
n : ℕ h : EvenNat n ⊢ Odd 1
Please generate a tactic in lean4 to solve the state. STATE: n : ℕ h : EvenNat n ⊢ OddNat (n + 1) TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/Extra.lean
odd_succ_even
[12, 1]
[14, 11]
norm_num
n : ℕ h : EvenNat n ⊢ Odd 1
no goals
Please generate a tactic in lean4 to solve the state. STATE: n : ℕ h : EvenNat n ⊢ Odd 1 TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/Extra.lean
even_succ_odd
[16, 1]
[18, 11]
refine Odd.add_odd h ?_
n : ℕ h : OddNat n ⊢ EvenNat (n + 1)
n : ℕ h : OddNat n ⊢ Odd 1
Please generate a tactic in lean4 to solve the state. STATE: n : ℕ h : OddNat n ⊢ EvenNat (n + 1) TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/Extra.lean
even_succ_odd
[16, 1]
[18, 11]
norm_num
n : ℕ h : OddNat n ⊢ Odd 1
no goals
Please generate a tactic in lean4 to solve the state. STATE: n : ℕ h : OddNat n ⊢ Odd 1 TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C02_Basics/S02_Proving_Identities_in_Algebraic_Structures.lean
MyRing.add_zero
[39, 1]
[39, 67]
rw [add_comm, zero_add]
R : Type u_1 inst✝ : Ring R a : R ⊢ a + 0 = a
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝ : Ring R a : R ⊢ a + 0 = a TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C02_Basics/S02_Proving_Identities_in_Algebraic_Structures.lean
MyRing.add_right_neg
[41, 1]
[41, 77]
rw [add_comm, add_left_neg]
R : Type u_1 inst✝ : Ring R a : R ⊢ a + -a = 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝ : Ring R a : R ⊢ a + -a = 0 TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C02_Basics/S02_Proving_Identities_in_Algebraic_Structures.lean
MyRing.neg_add_cancel_left
[51, 1]
[52, 43]
rw [← add_assoc, add_left_neg, zero_add]
R : Type u_1 inst✝ : Ring R a b : R ⊢ -a + (a + b) = b
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝ : Ring R a b : R ⊢ -a + (a + b) = b TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C02_Basics/S02_Proving_Identities_in_Algebraic_Structures.lean
MyRing.add_neg_cancel_right
[55, 1]
[56, 8]
sorry
R : Type u_1 inst✝ : Ring R a b : R ⊢ a + b + -b = a
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝ : Ring R a b : R ⊢ a + b + -b = a TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C02_Basics/S02_Proving_Identities_in_Algebraic_Structures.lean
MyRing.add_left_cancel
[58, 1]
[59, 8]
sorry
R : Type u_1 inst✝ : Ring R a b c : R h : a + b = a + c ⊢ b = c
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝ : Ring R a b c : R h : a + b = a + c ⊢ b = c TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C02_Basics/S02_Proving_Identities_in_Algebraic_Structures.lean
MyRing.add_right_cancel
[61, 1]
[62, 8]
sorry
R : Type u_1 inst✝ : Ring R a b c : R h : a + b = c + b ⊢ a = c
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝ : Ring R a b c : R h : a + b = c + b ⊢ a = c TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C02_Basics/S02_Proving_Identities_in_Algebraic_Structures.lean
MyRing.mul_zero
[64, 1]
[67, 25]
have h : a * 0 + a * 0 = a * 0 + 0 := by rw [← mul_add, add_zero, add_zero]
R : Type u_1 inst✝ : Ring R a : R ⊢ a * 0 = 0
R : Type u_1 inst✝ : Ring R a : R h : a * 0 + a * 0 = a * 0 + 0 ⊢ a * 0 = 0
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝ : Ring R a : R ⊢ a * 0 = 0 TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C02_Basics/S02_Proving_Identities_in_Algebraic_Structures.lean
MyRing.mul_zero
[64, 1]
[67, 25]
rw [add_left_cancel h]
R : Type u_1 inst✝ : Ring R a : R h : a * 0 + a * 0 = a * 0 + 0 ⊢ a * 0 = 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝ : Ring R a : R h : a * 0 + a * 0 = a * 0 + 0 ⊢ a * 0 = 0 TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C02_Basics/S02_Proving_Identities_in_Algebraic_Structures.lean
MyRing.mul_zero
[64, 1]
[67, 25]
rw [← mul_add, add_zero, add_zero]
R : Type u_1 inst✝ : Ring R a : R ⊢ a * 0 + a * 0 = a * 0 + 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝ : Ring R a : R ⊢ a * 0 + a * 0 = a * 0 + 0 TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C02_Basics/S02_Proving_Identities_in_Algebraic_Structures.lean
MyRing.zero_mul
[69, 1]
[70, 8]
sorry
R : Type u_1 inst✝ : Ring R a : R ⊢ 0 * a = 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝ : Ring R a : R ⊢ 0 * a = 0 TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C02_Basics/S02_Proving_Identities_in_Algebraic_Structures.lean
MyRing.neg_eq_of_add_eq_zero
[72, 1]
[73, 8]
sorry
R : Type u_1 inst✝ : Ring R a b : R h : a + b = 0 ⊢ -a = b
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝ : Ring R a b : R h : a + b = 0 ⊢ -a = b TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C02_Basics/S02_Proving_Identities_in_Algebraic_Structures.lean
MyRing.eq_neg_of_add_eq_zero
[75, 1]
[76, 8]
sorry
R : Type u_1 inst✝ : Ring R a b : R h : a + b = 0 ⊢ a = -b
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝ : Ring R a b : R h : a + b = 0 ⊢ a = -b TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C02_Basics/S02_Proving_Identities_in_Algebraic_Structures.lean
MyRing.neg_zero
[78, 1]
[80, 16]
apply neg_eq_of_add_eq_zero
R : Type u_1 inst✝ : Ring R ⊢ -0 = 0
case h R : Type u_1 inst✝ : Ring R ⊢ 0 + 0 = 0
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝ : Ring R ⊢ -0 = 0 TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C02_Basics/S02_Proving_Identities_in_Algebraic_Structures.lean
MyRing.neg_zero
[78, 1]
[80, 16]
rw [add_zero]
case h R : Type u_1 inst✝ : Ring R ⊢ 0 + 0 = 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: case h R : Type u_1 inst✝ : Ring R ⊢ 0 + 0 = 0 TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C02_Basics/S02_Proving_Identities_in_Algebraic_Structures.lean
MyRing.neg_neg
[82, 1]
[83, 8]
sorry
R : Type u_1 inst✝ : Ring R a : R ⊢ - -a = a
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝ : Ring R a : R ⊢ - -a = a TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C02_Basics/S02_Proving_Identities_in_Algebraic_Structures.lean
MyRing.self_sub
[105, 1]
[106, 8]
sorry
R : Type u_1 inst✝ : Ring R a : R ⊢ a - a = 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝ : Ring R a : R ⊢ a - a = 0 TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C02_Basics/S02_Proving_Identities_in_Algebraic_Structures.lean
MyRing.one_add_one_eq_two
[108, 1]
[109, 11]
norm_num
R : Type u_1 inst✝ : Ring R ⊢ 1 + 1 = 2
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝ : Ring R ⊢ 1 + 1 = 2 TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C02_Basics/S02_Proving_Identities_in_Algebraic_Structures.lean
MyRing.two_mul
[111, 1]
[112, 8]
sorry
R : Type u_1 inst✝ : Ring R a : R ⊢ 2 * a = a + a
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝ : Ring R a : R ⊢ 2 * a = a + a TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C02_Basics/S02_Proving_Identities_in_Algebraic_Structures.lean
MyGroup.mul_right_inv
[134, 1]
[135, 8]
sorry
G : Type u_1 inst✝ : Group G a : G ⊢ a * a⁻¹ = 1
no goals
Please generate a tactic in lean4 to solve the state. STATE: G : Type u_1 inst✝ : Group G a : G ⊢ a * a⁻¹ = 1 TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C02_Basics/S02_Proving_Identities_in_Algebraic_Structures.lean
MyGroup.mul_one
[137, 1]
[138, 8]
sorry
G : Type u_1 inst✝ : Group G a : G ⊢ a * 1 = a
no goals
Please generate a tactic in lean4 to solve the state. STATE: G : Type u_1 inst✝ : Group G a : G ⊢ a * 1 = a TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C02_Basics/S02_Proving_Identities_in_Algebraic_Structures.lean
MyGroup.mul_inv_rev
[140, 1]
[141, 8]
sorry
G : Type u_1 inst✝ : Group G a b : G ⊢ (a * b)⁻¹ = b⁻¹ * a⁻¹
no goals
Please generate a tactic in lean4 to solve the state. STATE: G : Type u_1 inst✝ : Group G a b : G ⊢ (a * b)⁻¹ = b⁻¹ * a⁻¹ TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/S02_Induction_and_Recursion.lean
fac_pos
[33, 1]
[38, 30]
induction' n with n ih
n : ℕ ⊢ 0 < fac n
case zero ⊢ 0 < fac 0 case succ n : ℕ ih : 0 < fac n ⊢ 0 < fac (n + 1)
Please generate a tactic in lean4 to solve the state. STATE: n : ℕ ⊢ 0 < fac n TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/S02_Induction_and_Recursion.lean
fac_pos
[33, 1]
[38, 30]
rw [fac]
case succ n : ℕ ih : 0 < fac n ⊢ 0 < fac (n + 1)
case succ n : ℕ ih : 0 < fac n ⊢ 0 < (n + 1) * fac n
Please generate a tactic in lean4 to solve the state. STATE: case succ n : ℕ ih : 0 < fac n ⊢ 0 < fac (n + 1) TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/S02_Induction_and_Recursion.lean
fac_pos
[33, 1]
[38, 30]
exact mul_pos n.succ_pos ih
case succ n : ℕ ih : 0 < fac n ⊢ 0 < (n + 1) * fac n
no goals
Please generate a tactic in lean4 to solve the state. STATE: case succ n : ℕ ih : 0 < fac n ⊢ 0 < (n + 1) * fac n TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/S02_Induction_and_Recursion.lean
fac_pos
[33, 1]
[38, 30]
rw [fac]
case zero ⊢ 0 < fac 0
case zero ⊢ 0 < 1
Please generate a tactic in lean4 to solve the state. STATE: case zero ⊢ 0 < fac 0 TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/S02_Induction_and_Recursion.lean
fac_pos
[33, 1]
[38, 30]
exact zero_lt_one
case zero ⊢ 0 < 1
no goals
Please generate a tactic in lean4 to solve the state. STATE: case zero ⊢ 0 < 1 TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/S02_Induction_and_Recursion.lean
dvd_fac
[40, 1]
[47, 22]
induction' n with n ih
i n : ℕ ipos : 0 < i ile : i ≤ n ⊢ i ∣ fac n
case zero i : ℕ ipos : 0 < i ile : i ≤ 0 ⊢ i ∣ fac 0 case succ i : ℕ ipos : 0 < i n : ℕ ih : i ≤ n → i ∣ fac n ile : i ≤ n + 1 ⊢ i ∣ fac (n + 1)
Please generate a tactic in lean4 to solve the state. STATE: i n : ℕ ipos : 0 < i ile : i ≤ n ⊢ i ∣ fac n TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/S02_Induction_and_Recursion.lean
dvd_fac
[40, 1]
[47, 22]
rw [fac]
case succ i : ℕ ipos : 0 < i n : ℕ ih : i ≤ n → i ∣ fac n ile : i ≤ n + 1 ⊢ i ∣ fac (n + 1)
case succ i : ℕ ipos : 0 < i n : ℕ ih : i ≤ n → i ∣ fac n ile : i ≤ n + 1 ⊢ i ∣ (n + 1) * fac n
Please generate a tactic in lean4 to solve the state. STATE: case succ i : ℕ ipos : 0 < i n : ℕ ih : i ≤ n → i ∣ fac n ile : i ≤ n + 1 ⊢ i ∣ fac (n + 1) TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/S02_Induction_and_Recursion.lean
dvd_fac
[40, 1]
[47, 22]
rcases Nat.of_le_succ ile with h | h
case succ i : ℕ ipos : 0 < i n : ℕ ih : i ≤ n → i ∣ fac n ile : i ≤ n + 1 ⊢ i ∣ (n + 1) * fac n
case succ.inl i : ℕ ipos : 0 < i n : ℕ ih : i ≤ n → i ∣ fac n ile : i ≤ n + 1 h : i ≤ n ⊢ i ∣ (n + 1) * fac n case succ.inr i : ℕ ipos : 0 < i n : ℕ ih : i ≤ n → i ∣ fac n ile : i ≤ n + 1 h : i = Nat.succ n ⊢ i ∣ (n + 1) * fac n
Please generate a tactic in lean4 to solve the state. STATE: case succ i : ℕ ipos : 0 < i n : ℕ ih : i ≤ n → i ∣ fac n ile : i ≤ n + 1 ⊢ i ∣ (n + 1) * fac n TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/S02_Induction_and_Recursion.lean
dvd_fac
[40, 1]
[47, 22]
rw [h]
case succ.inr i : ℕ ipos : 0 < i n : ℕ ih : i ≤ n → i ∣ fac n ile : i ≤ n + 1 h : i = Nat.succ n ⊢ i ∣ (n + 1) * fac n
case succ.inr i : ℕ ipos : 0 < i n : ℕ ih : i ≤ n → i ∣ fac n ile : i ≤ n + 1 h : i = Nat.succ n ⊢ Nat.succ n ∣ (n + 1) * fac n
Please generate a tactic in lean4 to solve the state. STATE: case succ.inr i : ℕ ipos : 0 < i n : ℕ ih : i ≤ n → i ∣ fac n ile : i ≤ n + 1 h : i = Nat.succ n ⊢ i ∣ (n + 1) * fac n TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/S02_Induction_and_Recursion.lean
dvd_fac
[40, 1]
[47, 22]
apply dvd_mul_right
case succ.inr i : ℕ ipos : 0 < i n : ℕ ih : i ≤ n → i ∣ fac n ile : i ≤ n + 1 h : i = Nat.succ n ⊢ Nat.succ n ∣ (n + 1) * fac n
no goals
Please generate a tactic in lean4 to solve the state. STATE: case succ.inr i : ℕ ipos : 0 < i n : ℕ ih : i ≤ n → i ∣ fac n ile : i ≤ n + 1 h : i = Nat.succ n ⊢ Nat.succ n ∣ (n + 1) * fac n TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/S02_Induction_and_Recursion.lean
dvd_fac
[40, 1]
[47, 22]
exact absurd ipos (not_lt_of_ge ile)
case zero i : ℕ ipos : 0 < i ile : i ≤ 0 ⊢ i ∣ fac 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: case zero i : ℕ ipos : 0 < i ile : i ≤ 0 ⊢ i ∣ fac 0 TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/S02_Induction_and_Recursion.lean
dvd_fac
[40, 1]
[47, 22]
apply dvd_mul_of_dvd_right (ih h)
case succ.inl i : ℕ ipos : 0 < i n : ℕ ih : i ≤ n → i ∣ fac n ile : i ≤ n + 1 h : i ≤ n ⊢ i ∣ (n + 1) * fac n
no goals
Please generate a tactic in lean4 to solve the state. STATE: case succ.inl i : ℕ ipos : 0 < i n : ℕ ih : i ≤ n → i ∣ fac n ile : i ≤ n + 1 h : i ≤ n ⊢ i ∣ (n + 1) * fac n TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/S02_Induction_and_Recursion.lean
pow_two_le_fac
[49, 1]
[52, 8]
rcases n with _ | n
n : ℕ ⊢ 2 ^ (n - 1) ≤ fac n
case zero ⊢ 2 ^ (Nat.zero - 1) ≤ fac Nat.zero case succ n : ℕ ⊢ 2 ^ (Nat.succ n - 1) ≤ fac (Nat.succ n)
Please generate a tactic in lean4 to solve the state. STATE: n : ℕ ⊢ 2 ^ (n - 1) ≤ fac n TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/S02_Induction_and_Recursion.lean
pow_two_le_fac
[49, 1]
[52, 8]
sorry
case succ n : ℕ ⊢ 2 ^ (Nat.succ n - 1) ≤ fac (Nat.succ n)
no goals
Please generate a tactic in lean4 to solve the state. STATE: case succ n : ℕ ⊢ 2 ^ (Nat.succ n - 1) ≤ fac (Nat.succ n) TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/S02_Induction_and_Recursion.lean
pow_two_le_fac
[49, 1]
[52, 8]
simp [fac]
case zero ⊢ 2 ^ (Nat.zero - 1) ≤ fac Nat.zero
no goals
Please generate a tactic in lean4 to solve the state. STATE: case zero ⊢ 2 ^ (Nat.zero - 1) ≤ fac Nat.zero TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/S02_Induction_and_Recursion.lean
sum_id
[95, 1]
[100, 7]
symm
α : Type u_1 s : Finset ℕ f : ℕ → ℕ n✝ n : ℕ ⊢ ∑ i in range (n + 1), i = n * (n + 1) / 2
α : Type u_1 s : Finset ℕ f : ℕ → ℕ n✝ n : ℕ ⊢ n * (n + 1) / 2 = ∑ i in range (n + 1), i
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 s : Finset ℕ f : ℕ → ℕ n✝ n : ℕ ⊢ ∑ i in range (n + 1), i = n * (n + 1) / 2 TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/S02_Induction_and_Recursion.lean
sum_id
[95, 1]
[100, 7]
apply Nat.div_eq_of_eq_mul_right (by norm_num : 0 < 2)
α : Type u_1 s : Finset ℕ f : ℕ → ℕ n✝ n : ℕ ⊢ n * (n + 1) / 2 = ∑ i in range (n + 1), i
α : Type u_1 s : Finset ℕ f : ℕ → ℕ n✝ n : ℕ ⊢ n * (n + 1) = 2 * ∑ i in range (n + 1), i
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 s : Finset ℕ f : ℕ → ℕ n✝ n : ℕ ⊢ n * (n + 1) / 2 = ∑ i in range (n + 1), i TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/S02_Induction_and_Recursion.lean
sum_id
[95, 1]
[100, 7]
induction' n with n ih
α : Type u_1 s : Finset ℕ f : ℕ → ℕ n✝ n : ℕ ⊢ n * (n + 1) = 2 * ∑ i in range (n + 1), i
case zero α : Type u_1 s : Finset ℕ f : ℕ → ℕ n : ℕ ⊢ 0 * (0 + 1) = 2 * ∑ i in range (0 + 1), i case succ α : Type u_1 s : Finset ℕ f : ℕ → ℕ n✝ n : ℕ ih : n * (n + 1) = 2 * ∑ i in range (n + 1), i ⊢ (n + 1) * (n + 1 + 1) = 2 * ∑ i in range (n + 1 + 1), i
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 s : Finset ℕ f : ℕ → ℕ n✝ n : ℕ ⊢ n * (n + 1) = 2 * ∑ i in range (n + 1), i TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/S02_Induction_and_Recursion.lean
sum_id
[95, 1]
[100, 7]
rw [Finset.sum_range_succ, mul_add 2, ← ih]
case succ α : Type u_1 s : Finset ℕ f : ℕ → ℕ n✝ n : ℕ ih : n * (n + 1) = 2 * ∑ i in range (n + 1), i ⊢ (n + 1) * (n + 1 + 1) = 2 * ∑ i in range (n + 1 + 1), i
case succ α : Type u_1 s : Finset ℕ f : ℕ → ℕ n✝ n : ℕ ih : n * (n + 1) = 2 * ∑ i in range (n + 1), i ⊢ (n + 1) * (n + 1 + 1) = n * (n + 1) + 2 * (n + 1)
Please generate a tactic in lean4 to solve the state. STATE: case succ α : Type u_1 s : Finset ℕ f : ℕ → ℕ n✝ n : ℕ ih : n * (n + 1) = 2 * ∑ i in range (n + 1), i ⊢ (n + 1) * (n + 1 + 1) = 2 * ∑ i in range (n + 1 + 1), i TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/S02_Induction_and_Recursion.lean
sum_id
[95, 1]
[100, 7]
ring
case succ α : Type u_1 s : Finset ℕ f : ℕ → ℕ n✝ n : ℕ ih : n * (n + 1) = 2 * ∑ i in range (n + 1), i ⊢ (n + 1) * (n + 1 + 1) = n * (n + 1) + 2 * (n + 1)
no goals
Please generate a tactic in lean4 to solve the state. STATE: case succ α : Type u_1 s : Finset ℕ f : ℕ → ℕ n✝ n : ℕ ih : n * (n + 1) = 2 * ∑ i in range (n + 1), i ⊢ (n + 1) * (n + 1 + 1) = n * (n + 1) + 2 * (n + 1) TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/S02_Induction_and_Recursion.lean
sum_id
[95, 1]
[100, 7]
norm_num
α : Type u_1 s : Finset ℕ f : ℕ → ℕ n✝ n : ℕ ⊢ 0 < 2
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 s : Finset ℕ f : ℕ → ℕ n✝ n : ℕ ⊢ 0 < 2 TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/S02_Induction_and_Recursion.lean
sum_id
[95, 1]
[100, 7]
simp
case zero α : Type u_1 s : Finset ℕ f : ℕ → ℕ n : ℕ ⊢ 0 * (0 + 1) = 2 * ∑ i in range (0 + 1), i
no goals
Please generate a tactic in lean4 to solve the state. STATE: case zero α : Type u_1 s : Finset ℕ f : ℕ → ℕ n : ℕ ⊢ 0 * (0 + 1) = 2 * ∑ i in range (0 + 1), i TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/S02_Induction_and_Recursion.lean
sum_sqr
[102, 1]
[103, 8]
sorry
α : Type u_1 s : Finset ℕ f : ℕ → ℕ n✝ n : ℕ ⊢ ∑ i in range (n + 1), i ^ 2 = n * (n + 1) * (2 * n + 1) / 6
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 s : Finset ℕ f : ℕ → ℕ n✝ n : ℕ ⊢ ∑ i in range (n + 1), i ^ 2 = n * (n + 1) * (2 * n + 1) / 6 TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/S02_Induction_and_Recursion.lean
MyNat.zero_add
[120, 1]
[123, 15]
induction' n with n ih
n : MyNat ⊢ add zero n = n
case zero ⊢ add zero zero = zero case succ n : MyNat ih : add zero n = n ⊢ add zero (succ n) = succ n
Please generate a tactic in lean4 to solve the state. STATE: n : MyNat ⊢ add zero n = n TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/S02_Induction_and_Recursion.lean
MyNat.zero_add
[120, 1]
[123, 15]
rw [add, ih]
case succ n : MyNat ih : add zero n = n ⊢ add zero (succ n) = succ n
no goals
Please generate a tactic in lean4 to solve the state. STATE: case succ n : MyNat ih : add zero n = n ⊢ add zero (succ n) = succ n TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/S02_Induction_and_Recursion.lean
MyNat.zero_add
[120, 1]
[123, 15]
rfl
case zero ⊢ add zero zero = zero
no goals
Please generate a tactic in lean4 to solve the state. STATE: case zero ⊢ add zero zero = zero TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/S02_Induction_and_Recursion.lean
MyNat.succ_add
[125, 1]
[129, 6]
induction' n with n ih
m n : MyNat ⊢ add (succ m) n = succ (add m n)
case zero m : MyNat ⊢ add (succ m) zero = succ (add m zero) case succ m n : MyNat ih : add (succ m) n = succ (add m n) ⊢ add (succ m) (succ n) = succ (add m (succ n))
Please generate a tactic in lean4 to solve the state. STATE: m n : MyNat ⊢ add (succ m) n = succ (add m n) TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/S02_Induction_and_Recursion.lean
MyNat.succ_add
[125, 1]
[129, 6]
rw [add, ih]
case succ m n : MyNat ih : add (succ m) n = succ (add m n) ⊢ add (succ m) (succ n) = succ (add m (succ n))
case succ m n : MyNat ih : add (succ m) n = succ (add m n) ⊢ succ (succ (add m n)) = succ (add m (succ n))
Please generate a tactic in lean4 to solve the state. STATE: case succ m n : MyNat ih : add (succ m) n = succ (add m n) ⊢ add (succ m) (succ n) = succ (add m (succ n)) TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/S02_Induction_and_Recursion.lean
MyNat.succ_add
[125, 1]
[129, 6]
rfl
case succ m n : MyNat ih : add (succ m) n = succ (add m n) ⊢ succ (succ (add m n)) = succ (add m (succ n))
no goals
Please generate a tactic in lean4 to solve the state. STATE: case succ m n : MyNat ih : add (succ m) n = succ (add m n) ⊢ succ (succ (add m n)) = succ (add m (succ n)) TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/S02_Induction_and_Recursion.lean
MyNat.succ_add
[125, 1]
[129, 6]
rfl
case zero m : MyNat ⊢ add (succ m) zero = succ (add m zero)
no goals
Please generate a tactic in lean4 to solve the state. STATE: case zero m : MyNat ⊢ add (succ m) zero = succ (add m zero) TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/S02_Induction_and_Recursion.lean
MyNat.add_comm
[131, 1]
[135, 25]
induction' n with n ih
m n : MyNat ⊢ add m n = add n m
case zero m : MyNat ⊢ add m zero = add zero m case succ m n : MyNat ih : add m n = add n m ⊢ add m (succ n) = add (succ n) m
Please generate a tactic in lean4 to solve the state. STATE: m n : MyNat ⊢ add m n = add n m TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/S02_Induction_and_Recursion.lean
MyNat.add_comm
[131, 1]
[135, 25]
rw [add, succ_add, ih]
case succ m n : MyNat ih : add m n = add n m ⊢ add m (succ n) = add (succ n) m
no goals
Please generate a tactic in lean4 to solve the state. STATE: case succ m n : MyNat ih : add m n = add n m ⊢ add m (succ n) = add (succ n) m TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/S02_Induction_and_Recursion.lean
MyNat.add_comm
[131, 1]
[135, 25]
rw [zero_add]
case zero m : MyNat ⊢ add m zero = add zero m
case zero m : MyNat ⊢ add m zero = m
Please generate a tactic in lean4 to solve the state. STATE: case zero m : MyNat ⊢ add m zero = add zero m TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/S02_Induction_and_Recursion.lean
MyNat.add_comm
[131, 1]
[135, 25]
rfl
case zero m : MyNat ⊢ add m zero = m
no goals
Please generate a tactic in lean4 to solve the state. STATE: case zero m : MyNat ⊢ add m zero = m TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/S02_Induction_and_Recursion.lean
MyNat.add_assoc
[137, 1]
[138, 8]
sorry
m n k : MyNat ⊢ add (add m n) k = add m (add n k)
no goals
Please generate a tactic in lean4 to solve the state. STATE: m n k : MyNat ⊢ add (add m n) k = add m (add n k) TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/S02_Induction_and_Recursion.lean
MyNat.mul_add
[139, 1]
[140, 8]
sorry
m n k : MyNat ⊢ mul m (add n k) = add (mul m n) (mul m k)
no goals
Please generate a tactic in lean4 to solve the state. STATE: m n k : MyNat ⊢ mul m (add n k) = add (mul m n) (mul m k) TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/S02_Induction_and_Recursion.lean
MyNat.zero_mul
[141, 1]
[142, 8]
sorry
n : MyNat ⊢ mul zero n = zero
no goals
Please generate a tactic in lean4 to solve the state. STATE: n : MyNat ⊢ mul zero n = zero TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/S02_Induction_and_Recursion.lean
MyNat.succ_mul
[143, 1]
[144, 8]
sorry
m n : MyNat ⊢ mul (succ m) n = add (mul m n) n
no goals
Please generate a tactic in lean4 to solve the state. STATE: m n : MyNat ⊢ mul (succ m) n = add (mul m n) n TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/S02_Induction_and_Recursion.lean
MyNat.mul_comm
[145, 1]
[146, 8]
sorry
m n : MyNat ⊢ mul m n = mul n m
no goals
Please generate a tactic in lean4 to solve the state. STATE: m n : MyNat ⊢ mul m n = mul n m TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C09_Topology/solutions/Solutions_S02_Metric_Spaces.lean
cauchySeq_of_le_geometric_two'
[185, 1]
[199, 19]
rw [Metric.cauchySeq_iff']
X : Type u_1 inst✝ : MetricSpace X a b c : X r : ℝ u : ℕ → X hu : ∀ (n : ℕ), dist (u n) (u (n + 1)) ≤ (1 / 2) ^ n ⊢ CauchySeq u
X : Type u_1 inst✝ : MetricSpace X a b c : X r : ℝ u : ℕ → X hu : ∀ (n : ℕ), dist (u n) (u (n + 1)) ≤ (1 / 2) ^ n ⊢ ∀ ε > 0, ∃ N, ∀ n ≥ N, dist (u n) (u N) < ε
Please generate a tactic in lean4 to solve the state. STATE: X : Type u_1 inst✝ : MetricSpace X a b c : X r : ℝ u : ℕ → X hu : ∀ (n : ℕ), dist (u n) (u (n + 1)) ≤ (1 / 2) ^ n ⊢ CauchySeq u TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C09_Topology/solutions/Solutions_S02_Metric_Spaces.lean
cauchySeq_of_le_geometric_two'
[185, 1]
[199, 19]
intro ε ε_pos
X : Type u_1 inst✝ : MetricSpace X a b c : X r : ℝ u : ℕ → X hu : ∀ (n : ℕ), dist (u n) (u (n + 1)) ≤ (1 / 2) ^ n ⊢ ∀ ε > 0, ∃ N, ∀ n ≥ N, dist (u n) (u N) < ε
X : Type u_1 inst✝ : MetricSpace X a b c : X r : ℝ u : ℕ → X hu : ∀ (n : ℕ), dist (u n) (u (n + 1)) ≤ (1 / 2) ^ n ε : ℝ ε_pos : ε > 0 ⊢ ∃ N, ∀ n ≥ N, dist (u n) (u N) < ε
Please generate a tactic in lean4 to solve the state. STATE: X : Type u_1 inst✝ : MetricSpace X a b c : X r : ℝ u : ℕ → X hu : ∀ (n : ℕ), dist (u n) (u (n + 1)) ≤ (1 / 2) ^ n ⊢ ∀ ε > 0, ∃ N, ∀ n ≥ N, dist (u n) (u N) < ε TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C09_Topology/solutions/Solutions_S02_Metric_Spaces.lean
cauchySeq_of_le_geometric_two'
[185, 1]
[199, 19]
obtain ⟨N, hN⟩ : ∃ N : ℕ, 1 / 2 ^ N * 2 < ε := by sorry
X : Type u_1 inst✝ : MetricSpace X a b c : X r : ℝ u : ℕ → X hu : ∀ (n : ℕ), dist (u n) (u (n + 1)) ≤ (1 / 2) ^ n ε : ℝ ε_pos : ε > 0 ⊢ ∃ N, ∀ n ≥ N, dist (u n) (u N) < ε
case intro X : Type u_1 inst✝ : MetricSpace X a b c : X r : ℝ u : ℕ → X hu : ∀ (n : ℕ), dist (u n) (u (n + 1)) ≤ (1 / 2) ^ n ε : ℝ ε_pos : ε > 0 N : ℕ hN : 1 / 2 ^ N * 2 < ε ⊢ ∃ N, ∀ n ≥ N, dist (u n) (u N) < ε
Please generate a tactic in lean4 to solve the state. STATE: X : Type u_1 inst✝ : MetricSpace X a b c : X r : ℝ u : ℕ → X hu : ∀ (n : ℕ), dist (u n) (u (n + 1)) ≤ (1 / 2) ^ n ε : ℝ ε_pos : ε > 0 ⊢ ∃ N, ∀ n ≥ N, dist (u n) (u N) < ε TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C09_Topology/solutions/Solutions_S02_Metric_Spaces.lean
cauchySeq_of_le_geometric_two'
[185, 1]
[199, 19]
use N
case intro X : Type u_1 inst✝ : MetricSpace X a b c : X r : ℝ u : ℕ → X hu : ∀ (n : ℕ), dist (u n) (u (n + 1)) ≤ (1 / 2) ^ n ε : ℝ ε_pos : ε > 0 N : ℕ hN : 1 / 2 ^ N * 2 < ε ⊢ ∃ N, ∀ n ≥ N, dist (u n) (u N) < ε
case h X : Type u_1 inst✝ : MetricSpace X a b c : X r : ℝ u : ℕ → X hu : ∀ (n : ℕ), dist (u n) (u (n + 1)) ≤ (1 / 2) ^ n ε : ℝ ε_pos : ε > 0 N : ℕ hN : 1 / 2 ^ N * 2 < ε ⊢ ∀ n ≥ N, dist (u n) (u N) < ε
Please generate a tactic in lean4 to solve the state. STATE: case intro X : Type u_1 inst✝ : MetricSpace X a b c : X r : ℝ u : ℕ → X hu : ∀ (n : ℕ), dist (u n) (u (n + 1)) ≤ (1 / 2) ^ n ε : ℝ ε_pos : ε > 0 N : ℕ hN : 1 / 2 ^ N * 2 < ε ⊢ ∃ N, ∀ n ≥ N, dist (u n) (u N) < ε TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C09_Topology/solutions/Solutions_S02_Metric_Spaces.lean
cauchySeq_of_le_geometric_two'
[185, 1]
[199, 19]
intro n hn
case h X : Type u_1 inst✝ : MetricSpace X a b c : X r : ℝ u : ℕ → X hu : ∀ (n : ℕ), dist (u n) (u (n + 1)) ≤ (1 / 2) ^ n ε : ℝ ε_pos : ε > 0 N : ℕ hN : 1 / 2 ^ N * 2 < ε ⊢ ∀ n ≥ N, dist (u n) (u N) < ε
case h X : Type u_1 inst✝ : MetricSpace X a b c : X r : ℝ u : ℕ → X hu : ∀ (n : ℕ), dist (u n) (u (n + 1)) ≤ (1 / 2) ^ n ε : ℝ ε_pos : ε > 0 N : ℕ hN : 1 / 2 ^ N * 2 < ε n : ℕ hn : n ≥ N ⊢ dist (u n) (u N) < ε
Please generate a tactic in lean4 to solve the state. STATE: case h X : Type u_1 inst✝ : MetricSpace X a b c : X r : ℝ u : ℕ → X hu : ∀ (n : ℕ), dist (u n) (u (n + 1)) ≤ (1 / 2) ^ n ε : ℝ ε_pos : ε > 0 N : ℕ hN : 1 / 2 ^ N * 2 < ε ⊢ ∀ n ≥ N, dist (u n) (u N) < ε TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C09_Topology/solutions/Solutions_S02_Metric_Spaces.lean
cauchySeq_of_le_geometric_two'
[185, 1]
[199, 19]
obtain ⟨k, rfl : n = N + k⟩ := le_iff_exists_add.mp hn
case h X : Type u_1 inst✝ : MetricSpace X a b c : X r : ℝ u : ℕ → X hu : ∀ (n : ℕ), dist (u n) (u (n + 1)) ≤ (1 / 2) ^ n ε : ℝ ε_pos : ε > 0 N : ℕ hN : 1 / 2 ^ N * 2 < ε n : ℕ hn : n ≥ N ⊢ dist (u n) (u N) < ε
case h.intro X : Type u_1 inst✝ : MetricSpace X a b c : X r : ℝ u : ℕ → X hu : ∀ (n : ℕ), dist (u n) (u (n + 1)) ≤ (1 / 2) ^ n ε : ℝ ε_pos : ε > 0 N : ℕ hN : 1 / 2 ^ N * 2 < ε k : ℕ hn : N + k ≥ N ⊢ dist (u (N + k)) (u N) < ε
Please generate a tactic in lean4 to solve the state. STATE: case h X : Type u_1 inst✝ : MetricSpace X a b c : X r : ℝ u : ℕ → X hu : ∀ (n : ℕ), dist (u n) (u (n + 1)) ≤ (1 / 2) ^ n ε : ℝ ε_pos : ε > 0 N : ℕ hN : 1 / 2 ^ N * 2 < ε n : ℕ hn : n ≥ N ⊢ dist (u n) (u N) < ε TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C09_Topology/solutions/Solutions_S02_Metric_Spaces.lean
cauchySeq_of_le_geometric_two'
[185, 1]
[199, 19]
calc dist (u (N + k)) (u N) = dist (u (N + 0)) (u (N + k)) := sorry _ ≤ ∑ i in range k, dist (u (N + i)) (u (N + (i + 1))) := sorry _ ≤ ∑ i in range k, (1 / 2 : ℝ) ^ (N + i) := sorry _ = 1 / 2 ^ N * ∑ i in range k, (1 / 2 : ℝ) ^ i := sorry _ ≤ 1 / 2 ^ N * 2 := sorry _ < ε := sorry
case h.intro X : Type u_1 inst✝ : MetricSpace X a b c : X r : ℝ u : ℕ → X hu : ∀ (n : ℕ), dist (u n) (u (n + 1)) ≤ (1 / 2) ^ n ε : ℝ ε_pos : ε > 0 N : ℕ hN : 1 / 2 ^ N * 2 < ε k : ℕ hn : N + k ≥ N ⊢ dist (u (N + k)) (u N) < ε
no goals
Please generate a tactic in lean4 to solve the state. STATE: case h.intro X : Type u_1 inst✝ : MetricSpace X a b c : X r : ℝ u : ℕ → X hu : ∀ (n : ℕ), dist (u n) (u (n + 1)) ≤ (1 / 2) ^ n ε : ℝ ε_pos : ε > 0 N : ℕ hN : 1 / 2 ^ N * 2 < ε k : ℕ hn : N + k ≥ N ⊢ dist (u (N + k)) (u N) < ε TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C09_Topology/solutions/Solutions_S02_Metric_Spaces.lean
cauchySeq_of_le_geometric_two'
[185, 1]
[199, 19]
sorry
X : Type u_1 inst✝ : MetricSpace X a b c : X r : ℝ u : ℕ → X hu : ∀ (n : ℕ), dist (u n) (u (n + 1)) ≤ (1 / 2) ^ n ε : ℝ ε_pos : ε > 0 ⊢ ∃ N, 1 / 2 ^ N * 2 < ε
no goals
Please generate a tactic in lean4 to solve the state. STATE: X : Type u_1 inst✝ : MetricSpace X a b c : X r : ℝ u : ℕ → X hu : ∀ (n : ℕ), dist (u n) (u (n + 1)) ≤ (1 / 2) ^ n ε : ℝ ε_pos : ε > 0 ⊢ ∃ N, 1 / 2 ^ N * 2 < ε TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C02_Basics/S04_More_on_Order_and_Divisibility.lean
C02S04.aux
[45, 1]
[46, 8]
sorry
a b c d : ℝ ⊢ min a b + c ≤ min (a + c) (b + c)
no goals
Please generate a tactic in lean4 to solve the state. STATE: a b c d : ℝ ⊢ min a b + c ≤ min (a + c) (b + c) TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C08_Groups_and_Rings/solutions/Solutions_S01_Groups.lean
eq_bot_iff_card
[75, 1]
[84, 41]
suffices (∀ x ∈ H, x = 1) ↔ ∃ x ∈ H, ∀ a ∈ H, a = x by simpa [eq_bot_iff_forall, card_eq_one_iff]
G : Type u_1 inst✝¹ : Group G H : Subgroup G inst✝ : Fintype (↥H) ⊢ H = ⊥ ↔ card (↥H) = 1
G : Type u_1 inst✝¹ : Group G H : Subgroup G inst✝ : Fintype (↥H) ⊢ (∀ x ∈ H, x = 1) ↔ ∃ x ∈ H, ∀ a ∈ H, a = x
Please generate a tactic in lean4 to solve the state. STATE: G : Type u_1 inst✝¹ : Group G H : Subgroup G inst✝ : Fintype (↥H) ⊢ H = ⊥ ↔ card (↥H) = 1 TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C08_Groups_and_Rings/solutions/Solutions_S01_Groups.lean
eq_bot_iff_card
[75, 1]
[84, 41]
constructor
G : Type u_1 inst✝¹ : Group G H : Subgroup G inst✝ : Fintype (↥H) ⊢ (∀ x ∈ H, x = 1) ↔ ∃ x ∈ H, ∀ a ∈ H, a = x
case mp G : Type u_1 inst✝¹ : Group G H : Subgroup G inst✝ : Fintype (↥H) ⊢ (∀ x ∈ H, x = 1) → ∃ x ∈ H, ∀ a ∈ H, a = x case mpr G : Type u_1 inst✝¹ : Group G H : Subgroup G inst✝ : Fintype (↥H) ⊢ (∃ x ∈ H, ∀ a ∈ H, a = x) → ∀ x ∈ H, x = 1
Please generate a tactic in lean4 to solve the state. STATE: G : Type u_1 inst✝¹ : Group G H : Subgroup G inst✝ : Fintype (↥H) ⊢ (∀ x ∈ H, x = 1) ↔ ∃ x ∈ H, ∀ a ∈ H, a = x TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C08_Groups_and_Rings/solutions/Solutions_S01_Groups.lean
eq_bot_iff_card
[75, 1]
[84, 41]
simpa [eq_bot_iff_forall, card_eq_one_iff]
G : Type u_1 inst✝¹ : Group G H : Subgroup G inst✝ : Fintype (↥H) this : (∀ x ∈ H, x = 1) ↔ ∃ x ∈ H, ∀ a ∈ H, a = x ⊢ H = ⊥ ↔ card (↥H) = 1
no goals
Please generate a tactic in lean4 to solve the state. STATE: G : Type u_1 inst✝¹ : Group G H : Subgroup G inst✝ : Fintype (↥H) this : (∀ x ∈ H, x = 1) ↔ ∃ x ∈ H, ∀ a ∈ H, a = x ⊢ H = ⊥ ↔ card (↥H) = 1 TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C08_Groups_and_Rings/solutions/Solutions_S01_Groups.lean
eq_bot_iff_card
[75, 1]
[84, 41]
intro h
case mp G : Type u_1 inst✝¹ : Group G H : Subgroup G inst✝ : Fintype (↥H) ⊢ (∀ x ∈ H, x = 1) → ∃ x ∈ H, ∀ a ∈ H, a = x
case mp G : Type u_1 inst✝¹ : Group G H : Subgroup G inst✝ : Fintype (↥H) h : ∀ x ∈ H, x = 1 ⊢ ∃ x ∈ H, ∀ a ∈ H, a = x
Please generate a tactic in lean4 to solve the state. STATE: case mp G : Type u_1 inst✝¹ : Group G H : Subgroup G inst✝ : Fintype (↥H) ⊢ (∀ x ∈ H, x = 1) → ∃ x ∈ H, ∀ a ∈ H, a = x TACTIC: