declaration
stringlengths
27
11.3k
file
stringlengths
52
114
context
dict
tactic_states
listlengths
1
1.24k
theorem Nat.Prime.sq_add_sq' {p : β„•} [h : Fact p.Prime] (hp : p % 4 = 1) : βˆƒ a b : β„•, a ^ 2 + b ^ 2 = p := by rw [← div_add_mod p 4] at h ⊒ rw [hp] at h ⊒ let k := p / 4 apply sq_add_sq_of_nonempty_fixedPoints have key := (Equiv.Perm.card_fixedPoints_modEq (p := 2) (n := 1) (obvInvo_sq k)).symm.trans ...
/root/DuelModelResearch/mathlib4/Archive/ZagierTwoSquares.lean
{ "open": [ "Set", "Function", "Zagier" ], "variables": [ "(k : β„•) [hk : Fact (4 * k + 1).Prime]", "(k : β„•)", "[hk : Fact (4 * k + 1).Prime]" ] }
[ { "line": "rw [← div_add_mod p 4] at h ⊒", "before_state": "p : β„•\nh : Fact (Prime p)\nhp : p % 4 = 1\n⊒ βˆƒ a b, a ^ 2 + b ^ 2 = p", "after_state": "p : β„•\nh : Fact (Prime (4 * (p / 4) + p % 4))\nhp : p % 4 = 1\n⊒ βˆƒ a b, a ^ 2 + b ^ 2 = 4 * (p / 4) + p % 4" }, { "line": "rewrite [← div_add_mod p ...
example : Β¬ LucasLehmerTest 2 := by norm_num
/root/DuelModelResearch/mathlib4/Archive/Examples/MersennePrimes.lean
{ "open": [], "variables": [] }
[ { "line": "norm_num", "before_state": "⊒ ¬LucasLehmerTest 2", "after_state": "No Goals!" } ]
example : (mersenne 2).Prime := by decide
/root/DuelModelResearch/mathlib4/Archive/Examples/MersennePrimes.lean
{ "open": [], "variables": [] }
[ { "line": "decide", "before_state": "⊒ Nat.Prime (mersenne 2)", "after_state": "No Goals!" } ]
example : (mersenne 3).Prime := lucas_lehmer_sufficiency _ (by norm_num) (by norm_num)
/root/DuelModelResearch/mathlib4/Archive/Examples/MersennePrimes.lean
{ "open": [], "variables": [] }
[ { "line": "norm_num", "before_state": "⊒ 1 < 3", "after_state": "No Goals!" }, { "line": "norm_num", "before_state": "⊒ LucasLehmerTest 3", "after_state": "No Goals!" } ]
example : (mersenne 5).Prime := lucas_lehmer_sufficiency _ (by norm_num) (by norm_num)
/root/DuelModelResearch/mathlib4/Archive/Examples/MersennePrimes.lean
{ "open": [], "variables": [] }
[ { "line": "norm_num", "before_state": "⊒ 1 < 5", "after_state": "No Goals!" }, { "line": "norm_num", "before_state": "⊒ LucasLehmerTest 5", "after_state": "No Goals!" } ]
example : (mersenne 7).Prime := lucas_lehmer_sufficiency _ (by norm_num) (by norm_num)
/root/DuelModelResearch/mathlib4/Archive/Examples/MersennePrimes.lean
{ "open": [], "variables": [] }
[ { "line": "norm_num", "before_state": "⊒ 1 < 7", "after_state": "No Goals!" }, { "line": "norm_num", "before_state": "⊒ LucasLehmerTest 7", "after_state": "No Goals!" } ]
example : (mersenne 13).Prime := lucas_lehmer_sufficiency _ (by norm_num) (by norm_num)
/root/DuelModelResearch/mathlib4/Archive/Examples/MersennePrimes.lean
{ "open": [], "variables": [] }
[ { "line": "norm_num", "before_state": "⊒ 1 < 13", "after_state": "No Goals!" }, { "line": "norm_num", "before_state": "⊒ LucasLehmerTest 13", "after_state": "No Goals!" } ]
example : (mersenne 17).Prime := lucas_lehmer_sufficiency _ (by norm_num) (by norm_num)
/root/DuelModelResearch/mathlib4/Archive/Examples/MersennePrimes.lean
{ "open": [], "variables": [] }
[ { "line": "norm_num", "before_state": "⊒ 1 < 17", "after_state": "No Goals!" }, { "line": "norm_num", "before_state": "⊒ LucasLehmerTest 17", "after_state": "No Goals!" } ]
example : (mersenne 19).Prime := lucas_lehmer_sufficiency _ (by norm_num) (by norm_num)
/root/DuelModelResearch/mathlib4/Archive/Examples/MersennePrimes.lean
{ "open": [], "variables": [] }
[ { "line": "norm_num", "before_state": "⊒ 1 < 19", "after_state": "No Goals!" }, { "line": "norm_num", "before_state": "⊒ LucasLehmerTest 19", "after_state": "No Goals!" } ]
example : (mersenne 31).Prime := lucas_lehmer_sufficiency _ (by norm_num) (by norm_num)
/root/DuelModelResearch/mathlib4/Archive/Examples/MersennePrimes.lean
{ "open": [], "variables": [] }
[ { "line": "norm_num", "before_state": "⊒ 1 < 31", "after_state": "No Goals!" }, { "line": "norm_num", "before_state": "⊒ LucasLehmerTest 31", "after_state": "No Goals!" } ]
example : (mersenne 61).Prime := lucas_lehmer_sufficiency _ (by norm_num) (by norm_num)
/root/DuelModelResearch/mathlib4/Archive/Examples/MersennePrimes.lean
{ "open": [], "variables": [] }
[ { "line": "norm_num", "before_state": "⊒ 1 < 61", "after_state": "No Goals!" }, { "line": "norm_num", "before_state": "⊒ LucasLehmerTest 61", "after_state": "No Goals!" } ]
example : (mersenne 89).Prime := lucas_lehmer_sufficiency _ (by norm_num) (by norm_num)
/root/DuelModelResearch/mathlib4/Archive/Examples/MersennePrimes.lean
{ "open": [], "variables": [] }
[ { "line": "norm_num", "before_state": "⊒ 1 < 89", "after_state": "No Goals!" }, { "line": "norm_num", "before_state": "⊒ LucasLehmerTest 89", "after_state": "No Goals!" } ]
example : (mersenne 107).Prime := lucas_lehmer_sufficiency _ (by norm_num) (by norm_num)
/root/DuelModelResearch/mathlib4/Archive/Examples/MersennePrimes.lean
{ "open": [], "variables": [] }
[ { "line": "norm_num", "before_state": "⊒ 1 < 107", "after_state": "No Goals!" }, { "line": "norm_num", "before_state": "⊒ LucasLehmerTest 107", "after_state": "No Goals!" } ]
example : (mersenne 127).Prime := lucas_lehmer_sufficiency _ (by norm_num) (by norm_num)
/root/DuelModelResearch/mathlib4/Archive/Examples/MersennePrimes.lean
{ "open": [], "variables": [] }
[ { "line": "norm_num", "before_state": "⊒ 1 < 127", "after_state": "No Goals!" }, { "line": "norm_num", "before_state": "⊒ LucasLehmerTest 127", "after_state": "No Goals!" } ]
example : (mersenne 521).Prime := lucas_lehmer_sufficiency _ (by norm_num) (by norm_num)
/root/DuelModelResearch/mathlib4/Archive/Examples/MersennePrimes.lean
{ "open": [], "variables": [] }
[ { "line": "norm_num", "before_state": "⊒ 1 < 521", "after_state": "No Goals!" }, { "line": "norm_num", "before_state": "⊒ LucasLehmerTest 521", "after_state": "No Goals!" } ]
example : (mersenne 607).Prime := lucas_lehmer_sufficiency _ (by norm_num) (by norm_num)
/root/DuelModelResearch/mathlib4/Archive/Examples/MersennePrimes.lean
{ "open": [], "variables": [] }
[ { "line": "norm_num", "before_state": "⊒ 1 < 607", "after_state": "No Goals!" }, { "line": "norm_num", "before_state": "⊒ LucasLehmerTest 607", "after_state": "No Goals!" } ]
example : (mersenne 1279).Prime := lucas_lehmer_sufficiency _ (by norm_num) (by norm_num)
/root/DuelModelResearch/mathlib4/Archive/Examples/MersennePrimes.lean
{ "open": [], "variables": [] }
[ { "line": "norm_num", "before_state": "⊒ 1 < 1279", "after_state": "No Goals!" }, { "line": "norm_num", "before_state": "⊒ LucasLehmerTest 1279", "after_state": "No Goals!" } ]
example : (mersenne 2203).Prime := lucas_lehmer_sufficiency _ (by norm_num) (by norm_num)
/root/DuelModelResearch/mathlib4/Archive/Examples/MersennePrimes.lean
{ "open": [], "variables": [] }
[ { "line": "norm_num", "before_state": "⊒ 1 < 2203", "after_state": "No Goals!" }, { "line": "norm_num", "before_state": "⊒ LucasLehmerTest 2203", "after_state": "No Goals!" } ]
example : (mersenne 2281).Prime := lucas_lehmer_sufficiency _ (by norm_num) (by norm_num)
/root/DuelModelResearch/mathlib4/Archive/Examples/MersennePrimes.lean
{ "open": [], "variables": [] }
[ { "line": "norm_num", "before_state": "⊒ 1 < 2281", "after_state": "No Goals!" }, { "line": "norm_num", "before_state": "⊒ LucasLehmerTest 2281", "after_state": "No Goals!" } ]
example : (mersenne 3217).Prime := lucas_lehmer_sufficiency _ (by norm_num) (by norm_num)
/root/DuelModelResearch/mathlib4/Archive/Examples/MersennePrimes.lean
{ "open": [], "variables": [] }
[ { "line": "norm_num", "before_state": "⊒ 1 < 3217", "after_state": "No Goals!" }, { "line": "norm_num", "before_state": "⊒ LucasLehmerTest 3217", "after_state": "No Goals!" } ]
example : (mersenne 4253).Prime := lucas_lehmer_sufficiency _ (by norm_num) (by norm_num)
/root/DuelModelResearch/mathlib4/Archive/Examples/MersennePrimes.lean
{ "open": [], "variables": [] }
[ { "line": "norm_num", "before_state": "⊒ 1 < 4253", "after_state": "No Goals!" }, { "line": "norm_num", "before_state": "⊒ LucasLehmerTest 4253", "after_state": "No Goals!" } ]
example : (mersenne 4423).Prime := lucas_lehmer_sufficiency _ (by norm_num) (by norm_num)
/root/DuelModelResearch/mathlib4/Archive/Examples/MersennePrimes.lean
{ "open": [], "variables": [] }
[ { "line": "norm_num", "before_state": "⊒ 1 < 4423", "after_state": "No Goals!" }, { "line": "norm_num", "before_state": "⊒ LucasLehmerTest 4423", "after_state": "No Goals!" } ]
theorem calculation (n k : β„•) (h1 : k ∣ 21 * n + 4) (h2 : k ∣ 14 * n + 3) : k ∣ 1 := have h3 : k ∣ 2 * (21 * n + 4) := h1.mul_left 2 have h4 : k ∣ 3 * (14 * n + 3) := h2.mul_left 3 have h5 : 3 * (14 * n + 3) = 2 * (21 * n + 4) + 1 := by ring (Nat.dvd_add_right h3).mp (h5 β–Έ h4)
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo1959Q1.lean
{ "open": [ "Nat" ], "variables": [] }
[ { "line": "ring", "before_state": "n k : β„•\nh1 : k ∣ 21 * n + 4\nh2 : k ∣ 14 * n + 3\nh3 : k ∣ 2 * (21 * n + 4)\nh4 : k ∣ 3 * (14 * n + 3)\n⊒ 3 * (14 * n + 3) = 2 * (21 * n + 4) + 1", "after_state": "No Goals!" }, { "line": "first\n| ring1\n|\n try_this ring_nf\"\\n\\nThe `ring` tactic failed t...
theorem Imo1961Q3 {n : β„•} {x : ℝ} (hβ‚€ : n β‰  0) : (cos x) ^ n - (sin x) ^ n = 1 ↔ (βˆƒ k : β„€, k * Ο€ = x) ∧ Even n ∨ (βˆƒ k : β„€, k * (2 * Ο€) = x) ∧ Odd n ∨ (βˆƒ k : β„€, -(Ο€ / 2) + k * (2 * Ο€) = x) ∧ Odd n := by constructor Β· intro h rcases eq_or_ne (sin x) 0 with hsinx | hsinx Β· rw [hsinx, zero_pow...
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo1961Q3.lean
{ "open": [ "Real" ], "variables": [] }
[ { "line": "constructor", "before_state": "n : β„•\nx : ℝ\nhβ‚€ : n β‰  0\n⊒ cos x ^ n - sin x ^ n = 1 ↔\n (βˆƒ k, ↑k * Ο€ = x) ∧ Even n ∨ (βˆƒ k, ↑k * (2 * Ο€) = x) ∧ Odd n ∨ (βˆƒ k, -(Ο€ / 2) + ↑k * (2 * Ο€) = x) ∧ Odd n", "after_state": "case mp\nn : β„•\nx : ℝ\nhβ‚€ : n β‰  0\n⊒ cos x ^ n - sin x ^ n = 1 β†’\n (βˆƒ k, ↑...
theorem solve_cos2_half {x : ℝ} : cos x ^ 2 = 1 / 2 ↔ βˆƒ k : β„€, x = (2 * ↑k + 1) * Ο€ / 4 := by rw [cos_sq] simp only [add_eq_left] simp only [div_eq_zero_iff] norm_num rw [cos_eq_zero_iff] constructor <;> Β· rintro ⟨k, h⟩ use k linarith
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo1962Q4.lean
{ "open": [ "Real", "scoped Real" ], "variables": [] }
[ { "line": "rw [cos_sq]", "before_state": "x : ℝ\n⊒ cos x ^ 2 = 1 / 2 ↔ βˆƒ k, x = (2 * ↑k + 1) * Ο€ / 4", "after_state": "x : ℝ\n⊒ 1 / 2 + cos (2 * x) / 2 = 1 / 2 ↔ βˆƒ k, x = (2 * ↑k + 1) * Ο€ / 4" }, { "line": "rewrite [cos_sq]", "before_state": "x : ℝ\n⊒ cos x ^ 2 = 1 / 2 ↔ βˆƒ k, x = (2 * ↑k + 1...
theorem solve_cos3x_0 {x : ℝ} : cos (3 * x) = 0 ↔ βˆƒ k : β„€, x = (2 * ↑k + 1) * Ο€ / 6 := by rw [cos_eq_zero_iff] refine exists_congr fun k => ?_ constructor <;> intro <;> linarith
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo1962Q4.lean
{ "open": [ "Real", "scoped Real" ], "variables": [] }
[ { "line": "rw [cos_eq_zero_iff]", "before_state": "x : ℝ\n⊒ cos (3 * x) = 0 ↔ βˆƒ k, x = (2 * ↑k + 1) * Ο€ / 6", "after_state": "x : ℝ\n⊒ (βˆƒ k, 3 * x = (2 * ↑k + 1) * Ο€ / 2) ↔ βˆƒ k, x = (2 * ↑k + 1) * Ο€ / 6" }, { "line": "rewrite [cos_eq_zero_iff]", "before_state": "x : ℝ\n⊒ cos (3 * x) = 0 ↔ βˆƒ ...
theorem formula {R : Type*} [CommRing R] [IsDomain R] [CharZero R] (a : R) : a ^ 2 + ((2 : R) * a ^ 2 - (1 : R)) ^ 2 + ((4 : R) * a ^ 3 - 3 * a) ^ 2 = 1 ↔ ((2 : R) * a ^ 2 - (1 : R)) * ((4 : R) * a ^ 3 - 3 * a) = 0 := by constructor <;> intro h Β· apply pow_eq_zero (n := 2) apply mul_left_injectiveβ‚€ (b...
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo1962Q4.lean
{ "open": [ "Real", "scoped Real", "Imo1962Q4" ], "variables": [] }
[ { "line": "focus\n constructor\n with_annotate_state\"<;>\" skip\n all_goals intro h", "before_state": "R : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : CharZero R\na : R\n⊒ a ^ 2 + (2 * a ^ 2 - 1) ^ 2 + (4 * a ^ 3 - 3 * a) ^ 2 = 1 ↔ (2 * a ^ 2 - 1) * (4 * a ^ 3 - 3 * a) = 0", "after_s...
theorem solve_cos2x_0 {x : ℝ} : cos (2 * x) = 0 ↔ βˆƒ k : β„€, x = (2 * ↑k + 1) * Ο€ / 4 := by rw [cos_eq_zero_iff] refine exists_congr fun k => ?_ constructor <;> intro <;> linarith
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo1962Q4.lean
{ "open": [ "Real", "scoped Real", "Imo1962Q4" ], "variables": [] }
[ { "line": "rw [cos_eq_zero_iff]", "before_state": "x : ℝ\n⊒ cos (2 * x) = 0 ↔ βˆƒ k, x = (2 * ↑k + 1) * Ο€ / 4", "after_state": "x : ℝ\n⊒ (βˆƒ k, 2 * x = (2 * ↑k + 1) * Ο€ / 2) ↔ βˆƒ k, x = (2 * ↑k + 1) * Ο€ / 4" }, { "line": "rewrite [cos_eq_zero_iff]", "before_state": "x : ℝ\n⊒ cos (2 * x) = 0 ↔ βˆƒ ...
lemma two_sin_pi_div_seven_ne_zero : 2 * sin (Ο€ / 7) β‰  0 := by apply mul_ne_zero two_ne_zero (Real.sin_pos_of_pos_of_lt_pi _ _).ne' <;> linarith [pi_pos]
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo1963Q5.lean
{ "open": [ "Real" ], "variables": [] }
[ { "line": "focus\n apply mul_ne_zero two_ne_zero (Real.sin_pos_of_pos_of_lt_pi _ _).ne'\n with_annotate_state\"<;>\" skip\n all_goals linarith [pi_pos]", "before_state": "⊒ 2 * sin (Ο€ / 7) β‰  0", "after_state": "No Goals!" }, { "line": "apply mul_ne_zero two_ne_zero (Real.sin_pos_of_pos_of_lt_...
lemma sin_pi_mul_neg_div (a b : ℝ) : sin (Ο€ * (- a / b)) = - sin (Ο€ * (a / b)) := by ring_nf exact sin_neg _
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo1963Q5.lean
{ "open": [ "Real" ], "variables": [] }
[ { "line": "ring_nf", "before_state": "a b : ℝ\n⊒ sin (Ο€ * (-a / b)) = -sin (Ο€ * (a / b))", "after_state": "a b : ℝ\n⊒ sin (-(Ο€ * a * b⁻¹)) = -sin (Ο€ * a * b⁻¹)" }, { "line": "exact sin_neg _", "before_state": "a b : ℝ\n⊒ sin (-(Ο€ * a * b⁻¹)) = -sin (Ο€ * a * b⁻¹)", "after_state": "No Goal...
theorem two_pow_mod_seven (n : β„•) : 2 ^ n ≑ 2 ^ (n % 3) [MOD 7] := let t := n % 3 calc 2 ^ n = 2 ^ (3 * (n / 3) + t) := by rw [Nat.div_add_mod] _ = (2 ^ 3) ^ (n / 3) * 2 ^ t := by rw [pow_add, pow_mul] _ ≑ 1 ^ (n / 3) * 2 ^ t [MOD 7] := by gcongr; decide _ = 2 ^ t := by ring
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo1964Q1.lean
{ "open": [ "Nat" ], "variables": [] }
[ { "line": "rw [Nat.div_add_mod]", "before_state": "n : β„•\nt : β„• := n % 3\n⊒ 2 ^ n = 2 ^ (3 * (n / 3) + t)", "after_state": "No Goals!" }, { "line": "rewrite [Nat.div_add_mod]", "before_state": "n : β„•\nt : β„• := n % 3\n⊒ 2 ^ n = 2 ^ (3 * (n / 3) + t)", "after_state": "n : β„•\nt : β„• := n % 3...
theorem imo1964_q1a (n : β„•) (_ : 0 < n) : 7 ∣ 2 ^ n - 1 ↔ 3 ∣ n := by let t := n % 3 have : t < 3 := Nat.mod_lt _ (by decide) calc 7 ∣ 2 ^ n - 1 ↔ 2 ^ n ≑ 1 [MOD 7] := by rw [Nat.ModEq.comm] rw [Nat.modEq_iff_dvd'] apply Nat.one_le_pow' _ ↔ 2 ^ t ≑ 1 [MOD 7] := ⟨(two_pow_mod_seven n).s...
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo1964Q1.lean
{ "open": [ "Nat", "Imo1964Q1" ], "variables": [] }
[ { "line": "let t := n % 3", "before_state": "n : β„•\nx✝ : 0 < n\n⊒ 7 ∣ 2 ^ n - 1 ↔ 3 ∣ n", "after_state": "n : β„•\nx✝ : 0 < n\nt : β„• := n % 3\n⊒ 7 ∣ 2 ^ n - 1 ↔ 3 ∣ n" }, { "line": "refine_lift\n let t := n % 3;\n ?_", "before_state": "n : β„•\nx✝ : 0 < n\n⊒ 7 ∣ 2 ^ n - 1 ↔ 3 ∣ n", "after_...
theorem imo1964_q1b (n : β„•) : Β¬7 ∣ 2 ^ n + 1 := by intro h let t := n % 3 have : t < 3 := Nat.mod_lt _ (by decide) have H : 2 ^ t + 1 ≑ 0 [MOD 7] := calc 2 ^ t + 1 ≑ 2 ^ n + 1 [MOD 7] := by gcongr ?_ + 1; exact (two_pow_mod_seven n).symm _ ≑ 0 [MOD 7] := h.modEq_zero_nat interval_cases t <;> contrad...
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo1964Q1.lean
{ "open": [ "Nat", "Imo1964Q1" ], "variables": [] }
[ { "line": "intro h", "before_state": "n : β„•\n⊒ Β¬7 ∣ 2 ^ n + 1", "after_state": "n : β„•\nh : 7 ∣ 2 ^ n + 1\n⊒ False" }, { "line": "let t := n % 3", "before_state": "n : β„•\nh : 7 ∣ 2 ^ n + 1\n⊒ False", "after_state": "n : β„•\nh : 7 ∣ 2 ^ n + 1\nt : β„• := n % 3\n⊒ False" }, { "line": "...
theorem left_factor_large {m : β„€} (n : β„€) (h : 1 < m) : 1 < (n - m) ^ 2 + m ^ 2 := by nlinarith
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo1969Q1.lean
{ "open": [ "Int Nat" ], "variables": [] }
[ { "line": "nlinarith", "before_state": "m n : β„€\nh : 1 < m\n⊒ 1 < (n - m) ^ 2 + m ^ 2", "after_state": "No Goals!" }, { "line": "ring1", "before_state": "m n : β„€\nh : 1 < m\na✝ : 1 β‰₯ (n - m) ^ 2 + m ^ 2\n⊒ 3 * -1 + (0 - (n - m) ^ 2) + 4 * (1 + 1 - m) + ((n - m) ^ 2 + m ^ 2 - 1) + (0 - (1 + 1...
theorem right_factor_large {m : β„€} (n : β„€) (h : 1 < m) : 1 < (n + m) ^ 2 + m ^ 2 := by nlinarith
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo1969Q1.lean
{ "open": [ "Int Nat" ], "variables": [] }
[ { "line": "nlinarith", "before_state": "m n : β„€\nh : 1 < m\n⊒ 1 < (n + m) ^ 2 + m ^ 2", "after_state": "No Goals!" }, { "line": "ring1", "before_state": "m n : β„€\nh : 1 < m\na✝ : 1 β‰₯ (n + m) ^ 2 + m ^ 2\n⊒ 3 * -1 + (0 - (n + m) ^ 2) + 4 * (1 + 1 - m) + ((n + m) ^ 2 + m ^ 2 - 1) + (0 - (1 + 1...
theorem int_large {m : β„€} (h : 1 < m) : 1 < m.natAbs := by exact_mod_cast lt_of_lt_of_le h le_natAbs
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo1969Q1.lean
{ "open": [ "Int Nat" ], "variables": [] }
[ { "line": "exact_mod_cast lt_of_lt_of_le h le_natAbs", "before_state": "m : β„€\nh : 1 < m\n⊒ 1 < m.natAbs", "after_state": "No Goals!" }, { "line": "exact mod_cast (lt_of_lt_of_le h le_natAbs : _)", "before_state": "m : β„€\nh : 1 < m\n⊒ 1 < m.natAbs", "after_state": "No Goals!" } ]
theorem polynomial_not_prime {m : β„•} (h1 : 1 < m) (n : β„•) : Β¬Nat.Prime (n ^ 4 + 4 * m ^ 4) := by have h2 : 1 < (m : β„€) := Int.ofNat_lt.mpr h1 refine not_prime_of_int_mul' (left_factor_large (n : β„€) h2) (right_factor_large (n : β„€) h2) ?_ apply factorization
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo1969Q1.lean
{ "open": [ "Int Nat" ], "variables": [] }
[ { "line": "have h2 : 1 < (m : β„€) := Int.ofNat_lt.mpr h1", "before_state": "m : β„•\nh1 : 1 < m\nn : β„•\n⊒ Β¬Nat.Prime (n ^ 4 + 4 * m ^ 4)", "after_state": "m : β„•\nh1 : 1 < m\nn : β„•\nh2 : 1 < ↑m\n⊒ Β¬Nat.Prime (n ^ 4 + 4 * m ^ 4)" }, { "line": "refine_lift\n have h2 : 1 < (m : β„€) := Int.ofNat_lt.mpr ...
theorem bound (ha : 0 < a) (hb : 0 < b) (hc : 0 < c) : a ^ 4 / (a ^ 4 + b ^ 4 + c ^ 4) ≀ a ^ 3 / sqrt ((a ^ 3) ^ 2 + ↑8 * b ^ 3 * c ^ 3) := by rw [div_le_div_iffβ‚€ (by positivity) (by positivity)] calc a ^ 4 * sqrt ((a ^ 3) ^ 2 + (8:ℝ) * b ^ 3 * c ^ 3) = a ^ 3 * (a * sqrt ((a ^ 3) ^ 2 + (8:ℝ) * b ^ 3 * c ^...
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo2001Q2.lean
{ "open": [ "Real" ], "variables": [ "{a b c : ℝ}" ] }
[ { "line": "rw [div_le_div_iffβ‚€ (by positivity) (by positivity)]", "before_state": "a b c : ℝ\nha : 0 < a\nhb : 0 < b\nhc : 0 < c\n⊒ a ^ 4 / (a ^ 4 + b ^ 4 + c ^ 4) ≀ a ^ 3 / √((a ^ 3) ^ 2 + 8 * b ^ 3 * c ^ 3)", "after_state": "a b c : ℝ\nha : 0 < a\nhb : 0 < b\nhc : 0 < c\n⊒ a ^ 4 * √((a ^ 3) ^ 2 + 8 * ...
theorem imo2001_q6 (hd : 0 < d) (hdc : d < c) (hcb : c < b) (hba : b < a) (h : a * c + b * d = (a + b - c + d) * (-a + b + c + d)) : Β¬Prime (a * b + c * d) := by intro (h0 : Prime (a * b + c * d)) have ha : 0 < a := by omega have hb : 0 < b := by omega have hc : 0 < c := by omega -- the key step is to sho...
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo2001Q6.lean
{ "open": [], "variables": [ "{a b c d : β„€}" ] }
[ { "line": "intro (h0 : Prime (a * b + c * d))", "before_state": "a b c d : β„€\nhd : 0 < d\nhdc : d < c\nhcb : c < b\nhba : b < a\nh : a * c + b * d = (a + b - c + d) * (-a + b + c + d)\n⊒ Β¬Prime (a * b + c * d)", "after_state": "a b c d : β„€\nhd : 0 < d\nhdc : d < c\nhcb : c < b\nhba : b < a\nh : a * c + ...
theorem key_insight (x y z : ℝ) (hx : x > 0) (hy : y > 0) (hz : z > 0) (h : x * y * z β‰₯ 1) : (x ^ 5 - x ^ 2) / (x ^ 5 + y ^ 2 + z ^ 2) β‰₯ (x ^ 2 - y * z) / (x ^ 2 + y ^ 2 + z ^ 2) := by have key : (x ^ 5 - x ^ 2) / (x ^ 5 + y ^ 2 + z ^ 2) - (x ^ 5 - x ^ 2 * 1) / (x ^ 3 * (x ^ 2 + y ^ 2 + z ^ 2)) = ...
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo2005Q3.lean
{ "open": [], "variables": [] }
[ { "line": "have key :\n (x ^ 5 - x ^ 2) / (x ^ 5 + y ^ 2 + z ^ 2) - (x ^ 5 - x ^ 2 * 1) / (x ^ 3 * (x ^ 2 + y ^ 2 + z ^ 2)) =\n (x ^ 3 - 1) ^ 2 * x ^ 2 * (y ^ 2 + z ^ 2) / ((x ^ 5 + y ^ 2 + z ^ 2) * (x ^ 3 * (x ^ 2 + y ^ 2 + z ^ 2))) :=\n by\n field_simp\n ring", "before_state": "x y z : ℝ\nhx : x > ...
theorem imo2005_q3 (x y z : ℝ) (hx : x > 0) (hy : y > 0) (hz : z > 0) (h : x * y * z β‰₯ 1) : (x ^ 5 - x ^ 2) / (x ^ 5 + y ^ 2 + z ^ 2) + (y ^ 5 - y ^ 2) / (y ^ 5 + z ^ 2 + x ^ 2) + (z ^ 5 - z ^ 2) / (z ^ 5 + x ^ 2 + y ^ 2) β‰₯ 0 := by calc (x ^ 5 - x ^ 2) / (x ^ 5 + y ^ 2 + z ^ 2) + (y ^ 5 - y ^ 2)...
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo2005Q3.lean
{ "open": [ "Imo2005Q3" ], "variables": [] }
[ { "line": "calc\n (x ^ 5 - x ^ 2) / (x ^ 5 + y ^ 2 + z ^ 2) + (y ^ 5 - y ^ 2) / (y ^ 5 + z ^ 2 + x ^ 2) +\n (z ^ 5 - z ^ 2) / (z ^ 5 + x ^ 2 + y ^ 2) β‰₯\n (x ^ 2 - y * z) / (x ^ 2 + y ^ 2 + z ^ 2) + (y ^ 2 - z * x) / (y ^ 2 + z ^ 2 + x ^ 2) +\n (z ^ 2 - x * y) / (z ^ 2 + x ^ 2 + y ^ 2) :=\n ...
theorem lhs_ineq {x y : ℝ} (hxy : 0 ≀ x * y) : 16 * x ^ 2 * y ^ 2 * (x + y) ^ 2 ≀ ((x + y) ^ 2) ^ 3 := by have : (x - y) ^ 2 * ((x + y) ^ 2 + 4 * (x * y)) β‰₯ 0 := by positivity calc 16 * x ^ 2 * y ^ 2 * (x + y) ^ 2 ≀ ((x + y) ^ 2) ^ 2 * (x + y) ^ 2 := by gcongr; linarith _ = ((x + y) ^ 2) ^ 3 := by ring
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo2006Q3.lean
{ "open": [ "Real" ], "variables": [] }
[ { "line": "have : (x - y) ^ 2 * ((x + y) ^ 2 + 4 * (x * y)) β‰₯ 0 := by positivity", "before_state": "x y : ℝ\nhxy : 0 ≀ x * y\n⊒ 16 * x ^ 2 * y ^ 2 * (x + y) ^ 2 ≀ ((x + y) ^ 2) ^ 3", "after_state": "x y : ℝ\nhxy : 0 ≀ x * y\nthis : (x - y) ^ 2 * ((x + y) ^ 2 + 4 * (x * y)) β‰₯ 0\n⊒ 16 * x ^ 2 * y ^ 2 * (x...
theorem four_pow_four_pos : (0 : ℝ) < 4 ^ 4 := by norm_num
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo2006Q3.lean
{ "open": [ "Real" ], "variables": [] }
[ { "line": "norm_num", "before_state": "⊒ 0 < 4 ^ 4", "after_state": "No Goals!" } ]
theorem rhs_ineq {x y : ℝ} : 3 * (x + y) ^ 2 ≀ 2 * (x ^ 2 + y ^ 2 + (x + y) ^ 2) := by have : 0 ≀ (x - y) ^ 2 := by positivity linarith
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo2006Q3.lean
{ "open": [ "Real" ], "variables": [] }
[ { "line": "have : 0 ≀ (x - y) ^ 2 := by positivity", "before_state": "x y : ℝ\n⊒ 3 * (x + y) ^ 2 ≀ 2 * (x ^ 2 + y ^ 2 + (x + y) ^ 2)", "after_state": "x y : ℝ\nthis : 0 ≀ (x - y) ^ 2\n⊒ 3 * (x + y) ^ 2 ≀ 2 * (x ^ 2 + y ^ 2 + (x + y) ^ 2)" }, { "line": "focus\n refine\n no_implicit_lambda%\n ...
theorem zero_lt_32 : (0 : ℝ) < 32 := by norm_num
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo2006Q3.lean
{ "open": [ "Real" ], "variables": [] }
[ { "line": "norm_num", "before_state": "⊒ 0 < 32", "after_state": "No Goals!" } ]
theorem subst_wlog {x y z s : ℝ} (hxy : 0 ≀ x * y) (hxyz : x + y + z = 0) : 32 * |x * y * z * s| ≀ sqrt 2 * (x ^ 2 + y ^ 2 + z ^ 2 + s ^ 2) ^ 2 := by have hz : (x + y) ^ 2 = z ^ 2 := by linear_combination (x + y - z) * hxyz have this := calc 2 * s ^ 2 * (16 * x ^ 2 * y ^ 2 * (x + y) ^ 2) ≀ _ *...
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo2006Q3.lean
{ "open": [ "Real" ], "variables": [] }
[ { "line": "have hz : (x + y) ^ 2 = z ^ 2 := by linear_combination (x + y - z) * hxyz", "before_state": "x y z s : ℝ\nhxy : 0 ≀ x * y\nhxyz : x + y + z = 0\n⊒ 32 * |x * y * z * s| ≀ √2 * (x ^ 2 + y ^ 2 + z ^ 2 + s ^ 2) ^ 2", "after_state": "x y z s : ℝ\nhxy : 0 ≀ x * y\nhxyz : x + y + z = 0\nhz : (x + y)...
theorem subst_proof₁ (x y z s : ℝ) (hxyz : x + y + z = 0) : |x * y * z * s| ≀ sqrt 2 / 32 * (x ^ 2 + y ^ 2 + z ^ 2 + s ^ 2) ^ 2 := by wlog h' : 0 ≀ x * y generalizing x y z; swap Β· rw [div_mul_eq_mul_div, le_div_iffβ‚€' zero_lt_32] exact subst_wlog h' hxyz rcases (mul_nonneg_of_three x y z).resolve_left h' ...
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo2006Q3.lean
{ "open": [ "Real" ], "variables": [] }
[ { "line": "wlog h' : 0 ≀ x * y generalizing x y z", "before_state": "x y z s : ℝ\nhxyz : x + y + z = 0\n⊒ |x * y * z * s| ≀ √2 / 32 * (x ^ 2 + y ^ 2 + z ^ 2 + s ^ 2) ^ 2", "after_state": "case inr\nx y z s : ℝ\nhxyz : x + y + z = 0\nthis : βˆ€ (x y z : ℝ), x + y + z = 0 β†’ 0 ≀ x * y β†’ |x * y * z * s| ≀ √2 ...
theorem proofβ‚‚ (M : ℝ) (h : βˆ€ a b c : ℝ, |a * b * (a ^ 2 - b ^ 2) + b * c * (b ^ 2 - c ^ 2) + c * a * (c ^ 2 - a ^ 2)| ≀ M * (a ^ 2 + b ^ 2 + c ^ 2) ^ 2) : 9 * sqrt 2 / 32 ≀ M := by set Ξ± := sqrt (2:ℝ) have hΞ± : Ξ± ^ 2 = 2 := sq_sqrt (by norm_num) let a := 2 - 3 * Ξ± let c := 2 + 3 * Ξ± cal...
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo2006Q3.lean
{ "open": [ "Real" ], "variables": [] }
[ { "line": "set Ξ± := sqrt (2 : ℝ)", "before_state": "M : ℝ\nh :\n βˆ€ (a b c : ℝ),\n |a * b * (a ^ 2 - b ^ 2) + b * c * (b ^ 2 - c ^ 2) + c * a * (c ^ 2 - a ^ 2)| ≀ M * (a ^ 2 + b ^ 2 + c ^ 2) ^ 2\n⊒ 9 * √2 / 32 ≀ M", "after_state": "M : ℝ\nh :\n βˆ€ (a b c : ℝ),\n |a * b * (a ^ 2 - b ^ 2) + b * c * ...
theorem subst_abc {x y z : ℝ} (h : x * y * z = 1) : βˆƒ a b c : ℝ, a β‰  0 ∧ b β‰  0 ∧ c β‰  0 ∧ x = a / b ∧ y = b / c ∧ z = c / a := by use x, 1, 1 / y obtain ⟨⟨hx, hy⟩, _⟩ : (x β‰  0 ∧ y β‰  0) ∧ z β‰  0 := by have := h.symm β–Έ one_ne_zero simpa [not_or] using this have : z * (y * x) = 1 := by rw [← h]; ac_rfl f...
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo2008Q2.lean
{ "open": [], "variables": [] }
[ { "line": "use x, 1, 1 / y", "before_state": "x y z : ℝ\nh : x * y * z = 1\n⊒ βˆƒ a b c, a β‰  0 ∧ b β‰  0 ∧ c β‰  0 ∧ x = a / b ∧ y = b / c ∧ z = c / a", "after_state": "case h\nx y z : ℝ\nh : x * y * z = 1\n⊒ x β‰  0 ∧ 1 β‰  0 ∧ 1 / y β‰  0 ∧ x = x / 1 ∧ y = 1 / (1 / y) ∧ z = 1 / y / x" }, { "line": "refine...
theorem imo2008_q2a (x y z : ℝ) (h : x * y * z = 1) (hx : x β‰  1) (hy : y β‰  1) (hz : z β‰  1) : x ^ 2 / (x - 1) ^ 2 + y ^ 2 / (y - 1) ^ 2 + z ^ 2 / (z - 1) ^ 2 β‰₯ 1 := by obtain ⟨a, b, c, ha, hb, hc, rfl, rfl, rfl⟩ := subst_abc h obtain ⟨m, n, rfl, rfl⟩ : βˆƒ m n, b = c - m ∧ a = c - m - n := by use c - b, b - a; sim...
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo2008Q2.lean
{ "open": [], "variables": [] }
[ { "line": "obtain ⟨a, b, c, ha, hb, hc, rfl, rfl, rfl⟩ := subst_abc h", "before_state": "x y z : ℝ\nh : x * y * z = 1\nhx : x β‰  1\nhy : y β‰  1\nhz : z β‰  1\n⊒ x ^ 2 / (x - 1) ^ 2 + y ^ 2 / (y - 1) ^ 2 + z ^ 2 / (z - 1) ^ 2 β‰₯ 1", "after_state": "No Goals!" } ]
theorem abs_eq_one_of_pow_eq_one (x : ℝ) (n : β„•) (hn : n β‰  0) (h : x ^ n = 1) : |x| = 1 := by rw [← pow_left_injβ‚€ (abs_nonneg x) zero_le_one hn] rw [one_pow] rw [pow_abs] rw [h] rw [abs_one]
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo2008Q4.lean
{ "open": [ "Real" ], "variables": [] }
[ { "line": "rw [← pow_left_injβ‚€ (abs_nonneg x) zero_le_one hn]", "before_state": "x : ℝ\nn : β„•\nhn : n β‰  0\nh : x ^ n = 1\n⊒ |x| = 1", "after_state": "x : ℝ\nn : β„•\nhn : n β‰  0\nh : x ^ n = 1\n⊒ |x| ^ n = 1 ^ n" }, { "line": "rewrite [← pow_left_injβ‚€ (abs_nonneg x) zero_le_one hn]", "before_st...
theorem imo2011_q3 (f : ℝ β†’ ℝ) (hf : βˆ€ x y, f (x + y) ≀ y * f x + f (f x)) : βˆ€ x ≀ 0, f x = 0 := by -- reparameterize have hxt : βˆ€ x t, f t ≀ t * f x - x * f x + f (f x) := fun x t => calc f t = f (x + (t - x)) := by rw [add_eq_of_eq_sub' rfl] _ ≀ (t - x) * f x + f (f x) := hf x (t - x) _ = t ...
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo2011Q3.lean
{ "open": [], "variables": [] }
[ { "line": "have hxt : βˆ€ x t, f t ≀ t * f x - x * f x + f (f x) := fun x t =>\n calc\n f t = f (x + (t - x)) := by rw [add_eq_of_eq_sub' rfl]\n _ ≀ (t - x) * f x + f (f x) := (hf x (t - x))\n _ = t * f x - x * f x + f (f x) := by rw [sub_mul]", "before_state": "f : ℝ β†’ ℝ\nhf : βˆ€ (x y : ℝ), f (x + y...
theorem imo2011_q5 (f : β„€ β†’ β„€) (hpos : βˆ€ n : β„€, 0 < f n) (hdvd : βˆ€ m n : β„€, f (m - n) ∣ f m - f n) : βˆ€ m n : β„€, f m ≀ f n β†’ f m ∣ f n := by intro m n h_fm_le_fn rcases lt_or_eq_of_le h_fm_le_fn with h_fm_lt_fn | h_fm_eq_fn Β· -- m < n let d := f m - f (m - n) have h_fn_dvd_d : f n ∣ d := by rw [←...
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo2011Q5.lean
{ "open": [ "Int" ], "variables": [] }
[ { "line": "intro m n h_fm_le_fn", "before_state": "f : β„€ β†’ β„€\nhpos : βˆ€ (n : β„€), 0 < f n\nhdvd : βˆ€ (m n : β„€), f (m - n) ∣ f m - f n\n⊒ βˆ€ (m n : β„€), f m ≀ f n β†’ f m ∣ f n", "after_state": "f : β„€ β†’ β„€\nhpos : βˆ€ (n : β„€), 0 < f n\nhdvd : βˆ€ (m n : β„€), f (m - n) ∣ f m - f n\nm n : β„€\nh_fm_le_fn : f m ≀ f n\n⊒ f...
theorem imo2020_q2 (a b c d : ℝ) (hd0 : 0 < d) (hdc : d ≀ c) (hcb : c ≀ b) (hba : b ≀ a) (h1 : a + b + c + d = 1) : (a + 2 * b + 3 * c + 4 * d) * a ^ a * b ^ b * c ^ c * d ^ d < 1 := by have hp : a ^ a * b ^ b * c ^ c * d ^ d ≀ a * a + b * b + c * c + d * d := by refine geom_mean_le_arith_mean4_weighted ?_ ?_...
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo2020Q2.lean
{ "open": [ "Real" ], "variables": [] }
[ { "line": "have hp : a ^ a * b ^ b * c ^ c * d ^ d ≀ a * a + b * b + c * c + d * d := by\n refine geom_mean_le_arith_mean4_weighted ?_ ?_ ?_ ?_ ?_ ?_ ?_ ?_ h1 <;> linarith", "before_state": "a b c d : ℝ\nhd0 : 0 < d\nhdc : d ≀ c\nhcb : c ≀ b\nhba : b ≀ a\nh1 : a + b + c + d = 1\n⊒ (a + 2 * b + 3 * c + 4 * ...
theorem sqrt_two_mul_sub_one_le_one : sqrt (2 * x - 1) ≀ 1 ↔ x ≀ 1 := by simp [sqrt_le_iff, ← two_mul]
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo1959Q2.lean
{ "open": [ "Set Real" ], "variables": [ "{x A : ℝ}" ] }
[ { "line": "simp [sqrt_le_iff, ← two_mul]", "before_state": "x : ℝ\n⊒ √(2 * x - 1) ≀ 1 ↔ x ≀ 1", "after_state": "No Goals!" } ]
private lemma helper_5_digits {c : β„€} (hc : 6 * 10 ^ 5 + c = 4 * (10 * c + 6)) : c = 15384 := by omega
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo1962Q1.lean
{ "open": [ "Nat" ], "variables": [] }
[ { "line": "omega", "before_state": "c : β„€\nhc : 6 * 10 ^ 5 + c = 4 * (10 * c + 6)\n⊒ c = 15384", "after_state": "No Goals!" } ]
theorem imo1972_q5 (f g : ℝ β†’ ℝ) (hf1 : βˆ€ x, βˆ€ y, f (x + y) + f (x - y) = 2 * f x * g y) (hf2 : βˆ€ y, β€–f yβ€– ≀ 1) (hf3 : βˆƒ x, f x β‰  0) (y : ℝ) : β€–g yβ€– ≀ 1 := by -- Suppose the conclusion does not hold. by_contra! hneg set S := Set.range fun x => β€–f xβ€– -- Introduce `k`, the supremum of `f`. let k : ℝ := sSup...
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo1972Q5.lean
{ "open": [], "variables": [] }
[ { "line": "by_contra! hneg", "before_state": "f g : ℝ β†’ ℝ\nhf1 : βˆ€ (x y : ℝ), f (x + y) + f (x - y) = 2 * f x * g y\nhf2 : βˆ€ (y : ℝ), β€–f yβ€– ≀ 1\nhf3 : βˆƒ x, f x β‰  0\ny : ℝ\n⊒ β€–g yβ€– ≀ 1", "after_state": "f g : ℝ β†’ ℝ\nhf1 : βˆ€ (x y : ℝ), f (x + y) + f (x - y) = 2 * f x * g y\nhf2 : βˆ€ (y : ℝ), β€–f yβ€– ≀ 1\nhf3...
theorem imo1972_q5' (f g : ℝ β†’ ℝ) (hf1 : βˆ€ x, βˆ€ y, f (x + y) + f (x - y) = 2 * f x * g y) (hf2 : BddAbove (Set.range fun x => β€–f xβ€–)) (hf3 : βˆƒ x, f x β‰  0) (y : ℝ) : β€–g yβ€– ≀ 1 := by obtain ⟨x, hx⟩ := hf3 set k := ⨆ x, β€–f xβ€– have h : βˆ€ x, β€–f xβ€– ≀ k := le_ciSup hf2 by_contra! H have hgy : 0 < β€–g yβ€– := by lin...
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo1972Q5.lean
{ "open": [], "variables": [] }
[ { "line": "obtain ⟨x, hx⟩ := hf3", "before_state": "f g : ℝ β†’ ℝ\nhf1 : βˆ€ (x y : ℝ), f (x + y) + f (x - y) = 2 * f x * g y\nhf2 : BddAbove (Set.range fun x => β€–f xβ€–)\nhf3 : βˆƒ x, f x β‰  0\ny : ℝ\n⊒ β€–g yβ€– ≀ 1", "after_state": "case intro\nf g : ℝ β†’ ℝ\nhf1 : βˆ€ (x y : ℝ), f (x + y) + f (x - y) = 2 * f x * g y...
theorem imo1977_q6_nat (f : β„• β†’ β„•) (h : βˆ€ n, f (f n) < f (n + 1)) : βˆ€ n, f n = n := by have h' : βˆ€ k n : β„•, k ≀ n β†’ k ≀ f n := by intro k induction' k with k h_ind Β· intros; exact Nat.zero_le _ Β· intro n hk apply Nat.succ_le_of_lt calc k ≀ f (f (n - 1)) := h_ind _ (h_ind (n - 1) (l...
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo1977Q6.lean
{ "open": [], "variables": [] }
[ { "line": "have h' : βˆ€ k n : β„•, k ≀ n β†’ k ≀ f n := by\n intro k\n induction' k with k h_ind\n Β· intros; exact Nat.zero_le _\n Β· intro n hk\n apply Nat.succ_le_of_lt\n calc\n k ≀ f (f (n - 1)) := h_ind _ (h_ind (n - 1) (le_tsub_of_add_le_right hk))\n _ < f n := tsub_add_cancel_of_le (le_trans...
lemma le_avg : βˆ‘ k ∈ range (n + 1), x k ≀ (βˆ‘ k ∈ range n, x k) * (1 + 1 / n) := by rw [sum_range_succ] rw [mul_one_add] rw [add_le_add_iff_left] rw [mul_one_div] rw [le_div_iffβ‚€ (mod_cast hn.bot_lt)] rw [mul_comm] rw [← nsmul_eq_mul] conv_lhs => rw [← card_range n, ← sum_const] refine sum_le_sum fun k...
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo1982Q3.lean
{ "open": [ "Finset NNReal" ], "variables": [ "{x : β„• β†’ ℝ} {n : β„•} (hn : n β‰  0) (hx : Antitone x)" ] }
[ { "line": "rw [sum_range_succ]", "before_state": "x : β„• β†’ ℝ\nn : β„•\n⊒ βˆ‘ k ∈ range (n + 1), x k ≀ (βˆ‘ k ∈ range n, x k) * (1 + 1 / ↑n)", "after_state": "x : β„• β†’ ℝ\nn : β„•\n⊒ βˆ‘ x_1 ∈ range n, x x_1 + x n ≀ (βˆ‘ k ∈ range n, x k) * (1 + 1 / ↑n)" }, { "line": "rewrite [sum_range_succ]", "before_stat...
lemma ineq (h0 : x 0 = 1) (hp : βˆ€ k, 0 < x k) : 4 * n / (n + 1) ≀ βˆ‘ k ∈ range (n + 1), x k ^ 2 / x (k + 1) := by calc -- We first use AM-GM. _ ≀ (βˆ‘ k ∈ range n, x (k + 1) + 1) ^ 2 / (βˆ‘ k ∈ range n, x (k + 1)) * n / (n + 1) := by gcongr rw [le_div_iffβ‚€] Β· simpa using four_mul_le_sq_add (βˆ‘...
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo1982Q3.lean
{ "open": [ "Finset NNReal" ], "variables": [ "{x : β„• β†’ ℝ} {n : β„•} (hn : n β‰  0) (hx : Antitone x)" ] }
[ { "line": "calc\n -- We first use AM-GM.\n _ ≀ (βˆ‘ k ∈ range n, x (k + 1) + 1) ^ 2 / (βˆ‘ k ∈ range n, x (k + 1)) * n / (n + 1) :=\n by\n gcongr\n rw [le_div_iffβ‚€]\n Β· simpa using four_mul_le_sq_add (βˆ‘ k ∈ range n, x (k + 1)) 1\n Β·\n exact\n sum_pos (fun k _ ↦ hp _)\n (nonempt...
theorem imo1982_q3a (hx : Antitone x) (h0 : x 0 = 1) (hp : βˆ€ k, 0 < x k) : βˆƒ n : β„•, 3.999 ≀ βˆ‘ k ∈ range n, (x k) ^ 2 / x (k + 1) := by use 4000 convert Imo1982Q3.ineq (Nat.succ_ne_zero 3998) hx h0 hp norm_num
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo1982Q3.lean
{ "open": [ "Finset NNReal" ], "variables": [ "{x : β„• β†’ ℝ} {n : β„•} (hn : n β‰  0) (hx : Antitone x)" ] }
[ { "line": "use 4000", "before_state": "x : β„• β†’ ℝ\nhx : Antitone x\nh0 : x 0 = 1\nhp : βˆ€ (k : β„•), 0 < x k\n⊒ βˆƒ n, 3.999 ≀ βˆ‘ k ∈ range n, x k ^ 2 / x (k + 1)", "after_state": "case h\nx : β„• β†’ ℝ\nhx : Antitone x\nh0 : x 0 = 1\nhp : βˆ€ (k : β„•), 0 < x k\n⊒ 3.999 ≀ βˆ‘ k ∈ range 4000, x k ^ 2 / x (k + 1)" }, ...
theorem imo1982_q3b : βˆƒ x : β„• β†’ ℝ, Antitone x ∧ x 0 = 1 ∧ (βˆ€ k, 0 < x k) ∧ βˆ€ n, βˆ‘ k ∈ range n, x k ^ 2 / x (k + 1) < 4 := by refine ⟨fun k ↦ 2⁻¹ ^ k, ?_, pow_zero _, ?_, fun n ↦ ?_⟩ Β· apply (pow_right_strictAntiβ‚€ _ _).antitone <;> norm_num Β· simp Β· have {k : β„•} : (2 : ℝ)⁻¹ ^ (k * 2) * ((2 : ℝ)⁻¹ ^ k)⁻¹ = (2...
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo1982Q3.lean
{ "open": [ "Finset NNReal" ], "variables": [ "{x : β„• β†’ ℝ} {n : β„•} (hn : n β‰  0) (hx : Antitone x)" ] }
[ { "line": "refine ⟨fun k ↦ 2⁻¹ ^ k, ?_, pow_zero _, ?_, fun n ↦ ?_⟩", "before_state": "⊒ βˆƒ x, Antitone x ∧ x 0 = 1 ∧ (βˆ€ (k : β„•), 0 < x k) ∧ βˆ€ (n : β„•), βˆ‘ k ∈ range n, x k ^ 2 / x (k + 1) < 4", "after_state": "case refine_1\n⊒ Antitone fun k => 2⁻¹ ^ k\n---\ncase refine_2\n⊒ βˆ€ (k : β„•), 0 < (fun k => 2⁻¹ ^...
theorem imo1988_q6 {a b : β„•} (h : a * b + 1 ∣ a ^ 2 + b ^ 2) : βˆƒ d, d ^ 2 = (a ^ 2 + b ^ 2) / (a * b + 1) := by rcases h with ⟨k, hk⟩ rw [hk] rw [Nat.mul_div_cancel_left _ (Nat.succ_pos (a * b))] simp only [sq] at hk apply constant_descent_vieta_jumping a b (H := fun a b => a * a + b * b = (a * b + 1) * k...
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo1988Q6.lean
{ "open": [ "Imo1988Q6" ], "variables": [] }
[ { "line": "rcases h with ⟨k, hk⟩", "before_state": "a b : β„•\nh : a * b + 1 ∣ a ^ 2 + b ^ 2\n⊒ βˆƒ d, d ^ 2 = (a ^ 2 + b ^ 2) / (a * b + 1)", "after_state": "case intro\na b k : β„•\nhk : a ^ 2 + b ^ 2 = (a * b + 1) * k\n⊒ βˆƒ d, d ^ 2 = (a ^ 2 + b ^ 2) / (a * b + 1)" }, { "line": "rw [hk]", "befor...
example {a b : β„•} (h : a * b ∣ a ^ 2 + b ^ 2 + 1) : 3 * a * b = a ^ 2 + b ^ 2 + 1 := by rcases h with ⟨k, hk⟩ suffices k = 3 by simp_all; ring simp only [sq] at hk apply constant_descent_vieta_jumping a b (H := fun a b => a * a + b * b + 1 = a * b * k) hk (fun x => k * x) (fun x => x * x + 1) fun x _ => x...
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo1988Q6.lean
{ "open": [ "Imo1988Q6" ], "variables": [] }
[ { "line": "rcases h with ⟨k, hk⟩", "before_state": "a b : β„•\nh : a * b ∣ a ^ 2 + b ^ 2 + 1\n⊒ 3 * a * b = a ^ 2 + b ^ 2 + 1", "after_state": "case intro\na b k : β„•\nhk : a ^ 2 + b ^ 2 + 1 = a * b * k\n⊒ 3 * a * b = a ^ 2 + b ^ 2 + 1" }, { "line": "suffices k = 3 by simp_all; ring", "before_s...
theorem tedious (m : β„•) (k : Fin (m + 1)) : m - ((m + 1 - ↑k) + m) % (m + 1) = ↑k := by obtain ⟨k, hk⟩ := k rw [Nat.lt_succ_iff] at hk rw [le_iff_exists_add] at hk rcases hk with ⟨c, rfl⟩ have : (k + c + 1 - k) + (k + c) = c + (k + c + 1) := by omega rw [Fin.val_mk] rw [this] rw [Nat.add_mod_right] rw...
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo1994Q1.lean
{ "open": [ "Finset" ], "variables": [] }
[ { "line": "obtain ⟨k, hk⟩ := k", "before_state": "m : β„•\nk : Fin (m + 1)\n⊒ m - (m + 1 - ↑k + m) % (m + 1) = ↑k", "after_state": "case mk\nm k : β„•\nhk : k < m + 1\n⊒ m - (m + 1 - β†‘βŸ¨k, hk⟩ + m) % (m + 1) = β†‘βŸ¨k, hk⟩" }, { "line": "rw [Nat.lt_succ_iff] at hk", "before_state": "case mk\nm k : β„•\...
theorem add_sq_add_sq_sub {Ξ± : Type*} [Ring Ξ±] (x y : Ξ±) : (x + y) * (x + y) + (x - y) * (x - y) = 2 * x * x + 2 * y * y := by noncomm_ring
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo1998Q2.lean
{ "open": [ "scoped Classical in", "scoped Classical in", "scoped Classical in", "scoped Classical in", "scoped Classical in", "scoped Classical in", "scoped Classical in" ], "variables": [ "{C J : Type*} (r : C β†’ J β†’ Prop)", "[Fintype J] [Fintype C]" ] }
[ { "line": "noncomm_ring", "before_state": "α : Type u_1\ninst✝ : Ring α\nx y : α\n⊒ (x + y) * (x + y) + (x - y) * (x - y) = 2 * x * x + 2 * y * y", "after_state": "No Goals!" }, { "line": "focus\n (first\n |\n simp only [add_mul✝, mul_add✝, sub_eq_add_neg✝, mul_assoc✝, pow_one✝, pow_zer...
theorem clear_denominators {a b k : β„•} (ha : 0 < a) (hb : 0 < b) : (b - 1 : β„š) / (2 * b) ≀ k / a ↔ ((b : β„•) - 1) * a ≀ k * (2 * b) := by rw [div_le_div_iffβ‚€] on_goal 1 => convert Nat.cast_le (Ξ± := β„š) all_goals simp [ha, hb]
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo1998Q2.lean
{ "open": [ "scoped Classical in", "scoped Classical in", "scoped Classical in", "scoped Classical in", "scoped Classical in", "scoped Classical in", "scoped Classical in", "scoped Classical in", "scoped Classical in" ], "variables": [ "{C J : Type*} (r : C β†’ J β†’ Prop)", ...
[ { "line": "rw [div_le_div_iffβ‚€]", "before_state": "a b k : β„•\nha : 0 < a\nhb : 0 < b\n⊒ (↑b - 1) / (2 * ↑b) ≀ ↑k / ↑a ↔ (b - 1) * a ≀ k * (2 * b)", "after_state": "a b k : β„•\nha : 0 < a\nhb : 0 < b\n⊒ (↑b - 1) * ↑a ≀ ↑k * (2 * ↑b) ↔ (b - 1) * a ≀ k * (2 * b)\n---\ncase hb\na b k : β„•\nha : 0 < a\nhb : 0 ...
theorem Int.natAbs_eq_of_chain_dvd {l : Cycle β„€} {x y : β„€} (hl : l.Chain (Β· ∣ Β·)) (hx : x ∈ l) (hy : y ∈ l) : x.natAbs = y.natAbs := by rw [Cycle.chain_iff_pairwise] at hl exact Int.natAbs_eq_of_dvd_dvd (hl x hx y hy) (hl y hy x hx)
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo2006Q5.lean
{ "open": [ "Function Polynomial" ], "variables": [] }
[ { "line": "rw [Cycle.chain_iff_pairwise] at hl", "before_state": "l : Cycle β„€\nx y : β„€\nhl : Cycle.Chain (fun x1 x2 => x1 ∣ x2) l\nhx : x ∈ l\nhy : y ∈ l\n⊒ x.natAbs = y.natAbs", "after_state": "l : Cycle β„€\nx y : β„€\nhl : βˆ€ a ∈ l, βˆ€ b ∈ l, a ∣ b\nhx : x ∈ l\nhy : y ∈ l\n⊒ x.natAbs = y.natAbs" }, { ...
theorem Int.add_eq_add_of_natAbs_eq_of_natAbs_eq {a b c d : β„€} (hne : a β‰  b) (h₁ : (c - a).natAbs = (d - b).natAbs) (hβ‚‚ : (c - b).natAbs = (d - a).natAbs) : a + b = c + d := by rcases Int.natAbs_eq_natAbs_iff.1 h₁ with h₁ | h₁ Β· rcases Int.natAbs_eq_natAbs_iff.1 hβ‚‚ with hβ‚‚ | hβ‚‚ Β· exact (hne <| by linari...
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo2006Q5.lean
{ "open": [ "Function Polynomial" ], "variables": [] }
[ { "line": "rcases Int.natAbs_eq_natAbs_iff.1 h₁ with h₁ | h₁", "before_state": "a b c d : β„€\nhne : a β‰  b\nh₁ : (c - a).natAbs = (d - b).natAbs\nhβ‚‚ : (c - b).natAbs = (d - a).natAbs\n⊒ a + b = c + d", "after_state": "case inl\na b c d : β„€\nhne : a β‰  b\nhβ‚βœ : (c - a).natAbs = (d - b).natAbs\nhβ‚‚ : (c - b)....
theorem Polynomial.isPeriodicPt_eval_two {P : Polynomial β„€} {t : β„€} (ht : t ∈ periodicPts fun x => P.eval x) : IsPeriodicPt (fun x => P.eval x) 2 t := by -- The cycle [P(t) - t, P(P(t)) - P(t), ...] let C : Cycle β„€ := (periodicOrbit (fun x => P.eval x) t).map fun x => P.eval x - x have HC : βˆ€ {n : β„•}, (fun x ...
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo2006Q5.lean
{ "open": [ "Function Polynomial" ], "variables": [] }
[ { "line": "let C : Cycle β„€ := (periodicOrbit (fun x => P.eval x) t).map fun x => P.eval x - x", "before_state": "P : β„€[X]\nt : β„€\nht : t ∈ periodicPts fun x => eval x P\n⊒ IsPeriodicPt (fun x => eval x P) 2 t", "after_state": "P : β„€[X]\nt : β„€\nht : t ∈ periodicPts fun x => eval x P\nC : Cycle β„€ := Cycle...
theorem Polynomial.iterate_comp_sub_X_ne {P : Polynomial β„€} (hP : 1 < P.natDegree) {k : β„•} (hk : 0 < k) : P.comp^[k] X - X β‰  0 := by rw [sub_ne_zero] apply_fun natDegree simpa using (one_lt_powβ‚€ hP hk.ne').ne'
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo2006Q5.lean
{ "open": [ "Function Polynomial" ], "variables": [] }
[ { "line": "rw [sub_ne_zero]", "before_state": "P : β„€[X]\nhP : 1 < P.natDegree\nk : β„•\nhk : 0 < k\n⊒ P.comp^[k] X - X β‰  0", "after_state": "P : β„€[X]\nhP : 1 < P.natDegree\nk : β„•\nhk : 0 < k\n⊒ P.comp^[k] X β‰  X" }, { "line": "rewrite [sub_ne_zero]", "before_state": "P : β„€[X]\nhP : 1 < P.natDeg...
theorem p_lemma (p : β„•) (hpp : Nat.Prime p) (hp_mod_4_eq_1 : p ≑ 1 [MOD 4]) (hp_gt_20 : p > 20) : βˆƒ n : β„•, p ∣ n ^ 2 + 1 ∧ (p : ℝ) > 2 * n + sqrt (2 * n) := by haveI := Fact.mk hpp have hp_mod_4_ne_3 : p % 4 β‰  3 := by linarith [show p % 4 = 1 from hp_mod_4_eq_1] obtain ⟨y, hy⟩ := ZMod.exists_sq_eq_neg_one_iff...
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo2008Q3.lean
{ "open": [ "Real" ], "variables": [] }
[ { "line": "haveI := Fact.mk hpp", "before_state": "p : β„•\nhpp : Nat.Prime p\nhp_mod_4_eq_1 : p ≑ 1 [MOD 4]\nhp_gt_20 : p > 20\n⊒ βˆƒ n, p ∣ n ^ 2 + 1 ∧ ↑p > 2 * ↑n + √(2 * ↑n)", "after_state": "p : β„•\nhpp : Nat.Prime p\nhp_mod_4_eq_1 : p ≑ 1 [MOD 4]\nhp_gt_20 : p > 20\nthis : Fact (Nat.Prime p)\n⊒ βˆƒ n, p ...
theorem imo2008_q3 : βˆ€ N : β„•, βˆƒ n : β„•, n β‰₯ N ∧ βˆƒ p : β„•, Nat.Prime p ∧ p ∣ n ^ 2 + 1 ∧ (p : ℝ) > 2 * n + sqrt (2 * n) := by intro N obtain ⟨p, hpp, hineq₁, hpmod4⟩ := Nat.exists_prime_gt_modEq_one (N ^ 2 + 20) four_ne_zero obtain ⟨n, hnat, hreal⟩ := p_lemma p hpp hpmod4 (by linarith [hineq₁, Nat.zero_le (N ^ 2...
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo2008Q3.lean
{ "open": [ "Real", "Imo2008Q3" ], "variables": [] }
[ { "line": "intro N", "before_state": "⊒ βˆ€ (N : β„•), βˆƒ n β‰₯ N, βˆƒ p, Nat.Prime p ∧ p ∣ n ^ 2 + 1 ∧ ↑p > 2 * ↑n + √(2 * ↑n)", "after_state": "N : β„•\n⊒ βˆƒ n β‰₯ N, βˆƒ p, Nat.Prime p ∧ p ∣ n ^ 2 + 1 ∧ ↑p > 2 * ↑n + √(2 * ↑n)" }, { "line": "obtain ⟨p, hpp, hineq₁, hpmod4⟩ := Nat.exists_prime_gt_modEq_one (N...
theorem arith_lemma (k n : β„•) : 0 < 2 * n + 2 ^ k.succ := by positivity
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo2013Q1.lean
{ "open": [], "variables": [] }
[ { "line": "positivity", "before_state": "k n : β„•\n⊒ 0 < 2 * n + 2 ^ k.succ", "after_state": "No Goals!" } ]
theorem prod_lemma (m : β„• β†’ β„•+) (k : β„•) (nm : β„•+) : ∏ i ∈ Finset.range k, ((1 : β„š) + 1 / ↑(if i < k then m i else nm)) = ∏ i ∈ Finset.range k, (1 + 1 / (m i : β„š)) := by suffices βˆ€ i, i ∈ Finset.range k β†’ (1 : β„š) + 1 / ↑(if i < k then m i else nm) = 1 + 1 / m i from Finset.prod_congr rfl this intro i h...
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo2013Q1.lean
{ "open": [], "variables": [] }
[ { "line": "suffices βˆ€ i, i ∈ Finset.range k β†’ (1 : β„š) + 1 / ↑(if i < k then m i else nm) = 1 + 1 / m i from\n Finset.prod_congr rfl this", "before_state": "m : β„• β†’ β„•+\nk : β„•\nnm : β„•+\n⊒ ∏ i ∈ Finset.range k, (1 + 1 / ↑↑(if i < k then m i else nm)) = ∏ i ∈ Finset.range k, (1 + 1 / ↑↑(m i))", "after_stat...
theorem imo2013_q1 (n : β„•+) (k : β„•) : βˆƒ m : β„• β†’ β„•+, (1 : β„š) + (2 ^ k - 1) / n = ∏ i ∈ Finset.range k, (1 + 1 / (m i : β„š)) := by revert n induction' k with pk hpk Β· intro n; use fun (_ : β„•) => (1 : β„•+); simp -- For the base case, any m works. intro n obtain ⟨t, ht : ↑n = t + t⟩ | ⟨t, ht : ↑n = 2 * t + 1⟩...
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo2013Q1.lean
{ "open": [ "Imo2013Q1" ], "variables": [] }
[ { "line": "revert n", "before_state": "n : β„•+\nk : β„•\n⊒ βˆƒ m, 1 + (2 ^ k - 1) / ↑↑n = ∏ i ∈ Finset.range k, (1 + 1 / ↑↑(m i))", "after_state": "k : β„•\n⊒ βˆ€ (n : β„•+), βˆƒ m, 1 + (2 ^ k - 1) / ↑↑n = ∏ i ∈ Finset.range k, (1 + 1 / ↑↑(m i))" }, { "line": "induction' k with pk hpk", "before_state": "...
theorem le_of_all_pow_lt_succ {x y : ℝ} (hx : 1 < x) (hy : 1 < y) (h : βˆ€ n : β„•, 0 < n β†’ x ^ n - 1 < y ^ n) : x ≀ y := by by_contra! hxy have hxmy : 0 < x - y := sub_pos.mpr hxy have hn : βˆ€ n : β„•, 0 < n β†’ (x - y) * (n : ℝ) ≀ x ^ n - y ^ n := by intro n _ have hterm : βˆ€ i : β„•, i ∈ Finset.range n β†’ 1 ≀ x...
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo2013Q5.lean
{ "open": [], "variables": [] }
[ { "line": "by_contra! hxy", "before_state": "x y : ℝ\nhx : 1 < x\nhy : 1 < y\nh : βˆ€ (n : β„•), 0 < n β†’ x ^ n - 1 < y ^ n\n⊒ x ≀ y", "after_state": "x y : ℝ\nhx : 1 < x\nhy : 1 < y\nh : βˆ€ (n : β„•), 0 < n β†’ x ^ n - 1 < y ^ n\nhxy : y < x\n⊒ False" }, { "line": "by_contra hxy", "before_state": "x ...
theorem le_of_all_pow_lt_succ' {x y : ℝ} (hx : 1 < x) (hy : 0 < y) (h : βˆ€ n : β„•, 0 < n β†’ x ^ n - 1 < y ^ n) : x ≀ y := by refine le_of_all_pow_lt_succ hx ?_ h by_contra! hy'' : y ≀ 1 -- Then there exists y' such that 0 < y ≀ 1 < y' < x. have h_y'_lt_x : (x + 1) / 2 < x := by linarith have h1_lt_y' : 1 < (...
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo2013Q5.lean
{ "open": [], "variables": [] }
[ { "line": "refine le_of_all_pow_lt_succ hx ?_ h", "before_state": "x y : ℝ\nhx : 1 < x\nhy : 0 < y\nh : βˆ€ (n : β„•), 0 < n β†’ x ^ n - 1 < y ^ n\n⊒ x ≀ y", "after_state": "No Goals!" } ]
theorem f_pos_of_pos {f : β„š β†’ ℝ} {q : β„š} (hq : 0 < q) (H1 : βˆ€ x y, 0 < x β†’ 0 < y β†’ f (x * y) ≀ f x * f y) (H4 : βˆ€ n : β„•, 0 < n β†’ (n : ℝ) ≀ f n) : 0 < f q := by have num_pos : 0 < q.num := Rat.num_pos.mpr hq have hmul_pos := calc (0 : ℝ) < q.num := Int.cast_pos.mpr num_pos _ = ((q.num.natAbs ...
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo2013Q5.lean
{ "open": [], "variables": [] }
[ { "line": "have num_pos : 0 < q.num := Rat.num_pos.mpr hq", "before_state": "f : β„š β†’ ℝ\nq : β„š\nhq : 0 < q\nH1 : βˆ€ (x y : β„š), 0 < x β†’ 0 < y β†’ f (x * y) ≀ f x * f y\nH4 : βˆ€ (n : β„•), 0 < n β†’ ↑n ≀ f ↑n\n⊒ 0 < f q", "after_state": "f : β„š β†’ ℝ\nq : β„š\nhq : 0 < q\nH1 : βˆ€ (x y : β„š), 0 < x β†’ 0 < y β†’ f (x * y) ≀ f...
theorem fx_gt_xm1 {f : β„š β†’ ℝ} {x : β„š} (hx : 1 ≀ x) (H1 : βˆ€ x y, 0 < x β†’ 0 < y β†’ f (x * y) ≀ f x * f y) (H2 : βˆ€ x y, 0 < x β†’ 0 < y β†’ f x + f y ≀ f (x + y)) (H4 : βˆ€ n : β„•, 0 < n β†’ (n : ℝ) ≀ f n) : (x - 1 : ℝ) < f x := by have hx0 := calc (x - 1 : ℝ) < ⌊xβŒ‹β‚Š := mod_cast Nat.sub_one_lt_floor x ...
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo2013Q5.lean
{ "open": [], "variables": [] }
[ { "line": "have hx0 :=\n calc\n (x - 1 : ℝ) < ⌊xβŒ‹β‚Š := mod_cast Nat.sub_one_lt_floor x\n _ ≀ f ⌊xβŒ‹β‚Š := H4 _ (Nat.floor_pos.2 hx)", "before_state": "f : β„š β†’ ℝ\nx : β„š\nhx : 1 ≀ x\nH1 : βˆ€ (x y : β„š), 0 < x β†’ 0 < y β†’ f (x * y) ≀ f x * f y\nH2 : βˆ€ (x y : β„š), 0 < x β†’ 0 < y β†’ f x + f y ≀ f (x + y)\nH4 : βˆ€ (n ...
theorem pow_f_le_f_pow {f : β„š β†’ ℝ} {n : β„•} (hn : 0 < n) {x : β„š} (hx : 1 < x) (H1 : βˆ€ x y, 0 < x β†’ 0 < y β†’ f (x * y) ≀ f x * f y) (H4 : βˆ€ n : β„•, 0 < n β†’ (n : ℝ) ≀ f n) : f (x ^ n) ≀ f x ^ n := by induction' n with pn hpn Β· exfalso; exact Nat.lt_asymm hn hn rcases pn with - | pn Β· norm_num have hpn' := ...
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo2013Q5.lean
{ "open": [], "variables": [] }
[ { "line": "induction' n with pn hpn", "before_state": "f : β„š β†’ ℝ\nn : β„•\nhn : 0 < n\nx : β„š\nhx : 1 < x\nH1 : βˆ€ (x y : β„š), 0 < x β†’ 0 < y β†’ f (x * y) ≀ f x * f y\nH4 : βˆ€ (n : β„•), 0 < n β†’ ↑n ≀ f ↑n\n⊒ f (x ^ n) ≀ f x ^ n", "after_state": "case zero\nf : β„š β†’ ℝ\nx : β„š\nhx : 1 < x\nH1 : βˆ€ (x y : β„š), 0 < x β†’ 0...
theorem fixed_point_of_pos_nat_pow {f : β„š β†’ ℝ} {n : β„•} (hn : 0 < n) (H1 : βˆ€ x y, 0 < x β†’ 0 < y β†’ f (x * y) ≀ f x * f y) (H4 : βˆ€ n : β„•, 0 < n β†’ (n : ℝ) ≀ f n) (H5 : βˆ€ x : β„š, 1 < x β†’ (x : ℝ) ≀ f x) {a : β„š} (ha1 : 1 < a) (hae : f a = a) : f (a ^ n) = a ^ n := by have hh0 : (a : ℝ) ^ n ≀ f (a ^ n) := mod_cast...
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo2013Q5.lean
{ "open": [], "variables": [] }
[ { "line": "have hh0 : (a : ℝ) ^ n ≀ f (a ^ n) := mod_cast H5 (a ^ n) (one_lt_powβ‚€ ha1 hn.ne')", "before_state": "f : β„š β†’ ℝ\nn : β„•\nhn : 0 < n\nH1 : βˆ€ (x y : β„š), 0 < x β†’ 0 < y β†’ f (x * y) ≀ f x * f y\nH4 : βˆ€ (n : β„•), 0 < n β†’ ↑n ≀ f ↑n\nH5 : βˆ€ (x : β„š), 1 < x β†’ ↑x ≀ f x\na : β„š\nha1 : 1 < a\nhae : f a = ↑a\n⊒ f...
theorem fixed_point_of_gt_1 {f : β„š β†’ ℝ} {x : β„š} (hx : 1 < x) (H1 : βˆ€ x y, 0 < x β†’ 0 < y β†’ f (x * y) ≀ f x * f y) (H2 : βˆ€ x y, 0 < x β†’ 0 < y β†’ f x + f y ≀ f (x + y)) (H4 : βˆ€ n : β„•, 0 < n β†’ (n : ℝ) ≀ f n) (H5 : βˆ€ x : β„š, 1 < x β†’ (x : ℝ) ≀ f x) {a : β„š} (ha1 : 1 < a) (hae : f a = a) : f x = x := by -- Choose n...
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo2013Q5.lean
{ "open": [], "variables": [] }
[ { "line": "obtain ⟨N, hN⟩ := pow_unbounded_of_one_lt (1 + x) ha1", "before_state": "f : β„š β†’ ℝ\nx : β„š\nhx : 1 < x\nH1 : βˆ€ (x y : β„š), 0 < x β†’ 0 < y β†’ f (x * y) ≀ f x * f y\nH2 : βˆ€ (x y : β„š), 0 < x β†’ 0 < y β†’ f x + f y ≀ f (x + y)\nH4 : βˆ€ (n : β„•), 0 < n β†’ ↑n ≀ f ↑n\nH5 : βˆ€ (x : β„š), 1 < x β†’ ↑x ≀ f x\na : β„š\nha1 ...
theorem imo2013_q5 (f : β„š β†’ ℝ) (H1 : βˆ€ x y, 0 < x β†’ 0 < y β†’ f (x * y) ≀ f x * f y) (H2 : βˆ€ x y, 0 < x β†’ 0 < y β†’ f x + f y ≀ f (x + y)) (H_fixed_point : βˆƒ a, 1 < a ∧ f a = a) : βˆ€ x, 0 < x β†’ f x = x := by obtain ⟨a, ha1, hae⟩ := H_fixed_point have H3 : βˆ€ x : β„š, 0 < x β†’ βˆ€ n : β„•, 0 < n β†’ ↑n * f x ≀ f (n * x) :=...
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo2013Q5.lean
{ "open": [ "Imo2013Q5" ], "variables": [] }
[ { "line": "obtain ⟨a, ha1, hae⟩ := H_fixed_point", "before_state": "f : β„š β†’ ℝ\nH1 : βˆ€ (x y : β„š), 0 < x β†’ 0 < y β†’ f (x * y) ≀ f x * f y\nH2 : βˆ€ (x y : β„š), 0 < x β†’ 0 < y β†’ f x + f y ≀ f (x + y)\nH_fixed_point : βˆƒ a, 1 < a ∧ f a = ↑a\n⊒ βˆ€ (x : β„š), 0 < x β†’ f x = ↑x", "after_state": "case intro.intro\nf : β„š ...
theorem imo2019_q1 (f : β„€ β†’ β„€) : (βˆ€ a b : β„€, f (2 * a) + 2 * f b = f (f (a + b))) ↔ f = 0 ∨ βˆƒ c, f = fun x => 2 * x + c := by constructor; swap -- easy way: f(x)=0 and f(x)=2x+c work. Β· rintro (rfl | ⟨c, rfl⟩) <;> intros <;> norm_num; ring -- hard way. intro hf -- functional equation -- Using `h` for ...
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo2019Q1.lean
{ "open": [], "variables": [] }
[ { "line": "constructor", "before_state": "f : β„€ β†’ β„€\n⊒ (βˆ€ (a b : β„€), f (2 * a) + 2 * f b = f (f (a + b))) ↔ f = 0 ∨ βˆƒ c, f = fun x => 2 * x + c", "after_state": "case mp\nf : β„€ β†’ β„€\n⊒ (βˆ€ (a b : β„€), f (2 * a) + 2 * f b = f (f (a + b))) β†’ f = 0 ∨ βˆƒ c, f = fun x => 2 * x + c\n---\ncase mpr\nf : β„€ β†’ β„€\n⊒ (f...
theorem upper_bound {k n : β„•} (hk : k > 0) (h : (k ! : β„€) = ∏ i ∈ range n, ((2 : β„€) ^ n - (2 : β„€) ^ i)) : n < 6 := by have h2 : βˆ‘ i ∈ range n, i < k := by suffices emultiplicity 2 (k ! : β„€) = ↑(βˆ‘ i ∈ range n, i : β„•) by rw [← Nat.cast_lt (Ξ± := β„•βˆž)]; change emultiplicity ((2 : β„•) : β„€) _ < _ rw [← th...
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo2019Q4.lean
{ "open": [ "scoped Nat", "Nat hiding zero_le Prime", "Finset" ], "variables": [] }
[ { "line": "have h2 : βˆ‘ i ∈ range n, i < k :=\n by\n suffices emultiplicity 2 (k ! : β„€) = ↑(βˆ‘ i ∈ range n, i : β„•)\n by\n rw [← Nat.cast_lt (Ξ± := β„•βˆž)]; change emultiplicity ((2 : β„•) : β„€) _ < _\n rw [← this]; change emultiplicity ((2 : β„•) : β„€) _ < _\n simp_rw [Int.natCast_emultiplicity, emultiplicity...
lemma exists_numbers_in_interval {n : β„•} (hn : 100 ≀ n) : βˆƒ l : β„•, n + 4 * l ≀ 2 * l ^ 2 ∧ 2 * l ^ 2 + 4 * l ≀ 2 * n := by have hn' : 1 ≀ Nat.sqrt (n + 1) := by rw [Nat.le_sqrt] apply Nat.le_add_left have h₁ := Nat.sqrt_le' (n + 1) have hβ‚‚ := Nat.succ_le_succ_sqrt' (n + 1) have h₃ : 10 ≀ (n + 1).sqr...
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo2021Q1.lean
{ "open": [ "Finset" ], "variables": [] }
[ { "line": "have hn' : 1 ≀ Nat.sqrt (n + 1) := by\n rw [Nat.le_sqrt]\n apply Nat.le_add_left", "before_state": "n : β„•\nhn : 100 ≀ n\n⊒ βˆƒ l, n + 4 * l ≀ 2 * l ^ 2 ∧ 2 * l ^ 2 + 4 * l ≀ 2 * n", "after_state": "n : β„•\nhn : 100 ≀ n\nhn' : 1 ≀ (n + 1).sqrt\n⊒ βˆƒ l, n + 4 * l ≀ 2 * l ^ 2 ∧ 2 * l ^ 2 + 4 * l ≀...
lemma exists_triplet_summing_to_squares {n : β„•} (hn : 100 ≀ n) : βˆƒ a b c : β„•, n ≀ a ∧ a < b ∧ b < c ∧ c ≀ 2 * n ∧ IsSquare (a + b) ∧ IsSquare (c + a) ∧ IsSquare (b + c) := by obtain ⟨l, hl1, hl2⟩ := exists_numbers_in_interval hn have hl : 1 < l := by contrapose! hl1; interval_cases l <;> linarith have h...
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo2021Q1.lean
{ "open": [ "Finset" ], "variables": [] }
[ { "line": "obtain ⟨l, hl1, hl2⟩ := exists_numbers_in_interval hn", "before_state": "n : β„•\nhn : 100 ≀ n\n⊒ βˆƒ a b c, n ≀ a ∧ a < b ∧ b < c ∧ c ≀ 2 * n ∧ IsSquare (a + b) ∧ IsSquare (c + a) ∧ IsSquare (b + c)", "after_state": "No Goals!" } ]
lemma exists_finset_3_le_card_with_pairs_summing_to_squares {n : β„•} (hn : 100 ≀ n) : βˆƒ B : Finset β„•, 2 * 1 + 1 ≀ #B ∧ (βˆ€ a ∈ B, βˆ€ b ∈ B, a β‰  b β†’ IsSquare (a + b)) ∧ βˆ€ c ∈ B, n ≀ c ∧ c ≀ 2 * n := by obtain ⟨a, b, c, hna, hab, hbc, hcn, h₁, hβ‚‚, hβ‚ƒβŸ© := exists_triplet_summing_to_squares hn refine ...
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo2021Q1.lean
{ "open": [ "Finset" ], "variables": [] }
[ { "line": "obtain ⟨a, b, c, hna, hab, hbc, hcn, h₁, hβ‚‚, hβ‚ƒβŸ© := exists_triplet_summing_to_squares hn", "before_state": "n : β„•\nhn : 100 ≀ n\n⊒ βˆƒ B, 2 * 1 + 1 ≀ #B ∧ (βˆ€ a ∈ B, βˆ€ b ∈ B, a β‰  b β†’ IsSquare (a + b)) ∧ βˆ€ c ∈ B, n ≀ c ∧ c ≀ 2 * n", "after_state": "No Goals!" } ]
theorem imo2021_q1 : βˆ€ n : β„•, 100 ≀ n β†’ βˆ€ A βŠ† Finset.Icc n (2 * n), (βˆƒ a ∈ A, βˆƒ b ∈ A, a β‰  b ∧ IsSquare (a + b)) ∨ βˆƒ a ∈ Finset.Icc n (2 * n) \ A, βˆƒ b ∈ Finset.Icc n (2 * n) \ A, a β‰  b ∧ IsSquare (a + b) := by intro n hn A hA -- For each n ∈ β„• such that 100 ≀ n, there exists a pairwise unequal triplet {...
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo2021Q1.lean
{ "open": [ "Finset", "Imo2021Q1" ], "variables": [] }
[ { "line": "intro n hn A hA", "before_state": "⊒ βˆ€ (n : β„•),\n 100 ≀ n β†’\n βˆ€ A βŠ† Icc n (2 * n),\n (βˆƒ a ∈ A, βˆƒ b ∈ A, a β‰  b ∧ IsSquare (a + b)) ∨\n βˆƒ a ∈ Icc n (2 * n) \\ A, βˆƒ b ∈ Icc n (2 * n) \\ A, a β‰  b ∧ IsSquare (a + b)", "after_state": "n : β„•\nhn : 100 ≀ n\nA : Finset β„•\nhA : ...
lemma dvd_pow_iff_of_dvd_sub {a b d n : β„•} {z : β„€} (ha : a.Coprime d) (hd : (Ο† d : β„€) ∣ (n : β„€) - z) : d ∣ a ^ n + b ↔ (((ZMod.unitOfCoprime _ ha) ^ z : (ZMod d)Λ£) : ZMod d) + b = 0 := by rcases hd with ⟨k, hk⟩ rw [← ZMod.natCast_zmod_eq_zero_iff_dvd] convert Iff.rfl push_cast congr suffices (((ZMod...
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo2024Q2.lean
{ "open": [ "scoped Nat" ], "variables": [] }
[ { "line": "rcases hd with ⟨k, hk⟩", "before_state": "a b d n : β„•\nz : β„€\nha : a.Coprime d\nhd : ↑(Ο† d) ∣ ↑n - z\n⊒ d ∣ a ^ n + b ↔ ↑(ZMod.unitOfCoprime a ha ^ z) + ↑b = 0", "after_state": "case intro\na b d n : β„•\nz : β„€\nha : a.Coprime d\nk : β„€\nhk : ↑n - z = ↑(Ο† d) * k\n⊒ d ∣ a ^ n + b ↔ ↑(ZMod.unitOfC...
lemma map_add_one_range (p : β„• β†’ Prop) [DecidablePred p] (n : β„•) (h0 : Β¬ p 0) : {x ∈ Finset.range n | p (x + 1)}.map ⟨(Β· + 1), add_left_injective 1⟩ = {x ∈ Finset.range (n + 1) | p x } := by ext x simp only [Finset.mem_map] constructor Β· aesop Β· intro hx use x - 1 cases x <;> simp_all
/root/DuelModelResearch/mathlib4/Archive/Imo/Imo2024Q3.lean
{ "open": [ "scoped Finset" ], "variables": [] }
[ { "line": "ext x", "before_state": "p : β„• β†’ Prop\ninst✝ : DecidablePred p\nn : β„•\nh0 : Β¬p 0\n⊒ Finset.map { toFun := fun x => x + 1, inj' := β‹― } ({x ∈ Finset.range n | p (x + 1)}) =\n {x ∈ Finset.range (n + 1) | p x}", "after_state": "case h\np : β„• β†’ Prop\ninst✝ : DecidablePred p\nn : β„•\nh0 : Β¬p 0\nx...
theorem add_mod2 (a : β„•) : βˆƒ t, a + a % 2 = t * 2 := by simp only [mul_comm _ 2] -- write `t*2` as `2*t` apply dvd_of_mod_eq_zero -- it suffices to prove `(a + a % 2) % 2 = 0` rw [add_mod] rw [mod_mod] rw [← two_mul] rw [mul_mod_right]
/root/DuelModelResearch/mathlib4/Archive/MiuLanguage/DecisionSuf.lean
{ "open": [ "MiuAtom List Nat" ], "variables": [] }
[ { "line": "simp only [mul_comm _ 2]\n -- write `t*2` as `2*t`", "before_state": "a : β„•\n⊒ βˆƒ t, a + a % 2 = t * 2", "after_state": "a : β„•\n⊒ βˆƒ t, a + a % 2 = 2 * t" }, { "line": "apply dvd_of_mod_eq_zero", "before_state": "a : β„•\n⊒ βˆƒ t, a + a % 2 = 2 * t", "after_state": "No Goals!" } ...
private theorem le_pow2_and_pow2_eq_mod3' (c : β„•) (x : β„•) (h : c = 1 ∨ c = 2) : βˆƒ m : β„•, c + 3 * x ≀ 2 ^ m ∧ 2 ^ m % 3 = c % 3 := by induction' x with k hk Β· use c + 1 rcases h with hc | hc <;> Β· rw [hc]; norm_num rcases hk with ⟨g, hkg, hgmod⟩ by_cases hp : c + 3 * (k + 1) ≀ 2 ^ g Β· use g, hp, hgmod ...
/root/DuelModelResearch/mathlib4/Archive/MiuLanguage/DecisionSuf.lean
{ "open": [ "MiuAtom List Nat" ], "variables": [] }
[ { "line": "induction' x with k hk", "before_state": "c x : β„•\nh : c = 1 ∨ c = 2\n⊒ βˆƒ m, c + 3 * x ≀ 2 ^ m ∧ 2 ^ m % 3 = c % 3", "after_state": "case zero\nc : β„•\nh : c = 1 ∨ c = 2\n⊒ βˆƒ m, c + 3 * 0 ≀ 2 ^ m ∧ 2 ^ m % 3 = c % 3\n---\ncase succ\nc : β„•\nh : c = 1 ∨ c = 2\nk : β„•\nhk : βˆƒ m, c + 3 * k ≀ 2 ^ m ...
theorem le_pow2_and_pow2_eq_mod3 (a : β„•) (h : a % 3 = 1 ∨ a % 3 = 2) : βˆƒ m : β„•, a ≀ 2 ^ m ∧ 2 ^ m % 3 = a % 3 := by obtain ⟨m, hm⟩ := le_pow2_and_pow2_eq_mod3' (a % 3) (a / 3) h use m constructor Β· convert hm.1; exact (mod_add_div a 3).symm Β· rw [hm.2, mod_mod _ 3]
/root/DuelModelResearch/mathlib4/Archive/MiuLanguage/DecisionSuf.lean
{ "open": [ "MiuAtom List Nat" ], "variables": [] }
[ { "line": "obtain ⟨m, hm⟩ := le_pow2_and_pow2_eq_mod3' (a % 3) (a / 3) h", "before_state": "a : β„•\nh : a % 3 = 1 ∨ a % 3 = 2\n⊒ βˆƒ m, a ≀ 2 ^ m ∧ 2 ^ m % 3 = a % 3", "after_state": "No Goals!" } ]
theorem OxfordInvariants.Week3P1 (n : β„•) (a : β„• β†’ β„•) (a_pos : βˆ€ i ≀ n, 0 < a i) (ha : βˆ€ i, i + 2 ≀ n β†’ a (i + 1) ∣ a i + a (i + 2)) : βˆƒ b : β„•, (b : Ξ±) = βˆ‘ i ∈ Finset.range n, (a 0 : Ξ±) * a n / (a i * a (i + 1)) := by -- Treat separately `n = 0` and `n β‰₯ 1` rcases n with - | n /- Case `n = 0` The sum i...
/root/DuelModelResearch/mathlib4/Archive/OxfordInvariants/Summer2021/Week3P1.lean
{ "open": [], "variables": [ "{Ξ± : Type*} [Field Ξ±] [LinearOrder Ξ±] [IsStrictOrderedRing Ξ±]" ] }
[ { "line": "rcases n with - | n", "before_state": "Ξ± : Type u_1\ninst✝² : Field Ξ±\ninst✝¹ : LinearOrder Ξ±\ninst✝ : IsStrictOrderedRing Ξ±\nn : β„•\na : β„• β†’ β„•\na_pos : βˆ€ i ≀ n, 0 < a i\nha : βˆ€ (i : β„•), i + 2 ≀ n β†’ a (i + 1) ∣ a i + a (i + 2)\n⊒ βˆƒ b, ↑b = βˆ‘ i ∈ Finset.range n, ↑(a 0) * ↑(a n) / (↑(a i) * ↑(a (i +...
theorem cube_root_of_unity_sum (hω : IsPrimitiveRoot ω 3) : 1 + ω + ω ^ 2 = 0 := by simpa [cyclotomic_prime, Finset.sum_range_succ] using hω.isRoot_cyclotomic (by decide)
/root/DuelModelResearch/mathlib4/Archive/Wiedijk100Theorems/SolutionOfCubicQuartic.lean
{ "open": [ "Polynomial" ], "variables": [ "{K : Type*} [Field K] (a b c d e : K) {Ο‰ p q r s t u v w x y : K}" ] }
[ { "line": "simpa [cyclotomic_prime, Finset.sum_range_succ] using hΟ‰.isRoot_cyclotomic (by decide)", "before_state": "K : Type u_1\ninst✝ : Field K\nΟ‰ : K\nhΟ‰ : IsPrimitiveRoot Ο‰ 3\n⊒ 1 + Ο‰ + Ο‰ ^ 2 = 0", "after_state": "No Goals!" }, { "line": "decide", "before_state": "K : Type u_1\ninst✝ : ...
theorem cubic_eq_zero_iff_of_p_eq_zero (ha : a β‰  0) (hΟ‰ : IsPrimitiveRoot Ο‰ 3) (hpz : 3 * a * c - b ^ 2 = 0) (hq : q = (9 * a * b * c - 2 * b ^ 3 - 27 * a ^ 2 * d) / (54 * a ^ 3)) (hs3 : s ^ 3 = 2 * q) (x : K) : a * x ^ 3 + b * x ^ 2 + c * x + d = 0 ↔ x = s - b / (3 * a) ∨ x = s * Ο‰ - b / (3 * a) ...
/root/DuelModelResearch/mathlib4/Archive/Wiedijk100Theorems/SolutionOfCubicQuartic.lean
{ "open": [ "Polynomial" ], "variables": [ "{K : Type*} [Field K] (a b c d e : K) {Ο‰ p q r s t u v w x y : K}", "[Invertible (2 : K)] [Invertible (3 : K)]" ] }
[ { "line": "have h₁ : βˆ€ x a₁ aβ‚‚ a₃ : K, x = a₁ ∨ x = aβ‚‚ ∨ x = a₃ ↔ (x - a₁) * (x - aβ‚‚) * (x - a₃) = 0 := by intros;\n simp only [mul_eq_zero, sub_eq_zero, or_assoc]", "before_state": "K : Type u_1\ninst✝² : Field K\na b c d Ο‰ q s : K\ninst✝¹ : Invertible 2\ninst✝ : Invertible 3\nha : a β‰  0\nhΟ‰ : IsPrimitive...
theorem quartic_depressed_eq_zero_iff (hq_nonzero : q β‰  0) (hu : u ^ 3 - p * u ^ 2 - 4 * r * u + 4 * p * r - q ^ 2 = 0) (hs : s ^ 2 = u - p) (hv : v ^ 2 = 4 * s ^ 2 - 8 * (u - q / s)) (hw : w ^ 2 = 4 * s ^ 2 - 8 * (u + q / s)) (x : K) : x ^ 4 + p * x ^ 2 + q * x + r = 0 ↔ x = (-2 * s -...
/root/DuelModelResearch/mathlib4/Archive/Wiedijk100Theorems/SolutionOfCubicQuartic.lean
{ "open": [ "Polynomial" ], "variables": [ "{K : Type*} [Field K] (a b c d e : K) {Ο‰ p q r s t u v w x y : K}", "[Invertible (2 : K)] [Invertible (3 : K)]", "[Invertible (2 : K)]" ] }
[ { "line": "have hi2 : (2 : K) β‰  0 := Invertible.ne_zero _", "before_state": "K : Type u_1\ninst✝³ : Field K\np q r s u v w : K\ninst✝² : Invertible 2\ninst✝¹ : Invertible 3\ninst✝ : Invertible 2\nhq_nonzero : q β‰  0\nhu : u ^ 3 - p * u ^ 2 - 4 * r * u + 4 * p * r - q ^ 2 = 0\nhs : s ^ 2 = u - p\nhv : v ^ 2 =...