imo.imo2008_q2
⟷
Archive.Imo.Imo2008Q2
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)
(no changes)
(no changes)
(no changes)
(last sync)
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,8 +3,8 @@ Copyright (c) 2021 Manuel Candales. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Manuel Candales
-/
-import Mathbin.Data.Real.Basic
-import Mathbin.Data.Set.Finite
+import Data.Real.Basic
+import Data.Set.Finite
#align_import imo.imo2008_q2 from "leanprover-community/mathlib"@"08b081ea92d80e3a41f899eea36ef6d56e0f1db0"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,15 +2,12 @@
Copyright (c) 2021 Manuel Candales. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Manuel Candales
-
-! This file was ported from Lean 3 source module imo.imo2008_q2
-! 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.Data.Real.Basic
import Mathbin.Data.Set.Finite
+#align_import imo.imo2008_q2 from "leanprover-community/mathlib"@"08b081ea92d80e3a41f899eea36ef6d56e0f1db0"
+
/-!
# IMO 2008 Q2
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: Manuel Candales
! This file was ported from Lean 3 source module imo.imo2008_q2
-! leanprover-community/mathlib commit 5f25c089cb34db4db112556f23c50d12da81b297
+! 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.Data.Set.Finite
/-!
# IMO 2008 Q2
+
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
(a) Prove that
```
x^2 / (x-1)^2 + y^2 / (y-1)^2 + z^2 / (z-1)^2 ≥ 1
mathlib commit https://github.com/leanprover-community/mathlib/commit/7e5137f579de09a059a5ce98f364a04e221aabf0
@@ -102,7 +102,6 @@ theorem imo2008_q2b : Set.Infinite rationalSolutions :=
(x ^ 2 * t ^ 4 + y ^ 2 * (t + 1) ^ 4 + z ^ 2) / (t ^ 2 + t + 1) ^ 2 :=
by rw [hx1, hy1, hz1]; field_simp
_ = 1 := by rw [hx_t, hy_t, hz_t]; field_simp; ring
-
exact ⟨h₁, h₂, h₃, h₄, h₅, h₆⟩
have hW_inf : Set.Infinite W :=
by
@@ -133,7 +132,6 @@ theorem imo2008_q2b : Set.Infinite rationalSolutions :=
_ ≤ t := (le_max_left (q + 1) 1)
_ ≤ t + t ^ 2 := by linarith [sq_nonneg t]
_ = t * (t + 1) := by ring
-
exact ⟨h₁, h₂⟩
have hK_inf : Set.Infinite K := by intro h; apply hK_not_bdd; exact Set.Finite.bddAbove h
exact hK_inf.of_image g
mathlib commit https://github.com/leanprover-community/mathlib/commit/a3209ddf94136d36e5e5c624b10b2a347cc9d090
@@ -103,9 +103,9 @@ theorem imo2008_q2b : Set.Infinite rationalSolutions := by
set z : ℚ := -t * (t + 1) with hz_def
simp only [t, W, K, g, Set.mem_image, Prod.exists]
use x, y, z; constructor
- simp only [Set.mem_setOf_eq]
- · use x, y, z; constructor
- rfl
+ · simp only [Set.mem_setOf_eq]
+ use x, y, z; constructor
+ · rfl
· use t; constructor
· simp only [t, gt_iff_lt, lt_max_iff]; right; trivial
exact ⟨rfl, rfl, rfl⟩
@@ -114,7 +114,7 @@ theorem imo2008_q2b : Set.Infinite rationalSolutions := by
have h₂ : q < t * (t + 1) := by
calc
q < q + 1 := by linarith
- _ ≤ t := (le_max_left (q + 1) 1)
+ _ ≤ t := le_max_left (q + 1) 1
_ ≤ t + t ^ 2 := by linarith [sq_nonneg t]
_ = t * (t + 1) := by ring
exact ⟨h₁, h₂⟩
@@ -101,13 +101,13 @@ theorem imo2008_q2b : Set.Infinite rationalSolutions := by
let x : ℚ := -(t + 1) / t ^ 2
let y : ℚ := t / (t + 1) ^ 2
set z : ℚ := -t * (t + 1) with hz_def
- simp only [Set.mem_image, Prod.exists]
+ simp only [t, W, K, g, Set.mem_image, Prod.exists]
use x, y, z; constructor
simp only [Set.mem_setOf_eq]
· use x, y, z; constructor
rfl
· use t; constructor
- · simp only [gt_iff_lt, lt_max_iff]; right; trivial
+ · simp only [t, gt_iff_lt, lt_max_iff]; right; trivial
exact ⟨rfl, rfl, rfl⟩
· have hg : -z = g (x, y, z) := rfl
rw [hg, hz_def]; ring
have
, replace
and suffices
(#10640)
No changes to tactic file, it's just boring fixes throughout the library.
This follows on from #6964.
Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@@ -72,7 +72,7 @@ theorem imo2008_q2b : Set.Infinite rationalSolutions := by
simp only [Set.mem_setOf_eq] at hs_in_W ⊢
rcases hs_in_W with ⟨x, y, z, h₁, t, ht_gt_zero, hx_t, hy_t, hz_t⟩
use x, y, z
- have key_gt_zero : t ^ 2 + t + 1 > 0; linarith [pow_pos ht_gt_zero 2, ht_gt_zero]
+ have key_gt_zero : t ^ 2 + t + 1 > 0 := by linarith [pow_pos ht_gt_zero 2, ht_gt_zero]
have h₂ : x ≠ 1 := by rw [hx_t]; field_simp; linarith [key_gt_zero]
have h₃ : y ≠ 1 := by rw [hy_t]; field_simp; linarith [key_gt_zero]
have h₄ : z ≠ 1 := by rw [hz_t]; linarith [key_gt_zero]
@[gcongr]
tags around (#9393)
import Mathlib.Tactic.GCongr.Core
to Algebra/Order/Ring/Lemmas
.@[gcongr]
tags next to the lemmas.See Zulip thread
Co-authored-by: Jeremy Tan Jie Rui <reddeloostw@gmail.com>
@@ -3,6 +3,7 @@ Copyright (c) 2021 Manuel Candales. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Manuel Candales
-/
+import Mathlib.Algebra.Parity
import Mathlib.Data.Real.Basic
import Mathlib.Data.Set.Finite
import Mathlib.Tactic.FieldSimp
@@ -5,6 +5,9 @@ Authors: Manuel Candales
-/
import Mathlib.Data.Real.Basic
import Mathlib.Data.Set.Finite
+import Mathlib.Tactic.FieldSimp
+import Mathlib.Tactic.Abel
+import Mathlib.Tactic.Linarith
#align_import imo.imo2008_q2 from "leanprover-community/mathlib"@"5f25c089cb34db4db112556f23c50d12da81b297"
The main reasons is that having h : 0 < denom
in the context should suffice for field_simp
to do its job, without the need to manually pass h.ne
or similar.
Quite a few have := … ≠ 0
could be dropped, and some field_simp
calls no longer need explicit arguments; this is promising.
This does break some proofs where field_simp
was not used as a closing tactic, and it now
shuffles terms around a bit different. These were fixed. Using field_simp
in the middle of a proof seems rather fragile anyways.
As a drive-by contribution, positivity
now knows about π > 0
.
fixes: #4835
Co-authored-by: Matthew Ballard <matt@mrb.email>
@@ -68,10 +68,7 @@ theorem imo2008_q2b : Set.Infinite rationalSolutions := by
simp only [Set.mem_setOf_eq] at hs_in_W ⊢
rcases hs_in_W with ⟨x, y, z, h₁, t, ht_gt_zero, hx_t, hy_t, hz_t⟩
use x, y, z
- have ht_ne_zero : t ≠ 0 := ne_of_gt ht_gt_zero
- have ht1_ne_zero : t + 1 ≠ 0; linarith [ht_gt_zero]
have key_gt_zero : t ^ 2 + t + 1 > 0; linarith [pow_pos ht_gt_zero 2, ht_gt_zero]
- have key_ne_zero : t ^ 2 + t + 1 ≠ 0 := ne_of_gt key_gt_zero
have h₂ : x ≠ 1 := by rw [hx_t]; field_simp; linarith [key_gt_zero]
have h₃ : y ≠ 1 := by rw [hy_t]; field_simp; linarith [key_gt_zero]
have h₄ : z ≠ 1 := by rw [hz_t]; linarith [key_gt_zero]
@@ -38,8 +38,7 @@ theorem subst_abc {x y z : ℝ} (h : x * y * z = 1) :
have := h.symm ▸ one_ne_zero
simpa [not_or] using this
have : z * (y * x) = 1 := by rw [← h]; ac_rfl
- -- Porting note: Originally `field_simp [*]`, but `*` doesn't work (see #5689)
- field_simp [hx, this]
+ field_simp [*]
#align imo2008_q2.subst_abc Imo2008Q2.subst_abc
theorem imo2008_q2a (x y z : ℝ) (h : x * y * z = 1) (hx : x ≠ 1) (hy : y ≠ 1) (hz : z ≠ 1) :
@@ -2,15 +2,12 @@
Copyright (c) 2021 Manuel Candales. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Manuel Candales
-
-! This file was ported from Lean 3 source module imo.imo2008_q2
-! leanprover-community/mathlib commit 5f25c089cb34db4db112556f23c50d12da81b297
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Data.Real.Basic
import Mathlib.Data.Set.Finite
+#align_import imo.imo2008_q2 from "leanprover-community/mathlib"@"5f25c089cb34db4db112556f23c50d12da81b297"
+
/-!
# IMO 2008 Q2
(a) Prove that
Two simp lemmas were removed with porting notes because the LHS already simplified. I think instead they should have had their priority increased.
Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Johan Commelin <johan@commelin.net>
The unported dependencies are