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/Extra/CharTwo/Finset.lean
IMOSL.Extra.CharTwo.symmDiff_singleton_sum_eq
[48, 1]
[52, 61]
rw [symmDiff_singleton_eq_erase h, ← S.add_sum_erase f h, CharTwo.add_add_cancel_left]
case pos M : Type u_2 ι : Type u_1 inst✝² : AddCommMonoid M inst✝¹ : CharTwo M inst✝ : DecidableEq ι f : ι → M i : ι S : Finset ι h : i ∈ S ⊢ (symmDiff {i} S).sum f = f i + S.sum f
no goals
Please generate a tactic in lean4 to solve the state. STATE: case pos M : Type u_2 ι : Type u_1 inst✝² : AddCommMonoid M inst✝¹ : CharTwo M inst✝ : DecidableEq ι f : ι → M i : ι S : Finset ι h : i ∈ S ⊢ (symmDiff {i} S).sum f = f i + S.sum f TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/CharTwo/Finset.lean
IMOSL.Extra.CharTwo.symmDiff_singleton_sum_eq
[48, 1]
[52, 61]
rw [symmDiff_singleton_eq_insert h, Finset.sum_insert h]
case neg M : Type u_2 ι : Type u_1 inst✝² : AddCommMonoid M inst✝¹ : CharTwo M inst✝ : DecidableEq ι f : ι → M i : ι S : Finset ι h : i ∉ S ⊢ (symmDiff {i} S).sum f = f i + S.sum f
no goals
Please generate a tactic in lean4 to solve the state. STATE: case neg M : Type u_2 ι : Type u_1 inst✝² : AddCommMonoid M inst✝¹ : CharTwo M inst✝ : DecidableEq ι f : ι → M i : ι S : Finset ι h : i ∉ S ⊢ (symmDiff {i} S).sum f = f i + S.sum f TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/CharTwo/Finset.lean
IMOSL.Extra.CharTwo.symmDiff_sum_eq
[54, 1]
[60, 53]
revert T
M : Type u_2 ι : Type u_1 inst✝² : AddCommMonoid M inst✝¹ : CharTwo M inst✝ : DecidableEq ι f : ι → M S T : Finset ι ⊢ (symmDiff S T).sum f = S.sum f + T.sum f
M : Type u_2 ι : Type u_1 inst✝² : AddCommMonoid M inst✝¹ : CharTwo M inst✝ : DecidableEq ι f : ι → M S : Finset ι ⊢ ∀ (T : Finset ι), (symmDiff S T).sum f = S.sum f + T.sum f
Please generate a tactic in lean4 to solve the state. STATE: M : Type u_2 ι : Type u_1 inst✝² : AddCommMonoid M inst✝¹ : CharTwo M inst✝ : DecidableEq ι f : ι → M S T : Finset ι ⊢ (symmDiff S T).sum f = S.sum f + T.sum f TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/CharTwo/Finset.lean
IMOSL.Extra.CharTwo.symmDiff_sum_eq
[54, 1]
[60, 53]
apply Finset.induction
M : Type u_2 ι : Type u_1 inst✝² : AddCommMonoid M inst✝¹ : CharTwo M inst✝ : DecidableEq ι f : ι → M S : Finset ι ⊢ ∀ (T : Finset ι), (symmDiff S T).sum f = S.sum f + T.sum f
case empty M : Type u_2 ι : Type u_1 inst✝² : AddCommMonoid M inst✝¹ : CharTwo M inst✝ : DecidableEq ι f : ι → M S : Finset ι ⊢ (symmDiff S ∅).sum f = S.sum f + ∅.sum f case insert M : Type u_2 ι : Type u_1 inst✝² : AddCommMonoid M inst✝¹ : CharTwo M inst✝ : DecidableEq ι f : ι → M S : Finset ι ⊢ ∀ ⦃a : ι⦄ {s : Finset ι}, a ∉ s → (symmDiff S s).sum f = S.sum f + s.sum f → (symmDiff S (insert a s)).sum f = S.sum f + (insert a s).sum f
Please generate a tactic in lean4 to solve the state. STATE: M : Type u_2 ι : Type u_1 inst✝² : AddCommMonoid M inst✝¹ : CharTwo M inst✝ : DecidableEq ι f : ι → M S : Finset ι ⊢ ∀ (T : Finset ι), (symmDiff S T).sum f = S.sum f + T.sum f TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/CharTwo/Finset.lean
IMOSL.Extra.CharTwo.symmDiff_sum_eq
[54, 1]
[60, 53]
have h : symmDiff S ∅ = S := by exact symmDiff_bot _
case empty M : Type u_2 ι : Type u_1 inst✝² : AddCommMonoid M inst✝¹ : CharTwo M inst✝ : DecidableEq ι f : ι → M S : Finset ι ⊢ (symmDiff S ∅).sum f = S.sum f + ∅.sum f
case empty M : Type u_2 ι : Type u_1 inst✝² : AddCommMonoid M inst✝¹ : CharTwo M inst✝ : DecidableEq ι f : ι → M S : Finset ι h : symmDiff S ∅ = S ⊢ (symmDiff S ∅).sum f = S.sum f + ∅.sum f
Please generate a tactic in lean4 to solve the state. STATE: case empty M : Type u_2 ι : Type u_1 inst✝² : AddCommMonoid M inst✝¹ : CharTwo M inst✝ : DecidableEq ι f : ι → M S : Finset ι ⊢ (symmDiff S ∅).sum f = S.sum f + ∅.sum f TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/CharTwo/Finset.lean
IMOSL.Extra.CharTwo.symmDiff_sum_eq
[54, 1]
[60, 53]
rw [Finset.sum_empty, add_zero, h]
case empty M : Type u_2 ι : Type u_1 inst✝² : AddCommMonoid M inst✝¹ : CharTwo M inst✝ : DecidableEq ι f : ι → M S : Finset ι h : symmDiff S ∅ = S ⊢ (symmDiff S ∅).sum f = S.sum f + ∅.sum f
no goals
Please generate a tactic in lean4 to solve the state. STATE: case empty M : Type u_2 ι : Type u_1 inst✝² : AddCommMonoid M inst✝¹ : CharTwo M inst✝ : DecidableEq ι f : ι → M S : Finset ι h : symmDiff S ∅ = S ⊢ (symmDiff S ∅).sum f = S.sum f + ∅.sum f TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/CharTwo/Finset.lean
IMOSL.Extra.CharTwo.symmDiff_sum_eq
[54, 1]
[60, 53]
exact symmDiff_bot _
M : Type u_2 ι : Type u_1 inst✝² : AddCommMonoid M inst✝¹ : CharTwo M inst✝ : DecidableEq ι f : ι → M S : Finset ι ⊢ symmDiff S ∅ = S
no goals
Please generate a tactic in lean4 to solve the state. STATE: M : Type u_2 ι : Type u_1 inst✝² : AddCommMonoid M inst✝¹ : CharTwo M inst✝ : DecidableEq ι f : ι → M S : Finset ι ⊢ symmDiff S ∅ = S TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/CharTwo/Finset.lean
IMOSL.Extra.CharTwo.symmDiff_sum_eq
[54, 1]
[60, 53]
intro i T h h0
case insert M : Type u_2 ι : Type u_1 inst✝² : AddCommMonoid M inst✝¹ : CharTwo M inst✝ : DecidableEq ι f : ι → M S : Finset ι ⊢ ∀ ⦃a : ι⦄ {s : Finset ι}, a ∉ s → (symmDiff S s).sum f = S.sum f + s.sum f → (symmDiff S (insert a s)).sum f = S.sum f + (insert a s).sum f
case insert M : Type u_2 ι : Type u_1 inst✝² : AddCommMonoid M inst✝¹ : CharTwo M inst✝ : DecidableEq ι f : ι → M S : Finset ι i : ι T : Finset ι h : i ∉ T h0 : (symmDiff S T).sum f = S.sum f + T.sum f ⊢ (symmDiff S (insert i T)).sum f = S.sum f + (insert i T).sum f
Please generate a tactic in lean4 to solve the state. STATE: case insert M : Type u_2 ι : Type u_1 inst✝² : AddCommMonoid M inst✝¹ : CharTwo M inst✝ : DecidableEq ι f : ι → M S : Finset ι ⊢ ∀ ⦃a : ι⦄ {s : Finset ι}, a ∉ s → (symmDiff S s).sum f = S.sum f + s.sum f → (symmDiff S (insert a s)).sum f = S.sum f + (insert a s).sum f TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/CharTwo/Finset.lean
IMOSL.Extra.CharTwo.symmDiff_sum_eq
[54, 1]
[60, 53]
rw [Finset.sum_insert h, add_left_comm, ← h0, ← symmDiff_singleton_eq_insert h, symmDiff_left_comm, symmDiff_singleton_sum_eq]
case insert M : Type u_2 ι : Type u_1 inst✝² : AddCommMonoid M inst✝¹ : CharTwo M inst✝ : DecidableEq ι f : ι → M S : Finset ι i : ι T : Finset ι h : i ∉ T h0 : (symmDiff S T).sum f = S.sum f + T.sum f ⊢ (symmDiff S (insert i T)).sum f = S.sum f + (insert i T).sum f
no goals
Please generate a tactic in lean4 to solve the state. STATE: case insert M : Type u_2 ι : Type u_1 inst✝² : AddCommMonoid M inst✝¹ : CharTwo M inst✝ : DecidableEq ι f : ι → M S : Finset ι i : ι T : Finset ι h : i ∉ T h0 : (symmDiff S T).sum f = S.sum f + T.sum f ⊢ (symmDiff S (insert i T)).sum f = S.sum f + (insert i T).sum f TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.floor_f_natAbs_le
[39, 1]
[48, 81]
rw [← Nat.cast_le (α := ℤ), Int.cast_natAbs, Int.cast_natAbs, Int.cast_abs, Int.cast_id, Int.cast_abs, Int.cast_id]
R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R ⊢ ⌊f r⌋.natAbs ≤ ⌊r⌋.natAbs
R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R ⊢ |⌊f r⌋| ≤ |⌊r⌋|
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R ⊢ ⌊f r⌋.natAbs ≤ ⌊r⌋.natAbs TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.floor_f_natAbs_le
[39, 1]
[48, 81]
rcases le_total 0 ⌊r⌋ with h | h
R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R ⊢ |⌊f r⌋| ≤ |⌊r⌋|
case inl R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R h : 0 ≤ ⌊r⌋ ⊢ |⌊f r⌋| ≤ |⌊r⌋| case inr R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R h : ⌊r⌋ ≤ 0 ⊢ |⌊f r⌋| ≤ |⌊r⌋|
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R ⊢ |⌊f r⌋| ≤ |⌊r⌋| TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.floor_f_natAbs_le
[39, 1]
[48, 81]
rw [abs_eq_self.mpr h, abs_eq_self.mpr (floor_f_nonneg h), ← Int.cast_le (R := R)]
case inl R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R h : 0 ≤ ⌊r⌋ ⊢ |⌊f r⌋| ≤ |⌊r⌋|
case inl R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R h : 0 ≤ ⌊r⌋ ⊢ ↑⌊f r⌋ ≤ ↑⌊r⌋
Please generate a tactic in lean4 to solve the state. STATE: case inl R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R h : 0 ≤ ⌊r⌋ ⊢ |⌊f r⌋| ≤ |⌊r⌋| TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.floor_f_natAbs_le
[39, 1]
[48, 81]
exact (Int.floor_le _).trans <| mul_le_of_le_one_right (Int.cast_nonneg.mpr h) (Int.fract_lt_one r).le
case inl R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R h : 0 ≤ ⌊r⌋ ⊢ ↑⌊f r⌋ ≤ ↑⌊r⌋
no goals
Please generate a tactic in lean4 to solve the state. STATE: case inl R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R h : 0 ≤ ⌊r⌋ ⊢ ↑⌊f r⌋ ≤ ↑⌊r⌋ TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.floor_f_natAbs_le
[39, 1]
[48, 81]
rw [abs_eq_neg_self.mpr h, abs_eq_neg_self.mpr (floor_f_nonpos h), neg_le_neg_iff, Int.le_floor]
case inr R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R h : ⌊r⌋ ≤ 0 ⊢ |⌊f r⌋| ≤ |⌊r⌋|
case inr R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R h : ⌊r⌋ ≤ 0 ⊢ ↑⌊r⌋ ≤ f r
Please generate a tactic in lean4 to solve the state. STATE: case inr R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R h : ⌊r⌋ ≤ 0 ⊢ |⌊f r⌋| ≤ |⌊r⌋| TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.floor_f_natAbs_le
[39, 1]
[48, 81]
exact le_mul_of_le_one_right (Int.cast_nonpos.mpr h) (Int.fract_lt_one r).le
case inr R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R h : ⌊r⌋ ≤ 0 ⊢ ↑⌊r⌋ ≤ f r
no goals
Please generate a tactic in lean4 to solve the state. STATE: case inr R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R h : ⌊r⌋ ≤ 0 ⊢ ↑⌊r⌋ ≤ f r TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.floor_f_iter_natAbs_eventually_const
[54, 1]
[61, 22]
have ha : Antitone (λ k ↦ ⌊f^[k] r⌋.natAbs) := λ k m h0 ↦ by rcases Nat.exists_eq_add_of_le h0 with ⟨c, rfl⟩; simp only rw [Nat.add_comm, f.iterate_add_apply] exact floor_f_iter_natAbs_le _ c
R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R ⊢ ∃ C, EventuallyEqual (fun x => ⌊f^[x] r⌋.natAbs) fun x => C
R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R ha : Antitone fun k => ⌊f^[k] r⌋.natAbs ⊢ ∃ C, EventuallyEqual (fun x => ⌊f^[x] r⌋.natAbs) fun x => 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, EventuallyEqual (fun x => ⌊f^[x] r⌋.natAbs) fun x => C TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.floor_f_iter_natAbs_eventually_const
[54, 1]
[61, 22]
rcases NatSeq_antitone_imp_const ha with ⟨C, N, ha⟩
R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R ha : Antitone fun k => ⌊f^[k] r⌋.natAbs ⊢ ∃ C, EventuallyEqual (fun x => ⌊f^[x] r⌋.natAbs) fun x => C
case intro.intro R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R ha✝ : Antitone fun k => ⌊f^[k] r⌋.natAbs C N : ℕ ha : ∀ (n : ℕ), ⌊f^[n + N] r⌋.natAbs = C ⊢ ∃ C, EventuallyEqual (fun x => ⌊f^[x] r⌋.natAbs) fun x => C
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R ha : Antitone fun k => ⌊f^[k] r⌋.natAbs ⊢ ∃ C, EventuallyEqual (fun x => ⌊f^[x] r⌋.natAbs) fun x => C TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.floor_f_iter_natAbs_eventually_const
[54, 1]
[61, 22]
exact ⟨C, N, 0, ha⟩
case intro.intro R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R ha✝ : Antitone fun k => ⌊f^[k] r⌋.natAbs C N : ℕ ha : ∀ (n : ℕ), ⌊f^[n + N] r⌋.natAbs = C ⊢ ∃ C, EventuallyEqual (fun x => ⌊f^[x] r⌋.natAbs) fun x => C
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R ha✝ : Antitone fun k => ⌊f^[k] r⌋.natAbs C N : ℕ ha : ∀ (n : ℕ), ⌊f^[n + N] r⌋.natAbs = C ⊢ ∃ C, EventuallyEqual (fun x => ⌊f^[x] r⌋.natAbs) fun x => C TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.floor_f_iter_natAbs_eventually_const
[54, 1]
[61, 22]
rcases Nat.exists_eq_add_of_le h0 with ⟨c, rfl⟩
R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R k m : ℕ h0 : k ≤ m ⊢ (fun k => ⌊f^[k] r⌋.natAbs) m ≤ (fun k => ⌊f^[k] r⌋.natAbs) k
case intro R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R k c : ℕ h0 : k ≤ k + c ⊢ (fun k => ⌊f^[k] r⌋.natAbs) (k + c) ≤ (fun k => ⌊f^[k] r⌋.natAbs) k
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R k m : ℕ h0 : k ≤ m ⊢ (fun k => ⌊f^[k] r⌋.natAbs) m ≤ (fun k => ⌊f^[k] r⌋.natAbs) k TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.floor_f_iter_natAbs_eventually_const
[54, 1]
[61, 22]
simp only
case intro R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R k c : ℕ h0 : k ≤ k + c ⊢ (fun k => ⌊f^[k] r⌋.natAbs) (k + c) ≤ (fun k => ⌊f^[k] r⌋.natAbs) k
case intro R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R k c : ℕ h0 : k ≤ k + c ⊢ ⌊f^[k + c] r⌋.natAbs ≤ ⌊f^[k] r⌋.natAbs
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 k c : ℕ h0 : k ≤ k + c ⊢ (fun k => ⌊f^[k] r⌋.natAbs) (k + c) ≤ (fun k => ⌊f^[k] r⌋.natAbs) k TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.floor_f_iter_natAbs_eventually_const
[54, 1]
[61, 22]
rw [Nat.add_comm, f.iterate_add_apply]
case intro R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R k c : ℕ h0 : k ≤ k + c ⊢ ⌊f^[k + c] r⌋.natAbs ≤ ⌊f^[k] r⌋.natAbs
case intro R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R k c : ℕ h0 : k ≤ k + c ⊢ ⌊f^[c] (f^[k] r)⌋.natAbs ≤ ⌊f^[k] r⌋.natAbs
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 k c : ℕ h0 : k ≤ k + c ⊢ ⌊f^[k + c] r⌋.natAbs ≤ ⌊f^[k] r⌋.natAbs TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.floor_f_iter_natAbs_eventually_const
[54, 1]
[61, 22]
exact floor_f_iter_natAbs_le _ c
case intro R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R k c : ℕ h0 : k ≤ k + c ⊢ ⌊f^[c] (f^[k] r)⌋.natAbs ≤ ⌊f^[k] r⌋.natAbs
no goals
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 k c : ℕ h0 : k ≤ k + c ⊢ ⌊f^[c] (f^[k] r)⌋.natAbs ≤ ⌊f^[k] r⌋.natAbs TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.floor_f_iter_eventually_const
[66, 1]
[74, 55]
rcases floor_f_iter_natAbs_eventually_const r with ⟨C, N, K, h⟩
R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R ⊢ ∃ C, EventuallyEqual (fun x => ⌊f^[x] r⌋) fun x => -↑C
case intro.intro.intro R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C N K : ℕ h : ∀ (k : ℕ), (fun x => ⌊f^[x] r⌋.natAbs) (k + N) = (fun x => C) (k + K) ⊢ ∃ C, EventuallyEqual (fun x => ⌊f^[x] r⌋) fun x => -↑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, EventuallyEqual (fun x => ⌊f^[x] r⌋) fun x => -↑C TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.floor_f_iter_eventually_const
[66, 1]
[74, 55]
refine ⟨C, N, K, λ n ↦ (Int.natAbs_eq_iff.mp (h n)).elim (λ h0 ↦ h0.trans ?_) id⟩
case intro.intro.intro R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C N K : ℕ h : ∀ (k : ℕ), (fun x => ⌊f^[x] r⌋.natAbs) (k + N) = (fun x => C) (k + K) ⊢ ∃ C, EventuallyEqual (fun x => ⌊f^[x] r⌋) fun x => -↑C
case intro.intro.intro R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C N K : ℕ h : ∀ (k : ℕ), (fun x => ⌊f^[x] r⌋.natAbs) (k + N) = (fun x => C) (k + K) n : ℕ h0 : ⌊f^[n + N] r⌋ = ↑((fun x => C) (n + K)) ⊢ ↑((fun x => C) (n + K)) = (fun x => -↑C) (n + K)
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C N K : ℕ h : ∀ (k : ℕ), (fun x => ⌊f^[x] r⌋.natAbs) (k + N) = (fun x => C) (k + K) ⊢ ∃ C, EventuallyEqual (fun x => ⌊f^[x] r⌋) fun x => -↑C TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.floor_f_iter_eventually_const
[66, 1]
[74, 55]
simp only at h h0 ⊢
case intro.intro.intro R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C N K : ℕ h : ∀ (k : ℕ), (fun x => ⌊f^[x] r⌋.natAbs) (k + N) = (fun x => C) (k + K) n : ℕ h0 : ⌊f^[n + N] r⌋ = ↑((fun x => C) (n + K)) ⊢ ↑((fun x => C) (n + K)) = (fun x => -↑C) (n + K)
case intro.intro.intro R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C N K : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋.natAbs = C n : ℕ h0 : ⌊f^[n + N] r⌋ = ↑C ⊢ ↑C = -↑C
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C N K : ℕ h : ∀ (k : ℕ), (fun x => ⌊f^[x] r⌋.natAbs) (k + N) = (fun x => C) (k + K) n : ℕ h0 : ⌊f^[n + N] r⌋ = ↑((fun x => C) (n + K)) ⊢ ↑((fun x => C) (n + K)) = (fun x => -↑C) (n + K) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.floor_f_iter_eventually_const
[66, 1]
[74, 55]
rcases C.eq_zero_or_pos with rfl | h1
case intro.intro.intro R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C N K : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋.natAbs = C n : ℕ h0 : ⌊f^[n + N] r⌋ = ↑C ⊢ ↑C = -↑C
case intro.intro.intro.inl R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R N K n : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋.natAbs = 0 h0 : ⌊f^[n + N] r⌋ = ↑0 ⊢ ↑0 = -↑0 case intro.intro.intro.inr R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C N K : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋.natAbs = C n : ℕ h0 : ⌊f^[n + N] r⌋ = ↑C h1 : C > 0 ⊢ ↑C = -↑C
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C N K : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋.natAbs = C n : ℕ h0 : ⌊f^[n + N] r⌋ = ↑C ⊢ ↑C = -↑C TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.floor_f_iter_eventually_const
[66, 1]
[74, 55]
rfl
case intro.intro.intro.inl R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R N K n : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋.natAbs = 0 h0 : ⌊f^[n + N] r⌋ = ↑0 ⊢ ↑0 = -↑0 case intro.intro.intro.inr R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C N K : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋.natAbs = C n : ℕ h0 : ⌊f^[n + N] r⌋ = ↑C h1 : C > 0 ⊢ ↑C = -↑C
case intro.intro.intro.inr R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C N K : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋.natAbs = C n : ℕ h0 : ⌊f^[n + N] r⌋ = ↑C h1 : C > 0 ⊢ ↑C = -↑C
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.inl R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R N K n : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋.natAbs = 0 h0 : ⌊f^[n + N] r⌋ = ↑0 ⊢ ↑0 = -↑0 case intro.intro.intro.inr R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C N K : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋.natAbs = C n : ℕ h0 : ⌊f^[n + N] r⌋ = ↑C h1 : C > 0 ⊢ ↑C = -↑C TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.floor_f_iter_eventually_const
[66, 1]
[74, 55]
specialize h (n + 1)
case intro.intro.intro.inr R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C N K : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋.natAbs = C n : ℕ h0 : ⌊f^[n + N] r⌋ = ↑C h1 : C > 0 ⊢ ↑C = -↑C
case intro.intro.intro.inr R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C N K n : ℕ h0 : ⌊f^[n + N] r⌋ = ↑C h1 : C > 0 h : ⌊f^[n + 1 + N] r⌋.natAbs = C ⊢ ↑C = -↑C
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.inr R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C N K : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋.natAbs = C n : ℕ h0 : ⌊f^[n + N] r⌋ = ↑C h1 : C > 0 ⊢ ↑C = -↑C TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.floor_f_iter_eventually_const
[66, 1]
[74, 55]
rw [Nat.add_right_comm, f.iterate_succ_apply'] at h
case intro.intro.intro.inr R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C N K n : ℕ h0 : ⌊f^[n + N] r⌋ = ↑C h1 : C > 0 h : ⌊f^[n + 1 + N] r⌋.natAbs = C ⊢ ↑C = -↑C
case intro.intro.intro.inr R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C N K n : ℕ h0 : ⌊f^[n + N] r⌋ = ↑C h1 : C > 0 h : ⌊f (f^[n + N] r)⌋.natAbs = C ⊢ ↑C = -↑C
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.inr R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C N K n : ℕ h0 : ⌊f^[n + N] r⌋ = ↑C h1 : C > 0 h : ⌊f^[n + 1 + N] r⌋.natAbs = C ⊢ ↑C = -↑C TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.floor_f_iter_eventually_const
[66, 1]
[74, 55]
replace h1 : 0 < ⌊f^[n + N] r⌋ := by rwa [h0, Nat.cast_pos]
case intro.intro.intro.inr R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C N K n : ℕ h0 : ⌊f^[n + N] r⌋ = ↑C h1 : C > 0 h : ⌊f (f^[n + N] r)⌋.natAbs = C ⊢ ↑C = -↑C
case intro.intro.intro.inr R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C N K n : ℕ h0 : ⌊f^[n + N] r⌋ = ↑C h : ⌊f (f^[n + N] r)⌋.natAbs = C h1 : 0 < ⌊f^[n + N] r⌋ ⊢ ↑C = -↑C
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.inr R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C N K n : ℕ h0 : ⌊f^[n + N] r⌋ = ↑C h1 : C > 0 h : ⌊f (f^[n + N] r)⌋.natAbs = C ⊢ ↑C = -↑C TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.floor_f_iter_eventually_const
[66, 1]
[74, 55]
rw [← h, Int.natCast_natAbs, abs_eq_self.mpr (floor_f_nonneg h1.le)] at h0
case intro.intro.intro.inr R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C N K n : ℕ h0 : ⌊f^[n + N] r⌋ = ↑C h : ⌊f (f^[n + N] r)⌋.natAbs = C h1 : 0 < ⌊f^[n + N] r⌋ ⊢ ↑C = -↑C
case intro.intro.intro.inr R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C N K n : ℕ h0 : ⌊f^[n + N] r⌋ = ⌊f (f^[n + N] r)⌋ h : ⌊f (f^[n + N] r)⌋.natAbs = C h1 : 0 < ⌊f^[n + N] r⌋ ⊢ ↑C = -↑C
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.inr R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C N K n : ℕ h0 : ⌊f^[n + N] r⌋ = ↑C h : ⌊f (f^[n + N] r)⌋.natAbs = C h1 : 0 < ⌊f^[n + N] r⌋ ⊢ ↑C = -↑C TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.floor_f_iter_eventually_const
[66, 1]
[74, 55]
exact absurd h0.symm (floor_f_lt_of_floor_pos h1).ne
case intro.intro.intro.inr R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C N K n : ℕ h0 : ⌊f^[n + N] r⌋ = ⌊f (f^[n + N] r)⌋ h : ⌊f (f^[n + N] r)⌋.natAbs = C h1 : 0 < ⌊f^[n + N] r⌋ ⊢ ↑C = -↑C
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.inr R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C N K n : ℕ h0 : ⌊f^[n + N] r⌋ = ⌊f (f^[n + N] r)⌋ h : ⌊f (f^[n + N] r)⌋.natAbs = C h1 : 0 < ⌊f^[n + N] r⌋ ⊢ ↑C = -↑C TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.floor_f_iter_eventually_const
[66, 1]
[74, 55]
rwa [h0, Nat.cast_pos]
R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C N K n : ℕ h0 : ⌊f^[n + N] r⌋ = ↑C h1 : C > 0 h : ⌊f (f^[n + N] r)⌋.natAbs = C ⊢ 0 < ⌊f^[n + N] r⌋
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 N K n : ℕ h0 : ⌊f^[n + N] r⌋ = ↑C h1 : C > 0 h : ⌊f (f^[n + N] r)⌋.natAbs = C ⊢ 0 < ⌊f^[n + N] r⌋ TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.case_floor_eventually_zero
[76, 1]
[80, 77]
rw [EventuallyEqual.const_right_iff] at h ⊢
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
R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R h : ∃ N, ∀ (k : ℕ), ⌊f^[k + N] r⌋ = 0 ⊢ ∃ N, ∀ (k : ℕ), f^[k + N] r = 0
Please generate a tactic in lean4 to solve the state. STATE: 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.case_floor_eventually_zero
[76, 1]
[80, 77]
rcases h with ⟨N, h⟩
R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R h : ∃ N, ∀ (k : ℕ), ⌊f^[k + N] r⌋ = 0 ⊢ ∃ N, ∀ (k : ℕ), f^[k + N] r = 0
case intro R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R N : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋ = 0 ⊢ ∃ N, ∀ (k : ℕ), f^[k + N] r = 0
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R h : ∃ N, ∀ (k : ℕ), ⌊f^[k + N] r⌋ = 0 ⊢ ∃ N, ∀ (k : ℕ), f^[k + N] r = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.case_floor_eventually_zero
[76, 1]
[80, 77]
refine ⟨N + 1, λ k ↦ ?_⟩
case intro R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R N : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋ = 0 ⊢ ∃ N, ∀ (k : ℕ), f^[k + N] r = 0
case intro R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R N : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋ = 0 k : ℕ ⊢ f^[k + (N + 1)] r = 0
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 N : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋ = 0 ⊢ ∃ N, ∀ (k : ℕ), f^[k + N] r = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.case_floor_eventually_zero
[76, 1]
[80, 77]
rw [← Nat.add_assoc, f.iterate_succ_apply', f, h, Int.cast_zero, zero_mul]
case intro R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R N : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋ = 0 k : ℕ ⊢ f^[k + (N + 1)] r = 0
no goals
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 N : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋ = 0 k : ℕ ⊢ f^[k + (N + 1)] r = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.case_floor_eventually_neg_one
[82, 1]
[105, 27]
rw [EventuallyEqual.const_right_iff] at h
R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R h : EventuallyEqual (fun x => ⌊f^[x] r⌋) fun x => -1 ⊢ ∃ s, (0 < s ∧ s < 1) ∧ EventuallyEqual (fun x => f^[x] r) (NatSeq_ofList [-s, s - 1])
R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R h : ∃ N, ∀ (k : ℕ), ⌊f^[k + N] r⌋ = -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: R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R h : EventuallyEqual (fun x => ⌊f^[x] r⌋) fun x => -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.case_floor_eventually_neg_one
[82, 1]
[105, 27]
rcases h with ⟨N, h⟩
R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R h : ∃ N, ∀ (k : ℕ), ⌊f^[k + N] r⌋ = -1 ⊢ ∃ s, (0 < s ∧ s < 1) ∧ EventuallyEqual (fun x => f^[x] r) (NatSeq_ofList [-s, s - 1])
case intro R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R N : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋ = -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: R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R h : ∃ N, ∀ (k : ℕ), ⌊f^[k + N] r⌋ = -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.case_floor_eventually_neg_one
[82, 1]
[105, 27]
refine ⟨-f^[N] r, ?_, ?_⟩
case intro R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R N : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋ = -1 ⊢ ∃ s, (0 < s ∧ s < 1) ∧ EventuallyEqual (fun x => f^[x] r) (NatSeq_ofList [-s, s - 1])
case intro.refine_1 R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R N : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋ = -1 ⊢ 0 < -f^[N] r ∧ -f^[N] r < 1 case intro.refine_2 R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R N : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋ = -1 ⊢ EventuallyEqual (fun x => f^[x] r) (NatSeq_ofList [- -f^[N] r, -f^[N] r - 1])
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 N : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋ = -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.case_floor_eventually_neg_one
[82, 1]
[105, 27]
have h0 := h 0
case intro.refine_1 R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R N : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋ = -1 ⊢ 0 < -f^[N] r ∧ -f^[N] r < 1
case intro.refine_1 R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R N : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋ = -1 h0 : ⌊f^[0 + N] r⌋ = -1 ⊢ 0 < -f^[N] r ∧ -f^[N] r < 1
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 N : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋ = -1 ⊢ 0 < -f^[N] r ∧ -f^[N] r < 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.case_floor_eventually_neg_one
[82, 1]
[105, 27]
rw [Nat.zero_add, Int.floor_eq_iff, Int.cast_neg, Int.cast_one, and_comm] at h0
case intro.refine_1 R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R N : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋ = -1 h0 : ⌊f^[0 + N] r⌋ = -1 ⊢ 0 < -f^[N] r ∧ -f^[N] r < 1
case intro.refine_1 R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R N : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋ = -1 h0 : f^[N] r < -1 + 1 ∧ -1 ≤ f^[N] r ⊢ 0 < -f^[N] r ∧ -f^[N] r < 1
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 N : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋ = -1 h0 : ⌊f^[0 + N] r⌋ = -1 ⊢ 0 < -f^[N] r ∧ -f^[N] r < 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.case_floor_eventually_neg_one
[82, 1]
[105, 27]
revert h0
case intro.refine_1 R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R N : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋ = -1 h0 : f^[N] r < -1 + 1 ∧ -1 ≤ f^[N] r ⊢ 0 < -f^[N] r ∧ -f^[N] r < 1
case intro.refine_1 R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R N : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋ = -1 ⊢ f^[N] r < -1 + 1 ∧ -1 ≤ f^[N] r → 0 < -f^[N] r ∧ -f^[N] r < 1
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 N : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋ = -1 h0 : f^[N] r < -1 + 1 ∧ -1 ≤ f^[N] r ⊢ 0 < -f^[N] r ∧ -f^[N] r < 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.case_floor_eventually_neg_one
[82, 1]
[105, 27]
refine And.imp (λ h0 ↦ neg_pos_of_neg (h0.trans_eq <| neg_add_self 1)) (λ h0 ↦ neg_lt_of_neg_lt (h0.lt_or_eq.resolve_right λ h1 ↦ ?_))
case intro.refine_1 R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R N : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋ = -1 ⊢ f^[N] r < -1 + 1 ∧ -1 ≤ f^[N] r → 0 < -f^[N] r ∧ -f^[N] r < 1
case intro.refine_1 R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R N : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋ = -1 h0 : -1 ≤ f^[N] r h1 : -1 = f^[N] r ⊢ False
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 N : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋ = -1 ⊢ f^[N] r < -1 + 1 ∧ -1 ≤ f^[N] r → 0 < -f^[N] r ∧ -f^[N] r < 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.case_floor_eventually_neg_one
[82, 1]
[105, 27]
replace h0 : Int.fract (-1 : R) = 0 := Int.fract_neg_eq_zero.mpr Int.fract_one
case intro.refine_1 R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R N : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋ = -1 h0 : -1 ≤ f^[N] r h1 : -1 = f^[N] r ⊢ False
case intro.refine_1 R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R N : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋ = -1 h1 : -1 = f^[N] r h0 : Int.fract (-1) = 0 ⊢ False
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 N : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋ = -1 h0 : -1 ≤ f^[N] r h1 : -1 = f^[N] r ⊢ False TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.case_floor_eventually_neg_one
[82, 1]
[105, 27]
specialize h 1
case intro.refine_1 R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R N : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋ = -1 h1 : -1 = f^[N] r h0 : Int.fract (-1) = 0 ⊢ False
case intro.refine_1 R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R N : ℕ h1 : -1 = f^[N] r h0 : Int.fract (-1) = 0 h : ⌊f^[1 + N] r⌋ = -1 ⊢ False
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 N : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋ = -1 h1 : -1 = f^[N] r h0 : Int.fract (-1) = 0 ⊢ False TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.case_floor_eventually_neg_one
[82, 1]
[105, 27]
rw [f.iterate_add_apply, f.iterate_one, ← h1, f, h0, mul_zero, Int.floor_zero, zero_eq_neg] at h
case intro.refine_1 R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R N : ℕ h1 : -1 = f^[N] r h0 : Int.fract (-1) = 0 h : ⌊f^[1 + N] r⌋ = -1 ⊢ False
case intro.refine_1 R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R N : ℕ h1 : -1 = f^[N] r h0 : Int.fract (-1) = 0 h : 1 = 0 ⊢ False
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 N : ℕ h1 : -1 = f^[N] r h0 : Int.fract (-1) = 0 h : ⌊f^[1 + N] r⌋ = -1 ⊢ False TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.case_floor_eventually_neg_one
[82, 1]
[105, 27]
exact one_ne_zero h
case intro.refine_1 R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R N : ℕ h1 : -1 = f^[N] r h0 : Int.fract (-1) = 0 h : 1 = 0 ⊢ False
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 N : ℕ h1 : -1 = f^[N] r h0 : Int.fract (-1) = 0 h : 1 = 0 ⊢ False TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.case_floor_eventually_neg_one
[82, 1]
[105, 27]
have h0 (k : ℕ) : f^[(k + 1) + N] r = -f^[k + N] r - 1 := by rw [Nat.add_right_comm, f.iterate_succ_apply', f, Int.fract, h, Int.cast_neg, Int.cast_one, neg_one_mul, neg_sub', neg_neg]
case intro.refine_2 R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R N : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋ = -1 ⊢ EventuallyEqual (fun x => f^[x] r) (NatSeq_ofList [- -f^[N] r, -f^[N] r - 1])
case intro.refine_2 R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R N : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋ = -1 h0 : ∀ (k : ℕ), f^[k + 1 + N] r = -f^[k + N] r - 1 ⊢ EventuallyEqual (fun x => f^[x] r) (NatSeq_ofList [- -f^[N] r, -f^[N] r - 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 N : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋ = -1 ⊢ EventuallyEqual (fun x => f^[x] r) (NatSeq_ofList [- -f^[N] r, -f^[N] r - 1]) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.case_floor_eventually_neg_one
[82, 1]
[105, 27]
refine ⟨N, 0, λ k ↦ ?_⟩
case intro.refine_2 R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R N : ℕ h0 : ∀ (k : ℕ), f^[k + 1 + N] r = -f^[k + N] r - 1 h : Function.Periodic (fun x => f^[x + N] r) 2 ⊢ EventuallyEqual (fun x => f^[x] r) (NatSeq_ofList [- -f^[N] r, -f^[N] r - 1])
case intro.refine_2 R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R N : ℕ h0 : ∀ (k : ℕ), f^[k + 1 + N] r = -f^[k + N] r - 1 h : Function.Periodic (fun x => f^[x + N] r) 2 k : ℕ ⊢ (fun x => f^[x] r) (k + N) = NatSeq_ofList [- -f^[N] r, -f^[N] r - 1] (k + 0)
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 N : ℕ h0 : ∀ (k : ℕ), f^[k + 1 + N] r = -f^[k + N] r - 1 h : Function.Periodic (fun x => f^[x + N] r) 2 ⊢ EventuallyEqual (fun x => f^[x] r) (NatSeq_ofList [- -f^[N] r, -f^[N] r - 1]) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.case_floor_eventually_neg_one
[82, 1]
[105, 27]
change f^[k + N] r = [_, _].getI (k % 2)
case intro.refine_2 R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R N : ℕ h0 : ∀ (k : ℕ), f^[k + 1 + N] r = -f^[k + N] r - 1 h : Function.Periodic (fun x => f^[x + N] r) 2 k : ℕ ⊢ (fun x => f^[x] r) (k + N) = NatSeq_ofList [- -f^[N] r, -f^[N] r - 1] (k + 0)
case intro.refine_2 R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R N : ℕ h0 : ∀ (k : ℕ), f^[k + 1 + N] r = -f^[k + N] r - 1 h : Function.Periodic (fun x => f^[x + N] r) 2 k : ℕ ⊢ f^[k + N] r = [- -f^[N] r, -f^[N] r - 1].getI (k % 2)
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 N : ℕ h0 : ∀ (k : ℕ), f^[k + 1 + N] r = -f^[k + N] r - 1 h : Function.Periodic (fun x => f^[x + N] r) 2 k : ℕ ⊢ (fun x => f^[x] r) (k + N) = NatSeq_ofList [- -f^[N] r, -f^[N] r - 1] (k + 0) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.case_floor_eventually_neg_one
[82, 1]
[105, 27]
rw [neg_neg, ← N.zero_add, ← h0, zero_add 1, ← add_assoc, k.add_zero, ← h.map_mod_nat]
case intro.refine_2 R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R N : ℕ h0 : ∀ (k : ℕ), f^[k + 1 + N] r = -f^[k + N] r - 1 h : Function.Periodic (fun x => f^[x + N] r) 2 k : ℕ ⊢ f^[k + N] r = [- -f^[N] r, -f^[N] r - 1].getI (k % 2)
case intro.refine_2 R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R N : ℕ h0 : ∀ (k : ℕ), f^[k + 1 + N] r = -f^[k + N] r - 1 h : Function.Periodic (fun x => f^[x + N] r) 2 k : ℕ ⊢ f^[k % 2 + N] r = [f^[0 + N] r, f^[1 + N] r].getI (k % 2)
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 N : ℕ h0 : ∀ (k : ℕ), f^[k + 1 + N] r = -f^[k + N] r - 1 h : Function.Periodic (fun x => f^[x + N] r) 2 k : ℕ ⊢ f^[k + N] r = [- -f^[N] r, -f^[N] r - 1].getI (k % 2) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.case_floor_eventually_neg_one
[82, 1]
[105, 27]
obtain h1 | h1 : k % 2 = 0 ∨ k % 2 = 1 := Nat.mod_two_eq_zero_or_one k
case intro.refine_2 R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R N : ℕ h0 : ∀ (k : ℕ), f^[k + 1 + N] r = -f^[k + N] r - 1 h : Function.Periodic (fun x => f^[x + N] r) 2 k : ℕ ⊢ f^[k % 2 + N] r = [f^[0 + N] r, f^[1 + N] r].getI (k % 2)
case intro.refine_2.inl R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R N : ℕ h0 : ∀ (k : ℕ), f^[k + 1 + N] r = -f^[k + N] r - 1 h : Function.Periodic (fun x => f^[x + N] r) 2 k : ℕ h1 : k % 2 = 0 ⊢ f^[k % 2 + N] r = [f^[0 + N] r, f^[1 + N] r].getI (k % 2) case intro.refine_2.inr R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R N : ℕ h0 : ∀ (k : ℕ), f^[k + 1 + N] r = -f^[k + N] r - 1 h : Function.Periodic (fun x => f^[x + N] r) 2 k : ℕ h1 : k % 2 = 1 ⊢ f^[k % 2 + N] r = [f^[0 + N] r, f^[1 + N] r].getI (k % 2)
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 N : ℕ h0 : ∀ (k : ℕ), f^[k + 1 + N] r = -f^[k + N] r - 1 h : Function.Periodic (fun x => f^[x + N] r) 2 k : ℕ ⊢ f^[k % 2 + N] r = [f^[0 + N] r, f^[1 + N] r].getI (k % 2) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.case_floor_eventually_neg_one
[82, 1]
[105, 27]
all_goals rw [h1]; rfl
case intro.refine_2.inl R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R N : ℕ h0 : ∀ (k : ℕ), f^[k + 1 + N] r = -f^[k + N] r - 1 h : Function.Periodic (fun x => f^[x + N] r) 2 k : ℕ h1 : k % 2 = 0 ⊢ f^[k % 2 + N] r = [f^[0 + N] r, f^[1 + N] r].getI (k % 2) case intro.refine_2.inr R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R N : ℕ h0 : ∀ (k : ℕ), f^[k + 1 + N] r = -f^[k + N] r - 1 h : Function.Periodic (fun x => f^[x + N] r) 2 k : ℕ h1 : k % 2 = 1 ⊢ f^[k % 2 + N] r = [f^[0 + N] r, f^[1 + N] r].getI (k % 2)
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro.refine_2.inl R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R N : ℕ h0 : ∀ (k : ℕ), f^[k + 1 + N] r = -f^[k + N] r - 1 h : Function.Periodic (fun x => f^[x + N] r) 2 k : ℕ h1 : k % 2 = 0 ⊢ f^[k % 2 + N] r = [f^[0 + N] r, f^[1 + N] r].getI (k % 2) case intro.refine_2.inr R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R N : ℕ h0 : ∀ (k : ℕ), f^[k + 1 + N] r = -f^[k + N] r - 1 h : Function.Periodic (fun x => f^[x + N] r) 2 k : ℕ h1 : k % 2 = 1 ⊢ f^[k % 2 + N] r = [f^[0 + N] r, f^[1 + N] r].getI (k % 2) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.case_floor_eventually_neg_one
[82, 1]
[105, 27]
rw [Nat.add_right_comm, f.iterate_succ_apply', f, Int.fract, h, Int.cast_neg, Int.cast_one, neg_one_mul, neg_sub', neg_neg]
R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R N : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋ = -1 k : ℕ ⊢ f^[k + 1 + N] r = -f^[k + N] r - 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 N : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋ = -1 k : ℕ ⊢ f^[k + 1 + N] r = -f^[k + N] r - 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.case_floor_eventually_neg_one
[82, 1]
[105, 27]
rw [h0, neg_sub, sub_neg_eq_add, add_sub_cancel_left]
R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R N : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋ = -1 h0 : ∀ (k : ℕ), f^[k + 1 + N] r = -f^[k + N] r - 1 k : ℕ ⊢ -f^[k + 1 + N] r - 1 = (fun x => f^[x + N] r) 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 N : ℕ h : ∀ (k : ℕ), ⌊f^[k + N] r⌋ = -1 h0 : ∀ (k : ℕ), f^[k + 1 + N] r = -f^[k + N] r - 1 k : ℕ ⊢ -f^[k + 1 + N] r - 1 = (fun x => f^[x + N] r) k TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.case_floor_eventually_neg_one
[82, 1]
[105, 27]
rw [h1]
case intro.refine_2.inr R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R N : ℕ h0 : ∀ (k : ℕ), f^[k + 1 + N] r = -f^[k + N] r - 1 h : Function.Periodic (fun x => f^[x + N] r) 2 k : ℕ h1 : k % 2 = 1 ⊢ f^[k % 2 + N] r = [f^[0 + N] r, f^[1 + N] r].getI (k % 2)
case intro.refine_2.inr R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R N : ℕ h0 : ∀ (k : ℕ), f^[k + 1 + N] r = -f^[k + N] r - 1 h : Function.Periodic (fun x => f^[x + N] r) 2 k : ℕ h1 : k % 2 = 1 ⊢ f^[1 + N] r = [f^[0 + N] r, f^[1 + N] r].getI 1
Please generate a tactic in lean4 to solve the state. STATE: case intro.refine_2.inr R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R N : ℕ h0 : ∀ (k : ℕ), f^[k + 1 + N] r = -f^[k + N] r - 1 h : Function.Periodic (fun x => f^[x + N] r) 2 k : ℕ h1 : k % 2 = 1 ⊢ f^[k % 2 + N] r = [f^[0 + N] r, f^[1 + N] r].getI (k % 2) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.case_floor_eventually_neg_one
[82, 1]
[105, 27]
rfl
case intro.refine_2.inr R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R N : ℕ h0 : ∀ (k : ℕ), f^[k + 1 + N] r = -f^[k + N] r - 1 h : Function.Periodic (fun x => f^[x + N] r) 2 k : ℕ h1 : k % 2 = 1 ⊢ f^[1 + N] r = [f^[0 + N] r, f^[1 + N] r].getI 1
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro.refine_2.inr R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R N : ℕ h0 : ∀ (k : ℕ), f^[k + 1 + N] r = -f^[k + N] r - 1 h : Function.Periodic (fun x => f^[x + N] r) 2 k : ℕ h1 : k % 2 = 1 ⊢ f^[1 + N] r = [f^[0 + N] r, f^[1 + N] r].getI 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.f_alt_formula
[107, 1]
[110, 79]
rw [sq, f, Int.fract, mul_sub, mul_sub, sub_sub, ← add_one_mul (α := R), sub_add_cancel, mul_sub, sub_left_inj, ← mul_assoc, sub_one_mul, ← mul_sub_one, mul_assoc]
R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R ⊢ (↑⌊r⌋ - 1) * f r - ↑⌊r⌋ ^ 2 = ↑⌊r⌋ * ((↑⌊r⌋ - 1) * r - ↑⌊r⌋ ^ 2)
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 ⊢ (↑⌊r⌋ - 1) * f r - ↑⌊r⌋ ^ 2 = ↑⌊r⌋ * ((↑⌊r⌋ - 1) * r - ↑⌊r⌋ ^ 2) 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]
rcases h with ⟨N, _, h⟩
R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C : ℕ hC : 1 < C h : EventuallyEqual (fun x => ⌊f^[x] r⌋) fun x => -↑C ⊢ ∃ ε, Infinitesimal ε ∧ EventuallyEqual (fun x => (↑C + 1) * f^[x] r) fun x => -↑C ^ 2 + (-↑C) ^ x * ε
case intro.intro R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C : ℕ hC : 1 < C N w✝ : ℕ h : ∀ (k : ℕ), (fun x => ⌊f^[x] r⌋) (k + N) = (fun x => -↑C) (k + w✝) ⊢ ∃ ε, 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 C : ℕ hC : 1 < C h : EventuallyEqual (fun x => ⌊f^[x] r⌋) fun x => -↑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.case_floor_eventually_neg_of_one_lt
[112, 1]
[143, 46]
simp only at h
case intro.intro R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C : ℕ hC : 1 < C N w✝ : ℕ h : ∀ (k : ℕ), (fun x => ⌊f^[x] r⌋) (k + N) = (fun x => -↑C) (k + w✝) ⊢ ∃ ε, Infinitesimal ε ∧ EventuallyEqual (fun x => (↑C + 1) * f^[x] r) fun x => -↑C ^ 2 + (-↑C) ^ x * ε
case intro.intro 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 ⊢ ∃ ε, 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.intro R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C : ℕ hC : 1 < C N w✝ : ℕ h : ∀ (k : ℕ), (fun x => ⌊f^[x] r⌋) (k + N) = (fun x => -↑C) (k + w✝) ⊢ ∃ ε, 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.case_floor_eventually_neg_of_one_lt
[112, 1]
[143, 46]
have h0 (k) : (C + 1) * f^[(k + 1) + N] r + C ^ 2 = -C * ((C + 1) * f^[k + N] r + C ^ 2) := by have h0 := f_alt_formula (f^[k + N] r) rw [h, Int.cast_neg, Int.cast_natCast, neg_sq, ← neg_add', neg_mul, ← neg_add', neg_mul, neg_inj, neg_mul, ← neg_add', mul_neg, ← neg_mul] at h0 rwa [Nat.add_right_comm, f.iterate_succ_apply']
case intro.intro 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 ⊢ ∃ ε, Infinitesimal ε ∧ EventuallyEqual (fun x => (↑C + 1) * f^[x] r) fun x => -↑C ^ 2 + (-↑C) ^ x * ε
case intro.intro 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 h0 : ∀ (k : ℕ), (↑C + 1) * f^[k + 1 + N] r + ↑C ^ 2 = -↑C * ((↑C + 1) * f^[k + N] r + ↑C ^ 2) ⊢ ∃ ε, 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.intro 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 ⊢ ∃ ε, 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.case_floor_eventually_neg_of_one_lt
[112, 1]
[143, 46]
replace h0 : ∀ k, (C + 1) * f^[k + N] r + C ^ 2 = (-C) ^ k * ((C + 1) * f^[N] r + C ^ 2) := Nat.rec (by rw [Nat.zero_add, pow_zero, one_mul]) (λ k h1 ↦ by rw [h0, h1, ← mul_assoc, ← pow_succ'])
case intro.intro 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 h0 : ∀ (k : ℕ), (↑C + 1) * f^[k + 1 + N] r + ↑C ^ 2 = -↑C * ((↑C + 1) * f^[k + N] r + ↑C ^ 2) ⊢ ∃ ε, Infinitesimal ε ∧ EventuallyEqual (fun x => (↑C + 1) * f^[x] r) fun x => -↑C ^ 2 + (-↑C) ^ x * ε
case intro.intro 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 h0 : ∀ (k : ℕ), (↑C + 1) * f^[k + N] r + ↑C ^ 2 = (-↑C) ^ k * ((↑C + 1) * f^[N] r + ↑C ^ 2) ⊢ ∃ ε, 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.intro 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 h0 : ∀ (k : ℕ), (↑C + 1) * f^[k + 1 + N] r + ↑C ^ 2 = -↑C * ((↑C + 1) * f^[k + N] r + ↑C ^ 2) ⊢ ∃ ε, 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.case_floor_eventually_neg_of_one_lt
[112, 1]
[143, 46]
set ε := (C + 1) * f^[N] r + C ^ 2
case intro.intro 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 h0 : ∀ (k : ℕ), (↑C + 1) * f^[k + N] r + ↑C ^ 2 = (-↑C) ^ k * ((↑C + 1) * f^[N] r + ↑C ^ 2) ⊢ ∃ ε, Infinitesimal ε ∧ EventuallyEqual (fun x => (↑C + 1) * f^[x] r) fun x => -↑C ^ 2 + (-↑C) ^ x * ε
case intro.intro 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) * f^[k + N] r + ↑C ^ 2 = (-↑C) ^ k * ε ⊢ ∃ ε, 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.intro 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 h0 : ∀ (k : ℕ), (↑C + 1) * f^[k + N] r + ↑C ^ 2 = (-↑C) ^ k * ((↑C + 1) * f^[N] r + ↑C ^ 2) ⊢ ∃ ε, 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.case_floor_eventually_neg_of_one_lt
[112, 1]
[143, 46]
refine ⟨ε, ?_, N, 0, λ k ↦ eq_neg_add_of_add_eq <| (add_comm _ _).trans (h0 k)⟩
case intro.intro 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) * f^[k + N] r + ↑C ^ 2 = (-↑C) ^ k * ε ⊢ ∃ ε, Infinitesimal ε ∧ EventuallyEqual (fun x => (↑C + 1) * f^[x] r) fun x => -↑C ^ 2 + (-↑C) ^ x * ε
case intro.intro 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) * f^[k + N] r + ↑C ^ 2 = (-↑C) ^ k * ε ⊢ Infinitesimal ε
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro 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) * f^[k + N] r + ↑C ^ 2 = (-↑C) ^ k * ε ⊢ ∃ ε, 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.case_floor_eventually_neg_of_one_lt
[112, 1]
[143, 46]
replace h0 (k) : |(C + 1) * Int.fract (f^[k + N] r) - C| = C ^ k • |ε| := by specialize h0 k 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 rw [sub_eq_add_neg, h0, abs_mul, abs_pow, abs_neg, Nat.abs_cast, nsmul_eq_mul, Nat.cast_pow]
case intro.intro 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) * f^[k + N] r + ↑C ^ 2 = (-↑C) ^ k * ε ⊢ Infinitesimal ε
case intro.intro 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 • |ε| ⊢ Infinitesimal ε
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro 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) * f^[k + N] r + ↑C ^ 2 = (-↑C) ^ k * ε ⊢ Infinitesimal ε 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]
replace h (s : R) : |(C + 1) * Int.fract s - C| < ((C + 1 + C : ℕ) : R) := by apply (abs_sub _ _).trans_lt 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)] refine mul_lt_of_lt_one_right (Nat.cast_pos.mpr C.succ_pos) (Int.fract_lt_one _)
case intro.intro 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 • |ε| ⊢ Infinitesimal ε
case intro.intro R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C : ℕ hC : 1 < C N w✝ : ℕ ε : R := (↑C + 1) * f^[N] r + ↑C ^ 2 h0 : ∀ (k : ℕ), |(↑C + 1) * Int.fract (f^[k + N] r) - ↑C| = C ^ k • |ε| h : ∀ (s : R), |(↑C + 1) * Int.fract s - ↑C| < ↑(C + 1 + C) ⊢ Infinitesimal ε
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro 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 • |ε| ⊢ Infinitesimal ε 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]
exact Infinitesimal.iff_nsmul_Nat_bdd.mpr ⟨C + 1 + C, λ k ↦ (nsmul_le_nsmul_left (abs_nonneg ε) (Nat.lt_pow_self hC k).le).trans_lt <| (h0 _).symm.trans_lt (h (f^[k + N] r))⟩
case intro.intro R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C : ℕ hC : 1 < C N w✝ : ℕ ε : R := (↑C + 1) * f^[N] r + ↑C ^ 2 h0 : ∀ (k : ℕ), |(↑C + 1) * Int.fract (f^[k + N] r) - ↑C| = C ^ k • |ε| h : ∀ (s : R), |(↑C + 1) * Int.fract s - ↑C| < ↑(C + 1 + C) ⊢ Infinitesimal ε
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R r : R C : ℕ hC : 1 < C N w✝ : ℕ ε : R := (↑C + 1) * f^[N] r + ↑C ^ 2 h0 : ∀ (k : ℕ), |(↑C + 1) * Int.fract (f^[k + N] r) - ↑C| = C ^ k • |ε| h : ∀ (s : R), |(↑C + 1) * Int.fract s - ↑C| < ↑(C + 1 + C) ⊢ Infinitesimal ε 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]
have h0 := f_alt_formula (f^[k + N] r)
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 k : ℕ ⊢ (↑C + 1) * f^[k + 1 + N] r + ↑C ^ 2 = -↑C * ((↑C + 1) * f^[k + N] r + ↑C ^ 2)
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 k : ℕ h0 : (↑⌊f^[k + N] r⌋ - 1) * f (f^[k + N] r) - ↑⌊f^[k + N] r⌋ ^ 2 = ↑⌊f^[k + N] r⌋ * ((↑⌊f^[k + N] r⌋ - 1) * f^[k + N] r - ↑⌊f^[k + N] r⌋ ^ 2) ⊢ (↑C + 1) * f^[k + 1 + N] r + ↑C ^ 2 = -↑C * ((↑C + 1) * f^[k + N] r + ↑C ^ 2)
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 k : ℕ ⊢ (↑C + 1) * f^[k + 1 + N] r + ↑C ^ 2 = -↑C * ((↑C + 1) * f^[k + N] r + ↑C ^ 2) 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 [h, Int.cast_neg, Int.cast_natCast, neg_sq, ← neg_add', neg_mul, ← neg_add', neg_mul, neg_inj, neg_mul, ← neg_add', mul_neg, ← neg_mul] 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 k : ℕ h0 : (↑⌊f^[k + N] r⌋ - 1) * f (f^[k + N] r) - ↑⌊f^[k + N] r⌋ ^ 2 = ↑⌊f^[k + N] r⌋ * ((↑⌊f^[k + N] r⌋ - 1) * f^[k + N] r - ↑⌊f^[k + N] r⌋ ^ 2) ⊢ (↑C + 1) * f^[k + 1 + N] r + ↑C ^ 2 = -↑C * ((↑C + 1) * f^[k + N] r + ↑C ^ 2)
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 k : ℕ h0 : (↑C + 1) * f (f^[k + N] r) + ↑C ^ 2 = -↑C * ((↑C + 1) * f^[k + N] r + ↑C ^ 2) ⊢ (↑C + 1) * f^[k + 1 + N] r + ↑C ^ 2 = -↑C * ((↑C + 1) * f^[k + N] r + ↑C ^ 2)
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 k : ℕ h0 : (↑⌊f^[k + N] r⌋ - 1) * f (f^[k + N] r) - ↑⌊f^[k + N] r⌋ ^ 2 = ↑⌊f^[k + N] r⌋ * ((↑⌊f^[k + N] r⌋ - 1) * f^[k + N] r - ↑⌊f^[k + N] r⌋ ^ 2) ⊢ (↑C + 1) * f^[k + 1 + N] r + ↑C ^ 2 = -↑C * ((↑C + 1) * f^[k + N] r + ↑C ^ 2) 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]
rwa [Nat.add_right_comm, f.iterate_succ_apply']
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 k : ℕ h0 : (↑C + 1) * f (f^[k + N] r) + ↑C ^ 2 = -↑C * ((↑C + 1) * f^[k + N] r + ↑C ^ 2) ⊢ (↑C + 1) * f^[k + 1 + N] r + ↑C ^ 2 = -↑C * ((↑C + 1) * f^[k + N] r + ↑C ^ 2)
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 k : ℕ h0 : (↑C + 1) * f (f^[k + N] r) + ↑C ^ 2 = -↑C * ((↑C + 1) * f^[k + N] r + ↑C ^ 2) ⊢ (↑C + 1) * f^[k + 1 + N] r + ↑C ^ 2 = -↑C * ((↑C + 1) * f^[k + N] r + ↑C ^ 2) 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.zero_add, pow_zero, one_mul]
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 h0 : ∀ (k : ℕ), (↑C + 1) * f^[k + 1 + N] r + ↑C ^ 2 = -↑C * ((↑C + 1) * f^[k + N] r + ↑C ^ 2) ⊢ (↑C + 1) * f^[Nat.zero + N] r + ↑C ^ 2 = (-↑C) ^ Nat.zero * ((↑C + 1) * f^[N] r + ↑C ^ 2)
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 h0 : ∀ (k : ℕ), (↑C + 1) * f^[k + 1 + N] r + ↑C ^ 2 = -↑C * ((↑C + 1) * f^[k + N] r + ↑C ^ 2) ⊢ (↑C + 1) * f^[Nat.zero + N] r + ↑C ^ 2 = (-↑C) ^ Nat.zero * ((↑C + 1) * f^[N] r + ↑C ^ 2) 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 [h0, h1, ← mul_assoc, ← pow_succ']
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 h0 : ∀ (k : ℕ), (↑C + 1) * f^[k + 1 + N] r + ↑C ^ 2 = -↑C * ((↑C + 1) * f^[k + N] r + ↑C ^ 2) k : ℕ h1 : (↑C + 1) * f^[k + N] r + ↑C ^ 2 = (-↑C) ^ k * ((↑C + 1) * f^[N] r + ↑C ^ 2) ⊢ (↑C + 1) * f^[k.succ + N] r + ↑C ^ 2 = (-↑C) ^ k.succ * ((↑C + 1) * f^[N] r + ↑C ^ 2)
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 h0 : ∀ (k : ℕ), (↑C + 1) * f^[k + 1 + N] r + ↑C ^ 2 = -↑C * ((↑C + 1) * f^[k + N] r + ↑C ^ 2) k : ℕ h1 : (↑C + 1) * f^[k + N] r + ↑C ^ 2 = (-↑C) ^ k * ((↑C + 1) * f^[N] r + ↑C ^ 2) ⊢ (↑C + 1) * f^[k.succ + N] r + ↑C ^ 2 = (-↑C) ^ k.succ * ((↑C + 1) * f^[N] r + ↑C ^ 2) 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]
specialize h0 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 h0 : ∀ (k : ℕ), (↑C + 1) * f^[k + N] r + ↑C ^ 2 = (-↑C) ^ k * ε 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) * f^[k + N] r + ↑C ^ 2 = (-↑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 h0 : ∀ (k : ℕ), (↑C + 1) * f^[k + N] r + ↑C ^ 2 = (-↑C) ^ k * ε 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 [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: