number_theory.cyclotomic.gal
⟷
Mathlib.NumberTheory.Cyclotomic.Gal
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)
(last sync)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -140,7 +140,7 @@ noncomputable def autEquivPow : (L ≃ₐ[K] L) ≃* (ZMod n)ˣ :=
rw [pow_eq_pow_iff_modEq, ← Subgroup.orderOf_coe, ← orderOf_units,
hζ.coe_to_roots_of_unity_coe, ← (zeta_spec n K L).eq_orderOf, ← ZMod.eq_iff_modEq_nat] at
key
- simp only [ZMod.nat_cast_val, ZMod.cast_id', id.def] at key
+ simp only [ZMod.natCast_val, ZMod.cast_id', id.def] at key
exact Units.ext key }
#align is_cyclotomic_extension.aut_equiv_pow IsCyclotomicExtension.autEquivPow
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -60,18 +60,18 @@ field extension. -/
theorem autToPow_injective : Function.Injective <| hμ.autToPow K :=
by
intro f g hfg
- apply_fun Units.val at hfg
- simp only [IsPrimitiveRoot.coe_autToPow_apply, Units.val_eq_coe] at hfg
- generalize_proofs hf' hg' at hfg
+ apply_fun Units.val at hfg
+ simp only [IsPrimitiveRoot.coe_autToPow_apply, Units.val_eq_coe] at hfg
+ generalize_proofs hf' hg' at hfg
have hf := hf'.some_spec
have hg := hg'.some_spec
- generalize_proofs hζ at hf hg
+ generalize_proofs hζ at hf hg
suffices f hμ.to_roots_of_unity = g hμ.to_roots_of_unity
by
apply AlgEquiv.coe_algHom_injective
apply (hμ.power_basis K).algHom_ext
exact this
- rw [ZMod.eq_iff_modEq_nat] at hfg
+ rw [ZMod.eq_iff_modEq_nat] at hfg
refine' (hf.trans _).trans hg.symm
rw [← rootsOfUnity.coe_pow _ hf'.some, ← rootsOfUnity.coe_pow _ hg'.some]
congr 1
@@ -132,15 +132,15 @@ noncomputable def autEquivPow : (L ≃ₐ[K] L) ≃* (ZMod n)ˣ :=
generalize_proofs _ h
have key := hζ.aut_to_pow_spec K ((hζ.power_basis K).equivOfMinpoly ((hμ x).PowerBasis K) h)
have := (hζ.power_basis K).equivOfMinpoly_gen ((hμ x).PowerBasis K) h
- rw [hζ.power_basis_gen K] at this
- rw [this, IsPrimitiveRoot.powerBasis_gen] at key
- rw [← hζ.coe_to_roots_of_unity_coe] at key
- simp only [← coe_coe, ← rootsOfUnity.coe_pow] at key
+ rw [hζ.power_basis_gen K] at this
+ rw [this, IsPrimitiveRoot.powerBasis_gen] at key
+ rw [← hζ.coe_to_roots_of_unity_coe] at key
+ simp only [← coe_coe, ← rootsOfUnity.coe_pow] at key
replace key := rootsOfUnity.coe_injective key
rw [pow_eq_pow_iff_modEq, ← Subgroup.orderOf_coe, ← orderOf_units,
hζ.coe_to_roots_of_unity_coe, ← (zeta_spec n K L).eq_orderOf, ← ZMod.eq_iff_modEq_nat] at
- key
- simp only [ZMod.nat_cast_val, ZMod.cast_id', id.def] at key
+ key
+ simp only [ZMod.nat_cast_val, ZMod.cast_id', id.def] at key
exact Units.ext key }
#align is_cyclotomic_extension.aut_equiv_pow IsCyclotomicExtension.autEquivPow
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -79,7 +79,7 @@ theorem autToPow_injective : Function.Injective <| hμ.autToPow K :=
convert hfg
rw [hμ.eq_order_of]
rw [← hμ.coe_to_roots_of_unity_coe]
- rw [orderOf_units, orderOf_subgroup]
+ rw [orderOf_units, Subgroup.orderOf_coe]
#align is_primitive_root.aut_to_pow_injective IsPrimitiveRoot.autToPow_injective
-/
@@ -137,8 +137,9 @@ noncomputable def autEquivPow : (L ≃ₐ[K] L) ≃* (ZMod n)ˣ :=
rw [← hζ.coe_to_roots_of_unity_coe] at key
simp only [← coe_coe, ← rootsOfUnity.coe_pow] at key
replace key := rootsOfUnity.coe_injective key
- rw [pow_eq_pow_iff_modEq, ← orderOf_subgroup, ← orderOf_units, hζ.coe_to_roots_of_unity_coe, ←
- (zeta_spec n K L).eq_orderOf, ← ZMod.eq_iff_modEq_nat] at key
+ rw [pow_eq_pow_iff_modEq, ← Subgroup.orderOf_coe, ← orderOf_units,
+ hζ.coe_to_roots_of_unity_coe, ← (zeta_spec n K L).eq_orderOf, ← ZMod.eq_iff_modEq_nat] at
+ key
simp only [ZMod.nat_cast_val, ZMod.cast_id', id.def] at key
exact Units.ext key }
#align is_cyclotomic_extension.aut_equiv_pow IsCyclotomicExtension.autEquivPow
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,8 +3,8 @@ Copyright (c) 2022 Eric Rodriguez. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Eric Rodriguez
-/
-import Mathbin.NumberTheory.Cyclotomic.PrimitiveRoots
-import Mathbin.FieldTheory.PolynomialGaloisGroup
+import NumberTheory.Cyclotomic.PrimitiveRoots
+import FieldTheory.PolynomialGaloisGroup
#align_import number_theory.cyclotomic.gal from "leanprover-community/mathlib"@"30faa0c3618ce1472bf6305ae0e3fa56affa3f95"
@@ -53,7 +53,7 @@ namespace IsPrimitiveRoot
variable [CommRing L] [IsDomain L] (hμ : IsPrimitiveRoot μ n) [Algebra K L]
[IsCyclotomicExtension {n} K L]
-/- ./././Mathport/Syntax/Translate/Tactic/Lean3.lean:132:4: warning: unsupported: rw with cfg: { occs := occurrences.pos[occurrences.pos] «expr[ ,]»([2]) } -/
+/- ./././Mathport/Syntax/Translate/Tactic/Lean3.lean:133:4: warning: unsupported: rw with cfg: { occs := occurrences.pos[occurrences.pos] «expr[ ,]»([2]) } -/
#print IsPrimitiveRoot.autToPow_injective /-
/-- `is_primitive_root.aut_to_pow` is injective in the case that it's considered over a cyclotomic
field extension. -/
@@ -100,7 +100,7 @@ noncomputable def Aut.commGroup : CommGroup (L ≃ₐ[K] L) :=
variable (h : Irreducible (cyclotomic n K)) {K} (L)
-/- ./././Mathport/Syntax/Translate/Tactic/Lean3.lean:132:4: warning: unsupported: rw with cfg: { occs := occurrences.pos[occurrences.pos] «expr[ ,]»([1, 5]) } -/
+/- ./././Mathport/Syntax/Translate/Tactic/Lean3.lean:133:4: warning: unsupported: rw with cfg: { occs := occurrences.pos[occurrences.pos] «expr[ ,]»([1, 5]) } -/
#print IsCyclotomicExtension.autEquivPow /-
/-- The `mul_equiv` that takes an automorphism `f` to the element `k : (zmod n)ˣ` such that
`f μ = μ ^ k` for any root of unity `μ`. A strengthening of `is_primitive_root.aut_to_pow`. -/
@@ -156,7 +156,7 @@ noncomputable def fromZetaAut : L ≃ₐ[K] L :=
#align is_cyclotomic_extension.from_zeta_aut IsCyclotomicExtension.fromZetaAut
-/
-/- ./././Mathport/Syntax/Translate/Tactic/Lean3.lean:132:4: warning: unsupported: rw with cfg: { occs := occurrences.pos[occurrences.pos] «expr[ ,]»([4]) } -/
+/- ./././Mathport/Syntax/Translate/Tactic/Lean3.lean:133:4: warning: unsupported: rw with cfg: { occs := occurrences.pos[occurrences.pos] «expr[ ,]»([4]) } -/
#print IsCyclotomicExtension.fromZetaAut_spec /-
theorem fromZetaAut_spec : fromZetaAut hμ h (zeta n K L) = μ :=
by
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,15 +2,12 @@
Copyright (c) 2022 Eric Rodriguez. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Eric Rodriguez
-
-! This file was ported from Lean 3 source module number_theory.cyclotomic.gal
-! leanprover-community/mathlib commit 30faa0c3618ce1472bf6305ae0e3fa56affa3f95
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.NumberTheory.Cyclotomic.PrimitiveRoots
import Mathbin.FieldTheory.PolynomialGaloisGroup
+#align_import number_theory.cyclotomic.gal from "leanprover-community/mathlib"@"30faa0c3618ce1472bf6305ae0e3fa56affa3f95"
+
/-!
# Galois group of cyclotomic extensions
mathlib commit https://github.com/leanprover-community/mathlib/commit/8b981918a93bc45a8600de608cde7944a80d92b9
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Eric Rodriguez
! This file was ported from Lean 3 source module number_theory.cyclotomic.gal
-! leanprover-community/mathlib commit e3f4be1fcb5376c4948d7f095bec45350bfb9d1a
+! leanprover-community/mathlib commit 30faa0c3618ce1472bf6305ae0e3fa56affa3f95
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -14,6 +14,9 @@ import Mathbin.FieldTheory.PolynomialGaloisGroup
/-!
# Galois group of cyclotomic extensions
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
In this file, we show the relationship between the Galois group of `K(ζₙ)` and `(zmod n)ˣ`;
it is always a subgroup, and if the `n`th cyclotomic polynomial is irreducible, they are isomorphic.
mathlib commit https://github.com/leanprover-community/mathlib/commit/93f880918cb51905fd51b76add8273cbc27718ab
@@ -54,6 +54,7 @@ variable [CommRing L] [IsDomain L] (hμ : IsPrimitiveRoot μ n) [Algebra K L]
[IsCyclotomicExtension {n} K L]
/- ./././Mathport/Syntax/Translate/Tactic/Lean3.lean:132:4: warning: unsupported: rw with cfg: { occs := occurrences.pos[occurrences.pos] «expr[ ,]»([2]) } -/
+#print IsPrimitiveRoot.autToPow_injective /-
/-- `is_primitive_root.aut_to_pow` is injective in the case that it's considered over a cyclotomic
field extension. -/
theorem autToPow_injective : Function.Injective <| hμ.autToPow K :=
@@ -80,6 +81,7 @@ theorem autToPow_injective : Function.Injective <| hμ.autToPow K :=
rw [← hμ.coe_to_roots_of_unity_coe]
rw [orderOf_units, orderOf_subgroup]
#align is_primitive_root.aut_to_pow_injective IsPrimitiveRoot.autToPow_injective
+-/
end IsPrimitiveRoot
@@ -88,15 +90,18 @@ namespace IsCyclotomicExtension
variable [CommRing L] [IsDomain L] (hμ : IsPrimitiveRoot μ n) [Algebra K L]
[IsCyclotomicExtension {n} K L]
+#print IsCyclotomicExtension.Aut.commGroup /-
/-- Cyclotomic extensions are abelian. -/
noncomputable def Aut.commGroup : CommGroup (L ≃ₐ[K] L) :=
((zeta_spec n K L).autToPow_injective K).CommGroup _ (map_one _) (map_mul _) (map_inv _)
(map_div _) (map_pow _) (map_zpow _)
#align is_cyclotomic_extension.aut.comm_group IsCyclotomicExtension.Aut.commGroup
+-/
variable (h : Irreducible (cyclotomic n K)) {K} (L)
/- ./././Mathport/Syntax/Translate/Tactic/Lean3.lean:132:4: warning: unsupported: rw with cfg: { occs := occurrences.pos[occurrences.pos] «expr[ ,]»([1, 5]) } -/
+#print IsCyclotomicExtension.autEquivPow /-
/-- The `mul_equiv` that takes an automorphism `f` to the element `k : (zmod n)ˣ` such that
`f μ = μ ^ k` for any root of unity `μ`. A strengthening of `is_primitive_root.aut_to_pow`. -/
@[simps]
@@ -137,9 +142,11 @@ noncomputable def autEquivPow : (L ≃ₐ[K] L) ≃* (ZMod n)ˣ :=
simp only [ZMod.nat_cast_val, ZMod.cast_id', id.def] at key
exact Units.ext key }
#align is_cyclotomic_extension.aut_equiv_pow IsCyclotomicExtension.autEquivPow
+-/
variable {L}
+#print IsCyclotomicExtension.fromZetaAut /-
/-- Maps `μ` to the `alg_equiv` that sends `is_cyclotomic_extension.zeta` to `μ`. -/
noncomputable def fromZetaAut : L ≃ₐ[K] L :=
let hζ := (zeta_spec n K L).eq_pow_of_pow_eq_one hμ.pow_eq_one n.Pos
@@ -147,8 +154,10 @@ noncomputable def fromZetaAut : L ≃ₐ[K] L :=
ZMod.unitOfCoprime hζ.some <|
((zeta_spec n K L).pow_iff_coprime n.Pos hζ.some).mp <| hζ.choose_spec.choose_spec.symm ▸ hμ
#align is_cyclotomic_extension.from_zeta_aut IsCyclotomicExtension.fromZetaAut
+-/
/- ./././Mathport/Syntax/Translate/Tactic/Lean3.lean:132:4: warning: unsupported: rw with cfg: { occs := occurrences.pos[occurrences.pos] «expr[ ,]»([4]) } -/
+#print IsCyclotomicExtension.fromZetaAut_spec /-
theorem fromZetaAut_spec : fromZetaAut hμ h (zeta n K L) = μ :=
by
simp_rw [from_zeta_aut, aut_equiv_pow_symm_apply]
@@ -158,6 +167,7 @@ theorem fromZetaAut_spec : fromZetaAut hμ h (zeta n K L) = μ :=
convert h.some_spec.some_spec
exact ZMod.val_cast_of_lt h.some_spec.some
#align is_cyclotomic_extension.from_zeta_aut_spec IsCyclotomicExtension.fromZetaAut_spec
+-/
end IsCyclotomicExtension
@@ -166,23 +176,27 @@ section Gal
variable [Field L] (hμ : IsPrimitiveRoot μ n) [Algebra K L] [IsCyclotomicExtension {n} K L]
(h : Irreducible (cyclotomic n K)) {K}
+#print galCyclotomicEquivUnitsZMod /-
/-- `is_cyclotomic_extension.aut_equiv_pow` repackaged in terms of `gal`.
Asserts that the Galois group of `cyclotomic n K` is equivalent to `(zmod n)ˣ`
if `cyclotomic n K` is irreducible in the base field. -/
-noncomputable def galCyclotomicEquivUnitsZmod : (cyclotomic n K).Gal ≃* (ZMod n)ˣ :=
+noncomputable def galCyclotomicEquivUnitsZMod : (cyclotomic n K).Gal ≃* (ZMod n)ˣ :=
(AlgEquiv.autCongr
(IsSplittingField.algEquiv L _ : L ≃ₐ[K] (cyclotomic n K).SplittingField)).symm.trans
(IsCyclotomicExtension.autEquivPow L h)
-#align gal_cyclotomic_equiv_units_zmod galCyclotomicEquivUnitsZmod
+#align gal_cyclotomic_equiv_units_zmod galCyclotomicEquivUnitsZMod
+-/
+#print galXPowEquivUnitsZMod /-
/-- `is_cyclotomic_extension.aut_equiv_pow` repackaged in terms of `gal`.
Asserts that the Galois group of `X ^ n - 1` is equivalent to `(zmod n)ˣ`
if `cyclotomic n K` is irreducible in the base field. -/
-noncomputable def galXPowEquivUnitsZmod : (X ^ (n : ℕ) - 1).Gal ≃* (ZMod n)ˣ :=
+noncomputable def galXPowEquivUnitsZMod : (X ^ (n : ℕ) - 1).Gal ≃* (ZMod n)ˣ :=
(AlgEquiv.autCongr
(IsSplittingField.algEquiv L _ : L ≃ₐ[K] (X ^ (n : ℕ) - 1).SplittingField)).symm.trans
(IsCyclotomicExtension.autEquivPow L h)
-#align gal_X_pow_equiv_units_zmod galXPowEquivUnitsZmod
+#align gal_X_pow_equiv_units_zmod galXPowEquivUnitsZMod
+-/
end Gal
mathlib commit https://github.com/leanprover-community/mathlib/commit/93f880918cb51905fd51b76add8273cbc27718ab
@@ -109,7 +109,7 @@ noncomputable def autEquivPow : (L ≃ₐ[K] L) ≃* (ZMod n)ˣ :=
invFun := fun t =>
(hζ.PowerBasis K).equivOfMinpoly ((hμ t).PowerBasis K)
(by
- haveI := IsCyclotomicExtension.ne_zero' n K L
+ haveI := IsCyclotomicExtension.neZero' n K L
simp only [IsPrimitiveRoot.powerBasis_gen]
have hr :=
IsPrimitiveRoot.minpoly_eq_cyclotomic_of_irreducible
mathlib commit https://github.com/leanprover-community/mathlib/commit/bf9bbbcf0c1c1ead18280b0d010e417b10abb1b6
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Eric Rodriguez
! This file was ported from Lean 3 source module number_theory.cyclotomic.gal
-! leanprover-community/mathlib commit 861a26926586cd46ff80264d121cdb6fa0e35cc1
+! leanprover-community/mathlib commit e3f4be1fcb5376c4948d7f095bec45350bfb9d1a
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -170,7 +170,8 @@ variable [Field L] (hμ : IsPrimitiveRoot μ n) [Algebra K L] [IsCyclotomicExten
Asserts that the Galois group of `cyclotomic n K` is equivalent to `(zmod n)ˣ`
if `cyclotomic n K` is irreducible in the base field. -/
noncomputable def galCyclotomicEquivUnitsZmod : (cyclotomic n K).Gal ≃* (ZMod n)ˣ :=
- (AlgEquiv.autCongr (IsSplittingField.algEquiv _ _)).symm.trans
+ (AlgEquiv.autCongr
+ (IsSplittingField.algEquiv L _ : L ≃ₐ[K] (cyclotomic n K).SplittingField)).symm.trans
(IsCyclotomicExtension.autEquivPow L h)
#align gal_cyclotomic_equiv_units_zmod galCyclotomicEquivUnitsZmod
@@ -178,7 +179,8 @@ noncomputable def galCyclotomicEquivUnitsZmod : (cyclotomic n K).Gal ≃* (ZMod
Asserts that the Galois group of `X ^ n - 1` is equivalent to `(zmod n)ˣ`
if `cyclotomic n K` is irreducible in the base field. -/
noncomputable def galXPowEquivUnitsZmod : (X ^ (n : ℕ) - 1).Gal ≃* (ZMod n)ˣ :=
- (AlgEquiv.autCongr (IsSplittingField.algEquiv _ _)).symm.trans
+ (AlgEquiv.autCongr
+ (IsSplittingField.algEquiv L _ : L ≃ₐ[K] (X ^ (n : ℕ) - 1).SplittingField)).symm.trans
(IsCyclotomicExtension.autEquivPow L h)
#align gal_X_pow_equiv_units_zmod galXPowEquivUnitsZmod
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -96,8 +96,6 @@ noncomputable def Aut.commGroup : CommGroup (L ≃ₐ[K] L) :=
variable (h : Irreducible (cyclotomic n K)) {K} (L)
-include h
-
/- ./././Mathport/Syntax/Translate/Tactic/Lean3.lean:132:4: warning: unsupported: rw with cfg: { occs := occurrences.pos[occurrences.pos] «expr[ ,]»([1, 5]) } -/
/-- The `mul_equiv` that takes an automorphism `f` to the element `k : (zmod n)ˣ` such that
`f μ = μ ^ k` for any root of unity `μ`. A strengthening of `is_primitive_root.aut_to_pow`. -/
@@ -140,8 +138,6 @@ noncomputable def autEquivPow : (L ≃ₐ[K] L) ≃* (ZMod n)ˣ :=
exact Units.ext key }
#align is_cyclotomic_extension.aut_equiv_pow IsCyclotomicExtension.autEquivPow
-include hμ
-
variable {L}
/-- Maps `μ` to the `alg_equiv` that sends `is_cyclotomic_extension.zeta` to `μ`. -/
mathlib commit https://github.com/leanprover-community/mathlib/commit/5f25c089cb34db4db112556f23c50d12da81b297
@@ -59,12 +59,12 @@ field extension. -/
theorem autToPow_injective : Function.Injective <| hμ.autToPow K :=
by
intro f g hfg
- apply_fun Units.val at hfg
+ apply_fun Units.val at hfg
simp only [IsPrimitiveRoot.coe_autToPow_apply, Units.val_eq_coe] at hfg
- generalize_proofs hf' hg' at hfg
+ generalize_proofs hf' hg' at hfg
have hf := hf'.some_spec
have hg := hg'.some_spec
- generalize_proofs hζ at hf hg
+ generalize_proofs hζ at hf hg
suffices f hμ.to_roots_of_unity = g hμ.to_roots_of_unity
by
apply AlgEquiv.coe_algHom_injective
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -59,18 +59,18 @@ field extension. -/
theorem autToPow_injective : Function.Injective <| hμ.autToPow K :=
by
intro f g hfg
- apply_fun Units.val at hfg
- simp only [IsPrimitiveRoot.coe_autToPow_apply, Units.val_eq_coe] at hfg
- generalize_proofs hf' hg' at hfg
+ apply_fun Units.val at hfg
+ simp only [IsPrimitiveRoot.coe_autToPow_apply, Units.val_eq_coe] at hfg
+ generalize_proofs hf' hg' at hfg
have hf := hf'.some_spec
have hg := hg'.some_spec
- generalize_proofs hζ at hf hg
+ generalize_proofs hζ at hf hg
suffices f hμ.to_roots_of_unity = g hμ.to_roots_of_unity
by
apply AlgEquiv.coe_algHom_injective
apply (hμ.power_basis K).algHom_ext
exact this
- rw [ZMod.eq_iff_modEq_nat] at hfg
+ rw [ZMod.eq_iff_modEq_nat] at hfg
refine' (hf.trans _).trans hg.symm
rw [← rootsOfUnity.coe_pow _ hf'.some, ← rootsOfUnity.coe_pow _ hg'.some]
congr 1
@@ -129,14 +129,14 @@ noncomputable def autEquivPow : (L ≃ₐ[K] L) ≃* (ZMod n)ˣ :=
generalize_proofs _ h
have key := hζ.aut_to_pow_spec K ((hζ.power_basis K).equivOfMinpoly ((hμ x).PowerBasis K) h)
have := (hζ.power_basis K).equivOfMinpoly_gen ((hμ x).PowerBasis K) h
- rw [hζ.power_basis_gen K] at this
- rw [this, IsPrimitiveRoot.powerBasis_gen] at key
- rw [← hζ.coe_to_roots_of_unity_coe] at key
- simp only [← coe_coe, ← rootsOfUnity.coe_pow] at key
+ rw [hζ.power_basis_gen K] at this
+ rw [this, IsPrimitiveRoot.powerBasis_gen] at key
+ rw [← hζ.coe_to_roots_of_unity_coe] at key
+ simp only [← coe_coe, ← rootsOfUnity.coe_pow] at key
replace key := rootsOfUnity.coe_injective key
rw [pow_eq_pow_iff_modEq, ← orderOf_subgroup, ← orderOf_units, hζ.coe_to_roots_of_unity_coe, ←
- (zeta_spec n K L).eq_orderOf, ← ZMod.eq_iff_modEq_nat] at key
- simp only [ZMod.nat_cast_val, ZMod.cast_id', id.def] at key
+ (zeta_spec n K L).eq_orderOf, ← ZMod.eq_iff_modEq_nat] at key
+ simp only [ZMod.nat_cast_val, ZMod.cast_id', id.def] at key
exact Units.ext key }
#align is_cyclotomic_extension.aut_equiv_pow IsCyclotomicExtension.autEquivPow
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -60,7 +60,7 @@ theorem autToPow_injective : Function.Injective <| hμ.autToPow K :=
by
intro f g hfg
apply_fun Units.val at hfg
- simp only [IsPrimitiveRoot.coe_autToPow_apply, [anonymous]] at hfg
+ simp only [IsPrimitiveRoot.coe_autToPow_apply, Units.val_eq_coe] at hfg
generalize_proofs hf' hg' at hfg
have hf := hf'.some_spec
have hg := hg'.some_spec
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -46,7 +46,7 @@ variable {n : ℕ+} (K : Type _) [Field K] {L : Type _} {μ : L}
open Polynomial IsCyclotomicExtension
-open Cyclotomic
+open scoped Cyclotomic
namespace IsPrimitiveRoot
mathlib commit https://github.com/leanprover-community/mathlib/commit/38f16f960f5006c6c0c2bac7b0aba5273188f4e5
@@ -181,7 +181,7 @@ noncomputable def galCyclotomicEquivUnitsZmod : (cyclotomic n K).Gal ≃* (ZMod
/-- `is_cyclotomic_extension.aut_equiv_pow` repackaged in terms of `gal`.
Asserts that the Galois group of `X ^ n - 1` is equivalent to `(zmod n)ˣ`
if `cyclotomic n K` is irreducible in the base field. -/
-noncomputable def galXPowEquivUnitsZmod : (x ^ (n : ℕ) - 1).Gal ≃* (ZMod n)ˣ :=
+noncomputable def galXPowEquivUnitsZmod : (X ^ (n : ℕ) - 1).Gal ≃* (ZMod n)ˣ :=
(AlgEquiv.autCongr (IsSplittingField.algEquiv _ _)).symm.trans
(IsCyclotomicExtension.autEquivPow L h)
#align gal_X_pow_equiv_units_zmod galXPowEquivUnitsZmod
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
generalize_proofs
handle proofs under binders (#12472)
The generalize_proofs
tactic had a bug where it would not generalize proofs that appeared under binders correctly, creating terms with fvars from the wrong context. The tactic has been refactored, and it now abstracts the proofs (universally quantifying all the bound variables that appear in the proof) before lifting them to the local context.
This feature can be controlled with the abstract
option. Using generalize_proofs (config := { abstract := false })
turns off proof abstraction and leaves alone those proofs that refer to bound variables.
Other new features:
generalize_proofs at h
for a let-bound local hypothesis h
will clear its value.generalize_proofs at h
for a duplicate proposition will eliminate h
from the local context.generalize_proofs (config := { maxDepth := 0 })
.generalize_proofs at h
will no longer generalize proofs from the goal.inferType
. This gives local hypotheses in more useful forms.(This PR serves as a followup to this comment.)
@@ -56,16 +56,10 @@ theorem autToPow_injective : Function.Injective <| hμ.autToPow K := by
intro f g hfg
apply_fun Units.val at hfg
simp only [IsPrimitiveRoot.coe_autToPow_apply] at hfg
- -- Porting note: was `generalize_proofs hf' hg' at hfg`
- revert hfg
- generalize_proofs hf' hg'
- intro hfg
+ generalize_proofs hf' hg' at hfg
have hf := hf'.choose_spec
have hg := hg'.choose_spec
- -- Porting note: was `generalize_proofs hζ at hf hg`
- revert hf hg
- generalize_proofs hζ
- intro hf hg
+ generalize_proofs hζ at hf hg
suffices f (hμ.toRootsOfUnity : Lˣ) = g (hμ.toRootsOfUnity : Lˣ) by
apply AlgEquiv.coe_algHom_injective
apply (hμ.powerBasis K).algHom_ext
@@ -154,13 +148,11 @@ noncomputable def fromZetaAut : L ≃ₐ[K] L :=
theorem fromZetaAut_spec : fromZetaAut hμ h (zeta n K L) = μ := by
simp_rw [fromZetaAut, autEquivPow_symm_apply]
--- Porting note: `generalize_proofs` did not generalize the same proofs, making the proof different.
- generalize_proofs h1 h2
- nth_rewrite 4 [← (zeta_spec n K L).powerBasis_gen K]
- have := Exists.choose_spec ((zeta_spec n K L).eq_pow_of_pow_eq_one hμ.pow_eq_one n.pos)
- rw [PowerBasis.equivOfMinpoly_gen, h1.powerBasis_gen K, ZMod.coe_unitOfCoprime,
- ZMod.val_cast_of_lt this.1]
- exact this.2
+ generalize_proofs hζ h _ hμ _
+ nth_rewrite 4 [← hζ.powerBasis_gen K]
+ rw [PowerBasis.equivOfMinpoly_gen, hμ.powerBasis_gen K]
+ convert h.choose_spec.2
+ exact ZMod.val_cast_of_lt h.choose_spec.1
#align is_cyclotomic_extension.from_zeta_aut_spec IsCyclotomicExtension.fromZetaAut_spec
end IsCyclotomicExtension
nat_cast
/int_cast
/rat_cast
to natCast
/intCast
/ratCast
(#11486)
Now that I am defining NNRat.cast
, I want a definitive answer to this naming issue. Plenty of lemmas in mathlib already use natCast
/intCast
/ratCast
over nat_cast
/int_cast
/rat_cast
, and this matches with the general expectation that underscore-separated name parts correspond to a single declaration.
@@ -138,7 +138,7 @@ noncomputable def autEquivPow : (L ≃ₐ[K] L) ≃* (ZMod n)ˣ :=
replace key := rootsOfUnity.coe_injective key
rw [pow_eq_pow_iff_modEq, ← Subgroup.orderOf_coe, ← orderOf_units, hζ.val_toRootsOfUnity_coe,
← (zeta_spec n K L).eq_orderOf, ← ZMod.eq_iff_modEq_nat] at key
- simp only [ZMod.nat_cast_val, ZMod.cast_id', id] at key
+ simp only [ZMod.natCast_val, ZMod.cast_id', id] at key
exact Units.ext key }
#align is_cyclotomic_extension.aut_equiv_pow IsCyclotomicExtension.autEquivPow
@@ -138,7 +138,7 @@ noncomputable def autEquivPow : (L ≃ₐ[K] L) ≃* (ZMod n)ˣ :=
replace key := rootsOfUnity.coe_injective key
rw [pow_eq_pow_iff_modEq, ← Subgroup.orderOf_coe, ← orderOf_units, hζ.val_toRootsOfUnity_coe,
← (zeta_spec n K L).eq_orderOf, ← ZMod.eq_iff_modEq_nat] at key
- simp only [ZMod.nat_cast_val, ZMod.cast_id', id.def] at key
+ simp only [ZMod.nat_cast_val, ZMod.cast_id', id] at key
exact Units.ext key }
#align is_cyclotomic_extension.aut_equiv_pow IsCyclotomicExtension.autEquivPow
A mix of various changes; generated with a script and manually tweaked.
@@ -170,7 +170,7 @@ section Gal
variable [Field L] (hμ : IsPrimitiveRoot μ n) [Algebra K L] [IsCyclotomicExtension {n} K L]
(h : Irreducible (cyclotomic n K)) {K}
-/-- `IsCyclotomicExtension.autEquivPow` repackaged in terms of `gal`.
+/-- `IsCyclotomicExtension.autEquivPow` repackaged in terms of `Gal`.
Asserts that the Galois group of `cyclotomic n K` is equivalent to `(ZMod n)ˣ`
if `cyclotomic n K` is irreducible in the base field. -/
noncomputable def galCyclotomicEquivUnitsZMod : (cyclotomic n K).Gal ≃* (ZMod n)ˣ :=
@@ -179,7 +179,7 @@ noncomputable def galCyclotomicEquivUnitsZMod : (cyclotomic n K).Gal ≃* (ZMod
(IsCyclotomicExtension.autEquivPow L h)
#align gal_cyclotomic_equiv_units_zmod galCyclotomicEquivUnitsZMod
-/-- `IsCyclotomicExtension.autEquivPow` repackaged in terms of `gal`.
+/-- `IsCyclotomicExtension.autEquivPow` repackaged in terms of `Gal`.
Asserts that the Galois group of `X ^ n - 1` is equivalent to `(ZMod n)ˣ`
if `cyclotomic n K` is irreducible in the base field. -/
noncomputable def galXPowEquivUnitsZMod : (X ^ (n : ℕ) - 1 : K[X]).Gal ≃* (ZMod n)ˣ :=
@@ -136,8 +136,8 @@ noncomputable def autEquivPow : (L ≃ₐ[K] L) ≃* (ZMod n)ˣ :=
rw [← hζ.val_toRootsOfUnity_coe]
simp only [← rootsOfUnity.coe_pow] at key
replace key := rootsOfUnity.coe_injective key
- rw [pow_eq_pow_iff_modEq, ←Subgroup.orderOf_coe, ← orderOf_units, hζ.val_toRootsOfUnity_coe, ←
- (zeta_spec n K L).eq_orderOf, ← ZMod.eq_iff_modEq_nat] at key
+ rw [pow_eq_pow_iff_modEq, ← Subgroup.orderOf_coe, ← orderOf_units, hζ.val_toRootsOfUnity_coe,
+ ← (zeta_spec n K L).eq_orderOf, ← ZMod.eq_iff_modEq_nat] at key
simp only [ZMod.nat_cast_val, ZMod.cast_id', id.def] at key
exact Units.ext key }
#align is_cyclotomic_extension.aut_equiv_pow IsCyclotomicExtension.autEquivPow
The cardinality of a subgroup is greater than the order of any of its elements.
Rename
order_eq_card_zpowers
→ Fintype.card_zpowers
order_eq_card_zpowers'
→ Nat.card_zpowers
(and turn it around to match Nat.card_subgroupPowers
)Submonoid.powers_subset
→ Submonoid.powers_le
orderOf_dvd_card_univ
→ orderOf_dvd_card
orderOf_subgroup
→ Subgroup.orderOf
Subgroup.nonempty
→ Subgroup.coe_nonempty
@@ -79,7 +79,7 @@ theorem autToPow_injective : Function.Injective <| hμ.autToPow K := by
rw [hμ.eq_orderOf]
-- Porting note: was `{occs := occurrences.pos [2]}`
conv_rhs => rw [← hμ.val_toRootsOfUnity_coe]
- rw [orderOf_units, orderOf_subgroup]
+ rw [orderOf_units, Subgroup.orderOf_coe]
#align is_primitive_root.aut_to_pow_injective IsPrimitiveRoot.autToPow_injective
end IsPrimitiveRoot
@@ -136,7 +136,7 @@ noncomputable def autEquivPow : (L ≃ₐ[K] L) ≃* (ZMod n)ˣ :=
rw [← hζ.val_toRootsOfUnity_coe]
simp only [← rootsOfUnity.coe_pow] at key
replace key := rootsOfUnity.coe_injective key
- rw [pow_eq_pow_iff_modEq, ← orderOf_subgroup, ← orderOf_units, hζ.val_toRootsOfUnity_coe, ←
+ rw [pow_eq_pow_iff_modEq, ←Subgroup.orderOf_coe, ← orderOf_units, hζ.val_toRootsOfUnity_coe, ←
(zeta_spec n K L).eq_orderOf, ← ZMod.eq_iff_modEq_nat] at key
simp only [ZMod.nat_cast_val, ZMod.cast_id', id.def] at key
exact Units.ext key }
@@ -78,7 +78,7 @@ theorem autToPow_injective : Function.Injective <| hμ.autToPow K := by
convert hfg
rw [hμ.eq_orderOf]
-- Porting note: was `{occs := occurrences.pos [2]}`
- conv_rhs => rw [← hμ.toRootsOfUnity_coe_val]
+ conv_rhs => rw [← hμ.val_toRootsOfUnity_coe]
rw [orderOf_units, orderOf_subgroup]
#align is_primitive_root.aut_to_pow_injective IsPrimitiveRoot.autToPow_injective
@@ -131,12 +131,12 @@ noncomputable def autEquivPow : (L ≃ₐ[K] L) ≃* (ZMod n)ˣ :=
-- Porting note: was `rw ← hζ.coe_to_roots_of_unity_coe at key {occs := occurrences.pos [1, 5]}`.
conv at key =>
congr; congr
- rw [← hζ.toRootsOfUnity_coe_val]
+ rw [← hζ.val_toRootsOfUnity_coe]
rfl; rfl
- rw [← hζ.toRootsOfUnity_coe_val]
+ rw [← hζ.val_toRootsOfUnity_coe]
simp only [← rootsOfUnity.coe_pow] at key
replace key := rootsOfUnity.coe_injective key
- rw [pow_eq_pow_iff_modEq, ← orderOf_subgroup, ← orderOf_units, hζ.toRootsOfUnity_coe_val, ←
+ rw [pow_eq_pow_iff_modEq, ← orderOf_subgroup, ← orderOf_units, hζ.val_toRootsOfUnity_coe, ←
(zeta_spec n K L).eq_orderOf, ← ZMod.eq_iff_modEq_nat] at key
simp only [ZMod.nat_cast_val, ZMod.cast_id', id.def] at key
exact Units.ext key }
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -39,7 +39,7 @@ it is always a subgroup, and if the `n`th cyclotomic polynomial is irreducible,
-/
-variable {n : ℕ+} (K : Type _) [Field K] {L : Type _} {μ : L}
+variable {n : ℕ+} (K : Type*) [Field K] {L : Type*} {μ : L}
open Polynomial IsCyclotomicExtension
@@ -2,15 +2,12 @@
Copyright (c) 2022 Eric Rodriguez. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Eric Rodriguez
-
-! This file was ported from Lean 3 source module number_theory.cyclotomic.gal
-! leanprover-community/mathlib commit e3f4be1fcb5376c4948d7f095bec45350bfb9d1a
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.NumberTheory.Cyclotomic.PrimitiveRoots
import Mathlib.FieldTheory.PolynomialGaloisGroup
+#align_import number_theory.cyclotomic.gal from "leanprover-community/mathlib"@"e3f4be1fcb5376c4948d7f095bec45350bfb9d1a"
+
/-!
# Galois group of cyclotomic extensions
@@ -101,7 +101,7 @@ noncomputable def Aut.commGroup : CommGroup (L ≃ₐ[K] L) :=
variable (h : Irreducible (cyclotomic n K)) {K} (L)
/-- The `MulEquiv` that takes an automorphism `f` to the element `k : (ZMod n)ˣ` such that
- `f μ = μ ^ k` for any root of unity `μ`. A strengthening of `IsPrimitiveRoot.autToPow`. -/
+ `f μ = μ ^ k` for any root of unity `μ`. A strengthening of `IsPrimitiveRoot.autToPow`. -/
@[simps]
noncomputable def autEquivPow : (L ≃ₐ[K] L) ≃* (ZMod n)ˣ :=
let hζ := zeta_spec n K L
@@ -35,7 +35,7 @@ it is always a subgroup, and if the `n`th cyclotomic polynomial is irreducible,
* We currently can get away with the fact that the power of a primitive root is a primitive root,
but the correct long-term solution for computing other explicit Galois groups is creating
- `power_basis.map_conjugate`; but figuring out the exact correct assumptions + proof for this is
+ `PowerBasis.map_conjugate`; but figuring out the exact correct assumptions + proof for this is
mathematically nontrivial. (Current thoughts: the correct condition is that the annihilating
ideal of both elements is equal. This may not hold in an ID, and definitely holds in an ICD.)
The unported dependencies are
algebra.order.module
init.core
linear_algebra.free_module.finite.rank
algebra.order.monoid.cancel.defs
algebra.abs
algebra.group_power.lemmas
init.data.list.basic
linear_algebra.free_module.rank
algebra.order.monoid.cancel.basic
init.data.list.default
topology.subset_properties
init.logic
The following 1 dependencies have changed in mathlib3 since they were ported, which may complicate porting this file