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/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.good_is_linear
[64, 1]
[125, 24]
rcases h2.dvd_of_dvd_pow this with ⟨k, h3⟩
C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 p : β„• h1 : C < p h2 : p.Prime this : p ∣ f p ^ 2 ⊒ βˆƒ k ≀ f 1, f p = k * p
case intro C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 p : β„• h1 : C < p h2 : p.Prime this : p ∣ f p ^ 2 k : β„• h3 : f p = p * k ⊒ βˆƒ k ≀ f 1, f p = k * p
Please generate a tactic in lean4 to solve the state. STATE: C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 p : β„• h1 : C < p h2 : p.Prime this : p ∣ f p ^ 2 ⊒ βˆƒ k ≀ f 1, f p = k * p TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.good_is_linear
[64, 1]
[125, 24]
exact ⟨k, Nat.le_of_mul_le_mul_left (h3.ge.trans (h0 h1)) h2.pos, h3.trans (p.mul_comm k)⟩
case intro C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 p : β„• h1 : C < p h2 : p.Prime this : p ∣ f p ^ 2 k : β„• h3 : f p = p * k ⊒ βˆƒ k ≀ f 1, f p = k * p
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 p : β„• h1 : C < p h2 : p.Prime this : p ∣ f p ^ 2 k : β„• h3 : f p = p * k ⊒ βˆƒ k ≀ f 1, f p = k * p TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.good_is_linear
[64, 1]
[125, 24]
refine ⟨max C (max (f x) (max (x * f 1) (x ^ 2))), Ξ» p h2 h3 ↦ ?_⟩
C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x : β„• ⊒ βˆƒ B, βˆ€ (p : β„•), p.Prime β†’ B < p β†’ βˆƒ k, f p = k * p ∧ f x = k * x
C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime h3 : max C (max (f x) (max (x * f 1) (x ^ 2))) < p ⊒ βˆƒ k, f p = k * p ∧ f x = k * x
Please generate a tactic in lean4 to solve the state. STATE: C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x : β„• ⊒ βˆƒ B, βˆ€ (p : β„•), p.Prime β†’ B < p β†’ βˆƒ k, f p = k * p ∧ f x = k * x TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.good_is_linear
[64, 1]
[125, 24]
rw [max_lt_iff, max_lt_iff, max_lt_iff] at h3
C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime h3 : max C (max (f x) (max (x * f 1) (x ^ 2))) < p ⊒ βˆƒ k, f p = k * p ∧ f x = k * x
C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime h3 : C < p ∧ f x < p ∧ x * f 1 < p ∧ x ^ 2 < p ⊒ βˆƒ k, f p = k * p ∧ f x = k * x
Please generate a tactic in lean4 to solve the state. STATE: C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime h3 : max C (max (f x) (max (x * f 1) (x ^ 2))) < p ⊒ βˆƒ k, f p = k * p ∧ f x = k * x TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.good_is_linear
[64, 1]
[125, 24]
rcases h3 with ⟨hp1, hp2, hp3, hp4⟩
C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime h3 : C < p ∧ f x < p ∧ x * f 1 < p ∧ x ^ 2 < p ⊒ βˆƒ k, f p = k * p ∧ f x = k * x
case intro.intro.intro C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p ⊒ βˆƒ k, f p = k * p ∧ f x = k * x
Please generate a tactic in lean4 to solve the state. STATE: C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime h3 : C < p ∧ f x < p ∧ x * f 1 < p ∧ x ^ 2 < p ⊒ βˆƒ k, f p = k * p ∧ f x = k * x TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.good_is_linear
[64, 1]
[125, 24]
rcases h1 hp1 h2 with ⟨k, h3, h4⟩
case intro.intro.intro C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p ⊒ βˆƒ k, f p = k * p ∧ f x = k * x
case intro.intro.intro.intro.intro C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p ⊒ βˆƒ k, f p = k * p ∧ f x = k * x
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p ⊒ βˆƒ k, f p = k * p ∧ f x = k * x TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.good_is_linear
[64, 1]
[125, 24]
refine ⟨k, h4, ?_⟩
case intro.intro.intro.intro.intro C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p ⊒ βˆƒ k, f p = k * p ∧ f x = k * x
case intro.intro.intro.intro.intro C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p ⊒ f x = k * x
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro.intro C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p ⊒ βˆƒ k, f p = k * p ∧ f x = k * x TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.good_is_linear
[64, 1]
[125, 24]
rcases (f x).eq_zero_or_pos with h5 | h5
case intro.intro.intro.intro.intro C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p ⊒ f x = k * x
case intro.intro.intro.intro.intro.inl C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p h5 : f x = 0 ⊒ f x = k * x case intro.intro.intro.intro.intro.inr C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p h5 : f x > 0 ⊒ f x = k * x
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro.intro C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p ⊒ f x = k * x TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.good_is_linear
[64, 1]
[125, 24]
rcases k.eq_zero_or_pos with rfl | h6
case intro.intro.intro.intro.intro.inl C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p h5 : f x = 0 ⊒ f x = k * x
case intro.intro.intro.intro.intro.inl.inl C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p h5 : f x = 0 h3 : 0 ≀ f 1 h4 : f p = 0 * p ⊒ f x = 0 * x case intro.intro.intro.intro.intro.inl.inr C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p h5 : f x = 0 h6 : k > 0 ⊒ f x = k * x
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro.intro.inl C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p h5 : f x = 0 ⊒ f x = k * x TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.good_is_linear
[64, 1]
[125, 24]
rw [h5, zero_mul]
case intro.intro.intro.intro.intro.inl.inl C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p h5 : f x = 0 h3 : 0 ≀ f 1 h4 : f p = 0 * p ⊒ f x = 0 * x
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro.intro.inl.inl C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p h5 : f x = 0 h3 : 0 ≀ f 1 h4 : f p = 0 * p ⊒ f x = 0 * x TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.good_is_linear
[64, 1]
[125, 24]
suffices x ^ 2 = 0 by rw [h5, pow_eq_zero this, mul_zero]
case intro.intro.intro.intro.intro.inl.inr C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p h5 : f x = 0 h6 : k > 0 ⊒ f x = k * x
case intro.intro.intro.intro.intro.inl.inr C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p h5 : f x = 0 h6 : k > 0 ⊒ x ^ 2 = 0
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro.intro.inl.inr C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p h5 : f x = 0 h6 : k > 0 ⊒ f x = k * x TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.good_is_linear
[64, 1]
[125, 24]
specialize h x p (Nat.lt_add_left x hp1)
case intro.intro.intro.intro.intro.inl.inr C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p h5 : f x = 0 h6 : k > 0 ⊒ x ^ 2 = 0
case intro.intro.intro.intro.intro.inl.inr C : β„• f : β„• β†’ β„• h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p h5 : f x = 0 h6 : k > 0 h : x + f p ∣ x ^ 2 + p * f x ⊒ x ^ 2 = 0
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro.intro.inl.inr C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p h5 : f x = 0 h6 : k > 0 ⊒ x ^ 2 = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.good_is_linear
[64, 1]
[125, 24]
rw [h5, mul_zero, add_zero, h4] at h
case intro.intro.intro.intro.intro.inl.inr C : β„• f : β„• β†’ β„• h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p h5 : f x = 0 h6 : k > 0 h : x + f p ∣ x ^ 2 + p * f x ⊒ x ^ 2 = 0
case intro.intro.intro.intro.intro.inl.inr C : β„• f : β„• β†’ β„• h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p h5 : f x = 0 h6 : k > 0 h : x + k * p ∣ x ^ 2 ⊒ x ^ 2 = 0
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro.intro.inl.inr C : β„• f : β„• β†’ β„• h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p h5 : f x = 0 h6 : k > 0 h : x + f p ∣ x ^ 2 + p * f x ⊒ x ^ 2 = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.good_is_linear
[64, 1]
[125, 24]
exact Nat.eq_zero_of_dvd_of_lt h <| Nat.lt_add_left x (lt_mul_of_one_le_of_lt h6 hp4)
case intro.intro.intro.intro.intro.inl.inr C : β„• f : β„• β†’ β„• h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p h5 : f x = 0 h6 : k > 0 h : x + k * p ∣ x ^ 2 ⊒ x ^ 2 = 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro.intro.inl.inr C : β„• f : β„• β†’ β„• h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p h5 : f x = 0 h6 : k > 0 h : x + k * p ∣ x ^ 2 ⊒ x ^ 2 = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.good_is_linear
[64, 1]
[125, 24]
rw [h5, pow_eq_zero this, mul_zero]
C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p h5 : f x = 0 h6 : k > 0 this : x ^ 2 = 0 ⊒ f x = k * x
no goals
Please generate a tactic in lean4 to solve the state. STATE: C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p h5 : f x = 0 h6 : k > 0 this : x ^ 2 = 0 ⊒ f x = k * x TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.good_is_linear
[64, 1]
[125, 24]
specialize h p x (Nat.lt_add_right x hp1)
case intro.intro.intro.intro.intro.inr C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p h5 : f x > 0 ⊒ f x = k * x
case intro.intro.intro.intro.intro.inr C : β„• f : β„• β†’ β„• h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p h5 : f x > 0 h : p + f x ∣ p ^ 2 + x * f p ⊒ f x = k * x
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro.intro.inr C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p h5 : f x > 0 ⊒ f x = k * x TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.good_is_linear
[64, 1]
[125, 24]
have h6 : (p + f x).Coprime p := by rw [Nat.coprime_self_add_left, Nat.coprime_comm, h2.coprime_iff_not_dvd] exact Nat.not_dvd_of_pos_of_lt h5 hp2
case intro.intro.intro.intro.intro.inr C : β„• f : β„• β†’ β„• h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p h5 : f x > 0 h : p + f x ∣ p ^ 2 + x * f p ⊒ f x = k * x
case intro.intro.intro.intro.intro.inr C : β„• f : β„• β†’ β„• h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p h5 : f x > 0 h : p + f x ∣ p ^ 2 + x * f p h6 : (p + f x).Coprime p ⊒ f x = k * x
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro.intro.inr C : β„• f : β„• β†’ β„• h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p h5 : f x > 0 h : p + f x ∣ p ^ 2 + x * f p ⊒ f x = k * x TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.good_is_linear
[64, 1]
[125, 24]
rw [sq, h4, ← mul_assoc, ← add_mul, h6.dvd_mul_right] at h
case intro.intro.intro.intro.intro.inr C : β„• f : β„• β†’ β„• h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p h5 : f x > 0 h : p + f x ∣ p ^ 2 + x * f p h6 : (p + f x).Coprime p ⊒ f x = k * x
case intro.intro.intro.intro.intro.inr C : β„• f : β„• β†’ β„• h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p h5 : f x > 0 h : p + f x ∣ p + x * k h6 : (p + f x).Coprime p ⊒ f x = k * x
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro.intro.inr C : β„• f : β„• β†’ β„• h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p h5 : f x > 0 h : p + f x ∣ p ^ 2 + x * f p h6 : (p + f x).Coprime p ⊒ f x = k * x TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.good_is_linear
[64, 1]
[125, 24]
clear h6
case intro.intro.intro.intro.intro.inr C : β„• f : β„• β†’ β„• h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p h5 : f x > 0 h : p + f x ∣ p + x * k h6 : (p + f x).Coprime p ⊒ f x = k * x
case intro.intro.intro.intro.intro.inr C : β„• f : β„• β†’ β„• h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p h5 : f x > 0 h : p + f x ∣ p + x * k ⊒ f x = k * x
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro.intro.inr C : β„• f : β„• β†’ β„• h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p h5 : f x > 0 h : p + f x ∣ p + x * k h6 : (p + f x).Coprime p ⊒ f x = k * x TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.good_is_linear
[64, 1]
[125, 24]
rcases h with ⟨_ | _ | t, h⟩
case intro.intro.intro.intro.intro.inr C : β„• f : β„• β†’ β„• h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p h5 : f x > 0 h : p + f x ∣ p + x * k ⊒ f x = k * x
case intro.intro.intro.intro.intro.inr.intro.zero C : β„• f : β„• β†’ β„• h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p h5 : f x > 0 h : p + x * k = (p + f x) * 0 ⊒ f x = k * x case intro.intro.intro.intro.intro.inr.intro.succ.zero C : β„• f : β„• β†’ β„• h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p h5 : f x > 0 h : p + x * k = (p + f x) * (0 + 1) ⊒ f x = k * x case intro.intro.intro.intro.intro.inr.intro.succ.succ C : β„• f : β„• β†’ β„• h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p h5 : f x > 0 t : β„• h : p + x * k = (p + f x) * (t + 1 + 1) ⊒ f x = k * x
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro.intro.inr C : β„• f : β„• β†’ β„• h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p h5 : f x > 0 h : p + f x ∣ p + x * k ⊒ f x = k * x TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.good_is_linear
[64, 1]
[125, 24]
rw [Nat.coprime_self_add_left, Nat.coprime_comm, h2.coprime_iff_not_dvd]
C : β„• f : β„• β†’ β„• h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p h5 : f x > 0 h : p + f x ∣ p ^ 2 + x * f p ⊒ (p + f x).Coprime p
C : β„• f : β„• β†’ β„• h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p h5 : f x > 0 h : p + f x ∣ p ^ 2 + x * f p ⊒ Β¬p ∣ f x
Please generate a tactic in lean4 to solve the state. STATE: C : β„• f : β„• β†’ β„• h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p h5 : f x > 0 h : p + f x ∣ p ^ 2 + x * f p ⊒ (p + f x).Coprime p TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.good_is_linear
[64, 1]
[125, 24]
exact Nat.not_dvd_of_pos_of_lt h5 hp2
C : β„• f : β„• β†’ β„• h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p h5 : f x > 0 h : p + f x ∣ p ^ 2 + x * f p ⊒ Β¬p ∣ f x
no goals
Please generate a tactic in lean4 to solve the state. STATE: C : β„• f : β„• β†’ β„• h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p h5 : f x > 0 h : p + f x ∣ p ^ 2 + x * f p ⊒ Β¬p ∣ f x TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.good_is_linear
[64, 1]
[125, 24]
exact h.not_gt.elim (Nat.lt_add_right _ h2.pos)
case intro.intro.intro.intro.intro.inr.intro.zero C : β„• f : β„• β†’ β„• h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p h5 : f x > 0 h : p + x * k = (p + f x) * 0 ⊒ f x = k * x
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro.intro.inr.intro.zero C : β„• f : β„• β†’ β„• h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p h5 : f x > 0 h : p + x * k = (p + f x) * 0 ⊒ f x = k * x TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.good_is_linear
[64, 1]
[125, 24]
rwa [Nat.mul_one, add_right_inj, eq_comm, mul_comm] at h
case intro.intro.intro.intro.intro.inr.intro.succ.zero C : β„• f : β„• β†’ β„• h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p h5 : f x > 0 h : p + x * k = (p + f x) * (0 + 1) ⊒ f x = k * x
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro.intro.inr.intro.succ.zero C : β„• f : β„• β†’ β„• h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p h5 : f x > 0 h : p + x * k = (p + f x) * (0 + 1) ⊒ f x = k * x TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.good_is_linear
[64, 1]
[125, 24]
rw [add_assoc, mul_add, add_mul _ _ 2] at h
case intro.intro.intro.intro.intro.inr.intro.succ.succ C : β„• f : β„• β†’ β„• h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p h5 : f x > 0 t : β„• h : p + x * k = (p + f x) * (t + 1 + 1) ⊒ f x = k * x
case intro.intro.intro.intro.intro.inr.intro.succ.succ C : β„• f : β„• β†’ β„• h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p h5 : f x > 0 t : β„• h : p + x * k = (p + f x) * t + (p * 2 + f x * 2) ⊒ f x = k * x
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro.intro.inr.intro.succ.succ C : β„• f : β„• β†’ β„• h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p h5 : f x > 0 t : β„• h : p + x * k = (p + f x) * (t + 1 + 1) ⊒ f x = k * x TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.good_is_linear
[64, 1]
[125, 24]
refine h.not_lt.elim (Nat.lt_add_left _ (Nat.lt_add_right _ ?_))
case intro.intro.intro.intro.intro.inr.intro.succ.succ C : β„• f : β„• β†’ β„• h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p h5 : f x > 0 t : β„• h : p + x * k = (p + f x) * t + (p * 2 + f x * 2) ⊒ f x = k * x
case intro.intro.intro.intro.intro.inr.intro.succ.succ C : β„• f : β„• β†’ β„• h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p h5 : f x > 0 t : β„• h : p + x * k = (p + f x) * t + (p * 2 + f x * 2) ⊒ p + x * k < p * 2
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro.intro.inr.intro.succ.succ C : β„• f : β„• β†’ β„• h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p h5 : f x > 0 t : β„• h : p + x * k = (p + f x) * t + (p * 2 + f x * 2) ⊒ f x = k * x TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.good_is_linear
[64, 1]
[125, 24]
rw [mul_two, add_lt_add_iff_left]
case intro.intro.intro.intro.intro.inr.intro.succ.succ C : β„• f : β„• β†’ β„• h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p h5 : f x > 0 t : β„• h : p + x * k = (p + f x) * t + (p * 2 + f x * 2) ⊒ p + x * k < p * 2
case intro.intro.intro.intro.intro.inr.intro.succ.succ C : β„• f : β„• β†’ β„• h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p h5 : f x > 0 t : β„• h : p + x * k = (p + f x) * t + (p * 2 + f x * 2) ⊒ x * k < p
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro.intro.inr.intro.succ.succ C : β„• f : β„• β†’ β„• h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p h5 : f x > 0 t : β„• h : p + x * k = (p + f x) * t + (p * 2 + f x * 2) ⊒ p + x * k < p * 2 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.good_is_linear
[64, 1]
[125, 24]
exact hp3.trans_le' (Nat.mul_le_mul_left x h3)
case intro.intro.intro.intro.intro.inr.intro.succ.succ C : β„• f : β„• β†’ β„• h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p h5 : f x > 0 t : β„• h : p + x * k = (p + f x) * t + (p * 2 + f x * 2) ⊒ x * k < p
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro.intro.inr.intro.succ.succ C : β„• f : β„• β†’ β„• h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p x p : β„• h2 : p.Prime hp1 : C < p hp2 : f x < p hp3 : x * f 1 < p hp4 : x ^ 2 < p k : β„• h3 : k ≀ f 1 h4 : f p = k * p h5 : f x > 0 t : β„• h : p + x * k = (p + f x) * t + (p * 2 + f x * 2) ⊒ x * k < p TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.linear_is_goodPNat
[140, 1]
[141, 63]
rw [sq, add_mul, mul_assoc, mul_left_comm]
C k a b : β„•+ x✝ : C < a + b ⊒ a ^ 2 + b * (fun x => k * x) a = (a + (fun x => k * x) b) * a
no goals
Please generate a tactic in lean4 to solve the state. STATE: C k a b : β„•+ x✝ : C < a + b ⊒ a ^ 2 + b * (fun x => k * x) a = (a + (fun x => k * x) b) * a TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.goodPNat_is_linear
[143, 1]
[156, 22]
let g : β„• β†’ β„• := Ξ» n ↦ dite (0 < n) (Ξ» h ↦ f ⟨n, h⟩) (Ξ» _ ↦ 0)
C : β„•+ f : β„•+ β†’ β„•+ h : goodPNat C f ⊒ βˆƒ k, f = fun x => k * x
C : β„•+ f : β„•+ β†’ β„•+ h : goodPNat C f g : β„• β†’ β„• := fun n => if h : 0 < n then ↑(f ⟨n, h⟩) else 0 ⊒ βˆƒ k, f = fun x => k * x
Please generate a tactic in lean4 to solve the state. STATE: C : β„•+ f : β„•+ β†’ β„•+ h : goodPNat C f ⊒ βˆƒ k, f = fun x => k * x TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.goodPNat_is_linear
[143, 1]
[156, 22]
rcases good_is_linear h0 with ⟨k, h1⟩
C : β„•+ f : β„•+ β†’ β„•+ h : goodPNat C f g : β„• β†’ β„• := fun n => if h : 0 < n then ↑(f ⟨n, h⟩) else 0 h0 : good (↑C) g ⊒ βˆƒ k, f = fun x => k * x
case intro C : β„•+ f : β„•+ β†’ β„•+ h : goodPNat C f g : β„• β†’ β„• := fun n => if h : 0 < n then ↑(f ⟨n, h⟩) else 0 h0 : good (↑C) g k : β„• h1 : g = fun x => k * x ⊒ βˆƒ k, f = fun x => k * x
Please generate a tactic in lean4 to solve the state. STATE: C : β„•+ f : β„•+ β†’ β„•+ h : goodPNat C f g : β„• β†’ β„• := fun n => if h : 0 < n then ↑(f ⟨n, h⟩) else 0 h0 : good (↑C) g ⊒ βˆƒ k, f = fun x => k * x TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.goodPNat_is_linear
[143, 1]
[156, 22]
replace h0 : 0 < k := by rw [← k.mul_one, ← congr_fun h1]; exact (f 1).pos
case intro C : β„•+ f : β„•+ β†’ β„•+ h : goodPNat C f g : β„• β†’ β„• := fun n => if h : 0 < n then ↑(f ⟨n, h⟩) else 0 h0 : good (↑C) g k : β„• h1 : g = fun x => k * x ⊒ βˆƒ k, f = fun x => k * x
case intro C : β„•+ f : β„•+ β†’ β„•+ h : goodPNat C f g : β„• β†’ β„• := fun n => if h : 0 < n then ↑(f ⟨n, h⟩) else 0 k : β„• h1 : g = fun x => k * x h0 : 0 < k ⊒ βˆƒ k, f = fun x => k * x
Please generate a tactic in lean4 to solve the state. STATE: case intro C : β„•+ f : β„•+ β†’ β„•+ h : goodPNat C f g : β„• β†’ β„• := fun n => if h : 0 < n then ↑(f ⟨n, h⟩) else 0 h0 : good (↑C) g k : β„• h1 : g = fun x => k * x ⊒ βˆƒ k, f = fun x => k * x TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.goodPNat_is_linear
[143, 1]
[156, 22]
refine ⟨⟨k, h0⟩, funext Ξ» x ↦ ?_⟩
case intro C : β„•+ f : β„•+ β†’ β„•+ h : goodPNat C f g : β„• β†’ β„• := fun n => if h : 0 < n then ↑(f ⟨n, h⟩) else 0 k : β„• h1 : g = fun x => k * x h0 : 0 < k ⊒ βˆƒ k, f = fun x => k * x
case intro C : β„•+ f : β„•+ β†’ β„•+ h : goodPNat C f g : β„• β†’ β„• := fun n => if h : 0 < n then ↑(f ⟨n, h⟩) else 0 k : β„• h1 : g = fun x => k * x h0 : 0 < k x : β„•+ ⊒ f x = ⟨k, h0⟩ * x
Please generate a tactic in lean4 to solve the state. STATE: case intro C : β„•+ f : β„•+ β†’ β„•+ h : goodPNat C f g : β„• β†’ β„• := fun n => if h : 0 < n then ↑(f ⟨n, h⟩) else 0 k : β„• h1 : g = fun x => k * x h0 : 0 < k ⊒ βˆƒ k, f = fun x => k * x TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.goodPNat_is_linear
[143, 1]
[156, 22]
rw [← PNat.coe_inj, PNat.mul_coe, PNat.mk_coe, ← congr_fun h1, eq_comm]
case intro C : β„•+ f : β„•+ β†’ β„•+ h : goodPNat C f g : β„• β†’ β„• := fun n => if h : 0 < n then ↑(f ⟨n, h⟩) else 0 k : β„• h1 : g = fun x => k * x h0 : 0 < k x : β„•+ ⊒ f x = ⟨k, h0⟩ * x
case intro C : β„•+ f : β„•+ β†’ β„•+ h : goodPNat C f g : β„• β†’ β„• := fun n => if h : 0 < n then ↑(f ⟨n, h⟩) else 0 k : β„• h1 : g = fun x => k * x h0 : 0 < k x : β„•+ ⊒ g ↑x = ↑(f x)
Please generate a tactic in lean4 to solve the state. STATE: case intro C : β„•+ f : β„•+ β†’ β„•+ h : goodPNat C f g : β„• β†’ β„• := fun n => if h : 0 < n then ↑(f ⟨n, h⟩) else 0 k : β„• h1 : g = fun x => k * x h0 : 0 < k x : β„•+ ⊒ f x = ⟨k, h0⟩ * x TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.goodPNat_is_linear
[143, 1]
[156, 22]
exact dif_pos x.pos
case intro C : β„•+ f : β„•+ β†’ β„•+ h : goodPNat C f g : β„• β†’ β„• := fun n => if h : 0 < n then ↑(f ⟨n, h⟩) else 0 k : β„• h1 : g = fun x => k * x h0 : 0 < k x : β„•+ ⊒ g ↑x = ↑(f x)
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro C : β„•+ f : β„•+ β†’ β„•+ h : goodPNat C f g : β„• β†’ β„• := fun n => if h : 0 < n then ↑(f ⟨n, h⟩) else 0 k : β„• h1 : g = fun x => k * x h0 : 0 < k x : β„•+ ⊒ g ↑x = ↑(f x) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.goodPNat_is_linear
[143, 1]
[156, 22]
rcases a.eq_zero_or_pos with rfl | ha
C : β„•+ f : β„•+ β†’ β„•+ h : goodPNat C f g : β„• β†’ β„• := fun n => if h : 0 < n then ↑(f ⟨n, h⟩) else 0 a b : β„• H : ↑C < a + b ⊒ a + g b ∣ a ^ 2 + b * g a
case inl C : β„•+ f : β„•+ β†’ β„•+ h : goodPNat C f g : β„• β†’ β„• := fun n => if h : 0 < n then ↑(f ⟨n, h⟩) else 0 b : β„• H : ↑C < 0 + b ⊒ 0 + g b ∣ 0 ^ 2 + b * g 0 case inr C : β„•+ f : β„•+ β†’ β„•+ h : goodPNat C f g : β„• β†’ β„• := fun n => if h : 0 < n then ↑(f ⟨n, h⟩) else 0 a b : β„• H : ↑C < a + b ha : a > 0 ⊒ a + g b ∣ a ^ 2 + b * g a
Please generate a tactic in lean4 to solve the state. STATE: C : β„•+ f : β„•+ β†’ β„•+ h : goodPNat C f g : β„• β†’ β„• := fun n => if h : 0 < n then ↑(f ⟨n, h⟩) else 0 a b : β„• H : ↑C < a + b ⊒ a + g b ∣ a ^ 2 + b * g a TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.goodPNat_is_linear
[143, 1]
[156, 22]
rcases b.eq_zero_or_pos with rfl | hb
case inr C : β„•+ f : β„•+ β†’ β„•+ h : goodPNat C f g : β„• β†’ β„• := fun n => if h : 0 < n then ↑(f ⟨n, h⟩) else 0 a b : β„• H : ↑C < a + b ha : a > 0 ⊒ a + g b ∣ a ^ 2 + b * g a
case inr.inl C : β„•+ f : β„•+ β†’ β„•+ h : goodPNat C f g : β„• β†’ β„• := fun n => if h : 0 < n then ↑(f ⟨n, h⟩) else 0 a : β„• ha : a > 0 H : ↑C < a + 0 ⊒ a + g 0 ∣ a ^ 2 + 0 * g a case inr.inr C : β„•+ f : β„•+ β†’ β„•+ h : goodPNat C f g : β„• β†’ β„• := fun n => if h : 0 < n then ↑(f ⟨n, h⟩) else 0 a b : β„• H : ↑C < a + b ha : a > 0 hb : b > 0 ⊒ a + g b ∣ a ^ 2 + b * g a
Please generate a tactic in lean4 to solve the state. STATE: case inr C : β„•+ f : β„•+ β†’ β„•+ h : goodPNat C f g : β„• β†’ β„• := fun n => if h : 0 < n then ↑(f ⟨n, h⟩) else 0 a b : β„• H : ↑C < a + b ha : a > 0 ⊒ a + g b ∣ a ^ 2 + b * g a TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.goodPNat_is_linear
[143, 1]
[156, 22]
exact ⟨0, rfl⟩
case inl C : β„•+ f : β„•+ β†’ β„•+ h : goodPNat C f g : β„• β†’ β„• := fun n => if h : 0 < n then ↑(f ⟨n, h⟩) else 0 b : β„• H : ↑C < 0 + b ⊒ 0 + g b ∣ 0 ^ 2 + b * g 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: case inl C : β„•+ f : β„•+ β†’ β„•+ h : goodPNat C f g : β„• β†’ β„• := fun n => if h : 0 < n then ↑(f ⟨n, h⟩) else 0 b : β„• H : ↑C < 0 + b ⊒ 0 + g b ∣ 0 ^ 2 + b * g 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.goodPNat_is_linear
[143, 1]
[156, 22]
rw [zero_mul]
case inr.inl C : β„•+ f : β„•+ β†’ β„•+ h : goodPNat C f g : β„• β†’ β„• := fun n => if h : 0 < n then ↑(f ⟨n, h⟩) else 0 a : β„• ha : a > 0 H : ↑C < a + 0 ⊒ a + g 0 ∣ a ^ 2 + 0 * g a
case inr.inl C : β„•+ f : β„•+ β†’ β„•+ h : goodPNat C f g : β„• β†’ β„• := fun n => if h : 0 < n then ↑(f ⟨n, h⟩) else 0 a : β„• ha : a > 0 H : ↑C < a + 0 ⊒ a + g 0 ∣ a ^ 2 + 0
Please generate a tactic in lean4 to solve the state. STATE: case inr.inl C : β„•+ f : β„•+ β†’ β„•+ h : goodPNat C f g : β„• β†’ β„• := fun n => if h : 0 < n then ↑(f ⟨n, h⟩) else 0 a : β„• ha : a > 0 H : ↑C < a + 0 ⊒ a + g 0 ∣ a ^ 2 + 0 * g a TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.goodPNat_is_linear
[143, 1]
[156, 22]
exact ⟨a, sq a⟩
case inr.inl C : β„•+ f : β„•+ β†’ β„•+ h : goodPNat C f g : β„• β†’ β„• := fun n => if h : 0 < n then ↑(f ⟨n, h⟩) else 0 a : β„• ha : a > 0 H : ↑C < a + 0 ⊒ a + g 0 ∣ a ^ 2 + 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: case inr.inl C : β„•+ f : β„•+ β†’ β„•+ h : goodPNat C f g : β„• β†’ β„• := fun n => if h : 0 < n then ↑(f ⟨n, h⟩) else 0 a : β„• ha : a > 0 H : ↑C < a + 0 ⊒ a + g 0 ∣ a ^ 2 + 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.goodPNat_is_linear
[143, 1]
[156, 22]
dsimp only [g]
case inr.inr C : β„•+ f : β„•+ β†’ β„•+ h : goodPNat C f g : β„• β†’ β„• := fun n => if h : 0 < n then ↑(f ⟨n, h⟩) else 0 a b : β„• H : ↑C < a + b ha : a > 0 hb : b > 0 ⊒ a + g b ∣ a ^ 2 + b * g a
case inr.inr C : β„•+ f : β„•+ β†’ β„•+ h : goodPNat C f g : β„• β†’ β„• := fun n => if h : 0 < n then ↑(f ⟨n, h⟩) else 0 a b : β„• H : ↑C < a + b ha : a > 0 hb : b > 0 ⊒ (a + if h : 0 < b then ↑(f ⟨b, h⟩) else 0) ∣ a ^ 2 + b * if h : 0 < a then ↑(f ⟨a, h⟩) else 0
Please generate a tactic in lean4 to solve the state. STATE: case inr.inr C : β„•+ f : β„•+ β†’ β„•+ h : goodPNat C f g : β„• β†’ β„• := fun n => if h : 0 < n then ↑(f ⟨n, h⟩) else 0 a b : β„• H : ↑C < a + b ha : a > 0 hb : b > 0 ⊒ a + g b ∣ a ^ 2 + b * g a TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.goodPNat_is_linear
[143, 1]
[156, 22]
rw [dif_pos ha, dif_pos hb]
case inr.inr C : β„•+ f : β„•+ β†’ β„•+ h : goodPNat C f g : β„• β†’ β„• := fun n => if h : 0 < n then ↑(f ⟨n, h⟩) else 0 a b : β„• H : ↑C < a + b ha : a > 0 hb : b > 0 ⊒ (a + if h : 0 < b then ↑(f ⟨b, h⟩) else 0) ∣ a ^ 2 + b * if h : 0 < a then ↑(f ⟨a, h⟩) else 0
case inr.inr C : β„•+ f : β„•+ β†’ β„•+ h : goodPNat C f g : β„• β†’ β„• := fun n => if h : 0 < n then ↑(f ⟨n, h⟩) else 0 a b : β„• H : ↑C < a + b ha : a > 0 hb : b > 0 ⊒ a + ↑(f ⟨b, hb⟩) ∣ a ^ 2 + b * ↑(f ⟨a, ha⟩)
Please generate a tactic in lean4 to solve the state. STATE: case inr.inr C : β„•+ f : β„•+ β†’ β„•+ h : goodPNat C f g : β„• β†’ β„• := fun n => if h : 0 < n then ↑(f ⟨n, h⟩) else 0 a b : β„• H : ↑C < a + b ha : a > 0 hb : b > 0 ⊒ (a + if h : 0 < b then ↑(f ⟨b, h⟩) else 0) ∣ a ^ 2 + b * if h : 0 < a then ↑(f ⟨a, h⟩) else 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.goodPNat_is_linear
[143, 1]
[156, 22]
exact PNat.dvd_iff.mp (h ⟨a, ha⟩ ⟨b, hb⟩ H)
case inr.inr C : β„•+ f : β„•+ β†’ β„•+ h : goodPNat C f g : β„• β†’ β„• := fun n => if h : 0 < n then ↑(f ⟨n, h⟩) else 0 a b : β„• H : ↑C < a + b ha : a > 0 hb : b > 0 ⊒ a + ↑(f ⟨b, hb⟩) ∣ a ^ 2 + b * ↑(f ⟨a, ha⟩)
no goals
Please generate a tactic in lean4 to solve the state. STATE: case inr.inr C : β„•+ f : β„•+ β†’ β„•+ h : goodPNat C f g : β„• β†’ β„• := fun n => if h : 0 < n then ↑(f ⟨n, h⟩) else 0 a b : β„• H : ↑C < a + b ha : a > 0 hb : b > 0 ⊒ a + ↑(f ⟨b, hb⟩) ∣ a ^ 2 + b * ↑(f ⟨a, ha⟩) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.goodPNat_is_linear
[143, 1]
[156, 22]
rw [← k.mul_one, ← congr_fun h1]
C : β„•+ f : β„•+ β†’ β„•+ h : goodPNat C f g : β„• β†’ β„• := fun n => if h : 0 < n then ↑(f ⟨n, h⟩) else 0 h0 : good (↑C) g k : β„• h1 : g = fun x => k * x ⊒ 0 < k
C : β„•+ f : β„•+ β†’ β„•+ h : goodPNat C f g : β„• β†’ β„• := fun n => if h : 0 < n then ↑(f ⟨n, h⟩) else 0 h0 : good (↑C) g k : β„• h1 : g = fun x => k * x ⊒ 0 < g 1
Please generate a tactic in lean4 to solve the state. STATE: C : β„•+ f : β„•+ β†’ β„•+ h : goodPNat C f g : β„• β†’ β„• := fun n => if h : 0 < n then ↑(f ⟨n, h⟩) else 0 h0 : good (↑C) g k : β„• h1 : g = fun x => k * x ⊒ 0 < k TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.goodPNat_is_linear
[143, 1]
[156, 22]
exact (f 1).pos
C : β„•+ f : β„•+ β†’ β„•+ h : goodPNat C f g : β„• β†’ β„• := fun n => if h : 0 < n then ↑(f ⟨n, h⟩) else 0 h0 : good (↑C) g k : β„• h1 : g = fun x => k * x ⊒ 0 < g 1
no goals
Please generate a tactic in lean4 to solve the state. STATE: C : β„•+ f : β„•+ β†’ β„•+ h : goodPNat C f g : β„• β†’ β„• := fun n => if h : 0 < n then ↑(f ⟨n, h⟩) else 0 h0 : good (↑C) g k : β„• h1 : g = fun x => k * x ⊒ 0 < g 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/Infinitesimal/Basic.lean
IMOSL.Extra.Infinitesimal.add
[30, 1]
[35, 33]
apply (nsmul_le_nsmul_right (abs_add Ρ₁ Ξ΅β‚‚) k).trans_lt
R : Type u_1 inst✝ : LinearOrderedRing R Ρ₁ Ξ΅β‚‚ : R h₁ : Infinitesimal Ρ₁ hβ‚‚ : Infinitesimal Ξ΅β‚‚ k : β„• ⊒ k β€’ |Ρ₁ + Ξ΅β‚‚| < 1
R : Type u_1 inst✝ : LinearOrderedRing R Ρ₁ Ξ΅β‚‚ : R h₁ : Infinitesimal Ρ₁ hβ‚‚ : Infinitesimal Ξ΅β‚‚ k : β„• ⊒ k β€’ (|Ρ₁| + |Ξ΅β‚‚|) < 1
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝ : LinearOrderedRing R Ρ₁ Ξ΅β‚‚ : R h₁ : Infinitesimal Ρ₁ hβ‚‚ : Infinitesimal Ξ΅β‚‚ k : β„• ⊒ k β€’ |Ρ₁ + Ξ΅β‚‚| < 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/Infinitesimal/Basic.lean
IMOSL.Extra.Infinitesimal.add
[30, 1]
[35, 33]
apply lt_of_nsmul_lt_nsmul_right 2
R : Type u_1 inst✝ : LinearOrderedRing R Ρ₁ Ξ΅β‚‚ : R h₁ : Infinitesimal Ρ₁ hβ‚‚ : Infinitesimal Ξ΅β‚‚ k : β„• ⊒ k β€’ (|Ρ₁| + |Ξ΅β‚‚|) < 1
R : Type u_1 inst✝ : LinearOrderedRing R Ρ₁ Ξ΅β‚‚ : R h₁ : Infinitesimal Ρ₁ hβ‚‚ : Infinitesimal Ξ΅β‚‚ k : β„• ⊒ 2 β€’ k β€’ (|Ρ₁| + |Ξ΅β‚‚|) < 2 β€’ 1
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝ : LinearOrderedRing R Ρ₁ Ξ΅β‚‚ : R h₁ : Infinitesimal Ρ₁ hβ‚‚ : Infinitesimal Ξ΅β‚‚ k : β„• ⊒ k β€’ (|Ρ₁| + |Ξ΅β‚‚|) < 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/Infinitesimal/Basic.lean
IMOSL.Extra.Infinitesimal.add
[30, 1]
[35, 33]
rw [← mul_nsmul', nsmul_add, two_nsmul]
R : Type u_1 inst✝ : LinearOrderedRing R Ρ₁ Ξ΅β‚‚ : R h₁ : Infinitesimal Ρ₁ hβ‚‚ : Infinitesimal Ξ΅β‚‚ k : β„• ⊒ 2 β€’ k β€’ (|Ρ₁| + |Ξ΅β‚‚|) < 2 β€’ 1
R : Type u_1 inst✝ : LinearOrderedRing R Ρ₁ Ξ΅β‚‚ : R h₁ : Infinitesimal Ρ₁ hβ‚‚ : Infinitesimal Ξ΅β‚‚ k : β„• ⊒ (2 * k) β€’ |Ρ₁| + (2 * k) β€’ |Ξ΅β‚‚| < 1 + 1
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝ : LinearOrderedRing R Ρ₁ Ξ΅β‚‚ : R h₁ : Infinitesimal Ρ₁ hβ‚‚ : Infinitesimal Ξ΅β‚‚ k : β„• ⊒ 2 β€’ k β€’ (|Ρ₁| + |Ξ΅β‚‚|) < 2 β€’ 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/Infinitesimal/Basic.lean
IMOSL.Extra.Infinitesimal.add
[30, 1]
[35, 33]
exact add_lt_add (h₁ _) (hβ‚‚ _)
R : Type u_1 inst✝ : LinearOrderedRing R Ρ₁ Ξ΅β‚‚ : R h₁ : Infinitesimal Ρ₁ hβ‚‚ : Infinitesimal Ξ΅β‚‚ k : β„• ⊒ (2 * k) β€’ |Ρ₁| + (2 * k) β€’ |Ξ΅β‚‚| < 1 + 1
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝ : LinearOrderedRing R Ρ₁ Ξ΅β‚‚ : R h₁ : Infinitesimal Ρ₁ hβ‚‚ : Infinitesimal Ξ΅β‚‚ k : β„• ⊒ (2 * k) β€’ |Ρ₁| + (2 * k) β€’ |Ξ΅β‚‚| < 1 + 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/Infinitesimal/Basic.lean
IMOSL.Extra.Infinitesimal.mul_of_abs_le_one_left
[53, 1]
[56, 87]
rw [abs_mul, nsmul_eq_mul', mul_assoc, ← nsmul_eq_mul']
R : Type u_1 inst✝ : LinearOrderedRing R Ξ΅ r : R hΞ΅ : Infinitesimal Ξ΅ hr : |r| ≀ 1 k : β„• ⊒ k β€’ |r * Ξ΅| < 1
R : Type u_1 inst✝ : LinearOrderedRing R Ξ΅ r : R hΞ΅ : Infinitesimal Ξ΅ hr : |r| ≀ 1 k : β„• ⊒ |r| * k β€’ |Ξ΅| < 1
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝ : LinearOrderedRing R Ξ΅ r : R hΞ΅ : Infinitesimal Ξ΅ hr : |r| ≀ 1 k : β„• ⊒ k β€’ |r * Ξ΅| < 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/Infinitesimal/Basic.lean
IMOSL.Extra.Infinitesimal.mul_of_abs_le_one_left
[53, 1]
[56, 87]
exact mul_lt_one_of_nonneg_of_lt_one_right hr (nsmul_nonneg (abs_nonneg Ξ΅) k) (hΞ΅ k)
R : Type u_1 inst✝ : LinearOrderedRing R Ξ΅ r : R hΞ΅ : Infinitesimal Ξ΅ hr : |r| ≀ 1 k : β„• ⊒ |r| * k β€’ |Ξ΅| < 1
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝ : LinearOrderedRing R Ξ΅ r : R hΞ΅ : Infinitesimal Ξ΅ hr : |r| ≀ 1 k : β„• ⊒ |r| * k β€’ |Ξ΅| < 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/Infinitesimal/Basic.lean
IMOSL.Extra.Infinitesimal.mul_of_abs_le_one_right
[58, 1]
[61, 86]
rw [abs_mul, nsmul_eq_mul, ← mul_assoc, ← nsmul_eq_mul]
R : Type u_1 inst✝ : LinearOrderedRing R Ξ΅ r : R hΞ΅ : Infinitesimal Ξ΅ hr : |r| ≀ 1 k : β„• ⊒ k β€’ |Ξ΅ * r| < 1
R : Type u_1 inst✝ : LinearOrderedRing R Ξ΅ r : R hΞ΅ : Infinitesimal Ξ΅ hr : |r| ≀ 1 k : β„• ⊒ k β€’ |Ξ΅| * |r| < 1
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝ : LinearOrderedRing R Ξ΅ r : R hΞ΅ : Infinitesimal Ξ΅ hr : |r| ≀ 1 k : β„• ⊒ k β€’ |Ξ΅ * r| < 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/Infinitesimal/Basic.lean
IMOSL.Extra.Infinitesimal.mul_of_abs_le_one_right
[58, 1]
[61, 86]
exact mul_lt_one_of_nonneg_of_lt_one_left (nsmul_nonneg (abs_nonneg Ξ΅) k) (hΞ΅ k) hr
R : Type u_1 inst✝ : LinearOrderedRing R Ξ΅ r : R hΞ΅ : Infinitesimal Ξ΅ hr : |r| ≀ 1 k : β„• ⊒ k β€’ |Ξ΅| * |r| < 1
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝ : LinearOrderedRing R Ξ΅ r : R hΞ΅ : Infinitesimal Ξ΅ hr : |r| ≀ 1 k : β„• ⊒ k β€’ |Ξ΅| * |r| < 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/Infinitesimal/Basic.lean
IMOSL.Extra.Infinitesimal.nsmul
[67, 1]
[68, 43]
rw [abs_nsmul, ← mul_nsmul']
R : Type u_1 inst✝ : LinearOrderedRing R Ξ΅ : R hΞ΅ : Infinitesimal Ξ΅ n k : β„• ⊒ k β€’ |n β€’ Ξ΅| < 1
R : Type u_1 inst✝ : LinearOrderedRing R Ξ΅ : R hΞ΅ : Infinitesimal Ξ΅ n k : β„• ⊒ (k * n) β€’ |Ξ΅| < 1
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝ : LinearOrderedRing R Ξ΅ : R hΞ΅ : Infinitesimal Ξ΅ n k : β„• ⊒ k β€’ |n β€’ Ξ΅| < 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/Infinitesimal/Basic.lean
IMOSL.Extra.Infinitesimal.nsmul
[67, 1]
[68, 43]
exact hΞ΅ _
R : Type u_1 inst✝ : LinearOrderedRing R Ξ΅ : R hΞ΅ : Infinitesimal Ξ΅ n k : β„• ⊒ (k * n) β€’ |Ξ΅| < 1
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝ : LinearOrderedRing R Ξ΅ : R hΞ΅ : Infinitesimal Ξ΅ n k : β„• ⊒ (k * n) β€’ |Ξ΅| < 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/Infinitesimal/Basic.lean
IMOSL.Extra.Infinitesimal.iff_nsmul_Nat_bdd
[70, 1]
[72, 90]
rw [← mul_nsmul, nsmul_one]
R : Type u_1 inst✝ : LinearOrderedRing R Ξ΅ : R x✝ : βˆƒ N, βˆ€ (k : β„•), k β€’ |Ξ΅| < ↑N k N : β„• h : βˆ€ (k : β„•), k β€’ |Ξ΅| < ↑N ⊒ N β€’ k β€’ |Ξ΅| < N β€’ 1
R : Type u_1 inst✝ : LinearOrderedRing R Ξ΅ : R x✝ : βˆƒ N, βˆ€ (k : β„•), k β€’ |Ξ΅| < ↑N k N : β„• h : βˆ€ (k : β„•), k β€’ |Ξ΅| < ↑N ⊒ (k * N) β€’ |Ξ΅| < ↑N
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝ : LinearOrderedRing R Ξ΅ : R x✝ : βˆƒ N, βˆ€ (k : β„•), k β€’ |Ξ΅| < ↑N k N : β„• h : βˆ€ (k : β„•), k β€’ |Ξ΅| < ↑N ⊒ N β€’ k β€’ |Ξ΅| < N β€’ 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/Infinitesimal/Basic.lean
IMOSL.Extra.Infinitesimal.iff_nsmul_Nat_bdd
[70, 1]
[72, 90]
exact h _
R : Type u_1 inst✝ : LinearOrderedRing R Ξ΅ : R x✝ : βˆƒ N, βˆ€ (k : β„•), k β€’ |Ξ΅| < ↑N k N : β„• h : βˆ€ (k : β„•), k β€’ |Ξ΅| < ↑N ⊒ (k * N) β€’ |Ξ΅| < ↑N
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝ : LinearOrderedRing R Ξ΅ : R x✝ : βˆƒ N, βˆ€ (k : β„•), k β€’ |Ξ΅| < ↑N k N : β„• h : βˆ€ (k : β„•), k β€’ |Ξ΅| < ↑N ⊒ (k * N) β€’ |Ξ΅| < ↑N TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/IntLinearSolver.lean
IMOSL.Extra.IntLinearSolver
[21, 1]
[27, 68]
rw [zero_zsmul, zero_add]
G : Type u_1 g : G inst✝ : AddGroup G f : β„€ β†’ G h : βˆ€ (n : β„€), f (n + 1) = g + f n n : β„€ ⊒ f 0 = 0 β€’ g + f 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: G : Type u_1 g : G inst✝ : AddGroup G f : β„€ β†’ G h : βˆ€ (n : β„€), f (n + 1) = g + f n n : β„€ ⊒ f 0 = 0 β€’ g + f 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/IntLinearSolver.lean
IMOSL.Extra.IntLinearSolver
[21, 1]
[27, 68]
rw [h, h1, ← add_assoc, add_comm, one_add_zsmul]
G : Type u_1 g : G inst✝ : AddGroup G f : β„€ β†’ G h : βˆ€ (n : β„€), f (n + 1) = g + f n n k : β„€ x✝ : 0 ≀ k h1 : f k = k β€’ g + f 0 ⊒ f (k + 1) = (k + 1) β€’ g + f 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: G : Type u_1 g : G inst✝ : AddGroup G f : β„€ β†’ G h : βˆ€ (n : β„€), f (n + 1) = g + f n n k : β„€ x✝ : 0 ≀ k h1 : f k = k β€’ g + f 0 ⊒ f (k + 1) = (k + 1) β€’ g + f 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/IntLinearSolver.lean
IMOSL.Extra.IntLinearSolver
[21, 1]
[27, 68]
rwa [← add_right_inj g, ← h, sub_add_cancel, ← add_assoc, ← one_add_zsmul, add_sub_cancel]
G : Type u_1 g : G inst✝ : AddGroup G f : β„€ β†’ G h : βˆ€ (n : β„€), f (n + 1) = g + f n n k : β„€ x✝ : k ≀ 0 h1 : f k = k β€’ g + f 0 ⊒ f (k - 1) = (k - 1) β€’ g + f 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: G : Type u_1 g : G inst✝ : AddGroup G f : β„€ β†’ G h : βˆ€ (n : β„€), f (n + 1) = g + f n n k : β„€ x✝ : k ≀ 0 h1 : f k = k β€’ g + f 0 ⊒ f (k - 1) = (k - 1) β€’ g + f 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/IntLinearSolver.lean
IMOSL.Extra.IntIntLinearSolverAlt
[29, 1]
[31, 48]
rw [IntLinearSolver h, smul_eq_mul, mul_comm]
g : β„€ f : β„€ β†’ β„€ h : βˆ€ (n : β„€), f (n + 1) = g + f n n : β„€ ⊒ f n = g * n + f 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: g : β„€ f : β„€ β†’ β„€ h : βˆ€ (n : β„€), f (n + 1) = g + f n n : β„€ ⊒ f n = g * n + f 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/Extra/ExplicitRings/F2e.lean
IMOSL.IMO2012A5.𝔽₂Ρ.add_mul
[229, 11]
[230, 60]
rw [𝔽₂Ρ.mul_comm, 𝔽₂Ρ.mul_add, z.mul_comm, z.mul_comm]
x y z : 𝔽₂Ρ ⊒ (x + y) * z = x * z + y * z
no goals
Please generate a tactic in lean4 to solve the state. STATE: x y z : 𝔽₂Ρ ⊒ (x + y) * z = x * z + y * z TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/Extra/ExplicitRings/F2e.lean
IMOSL.IMO2012A5.𝔽₂Ρ.castRingHom_injective
[290, 1]
[297, 74]
rw [← one_mul r, h1, zero_mul]
R : Type u_1 inst✝¹ : NonAssocSemiring R inst✝ : CharTwo R r : R h : r * r = 0 h0 : r β‰  0 h1 : 1 = 0 ⊒ r = 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝¹ : NonAssocSemiring R inst✝ : CharTwo R r : R h : r * r = 0 h0 : r β‰  0 h1 : 1 = 0 ⊒ r = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/Extra/ExplicitRings/F2e.lean
IMOSL.IMO2012A5.𝔽₂Ρ.castRingHom_injective
[290, 1]
[297, 74]
rwa [add_eq_zero_iff_eq.mp h2, one_mul] at h
R : Type u_1 inst✝¹ : NonAssocSemiring R inst✝ : CharTwo R r : R h : r * r = 0 h0 : r β‰  0 h1 : 1 β‰  0 x : 𝔽₂Ρ h2 : (castRingHom h) Y = 0 ⊒ 1 = 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝¹ : NonAssocSemiring R inst✝ : CharTwo R r : R h : r * r = 0 h0 : r β‰  0 h1 : 1 β‰  0 x : 𝔽₂Ρ h2 : (castRingHom h) Y = 0 ⊒ 1 = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A4/A4.lean
IMOSL.IMO2014A4.exists_ne_pow_eq
[24, 1]
[31, 22]
obtain ⟨m, -, n, -, h, h0⟩ := Set.infinite_univ.exists_ne_map_eq_of_mapsTo h0 (Set.toFinite _)
k : β„€ h : k β‰  0 b : β„€ h0 : Set.MapsTo (fun x => b ^ x % k) Set.univ ↑(Finset.Ico 0 |k|) ⊒ βˆƒ m n, m β‰  n ∧ b ^ m % k = b ^ n % k
case intro.intro.intro.intro.intro k : β„€ h✝ : k β‰  0 b : β„€ h0✝ : Set.MapsTo (fun x => b ^ x % k) Set.univ ↑(Finset.Ico 0 |k|) m n : β„• h : m β‰  n h0 : b ^ m % k = b ^ n % k ⊒ βˆƒ m n, m β‰  n ∧ b ^ m % k = b ^ n % k
Please generate a tactic in lean4 to solve the state. STATE: k : β„€ h : k β‰  0 b : β„€ h0 : Set.MapsTo (fun x => b ^ x % k) Set.univ ↑(Finset.Ico 0 |k|) ⊒ βˆƒ m n, m β‰  n ∧ b ^ m % k = b ^ n % k TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A4/A4.lean
IMOSL.IMO2014A4.exists_ne_pow_eq
[24, 1]
[31, 22]
exact ⟨m, n, h, h0⟩
case intro.intro.intro.intro.intro k : β„€ h✝ : k β‰  0 b : β„€ h0✝ : Set.MapsTo (fun x => b ^ x % k) Set.univ ↑(Finset.Ico 0 |k|) m n : β„• h : m β‰  n h0 : b ^ m % k = b ^ n % k ⊒ βˆƒ m n, m β‰  n ∧ b ^ m % k = b ^ n % k
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro.intro k : β„€ h✝ : k β‰  0 b : β„€ h0✝ : Set.MapsTo (fun x => b ^ x % k) Set.univ ↑(Finset.Ico 0 |k|) m n : β„• h : m β‰  n h0 : b ^ m % k = b ^ n % k ⊒ βˆƒ m n, m β‰  n ∧ b ^ m % k = b ^ n % k TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A4/A4.lean
IMOSL.IMO2014A4.exists_ne_pow_eq
[24, 1]
[31, 22]
rw [Finset.coe_Ico, Set.mem_Ico]
k : β„€ h : k β‰  0 b : β„€ x : β„• x✝ : x ∈ Set.univ ⊒ (fun x => b ^ x % k) x ∈ ↑(Finset.Ico 0 |k|)
k : β„€ h : k β‰  0 b : β„€ x : β„• x✝ : x ∈ Set.univ ⊒ 0 ≀ (fun x => b ^ x % k) x ∧ (fun x => b ^ x % k) x < |k|
Please generate a tactic in lean4 to solve the state. STATE: k : β„€ h : k β‰  0 b : β„€ x : β„• x✝ : x ∈ Set.univ ⊒ (fun x => b ^ x % k) x ∈ ↑(Finset.Ico 0 |k|) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A4/A4.lean
IMOSL.IMO2014A4.exists_ne_pow_eq
[24, 1]
[31, 22]
exact ⟨(b ^ x).emod_nonneg h, (b ^ x).emod_lt h⟩
k : β„€ h : k β‰  0 b : β„€ x : β„• x✝ : x ∈ Set.univ ⊒ 0 ≀ (fun x => b ^ x % k) x ∧ (fun x => b ^ x % k) x < |k|
no goals
Please generate a tactic in lean4 to solve the state. STATE: k : β„€ h : k β‰  0 b : β„€ x : β„• x✝ : x ∈ Set.univ ⊒ 0 ≀ (fun x => b ^ x % k) x ∧ (fun x => b ^ x % k) x < |k| TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A4/A4.lean
IMOSL.IMO2014A4.linear_good'
[44, 1]
[46, 74]
rw [add_sub_add_right_eq_sub, mul_add, add_sub_cancel_left, add_one_mul (Ξ± := β„€), add_sub_add_right_eq_sub, ← mul_sub, add_sub_cancel_right, ← mul_add]
k m x y : β„€ ⊒ (fun x => k * x + m) (y + (fun x => k * x + m) x) - (fun x => k * x + m) y = (fun x => k * x + m) ((k + 1) * x) - (fun x => k * x + m) x + k * m
no goals
Please generate a tactic in lean4 to solve the state. STATE: k m x y : β„€ ⊒ (fun x => k * x + m) (y + (fun x => k * x + m) x) - (fun x => k * x + m) y = (fun x => k * x + m) ((k + 1) * x) - (fun x => k * x + m) x + k * m TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A4/A4.lean
IMOSL.IMO2014A4.linear_good
[48, 1]
[50, 43]
nth_rw 1 [← sub_add_cancel b 1, ← Int.mul_ediv_cancel' h]
b c : β„€ h : b - 1 ∣ c ⊒ good b c fun x => (b - 1) * x + c / (b - 1)
b c : β„€ h : b - 1 ∣ c ⊒ good (b - 1 + 1) ((b - 1) * (c / (b - 1))) fun x => (b - 1) * x + c / (b - 1)
Please generate a tactic in lean4 to solve the state. STATE: b c : β„€ h : b - 1 ∣ c ⊒ good b c fun x => (b - 1) * x + c / (b - 1) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A4/A4.lean
IMOSL.IMO2014A4.linear_good
[48, 1]
[50, 43]
exact linear_good' (b - 1) (c / (b - 1))
b c : β„€ h : b - 1 ∣ c ⊒ good (b - 1 + 1) ((b - 1) * (c / (b - 1))) fun x => (b - 1) * x + c / (b - 1)
no goals
Please generate a tactic in lean4 to solve the state. STATE: b c : β„€ h : b - 1 ∣ c ⊒ good (b - 1 + 1) ((b - 1) * (c / (b - 1))) fun x => (b - 1) * x + c / (b - 1) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A4/A4.lean
IMOSL.IMO2014A4.map_map_zero_add
[58, 1]
[59, 63]
rw [← sub_eq_iff_eq_add, h, mul_zero, sub_self, zero_add]
b c : β„€ f : β„€ β†’ β„€ h : good b c f y : β„€ ⊒ f (y + f 0) = c + f y
no goals
Please generate a tactic in lean4 to solve the state. STATE: b c : β„€ f : β„€ β†’ β„€ h : good b c f y : β„€ ⊒ f (y + f 0) = c + f y TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A4/A4.lean
IMOSL.IMO2014A4.map_mul_map_zero_add
[61, 1]
[65, 33]
have h0 n : f (y + f 0 * (n + 1)) = c + f (y + f 0 * n) := by rw [mul_add_one (Ξ± := β„€), ← add_assoc, map_map_zero_add h]
b c : β„€ f : β„€ β†’ β„€ h : good b c f y k : β„€ ⊒ f (y + f 0 * k) = c * k + f y
b c : β„€ f : β„€ β†’ β„€ h : good b c f y k : β„€ h0 : βˆ€ (n : β„€), f (y + f 0 * (n + 1)) = c + f (y + f 0 * n) ⊒ f (y + f 0 * k) = c * k + f y
Please generate a tactic in lean4 to solve the state. STATE: b c : β„€ f : β„€ β†’ β„€ h : good b c f y k : β„€ ⊒ f (y + f 0 * k) = c * k + f y TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A4/A4.lean
IMOSL.IMO2014A4.map_mul_map_zero_add
[61, 1]
[65, 33]
replace h0 := Extra.IntIntLinearSolverAlt (f := Ξ» n ↦ f (y + f 0 * n)) h0 k
b c : β„€ f : β„€ β†’ β„€ h : good b c f y k : β„€ h0 : βˆ€ (n : β„€), f (y + f 0 * (n + 1)) = c + f (y + f 0 * n) ⊒ f (y + f 0 * k) = c * k + f y
b c : β„€ f : β„€ β†’ β„€ h : good b c f y k : β„€ h0 : f (y + f 0 * k) = c * k + f (y + f 0 * 0) ⊒ f (y + f 0 * k) = c * k + f y
Please generate a tactic in lean4 to solve the state. STATE: b c : β„€ f : β„€ β†’ β„€ h : good b c f y k : β„€ h0 : βˆ€ (n : β„€), f (y + f 0 * (n + 1)) = c + f (y + f 0 * n) ⊒ f (y + f 0 * k) = c * k + f y TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A4/A4.lean
IMOSL.IMO2014A4.map_mul_map_zero_add
[61, 1]
[65, 33]
rwa [mul_zero, add_zero] at h0
b c : β„€ f : β„€ β†’ β„€ h : good b c f y k : β„€ h0 : f (y + f 0 * k) = c * k + f (y + f 0 * 0) ⊒ f (y + f 0 * k) = c * k + f y
no goals
Please generate a tactic in lean4 to solve the state. STATE: b c : β„€ f : β„€ β†’ β„€ h : good b c f y k : β„€ h0 : f (y + f 0 * k) = c * k + f (y + f 0 * 0) ⊒ f (y + f 0 * k) = c * k + f y TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A4/A4.lean
IMOSL.IMO2014A4.map_mul_map_zero_add
[61, 1]
[65, 33]
rw [mul_add_one (Ξ± := β„€), ← add_assoc, map_map_zero_add h]
b c : β„€ f : β„€ β†’ β„€ h : good b c f y k n : β„€ ⊒ f (y + f 0 * (n + 1)) = c + f (y + f 0 * n)
no goals
Please generate a tactic in lean4 to solve the state. STATE: b c : β„€ f : β„€ β†’ β„€ h : good b c f y k n : β„€ ⊒ f (y + f 0 * (n + 1)) = c + f (y + f 0 * n) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A4/A4.lean
IMOSL.IMO2014A4.map_b_pow_mul_eq_of_map_eq
[67, 1]
[74, 45]
rwa [pow_zero, one_mul, one_mul]
b c : β„€ f : β„€ β†’ β„€ h : good b c f x y : β„€ h0 : f x = f y ⊒ f (b ^ 0 * x) = f (b ^ 0 * y)
no goals
Please generate a tactic in lean4 to solve the state. STATE: b c : β„€ f : β„€ β†’ β„€ h : good b c f x y : β„€ h0 : f x = f y ⊒ f (b ^ 0 * x) = f (b ^ 0 * y) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A4/A4.lean
IMOSL.IMO2014A4.map_b_pow_mul_eq_of_map_eq
[67, 1]
[74, 45]
rw [pow_succ', mul_assoc, mul_assoc]
b c : β„€ f : β„€ β†’ β„€ h : good b c f x y : β„€ h0 : f x = f y k : β„• ⊒ f (b ^ (k + 1) * x) = f (b ^ (k + 1) * y)
b c : β„€ f : β„€ β†’ β„€ h : good b c f x y : β„€ h0 : f x = f y k : β„• ⊒ f (b * (b ^ k * x)) = f (b * (b ^ k * y))
Please generate a tactic in lean4 to solve the state. STATE: b c : β„€ f : β„€ β†’ β„€ h : good b c f x y : β„€ h0 : f x = f y k : β„• ⊒ f (b ^ (k + 1) * x) = f (b ^ (k + 1) * y) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A4/A4.lean
IMOSL.IMO2014A4.map_b_pow_mul_eq_of_map_eq
[67, 1]
[74, 45]
have h1 := h (b ^ k * y) 0
b c : β„€ f : β„€ β†’ β„€ h : good b c f x y : β„€ h0 : f x = f y k : β„• ⊒ f (b * (b ^ k * x)) = f (b * (b ^ k * y))
b c : β„€ f : β„€ β†’ β„€ h : good b c f x y : β„€ h0 : f x = f y k : β„• h1 : f (0 + f (b ^ k * y)) - f 0 = f (b * (b ^ k * y)) - f (b ^ k * y) + c ⊒ f (b * (b ^ k * x)) = f (b * (b ^ k * y))
Please generate a tactic in lean4 to solve the state. STATE: b c : β„€ f : β„€ β†’ β„€ h : good b c f x y : β„€ h0 : f x = f y k : β„• ⊒ f (b * (b ^ k * x)) = f (b * (b ^ k * y)) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A4/A4.lean
IMOSL.IMO2014A4.map_b_pow_mul_eq_of_map_eq
[67, 1]
[74, 45]
rwa [← map_b_pow_mul_eq_of_map_eq h0 k, h, add_left_inj, sub_left_inj] at h1
b c : β„€ f : β„€ β†’ β„€ h : good b c f x y : β„€ h0 : f x = f y k : β„• h1 : f (0 + f (b ^ k * y)) - f 0 = f (b * (b ^ k * y)) - f (b ^ k * y) + c ⊒ f (b * (b ^ k * x)) = f (b * (b ^ k * y))
no goals
Please generate a tactic in lean4 to solve the state. STATE: b c : β„€ f : β„€ β†’ β„€ h : good b c f x y : β„€ h0 : f x = f y k : β„• h1 : f (0 + f (b ^ k * y)) - f 0 = f (b * (b ^ k * y)) - f (b ^ k * y) + c ⊒ f (b * (b ^ k * x)) = f (b * (b ^ k * y)) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A4/A4.lean
IMOSL.IMO2014A4.map_is_linear
[78, 1]
[103, 43]
suffices f.Injective by intro n have h2 := eq_add_of_sub_eq' (h 0 (b * n)) rw [mul_zero, sub_self, zero_add, ← sub_left_inj (a := f n), add_sub_right_comm, ← h n n, sub_left_inj] at h2 rw [sub_one_mul, ← add_sub_right_comm, this h2, add_sub_cancel_left]
b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 ⊒ βˆ€ (n : β„€), f n = (b - 1) * n + f 0
b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 ⊒ Function.Injective f
Please generate a tactic in lean4 to solve the state. STATE: b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 ⊒ βˆ€ (n : β„€), f n = (b - 1) * n + f 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A4/A4.lean
IMOSL.IMO2014A4.map_is_linear
[78, 1]
[103, 43]
have h2 : f 0 β‰  0 := Ξ» h2 ↦ by have h3 := map_map_zero_add h 0 rw [zero_add, h2, h2, add_zero] at h3 exact h1 h3.symm
b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 ⊒ Function.Injective f
b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 β‰  0 ⊒ Function.Injective f
Please generate a tactic in lean4 to solve the state. STATE: b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 ⊒ Function.Injective f TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A4/A4.lean
IMOSL.IMO2014A4.map_is_linear
[78, 1]
[103, 43]
obtain ⟨m, n, h3, h4⟩ := exists_ne_pow_eq h2 b
b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 β‰  0 ⊒ Function.Injective f
case intro.intro.intro b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 β‰  0 m n : β„• h3 : m β‰  n h4 : b ^ m % f 0 = b ^ n % f 0 ⊒ Function.Injective f
Please generate a tactic in lean4 to solve the state. STATE: b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 β‰  0 ⊒ Function.Injective f TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A4/A4.lean
IMOSL.IMO2014A4.map_is_linear
[78, 1]
[103, 43]
rw [Int.emod_eq_emod_iff_emod_sub_eq_zero, ← Int.dvd_iff_emod_eq_zero] at h4
case intro.intro.intro b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 β‰  0 m n : β„• h3 : m β‰  n h4 : b ^ m % f 0 = b ^ n % f 0 ⊒ Function.Injective f
case intro.intro.intro b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 β‰  0 m n : β„• h3 : m β‰  n h4 : f 0 ∣ b ^ m - b ^ n ⊒ Function.Injective f
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 β‰  0 m n : β„• h3 : m β‰  n h4 : b ^ m % f 0 = b ^ n % f 0 ⊒ Function.Injective f TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A4/A4.lean
IMOSL.IMO2014A4.map_is_linear
[78, 1]
[103, 43]
rcases h4 with ⟨N, h4⟩
case intro.intro.intro b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 β‰  0 m n : β„• h3 : m β‰  n h4 : f 0 ∣ b ^ m - b ^ n ⊒ Function.Injective f
case intro.intro.intro.intro b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 β‰  0 m n : β„• h3 : m β‰  n N : β„€ h4 : b ^ m - b ^ n = f 0 * N ⊒ Function.Injective f
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 β‰  0 m n : β„• h3 : m β‰  n h4 : f 0 ∣ b ^ m - b ^ n ⊒ Function.Injective f TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A4/A4.lean
IMOSL.IMO2014A4.map_is_linear
[78, 1]
[103, 43]
intro x y h5
case intro.intro.intro.intro b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 β‰  0 m n : β„• h3 : m β‰  n N : β„€ h4 : b ^ m - b ^ n = f 0 * N ⊒ Function.Injective f
case intro.intro.intro.intro b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 β‰  0 m n : β„• h3 : m β‰  n N : β„€ h4 : b ^ m - b ^ n = f 0 * N x y : β„€ h5 : f x = f y ⊒ x = y
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 β‰  0 m n : β„• h3 : m β‰  n N : β„€ h4 : b ^ m - b ^ n = f 0 * N ⊒ Function.Injective f TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A4/A4.lean
IMOSL.IMO2014A4.map_is_linear
[78, 1]
[103, 43]
apply map_b_pow_mul_eq_of_map_eq h at h5
case intro.intro.intro.intro b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 β‰  0 m n : β„• h3 : m β‰  n N : β„€ h4 : b ^ m - b ^ n = f 0 * N x y : β„€ h5 : f x = f y ⊒ x = y
case intro.intro.intro.intro b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 β‰  0 m n : β„• h3 : m β‰  n N : β„€ h4 : b ^ m - b ^ n = f 0 * N x y : β„€ h5 : βˆ€ (k : β„•), f (b ^ k * x) = f (b ^ k * y) ⊒ x = y
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 β‰  0 m n : β„• h3 : m β‰  n N : β„€ h4 : b ^ m - b ^ n = f 0 * N x y : β„€ h5 : f x = f y ⊒ x = y TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A4/A4.lean
IMOSL.IMO2014A4.map_is_linear
[78, 1]
[103, 43]
have h6 := h5 m
case intro.intro.intro.intro b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 β‰  0 m n : β„• h3 : m β‰  n N : β„€ h4 : b ^ m - b ^ n = f 0 * N x y : β„€ h5 : βˆ€ (k : β„•), f (b ^ k * x) = f (b ^ k * y) ⊒ x = y
case intro.intro.intro.intro b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 β‰  0 m n : β„• h3 : m β‰  n N : β„€ h4 : b ^ m - b ^ n = f 0 * N x y : β„€ h5 : βˆ€ (k : β„•), f (b ^ k * x) = f (b ^ k * y) h6 : f (b ^ m * x) = f (b ^ m * y) ⊒ x = y
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 β‰  0 m n : β„• h3 : m β‰  n N : β„€ h4 : b ^ m - b ^ n = f 0 * N x y : β„€ h5 : βˆ€ (k : β„•), f (b ^ k * x) = f (b ^ k * y) ⊒ x = y TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A4/A4.lean
IMOSL.IMO2014A4.map_is_linear
[78, 1]
[103, 43]
have h7 := map_mul_map_zero_add h
case intro.intro.intro.intro b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 β‰  0 m n : β„• h3 : m β‰  n N : β„€ h4 : b ^ m - b ^ n = f 0 * N x y : β„€ h5 : βˆ€ (k : β„•), f (b ^ k * x) = f (b ^ k * y) h6 : f (b ^ m * x) = f (b ^ m * y) ⊒ x = y
case intro.intro.intro.intro b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 β‰  0 m n : β„• h3 : m β‰  n N : β„€ h4 : b ^ m - b ^ n = f 0 * N x y : β„€ h5 : βˆ€ (k : β„•), f (b ^ k * x) = f (b ^ k * y) h6 : f (b ^ m * x) = f (b ^ m * y) h7 : βˆ€ (y k : β„€), f (y + f 0 * k) = c * k + f y ⊒ x = y
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 β‰  0 m n : β„• h3 : m β‰  n N : β„€ h4 : b ^ m - b ^ n = f 0 * N x y : β„€ h5 : βˆ€ (k : β„•), f (b ^ k * x) = f (b ^ k * y) h6 : f (b ^ m * x) = f (b ^ m * y) ⊒ x = y TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A4/A4.lean
IMOSL.IMO2014A4.map_is_linear
[78, 1]
[103, 43]
rw [eq_add_of_sub_eq' h4, add_mul, mul_assoc, h7, add_mul, mul_assoc, h7, h5, add_left_inj, Int.mul_eq_mul_left_iff h1] at h6
case intro.intro.intro.intro b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 β‰  0 m n : β„• h3 : m β‰  n N : β„€ h4 : b ^ m - b ^ n = f 0 * N x y : β„€ h5 : βˆ€ (k : β„•), f (b ^ k * x) = f (b ^ k * y) h6 : f (b ^ m * x) = f (b ^ m * y) h7 : βˆ€ (y k : β„€), f (y + f 0 * k) = c * k + f y ⊒ x = y
case intro.intro.intro.intro b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 β‰  0 m n : β„• h3 : m β‰  n N : β„€ h4 : b ^ m - b ^ n = f 0 * N x y : β„€ h5 : βˆ€ (k : β„•), f (b ^ k * x) = f (b ^ k * y) h6 : N * x = N * y h7 : βˆ€ (y k : β„€), f (y + f 0 * k) = c * k + f y ⊒ x = y
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 β‰  0 m n : β„• h3 : m β‰  n N : β„€ h4 : b ^ m - b ^ n = f 0 * N x y : β„€ h5 : βˆ€ (k : β„•), f (b ^ k * x) = f (b ^ k * y) h6 : f (b ^ m * x) = f (b ^ m * y) h7 : βˆ€ (y k : β„€), f (y + f 0 * k) = c * k + f y ⊒ x = y TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A4/A4.lean
IMOSL.IMO2014A4.map_is_linear
[78, 1]
[103, 43]
refine (Int.mul_eq_mul_left_iff Ξ» h8 ↦ ?_).mp h6
case intro.intro.intro.intro b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 β‰  0 m n : β„• h3 : m β‰  n N : β„€ h4 : b ^ m - b ^ n = f 0 * N x y : β„€ h5 : βˆ€ (k : β„•), f (b ^ k * x) = f (b ^ k * y) h6 : N * x = N * y h7 : βˆ€ (y k : β„€), f (y + f 0 * k) = c * k + f y ⊒ x = y
case intro.intro.intro.intro b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 β‰  0 m n : β„• h3 : m β‰  n N : β„€ h4 : b ^ m - b ^ n = f 0 * N x y : β„€ h5 : βˆ€ (k : β„•), f (b ^ k * x) = f (b ^ k * y) h6 : N * x = N * y h7 : βˆ€ (y k : β„€), f (y + f 0 * k) = c * k + f y h8 : N = 0 ⊒ False
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 β‰  0 m n : β„• h3 : m β‰  n N : β„€ h4 : b ^ m - b ^ n = f 0 * N x y : β„€ h5 : βˆ€ (k : β„•), f (b ^ k * x) = f (b ^ k * y) h6 : N * x = N * y h7 : βˆ€ (y k : β„€), f (y + f 0 * k) = c * k + f y ⊒ x = y TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A4/A4.lean
IMOSL.IMO2014A4.map_is_linear
[78, 1]
[103, 43]
rw [h8, mul_zero, sub_eq_zero] at h4
case intro.intro.intro.intro b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 β‰  0 m n : β„• h3 : m β‰  n N : β„€ h4 : b ^ m - b ^ n = f 0 * N x y : β„€ h5 : βˆ€ (k : β„•), f (b ^ k * x) = f (b ^ k * y) h6 : N * x = N * y h7 : βˆ€ (y k : β„€), f (y + f 0 * k) = c * k + f y h8 : N = 0 ⊒ False
case intro.intro.intro.intro b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 β‰  0 m n : β„• h3 : m β‰  n N : β„€ h4 : b ^ m = b ^ n x y : β„€ h5 : βˆ€ (k : β„•), f (b ^ k * x) = f (b ^ k * y) h6 : N * x = N * y h7 : βˆ€ (y k : β„€), f (y + f 0 * k) = c * k + f y h8 : N = 0 ⊒ False
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 β‰  0 m n : β„• h3 : m β‰  n N : β„€ h4 : b ^ m - b ^ n = f 0 * N x y : β„€ h5 : βˆ€ (k : β„•), f (b ^ k * x) = f (b ^ k * y) h6 : N * x = N * y h7 : βˆ€ (y k : β„€), f (y + f 0 * k) = c * k + f y h8 : N = 0 ⊒ False TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A4/A4.lean
IMOSL.IMO2014A4.map_is_linear
[78, 1]
[103, 43]
exact h3 (Int.pow_right_injective h0 h4)
case intro.intro.intro.intro b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 β‰  0 m n : β„• h3 : m β‰  n N : β„€ h4 : b ^ m = b ^ n x y : β„€ h5 : βˆ€ (k : β„•), f (b ^ k * x) = f (b ^ k * y) h6 : N * x = N * y h7 : βˆ€ (y k : β„€), f (y + f 0 * k) = c * k + f y h8 : N = 0 ⊒ False
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 β‰  0 m n : β„• h3 : m β‰  n N : β„€ h4 : b ^ m = b ^ n x y : β„€ h5 : βˆ€ (k : β„•), f (b ^ k * x) = f (b ^ k * y) h6 : N * x = N * y h7 : βˆ€ (y k : β„€), f (y + f 0 * k) = c * k + f y h8 : N = 0 ⊒ False TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A4/A4.lean
IMOSL.IMO2014A4.map_is_linear
[78, 1]
[103, 43]
intro n
b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 this : Function.Injective f ⊒ βˆ€ (n : β„€), f n = (b - 1) * n + f 0
b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 this : Function.Injective f n : β„€ ⊒ f n = (b - 1) * n + f 0
Please generate a tactic in lean4 to solve the state. STATE: b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 this : Function.Injective f ⊒ βˆ€ (n : β„€), f n = (b - 1) * n + f 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A4/A4.lean
IMOSL.IMO2014A4.map_is_linear
[78, 1]
[103, 43]
have h2 := eq_add_of_sub_eq' (h 0 (b * n))
b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 this : Function.Injective f n : β„€ ⊒ f n = (b - 1) * n + f 0
b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 this : Function.Injective f n : β„€ h2 : f (b * n + f 0) = f (b * n) + (f (b * 0) - f 0 + c) ⊒ f n = (b - 1) * n + f 0
Please generate a tactic in lean4 to solve the state. STATE: b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 this : Function.Injective f n : β„€ ⊒ f n = (b - 1) * n + f 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A4/A4.lean
IMOSL.IMO2014A4.map_is_linear
[78, 1]
[103, 43]
rw [mul_zero, sub_self, zero_add, ← sub_left_inj (a := f n), add_sub_right_comm, ← h n n, sub_left_inj] at h2
b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 this : Function.Injective f n : β„€ h2 : f (b * n + f 0) = f (b * n) + (f (b * 0) - f 0 + c) ⊒ f n = (b - 1) * n + f 0
b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 this : Function.Injective f n : β„€ h2 : f (b * n + f 0) = f (n + f n) ⊒ f n = (b - 1) * n + f 0
Please generate a tactic in lean4 to solve the state. STATE: b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 this : Function.Injective f n : β„€ h2 : f (b * n + f 0) = f (b * n) + (f (b * 0) - f 0 + c) ⊒ f n = (b - 1) * n + f 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A4/A4.lean
IMOSL.IMO2014A4.map_is_linear
[78, 1]
[103, 43]
rw [sub_one_mul, ← add_sub_right_comm, this h2, add_sub_cancel_left]
b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 this : Function.Injective f n : β„€ h2 : f (b * n + f 0) = f (n + f n) ⊒ f n = (b - 1) * n + f 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 this : Function.Injective f n : β„€ h2 : f (b * n + f 0) = f (n + f n) ⊒ f n = (b - 1) * n + f 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A4/A4.lean
IMOSL.IMO2014A4.map_is_linear
[78, 1]
[103, 43]
have h3 := map_map_zero_add h 0
b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 = 0 ⊒ False
b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 = 0 h3 : f (0 + f 0) = c + f 0 ⊒ False
Please generate a tactic in lean4 to solve the state. STATE: b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 = 0 ⊒ False TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A4/A4.lean
IMOSL.IMO2014A4.map_is_linear
[78, 1]
[103, 43]
rw [zero_add, h2, h2, add_zero] at h3
b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 = 0 h3 : f (0 + f 0) = c + f 0 ⊒ False
b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 = 0 h3 : 0 = c ⊒ False
Please generate a tactic in lean4 to solve the state. STATE: b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 = 0 h3 : f (0 + f 0) = c + f 0 ⊒ False TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A4/A4.lean
IMOSL.IMO2014A4.map_is_linear
[78, 1]
[103, 43]
exact h1 h3.symm
b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 = 0 h3 : 0 = c ⊒ False
no goals
Please generate a tactic in lean4 to solve the state. STATE: b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 = 0 h3 : 0 = c ⊒ False TACTIC: