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/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.case_floor_eventually_neg_of_one_lt
[112, 1]
[143, 46]
rw [sq, ← Int.fract_add_floor (f^[k + N] r), h, Int.cast_neg, Int.cast_natCast, mul_add, mul_neg, add_one_mul (C : R) C, add_assoc, neg_add_rev, neg_add_cancel_right] at h0
R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C : ℕ hC : 1 < C N w✝ : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋ = -↑C ε : R := (↑C + 1) * f^[N] r + ↑C ^ 2 k : ℕ h0 : (↑C + 1) * f^[k + N] r + ↑C ^ 2 = (-↑C) ^ k * ε ⊢ |(↑C + 1) * Int.fract (f^[k + N] r) - ↑C| = C ^ k • |ε|
R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C : ℕ hC : 1 < C N w✝ : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋ = -↑C ε : R := (↑C + 1) * f^[N] r + ↑C ^ 2 k : ℕ h0 : (↑C + 1) * Int.fract (f^[k + N] r) + -↑C = (-↑C) ^ k * ε ⊢ |(↑C + 1) * Int.fract (f^[k + N] r) - ↑C| = C ^ k • |ε|
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C : ℕ hC : 1 < C N w✝ : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋ = -↑C ε : R := (↑C + 1) * f^[N] r + ↑C ^ 2 k : ℕ h0 : (↑C + 1) * f^[k + N] r + ↑C ^ 2 = (-↑C) ^ k * ε ⊢ |(↑C + 1) * Int.fract (f^[k + N] r) - ↑C| = C ^ k • |ε| TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.case_floor_eventually_neg_of_one_lt
[112, 1]
[143, 46]
rw [sub_eq_add_neg, h0, abs_mul, abs_pow, abs_neg, Nat.abs_cast, nsmul_eq_mul, Nat.cast_pow]
R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C : ℕ hC : 1 < C N w✝ : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋ = -↑C ε : R := (↑C + 1) * f^[N] r + ↑C ^ 2 k : ℕ h0 : (↑C + 1) * Int.fract (f^[k + N] r) + -↑C = (-↑C) ^ k * ε ⊢ |(↑C + 1) * Int.fract (f^[k + N] r) - ↑C| = C ^ k • |ε|
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C : ℕ hC : 1 < C N w✝ : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋ = -↑C ε : R := (↑C + 1) * f^[N] r + ↑C ^ 2 k : ℕ h0 : (↑C + 1) * Int.fract (f^[k + N] r) + -↑C = (-↑C) ^ k * ε ⊢ |(↑C + 1) * Int.fract (f^[k + N] r) - ↑C| = C ^ k • |ε| TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.case_floor_eventually_neg_of_one_lt
[112, 1]
[143, 46]
apply (abs_sub _ _).trans_lt
R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C : ℕ hC : 1 < C N w✝ : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋ = -↑C ε : R := (↑C + 1) * f^[N] r + ↑C ^ 2 h0 : ∀ (k : ℕ), |(↑C + 1) * Int.fract (f^[k + N] r) - ↑C| = C ^ k • |ε| s : R ⊢ |(↑C + 1) * Int.fract s - ↑C| < ↑(C + 1 + C)
R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C : ℕ hC : 1 < C N w✝ : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋ = -↑C ε : R := (↑C + 1) * f^[N] r + ↑C ^ 2 h0 : ∀ (k : ℕ), |(↑C + 1) * Int.fract (f^[k + N] r) - ↑C| = C ^ k • |ε| s : R ⊢ |(↑C + 1) * Int.fract s| + |↑C| < ↑(C + 1 + C)
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C : ℕ hC : 1 < C N w✝ : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋ = -↑C ε : R := (↑C + 1) * f^[N] r + ↑C ^ 2 h0 : ∀ (k : ℕ), |(↑C + 1) * Int.fract (f^[k + N] r) - ↑C| = C ^ k • |ε| s : R ⊢ |(↑C + 1) * Int.fract s - ↑C| < ↑(C + 1 + C) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.case_floor_eventually_neg_of_one_lt
[112, 1]
[143, 46]
rw [Nat.abs_cast, Nat.cast_add, add_lt_add_iff_right, ← Nat.cast_succ, abs_mul, Nat.abs_cast, abs_eq_self.mpr (Int.fract_nonneg s)]
R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C : ℕ hC : 1 < C N w✝ : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋ = -↑C ε : R := (↑C + 1) * f^[N] r + ↑C ^ 2 h0 : ∀ (k : ℕ), |(↑C + 1) * Int.fract (f^[k + N] r) - ↑C| = C ^ k • |ε| s : R ⊢ |(↑C + 1) * Int.fract s| + |↑C| < ↑(C + 1 + C)
R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C : ℕ hC : 1 < C N w✝ : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋ = -↑C ε : R := (↑C + 1) * f^[N] r + ↑C ^ 2 h0 : ∀ (k : ℕ), |(↑C + 1) * Int.fract (f^[k + N] r) - ↑C| = C ^ k • |ε| s : R ⊢ ↑C.succ * Int.fract s < ↑(C + 1)
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C : ℕ hC : 1 < C N w✝ : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋ = -↑C ε : R := (↑C + 1) * f^[N] r + ↑C ^ 2 h0 : ∀ (k : ℕ), |(↑C + 1) * Int.fract (f^[k + N] r) - ↑C| = C ^ k • |ε| s : R ⊢ |(↑C + 1) * Int.fract s| + |↑C| < ↑(C + 1 + C) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.case_floor_eventually_neg_of_one_lt
[112, 1]
[143, 46]
refine mul_lt_of_lt_one_right (Nat.cast_pos.mpr C.succ_pos) (Int.fract_lt_one _)
R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C : ℕ hC : 1 < C N w✝ : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋ = -↑C ε : R := (↑C + 1) * f^[N] r + ↑C ^ 2 h0 : ∀ (k : ℕ), |(↑C + 1) * Int.fract (f^[k + N] r) - ↑C| = C ^ k • |ε| s : R ⊢ ↑C.succ * Int.fract s < ↑(C + 1)
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C : ℕ hC : 1 < C N w✝ : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋ = -↑C ε : R := (↑C + 1) * f^[N] r + ↑C ^ 2 h0 : ∀ (k : ℕ), |(↑C + 1) * Int.fract (f^[k + N] r) - ↑C| = C ^ k • |ε| s : R ⊢ ↑C.succ * Int.fract s < ↑(C + 1) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.final_solution_general
[151, 1]
[163, 70]
rcases floor_f_iter_eventually_const r with ⟨C, h⟩
R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R ⊢ (EventuallyEqual (fun x => f^[x] r) fun x => 0) ∨ (∃ s, (0 < s ∧ s < 1) ∧ EventuallyEqual (fun x => f^[x] r) (NatSeq_ofList [-s, s - 1])) ∨ ∃ C, 1 < C ∧ ∃ ε, Infinitesimal ε ∧ EventuallyEqual (fun x => (↑C + 1) * f^[x] r) fun x => -↑C ^ 2 + (-↑C) ^ x * ε
case intro R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C : ℕ h : EventuallyEqual (fun x => ⌊f^[x] r⌋) fun x => -↑C ⊢ (EventuallyEqual (fun x => f^[x] r) fun x => 0) ∨ (∃ s, (0 < s ∧ s < 1) ∧ EventuallyEqual (fun x => f^[x] r) (NatSeq_ofList [-s, s - 1])) ∨ ∃ C, 1 < C ∧ ∃ ε, Infinitesimal ε ∧ EventuallyEqual (fun x => (↑C + 1) * f^[x] r) fun x => -↑C ^ 2 + (-↑C) ^ x * ε
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R ⊢ (EventuallyEqual (fun x => f^[x] r) fun x => 0) ∨ (∃ s, (0 < s ∧ s < 1) ∧ EventuallyEqual (fun x => f^[x] r) (NatSeq_ofList [-s, s - 1])) ∨ ∃ C, 1 < C ∧ ∃ ε, Infinitesimal ε ∧ EventuallyEqual (fun x => (↑C + 1) * f^[x] r) fun x => -↑C ^ 2 + (-↑C) ^ x * ε TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.final_solution_general
[151, 1]
[163, 70]
refine C.eq_zero_or_pos.imp ?_ (λ h0 ↦ (h0 : 1 ≤ C).eq_or_lt.imp ?_ ?_)
case intro R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C : ℕ h : EventuallyEqual (fun x => ⌊f^[x] r⌋) fun x => -↑C ⊢ (EventuallyEqual (fun x => f^[x] r) fun x => 0) ∨ (∃ s, (0 < s ∧ s < 1) ∧ EventuallyEqual (fun x => f^[x] r) (NatSeq_ofList [-s, s - 1])) ∨ ∃ C, 1 < C ∧ ∃ ε, Infinitesimal ε ∧ EventuallyEqual (fun x => (↑C + 1) * f^[x] r) fun x => -↑C ^ 2 + (-↑C) ^ x * ε
case intro.refine_1 R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C : ℕ h : EventuallyEqual (fun x => ⌊f^[x] r⌋) fun x => -↑C ⊢ C = 0 → EventuallyEqual (fun x => f^[x] r) fun x => 0 case intro.refine_2 R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C : ℕ h : EventuallyEqual (fun x => ⌊f^[x] r⌋) fun x => -↑C h0 : 1 ≤ C ⊢ 1 = C → ∃ s, (0 < s ∧ s < 1) ∧ EventuallyEqual (fun x => f^[x] r) (NatSeq_ofList [-s, s - 1]) case intro.refine_3 R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C : ℕ h : EventuallyEqual (fun x => ⌊f^[x] r⌋) fun x => -↑C h0 : 1 ≤ C ⊢ 1 < C → ∃ C, 1 < C ∧ ∃ ε, Infinitesimal ε ∧ EventuallyEqual (fun x => (↑C + 1) * f^[x] r) fun x => -↑C ^ 2 + (-↑C) ^ x * ε
Please generate a tactic in lean4 to solve the state. STATE: case intro R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C : ℕ h : EventuallyEqual (fun x => ⌊f^[x] r⌋) fun x => -↑C ⊢ (EventuallyEqual (fun x => f^[x] r) fun x => 0) ∨ (∃ s, (0 < s ∧ s < 1) ∧ EventuallyEqual (fun x => f^[x] r) (NatSeq_ofList [-s, s - 1])) ∨ ∃ C, 1 < C ∧ ∃ ε, Infinitesimal ε ∧ EventuallyEqual (fun x => (↑C + 1) * f^[x] r) fun x => -↑C ^ 2 + (-↑C) ^ x * ε TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.final_solution_general
[151, 1]
[163, 70]
rintro rfl
case intro.refine_1 R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C : ℕ h : EventuallyEqual (fun x => ⌊f^[x] r⌋) fun x => -↑C ⊢ C = 0 → EventuallyEqual (fun x => f^[x] r) fun x => 0
case intro.refine_1 R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R h : EventuallyEqual (fun x => ⌊f^[x] r⌋) fun x => -↑0 ⊢ EventuallyEqual (fun x => f^[x] r) fun x => 0
Please generate a tactic in lean4 to solve the state. STATE: case intro.refine_1 R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C : ℕ h : EventuallyEqual (fun x => ⌊f^[x] r⌋) fun x => -↑C ⊢ C = 0 → EventuallyEqual (fun x => f^[x] r) fun x => 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.final_solution_general
[151, 1]
[163, 70]
exact case_floor_eventually_zero h
case intro.refine_1 R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R h : EventuallyEqual (fun x => ⌊f^[x] r⌋) fun x => -↑0 ⊢ EventuallyEqual (fun x => f^[x] r) fun x => 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro.refine_1 R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R h : EventuallyEqual (fun x => ⌊f^[x] r⌋) fun x => -↑0 ⊢ EventuallyEqual (fun x => f^[x] r) fun x => 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.final_solution_general
[151, 1]
[163, 70]
rintro rfl
case intro.refine_2 R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C : ℕ h : EventuallyEqual (fun x => ⌊f^[x] r⌋) fun x => -↑C h0 : 1 ≤ C ⊢ 1 = C → ∃ s, (0 < s ∧ s < 1) ∧ EventuallyEqual (fun x => f^[x] r) (NatSeq_ofList [-s, s - 1])
case intro.refine_2 R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R h : EventuallyEqual (fun x => ⌊f^[x] r⌋) fun x => -↑1 h0 : 1 ≤ 1 ⊢ ∃ s, (0 < s ∧ s < 1) ∧ EventuallyEqual (fun x => f^[x] r) (NatSeq_ofList [-s, s - 1])
Please generate a tactic in lean4 to solve the state. STATE: case intro.refine_2 R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C : ℕ h : EventuallyEqual (fun x => ⌊f^[x] r⌋) fun x => -↑C h0 : 1 ≤ C ⊢ 1 = C → ∃ s, (0 < s ∧ s < 1) ∧ EventuallyEqual (fun x => f^[x] r) (NatSeq_ofList [-s, s - 1]) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.final_solution_general
[151, 1]
[163, 70]
exact case_floor_eventually_neg_one h
case intro.refine_2 R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R h : EventuallyEqual (fun x => ⌊f^[x] r⌋) fun x => -↑1 h0 : 1 ≤ 1 ⊢ ∃ s, (0 < s ∧ s < 1) ∧ EventuallyEqual (fun x => f^[x] r) (NatSeq_ofList [-s, s - 1])
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro.refine_2 R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R h : EventuallyEqual (fun x => ⌊f^[x] r⌋) fun x => -↑1 h0 : 1 ≤ 1 ⊢ ∃ s, (0 < s ∧ s < 1) ∧ EventuallyEqual (fun x => f^[x] r) (NatSeq_ofList [-s, s - 1]) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.final_solution_general
[151, 1]
[163, 70]
intro h0
case intro.refine_3 R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C : ℕ h : EventuallyEqual (fun x => ⌊f^[x] r⌋) fun x => -↑C h0 : 1 ≤ C ⊢ 1 < C → ∃ C, 1 < C ∧ ∃ ε, Infinitesimal ε ∧ EventuallyEqual (fun x => (↑C + 1) * f^[x] r) fun x => -↑C ^ 2 + (-↑C) ^ x * ε
case intro.refine_3 R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C : ℕ h : EventuallyEqual (fun x => ⌊f^[x] r⌋) fun x => -↑C h0✝ : 1 ≤ C h0 : 1 < C ⊢ ∃ C, 1 < C ∧ ∃ ε, Infinitesimal ε ∧ EventuallyEqual (fun x => (↑C + 1) * f^[x] r) fun x => -↑C ^ 2 + (-↑C) ^ x * ε
Please generate a tactic in lean4 to solve the state. STATE: case intro.refine_3 R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C : ℕ h : EventuallyEqual (fun x => ⌊f^[x] r⌋) fun x => -↑C h0 : 1 ≤ C ⊢ 1 < C → ∃ C, 1 < C ∧ ∃ ε, Infinitesimal ε ∧ EventuallyEqual (fun x => (↑C + 1) * f^[x] r) fun x => -↑C ^ 2 + (-↑C) ^ x * ε TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.final_solution_general
[151, 1]
[163, 70]
exact ⟨C, h0, case_floor_eventually_neg_of_one_lt h0 h⟩
case intro.refine_3 R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C : ℕ h : EventuallyEqual (fun x => ⌊f^[x] r⌋) fun x => -↑C h0✝ : 1 ≤ C h0 : 1 < C ⊢ ∃ C, 1 < C ∧ ∃ ε, Infinitesimal ε ∧ EventuallyEqual (fun x => (↑C + 1) * f^[x] r) fun x => -↑C ^ 2 + (-↑C) ^ x * ε
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro.refine_3 R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C : ℕ h : EventuallyEqual (fun x => ⌊f^[x] r⌋) fun x => -↑C h0✝ : 1 ≤ C h0 : 1 < C ⊢ ∃ C, 1 < C ∧ ∃ ε, Infinitesimal ε ∧ EventuallyEqual (fun x => (↑C + 1) * f^[x] r) fun x => -↑C ^ 2 + (-↑C) ^ x * ε TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.Archimedean_f_iter_classification
[165, 1]
[172, 21]
rintro ⟨C, h, ε, h0, h1⟩
R : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Archimedean R r : R ⊢ (∃ C, 1 < C ∧ ∃ ε, Infinitesimal ε ∧ EventuallyEqual (fun x => (↑C + 1) * f^[x] r) fun x => -↑C ^ 2 + (-↑C) ^ x * ε) → ∃ C, 1 < C ∧ EventuallyEqual (fun x => (↑C + 1) * f^[x] r) fun x => -↑C ^ 2
case intro.intro.intro.intro R : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Archimedean R r : R C : ℕ h : 1 < C ε : R h0 : Infinitesimal ε h1 : EventuallyEqual (fun x => (↑C + 1) * f^[x] r) fun x => -↑C ^ 2 + (-↑C) ^ x * ε ⊢ ∃ C, 1 < C ∧ EventuallyEqual (fun x => (↑C + 1) * f^[x] r) fun x => -↑C ^ 2
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Archimedean R r : R ⊢ (∃ C, 1 < C ∧ ∃ ε, Infinitesimal ε ∧ EventuallyEqual (fun x => (↑C + 1) * f^[x] r) fun x => -↑C ^ 2 + (-↑C) ^ x * ε) → ∃ C, 1 < C ∧ EventuallyEqual (fun x => (↑C + 1) * f^[x] r) fun x => -↑C ^ 2 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.Archimedean_f_iter_classification
[165, 1]
[172, 21]
simp only [h0.zero_of_Archimedean, mul_zero, add_zero] at h1
case intro.intro.intro.intro R : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Archimedean R r : R C : ℕ h : 1 < C ε : R h0 : Infinitesimal ε h1 : EventuallyEqual (fun x => (↑C + 1) * f^[x] r) fun x => -↑C ^ 2 + (-↑C) ^ x * ε ⊢ ∃ C, 1 < C ∧ EventuallyEqual (fun x => (↑C + 1) * f^[x] r) fun x => -↑C ^ 2
case intro.intro.intro.intro R : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Archimedean R r : R C : ℕ h : 1 < C ε : R h0 : Infinitesimal ε h1 : EventuallyEqual (fun x => (↑C + 1) * f^[x] r) fun x => -↑C ^ 2 ⊢ ∃ C, 1 < C ∧ EventuallyEqual (fun x => (↑C + 1) * f^[x] r) fun x => -↑C ^ 2
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro R : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Archimedean R r : R C : ℕ h : 1 < C ε : R h0 : Infinitesimal ε h1 : EventuallyEqual (fun x => (↑C + 1) * f^[x] r) fun x => -↑C ^ 2 + (-↑C) ^ x * ε ⊢ ∃ C, 1 < C ∧ EventuallyEqual (fun x => (↑C + 1) * f^[x] r) fun x => -↑C ^ 2 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.Archimedean_f_iter_classification
[165, 1]
[172, 21]
exact ⟨C, h, h1⟩
case intro.intro.intro.intro R : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Archimedean R r : R C : ℕ h : 1 < C ε : R h0 : Infinitesimal ε h1 : EventuallyEqual (fun x => (↑C + 1) * f^[x] r) fun x => -↑C ^ 2 ⊢ ∃ C, 1 < C ∧ EventuallyEqual (fun x => (↑C + 1) * f^[x] r) fun x => -↑C ^ 2
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro R : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Archimedean R r : R C : ℕ h : 1 < C ε : R h0 : Infinitesimal ε h1 : EventuallyEqual (fun x => (↑C + 1) * f^[x] r) fun x => -↑C ^ 2 ⊢ ∃ C, 1 < C ∧ EventuallyEqual (fun x => (↑C + 1) * f^[x] r) fun x => -↑C ^ 2 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.final_solution
[174, 1]
[189, 87]
rcases Archimedean_f_iter_classification r with ⟨N, _, h⟩ | ⟨s, -, N, M, h⟩ | ⟨C, hC, N, _, h⟩
R : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Archimedean R r : R ⊢ ∃ N, ∀ (k : ℕ), N ≤ k → f^[k + 2] r = f^[k] r
case inl.intro.intro R : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Archimedean R r : R N w✝ : ℕ h : ∀ (k : ℕ), (fun x => f^[x] r) (k + N) = (fun x => 0) (k + w✝) ⊢ ∃ N, ∀ (k : ℕ), N ≤ k → f^[k + 2] r = f^[k] r case inr.inl.intro.intro.intro.intro R : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Archimedean R r s : R N M : ℕ h : ∀ (k : ℕ), (fun x => f^[x] r) (k + N) = NatSeq_ofList [-s, s - 1] (k + M) ⊢ ∃ N, ∀ (k : ℕ), N ≤ k → f^[k + 2] r = f^[k] r case inr.inr.intro.intro.intro.intro R : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Archimedean R r : R C : ℕ hC : 1 < C N w✝ : ℕ h : ∀ (k : ℕ), (fun x => (↑C + 1) * f^[x] r) (k + N) = (fun x => -↑C ^ 2) (k + w✝) ⊢ ∃ N, ∀ (k : ℕ), N ≤ k → f^[k + 2] r = f^[k] r
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Archimedean R r : R ⊢ ∃ N, ∀ (k : ℕ), N ≤ k → f^[k + 2] r = f^[k] r TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.final_solution
[174, 1]
[189, 87]
all_goals simp only at h; refine ⟨N, λ k h0 ↦ ?_⟩ rcases Nat.exists_eq_add_of_le' h0 with ⟨k, rfl⟩
case inl.intro.intro R : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Archimedean R r : R N w✝ : ℕ h : ∀ (k : ℕ), (fun x => f^[x] r) (k + N) = (fun x => 0) (k + w✝) ⊢ ∃ N, ∀ (k : ℕ), N ≤ k → f^[k + 2] r = f^[k] r case inr.inl.intro.intro.intro.intro R : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Archimedean R r s : R N M : ℕ h : ∀ (k : ℕ), (fun x => f^[x] r) (k + N) = NatSeq_ofList [-s, s - 1] (k + M) ⊢ ∃ N, ∀ (k : ℕ), N ≤ k → f^[k + 2] r = f^[k] r case inr.inr.intro.intro.intro.intro R : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Archimedean R r : R C : ℕ hC : 1 < C N w✝ : ℕ h : ∀ (k : ℕ), (fun x => (↑C + 1) * f^[x] r) (k + N) = (fun x => -↑C ^ 2) (k + w✝) ⊢ ∃ N, ∀ (k : ℕ), N ≤ k → f^[k + 2] r = f^[k] r
case inl.intro.intro.intro R : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Archimedean R r : R N w✝ : ℕ h : ∀ (k : ℕ), f^[k + N] r = 0 k : ℕ h0 : N ≤ k + N ⊢ f^[k + N + 2] r = f^[k + N] r case inr.inl.intro.intro.intro.intro.intro R : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Archimedean R r s : R N M : ℕ h : ∀ (k : ℕ), f^[k + N] r = NatSeq_ofList [-s, s - 1] (k + M) k : ℕ h0 : N ≤ k + N ⊢ f^[k + N + 2] r = f^[k + N] r case inr.inr.intro.intro.intro.intro.intro R : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Archimedean R r : R C : ℕ hC : 1 < C N w✝ : ℕ h : ∀ (k : ℕ), (↑C + 1) * f^[k + N] r = -↑C ^ 2 k : ℕ h0 : N ≤ k + N ⊢ f^[k + N + 2] r = f^[k + N] r
Please generate a tactic in lean4 to solve the state. STATE: case inl.intro.intro R : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Archimedean R r : R N w✝ : ℕ h : ∀ (k : ℕ), (fun x => f^[x] r) (k + N) = (fun x => 0) (k + w✝) ⊢ ∃ N, ∀ (k : ℕ), N ≤ k → f^[k + 2] r = f^[k] r case inr.inl.intro.intro.intro.intro R : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Archimedean R r s : R N M : ℕ h : ∀ (k : ℕ), (fun x => f^[x] r) (k + N) = NatSeq_ofList [-s, s - 1] (k + M) ⊢ ∃ N, ∀ (k : ℕ), N ≤ k → f^[k + 2] r = f^[k] r case inr.inr.intro.intro.intro.intro R : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Archimedean R r : R C : ℕ hC : 1 < C N w✝ : ℕ h : ∀ (k : ℕ), (fun x => (↑C + 1) * f^[x] r) (k + N) = (fun x => -↑C ^ 2) (k + w✝) ⊢ ∃ N, ∀ (k : ℕ), N ≤ k → f^[k + 2] r = f^[k] r TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.final_solution
[174, 1]
[189, 87]
simp only at h
case inr.inr.intro.intro.intro.intro R : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Archimedean R r : R C : ℕ hC : 1 < C N w✝ : ℕ h : ∀ (k : ℕ), (fun x => (↑C + 1) * f^[x] r) (k + N) = (fun x => -↑C ^ 2) (k + w✝) ⊢ ∃ N, ∀ (k : ℕ), N ≤ k → f^[k + 2] r = f^[k] r
case inr.inr.intro.intro.intro.intro R : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Archimedean R r : R C : ℕ hC : 1 < C N w✝ : ℕ h : ∀ (k : ℕ), (↑C + 1) * f^[k + N] r = -↑C ^ 2 ⊢ ∃ N, ∀ (k : ℕ), N ≤ k → f^[k + 2] r = f^[k] r
Please generate a tactic in lean4 to solve the state. STATE: case inr.inr.intro.intro.intro.intro R : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Archimedean R r : R C : ℕ hC : 1 < C N w✝ : ℕ h : ∀ (k : ℕ), (fun x => (↑C + 1) * f^[x] r) (k + N) = (fun x => -↑C ^ 2) (k + w✝) ⊢ ∃ N, ∀ (k : ℕ), N ≤ k → f^[k + 2] r = f^[k] r TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.final_solution
[174, 1]
[189, 87]
refine ⟨N, λ k h0 ↦ ?_⟩
case inr.inr.intro.intro.intro.intro R : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Archimedean R r : R C : ℕ hC : 1 < C N w✝ : ℕ h : ∀ (k : ℕ), (↑C + 1) * f^[k + N] r = -↑C ^ 2 ⊢ ∃ N, ∀ (k : ℕ), N ≤ k → f^[k + 2] r = f^[k] r
case inr.inr.intro.intro.intro.intro R : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Archimedean R r : R C : ℕ hC : 1 < C N w✝ : ℕ h : ∀ (k : ℕ), (↑C + 1) * f^[k + N] r = -↑C ^ 2 k : ℕ h0 : N ≤ k ⊢ f^[k + 2] r = f^[k] r
Please generate a tactic in lean4 to solve the state. STATE: case inr.inr.intro.intro.intro.intro R : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Archimedean R r : R C : ℕ hC : 1 < C N w✝ : ℕ h : ∀ (k : ℕ), (↑C + 1) * f^[k + N] r = -↑C ^ 2 ⊢ ∃ N, ∀ (k : ℕ), N ≤ k → f^[k + 2] r = f^[k] r TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.final_solution
[174, 1]
[189, 87]
rcases Nat.exists_eq_add_of_le' h0 with ⟨k, rfl⟩
case inr.inr.intro.intro.intro.intro R : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Archimedean R r : R C : ℕ hC : 1 < C N w✝ : ℕ h : ∀ (k : ℕ), (↑C + 1) * f^[k + N] r = -↑C ^ 2 k : ℕ h0 : N ≤ k ⊢ f^[k + 2] r = f^[k] r
case inr.inr.intro.intro.intro.intro.intro R : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Archimedean R r : R C : ℕ hC : 1 < C N w✝ : ℕ h : ∀ (k : ℕ), (↑C + 1) * f^[k + N] r = -↑C ^ 2 k : ℕ h0 : N ≤ k + N ⊢ f^[k + N + 2] r = f^[k + N] r
Please generate a tactic in lean4 to solve the state. STATE: case inr.inr.intro.intro.intro.intro R : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Archimedean R r : R C : ℕ hC : 1 < C N w✝ : ℕ h : ∀ (k : ℕ), (↑C + 1) * f^[k + N] r = -↑C ^ 2 k : ℕ h0 : N ≤ k ⊢ f^[k + 2] r = f^[k] r TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.final_solution
[174, 1]
[189, 87]
rw [h, Nat.add_right_comm, h]
case inl.intro.intro.intro R : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Archimedean R r : R N w✝ : ℕ h : ∀ (k : ℕ), f^[k + N] r = 0 k : ℕ h0 : N ≤ k + N ⊢ f^[k + N + 2] r = f^[k + N] r
no goals
Please generate a tactic in lean4 to solve the state. STATE: case inl.intro.intro.intro R : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Archimedean R r : R N w✝ : ℕ h : ∀ (k : ℕ), f^[k + N] r = 0 k : ℕ h0 : N ≤ k + N ⊢ f^[k + N + 2] r = f^[k + N] r TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.final_solution
[174, 1]
[189, 87]
rw [h, Nat.add_right_comm, h, Nat.add_right_comm]
case inr.inl.intro.intro.intro.intro.intro R : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Archimedean R r s : R N M : ℕ h : ∀ (k : ℕ), f^[k + N] r = NatSeq_ofList [-s, s - 1] (k + M) k : ℕ h0 : N ≤ k + N ⊢ f^[k + N + 2] r = f^[k + N] r
case inr.inl.intro.intro.intro.intro.intro R : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Archimedean R r s : R N M : ℕ h : ∀ (k : ℕ), f^[k + N] r = NatSeq_ofList [-s, s - 1] (k + M) k : ℕ h0 : N ≤ k + N ⊢ NatSeq_ofList [-s, s - 1] (k + M + 2) = NatSeq_ofList [-s, s - 1] (k + M)
Please generate a tactic in lean4 to solve the state. STATE: case inr.inl.intro.intro.intro.intro.intro R : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Archimedean R r s : R N M : ℕ h : ∀ (k : ℕ), f^[k + N] r = NatSeq_ofList [-s, s - 1] (k + M) k : ℕ h0 : N ≤ k + N ⊢ f^[k + N + 2] r = f^[k + N] r TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.final_solution
[174, 1]
[189, 87]
exact NatSeq_ofList_periodic [-s, s - 1] _
case inr.inl.intro.intro.intro.intro.intro R : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Archimedean R r s : R N M : ℕ h : ∀ (k : ℕ), f^[k + N] r = NatSeq_ofList [-s, s - 1] (k + M) k : ℕ h0 : N ≤ k + N ⊢ NatSeq_ofList [-s, s - 1] (k + M + 2) = NatSeq_ofList [-s, s - 1] (k + M)
no goals
Please generate a tactic in lean4 to solve the state. STATE: case inr.inl.intro.intro.intro.intro.intro R : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Archimedean R r s : R N M : ℕ h : ∀ (k : ℕ), f^[k + N] r = NatSeq_ofList [-s, s - 1] (k + M) k : ℕ h0 : N ≤ k + N ⊢ NatSeq_ofList [-s, s - 1] (k + M + 2) = NatSeq_ofList [-s, s - 1] (k + M) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.final_solution
[174, 1]
[189, 87]
replace h0 := (h (k + 2)).trans (h k).symm
case inr.inr.intro.intro.intro.intro.intro R : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Archimedean R r : R C : ℕ hC : 1 < C N w✝ : ℕ h : ∀ (k : ℕ), (↑C + 1) * f^[k + N] r = -↑C ^ 2 k : ℕ h0 : N ≤ k + N ⊢ f^[k + N + 2] r = f^[k + N] r
case inr.inr.intro.intro.intro.intro.intro R : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Archimedean R r : R C : ℕ hC : 1 < C N w✝ : ℕ h : ∀ (k : ℕ), (↑C + 1) * f^[k + N] r = -↑C ^ 2 k : ℕ h0 : (↑C + 1) * f^[k + 2 + N] r = (↑C + 1) * f^[k + N] r ⊢ f^[k + N + 2] r = f^[k + N] r
Please generate a tactic in lean4 to solve the state. STATE: case inr.inr.intro.intro.intro.intro.intro R : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Archimedean R r : R C : ℕ hC : 1 < C N w✝ : ℕ h : ∀ (k : ℕ), (↑C + 1) * f^[k + N] r = -↑C ^ 2 k : ℕ h0 : N ≤ k + N ⊢ f^[k + N + 2] r = f^[k + N] r TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.final_solution
[174, 1]
[189, 87]
rw [Nat.add_right_comm, mul_eq_mul_left_iff] at h0
case inr.inr.intro.intro.intro.intro.intro R : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Archimedean R r : R C : ℕ hC : 1 < C N w✝ : ℕ h : ∀ (k : ℕ), (↑C + 1) * f^[k + N] r = -↑C ^ 2 k : ℕ h0 : (↑C + 1) * f^[k + 2 + N] r = (↑C + 1) * f^[k + N] r ⊢ f^[k + N + 2] r = f^[k + N] r
case inr.inr.intro.intro.intro.intro.intro R : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Archimedean R r : R C : ℕ hC : 1 < C N w✝ : ℕ h : ∀ (k : ℕ), (↑C + 1) * f^[k + N] r = -↑C ^ 2 k : ℕ h0 : f^[k + N + 2] r = f^[k + N] r ∨ ↑C + 1 = 0 ⊢ f^[k + N + 2] r = f^[k + N] r
Please generate a tactic in lean4 to solve the state. STATE: case inr.inr.intro.intro.intro.intro.intro R : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Archimedean R r : R C : ℕ hC : 1 < C N w✝ : ℕ h : ∀ (k : ℕ), (↑C + 1) * f^[k + N] r = -↑C ^ 2 k : ℕ h0 : (↑C + 1) * f^[k + 2 + N] r = (↑C + 1) * f^[k + N] r ⊢ f^[k + N + 2] r = f^[k + N] r TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.final_solution
[174, 1]
[189, 87]
exact h0.resolve_right (add_pos (Nat.cast_pos.mpr (pos_of_gt hC)) one_pos).ne.symm
case inr.inr.intro.intro.intro.intro.intro R : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Archimedean R r : R C : ℕ hC : 1 < C N w✝ : ℕ h : ∀ (k : ℕ), (↑C + 1) * f^[k + N] r = -↑C ^ 2 k : ℕ h0 : f^[k + N + 2] r = f^[k + N] r ∨ ↑C + 1 = 0 ⊢ f^[k + N + 2] r = f^[k + N] r
no goals
Please generate a tactic in lean4 to solve the state. STATE: case inr.inr.intro.intro.intro.intro.intro R : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Archimedean R r : R C : ℕ hC : 1 < C N w✝ : ℕ h : ∀ (k : ℕ), (↑C + 1) * f^[k + N] r = -↑C ^ 2 k : ℕ h0 : f^[k + N + 2] r = f^[k + N] r ∨ ↑C + 1 = 0 ⊢ f^[k + N + 2] r = f^[k + N] r TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/CharTwo/Ring/Basic.lean
IMOSL.Extra.CharTwo.Semiring_of_two_eq_zero
[21, 1]
[22, 41]
rw [← two_mul, h, zero_mul]
R : Type u_1 inst✝ : NonAssocSemiring R h : 2 = 0 x : R ⊢ x + x = 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝ : NonAssocSemiring R h : 2 = 0 x : R ⊢ x + x = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/CharTwo/Ring/Basic.lean
IMOSL.Extra.CharTwo.two_eq_zero
[29, 1]
[30, 46]
rw [← one_add_one_eq_two, add_self_eq_zero]
R : Type u_1 inst✝¹ : NonAssocSemiring R inst✝ : CharTwo R ⊢ 2 = 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝¹ : NonAssocSemiring R inst✝ : CharTwo R ⊢ 2 = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/CharTwo/Ring/Basic.lean
IMOSL.Extra.CharTwo.add_mul_self_of_Commute
[32, 1]
[34, 71]
rw [add_mul, mul_add, mul_add, ← add_assoc, h, add_add_cancel_right]
R : Type u_1 inst✝¹ : NonAssocSemiring R inst✝ : CharTwo R x y : R h : x * y = y * x ⊢ (x + y) * (x + y) = x * x + y * y
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝¹ : NonAssocSemiring R inst✝ : CharTwo R x y : R h : x * y = y * x ⊢ (x + y) * (x + y) = x * x + y * y TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/CharTwo/Ring/Basic.lean
IMOSL.Extra.CharTwo.add_one_mul_self
[36, 1]
[37, 77]
rw [add_mul_self_of_Commute ((mul_one x).trans (one_mul x).symm), one_mul]
R : Type u_1 inst✝¹ : NonAssocSemiring R inst✝ : CharTwo R x : R ⊢ (x + 1) * (x + 1) = x * x + 1
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝¹ : NonAssocSemiring R inst✝ : CharTwo R x : R ⊢ (x + 1) * (x + 1) = x * x + 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/CharTwo/Ring/Basic.lean
IMOSL.Extra.CharTwo.mul_self_eq_one_iff
[39, 1]
[40, 86]
rw [← add_eq_zero_iff_eq, ← add_one_mul_self, mul_self_eq_zero, add_eq_zero_iff_eq]
R : Type u_1 inst✝² : NonAssocSemiring R inst✝¹ : CharTwo R inst✝ : NoZeroDivisors R x : R ⊢ x * x = 1 ↔ x = 1
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝² : NonAssocSemiring R inst✝¹ : CharTwo R inst✝ : NoZeroDivisors R x : R ⊢ x * x = 1 ↔ x = 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/CharTwo/Ring/Basic.lean
IMOSL.Extra.CharTwo.add_sq_of_Commute
[54, 1]
[55, 45]
rw [sq, sq, sq, add_mul_self_of_Commute h]
R : Type u_1 inst✝¹ : Semiring R inst✝ : CharTwo R x y : R h : x * y = y * x ⊢ (x + y) ^ 2 = x ^ 2 + y ^ 2
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝¹ : Semiring R inst✝ : CharTwo R x y : R h : x * y = y * x ⊢ (x + y) ^ 2 = x ^ 2 + y ^ 2 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/CharTwo/Ring/Basic.lean
IMOSL.Extra.CharTwo.add_one_sq
[57, 1]
[58, 32]
rw [sq, sq, add_one_mul_self]
R : Type u_1 inst✝¹ : Semiring R inst✝ : CharTwo R x : R ⊢ (x + 1) ^ 2 = x ^ 2 + 1
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝¹ : Semiring R inst✝ : CharTwo R x : R ⊢ (x + 1) ^ 2 = x ^ 2 + 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/CharTwo/Ring/Basic.lean
IMOSL.Extra.CharTwo.sq_eq_one_iff
[60, 1]
[61, 31]
rw [sq, mul_self_eq_one_iff]
R : Type u_1 inst✝² : Semiring R inst✝¹ : CharTwo R inst✝ : NoZeroDivisors R x : R ⊢ x ^ 2 = 1 ↔ x = 1
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝² : Semiring R inst✝¹ : CharTwo R inst✝ : NoZeroDivisors R x : R ⊢ x ^ 2 = 1 ↔ x = 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/CharTwo/Ring/Basic.lean
IMOSL.Extra.CharTwo.mul_self_eq_iff
[81, 1]
[82, 82]
rw [← add_eq_zero_iff_eq, ← add_mul_self, mul_self_eq_zero, add_eq_zero_iff_eq]
R : Type u_1 inst✝² : CommSemiring R inst✝¹ : CharTwo R inst✝ : NoZeroDivisors R x y : R ⊢ x * x = y * y ↔ x = y
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝² : CommSemiring R inst✝¹ : CharTwo R inst✝ : NoZeroDivisors R x y : R ⊢ x * x = y * y ↔ x = y TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/CharTwo/Ring/Basic.lean
IMOSL.Extra.CharTwo.sq_eq_iff
[84, 1]
[85, 31]
rw [sq, sq, mul_self_eq_iff]
R : Type u_1 inst✝² : CommSemiring R inst✝¹ : CharTwo R inst✝ : NoZeroDivisors R x y : R ⊢ x ^ 2 = y ^ 2 ↔ x = y
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝² : CommSemiring R inst✝¹ : CharTwo R inst✝ : NoZeroDivisors R x y : R ⊢ x ^ 2 = y ^ 2 ↔ x = y TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/A3/A3.lean
IMOSL.IMO2017A3.iterate_add_mul_eq
[31, 1]
[35, 59]
rw [k.mul_succ, ← Nat.add_assoc, f.iterate_add, iterate_add_mul_eq h t, ← f.iterate_add, h]
n k : ℕ S : Type u_1 f : S → S h : f^[n + k] = f^[n] t : ℕ ⊢ f^[n + k * (t + 1)] = f^[n]
no goals
Please generate a tactic in lean4 to solve the state. STATE: n k : ℕ S : Type u_1 f : S → S h : f^[n + k] = f^[n] t : ℕ ⊢ f^[n + k * (t + 1)] = f^[n] TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/A3/A3.lean
IMOSL.IMO2017A3.range_iter_two_eq_of_exists_iter_eq_self
[37, 1]
[42, 72]
apply (Set.range_comp_subset_range f f).antisymm
S : Type u_1 m : ℕ f : S → S h : 2 ≤ m h0 : f^[m] = f ⊢ Set.range f^[2] = Set.range f
S : Type u_1 m : ℕ f : S → S h : 2 ≤ m h0 : f^[m] = f ⊢ Set.range f ⊆ Set.range (f ∘ f)
Please generate a tactic in lean4 to solve the state. STATE: S : Type u_1 m : ℕ f : S → S h : 2 ≤ m h0 : f^[m] = f ⊢ Set.range f^[2] = Set.range f TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/A3/A3.lean
IMOSL.IMO2017A3.range_iter_two_eq_of_exists_iter_eq_self
[37, 1]
[42, 72]
rcases Nat.exists_eq_add_of_le h with ⟨k, rfl⟩
S : Type u_1 m : ℕ f : S → S h : 2 ≤ m h0 : f^[m] = f ⊢ Set.range f ⊆ Set.range (f ∘ f)
case intro S : Type u_1 f : S → S k : ℕ h : 2 ≤ 2 + k h0 : f^[2 + k] = f ⊢ Set.range f ⊆ Set.range (f ∘ f)
Please generate a tactic in lean4 to solve the state. STATE: S : Type u_1 m : ℕ f : S → S h : 2 ≤ m h0 : f^[m] = f ⊢ Set.range f ⊆ Set.range (f ∘ f) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/A3/A3.lean
IMOSL.IMO2017A3.range_iter_two_eq_of_exists_iter_eq_self
[37, 1]
[42, 72]
nth_rw 1 [← h0, f.iterate_add]
case intro S : Type u_1 f : S → S k : ℕ h : 2 ≤ 2 + k h0 : f^[2 + k] = f ⊢ Set.range f ⊆ Set.range (f ∘ f)
case intro S : Type u_1 f : S → S k : ℕ h : 2 ≤ 2 + k h0 : f^[2 + k] = f ⊢ Set.range (f^[2] ∘ f^[k]) ⊆ Set.range (f ∘ f)
Please generate a tactic in lean4 to solve the state. STATE: case intro S : Type u_1 f : S → S k : ℕ h : 2 ≤ 2 + k h0 : f^[2 + k] = f ⊢ Set.range f ⊆ Set.range (f ∘ f) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/A3/A3.lean
IMOSL.IMO2017A3.range_iter_two_eq_of_exists_iter_eq_self
[37, 1]
[42, 72]
exact Set.range_comp_subset_range _ _
case intro S : Type u_1 f : S → S k : ℕ h : 2 ≤ 2 + k h0 : f^[2 + k] = f ⊢ Set.range (f^[2] ∘ f^[k]) ⊆ Set.range (f ∘ f)
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro S : Type u_1 f : S → S k : ℕ h : 2 ≤ 2 + k h0 : f^[2 + k] = f ⊢ Set.range (f^[2] ∘ f^[k]) ⊆ Set.range (f ∘ f) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/A3/A3.lean
IMOSL.IMO2017A3.exists_lt_iterate_eq
[46, 1]
[49, 73]
obtain ⟨a, b, h, h0⟩ : ∃ a b : ℕ, a ≠ b ∧ f^[a] = f^[b] := Finite.exists_ne_map_eq_of_infinite _
S : Type u_1 inst✝¹ : Fintype S inst✝ : DecidableEq S f : S → S ⊢ ∃ a b, a < b ∧ f^[a] = f^[b]
case intro.intro.intro S : Type u_1 inst✝¹ : Fintype S inst✝ : DecidableEq S f : S → S a b : ℕ h : a ≠ b h0 : f^[a] = f^[b] ⊢ ∃ a b, a < b ∧ f^[a] = f^[b]
Please generate a tactic in lean4 to solve the state. STATE: S : Type u_1 inst✝¹ : Fintype S inst✝ : DecidableEq S f : S → S ⊢ ∃ a b, a < b ∧ f^[a] = f^[b] TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/A3/A3.lean
IMOSL.IMO2017A3.exists_lt_iterate_eq
[46, 1]
[49, 73]
exact h.lt_or_lt.elim (λ h ↦ ⟨a, b, h, h0⟩) (λ h ↦ ⟨b, a, h, h0.symm⟩)
case intro.intro.intro S : Type u_1 inst✝¹ : Fintype S inst✝ : DecidableEq S f : S → S a b : ℕ h : a ≠ b h0 : f^[a] = f^[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 S : Type u_1 inst✝¹ : Fintype S inst✝ : DecidableEq S f : S → S a b : ℕ h : a ≠ b h0 : f^[a] = f^[b] ⊢ ∃ a b, a < b ∧ f^[a] = f^[b] TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/A3/A3.lean
IMOSL.IMO2017A3.exists_iterate_idempotent
[51, 1]
[61, 59]
obtain ⟨a, b, h, h0⟩ := exists_lt_iterate_eq f
S : Type u_1 inst✝¹ : Fintype S inst✝ : DecidableEq S f : S → S ⊢ ∃ n, 0 < n ∧ f^[2 * n] = f^[n]
case intro.intro.intro S : Type u_1 inst✝¹ : Fintype S inst✝ : DecidableEq S f : S → S a b : ℕ h : a < b h0 : f^[a] = f^[b] ⊢ ∃ n, 0 < n ∧ f^[2 * n] = f^[n]
Please generate a tactic in lean4 to solve the state. STATE: S : Type u_1 inst✝¹ : Fintype S inst✝ : DecidableEq S f : S → S ⊢ ∃ n, 0 < n ∧ f^[2 * n] = f^[n] TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/A3/A3.lean
IMOSL.IMO2017A3.exists_iterate_idempotent
[51, 1]
[61, 59]
rcases Nat.exists_eq_add_of_le h.le with ⟨c, rfl⟩
case intro.intro.intro S : Type u_1 inst✝¹ : Fintype S inst✝ : DecidableEq S f : S → S a b : ℕ h : a < b h0 : f^[a] = f^[b] ⊢ ∃ n, 0 < n ∧ f^[2 * n] = f^[n]
case intro.intro.intro.intro S : Type u_1 inst✝¹ : Fintype S inst✝ : DecidableEq S f : S → S a c : ℕ h : a < a + c h0 : f^[a] = f^[a + c] ⊢ ∃ n, 0 < n ∧ f^[2 * n] = f^[n]
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro S : Type u_1 inst✝¹ : Fintype S inst✝ : DecidableEq S f : S → S a b : ℕ h : a < b h0 : f^[a] = f^[b] ⊢ ∃ n, 0 < n ∧ f^[2 * n] = f^[n] TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/A3/A3.lean
IMOSL.IMO2017A3.exists_iterate_idempotent
[51, 1]
[61, 59]
rw [Nat.lt_add_right_iff_pos] at h
case intro.intro.intro.intro S : Type u_1 inst✝¹ : Fintype S inst✝ : DecidableEq S f : S → S a c : ℕ h : a < a + c h0 : f^[a] = f^[a + c] ⊢ ∃ n, 0 < n ∧ f^[2 * n] = f^[n]
case intro.intro.intro.intro S : Type u_1 inst✝¹ : Fintype S inst✝ : DecidableEq S f : S → S a c : ℕ h : 0 < c h0 : f^[a] = f^[a + c] ⊢ ∃ n, 0 < n ∧ f^[2 * n] = f^[n]
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro S : Type u_1 inst✝¹ : Fintype S inst✝ : DecidableEq S f : S → S a c : ℕ h : a < a + c h0 : f^[a] = f^[a + c] ⊢ ∃ n, 0 < n ∧ f^[2 * n] = f^[n] TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/A3/A3.lean
IMOSL.IMO2017A3.exists_iterate_idempotent
[51, 1]
[61, 59]
refine ⟨c * a.succ, Nat.mul_pos h a.succ_pos, ?_⟩
case intro.intro.intro.intro S : Type u_1 inst✝¹ : Fintype S inst✝ : DecidableEq S f : S → S a c : ℕ h : 0 < c h0 : f^[a] = f^[a + c] ⊢ ∃ n, 0 < n ∧ f^[2 * n] = f^[n]
case intro.intro.intro.intro S : Type u_1 inst✝¹ : Fintype S inst✝ : DecidableEq S f : S → S a c : ℕ h : 0 < c h0 : f^[a] = f^[a + c] ⊢ f^[2 * (c * a.succ)] = f^[c * a.succ]
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro S : Type u_1 inst✝¹ : Fintype S inst✝ : DecidableEq S f : S → S a c : ℕ h : 0 < c h0 : f^[a] = f^[a + c] ⊢ ∃ n, 0 < n ∧ f^[2 * n] = f^[n] TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/A3/A3.lean
IMOSL.IMO2017A3.exists_iterate_idempotent
[51, 1]
[61, 59]
rw [Nat.two_mul]
case intro.intro.intro.intro S : Type u_1 inst✝¹ : Fintype S inst✝ : DecidableEq S f : S → S a c : ℕ h : 0 < c h0 : f^[a] = f^[a + c] ⊢ f^[2 * (c * a.succ)] = f^[c * a.succ]
case intro.intro.intro.intro S : Type u_1 inst✝¹ : Fintype S inst✝ : DecidableEq S f : S → S a c : ℕ h : 0 < c h0 : f^[a] = f^[a + c] ⊢ f^[c * a.succ + c * a.succ] = f^[c * a.succ]
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro S : Type u_1 inst✝¹ : Fintype S inst✝ : DecidableEq S f : S → S a c : ℕ h : 0 < c h0 : f^[a] = f^[a + c] ⊢ f^[2 * (c * a.succ)] = f^[c * a.succ] TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/A3/A3.lean
IMOSL.IMO2017A3.exists_iterate_idempotent
[51, 1]
[61, 59]
refine iterate_add_mul_eq ?_ _
case intro.intro.intro.intro S : Type u_1 inst✝¹ : Fintype S inst✝ : DecidableEq S f : S → S a c : ℕ h : 0 < c h0 : f^[a] = f^[a + c] ⊢ f^[c * a.succ + c * a.succ] = f^[c * a.succ]
case intro.intro.intro.intro S : Type u_1 inst✝¹ : Fintype S inst✝ : DecidableEq S f : S → S a c : ℕ h : 0 < c h0 : f^[a] = f^[a + c] ⊢ f^[c * a.succ + c] = f^[c * a.succ]
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro S : Type u_1 inst✝¹ : Fintype S inst✝ : DecidableEq S f : S → S a c : ℕ h : 0 < c h0 : f^[a] = f^[a + c] ⊢ f^[c * a.succ + c * a.succ] = f^[c * a.succ] TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/A3/A3.lean
IMOSL.IMO2017A3.exists_iterate_idempotent
[51, 1]
[61, 59]
obtain ⟨k, h1⟩ := Nat.exists_eq_add_of_le (Nat.le_mul_of_pos_left a.succ h)
case intro.intro.intro.intro S : Type u_1 inst✝¹ : Fintype S inst✝ : DecidableEq S f : S → S a c : ℕ h : 0 < c h0 : f^[a] = f^[a + c] ⊢ f^[c * a.succ + c] = f^[c * a.succ]
case intro.intro.intro.intro.intro S : Type u_1 inst✝¹ : Fintype S inst✝ : DecidableEq S f : S → S a c : ℕ h : 0 < c h0 : f^[a] = f^[a + c] k : ℕ h1 : c * a.succ = a.succ + k ⊢ f^[c * a.succ + c] = f^[c * a.succ]
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro S : Type u_1 inst✝¹ : Fintype S inst✝ : DecidableEq S f : S → S a c : ℕ h : 0 < c h0 : f^[a] = f^[a + c] ⊢ f^[c * a.succ + c] = f^[c * a.succ] TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/A3/A3.lean
IMOSL.IMO2017A3.exists_iterate_idempotent
[51, 1]
[61, 59]
rw [h1, Nat.add_right_comm, f.iterate_add, Nat.succ_add, f.iterate_succ, ← h0, ← f.iterate_succ, f.iterate_add]
case intro.intro.intro.intro.intro S : Type u_1 inst✝¹ : Fintype S inst✝ : DecidableEq S f : S → S a c : ℕ h : 0 < c h0 : f^[a] = f^[a + c] k : ℕ h1 : c * a.succ = a.succ + k ⊢ f^[c * a.succ + c] = f^[c * a.succ]
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro.intro S : Type u_1 inst✝¹ : Fintype S inst✝ : DecidableEq S f : S → S a c : ℕ h : 0 < c h0 : f^[a] = f^[a + c] k : ℕ h1 : c * a.succ = a.succ + k ⊢ f^[c * a.succ + c] = f^[c * a.succ] TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/A3/A3.lean
IMOSL.IMO2017A3.final_solution
[66, 1]
[73, 64]
rcases exists_iterate_idempotent f with ⟨n, h0, h1⟩
S : Type u_1 inst✝¹ : Fintype S inst✝ : DecidableEq S f : S → S h : ∀ (g : S → S), f ∘ g ∘ f = g ∘ f ∘ g → g = f ⊢ Set.range f^[2] = Set.range f
case intro.intro S : Type u_1 inst✝¹ : Fintype S inst✝ : DecidableEq S f : S → S h : ∀ (g : S → S), f ∘ g ∘ f = g ∘ f ∘ g → g = f n : ℕ h0 : 0 < n h1 : f^[2 * n] = f^[n] ⊢ Set.range f^[2] = Set.range f
Please generate a tactic in lean4 to solve the state. STATE: S : Type u_1 inst✝¹ : Fintype S inst✝ : DecidableEq S f : S → S h : ∀ (g : S → S), f ∘ g ∘ f = g ∘ f ∘ g → g = f ⊢ Set.range f^[2] = Set.range f TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/A3/A3.lean
IMOSL.IMO2017A3.final_solution
[66, 1]
[73, 64]
refine range_iter_two_eq_of_exists_iter_eq_self (Nat.lt_add_of_pos_left h0) (h _ ?_)
case intro.intro S : Type u_1 inst✝¹ : Fintype S inst✝ : DecidableEq S f : S → S h : ∀ (g : S → S), f ∘ g ∘ f = g ∘ f ∘ g → g = f n : ℕ h0 : 0 < n h1 : f^[2 * n] = f^[n] ⊢ Set.range f^[2] = Set.range f
case intro.intro S : Type u_1 inst✝¹ : Fintype S inst✝ : DecidableEq S f : S → S h : ∀ (g : S → S), f ∘ g ∘ f = g ∘ f ∘ g → g = f n : ℕ h0 : 0 < n h1 : f^[2 * n] = f^[n] ⊢ f ∘ f^[n + 1] ∘ f = f^[n + 1] ∘ f ∘ f^[n + 1]
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro S : Type u_1 inst✝¹ : Fintype S inst✝ : DecidableEq S f : S → S h : ∀ (g : S → S), f ∘ g ∘ f = g ∘ f ∘ g → g = f n : ℕ h0 : 0 < n h1 : f^[2 * n] = f^[n] ⊢ Set.range f^[2] = Set.range f TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/A3/A3.lean
IMOSL.IMO2017A3.final_solution
[66, 1]
[73, 64]
rw [← f.iterate_succ', ← f.iterate_add]
case intro.intro S : Type u_1 inst✝¹ : Fintype S inst✝ : DecidableEq S f : S → S h : ∀ (g : S → S), f ∘ g ∘ f = g ∘ f ∘ g → g = f n : ℕ h0 : 0 < n h1 : f^[2 * n] = f^[n] ⊢ f ∘ f^[n + 1] ∘ f = f^[n + 1] ∘ f ∘ f^[n + 1]
case intro.intro S : Type u_1 inst✝¹ : Fintype S inst✝ : DecidableEq S f : S → S h : ∀ (g : S → S), f ∘ g ∘ f = g ∘ f ∘ g → g = f n : ℕ h0 : 0 < n h1 : f^[2 * n] = f^[n] ⊢ f ∘ f^[n + 1] ∘ f = f^[n + 1 + (n + 1).succ]
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro S : Type u_1 inst✝¹ : Fintype S inst✝ : DecidableEq S f : S → S h : ∀ (g : S → S), f ∘ g ∘ f = g ∘ f ∘ g → g = f n : ℕ h0 : 0 < n h1 : f^[2 * n] = f^[n] ⊢ f ∘ f^[n + 1] ∘ f = f^[n + 1] ∘ f ∘ f^[n + 1] TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/A3/A3.lean
IMOSL.IMO2017A3.final_solution
[66, 1]
[73, 64]
change (f ∘ f^[n]) ∘ f^[2] = f^[n + 1 + n] ∘ f^[2]
case intro.intro S : Type u_1 inst✝¹ : Fintype S inst✝ : DecidableEq S f : S → S h : ∀ (g : S → S), f ∘ g ∘ f = g ∘ f ∘ g → g = f n : ℕ h0 : 0 < n h1 : f^[2 * n] = f^[n] ⊢ f ∘ f^[n + 1] ∘ f = f^[n + 1 + (n + 1).succ]
case intro.intro S : Type u_1 inst✝¹ : Fintype S inst✝ : DecidableEq S f : S → S h : ∀ (g : S → S), f ∘ g ∘ f = g ∘ f ∘ g → g = f n : ℕ h0 : 0 < n h1 : f^[2 * n] = f^[n] ⊢ (f ∘ f^[n]) ∘ f^[2] = f^[n + 1 + n] ∘ f^[2]
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro S : Type u_1 inst✝¹ : Fintype S inst✝ : DecidableEq S f : S → S h : ∀ (g : S → S), f ∘ g ∘ f = g ∘ f ∘ g → g = f n : ℕ h0 : 0 < n h1 : f^[2 * n] = f^[n] ⊢ f ∘ f^[n + 1] ∘ f = f^[n + 1 + (n + 1).succ] TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/A3/A3.lean
IMOSL.IMO2017A3.final_solution
[66, 1]
[73, 64]
rw [Nat.succ_add, ← Nat.two_mul, f.iterate_succ' (2 * n), h1]
case intro.intro S : Type u_1 inst✝¹ : Fintype S inst✝ : DecidableEq S f : S → S h : ∀ (g : S → S), f ∘ g ∘ f = g ∘ f ∘ g → g = f n : ℕ h0 : 0 < n h1 : f^[2 * n] = f^[n] ⊢ (f ∘ f^[n]) ∘ f^[2] = f^[n + 1 + n] ∘ f^[2]
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro S : Type u_1 inst✝¹ : Fintype S inst✝ : DecidableEq S f : S → S h : ∀ (g : S → S), f ∘ g ∘ f = g ∘ f ∘ g → g = f n : ℕ h0 : 0 < n h1 : f^[2 * n] = f^[n] ⊢ (f ∘ f^[n]) ∘ f^[2] = f^[n + 1 + n] ∘ f^[2] TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/NatSequence/EventuallyEqual.lean
IMOSL.Extra.EventuallyEqual.symm
[26, 1]
[27, 66]
rcases h with ⟨N_a, N_b, h⟩
α✝ : Sort u_1 a b : Nat → α✝ h : EventuallyEqual a b ⊢ EventuallyEqual b a
case intro.intro α✝ : Sort u_1 a b : Nat → α✝ N_a N_b : Nat h : ∀ (k : Nat), a (k + N_a) = b (k + N_b) ⊢ EventuallyEqual b a
Please generate a tactic in lean4 to solve the state. STATE: α✝ : Sort u_1 a b : Nat → α✝ h : EventuallyEqual a b ⊢ EventuallyEqual b a TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/NatSequence/EventuallyEqual.lean
IMOSL.Extra.EventuallyEqual.symm
[26, 1]
[27, 66]
exact ⟨N_b, N_a, λ k ↦ (h k).symm⟩
case intro.intro α✝ : Sort u_1 a b : Nat → α✝ N_a N_b : Nat h : ∀ (k : Nat), a (k + N_a) = b (k + N_b) ⊢ EventuallyEqual b a
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro α✝ : Sort u_1 a b : Nat → α✝ N_a N_b : Nat h : ∀ (k : Nat), a (k + N_a) = b (k + N_b) ⊢ EventuallyEqual b a TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/NatSequence/EventuallyEqual.lean
IMOSL.Extra.EventuallyEqual.trans
[29, 1]
[34, 85]
rcases h with ⟨N_a, N_b, h⟩
α✝ : Sort u_1 a b c : Nat → α✝ h : EventuallyEqual a b h0 : EventuallyEqual b c ⊢ EventuallyEqual a c
case intro.intro α✝ : Sort u_1 a b c : Nat → α✝ h0 : EventuallyEqual b c N_a N_b : Nat h : ∀ (k : Nat), a (k + N_a) = b (k + N_b) ⊢ EventuallyEqual a c
Please generate a tactic in lean4 to solve the state. STATE: α✝ : Sort u_1 a b c : Nat → α✝ h : EventuallyEqual a b h0 : EventuallyEqual b c ⊢ EventuallyEqual a c TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/NatSequence/EventuallyEqual.lean
IMOSL.Extra.EventuallyEqual.trans
[29, 1]
[34, 85]
rcases h0 with ⟨K_b, K_c, h0⟩
case intro.intro α✝ : Sort u_1 a b c : Nat → α✝ h0 : EventuallyEqual b c N_a N_b : Nat h : ∀ (k : Nat), a (k + N_a) = b (k + N_b) ⊢ EventuallyEqual a c
case intro.intro.intro.intro α✝ : Sort u_1 a b c : Nat → α✝ N_a N_b : Nat h : ∀ (k : Nat), a (k + N_a) = b (k + N_b) K_b K_c : Nat h0 : ∀ (k : Nat), b (k + K_b) = c (k + K_c) ⊢ EventuallyEqual a c
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro α✝ : Sort u_1 a b c : Nat → α✝ h0 : EventuallyEqual b c N_a N_b : Nat h : ∀ (k : Nat), a (k + N_a) = b (k + N_b) ⊢ EventuallyEqual a c TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/NatSequence/EventuallyEqual.lean
IMOSL.Extra.EventuallyEqual.trans
[29, 1]
[34, 85]
refine ⟨K_b + N_a, K_c + N_b, λ k ↦ ?_⟩
case intro.intro.intro.intro α✝ : Sort u_1 a b c : Nat → α✝ N_a N_b : Nat h : ∀ (k : Nat), a (k + N_a) = b (k + N_b) K_b K_c : Nat h0 : ∀ (k : Nat), b (k + K_b) = c (k + K_c) ⊢ EventuallyEqual a c
case intro.intro.intro.intro α✝ : Sort u_1 a b c : Nat → α✝ N_a N_b : Nat h : ∀ (k : Nat), a (k + N_a) = b (k + N_b) K_b K_c : Nat h0 : ∀ (k : Nat), b (k + K_b) = c (k + K_c) k : Nat ⊢ a (k + (K_b + N_a)) = c (k + (K_c + N_b))
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro α✝ : Sort u_1 a b c : Nat → α✝ N_a N_b : Nat h : ∀ (k : Nat), a (k + N_a) = b (k + N_b) K_b K_c : Nat h0 : ∀ (k : Nat), b (k + K_b) = c (k + K_c) ⊢ EventuallyEqual a c TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/NatSequence/EventuallyEqual.lean
IMOSL.Extra.EventuallyEqual.trans
[29, 1]
[34, 85]
rw [← Nat.add_assoc, h, Nat.add_right_comm, h0, Nat.add_right_comm, Nat.add_assoc]
case intro.intro.intro.intro α✝ : Sort u_1 a b c : Nat → α✝ N_a N_b : Nat h : ∀ (k : Nat), a (k + N_a) = b (k + N_b) K_b K_c : Nat h0 : ∀ (k : Nat), b (k + K_b) = c (k + K_c) k : Nat ⊢ a (k + (K_b + N_a)) = c (k + (K_c + N_b))
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro α✝ : Sort u_1 a b c : Nat → α✝ N_a N_b : Nat h : ∀ (k : Nat), a (k + N_a) = b (k + N_b) K_b K_c : Nat h0 : ∀ (k : Nat), b (k + K_b) = c (k + K_c) k : Nat ⊢ a (k + (K_b + N_a)) = c (k + (K_c + N_b)) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/N3/N3.lean
IMOSL.IMO2012N3.prime_not_dvd_descFactorial
[20, 1]
[26, 47]
refine Nat.rec (λ _ ↦ h.not_dvd_one) (λ r h0 h1 ↦ ?_)
p : ℕ h : p.Prime k : ℕ ⊢ ∀ r < p, ¬p ∣ (p * k + r).descFactorial r
p : ℕ h : p.Prime k r : ℕ h0 : r < p → ¬p ∣ (p * k + r).descFactorial r h1 : r.succ < p ⊢ ¬p ∣ (p * k + r.succ).descFactorial r.succ
Please generate a tactic in lean4 to solve the state. STATE: p : ℕ h : p.Prime k : ℕ ⊢ ∀ r < p, ¬p ∣ (p * k + r).descFactorial r TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/N3/N3.lean
IMOSL.IMO2012N3.prime_not_dvd_descFactorial
[20, 1]
[26, 47]
rw [Nat.add_succ, Nat.succ_descFactorial_succ]
p : ℕ h : p.Prime k r : ℕ h0 : r < p → ¬p ∣ (p * k + r).descFactorial r h1 : r.succ < p ⊢ ¬p ∣ (p * k + r.succ).descFactorial r.succ
p : ℕ h : p.Prime k r : ℕ h0 : r < p → ¬p ∣ (p * k + r).descFactorial r h1 : r.succ < p ⊢ ¬p ∣ (p * k + r + 1) * (p * k + r).descFactorial r
Please generate a tactic in lean4 to solve the state. STATE: p : ℕ h : p.Prime k r : ℕ h0 : r < p → ¬p ∣ (p * k + r).descFactorial r h1 : r.succ < p ⊢ ¬p ∣ (p * k + r.succ).descFactorial r.succ TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/N3/N3.lean
IMOSL.IMO2012N3.prime_not_dvd_descFactorial
[20, 1]
[26, 47]
refine h.not_dvd_mul ?_ (h0 <| r.lt_succ_self.trans h1)
p : ℕ h : p.Prime k r : ℕ h0 : r < p → ¬p ∣ (p * k + r).descFactorial r h1 : r.succ < p ⊢ ¬p ∣ (p * k + r + 1) * (p * k + r).descFactorial r
p : ℕ h : p.Prime k r : ℕ h0 : r < p → ¬p ∣ (p * k + r).descFactorial r h1 : r.succ < p ⊢ ¬p ∣ p * k + r + 1
Please generate a tactic in lean4 to solve the state. STATE: p : ℕ h : p.Prime k r : ℕ h0 : r < p → ¬p ∣ (p * k + r).descFactorial r h1 : r.succ < p ⊢ ¬p ∣ (p * k + r + 1) * (p * k + r).descFactorial r TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/N3/N3.lean
IMOSL.IMO2012N3.prime_not_dvd_descFactorial
[20, 1]
[26, 47]
rw [add_assoc, Nat.dvd_add_right ⟨k, rfl⟩]
p : ℕ h : p.Prime k r : ℕ h0 : r < p → ¬p ∣ (p * k + r).descFactorial r h1 : r.succ < p ⊢ ¬p ∣ p * k + r + 1
p : ℕ h : p.Prime k r : ℕ h0 : r < p → ¬p ∣ (p * k + r).descFactorial r h1 : r.succ < p ⊢ ¬p ∣ r + 1
Please generate a tactic in lean4 to solve the state. STATE: p : ℕ h : p.Prime k r : ℕ h0 : r < p → ¬p ∣ (p * k + r).descFactorial r h1 : r.succ < p ⊢ ¬p ∣ p * k + r + 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/N3/N3.lean
IMOSL.IMO2012N3.prime_not_dvd_descFactorial
[20, 1]
[26, 47]
exact Nat.not_dvd_of_pos_of_lt r.succ_pos h1
p : ℕ h : p.Prime k r : ℕ h0 : r < p → ¬p ∣ (p * k + r).descFactorial r h1 : r.succ < p ⊢ ¬p ∣ r + 1
no goals
Please generate a tactic in lean4 to solve the state. STATE: p : ℕ h : p.Prime k r : ℕ h0 : r < p → ¬p ∣ (p * k + r).descFactorial r h1 : r.succ < p ⊢ ¬p ∣ r + 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/N3/N3.lean
IMOSL.IMO2012N3.prime_binom_not_dvd
[28, 1]
[35, 59]
apply prime_not_dvd_descFactorial h k.pred p.pred (p.pred_lt_self h.pos)
k p : ℕ h : p.Prime h0 : k ≠ 0 h1 : p * k ∣ (p * k).choose p ⊢ False
k p : ℕ h : p.Prime h0 : k ≠ 0 h1 : p * k ∣ (p * k).choose p ⊢ p ∣ (p * k.pred + p.pred).descFactorial p.pred
Please generate a tactic in lean4 to solve the state. STATE: k p : ℕ h : p.Prime h0 : k ≠ 0 h1 : p * k ∣ (p * k).choose p ⊢ False TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/N3/N3.lean
IMOSL.IMO2012N3.prime_binom_not_dvd
[28, 1]
[35, 59]
rw [← Nat.mul_dvd_mul_iff_left (p * k.pred + p.pred).succ_pos, ← Nat.succ_descFactorial_succ, ← Nat.succ_eq_add_one, ← Nat.add_succ, ← Nat.succ_eq_add_one, Nat.succ_pred h.ne_zero, ← p.mul_succ, Nat.succ_pred h0, Nat.descFactorial_eq_factorial_mul_choose, mul_comm]
k p : ℕ h : p.Prime h0 : k ≠ 0 h1 : p * k ∣ (p * k).choose p ⊢ p ∣ (p * k.pred + p.pred).descFactorial p.pred
k p : ℕ h : p.Prime h0 : k ≠ 0 h1 : p * k ∣ (p * k).choose p ⊢ p * (p * k) ∣ p.factorial * (p * k).choose p
Please generate a tactic in lean4 to solve the state. STATE: k p : ℕ h : p.Prime h0 : k ≠ 0 h1 : p * k ∣ (p * k).choose p ⊢ p ∣ (p * k.pred + p.pred).descFactorial p.pred TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/N3/N3.lean
IMOSL.IMO2012N3.prime_binom_not_dvd
[28, 1]
[35, 59]
exact mul_dvd_mul (Nat.dvd_factorial h.pos p.le_refl) h1
k p : ℕ h : p.Prime h0 : k ≠ 0 h1 : p * k ∣ (p * k).choose p ⊢ p * (p * k) ∣ p.factorial * (p * k).choose p
no goals
Please generate a tactic in lean4 to solve the state. STATE: k p : ℕ h : p.Prime h0 : k ≠ 0 h1 : p * k ∣ (p * k).choose p ⊢ p * (p * k) ∣ p.factorial * (p * k).choose p TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/N3/N3.lean
IMOSL.IMO2012N3.final_solution
[38, 1]
[77, 52]
refine ⟨λ h0 ↦ ?_, λ h0 n h1 ↦ ?_⟩
m : ℕ h : 1 < m ⊢ (∀ (n : ℕ), 2 * n ≤ m → n ∣ n.choose (m - 2 * n)) ↔ m.Prime
case refine_1 m : ℕ h : 1 < m h0 : ∀ (n : ℕ), 2 * n ≤ m → n ∣ n.choose (m - 2 * n) ⊢ m.Prime case refine_2 m : ℕ h : 1 < m h0 : m.Prime n : ℕ h1 : 2 * n ≤ m ⊢ n ∣ n.choose (m - 2 * n)
Please generate a tactic in lean4 to solve the state. STATE: m : ℕ h : 1 < m ⊢ (∀ (n : ℕ), 2 * n ≤ m → n ∣ n.choose (m - 2 * n)) ↔ m.Prime TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/N3/N3.lean
IMOSL.IMO2012N3.final_solution
[38, 1]
[77, 52]
by_cases h1 : 2 ∣ m
case refine_1 m : ℕ h : 1 < m h0 : ∀ (n : ℕ), 2 * n ≤ m → n ∣ n.choose (m - 2 * n) ⊢ m.Prime case refine_2 m : ℕ h : 1 < m h0 : m.Prime n : ℕ h1 : 2 * n ≤ m ⊢ n ∣ n.choose (m - 2 * n)
case pos m : ℕ h : 1 < m h0 : ∀ (n : ℕ), 2 * n ≤ m → n ∣ n.choose (m - 2 * n) h1 : 2 ∣ m ⊢ m.Prime case neg m : ℕ h : 1 < m h0 : ∀ (n : ℕ), 2 * n ≤ m → n ∣ n.choose (m - 2 * n) h1 : ¬2 ∣ m ⊢ m.Prime case refine_2 m : ℕ h : 1 < m h0 : m.Prime n : ℕ h1 : 2 * n ≤ m ⊢ n ∣ n.choose (m - 2 * n)
Please generate a tactic in lean4 to solve the state. STATE: case refine_1 m : ℕ h : 1 < m h0 : ∀ (n : ℕ), 2 * n ≤ m → n ∣ n.choose (m - 2 * n) ⊢ m.Prime case refine_2 m : ℕ h : 1 < m h0 : m.Prime n : ℕ h1 : 2 * n ≤ m ⊢ n ∣ n.choose (m - 2 * n) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/N3/N3.lean
IMOSL.IMO2012N3.final_solution
[38, 1]
[77, 52]
rcases h1 with ⟨k, rfl⟩
case pos m : ℕ h : 1 < m h0 : ∀ (n : ℕ), 2 * n ≤ m → n ∣ n.choose (m - 2 * n) h1 : 2 ∣ m ⊢ m.Prime
case pos.intro k : ℕ h : 1 < 2 * k h0 : ∀ (n : ℕ), 2 * n ≤ 2 * k → n ∣ n.choose (2 * k - 2 * n) ⊢ (2 * k).Prime
Please generate a tactic in lean4 to solve the state. STATE: case pos m : ℕ h : 1 < m h0 : ∀ (n : ℕ), 2 * n ≤ m → n ∣ n.choose (m - 2 * n) h1 : 2 ∣ m ⊢ m.Prime TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/N3/N3.lean
IMOSL.IMO2012N3.final_solution
[38, 1]
[77, 52]
specialize h0 k (2 * k).le_refl
case pos.intro k : ℕ h : 1 < 2 * k h0 : ∀ (n : ℕ), 2 * n ≤ 2 * k → n ∣ n.choose (2 * k - 2 * n) ⊢ (2 * k).Prime
case pos.intro k : ℕ h : 1 < 2 * k h0 : k ∣ k.choose (2 * k - 2 * k) ⊢ (2 * k).Prime
Please generate a tactic in lean4 to solve the state. STATE: case pos.intro k : ℕ h : 1 < 2 * k h0 : ∀ (n : ℕ), 2 * n ≤ 2 * k → n ∣ n.choose (2 * k - 2 * n) ⊢ (2 * k).Prime TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/N3/N3.lean
IMOSL.IMO2012N3.final_solution
[38, 1]
[77, 52]
rw [Nat.sub_self, k.choose_zero_right, Nat.dvd_one] at h0
case pos.intro k : ℕ h : 1 < 2 * k h0 : k ∣ k.choose (2 * k - 2 * k) ⊢ (2 * k).Prime
case pos.intro k : ℕ h : 1 < 2 * k h0 : k = 1 ⊢ (2 * k).Prime
Please generate a tactic in lean4 to solve the state. STATE: case pos.intro k : ℕ h : 1 < 2 * k h0 : k ∣ k.choose (2 * k - 2 * k) ⊢ (2 * k).Prime TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/N3/N3.lean
IMOSL.IMO2012N3.final_solution
[38, 1]
[77, 52]
rw [h0, mul_one]
case pos.intro k : ℕ h : 1 < 2 * k h0 : k = 1 ⊢ (2 * k).Prime
case pos.intro k : ℕ h : 1 < 2 * k h0 : k = 1 ⊢ Nat.Prime 2
Please generate a tactic in lean4 to solve the state. STATE: case pos.intro k : ℕ h : 1 < 2 * k h0 : k = 1 ⊢ (2 * k).Prime TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/N3/N3.lean
IMOSL.IMO2012N3.final_solution
[38, 1]
[77, 52]
exact Nat.prime_two
case pos.intro k : ℕ h : 1 < 2 * k h0 : k = 1 ⊢ Nat.Prime 2
no goals
Please generate a tactic in lean4 to solve the state. STATE: case pos.intro k : ℕ h : 1 < 2 * k h0 : k = 1 ⊢ Nat.Prime 2 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/N3/N3.lean
IMOSL.IMO2012N3.final_solution
[38, 1]
[77, 52]
obtain ⟨p, h2, k, rfl⟩ : ∃ p : ℕ, p.Prime ∧ p ∣ m := ⟨m.minFac, Nat.minFac_prime h.ne.symm, m.minFac_dvd⟩
case neg m : ℕ h : 1 < m h0 : ∀ (n : ℕ), 2 * n ≤ m → n ∣ n.choose (m - 2 * n) h1 : ¬2 ∣ m ⊢ m.Prime
case neg.intro.intro.intro p : ℕ h2 : p.Prime k : ℕ h : 1 < p * k h0 : ∀ (n : ℕ), 2 * n ≤ p * k → n ∣ n.choose (p * k - 2 * n) h1 : ¬2 ∣ p * k ⊢ (p * k).Prime
Please generate a tactic in lean4 to solve the state. STATE: case neg m : ℕ h : 1 < m h0 : ∀ (n : ℕ), 2 * n ≤ m → n ∣ n.choose (m - 2 * n) h1 : ¬2 ∣ m ⊢ m.Prime TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/N3/N3.lean
IMOSL.IMO2012N3.final_solution
[38, 1]
[77, 52]
rw [Nat.two_dvd_ne_zero, ← Nat.odd_iff, Nat.odd_mul] at h1
case neg.intro.intro.intro p : ℕ h2 : p.Prime k : ℕ h : 1 < p * k h0 : ∀ (n : ℕ), 2 * n ≤ p * k → n ∣ n.choose (p * k - 2 * n) h1 : ¬2 ∣ p * k ⊢ (p * k).Prime
case neg.intro.intro.intro p : ℕ h2 : p.Prime k : ℕ h : 1 < p * k h0 : ∀ (n : ℕ), 2 * n ≤ p * k → n ∣ n.choose (p * k - 2 * n) h1 : Odd p ∧ Odd k ⊢ (p * k).Prime
Please generate a tactic in lean4 to solve the state. STATE: case neg.intro.intro.intro p : ℕ h2 : p.Prime k : ℕ h : 1 < p * k h0 : ∀ (n : ℕ), 2 * n ≤ p * k → n ∣ n.choose (p * k - 2 * n) h1 : ¬2 ∣ p * k ⊢ (p * k).Prime TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/N3/N3.lean
IMOSL.IMO2012N3.final_solution
[38, 1]
[77, 52]
rcases h1 with ⟨-, k, rfl⟩
case neg.intro.intro.intro p : ℕ h2 : p.Prime k : ℕ h : 1 < p * k h0 : ∀ (n : ℕ), 2 * n ≤ p * k → n ∣ n.choose (p * k - 2 * n) h1 : Odd p ∧ Odd k ⊢ (p * k).Prime
case neg.intro.intro.intro.intro.intro p : ℕ h2 : p.Prime k : ℕ h : 1 < p * (2 * k + 1) h0 : ∀ (n : ℕ), 2 * n ≤ p * (2 * k + 1) → n ∣ n.choose (p * (2 * k + 1) - 2 * n) ⊢ (p * (2 * k + 1)).Prime
Please generate a tactic in lean4 to solve the state. STATE: case neg.intro.intro.intro p : ℕ h2 : p.Prime k : ℕ h : 1 < p * k h0 : ∀ (n : ℕ), 2 * n ≤ p * k → n ∣ n.choose (p * k - 2 * n) h1 : Odd p ∧ Odd k ⊢ (p * k).Prime TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/N3/N3.lean
IMOSL.IMO2012N3.final_solution
[38, 1]
[77, 52]
suffices k = 0 by rwa [this, mul_zero, zero_add, mul_one]
case neg.intro.intro.intro.intro.intro p : ℕ h2 : p.Prime k : ℕ h : 1 < p * (2 * k + 1) h0 : ∀ (n : ℕ), 2 * n ≤ p * (2 * k + 1) → n ∣ n.choose (p * (2 * k + 1) - 2 * n) ⊢ (p * (2 * k + 1)).Prime
case neg.intro.intro.intro.intro.intro p : ℕ h2 : p.Prime k : ℕ h : 1 < p * (2 * k + 1) h0 : ∀ (n : ℕ), 2 * n ≤ p * (2 * k + 1) → n ∣ n.choose (p * (2 * k + 1) - 2 * n) ⊢ k = 0
Please generate a tactic in lean4 to solve the state. STATE: case neg.intro.intro.intro.intro.intro p : ℕ h2 : p.Prime k : ℕ h : 1 < p * (2 * k + 1) h0 : ∀ (n : ℕ), 2 * n ≤ p * (2 * k + 1) → n ∣ n.choose (p * (2 * k + 1) - 2 * n) ⊢ (p * (2 * k + 1)).Prime TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/N3/N3.lean
IMOSL.IMO2012N3.final_solution
[38, 1]
[77, 52]
by_contra h1
case neg.intro.intro.intro.intro.intro p : ℕ h2 : p.Prime k : ℕ h : 1 < p * (2 * k + 1) h0 : ∀ (n : ℕ), 2 * n ≤ p * (2 * k + 1) → n ∣ n.choose (p * (2 * k + 1) - 2 * n) ⊢ k = 0
case neg.intro.intro.intro.intro.intro p : ℕ h2 : p.Prime k : ℕ h : 1 < p * (2 * k + 1) h0 : ∀ (n : ℕ), 2 * n ≤ p * (2 * k + 1) → n ∣ n.choose (p * (2 * k + 1) - 2 * n) h1 : ¬k = 0 ⊢ False
Please generate a tactic in lean4 to solve the state. STATE: case neg.intro.intro.intro.intro.intro p : ℕ h2 : p.Prime k : ℕ h : 1 < p * (2 * k + 1) h0 : ∀ (n : ℕ), 2 * n ≤ p * (2 * k + 1) → n ∣ n.choose (p * (2 * k + 1) - 2 * n) ⊢ k = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/N3/N3.lean
IMOSL.IMO2012N3.final_solution
[38, 1]
[77, 52]
apply prime_binom_not_dvd h2 h1
case neg.intro.intro.intro.intro.intro p : ℕ h2 : p.Prime k : ℕ h : 1 < p * (2 * k + 1) h0 : ∀ (n : ℕ), 2 * n ≤ p * (2 * k + 1) → n ∣ n.choose (p * (2 * k + 1) - 2 * n) h1 : ¬k = 0 ⊢ False
case neg.intro.intro.intro.intro.intro p : ℕ h2 : p.Prime k : ℕ h : 1 < p * (2 * k + 1) h0 : ∀ (n : ℕ), 2 * n ≤ p * (2 * k + 1) → n ∣ n.choose (p * (2 * k + 1) - 2 * n) h1 : ¬k = 0 ⊢ p * k ∣ (p * k).choose p
Please generate a tactic in lean4 to solve the state. STATE: case neg.intro.intro.intro.intro.intro p : ℕ h2 : p.Prime k : ℕ h : 1 < p * (2 * k + 1) h0 : ∀ (n : ℕ), 2 * n ≤ p * (2 * k + 1) → n ∣ n.choose (p * (2 * k + 1) - 2 * n) h1 : ¬k = 0 ⊢ False TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/N3/N3.lean
IMOSL.IMO2012N3.final_solution
[38, 1]
[77, 52]
specialize h0 (p * k)
case neg.intro.intro.intro.intro.intro p : ℕ h2 : p.Prime k : ℕ h : 1 < p * (2 * k + 1) h0 : ∀ (n : ℕ), 2 * n ≤ p * (2 * k + 1) → n ∣ n.choose (p * (2 * k + 1) - 2 * n) h1 : ¬k = 0 ⊢ p * k ∣ (p * k).choose p
case neg.intro.intro.intro.intro.intro p : ℕ h2 : p.Prime k : ℕ h : 1 < p * (2 * k + 1) h1 : ¬k = 0 h0 : 2 * (p * k) ≤ p * (2 * k + 1) → p * k ∣ (p * k).choose (p * (2 * k + 1) - 2 * (p * k)) ⊢ p * k ∣ (p * k).choose p
Please generate a tactic in lean4 to solve the state. STATE: case neg.intro.intro.intro.intro.intro p : ℕ h2 : p.Prime k : ℕ h : 1 < p * (2 * k + 1) h0 : ∀ (n : ℕ), 2 * n ≤ p * (2 * k + 1) → n ∣ n.choose (p * (2 * k + 1) - 2 * n) h1 : ¬k = 0 ⊢ p * k ∣ (p * k).choose p TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/N3/N3.lean
IMOSL.IMO2012N3.final_solution
[38, 1]
[77, 52]
rw [mul_add_one (α := ℕ), mul_left_comm, Nat.add_sub_cancel_left] at h0
case neg.intro.intro.intro.intro.intro p : ℕ h2 : p.Prime k : ℕ h : 1 < p * (2 * k + 1) h1 : ¬k = 0 h0 : 2 * (p * k) ≤ p * (2 * k + 1) → p * k ∣ (p * k).choose (p * (2 * k + 1) - 2 * (p * k)) ⊢ p * k ∣ (p * k).choose p
case neg.intro.intro.intro.intro.intro p : ℕ h2 : p.Prime k : ℕ h : 1 < p * (2 * k + 1) h1 : ¬k = 0 h0 : p * (2 * k) ≤ p * (2 * k) + p → p * k ∣ (p * k).choose p ⊢ p * k ∣ (p * k).choose p
Please generate a tactic in lean4 to solve the state. STATE: case neg.intro.intro.intro.intro.intro p : ℕ h2 : p.Prime k : ℕ h : 1 < p * (2 * k + 1) h1 : ¬k = 0 h0 : 2 * (p * k) ≤ p * (2 * k + 1) → p * k ∣ (p * k).choose (p * (2 * k + 1) - 2 * (p * k)) ⊢ p * k ∣ (p * k).choose p TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/N3/N3.lean
IMOSL.IMO2012N3.final_solution
[38, 1]
[77, 52]
exact h0 (Nat.le_add_right (p * (2 * k)) p)
case neg.intro.intro.intro.intro.intro p : ℕ h2 : p.Prime k : ℕ h : 1 < p * (2 * k + 1) h1 : ¬k = 0 h0 : p * (2 * k) ≤ p * (2 * k) + p → p * k ∣ (p * k).choose p ⊢ p * k ∣ (p * k).choose p
no goals
Please generate a tactic in lean4 to solve the state. STATE: case neg.intro.intro.intro.intro.intro p : ℕ h2 : p.Prime k : ℕ h : 1 < p * (2 * k + 1) h1 : ¬k = 0 h0 : p * (2 * k) ≤ p * (2 * k) + p → p * k ∣ (p * k).choose p ⊢ p * k ∣ (p * k).choose p TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/N3/N3.lean
IMOSL.IMO2012N3.final_solution
[38, 1]
[77, 52]
rwa [this, mul_zero, zero_add, mul_one]
p : ℕ h2 : p.Prime k : ℕ h : 1 < p * (2 * k + 1) h0 : ∀ (n : ℕ), 2 * n ≤ p * (2 * k + 1) → n ∣ n.choose (p * (2 * k + 1) - 2 * n) this : k = 0 ⊢ (p * (2 * k + 1)).Prime
no goals
Please generate a tactic in lean4 to solve the state. STATE: p : ℕ h2 : p.Prime k : ℕ h : 1 < p * (2 * k + 1) h0 : ∀ (n : ℕ), 2 * n ≤ p * (2 * k + 1) → n ∣ n.choose (p * (2 * k + 1) - 2 * n) this : k = 0 ⊢ (p * (2 * k + 1)).Prime TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/N3/N3.lean
IMOSL.IMO2012N3.final_solution
[38, 1]
[77, 52]
rw [le_iff_exists_add] at h1
case refine_2 m : ℕ h : 1 < m h0 : m.Prime n : ℕ h1 : 2 * n ≤ m ⊢ n ∣ n.choose (m - 2 * n)
case refine_2 m : ℕ h : 1 < m h0 : m.Prime n : ℕ h1 : ∃ c, m = 2 * n + c ⊢ n ∣ n.choose (m - 2 * n)
Please generate a tactic in lean4 to solve the state. STATE: case refine_2 m : ℕ h : 1 < m h0 : m.Prime n : ℕ h1 : 2 * n ≤ m ⊢ n ∣ n.choose (m - 2 * n) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/N3/N3.lean
IMOSL.IMO2012N3.final_solution
[38, 1]
[77, 52]
rcases h1 with ⟨c, rfl⟩
case refine_2 m : ℕ h : 1 < m h0 : m.Prime n : ℕ h1 : ∃ c, m = 2 * n + c ⊢ n ∣ n.choose (m - 2 * n)
case refine_2.intro n c : ℕ h : 1 < 2 * n + c h0 : (2 * n + c).Prime ⊢ n ∣ n.choose (2 * n + c - 2 * n)
Please generate a tactic in lean4 to solve the state. STATE: case refine_2 m : ℕ h : 1 < m h0 : m.Prime n : ℕ h1 : ∃ c, m = 2 * n + c ⊢ n ∣ n.choose (m - 2 * n) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/N3/N3.lean
IMOSL.IMO2012N3.final_solution
[38, 1]
[77, 52]
rw [Nat.add_sub_cancel_left]
case refine_2.intro n c : ℕ h : 1 < 2 * n + c h0 : (2 * n + c).Prime ⊢ n ∣ n.choose (2 * n + c - 2 * n)
case refine_2.intro n c : ℕ h : 1 < 2 * n + c h0 : (2 * n + c).Prime ⊢ n ∣ n.choose c
Please generate a tactic in lean4 to solve the state. STATE: case refine_2.intro n c : ℕ h : 1 < 2 * n + c h0 : (2 * n + c).Prime ⊢ n ∣ n.choose (2 * n + c - 2 * n) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/N3/N3.lean
IMOSL.IMO2012N3.final_solution
[38, 1]
[77, 52]
rcases c with _ | c
case refine_2.intro n c : ℕ h : 1 < 2 * n + c h0 : (2 * n + c).Prime ⊢ n ∣ n.choose c
case refine_2.intro.zero n : ℕ h : 1 < 2 * n + 0 h0 : (2 * n + 0).Prime ⊢ n ∣ n.choose 0 case refine_2.intro.succ n c : ℕ h : 1 < 2 * n + (c + 1) h0 : (2 * n + (c + 1)).Prime ⊢ n ∣ n.choose (c + 1)
Please generate a tactic in lean4 to solve the state. STATE: case refine_2.intro n c : ℕ h : 1 < 2 * n + c h0 : (2 * n + c).Prime ⊢ n ∣ n.choose c TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/N3/N3.lean
IMOSL.IMO2012N3.final_solution
[38, 1]
[77, 52]
rcases n with _ | n
case refine_2.intro.succ n c : ℕ h : 1 < 2 * n + (c + 1) h0 : (2 * n + (c + 1)).Prime ⊢ n ∣ n.choose (c + 1)
case refine_2.intro.succ.zero c : ℕ h : 1 < 2 * 0 + (c + 1) h0 : (2 * 0 + (c + 1)).Prime ⊢ 0 ∣ Nat.choose 0 (c + 1) case refine_2.intro.succ.succ c n : ℕ h : 1 < 2 * (n + 1) + (c + 1) h0 : (2 * (n + 1) + (c + 1)).Prime ⊢ n + 1 ∣ (n + 1).choose (c + 1)
Please generate a tactic in lean4 to solve the state. STATE: case refine_2.intro.succ n c : ℕ h : 1 < 2 * n + (c + 1) h0 : (2 * n + (c + 1)).Prime ⊢ n ∣ n.choose (c + 1) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/N3/N3.lean
IMOSL.IMO2012N3.final_solution
[38, 1]
[77, 52]
rw [Nat.add_zero, Nat.prime_mul_iff] at h0
case refine_2.intro.zero n : ℕ h : 1 < 2 * n + 0 h0 : (2 * n + 0).Prime ⊢ n ∣ n.choose 0
case refine_2.intro.zero n : ℕ h : 1 < 2 * n + 0 h0 : Nat.Prime 2 ∧ n = 1 ∨ n.Prime ∧ 2 = 1 ⊢ n ∣ n.choose 0
Please generate a tactic in lean4 to solve the state. STATE: case refine_2.intro.zero n : ℕ h : 1 < 2 * n + 0 h0 : (2 * n + 0).Prime ⊢ n ∣ n.choose 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/N3/N3.lean
IMOSL.IMO2012N3.final_solution
[38, 1]
[77, 52]
rcases h0 with ⟨-, rfl⟩ | ⟨-, h1⟩
case refine_2.intro.zero n : ℕ h : 1 < 2 * n + 0 h0 : Nat.Prime 2 ∧ n = 1 ∨ n.Prime ∧ 2 = 1 ⊢ n ∣ n.choose 0
case refine_2.intro.zero.inl.intro h : 1 < 2 * 1 + 0 ⊢ 1 ∣ Nat.choose 1 0 case refine_2.intro.zero.inr.intro n : ℕ h : 1 < 2 * n + 0 h1 : 2 = 1 ⊢ n ∣ n.choose 0
Please generate a tactic in lean4 to solve the state. STATE: case refine_2.intro.zero n : ℕ h : 1 < 2 * n + 0 h0 : Nat.Prime 2 ∧ n = 1 ∨ n.Prime ∧ 2 = 1 ⊢ n ∣ n.choose 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/N3/N3.lean
IMOSL.IMO2012N3.final_solution
[38, 1]
[77, 52]
exacts [Nat.dvd_refl 1, absurd h1 (Nat.succ_ne_self 1)]
case refine_2.intro.zero.inl.intro h : 1 < 2 * 1 + 0 ⊢ 1 ∣ Nat.choose 1 0 case refine_2.intro.zero.inr.intro n : ℕ h : 1 < 2 * n + 0 h1 : 2 = 1 ⊢ n ∣ n.choose 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: case refine_2.intro.zero.inl.intro h : 1 < 2 * 1 + 0 ⊢ 1 ∣ Nat.choose 1 0 case refine_2.intro.zero.inr.intro n : ℕ h : 1 < 2 * n + 0 h1 : 2 = 1 ⊢ n ∣ n.choose 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/N3/N3.lean
IMOSL.IMO2012N3.final_solution
[38, 1]
[77, 52]
exact Nat.dvd_refl 0
case refine_2.intro.succ.zero c : ℕ h : 1 < 2 * 0 + (c + 1) h0 : (2 * 0 + (c + 1)).Prime ⊢ 0 ∣ Nat.choose 0 (c + 1)
no goals
Please generate a tactic in lean4 to solve the state. STATE: case refine_2.intro.succ.zero c : ℕ h : 1 < 2 * 0 + (c + 1) h0 : (2 * 0 + (c + 1)).Prime ⊢ 0 ∣ Nat.choose 0 (c + 1) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/N3/N3.lean
IMOSL.IMO2012N3.final_solution
[38, 1]
[77, 52]
refine (Nat.Coprime.dvd_mul_right ?_).mp ⟨_, (n.succ_mul_choose_eq c).symm⟩
case refine_2.intro.succ.succ c n : ℕ h : 1 < 2 * (n + 1) + (c + 1) h0 : (2 * (n + 1) + (c + 1)).Prime ⊢ n + 1 ∣ (n + 1).choose (c + 1)
case refine_2.intro.succ.succ c n : ℕ h : 1 < 2 * (n + 1) + (c + 1) h0 : (2 * (n + 1) + (c + 1)).Prime ⊢ (n + 1).Coprime c.succ
Please generate a tactic in lean4 to solve the state. STATE: case refine_2.intro.succ.succ c n : ℕ h : 1 < 2 * (n + 1) + (c + 1) h0 : (2 * (n + 1) + (c + 1)).Prime ⊢ n + 1 ∣ (n + 1).choose (c + 1) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/N3/N3.lean
IMOSL.IMO2012N3.final_solution
[38, 1]
[77, 52]
rw [two_mul, add_assoc] at h0
case refine_2.intro.succ.succ c n : ℕ h : 1 < 2 * (n + 1) + (c + 1) h0 : (2 * (n + 1) + (c + 1)).Prime ⊢ (n + 1).Coprime c.succ
case refine_2.intro.succ.succ c n : ℕ h : 1 < 2 * (n + 1) + (c + 1) h0 : (n + 1 + (n + 1 + (c + 1))).Prime ⊢ (n + 1).Coprime c.succ
Please generate a tactic in lean4 to solve the state. STATE: case refine_2.intro.succ.succ c n : ℕ h : 1 < 2 * (n + 1) + (c + 1) h0 : (2 * (n + 1) + (c + 1)).Prime ⊢ (n + 1).Coprime c.succ TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/N3/N3.lean
IMOSL.IMO2012N3.final_solution
[38, 1]
[77, 52]
rw [← Nat.coprime_self_add_right, ← Nat.coprime_self_add_right, Nat.coprime_comm, h0.coprime_iff_not_dvd]
case refine_2.intro.succ.succ c n : ℕ h : 1 < 2 * (n + 1) + (c + 1) h0 : (n + 1 + (n + 1 + (c + 1))).Prime ⊢ (n + 1).Coprime c.succ
case refine_2.intro.succ.succ c n : ℕ h : 1 < 2 * (n + 1) + (c + 1) h0 : (n + 1 + (n + 1 + (c + 1))).Prime ⊢ ¬n + 1 + (n + 1 + (c + 1)) ∣ n + 1
Please generate a tactic in lean4 to solve the state. STATE: case refine_2.intro.succ.succ c n : ℕ h : 1 < 2 * (n + 1) + (c + 1) h0 : (n + 1 + (n + 1 + (c + 1))).Prime ⊢ (n + 1).Coprime c.succ TACTIC: