Skip to content

Commit 5424c11

Browse files
authored
Merge pull request #137 from morrison-daniel/main
FrobeniusRiou sorrys
2 parents 2668105 + 7baec40 commit 5424c11

File tree

1 file changed

+136
-20
lines changed

1 file changed

+136
-20
lines changed

FLT/MathlibExperiments/FrobeniusRiou.lean

+136-20
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,9 @@ section F_API
134134

135135
variable [Finite G]
136136

137-
theorem F_monic (b : B) : (F G b).Monic := by
138-
rw [F_spec]
139-
sorry -- finprodmonic
137+
theorem F_monic [Nontrivial B] (b : B) : (F G b).Monic := by
138+
have := Fintype.ofFinite G
139+
rw [Monic, F_spec, finprod_eq_prod_of_fintype, leadingCoeff_prod'] <;> simp
140140

141141
variable (G) in
142142
theorem F_degree (b : B) [Nontrivial B] : (F G b).degree = Nat.card G := by
@@ -145,7 +145,7 @@ theorem F_degree (b : B) [Nontrivial B] : (F G b).degree = Nat.card G := by
145145
-- then it should be easy
146146
sorry
147147

148-
theorem F_natdegree (b : B) [Nontrivial B] : (F G b).natDegree = Nat.card G := by
148+
theorem F_natdegree [Nontrivial B] (b : B) : (F G b).natDegree = Nat.card G := by
149149
rw [← degree_eq_iff_natDegree_eq_of_pos Nat.card_pos]
150150
exact F_degree G b
151151

@@ -259,7 +259,7 @@ theorem M_monic (b : B) : (M hFull b).Monic := by
259259
-- know deg(M)<=n and the coefficient of X^n is 1 in M
260260
sorry
261261

262-
262+
omit [Nontrivial B] in
263263
theorem M_spec (b : B) : ((M hFull b : A[X]) : B[X]) = F G b := by
264264
unfold M
265265
ext N
@@ -268,12 +268,34 @@ theorem M_spec (b : B) : ((M hFull b : A[X]) : B[X]) = F G b := by
268268
simp_rw [finset_sum_coeff, ← lcoeff_apply, lcoeff_apply, coeff_monomial]
269269
aesop
270270

271+
/--
272+
private theorem F_descent_monic
273+
(hFull : ∀ (b : B), (∀ (g : G), g • b = b) → ∃ a : A, b = a) (b : B) :
274+
∃ M : A[X], (M : B[X]) = F G b ∧ Monic M := by
275+
have : F G b ∈ Polynomial.lifts (algebraMap A B) := by
276+
choose M hM using F_descent hFull b
277+
use M; exact hM
278+
choose M hM using lifts_and_degree_eq_and_monic this (F_monic b)
279+
use M
280+
exact ⟨hM.1, hM.2.2⟩
271281
282+
variable (G) in
283+
noncomputable def M [Finite G] (b : B) : A[X] := (F_descent_monic hFull b).choose
284+
285+
theorem M_spec (b : B) : ((M G hFull b : A[X]) : B[X]) = F G b :=
286+
(F_descent_monic hFull b).choose_spec.1
287+
288+
theorem M_spec' (b : B) : (map (algebraMap A B) (M G hFull b)) = F G b :=
289+
(F_descent_monic hFull b).choose_spec.1
290+
291+
theorem M_monic (b : B) : (M G hFull b).Monic := (F_descent_monic hFull b).choose_spec.2
292+
--/
293+
294+
theorem coe_poly_as_map (p : A[X]) : (p : B[X]) = map (algebraMap A B) p := rfl
272295

273-
variable (hFull : ∀ (b : B), (∀ (g : G), g • b = b) → ∃ a : A, b = a)
274296

275297
theorem M_eval_eq_zero (b : B) : (M hFull b).eval₂ (algebraMap A B) b = 0 := by
276-
sorry -- follows from `F_eval_eq_zero`
298+
rw [eval₂_eq_eval_map, ← coe_poly_as_map, M_spec, F_eval_eq_zero]
277299

278300
include hFull in
279301
theorem isIntegral : Algebra.IsIntegral A B where
@@ -290,10 +312,10 @@ section part_a
290312
open MulSemiringAction.CharacteristicPolynomial
291313

292314
variable {A : Type*} [CommRing A]
293-
{B : Type*} [CommRing B] [Algebra A B]
315+
{B : Type*} [CommRing B] [Algebra A B] [Nontrivial B]
294316
{G : Type*} [Group G] [Finite G] [MulSemiringAction G B]
295317

296-
theorem isIntegral_of_Full [Nontrivial B] (hFull : ∀ (b : B), (∀ (g : G), g • b = b) → ∃ a : A, b = a) :
318+
theorem isIntegral_of_Full (hFull : ∀ (b : B), (∀ (g : G), g • b = b) → ∃ a : A, b = a) :
297319
Algebra.IsIntegral A B where
298320
isIntegral b := ⟨M hFull b, M_monic hFull b, M_eval_eq_zero hFull b⟩
299321

@@ -596,6 +618,9 @@ variable (L : Type*) [Field L] [Algebra (B ⧸ Q) L] [IsFractionRing (B ⧸ Q) L
596618
-- Do I need this:
597619
-- [Algebra B L] [IsScalarTower B (B ⧸ Q) L]
598620

621+
variable [Nontrivial B]
622+
623+
599624
-- Do we need a version of Ideal.Quotient.eq_zero_iff_mem with algebraMap?
600625

601626

@@ -620,6 +645,18 @@ open Polynomial BigOperators
620645

621646
open scoped algebraMap
622647

648+
noncomputable local instance : Algebra A[X] B[X] :=
649+
RingHom.toAlgebra (Polynomial.mapRingHom (Algebra.toRingHom))
650+
651+
theorem IsAlgebraic.mul {R K : Type*} [CommRing R] [CommRing K] [Algebra R K] {x y : K}
652+
(hx : IsAlgebraic R x) (hy : IsAlgebraic R y) : IsAlgebraic R (x * y) := sorry
653+
654+
theorem IsAlgebraic.invLoc {R S K : Type*} [CommRing R] {M : Submonoid R} [CommRing S] [Algebra R S]
655+
[IsLocalization M S] {x : M} [CommRing K] [Algebra K S] (h : IsAlgebraic K ((x : R) : S)):
656+
IsAlgebraic K (IsLocalization.mk' S 1 x) := by
657+
rw [← IsAlgebraic.invOf_iff, IsLocalization.invertible_mk'_one_invOf]
658+
exact h
659+
623660
open MulSemiringAction.CharacteristicPolynomial
624661

625662
namespace Bourbaki52222
@@ -639,8 +676,54 @@ theorem f [DecidableEq L] (l : L) :
639676
use Bourbaki52222.residueFieldExtensionPolynomial G L K l
640677
sorry
641678

642-
theorem algebraic : Algebra.IsAlgebraic K L := by
643-
sorry
679+
theorem algebraMap_cast {R S: Type*} [CommRing R] [CommRing S] [Algebra R S] (r : R) :
680+
(r : S) = (algebraMap R S) r := by
681+
rfl
682+
683+
theorem algebraMap_algebraMap {R S T : Type*} [CommRing R] [CommRing S] [CommRing T] [Algebra R S]
684+
[Algebra S T] [Algebra R T] [IsScalarTower R S T] (r : R) :
685+
(algebraMap S T) ((algebraMap R S) r) = (algebraMap R T) r := by
686+
exact Eq.symm (IsScalarTower.algebraMap_apply R S T r)
687+
688+
theorem Algebra.isAlgebraic_of_subring_isAlgebraic {R k K : Type*} [CommRing R] [CommRing k]
689+
[CommRing K] [Algebra R K] [IsFractionRing R K] [Algebra k K]
690+
(h : ∀ x : R, IsAlgebraic k (x : K)) : Algebra.IsAlgebraic k K := by
691+
rw [Algebra.isAlgebraic_def]
692+
let M := nonZeroDivisors R
693+
intro x
694+
have ⟨r, s, h'⟩ := IsLocalization.mk'_surjective M x
695+
have : x = r * IsLocalization.mk' K 1 s := by
696+
rw [← h', IsLocalization.mul_mk'_eq_mk'_of_mul]
697+
simp
698+
rw [this]
699+
apply IsAlgebraic.mul (h r)
700+
exact IsAlgebraic.invLoc (h s)
701+
702+
theorem algebraic {A : Type*} [CommRing A] {B : Type*} [Nontrivial B] [CommRing B] [Algebra A B]
703+
[Algebra.IsIntegral A B] {G : Type*} [Group G] [Finite G] [MulSemiringAction G B] (Q : Ideal B)
704+
[Q.IsPrime] (P : Ideal A) [P.IsPrime] [Algebra (A ⧸ P) (B ⧸ Q)]
705+
[IsScalarTower A (A ⧸ P) (B ⧸ Q)] (L : Type*) [Field L] [Algebra (B ⧸ Q) L]
706+
[IsFractionRing (B ⧸ Q) L] [Algebra (A ⧸ P) L] [IsScalarTower (A ⧸ P) (B ⧸ Q) L]
707+
(K : Type*) [Field K] [Algebra (A ⧸ P) K] [IsFractionRing (A ⧸ P) K]
708+
[Algebra K L] [IsScalarTower (A ⧸ P) K L] [Algebra A K] [IsScalarTower A (A ⧸ P) K]
709+
[Algebra B L] [IsScalarTower B (B ⧸ Q) L] [Algebra A L] [IsScalarTower A K L]
710+
[IsScalarTower A B L]
711+
(hFull : ∀ (b : B), (∀ (g : G), g • b = b) → ∃ a : A, b = a): Algebra.IsAlgebraic K L := by
712+
apply @Algebra.isAlgebraic_of_subring_isAlgebraic (B ⧸ Q)
713+
intro b_bar
714+
have ⟨b, hb⟩ := Ideal.Quotient.mk_surjective b_bar
715+
have hb : (algebraMap B (B ⧸ Q)) b = b_bar := hb
716+
use ((M hFull b).map (algebraMap A (A ⧸ P))).map (algebraMap (A ⧸ P) K)
717+
constructor
718+
. apply ne_zero_of_ne_zero_of_monic X_ne_zero
719+
apply Monic.map
720+
apply Monic.map
721+
exact M_monic hFull b
722+
. rw [← hb, algebraMap_cast, map_map, ← IsScalarTower.algebraMap_eq]
723+
rw [algebraMap_algebraMap, aeval_def, eval₂_eq_eval_map, map_map, ← IsScalarTower.algebraMap_eq]
724+
rw [IsScalarTower.algebraMap_eq A B L, ← map_map, ← coe_poly_as_map (M hFull b), M_spec]
725+
rw [eval_map, eval₂_hom, F_eval_eq_zero]
726+
exact algebraMap.coe_zero
644727

645728
theorem normal : Normal K L := by
646729
sorry
@@ -681,29 +764,63 @@ def quotientRingAction (Q' : Ideal B) (g : G) (hg : g • Q = Q') :
681764

682765
def quotientAlgebraAction (g : G) (hg : g • Q = Q) : (B ⧸ Q) ≃ₐ[A ⧸ P] B ⧸ Q where
683766
__ := quotientRingAction Q Q g hg
684-
commutes' := sorry
767+
commutes' := by
768+
intro a_bar; dsimp
769+
have ⟨a, ha⟩ := Ideal.Quotient.mk_surjective a_bar
770+
rw [quotientRingAction]; dsimp
771+
rw [← ha, ← Ideal.Quotient.algebraMap_eq, algebraMap_algebraMap]
772+
rw [@Ideal.quotientMap_algebraMap A B _ _ _ B _ Q Q _ ]
773+
simp
685774

686-
def quotientAlgebraActionMonoidHom :
775+
def Pointwise.quotientAlgebraActionMonoidHom :
687776
MulAction.stabilizer G Q →* ((B ⧸ Q) ≃ₐ[A ⧸ P] (B ⧸ Q)) where
688777
toFun gh := quotientAlgebraAction Q P gh.1 gh.2
689-
map_one' := sorry
690-
map_mul' := sorry
778+
map_one' := by
779+
apply AlgEquiv.ext
780+
intro b_bar; dsimp
781+
unfold quotientAlgebraAction
782+
unfold quotientRingAction
783+
have ⟨b, hb⟩ := Ideal.Quotient.mk_surjective b_bar
784+
rw [← hb, ← Ideal.Quotient.algebraMap_eq]
785+
simp
786+
map_mul' := by
787+
intro ⟨x, hx⟩ ⟨y, hy⟩
788+
apply AlgEquiv.ext
789+
intro b_bar; dsimp
790+
unfold quotientAlgebraAction
791+
unfold quotientRingAction
792+
have ⟨b, hb⟩ := Ideal.Quotient.mk_surjective b_bar
793+
rw [← hb, ← Ideal.Quotient.algebraMap_eq]
794+
simp
795+
rw [smul_smul]
691796

692797
variable (L : Type*) [Field L] [Algebra (B ⧸ Q) L] [IsFractionRing (B ⧸ Q) L]
693798
[Algebra (A ⧸ P) L] [IsScalarTower (A ⧸ P) (B ⧸ Q) L]
694799
(K : Type*) [Field K] [Algebra (A ⧸ P) K] [IsFractionRing (A ⧸ P) K]
695800
[Algebra K L] [IsScalarTower (A ⧸ P) K L]
696801

802+
803+
697804
noncomputable def IsFractionRing.algEquiv_lift (e : (B ⧸ Q) ≃ₐ[A ⧸ P] B ⧸ Q) : L ≃ₐ[K] L where
698805
__ := IsFractionRing.fieldEquivOfRingEquiv e.toRingEquiv
699-
commutes' := sorry
806+
commutes' := by
807+
intro k
808+
dsimp
809+
obtain ⟨x, y, _, rfl⟩ := @IsFractionRing.div_surjective (A ⧸ P) _ _ K _ _ _ k
810+
simp [algebraMap_algebraMap]
811+
unfold IsFractionRing.fieldEquivOfRingEquiv
812+
unfold IsLocalization.ringEquivOfRingEquiv
813+
simp [IsScalarTower.algebraMap_apply (A ⧸ P) (B ⧸ Q) L]
700814

701815
noncomputable def stabilizer.toGaloisGroup : MulAction.stabilizer G Q →* (L ≃ₐ[K] L) where
702-
toFun gh := IsFractionRing.algEquiv_lift Q P L K (quotientAlgebraActionMonoidHom Q P gh)
816+
toFun gh := IsFractionRing.algEquiv_lift Q P L K (Pointwise.quotientAlgebraActionMonoidHom Q P gh)
703817
map_one' := by
704-
ext
818+
apply AlgEquiv.ext
819+
intro l; simp
820+
obtain ⟨x, y, _, rfl⟩ := @IsFractionRing.div_surjective (B ⧸ Q) _ _ L _ _ _ l
821+
unfold IsFractionRing.algEquiv_lift
822+
unfold IsFractionRing.fieldEquivOfRingEquiv
705823
simp
706-
sorry
707824
map_mul' := by
708825
intro ⟨x, hx⟩ ⟨y, hy⟩
709826
apply AlgEquiv.ext
@@ -712,7 +829,6 @@ noncomputable def stabilizer.toGaloisGroup : MulAction.stabilizer G Q →* (L
712829
unfold IsFractionRing.algEquiv_lift
713830
unfold IsFractionRing.fieldEquivOfRingEquiv
714831
simp
715-
716832
sorry
717833

718834
variable (hFull : ∀ (b : B), (∀ (g : G), g • b = b) ↔ ∃ a : A, b = a) in

0 commit comments

Comments
 (0)