Module

RelativeGroupLawOpensDiagonalDifferenceExtension.lean

Nyll.AlgebraicCurves.Geometry.AbelianSchemes.Theorems.RelativeGroupLawOpensDiagonalDifferenceExtension
26 declarations indexed from sourceView source ↗

Relative Group Law exists opens diagonal difference extension of forall ring Krull Dim le

one

Declarations

AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs.RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one.GoodReductionJacobian.RelativeGroupLaw.WeilExtField.DIAG.exists_nat_of_add_natCast_eq
Source context 17 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section ProofImplementation
namespace AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs
namespace RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one
universe u
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.NeronModelInfra
open _root_.GoodReductionJacobian
namespace GoodReductionJacobian
namespace RelativeGroupLaw
namespace WeilExtField
namespace DIAG
open _root_.GoodReductionJacobian.RelativeGroupLaw
open _root_.GoodReductionJacobian
open IsLocalRing
theorem exists_nat_of_add_natCast_eq {x : WithBot ℕ∞} {k n : ℕ} (h : x + (k : WithBot ℕ∞) = n) :
    ∃ d : ℕ, x = d ∧ d + k = n
AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs.RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one.GoodReductionJacobian.RelativeGroupLaw.WeilExtField.DIAG.exists_nat_ringKrullDim_of_le
Source context 17 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section ProofImplementation
namespace AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs
namespace RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one
universe u
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.NeronModelInfra
open _root_.GoodReductionJacobian
namespace GoodReductionJacobian
namespace RelativeGroupLaw
namespace WeilExtField
namespace DIAG
open _root_.GoodReductionJacobian.RelativeGroupLaw
open _root_.GoodReductionJacobian
open IsLocalRing
theorem exists_nat_ringKrullDim_of_le {S : Type u} [CommRing S] [Nontrivial S] {n : ℕ}
    (h : ringKrullDim S ≤ n) : ∃ d : ℕ, ringKrullDim S = d
AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs.RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one.GoodReductionJacobian.RelativeGroupLaw.WeilExtField.DIAG.height_add_le_of_strictChain
Source context 17 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section ProofImplementation
namespace AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs
namespace RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one
universe u
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.NeronModelInfra
open _root_.GoodReductionJacobian
namespace GoodReductionJacobian
namespace RelativeGroupLaw
namespace WeilExtField
namespace DIAG
open _root_.GoodReductionJacobian.RelativeGroupLaw
open _root_.GoodReductionJacobian
open IsLocalRing
theorem height_add_le_of_strictChain {S : Type u} [CommRing S] [IsNoetherianRing S] {n : ℕ}
    (Q : Fin (n + 1) → Ideal S) (hQ : ∀ i, (Q i).IsPrime) (hlt : ∀ j : Fin n, Q j.castSucc < Q
      j.succ)
    (i : Fin (n + 1)) : (Q 0).height + (i : ℕ) ≤ (Q i).height
AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs.RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one.GoodReductionJacobian.RelativeGroupLaw.WeilExtField.DIAG.exists_isPrime_map_le_height_le_one
Source context 17 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section ProofImplementation
namespace AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs
namespace RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one
universe u
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.NeronModelInfra
open _root_.GoodReductionJacobian
namespace GoodReductionJacobian
namespace RelativeGroupLaw
namespace WeilExtField
namespace DIAG
open _root_.GoodReductionJacobian.RelativeGroupLaw
open _root_.GoodReductionJacobian
open IsLocalRing
theorem exists_isPrime_map_le_height_le_one
    {A B : Type u} [CommRing A] [CommRing B] [IsNoetherianRing A] [IsLocalRing A] [IsNoetherianRing
      B] [IsLocalRing B]
    (φ : A →+* B) (hφ : Function.Surjective φ) [IsLocalHom φ] (nA nB : ℕ)
    (_hA : ringKrullDim A = nA) (hB : ringKrullDim B = nB)
    (hCM : ∀ 𝔔 : Ideal A, 𝔔.IsPrime → ringKrullDim (A ⧸ 𝔔) + 𝔔.height = nA)
    (hRS : ((RingHom.ker φ).spanFinrank : WithBot ℕ∞) + nB = nA)
    (p : Ideal A) [hpP : p.IsPrime] (hp : p.height ≤ 1) :
    ∃ P : Ideal B, P.IsPrime ∧ p.map φ ≤ P ∧ P.height ≤ 1
AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs.RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one.GoodReductionJacobian.RelativeGroupLaw.WeilExtField.DIAG.coheight_fromSpecStalk
Source context 17 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section ProofImplementation
namespace AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs
namespace RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one
universe u
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.NeronModelInfra
open _root_.GoodReductionJacobian
namespace GoodReductionJacobian
namespace RelativeGroupLaw
namespace WeilExtField
namespace DIAG
open _root_.GoodReductionJacobian.RelativeGroupLaw
open _root_.GoodReductionJacobian
open CategoryTheory CategoryTheory.Limits AlgebraicGeometry Topology
theorem coheight_fromSpecStalk {X : Scheme.{u}} (x : X) (p : ↥(Spec (X.presheaf.stalk x))) :
    Order.coheight ((X.fromSpecStalk x).base p) = Order.coheight p
AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs.RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one.GoodReductionJacobian.RelativeGroupLaw.WeilExtField.DIAG.ringKrullDim_stalk_fromSpecStalk
Source context 17 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section ProofImplementation
namespace AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs
namespace RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one
universe u
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.NeronModelInfra
open _root_.GoodReductionJacobian
namespace GoodReductionJacobian
namespace RelativeGroupLaw
namespace WeilExtField
namespace DIAG
open _root_.GoodReductionJacobian.RelativeGroupLaw
open _root_.GoodReductionJacobian
open CategoryTheory CategoryTheory.Limits AlgebraicGeometry Topology
theorem ringKrullDim_stalk_fromSpecStalk {X : Scheme.{u}} (x : X) (p : ↥(Spec (X.presheaf.stalk
  x))) :
    ringKrullDim (X.presheaf.stalk ((X.fromSpecStalk x).base p)) = p.asIdeal.height
AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs.RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one.GoodReductionJacobian.RelativeGroupLaw.WeilExtField.DIAG.exists_specializes_diagonal_of_ringKrullDim_le_one_of_quotient_add_height
Source context 17 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section ProofImplementation
namespace AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs
namespace RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one
universe u
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.NeronModelInfra
open _root_.GoodReductionJacobian
namespace GoodReductionJacobian
namespace RelativeGroupLaw
namespace WeilExtField
namespace DIAG
open _root_.GoodReductionJacobian.RelativeGroupLaw
open _root_.GoodReductionJacobian
open CategoryTheory CategoryTheory.Limits AlgebraicGeometry Topology
theorem exists_specializes_diagonal_of_ringKrullDim_le_one_of_quotient_add_height
    {R : Type u} [CommRing R] {T : Scheme.{u}} [IsLocallyNoetherian T]
    (t : T ⟶ Spec (CommRingCat.of R)) [IsLocallyNoetherian (pullback t t)] (y : T)
    (nA : ℕ) (hA : ringKrullDim ((pullback t t).presheaf.stalk ((pullback.diagonal t).base y)) = nA)
    (hCM : ∀ 𝔔 : Ideal ((pullback t t).presheaf.stalk ((pullback.diagonal t).base y)), 𝔔.IsPrime →
      ringKrullDim (((pullback t t).presheaf.stalk ((pullback.diagonal t).base y)) ⧸ 𝔔) + 𝔔.height
        = nA)
    (hRS : ((RingHom.ker ((pullback.diagonal t).stalkMap y).hom).spanFinrank : WithBot ℕ∞)
        + ringKrullDim (T.presheaf.stalk y)
      = ringKrullDim ((pullback t t).presheaf.stalk ((pullback.diagonal t).base y)))
    (η : ↑(pullback t t)) (hη : η ⤳ (pullback.diagonal t).base y)
    (hdim : ringKrullDim ((pullback t t).presheaf.stalk η) ≤ 1) :
    ∃ ξ : T, ξ ⤳ y ∧ ringKrullDim (T.presheaf.stalk ξ) ≤ 1 ∧ η ⤳ (pullback.diagonal t).base ξ
AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs.RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one.GoodReductionJacobian.RelativeGroupLaw.WeilExtField.DIAG.exists_specializes_ringKrullDim_stalk_le_one
Source context 17 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section ProofImplementation
namespace AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs
namespace RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one
universe u
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.NeronModelInfra
open _root_.GoodReductionJacobian
namespace GoodReductionJacobian
namespace RelativeGroupLaw
namespace WeilExtField
namespace DIAG
open _root_.GoodReductionJacobian.RelativeGroupLaw
open _root_.GoodReductionJacobian
open CategoryTheory CategoryTheory.Limits AlgebraicGeometry Topology
theorem exists_specializes_ringKrullDim_stalk_le_one {X : Scheme.{u}} (x : X) :
    ∃ ξ : X, ξ ⤳ x ∧ ringKrullDim (X.presheaf.stalk ξ) ≤ 1
AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs.RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one.GoodReductionJacobian.RelativeGroupLaw.WeilExtField.DIAG.dense_of_forall_ringKrullDim_le_one
Source context 17 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section ProofImplementation
namespace AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs
namespace RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one
universe u
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.NeronModelInfra
open _root_.GoodReductionJacobian
namespace GoodReductionJacobian
namespace RelativeGroupLaw
namespace WeilExtField
namespace DIAG
open _root_.GoodReductionJacobian.RelativeGroupLaw
open _root_.GoodReductionJacobian
open CategoryTheory CategoryTheory.Limits AlgebraicGeometry Topology
theorem dense_of_forall_ringKrullDim_le_one {X : Scheme.{u}} (V : X.Opens)
    (hV : ∀ x : X, ringKrullDim (X.presheaf.stalk x) ≤ 1 → x ∈ V) : Dense (V : Set X)
AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs.RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one.GoodReductionJacobian.RelativeGroupLaw.WeilExtField.DIAG.dense_inf_preimage_of_dense
Source context 17 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section ProofImplementation
namespace AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs
namespace RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one
universe u
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.NeronModelInfra
open _root_.GoodReductionJacobian
namespace GoodReductionJacobian
namespace RelativeGroupLaw
namespace WeilExtField
namespace DIAG
open _root_.GoodReductionJacobian.RelativeGroupLaw
open _root_.GoodReductionJacobian
open CategoryTheory CategoryTheory.Limits AlgebraicGeometry Topology
theorem dense_inf_preimage_of_dense {R : Type u} [CommRing R] {T : Scheme.{u}}
    (t : T ⟶ Spec (CommRingCat.of R)) [UniversallyOpen t] (V : T.Opens) (hV : Dense (V : Set T)) :
    Dense ((((pullback.fst t t) ⁻¹ᵁ V ⊓ (pullback.snd t t) ⁻¹ᵁ V : (pullback t t).Opens)) : Set
      ↑(pullback t t))
AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs.RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one.GoodReductionJacobian.RelativeGroupLaw.WeilExtField.C3.eq_one_of_mul_eq
Source context 28 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section ProofImplementation
namespace AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs
namespace RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one
universe u
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.NeronModelInfra
open _root_.GoodReductionJacobian
noncomputable section
namespace GoodReductionJacobian
namespace RelativeGroupLaw
namespace WeilExtField
namespace C3
open _root_.GoodReductionJacobian.RelativeGroupLaw
open _root_.GoodReductionJacobian
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.NeronModelInfra
open _root_.GoodReductionJacobian
open _root_.AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs
open RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one
open GoodReductionJacobian
open _root_.TopologicalSpace
open _root_.Topology
variable {k : Type u} [Field k] {A T : Scheme.{u}} {f : A ⟶ Spec (CommRingCat.of k)}
theorem eq_one_of_mul_eq (G : RelativeGroupLaw k f) {S : Scheme.{u}}
    (g : S ⟶ Spec (CommRingCat.of k))
    (x y : SchemeHomOver g f) (h : G.mul g x y = y) : x = G.one g
AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs.RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one.GoodReductionJacobian.RelativeGroupLaw.WeilExtField.C3.isDominant_homOfLE_inf
Source context 29 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section ProofImplementation
namespace AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs
namespace RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one
universe u
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.NeronModelInfra
open _root_.GoodReductionJacobian
noncomputable section
namespace GoodReductionJacobian
namespace RelativeGroupLaw
namespace WeilExtField
namespace C3
open _root_.GoodReductionJacobian.RelativeGroupLaw
open _root_.GoodReductionJacobian
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.NeronModelInfra
open _root_.GoodReductionJacobian
open _root_.AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs
open RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one
open GoodReductionJacobian
open _root_.TopologicalSpace
open _root_.Topology
variable {k : Type u} [Field k] {A T : Scheme.{u}} {f : A ⟶ Spec (CommRingCat.of k)}
omit [Field k] in
theorem isDominant_homOfLE_inf {X : Scheme.{u}} (U V : X.Opens) (hV : Dense (V : Set X)) :
    IsDominant (X.homOfLE (inf_le_left : U ⊓ V ≤ U))
AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs.RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one.GoodReductionJacobian.RelativeGroupLaw.WeilExtField.C3.diagonal_restrict_comp_eq_unit
Source context 28 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section ProofImplementation
namespace AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs
namespace RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one
universe u
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.NeronModelInfra
open _root_.GoodReductionJacobian
noncomputable section
namespace GoodReductionJacobian
namespace RelativeGroupLaw
namespace WeilExtField
namespace C3
open _root_.GoodReductionJacobian.RelativeGroupLaw
open _root_.GoodReductionJacobian
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.NeronModelInfra
open _root_.GoodReductionJacobian
open _root_.AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs
open RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one
open GoodReductionJacobian
open _root_.TopologicalSpace
open _root_.Topology
variable {k : Type u} [Field k] {A T : Scheme.{u}} {f : A ⟶ Spec (CommRingCat.of k)}
theorem diagonal_restrict_comp_eq_unit (G : RelativeGroupLaw k f) [IsSeparated f]
    (t : T ⟶ Spec (CommRingCat.of k)) [Smooth t]
    (V : T.Opens) (hV : Dense (V : Set T)) (v : SchemeHomOver (V.ι ≫ t) f)
    (W : (pullback t t).Opens) (d : SchemeHomOver (W.ι ≫ pullback.fst t t ≫ t) f)
    (hrec : ∀ (S : Scheme.{u}) (a : S ⟶ ↑W) (b c : S ⟶ ↑V)
        (hb : a ≫ W.ι ≫ pullback.fst t t = b ≫ V.ι) (hc : a ≫ W.ι ≫ pullback.snd t t = c ≫ V.ι),
        G.mul (a ≫ W.ι ≫ pullback.fst t t ≫ t)
            ⟨a ≫ d.1, by rw [Category.assoc, d.2]⟩
            ⟨c ≫ v.1,
              by rw [Category.assoc, v.2, ← Category.assoc, ← hc, Category.assoc, Category.assoc,
              ← pullback.condition]⟩ =
          ⟨b ≫ v.1,
            by rw [Category.assoc, v.2, ← Category.assoc, ← hb, Category.assoc, Category.assoc]⟩) :
    (pullback.diagonal t ∣_ W) ≫ d.1 =
      ((pullback.diagonal t) ⁻¹ᵁ W).ι ≫ t ≫ (G.one (𝟙 (Spec (CommRingCat.of k)))).1 := by
  have : IsReduced T :=
    _root_.AlgebraicGeometry.isReduced_of_smooth_of_field t
  set U : T.Opens := (pullback.diagonal t) ⁻¹ᵁ W with hU
  have : IsReduced (U : Scheme.{u}) := isReduced_of_isOpenImmersion U.ι
  set e := G.one (𝟙 (Spec (CommRingCat.of k))) with he
  have hΔfst : (pullback.diagonal t ∣_ W) ≫ W.ι ≫ pullback.fst t t = U.ι := by
    rw [← Category.assoc, morphismRestrict_ι, Category.assoc, pullback.diagonal_fst,
      Category.comp_id]
  have hΔsnd : (pullback.diagonal t ∣_ W) ≫ W.ι ≫ pullback.snd t t = U.ι := by
    rw [← Category.assoc, morphismRestrict_ι, Category.assoc, pullback.diagonal_snd,
      Category.comp_id]
  have hL : ((pullback.diagonal t ∣_ W) ≫ d.1) ≫ f = U.ι ≫ t := by
    rw [Category.assoc, d.2]
    simp only [← Category.assoc]
    rw [Category.assoc (pullback.diagonal t ∣_ W), hΔfst]
  have hR : (U.ι ≫ t ≫ e.1) ≫ f = U.ι ≫ t := by
    rw [Category.assoc, Category.assoc, e.2, Category.comp_id]
  have := isDominant_homOfLE_inf U V hV
  refine ext_of_isDominant_of_isSeparated f (hL.trans hR.symm) (T.homOfLE (inf_le_left : U ⊓ V ≤
    U)) ?_
  set a : (U ⊓ V).toScheme ⟶ W.toScheme := T.homOfLE (inf_le_left : U ⊓ V ≤ U) ≫ (pullback.diagonal
    t ∣_ W)
    with ha
  set b : (U ⊓ V).toScheme ⟶ V.toScheme := T.homOfLE (inf_le_right : U ⊓ V ≤ V) with hb0
  have hb : a ≫ W.ι ≫ pullback.fst t t = b ≫ V.ι := by
    rw [ha, Category.assoc, hΔfst, Scheme.homOfLE_ι, hb0, Scheme.homOfLE_ι]
  have hc : a ≫ W.ι ≫ pullback.snd t t = b ≫ V.ι := by
    rw [ha, Category.assoc, hΔsnd, Scheme.homOfLE_ι, hb0, Scheme.homOfLE_ι]
  have key := hrec _ a b b hb hc
  have hone := eq_one_of_mul_eq G _ _ _ key
  have h1 : a ≫ d.1 = (a ≫ W.ι ≫ pullback.fst t t ≫ t) ≫ e.1 := by
    have h2 := congrArg Subtype.val hone
    rw [← G.one_natural (𝟙 (Spec (CommRingCat.of k))) (a ≫ W.ι ≫ pullback.fst t t ≫ t)
      (a ≫ W.ι ≫ pullback.fst t t ≫ t) (Category.comp_id _)] at h2
    exact h2
  calc T.homOfLE _ ≫ (pullback.diagonal t ∣_ W) ≫ d.1 = a ≫ d.1 := by rw [ha, Category.assoc]
    _ = (a ≫ W.ι ≫ pullback.fst t t ≫ t) ≫ e.1 := h1
    _ = T.homOfLE _ ≫ U.ι ≫ t ≫ e.1 := by
        rw [ha]
        simp only [Category.assoc]
        rw [reassoc_of% hΔfst]
AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs.RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one.GoodReductionJacobian.RelativeGroupLaw.WeilExtField.C3b.exists_rationalMap_component_affine
Source context 25 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section ProofImplementation
namespace AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs
namespace RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one
universe u
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.NeronModelInfra
open _root_.GoodReductionJacobian
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.NeronModelInfra
open _root_.GoodReductionJacobian
open _root_.AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs
open RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one
open GoodReductionJacobian
open _root_.Topology
namespace GoodReductionJacobian
namespace RelativeGroupLaw
namespace WeilExtField
namespace C3b
open _root_.GoodReductionJacobian.RelativeGroupLaw
open _root_.GoodReductionJacobian
theorem exists_rationalMap_component_affine
    {k : Type u} [Field k]
    {A T : Scheme.{u}} {f : A ⟶ Spec (CommRingCat.of k)} (G : RelativeGroupLaw k f) [IsSeparated f]
    (t : T ⟶ Spec (CommRingCat.of k)) [Smooth t]
    (V : T.Opens) (hV1 : ∀ x : T, ringKrullDim (T.presheaf.stalk x) ≤ 1 → x ∈ V)
    (v : SchemeHomOver (V.ι ≫ t) f)
    (W : (pullback t t).Opens) (d : SchemeHomOver (W.ι ≫ pullback.fst t t ≫ t) f)
    (hVV : ∀ p : ↑(pullback t t), (pullback.fst t t).base p ∈ V → (pullback.snd t t).base p ∈ V → p
      ∈ W)
    (hrec : ∀ (S : Scheme.{u}) (a : S ⟶ ↑W) (b c : S ⟶ ↑V)
        (hb : a ≫ W.ι ≫ pullback.fst t t = b ≫ V.ι) (hc : a ≫ W.ι ≫ pullback.snd t t = c ≫ V.ι),
        G.mul (a ≫ W.ι ≫ pullback.fst t t ≫ t)
            ⟨a ≫ d.1, by rw [Category.assoc, d.2]⟩
            ⟨c ≫ v.1,
              by rw [Category.assoc, v.2, ← Category.assoc, ← hc, Category.assoc, Category.assoc,
              ← pullback.condition]⟩ =
          ⟨b ≫ v.1,
            by rw [Category.assoc, v.2, ← Category.assoc, ← hb, Category.assoc, Category.assoc]⟩)
    (hmax : ∀ (W' : (pullback t t).Opens) (d' : SchemeHomOver (W'.ι ≫ pullback.fst t t ≫ t) f)
        (W₀ : (pullback t t).Opens) (h₀ : W₀ ≤ W ⊓ W'),
        ((W' : Set ↑(pullback t t)) ⊆ closure (W₀ : Set ↑(pullback t t))) →
        (pullback t t).homOfLE (h₀.trans inf_le_left) ≫ d.1 = (pullback t t).homOfLE (h₀.trans
          inf_le_right) ≫ d'.1 →
        W' ≤ W ∧ ∀ (S : Scheme.{u}) (a' : S ⟶ ↑W') (a : S ⟶ ↑W), a' ≫ W'.ι = a ≫ W.ι → a' ≫ d'.1 =
          a ≫ d.1)
    (y : T) (P₀ : (pullback t t).Opens) [IrreducibleSpace (P₀ : Scheme.{u})]
    (hyP₀ : (pullback.diagonal t).base y ∈ P₀)
    (H : A.Opens) (hHe : ∀ s : ↥(Spec (CommRingCat.of k)), (G.one (𝟙 (Spec (CommRingCat.of
      k)))).1.base s ∈ H) :
    ∃ u : (P₀ : Scheme.{u}) ⤏ (H : Scheme.{u}),
      (∀ p : ↥P₀, p ∈ u.domain → P₀.ι.base p ∈ W) ∧
      (∀ ξ : T, ξ ∈ V → ξ ⤳ y →
        ∃ hξ : (pullback.diagonal t).base ξ ∈ P₀, (⟨(pullback.diagonal t).base ξ, hξ⟩ : ↥P₀) ∈
          u.domain) := by
  classical
  have : IsReduced (pullback t t) :=
    _root_.AlgebraicGeometry.isReduced_of_smooth_of_field (pullback.fst t t ≫ t)
  have hV : Dense (V : Set T) :=
    GoodReductionJacobian.RelativeGroupLaw.WeilExtField.DIAG.dense_of_forall_ringKrullDim_le_one V
      hV1
  have hC3a := GoodReductionJacobian.RelativeGroupLaw.WeilExtField.C3.diagonal_restrict_comp_eq_unit
    G t V hV v W d hrec
  have hdΔ : ∀ (θ : T) (hθ : (pullback.diagonal t).base θ ∈ W),
      d.1.base ⟨(pullback.diagonal t).base θ, hθ⟩ ∈ H := by
    intro θ hθ
    have hθ' : θ ∈ (pullback.diagonal t) ⁻¹ᵁ W := by rw [Scheme.Hom.mem_preimage]; exact hθ
    let z : ((pullback.diagonal t) ⁻¹ᵁ W).toScheme := ⟨θ, hθ'⟩
    have e1 := congrArg
      (fun φ : ((pullback.diagonal t) ⁻¹ᵁ W).toScheme ⟶ A => φ z) hC3a
    simp only [Scheme.Hom.comp_apply] at e1
    have e2 : (pullback.diagonal t ∣_ W) z =
        (⟨(pullback.diagonal t) θ, hθ⟩ : W.toScheme) :=
      Subtype.ext (morphismRestrict_base_coe (pullback.diagonal t) W z)
    rw [e2] at e1
    exact e1.symm ▸ hHe _
  have key : ∀ θ : T, θ ∈ V → θ ⤳ y →
      (pullback.diagonal t).base θ ∈ P₀ ∧ (pullback.diagonal t).base θ ∈ W := by
    intro θ hθV hθy
    refine ⟨(hθy.map (Scheme.Hom.continuous (pullback.diagonal t))).mem_open P₀.2 hyP₀, hVV _ ?_ ?_⟩
    · rw [← Scheme.Hom.comp_apply, pullback.diagonal_fst]; exact hθV
    · rw [← Scheme.Hom.comp_apply, pullback.diagonal_snd]; exact hθV
  obtain ⟨θ₀, hθ₀y, hθ₀dim⟩ :=
    DIAG.exists_specializes_ringKrullDim_stalk_le_one y
  have hθ₀V : θ₀ ∈ V := hV1 θ₀ hθ₀dim
  let WH : (pullback t t).Opens := W.ι ''ᵁ (d.1 ⁻¹ᵁ H)
  have hWH_le : WH ≤ W := by
    rintro q ⟨w, -, rfl⟩; exact w.2
  let U₀ : (P₀ : Scheme.{u}).Opens := P₀.ι ⁻¹ᵁ WH
  have hrange1 : Set.range (U₀.ι ≫ P₀.ι).base ⊆ Set.range W.ι.base := by
    rw [Scheme.Opens.range_ι]
    rintro _ ⟨z, rfl⟩
    rw [Scheme.Hom.comp_apply]
    exact hWH_le ((Scheme.Hom.mem_preimage _).mp z.2)
  let ℓ := IsOpenImmersion.lift W.ι (U₀.ι ≫ P₀.ι) hrange1
  have hℓ : ℓ ≫ W.ι = U₀.ι ≫ P₀.ι := IsOpenImmersion.lift_fac _ _ _
  have hℓmem : ∀ z : U₀.toScheme, ℓ z ∈ d.1 ⁻¹ᵁ H := by
    intro z
    have hz : P₀.ι.base (U₀.ι.base z) ∈ WH := (Scheme.Hom.mem_preimage _).mp z.2
    obtain ⟨w, hw, hwz⟩ := hz
    have : w = ℓ.base z := by
      apply W.ι.isOpenEmbedding.injective
      refine hwz.trans ?_
      show P₀.ι.base (U₀.ι.base z) = W.ι.base (ℓ.base z)
      simpa only [Scheme.Hom.comp_apply] using
        (congrArg (fun φ : U₀.toScheme ⟶ pullback t t => φ z) hℓ).symm
    rw [← this]; exact hw
  have hrange2 : Set.range (ℓ ≫ d.1).base ⊆ Set.range H.ι.base := by
    rw [Scheme.Opens.range_ι]
    rintro _ ⟨z, rfl⟩
    rw [Scheme.Hom.comp_apply]
    exact (Scheme.Hom.mem_preimage _).mp (hℓmem z)
  let rep : (U₀ : Scheme.{u}) ⟶ (H : Scheme.{u}) := IsOpenImmersion.lift H.ι (ℓ ≫ d.1) hrange2
  have hrep : rep ≫ H.ι = ℓ ≫ d.1 := IsOpenImmersion.lift_fac _ _ _
  have hΔU₀ : ∀ (θ : T) (hθV : θ ∈ V) (hθy : θ ⤳ y),
      (⟨(pullback.diagonal t).base θ, (key θ hθV hθy).1⟩ : ↥P₀) ∈ U₀ := by
    intro θ hθV hθy
    change P₀.ι.base _ ∈ WH
    exact ⟨⟨(pullback.diagonal t).base θ, (key θ hθV hθy).2⟩,
      (Scheme.Hom.mem_preimage _).mpr (hdΔ θ (key θ hθV hθy).2), rfl⟩
  have hU₀dense : Dense (SetLike.coe U₀) :=
    IsOpen.dense U₀.2 ⟨⟨(pullback.diagonal t).base θ₀, (key θ₀ hθ₀V hθ₀y).1⟩, hΔU₀ θ₀ hθ₀V hθ₀y⟩
  let g₀ : (P₀ : Scheme.{u}).PartialMap (H : Scheme.{u}) := ⟨U₀, hU₀dense, rep⟩
  refine ⟨g₀.toRationalMap, ?_, ?_⟩
  · intro p hp
    obtain ⟨g, hpg, hgeq⟩ := Scheme.RationalMap.mem_domain.mp hp
    rw [Scheme.PartialMap.toRationalMap_eq_iff] at hgeq
    obtain ⟨W₀, hW₀d, hW₀g, hW₀g₀, hagree⟩ := hgeq
    rw [Scheme.PartialMap.restrict_hom, Scheme.PartialMap.restrict_hom] at hagree
    change (P₀ : Scheme.{u}).homOfLE hW₀g ≫ g.hom = (P₀ : Scheme.{u}).homOfLE hW₀g₀ ≫ rep at hagree
    have : IsDominant ((P₀ : Scheme.{u}).homOfLE hW₀g) := by
      rw [isDominant_iff]
      have hrange : Set.range ((P₀ : Scheme.{u}).homOfLE hW₀g).base =
          (Subtype.val : ↥g.domain → ↥P₀) ⁻¹' (SetLike.coe W₀) := by
        ext q; constructor
        · rintro ⟨x, rfl⟩
          change (((P₀ : Scheme.{u}).homOfLE hW₀g).base x).1 ∈ (SetLike.coe W₀)
          exact (Scheme.homOfLE_apply (X := P₀.toScheme) hW₀g
            (show ↥W₀ from x)).symm ▸ x.2
        · intro hq
          exact ⟨⟨q.1, hq⟩, Subtype.ext
            (Scheme.homOfLE_apply (X := P₀.toScheme) hW₀g ⟨q.1, hq⟩)⟩
      intro q
      rw [hrange]
      have hcl : (Subtype.val ⁻¹' closure (SetLike.coe W₀) : Set ↥g.domain) =
          closure (Subtype.val ⁻¹' (SetLike.coe W₀)) :=
        (IsOpen.isOpenMap_subtype_val g.domain.2).preimage_closure_eq_closure_preimage
          continuous_subtype_val _
      have hq : q ∈ closure (Subtype.val ⁻¹' (SetLike.coe W₀) : Set ↥g.domain) := by
        rw [← hcl]; exact hW₀d q.1
      exact hq
    have hℓR : ℓ ≫ d.1 ≫ f = U₀.ι ≫ P₀.ι ≫ pullback.fst t t ≫ t := by
      rw [d.2, ← Category.assoc, hℓ, Category.assoc]
    have hgover : g.hom ≫ H.ι ≫ f = g.domain.ι ≫ P₀.ι ≫ pullback.fst t t ≫ t := by
      refine ext_of_isDominant_of_isSeparated (terminal.from _) (terminal.hom_ext _ _)
        ((P₀ : Scheme.{u}).homOfLE hW₀g) ?_
      rw [← Category.assoc, hagree, Category.assoc, ← Category.assoc rep, hrep, Category.assoc, hℓR,
        ← Category.assoc, Scheme.homOfLE_ι, ← Category.assoc ((P₀ : Scheme.{u}).homOfLE hW₀g),
          Scheme.homOfLE_ι]
    let W' : (pullback t t).Opens := P₀.ι ''ᵁ g.domain
    let iso := Scheme.Hom.isoImage P₀.ι g.domain
    let d' : SchemeHomOver (W'.ι ≫ pullback.fst t t ≫ t) f :=
      ⟨iso.inv ≫ g.hom ≫ H.ι, by
        rw [Category.assoc, Category.assoc, hgover, ← Category.assoc iso.inv,
          ← Category.assoc (iso.inv ≫ g.domain.ι), Category.assoc iso.inv,
            Scheme.Hom.isoImage_inv_ι]⟩
    let W₀' : (pullback t t).Opens := P₀.ι ''ᵁ W₀
    have hW₀'W : W₀' ≤ W := by
      rintro _ ⟨q, hq, rfl⟩
      exact hWH_le ((Scheme.Hom.mem_preimage _).mp (hW₀g₀ hq))
    have hW₀'W' : W₀' ≤ W' := by
      rintro _ ⟨q, hq, rfl⟩; exact ⟨q, hW₀g hq, rfl⟩
    have h₀ : W₀' ≤ W ⊓ W' := le_inf hW₀'W hW₀'W'
    have hdense' : ((W' : (pullback t t).Opens) : Set ↑(pullback t t)) ⊆ closure (W₀' : Set
      ↑(pullback t t)) := by
      rintro _ ⟨q, -, rfl⟩
      have hq : q ∈ closure (SetLike.coe W₀) := hW₀d q
      have := image_closure_subset_closure_image (Scheme.Hom.continuous P₀.ι) ⟨q, hq, rfl⟩
      rwa [← Scheme.Hom.coe_image] at this
    have hagree' : (pullback t t).homOfLE (h₀.trans inf_le_left) ≫ d.1 =
        (pullback t t).homOfLE (h₀.trans inf_le_right) ≫ d'.1 := by
      let j := Scheme.Hom.isoImage P₀.ι W₀
      rw [← cancel_epi j.hom]
      have hL : j.hom ≫ (pullback t t).homOfLE (h₀.trans inf_le_left) = (P₀ : Scheme.{u}).homOfLE
        hW₀g₀ ≫ ℓ := by
        rw [← cancel_mono W.ι, Category.assoc, Scheme.homOfLE_ι, Scheme.Hom.isoImage_hom_ι,
          Category.assoc, hℓ,
          ← Category.assoc, Scheme.homOfLE_ι]
      have hR : j.hom ≫ (pullback t t).homOfLE (h₀.trans inf_le_right) ≫ iso.inv =
          (P₀ : Scheme.{u}).homOfLE hW₀g := by
        rw [← cancel_mono (g.domain.ι ≫ P₀.ι), Category.assoc, Category.assoc,
          Scheme.Hom.isoImage_inv_ι,
          Scheme.homOfLE_ι, Scheme.Hom.isoImage_hom_ι, ← Category.assoc, Scheme.homOfLE_ι]
      rw [← Category.assoc, hL, Category.assoc, ← hrep, ← Category.assoc, ← hagree, Category.assoc]
      change _ = j.hom ≫ (pullback t t).homOfLE (h₀.trans inf_le_right) ≫ iso.inv ≫ g.hom ≫ H.ι
      rw [← Category.assoc j.hom, ← Category.assoc (j.hom ≫ _), Category.assoc j.hom, hR]
    obtain ⟨hW'W, -⟩ := hmax W' d' W₀' h₀ hdense' hagree'
    exact hW'W ⟨p, hpg, rfl⟩
  · intro ξ hξV hξy
    exact ⟨(key ξ hξV hξy).1, g₀.le_domain_toRationalMap (hΔU₀ ξ hξV hξy)⟩
AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs.RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one.GoodReductionJacobian.RelativeGroupLaw.WeilExtField.DIAG.exists_nat_ringKrullDim_eq_of_isRegularLocalRing
Source context 26 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section ProofImplementation
namespace AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs
namespace RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one
universe u
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.NeronModelInfra
open _root_.GoodReductionJacobian
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.NeronModelInfra
open _root_.GoodReductionJacobian
open _root_.AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs
open RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one
open GoodReductionJacobian
open _root_.Topology
namespace GoodReductionJacobian
namespace RelativeGroupLaw
namespace WeilExtField
namespace DIAG
open _root_.GoodReductionJacobian.RelativeGroupLaw
open _root_.GoodReductionJacobian
open CategoryTheory CategoryTheory.Limits AlgebraicGeometry IsLocalRing
theorem exists_nat_ringKrullDim_eq_of_isRegularLocalRing (A : Type u) [CommRing A]
  [IsRegularLocalRing A] :
    ∃ n : ℕ, ringKrullDim A = n
AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs.RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one.GoodReductionJacobian.RelativeGroupLaw.WeilExtField.DIAG.isCohenMacaulayOfDim_of_isRegularLocalRing
Source context 26 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section ProofImplementation
namespace AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs
namespace RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one
universe u
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.NeronModelInfra
open _root_.GoodReductionJacobian
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.NeronModelInfra
open _root_.GoodReductionJacobian
open _root_.AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs
open RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one
open GoodReductionJacobian
open _root_.Topology
namespace GoodReductionJacobian
namespace RelativeGroupLaw
namespace WeilExtField
namespace DIAG
open _root_.GoodReductionJacobian.RelativeGroupLaw
open _root_.GoodReductionJacobian
open CategoryTheory CategoryTheory.Limits AlgebraicGeometry IsLocalRing
theorem isCohenMacaulayOfDim_of_isRegularLocalRing (A : Type u) [CommRing A] [IsRegularLocalRing A]
    (n : ℕ) (hA : ringKrullDim A = n) : IsCohenMacaulayOfDim A n
AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs.RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one.GoodReductionJacobian.RelativeGroupLaw.WeilExtField.DIAG.ringKrullDim_quotient_add_height_of_isRegularLocalRing
Source context 26 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section ProofImplementation
namespace AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs
namespace RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one
universe u
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.NeronModelInfra
open _root_.GoodReductionJacobian
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.NeronModelInfra
open _root_.GoodReductionJacobian
open _root_.AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs
open RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one
open GoodReductionJacobian
open _root_.Topology
namespace GoodReductionJacobian
namespace RelativeGroupLaw
namespace WeilExtField
namespace DIAG
open _root_.GoodReductionJacobian.RelativeGroupLaw
open _root_.GoodReductionJacobian
open CategoryTheory CategoryTheory.Limits AlgebraicGeometry IsLocalRing
theorem ringKrullDim_quotient_add_height_of_isRegularLocalRing (A : Type u) [CommRing A]
  [IsRegularLocalRing A]
    (n : ℕ) (hA : ringKrullDim A = n) :
    ∀ 𝔔 : Ideal A, 𝔔.IsPrime → ringKrullDim (A ⧸ 𝔔) + 𝔔.height = n
AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs.RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one.GoodReductionJacobian.RelativeGroupLaw.WeilExtField.DIAG.krull_transfer_inputs
Source context 26 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section ProofImplementation
namespace AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs
namespace RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one
universe u
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.NeronModelInfra
open _root_.GoodReductionJacobian
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.NeronModelInfra
open _root_.GoodReductionJacobian
open _root_.AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs
open RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one
open GoodReductionJacobian
open _root_.Topology
namespace GoodReductionJacobian
namespace RelativeGroupLaw
namespace WeilExtField
namespace DIAG
open _root_.GoodReductionJacobian.RelativeGroupLaw
open _root_.GoodReductionJacobian
open CategoryTheory CategoryTheory.Limits AlgebraicGeometry IsLocalRing
theorem krull_transfer_inputs
    (k : Type u) [Field k]
    {T : Scheme.{u}} (t : T ⟶ Spec (CommRingCat.of k)) [Smooth t] (y : T) :
    ∃ nA : ℕ, ringKrullDim ((pullback t t).presheaf.stalk ((pullback.diagonal t).base y)) = nA ∧
      (∀ 𝔔 : Ideal ((pullback t t).presheaf.stalk ((pullback.diagonal t).base y)), 𝔔.IsPrime →
        ringKrullDim (((pullback t t).presheaf.stalk ((pullback.diagonal t).base y)) ⧸ 𝔔) +
          𝔔.height = nA) ∧
      ((RingHom.ker ((pullback.diagonal t).stalkMap y).hom).spanFinrank : WithBot ℕ∞)
          + ringKrullDim (T.presheaf.stalk y)
        = ringKrullDim ((pullback t t).presheaf.stalk ((pullback.diagonal t).base y))
AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs.RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one.GoodReductionJacobian.RelativeGroupLaw.WeilExtField.DIAG.B.isIntegral_and_isLocallyNoetherian_and_isIntegrallyClosed_of_isIrreducible
Source context 27 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section ProofImplementation
namespace AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs
namespace RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one
universe u
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.NeronModelInfra
open _root_.GoodReductionJacobian
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.NeronModelInfra
open _root_.GoodReductionJacobian
open _root_.AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs
open RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one
open GoodReductionJacobian
open _root_.Topology
namespace GoodReductionJacobian
namespace RelativeGroupLaw
namespace WeilExtField
namespace DIAG
namespace B
open _root_.GoodReductionJacobian.RelativeGroupLaw
open _root_.GoodReductionJacobian
open CategoryTheory CategoryTheory.Limits AlgebraicGeometry Topology
theorem isIntegral_and_isLocallyNoetherian_and_isIntegrallyClosed_of_isIrreducible
    {X : Scheme.{u}} [IsLocallyNoetherian X]
    (hX : ∀ x : X, IsDomain (X.presheaf.stalk x) ∧ IsIntegrallyClosed (X.presheaf.stalk x))
    (U : X.Opens) (hU : IsIrreducible (U : Set X)) :
    IsIntegral (U : Scheme.{u}) ∧ IsLocallyNoetherian (U : Scheme.{u}) ∧
      ∀ p : ↥U, IsIntegrallyClosed ((U : Scheme.{u}).presheaf.stalk p)
AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs.RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one.GoodReductionJacobian.RelativeGroupLaw.WeilExtField.DIAG.B.exists_isAffineOpen_forall_mem_of_isLocalRing
Source context 27 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section ProofImplementation
namespace AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs
namespace RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one
universe u
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.NeronModelInfra
open _root_.GoodReductionJacobian
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.NeronModelInfra
open _root_.GoodReductionJacobian
open _root_.AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs
open RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one
open GoodReductionJacobian
open _root_.Topology
namespace GoodReductionJacobian
namespace RelativeGroupLaw
namespace WeilExtField
namespace DIAG
namespace B
open _root_.GoodReductionJacobian.RelativeGroupLaw
open _root_.GoodReductionJacobian
open CategoryTheory CategoryTheory.Limits AlgebraicGeometry Topology
theorem exists_isAffineOpen_forall_mem_of_isLocalRing
    {R : Type u} [CommRing R] [IsLocalRing R] {A : Scheme.{u}} (e : Spec (CommRingCat.of R) ⟶ A) :
    ∃ H : A.Opens, IsAffineOpen H ∧ ∀ s : ↥(Spec (CommRingCat.of R)), e.base s ∈ H
AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs.RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one.GoodReductionJacobian.RelativeGroupLaw.WeilExtField.DIAG.B.specializes_ι_of_specializes
Source context 27 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section ProofImplementation
namespace AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs
namespace RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one
universe u
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.NeronModelInfra
open _root_.GoodReductionJacobian
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.NeronModelInfra
open _root_.GoodReductionJacobian
open _root_.AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs
open RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one
open GoodReductionJacobian
open _root_.Topology
namespace GoodReductionJacobian
namespace RelativeGroupLaw
namespace WeilExtField
namespace DIAG
namespace B
open _root_.GoodReductionJacobian.RelativeGroupLaw
open _root_.GoodReductionJacobian
open CategoryTheory CategoryTheory.Limits AlgebraicGeometry Topology
theorem specializes_ι_of_specializes {X : Scheme.{u}} (U : X.Opens) {a b : ↥U} (h : a ⤳ b) :
    U.ι.base a ⤳ U.ι.base b
AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs.RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one.GoodReductionJacobian.RelativeGroupLaw.WeilExtField.DIAG.B.specializes_of_specializes_ι
Source context 27 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section ProofImplementation
namespace AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs
namespace RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one
universe u
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.NeronModelInfra
open _root_.GoodReductionJacobian
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.NeronModelInfra
open _root_.GoodReductionJacobian
open _root_.AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs
open RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one
open GoodReductionJacobian
open _root_.Topology
namespace GoodReductionJacobian
namespace RelativeGroupLaw
namespace WeilExtField
namespace DIAG
namespace B
open _root_.GoodReductionJacobian.RelativeGroupLaw
open _root_.GoodReductionJacobian
open CategoryTheory CategoryTheory.Limits AlgebraicGeometry Topology
theorem specializes_of_specializes_ι {X : Scheme.{u}} (U : X.Opens) {a b : ↥U} (h : U.ι.base a ⤳
  U.ι.base b) :
    a ⤳ b
AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs.RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one.GoodReductionJacobian.RelativeGroupLaw.WeilExtField.DIAG.B.ringKrullDim_stalk_ι
Source context 27 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section ProofImplementation
namespace AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs
namespace RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one
universe u
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.NeronModelInfra
open _root_.GoodReductionJacobian
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.NeronModelInfra
open _root_.GoodReductionJacobian
open _root_.AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs
open RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one
open GoodReductionJacobian
open _root_.Topology
namespace GoodReductionJacobian
namespace RelativeGroupLaw
namespace WeilExtField
namespace DIAG
namespace B
open _root_.GoodReductionJacobian.RelativeGroupLaw
open _root_.GoodReductionJacobian
open CategoryTheory CategoryTheory.Limits AlgebraicGeometry Topology
theorem ringKrullDim_stalk_ι {X : Scheme.{u}} (U : X.Opens) (a : ↥U) :
    ringKrullDim (X.presheaf.stalk (U.ι.base a)) = ringKrullDim ((U : Scheme.{u}).presheaf.stalk a)
AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs.RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one.GoodReductionJacobian.RelativeGroupLaw.WeilExtField.DIAG.B.ι_base_apply_mk
Source context 27 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section ProofImplementation
namespace AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs
namespace RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one
universe u
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.NeronModelInfra
open _root_.GoodReductionJacobian
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.NeronModelInfra
open _root_.GoodReductionJacobian
open _root_.AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs
open RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one
open GoodReductionJacobian
open _root_.Topology
namespace GoodReductionJacobian
namespace RelativeGroupLaw
namespace WeilExtField
namespace DIAG
namespace B
open _root_.GoodReductionJacobian.RelativeGroupLaw
open _root_.GoodReductionJacobian
open CategoryTheory CategoryTheory.Limits AlgebraicGeometry Topology
theorem ι_base_apply_mk {X : Scheme.{u}} (U : X.Opens) (x : X) (hx : x ∈ U) : U.ι.base ⟨x, hx⟩ = x
AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs.RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one.GoodReductionJacobian.RelativeGroupLaw.WeilExtField.DIAG.diag_assembly
Source context 34 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section ProofImplementation
namespace AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs
namespace RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one
universe u
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.NeronModelInfra
open _root_.GoodReductionJacobian
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.NeronModelInfra
open _root_.GoodReductionJacobian
open _root_.AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs
open RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one
open GoodReductionJacobian
open _root_.Topology
namespace GoodReductionJacobian
namespace RelativeGroupLaw
namespace WeilExtField
namespace DIAG
open _root_.GoodReductionJacobian.RelativeGroupLaw
open _root_.GoodReductionJacobian
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.NeronModelInfra
open _root_.GoodReductionJacobian
open _root_.AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs
open RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one
open GoodReductionJacobian
open _root_.Topology
theorem diag_assembly
    (k : Type u) [Field k]
    {A T : Scheme.{u}} {f : A ⟶ Spec (CommRingCat.of k)} (G : RelativeGroupLaw k f) [IsSeparated f]
    (t : T ⟶ Spec (CommRingCat.of k)) [Smooth t]
    (V : T.Opens) (hV1 : ∀ x : T, ringKrullDim (T.presheaf.stalk x) ≤ 1 → x ∈ V)
    (v : SchemeHomOver (V.ι ≫ t) f) :
    ∃ (W : (pullback t t).Opens) (d : SchemeHomOver (W.ι ≫ pullback.fst t t ≫ t) f),
      (∀ x : T, (pullback.diagonal t).base x ∈ W) ∧
      (∀ (S : Scheme.{u}) (a : S ⟶ ↑W) (b c : S ⟶ ↑V)
        (hb : a ≫ W.ι ≫ pullback.fst t t = b ≫ V.ι) (hc : a ≫ W.ι ≫ pullback.snd t t = c ≫ V.ι),
        G.mul (a ≫ W.ι ≫ pullback.fst t t ≫ t)
            ⟨a ≫ d.1, by rw [Category.assoc, d.2]⟩
            ⟨c ≫ v.1,
              by rw [Category.assoc, v.2, ← Category.assoc, ← hc, Category.assoc, Category.assoc,
              ← pullback.condition]⟩ =
          ⟨b ≫ v.1, by
            rw [Category.assoc, v.2, ← Category.assoc, ← hb, Category.assoc, Category.assoc]⟩) := by
  classical
  have hV : Dense (V : Set T) := dense_of_forall_ringKrullDim_le_one V hV1
  obtain ⟨W, d, hVV, hrec, hmax⟩ :=
    GoodReductionJacobian.RelativeGroupLaw.exists_isGreatest_opens_difference_extension_of_dense k
      G t V hV v
  refine ⟨W, d, ?_, hrec⟩
  intro y
  by_contra hy
  set q : ↑(pullback t t) := (pullback.diagonal t).base y with hq_def
  have hTln : IsLocallyNoetherian T := LocallyOfFiniteType.isLocallyNoetherian t
  have hPln : IsLocallyNoetherian (pullback t t) := LocallyOfFiniteType.isLocallyNoetherian
    (pullback.fst t t ≫ t)
  have hPn : ∀ p : ↑(pullback t t), IsDomain ((pullback t t).presheaf.stalk p) ∧
      IsIntegrallyClosed ((pullback t t).presheaf.stalk p) := fun p =>
    _root_.AlgebraicGeometry.Smooth.isDomain_and_isIntegrallyClosed_stalk_of_field
      (pullback.fst t t ≫ t) p
  obtain ⟨hP₀open, -⟩ :=
    AlgebraicGeometry.isOpen_irreducibleComponent_of_isDomain_stalk (X := pullback t t) (fun p =>
      (hPn p).1) q
  set P₀ : (pullback t t).Opens := ⟨irreducibleComponent q, hP₀open⟩ with hP₀_def
  have hqP₀ : q ∈ P₀ := mem_irreducibleComponent
  obtain ⟨hP₀int, hP₀ln, hP₀n⟩ :=
    B.isIntegral_and_isLocallyNoetherian_and_isIntegrallyClosed_of_isIrreducible
      hPn P₀ (isIrreducible_irreducibleComponent (x := q))
  have : IsIntegral (P₀ : Scheme.{u}) := hP₀int
  have : IsLocallyNoetherian (P₀ : Scheme.{u}) := hP₀ln
  obtain ⟨H, hHaff, hHe⟩ :=
    B.exists_isAffineOpen_forall_mem_of_isLocalRing
      (G.one (𝟙 (Spec (CommRingCat.of k)))).1
  have : IsAffine (H : Scheme.{u}) := hHaff
  obtain ⟨u, hu_dom_le_W, hu_diag⟩ :=
    GoodReductionJacobian.RelativeGroupLaw.WeilExtField.C3b.exists_rationalMap_component_affine
      G t V hV1 v W d hVV hrec hmax y P₀ hqP₀ H hHe
  have hq_dom : (⟨q, hqP₀⟩ : ↥P₀) ∉ u.domain := by
    intro h
    have h' := hu_dom_le_W _ h
    rw [GoodReductionJacobian.RelativeGroupLaw.WeilExtField.DIAG.B.ι_base_apply_mk] at h'
    exact hy h'
  obtain ⟨z, hz_dom, hzq, hz_dim⟩ :=
    AlgebraicGeometry.Scheme.RationalMap.exists_specializes_ringKrullDim_le_one_of_not_mem_domain
      hP₀n u ⟨q, hqP₀⟩ hq_dom
  have hηq : P₀.ι.base z ⤳ q := by
    have h :=
      GoodReductionJacobian.RelativeGroupLaw.WeilExtField.DIAG.B.specializes_ι_of_specializes P₀ hzq
    rwa [GoodReductionJacobian.RelativeGroupLaw.WeilExtField.DIAG.B.ι_base_apply_mk] at h
  have hη_dim : ringKrullDim ((pullback t t).presheaf.stalk (P₀.ι.base z)) ≤ 1 := by
    exact (GoodReductionJacobian.RelativeGroupLaw.WeilExtField.DIAG.B.ringKrullDim_stalk_ι
      P₀ z).le.trans hz_dim
  obtain ⟨nA, hA, hCM, hRS⟩ := krull_transfer_inputs k t y
  obtain ⟨ξ, hξy, hξ_dim, hzξ⟩ :=
    exists_specializes_diagonal_of_ringKrullDim_le_one_of_quotient_add_height t y nA hA hCM hRS
      (P₀.ι.base z) hηq hη_dim
  have hξV : ξ ∈ V := hV1 ξ hξ_dim
  obtain ⟨hξP₀, hξ_dom⟩ := hu_diag ξ hξV hξy
  refine hz_dom ?_
  have hzξ' : z ⤳ (⟨(pullback.diagonal t).base ξ, hξP₀⟩ : ↥P₀) := by
    refine GoodReductionJacobian.RelativeGroupLaw.WeilExtField.DIAG.B.specializes_of_specializes_ι
      P₀ ?_
    rw [GoodReductionJacobian.RelativeGroupLaw.WeilExtField.DIAG.B.ι_base_apply_mk]
    exact hzξ
  exact hzξ'.mem_open u.domain.2 hξ_dom
GoodReductionJacobian.RelativeGroupLaw.exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one
Source context 8 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section ProofImplementation
namespace GoodReductionJacobian.RelativeGroupLaw
universe u
open CategoryTheory CategoryTheory.Limits AlgebraicGeometry NeronModelInfra GoodReductionJacobian
open _root_.AlgebraicCurves.Geometry.AbelianSchemes.Theorems.Proofs in
open RelativeGroupLaw_exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one in
open GoodReductionJacobian.RelativeGroupLaw.WeilExtField.DIAG in
theorem exists_opens_diagonal_difference_extension_of_forall_ringKrullDim_le_one
    (k : Type u) [Field k]
    {A T : Scheme.{u}} {f : A ⟶ Spec (CommRingCat.of k)} (G : RelativeGroupLaw k f) [IsSeparated f]
    (t : T ⟶ Spec (CommRingCat.of k)) [Smooth t]
    (V : T.Opens) (hV : ∀ x : T, ringKrullDim (T.presheaf.stalk x) ≤ 1 → x ∈ V)
    (v : SchemeHomOver (V.ι ≫ t) f) :
    ∃ (W : (pullback t t).Opens) (d : SchemeHomOver (W.ι ≫ pullback.fst t t ≫ t) f),
      (∀ x : T, (pullback.diagonal t).base x ∈ W) ∧
      (∀ (S : Scheme.{u}) (a : S ⟶ ↑W) (b c : S ⟶ ↑V)
        (hb : a ≫ W.ι ≫ pullback.fst t t = b ≫ V.ι) (hc : a ≫ W.ι ≫ pullback.snd t t = c ≫ V.ι),
        G.mul (a ≫ W.ι ≫ pullback.fst t t ≫ t)
            ⟨a ≫ d.1, by rw [Category.assoc, d.2]⟩
            ⟨c ≫ v.1,
              by rw [Category.assoc, v.2, ← Category.assoc, ← hc, Category.assoc, Category.assoc,
              ← pullback.condition]⟩ =
          ⟨b ≫ v.1,
            by rw [Category.assoc, v.2, ← Category.assoc, ← hb, Category.assoc, Category.assoc]⟩) :=
  diag_assembly k G t V hV v