Skip to content

Commit dadd3da

Browse files
committed
chore(RingTheory): equivalence between algebraicity over IntermediateField.adjoin and Algebra.adjoin (#24004)
1 parent 0b45b3c commit dadd3da

File tree

8 files changed

+201
-24
lines changed

8 files changed

+201
-24
lines changed

Mathlib/Algebra/Algebra/Subalgebra/Basic.lean

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,7 @@ open Algebra
623623

624624
variable {R : Type u} {A : Type v} {B : Type w}
625625
variable [CommSemiring R] [Semiring A] [Algebra R A] [Semiring B] [Algebra R B]
626-
variable (S : Subalgebra R A)
626+
variable (S T U : Subalgebra R A)
627627

628628
instance subsingleton_of_subsingleton [Subsingleton A] : Subsingleton (Subalgebra R A) :=
629629
fun B C => ext fun x => by simp only [Subsingleton.elim x 0, zero_mem B, zero_mem C]⟩
@@ -642,31 +642,55 @@ def inclusion {S T : Subalgebra R A} (h : S ≤ T) : S →ₐ[R] T where
642642
map_zero' := rfl
643643
commutes' _ := rfl
644644

645-
theorem inclusion_injective {S T : Subalgebra R A} (h : S ≤ T) : Function.Injective (inclusion h) :=
645+
variable {S T U} (h : S ≤ T)
646+
647+
theorem inclusion_injective : Function.Injective (inclusion h) :=
646648
fun _ _ => Subtype.ext ∘ Subtype.mk.inj
647649

648650
@[simp]
649-
theorem inclusion_self {S : Subalgebra R A} : inclusion (le_refl S) = AlgHom.id R S :=
651+
theorem inclusion_self : inclusion (le_refl S) = AlgHom.id R S :=
650652
AlgHom.ext fun _x => Subtype.ext rfl
651653

652654
@[simp]
653-
theorem inclusion_mk {S T : Subalgebra R A} (h : S ≤ T) (x : A) (hx : x ∈ S) :
654-
inclusion h ⟨x, hx⟩ = ⟨x, h hx⟩ :=
655+
theorem inclusion_mk (x : A) (hx : x ∈ S) : inclusion h ⟨x, hx⟩ = ⟨x, h hx⟩ :=
655656
rfl
656657

657-
theorem inclusion_right {S T : Subalgebra R A} (h : S ≤ T) (x : T) (m : (x : A) ∈ S) :
658-
inclusion h ⟨x, m⟩ = x :=
658+
theorem inclusion_right (x : T) (m : (x : A) ∈ S) : inclusion h ⟨x, m⟩ = x :=
659659
Subtype.ext rfl
660660

661661
@[simp]
662-
theorem inclusion_inclusion {S T U : Subalgebra R A} (hst : S ≤ T) (htu : T ≤ U) (x : S) :
662+
theorem inclusion_inclusion (hst : S ≤ T) (htu : T ≤ U) (x : S) :
663663
inclusion htu (inclusion hst x) = inclusion (le_trans hst htu) x :=
664664
Subtype.ext rfl
665665

666666
@[simp]
667-
theorem coe_inclusion {S T : Subalgebra R A} (h : S ≤ T) (s : S) : (inclusion h s : A) = s :=
667+
theorem coe_inclusion (s : S) : (inclusion h s : A) = s :=
668668
rfl
669669

670+
namespace inclusion
671+
672+
scoped instance isScalarTower_left (X) [SMul X R] [SMul X A] [IsScalarTower X R A] :
673+
letI := (inclusion h).toModule; IsScalarTower X S T :=
674+
letI := (inclusion h).toModule
675+
fun x s t ↦ Subtype.ext <| by
676+
rw [← one_smul R s, ← smul_assoc, one_smul, ← one_smul R (s • t), ← smul_assoc,
677+
Algebra.smul_def, Algebra.smul_def]
678+
apply mul_assoc⟩
679+
680+
scoped instance isScalarTower_right (X) [MulAction A X] :
681+
letI := (inclusion h).toModule; IsScalarTower S T X :=
682+
letI := (inclusion h).toModule; ⟨fun _ ↦ mul_smul _⟩
683+
684+
scoped instance faithfulSMul :
685+
letI := (inclusion h).toModule; FaithfulSMul S T :=
686+
letI := (inclusion h).toModule
687+
fun {x y} h ↦ Subtype.ext <| by
688+
convert Subtype.ext_iff.mp (h 1) using 1 <;> exact (mul_one _).symm⟩
689+
690+
end inclusion
691+
692+
variable (S)
693+
670694
/-- Two subalgebras that are equal are also equivalent as algebras.
671695
672696
This is the `Subalgebra` version of `LinearEquiv.ofEq` and `Equiv.setCongr`. -/

Mathlib/FieldTheory/IntermediateField/Adjoin/Algebra.lean

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,31 @@ variable (F : Type*) [Field F] {E : Type*} [Field E] [Algebra F E] (S : Set E)
2424
theorem algebra_adjoin_le_adjoin : Algebra.adjoin F S ≤ (adjoin F S).toSubalgebra :=
2525
Algebra.adjoin_le (subset_adjoin _ _)
2626

27+
namespace algebraAdjoinAdjoin
28+
29+
/-- `IntermediateField.adjoin` as an algebra over `Algebra.adjoin`. -/
30+
scoped instance : Algebra (Algebra.adjoin F S) (adjoin F S) :=
31+
(Subalgebra.inclusion <| algebra_adjoin_le_adjoin F S).toAlgebra
32+
33+
scoped instance (X) [SMul X F] [SMul X E] [IsScalarTower X F E] :
34+
IsScalarTower X (Algebra.adjoin F S) (adjoin F S) :=
35+
Subalgebra.inclusion.isScalarTower_left (algebra_adjoin_le_adjoin F S) _
36+
37+
scoped instance (X) [MulAction E X] : IsScalarTower (Algebra.adjoin F S) (adjoin F S) X :=
38+
Subalgebra.inclusion.isScalarTower_right (algebra_adjoin_le_adjoin F S) _
39+
40+
scoped instance : FaithfulSMul (Algebra.adjoin F S) (adjoin F S) :=
41+
Subalgebra.inclusion.faithfulSMul (algebra_adjoin_le_adjoin F S)
42+
43+
scoped instance : IsFractionRing (Algebra.adjoin F S) (adjoin F S) :=
44+
.of_field _ _ fun ⟨_, h⟩ ↦ have ⟨x, hx, y, hy, eq⟩ := mem_adjoin_iff_div.mp h
45+
⟨⟨x, hx⟩, ⟨y, hy⟩, Subtype.ext eq⟩
46+
47+
scoped instance : Algebra.IsAlgebraic (Algebra.adjoin F S) (adjoin F S) :=
48+
IsLocalization.isAlgebraic _ (nonZeroDivisors (Algebra.adjoin F S))
49+
50+
end algebraAdjoinAdjoin
51+
2752
theorem adjoin_eq_algebra_adjoin (inv_mem : ∀ x ∈ Algebra.adjoin F S, x⁻¹ ∈ Algebra.adjoin F S) :
2853
(adjoin F S).toSubalgebra = Algebra.adjoin F S :=
2954
le_antisymm

Mathlib/FieldTheory/IntermediateField/Adjoin/Basic.lean

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,8 @@ variable (F : Type*) [Field F] {E : Type*} [Field E] [Algebra F E] {S : Set E}
3232
theorem mem_adjoin_range_iff {ι : Type*} (i : ι → E) (x : E) :
3333
x ∈ adjoin F (Set.range i) ↔ ∃ r s : MvPolynomial ι F,
3434
x = MvPolynomial.aeval i r / MvPolynomial.aeval i s := by
35-
simp_rw [adjoin, mem_mk, Subring.mem_toSubsemiring, Subfield.mem_toSubring,
36-
Subfield.mem_closure_iff, ← Algebra.adjoin_eq_ring_closure, Subalgebra.mem_toSubring,
37-
Algebra.adjoin_range_eq_range_aeval, AlgHom.mem_range, exists_exists_eq_and]
38-
tauto
35+
simp_rw [mem_adjoin_iff_div, Algebra.adjoin_range_eq_range_aeval,
36+
AlgHom.mem_range, exists_exists_eq_and]
3937

4038
theorem mem_adjoin_iff (x : E) :
4139
x ∈ adjoin F S ↔ ∃ r s : MvPolynomial S F,
@@ -44,10 +42,8 @@ theorem mem_adjoin_iff (x : E) :
4442

4543
theorem mem_adjoin_simple_iff {α : E} (x : E) :
4644
x ∈ adjoin F {α} ↔ ∃ r s : F[X], x = aeval α r / aeval α s := by
47-
simp only [adjoin, mem_mk, Subring.mem_toSubsemiring, Subfield.mem_toSubring,
48-
Subfield.mem_closure_iff, ← Algebra.adjoin_eq_ring_closure, Subalgebra.mem_toSubring,
49-
Algebra.adjoin_singleton_eq_range_aeval, AlgHom.mem_range, exists_exists_eq_and]
50-
tauto
45+
simp only [mem_adjoin_iff_div, Algebra.adjoin_singleton_eq_range_aeval,
46+
AlgHom.mem_range, exists_exists_eq_and]
5147

5248
variable {F}
5349

Mathlib/FieldTheory/IntermediateField/Adjoin/Defs.lean

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ def adjoin : IntermediateField F E :=
3535
theorem adjoin_toSubfield :
3636
(adjoin F S).toSubfield = Subfield.closure (Set.range (algebraMap F E) ∪ S) := rfl
3737

38+
variable {F S} in
39+
theorem mem_adjoin_iff_div {x : E} : x ∈ adjoin F S ↔
40+
∃ r ∈ Algebra.adjoin F S, ∃ s ∈ Algebra.adjoin F S, x = r / s := by
41+
simp_rw [adjoin, mem_mk, Subring.mem_toSubsemiring, Subfield.mem_toSubring,
42+
Subfield.mem_closure_iff, ← Algebra.adjoin_eq_ring_closure, Subalgebra.mem_toSubring, eq_comm]
43+
3844
end AdjoinDef
3945

4046
section Lattice

Mathlib/GroupTheory/GroupAction/SubMulAction.lean

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,9 @@ variable {N α : Type*} [SetLike S α] [SMul M N] [SMul M α] [Monoid N]
136136
instance (priority := 50) smul' : SMul M s where
137137
smul r x := ⟨r • x.1, smul_one_smul N r x.1 ▸ smul_mem _ x.2
138138

139+
instance (priority := 50) : IsScalarTower M N s where
140+
smul_assoc m n x := Subtype.ext (smul_assoc m n x.1)
141+
139142
@[to_additive (attr := simp, norm_cast)]
140143
protected theorem val_smul_of_tower (r : M) (x : s) : (↑(r • x) : α) = r • (x : α) :=
141144
rfl

Mathlib/RingTheory/Algebraic/Integral.lean

Lines changed: 42 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,28 @@ theorem IsAlgebraic.trans_isIntegral [Algebra.IsAlgebraic R S] [int : Algebra.Is
312312
Algebra.IsAlgebraic R A :=
313313
fun _ ↦ (int.1 _).trans_isAlgebraic _⟩
314314

315+
variable {A}
316+
317+
protected theorem IsIntegral.isAlgebraic_iff [Algebra.IsIntegral R S] [FaithfulSMul R S]
318+
{a : A} : IsAlgebraic R a ↔ IsAlgebraic S a :=
319+
⟨.extendScalars (FaithfulSMul.algebraMap_injective ..), .restrictScalars_of_isIntegral _⟩
320+
321+
theorem IsIntegral.isAlgebraic_iff_top [Algebra.IsIntegral R S]
322+
[FaithfulSMul R S] : Algebra.IsAlgebraic R A ↔ Algebra.IsAlgebraic S A := by
323+
simp_rw [Algebra.isAlgebraic_def, Algebra.IsIntegral.isAlgebraic_iff R S]
324+
325+
protected theorem IsAlgebraic.isAlgebraic_iff [Algebra.IsAlgebraic R S] [FaithfulSMul R S]
326+
{a : A} : IsAlgebraic R a ↔ IsAlgebraic S a :=
327+
⟨.extendScalars (FaithfulSMul.algebraMap_injective ..), .restrictScalars _⟩
328+
329+
theorem IsAlgebraic.isAlgebraic_iff_top [Algebra.IsAlgebraic R S]
330+
[FaithfulSMul R S] : Algebra.IsAlgebraic R A ↔ Algebra.IsAlgebraic S A := by
331+
simp_rw [Algebra.isAlgebraic_def, Algebra.IsAlgebraic.isAlgebraic_iff R S]
332+
333+
theorem IsAlgebraic.isAlgebraic_iff_bot [Algebra.IsAlgebraic S A] [FaithfulSMul S A] :
334+
Algebra.IsAlgebraic R S ↔ Algebra.IsAlgebraic R A :=
335+
fun _ ↦ .trans R S A, fun _ ↦ .tower_bot_of_injective (FaithfulSMul.algebraMap_injective S A)⟩
336+
315337
end Algebra
316338

317339
variable (R S)
@@ -391,29 +413,43 @@ namespace Transcendental
391413

392414
section
393415

394-
variable (S) {a : A} (ha : Transcendental R a)
416+
variable (S) [NoZeroDivisors S] {a : A} (ha : Transcendental R a)
395417
include ha
396418

397-
lemma extendScalars_of_isIntegral [NoZeroDivisors S] [Algebra.IsIntegral R S] :
419+
lemma extendScalars_of_isIntegral [Algebra.IsIntegral R S] :
398420
Transcendental S a := by
399421
contrapose ha
400422
rw [Transcendental, not_not] at ha ⊢
401423
exact ha.restrictScalars_of_isIntegral _
402424

403-
lemma extendScalars [NoZeroDivisors S] [Algebra.IsAlgebraic R S] : Transcendental S a := by
425+
lemma extendScalars [Algebra.IsAlgebraic R S] : Transcendental S a := by
404426
contrapose ha
405427
rw [Transcendental, not_not] at ha ⊢
406428
exact ha.restrictScalars _
407429

408430
end
409431

410-
variable {a : S} (ha : Transcendental R a)
432+
variable [NoZeroDivisors S] {a : S} (ha : Transcendental R a)
411433
include ha
412434

413-
protected lemma integralClosure [NoZeroDivisors S] : Transcendental (integralClosure R S) a :=
435+
protected lemma integralClosure : Transcendental (integralClosure R S) a :=
414436
ha.extendScalars_of_isIntegral _
415437

416-
lemma subalgebraAlgebraicClosure [IsDomain R] [NoZeroDivisors S] :
438+
lemma subalgebraAlgebraicClosure [IsDomain R] :
417439
Transcendental (Subalgebra.algebraicClosure R S) a := ha.extendScalars _
418440

419441
end Transcendental
442+
443+
namespace Algebra
444+
445+
variable (R S) [NoZeroDivisors S] [FaithfulSMul R S] {a : A}
446+
447+
protected theorem IsIntegral.transcendental_iff [Algebra.IsIntegral R S] :
448+
Transcendental R a ↔ Transcendental S a :=
449+
⟨(·.extendScalars_of_isIntegral _), (·.restrictScalars (FaithfulSMul.algebraMap_injective R S))⟩
450+
451+
protected theorem IsAlgebraic.transcendental_iff [Algebra.IsAlgebraic R S] :
452+
Transcendental R a ↔ Transcendental S a :=
453+
⟨(·.extendScalars _), (·.restrictScalars (FaithfulSMul.algebraMap_injective R S))⟩
454+
455+
end Algebra

Mathlib/RingTheory/AlgebraicIndependent/AlgebraicClosure.lean

Lines changed: 71 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,16 @@ algebraically independent over the algebraic closure.
2222

2323
open Function Algebra
2424

25-
namespace AlgebraicIndependent
25+
section
2626

2727
variable {ι R S A : Type*} {x : ι → A} (S)
2828
variable [CommRing R] [CommRing S] [CommRing A]
2929
variable [Algebra R S] [Algebra R A] [Algebra S A] [IsScalarTower R S A]
3030
variable [NoZeroDivisors S] (hx : AlgebraicIndependent R x)
3131
include hx
3232

33+
namespace AlgebraicIndependent
34+
3335
theorem extendScalars [alg : Algebra.IsAlgebraic R S] : AlgebraicIndependent S x := by
3436
refine algebraicIndependent_of_finite_type'
3537
(Algebra.IsAlgebraic.injective_tower_top S hx.algebraMap_injective) fun t fin ind i hi ↦ ?_
@@ -76,3 +78,71 @@ protected theorem algebraicClosure {F E : Type*} [Field F] [Field E] [Algebra F
7678
hx.extendScalars _
7779

7880
end AlgebraicIndependent
81+
82+
namespace Algebra
83+
84+
variable (R) [FaithfulSMul R S]
85+
omit hx
86+
87+
protected theorem IsIntegral.algebraicIndependent_iff [Algebra.IsIntegral R S] :
88+
AlgebraicIndependent R x ↔ AlgebraicIndependent S x :=
89+
⟨(·.extendScalars_of_isIntegral _),
90+
(·.restrictScalars (FaithfulSMul.algebraMap_injective R S))⟩
91+
92+
protected theorem IsIntegral.isTranscendenceBasis_iff [Algebra.IsIntegral R S] :
93+
IsTranscendenceBasis R x ↔ IsTranscendenceBasis S x := by
94+
simp_rw [IsTranscendenceBasis, IsIntegral.algebraicIndependent_iff R S]
95+
96+
protected theorem IsAlgebraic.algebraicIndependent_iff [Algebra.IsAlgebraic R S] :
97+
AlgebraicIndependent R x ↔ AlgebraicIndependent S x :=
98+
⟨(·.extendScalars _), (·.restrictScalars (FaithfulSMul.algebraMap_injective R S))⟩
99+
100+
protected theorem IsAlgebraic.isTranscendenceBasis_iff [Algebra.IsAlgebraic R S] :
101+
IsTranscendenceBasis R x ↔ IsTranscendenceBasis S x := by
102+
simp_rw [IsTranscendenceBasis, IsAlgebraic.algebraicIndependent_iff R S]
103+
104+
end Algebra
105+
106+
end
107+
108+
namespace IntermediateField
109+
110+
variable {ι F E R S : Type*} {s : Set E}
111+
variable [Field F] [Field E] [Algebra F E]
112+
variable [CommRing R] [Algebra R F] [Algebra R E] [IsScalarTower R F E]
113+
114+
open scoped algebraAdjoinAdjoin
115+
116+
section Ring
117+
118+
variable [Ring S] [Algebra E S]
119+
120+
theorem isAlgebraic_adjoin_iff {x : S} :
121+
IsAlgebraic (adjoin F s) x ↔ IsAlgebraic (Algebra.adjoin F s) x :=
122+
(IsAlgebraic.isAlgebraic_iff ..).symm
123+
124+
theorem isAlgebraic_adjoin_iff_top :
125+
Algebra.IsAlgebraic (adjoin F s) S ↔ Algebra.IsAlgebraic (Algebra.adjoin F s) S :=
126+
(IsAlgebraic.isAlgebraic_iff_top ..).symm
127+
128+
theorem isAlgebraic_adjoin_iff_bot :
129+
Algebra.IsAlgebraic R (adjoin F s) ↔ Algebra.IsAlgebraic R (Algebra.adjoin F s) :=
130+
(IsAlgebraic.isAlgebraic_iff_bot ..).symm
131+
132+
theorem transcendental_adjoin_iff {x : S} :
133+
Transcendental (adjoin F s) x ↔ Transcendental (Algebra.adjoin F s) x :=
134+
(IsAlgebraic.transcendental_iff ..).symm
135+
136+
end Ring
137+
138+
variable [CommRing S] [Algebra E S]
139+
140+
theorem algebraicIndependent_adjoin_iff {x : ι → S} :
141+
AlgebraicIndependent (adjoin F s) x ↔ AlgebraicIndependent (Algebra.adjoin F s) x :=
142+
(Algebra.IsAlgebraic.algebraicIndependent_iff ..).symm
143+
144+
theorem isTranscendenceBasis_adjoin_iff {x : ι → S} :
145+
IsTranscendenceBasis (adjoin F s) x ↔ IsTranscendenceBasis (Algebra.adjoin F s) x :=
146+
(Algebra.IsAlgebraic.isTranscendenceBasis_iff ..).symm
147+
148+
end IntermediateField

Mathlib/RingTheory/Localization/FractionRing.lean

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,23 @@ namespace IsFractionRing
6666

6767
open IsLocalization
6868

69+
theorem of_field [Field K] [Algebra R K] [FaithfulSMul R K]
70+
(surj : ∀ z : K, ∃ x y, z = algebraMap R K x / algebraMap R K y) :
71+
IsFractionRing R K :=
72+
have inj := FaithfulSMul.algebraMap_injective R K
73+
have := inj.noZeroDivisors _ (map_zero _) (map_mul _)
74+
have := Module.nontrivial R K
75+
{ map_units' x :=
76+
.mk0 _ <| (map_ne_zero_iff _ inj).mpr <| mem_nonZeroDivisors_iff_ne_zero.mp x.2
77+
surj' z := by
78+
have ⟨x, y, eq⟩ := surj z
79+
obtain rfl | hy := eq_or_ne y 0
80+
· obtain rfl : z = 0 := by simpa using eq
81+
exact ⟨(0, 1), by simp⟩
82+
exact ⟨⟨x, y, mem_nonZeroDivisors_iff_ne_zero.mpr hy⟩,
83+
(eq_div_iff_mul_eq <| (map_ne_zero_iff _ inj).mpr hy).mp eq⟩
84+
exists_of_eq eq := ⟨1, by simpa using inj eq⟩ }
85+
6986
variable {R K}
7087

7188
section CommRing

0 commit comments

Comments
 (0)