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.add_one_iterate
[32, 1]
[34, 81]
rfl
n : β„• a : β„€ ⊒ a + (↑n + 1) = a + ↑(n + 1)
no goals
Please generate a tactic in lean4 to solve the state. STATE: n : β„• a : β„€ ⊒ a + (↑n + 1) = a + ↑(n + 1) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.good_add_one
[36, 1]
[39, 62]
have h (c : β„€) : c + ((c.natAbs ^ 2 : β„•) : β„€) = c * (c + 1) := by rw [Int.natCast_pow, Int.natAbs_sq, sq, ← mul_one_add, add_comm]
a b : β„€ ⊒ (fun x => x + 1)^[a.natAbs ^ 2 + b.natAbs ^ 2] (a + b) = a * (fun x => x + 1) a + b * (fun x => x + 1) b
a b : β„€ h : βˆ€ (c : β„€), c + ↑(c.natAbs ^ 2) = c * (c + 1) ⊒ (fun x => x + 1)^[a.natAbs ^ 2 + b.natAbs ^ 2] (a + b) = a * (fun x => x + 1) a + b * (fun x => x + 1) b
Please generate a tactic in lean4 to solve the state. STATE: a b : β„€ ⊒ (fun x => x + 1)^[a.natAbs ^ 2 + b.natAbs ^ 2] (a + b) = a * (fun x => x + 1) a + b * (fun x => x + 1) b TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.good_add_one
[36, 1]
[39, 62]
rw [add_one_iterate, Int.ofNat_add, add_add_add_comm, h, h]
a b : β„€ h : βˆ€ (c : β„€), c + ↑(c.natAbs ^ 2) = c * (c + 1) ⊒ (fun x => x + 1)^[a.natAbs ^ 2 + b.natAbs ^ 2] (a + b) = a * (fun x => x + 1) a + b * (fun x => x + 1) b
no goals
Please generate a tactic in lean4 to solve the state. STATE: a b : β„€ h : βˆ€ (c : β„€), c + ↑(c.natAbs ^ 2) = c * (c + 1) ⊒ (fun x => x + 1)^[a.natAbs ^ 2 + b.natAbs ^ 2] (a + b) = a * (fun x => x + 1) a + b * (fun x => x + 1) b TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.good_add_one
[36, 1]
[39, 62]
rw [Int.natCast_pow, Int.natAbs_sq, sq, ← mul_one_add, add_comm]
a b c : β„€ ⊒ c + ↑(c.natAbs ^ 2) = c * (c + 1)
no goals
Please generate a tactic in lean4 to solve the state. STATE: a b c : β„€ ⊒ c + ↑(c.natAbs ^ 2) = c * (c + 1) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.good_zero
[46, 1]
[53, 23]
rw [const_iterate, ← Int.add_mul, Int.mul_zero]
a b : β„€ ⊒ (fun x => 0)^[a.natAbs ^ 2 + b.natAbs ^ 2] (a + b) = a * (fun x => 0) a + b * (fun x => 0) b
a b : β„€ ⊒ (bif (a.natAbs ^ 2 + b.natAbs ^ 2).beq 0 then a + b else 0) = 0
Please generate a tactic in lean4 to solve the state. STATE: a b : β„€ ⊒ (fun x => 0)^[a.natAbs ^ 2 + b.natAbs ^ 2] (a + b) = a * (fun x => 0) a + b * (fun x => 0) b TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.good_zero
[46, 1]
[53, 23]
cases h : (a.natAbs ^ 2 + b.natAbs ^ 2).beq 0
a b : β„€ ⊒ (bif (a.natAbs ^ 2 + b.natAbs ^ 2).beq 0 then a + b else 0) = 0
case false a b : β„€ h : (a.natAbs ^ 2 + b.natAbs ^ 2).beq 0 = false ⊒ (bif false then a + b else 0) = 0 case true a b : β„€ h : (a.natAbs ^ 2 + b.natAbs ^ 2).beq 0 = true ⊒ (bif true then a + b else 0) = 0
Please generate a tactic in lean4 to solve the state. STATE: a b : β„€ ⊒ (bif (a.natAbs ^ 2 + b.natAbs ^ 2).beq 0 then a + b else 0) = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.good_zero
[46, 1]
[53, 23]
rfl
case false a b : β„€ h : (a.natAbs ^ 2 + b.natAbs ^ 2).beq 0 = false ⊒ (bif false then a + b else 0) = 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: case false a b : β„€ h : (a.natAbs ^ 2 + b.natAbs ^ 2).beq 0 = false ⊒ (bif false then a + b else 0) = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.good_zero
[46, 1]
[53, 23]
have h0 : βˆ€ c : β„€, c.natAbs ^ 2 = 0 ↔ c = 0 := Ξ» c ↦ by rw [sq_eq_zero_iff, Int.natAbs_eq_zero]
case true a b : β„€ h : (a.natAbs ^ 2 + b.natAbs ^ 2).beq 0 = true ⊒ (bif true then a + b else 0) = 0
case true a b : β„€ h : (a.natAbs ^ 2 + b.natAbs ^ 2).beq 0 = true h0 : βˆ€ (c : β„€), c.natAbs ^ 2 = 0 ↔ c = 0 ⊒ (bif true then a + b else 0) = 0
Please generate a tactic in lean4 to solve the state. STATE: case true a b : β„€ h : (a.natAbs ^ 2 + b.natAbs ^ 2).beq 0 = true ⊒ (bif true then a + b else 0) = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.good_zero
[46, 1]
[53, 23]
rw [Nat.beq_eq, add_eq_zero, h0, h0] at h
case true a b : β„€ h : (a.natAbs ^ 2 + b.natAbs ^ 2).beq 0 = true h0 : βˆ€ (c : β„€), c.natAbs ^ 2 = 0 ↔ c = 0 ⊒ (bif true then a + b else 0) = 0
case true a b : β„€ h : a = 0 ∧ b = 0 h0 : βˆ€ (c : β„€), c.natAbs ^ 2 = 0 ↔ c = 0 ⊒ (bif true then a + b else 0) = 0
Please generate a tactic in lean4 to solve the state. STATE: case true a b : β„€ h : (a.natAbs ^ 2 + b.natAbs ^ 2).beq 0 = true h0 : βˆ€ (c : β„€), c.natAbs ^ 2 = 0 ↔ c = 0 ⊒ (bif true then a + b else 0) = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.good_zero
[46, 1]
[53, 23]
rw [h.1, h.2]
case true a b : β„€ h : a = 0 ∧ b = 0 h0 : βˆ€ (c : β„€), c.natAbs ^ 2 = 0 ↔ c = 0 ⊒ (bif true then a + b else 0) = 0
case true a b : β„€ h : a = 0 ∧ b = 0 h0 : βˆ€ (c : β„€), c.natAbs ^ 2 = 0 ↔ c = 0 ⊒ (bif true then 0 + 0 else 0) = 0
Please generate a tactic in lean4 to solve the state. STATE: case true a b : β„€ h : a = 0 ∧ b = 0 h0 : βˆ€ (c : β„€), c.natAbs ^ 2 = 0 ↔ c = 0 ⊒ (bif true then a + b else 0) = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.good_zero
[46, 1]
[53, 23]
rfl
case true a b : β„€ h : a = 0 ∧ b = 0 h0 : βˆ€ (c : β„€), c.natAbs ^ 2 = 0 ↔ c = 0 ⊒ (bif true then 0 + 0 else 0) = 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: case true a b : β„€ h : a = 0 ∧ b = 0 h0 : βˆ€ (c : β„€), c.natAbs ^ 2 = 0 ↔ c = 0 ⊒ (bif true then 0 + 0 else 0) = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.good_zero
[46, 1]
[53, 23]
rw [sq_eq_zero_iff, Int.natAbs_eq_zero]
a b : β„€ h : (a.natAbs ^ 2 + b.natAbs ^ 2).beq 0 = true c : β„€ ⊒ c.natAbs ^ 2 = 0 ↔ c = 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: a b : β„€ h : (a.natAbs ^ 2 + b.natAbs ^ 2).beq 0 = true c : β„€ ⊒ c.natAbs ^ 2 = 0 ↔ c = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.map_iterate_sq
[65, 1]
[66, 59]
have h := h a 0
f : β„€ β†’ β„€ h : good f a : β„€ ⊒ f^[a.natAbs ^ 2] a = a * f a
f : β„€ β†’ β„€ h✝ : good f a : β„€ h : f^[a.natAbs ^ 2 + Int.natAbs 0 ^ 2] (a + 0) = a * f a + 0 * f 0 ⊒ f^[a.natAbs ^ 2] a = a * f a
Please generate a tactic in lean4 to solve the state. STATE: f : β„€ β†’ β„€ h : good f a : β„€ ⊒ f^[a.natAbs ^ 2] a = a * f a TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.map_iterate_sq
[65, 1]
[66, 59]
rwa [zero_mul, add_zero, add_zero] at h
f : β„€ β†’ β„€ h✝ : good f a : β„€ h : f^[a.natAbs ^ 2 + Int.natAbs 0 ^ 2] (a + 0) = a * f a + 0 * f 0 ⊒ f^[a.natAbs ^ 2] a = a * f a
no goals
Please generate a tactic in lean4 to solve the state. STATE: f : β„€ β†’ β„€ h✝ : good f a : β„€ h : f^[a.natAbs ^ 2 + Int.natAbs 0 ^ 2] (a + 0) = a * f a + 0 * f 0 ⊒ f^[a.natAbs ^ 2] a = a * f a TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.map_iterate_sq_add_one
[71, 1]
[75, 50]
have h0 := h (a + 1) (-1)
f : β„€ β†’ β„€ h : good f a : β„€ ⊒ f^[(a + 1).natAbs ^ 2 + 1] a = f^[(a + 1).natAbs ^ 2] (a + 1)
f : β„€ β†’ β„€ h : good f a : β„€ h0 : f^[(a + 1).natAbs ^ 2 + (-1).natAbs ^ 2] (a + 1 + -1) = (a + 1) * f (a + 1) + -1 * f (-1) ⊒ f^[(a + 1).natAbs ^ 2 + 1] a = f^[(a + 1).natAbs ^ 2] (a + 1)
Please generate a tactic in lean4 to solve the state. STATE: f : β„€ β†’ β„€ h : good f a : β„€ ⊒ f^[(a + 1).natAbs ^ 2 + 1] a = f^[(a + 1).natAbs ^ 2] (a + 1) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.map_iterate_sq_add_one
[71, 1]
[75, 50]
rwa [add_neg_cancel_right, map_neg_one h, mul_zero, add_zero, ← map_iterate_sq h] at h0
f : β„€ β†’ β„€ h : good f a : β„€ h0 : f^[(a + 1).natAbs ^ 2 + (-1).natAbs ^ 2] (a + 1 + -1) = (a + 1) * f (a + 1) + -1 * f (-1) ⊒ f^[(a + 1).natAbs ^ 2 + 1] a = f^[(a + 1).natAbs ^ 2] (a + 1)
no goals
Please generate a tactic in lean4 to solve the state. STATE: f : β„€ β†’ β„€ h : good f a : β„€ h0 : f^[(a + 1).natAbs ^ 2 + (-1).natAbs ^ 2] (a + 1 + -1) = (a + 1) * f (a + 1) + -1 * f (-1) ⊒ f^[(a + 1).natAbs ^ 2 + 1] a = f^[(a + 1).natAbs ^ 2] (a + 1) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.exists_iter_add_large_eq
[80, 1]
[88, 67]
rcases exists_iter_add_large_eq a k with ⟨N, h0⟩
f : β„€ β†’ β„€ h : good f a : β„€ k : β„• ⊒ βˆƒ N, f^[N + (k + 1)] a = f^[N] (a + ↑(k + 1))
case intro f : β„€ β†’ β„€ h : good f a : β„€ k N : β„• h0 : f^[N + k] a = f^[N] (a + ↑k) ⊒ βˆƒ N, f^[N + (k + 1)] a = f^[N] (a + ↑(k + 1))
Please generate a tactic in lean4 to solve the state. STATE: f : β„€ β†’ β„€ h : good f a : β„€ k : β„• ⊒ βˆƒ N, f^[N + (k + 1)] a = f^[N] (a + ↑(k + 1)) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.exists_iter_add_large_eq
[80, 1]
[88, 67]
refine ⟨N + (a + k + 1).natAbs ^ 2, ?_⟩
case intro f : β„€ β†’ β„€ h : good f a : β„€ k N : β„• h0 : f^[N + k] a = f^[N] (a + ↑k) ⊒ βˆƒ N, f^[N + (k + 1)] a = f^[N] (a + ↑(k + 1))
case intro f : β„€ β†’ β„€ h : good f a : β„€ k N : β„• h0 : f^[N + k] a = f^[N] (a + ↑k) ⊒ f^[N + (a + ↑k + 1).natAbs ^ 2 + (k + 1)] a = f^[N + (a + ↑k + 1).natAbs ^ 2] (a + ↑(k + 1))
Please generate a tactic in lean4 to solve the state. STATE: case intro f : β„€ β†’ β„€ h : good f a : β„€ k N : β„• h0 : f^[N + k] a = f^[N] (a + ↑k) ⊒ βˆƒ N, f^[N + (k + 1)] a = f^[N] (a + ↑(k + 1)) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.exists_iter_add_large_eq
[80, 1]
[88, 67]
rw [f.iterate_add_apply N, Nat.cast_succ, ← add_assoc a, ← map_iterate_sq_add_one h, Commute.iterate_iterate_self, ← h0, ← iterate_add_apply, add_comm _ (N + k), add_add_add_comm]
case intro f : β„€ β†’ β„€ h : good f a : β„€ k N : β„• h0 : f^[N + k] a = f^[N] (a + ↑k) ⊒ f^[N + (a + ↑k + 1).natAbs ^ 2 + (k + 1)] a = f^[N + (a + ↑k + 1).natAbs ^ 2] (a + ↑(k + 1))
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro f : β„€ β†’ β„€ h : good f a : β„€ k N : β„• h0 : f^[N + k] a = f^[N] (a + ↑k) ⊒ f^[N + (a + ↑k + 1).natAbs ^ 2 + (k + 1)] a = f^[N + (a + ↑k + 1).natAbs ^ 2] (a + ↑(k + 1)) 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 βˆƒ N : β„•, 0 < f.minimalPeriod (f^[N] 0) by rcases this with ⟨N, h1⟩ let k := f.minimalPeriod (f^[N] 0) let F := Ξ» n ↦ |f^[n] 0| 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 ↦ ?_)⟩ rw [le_iff_exists_add] at h2; rcases h2 with ⟨c, rfl⟩ rw [add_rotate, iterate_add_apply, ← iterate_mod_minimalPeriod_eq, Nat.add_mod_left, ← iterate_add_apply, add_comm] exact Extra.le_seqMax_of_le F (add_le_add_left (c.mod_lt h1).le N)
f : β„€ β†’ β„€ h : good f h0 : Β¬Injective f ⊒ βˆƒ M, βˆ€ (n : β„•), |f^[n] 0| < M
f : β„€ β†’ β„€ h : good f h0 : Β¬Injective f ⊒ βˆƒ N, 0 < minimalPeriod f (f^[N] 0)
Please generate a tactic in lean4 to solve the state. STATE: f : β„€ β†’ β„€ h : good f h0 : Β¬Injective f ⊒ βˆƒ 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]
obtain ⟨a, k, h1, h2⟩ : βˆƒ (a : β„€) (k : β„•), 0 < k ∧ f (a + k) = f a := by 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] simp_rw [Injective, not_forall] at h0 rcases h0 with ⟨a, b, h0, h1⟩ rcases ne_iff_lt_or_gt.mp h1 with h2 | h2 exacts [⟨a, b, h2, h0⟩, ⟨b, a, h2, h0.symm⟩]
f : β„€ β†’ β„€ h : good f h0 : Β¬Injective f ⊒ βˆƒ N, 0 < minimalPeriod f (f^[N] 0)
case intro.intro.intro f : β„€ β†’ β„€ h : good f h0 : Β¬Injective f a : β„€ k : β„• h1 : 0 < k h2 : f (a + ↑k) = f a ⊒ βˆƒ N, 0 < minimalPeriod f (f^[N] 0)
Please generate a tactic in lean4 to solve the state. STATE: f : β„€ β†’ β„€ h : good f h0 : Β¬Injective f ⊒ βˆƒ 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]
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/IMO2017/A4/A4.lean
IMOSL.IMO2017A4.abs_le_max_seqMax
[43, 1]
[49, 49]
rw [le_max_iff]
G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n : β„• ⊒ |a n| ≀ max (Extra.seqMax (-a) n) (2 β€’ Extra.seqMax a n)
G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n : β„• ⊒ |a n| ≀ Extra.seqMax (-a) n ∨ |a n| ≀ 2 β€’ Extra.seqMax a n
Please generate a tactic in lean4 to solve the state. STATE: G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n : β„• ⊒ |a n| ≀ max (Extra.seqMax (-a) n) (2 β€’ Extra.seqMax a n) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/A4/A4.lean
IMOSL.IMO2017A4.abs_le_max_seqMax
[43, 1]
[49, 49]
refine (le_total (a n) 0).imp (Ξ» h ↦ ?_) (Ξ» h ↦ ?_)
G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n : β„• ⊒ |a n| ≀ Extra.seqMax (-a) n ∨ |a n| ≀ 2 β€’ Extra.seqMax a n
case refine_1 G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n : β„• h : a n ≀ 0 ⊒ |a n| ≀ Extra.seqMax (-a) n case refine_2 G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n : β„• h : 0 ≀ a n ⊒ |a n| ≀ 2 β€’ Extra.seqMax a n
Please generate a tactic in lean4 to solve the state. STATE: G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n : β„• ⊒ |a n| ≀ Extra.seqMax (-a) n ∨ |a n| ≀ 2 β€’ Extra.seqMax a n TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/A4/A4.lean
IMOSL.IMO2017A4.abs_le_max_seqMax
[43, 1]
[49, 49]
rw [abs_of_nonpos h]
case refine_1 G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n : β„• h : a n ≀ 0 ⊒ |a n| ≀ Extra.seqMax (-a) n
case refine_1 G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n : β„• h : a n ≀ 0 ⊒ -a n ≀ Extra.seqMax (-a) n
Please generate a tactic in lean4 to solve the state. STATE: case refine_1 G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n : β„• h : a n ≀ 0 ⊒ |a n| ≀ Extra.seqMax (-a) n TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/A4/A4.lean
IMOSL.IMO2017A4.abs_le_max_seqMax
[43, 1]
[49, 49]
exact Extra.le_seqMax_self (-a) n
case refine_1 G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n : β„• h : a n ≀ 0 ⊒ -a n ≀ Extra.seqMax (-a) n
no goals
Please generate a tactic in lean4 to solve the state. STATE: case refine_1 G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n : β„• h : a n ≀ 0 ⊒ -a n ≀ Extra.seqMax (-a) n TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/A4/A4.lean
IMOSL.IMO2017A4.abs_le_max_seqMax
[43, 1]
[49, 49]
rw [abs_of_nonneg h, two_nsmul]
case refine_2 G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n : β„• h : 0 ≀ a n ⊒ |a n| ≀ 2 β€’ Extra.seqMax a n
case refine_2 G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n : β„• h : 0 ≀ a n ⊒ a n ≀ Extra.seqMax a n + Extra.seqMax a n
Please generate a tactic in lean4 to solve the state. STATE: case refine_2 G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n : β„• h : 0 ≀ a n ⊒ |a n| ≀ 2 β€’ Extra.seqMax a n TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/A4/A4.lean
IMOSL.IMO2017A4.abs_le_max_seqMax
[43, 1]
[49, 49]
have h0 := Extra.le_seqMax_self a n
case refine_2 G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n : β„• h : 0 ≀ a n ⊒ a n ≀ Extra.seqMax a n + Extra.seqMax a n
case refine_2 G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n : β„• h : 0 ≀ a n h0 : a n ≀ Extra.seqMax a n ⊒ a n ≀ Extra.seqMax a n + Extra.seqMax a n
Please generate a tactic in lean4 to solve the state. STATE: case refine_2 G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n : β„• h : 0 ≀ a n ⊒ a n ≀ Extra.seqMax a n + Extra.seqMax a n TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/A4/A4.lean
IMOSL.IMO2017A4.abs_le_max_seqMax
[43, 1]
[49, 49]
exact le_add_of_le_of_nonneg h0 (h.trans h0)
case refine_2 G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n : β„• h : 0 ≀ a n h0 : a n ≀ Extra.seqMax a n ⊒ a n ≀ Extra.seqMax a n + Extra.seqMax a n
no goals
Please generate a tactic in lean4 to solve the state. STATE: case refine_2 G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n : β„• h : 0 ≀ a n h0 : a n ≀ Extra.seqMax a n ⊒ a n ≀ Extra.seqMax a n + Extra.seqMax a n TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/A4/A4.lean
IMOSL.IMO2017A4.good1_bdd_above
[51, 1]
[57, 78]
rcases Extra.exists_map_eq_seqMax a n with ⟨i, h2, h1⟩
G : Type u_1 inst✝ : LinearOrderedAddCommGroup G D n : β„• a : β„• β†’ G h : good1 D a h0 : D ≀ n ⊒ a (n + 1) ≀ Extra.seqMax (-a) n - Extra.seqMax a n
case intro.intro G : Type u_1 inst✝ : LinearOrderedAddCommGroup G D n : β„• a : β„• β†’ G h : good1 D a h0 : D ≀ n i : β„• h2 : i ≀ n h1 : a i = Extra.seqMax a n ⊒ a (n + 1) ≀ Extra.seqMax (-a) n - Extra.seqMax a n
Please generate a tactic in lean4 to solve the state. STATE: G : Type u_1 inst✝ : LinearOrderedAddCommGroup G D n : β„• a : β„• β†’ G h : good1 D a h0 : D ≀ n ⊒ a (n + 1) ≀ Extra.seqMax (-a) n - Extra.seqMax a n TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/A4/A4.lean
IMOSL.IMO2017A4.good1_bdd_above
[51, 1]
[57, 78]
rw [le_iff_exists_add] at h2
case intro.intro G : Type u_1 inst✝ : LinearOrderedAddCommGroup G D n : β„• a : β„• β†’ G h : good1 D a h0 : D ≀ n i : β„• h2 : i ≀ n h1 : a i = Extra.seqMax a n ⊒ a (n + 1) ≀ Extra.seqMax (-a) n - Extra.seqMax a n
case intro.intro G : Type u_1 inst✝ : LinearOrderedAddCommGroup G D n : β„• a : β„• β†’ G h : good1 D a h0 : D ≀ n i : β„• h2 : βˆƒ c, n = i + c h1 : a i = Extra.seqMax a n ⊒ a (n + 1) ≀ Extra.seqMax (-a) n - Extra.seqMax a n
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro G : Type u_1 inst✝ : LinearOrderedAddCommGroup G D n : β„• a : β„• β†’ G h : good1 D a h0 : D ≀ n i : β„• h2 : i ≀ n h1 : a i = Extra.seqMax a n ⊒ a (n + 1) ≀ Extra.seqMax (-a) n - Extra.seqMax a n TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/A4/A4.lean
IMOSL.IMO2017A4.good1_bdd_above
[51, 1]
[57, 78]
rcases h2 with ⟨j, rfl⟩
case intro.intro G : Type u_1 inst✝ : LinearOrderedAddCommGroup G D n : β„• a : β„• β†’ G h : good1 D a h0 : D ≀ n i : β„• h2 : βˆƒ c, n = i + c h1 : a i = Extra.seqMax a n ⊒ a (n + 1) ≀ Extra.seqMax (-a) n - Extra.seqMax a n
case intro.intro.intro G : Type u_1 inst✝ : LinearOrderedAddCommGroup G D : β„• a : β„• β†’ G h : good1 D a i j : β„• h0 : D ≀ i + j h1 : a i = Extra.seqMax a (i + j) ⊒ a (i + j + 1) ≀ Extra.seqMax (-a) (i + j) - Extra.seqMax a (i + j)
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro G : Type u_1 inst✝ : LinearOrderedAddCommGroup G D n : β„• a : β„• β†’ G h : good1 D a h0 : D ≀ n i : β„• h2 : βˆƒ c, n = i + c h1 : a i = Extra.seqMax a n ⊒ a (n + 1) ≀ Extra.seqMax (-a) n - Extra.seqMax a n TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/A4/A4.lean
IMOSL.IMO2017A4.good1_bdd_above
[51, 1]
[57, 78]
apply (h i j h0).trans
case intro.intro.intro G : Type u_1 inst✝ : LinearOrderedAddCommGroup G D : β„• a : β„• β†’ G h : good1 D a i j : β„• h0 : D ≀ i + j h1 : a i = Extra.seqMax a (i + j) ⊒ a (i + j + 1) ≀ Extra.seqMax (-a) (i + j) - Extra.seqMax a (i + j)
case intro.intro.intro G : Type u_1 inst✝ : LinearOrderedAddCommGroup G D : β„• a : β„• β†’ G h : good1 D a i j : β„• h0 : D ≀ i + j h1 : a i = Extra.seqMax a (i + j) ⊒ -(a i + a j) ≀ Extra.seqMax (-a) (i + j) - Extra.seqMax a (i + j)
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro G : Type u_1 inst✝ : LinearOrderedAddCommGroup G D : β„• a : β„• β†’ G h : good1 D a i j : β„• h0 : D ≀ i + j h1 : a i = Extra.seqMax a (i + j) ⊒ a (i + j + 1) ≀ Extra.seqMax (-a) (i + j) - Extra.seqMax a (i + j) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/A4/A4.lean
IMOSL.IMO2017A4.good1_bdd_above
[51, 1]
[57, 78]
rw [← h1, neg_add_rev, ← sub_eq_add_neg]
case intro.intro.intro G : Type u_1 inst✝ : LinearOrderedAddCommGroup G D : β„• a : β„• β†’ G h : good1 D a i j : β„• h0 : D ≀ i + j h1 : a i = Extra.seqMax a (i + j) ⊒ -(a i + a j) ≀ Extra.seqMax (-a) (i + j) - Extra.seqMax a (i + j)
case intro.intro.intro G : Type u_1 inst✝ : LinearOrderedAddCommGroup G D : β„• a : β„• β†’ G h : good1 D a i j : β„• h0 : D ≀ i + j h1 : a i = Extra.seqMax a (i + j) ⊒ -a j - a i ≀ Extra.seqMax (-a) (i + j) - a i
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro G : Type u_1 inst✝ : LinearOrderedAddCommGroup G D : β„• a : β„• β†’ G h : good1 D a i j : β„• h0 : D ≀ i + j h1 : a i = Extra.seqMax a (i + j) ⊒ -(a i + a j) ≀ Extra.seqMax (-a) (i + j) - Extra.seqMax a (i + j) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/A4/A4.lean
IMOSL.IMO2017A4.good1_bdd_above
[51, 1]
[57, 78]
exact sub_le_sub_right (Extra.le_seqMax_of_le (-a) (j.le_add_left i)) (a i)
case intro.intro.intro G : Type u_1 inst✝ : LinearOrderedAddCommGroup G D : β„• a : β„• β†’ G h : good1 D a i j : β„• h0 : D ≀ i + j h1 : a i = Extra.seqMax a (i + j) ⊒ -a j - a i ≀ Extra.seqMax (-a) (i + j) - a i
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro G : Type u_1 inst✝ : LinearOrderedAddCommGroup G D : β„• a : β„• β†’ G h : good1 D a i j : β„• h0 : D ≀ i + j h1 : a i = Extra.seqMax a (i + j) ⊒ -a j - a i ≀ Extra.seqMax (-a) (i + j) - a i TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/A4/A4.lean
IMOSL.IMO2017A4.good2_bdd_below
[64, 1]
[69, 48]
rcases h n h0 with ⟨i, j, rfl, h0⟩
G : Type u_1 inst✝ : LinearOrderedAddCommGroup G D n : β„• a : β„• β†’ G h : good2 D a h0 : D ≀ n ⊒ -a (n + 1) ≀ 2 β€’ Extra.seqMax a n
case intro.intro.intro G : Type u_1 inst✝ : LinearOrderedAddCommGroup G D : β„• a : β„• β†’ G h : good2 D a i j : β„• h0✝ : D ≀ i + j h0 : a (i + j + 1) = -(a i + a j) ⊒ -a (i + j + 1) ≀ 2 β€’ Extra.seqMax a (i + j)
Please generate a tactic in lean4 to solve the state. STATE: G : Type u_1 inst✝ : LinearOrderedAddCommGroup G D n : β„• a : β„• β†’ G h : good2 D a h0 : D ≀ n ⊒ -a (n + 1) ≀ 2 β€’ Extra.seqMax a n TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/A4/A4.lean
IMOSL.IMO2017A4.good2_bdd_below
[64, 1]
[69, 48]
rw [h0, neg_neg, two_nsmul]
case intro.intro.intro G : Type u_1 inst✝ : LinearOrderedAddCommGroup G D : β„• a : β„• β†’ G h : good2 D a i j : β„• h0✝ : D ≀ i + j h0 : a (i + j + 1) = -(a i + a j) ⊒ -a (i + j + 1) ≀ 2 β€’ Extra.seqMax a (i + j)
case intro.intro.intro G : Type u_1 inst✝ : LinearOrderedAddCommGroup G D : β„• a : β„• β†’ G h : good2 D a i j : β„• h0✝ : D ≀ i + j h0 : a (i + j + 1) = -(a i + a j) ⊒ a i + a j ≀ Extra.seqMax a (i + j) + Extra.seqMax a (i + j)
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro G : Type u_1 inst✝ : LinearOrderedAddCommGroup G D : β„• a : β„• β†’ G h : good2 D a i j : β„• h0✝ : D ≀ i + j h0 : a (i + j + 1) = -(a i + a j) ⊒ -a (i + j + 1) ≀ 2 β€’ Extra.seqMax a (i + j) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/A4/A4.lean
IMOSL.IMO2017A4.good2_bdd_below
[64, 1]
[69, 48]
exact add_le_add (Extra.le_seqMax_of_le a (i.le_add_right j)) (Extra.le_seqMax_of_le a (j.le_add_left i))
case intro.intro.intro G : Type u_1 inst✝ : LinearOrderedAddCommGroup G D : β„• a : β„• β†’ G h : good2 D a i j : β„• h0✝ : D ≀ i + j h0 : a (i + j + 1) = -(a i + a j) ⊒ a i + a j ≀ Extra.seqMax a (i + j) + Extra.seqMax a (i + j)
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro G : Type u_1 inst✝ : LinearOrderedAddCommGroup G D : β„• a : β„• β†’ G h : good2 D a i j : β„• h0✝ : D ≀ i + j h0 : a (i + j + 1) = -(a i + a j) ⊒ a i + a j ≀ Extra.seqMax a (i + j) + Extra.seqMax a (i + j) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/A4/A4.lean
IMOSL.IMO2017A4.c_bdd
[87, 1]
[92, 69]
suffices b K = b (K + 1) from ⟨this.symm, (h0 K h2).trans_eq (this β–Έ max_eq_right h3)⟩
G : Type u_1 D : β„• inst✝ : LinearOrderedAddCommGroup G b c : β„• β†’ G h : βˆ€ (n : β„•), D ≀ n β†’ b (n + 1) ≀ max (b n) (c n - b n) h0 : βˆ€ (n : β„•), D ≀ n β†’ c (n + 1) ≀ max (c n) (2 β€’ b n) h1 : Monotone b K : β„• h2 : D ≀ K h3 : c K ≀ 2 β€’ b K ⊒ b (K + 1) = b K ∧ c (K + 1) ≀ 2 β€’ b (K + 1)
G : Type u_1 D : β„• inst✝ : LinearOrderedAddCommGroup G b c : β„• β†’ G h : βˆ€ (n : β„•), D ≀ n β†’ b (n + 1) ≀ max (b n) (c n - b n) h0 : βˆ€ (n : β„•), D ≀ n β†’ c (n + 1) ≀ max (c n) (2 β€’ b n) h1 : Monotone b K : β„• h2 : D ≀ K h3 : c K ≀ 2 β€’ b K ⊒ b K = b (K + 1)
Please generate a tactic in lean4 to solve the state. STATE: G : Type u_1 D : β„• inst✝ : LinearOrderedAddCommGroup G b c : β„• β†’ G h : βˆ€ (n : β„•), D ≀ n β†’ b (n + 1) ≀ max (b n) (c n - b n) h0 : βˆ€ (n : β„•), D ≀ n β†’ c (n + 1) ≀ max (c n) (2 β€’ b n) h1 : Monotone b K : β„• h2 : D ≀ K h3 : c K ≀ 2 β€’ b K ⊒ b (K + 1) = b K ∧ c (K + 1) ≀ 2 β€’ b (K + 1) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/A4/A4.lean
IMOSL.IMO2017A4.c_bdd
[87, 1]
[92, 69]
rw [two_nsmul, ← sub_le_iff_le_add] at h3
G : Type u_1 D : β„• inst✝ : LinearOrderedAddCommGroup G b c : β„• β†’ G h : βˆ€ (n : β„•), D ≀ n β†’ b (n + 1) ≀ max (b n) (c n - b n) h0 : βˆ€ (n : β„•), D ≀ n β†’ c (n + 1) ≀ max (c n) (2 β€’ b n) h1 : Monotone b K : β„• h2 : D ≀ K h3 : c K ≀ 2 β€’ b K ⊒ b K = b (K + 1)
G : Type u_1 D : β„• inst✝ : LinearOrderedAddCommGroup G b c : β„• β†’ G h : βˆ€ (n : β„•), D ≀ n β†’ b (n + 1) ≀ max (b n) (c n - b n) h0 : βˆ€ (n : β„•), D ≀ n β†’ c (n + 1) ≀ max (c n) (2 β€’ b n) h1 : Monotone b K : β„• h2 : D ≀ K h3 : c K - b K ≀ b K ⊒ b K = b (K + 1)
Please generate a tactic in lean4 to solve the state. STATE: G : Type u_1 D : β„• inst✝ : LinearOrderedAddCommGroup G b c : β„• β†’ G h : βˆ€ (n : β„•), D ≀ n β†’ b (n + 1) ≀ max (b n) (c n - b n) h0 : βˆ€ (n : β„•), D ≀ n β†’ c (n + 1) ≀ max (c n) (2 β€’ b n) h1 : Monotone b K : β„• h2 : D ≀ K h3 : c K ≀ 2 β€’ b K ⊒ b K = b (K + 1) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/A4/A4.lean
IMOSL.IMO2017A4.c_bdd
[87, 1]
[92, 69]
exact (h1 K.le_succ).antisymm ((h K h2).trans_eq (max_eq_left h3))
G : Type u_1 D : β„• inst✝ : LinearOrderedAddCommGroup G b c : β„• β†’ G h : βˆ€ (n : β„•), D ≀ n β†’ b (n + 1) ≀ max (b n) (c n - b n) h0 : βˆ€ (n : β„•), D ≀ n β†’ c (n + 1) ≀ max (c n) (2 β€’ b n) h1 : Monotone b K : β„• h2 : D ≀ K h3 : c K - b K ≀ b K ⊒ b K = b (K + 1)
no goals
Please generate a tactic in lean4 to solve the state. STATE: G : Type u_1 D : β„• inst✝ : LinearOrderedAddCommGroup G b c : β„• β†’ G h : βˆ€ (n : β„•), D ≀ n β†’ b (n + 1) ≀ max (b n) (c n - b n) h0 : βˆ€ (n : β„•), D ≀ n β†’ c (n + 1) ≀ max (c n) (2 β€’ b n) h1 : Monotone b K : β„• h2 : D ≀ K h3 : c K - b K ≀ b K ⊒ b K = b (K + 1) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/A4/A4.lean
IMOSL.IMO2017A4.c_succ_eq_D_of_b_bdd
[94, 1]
[100, 67]
have X {M : β„•} : D ≀ M β†’ 2 β€’ b M < c M β†’ c (M + 1) = c M := Ξ» h3 h4 ↦ ((h0 M h3).trans_eq (max_eq_left_of_lt h4)).antisymm (h2 M.le_succ)
G : Type u_1 D : β„• inst✝ : LinearOrderedAddCommGroup G b c : β„• β†’ G h : βˆ€ (n : β„•), D ≀ n β†’ b (n + 1) ≀ max (b n) (c n - b n) h0 : βˆ€ (n : β„•), D ≀ n β†’ c (n + 1) ≀ max (c n) (2 β€’ b n) h1 : Monotone b K : β„• h2 : Monotone c h3 : D ≀ K ⊒ 2 β€’ b K < c K β†’ c (K + 1) = c D
G : Type u_1 D : β„• inst✝ : LinearOrderedAddCommGroup G b c : β„• β†’ G h : βˆ€ (n : β„•), D ≀ n β†’ b (n + 1) ≀ max (b n) (c n - b n) h0 : βˆ€ (n : β„•), D ≀ n β†’ c (n + 1) ≀ max (c n) (2 β€’ b n) h1 : Monotone b K : β„• h2 : Monotone c h3 : D ≀ K X : βˆ€ {M : β„•}, D ≀ M β†’ 2 β€’ b M < c M β†’ c (M + 1) = c M ⊒ 2 β€’ b K < c K β†’ c (K + 1) = c D
Please generate a tactic in lean4 to solve the state. STATE: G : Type u_1 D : β„• inst✝ : LinearOrderedAddCommGroup G b c : β„• β†’ G h : βˆ€ (n : β„•), D ≀ n β†’ b (n + 1) ≀ max (b n) (c n - b n) h0 : βˆ€ (n : β„•), D ≀ n β†’ c (n + 1) ≀ max (c n) (2 β€’ b n) h1 : Monotone b K : β„• h2 : Monotone c h3 : D ≀ K ⊒ 2 β€’ b K < c K β†’ c (K + 1) = c D TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/A4/A4.lean
IMOSL.IMO2017A4.c_succ_eq_D_of_b_bdd
[94, 1]
[100, 67]
refine Nat.le_induction (X D.le_refl) (Ξ» n h4 h5 h6 ↦ ?_) K h3
G : Type u_1 D : β„• inst✝ : LinearOrderedAddCommGroup G b c : β„• β†’ G h : βˆ€ (n : β„•), D ≀ n β†’ b (n + 1) ≀ max (b n) (c n - b n) h0 : βˆ€ (n : β„•), D ≀ n β†’ c (n + 1) ≀ max (c n) (2 β€’ b n) h1 : Monotone b K : β„• h2 : Monotone c h3 : D ≀ K X : βˆ€ {M : β„•}, D ≀ M β†’ 2 β€’ b M < c M β†’ c (M + 1) = c M ⊒ 2 β€’ b K < c K β†’ c (K + 1) = c D
G : Type u_1 D : β„• inst✝ : LinearOrderedAddCommGroup G b c : β„• β†’ G h : βˆ€ (n : β„•), D ≀ n β†’ b (n + 1) ≀ max (b n) (c n - b n) h0 : βˆ€ (n : β„•), D ≀ n β†’ c (n + 1) ≀ max (c n) (2 β€’ b n) h1 : Monotone b K : β„• h2 : Monotone c h3 : D ≀ K X : βˆ€ {M : β„•}, D ≀ M β†’ 2 β€’ b M < c M β†’ c (M + 1) = c M n : β„• h4 : D ≀ n h5 : 2 β€’ b n < c n β†’ c (n + 1) = c D h6 : 2 β€’ b (n + 1) < c (n + 1) ⊒ c (n + 1 + 1) = c D
Please generate a tactic in lean4 to solve the state. STATE: G : Type u_1 D : β„• inst✝ : LinearOrderedAddCommGroup G b c : β„• β†’ G h : βˆ€ (n : β„•), D ≀ n β†’ b (n + 1) ≀ max (b n) (c n - b n) h0 : βˆ€ (n : β„•), D ≀ n β†’ c (n + 1) ≀ max (c n) (2 β€’ b n) h1 : Monotone b K : β„• h2 : Monotone c h3 : D ≀ K X : βˆ€ {M : β„•}, D ≀ M β†’ 2 β€’ b M < c M β†’ c (M + 1) = c M ⊒ 2 β€’ b K < c K β†’ c (K + 1) = c D TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/A4/A4.lean
IMOSL.IMO2017A4.c_succ_eq_D_of_b_bdd
[94, 1]
[100, 67]
rw [X (Nat.le_step h4) h6]
G : Type u_1 D : β„• inst✝ : LinearOrderedAddCommGroup G b c : β„• β†’ G h : βˆ€ (n : β„•), D ≀ n β†’ b (n + 1) ≀ max (b n) (c n - b n) h0 : βˆ€ (n : β„•), D ≀ n β†’ c (n + 1) ≀ max (c n) (2 β€’ b n) h1 : Monotone b K : β„• h2 : Monotone c h3 : D ≀ K X : βˆ€ {M : β„•}, D ≀ M β†’ 2 β€’ b M < c M β†’ c (M + 1) = c M n : β„• h4 : D ≀ n h5 : 2 β€’ b n < c n β†’ c (n + 1) = c D h6 : 2 β€’ b (n + 1) < c (n + 1) ⊒ c (n + 1 + 1) = c D
G : Type u_1 D : β„• inst✝ : LinearOrderedAddCommGroup G b c : β„• β†’ G h : βˆ€ (n : β„•), D ≀ n β†’ b (n + 1) ≀ max (b n) (c n - b n) h0 : βˆ€ (n : β„•), D ≀ n β†’ c (n + 1) ≀ max (c n) (2 β€’ b n) h1 : Monotone b K : β„• h2 : Monotone c h3 : D ≀ K X : βˆ€ {M : β„•}, D ≀ M β†’ 2 β€’ b M < c M β†’ c (M + 1) = c M n : β„• h4 : D ≀ n h5 : 2 β€’ b n < c n β†’ c (n + 1) = c D h6 : 2 β€’ b (n + 1) < c (n + 1) ⊒ c n.succ = c D
Please generate a tactic in lean4 to solve the state. STATE: G : Type u_1 D : β„• inst✝ : LinearOrderedAddCommGroup G b c : β„• β†’ G h : βˆ€ (n : β„•), D ≀ n β†’ b (n + 1) ≀ max (b n) (c n - b n) h0 : βˆ€ (n : β„•), D ≀ n β†’ c (n + 1) ≀ max (c n) (2 β€’ b n) h1 : Monotone b K : β„• h2 : Monotone c h3 : D ≀ K X : βˆ€ {M : β„•}, D ≀ M β†’ 2 β€’ b M < c M β†’ c (M + 1) = c M n : β„• h4 : D ≀ n h5 : 2 β€’ b n < c n β†’ c (n + 1) = c D h6 : 2 β€’ b (n + 1) < c (n + 1) ⊒ c (n + 1 + 1) = c D TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/A4/A4.lean
IMOSL.IMO2017A4.c_succ_eq_D_of_b_bdd
[94, 1]
[100, 67]
exact h5 (lt_of_not_le Ξ» h7 ↦ h6.not_le (c_bdd h h0 h1 h4 h7).2)
G : Type u_1 D : β„• inst✝ : LinearOrderedAddCommGroup G b c : β„• β†’ G h : βˆ€ (n : β„•), D ≀ n β†’ b (n + 1) ≀ max (b n) (c n - b n) h0 : βˆ€ (n : β„•), D ≀ n β†’ c (n + 1) ≀ max (c n) (2 β€’ b n) h1 : Monotone b K : β„• h2 : Monotone c h3 : D ≀ K X : βˆ€ {M : β„•}, D ≀ M β†’ 2 β€’ b M < c M β†’ c (M + 1) = c M n : β„• h4 : D ≀ n h5 : 2 β€’ b n < c n β†’ c (n + 1) = c D h6 : 2 β€’ b (n + 1) < c (n + 1) ⊒ c n.succ = c D
no goals
Please generate a tactic in lean4 to solve the state. STATE: G : Type u_1 D : β„• inst✝ : LinearOrderedAddCommGroup G b c : β„• β†’ G h : βˆ€ (n : β„•), D ≀ n β†’ b (n + 1) ≀ max (b n) (c n - b n) h0 : βˆ€ (n : β„•), D ≀ n β†’ c (n + 1) ≀ max (c n) (2 β€’ b n) h1 : Monotone b K : β„• h2 : Monotone c h3 : D ≀ K X : βˆ€ {M : β„•}, D ≀ M β†’ 2 β€’ b M < c M β†’ c (M + 1) = c M n : β„• h4 : D ≀ n h5 : 2 β€’ b n < c n β†’ c (n + 1) = c D h6 : 2 β€’ b (n + 1) < c (n + 1) ⊒ c n.succ = c D TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/A4/A4.lean
IMOSL.IMO2017A4.max_two_nsmul_b_and_c_bdd
[102, 1]
[120, 44]
have h3 : max (c D) (2 β€’ b D) ≀ max (2 β€’ b D) (2 β€’ (c D - b D)) := by refine max_le (le_max_of_two_nsmul_le_add ?_) (le_max_left _ _) rw [← nsmul_add, add_sub_cancel]
G : Type u_1 D : β„• inst✝ : LinearOrderedAddCommGroup G b c : β„• β†’ G h : βˆ€ (n : β„•), D ≀ n β†’ b (n + 1) ≀ max (b n) (c n - b n) h0 : βˆ€ (n : β„•), D ≀ n β†’ c (n + 1) ≀ max (c n) (2 β€’ b n) h1 : Monotone b h2 : Monotone c n : β„• ⊒ max (c n) (2 β€’ b n) ≀ max (2 β€’ b D) (2 β€’ (c D - b D))
G : Type u_1 D : β„• inst✝ : LinearOrderedAddCommGroup G b c : β„• β†’ G h : βˆ€ (n : β„•), D ≀ n β†’ b (n + 1) ≀ max (b n) (c n - b n) h0 : βˆ€ (n : β„•), D ≀ n β†’ c (n + 1) ≀ max (c n) (2 β€’ b n) h1 : Monotone b h2 : Monotone c n : β„• h3 : max (c D) (2 β€’ b D) ≀ max (2 β€’ b D) (2 β€’ (c D - b D)) ⊒ max (c n) (2 β€’ b n) ≀ max (2 β€’ b D) (2 β€’ (c D - b D))
Please generate a tactic in lean4 to solve the state. STATE: G : Type u_1 D : β„• inst✝ : LinearOrderedAddCommGroup G b c : β„• β†’ G h : βˆ€ (n : β„•), D ≀ n β†’ b (n + 1) ≀ max (b n) (c n - b n) h0 : βˆ€ (n : β„•), D ≀ n β†’ c (n + 1) ≀ max (c n) (2 β€’ b n) h1 : Monotone b h2 : Monotone c n : β„• ⊒ max (c n) (2 β€’ b n) ≀ max (2 β€’ b D) (2 β€’ (c D - b D)) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/A4/A4.lean
IMOSL.IMO2017A4.max_two_nsmul_b_and_c_bdd
[102, 1]
[120, 44]
refine (le_total n D).elim (Ξ» h4 ↦ h3.trans' (max_le_max (h2 h4) (nsmul_le_nsmul_right (h1 h4) 2))) (Nat.le_induction h3 (Ξ» n h4 h5 ↦ ?_) n)
G : Type u_1 D : β„• inst✝ : LinearOrderedAddCommGroup G b c : β„• β†’ G h : βˆ€ (n : β„•), D ≀ n β†’ b (n + 1) ≀ max (b n) (c n - b n) h0 : βˆ€ (n : β„•), D ≀ n β†’ c (n + 1) ≀ max (c n) (2 β€’ b n) h1 : Monotone b h2 : Monotone c n : β„• h3 : max (c D) (2 β€’ b D) ≀ max (2 β€’ b D) (2 β€’ (c D - b D)) ⊒ max (c n) (2 β€’ b n) ≀ max (2 β€’ b D) (2 β€’ (c D - b D))
G : Type u_1 D : β„• inst✝ : LinearOrderedAddCommGroup G b c : β„• β†’ G h : βˆ€ (n : β„•), D ≀ n β†’ b (n + 1) ≀ max (b n) (c n - b n) h0 : βˆ€ (n : β„•), D ≀ n β†’ c (n + 1) ≀ max (c n) (2 β€’ b n) h1 : Monotone b h2 : Monotone c n✝ : β„• h3 : max (c D) (2 β€’ b D) ≀ max (2 β€’ b D) (2 β€’ (c D - b D)) n : β„• h4 : D ≀ n h5 : max (c n) (2 β€’ b n) ≀ max (2 β€’ b D) (2 β€’ (c D - b D)) ⊒ max (c (n + 1)) (2 β€’ b (n + 1)) ≀ max (2 β€’ b D) (2 β€’ (c D - b D))
Please generate a tactic in lean4 to solve the state. STATE: G : Type u_1 D : β„• inst✝ : LinearOrderedAddCommGroup G b c : β„• β†’ G h : βˆ€ (n : β„•), D ≀ n β†’ b (n + 1) ≀ max (b n) (c n - b n) h0 : βˆ€ (n : β„•), D ≀ n β†’ c (n + 1) ≀ max (c n) (2 β€’ b n) h1 : Monotone b h2 : Monotone c n : β„• h3 : max (c D) (2 β€’ b D) ≀ max (2 β€’ b D) (2 β€’ (c D - b D)) ⊒ max (c n) (2 β€’ b n) ≀ max (2 β€’ b D) (2 β€’ (c D - b D)) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/A4/A4.lean
IMOSL.IMO2017A4.max_two_nsmul_b_and_c_bdd
[102, 1]
[120, 44]
rcases le_or_lt (c n) (2 β€’ b n) with h6 | h6
G : Type u_1 D : β„• inst✝ : LinearOrderedAddCommGroup G b c : β„• β†’ G h : βˆ€ (n : β„•), D ≀ n β†’ b (n + 1) ≀ max (b n) (c n - b n) h0 : βˆ€ (n : β„•), D ≀ n β†’ c (n + 1) ≀ max (c n) (2 β€’ b n) h1 : Monotone b h2 : Monotone c n✝ : β„• h3 : max (c D) (2 β€’ b D) ≀ max (2 β€’ b D) (2 β€’ (c D - b D)) n : β„• h4 : D ≀ n h5 : max (c n) (2 β€’ b n) ≀ max (2 β€’ b D) (2 β€’ (c D - b D)) ⊒ max (c (n + 1)) (2 β€’ b (n + 1)) ≀ max (2 β€’ b D) (2 β€’ (c D - b D))
case inl G : Type u_1 D : β„• inst✝ : LinearOrderedAddCommGroup G b c : β„• β†’ G h : βˆ€ (n : β„•), D ≀ n β†’ b (n + 1) ≀ max (b n) (c n - b n) h0 : βˆ€ (n : β„•), D ≀ n β†’ c (n + 1) ≀ max (c n) (2 β€’ b n) h1 : Monotone b h2 : Monotone c n✝ : β„• h3 : max (c D) (2 β€’ b D) ≀ max (2 β€’ b D) (2 β€’ (c D - b D)) n : β„• h4 : D ≀ n h5 : max (c n) (2 β€’ b n) ≀ max (2 β€’ b D) (2 β€’ (c D - b D)) h6 : c n ≀ 2 β€’ b n ⊒ max (c (n + 1)) (2 β€’ b (n + 1)) ≀ max (2 β€’ b D) (2 β€’ (c D - b D)) case inr G : Type u_1 D : β„• inst✝ : LinearOrderedAddCommGroup G b c : β„• β†’ G h : βˆ€ (n : β„•), D ≀ n β†’ b (n + 1) ≀ max (b n) (c n - b n) h0 : βˆ€ (n : β„•), D ≀ n β†’ c (n + 1) ≀ max (c n) (2 β€’ b n) h1 : Monotone b h2 : Monotone c n✝ : β„• h3 : max (c D) (2 β€’ b D) ≀ max (2 β€’ b D) (2 β€’ (c D - b D)) n : β„• h4 : D ≀ n h5 : max (c n) (2 β€’ b n) ≀ max (2 β€’ b D) (2 β€’ (c D - b D)) h6 : 2 β€’ b n < c n ⊒ max (c (n + 1)) (2 β€’ b (n + 1)) ≀ max (2 β€’ b D) (2 β€’ (c D - b D))
Please generate a tactic in lean4 to solve the state. STATE: G : Type u_1 D : β„• inst✝ : LinearOrderedAddCommGroup G b c : β„• β†’ G h : βˆ€ (n : β„•), D ≀ n β†’ b (n + 1) ≀ max (b n) (c n - b n) h0 : βˆ€ (n : β„•), D ≀ n β†’ c (n + 1) ≀ max (c n) (2 β€’ b n) h1 : Monotone b h2 : Monotone c n✝ : β„• h3 : max (c D) (2 β€’ b D) ≀ max (2 β€’ b D) (2 β€’ (c D - b D)) n : β„• h4 : D ≀ n h5 : max (c n) (2 β€’ b n) ≀ max (2 β€’ b D) (2 β€’ (c D - b D)) ⊒ max (c (n + 1)) (2 β€’ b (n + 1)) ≀ max (2 β€’ b D) (2 β€’ (c D - b D)) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/A4/A4.lean
IMOSL.IMO2017A4.max_two_nsmul_b_and_c_bdd
[102, 1]
[120, 44]
refine max_le (le_max_of_two_nsmul_le_add ?_) (le_max_left _ _)
G : Type u_1 D : β„• inst✝ : LinearOrderedAddCommGroup G b c : β„• β†’ G h : βˆ€ (n : β„•), D ≀ n β†’ b (n + 1) ≀ max (b n) (c n - b n) h0 : βˆ€ (n : β„•), D ≀ n β†’ c (n + 1) ≀ max (c n) (2 β€’ b n) h1 : Monotone b h2 : Monotone c n : β„• ⊒ max (c D) (2 β€’ b D) ≀ max (2 β€’ b D) (2 β€’ (c D - b D))
G : Type u_1 D : β„• inst✝ : LinearOrderedAddCommGroup G b c : β„• β†’ G h : βˆ€ (n : β„•), D ≀ n β†’ b (n + 1) ≀ max (b n) (c n - b n) h0 : βˆ€ (n : β„•), D ≀ n β†’ c (n + 1) ≀ max (c n) (2 β€’ b n) h1 : Monotone b h2 : Monotone c n : β„• ⊒ 2 β€’ c D ≀ 2 β€’ b D + 2 β€’ (c D - b D)
Please generate a tactic in lean4 to solve the state. STATE: G : Type u_1 D : β„• inst✝ : LinearOrderedAddCommGroup G b c : β„• β†’ G h : βˆ€ (n : β„•), D ≀ n β†’ b (n + 1) ≀ max (b n) (c n - b n) h0 : βˆ€ (n : β„•), D ≀ n β†’ c (n + 1) ≀ max (c n) (2 β€’ b n) h1 : Monotone b h2 : Monotone c n : β„• ⊒ max (c D) (2 β€’ b D) ≀ max (2 β€’ b D) (2 β€’ (c D - b D)) TACTIC: