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/IMO2009/N2/N2.lean
IMOSL.IMO2009N2.final_solution_part1
[36, 1]
[48, 28]
simp_rw [not_forall] at h
N : β„• f : β„• β†’ Fin N β†’ Bool := fun a k => (Ξ© (a.succ + ↑k)).bodd h : Β¬βˆ€ ⦃a₁ aβ‚‚ : ℕ⦄, f a₁ = f aβ‚‚ β†’ a₁ = aβ‚‚ ⊒ βˆƒ a b, a β‰  b ∧ βˆ€ k < N, Even (Ξ© ((a + k) * (b + k)))
N : β„• f : β„• β†’ Fin N β†’ Bool := fun a k => (Ξ© (a.succ + ↑k)).bodd h : βˆƒ x x_1, βˆƒ (_ : f x = f x_1), Β¬x = x_1 ⊒ βˆƒ a b, a β‰  b ∧ βˆ€ k < N, Even (Ξ© ((a + k) * (b + k)))
Please generate a tactic in lean4 to solve the state. STATE: N : β„• f : β„• β†’ Fin N β†’ Bool := fun a k => (Ξ© (a.succ + ↑k)).bodd h : Β¬βˆ€ ⦃a₁ aβ‚‚ : ℕ⦄, f a₁ = f aβ‚‚ β†’ a₁ = aβ‚‚ ⊒ βˆƒ a b, a β‰  b ∧ βˆ€ k < N, Even (Ξ© ((a + k) * (b + k))) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2009/N2/N2.lean
IMOSL.IMO2009N2.final_solution_part1
[36, 1]
[48, 28]
rcases h with ⟨a, b, h, h0⟩
N : β„• f : β„• β†’ Fin N β†’ Bool := fun a k => (Ξ© (a.succ + ↑k)).bodd h : βˆƒ x x_1, βˆƒ (_ : f x = f x_1), Β¬x = x_1 ⊒ βˆƒ a b, a β‰  b ∧ βˆ€ k < N, Even (Ξ© ((a + k) * (b + k)))
case intro.intro.intro N : β„• f : β„• β†’ Fin N β†’ Bool := fun a k => (Ξ© (a.succ + ↑k)).bodd a b : β„• h : f a = f b h0 : Β¬a = b ⊒ βˆƒ a b, a β‰  b ∧ βˆ€ k < N, Even (Ξ© ((a + k) * (b + k)))
Please generate a tactic in lean4 to solve the state. STATE: N : β„• f : β„• β†’ Fin N β†’ Bool := fun a k => (Ξ© (a.succ + ↑k)).bodd h : βˆƒ x x_1, βˆƒ (_ : f x = f x_1), Β¬x = x_1 ⊒ βˆƒ a b, a β‰  b ∧ βˆ€ k < N, Even (Ξ© ((a + k) * (b + k))) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2009/N2/N2.lean
IMOSL.IMO2009N2.final_solution_part1
[36, 1]
[48, 28]
refine ⟨a.succ, b.succ, Nat.succ_ne_succ.mpr h0, Ξ» k h1 ↦ ?_⟩
case intro.intro.intro N : β„• f : β„• β†’ Fin N β†’ Bool := fun a k => (Ξ© (a.succ + ↑k)).bodd a b : β„• h : f a = f b h0 : Β¬a = b ⊒ βˆƒ a b, a β‰  b ∧ βˆ€ k < N, Even (Ξ© ((a + k) * (b + k)))
case intro.intro.intro N : β„• f : β„• β†’ Fin N β†’ Bool := fun a k => (Ξ© (a.succ + ↑k)).bodd a b : β„• h : f a = f b h0 : Β¬a = b k : β„• h1 : k < N ⊒ Even (Ξ© ((a.succ + k) * (b.succ + k)))
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro N : β„• f : β„• β†’ Fin N β†’ Bool := fun a k => (Ξ© (a.succ + ↑k)).bodd a b : β„• h : f a = f b h0 : Β¬a = b ⊒ βˆƒ a b, a β‰  b ∧ βˆ€ k < N, Even (Ξ© ((a + k) * (b + k))) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2009/N2/N2.lean
IMOSL.IMO2009N2.final_solution_part1
[36, 1]
[48, 28]
have X (c : β„•) : c.succ + k β‰  0 := c.succ_add k β–Έ (c + k).succ_ne_zero
case intro.intro.intro N : β„• f : β„• β†’ Fin N β†’ Bool := fun a k => (Ξ© (a.succ + ↑k)).bodd a b : β„• h : f a = f b h0 : Β¬a = b k : β„• h1 : k < N ⊒ Even (Ξ© ((a.succ + k) * (b.succ + k)))
case intro.intro.intro N : β„• f : β„• β†’ Fin N β†’ Bool := fun a k => (Ξ© (a.succ + ↑k)).bodd a b : β„• h : f a = f b h0 : Β¬a = b k : β„• h1 : k < N X : βˆ€ (c : β„•), c.succ + k β‰  0 ⊒ Even (Ξ© ((a.succ + k) * (b.succ + k)))
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro N : β„• f : β„• β†’ Fin N β†’ Bool := fun a k => (Ξ© (a.succ + ↑k)).bodd a b : β„• h : f a = f b h0 : Β¬a = b k : β„• h1 : k < N ⊒ Even (Ξ© ((a.succ + k) * (b.succ + k))) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2009/N2/N2.lean
IMOSL.IMO2009N2.final_solution_part1
[36, 1]
[48, 28]
rw [Even_iff_bodd, cardFactors_mul (X _) (X _), Nat.bodd_add, xor_eq_false_iff_eq]
case intro.intro.intro N : β„• f : β„• β†’ Fin N β†’ Bool := fun a k => (Ξ© (a.succ + ↑k)).bodd a b : β„• h : f a = f b h0 : Β¬a = b k : β„• h1 : k < N X : βˆ€ (c : β„•), c.succ + k β‰  0 ⊒ Even (Ξ© ((a.succ + k) * (b.succ + k)))
case intro.intro.intro N : β„• f : β„• β†’ Fin N β†’ Bool := fun a k => (Ξ© (a.succ + ↑k)).bodd a b : β„• h : f a = f b h0 : Β¬a = b k : β„• h1 : k < N X : βˆ€ (c : β„•), c.succ + k β‰  0 ⊒ (Ξ© (a.succ + k)).bodd = (Ξ© (b.succ + k)).bodd
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro N : β„• f : β„• β†’ Fin N β†’ Bool := fun a k => (Ξ© (a.succ + ↑k)).bodd a b : β„• h : f a = f b h0 : Β¬a = b k : β„• h1 : k < N X : βˆ€ (c : β„•), c.succ + k β‰  0 ⊒ Even (Ξ© ((a.succ + k) * (b.succ + k))) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2009/N2/N2.lean
IMOSL.IMO2009N2.final_solution_part1
[36, 1]
[48, 28]
exact congr_fun h ⟨k, h1⟩
case intro.intro.intro N : β„• f : β„• β†’ Fin N β†’ Bool := fun a k => (Ξ© (a.succ + ↑k)).bodd a b : β„• h : f a = f b h0 : Β¬a = b k : β„• h1 : k < N X : βˆ€ (c : β„•), c.succ + k β‰  0 ⊒ (Ξ© (a.succ + k)).bodd = (Ξ© (b.succ + k)).bodd
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro N : β„• f : β„• β†’ Fin N β†’ Bool := fun a k => (Ξ© (a.succ + ↑k)).bodd a b : β„• h : f a = f b h0 : Β¬a = b k : β„• h1 : k < N X : βˆ€ (c : β„•), c.succ + k β‰  0 ⊒ (Ξ© (a.succ + k)).bodd = (Ξ© (b.succ + k)).bodd TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2009/N2/N2.lean
IMOSL.IMO2009N2.exists_lt_omega_bodd_ne_succ
[63, 1]
[71, 10]
by_contra h
a : β„• ⊒ βˆƒ b, a ≀ b ∧ (Ξ© b).bodd β‰  (Ξ© b.succ).bodd
a : β„• h : Β¬βˆƒ b, a ≀ b ∧ (Ξ© b).bodd β‰  (Ξ© b.succ).bodd ⊒ False
Please generate a tactic in lean4 to solve the state. STATE: a : β„• ⊒ βˆƒ b, a ≀ b ∧ (Ξ© b).bodd β‰  (Ξ© b.succ).bodd TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2009/N2/N2.lean
IMOSL.IMO2009N2.exists_lt_omega_bodd_ne_succ
[63, 1]
[71, 10]
rw [not_exists] at h
a : β„• h : Β¬βˆƒ b, a ≀ b ∧ (Ξ© b).bodd β‰  (Ξ© b.succ).bodd ⊒ False
a : β„• h : βˆ€ (x : β„•), Β¬(a ≀ x ∧ (Ξ© x).bodd β‰  (Ξ© x.succ).bodd) ⊒ False
Please generate a tactic in lean4 to solve the state. STATE: a : β„• h : Β¬βˆƒ b, a ≀ b ∧ (Ξ© b).bodd β‰  (Ξ© b.succ).bodd ⊒ False TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2009/N2/N2.lean
IMOSL.IMO2009N2.exists_lt_omega_bodd_ne_succ
[63, 1]
[71, 10]
simp_rw [not_and, not_not] at h
a : β„• h : βˆ€ (x : β„•), Β¬(a ≀ x ∧ (Ξ© x).bodd β‰  (Ξ© x.succ).bodd) ⊒ False
a : β„• h : βˆ€ (x : β„•), a ≀ x β†’ (Ξ© x).bodd = (Ξ© x.succ).bodd ⊒ False
Please generate a tactic in lean4 to solve the state. STATE: a : β„• h : βˆ€ (x : β„•), Β¬(a ≀ x ∧ (Ξ© x).bodd β‰  (Ξ© x.succ).bodd) ⊒ False TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2009/N2/N2.lean
IMOSL.IMO2009N2.exists_lt_omega_bodd_ne_succ
[63, 1]
[71, 10]
rcases a.exists_infinite_primes with ⟨p, h0, h1⟩
a : β„• h : βˆ€ (x : β„•), a ≀ x β†’ (Ξ© x).bodd = (Ξ© x.succ).bodd ⊒ False
case intro.intro a : β„• h : βˆ€ (x : β„•), a ≀ x β†’ (Ξ© x).bodd = (Ξ© x.succ).bodd p : β„• h0 : a ≀ p h1 : p.Prime ⊒ False
Please generate a tactic in lean4 to solve the state. STATE: a : β„• h : βˆ€ (x : β„•), a ≀ x β†’ (Ξ© x).bodd = (Ξ© x.succ).bodd ⊒ False TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2009/N2/N2.lean
IMOSL.IMO2009N2.exists_lt_omega_bodd_ne_succ
[63, 1]
[71, 10]
apply absurd (eventually_const_of_map_succ_eq h p (p * p) h0 (h0.trans (Nat.le_mul_self p)))
case intro.intro a : β„• h : βˆ€ (x : β„•), a ≀ x β†’ (Ξ© x).bodd = (Ξ© x.succ).bodd p : β„• h0 : a ≀ p h1 : p.Prime ⊒ False
case intro.intro a : β„• h : βˆ€ (x : β„•), a ≀ x β†’ (Ξ© x).bodd = (Ξ© x.succ).bodd p : β„• h0 : a ≀ p h1 : p.Prime ⊒ Β¬(Ξ© p).bodd = (Ξ© (p * p)).bodd
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro a : β„• h : βˆ€ (x : β„•), a ≀ x β†’ (Ξ© x).bodd = (Ξ© x.succ).bodd p : β„• h0 : a ≀ p h1 : p.Prime ⊒ False TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2009/N2/N2.lean
IMOSL.IMO2009N2.exists_lt_omega_bodd_ne_succ
[63, 1]
[71, 10]
rw [cardFactors_apply_prime h1, ← sq, cardFactors_apply_prime_pow h1]
case intro.intro a : β„• h : βˆ€ (x : β„•), a ≀ x β†’ (Ξ© x).bodd = (Ξ© x.succ).bodd p : β„• h0 : a ≀ p h1 : p.Prime ⊒ Β¬(Ξ© p).bodd = (Ξ© (p * p)).bodd
case intro.intro a : β„• h : βˆ€ (x : β„•), a ≀ x β†’ (Ξ© x).bodd = (Ξ© x.succ).bodd p : β„• h0 : a ≀ p h1 : p.Prime ⊒ Β¬Nat.bodd 1 = Nat.bodd 2
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro a : β„• h : βˆ€ (x : β„•), a ≀ x β†’ (Ξ© x).bodd = (Ξ© x.succ).bodd p : β„• h0 : a ≀ p h1 : p.Prime ⊒ Β¬(Ξ© p).bodd = (Ξ© (p * p)).bodd TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2009/N2/N2.lean
IMOSL.IMO2009N2.exists_lt_omega_bodd_ne_succ
[63, 1]
[71, 10]
trivial
case intro.intro a : β„• h : βˆ€ (x : β„•), a ≀ x β†’ (Ξ© x).bodd = (Ξ© x.succ).bodd p : β„• h0 : a ≀ p h1 : p.Prime ⊒ Β¬Nat.bodd 1 = Nat.bodd 2
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro a : β„• h : βˆ€ (x : β„•), a ≀ x β†’ (Ξ© x).bodd = (Ξ© x.succ).bodd p : β„• h0 : a ≀ p h1 : p.Prime ⊒ Β¬Nat.bodd 1 = Nat.bodd 2 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2009/N2/N2.lean
IMOSL.IMO2009N2.final_solution_part2
[74, 1]
[89, 78]
wlog h0 : a ≀ b
a b : β„• h : βˆ€ (k : β„•), Even (Ξ© ((a + k) * (b + k))) ⊒ a = b
case inr a b : β„• h : βˆ€ (k : β„•), Even (Ξ© ((a + k) * (b + k))) this : βˆ€ {a b : β„•}, (βˆ€ (k : β„•), Even (Ξ© ((a + k) * (b + k)))) β†’ a ≀ b β†’ a = b h0 : Β¬a ≀ b ⊒ a = b a b : β„• h : βˆ€ (k : β„•), Even (Ξ© ((a + k) * (b + k))) h0 : a ≀ b ⊒ a = b
Please generate a tactic in lean4 to solve the state. STATE: a b : β„• h : βˆ€ (k : β„•), Even (Ξ© ((a + k) * (b + k))) ⊒ a = b TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2009/N2/N2.lean
IMOSL.IMO2009N2.final_solution_part2
[74, 1]
[89, 78]
rw [le_iff_exists_add] at h0
a b : β„• h : βˆ€ (k : β„•), Even (Ξ© ((a + k) * (b + k))) h0 : a ≀ b ⊒ a = b
a b : β„• h : βˆ€ (k : β„•), Even (Ξ© ((a + k) * (b + k))) h0 : βˆƒ c, b = a + c ⊒ a = b
Please generate a tactic in lean4 to solve the state. STATE: a b : β„• h : βˆ€ (k : β„•), Even (Ξ© ((a + k) * (b + k))) h0 : a ≀ b ⊒ a = b TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2009/N2/N2.lean
IMOSL.IMO2009N2.final_solution_part2
[74, 1]
[89, 78]
rcases h0 with ⟨_ | c, rfl⟩
a b : β„• h : βˆ€ (k : β„•), Even (Ξ© ((a + k) * (b + k))) h0 : βˆƒ c, b = a + c ⊒ a = b
case intro.zero b : β„• h : βˆ€ (k : β„•), Even (Ξ© ((b + k) * (b + k))) ⊒ b = b case intro.succ a c : β„• h : βˆ€ (k : β„•), Even (Ξ© ((a + k) * (a + (c + 1) + k))) ⊒ a = a + (c + 1)
Please generate a tactic in lean4 to solve the state. STATE: a b : β„• h : βˆ€ (k : β„•), Even (Ξ© ((a + k) * (b + k))) h0 : βˆƒ c, b = a + c ⊒ a = b TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2009/N2/N2.lean
IMOSL.IMO2009N2.final_solution_part2
[74, 1]
[89, 78]
rfl
case intro.zero b : β„• h : βˆ€ (k : β„•), Even (Ξ© ((b + k) * (b + k))) ⊒ b = b case intro.succ a c : β„• h : βˆ€ (k : β„•), Even (Ξ© ((a + k) * (a + (c + 1) + k))) ⊒ a = a + (c + 1)
case intro.succ a c : β„• h : βˆ€ (k : β„•), Even (Ξ© ((a + k) * (a + (c + 1) + k))) ⊒ a = a + (c + 1)
Please generate a tactic in lean4 to solve the state. STATE: case intro.zero b : β„• h : βˆ€ (k : β„•), Even (Ξ© ((b + k) * (b + k))) ⊒ b = b case intro.succ a c : β„• h : βˆ€ (k : β„•), Even (Ξ© ((a + k) * (a + (c + 1) + k))) ⊒ a = a + (c + 1) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2009/N2/N2.lean
IMOSL.IMO2009N2.final_solution_part2
[74, 1]
[89, 78]
rcases exists_lt_omega_bodd_ne_succ a.succ with ⟨b, h0, h1⟩
case intro.succ a c : β„• h : βˆ€ (k : β„•), Even (Ξ© ((a + k) * (a + (c + 1) + k))) ⊒ a = a + (c + 1)
case intro.succ.intro.intro a c : β„• h : βˆ€ (k : β„•), Even (Ξ© ((a + k) * (a + (c + 1) + k))) b : β„• h0 : a.succ ≀ b h1 : (Ξ© b).bodd β‰  (Ξ© b.succ).bodd ⊒ a = a + (c + 1)
Please generate a tactic in lean4 to solve the state. STATE: case intro.succ a c : β„• h : βˆ€ (k : β„•), Even (Ξ© ((a + k) * (a + (c + 1) + k))) ⊒ a = a + (c + 1) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2009/N2/N2.lean
IMOSL.IMO2009N2.final_solution_part2
[74, 1]
[89, 78]
revert h1
case intro.succ.intro.intro a c : β„• h : βˆ€ (k : β„•), Even (Ξ© ((a + k) * (a + (c + 1) + k))) b : β„• h0 : a.succ ≀ b h1 : (Ξ© b).bodd β‰  (Ξ© b.succ).bodd ⊒ a = a + (c + 1)
case intro.succ.intro.intro a c : β„• h : βˆ€ (k : β„•), Even (Ξ© ((a + k) * (a + (c + 1) + k))) b : β„• h0 : a.succ ≀ b ⊒ (Ξ© b).bodd β‰  (Ξ© b.succ).bodd β†’ a = a + (c + 1)
Please generate a tactic in lean4 to solve the state. STATE: case intro.succ.intro.intro a c : β„• h : βˆ€ (k : β„•), Even (Ξ© ((a + k) * (a + (c + 1) + k))) b : β„• h0 : a.succ ≀ b h1 : (Ξ© b).bodd β‰  (Ξ© b.succ).bodd ⊒ a = a + (c + 1) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2009/N2/N2.lean
IMOSL.IMO2009N2.final_solution_part2
[74, 1]
[89, 78]
apply absurd
case intro.succ.intro.intro a c : β„• h : βˆ€ (k : β„•), Even (Ξ© ((a + k) * (a + (c + 1) + k))) b : β„• h0 : a.succ ≀ b ⊒ (Ξ© b).bodd β‰  (Ξ© b.succ).bodd β†’ a = a + (c + 1)
case intro.succ.intro.intro.h₁ a c : β„• h : βˆ€ (k : β„•), Even (Ξ© ((a + k) * (a + (c + 1) + k))) b : β„• h0 : a.succ ≀ b ⊒ (Ξ© b).bodd = (Ξ© b.succ).bodd
Please generate a tactic in lean4 to solve the state. STATE: case intro.succ.intro.intro a c : β„• h : βˆ€ (k : β„•), Even (Ξ© ((a + k) * (a + (c + 1) + k))) b : β„• h0 : a.succ ≀ b ⊒ (Ξ© b).bodd β‰  (Ξ© b.succ).bodd β†’ a = a + (c + 1) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2009/N2/N2.lean
IMOSL.IMO2009N2.final_solution_part2
[74, 1]
[89, 78]
specialize h (a * c + (b - a) * c.succ)
case intro.succ.intro.intro.h₁ a c : β„• h : βˆ€ (k : β„•), Even (Ξ© ((a + k) * (a + (c + 1) + k))) b : β„• h0 : a.succ ≀ b ⊒ (Ξ© b).bodd = (Ξ© b.succ).bodd
case intro.succ.intro.intro.h₁ a c b : β„• h0 : a.succ ≀ b h : Even (Ξ© ((a + (a * c + (b - a) * c.succ)) * (a + (c + 1) + (a * c + (b - a) * c.succ)))) ⊒ (Ξ© b).bodd = (Ξ© b.succ).bodd
Please generate a tactic in lean4 to solve the state. STATE: case intro.succ.intro.intro.h₁ a c : β„• h : βˆ€ (k : β„•), Even (Ξ© ((a + k) * (a + (c + 1) + k))) b : β„• h0 : a.succ ≀ b ⊒ (Ξ© b).bodd = (Ξ© b.succ).bodd TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2009/N2/N2.lean
IMOSL.IMO2009N2.final_solution_part2
[74, 1]
[89, 78]
rw [Even_iff_bodd, add_right_comm, ← add_assoc, a.add_comm, ← Nat.mul_succ, ← add_mul, Nat.add_sub_of_le (a.le_succ.trans h0), ← Nat.succ_mul] at h
case intro.succ.intro.intro.h₁ a c b : β„• h0 : a.succ ≀ b h : Even (Ξ© ((a + (a * c + (b - a) * c.succ)) * (a + (c + 1) + (a * c + (b - a) * c.succ)))) ⊒ (Ξ© b).bodd = (Ξ© b.succ).bodd
case intro.succ.intro.intro.h₁ a c b : β„• h0 : a.succ ≀ b h : (Ξ© (b * c.succ * (b.succ * c.succ))).bodd = false ⊒ (Ξ© b).bodd = (Ξ© b.succ).bodd
Please generate a tactic in lean4 to solve the state. STATE: case intro.succ.intro.intro.h₁ a c b : β„• h0 : a.succ ≀ b h : Even (Ξ© ((a + (a * c + (b - a) * c.succ)) * (a + (c + 1) + (a * c + (b - a) * c.succ)))) ⊒ (Ξ© b).bodd = (Ξ© b.succ).bodd TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2009/N2/N2.lean
IMOSL.IMO2009N2.final_solution_part2
[74, 1]
[89, 78]
replace h0 := (Nat.zero_lt_of_lt h0).ne.symm
case intro.succ.intro.intro.h₁ a c b : β„• h0 : a.succ ≀ b h : (Ξ© (b * c.succ * (b.succ * c.succ))).bodd = false ⊒ (Ξ© b).bodd = (Ξ© b.succ).bodd
case intro.succ.intro.intro.h₁ a c b : β„• h : (Ξ© (b * c.succ * (b.succ * c.succ))).bodd = false h0 : b β‰  0 ⊒ (Ξ© b).bodd = (Ξ© b.succ).bodd
Please generate a tactic in lean4 to solve the state. STATE: case intro.succ.intro.intro.h₁ a c b : β„• h0 : a.succ ≀ b h : (Ξ© (b * c.succ * (b.succ * c.succ))).bodd = false ⊒ (Ξ© b).bodd = (Ξ© b.succ).bodd TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2009/N2/N2.lean
IMOSL.IMO2009N2.final_solution_part2
[74, 1]
[89, 78]
have h1 := b.succ_ne_zero
case intro.succ.intro.intro.h₁ a c b : β„• h : (Ξ© (b * c.succ * (b.succ * c.succ))).bodd = false h0 : b β‰  0 ⊒ (Ξ© b).bodd = (Ξ© b.succ).bodd
case intro.succ.intro.intro.h₁ a c b : β„• h : (Ξ© (b * c.succ * (b.succ * c.succ))).bodd = false h0 : b β‰  0 h1 : b.succ β‰  0 ⊒ (Ξ© b).bodd = (Ξ© b.succ).bodd
Please generate a tactic in lean4 to solve the state. STATE: case intro.succ.intro.intro.h₁ a c b : β„• h : (Ξ© (b * c.succ * (b.succ * c.succ))).bodd = false h0 : b β‰  0 ⊒ (Ξ© b).bodd = (Ξ© b.succ).bodd TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2009/N2/N2.lean
IMOSL.IMO2009N2.final_solution_part2
[74, 1]
[89, 78]
have h2 := c.succ_ne_zero
case intro.succ.intro.intro.h₁ a c b : β„• h : (Ξ© (b * c.succ * (b.succ * c.succ))).bodd = false h0 : b β‰  0 h1 : b.succ β‰  0 ⊒ (Ξ© b).bodd = (Ξ© b.succ).bodd
case intro.succ.intro.intro.h₁ a c b : β„• h : (Ξ© (b * c.succ * (b.succ * c.succ))).bodd = false h0 : b β‰  0 h1 : b.succ β‰  0 h2 : c.succ β‰  0 ⊒ (Ξ© b).bodd = (Ξ© b.succ).bodd
Please generate a tactic in lean4 to solve the state. STATE: case intro.succ.intro.intro.h₁ a c b : β„• h : (Ξ© (b * c.succ * (b.succ * c.succ))).bodd = false h0 : b β‰  0 h1 : b.succ β‰  0 ⊒ (Ξ© b).bodd = (Ξ© b.succ).bodd TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2009/N2/N2.lean
IMOSL.IMO2009N2.final_solution_part2
[74, 1]
[89, 78]
rwa [cardFactors_mul (Nat.mul_ne_zero h0 h2) (Nat.mul_ne_zero h1 h2), cardFactors_mul h0 h2, cardFactors_mul h1 h2, Nat.bodd_add, xor_eq_false_iff_eq, Nat.bodd_add, Nat.bodd_add, Bool.xor_right_inj] at h
case intro.succ.intro.intro.h₁ a c b : β„• h : (Ξ© (b * c.succ * (b.succ * c.succ))).bodd = false h0 : b β‰  0 h1 : b.succ β‰  0 h2 : c.succ β‰  0 ⊒ (Ξ© b).bodd = (Ξ© b.succ).bodd
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro.succ.intro.intro.h₁ a c b : β„• h : (Ξ© (b * c.succ * (b.succ * c.succ))).bodd = false h0 : b β‰  0 h1 : b.succ β‰  0 h2 : c.succ β‰  0 ⊒ (Ξ© b).bodd = (Ξ© b.succ).bodd TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2009/N2/N2.lean
IMOSL.IMO2009N2.final_solution_part2
[74, 1]
[89, 78]
exact (this (Ξ» k ↦ Nat.mul_comm _ _ β–Έ h k) (Nat.le_of_not_ge h0)).symm
case inr a b : β„• h : βˆ€ (k : β„•), Even (Ξ© ((a + k) * (b + k))) this : βˆ€ {a b : β„•}, (βˆ€ (k : β„•), Even (Ξ© ((a + k) * (b + k)))) β†’ a ≀ b β†’ a = b h0 : Β¬a ≀ b ⊒ a = b
no goals
Please generate a tactic in lean4 to solve the state. STATE: case inr a b : β„• h : βˆ€ (k : β„•), Even (Ξ© ((a + k) * (b + k))) this : βˆ€ {a b : β„•}, (βˆ€ (k : β„•), Even (Ξ© ((a + k) * (b + k)))) β†’ a ≀ b β†’ a = b h0 : Β¬a ≀ b ⊒ a = b TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Answers/SubOneMap.lean
IMOSL.IMO2012A5.sub_one_is_good
[22, 1]
[24, 33]
rw [sub_one_mul, mul_sub_one, sub_sub, ← add_sub_assoc x, sub_add_cancel]
R : Type u_1 inst✝ : NonAssocRing R x y : R ⊒ (fun x => x - 1) (x * y + 1) = (fun x => x - 1) x * (fun x => x - 1) y + (fun x => x - 1) (x + y)
R : Type u_1 inst✝ : NonAssocRing R x y : R ⊒ (fun x => x - 1) (x * y + 1) = x * y
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝ : NonAssocRing R x y : R ⊒ (fun x => x - 1) (x * y + 1) = (fun x => x - 1) x * (fun x => x - 1) y + (fun x => x - 1) (x + y) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Answers/SubOneMap.lean
IMOSL.IMO2012A5.sub_one_is_good
[22, 1]
[24, 33]
exact add_sub_cancel_right _ _
R : Type u_1 inst✝ : NonAssocRing R x y : R ⊒ (fun x => x - 1) (x * y + 1) = x * y
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝ : NonAssocRing R x y : R ⊒ (fun x => x - 1) (x * y + 1) = x * y TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Answers/SubOneMap.lean
IMOSL.IMO2012A5.sub_one_solver
[29, 1]
[59, 59]
suffices βˆ€ x y, f (x + y) = f x + f y + 1 by have h0 (x y) : f (x + y + 1) = f (x + 1) + f (y + 1) := by rw [h, h, h, this, add_assoc, add_add_add_comm] have h1 (x y) : f (x * y + 1) = f (x + 1) * f (y + 1) := by rw [hf.is_good, h, h, this, add_assoc, ← add_assoc, ← mul_add_one (f x), ← add_one_mul (f x)] exact ⟨⟨⟨⟨λ x ↦ f (x + 1), (h 1).trans <| by rw [hf.map_one, zero_add]⟩, h1⟩, ((h 0).trans hf.map_zero_add_one), h0⟩, Ξ» x ↦ congrArg f (sub_add_cancel x 1).symm⟩
R : Type u_2 inst✝¹ : NonAssocRing R S : Type u_1 inst✝ : NonAssocRing S f : R β†’ S hf : NontrivialGood f h : βˆ€ (x : R), f (x + 1) = f x + 1 ⊒ βˆƒ Ο†, βˆ€ (x : R), f x = Ο† (x - 1)
R : Type u_2 inst✝¹ : NonAssocRing R S : Type u_1 inst✝ : NonAssocRing S f : R β†’ S hf : NontrivialGood f h : βˆ€ (x : R), f (x + 1) = f x + 1 ⊒ βˆ€ (x y : R), f (x + y) = f x + f y + 1
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 inst✝¹ : NonAssocRing R S : Type u_1 inst✝ : NonAssocRing S f : R β†’ S hf : NontrivialGood f h : βˆ€ (x : R), f (x + 1) = f x + 1 ⊒ βˆƒ Ο†, βˆ€ (x : R), f x = Ο† (x - 1) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Answers/SubOneMap.lean
IMOSL.IMO2012A5.sub_one_solver
[29, 1]
[59, 59]
have h0 (x y) : f (x * y) + 1 = f x * f y + f (x + y) := (h _).symm.trans (hf.is_good x y)
R : Type u_2 inst✝¹ : NonAssocRing R S : Type u_1 inst✝ : NonAssocRing S f : R β†’ S hf : NontrivialGood f h : βˆ€ (x : R), f (x + 1) = f x + 1 ⊒ βˆ€ (x y : R), f (x + y) = f x + f y + 1
R : Type u_2 inst✝¹ : NonAssocRing R S : Type u_1 inst✝ : NonAssocRing S f : R β†’ S hf : NontrivialGood f h : βˆ€ (x : R), f (x + 1) = f x + 1 h0 : βˆ€ (x y : R), f (x * y) + 1 = f x * f y + f (x + y) ⊒ βˆ€ (x y : R), f (x + y) = f x + f y + 1
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 inst✝¹ : NonAssocRing R S : Type u_1 inst✝ : NonAssocRing S f : R β†’ S hf : NontrivialGood f h : βˆ€ (x : R), f (x + 1) = f x + 1 ⊒ βˆ€ (x y : R), f (x + y) = f x + f y + 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Answers/SubOneMap.lean
IMOSL.IMO2012A5.sub_one_solver
[29, 1]
[59, 59]
have h1 (x y) : f (x * y) = f x * f y + f (x + y) - 1 := eq_sub_of_add_eq (h0 x y)
R : Type u_2 inst✝¹ : NonAssocRing R S : Type u_1 inst✝ : NonAssocRing S f : R β†’ S hf : NontrivialGood f h : βˆ€ (x : R), f (x + 1) = f x + 1 h0 : βˆ€ (x y : R), f (x * y) + 1 = f x * f y + f (x + y) ⊒ βˆ€ (x y : R), f (x + y) = f x + f y + 1
R : Type u_2 inst✝¹ : NonAssocRing R S : Type u_1 inst✝ : NonAssocRing S f : R β†’ S hf : NontrivialGood f h : βˆ€ (x : R), f (x + 1) = f x + 1 h0 : βˆ€ (x y : R), f (x * y) + 1 = f x * f y + f (x + y) h1 : βˆ€ (x y : R), f (x * y) = f x * f y + f (x + y) - 1 ⊒ βˆ€ (x y : R), f (x + y) = f x + f y + 1
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 inst✝¹ : NonAssocRing R S : Type u_1 inst✝ : NonAssocRing S f : R β†’ S hf : NontrivialGood f h : βˆ€ (x : R), f (x + 1) = f x + 1 h0 : βˆ€ (x y : R), f (x * y) + 1 = f x * f y + f (x + y) ⊒ βˆ€ (x y : R), f (x + y) = f x + f y + 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Answers/SubOneMap.lean
IMOSL.IMO2012A5.sub_one_solver
[29, 1]
[59, 59]
have h2 (x y) : f ((x + 1) * y) = f (x * y) + (f y + 1) := by rw [h1, h, add_right_comm, add_one_mul (f x), h, add_add_add_comm, ← h0, add_right_comm, add_sub_cancel_right]
R : Type u_2 inst✝¹ : NonAssocRing R S : Type u_1 inst✝ : NonAssocRing S f : R β†’ S hf : NontrivialGood f h : βˆ€ (x : R), f (x + 1) = f x + 1 h0 : βˆ€ (x y : R), f (x * y) + 1 = f x * f y + f (x + y) h1 : βˆ€ (x y : R), f (x * y) = f x * f y + f (x + y) - 1 ⊒ βˆ€ (x y : R), f (x + y) = f x + f y + 1
R : Type u_2 inst✝¹ : NonAssocRing R S : Type u_1 inst✝ : NonAssocRing S f : R β†’ S hf : NontrivialGood f h : βˆ€ (x : R), f (x + 1) = f x + 1 h0 : βˆ€ (x y : R), f (x * y) + 1 = f x * f y + f (x + y) h1 : βˆ€ (x y : R), f (x * y) = f x * f y + f (x + y) - 1 h2 : βˆ€ (x y : R), f ((x + 1) * y) = f (x * y) + (f y + 1) ⊒ βˆ€ (x y : R), f (x + y) = f x + f y + 1
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 inst✝¹ : NonAssocRing R S : Type u_1 inst✝ : NonAssocRing S f : R β†’ S hf : NontrivialGood f h : βˆ€ (x : R), f (x + 1) = f x + 1 h0 : βˆ€ (x y : R), f (x * y) + 1 = f x * f y + f (x + y) h1 : βˆ€ (x y : R), f (x * y) = f x * f y + f (x + y) - 1 ⊒ βˆ€ (x y : R), f (x + y) = f x + f y + 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Answers/SubOneMap.lean
IMOSL.IMO2012A5.sub_one_solver
[29, 1]
[59, 59]
intro x y
R : Type u_2 inst✝¹ : NonAssocRing R S : Type u_1 inst✝ : NonAssocRing S f : R β†’ S hf : NontrivialGood f h : βˆ€ (x : R), f (x + 1) = f x + 1 h0 : βˆ€ (x y : R), f (x * y) + 1 = f x * f y + f (x + y) h1 : βˆ€ (x y : R), f (x * y) = f x * f y + f (x + y) - 1 h2 : βˆ€ (x y : R), f ((x + 1) * y) = f (x * y) + (f y + 1) ⊒ βˆ€ (x y : R), f (x + y) = f x + f y + 1
R : Type u_2 inst✝¹ : NonAssocRing R S : Type u_1 inst✝ : NonAssocRing S f : R β†’ S hf : NontrivialGood f h : βˆ€ (x : R), f (x + 1) = f x + 1 h0 : βˆ€ (x y : R), f (x * y) + 1 = f x * f y + f (x + y) h1 : βˆ€ (x y : R), f (x * y) = f x * f y + f (x + y) - 1 h2 : βˆ€ (x y : R), f ((x + 1) * y) = f (x * y) + (f y + 1) x y : R ⊒ f (x + y) = f x + f y + 1
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 inst✝¹ : NonAssocRing R S : Type u_1 inst✝ : NonAssocRing S f : R β†’ S hf : NontrivialGood f h : βˆ€ (x : R), f (x + 1) = f x + 1 h0 : βˆ€ (x y : R), f (x * y) + 1 = f x * f y + f (x + y) h1 : βˆ€ (x y : R), f (x * y) = f x * f y + f (x + y) - 1 h2 : βˆ€ (x y : R), f ((x + 1) * y) = f (x * y) + (f y + 1) ⊒ βˆ€ (x y : R), f (x + y) = f x + f y + 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Answers/SubOneMap.lean
IMOSL.IMO2012A5.sub_one_solver
[29, 1]
[59, 59]
have h3 : f (x * ((x + 1) * y)) = f ((x + 1) * (x * y)) := by rw [add_one_mul x, add_one_mul x, mul_add]
R : Type u_2 inst✝¹ : NonAssocRing R S : Type u_1 inst✝ : NonAssocRing S f : R β†’ S hf : NontrivialGood f h : βˆ€ (x : R), f (x + 1) = f x + 1 h0 : βˆ€ (x y : R), f (x * y) + 1 = f x * f y + f (x + y) h1 : βˆ€ (x y : R), f (x * y) = f x * f y + f (x + y) - 1 h2 : βˆ€ (x y : R), f ((x + 1) * y) = f (x * y) + (f y + 1) x y : R ⊒ f (x + y) = f x + f y + 1
R : Type u_2 inst✝¹ : NonAssocRing R S : Type u_1 inst✝ : NonAssocRing S f : R β†’ S hf : NontrivialGood f h : βˆ€ (x : R), f (x + 1) = f x + 1 h0 : βˆ€ (x y : R), f (x * y) + 1 = f x * f y + f (x + y) h1 : βˆ€ (x y : R), f (x * y) = f x * f y + f (x + y) - 1 h2 : βˆ€ (x y : R), f ((x + 1) * y) = f (x * y) + (f y + 1) x y : R h3 : f (x * ((x + 1) * y)) = f ((x + 1) * (x * y)) ⊒ f (x + y) = f x + f y + 1
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 inst✝¹ : NonAssocRing R S : Type u_1 inst✝ : NonAssocRing S f : R β†’ S hf : NontrivialGood f h : βˆ€ (x : R), f (x + 1) = f x + 1 h0 : βˆ€ (x y : R), f (x * y) + 1 = f x * f y + f (x + y) h1 : βˆ€ (x y : R), f (x * y) = f x * f y + f (x + y) - 1 h2 : βˆ€ (x y : R), f ((x + 1) * y) = f (x * y) + (f y + 1) x y : R ⊒ f (x + y) = f x + f y + 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Answers/SubOneMap.lean
IMOSL.IMO2012A5.sub_one_solver
[29, 1]
[59, 59]
rwa [h2, h1, h2, mul_add, ← add_assoc, add_right_comm _ _ 1, h0, ← h, sub_eq_iff_eq_add, add_assoc, add_assoc, add_assoc, add_right_inj, ← add_left_inj 1, add_assoc, ← h, add_right_comm, ← mul_one_add (x + 1), h2, add_left_comm, mul_one_add x, add_assoc, add_right_inj, add_comm 1, h, mul_add_one (f x), h0, add_assoc, add_assoc (_ * _), add_right_inj, ← add_assoc, add_left_inj, ← add_assoc, eq_comm] at h3
R : Type u_2 inst✝¹ : NonAssocRing R S : Type u_1 inst✝ : NonAssocRing S f : R β†’ S hf : NontrivialGood f h : βˆ€ (x : R), f (x + 1) = f x + 1 h0 : βˆ€ (x y : R), f (x * y) + 1 = f x * f y + f (x + y) h1 : βˆ€ (x y : R), f (x * y) = f x * f y + f (x + y) - 1 h2 : βˆ€ (x y : R), f ((x + 1) * y) = f (x * y) + (f y + 1) x y : R h3 : f (x * ((x + 1) * y)) = f ((x + 1) * (x * y)) ⊒ f (x + y) = f x + f y + 1
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 inst✝¹ : NonAssocRing R S : Type u_1 inst✝ : NonAssocRing S f : R β†’ S hf : NontrivialGood f h : βˆ€ (x : R), f (x + 1) = f x + 1 h0 : βˆ€ (x y : R), f (x * y) + 1 = f x * f y + f (x + y) h1 : βˆ€ (x y : R), f (x * y) = f x * f y + f (x + y) - 1 h2 : βˆ€ (x y : R), f ((x + 1) * y) = f (x * y) + (f y + 1) x y : R h3 : f (x * ((x + 1) * y)) = f ((x + 1) * (x * y)) ⊒ f (x + y) = f x + f y + 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Answers/SubOneMap.lean
IMOSL.IMO2012A5.sub_one_solver
[29, 1]
[59, 59]
have h0 (x y) : f (x + y + 1) = f (x + 1) + f (y + 1) := by rw [h, h, h, this, add_assoc, add_add_add_comm]
R : Type u_2 inst✝¹ : NonAssocRing R S : Type u_1 inst✝ : NonAssocRing S f : R β†’ S hf : NontrivialGood f h : βˆ€ (x : R), f (x + 1) = f x + 1 this : βˆ€ (x y : R), f (x + y) = f x + f y + 1 ⊒ βˆƒ Ο†, βˆ€ (x : R), f x = Ο† (x - 1)
R : Type u_2 inst✝¹ : NonAssocRing R S : Type u_1 inst✝ : NonAssocRing S f : R β†’ S hf : NontrivialGood f h : βˆ€ (x : R), f (x + 1) = f x + 1 this : βˆ€ (x y : R), f (x + y) = f x + f y + 1 h0 : βˆ€ (x y : R), f (x + y + 1) = f (x + 1) + f (y + 1) ⊒ βˆƒ Ο†, βˆ€ (x : R), f x = Ο† (x - 1)
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 inst✝¹ : NonAssocRing R S : Type u_1 inst✝ : NonAssocRing S f : R β†’ S hf : NontrivialGood f h : βˆ€ (x : R), f (x + 1) = f x + 1 this : βˆ€ (x y : R), f (x + y) = f x + f y + 1 ⊒ βˆƒ Ο†, βˆ€ (x : R), f x = Ο† (x - 1) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Answers/SubOneMap.lean
IMOSL.IMO2012A5.sub_one_solver
[29, 1]
[59, 59]
have h1 (x y) : f (x * y + 1) = f (x + 1) * f (y + 1) := by rw [hf.is_good, h, h, this, add_assoc, ← add_assoc, ← mul_add_one (f x), ← add_one_mul (f x)]
R : Type u_2 inst✝¹ : NonAssocRing R S : Type u_1 inst✝ : NonAssocRing S f : R β†’ S hf : NontrivialGood f h : βˆ€ (x : R), f (x + 1) = f x + 1 this : βˆ€ (x y : R), f (x + y) = f x + f y + 1 h0 : βˆ€ (x y : R), f (x + y + 1) = f (x + 1) + f (y + 1) ⊒ βˆƒ Ο†, βˆ€ (x : R), f x = Ο† (x - 1)
R : Type u_2 inst✝¹ : NonAssocRing R S : Type u_1 inst✝ : NonAssocRing S f : R β†’ S hf : NontrivialGood f h : βˆ€ (x : R), f (x + 1) = f x + 1 this : βˆ€ (x y : R), f (x + y) = f x + f y + 1 h0 : βˆ€ (x y : R), f (x + y + 1) = f (x + 1) + f (y + 1) h1 : βˆ€ (x y : R), f (x * y + 1) = f (x + 1) * f (y + 1) ⊒ βˆƒ Ο†, βˆ€ (x : R), f x = Ο† (x - 1)
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 inst✝¹ : NonAssocRing R S : Type u_1 inst✝ : NonAssocRing S f : R β†’ S hf : NontrivialGood f h : βˆ€ (x : R), f (x + 1) = f x + 1 this : βˆ€ (x y : R), f (x + y) = f x + f y + 1 h0 : βˆ€ (x y : R), f (x + y + 1) = f (x + 1) + f (y + 1) ⊒ βˆƒ Ο†, βˆ€ (x : R), f x = Ο† (x - 1) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Answers/SubOneMap.lean
IMOSL.IMO2012A5.sub_one_solver
[29, 1]
[59, 59]
exact ⟨⟨⟨⟨λ x ↦ f (x + 1), (h 1).trans <| by rw [hf.map_one, zero_add]⟩, h1⟩, ((h 0).trans hf.map_zero_add_one), h0⟩, Ξ» x ↦ congrArg f (sub_add_cancel x 1).symm⟩
R : Type u_2 inst✝¹ : NonAssocRing R S : Type u_1 inst✝ : NonAssocRing S f : R β†’ S hf : NontrivialGood f h : βˆ€ (x : R), f (x + 1) = f x + 1 this : βˆ€ (x y : R), f (x + y) = f x + f y + 1 h0 : βˆ€ (x y : R), f (x + y + 1) = f (x + 1) + f (y + 1) h1 : βˆ€ (x y : R), f (x * y + 1) = f (x + 1) * f (y + 1) ⊒ βˆƒ Ο†, βˆ€ (x : R), f x = Ο† (x - 1)
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 inst✝¹ : NonAssocRing R S : Type u_1 inst✝ : NonAssocRing S f : R β†’ S hf : NontrivialGood f h : βˆ€ (x : R), f (x + 1) = f x + 1 this : βˆ€ (x y : R), f (x + y) = f x + f y + 1 h0 : βˆ€ (x y : R), f (x + y + 1) = f (x + 1) + f (y + 1) h1 : βˆ€ (x y : R), f (x * y + 1) = f (x + 1) * f (y + 1) ⊒ βˆƒ Ο†, βˆ€ (x : R), f x = Ο† (x - 1) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Answers/SubOneMap.lean
IMOSL.IMO2012A5.sub_one_solver
[29, 1]
[59, 59]
rw [h, h, h, this, add_assoc, add_add_add_comm]
R : Type u_2 inst✝¹ : NonAssocRing R S : Type u_1 inst✝ : NonAssocRing S f : R β†’ S hf : NontrivialGood f h : βˆ€ (x : R), f (x + 1) = f x + 1 this : βˆ€ (x y : R), f (x + y) = f x + f y + 1 x y : R ⊒ f (x + y + 1) = f (x + 1) + f (y + 1)
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 inst✝¹ : NonAssocRing R S : Type u_1 inst✝ : NonAssocRing S f : R β†’ S hf : NontrivialGood f h : βˆ€ (x : R), f (x + 1) = f x + 1 this : βˆ€ (x y : R), f (x + y) = f x + f y + 1 x y : R ⊒ f (x + y + 1) = f (x + 1) + f (y + 1) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Answers/SubOneMap.lean
IMOSL.IMO2012A5.sub_one_solver
[29, 1]
[59, 59]
rw [hf.is_good, h, h, this, add_assoc, ← add_assoc, ← mul_add_one (f x), ← add_one_mul (f x)]
R : Type u_2 inst✝¹ : NonAssocRing R S : Type u_1 inst✝ : NonAssocRing S f : R β†’ S hf : NontrivialGood f h : βˆ€ (x : R), f (x + 1) = f x + 1 this : βˆ€ (x y : R), f (x + y) = f x + f y + 1 h0 : βˆ€ (x y : R), f (x + y + 1) = f (x + 1) + f (y + 1) x y : R ⊒ f (x * y + 1) = f (x + 1) * f (y + 1)
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 inst✝¹ : NonAssocRing R S : Type u_1 inst✝ : NonAssocRing S f : R β†’ S hf : NontrivialGood f h : βˆ€ (x : R), f (x + 1) = f x + 1 this : βˆ€ (x y : R), f (x + y) = f x + f y + 1 h0 : βˆ€ (x y : R), f (x + y + 1) = f (x + 1) + f (y + 1) x y : R ⊒ f (x * y + 1) = f (x + 1) * f (y + 1) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Answers/SubOneMap.lean
IMOSL.IMO2012A5.sub_one_solver
[29, 1]
[59, 59]
rw [hf.map_one, zero_add]
R : Type u_2 inst✝¹ : NonAssocRing R S : Type u_1 inst✝ : NonAssocRing S f : R β†’ S hf : NontrivialGood f h : βˆ€ (x : R), f (x + 1) = f x + 1 this : βˆ€ (x y : R), f (x + y) = f x + f y + 1 h0 : βˆ€ (x y : R), f (x + y + 1) = f (x + 1) + f (y + 1) h1 : βˆ€ (x y : R), f (x * y + 1) = f (x + 1) * f (y + 1) ⊒ f 1 + 1 = 1
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 inst✝¹ : NonAssocRing R S : Type u_1 inst✝ : NonAssocRing S f : R β†’ S hf : NontrivialGood f h : βˆ€ (x : R), f (x + 1) = f x + 1 this : βˆ€ (x y : R), f (x + y) = f x + f y + 1 h0 : βˆ€ (x y : R), f (x + y + 1) = f (x + 1) + f (y + 1) h1 : βˆ€ (x y : R), f (x * y + 1) = f (x + 1) * f (y + 1) ⊒ f 1 + 1 = 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Answers/SubOneMap.lean
IMOSL.IMO2012A5.sub_one_solver
[29, 1]
[59, 59]
rw [h1, h, add_right_comm, add_one_mul (f x), h, add_add_add_comm, ← h0, add_right_comm, add_sub_cancel_right]
R : Type u_2 inst✝¹ : NonAssocRing R S : Type u_1 inst✝ : NonAssocRing S f : R β†’ S hf : NontrivialGood f h : βˆ€ (x : R), f (x + 1) = f x + 1 h0 : βˆ€ (x y : R), f (x * y) + 1 = f x * f y + f (x + y) h1 : βˆ€ (x y : R), f (x * y) = f x * f y + f (x + y) - 1 x y : R ⊒ f ((x + 1) * y) = f (x * y) + (f y + 1)
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 inst✝¹ : NonAssocRing R S : Type u_1 inst✝ : NonAssocRing S f : R β†’ S hf : NontrivialGood f h : βˆ€ (x : R), f (x + 1) = f x + 1 h0 : βˆ€ (x y : R), f (x * y) + 1 = f x * f y + f (x + y) h1 : βˆ€ (x y : R), f (x * y) = f x * f y + f (x + y) - 1 x y : R ⊒ f ((x + 1) * y) = f (x * y) + (f y + 1) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/A5Answers/SubOneMap.lean
IMOSL.IMO2012A5.sub_one_solver
[29, 1]
[59, 59]
rw [add_one_mul x, add_one_mul x, mul_add]
R : Type u_2 inst✝¹ : NonAssocRing R S : Type u_1 inst✝ : NonAssocRing S f : R β†’ S hf : NontrivialGood f h : βˆ€ (x : R), f (x + 1) = f x + 1 h0 : βˆ€ (x y : R), f (x * y) + 1 = f x * f y + f (x + y) h1 : βˆ€ (x y : R), f (x * y) = f x * f y + f (x + y) - 1 h2 : βˆ€ (x y : R), f ((x + 1) * y) = f (x * y) + (f y + 1) x y : R ⊒ f (x * ((x + 1) * y)) = f ((x + 1) * (x * y))
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_2 inst✝¹ : NonAssocRing R S : Type u_1 inst✝ : NonAssocRing S f : R β†’ S hf : NontrivialGood f h : βˆ€ (x : R), f (x + 1) = f x + 1 h0 : βˆ€ (x y : R), f (x * y) + 1 = f x * f y + f (x + y) h1 : βˆ€ (x y : R), f (x * y) = f x * f y + f (x + y) - 1 h2 : βˆ€ (x y : R), f ((x + 1) * y) = f (x * y) + (f y + 1) x y : R ⊒ f (x * ((x + 1) * y)) = f ((x + 1) * (x * y)) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/C1/C1.lean
IMOSL.IMO2017C1.sum_neg_one_pow_Ico
[37, 1]
[46, 74]
rw [add_zero, Ico_self]
a : β„• ⊒ βˆ‘ x ∈ Ico a (a + 0), (-1) ^ x = bif Nat.bodd 0 then (-1) ^ a else 0
a : β„• ⊒ βˆ‘ x ∈ βˆ…, (-1) ^ x = bif Nat.bodd 0 then (-1) ^ a else 0
Please generate a tactic in lean4 to solve the state. STATE: a : β„• ⊒ βˆ‘ x ∈ Ico a (a + 0), (-1) ^ x = bif Nat.bodd 0 then (-1) ^ a else 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/C1/C1.lean
IMOSL.IMO2017C1.sum_neg_one_pow_Ico
[37, 1]
[46, 74]
rfl
a : β„• ⊒ βˆ‘ x ∈ βˆ…, (-1) ^ x = bif Nat.bodd 0 then (-1) ^ a else 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: a : β„• ⊒ βˆ‘ x ∈ βˆ…, (-1) ^ x = bif Nat.bodd 0 then (-1) ^ a else 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/C1/C1.lean
IMOSL.IMO2017C1.sum_neg_one_pow_Ico
[37, 1]
[46, 74]
rw [Nat.Ico_succ_singleton, sum_singleton]
a : β„• ⊒ βˆ‘ x ∈ Ico a (a + 1), (-1) ^ x = bif Nat.bodd 1 then (-1) ^ a else 0
a : β„• ⊒ (-1) ^ a = bif Nat.bodd 1 then (-1) ^ a else 0
Please generate a tactic in lean4 to solve the state. STATE: a : β„• ⊒ βˆ‘ x ∈ Ico a (a + 1), (-1) ^ x = bif Nat.bodd 1 then (-1) ^ a else 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/C1/C1.lean
IMOSL.IMO2017C1.sum_neg_one_pow_Ico
[37, 1]
[46, 74]
rfl
a : β„• ⊒ (-1) ^ a = bif Nat.bodd 1 then (-1) ^ a else 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: a : β„• ⊒ (-1) ^ a = bif Nat.bodd 1 then (-1) ^ a else 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/C1/C1.lean
IMOSL.IMO2017C1.sum_neg_one_pow_Ico
[37, 1]
[46, 74]
have h : a ≀ a + n := a.le_add_right n
a n : β„• ⊒ βˆ‘ x ∈ Ico a (a + (n + 2)), (-1) ^ x = bif (n + 2).bodd then (-1) ^ a else 0
a n : β„• h : a ≀ a + n ⊒ βˆ‘ x ∈ Ico a (a + (n + 2)), (-1) ^ x = bif (n + 2).bodd then (-1) ^ a else 0
Please generate a tactic in lean4 to solve the state. STATE: a n : β„• ⊒ βˆ‘ x ∈ Ico a (a + (n + 2)), (-1) ^ x = bif (n + 2).bodd then (-1) ^ a else 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/C1/C1.lean
IMOSL.IMO2017C1.sum_neg_one_pow_Ico
[37, 1]
[46, 74]
rw [← add_assoc, sum_Ico_succ_top (h.trans (a + n).le_succ), pow_succ', neg_one_mul, sum_Ico_succ_top h, sum_neg_one_pow_Ico a n, add_neg_cancel_right, Nat.bodd_add, Nat.bodd_two, Bool.xor_false]
a n : β„• h : a ≀ a + n ⊒ βˆ‘ x ∈ Ico a (a + (n + 2)), (-1) ^ x = bif (n + 2).bodd then (-1) ^ a else 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: a n : β„• h : a ≀ a + n ⊒ βˆ‘ x ∈ Ico a (a + (n + 2)), (-1) ^ x = bif (n + 2).bodd then (-1) ^ a else 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/C1/C1.lean
IMOSL.IMO2017C1.latticeRect_weight
[55, 1]
[61, 62]
rw [weight, latticeRect, sum_product]
q : (β„• Γ— β„•) Γ— β„• Γ— β„• ⊒ weight (latticeRect q) = bif q.2.1.bodd && q.2.2.bodd then (-1) ^ (q.1.1 + q.1.2) else 0
q : (β„• Γ— β„•) Γ— β„• Γ— β„• ⊒ βˆ‘ x ∈ Ico q.1.1 (q.1.1 + q.2.1), βˆ‘ y ∈ Ico q.1.2 (q.1.2 + q.2.2), (-1) ^ (x, y).1 * (-1) ^ (x, y).2 = bif q.2.1.bodd && q.2.2.bodd then (-1) ^ (q.1.1 + q.1.2) else 0
Please generate a tactic in lean4 to solve the state. STATE: q : (β„• Γ— β„•) Γ— β„• Γ— β„• ⊒ weight (latticeRect q) = bif q.2.1.bodd && q.2.2.bodd then (-1) ^ (q.1.1 + q.1.2) else 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/C1/C1.lean
IMOSL.IMO2017C1.latticeRect_weight
[55, 1]
[61, 62]
simp_rw [← mul_sum]
q : (β„• Γ— β„•) Γ— β„• Γ— β„• ⊒ βˆ‘ x ∈ Ico q.1.1 (q.1.1 + q.2.1), βˆ‘ y ∈ Ico q.1.2 (q.1.2 + q.2.2), (-1) ^ (x, y).1 * (-1) ^ (x, y).2 = bif q.2.1.bodd && q.2.2.bodd then (-1) ^ (q.1.1 + q.1.2) else 0
q : (β„• Γ— β„•) Γ— β„• Γ— β„• ⊒ βˆ‘ x ∈ Ico q.1.1 (q.1.1 + q.2.1), (-1) ^ x * βˆ‘ i ∈ Ico q.1.2 (q.1.2 + q.2.2), (-1) ^ i = bif q.2.1.bodd && q.2.2.bodd then (-1) ^ (q.1.1 + q.1.2) else 0
Please generate a tactic in lean4 to solve the state. STATE: q : (β„• Γ— β„•) Γ— β„• Γ— β„• ⊒ βˆ‘ x ∈ Ico q.1.1 (q.1.1 + q.2.1), βˆ‘ y ∈ Ico q.1.2 (q.1.2 + q.2.2), (-1) ^ (x, y).1 * (-1) ^ (x, y).2 = bif q.2.1.bodd && q.2.2.bodd then (-1) ^ (q.1.1 + q.1.2) else 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/C1/C1.lean
IMOSL.IMO2017C1.latticeRect_weight
[55, 1]
[61, 62]
rw [← sum_mul, sum_neg_one_pow_Ico, sum_neg_one_pow_Ico]
q : (β„• Γ— β„•) Γ— β„• Γ— β„• ⊒ βˆ‘ x ∈ Ico q.1.1 (q.1.1 + q.2.1), (-1) ^ x * βˆ‘ i ∈ Ico q.1.2 (q.1.2 + q.2.2), (-1) ^ i = bif q.2.1.bodd && q.2.2.bodd then (-1) ^ (q.1.1 + q.1.2) else 0
q : (β„• Γ— β„•) Γ— β„• Γ— β„• ⊒ ((bif q.2.1.bodd then (-1) ^ q.1.1 else 0) * bif q.2.2.bodd then (-1) ^ q.1.2 else 0) = bif q.2.1.bodd && q.2.2.bodd then (-1) ^ (q.1.1 + q.1.2) else 0
Please generate a tactic in lean4 to solve the state. STATE: q : (β„• Γ— β„•) Γ— β„• Γ— β„• ⊒ βˆ‘ x ∈ Ico q.1.1 (q.1.1 + q.2.1), (-1) ^ x * βˆ‘ i ∈ Ico q.1.2 (q.1.2 + q.2.2), (-1) ^ i = bif q.2.1.bodd && q.2.2.bodd then (-1) ^ (q.1.1 + q.1.2) else 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/C1/C1.lean
IMOSL.IMO2017C1.latticeRect_weight
[55, 1]
[61, 62]
cases q.2.1.bodd
q : (β„• Γ— β„•) Γ— β„• Γ— β„• ⊒ ((bif q.2.1.bodd then (-1) ^ q.1.1 else 0) * bif q.2.2.bodd then (-1) ^ q.1.2 else 0) = bif q.2.1.bodd && q.2.2.bodd then (-1) ^ (q.1.1 + q.1.2) else 0
case false q : (β„• Γ— β„•) Γ— β„• Γ— β„• ⊒ ((bif false then (-1) ^ q.1.1 else 0) * bif q.2.2.bodd then (-1) ^ q.1.2 else 0) = bif false && q.2.2.bodd then (-1) ^ (q.1.1 + q.1.2) else 0 case true q : (β„• Γ— β„•) Γ— β„• Γ— β„• ⊒ ((bif true then (-1) ^ q.1.1 else 0) * bif q.2.2.bodd then (-1) ^ q.1.2 else 0) = bif true && q.2.2.bodd then (-1) ^ (q.1.1 + q.1.2) else 0
Please generate a tactic in lean4 to solve the state. STATE: q : (β„• Γ— β„•) Γ— β„• Γ— β„• ⊒ ((bif q.2.1.bodd then (-1) ^ q.1.1 else 0) * bif q.2.2.bodd then (-1) ^ q.1.2 else 0) = bif q.2.1.bodd && q.2.2.bodd then (-1) ^ (q.1.1 + q.1.2) else 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/C1/C1.lean
IMOSL.IMO2017C1.latticeRect_weight
[55, 1]
[61, 62]
exact zero_mul _
case false q : (β„• Γ— β„•) Γ— β„• Γ— β„• ⊒ ((bif false then (-1) ^ q.1.1 else 0) * bif q.2.2.bodd then (-1) ^ q.1.2 else 0) = bif false && q.2.2.bodd then (-1) ^ (q.1.1 + q.1.2) else 0 case true q : (β„• Γ— β„•) Γ— β„• Γ— β„• ⊒ ((bif true then (-1) ^ q.1.1 else 0) * bif q.2.2.bodd then (-1) ^ q.1.2 else 0) = bif true && q.2.2.bodd then (-1) ^ (q.1.1 + q.1.2) else 0
case true q : (β„• Γ— β„•) Γ— β„• Γ— β„• ⊒ ((bif true then (-1) ^ q.1.1 else 0) * bif q.2.2.bodd then (-1) ^ q.1.2 else 0) = bif true && q.2.2.bodd then (-1) ^ (q.1.1 + q.1.2) else 0
Please generate a tactic in lean4 to solve the state. STATE: case false q : (β„• Γ— β„•) Γ— β„• Γ— β„• ⊒ ((bif false then (-1) ^ q.1.1 else 0) * bif q.2.2.bodd then (-1) ^ q.1.2 else 0) = bif false && q.2.2.bodd then (-1) ^ (q.1.1 + q.1.2) else 0 case true q : (β„• Γ— β„•) Γ— β„• Γ— β„• ⊒ ((bif true then (-1) ^ q.1.1 else 0) * bif q.2.2.bodd then (-1) ^ q.1.2 else 0) = bif true && q.2.2.bodd then (-1) ^ (q.1.1 + q.1.2) else 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/C1/C1.lean
IMOSL.IMO2017C1.latticeRect_weight
[55, 1]
[61, 62]
cases q.2.2.bodd
case true q : (β„• Γ— β„•) Γ— β„• Γ— β„• ⊒ ((bif true then (-1) ^ q.1.1 else 0) * bif q.2.2.bodd then (-1) ^ q.1.2 else 0) = bif true && q.2.2.bodd then (-1) ^ (q.1.1 + q.1.2) else 0
case true.false q : (β„• Γ— β„•) Γ— β„• Γ— β„• ⊒ ((bif true then (-1) ^ q.1.1 else 0) * bif false then (-1) ^ q.1.2 else 0) = bif true && false then (-1) ^ (q.1.1 + q.1.2) else 0 case true.true q : (β„• Γ— β„•) Γ— β„• Γ— β„• ⊒ ((bif true then (-1) ^ q.1.1 else 0) * bif true then (-1) ^ q.1.2 else 0) = bif true && true then (-1) ^ (q.1.1 + q.1.2) else 0
Please generate a tactic in lean4 to solve the state. STATE: case true q : (β„• Γ— β„•) Γ— β„• Γ— β„• ⊒ ((bif true then (-1) ^ q.1.1 else 0) * bif q.2.2.bodd then (-1) ^ q.1.2 else 0) = bif true && q.2.2.bodd then (-1) ^ (q.1.1 + q.1.2) else 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/C1/C1.lean
IMOSL.IMO2017C1.latticeRect_weight
[55, 1]
[61, 62]
exacts [mul_zero _, (pow_add _ _ _).symm]
case true.false q : (β„• Γ— β„•) Γ— β„• Γ— β„• ⊒ ((bif true then (-1) ^ q.1.1 else 0) * bif false then (-1) ^ q.1.2 else 0) = bif true && false then (-1) ^ (q.1.1 + q.1.2) else 0 case true.true q : (β„• Γ— β„•) Γ— β„• Γ— β„• ⊒ ((bif true then (-1) ^ q.1.1 else 0) * bif true then (-1) ^ q.1.2 else 0) = bif true && true then (-1) ^ (q.1.1 + q.1.2) else 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: case true.false q : (β„• Γ— β„•) Γ— β„• Γ— β„• ⊒ ((bif true then (-1) ^ q.1.1 else 0) * bif false then (-1) ^ q.1.2 else 0) = bif true && false then (-1) ^ (q.1.1 + q.1.2) else 0 case true.true q : (β„• Γ— β„•) Γ— β„• Γ— β„• ⊒ ((bif true then (-1) ^ q.1.1 else 0) * bif true then (-1) ^ q.1.2 else 0) = bif true && true then (-1) ^ (q.1.1 + q.1.2) else 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/C1/C1.lean
IMOSL.IMO2017C1.latticeRect_weight_pos_imp
[63, 1]
[72, 69]
rw [latticeRect_weight, ← Bool.and_eq_true]
q : (β„• Γ— β„•) Γ— β„• Γ— β„• ⊒ 0 < weight (latticeRect q) β†’ (q.2.1.bodd = true ∧ q.2.2.bodd = true) ∧ (q.1.1 + q.1.2).bodd = false
q : (β„• Γ— β„•) Γ— β„• Γ— β„• ⊒ (0 < bif q.2.1.bodd && q.2.2.bodd then (-1) ^ (q.1.1 + q.1.2) else 0) β†’ (q.2.1.bodd && q.2.2.bodd) = true ∧ (q.1.1 + q.1.2).bodd = false
Please generate a tactic in lean4 to solve the state. STATE: q : (β„• Γ— β„•) Γ— β„• Γ— β„• ⊒ 0 < weight (latticeRect q) β†’ (q.2.1.bodd = true ∧ q.2.2.bodd = true) ∧ (q.1.1 + q.1.2).bodd = false TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/C1/C1.lean
IMOSL.IMO2017C1.latticeRect_weight_pos_imp
[63, 1]
[72, 69]
cases q.2.1.bodd && q.2.2.bodd
q : (β„• Γ— β„•) Γ— β„• Γ— β„• ⊒ (0 < bif q.2.1.bodd && q.2.2.bodd then (-1) ^ (q.1.1 + q.1.2) else 0) β†’ (q.2.1.bodd && q.2.2.bodd) = true ∧ (q.1.1 + q.1.2).bodd = false
case false q : (β„• Γ— β„•) Γ— β„• Γ— β„• ⊒ (0 < bif false then (-1) ^ (q.1.1 + q.1.2) else 0) β†’ false = true ∧ (q.1.1 + q.1.2).bodd = false case true q : (β„• Γ— β„•) Γ— β„• Γ— β„• ⊒ (0 < bif true then (-1) ^ (q.1.1 + q.1.2) else 0) β†’ true = true ∧ (q.1.1 + q.1.2).bodd = false
Please generate a tactic in lean4 to solve the state. STATE: q : (β„• Γ— β„•) Γ— β„• Γ— β„• ⊒ (0 < bif q.2.1.bodd && q.2.2.bodd then (-1) ^ (q.1.1 + q.1.2) else 0) β†’ (q.2.1.bodd && q.2.2.bodd) = true ∧ (q.1.1 + q.1.2).bodd = false TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/C1/C1.lean
IMOSL.IMO2017C1.latticeRect_weight_pos_imp
[63, 1]
[72, 69]
exact Ξ» h ↦ absurd h (le_refl 0).not_lt
case false q : (β„• Γ— β„•) Γ— β„• Γ— β„• ⊒ (0 < bif false then (-1) ^ (q.1.1 + q.1.2) else 0) β†’ false = true ∧ (q.1.1 + q.1.2).bodd = false
no goals
Please generate a tactic in lean4 to solve the state. STATE: case false q : (β„• Γ— β„•) Γ— β„• Γ— β„• ⊒ (0 < bif false then (-1) ^ (q.1.1 + q.1.2) else 0) β†’ false = true ∧ (q.1.1 + q.1.2).bodd = false TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/C1/C1.lean
IMOSL.IMO2017C1.latticeRect_weight_pos_imp
[63, 1]
[72, 69]
rw [neg_one_pow_eq_pow_mod_two (R := β„€), Nat.mod_two_of_bodd]
case true q : (β„• Γ— β„•) Γ— β„• Γ— β„• ⊒ (0 < bif true then (-1) ^ (q.1.1 + q.1.2) else 0) β†’ true = true ∧ (q.1.1 + q.1.2).bodd = false
case true q : (β„• Γ— β„•) Γ— β„• Γ— β„• ⊒ (0 < bif true then (-1) ^ bif (q.1.1 + q.1.2).bodd then 1 else 0 else 0) β†’ true = true ∧ (q.1.1 + q.1.2).bodd = false
Please generate a tactic in lean4 to solve the state. STATE: case true q : (β„• Γ— β„•) Γ— β„• Γ— β„• ⊒ (0 < bif true then (-1) ^ (q.1.1 + q.1.2) else 0) β†’ true = true ∧ (q.1.1 + q.1.2).bodd = false TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/C1/C1.lean
IMOSL.IMO2017C1.latticeRect_weight_pos_imp
[63, 1]
[72, 69]
cases (q.1.1 + q.1.2).bodd
case true q : (β„• Γ— β„•) Γ— β„• Γ— β„• ⊒ (0 < bif true then (-1) ^ bif (q.1.1 + q.1.2).bodd then 1 else 0 else 0) β†’ true = true ∧ (q.1.1 + q.1.2).bodd = false
case true.false q : (β„• Γ— β„•) Γ— β„• Γ— β„• ⊒ (0 < bif true then (-1) ^ bif false then 1 else 0 else 0) β†’ true = true ∧ false = false case true.true q : (β„• Γ— β„•) Γ— β„• Γ— β„• ⊒ (0 < bif true then (-1) ^ bif true then 1 else 0 else 0) β†’ true = true ∧ true = false
Please generate a tactic in lean4 to solve the state. STATE: case true q : (β„• Γ— β„•) Γ— β„• Γ— β„• ⊒ (0 < bif true then (-1) ^ bif (q.1.1 + q.1.2).bodd then 1 else 0 else 0) β†’ true = true ∧ (q.1.1 + q.1.2).bodd = false TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/C1/C1.lean
IMOSL.IMO2017C1.latticeRect_weight_pos_imp
[63, 1]
[72, 69]
exacts [Ξ» _ ↦ ⟨rfl, rfl⟩, Ξ» h ↦ absurd neg_one_lt_zero h.not_lt]
case true.false q : (β„• Γ— β„•) Γ— β„• Γ— β„• ⊒ (0 < bif true then (-1) ^ bif false then 1 else 0 else 0) β†’ true = true ∧ false = false case true.true q : (β„• Γ— β„•) Γ— β„• Γ— β„• ⊒ (0 < bif true then (-1) ^ bif true then 1 else 0 else 0) β†’ true = true ∧ true = false
no goals
Please generate a tactic in lean4 to solve the state. STATE: case true.false q : (β„• Γ— β„•) Γ— β„• Γ— β„• ⊒ (0 < bif true then (-1) ^ bif false then 1 else 0 else 0) β†’ true = true ∧ false = false case true.true q : (β„• Γ— β„•) Γ— β„• Γ— β„• ⊒ (0 < bif true then (-1) ^ bif true then 1 else 0 else 0) β†’ true = true ∧ true = false TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/C1/C1.lean
IMOSL.IMO2017C1.final_solution
[77, 1]
[90, 24]
suffices βˆƒ i ∈ I, 0 < weight (latticeRect (Q i)) from this.elim Ξ» i h3 ↦ ⟨i, h3.1, latticeRect_weight_pos_imp h3.2⟩
ΞΉ : Type u_1 Q : ΞΉ β†’ (β„• Γ— β„•) Γ— β„• Γ— β„• m n : β„• I : Finset ΞΉ h : (↑I).PairwiseDisjoint (latticeRect ∘ Q) h0 : m.bodd = true ∧ n.bodd = true h1 : latticeRect ((0, 0), m, n) = I.disjiUnion (latticeRect ∘ Q) h ⊒ βˆƒ i ∈ I, ((Q i).2.1.bodd = true ∧ (Q i).2.2.bodd = true) ∧ ((Q i).1.1 + (Q i).1.2).bodd = false
ΞΉ : Type u_1 Q : ΞΉ β†’ (β„• Γ— β„•) Γ— β„• Γ— β„• m n : β„• I : Finset ΞΉ h : (↑I).PairwiseDisjoint (latticeRect ∘ Q) h0 : m.bodd = true ∧ n.bodd = true h1 : latticeRect ((0, 0), m, n) = I.disjiUnion (latticeRect ∘ Q) h ⊒ βˆƒ i ∈ I, 0 < weight (latticeRect (Q i))
Please generate a tactic in lean4 to solve the state. STATE: ΞΉ : Type u_1 Q : ΞΉ β†’ (β„• Γ— β„•) Γ— β„• Γ— β„• m n : β„• I : Finset ΞΉ h : (↑I).PairwiseDisjoint (latticeRect ∘ Q) h0 : m.bodd = true ∧ n.bodd = true h1 : latticeRect ((0, 0), m, n) = I.disjiUnion (latticeRect ∘ Q) h ⊒ βˆƒ i ∈ I, ((Q i).2.1.bodd = true ∧ (Q i).2.2.bodd = true) ∧ ((Q i).1.1 + (Q i).1.2).bodd = false TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/C1/C1.lean
IMOSL.IMO2017C1.final_solution
[77, 1]
[90, 24]
apply_fun weight at h1
ΞΉ : Type u_1 Q : ΞΉ β†’ (β„• Γ— β„•) Γ— β„• Γ— β„• m n : β„• I : Finset ΞΉ h : (↑I).PairwiseDisjoint (latticeRect ∘ Q) h0 : m.bodd = true ∧ n.bodd = true h1 : latticeRect ((0, 0), m, n) = I.disjiUnion (latticeRect ∘ Q) h ⊒ βˆƒ i ∈ I, 0 < weight (latticeRect (Q i))
ΞΉ : Type u_1 Q : ΞΉ β†’ (β„• Γ— β„•) Γ— β„• Γ— β„• m n : β„• I : Finset ΞΉ h : (↑I).PairwiseDisjoint (latticeRect ∘ Q) h0 : m.bodd = true ∧ n.bodd = true h1 : weight (latticeRect ((0, 0), m, n)) = weight (I.disjiUnion (latticeRect ∘ Q) h) ⊒ βˆƒ i ∈ I, 0 < weight (latticeRect (Q i))
Please generate a tactic in lean4 to solve the state. STATE: ΞΉ : Type u_1 Q : ΞΉ β†’ (β„• Γ— β„•) Γ— β„• Γ— β„• m n : β„• I : Finset ΞΉ h : (↑I).PairwiseDisjoint (latticeRect ∘ Q) h0 : m.bodd = true ∧ n.bodd = true h1 : latticeRect ((0, 0), m, n) = I.disjiUnion (latticeRect ∘ Q) h ⊒ βˆƒ i ∈ I, 0 < weight (latticeRect (Q i)) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/C1/C1.lean
IMOSL.IMO2017C1.final_solution
[77, 1]
[90, 24]
rw [latticeRect_weight] at h1
ΞΉ : Type u_1 Q : ΞΉ β†’ (β„• Γ— β„•) Γ— β„• Γ— β„• m n : β„• I : Finset ΞΉ h : (↑I).PairwiseDisjoint (latticeRect ∘ Q) h0 : m.bodd = true ∧ n.bodd = true h1 : weight (latticeRect ((0, 0), m, n)) = weight (I.disjiUnion (latticeRect ∘ Q) h) ⊒ βˆƒ i ∈ I, 0 < weight (latticeRect (Q i))
ΞΉ : Type u_1 Q : ΞΉ β†’ (β„• Γ— β„•) Γ— β„• Γ— β„• m n : β„• I : Finset ΞΉ h : (↑I).PairwiseDisjoint (latticeRect ∘ Q) h0 : m.bodd = true ∧ n.bodd = true h1 : (bif ((0, 0), m, n).2.1.bodd && ((0, 0), m, n).2.2.bodd then (-1) ^ (((0, 0), m, n).1.1 + ((0, 0), m, n).1.2) else 0) = weight (I.disjiUnion (latticeRect ∘ Q) h) ⊒ βˆƒ i ∈ I, 0 < weight (latticeRect (Q i))
Please generate a tactic in lean4 to solve the state. STATE: ΞΉ : Type u_1 Q : ΞΉ β†’ (β„• Γ— β„•) Γ— β„• Γ— β„• m n : β„• I : Finset ΞΉ h : (↑I).PairwiseDisjoint (latticeRect ∘ Q) h0 : m.bodd = true ∧ n.bodd = true h1 : weight (latticeRect ((0, 0), m, n)) = weight (I.disjiUnion (latticeRect ∘ Q) h) ⊒ βˆƒ i ∈ I, 0 < weight (latticeRect (Q i)) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/C1/C1.lean
IMOSL.IMO2017C1.final_solution
[77, 1]
[90, 24]
simp only at h1
ΞΉ : Type u_1 Q : ΞΉ β†’ (β„• Γ— β„•) Γ— β„• Γ— β„• m n : β„• I : Finset ΞΉ h : (↑I).PairwiseDisjoint (latticeRect ∘ Q) h0 : m.bodd = true ∧ n.bodd = true h1 : (bif ((0, 0), m, n).2.1.bodd && ((0, 0), m, n).2.2.bodd then (-1) ^ (((0, 0), m, n).1.1 + ((0, 0), m, n).1.2) else 0) = weight (I.disjiUnion (latticeRect ∘ Q) h) ⊒ βˆƒ i ∈ I, 0 < weight (latticeRect (Q i))
ΞΉ : Type u_1 Q : ΞΉ β†’ (β„• Γ— β„•) Γ— β„• Γ— β„• m n : β„• I : Finset ΞΉ h : (↑I).PairwiseDisjoint (latticeRect ∘ Q) h0 : m.bodd = true ∧ n.bodd = true h1 : (bif m.bodd && n.bodd then (-1) ^ (0 + 0) else 0) = weight (I.disjiUnion (latticeRect ∘ Q) h) ⊒ βˆƒ i ∈ I, 0 < weight (latticeRect (Q i))
Please generate a tactic in lean4 to solve the state. STATE: ΞΉ : Type u_1 Q : ΞΉ β†’ (β„• Γ— β„•) Γ— β„• Γ— β„• m n : β„• I : Finset ΞΉ h : (↑I).PairwiseDisjoint (latticeRect ∘ Q) h0 : m.bodd = true ∧ n.bodd = true h1 : (bif ((0, 0), m, n).2.1.bodd && ((0, 0), m, n).2.2.bodd then (-1) ^ (((0, 0), m, n).1.1 + ((0, 0), m, n).1.2) else 0) = weight (I.disjiUnion (latticeRect ∘ Q) h) ⊒ βˆƒ i ∈ I, 0 < weight (latticeRect (Q i)) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/C1/C1.lean
IMOSL.IMO2017C1.final_solution
[77, 1]
[90, 24]
rw [disjiUnion_weight_eq, Function.comp, h0.1, h0.2, add_zero] at h1
ΞΉ : Type u_1 Q : ΞΉ β†’ (β„• Γ— β„•) Γ— β„• Γ— β„• m n : β„• I : Finset ΞΉ h : (↑I).PairwiseDisjoint (latticeRect ∘ Q) h0 : m.bodd = true ∧ n.bodd = true h1 : (bif m.bodd && n.bodd then (-1) ^ (0 + 0) else 0) = weight (I.disjiUnion (latticeRect ∘ Q) h) ⊒ βˆƒ i ∈ I, 0 < weight (latticeRect (Q i))
ΞΉ : Type u_1 Q : ΞΉ β†’ (β„• Γ— β„•) Γ— β„• Γ— β„• m n : β„• I : Finset ΞΉ h : (↑I).PairwiseDisjoint (latticeRect ∘ Q) h0 : m.bodd = true ∧ n.bodd = true h1 : (bif true && true then (-1) ^ 0 else 0) = βˆ‘ i ∈ I, weight ((fun x => latticeRect (Q x)) i) ⊒ βˆƒ i ∈ I, 0 < weight (latticeRect (Q i))
Please generate a tactic in lean4 to solve the state. STATE: ΞΉ : Type u_1 Q : ΞΉ β†’ (β„• Γ— β„•) Γ— β„• Γ— β„• m n : β„• I : Finset ΞΉ h : (↑I).PairwiseDisjoint (latticeRect ∘ Q) h0 : m.bodd = true ∧ n.bodd = true h1 : (bif m.bodd && n.bodd then (-1) ^ (0 + 0) else 0) = weight (I.disjiUnion (latticeRect ∘ Q) h) ⊒ βˆƒ i ∈ I, 0 < weight (latticeRect (Q i)) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/C1/C1.lean
IMOSL.IMO2017C1.final_solution
[77, 1]
[90, 24]
apply exists_lt_of_sum_lt
ΞΉ : Type u_1 Q : ΞΉ β†’ (β„• Γ— β„•) Γ— β„• Γ— β„• m n : β„• I : Finset ΞΉ h : (↑I).PairwiseDisjoint (latticeRect ∘ Q) h0 : m.bodd = true ∧ n.bodd = true h1 : (bif true && true then (-1) ^ 0 else 0) = βˆ‘ i ∈ I, weight ((fun x => latticeRect (Q x)) i) ⊒ βˆƒ i ∈ I, 0 < weight (latticeRect (Q i))
case Hlt ΞΉ : Type u_1 Q : ΞΉ β†’ (β„• Γ— β„•) Γ— β„• Γ— β„• m n : β„• I : Finset ΞΉ h : (↑I).PairwiseDisjoint (latticeRect ∘ Q) h0 : m.bodd = true ∧ n.bodd = true h1 : (bif true && true then (-1) ^ 0 else 0) = βˆ‘ i ∈ I, weight ((fun x => latticeRect (Q x)) i) ⊒ βˆ‘ i ∈ I, 0 < βˆ‘ i ∈ I, weight (latticeRect (Q i))
Please generate a tactic in lean4 to solve the state. STATE: ΞΉ : Type u_1 Q : ΞΉ β†’ (β„• Γ— β„•) Γ— β„• Γ— β„• m n : β„• I : Finset ΞΉ h : (↑I).PairwiseDisjoint (latticeRect ∘ Q) h0 : m.bodd = true ∧ n.bodd = true h1 : (bif true && true then (-1) ^ 0 else 0) = βˆ‘ i ∈ I, weight ((fun x => latticeRect (Q x)) i) ⊒ βˆƒ i ∈ I, 0 < weight (latticeRect (Q i)) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/C1/C1.lean
IMOSL.IMO2017C1.final_solution
[77, 1]
[90, 24]
rw [sum_const_zero, ← h1]
case Hlt ΞΉ : Type u_1 Q : ΞΉ β†’ (β„• Γ— β„•) Γ— β„• Γ— β„• m n : β„• I : Finset ΞΉ h : (↑I).PairwiseDisjoint (latticeRect ∘ Q) h0 : m.bodd = true ∧ n.bodd = true h1 : (bif true && true then (-1) ^ 0 else 0) = βˆ‘ i ∈ I, weight ((fun x => latticeRect (Q x)) i) ⊒ βˆ‘ i ∈ I, 0 < βˆ‘ i ∈ I, weight (latticeRect (Q i))
case Hlt ΞΉ : Type u_1 Q : ΞΉ β†’ (β„• Γ— β„•) Γ— β„• Γ— β„• m n : β„• I : Finset ΞΉ h : (↑I).PairwiseDisjoint (latticeRect ∘ Q) h0 : m.bodd = true ∧ n.bodd = true h1 : (bif true && true then (-1) ^ 0 else 0) = βˆ‘ i ∈ I, weight ((fun x => latticeRect (Q x)) i) ⊒ 0 < bif true && true then (-1) ^ 0 else 0
Please generate a tactic in lean4 to solve the state. STATE: case Hlt ΞΉ : Type u_1 Q : ΞΉ β†’ (β„• Γ— β„•) Γ— β„• Γ— β„• m n : β„• I : Finset ΞΉ h : (↑I).PairwiseDisjoint (latticeRect ∘ Q) h0 : m.bodd = true ∧ n.bodd = true h1 : (bif true && true then (-1) ^ 0 else 0) = βˆ‘ i ∈ I, weight ((fun x => latticeRect (Q x)) i) ⊒ βˆ‘ i ∈ I, 0 < βˆ‘ i ∈ I, weight (latticeRect (Q i)) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2017/C1/C1.lean
IMOSL.IMO2017C1.final_solution
[77, 1]
[90, 24]
exact Int.zero_lt_one
case Hlt ΞΉ : Type u_1 Q : ΞΉ β†’ (β„• Γ— β„•) Γ— β„• Γ— β„• m n : β„• I : Finset ΞΉ h : (↑I).PairwiseDisjoint (latticeRect ∘ Q) h0 : m.bodd = true ∧ n.bodd = true h1 : (bif true && true then (-1) ^ 0 else 0) = βˆ‘ i ∈ I, weight ((fun x => latticeRect (Q x)) i) ⊒ 0 < bif true && true then (-1) ^ 0 else 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: case Hlt ΞΉ : Type u_1 Q : ΞΉ β†’ (β„• Γ— β„•) Γ— β„• Γ— β„• m n : β„• I : Finset ΞΉ h : (↑I).PairwiseDisjoint (latticeRect ∘ Q) h0 : m.bodd = true ∧ n.bodd = true h1 : (bif true && true then (-1) ^ 0 else 0) = βˆ‘ i ∈ I, weight ((fun x => latticeRect (Q x)) i) ⊒ 0 < bif true && true then (-1) ^ 0 else 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.dvd_sq_iff_dvd_sq_of_dvd_add
[33, 1]
[39, 47]
have h0 {u v w : β„•} (h0 : u ∣ v + w) : u ∣ v ^ 2 ↔ u ∣ v * w := by apply dvd_iff_of_dvd_add rw [sq, ← Nat.mul_add] exact h0.mul_left v
a b c : β„• h : c ∣ a + b ⊒ c ∣ a ^ 2 ↔ c ∣ b ^ 2
a b c : β„• h : c ∣ a + b h0 : βˆ€ {u v w : β„•}, u ∣ v + w β†’ (u ∣ v ^ 2 ↔ u ∣ v * w) ⊒ c ∣ a ^ 2 ↔ c ∣ b ^ 2
Please generate a tactic in lean4 to solve the state. STATE: a b c : β„• h : c ∣ a + b ⊒ c ∣ a ^ 2 ↔ c ∣ b ^ 2 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.dvd_sq_iff_dvd_sq_of_dvd_add
[33, 1]
[39, 47]
rw [h0 h, mul_comm, ← h0 (a.add_comm b β–Έ h)]
a b c : β„• h : c ∣ a + b h0 : βˆ€ {u v w : β„•}, u ∣ v + w β†’ (u ∣ v ^ 2 ↔ u ∣ v * w) ⊒ c ∣ a ^ 2 ↔ c ∣ b ^ 2
no goals
Please generate a tactic in lean4 to solve the state. STATE: a b c : β„• h : c ∣ a + b h0 : βˆ€ {u v w : β„•}, u ∣ v + w β†’ (u ∣ v ^ 2 ↔ u ∣ v * w) ⊒ c ∣ a ^ 2 ↔ c ∣ b ^ 2 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.dvd_sq_iff_dvd_sq_of_dvd_add
[33, 1]
[39, 47]
apply dvd_iff_of_dvd_add
a b c : β„• h : c ∣ a + b u v w : β„• h0 : u ∣ v + w ⊒ u ∣ v ^ 2 ↔ u ∣ v * w
case h a b c : β„• h : c ∣ a + b u v w : β„• h0 : u ∣ v + w ⊒ u ∣ v ^ 2 + v * w
Please generate a tactic in lean4 to solve the state. STATE: a b c : β„• h : c ∣ a + b u v w : β„• h0 : u ∣ v + w ⊒ u ∣ v ^ 2 ↔ u ∣ v * w TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.dvd_sq_iff_dvd_sq_of_dvd_add
[33, 1]
[39, 47]
rw [sq, ← Nat.mul_add]
case h a b c : β„• h : c ∣ a + b u v w : β„• h0 : u ∣ v + w ⊒ u ∣ v ^ 2 + v * w
case h a b c : β„• h : c ∣ a + b u v w : β„• h0 : u ∣ v + w ⊒ u ∣ v * (v + w)
Please generate a tactic in lean4 to solve the state. STATE: case h a b c : β„• h : c ∣ a + b u v w : β„• h0 : u ∣ v + w ⊒ u ∣ v ^ 2 + v * w TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.dvd_sq_iff_dvd_sq_of_dvd_add
[33, 1]
[39, 47]
exact h0.mul_left v
case h a b c : β„• h : c ∣ a + b u v w : β„• h0 : u ∣ v + w ⊒ u ∣ v * (v + w)
no goals
Please generate a tactic in lean4 to solve the state. STATE: case h a b c : β„• h : c ∣ a + b u v w : β„• h0 : u ∣ v + w ⊒ u ∣ v * (v + w) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.eq_zero_of_prime_add_dvd_sq
[41, 1]
[50, 62]
rw [Nat.dvd_prime_pow h] at h1
a p : β„• h : p.Prime h0 : a < p h1 : p + a ∣ p ^ 2 ⊒ a = 0
a p : β„• h : p.Prime h0 : a < p h1 : βˆƒ k ≀ 2, p + a = p ^ k ⊒ a = 0
Please generate a tactic in lean4 to solve the state. STATE: a p : β„• h : p.Prime h0 : a < p h1 : p + a ∣ p ^ 2 ⊒ a = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.eq_zero_of_prime_add_dvd_sq
[41, 1]
[50, 62]
rcases h1 with ⟨k, h1, h2⟩
a p : β„• h : p.Prime h0 : a < p h1 : βˆƒ k ≀ 2, p + a = p ^ k ⊒ a = 0
case intro.intro a p : β„• h : p.Prime h0 : a < p k : β„• h1 : k ≀ 2 h2 : p + a = p ^ k ⊒ a = 0
Please generate a tactic in lean4 to solve the state. STATE: a p : β„• h : p.Prime h0 : a < p h1 : βˆƒ k ≀ 2, p + a = p ^ k ⊒ a = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.eq_zero_of_prime_add_dvd_sq
[41, 1]
[50, 62]
rw [Nat.le_add_one_iff, Nat.le_add_one_iff, zero_add, le_zero_iff] at h1
case intro.intro a p : β„• h : p.Prime h0 : a < p k : β„• h1 : k ≀ 2 h2 : p + a = p ^ k ⊒ a = 0
case intro.intro a p : β„• h : p.Prime h0 : a < p k : β„• h1 : (k = 0 ∨ k = 1) ∨ k = 1 + 1 h2 : p + a = p ^ k ⊒ a = 0
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro a p : β„• h : p.Prime h0 : a < p k : β„• h1 : k ≀ 2 h2 : p + a = p ^ k ⊒ a = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.eq_zero_of_prime_add_dvd_sq
[41, 1]
[50, 62]
rcases h1 with (rfl | rfl) | rfl
case intro.intro a p : β„• h : p.Prime h0 : a < p k : β„• h1 : (k = 0 ∨ k = 1) ∨ k = 1 + 1 h2 : p + a = p ^ k ⊒ a = 0
case intro.intro.inl.inl a p : β„• h : p.Prime h0 : a < p h2 : p + a = p ^ 0 ⊒ a = 0 case intro.intro.inl.inr a p : β„• h : p.Prime h0 : a < p h2 : p + a = p ^ 1 ⊒ a = 0 case intro.intro.inr a p : β„• h : p.Prime h0 : a < p h2 : p + a = p ^ (1 + 1) ⊒ a = 0
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro a p : β„• h : p.Prime h0 : a < p k : β„• h1 : (k = 0 ∨ k = 1) ∨ k = 1 + 1 h2 : p + a = p ^ k ⊒ a = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.eq_zero_of_prime_add_dvd_sq
[41, 1]
[50, 62]
exact absurd h2 (h.one_lt.trans_le le_self_add).ne.symm
case intro.intro.inl.inl a p : β„• h : p.Prime h0 : a < p h2 : p + a = p ^ 0 ⊒ a = 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.inl.inl a p : β„• h : p.Prime h0 : a < p h2 : p + a = p ^ 0 ⊒ a = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.eq_zero_of_prime_add_dvd_sq
[41, 1]
[50, 62]
rwa [pow_one, add_right_eq_self] at h2
case intro.intro.inl.inr a p : β„• h : p.Prime h0 : a < p h2 : p + a = p ^ 1 ⊒ a = 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.inl.inr a p : β„• h : p.Prime h0 : a < p h2 : p + a = p ^ 1 ⊒ a = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.eq_zero_of_prime_add_dvd_sq
[41, 1]
[50, 62]
refine absurd ((add_lt_add_left h0 p).trans_le ?_) h2.not_lt
case intro.intro.inr a p : β„• h : p.Prime h0 : a < p h2 : p + a = p ^ (1 + 1) ⊒ a = 0
case intro.intro.inr a p : β„• h : p.Prime h0 : a < p h2 : p + a = p ^ (1 + 1) ⊒ p + p ≀ p ^ (1 + 1)
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.inr a p : β„• h : p.Prime h0 : a < p h2 : p + a = p ^ (1 + 1) ⊒ a = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.eq_zero_of_prime_add_dvd_sq
[41, 1]
[50, 62]
rw [sq, ← two_mul]
case intro.intro.inr a p : β„• h : p.Prime h0 : a < p h2 : p + a = p ^ (1 + 1) ⊒ p + p ≀ p ^ (1 + 1)
case intro.intro.inr a p : β„• h : p.Prime h0 : a < p h2 : p + a = p ^ (1 + 1) ⊒ 2 * p ≀ p * p
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.inr a p : β„• h : p.Prime h0 : a < p h2 : p + a = p ^ (1 + 1) ⊒ p + p ≀ p ^ (1 + 1) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.eq_zero_of_prime_add_dvd_sq
[41, 1]
[50, 62]
exact Nat.mul_le_mul_right p h.two_le
case intro.intro.inr a p : β„• h : p.Prime h0 : a < p h2 : p + a = p ^ (1 + 1) ⊒ 2 * p ≀ p * p
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.inr a p : β„• h : p.Prime h0 : a < p h2 : p + a = p ^ (1 + 1) ⊒ 2 * p ≀ p * p TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.linear_is_good
[61, 1]
[62, 67]
rw [sq, add_mul, Nat.mul_assoc, mul_left_comm]
C k a b : β„• x✝ : C < a + b ⊒ a ^ 2 + b * (fun x => k * x) a = (a + (fun x => k * x) b) * a
no goals
Please generate a tactic in lean4 to solve the state. STATE: C k a b : β„• x✝ : C < a + b ⊒ a ^ 2 + b * (fun x => k * x) a = (a + (fun x => k * x) b) * a TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.good_is_linear
[64, 1]
[125, 24]
have h0 {n} (h0 : C < n) : f n ≀ n * f 1 := by rw [← Nat.succ_le_succ_iff, Nat.succ_eq_one_add, Nat.succ_eq_one_add] exact Nat.le_of_dvd (Nat.add_pos_left Nat.one_pos _) (h 1 n <| Nat.lt_one_add_iff.mpr h0.le)
C : β„• f : β„• β†’ β„• h : good C f ⊒ βˆƒ k, f = fun x => k * x
C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 ⊒ βˆƒ k, f = fun x => k * x
Please generate a tactic in lean4 to solve the state. STATE: C : β„• f : β„• β†’ β„• h : good C f ⊒ βˆƒ k, f = fun x => k * x TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.good_is_linear
[64, 1]
[125, 24]
have h1 {p} (h1 : C < p) (h2 : p.Prime) : βˆƒ k ≀ f 1, f p = k * p := by suffices p ∣ f p ^ 2 by rcases h2.dvd_of_dvd_pow this with ⟨k, h3⟩ exact ⟨k, Nat.le_of_mul_le_mul_left (h3.ge.trans (h0 h1)) h2.pos, h3.trans (p.mul_comm k)⟩ rcases exists_gt (C + f p) with ⟨n, h3⟩ replace h3 := Nat.exists_eq_add_of_le <| h3.le.trans (Nat.le_mul_of_pos_right _ h2.pos) rcases h3 with ⟨a, h3⟩; rw [add_right_comm] at h3 specialize h (C + a) p <| (C.le_add_right a).trans_lt (Nat.lt_add_of_pos_right h2.pos) replace h3 : p ∣ C + a + f p := ⟨n, h3.symm.trans (n.mul_comm p)⟩ rw [← dvd_sq_iff_dvd_sq_of_dvd_add h3, dvd_iff_of_dvd_add (h3.trans h)] exact p.dvd_mul_right _
C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 ⊒ βˆƒ k, f = fun x => k * x
C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p ⊒ βˆƒ k, f = fun x => k * x
Please generate a tactic in lean4 to solve the state. STATE: C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 ⊒ βˆƒ k, f = fun x => k * x TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.good_is_linear
[64, 1]
[125, 24]
rcases C.succ.exists_infinite_primes with ⟨p, (h3 : C < p), h4⟩
C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p h2 : βˆ€ (x : β„•), βˆƒ B, βˆ€ (p : β„•), p.Prime β†’ B < p β†’ βˆƒ k, f p = k * p ∧ f x = k * x ⊒ βˆƒ k, f = fun x => k * x
case intro.intro C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p h2 : βˆ€ (x : β„•), βˆƒ B, βˆ€ (p : β„•), p.Prime β†’ B < p β†’ βˆƒ k, f p = k * p ∧ f x = k * x p : β„• h3 : C < p h4 : p.Prime ⊒ βˆƒ k, f = fun x => k * x
Please generate a tactic in lean4 to solve the state. STATE: C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p h2 : βˆ€ (x : β„•), βˆƒ B, βˆ€ (p : β„•), p.Prime β†’ B < p β†’ βˆƒ k, f p = k * p ∧ f x = k * x ⊒ βˆƒ k, f = fun x => k * x TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.good_is_linear
[64, 1]
[125, 24]
rcases h1 h3 h4 with ⟨k, -, h5⟩
case intro.intro C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p h2 : βˆ€ (x : β„•), βˆƒ B, βˆ€ (p : β„•), p.Prime β†’ B < p β†’ βˆƒ k, f p = k * p ∧ f x = k * x p : β„• h3 : C < p h4 : p.Prime ⊒ βˆƒ k, f = fun x => k * x
case intro.intro.intro.intro C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p h2 : βˆ€ (x : β„•), βˆƒ B, βˆ€ (p : β„•), p.Prime β†’ B < p β†’ βˆƒ k, f p = k * p ∧ f x = k * x p : β„• h3 : C < p h4 : p.Prime k : β„• h5 : f p = k * p ⊒ βˆƒ k, f = fun x => k * x
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p h2 : βˆ€ (x : β„•), βˆƒ B, βˆ€ (p : β„•), p.Prime β†’ B < p β†’ βˆƒ k, f p = k * p ∧ f x = k * x p : β„• h3 : C < p h4 : p.Prime ⊒ βˆƒ k, f = fun x => k * x TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.good_is_linear
[64, 1]
[125, 24]
refine ⟨k, funext Ξ» n ↦ ?_⟩
case intro.intro.intro.intro C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p h2 : βˆ€ (x : β„•), βˆƒ B, βˆ€ (p : β„•), p.Prime β†’ B < p β†’ βˆƒ k, f p = k * p ∧ f x = k * x p : β„• h3 : C < p h4 : p.Prime k : β„• h5 : f p = k * p ⊒ βˆƒ k, f = fun x => k * x
case intro.intro.intro.intro C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p h2 : βˆ€ (x : β„•), βˆƒ B, βˆ€ (p : β„•), p.Prime β†’ B < p β†’ βˆƒ k, f p = k * p ∧ f x = k * x p : β„• h3 : C < p h4 : p.Prime k : β„• h5 : f p = k * p n : β„• ⊒ f n = k * n
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p h2 : βˆ€ (x : β„•), βˆƒ B, βˆ€ (p : β„•), p.Prime β†’ B < p β†’ βˆƒ k, f p = k * p ∧ f x = k * x p : β„• h3 : C < p h4 : p.Prime k : β„• h5 : f p = k * p ⊒ βˆƒ k, f = fun x => k * x TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.good_is_linear
[64, 1]
[125, 24]
rcases h2 p with ⟨Bp, hp⟩
case intro.intro.intro.intro C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p h2 : βˆ€ (x : β„•), βˆƒ B, βˆ€ (p : β„•), p.Prime β†’ B < p β†’ βˆƒ k, f p = k * p ∧ f x = k * x p : β„• h3 : C < p h4 : p.Prime k : β„• h5 : f p = k * p n : β„• ⊒ f n = k * n
case intro.intro.intro.intro.intro C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p h2 : βˆ€ (x : β„•), βˆƒ B, βˆ€ (p : β„•), p.Prime β†’ B < p β†’ βˆƒ k, f p = k * p ∧ f x = k * x p : β„• h3 : C < p h4 : p.Prime k : β„• h5 : f p = k * p n Bp : β„• hp : βˆ€ (p_1 : β„•), p_1.Prime β†’ Bp < p_1 β†’ βˆƒ k, f p_1 = k * p_1 ∧ f p = k * p ⊒ f n = k * n
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p h2 : βˆ€ (x : β„•), βˆƒ B, βˆ€ (p : β„•), p.Prime β†’ B < p β†’ βˆƒ k, f p = k * p ∧ f x = k * x p : β„• h3 : C < p h4 : p.Prime k : β„• h5 : f p = k * p n : β„• ⊒ f n = k * n TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.good_is_linear
[64, 1]
[125, 24]
rcases h2 n with ⟨Bn, hn⟩
case intro.intro.intro.intro.intro C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p h2 : βˆ€ (x : β„•), βˆƒ B, βˆ€ (p : β„•), p.Prime β†’ B < p β†’ βˆƒ k, f p = k * p ∧ f x = k * x p : β„• h3 : C < p h4 : p.Prime k : β„• h5 : f p = k * p n Bp : β„• hp : βˆ€ (p_1 : β„•), p_1.Prime β†’ Bp < p_1 β†’ βˆƒ k, f p_1 = k * p_1 ∧ f p = k * p ⊒ f n = k * n
case intro.intro.intro.intro.intro.intro C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p h2 : βˆ€ (x : β„•), βˆƒ B, βˆ€ (p : β„•), p.Prime β†’ B < p β†’ βˆƒ k, f p = k * p ∧ f x = k * x p : β„• h3 : C < p h4 : p.Prime k : β„• h5 : f p = k * p n Bp : β„• hp : βˆ€ (p_1 : β„•), p_1.Prime β†’ Bp < p_1 β†’ βˆƒ k, f p_1 = k * p_1 ∧ f p = k * p Bn : β„• hn : βˆ€ (p : β„•), p.Prime β†’ Bn < p β†’ βˆƒ k, f p = k * p ∧ f n = k * n ⊒ f n = k * n
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro.intro C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p h2 : βˆ€ (x : β„•), βˆƒ B, βˆ€ (p : β„•), p.Prime β†’ B < p β†’ βˆƒ k, f p = k * p ∧ f x = k * x p : β„• h3 : C < p h4 : p.Prime k : β„• h5 : f p = k * p n Bp : β„• hp : βˆ€ (p_1 : β„•), p_1.Prime β†’ Bp < p_1 β†’ βˆƒ k, f p_1 = k * p_1 ∧ f p = k * p ⊒ f n = k * n TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.good_is_linear
[64, 1]
[125, 24]
rcases (max Bp Bn).succ.exists_infinite_primes with ⟨q, h6, h7⟩
case intro.intro.intro.intro.intro.intro C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p h2 : βˆ€ (x : β„•), βˆƒ B, βˆ€ (p : β„•), p.Prime β†’ B < p β†’ βˆƒ k, f p = k * p ∧ f x = k * x p : β„• h3 : C < p h4 : p.Prime k : β„• h5 : f p = k * p n Bp : β„• hp : βˆ€ (p_1 : β„•), p_1.Prime β†’ Bp < p_1 β†’ βˆƒ k, f p_1 = k * p_1 ∧ f p = k * p Bn : β„• hn : βˆ€ (p : β„•), p.Prime β†’ Bn < p β†’ βˆƒ k, f p = k * p ∧ f n = k * n ⊒ f n = k * n
case intro.intro.intro.intro.intro.intro.intro.intro C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p h2 : βˆ€ (x : β„•), βˆƒ B, βˆ€ (p : β„•), p.Prime β†’ B < p β†’ βˆƒ k, f p = k * p ∧ f x = k * x p : β„• h3 : C < p h4 : p.Prime k : β„• h5 : f p = k * p n Bp : β„• hp : βˆ€ (p_1 : β„•), p_1.Prime β†’ Bp < p_1 β†’ βˆƒ k, f p_1 = k * p_1 ∧ f p = k * p Bn : β„• hn : βˆ€ (p : β„•), p.Prime β†’ Bn < p β†’ βˆƒ k, f p = k * p ∧ f n = k * n q : β„• h6 : (max Bp Bn).succ ≀ q h7 : q.Prime ⊒ f n = k * n
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro.intro.intro C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p h2 : βˆ€ (x : β„•), βˆƒ B, βˆ€ (p : β„•), p.Prime β†’ B < p β†’ βˆƒ k, f p = k * p ∧ f x = k * x p : β„• h3 : C < p h4 : p.Prime k : β„• h5 : f p = k * p n Bp : β„• hp : βˆ€ (p_1 : β„•), p_1.Prime β†’ Bp < p_1 β†’ βˆƒ k, f p_1 = k * p_1 ∧ f p = k * p Bn : β„• hn : βˆ€ (p : β„•), p.Prime β†’ Bn < p β†’ βˆƒ k, f p = k * p ∧ f n = k * n ⊒ f n = k * n TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.good_is_linear
[64, 1]
[125, 24]
rw [Nat.succ_le_iff, max_lt_iff] at h6
case intro.intro.intro.intro.intro.intro.intro.intro C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p h2 : βˆ€ (x : β„•), βˆƒ B, βˆ€ (p : β„•), p.Prime β†’ B < p β†’ βˆƒ k, f p = k * p ∧ f x = k * x p : β„• h3 : C < p h4 : p.Prime k : β„• h5 : f p = k * p n Bp : β„• hp : βˆ€ (p_1 : β„•), p_1.Prime β†’ Bp < p_1 β†’ βˆƒ k, f p_1 = k * p_1 ∧ f p = k * p Bn : β„• hn : βˆ€ (p : β„•), p.Prime β†’ Bn < p β†’ βˆƒ k, f p = k * p ∧ f n = k * n q : β„• h6 : (max Bp Bn).succ ≀ q h7 : q.Prime ⊒ f n = k * n
case intro.intro.intro.intro.intro.intro.intro.intro C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p h2 : βˆ€ (x : β„•), βˆƒ B, βˆ€ (p : β„•), p.Prime β†’ B < p β†’ βˆƒ k, f p = k * p ∧ f x = k * x p : β„• h3 : C < p h4 : p.Prime k : β„• h5 : f p = k * p n Bp : β„• hp : βˆ€ (p_1 : β„•), p_1.Prime β†’ Bp < p_1 β†’ βˆƒ k, f p_1 = k * p_1 ∧ f p = k * p Bn : β„• hn : βˆ€ (p : β„•), p.Prime β†’ Bn < p β†’ βˆƒ k, f p = k * p ∧ f n = k * n q : β„• h6 : Bp < q ∧ Bn < q h7 : q.Prime ⊒ f n = k * n
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro.intro.intro.intro.intro C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p h2 : βˆ€ (x : β„•), βˆƒ B, βˆ€ (p : β„•), p.Prime β†’ B < p β†’ βˆƒ k, f p = k * p ∧ f x = k * x p : β„• h3 : C < p h4 : p.Prime k : β„• h5 : f p = k * p n Bp : β„• hp : βˆ€ (p_1 : β„•), p_1.Prime β†’ Bp < p_1 β†’ βˆƒ k, f p_1 = k * p_1 ∧ f p = k * p Bn : β„• hn : βˆ€ (p : β„•), p.Prime β†’ Bn < p β†’ βˆƒ k, f p = k * p ∧ f n = k * n q : β„• h6 : (max Bp Bn).succ ≀ q h7 : q.Prime ⊒ f n = k * n TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.good_is_linear
[64, 1]
[125, 24]
specialize hp q h7 h6.1
case intro.intro.intro.intro.intro.intro.intro.intro C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p h2 : βˆ€ (x : β„•), βˆƒ B, βˆ€ (p : β„•), p.Prime β†’ B < p β†’ βˆƒ k, f p = k * p ∧ f x = k * x p : β„• h3 : C < p h4 : p.Prime k : β„• h5 : f p = k * p n Bp : β„• hp : βˆ€ (p_1 : β„•), p_1.Prime β†’ Bp < p_1 β†’ βˆƒ k, f p_1 = k * p_1 ∧ f p = k * p Bn : β„• hn : βˆ€ (p : β„•), p.Prime β†’ Bn < p β†’ βˆƒ k, f p = k * p ∧ f n = k * n q : β„• h6 : Bp < q ∧ Bn < q h7 : q.Prime ⊒ f n = k * n
case intro.intro.intro.intro.intro.intro.intro.intro C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p h2 : βˆ€ (x : β„•), βˆƒ B, βˆ€ (p : β„•), p.Prime β†’ B < p β†’ βˆƒ k, f p = k * p ∧ f x = k * x p : β„• h3 : C < p h4 : p.Prime k : β„• h5 : f p = k * p n Bp Bn : β„• hn : βˆ€ (p : β„•), p.Prime β†’ Bn < p β†’ βˆƒ k, f p = k * p ∧ f n = k * n q : β„• h6 : Bp < q ∧ Bn < q h7 : q.Prime hp : βˆƒ k, f q = k * q ∧ f p = k * p ⊒ f n = k * n
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro.intro.intro.intro.intro C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p h2 : βˆ€ (x : β„•), βˆƒ B, βˆ€ (p : β„•), p.Prime β†’ B < p β†’ βˆƒ k, f p = k * p ∧ f x = k * x p : β„• h3 : C < p h4 : p.Prime k : β„• h5 : f p = k * p n Bp : β„• hp : βˆ€ (p_1 : β„•), p_1.Prime β†’ Bp < p_1 β†’ βˆƒ k, f p_1 = k * p_1 ∧ f p = k * p Bn : β„• hn : βˆ€ (p : β„•), p.Prime β†’ Bn < p β†’ βˆƒ k, f p = k * p ∧ f n = k * n q : β„• h6 : Bp < q ∧ Bn < q h7 : q.Prime ⊒ f n = k * n TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.good_is_linear
[64, 1]
[125, 24]
rcases hp with ⟨kp, h8, h9⟩
case intro.intro.intro.intro.intro.intro.intro.intro C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p h2 : βˆ€ (x : β„•), βˆƒ B, βˆ€ (p : β„•), p.Prime β†’ B < p β†’ βˆƒ k, f p = k * p ∧ f x = k * x p : β„• h3 : C < p h4 : p.Prime k : β„• h5 : f p = k * p n Bp Bn : β„• hn : βˆ€ (p : β„•), p.Prime β†’ Bn < p β†’ βˆƒ k, f p = k * p ∧ f n = k * n q : β„• h6 : Bp < q ∧ Bn < q h7 : q.Prime hp : βˆƒ k, f q = k * q ∧ f p = k * p ⊒ f n = k * n
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p h2 : βˆ€ (x : β„•), βˆƒ B, βˆ€ (p : β„•), p.Prime β†’ B < p β†’ βˆƒ k, f p = k * p ∧ f x = k * x p : β„• h3 : C < p h4 : p.Prime k : β„• h5 : f p = k * p n Bp Bn : β„• hn : βˆ€ (p : β„•), p.Prime β†’ Bn < p β†’ βˆƒ k, f p = k * p ∧ f n = k * n q : β„• h6 : Bp < q ∧ Bn < q h7 : q.Prime kp : β„• h8 : f q = kp * q h9 : f p = kp * p ⊒ f n = k * n
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro.intro.intro.intro.intro C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p h2 : βˆ€ (x : β„•), βˆƒ B, βˆ€ (p : β„•), p.Prime β†’ B < p β†’ βˆƒ k, f p = k * p ∧ f x = k * x p : β„• h3 : C < p h4 : p.Prime k : β„• h5 : f p = k * p n Bp Bn : β„• hn : βˆ€ (p : β„•), p.Prime β†’ Bn < p β†’ βˆƒ k, f p = k * p ∧ f n = k * n q : β„• h6 : Bp < q ∧ Bn < q h7 : q.Prime hp : βˆƒ k, f q = k * q ∧ f p = k * p ⊒ f n = k * n TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.good_is_linear
[64, 1]
[125, 24]
rw [h5, Nat.mul_left_inj h4.ne_zero] at h9
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p h2 : βˆ€ (x : β„•), βˆƒ B, βˆ€ (p : β„•), p.Prime β†’ B < p β†’ βˆƒ k, f p = k * p ∧ f x = k * x p : β„• h3 : C < p h4 : p.Prime k : β„• h5 : f p = k * p n Bp Bn : β„• hn : βˆ€ (p : β„•), p.Prime β†’ Bn < p β†’ βˆƒ k, f p = k * p ∧ f n = k * n q : β„• h6 : Bp < q ∧ Bn < q h7 : q.Prime kp : β„• h8 : f q = kp * q h9 : f p = kp * p ⊒ f n = k * n
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p h2 : βˆ€ (x : β„•), βˆƒ B, βˆ€ (p : β„•), p.Prime β†’ B < p β†’ βˆƒ k, f p = k * p ∧ f x = k * x p : β„• h3 : C < p h4 : p.Prime k : β„• h5 : f p = k * p n Bp Bn : β„• hn : βˆ€ (p : β„•), p.Prime β†’ Bn < p β†’ βˆƒ k, f p = k * p ∧ f n = k * n q : β„• h6 : Bp < q ∧ Bn < q h7 : q.Prime kp : β„• h8 : f q = kp * q h9 : k = kp ⊒ f n = k * n
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p h2 : βˆ€ (x : β„•), βˆƒ B, βˆ€ (p : β„•), p.Prime β†’ B < p β†’ βˆƒ k, f p = k * p ∧ f x = k * x p : β„• h3 : C < p h4 : p.Prime k : β„• h5 : f p = k * p n Bp Bn : β„• hn : βˆ€ (p : β„•), p.Prime β†’ Bn < p β†’ βˆƒ k, f p = k * p ∧ f n = k * n q : β„• h6 : Bp < q ∧ Bn < q h7 : q.Prime kp : β„• h8 : f q = kp * q h9 : f p = kp * p ⊒ f n = k * n TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.good_is_linear
[64, 1]
[125, 24]
specialize hn q h7 h6.2
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p h2 : βˆ€ (x : β„•), βˆƒ B, βˆ€ (p : β„•), p.Prime β†’ B < p β†’ βˆƒ k, f p = k * p ∧ f x = k * x p : β„• h3 : C < p h4 : p.Prime k : β„• h5 : f p = k * p n Bp Bn : β„• hn : βˆ€ (p : β„•), p.Prime β†’ Bn < p β†’ βˆƒ k, f p = k * p ∧ f n = k * n q : β„• h6 : Bp < q ∧ Bn < q h7 : q.Prime kp : β„• h8 : f q = kp * q h9 : k = kp ⊒ f n = k * n
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p h2 : βˆ€ (x : β„•), βˆƒ B, βˆ€ (p : β„•), p.Prime β†’ B < p β†’ βˆƒ k, f p = k * p ∧ f x = k * x p : β„• h3 : C < p h4 : p.Prime k : β„• h5 : f p = k * p n Bp Bn q : β„• h6 : Bp < q ∧ Bn < q h7 : q.Prime kp : β„• h8 : f q = kp * q h9 : k = kp hn : βˆƒ k, f q = k * q ∧ f n = k * n ⊒ f n = k * n
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p h2 : βˆ€ (x : β„•), βˆƒ B, βˆ€ (p : β„•), p.Prime β†’ B < p β†’ βˆƒ k, f p = k * p ∧ f x = k * x p : β„• h3 : C < p h4 : p.Prime k : β„• h5 : f p = k * p n Bp Bn : β„• hn : βˆ€ (p : β„•), p.Prime β†’ Bn < p β†’ βˆƒ k, f p = k * p ∧ f n = k * n q : β„• h6 : Bp < q ∧ Bn < q h7 : q.Prime kp : β„• h8 : f q = kp * q h9 : k = kp ⊒ f n = k * n TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2019/N4/N4.lean
IMOSL.IMO2019N4.good_is_linear
[64, 1]
[125, 24]
rcases hn with ⟨kn, h10, h11⟩
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p h2 : βˆ€ (x : β„•), βˆƒ B, βˆ€ (p : β„•), p.Prime β†’ B < p β†’ βˆƒ k, f p = k * p ∧ f x = k * x p : β„• h3 : C < p h4 : p.Prime k : β„• h5 : f p = k * p n Bp Bn q : β„• h6 : Bp < q ∧ Bn < q h7 : q.Prime kp : β„• h8 : f q = kp * q h9 : k = kp hn : βˆƒ k, f q = k * q ∧ f n = k * n ⊒ f n = k * n
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p h2 : βˆ€ (x : β„•), βˆƒ B, βˆ€ (p : β„•), p.Prime β†’ B < p β†’ βˆƒ k, f p = k * p ∧ f x = k * x p : β„• h3 : C < p h4 : p.Prime k : β„• h5 : f p = k * p n Bp Bn q : β„• h6 : Bp < q ∧ Bn < q h7 : q.Prime kp : β„• h8 : f q = kp * q h9 : k = kp kn : β„• h10 : f q = kn * q h11 : f n = kn * n ⊒ f n = k * n
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro C : β„• f : β„• β†’ β„• h : good C f h0 : βˆ€ {n : β„•}, C < n β†’ f n ≀ n * f 1 h1 : βˆ€ {p : β„•}, C < p β†’ p.Prime β†’ βˆƒ k ≀ f 1, f p = k * p h2 : βˆ€ (x : β„•), βˆƒ B, βˆ€ (p : β„•), p.Prime β†’ B < p β†’ βˆƒ k, f p = k * p ∧ f x = k * x p : β„• h3 : C < p h4 : p.Prime k : β„• h5 : f p = k * p n Bp Bn q : β„• h6 : Bp < q ∧ Bn < q h7 : q.Prime kp : β„• h8 : f q = kp * q h9 : k = kp hn : βˆƒ k, f q = k * q ∧ f n = k * n ⊒ f n = k * n TACTIC: