url
stringclasses
147 values
commit
stringclasses
147 values
file_path
stringlengths
7
101
full_name
stringlengths
1
94
start
stringlengths
6
10
end
stringlengths
6
11
tactic
stringlengths
1
11.2k
state_before
stringlengths
3
2.09M
state_after
stringlengths
6
2.09M
input
stringlengths
73
2.09M
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/A1/A1.lean
IMOSL.IMO2006A1.final_solution
[174, 1]
[189, 87]
exact h0.resolve_right (add_pos (Nat.cast_pos.mpr (pos_of_gt hC)) one_pos).ne.symm
case inr.inr.intro.intro.intro.intro.intro R : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Archimedean R r : R C : ℕ hC : 1 < C N w✝ : ℕ h : ∀ (k : ℕ), (↑C + 1) * f^[k + N] r = -↑C ^ 2 k : ℕ h0 : f^[k + N + 2] r = f^[k + N] r ∨ ↑C + 1 = 0 ⊢ f^[k + N + 2] r = f^[k + N] r
no goals
Please generate a tactic in lean4 to solve the state. STATE: case inr.inr.intro.intro.intro.intro.intro R : Type u_1 inst✝² : LinearOrderedRing R inst✝¹ : FloorRing R inst✝ : Archimedean R r : R C : ℕ hC : 1 < C N w✝ : ℕ h : ∀ (k : ℕ), (↑C + 1) * f^[k + N] r = -↑C ^ 2 k : ℕ h0 : f^[k + N + 2] r = f^[k + N] r ∨ ↑C + 1 = 0 ⊢ f^[k + N + 2] r = f^[k + N] r TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2021/A3/A3.lean
IMOSL.IMO2021A3.targetSum_general_lower_bound
[43, 1]
[50, 42]
rw [map_cons, prod_cons, targetSum, pow_add, length_cons, Nat.factorial_succ, mul_mul_mul_comm]
a : ℕ l : List ℕ ⊢ (map Nat.succ (a :: l)).prod ≤ 2 ^ targetSum (a :: l) * (a :: l).length.factorial
a : ℕ l : List ℕ ⊢ a.succ * (map Nat.succ l).prod ≤ 2 ^ (a / l.length.succ) * (l.length + 1) * (2 ^ targetSum l * l.length.factorial)
Please generate a tactic in lean4 to solve the state. STATE: a : ℕ l : List ℕ ⊢ (map Nat.succ (a :: l)).prod ≤ 2 ^ targetSum (a :: l) * (a :: l).length.factorial TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2021/A3/A3.lean
IMOSL.IMO2021A3.targetSum_general_lower_bound
[43, 1]
[50, 42]
exact Nat.mul_le_mul (succ_le_mul_two_pow_div a l.length.succ_pos) (targetSum_general_lower_bound l)
a : ℕ l : List ℕ ⊢ a.succ * (map Nat.succ l).prod ≤ 2 ^ (a / l.length.succ) * (l.length + 1) * (2 ^ targetSum l * l.length.factorial)
no goals
Please generate a tactic in lean4 to solve the state. STATE: a : ℕ l : List ℕ ⊢ a.succ * (map Nat.succ l).prod ≤ 2 ^ (a / l.length.succ) * (l.length + 1) * (2 ^ targetSum l * l.length.factorial) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2021/A3/A3.lean
IMOSL.IMO2021A3.targetSum_perm_iota_n_lower_bound
[52, 1]
[57, 72]
have h0 := targetSum_general_lower_bound l
l : List ℕ n : ℕ h : l ~ iota n ⊢ n.size ≤ targetSum l
l : List ℕ n : ℕ h : l ~ iota n h0 : (map Nat.succ l).prod ≤ 2 ^ targetSum l * l.length.factorial ⊢ n.size ≤ targetSum l
Please generate a tactic in lean4 to solve the state. STATE: l : List ℕ n : ℕ h : l ~ iota n ⊢ n.size ≤ targetSum l TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2021/A3/A3.lean
IMOSL.IMO2021A3.targetSum_perm_iota_n_lower_bound
[52, 1]
[57, 72]
rw [(h.map Nat.succ).prod_eq, h.length_eq, prod_map_succ_iota, length_iota] at h0
l : List ℕ n : ℕ h : l ~ iota n h0 : (map Nat.succ l).prod ≤ 2 ^ targetSum l * l.length.factorial ⊢ n.size ≤ targetSum l
l : List ℕ n : ℕ h : l ~ iota n h0 : (n + 1).factorial ≤ 2 ^ targetSum l * n.factorial ⊢ n.size ≤ targetSum l
Please generate a tactic in lean4 to solve the state. STATE: l : List ℕ n : ℕ h : l ~ iota n h0 : (map Nat.succ l).prod ≤ 2 ^ targetSum l * l.length.factorial ⊢ n.size ≤ targetSum l TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2021/A3/A3.lean
IMOSL.IMO2021A3.targetSum_perm_iota_n_lower_bound
[52, 1]
[57, 72]
exact Nat.size_le.mpr (Nat.le_of_mul_le_mul_right h0 n.factorial_pos)
l : List ℕ n : ℕ h : l ~ iota n h0 : (n + 1).factorial ≤ 2 ^ targetSum l * n.factorial ⊢ n.size ≤ targetSum l
no goals
Please generate a tactic in lean4 to solve the state. STATE: l : List ℕ n : ℕ h : l ~ iota n h0 : (n + 1).factorial ≤ 2 ^ targetSum l * n.factorial ⊢ n.size ≤ targetSum l TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2021/A3/A3.lean
IMOSL.IMO2021A3.iota_map_add_append_iota_eq_iota
[81, 1]
[85, 76]
rw [iota_succ, map_cons, cons_append]
n k : ℕ ⊢ map n.add (iota (k + 1)) ++ iota n = iota (n + (k + 1))
n k : ℕ ⊢ n.add (k + 1) :: (map n.add (iota k) ++ iota n) = iota (n + (k + 1))
Please generate a tactic in lean4 to solve the state. STATE: n k : ℕ ⊢ map n.add (iota (k + 1)) ++ iota n = iota (n + (k + 1)) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2021/A3/A3.lean
IMOSL.IMO2021A3.iota_map_add_append_iota_eq_iota
[81, 1]
[85, 76]
exact congr_arg₂ _ rfl (iota_map_add_append_iota_eq_iota n k)
n k : ℕ ⊢ n.add (k + 1) :: (map n.add (iota k) ++ iota n) = iota (n + (k + 1))
no goals
Please generate a tactic in lean4 to solve the state. STATE: n k : ℕ ⊢ n.add (k + 1) :: (map n.add (iota k) ++ iota n) = iota (n + (k + 1)) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2021/A3/A3.lean
IMOSL.IMO2021A3.lowerBoundMk_perm_iota
[87, 1]
[99, 59]
rw [lowerBoundMk_bit0_succ, Nat.bit_false, Nat.bit0_val]
b : Bool n k : ℕ h : lowerBoundMk (k + 1) ~ iota (k + 1) ⊢ lowerBoundMk (Nat.bit false (k + 1)) ~ iota (Nat.bit false (k + 1))
b : Bool n k : ℕ h : lowerBoundMk (k + 1) ~ iota (k + 1) ⊢ map (k + 1).add (iota k) ++ (2 * k + 2) :: lowerBoundMk (k + 1) ~ iota (2 * (k + 1))
Please generate a tactic in lean4 to solve the state. STATE: b : Bool n k : ℕ h : lowerBoundMk (k + 1) ~ iota (k + 1) ⊢ lowerBoundMk (Nat.bit false (k + 1)) ~ iota (Nat.bit false (k + 1)) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2021/A3/A3.lean
IMOSL.IMO2021A3.lowerBoundMk_perm_iota
[87, 1]
[99, 59]
refine perm_middle.trans (((h.append_left _).trans ?_).cons _)
b : Bool n k : ℕ h : lowerBoundMk (k + 1) ~ iota (k + 1) ⊢ map (k + 1).add (iota k) ++ (2 * k + 2) :: lowerBoundMk (k + 1) ~ iota (2 * (k + 1))
b : Bool n k : ℕ h : lowerBoundMk (k + 1) ~ iota (k + 1) ⊢ map (k + 1).add (iota k) ++ iota (k + 1) ~ iota (Nat.mul 2 k + 1)
Please generate a tactic in lean4 to solve the state. STATE: b : Bool n k : ℕ h : lowerBoundMk (k + 1) ~ iota (k + 1) ⊢ map (k + 1).add (iota k) ++ (2 * k + 2) :: lowerBoundMk (k + 1) ~ iota (2 * (k + 1)) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2021/A3/A3.lean
IMOSL.IMO2021A3.lowerBoundMk_perm_iota
[87, 1]
[99, 59]
rw [iota_map_add_append_iota_eq_iota, add_right_comm, ← two_mul]
b : Bool n k : ℕ h : lowerBoundMk (k + 1) ~ iota (k + 1) ⊢ map (k + 1).add (iota k) ++ iota (k + 1) ~ iota (Nat.mul 2 k + 1)
b : Bool n k : ℕ h : lowerBoundMk (k + 1) ~ iota (k + 1) ⊢ iota (2 * k + 1) ~ iota (Nat.mul 2 k + 1)
Please generate a tactic in lean4 to solve the state. STATE: b : Bool n k : ℕ h : lowerBoundMk (k + 1) ~ iota (k + 1) ⊢ map (k + 1).add (iota k) ++ iota (k + 1) ~ iota (Nat.mul 2 k + 1) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2021/A3/A3.lean
IMOSL.IMO2021A3.lowerBoundMk_perm_iota
[87, 1]
[99, 59]
exact Perm.refl _
b : Bool n k : ℕ h : lowerBoundMk (k + 1) ~ iota (k + 1) ⊢ iota (2 * k + 1) ~ iota (Nat.mul 2 k + 1)
no goals
Please generate a tactic in lean4 to solve the state. STATE: b : Bool n k : ℕ h : lowerBoundMk (k + 1) ~ iota (k + 1) ⊢ iota (2 * k + 1) ~ iota (Nat.mul 2 k + 1) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2021/A3/A3.lean
IMOSL.IMO2021A3.lowerBoundMk_perm_iota
[87, 1]
[99, 59]
rw [lowerBoundMk_bit1, Nat.bit_true, Nat.bit1_val]
b : Bool n✝ n : ℕ h : lowerBoundMk n ~ iota n ⊢ lowerBoundMk (Nat.bit true n) ~ iota (Nat.bit true n)
b : Bool n✝ n : ℕ h : lowerBoundMk n ~ iota n ⊢ map n.add (iota n) ++ (2 * n + 1) :: lowerBoundMk n ~ iota (2 * n + 1)
Please generate a tactic in lean4 to solve the state. STATE: b : Bool n✝ n : ℕ h : lowerBoundMk n ~ iota n ⊢ lowerBoundMk (Nat.bit true n) ~ iota (Nat.bit true n) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2021/A3/A3.lean
IMOSL.IMO2021A3.lowerBoundMk_perm_iota
[87, 1]
[99, 59]
refine perm_middle.trans (((h.append_left _).trans ?_).cons _)
b : Bool n✝ n : ℕ h : lowerBoundMk n ~ iota n ⊢ map n.add (iota n) ++ (2 * n + 1) :: lowerBoundMk n ~ iota (2 * n + 1)
b : Bool n✝ n : ℕ h : lowerBoundMk n ~ iota n ⊢ map n.add (iota n) ++ iota n ~ iota (2 * n)
Please generate a tactic in lean4 to solve the state. STATE: b : Bool n✝ n : ℕ h : lowerBoundMk n ~ iota n ⊢ map n.add (iota n) ++ (2 * n + 1) :: lowerBoundMk n ~ iota (2 * n + 1) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2021/A3/A3.lean
IMOSL.IMO2021A3.lowerBoundMk_perm_iota
[87, 1]
[99, 59]
rw [iota_map_add_append_iota_eq_iota, ← two_mul]
b : Bool n✝ n : ℕ h : lowerBoundMk n ~ iota n ⊢ map n.add (iota n) ++ iota n ~ iota (2 * n)
no goals
Please generate a tactic in lean4 to solve the state. STATE: b : Bool n✝ n : ℕ h : lowerBoundMk n ~ iota n ⊢ map n.add (iota n) ++ iota n ~ iota (2 * n) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2021/A3/A3.lean
IMOSL.IMO2021A3.targetSum_map_add_iota_length_succ
[104, 1]
[112, 50]
rw [iota_succ, map_cons, cons_append, targetSum, length_cons, targetSum_map_add_iota_length_succ h k, Nat.add_eq_right]
n : ℕ l : List ℕ h : l.length = n.succ k : ℕ ⊢ targetSum (map n.add (iota (k + 1)) ++ l) = targetSum l
n : ℕ l : List ℕ h : l.length = n.succ k : ℕ ⊢ n.add (k + 1) / (map n.add (iota k) ++ l).length.succ = 0
Please generate a tactic in lean4 to solve the state. STATE: n : ℕ l : List ℕ h : l.length = n.succ k : ℕ ⊢ targetSum (map n.add (iota (k + 1)) ++ l) = targetSum l TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2021/A3/A3.lean
IMOSL.IMO2021A3.targetSum_map_add_iota_length_succ
[104, 1]
[112, 50]
refine Nat.div_eq_of_lt ?_
n : ℕ l : List ℕ h : l.length = n.succ k : ℕ ⊢ n.add (k + 1) / (map n.add (iota k) ++ l).length.succ = 0
n : ℕ l : List ℕ h : l.length = n.succ k : ℕ ⊢ n.add (k + 1) < (map n.add (iota k) ++ l).length.succ
Please generate a tactic in lean4 to solve the state. STATE: n : ℕ l : List ℕ h : l.length = n.succ k : ℕ ⊢ n.add (k + 1) / (map n.add (iota k) ++ l).length.succ = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2021/A3/A3.lean
IMOSL.IMO2021A3.targetSum_map_add_iota_length_succ
[104, 1]
[112, 50]
rw [length_append, length_map, length_iota, h]
n : ℕ l : List ℕ h : l.length = n.succ k : ℕ ⊢ n.add (k + 1) < (map n.add (iota k) ++ l).length.succ
n : ℕ l : List ℕ h : l.length = n.succ k : ℕ ⊢ n.add (k + 1) < (k + n.succ).succ
Please generate a tactic in lean4 to solve the state. STATE: n : ℕ l : List ℕ h : l.length = n.succ k : ℕ ⊢ n.add (k + 1) < (map n.add (iota k) ++ l).length.succ TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2021/A3/A3.lean
IMOSL.IMO2021A3.lowerBoundMk_targetSum
[114, 1]
[137, 78]
have h0 : ((2 * k + 2) :: lowerBoundMk (k + 1)).length = (k + 1).succ := congr_arg Nat.succ (lowerBoundMk_length (k + 1))
X : 0 < Nat.succ 1 X0 : ∀ (m : ℕ), m ≤ 2 * m b : Bool n k : ℕ h : targetSum (lowerBoundMk (k + 1)) = (k + 1).size ⊢ targetSum (lowerBoundMk (Nat.bit false (k + 1))) = (Nat.bit false (k + 1)).size
X : 0 < Nat.succ 1 X0 : ∀ (m : ℕ), m ≤ 2 * m b : Bool n k : ℕ h : targetSum (lowerBoundMk (k + 1)) = (k + 1).size h0 : ((2 * k + 2) :: lowerBoundMk (k + 1)).length = (k + 1).succ ⊢ targetSum (lowerBoundMk (Nat.bit false (k + 1))) = (Nat.bit false (k + 1)).size
Please generate a tactic in lean4 to solve the state. STATE: X : 0 < Nat.succ 1 X0 : ∀ (m : ℕ), m ≤ 2 * m b : Bool n k : ℕ h : targetSum (lowerBoundMk (k + 1)) = (k + 1).size ⊢ targetSum (lowerBoundMk (Nat.bit false (k + 1))) = (Nat.bit false (k + 1)).size TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2021/A3/A3.lean
IMOSL.IMO2021A3.lowerBoundMk_targetSum
[114, 1]
[137, 78]
rw [lowerBoundMk_bit0_succ, Nat.bit_false, Nat.size_bit0 k.succ_ne_zero, (k + 1).size.succ_eq_add_one, targetSum_map_add_iota_length_succ h0, targetSum, h0, h, add_comm, Nat.add_right_inj]
X : 0 < Nat.succ 1 X0 : ∀ (m : ℕ), m ≤ 2 * m b : Bool n k : ℕ h : targetSum (lowerBoundMk (k + 1)) = (k + 1).size h0 : ((2 * k + 2) :: lowerBoundMk (k + 1)).length = (k + 1).succ ⊢ targetSum (lowerBoundMk (Nat.bit false (k + 1))) = (Nat.bit false (k + 1)).size
X : 0 < Nat.succ 1 X0 : ∀ (m : ℕ), m ≤ 2 * m b : Bool n k : ℕ h : targetSum (lowerBoundMk (k + 1)) = (k + 1).size h0 : ((2 * k + 2) :: lowerBoundMk (k + 1)).length = (k + 1).succ ⊢ (2 * k + 2) / (k + 1).succ = 1
Please generate a tactic in lean4 to solve the state. STATE: X : 0 < Nat.succ 1 X0 : ∀ (m : ℕ), m ≤ 2 * m b : Bool n k : ℕ h : targetSum (lowerBoundMk (k + 1)) = (k + 1).size h0 : ((2 * k + 2) :: lowerBoundMk (k + 1)).length = (k + 1).succ ⊢ targetSum (lowerBoundMk (Nat.bit false (k + 1))) = (Nat.bit false (k + 1)).size TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2021/A3/A3.lean
IMOSL.IMO2021A3.lowerBoundMk_targetSum
[114, 1]
[137, 78]
exact Nat.div_eq_of_lt_le ((one_mul _).trans_le <| Nat.add_le_add_right (X0 _) 2) (Nat.mul_lt_mul_of_pos_left (k + 1).lt_succ_self X)
X : 0 < Nat.succ 1 X0 : ∀ (m : ℕ), m ≤ 2 * m b : Bool n k : ℕ h : targetSum (lowerBoundMk (k + 1)) = (k + 1).size h0 : ((2 * k + 2) :: lowerBoundMk (k + 1)).length = (k + 1).succ ⊢ (2 * k + 2) / (k + 1).succ = 1
no goals
Please generate a tactic in lean4 to solve the state. STATE: X : 0 < Nat.succ 1 X0 : ∀ (m : ℕ), m ≤ 2 * m b : Bool n k : ℕ h : targetSum (lowerBoundMk (k + 1)) = (k + 1).size h0 : ((2 * k + 2) :: lowerBoundMk (k + 1)).length = (k + 1).succ ⊢ (2 * k + 2) / (k + 1).succ = 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2021/A3/A3.lean
IMOSL.IMO2021A3.lowerBoundMk_targetSum
[114, 1]
[137, 78]
have h0 : ((2 * n + 1) :: lowerBoundMk n).length = n.succ := congr_arg Nat.succ (lowerBoundMk_length n)
X : 0 < Nat.succ 1 X0 : ∀ (m : ℕ), m ≤ 2 * m b : Bool n✝ n : ℕ h : targetSum (lowerBoundMk n) = n.size ⊢ targetSum (lowerBoundMk (Nat.bit true n)) = (Nat.bit true n).size
X : 0 < Nat.succ 1 X0 : ∀ (m : ℕ), m ≤ 2 * m b : Bool n✝ n : ℕ h : targetSum (lowerBoundMk n) = n.size h0 : ((2 * n + 1) :: lowerBoundMk n).length = n.succ ⊢ targetSum (lowerBoundMk (Nat.bit true n)) = (Nat.bit true n).size
Please generate a tactic in lean4 to solve the state. STATE: X : 0 < Nat.succ 1 X0 : ∀ (m : ℕ), m ≤ 2 * m b : Bool n✝ n : ℕ h : targetSum (lowerBoundMk n) = n.size ⊢ targetSum (lowerBoundMk (Nat.bit true n)) = (Nat.bit true n).size TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2021/A3/A3.lean
IMOSL.IMO2021A3.lowerBoundMk_targetSum
[114, 1]
[137, 78]
rw [lowerBoundMk_bit1, Nat.bit_true, Nat.size_bit1, targetSum_map_add_iota_length_succ h0, targetSum, h0, h, n.size.succ_eq_add_one, add_comm, Nat.add_right_inj]
X : 0 < Nat.succ 1 X0 : ∀ (m : ℕ), m ≤ 2 * m b : Bool n✝ n : ℕ h : targetSum (lowerBoundMk n) = n.size h0 : ((2 * n + 1) :: lowerBoundMk n).length = n.succ ⊢ targetSum (lowerBoundMk (Nat.bit true n)) = (Nat.bit true n).size
X : 0 < Nat.succ 1 X0 : ∀ (m : ℕ), m ≤ 2 * m b : Bool n✝ n : ℕ h : targetSum (lowerBoundMk n) = n.size h0 : ((2 * n + 1) :: lowerBoundMk n).length = n.succ ⊢ (2 * n + 1) / n.succ = 1
Please generate a tactic in lean4 to solve the state. STATE: X : 0 < Nat.succ 1 X0 : ∀ (m : ℕ), m ≤ 2 * m b : Bool n✝ n : ℕ h : targetSum (lowerBoundMk n) = n.size h0 : ((2 * n + 1) :: lowerBoundMk n).length = n.succ ⊢ targetSum (lowerBoundMk (Nat.bit true n)) = (Nat.bit true n).size TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2021/A3/A3.lean
IMOSL.IMO2021A3.lowerBoundMk_targetSum
[114, 1]
[137, 78]
exact Nat.div_eq_of_lt_le ((one_mul _).trans_le <| Nat.succ_le_succ (X0 _)) (Nat.le_refl _)
X : 0 < Nat.succ 1 X0 : ∀ (m : ℕ), m ≤ 2 * m b : Bool n✝ n : ℕ h : targetSum (lowerBoundMk n) = n.size h0 : ((2 * n + 1) :: lowerBoundMk n).length = n.succ ⊢ (2 * n + 1) / n.succ = 1
no goals
Please generate a tactic in lean4 to solve the state. STATE: X : 0 < Nat.succ 1 X0 : ∀ (m : ℕ), m ≤ 2 * m b : Bool n✝ n : ℕ h : targetSum (lowerBoundMk n) = n.size h0 : ((2 * n + 1) :: lowerBoundMk n).length = n.succ ⊢ (2 * n + 1) / n.succ = 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A1/A1.lean
IMOSL.IMO2014A1.d_zero
[29, 1]
[30, 72]
rw [d, sum_range_one, Int.Nat.cast_ofNat_Int, Int.zero_mul, sub_zero]
z : ℕ → ℤ ⊢ d z 0 = z 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: z : ℕ → ℤ ⊢ d z 0 = z 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A1/A1.lean
IMOSL.IMO2014A1.d_succ
[32, 1]
[35, 52]
rw [d, sum_range_succ, Int.natCast_add, Int.natCast_one, add_one_mul (α := ℤ), add_sub_add_right_eq_sub]
z : ℕ → ℤ n : ℕ ⊢ d z (n + 1) = (range (n + 1)).sum z - ↑n * z (n + 1)
no goals
Please generate a tactic in lean4 to solve the state. STATE: z : ℕ → ℤ n : ℕ ⊢ d z (n + 1) = (range (n + 1)).sum z - ↑n * z (n + 1) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A1/A1.lean
IMOSL.IMO2014A1.d_one
[37, 1]
[38, 64]
rw [d_succ, sum_range_one, Nat.cast_zero, zero_mul, sub_zero]
z : ℕ → ℤ ⊢ d z 1 = z 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: z : ℕ → ℤ ⊢ d z 1 = z 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A1/A1.lean
IMOSL.IMO2014A1.main_lemma
[42, 1]
[45, 79]
rw [d_succ, d, sub_sub, ← mul_add_one (α := ℤ)]
z : ℕ → ℤ h : StrictMono z n : ℕ ⊢ d z (n + 1) ≤ d z n - ↑n
z : ℕ → ℤ h : StrictMono z n : ℕ ⊢ (range (n + 1)).sum z - ↑n * z (n + 1) ≤ (range (n + 1)).sum z - ↑n * (z n + 1)
Please generate a tactic in lean4 to solve the state. STATE: z : ℕ → ℤ h : StrictMono z n : ℕ ⊢ d z (n + 1) ≤ d z n - ↑n TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A1/A1.lean
IMOSL.IMO2014A1.main_lemma
[42, 1]
[45, 79]
exact Int.sub_le_sub_left (Int.mul_le_mul_of_nonneg_left (h n.lt_succ_self) (Int.ofNat_zero_le n)) _
z : ℕ → ℤ h : StrictMono z n : ℕ ⊢ (range (n + 1)).sum z - ↑n * z (n + 1) ≤ (range (n + 1)).sum z - ↑n * (z n + 1)
no goals
Please generate a tactic in lean4 to solve the state. STATE: z : ℕ → ℤ h : StrictMono z n : ℕ ⊢ (range (n + 1)).sum z - ↑n * z (n + 1) ≤ (range (n + 1)).sum z - ↑n * (z n + 1) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A1/A1.lean
IMOSL.IMO2014A1.binom_bound
[47, 1]
[53, 76]
rw [Nat.choose, Nat.choose_one_right, Nat.cast_add, ← sub_sub, sub_right_comm]
z : ℕ → ℤ h : StrictMono z n : ℕ ⊢ d z (n + 1) ≤ z 0 - ↑((n + 1).choose 2)
z : ℕ → ℤ h : StrictMono z n : ℕ ⊢ d z (n + 1) ≤ z 0 - ↑(n.choose (1 + 1)) - ↑n
Please generate a tactic in lean4 to solve the state. STATE: z : ℕ → ℤ h : StrictMono z n : ℕ ⊢ d z (n + 1) ≤ z 0 - ↑((n + 1).choose 2) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A1/A1.lean
IMOSL.IMO2014A1.binom_bound
[47, 1]
[53, 76]
exact Int.le_sub_right_of_add_le <| (Int.add_le_of_le_sub_right (main_lemma h n)).trans (binom_bound n)
z : ℕ → ℤ h : StrictMono z n : ℕ ⊢ d z (n + 1) ≤ z 0 - ↑(n.choose (1 + 1)) - ↑n
no goals
Please generate a tactic in lean4 to solve the state. STATE: z : ℕ → ℤ h : StrictMono z n : ℕ ⊢ d z (n + 1) ≤ z 0 - ↑(n.choose (1 + 1)) - ↑n TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A1/A1.lean
IMOSL.IMO2014A1.final_solution_part2
[103, 1]
[107, 37]
rw [eq_greatestDPos_iff h h0, d_succ]
z : ℕ → ℤ h : StrictMono z h0 : 0 < z 0 N : ℕ ⊢ N = greatestDPos h ↔ ↑N * z N < (range (N + 1)).sum z ∧ (range (N + 1)).sum z ≤ ↑N * z (N + 1)
z : ℕ → ℤ h : StrictMono z h0 : 0 < z 0 N : ℕ ⊢ 0 < d z N ∧ (range (N + 1)).sum z - ↑N * z (N + 1) ≤ 0 ↔ ↑N * z N < (range (N + 1)).sum z ∧ (range (N + 1)).sum z ≤ ↑N * z (N + 1)
Please generate a tactic in lean4 to solve the state. STATE: z : ℕ → ℤ h : StrictMono z h0 : 0 < z 0 N : ℕ ⊢ N = greatestDPos h ↔ ↑N * z N < (range (N + 1)).sum z ∧ (range (N + 1)).sum z ≤ ↑N * z (N + 1) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A1/A1.lean
IMOSL.IMO2014A1.final_solution_part2
[103, 1]
[107, 37]
exact and_congr sub_pos sub_nonpos
z : ℕ → ℤ h : StrictMono z h0 : 0 < z 0 N : ℕ ⊢ 0 < d z N ∧ (range (N + 1)).sum z - ↑N * z (N + 1) ≤ 0 ↔ ↑N * z N < (range (N + 1)).sum z ∧ (range (N + 1)).sum z ≤ ↑N * z (N + 1)
no goals
Please generate a tactic in lean4 to solve the state. STATE: z : ℕ → ℤ h : StrictMono z h0 : 0 < z 0 N : ℕ ⊢ 0 < d z N ∧ (range (N + 1)).sum z - ↑N * z (N + 1) ≤ 0 ↔ ↑N * z N < (range (N + 1)).sum z ∧ (range (N + 1)).sum z ≤ ↑N * z (N + 1) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.Eq1
[30, 1]
[32, 87]
have h0 := hf.is_good (x + 1) (-1)
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x : R ⊢ f (-x) = f (x + 1) * f (-1) + f x
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x : R h0 : f ((x + 1) * -1 + 1) = f (x + 1) * f (-1) + f (x + 1 + -1) ⊢ f (-x) = f (x + 1) * f (-1) + f x
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x : R ⊢ f (-x) = f (x + 1) * f (-1) + f x TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.Eq1
[30, 1]
[32, 87]
rwa [add_neg_cancel_right, mul_neg_one (x + 1), neg_add, neg_add_cancel_right] at h0
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x : R h0 : f ((x + 1) * -1 + 1) = f (x + 1) * f (-1) + f (x + 1 + -1) ⊢ f (-x) = f (x + 1) * f (-1) + f x
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x : R h0 : f ((x + 1) * -1 + 1) = f (x + 1) * f (-1) + f (x + 1 + -1) ⊢ f (-x) = f (x + 1) * f (-1) + f x TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.Eq2
[35, 1]
[40, 38]
replace hf := Eq1 hf
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x : R ⊢ f (-x) = -f (x + 2)
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S h : f (-1) ≠ 0 x : R hf : ∀ (x : R), f (-x) = f (x + 1) * f (-1) + f x ⊢ f (-x) = -f (x + 2)
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x : R ⊢ f (-x) = -f (x + 2) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.Eq2
[35, 1]
[40, 38]
have h0 := hf (-(x + 1))
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S h : f (-1) ≠ 0 x : R hf : ∀ (x : R), f (-x) = f (x + 1) * f (-1) + f x ⊢ f (-x) = -f (x + 2)
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S h : f (-1) ≠ 0 x : R hf : ∀ (x : R), f (-x) = f (x + 1) * f (-1) + f x h0 : f (- -(x + 1)) = f (-(x + 1) + 1) * f (-1) + f (-(x + 1)) ⊢ f (-x) = -f (x + 2)
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S h : f (-1) ≠ 0 x : R hf : ∀ (x : R), f (-x) = f (x + 1) * f (-1) + f x ⊢ f (-x) = -f (x + 2) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.Eq2
[35, 1]
[40, 38]
rw [neg_neg, hf (x + 1), neg_add, neg_add_cancel_right, ← add_assoc, self_eq_add_left, ← add_mul, mul_eq_zero, or_iff_left h, add_assoc, one_add_one_eq_two] at h0
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S h : f (-1) ≠ 0 x : R hf : ∀ (x : R), f (-x) = f (x + 1) * f (-1) + f x h0 : f (- -(x + 1)) = f (-(x + 1) + 1) * f (-1) + f (-(x + 1)) ⊢ f (-x) = -f (x + 2)
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S h : f (-1) ≠ 0 x : R hf : ∀ (x : R), f (-x) = f (x + 1) * f (-1) + f x h0 : f (-x) + f (x + 2) = 0 ⊢ f (-x) = -f (x + 2)
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S h : f (-1) ≠ 0 x : R hf : ∀ (x : R), f (-x) = f (x + 1) * f (-1) + f x h0 : f (- -(x + 1)) = f (-(x + 1) + 1) * f (-1) + f (-(x + 1)) ⊢ f (-x) = -f (x + 2) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.Eq2
[35, 1]
[40, 38]
exact eq_neg_of_add_eq_zero_left h0
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S h : f (-1) ≠ 0 x : R hf : ∀ (x : R), f (-x) = f (x + 1) * f (-1) + f x h0 : f (-x) + f (x + 2) = 0 ⊢ f (-x) = -f (x + 2)
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S h : f (-1) ≠ 0 x : R hf : ∀ (x : R), f (-x) = f (x + 1) * f (-1) + f x h0 : f (-x) + f (x + 2) = 0 ⊢ f (-x) = -f (x + 2) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.map_two
[42, 1]
[43, 66]
rw [← zero_add 2, ← neg_inj, ← Eq2 hf h, neg_zero, hf.map_zero]
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 ⊢ f 2 = 1
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 ⊢ f 2 = 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.Eq3
[46, 1]
[47, 54]
rw [neg_add, ← hf.is_good, neg_mul_neg, hf.is_good]
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x y : R ⊢ f (-x) * f (-y) + f (-(x + y)) = 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_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x y : R ⊢ f (-x) * f (-y) + f (-(x + y)) = f x * f y + f (x + y) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.Eq4
[50, 1]
[51, 79]
rw [hf.is_good, map_two hf h, one_mul, add_comm 2, Eq2 hf h, sub_neg_eq_add]
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x : R ⊢ f (2 * x + 1) = f x - f (-x)
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x : R ⊢ f (2 * x + 1) = f x - f (-x) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.Eq5
[54, 1]
[66, 27]
have h0 : f x * f x - f (-x) * f (-x) = (f x - f (-x)) * (f x + f (-x)) := by have h0 : x * -x = -x * x := by rw [mul_neg, neg_mul] rw [sub_mul, mul_add, mul_add, map_commute_of_commute hf.is_good h0, add_comm, add_sub_add_left_eq_sub]
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x : R ⊢ f (x + 1) = 0 ∨ f x + f (-x) = f (-1)
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x : R h0 : f x * f x - f (-x) * f (-x) = (f x - f (-x)) * (f x + f (-x)) ⊢ f (x + 1) = 0 ∨ f x + f (-x) = f (-1)
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x : R ⊢ f (x + 1) = 0 ∨ f x + f (-x) = f (-1) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.Eq5
[54, 1]
[66, 27]
have h1 := Eq3 hf x x
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x : R h0 : f x * f x - f (-x) * f (-x) = (f x - f (-x)) * (f x + f (-x)) ⊢ f (x + 1) = 0 ∨ f x + f (-x) = f (-1)
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x : R h0 : f x * f x - f (-x) * f (-x) = (f x - f (-x)) * (f x + f (-x)) h1 : f (-x) * f (-x) + f (-(x + x)) = f x * f x + f (x + x) ⊢ f (x + 1) = 0 ∨ f x + f (-x) = f (-1)
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x : R h0 : f x * f x - f (-x) * f (-x) = (f x - f (-x)) * (f x + f (-x)) ⊢ f (x + 1) = 0 ∨ f x + f (-x) = f (-1) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.Eq5
[54, 1]
[66, 27]
rw [add_comm, ← sub_eq_sub_iff_add_eq_add, h0, Eq1 hf, add_sub_cancel_right, ← two_mul, Eq4 hf h, ← sub_eq_zero, ← mul_sub, mul_eq_zero] at h1
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x : R h0 : f x * f x - f (-x) * f (-x) = (f x - f (-x)) * (f x + f (-x)) h1 : f (-x) * f (-x) + f (-(x + x)) = f x * f x + f (x + x) ⊢ f (x + 1) = 0 ∨ f x + f (-x) = f (-1)
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x : R h0 : f x * f x - f (-x) * f (-x) = (f x - f (-x)) * (f x + f (-x)) h1 : f x - f (-x) = 0 ∨ f (-1) - (f x + f (-x)) = 0 ⊢ f (x + 1) = 0 ∨ f x + f (-x) = f (-1)
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x : R h0 : f x * f x - f (-x) * f (-x) = (f x - f (-x)) * (f x + f (-x)) h1 : f (-x) * f (-x) + f (-(x + x)) = f x * f x + f (x + x) ⊢ f (x + 1) = 0 ∨ f x + f (-x) = f (-1) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.Eq5
[54, 1]
[66, 27]
refine h1.imp (λ h1 ↦ ?_) (λ h1 ↦ (eq_of_sub_eq_zero h1).symm)
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x : R h0 : f x * f x - f (-x) * f (-x) = (f x - f (-x)) * (f x + f (-x)) h1 : f x - f (-x) = 0 ∨ f (-1) - (f x + f (-x)) = 0 ⊢ f (x + 1) = 0 ∨ f x + f (-x) = f (-1)
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x : R h0 : f x * f x - f (-x) * f (-x) = (f x - f (-x)) * (f x + f (-x)) h1✝ : f x - f (-x) = 0 ∨ f (-1) - (f x + f (-x)) = 0 h1 : f x - f (-x) = 0 ⊢ f (x + 1) = 0
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x : R h0 : f x * f x - f (-x) * f (-x) = (f x - f (-x)) * (f x + f (-x)) h1 : f x - f (-x) = 0 ∨ f (-1) - (f x + f (-x)) = 0 ⊢ f (x + 1) = 0 ∨ f x + f (-x) = f (-1) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.Eq5
[54, 1]
[66, 27]
rw [Eq1 hf, sub_add_cancel_right, neg_eq_zero, mul_eq_zero] at h1
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x : R h0 : f x * f x - f (-x) * f (-x) = (f x - f (-x)) * (f x + f (-x)) h1✝ : f x - f (-x) = 0 ∨ f (-1) - (f x + f (-x)) = 0 h1 : f x - f (-x) = 0 ⊢ f (x + 1) = 0
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x : R h0 : f x * f x - f (-x) * f (-x) = (f x - f (-x)) * (f x + f (-x)) h1✝ : f x - f (-x) = 0 ∨ f (-1) - (f x + f (-x)) = 0 h1 : f (x + 1) = 0 ∨ f (-1) = 0 ⊢ f (x + 1) = 0
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x : R h0 : f x * f x - f (-x) * f (-x) = (f x - f (-x)) * (f x + f (-x)) h1✝ : f x - f (-x) = 0 ∨ f (-1) - (f x + f (-x)) = 0 h1 : f x - f (-x) = 0 ⊢ f (x + 1) = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.Eq5
[54, 1]
[66, 27]
exact h1.resolve_right h
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x : R h0 : f x * f x - f (-x) * f (-x) = (f x - f (-x)) * (f x + f (-x)) h1✝ : f x - f (-x) = 0 ∨ f (-1) - (f x + f (-x)) = 0 h1 : f (x + 1) = 0 ∨ f (-1) = 0 ⊢ f (x + 1) = 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x : R h0 : f x * f x - f (-x) * f (-x) = (f x - f (-x)) * (f x + f (-x)) h1✝ : f x - f (-x) = 0 ∨ f (-1) - (f x + f (-x)) = 0 h1 : f (x + 1) = 0 ∨ f (-1) = 0 ⊢ f (x + 1) = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.Eq5
[54, 1]
[66, 27]
have h0 : x * -x = -x * x := by rw [mul_neg, neg_mul]
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x : R ⊢ f x * f x - f (-x) * f (-x) = (f x - f (-x)) * (f x + f (-x))
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x : R h0 : x * -x = -x * x ⊢ f x * f x - f (-x) * f (-x) = (f x - f (-x)) * (f x + f (-x))
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x : R ⊢ f x * f x - f (-x) * f (-x) = (f x - f (-x)) * (f x + f (-x)) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.Eq5
[54, 1]
[66, 27]
rw [sub_mul, mul_add, mul_add, map_commute_of_commute hf.is_good h0, add_comm, add_sub_add_left_eq_sub]
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x : R h0 : x * -x = -x * x ⊢ f x * f x - f (-x) * f (-x) = (f x - f (-x)) * (f x + f (-x))
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x : R h0 : x * -x = -x * x ⊢ f x * f x - f (-x) * f (-x) = (f x - f (-x)) * (f x + f (-x)) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.Eq5
[54, 1]
[66, 27]
rw [mul_neg, neg_mul]
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x : R ⊢ x * -x = -x * x
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x : R ⊢ x * -x = -x * x TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.Eq6
[69, 1]
[86, 56]
have h1 := Eq1 hf x
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x : R h0 : f (x + 1) = 0 ⊢ f x = -1
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x : R h0 : f (x + 1) = 0 h1 : f (-x) = f (x + 1) * f (-1) + f x ⊢ f x = -1
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x : R h0 : f (x + 1) = 0 ⊢ f x = -1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.Eq6
[69, 1]
[86, 56]
rw [h0, zero_mul, zero_add] at h1
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x : R h0 : f (x + 1) = 0 h1 : f (-x) = f (x + 1) * f (-1) + f x ⊢ f x = -1
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x : R h0 : f (x + 1) = 0 h1 : f (-x) = f x ⊢ f x = -1
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x : R h0 : f (x + 1) = 0 h1 : f (-x) = f (x + 1) * f (-1) + f x ⊢ f x = -1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.Eq6
[69, 1]
[86, 56]
have h2 := Eq3 hf x (-(x + 1))
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x : R h0 : f (x + 1) = 0 h1 : f (-x) = f x ⊢ f x = -1
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x : R h0 : f (x + 1) = 0 h1 : f (-x) = f x h2 : f (-x) * f (- -(x + 1)) + f (-(x + -(x + 1))) = f x * f (-(x + 1)) + f (x + -(x + 1)) ⊢ f x = -1
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x : R h0 : f (x + 1) = 0 h1 : f (-x) = f x ⊢ f x = -1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.Eq6
[69, 1]
[86, 56]
rw [neg_neg, h0, mul_zero, zero_add, ← sub_eq_add_neg, sub_add_cancel_left, neg_neg, hf.map_one] at h2
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x : R h0 : f (x + 1) = 0 h1 : f (-x) = f x h2 : f (-x) * f (- -(x + 1)) + f (-(x + -(x + 1))) = f x * f (-(x + 1)) + f (x + -(x + 1)) ⊢ f x = -1
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x : R h0 : f (x + 1) = 0 h1 : f (-x) = f x h2 : 0 = f x * f (-(x + 1)) + f (-1) ⊢ f x = -1
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x : R h0 : f (x + 1) = 0 h1 : f (-x) = f x h2 : f (-x) * f (- -(x + 1)) + f (-(x + -(x + 1))) = f x * f (-(x + 1)) + f (x + -(x + 1)) ⊢ f x = -1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.Eq6
[69, 1]
[86, 56]
have h3 := Eq3 hf x (x + 1)
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x : R h0 : f (x + 1) = 0 h1 : f (-x) = f x h2 : 0 = f x * f (-(x + 1)) + f (-1) ⊢ f x = -1
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x : R h0 : f (x + 1) = 0 h1 : f (-x) = f x h2 : 0 = f x * f (-(x + 1)) + f (-1) h3 : f (-x) * f (-(x + 1)) + f (-(x + (x + 1))) = f x * f (x + 1) + f (x + (x + 1)) ⊢ f x = -1
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x : R h0 : f (x + 1) = 0 h1 : f (-x) = f x h2 : 0 = f x * f (-(x + 1)) + f (-1) ⊢ f x = -1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.Eq6
[69, 1]
[86, 56]
rw [h0, mul_zero, zero_add, ← add_assoc, ← two_mul, Eq4 hf h, h1, sub_self, h2, add_right_inj] at h3
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x : R h0 : f (x + 1) = 0 h1 : f (-x) = f x h2 : 0 = f x * f (-(x + 1)) + f (-1) h3 : f (-x) * f (-(x + 1)) + f (-(x + (x + 1))) = f x * f (x + 1) + f (x + (x + 1)) ⊢ f x = -1
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x : R h0 : f (x + 1) = 0 h1 : f (-x) = f x h2 : 0 = f x * f (-(x + 1)) + f (-1) h3 : f (-(2 * x + 1)) = f (-1) ⊢ f x = -1
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x : R h0 : f (x + 1) = 0 h1 : f (-x) = f x h2 : 0 = f x * f (-(x + 1)) + f (-1) h3 : f (-x) * f (-(x + 1)) + f (-(x + (x + 1))) = f x * f (x + 1) + f (x + (x + 1)) ⊢ f x = -1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.Eq6
[69, 1]
[86, 56]
replace h2 := Eq4 hf h (-x - 1)
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x : R h0 : f (x + 1) = 0 h1 : f (-x) = f x h2 : 0 = f x * f (-(x + 1)) + f (-1) h3 : f (-(2 * x + 1)) = f (-1) ⊢ f x = -1
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x : R h0 : f (x + 1) = 0 h1 : f (-x) = f x h3 : f (-(2 * x + 1)) = f (-1) h2 : f (2 * (-x - 1) + 1) = f (-x - 1) - f (-(-x - 1)) ⊢ f x = -1
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x : R h0 : f (x + 1) = 0 h1 : f (-x) = f x h2 : 0 = f x * f (-(x + 1)) + f (-1) h3 : f (-(2 * x + 1)) = f (-1) ⊢ f x = -1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.Eq6
[69, 1]
[86, 56]
rw [two_mul, add_assoc, sub_add_cancel, ← add_sub_right_comm, ← two_mul, mul_neg, ← neg_add', h3, eq_comm, Eq1 hf, sub_add_cancel_right, sub_add_cancel, neg_eq_iff_add_eq_zero, h1, ← add_one_mul (f x), mul_eq_zero] at h2
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x : R h0 : f (x + 1) = 0 h1 : f (-x) = f x h3 : f (-(2 * x + 1)) = f (-1) h2 : f (2 * (-x - 1) + 1) = f (-x - 1) - f (-(-x - 1)) ⊢ f x = -1
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x : R h0 : f (x + 1) = 0 h1 : f (-x) = f x h3 : f (-(2 * x + 1)) = f (-1) h2 : f x + 1 = 0 ∨ f (-1) = 0 ⊢ f x = -1
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x : R h0 : f (x + 1) = 0 h1 : f (-x) = f x h3 : f (-(2 * x + 1)) = f (-1) h2 : f (2 * (-x - 1) + 1) = f (-x - 1) - f (-(-x - 1)) ⊢ f x = -1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.Eq6
[69, 1]
[86, 56]
exact eq_neg_of_add_eq_zero_left (h2.resolve_right h)
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x : R h0 : f (x + 1) = 0 h1 : f (-x) = f x h3 : f (-(2 * x + 1)) = f (-1) h2 : f x + 1 = 0 ∨ f (-1) = 0 ⊢ f x = -1
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 x : R h0 : f (x + 1) = 0 h1 : f (-x) = f x h3 : f (-(2 * x + 1)) = f (-1) h2 : f x + 1 = 0 ∨ f (-1) = 0 ⊢ f x = -1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.map_neg_one_cases
[88, 1]
[95, 78]
rw [← sub_eq_zero (b := 1), eq_neg_iff_add_eq_zero, ← mul_eq_zero, mul_sub_one, add_mul, two_mul, add_sub_assoc, add_sub_add_left_eq_sub]
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 ⊢ f (-1) = -2 ∨ f (-1) = 1
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 ⊢ f (-1) * f (-1) + (f (-1) - 2) = 0
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 ⊢ f (-1) = -2 ∨ f (-1) = 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.map_neg_one_cases
[88, 1]
[95, 78]
have h0 := Eq5 hf h (-1 + -1)
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 ⊢ f (-1) * f (-1) + (f (-1) - 2) = 0
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 h0 : f (-1 + -1 + 1) = 0 ∨ f (-1 + -1) + f (-(-1 + -1)) = f (-1) ⊢ f (-1) * f (-1) + (f (-1) - 2) = 0
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 ⊢ f (-1) * f (-1) + (f (-1) - 2) = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.map_neg_one_cases
[88, 1]
[95, 78]
rw [neg_add_cancel_right, or_iff_right h, ← eq_sub_iff_add_eq] at h0
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 h0 : f (-1 + -1 + 1) = 0 ∨ f (-1 + -1) + f (-(-1 + -1)) = f (-1) ⊢ f (-1) * f (-1) + (f (-1) - 2) = 0
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 h0 : f (-1 + -1) = f (-1) - f (-(-1 + -1)) ⊢ f (-1) * f (-1) + (f (-1) - 2) = 0
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 h0 : f (-1 + -1 + 1) = 0 ∨ f (-1 + -1) + f (-(-1 + -1)) = f (-1) ⊢ f (-1) * f (-1) + (f (-1) - 2) = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.map_neg_one_cases
[88, 1]
[95, 78]
have h1 := hf.is_good (-1) (-1)
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 h0 : f (-1 + -1) = f (-1) - f (-(-1 + -1)) ⊢ f (-1) * f (-1) + (f (-1) - 2) = 0
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 h0 : f (-1 + -1) = f (-1) - f (-(-1 + -1)) h1 : f (-1 * -1 + 1) = f (-1) * f (-1) + f (-1 + -1) ⊢ f (-1) * f (-1) + (f (-1) - 2) = 0
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 h0 : f (-1 + -1) = f (-1) - f (-(-1 + -1)) ⊢ f (-1) * f (-1) + (f (-1) - 2) = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.map_neg_one_cases
[88, 1]
[95, 78]
rwa [h0, neg_mul_neg, one_mul, ← neg_add, neg_neg, one_add_one_eq_two, map_two hf h, eq_comm, ← sub_eq_zero, add_sub_assoc, sub_sub, one_add_one_eq_two] at h1
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 h0 : f (-1 + -1) = f (-1) - f (-(-1 + -1)) h1 : f (-1 * -1 + 1) = f (-1) * f (-1) + f (-1 + -1) ⊢ f (-1) * f (-1) + (f (-1) - 2) = 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 h0 : f (-1 + -1) = f (-1) - f (-(-1 + -1)) h1 : f (-1 * -1 + 1) = f (-1) * f (-1) + f (-1 + -1) ⊢ f (-1) * f (-1) + (f (-1) - 2) = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.Subcase11_solution
[101, 1]
[110, 88]
rcases Eq5 hf h x with h2 | h2
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 h0 : f (-1) = -2 x : R ⊢ f (x + 1) = f x + 1
case inl R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 h0 : f (-1) = -2 x : R h2 : f (x + 1) = 0 ⊢ f (x + 1) = f x + 1 case inr R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 h0 : f (-1) = -2 x : R h2 : f x + f (-x) = f (-1) ⊢ f (x + 1) = f x + 1
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 h0 : f (-1) = -2 x : R ⊢ f (x + 1) = f x + 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.Subcase11_solution
[101, 1]
[110, 88]
rw [Eq6 hf h h2, h2, neg_add_self]
case inl R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 h0 : f (-1) = -2 x : R h2 : f (x + 1) = 0 ⊢ f (x + 1) = f x + 1
no goals
Please generate a tactic in lean4 to solve the state. STATE: case inl R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 h0 : f (-1) = -2 x : R h2 : f (x + 1) = 0 ⊢ f (x + 1) = f x + 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.Subcase11_solution
[101, 1]
[110, 88]
rw [Eq1 hf, h0, add_left_comm, ← mul_two, mul_neg, ← neg_mul, ← add_mul, eq_neg_iff_add_eq_zero, ← add_one_mul _ (2 : S), mul_eq_zero, add_assoc] at h2
case inr R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 h0 : f (-1) = -2 x : R h2 : f x + f (-x) = f (-1) ⊢ f (x + 1) = f x + 1
case inr R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 h0 : f (-1) = -2 x : R h2 : -f (x + 1) + (f x + 1) = 0 ∨ 2 = 0 ⊢ f (x + 1) = f x + 1
Please generate a tactic in lean4 to solve the state. STATE: case inr R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 h0 : f (-1) = -2 x : R h2 : f x + f (-x) = f (-1) ⊢ f (x + 1) = f x + 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.Subcase11_solution
[101, 1]
[110, 88]
exact neg_add_eq_zero.mp (h2.resolve_right (neg_ne_zero.mp (h0.symm.trans_ne h)))
case inr R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 h0 : f (-1) = -2 x : R h2 : -f (x + 1) + (f x + 1) = 0 ∨ 2 = 0 ⊢ f (x + 1) = f x + 1
no goals
Please generate a tactic in lean4 to solve the state. STATE: case inr R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : NontrivialGood f h : f (-1) ≠ 0 h0 : f (-1) = -2 x : R h2 : -f (x + 1) + (f x + 1) = 0 ∨ 2 = 0 ⊢ f (x + 1) = f x + 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.GoodSubcase12.map_neg_one_ne_zero
[126, 1]
[127, 77]
rw [← mul_one (3 : S), ← hf.map_neg_one, h, mul_zero]
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f h : f (-1) = 0 ⊢ 3 = 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f h : f (-1) = 0 ⊢ 3 = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.GoodSubcase12.eq_zero_of_map_add_one
[129, 1]
[138, 89]
have h0 (x) : f (-x) = f (x + 1) + f x := by rw [Eq1 hf.toNontrivialGood, hf.map_neg_one, mul_one]
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f x : R h : f (x + 1) = 0 ⊢ x = 0
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f x : R h : f (x + 1) = 0 h0 : ∀ (x : R), f (-x) = f (x + 1) + f x ⊢ x = 0
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f x : R h : f (x + 1) = 0 ⊢ x = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.GoodSubcase12.eq_zero_of_map_add_one
[129, 1]
[138, 89]
have h1 : f (-x) = f x := by rw [h0, h, zero_add]
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f x : R h : f (x + 1) = 0 h0 : ∀ (x : R), f (-x) = f (x + 1) + f x ⊢ x = 0
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f x : R h : f (x + 1) = 0 h0 : ∀ (x : R), f (-x) = f (x + 1) + f x h1 : f (-x) = f x ⊢ x = 0
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f x : R h : f (x + 1) = 0 h0 : ∀ (x : R), f (-x) = f (x + 1) + f x ⊢ x = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.GoodSubcase12.eq_zero_of_map_add_one
[129, 1]
[138, 89]
refine hf.period_imp_zero λ y ↦ ?_
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f x : R h : f (x + 1) = 0 h0 : ∀ (x : R), f (-x) = f (x + 1) + f x h1 : f (-x) = f x ⊢ x = 0
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f x : R h : f (x + 1) = 0 h0 : ∀ (x : R), f (-x) = f (x + 1) + f x h1 : f (-x) = f x y : R ⊢ f (y + x) = f y
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f x : R h : f (x + 1) = 0 h0 : ∀ (x : R), f (-x) = f (x + 1) + f x h1 : f (-x) = f x ⊢ x = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.GoodSubcase12.eq_zero_of_map_add_one
[129, 1]
[138, 89]
have h2 := Eq3 hf.toNontrivialGood x (y - 1)
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f x : R h : f (x + 1) = 0 h0 : ∀ (x : R), f (-x) = f (x + 1) + f x h1 : f (-x) = f x y : R ⊢ f (y + x) = f y
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f x : R h : f (x + 1) = 0 h0 : ∀ (x : R), f (-x) = f (x + 1) + f x h1 : f (-x) = f x y : R h2 : f (-x) * f (-(y - 1)) + f (-(x + (y - 1))) = f x * f (y - 1) + f (x + (y - 1)) ⊢ f (y + x) = f y
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f x : R h : f (x + 1) = 0 h0 : ∀ (x : R), f (-x) = f (x + 1) + f x h1 : f (-x) = f x y : R ⊢ f (y + x) = f y TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.GoodSubcase12.eq_zero_of_map_add_one
[129, 1]
[138, 89]
rwa [h1, Case1.Eq6 hf.toNontrivialGood (map_neg_one_ne_zero hf) h, neg_one_mul, neg_one_mul, h0, h0 (x + _), add_assoc, sub_add_cancel, ← add_assoc, add_left_inj, neg_add_rev, add_assoc, add_right_eq_self, neg_add_eq_zero, eq_comm, add_comm] at h2
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f x : R h : f (x + 1) = 0 h0 : ∀ (x : R), f (-x) = f (x + 1) + f x h1 : f (-x) = f x y : R h2 : f (-x) * f (-(y - 1)) + f (-(x + (y - 1))) = f x * f (y - 1) + f (x + (y - 1)) ⊢ f (y + x) = f y
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f x : R h : f (x + 1) = 0 h0 : ∀ (x : R), f (-x) = f (x + 1) + f x h1 : f (-x) = f x y : R h2 : f (-x) * f (-(y - 1)) + f (-(x + (y - 1))) = f x * f (y - 1) + f (x + (y - 1)) ⊢ f (y + x) = f y TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.GoodSubcase12.eq_zero_of_map_add_one
[129, 1]
[138, 89]
rw [Eq1 hf.toNontrivialGood, hf.map_neg_one, mul_one]
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f x✝ : R h : f (x✝ + 1) = 0 x : R ⊢ f (-x) = f (x + 1) + f x
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f x✝ : R h : f (x✝ + 1) = 0 x : R ⊢ f (-x) = f (x + 1) + f x TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.GoodSubcase12.eq_zero_of_map_add_one
[129, 1]
[138, 89]
rw [h0, h, zero_add]
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f x : R h : f (x + 1) = 0 h0 : ∀ (x : R), f (-x) = f (x + 1) + f x ⊢ f (-x) = f x
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f x : R h : f (x + 1) = 0 h0 : ∀ (x : R), f (-x) = f (x + 1) + f x ⊢ f (-x) = f x TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.GoodSubcase12.triple_sum_eq_zero
[144, 1]
[147, 68]
have h := Eq1 hf.toNontrivialGood x
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f x : R ⊢ f x + f (x + 1) + f (x + 2) = 0
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f x : R h : f (-x) = f (x + 1) * f (-1) + f x ⊢ f x + f (x + 1) + f (x + 2) = 0
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f x : R ⊢ f x + f (x + 1) + f (x + 2) = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.GoodSubcase12.triple_sum_eq_zero
[144, 1]
[147, 68]
rwa [Case1.Eq2 hf.toNontrivialGood (map_neg_one_ne_zero hf), hf.map_neg_one, mul_one, neg_eq_iff_add_eq_zero, add_comm, add_comm (f _)] at h
R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f x : R h : f (-x) = f (x + 1) * f (-1) + f x ⊢ f x + f (x + 1) + f (x + 2) = 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 S : Type u_1 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f x : R h : f (-x) = f (x + 1) * f (-1) + f x ⊢ f x + f (x + 1) + f (x + 2) = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.GoodSubcase12.Rchar
[149, 1]
[154, 69]
refine hf.period_imp_zero λ x ↦ ?_
R : Type u_1 S : Type ?u.32555 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f ⊢ 3 = 0
R : Type u_1 S : Type ?u.32555 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f x : R ⊢ f (x + 3) = f x
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 S : Type ?u.32555 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f ⊢ 3 = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.GoodSubcase12.Rchar
[149, 1]
[154, 69]
have h := triple_sum_eq_zero hf
R : Type u_1 S : Type ?u.32555 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f x : R ⊢ f (x + 3) = f x
R : Type u_1 S : Type ?u.32555 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f x : R h : ∀ (x : R), f x + f (x + 1) + f (x + 2) = 0 ⊢ f (x + 3) = f x
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 S : Type ?u.32555 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f x : R ⊢ f (x + 3) = f x TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.GoodSubcase12.Rchar
[149, 1]
[154, 69]
have h0 := h (x + 1)
R : Type u_1 S : Type ?u.32555 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f x : R h : ∀ (x : R), f x + f (x + 1) + f (x + 2) = 0 ⊢ f (x + 3) = f x
R : Type u_1 S : Type ?u.32555 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f x : R h : ∀ (x : R), f x + f (x + 1) + f (x + 2) = 0 h0 : f (x + 1) + f (x + 1 + 1) + f (x + 1 + 2) = 0 ⊢ f (x + 3) = f x
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 S : Type ?u.32555 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f x : R h : ∀ (x : R), f x + f (x + 1) + f (x + 2) = 0 ⊢ f (x + 3) = f x TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.GoodSubcase12.Rchar
[149, 1]
[154, 69]
rwa [add_assoc x, one_add_one_eq_two, ← add_rotate, ← h x, add_left_inj, add_left_inj, add_assoc, add_comm 1, two_add_one_eq_three] at h0
R : Type u_1 S : Type ?u.32555 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f x : R h : ∀ (x : R), f x + f (x + 1) + f (x + 2) = 0 h0 : f (x + 1) + f (x + 1 + 1) + f (x + 1 + 2) = 0 ⊢ f (x + 3) = f x
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 S : Type ?u.32555 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f x : R h : ∀ (x : R), f x + f (x + 1) + f (x + 2) = 0 h0 : f (x + 1) + f (x + 1 + 1) + f (x + 1 + 2) = 0 ⊢ f (x + 3) = f x TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.GoodSubcase12.value_bash
[156, 1]
[171, 19]
have h := eq_zero_or_map_neg_add_self hf
R : Type u_1 S : Type ?u.34262 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f x : R ⊢ x = 0 ∨ x = 1 ∨ x = -1
R : Type u_1 S : Type ?u.34262 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f x : R h : ∀ (x : R), x = 0 ∨ f x + f (-x) = 1 ⊢ x = 0 ∨ x = 1 ∨ x = -1
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 S : Type ?u.34262 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f x : R ⊢ x = 0 ∨ x = 1 ∨ x = -1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.GoodSubcase12.value_bash
[156, 1]
[171, 19]
refine (h x).imp_right λ h0 ↦ (h (x - 1)).imp eq_of_sub_eq_zero λ h1 ↦ eq_neg_of_add_eq_zero_left <| (h (x + 1)).resolve_right λ h2 ↦ ?_
R : Type u_1 S : Type ?u.34262 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f x : R h : ∀ (x : R), x = 0 ∨ f x + f (-x) = 1 ⊢ x = 0 ∨ x = 1 ∨ x = -1
R : Type u_1 S : Type ?u.34262 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f x : R h : ∀ (x : R), x = 0 ∨ f x + f (-x) = 1 h0 : f x + f (-x) = 1 h1 : f (x - 1) + f (-(x - 1)) = 1 h2 : f (x + 1) + f (-(x + 1)) = 1 ⊢ False
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 S : Type ?u.34262 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f x : R h : ∀ (x : R), x = 0 ∨ f x + f (-x) = 1 ⊢ x = 0 ∨ x = 1 ∨ x = -1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.GoodSubcase12.value_bash
[156, 1]
[171, 19]
replace h (x) : f x + f (x + 1) + f (x - 1) = 0 := by have h3 : (2 : R) = -1 := by rw [eq_neg_iff_add_eq_zero, two_add_one_eq_three, Rchar hf] rw [sub_eq_add_neg, ← h3, triple_sum_eq_zero hf]
R : Type u_1 S : Type ?u.34262 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f x : R h : ∀ (x : R), x = 0 ∨ f x + f (-x) = 1 h0 : f x + f (-x) = 1 h1 : f (x - 1) + f (-(x - 1)) = 1 h2 : f (x + 1) + f (-(x + 1)) = 1 ⊢ False
R : Type u_1 S : Type ?u.34262 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f x : R h0 : f x + f (-x) = 1 h1 : f (x - 1) + f (-(x - 1)) = 1 h2 : f (x + 1) + f (-(x + 1)) = 1 h : ∀ (x : R), f x + f (x + 1) + f (x - 1) = 0 ⊢ False
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 S : Type ?u.34262 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f x : R h : ∀ (x : R), x = 0 ∨ f x + f (-x) = 1 h0 : f x + f (-x) = 1 h1 : f (x - 1) + f (-(x - 1)) = 1 h2 : f (x + 1) + f (-(x + 1)) = 1 ⊢ False TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.GoodSubcase12.value_bash
[156, 1]
[171, 19]
rw [add_zero, ← neg_add', add_right_comm (f _), add_add_add_comm, add_add_add_comm (f _), h0, h2, neg_add_eq_sub, ← neg_sub x, h1, one_add_one_eq_two, two_add_one_eq_three] at h
R : Type u_1 S : Type ?u.34262 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f x : R h0 : f x + f (-x) = 1 h1 : f (x - 1) + f (-(x - 1)) = 1 h2 : f (x + 1) + f (-(x + 1)) = 1 h : f x + f (x + 1) + f (x - 1) + (f (-x) + f (-x + 1) + f (-x - 1)) = 0 + 0 ⊢ False
R : Type u_1 S : Type ?u.34262 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f x : R h0 : f x + f (-x) = 1 h1 : f (x - 1) + f (-(x - 1)) = 1 h2 : f (x + 1) + f (-(x + 1)) = 1 h : 3 = 0 ⊢ False
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 S : Type ?u.34262 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f x : R h0 : f x + f (-x) = 1 h1 : f (x - 1) + f (-(x - 1)) = 1 h2 : f (x + 1) + f (-(x + 1)) = 1 h : f x + f (x + 1) + f (x - 1) + (f (-x) + f (-x + 1) + f (-x - 1)) = 0 + 0 ⊢ False TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.GoodSubcase12.value_bash
[156, 1]
[171, 19]
exact hf.Schar h
R : Type u_1 S : Type ?u.34262 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f x : R h0 : f x + f (-x) = 1 h1 : f (x - 1) + f (-(x - 1)) = 1 h2 : f (x + 1) + f (-(x + 1)) = 1 h : 3 = 0 ⊢ False
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 S : Type ?u.34262 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f x : R h0 : f x + f (-x) = 1 h1 : f (x - 1) + f (-(x - 1)) = 1 h2 : f (x + 1) + f (-(x + 1)) = 1 h : 3 = 0 ⊢ False TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.GoodSubcase12.value_bash
[156, 1]
[171, 19]
have h3 : (2 : R) = -1 := by rw [eq_neg_iff_add_eq_zero, two_add_one_eq_three, Rchar hf]
R : Type u_1 S : Type ?u.34262 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f x✝ : R h : ∀ (x : R), x = 0 ∨ f x + f (-x) = 1 h0 : f x✝ + f (-x✝) = 1 h1 : f (x✝ - 1) + f (-(x✝ - 1)) = 1 h2 : f (x✝ + 1) + f (-(x✝ + 1)) = 1 x : R ⊢ f x + f (x + 1) + f (x - 1) = 0
R : Type u_1 S : Type ?u.34262 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f x✝ : R h : ∀ (x : R), x = 0 ∨ f x + f (-x) = 1 h0 : f x✝ + f (-x✝) = 1 h1 : f (x✝ - 1) + f (-(x✝ - 1)) = 1 h2 : f (x✝ + 1) + f (-(x✝ + 1)) = 1 x : R h3 : 2 = -1 ⊢ f x + f (x + 1) + f (x - 1) = 0
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 S : Type ?u.34262 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f x✝ : R h : ∀ (x : R), x = 0 ∨ f x + f (-x) = 1 h0 : f x✝ + f (-x✝) = 1 h1 : f (x✝ - 1) + f (-(x✝ - 1)) = 1 h2 : f (x✝ + 1) + f (-(x✝ + 1)) = 1 x : R ⊢ f x + f (x + 1) + f (x - 1) = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.GoodSubcase12.value_bash
[156, 1]
[171, 19]
rw [sub_eq_add_neg, ← h3, triple_sum_eq_zero hf]
R : Type u_1 S : Type ?u.34262 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f x✝ : R h : ∀ (x : R), x = 0 ∨ f x + f (-x) = 1 h0 : f x✝ + f (-x✝) = 1 h1 : f (x✝ - 1) + f (-(x✝ - 1)) = 1 h2 : f (x✝ + 1) + f (-(x✝ + 1)) = 1 x : R h3 : 2 = -1 ⊢ f x + f (x + 1) + f (x - 1) = 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 S : Type ?u.34262 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f x✝ : R h : ∀ (x : R), x = 0 ∨ f x + f (-x) = 1 h0 : f x✝ + f (-x✝) = 1 h1 : f (x✝ - 1) + f (-(x✝ - 1)) = 1 h2 : f (x✝ + 1) + f (-(x✝ + 1)) = 1 x : R h3 : 2 = -1 ⊢ f x + f (x + 1) + f (x - 1) = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.GoodSubcase12.value_bash
[156, 1]
[171, 19]
rw [eq_neg_iff_add_eq_zero, two_add_one_eq_three, Rchar hf]
R : Type u_1 S : Type ?u.34262 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f x✝ : R h : ∀ (x : R), x = 0 ∨ f x + f (-x) = 1 h0 : f x✝ + f (-x✝) = 1 h1 : f (x✝ - 1) + f (-(x✝ - 1)) = 1 h2 : f (x✝ + 1) + f (-(x✝ + 1)) = 1 x : R ⊢ 2 = -1
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 S : Type ?u.34262 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f x✝ : R h : ∀ (x : R), x = 0 ∨ f x + f (-x) = 1 h0 : f x✝ + f (-x✝) = 1 h1 : f (x✝ - 1) + f (-(x✝ - 1)) = 1 h2 : f (x✝ + 1) + f (-(x✝ + 1)) = 1 x : R ⊢ 2 = -1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.GoodSubcase12.solution
[173, 1]
[186, 78]
rw [h, neg_zero, ← h, hf.map_one]
R : Type u_1 S : Type u_2 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f h : 1 = 0 ⊢ f (-1) = 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 S : Type u_2 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f h : 1 = 0 ⊢ f (-1) = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.GoodSubcase12.solution
[173, 1]
[186, 78]
change f 0 = ((-1 : ℤ) : S)
R : Type u_1 S : Type u_2 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f h : Function.Bijective 𝔽₃.cast ⊢ f 𝔽₃.𝔽₃0.cast = ↑(𝔽₃Map1 𝔽₃.𝔽₃0)
R : Type u_1 S : Type u_2 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f h : Function.Bijective 𝔽₃.cast ⊢ f 0 = ↑(-1)
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 S : Type u_2 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f h : Function.Bijective 𝔽₃.cast ⊢ f 𝔽₃.𝔽₃0.cast = ↑(𝔽₃Map1 𝔽₃.𝔽₃0) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.GoodSubcase12.solution
[173, 1]
[186, 78]
rw [hf.map_zero, Int.cast_neg, Int.cast_one]
R : Type u_1 S : Type u_2 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f h : Function.Bijective 𝔽₃.cast ⊢ f 0 = ↑(-1)
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 S : Type u_2 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : GoodSubcase12 f h : Function.Bijective 𝔽₃.cast ⊢ f 0 = ↑(-1) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Cases/Case1.lean
IMOSL.IMO2012A5.Case1.solution
[194, 1]
[203, 51]
rwa [← two_add_one_eq_three, Ne, ← neg_eq_iff_add_eq_zero, ← h1, eq_comm]
R : Type u_1 S : Type u_2 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : ReducedGood f h : f (-1) ≠ 0 hf' : NontrivialGood f := hf.toNontrivialGood h0 : ¬f (-1) = -2 h1 : f (-1) = 1 ⊢ 3 ≠ 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 S : Type u_2 inst✝² : NonAssocRing R inst✝¹ : NonAssocRing S inst✝ : NoZeroDivisors S f : R → S hf : ReducedGood f h : f (-1) ≠ 0 hf' : NontrivialGood f := hf.toNontrivialGood h0 : ¬f (-1) = -2 h1 : f (-1) = 1 ⊢ 3 ≠ 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/Infinitesimal/Basic.lean
IMOSL.Extra.Infinitesimal.add
[30, 1]
[35, 33]
apply (nsmul_le_nsmul_right (abs_add ε₁ ε₂) k).trans_lt
R : Type u_1 inst✝ : LinearOrderedRing R ε₁ ε₂ : R h₁ : Infinitesimal ε₁ h₂ : Infinitesimal ε₂ k : ℕ ⊢ k • |ε₁ + ε₂| < 1
R : Type u_1 inst✝ : LinearOrderedRing R ε₁ ε₂ : R h₁ : Infinitesimal ε₁ h₂ : Infinitesimal ε₂ k : ℕ ⊢ k • (|ε₁| + |ε₂|) < 1
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝ : LinearOrderedRing R ε₁ ε₂ : R h₁ : Infinitesimal ε₁ h₂ : Infinitesimal ε₂ k : ℕ ⊢ k • |ε₁ + ε₂| < 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/Infinitesimal/Basic.lean
IMOSL.Extra.Infinitesimal.add
[30, 1]
[35, 33]
apply lt_of_nsmul_lt_nsmul_right 2
R : Type u_1 inst✝ : LinearOrderedRing R ε₁ ε₂ : R h₁ : Infinitesimal ε₁ h₂ : Infinitesimal ε₂ k : ℕ ⊢ k • (|ε₁| + |ε₂|) < 1
R : Type u_1 inst✝ : LinearOrderedRing R ε₁ ε₂ : R h₁ : Infinitesimal ε₁ h₂ : Infinitesimal ε₂ k : ℕ ⊢ 2 • k • (|ε₁| + |ε₂|) < 2 • 1
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝ : LinearOrderedRing R ε₁ ε₂ : R h₁ : Infinitesimal ε₁ h₂ : Infinitesimal ε₂ k : ℕ ⊢ k • (|ε₁| + |ε₂|) < 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/Infinitesimal/Basic.lean
IMOSL.Extra.Infinitesimal.add
[30, 1]
[35, 33]
rw [← mul_nsmul', nsmul_add, two_nsmul]
R : Type u_1 inst✝ : LinearOrderedRing R ε₁ ε₂ : R h₁ : Infinitesimal ε₁ h₂ : Infinitesimal ε₂ k : ℕ ⊢ 2 • k • (|ε₁| + |ε₂|) < 2 • 1
R : Type u_1 inst✝ : LinearOrderedRing R ε₁ ε₂ : R h₁ : Infinitesimal ε₁ h₂ : Infinitesimal ε₂ k : ℕ ⊢ (2 * k) • |ε₁| + (2 * k) • |ε₂| < 1 + 1
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝ : LinearOrderedRing R ε₁ ε₂ : R h₁ : Infinitesimal ε₁ h₂ : Infinitesimal ε₂ k : ℕ ⊢ 2 • k • (|ε₁| + |ε₂|) < 2 • 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/Infinitesimal/Basic.lean
IMOSL.Extra.Infinitesimal.add
[30, 1]
[35, 33]
exact add_lt_add (h₁ _) (h₂ _)
R : Type u_1 inst✝ : LinearOrderedRing R ε₁ ε₂ : R h₁ : Infinitesimal ε₁ h₂ : Infinitesimal ε₂ k : ℕ ⊢ (2 * k) • |ε₁| + (2 * k) • |ε₂| < 1 + 1
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝ : LinearOrderedRing R ε₁ ε₂ : R h₁ : Infinitesimal ε₁ h₂ : Infinitesimal ε₂ k : ℕ ⊢ (2 * k) • |ε₁| + (2 * k) • |ε₂| < 1 + 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/Infinitesimal/Basic.lean
IMOSL.Extra.Infinitesimal.mul_of_abs_le_one_left
[53, 1]
[56, 87]
rw [abs_mul, nsmul_eq_mul', mul_assoc, ← nsmul_eq_mul']
R : Type u_1 inst✝ : LinearOrderedRing R ε r : R hε : Infinitesimal ε hr : |r| ≤ 1 k : ℕ ⊢ k • |r * ε| < 1
R : Type u_1 inst✝ : LinearOrderedRing R ε r : R hε : Infinitesimal ε hr : |r| ≤ 1 k : ℕ ⊢ |r| * k • |ε| < 1
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝ : LinearOrderedRing R ε r : R hε : Infinitesimal ε hr : |r| ≤ 1 k : ℕ ⊢ k • |r * ε| < 1 TACTIC: