cfahlgren1's picture
download
raw
5.3 kB
import Mathlib.Basic.Real.Basic
import Mathlib.Algebra.Algebra.Rat
import Mathlib.Algebra.TrivSqZeroExt.Basic
import Mathlib.RingTheory.AlgebraicIndependent.Adjoin
import Mathlib.RingTheory.Derivation.Basic
import Mathlib.RingTheory.Localization.Basic
namespace OAI
noncomputable section
namespace GrahamSpherical
private abbrev Poly (ι : Type*) := MvPolynomial ι ℚ
private abbrev RatFun (ι : Type*) := FractionRing (Poly ι)
private def tangentCoefficient {ι : Type*} :
ℚ →+* TrivSqZeroExt (RatFun ι) (RatFun ι) :=
(TrivSqZeroExt.inlHom _ _).comp (algebraMap ℚ (RatFun ι))
private def tangentVariable {ι : Type*} (i j : ι) :
TrivSqZeroExt (RatFun ι) (RatFun ι) := by
classical
exact (algebraMap (Poly ι) (RatFun ι) (MvPolynomial.X j),
if j = i then 1 else 0)
private def polynomialTangent {ι : Type*} (i : ι) :
Poly ι →+* TrivSqZeroExt (RatFun ι) (RatFun ι) :=
MvPolynomial.eval₂Hom tangentCoefficient (tangentVariable i)
private theorem polynomialTangent_X {ι : Type*} (i j : ι) :
polynomialTangent i (MvPolynomial.X j) = tangentVariable i j :=
MvPolynomial.eval₂Hom_X' tangentCoefficient (tangentVariable i) j
private theorem polynomialTangent_fst {ι : Type*} (i : ι) (p : Poly ι) :
(polynomialTangent i p).fst = algebraMap (Poly ι) (RatFun ι) p := by
classical
have h : (TrivSqZeroExt.fstHom (RatFun ι) (RatFun ι) (RatFun ι)).toRingHom.comp
(polynomialTangent i) = algebraMap (Poly ι) (RatFun ι) := by
ext j
· simp [polynomialTangent, tangentCoefficient, IsScalarTower.algebraMap_eq ℚ (Poly ι) (RatFun ι)]
· exact congrArg TrivSqZeroExt.fst (polynomialTangent_X i j)
exact RingHom.congr_fun h p
private theorem polynomialTangent_units {ι : Type*} (i : ι)
(y : nonZeroDivisors (Poly ι)) : IsUnit (polynomialTangent i y) := by
rw [TrivSqZeroExt.isUnit_iff_isUnit_fst, polynomialTangent_fst]
exact IsFractionRing.isUnit_map_of_injective (IsFractionRing.injective (Poly ι) (RatFun ι)) y
private def fractionTangent {ι : Type*} (i : ι) :
RatFun ι →+* TrivSqZeroExt (RatFun ι) (RatFun ι) :=
IsLocalization.lift (polynomialTangent_units i)
private theorem fractionTangent_fst {ι : Type*} (i : ι) (x : RatFun ι) :
(fractionTangent i x).fst = x := by
have h : (TrivSqZeroExt.fstHom (RatFun ι) (RatFun ι) (RatFun ι)).toRingHom.comp
(fractionTangent i) = RingHom.id (RatFun ι) := by
apply IsLocalization.ringHom_ext (nonZeroDivisors (Poly ι))
apply RingHom.ext
intro p
change (fractionTangent i (algebraMap (Poly ι) (RatFun ι) p)).fst =
algebraMap (Poly ι) (RatFun ι) p
rw [fractionTangent, IsLocalization.lift_eq, polynomialTangent_fst]
exact RingHom.congr_fun h x
private def fractionDerivation {ι : Type*} (i : ι) :
Derivation ℤ (RatFun ι) (RatFun ι) where
toFun x := (fractionTangent i x).snd
map_add' x y := congrArg TrivSqZeroExt.snd (map_add (fractionTangent i) x y)
map_smul' n x := by
simp only [RingHom.id_apply, OreLocalization.zsmul_eq_zsmul]
exact congrArg TrivSqZeroExt.snd (map_zsmul (fractionTangent i) n x)
map_one_eq_zero' := congrArg TrivSqZeroExt.snd (map_one (fractionTangent i))
leibniz' x y := by
change (fractionTangent i (x * y)).snd =
x * (fractionTangent i y).snd + y * (fractionTangent i x).snd
rw [map_mul, TrivSqZeroExt.snd_mul, fractionTangent_fst, fractionTangent_fst]
change x * (fractionTangent i y).snd + (fractionTangent i x).snd * y =
x * (fractionTangent i y).snd + y * (fractionTangent i x).snd
rw [mul_comm (fractionTangent i x).snd y]
private theorem fractionDerivation_X {ι : Type*} (i : ι) :
fractionDerivation i (algebraMap (Poly ι) (RatFun ι) (MvPolynomial.X i)) = 1 := by
classical
change (fractionTangent i (algebraMap (Poly ι) (RatFun ι) (MvPolynomial.X i))).snd = 1
rw [fractionTangent, IsLocalization.lift_eq]
have h := congrArg TrivSqZeroExt.snd (polynomialTangent_X i i)
simpa [tangentVariable] using h
/-- A selected algebraically independent coordinate admits a unit-valued derivation
on the field generated by all coordinates. -/
theorem exists_derivation_adjoin_coordinate {ι : Type*} (b : ι → ℝ)
(hb : AlgebraicIndependent ℚ b) (i : ι) :
∃ D : Derivation ℤ (IntermediateField.adjoin ℚ (Set.range b))
(IntermediateField.adjoin ℚ (Set.range b)),
D ⟨b i, IntermediateField.subset_adjoin ℚ (Set.range b) ⟨i, rfl⟩⟩ = 1 := by
let e := hb.aevalEquivField
let D : Derivation ℤ (IntermediateField.adjoin ℚ (Set.range b))
(IntermediateField.adjoin ℚ (Set.range b)) :=
{ toFun := fun x => e (fractionDerivation i (e.symm x))
map_add' := fun x y => by simp
map_smul' := fun n x => by simp
map_one_eq_zero' := by simp
leibniz' := fun x y => by simp [Derivation.leibniz, smul_eq_mul] }
refine ⟨D, ?_⟩
have hx : e (algebraMap (Poly ι) (RatFun ι) (MvPolynomial.X i)) =
⟨b i, IntermediateField.subset_adjoin ℚ (Set.range b) ⟨i, rfl⟩⟩ := by
apply Subtype.ext
simp [e, hb.aevalEquivField_algebraMap_apply_coe]
rw [← hx]
change e (fractionDerivation i (e.symm (e _))) = 1
rw [e.symm_apply_apply, fractionDerivation_X, map_one]
end GrahamSpherical
end
end OAI

Xet Storage Details

Size:
5.3 kB
·
Xet hash:
12a699260b16c0b4a0eb3e38852cda669059af462ae85dfe4058cc4ce6984485

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.