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/IMO2014/A4/A4.lean
IMOSL.IMO2014A4.map_is_linear
[78, 1]
[103, 43]
have h6 := h5 m
case intro.intro.intro.intro b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 β‰  0 m n : β„• h3 : m β‰  n N : β„€ h4 : b ^ m - b ^ n = f 0 * N x y : β„€ h5 : βˆ€ (k : β„•), f (b ^ k * x) = f (b ^ k * y) ⊒ x = y
case intro.intro.intro.intro b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 β‰  0 m n : β„• h3 : m β‰  n N : β„€ h4 : b ^ m - b ^ n = f 0 * N x y : β„€ h5 : βˆ€ (k : β„•), f (b ^ k * x) = f (b ^ k * y) h6 : f (b ^ m * x) = f (b ^ m * y) ⊒ x = y
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 β‰  0 m n : β„• h3 : m β‰  n N : β„€ h4 : b ^ m - b ^ n = f 0 * N x y : β„€ h5 : βˆ€ (k : β„•), f (b ^ k * x) = f (b ^ k * y) ⊒ x = y TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A4/A4.lean
IMOSL.IMO2014A4.map_is_linear
[78, 1]
[103, 43]
have h7 := map_mul_map_zero_add h
case intro.intro.intro.intro b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 β‰  0 m n : β„• h3 : m β‰  n N : β„€ h4 : b ^ m - b ^ n = f 0 * N x y : β„€ h5 : βˆ€ (k : β„•), f (b ^ k * x) = f (b ^ k * y) h6 : f (b ^ m * x) = f (b ^ m * y) ⊒ x = y
case intro.intro.intro.intro b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 β‰  0 m n : β„• h3 : m β‰  n N : β„€ h4 : b ^ m - b ^ n = f 0 * N x y : β„€ h5 : βˆ€ (k : β„•), f (b ^ k * x) = f (b ^ k * y) h6 : f (b ^ m * x) = f (b ^ m * y) h7 : βˆ€ (y k : β„€), f (y + f 0 * k) = c * k + f y ⊒ x = y
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 β‰  0 m n : β„• h3 : m β‰  n N : β„€ h4 : b ^ m - b ^ n = f 0 * N x y : β„€ h5 : βˆ€ (k : β„•), f (b ^ k * x) = f (b ^ k * y) h6 : f (b ^ m * x) = f (b ^ m * y) ⊒ x = y TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A4/A4.lean
IMOSL.IMO2014A4.map_is_linear
[78, 1]
[103, 43]
rw [eq_add_of_sub_eq' h4, add_mul, mul_assoc, h7, add_mul, mul_assoc, h7, h5, add_left_inj, Int.mul_eq_mul_left_iff h1] at h6
case intro.intro.intro.intro b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 β‰  0 m n : β„• h3 : m β‰  n N : β„€ h4 : b ^ m - b ^ n = f 0 * N x y : β„€ h5 : βˆ€ (k : β„•), f (b ^ k * x) = f (b ^ k * y) h6 : f (b ^ m * x) = f (b ^ m * y) h7 : βˆ€ (y k : β„€), f (y + f 0 * k) = c * k + f y ⊒ x = y
case intro.intro.intro.intro b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 β‰  0 m n : β„• h3 : m β‰  n N : β„€ h4 : b ^ m - b ^ n = f 0 * N x y : β„€ h5 : βˆ€ (k : β„•), f (b ^ k * x) = f (b ^ k * y) h6 : N * x = N * y h7 : βˆ€ (y k : β„€), f (y + f 0 * k) = c * k + f y ⊒ x = y
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 β‰  0 m n : β„• h3 : m β‰  n N : β„€ h4 : b ^ m - b ^ n = f 0 * N x y : β„€ h5 : βˆ€ (k : β„•), f (b ^ k * x) = f (b ^ k * y) h6 : f (b ^ m * x) = f (b ^ m * y) h7 : βˆ€ (y k : β„€), f (y + f 0 * k) = c * k + f y ⊒ x = y TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A4/A4.lean
IMOSL.IMO2014A4.map_is_linear
[78, 1]
[103, 43]
refine (Int.mul_eq_mul_left_iff Ξ» h8 ↦ ?_).mp h6
case intro.intro.intro.intro b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 β‰  0 m n : β„• h3 : m β‰  n N : β„€ h4 : b ^ m - b ^ n = f 0 * N x y : β„€ h5 : βˆ€ (k : β„•), f (b ^ k * x) = f (b ^ k * y) h6 : N * x = N * y h7 : βˆ€ (y k : β„€), f (y + f 0 * k) = c * k + f y ⊒ x = y
case intro.intro.intro.intro b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 β‰  0 m n : β„• h3 : m β‰  n N : β„€ h4 : b ^ m - b ^ n = f 0 * N x y : β„€ h5 : βˆ€ (k : β„•), f (b ^ k * x) = f (b ^ k * y) h6 : N * x = N * y h7 : βˆ€ (y k : β„€), f (y + f 0 * k) = c * k + f y h8 : N = 0 ⊒ False
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 β‰  0 m n : β„• h3 : m β‰  n N : β„€ h4 : b ^ m - b ^ n = f 0 * N x y : β„€ h5 : βˆ€ (k : β„•), f (b ^ k * x) = f (b ^ k * y) h6 : N * x = N * y h7 : βˆ€ (y k : β„€), f (y + f 0 * k) = c * k + f y ⊒ x = y TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A4/A4.lean
IMOSL.IMO2014A4.map_is_linear
[78, 1]
[103, 43]
rw [h8, mul_zero, sub_eq_zero] at h4
case intro.intro.intro.intro b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 β‰  0 m n : β„• h3 : m β‰  n N : β„€ h4 : b ^ m - b ^ n = f 0 * N x y : β„€ h5 : βˆ€ (k : β„•), f (b ^ k * x) = f (b ^ k * y) h6 : N * x = N * y h7 : βˆ€ (y k : β„€), f (y + f 0 * k) = c * k + f y h8 : N = 0 ⊒ False
case intro.intro.intro.intro b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 β‰  0 m n : β„• h3 : m β‰  n N : β„€ h4 : b ^ m = b ^ n x y : β„€ h5 : βˆ€ (k : β„•), f (b ^ k * x) = f (b ^ k * y) h6 : N * x = N * y h7 : βˆ€ (y k : β„€), f (y + f 0 * k) = c * k + f y h8 : N = 0 ⊒ False
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 β‰  0 m n : β„• h3 : m β‰  n N : β„€ h4 : b ^ m - b ^ n = f 0 * N x y : β„€ h5 : βˆ€ (k : β„•), f (b ^ k * x) = f (b ^ k * y) h6 : N * x = N * y h7 : βˆ€ (y k : β„€), f (y + f 0 * k) = c * k + f y h8 : N = 0 ⊒ False TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A4/A4.lean
IMOSL.IMO2014A4.map_is_linear
[78, 1]
[103, 43]
exact h3 (Int.pow_right_injective h0 h4)
case intro.intro.intro.intro b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 β‰  0 m n : β„• h3 : m β‰  n N : β„€ h4 : b ^ m = b ^ n x y : β„€ h5 : βˆ€ (k : β„•), f (b ^ k * x) = f (b ^ k * y) h6 : N * x = N * y h7 : βˆ€ (y k : β„€), f (y + f 0 * k) = c * k + f y h8 : N = 0 ⊒ False
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro.intro.intro b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 β‰  0 m n : β„• h3 : m β‰  n N : β„€ h4 : b ^ m = b ^ n x y : β„€ h5 : βˆ€ (k : β„•), f (b ^ k * x) = f (b ^ k * y) h6 : N * x = N * y h7 : βˆ€ (y k : β„€), f (y + f 0 * k) = c * k + f y h8 : N = 0 ⊒ False TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A4/A4.lean
IMOSL.IMO2014A4.map_is_linear
[78, 1]
[103, 43]
intro n
b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 this : Function.Injective f ⊒ βˆ€ (n : β„€), f n = (b - 1) * n + f 0
b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 this : Function.Injective f n : β„€ ⊒ f n = (b - 1) * n + f 0
Please generate a tactic in lean4 to solve the state. STATE: b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 this : Function.Injective f ⊒ βˆ€ (n : β„€), f n = (b - 1) * n + f 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A4/A4.lean
IMOSL.IMO2014A4.map_is_linear
[78, 1]
[103, 43]
have h2 := eq_add_of_sub_eq' (h 0 (b * n))
b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 this : Function.Injective f n : β„€ ⊒ f n = (b - 1) * n + f 0
b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 this : Function.Injective f n : β„€ h2 : f (b * n + f 0) = f (b * n) + (f (b * 0) - f 0 + c) ⊒ f n = (b - 1) * n + f 0
Please generate a tactic in lean4 to solve the state. STATE: b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 this : Function.Injective f n : β„€ ⊒ f n = (b - 1) * n + f 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A4/A4.lean
IMOSL.IMO2014A4.map_is_linear
[78, 1]
[103, 43]
rw [mul_zero, sub_self, zero_add, ← sub_left_inj (a := f n), add_sub_right_comm, ← h n n, sub_left_inj] at h2
b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 this : Function.Injective f n : β„€ h2 : f (b * n + f 0) = f (b * n) + (f (b * 0) - f 0 + c) ⊒ f n = (b - 1) * n + f 0
b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 this : Function.Injective f n : β„€ h2 : f (b * n + f 0) = f (n + f n) ⊒ f n = (b - 1) * n + f 0
Please generate a tactic in lean4 to solve the state. STATE: b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 this : Function.Injective f n : β„€ h2 : f (b * n + f 0) = f (b * n) + (f (b * 0) - f 0 + c) ⊒ f n = (b - 1) * n + f 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A4/A4.lean
IMOSL.IMO2014A4.map_is_linear
[78, 1]
[103, 43]
rw [sub_one_mul, ← add_sub_right_comm, this h2, add_sub_cancel_left]
b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 this : Function.Injective f n : β„€ h2 : f (b * n + f 0) = f (n + f n) ⊒ f n = (b - 1) * n + f 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 this : Function.Injective f n : β„€ h2 : f (b * n + f 0) = f (n + f n) ⊒ f n = (b - 1) * n + f 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A4/A4.lean
IMOSL.IMO2014A4.map_is_linear
[78, 1]
[103, 43]
have h3 := map_map_zero_add h 0
b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 = 0 ⊒ False
b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 = 0 h3 : f (0 + f 0) = c + f 0 ⊒ False
Please generate a tactic in lean4 to solve the state. STATE: b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 = 0 ⊒ False TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A4/A4.lean
IMOSL.IMO2014A4.map_is_linear
[78, 1]
[103, 43]
rw [zero_add, h2, h2, add_zero] at h3
b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 = 0 h3 : f (0 + f 0) = c + f 0 ⊒ False
b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 = 0 h3 : 0 = c ⊒ False
Please generate a tactic in lean4 to solve the state. STATE: b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 = 0 h3 : f (0 + f 0) = c + f 0 ⊒ False TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A4/A4.lean
IMOSL.IMO2014A4.map_is_linear
[78, 1]
[103, 43]
exact h1 h3.symm
b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 = 0 h3 : 0 = c ⊒ False
no goals
Please generate a tactic in lean4 to solve the state. STATE: b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h2 : f 0 = 0 h3 : 0 = c ⊒ False TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A4/A4.lean
IMOSL.IMO2014A4.c_eq_b_sub_one_mul_map_zero
[105, 1]
[108, 64]
have h3 := h 0 0
b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 ⊒ c = (b - 1) * f 0
b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h3 : f (0 + f 0) - f 0 = f (b * 0) - f 0 + c ⊒ c = (b - 1) * f 0
Please generate a tactic in lean4 to solve the state. STATE: b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 ⊒ c = (b - 1) * f 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A4/A4.lean
IMOSL.IMO2014A4.c_eq_b_sub_one_mul_map_zero
[105, 1]
[108, 64]
rwa [zero_add, mul_zero, sub_self, zero_add, map_is_linear h h0 h1, add_sub_cancel_right, eq_comm] at h3
b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h3 : f (0 + f 0) - f 0 = f (b * 0) - f 0 + c ⊒ c = (b - 1) * f 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: b c : β„€ f : β„€ β†’ β„€ h : good b c f h0 : 1 < b.natAbs h1 : c β‰  0 h3 : f (0 + f 0) - f 0 = f (b * 0) - f 0 + c ⊒ c = (b - 1) * f 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A4/A4.lean
IMOSL.IMO2014A4.final_solution_case2
[125, 1]
[134, 35]
rcases h1 with ⟨k, rfl⟩
b c : β„€ h : 1 < b.natAbs h0 : c β‰  0 f : β„€ β†’ β„€ h1 : b - 1 ∣ c h2 : good b c f ⊒ f = fun x => (b - 1) * x + c / (b - 1)
case intro b : β„€ h : 1 < b.natAbs f : β„€ β†’ β„€ k : β„€ h0 : (b - 1) * k β‰  0 h2 : good b ((b - 1) * k) f ⊒ f = fun x => (b - 1) * x + (b - 1) * k / (b - 1)
Please generate a tactic in lean4 to solve the state. STATE: b c : β„€ h : 1 < b.natAbs h0 : c β‰  0 f : β„€ β†’ β„€ h1 : b - 1 ∣ c h2 : good b c f ⊒ f = fun x => (b - 1) * x + c / (b - 1) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A4/A4.lean
IMOSL.IMO2014A4.final_solution_case2
[125, 1]
[134, 35]
have h1 := c_eq_b_sub_one_mul_map_zero h2 h h0
case intro b : β„€ h : 1 < b.natAbs f : β„€ β†’ β„€ k : β„€ h0 : (b - 1) * k β‰  0 h2 : good b ((b - 1) * k) f ⊒ f = fun x => (b - 1) * x + (b - 1) * k / (b - 1)
case intro b : β„€ h : 1 < b.natAbs f : β„€ β†’ β„€ k : β„€ h0 : (b - 1) * k β‰  0 h2 : good b ((b - 1) * k) f h1 : (b - 1) * k = (b - 1) * f 0 ⊒ f = fun x => (b - 1) * x + (b - 1) * k / (b - 1)
Please generate a tactic in lean4 to solve the state. STATE: case intro b : β„€ h : 1 < b.natAbs f : β„€ β†’ β„€ k : β„€ h0 : (b - 1) * k β‰  0 h2 : good b ((b - 1) * k) f ⊒ f = fun x => (b - 1) * x + (b - 1) * k / (b - 1) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A4/A4.lean
IMOSL.IMO2014A4.final_solution_case2
[125, 1]
[134, 35]
have h3 := (mul_ne_zero_iff.mp h0).1
case intro b : β„€ h : 1 < b.natAbs f : β„€ β†’ β„€ k : β„€ h0 : (b - 1) * k β‰  0 h2 : good b ((b - 1) * k) f h1 : (b - 1) * k = (b - 1) * f 0 ⊒ f = fun x => (b - 1) * x + (b - 1) * k / (b - 1)
case intro b : β„€ h : 1 < b.natAbs f : β„€ β†’ β„€ k : β„€ h0 : (b - 1) * k β‰  0 h2 : good b ((b - 1) * k) f h1 : (b - 1) * k = (b - 1) * f 0 h3 : b - 1 β‰  0 ⊒ f = fun x => (b - 1) * x + (b - 1) * k / (b - 1)
Please generate a tactic in lean4 to solve the state. STATE: case intro b : β„€ h : 1 < b.natAbs f : β„€ β†’ β„€ k : β„€ h0 : (b - 1) * k β‰  0 h2 : good b ((b - 1) * k) f h1 : (b - 1) * k = (b - 1) * f 0 ⊒ f = fun x => (b - 1) * x + (b - 1) * k / (b - 1) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A4/A4.lean
IMOSL.IMO2014A4.final_solution_case2
[125, 1]
[134, 35]
rw [Int.mul_ediv_cancel_left _ h3]
case intro b : β„€ h : 1 < b.natAbs f : β„€ β†’ β„€ k : β„€ h0 : (b - 1) * k β‰  0 h2 : good b ((b - 1) * k) f h1 : (b - 1) * k = (b - 1) * f 0 h3 : b - 1 β‰  0 ⊒ f = fun x => (b - 1) * x + (b - 1) * k / (b - 1)
case intro b : β„€ h : 1 < b.natAbs f : β„€ β†’ β„€ k : β„€ h0 : (b - 1) * k β‰  0 h2 : good b ((b - 1) * k) f h1 : (b - 1) * k = (b - 1) * f 0 h3 : b - 1 β‰  0 ⊒ f = fun x => (b - 1) * x + k
Please generate a tactic in lean4 to solve the state. STATE: case intro b : β„€ h : 1 < b.natAbs f : β„€ β†’ β„€ k : β„€ h0 : (b - 1) * k β‰  0 h2 : good b ((b - 1) * k) f h1 : (b - 1) * k = (b - 1) * f 0 h3 : b - 1 β‰  0 ⊒ f = fun x => (b - 1) * x + (b - 1) * k / (b - 1) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A4/A4.lean
IMOSL.IMO2014A4.final_solution_case2
[125, 1]
[134, 35]
rw [mul_eq_mul_left_iff, or_iff_left h3] at h1
case intro b : β„€ h : 1 < b.natAbs f : β„€ β†’ β„€ k : β„€ h0 : (b - 1) * k β‰  0 h2 : good b ((b - 1) * k) f h1 : (b - 1) * k = (b - 1) * f 0 h3 : b - 1 β‰  0 ⊒ f = fun x => (b - 1) * x + k
case intro b : β„€ h : 1 < b.natAbs f : β„€ β†’ β„€ k : β„€ h0 : (b - 1) * k β‰  0 h2 : good b ((b - 1) * k) f h1 : k = f 0 h3 : b - 1 β‰  0 ⊒ f = fun x => (b - 1) * x + k
Please generate a tactic in lean4 to solve the state. STATE: case intro b : β„€ h : 1 < b.natAbs f : β„€ β†’ β„€ k : β„€ h0 : (b - 1) * k β‰  0 h2 : good b ((b - 1) * k) f h1 : (b - 1) * k = (b - 1) * f 0 h3 : b - 1 β‰  0 ⊒ f = fun x => (b - 1) * x + k TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A4/A4.lean
IMOSL.IMO2014A4.final_solution_case2
[125, 1]
[134, 35]
rw [h1]
case intro b : β„€ h : 1 < b.natAbs f : β„€ β†’ β„€ k : β„€ h0 : (b - 1) * k β‰  0 h2 : good b ((b - 1) * k) f h1 : k = f 0 h3 : b - 1 β‰  0 ⊒ f = fun x => (b - 1) * x + k
case intro b : β„€ h : 1 < b.natAbs f : β„€ β†’ β„€ k : β„€ h0 : (b - 1) * k β‰  0 h2 : good b ((b - 1) * k) f h1 : k = f 0 h3 : b - 1 β‰  0 ⊒ f = fun x => (b - 1) * x + f 0
Please generate a tactic in lean4 to solve the state. STATE: case intro b : β„€ h : 1 < b.natAbs f : β„€ β†’ β„€ k : β„€ h0 : (b - 1) * k β‰  0 h2 : good b ((b - 1) * k) f h1 : k = f 0 h3 : b - 1 β‰  0 ⊒ f = fun x => (b - 1) * x + k TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2014/A4/A4.lean
IMOSL.IMO2014A4.final_solution_case2
[125, 1]
[134, 35]
exact funext (map_is_linear h2 h h0)
case intro b : β„€ h : 1 < b.natAbs f : β„€ β†’ β„€ k : β„€ h0 : (b - 1) * k β‰  0 h2 : good b ((b - 1) * k) f h1 : k = f 0 h3 : b - 1 β‰  0 ⊒ f = fun x => (b - 1) * x + f 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro b : β„€ h : 1 < b.natAbs f : β„€ β†’ β„€ k : β„€ h0 : (b - 1) * k β‰  0 h2 : good b ((b - 1) * k) f h1 : k = f 0 h3 : b - 1 β‰  0 ⊒ f = fun x => (b - 1) * x + f 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/Extra/ExplicitRings/F3.lean
IMOSL.IMO2012A5.𝔽₃.add_mul
[151, 11]
[152, 58]
rw [𝔽₃.mul_comm, 𝔽₃.mul_add, z.mul_comm, z.mul_comm]
x y z : 𝔽₃ ⊒ (x + y) * z = x * z + y * z
no goals
Please generate a tactic in lean4 to solve the state. STATE: x y z : 𝔽₃ ⊒ (x + y) * z = x * z + y * z TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2012/A5/Extra/ExplicitRings/F3.lean
IMOSL.IMO2012A5.𝔽₃.cast_add
[176, 1]
[186, 73]
rwa [one_add_one_eq_two, eq_neg_iff_add_eq_zero, two_add_one_eq_three]
R : Type u_1 inst✝ : AddGroupWithOne R h : 3 = 0 x y : 𝔽₃ ⊒ 1 + 1 = -1
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝ : AddGroupWithOne R h : 3 = 0 x y : 𝔽₃ ⊒ 1 + 1 = -1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2010/A1/A1.lean
IMOSL.IMO2010A1.Int_good_iff_MonoidGood
[40, 1]
[41, 67]
rw [Int.floor_int, smul_eq_mul, id_def]
R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R f : β„€ β†’ R m n : β„€ ⊒ f (⌊mβŒ‹ β€’ n) = f m * β†‘βŒŠf nβŒ‹ ↔ f (m * n) = f m * β†‘βŒŠf nβŒ‹
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝¹ : LinearOrderedRing R inst✝ : FloorRing R f : β„€ β†’ R m n : β„€ ⊒ f (⌊mβŒ‹ β€’ n) = f m * β†‘βŒŠf nβŒ‹ ↔ f (m * n) = f m * β†‘βŒŠf nβŒ‹ TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2015/A2/A2.lean
IMOSL.IMO2015A2.final_solution
[20, 1]
[51, 20]
refine Iff.symm ⟨λ h x y ↦ ?_, Ξ» h ↦ ?_⟩
f : β„€ β†’ β„€ ⊒ (βˆ€ (x y : β„€), f (x - f y) = f (f x) - f y - 1) ↔ (f = fun x => -1) ∨ f = fun x => x + 1
case refine_1 f : β„€ β†’ β„€ h : (f = fun x => -1) ∨ f = fun x => x + 1 x y : β„€ ⊒ f (x - f y) = f (f x) - f y - 1 case refine_2 f : β„€ β†’ β„€ h : βˆ€ (x y : β„€), f (x - f y) = f (f x) - f y - 1 ⊒ (f = fun x => -1) ∨ f = fun x => x + 1
Please generate a tactic in lean4 to solve the state. STATE: f : β„€ β†’ β„€ ⊒ (βˆ€ (x y : β„€), f (x - f y) = f (f x) - f y - 1) ↔ (f = fun x => -1) ∨ f = fun x => x + 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2015/A2/A2.lean
IMOSL.IMO2015A2.final_solution
[20, 1]
[51, 20]
rcases h with rfl | rfl
case refine_1 f : β„€ β†’ β„€ h : (f = fun x => -1) ∨ f = fun x => x + 1 x y : β„€ ⊒ f (x - f y) = f (f x) - f y - 1
case refine_1.inl x y : β„€ ⊒ (fun x => -1) (x - (fun x => -1) y) = (fun x => -1) ((fun x => -1) x) - (fun x => -1) y - 1 case refine_1.inr x y : β„€ ⊒ (fun x => x + 1) (x - (fun x => x + 1) y) = (fun x => x + 1) ((fun x => x + 1) x) - (fun x => x + 1) y - 1
Please generate a tactic in lean4 to solve the state. STATE: case refine_1 f : β„€ β†’ β„€ h : (f = fun x => -1) ∨ f = fun x => x + 1 x y : β„€ ⊒ f (x - f y) = f (f x) - f y - 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2015/A2/A2.lean
IMOSL.IMO2015A2.final_solution
[20, 1]
[51, 20]
rw [sub_sub, neg_add_self, sub_zero]
case refine_1.inl x y : β„€ ⊒ (fun x => -1) (x - (fun x => -1) y) = (fun x => -1) ((fun x => -1) x) - (fun x => -1) y - 1
no goals
Please generate a tactic in lean4 to solve the state. STATE: case refine_1.inl x y : β„€ ⊒ (fun x => -1) (x - (fun x => -1) y) = (fun x => -1) ((fun x => -1) x) - (fun x => -1) y - 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2015/A2/A2.lean
IMOSL.IMO2015A2.final_solution
[20, 1]
[51, 20]
rw [sub_sub, add_sub_add_right_eq_sub, add_sub_right_comm]
case refine_1.inr x y : β„€ ⊒ (fun x => x + 1) (x - (fun x => x + 1) y) = (fun x => x + 1) ((fun x => x + 1) x) - (fun x => x + 1) y - 1
no goals
Please generate a tactic in lean4 to solve the state. STATE: case refine_1.inr x y : β„€ ⊒ (fun x => x + 1) (x - (fun x => x + 1) y) = (fun x => x + 1) ((fun x => x + 1) x) - (fun x => x + 1) y - 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2015/A2/A2.lean
IMOSL.IMO2015A2.final_solution
[20, 1]
[51, 20]
have h0 := h 0 (f 0)
case refine_2 f : β„€ β†’ β„€ h : βˆ€ (x y : β„€), f (x - f y) = f (f x) - f y - 1 ⊒ (f = fun x => -1) ∨ f = fun x => x + 1
case refine_2 f : β„€ β†’ β„€ h : βˆ€ (x y : β„€), f (x - f y) = f (f x) - f y - 1 h0 : f (0 - f (f 0)) = f (f 0) - f (f 0) - 1 ⊒ (f = fun x => -1) ∨ f = fun x => x + 1
Please generate a tactic in lean4 to solve the state. STATE: case refine_2 f : β„€ β†’ β„€ h : βˆ€ (x y : β„€), f (x - f y) = f (f x) - f y - 1 ⊒ (f = fun x => -1) ∨ f = fun x => x + 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2015/A2/A2.lean
IMOSL.IMO2015A2.final_solution
[20, 1]
[51, 20]
rw [sub_self, zero_sub 1] at h0
case refine_2 f : β„€ β†’ β„€ h : βˆ€ (x y : β„€), f (x - f y) = f (f x) - f y - 1 h0 : f (0 - f (f 0)) = f (f 0) - f (f 0) - 1 ⊒ (f = fun x => -1) ∨ f = fun x => x + 1
case refine_2 f : β„€ β†’ β„€ h : βˆ€ (x y : β„€), f (x - f y) = f (f x) - f y - 1 h0 : f (0 - f (f 0)) = -1 ⊒ (f = fun x => -1) ∨ f = fun x => x + 1
Please generate a tactic in lean4 to solve the state. STATE: case refine_2 f : β„€ β†’ β„€ h : βˆ€ (x y : β„€), f (x - f y) = f (f x) - f y - 1 h0 : f (0 - f (f 0)) = f (f 0) - f (f 0) - 1 ⊒ (f = fun x => -1) ∨ f = fun x => x + 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2015/A2/A2.lean
IMOSL.IMO2015A2.final_solution
[20, 1]
[51, 20]
replace h0 x : f (x + 1) = f (f x) := by have h1 := h x (0 - f (f 0)) rwa [h0, sub_neg_eq_add (f (f x)), add_sub_cancel_right] at h1
case refine_2 f : β„€ β†’ β„€ h : βˆ€ (x y : β„€), f (x - f y) = f (f x) - f y - 1 h0 : f (0 - f (f 0)) = -1 ⊒ (f = fun x => -1) ∨ f = fun x => x + 1
case refine_2 f : β„€ β†’ β„€ h : βˆ€ (x y : β„€), f (x - f y) = f (f x) - f y - 1 h0 : βˆ€ (x : β„€), f (x + 1) = f (f x) ⊒ (f = fun x => -1) ∨ f = fun x => x + 1
Please generate a tactic in lean4 to solve the state. STATE: case refine_2 f : β„€ β†’ β„€ h : βˆ€ (x y : β„€), f (x - f y) = f (f x) - f y - 1 h0 : f (0 - f (f 0)) = -1 ⊒ (f = fun x => -1) ∨ f = fun x => x + 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2015/A2/A2.lean
IMOSL.IMO2015A2.final_solution
[20, 1]
[51, 20]
have h1 : βˆ€ n, f n = (f (-1) + 1) * n + f 0 := by refine Extra.IntIntLinearSolverAlt Ξ» n ↦ ?_ have h1 := h0 (n - f n - 1) rw [sub_add_cancel, sub_right_comm, h, ← h0, h (n - 1), ← h0, sub_add_cancel, sub_self, zero_sub, sub_eq_iff_eq_add] at h1 exact eq_add_of_sub_eq h1
case refine_2 f : β„€ β†’ β„€ h : βˆ€ (x y : β„€), f (x - f y) = f (f x) - f y - 1 h0 : βˆ€ (x : β„€), f (x + 1) = f (f x) ⊒ (f = fun x => -1) ∨ f = fun x => x + 1
case refine_2 f : β„€ β†’ β„€ h : βˆ€ (x y : β„€), f (x - f y) = f (f x) - f y - 1 h0 : βˆ€ (x : β„€), f (x + 1) = f (f x) h1 : βˆ€ (n : β„€), f n = (f (-1) + 1) * n + f 0 ⊒ (f = fun x => -1) ∨ f = fun x => x + 1
Please generate a tactic in lean4 to solve the state. STATE: case refine_2 f : β„€ β†’ β„€ h : βˆ€ (x y : β„€), f (x - f y) = f (f x) - f y - 1 h0 : βˆ€ (x : β„€), f (x + 1) = f (f x) ⊒ (f = fun x => -1) ∨ f = fun x => x + 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2015/A2/A2.lean
IMOSL.IMO2015A2.final_solution
[20, 1]
[51, 20]
refine (eq_or_ne (f (-1) + 1) 0).imp (Ξ» h2 ↦ funext Ξ» x ↦ ?_) (Ξ» h2 ↦ funext Ξ» x ↦ ?_)
case refine_2 f : β„€ β†’ β„€ h : βˆ€ (x y : β„€), f (x - f y) = f (f x) - f y - 1 h0 : βˆ€ (x : β„€), f (x + 1) = f (f x) h1 : βˆ€ (n : β„€), f n = (f (-1) + 1) * n + f 0 ⊒ (f = fun x => -1) ∨ f = fun x => x + 1
case refine_2.refine_1 f : β„€ β†’ β„€ h : βˆ€ (x y : β„€), f (x - f y) = f (f x) - f y - 1 h0 : βˆ€ (x : β„€), f (x + 1) = f (f x) h1 : βˆ€ (n : β„€), f n = (f (-1) + 1) * n + f 0 h2 : f (-1) + 1 = 0 x : β„€ ⊒ f x = -1 case refine_2.refine_2 f : β„€ β†’ β„€ h : βˆ€ (x y : β„€), f (x - f y) = f (f x) - f y - 1 h0 : βˆ€ (x : β„€), f (x + 1) = f (f x) h1 : βˆ€ (n : β„€), f n = (f (-1) + 1) * n + f 0 h2 : f (-1) + 1 β‰  0 x : β„€ ⊒ f x = x + 1
Please generate a tactic in lean4 to solve the state. STATE: case refine_2 f : β„€ β†’ β„€ h : βˆ€ (x y : β„€), f (x - f y) = f (f x) - f y - 1 h0 : βˆ€ (x : β„€), f (x + 1) = f (f x) h1 : βˆ€ (n : β„€), f n = (f (-1) + 1) * n + f 0 ⊒ (f = fun x => -1) ∨ f = fun x => x + 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2015/A2/A2.lean
IMOSL.IMO2015A2.final_solution
[20, 1]
[51, 20]
have h1 := h x (0 - f (f 0))
f : β„€ β†’ β„€ h : βˆ€ (x y : β„€), f (x - f y) = f (f x) - f y - 1 h0 : f (0 - f (f 0)) = -1 x : β„€ ⊒ f (x + 1) = f (f x)
f : β„€ β†’ β„€ h : βˆ€ (x y : β„€), f (x - f y) = f (f x) - f y - 1 h0 : f (0 - f (f 0)) = -1 x : β„€ h1 : f (x - f (0 - f (f 0))) = f (f x) - f (0 - f (f 0)) - 1 ⊒ f (x + 1) = f (f x)
Please generate a tactic in lean4 to solve the state. STATE: f : β„€ β†’ β„€ h : βˆ€ (x y : β„€), f (x - f y) = f (f x) - f y - 1 h0 : f (0 - f (f 0)) = -1 x : β„€ ⊒ f (x + 1) = f (f x) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2015/A2/A2.lean
IMOSL.IMO2015A2.final_solution
[20, 1]
[51, 20]
rwa [h0, sub_neg_eq_add (f (f x)), add_sub_cancel_right] at h1
f : β„€ β†’ β„€ h : βˆ€ (x y : β„€), f (x - f y) = f (f x) - f y - 1 h0 : f (0 - f (f 0)) = -1 x : β„€ h1 : f (x - f (0 - f (f 0))) = f (f x) - f (0 - f (f 0)) - 1 ⊒ f (x + 1) = f (f x)
no goals
Please generate a tactic in lean4 to solve the state. STATE: f : β„€ β†’ β„€ h : βˆ€ (x y : β„€), f (x - f y) = f (f x) - f y - 1 h0 : f (0 - f (f 0)) = -1 x : β„€ h1 : f (x - f (0 - f (f 0))) = f (f x) - f (0 - f (f 0)) - 1 ⊒ f (x + 1) = f (f x) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2015/A2/A2.lean
IMOSL.IMO2015A2.final_solution
[20, 1]
[51, 20]
refine Extra.IntIntLinearSolverAlt Ξ» n ↦ ?_
f : β„€ β†’ β„€ h : βˆ€ (x y : β„€), f (x - f y) = f (f x) - f y - 1 h0 : βˆ€ (x : β„€), f (x + 1) = f (f x) ⊒ βˆ€ (n : β„€), f n = (f (-1) + 1) * n + f 0
f : β„€ β†’ β„€ h : βˆ€ (x y : β„€), f (x - f y) = f (f x) - f y - 1 h0 : βˆ€ (x : β„€), f (x + 1) = f (f x) n : β„€ ⊒ f (n + 1) = f (-1) + 1 + f n
Please generate a tactic in lean4 to solve the state. STATE: f : β„€ β†’ β„€ h : βˆ€ (x y : β„€), f (x - f y) = f (f x) - f y - 1 h0 : βˆ€ (x : β„€), f (x + 1) = f (f x) ⊒ βˆ€ (n : β„€), f n = (f (-1) + 1) * n + f 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2015/A2/A2.lean
IMOSL.IMO2015A2.final_solution
[20, 1]
[51, 20]
have h1 := h0 (n - f n - 1)
f : β„€ β†’ β„€ h : βˆ€ (x y : β„€), f (x - f y) = f (f x) - f y - 1 h0 : βˆ€ (x : β„€), f (x + 1) = f (f x) n : β„€ ⊒ f (n + 1) = f (-1) + 1 + f n
f : β„€ β†’ β„€ h : βˆ€ (x y : β„€), f (x - f y) = f (f x) - f y - 1 h0 : βˆ€ (x : β„€), f (x + 1) = f (f x) n : β„€ h1 : f (n - f n - 1 + 1) = f (f (n - f n - 1)) ⊒ f (n + 1) = f (-1) + 1 + f n
Please generate a tactic in lean4 to solve the state. STATE: f : β„€ β†’ β„€ h : βˆ€ (x y : β„€), f (x - f y) = f (f x) - f y - 1 h0 : βˆ€ (x : β„€), f (x + 1) = f (f x) n : β„€ ⊒ f (n + 1) = f (-1) + 1 + f n TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2015/A2/A2.lean
IMOSL.IMO2015A2.final_solution
[20, 1]
[51, 20]
rw [sub_add_cancel, sub_right_comm, h, ← h0, h (n - 1), ← h0, sub_add_cancel, sub_self, zero_sub, sub_eq_iff_eq_add] at h1
f : β„€ β†’ β„€ h : βˆ€ (x y : β„€), f (x - f y) = f (f x) - f y - 1 h0 : βˆ€ (x : β„€), f (x + 1) = f (f x) n : β„€ h1 : f (n - f n - 1 + 1) = f (f (n - f n - 1)) ⊒ f (n + 1) = f (-1) + 1 + f n
f : β„€ β†’ β„€ h : βˆ€ (x y : β„€), f (x - f y) = f (f x) - f y - 1 h0 : βˆ€ (x : β„€), f (x + 1) = f (f x) n : β„€ h1 : f (n + 1) - f n = f (-1) + 1 ⊒ f (n + 1) = f (-1) + 1 + f n
Please generate a tactic in lean4 to solve the state. STATE: f : β„€ β†’ β„€ h : βˆ€ (x y : β„€), f (x - f y) = f (f x) - f y - 1 h0 : βˆ€ (x : β„€), f (x + 1) = f (f x) n : β„€ h1 : f (n - f n - 1 + 1) = f (f (n - f n - 1)) ⊒ f (n + 1) = f (-1) + 1 + f n TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2015/A2/A2.lean
IMOSL.IMO2015A2.final_solution
[20, 1]
[51, 20]
exact eq_add_of_sub_eq h1
f : β„€ β†’ β„€ h : βˆ€ (x y : β„€), f (x - f y) = f (f x) - f y - 1 h0 : βˆ€ (x : β„€), f (x + 1) = f (f x) n : β„€ h1 : f (n + 1) - f n = f (-1) + 1 ⊒ f (n + 1) = f (-1) + 1 + f n
no goals
Please generate a tactic in lean4 to solve the state. STATE: f : β„€ β†’ β„€ h : βˆ€ (x y : β„€), f (x - f y) = f (f x) - f y - 1 h0 : βˆ€ (x : β„€), f (x + 1) = f (f x) n : β„€ h1 : f (n + 1) - f n = f (-1) + 1 ⊒ f (n + 1) = f (-1) + 1 + f n TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2015/A2/A2.lean
IMOSL.IMO2015A2.final_solution
[20, 1]
[51, 20]
rw [h1, h2, Int.zero_mul, zero_add, ← eq_neg_of_add_eq_zero_left h2]
case refine_2.refine_1 f : β„€ β†’ β„€ h : βˆ€ (x y : β„€), f (x - f y) = f (f x) - f y - 1 h0 : βˆ€ (x : β„€), f (x + 1) = f (f x) h1 : βˆ€ (n : β„€), f n = (f (-1) + 1) * n + f 0 h2 : f (-1) + 1 = 0 x : β„€ ⊒ f x = -1
case refine_2.refine_1 f : β„€ β†’ β„€ h : βˆ€ (x y : β„€), f (x - f y) = f (f x) - f y - 1 h0 : βˆ€ (x : β„€), f (x + 1) = f (f x) h1 : βˆ€ (n : β„€), f n = (f (-1) + 1) * n + f 0 h2 : f (-1) + 1 = 0 x : β„€ ⊒ f 0 = f (-1)
Please generate a tactic in lean4 to solve the state. STATE: case refine_2.refine_1 f : β„€ β†’ β„€ h : βˆ€ (x y : β„€), f (x - f y) = f (f x) - f y - 1 h0 : βˆ€ (x : β„€), f (x + 1) = f (f x) h1 : βˆ€ (n : β„€), f n = (f (-1) + 1) * n + f 0 h2 : f (-1) + 1 = 0 x : β„€ ⊒ f x = -1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2015/A2/A2.lean
IMOSL.IMO2015A2.final_solution
[20, 1]
[51, 20]
specialize h1 (-1)
case refine_2.refine_1 f : β„€ β†’ β„€ h : βˆ€ (x y : β„€), f (x - f y) = f (f x) - f y - 1 h0 : βˆ€ (x : β„€), f (x + 1) = f (f x) h1 : βˆ€ (n : β„€), f n = (f (-1) + 1) * n + f 0 h2 : f (-1) + 1 = 0 x : β„€ ⊒ f 0 = f (-1)
case refine_2.refine_1 f : β„€ β†’ β„€ h : βˆ€ (x y : β„€), f (x - f y) = f (f x) - f y - 1 h0 : βˆ€ (x : β„€), f (x + 1) = f (f x) h2 : f (-1) + 1 = 0 x : β„€ h1 : f (-1) = (f (-1) + 1) * -1 + f 0 ⊒ f 0 = f (-1)
Please generate a tactic in lean4 to solve the state. STATE: case refine_2.refine_1 f : β„€ β†’ β„€ h : βˆ€ (x y : β„€), f (x - f y) = f (f x) - f y - 1 h0 : βˆ€ (x : β„€), f (x + 1) = f (f x) h1 : βˆ€ (n : β„€), f n = (f (-1) + 1) * n + f 0 h2 : f (-1) + 1 = 0 x : β„€ ⊒ f 0 = f (-1) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2015/A2/A2.lean
IMOSL.IMO2015A2.final_solution
[20, 1]
[51, 20]
rw [h2, Int.zero_mul, zero_add] at h1
case refine_2.refine_1 f : β„€ β†’ β„€ h : βˆ€ (x y : β„€), f (x - f y) = f (f x) - f y - 1 h0 : βˆ€ (x : β„€), f (x + 1) = f (f x) h2 : f (-1) + 1 = 0 x : β„€ h1 : f (-1) = (f (-1) + 1) * -1 + f 0 ⊒ f 0 = f (-1)
case refine_2.refine_1 f : β„€ β†’ β„€ h : βˆ€ (x y : β„€), f (x - f y) = f (f x) - f y - 1 h0 : βˆ€ (x : β„€), f (x + 1) = f (f x) h2 : f (-1) + 1 = 0 x : β„€ h1 : f (-1) = f 0 ⊒ f 0 = f (-1)
Please generate a tactic in lean4 to solve the state. STATE: case refine_2.refine_1 f : β„€ β†’ β„€ h : βˆ€ (x y : β„€), f (x - f y) = f (f x) - f y - 1 h0 : βˆ€ (x : β„€), f (x + 1) = f (f x) h2 : f (-1) + 1 = 0 x : β„€ h1 : f (-1) = (f (-1) + 1) * -1 + f 0 ⊒ f 0 = f (-1) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2015/A2/A2.lean
IMOSL.IMO2015A2.final_solution
[20, 1]
[51, 20]
exact h1.symm
case refine_2.refine_1 f : β„€ β†’ β„€ h : βˆ€ (x y : β„€), f (x - f y) = f (f x) - f y - 1 h0 : βˆ€ (x : β„€), f (x + 1) = f (f x) h2 : f (-1) + 1 = 0 x : β„€ h1 : f (-1) = f 0 ⊒ f 0 = f (-1)
no goals
Please generate a tactic in lean4 to solve the state. STATE: case refine_2.refine_1 f : β„€ β†’ β„€ h : βˆ€ (x y : β„€), f (x - f y) = f (f x) - f y - 1 h0 : βˆ€ (x : β„€), f (x + 1) = f (f x) h2 : f (-1) + 1 = 0 x : β„€ h1 : f (-1) = f 0 ⊒ f 0 = f (-1) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2015/A2/A2.lean
IMOSL.IMO2015A2.final_solution
[20, 1]
[51, 20]
specialize h0 x
case refine_2.refine_2 f : β„€ β†’ β„€ h : βˆ€ (x y : β„€), f (x - f y) = f (f x) - f y - 1 h0 : βˆ€ (x : β„€), f (x + 1) = f (f x) h1 : βˆ€ (n : β„€), f n = (f (-1) + 1) * n + f 0 h2 : f (-1) + 1 β‰  0 x : β„€ ⊒ f x = x + 1
case refine_2.refine_2 f : β„€ β†’ β„€ h : βˆ€ (x y : β„€), f (x - f y) = f (f x) - f y - 1 h1 : βˆ€ (n : β„€), f n = (f (-1) + 1) * n + f 0 h2 : f (-1) + 1 β‰  0 x : β„€ h0 : f (x + 1) = f (f x) ⊒ f x = x + 1
Please generate a tactic in lean4 to solve the state. STATE: case refine_2.refine_2 f : β„€ β†’ β„€ h : βˆ€ (x y : β„€), f (x - f y) = f (f x) - f y - 1 h0 : βˆ€ (x : β„€), f (x + 1) = f (f x) h1 : βˆ€ (n : β„€), f n = (f (-1) + 1) * n + f 0 h2 : f (-1) + 1 β‰  0 x : β„€ ⊒ f x = x + 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2015/A2/A2.lean
IMOSL.IMO2015A2.final_solution
[20, 1]
[51, 20]
rw [h1, h1 (f x), add_left_inj, Int.mul_eq_mul_left_iff h2] at h0
case refine_2.refine_2 f : β„€ β†’ β„€ h : βˆ€ (x y : β„€), f (x - f y) = f (f x) - f y - 1 h1 : βˆ€ (n : β„€), f n = (f (-1) + 1) * n + f 0 h2 : f (-1) + 1 β‰  0 x : β„€ h0 : f (x + 1) = f (f x) ⊒ f x = x + 1
case refine_2.refine_2 f : β„€ β†’ β„€ h : βˆ€ (x y : β„€), f (x - f y) = f (f x) - f y - 1 h1 : βˆ€ (n : β„€), f n = (f (-1) + 1) * n + f 0 h2 : f (-1) + 1 β‰  0 x : β„€ h0 : x + 1 = f x ⊒ f x = x + 1
Please generate a tactic in lean4 to solve the state. STATE: case refine_2.refine_2 f : β„€ β†’ β„€ h : βˆ€ (x y : β„€), f (x - f y) = f (f x) - f y - 1 h1 : βˆ€ (n : β„€), f n = (f (-1) + 1) * n + f 0 h2 : f (-1) + 1 β‰  0 x : β„€ h0 : f (x + 1) = f (f x) ⊒ f x = x + 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2015/A2/A2.lean
IMOSL.IMO2015A2.final_solution
[20, 1]
[51, 20]
exact h0.symm
case refine_2.refine_2 f : β„€ β†’ β„€ h : βˆ€ (x y : β„€), f (x - f y) = f (f x) - f y - 1 h1 : βˆ€ (n : β„€), f n = (f (-1) + 1) * n + f 0 h2 : f (-1) + 1 β‰  0 x : β„€ h0 : x + 1 = f x ⊒ f x = x + 1
no goals
Please generate a tactic in lean4 to solve the state. STATE: case refine_2.refine_2 f : β„€ β†’ β„€ h : βˆ€ (x y : β„€), f (x - f y) = f (f x) - f y - 1 h1 : βˆ€ (n : β„€), f n = (f (-1) + 1) * n + f 0 h2 : f (-1) + 1 β‰  0 x : β„€ h0 : x + 1 = f x ⊒ f x = x + 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/CharTwo/Ring/Basic.lean
IMOSL.Extra.CharTwo.Semiring_of_two_eq_zero
[21, 1]
[22, 41]
rw [← two_mul, h, zero_mul]
R : Type u_1 inst✝ : NonAssocSemiring R h : 2 = 0 x : R ⊒ x + x = 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝ : NonAssocSemiring R h : 2 = 0 x : R ⊒ x + x = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/CharTwo/Ring/Basic.lean
IMOSL.Extra.CharTwo.two_eq_zero
[29, 1]
[30, 46]
rw [← one_add_one_eq_two, add_self_eq_zero]
R : Type u_1 inst✝¹ : NonAssocSemiring R inst✝ : CharTwo R ⊒ 2 = 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝¹ : NonAssocSemiring R inst✝ : CharTwo R ⊒ 2 = 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/CharTwo/Ring/Basic.lean
IMOSL.Extra.CharTwo.add_mul_self_of_Commute
[32, 1]
[34, 71]
rw [add_mul, mul_add, mul_add, ← add_assoc, h, add_add_cancel_right]
R : Type u_1 inst✝¹ : NonAssocSemiring R inst✝ : CharTwo R x y : R h : x * y = y * x ⊒ (x + y) * (x + y) = x * x + y * y
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝¹ : NonAssocSemiring R inst✝ : CharTwo R x y : R h : x * y = y * x ⊒ (x + y) * (x + y) = x * x + y * y TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/CharTwo/Ring/Basic.lean
IMOSL.Extra.CharTwo.add_one_mul_self
[36, 1]
[37, 77]
rw [add_mul_self_of_Commute ((mul_one x).trans (one_mul x).symm), one_mul]
R : Type u_1 inst✝¹ : NonAssocSemiring R inst✝ : CharTwo R x : R ⊒ (x + 1) * (x + 1) = x * x + 1
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝¹ : NonAssocSemiring R inst✝ : CharTwo R x : R ⊒ (x + 1) * (x + 1) = x * x + 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/CharTwo/Ring/Basic.lean
IMOSL.Extra.CharTwo.mul_self_eq_one_iff
[39, 1]
[40, 86]
rw [← add_eq_zero_iff_eq, ← add_one_mul_self, mul_self_eq_zero, add_eq_zero_iff_eq]
R : Type u_1 inst✝² : NonAssocSemiring R inst✝¹ : CharTwo R inst✝ : NoZeroDivisors R x : R ⊒ x * x = 1 ↔ x = 1
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝² : NonAssocSemiring R inst✝¹ : CharTwo R inst✝ : NoZeroDivisors R x : R ⊒ x * x = 1 ↔ x = 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/CharTwo/Ring/Basic.lean
IMOSL.Extra.CharTwo.add_sq_of_Commute
[54, 1]
[55, 45]
rw [sq, sq, sq, add_mul_self_of_Commute h]
R : Type u_1 inst✝¹ : Semiring R inst✝ : CharTwo R x y : R h : x * y = y * x ⊒ (x + y) ^ 2 = x ^ 2 + y ^ 2
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝¹ : Semiring R inst✝ : CharTwo R x y : R h : x * y = y * x ⊒ (x + y) ^ 2 = x ^ 2 + y ^ 2 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/CharTwo/Ring/Basic.lean
IMOSL.Extra.CharTwo.add_one_sq
[57, 1]
[58, 32]
rw [sq, sq, add_one_mul_self]
R : Type u_1 inst✝¹ : Semiring R inst✝ : CharTwo R x : R ⊒ (x + 1) ^ 2 = x ^ 2 + 1
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝¹ : Semiring R inst✝ : CharTwo R x : R ⊒ (x + 1) ^ 2 = x ^ 2 + 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/CharTwo/Ring/Basic.lean
IMOSL.Extra.CharTwo.sq_eq_one_iff
[60, 1]
[61, 31]
rw [sq, mul_self_eq_one_iff]
R : Type u_1 inst✝² : Semiring R inst✝¹ : CharTwo R inst✝ : NoZeroDivisors R x : R ⊒ x ^ 2 = 1 ↔ x = 1
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝² : Semiring R inst✝¹ : CharTwo R inst✝ : NoZeroDivisors R x : R ⊒ x ^ 2 = 1 ↔ x = 1 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/CharTwo/Ring/Basic.lean
IMOSL.Extra.CharTwo.mul_self_eq_iff
[81, 1]
[82, 82]
rw [← add_eq_zero_iff_eq, ← add_mul_self, mul_self_eq_zero, add_eq_zero_iff_eq]
R : Type u_1 inst✝² : CommSemiring R inst✝¹ : CharTwo R inst✝ : NoZeroDivisors R x y : R ⊒ x * x = y * y ↔ x = y
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝² : CommSemiring R inst✝¹ : CharTwo R inst✝ : NoZeroDivisors R x y : R ⊒ x * x = y * y ↔ x = y TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/Extra/CharTwo/Ring/Basic.lean
IMOSL.Extra.CharTwo.sq_eq_iff
[84, 1]
[85, 31]
rw [sq, sq, mul_self_eq_iff]
R : Type u_1 inst✝² : CommSemiring R inst✝¹ : CharTwo R inst✝ : NoZeroDivisors R x y : R ⊒ x ^ 2 = y ^ 2 ↔ x = y
no goals
Please generate a tactic in lean4 to solve the state. STATE: R : Type u_1 inst✝² : CommSemiring R inst✝¹ : CharTwo R inst✝ : NoZeroDivisors R x y : R ⊒ x ^ 2 = y ^ 2 ↔ x = y TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2007/A1/A1.lean
IMOSL.IMO2007A1.final_solution_part1
[35, 1]
[43, 40]
apply (le_add_of_nonneg_left (sub_nonneg_of_le (h h0))).trans
G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n k m : β„• x : β„• β†’ G h : Monotone x h0 : k ≀ m h1 : m ≀ n ⊒ a k - a m ≀ 2 β€’ seqMax (fun i => |x i - a i|) n
G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n k m : β„• x : β„• β†’ G h : Monotone x h0 : k ≀ m h1 : m ≀ n ⊒ x m - x k + (a k - a m) ≀ 2 β€’ seqMax (fun i => |x i - a i|) n
Please generate a tactic in lean4 to solve the state. STATE: G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n k m : β„• x : β„• β†’ G h : Monotone x h0 : k ≀ m h1 : m ≀ n ⊒ a k - a m ≀ 2 β€’ seqMax (fun i => |x i - a i|) n TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2007/A1/A1.lean
IMOSL.IMO2007A1.final_solution_part1
[35, 1]
[43, 40]
rw [← add_comm_sub, sub_add, sub_sub_sub_comm, two_nsmul]
G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n k m : β„• x : β„• β†’ G h : Monotone x h0 : k ≀ m h1 : m ≀ n ⊒ x m - x k + (a k - a m) ≀ 2 β€’ seqMax (fun i => |x i - a i|) n
G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n k m : β„• x : β„• β†’ G h : Monotone x h0 : k ≀ m h1 : m ≀ n ⊒ x m - a m - (x k - a k) ≀ seqMax (fun i => |x i - a i|) n + seqMax (fun i => |x i - a i|) n
Please generate a tactic in lean4 to solve the state. STATE: G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n k m : β„• x : β„• β†’ G h : Monotone x h0 : k ≀ m h1 : m ≀ n ⊒ x m - x k + (a k - a m) ≀ 2 β€’ seqMax (fun i => |x i - a i|) n TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2007/A1/A1.lean
IMOSL.IMO2007A1.final_solution_part1
[35, 1]
[43, 40]
have X {i} : i ≀ n β†’ |x i - a i| ≀ seqMax (Ξ» i ↦ |x i - a i|) n := le_seqMax_of_le (Ξ» i ↦ |x i - a i|)
G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n k m : β„• x : β„• β†’ G h : Monotone x h0 : k ≀ m h1 : m ≀ n ⊒ x m - a m - (x k - a k) ≀ seqMax (fun i => |x i - a i|) n + seqMax (fun i => |x i - a i|) n
G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n k m : β„• x : β„• β†’ G h : Monotone x h0 : k ≀ m h1 : m ≀ n X : βˆ€ {i : β„•}, i ≀ n β†’ |x i - a i| ≀ seqMax (fun i => |x i - a i|) n ⊒ x m - a m - (x k - a k) ≀ seqMax (fun i => |x i - a i|) n + seqMax (fun i => |x i - a i|) n
Please generate a tactic in lean4 to solve the state. STATE: G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n k m : β„• x : β„• β†’ G h : Monotone x h0 : k ≀ m h1 : m ≀ n ⊒ x m - a m - (x k - a k) ≀ seqMax (fun i => |x i - a i|) n + seqMax (fun i => |x i - a i|) n TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2007/A1/A1.lean
IMOSL.IMO2007A1.final_solution_part1
[35, 1]
[43, 40]
exact (le_abs_self _).trans <| (abs_sub _ _).trans <| add_le_add (X h1) (X (h0.trans h1))
G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n k m : β„• x : β„• β†’ G h : Monotone x h0 : k ≀ m h1 : m ≀ n X : βˆ€ {i : β„•}, i ≀ n β†’ |x i - a i| ≀ seqMax (fun i => |x i - a i|) n ⊒ x m - a m - (x k - a k) ≀ seqMax (fun i => |x i - a i|) n + seqMax (fun i => |x i - a i|) n
no goals
Please generate a tactic in lean4 to solve the state. STATE: G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n k m : β„• x : β„• β†’ G h : Monotone x h0 : k ≀ m h1 : m ≀ n X : βˆ€ {i : β„•}, i ≀ n β†’ |x i - a i| ≀ seqMax (fun i => |x i - a i|) n ⊒ x m - a m - (x k - a k) ≀ seqMax (fun i => |x i - a i|) n + seqMax (fun i => |x i - a i|) n TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2007/A1/A1.lean
IMOSL.IMO2007A1.final_solution_part2
[46, 1]
[61, 27]
apply le_antisymm
G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n : β„• g : G h : βˆ€ (k m : β„•), k ≀ m β†’ m ≀ n β†’ a k - a m ≀ 2 β€’ g ⊒ seqMax (fun i => |(fun i => seqMax a i - g) i - a i|) n = g
case a G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n : β„• g : G h : βˆ€ (k m : β„•), k ≀ m β†’ m ≀ n β†’ a k - a m ≀ 2 β€’ g ⊒ seqMax (fun i => |(fun i => seqMax a i - g) i - a i|) n ≀ g case a G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n : β„• g : G h : βˆ€ (k m : β„•), k ≀ m β†’ m ≀ n β†’ a k - a m ≀ 2 β€’ g ⊒ g ≀ seqMax (fun i => |(fun i => seqMax a i - g) i - a i|) n
Please generate a tactic in lean4 to solve the state. STATE: G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n : β„• g : G h : βˆ€ (k m : β„•), k ≀ m β†’ m ≀ n β†’ a k - a m ≀ 2 β€’ g ⊒ seqMax (fun i => |(fun i => seqMax a i - g) i - a i|) n = g TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2007/A1/A1.lean
IMOSL.IMO2007A1.final_solution_part2
[46, 1]
[61, 27]
rcases exists_map_eq_seqMax (Ξ» i ↦ |seqMax a i - g - a i|) n with ⟨i, h0, h1⟩
case a G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n : β„• g : G h : βˆ€ (k m : β„•), k ≀ m β†’ m ≀ n β†’ a k - a m ≀ 2 β€’ g ⊒ seqMax (fun i => |(fun i => seqMax a i - g) i - a i|) n ≀ g
case a.intro.intro G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n : β„• g : G h : βˆ€ (k m : β„•), k ≀ m β†’ m ≀ n β†’ a k - a m ≀ 2 β€’ g i : β„• h0 : i ≀ n h1 : |seqMax a i - g - a i| = seqMax (fun i => |seqMax a i - g - a i|) n ⊒ seqMax (fun i => |(fun i => seqMax a i - g) i - a i|) n ≀ g
Please generate a tactic in lean4 to solve the state. STATE: case a G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n : β„• g : G h : βˆ€ (k m : β„•), k ≀ m β†’ m ≀ n β†’ a k - a m ≀ 2 β€’ g ⊒ seqMax (fun i => |(fun i => seqMax a i - g) i - a i|) n ≀ g TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2007/A1/A1.lean
IMOSL.IMO2007A1.final_solution_part2
[46, 1]
[61, 27]
rw [← h1, sub_right_comm, abs_le]
case a.intro.intro G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n : β„• g : G h : βˆ€ (k m : β„•), k ≀ m β†’ m ≀ n β†’ a k - a m ≀ 2 β€’ g i : β„• h0 : i ≀ n h1 : |seqMax a i - g - a i| = seqMax (fun i => |seqMax a i - g - a i|) n ⊒ seqMax (fun i => |(fun i => seqMax a i - g) i - a i|) n ≀ g
case a.intro.intro G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n : β„• g : G h : βˆ€ (k m : β„•), k ≀ m β†’ m ≀ n β†’ a k - a m ≀ 2 β€’ g i : β„• h0 : i ≀ n h1 : |seqMax a i - g - a i| = seqMax (fun i => |seqMax a i - g - a i|) n ⊒ -g ≀ seqMax a i - a i - g ∧ seqMax a i - a i - g ≀ g
Please generate a tactic in lean4 to solve the state. STATE: case a.intro.intro G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n : β„• g : G h : βˆ€ (k m : β„•), k ≀ m β†’ m ≀ n β†’ a k - a m ≀ 2 β€’ g i : β„• h0 : i ≀ n h1 : |seqMax a i - g - a i| = seqMax (fun i => |seqMax a i - g - a i|) n ⊒ seqMax (fun i => |(fun i => seqMax a i - g) i - a i|) n ≀ g TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2007/A1/A1.lean
IMOSL.IMO2007A1.final_solution_part2
[46, 1]
[61, 27]
clear h1
case a.intro.intro G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n : β„• g : G h : βˆ€ (k m : β„•), k ≀ m β†’ m ≀ n β†’ a k - a m ≀ 2 β€’ g i : β„• h0 : i ≀ n h1 : |seqMax a i - g - a i| = seqMax (fun i => |seqMax a i - g - a i|) n ⊒ -g ≀ seqMax a i - a i - g ∧ seqMax a i - a i - g ≀ g
case a.intro.intro G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n : β„• g : G h : βˆ€ (k m : β„•), k ≀ m β†’ m ≀ n β†’ a k - a m ≀ 2 β€’ g i : β„• h0 : i ≀ n ⊒ -g ≀ seqMax a i - a i - g ∧ seqMax a i - a i - g ≀ g
Please generate a tactic in lean4 to solve the state. STATE: case a.intro.intro G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n : β„• g : G h : βˆ€ (k m : β„•), k ≀ m β†’ m ≀ n β†’ a k - a m ≀ 2 β€’ g i : β„• h0 : i ≀ n h1 : |seqMax a i - g - a i| = seqMax (fun i => |seqMax a i - g - a i|) n ⊒ -g ≀ seqMax a i - a i - g ∧ seqMax a i - a i - g ≀ g TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2007/A1/A1.lean
IMOSL.IMO2007A1.final_solution_part2
[46, 1]
[61, 27]
refine ⟨?_, ?_⟩
case a.intro.intro G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n : β„• g : G h : βˆ€ (k m : β„•), k ≀ m β†’ m ≀ n β†’ a k - a m ≀ 2 β€’ g i : β„• h0 : i ≀ n ⊒ -g ≀ seqMax a i - a i - g ∧ seqMax a i - a i - g ≀ g
case a.intro.intro.refine_1 G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n : β„• g : G h : βˆ€ (k m : β„•), k ≀ m β†’ m ≀ n β†’ a k - a m ≀ 2 β€’ g i : β„• h0 : i ≀ n ⊒ -g ≀ seqMax a i - a i - g case a.intro.intro.refine_2 G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n : β„• g : G h : βˆ€ (k m : β„•), k ≀ m β†’ m ≀ n β†’ a k - a m ≀ 2 β€’ g i : β„• h0 : i ≀ n ⊒ seqMax a i - a i - g ≀ g
Please generate a tactic in lean4 to solve the state. STATE: case a.intro.intro G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n : β„• g : G h : βˆ€ (k m : β„•), k ≀ m β†’ m ≀ n β†’ a k - a m ≀ 2 β€’ g i : β„• h0 : i ≀ n ⊒ -g ≀ seqMax a i - a i - g ∧ seqMax a i - a i - g ≀ g TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2007/A1/A1.lean
IMOSL.IMO2007A1.final_solution_part2
[46, 1]
[61, 27]
rw [le_sub_iff_add_le, neg_add_self, sub_nonneg]
case a.intro.intro.refine_1 G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n : β„• g : G h : βˆ€ (k m : β„•), k ≀ m β†’ m ≀ n β†’ a k - a m ≀ 2 β€’ g i : β„• h0 : i ≀ n ⊒ -g ≀ seqMax a i - a i - g
case a.intro.intro.refine_1 G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n : β„• g : G h : βˆ€ (k m : β„•), k ≀ m β†’ m ≀ n β†’ a k - a m ≀ 2 β€’ g i : β„• h0 : i ≀ n ⊒ a i ≀ seqMax a i
Please generate a tactic in lean4 to solve the state. STATE: case a.intro.intro.refine_1 G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n : β„• g : G h : βˆ€ (k m : β„•), k ≀ m β†’ m ≀ n β†’ a k - a m ≀ 2 β€’ g i : β„• h0 : i ≀ n ⊒ -g ≀ seqMax a i - a i - g TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2007/A1/A1.lean
IMOSL.IMO2007A1.final_solution_part2
[46, 1]
[61, 27]
exact le_seqMax_self a i
case a.intro.intro.refine_1 G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n : β„• g : G h : βˆ€ (k m : β„•), k ≀ m β†’ m ≀ n β†’ a k - a m ≀ 2 β€’ g i : β„• h0 : i ≀ n ⊒ a i ≀ seqMax a i
no goals
Please generate a tactic in lean4 to solve the state. STATE: case a.intro.intro.refine_1 G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n : β„• g : G h : βˆ€ (k m : β„•), k ≀ m β†’ m ≀ n β†’ a k - a m ≀ 2 β€’ g i : β„• h0 : i ≀ n ⊒ a i ≀ seqMax a i TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2007/A1/A1.lean
IMOSL.IMO2007A1.final_solution_part2
[46, 1]
[61, 27]
rcases exists_map_eq_seqMax a i with ⟨j, h1, h2⟩
case a.intro.intro.refine_2 G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n : β„• g : G h : βˆ€ (k m : β„•), k ≀ m β†’ m ≀ n β†’ a k - a m ≀ 2 β€’ g i : β„• h0 : i ≀ n ⊒ seqMax a i - a i - g ≀ g
case a.intro.intro.refine_2.intro.intro G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n : β„• g : G h : βˆ€ (k m : β„•), k ≀ m β†’ m ≀ n β†’ a k - a m ≀ 2 β€’ g i : β„• h0 : i ≀ n j : β„• h1 : j ≀ i h2 : a j = seqMax a i ⊒ seqMax a i - a i - g ≀ g
Please generate a tactic in lean4 to solve the state. STATE: case a.intro.intro.refine_2 G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n : β„• g : G h : βˆ€ (k m : β„•), k ≀ m β†’ m ≀ n β†’ a k - a m ≀ 2 β€’ g i : β„• h0 : i ≀ n ⊒ seqMax a i - a i - g ≀ g TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2007/A1/A1.lean
IMOSL.IMO2007A1.final_solution_part2
[46, 1]
[61, 27]
rw [← h2, sub_le_iff_le_add, ← two_nsmul]
case a.intro.intro.refine_2.intro.intro G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n : β„• g : G h : βˆ€ (k m : β„•), k ≀ m β†’ m ≀ n β†’ a k - a m ≀ 2 β€’ g i : β„• h0 : i ≀ n j : β„• h1 : j ≀ i h2 : a j = seqMax a i ⊒ seqMax a i - a i - g ≀ g
case a.intro.intro.refine_2.intro.intro G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n : β„• g : G h : βˆ€ (k m : β„•), k ≀ m β†’ m ≀ n β†’ a k - a m ≀ 2 β€’ g i : β„• h0 : i ≀ n j : β„• h1 : j ≀ i h2 : a j = seqMax a i ⊒ a j - a i ≀ 2 β€’ g
Please generate a tactic in lean4 to solve the state. STATE: case a.intro.intro.refine_2.intro.intro G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n : β„• g : G h : βˆ€ (k m : β„•), k ≀ m β†’ m ≀ n β†’ a k - a m ≀ 2 β€’ g i : β„• h0 : i ≀ n j : β„• h1 : j ≀ i h2 : a j = seqMax a i ⊒ seqMax a i - a i - g ≀ g TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2007/A1/A1.lean
IMOSL.IMO2007A1.final_solution_part2
[46, 1]
[61, 27]
exact h j i h1 h0
case a.intro.intro.refine_2.intro.intro G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n : β„• g : G h : βˆ€ (k m : β„•), k ≀ m β†’ m ≀ n β†’ a k - a m ≀ 2 β€’ g i : β„• h0 : i ≀ n j : β„• h1 : j ≀ i h2 : a j = seqMax a i ⊒ a j - a i ≀ 2 β€’ g
no goals
Please generate a tactic in lean4 to solve the state. STATE: case a.intro.intro.refine_2.intro.intro G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n : β„• g : G h : βˆ€ (k m : β„•), k ≀ m β†’ m ≀ n β†’ a k - a m ≀ 2 β€’ g i : β„• h0 : i ≀ n j : β„• h1 : j ≀ i h2 : a j = seqMax a i ⊒ a j - a i ≀ 2 β€’ g TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2007/A1/A1.lean
IMOSL.IMO2007A1.final_solution_part2
[46, 1]
[61, 27]
apply (le_seqMax_of_le _ n.zero_le).trans'
case a G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n : β„• g : G h : βˆ€ (k m : β„•), k ≀ m β†’ m ≀ n β†’ a k - a m ≀ 2 β€’ g ⊒ g ≀ seqMax (fun i => |(fun i => seqMax a i - g) i - a i|) n
case a G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n : β„• g : G h : βˆ€ (k m : β„•), k ≀ m β†’ m ≀ n β†’ a k - a m ≀ 2 β€’ g ⊒ g ≀ |(fun i => seqMax a i - g) 0 - a 0|
Please generate a tactic in lean4 to solve the state. STATE: case a G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n : β„• g : G h : βˆ€ (k m : β„•), k ≀ m β†’ m ≀ n β†’ a k - a m ≀ 2 β€’ g ⊒ g ≀ seqMax (fun i => |(fun i => seqMax a i - g) i - a i|) n TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2007/A1/A1.lean
IMOSL.IMO2007A1.final_solution_part2
[46, 1]
[61, 27]
rw [sub_sub, seqMax, sub_add_cancel_right, abs_neg]
case a G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n : β„• g : G h : βˆ€ (k m : β„•), k ≀ m β†’ m ≀ n β†’ a k - a m ≀ 2 β€’ g ⊒ g ≀ |(fun i => seqMax a i - g) 0 - a 0|
case a G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n : β„• g : G h : βˆ€ (k m : β„•), k ≀ m β†’ m ≀ n β†’ a k - a m ≀ 2 β€’ g ⊒ g ≀ |g|
Please generate a tactic in lean4 to solve the state. STATE: case a G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n : β„• g : G h : βˆ€ (k m : β„•), k ≀ m β†’ m ≀ n β†’ a k - a m ≀ 2 β€’ g ⊒ g ≀ |(fun i => seqMax a i - g) 0 - a 0| TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2007/A1/A1.lean
IMOSL.IMO2007A1.final_solution_part2
[46, 1]
[61, 27]
exact le_abs_self g
case a G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n : β„• g : G h : βˆ€ (k m : β„•), k ≀ m β†’ m ≀ n β†’ a k - a m ≀ 2 β€’ g ⊒ g ≀ |g|
no goals
Please generate a tactic in lean4 to solve the state. STATE: case a G : Type u_1 inst✝ : LinearOrderedAddCommGroup G a : β„• β†’ G n : β„• g : G h : βˆ€ (k m : β„•), k ≀ m β†’ m ≀ n β†’ a k - a m ≀ 2 β€’ g ⊒ g ≀ |g| TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/N3/N3.lean
IMOSL.IMO2006N3.g_succ
[31, 1]
[35, 52]
rw [g, g, Nat.divisors]
n : β„• ⊒ g n.succ = g n + n.succ.divisors.card
n : β„• ⊒ βˆ‘ k ∈ range n.succ, n.succ / (k + 1) = βˆ‘ k ∈ range n, n / (k + 1) + (filter (fun x => x ∣ n.succ) (Ico 1 (n.succ + 1))).card
Please generate a tactic in lean4 to solve the state. STATE: n : β„• ⊒ g n.succ = g n + n.succ.divisors.card TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/N3/N3.lean
IMOSL.IMO2006N3.g_succ
[31, 1]
[35, 52]
simp only [Nat.succ_div]
n : β„• ⊒ βˆ‘ k ∈ range n.succ, n.succ / (k + 1) = βˆ‘ k ∈ range n, n / (k + 1) + (filter (fun x => x ∣ n.succ) (Ico 1 (n.succ + 1))).card
n : β„• ⊒ βˆ‘ x ∈ range n.succ, (n / (x + 1) + if x + 1 ∣ n + 1 then 1 else 0) = βˆ‘ k ∈ range n, n / (k + 1) + (filter (fun x => x ∣ n.succ) (Ico 1 (n.succ + 1))).card
Please generate a tactic in lean4 to solve the state. STATE: n : β„• ⊒ βˆ‘ k ∈ range n.succ, n.succ / (k + 1) = βˆ‘ k ∈ range n, n / (k + 1) + (filter (fun x => x ∣ n.succ) (Ico 1 (n.succ + 1))).card TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/N3/N3.lean
IMOSL.IMO2006N3.g_succ
[31, 1]
[35, 52]
rw [card_filter, sum_Ico_eq_sum_range, Nat.add_sub_cancel, sum_add_distrib, sum_range_succ, Nat.div_eq_of_lt n.lt_succ_self]
n : β„• ⊒ βˆ‘ x ∈ range n.succ, (n / (x + 1) + if x + 1 ∣ n + 1 then 1 else 0) = βˆ‘ k ∈ range n, n / (k + 1) + (filter (fun x => x ∣ n.succ) (Ico 1 (n.succ + 1))).card
n : β„• ⊒ (βˆ‘ x ∈ range n, n / (x + 1) + 0 + βˆ‘ x ∈ range n.succ, if x + 1 ∣ n + 1 then 1 else 0) = βˆ‘ k ∈ range n, n / (k + 1) + βˆ‘ k ∈ range n.succ, if 1 + k ∣ n.succ then 1 else 0
Please generate a tactic in lean4 to solve the state. STATE: n : β„• ⊒ βˆ‘ x ∈ range n.succ, (n / (x + 1) + if x + 1 ∣ n + 1 then 1 else 0) = βˆ‘ k ∈ range n, n / (k + 1) + (filter (fun x => x ∣ n.succ) (Ico 1 (n.succ + 1))).card TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/N3/N3.lean
IMOSL.IMO2006N3.g_succ
[31, 1]
[35, 52]
exact congrArgβ‚‚ _ rfl (by simp only [add_comm 1])
n : β„• ⊒ (βˆ‘ x ∈ range n, n / (x + 1) + 0 + βˆ‘ x ∈ range n.succ, if x + 1 ∣ n + 1 then 1 else 0) = βˆ‘ k ∈ range n, n / (k + 1) + βˆ‘ k ∈ range n.succ, if 1 + k ∣ n.succ then 1 else 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: n : β„• ⊒ (βˆ‘ x ∈ range n, n / (x + 1) + 0 + βˆ‘ x ∈ range n.succ, if x + 1 ∣ n + 1 then 1 else 0) = βˆ‘ k ∈ range n, n / (k + 1) + βˆ‘ k ∈ range n.succ, if 1 + k ∣ n.succ then 1 else 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/N3/N3.lean
IMOSL.IMO2006N3.g_succ
[31, 1]
[35, 52]
simp only [add_comm 1]
n : β„• ⊒ (βˆ‘ x ∈ range n.succ, if x + 1 ∣ n + 1 then 1 else 0) = βˆ‘ k ∈ range n.succ, if 1 + k ∣ n.succ then 1 else 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: n : β„• ⊒ (βˆ‘ x ∈ range n.succ, if x + 1 ∣ n + 1 then 1 else 0) = βˆ‘ k ∈ range n.succ, if 1 + k ∣ n.succ then 1 else 0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/N3/N3.lean
IMOSL.IMO2006N3.g_eq_sum_divisors_card
[37, 1]
[39, 70]
rw [sum_range_zero, g_zero]
⊒ g 0 = βˆ‘ k ∈ range 0, k.succ.divisors.card
no goals
Please generate a tactic in lean4 to solve the state. STATE: ⊒ g 0 = βˆ‘ k ∈ range 0, k.succ.divisors.card TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/N3/N3.lean
IMOSL.IMO2006N3.g_eq_sum_divisors_card
[37, 1]
[39, 70]
rw [g_succ, sum_range_succ, ← g_eq_sum_divisors_card]
n : β„• ⊒ g (n + 1) = βˆ‘ k ∈ range (n + 1), k.succ.divisors.card
no goals
Please generate a tactic in lean4 to solve the state. STATE: n : β„• ⊒ g (n + 1) = βˆ‘ k ∈ range (n + 1), k.succ.divisors.card TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/N3/N3.lean
IMOSL.IMO2006N3.two_le_card_divisors
[41, 1]
[44, 57]
rw [← Nat.insert_self_properDivisors (Nat.not_eq_zero_of_lt h), Nat.succ_le_iff, card_insert_of_not_mem Nat.properDivisors.not_self_mem, Nat.succ_lt_succ_iff, card_pos]
n : β„• h : 2 ≀ n ⊒ 2 ≀ n.divisors.card
n : β„• h : 2 ≀ n ⊒ n.properDivisors.Nonempty
Please generate a tactic in lean4 to solve the state. STATE: n : β„• h : 2 ≀ n ⊒ 2 ≀ n.divisors.card TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/N3/N3.lean
IMOSL.IMO2006N3.two_le_card_divisors
[41, 1]
[44, 57]
exact ⟨1, Nat.one_mem_properDivisors_iff_one_lt.mpr h⟩
n : β„• h : 2 ≀ n ⊒ n.properDivisors.Nonempty
no goals
Please generate a tactic in lean4 to solve the state. STATE: n : β„• h : 2 ≀ n ⊒ n.properDivisors.Nonempty TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/N3/N3.lean
IMOSL.IMO2006N3.two_mul_lt_g
[46, 1]
[50, 44]
norm_num
⊒ 12 < 14
no goals
Please generate a tactic in lean4 to solve the state. STATE: ⊒ 12 < 14 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/N3/N3.lean
IMOSL.IMO2006N3.two_mul_lt_g
[46, 1]
[50, 44]
rw [Nat.mul_succ, g_succ]
n : β„• h : 6 ≀ n h0 : 2 * n < g n ⊒ 2 * (n + 1) < g (n + 1)
n : β„• h : 6 ≀ n h0 : 2 * n < g n ⊒ 2 * n + 2 < g n + n.succ.divisors.card
Please generate a tactic in lean4 to solve the state. STATE: n : β„• h : 6 ≀ n h0 : 2 * n < g n ⊒ 2 * (n + 1) < g (n + 1) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/N3/N3.lean
IMOSL.IMO2006N3.two_mul_lt_g
[46, 1]
[50, 44]
exact add_lt_add_of_lt_of_le h0 <| two_le_card_divisors <| Nat.succ_le_succ (Nat.one_le_of_lt h)
n : β„• h : 6 ≀ n h0 : 2 * n < g n ⊒ 2 * n + 2 < g n + n.succ.divisors.card
no goals
Please generate a tactic in lean4 to solve the state. STATE: n : β„• h : 6 ≀ n h0 : 2 * n < g n ⊒ 2 * n + 2 < g n + n.succ.divisors.card TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/N3/N3.lean
IMOSL.IMO2006N3.exists_lt_card_divisor_succ
[64, 1]
[66, 82]
rw [Nat.succ_eq_add_one, Nat.sub_add_cancel Nat.one_le_two_pow, Nat.divisors_prime_pow Nat.prime_two, card_map, card_range, Nat.lt_succ_iff]
c : β„• ⊒ c < (2 ^ c - 1).succ.divisors.card
no goals
Please generate a tactic in lean4 to solve the state. STATE: c : β„• ⊒ c < (2 ^ c - 1).succ.divisors.card TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/N3/N3.lean
IMOSL.IMO2006N3.f_lt_f_of_g
[68, 1]
[75, 29]
unfold f
a b : β„• h : g a * b < g b * a ⊒ f a < f b
a b : β„• h : g a * b < g b * a ⊒ ↑↑(g a) / ↑↑a < ↑↑(g b) / ↑↑b
Please generate a tactic in lean4 to solve the state. STATE: a b : β„• h : g a * b < g b * a ⊒ f a < f b TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/N3/N3.lean
IMOSL.IMO2006N3.f_lt_f_of_g
[68, 1]
[75, 29]
rcases a with _ | a
a b : β„• h : g a * b < g b * a ⊒ ↑↑(g a) / ↑↑a < ↑↑(g b) / ↑↑b
case zero b : β„• h : g 0 * b < g b * 0 ⊒ ↑↑(g 0) / ↑↑0 < ↑↑(g b) / ↑↑b case succ b a : β„• h : g (a + 1) * b < g b * (a + 1) ⊒ ↑↑(g (a + 1)) / ↑↑(a + 1) < ↑↑(g b) / ↑↑b
Please generate a tactic in lean4 to solve the state. STATE: a b : β„• h : g a * b < g b * a ⊒ ↑↑(g a) / ↑↑a < ↑↑(g b) / ↑↑b TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/N3/N3.lean
IMOSL.IMO2006N3.f_lt_f_of_g
[68, 1]
[75, 29]
rcases b with _ | b
case succ b a : β„• h : g (a + 1) * b < g b * (a + 1) ⊒ ↑↑(g (a + 1)) / ↑↑(a + 1) < ↑↑(g b) / ↑↑b
case succ.zero a : β„• h : g (a + 1) * 0 < g 0 * (a + 1) ⊒ ↑↑(g (a + 1)) / ↑↑(a + 1) < ↑↑(g 0) / ↑↑0 case succ.succ a b : β„• h : g (a + 1) * (b + 1) < g (b + 1) * (a + 1) ⊒ ↑↑(g (a + 1)) / ↑↑(a + 1) < ↑↑(g (b + 1)) / ↑↑(b + 1)
Please generate a tactic in lean4 to solve the state. STATE: case succ b a : β„• h : g (a + 1) * b < g b * (a + 1) ⊒ ↑↑(g (a + 1)) / ↑↑(a + 1) < ↑↑(g b) / ↑↑b TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/N3/N3.lean
IMOSL.IMO2006N3.f_lt_f_of_g
[68, 1]
[75, 29]
rw [g_zero, zero_mul, mul_zero] at h
case zero b : β„• h : g 0 * b < g b * 0 ⊒ ↑↑(g 0) / ↑↑0 < ↑↑(g b) / ↑↑b
case zero b : β„• h : 0 < 0 ⊒ ↑↑(g 0) / ↑↑0 < ↑↑(g b) / ↑↑b
Please generate a tactic in lean4 to solve the state. STATE: case zero b : β„• h : g 0 * b < g b * 0 ⊒ ↑↑(g 0) / ↑↑0 < ↑↑(g b) / ↑↑b TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/N3/N3.lean
IMOSL.IMO2006N3.f_lt_f_of_g
[68, 1]
[75, 29]
exact absurd rfl h.ne
case zero b : β„• h : 0 < 0 ⊒ ↑↑(g 0) / ↑↑0 < ↑↑(g b) / ↑↑b
no goals
Please generate a tactic in lean4 to solve the state. STATE: case zero b : β„• h : 0 < 0 ⊒ ↑↑(g 0) / ↑↑0 < ↑↑(g b) / ↑↑b TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/N3/N3.lean
IMOSL.IMO2006N3.f_lt_f_of_g
[68, 1]
[75, 29]
rw [g_zero, zero_mul, mul_zero] at h
case succ.zero a : β„• h : g (a + 1) * 0 < g 0 * (a + 1) ⊒ ↑↑(g (a + 1)) / ↑↑(a + 1) < ↑↑(g 0) / ↑↑0
case succ.zero a : β„• h : 0 < 0 ⊒ ↑↑(g (a + 1)) / ↑↑(a + 1) < ↑↑(g 0) / ↑↑0
Please generate a tactic in lean4 to solve the state. STATE: case succ.zero a : β„• h : g (a + 1) * 0 < g 0 * (a + 1) ⊒ ↑↑(g (a + 1)) / ↑↑(a + 1) < ↑↑(g 0) / ↑↑0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/N3/N3.lean
IMOSL.IMO2006N3.f_lt_f_of_g
[68, 1]
[75, 29]
exact absurd rfl h.ne
case succ.zero a : β„• h : 0 < 0 ⊒ ↑↑(g (a + 1)) / ↑↑(a + 1) < ↑↑(g 0) / ↑↑0
no goals
Please generate a tactic in lean4 to solve the state. STATE: case succ.zero a : β„• h : 0 < 0 ⊒ ↑↑(g (a + 1)) / ↑↑(a + 1) < ↑↑(g 0) / ↑↑0 TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/N3/N3.lean
IMOSL.IMO2006N3.f_lt_f_of_g
[68, 1]
[75, 29]
have X (n : β„•) : 0 < (n.succ : β„€) := Int.natCast_pos.mpr n.succ_pos
case succ.succ a b : β„• h : g (a + 1) * (b + 1) < g (b + 1) * (a + 1) ⊒ ↑↑(g (a + 1)) / ↑↑(a + 1) < ↑↑(g (b + 1)) / ↑↑(b + 1)
case succ.succ a b : β„• h : g (a + 1) * (b + 1) < g (b + 1) * (a + 1) X : βˆ€ (n : β„•), 0 < ↑n.succ ⊒ ↑↑(g (a + 1)) / ↑↑(a + 1) < ↑↑(g (b + 1)) / ↑↑(b + 1)
Please generate a tactic in lean4 to solve the state. STATE: case succ.succ a b : β„• h : g (a + 1) * (b + 1) < g (b + 1) * (a + 1) ⊒ ↑↑(g (a + 1)) / ↑↑(a + 1) < ↑↑(g (b + 1)) / ↑↑(b + 1) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/N3/N3.lean
IMOSL.IMO2006N3.f_lt_f_of_g
[68, 1]
[75, 29]
rw [Rat.div_lt_div_iff_mul_lt_mul (X a) (X b), ← Nat.cast_mul, ← Nat.cast_mul]
case succ.succ a b : β„• h : g (a + 1) * (b + 1) < g (b + 1) * (a + 1) X : βˆ€ (n : β„•), 0 < ↑n.succ ⊒ ↑↑(g (a + 1)) / ↑↑(a + 1) < ↑↑(g (b + 1)) / ↑↑(b + 1)
case succ.succ a b : β„• h : g (a + 1) * (b + 1) < g (b + 1) * (a + 1) X : βˆ€ (n : β„•), 0 < ↑n.succ ⊒ ↑(g (a + 1) * b.succ) < ↑(g (b + 1) * a.succ)
Please generate a tactic in lean4 to solve the state. STATE: case succ.succ a b : β„• h : g (a + 1) * (b + 1) < g (b + 1) * (a + 1) X : βˆ€ (n : β„•), 0 < ↑n.succ ⊒ ↑↑(g (a + 1)) / ↑↑(a + 1) < ↑↑(g (b + 1)) / ↑↑(b + 1) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/N3/N3.lean
IMOSL.IMO2006N3.f_lt_f_of_g
[68, 1]
[75, 29]
exact Int.ofNat_lt.mpr h
case succ.succ a b : β„• h : g (a + 1) * (b + 1) < g (b + 1) * (a + 1) X : βˆ€ (n : β„•), 0 < ↑n.succ ⊒ ↑(g (a + 1) * b.succ) < ↑(g (b + 1) * a.succ)
no goals
Please generate a tactic in lean4 to solve the state. STATE: case succ.succ a b : β„• h : g (a + 1) * (b + 1) < g (b + 1) * (a + 1) X : βˆ€ (n : β„•), 0 < ↑n.succ ⊒ ↑(g (a + 1) * b.succ) < ↑(g (b + 1) * a.succ) TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/N3/N3.lean
IMOSL.IMO2006N3.f_self_lt_f_succ_of_divisors_card
[77, 1]
[84, 58]
apply f_lt_f_of_g
n : β„• h : n β‰  0 h0 : βˆ€ k < n, k.succ.divisors.card < n.succ.divisors.card ⊒ f n < f n.succ
case h n : β„• h : n β‰  0 h0 : βˆ€ k < n, k.succ.divisors.card < n.succ.divisors.card ⊒ g n * n.succ < g n.succ * n
Please generate a tactic in lean4 to solve the state. STATE: n : β„• h : n β‰  0 h0 : βˆ€ k < n, k.succ.divisors.card < n.succ.divisors.card ⊒ f n < f n.succ TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/N3/N3.lean
IMOSL.IMO2006N3.f_self_lt_f_succ_of_divisors_card
[77, 1]
[84, 58]
rw [Nat.mul_succ, g_succ, add_mul, add_lt_add_iff_left, g_eq_sum_divisors_card]
case h n : β„• h : n β‰  0 h0 : βˆ€ k < n, k.succ.divisors.card < n.succ.divisors.card ⊒ g n * n.succ < g n.succ * n
case h n : β„• h : n β‰  0 h0 : βˆ€ k < n, k.succ.divisors.card < n.succ.divisors.card ⊒ βˆ‘ k ∈ range n, k.succ.divisors.card < n.succ.divisors.card * n
Please generate a tactic in lean4 to solve the state. STATE: case h n : β„• h : n β‰  0 h0 : βˆ€ k < n, k.succ.divisors.card < n.succ.divisors.card ⊒ g n * n.succ < g n.succ * n TACTIC:
https://github.com/mortarsanjaya/IMOSLLean4.git
be127d301e366822fbeeeda49d9fd5b998fb4eb5
IMOSLLean4/IMO2006/N3/N3.lean
IMOSL.IMO2006N3.f_self_lt_f_succ_of_divisors_card
[77, 1]
[84, 58]
calc _ < (range n).sum Ξ» _ ↦ n.succ.divisors.card := sum_lt_sum_of_nonempty (nonempty_range_iff.mpr h) (Ξ» k h1 ↦ h0 k (mem_range.mp h1)) _ = n.succ.divisors.card * n := by rw [sum_const, card_range, smul_eq_mul, mul_comm]
case h n : β„• h : n β‰  0 h0 : βˆ€ k < n, k.succ.divisors.card < n.succ.divisors.card ⊒ βˆ‘ k ∈ range n, k.succ.divisors.card < n.succ.divisors.card * n
no goals
Please generate a tactic in lean4 to solve the state. STATE: case h n : β„• h : n β‰  0 h0 : βˆ€ k < n, k.succ.divisors.card < n.succ.divisors.card ⊒ βˆ‘ k ∈ range n, k.succ.divisors.card < n.succ.divisors.card * n TACTIC: