Theorem: AlgebraicGeometry.AffineTargetMorphismProperty.IsLocal.affine_target_iff
File: Mathlib/AlgebraicGeometry/Morphisms/Basic.lean

tactic: haveI : ∀ i, IsAffine (Scheme.OpenCover.obj (Scheme.openCoverOfIsIso (𝟙 Y)) i) := fun i => by
  dsimp; infer_instance
state_before: P : AffineTargetMorphismProperty
hP : P.IsLocal
X Y : Scheme
f : X ⟶ Y
inst✝ : IsAffine Y
⊢ targetAffineLocally P f ↔ P f
state_after: P : AffineTargetMorphismProperty
hP : P.IsLocal
X Y : Scheme
f : X ⟶ Y
inst✝ : IsAffine Y
this : ∀ (i : (Scheme.openCoverOfIsIso (𝟙 Y)).J), IsAffine ((Scheme.openCoverOfIsIso (𝟙 Y)).obj i)
⊢ targetAffineLocally P f ↔ P f

tactic: rw [hP.affine_openCover_iff f (Scheme.openCoverOfIsIso (𝟙 Y))]
state_before: P : AffineTargetMorphismProperty
hP : P.IsLocal
X Y : Scheme
f : X ⟶ Y
inst✝ : IsAffine Y
this : ∀ (i : (Scheme.openCoverOfIsIso (𝟙 Y)).J), IsAffine ((Scheme.openCoverOfIsIso (𝟙 Y)).obj i)
⊢ targetAffineLocally P f ↔ P f
state_after: P : AffineTargetMorphismProperty
hP : P.IsLocal
X Y : Scheme
f : X ⟶ Y
inst✝ : IsAffine Y
this : ∀ (i : (Scheme.openCoverOfIsIso (𝟙 Y)).J), IsAffine ((Scheme.openCoverOfIsIso (𝟙 Y)).obj i)
⊢ (∀ (i : (Scheme.openCoverOfIsIso (𝟙 Y)).J), P pullback.snd) ↔ P f

tactic: trans P (pullback.snd : pullback f (𝟙 _) ⟶ _)
state_before: P : AffineTargetMorphismProperty
hP : P.IsLocal
X Y : Scheme
f : X ⟶ Y
inst✝ : IsAffine Y
this : ∀ (i : (Scheme.openCoverOfIsIso (𝟙 Y)).J), IsAffine ((Scheme.openCoverOfIsIso (𝟙 Y)).obj i)
⊢ (∀ (i : (Scheme.openCoverOfIsIso (𝟙 Y)).J), P pullback.snd) ↔ P f
state_after: P : AffineTargetMorphismProperty
hP : P.IsLocal
X Y : Scheme
f : X ⟶ Y
inst✝ : IsAffine Y
this : ∀ (i : (Scheme.openCoverOfIsIso (𝟙 Y)).J), IsAffine ((Scheme.openCoverOfIsIso (𝟙 Y)).obj i)
⊢ (∀ (i : (Scheme.openCoverOfIsIso (𝟙 Y)).J), P pullback.snd) ↔ P pullback.snd

P : AffineTargetMorphismProperty
hP : P.IsLocal
X Y : Scheme
f : X ⟶ Y
inst✝ : IsAffine Y
this : ∀ (i : (Scheme.openCoverOfIsIso (𝟙 Y)).J), IsAffine ((Scheme.openCoverOfIsIso (𝟙 Y)).obj i)
⊢ P pullback.snd ↔ P f

tactic: rw [← Category.comp_id pullback.snd, ← pullback.condition, affine_cancel_left_isIso hP.1]
state_before: P : AffineTargetMorphismProperty
hP : P.IsLocal
X Y : Scheme
f : X ⟶ Y
inst✝ : IsAffine Y
this : ∀ (i : (Scheme.openCoverOfIsIso (𝟙 Y)).J), IsAffine ((Scheme.openCoverOfIsIso (𝟙 Y)).obj i)
⊢ P pullback.snd ↔ P f
state_after: no goals

tactic: dsimp
state_before: P : AffineTargetMorphismProperty
hP : P.IsLocal
X Y : Scheme
f : X ⟶ Y
inst✝ : IsAffine Y
i : (Scheme.openCoverOfIsIso (𝟙 Y)).J
⊢ IsAffine ((Scheme.openCoverOfIsIso (𝟙 Y)).obj i)
state_after: P : AffineTargetMorphismProperty
hP : P.IsLocal
X Y : Scheme
f : X ⟶ Y
inst✝ : IsAffine Y
i : (Scheme.openCoverOfIsIso (𝟙 Y)).J
⊢ IsAffine Y

tactic: infer_instance
state_before: P : AffineTargetMorphismProperty
hP : P.IsLocal
X Y : Scheme
f : X ⟶ Y
inst✝ : IsAffine Y
i : (Scheme.openCoverOfIsIso (𝟙 Y)).J
⊢ IsAffine Y
state_after: no goals

tactic: exact ⟨fun H => H PUnit.unit, fun H _ => H⟩
state_before: P : AffineTargetMorphismProperty
hP : P.IsLocal
X Y : Scheme
f : X ⟶ Y
inst✝ : IsAffine Y
this : ∀ (i : (Scheme.openCoverOfIsIso (𝟙 Y)).J), IsAffine ((Scheme.openCoverOfIsIso (𝟙 Y)).obj i)
⊢ (∀ (i : (Scheme.openCoverOfIsIso (𝟙 Y)).J), P pullback.snd) ↔ P pullback.snd
state_after: no goals