awhecmu/canonical-drafter-extract-mathlib huggingface dataset:
-- Module: Mathlib.AlgebraicGeometry.AffineTransitionLimit
Goal:
I : Type u
inst : Category.{u, u} I
D : I ⥤ Scheme
c : Cone D
hc : IsLimit c
inst_1 : IsCofilteredOrEmpty I
inst_2 : ∀ {i j : I} (f : i ⟶ j), IsAffineHom (D.map f)
inst_3 : ∀ (i : I), Nonempty.{u + 1} ↥(D.obj i)
inst_4 : ∀ (i : I), CompactSpace.{u} ↥(D.obj i)
inl : IsEmpty I → Nonempty.{u + 1} ↥c.pt
inr inr₁ : Nonempty I → Nonempty.{u + 1} ↥c.pt
⊢ Nonempty.{u + 1} ↥c.pt

Tactic:
classical
  cases isEmpty_or_nonempty I
  · have e := (isLimitEquivIsTerminalOfIsEmpty _ _ hc).uniqueUpToIso specULiftZIsTerminal
    exact Nonempty.map e.inv inferInstance
  · have i := Nonempty.some ‹Nonempty I›
    have : IsCofiltered I := ⟨⟩
    let 𝒰 := (D.obj i).affineCover.finiteSubcover
    have (i' : _) : IsAffine (𝒰.X i') := inferInstanceAs (IsAffine (Spec _))
    obtain ⟨j, H⟩ :
        ∃ j : 𝒰.I₀, ∀ {i'} (f : i' ⟶ i), Nonempty ((𝒰.pullback₁ (D.map f)).X j) := by
      by_contra! H
      choose i' f hf using H
      let g (j) := IsCofiltered.infTo (insert i (Finset.univ.image i'))
        (Finset.univ.image fun j : 𝒰.I₀ ↦ ⟨_, _, by simp, by simp, f j⟩) (X := j)
      have (j : 𝒰.I₀) : IsEmpty ((𝒰.pullback₁ (D.map (g i (by simp)))).X j) := by
        let F : (𝒰.pullback₁ (D.map (g i (by simp)))).X j ⟶
            (𝒰.pullback₁ (D.map (f j))).X j :=
          pullback.map _ _ _ _ (D.map (g _ (by simp))) (𝟙 _) (𝟙 _) (by
            rw [← D.map_comp, IsCofiltered.infTo_commutes]
            · simp [g]
            · simp
            · exact Finset.mem_image_of_mem _ (Finset.mem_univ _)) (by simp)
        exact Function.isEmpty F
      obtain ⟨x, -⟩ :=
        Cover.covers (𝒰.pullback₁ (D.map (g i (by simp)))) (Nonempty.some inferInstance)
      exact (this _).elim x
    let F := Over.post D ⋙ Over.pullback (𝒰.f j) ⋙ Over.forget _
    have (i' : _) : IsAffine (F.obj i') :=
      have : IsAffineHom (pullback.snd (D.map i'.hom) (𝒰.f j)) :=
        MorphismProperty.pullback_snd _ _ inferInstance
      isAffine_of_isAffineHom (pullback.snd (D.map i'.hom) (𝒰.f j))
    have (i' : _) : Nonempty (F.obj i') := H i'.hom
    let e : F ⟶ (F ⋙ Scheme.Γ.rightOp) ⋙ Scheme.Spec := Functor.whiskerLeft F ΓSpec.adjunction.unit
    have (i : _) : IsIso (e.app i) := IsAffine.affine
    have : IsIso e := NatIso.isIso_of_isIso_app e
    let c' : LimitCone F := ⟨_, (IsLimit.postcomposeInvEquiv (asIso e) _).symm
      (isLimitOfPreserves Scheme.Spec (limit.isLimit (F ⋙ Scheme.Γ.rightOp)))⟩
    have : Nonempty c'.1.pt := by
      apply +allowSynthFailures PrimeSpectrum.instNonemptyOfNontrivial
      have (i' : _) : Nontrivial ((F ⋙ Scheme.Γ.rightOp).leftOp.obj i') := by
        apply +allowSynthFailures Scheme.component_nontrivial
        simp
      exact CommRingCat.FilteredColimits.nontrivial
        (isColimitCoconeLeftOpOfCone _ (limit.isLimit (F ⋙ Scheme.Γ.rightOp)))
    let α : F ⟶ Over.forget _ ⋙ D := Functor.whiskerRight
      (Functor.whiskerLeft (Over.post D) (Over.mapPullbackAdj (𝒰.f j)).counit) (Over.forget _)
    exact this.map (((Functor.Initial.isLimitWhiskerEquiv (Over.forget i) c).symm hc).lift
        ((Cone.postcompose α).obj c'.1))

Premises used: isEmpty_or_nonempty
-- Module: Mathlib.AlgebraicGeometry.AffineTransitionLimit
Goal:
I : Type u
inst : Category.{u, u} I
D : I ⥤ Scheme
c : Cone D
hc : IsLimit c
inst_1 : IsCofilteredOrEmpty I
inst_2 : ∀ {i j : I} (f : i ⟶ j), IsAffineHom (D.map f)
Z : (i : I) → Set ↥(D.obj i)
hZc : ∀ (i : I), IsClosed (Z i)
hZne : ∀ (i : I), (Z i).Nonempty
hZcpt : ∀ (i : I), IsCompact (Z i)
hmapsTo : ∀ {i i' : I} (f : i ⟶ i'), Set.MapsTo (⇑(D.map f)) (Z i) (Z i')
X Y : I
f : X ⟶ Y
rw :
  TopologicalSpace.Closeds.closure
      (⇑(D.map f) '' (↑{ carrier := Z X, isClosed' := ⋯ : TopologicalSpace.Closeds ↥(D.obj X) } : Set ↥(D.obj X))) ≤
    (vanishingIdeal { carrier := Z Y, isClosed' := ⋯ : TopologicalSpace.Closeds ↥(D.obj Y) }).support
⊢ vanishingIdeal { carrier := Z Y, isClosed' := ⋯ : TopologicalSpace.Closeds ↥(D.obj Y) } ≤
    (vanishingIdeal { carrier := Z X, isClosed' := ⋯ : TopologicalSpace.Closeds ↥(D.obj X) }).map (D.map f)

Tactic:
rw [map_vanishingIdeal, ← le_support_iff_le_vanishingIdeal]

Premises used: AlgebraicGeometry.Scheme.IdealSheafData.le_support_iff_le_vanishingIdeal, AlgebraicGeometry.Scheme.IdealSheafData.map_vanishingIdeal
-- Module: Mathlib.AlgebraicGeometry.AffineTransitionLimit
Goal:
I : Type u
inst : Category.{u, u} I
D : I ⥤ Scheme
c : Cone D
hc : IsLimit c
inst_1 : IsCofilteredOrEmpty I
inst_2 : ∀ {i j : I} (f : i ⟶ j), IsAffineHom (D.map f)
Z : (i : I) → Set ↥(D.obj i)
hZc : ∀ (i : I), IsClosed (Z i)
hZne : ∀ (i : I), (Z i).Nonempty
hZcpt : ∀ (i : I), IsCompact (Z i)
hmapsTo : ∀ {i i' : I} (f : i ⟶ i'), Set.MapsTo (⇑(D.map f)) (Z i) (Z i')
X Y : I
f : X ⟶ Y
⊢ TopologicalSpace.Closeds.closure
      (⇑(D.map f) '' (↑{ carrier := Z X, isClosed' := ⋯ : TopologicalSpace.Closeds ↥(D.obj X) } : Set ↥(D.obj X))) ≤
    (vanishingIdeal { carrier := Z Y, isClosed' := ⋯ : TopologicalSpace.Closeds ↥(D.obj Y) }).support

Tactic:
simpa [(hZc _).closure_subset_iff] using (hmapsTo f).subset_preimage

Premises used: Set.MapsTo.subset_preimage, IsClosed.closure_subset_iff
-- Module: Mathlib.AlgebraicGeometry.AffineTransitionLimit
Goal:
I : Type u
inst : Category.{u, u} I
D : I ⥤ Scheme
c : Cone D
hc : IsLimit c
inst_1 : IsCofilteredOrEmpty I
inst_2 : ∀ {i j : I} (f : i ⟶ j), IsAffineHom (D.map f)
Z : (i : I) → Set ↥(D.obj i)
hZc : ∀ (i : I), IsClosed (Z i)
hZne : ∀ (i : I), (Z i).Nonempty
hZcpt : ∀ (i : I), IsCompact (Z i)
hmapsTo : ∀ {i i' : I} (f : i ⟶ i'), Set.MapsTo (⇑(D.map f)) (Z i) (Z i')
x : I
⊢ (vanishingIdeal { carrier := Z x, isClosed' := ⋯ : TopologicalSpace.Closeds ↥(D.obj x) }).subschemeMap
      (vanishingIdeal { carrier := Z x, isClosed' := ⋯ : TopologicalSpace.Closeds ↥(D.obj x) }) (D.map (𝟙 x)) ⋯ =
    𝟙 (vanishingIdeal { carrier := Z x, isClosed' := ⋯ : TopologicalSpace.Closeds ↥(D.obj x) }).subscheme

Tactic:
simp [← cancel_mono (subschemeι _)]

Premises used: CategoryTheory.cancel_mono, AlgebraicGeometry.Scheme.IdealSheafData.subschemeι
-- Module: Mathlib.AlgebraicGeometry.AffineTransitionLimit
Goal:
I : Type u
inst : Category.{u, u} I
D : I ⥤ Scheme
c : Cone D
hc : IsLimit c
inst_1 : IsCofilteredOrEmpty I
inst_2 : ∀ {i j : I} (f : i ⟶ j), IsAffineHom (D.map f)
Z : (i : I) → Set ↥(D.obj i)
hZc : ∀ (i : I), IsClosed (Z i)
hZne : ∀ (i : I), (Z i).Nonempty
hZcpt : ∀ (i : I), IsCompact (Z i)
hmapsTo : ∀ {i i' : I} (f : i ⟶ i'), Set.MapsTo (⇑(D.map f)) (Z i) (Z i')
X Y Z_1 : I
x : X ⟶ Y
x_1 : Y ⟶ Z_1
⊢ (vanishingIdeal { carrier := Z X, isClosed' := ⋯ : TopologicalSpace.Closeds ↥(D.obj X) }).subschemeMap
      (vanishingIdeal { carrier := Z Z_1, isClosed' := ⋯ : TopologicalSpace.Closeds ↥(D.obj Z_1) }) (D.map (x ≫ x_1))
      ⋯ =
    (vanishingIdeal { carrier := Z X, isClosed' := ⋯ : TopologicalSpace.Closeds ↥(D.obj X) }).subschemeMap
        (vanishingIdeal { carrier := Z Y, isClosed' := ⋯ : TopologicalSpace.Closeds ↥(D.obj Y) }) (D.map x) ⋯ ≫
      (vanishingIdeal { carrier := Z Y, isClosed' := ⋯ }).subschemeMap
        (vanishingIdeal { carrier := Z Z_1, isClosed' := ⋯ }) (D.map x_1) ⋯

Tactic:
simp [← cancel_mono (subschemeι _)]

Premises used: CategoryTheory.cancel_mono, AlgebraicGeometry.Scheme.IdealSheafData.subschemeι
-- Module: Mathlib.AlgebraicGeometry.AffineTransitionLimit
Goal:
I : Type u
inst : Category.{u, u} I
D : I ⥤ Scheme
c : Cone D
hc : IsLimit c
inst_1 : IsCofilteredOrEmpty I
inst_2 : ∀ {i j : I} (f : i ⟶ j), IsAffineHom (D.map f)
Z : (i : I) → Set ↥(D.obj i)
hZc : ∀ (i : I), IsClosed (Z i)
hZne : ∀ (i : I), (Z i).Nonempty
hZcpt : ∀ (i : I), IsCompact (Z i)
hmapsTo : ∀ {i i' : I} (f : i ⟶ i'), Set.MapsTo (⇑(D.map f)) (Z i) (Z i')
D' : I ⥤ Scheme :=
  {
    obj := fun (i : I) ↦
      (vanishingIdeal { carrier := Z i, isClosed' := ⋯ : TopologicalSpace.Closeds ↥(D.obj i) }).subscheme,
    map := fun {X Y : I} (f : X ⟶ Y) ↦
      (vanishingIdeal { carrier := Z X, isClosed' := ⋯ }).subschemeMap
        (vanishingIdeal { carrier := Z Y, isClosed' := ⋯ }) (D.map f) ⋯,
    map_id := ⋯, map_comp := ⋯ }
x x_1 : I
x_2 : x ⟶ x_1
⊢ D'.map x_2 ≫
      (vanishingIdeal { carrier := Z x_1, isClosed' := ⋯ : TopologicalSpace.Closeds ↥(D.obj x_1) }).subschemeι =
    (vanishingIdeal { carrier := Z x, isClosed' := ⋯ : TopologicalSpace.Closeds ↥(D.obj x) }).subschemeι ≫ D.map x_2

Tactic:
simp [D']
-- Module: Mathlib.AlgebraicGeometry.AffineTransitionLimit
Goal:
I : Type u
inst : Category.{u, u} I
D : I ⥤ Scheme
c : Cone D
hc : IsLimit c
inst_1 : IsCofilteredOrEmpty I
inst_2 : ∀ {i j : I} (f : i ⟶ j), IsAffineHom (D.map f)
Z : (i : I) → Set ↥(D.obj i)
hZc : ∀ (i : I), IsClosed (Z i)
hZne : ∀ (i : I), (Z i).Nonempty
hZcpt : ∀ (i : I), IsCompact (Z i)
hmapsTo : ∀ {i i' : I} (f : i ⟶ i'), Set.MapsTo (⇑(D.map f)) (Z i) (Z i')
D' : I ⥤ Scheme :=
  {
    obj := fun (i : I) ↦
      (vanishingIdeal { carrier := Z i, isClosed' := ⋯ : TopologicalSpace.Closeds ↥(D.obj i) }).subscheme,
    map := fun {X Y : I} (f : X ⟶ Y) ↦
      (vanishingIdeal { carrier := Z X, isClosed' := ⋯ }).subschemeMap
        (vanishingIdeal { carrier := Z Y, isClosed' := ⋯ }) (D.map f) ⋯,
    map_id := ⋯, map_comp := ⋯ }
ι : D' ⟶ D := { app := fun (i : I) ↦ (vanishingIdeal { carrier := Z i, isClosed' := ⋯ }).subschemeι, naturality := ⋯ }
i j : I
f : i ⟶ j
suffices : IsAffineHom (D'.map f ≫ ι.app j)
⊢ IsAffineHom (D'.map f)

Tactic:
suffices IsAffineHom (D'.map f ≫ ι.app j) from .of_comp _ (ι.app j)
-- Module: Mathlib.AlgebraicGeometry.AffineTransitionLimit
Goal:
I : Type u
inst : Category.{u, u} I
D : I ⥤ Scheme
c : Cone D
hc : IsLimit c
inst_1 : IsCofilteredOrEmpty I
inst_2 : ∀ {i j : I} (f : i ⟶ j), IsAffineHom (D.map f)
Z : (i : I) → Set ↥(D.obj i)
hZc : ∀ (i : I), IsClosed (Z i)
hZne : ∀ (i : I), (Z i).Nonempty
hZcpt : ∀ (i : I), IsCompact (Z i)
hmapsTo : ∀ {i i' : I} (f : i ⟶ i'), Set.MapsTo (⇑(D.map f)) (Z i) (Z i')
D' : I ⥤ Scheme :=
  {
    obj := fun (i : I) ↦
      (vanishingIdeal { carrier := Z i, isClosed' := ⋯ : TopologicalSpace.Closeds ↥(D.obj i) }).subscheme,
    map := fun {X Y : I} (f : X ⟶ Y) ↦
      (vanishingIdeal { carrier := Z X, isClosed' := ⋯ }).subschemeMap
        (vanishingIdeal { carrier := Z Y, isClosed' := ⋯ }) (D.map f) ⋯,
    map_id := ⋯, map_comp := ⋯ }
ι : D' ⟶ D := { app := fun (i : I) ↦ (vanishingIdeal { carrier := Z i, isClosed' := ⋯ }).subschemeι, naturality := ⋯ }
i j : I
f : i ⟶ j
simp :
  IsAffineHom
    ((vanishingIdeal { carrier := Z i, isClosed' := ⋯ : TopologicalSpace.Closeds ↥(D.obj i) }).subschemeι ≫ D.map f)
⊢ IsAffineHom (D'.map f ≫ ι.app j)

Tactic:
simp only [subschemeMap_subschemeι, D', ι]

Premises used: AlgebraicGeometry.Scheme.IdealSheafData.subschemeMap_subschemeι
-- Module: Mathlib.AlgebraicGeometry.AffineTransitionLimit
Goal:
I : Type u
inst : Category.{u, u} I
D : I ⥤ Scheme
c : Cone D
hc : IsLimit c
inst_1 : IsCofilteredOrEmpty I
inst_2 : ∀ {i j : I} (f : i ⟶ j), IsAffineHom (D.map f)
Z : (i : I) → Set ↥(D.obj i)
hZc : ∀ (i : I), IsClosed (Z i)
hZne : ∀ (i : I), (Z i).Nonempty
hZcpt : ∀ (i : I), IsCompact (Z i)
hmapsTo : ∀ {i i' : I} (f : i ⟶ i'), Set.MapsTo (⇑(D.map f)) (Z i) (Z i')
D' : I ⥤ Scheme :=
  {
    obj := fun (i : I) ↦
      (vanishingIdeal { carrier := Z i, isClosed' := ⋯ : TopologicalSpace.Closeds ↥(D.obj i) }).subscheme,
    map := fun {X Y : I} (f : X ⟶ Y) ↦
      (vanishingIdeal { carrier := Z X, isClosed' := ⋯ }).subschemeMap
        (vanishingIdeal { carrier := Z Y, isClosed' := ⋯ }) (D.map f) ⋯,
    map_id := ⋯, map_comp := ⋯ }
ι : D' ⟶ D := { app := fun (i : I) ↦ (vanishingIdeal { carrier := Z i, isClosed' := ⋯ }).subschemeι, naturality := ⋯ }
i j : I
f : i ⟶ j
⊢ IsAffineHom
    ((vanishingIdeal { carrier := Z i, isClosed' := ⋯ : TopologicalSpace.Closeds ↥(D.obj i) }).subschemeι ≫ D.map f)

Tactic:
infer_instance
-- Module: Mathlib.AlgebraicGeometry.AffineTransitionLimit
Goal:
I : Type u
inst : Category.{u, u} I
D : I ⥤ Scheme
c : Cone D
hc : IsLimit c
inst_1 : IsCofilteredOrEmpty I
inst_2 : ∀ {i j : I} (f : i ⟶ j), IsAffineHom (D.map f)
Z : (i : I) → Set ↥(D.obj i)
hZc : ∀ (i : I), IsClosed (Z i)
hZne : ∀ (i : I), (Z i).Nonempty
hZcpt : ∀ (i : I), IsCompact (Z i)
hmapsTo : ∀ {i i' : I} (f : i ⟶ i'), Set.MapsTo (⇑(D.map f)) (Z i) (Z i')
D' : I ⥤ Scheme :=
  {
    obj := fun (i : I) ↦
      (vanishingIdeal { carrier := Z i, isClosed' := ⋯ : TopologicalSpace.Closeds ↥(D.obj i) }).subscheme,
    map := fun {X Y : I} (f : X ⟶ Y) ↦
      (vanishingIdeal { carrier := Z X, isClosed' := ⋯ }).subschemeMap
        (vanishingIdeal { carrier := Z Y, isClosed' := ⋯ }) (D.map f) ⋯,
    map_id := ⋯, map_comp := ⋯ }
ι : D' ⟶ D := { app := fun (i : I) ↦ (vanishingIdeal { carrier := Z i, isClosed' := ⋯ }).subschemeι, naturality := ⋯ }
⊢ ∀ {i j : I} (f : i ⟶ j), IsAffineHom (D'.map f)

Tactic:
haveI {i j} (f : i ⟶ j) : IsAffineHom (D'.map f) := by
    suffices IsAffineHom (D'.map f ≫ ι.app j) from .of_comp _ (ι.app j)
    simp only [subschemeMap_subschemeι, D', ι]
    infer_instance
-- Module: Mathlib.AlgebraicGeometry.AffineTransitionLimit
Goal:
I : Type u
inst : Category.{u, u} I
D : I ⥤ Scheme
c : Cone D
hc : IsLimit c
inst_1 : IsCofilteredOrEmpty I
inst_2 : ∀ {i j : I} (f : i ⟶ j), IsAffineHom (D.map f)
Z : (i : I) → Set ↥(D.obj i)
hZc : ∀ (i : I), IsClosed (Z i)
hZne : ∀ (i : I), (Z i).Nonempty
hZcpt : ∀ (i : I), IsCompact (Z i)
hmapsTo : ∀ {i i' : I} (f : i ⟶ i'), Set.MapsTo (⇑(D.map f)) (Z i) (Z i')
D' : I ⥤ Scheme :=
  {
    obj := fun (i : I) ↦
      (vanishingIdeal { carrier := Z i, isClosed' := ⋯ : TopologicalSpace.Closeds ↥(D.obj i) }).subscheme,
    map := fun {X Y : I} (f : X ⟶ Y) ↦
      (vanishingIdeal { carrier := Z X, isClosed' := ⋯ }).subschemeMap
        (vanishingIdeal { carrier := Z Y, isClosed' := ⋯ }) (D.map f) ⋯,
    map_id := ⋯, map_comp := ⋯ }
ι : D' ⟶ D := { app := fun (i : I) ↦ (vanishingIdeal { carrier := Z i, isClosed' := ⋯ }).subschemeι, naturality := ⋯ }
this : ∀ {i j : I} (f : i ⟶ j), IsAffineHom (D'.map f)
⊢ ∀ (i : I), Nonempty.{u + 1} ↥(D'.obj i)

Tactic:
haveI _ (i) : Nonempty (D'.obj i) := Set.nonempty_coe_sort.mpr (hZne i)
-- Module: Mathlib.AlgebraicGeometry.AffineTransitionLimit
Goal:
I : Type u
inst : Category.{u, u} I
D : I ⥤ Scheme
c : Cone D
hc : IsLimit c
inst_1 : IsCofilteredOrEmpty I
inst_2 : ∀ {i j : I} (f : i ⟶ j), IsAffineHom (D.map f)
Z : (i : I) → Set ↥(D.obj i)
hZc : ∀ (i : I), IsClosed (Z i)
hZne : ∀ (i : I), (Z i).Nonempty
hZcpt : ∀ (i : I), IsCompact (Z i)
hmapsTo : ∀ {i i' : I} (f : i ⟶ i'), Set.MapsTo (⇑(D.map f)) (Z i) (Z i')
D' : I ⥤ Scheme :=
  {
    obj := fun (i : I) ↦
      (vanishingIdeal { carrier := Z i, isClosed' := ⋯ : TopologicalSpace.Closeds ↥(D.obj i) }).subscheme,
    map := fun {X Y : I} (f : X ⟶ Y) ↦
      (vanishingIdeal { carrier := Z X, isClosed' := ⋯ }).subschemeMap
        (vanishingIdeal { carrier := Z Y, isClosed' := ⋯ }) (D.map f) ⋯,
    map_id := ⋯, map_comp := ⋯ }
ι : D' ⟶ D := { app := fun (i : I) ↦ (vanishingIdeal { carrier := Z i, isClosed' := ⋯ }).subschemeι, naturality := ⋯ }
this : ∀ {i j : I} (f : i ⟶ j), IsAffineHom (D'.map f)
h : ∀ (i : I), Nonempty.{u + 1} ↥(D'.obj i)
⊢ ∀ (i : I), CompactSpace.{u} ↥(D'.obj i)

Tactic:
haveI _ (i) : CompactSpace (D'.obj i) := isCompact_iff_compactSpace.mp (hZcpt i)
-- Module: Mathlib.AlgebraicGeometry.AffineTransitionLimit
Goal:
I : Type u
inst : Category.{u, u} I
D : I ⥤ Scheme
c : Cone D
hc : IsLimit c
inst_1 : IsCofilteredOrEmpty I
inst_2 : ∀ {i j : I} (f : i ⟶ j), IsAffineHom (D.map f)
Z : (i : I) → Set ↥(D.obj i)
hZc : ∀ (i : I), IsClosed (Z i)
hZne : ∀ (i : I), (Z i).Nonempty
hZcpt : ∀ (i : I), IsCompact (Z i)
hmapsTo : ∀ {i i' : I} (f : i ⟶ i'), Set.MapsTo (⇑(D.map f)) (Z i) (Z i')
D' : I ⥤ Scheme :=
  {
    obj := fun (i : I) ↦
      (vanishingIdeal { carrier := Z i, isClosed' := ⋯ : TopologicalSpace.Closeds ↥(D.obj i) }).subscheme,
    map := fun {X Y : I} (f : X ⟶ Y) ↦
      (vanishingIdeal { carrier := Z X, isClosed' := ⋯ }).subschemeMap
        (vanishingIdeal { carrier := Z Y, isClosed' := ⋯ }) (D.map f) ⋯,
    map_id := ⋯, map_comp := ⋯ }
ι : D' ⟶ D := { app := fun (i : I) ↦ (vanishingIdeal { carrier := Z i, isClosed' := ⋯ }).subschemeι, naturality := ⋯ }
this : ∀ {i j : I} (f : i ⟶ j), IsAffineHom (D'.map f)
h : ∀ (i : I), Nonempty.{u + 1} ↥(D'.obj i)
h_1 : ∀ (i : I), CompactSpace.{u} ↥(D'.obj i)
i : I
⊢ vanishingIdeal { carrier := Z i, isClosed' := ⋯ : TopologicalSpace.Closeds ↥(D.obj i) } ≤
    map
      (⨆ (i : I),
        (vanishingIdeal { carrier := Z i, isClosed' := ⋯ : TopologicalSpace.Closeds ↥(D.obj i) }).comap (c.π.app i))
      (c.π.app i)

Tactic:
simp [le_map_iff_comap_le, le_iSup_of_le i]

Premises used: AlgebraicGeometry.Scheme.IdealSheafData.le_map_iff_comap_le, le_iSup_of_le
-- Module: Mathlib.AlgebraicGeometry.AffineTransitionLimit
Goal:
I : Type u
inst : Category.{u, u} I
D : I ⥤ Scheme
c : Cone D
hc : IsLimit c
inst_1 : IsCofilteredOrEmpty I
inst_2 : ∀ {i j : I} (f : i ⟶ j), IsAffineHom (D.map f)
Z : (i : I) → Set ↥(D.obj i)
hZc : ∀ (i : I), IsClosed (Z i)
hZne : ∀ (i : I), (Z i).Nonempty
hZcpt : ∀ (i : I), IsCompact (Z i)
hmapsTo : ∀ {i i' : I} (f : i ⟶ i'), Set.MapsTo (⇑(D.map f)) (Z i) (Z i')
D' : I ⥤ Scheme :=
  {
    obj := fun (i : I) ↦
      (vanishingIdeal { carrier := Z i, isClosed' := ⋯ : TopologicalSpace.Closeds ↥(D.obj i) }).subscheme,
    map := fun {X Y : I} (f : X ⟶ Y) ↦
      (vanishingIdeal { carrier := Z X, isClosed' := ⋯ }).subschemeMap
        (vanishingIdeal { carrier := Z Y, isClosed' := ⋯ }) (D.map f) ⋯,
    map_id := ⋯, map_comp := ⋯ }
ι : D' ⟶ D := { app := fun (i : I) ↦ (vanishingIdeal { carrier := Z i, isClosed' := ⋯ }).subschemeι, naturality := ⋯ }
this : ∀ {i j : I} (f : i ⟶ j), IsAffineHom (D'.map f)
h : ∀ (i : I), Nonempty.{u + 1} ↥(D'.obj i)
h_1 : ∀ (i : I), CompactSpace.{u} ↥(D'.obj i)
i j : I
f : i ⟶ j
⊢ Eq (α :=
    Functor.obj
        (Functor.obj (Functor.const I)
          (subscheme (X := c.1)
            (⨆ (i : I),
              (vanishingIdeal { carrier := Z i, isClosed' := ⋯ : TopologicalSpace.Closeds ↥(D.obj i) }).comap
                (c.π.app i))))
        i ⟶
      D'.obj j)
    (CategoryTheory.Functor.map
        (Functor.obj (Functor.const I)
          (subscheme (X := c.1)
            (⨆ (i : I),
              (vanishingIdeal { carrier := Z i, isClosed' := ⋯ : TopologicalSpace.Closeds ↥(D.obj i) }).comap
                (c.π.app i))))
        f ≫
      subschemeMap
        (⨆ (i : I),
          (vanishingIdeal { carrier := Z i, isClosed' := ⋯ : TopologicalSpace.Closeds ↥(D.obj i) }).comap (c.π.app i))
        (vanishingIdeal { carrier := Z j, isClosed' := ⋯ }) (c.π.app j) ⋯)
    (subschemeMap
        (⨆ (i : I),
          (vanishingIdeal { carrier := Z i, isClosed' := ⋯ : TopologicalSpace.Closeds ↥(D.obj i) }).comap (c.π.app i))
        (vanishingIdeal { carrier := Z i, isClosed' := ⋯ }) (c.π.app i) ⋯ ≫
      D'.map f)

Tactic:
simp [D', ← cancel_mono (subschemeι _)]

Premises used: CategoryTheory.cancel_mono, AlgebraicGeometry.Scheme.IdealSheafData.subschemeι
-- Module: Mathlib.AlgebraicGeometry.AffineTransitionLimit
Goal:
I : Type u
inst : Category.{u, u} I
D : I ⥤ Scheme
c : Cone D
hc : IsLimit c
inst_1 : IsCofilteredOrEmpty I
inst_2 : ∀ {i j : I} (f : i ⟶ j), IsAffineHom (D.map f)
Z : (i : I) → Set ↥(D.obj i)
hZc : ∀ (i : I), IsClosed (Z i)
hZne : ∀ (i : I), (Z i).Nonempty
hZcpt : ∀ (i : I), IsCompact (Z i)
hmapsTo : ∀ {i i' : I} (f : i ⟶ i'), Set.MapsTo (⇑(D.map f)) (Z i) (Z i')
D' : I ⥤ Scheme :=
  {
    obj := fun (i : I) ↦
      (vanishingIdeal { carrier := Z i, isClosed' := ⋯ : TopologicalSpace.Closeds ↥(D.obj i) }).subscheme,
    map := fun {X Y : I} (f : X ⟶ Y) ↦
      (vanishingIdeal { carrier := Z X, isClosed' := ⋯ }).subschemeMap
        (vanishingIdeal { carrier := Z Y, isClosed' := ⋯ }) (D.map f) ⋯,
    map_id := ⋯, map_comp := ⋯ }
ι : D' ⟶ D := { app := fun (i : I) ↦ (vanishingIdeal { carrier := Z i, isClosed' := ⋯ }).subschemeι, naturality := ⋯ }
this_1 : ∀ {i j : I} (f : i ⟶ j), IsAffineHom (D'.map f)
h : ∀ (i : I), Nonempty.{u + 1} ↥(D'.obj i)
h_1 : ∀ (i : I), CompactSpace.{u} ↥(D'.obj i)
c' : Cone D' :=
  {
    pt :=
      subscheme (X := c.1)
        (⨆ (i : I),
          (vanishingIdeal { carrier := Z i, isClosed' := ⋯ : TopologicalSpace.Closeds ↥(D.obj i) }).comap (c.π.app i)),
    π :=
      {
        app := fun (i : I) ↦
          subschemeMap
            (⨆ (i : I),
              (vanishingIdeal { carrier := Z i, isClosed' := ⋯ : TopologicalSpace.Closeds ↥(D.obj i) }).comap
                (c.π.app i))
            (vanishingIdeal { carrier := Z i, isClosed' := ⋯ }) (c.π.app i) ⋯,
        naturality := ⋯ } }
s : Cone D'
this :
  ∀ (i : I),
    vanishingIdeal { carrier := Z i, isClosed' := ⋯ : TopologicalSpace.Closeds ↥(D.obj i) } ≤
      Scheme.Hom.ker (s.π.app i ≫ ι.app i)
⊢ Scheme.Hom.ker (X := c'.pt)
      (subschemeι
        (⨆ (i : I),
          (vanishingIdeal { carrier := Z i, isClosed' := ⋯ : TopologicalSpace.Closeds ↥(D.obj i) }).comap
            (c.π.app i))) ≤
    Scheme.Hom.ker (X := s.pt) (hc.lift ((Cone.postcompose ι).obj s) : ((Cone.postcompose ι).obj s).pt ⟶ c.pt)

Tactic:
simpa [← le_map_iff_comap_le, ← Scheme.Hom.ker_comp]

Premises used: AlgebraicGeometry.Scheme.IdealSheafData.le_map_iff_comap_le, AlgebraicGeometry.Scheme.Hom.ker_comp
-- Module: Mathlib.AlgebraicGeometry.AffineTransitionLimit
Goal:
I : Type u
inst : Category.{u, u} I
D : I ⥤ Scheme
c : Cone D
hc : IsLimit c
inst_1 : IsCofilteredOrEmpty I
inst_2 : ∀ {i j : I} (f : i ⟶ j), IsAffineHom (D.map f)
Z : (i : I) → Set ↥(D.obj i)
hZc : ∀ (i : I), IsClosed (Z i)
hZne : ∀ (i : I), (Z i).Nonempty
hZcpt : ∀ (i : I), IsCompact (Z i)
hmapsTo : ∀ {i i' : I} (f : i ⟶ i'), Set.MapsTo (⇑(D.map f)) (Z i) (Z i')
D' : I ⥤ Scheme :=
  {
    obj := fun (i : I) ↦
      (vanishingIdeal { carrier := Z i, isClosed' := ⋯ : TopologicalSpace.Closeds ↥(D.obj i) }).subscheme,
    map := fun {X Y : I} (f : X ⟶ Y) ↦
      (vanishingIdeal { carrier := Z X, isClosed' := ⋯ }).subschemeMap
        (vanishingIdeal { carrier := Z Y, isClosed' := ⋯ }) (D.map f) ⋯,
    map_id := ⋯, map_comp := ⋯ }
ι : D' ⟶ D := { app := fun (i : I) ↦ (vanishingIdeal { carrier := Z i, isClosed' := ⋯ }).subschemeι, naturality := ⋯ }
this : ∀ {i j : I} (f : i ⟶ j), IsAffineHom (D'.map f)
h : ∀ (i : I), Nonempty.{u + 1} ↥(D'.obj i)
h_1 : ∀ (i : I), CompactSpace.{u} ↥(D'.obj i)
c' : Cone D' :=
  {
    pt :=
      subscheme (X := c.1)
        (⨆ (i : I),
          (vanishingIdeal { carrier := Z i, isClosed' := ⋯ : TopologicalSpace.Closeds ↥(D.obj i) }).comap (c.π.app i)),
    π :=
      {
        app := fun (i : I) ↦
          subschemeMap
            (⨆ (i : I),
              (vanishingIdeal { carrier := Z i, isClosed' := ⋯ : TopologicalSpace.Closeds ↥(D.obj i) }).comap
                (c.π.app i))
            (vanishingIdeal { carrier := Z i, isClosed' := ⋯ }) (c.π.app i) ⋯,
        naturality := ⋯ } }
s : Cone D'
suffices :
  ∀ (i : I),
    vanishingIdeal { carrier := Z i, isClosed' := ⋯ : TopologicalSpace.Closeds ↥(D.obj i) } ≤
      Scheme.Hom.ker (s.π.app i ≫ ι.app i)
⊢ Scheme.Hom.ker (X := c'.pt)
      (subschemeι
        (⨆ (i : I),
          (vanishingIdeal { carrier := Z i, isClosed' := ⋯ : TopologicalSpace.Closeds ↥(D.obj i) }).comap
            (c.π.app i))) ≤
    Scheme.Hom.ker (X := s.pt) (hc.lift ((Cone.postcompose ι).obj s) : ((Cone.postcompose ι).obj s).pt ⟶ c.pt)

Tactic:
suffices ∀ i, vanishingIdeal ⟨Z i, hZc i⟩ ≤ (s.π.app i ≫ ι.app i).ker by
        simpa [← le_map_iff_comap_le, ← Scheme.Hom.ker_comp]