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/Assignment2.lean | exercise2_7 | [86, 1] | [87, 8] | sorry | s t : ℕ → ℕ
k : ℕ
⊢ ∃ s, EventuallyGrowsFaster (fun n => s (n + 1)) s ∧ ∀ (n : ℕ), s n ≠ 0 | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
s t : ℕ → ℕ
k : ℕ
⊢ ∃ s, EventuallyGrowsFaster (fun n => s (n + 1)) s ∧ ∀ (n : ℕ), s n ≠ 0
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/Assignments/Assignment2.lean | useful_fact2 | [95, 1] | [100, 11] | use n - 1 | s t : ℕ → ℕ
k n m : ℕ
hn : n ≥ m + 1
⊢ ∃ k ≥ m, k + 1 = n | case h
s t : ℕ → ℕ
k n m : ℕ
hn : n ≥ m + 1
⊢ n - 1 ≥ m ∧ n - 1 + 1 = n | Please generate a tactic in lean4 to solve the state.
STATE:
s t : ℕ → ℕ
k n m : ℕ
hn : n ≥ m + 1
⊢ ∃ k ≥ m, k + 1 = n
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/Assignments/Assignment2.lean | useful_fact2 | [95, 1] | [100, 11] | constructor | case h
s t : ℕ → ℕ
k n m : ℕ
hn : n ≥ m + 1
⊢ n - 1 ≥ m ∧ n - 1 + 1 = n | case h.left
s t : ℕ → ℕ
k n m : ℕ
hn : n ≥ m + 1
⊢ n - 1 ≥ m
case h.right
s t : ℕ → ℕ
k n m : ℕ
hn : n ≥ m + 1
⊢ n - 1 + 1 = n | Please generate a tactic in lean4 to solve the state.
STATE:
case h
s t : ℕ → ℕ
k n m : ℕ
hn : n ≥ m + 1
⊢ n - 1 ≥ m ∧ n - 1 + 1 = n
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/Assignments/Assignment2.lean | useful_fact2 | [95, 1] | [100, 11] | exact? | case h.left
s t : ℕ → ℕ
k n m : ℕ
hn : n ≥ m + 1
⊢ n - 1 ≥ m | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case h.left
s t : ℕ → ℕ
k n m : ℕ
hn : n ≥ m + 1
⊢ n - 1 ≥ m
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/Assignments/Assignment2.lean | useful_fact2 | [95, 1] | [100, 11] | have : 1 ≤ n := by exact? | case h.right
s t : ℕ → ℕ
k n m : ℕ
hn : n ≥ m + 1
⊢ n - 1 + 1 = n | case h.right
s t : ℕ → ℕ
k n m : ℕ
hn : n ≥ m + 1
this : 1 ≤ n
⊢ n - 1 + 1 = n | Please generate a tactic in lean4 to solve the state.
STATE:
case h.right
s t : ℕ → ℕ
k n m : ℕ
hn : n ≥ m + 1
⊢ n - 1 + 1 = n
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/Assignments/Assignment2.lean | useful_fact2 | [95, 1] | [100, 11] | exact? | case h.right
s t : ℕ → ℕ
k n m : ℕ
hn : n ≥ m + 1
this : 1 ≤ n
⊢ n - 1 + 1 = n | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case h.right
s t : ℕ → ℕ
k n m : ℕ
hn : n ≥ m + 1
this : 1 ≤ n
⊢ n - 1 + 1 = n
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/Assignments/Assignment2.lean | useful_fact2 | [95, 1] | [100, 11] | exact? | s t : ℕ → ℕ
k n m : ℕ
hn : n ≥ m + 1
⊢ 1 ≤ n | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
s t : ℕ → ℕ
k n m : ℕ
hn : n ≥ m + 1
⊢ 1 ≤ n
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/Assignments/Assignment2.lean | exercise2_8 | [102, 1] | [107, 8] | have h3s : ∀ n, 1 ≤ s n := by
intro n
exact? | s t : ℕ → ℕ
k : ℕ
hs : EventuallyGrowsFaster (fun n => s (n + 1)) s
h2s : ∀ (n : ℕ), s n ≠ 0
⊢ ∀ (k : ℕ), ∃ N, ∀ n ≥ N, s n ≥ k | s t : ℕ → ℕ
k : ℕ
hs : EventuallyGrowsFaster (fun n => s (n + 1)) s
h2s : ∀ (n : ℕ), s n ≠ 0
h3s : ∀ (n : ℕ), 1 ≤ s n
⊢ ∀ (k : ℕ), ∃ N, ∀ n ≥ N, s n ≥ k | Please generate a tactic in lean4 to solve the state.
STATE:
s t : ℕ → ℕ
k : ℕ
hs : EventuallyGrowsFaster (fun n => s (n + 1)) s
h2s : ∀ (n : ℕ), s n ≠ 0
⊢ ∀ (k : ℕ), ∃ N, ∀ n ≥ N, s n ≥ k
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/Assignments/Assignment2.lean | exercise2_8 | [102, 1] | [107, 8] | sorry | s t : ℕ → ℕ
k : ℕ
hs : EventuallyGrowsFaster (fun n => s (n + 1)) s
h2s : ∀ (n : ℕ), s n ≠ 0
h3s : ∀ (n : ℕ), 1 ≤ s n
⊢ ∀ (k : ℕ), ∃ N, ∀ n ≥ N, s n ≥ k | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
s t : ℕ → ℕ
k : ℕ
hs : EventuallyGrowsFaster (fun n => s (n + 1)) s
h2s : ∀ (n : ℕ), s n ≠ 0
h3s : ∀ (n : ℕ), 1 ≤ s n
⊢ ∀ (k : ℕ), ∃ N, ∀ n ≥ N, s n ≥ k
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/Assignments/Assignment2.lean | exercise2_8 | [102, 1] | [107, 8] | intro n | s t : ℕ → ℕ
k : ℕ
hs : EventuallyGrowsFaster (fun n => s (n + 1)) s
h2s : ∀ (n : ℕ), s n ≠ 0
⊢ ∀ (n : ℕ), 1 ≤ s n | s t : ℕ → ℕ
k : ℕ
hs : EventuallyGrowsFaster (fun n => s (n + 1)) s
h2s : ∀ (n : ℕ), s n ≠ 0
n : ℕ
⊢ 1 ≤ s n | Please generate a tactic in lean4 to solve the state.
STATE:
s t : ℕ → ℕ
k : ℕ
hs : EventuallyGrowsFaster (fun n => s (n + 1)) s
h2s : ∀ (n : ℕ), s n ≠ 0
⊢ ∀ (n : ℕ), 1 ≤ s n
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/Assignments/Assignment2.lean | exercise2_8 | [102, 1] | [107, 8] | exact? | s t : ℕ → ℕ
k : ℕ
hs : EventuallyGrowsFaster (fun n => s (n + 1)) s
h2s : ∀ (n : ℕ), s n ≠ 0
n : ℕ
⊢ 1 ≤ s n | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
s t : ℕ → ℕ
k : ℕ
hs : EventuallyGrowsFaster (fun n => s (n + 1)) s
h2s : ∀ (n : ℕ), s n ≠ 0
n : ℕ
⊢ 1 ≤ s n
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C06_Structures/solutions/Solutions_S03_Building_the_Gaussian_Integers.lean | Int.div'_add_mod' | [149, 1] | [151, 45] | rw [div', mod'] | a b : ℤ
⊢ b * div' a b + mod' a b = a | a b : ℤ
⊢ b * ((a + b / 2) / b) + ((a + b / 2) % b - b / 2) = a | Please generate a tactic in lean4 to solve the state.
STATE:
a b : ℤ
⊢ b * div' a b + mod' a b = a
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C06_Structures/solutions/Solutions_S03_Building_the_Gaussian_Integers.lean | Int.div'_add_mod' | [149, 1] | [151, 45] | linarith [Int.ediv_add_emod (a + b / 2) b] | a b : ℤ
⊢ b * ((a + b / 2) / b) + ((a + b / 2) % b - b / 2) = a | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
a b : ℤ
⊢ b * ((a + b / 2) / b) + ((a + b / 2) % b - b / 2) = a
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C06_Structures/solutions/Solutions_S03_Building_the_Gaussian_Integers.lean | Int.abs_mod'_le | [153, 1] | [161, 11] | rw [mod', abs_le] | a b : ℤ
h : 0 < b
⊢ |mod' a b| ≤ b / 2 | a b : ℤ
h : 0 < b
⊢ -(b / 2) ≤ (a + b / 2) % b - b / 2 ∧ (a + b / 2) % b - b / 2 ≤ b / 2 | Please generate a tactic in lean4 to solve the state.
STATE:
a b : ℤ
h : 0 < b
⊢ |mod' a b| ≤ b / 2
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C06_Structures/solutions/Solutions_S03_Building_the_Gaussian_Integers.lean | Int.abs_mod'_le | [153, 1] | [161, 11] | constructor | a b : ℤ
h : 0 < b
⊢ -(b / 2) ≤ (a + b / 2) % b - b / 2 ∧ (a + b / 2) % b - b / 2 ≤ b / 2 | case left
a b : ℤ
h : 0 < b
⊢ -(b / 2) ≤ (a + b / 2) % b - b / 2
case right
a b : ℤ
h : 0 < b
⊢ (a + b / 2) % b - b / 2 ≤ b / 2 | Please generate a tactic in lean4 to solve the state.
STATE:
a b : ℤ
h : 0 < b
⊢ -(b / 2) ≤ (a + b / 2) % b - b / 2 ∧ (a + b / 2) % b - b / 2 ≤ b / 2
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C06_Structures/solutions/Solutions_S03_Building_the_Gaussian_Integers.lean | Int.abs_mod'_le | [153, 1] | [161, 11] | have := Int.emod_lt_of_pos (a + b / 2) h | case right
a b : ℤ
h : 0 < b
⊢ (a + b / 2) % b - b / 2 ≤ b / 2 | case right
a b : ℤ
h : 0 < b
this : (a + b / 2) % b < b
⊢ (a + b / 2) % b - b / 2 ≤ b / 2 | Please generate a tactic in lean4 to solve the state.
STATE:
case right
a b : ℤ
h : 0 < b
⊢ (a + b / 2) % b - b / 2 ≤ b / 2
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C06_Structures/solutions/Solutions_S03_Building_the_Gaussian_Integers.lean | Int.abs_mod'_le | [153, 1] | [161, 11] | have := Int.ediv_add_emod b 2 | case right
a b : ℤ
h : 0 < b
this : (a + b / 2) % b < b
⊢ (a + b / 2) % b - b / 2 ≤ b / 2 | case right
a b : ℤ
h : 0 < b
this✝ : (a + b / 2) % b < b
this : 2 * (b / 2) + b % 2 = b
⊢ (a + b / 2) % b - b / 2 ≤ b / 2 | Please generate a tactic in lean4 to solve the state.
STATE:
case right
a b : ℤ
h : 0 < b
this : (a + b / 2) % b < b
⊢ (a + b / 2) % b - b / 2 ≤ b / 2
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C06_Structures/solutions/Solutions_S03_Building_the_Gaussian_Integers.lean | Int.abs_mod'_le | [153, 1] | [161, 11] | have := Int.emod_lt_of_pos b zero_lt_two | case right
a b : ℤ
h : 0 < b
this✝ : (a + b / 2) % b < b
this : 2 * (b / 2) + b % 2 = b
⊢ (a + b / 2) % b - b / 2 ≤ b / 2 | case right
a b : ℤ
h : 0 < b
this✝¹ : (a + b / 2) % b < b
this✝ : 2 * (b / 2) + b % 2 = b
this : b % 2 < 2
⊢ (a + b / 2) % b - b / 2 ≤ b / 2 | Please generate a tactic in lean4 to solve the state.
STATE:
case right
a b : ℤ
h : 0 < b
this✝ : (a + b / 2) % b < b
this : 2 * (b / 2) + b % 2 = b
⊢ (a + b / 2) % b - b / 2 ≤ b / 2
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C06_Structures/solutions/Solutions_S03_Building_the_Gaussian_Integers.lean | Int.abs_mod'_le | [153, 1] | [161, 11] | revert this | case right
a b : ℤ
h : 0 < b
this✝¹ : (a + b / 2) % b < b
this✝ : 2 * (b / 2) + b % 2 = b
this : b % 2 < 2
⊢ (a + b / 2) % b - b / 2 ≤ b / 2 | case right
a b : ℤ
h : 0 < b
this✝ : (a + b / 2) % b < b
this : 2 * (b / 2) + b % 2 = b
⊢ b % 2 < 2 → (a + b / 2) % b - b / 2 ≤ b / 2 | Please generate a tactic in lean4 to solve the state.
STATE:
case right
a b : ℤ
h : 0 < b
this✝¹ : (a + b / 2) % b < b
this✝ : 2 * (b / 2) + b % 2 = b
this : b % 2 < 2
⊢ (a + b / 2) % b - b / 2 ≤ b / 2
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C06_Structures/solutions/Solutions_S03_Building_the_Gaussian_Integers.lean | Int.abs_mod'_le | [153, 1] | [161, 11] | intro this | case right
a b : ℤ
h : 0 < b
this✝ : (a + b / 2) % b < b
this : 2 * (b / 2) + b % 2 = b
⊢ b % 2 < 2 → (a + b / 2) % b - b / 2 ≤ b / 2 | case right
a b : ℤ
h : 0 < b
this✝¹ : (a + b / 2) % b < b
this✝ : 2 * (b / 2) + b % 2 = b
this : b % 2 < 2
⊢ (a + b / 2) % b - b / 2 ≤ b / 2 | Please generate a tactic in lean4 to solve the state.
STATE:
case right
a b : ℤ
h : 0 < b
this✝ : (a + b / 2) % b < b
this : 2 * (b / 2) + b % 2 = b
⊢ b % 2 < 2 → (a + b / 2) % b - b / 2 ≤ b / 2
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C06_Structures/solutions/Solutions_S03_Building_the_Gaussian_Integers.lean | Int.abs_mod'_le | [153, 1] | [161, 11] | linarith | case right
a b : ℤ
h : 0 < b
this✝¹ : (a + b / 2) % b < b
this✝ : 2 * (b / 2) + b % 2 = b
this : b % 2 < 2
⊢ (a + b / 2) % b - b / 2 ≤ b / 2 | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case right
a b : ℤ
h : 0 < b
this✝¹ : (a + b / 2) % b < b
this✝ : 2 * (b / 2) + b % 2 = b
this : b % 2 < 2
⊢ (a + b / 2) % b - b / 2 ≤ b / 2
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C06_Structures/solutions/Solutions_S03_Building_the_Gaussian_Integers.lean | Int.abs_mod'_le | [153, 1] | [161, 11] | linarith [Int.emod_nonneg (a + b / 2) h.ne'] | case left
a b : ℤ
h : 0 < b
⊢ -(b / 2) ≤ (a + b / 2) % b - b / 2 | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case left
a b : ℤ
h : 0 < b
⊢ -(b / 2) ≤ (a + b / 2) % b - b / 2
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C06_Structures/solutions/Solutions_S03_Building_the_Gaussian_Integers.lean | Int.mod'_eq | [163, 1] | [163, 91] | linarith [div'_add_mod' a b] | a b : ℤ
⊢ mod' a b = a - b * div' a b | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
a b : ℤ
⊢ mod' a b = a - b * div' a b
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C06_Structures/solutions/Solutions_S03_Building_the_Gaussian_Integers.lean | aux | [167, 9] | [172, 17] | apply le_antisymm _ (sq_nonneg x) | α : Type u_1
inst✝ : LinearOrderedRing α
x y : α
h : x ^ 2 + y ^ 2 = 0
⊢ x ^ 2 = 0 | α : Type u_1
inst✝ : LinearOrderedRing α
x y : α
h : x ^ 2 + y ^ 2 = 0
⊢ x ^ 2 ≤ 0 | Please generate a tactic in lean4 to solve the state.
STATE:
α : Type u_1
inst✝ : LinearOrderedRing α
x y : α
h : x ^ 2 + y ^ 2 = 0
⊢ x ^ 2 = 0
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C06_Structures/solutions/Solutions_S03_Building_the_Gaussian_Integers.lean | aux | [167, 9] | [172, 17] | rw [← h] | α : Type u_1
inst✝ : LinearOrderedRing α
x y : α
h : x ^ 2 + y ^ 2 = 0
⊢ x ^ 2 ≤ 0 | α : Type u_1
inst✝ : LinearOrderedRing α
x y : α
h : x ^ 2 + y ^ 2 = 0
⊢ x ^ 2 ≤ x ^ 2 + y ^ 2 | Please generate a tactic in lean4 to solve the state.
STATE:
α : Type u_1
inst✝ : LinearOrderedRing α
x y : α
h : x ^ 2 + y ^ 2 = 0
⊢ x ^ 2 ≤ 0
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C06_Structures/solutions/Solutions_S03_Building_the_Gaussian_Integers.lean | aux | [167, 9] | [172, 17] | apply le_add_of_nonneg_right (sq_nonneg y) | α : Type u_1
inst✝ : LinearOrderedRing α
x y : α
h : x ^ 2 + y ^ 2 = 0
⊢ x ^ 2 ≤ x ^ 2 + y ^ 2 | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
α : Type u_1
inst✝ : LinearOrderedRing α
x y : α
h : x ^ 2 + y ^ 2 = 0
⊢ x ^ 2 ≤ x ^ 2 + y ^ 2
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C06_Structures/solutions/Solutions_S03_Building_the_Gaussian_Integers.lean | sq_add_sq_eq_zero | [174, 1] | [183, 11] | constructor | α : Type u_1
inst✝ : LinearOrderedRing α
x y : α
⊢ x ^ 2 + y ^ 2 = 0 ↔ x = 0 ∧ y = 0 | case mp
α : Type u_1
inst✝ : LinearOrderedRing α
x y : α
⊢ x ^ 2 + y ^ 2 = 0 → x = 0 ∧ y = 0
case mpr
α : Type u_1
inst✝ : LinearOrderedRing α
x y : α
⊢ x = 0 ∧ y = 0 → x ^ 2 + y ^ 2 = 0 | Please generate a tactic in lean4 to solve the state.
STATE:
α : Type u_1
inst✝ : LinearOrderedRing α
x y : α
⊢ x ^ 2 + y ^ 2 = 0 ↔ x = 0 ∧ y = 0
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C06_Structures/solutions/Solutions_S03_Building_the_Gaussian_Integers.lean | sq_add_sq_eq_zero | [174, 1] | [183, 11] | rintro ⟨rfl, rfl⟩ | case mpr
α : Type u_1
inst✝ : LinearOrderedRing α
x y : α
⊢ x = 0 ∧ y = 0 → x ^ 2 + y ^ 2 = 0 | case mpr.intro
α : Type u_1
inst✝ : LinearOrderedRing α
⊢ 0 ^ 2 + 0 ^ 2 = 0 | Please generate a tactic in lean4 to solve the state.
STATE:
case mpr
α : Type u_1
inst✝ : LinearOrderedRing α
x y : α
⊢ x = 0 ∧ y = 0 → x ^ 2 + y ^ 2 = 0
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C06_Structures/solutions/Solutions_S03_Building_the_Gaussian_Integers.lean | sq_add_sq_eq_zero | [174, 1] | [183, 11] | norm_num | case mpr.intro
α : Type u_1
inst✝ : LinearOrderedRing α
⊢ 0 ^ 2 + 0 ^ 2 = 0 | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case mpr.intro
α : Type u_1
inst✝ : LinearOrderedRing α
⊢ 0 ^ 2 + 0 ^ 2 = 0
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C06_Structures/solutions/Solutions_S03_Building_the_Gaussian_Integers.lean | sq_add_sq_eq_zero | [174, 1] | [183, 11] | intro h | case mp
α : Type u_1
inst✝ : LinearOrderedRing α
x y : α
⊢ x ^ 2 + y ^ 2 = 0 → x = 0 ∧ y = 0 | case mp
α : Type u_1
inst✝ : LinearOrderedRing α
x y : α
h : x ^ 2 + y ^ 2 = 0
⊢ x = 0 ∧ y = 0 | Please generate a tactic in lean4 to solve the state.
STATE:
case mp
α : Type u_1
inst✝ : LinearOrderedRing α
x y : α
⊢ x ^ 2 + y ^ 2 = 0 → x = 0 ∧ y = 0
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C06_Structures/solutions/Solutions_S03_Building_the_Gaussian_Integers.lean | sq_add_sq_eq_zero | [174, 1] | [183, 11] | constructor | case mp
α : Type u_1
inst✝ : LinearOrderedRing α
x y : α
h : x ^ 2 + y ^ 2 = 0
⊢ x = 0 ∧ y = 0 | case mp.left
α : Type u_1
inst✝ : LinearOrderedRing α
x y : α
h : x ^ 2 + y ^ 2 = 0
⊢ x = 0
case mp.right
α : Type u_1
inst✝ : LinearOrderedRing α
x y : α
h : x ^ 2 + y ^ 2 = 0
⊢ y = 0 | Please generate a tactic in lean4 to solve the state.
STATE:
case mp
α : Type u_1
inst✝ : LinearOrderedRing α
x y : α
h : x ^ 2 + y ^ 2 = 0
⊢ x = 0 ∧ y = 0
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C06_Structures/solutions/Solutions_S03_Building_the_Gaussian_Integers.lean | sq_add_sq_eq_zero | [174, 1] | [183, 11] | rw [add_comm] at h | case mp.right
α : Type u_1
inst✝ : LinearOrderedRing α
x y : α
h : x ^ 2 + y ^ 2 = 0
⊢ y = 0 | case mp.right
α : Type u_1
inst✝ : LinearOrderedRing α
x y : α
h : y ^ 2 + x ^ 2 = 0
⊢ y = 0 | Please generate a tactic in lean4 to solve the state.
STATE:
case mp.right
α : Type u_1
inst✝ : LinearOrderedRing α
x y : α
h : x ^ 2 + y ^ 2 = 0
⊢ y = 0
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C06_Structures/solutions/Solutions_S03_Building_the_Gaussian_Integers.lean | sq_add_sq_eq_zero | [174, 1] | [183, 11] | exact aux h | case mp.right
α : Type u_1
inst✝ : LinearOrderedRing α
x y : α
h : y ^ 2 + x ^ 2 = 0
⊢ y = 0 | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case mp.right
α : Type u_1
inst✝ : LinearOrderedRing α
x y : α
h : y ^ 2 + x ^ 2 = 0
⊢ y = 0
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C06_Structures/solutions/Solutions_S03_Building_the_Gaussian_Integers.lean | sq_add_sq_eq_zero | [174, 1] | [183, 11] | exact aux h | case mp.left
α : Type u_1
inst✝ : LinearOrderedRing α
x y : α
h : x ^ 2 + y ^ 2 = 0
⊢ x = 0 | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case mp.left
α : Type u_1
inst✝ : LinearOrderedRing α
x y : α
h : x ^ 2 + y ^ 2 = 0
⊢ x = 0
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C06_Structures/solutions/Solutions_S03_Building_the_Gaussian_Integers.lean | gaussInt.norm_nonneg | [191, 1] | [193, 18] | apply add_nonneg <;>
apply sq_nonneg | x : gaussInt
⊢ 0 ≤ norm x | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
x : gaussInt
⊢ 0 ≤ norm x
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C06_Structures/solutions/Solutions_S03_Building_the_Gaussian_Integers.lean | gaussInt.norm_eq_zero | [195, 1] | [197, 6] | rw [norm, sq_add_sq_eq_zero, gaussInt.ext_iff] | x : gaussInt
⊢ norm x = 0 ↔ x = 0 | x : gaussInt
⊢ x.re = 0 ∧ x.im = 0 ↔ x.re = 0.re ∧ x.im = 0.im | Please generate a tactic in lean4 to solve the state.
STATE:
x : gaussInt
⊢ norm x = 0 ↔ x = 0
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C06_Structures/solutions/Solutions_S03_Building_the_Gaussian_Integers.lean | gaussInt.norm_eq_zero | [195, 1] | [197, 6] | rfl | x : gaussInt
⊢ x.re = 0 ∧ x.im = 0 ↔ x.re = 0.re ∧ x.im = 0.im | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
x : gaussInt
⊢ x.re = 0 ∧ x.im = 0 ↔ x.re = 0.re ∧ x.im = 0.im
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C06_Structures/solutions/Solutions_S03_Building_the_Gaussian_Integers.lean | gaussInt.norm_pos | [199, 1] | [201, 21] | rw [lt_iff_le_and_ne, ne_comm, Ne, norm_eq_zero] | x : gaussInt
⊢ 0 < norm x ↔ x ≠ 0 | x : gaussInt
⊢ 0 ≤ norm x ∧ ¬x = 0 ↔ x ≠ 0 | Please generate a tactic in lean4 to solve the state.
STATE:
x : gaussInt
⊢ 0 < norm x ↔ x ≠ 0
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C06_Structures/solutions/Solutions_S03_Building_the_Gaussian_Integers.lean | gaussInt.norm_pos | [199, 1] | [201, 21] | simp [norm_nonneg] | x : gaussInt
⊢ 0 ≤ norm x ∧ ¬x = 0 ↔ x ≠ 0 | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
x : gaussInt
⊢ 0 ≤ norm x ∧ ¬x = 0 ↔ x ≠ 0
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C06_Structures/solutions/Solutions_S03_Building_the_Gaussian_Integers.lean | gaussInt.norm_mul | [203, 1] | [205, 7] | simp [norm] | x y : gaussInt
⊢ norm (x * y) = norm x * norm y | x y : gaussInt
⊢ (x.re * y.re - x.im * y.im) ^ 2 + (x.re * y.im + x.im * y.re) ^ 2 = (x.re ^ 2 + x.im ^ 2) * (y.re ^ 2 + y.im ^ 2) | Please generate a tactic in lean4 to solve the state.
STATE:
x y : gaussInt
⊢ norm (x * y) = norm x * norm y
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C06_Structures/solutions/Solutions_S03_Building_the_Gaussian_Integers.lean | gaussInt.norm_mul | [203, 1] | [205, 7] | ring | x y : gaussInt
⊢ (x.re * y.re - x.im * y.im) ^ 2 + (x.re * y.im + x.im * y.re) ^ 2 = (x.re ^ 2 + x.im ^ 2) * (y.re ^ 2 + y.im ^ 2) | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
x y : gaussInt
⊢ (x.re * y.re - x.im * y.im) ^ 2 + (x.re * y.im + x.im * y.re) ^ 2 = (x.re ^ 2 + x.im ^ 2) * (y.re ^ 2 + y.im ^ 2)
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C06_Structures/solutions/Solutions_S03_Building_the_Gaussian_Integers.lean | gaussInt.norm_conj | [218, 1] | [218, 76] | simp [norm] | x : gaussInt
⊢ norm (conj x) = norm x | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
x : gaussInt
⊢ norm (conj x) = norm x
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C06_Structures/solutions/Solutions_S03_Building_the_Gaussian_Integers.lean | gaussInt.norm_mod_lt | [233, 1] | [250, 19] | have norm_y_pos : 0 < norm y := by rwa [norm_pos] | x y : gaussInt
hy : y ≠ 0
⊢ norm (x % y) < norm y | x y : gaussInt
hy : y ≠ 0
norm_y_pos : 0 < norm y
⊢ norm (x % y) < norm y | Please generate a tactic in lean4 to solve the state.
STATE:
x y : gaussInt
hy : y ≠ 0
⊢ norm (x % y) < norm y
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C06_Structures/solutions/Solutions_S03_Building_the_Gaussian_Integers.lean | gaussInt.norm_mod_lt | [233, 1] | [250, 19] | have H1 : x % y * conj y = ⟨Int.mod' (x * conj y).re (norm y), Int.mod' (x * conj y).im (norm y)⟩ | x y : gaussInt
hy : y ≠ 0
norm_y_pos : 0 < norm y
⊢ norm (x % y) < norm y | case H1
x y : gaussInt
hy : y ≠ 0
norm_y_pos : 0 < norm y
⊢ x % y * conj y = { re := Int.mod' (x * conj y).re (norm y), im := Int.mod' (x * conj y).im (norm y) }
x y : gaussInt
hy : y ≠ 0
norm_y_pos : 0 < norm y
H1 : x % y * conj y = { re := Int.mod' (x * conj y).re (norm y), im := Int.mod' (x * conj y).im (norm y) }
⊢ norm (x % y) < norm y | Please generate a tactic in lean4 to solve the state.
STATE:
x y : gaussInt
hy : y ≠ 0
norm_y_pos : 0 < norm y
⊢ norm (x % y) < norm y
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C06_Structures/solutions/Solutions_S03_Building_the_Gaussian_Integers.lean | gaussInt.norm_mod_lt | [233, 1] | [250, 19] | have H2 : norm (x % y) * norm y ≤ norm y / 2 * norm y | x y : gaussInt
hy : y ≠ 0
norm_y_pos : 0 < norm y
H1 : x % y * conj y = { re := Int.mod' (x * conj y).re (norm y), im := Int.mod' (x * conj y).im (norm y) }
⊢ norm (x % y) < norm y | case H2
x y : gaussInt
hy : y ≠ 0
norm_y_pos : 0 < norm y
H1 : x % y * conj y = { re := Int.mod' (x * conj y).re (norm y), im := Int.mod' (x * conj y).im (norm y) }
⊢ norm (x % y) * norm y ≤ norm y / 2 * norm y
x y : gaussInt
hy : y ≠ 0
norm_y_pos : 0 < norm y
H1 : x % y * conj y = { re := Int.mod' (x * conj y).re (norm y), im := Int.mod' (x * conj y).im (norm y) }
H2 : norm (x % y) * norm y ≤ norm y / 2 * norm y
⊢ norm (x % y) < norm y | Please generate a tactic in lean4 to solve the state.
STATE:
x y : gaussInt
hy : y ≠ 0
norm_y_pos : 0 < norm y
H1 : x % y * conj y = { re := Int.mod' (x * conj y).re (norm y), im := Int.mod' (x * conj y).im (norm y) }
⊢ norm (x % y) < norm y
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C06_Structures/solutions/Solutions_S03_Building_the_Gaussian_Integers.lean | gaussInt.norm_mod_lt | [233, 1] | [250, 19] | rwa [norm_pos] | x y : gaussInt
hy : y ≠ 0
⊢ 0 < norm y | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
x y : gaussInt
hy : y ≠ 0
⊢ 0 < norm y
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C06_Structures/solutions/Solutions_S03_Building_the_Gaussian_Integers.lean | gaussInt.norm_mod_lt | [233, 1] | [250, 19] | ext <;> simp [Int.mod'_eq, mod_def, div_def, norm] <;> ring | case H1
x y : gaussInt
hy : y ≠ 0
norm_y_pos : 0 < norm y
⊢ x % y * conj y = { re := Int.mod' (x * conj y).re (norm y), im := Int.mod' (x * conj y).im (norm y) } | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case H1
x y : gaussInt
hy : y ≠ 0
norm_y_pos : 0 < norm y
⊢ x % y * conj y = { re := Int.mod' (x * conj y).re (norm y), im := Int.mod' (x * conj y).im (norm y) }
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C06_Structures/solutions/Solutions_S03_Building_the_Gaussian_Integers.lean | gaussInt.norm_mod_lt | [233, 1] | [250, 19] | calc
norm (x % y) * norm y = norm (x % y * conj y) := by simp only [norm_mul, norm_conj]
_ = |Int.mod' (x.re * y.re + x.im * y.im) (norm y)| ^ 2
+ |Int.mod' (-(x.re * y.im) + x.im * y.re) (norm y)| ^ 2 := by simp [H1, norm, sq_abs]
_ ≤ (y.norm / 2) ^ 2 + (y.norm / 2) ^ 2 := by gcongr <;> apply Int.abs_mod'_le _ _ norm_y_pos
_ = norm y / 2 * (norm y / 2 * 2) := by ring
_ ≤ norm y / 2 * norm y := by gcongr; apply Int.ediv_mul_le; norm_num | case H2
x y : gaussInt
hy : y ≠ 0
norm_y_pos : 0 < norm y
H1 : x % y * conj y = { re := Int.mod' (x * conj y).re (norm y), im := Int.mod' (x * conj y).im (norm y) }
⊢ norm (x % y) * norm y ≤ norm y / 2 * norm y | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case H2
x y : gaussInt
hy : y ≠ 0
norm_y_pos : 0 < norm y
H1 : x % y * conj y = { re := Int.mod' (x * conj y).re (norm y), im := Int.mod' (x * conj y).im (norm y) }
⊢ norm (x % y) * norm y ≤ norm y / 2 * norm y
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C06_Structures/solutions/Solutions_S03_Building_the_Gaussian_Integers.lean | gaussInt.norm_mod_lt | [233, 1] | [250, 19] | simp only [norm_mul, norm_conj] | x y : gaussInt
hy : y ≠ 0
norm_y_pos : 0 < norm y
H1 : x % y * conj y = { re := Int.mod' (x * conj y).re (norm y), im := Int.mod' (x * conj y).im (norm y) }
⊢ norm (x % y) * norm y = norm (x % y * conj y) | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
x y : gaussInt
hy : y ≠ 0
norm_y_pos : 0 < norm y
H1 : x % y * conj y = { re := Int.mod' (x * conj y).re (norm y), im := Int.mod' (x * conj y).im (norm y) }
⊢ norm (x % y) * norm y = norm (x % y * conj y)
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C06_Structures/solutions/Solutions_S03_Building_the_Gaussian_Integers.lean | gaussInt.norm_mod_lt | [233, 1] | [250, 19] | simp [H1, norm, sq_abs] | x y : gaussInt
hy : y ≠ 0
norm_y_pos : 0 < norm y
H1 : x % y * conj y = { re := Int.mod' (x * conj y).re (norm y), im := Int.mod' (x * conj y).im (norm y) }
⊢ norm (x % y * conj y) =
|Int.mod' (x.re * y.re + x.im * y.im) (norm y)| ^ 2 + |Int.mod' (-(x.re * y.im) + x.im * y.re) (norm y)| ^ 2 | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
x y : gaussInt
hy : y ≠ 0
norm_y_pos : 0 < norm y
H1 : x % y * conj y = { re := Int.mod' (x * conj y).re (norm y), im := Int.mod' (x * conj y).im (norm y) }
⊢ norm (x % y * conj y) =
|Int.mod' (x.re * y.re + x.im * y.im) (norm y)| ^ 2 + |Int.mod' (-(x.re * y.im) + x.im * y.re) (norm y)| ^ 2
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C06_Structures/solutions/Solutions_S03_Building_the_Gaussian_Integers.lean | gaussInt.norm_mod_lt | [233, 1] | [250, 19] | gcongr <;> apply Int.abs_mod'_le _ _ norm_y_pos | x y : gaussInt
hy : y ≠ 0
norm_y_pos : 0 < norm y
H1 : x % y * conj y = { re := Int.mod' (x * conj y).re (norm y), im := Int.mod' (x * conj y).im (norm y) }
⊢ |Int.mod' (x.re * y.re + x.im * y.im) (norm y)| ^ 2 + |Int.mod' (-(x.re * y.im) + x.im * y.re) (norm y)| ^ 2 ≤
(norm y / 2) ^ 2 + (norm y / 2) ^ 2 | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
x y : gaussInt
hy : y ≠ 0
norm_y_pos : 0 < norm y
H1 : x % y * conj y = { re := Int.mod' (x * conj y).re (norm y), im := Int.mod' (x * conj y).im (norm y) }
⊢ |Int.mod' (x.re * y.re + x.im * y.im) (norm y)| ^ 2 + |Int.mod' (-(x.re * y.im) + x.im * y.re) (norm y)| ^ 2 ≤
(norm y / 2) ^ 2 + (norm y / 2) ^ 2
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C06_Structures/solutions/Solutions_S03_Building_the_Gaussian_Integers.lean | gaussInt.norm_mod_lt | [233, 1] | [250, 19] | ring | x y : gaussInt
hy : y ≠ 0
norm_y_pos : 0 < norm y
H1 : x % y * conj y = { re := Int.mod' (x * conj y).re (norm y), im := Int.mod' (x * conj y).im (norm y) }
⊢ (norm y / 2) ^ 2 + (norm y / 2) ^ 2 = norm y / 2 * (norm y / 2 * 2) | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
x y : gaussInt
hy : y ≠ 0
norm_y_pos : 0 < norm y
H1 : x % y * conj y = { re := Int.mod' (x * conj y).re (norm y), im := Int.mod' (x * conj y).im (norm y) }
⊢ (norm y / 2) ^ 2 + (norm y / 2) ^ 2 = norm y / 2 * (norm y / 2 * 2)
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C06_Structures/solutions/Solutions_S03_Building_the_Gaussian_Integers.lean | gaussInt.norm_mod_lt | [233, 1] | [250, 19] | gcongr | x y : gaussInt
hy : y ≠ 0
norm_y_pos : 0 < norm y
H1 : x % y * conj y = { re := Int.mod' (x * conj y).re (norm y), im := Int.mod' (x * conj y).im (norm y) }
⊢ norm y / 2 * (norm y / 2 * 2) ≤ norm y / 2 * norm y | case h
x y : gaussInt
hy : y ≠ 0
norm_y_pos : 0 < norm y
H1 : x % y * conj y = { re := Int.mod' (x * conj y).re (norm y), im := Int.mod' (x * conj y).im (norm y) }
⊢ norm y / 2 * 2 ≤ norm y | Please generate a tactic in lean4 to solve the state.
STATE:
x y : gaussInt
hy : y ≠ 0
norm_y_pos : 0 < norm y
H1 : x % y * conj y = { re := Int.mod' (x * conj y).re (norm y), im := Int.mod' (x * conj y).im (norm y) }
⊢ norm y / 2 * (norm y / 2 * 2) ≤ norm y / 2 * norm y
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C06_Structures/solutions/Solutions_S03_Building_the_Gaussian_Integers.lean | gaussInt.norm_mod_lt | [233, 1] | [250, 19] | apply Int.ediv_mul_le | case h
x y : gaussInt
hy : y ≠ 0
norm_y_pos : 0 < norm y
H1 : x % y * conj y = { re := Int.mod' (x * conj y).re (norm y), im := Int.mod' (x * conj y).im (norm y) }
⊢ norm y / 2 * 2 ≤ norm y | case h.H
x y : gaussInt
hy : y ≠ 0
norm_y_pos : 0 < norm y
H1 : x % y * conj y = { re := Int.mod' (x * conj y).re (norm y), im := Int.mod' (x * conj y).im (norm y) }
⊢ 2 ≠ 0 | Please generate a tactic in lean4 to solve the state.
STATE:
case h
x y : gaussInt
hy : y ≠ 0
norm_y_pos : 0 < norm y
H1 : x % y * conj y = { re := Int.mod' (x * conj y).re (norm y), im := Int.mod' (x * conj y).im (norm y) }
⊢ norm y / 2 * 2 ≤ norm y
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C06_Structures/solutions/Solutions_S03_Building_the_Gaussian_Integers.lean | gaussInt.norm_mod_lt | [233, 1] | [250, 19] | norm_num | case h.H
x y : gaussInt
hy : y ≠ 0
norm_y_pos : 0 < norm y
H1 : x % y * conj y = { re := Int.mod' (x * conj y).re (norm y), im := Int.mod' (x * conj y).im (norm y) }
⊢ 2 ≠ 0 | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case h.H
x y : gaussInt
hy : y ≠ 0
norm_y_pos : 0 < norm y
H1 : x % y * conj y = { re := Int.mod' (x * conj y).re (norm y), im := Int.mod' (x * conj y).im (norm y) }
⊢ 2 ≠ 0
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C06_Structures/solutions/Solutions_S03_Building_the_Gaussian_Integers.lean | gaussInt.norm_mod_lt | [233, 1] | [250, 19] | apply Int.ediv_lt_of_lt_mul | x y : gaussInt
hy : y ≠ 0
norm_y_pos : 0 < norm y
H1 : x % y * conj y = { re := Int.mod' (x * conj y).re (norm y), im := Int.mod' (x * conj y).im (norm y) }
H2 : norm (x % y) * norm y ≤ norm y / 2 * norm y
⊢ norm y / 2 < norm y | case H
x y : gaussInt
hy : y ≠ 0
norm_y_pos : 0 < norm y
H1 : x % y * conj y = { re := Int.mod' (x * conj y).re (norm y), im := Int.mod' (x * conj y).im (norm y) }
H2 : norm (x % y) * norm y ≤ norm y / 2 * norm y
⊢ 0 < 2
case H'
x y : gaussInt
hy : y ≠ 0
norm_y_pos : 0 < norm y
H1 : x % y * conj y = { re := Int.mod' (x * conj y).re (norm y), im := Int.mod' (x * conj y).im (norm y) }
H2 : norm (x % y) * norm y ≤ norm y / 2 * norm y
⊢ norm y < norm y * 2 | Please generate a tactic in lean4 to solve the state.
STATE:
x y : gaussInt
hy : y ≠ 0
norm_y_pos : 0 < norm y
H1 : x % y * conj y = { re := Int.mod' (x * conj y).re (norm y), im := Int.mod' (x * conj y).im (norm y) }
H2 : norm (x % y) * norm y ≤ norm y / 2 * norm y
⊢ norm y / 2 < norm y
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C06_Structures/solutions/Solutions_S03_Building_the_Gaussian_Integers.lean | gaussInt.norm_mod_lt | [233, 1] | [250, 19] | norm_num | case H
x y : gaussInt
hy : y ≠ 0
norm_y_pos : 0 < norm y
H1 : x % y * conj y = { re := Int.mod' (x * conj y).re (norm y), im := Int.mod' (x * conj y).im (norm y) }
H2 : norm (x % y) * norm y ≤ norm y / 2 * norm y
⊢ 0 < 2 | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case H
x y : gaussInt
hy : y ≠ 0
norm_y_pos : 0 < norm y
H1 : x % y * conj y = { re := Int.mod' (x * conj y).re (norm y), im := Int.mod' (x * conj y).im (norm y) }
H2 : norm (x % y) * norm y ≤ norm y / 2 * norm y
⊢ 0 < 2
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C06_Structures/solutions/Solutions_S03_Building_the_Gaussian_Integers.lean | gaussInt.norm_mod_lt | [233, 1] | [250, 19] | linarith | case H'
x y : gaussInt
hy : y ≠ 0
norm_y_pos : 0 < norm y
H1 : x % y * conj y = { re := Int.mod' (x * conj y).re (norm y), im := Int.mod' (x * conj y).im (norm y) }
H2 : norm (x % y) * norm y ≤ norm y / 2 * norm y
⊢ norm y < norm y * 2 | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case H'
x y : gaussInt
hy : y ≠ 0
norm_y_pos : 0 < norm y
H1 : x % y * conj y = { re := Int.mod' (x * conj y).re (norm y), im := Int.mod' (x * conj y).im (norm y) }
H2 : norm (x % y) * norm y ≤ norm y / 2 * norm y
⊢ norm y < norm y * 2
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C06_Structures/solutions/Solutions_S03_Building_the_Gaussian_Integers.lean | gaussInt.natAbs_norm_mod_lt | [255, 1] | [259, 25] | apply Int.ofNat_lt.1 | x y : gaussInt
hy : y ≠ 0
⊢ Int.natAbs (norm (x % y)) < Int.natAbs (norm y) | x y : gaussInt
hy : y ≠ 0
⊢ ↑(Int.natAbs (norm (x % y))) < ↑(Int.natAbs (norm y)) | Please generate a tactic in lean4 to solve the state.
STATE:
x y : gaussInt
hy : y ≠ 0
⊢ Int.natAbs (norm (x % y)) < Int.natAbs (norm y)
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C06_Structures/solutions/Solutions_S03_Building_the_Gaussian_Integers.lean | gaussInt.natAbs_norm_mod_lt | [255, 1] | [259, 25] | simp only [Int.coe_natAbs, abs_of_nonneg, norm_nonneg] | x y : gaussInt
hy : y ≠ 0
⊢ ↑(Int.natAbs (norm (x % y))) < ↑(Int.natAbs (norm y)) | x y : gaussInt
hy : y ≠ 0
⊢ norm (x % y) < norm y | Please generate a tactic in lean4 to solve the state.
STATE:
x y : gaussInt
hy : y ≠ 0
⊢ ↑(Int.natAbs (norm (x % y))) < ↑(Int.natAbs (norm y))
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C06_Structures/solutions/Solutions_S03_Building_the_Gaussian_Integers.lean | gaussInt.natAbs_norm_mod_lt | [255, 1] | [259, 25] | apply norm_mod_lt x hy | x y : gaussInt
hy : y ≠ 0
⊢ norm (x % y) < norm y | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
x y : gaussInt
hy : y ≠ 0
⊢ norm (x % y) < norm y
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C06_Structures/solutions/Solutions_S03_Building_the_Gaussian_Integers.lean | gaussInt.not_norm_mul_left_lt_norm | [261, 1] | [268, 51] | apply not_lt_of_ge | x y : gaussInt
hy : y ≠ 0
⊢ ¬Int.natAbs (norm (x * y)) < Int.natAbs (norm x) | case h
x y : gaussInt
hy : y ≠ 0
⊢ Int.natAbs (norm (x * y)) ≥ Int.natAbs (norm x) | Please generate a tactic in lean4 to solve the state.
STATE:
x y : gaussInt
hy : y ≠ 0
⊢ ¬Int.natAbs (norm (x * y)) < Int.natAbs (norm x)
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C06_Structures/solutions/Solutions_S03_Building_the_Gaussian_Integers.lean | gaussInt.not_norm_mul_left_lt_norm | [261, 1] | [268, 51] | rw [norm_mul, Int.natAbs_mul] | case h
x y : gaussInt
hy : y ≠ 0
⊢ Int.natAbs (norm (x * y)) ≥ Int.natAbs (norm x) | case h
x y : gaussInt
hy : y ≠ 0
⊢ Int.natAbs (norm x) * Int.natAbs (norm y) ≥ Int.natAbs (norm x) | Please generate a tactic in lean4 to solve the state.
STATE:
case h
x y : gaussInt
hy : y ≠ 0
⊢ Int.natAbs (norm (x * y)) ≥ Int.natAbs (norm x)
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C06_Structures/solutions/Solutions_S03_Building_the_Gaussian_Integers.lean | gaussInt.not_norm_mul_left_lt_norm | [261, 1] | [268, 51] | apply le_mul_of_one_le_right (Nat.zero_le _) | case h
x y : gaussInt
hy : y ≠ 0
⊢ Int.natAbs (norm x) * Int.natAbs (norm y) ≥ Int.natAbs (norm x) | case h
x y : gaussInt
hy : y ≠ 0
⊢ 1 ≤ Int.natAbs (norm y) | Please generate a tactic in lean4 to solve the state.
STATE:
case h
x y : gaussInt
hy : y ≠ 0
⊢ Int.natAbs (norm x) * Int.natAbs (norm y) ≥ Int.natAbs (norm x)
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C06_Structures/solutions/Solutions_S03_Building_the_Gaussian_Integers.lean | gaussInt.not_norm_mul_left_lt_norm | [261, 1] | [268, 51] | apply Int.ofNat_le.1 | case h
x y : gaussInt
hy : y ≠ 0
⊢ 1 ≤ Int.natAbs (norm y) | case h
x y : gaussInt
hy : y ≠ 0
⊢ ↑1 ≤ ↑(Int.natAbs (norm y)) | Please generate a tactic in lean4 to solve the state.
STATE:
case h
x y : gaussInt
hy : y ≠ 0
⊢ 1 ≤ Int.natAbs (norm y)
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C06_Structures/solutions/Solutions_S03_Building_the_Gaussian_Integers.lean | gaussInt.not_norm_mul_left_lt_norm | [261, 1] | [268, 51] | rw [coe_natAbs_norm] | case h
x y : gaussInt
hy : y ≠ 0
⊢ ↑1 ≤ ↑(Int.natAbs (norm y)) | case h
x y : gaussInt
hy : y ≠ 0
⊢ ↑1 ≤ norm y | Please generate a tactic in lean4 to solve the state.
STATE:
case h
x y : gaussInt
hy : y ≠ 0
⊢ ↑1 ≤ ↑(Int.natAbs (norm y))
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C06_Structures/solutions/Solutions_S03_Building_the_Gaussian_Integers.lean | gaussInt.not_norm_mul_left_lt_norm | [261, 1] | [268, 51] | exact Int.add_one_le_of_lt ((norm_pos _).mpr hy) | case h
x y : gaussInt
hy : y ≠ 0
⊢ ↑1 ≤ norm y | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case h
x y : gaussInt
hy : y ≠ 0
⊢ ↑1 ≤ norm y
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C08_Groups_and_Rings/solutions/Solutions_S02_Rings.lean | chineseMap_inj | [33, 1] | [34, 58] | rw [chineseMap, injective_lift_iff, ker_Pi_Quotient_mk] | ι : Type u_1
R : Type u_2
inst✝ : CommRing R
I : ι → Ideal R
⊢ Injective ↑(chineseMap I) | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
ι : Type u_1
R : Type u_2
inst✝ : CommRing R
I : ι → Ideal R
⊢ Injective ↑(chineseMap I)
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C08_Groups_and_Rings/solutions/Solutions_S02_Rings.lean | isCoprime_Inf | [36, 1] | [50, 81] | classical
simp_rw [isCoprime_iff_add] at *
induction s using Finset.induction with
| empty =>
simp
| @insert i s _ hs =>
rw [Finset.iInf_insert, inf_comm, one_eq_top, eq_top_iff, ← one_eq_top]
set K := ⨅ j ∈ s, J j
calc
1 = I + K := (hs fun j hj ↦ hf j (Finset.mem_insert_of_mem hj)).symm
_ = I + K*(I + J i) := by rw [hf i (Finset.mem_insert_self i s), mul_one]
_ = (1+K)*I + K*J i := by ring
_ ≤ I + K ⊓ J i := by gcongr ; apply mul_le_left ; apply mul_le_inf | ι : Type u_1
R : Type u_2
inst✝ : CommRing R
I : Ideal R
J : ι → Ideal R
s : Finset ι
hf : ∀ j ∈ s, IsCoprime I (J j)
⊢ IsCoprime I (⨅ j ∈ s, J j) | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
ι : Type u_1
R : Type u_2
inst✝ : CommRing R
I : Ideal R
J : ι → Ideal R
s : Finset ι
hf : ∀ j ∈ s, IsCoprime I (J j)
⊢ IsCoprime I (⨅ j ∈ s, J j)
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C08_Groups_and_Rings/solutions/Solutions_S02_Rings.lean | isCoprime_Inf | [36, 1] | [50, 81] | simp_rw [isCoprime_iff_add] at * | ι : Type u_1
R : Type u_2
inst✝ : CommRing R
I : Ideal R
J : ι → Ideal R
s : Finset ι
hf : ∀ j ∈ s, IsCoprime I (J j)
⊢ IsCoprime I (⨅ j ∈ s, J j) | ι : Type u_1
R : Type u_2
inst✝ : CommRing R
I : Ideal R
J : ι → Ideal R
s : Finset ι
hf : ∀ j ∈ s, I + J j = 1
⊢ I + ⨅ j ∈ s, J j = 1 | Please generate a tactic in lean4 to solve the state.
STATE:
ι : Type u_1
R : Type u_2
inst✝ : CommRing R
I : Ideal R
J : ι → Ideal R
s : Finset ι
hf : ∀ j ∈ s, IsCoprime I (J j)
⊢ IsCoprime I (⨅ j ∈ s, J j)
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C08_Groups_and_Rings/solutions/Solutions_S02_Rings.lean | isCoprime_Inf | [36, 1] | [50, 81] | induction s using Finset.induction with
| empty =>
simp
| @insert i s _ hs =>
rw [Finset.iInf_insert, inf_comm, one_eq_top, eq_top_iff, ← one_eq_top]
set K := ⨅ j ∈ s, J j
calc
1 = I + K := (hs fun j hj ↦ hf j (Finset.mem_insert_of_mem hj)).symm
_ = I + K*(I + J i) := by rw [hf i (Finset.mem_insert_self i s), mul_one]
_ = (1+K)*I + K*J i := by ring
_ ≤ I + K ⊓ J i := by gcongr ; apply mul_le_left ; apply mul_le_inf | ι : Type u_1
R : Type u_2
inst✝ : CommRing R
I : Ideal R
J : ι → Ideal R
s : Finset ι
hf : ∀ j ∈ s, I + J j = 1
⊢ I + ⨅ j ∈ s, J j = 1 | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
ι : Type u_1
R : Type u_2
inst✝ : CommRing R
I : Ideal R
J : ι → Ideal R
s : Finset ι
hf : ∀ j ∈ s, I + J j = 1
⊢ I + ⨅ j ∈ s, J j = 1
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C08_Groups_and_Rings/solutions/Solutions_S02_Rings.lean | isCoprime_Inf | [36, 1] | [50, 81] | simp | case empty
ι : Type u_1
R : Type u_2
inst✝ : CommRing R
I : Ideal R
J : ι → Ideal R
hf : ∀ j ∈ ∅, I + J j = 1
⊢ I + ⨅ j ∈ ∅, J j = 1 | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case empty
ι : Type u_1
R : Type u_2
inst✝ : CommRing R
I : Ideal R
J : ι → Ideal R
hf : ∀ j ∈ ∅, I + J j = 1
⊢ I + ⨅ j ∈ ∅, J j = 1
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C08_Groups_and_Rings/solutions/Solutions_S02_Rings.lean | isCoprime_Inf | [36, 1] | [50, 81] | rw [Finset.iInf_insert, inf_comm, one_eq_top, eq_top_iff, ← one_eq_top] | case insert
ι : Type u_1
R : Type u_2
inst✝ : CommRing R
I : Ideal R
J : ι → Ideal R
i : ι
s : Finset ι
a✝ : i ∉ s
hs : (∀ j ∈ s, I + J j = 1) → I + ⨅ j ∈ s, J j = 1
hf : ∀ j ∈ insert i s, I + J j = 1
⊢ I + ⨅ j ∈ insert i s, J j = 1 | case insert
ι : Type u_1
R : Type u_2
inst✝ : CommRing R
I : Ideal R
J : ι → Ideal R
i : ι
s : Finset ι
a✝ : i ∉ s
hs : (∀ j ∈ s, I + J j = 1) → I + ⨅ j ∈ s, J j = 1
hf : ∀ j ∈ insert i s, I + J j = 1
⊢ 1 ≤ I + (⨅ x ∈ s, J x) ⊓ J i | Please generate a tactic in lean4 to solve the state.
STATE:
case insert
ι : Type u_1
R : Type u_2
inst✝ : CommRing R
I : Ideal R
J : ι → Ideal R
i : ι
s : Finset ι
a✝ : i ∉ s
hs : (∀ j ∈ s, I + J j = 1) → I + ⨅ j ∈ s, J j = 1
hf : ∀ j ∈ insert i s, I + J j = 1
⊢ I + ⨅ j ∈ insert i s, J j = 1
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C08_Groups_and_Rings/solutions/Solutions_S02_Rings.lean | isCoprime_Inf | [36, 1] | [50, 81] | set K := ⨅ j ∈ s, J j | case insert
ι : Type u_1
R : Type u_2
inst✝ : CommRing R
I : Ideal R
J : ι → Ideal R
i : ι
s : Finset ι
a✝ : i ∉ s
hs : (∀ j ∈ s, I + J j = 1) → I + ⨅ j ∈ s, J j = 1
hf : ∀ j ∈ insert i s, I + J j = 1
⊢ 1 ≤ I + (⨅ x ∈ s, J x) ⊓ J i | case insert
ι : Type u_1
R : Type u_2
inst✝ : CommRing R
I : Ideal R
J : ι → Ideal R
i : ι
s : Finset ι
a✝ : i ∉ s
hf : ∀ j ∈ insert i s, I + J j = 1
K : Ideal R := ⨅ j ∈ s, J j
hs : (∀ j ∈ s, I + J j = 1) → I + K = 1
⊢ 1 ≤ I + K ⊓ J i | Please generate a tactic in lean4 to solve the state.
STATE:
case insert
ι : Type u_1
R : Type u_2
inst✝ : CommRing R
I : Ideal R
J : ι → Ideal R
i : ι
s : Finset ι
a✝ : i ∉ s
hs : (∀ j ∈ s, I + J j = 1) → I + ⨅ j ∈ s, J j = 1
hf : ∀ j ∈ insert i s, I + J j = 1
⊢ 1 ≤ I + (⨅ x ∈ s, J x) ⊓ J i
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C08_Groups_and_Rings/solutions/Solutions_S02_Rings.lean | isCoprime_Inf | [36, 1] | [50, 81] | calc
1 = I + K := (hs fun j hj ↦ hf j (Finset.mem_insert_of_mem hj)).symm
_ = I + K*(I + J i) := by rw [hf i (Finset.mem_insert_self i s), mul_one]
_ = (1+K)*I + K*J i := by ring
_ ≤ I + K ⊓ J i := by gcongr ; apply mul_le_left ; apply mul_le_inf | case insert
ι : Type u_1
R : Type u_2
inst✝ : CommRing R
I : Ideal R
J : ι → Ideal R
i : ι
s : Finset ι
a✝ : i ∉ s
hf : ∀ j ∈ insert i s, I + J j = 1
K : Ideal R := ⨅ j ∈ s, J j
hs : (∀ j ∈ s, I + J j = 1) → I + K = 1
⊢ 1 ≤ I + K ⊓ J i | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case insert
ι : Type u_1
R : Type u_2
inst✝ : CommRing R
I : Ideal R
J : ι → Ideal R
i : ι
s : Finset ι
a✝ : i ∉ s
hf : ∀ j ∈ insert i s, I + J j = 1
K : Ideal R := ⨅ j ∈ s, J j
hs : (∀ j ∈ s, I + J j = 1) → I + K = 1
⊢ 1 ≤ I + K ⊓ J i
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C08_Groups_and_Rings/solutions/Solutions_S02_Rings.lean | isCoprime_Inf | [36, 1] | [50, 81] | rw [hf i (Finset.mem_insert_self i s), mul_one] | ι : Type u_1
R : Type u_2
inst✝ : CommRing R
I : Ideal R
J : ι → Ideal R
i : ι
s : Finset ι
a✝ : i ∉ s
hf : ∀ j ∈ insert i s, I + J j = 1
K : Ideal R := ⨅ j ∈ s, J j
hs : (∀ j ∈ s, I + J j = 1) → I + K = 1
⊢ I + K = I + K * (I + J i) | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
ι : Type u_1
R : Type u_2
inst✝ : CommRing R
I : Ideal R
J : ι → Ideal R
i : ι
s : Finset ι
a✝ : i ∉ s
hf : ∀ j ∈ insert i s, I + J j = 1
K : Ideal R := ⨅ j ∈ s, J j
hs : (∀ j ∈ s, I + J j = 1) → I + K = 1
⊢ I + K = I + K * (I + J i)
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C08_Groups_and_Rings/solutions/Solutions_S02_Rings.lean | isCoprime_Inf | [36, 1] | [50, 81] | ring | ι : Type u_1
R : Type u_2
inst✝ : CommRing R
I : Ideal R
J : ι → Ideal R
i : ι
s : Finset ι
a✝ : i ∉ s
hf : ∀ j ∈ insert i s, I + J j = 1
K : Ideal R := ⨅ j ∈ s, J j
hs : (∀ j ∈ s, I + J j = 1) → I + K = 1
⊢ I + K * (I + J i) = (1 + K) * I + K * J i | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
ι : Type u_1
R : Type u_2
inst✝ : CommRing R
I : Ideal R
J : ι → Ideal R
i : ι
s : Finset ι
a✝ : i ∉ s
hf : ∀ j ∈ insert i s, I + J j = 1
K : Ideal R := ⨅ j ∈ s, J j
hs : (∀ j ∈ s, I + J j = 1) → I + K = 1
⊢ I + K * (I + J i) = (1 + K) * I + K * J i
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C08_Groups_and_Rings/solutions/Solutions_S02_Rings.lean | isCoprime_Inf | [36, 1] | [50, 81] | gcongr | ι : Type u_1
R : Type u_2
inst✝ : CommRing R
I : Ideal R
J : ι → Ideal R
i : ι
s : Finset ι
a✝ : i ∉ s
hf : ∀ j ∈ insert i s, I + J j = 1
K : Ideal R := ⨅ j ∈ s, J j
hs : (∀ j ∈ s, I + J j = 1) → I + K = 1
⊢ (1 + K) * I + K * J i ≤ I + K ⊓ J i | case h₁
ι : Type u_1
R : Type u_2
inst✝ : CommRing R
I : Ideal R
J : ι → Ideal R
i : ι
s : Finset ι
a✝ : i ∉ s
hf : ∀ j ∈ insert i s, I + J j = 1
K : Ideal R := ⨅ j ∈ s, J j
hs : (∀ j ∈ s, I + J j = 1) → I + K = 1
⊢ (1 + K) * I ≤ I
case h₂
ι : Type u_1
R : Type u_2
inst✝ : CommRing R
I : Ideal R
J : ι → Ideal R
i : ι
s : Finset ι
a✝ : i ∉ s
hf : ∀ j ∈ insert i s, I + J j = 1
K : Ideal R := ⨅ j ∈ s, J j
hs : (∀ j ∈ s, I + J j = 1) → I + K = 1
⊢ K * J i ≤ K ⊓ J i | Please generate a tactic in lean4 to solve the state.
STATE:
ι : Type u_1
R : Type u_2
inst✝ : CommRing R
I : Ideal R
J : ι → Ideal R
i : ι
s : Finset ι
a✝ : i ∉ s
hf : ∀ j ∈ insert i s, I + J j = 1
K : Ideal R := ⨅ j ∈ s, J j
hs : (∀ j ∈ s, I + J j = 1) → I + K = 1
⊢ (1 + K) * I + K * J i ≤ I + K ⊓ J i
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C08_Groups_and_Rings/solutions/Solutions_S02_Rings.lean | isCoprime_Inf | [36, 1] | [50, 81] | apply mul_le_left | case h₁
ι : Type u_1
R : Type u_2
inst✝ : CommRing R
I : Ideal R
J : ι → Ideal R
i : ι
s : Finset ι
a✝ : i ∉ s
hf : ∀ j ∈ insert i s, I + J j = 1
K : Ideal R := ⨅ j ∈ s, J j
hs : (∀ j ∈ s, I + J j = 1) → I + K = 1
⊢ (1 + K) * I ≤ I
case h₂
ι : Type u_1
R : Type u_2
inst✝ : CommRing R
I : Ideal R
J : ι → Ideal R
i : ι
s : Finset ι
a✝ : i ∉ s
hf : ∀ j ∈ insert i s, I + J j = 1
K : Ideal R := ⨅ j ∈ s, J j
hs : (∀ j ∈ s, I + J j = 1) → I + K = 1
⊢ K * J i ≤ K ⊓ J i | case h₂
ι : Type u_1
R : Type u_2
inst✝ : CommRing R
I : Ideal R
J : ι → Ideal R
i : ι
s : Finset ι
a✝ : i ∉ s
hf : ∀ j ∈ insert i s, I + J j = 1
K : Ideal R := ⨅ j ∈ s, J j
hs : (∀ j ∈ s, I + J j = 1) → I + K = 1
⊢ K * J i ≤ K ⊓ J i | Please generate a tactic in lean4 to solve the state.
STATE:
case h₁
ι : Type u_1
R : Type u_2
inst✝ : CommRing R
I : Ideal R
J : ι → Ideal R
i : ι
s : Finset ι
a✝ : i ∉ s
hf : ∀ j ∈ insert i s, I + J j = 1
K : Ideal R := ⨅ j ∈ s, J j
hs : (∀ j ∈ s, I + J j = 1) → I + K = 1
⊢ (1 + K) * I ≤ I
case h₂
ι : Type u_1
R : Type u_2
inst✝ : CommRing R
I : Ideal R
J : ι → Ideal R
i : ι
s : Finset ι
a✝ : i ∉ s
hf : ∀ j ∈ insert i s, I + J j = 1
K : Ideal R := ⨅ j ∈ s, J j
hs : (∀ j ∈ s, I + J j = 1) → I + K = 1
⊢ K * J i ≤ K ⊓ J i
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C08_Groups_and_Rings/solutions/Solutions_S02_Rings.lean | isCoprime_Inf | [36, 1] | [50, 81] | apply mul_le_inf | case h₂
ι : Type u_1
R : Type u_2
inst✝ : CommRing R
I : Ideal R
J : ι → Ideal R
i : ι
s : Finset ι
a✝ : i ∉ s
hf : ∀ j ∈ insert i s, I + J j = 1
K : Ideal R := ⨅ j ∈ s, J j
hs : (∀ j ∈ s, I + J j = 1) → I + K = 1
⊢ K * J i ≤ K ⊓ J i | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case h₂
ι : Type u_1
R : Type u_2
inst✝ : CommRing R
I : Ideal R
J : ι → Ideal R
i : ι
s : Finset ι
a✝ : i ∉ s
hf : ∀ j ∈ insert i s, I + J j = 1
K : Ideal R := ⨅ j ∈ s, J j
hs : (∀ j ∈ s, I + J j = 1) → I + K = 1
⊢ K * J i ≤ K ⊓ J i
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C08_Groups_and_Rings/solutions/Solutions_S02_Rings.lean | chineseMap_surj | [53, 1] | [75, 30] | intro g | ι : Type u_1
R : Type u_2
inst✝¹ : CommRing R
inst✝ : Fintype ι
I : ι → Ideal R
hI : ∀ (i j : ι), i ≠ j → IsCoprime (I i) (I j)
⊢ Surjective ↑(chineseMap I) | ι : Type u_1
R : Type u_2
inst✝¹ : CommRing R
inst✝ : Fintype ι
I : ι → Ideal R
hI : ∀ (i j : ι), i ≠ j → IsCoprime (I i) (I j)
g : Π (i : ι), R ⧸ I i
⊢ ∃ a, ↑(chineseMap I) a = g | Please generate a tactic in lean4 to solve the state.
STATE:
ι : Type u_1
R : Type u_2
inst✝¹ : CommRing R
inst✝ : Fintype ι
I : ι → Ideal R
hI : ∀ (i j : ι), i ≠ j → IsCoprime (I i) (I j)
⊢ Surjective ↑(chineseMap I)
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C08_Groups_and_Rings/solutions/Solutions_S02_Rings.lean | chineseMap_surj | [53, 1] | [75, 30] | choose f hf using fun i ↦ Ideal.Quotient.mk_surjective (g i) | ι : Type u_1
R : Type u_2
inst✝¹ : CommRing R
inst✝ : Fintype ι
I : ι → Ideal R
hI : ∀ (i j : ι), i ≠ j → IsCoprime (I i) (I j)
g : Π (i : ι), R ⧸ I i
⊢ ∃ a, ↑(chineseMap I) a = g | ι : Type u_1
R : Type u_2
inst✝¹ : CommRing R
inst✝ : Fintype ι
I : ι → Ideal R
hI : ∀ (i j : ι), i ≠ j → IsCoprime (I i) (I j)
g : Π (i : ι), R ⧸ I i
f : ι → R
hf : ∀ (i : ι), ↑(mk (I i)) (f i) = g i
⊢ ∃ a, ↑(chineseMap I) a = g | Please generate a tactic in lean4 to solve the state.
STATE:
ι : Type u_1
R : Type u_2
inst✝¹ : CommRing R
inst✝ : Fintype ι
I : ι → Ideal R
hI : ∀ (i j : ι), i ≠ j → IsCoprime (I i) (I j)
g : Π (i : ι), R ⧸ I i
⊢ ∃ a, ↑(chineseMap I) a = g
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C08_Groups_and_Rings/solutions/Solutions_S02_Rings.lean | chineseMap_surj | [53, 1] | [75, 30] | choose e he using key | ι : Type u_1
R : Type u_2
inst✝¹ : CommRing R
inst✝ : Fintype ι
I : ι → Ideal R
hI : ∀ (i j : ι), i ≠ j → IsCoprime (I i) (I j)
g : Π (i : ι), R ⧸ I i
f : ι → R
hf : ∀ (i : ι), ↑(mk (I i)) (f i) = g i
key : ∀ (i : ι), ∃ e, ↑(mk (I i)) e = 1 ∧ ∀ (j : ι), j ≠ i → ↑(mk (I j)) e = 0
⊢ ∃ a, ↑(chineseMap I) a = g | ι : Type u_1
R : Type u_2
inst✝¹ : CommRing R
inst✝ : Fintype ι
I : ι → Ideal R
hI : ∀ (i j : ι), i ≠ j → IsCoprime (I i) (I j)
g : Π (i : ι), R ⧸ I i
f : ι → R
hf : ∀ (i : ι), ↑(mk (I i)) (f i) = g i
e : ι → R
he : ∀ (i : ι), ↑(mk (I i)) (e i) = 1 ∧ ∀ (j : ι), j ≠ i → ↑(mk (I j)) (e i) = 0
⊢ ∃ a, ↑(chineseMap I) a = g | Please generate a tactic in lean4 to solve the state.
STATE:
ι : Type u_1
R : Type u_2
inst✝¹ : CommRing R
inst✝ : Fintype ι
I : ι → Ideal R
hI : ∀ (i j : ι), i ≠ j → IsCoprime (I i) (I j)
g : Π (i : ι), R ⧸ I i
f : ι → R
hf : ∀ (i : ι), ↑(mk (I i)) (f i) = g i
key : ∀ (i : ι), ∃ e, ↑(mk (I i)) e = 1 ∧ ∀ (j : ι), j ≠ i → ↑(mk (I j)) e = 0
⊢ ∃ a, ↑(chineseMap I) a = g
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C08_Groups_and_Rings/solutions/Solutions_S02_Rings.lean | chineseMap_surj | [53, 1] | [75, 30] | use mk _ (∑ i, f i*e i) | ι : Type u_1
R : Type u_2
inst✝¹ : CommRing R
inst✝ : Fintype ι
I : ι → Ideal R
hI : ∀ (i j : ι), i ≠ j → IsCoprime (I i) (I j)
g : Π (i : ι), R ⧸ I i
f : ι → R
hf : ∀ (i : ι), ↑(mk (I i)) (f i) = g i
e : ι → R
he : ∀ (i : ι), ↑(mk (I i)) (e i) = 1 ∧ ∀ (j : ι), j ≠ i → ↑(mk (I j)) (e i) = 0
⊢ ∃ a, ↑(chineseMap I) a = g | case h
ι : Type u_1
R : Type u_2
inst✝¹ : CommRing R
inst✝ : Fintype ι
I : ι → Ideal R
hI : ∀ (i j : ι), i ≠ j → IsCoprime (I i) (I j)
g : Π (i : ι), R ⧸ I i
f : ι → R
hf : ∀ (i : ι), ↑(mk (I i)) (f i) = g i
e : ι → R
he : ∀ (i : ι), ↑(mk (I i)) (e i) = 1 ∧ ∀ (j : ι), j ≠ i → ↑(mk (I j)) (e i) = 0
⊢ ↑(chineseMap I) (↑(mk (⨅ i, I i)) (∑ i : ι, f i * e i)) = g | Please generate a tactic in lean4 to solve the state.
STATE:
ι : Type u_1
R : Type u_2
inst✝¹ : CommRing R
inst✝ : Fintype ι
I : ι → Ideal R
hI : ∀ (i j : ι), i ≠ j → IsCoprime (I i) (I j)
g : Π (i : ι), R ⧸ I i
f : ι → R
hf : ∀ (i : ι), ↑(mk (I i)) (f i) = g i
e : ι → R
he : ∀ (i : ι), ↑(mk (I i)) (e i) = 1 ∧ ∀ (j : ι), j ≠ i → ↑(mk (I j)) (e i) = 0
⊢ ∃ a, ↑(chineseMap I) a = g
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C08_Groups_and_Rings/solutions/Solutions_S02_Rings.lean | chineseMap_surj | [53, 1] | [75, 30] | ext i | case h
ι : Type u_1
R : Type u_2
inst✝¹ : CommRing R
inst✝ : Fintype ι
I : ι → Ideal R
hI : ∀ (i j : ι), i ≠ j → IsCoprime (I i) (I j)
g : Π (i : ι), R ⧸ I i
f : ι → R
hf : ∀ (i : ι), ↑(mk (I i)) (f i) = g i
e : ι → R
he : ∀ (i : ι), ↑(mk (I i)) (e i) = 1 ∧ ∀ (j : ι), j ≠ i → ↑(mk (I j)) (e i) = 0
⊢ ↑(chineseMap I) (↑(mk (⨅ i, I i)) (∑ i : ι, f i * e i)) = g | case h.h
ι : Type u_1
R : Type u_2
inst✝¹ : CommRing R
inst✝ : Fintype ι
I : ι → Ideal R
hI : ∀ (i j : ι), i ≠ j → IsCoprime (I i) (I j)
g : Π (i : ι), R ⧸ I i
f : ι → R
hf : ∀ (i : ι), ↑(mk (I i)) (f i) = g i
e : ι → R
he : ∀ (i : ι), ↑(mk (I i)) (e i) = 1 ∧ ∀ (j : ι), j ≠ i → ↑(mk (I j)) (e i) = 0
i : ι
⊢ ↑(chineseMap I) (↑(mk (⨅ i, I i)) (∑ i : ι, f i * e i)) i = g i | Please generate a tactic in lean4 to solve the state.
STATE:
case h
ι : Type u_1
R : Type u_2
inst✝¹ : CommRing R
inst✝ : Fintype ι
I : ι → Ideal R
hI : ∀ (i j : ι), i ≠ j → IsCoprime (I i) (I j)
g : Π (i : ι), R ⧸ I i
f : ι → R
hf : ∀ (i : ι), ↑(mk (I i)) (f i) = g i
e : ι → R
he : ∀ (i : ι), ↑(mk (I i)) (e i) = 1 ∧ ∀ (j : ι), j ≠ i → ↑(mk (I j)) (e i) = 0
⊢ ↑(chineseMap I) (↑(mk (⨅ i, I i)) (∑ i : ι, f i * e i)) = g
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C08_Groups_and_Rings/solutions/Solutions_S02_Rings.lean | chineseMap_surj | [53, 1] | [75, 30] | rw [chineseMap_mk', map_sum, Fintype.sum_eq_single i] | case h.h
ι : Type u_1
R : Type u_2
inst✝¹ : CommRing R
inst✝ : Fintype ι
I : ι → Ideal R
hI : ∀ (i j : ι), i ≠ j → IsCoprime (I i) (I j)
g : Π (i : ι), R ⧸ I i
f : ι → R
hf : ∀ (i : ι), ↑(mk (I i)) (f i) = g i
e : ι → R
he : ∀ (i : ι), ↑(mk (I i)) (e i) = 1 ∧ ∀ (j : ι), j ≠ i → ↑(mk (I j)) (e i) = 0
i : ι
⊢ ↑(chineseMap I) (↑(mk (⨅ i, I i)) (∑ i : ι, f i * e i)) i = g i | case h.h
ι : Type u_1
R : Type u_2
inst✝¹ : CommRing R
inst✝ : Fintype ι
I : ι → Ideal R
hI : ∀ (i j : ι), i ≠ j → IsCoprime (I i) (I j)
g : Π (i : ι), R ⧸ I i
f : ι → R
hf : ∀ (i : ι), ↑(mk (I i)) (f i) = g i
e : ι → R
he : ∀ (i : ι), ↑(mk (I i)) (e i) = 1 ∧ ∀ (j : ι), j ≠ i → ↑(mk (I j)) (e i) = 0
i : ι
⊢ ↑(mk (I i)) (f i * e i) = g i
case h.h
ι : Type u_1
R : Type u_2
inst✝¹ : CommRing R
inst✝ : Fintype ι
I : ι → Ideal R
hI : ∀ (i j : ι), i ≠ j → IsCoprime (I i) (I j)
g : Π (i : ι), R ⧸ I i
f : ι → R
hf : ∀ (i : ι), ↑(mk (I i)) (f i) = g i
e : ι → R
he : ∀ (i : ι), ↑(mk (I i)) (e i) = 1 ∧ ∀ (j : ι), j ≠ i → ↑(mk (I j)) (e i) = 0
i : ι
⊢ ∀ (x : ι), x ≠ i → ↑(mk (I i)) (f x * e x) = 0 | Please generate a tactic in lean4 to solve the state.
STATE:
case h.h
ι : Type u_1
R : Type u_2
inst✝¹ : CommRing R
inst✝ : Fintype ι
I : ι → Ideal R
hI : ∀ (i j : ι), i ≠ j → IsCoprime (I i) (I j)
g : Π (i : ι), R ⧸ I i
f : ι → R
hf : ∀ (i : ι), ↑(mk (I i)) (f i) = g i
e : ι → R
he : ∀ (i : ι), ↑(mk (I i)) (e i) = 1 ∧ ∀ (j : ι), j ≠ i → ↑(mk (I j)) (e i) = 0
i : ι
⊢ ↑(chineseMap I) (↑(mk (⨅ i, I i)) (∑ i : ι, f i * e i)) i = g i
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C08_Groups_and_Rings/solutions/Solutions_S02_Rings.lean | chineseMap_surj | [53, 1] | [75, 30] | intro i | ι : Type u_1
R : Type u_2
inst✝¹ : CommRing R
inst✝ : Fintype ι
I : ι → Ideal R
hI : ∀ (i j : ι), i ≠ j → IsCoprime (I i) (I j)
g : Π (i : ι), R ⧸ I i
f : ι → R
hf : ∀ (i : ι), ↑(mk (I i)) (f i) = g i
⊢ ∀ (i : ι), ∃ e, ↑(mk (I i)) e = 1 ∧ ∀ (j : ι), j ≠ i → ↑(mk (I j)) e = 0 | ι : Type u_1
R : Type u_2
inst✝¹ : CommRing R
inst✝ : Fintype ι
I : ι → Ideal R
hI : ∀ (i j : ι), i ≠ j → IsCoprime (I i) (I j)
g : Π (i : ι), R ⧸ I i
f : ι → R
hf : ∀ (i : ι), ↑(mk (I i)) (f i) = g i
i : ι
⊢ ∃ e, ↑(mk (I i)) e = 1 ∧ ∀ (j : ι), j ≠ i → ↑(mk (I j)) e = 0 | Please generate a tactic in lean4 to solve the state.
STATE:
ι : Type u_1
R : Type u_2
inst✝¹ : CommRing R
inst✝ : Fintype ι
I : ι → Ideal R
hI : ∀ (i j : ι), i ≠ j → IsCoprime (I i) (I j)
g : Π (i : ι), R ⧸ I i
f : ι → R
hf : ∀ (i : ι), ↑(mk (I i)) (f i) = g i
⊢ ∀ (i : ι), ∃ e, ↑(mk (I i)) e = 1 ∧ ∀ (j : ι), j ≠ i → ↑(mk (I j)) e = 0
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C08_Groups_and_Rings/solutions/Solutions_S02_Rings.lean | chineseMap_surj | [53, 1] | [75, 30] | have hI' : ∀ j ∈ ({i} : Finset ι)ᶜ, IsCoprime (I i) (I j) := by
intros j hj
exact hI _ _ (by simpa [ne_comm, isCoprime_iff_add] using hj) | ι : Type u_1
R : Type u_2
inst✝¹ : CommRing R
inst✝ : Fintype ι
I : ι → Ideal R
hI : ∀ (i j : ι), i ≠ j → IsCoprime (I i) (I j)
g : Π (i : ι), R ⧸ I i
f : ι → R
hf : ∀ (i : ι), ↑(mk (I i)) (f i) = g i
i : ι
⊢ ∃ e, ↑(mk (I i)) e = 1 ∧ ∀ (j : ι), j ≠ i → ↑(mk (I j)) e = 0 | ι : Type u_1
R : Type u_2
inst✝¹ : CommRing R
inst✝ : Fintype ι
I : ι → Ideal R
hI : ∀ (i j : ι), i ≠ j → IsCoprime (I i) (I j)
g : Π (i : ι), R ⧸ I i
f : ι → R
hf : ∀ (i : ι), ↑(mk (I i)) (f i) = g i
i : ι
hI' : ∀ j ∈ {i}ᶜ, IsCoprime (I i) (I j)
⊢ ∃ e, ↑(mk (I i)) e = 1 ∧ ∀ (j : ι), j ≠ i → ↑(mk (I j)) e = 0 | Please generate a tactic in lean4 to solve the state.
STATE:
ι : Type u_1
R : Type u_2
inst✝¹ : CommRing R
inst✝ : Fintype ι
I : ι → Ideal R
hI : ∀ (i j : ι), i ≠ j → IsCoprime (I i) (I j)
g : Π (i : ι), R ⧸ I i
f : ι → R
hf : ∀ (i : ι), ↑(mk (I i)) (f i) = g i
i : ι
⊢ ∃ e, ↑(mk (I i)) e = 1 ∧ ∀ (j : ι), j ≠ i → ↑(mk (I j)) e = 0
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C08_Groups_and_Rings/solutions/Solutions_S02_Rings.lean | chineseMap_surj | [53, 1] | [75, 30] | rcases isCoprime_iff_exists.mp (isCoprime_Inf hI') with ⟨u, hu, e, he, hue⟩ | ι : Type u_1
R : Type u_2
inst✝¹ : CommRing R
inst✝ : Fintype ι
I : ι → Ideal R
hI : ∀ (i j : ι), i ≠ j → IsCoprime (I i) (I j)
g : Π (i : ι), R ⧸ I i
f : ι → R
hf : ∀ (i : ι), ↑(mk (I i)) (f i) = g i
i : ι
hI' : ∀ j ∈ {i}ᶜ, IsCoprime (I i) (I j)
⊢ ∃ e, ↑(mk (I i)) e = 1 ∧ ∀ (j : ι), j ≠ i → ↑(mk (I j)) e = 0 | case intro.intro.intro.intro
ι : Type u_1
R : Type u_2
inst✝¹ : CommRing R
inst✝ : Fintype ι
I : ι → Ideal R
hI : ∀ (i j : ι), i ≠ j → IsCoprime (I i) (I j)
g : Π (i : ι), R ⧸ I i
f : ι → R
hf : ∀ (i : ι), ↑(mk (I i)) (f i) = g i
i : ι
hI' : ∀ j ∈ {i}ᶜ, IsCoprime (I i) (I j)
u : R
hu : u ∈ I i
e : R
he : e ∈ ⨅ j ∈ {i}ᶜ, I j
hue : u + e = 1
⊢ ∃ e, ↑(mk (I i)) e = 1 ∧ ∀ (j : ι), j ≠ i → ↑(mk (I j)) e = 0 | Please generate a tactic in lean4 to solve the state.
STATE:
ι : Type u_1
R : Type u_2
inst✝¹ : CommRing R
inst✝ : Fintype ι
I : ι → Ideal R
hI : ∀ (i j : ι), i ≠ j → IsCoprime (I i) (I j)
g : Π (i : ι), R ⧸ I i
f : ι → R
hf : ∀ (i : ι), ↑(mk (I i)) (f i) = g i
i : ι
hI' : ∀ j ∈ {i}ᶜ, IsCoprime (I i) (I j)
⊢ ∃ e, ↑(mk (I i)) e = 1 ∧ ∀ (j : ι), j ≠ i → ↑(mk (I j)) e = 0
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C08_Groups_and_Rings/solutions/Solutions_S02_Rings.lean | chineseMap_surj | [53, 1] | [75, 30] | replace he : ∀ j, j ≠ i → e ∈ I j := by simpa using he | case intro.intro.intro.intro
ι : Type u_1
R : Type u_2
inst✝¹ : CommRing R
inst✝ : Fintype ι
I : ι → Ideal R
hI : ∀ (i j : ι), i ≠ j → IsCoprime (I i) (I j)
g : Π (i : ι), R ⧸ I i
f : ι → R
hf : ∀ (i : ι), ↑(mk (I i)) (f i) = g i
i : ι
hI' : ∀ j ∈ {i}ᶜ, IsCoprime (I i) (I j)
u : R
hu : u ∈ I i
e : R
he : e ∈ ⨅ j ∈ {i}ᶜ, I j
hue : u + e = 1
⊢ ∃ e, ↑(mk (I i)) e = 1 ∧ ∀ (j : ι), j ≠ i → ↑(mk (I j)) e = 0 | case intro.intro.intro.intro
ι : Type u_1
R : Type u_2
inst✝¹ : CommRing R
inst✝ : Fintype ι
I : ι → Ideal R
hI : ∀ (i j : ι), i ≠ j → IsCoprime (I i) (I j)
g : Π (i : ι), R ⧸ I i
f : ι → R
hf : ∀ (i : ι), ↑(mk (I i)) (f i) = g i
i : ι
hI' : ∀ j ∈ {i}ᶜ, IsCoprime (I i) (I j)
u : R
hu : u ∈ I i
e : R
hue : u + e = 1
he : ∀ (j : ι), j ≠ i → e ∈ I j
⊢ ∃ e, ↑(mk (I i)) e = 1 ∧ ∀ (j : ι), j ≠ i → ↑(mk (I j)) e = 0 | Please generate a tactic in lean4 to solve the state.
STATE:
case intro.intro.intro.intro
ι : Type u_1
R : Type u_2
inst✝¹ : CommRing R
inst✝ : Fintype ι
I : ι → Ideal R
hI : ∀ (i j : ι), i ≠ j → IsCoprime (I i) (I j)
g : Π (i : ι), R ⧸ I i
f : ι → R
hf : ∀ (i : ι), ↑(mk (I i)) (f i) = g i
i : ι
hI' : ∀ j ∈ {i}ᶜ, IsCoprime (I i) (I j)
u : R
hu : u ∈ I i
e : R
he : e ∈ ⨅ j ∈ {i}ᶜ, I j
hue : u + e = 1
⊢ ∃ e, ↑(mk (I i)) e = 1 ∧ ∀ (j : ι), j ≠ i → ↑(mk (I j)) e = 0
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C08_Groups_and_Rings/solutions/Solutions_S02_Rings.lean | chineseMap_surj | [53, 1] | [75, 30] | refine ⟨e, ?_, ?_⟩ | case intro.intro.intro.intro
ι : Type u_1
R : Type u_2
inst✝¹ : CommRing R
inst✝ : Fintype ι
I : ι → Ideal R
hI : ∀ (i j : ι), i ≠ j → IsCoprime (I i) (I j)
g : Π (i : ι), R ⧸ I i
f : ι → R
hf : ∀ (i : ι), ↑(mk (I i)) (f i) = g i
i : ι
hI' : ∀ j ∈ {i}ᶜ, IsCoprime (I i) (I j)
u : R
hu : u ∈ I i
e : R
hue : u + e = 1
he : ∀ (j : ι), j ≠ i → e ∈ I j
⊢ ∃ e, ↑(mk (I i)) e = 1 ∧ ∀ (j : ι), j ≠ i → ↑(mk (I j)) e = 0 | case intro.intro.intro.intro.refine_1
ι : Type u_1
R : Type u_2
inst✝¹ : CommRing R
inst✝ : Fintype ι
I : ι → Ideal R
hI : ∀ (i j : ι), i ≠ j → IsCoprime (I i) (I j)
g : Π (i : ι), R ⧸ I i
f : ι → R
hf : ∀ (i : ι), ↑(mk (I i)) (f i) = g i
i : ι
hI' : ∀ j ∈ {i}ᶜ, IsCoprime (I i) (I j)
u : R
hu : u ∈ I i
e : R
hue : u + e = 1
he : ∀ (j : ι), j ≠ i → e ∈ I j
⊢ ↑(mk (I i)) e = 1
case intro.intro.intro.intro.refine_2
ι : Type u_1
R : Type u_2
inst✝¹ : CommRing R
inst✝ : Fintype ι
I : ι → Ideal R
hI : ∀ (i j : ι), i ≠ j → IsCoprime (I i) (I j)
g : Π (i : ι), R ⧸ I i
f : ι → R
hf : ∀ (i : ι), ↑(mk (I i)) (f i) = g i
i : ι
hI' : ∀ j ∈ {i}ᶜ, IsCoprime (I i) (I j)
u : R
hu : u ∈ I i
e : R
hue : u + e = 1
he : ∀ (j : ι), j ≠ i → e ∈ I j
⊢ ∀ (j : ι), j ≠ i → ↑(mk (I j)) e = 0 | Please generate a tactic in lean4 to solve the state.
STATE:
case intro.intro.intro.intro
ι : Type u_1
R : Type u_2
inst✝¹ : CommRing R
inst✝ : Fintype ι
I : ι → Ideal R
hI : ∀ (i j : ι), i ≠ j → IsCoprime (I i) (I j)
g : Π (i : ι), R ⧸ I i
f : ι → R
hf : ∀ (i : ι), ↑(mk (I i)) (f i) = g i
i : ι
hI' : ∀ j ∈ {i}ᶜ, IsCoprime (I i) (I j)
u : R
hu : u ∈ I i
e : R
hue : u + e = 1
he : ∀ (j : ι), j ≠ i → e ∈ I j
⊢ ∃ e, ↑(mk (I i)) e = 1 ∧ ∀ (j : ι), j ≠ i → ↑(mk (I j)) e = 0
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C08_Groups_and_Rings/solutions/Solutions_S02_Rings.lean | chineseMap_surj | [53, 1] | [75, 30] | intros j hj | ι : Type u_1
R : Type u_2
inst✝¹ : CommRing R
inst✝ : Fintype ι
I : ι → Ideal R
hI : ∀ (i j : ι), i ≠ j → IsCoprime (I i) (I j)
g : Π (i : ι), R ⧸ I i
f : ι → R
hf : ∀ (i : ι), ↑(mk (I i)) (f i) = g i
i : ι
⊢ ∀ j ∈ {i}ᶜ, IsCoprime (I i) (I j) | ι : Type u_1
R : Type u_2
inst✝¹ : CommRing R
inst✝ : Fintype ι
I : ι → Ideal R
hI : ∀ (i j : ι), i ≠ j → IsCoprime (I i) (I j)
g : Π (i : ι), R ⧸ I i
f : ι → R
hf : ∀ (i : ι), ↑(mk (I i)) (f i) = g i
i j : ι
hj : j ∈ {i}ᶜ
⊢ IsCoprime (I i) (I j) | Please generate a tactic in lean4 to solve the state.
STATE:
ι : Type u_1
R : Type u_2
inst✝¹ : CommRing R
inst✝ : Fintype ι
I : ι → Ideal R
hI : ∀ (i j : ι), i ≠ j → IsCoprime (I i) (I j)
g : Π (i : ι), R ⧸ I i
f : ι → R
hf : ∀ (i : ι), ↑(mk (I i)) (f i) = g i
i : ι
⊢ ∀ j ∈ {i}ᶜ, IsCoprime (I i) (I j)
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C08_Groups_and_Rings/solutions/Solutions_S02_Rings.lean | chineseMap_surj | [53, 1] | [75, 30] | exact hI _ _ (by simpa [ne_comm, isCoprime_iff_add] using hj) | ι : Type u_1
R : Type u_2
inst✝¹ : CommRing R
inst✝ : Fintype ι
I : ι → Ideal R
hI : ∀ (i j : ι), i ≠ j → IsCoprime (I i) (I j)
g : Π (i : ι), R ⧸ I i
f : ι → R
hf : ∀ (i : ι), ↑(mk (I i)) (f i) = g i
i j : ι
hj : j ∈ {i}ᶜ
⊢ IsCoprime (I i) (I j) | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
ι : Type u_1
R : Type u_2
inst✝¹ : CommRing R
inst✝ : Fintype ι
I : ι → Ideal R
hI : ∀ (i j : ι), i ≠ j → IsCoprime (I i) (I j)
g : Π (i : ι), R ⧸ I i
f : ι → R
hf : ∀ (i : ι), ↑(mk (I i)) (f i) = g i
i j : ι
hj : j ∈ {i}ᶜ
⊢ IsCoprime (I i) (I j)
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C08_Groups_and_Rings/solutions/Solutions_S02_Rings.lean | chineseMap_surj | [53, 1] | [75, 30] | simpa [ne_comm, isCoprime_iff_add] using hj | ι : Type u_1
R : Type u_2
inst✝¹ : CommRing R
inst✝ : Fintype ι
I : ι → Ideal R
hI : ∀ (i j : ι), i ≠ j → IsCoprime (I i) (I j)
g : Π (i : ι), R ⧸ I i
f : ι → R
hf : ∀ (i : ι), ↑(mk (I i)) (f i) = g i
i j : ι
hj : j ∈ {i}ᶜ
⊢ i ≠ j | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
ι : Type u_1
R : Type u_2
inst✝¹ : CommRing R
inst✝ : Fintype ι
I : ι → Ideal R
hI : ∀ (i j : ι), i ≠ j → IsCoprime (I i) (I j)
g : Π (i : ι), R ⧸ I i
f : ι → R
hf : ∀ (i : ι), ↑(mk (I i)) (f i) = g i
i j : ι
hj : j ∈ {i}ᶜ
⊢ i ≠ j
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C08_Groups_and_Rings/solutions/Solutions_S02_Rings.lean | chineseMap_surj | [53, 1] | [75, 30] | simpa using he | ι : Type u_1
R : Type u_2
inst✝¹ : CommRing R
inst✝ : Fintype ι
I : ι → Ideal R
hI : ∀ (i j : ι), i ≠ j → IsCoprime (I i) (I j)
g : Π (i : ι), R ⧸ I i
f : ι → R
hf : ∀ (i : ι), ↑(mk (I i)) (f i) = g i
i : ι
hI' : ∀ j ∈ {i}ᶜ, IsCoprime (I i) (I j)
u : R
hu : u ∈ I i
e : R
he : e ∈ ⨅ j ∈ {i}ᶜ, I j
hue : u + e = 1
⊢ ∀ (j : ι), j ≠ i → e ∈ I j | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
ι : Type u_1
R : Type u_2
inst✝¹ : CommRing R
inst✝ : Fintype ι
I : ι → Ideal R
hI : ∀ (i j : ι), i ≠ j → IsCoprime (I i) (I j)
g : Π (i : ι), R ⧸ I i
f : ι → R
hf : ∀ (i : ι), ↑(mk (I i)) (f i) = g i
i : ι
hI' : ∀ j ∈ {i}ᶜ, IsCoprime (I i) (I j)
u : R
hu : u ∈ I i
e : R
he : e ∈ ⨅ j ∈ {i}ᶜ, I j
hue : u + e = 1
⊢ ∀ (j : ι), j ≠ i → e ∈ I j
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C08_Groups_and_Rings/solutions/Solutions_S02_Rings.lean | chineseMap_surj | [53, 1] | [75, 30] | simp [eq_sub_of_add_eq' hue, map_sub, eq_zero_iff_mem.mpr hu] | case intro.intro.intro.intro.refine_1
ι : Type u_1
R : Type u_2
inst✝¹ : CommRing R
inst✝ : Fintype ι
I : ι → Ideal R
hI : ∀ (i j : ι), i ≠ j → IsCoprime (I i) (I j)
g : Π (i : ι), R ⧸ I i
f : ι → R
hf : ∀ (i : ι), ↑(mk (I i)) (f i) = g i
i : ι
hI' : ∀ j ∈ {i}ᶜ, IsCoprime (I i) (I j)
u : R
hu : u ∈ I i
e : R
hue : u + e = 1
he : ∀ (j : ι), j ≠ i → e ∈ I j
⊢ ↑(mk (I i)) e = 1 | case intro.intro.intro.intro.refine_1
ι : Type u_1
R : Type u_2
inst✝¹ : CommRing R
inst✝ : Fintype ι
I : ι → Ideal R
hI : ∀ (i j : ι), i ≠ j → IsCoprime (I i) (I j)
g : Π (i : ι), R ⧸ I i
f : ι → R
hf : ∀ (i : ι), ↑(mk (I i)) (f i) = g i
i : ι
hI' : ∀ j ∈ {i}ᶜ, IsCoprime (I i) (I j)
u : R
hu : u ∈ I i
e : R
hue : u + e = 1
he : ∀ (j : ι), j ≠ i → e ∈ I j
⊢ ↑(mk (I i)) 1 = 1 | Please generate a tactic in lean4 to solve the state.
STATE:
case intro.intro.intro.intro.refine_1
ι : Type u_1
R : Type u_2
inst✝¹ : CommRing R
inst✝ : Fintype ι
I : ι → Ideal R
hI : ∀ (i j : ι), i ≠ j → IsCoprime (I i) (I j)
g : Π (i : ι), R ⧸ I i
f : ι → R
hf : ∀ (i : ι), ↑(mk (I i)) (f i) = g i
i : ι
hI' : ∀ j ∈ {i}ᶜ, IsCoprime (I i) (I j)
u : R
hu : u ∈ I i
e : R
hue : u + e = 1
he : ∀ (j : ι), j ≠ i → e ∈ I j
⊢ ↑(mk (I i)) e = 1
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C08_Groups_and_Rings/solutions/Solutions_S02_Rings.lean | chineseMap_surj | [53, 1] | [75, 30] | rfl | case intro.intro.intro.intro.refine_1
ι : Type u_1
R : Type u_2
inst✝¹ : CommRing R
inst✝ : Fintype ι
I : ι → Ideal R
hI : ∀ (i j : ι), i ≠ j → IsCoprime (I i) (I j)
g : Π (i : ι), R ⧸ I i
f : ι → R
hf : ∀ (i : ι), ↑(mk (I i)) (f i) = g i
i : ι
hI' : ∀ j ∈ {i}ᶜ, IsCoprime (I i) (I j)
u : R
hu : u ∈ I i
e : R
hue : u + e = 1
he : ∀ (j : ι), j ≠ i → e ∈ I j
⊢ ↑(mk (I i)) 1 = 1 | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case intro.intro.intro.intro.refine_1
ι : Type u_1
R : Type u_2
inst✝¹ : CommRing R
inst✝ : Fintype ι
I : ι → Ideal R
hI : ∀ (i j : ι), i ≠ j → IsCoprime (I i) (I j)
g : Π (i : ι), R ⧸ I i
f : ι → R
hf : ∀ (i : ι), ↑(mk (I i)) (f i) = g i
i : ι
hI' : ∀ j ∈ {i}ᶜ, IsCoprime (I i) (I j)
u : R
hu : u ∈ I i
e : R
hue : u + e = 1
he : ∀ (j : ι), j ≠ i → e ∈ I j
⊢ ↑(mk (I i)) 1 = 1
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C08_Groups_and_Rings/solutions/Solutions_S02_Rings.lean | chineseMap_surj | [53, 1] | [75, 30] | exact fun j hj ↦ eq_zero_iff_mem.mpr (he j hj) | case intro.intro.intro.intro.refine_2
ι : Type u_1
R : Type u_2
inst✝¹ : CommRing R
inst✝ : Fintype ι
I : ι → Ideal R
hI : ∀ (i j : ι), i ≠ j → IsCoprime (I i) (I j)
g : Π (i : ι), R ⧸ I i
f : ι → R
hf : ∀ (i : ι), ↑(mk (I i)) (f i) = g i
i : ι
hI' : ∀ j ∈ {i}ᶜ, IsCoprime (I i) (I j)
u : R
hu : u ∈ I i
e : R
hue : u + e = 1
he : ∀ (j : ι), j ≠ i → e ∈ I j
⊢ ∀ (j : ι), j ≠ i → ↑(mk (I j)) e = 0 | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case intro.intro.intro.intro.refine_2
ι : Type u_1
R : Type u_2
inst✝¹ : CommRing R
inst✝ : Fintype ι
I : ι → Ideal R
hI : ∀ (i j : ι), i ≠ j → IsCoprime (I i) (I j)
g : Π (i : ι), R ⧸ I i
f : ι → R
hf : ∀ (i : ι), ↑(mk (I i)) (f i) = g i
i : ι
hI' : ∀ j ∈ {i}ᶜ, IsCoprime (I i) (I j)
u : R
hu : u ∈ I i
e : R
hue : u + e = 1
he : ∀ (j : ι), j ≠ i → e ∈ I j
⊢ ∀ (j : ι), j ≠ i → ↑(mk (I j)) e = 0
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C08_Groups_and_Rings/solutions/Solutions_S02_Rings.lean | chineseMap_surj | [53, 1] | [75, 30] | simp [(he i).1, hf] | case h.h
ι : Type u_1
R : Type u_2
inst✝¹ : CommRing R
inst✝ : Fintype ι
I : ι → Ideal R
hI : ∀ (i j : ι), i ≠ j → IsCoprime (I i) (I j)
g : Π (i : ι), R ⧸ I i
f : ι → R
hf : ∀ (i : ι), ↑(mk (I i)) (f i) = g i
e : ι → R
he : ∀ (i : ι), ↑(mk (I i)) (e i) = 1 ∧ ∀ (j : ι), j ≠ i → ↑(mk (I j)) (e i) = 0
i : ι
⊢ ↑(mk (I i)) (f i * e i) = g i | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case h.h
ι : Type u_1
R : Type u_2
inst✝¹ : CommRing R
inst✝ : Fintype ι
I : ι → Ideal R
hI : ∀ (i j : ι), i ≠ j → IsCoprime (I i) (I j)
g : Π (i : ι), R ⧸ I i
f : ι → R
hf : ∀ (i : ι), ↑(mk (I i)) (f i) = g i
e : ι → R
he : ∀ (i : ι), ↑(mk (I i)) (e i) = 1 ∧ ∀ (j : ι), j ≠ i → ↑(mk (I j)) (e i) = 0
i : ι
⊢ ↑(mk (I i)) (f i * e i) = g i
TACTIC:
|
https://github.com/fpvandoorn/LeanCourse23.git | 7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d | LeanCourse/MIL/C08_Groups_and_Rings/solutions/Solutions_S02_Rings.lean | chineseMap_surj | [53, 1] | [75, 30] | intros j hj | case h.h
ι : Type u_1
R : Type u_2
inst✝¹ : CommRing R
inst✝ : Fintype ι
I : ι → Ideal R
hI : ∀ (i j : ι), i ≠ j → IsCoprime (I i) (I j)
g : Π (i : ι), R ⧸ I i
f : ι → R
hf : ∀ (i : ι), ↑(mk (I i)) (f i) = g i
e : ι → R
he : ∀ (i : ι), ↑(mk (I i)) (e i) = 1 ∧ ∀ (j : ι), j ≠ i → ↑(mk (I j)) (e i) = 0
i : ι
⊢ ∀ (x : ι), x ≠ i → ↑(mk (I i)) (f x * e x) = 0 | case h.h
ι : Type u_1
R : Type u_2
inst✝¹ : CommRing R
inst✝ : Fintype ι
I : ι → Ideal R
hI : ∀ (i j : ι), i ≠ j → IsCoprime (I i) (I j)
g : Π (i : ι), R ⧸ I i
f : ι → R
hf : ∀ (i : ι), ↑(mk (I i)) (f i) = g i
e : ι → R
he : ∀ (i : ι), ↑(mk (I i)) (e i) = 1 ∧ ∀ (j : ι), j ≠ i → ↑(mk (I j)) (e i) = 0
i j : ι
hj : j ≠ i
⊢ ↑(mk (I i)) (f j * e j) = 0 | Please generate a tactic in lean4 to solve the state.
STATE:
case h.h
ι : Type u_1
R : Type u_2
inst✝¹ : CommRing R
inst✝ : Fintype ι
I : ι → Ideal R
hI : ∀ (i j : ι), i ≠ j → IsCoprime (I i) (I j)
g : Π (i : ι), R ⧸ I i
f : ι → R
hf : ∀ (i : ι), ↑(mk (I i)) (f i) = g i
e : ι → R
he : ∀ (i : ι), ↑(mk (I i)) (e i) = 1 ∧ ∀ (j : ι), j ≠ i → ↑(mk (I j)) (e i) = 0
i : ι
⊢ ∀ (x : ι), x ≠ i → ↑(mk (I i)) (f x * e x) = 0
TACTIC:
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.