Skip to content

Commit ef29c80

Browse files
committed
feat(RingTheory/AlgebraicIndependent): add some results on AlgebraicIndependent (#18378)
- `algebraicIndependent_unique_type_iff`, `algebraicIndependent_iff_transcendental`: equivalency of `AlgebraicIndependent` and `Transcendental` for one-element family - `AlgebraicIndependent.transcendental`: f a family `x` is algebraically independent, then any of its element is transcendental - `MvPolynomial.(algebraicIndependent|transcendental)_X`: algebraic independent properties of intermediates of `MvPolynomial` - `algebraicIndependent_of_finite'`: variant of `algebraicIndependent_of_finite` using `Transcendental` - `exists_isTranscendenceBasis'`: `Type` version of `exists_isTranscendenceBasis` Also changed one `¬IsAlgebraic` to `Transcendental`. Also add `Set.subtypeInsertEquivOption` (used in the proof of `algebraicIndependent_of_finite'`) which is similar to `Finset.subtypeInsertEquivOption`. Note that it does not have simp lemmas yet, as the existing `Finset` one has no simp lemmas, either.
1 parent 801cc3e commit ef29c80

File tree

2 files changed

+80
-3
lines changed

2 files changed

+80
-3
lines changed

Mathlib/Data/Set/Basic.lean

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -986,6 +986,24 @@ theorem forall_mem_insert {P : α → Prop} {a : α} {s : Set α} :
986986
forall₂_or_left.trans <| and_congr_left' forall_eq
987987
@[deprecated (since := "2024-03-23")] alias ball_insert_iff := forall_mem_insert
988988

989+
/-- Inserting an element to a set is equivalent to the option type. -/
990+
def subtypeInsertEquivOption
991+
[DecidableEq α] {t : Set α} {x : α} (h : x ∉ t) :
992+
{ i // i ∈ insert x t } ≃ Option { i // i ∈ t } where
993+
toFun y := if h : ↑y = x then none else some ⟨y, (mem_insert_iff.mp y.2).resolve_left h⟩
994+
invFun y := (y.elim ⟨x, mem_insert _ _⟩) fun z => ⟨z, mem_insert_of_mem _ z.2
995+
left_inv y := by
996+
by_cases h : ↑y = x
997+
· simp only [Subtype.ext_iff, h, Option.elim, dif_pos, Subtype.coe_mk]
998+
· simp only [h, Option.elim, dif_neg, not_false_iff, Subtype.coe_eta, Subtype.coe_mk]
999+
right_inv := by
1000+
rintro (_ | y)
1001+
· simp only [Option.elim, dif_pos]
1002+
· have : ↑y ≠ x := by
1003+
rintro ⟨⟩
1004+
exact h y.2
1005+
simp only [this, Option.elim, Subtype.eta, dif_neg, not_false_iff, Subtype.coe_mk]
1006+
9891007
/-! ### Lemmas about singletons -/
9901008

9911009
/- porting note: instance was in core in Lean3 -/

Mathlib/RingTheory/AlgebraicIndependent.lean

Lines changed: 62 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import Mathlib.LinearAlgebra.LinearIndependent
99
import Mathlib.RingTheory.Adjoin.Basic
1010
import Mathlib.RingTheory.Algebraic
1111
import Mathlib.RingTheory.MvPolynomial.Basic
12+
import Mathlib.Data.Fin.Tuple.Reflection
1213

1314
/-!
1415
# Algebraic Independence
@@ -82,6 +83,24 @@ theorem algebraicIndependent_empty_type_iff [IsEmpty ι] :
8283
AlgebraicIndependent R x ↔ Injective (algebraMap R A) := by
8384
rw [algebraicIndependent_iff_injective_aeval, MvPolynomial.aeval_injective_iff_of_isEmpty]
8485

86+
/-- A one-element family `x` is algebraically independent if and only if
87+
its element is transcendental. -/
88+
@[simp]
89+
theorem algebraicIndependent_unique_type_iff [Unique ι] :
90+
AlgebraicIndependent R x ↔ Transcendental R (x default) := by
91+
rw [transcendental_iff_injective, algebraicIndependent_iff_injective_aeval]
92+
let i := (renameEquiv R (Equiv.equivPUnit.{_, 1} ι)).trans (pUnitAlgEquiv R)
93+
have key : aeval (R := R) x = (Polynomial.aeval (R := R) (x default)).comp i := by
94+
ext y
95+
simp [i, Subsingleton.elim y default]
96+
simp [key]
97+
98+
/-- The one-element family `![x]` is algebraically independent if and only if
99+
`x` is transcendental. -/
100+
theorem algebraicIndependent_iff_transcendental {x : A} :
101+
AlgebraicIndependent R ![x] ↔ Transcendental R x := by
102+
simp
103+
85104
namespace AlgebraicIndependent
86105

87106
theorem of_comp (f : A →ₐ[R] A') (hfv : AlgebraicIndependent R (f ∘ x)) :
@@ -138,8 +157,28 @@ theorem map {f : A →ₐ[R] A'} (hf_inj : Set.InjOn f (adjoin R (range x))) :
138157
theorem map' {f : A →ₐ[R] A'} (hf_inj : Injective f) : AlgebraicIndependent R (f ∘ x) :=
139158
hx.map hf_inj.injOn
140159

160+
/-- If a family `x` is algebraically independent, then any of its element is transcendental. -/
161+
theorem transcendental (i : ι) : Transcendental R (x i) := by
162+
have := hx.comp ![i] (Function.injective_of_subsingleton _)
163+
have : AlgebraicIndependent R ![x i] := by rwa [← FinVec.map_eq] at this
164+
rwa [← algebraicIndependent_iff_transcendental]
165+
141166
end AlgebraicIndependent
142167

168+
namespace MvPolynomial
169+
170+
variable (σ R : Type*) [CommRing R]
171+
172+
theorem algebraicIndependent_X : AlgebraicIndependent R (X (R := R) (σ := σ)) := by
173+
rw [AlgebraicIndependent, aeval_X_left]
174+
exact injective_id
175+
176+
variable {σ} in
177+
theorem transcendental_X (i : σ) : Transcendental R (X (R := R) i) :=
178+
(algebraicIndependent_X σ R).transcendental i
179+
180+
end MvPolynomial
181+
143182
open AlgebraicIndependent
144183

145184
theorem AlgHom.algebraicIndependent_iff (f : A →ₐ[R] A') (hf : Injective f) :
@@ -409,13 +448,26 @@ theorem AlgebraicIndependent.aeval_comp_mvPolynomialOptionEquivPolynomialAdjoin
409448

410449
theorem AlgebraicIndependent.option_iff (hx : AlgebraicIndependent R x) (a : A) :
411450
(AlgebraicIndependent R fun o : Option ι => o.elim a x) ↔
412-
¬IsAlgebraic (adjoin R (Set.range x)) a := by
413-
rw [algebraicIndependent_iff_injective_aeval, isAlgebraic_iff_not_injective, Classical.not_not, ←
414-
AlgHom.coe_toRingHom, ← hx.aeval_comp_mvPolynomialOptionEquivPolynomialAdjoin,
451+
Transcendental (adjoin R (Set.range x)) a := by
452+
rw [algebraicIndependent_iff_injective_aeval, transcendental_iff_injective,
453+
AlgHom.coe_toRingHom, ← hx.aeval_comp_mvPolynomialOptionEquivPolynomialAdjoin,
415454
RingHom.coe_comp]
416455
exact Injective.of_comp_iff' (Polynomial.aeval a)
417456
(mvPolynomialOptionEquivPolynomialAdjoin hx).bijective
418457

458+
/-- Variant of `algebraicIndependent_of_finite` using `Transcendental`. -/
459+
theorem algebraicIndependent_of_finite' (s : Set A)
460+
(hinj : Injective (algebraMap R A))
461+
(H : ∀ t ⊆ s, t.Finite → ∀ a ∈ s, a ∉ t → Transcendental (adjoin R t) a) :
462+
AlgebraicIndependent R ((↑) : s → A) := by
463+
classical
464+
refine algebraicIndependent_of_finite s fun t hts hfin ↦ hfin.induction_on'
465+
((algebraicIndependent_empty_iff R A).2 hinj) fun {a} {u} ha hu ha' h ↦ ?_
466+
convert ((Subtype.range_coe ▸ h.option_iff a).2 <| H u (hu.trans hts) (hfin.subset hu)
467+
a (hts ha) ha').comp _ (Set.subtypeInsertEquivOption ha').injective
468+
ext x
469+
by_cases h : ↑x = a <;> simp [h, Set.subtypeInsertEquivOption]
470+
419471
variable (R)
420472

421473
/-- A family is a transcendence basis if it is a maximal algebraically independent subset. -/
@@ -432,6 +484,13 @@ theorem exists_isTranscendenceBasis (h : Injective (algebraMap R A)) :
432484
simp only [Subtype.range_coe_subtype, setOf_mem_eq] at *
433485
exact hs.2.eq_of_le ⟨ht, subset_univ _⟩ hst
434486

487+
/-- `Type` version of `exists_isTranscendenceBasis`. -/
488+
theorem exists_isTranscendenceBasis' (R : Type u) {A : Type v} [CommRing R] [CommRing A]
489+
[Algebra R A] (h : Injective (algebraMap R A)) :
490+
∃ (ι : Type v) (x : ι → A), IsTranscendenceBasis R x := by
491+
obtain ⟨s, h⟩ := exists_isTranscendenceBasis R h
492+
exact ⟨s, Subtype.val, h⟩
493+
435494
variable {R}
436495

437496
theorem AlgebraicIndependent.isTranscendenceBasis_iff {ι : Type w} {R : Type u} [CommRing R]

0 commit comments

Comments
 (0)