Module

Property.lean

Nyll.SchemeTheory.Pi1.Affine.Property
28 declarations indexed from sourceView source ↗

Limit properties of subcategories of P.Over ⊤ X for P = affineAnd

Imports3
Imported by3

Declarations

CategoryTheory.MorphismProperty.Under.congrPushoutIso

Pushout in relative under categories commutes with a compatible change of objects by isomorphisms.

Source context 8 commands

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

@[expose] public section
universe u
open CategoryTheory Limits
namespace CategoryTheory.MorphismProperty
variable {A : Type*} [Category A]
  {B : Type*} [Category B] {T : Type*} [Category T] {L L₁ L₂ L₃ : A ⥤ T} {P : MorphismProperty T}
  {Q : MorphismProperty A} {W : MorphismProperty B} [Q.IsMultiplicative] [W.IsMultiplicative]
  {R R₁ R₂ R₃ : B ⥤ T}
variable (L)
variable {L} (R)
variable {C : Type*} [Category C] (P Q : MorphismProperty C) [Q.IsMultiplicative]
def Under.congrPushoutIso [HasPushouts C] [P.IsStableUnderCobaseChange]
    [Q.IsStableUnderCobaseChange] [Q.RespectsIso]
    {X X' Y Y' : C} (f : X ⟶ Y) (f' : X' ⟶ Y') (eX : X ≅ X') (eY : Y ≅ Y')
    (h : f ≫ eY.hom = eX.hom ≫ f') :
    (Comma.mapLeftIso _ (Discrete.natIso fun _ ↦ eX)).functor ⋙ Under.pushout P Q f' ≅
      Under.pushout P Q f ⋙
        (Comma.mapLeftIso _ (Discrete.natIso fun _ ↦ eY)).functor :=
  have h_inv : f' ≫ eY.inv = eX.inv ≫ f := by
    rw [Iso.comp_inv_eq, Category.assoc, Iso.eq_inv_comp]
    exact h.symm
  have h_id (A : P.Under Q X) :
      (eX.inv ≫ A.hom) ≫ (Iso.refl ((𝟭 C).obj A.right)).hom =
        eX.inv ≫ A.hom := by
    simp only [Iso.refl_hom, Category.comp_id]
  NatIso.ofComponents
    (fun A ↦
      haveI : IsIso (Iso.refl ((𝟭 C).obj A.right)).hom := inferInstance
      haveI : IsIso eY.inv := inferInstance
      haveI : IsIso eX.inv := inferInstance
      let k := pushout.map (eX.inv ≫ A.hom) f' A.hom f
        (Iso.refl ((𝟭 C).obj A.right)).hom eY.inv eX.inv (h_id A) h_inv
      have hk : IsIso k := by
        dsimp only [k]
        exact CategoryTheory.Limits.pushout.map_isIso (eX.inv ≫ A.hom) f' A.hom f
          (Iso.refl ((𝟭 C).obj A.right)).hom eY.inv eX.inv (h_id A) h_inv
      Under.isoMk
      (@asIso C _ _ _ k hk)
      (by
        change pushout.inr (eX.inv ≫ A.hom) f' ≫ k =
          eY.inv ≫ pushout.inr A.hom f
        dsimp only [k, pushout.map]
        apply pushout.inr_desc)) <|
    fun {A B} g ↦ by
      ext
      let a : X ⟶ A.right := A.hom
      let b : X ⟶ B.right := B.hom
      let gr : A.right ⟶ B.right := g.right
      have hgr : a ≫ gr = b := by
        change A.hom ≫ g.right = B.hom
        exact Under.w g
      have ha_id :
          (eX.inv ≫ a) ≫ (Iso.refl ((𝟭 C).obj A.right)).hom =
            eX.inv ≫ a := by
        change
          (eX.inv ≫ A.hom) ≫ (Iso.refl ((𝟭 C).obj A.right)).hom =
            eX.inv ≫ A.hom
        exact h_id A
      have hb_id :
          (eX.inv ≫ b) ≫ (Iso.refl ((𝟭 C).obj B.right)).hom =
            eX.inv ≫ b := by
        change
          (eX.inv ≫ B.hom) ≫ (Iso.refl ((𝟭 C).obj B.right)).hom =
            eX.inv ≫ B.hom
        exact h_id B
      let s : Limits.pushout (eX.inv ≫ a) f' ⟶
          Limits.pushout (eX.inv ≫ b) f' :=
        pushout.desc
          (gr ≫ pushout.inl (eX.inv ≫ b) f')
          (pushout.inr (eX.inv ≫ b) f') (by
            calc
              (eX.inv ≫ a) ≫
                  (gr ≫ pushout.inl (eX.inv ≫ b) f') =
                  (eX.inv ≫ (a ≫ gr)) ≫
                    pushout.inl (eX.inv ≫ b) f' := by
                simp only [Category.assoc]
              _ = (eX.inv ≫ b) ≫
                    pushout.inl (eX.inv ≫ b) f' := by
                rw [hgr]
              _ = f' ≫ pushout.inr (eX.inv ≫ b) f' :=
                pushout.condition)
      let t : Limits.pushout a f ⟶ Limits.pushout b f :=
        pushout.desc
          (gr ≫ pushout.inl b f)
          (pushout.inr b f) (by
            calc
              a ≫ (gr ≫ pushout.inl b f) =
                  (a ≫ gr) ≫ pushout.inl b f := by
                simp only [Category.assoc]
              _ = b ≫ pushout.inl b f := by rw [hgr]
              _ = f ≫ pushout.inr b f := pushout.condition)
      let kA : Limits.pushout (eX.inv ≫ a) f' ⟶ Limits.pushout a f :=
        pushout.map (eX.inv ≫ a) f' a f
          (Iso.refl ((𝟭 C).obj A.right)).hom eY.inv eX.inv
          ha_id h_inv
      let kB : Limits.pushout (eX.inv ≫ b) f' ⟶ Limits.pushout b f :=
        pushout.map (eX.inv ≫ b) f' b f
          (Iso.refl ((𝟭 C).obj B.right)).hom eY.inv eX.inv
          hb_id h_inv
      change s ≫ kB = kA ≫ t
      have hs_inl :
          pushout.inl (eX.inv ≫ a) f' ≫ s =
            gr ≫ pushout.inl (eX.inv ≫ b) f' := by
        exact pushout.inl_desc _ _ _
      have hs_inr :
          pushout.inr (eX.inv ≫ a) f' ≫ s =
            pushout.inr (eX.inv ≫ b) f' := by
        exact pushout.inr_desc _ _ _
      have ht_inl :
          pushout.inl a f ≫ t =
            gr ≫ pushout.inl b f := by
        exact pushout.inl_desc _ _ _
      have ht_inr :
          pushout.inr a f ≫ t =
            pushout.inr b f := by
        exact pushout.inr_desc _ _ _
      have hkA_inl :
          pushout.inl (eX.inv ≫ a) f' ≫ kA =
            (Iso.refl ((𝟭 C).obj A.right)).hom ≫
              pushout.inl a f := by
        exact pushout.inl_desc _ _ _
      have hkA_inr :
          pushout.inr (eX.inv ≫ a) f' ≫ kA =
            eY.inv ≫ pushout.inr a f := by
        exact pushout.inr_desc _ _ _
      have hkB_inl :
          pushout.inl (eX.inv ≫ b) f' ≫ kB =
            (Iso.refl ((𝟭 C).obj B.right)).hom ≫
              pushout.inl b f := by
        exact pushout.inl_desc _ _ _
      have hkB_inr :
          pushout.inr (eX.inv ≫ b) f' ≫ kB =
            eY.inv ≫ pushout.inr b f := by
        exact pushout.inr_desc _ _ _
      have hkA_inl' :
          pushout.inl (eX.inv ≫ a) f' ≫ kA =
            pushout.inl a f := by
        simpa only [Iso.refl_hom, Category.id_comp] using hkA_inl
      have hkB_inl' :
          pushout.inl (eX.inv ≫ b) f' ≫ kB =
            pushout.inl b f := by
        simpa only [Iso.refl_hom, Category.id_comp] using hkB_inl
      apply pushout.hom_ext
      · calc
          pushout.inl (eX.inv ≫ a) f' ≫ (s ≫ kB) =
              (pushout.inl (eX.inv ≫ a) f' ≫ s) ≫ kB :=
            (Category.assoc _ _ _).symm
          _ = (gr ≫ pushout.inl (eX.inv ≫ b) f') ≫ kB := by
            rw [hs_inl]
          _ = gr ≫
              (pushout.inl (eX.inv ≫ b) f' ≫ kB) :=
            Category.assoc _ _ _
          _ = gr ≫ pushout.inl b f := by rw [hkB_inl']
          _ = pushout.inl a f ≫ t := ht_inl.symm
          _ = (pushout.inl (eX.inv ≫ a) f' ≫ kA) ≫ t := by
            rw [hkA_inl']
          _ = pushout.inl (eX.inv ≫ a) f' ≫ (kA ≫ t) :=
            Category.assoc _ _ _
      · calc
          pushout.inr (eX.inv ≫ a) f' ≫ (s ≫ kB) =
              (pushout.inr (eX.inv ≫ a) f' ≫ s) ≫ kB :=
            (Category.assoc _ _ _).symm
          _ = pushout.inr (eX.inv ≫ b) f' ≫ kB := by
            rw [hs_inr]
          _ = eY.inv ≫ pushout.inr b f := hkB_inr
          _ = eY.inv ≫ (pushout.inr a f ≫ t) := by
            rw [ht_inr]
          _ = (eY.inv ≫ pushout.inr a f) ≫ t :=
            (Category.assoc _ _ _).symm
          _ = (pushout.inr (eX.inv ≫ a) f' ≫ kA) ≫ t := by
            rw [hkA_inr]
          _ = pushout.inr (eX.inv ≫ a) f' ≫ (kA ≫ t) :=
            Category.assoc _ _ _
AlgebraicGeometry.AffineAnd.affineHomOverCategory
Source context 9 commands

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

@[expose] public section
universe u
open CategoryTheory Limits
namespace AlgebraicGeometry
variable {Q : ∀ {R S : Type u} [CommRing R] [CommRing S], (R →+* S) → Prop}
variable (P : MorphismProperty Scheme.{u}) [HasAffineProperty P (affineAnd Q)]
namespace AffineAnd
open MorphismProperty
variable {X : Scheme.{u}}
instance affineHomOverCategory (S : Scheme.{u}) :
    Category (MorphismProperty.Over
      (@IsAffineHom : MorphismProperty Scheme.{u})
      (⊤ : MorphismProperty Scheme.{u}) S)
Source context 10 commands

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

@[expose] public section
universe u
open CategoryTheory Limits
namespace AlgebraicGeometry
variable {Q : ∀ {R S : Type u} [CommRing R] [CommRing S], (R →+* S) → Prop}
variable (P : MorphismProperty Scheme.{u}) [HasAffineProperty P (affineAnd Q)]
namespace AffineAnd
open MorphismProperty
variable {X : Scheme.{u}}
local instance affineHomOverCategory (S : Scheme.{u}) :
    Category (MorphismProperty.Over
      (@IsAffineHom : MorphismProperty Scheme.{u})
      (⊤ : MorphismProperty Scheme.{u}) S) :=
  instCategoryAffine S
instance (f : P.Over ⊤ X) : IsAffineHom f.hom
AlgebraicGeometry.AffineAnd.toAffine

Forget the additional affine morphism property while retaining the morphism over the base.

Source context 10 commands

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

@[expose] public section
universe u
open CategoryTheory Limits
namespace AlgebraicGeometry
variable {Q : ∀ {R S : Type u} [CommRing R] [CommRing S], (R →+* S) → Prop}
variable (P : MorphismProperty Scheme.{u}) [HasAffineProperty P (affineAnd Q)]
namespace AffineAnd
open MorphismProperty
variable {X : Scheme.{u}}
local instance affineHomOverCategory (S : Scheme.{u}) :
    Category (MorphismProperty.Over
      (@IsAffineHom : MorphismProperty Scheme.{u})
      (⊤ : MorphismProperty Scheme.{u}) S) :=
  instCategoryAffine S
def toAffine (X : Scheme.{u}) : P.Over ⊤ X ⥤ Affine X where
  obj f := ⟨f.toComma, inferInstance⟩
  map f := ⟨f.toCommaMorphism, trivial, trivial⟩
AlgebraicGeometry.AffineAnd.toAffineFullyFaithful

The forgetful functor from affine morphisms with the given property is fully faithful.

Source context 10 commands

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

@[expose] public section
universe u
open CategoryTheory Limits
namespace AlgebraicGeometry
variable {Q : ∀ {R S : Type u} [CommRing R] [CommRing S], (R →+* S) → Prop}
variable (P : MorphismProperty Scheme.{u}) [HasAffineProperty P (affineAnd Q)]
namespace AffineAnd
open MorphismProperty
variable {X : Scheme.{u}}
local instance affineHomOverCategory (S : Scheme.{u}) :
    Category (MorphismProperty.Over
      (@IsAffineHom : MorphismProperty Scheme.{u})
      (⊤ : MorphismProperty Scheme.{u}) S) :=
  instCategoryAffine S
def toAffineFullyFaithful (X : Scheme.{u}) : (toAffine P X).FullyFaithful where
  preimage f := ⟨f.toCommaMorphism, trivial, trivial⟩
Source context 10 commands

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

@[expose] public section
universe u
open CategoryTheory Limits
namespace AlgebraicGeometry
variable {Q : ∀ {R S : Type u} [CommRing R] [CommRing S], (R →+* S) → Prop}
variable (P : MorphismProperty Scheme.{u}) [HasAffineProperty P (affineAnd Q)]
namespace AffineAnd
open MorphismProperty
variable {X : Scheme.{u}}
local instance affineHomOverCategory (S : Scheme.{u}) :
    Category (MorphismProperty.Over
      (@IsAffineHom : MorphismProperty Scheme.{u})
      (⊤ : MorphismProperty Scheme.{u}) S) :=
  instCategoryAffine S
instance : (toAffine P X).Faithful
Source context 10 commands

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

@[expose] public section
universe u
open CategoryTheory Limits
namespace AlgebraicGeometry
variable {Q : ∀ {R S : Type u} [CommRing R] [CommRing S], (R →+* S) → Prop}
variable (P : MorphismProperty Scheme.{u}) [HasAffineProperty P (affineAnd Q)]
namespace AffineAnd
open MorphismProperty
variable {X : Scheme.{u}}
local instance affineHomOverCategory (S : Scheme.{u}) :
    Category (MorphismProperty.Over
      (@IsAffineHom : MorphismProperty Scheme.{u})
      (⊤ : MorphismProperty Scheme.{u}) S) :=
  instCategoryAffine S
instance : (toAffine P X).Full
CommRingCat.Under.property_limit_of_hasFiniteProducts_of_hasEqualizers
Source context 12 commands

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

@[expose] public section
universe u
open CategoryTheory Limits
namespace AlgebraicGeometry
variable {Q : ∀ {R S : Type u} [CommRing R] [CommRing S], (R →+* S) → Prop}
variable (P : MorphismProperty Scheme.{u}) [HasAffineProperty P (affineAnd Q)]
namespace AffineAnd
open MorphismProperty
variable {X : Scheme.{u}}
local instance affineHomOverCategory (S : Scheme.{u}) :
    Category (MorphismProperty.Over
      (@IsAffineHom : MorphismProperty Scheme.{u})
      (⊤ : MorphismProperty Scheme.{u}) S) :=
  instCategoryAffine S
variable [hPbc : P.IsStableUnderBaseChange]
variable (J : Type) [SmallCategory J] [FinCategory J]
lemma _root_.CommRingCat.Under.property_limit_of_hasFiniteProducts_of_hasEqualizers
    (hQi : RingHom.RespectsIso Q) (hQp : RingHom.HasFiniteProducts Q)
    (hQe : RingHom.HasEqualizers Q)
    {R : CommRingCat.{u}} (D : J ⥤ Under R) (h : ∀ j, Q (D.obj j).hom.hom) :
    Q (limit D).hom.hom
AlgebraicGeometry.AffineAnd.createsFiniteColimits

The forgetful functor creates finite colimits when the ring-hom property is stable under the required finite limits.

Source context 12 commands

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

@[expose] public section
universe u
open CategoryTheory Limits
namespace AlgebraicGeometry
variable {Q : ∀ {R S : Type u} [CommRing R] [CommRing S], (R →+* S) → Prop}
variable (P : MorphismProperty Scheme.{u}) [HasAffineProperty P (affineAnd Q)]
namespace AffineAnd
open MorphismProperty
variable {X : Scheme.{u}}
local instance affineHomOverCategory (S : Scheme.{u}) :
    Category (MorphismProperty.Over
      (@IsAffineHom : MorphismProperty Scheme.{u})
      (⊤ : MorphismProperty Scheme.{u}) S) :=
  instCategoryAffine S
variable [hPbc : P.IsStableUnderBaseChange]
variable (J : Type) [SmallCategory J] [FinCategory J]
def createsFiniteColimits (hQi : RingHom.RespectsIso Q) (hQp : RingHom.HasFiniteProducts Q)
    (hQe : RingHom.HasEqualizers Q) :
    CreatesFiniteColimits (toAffine P X)
AlgebraicGeometry.AffineAnd.hasFiniteColimits
Source context 13 commands

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

@[expose] public section
universe u
open CategoryTheory Limits
namespace AlgebraicGeometry
variable {Q : ∀ {R S : Type u} [CommRing R] [CommRing S], (R →+* S) → Prop}
variable (P : MorphismProperty Scheme.{u}) [HasAffineProperty P (affineAnd Q)]
namespace AffineAnd
open MorphismProperty
variable {X : Scheme.{u}}
local instance affineHomOverCategory (S : Scheme.{u}) :
    Category (MorphismProperty.Over
      (@IsAffineHom : MorphismProperty Scheme.{u})
      (⊤ : MorphismProperty Scheme.{u}) S) :=
  instCategoryAffine S
variable [hPbc : P.IsStableUnderBaseChange]
variable (J : Type) [SmallCategory J] [FinCategory J]
include hPbc in
lemma hasFiniteColimits (hQi : RingHom.RespectsIso Q) (hQp : RingHom.HasFiniteProducts Q)
    (hQe : RingHom.HasEqualizers Q) :
    HasFiniteColimits (P.Over ⊤ X)
AlgebraicGeometry.AffineAnd.preservesFiniteColimits_toAffine
Source context 13 commands

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

@[expose] public section
universe u
open CategoryTheory Limits
namespace AlgebraicGeometry
variable {Q : ∀ {R S : Type u} [CommRing R] [CommRing S], (R →+* S) → Prop}
variable (P : MorphismProperty Scheme.{u}) [HasAffineProperty P (affineAnd Q)]
namespace AffineAnd
open MorphismProperty
variable {X : Scheme.{u}}
local instance affineHomOverCategory (S : Scheme.{u}) :
    Category (MorphismProperty.Over
      (@IsAffineHom : MorphismProperty Scheme.{u})
      (⊤ : MorphismProperty Scheme.{u}) S) :=
  instCategoryAffine S
variable [hPbc : P.IsStableUnderBaseChange]
variable (J : Type) [SmallCategory J] [FinCategory J]
include hPbc in
lemma preservesFiniteColimits_toAffine (hQi : RingHom.RespectsIso Q)
    (hQp : RingHom.HasFiniteProducts Q) (hQe : RingHom.HasEqualizers Q) :
    PreservesFiniteColimits (toAffine P X)
AlgebraicGeometry.AffineAnd.preservesFiniteLimits_pullback
Source context 12 commands

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

@[expose] public section
universe u
open CategoryTheory Limits
namespace AlgebraicGeometry
variable {Q : ∀ {R S : Type u} [CommRing R] [CommRing S], (R →+* S) → Prop}
variable (P : MorphismProperty Scheme.{u}) [HasAffineProperty P (affineAnd Q)]
namespace AffineAnd
open MorphismProperty
variable {X : Scheme.{u}}
local instance affineHomOverCategory (S : Scheme.{u}) :
    Category (MorphismProperty.Over
      (@IsAffineHom : MorphismProperty Scheme.{u})
      (⊤ : MorphismProperty Scheme.{u}) S) :=
  instCategoryAffine S
variable [hPbc : P.IsStableUnderBaseChange]
variable (J : Type) [SmallCategory J] [FinCategory J]
theorem preservesFiniteLimits_pullback
    [P.IsStableUnderComposition] [P.ContainsIdentities]
    [P.HasOfPostcompProperty P] {Y : Scheme.{u}} (f : X ⟶ Y) :
    PreservesFiniteLimits (MorphismProperty.Over.pullback P ⊤ f)
AlgebraicGeometry.AffineAnd.ΓProp

Global sections of affine morphisms with the given property lie in the corresponding relative under category of rings.

Source context 12 commands

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

@[expose] public section
universe u
open CategoryTheory Limits
namespace AlgebraicGeometry
variable {Q : ∀ {R S : Type u} [CommRing R] [CommRing S], (R →+* S) → Prop}
variable (P : MorphismProperty Scheme.{u}) [HasAffineProperty P (affineAnd Q)]
namespace AffineAnd
open MorphismProperty
variable {X : Scheme.{u}}
local instance affineHomOverCategory (S : Scheme.{u}) :
    Category (MorphismProperty.Over
      (@IsAffineHom : MorphismProperty Scheme.{u})
      (⊤ : MorphismProperty Scheme.{u}) S) :=
  instCategoryAffine S
variable [hPbc : P.IsStableUnderBaseChange]
variable (J : Type) [SmallCategory J] [FinCategory J]
def ΓProp (hQi : RingHom.RespectsIso Q) (S : Scheme.{u}) [IsAffine S] :
    (P.Over ⊤ S)ᵒᵖ ⥤ (RingHom.toMorphismProperty Q).Under ⊤ Γ(S, ⊤)
AlgebraicGeometry.AffineAnd.ΓProp_map_right
Source context 13 commands

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

@[expose] public section
universe u
open CategoryTheory Limits
namespace AlgebraicGeometry
variable {Q : ∀ {R S : Type u} [CommRing R] [CommRing S], (R →+* S) → Prop}
variable (P : MorphismProperty Scheme.{u}) [HasAffineProperty P (affineAnd Q)]
namespace AffineAnd
open MorphismProperty
variable {X : Scheme.{u}}
local instance affineHomOverCategory (S : Scheme.{u}) :
    Category (MorphismProperty.Over
      (@IsAffineHom : MorphismProperty Scheme.{u})
      (⊤ : MorphismProperty Scheme.{u}) S) :=
  instCategoryAffine S
variable [hPbc : P.IsStableUnderBaseChange]
variable (J : Type) [SmallCategory J] [FinCategory J]
omit [P.IsStableUnderBaseChange] in
-- `simps` generates this with `appLE` on the RHS
lemma ΓProp_map_right (hQi : RingHom.RespectsIso Q) (S : Scheme.{u}) [IsAffine S]
    {X Y : (P.Over ⊤ S)ᵒᵖ} (f : X ⟶ Y) :
    ((ΓProp P hQi S).map f).right = f.unop.left.appTop
AlgebraicGeometry.Scheme.Hom.appTop_bijective_of_isAffine
Source context 12 commands

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

@[expose] public section
universe u
open CategoryTheory Limits
namespace AlgebraicGeometry
variable {Q : ∀ {R S : Type u} [CommRing R] [CommRing S], (R →+* S) → Prop}
variable (P : MorphismProperty Scheme.{u}) [HasAffineProperty P (affineAnd Q)]
namespace AffineAnd
open MorphismProperty
variable {X : Scheme.{u}}
local instance affineHomOverCategory (S : Scheme.{u}) :
    Category (MorphismProperty.Over
      (@IsAffineHom : MorphismProperty Scheme.{u})
      (⊤ : MorphismProperty Scheme.{u}) S) :=
  instCategoryAffine S
variable [hPbc : P.IsStableUnderBaseChange]
variable (J : Type) [SmallCategory J] [FinCategory J]
lemma _root_.AlgebraicGeometry.Scheme.Hom.appTop_bijective_of_isAffine
      {X Y : Scheme.{u}} [IsAffine X] [IsAffine Y] :
    Function.Bijective (fun (f : X ⟶ Y) ↦ f.appTop) := by
  refine ⟨fun f g (hfg : f.appTop = g.appTop) ↦ ?_, fun f ↦ ?_⟩
  · have (f : X ⟶ Y) : f = X.isoSpec.hom ≫ Spec.map f.appTop ≫ Y.isoSpec.inv := by
      simp [Scheme.isoSpec_hom_naturality_assoc]
    rw [this f, this g, hfg]
  · let g : X ⟶ Spec Γ(Y, ⊤) :=
      (ΓSpec.adjunction.homEquiv X (Opposite.op Γ(Y, ⊤))) f.op
    use g ≫ Y.isoSpec.inv
    have hg : g.appTop = (Scheme.ΓSpecIso Γ(Y, ⊤)).hom ≫ f :=
      ΓSpec_adjunction_homEquiv_eq f
    have hY :
        Y.isoSpec.inv.appTop ≫ (Scheme.ΓSpecIso Γ(Y, ⊤)).hom = 𝟙 _ := by
      rw [← Scheme.toSpecΓ_appTop, ← Scheme.Hom.comp_appTop]
      simp
    calc
      (g ≫ Y.isoSpec.inv).appTop = Y.isoSpec.inv.appTop ≫ g.appTop :=
        Scheme.Hom.comp_appTop _ _
      _ = Y.isoSpec.inv.appTop ≫
          ((Scheme.ΓSpecIso Γ(Y, ⊤)).hom ≫ f) :=
        congrArg (fun k ↦ Y.isoSpec.inv.appTop ≫ k) hg
      _ = (Y.isoSpec.inv.appTop ≫
          (Scheme.ΓSpecIso Γ(Y, ⊤)).hom) ≫ f :=
        (Category.assoc _ _ _).symm
      _ = 𝟙 _ ≫ f := congrArg (fun k ↦ k ≫ f) hY
      _ = f := Category.id_comp _
AlgebraicGeometry.AffineAnd.faithful_ΓProp
Source context 13 commands

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

@[expose] public section
universe u
open CategoryTheory Limits
namespace AlgebraicGeometry
variable {Q : ∀ {R S : Type u} [CommRing R] [CommRing S], (R →+* S) → Prop}
variable (P : MorphismProperty Scheme.{u}) [HasAffineProperty P (affineAnd Q)]
namespace AffineAnd
open MorphismProperty
variable {X : Scheme.{u}}
local instance affineHomOverCategory (S : Scheme.{u}) :
    Category (MorphismProperty.Over
      (@IsAffineHom : MorphismProperty Scheme.{u})
      (⊤ : MorphismProperty Scheme.{u}) S) :=
  instCategoryAffine S
variable [hPbc : P.IsStableUnderBaseChange]
variable (J : Type) [SmallCategory J] [FinCategory J]
omit [P.IsStableUnderBaseChange] in
lemma faithful_ΓProp (hQi : RingHom.RespectsIso Q) {S : Scheme.{u}} [IsAffine S] :
    (ΓProp P hQi S).Faithful where
  map_injective := by
    intro ⟨X⟩ ⟨Y⟩ ⟨f⟩ ⟨g⟩ hfg
    let hXHom : IsAffineHom X.hom :=
      HasAffineProperty.affineAnd_le_isAffineHom P inferInstance _ X.prop
    let hYHom : IsAffineHom Y.hom :=
      HasAffineProperty.affineAnd_le_isAffineHom P inferInstance _ Y.prop
    let _ : IsAffine X.left :=
      @isAffine_of_isAffineHom X.left S X.hom hXHom inferInstance
    let _ : IsAffine Y.left :=
      @isAffine_of_isAffineHom Y.left S Y.hom hYHom inferInstance
    have : f = g := by
      ext : 1
      apply AlgebraicGeometry.Scheme.Hom.appTop_bijective_of_isAffine.injective
      change ((ΓProp P hQi S).map (Opposite.op f)).right =
        ((ΓProp P hQi S).map (Opposite.op g)).right
      exact congrArg (fun k ↦ k.right) hfg
    rw [this]
AlgebraicGeometry.AffineAnd.full_ΓProp
Source context 13 commands

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

@[expose] public section
universe u
open CategoryTheory Limits
namespace AlgebraicGeometry
variable {Q : ∀ {R S : Type u} [CommRing R] [CommRing S], (R →+* S) → Prop}
variable (P : MorphismProperty Scheme.{u}) [HasAffineProperty P (affineAnd Q)]
namespace AffineAnd
open MorphismProperty
variable {X : Scheme.{u}}
local instance affineHomOverCategory (S : Scheme.{u}) :
    Category (MorphismProperty.Over
      (@IsAffineHom : MorphismProperty Scheme.{u})
      (⊤ : MorphismProperty Scheme.{u}) S) :=
  instCategoryAffine S
variable [hPbc : P.IsStableUnderBaseChange]
variable (J : Type) [SmallCategory J] [FinCategory J]
omit [P.IsStableUnderBaseChange] in
lemma full_ΓProp (hQi : RingHom.RespectsIso Q) {S : Scheme.{u}} [IsAffine S] :
    (ΓProp P hQi S).Full where
  map_surjective := by
    intro ⟨X⟩ ⟨Y⟩ f
    let hXHom : IsAffineHom X.hom :=
      HasAffineProperty.affineAnd_le_isAffineHom P inferInstance _ X.prop
    let hYHom : IsAffineHom Y.hom :=
      HasAffineProperty.affineAnd_le_isAffineHom P inferInstance _ Y.prop
    let _ : IsAffine X.left :=
      @isAffine_of_isAffineHom X.left S X.hom hXHom inferInstance
    let _ : IsAffine Y.left :=
      @isAffine_of_isAffineHom Y.left S Y.hom hYHom inferInstance
    let _ : IsAffine ((Functor.fromPUnit S).obj X.right) :=
      inferInstanceAs (IsAffine S)
    let _ : IsAffine ((Functor.fromPUnit S).obj Y.right) :=
      inferInstanceAs (IsAffine S)
    let φ : Γ(X.left, ⊤) ⟶ Γ(Y.left, ⊤) := f.right
    obtain ⟨f', h⟩ :=
      AlgebraicGeometry.Scheme.Hom.appTop_bijective_of_isAffine.surjective φ
    have hw : X.hom.appTop ≫ φ = Y.hom.appTop := by
      change X.hom.appTop ≫ f.right = Y.hom.appTop
      ext s
      exact ConcreteCategory.congr_hom (MorphismProperty.Under.w f) s
    let g : Y ⟶ X := MorphismProperty.Over.homMk f' <| by
      apply AlgebraicGeometry.Scheme.Hom.appTop_bijective_of_isAffine.injective
      calc
        (f' ≫ X.hom).appTop = X.hom.appTop ≫ f'.appTop :=
          Scheme.Hom.comp_appTop _ _
        _ = X.hom.appTop ≫ φ :=
          congrArg (fun k ↦ X.hom.appTop ≫ k) h
        _ = Y.hom.appTop := hw
    use g.op
    ext : 1
    change f'.appTop = φ
    exact h
AlgebraicGeometry.AffineAnd.essSurj_ΓProp
Source context 13 commands

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

@[expose] public section
universe u
open CategoryTheory Limits
namespace AlgebraicGeometry
variable {Q : ∀ {R S : Type u} [CommRing R] [CommRing S], (R →+* S) → Prop}
variable (P : MorphismProperty Scheme.{u}) [HasAffineProperty P (affineAnd Q)]
namespace AffineAnd
open MorphismProperty
variable {X : Scheme.{u}}
local instance affineHomOverCategory (S : Scheme.{u}) :
    Category (MorphismProperty.Over
      (@IsAffineHom : MorphismProperty Scheme.{u})
      (⊤ : MorphismProperty Scheme.{u}) S) :=
  instCategoryAffine S
variable [hPbc : P.IsStableUnderBaseChange]
variable (J : Type) [SmallCategory J] [FinCategory J]
omit [P.IsStableUnderBaseChange] in
lemma essSurj_ΓProp (hQi : RingHom.RespectsIso Q) {S : Scheme.{u}} [IsAffine S] :
    (ΓProp P hQi S).EssSurj where
  mem_essImage R := by
    let X : P.Over ⊤ S := MorphismProperty.Over.mk ⊤ (Spec.map R.hom ≫ S.isoSpec.inv) <| by
      rw [P.cancel_right_of_respectsIso, HasAffineProperty.SpecMap_iff_of_affineAnd (P := P) _ hQi]
      · exact R.prop
      · infer_instance
    refine ⟨⟨X⟩, ⟨Under.isoMk (Scheme.ΓSpecIso _) ?_⟩⟩
    change (Spec.map R.hom ≫ S.isoSpec.inv).appTop ≫ (Scheme.ΓSpecIso R.right).hom =
      R.hom
    let a : Γ(S, ⊤) ⟶ Γ(Spec Γ(S, ⊤), ⊤) :=
      S.isoSpec.inv.appTop
    let b : Γ(Spec Γ(S, ⊤), ⊤) ⟶ Γ(Spec R.right, ⊤) :=
      (Spec.map R.hom).appTop
    let c : Γ(Spec R.right, ⊤) ⟶ R.right :=
      (Scheme.ΓSpecIso R.right).hom
    let d : Γ(Spec Γ(S, ⊤), ⊤) ⟶ Γ(S, ⊤) :=
      (Scheme.ΓSpecIso Γ(S, ⊤)).hom
    let r : Γ(S, ⊤) ⟶ R.right := R.hom
    have hS : a ≫ d = 𝟙 _ := by
      change S.isoSpec.inv.appTop ≫ (Scheme.ΓSpecIso Γ(S, ⊤)).hom = 𝟙 _
      rw [← Scheme.toSpecΓ_appTop, ← Scheme.Hom.comp_appTop]
      simp
    have hcomp :
        (Spec.map R.hom ≫ S.isoSpec.inv).appTop = a ≫ b :=
      Scheme.Hom.comp_appTop _ _
    have hnat : b ≫ c = d ≫ r :=
      Scheme.ΓSpecIso_naturality R.hom
    calc
      (Spec.map R.hom ≫ S.isoSpec.inv).appTop ≫ c =
          (a ≫ b) ≫ c :=
        congrArg (fun k ↦ k ≫ c) hcomp
      _ = a ≫ (b ≫ c) :=
        Category.assoc _ _ _
      _ = a ≫ (d ≫ r) :=
        congrArg (fun k ↦ a ≫ k) hnat
      _ = (a ≫ d) ≫ r :=
        (Category.assoc _ _ _).symm
      _ = 𝟙 _ ≫ r :=
        congrArg (fun k ↦ k ≫ r) hS
      _ = r := Category.id_comp _
AlgebraicGeometry.AffineAnd.isEquivalence_ΓProp
Source context 13 commands

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

@[expose] public section
universe u
open CategoryTheory Limits
namespace AlgebraicGeometry
variable {Q : ∀ {R S : Type u} [CommRing R] [CommRing S], (R →+* S) → Prop}
variable (P : MorphismProperty Scheme.{u}) [HasAffineProperty P (affineAnd Q)]
namespace AffineAnd
open MorphismProperty
variable {X : Scheme.{u}}
local instance affineHomOverCategory (S : Scheme.{u}) :
    Category (MorphismProperty.Over
      (@IsAffineHom : MorphismProperty Scheme.{u})
      (⊤ : MorphismProperty Scheme.{u}) S) :=
  instCategoryAffine S
variable [hPbc : P.IsStableUnderBaseChange]
variable (J : Type) [SmallCategory J] [FinCategory J]
omit [P.IsStableUnderBaseChange] in
lemma isEquivalence_ΓProp (hQi : RingHom.RespectsIso Q) {S : Scheme.{u}} [IsAffine S] :
    (ΓProp P hQi S).IsEquivalence where
  faithful := faithful_ΓProp ..
  full := full_ΓProp ..
  essSurj := essSurj_ΓProp ..
AlgebraicGeometry.AffineAnd.pullbackΓPropIso

Identify global sections after base change with pushout in the ring category carrying the given property.

Source context 12 commands

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

@[expose] public section
universe u
open CategoryTheory Limits
namespace AlgebraicGeometry
variable {Q : ∀ {R S : Type u} [CommRing R] [CommRing S], (R →+* S) → Prop}
variable (P : MorphismProperty Scheme.{u}) [HasAffineProperty P (affineAnd Q)]
namespace AffineAnd
open MorphismProperty
variable {X : Scheme.{u}}
local instance affineHomOverCategory (S : Scheme.{u}) :
    Category (MorphismProperty.Over
      (@IsAffineHom : MorphismProperty Scheme.{u})
      (⊤ : MorphismProperty Scheme.{u}) S) :=
  instCategoryAffine S
variable [hPbc : P.IsStableUnderBaseChange]
variable (J : Type) [SmallCategory J] [FinCategory J]
def pullbackΓPropIso [(RingHom.toMorphismProperty Q).IsStableUnderCobaseChange]
    (hQi : RingHom.RespectsIso Q) {S T : Scheme.{u}} [IsAffine S]
    [IsAffine T] (f : S ⟶ T) :
    (Over.pullback P ⊤ f).op ⋙ ΓProp P hQi S ≅
      ΓProp P hQi T ⋙ Under.pushout _ ⊤ f.appTop
AlgebraicGeometry.AffineAnd.overSpecEquivUnder

The equivalence between affine morphisms with the given property over a spectrum and the corresponding rings under the base ring.

Source context 12 commands

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

@[expose] public section
universe u
open CategoryTheory Limits
namespace AlgebraicGeometry
variable {Q : ∀ {R S : Type u} [CommRing R] [CommRing S], (R →+* S) → Prop}
variable (P : MorphismProperty Scheme.{u}) [HasAffineProperty P (affineAnd Q)]
namespace AffineAnd
open MorphismProperty
variable {X : Scheme.{u}}
local instance affineHomOverCategory (S : Scheme.{u}) :
    Category (MorphismProperty.Over
      (@IsAffineHom : MorphismProperty Scheme.{u})
      (⊤ : MorphismProperty Scheme.{u}) S) :=
  instCategoryAffine S
variable [hPbc : P.IsStableUnderBaseChange]
variable (J : Type) [SmallCategory J] [FinCategory J]
def overSpecEquivUnder (hQi : RingHom.RespectsIso Q) (R : CommRingCat.{u}) :
    (P.Over ⊤ (Spec R))ᵒᵖ ≌ (RingHom.toMorphismProperty Q).Under ⊤ R
AlgebraicGeometry.AffineAnd.overSpecEquivUnderCompPushoutIso

The spectrum-under-category equivalence identifies pushout of rings with pullback of schemes.

Source context 12 commands

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

@[expose] public section
universe u
open CategoryTheory Limits
namespace AlgebraicGeometry
variable {Q : ∀ {R S : Type u} [CommRing R] [CommRing S], (R →+* S) → Prop}
variable (P : MorphismProperty Scheme.{u}) [HasAffineProperty P (affineAnd Q)]
namespace AffineAnd
open MorphismProperty
variable {X : Scheme.{u}}
local instance affineHomOverCategory (S : Scheme.{u}) :
    Category (MorphismProperty.Over
      (@IsAffineHom : MorphismProperty Scheme.{u})
      (⊤ : MorphismProperty Scheme.{u}) S) :=
  instCategoryAffine S
variable [hPbc : P.IsStableUnderBaseChange]
variable (J : Type) [SmallCategory J] [FinCategory J]
def overSpecEquivUnderCompPushoutIso (hQi : RingHom.RespectsIso Q) {R S : CommRingCat.{u}}
    (f : R ⟶ S)
    [(RingHom.toMorphismProperty Q).IsStableUnderCobaseChange] :
    (overSpecEquivUnder P hQi R).functor ⋙
      (MorphismProperty.Under.pushout (RingHom.toMorphismProperty Q) ⊤ f) ≅
      (Over.pullback P ⊤ (Spec.map f)).op ⋙ (overSpecEquivUnder P hQi S).functor
AlgebraicGeometry.AffineAnd.preservesColimitsOfShape_pullback_iff_preservesLimitsOfShape
Source context 12 commands

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

@[expose] public section
universe u
open CategoryTheory Limits
namespace AlgebraicGeometry
variable {Q : ∀ {R S : Type u} [CommRing R] [CommRing S], (R →+* S) → Prop}
variable (P : MorphismProperty Scheme.{u}) [HasAffineProperty P (affineAnd Q)]
namespace AffineAnd
open MorphismProperty
variable {X : Scheme.{u}}
local instance affineHomOverCategory (S : Scheme.{u}) :
    Category (MorphismProperty.Over
      (@IsAffineHom : MorphismProperty Scheme.{u})
      (⊤ : MorphismProperty Scheme.{u}) S) :=
  instCategoryAffine S
variable [hPbc : P.IsStableUnderBaseChange]
variable (J : Type) [SmallCategory J] [FinCategory J]
lemma preservesColimitsOfShape_pullback_iff_preservesLimitsOfShape (hQi : RingHom.RespectsIso Q)
    {R S : CommRingCat.{u}} (f : R ⟶ S) {J : Type*} [Category J]
    [(RingHom.toMorphismProperty Q).IsStableUnderCobaseChange] :
    PreservesColimitsOfShape J (Over.pullback P ⊤ (Spec.map f)) ↔
      PreservesLimitsOfShape Jᵒᵖ
        (MorphismProperty.Under.pushout (RingHom.toMorphismProperty Q) ⊤ f)
AlgebraicGeometry.AffineAnd.preservesColimitsOfShape_pullback_of_toAffine
Source context 12 commands

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

@[expose] public section
universe u
open CategoryTheory Limits
namespace AlgebraicGeometry
variable {Q : ∀ {R S : Type u} [CommRing R] [CommRing S], (R →+* S) → Prop}
variable (P : MorphismProperty Scheme.{u}) [HasAffineProperty P (affineAnd Q)]
namespace AffineAnd
open MorphismProperty
variable {X : Scheme.{u}}
local instance affineHomOverCategory (S : Scheme.{u}) :
    Category (MorphismProperty.Over
      (@IsAffineHom : MorphismProperty Scheme.{u})
      (⊤ : MorphismProperty Scheme.{u}) S) :=
  instCategoryAffine S
variable [hPbc : P.IsStableUnderBaseChange]
variable (J : Type) [SmallCategory J] [FinCategory J]
instance preservesColimitsOfShape_pullback_of_toAffine {J : Type*} [Category J]
      {Y : Scheme.{u}} (f : X ⟶ Y)
      [PreservesColimitsOfShape J (toAffine P Y)]
      [PreservesColimitsOfShape J (Affine.pullback f)] :
    PreservesColimitsOfShape J (Over.pullback P ⊤ f)
CategoryTheory.Limits.colimit.arrowMkPostIsoOfIso

If F is naturally isomorphic to F' they induce isomorphic colimit.post maps.

Source context 13 commands

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

@[expose] public section
universe u
open CategoryTheory Limits
namespace AlgebraicGeometry
variable {Q : ∀ {R S : Type u} [CommRing R] [CommRing S], (R →+* S) → Prop}
variable (P : MorphismProperty Scheme.{u}) [HasAffineProperty P (affineAnd Q)]
namespace AffineAnd
open MorphismProperty
variable {X : Scheme.{u}}
local instance affineHomOverCategory (S : Scheme.{u}) :
    Category (MorphismProperty.Over
      (@IsAffineHom : MorphismProperty Scheme.{u})
      (⊤ : MorphismProperty Scheme.{u}) S) :=
  instCategoryAffine S
variable [hPbc : P.IsStableUnderBaseChange]
variable (J : Type) [SmallCategory J] [FinCategory J]
section
def _root_.CategoryTheory.Limits.colimit.arrowMkPostIsoOfIso {J C D : Type*} [Category J]
    [Category C] [Category D] (K : J ⥤ C) (F F' : C ⥤ D)
    (e : F ≅ F') [HasColimit K] [HasColimit (K ⋙ F)] [HasColimit (K ⋙ F')] :
    CategoryTheory.Arrow.mk (colimit.post K F) ≅ CategoryTheory.Arrow.mk (colimit.post K F')
AlgebraicGeometry.IsLocalAtTarget.iff_of_openCover_of_over
Source context 14 commands

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

@[expose] public section
universe u
open CategoryTheory Limits
namespace AlgebraicGeometry
variable {Q : ∀ {R S : Type u} [CommRing R] [CommRing S], (R →+* S) → Prop}
variable (P : MorphismProperty Scheme.{u}) [HasAffineProperty P (affineAnd Q)]
namespace AffineAnd
open MorphismProperty
variable {X : Scheme.{u}}
local instance affineHomOverCategory (S : Scheme.{u}) :
    Category (MorphismProperty.Over
      (@IsAffineHom : MorphismProperty Scheme.{u})
      (⊤ : MorphismProperty Scheme.{u}) S) :=
  instCategoryAffine S
variable [hPbc : P.IsStableUnderBaseChange]
variable (J : Type) [SmallCategory J] [FinCategory J]
section
variable (P : MorphismProperty Scheme.{u}) [IsZariskiLocalAtTarget P]
lemma _root_.AlgebraicGeometry.IsLocalAtTarget.iff_of_openCover_of_over
    {X Y S : Scheme.{u}} [X.Over S] [Y.Over S]
    (f : X ⟶ Y) [f.IsOver S] (𝒰 : S.OpenCover) :
    P f ↔ ∀ i : 𝒰.I₀,
      P (pullback.map (X ↘ S) (𝒰.f i) (Y ↘ S) (𝒰.f i) f (𝟙 _) (𝟙 _) (by simp) (by simp)) := by
  let s : X ⟶ S := X ↘ S
  let t : Y ⟶ S := Y ↘ S
  have hover : f ≫ t = s := HomIsOver.comp_over
  let a (i : 𝒰.I₀) :
      pullback f (pullback.fst t (𝒰.f i)) ≅ pullback (f ≫ t) (𝒰.f i) :=
    pullbackRightPullbackFstIso t (𝒰.f i) f
  let c (i : 𝒰.I₀) : pullback (f ≫ t) (𝒰.f i) ≅ pullback s (𝒰.f i) :=
    pullback.congrHom hover rfl
  let m (i : 𝒰.I₀) : pullback s (𝒰.f i) ⟶ pullback t (𝒰.f i) :=
    pullback.map s (𝒰.f i) t (𝒰.f i) f (𝟙 _) (𝟙 _)
      (by simpa only [Category.comp_id] using hover.symm) (by simp)
  have heq (i : 𝒰.I₀) :
      pullback.snd f (pullback.fst t (𝒰.f i)) =
        (a i).hom ≫ (c i).hom ≫ m i := by
    let u : 𝒰.X i ⟶ S := 𝒰.f i
    change pullback.snd f (pullback.fst t u) =
      (a i).hom ≫ (c i).hom ≫ m i
    have hm_fst : m i ≫ pullback.fst t u = pullback.fst s u ≫ f := by
      dsimp only [m, pullback.map, u]
      rw [pullback.lift_fst]
    have hm_snd : m i ≫ pullback.snd t u = pullback.snd s u := by
      dsimp only [m, pullback.map, u]
      rw [pullback.lift_snd, Category.comp_id]
    have hc_fst : (c i).hom ≫ pullback.fst s u = pullback.fst (f ≫ t) u := by
      dsimp only [c, pullback.congrHom, pullback.map, u]
      rw [asIso_hom, pullback.lift_fst, Category.comp_id]
    have hc_snd : (c i).hom ≫ pullback.snd s u = pullback.snd (f ≫ t) u := by
      dsimp only [c, pullback.congrHom, pullback.map, u]
      rw [asIso_hom, pullback.lift_snd, Category.comp_id]
    have ha_fst : (a i).hom ≫ pullback.fst (f ≫ t) u =
        pullback.fst f (pullback.fst t u) :=
      pullbackRightPullbackFstIso_hom_fst t u f
    have ha_snd : (a i).hom ≫ pullback.snd (f ≫ t) u =
        pullback.snd f (pullback.fst t u) ≫ pullback.snd t u :=
      pullbackRightPullbackFstIso_hom_snd t u f
    apply pullback.hom_ext
    · calc
        pullback.snd f (pullback.fst t u) ≫ pullback.fst t u =
            pullback.fst f (pullback.fst t u) ≫ f :=
          pullback.condition.symm
        _ = ((a i).hom ≫ pullback.fst (f ≫ t) u) ≫ f :=
          congrArg (fun k ↦ k ≫ f) ha_fst.symm
        _ = (a i).hom ≫ (pullback.fst (f ≫ t) u ≫ f) :=
          Category.assoc _ _ _
        _ = (a i).hom ≫ (((c i).hom ≫ pullback.fst s u) ≫ f) :=
          congrArg (fun k ↦ (a i).hom ≫ (k ≫ f)) hc_fst.symm
        _ = (a i).hom ≫ ((c i).hom ≫ (pullback.fst s u ≫ f)) :=
          congrArg (fun k ↦ (a i).hom ≫ k) (Category.assoc _ _ _)
        _ = (a i).hom ≫ ((c i).hom ≫ (m i ≫ pullback.fst t u)) :=
          congrArg (fun k ↦ (a i).hom ≫ ((c i).hom ≫ k)) hm_fst.symm
        _ = ((a i).hom ≫ (c i).hom ≫ m i) ≫ pullback.fst t u := by
          simp only [Category.assoc]
    · calc
        pullback.snd f (pullback.fst t u) ≫ pullback.snd t u =
            (a i).hom ≫ pullback.snd (f ≫ t) u :=
          ha_snd.symm
        _ = (a i).hom ≫ ((c i).hom ≫ pullback.snd s u) :=
          congrArg (fun k ↦ (a i).hom ≫ k) hc_snd.symm
        _ = (a i).hom ≫ ((c i).hom ≫ (m i ≫ pullback.snd t u)) :=
          congrArg (fun k ↦ (a i).hom ≫ ((c i).hom ≫ k)) hm_snd.symm
        _ = ((a i).hom ≫ (c i).hom ≫ m i) ≫ pullback.snd t u := by
          simp only [Category.assoc]
  refine ⟨fun hf i ↦ ?_, fun H ↦ ?_⟩
  · let _ : IsOpenImmersion (pullback.fst t (𝒰.f i)) :=
      MorphismProperty.pullback_fst t (𝒰.f i) (𝒰.map_prop i)
    have hpb : P (pullback.snd f (pullback.fst t (𝒰.f i))) :=
      IsZariskiLocalAtTarget.of_isPullback (.of_hasPullback _ _) hf
    rw [heq i] at hpb
    let ha : IsIso (a i).hom := (a i).isIso_hom
    let hc : IsIso (c i).hom := (c i).isIso_hom
    exact (P.cancel_left_of_respectsIso (c i).hom (m i)).mp
      ((P.cancel_left_of_respectsIso (a i).hom ((c i).hom ≫ m i)).mp hpb)
  · rw [IsZariskiLocalAtTarget.iff_of_openCover (P := P) (𝒰.pullback₁ (Y ↘ S))]
    have hdirect : ∀ i : 𝒰.I₀,
        P (pullback.snd f (pullback.fst t (𝒰.f i))) := by
      intro i
      let ha : IsIso (a i).hom := (a i).isIso_hom
      let hc : IsIso (c i).hom := (c i).isIso_hom
      have hm : P (m i) := by
        simpa only [m] using H i
      have hcomp : P ((a i).hom ≫ (c i).hom ≫ m i) :=
        (P.cancel_left_of_respectsIso (a i).hom ((c i).hom ≫ m i)).2
          ((P.cancel_left_of_respectsIso (c i).hom (m i)).2 hm)
      rw [heq i]
      exact hcomp
    simpa only [Scheme.Cover.pullbackHom,
      Precoverage.ZeroHypercover.pullback₁, PreZeroHypercover.pullback₁, t] using hdirect
AlgebraicGeometry.IsLocalAtTarget.left_iff_of_openCover
Source context 17 commands

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

@[expose] public section
universe u
open CategoryTheory Limits
namespace AlgebraicGeometry
variable {Q : ∀ {R S : Type u} [CommRing R] [CommRing S], (R →+* S) → Prop}
variable (P : MorphismProperty Scheme.{u}) [HasAffineProperty P (affineAnd Q)]
namespace AffineAnd
open MorphismProperty
variable {X : Scheme.{u}}
local instance affineHomOverCategory (S : Scheme.{u}) :
    Category (MorphismProperty.Over
      (@IsAffineHom : MorphismProperty Scheme.{u})
      (⊤ : MorphismProperty Scheme.{u}) S) :=
  instCategoryAffine S
variable [hPbc : P.IsStableUnderBaseChange]
variable (J : Type) [SmallCategory J] [FinCategory J]
section
variable (P : MorphismProperty Scheme.{u}) [IsZariskiLocalAtTarget P]
variable {W Q : MorphismProperty Scheme.{u}} [Q.IsMultiplicative]
variable [W.IsStableUnderBaseChange] [Q.IsStableUnderBaseChange]
variable {P} in
lemma _root_.AlgebraicGeometry.IsLocalAtTarget.left_iff_of_openCover
    {S : Scheme.{u}} {X Y : W.Over Q S} {f : X ⟶ Y} (𝒰 : S.OpenCover) :
    P f.left ↔ ∀ i : 𝒰.I₀,
      P ((MorphismProperty.Over.pullback W Q (𝒰.f i)).map f).left
AlgebraicGeometry.AffineAnd.preservesFiniteColimits_pullback
Source context 12 commands

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

@[expose] public section
universe u
open CategoryTheory Limits
namespace AlgebraicGeometry
variable {Q : ∀ {R S : Type u} [CommRing R] [CommRing S], (R →+* S) → Prop}
variable (P : MorphismProperty Scheme.{u}) [HasAffineProperty P (affineAnd Q)]
namespace AffineAnd
open MorphismProperty
variable {X : Scheme.{u}}
local instance affineHomOverCategory (S : Scheme.{u}) :
    Category (MorphismProperty.Over
      (@IsAffineHom : MorphismProperty Scheme.{u})
      (⊤ : MorphismProperty Scheme.{u}) S) :=
  instCategoryAffine S
variable [hPbc : P.IsStableUnderBaseChange]
variable (J : Type) [SmallCategory J] [FinCategory J]
theorem preservesFiniteColimits_pullback (hQi : RingHom.RespectsIso Q)
    (hQp : RingHom.HasFiniteProducts Q) (hQe : RingHom.HasEqualizers Q)
    [(RingHom.toMorphismProperty Q).IsStableUnderCobaseChange]
    [∀ (R S : CommRingCat.{u}) (f : R ⟶ S), PreservesFiniteLimits
      (Under.pushout (RingHom.toMorphismProperty Q) ⊤ f)]
    {Y : Scheme.{u}} (f : X ⟶ Y) :
    PreservesFiniteColimits (Over.pullback P ⊤ f)