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/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.orbit_zero_bdd_of_not_injective
[90, 1]
[130, 53]
rcases exists_iter_add_large_eq h a k with ⟨N, h4⟩
case intro.intro.intro.intro.intro f : ℤ → ℤ h : good f h0 : ¬Injective f a : ℤ k : ℕ h1 : 0 < k h2 : f (a + ↑k) = f a K M : ℕ h3 : f^[K] a = f^[M] 0 ⊢ ∃ N, 0 < minimalPeriod f (f^[N] 0)
case intro.intro.intro.intro.intro.intro f : ℤ → ℤ h : good f h0 : ¬Injective f a : ℤ k : ℕ h1 : 0 < k h2 : f (a + ↑k) = f a K M : ℕ h3 : f^[K] a = f^[M] 0 N : ℕ h4 : f^[N + k] a = f^[N] (a + ↑k) ⊢ ∃ N, 0 < minimalPeriod f (f^[N] 0)
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro.intro f : ℤ → ℤ h : good f h0 : ¬Injective f a : ℤ k : ℕ h1 : 0 < k h2 : f (a + ↑k) = f a K M : ℕ h3 : f^[K] a = f^[M] 0 ⊢ ∃ N, 0 < minimalPeriod f (f^[N] 0) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.orbit_zero_bdd_of_not_injective
[90, 1]
[130, 53]
refine ⟨N + 1 + M, IsPeriodicPt.minimalPeriod_pos h1 ?_⟩
case intro.intro.intro.intro.intro.intro f : ℤ → ℤ h : good f h0 : ¬Injective f a : ℤ k : ℕ h1 : 0 < k h2 : f (a + ↑k) = f a K M : ℕ h3 : f^[K] a = f^[M] 0 N : ℕ h4 : f^[N + k] a = f^[N] (a + ↑k) ⊢ ∃ N, 0 < minimalPeriod f (f^[N] 0)
case intro.intro.intro.intro.intro.intro f : ℤ → ℤ h : good f h0 : ¬Injective f a : ℤ k : ℕ h1 : 0 < k h2 : f (a + ↑k) = f a K M : ℕ h3 : f^[K] a = f^[M] 0 N : ℕ h4 : f^[N + k] a = f^[N] (a + ↑k) ⊢ IsPeriodicPt f k (f^[N + 1 + M] 0)
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro.intro.intro f : ℤ → ℤ h : good f h0 : ¬Injective f a : ℤ k : ℕ h1 : 0 < k h2 : f (a + ↑k) = f a K M : ℕ h3 : f^[K] a = f^[M] 0 N : ℕ h4 : f^[N + k] a = f^[N] (a + ↑k) ⊢ ∃ N, 0 < minimalPeriod f (f^[N] 0) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.orbit_zero_bdd_of_not_injective
[90, 1]
[130, 53]
rw [iterate_add_apply, ← h3, Commute.iterate_iterate_self]
case intro.intro.intro.intro.intro.intro f : ℤ → ℤ h : good f h0 : ¬Injective f a : ℤ k : ℕ h1 : 0 < k h2 : f (a + ↑k) = f a K M : ℕ h3 : f^[K] a = f^[M] 0 N : ℕ h4 : f^[N + k] a = f^[N] (a + ↑k) ⊢ IsPeriodicPt f k (f^[N + 1 + M] 0)
case intro.intro.intro.intro.intro.intro f : ℤ → ℤ h : good f h0 : ¬Injective f a : ℤ k : ℕ h1 : 0 < k h2 : f (a + ↑k) = f a K M : ℕ h3 : f^[K] a = f^[M] 0 N : ℕ h4 : f^[N + k] a = f^[N] (a + ↑k) ⊢ IsPeriodicPt f k (f^[K] (f^[N + 1] a))
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro.intro.intro f : ℤ → ℤ h : good f h0 : ¬Injective f a : ℤ k : ℕ h1 : 0 < k h2 : f (a + ↑k) = f a K M : ℕ h3 : f^[K] a = f^[M] 0 N : ℕ h4 : f^[N + k] a = f^[N] (a + ↑k) ⊢ IsPeriodicPt f k (f^[N + 1 + M] 0) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.orbit_zero_bdd_of_not_injective
[90, 1]
[130, 53]
refine IsPeriodicPt.apply_iterate ?_ _
case intro.intro.intro.intro.intro.intro f : ℤ → ℤ h : good f h0 : ¬Injective f a : ℤ k : ℕ h1 : 0 < k h2 : f (a + ↑k) = f a K M : ℕ h3 : f^[K] a = f^[M] 0 N : ℕ h4 : f^[N + k] a = f^[N] (a + ↑k) ⊢ IsPeriodicPt f k (f^[K] (f^[N + 1] a))
case intro.intro.intro.intro.intro.intro f : ℤ → ℤ h : good f h0 : ¬Injective f a : ℤ k : ℕ h1 : 0 < k h2 : f (a + ↑k) = f a K M : ℕ h3 : f^[K] a = f^[M] 0 N : ℕ h4 : f^[N + k] a = f^[N] (a + ↑k) ⊢ IsPeriodicPt f k (f^[N + 1] a)
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro.intro.intro f : ℤ → ℤ h : good f h0 : ¬Injective f a : ℤ k : ℕ h1 : 0 < k h2 : f (a + ↑k) = f a K M : ℕ h3 : f^[K] a = f^[M] 0 N : ℕ h4 : f^[N + k] a = f^[N] (a + ↑k) ⊢ IsPeriodicPt f k (f^[K] (f^[N + 1] a)) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.orbit_zero_bdd_of_not_injective
[90, 1]
[130, 53]
rw [IsPeriodicPt, IsFixedPt, ← iterate_add_apply, iterate_succ_apply, ← h2, Commute.iterate_self, ← h4, add_left_comm, ← add_assoc, iterate_succ_apply']
case intro.intro.intro.intro.intro.intro f : ℤ → ℤ h : good f h0 : ¬Injective f a : ℤ k : ℕ h1 : 0 < k h2 : f (a + ↑k) = f a K M : ℕ h3 : f^[K] a = f^[M] 0 N : ℕ h4 : f^[N + k] a = f^[N] (a + ↑k) ⊢ IsPeriodicPt f k (f^[N + 1] a)
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro.intro.intro f : ℤ → ℤ h : good f h0 : ¬Injective f a : ℤ k : ℕ h1 : 0 < k h2 : f (a + ↑k) = f a K M : ℕ h3 : f^[K] a = f^[M] 0 N : ℕ h4 : f^[N + k] a = f^[N] (a + ↑k) ⊢ IsPeriodicPt f k (f^[N + 1] a) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.orbit_zero_bdd_of_not_injective
[90, 1]
[130, 53]
rcases this with ⟨N, h1⟩
f : ℤ → ℤ h : good f h0 : ¬Injective f this : ∃ N, 0 < minimalPeriod f (f^[N] 0) ⊢ ∃ M, ∀ (n : ℕ), |f^[n] 0| < M
case intro f : ℤ → ℤ h : good f h0 : ¬Injective f N : ℕ h1 : 0 < minimalPeriod f (f^[N] 0) ⊢ ∃ M, ∀ (n : ℕ), |f^[n] 0| < M
Please generate a tactic in lean4 to solve the state. STATE: f : ℤ → ℤ h : good f h0 : ¬Injective f this : ∃ N, 0 < minimalPeriod f (f^[N] 0) ⊢ ∃ M, ∀ (n : ℕ), |f^[n] 0| < M TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.orbit_zero_bdd_of_not_injective
[90, 1]
[130, 53]
let k := f.minimalPeriod (f^[N] 0)
case intro f : ℤ → ℤ h : good f h0 : ¬Injective f N : ℕ h1 : 0 < minimalPeriod f (f^[N] 0) ⊢ ∃ M, ∀ (n : ℕ), |f^[n] 0| < M
case intro f : ℤ → ℤ h : good f h0 : ¬Injective f N : ℕ h1 : 0 < minimalPeriod f (f^[N] 0) k : ℕ := minimalPeriod f (f^[N] 0) ⊢ ∃ M, ∀ (n : ℕ), |f^[n] 0| < M
Please generate a tactic in lean4 to solve the state. STATE: case intro f : ℤ → ℤ h : good f h0 : ¬Injective f N : ℕ h1 : 0 < minimalPeriod f (f^[N] 0) ⊢ ∃ M, ∀ (n : ℕ), |f^[n] 0| < M TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.orbit_zero_bdd_of_not_injective
[90, 1]
[130, 53]
let F := λ n ↦ |f^[n] 0|
case intro f : ℤ → ℤ h : good f h0 : ¬Injective f N : ℕ h1 : 0 < minimalPeriod f (f^[N] 0) k : ℕ := minimalPeriod f (f^[N] 0) ⊢ ∃ M, ∀ (n : ℕ), |f^[n] 0| < M
case intro f : ℤ → ℤ h : good f h0 : ¬Injective f N : ℕ h1 : 0 < minimalPeriod f (f^[N] 0) k : ℕ := minimalPeriod f (f^[N] 0) F : ℕ → ℤ := fun n => |f^[n] 0| ⊢ ∃ M, ∀ (n : ℕ), |f^[n] 0| < M
Please generate a tactic in lean4 to solve the state. STATE: case intro f : ℤ → ℤ h : good f h0 : ¬Injective f N : ℕ h1 : 0 < minimalPeriod f (f^[N] 0) k : ℕ := minimalPeriod f (f^[N] 0) ⊢ ∃ M, ∀ (n : ℕ), |f^[n] 0| < M TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.orbit_zero_bdd_of_not_injective
[90, 1]
[130, 53]
refine ⟨Extra.seqMax F (N + k) + 1, λ n ↦ Int.lt_add_one_of_le <| (n.le_total (N + k)).elim (Extra.le_seqMax_of_le F) (λ h2 ↦ ?_)⟩
case intro f : ℤ → ℤ h : good f h0 : ¬Injective f N : ℕ h1 : 0 < minimalPeriod f (f^[N] 0) k : ℕ := minimalPeriod f (f^[N] 0) F : ℕ → ℤ := fun n => |f^[n] 0| ⊢ ∃ M, ∀ (n : ℕ), |f^[n] 0| < M
case intro f : ℤ → ℤ h : good f h0 : ¬Injective f N : ℕ h1 : 0 < minimalPeriod f (f^[N] 0) k : ℕ := minimalPeriod f (f^[N] 0) F : ℕ → ℤ := fun n => |f^[n] 0| n : ℕ h2 : N + k ≤ n ⊢ |f^[n] 0| ≤ Extra.seqMax F (N + k)
Please generate a tactic in lean4 to solve the state. STATE: case intro f : ℤ → ℤ h : good f h0 : ¬Injective f N : ℕ h1 : 0 < minimalPeriod f (f^[N] 0) k : ℕ := minimalPeriod f (f^[N] 0) F : ℕ → ℤ := fun n => |f^[n] 0| ⊢ ∃ M, ∀ (n : ℕ), |f^[n] 0| < M TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.orbit_zero_bdd_of_not_injective
[90, 1]
[130, 53]
rw [le_iff_exists_add] at h2
case intro f : ℤ → ℤ h : good f h0 : ¬Injective f N : ℕ h1 : 0 < minimalPeriod f (f^[N] 0) k : ℕ := minimalPeriod f (f^[N] 0) F : ℕ → ℤ := fun n => |f^[n] 0| n : ℕ h2 : N + k ≤ n ⊢ |f^[n] 0| ≤ Extra.seqMax F (N + k)
case intro f : ℤ → ℤ h : good f h0 : ¬Injective f N : ℕ h1 : 0 < minimalPeriod f (f^[N] 0) k : ℕ := minimalPeriod f (f^[N] 0) F : ℕ → ℤ := fun n => |f^[n] 0| n : ℕ h2 : ∃ c, n = N + k + c ⊢ |f^[n] 0| ≤ Extra.seqMax F (N + k)
Please generate a tactic in lean4 to solve the state. STATE: case intro f : ℤ → ℤ h : good f h0 : ¬Injective f N : ℕ h1 : 0 < minimalPeriod f (f^[N] 0) k : ℕ := minimalPeriod f (f^[N] 0) F : ℕ → ℤ := fun n => |f^[n] 0| n : ℕ h2 : N + k ≤ n ⊢ |f^[n] 0| ≤ Extra.seqMax F (N + k) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.orbit_zero_bdd_of_not_injective
[90, 1]
[130, 53]
rcases h2 with ⟨c, rfl⟩
case intro f : ℤ → ℤ h : good f h0 : ¬Injective f N : ℕ h1 : 0 < minimalPeriod f (f^[N] 0) k : ℕ := minimalPeriod f (f^[N] 0) F : ℕ → ℤ := fun n => |f^[n] 0| n : ℕ h2 : ∃ c, n = N + k + c ⊢ |f^[n] 0| ≤ Extra.seqMax F (N + k)
case intro.intro f : ℤ → ℤ h : good f h0 : ¬Injective f N : ℕ h1 : 0 < minimalPeriod f (f^[N] 0) k : ℕ := minimalPeriod f (f^[N] 0) F : ℕ → ℤ := fun n => |f^[n] 0| c : ℕ ⊢ |f^[N + k + c] 0| ≤ Extra.seqMax F (N + k)
Please generate a tactic in lean4 to solve the state. STATE: case intro f : ℤ → ℤ h : good f h0 : ¬Injective f N : ℕ h1 : 0 < minimalPeriod f (f^[N] 0) k : ℕ := minimalPeriod f (f^[N] 0) F : ℕ → ℤ := fun n => |f^[n] 0| n : ℕ h2 : ∃ c, n = N + k + c ⊢ |f^[n] 0| ≤ Extra.seqMax F (N + k) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.orbit_zero_bdd_of_not_injective
[90, 1]
[130, 53]
rw [add_rotate, iterate_add_apply, ← iterate_mod_minimalPeriod_eq, Nat.add_mod_left, ← iterate_add_apply, add_comm]
case intro.intro f : ℤ → ℤ h : good f h0 : ¬Injective f N : ℕ h1 : 0 < minimalPeriod f (f^[N] 0) k : ℕ := minimalPeriod f (f^[N] 0) F : ℕ → ℤ := fun n => |f^[n] 0| c : ℕ ⊢ |f^[N + k + c] 0| ≤ Extra.seqMax F (N + k)
case intro.intro f : ℤ → ℤ h : good f h0 : ¬Injective f N : ℕ h1 : 0 < minimalPeriod f (f^[N] 0) k : ℕ := minimalPeriod f (f^[N] 0) F : ℕ → ℤ := fun n => |f^[n] 0| c : ℕ ⊢ |f^[N + c % k] 0| ≤ Extra.seqMax F (N + k)
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro f : ℤ → ℤ h : good f h0 : ¬Injective f N : ℕ h1 : 0 < minimalPeriod f (f^[N] 0) k : ℕ := minimalPeriod f (f^[N] 0) F : ℕ → ℤ := fun n => |f^[n] 0| c : ℕ ⊢ |f^[N + k + c] 0| ≤ Extra.seqMax F (N + k) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.orbit_zero_bdd_of_not_injective
[90, 1]
[130, 53]
exact Extra.le_seqMax_of_le F (add_le_add_left (c.mod_lt h1).le N)
case intro.intro f : ℤ → ℤ h : good f h0 : ¬Injective f N : ℕ h1 : 0 < minimalPeriod f (f^[N] 0) k : ℕ := minimalPeriod f (f^[N] 0) F : ℕ → ℤ := fun n => |f^[n] 0| c : ℕ ⊢ |f^[N + c % k] 0| ≤ Extra.seqMax F (N + k)
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro f : ℤ → ℤ h : good f h0 : ¬Injective f N : ℕ h1 : 0 < minimalPeriod f (f^[N] 0) k : ℕ := minimalPeriod f (f^[N] 0) F : ℕ → ℤ := fun n => |f^[n] 0| c : ℕ ⊢ |f^[N + c % k] 0| ≤ Extra.seqMax F (N + k) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.orbit_zero_bdd_of_not_injective
[90, 1]
[130, 53]
suffices ∃ a b, a < b ∧ f a = f b by rcases this with ⟨a, b, h1, h2⟩ apply sub_pos_of_lt at h1 refine ⟨a, (b - a).natAbs, Int.natAbs_pos.mpr h1.ne.symm, ?_⟩ rw [Int.natCast_natAbs, abs_of_pos h1, add_sub_cancel, h2]
f : ℤ → ℤ h : good f h0 : ¬Injective f ⊢ ∃ a k, 0 < k ∧ f (a + ↑k) = f a
f : ℤ → ℤ h : good f h0 : ¬Injective f ⊢ ∃ a b, a < b ∧ f a = f b
Please generate a tactic in lean4 to solve the state. STATE: f : ℤ → ℤ h : good f h0 : ¬Injective f ⊢ ∃ a k, 0 < k ∧ f (a + ↑k) = f a TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.orbit_zero_bdd_of_not_injective
[90, 1]
[130, 53]
simp_rw [Injective, not_forall] at h0
f : ℤ → ℤ h : good f h0 : ¬Injective f ⊢ ∃ a b, a < b ∧ f a = f b
f : ℤ → ℤ h : good f h0 : ∃ x x_1, ∃ (_ : f x = f x_1), ¬x = x_1 ⊢ ∃ a b, a < b ∧ f a = f b
Please generate a tactic in lean4 to solve the state. STATE: f : ℤ → ℤ h : good f h0 : ¬Injective f ⊢ ∃ a b, a < b ∧ f a = f b TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.orbit_zero_bdd_of_not_injective
[90, 1]
[130, 53]
rcases h0 with ⟨a, b, h0, h1⟩
f : ℤ → ℤ h : good f h0 : ∃ x x_1, ∃ (_ : f x = f x_1), ¬x = x_1 ⊢ ∃ a b, a < b ∧ f a = f b
case intro.intro.intro f : ℤ → ℤ h : good f a b : ℤ h0 : f a = f b h1 : ¬a = b ⊢ ∃ a b, a < b ∧ f a = f b
Please generate a tactic in lean4 to solve the state. STATE: f : ℤ → ℤ h : good f h0 : ∃ x x_1, ∃ (_ : f x = f x_1), ¬x = x_1 ⊢ ∃ a b, a < b ∧ f a = f b TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.orbit_zero_bdd_of_not_injective
[90, 1]
[130, 53]
rcases ne_iff_lt_or_gt.mp h1 with h2 | h2
case intro.intro.intro f : ℤ → ℤ h : good f a b : ℤ h0 : f a = f b h1 : ¬a = b ⊢ ∃ a b, a < b ∧ f a = f b
case intro.intro.intro.inl f : ℤ → ℤ h : good f a b : ℤ h0 : f a = f b h1 : ¬a = b h2 : a < b ⊢ ∃ a b, a < b ∧ f a = f b case intro.intro.intro.inr f : ℤ → ℤ h : good f a b : ℤ h0 : f a = f b h1 : ¬a = b h2 : a > b ⊢ ∃ a b, a < b ∧ f a = f b
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro f : ℤ → ℤ h : good f a b : ℤ h0 : f a = f b h1 : ¬a = b ⊢ ∃ a b, a < b ∧ f a = f b TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.orbit_zero_bdd_of_not_injective
[90, 1]
[130, 53]
exacts [⟨a, b, h2, h0⟩, ⟨b, a, h2, h0.symm⟩]
case intro.intro.intro.inl f : ℤ → ℤ h : good f a b : ℤ h0 : f a = f b h1 : ¬a = b h2 : a < b ⊢ ∃ a b, a < b ∧ f a = f b case intro.intro.intro.inr f : ℤ → ℤ h : good f a b : ℤ h0 : f a = f b h1 : ¬a = b h2 : a > b ⊢ ∃ a b, a < b ∧ f a = f b
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.inl f : ℤ → ℤ h : good f a b : ℤ h0 : f a = f b h1 : ¬a = b h2 : a < b ⊢ ∃ a b, a < b ∧ f a = f b case intro.intro.intro.inr f : ℤ → ℤ h : good f a b : ℤ h0 : f a = f b h1 : ¬a = b h2 : a > b ⊢ ∃ a b, a < b ∧ f a = f b TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.orbit_zero_bdd_of_not_injective
[90, 1]
[130, 53]
rcases this with ⟨a, b, h1, h2⟩
f : ℤ → ℤ h : good f h0 : ¬Injective f this : ∃ a b, a < b ∧ f a = f b ⊢ ∃ a k, 0 < k ∧ f (a + ↑k) = f a
case intro.intro.intro f : ℤ → ℤ h : good f h0 : ¬Injective f a b : ℤ h1 : a < b h2 : f a = f b ⊢ ∃ a k, 0 < k ∧ f (a + ↑k) = f a
Please generate a tactic in lean4 to solve the state. STATE: f : ℤ → ℤ h : good f h0 : ¬Injective f this : ∃ a b, a < b ∧ f a = f b ⊢ ∃ a k, 0 < k ∧ f (a + ↑k) = f a TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.orbit_zero_bdd_of_not_injective
[90, 1]
[130, 53]
apply sub_pos_of_lt at h1
case intro.intro.intro f : ℤ → ℤ h : good f h0 : ¬Injective f a b : ℤ h1 : a < b h2 : f a = f b ⊢ ∃ a k, 0 < k ∧ f (a + ↑k) = f a
case intro.intro.intro f : ℤ → ℤ h : good f h0 : ¬Injective f a b : ℤ h2 : f a = f b h1 : 0 < b - a ⊢ ∃ a k, 0 < k ∧ f (a + ↑k) = f a
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro f : ℤ → ℤ h : good f h0 : ¬Injective f a b : ℤ h1 : a < b h2 : f a = f b ⊢ ∃ a k, 0 < k ∧ f (a + ↑k) = f a TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.orbit_zero_bdd_of_not_injective
[90, 1]
[130, 53]
refine ⟨a, (b - a).natAbs, Int.natAbs_pos.mpr h1.ne.symm, ?_⟩
case intro.intro.intro f : ℤ → ℤ h : good f h0 : ¬Injective f a b : ℤ h2 : f a = f b h1 : 0 < b - a ⊢ ∃ a k, 0 < k ∧ f (a + ↑k) = f a
case intro.intro.intro f : ℤ → ℤ h : good f h0 : ¬Injective f a b : ℤ h2 : f a = f b h1 : 0 < b - a ⊢ f (a + ↑(b - a).natAbs) = f a
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro f : ℤ → ℤ h : good f h0 : ¬Injective f a b : ℤ h2 : f a = f b h1 : 0 < b - a ⊢ ∃ a k, 0 < k ∧ f (a + ↑k) = f a TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.orbit_zero_bdd_of_not_injective
[90, 1]
[130, 53]
rw [Int.natCast_natAbs, abs_of_pos h1, add_sub_cancel, h2]
case intro.intro.intro f : ℤ → ℤ h : good f h0 : ¬Injective f a b : ℤ h2 : f a = f b h1 : 0 < b - a ⊢ f (a + ↑(b - a).natAbs) = f a
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro f : ℤ → ℤ h : good f h0 : ¬Injective f a b : ℤ h2 : f a = f b h1 : 0 < b - a ⊢ f (a + ↑(b - a).natAbs) = f a TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.orbit_zero_bdd_of_not_injective
[90, 1]
[130, 53]
rcases le_total a 0 with h3 | h3
f : ℤ → ℤ h : good f h0 : ¬Injective f a : ℤ k : ℕ h1 : 0 < k h2 : f (a + ↑k) = f a ⊢ ∃ K M, f^[K] a = f^[M] 0
case inl f : ℤ → ℤ h : good f h0 : ¬Injective f a : ℤ k : ℕ h1 : 0 < k h2 : f (a + ↑k) = f a h3 : a ≤ 0 ⊢ ∃ K M, f^[K] a = f^[M] 0 case inr f : ℤ → ℤ h : good f h0 : ¬Injective f a : ℤ k : ℕ h1 : 0 < k h2 : f (a + ↑k) = f a h3 : 0 ≤ a ⊢ ∃ K M, f^[K] a = f^[M] 0
Please generate a tactic in lean4 to solve the state. STATE: f : ℤ → ℤ h : good f h0 : ¬Injective f a : ℤ k : ℕ h1 : 0 < k h2 : f (a + ↑k) = f a ⊢ ∃ K M, f^[K] a = f^[M] 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.orbit_zero_bdd_of_not_injective
[90, 1]
[130, 53]
rcases exists_iter_add_large_eq h a a.natAbs with ⟨N, h4⟩
case inl f : ℤ → ℤ h : good f h0 : ¬Injective f a : ℤ k : ℕ h1 : 0 < k h2 : f (a + ↑k) = f a h3 : a ≤ 0 ⊢ ∃ K M, f^[K] a = f^[M] 0
case inl.intro f : ℤ → ℤ h : good f h0 : ¬Injective f a : ℤ k : ℕ h1 : 0 < k h2 : f (a + ↑k) = f a h3 : a ≤ 0 N : ℕ h4 : f^[N + a.natAbs] a = f^[N] (a + ↑a.natAbs) ⊢ ∃ K M, f^[K] a = f^[M] 0
Please generate a tactic in lean4 to solve the state. STATE: case inl f : ℤ → ℤ h : good f h0 : ¬Injective f a : ℤ k : ℕ h1 : 0 < k h2 : f (a + ↑k) = f a h3 : a ≤ 0 ⊢ ∃ K M, f^[K] a = f^[M] 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.orbit_zero_bdd_of_not_injective
[90, 1]
[130, 53]
rw [Int.natCast_natAbs, abs_of_nonpos h3, add_neg_self] at h4
case inl.intro f : ℤ → ℤ h : good f h0 : ¬Injective f a : ℤ k : ℕ h1 : 0 < k h2 : f (a + ↑k) = f a h3 : a ≤ 0 N : ℕ h4 : f^[N + a.natAbs] a = f^[N] (a + ↑a.natAbs) ⊢ ∃ K M, f^[K] a = f^[M] 0
case inl.intro f : ℤ → ℤ h : good f h0 : ¬Injective f a : ℤ k : ℕ h1 : 0 < k h2 : f (a + ↑k) = f a h3 : a ≤ 0 N : ℕ h4 : f^[N + a.natAbs] a = f^[N] 0 ⊢ ∃ K M, f^[K] a = f^[M] 0
Please generate a tactic in lean4 to solve the state. STATE: case inl.intro f : ℤ → ℤ h : good f h0 : ¬Injective f a : ℤ k : ℕ h1 : 0 < k h2 : f (a + ↑k) = f a h3 : a ≤ 0 N : ℕ h4 : f^[N + a.natAbs] a = f^[N] (a + ↑a.natAbs) ⊢ ∃ K M, f^[K] a = f^[M] 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.orbit_zero_bdd_of_not_injective
[90, 1]
[130, 53]
exact ⟨_, _, h4⟩
case inl.intro f : ℤ → ℤ h : good f h0 : ¬Injective f a : ℤ k : ℕ h1 : 0 < k h2 : f (a + ↑k) = f a h3 : a ≤ 0 N : ℕ h4 : f^[N + a.natAbs] a = f^[N] 0 ⊢ ∃ K M, f^[K] a = f^[M] 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: case inl.intro f : ℤ → ℤ h : good f h0 : ¬Injective f a : ℤ k : ℕ h1 : 0 < k h2 : f (a + ↑k) = f a h3 : a ≤ 0 N : ℕ h4 : f^[N + a.natAbs] a = f^[N] 0 ⊢ ∃ K M, f^[K] a = f^[M] 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.orbit_zero_bdd_of_not_injective
[90, 1]
[130, 53]
rcases exists_iter_add_large_eq h 0 a.natAbs with ⟨N, h4⟩
case inr f : ℤ → ℤ h : good f h0 : ¬Injective f a : ℤ k : ℕ h1 : 0 < k h2 : f (a + ↑k) = f a h3 : 0 ≤ a ⊢ ∃ K M, f^[K] a = f^[M] 0
case inr.intro f : ℤ → ℤ h : good f h0 : ¬Injective f a : ℤ k : ℕ h1 : 0 < k h2 : f (a + ↑k) = f a h3 : 0 ≤ a N : ℕ h4 : f^[N + a.natAbs] 0 = f^[N] (0 + ↑a.natAbs) ⊢ ∃ K M, f^[K] a = f^[M] 0
Please generate a tactic in lean4 to solve the state. STATE: case inr f : ℤ → ℤ h : good f h0 : ¬Injective f a : ℤ k : ℕ h1 : 0 < k h2 : f (a + ↑k) = f a h3 : 0 ≤ a ⊢ ∃ K M, f^[K] a = f^[M] 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.orbit_zero_bdd_of_not_injective
[90, 1]
[130, 53]
rw [Int.natCast_natAbs, abs_of_nonneg h3, zero_add] at h4
case inr.intro f : ℤ → ℤ h : good f h0 : ¬Injective f a : ℤ k : ℕ h1 : 0 < k h2 : f (a + ↑k) = f a h3 : 0 ≤ a N : ℕ h4 : f^[N + a.natAbs] 0 = f^[N] (0 + ↑a.natAbs) ⊢ ∃ K M, f^[K] a = f^[M] 0
case inr.intro f : ℤ → ℤ h : good f h0 : ¬Injective f a : ℤ k : ℕ h1 : 0 < k h2 : f (a + ↑k) = f a h3 : 0 ≤ a N : ℕ h4 : f^[N + a.natAbs] 0 = f^[N] a ⊢ ∃ K M, f^[K] a = f^[M] 0
Please generate a tactic in lean4 to solve the state. STATE: case inr.intro f : ℤ → ℤ h : good f h0 : ¬Injective f a : ℤ k : ℕ h1 : 0 < k h2 : f (a + ↑k) = f a h3 : 0 ≤ a N : ℕ h4 : f^[N + a.natAbs] 0 = f^[N] (0 + ↑a.natAbs) ⊢ ∃ K M, f^[K] a = f^[M] 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.orbit_zero_bdd_of_not_injective
[90, 1]
[130, 53]
exact ⟨_, _, h4.symm⟩
case inr.intro f : ℤ → ℤ h : good f h0 : ¬Injective f a : ℤ k : ℕ h1 : 0 < k h2 : f (a + ↑k) = f a h3 : 0 ≤ a N : ℕ h4 : f^[N + a.natAbs] 0 = f^[N] a ⊢ ∃ K M, f^[K] a = f^[M] 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: case inr.intro f : ℤ → ℤ h : good f h0 : ¬Injective f a : ℤ k : ℕ h1 : 0 < k h2 : f (a + ↑k) = f a h3 : 0 ≤ a N : ℕ h4 : f^[N + a.natAbs] 0 = f^[N] a ⊢ ∃ K M, f^[K] a = f^[M] 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.eq_zero_of_not_injective
[132, 1]
[162, 27]
rcases h0 with ⟨M, h0⟩
f : ℤ → ℤ h : good f h0 : ∃ M, ∀ (n : ℕ), |f^[n] 0| < M ⊢ f = 0
case intro f : ℤ → ℤ h : good f M : ℤ h0 : ∀ (n : ℕ), |f^[n] 0| < M ⊢ f = 0
Please generate a tactic in lean4 to solve the state. STATE: f : ℤ → ℤ h : good f h0 : ∃ M, ∀ (n : ℕ), |f^[n] 0| < M ⊢ f = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.eq_zero_of_not_injective
[132, 1]
[162, 27]
have h1 (a : ℤ) : f^[2 * a.natAbs ^ 2] 0 = a * (f a - f (-a)) := by have h := h a (-a); rwa [a.natAbs_neg, add_neg_self, ← two_mul, neg_mul, ← sub_eq_add_neg, ← mul_sub] at h
case intro f : ℤ → ℤ h : good f M : ℤ h0 : ∀ (n : ℕ), |f^[n] 0| < M ⊢ f = 0
case intro f : ℤ → ℤ h : good f M : ℤ h0 : ∀ (n : ℕ), |f^[n] 0| < M h1 : ∀ (a : ℤ), f^[2 * a.natAbs ^ 2] 0 = a * (f a - f (-a)) ⊢ f = 0
Please generate a tactic in lean4 to solve the state. STATE: case intro f : ℤ → ℤ h : good f M : ℤ h0 : ∀ (n : ℕ), |f^[n] 0| < M ⊢ f = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.eq_zero_of_not_injective
[132, 1]
[162, 27]
replace h0 (a : ℤ) (h2 : M ≤ a) : f.IsPeriodicPt (2 * a.natAbs ^ 2) 0 := Int.eq_zero_of_abs_lt_dvd ⟨_, h1 a⟩ ((h0 _).trans_le h2)
case intro f : ℤ → ℤ h : good f M : ℤ h0 : ∀ (n : ℕ), |f^[n] 0| < M h1 : ∀ (a : ℤ), f^[2 * a.natAbs ^ 2] 0 = a * (f a - f (-a)) ⊢ f = 0
case intro f : ℤ → ℤ h : good f M : ℤ h1 : ∀ (a : ℤ), f^[2 * a.natAbs ^ 2] 0 = a * (f a - f (-a)) h0 : ∀ (a : ℤ), M ≤ a → IsPeriodicPt f (2 * a.natAbs ^ 2) 0 ⊢ f = 0
Please generate a tactic in lean4 to solve the state. STATE: case intro f : ℤ → ℤ h : good f M : ℤ h0 : ∀ (n : ℕ), |f^[n] 0| < M h1 : ∀ (a : ℤ), f^[2 * a.natAbs ^ 2] 0 = a * (f a - f (-a)) ⊢ f = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.eq_zero_of_not_injective
[132, 1]
[162, 27]
replace h0 : f.IsPeriodicPt 2 0 := by have h2 := (h0 _ M.le_refl).gcd (h0 _ M.lt_succ.le) have h3 : IsCoprime M (M + 1) := ⟨-1, 1, by rw [one_mul, neg_one_mul, neg_add_cancel_left]⟩ rwa [Nat.gcd_mul_left, ← Int.natAbs_pow, ← Int.natAbs_pow, ← Int.gcd_eq_natAbs, Int.gcd_eq_one_iff_coprime.mpr h3.pow, mul_one] at h2
case intro f : ℤ → ℤ h : good f M : ℤ h1 : ∀ (a : ℤ), f^[2 * a.natAbs ^ 2] 0 = a * (f a - f (-a)) h0 : ∀ (a : ℤ), M ≤ a → IsPeriodicPt f (2 * a.natAbs ^ 2) 0 ⊢ f = 0
case intro f : ℤ → ℤ h : good f M : ℤ h1 : ∀ (a : ℤ), f^[2 * a.natAbs ^ 2] 0 = a * (f a - f (-a)) h0 : IsPeriodicPt f 2 0 ⊢ f = 0
Please generate a tactic in lean4 to solve the state. STATE: case intro f : ℤ → ℤ h : good f M : ℤ h1 : ∀ (a : ℤ), f^[2 * a.natAbs ^ 2] 0 = a * (f a - f (-a)) h0 : ∀ (a : ℤ), M ≤ a → IsPeriodicPt f (2 * a.natAbs ^ 2) 0 ⊢ f = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.eq_zero_of_not_injective
[132, 1]
[162, 27]
replace h1 (a : ℤ) (h3 : a ≠ 0) : f a = f (-a) := by specialize h1 a rw [h0.mul_const, zero_eq_mul] at h1 exact eq_of_sub_eq_zero (h1.resolve_left h3)
case intro f : ℤ → ℤ h : good f M : ℤ h1 : ∀ (a : ℤ), f^[2 * a.natAbs ^ 2] 0 = a * (f a - f (-a)) h0 : IsPeriodicPt f 2 0 ⊢ f = 0
case intro f : ℤ → ℤ h : good f M : ℤ h0 : IsPeriodicPt f 2 0 h1 : ∀ (a : ℤ), a ≠ 0 → f a = f (-a) ⊢ f = 0
Please generate a tactic in lean4 to solve the state. STATE: case intro f : ℤ → ℤ h : good f M : ℤ h1 : ∀ (a : ℤ), f^[2 * a.natAbs ^ 2] 0 = a * (f a - f (-a)) h0 : IsPeriodicPt f 2 0 ⊢ f = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.eq_zero_of_not_injective
[132, 1]
[162, 27]
suffices h2 : ∀ a : ℤ, a ≠ 0 → f a = 0 by have h3 : f (f 2) = 1 * f 1 + 1 * f 1 := h 1 1 rw [h2 1 one_ne_zero, h2 _ two_ne_zero] at h3 exact funext λ a ↦ (ne_or_eq a 0).elim (h2 a) (λ h4 ↦ h4.symm ▸ h3)
case intro f : ℤ → ℤ h : good f M : ℤ h0 : IsPeriodicPt f 2 0 h1 : ∀ (a : ℤ), a ≠ 0 → f a = f (-a) ⊢ f = 0
case intro f : ℤ → ℤ h : good f M : ℤ h0 : IsPeriodicPt f 2 0 h1 : ∀ (a : ℤ), a ≠ 0 → f a = f (-a) ⊢ ∀ (a : ℤ), a ≠ 0 → f a = 0
Please generate a tactic in lean4 to solve the state. STATE: case intro f : ℤ → ℤ h : good f M : ℤ h0 : IsPeriodicPt f 2 0 h1 : ∀ (a : ℤ), a ≠ 0 → f a = f (-a) ⊢ f = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.eq_zero_of_not_injective
[132, 1]
[162, 27]
intro a h2
case intro f : ℤ → ℤ h : good f M : ℤ h0 : IsPeriodicPt f 2 0 h1 : ∀ (a : ℤ), a ≠ 0 → f a = f (-a) ⊢ ∀ (a : ℤ), a ≠ 0 → f a = 0
case intro f : ℤ → ℤ h : good f M : ℤ h0 : IsPeriodicPt f 2 0 h1 : ∀ (a : ℤ), a ≠ 0 → f a = f (-a) a : ℤ h2 : a ≠ 0 ⊢ f a = 0
Please generate a tactic in lean4 to solve the state. STATE: case intro f : ℤ → ℤ h : good f M : ℤ h0 : IsPeriodicPt f 2 0 h1 : ∀ (a : ℤ), a ≠ 0 → f a = f (-a) ⊢ ∀ (a : ℤ), a ≠ 0 → f a = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.eq_zero_of_not_injective
[132, 1]
[162, 27]
obtain ⟨n, h3⟩ : ∃ n : ℕ, a.natAbs ^ 2 = n.succ := Nat.exists_eq_succ_of_ne_zero (pow_ne_zero 2 <| Int.natAbs_ne_zero.mpr h2)
case intro f : ℤ → ℤ h : good f M : ℤ h0 : IsPeriodicPt f 2 0 h1 : ∀ (a : ℤ), a ≠ 0 → f a = f (-a) a : ℤ h2 : a ≠ 0 ⊢ f a = 0
case intro.intro f : ℤ → ℤ h : good f M : ℤ h0 : IsPeriodicPt f 2 0 h1 : ∀ (a : ℤ), a ≠ 0 → f a = f (-a) a : ℤ h2 : a ≠ 0 n : ℕ h3 : a.natAbs ^ 2 = n.succ ⊢ f a = 0
Please generate a tactic in lean4 to solve the state. STATE: case intro f : ℤ → ℤ h : good f M : ℤ h0 : IsPeriodicPt f 2 0 h1 : ∀ (a : ℤ), a ≠ 0 → f a = f (-a) a : ℤ h2 : a ≠ 0 ⊢ f a = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.eq_zero_of_not_injective
[132, 1]
[162, 27]
have h4 := map_iterate_sq h (-a)
case intro.intro f : ℤ → ℤ h : good f M : ℤ h0 : IsPeriodicPt f 2 0 h1 : ∀ (a : ℤ), a ≠ 0 → f a = f (-a) a : ℤ h2 : a ≠ 0 n : ℕ h3 : a.natAbs ^ 2 = n.succ ⊢ f a = 0
case intro.intro f : ℤ → ℤ h : good f M : ℤ h0 : IsPeriodicPt f 2 0 h1 : ∀ (a : ℤ), a ≠ 0 → f a = f (-a) a : ℤ h2 : a ≠ 0 n : ℕ h3 : a.natAbs ^ 2 = n.succ h4 : f^[(-a).natAbs ^ 2] (-a) = -a * f (-a) ⊢ f a = 0
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro f : ℤ → ℤ h : good f M : ℤ h0 : IsPeriodicPt f 2 0 h1 : ∀ (a : ℤ), a ≠ 0 → f a = f (-a) a : ℤ h2 : a ≠ 0 n : ℕ h3 : a.natAbs ^ 2 = n.succ ⊢ f a = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.eq_zero_of_not_injective
[132, 1]
[162, 27]
rw [Int.natAbs_neg, h3, iterate_succ_apply, ← h1 a h2, ← iterate_succ_apply, ← h3, map_iterate_sq h, neg_mul, eq_neg_self_iff, mul_eq_zero] at h4
case intro.intro f : ℤ → ℤ h : good f M : ℤ h0 : IsPeriodicPt f 2 0 h1 : ∀ (a : ℤ), a ≠ 0 → f a = f (-a) a : ℤ h2 : a ≠ 0 n : ℕ h3 : a.natAbs ^ 2 = n.succ h4 : f^[(-a).natAbs ^ 2] (-a) = -a * f (-a) ⊢ f a = 0
case intro.intro f : ℤ → ℤ h : good f M : ℤ h0 : IsPeriodicPt f 2 0 h1 : ∀ (a : ℤ), a ≠ 0 → f a = f (-a) a : ℤ h2 : a ≠ 0 n : ℕ h3 : a.natAbs ^ 2 = n.succ h4 : a = 0 ∨ f a = 0 ⊢ f a = 0
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro f : ℤ → ℤ h : good f M : ℤ h0 : IsPeriodicPt f 2 0 h1 : ∀ (a : ℤ), a ≠ 0 → f a = f (-a) a : ℤ h2 : a ≠ 0 n : ℕ h3 : a.natAbs ^ 2 = n.succ h4 : f^[(-a).natAbs ^ 2] (-a) = -a * f (-a) ⊢ f a = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.eq_zero_of_not_injective
[132, 1]
[162, 27]
exact h4.resolve_left h2
case intro.intro f : ℤ → ℤ h : good f M : ℤ h0 : IsPeriodicPt f 2 0 h1 : ∀ (a : ℤ), a ≠ 0 → f a = f (-a) a : ℤ h2 : a ≠ 0 n : ℕ h3 : a.natAbs ^ 2 = n.succ h4 : a = 0 ∨ f a = 0 ⊢ f a = 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro f : ℤ → ℤ h : good f M : ℤ h0 : IsPeriodicPt f 2 0 h1 : ∀ (a : ℤ), a ≠ 0 → f a = f (-a) a : ℤ h2 : a ≠ 0 n : ℕ h3 : a.natAbs ^ 2 = n.succ h4 : a = 0 ∨ f a = 0 ⊢ f a = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.eq_zero_of_not_injective
[132, 1]
[162, 27]
have h := h a (-a)
f : ℤ → ℤ h : good f M : ℤ h0 : ∀ (n : ℕ), |f^[n] 0| < M a : ℤ ⊢ f^[2 * a.natAbs ^ 2] 0 = a * (f a - f (-a))
f : ℤ → ℤ h✝ : good f M : ℤ h0 : ∀ (n : ℕ), |f^[n] 0| < M a : ℤ h : f^[a.natAbs ^ 2 + (-a).natAbs ^ 2] (a + -a) = a * f a + -a * f (-a) ⊢ f^[2 * a.natAbs ^ 2] 0 = a * (f a - f (-a))
Please generate a tactic in lean4 to solve the state. STATE: f : ℤ → ℤ h : good f M : ℤ h0 : ∀ (n : ℕ), |f^[n] 0| < M a : ℤ ⊢ f^[2 * a.natAbs ^ 2] 0 = a * (f a - f (-a)) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.eq_zero_of_not_injective
[132, 1]
[162, 27]
rwa [a.natAbs_neg, add_neg_self, ← two_mul, neg_mul, ← sub_eq_add_neg, ← mul_sub] at h
f : ℤ → ℤ h✝ : good f M : ℤ h0 : ∀ (n : ℕ), |f^[n] 0| < M a : ℤ h : f^[a.natAbs ^ 2 + (-a).natAbs ^ 2] (a + -a) = a * f a + -a * f (-a) ⊢ f^[2 * a.natAbs ^ 2] 0 = a * (f a - f (-a))
no goals
Please generate a tactic in lean4 to solve the state. STATE: f : ℤ → ℤ h✝ : good f M : ℤ h0 : ∀ (n : ℕ), |f^[n] 0| < M a : ℤ h : f^[a.natAbs ^ 2 + (-a).natAbs ^ 2] (a + -a) = a * f a + -a * f (-a) ⊢ f^[2 * a.natAbs ^ 2] 0 = a * (f a - f (-a)) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.eq_zero_of_not_injective
[132, 1]
[162, 27]
have h2 := (h0 _ M.le_refl).gcd (h0 _ M.lt_succ.le)
f : ℤ → ℤ h : good f M : ℤ h1 : ∀ (a : ℤ), f^[2 * a.natAbs ^ 2] 0 = a * (f a - f (-a)) h0 : ∀ (a : ℤ), M ≤ a → IsPeriodicPt f (2 * a.natAbs ^ 2) 0 ⊢ IsPeriodicPt f 2 0
f : ℤ → ℤ h : good f M : ℤ h1 : ∀ (a : ℤ), f^[2 * a.natAbs ^ 2] 0 = a * (f a - f (-a)) h0 : ∀ (a : ℤ), M ≤ a → IsPeriodicPt f (2 * a.natAbs ^ 2) 0 h2 : IsPeriodicPt f ((2 * M.natAbs ^ 2).gcd (2 * (M + 1).natAbs ^ 2)) 0 ⊢ IsPeriodicPt f 2 0
Please generate a tactic in lean4 to solve the state. STATE: f : ℤ → ℤ h : good f M : ℤ h1 : ∀ (a : ℤ), f^[2 * a.natAbs ^ 2] 0 = a * (f a - f (-a)) h0 : ∀ (a : ℤ), M ≤ a → IsPeriodicPt f (2 * a.natAbs ^ 2) 0 ⊢ IsPeriodicPt f 2 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.eq_zero_of_not_injective
[132, 1]
[162, 27]
have h3 : IsCoprime M (M + 1) := ⟨-1, 1, by rw [one_mul, neg_one_mul, neg_add_cancel_left]⟩
f : ℤ → ℤ h : good f M : ℤ h1 : ∀ (a : ℤ), f^[2 * a.natAbs ^ 2] 0 = a * (f a - f (-a)) h0 : ∀ (a : ℤ), M ≤ a → IsPeriodicPt f (2 * a.natAbs ^ 2) 0 h2 : IsPeriodicPt f ((2 * M.natAbs ^ 2).gcd (2 * (M + 1).natAbs ^ 2)) 0 ⊢ IsPeriodicPt f 2 0
f : ℤ → ℤ h : good f M : ℤ h1 : ∀ (a : ℤ), f^[2 * a.natAbs ^ 2] 0 = a * (f a - f (-a)) h0 : ∀ (a : ℤ), M ≤ a → IsPeriodicPt f (2 * a.natAbs ^ 2) 0 h2 : IsPeriodicPt f ((2 * M.natAbs ^ 2).gcd (2 * (M + 1).natAbs ^ 2)) 0 h3 : IsCoprime M (M + 1) ⊢ IsPeriodicPt f 2 0
Please generate a tactic in lean4 to solve the state. STATE: f : ℤ → ℤ h : good f M : ℤ h1 : ∀ (a : ℤ), f^[2 * a.natAbs ^ 2] 0 = a * (f a - f (-a)) h0 : ∀ (a : ℤ), M ≤ a → IsPeriodicPt f (2 * a.natAbs ^ 2) 0 h2 : IsPeriodicPt f ((2 * M.natAbs ^ 2).gcd (2 * (M + 1).natAbs ^ 2)) 0 ⊢ IsPeriodicPt f 2 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.eq_zero_of_not_injective
[132, 1]
[162, 27]
rwa [Nat.gcd_mul_left, ← Int.natAbs_pow, ← Int.natAbs_pow, ← Int.gcd_eq_natAbs, Int.gcd_eq_one_iff_coprime.mpr h3.pow, mul_one] at h2
f : ℤ → ℤ h : good f M : ℤ h1 : ∀ (a : ℤ), f^[2 * a.natAbs ^ 2] 0 = a * (f a - f (-a)) h0 : ∀ (a : ℤ), M ≤ a → IsPeriodicPt f (2 * a.natAbs ^ 2) 0 h2 : IsPeriodicPt f ((2 * M.natAbs ^ 2).gcd (2 * (M + 1).natAbs ^ 2)) 0 h3 : IsCoprime M (M + 1) ⊢ IsPeriodicPt f 2 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: f : ℤ → ℤ h : good f M : ℤ h1 : ∀ (a : ℤ), f^[2 * a.natAbs ^ 2] 0 = a * (f a - f (-a)) h0 : ∀ (a : ℤ), M ≤ a → IsPeriodicPt f (2 * a.natAbs ^ 2) 0 h2 : IsPeriodicPt f ((2 * M.natAbs ^ 2).gcd (2 * (M + 1).natAbs ^ 2)) 0 h3 : IsCoprime M (M + 1) ⊢ IsPeriodicPt f 2 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.eq_zero_of_not_injective
[132, 1]
[162, 27]
rw [one_mul, neg_one_mul, neg_add_cancel_left]
f : ℤ → ℤ h : good f M : ℤ h1 : ∀ (a : ℤ), f^[2 * a.natAbs ^ 2] 0 = a * (f a - f (-a)) h0 : ∀ (a : ℤ), M ≤ a → IsPeriodicPt f (2 * a.natAbs ^ 2) 0 h2 : IsPeriodicPt f ((2 * M.natAbs ^ 2).gcd (2 * (M + 1).natAbs ^ 2)) 0 ⊢ -1 * M + 1 * (M + 1) = 1
no goals
Please generate a tactic in lean4 to solve the state. STATE: f : ℤ → ℤ h : good f M : ℤ h1 : ∀ (a : ℤ), f^[2 * a.natAbs ^ 2] 0 = a * (f a - f (-a)) h0 : ∀ (a : ℤ), M ≤ a → IsPeriodicPt f (2 * a.natAbs ^ 2) 0 h2 : IsPeriodicPt f ((2 * M.natAbs ^ 2).gcd (2 * (M + 1).natAbs ^ 2)) 0 ⊢ -1 * M + 1 * (M + 1) = 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.eq_zero_of_not_injective
[132, 1]
[162, 27]
specialize h1 a
f : ℤ → ℤ h : good f M : ℤ h1 : ∀ (a : ℤ), f^[2 * a.natAbs ^ 2] 0 = a * (f a - f (-a)) h0 : IsPeriodicPt f 2 0 a : ℤ h3 : a ≠ 0 ⊢ f a = f (-a)
f : ℤ → ℤ h : good f M : ℤ h0 : IsPeriodicPt f 2 0 a : ℤ h3 : a ≠ 0 h1 : f^[2 * a.natAbs ^ 2] 0 = a * (f a - f (-a)) ⊢ f a = f (-a)
Please generate a tactic in lean4 to solve the state. STATE: f : ℤ → ℤ h : good f M : ℤ h1 : ∀ (a : ℤ), f^[2 * a.natAbs ^ 2] 0 = a * (f a - f (-a)) h0 : IsPeriodicPt f 2 0 a : ℤ h3 : a ≠ 0 ⊢ f a = f (-a) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.eq_zero_of_not_injective
[132, 1]
[162, 27]
rw [h0.mul_const, zero_eq_mul] at h1
f : ℤ → ℤ h : good f M : ℤ h0 : IsPeriodicPt f 2 0 a : ℤ h3 : a ≠ 0 h1 : f^[2 * a.natAbs ^ 2] 0 = a * (f a - f (-a)) ⊢ f a = f (-a)
f : ℤ → ℤ h : good f M : ℤ h0 : IsPeriodicPt f 2 0 a : ℤ h3 : a ≠ 0 h1 : a = 0 ∨ f a - f (-a) = 0 ⊢ f a = f (-a)
Please generate a tactic in lean4 to solve the state. STATE: f : ℤ → ℤ h : good f M : ℤ h0 : IsPeriodicPt f 2 0 a : ℤ h3 : a ≠ 0 h1 : f^[2 * a.natAbs ^ 2] 0 = a * (f a - f (-a)) ⊢ f a = f (-a) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.eq_zero_of_not_injective
[132, 1]
[162, 27]
exact eq_of_sub_eq_zero (h1.resolve_left h3)
f : ℤ → ℤ h : good f M : ℤ h0 : IsPeriodicPt f 2 0 a : ℤ h3 : a ≠ 0 h1 : a = 0 ∨ f a - f (-a) = 0 ⊢ f a = f (-a)
no goals
Please generate a tactic in lean4 to solve the state. STATE: f : ℤ → ℤ h : good f M : ℤ h0 : IsPeriodicPt f 2 0 a : ℤ h3 : a ≠ 0 h1 : a = 0 ∨ f a - f (-a) = 0 ⊢ f a = f (-a) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.eq_zero_of_not_injective
[132, 1]
[162, 27]
have h3 : f (f 2) = 1 * f 1 + 1 * f 1 := h 1 1
f : ℤ → ℤ h : good f M : ℤ h0 : IsPeriodicPt f 2 0 h1 : ∀ (a : ℤ), a ≠ 0 → f a = f (-a) h2 : ∀ (a : ℤ), a ≠ 0 → f a = 0 ⊢ f = 0
f : ℤ → ℤ h : good f M : ℤ h0 : IsPeriodicPt f 2 0 h1 : ∀ (a : ℤ), a ≠ 0 → f a = f (-a) h2 : ∀ (a : ℤ), a ≠ 0 → f a = 0 h3 : f (f 2) = 1 * f 1 + 1 * f 1 ⊢ f = 0
Please generate a tactic in lean4 to solve the state. STATE: f : ℤ → ℤ h : good f M : ℤ h0 : IsPeriodicPt f 2 0 h1 : ∀ (a : ℤ), a ≠ 0 → f a = f (-a) h2 : ∀ (a : ℤ), a ≠ 0 → f a = 0 ⊢ f = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.eq_zero_of_not_injective
[132, 1]
[162, 27]
rw [h2 1 one_ne_zero, h2 _ two_ne_zero] at h3
f : ℤ → ℤ h : good f M : ℤ h0 : IsPeriodicPt f 2 0 h1 : ∀ (a : ℤ), a ≠ 0 → f a = f (-a) h2 : ∀ (a : ℤ), a ≠ 0 → f a = 0 h3 : f (f 2) = 1 * f 1 + 1 * f 1 ⊢ f = 0
f : ℤ → ℤ h : good f M : ℤ h0 : IsPeriodicPt f 2 0 h1 : ∀ (a : ℤ), a ≠ 0 → f a = f (-a) h2 : ∀ (a : ℤ), a ≠ 0 → f a = 0 h3 : f 0 = 1 * 0 + 1 * 0 ⊢ f = 0
Please generate a tactic in lean4 to solve the state. STATE: f : ℤ → ℤ h : good f M : ℤ h0 : IsPeriodicPt f 2 0 h1 : ∀ (a : ℤ), a ≠ 0 → f a = f (-a) h2 : ∀ (a : ℤ), a ≠ 0 → f a = 0 h3 : f (f 2) = 1 * f 1 + 1 * f 1 ⊢ f = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.eq_zero_of_not_injective
[132, 1]
[162, 27]
exact funext λ a ↦ (ne_or_eq a 0).elim (h2 a) (λ h4 ↦ h4.symm ▸ h3)
f : ℤ → ℤ h : good f M : ℤ h0 : IsPeriodicPt f 2 0 h1 : ∀ (a : ℤ), a ≠ 0 → f a = f (-a) h2 : ∀ (a : ℤ), a ≠ 0 → f a = 0 h3 : f 0 = 1 * 0 + 1 * 0 ⊢ f = 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: f : ℤ → ℤ h : good f M : ℤ h0 : IsPeriodicPt f 2 0 h1 : ∀ (a : ℤ), a ≠ 0 → f a = f (-a) h2 : ∀ (a : ℤ), a ≠ 0 → f a = 0 h3 : f 0 = 1 * 0 + 1 * 0 ⊢ f = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Monoid.lean
IMOSL.IMO2010A1.castMonoidHom_is_MonoidGood
[33, 1]
[34, 65]
rw [Int.floor_intCast, ← Int.cast_mul, ← φ.map_mul]
R : Type u_2 M : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Mul M φ : M →ₙ* ℤ m n : M ⊢ (fun x => ↑(φ x)) (m * n) = (fun x => ↑(φ x)) m * ↑⌊(fun x => ↑(φ x)) n⌋
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 M : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Mul M φ : M →ₙ* ℤ m n : M ⊢ (fun x => ↑(φ x)) (m * n) = (fun x => ↑(φ x)) m * ↑⌊(fun x => ↑(φ x)) n⌋ TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Monoid.lean
IMOSL.IMO2010A1.one_add_infinitesimal_mul_is_MonoidGood
[36, 1]
[43, 57]
change (1 + ε) * _ = (1 + ε) * _ * ⌊(1 + ε) * _⌋
R : Type u_2 M : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Mul M φ : M →ₙ* ℕ ε : R h : 0 ≤ ε h0 : Infinitesimal ε m n : M ⊢ (fun x => (1 + ε) * ↑(φ x)) (m * n) = (fun x => (1 + ε) * ↑(φ x)) m * ↑⌊(fun x => (1 + ε) * ↑(φ x)) n⌋
R : Type u_2 M : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Mul M φ : M →ₙ* ℕ ε : R h : 0 ≤ ε h0 : Infinitesimal ε m n : M ⊢ (1 + ε) * ↑(φ (m * n)) = (1 + ε) * ↑(φ m) * ↑⌊(1 + ε) * ↑(φ n)⌋
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 M : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Mul M φ : M →ₙ* ℕ ε : R h : 0 ≤ ε h0 : Infinitesimal ε m n : M ⊢ (fun x => (1 + ε) * ↑(φ x)) (m * n) = (fun x => (1 + ε) * ↑(φ x)) m * ↑⌊(fun x => (1 + ε) * ↑(φ x)) n⌋ TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Monoid.lean
IMOSL.IMO2010A1.one_add_infinitesimal_mul_is_MonoidGood
[36, 1]
[43, 57]
rw [φ.map_mul, Nat.cast_mul, ← mul_assoc]
R : Type u_2 M : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Mul M φ : M →ₙ* ℕ ε : R h : 0 ≤ ε h0 : Infinitesimal ε m n : M ⊢ (1 + ε) * ↑(φ (m * n)) = (1 + ε) * ↑(φ m) * ↑⌊(1 + ε) * ↑(φ n)⌋
R : Type u_2 M : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Mul M φ : M →ₙ* ℕ ε : R h : 0 ≤ ε h0 : Infinitesimal ε m n : M ⊢ (1 + ε) * ↑(φ m) * ↑(φ n) = (1 + ε) * ↑(φ m) * ↑⌊(1 + ε) * ↑(φ n)⌋
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 M : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Mul M φ : M →ₙ* ℕ ε : R h : 0 ≤ ε h0 : Infinitesimal ε m n : M ⊢ (1 + ε) * ↑(φ (m * n)) = (1 + ε) * ↑(φ m) * ↑⌊(1 + ε) * ↑(φ n)⌋ TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Monoid.lean
IMOSL.IMO2010A1.one_add_infinitesimal_mul_is_MonoidGood
[36, 1]
[43, 57]
apply congrArg
R : Type u_2 M : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Mul M φ : M →ₙ* ℕ ε : R h : 0 ≤ ε h0 : Infinitesimal ε m n : M ⊢ (1 + ε) * ↑(φ m) * ↑(φ n) = (1 + ε) * ↑(φ m) * ↑⌊(1 + ε) * ↑(φ n)⌋
case h R : Type u_2 M : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Mul M φ : M →ₙ* ℕ ε : R h : 0 ≤ ε h0 : Infinitesimal ε m n : M ⊢ ↑(φ n) = ↑⌊(1 + ε) * ↑(φ n)⌋
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 M : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Mul M φ : M →ₙ* ℕ ε : R h : 0 ≤ ε h0 : Infinitesimal ε m n : M ⊢ (1 + ε) * ↑(φ m) * ↑(φ n) = (1 + ε) * ↑(φ m) * ↑⌊(1 + ε) * ↑(φ n)⌋ TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Monoid.lean
IMOSL.IMO2010A1.one_add_infinitesimal_mul_is_MonoidGood
[36, 1]
[43, 57]
rw [one_add_mul ε, Int.floor_nat_add, Int.cast_add, Int.cast_natCast, ← nsmul_eq_mul', self_eq_add_right, Int.cast_eq_zero, Int.floor_eq_zero_iff]
case h R : Type u_2 M : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Mul M φ : M →ₙ* ℕ ε : R h : 0 ≤ ε h0 : Infinitesimal ε m n : M ⊢ ↑(φ n) = ↑⌊(1 + ε) * ↑(φ n)⌋
case h R : Type u_2 M : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Mul M φ : M →ₙ* ℕ ε : R h : 0 ≤ ε h0 : Infinitesimal ε m n : M ⊢ φ n • ε ∈ Set.Ico 0 1
Please generate a tactic in lean4 to solve the state. STATE: case h R : Type u_2 M : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Mul M φ : M →ₙ* ℕ ε : R h : 0 ≤ ε h0 : Infinitesimal ε m n : M ⊢ ↑(φ n) = ↑⌊(1 + ε) * ↑(φ n)⌋ TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Monoid.lean
IMOSL.IMO2010A1.one_add_infinitesimal_mul_is_MonoidGood
[36, 1]
[43, 57]
exact ⟨nsmul_nonneg h _, abs_eq_self.mpr h ▸ h0 (φ n)⟩
case h R : Type u_2 M : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Mul M φ : M →ₙ* ℕ ε : R h : 0 ≤ ε h0 : Infinitesimal ε m n : M ⊢ φ n • ε ∈ Set.Ico 0 1
no goals
Please generate a tactic in lean4 to solve the state. STATE: case h R : Type u_2 M : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Mul M φ : M →ₙ* ℕ ε : R h : 0 ≤ ε h0 : Infinitesimal ε m n : M ⊢ φ n • ε ∈ Set.Ico 0 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Monoid.lean
IMOSL.IMO2010A1.indicator_const_is_good
[45, 1]
[52, 32]
simp only [h]
R : Type u_2 M : Type u_1 inst✝³ : LinearOrderedRing R inst✝² : FloorRing R inst✝¹ : Mul M C : R A : Set M inst✝ : DecidablePred fun x => x ∈ A h : ∀ (m n : M), m * n ∈ A ↔ m ∈ A ∧ n ∈ A h0 : ⌊C⌋ = 1 m n : M ⊢ (fun n => if n ∈ A then C else 0) (m * n) = (fun n => if n ∈ A then C else 0) m * ↑⌊(fun n => if n ∈ A then C else 0) n⌋
R : Type u_2 M : Type u_1 inst✝³ : LinearOrderedRing R inst✝² : FloorRing R inst✝¹ : Mul M C : R A : Set M inst✝ : DecidablePred fun x => x ∈ A h : ∀ (m n : M), m * n ∈ A ↔ m ∈ A ∧ n ∈ A h0 : ⌊C⌋ = 1 m n : M ⊢ (if m ∈ A ∧ n ∈ A then C else 0) = (if m ∈ A then C else 0) * ↑⌊if n ∈ A then C else 0⌋
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 M : Type u_1 inst✝³ : LinearOrderedRing R inst✝² : FloorRing R inst✝¹ : Mul M C : R A : Set M inst✝ : DecidablePred fun x => x ∈ A h : ∀ (m n : M), m * n ∈ A ↔ m ∈ A ∧ n ∈ A h0 : ⌊C⌋ = 1 m n : M ⊢ (fun n => if n ∈ A then C else 0) (m * n) = (fun n => if n ∈ A then C else 0) m * ↑⌊(fun n => if n ∈ A then C else 0) n⌋ TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Monoid.lean
IMOSL.IMO2010A1.indicator_const_is_good
[45, 1]
[52, 32]
by_cases h1 : n ∈ A
R : Type u_2 M : Type u_1 inst✝³ : LinearOrderedRing R inst✝² : FloorRing R inst✝¹ : Mul M C : R A : Set M inst✝ : DecidablePred fun x => x ∈ A h : ∀ (m n : M), m * n ∈ A ↔ m ∈ A ∧ n ∈ A h0 : ⌊C⌋ = 1 m n : M ⊢ (if m ∈ A ∧ n ∈ A then C else 0) = (if m ∈ A then C else 0) * ↑⌊if n ∈ A then C else 0⌋
case pos R : Type u_2 M : Type u_1 inst✝³ : LinearOrderedRing R inst✝² : FloorRing R inst✝¹ : Mul M C : R A : Set M inst✝ : DecidablePred fun x => x ∈ A h : ∀ (m n : M), m * n ∈ A ↔ m ∈ A ∧ n ∈ A h0 : ⌊C⌋ = 1 m n : M h1 : n ∈ A ⊢ (if m ∈ A ∧ n ∈ A then C else 0) = (if m ∈ A then C else 0) * ↑⌊if n ∈ A then C else 0⌋ case neg R : Type u_2 M : Type u_1 inst✝³ : LinearOrderedRing R inst✝² : FloorRing R inst✝¹ : Mul M C : R A : Set M inst✝ : DecidablePred fun x => x ∈ A h : ∀ (m n : M), m * n ∈ A ↔ m ∈ A ∧ n ∈ A h0 : ⌊C⌋ = 1 m n : M h1 : n ∉ A ⊢ (if m ∈ A ∧ n ∈ A then C else 0) = (if m ∈ A then C else 0) * ↑⌊if n ∈ A then C else 0⌋
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 M : Type u_1 inst✝³ : LinearOrderedRing R inst✝² : FloorRing R inst✝¹ : Mul M C : R A : Set M inst✝ : DecidablePred fun x => x ∈ A h : ∀ (m n : M), m * n ∈ A ↔ m ∈ A ∧ n ∈ A h0 : ⌊C⌋ = 1 m n : M ⊢ (if m ∈ A ∧ n ∈ A then C else 0) = (if m ∈ A then C else 0) * ↑⌊if n ∈ A then C else 0⌋ TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Monoid.lean
IMOSL.IMO2010A1.indicator_const_is_good
[45, 1]
[52, 32]
rw [if_pos h1, h0, Int.cast_one, mul_one]
case pos R : Type u_2 M : Type u_1 inst✝³ : LinearOrderedRing R inst✝² : FloorRing R inst✝¹ : Mul M C : R A : Set M inst✝ : DecidablePred fun x => x ∈ A h : ∀ (m n : M), m * n ∈ A ↔ m ∈ A ∧ n ∈ A h0 : ⌊C⌋ = 1 m n : M h1 : n ∈ A ⊢ (if m ∈ A ∧ n ∈ A then C else 0) = (if m ∈ A then C else 0) * ↑⌊if n ∈ A then C else 0⌋
case pos R : Type u_2 M : Type u_1 inst✝³ : LinearOrderedRing R inst✝² : FloorRing R inst✝¹ : Mul M C : R A : Set M inst✝ : DecidablePred fun x => x ∈ A h : ∀ (m n : M), m * n ∈ A ↔ m ∈ A ∧ n ∈ A h0 : ⌊C⌋ = 1 m n : M h1 : n ∈ A ⊢ (if m ∈ A ∧ n ∈ A then C else 0) = if m ∈ A then C else 0
Please generate a tactic in lean4 to solve the state. STATE: case pos R : Type u_2 M : Type u_1 inst✝³ : LinearOrderedRing R inst✝² : FloorRing R inst✝¹ : Mul M C : R A : Set M inst✝ : DecidablePred fun x => x ∈ A h : ∀ (m n : M), m * n ∈ A ↔ m ∈ A ∧ n ∈ A h0 : ⌊C⌋ = 1 m n : M h1 : n ∈ A ⊢ (if m ∈ A ∧ n ∈ A then C else 0) = (if m ∈ A then C else 0) * ↑⌊if n ∈ A then C else 0⌋ TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Monoid.lean
IMOSL.IMO2010A1.indicator_const_is_good
[45, 1]
[52, 32]
exact if_congr (and_iff_left h1) rfl rfl
case pos R : Type u_2 M : Type u_1 inst✝³ : LinearOrderedRing R inst✝² : FloorRing R inst✝¹ : Mul M C : R A : Set M inst✝ : DecidablePred fun x => x ∈ A h : ∀ (m n : M), m * n ∈ A ↔ m ∈ A ∧ n ∈ A h0 : ⌊C⌋ = 1 m n : M h1 : n ∈ A ⊢ (if m ∈ A ∧ n ∈ A then C else 0) = if m ∈ A then C else 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: case pos R : Type u_2 M : Type u_1 inst✝³ : LinearOrderedRing R inst✝² : FloorRing R inst✝¹ : Mul M C : R A : Set M inst✝ : DecidablePred fun x => x ∈ A h : ∀ (m n : M), m * n ∈ A ↔ m ∈ A ∧ n ∈ A h0 : ⌊C⌋ = 1 m n : M h1 : n ∈ A ⊢ (if m ∈ A ∧ n ∈ A then C else 0) = if m ∈ A then C else 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Monoid.lean
IMOSL.IMO2010A1.indicator_const_is_good
[45, 1]
[52, 32]
rw [if_neg h1, Int.floor_zero, Int.cast_zero, mul_zero]
case neg R : Type u_2 M : Type u_1 inst✝³ : LinearOrderedRing R inst✝² : FloorRing R inst✝¹ : Mul M C : R A : Set M inst✝ : DecidablePred fun x => x ∈ A h : ∀ (m n : M), m * n ∈ A ↔ m ∈ A ∧ n ∈ A h0 : ⌊C⌋ = 1 m n : M h1 : n ∉ A ⊢ (if m ∈ A ∧ n ∈ A then C else 0) = (if m ∈ A then C else 0) * ↑⌊if n ∈ A then C else 0⌋
case neg R : Type u_2 M : Type u_1 inst✝³ : LinearOrderedRing R inst✝² : FloorRing R inst✝¹ : Mul M C : R A : Set M inst✝ : DecidablePred fun x => x ∈ A h : ∀ (m n : M), m * n ∈ A ↔ m ∈ A ∧ n ∈ A h0 : ⌊C⌋ = 1 m n : M h1 : n ∉ A ⊢ (if m ∈ A ∧ n ∈ A then C else 0) = 0
Please generate a tactic in lean4 to solve the state. STATE: case neg R : Type u_2 M : Type u_1 inst✝³ : LinearOrderedRing R inst✝² : FloorRing R inst✝¹ : Mul M C : R A : Set M inst✝ : DecidablePred fun x => x ∈ A h : ∀ (m n : M), m * n ∈ A ↔ m ∈ A ∧ n ∈ A h0 : ⌊C⌋ = 1 m n : M h1 : n ∉ A ⊢ (if m ∈ A ∧ n ∈ A then C else 0) = (if m ∈ A then C else 0) * ↑⌊if n ∈ A then C else 0⌋ TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Monoid.lean
IMOSL.IMO2010A1.indicator_const_is_good
[45, 1]
[52, 32]
exact if_neg λ h2 ↦ h1 h2.2
case neg R : Type u_2 M : Type u_1 inst✝³ : LinearOrderedRing R inst✝² : FloorRing R inst✝¹ : Mul M C : R A : Set M inst✝ : DecidablePred fun x => x ∈ A h : ∀ (m n : M), m * n ∈ A ↔ m ∈ A ∧ n ∈ A h0 : ⌊C⌋ = 1 m n : M h1 : n ∉ A ⊢ (if m ∈ A ∧ n ∈ A then C else 0) = 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: case neg R : Type u_2 M : Type u_1 inst✝³ : LinearOrderedRing R inst✝² : FloorRing R inst✝¹ : Mul M C : R A : Set M inst✝ : DecidablePred fun x => x ∈ A h : ∀ (m n : M), m * n ∈ A ↔ m ∈ A ∧ n ∈ A h0 : ⌊C⌋ = 1 m n : M h1 : n ∉ A ⊢ (if m ∈ A ∧ n ∈ A then C else 0) = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Monoid.lean
IMOSL.IMO2010A1.MonoidGood.map_eq_map_one_mul_floor
[66, 1]
[67, 21]
rw [← hf, one_mul]
R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f x : M ⊢ f x = f 1 * ↑⌊f x⌋
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f x : M ⊢ f x = f 1 * ↑⌊f x⌋ TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Monoid.lean
IMOSL.IMO2010A1.MonoidGood.eq_zero_or_floor_map_one_eq_one
[69, 1]
[76, 53]
have h := map_eq_map_one_mul_floor hf 1
R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f ⊢ f = 0 ∨ ⌊f 1⌋ = 1
R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : f 1 = f 1 * ↑⌊f 1⌋ ⊢ f = 0 ∨ ⌊f 1⌋ = 1
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f ⊢ f = 0 ∨ ⌊f 1⌋ = 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Monoid.lean
IMOSL.IMO2010A1.MonoidGood.eq_zero_or_floor_map_one_eq_one
[69, 1]
[76, 53]
rw [← sub_eq_zero, ← mul_one_sub, mul_eq_zero] at h
R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : f 1 = f 1 * ↑⌊f 1⌋ ⊢ f = 0 ∨ ⌊f 1⌋ = 1
R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : f 1 = 0 ∨ 1 - ↑⌊f 1⌋ = 0 ⊢ f = 0 ∨ ⌊f 1⌋ = 1
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : f 1 = f 1 * ↑⌊f 1⌋ ⊢ f = 0 ∨ ⌊f 1⌋ = 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Monoid.lean
IMOSL.IMO2010A1.MonoidGood.eq_zero_or_floor_map_one_eq_one
[69, 1]
[76, 53]
revert h
R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : f 1 = 0 ∨ 1 - ↑⌊f 1⌋ = 0 ⊢ f = 0 ∨ ⌊f 1⌋ = 1
R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f ⊢ f 1 = 0 ∨ 1 - ↑⌊f 1⌋ = 0 → f = 0 ∨ ⌊f 1⌋ = 1
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : f 1 = 0 ∨ 1 - ↑⌊f 1⌋ = 0 ⊢ f = 0 ∨ ⌊f 1⌋ = 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Monoid.lean
IMOSL.IMO2010A1.MonoidGood.eq_zero_or_floor_map_one_eq_one
[69, 1]
[76, 53]
refine Or.imp (λ h ↦ funext λ n ↦ ?_) (λ h ↦ Int.cast_eq_one.mp (eq_of_sub_eq_zero h).symm)
R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f ⊢ f 1 = 0 ∨ 1 - ↑⌊f 1⌋ = 0 → f = 0 ∨ ⌊f 1⌋ = 1
R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : f 1 = 0 n : M ⊢ f n = 0 n
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f ⊢ f 1 = 0 ∨ 1 - ↑⌊f 1⌋ = 0 → f = 0 ∨ ⌊f 1⌋ = 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Monoid.lean
IMOSL.IMO2010A1.MonoidGood.eq_zero_or_floor_map_one_eq_one
[69, 1]
[76, 53]
rw [map_eq_map_one_mul_floor hf, h, zero_mul]
R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : f 1 = 0 n : M ⊢ f n = 0 n
R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : f 1 = 0 n : M ⊢ 0 = 0 n
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : f 1 = 0 n : M ⊢ f n = 0 n TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Monoid.lean
IMOSL.IMO2010A1.MonoidGood.eq_zero_or_floor_map_one_eq_one
[69, 1]
[76, 53]
rfl
R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : f 1 = 0 n : M ⊢ 0 = 0 n
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : f 1 = 0 n : M ⊢ 0 = 0 n TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Monoid.lean
IMOSL.IMO2010A1.MonoidGood.fract_eq_eps_mul_floor
[80, 1]
[81, 89]
rw [Int.fract, Int.fract, h, Int.cast_one, sub_one_mul, ← map_eq_map_one_mul_floor hf]
R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 x : M ⊢ Int.fract (f x) = Int.fract (f 1) * ↑⌊f x⌋
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 x : M ⊢ Int.fract (f x) = Int.fract (f 1) * ↑⌊f x⌋ TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Monoid.lean
IMOSL.IMO2010A1.MonoidGood.floor_map_mul
[83, 1]
[87, 94]
have h0 : f 1 ≠ 0 := λ h0 ↦ Int.zero_ne_one <| by rw [← h, h0, Int.floor_zero]
R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 x y : M ⊢ ⌊f (x * y)⌋ = ⌊f x⌋ * ⌊f y⌋
R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 x y : M h0 : f 1 ≠ 0 ⊢ ⌊f (x * y)⌋ = ⌊f x⌋ * ⌊f y⌋
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 x y : M ⊢ ⌊f (x * y)⌋ = ⌊f x⌋ * ⌊f y⌋ TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Monoid.lean
IMOSL.IMO2010A1.MonoidGood.floor_map_mul
[83, 1]
[87, 94]
have h1 := hf x y
R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 x y : M h0 : f 1 ≠ 0 ⊢ ⌊f (x * y)⌋ = ⌊f x⌋ * ⌊f y⌋
R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 x y : M h0 : f 1 ≠ 0 h1 : f (x * y) = f x * ↑⌊f y⌋ ⊢ ⌊f (x * y)⌋ = ⌊f x⌋ * ⌊f y⌋
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 x y : M h0 : f 1 ≠ 0 ⊢ ⌊f (x * y)⌋ = ⌊f x⌋ * ⌊f y⌋ TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Monoid.lean
IMOSL.IMO2010A1.MonoidGood.floor_map_mul
[83, 1]
[87, 94]
rwa [map_eq_map_one_mul_floor hf, map_eq_map_one_mul_floor hf x, mul_assoc, ← sub_eq_zero, ← mul_sub, mul_eq_zero, or_iff_right h0, ← Int.cast_mul, sub_eq_zero, Int.cast_inj] at h1
R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 x y : M h0 : f 1 ≠ 0 h1 : f (x * y) = f x * ↑⌊f y⌋ ⊢ ⌊f (x * y)⌋ = ⌊f x⌋ * ⌊f y⌋
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 x y : M h0 : f 1 ≠ 0 h1 : f (x * y) = f x * ↑⌊f y⌋ ⊢ ⌊f (x * y)⌋ = ⌊f x⌋ * ⌊f y⌋ TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Monoid.lean
IMOSL.IMO2010A1.MonoidGood.floor_map_mul
[83, 1]
[87, 94]
rw [← h, h0, Int.floor_zero]
R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 x y : M h0 : f 1 = 0 ⊢ 0 = 1
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 x y : M h0 : f 1 = 0 ⊢ 0 = 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Monoid.lean
IMOSL.IMO2010A1.MonoidGood.floor_unbounded_of_one_lt
[94, 1]
[99, 89]
rcases floor_unbounded_of_one_lt h0 N with ⟨y, h1⟩
R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 x : M h0 : 1 < ⌊f x⌋ N : ℕ ⊢ ∃ y, ↑(N + 1) < ⌊f y⌋
case intro R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 x : M h0 : 1 < ⌊f x⌋ N : ℕ y : M h1 : ↑N < ⌊f y⌋ ⊢ ∃ y, ↑(N + 1) < ⌊f y⌋
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 x : M h0 : 1 < ⌊f x⌋ N : ℕ ⊢ ∃ y, ↑(N + 1) < ⌊f y⌋ TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Monoid.lean
IMOSL.IMO2010A1.MonoidGood.floor_unbounded_of_one_lt
[94, 1]
[99, 89]
use x * y
case intro R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 x : M h0 : 1 < ⌊f x⌋ N : ℕ y : M h1 : ↑N < ⌊f y⌋ ⊢ ∃ y, ↑(N + 1) < ⌊f y⌋
case h R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 x : M h0 : 1 < ⌊f x⌋ N : ℕ y : M h1 : ↑N < ⌊f y⌋ ⊢ ↑(N + 1) < ⌊f (x * y)⌋
Please generate a tactic in lean4 to solve the state. STATE: case intro R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 x : M h0 : 1 < ⌊f x⌋ N : ℕ y : M h1 : ↑N < ⌊f y⌋ ⊢ ∃ y, ↑(N + 1) < ⌊f y⌋ TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Monoid.lean
IMOSL.IMO2010A1.MonoidGood.floor_unbounded_of_one_lt
[94, 1]
[99, 89]
rw [floor_map_mul hf h, Nat.cast_succ, ← one_mul ((N : ℤ) + 1)]
case h R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 x : M h0 : 1 < ⌊f x⌋ N : ℕ y : M h1 : ↑N < ⌊f y⌋ ⊢ ↑(N + 1) < ⌊f (x * y)⌋
case h R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 x : M h0 : 1 < ⌊f x⌋ N : ℕ y : M h1 : ↑N < ⌊f y⌋ ⊢ 1 * (↑N + 1) < ⌊f x⌋ * ⌊f y⌋
Please generate a tactic in lean4 to solve the state. STATE: case h R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 x : M h0 : 1 < ⌊f x⌋ N : ℕ y : M h1 : ↑N < ⌊f y⌋ ⊢ ↑(N + 1) < ⌊f (x * y)⌋ TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Monoid.lean
IMOSL.IMO2010A1.MonoidGood.floor_unbounded_of_one_lt
[94, 1]
[99, 89]
exact mul_lt_mul_of_nonneg_of_pos h0 h1 Int.one_nonneg (N.cast_nonneg.trans_lt h1)
case h R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 x : M h0 : 1 < ⌊f x⌋ N : ℕ y : M h1 : ↑N < ⌊f y⌋ ⊢ 1 * (↑N + 1) < ⌊f x⌋ * ⌊f y⌋
no goals
Please generate a tactic in lean4 to solve the state. STATE: case h R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 x : M h0 : 1 < ⌊f x⌋ N : ℕ y : M h1 : ↑N < ⌊f y⌋ ⊢ 1 * (↑N + 1) < ⌊f x⌋ * ⌊f y⌋ TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Monoid.lean
IMOSL.IMO2010A1.MonoidGood.solution_of_fract_map_one_pos
[103, 1]
[134, 68]
rw [map_eq_map_one_mul_floor hf, ← Int.natAbs_of_nonneg (h1 x), Int.cast_natCast]
R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h1 : ∀ (x : M), 0 ≤ ⌊f x⌋ h2 : ∀ (k : ℕ), k • Int.fract (f 1) < 1 x : M ⊢ f x = f 1 * ↑({ toFun := fun x => ⌊f x⌋.natAbs, map_one' := ⋯, map_mul' := ⋯ } x)
R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h1 : ∀ (x : M), 0 ≤ ⌊f x⌋ h2 : ∀ (k : ℕ), k • Int.fract (f 1) < 1 x : M ⊢ f 1 * ↑⌊f x⌋.natAbs = f 1 * ↑({ toFun := fun x => ⌊f x⌋.natAbs, map_one' := ⋯, map_mul' := ⋯ } x)
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h1 : ∀ (x : M), 0 ≤ ⌊f x⌋ h2 : ∀ (k : ℕ), k • Int.fract (f 1) < 1 x : M ⊢ f x = f 1 * ↑({ toFun := fun x => ⌊f x⌋.natAbs, map_one' := ⋯, map_mul' := ⋯ } x) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Monoid.lean
IMOSL.IMO2010A1.MonoidGood.solution_of_fract_map_one_pos
[103, 1]
[134, 68]
rfl
R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h1 : ∀ (x : M), 0 ≤ ⌊f x⌋ h2 : ∀ (k : ℕ), k • Int.fract (f 1) < 1 x : M ⊢ f 1 * ↑⌊f x⌋.natAbs = f 1 * ↑({ toFun := fun x => ⌊f x⌋.natAbs, map_one' := ⋯, map_mul' := ⋯ } x)
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h1 : ∀ (x : M), 0 ≤ ⌊f x⌋ h2 : ∀ (k : ℕ), k • Int.fract (f 1) < 1 x : M ⊢ f 1 * ↑⌊f x⌋.natAbs = f 1 * ↑({ toFun := fun x => ⌊f x⌋.natAbs, map_one' := ⋯, map_mul' := ⋯ } x) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Monoid.lean
IMOSL.IMO2010A1.MonoidGood.solution_of_fract_map_one_pos
[103, 1]
[134, 68]
refine ⟨{x : M | ⌊f x⌋ ≠ 0}, λ x y ↦ ?_, λ x ↦ ?_⟩
R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h1 : ∀ (x : M), 0 ≤ ⌊f x⌋ h2 : ¬∀ (k : ℕ), k • Int.fract (f 1) < 1 ⊢ ∃ A, ∃ (_ : ∀ (m n : M), m * n ∈ A ↔ m ∈ A ∧ n ∈ A), ∀ (x : M), f x = if x ∈ A then f 1 else 0
case refine_1 R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h1 : ∀ (x : M), 0 ≤ ⌊f x⌋ h2 : ¬∀ (k : ℕ), k • Int.fract (f 1) < 1 x y : M ⊢ x * y ∈ {x | ⌊f x⌋ ≠ 0} ↔ x ∈ {x | ⌊f x⌋ ≠ 0} ∧ y ∈ {x | ⌊f x⌋ ≠ 0} case refine_2 R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h1 : ∀ (x : M), 0 ≤ ⌊f x⌋ h2 : ¬∀ (k : ℕ), k • Int.fract (f 1) < 1 x : M ⊢ f x = if x ∈ {x | ⌊f x⌋ ≠ 0} then f 1 else 0
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h1 : ∀ (x : M), 0 ≤ ⌊f x⌋ h2 : ¬∀ (k : ℕ), k • Int.fract (f 1) < 1 ⊢ ∃ A, ∃ (_ : ∀ (m n : M), m * n ∈ A ↔ m ∈ A ∧ n ∈ A), ∀ (x : M), f x = if x ∈ A then f 1 else 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Monoid.lean
IMOSL.IMO2010A1.MonoidGood.solution_of_fract_map_one_pos
[103, 1]
[134, 68]
by_cases h3 : ⌊f x⌋ = 0
case refine_2 R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h1 : ∀ (x : M), 0 ≤ ⌊f x⌋ h2 : ¬∀ (k : ℕ), k • Int.fract (f 1) < 1 x : M ⊢ f x = if x ∈ {x | ⌊f x⌋ ≠ 0} then f 1 else 0
case pos R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h1 : ∀ (x : M), 0 ≤ ⌊f x⌋ h2 : ¬∀ (k : ℕ), k • Int.fract (f 1) < 1 x : M h3 : ⌊f x⌋ = 0 ⊢ f x = if x ∈ {x | ⌊f x⌋ ≠ 0} then f 1 else 0 case neg R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h1 : ∀ (x : M), 0 ≤ ⌊f x⌋ h2 : ¬∀ (k : ℕ), k • Int.fract (f 1) < 1 x : M h3 : ¬⌊f x⌋ = 0 ⊢ f x = if x ∈ {x | ⌊f x⌋ ≠ 0} then f 1 else 0
Please generate a tactic in lean4 to solve the state. STATE: case refine_2 R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h1 : ∀ (x : M), 0 ≤ ⌊f x⌋ h2 : ¬∀ (k : ℕ), k • Int.fract (f 1) < 1 x : M ⊢ f x = if x ∈ {x | ⌊f x⌋ ≠ 0} then f 1 else 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Monoid.lean
IMOSL.IMO2010A1.MonoidGood.solution_of_fract_map_one_pos
[103, 1]
[134, 68]
suffices ⌊f x⌋ = 1 by rw [if_pos (by rwa [Set.mem_setOf_eq]), map_eq_map_one_mul_floor hf, this, Int.cast_one, mul_one]
case neg R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h1 : ∀ (x : M), 0 ≤ ⌊f x⌋ h2 : ¬∀ (k : ℕ), k • Int.fract (f 1) < 1 x : M h3 : ¬⌊f x⌋ = 0 ⊢ f x = if x ∈ {x | ⌊f x⌋ ≠ 0} then f 1 else 0
case neg R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h1 : ∀ (x : M), 0 ≤ ⌊f x⌋ h2 : ¬∀ (k : ℕ), k • Int.fract (f 1) < 1 x : M h3 : ¬⌊f x⌋ = 0 ⊢ ⌊f x⌋ = 1
Please generate a tactic in lean4 to solve the state. STATE: case neg R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h1 : ∀ (x : M), 0 ≤ ⌊f x⌋ h2 : ¬∀ (k : ℕ), k • Int.fract (f 1) < 1 x : M h3 : ¬⌊f x⌋ = 0 ⊢ f x = if x ∈ {x | ⌊f x⌋ ≠ 0} then f 1 else 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Monoid.lean
IMOSL.IMO2010A1.MonoidGood.solution_of_fract_map_one_pos
[103, 1]
[134, 68]
specialize h1 x
case neg R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h1 : ∀ (x : M), 0 ≤ ⌊f x⌋ h2 : ¬∀ (k : ℕ), k • Int.fract (f 1) < 1 x : M h3 : ¬⌊f x⌋ = 0 ⊢ ⌊f x⌋ = 1
case neg R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h2 : ¬∀ (k : ℕ), k • Int.fract (f 1) < 1 x : M h3 : ¬⌊f x⌋ = 0 h1 : 0 ≤ ⌊f x⌋ ⊢ ⌊f x⌋ = 1
Please generate a tactic in lean4 to solve the state. STATE: case neg R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h1 : ∀ (x : M), 0 ≤ ⌊f x⌋ h2 : ¬∀ (k : ℕ), k • Int.fract (f 1) < 1 x : M h3 : ¬⌊f x⌋ = 0 ⊢ ⌊f x⌋ = 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Monoid.lean
IMOSL.IMO2010A1.MonoidGood.solution_of_fract_map_one_pos
[103, 1]
[134, 68]
rw [le_iff_eq_or_lt, eq_comm, or_iff_right h3, Int.lt_iff_add_one_le, zero_add, le_iff_eq_or_lt] at h1
case neg R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h2 : ¬∀ (k : ℕ), k • Int.fract (f 1) < 1 x : M h3 : ¬⌊f x⌋ = 0 h1 : 0 ≤ ⌊f x⌋ ⊢ ⌊f x⌋ = 1
case neg R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h2 : ¬∀ (k : ℕ), k • Int.fract (f 1) < 1 x : M h3 : ¬⌊f x⌋ = 0 h1 : 1 = ⌊f x⌋ ∨ 1 < ⌊f x⌋ ⊢ ⌊f x⌋ = 1
Please generate a tactic in lean4 to solve the state. STATE: case neg R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h2 : ¬∀ (k : ℕ), k • Int.fract (f 1) < 1 x : M h3 : ¬⌊f x⌋ = 0 h1 : 0 ≤ ⌊f x⌋ ⊢ ⌊f x⌋ = 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Monoid.lean
IMOSL.IMO2010A1.MonoidGood.solution_of_fract_map_one_pos
[103, 1]
[134, 68]
rcases h1 with h1 | h1
case neg R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h2 : ¬∀ (k : ℕ), k • Int.fract (f 1) < 1 x : M h3 : ¬⌊f x⌋ = 0 h1 : 1 = ⌊f x⌋ ∨ 1 < ⌊f x⌋ ⊢ ⌊f x⌋ = 1
case neg.inl R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h2 : ¬∀ (k : ℕ), k • Int.fract (f 1) < 1 x : M h3 : ¬⌊f x⌋ = 0 h1 : 1 = ⌊f x⌋ ⊢ ⌊f x⌋ = 1 case neg.inr R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h2 : ¬∀ (k : ℕ), k • Int.fract (f 1) < 1 x : M h3 : ¬⌊f x⌋ = 0 h1 : 1 < ⌊f x⌋ ⊢ ⌊f x⌋ = 1
Please generate a tactic in lean4 to solve the state. STATE: case neg R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h2 : ¬∀ (k : ℕ), k • Int.fract (f 1) < 1 x : M h3 : ¬⌊f x⌋ = 0 h1 : 1 = ⌊f x⌋ ∨ 1 < ⌊f x⌋ ⊢ ⌊f x⌋ = 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Monoid.lean
IMOSL.IMO2010A1.MonoidGood.solution_of_fract_map_one_pos
[103, 1]
[134, 68]
exact h1.symm
case neg.inl R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h2 : ¬∀ (k : ℕ), k • Int.fract (f 1) < 1 x : M h3 : ¬⌊f x⌋ = 0 h1 : 1 = ⌊f x⌋ ⊢ ⌊f x⌋ = 1 case neg.inr R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h2 : ¬∀ (k : ℕ), k • Int.fract (f 1) < 1 x : M h3 : ¬⌊f x⌋ = 0 h1 : 1 < ⌊f x⌋ ⊢ ⌊f x⌋ = 1
case neg.inr R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h2 : ¬∀ (k : ℕ), k • Int.fract (f 1) < 1 x : M h3 : ¬⌊f x⌋ = 0 h1 : 1 < ⌊f x⌋ ⊢ ⌊f x⌋ = 1
Please generate a tactic in lean4 to solve the state. STATE: case neg.inl R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h2 : ¬∀ (k : ℕ), k • Int.fract (f 1) < 1 x : M h3 : ¬⌊f x⌋ = 0 h1 : 1 = ⌊f x⌋ ⊢ ⌊f x⌋ = 1 case neg.inr R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h2 : ¬∀ (k : ℕ), k • Int.fract (f 1) < 1 x : M h3 : ¬⌊f x⌋ = 0 h1 : 1 < ⌊f x⌋ ⊢ ⌊f x⌋ = 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Monoid.lean
IMOSL.IMO2010A1.MonoidGood.solution_of_fract_map_one_pos
[103, 1]
[134, 68]
refine h2.elim λ N ↦ ?_
case neg.inr R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h2 : ¬∀ (k : ℕ), k • Int.fract (f 1) < 1 x : M h3 : ¬⌊f x⌋ = 0 h1 : 1 < ⌊f x⌋ ⊢ ⌊f x⌋ = 1
case neg.inr R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h2 : ¬∀ (k : ℕ), k • Int.fract (f 1) < 1 x : M h3 : ¬⌊f x⌋ = 0 h1 : 1 < ⌊f x⌋ N : ℕ ⊢ N • Int.fract (f 1) < 1
Please generate a tactic in lean4 to solve the state. STATE: case neg.inr R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h2 : ¬∀ (k : ℕ), k • Int.fract (f 1) < 1 x : M h3 : ¬⌊f x⌋ = 0 h1 : 1 < ⌊f x⌋ ⊢ ⌊f x⌋ = 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Monoid.lean
IMOSL.IMO2010A1.MonoidGood.solution_of_fract_map_one_pos
[103, 1]
[134, 68]
rcases floor_unbounded_of_one_lt hf h h1 N with ⟨y, h4⟩
case neg.inr R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h2 : ¬∀ (k : ℕ), k • Int.fract (f 1) < 1 x : M h3 : ¬⌊f x⌋ = 0 h1 : 1 < ⌊f x⌋ N : ℕ ⊢ N • Int.fract (f 1) < 1
case neg.inr.intro R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h2 : ¬∀ (k : ℕ), k • Int.fract (f 1) < 1 x : M h3 : ¬⌊f x⌋ = 0 h1 : 1 < ⌊f x⌋ N : ℕ y : M h4 : ↑N < ⌊f y⌋ ⊢ N • Int.fract (f 1) < 1
Please generate a tactic in lean4 to solve the state. STATE: case neg.inr R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h2 : ¬∀ (k : ℕ), k • Int.fract (f 1) < 1 x : M h3 : ¬⌊f x⌋ = 0 h1 : 1 < ⌊f x⌋ N : ℕ ⊢ N • Int.fract (f 1) < 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Monoid.lean
IMOSL.IMO2010A1.MonoidGood.solution_of_fract_map_one_pos
[103, 1]
[134, 68]
rw [nsmul_eq_mul', ← Int.cast_natCast]
case neg.inr.intro R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h2 : ¬∀ (k : ℕ), k • Int.fract (f 1) < 1 x : M h3 : ¬⌊f x⌋ = 0 h1 : 1 < ⌊f x⌋ N : ℕ y : M h4 : ↑N < ⌊f y⌋ ⊢ N • Int.fract (f 1) < 1
case neg.inr.intro R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h2 : ¬∀ (k : ℕ), k • Int.fract (f 1) < 1 x : M h3 : ¬⌊f x⌋ = 0 h1 : 1 < ⌊f x⌋ N : ℕ y : M h4 : ↑N < ⌊f y⌋ ⊢ Int.fract (f 1) * ↑↑N < 1
Please generate a tactic in lean4 to solve the state. STATE: case neg.inr.intro R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h2 : ¬∀ (k : ℕ), k • Int.fract (f 1) < 1 x : M h3 : ¬⌊f x⌋ = 0 h1 : 1 < ⌊f x⌋ N : ℕ y : M h4 : ↑N < ⌊f y⌋ ⊢ N • Int.fract (f 1) < 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Monoid.lean
IMOSL.IMO2010A1.MonoidGood.solution_of_fract_map_one_pos
[103, 1]
[134, 68]
apply (mul_lt_mul_of_pos_left (Int.cast_lt.mpr h4) h0).trans
case neg.inr.intro R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h2 : ¬∀ (k : ℕ), k • Int.fract (f 1) < 1 x : M h3 : ¬⌊f x⌋ = 0 h1 : 1 < ⌊f x⌋ N : ℕ y : M h4 : ↑N < ⌊f y⌋ ⊢ Int.fract (f 1) * ↑↑N < 1
case neg.inr.intro R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h2 : ¬∀ (k : ℕ), k • Int.fract (f 1) < 1 x : M h3 : ¬⌊f x⌋ = 0 h1 : 1 < ⌊f x⌋ N : ℕ y : M h4 : ↑N < ⌊f y⌋ ⊢ Int.fract (f 1) * ↑⌊f y⌋ < 1
Please generate a tactic in lean4 to solve the state. STATE: case neg.inr.intro R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h2 : ¬∀ (k : ℕ), k • Int.fract (f 1) < 1 x : M h3 : ¬⌊f x⌋ = 0 h1 : 1 < ⌊f x⌋ N : ℕ y : M h4 : ↑N < ⌊f y⌋ ⊢ Int.fract (f 1) * ↑↑N < 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Monoid.lean
IMOSL.IMO2010A1.MonoidGood.solution_of_fract_map_one_pos
[103, 1]
[134, 68]
rw [← fract_eq_eps_mul_floor hf h]
case neg.inr.intro R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h2 : ¬∀ (k : ℕ), k • Int.fract (f 1) < 1 x : M h3 : ¬⌊f x⌋ = 0 h1 : 1 < ⌊f x⌋ N : ℕ y : M h4 : ↑N < ⌊f y⌋ ⊢ Int.fract (f 1) * ↑⌊f y⌋ < 1
case neg.inr.intro R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h2 : ¬∀ (k : ℕ), k • Int.fract (f 1) < 1 x : M h3 : ¬⌊f x⌋ = 0 h1 : 1 < ⌊f x⌋ N : ℕ y : M h4 : ↑N < ⌊f y⌋ ⊢ Int.fract (f y) < 1
Please generate a tactic in lean4 to solve the state. STATE: case neg.inr.intro R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h2 : ¬∀ (k : ℕ), k • Int.fract (f 1) < 1 x : M h3 : ¬⌊f x⌋ = 0 h1 : 1 < ⌊f x⌋ N : ℕ y : M h4 : ↑N < ⌊f y⌋ ⊢ Int.fract (f 1) * ↑⌊f y⌋ < 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Monoid.lean
IMOSL.IMO2010A1.MonoidGood.solution_of_fract_map_one_pos
[103, 1]
[134, 68]
exact Int.fract_lt_one _
case neg.inr.intro R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h2 : ¬∀ (k : ℕ), k • Int.fract (f 1) < 1 x : M h3 : ¬⌊f x⌋ = 0 h1 : 1 < ⌊f x⌋ N : ℕ y : M h4 : ↑N < ⌊f y⌋ ⊢ Int.fract (f y) < 1
no goals
Please generate a tactic in lean4 to solve the state. STATE: case neg.inr.intro R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h2 : ¬∀ (k : ℕ), k • Int.fract (f 1) < 1 x : M h3 : ¬⌊f x⌋ = 0 h1 : 1 < ⌊f x⌋ N : ℕ y : M h4 : ↑N < ⌊f y⌋ ⊢ Int.fract (f y) < 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Monoid.lean
IMOSL.IMO2010A1.MonoidGood.solution_of_fract_map_one_pos
[103, 1]
[134, 68]
rw [Set.mem_setOf_eq, floor_map_mul hf h, mul_ne_zero_iff]
case refine_1 R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h1 : ∀ (x : M), 0 ≤ ⌊f x⌋ h2 : ¬∀ (k : ℕ), k • Int.fract (f 1) < 1 x y : M ⊢ x * y ∈ {x | ⌊f x⌋ ≠ 0} ↔ x ∈ {x | ⌊f x⌋ ≠ 0} ∧ y ∈ {x | ⌊f x⌋ ≠ 0}
case refine_1 R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h1 : ∀ (x : M), 0 ≤ ⌊f x⌋ h2 : ¬∀ (k : ℕ), k • Int.fract (f 1) < 1 x y : M ⊢ ⌊f x⌋ ≠ 0 ∧ ⌊f y⌋ ≠ 0 ↔ x ∈ {x | ⌊f x⌋ ≠ 0} ∧ y ∈ {x | ⌊f x⌋ ≠ 0}
Please generate a tactic in lean4 to solve the state. STATE: case refine_1 R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h1 : ∀ (x : M), 0 ≤ ⌊f x⌋ h2 : ¬∀ (k : ℕ), k • Int.fract (f 1) < 1 x y : M ⊢ x * y ∈ {x | ⌊f x⌋ ≠ 0} ↔ x ∈ {x | ⌊f x⌋ ≠ 0} ∧ y ∈ {x | ⌊f x⌋ ≠ 0} TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Monoid.lean
IMOSL.IMO2010A1.MonoidGood.solution_of_fract_map_one_pos
[103, 1]
[134, 68]
rfl
case refine_1 R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h1 : ∀ (x : M), 0 ≤ ⌊f x⌋ h2 : ¬∀ (k : ℕ), k • Int.fract (f 1) < 1 x y : M ⊢ ⌊f x⌋ ≠ 0 ∧ ⌊f y⌋ ≠ 0 ↔ x ∈ {x | ⌊f x⌋ ≠ 0} ∧ y ∈ {x | ⌊f x⌋ ≠ 0}
no goals
Please generate a tactic in lean4 to solve the state. STATE: case refine_1 R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h1 : ∀ (x : M), 0 ≤ ⌊f x⌋ h2 : ¬∀ (k : ℕ), k • Int.fract (f 1) < 1 x y : M ⊢ ⌊f x⌋ ≠ 0 ∧ ⌊f y⌋ ≠ 0 ↔ x ∈ {x | ⌊f x⌋ ≠ 0} ∧ y ∈ {x | ⌊f x⌋ ≠ 0} TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Monoid.lean
IMOSL.IMO2010A1.MonoidGood.solution_of_fract_map_one_pos
[103, 1]
[134, 68]
rw [map_eq_map_one_mul_floor hf, h3, Int.cast_zero, mul_zero]
case pos R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h1 : ∀ (x : M), 0 ≤ ⌊f x⌋ h2 : ¬∀ (k : ℕ), k • Int.fract (f 1) < 1 x : M h3 : ⌊f x⌋ = 0 ⊢ f x = if x ∈ {x | ⌊f x⌋ ≠ 0} then f 1 else 0
case pos R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h1 : ∀ (x : M), 0 ≤ ⌊f x⌋ h2 : ¬∀ (k : ℕ), k • Int.fract (f 1) < 1 x : M h3 : ⌊f x⌋ = 0 ⊢ 0 = if x ∈ {x | ⌊f x⌋ ≠ 0} then f 1 else 0
Please generate a tactic in lean4 to solve the state. STATE: case pos R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h1 : ∀ (x : M), 0 ≤ ⌊f x⌋ h2 : ¬∀ (k : ℕ), k • Int.fract (f 1) < 1 x : M h3 : ⌊f x⌋ = 0 ⊢ f x = if x ∈ {x | ⌊f x⌋ ≠ 0} then f 1 else 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Monoid.lean
IMOSL.IMO2010A1.MonoidGood.solution_of_fract_map_one_pos
[103, 1]
[134, 68]
refine (if_neg ?_).symm
case pos R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h1 : ∀ (x : M), 0 ≤ ⌊f x⌋ h2 : ¬∀ (k : ℕ), k • Int.fract (f 1) < 1 x : M h3 : ⌊f x⌋ = 0 ⊢ 0 = if x ∈ {x | ⌊f x⌋ ≠ 0} then f 1 else 0
case pos R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h1 : ∀ (x : M), 0 ≤ ⌊f x⌋ h2 : ¬∀ (k : ℕ), k • Int.fract (f 1) < 1 x : M h3 : ⌊f x⌋ = 0 ⊢ x ∉ {x | ⌊f x⌋ ≠ 0}
Please generate a tactic in lean4 to solve the state. STATE: case pos R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h1 : ∀ (x : M), 0 ≤ ⌊f x⌋ h2 : ¬∀ (k : ℕ), k • Int.fract (f 1) < 1 x : M h3 : ⌊f x⌋ = 0 ⊢ 0 = if x ∈ {x | ⌊f x⌋ ≠ 0} then f 1 else 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Monoid.lean
IMOSL.IMO2010A1.MonoidGood.solution_of_fract_map_one_pos
[103, 1]
[134, 68]
rwa [Set.mem_setOf_eq, not_not]
case pos R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h1 : ∀ (x : M), 0 ≤ ⌊f x⌋ h2 : ¬∀ (k : ℕ), k • Int.fract (f 1) < 1 x : M h3 : ⌊f x⌋ = 0 ⊢ x ∉ {x | ⌊f x⌋ ≠ 0}
no goals
Please generate a tactic in lean4 to solve the state. STATE: case pos R : Type u_1 M : Type u_2 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : MulOneClass M f : M → R hf : MonoidGood f h : ⌊f 1⌋ = 1 h0 : 0 < Int.fract (f 1) h1 : ∀ (x : M), 0 ≤ ⌊f x⌋ h2 : ¬∀ (k : ℕ), k • Int.fract (f 1) < 1 x : M h3 : ⌊f x⌋ = 0 ⊢ x ∉ {x | ⌊f x⌋ ≠ 0} TACTIC: