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/IMO2013/A5/A5.lean
IMOSL.IMO2013A5.good_imp_succ_or_answer2
[123, 1]
[168, 38]
have h3 : ∀ n, f n ≠ n := λ n h3 ↦ h2 n <| Function.iterate_fixed h3 2
case intro f : ℕ → ℕ h : good f a : ℕ h0 : (finChainFnOfgood h).rangeCompl = {a} C : FinChainFn f := finChainFnOfgood h h1 : ((f (f a) = 0 ∨ f (f a) = (f 0).succ) ∨ f (f a) = a.succ) ∧ ((f a = 0 ∨ f a = (f 0).succ) ∨ f a = a.succ) ∧ ((a = 0 ∨ a = (f 0).succ) ∨ a = a.succ) h2 : ∀ (n : ℕ), f (f n) ≠ n ⊢ f = Nat.succ ∨ f = answer2
case intro f : ℕ → ℕ h : good f a : ℕ h0 : (finChainFnOfgood h).rangeCompl = {a} C : FinChainFn f := finChainFnOfgood h h1 : ((f (f a) = 0 ∨ f (f a) = (f 0).succ) ∨ f (f a) = a.succ) ∧ ((f a = 0 ∨ f a = (f 0).succ) ∨ f a = a.succ) ∧ ((a = 0 ∨ a = (f 0).succ) ∨ a = a.succ) h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n ⊢ f = Nat.succ ∨ f = answer2
Please generate a tactic in lean4 to solve the state. STATE: case intro f : ℕ → ℕ h : good f a : ℕ h0 : (finChainFnOfgood h).rangeCompl = {a} C : FinChainFn f := finChainFnOfgood h h1 : ((f (f a) = 0 ∨ f (f a) = (f 0).succ) ∨ f (f a) = a.succ) ∧ ((f a = 0 ∨ f a = (f 0).succ) ∨ f a = a.succ) ∧ ((a = 0 ∨ a = (f 0).succ) ∨ a = a.succ) h2 : ∀ (n : ℕ), f (f n) ≠ n ⊢ f = Nat.succ ∨ f = answer2 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2013/A5/A5.lean
IMOSL.IMO2013A5.good_imp_succ_or_answer2
[123, 1]
[168, 38]
rcases h1 with ⟨h1, h4, (rfl | rfl) | h5⟩
case intro f : ℕ → ℕ h : good f a : ℕ h0 : (finChainFnOfgood h).rangeCompl = {a} C : FinChainFn f := finChainFnOfgood h h1 : ((f (f a) = 0 ∨ f (f a) = (f 0).succ) ∨ f (f a) = a.succ) ∧ ((f a = 0 ∨ f a = (f 0).succ) ∨ f a = a.succ) ∧ ((a = 0 ∨ a = (f 0).succ) ∨ a = a.succ) h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n ⊢ f = Nat.succ ∨ f = answer2
case intro.intro.intro.inl.inl f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {0} h1 : (f (f 0) = 0 ∨ f (f 0) = (f 0).succ) ∨ f (f 0) = Nat.succ 0 h4 : (f 0 = 0 ∨ f 0 = (f 0).succ) ∨ f 0 = Nat.succ 0 ⊢ f = Nat.succ ∨ f = answer2 case intro.intro.intro.inl.inr f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {(f 0).succ} h1 : (f (f (f 0).succ) = 0 ∨ f (f (f 0).succ) = (f 0).succ) ∨ f (f (f 0).succ) = (f 0).succ.succ h4 : (f (f 0).succ = 0 ∨ f (f 0).succ = (f 0).succ) ∨ f (f 0).succ = (f 0).succ.succ ⊢ f = Nat.succ ∨ f = answer2 case intro.intro.intro.inr f : ℕ → ℕ h : good f a : ℕ h0 : (finChainFnOfgood h).rangeCompl = {a} C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h1 : (f (f a) = 0 ∨ f (f a) = (f 0).succ) ∨ f (f a) = a.succ h4 : (f a = 0 ∨ f a = (f 0).succ) ∨ f a = a.succ h5 : a = a.succ ⊢ f = Nat.succ ∨ f = answer2
Please generate a tactic in lean4 to solve the state. STATE: case intro f : ℕ → ℕ h : good f a : ℕ h0 : (finChainFnOfgood h).rangeCompl = {a} C : FinChainFn f := finChainFnOfgood h h1 : ((f (f a) = 0 ∨ f (f a) = (f 0).succ) ∨ f (f a) = a.succ) ∧ ((f a = 0 ∨ f a = (f 0).succ) ∨ f a = a.succ) ∧ ((a = 0 ∨ a = (f 0).succ) ∨ a = a.succ) h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n ⊢ f = Nat.succ ∨ f = answer2 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2013/A5/A5.lean
IMOSL.IMO2013A5.good_imp_succ_or_answer2
[123, 1]
[168, 38]
rw [singleton_subset_iff, mem_union, mem_singleton, mem_insert, mem_singleton] at h1
case intro f : ℕ → ℕ h : good f a : ℕ h0 : (finChainFnOfgood h).rangeCompl = {a} C : FinChainFn f := finChainFnOfgood h h1 : ((f (f a) = 0 ∨ f (f a) = (f 0).succ) ∨ f (f a) = a.succ) ∧ ((f a = 0 ∨ f a = (f 0).succ) ∨ f a = a.succ) ∧ {a} ⊆ {0, (f 0).succ} ∪ {a.succ} ⊢ f = Nat.succ ∨ f = answer2
case intro f : ℕ → ℕ h : good f a : ℕ h0 : (finChainFnOfgood h).rangeCompl = {a} C : FinChainFn f := finChainFnOfgood h h1 : ((f (f a) = 0 ∨ f (f a) = (f 0).succ) ∨ f (f a) = a.succ) ∧ ((f a = 0 ∨ f a = (f 0).succ) ∨ f a = a.succ) ∧ ((a = 0 ∨ a = (f 0).succ) ∨ a = a.succ) ⊢ f = Nat.succ ∨ f = answer2
Please generate a tactic in lean4 to solve the state. STATE: case intro f : ℕ → ℕ h : good f a : ℕ h0 : (finChainFnOfgood h).rangeCompl = {a} C : FinChainFn f := finChainFnOfgood h h1 : ((f (f a) = 0 ∨ f (f a) = (f 0).succ) ∨ f (f a) = a.succ) ∧ ((f a = 0 ∨ f a = (f 0).succ) ∨ f a = a.succ) ∧ {a} ⊆ {0, (f 0).succ} ∪ {a.succ} ⊢ f = Nat.succ ∨ f = answer2 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2013/A5/A5.lean
IMOSL.IMO2013A5.good_imp_succ_or_answer2
[123, 1]
[168, 38]
apply absurd (iter_four_eq_add_four h n)
f : ℕ → ℕ h : good f a : ℕ h0 : (finChainFnOfgood h).rangeCompl = {a} C : FinChainFn f := finChainFnOfgood h h1 : ((f (f a) = 0 ∨ f (f a) = (f 0).succ) ∨ f (f a) = a.succ) ∧ ((f a = 0 ∨ f a = (f 0).succ) ∨ f a = a.succ) ∧ ((a = 0 ∨ a = (f 0).succ) ∨ a = a.succ) n : ℕ h2 : f (f n) = n ⊢ False
f : ℕ → ℕ h : good f a : ℕ h0 : (finChainFnOfgood h).rangeCompl = {a} C : FinChainFn f := finChainFnOfgood h h1 : ((f (f a) = 0 ∨ f (f a) = (f 0).succ) ∨ f (f a) = a.succ) ∧ ((f a = 0 ∨ f a = (f 0).succ) ∨ f a = a.succ) ∧ ((a = 0 ∨ a = (f 0).succ) ∨ a = a.succ) n : ℕ h2 : f (f n) = n ⊢ ¬f^[4] n = n + 4
Please generate a tactic in lean4 to solve the state. STATE: f : ℕ → ℕ h : good f a : ℕ h0 : (finChainFnOfgood h).rangeCompl = {a} C : FinChainFn f := finChainFnOfgood h h1 : ((f (f a) = 0 ∨ f (f a) = (f 0).succ) ∨ f (f a) = a.succ) ∧ ((f a = 0 ∨ f a = (f 0).succ) ∨ f a = a.succ) ∧ ((a = 0 ∨ a = (f 0).succ) ∨ a = a.succ) n : ℕ h2 : f (f n) = n ⊢ False TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2013/A5/A5.lean
IMOSL.IMO2013A5.good_imp_succ_or_answer2
[123, 1]
[168, 38]
change f (f (f (f n))) ≠ n + 4
f : ℕ → ℕ h : good f a : ℕ h0 : (finChainFnOfgood h).rangeCompl = {a} C : FinChainFn f := finChainFnOfgood h h1 : ((f (f a) = 0 ∨ f (f a) = (f 0).succ) ∨ f (f a) = a.succ) ∧ ((f a = 0 ∨ f a = (f 0).succ) ∨ f a = a.succ) ∧ ((a = 0 ∨ a = (f 0).succ) ∨ a = a.succ) n : ℕ h2 : f (f n) = n ⊢ ¬f^[4] n = n + 4
f : ℕ → ℕ h : good f a : ℕ h0 : (finChainFnOfgood h).rangeCompl = {a} C : FinChainFn f := finChainFnOfgood h h1 : ((f (f a) = 0 ∨ f (f a) = (f 0).succ) ∨ f (f a) = a.succ) ∧ ((f a = 0 ∨ f a = (f 0).succ) ∨ f a = a.succ) ∧ ((a = 0 ∨ a = (f 0).succ) ∨ a = a.succ) n : ℕ h2 : f (f n) = n ⊢ f (f (f (f n))) ≠ n + 4
Please generate a tactic in lean4 to solve the state. STATE: f : ℕ → ℕ h : good f a : ℕ h0 : (finChainFnOfgood h).rangeCompl = {a} C : FinChainFn f := finChainFnOfgood h h1 : ((f (f a) = 0 ∨ f (f a) = (f 0).succ) ∨ f (f a) = a.succ) ∧ ((f a = 0 ∨ f a = (f 0).succ) ∨ f a = a.succ) ∧ ((a = 0 ∨ a = (f 0).succ) ∨ a = a.succ) n : ℕ h2 : f (f n) = n ⊢ ¬f^[4] n = n + 4 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2013/A5/A5.lean
IMOSL.IMO2013A5.good_imp_succ_or_answer2
[123, 1]
[168, 38]
rw [h2, h2, self_ne_add_right]
f : ℕ → ℕ h : good f a : ℕ h0 : (finChainFnOfgood h).rangeCompl = {a} C : FinChainFn f := finChainFnOfgood h h1 : ((f (f a) = 0 ∨ f (f a) = (f 0).succ) ∨ f (f a) = a.succ) ∧ ((f a = 0 ∨ f a = (f 0).succ) ∨ f a = a.succ) ∧ ((a = 0 ∨ a = (f 0).succ) ∨ a = a.succ) n : ℕ h2 : f (f n) = n ⊢ f (f (f (f n))) ≠ n + 4
f : ℕ → ℕ h : good f a : ℕ h0 : (finChainFnOfgood h).rangeCompl = {a} C : FinChainFn f := finChainFnOfgood h h1 : ((f (f a) = 0 ∨ f (f a) = (f 0).succ) ∨ f (f a) = a.succ) ∧ ((f a = 0 ∨ f a = (f 0).succ) ∨ f a = a.succ) ∧ ((a = 0 ∨ a = (f 0).succ) ∨ a = a.succ) n : ℕ h2 : f (f n) = n ⊢ 4 ≠ 0
Please generate a tactic in lean4 to solve the state. STATE: f : ℕ → ℕ h : good f a : ℕ h0 : (finChainFnOfgood h).rangeCompl = {a} C : FinChainFn f := finChainFnOfgood h h1 : ((f (f a) = 0 ∨ f (f a) = (f 0).succ) ∨ f (f a) = a.succ) ∧ ((f a = 0 ∨ f a = (f 0).succ) ∨ f a = a.succ) ∧ ((a = 0 ∨ a = (f 0).succ) ∨ a = a.succ) n : ℕ h2 : f (f n) = n ⊢ f (f (f (f n))) ≠ n + 4 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2013/A5/A5.lean
IMOSL.IMO2013A5.good_imp_succ_or_answer2
[123, 1]
[168, 38]
exact Nat.succ_ne_zero 3
f : ℕ → ℕ h : good f a : ℕ h0 : (finChainFnOfgood h).rangeCompl = {a} C : FinChainFn f := finChainFnOfgood h h1 : ((f (f a) = 0 ∨ f (f a) = (f 0).succ) ∨ f (f a) = a.succ) ∧ ((f a = 0 ∨ f a = (f 0).succ) ∨ f a = a.succ) ∧ ((a = 0 ∨ a = (f 0).succ) ∨ a = a.succ) n : ℕ h2 : f (f n) = n ⊢ 4 ≠ 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: f : ℕ → ℕ h : good f a : ℕ h0 : (finChainFnOfgood h).rangeCompl = {a} C : FinChainFn f := finChainFnOfgood h h1 : ((f (f a) = 0 ∨ f (f a) = (f 0).succ) ∨ f (f a) = a.succ) ∧ ((f a = 0 ∨ f a = (f 0).succ) ∨ f a = a.succ) ∧ ((a = 0 ∨ a = (f 0).succ) ∨ a = a.succ) n : ℕ h2 : f (f n) = n ⊢ 4 ≠ 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2013/A5/A5.lean
IMOSL.IMO2013A5.good_imp_succ_or_answer2
[123, 1]
[168, 38]
rw [or_iff_right (h3 0), or_iff_right (f 0).succ_ne_self.symm] at h4
case intro.intro.intro.inl.inl f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {0} h1 : (f (f 0) = 0 ∨ f (f 0) = (f 0).succ) ∨ f (f 0) = Nat.succ 0 h4 : (f 0 = 0 ∨ f 0 = (f 0).succ) ∨ f 0 = Nat.succ 0 ⊢ f = Nat.succ ∨ f = answer2
case intro.intro.intro.inl.inl f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {0} h1 : (f (f 0) = 0 ∨ f (f 0) = (f 0).succ) ∨ f (f 0) = Nat.succ 0 h4 : f 0 = Nat.succ 0 ⊢ f = Nat.succ ∨ f = answer2
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.inl.inl f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {0} h1 : (f (f 0) = 0 ∨ f (f 0) = (f 0).succ) ∨ f (f 0) = Nat.succ 0 h4 : (f 0 = 0 ∨ f 0 = (f 0).succ) ∨ f 0 = Nat.succ 0 ⊢ f = Nat.succ ∨ f = answer2 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2013/A5/A5.lean
IMOSL.IMO2013A5.good_imp_succ_or_answer2
[123, 1]
[168, 38]
rw [or_iff_right (h2 0), h4, or_iff_left (h3 1)] at h1
case intro.intro.intro.inl.inl f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {0} h1 : (f (f 0) = 0 ∨ f (f 0) = (f 0).succ) ∨ f (f 0) = Nat.succ 0 h4 : f 0 = Nat.succ 0 ⊢ f = Nat.succ ∨ f = answer2
case intro.intro.intro.inl.inl f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {0} h1 : f (Nat.succ 0) = (Nat.succ 0).succ h4 : f 0 = Nat.succ 0 ⊢ f = Nat.succ ∨ f = answer2
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.inl.inl f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {0} h1 : (f (f 0) = 0 ∨ f (f 0) = (f 0).succ) ∨ f (f 0) = Nat.succ 0 h4 : f 0 = Nat.succ 0 ⊢ f = Nat.succ ∨ f = answer2 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2013/A5/A5.lean
IMOSL.IMO2013A5.good_imp_succ_or_answer2
[123, 1]
[168, 38]
have h5 : f (f (f 0)) = f 1 + 1 := h 0
case intro.intro.intro.inl.inl f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {0} h1 : f (Nat.succ 0) = (Nat.succ 0).succ h4 : f 0 = Nat.succ 0 ⊢ f = Nat.succ ∨ f = answer2
case intro.intro.intro.inl.inl f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {0} h1 : f (Nat.succ 0) = (Nat.succ 0).succ h4 : f 0 = Nat.succ 0 h5 : f (f (f 0)) = f 1 + 1 ⊢ f = Nat.succ ∨ f = answer2
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.inl.inl f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {0} h1 : f (Nat.succ 0) = (Nat.succ 0).succ h4 : f 0 = Nat.succ 0 ⊢ f = Nat.succ ∨ f = answer2 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2013/A5/A5.lean
IMOSL.IMO2013A5.good_imp_succ_or_answer2
[123, 1]
[168, 38]
have h6 : f (f (f (f 0))) = 4 := iter_four_zero_eq_four h
case intro.intro.intro.inl.inl f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {0} h1 : f (Nat.succ 0) = (Nat.succ 0).succ h4 : f 0 = Nat.succ 0 h5 : f (f (f 0)) = f 1 + 1 ⊢ f = Nat.succ ∨ f = answer2
case intro.intro.intro.inl.inl f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {0} h1 : f (Nat.succ 0) = (Nat.succ 0).succ h4 : f 0 = Nat.succ 0 h5 : f (f (f 0)) = f 1 + 1 h6 : f (f (f (f 0))) = 4 ⊢ f = Nat.succ ∨ f = answer2
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.inl.inl f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {0} h1 : f (Nat.succ 0) = (Nat.succ 0).succ h4 : f 0 = Nat.succ 0 h5 : f (f (f 0)) = f 1 + 1 ⊢ f = Nat.succ ∨ f = answer2 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2013/A5/A5.lean
IMOSL.IMO2013A5.good_imp_succ_or_answer2
[123, 1]
[168, 38]
rw [h5, h1] at h6
case intro.intro.intro.inl.inl f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {0} h1 : f (Nat.succ 0) = (Nat.succ 0).succ h4 : f 0 = Nat.succ 0 h5 : f (f (f 0)) = f 1 + 1 h6 : f (f (f (f 0))) = 4 ⊢ f = Nat.succ ∨ f = answer2
case intro.intro.intro.inl.inl f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {0} h1 : f (Nat.succ 0) = (Nat.succ 0).succ h4 : f 0 = Nat.succ 0 h5 : f (f (f 0)) = f 1 + 1 h6 : f ((Nat.succ 0).succ + 1) = 4 ⊢ f = Nat.succ ∨ f = answer2
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.inl.inl f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {0} h1 : f (Nat.succ 0) = (Nat.succ 0).succ h4 : f 0 = Nat.succ 0 h5 : f (f (f 0)) = f 1 + 1 h6 : f (f (f (f 0))) = 4 ⊢ f = Nat.succ ∨ f = answer2 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2013/A5/A5.lean
IMOSL.IMO2013A5.good_imp_succ_or_answer2
[123, 1]
[168, 38]
rw [h4, h1] at h5
case intro.intro.intro.inl.inl f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {0} h1 : f (Nat.succ 0) = (Nat.succ 0).succ h4 : f 0 = Nat.succ 0 h5 : f (f (f 0)) = f 1 + 1 h6 : f ((Nat.succ 0).succ + 1) = 4 ⊢ f = Nat.succ ∨ f = answer2
case intro.intro.intro.inl.inl f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {0} h1 : f (Nat.succ 0) = (Nat.succ 0).succ h4 : f 0 = Nat.succ 0 h5 : f (Nat.succ 0).succ = (Nat.succ 0).succ + 1 h6 : f ((Nat.succ 0).succ + 1) = 4 ⊢ f = Nat.succ ∨ f = answer2
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.inl.inl f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {0} h1 : f (Nat.succ 0) = (Nat.succ 0).succ h4 : f 0 = Nat.succ 0 h5 : f (f (f 0)) = f 1 + 1 h6 : f ((Nat.succ 0).succ + 1) = 4 ⊢ f = Nat.succ ∨ f = answer2 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2013/A5/A5.lean
IMOSL.IMO2013A5.good_imp_succ_or_answer2
[123, 1]
[168, 38]
left
case intro.intro.intro.inl.inl f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {0} h1 : f (Nat.succ 0) = (Nat.succ 0).succ h4 : f 0 = Nat.succ 0 h5 : f (Nat.succ 0).succ = (Nat.succ 0).succ + 1 h6 : f ((Nat.succ 0).succ + 1) = 4 ⊢ f = Nat.succ ∨ f = answer2
case intro.intro.intro.inl.inl.h f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {0} h1 : f (Nat.succ 0) = (Nat.succ 0).succ h4 : f 0 = Nat.succ 0 h5 : f (Nat.succ 0).succ = (Nat.succ 0).succ + 1 h6 : f ((Nat.succ 0).succ + 1) = 4 ⊢ f = Nat.succ
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.inl.inl f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {0} h1 : f (Nat.succ 0) = (Nat.succ 0).succ h4 : f 0 = Nat.succ 0 h5 : f (Nat.succ 0).succ = (Nat.succ 0).succ + 1 h6 : f ((Nat.succ 0).succ + 1) = 4 ⊢ f = Nat.succ ∨ f = answer2 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2013/A5/A5.lean
IMOSL.IMO2013A5.good_imp_succ_or_answer2
[123, 1]
[168, 38]
refine funext (add_four_induction h4 h1 h5 h6 ?_)
case intro.intro.intro.inl.inl.h f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {0} h1 : f (Nat.succ 0) = (Nat.succ 0).succ h4 : f 0 = Nat.succ 0 h5 : f (Nat.succ 0).succ = (Nat.succ 0).succ + 1 h6 : f ((Nat.succ 0).succ + 1) = 4 ⊢ f = Nat.succ
case intro.intro.intro.inl.inl.h f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {0} h1 : f (Nat.succ 0) = (Nat.succ 0).succ h4 : f 0 = Nat.succ 0 h5 : f (Nat.succ 0).succ = (Nat.succ 0).succ + 1 h6 : f ((Nat.succ 0).succ + 1) = 4 ⊢ ∀ (n : ℕ), f n = n.succ → f (n + 4) = (n + 4).succ
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.inl.inl.h f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {0} h1 : f (Nat.succ 0) = (Nat.succ 0).succ h4 : f 0 = Nat.succ 0 h5 : f (Nat.succ 0).succ = (Nat.succ 0).succ + 1 h6 : f ((Nat.succ 0).succ + 1) = 4 ⊢ f = Nat.succ TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2013/A5/A5.lean
IMOSL.IMO2013A5.good_imp_succ_or_answer2
[123, 1]
[168, 38]
intro n h7
case intro.intro.intro.inl.inl.h f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {0} h1 : f (Nat.succ 0) = (Nat.succ 0).succ h4 : f 0 = Nat.succ 0 h5 : f (Nat.succ 0).succ = (Nat.succ 0).succ + 1 h6 : f ((Nat.succ 0).succ + 1) = 4 ⊢ ∀ (n : ℕ), f n = n.succ → f (n + 4) = (n + 4).succ
case intro.intro.intro.inl.inl.h f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {0} h1 : f (Nat.succ 0) = (Nat.succ 0).succ h4 : f 0 = Nat.succ 0 h5 : f (Nat.succ 0).succ = (Nat.succ 0).succ + 1 h6 : f ((Nat.succ 0).succ + 1) = 4 n : ℕ h7 : f n = n.succ ⊢ f (n + 4) = (n + 4).succ
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.inl.inl.h f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {0} h1 : f (Nat.succ 0) = (Nat.succ 0).succ h4 : f 0 = Nat.succ 0 h5 : f (Nat.succ 0).succ = (Nat.succ 0).succ + 1 h6 : f ((Nat.succ 0).succ + 1) = 4 ⊢ ∀ (n : ℕ), f n = n.succ → f (n + 4) = (n + 4).succ TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2013/A5/A5.lean
IMOSL.IMO2013A5.good_imp_succ_or_answer2
[123, 1]
[168, 38]
rw [map_add_four h, h7]
case intro.intro.intro.inl.inl.h f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {0} h1 : f (Nat.succ 0) = (Nat.succ 0).succ h4 : f 0 = Nat.succ 0 h5 : f (Nat.succ 0).succ = (Nat.succ 0).succ + 1 h6 : f ((Nat.succ 0).succ + 1) = 4 n : ℕ h7 : f n = n.succ ⊢ f (n + 4) = (n + 4).succ
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.inl.inl.h f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {0} h1 : f (Nat.succ 0) = (Nat.succ 0).succ h4 : f 0 = Nat.succ 0 h5 : f (Nat.succ 0).succ = (Nat.succ 0).succ + 1 h6 : f ((Nat.succ 0).succ + 1) = 4 n : ℕ h7 : f n = n.succ ⊢ f (n + 4) = (n + 4).succ TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2013/A5/A5.lean
IMOSL.IMO2013A5.good_imp_succ_or_answer2
[123, 1]
[168, 38]
rw [or_iff_left (h3 _)] at h4
case intro.intro.intro.inl.inr f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {(f 0).succ} h1 : (f (f (f 0).succ) = 0 ∨ f (f (f 0).succ) = (f 0).succ) ∨ f (f (f 0).succ) = (f 0).succ.succ h4 : (f (f 0).succ = 0 ∨ f (f 0).succ = (f 0).succ) ∨ f (f 0).succ = (f 0).succ.succ ⊢ f = Nat.succ ∨ f = answer2
case intro.intro.intro.inl.inr f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {(f 0).succ} h1 : (f (f (f 0).succ) = 0 ∨ f (f (f 0).succ) = (f 0).succ) ∨ f (f (f 0).succ) = (f 0).succ.succ h4 : f (f 0).succ = 0 ∨ f (f 0).succ = (f 0).succ.succ ⊢ f = Nat.succ ∨ f = answer2
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.inl.inr f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {(f 0).succ} h1 : (f (f (f 0).succ) = 0 ∨ f (f (f 0).succ) = (f 0).succ) ∨ f (f (f 0).succ) = (f 0).succ.succ h4 : (f (f 0).succ = 0 ∨ f (f 0).succ = (f 0).succ) ∨ f (f 0).succ = (f 0).succ.succ ⊢ f = Nat.succ ∨ f = answer2 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2013/A5/A5.lean
IMOSL.IMO2013A5.good_imp_succ_or_answer2
[123, 1]
[168, 38]
rw [or_iff_left (h2 _)] at h1
case intro.intro.intro.inl.inr f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {(f 0).succ} h1 : (f (f (f 0).succ) = 0 ∨ f (f (f 0).succ) = (f 0).succ) ∨ f (f (f 0).succ) = (f 0).succ.succ h4 : f (f 0).succ = 0 ∨ f (f 0).succ = (f 0).succ.succ ⊢ f = Nat.succ ∨ f = answer2
case intro.intro.intro.inl.inr f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {(f 0).succ} h1 : f (f (f 0).succ) = 0 ∨ f (f (f 0).succ) = (f 0).succ.succ h4 : f (f 0).succ = 0 ∨ f (f 0).succ = (f 0).succ.succ ⊢ f = Nat.succ ∨ f = answer2
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.inl.inr f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {(f 0).succ} h1 : (f (f (f 0).succ) = 0 ∨ f (f (f 0).succ) = (f 0).succ) ∨ f (f (f 0).succ) = (f 0).succ.succ h4 : f (f 0).succ = 0 ∨ f (f 0).succ = (f 0).succ.succ ⊢ f = Nat.succ ∨ f = answer2 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2013/A5/A5.lean
IMOSL.IMO2013A5.good_imp_succ_or_answer2
[123, 1]
[168, 38]
rcases h4 with h4 | h4
case intro.intro.intro.inl.inr f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {(f 0).succ} h1 : f (f (f 0).succ) = 0 ∨ f (f (f 0).succ) = (f 0).succ.succ h4 : f (f 0).succ = 0 ∨ f (f 0).succ = (f 0).succ.succ ⊢ f = Nat.succ ∨ f = answer2
case intro.intro.intro.inl.inr.inl f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {(f 0).succ} h1 : f (f (f 0).succ) = 0 ∨ f (f (f 0).succ) = (f 0).succ.succ h4 : f (f 0).succ = 0 ⊢ f = Nat.succ ∨ f = answer2 case intro.intro.intro.inl.inr.inr f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {(f 0).succ} h1 : f (f (f 0).succ) = 0 ∨ f (f (f 0).succ) = (f 0).succ.succ h4 : f (f 0).succ = (f 0).succ.succ ⊢ f = Nat.succ ∨ f = answer2
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.inl.inr f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {(f 0).succ} h1 : f (f (f 0).succ) = 0 ∨ f (f (f 0).succ) = (f 0).succ.succ h4 : f (f 0).succ = 0 ∨ f (f 0).succ = (f 0).succ.succ ⊢ f = Nat.succ ∨ f = answer2 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2013/A5/A5.lean
IMOSL.IMO2013A5.good_imp_succ_or_answer2
[123, 1]
[168, 38]
rw [h4, or_iff_left (h3 _)] at h1
case intro.intro.intro.inl.inr.inr f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {(f 0).succ} h1 : f (f (f 0).succ) = 0 ∨ f (f (f 0).succ) = (f 0).succ.succ h4 : f (f 0).succ = (f 0).succ.succ ⊢ f = Nat.succ ∨ f = answer2
case intro.intro.intro.inl.inr.inr f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {(f 0).succ} h1 : f (f 0).succ.succ = 0 h4 : f (f 0).succ = (f 0).succ.succ ⊢ f = Nat.succ ∨ f = answer2
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.inl.inr.inr f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {(f 0).succ} h1 : f (f (f 0).succ) = 0 ∨ f (f (f 0).succ) = (f 0).succ.succ h4 : f (f 0).succ = (f 0).succ.succ ⊢ f = Nat.succ ∨ f = answer2 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2013/A5/A5.lean
IMOSL.IMO2013A5.good_imp_succ_or_answer2
[123, 1]
[168, 38]
have h5 : f (f (f (f 0 + 1))) = f (f 0 + 2) + 1 := h (f 0).succ
case intro.intro.intro.inl.inr.inr f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {(f 0).succ} h1 : f (f 0).succ.succ = 0 h4 : f (f 0).succ = (f 0).succ.succ ⊢ f = Nat.succ ∨ f = answer2
case intro.intro.intro.inl.inr.inr f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {(f 0).succ} h1 : f (f 0).succ.succ = 0 h4 : f (f 0).succ = (f 0).succ.succ h5 : f (f (f (f 0 + 1))) = f (f 0 + 2) + 1 ⊢ f = Nat.succ ∨ f = answer2
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.inl.inr.inr f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {(f 0).succ} h1 : f (f 0).succ.succ = 0 h4 : f (f 0).succ = (f 0).succ.succ ⊢ f = Nat.succ ∨ f = answer2 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2013/A5/A5.lean
IMOSL.IMO2013A5.good_imp_succ_or_answer2
[123, 1]
[168, 38]
have h6 : f (f (f (f (f 0 + 1)))) = f 0 + 5 := iter_four_eq_add_four h _
case intro.intro.intro.inl.inr.inr f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {(f 0).succ} h1 : f (f 0).succ.succ = 0 h4 : f (f 0).succ = (f 0).succ.succ h5 : f (f (f (f 0 + 1))) = f (f 0 + 2) + 1 ⊢ f = Nat.succ ∨ f = answer2
case intro.intro.intro.inl.inr.inr f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {(f 0).succ} h1 : f (f 0).succ.succ = 0 h4 : f (f 0).succ = (f 0).succ.succ h5 : f (f (f (f 0 + 1))) = f (f 0 + 2) + 1 h6 : f (f (f (f (f 0 + 1)))) = f 0 + 5 ⊢ f = Nat.succ ∨ f = answer2
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.inl.inr.inr f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {(f 0).succ} h1 : f (f 0).succ.succ = 0 h4 : f (f 0).succ = (f 0).succ.succ h5 : f (f (f (f 0 + 1))) = f (f 0 + 2) + 1 ⊢ f = Nat.succ ∨ f = answer2 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2013/A5/A5.lean
IMOSL.IMO2013A5.good_imp_succ_or_answer2
[123, 1]
[168, 38]
rw [h5, h1, zero_add] at h6
case intro.intro.intro.inl.inr.inr f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {(f 0).succ} h1 : f (f 0).succ.succ = 0 h4 : f (f 0).succ = (f 0).succ.succ h5 : f (f (f (f 0 + 1))) = f (f 0 + 2) + 1 h6 : f (f (f (f (f 0 + 1)))) = f 0 + 5 ⊢ f = Nat.succ ∨ f = answer2
case intro.intro.intro.inl.inr.inr f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {(f 0).succ} h1 : f (f 0).succ.succ = 0 h4 : f (f 0).succ = (f 0).succ.succ h5 : f (f (f (f 0 + 1))) = f (f 0 + 2) + 1 h6 : f 1 = f 0 + 5 ⊢ f = Nat.succ ∨ f = answer2
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.inl.inr.inr f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {(f 0).succ} h1 : f (f 0).succ.succ = 0 h4 : f (f 0).succ = (f 0).succ.succ h5 : f (f (f (f 0 + 1))) = f (f 0 + 2) + 1 h6 : f (f (f (f (f 0 + 1)))) = f 0 + 5 ⊢ f = Nat.succ ∨ f = answer2 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2013/A5/A5.lean
IMOSL.IMO2013A5.good_imp_succ_or_answer2
[123, 1]
[168, 38]
rw [h4, h1, zero_add] at h5
case intro.intro.intro.inl.inr.inr f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {(f 0).succ} h1 : f (f 0).succ.succ = 0 h4 : f (f 0).succ = (f 0).succ.succ h5 : f (f (f (f 0 + 1))) = f (f 0 + 2) + 1 h6 : f 1 = f 0 + 5 ⊢ f = Nat.succ ∨ f = answer2
case intro.intro.intro.inl.inr.inr f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {(f 0).succ} h1 : f (f 0).succ.succ = 0 h4 : f (f 0).succ = (f 0).succ.succ h5 : f 0 = 1 h6 : f 1 = f 0 + 5 ⊢ f = Nat.succ ∨ f = answer2
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.inl.inr.inr f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {(f 0).succ} h1 : f (f 0).succ.succ = 0 h4 : f (f 0).succ = (f 0).succ.succ h5 : f (f (f (f 0 + 1))) = f (f 0 + 2) + 1 h6 : f 1 = f 0 + 5 ⊢ f = Nat.succ ∨ f = answer2 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2013/A5/A5.lean
IMOSL.IMO2013A5.good_imp_succ_or_answer2
[123, 1]
[168, 38]
rw [h5] at h1 h4 h6
case intro.intro.intro.inl.inr.inr f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {(f 0).succ} h1 : f (f 0).succ.succ = 0 h4 : f (f 0).succ = (f 0).succ.succ h5 : f 0 = 1 h6 : f 1 = f 0 + 5 ⊢ f = Nat.succ ∨ f = answer2
case intro.intro.intro.inl.inr.inr f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {(f 0).succ} h1 : f (Nat.succ 1).succ = 0 h4 : f (Nat.succ 1) = (Nat.succ 1).succ h5 : f 0 = 1 h6 : f 1 = 1 + 5 ⊢ f = Nat.succ ∨ f = answer2
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.inl.inr.inr f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {(f 0).succ} h1 : f (f 0).succ.succ = 0 h4 : f (f 0).succ = (f 0).succ.succ h5 : f 0 = 1 h6 : f 1 = f 0 + 5 ⊢ f = Nat.succ ∨ f = answer2 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2013/A5/A5.lean
IMOSL.IMO2013A5.good_imp_succ_or_answer2
[123, 1]
[168, 38]
right
case intro.intro.intro.inl.inr.inr f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {(f 0).succ} h1 : f (Nat.succ 1).succ = 0 h4 : f (Nat.succ 1) = (Nat.succ 1).succ h5 : f 0 = 1 h6 : f 1 = 1 + 5 ⊢ f = Nat.succ ∨ f = answer2
case intro.intro.intro.inl.inr.inr.h f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {(f 0).succ} h1 : f (Nat.succ 1).succ = 0 h4 : f (Nat.succ 1) = (Nat.succ 1).succ h5 : f 0 = 1 h6 : f 1 = 1 + 5 ⊢ f = answer2
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.inl.inr.inr f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {(f 0).succ} h1 : f (Nat.succ 1).succ = 0 h4 : f (Nat.succ 1) = (Nat.succ 1).succ h5 : f 0 = 1 h6 : f 1 = 1 + 5 ⊢ f = Nat.succ ∨ f = answer2 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2013/A5/A5.lean
IMOSL.IMO2013A5.good_imp_succ_or_answer2
[123, 1]
[168, 38]
refine funext (add_four_induction h5 h6 h4 h1 ?_)
case intro.intro.intro.inl.inr.inr.h f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {(f 0).succ} h1 : f (Nat.succ 1).succ = 0 h4 : f (Nat.succ 1) = (Nat.succ 1).succ h5 : f 0 = 1 h6 : f 1 = 1 + 5 ⊢ f = answer2
case intro.intro.intro.inl.inr.inr.h f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {(f 0).succ} h1 : f (Nat.succ 1).succ = 0 h4 : f (Nat.succ 1) = (Nat.succ 1).succ h5 : f 0 = 1 h6 : f 1 = 1 + 5 ⊢ ∀ (n : ℕ), f n = answer2 n → f (n + 4) = answer2 (n + 4)
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.inl.inr.inr.h f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {(f 0).succ} h1 : f (Nat.succ 1).succ = 0 h4 : f (Nat.succ 1) = (Nat.succ 1).succ h5 : f 0 = 1 h6 : f 1 = 1 + 5 ⊢ f = answer2 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2013/A5/A5.lean
IMOSL.IMO2013A5.good_imp_succ_or_answer2
[123, 1]
[168, 38]
intro n h7
case intro.intro.intro.inl.inr.inr.h f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {(f 0).succ} h1 : f (Nat.succ 1).succ = 0 h4 : f (Nat.succ 1) = (Nat.succ 1).succ h5 : f 0 = 1 h6 : f 1 = 1 + 5 ⊢ ∀ (n : ℕ), f n = answer2 n → f (n + 4) = answer2 (n + 4)
case intro.intro.intro.inl.inr.inr.h f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {(f 0).succ} h1 : f (Nat.succ 1).succ = 0 h4 : f (Nat.succ 1) = (Nat.succ 1).succ h5 : f 0 = 1 h6 : f 1 = 1 + 5 n : ℕ h7 : f n = answer2 n ⊢ f (n + 4) = answer2 (n + 4)
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.inl.inr.inr.h f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {(f 0).succ} h1 : f (Nat.succ 1).succ = 0 h4 : f (Nat.succ 1) = (Nat.succ 1).succ h5 : f 0 = 1 h6 : f 1 = 1 + 5 ⊢ ∀ (n : ℕ), f n = answer2 n → f (n + 4) = answer2 (n + 4) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2013/A5/A5.lean
IMOSL.IMO2013A5.good_imp_succ_or_answer2
[123, 1]
[168, 38]
rw [map_add_four h, h7, answer2]
case intro.intro.intro.inl.inr.inr.h f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {(f 0).succ} h1 : f (Nat.succ 1).succ = 0 h4 : f (Nat.succ 1) = (Nat.succ 1).succ h5 : f 0 = 1 h6 : f 1 = 1 + 5 n : ℕ h7 : f n = answer2 n ⊢ f (n + 4) = answer2 (n + 4)
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.inl.inr.inr.h f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {(f 0).succ} h1 : f (Nat.succ 1).succ = 0 h4 : f (Nat.succ 1) = (Nat.succ 1).succ h5 : f 0 = 1 h6 : f 1 = 1 + 5 n : ℕ h7 : f n = answer2 n ⊢ f (n + 4) = answer2 (n + 4) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2013/A5/A5.lean
IMOSL.IMO2013A5.good_imp_succ_or_answer2
[123, 1]
[168, 38]
rw [h4, or_iff_right (h3 0)] at h1
case intro.intro.intro.inl.inr.inl f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {(f 0).succ} h1 : f (f (f 0).succ) = 0 ∨ f (f (f 0).succ) = (f 0).succ.succ h4 : f (f 0).succ = 0 ⊢ f = Nat.succ ∨ f = answer2
case intro.intro.intro.inl.inr.inl f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {(f 0).succ} h1 : f 0 = (f 0).succ.succ h4 : f (f 0).succ = 0 ⊢ f = Nat.succ ∨ f = answer2
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.inl.inr.inl f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {(f 0).succ} h1 : f (f (f 0).succ) = 0 ∨ f (f (f 0).succ) = (f 0).succ.succ h4 : f (f 0).succ = 0 ⊢ f = Nat.succ ∨ f = answer2 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2013/A5/A5.lean
IMOSL.IMO2013A5.good_imp_succ_or_answer2
[123, 1]
[168, 38]
exact absurd h1 (Nat.lt_succ.mpr (f 0).le_succ).ne
case intro.intro.intro.inl.inr.inl f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {(f 0).succ} h1 : f 0 = (f 0).succ.succ h4 : f (f 0).succ = 0 ⊢ f = Nat.succ ∨ f = answer2
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.inl.inr.inl f : ℕ → ℕ h : good f C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h0 : (finChainFnOfgood h).rangeCompl = {(f 0).succ} h1 : f 0 = (f 0).succ.succ h4 : f (f 0).succ = 0 ⊢ f = Nat.succ ∨ f = answer2 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2013/A5/A5.lean
IMOSL.IMO2013A5.good_imp_succ_or_answer2
[123, 1]
[168, 38]
exact absurd h5 a.lt_succ_self.ne
case intro.intro.intro.inr f : ℕ → ℕ h : good f a : ℕ h0 : (finChainFnOfgood h).rangeCompl = {a} C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h1 : (f (f a) = 0 ∨ f (f a) = (f 0).succ) ∨ f (f a) = a.succ h4 : (f a = 0 ∨ f a = (f 0).succ) ∨ f a = a.succ h5 : a = a.succ ⊢ f = Nat.succ ∨ f = answer2
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.inr f : ℕ → ℕ h : good f a : ℕ h0 : (finChainFnOfgood h).rangeCompl = {a} C : FinChainFn f := finChainFnOfgood h h2 : ∀ (n : ℕ), f (f n) ≠ n h3 : ∀ (n : ℕ), f n ≠ n h1 : (f (f a) = 0 ∨ f (f a) = (f 0).succ) ∨ f (f a) = a.succ h4 : (f a = 0 ∨ f a = (f 0).succ) ∨ f a = a.succ h5 : a = a.succ ⊢ f = Nat.succ ∨ f = answer2 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/NatSequence/SeqMax.lean
IMOSL.Extra.exists_map_eq_seqMax
[40, 1]
[46, 70]
rcases le_total (seqMax f n) (f n.succ) with h | h
α : Type u_1 inst✝ : LinearOrder α f : ℕ → α n : ℕ ⊢ ∃ k, k ≤ n + 1 ∧ f k = seqMax f (n + 1)
case inl α : Type u_1 inst✝ : LinearOrder α f : ℕ → α n : ℕ h : seqMax f n ≤ f n.succ ⊢ ∃ k, k ≤ n + 1 ∧ f k = seqMax f (n + 1) case inr α : Type u_1 inst✝ : LinearOrder α f : ℕ → α n : ℕ h : f n.succ ≤ seqMax f n ⊢ ∃ k, k ≤ n + 1 ∧ f k = seqMax f (n + 1)
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 inst✝ : LinearOrder α f : ℕ → α n : ℕ ⊢ ∃ k, k ≤ n + 1 ∧ f k = seqMax f (n + 1) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/NatSequence/SeqMax.lean
IMOSL.Extra.exists_map_eq_seqMax
[40, 1]
[46, 70]
exact ⟨n + 1, le_refl (n + 1), (max_eq_right h).symm⟩
case inl α : Type u_1 inst✝ : LinearOrder α f : ℕ → α n : ℕ h : seqMax f n ≤ f n.succ ⊢ ∃ k, k ≤ n + 1 ∧ f k = seqMax f (n + 1)
no goals
Please generate a tactic in lean4 to solve the state. STATE: case inl α : Type u_1 inst✝ : LinearOrder α f : ℕ → α n : ℕ h : seqMax f n ≤ f n.succ ⊢ ∃ k, k ≤ n + 1 ∧ f k = seqMax f (n + 1) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/NatSequence/SeqMax.lean
IMOSL.Extra.exists_map_eq_seqMax
[40, 1]
[46, 70]
rcases exists_map_eq_seqMax n with ⟨k, h0, h1⟩
case inr α : Type u_1 inst✝ : LinearOrder α f : ℕ → α n : ℕ h : f n.succ ≤ seqMax f n ⊢ ∃ k, k ≤ n + 1 ∧ f k = seqMax f (n + 1)
case inr.intro.intro α : Type u_1 inst✝ : LinearOrder α f : ℕ → α n : ℕ h : f n.succ ≤ seqMax f n k : ℕ h0 : k ≤ n h1 : f k = seqMax f n ⊢ ∃ k, k ≤ n + 1 ∧ f k = seqMax f (n + 1)
Please generate a tactic in lean4 to solve the state. STATE: case inr α : Type u_1 inst✝ : LinearOrder α f : ℕ → α n : ℕ h : f n.succ ≤ seqMax f n ⊢ ∃ k, k ≤ n + 1 ∧ f k = seqMax f (n + 1) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/NatSequence/SeqMax.lean
IMOSL.Extra.exists_map_eq_seqMax
[40, 1]
[46, 70]
exact ⟨k, n.le_succ.trans' h0, h1.trans (max_eq_left h).symm⟩
case inr.intro.intro α : Type u_1 inst✝ : LinearOrder α f : ℕ → α n : ℕ h : f n.succ ≤ seqMax f n k : ℕ h0 : k ≤ n h1 : f k = seqMax f n ⊢ ∃ k, k ≤ n + 1 ∧ f k = seqMax f (n + 1)
no goals
Please generate a tactic in lean4 to solve the state. STATE: case inr.intro.intro α : Type u_1 inst✝ : LinearOrder α f : ℕ → α n : ℕ h : f n.succ ≤ seqMax f n k : ℕ h0 : k ≤ n h1 : f k = seqMax f n ⊢ ∃ k, k ≤ n + 1 ∧ f k = seqMax f (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/IMO2020/A6/A6.lean
IMOSL.IMO2020A6.add_one_iterate
[32, 1]
[34, 81]
rw [iterate_succ_apply', add_one_iterate n a, add_assoc]
n : ℕ a : ℤ ⊢ (fun x => x + 1)^[n + 1] a = a + ↑(n + 1)
n : ℕ a : ℤ ⊢ a + (↑n + 1) = a + ↑(n + 1)
Please generate a tactic in lean4 to solve the state. STATE: n : ℕ a : ℤ ⊢ (fun x => x + 1)^[n + 1] a = a + ↑(n + 1) TACTIC: