Skip to content

Commit 47beff8

Browse files
committed
feat(FieldTheory): new Adjoin lemmas and finish up #17543 (#18430)
Co-authored-by: Junyan Xu <junyanxumath@gmail.com>
1 parent ccc281f commit 47beff8

File tree

2 files changed

+80
-16
lines changed

2 files changed

+80
-16
lines changed

Mathlib/Algebra/Field/Subfield.lean

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -616,14 +616,22 @@ theorem closure_eq_of_le {s : Set K} {t : Subfield K} (h₁ : s ⊆ t) (h₂ : t
616616
of `s`, and is preserved under addition, negation, and multiplication, then `p` holds for all
617617
elements of the closure of `s`. -/
618618
@[elab_as_elim]
619-
theorem closure_induction {s : Set K} {p : K → Prop} {x} (h : x ∈ closure s) (mem : ∀ x ∈ s, p x)
620-
(one : p 1) (add : ∀ x y, p x → p y → p (x + y)) (neg : ∀ x, p x → p (-x))
621-
(inv : ∀ x, p x → p x⁻¹) (mul : ∀ x y, p x → p y → p (x * y)) : p x := by
619+
theorem closure_induction {s : Set K} {p : ∀ x ∈ closure s, Prop}
620+
(mem : ∀ x hx, p x (subset_closure hx))
621+
(one : p 1 (one_mem _)) (add : ∀ x y hx hy, p x hx → p y hy → p (x + y) (add_mem hx hy))
622+
(neg : ∀ x hx, p x hx → p (-x) (neg_mem hx)) (inv : ∀ x hx, p x hx → p x⁻¹ (inv_mem hx))
623+
(mul : ∀ x y hx hy, p x hx → p y hy → p (x * y) (mul_mem hx hy))
624+
{x} (h : x ∈ closure s) : p x h :=
622625
letI : Subfield K :=
623-
⟨⟨⟨⟨⟨p, by intro _ _; exact mul _ _⟩, one⟩,
624-
by intro _ _; exact add _ _, @add_neg_cancel K _ 1 ▸ add _ _ one (neg _ one)⟩,
625-
by intro _; exact neg _⟩, inv⟩
626-
exact (closure_le (t := this)).2 mem h
626+
{ carrier := {x | ∃ hx, p x hx}
627+
mul_mem' := by rintro _ _ ⟨_, hx⟩ ⟨_, hy⟩; exact ⟨_, mul _ _ _ _ hx hy⟩
628+
one_mem' := ⟨_, one⟩
629+
add_mem' := by rintro _ _ ⟨_, hx⟩ ⟨_, hy⟩; exact ⟨_, add _ _ _ _ hx hy⟩
630+
zero_mem' := ⟨zero_mem _, by
631+
simp_rw [← @add_neg_cancel K _ 1]; exact add _ _ _ _ one (neg _ _ one)⟩
632+
neg_mem' := by rintro _ ⟨_, hx⟩; exact ⟨_, neg _ _ hx⟩
633+
inv_mem' := by rintro _ ⟨_, hx⟩; exact ⟨_, inv _ _ hx⟩ }
634+
((closure_le (t := this)).2 (fun x hx ↦ ⟨_, mem x hx⟩) h).2
627635

628636
variable (K)
629637

Mathlib/FieldTheory/Adjoin.lean

Lines changed: 65 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,20 @@ theorem extendScalars_adjoin {K : IntermediateField F E} {S : Set E} (h : K ≤
485485
exact le_antisymm (adjoin.mono F S _ Set.subset_union_right) <| adjoin_le_iff.2 <|
486486
Set.union_subset h (subset_adjoin F S)
487487

488+
theorem adjoin_union {S T : Set E} : adjoin F (S ∪ T) = adjoin F S ⊔ adjoin F T :=
489+
gc.l_sup
490+
491+
theorem restrictScalars_adjoin_eq_sup (K : IntermediateField F E) (S : Set E) :
492+
restrictScalars F (adjoin K S) = K ⊔ adjoin F S := by
493+
rw [restrictScalars_adjoin, adjoin_union, adjoin_self]
494+
495+
theorem adjoin_iUnion {ι} (f : ι → Set E) : adjoin F (⋃ i, f i) = ⨆ i, adjoin F (f i) :=
496+
gc.l_iSup
497+
498+
theorem iSup_eq_adjoin {ι} (f : ι → IntermediateField F E) :
499+
⨆ i, f i = adjoin F (⋃ i, f i : Set E) := by
500+
simp_rw [adjoin_iUnion, adjoin_self]
501+
488502
variable {F} in
489503
/-- If `E / L / F` and `E / L' / F` are two field extension towers, `L ≃ₐ[F] L'` is an isomorphism
490504
compatible with `E / L` and `E / L'`, then for any subset `S` of `E`, `L(S)` and `L'(S)` are
@@ -527,13 +541,39 @@ theorem adjoin_eq_top_of_algebra (hS : Algebra.adjoin F S = ⊤) : adjoin F S =
527541
top_le_iff.mp (hS.symm.trans_le <| algebra_adjoin_le_adjoin F S)
528542

529543
@[elab_as_elim]
530-
theorem adjoin_induction {s : Set E} {p : E → Prop} {x} (h : x ∈ adjoin F s) (mem : ∀ x ∈ s, p x)
531-
(algebraMap : ∀ x, p (algebraMap F E x)) (add : ∀ x y, p x → p y → p (x + y))
532-
(neg : ∀ x, p x → p (-x)) (inv : ∀ x, p x → p x⁻¹) (mul : ∀ x y, p x → p y → p (x * y)) :
533-
p x :=
534-
Subfield.closure_induction h
535-
(fun x hx => Or.casesOn hx (fun ⟨x, hx⟩ => hx ▸ algebraMap x) (mem x))
536-
((_root_.algebraMap F E).map_one ▸ algebraMap 1) add neg inv mul
544+
theorem adjoin_induction {s : Set E} {p : ∀ x ∈ adjoin F s, Prop}
545+
(mem : ∀ x hx, p x (subset_adjoin _ _ hx))
546+
(algebraMap : ∀ x, p (algebraMap F E x) (algebraMap_mem _ _))
547+
(add : ∀ x y hx hy, p x hx → p y hy → p (x + y) (add_mem hx hy))
548+
(inv : ∀ x hx, p x hx → p x⁻¹ (inv_mem hx))
549+
(mul : ∀ x y hx hy, p x hx → p y hy → p (x * y) (mul_mem hx hy))
550+
{x} (h : x ∈ adjoin F s) : p x h :=
551+
Subfield.closure_induction
552+
(fun x hx ↦ Or.casesOn hx (fun ⟨x, hx⟩ ↦ hx ▸ algebraMap x) (mem x))
553+
(by simp_rw [← (_root_.algebraMap F E).map_one]; exact algebraMap 1) add
554+
(fun x _ h ↦ by
555+
simp_rw [← neg_one_smul F x, Algebra.smul_def]; exact mul _ _ _ _ (algebraMap _) h) inv mul h
556+
557+
section
558+
559+
variable {K : Type*} [Semiring K] [Algebra F K]
560+
561+
theorem adjoin_algHom_ext {s : Set E} ⦃φ₁ φ₂ : adjoin F s →ₐ[F] K⦄
562+
(h : ∀ x hx, φ₁ ⟨x, subset_adjoin _ _ hx⟩ = φ₂ ⟨x, subset_adjoin _ _ hx⟩) :
563+
φ₁ = φ₂ :=
564+
AlgHom.ext fun ⟨x, hx⟩ ↦ adjoin_induction _ h (fun _ ↦ φ₂.commutes _ ▸ φ₁.commutes _)
565+
(fun _ _ _ _ h₁ h₂ ↦ by convert congr_arg₂ (· + ·) h₁ h₂ <;> rw [← map_add] <;> rfl)
566+
(fun _ _ ↦ eq_on_inv₀ _ _)
567+
(fun _ _ _ _ h₁ h₂ ↦ by convert congr_arg₂ (· * ·) h₁ h₂ <;> rw [← map_mul] <;> rfl)
568+
hx
569+
570+
theorem algHom_ext_of_eq_adjoin {S : IntermediateField F E} {s : Set E} (hS : S = adjoin F s)
571+
⦃φ₁ φ₂ : S →ₐ[F] K⦄
572+
(h : ∀ x hx, φ₁ ⟨x, hS.ge (subset_adjoin _ _ hx)⟩ = φ₂ ⟨x, hS.ge (subset_adjoin _ _ hx)⟩) :
573+
φ₁ = φ₂ := by
574+
subst hS; exact adjoin_algHom_ext F h
575+
576+
end
537577

538578
/- Porting note (kmill): this notation is replacing the typeclass-based one I had previously
539579
written, and it gives true `{x₁, x₂, ..., xₙ}` sets in the `adjoin` term. -/
@@ -1290,16 +1330,32 @@ theorem fg_adjoin_finset (t : Finset E) : (adjoin F (↑t : Set E)).FG :=
12901330
theorem fg_def {S : IntermediateField F E} : S.FG ↔ ∃ t : Set E, Set.Finite t ∧ adjoin F t = S :=
12911331
Iff.symm Set.exists_finite_iff_finset
12921332

1333+
theorem fg_adjoin_of_finite {t : Set E} (h : Set.Finite t) : (adjoin F t).FG :=
1334+
fg_def.mpr ⟨t, h, rfl⟩
1335+
12931336
theorem fg_bot : (⊥ : IntermediateField F E).FG :=
12941337
-- Porting note: was `⟨∅, adjoin_empty F E⟩`
12951338
⟨∅, by simp only [Finset.coe_empty, adjoin_empty]⟩
12961339

1297-
theorem fG_of_fG_toSubalgebra (S : IntermediateField F E) (h : S.toSubalgebra.FG) : S.FG := by
1340+
theorem fg_sup {S T : IntermediateField F E} (hS : S.FG) (hT : T.FG) : (S ⊔ T).FG := by
1341+
obtain ⟨s, rfl⟩ := hS; obtain ⟨t, rfl⟩ := hT
1342+
classical rw [← adjoin_union, ← Finset.coe_union]
1343+
exact fg_adjoin_finset _
1344+
1345+
theorem fg_iSup {ι : Sort*} [Finite ι] {S : ι → IntermediateField F E} (h : ∀ i, (S i).FG) :
1346+
(⨆ i, S i).FG := by
1347+
choose s hs using h
1348+
simp_rw [← hs, ← adjoin_iUnion]
1349+
exact fg_adjoin_of_finite (Set.finite_iUnion fun _ ↦ Finset.finite_toSet _)
1350+
1351+
theorem fg_of_fg_toSubalgebra (S : IntermediateField F E) (h : S.toSubalgebra.FG) : S.FG := by
12981352
cases' h with t ht
12991353
exact ⟨t, (eq_adjoin_of_eq_algebra_adjoin _ _ _ ht.symm).symm⟩
13001354

1355+
@[deprecated (since := "2024-10-28")] alias fG_of_fG_toSubalgebra := fg_of_fg_toSubalgebra
1356+
13011357
theorem fg_of_noetherian (S : IntermediateField F E) [IsNoetherian F E] : S.FG :=
1302-
S.fG_of_fG_toSubalgebra S.toSubalgebra.fg_of_noetherian
1358+
S.fg_of_fg_toSubalgebra S.toSubalgebra.fg_of_noetherian
13031359

13041360
theorem induction_on_adjoin_finset (S : Finset E) (P : IntermediateField F E → Prop) (base : P ⊥)
13051361
(ih : ∀ (K : IntermediateField F E), ∀ x ∈ S, P K → P (K⟮x⟯.restrictScalars F)) :

0 commit comments

Comments
 (0)