wiedijk_100_theorems.abel_ruffini ⟷
Archive.Wiedijk100Theorems.AbelRuffini
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)
(last sync)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -3,8 +3,8 @@ Copyright (c) 2021 Thomas Browning. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Browning
-/
-import Analysis.Calculus.LocalExtr
-import Data.Nat.PrimeNormNum
+import Analysis.Calculus.LocalExtr.Basic
+import Tactic.NormNum.Prime
import FieldTheory.AbelRuffini
import RingTheory.RootsOfUnity.Minpoly
import RingTheory.EisensteinCriterion
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -94,7 +94,7 @@ theorem irreducible_Phi (p : ℕ) (hp : p.Prime) (hpa : p ∣ a) (hpb : p ∣ b)
exact_mod_cast mt nat.dvd_one.mp hp.ne_one
· intro n hn
rw [mem_span_singleton]
- rw [degree_Phi, WithBot.coe_lt_coe] at hn
+ rw [degree_Phi, WithBot.coe_lt_coe] at hn
interval_cases hn : n <;>
simp only [Φ, coeff_X_pow, coeff_C, int.coe_nat_dvd.mpr, hpb, if_true, coeff_C_mul, if_false,
Nat.zero_ne_bit1, eq_self_iff_true, coeff_X_zero, hpa, coeff_add, zero_add,
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -131,7 +131,7 @@ theorem real_roots_Phi_ge_aux (hab : b < a) :
· have hf1 : f 1 < 0 := by norm_num [hf, hb]
have hfa : 0 ≤ f a := by
simp_rw [hf, ← sq]
- refine' add_nonneg (sub_nonneg.mpr (pow_le_pow ha _)) _ <;> norm_num
+ refine' add_nonneg (sub_nonneg.mpr (pow_le_pow_right ha _)) _ <;> norm_num
obtain ⟨x, ⟨-, hx1⟩, hx2⟩ := intermediate_value_Ico' hle (hc _) (set.mem_Ioc.mpr ⟨hf1, hf0⟩)
obtain ⟨y, ⟨hy1, -⟩, hy2⟩ := intermediate_value_Ioc ha (hc _) (set.mem_Ioc.mpr ⟨hf1, hfa⟩)
exact ⟨x, y, (hx1.trans hy1).Ne, hx2, hy2⟩
@@ -141,7 +141,7 @@ theorem real_roots_Phi_ge_aux (hab : b < a) :
calc
f (-a) = a ^ 2 - a ^ 5 + b := by norm_num [hf, ← sq]
_ ≤ a ^ 2 - a ^ 3 + (a - 1) := by
- refine' add_le_add (sub_le_sub_left (pow_le_pow ha _) _) _ <;> linarith
+ refine' add_le_add (sub_le_sub_left (pow_le_pow_right ha _) _) _ <;> linarith
_ = -(a - 1) ^ 2 * (a + 1) := by ring
_ ≤ 0 := by nlinarith
have ha' := neg_nonpos.mpr (hle.trans ha)
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,11 +3,11 @@ Copyright (c) 2021 Thomas Browning. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Browning
-/
-import Mathbin.Analysis.Calculus.LocalExtr
-import Mathbin.Data.Nat.PrimeNormNum
-import Mathbin.FieldTheory.AbelRuffini
-import Mathbin.RingTheory.RootsOfUnity.Minpoly
-import Mathbin.RingTheory.EisensteinCriterion
+import Analysis.Calculus.LocalExtr
+import Data.Nat.PrimeNormNum
+import FieldTheory.AbelRuffini
+import RingTheory.RootsOfUnity.Minpoly
+import RingTheory.EisensteinCriterion
#align_import wiedijk_100_theorems.abel_ruffini from "leanprover-community/mathlib"@"08b081ea92d80e3a41f899eea36ef6d56e0f1db0"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,11 +2,6 @@
Copyright (c) 2021 Thomas Browning. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Browning
-
-! This file was ported from Lean 3 source module wiedijk_100_theorems.abel_ruffini
-! 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.Calculus.LocalExtr
import Mathbin.Data.Nat.PrimeNormNum
@@ -14,6 +9,8 @@ import Mathbin.FieldTheory.AbelRuffini
import Mathbin.RingTheory.RootsOfUnity.Minpoly
import Mathbin.RingTheory.EisensteinCriterion
+#align_import wiedijk_100_theorems.abel_ruffini from "leanprover-community/mathlib"@"08b081ea92d80e3a41f899eea36ef6d56e0f1db0"
+
/-!
# Construction of an algebraic number that is not solvable by radicals.
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: Thomas Browning
! This file was ported from Lean 3 source module wiedijk_100_theorems.abel_ruffini
-! leanprover-community/mathlib commit 5563b1b49e86e135e8c7b556da5ad2f5ff881cad
+! leanprover-community/mathlib commit 08b081ea92d80e3a41f899eea36ef6d56e0f1db0
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -17,6 +17,9 @@ import Mathbin.RingTheory.EisensteinCriterion
/-!
# Construction of an algebraic number that is not solvable by radicals.
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
The main ingredients are:
* `solvable_by_rad.is_solvable'` in `field_theory/abel_ruffini` :
an irreducible polynomial with an `is_solvable_by_rad` root has solvable Galois group
mathlib commit https://github.com/leanprover-community/mathlib/commit/8b981918a93bc45a8600de608cde7944a80d92b9
@@ -154,7 +154,7 @@ theorem real_roots_Phi_ge (hab : b < a) : 2 ≤ Fintype.card ((Φ ℚ a b).rootS
have q_ne_zero : Φ ℚ a b ≠ 0 := (monic_Phi a b).NeZero
obtain ⟨x, y, hxy, hx, hy⟩ := real_roots_Phi_ge_aux a b hab
have key : ↑({x, y} : Finset ℝ) ⊆ (Φ ℚ a b).rootSet ℝ := by
- simp [Set.insert_subset, mem_root_set_of_ne q_ne_zero, hx, hy]
+ simp [Set.insert_subset_iff, mem_root_set_of_ne q_ne_zero, hx, hy]
convert Fintype.card_le_of_embedding (Set.embeddingOfSubset _ _ key)
simp only [Finset.coe_sort_coe, Fintype.card_coe, Finset.card_singleton,
Finset.card_insert_of_not_mem (mt finset.mem_singleton.mp hxy)]
mathlib commit https://github.com/leanprover-community/mathlib/commit/93f880918cb51905fd51b76add8273cbc27718ab
@@ -179,7 +179,7 @@ theorem not_solvable_by_rad (p : ℕ) (x : ℂ) (hx : aeval x (Φ ℚ a b) = 0)
(hp : p.Prime) (hpa : p ∣ a) (hpb : p ∣ b) (hp2b : ¬p ^ 2 ∣ b) : ¬IsSolvableByRad ℚ x :=
by
have h_irred := irreducible_Phi a b p hp hpa hpb hp2b
- apply mt (solvableByRad.is_solvable' h_irred hx)
+ apply mt (solvableByRad.isSolvable' h_irred hx)
intro h
refine'
Equiv.Perm.not_solvable _ (le_of_eq _) (solvable_of_surjective (gal_Phi a b hab h_irred).2)
mathlib commit https://github.com/leanprover-community/mathlib/commit/893964fc28cefbcffc7cb784ed00a2895b4e65cf
@@ -3,8 +3,8 @@ Copyright (c) 2021 Thomas Browning. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Browning
-! This file was ported from Lean 3 source module «100-theorems-list».«16_abel_ruffini»
-! leanprover-community/mathlib commit 7fdeecc0d03cd40f7a165e6cf00a4d2286db599f
+! This file was ported from Lean 3 source module wiedijk_100_theorems.abel_ruffini
+! leanprover-community/mathlib commit 5563b1b49e86e135e8c7b556da5ad2f5ff881cad
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -93,7 +93,7 @@ theorem irreducible_Phi (p : ℕ) (hp : p.Prime) (hpa : p ∣ a) (hpb : p ∣ b)
· intro n hn
rw [mem_span_singleton]
rw [degree_Phi] at hn; norm_cast at hn
- interval_cases hn : n <;>
+ interval_cases n <;>
simp (config := {decide := true}) only [Φ, coeff_X_pow, coeff_C, Int.natCast_dvd_natCast.mpr,
hpb, if_true, coeff_C_mul, if_false, coeff_X_zero, hpa, coeff_add, zero_add, mul_zero,
coeff_sub, add_zero, zero_sub, dvd_neg, neg_zero, dvd_mul_of_dvd_left]
@@ -85,21 +85,22 @@ theorem monic_Phi : (Φ R a b).Monic :=
theorem irreducible_Phi (p : ℕ) (hp : p.Prime) (hpa : p ∣ a) (hpb : p ∣ b) (hp2b : ¬p ^ 2 ∣ b) :
Irreducible (Φ ℚ a b) := by
rw [← map_Phi a b (Int.castRingHom ℚ), ← IsPrimitive.Int.irreducible_iff_irreducible_map_cast]
- apply irreducible_of_eisenstein_criterion
- · rwa [span_singleton_prime (Int.natCast_ne_zero.mpr hp.ne_zero), Int.prime_iff_natAbs_prime]
- · rw [leadingCoeff_Phi, mem_span_singleton]
- exact mod_cast mt Nat.dvd_one.mp hp.ne_one
- · intro n hn
- rw [mem_span_singleton]
- rw [degree_Phi] at hn; norm_cast at hn
- interval_cases hn : n <;>
- simp (config := {decide := true}) only [Φ, coeff_X_pow, coeff_C, Int.natCast_dvd_natCast.mpr,
- hpb, if_true, coeff_C_mul, if_false, coeff_X_zero, hpa, coeff_add, zero_add, mul_zero,
- coeff_sub, add_zero, zero_sub, dvd_neg, neg_zero, dvd_mul_of_dvd_left]
- · simp only [degree_Phi, ← WithBot.coe_zero, WithBot.coe_lt_coe, Nat.succ_pos']
- decide
- · rw [coeff_zero_Phi, span_singleton_pow, mem_span_singleton]
- exact mt Int.natCast_dvd_natCast.mp hp2b
+ on_goal 1 =>
+ apply irreducible_of_eisenstein_criterion
+ · rwa [span_singleton_prime (Int.natCast_ne_zero.mpr hp.ne_zero), Int.prime_iff_natAbs_prime]
+ · rw [leadingCoeff_Phi, mem_span_singleton]
+ exact mod_cast mt Nat.dvd_one.mp hp.ne_one
+ · intro n hn
+ rw [mem_span_singleton]
+ rw [degree_Phi] at hn; norm_cast at hn
+ interval_cases hn : n <;>
+ simp (config := {decide := true}) only [Φ, coeff_X_pow, coeff_C, Int.natCast_dvd_natCast.mpr,
+ hpb, if_true, coeff_C_mul, if_false, coeff_X_zero, hpa, coeff_add, zero_add, mul_zero,
+ coeff_sub, add_zero, zero_sub, dvd_neg, neg_zero, dvd_mul_of_dvd_left]
+ · simp only [degree_Phi, ← WithBot.coe_zero, WithBot.coe_lt_coe, Nat.succ_pos']
+ decide
+ · rw [coeff_zero_Phi, span_singleton_pow, mem_span_singleton]
+ exact mt Int.natCast_dvd_natCast.mp hp2b
all_goals exact Monic.isPrimitive (monic_Phi a b)
#align abel_ruffini.irreducible_Phi AbelRuffini.irreducible_Phi
@@ -127,8 +127,7 @@ theorem real_roots_Phi_ge_aux (hab : b < a) :
by_cases hb : (1 : ℝ) - a + b < 0
· have hf1 : f 1 < 0 := by simp [hf, hb]
have hfa : 0 ≤ f a := by
- -- Porting note: was `simp_rw`
- simp only [hf, ← sq]
+ simp_rw [hf, ← sq]
refine' add_nonneg (sub_nonneg.mpr (pow_le_pow_right ha _)) _ <;> norm_num
obtain ⟨x, ⟨-, hx1⟩, hx2⟩ := intermediate_value_Ico' hle (hc _) (Set.mem_Ioc.mpr ⟨hf1, hf0⟩)
obtain ⟨y, ⟨hy1, -⟩, hy2⟩ := intermediate_value_Ioc ha (hc _) (Set.mem_Ioc.mpr ⟨hf1, hfa⟩)
coe_nat to natCast (#11637)
Reduce the diff of #11499
All in the Int namespace:
ofNat_eq_cast → ofNat_eq_natCastcast_eq_cast_iff_Nat → natCast_injnatCast_eq_ofNat → ofNat_eq_natCastcoe_nat_sub → natCast_subcoe_nat_nonneg → natCast_nonnegsign_coe_add_one → sign_natCast_add_onenat_succ_eq_int_succ → natCast_succsucc_neg_nat_succ → succ_neg_natCast_succcoe_pred_of_pos → natCast_pred_of_poscoe_nat_div → natCast_divcoe_nat_ediv → natCast_edivsign_coe_nat_of_nonzero → sign_natCast_of_ne_zerotoNat_coe_nat → toNat_natCasttoNat_coe_nat_add_one → toNat_natCast_add_onecoe_nat_dvd → natCast_dvd_natCastcoe_nat_dvd_left → natCast_dvdcoe_nat_dvd_right → dvd_natCastle_coe_nat_sub → le_natCast_subsucc_coe_nat_pos → succ_natCast_poscoe_nat_modEq_iff → natCast_modEq_iffcoe_natAbs → natCast_natAbscoe_nat_eq_zero → natCast_eq_zerocoe_nat_ne_zero → natCast_ne_zerocoe_nat_ne_zero_iff_pos → natCast_ne_zero_iff_posabs_coe_nat → abs_natCastcoe_nat_nonpos_iff → natCast_nonpos_iffAlso rename Nat.coe_nat_dvd to Nat.cast_dvd_cast
@@ -86,20 +86,20 @@ theorem irreducible_Phi (p : ℕ) (hp : p.Prime) (hpa : p ∣ a) (hpb : p ∣ b)
Irreducible (Φ ℚ a b) := by
rw [← map_Phi a b (Int.castRingHom ℚ), ← IsPrimitive.Int.irreducible_iff_irreducible_map_cast]
apply irreducible_of_eisenstein_criterion
- · rwa [span_singleton_prime (Int.coe_nat_ne_zero.mpr hp.ne_zero), Int.prime_iff_natAbs_prime]
+ · rwa [span_singleton_prime (Int.natCast_ne_zero.mpr hp.ne_zero), Int.prime_iff_natAbs_prime]
· rw [leadingCoeff_Phi, mem_span_singleton]
exact mod_cast mt Nat.dvd_one.mp hp.ne_one
· intro n hn
rw [mem_span_singleton]
rw [degree_Phi] at hn; norm_cast at hn
interval_cases hn : n <;>
- simp (config := {decide := true}) only [Φ, coeff_X_pow, coeff_C, Int.coe_nat_dvd.mpr, hpb,
- if_true, coeff_C_mul, if_false, coeff_X_zero, hpa, coeff_add, zero_add, mul_zero, coeff_sub,
- add_zero, zero_sub, dvd_neg, neg_zero, dvd_mul_of_dvd_left]
+ simp (config := {decide := true}) only [Φ, coeff_X_pow, coeff_C, Int.natCast_dvd_natCast.mpr,
+ hpb, if_true, coeff_C_mul, if_false, coeff_X_zero, hpa, coeff_add, zero_add, mul_zero,
+ coeff_sub, add_zero, zero_sub, dvd_neg, neg_zero, dvd_mul_of_dvd_left]
· simp only [degree_Phi, ← WithBot.coe_zero, WithBot.coe_lt_coe, Nat.succ_pos']
decide
· rw [coeff_zero_Phi, span_singleton_pow, mem_span_singleton]
- exact mt Int.coe_nat_dvd.mp hp2b
+ exact mt Int.natCast_dvd_natCast.mp hp2b
all_goals exact Monic.isPrimitive (monic_Phi a b)
#align abel_ruffini.irreducible_Phi AbelRuffini.irreducible_Phi
This is a very large PR, but it has been reviewed piecemeal already in PRs to the bump/v4.7.0 branch as we update to intermediate nightlies.
Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Kyle Miller <kmill31415@gmail.com> Co-authored-by: damiano <adomani@gmail.com>
@@ -103,6 +103,7 @@ theorem irreducible_Phi (p : ℕ) (hp : p.Prime) (hpa : p ∣ a) (hpb : p ∣ b)
all_goals exact Monic.isPrimitive (monic_Phi a b)
#align abel_ruffini.irreducible_Phi AbelRuffini.irreducible_Phi
+set_option tactic.skipAssignedInstances false in
theorem real_roots_Phi_le : Fintype.card ((Φ ℚ a b).rootSet ℝ) ≤ 3 := by
rw [← map_Phi a b (algebraMap ℤ ℚ), Φ, ← one_mul (X ^ 5), ← C_1]
refine' (card_rootSet_le_derivative _).trans
@@ -114,6 +115,7 @@ theorem real_roots_Phi_le : Fintype.card ((Φ ℚ a b).rootSet ℝ) ≤ 3 := by
norm_num
#align abel_ruffini.real_roots_Phi_le AbelRuffini.real_roots_Phi_le
+set_option tactic.skipAssignedInstances false in
theorem real_roots_Phi_ge_aux (hab : b < a) :
∃ x y : ℝ, x ≠ y ∧ aeval x (Φ ℚ a b) = 0 ∧ aeval y (Φ ℚ a b) = 0 := by
let f : ℝ → ℝ := fun x : ℝ => aeval x (Φ ℚ a b)
@@ -117,7 +117,7 @@ theorem real_roots_Phi_le : Fintype.card ((Φ ℚ a b).rootSet ℝ) ≤ 3 := by
theorem real_roots_Phi_ge_aux (hab : b < a) :
∃ x y : ℝ, x ≠ y ∧ aeval x (Φ ℚ a b) = 0 ∧ aeval y (Φ ℚ a b) = 0 := by
let f : ℝ → ℝ := fun x : ℝ => aeval x (Φ ℚ a b)
- have hf : f = fun x : ℝ => x ^ 5 - a * x + b := by simp [Φ]
+ have hf : f = fun x : ℝ => x ^ 5 - a * x + b := by simp [f, Φ]
have hc : ∀ s : Set ℝ, ContinuousOn f s := fun s => (Φ ℚ a b).continuousOn_aeval
have ha : (1 : ℝ) ≤ a := Nat.one_le_cast.mpr (Nat.one_le_of_lt hab)
have hle : (0 : ℝ) ≤ 1 := zero_le_one
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>
@@ -107,8 +107,8 @@ theorem real_roots_Phi_le : Fintype.card ((Φ ℚ a b).rootSet ℝ) ≤ 3 := by
rw [← map_Phi a b (algebraMap ℤ ℚ), Φ, ← one_mul (X ^ 5), ← C_1]
refine' (card_rootSet_le_derivative _).trans
(Nat.succ_le_succ ((card_rootSet_le_derivative _).trans (Nat.succ_le_succ _)))
- suffices : (Polynomial.rootSet (C (20 : ℚ) * X ^ 3) ℝ).Subsingleton
- · norm_num [Fintype.card_le_one_iff_subsingleton, ← mul_assoc] at *
+ suffices (Polynomial.rootSet (C (20 : ℚ) * X ^ 3) ℝ).Subsingleton by
+ norm_num [Fintype.card_le_one_iff_subsingleton, ← mul_assoc] at *
exact this
rw [rootSet_C_mul_X_pow] <;>
norm_num
#dependencies:
Mathlib.FieldTheory.PolynomialGaloisGroup: 1826->1323
Mathlib.Analysis.Complex.Polynomial: 1811->1826
This needed one small change to a moved proof because conj is not allowed as an identifier when the ComplexConjugate locale is open.
Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com>
@@ -4,6 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Browning
-/
import Mathlib.Analysis.Calculus.LocalExtr.Polynomial
+import Mathlib.Analysis.Complex.Polynomial
import Mathlib.FieldTheory.AbelRuffini
import Mathlib.RingTheory.RootsOfUnity.Minpoly
import Mathlib.RingTheory.EisensteinCriterion
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.@@ -126,7 +126,7 @@ theorem real_roots_Phi_ge_aux (hab : b < a) :
have hfa : 0 ≤ f a := by
-- Porting note: was `simp_rw`
simp only [hf, ← sq]
- refine' add_nonneg (sub_nonneg.mpr (pow_le_pow ha _)) _ <;> norm_num
+ refine' add_nonneg (sub_nonneg.mpr (pow_le_pow_right ha _)) _ <;> norm_num
obtain ⟨x, ⟨-, hx1⟩, hx2⟩ := intermediate_value_Ico' hle (hc _) (Set.mem_Ioc.mpr ⟨hf1, hf0⟩)
obtain ⟨y, ⟨hy1, -⟩, hy2⟩ := intermediate_value_Ioc ha (hc _) (Set.mem_Ioc.mpr ⟨hf1, hfa⟩)
exact ⟨x, y, (hx1.trans hy1).ne, hx2, hy2⟩
@@ -137,7 +137,7 @@ theorem real_roots_Phi_ge_aux (hab : b < a) :
f (-a) = (a : ℝ) ^ 2 - (a : ℝ) ^ 5 + b := by
norm_num [hf, ← sq, sub_eq_add_neg, add_comm, Odd.neg_pow (by decide : Odd 5)]
_ ≤ (a : ℝ) ^ 2 - (a : ℝ) ^ 3 + (a - 1) := by
- refine' add_le_add (sub_le_sub_left (pow_le_pow ha _) _) _ <;> linarith
+ refine' add_le_add (sub_le_sub_left (pow_le_pow_right ha _) _) _ <;> linarith
_ = -((a : ℝ) - 1) ^ 2 * (a + 1) := by ring
_ ≤ 0 := by nlinarith
have ha' := neg_nonpos.mpr (hle.trans ha)
exact_mod_cast tactic with mod_cast elaborator where possible (#8404)
We still have the exact_mod_cast tactic, used in a few places, which somehow (?) works a little bit harder to prevent the expected type influencing the elaboration of the term. I would like to get to the bottom of this, and it will be easier once the only usages of exact_mod_cast are the ones that don't work using the term elaborator by itself.
Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
@@ -87,7 +87,7 @@ theorem irreducible_Phi (p : ℕ) (hp : p.Prime) (hpa : p ∣ a) (hpb : p ∣ b)
apply irreducible_of_eisenstein_criterion
· rwa [span_singleton_prime (Int.coe_nat_ne_zero.mpr hp.ne_zero), Int.prime_iff_natAbs_prime]
· rw [leadingCoeff_Phi, mem_span_singleton]
- exact_mod_cast mt Nat.dvd_one.mp hp.ne_one
+ exact mod_cast mt Nat.dvd_one.mp hp.ne_one
· intro n hn
rw [mem_span_singleton]
rw [degree_Phi] at hn; norm_cast at hn
@@ -130,7 +130,7 @@ theorem real_roots_Phi_ge_aux (hab : b < a) :
obtain ⟨x, ⟨-, hx1⟩, hx2⟩ := intermediate_value_Ico' hle (hc _) (Set.mem_Ioc.mpr ⟨hf1, hf0⟩)
obtain ⟨y, ⟨hy1, -⟩, hy2⟩ := intermediate_value_Ioc ha (hc _) (Set.mem_Ioc.mpr ⟨hf1, hfa⟩)
exact ⟨x, y, (hx1.trans hy1).ne, hx2, hy2⟩
- · replace hb : (b : ℝ) = a - 1 := by linarith [show (b : ℝ) + 1 ≤ a by exact_mod_cast hab]
+ · replace hb : (b : ℝ) = a - 1 := by linarith [show (b : ℝ) + 1 ≤ a from mod_cast hab]
have hf1 : f 1 = 0 := by simp [hf, hb]
have hfa :=
calc
This is the supremum of
along with some minor fixes from failures on nightly-testing as Mathlib master is merged into it.
Note that some PRs for changes that are already compatible with the current toolchain and will be necessary have already been split out: #8380.
I am hopeful that in future we will be able to progressively merge adaptation PRs into a bump/v4.X.0 branch, so we never end up with a "big merge" like this. However one of these adaptation PRs (#8056) predates my new scheme for combined CI, and it wasn't possible to keep that PR viable in the meantime.
In particular this includes adjustments for the Lean PRs
We can get rid of all the
local macro_rules | `($x ^ $y) => `(HPow.hPow $x $y) -- Porting note: See issue [lean4#2220](https://github.com/leanprover/lean4/pull/2220)
macros across Mathlib (and in any projects that want to write natural number powers of reals).
Changes the default behaviour of simp to (config := {decide := false}). This makes simp (and consequentially norm_num) less powerful, but also more consistent, and less likely to blow up in long failures. This requires a variety of changes: changing some previously by simp or norm_num to decide or rfl, or adding (config := {decide := true}).
This changed the behaviour of simp so that simp [f] will only unfold "fully applied" occurrences of f. The old behaviour can be recovered with simp (config := { unfoldPartialApp := true }). We may in future add a syntax for this, e.g. simp [!f]; please provide feedback! In the meantime, we have made the following changes:
(config := { unfoldPartialApp := true }) in some places, to recover the old behaviour@[eqns] to manually adjust the equation lemmas for a particular definition, recovering the old behaviour just for that definition. See #8371, where we do this for Function.comp and Function.flip.This change in Lean may require further changes down the line (e.g. adding the !f syntax, and/or upstreaming the special treatment for Function.comp and Function.flip, and/or removing this special treatment). Please keep an open and skeptical mind about these changes!
Co-authored-by: leanprover-community-mathlib4-bot <leanprover-community-mathlib4-bot@users.noreply.github.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Mauricio Collares <mauricio@collares.org>
@@ -31,8 +31,6 @@ namespace AbelRuffini
set_option linter.uppercaseLean3 false
-local macro_rules | `($x ^ $y) => `(HPow.hPow $x $y) -- Porting note: See issue lean4#2220
-
open Function Polynomial Polynomial.Gal Ideal
open scoped Polynomial
@@ -94,10 +92,11 @@ theorem irreducible_Phi (p : ℕ) (hp : p.Prime) (hpa : p ∣ a) (hpb : p ∣ b)
rw [mem_span_singleton]
rw [degree_Phi] at hn; norm_cast at hn
interval_cases hn : n <;>
- simp only [Φ, coeff_X_pow, coeff_C, Int.coe_nat_dvd.mpr, hpb, if_true, coeff_C_mul, if_false,
- coeff_X_zero, hpa, coeff_add, zero_add, mul_zero, coeff_sub, add_zero, zero_sub, dvd_neg,
- neg_zero, dvd_mul_of_dvd_left]
+ simp (config := {decide := true}) only [Φ, coeff_X_pow, coeff_C, Int.coe_nat_dvd.mpr, hpb,
+ if_true, coeff_C_mul, if_false, coeff_X_zero, hpa, coeff_add, zero_add, mul_zero, coeff_sub,
+ add_zero, zero_sub, dvd_neg, neg_zero, dvd_mul_of_dvd_left]
· simp only [degree_Phi, ← WithBot.coe_zero, WithBot.coe_lt_coe, Nat.succ_pos']
+ decide
· rw [coeff_zero_Phi, span_singleton_pow, mem_span_singleton]
exact mt Int.coe_nat_dvd.mp hp2b
all_goals exact Monic.isPrimitive (monic_Phi a b)
@@ -136,7 +135,7 @@ theorem real_roots_Phi_ge_aux (hab : b < a) :
have hfa :=
calc
f (-a) = (a : ℝ) ^ 2 - (a : ℝ) ^ 5 + b := by
- norm_num [hf, ← sq, sub_eq_add_neg, add_comm, Odd.neg_pow]
+ norm_num [hf, ← sq, sub_eq_add_neg, add_comm, Odd.neg_pow (by decide : Odd 5)]
_ ≤ (a : ℝ) ^ 2 - (a : ℝ) ^ 3 + (a - 1) := by
refine' add_le_add (sub_le_sub_left (pow_le_pow ha _) _) _ <;> linarith
_ = -((a : ℝ) - 1) ^ 2 * (a + 1) := by ring
@@ -163,7 +162,7 @@ theorem complex_roots_Phi (h : (Φ ℚ a b).Separable) : Fintype.card ((Φ ℚ a
theorem gal_Phi (hab : b < a) (h_irred : Irreducible (Φ ℚ a b)) :
Bijective (galActionHom (Φ ℚ a b) ℂ) := by
apply galActionHom_bijective_of_prime_degree' h_irred
- · norm_num [natDegree_Phi]
+ · simp only [natDegree_Phi]; decide
· rw [complex_roots_Phi a b h_irred.separable, Nat.succ_le_succ_iff]
exact (real_roots_Phi_le a b).trans (Nat.le_succ 3)
· simp_rw [complex_roots_Phi a b h_irred.separable, Nat.succ_le_succ_iff]
@@ -181,7 +180,7 @@ theorem not_solvable_by_rad (p : ℕ) (x : ℂ) (hx : aeval x (Φ ℚ a b) = 0)
#align abel_ruffini.not_solvable_by_rad AbelRuffini.not_solvable_by_rad
theorem not_solvable_by_rad' (x : ℂ) (hx : aeval x (Φ ℚ 4 2) = 0) : ¬IsSolvableByRad ℚ x := by
- apply not_solvable_by_rad 4 2 2 x hx <;> norm_num
+ apply not_solvable_by_rad 4 2 2 x hx <;> decide
#align abel_ruffini.not_solvable_by_rad' AbelRuffini.not_solvable_by_rad'
/-- **Abel-Ruffini Theorem** -/
cliqueFree_of_replaceVertex_cliqueFree is still quite long.
@@ -39,7 +39,7 @@ open scoped Polynomial
attribute [local instance] splits_ℚ_ℂ
-variable (R : Type _) [CommRing R] (a b : ℕ)
+variable (R : Type*) [CommRing R] (a b : ℕ)
/-- A quintic polynomial that we will show is irreducible -/
noncomputable def Φ : R[X] :=
@@ -49,7 +49,7 @@ noncomputable def Φ : R[X] :=
variable {R}
@[simp]
-theorem map_Phi {S : Type _} [CommRing S] (f : R →+* S) : (Φ R a b).map f = Φ S a b := by simp [Φ]
+theorem map_Phi {S : Type*} [CommRing S] (f : R →+* S) : (Φ R a b).map f = Φ S a b := by simp [Φ]
#align abel_ruffini.map_Phi AbelRuffini.map_Phi
@[simp]
norm_num was passing the wrong syntax node to elabSimpArgs when elaborating, which essentially had the effect of ignoring all arguments it was passed, i.e. norm_num [add_comm] would not try to commute addition in the simp step.
The fix itself is very simple (though not obvious to debug!), probably using TSyntax more would help avoid such issues in future.
Due to this bug many norm_num [blah] became rw [blah]; norm_num or similar, sometimes with porting notes, sometimes not, we fix these porting notes and other regressions during the port also.
Interestingly cancel_denoms uses norm_num [<- mul_assoc] internally, so cancel_denoms also got stronger with this change.
@@ -107,19 +107,16 @@ theorem real_roots_Phi_le : Fintype.card ((Φ ℚ a b).rootSet ℝ) ≤ 3 := by
rw [← map_Phi a b (algebraMap ℤ ℚ), Φ, ← one_mul (X ^ 5), ← C_1]
refine' (card_rootSet_le_derivative _).trans
(Nat.succ_le_succ ((card_rootSet_le_derivative _).trans (Nat.succ_le_succ _)))
- simp only [algebraMap_int_eq, map_one, one_mul, map_natCast, Polynomial.map_add,
- Polynomial.map_sub, Polynomial.map_pow, map_X, Polynomial.map_mul, Polynomial.map_nat_cast,
- map_add, map_sub, derivative_X_pow, Nat.cast_ofNat, ge_iff_le, Nat.succ_sub_succ_eq_sub,
- tsub_zero, derivative_mul, derivative_nat_cast, zero_mul, derivative_X, mul_one, zero_add,
- add_zero, derivative_C, sub_zero, map_C, eq_ratCast, ne_eq, Rat.cast_eq_zero, not_false_eq_true,
- roots_C_mul, roots_pow, roots_X, Fintype.card_le_one_iff_subsingleton]
- rw [← mul_assoc, ← _root_.map_mul, rootSet_C_mul_X_pow] <;>
+ suffices : (Polynomial.rootSet (C (20 : ℚ) * X ^ 3) ℝ).Subsingleton
+ · norm_num [Fintype.card_le_one_iff_subsingleton, ← mul_assoc] at *
+ exact this
+ rw [rootSet_C_mul_X_pow] <;>
norm_num
#align abel_ruffini.real_roots_Phi_le AbelRuffini.real_roots_Phi_le
theorem real_roots_Phi_ge_aux (hab : b < a) :
∃ x y : ℝ, x ≠ y ∧ aeval x (Φ ℚ a b) = 0 ∧ aeval y (Φ ℚ a b) = 0 := by
- let f := fun x : ℝ => aeval x (Φ ℚ a b)
+ let f : ℝ → ℝ := fun x : ℝ => aeval x (Φ ℚ a b)
have hf : f = fun x : ℝ => x ^ 5 - a * x + b := by simp [Φ]
have hc : ∀ s : Set ℝ, ContinuousOn f s := fun s => (Φ ℚ a b).continuousOn_aeval
have ha : (1 : ℝ) ≤ a := Nat.one_le_cast.mpr (Nat.one_le_of_lt hab)
@@ -139,9 +136,7 @@ theorem real_roots_Phi_ge_aux (hab : b < a) :
have hfa :=
calc
f (-a) = (a : ℝ) ^ 2 - (a : ℝ) ^ 5 + b := by
- -- Porting note: was `norm_num [hf, ← sq]`
- simp only [hf, mul_neg, ← sq, sub_neg_eq_add, Nat.cast_pow, add_left_inj]
- rw [Odd.neg_pow (by norm_num), neg_add_eq_sub]
+ norm_num [hf, ← sq, sub_eq_add_neg, add_comm, Odd.neg_pow]
_ ≤ (a : ℝ) ^ 2 - (a : ℝ) ^ 3 + (a - 1) := by
refine' add_le_add (sub_le_sub_left (pow_le_pow ha _) _) _ <;> linarith
_ = -((a : ℝ) - 1) ^ 2 * (a + 1) := by ring
@@ -168,7 +163,7 @@ theorem complex_roots_Phi (h : (Φ ℚ a b).Separable) : Fintype.card ((Φ ℚ a
theorem gal_Phi (hab : b < a) (h_irred : Irreducible (Φ ℚ a b)) :
Bijective (galActionHom (Φ ℚ a b) ℂ) := by
apply galActionHom_bijective_of_prime_degree' h_irred
- · rw [natDegree_Phi]; norm_num
+ · norm_num [natDegree_Phi]
· rw [complex_roots_Phi a b h_irred.separable, Nat.succ_le_succ_iff]
exact (real_roots_Phi_le a b).trans (Nat.le_succ 3)
· simp_rw [complex_roots_Phi a b h_irred.separable, Nat.succ_le_succ_iff]
@@ -31,7 +31,7 @@ namespace AbelRuffini
set_option linter.uppercaseLean3 false
-local macro_rules | `($x ^ $y) => `(HPow.hPow $x $y) -- Porting note: See issue #2220
+local macro_rules | `($x ^ $y) => `(HPow.hPow $x $y) -- Porting note: See issue lean4#2220
open Function Polynomial Polynomial.Gal Ideal
Analysis.Calculus.LocalExtr (#5944)
Also make f/f' arguments implicit in all versions of Rolle's Theorem.
Fixes #4830
exists_Ioo_extr_on_Icc:
f : ℝ → ℝ
to functions from a conditionally complete linear order
to a linear order.f implicit;exists_local_extr_Ioo:
exists_isLocalExtr_Ioo;f implicit;exists_isExtrOn_Ioo_of_tendsto, exists_isLocalExtr_Ioo_of_tendsto:
new lemmas extracted from the proof of exists_hasDerivAt_eq_zero';exists_hasDerivAt_eq_zero, exists_hasDerivAt_eq_zero':
make f and f' implicit;exists_deriv_eq_zero, exists_deriv_eq_zero':
make f implicit.@@ -3,7 +3,7 @@ Copyright (c) 2021 Thomas Browning. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Browning
-/
-import Mathlib.Analysis.Calculus.LocalExtr
+import Mathlib.Analysis.Calculus.LocalExtr.Polynomial
import Mathlib.FieldTheory.AbelRuffini
import Mathlib.RingTheory.RootsOfUnity.Minpoly
import Mathlib.RingTheory.EisensteinCriterion
@@ -2,17 +2,14 @@
Copyright (c) 2021 Thomas Browning. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Browning
-
-! This file was ported from Lean 3 source module wiedijk_100_theorems.abel_ruffini
-! leanprover-community/mathlib commit 5563b1b49e86e135e8c7b556da5ad2f5ff881cad
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Analysis.Calculus.LocalExtr
import Mathlib.FieldTheory.AbelRuffini
import Mathlib.RingTheory.RootsOfUnity.Minpoly
import Mathlib.RingTheory.EisensteinCriterion
+#align_import wiedijk_100_theorems.abel_ruffini from "leanprover-community/mathlib"@"5563b1b49e86e135e8c7b556da5ad2f5ff881cad"
+
/-!
# Construction of an algebraic number that is not solvable by radicals.
@@ -17,11 +17,12 @@ import Mathlib.RingTheory.EisensteinCriterion
# Construction of an algebraic number that is not solvable by radicals.
The main ingredients are:
- * `solvableByRad.isSolvable'` in `FieldTheory/AbelRuffini` :
+ * `solvableByRad.isSolvable'` in `Mathlib/FieldTheory/AbelRuffini.lean` :
an irreducible polynomial with an `IsSolvableByRad` root has solvable Galois group
- * `galActionHom_bijective_of_prime_degree'` in `FieldTheory/PolynomialGaloisGroup` :
+ * `galActionHom_bijective_of_prime_degree'` in `Mathlib/FieldTheory/PolynomialGaloisGroup.lean` :
an irreducible polynomial of prime degree with 1-3 non-real roots has full Galois group
- * `Equiv.Perm.not_solvable` in `GroupTheory/Solvable` : the symmetric group is not solvable
+ * `Equiv.Perm.not_solvable` in `Mathlib/GroupTheory/Solvable.lean` : the symmetric group is not
+ solvable
Then all that remains is the construction of a specific polynomial satisfying the conditions of
`galActionHom_bijective_of_prime_degree'`, which is done in this file.
@@ -55,7 +56,7 @@ theorem map_Phi {S : Type _} [CommRing S] (f : R →+* S) : (Φ R a b).map f =
#align abel_ruffini.map_Phi AbelRuffini.map_Phi
@[simp]
-theorem coeff_zero_Phi : (Φ R a b).coeff 0 = ↑b := by simp [Φ, coeff_X_pow]
+theorem coeff_zero_Phi : (Φ R a b).coeff 0 = (b : R) := by simp [Φ, coeff_X_pow]
#align abel_ruffini.coeff_zero_Phi AbelRuffini.coeff_zero_Phi
@[simp]
@@ -65,13 +66,12 @@ theorem coeff_five_Phi : (Φ R a b).coeff 5 = 1 := by
variable [Nontrivial R]
-theorem degree_Phi : (Φ R a b).degree = ↑5 := by
- suffices degree (X ^ 5 - C (a : R) * X) = ↑5 by
+theorem degree_Phi : (Φ R a b).degree = ((5 : ℕ) : WithBot ℕ) := by
+ suffices degree (X ^ 5 - C (a : R) * X) = ((5 : ℕ) : WithBot ℕ) by
rwa [Φ, degree_add_eq_left_of_degree_lt]
convert (degree_C_le (R := R)).trans_lt (WithBot.coe_lt_coe.mpr (show 0 < 5 by norm_num))
- rw [degree_sub_eq_left_of_degree_lt]; · simp
- rw [degree_X_pow]
- exact (degree_C_mul_X_le _).trans_lt (WithBot.coe_lt_coe.mpr (show 1 < 5 by norm_num))
+ rw [degree_sub_eq_left_of_degree_lt] <;> rw [degree_X_pow]
+ exact (degree_C_mul_X_le (a : R)).trans_lt (WithBot.coe_lt_coe.mpr (show 1 < 5 by norm_num))
#align abel_ruffini.degree_Phi AbelRuffini.degree_Phi
theorem natDegree_Phi : (Φ R a b).natDegree = 5 :=
@@ -110,8 +110,13 @@ theorem real_roots_Phi_le : Fintype.card ((Φ ℚ a b).rootSet ℝ) ≤ 3 := by
rw [← map_Phi a b (algebraMap ℤ ℚ), Φ, ← one_mul (X ^ 5), ← C_1]
refine' (card_rootSet_le_derivative _).trans
(Nat.succ_le_succ ((card_rootSet_le_derivative _).trans (Nat.succ_le_succ _)))
- simp [-map_ofNat]
- rw [Fintype.card_le_one_iff_subsingleton, ← mul_assoc, ← _root_.map_mul, rootSet_C_mul_X_pow] <;>
+ simp only [algebraMap_int_eq, map_one, one_mul, map_natCast, Polynomial.map_add,
+ Polynomial.map_sub, Polynomial.map_pow, map_X, Polynomial.map_mul, Polynomial.map_nat_cast,
+ map_add, map_sub, derivative_X_pow, Nat.cast_ofNat, ge_iff_le, Nat.succ_sub_succ_eq_sub,
+ tsub_zero, derivative_mul, derivative_nat_cast, zero_mul, derivative_X, mul_one, zero_add,
+ add_zero, derivative_C, sub_zero, map_C, eq_ratCast, ne_eq, Rat.cast_eq_zero, not_false_eq_true,
+ roots_C_mul, roots_pow, roots_X, Fintype.card_le_one_iff_subsingleton]
+ rw [← mul_assoc, ← _root_.map_mul, rootSet_C_mul_X_pow] <;>
norm_num
#align abel_ruffini.real_roots_Phi_le AbelRuffini.real_roots_Phi_le
@@ -126,7 +131,8 @@ theorem real_roots_Phi_ge_aux (hab : b < a) :
by_cases hb : (1 : ℝ) - a + b < 0
· have hf1 : f 1 < 0 := by simp [hf, hb]
have hfa : 0 ≤ f a := by
- simp [hf, ← sq]
+ -- Porting note: was `simp_rw`
+ simp only [hf, ← sq]
refine' add_nonneg (sub_nonneg.mpr (pow_le_pow ha _)) _ <;> norm_num
obtain ⟨x, ⟨-, hx1⟩, hx2⟩ := intermediate_value_Ico' hle (hc _) (Set.mem_Ioc.mpr ⟨hf1, hf0⟩)
obtain ⟨y, ⟨hy1, -⟩, hy2⟩ := intermediate_value_Ioc ha (hc _) (Set.mem_Ioc.mpr ⟨hf1, hfa⟩)
@@ -135,8 +141,11 @@ theorem real_roots_Phi_ge_aux (hab : b < a) :
have hf1 : f 1 = 0 := by simp [hf, hb]
have hfa :=
calc
- f (-a) = ↑a ^ 2 - ↑a ^ 5 + b := by simp [hf, ← sq]; rw [Odd.neg_pow]; ring; norm_num
- _ ≤ ↑a ^ 2 - ↑a ^ 3 + (a - 1) := by
+ f (-a) = (a : ℝ) ^ 2 - (a : ℝ) ^ 5 + b := by
+ -- Porting note: was `norm_num [hf, ← sq]`
+ simp only [hf, mul_neg, ← sq, sub_neg_eq_add, Nat.cast_pow, add_left_inj]
+ rw [Odd.neg_pow (by norm_num), neg_add_eq_sub]
+ _ ≤ (a : ℝ) ^ 2 - (a : ℝ) ^ 3 + (a - 1) := by
refine' add_le_add (sub_le_sub_left (pow_le_pow ha _) _) _ <;> linarith
_ = -((a : ℝ) - 1) ^ 2 * (a + 1) := by ring
_ ≤ 0 := by nlinarith
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