cfahlgren1's picture
download
raw
5.28 kB
import Mathlib.NumberTheory.NumberField.Basic
import Mathlib.RingTheory.Localization.Integer
import Mathlib.RingTheory.Localization.Away.Basic
import Mathlib.RingTheory.Extension.Presentation.Core
/-! # Algebra -/
namespace OAI.ArithmeticGeometry.Models.Algebra.Constructions.Foundations
/-! Algebraic foundations for Foundations. This file imports no graph statements. -/
open scoped _root_.NumberField nonZeroDivisors TensorProduct
universe u v
variable (K : Type u) [Field K] [NumberField K]
/-- A nonzero natural denominator defines the canonical map into the number field. -/
noncomputable def integersAwayToField (N : โ„•) (hN : N โ‰  0) :
Localization.Away (N : ๐“ž K) โ†’+* K :=
IsLocalization.Away.lift (N : ๐“ž K)
(show IsUnit (algebraMap (๐“ž K) K (N : ๐“ž K)) from
by simpa using (isUnit_iff_ne_zero.mpr (Nat.cast_ne_zero.mpr hN) : IsUnit (N : K)))
@[simp]
theorem integersAwayToField_algebraMap (N : โ„•) (hN : N โ‰  0) (a : ๐“ž K) :
integersAwayToField K N hN (algebraMap (๐“ž K) (Localization.Away (N : ๐“ž K)) a) =
algebraMap (๐“ž K) K a :=
IsLocalization.Away.lift_eq _ _ _
theorem integersAwayToField_comp (N : โ„•) (hN : N โ‰  0) :
(integersAwayToField K N hN).comp
(algebraMap (๐“ž K) (Localization.Away (N : ๐“ž K))) =
algebraMap (๐“ž K) K := by
ext a
exact integersAwayToField_algebraMap K N hN a
/-- A common natural denominator can also contain prescribed prime factors. -/
theorem exists_common_natural_denominator
{ฮน : Type v} [Finite ฮน] (x : ฮน โ†’ K) (Nโ‚€ : โ„•) (hNโ‚€ : Nโ‚€ โ‰  0) :
โˆƒ N : โ„•, N โ‰  0 โˆง Nโ‚€ โˆฃ N โˆง
โˆ€ i, โˆƒ a : ๐“ž K, algebraMap (๐“ž K) K a = (N : K) * x i := by
obtain โŸจb, hbโŸฉ := IsLocalization.exist_integer_multiples_of_finite
(Algebra.algebraMapSubmonoid (๐“ž K) โ„คโฐ) x
obtain โŸจm, hm, hmbโŸฉ := b.property
have hm0 : m โ‰  0 := mem_nonZeroDivisors_iff_ne_zero.mp hm
let N := Nโ‚€ * m.natAbs
have hN : N โ‰  0 := mul_ne_zero hNโ‚€ (Int.natAbs_ne_zero.mpr hm0)
refine โŸจN, hN, dvd_mul_right Nโ‚€ m.natAbs, ?_โŸฉ
have hmN : m โˆฃ (N : โ„ค) := Int.dvd_natCast.mpr (dvd_mul_left m.natAbs Nโ‚€)
obtain โŸจc, hcโŸฉ := hmN
intro i
obtain โŸจa, haโŸฉ := hb i
refine โŸจ(c : ๐“ž K) * a, ?_โŸฉ
have ha' : algebraMap (๐“ž K) K a = (m : K) * x i := by
simpa [Algebra.smul_def, โ† hmb] using ha
have hc' : (N : K) = (m : K) * (c : K) := by
exact_mod_cast hc
simp only [map_mul, map_intCast, ha', hc']
rw [โ† mul_assoc, mul_comm (c : K) (m : K)]
/-- Every element with denominator `N` belongs to the canonical localization image. -/
theorem mem_range_integersAwayToField
(N : โ„•) (hN : N โ‰  0) (x : K)
(hx : โˆƒ a : ๐“ž K, algebraMap (๐“ž K) K a = (N : K) * x) :
x โˆˆ (integersAwayToField K N hN).range := by
obtain โŸจa, haโŸฉ := hx
let L := Localization.Away (N : ๐“ž K)
let j := integersAwayToField K N hN
let z : L := IsLocalization.Away.invSelf (N : ๐“ž K)
have hz : (N : K) * j z = 1 := by
have H := congrArg j (IsLocalization.Away.mul_invSelf (S := L) (N : ๐“ž K))
simpa [j] using H
refine โŸจalgebraMap (๐“ž K) L a * z, ?_โŸฉ
change j (algebraMap (๐“ž K) L a * z) = x
rw [map_mul, integersAwayToField_algebraMap, ha]
calc
(N : K) * x * j z = x * ((N : K) * j z) := by ac_rfl
_ = x := by rw [hz, mul_one]
/-- A finite family of coefficients is contained in one localization of the integers. -/
theorem finite_coefficients_in_localized_integers
{ฮน : Type v} [Finite ฮน] (x : ฮน โ†’ K) (Nโ‚€ : โ„•) (hNโ‚€ : Nโ‚€ โ‰  0) :
โˆƒ (N : โ„•) (hN : N โ‰  0), Nโ‚€ โˆฃ N โˆง
โˆ€ i, x i โˆˆ (integersAwayToField K N hN).range := by
obtain โŸจN, hN, hd, hโŸฉ := exists_common_natural_denominator K x Nโ‚€ hNโ‚€
exact โŸจN, hN, hd, fun i โ†ฆ mem_range_integersAwayToField K N hN (x i) (h i)โŸฉ
/-- A finitely presented algebra over a number field has an integral model,
with the base-change isomorphism included in the conclusion. -/
theorem finitely_presented_algebra_has_integral_model
(A : Type v) [CommRing A] [Algebra K A] [Algebra.FinitePresentation K A]
(Nโ‚€ : โ„•) (hNโ‚€ : Nโ‚€ โ‰  0) :
โˆƒ (N : โ„•) (hN : N โ‰  0), Nโ‚€ โˆฃ N โˆง
let L := Localization.Away (N : ๐“ž K)
letI : Algebra L K := (integersAwayToField K N hN).toAlgebra
โˆƒ (Aโ‚€ : Type u) (_ : CommRing Aโ‚€) (_ : Algebra L Aโ‚€),
Algebra.FinitePresentation L Aโ‚€ โˆง Nonempty (K โŠ—[L] Aโ‚€ โ‰ƒโ‚[K] A) := by
classical
let P := Algebra.Presentation.ofFinitePresentation K A
let : Finite P.coeffs := P.finite_coeffs.to_subtype
obtain โŸจN, hN, hd, hcoeffโŸฉ := finite_coefficients_in_localized_integers K
(fun c : P.coeffs โ†ฆ (c : K)) Nโ‚€ hNโ‚€
refine โŸจN, hN, hd, ?_โŸฉ
let L := Localization.Away (N : ๐“ž K)
let : Algebra L K := (integersAwayToField K N hN).toAlgebra
let : Algebra L A := ((algebraMap K A).comp (integersAwayToField K N hN)).toAlgebra
let : IsScalarTower L K A := IsScalarTower.of_algebraMap_eq' rfl
let : P.HasCoeffs L := โŸจfun c hc โ†ฆ hcoeff โŸจc, hcโŸฉโŸฉ
exact โŸจP.ModelOfHasCoeffs L, inferInstance, inferInstance, inferInstance,
โŸจP.tensorModelOfHasCoeffsEquiv LโŸฉโŸฉ
end OAI.ArithmeticGeometry.Models.Algebra.Constructions.Foundations

Xet Storage Details

Size:
5.28 kB
ยท
Xet hash:
30dcdb99e9889a1e9f6b2666a56bbb38729bc7855851ba3238ee1d3ca3685c47

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