Download data/lean/OAI/AlgebraicGeometry/SectionFields/TensorAlgebra.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 11.6 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/AlgebraicGeometry/SectionFields/TensorAlgebra.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/AlgebraicGeometry/SectionFields/TensorAlgebra.lean
-
curl -L -o TensorAlgebra.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/AlgebraicGeometry/SectionFields/TensorAlgebra.lean
11.6 kB
| import Mathlib | |
| namespace OAI | |
| /-! Tensor localizations, Galois invariants and normality of scalar extensions. -/ | |
| noncomputable section | |
| open AlgebraicGeometry CategoryTheory CategoryTheory.Limits TopologicalSpace Order Polynomial | |
| open scoped TensorProduct WithZero | |
| universe u | |
| namespace RelativeDenominators | |
| section | |
| theorem algebraMap_surjective_of_isAlgebraic_tensorSelf_domain | |
| (K A : Type*) [Field K] [Field A] [Algebra K A] | |
| [Algebra.IsAlgebraic K A] [IsDomain (A β[K] A)] : | |
| Function.Surjective (algebraMap K A) := by | |
| have hfield := Algebra.TensorProduct.isField_of_isAlgebraic K A A | |
| (Or.inl (inferInstance : Algebra.IsAlgebraic K A)) | |
| have hd := IntermediateField.LinearDisjoint.of_isField' hfield | |
| (AlgHom.id K A) (AlgHom.id K A) | |
| have he := hd.eq_bot_of_self | |
| intro x | |
| apply IntermediateField.mem_bot.mp | |
| rw [β he] | |
| exact β¨x, rflβ© | |
| variable (K A L M : Type*) [Field K] [CommRing A] [Field L] [Field M] | |
| [Algebra K A] [Algebra K L] [Algebra K M] [Algebra A M] [IsScalarTower K A M] | |
| @[instance_reducible] def tensorFractionAlgebra : Algebra (A β[K] L) (M β[K] L) := | |
| (Algebra.TensorProduct.map (IsScalarTower.toAlgHom K A M) (AlgHom.id K L)).toAlgebra | |
| lemma tensorFraction_isLocalization [IsFractionRing A M] : | |
| letI := tensorFractionAlgebra K A L M | |
| IsLocalization (Algebra.algebraMapSubmonoid (A β[K] L) (nonZeroDivisors A)) (M β[K] L) := by | |
| let := tensorFractionAlgebra K A L M | |
| let : IsScalarTower A (A β[K] L) (M β[K] L) := | |
| IsScalarTower.of_algebraMap_eq fun a => by | |
| change _ = Algebra.TensorProduct.map (IsScalarTower.toAlgHom K A M) (AlgHom.id K L) | |
| (a ββ[K] (1 : L)) | |
| simp | |
| apply IsLocalization.tensorProduct_tensorProduct K L (nonZeroDivisors A) M | |
| ext l | |
| simp [RingHom.algebraMap_toAlgebra] | |
| lemma tensorFraction_domain [IsDomain (A β[K] L)] [IsFractionRing A M] : | |
| IsDomain (M β[K] L) := by | |
| let := tensorFractionAlgebra K A L M | |
| have : Nontrivial A := (algebraMap A M).domain_nontrivial | |
| let := tensorFraction_isLocalization K A L M | |
| apply IsLocalization.isDomain_of_le_nonZeroDivisors (M β[K] L) | |
| (M := Algebra.algebraMapSubmonoid (A β[K] L) (nonZeroDivisors A)) | |
| rintro _ β¨a, ha, rflβ© | |
| rw [mem_nonZeroDivisors_iff_ne_zero] | |
| intro h | |
| apply nonZeroDivisors.ne_zero ha | |
| apply Algebra.TensorProduct.includeLeft_injective (R := K) (S := K) (A := A) (B := L) | |
| (RingHom.injective (algebraMap K L)) | |
| change a ββ[K] (1 : L) = (0 : A) ββ[K] (1 : L) | |
| change a ββ[K] (1 : L) = 0 at h | |
| simpa only [TensorProduct.zero_tmul] using h | |
| @[instance_reducible] noncomputable def tensorFractionField [IsDomain (A β[K] L)] | |
| [IsFractionRing A M] [Module.Finite K L] : Field (M β[K] L) := by | |
| letI := tensorFraction_domain K A L M | |
| exact fieldOfFiniteDimensional M (M β[K] L) | |
| lemma tensorFraction_isFractionRing [IsDomain (A β[K] L)] | |
| [IsFractionRing A M] [Module.Finite K L] : | |
| letI := tensorFractionAlgebra K A L M | |
| IsFractionRing (A β[K] L) (M β[K] L) := by | |
| let := tensorFractionAlgebra K A L M | |
| let := tensorFraction_isLocalization K A L M | |
| let := tensorFractionField K A L M | |
| have hinj : Function.Injective (algebraMap (A β[K] L) (M β[K] L)) := by | |
| apply IsLocalization.injective (M := Algebra.algebraMapSubmonoid (A β[K] L) | |
| (nonZeroDivisors A)) | |
| rintro _ β¨a, ha, rflβ© | |
| rw [mem_nonZeroDivisors_iff_ne_zero] | |
| intro h | |
| have hn : Nontrivial A := (algebraMap A M).domain_nontrivial | |
| apply nonZeroDivisors.ne_zero ha | |
| apply Algebra.TensorProduct.includeLeft_injective (R := K) (S := K) (A := A) (B := L) | |
| (RingHom.injective (algebraMap K L)) | |
| change a ββ[K] (1 : L) = (0 : A) ββ[K] (1 : L) | |
| change a ββ[K] (1 : L) = 0 at h | |
| simpa only [TensorProduct.zero_tmul] using h | |
| apply IsLocalization.of_le (Algebra.algebraMapSubmonoid (A β[K] L) | |
| (nonZeroDivisors A)) (nonZeroDivisors (A β[K] L)) | |
| Β· rintro _ β¨a, ha, rflβ© | |
| rw [mem_nonZeroDivisors_iff_ne_zero] | |
| intro h | |
| have hn : Nontrivial A := (algebraMap A M).domain_nontrivial | |
| apply nonZeroDivisors.ne_zero ha | |
| apply Algebra.TensorProduct.includeLeft_injective (R := K) (S := K) (A := A) (B := L) | |
| (RingHom.injective (algebraMap K L)) | |
| change a ββ[K] (1 : L) = (0 : A) ββ[K] (1 : L) | |
| change a ββ[K] (1 : L) = 0 at h | |
| simpa only [TensorProduct.zero_tmul] using h | |
| Β· intro r hr | |
| exact isUnit_iff_ne_zero.mpr (fun hz => nonZeroDivisors.ne_zero hr | |
| (hinj (hz.trans (map_zero _).symm))) | |
| end | |
| theorem tensor_invariant_descends | |
| (K L M : Type*) [Field K] [Field L] [Field M] | |
| [Algebra K L] [IsGalois K L] [Algebra K M] | |
| (x : L β[K] M) | |
| (hx : β Ο : Gal(L/K), | |
| Algebra.TensorProduct.map Ο.toAlgHom (AlgHom.id K M) x = x) : | |
| β m : M, (1 : L) ββ[K] m = x := by | |
| classical | |
| let b := Module.Free.chooseBasis K M | |
| let c := b.baseChange L | |
| have hrepr (Ο : Gal(L/K)) (y : L β[K] M) (i) : | |
| c.repr (Algebra.TensorProduct.map Ο.toAlgHom (AlgHom.id K M) y) i = | |
| Ο (c.repr y i) := by | |
| induction y using TensorProduct.inductionOn with | |
| | tmul l m => simp [c, Algebra.smul_def] | |
| | add y z hy hz => simp [hy, hz] | |
| have hcoeff (i) : β a : K, algebraMap K L a = c.repr x i := by | |
| apply Algebra.IsInvariant.isInvariant (G := Gal(L/K)) | |
| intro Ο | |
| change Ο (c.repr x i) = c.repr x i | |
| rw [β hrepr, hx] | |
| choose a ha using hcoeff | |
| refine β¨β i β (c.repr x).support, a i β’ b i, ?_β© | |
| apply c.repr.injective | |
| ext i | |
| simp only [c, Module.Basis.baseChange_repr_tmul, map_sum, map_smul, | |
| Finsupp.finsetSum_apply, Finsupp.smul_apply, Module.Basis.repr_self, | |
| Finsupp.single_apply, smul_eq_mul, mul_ite, mul_one, mul_zero] | |
| by_cases hi : i β (c.repr x).support | |
| Β· have hi' : ((b.baseChange L).repr x) i β 0 := Finsupp.mem_support_iff.mp hi | |
| simpa [hi', Algebra.smul_def, c] using ha i | |
| Β· have hxi : c.repr x i = 0 := Finsupp.notMem_support_iff.mp hi | |
| change ((b.baseChange L).repr x) i = 0 at hxi | |
| simp [hxi] | |
| @[instance_reducible] noncomputable def tensorGaloisAction | |
| (K L M : Type*) [Field K] [Field L] [Field M] | |
| [Algebra K L] [Algebra K M] : MulSemiringAction (Gal(L/K)) (L β[K] M) where | |
| smul Ο x := Algebra.TensorProduct.map Ο.toAlgHom (AlgHom.id K M) x | |
| smul_zero Ο := map_zero _ | |
| smul_add Ο := map_add _ | |
| smul_one Ο := map_one _ | |
| smul_mul Ο := map_mul _ | |
| one_smul x := by | |
| change Algebra.TensorProduct.map (1 : Gal(L/K)).toAlgHom (AlgHom.id K M) x = x | |
| induction x using TensorProduct.inductionOn with | |
| | tmul l m => simp | |
| | add x y hx hy => simp [hx, hy] | |
| mul_smul Ο Ο x := by | |
| change Algebra.TensorProduct.map (Ο * Ο).toAlgHom (AlgHom.id K M) x = | |
| Algebra.TensorProduct.map Ο.toAlgHom (AlgHom.id K M) | |
| (Algebra.TensorProduct.map Ο.toAlgHom (AlgHom.id K M) x) | |
| induction x using TensorProduct.inductionOn with | |
| | tmul l m => simp | |
| | add x y hx hy => simp [hx, hy] | |
| theorem tensor_invariant_unit_descends | |
| (K L M : Type*) [Field K] [Field L] [Field M] | |
| [Algebra K L] [IsGalois K L] [Algebra K M] | |
| (x : (L β[K] M)Λ£) | |
| (hx : β Ο : Gal(L/K), | |
| Algebra.TensorProduct.map Ο.toAlgHom (AlgHom.id K M) (x : L β[K] M) = x) : | |
| β m : MΛ£, Units.map Algebra.TensorProduct.includeRight.toMonoidHom m = x := by | |
| obtain β¨m, hmβ© := tensor_invariant_descends K L M (x : L β[K] M) hx | |
| have hm0 : m β 0 := by | |
| intro hz | |
| simp only [hz, TensorProduct.tmul_zero] at hm | |
| exact (Units.ne_zero x) hm.symm | |
| exact β¨Units.mk0 m hm0, Units.ext hmβ© | |
| open scoped TensorProduct | |
| lemma tensor_galois_coefficient | |
| (K L M : Type*) [Field K] [Field L] [CommRing M] | |
| [Algebra K L] [Algebra K M] [IsGalois K L] [Module.Finite K L] | |
| {ΞΉ : Type*} [Fintype ΞΉ] [DecidableEq ΞΉ] (b : Module.Basis ΞΉ K L) | |
| (i : ΞΉ) (x : M β[K] L) : | |
| (b.baseChange M).repr x i ββ[K] (1 : L) = | |
| β Ο : Gal(L/K), Algebra.TensorProduct.map (AlgHom.id K M) Ο.toAlgHom | |
| ((1 : M) ββ[K] b.traceDual i * x) := by | |
| classical | |
| have hb (l : L) : b.repr l i = Algebra.trace K L (l * b.traceDual i) := by | |
| simpa only [Module.Basis.traceDual_traceDual, Algebra.traceForm_apply] using | |
| (b.traceDual.traceDual_repr_apply l i) | |
| induction x using TensorProduct.inductionOn with | |
| | tmul m l => | |
| simp only [Module.Basis.baseChange_repr_tmul, Algebra.TensorProduct.tmul_mul_tmul, | |
| one_mul, Algebra.TensorProduct.map_tmul, AlgHom.id_apply, AlgEquiv.coe_toAlgHom] | |
| rw [β TensorProduct.tmul_sum, β trace_eq_sum_automorphisms, | |
| mul_comm (b.traceDual i), β hb] | |
| rw [TensorProduct.smul_tmul, Algebra.smul_def, mul_one] | |
| | add x y hx hy => | |
| simp only [map_add, Finsupp.add_apply, TensorProduct.add_tmul, mul_add, Finset.sum_add_distrib, | |
| hx, hy] | |
| noncomputable def tensorRightGaloisAlgHom | |
| (K A L M : Type*) [Field K] [CommRing A] [Field L] [CommRing M] | |
| [Algebra K A] [Algebra K L] [Algebra K M] [Algebra A M] [IsScalarTower K A M] | |
| (Ο : Gal(L/K)) : (M β[K] L) ββ[A] (M β[K] L) where | |
| __ := (Algebra.TensorProduct.map (AlgHom.id K M) Ο.toAlgHom).toRingHom | |
| commutes' a := by | |
| change Algebra.TensorProduct.map (AlgHom.id K M) Ο.toAlgHom | |
| (algebraMap A M a ββ[K] (1 : L)) = algebraMap A M a ββ[K] (1 : L) | |
| simp | |
| lemma tensorFraction_isScalarTower | |
| (K A L M : Type*) [Field K] [CommRing A] [Field L] [Field M] | |
| [Algebra K A] [Algebra K L] [Algebra K M] [Algebra A M] [IsScalarTower K A M] : | |
| letI := tensorFractionAlgebra K A L M | |
| IsScalarTower A (A β[K] L) (M β[K] L) := by | |
| let := tensorFractionAlgebra K A L M | |
| apply IsScalarTower.of_algebraMap_eq | |
| intro a | |
| change _ = Algebra.TensorProduct.map (IsScalarTower.toAlgHom K A M) (AlgHom.id K L) | |
| (a ββ[K] (1 : L)) | |
| simp | |
| theorem tensor_isIntegrallyClosed_of_galois | |
| (K A L M : Type*) [Field K] [CommRing A] [IsDomain A] [Field L] [Field M] | |
| [Algebra K A] [Algebra K L] [Algebra K M] [Algebra A M] [IsScalarTower K A M] | |
| [IsFractionRing A M] [IsIntegrallyClosed A] [IsGalois K L] [Module.Finite K L] | |
| [IsDomain (A β[K] L)] : IsIntegrallyClosed (A β[K] L) := by | |
| classical | |
| let := tensorFractionAlgebra K A L M | |
| let := tensorFraction_isScalarTower K A L M | |
| let := tensorFraction_isFractionRing K A L M | |
| let := tensorFractionField K A L M | |
| apply (isIntegrallyClosed_iff (M β[K] L)).mpr | |
| intro x hx | |
| have hxA : IsIntegral A x := isIntegral_trans x hx | |
| let b := Module.finBasis K L | |
| have hint (l : L) : IsIntegral A ((1 : M) ββ[K] l) := by | |
| have h := (Algebra.IsIntegral.isIntegral l : IsIntegral K l).map | |
| (Algebra.TensorProduct.includeRight : L ββ[K] M β[K] L) | |
| exact h.tower_top | |
| have hcoeff (i) : β a : A, algebraMap A M a = (b.baseChange M).repr x i := by | |
| apply IsIntegrallyClosed.isIntegral_iff.mp | |
| apply (isIntegral_algebraMap_iff (B := M β[K] L)).mp | |
| change IsIntegral A ((b.baseChange M).repr x i ββ[K] (1 : L)) | |
| rw [tensor_galois_coefficient K L M b i x] | |
| exact IsIntegral.sum _ fun Ο _ => (hint (b.traceDual i) |>.mul hxA).map | |
| (tensorRightGaloisAlgHom K A L M Ο) | |
| choose a ha using hcoeff | |
| refine β¨β i, a i ββ[K] b i, ?_β© | |
| rw [map_sum, β (b.baseChange M).sum_repr x] | |
| apply Finset.sum_congr rfl | |
| intro i _ | |
| change Algebra.TensorProduct.map (IsScalarTower.toAlgHom K A M) (AlgHom.id K L) | |
| (a i ββ[K] b i) = _ | |
| simp only [Algebra.TensorProduct.map_tmul, IsScalarTower.toAlgHom_apply, | |
| AlgHom.id_apply, ha, Module.Basis.baseChange_apply, TensorProduct.smul_tmul', smul_eq_mul, | |
| mul_one] | |
| end RelativeDenominators | |
| end | |
| end OAI | |