imo.imo2006_q3 ⟷
Archive.Imo.Imo2006Q3
The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(last sync)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -40,7 +40,7 @@ namespace imo2006_q3
theorem lhs_ineq {x y : ℝ} (hxy : 0 ≤ x * y) :
16 * x ^ 2 * y ^ 2 * (x + y) ^ 2 ≤ ((x + y) ^ 2) ^ 3 :=
by
- conv_rhs => rw [pow_succ']
+ conv_rhs => rw [pow_succ]
refine' mul_le_mul_of_nonneg_right _ (sq_nonneg _)
apply le_of_sub_nonneg
calc
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -143,7 +143,7 @@ theorem proof₂ (M : ℝ)
by intro; ring
have h₂ : ∀ x : ℝ, (2 - 3 * x) ^ 2 + 2 ^ 2 + (2 + 3 * x) ^ 2 = 18 * x ^ 2 + 12 := by intro; ring
have := h (2 - 3 * sqrt 2) 2 (2 + 3 * sqrt 2)
- rw [lhs_identity, h₁, h₂, sq_sqrt zero_le_two, abs_neg, abs_eq_self.mpr, ← div_le_iff] at this
+ rw [lhs_identity, h₁, h₂, sq_sqrt zero_le_two, abs_neg, abs_eq_self.mpr, ← div_le_iff] at this
· convert this using 1; ring
· apply pow_pos; norm_num
· exact mul_nonneg (mul_nonneg (sq_nonneg _) zero_le_two) (sqrt_nonneg _)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -84,9 +84,9 @@ theorem subst_wlog {x y z s : ℝ} (hxy : 0 ≤ x * y) (hxyz : x + y + z = 0) :
le_trans (mul_le_mul_of_nonneg_left (lhs_ineq hxy) hs) mid_ineq
_ ≤ (2 * (x ^ 2 + y ^ 2 + (x + y) ^ 2) + 2 * s ^ 2) ^ 4 / 4 ^ 4 :=
div_le_div_of_le four_pow_four_pos.le <|
- pow_le_pow_of_le_left (add_nonneg (mul_nonneg zero_lt_three.le (sq_nonneg _)) hs)
+ pow_le_pow_left (add_nonneg (mul_nonneg zero_lt_three.le (sq_nonneg _)) hs)
(add_le_add_right rhs_ineq _) _
- le_of_pow_le_pow _ (mul_nonneg (sqrt_nonneg _) (sq_nonneg _)) Nat.succ_pos' <|
+ le_of_pow_le_pow_left _ (mul_nonneg (sqrt_nonneg _) (sq_nonneg _)) Nat.succ_pos' <|
calc
(32 * |x * y * z * s|) ^ 2 = 32 * (2 * s ^ 2 * (16 * x ^ 2 * y ^ 2 * (x + y) ^ 2)) := by
rw [mul_pow, sq_abs, hz] <;> ring
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,7 +3,7 @@ Copyright (c) 2021 Tian Chen. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Tian Chen
-/
-import Mathbin.Analysis.SpecialFunctions.Sqrt
+import Analysis.SpecialFunctions.Sqrt
#align_import imo.imo2006_q3 from "leanprover-community/mathlib"@"08b081ea92d80e3a41f899eea36ef6d56e0f1db0"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,14 +2,11 @@
Copyright (c) 2021 Tian Chen. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Tian Chen
-
-! This file was ported from Lean 3 source module imo.imo2006_q3
-! leanprover-community/mathlib commit 08b081ea92d80e3a41f899eea36ef6d56e0f1db0
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Analysis.SpecialFunctions.Sqrt
+#align_import imo.imo2006_q3 from "leanprover-community/mathlib"@"08b081ea92d80e3a41f899eea36ef6d56e0f1db0"
+
/-!
# IMO 2006 Q3
mathlib commit https://github.com/leanprover-community/mathlib/commit/bf2428c9486c407ca38b5b3fb10b87dad0bc99fa
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Tian Chen
! This file was ported from Lean 3 source module imo.imo2006_q3
-! leanprover-community/mathlib commit 308826471968962c6b59c7ff82a22757386603e3
+! leanprover-community/mathlib commit 08b081ea92d80e3a41f899eea36ef6d56e0f1db0
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -13,6 +13,9 @@ import Mathbin.Analysis.SpecialFunctions.Sqrt
/-!
# IMO 2006 Q3
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
Determine the least real number $M$ such that
$$
\left| ab(a^2 - b^2) + bc(b^2 - c^2) + ca(c^2 - a^2) \right|
mathlib commit https://github.com/leanprover-community/mathlib/commit/7e5137f579de09a059a5ce98f364a04e221aabf0
@@ -46,7 +46,6 @@ theorem lhs_ineq {x y : ℝ} (hxy : 0 ≤ x * y) :
calc
((x + y) ^ 2) ^ 2 - 16 * x ^ 2 * y ^ 2 = (x - y) ^ 2 * ((x + y) ^ 2 + 4 * (x * y)) := by ring
_ ≥ 0 := mul_nonneg (sq_nonneg _) <| add_nonneg (sq_nonneg _) <| mul_nonneg zero_lt_four.le hxy
-
#align imo2006_q3.lhs_ineq Imo2006Q3.lhs_ineq
theorem four_pow_four_pos : (0 : ℝ) < 4 ^ 4 :=
@@ -62,7 +61,6 @@ theorem mid_ineq {s t : ℝ} : s * t ^ 3 ≤ (3 * t + s) ^ 4 / 4 ^ 4 :=
_ ≥ 0 :=
mul_nonneg (sq_nonneg _) <|
add_nonneg (sq_nonneg _) <| mul_nonneg zero_le_two (sq_nonneg _)
-
#align imo2006_q3.mid_ineq Imo2006Q3.mid_ineq
/-- Replacing `x` and `y` with their average decreases the right side. -/
@@ -71,7 +69,6 @@ theorem rhs_ineq {x y : ℝ} : 3 * (x + y) ^ 2 ≤ 2 * (x ^ 2 + y ^ 2 + (x + y)
calc
_ = (x - y) ^ 2 := by ring
_ ≥ 0 := sq_nonneg _
-
#align imo2006_q3.rhs_ineq Imo2006Q3.rhs_ineq
theorem zero_lt_32 : (0 : ℝ) < 32 := by norm_num
@@ -89,7 +86,6 @@ theorem subst_wlog {x y z s : ℝ} (hxy : 0 ≤ x * y) (hxyz : x + y + z = 0) :
div_le_div_of_le four_pow_four_pos.le <|
pow_le_pow_of_le_left (add_nonneg (mul_nonneg zero_lt_three.le (sq_nonneg _)) hs)
(add_le_add_right rhs_ineq _) _
-
le_of_pow_le_pow _ (mul_nonneg (sqrt_nonneg _) (sq_nonneg _)) Nat.succ_pos' <|
calc
(32 * |x * y * z * s|) ^ 2 = 32 * (2 * s ^ 2 * (16 * x ^ 2 * y ^ 2 * (x + y) ^ 2)) := by
@@ -99,7 +95,6 @@ theorem subst_wlog {x y z s : ℝ} (hxy : 0 ≤ x * y) (hxyz : x + y + z = 0) :
_ = (sqrt 2 * (x ^ 2 + y ^ 2 + z ^ 2 + s ^ 2) ^ 2) ^ 2 := by
rw [mul_pow, sq_sqrt zero_le_two, hz, ← pow_mul, ← mul_add, mul_pow, ← mul_comm_div, ←
mul_assoc, show 32 / 4 ^ 4 * 2 ^ 4 = (2 : ℝ) by norm_num, show 2 * 2 = 4 by rfl]
-
#align imo2006_q3.subst_wlog Imo2006Q3.subst_wlog
/-- Proof that `M = 9 * sqrt 2 / 32` works with the substitution. -/
@@ -131,7 +126,6 @@ theorem proof₁ {a b c : ℝ} :
_ = _ := congr_arg _ <| lhs_identity a b c
_ ≤ _ := (subst_proof₁ (a - b) (b - c) (c - a) (-(a + b + c)) (by ring))
_ = _ := by ring
-
#align imo2006_q3.proof₁ Imo2006Q3.proof₁
theorem proof₂ (M : ℝ)
mathlib commit https://github.com/leanprover-community/mathlib/commit/a3209ddf94136d36e5e5c624b10b2a347cc9d090
The names for lemmas about monotonicity of (a ^ ·) and (· ^ n) were a mess. This PR tidies up everything related by following the naming convention for (a * ·) and (· * b). Namely, (a ^ ·) is pow_right and (· ^ n) is pow_left in lemma names. All lemma renames follow the corresponding multiplication lemma names closely.
Algebra.GroupPower.Orderpow_mono → pow_right_monopow_le_pow → pow_le_pow_rightpow_le_pow_of_le_left → pow_le_pow_leftpow_lt_pow_of_lt_left → pow_lt_pow_leftstrictMonoOn_pow → pow_left_strictMonoOnpow_strictMono_right → pow_right_strictMonopow_lt_pow → pow_lt_pow_rightpow_lt_pow_iff → pow_lt_pow_iff_rightpow_le_pow_iff → pow_le_pow_iff_rightself_lt_pow → lt_self_powstrictAnti_pow → pow_right_strictAntipow_lt_pow_iff_of_lt_one → pow_lt_pow_iff_right_of_lt_onepow_lt_pow_of_lt_one → pow_lt_pow_right_of_lt_onelt_of_pow_lt_pow → lt_of_pow_lt_pow_leftle_of_pow_le_pow → le_of_pow_le_pow_leftpow_lt_pow₀ → pow_lt_pow_right₀Algebra.GroupPower.CovariantClasspow_le_pow_of_le_left' → pow_le_pow_left'nsmul_le_nsmul_of_le_right → nsmul_le_nsmul_rightpow_lt_pow' → pow_lt_pow_right'nsmul_lt_nsmul → nsmul_lt_nsmul_leftpow_strictMono_left → pow_right_strictMono'nsmul_strictMono_right → nsmul_left_strictMonoStrictMono.pow_right' → StrictMono.pow_constStrictMono.nsmul_left → StrictMono.const_nsmulpow_strictMono_right' → pow_left_strictMononsmul_strictMono_left → nsmul_right_strictMonoMonotone.pow_right → Monotone.pow_constMonotone.nsmul_left → Monotone.const_nsmullt_of_pow_lt_pow' → lt_of_pow_lt_pow_left'lt_of_nsmul_lt_nsmul → lt_of_nsmul_lt_nsmul_rightpow_le_pow' → pow_le_pow_right'nsmul_le_nsmul → nsmul_le_nsmul_leftpow_le_pow_of_le_one' → pow_le_pow_right_of_le_one'nsmul_le_nsmul_of_nonpos → nsmul_le_nsmul_left_of_nonposle_of_pow_le_pow' → le_of_pow_le_pow_left'le_of_nsmul_le_nsmul' → le_of_nsmul_le_nsmul_right'pow_le_pow_iff' → pow_le_pow_iff_right'nsmul_le_nsmul_iff → nsmul_le_nsmul_iff_leftpow_lt_pow_iff' → pow_lt_pow_iff_right'nsmul_lt_nsmul_iff → nsmul_lt_nsmul_iff_leftData.Nat.PowNat.pow_lt_pow_of_lt_left → Nat.pow_lt_pow_leftNat.pow_le_iff_le_left → Nat.pow_le_pow_iff_leftNat.pow_lt_iff_lt_left → Nat.pow_lt_pow_iff_leftpow_le_pow_iff_leftpow_lt_pow_iff_leftpow_right_injectivepow_right_injNat.pow_le_pow_left to have the correct name since Nat.pow_le_pow_of_le_left is in Std.Nat.pow_le_pow_right to have the correct name since Nat.pow_le_pow_of_le_right is in Std.self_le_pow was a duplicate of le_self_pow.Nat.pow_lt_pow_of_lt_right is defeq to pow_lt_pow_right.Nat.pow_right_strictMono is defeq to pow_right_strictMono.Nat.pow_le_iff_le_right is defeq to pow_le_pow_iff_right.Nat.pow_lt_iff_lt_right is defeq to pow_lt_pow_iff_right.0 < n or 1 ≤ n to n ≠ 0.Nat lemmas have been protected.@@ -71,7 +71,7 @@ theorem subst_wlog {x y z s : ℝ} (hxy : 0 ≤ x * y) (hxyz : x + y + z = 0) :
_ ≤ (2 * (x ^ 2 + y ^ 2 + (x + y) ^ 2) + 2 * s ^ 2) ^ 4 / 4 ^ 4 := by
gcongr (?_ + _) ^ 4 / _
apply rhs_ineq
- refine le_of_pow_le_pow 2 (by positivity) (by positivity) ?_
+ refine le_of_pow_le_pow_left two_ne_zero (by positivity) ?_
calc
(32 * |x * y * z * s|) ^ 2 = 32 * (2 * s ^ 2 * (16 * x ^ 2 * y ^ 2 * (x + y) ^ 2)) := by
rw [mul_pow, sq_abs, hz]; ring
@@ -2,15 +2,12 @@
Copyright (c) 2021 Tian Chen. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Tian Chen
-
-! This file was ported from Lean 3 source module imo.imo2006_q3
-! leanprover-community/mathlib commit 308826471968962c6b59c7ff82a22757386603e3
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Analysis.SpecialFunctions.Sqrt
import Mathlib.Tactic.Polyrith
+#align_import imo.imo2006_q3 from "leanprover-community/mathlib"@"308826471968962c6b59c7ff82a22757386603e3"
+
/-!
# IMO 2006 Q3
@@ -9,6 +9,7 @@ Authors: Tian Chen
! if you have ported upstream changes.
-/
import Mathlib.Analysis.SpecialFunctions.Sqrt
+import Mathlib.Tactic.Polyrith
/-!
# IMO 2006 Q3
@@ -39,61 +40,49 @@ namespace Imo2006Q3
/-- Replacing `x` and `y` with their average increases the left side. -/
theorem lhs_ineq {x y : ℝ} (hxy : 0 ≤ x * y) :
16 * x ^ 2 * y ^ 2 * (x + y) ^ 2 ≤ ((x + y) ^ 2) ^ 3 := by
- conv_rhs => rw [pow_succ']
- refine' mul_le_mul_of_nonneg_right _ (sq_nonneg _)
- apply le_of_sub_nonneg
- calc
- ((x + y) ^ 2) ^ 2 - 16 * x ^ 2 * y ^ 2 = (x - y) ^ 2 * ((x + y) ^ 2 + 4 * (x * y)) := by ring
- _ ≥ 0 := mul_nonneg (sq_nonneg _) <| add_nonneg (sq_nonneg _) <| mul_nonneg zero_lt_four.le hxy
+ 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
#align imo2006_q3.lhs_ineq Imo2006Q3.lhs_ineq
-theorem four_pow_four_pos : (0 : ℝ) < 4 ^ 4 :=
- pow_pos zero_lt_four _
+theorem four_pow_four_pos : (0 : ℝ) < 4 ^ 4 := by norm_num
#align imo2006_q3.four_pow_four_pos Imo2006Q3.four_pow_four_pos
-theorem mid_ineq {s t : ℝ} : s * t ^ 3 ≤ (3 * t + s) ^ 4 / 4 ^ 4 :=
- (le_div_iff four_pow_four_pos).mpr <|
- le_of_sub_nonneg <|
- calc
- (3 * t + s) ^ 4 - s * t ^ 3 * 4 ^ 4 = (s - t) ^ 2 * ((s + 7 * t) ^ 2 + 2 * (4 * t) ^ 2) :=
- by ring
- _ ≥ 0 :=
- mul_nonneg (sq_nonneg _) <|
- add_nonneg (sq_nonneg _) <| mul_nonneg zero_le_two (sq_nonneg _)
+theorem mid_ineq {s t : ℝ} : s * t ^ 3 ≤ (3 * t + s) ^ 4 / 4 ^ 4 := by
+ rw [le_div_iff four_pow_four_pos]
+ have : 0 ≤ (s - t) ^ 2 * ((s + 7 * t) ^ 2 + 2 * (4 * t) ^ 2) := by positivity
+ linarith
#align imo2006_q3.mid_ineq Imo2006Q3.mid_ineq
/-- Replacing `x` and `y` with their average decreases the right side. -/
-theorem rhs_ineq {x y : ℝ} : 3 * (x + y) ^ 2 ≤ 2 * (x ^ 2 + y ^ 2 + (x + y) ^ 2) :=
- le_of_sub_nonneg <|
- calc
- _ = (x - y) ^ 2 := by ring
- _ ≥ 0 := sq_nonneg _
+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
#align imo2006_q3.rhs_ineq Imo2006Q3.rhs_ineq
theorem zero_lt_32 : (0 : ℝ) < 32 := by norm_num
#align imo2006_q3.zero_lt_32 Imo2006Q3.zero_lt_32
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 :=
- have hz : (x + y) ^ 2 = z ^ 2 := neg_eq_of_add_eq_zero_right hxyz ▸ (neg_sq _).symm
- have hs : 0 ≤ 2 * s ^ 2 := mul_nonneg zero_le_two (sq_nonneg s)
+ 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) ≤ (3 * (x + y) ^ 2 + 2 * s ^ 2) ^ 4 / 4 ^ 4 :=
- le_trans (mul_le_mul_of_nonneg_left (lhs_ineq hxy) hs) mid_ineq
- _ ≤ (2 * (x ^ 2 + y ^ 2 + (x + y) ^ 2) + 2 * s ^ 2) ^ 4 / 4 ^ 4 :=
- div_le_div_of_le four_pow_four_pos.le <|
- pow_le_pow_of_le_left (add_nonneg (mul_nonneg zero_lt_three.le (sq_nonneg _)) hs)
- (add_le_add_right rhs_ineq _) _
- le_of_pow_le_pow _ (mul_nonneg (sqrt_nonneg _) (sq_nonneg _)) Nat.succ_pos' <|
- calc
- (32 * |x * y * z * s|) ^ 2 = 32 * (2 * s ^ 2 * (16 * x ^ 2 * y ^ 2 * (x + y) ^ 2)) := by
- rw [mul_pow, sq_abs, hz]; ring
- _ ≤ 32 * ((2 * (x ^ 2 + y ^ 2 + (x + y) ^ 2) + 2 * s ^ 2) ^ 4 / 4 ^ 4) :=
- (mul_le_mul_of_nonneg_left this zero_lt_32.le)
- _ = (sqrt 2 * (x ^ 2 + y ^ 2 + z ^ 2 + s ^ 2) ^ 2) ^ 2 := by
- rw [mul_pow, sq_sqrt zero_le_two, hz, ← pow_mul, ← mul_add, mul_pow, ← mul_comm_div,
- ← mul_assoc, show 32 / 4 ^ 4 * 2 ^ 4 = (2 : ℝ) by norm_num, show 2 * 2 = 4 by rfl]
+ 2 * s ^ 2 * (16 * x ^ 2 * y ^ 2 * (x + y) ^ 2)
+ ≤ _ * _ ^ 3 := by gcongr; exact lhs_ineq hxy
+ _ ≤ (3 * (x + y) ^ 2 + 2 * s ^ 2) ^ 4 / 4 ^ 4 := mid_ineq
+ _ ≤ (2 * (x ^ 2 + y ^ 2 + (x + y) ^ 2) + 2 * s ^ 2) ^ 4 / 4 ^ 4 := by
+ gcongr (?_ + _) ^ 4 / _
+ apply rhs_ineq
+ refine le_of_pow_le_pow 2 (by positivity) (by positivity) ?_
+ calc
+ (32 * |x * y * z * s|) ^ 2 = 32 * (2 * s ^ 2 * (16 * x ^ 2 * y ^ 2 * (x + y) ^ 2)) := by
+ rw [mul_pow, sq_abs, hz]; ring
+ _ ≤ 32 * ((2 * (x ^ 2 + y ^ 2 + (x + y) ^ 2) + 2 * s ^ 2) ^ 4 / 4 ^ 4) := by gcongr
+ _ = (sqrt 2 * (x ^ 2 + y ^ 2 + z ^ 2 + s ^ 2) ^ 2) ^ 2 := by
+ field_simp
+ rw [mul_pow, sq_sqrt zero_le_two, hz]
+ ring
#align imo2006_q3.subst_wlog Imo2006Q3.subst_wlog
/-- Proof that `M = 9 * sqrt 2 / 32` works with the substitution. -/
@@ -103,26 +92,16 @@ theorem subst_proof₁ (x y z s : ℝ) (hxyz : x + y + z = 0) :
· rw [div_mul_eq_mul_div, le_div_iff' zero_lt_32]
exact subst_wlog h' hxyz
cases' (mul_nonneg_of_three x y z).resolve_left h' with h h
- · specialize this y z x _ h
- · rw [← hxyz]; ring
- · convert this using 2 <;> ring
- · specialize this z x y _ h
- · rw [← hxyz]; ring
- · convert this using 2 <;> ring
+ · convert this y z x _ h using 2 <;> linarith
+ · convert this z x y _ h using 2 <;> linarith
#align imo2006_q3.subst_proof₁ Imo2006Q3.subst_proof₁
-theorem lhs_identity (a b c : ℝ) :
- a * b * (a ^ 2 - b ^ 2) + b * c * (b ^ 2 - c ^ 2) + c * a * (c ^ 2 - a ^ 2) =
- (a - b) * (b - c) * (c - a) * -(a + b + c) :=
- by ring
-#align imo2006_q3.lhs_identity Imo2006Q3.lhs_identity
-
theorem proof₁ {a b c : ℝ} :
|a * b * (a ^ 2 - b ^ 2) + b * c * (b ^ 2 - c ^ 2) + c * a * (c ^ 2 - a ^ 2)| ≤
9 * sqrt 2 / 32 * (a ^ 2 + b ^ 2 + c ^ 2) ^ 2 :=
calc
- _ = _ := congr_arg _ <| lhs_identity a b c
- _ ≤ _ := (subst_proof₁ (a - b) (b - c) (c - a) (-(a + b + c)) (by ring))
+ _ = |(a - b) * (b - c) * (c - a) * -(a + b + c)| := by ring_nf
+ _ ≤ _ := subst_proof₁ (a - b) (b - c) (c - a) (-(a + b + c)) (by ring)
_ = _ := by ring
#align imo2006_q3.proof₁ Imo2006Q3.proof₁
@@ -131,18 +110,19 @@ theorem proof₂ (M : ℝ)
|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
- have h₁ :
- ∀ x : ℝ,
- (2 - 3 * x - 2) * (2 - (2 + 3 * x)) * (2 + 3 * x - (2 - 3 * x)) *
- -(2 - 3 * x + 2 + (2 + 3 * x)) =
- -(18 ^ 2 * x ^ 2 * x) :=
- by intro; ring
- have h₂ : ∀ x : ℝ, (2 - 3 * x) ^ 2 + 2 ^ 2 + (2 + 3 * x) ^ 2 = 18 * x ^ 2 + 12 := by intro; ring
- have := h (2 - 3 * sqrt 2) 2 (2 + 3 * sqrt 2)
- rw [lhs_identity, h₁, h₂, sq_sqrt zero_le_two, abs_neg, abs_eq_self.mpr, ← div_le_iff] at this
- · convert this using 1; ring
- · apply pow_pos; norm_num
- · exact mul_nonneg (mul_nonneg (sq_nonneg _) zero_le_two) (sqrt_nonneg _)
+ set α := sqrt (2:ℝ)
+ have hα : α ^ 2 = 2 := sq_sqrt (by norm_num)
+ let a := 2 - 3 * α
+ let c := 2 + 3 * α
+ calc _ = 18 ^ 2 * 2 * α / 48 ^ 2 := by ring
+ _ ≤ M := ?_
+ rw [div_le_iff (by positivity)]
+ calc 18 ^ 2 * 2 * α
+ = 18 ^ 2 * α ^ 2 * α := by linear_combination -324 * α * hα
+ _ = abs (-(18 ^ 2 * α ^ 2 * α)) := by rw [abs_neg, abs_of_nonneg]; positivity
+ _ = |a * 2 * (a ^ 2 - 2 ^ 2) + 2 * c * (2 ^ 2 - c ^ 2) + c * a * (c ^ 2 - a ^ 2)| := by ring_nf
+ _ ≤ M * (a ^ 2 + 2 ^ 2 + c ^ 2) ^ 2 := by apply h
+ _ = M * 48 ^ 2 := by linear_combination (324 * α ^ 2 + 1080) * M * hα
#align imo2006_q3.proof₂ Imo2006Q3.proof₂
end Imo2006Q3
@@ -154,5 +134,5 @@ theorem imo2006_q3 (M : ℝ) :
|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 :=
- ⟨proof₂ M, fun h _ _ _ => le_trans proof₁ <| mul_le_mul_of_nonneg_right h <| sq_nonneg _⟩
+ ⟨proof₂ M, fun h _ _ _ => proof₁.trans (by gcongr)⟩
#align imo2006_q3 imo2006_q3
The unported dependencies are
algebra.order.moduleinit.corelinear_algebra.free_module.finite.rankalgebra.order.monoid.cancel.defsalgebra.absalgebra.group_power.lemmasinit.data.list.basiclinear_algebra.free_module.rankalgebra.order.monoid.cancel.basicinit.data.list.defaulttopology.subset_propertiesinit.logicThe following 1 dependencies have changed in mathlib3 since they were ported, which may complicate porting this file