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/IMO2010/A1/A1Dense.lean
IMOSL.IMO2010A1.good_iff_of_DenselyOrdered
[30, 1]
[65, 39]
specialize h (-1) c
R : Type u_2 inst✝⁴ : LinearOrderedRing R inst✝³ : FloorRing R S : Type u_1 inst✝² : DenselyOrdered R inst✝¹ : LinearOrderedRing S inst✝ : FloorRing S f : R → S h : good f c : R hc : 0 < c ∧ c < 1 h0 : ⌊f c⌋ = 0 ⊢ f (-c) = 0
R : Type u_2 inst✝⁴ : LinearOrderedRing R inst✝³ : FloorRing R S : Type u_1 inst✝² : DenselyOrdered R inst✝¹ : LinearOrderedRing S inst✝ : FloorRing S f : R → S c : R hc : 0 < c ∧ c < 1 h0 : ⌊f c⌋ = 0 h : f (⌊-1⌋ • c) = f (-1) * ↑⌊f c⌋ ⊢ f (-c) = 0
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 inst✝⁴ : LinearOrderedRing R inst✝³ : FloorRing R S : Type u_1 inst✝² : DenselyOrdered R inst✝¹ : LinearOrderedRing S inst✝ : FloorRing S f : R → S h : good f c : R hc : 0 < c ∧ c < 1 h0 : ⌊f c⌋ = 0 ⊢ f (-c) = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Dense.lean
IMOSL.IMO2010A1.good_iff_of_DenselyOrdered
[30, 1]
[65, 39]
have h1 : ⌊(-1 : R)⌋ = -1 := by rw [← Int.cast_one, ← Int.cast_neg, Int.floor_intCast]
R : Type u_2 inst✝⁴ : LinearOrderedRing R inst✝³ : FloorRing R S : Type u_1 inst✝² : DenselyOrdered R inst✝¹ : LinearOrderedRing S inst✝ : FloorRing S f : R → S c : R hc : 0 < c ∧ c < 1 h0 : ⌊f c⌋ = 0 h : f (⌊-1⌋ • c) = f (-1) * ↑⌊f c⌋ ⊢ f (-c) = 0
R : Type u_2 inst✝⁴ : LinearOrderedRing R inst✝³ : FloorRing R S : Type u_1 inst✝² : DenselyOrdered R inst✝¹ : LinearOrderedRing S inst✝ : FloorRing S f : R → S c : R hc : 0 < c ∧ c < 1 h0 : ⌊f c⌋ = 0 h : f (⌊-1⌋ • c) = f (-1) * ↑⌊f c⌋ h1 : ⌊-1⌋ = -1 ⊢ f (-c) = 0
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 inst✝⁴ : LinearOrderedRing R inst✝³ : FloorRing R S : Type u_1 inst✝² : DenselyOrdered R inst✝¹ : LinearOrderedRing S inst✝ : FloorRing S f : R → S c : R hc : 0 < c ∧ c < 1 h0 : ⌊f c⌋ = 0 h : f (⌊-1⌋ • c) = f (-1) * ↑⌊f c⌋ ⊢ f (-c) = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Dense.lean
IMOSL.IMO2010A1.good_iff_of_DenselyOrdered
[30, 1]
[65, 39]
rwa [h1, neg_one_zsmul, h0, Int.cast_zero, mul_zero] at h
R : Type u_2 inst✝⁴ : LinearOrderedRing R inst✝³ : FloorRing R S : Type u_1 inst✝² : DenselyOrdered R inst✝¹ : LinearOrderedRing S inst✝ : FloorRing S f : R → S c : R hc : 0 < c ∧ c < 1 h0 : ⌊f c⌋ = 0 h : f (⌊-1⌋ • c) = f (-1) * ↑⌊f c⌋ h1 : ⌊-1⌋ = -1 ⊢ f (-c) = 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 inst✝⁴ : LinearOrderedRing R inst✝³ : FloorRing R S : Type u_1 inst✝² : DenselyOrdered R inst✝¹ : LinearOrderedRing S inst✝ : FloorRing S f : R → S c : R hc : 0 < c ∧ c < 1 h0 : ⌊f c⌋ = 0 h : f (⌊-1⌋ • c) = f (-1) * ↑⌊f c⌋ h1 : ⌊-1⌋ = -1 ⊢ f (-c) = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Dense.lean
IMOSL.IMO2010A1.good_iff_of_DenselyOrdered
[30, 1]
[65, 39]
rw [← Int.cast_one, ← Int.cast_neg, Int.floor_intCast]
R : Type u_2 inst✝⁴ : LinearOrderedRing R inst✝³ : FloorRing R S : Type u_1 inst✝² : DenselyOrdered R inst✝¹ : LinearOrderedRing S inst✝ : FloorRing S f : R → S c : R hc : 0 < c ∧ c < 1 h0 : ⌊f c⌋ = 0 h : f (⌊-1⌋ • c) = f (-1) * ↑⌊f c⌋ ⊢ ⌊-1⌋ = -1
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 inst✝⁴ : LinearOrderedRing R inst✝³ : FloorRing R S : Type u_1 inst✝² : DenselyOrdered R inst✝¹ : LinearOrderedRing S inst✝ : FloorRing S f : R → S c : R hc : 0 < c ∧ c < 1 h0 : ⌊f c⌋ = 0 h : f (⌊-1⌋ • c) = f (-1) * ↑⌊f c⌋ ⊢ ⌊-1⌋ = -1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Dense.lean
IMOSL.IMO2010A1.good_iff_of_DenselyOrdered
[30, 1]
[65, 39]
rw [Int.floor_eq_iff, Int.cast_neg, Int.cast_one, neg_add_self]
R : Type u_2 inst✝⁴ : LinearOrderedRing R inst✝³ : FloorRing R S : Type u_1 inst✝² : DenselyOrdered R inst✝¹ : LinearOrderedRing S inst✝ : FloorRing S f : R → S c : R hc : 0 < c ∧ c < 1 h0 : f (-c) = 0 y : R h : f (⌊-c⌋ • -y) = f (-c) * ↑⌊f (-y)⌋ ⊢ ⌊-c⌋ = -1
R : Type u_2 inst✝⁴ : LinearOrderedRing R inst✝³ : FloorRing R S : Type u_1 inst✝² : DenselyOrdered R inst✝¹ : LinearOrderedRing S inst✝ : FloorRing S f : R → S c : R hc : 0 < c ∧ c < 1 h0 : f (-c) = 0 y : R h : f (⌊-c⌋ • -y) = f (-c) * ↑⌊f (-y)⌋ ⊢ -1 ≤ -c ∧ -c < 0
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 inst✝⁴ : LinearOrderedRing R inst✝³ : FloorRing R S : Type u_1 inst✝² : DenselyOrdered R inst✝¹ : LinearOrderedRing S inst✝ : FloorRing S f : R → S c : R hc : 0 < c ∧ c < 1 h0 : f (-c) = 0 y : R h : f (⌊-c⌋ • -y) = f (-c) * ↑⌊f (-y)⌋ ⊢ ⌊-c⌋ = -1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Dense.lean
IMOSL.IMO2010A1.good_iff_of_DenselyOrdered
[30, 1]
[65, 39]
exact ⟨neg_le_neg hc.2.le, neg_lt_zero.mpr hc.1⟩
R : Type u_2 inst✝⁴ : LinearOrderedRing R inst✝³ : FloorRing R S : Type u_1 inst✝² : DenselyOrdered R inst✝¹ : LinearOrderedRing S inst✝ : FloorRing S f : R → S c : R hc : 0 < c ∧ c < 1 h0 : f (-c) = 0 y : R h : f (⌊-c⌋ • -y) = f (-c) * ↑⌊f (-y)⌋ ⊢ -1 ≤ -c ∧ -c < 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 inst✝⁴ : LinearOrderedRing R inst✝³ : FloorRing R S : Type u_1 inst✝² : DenselyOrdered R inst✝¹ : LinearOrderedRing S inst✝ : FloorRing S f : R → S c : R hc : 0 < c ∧ c < 1 h0 : f (-c) = 0 y : R h : f (⌊-c⌋ • -y) = f (-c) * ↑⌊f (-y)⌋ ⊢ -1 ≤ -c ∧ -c < 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Dense.lean
IMOSL.IMO2010A1.good_iff_of_DenselyOrdered
[30, 1]
[65, 39]
rw [h0, h, Int.cast_one, mul_one]
R : Type u_2 inst✝⁴ : LinearOrderedRing R inst✝³ : FloorRing R S : Type u_1 inst✝² : DenselyOrdered R inst✝¹ : LinearOrderedRing S inst✝ : FloorRing S f : R → S h✝ : (∃ C, ⌊C⌋ = 1 ∧ f = fun x => C) ∨ f = 0 x✝² : ∃ C, ⌊C⌋ = 1 ∧ f = fun x => C x✝¹ x✝ : R C : S h : ⌊C⌋ = 1 h0 : f = fun x => C ⊢ f (⌊x✝¹⌋ • x✝) = f x✝¹ * ↑⌊f x✝⌋
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 inst✝⁴ : LinearOrderedRing R inst✝³ : FloorRing R S : Type u_1 inst✝² : DenselyOrdered R inst✝¹ : LinearOrderedRing S inst✝ : FloorRing S f : R → S h✝ : (∃ C, ⌊C⌋ = 1 ∧ f = fun x => C) ∨ f = 0 x✝² : ∃ C, ⌊C⌋ = 1 ∧ f = fun x => C x✝¹ x✝ : R C : S h : ⌊C⌋ = 1 h0 : f = fun x => C ⊢ f (⌊x✝¹⌋ • x✝) = f x✝¹ * ↑⌊f x✝⌋ TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/CharTwo/Finset.lean
IMOSL.Extra.symmDiff_singleton_eq_erase
[28, 1]
[32, 21]
have h0 : {i} \ S = ∅ := Finset.sdiff_eq_empty_iff_subset.mpr λ c h0 ↦ Finset.mem_singleton.mp h0 ▸ h
ι : Type u_1 inst✝ : DecidableEq ι i : ι S : Finset ι h : i ∈ S ⊢ symmDiff {i} S = S.erase i
ι : Type u_1 inst✝ : DecidableEq ι i : ι S : Finset ι h : i ∈ S h0 : {i} \ S = ∅ ⊢ symmDiff {i} S = S.erase i
Please generate a tactic in lean4 to solve the state. STATE: ι : Type u_1 inst✝ : DecidableEq ι i : ι S : Finset ι h : i ∈ S ⊢ symmDiff {i} S = S.erase i TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/CharTwo/Finset.lean
IMOSL.Extra.symmDiff_singleton_eq_erase
[28, 1]
[32, 21]
rw [symmDiff, Finset.sdiff_singleton_eq_erase, h0]
ι : Type u_1 inst✝ : DecidableEq ι i : ι S : Finset ι h : i ∈ S h0 : {i} \ S = ∅ ⊢ symmDiff {i} S = S.erase i
ι : Type u_1 inst✝ : DecidableEq ι i : ι S : Finset ι h : i ∈ S h0 : {i} \ S = ∅ ⊢ ∅ ⊔ S.erase i = S.erase i
Please generate a tactic in lean4 to solve the state. STATE: ι : Type u_1 inst✝ : DecidableEq ι i : ι S : Finset ι h : i ∈ S h0 : {i} \ S = ∅ ⊢ symmDiff {i} S = S.erase i TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/CharTwo/Finset.lean
IMOSL.Extra.symmDiff_singleton_eq_erase
[28, 1]
[32, 21]
exact bot_sup_eq _
ι : Type u_1 inst✝ : DecidableEq ι i : ι S : Finset ι h : i ∈ S h0 : {i} \ S = ∅ ⊢ ∅ ⊔ S.erase i = S.erase i
no goals
Please generate a tactic in lean4 to solve the state. STATE: ι : Type u_1 inst✝ : DecidableEq ι i : ι S : Finset ι h : i ∈ S h0 : {i} \ S = ∅ ⊢ ∅ ⊔ S.erase i = S.erase i TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/CharTwo/Finset.lean
IMOSL.Extra.CharTwo.symmDiff_singleton_sum_eq
[48, 1]
[52, 61]
by_cases h : i ∈ S
M : Type u_2 ι : Type u_1 inst✝² : AddCommMonoid M inst✝¹ : CharTwo M inst✝ : DecidableEq ι f : ι → M i : ι S : Finset ι ⊢ (symmDiff {i} S).sum f = f i + S.sum f
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 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
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 i : ι S : Finset ι ⊢ (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_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/IMO2012/A5/Extra/ExplicitRings/F4.lean
IMOSL.IMO2012A5.𝔽₄.add_mul
[229, 11]
[230, 58]
rw [𝔽₄.mul_comm, 𝔽₄.mul_add, z.mul_comm, z.mul_comm]
x y z : 𝔽₄ ⊢ (x + y) * z = x * z + y * z
no goals
Please generate a tactic in lean4 to solve the state. STATE: x y z : 𝔽₄ ⊢ (x + y) * z = x * z + y * z TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5General/A5Hom.lean
IMOSL.IMO2012A5.good_comp_hom
[22, 1]
[25, 53]
simp only [Function.comp_apply]
R : Type u_2 S : Type u_3 inst✝² : NonAssocSemiring R inst✝¹ : NonAssocSemiring S f : R → S R₀ : Type u_1 h : good f inst✝ : NonAssocSemiring R₀ φ : R₀ →+* R x y : R₀ ⊢ (f ∘ ⇑φ) (x * y + 1) = (f ∘ ⇑φ) x * (f ∘ ⇑φ) y + (f ∘ ⇑φ) (x + y)
R : Type u_2 S : Type u_3 inst✝² : NonAssocSemiring R inst✝¹ : NonAssocSemiring S f : R → S R₀ : Type u_1 h : good f inst✝ : NonAssocSemiring R₀ φ : R₀ →+* R x y : R₀ ⊢ f (φ (x * y + 1)) = f (φ x) * f (φ y) + f (φ (x + y))
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 S : Type u_3 inst✝² : NonAssocSemiring R inst✝¹ : NonAssocSemiring S f : R → S R₀ : Type u_1 h : good f inst✝ : NonAssocSemiring R₀ φ : R₀ →+* R x y : R₀ ⊢ (f ∘ ⇑φ) (x * y + 1) = (f ∘ ⇑φ) x * (f ∘ ⇑φ) y + (f ∘ ⇑φ) (x + y) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5General/A5Hom.lean
IMOSL.IMO2012A5.good_comp_hom
[22, 1]
[25, 53]
rw [φ.map_add, φ.map_mul, φ.map_one, h, φ.map_add]
R : Type u_2 S : Type u_3 inst✝² : NonAssocSemiring R inst✝¹ : NonAssocSemiring S f : R → S R₀ : Type u_1 h : good f inst✝ : NonAssocSemiring R₀ φ : R₀ →+* R x y : R₀ ⊢ f (φ (x * y + 1)) = f (φ x) * f (φ y) + f (φ (x + y))
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 S : Type u_3 inst✝² : NonAssocSemiring R inst✝¹ : NonAssocSemiring S f : R → S R₀ : Type u_1 h : good f inst✝ : NonAssocSemiring R₀ φ : R₀ →+* R x y : R₀ ⊢ f (φ (x * y + 1)) = f (φ x) * f (φ y) + f (φ (x + y)) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5General/A5Hom.lean
IMOSL.IMO2012A5.good_hom_comp
[27, 1]
[30, 31]
simp only [Function.comp_apply]
R : Type u_2 S : Type u_3 inst✝² : NonAssocSemiring R inst✝¹ : NonAssocSemiring S f : R → S S₀ : Type u_1 h : good f inst✝ : NonAssocSemiring S₀ φ : S →+* S₀ x y : R ⊢ (⇑φ ∘ f) (x * y + 1) = (⇑φ ∘ f) x * (⇑φ ∘ f) y + (⇑φ ∘ f) (x + y)
R : Type u_2 S : Type u_3 inst✝² : NonAssocSemiring R inst✝¹ : NonAssocSemiring S f : R → S S₀ : Type u_1 h : good f inst✝ : NonAssocSemiring S₀ φ : S →+* S₀ x y : R ⊢ φ (f (x * y + 1)) = φ (f x) * φ (f y) + φ (f (x + y))
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 S : Type u_3 inst✝² : NonAssocSemiring R inst✝¹ : NonAssocSemiring S f : R → S S₀ : Type u_1 h : good f inst✝ : NonAssocSemiring S₀ φ : S →+* S₀ x y : R ⊢ (⇑φ ∘ f) (x * y + 1) = (⇑φ ∘ f) x * (⇑φ ∘ f) y + (⇑φ ∘ f) (x + y) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5General/A5Hom.lean
IMOSL.IMO2012A5.good_hom_comp
[27, 1]
[30, 31]
rw [h, φ.map_add, φ.map_mul]
R : Type u_2 S : Type u_3 inst✝² : NonAssocSemiring R inst✝¹ : NonAssocSemiring S f : R → S S₀ : Type u_1 h : good f inst✝ : NonAssocSemiring S₀ φ : S →+* S₀ x y : R ⊢ φ (f (x * y + 1)) = φ (f x) * φ (f y) + φ (f (x + y))
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 S : Type u_3 inst✝² : NonAssocSemiring R inst✝¹ : NonAssocSemiring S f : R → S S₀ : Type u_1 h : good f inst✝ : NonAssocSemiring S₀ φ : S →+* S₀ x y : R ⊢ φ (f (x * y + 1)) = φ (f x) * φ (f y) + φ (f (x + y)) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5General/A5Hom.lean
IMOSL.IMO2012A5.NontrivialGood.hom_comp
[37, 1]
[40, 78]
rw [← φ.map_one, ← φ.map_zero, ← hf.map_zero_add_one, φ.map_add]
R : Type u_2 S : Type u_3 inst✝² : NonAssocSemiring R inst✝¹ : NonAssocSemiring S f : R → S S₀ : Type u_1 hf : NontrivialGood f inst✝ : NonAssocSemiring S₀ φ : S →+* S₀ ⊢ (⇑φ ∘ f) 0 + 1 = 0
R : Type u_2 S : Type u_3 inst✝² : NonAssocSemiring R inst✝¹ : NonAssocSemiring S f : R → S S₀ : Type u_1 hf : NontrivialGood f inst✝ : NonAssocSemiring S₀ φ : S →+* S₀ ⊢ (⇑φ ∘ f) 0 + φ 1 = φ (f 0) + φ 1
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 S : Type u_3 inst✝² : NonAssocSemiring R inst✝¹ : NonAssocSemiring S f : R → S S₀ : Type u_1 hf : NontrivialGood f inst✝ : NonAssocSemiring S₀ φ : S →+* S₀ ⊢ (⇑φ ∘ f) 0 + 1 = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5General/A5Hom.lean
IMOSL.IMO2012A5.NontrivialGood.hom_comp
[37, 1]
[40, 78]
rfl
R : Type u_2 S : Type u_3 inst✝² : NonAssocSemiring R inst✝¹ : NonAssocSemiring S f : R → S S₀ : Type u_1 hf : NontrivialGood f inst✝ : NonAssocSemiring S₀ φ : S →+* S₀ ⊢ (⇑φ ∘ f) 0 + φ 1 = φ (f 0) + φ 1
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 S : Type u_3 inst✝² : NonAssocSemiring R inst✝¹ : NonAssocSemiring S f : R → S S₀ : Type u_1 hf : NontrivialGood f inst✝ : NonAssocSemiring S₀ φ : S →+* S₀ ⊢ (⇑φ ∘ f) 0 + φ 1 = φ (f 0) + φ 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/NatSequence/EventuallyEqual.lean
IMOSL.Extra.EventuallyEqual.symm
[26, 1]
[27, 66]
rcases h with ⟨N_a, N_b, h⟩
α✝ : Sort u_1 a b : Nat → α✝ h : EventuallyEqual a b ⊢ EventuallyEqual b a
case intro.intro α✝ : Sort u_1 a b : Nat → α✝ N_a N_b : Nat h : ∀ (k : Nat), a (k + N_a) = b (k + N_b) ⊢ EventuallyEqual b a
Please generate a tactic in lean4 to solve the state. STATE: α✝ : Sort u_1 a b : Nat → α✝ h : EventuallyEqual a b ⊢ EventuallyEqual b a TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/NatSequence/EventuallyEqual.lean
IMOSL.Extra.EventuallyEqual.symm
[26, 1]
[27, 66]
exact ⟨N_b, N_a, λ k ↦ (h k).symm⟩
case intro.intro α✝ : Sort u_1 a b : Nat → α✝ N_a N_b : Nat h : ∀ (k : Nat), a (k + N_a) = b (k + N_b) ⊢ EventuallyEqual b a
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro α✝ : Sort u_1 a b : Nat → α✝ N_a N_b : Nat h : ∀ (k : Nat), a (k + N_a) = b (k + N_b) ⊢ EventuallyEqual b a TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/NatSequence/EventuallyEqual.lean
IMOSL.Extra.EventuallyEqual.trans
[29, 1]
[34, 85]
rcases h with ⟨N_a, N_b, h⟩
α✝ : Sort u_1 a b c : Nat → α✝ h : EventuallyEqual a b h0 : EventuallyEqual b c ⊢ EventuallyEqual a c
case intro.intro α✝ : Sort u_1 a b c : Nat → α✝ h0 : EventuallyEqual b c N_a N_b : Nat h : ∀ (k : Nat), a (k + N_a) = b (k + N_b) ⊢ EventuallyEqual a c
Please generate a tactic in lean4 to solve the state. STATE: α✝ : Sort u_1 a b c : Nat → α✝ h : EventuallyEqual a b h0 : EventuallyEqual b c ⊢ EventuallyEqual a c TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/NatSequence/EventuallyEqual.lean
IMOSL.Extra.EventuallyEqual.trans
[29, 1]
[34, 85]
rcases h0 with ⟨K_b, K_c, h0⟩
case intro.intro α✝ : Sort u_1 a b c : Nat → α✝ h0 : EventuallyEqual b c N_a N_b : Nat h : ∀ (k : Nat), a (k + N_a) = b (k + N_b) ⊢ EventuallyEqual a c
case intro.intro.intro.intro α✝ : Sort u_1 a b c : Nat → α✝ N_a N_b : Nat h : ∀ (k : Nat), a (k + N_a) = b (k + N_b) K_b K_c : Nat h0 : ∀ (k : Nat), b (k + K_b) = c (k + K_c) ⊢ EventuallyEqual a c
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro α✝ : Sort u_1 a b c : Nat → α✝ h0 : EventuallyEqual b c N_a N_b : Nat h : ∀ (k : Nat), a (k + N_a) = b (k + N_b) ⊢ EventuallyEqual a c TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/NatSequence/EventuallyEqual.lean
IMOSL.Extra.EventuallyEqual.trans
[29, 1]
[34, 85]
refine ⟨K_b + N_a, K_c + N_b, λ k ↦ ?_⟩
case intro.intro.intro.intro α✝ : Sort u_1 a b c : Nat → α✝ N_a N_b : Nat h : ∀ (k : Nat), a (k + N_a) = b (k + N_b) K_b K_c : Nat h0 : ∀ (k : Nat), b (k + K_b) = c (k + K_c) ⊢ EventuallyEqual a c
case intro.intro.intro.intro α✝ : Sort u_1 a b c : Nat → α✝ N_a N_b : Nat h : ∀ (k : Nat), a (k + N_a) = b (k + N_b) K_b K_c : Nat h0 : ∀ (k : Nat), b (k + K_b) = c (k + K_c) k : Nat ⊢ a (k + (K_b + N_a)) = c (k + (K_c + N_b))
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro α✝ : Sort u_1 a b c : Nat → α✝ N_a N_b : Nat h : ∀ (k : Nat), a (k + N_a) = b (k + N_b) K_b K_c : Nat h0 : ∀ (k : Nat), b (k + K_b) = c (k + K_c) ⊢ EventuallyEqual a c TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/NatSequence/EventuallyEqual.lean
IMOSL.Extra.EventuallyEqual.trans
[29, 1]
[34, 85]
rw [← Nat.add_assoc, h, Nat.add_right_comm, h0, Nat.add_right_comm, Nat.add_assoc]
case intro.intro.intro.intro α✝ : Sort u_1 a b c : Nat → α✝ N_a N_b : Nat h : ∀ (k : Nat), a (k + N_a) = b (k + N_b) K_b K_c : Nat h0 : ∀ (k : Nat), b (k + K_b) = c (k + K_c) k : Nat ⊢ a (k + (K_b + N_a)) = c (k + (K_c + N_b))
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro α✝ : Sort u_1 a b c : Nat → α✝ N_a N_b : Nat h : ∀ (k : Nat), a (k + N_a) = b (k + N_b) K_b K_c : Nat h0 : ∀ (k : Nat), b (k + K_b) = c (k + K_c) k : Nat ⊢ a (k + (K_b + N_a)) = c (k + (K_c + N_b)) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/Extra/ExplicitRings/F3.lean
IMOSL.IMO2012A5.𝔽₃.add_mul
[151, 11]
[152, 58]
rw [𝔽₃.mul_comm, 𝔽₃.mul_add, z.mul_comm, z.mul_comm]
x y z : 𝔽₃ ⊢ (x + y) * z = x * z + y * z
no goals
Please generate a tactic in lean4 to solve the state. STATE: x y z : 𝔽₃ ⊢ (x + y) * z = x * z + y * z TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/Extra/ExplicitRings/F3.lean
IMOSL.IMO2012A5.𝔽₃.cast_add
[176, 1]
[186, 73]
rwa [one_add_one_eq_two, eq_neg_iff_add_eq_zero, two_add_one_eq_three]
R : Type u_1 inst✝ : AddGroupWithOne R h : 3 = 0 x y : 𝔽₃ ⊢ 1 + 1 = -1
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝ : AddGroupWithOne R h : 3 = 0 x y : 𝔽₃ ⊢ 1 + 1 = -1 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: