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]
rw [← zsmul_zero ⌊x⌋, h, h0, Int.cast_one, mul_one]
case refine_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 h : good f h0 : ⌊f 0⌋ = 1 x : R ⊢ f x = f 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: case refine_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 h : good f h0 : ⌊f 0⌋ = 1 x : R ⊢ f x = f 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Dense.lean
IMOSL.IMO2010A1.good_iff_of_DenselyOrdered
[30, 1]
[65, 39]
rcases exists_between (zero_lt_one' R) with ⟨c, hc⟩
case refine_2 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 h0 : f 0 = 0 ⊢ f = 0
case refine_2.intro 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 h0 : f 0 = 0 c : R hc : 0 < c ∧ c < 1 ⊢ f = 0
Please generate a tactic in lean4 to solve the state. STATE: case refine_2 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 h0 : f 0 = 0 ⊢ f = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Dense.lean
IMOSL.IMO2010A1.good_iff_of_DenselyOrdered
[30, 1]
[65, 39]
replace h0 : ⌊f c⌋ = 0 := by specialize h c c have h1 : ⌊c⌋ = 0 := Int.floor_eq_zero_iff.mpr ⟨hc.1.le, hc.2⟩ rw [h1, zero_zsmul, h0, zero_eq_mul] at h exact h.elim (λ h ↦ h ▸ Int.floor_zero) Int.cast_eq_zero.mp
case refine_2.intro 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 h0 : f 0 = 0 c : R hc : 0 < c ∧ c < 1 ⊢ f = 0
case refine_2.intro 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 = 0
Please generate a tactic in lean4 to solve the state. STATE: case refine_2.intro 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 h0 : f 0 = 0 c : R hc : 0 < c ∧ c < 1 ⊢ f = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Dense.lean
IMOSL.IMO2010A1.good_iff_of_DenselyOrdered
[30, 1]
[65, 39]
replace h0 : f (-c) = 0 := by specialize h (-1) c have h1 : ⌊(-1 : R)⌋ = -1 := by rw [← Int.cast_one, ← Int.cast_neg, Int.floor_intCast] rwa [h1, neg_one_zsmul, h0, Int.cast_zero, mul_zero] at h
case refine_2.intro 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 = 0
case refine_2.intro 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 = 0
Please generate a tactic in lean4 to solve the state. STATE: case refine_2.intro 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 = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Dense.lean
IMOSL.IMO2010A1.good_iff_of_DenselyOrdered
[30, 1]
[65, 39]
funext y
case refine_2.intro 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 = 0
case refine_2.intro.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 h : good f c : R hc : 0 < c ∧ c < 1 h0 : f (-c) = 0 y : R ⊢ f y = 0 y
Please generate a tactic in lean4 to solve the state. STATE: case refine_2.intro 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 = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Dense.lean
IMOSL.IMO2010A1.good_iff_of_DenselyOrdered
[30, 1]
[65, 39]
specialize h (-c) (-y)
case refine_2.intro.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 h : good f c : R hc : 0 < c ∧ c < 1 h0 : f (-c) = 0 y : R ⊢ f y = 0 y
case refine_2.intro.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 y : R h : f (⌊-c⌋ • -y) = f (-c) * ↑⌊f (-y)⌋ ⊢ f y = 0 y
Please generate a tactic in lean4 to solve the state. STATE: case refine_2.intro.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 h : good f c : R hc : 0 < c ∧ c < 1 h0 : f (-c) = 0 y : R ⊢ f y = 0 y 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 : ⌊-c⌋ = -1 := by rw [Int.floor_eq_iff, Int.cast_neg, Int.cast_one, neg_add_self] exact ⟨neg_le_neg hc.2.le, neg_lt_zero.mpr hc.1⟩
case refine_2.intro.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 y : R h : f (⌊-c⌋ • -y) = f (-c) * ↑⌊f (-y)⌋ ⊢ f y = 0 y
case refine_2.intro.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 y : R h : f (⌊-c⌋ • -y) = f (-c) * ↑⌊f (-y)⌋ h1 : ⌊-c⌋ = -1 ⊢ f y = 0 y
Please generate a tactic in lean4 to solve the state. STATE: case refine_2.intro.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 y : R h : f (⌊-c⌋ • -y) = f (-c) * ↑⌊f (-y)⌋ ⊢ f y = 0 y TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Dense.lean
IMOSL.IMO2010A1.good_iff_of_DenselyOrdered
[30, 1]
[65, 39]
rwa [h0, zero_mul, h1, neg_one_zsmul, neg_neg] at h
case refine_2.intro.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 y : R h : f (⌊-c⌋ • -y) = f (-c) * ↑⌊f (-y)⌋ h1 : ⌊-c⌋ = -1 ⊢ f y = 0 y
no goals
Please generate a tactic in lean4 to solve the state. STATE: case refine_2.intro.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 y : R h : f (⌊-c⌋ • -y) = f (-c) * ↑⌊f (-y)⌋ h1 : ⌊-c⌋ = -1 ⊢ f y = 0 y TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Dense.lean
IMOSL.IMO2010A1.good_iff_of_DenselyOrdered
[30, 1]
[65, 39]
specialize h c 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 h0 : f 0 = 0 c : R hc : 0 < c ∧ c < 1 ⊢ ⌊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 h0 : f 0 = 0 c : R hc : 0 < c ∧ c < 1 h : f (⌊c⌋ • c) = f c * ↑⌊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 h0 : f 0 = 0 c : R hc : 0 < c ∧ c < 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]
have h1 : ⌊c⌋ = 0 := Int.floor_eq_zero_iff.mpr ⟨hc.1.le, hc.2⟩
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 h0 : f 0 = 0 c : R hc : 0 < c ∧ c < 1 h : f (⌊c⌋ • c) = f c * ↑⌊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 h0 : f 0 = 0 c : R hc : 0 < c ∧ c < 1 h : f (⌊c⌋ • c) = f c * ↑⌊f c⌋ h1 : ⌊c⌋ = 0 ⊢ ⌊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 h0 : f 0 = 0 c : R hc : 0 < c ∧ c < 1 h : f (⌊c⌋ • c) = f c * ↑⌊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]
rw [h1, zero_zsmul, h0, zero_eq_mul] 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 h0 : f 0 = 0 c : R hc : 0 < c ∧ c < 1 h : f (⌊c⌋ • c) = f c * ↑⌊f c⌋ h1 : ⌊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 h0 : f 0 = 0 c : R hc : 0 < c ∧ c < 1 h : f c = 0 ∨ ↑⌊f c⌋ = 0 h1 : ⌊c⌋ = 0 ⊢ ⌊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 h0 : f 0 = 0 c : R hc : 0 < c ∧ c < 1 h : f (⌊c⌋ • c) = f c * ↑⌊f c⌋ h1 : ⌊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]
exact h.elim (λ h ↦ h ▸ Int.floor_zero) Int.cast_eq_zero.mp
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 h0 : f 0 = 0 c : R hc : 0 < c ∧ c < 1 h : f c = 0 ∨ ↑⌊f c⌋ = 0 h1 : ⌊c⌋ = 0 ⊢ ⌊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 h0 : f 0 = 0 c : R hc : 0 < c ∧ c < 1 h : f c = 0 ∨ ↑⌊f c⌋ = 0 h1 : ⌊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]
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/IMO2017/C1/C1.lean
IMOSL.IMO2017C1.sum_neg_one_pow_Ico
[37, 1]
[46, 74]
rw [add_zero, Ico_self]
a : ℕ ⊢ ∑ x ∈ Ico a (a + 0), (-1) ^ x = bif Nat.bodd 0 then (-1) ^ a else 0
a : ℕ ⊢ ∑ x ∈ ∅, (-1) ^ x = bif Nat.bodd 0 then (-1) ^ a else 0
Please generate a tactic in lean4 to solve the state. STATE: a : ℕ ⊢ ∑ x ∈ Ico a (a + 0), (-1) ^ x = bif Nat.bodd 0 then (-1) ^ a else 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/C1/C1.lean
IMOSL.IMO2017C1.sum_neg_one_pow_Ico
[37, 1]
[46, 74]
rfl
a : ℕ ⊢ ∑ x ∈ ∅, (-1) ^ x = bif Nat.bodd 0 then (-1) ^ a else 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: a : ℕ ⊢ ∑ x ∈ ∅, (-1) ^ x = bif Nat.bodd 0 then (-1) ^ a else 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/C1/C1.lean
IMOSL.IMO2017C1.sum_neg_one_pow_Ico
[37, 1]
[46, 74]
rw [Nat.Ico_succ_singleton, sum_singleton]
a : ℕ ⊢ ∑ x ∈ Ico a (a + 1), (-1) ^ x = bif Nat.bodd 1 then (-1) ^ a else 0
a : ℕ ⊢ (-1) ^ a = bif Nat.bodd 1 then (-1) ^ a else 0
Please generate a tactic in lean4 to solve the state. STATE: a : ℕ ⊢ ∑ x ∈ Ico a (a + 1), (-1) ^ x = bif Nat.bodd 1 then (-1) ^ a else 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/C1/C1.lean
IMOSL.IMO2017C1.sum_neg_one_pow_Ico
[37, 1]
[46, 74]
rfl
a : ℕ ⊢ (-1) ^ a = bif Nat.bodd 1 then (-1) ^ a else 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: a : ℕ ⊢ (-1) ^ a = bif Nat.bodd 1 then (-1) ^ a else 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/C1/C1.lean
IMOSL.IMO2017C1.sum_neg_one_pow_Ico
[37, 1]
[46, 74]
have h : a ≤ a + n := a.le_add_right n
a n : ℕ ⊢ ∑ x ∈ Ico a (a + (n + 2)), (-1) ^ x = bif (n + 2).bodd then (-1) ^ a else 0
a n : ℕ h : a ≤ a + n ⊢ ∑ x ∈ Ico a (a + (n + 2)), (-1) ^ x = bif (n + 2).bodd then (-1) ^ a else 0
Please generate a tactic in lean4 to solve the state. STATE: a n : ℕ ⊢ ∑ x ∈ Ico a (a + (n + 2)), (-1) ^ x = bif (n + 2).bodd then (-1) ^ a else 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/C1/C1.lean
IMOSL.IMO2017C1.sum_neg_one_pow_Ico
[37, 1]
[46, 74]
rw [← add_assoc, sum_Ico_succ_top (h.trans (a + n).le_succ), pow_succ', neg_one_mul, sum_Ico_succ_top h, sum_neg_one_pow_Ico a n, add_neg_cancel_right, Nat.bodd_add, Nat.bodd_two, Bool.xor_false]
a n : ℕ h : a ≤ a + n ⊢ ∑ x ∈ Ico a (a + (n + 2)), (-1) ^ x = bif (n + 2).bodd then (-1) ^ a else 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: a n : ℕ h : a ≤ a + n ⊢ ∑ x ∈ Ico a (a + (n + 2)), (-1) ^ x = bif (n + 2).bodd then (-1) ^ a else 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/C1/C1.lean
IMOSL.IMO2017C1.latticeRect_weight
[55, 1]
[61, 62]
rw [weight, latticeRect, sum_product]
q : (ℕ × ℕ) × ℕ × ℕ ⊢ weight (latticeRect q) = bif q.2.1.bodd && q.2.2.bodd then (-1) ^ (q.1.1 + q.1.2) else 0
q : (ℕ × ℕ) × ℕ × ℕ ⊢ ∑ x ∈ Ico q.1.1 (q.1.1 + q.2.1), ∑ y ∈ Ico q.1.2 (q.1.2 + q.2.2), (-1) ^ (x, y).1 * (-1) ^ (x, y).2 = bif q.2.1.bodd && q.2.2.bodd then (-1) ^ (q.1.1 + q.1.2) else 0
Please generate a tactic in lean4 to solve the state. STATE: q : (ℕ × ℕ) × ℕ × ℕ ⊢ weight (latticeRect q) = bif q.2.1.bodd && q.2.2.bodd then (-1) ^ (q.1.1 + q.1.2) else 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/C1/C1.lean
IMOSL.IMO2017C1.latticeRect_weight
[55, 1]
[61, 62]
simp_rw [← mul_sum]
q : (ℕ × ℕ) × ℕ × ℕ ⊢ ∑ x ∈ Ico q.1.1 (q.1.1 + q.2.1), ∑ y ∈ Ico q.1.2 (q.1.2 + q.2.2), (-1) ^ (x, y).1 * (-1) ^ (x, y).2 = bif q.2.1.bodd && q.2.2.bodd then (-1) ^ (q.1.1 + q.1.2) else 0
q : (ℕ × ℕ) × ℕ × ℕ ⊢ ∑ x ∈ Ico q.1.1 (q.1.1 + q.2.1), (-1) ^ x * ∑ i ∈ Ico q.1.2 (q.1.2 + q.2.2), (-1) ^ i = bif q.2.1.bodd && q.2.2.bodd then (-1) ^ (q.1.1 + q.1.2) else 0
Please generate a tactic in lean4 to solve the state. STATE: q : (ℕ × ℕ) × ℕ × ℕ ⊢ ∑ x ∈ Ico q.1.1 (q.1.1 + q.2.1), ∑ y ∈ Ico q.1.2 (q.1.2 + q.2.2), (-1) ^ (x, y).1 * (-1) ^ (x, y).2 = bif q.2.1.bodd && q.2.2.bodd then (-1) ^ (q.1.1 + q.1.2) else 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/C1/C1.lean
IMOSL.IMO2017C1.latticeRect_weight
[55, 1]
[61, 62]
rw [← sum_mul, sum_neg_one_pow_Ico, sum_neg_one_pow_Ico]
q : (ℕ × ℕ) × ℕ × ℕ ⊢ ∑ x ∈ Ico q.1.1 (q.1.1 + q.2.1), (-1) ^ x * ∑ i ∈ Ico q.1.2 (q.1.2 + q.2.2), (-1) ^ i = bif q.2.1.bodd && q.2.2.bodd then (-1) ^ (q.1.1 + q.1.2) else 0
q : (ℕ × ℕ) × ℕ × ℕ ⊢ ((bif q.2.1.bodd then (-1) ^ q.1.1 else 0) * bif q.2.2.bodd then (-1) ^ q.1.2 else 0) = bif q.2.1.bodd && q.2.2.bodd then (-1) ^ (q.1.1 + q.1.2) else 0
Please generate a tactic in lean4 to solve the state. STATE: q : (ℕ × ℕ) × ℕ × ℕ ⊢ ∑ x ∈ Ico q.1.1 (q.1.1 + q.2.1), (-1) ^ x * ∑ i ∈ Ico q.1.2 (q.1.2 + q.2.2), (-1) ^ i = bif q.2.1.bodd && q.2.2.bodd then (-1) ^ (q.1.1 + q.1.2) else 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/C1/C1.lean
IMOSL.IMO2017C1.latticeRect_weight
[55, 1]
[61, 62]
cases q.2.1.bodd
q : (ℕ × ℕ) × ℕ × ℕ ⊢ ((bif q.2.1.bodd then (-1) ^ q.1.1 else 0) * bif q.2.2.bodd then (-1) ^ q.1.2 else 0) = bif q.2.1.bodd && q.2.2.bodd then (-1) ^ (q.1.1 + q.1.2) else 0
case false q : (ℕ × ℕ) × ℕ × ℕ ⊢ ((bif false then (-1) ^ q.1.1 else 0) * bif q.2.2.bodd then (-1) ^ q.1.2 else 0) = bif false && q.2.2.bodd then (-1) ^ (q.1.1 + q.1.2) else 0 case true q : (ℕ × ℕ) × ℕ × ℕ ⊢ ((bif true then (-1) ^ q.1.1 else 0) * bif q.2.2.bodd then (-1) ^ q.1.2 else 0) = bif true && q.2.2.bodd then (-1) ^ (q.1.1 + q.1.2) else 0
Please generate a tactic in lean4 to solve the state. STATE: q : (ℕ × ℕ) × ℕ × ℕ ⊢ ((bif q.2.1.bodd then (-1) ^ q.1.1 else 0) * bif q.2.2.bodd then (-1) ^ q.1.2 else 0) = bif q.2.1.bodd && q.2.2.bodd then (-1) ^ (q.1.1 + q.1.2) else 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/C1/C1.lean
IMOSL.IMO2017C1.latticeRect_weight
[55, 1]
[61, 62]
exact zero_mul _
case false q : (ℕ × ℕ) × ℕ × ℕ ⊢ ((bif false then (-1) ^ q.1.1 else 0) * bif q.2.2.bodd then (-1) ^ q.1.2 else 0) = bif false && q.2.2.bodd then (-1) ^ (q.1.1 + q.1.2) else 0 case true q : (ℕ × ℕ) × ℕ × ℕ ⊢ ((bif true then (-1) ^ q.1.1 else 0) * bif q.2.2.bodd then (-1) ^ q.1.2 else 0) = bif true && q.2.2.bodd then (-1) ^ (q.1.1 + q.1.2) else 0
case true q : (ℕ × ℕ) × ℕ × ℕ ⊢ ((bif true then (-1) ^ q.1.1 else 0) * bif q.2.2.bodd then (-1) ^ q.1.2 else 0) = bif true && q.2.2.bodd then (-1) ^ (q.1.1 + q.1.2) else 0
Please generate a tactic in lean4 to solve the state. STATE: case false q : (ℕ × ℕ) × ℕ × ℕ ⊢ ((bif false then (-1) ^ q.1.1 else 0) * bif q.2.2.bodd then (-1) ^ q.1.2 else 0) = bif false && q.2.2.bodd then (-1) ^ (q.1.1 + q.1.2) else 0 case true q : (ℕ × ℕ) × ℕ × ℕ ⊢ ((bif true then (-1) ^ q.1.1 else 0) * bif q.2.2.bodd then (-1) ^ q.1.2 else 0) = bif true && q.2.2.bodd then (-1) ^ (q.1.1 + q.1.2) else 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/C1/C1.lean
IMOSL.IMO2017C1.latticeRect_weight
[55, 1]
[61, 62]
cases q.2.2.bodd
case true q : (ℕ × ℕ) × ℕ × ℕ ⊢ ((bif true then (-1) ^ q.1.1 else 0) * bif q.2.2.bodd then (-1) ^ q.1.2 else 0) = bif true && q.2.2.bodd then (-1) ^ (q.1.1 + q.1.2) else 0
case true.false q : (ℕ × ℕ) × ℕ × ℕ ⊢ ((bif true then (-1) ^ q.1.1 else 0) * bif false then (-1) ^ q.1.2 else 0) = bif true && false then (-1) ^ (q.1.1 + q.1.2) else 0 case true.true q : (ℕ × ℕ) × ℕ × ℕ ⊢ ((bif true then (-1) ^ q.1.1 else 0) * bif true then (-1) ^ q.1.2 else 0) = bif true && true then (-1) ^ (q.1.1 + q.1.2) else 0
Please generate a tactic in lean4 to solve the state. STATE: case true q : (ℕ × ℕ) × ℕ × ℕ ⊢ ((bif true then (-1) ^ q.1.1 else 0) * bif q.2.2.bodd then (-1) ^ q.1.2 else 0) = bif true && q.2.2.bodd then (-1) ^ (q.1.1 + q.1.2) else 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/C1/C1.lean
IMOSL.IMO2017C1.latticeRect_weight
[55, 1]
[61, 62]
exacts [mul_zero _, (pow_add _ _ _).symm]
case true.false q : (ℕ × ℕ) × ℕ × ℕ ⊢ ((bif true then (-1) ^ q.1.1 else 0) * bif false then (-1) ^ q.1.2 else 0) = bif true && false then (-1) ^ (q.1.1 + q.1.2) else 0 case true.true q : (ℕ × ℕ) × ℕ × ℕ ⊢ ((bif true then (-1) ^ q.1.1 else 0) * bif true then (-1) ^ q.1.2 else 0) = bif true && true then (-1) ^ (q.1.1 + q.1.2) else 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: case true.false q : (ℕ × ℕ) × ℕ × ℕ ⊢ ((bif true then (-1) ^ q.1.1 else 0) * bif false then (-1) ^ q.1.2 else 0) = bif true && false then (-1) ^ (q.1.1 + q.1.2) else 0 case true.true q : (ℕ × ℕ) × ℕ × ℕ ⊢ ((bif true then (-1) ^ q.1.1 else 0) * bif true then (-1) ^ q.1.2 else 0) = bif true && true then (-1) ^ (q.1.1 + q.1.2) else 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/C1/C1.lean
IMOSL.IMO2017C1.latticeRect_weight_pos_imp
[63, 1]
[72, 69]
rw [latticeRect_weight, ← Bool.and_eq_true]
q : (ℕ × ℕ) × ℕ × ℕ ⊢ 0 < weight (latticeRect q) → (q.2.1.bodd = true ∧ q.2.2.bodd = true) ∧ (q.1.1 + q.1.2).bodd = false
q : (ℕ × ℕ) × ℕ × ℕ ⊢ (0 < bif q.2.1.bodd && q.2.2.bodd then (-1) ^ (q.1.1 + q.1.2) else 0) → (q.2.1.bodd && q.2.2.bodd) = true ∧ (q.1.1 + q.1.2).bodd = false
Please generate a tactic in lean4 to solve the state. STATE: q : (ℕ × ℕ) × ℕ × ℕ ⊢ 0 < weight (latticeRect q) → (q.2.1.bodd = true ∧ q.2.2.bodd = true) ∧ (q.1.1 + q.1.2).bodd = false TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/C1/C1.lean
IMOSL.IMO2017C1.latticeRect_weight_pos_imp
[63, 1]
[72, 69]
cases q.2.1.bodd && q.2.2.bodd
q : (ℕ × ℕ) × ℕ × ℕ ⊢ (0 < bif q.2.1.bodd && q.2.2.bodd then (-1) ^ (q.1.1 + q.1.2) else 0) → (q.2.1.bodd && q.2.2.bodd) = true ∧ (q.1.1 + q.1.2).bodd = false
case false q : (ℕ × ℕ) × ℕ × ℕ ⊢ (0 < bif false then (-1) ^ (q.1.1 + q.1.2) else 0) → false = true ∧ (q.1.1 + q.1.2).bodd = false case true q : (ℕ × ℕ) × ℕ × ℕ ⊢ (0 < bif true then (-1) ^ (q.1.1 + q.1.2) else 0) → true = true ∧ (q.1.1 + q.1.2).bodd = false
Please generate a tactic in lean4 to solve the state. STATE: q : (ℕ × ℕ) × ℕ × ℕ ⊢ (0 < bif q.2.1.bodd && q.2.2.bodd then (-1) ^ (q.1.1 + q.1.2) else 0) → (q.2.1.bodd && q.2.2.bodd) = true ∧ (q.1.1 + q.1.2).bodd = false TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/C1/C1.lean
IMOSL.IMO2017C1.latticeRect_weight_pos_imp
[63, 1]
[72, 69]
exact λ h ↦ absurd h (le_refl 0).not_lt
case false q : (ℕ × ℕ) × ℕ × ℕ ⊢ (0 < bif false then (-1) ^ (q.1.1 + q.1.2) else 0) → false = true ∧ (q.1.1 + q.1.2).bodd = false
no goals
Please generate a tactic in lean4 to solve the state. STATE: case false q : (ℕ × ℕ) × ℕ × ℕ ⊢ (0 < bif false then (-1) ^ (q.1.1 + q.1.2) else 0) → false = true ∧ (q.1.1 + q.1.2).bodd = false TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/C1/C1.lean
IMOSL.IMO2017C1.latticeRect_weight_pos_imp
[63, 1]
[72, 69]
rw [neg_one_pow_eq_pow_mod_two (R := ℤ), Nat.mod_two_of_bodd]
case true q : (ℕ × ℕ) × ℕ × ℕ ⊢ (0 < bif true then (-1) ^ (q.1.1 + q.1.2) else 0) → true = true ∧ (q.1.1 + q.1.2).bodd = false
case true q : (ℕ × ℕ) × ℕ × ℕ ⊢ (0 < bif true then (-1) ^ bif (q.1.1 + q.1.2).bodd then 1 else 0 else 0) → true = true ∧ (q.1.1 + q.1.2).bodd = false
Please generate a tactic in lean4 to solve the state. STATE: case true q : (ℕ × ℕ) × ℕ × ℕ ⊢ (0 < bif true then (-1) ^ (q.1.1 + q.1.2) else 0) → true = true ∧ (q.1.1 + q.1.2).bodd = false TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/C1/C1.lean
IMOSL.IMO2017C1.latticeRect_weight_pos_imp
[63, 1]
[72, 69]
cases (q.1.1 + q.1.2).bodd
case true q : (ℕ × ℕ) × ℕ × ℕ ⊢ (0 < bif true then (-1) ^ bif (q.1.1 + q.1.2).bodd then 1 else 0 else 0) → true = true ∧ (q.1.1 + q.1.2).bodd = false
case true.false q : (ℕ × ℕ) × ℕ × ℕ ⊢ (0 < bif true then (-1) ^ bif false then 1 else 0 else 0) → true = true ∧ false = false case true.true q : (ℕ × ℕ) × ℕ × ℕ ⊢ (0 < bif true then (-1) ^ bif true then 1 else 0 else 0) → true = true ∧ true = false
Please generate a tactic in lean4 to solve the state. STATE: case true q : (ℕ × ℕ) × ℕ × ℕ ⊢ (0 < bif true then (-1) ^ bif (q.1.1 + q.1.2).bodd then 1 else 0 else 0) → true = true ∧ (q.1.1 + q.1.2).bodd = false TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/C1/C1.lean
IMOSL.IMO2017C1.latticeRect_weight_pos_imp
[63, 1]
[72, 69]
exacts [λ _ ↦ ⟨rfl, rfl⟩, λ h ↦ absurd neg_one_lt_zero h.not_lt]
case true.false q : (ℕ × ℕ) × ℕ × ℕ ⊢ (0 < bif true then (-1) ^ bif false then 1 else 0 else 0) → true = true ∧ false = false case true.true q : (ℕ × ℕ) × ℕ × ℕ ⊢ (0 < bif true then (-1) ^ bif true then 1 else 0 else 0) → true = true ∧ true = false
no goals
Please generate a tactic in lean4 to solve the state. STATE: case true.false q : (ℕ × ℕ) × ℕ × ℕ ⊢ (0 < bif true then (-1) ^ bif false then 1 else 0 else 0) → true = true ∧ false = false case true.true q : (ℕ × ℕ) × ℕ × ℕ ⊢ (0 < bif true then (-1) ^ bif true then 1 else 0 else 0) → true = true ∧ true = false TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/C1/C1.lean
IMOSL.IMO2017C1.final_solution
[77, 1]
[90, 24]
suffices ∃ i ∈ I, 0 < weight (latticeRect (Q i)) from this.elim λ i h3 ↦ ⟨i, h3.1, latticeRect_weight_pos_imp h3.2⟩
ι : Type u_1 Q : ι → (ℕ × ℕ) × ℕ × ℕ m n : ℕ I : Finset ι h : (↑I).PairwiseDisjoint (latticeRect ∘ Q) h0 : m.bodd = true ∧ n.bodd = true h1 : latticeRect ((0, 0), m, n) = I.disjiUnion (latticeRect ∘ Q) h ⊢ ∃ i ∈ I, ((Q i).2.1.bodd = true ∧ (Q i).2.2.bodd = true) ∧ ((Q i).1.1 + (Q i).1.2).bodd = false
ι : Type u_1 Q : ι → (ℕ × ℕ) × ℕ × ℕ m n : ℕ I : Finset ι h : (↑I).PairwiseDisjoint (latticeRect ∘ Q) h0 : m.bodd = true ∧ n.bodd = true h1 : latticeRect ((0, 0), m, n) = I.disjiUnion (latticeRect ∘ Q) h ⊢ ∃ i ∈ I, 0 < weight (latticeRect (Q i))
Please generate a tactic in lean4 to solve the state. STATE: ι : Type u_1 Q : ι → (ℕ × ℕ) × ℕ × ℕ m n : ℕ I : Finset ι h : (↑I).PairwiseDisjoint (latticeRect ∘ Q) h0 : m.bodd = true ∧ n.bodd = true h1 : latticeRect ((0, 0), m, n) = I.disjiUnion (latticeRect ∘ Q) h ⊢ ∃ i ∈ I, ((Q i).2.1.bodd = true ∧ (Q i).2.2.bodd = true) ∧ ((Q i).1.1 + (Q i).1.2).bodd = false TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/C1/C1.lean
IMOSL.IMO2017C1.final_solution
[77, 1]
[90, 24]
apply_fun weight at h1
ι : Type u_1 Q : ι → (ℕ × ℕ) × ℕ × ℕ m n : ℕ I : Finset ι h : (↑I).PairwiseDisjoint (latticeRect ∘ Q) h0 : m.bodd = true ∧ n.bodd = true h1 : latticeRect ((0, 0), m, n) = I.disjiUnion (latticeRect ∘ Q) h ⊢ ∃ i ∈ I, 0 < weight (latticeRect (Q i))
ι : Type u_1 Q : ι → (ℕ × ℕ) × ℕ × ℕ m n : ℕ I : Finset ι h : (↑I).PairwiseDisjoint (latticeRect ∘ Q) h0 : m.bodd = true ∧ n.bodd = true h1 : weight (latticeRect ((0, 0), m, n)) = weight (I.disjiUnion (latticeRect ∘ Q) h) ⊢ ∃ i ∈ I, 0 < weight (latticeRect (Q i))
Please generate a tactic in lean4 to solve the state. STATE: ι : Type u_1 Q : ι → (ℕ × ℕ) × ℕ × ℕ m n : ℕ I : Finset ι h : (↑I).PairwiseDisjoint (latticeRect ∘ Q) h0 : m.bodd = true ∧ n.bodd = true h1 : latticeRect ((0, 0), m, n) = I.disjiUnion (latticeRect ∘ Q) h ⊢ ∃ i ∈ I, 0 < weight (latticeRect (Q i)) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/C1/C1.lean
IMOSL.IMO2017C1.final_solution
[77, 1]
[90, 24]
rw [latticeRect_weight] at h1
ι : Type u_1 Q : ι → (ℕ × ℕ) × ℕ × ℕ m n : ℕ I : Finset ι h : (↑I).PairwiseDisjoint (latticeRect ∘ Q) h0 : m.bodd = true ∧ n.bodd = true h1 : weight (latticeRect ((0, 0), m, n)) = weight (I.disjiUnion (latticeRect ∘ Q) h) ⊢ ∃ i ∈ I, 0 < weight (latticeRect (Q i))
ι : Type u_1 Q : ι → (ℕ × ℕ) × ℕ × ℕ m n : ℕ I : Finset ι h : (↑I).PairwiseDisjoint (latticeRect ∘ Q) h0 : m.bodd = true ∧ n.bodd = true h1 : (bif ((0, 0), m, n).2.1.bodd && ((0, 0), m, n).2.2.bodd then (-1) ^ (((0, 0), m, n).1.1 + ((0, 0), m, n).1.2) else 0) = weight (I.disjiUnion (latticeRect ∘ Q) h) ⊢ ∃ i ∈ I, 0 < weight (latticeRect (Q i))
Please generate a tactic in lean4 to solve the state. STATE: ι : Type u_1 Q : ι → (ℕ × ℕ) × ℕ × ℕ m n : ℕ I : Finset ι h : (↑I).PairwiseDisjoint (latticeRect ∘ Q) h0 : m.bodd = true ∧ n.bodd = true h1 : weight (latticeRect ((0, 0), m, n)) = weight (I.disjiUnion (latticeRect ∘ Q) h) ⊢ ∃ i ∈ I, 0 < weight (latticeRect (Q i)) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/C1/C1.lean
IMOSL.IMO2017C1.final_solution
[77, 1]
[90, 24]
simp only at h1
ι : Type u_1 Q : ι → (ℕ × ℕ) × ℕ × ℕ m n : ℕ I : Finset ι h : (↑I).PairwiseDisjoint (latticeRect ∘ Q) h0 : m.bodd = true ∧ n.bodd = true h1 : (bif ((0, 0), m, n).2.1.bodd && ((0, 0), m, n).2.2.bodd then (-1) ^ (((0, 0), m, n).1.1 + ((0, 0), m, n).1.2) else 0) = weight (I.disjiUnion (latticeRect ∘ Q) h) ⊢ ∃ i ∈ I, 0 < weight (latticeRect (Q i))
ι : Type u_1 Q : ι → (ℕ × ℕ) × ℕ × ℕ m n : ℕ I : Finset ι h : (↑I).PairwiseDisjoint (latticeRect ∘ Q) h0 : m.bodd = true ∧ n.bodd = true h1 : (bif m.bodd && n.bodd then (-1) ^ (0 + 0) else 0) = weight (I.disjiUnion (latticeRect ∘ Q) h) ⊢ ∃ i ∈ I, 0 < weight (latticeRect (Q i))
Please generate a tactic in lean4 to solve the state. STATE: ι : Type u_1 Q : ι → (ℕ × ℕ) × ℕ × ℕ m n : ℕ I : Finset ι h : (↑I).PairwiseDisjoint (latticeRect ∘ Q) h0 : m.bodd = true ∧ n.bodd = true h1 : (bif ((0, 0), m, n).2.1.bodd && ((0, 0), m, n).2.2.bodd then (-1) ^ (((0, 0), m, n).1.1 + ((0, 0), m, n).1.2) else 0) = weight (I.disjiUnion (latticeRect ∘ Q) h) ⊢ ∃ i ∈ I, 0 < weight (latticeRect (Q i)) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/C1/C1.lean
IMOSL.IMO2017C1.final_solution
[77, 1]
[90, 24]
rw [disjiUnion_weight_eq, Function.comp, h0.1, h0.2, add_zero] at h1
ι : Type u_1 Q : ι → (ℕ × ℕ) × ℕ × ℕ m n : ℕ I : Finset ι h : (↑I).PairwiseDisjoint (latticeRect ∘ Q) h0 : m.bodd = true ∧ n.bodd = true h1 : (bif m.bodd && n.bodd then (-1) ^ (0 + 0) else 0) = weight (I.disjiUnion (latticeRect ∘ Q) h) ⊢ ∃ i ∈ I, 0 < weight (latticeRect (Q i))
ι : Type u_1 Q : ι → (ℕ × ℕ) × ℕ × ℕ m n : ℕ I : Finset ι h : (↑I).PairwiseDisjoint (latticeRect ∘ Q) h0 : m.bodd = true ∧ n.bodd = true h1 : (bif true && true then (-1) ^ 0 else 0) = ∑ i ∈ I, weight ((fun x => latticeRect (Q x)) i) ⊢ ∃ i ∈ I, 0 < weight (latticeRect (Q i))
Please generate a tactic in lean4 to solve the state. STATE: ι : Type u_1 Q : ι → (ℕ × ℕ) × ℕ × ℕ m n : ℕ I : Finset ι h : (↑I).PairwiseDisjoint (latticeRect ∘ Q) h0 : m.bodd = true ∧ n.bodd = true h1 : (bif m.bodd && n.bodd then (-1) ^ (0 + 0) else 0) = weight (I.disjiUnion (latticeRect ∘ Q) h) ⊢ ∃ i ∈ I, 0 < weight (latticeRect (Q i)) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/C1/C1.lean
IMOSL.IMO2017C1.final_solution
[77, 1]
[90, 24]
apply exists_lt_of_sum_lt
ι : Type u_1 Q : ι → (ℕ × ℕ) × ℕ × ℕ m n : ℕ I : Finset ι h : (↑I).PairwiseDisjoint (latticeRect ∘ Q) h0 : m.bodd = true ∧ n.bodd = true h1 : (bif true && true then (-1) ^ 0 else 0) = ∑ i ∈ I, weight ((fun x => latticeRect (Q x)) i) ⊢ ∃ i ∈ I, 0 < weight (latticeRect (Q i))
case Hlt ι : Type u_1 Q : ι → (ℕ × ℕ) × ℕ × ℕ m n : ℕ I : Finset ι h : (↑I).PairwiseDisjoint (latticeRect ∘ Q) h0 : m.bodd = true ∧ n.bodd = true h1 : (bif true && true then (-1) ^ 0 else 0) = ∑ i ∈ I, weight ((fun x => latticeRect (Q x)) i) ⊢ ∑ i ∈ I, 0 < ∑ i ∈ I, weight (latticeRect (Q i))
Please generate a tactic in lean4 to solve the state. STATE: ι : Type u_1 Q : ι → (ℕ × ℕ) × ℕ × ℕ m n : ℕ I : Finset ι h : (↑I).PairwiseDisjoint (latticeRect ∘ Q) h0 : m.bodd = true ∧ n.bodd = true h1 : (bif true && true then (-1) ^ 0 else 0) = ∑ i ∈ I, weight ((fun x => latticeRect (Q x)) i) ⊢ ∃ i ∈ I, 0 < weight (latticeRect (Q i)) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/C1/C1.lean
IMOSL.IMO2017C1.final_solution
[77, 1]
[90, 24]
rw [sum_const_zero, ← h1]
case Hlt ι : Type u_1 Q : ι → (ℕ × ℕ) × ℕ × ℕ m n : ℕ I : Finset ι h : (↑I).PairwiseDisjoint (latticeRect ∘ Q) h0 : m.bodd = true ∧ n.bodd = true h1 : (bif true && true then (-1) ^ 0 else 0) = ∑ i ∈ I, weight ((fun x => latticeRect (Q x)) i) ⊢ ∑ i ∈ I, 0 < ∑ i ∈ I, weight (latticeRect (Q i))
case Hlt ι : Type u_1 Q : ι → (ℕ × ℕ) × ℕ × ℕ m n : ℕ I : Finset ι h : (↑I).PairwiseDisjoint (latticeRect ∘ Q) h0 : m.bodd = true ∧ n.bodd = true h1 : (bif true && true then (-1) ^ 0 else 0) = ∑ i ∈ I, weight ((fun x => latticeRect (Q x)) i) ⊢ 0 < bif true && true then (-1) ^ 0 else 0
Please generate a tactic in lean4 to solve the state. STATE: case Hlt ι : Type u_1 Q : ι → (ℕ × ℕ) × ℕ × ℕ m n : ℕ I : Finset ι h : (↑I).PairwiseDisjoint (latticeRect ∘ Q) h0 : m.bodd = true ∧ n.bodd = true h1 : (bif true && true then (-1) ^ 0 else 0) = ∑ i ∈ I, weight ((fun x => latticeRect (Q x)) i) ⊢ ∑ i ∈ I, 0 < ∑ i ∈ I, weight (latticeRect (Q i)) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/C1/C1.lean
IMOSL.IMO2017C1.final_solution
[77, 1]
[90, 24]
exact Int.zero_lt_one
case Hlt ι : Type u_1 Q : ι → (ℕ × ℕ) × ℕ × ℕ m n : ℕ I : Finset ι h : (↑I).PairwiseDisjoint (latticeRect ∘ Q) h0 : m.bodd = true ∧ n.bodd = true h1 : (bif true && true then (-1) ^ 0 else 0) = ∑ i ∈ I, weight ((fun x => latticeRect (Q x)) i) ⊢ 0 < bif true && true then (-1) ^ 0 else 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: case Hlt ι : Type u_1 Q : ι → (ℕ × ℕ) × ℕ × ℕ m n : ℕ I : Finset ι h : (↑I).PairwiseDisjoint (latticeRect ∘ Q) h0 : m.bodd = true ∧ n.bodd = true h1 : (bif true && true then (-1) ^ 0 else 0) = ∑ i ∈ I, weight ((fun x => latticeRect (Q x)) i) ⊢ 0 < bif true && true then (-1) ^ 0 else 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2015/N1/N1.lean
IMOSL.IMO2015N1.main_claim
[28, 1]
[41, 44]
by_cases h1 : c = 0
c m : ℤ h : 2 * c ∣ m - 3 h0 : 2 * c ∣ f m - 3 ⊢ 2 * (2 * c) ∣ m - 3
case pos c m : ℤ h : 2 * c ∣ m - 3 h0 : 2 * c ∣ f m - 3 h1 : c = 0 ⊢ 2 * (2 * c) ∣ m - 3 case neg c m : ℤ h : 2 * c ∣ m - 3 h0 : 2 * c ∣ f m - 3 h1 : ¬c = 0 ⊢ 2 * (2 * c) ∣ m - 3
Please generate a tactic in lean4 to solve the state. STATE: c m : ℤ h : 2 * c ∣ m - 3 h0 : 2 * c ∣ f m - 3 ⊢ 2 * (2 * c) ∣ m - 3 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2015/N1/N1.lean
IMOSL.IMO2015N1.main_claim
[28, 1]
[41, 44]
rwa [h1, mul_zero, ← h1]
case pos c m : ℤ h : 2 * c ∣ m - 3 h0 : 2 * c ∣ f m - 3 h1 : c = 0 ⊢ 2 * (2 * c) ∣ m - 3
no goals
Please generate a tactic in lean4 to solve the state. STATE: case pos c m : ℤ h : 2 * c ∣ m - 3 h0 : 2 * c ∣ f m - 3 h1 : c = 0 ⊢ 2 * (2 * c) ∣ m - 3 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2015/N1/N1.lean
IMOSL.IMO2015N1.main_claim
[28, 1]
[41, 44]
rcases h with ⟨d, h⟩
case neg c m : ℤ h : 2 * c ∣ m - 3 h0 : 2 * c ∣ f m - 3 h1 : ¬c = 0 ⊢ 2 * (2 * c) ∣ m - 3
case neg.intro c m : ℤ h0 : 2 * c ∣ f m - 3 h1 : ¬c = 0 d : ℤ h : m - 3 = 2 * c * d ⊢ 2 * (2 * c) ∣ m - 3
Please generate a tactic in lean4 to solve the state. STATE: case neg c m : ℤ h : 2 * c ∣ m - 3 h0 : 2 * c ∣ f m - 3 h1 : ¬c = 0 ⊢ 2 * (2 * c) ∣ m - 3 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2015/N1/N1.lean
IMOSL.IMO2015N1.main_claim
[28, 1]
[41, 44]
rw [h, mul_comm]
case neg.intro c m : ℤ h0 : 2 * c ∣ f m - 3 h1 : ¬c = 0 d : ℤ h : m - 3 = 2 * c * d ⊢ 2 * (2 * c) ∣ m - 3
case neg.intro c m : ℤ h0 : 2 * c ∣ f m - 3 h1 : ¬c = 0 d : ℤ h : m - 3 = 2 * c * d ⊢ 2 * c * 2 ∣ 2 * c * d
Please generate a tactic in lean4 to solve the state. STATE: case neg.intro c m : ℤ h0 : 2 * c ∣ f m - 3 h1 : ¬c = 0 d : ℤ h : m - 3 = 2 * c * d ⊢ 2 * (2 * c) ∣ m - 3 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2015/N1/N1.lean
IMOSL.IMO2015N1.main_claim
[28, 1]
[41, 44]
apply mul_dvd_mul_left
case neg.intro c m : ℤ h0 : 2 * c ∣ f m - 3 h1 : ¬c = 0 d : ℤ h : m - 3 = 2 * c * d ⊢ 2 * c * 2 ∣ 2 * c * d
case neg.intro.h c m : ℤ h0 : 2 * c ∣ f m - 3 h1 : ¬c = 0 d : ℤ h : m - 3 = 2 * c * d ⊢ 2 ∣ d
Please generate a tactic in lean4 to solve the state. STATE: case neg.intro c m : ℤ h0 : 2 * c ∣ f m - 3 h1 : ¬c = 0 d : ℤ h : m - 3 = 2 * c * d ⊢ 2 * c * 2 ∣ 2 * c * d TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2015/N1/N1.lean
IMOSL.IMO2015N1.main_claim
[28, 1]
[41, 44]
have X : (2 : ℤ) ≠ 0 := two_ne_zero
case neg.intro.h c m : ℤ h0 : 2 * c ∣ f m - 3 h1 : ¬c = 0 d : ℤ h : m - 3 = 2 * c * d ⊢ 2 ∣ d
case neg.intro.h c m : ℤ h0 : 2 * c ∣ f m - 3 h1 : ¬c = 0 d : ℤ h : m - 3 = 2 * c * d X : 2 ≠ 0 ⊢ 2 ∣ d
Please generate a tactic in lean4 to solve the state. STATE: case neg.intro.h c m : ℤ h0 : 2 * c ∣ f m - 3 h1 : ¬c = 0 d : ℤ h : m - 3 = 2 * c * d ⊢ 2 ∣ d TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2015/N1/N1.lean
IMOSL.IMO2015N1.main_claim
[28, 1]
[41, 44]
have X0 : (3 / 2 : ℤ) = 1 := rfl
case neg.intro.h c m : ℤ h0 : 2 * c ∣ f m - 3 h1 : ¬c = 0 d : ℤ h : m - 3 = 2 * c * d X : 2 ≠ 0 ⊢ 2 ∣ d
case neg.intro.h c m : ℤ h0 : 2 * c ∣ f m - 3 h1 : ¬c = 0 d : ℤ h : m - 3 = 2 * c * d X : 2 ≠ 0 X0 : 3 / 2 = 1 ⊢ 2 ∣ d
Please generate a tactic in lean4 to solve the state. STATE: case neg.intro.h c m : ℤ h0 : 2 * c ∣ f m - 3 h1 : ¬c = 0 d : ℤ h : m - 3 = 2 * c * d X : 2 ≠ 0 ⊢ 2 ∣ d TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2015/N1/N1.lean
IMOSL.IMO2015N1.main_claim
[28, 1]
[41, 44]
rw [f, eq_add_of_sub_eq h, add_mul, add_sub_assoc, mul_assoc, ← mul_sub_one, dvd_add_right ⟨_, rfl⟩, mul_assoc, add_comm, Int.add_mul_ediv_left _ _ X, X0, add_sub_cancel_left, ← two_add_one_eq_three, add_one_mul (α := ℤ), ← mul_assoc, dvd_add_right ⟨_, rfl⟩, mul_comm] at h0
case neg.intro.h c m : ℤ h0 : 2 * c ∣ f m - 3 h1 : ¬c = 0 d : ℤ h : m - 3 = 2 * c * d X : 2 ≠ 0 X0 : 3 / 2 = 1 ⊢ 2 ∣ d
case neg.intro.h c m : ℤ h1 : ¬c = 0 d : ℤ h0 : c * 2 ∣ c * d h : m - 3 = 2 * c * d X : 2 ≠ 0 X0 : 3 / 2 = 1 ⊢ 2 ∣ d
Please generate a tactic in lean4 to solve the state. STATE: case neg.intro.h c m : ℤ h0 : 2 * c ∣ f m - 3 h1 : ¬c = 0 d : ℤ h : m - 3 = 2 * c * d X : 2 ≠ 0 X0 : 3 / 2 = 1 ⊢ 2 ∣ d TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2015/N1/N1.lean
IMOSL.IMO2015N1.main_claim
[28, 1]
[41, 44]
exact Int.dvd_of_mul_dvd_mul_left h1 h0
case neg.intro.h c m : ℤ h1 : ¬c = 0 d : ℤ h0 : c * 2 ∣ c * d h : m - 3 = 2 * c * d X : 2 ≠ 0 X0 : 3 / 2 = 1 ⊢ 2 ∣ d
no goals
Please generate a tactic in lean4 to solve the state. STATE: case neg.intro.h c m : ℤ h1 : ¬c = 0 d : ℤ h0 : c * 2 ∣ c * d h : m - 3 = 2 * c * d X : 2 ≠ 0 X0 : 3 / 2 = 1 ⊢ 2 ∣ d TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2015/N1/N1.lean
IMOSL.IMO2015N1.final_solution
[44, 1]
[66, 66]
rw [iff_not_comm, not_exists]
M : ℤ ⊢ (∃ k, 2 ∣ f^[k] M) ↔ M ≠ 3
M : ℤ ⊢ M = 3 ↔ ∀ (x : ℕ), ¬2 ∣ f^[x] M
Please generate a tactic in lean4 to solve the state. STATE: M : ℤ ⊢ (∃ k, 2 ∣ f^[k] M) ↔ M ≠ 3 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2015/N1/N1.lean
IMOSL.IMO2015N1.final_solution
[44, 1]
[66, 66]
refine ⟨λ h n ↦ ?_, λ h ↦ ?_⟩
M : ℤ ⊢ M = 3 ↔ ∀ (x : ℕ), ¬2 ∣ f^[x] M
case refine_1 M : ℤ h : M = 3 n : ℕ ⊢ ¬2 ∣ f^[n] M case refine_2 M : ℤ h : ∀ (x : ℕ), ¬2 ∣ f^[x] M ⊢ M = 3
Please generate a tactic in lean4 to solve the state. STATE: M : ℤ ⊢ M = 3 ↔ ∀ (x : ℕ), ¬2 ∣ f^[x] M TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2015/N1/N1.lean
IMOSL.IMO2015N1.final_solution
[44, 1]
[66, 66]
suffices h0 : ∀ n k, 2 ^ (n + 1) ∣ f^[k] M - 3 by let K := (M - 3).natAbs refine eq_of_sub_eq_zero <| Int.eq_zero_of_abs_lt_dvd (h0 K 0) <| ?_ rw [← Int.natCast_natAbs, ← Nat.cast_ofNat (n := 2), ← Int.natCast_pow] exact Int.ofNat_lt.mpr (K.lt_succ_self.trans K.succ.lt_two_pow)
case refine_2 M : ℤ h : ∀ (x : ℕ), ¬2 ∣ f^[x] M ⊢ M = 3
case refine_2 M : ℤ h : ∀ (x : ℕ), ¬2 ∣ f^[x] M ⊢ ∀ (n k : ℕ), 2 ^ (n + 1) ∣ f^[k] M - 3
Please generate a tactic in lean4 to solve the state. STATE: case refine_2 M : ℤ h : ∀ (x : ℕ), ¬2 ∣ f^[x] M ⊢ M = 3 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2015/N1/N1.lean
IMOSL.IMO2015N1.final_solution
[44, 1]
[66, 66]
refine Nat.rec (λ k ↦ ?_) (λ n h0 k ↦ ?_)
case refine_2 M : ℤ h : ∀ (x : ℕ), ¬2 ∣ f^[x] M ⊢ ∀ (n k : ℕ), 2 ^ (n + 1) ∣ f^[k] M - 3
case refine_2.refine_1 M : ℤ h : ∀ (x : ℕ), ¬2 ∣ f^[x] M k : ℕ ⊢ 2 ^ (Nat.zero + 1) ∣ f^[k] M - 3 case refine_2.refine_2 M : ℤ h : ∀ (x : ℕ), ¬2 ∣ f^[x] M n : ℕ h0 : ∀ (k : ℕ), 2 ^ (n + 1) ∣ f^[k] M - 3 k : ℕ ⊢ 2 ^ (n.succ + 1) ∣ f^[k] M - 3
Please generate a tactic in lean4 to solve the state. STATE: case refine_2 M : ℤ h : ∀ (x : ℕ), ¬2 ∣ f^[x] M ⊢ ∀ (n k : ℕ), 2 ^ (n + 1) ∣ f^[k] M - 3 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2015/N1/N1.lean
IMOSL.IMO2015N1.final_solution
[44, 1]
[66, 66]
have h0 : f 3 = 3 := rfl
case refine_1 M : ℤ h : M = 3 n : ℕ ⊢ ¬2 ∣ f^[n] M
case refine_1 M : ℤ h : M = 3 n : ℕ h0 : f 3 = 3 ⊢ ¬2 ∣ f^[n] M
Please generate a tactic in lean4 to solve the state. STATE: case refine_1 M : ℤ h : M = 3 n : ℕ ⊢ ¬2 ∣ f^[n] M TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2015/N1/N1.lean
IMOSL.IMO2015N1.final_solution
[44, 1]
[66, 66]
rw [h, Function.iterate_fixed h0, ← two_add_one_eq_three]
case refine_1 M : ℤ h : M = 3 n : ℕ h0 : f 3 = 3 ⊢ ¬2 ∣ f^[n] M
case refine_1 M : ℤ h : M = 3 n : ℕ h0 : f 3 = 3 ⊢ ¬2 ∣ 2 + 1
Please generate a tactic in lean4 to solve the state. STATE: case refine_1 M : ℤ h : M = 3 n : ℕ h0 : f 3 = 3 ⊢ ¬2 ∣ f^[n] M TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2015/N1/N1.lean
IMOSL.IMO2015N1.final_solution
[44, 1]
[66, 66]
exact Int.two_not_dvd_two_mul_add_one 1
case refine_1 M : ℤ h : M = 3 n : ℕ h0 : f 3 = 3 ⊢ ¬2 ∣ 2 + 1
no goals
Please generate a tactic in lean4 to solve the state. STATE: case refine_1 M : ℤ h : M = 3 n : ℕ h0 : f 3 = 3 ⊢ ¬2 ∣ 2 + 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2015/N1/N1.lean
IMOSL.IMO2015N1.final_solution
[44, 1]
[66, 66]
let K := (M - 3).natAbs
M : ℤ h : ∀ (x : ℕ), ¬2 ∣ f^[x] M h0 : ∀ (n k : ℕ), 2 ^ (n + 1) ∣ f^[k] M - 3 ⊢ M = 3
M : ℤ h : ∀ (x : ℕ), ¬2 ∣ f^[x] M h0 : ∀ (n k : ℕ), 2 ^ (n + 1) ∣ f^[k] M - 3 K : ℕ := (M - 3).natAbs ⊢ M = 3
Please generate a tactic in lean4 to solve the state. STATE: M : ℤ h : ∀ (x : ℕ), ¬2 ∣ f^[x] M h0 : ∀ (n k : ℕ), 2 ^ (n + 1) ∣ f^[k] M - 3 ⊢ M = 3 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2015/N1/N1.lean
IMOSL.IMO2015N1.final_solution
[44, 1]
[66, 66]
refine eq_of_sub_eq_zero <| Int.eq_zero_of_abs_lt_dvd (h0 K 0) <| ?_
M : ℤ h : ∀ (x : ℕ), ¬2 ∣ f^[x] M h0 : ∀ (n k : ℕ), 2 ^ (n + 1) ∣ f^[k] M - 3 K : ℕ := (M - 3).natAbs ⊢ M = 3
M : ℤ h : ∀ (x : ℕ), ¬2 ∣ f^[x] M h0 : ∀ (n k : ℕ), 2 ^ (n + 1) ∣ f^[k] M - 3 K : ℕ := (M - 3).natAbs ⊢ |M - 3| < 2 ^ (K + 1)
Please generate a tactic in lean4 to solve the state. STATE: M : ℤ h : ∀ (x : ℕ), ¬2 ∣ f^[x] M h0 : ∀ (n k : ℕ), 2 ^ (n + 1) ∣ f^[k] M - 3 K : ℕ := (M - 3).natAbs ⊢ M = 3 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2015/N1/N1.lean
IMOSL.IMO2015N1.final_solution
[44, 1]
[66, 66]
rw [← Int.natCast_natAbs, ← Nat.cast_ofNat (n := 2), ← Int.natCast_pow]
M : ℤ h : ∀ (x : ℕ), ¬2 ∣ f^[x] M h0 : ∀ (n k : ℕ), 2 ^ (n + 1) ∣ f^[k] M - 3 K : ℕ := (M - 3).natAbs ⊢ |M - 3| < 2 ^ (K + 1)
M : ℤ h : ∀ (x : ℕ), ¬2 ∣ f^[x] M h0 : ∀ (n k : ℕ), 2 ^ (n + 1) ∣ f^[k] M - 3 K : ℕ := (M - 3).natAbs ⊢ ↑(M - 3).natAbs < ↑(OfNat.ofNat 2 ^ (K + 1))
Please generate a tactic in lean4 to solve the state. STATE: M : ℤ h : ∀ (x : ℕ), ¬2 ∣ f^[x] M h0 : ∀ (n k : ℕ), 2 ^ (n + 1) ∣ f^[k] M - 3 K : ℕ := (M - 3).natAbs ⊢ |M - 3| < 2 ^ (K + 1) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2015/N1/N1.lean
IMOSL.IMO2015N1.final_solution
[44, 1]
[66, 66]
exact Int.ofNat_lt.mpr (K.lt_succ_self.trans K.succ.lt_two_pow)
M : ℤ h : ∀ (x : ℕ), ¬2 ∣ f^[x] M h0 : ∀ (n k : ℕ), 2 ^ (n + 1) ∣ f^[k] M - 3 K : ℕ := (M - 3).natAbs ⊢ ↑(M - 3).natAbs < ↑(OfNat.ofNat 2 ^ (K + 1))
no goals
Please generate a tactic in lean4 to solve the state. STATE: M : ℤ h : ∀ (x : ℕ), ¬2 ∣ f^[x] M h0 : ∀ (n k : ℕ), 2 ^ (n + 1) ∣ f^[k] M - 3 K : ℕ := (M - 3).natAbs ⊢ ↑(M - 3).natAbs < ↑(OfNat.ofNat 2 ^ (K + 1)) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2015/N1/N1.lean
IMOSL.IMO2015N1.final_solution
[44, 1]
[66, 66]
rw [Int.dvd_iff_emod_eq_zero, Nat.zero_add, pow_one, ← Int.even_iff, Int.even_sub', Int.odd_iff_not_even, Int.even_iff, ← Int.dvd_iff_emod_eq_zero]
case refine_2.refine_1 M : ℤ h : ∀ (x : ℕ), ¬2 ∣ f^[x] M k : ℕ ⊢ 2 ^ (Nat.zero + 1) ∣ f^[k] M - 3
case refine_2.refine_1 M : ℤ h : ∀ (x : ℕ), ¬2 ∣ f^[x] M k : ℕ ⊢ ¬2 ∣ f^[k] M ↔ Odd 3
Please generate a tactic in lean4 to solve the state. STATE: case refine_2.refine_1 M : ℤ h : ∀ (x : ℕ), ¬2 ∣ f^[x] M k : ℕ ⊢ 2 ^ (Nat.zero + 1) ∣ f^[k] M - 3 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2015/N1/N1.lean
IMOSL.IMO2015N1.final_solution
[44, 1]
[66, 66]
exact iff_of_true (h k) (Int.odd_iff.mpr rfl)
case refine_2.refine_1 M : ℤ h : ∀ (x : ℕ), ¬2 ∣ f^[x] M k : ℕ ⊢ ¬2 ∣ f^[k] M ↔ Odd 3
no goals
Please generate a tactic in lean4 to solve the state. STATE: case refine_2.refine_1 M : ℤ h : ∀ (x : ℕ), ¬2 ∣ f^[x] M k : ℕ ⊢ ¬2 ∣ f^[k] M ↔ Odd 3 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2015/N1/N1.lean
IMOSL.IMO2015N1.final_solution
[44, 1]
[66, 66]
rw [pow_succ', pow_succ']
case refine_2.refine_2 M : ℤ h : ∀ (x : ℕ), ¬2 ∣ f^[x] M n : ℕ h0 : ∀ (k : ℕ), 2 ^ (n + 1) ∣ f^[k] M - 3 k : ℕ ⊢ 2 ^ (n.succ + 1) ∣ f^[k] M - 3
case refine_2.refine_2 M : ℤ h : ∀ (x : ℕ), ¬2 ∣ f^[x] M n : ℕ h0 : ∀ (k : ℕ), 2 ^ (n + 1) ∣ f^[k] M - 3 k : ℕ ⊢ 2 * (2 * 2 ^ n) ∣ f^[k] M - 3
Please generate a tactic in lean4 to solve the state. STATE: case refine_2.refine_2 M : ℤ h : ∀ (x : ℕ), ¬2 ∣ f^[x] M n : ℕ h0 : ∀ (k : ℕ), 2 ^ (n + 1) ∣ f^[k] M - 3 k : ℕ ⊢ 2 ^ (n.succ + 1) ∣ f^[k] M - 3 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2015/N1/N1.lean
IMOSL.IMO2015N1.final_solution
[44, 1]
[66, 66]
refine main_claim ?_ ?_
case refine_2.refine_2 M : ℤ h : ∀ (x : ℕ), ¬2 ∣ f^[x] M n : ℕ h0 : ∀ (k : ℕ), 2 ^ (n + 1) ∣ f^[k] M - 3 k : ℕ ⊢ 2 * (2 * 2 ^ n) ∣ f^[k] M - 3
case refine_2.refine_2.refine_1 M : ℤ h : ∀ (x : ℕ), ¬2 ∣ f^[x] M n : ℕ h0 : ∀ (k : ℕ), 2 ^ (n + 1) ∣ f^[k] M - 3 k : ℕ ⊢ 2 * 2 ^ n ∣ f^[k] M - 3 case refine_2.refine_2.refine_2 M : ℤ h : ∀ (x : ℕ), ¬2 ∣ f^[x] M n : ℕ h0 : ∀ (k : ℕ), 2 ^ (n + 1) ∣ f^[k] M - 3 k : ℕ ⊢ 2 * 2 ^ n ∣ f (f^[k] M) - 3
Please generate a tactic in lean4 to solve the state. STATE: case refine_2.refine_2 M : ℤ h : ∀ (x : ℕ), ¬2 ∣ f^[x] M n : ℕ h0 : ∀ (k : ℕ), 2 ^ (n + 1) ∣ f^[k] M - 3 k : ℕ ⊢ 2 * (2 * 2 ^ n) ∣ f^[k] M - 3 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2015/N1/N1.lean
IMOSL.IMO2015N1.final_solution
[44, 1]
[66, 66]
rw [← pow_succ']
case refine_2.refine_2.refine_1 M : ℤ h : ∀ (x : ℕ), ¬2 ∣ f^[x] M n : ℕ h0 : ∀ (k : ℕ), 2 ^ (n + 1) ∣ f^[k] M - 3 k : ℕ ⊢ 2 * 2 ^ n ∣ f^[k] M - 3
case refine_2.refine_2.refine_1 M : ℤ h : ∀ (x : ℕ), ¬2 ∣ f^[x] M n : ℕ h0 : ∀ (k : ℕ), 2 ^ (n + 1) ∣ f^[k] M - 3 k : ℕ ⊢ 2 ^ (n + 1) ∣ f^[k] M - 3
Please generate a tactic in lean4 to solve the state. STATE: case refine_2.refine_2.refine_1 M : ℤ h : ∀ (x : ℕ), ¬2 ∣ f^[x] M n : ℕ h0 : ∀ (k : ℕ), 2 ^ (n + 1) ∣ f^[k] M - 3 k : ℕ ⊢ 2 * 2 ^ n ∣ f^[k] M - 3 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2015/N1/N1.lean
IMOSL.IMO2015N1.final_solution
[44, 1]
[66, 66]
exact h0 k
case refine_2.refine_2.refine_1 M : ℤ h : ∀ (x : ℕ), ¬2 ∣ f^[x] M n : ℕ h0 : ∀ (k : ℕ), 2 ^ (n + 1) ∣ f^[k] M - 3 k : ℕ ⊢ 2 ^ (n + 1) ∣ f^[k] M - 3
no goals
Please generate a tactic in lean4 to solve the state. STATE: case refine_2.refine_2.refine_1 M : ℤ h : ∀ (x : ℕ), ¬2 ∣ f^[x] M n : ℕ h0 : ∀ (k : ℕ), 2 ^ (n + 1) ∣ f^[k] M - 3 k : ℕ ⊢ 2 ^ (n + 1) ∣ f^[k] M - 3 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2015/N1/N1.lean
IMOSL.IMO2015N1.final_solution
[44, 1]
[66, 66]
rw [← pow_succ', ← f.iterate_succ_apply']
case refine_2.refine_2.refine_2 M : ℤ h : ∀ (x : ℕ), ¬2 ∣ f^[x] M n : ℕ h0 : ∀ (k : ℕ), 2 ^ (n + 1) ∣ f^[k] M - 3 k : ℕ ⊢ 2 * 2 ^ n ∣ f (f^[k] M) - 3
case refine_2.refine_2.refine_2 M : ℤ h : ∀ (x : ℕ), ¬2 ∣ f^[x] M n : ℕ h0 : ∀ (k : ℕ), 2 ^ (n + 1) ∣ f^[k] M - 3 k : ℕ ⊢ 2 ^ (n + 1) ∣ f^[k.succ] M - 3
Please generate a tactic in lean4 to solve the state. STATE: case refine_2.refine_2.refine_2 M : ℤ h : ∀ (x : ℕ), ¬2 ∣ f^[x] M n : ℕ h0 : ∀ (k : ℕ), 2 ^ (n + 1) ∣ f^[k] M - 3 k : ℕ ⊢ 2 * 2 ^ n ∣ f (f^[k] M) - 3 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2015/N1/N1.lean
IMOSL.IMO2015N1.final_solution
[44, 1]
[66, 66]
exact h0 (k + 1)
case refine_2.refine_2.refine_2 M : ℤ h : ∀ (x : ℕ), ¬2 ∣ f^[x] M n : ℕ h0 : ∀ (k : ℕ), 2 ^ (n + 1) ∣ f^[k] M - 3 k : ℕ ⊢ 2 ^ (n + 1) ∣ f^[k.succ] M - 3
no goals
Please generate a tactic in lean4 to solve the state. STATE: case refine_2.refine_2.refine_2 M : ℤ h : ∀ (x : ℕ), ¬2 ∣ f^[x] M n : ℕ h0 : ∀ (k : ℕ), 2 ^ (n + 1) ∣ f^[k] M - 3 k : ℕ ⊢ 2 ^ (n + 1) ∣ f^[k.succ] M - 3 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2008/A3/A3.lean
IMOSL.IMO2008A3.final_solution_part_2_general
[79, 1]
[94, 42]
rwa [prod_lex_lt_iff, Nat.succ_lt_succ_iff, Nat.succ_inj', ← prod_lex_lt_iff]
β : Type u_1 φ : β → β inst✝ : Preorder β h : StrictMono φ h0 : ∀ (x : β), x < φ x p q : Lex (ℕ × β) h2 : p < q ⊢ (p.1.succ, p.2) < (q.1.succ, q.2)
no goals
Please generate a tactic in lean4 to solve the state. STATE: β : Type u_1 φ : β → β inst✝ : Preorder β h : StrictMono φ h0 : ∀ (x : β), x < φ x p q : Lex (ℕ × β) h2 : p < q ⊢ (p.1.succ, p.2) < (q.1.succ, q.2) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2008/A3/A3.lean
IMOSL.IMO2008A3.final_solution_part_2_general
[79, 1]
[94, 42]
rw [prod_lex_lt_iff] at h2 ⊢
β : Type u_1 φ : β → β inst✝ : Preorder β h : StrictMono φ h0 : ∀ (x : β), x < φ x p q : Lex (ℕ × β) h2 : p < q ⊢ (p.1, φ^[3 ^ p.1] p.2) < (q.1, φ^[3 ^ q.1] q.2)
β : Type u_1 φ : β → β inst✝ : Preorder β h : StrictMono φ h0 : ∀ (x : β), x < φ x p q : Lex (ℕ × β) h2 : p.1 < q.1 ∨ p.1 = q.1 ∧ p.2 < q.2 ⊢ (p.1, φ^[3 ^ p.1] p.2).1 < (q.1, φ^[3 ^ q.1] q.2).1 ∨ (p.1, φ^[3 ^ p.1] p.2).1 = (q.1, φ^[3 ^ q.1] q.2).1 ∧ (p.1, φ^[3 ^ p.1] p.2).2 < (q.1, φ^[3 ^ q.1] q.2).2
Please generate a tactic in lean4 to solve the state. STATE: β : Type u_1 φ : β → β inst✝ : Preorder β h : StrictMono φ h0 : ∀ (x : β), x < φ x p q : Lex (ℕ × β) h2 : p < q ⊢ (p.1, φ^[3 ^ p.1] p.2) < (q.1, φ^[3 ^ q.1] q.2) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2008/A3/A3.lean
IMOSL.IMO2008A3.final_solution_part_2_general
[79, 1]
[94, 42]
refine h2.imp_right λ h3 ↦ ⟨h3.1, (h.iterate _ h3.2).trans_eq ?_⟩
β : Type u_1 φ : β → β inst✝ : Preorder β h : StrictMono φ h0 : ∀ (x : β), x < φ x p q : Lex (ℕ × β) h2 : p.1 < q.1 ∨ p.1 = q.1 ∧ p.2 < q.2 ⊢ (p.1, φ^[3 ^ p.1] p.2).1 < (q.1, φ^[3 ^ q.1] q.2).1 ∨ (p.1, φ^[3 ^ p.1] p.2).1 = (q.1, φ^[3 ^ q.1] q.2).1 ∧ (p.1, φ^[3 ^ p.1] p.2).2 < (q.1, φ^[3 ^ q.1] q.2).2
β : Type u_1 φ : β → β inst✝ : Preorder β h : StrictMono φ h0 : ∀ (x : β), x < φ x p q : Lex (ℕ × β) h2 : p.1 < q.1 ∨ p.1 = q.1 ∧ p.2 < q.2 h3 : p.1 = q.1 ∧ p.2 < q.2 ⊢ φ^[3 ^ p.1] q.2 = (q.1, φ^[3 ^ q.1] q.2).2
Please generate a tactic in lean4 to solve the state. STATE: β : Type u_1 φ : β → β inst✝ : Preorder β h : StrictMono φ h0 : ∀ (x : β), x < φ x p q : Lex (ℕ × β) h2 : p.1 < q.1 ∨ p.1 = q.1 ∧ p.2 < q.2 ⊢ (p.1, φ^[3 ^ p.1] p.2).1 < (q.1, φ^[3 ^ q.1] q.2).1 ∨ (p.1, φ^[3 ^ p.1] p.2).1 = (q.1, φ^[3 ^ q.1] q.2).1 ∧ (p.1, φ^[3 ^ p.1] p.2).2 < (q.1, φ^[3 ^ q.1] q.2).2 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2008/A3/A3.lean
IMOSL.IMO2008A3.final_solution_part_2_general
[79, 1]
[94, 42]
rw [← h3.1]
β : Type u_1 φ : β → β inst✝ : Preorder β h : StrictMono φ h0 : ∀ (x : β), x < φ x p q : Lex (ℕ × β) h2 : p.1 < q.1 ∨ p.1 = q.1 ∧ p.2 < q.2 h3 : p.1 = q.1 ∧ p.2 < q.2 ⊢ φ^[3 ^ p.1] q.2 = (q.1, φ^[3 ^ q.1] q.2).2
no goals
Please generate a tactic in lean4 to solve the state. STATE: β : Type u_1 φ : β → β inst✝ : Preorder β h : StrictMono φ h0 : ∀ (x : β), x < φ x p q : Lex (ℕ × β) h2 : p.1 < q.1 ∨ p.1 = q.1 ∧ p.2 < q.2 h3 : p.1 = q.1 ∧ p.2 < q.2 ⊢ φ^[3 ^ p.1] q.2 = (q.1, φ^[3 ^ q.1] q.2).2 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2008/A3/A3.lean
IMOSL.IMO2008A3.final_solution_part_2_general
[79, 1]
[94, 42]
refine prod_lex_lt_iff.mpr <| Or.inr <| ⟨rfl, ?_⟩
β : Type u_1 φ : β → β inst✝ : Preorder β h : StrictMono φ h0 : ∀ (x : β), x < φ x p : Lex (ℕ × β) ⊢ (((p.1, φ^[3 ^ p.1] p.2).1, φ^[3 ^ (p.1, φ^[3 ^ p.1] p.2).1] (p.1, φ^[3 ^ p.1] p.2).2).1.succ, ((p.1, φ^[3 ^ p.1] p.2).1, φ^[3 ^ (p.1, φ^[3 ^ p.1] p.2).1] (p.1, φ^[3 ^ p.1] p.2).2).2) < ((p.1.succ, p.2).1, φ^[3 ^ (p.1.succ, p.2).1] (p.1.succ, p.2).2)
β : Type u_1 φ : β → β inst✝ : Preorder β h : StrictMono φ h0 : ∀ (x : β), x < φ x p : Lex (ℕ × β) ⊢ (((p.1, φ^[3 ^ p.1] p.2).1, φ^[3 ^ (p.1, φ^[3 ^ p.1] p.2).1] (p.1, φ^[3 ^ p.1] p.2).2).1.succ, ((p.1, φ^[3 ^ p.1] p.2).1, φ^[3 ^ (p.1, φ^[3 ^ p.1] p.2).1] (p.1, φ^[3 ^ p.1] p.2).2).2).2 < ((p.1.succ, p.2).1, φ^[3 ^ (p.1.succ, p.2).1] (p.1.succ, p.2).2).2
Please generate a tactic in lean4 to solve the state. STATE: β : Type u_1 φ : β → β inst✝ : Preorder β h : StrictMono φ h0 : ∀ (x : β), x < φ x p : Lex (ℕ × β) ⊢ (((p.1, φ^[3 ^ p.1] p.2).1, φ^[3 ^ (p.1, φ^[3 ^ p.1] p.2).1] (p.1, φ^[3 ^ p.1] p.2).2).1.succ, ((p.1, φ^[3 ^ p.1] p.2).1, φ^[3 ^ (p.1, φ^[3 ^ p.1] p.2).1] (p.1, φ^[3 ^ p.1] p.2).2).2) < ((p.1.succ, p.2).1, φ^[3 ^ (p.1.succ, p.2).1] (p.1.succ, p.2).2) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2008/A3/A3.lean
IMOSL.IMO2008A3.final_solution_part_2_general
[79, 1]
[94, 42]
rw [← Function.iterate_add_apply, ← two_mul, pow_succ']
β : Type u_1 φ : β → β inst✝ : Preorder β h : StrictMono φ h0 : ∀ (x : β), x < φ x p : Lex (ℕ × β) ⊢ (((p.1, φ^[3 ^ p.1] p.2).1, φ^[3 ^ (p.1, φ^[3 ^ p.1] p.2).1] (p.1, φ^[3 ^ p.1] p.2).2).1.succ, ((p.1, φ^[3 ^ p.1] p.2).1, φ^[3 ^ (p.1, φ^[3 ^ p.1] p.2).1] (p.1, φ^[3 ^ p.1] p.2).2).2).2 < ((p.1.succ, p.2).1, φ^[3 ^ (p.1.succ, p.2).1] (p.1.succ, p.2).2).2
β : Type u_1 φ : β → β inst✝ : Preorder β h : StrictMono φ h0 : ∀ (x : β), x < φ x p : Lex (ℕ × β) ⊢ (((p.1, φ^[3 ^ p.1] p.2).1, φ^[2 * 3 ^ (p.1, φ^[3 ^ p.1] p.2).1] p.2).1.succ, ((p.1, φ^[3 ^ p.1] p.2).1, φ^[2 * 3 ^ (p.1, φ^[3 ^ p.1] p.2).1] p.2).2).2 < ((p.1.succ, p.2).1, φ^[3 * 3 ^ p.1] (p.1.succ, p.2).2).2
Please generate a tactic in lean4 to solve the state. STATE: β : Type u_1 φ : β → β inst✝ : Preorder β h : StrictMono φ h0 : ∀ (x : β), x < φ x p : Lex (ℕ × β) ⊢ (((p.1, φ^[3 ^ p.1] p.2).1, φ^[3 ^ (p.1, φ^[3 ^ p.1] p.2).1] (p.1, φ^[3 ^ p.1] p.2).2).1.succ, ((p.1, φ^[3 ^ p.1] p.2).1, φ^[3 ^ (p.1, φ^[3 ^ p.1] p.2).1] (p.1, φ^[3 ^ p.1] p.2).2).2).2 < ((p.1.succ, p.2).1, φ^[3 ^ (p.1.succ, p.2).1] (p.1.succ, p.2).2).2 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2008/A3/A3.lean
IMOSL.IMO2008A3.final_solution_part_2_general
[79, 1]
[94, 42]
exact h.strictMono_iterate_of_lt_map (h0 p.2) (Nat.mul_lt_mul_of_pos_right (Nat.lt_succ_self 2) (pow_pos (Nat.succ_pos 2) _))
β : Type u_1 φ : β → β inst✝ : Preorder β h : StrictMono φ h0 : ∀ (x : β), x < φ x p : Lex (ℕ × β) ⊢ (((p.1, φ^[3 ^ p.1] p.2).1, φ^[2 * 3 ^ (p.1, φ^[3 ^ p.1] p.2).1] p.2).1.succ, ((p.1, φ^[3 ^ p.1] p.2).1, φ^[2 * 3 ^ (p.1, φ^[3 ^ p.1] p.2).1] p.2).2).2 < ((p.1.succ, p.2).1, φ^[3 * 3 ^ p.1] (p.1.succ, p.2).2).2
no goals
Please generate a tactic in lean4 to solve the state. STATE: β : Type u_1 φ : β → β inst✝ : Preorder β h : StrictMono φ h0 : ∀ (x : β), x < φ x p : Lex (ℕ × β) ⊢ (((p.1, φ^[3 ^ p.1] p.2).1, φ^[2 * 3 ^ (p.1, φ^[3 ^ p.1] p.2).1] p.2).1.succ, ((p.1, φ^[3 ^ p.1] p.2).1, φ^[2 * 3 ^ (p.1, φ^[3 ^ p.1] p.2).1] p.2).2).2 < ((p.1.succ, p.2).1, φ^[3 * 3 ^ p.1] (p.1.succ, p.2).2).2 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Dense.lean
IMOSL.IMO2010A1.good_iff_of_DenselyOrdered
[30, 1]
[65, 39]
have h0 : ⌊f 0⌋ = 1 ∨ f 0 = 0 := by have h0 := h 0 0 rw [zsmul_zero, ← sub_eq_zero, ← mul_one_sub, mul_eq_zero] at h0 exact h0.symm.imp_left λ h0 ↦ Int.cast_eq_one.mp (eq_of_sub_eq_zero h0).symm
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, ⌊C⌋ = 1 ∧ f = fun x => C) ∨ f = 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 h : good f h0 : ⌊f 0⌋ = 1 ∨ f 0 = 0 ⊢ (∃ C, ⌊C⌋ = 1 ∧ f = fun x => C) ∨ f = 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, ⌊C⌋ = 1 ∧ f = fun x => C) ∨ f = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Dense.lean
IMOSL.IMO2010A1.good_iff_of_DenselyOrdered
[30, 1]
[65, 39]
revert h0
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 h0 : ⌊f 0⌋ = 1 ∨ f 0 = 0 ⊢ (∃ C, ⌊C⌋ = 1 ∧ f = fun x => C) ∨ f = 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 h : good f ⊢ ⌊f 0⌋ = 1 ∨ f 0 = 0 → (∃ C, ⌊C⌋ = 1 ∧ f = fun x => C) ∨ f = 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 h0 : ⌊f 0⌋ = 1 ∨ f 0 = 0 ⊢ (∃ C, ⌊C⌋ = 1 ∧ f = fun x => C) ∨ f = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Dense.lean
IMOSL.IMO2010A1.good_iff_of_DenselyOrdered
[30, 1]
[65, 39]
refine Or.imp (λ h0 ↦ ?_) (λ h0 ↦ ?_)
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 ⊢ ⌊f 0⌋ = 1 ∨ f 0 = 0 → (∃ C, ⌊C⌋ = 1 ∧ f = fun x => C) ∨ f = 0
case refine_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 h : good f h0 : ⌊f 0⌋ = 1 ⊢ ∃ C, ⌊C⌋ = 1 ∧ f = fun x => C case refine_2 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 h0 : f 0 = 0 ⊢ f = 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 ⊢ ⌊f 0⌋ = 1 ∨ f 0 = 0 → (∃ C, ⌊C⌋ = 1 ∧ f = fun x => C) ∨ f = 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 h0 := h 0 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 h : good f ⊢ ⌊f 0⌋ = 1 ∨ f 0 = 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 h : good f h0 : f (⌊0⌋ • 0) = f 0 * ↑⌊f 0⌋ ⊢ ⌊f 0⌋ = 1 ∨ f 0 = 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 ⊢ ⌊f 0⌋ = 1 ∨ f 0 = 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 [zsmul_zero, ← sub_eq_zero, ← mul_one_sub, mul_eq_zero] at h0
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 h0 : f (⌊0⌋ • 0) = f 0 * ↑⌊f 0⌋ ⊢ ⌊f 0⌋ = 1 ∨ f 0 = 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 h : good f h0 : f 0 = 0 ∨ 1 - ↑⌊f 0⌋ = 0 ⊢ ⌊f 0⌋ = 1 ∨ f 0 = 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 h0 : f (⌊0⌋ • 0) = f 0 * ↑⌊f 0⌋ ⊢ ⌊f 0⌋ = 1 ∨ f 0 = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Dense.lean
IMOSL.IMO2010A1.good_iff_of_DenselyOrdered
[30, 1]
[65, 39]
exact h0.symm.imp_left λ h0 ↦ Int.cast_eq_one.mp (eq_of_sub_eq_zero h0).symm
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 h0 : f 0 = 0 ∨ 1 - ↑⌊f 0⌋ = 0 ⊢ ⌊f 0⌋ = 1 ∨ f 0 = 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 h : good f h0 : f 0 = 0 ∨ 1 - ↑⌊f 0⌋ = 0 ⊢ ⌊f 0⌋ = 1 ∨ f 0 = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Dense.lean
IMOSL.IMO2010A1.good_iff_of_DenselyOrdered
[30, 1]
[65, 39]
refine ⟨f 0, h0, funext λ x ↦ ?_⟩
case refine_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 h : good f h0 : ⌊f 0⌋ = 1 ⊢ ∃ C, ⌊C⌋ = 1 ∧ f = fun x => C
case refine_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 h : good f h0 : ⌊f 0⌋ = 1 x : R ⊢ f x = f 0
Please generate a tactic in lean4 to solve the state. STATE: case refine_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 h : good f h0 : ⌊f 0⌋ = 1 ⊢ ∃ C, ⌊C⌋ = 1 ∧ f = fun x => C TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Dense.lean
IMOSL.IMO2010A1.good_iff_of_DenselyOrdered
[30, 1]
[65, 39]
rw [← zsmul_zero ⌊x⌋, h, h0, Int.cast_one, mul_one]
case refine_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 h : good f h0 : ⌊f 0⌋ = 1 x : R ⊢ f x = f 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: case refine_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 h : good f h0 : ⌊f 0⌋ = 1 x : R ⊢ f x = f 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Dense.lean
IMOSL.IMO2010A1.good_iff_of_DenselyOrdered
[30, 1]
[65, 39]
rcases exists_between (zero_lt_one' R) with ⟨c, hc⟩
case refine_2 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 h0 : f 0 = 0 ⊢ f = 0
case refine_2.intro 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 h0 : f 0 = 0 c : R hc : 0 < c ∧ c < 1 ⊢ f = 0
Please generate a tactic in lean4 to solve the state. STATE: case refine_2 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 h0 : f 0 = 0 ⊢ f = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Dense.lean
IMOSL.IMO2010A1.good_iff_of_DenselyOrdered
[30, 1]
[65, 39]
replace h0 : ⌊f c⌋ = 0 := by specialize h c c have h1 : ⌊c⌋ = 0 := Int.floor_eq_zero_iff.mpr ⟨hc.1.le, hc.2⟩ rw [h1, zero_zsmul, h0, zero_eq_mul] at h exact h.elim (λ h ↦ h ▸ Int.floor_zero) Int.cast_eq_zero.mp
case refine_2.intro 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 h0 : f 0 = 0 c : R hc : 0 < c ∧ c < 1 ⊢ f = 0
case refine_2.intro 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 = 0
Please generate a tactic in lean4 to solve the state. STATE: case refine_2.intro 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 h0 : f 0 = 0 c : R hc : 0 < c ∧ c < 1 ⊢ f = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Dense.lean
IMOSL.IMO2010A1.good_iff_of_DenselyOrdered
[30, 1]
[65, 39]
replace h0 : f (-c) = 0 := by specialize h (-1) c have h1 : ⌊(-1 : R)⌋ = -1 := by rw [← Int.cast_one, ← Int.cast_neg, Int.floor_intCast] rwa [h1, neg_one_zsmul, h0, Int.cast_zero, mul_zero] at h
case refine_2.intro 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 = 0
case refine_2.intro 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 = 0
Please generate a tactic in lean4 to solve the state. STATE: case refine_2.intro 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 = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Dense.lean
IMOSL.IMO2010A1.good_iff_of_DenselyOrdered
[30, 1]
[65, 39]
funext y
case refine_2.intro 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 = 0
case refine_2.intro.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 h : good f c : R hc : 0 < c ∧ c < 1 h0 : f (-c) = 0 y : R ⊢ f y = 0 y
Please generate a tactic in lean4 to solve the state. STATE: case refine_2.intro 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 = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Dense.lean
IMOSL.IMO2010A1.good_iff_of_DenselyOrdered
[30, 1]
[65, 39]
specialize h (-c) (-y)
case refine_2.intro.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 h : good f c : R hc : 0 < c ∧ c < 1 h0 : f (-c) = 0 y : R ⊢ f y = 0 y
case refine_2.intro.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 y : R h : f (⌊-c⌋ • -y) = f (-c) * ↑⌊f (-y)⌋ ⊢ f y = 0 y
Please generate a tactic in lean4 to solve the state. STATE: case refine_2.intro.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 h : good f c : R hc : 0 < c ∧ c < 1 h0 : f (-c) = 0 y : R ⊢ f y = 0 y 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 : ⌊-c⌋ = -1 := by rw [Int.floor_eq_iff, Int.cast_neg, Int.cast_one, neg_add_self] exact ⟨neg_le_neg hc.2.le, neg_lt_zero.mpr hc.1⟩
case refine_2.intro.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 y : R h : f (⌊-c⌋ • -y) = f (-c) * ↑⌊f (-y)⌋ ⊢ f y = 0 y
case refine_2.intro.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 y : R h : f (⌊-c⌋ • -y) = f (-c) * ↑⌊f (-y)⌋ h1 : ⌊-c⌋ = -1 ⊢ f y = 0 y
Please generate a tactic in lean4 to solve the state. STATE: case refine_2.intro.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 y : R h : f (⌊-c⌋ • -y) = f (-c) * ↑⌊f (-y)⌋ ⊢ f y = 0 y TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Dense.lean
IMOSL.IMO2010A1.good_iff_of_DenselyOrdered
[30, 1]
[65, 39]
rwa [h0, zero_mul, h1, neg_one_zsmul, neg_neg] at h
case refine_2.intro.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 y : R h : f (⌊-c⌋ • -y) = f (-c) * ↑⌊f (-y)⌋ h1 : ⌊-c⌋ = -1 ⊢ f y = 0 y
no goals
Please generate a tactic in lean4 to solve the state. STATE: case refine_2.intro.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 y : R h : f (⌊-c⌋ • -y) = f (-c) * ↑⌊f (-y)⌋ h1 : ⌊-c⌋ = -1 ⊢ f y = 0 y TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1Dense.lean
IMOSL.IMO2010A1.good_iff_of_DenselyOrdered
[30, 1]
[65, 39]
specialize h c 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 h0 : f 0 = 0 c : R hc : 0 < c ∧ c < 1 ⊢ ⌊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 h0 : f 0 = 0 c : R hc : 0 < c ∧ c < 1 h : f (⌊c⌋ • c) = f c * ↑⌊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 h0 : f 0 = 0 c : R hc : 0 < c ∧ c < 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]
have h1 : ⌊c⌋ = 0 := Int.floor_eq_zero_iff.mpr ⟨hc.1.le, hc.2⟩
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 h0 : f 0 = 0 c : R hc : 0 < c ∧ c < 1 h : f (⌊c⌋ • c) = f c * ↑⌊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 h0 : f 0 = 0 c : R hc : 0 < c ∧ c < 1 h : f (⌊c⌋ • c) = f c * ↑⌊f c⌋ h1 : ⌊c⌋ = 0 ⊢ ⌊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 h0 : f 0 = 0 c : R hc : 0 < c ∧ c < 1 h : f (⌊c⌋ • c) = f c * ↑⌊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]
rw [h1, zero_zsmul, h0, zero_eq_mul] 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 h0 : f 0 = 0 c : R hc : 0 < c ∧ c < 1 h : f (⌊c⌋ • c) = f c * ↑⌊f c⌋ h1 : ⌊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 h0 : f 0 = 0 c : R hc : 0 < c ∧ c < 1 h : f c = 0 ∨ ↑⌊f c⌋ = 0 h1 : ⌊c⌋ = 0 ⊢ ⌊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 h0 : f 0 = 0 c : R hc : 0 < c ∧ c < 1 h : f (⌊c⌋ • c) = f c * ↑⌊f c⌋ h1 : ⌊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]
exact h.elim (λ h ↦ h ▸ Int.floor_zero) Int.cast_eq_zero.mp
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 h0 : f 0 = 0 c : R hc : 0 < c ∧ c < 1 h : f c = 0 ∨ ↑⌊f c⌋ = 0 h1 : ⌊c⌋ = 0 ⊢ ⌊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 h0 : f 0 = 0 c : R hc : 0 < c ∧ c < 1 h : f c = 0 ∨ ↑⌊f c⌋ = 0 h1 : ⌊c⌋ = 0 ⊢ ⌊f c⌋ = 0 TACTIC: