Theorem: AlgebraicGeometry.diagonal_targetAffineLocally_of_openCover
File: Mathlib/AlgebraicGeometry/Morphisms/Constructors.lean

tactic: let 𝒱 := (Scheme.Pullback.openCoverOfBase 𝒰 f f).bind fun i =>
  Scheme.Pullback.openCoverOfLeftRight.{u} (𝒰' i) (𝒰' i) pullback.snd pullback.snd
state_before: P : AffineTargetMorphismProperty
hP : P.IsLocal
X Y : Scheme
f : X ⟶ Y
𝒰 : Y.OpenCover
inst✝¹ : ∀ (i : 𝒰.J), IsAffine (𝒰.obj i)
𝒰' : (i : 𝒰.J) → (pullback f (𝒰.map i)).OpenCover
inst✝ : ∀ (i : 𝒰.J) (j : (𝒰' i).J), IsAffine ((𝒰' i).obj j)
h𝒰' : ∀ (i : 𝒰.J) (j k : (𝒰' i).J), P (pullback.mapDesc ((𝒰' i).map j) ((𝒰' i).map k) pullback.snd)
⊢ (targetAffineLocally P).diagonal f
state_after: P : AffineTargetMorphismProperty
hP : P.IsLocal
X Y : Scheme
f : X ⟶ Y
𝒰 : Y.OpenCover
inst✝¹ : ∀ (i : 𝒰.J), IsAffine (𝒰.obj i)
𝒰' : (i : 𝒰.J) → (pullback f (𝒰.map i)).OpenCover
inst✝ : ∀ (i : 𝒰.J) (j : (𝒰' i).J), IsAffine ((𝒰' i).obj j)
h𝒰' : ∀ (i : 𝒰.J) (j k : (𝒰' i).J), P (pullback.mapDesc ((𝒰' i).map j) ((𝒰' i).map k) pullback.snd)
𝒱 : (pullback f f).OpenCover :=
  (Scheme.Pullback.openCoverOfBase 𝒰 f f).bind fun i =>
    Scheme.Pullback.openCoverOfLeftRight (𝒰' i) (𝒰' i) pullback.snd pullback.snd
⊢ (targetAffineLocally P).diagonal f

tactic: have i1 : ∀ i, IsAffine (𝒱.obj i) := fun i => by dsimp [𝒱]; infer_instance
state_before: P : AffineTargetMorphismProperty
hP : P.IsLocal
X Y : Scheme
f : X ⟶ Y
𝒰 : Y.OpenCover
inst✝¹ : ∀ (i : 𝒰.J), IsAffine (𝒰.obj i)
𝒰' : (i : 𝒰.J) → (pullback f (𝒰.map i)).OpenCover
inst✝ : ∀ (i : 𝒰.J) (j : (𝒰' i).J), IsAffine ((𝒰' i).obj j)
h𝒰' : ∀ (i : 𝒰.J) (j k : (𝒰' i).J), P (pullback.mapDesc ((𝒰' i).map j) ((𝒰' i).map k) pullback.snd)
𝒱 : (pullback f f).OpenCover :=
  (Scheme.Pullback.openCoverOfBase 𝒰 f f).bind fun i =>
    Scheme.Pullback.openCoverOfLeftRight (𝒰' i) (𝒰' i) pullback.snd pullback.snd
⊢ (targetAffineLocally P).diagonal f
state_after: P : AffineTargetMorphismProperty
hP : P.IsLocal
X Y : Scheme
f : X ⟶ Y
𝒰 : Y.OpenCover
inst✝¹ : ∀ (i : 𝒰.J), IsAffine (𝒰.obj i)
𝒰' : (i : 𝒰.J) → (pullback f (𝒰.map i)).OpenCover
inst✝ : ∀ (i : 𝒰.J) (j : (𝒰' i).J), IsAffine ((𝒰' i).obj j)
h𝒰' : ∀ (i : 𝒰.J) (j k : (𝒰' i).J), P (pullback.mapDesc ((𝒰' i).map j) ((𝒰' i).map k) pullback.snd)
𝒱 : (pullback f f).OpenCover :=
  (Scheme.Pullback.openCoverOfBase 𝒰 f f).bind fun i =>
    Scheme.Pullback.openCoverOfLeftRight (𝒰' i) (𝒰' i) pullback.snd pullback.snd
i1 : ∀ (i : 𝒱.J), IsAffine (𝒱.obj i)
⊢ (targetAffineLocally P).diagonal f

tactic: apply (hP.affine_openCover_iff _ 𝒱).mpr
state_before: P : AffineTargetMorphismProperty
hP : P.IsLocal
X Y : Scheme
f : X ⟶ Y
𝒰 : Y.OpenCover
inst✝¹ : ∀ (i : 𝒰.J), IsAffine (𝒰.obj i)
𝒰' : (i : 𝒰.J) → (pullback f (𝒰.map i)).OpenCover
inst✝ : ∀ (i : 𝒰.J) (j : (𝒰' i).J), IsAffine ((𝒰' i).obj j)
h𝒰' : ∀ (i : 𝒰.J) (j k : (𝒰' i).J), P (pullback.mapDesc ((𝒰' i).map j) ((𝒰' i).map k) pullback.snd)
𝒱 : (pullback f f).OpenCover :=
  (Scheme.Pullback.openCoverOfBase 𝒰 f f).bind fun i =>
    Scheme.Pullback.openCoverOfLeftRight (𝒰' i) (𝒰' i) pullback.snd pullback.snd
i1 : ∀ (i : 𝒱.J), IsAffine (𝒱.obj i)
⊢ (targetAffineLocally P).diagonal f
state_after: P : AffineTargetMorphismProperty
hP : P.IsLocal
X Y : Scheme
f : X ⟶ Y
𝒰 : Y.OpenCover
inst✝¹ : ∀ (i : 𝒰.J), IsAffine (𝒰.obj i)
𝒰' : (i : 𝒰.J) → (pullback f (𝒰.map i)).OpenCover
inst✝ : ∀ (i : 𝒰.J) (j : (𝒰' i).J), IsAffine ((𝒰' i).obj j)
h𝒰' : ∀ (i : 𝒰.J) (j k : (𝒰' i).J), P (pullback.mapDesc ((𝒰' i).map j) ((𝒰' i).map k) pullback.snd)
𝒱 : (pullback f f).OpenCover :=
  (Scheme.Pullback.openCoverOfBase 𝒰 f f).bind fun i =>
    Scheme.Pullback.openCoverOfLeftRight (𝒰' i) (𝒰' i) pullback.snd pullback.snd
i1 : ∀ (i : 𝒱.J), IsAffine (𝒱.obj i)
⊢ ∀ (i : 𝒱.J), P pullback.snd

tactic: rintro ⟨i, j, k⟩
state_before: P : AffineTargetMorphismProperty
hP : P.IsLocal
X Y : Scheme
f : X ⟶ Y
𝒰 : Y.OpenCover
inst✝¹ : ∀ (i : 𝒰.J), IsAffine (𝒰.obj i)
𝒰' : (i : 𝒰.J) → (pullback f (𝒰.map i)).OpenCover
inst✝ : ∀ (i : 𝒰.J) (j : (𝒰' i).J), IsAffine ((𝒰' i).obj j)
h𝒰' : ∀ (i : 𝒰.J) (j k : (𝒰' i).J), P (pullback.mapDesc ((𝒰' i).map j) ((𝒰' i).map k) pullback.snd)
𝒱 : (pullback f f).OpenCover :=
  (Scheme.Pullback.openCoverOfBase 𝒰 f f).bind fun i =>
    Scheme.Pullback.openCoverOfLeftRight (𝒰' i) (𝒰' i) pullback.snd pullback.snd
i1 : ∀ (i : 𝒱.J), IsAffine (𝒱.obj i)
⊢ ∀ (i : 𝒱.J), P pullback.snd
state_after: case mk.mk
P : AffineTargetMorphismProperty
hP : P.IsLocal
X Y : Scheme
f : X ⟶ Y
𝒰 : Y.OpenCover
inst✝¹ : ∀ (i : 𝒰.J), IsAffine (𝒰.obj i)
𝒰' : (i : 𝒰.J) → (pullback f (𝒰.map i)).OpenCover
inst✝ : ∀ (i : 𝒰.J) (j : (𝒰' i).J), IsAffine ((𝒰' i).obj j)
h𝒰' : ∀ (i : 𝒰.J) (j k : (𝒰' i).J), P (pullback.mapDesc ((𝒰' i).map j) ((𝒰' i).map k) pullback.snd)
𝒱 : (pullback f f).OpenCover :=
  (Scheme.Pullback.openCoverOfBase 𝒰 f f).bind fun i =>
    Scheme.Pullback.openCoverOfLeftRight (𝒰' i) (𝒰' i) pullback.snd pullback.snd
i1 : ∀ (i : 𝒱.J), IsAffine (𝒱.obj i)
i : (Scheme.Pullback.openCoverOfBase 𝒰 f f).J
j k : (𝒰' i).J
⊢ P pullback.snd

tactic: convert (affine_cancel_left_isIso hP.1
  (pullbackDiagonalMapIso _ _ ((𝒰' i).map j) ((𝒰' i).map k)).inv pullback.snd).mp _
state_before: case mk.mk
P : AffineTargetMorphismProperty
hP : P.IsLocal
X Y : Scheme
f : X ⟶ Y
𝒰 : Y.OpenCover
inst✝¹ : ∀ (i : 𝒰.J), IsAffine (𝒰.obj i)
𝒰' : (i : 𝒰.J) → (pullback f (𝒰.map i)).OpenCover
inst✝ : ∀ (i : 𝒰.J) (j : (𝒰' i).J), IsAffine ((𝒰' i).obj j)
h𝒰' : ∀ (i : 𝒰.J) (j k : (𝒰' i).J), P (pullback.mapDesc ((𝒰' i).map j) ((𝒰' i).map k) pullback.snd)
𝒱 : (pullback f f).OpenCover :=
  (Scheme.Pullback.openCoverOfBase 𝒰 f f).bind fun i =>
    Scheme.Pullback.openCoverOfLeftRight (𝒰' i) (𝒰' i) pullback.snd pullback.snd
i1 : ∀ (i : 𝒱.J), IsAffine (𝒱.obj i)
i : (Scheme.Pullback.openCoverOfBase 𝒰 f f).J
j k : (𝒰' i).J
⊢ P pullback.snd
state_after: case h.e'_1.h.e'_7
P : AffineTargetMorphismProperty
hP : P.IsLocal
X Y : Scheme
f : X ⟶ Y
𝒰 : Y.OpenCover
inst✝¹ : ∀ (i : 𝒰.J), IsAffine (𝒰.obj i)
𝒰' : (i : 𝒰.J) → (pullback f (𝒰.map i)).OpenCover
inst✝ : ∀ (i : 𝒰.J) (j : (𝒰' i).J), IsAffine ((𝒰' i).obj j)
h𝒰' : ∀ (i : 𝒰.J) (j k : (𝒰' i).J), P (pullback.mapDesc ((𝒰' i).map j) ((𝒰' i).map k) pullback.snd)
𝒱 : (pullback f f).OpenCover :=
  (Scheme.Pullback.openCoverOfBase 𝒰 f f).bind fun i =>
    Scheme.Pullback.openCoverOfLeftRight (𝒰' i) (𝒰' i) pullback.snd pullback.snd
i1 : ∀ (i : 𝒱.J), IsAffine (𝒱.obj i)
i : (Scheme.Pullback.openCoverOfBase 𝒰 f f).J
j k : (𝒰' i).J
⊢ pullback.map ((𝒰' i).map j ≫ pullback.snd) ((𝒰' i).map k ≫ pullback.snd) pullback.snd pullback.snd ((𝒰' i).map j)
        ((𝒰' i).map k) (𝟙 (𝒰.obj i)) ⋯ ⋯ ≫
      pullback.map pullback.snd pullback.snd f f pullback.fst pullback.fst (𝒰.map i) ⋯ ⋯ =
    pullback.map ((𝒰' i).map j ≫ pullback.snd) ((𝒰' i).map k ≫ pullback.snd) f f ((𝒰' i).map j ≫ pullback.fst)
      ((𝒰' i).map k ≫ pullback.fst) (𝒰.map i) ⋯ ⋯

case h.e'_3.e'_7
P : AffineTargetMorphismProperty
hP : P.IsLocal
X Y : Scheme
f : X ⟶ Y
𝒰 : Y.OpenCover
inst✝¹ : ∀ (i : 𝒰.J), IsAffine (𝒰.obj i)
𝒰' : (i : 𝒰.J) → (pullback f (𝒰.map i)).OpenCover
inst✝ : ∀ (i : 𝒰.J) (j : (𝒰' i).J), IsAffine ((𝒰' i).obj j)
h𝒰' : ∀ (i : 𝒰.J) (j k : (𝒰' i).J), P (pullback.mapDesc ((𝒰' i).map j) ((𝒰' i).map k) pullback.snd)
𝒱 : (pullback f f).OpenCover :=
  (Scheme.Pullback.openCoverOfBase 𝒰 f f).bind fun i =>
    Scheme.Pullback.openCoverOfLeftRight (𝒰' i) (𝒰' i) pullback.snd pullback.snd
i1 : ∀ (i : 𝒱.J), IsAffine (𝒱.obj i)
i : (Scheme.Pullback.openCoverOfBase 𝒰 f f).J
j k : (𝒰' i).J
e_1✝ :
  pullback (pullback.diagonal f)
      (pullback.map ((𝒰' i).map j ≫ pullback.snd) ((𝒰' i).map k ≫ pullback.snd) pullback.snd pullback.snd ((𝒰' i).map j)
          ((𝒰' i).map k) (𝟙 (𝒰.obj i)) ⋯ ⋯ ≫
        pullback.map pullback.snd pullback.snd f f pullback.fst pullback.fst (𝒰.map i) ⋯ ⋯) =
    pullback (pullback.diagonal f)
      (pullback.map ((𝒰' i).map j ≫ pullback.snd) ((𝒰' i).map k ≫ pullback.snd) f f ((𝒰' i).map j ≫ pullback.fst)
        ((𝒰' i).map k ≫ pullback.fst) (𝒰.map i) ⋯ ⋯)
⊢ pullback.map ((𝒰' i).map j ≫ pullback.snd) ((𝒰' i).map k ≫ pullback.snd) pullback.snd pullback.snd ((𝒰' i).map j)
        ((𝒰' i).map k) (𝟙 (𝒰.obj i)) ⋯ ⋯ ≫
      pullback.map pullback.snd pullback.snd f f pullback.fst pullback.fst (𝒰.map i) ⋯ ⋯ =
    pullback.map ((𝒰' i).map j ≫ pullback.snd) ((𝒰' i).map k ≫ pullback.snd) f f ((𝒰' i).map j ≫ pullback.fst)
      ((𝒰' i).map k ≫ pullback.fst) (𝒰.map i) ⋯ ⋯

case mk.mk
P : AffineTargetMorphismProperty
hP : P.IsLocal
X Y : Scheme
f : X ⟶ Y
𝒰 : Y.OpenCover
inst✝¹ : ∀ (i : 𝒰.J), IsAffine (𝒰.obj i)
𝒰' : (i : 𝒰.J) → (pullback f (𝒰.map i)).OpenCover
inst✝ : ∀ (i : 𝒰.J) (j : (𝒰' i).J), IsAffine ((𝒰' i).obj j)
h𝒰' : ∀ (i : 𝒰.J) (j k : (𝒰' i).J), P (pullback.mapDesc ((𝒰' i).map j) ((𝒰' i).map k) pullback.snd)
𝒱 : (pullback f f).OpenCover :=
  (Scheme.Pullback.openCoverOfBase 𝒰 f f).bind fun i =>
    Scheme.Pullback.openCoverOfLeftRight (𝒰' i) (𝒰' i) pullback.snd pullback.snd
i1 : ∀ (i : 𝒱.J), IsAffine (𝒱.obj i)
i : (Scheme.Pullback.openCoverOfBase 𝒰 f f).J
j k : (𝒰' i).J
⊢ P ((pullbackDiagonalMapIso f (𝒰.map i) ((𝒰' i).map j) ((𝒰' i).map k)).inv ≫ pullback.snd)

tactic: pick_goal 3
state_before: case h.e'_1.h.e'_7
P : AffineTargetMorphismProperty
hP : P.IsLocal
X Y : Scheme
f : X ⟶ Y
𝒰 : Y.OpenCover
inst✝¹ : ∀ (i : 𝒰.J), IsAffine (𝒰.obj i)
𝒰' : (i : 𝒰.J) → (pullback f (𝒰.map i)).OpenCover
inst✝ : ∀ (i : 𝒰.J) (j : (𝒰' i).J), IsAffine ((𝒰' i).obj j)
h𝒰' : ∀ (i : 𝒰.J) (j k : (𝒰' i).J), P (pullback.mapDesc ((𝒰' i).map j) ((𝒰' i).map k) pullback.snd)
𝒱 : (pullback f f).OpenCover :=
  (Scheme.Pullback.openCoverOfBase 𝒰 f f).bind fun i =>
    Scheme.Pullback.openCoverOfLeftRight (𝒰' i) (𝒰' i) pullback.snd pullback.snd
i1 : ∀ (i : 𝒱.J), IsAffine (𝒱.obj i)
i : (Scheme.Pullback.openCoverOfBase 𝒰 f f).J
j k : (𝒰' i).J
⊢ pullback.map ((𝒰' i).map j ≫ pullback.snd) ((𝒰' i).map k ≫ pullback.snd) pullback.snd pullback.snd ((𝒰' i).map j)
        ((𝒰' i).map k) (𝟙 (𝒰.obj i)) ⋯ ⋯ ≫
      pullback.map pullback.snd pullback.snd f f pullback.fst pullback.fst (𝒰.map i) ⋯ ⋯ =
    pullback.map ((𝒰' i).map j ≫ pullback.snd) ((𝒰' i).map k ≫ pullback.snd) f f ((𝒰' i).map j ≫ pullback.fst)
      ((𝒰' i).map k ≫ pullback.fst) (𝒰.map i) ⋯ ⋯

case h.e'_3.e'_7
P : AffineTargetMorphismProperty
hP : P.IsLocal
X Y : Scheme
f : X ⟶ Y
𝒰 : Y.OpenCover
inst✝¹ : ∀ (i : 𝒰.J), IsAffine (𝒰.obj i)
𝒰' : (i : 𝒰.J) → (pullback f (𝒰.map i)).OpenCover
inst✝ : ∀ (i : 𝒰.J) (j : (𝒰' i).J), IsAffine ((𝒰' i).obj j)
h𝒰' : ∀ (i : 𝒰.J) (j k : (𝒰' i).J), P (pullback.mapDesc ((𝒰' i).map j) ((𝒰' i).map k) pullback.snd)
𝒱 : (pullback f f).OpenCover :=
  (Scheme.Pullback.openCoverOfBase 𝒰 f f).bind fun i =>
    Scheme.Pullback.openCoverOfLeftRight (𝒰' i) (𝒰' i) pullback.snd pullback.snd
i1 : ∀ (i : 𝒱.J), IsAffine (𝒱.obj i)
i : (Scheme.Pullback.openCoverOfBase 𝒰 f f).J
j k : (𝒰' i).J
e_1✝ :
  pullback (pullback.diagonal f)
      (pullback.map ((𝒰' i).map j ≫ pullback.snd) ((𝒰' i).map k ≫ pullback.snd) pullback.snd pullback.snd ((𝒰' i).map j)
          ((𝒰' i).map k) (𝟙 (𝒰.obj i)) ⋯ ⋯ ≫
        pullback.map pullback.snd pullback.snd f f pullback.fst pullback.fst (𝒰.map i) ⋯ ⋯) =
    pullback (pullback.diagonal f)
      (pullback.map ((𝒰' i).map j ≫ pullback.snd) ((𝒰' i).map k ≫ pullback.snd) f f ((𝒰' i).map j ≫ pullback.fst)
        ((𝒰' i).map k ≫ pullback.fst) (𝒰.map i) ⋯ ⋯)
⊢ pullback.map ((𝒰' i).map j ≫ pullback.snd) ((𝒰' i).map k ≫ pullback.snd) pullback.snd pullback.snd ((𝒰' i).map j)
        ((𝒰' i).map k) (𝟙 (𝒰.obj i)) ⋯ ⋯ ≫
      pullback.map pullback.snd pullback.snd f f pullback.fst pullback.fst (𝒰.map i) ⋯ ⋯ =
    pullback.map ((𝒰' i).map j ≫ pullback.snd) ((𝒰' i).map k ≫ pullback.snd) f f ((𝒰' i).map j ≫ pullback.fst)
      ((𝒰' i).map k ≫ pullback.fst) (𝒰.map i) ⋯ ⋯

case mk.mk
P : AffineTargetMorphismProperty
hP : P.IsLocal
X Y : Scheme
f : X ⟶ Y
𝒰 : Y.OpenCover
inst✝¹ : ∀ (i : 𝒰.J), IsAffine (𝒰.obj i)
𝒰' : (i : 𝒰.J) → (pullback f (𝒰.map i)).OpenCover
inst✝ : ∀ (i : 𝒰.J) (j : (𝒰' i).J), IsAffine ((𝒰' i).obj j)
h𝒰' : ∀ (i : 𝒰.J) (j k : (𝒰' i).J), P (pullback.mapDesc ((𝒰' i).map j) ((𝒰' i).map k) pullback.snd)
𝒱 : (pullback f f).OpenCover :=
  (Scheme.Pullback.openCoverOfBase 𝒰 f f).bind fun i =>
    Scheme.Pullback.openCoverOfLeftRight (𝒰' i) (𝒰' i) pullback.snd pullback.snd
i1 : ∀ (i : 𝒱.J), IsAffine (𝒱.obj i)
i : (Scheme.Pullback.openCoverOfBase 𝒰 f f).J
j k : (𝒰' i).J
⊢ P ((pullbackDiagonalMapIso f (𝒰.map i) ((𝒰' i).map j) ((𝒰' i).map k)).inv ≫ pullback.snd)
state_after: case mk.mk
P : AffineTargetMorphismProperty
hP : P.IsLocal
X Y : Scheme
f : X ⟶ Y
𝒰 : Y.OpenCover
inst✝¹ : ∀ (i : 𝒰.J), IsAffine (𝒰.obj i)
𝒰' : (i : 𝒰.J) → (pullback f (𝒰.map i)).OpenCover
inst✝ : ∀ (i : 𝒰.J) (j : (𝒰' i).J), IsAffine ((𝒰' i).obj j)
h𝒰' : ∀ (i : 𝒰.J) (j k : (𝒰' i).J), P (pullback.mapDesc ((𝒰' i).map j) ((𝒰' i).map k) pullback.snd)
𝒱 : (pullback f f).OpenCover :=
  (Scheme.Pullback.openCoverOfBase 𝒰 f f).bind fun i =>
    Scheme.Pullback.openCoverOfLeftRight (𝒰' i) (𝒰' i) pullback.snd pullback.snd
i1 : ∀ (i : 𝒱.J), IsAffine (𝒱.obj i)
i : (Scheme.Pullback.openCoverOfBase 𝒰 f f).J
j k : (𝒰' i).J
⊢ P ((pullbackDiagonalMapIso f (𝒰.map i) ((𝒰' i).map j) ((𝒰' i).map k)).inv ≫ pullback.snd)

case h.e'_1.h.e'_7
P : AffineTargetMorphismProperty
hP : P.IsLocal
X Y : Scheme
f : X ⟶ Y
𝒰 : Y.OpenCover
inst✝¹ : ∀ (i : 𝒰.J), IsAffine (𝒰.obj i)
𝒰' : (i : 𝒰.J) → (pullback f (𝒰.map i)).OpenCover
inst✝ : ∀ (i : 𝒰.J) (j : (𝒰' i).J), IsAffine ((𝒰' i).obj j)
h𝒰' : ∀ (i : 𝒰.J) (j k : (𝒰' i).J), P (pullback.mapDesc ((𝒰' i).map j) ((𝒰' i).map k) pullback.snd)
𝒱 : (pullback f f).OpenCover :=
  (Scheme.Pullback.openCoverOfBase 𝒰 f f).bind fun i =>
    Scheme.Pullback.openCoverOfLeftRight (𝒰' i) (𝒰' i) pullback.snd pullback.snd
i1 : ∀ (i : 𝒱.J), IsAffine (𝒱.obj i)
i : (Scheme.Pullback.openCoverOfBase 𝒰 f f).J
j k : (𝒰' i).J
⊢ pullback.map ((𝒰' i).map j ≫ pullback.snd) ((𝒰' i).map k ≫ pullback.snd) pullback.snd pullback.snd ((𝒰' i).map j)
        ((𝒰' i).map k) (𝟙 (𝒰.obj i)) ⋯ ⋯ ≫
      pullback.map pullback.snd pullback.snd f f pullback.fst pullback.fst (𝒰.map i) ⋯ ⋯ =
    pullback.map ((𝒰' i).map j ≫ pullback.snd) ((𝒰' i).map k ≫ pullback.snd) f f ((𝒰' i).map j ≫ pullback.fst)
      ((𝒰' i).map k ≫ pullback.fst) (𝒰.map i) ⋯ ⋯

case h.e'_3.e'_7
P : AffineTargetMorphismProperty
hP : P.IsLocal
X Y : Scheme
f : X ⟶ Y
𝒰 : Y.OpenCover
inst✝¹ : ∀ (i : 𝒰.J), IsAffine (𝒰.obj i)
𝒰' : (i : 𝒰.J) → (pullback f (𝒰.map i)).OpenCover
inst✝ : ∀ (i : 𝒰.J) (j : (𝒰' i).J), IsAffine ((𝒰' i).obj j)
h𝒰' : ∀ (i : 𝒰.J) (j k : (𝒰' i).J), P (pullback.mapDesc ((𝒰' i).map j) ((𝒰' i).map k) pullback.snd)
𝒱 : (pullback f f).OpenCover :=
  (Scheme.Pullback.openCoverOfBase 𝒰 f f).bind fun i =>
    Scheme.Pullback.openCoverOfLeftRight (𝒰' i) (𝒰' i) pullback.snd pullback.snd
i1 : ∀ (i : 𝒱.J), IsAffine (𝒱.obj i)
i : (Scheme.Pullback.openCoverOfBase 𝒰 f f).J
j k : (𝒰' i).J
e_1✝ :
  pullback (pullback.diagonal f)
      (pullback.map ((𝒰' i).map j ≫ pullback.snd) ((𝒰' i).map k ≫ pullback.snd) pullback.snd pullback.snd ((𝒰' i).map j)
          ((𝒰' i).map k) (𝟙 (𝒰.obj i)) ⋯ ⋯ ≫
        pullback.map pullback.snd pullback.snd f f pullback.fst pullback.fst (𝒰.map i) ⋯ ⋯) =
    pullback (pullback.diagonal f)
      (pullback.map ((𝒰' i).map j ≫ pullback.snd) ((𝒰' i).map k ≫ pullback.snd) f f ((𝒰' i).map j ≫ pullback.fst)
        ((𝒰' i).map k ≫ pullback.fst) (𝒰.map i) ⋯ ⋯)
⊢ pullback.map ((𝒰' i).map j ≫ pullback.snd) ((𝒰' i).map k ≫ pullback.snd) pullback.snd pullback.snd ((𝒰' i).map j)
        ((𝒰' i).map k) (𝟙 (𝒰.obj i)) ⋯ ⋯ ≫
      pullback.map pullback.snd pullback.snd f f pullback.fst pullback.fst (𝒰.map i) ⋯ ⋯ =
    pullback.map ((𝒰' i).map j ≫ pullback.snd) ((𝒰' i).map k ≫ pullback.snd) f f ((𝒰' i).map j ≫ pullback.fst)
      ((𝒰' i).map k ≫ pullback.fst) (𝒰.map i) ⋯ ⋯

tactic: all_goals apply pullback.hom_ext <;>
simp only [Category.assoc, pullback.lift_fst, pullback.lift_snd, pullback.lift_fst_assoc,
  pullback.lift_snd_assoc]
state_before: case h.e'_1.h.e'_7
P : AffineTargetMorphismProperty
hP : P.IsLocal
X Y : Scheme
f : X ⟶ Y
𝒰 : Y.OpenCover
inst✝¹ : ∀ (i : 𝒰.J), IsAffine (𝒰.obj i)
𝒰' : (i : 𝒰.J) → (pullback f (𝒰.map i)).OpenCover
inst✝ : ∀ (i : 𝒰.J) (j : (𝒰' i).J), IsAffine ((𝒰' i).obj j)
h𝒰' : ∀ (i : 𝒰.J) (j k : (𝒰' i).J), P (pullback.mapDesc ((𝒰' i).map j) ((𝒰' i).map k) pullback.snd)
𝒱 : (pullback f f).OpenCover :=
  (Scheme.Pullback.openCoverOfBase 𝒰 f f).bind fun i =>
    Scheme.Pullback.openCoverOfLeftRight (𝒰' i) (𝒰' i) pullback.snd pullback.snd
i1 : ∀ (i : 𝒱.J), IsAffine (𝒱.obj i)
i : (Scheme.Pullback.openCoverOfBase 𝒰 f f).J
j k : (𝒰' i).J
⊢ pullback.map ((𝒰' i).map j ≫ pullback.snd) ((𝒰' i).map k ≫ pullback.snd) pullback.snd pullback.snd ((𝒰' i).map j)
        ((𝒰' i).map k) (𝟙 (𝒰.obj i)) ⋯ ⋯ ≫
      pullback.map pullback.snd pullback.snd f f pullback.fst pullback.fst (𝒰.map i) ⋯ ⋯ =
    pullback.map ((𝒰' i).map j ≫ pullback.snd) ((𝒰' i).map k ≫ pullback.snd) f f ((𝒰' i).map j ≫ pullback.fst)
      ((𝒰' i).map k ≫ pullback.fst) (𝒰.map i) ⋯ ⋯

case h.e'_3.e'_7
P : AffineTargetMorphismProperty
hP : P.IsLocal
X Y : Scheme
f : X ⟶ Y
𝒰 : Y.OpenCover
inst✝¹ : ∀ (i : 𝒰.J), IsAffine (𝒰.obj i)
𝒰' : (i : 𝒰.J) → (pullback f (𝒰.map i)).OpenCover
inst✝ : ∀ (i : 𝒰.J) (j : (𝒰' i).J), IsAffine ((𝒰' i).obj j)
h𝒰' : ∀ (i : 𝒰.J) (j k : (𝒰' i).J), P (pullback.mapDesc ((𝒰' i).map j) ((𝒰' i).map k) pullback.snd)
𝒱 : (pullback f f).OpenCover :=
  (Scheme.Pullback.openCoverOfBase 𝒰 f f).bind fun i =>
    Scheme.Pullback.openCoverOfLeftRight (𝒰' i) (𝒰' i) pullback.snd pullback.snd
i1 : ∀ (i : 𝒱.J), IsAffine (𝒱.obj i)
i : (Scheme.Pullback.openCoverOfBase 𝒰 f f).J
j k : (𝒰' i).J
e_1✝ :
  pullback (pullback.diagonal f)
      (pullback.map ((𝒰' i).map j ≫ pullback.snd) ((𝒰' i).map k ≫ pullback.snd) pullback.snd pullback.snd ((𝒰' i).map j)
          ((𝒰' i).map k) (𝟙 (𝒰.obj i)) ⋯ ⋯ ≫
        pullback.map pullback.snd pullback.snd f f pullback.fst pullback.fst (𝒰.map i) ⋯ ⋯) =
    pullback (pullback.diagonal f)
      (pullback.map ((𝒰' i).map j ≫ pullback.snd) ((𝒰' i).map k ≫ pullback.snd) f f ((𝒰' i).map j ≫ pullback.fst)
        ((𝒰' i).map k ≫ pullback.fst) (𝒰.map i) ⋯ ⋯)
⊢ pullback.map ((𝒰' i).map j ≫ pullback.snd) ((𝒰' i).map k ≫ pullback.snd) pullback.snd pullback.snd ((𝒰' i).map j)
        ((𝒰' i).map k) (𝟙 (𝒰.obj i)) ⋯ ⋯ ≫
      pullback.map pullback.snd pullback.snd f f pullback.fst pullback.fst (𝒰.map i) ⋯ ⋯ =
    pullback.map ((𝒰' i).map j ≫ pullback.snd) ((𝒰' i).map k ≫ pullback.snd) f f ((𝒰' i).map j ≫ pullback.fst)
      ((𝒰' i).map k ≫ pullback.fst) (𝒰.map i) ⋯ ⋯
state_after: no goals

tactic: dsimp [𝒱]
state_before: P : AffineTargetMorphismProperty
hP : P.IsLocal
X Y : Scheme
f : X ⟶ Y
𝒰 : Y.OpenCover
inst✝¹ : ∀ (i : 𝒰.J), IsAffine (𝒰.obj i)
𝒰' : (i : 𝒰.J) → (pullback f (𝒰.map i)).OpenCover
inst✝ : ∀ (i : 𝒰.J) (j : (𝒰' i).J), IsAffine ((𝒰' i).obj j)
h𝒰' : ∀ (i : 𝒰.J) (j k : (𝒰' i).J), P (pullback.mapDesc ((𝒰' i).map j) ((𝒰' i).map k) pullback.snd)
𝒱 : (pullback f f).OpenCover :=
  (Scheme.Pullback.openCoverOfBase 𝒰 f f).bind fun i =>
    Scheme.Pullback.openCoverOfLeftRight (𝒰' i) (𝒰' i) pullback.snd pullback.snd
i : 𝒱.J
⊢ IsAffine (𝒱.obj i)
state_after: P : AffineTargetMorphismProperty
hP : P.IsLocal
X Y : Scheme
f : X ⟶ Y
𝒰 : Y.OpenCover
inst✝¹ : ∀ (i : 𝒰.J), IsAffine (𝒰.obj i)
𝒰' : (i : 𝒰.J) → (pullback f (𝒰.map i)).OpenCover
inst✝ : ∀ (i : 𝒰.J) (j : (𝒰' i).J), IsAffine ((𝒰' i).obj j)
h𝒰' : ∀ (i : 𝒰.J) (j k : (𝒰' i).J), P (pullback.mapDesc ((𝒰' i).map j) ((𝒰' i).map k) pullback.snd)
𝒱 : (pullback f f).OpenCover :=
  (Scheme.Pullback.openCoverOfBase 𝒰 f f).bind fun i =>
    Scheme.Pullback.openCoverOfLeftRight (𝒰' i) (𝒰' i) pullback.snd pullback.snd
i : 𝒱.J
⊢ IsAffine (pullback ((𝒰' i.fst).map i.snd.1 ≫ pullback.snd) ((𝒰' i.fst).map i.snd.2 ≫ pullback.snd))

tactic: infer_instance
state_before: P : AffineTargetMorphismProperty
hP : P.IsLocal
X Y : Scheme
f : X ⟶ Y
𝒰 : Y.OpenCover
inst✝¹ : ∀ (i : 𝒰.J), IsAffine (𝒰.obj i)
𝒰' : (i : 𝒰.J) → (pullback f (𝒰.map i)).OpenCover
inst✝ : ∀ (i : 𝒰.J) (j : (𝒰' i).J), IsAffine ((𝒰' i).obj j)
h𝒰' : ∀ (i : 𝒰.J) (j k : (𝒰' i).J), P (pullback.mapDesc ((𝒰' i).map j) ((𝒰' i).map k) pullback.snd)
𝒱 : (pullback f f).OpenCover :=
  (Scheme.Pullback.openCoverOfBase 𝒰 f f).bind fun i =>
    Scheme.Pullback.openCoverOfLeftRight (𝒰' i) (𝒰' i) pullback.snd pullback.snd
i : 𝒱.J
⊢ IsAffine (pullback ((𝒰' i.fst).map i.snd.1 ≫ pullback.snd) ((𝒰' i.fst).map i.snd.2 ≫ pullback.snd))
state_after: no goals

tactic: convert h𝒰' i j k
state_before: case mk.mk
P : AffineTargetMorphismProperty
hP : P.IsLocal
X Y : Scheme
f : X ⟶ Y
𝒰 : Y.OpenCover
inst✝¹ : ∀ (i : 𝒰.J), IsAffine (𝒰.obj i)
𝒰' : (i : 𝒰.J) → (pullback f (𝒰.map i)).OpenCover
inst✝ : ∀ (i : 𝒰.J) (j : (𝒰' i).J), IsAffine ((𝒰' i).obj j)
h𝒰' : ∀ (i : 𝒰.J) (j k : (𝒰' i).J), P (pullback.mapDesc ((𝒰' i).map j) ((𝒰' i).map k) pullback.snd)
𝒱 : (pullback f f).OpenCover :=
  (Scheme.Pullback.openCoverOfBase 𝒰 f f).bind fun i =>
    Scheme.Pullback.openCoverOfLeftRight (𝒰' i) (𝒰' i) pullback.snd pullback.snd
i1 : ∀ (i : 𝒱.J), IsAffine (𝒱.obj i)
i : (Scheme.Pullback.openCoverOfBase 𝒰 f f).J
j k : (𝒰' i).J
⊢ P ((pullbackDiagonalMapIso f (𝒰.map i) ((𝒰' i).map j) ((𝒰' i).map k)).inv ≫ pullback.snd)
state_after: case h.e'_3
P : AffineTargetMorphismProperty
hP : P.IsLocal
X Y : Scheme
f : X ⟶ Y
𝒰 : Y.OpenCover
inst✝¹ : ∀ (i : 𝒰.J), IsAffine (𝒰.obj i)
𝒰' : (i : 𝒰.J) → (pullback f (𝒰.map i)).OpenCover
inst✝ : ∀ (i : 𝒰.J) (j : (𝒰' i).J), IsAffine ((𝒰' i).obj j)
h𝒰' : ∀ (i : 𝒰.J) (j k : (𝒰' i).J), P (pullback.mapDesc ((𝒰' i).map j) ((𝒰' i).map k) pullback.snd)
𝒱 : (pullback f f).OpenCover :=
  (Scheme.Pullback.openCoverOfBase 𝒰 f f).bind fun i =>
    Scheme.Pullback.openCoverOfLeftRight (𝒰' i) (𝒰' i) pullback.snd pullback.snd
i1 : ∀ (i : 𝒱.J), IsAffine (𝒱.obj i)
i : (Scheme.Pullback.openCoverOfBase 𝒰 f f).J
j k : (𝒰' i).J
⊢ (pullbackDiagonalMapIso f (𝒰.map i) ((𝒰' i).map j) ((𝒰' i).map k)).inv ≫ pullback.snd =
    pullback.mapDesc ((𝒰' i).map j) ((𝒰' i).map k) pullback.snd

tactic: apply pullback.hom_ext <;> simp
state_before: case h.e'_3
P : AffineTargetMorphismProperty
hP : P.IsLocal
X Y : Scheme
f : X ⟶ Y
𝒰 : Y.OpenCover
inst✝¹ : ∀ (i : 𝒰.J), IsAffine (𝒰.obj i)
𝒰' : (i : 𝒰.J) → (pullback f (𝒰.map i)).OpenCover
inst✝ : ∀ (i : 𝒰.J) (j : (𝒰' i).J), IsAffine ((𝒰' i).obj j)
h𝒰' : ∀ (i : 𝒰.J) (j k : (𝒰' i).J), P (pullback.mapDesc ((𝒰' i).map j) ((𝒰' i).map k) pullback.snd)
𝒱 : (pullback f f).OpenCover :=
  (Scheme.Pullback.openCoverOfBase 𝒰 f f).bind fun i =>
    Scheme.Pullback.openCoverOfLeftRight (𝒰' i) (𝒰' i) pullback.snd pullback.snd
i1 : ∀ (i : 𝒱.J), IsAffine (𝒱.obj i)
i : (Scheme.Pullback.openCoverOfBase 𝒰 f f).J
j k : (𝒰' i).J
⊢ (pullbackDiagonalMapIso f (𝒰.map i) ((𝒰' i).map j) ((𝒰' i).map k)).inv ≫ pullback.snd =
    pullback.mapDesc ((𝒰' i).map j) ((𝒰' i).map k) pullback.snd
state_after: no goals

tactic: apply pullback.hom_ext <;>
simp only [Category.assoc, pullback.lift_fst, pullback.lift_snd, pullback.lift_fst_assoc,
pullback.lift_snd_assoc]
state_before: case h.e'_3.e'_7
P : AffineTargetMorphismProperty
hP : P.IsLocal
X Y : Scheme
f : X ⟶ Y
𝒰 : Y.OpenCover
inst✝¹ : ∀ (i : 𝒰.J), IsAffine (𝒰.obj i)
𝒰' : (i : 𝒰.J) → (pullback f (𝒰.map i)).OpenCover
inst✝ : ∀ (i : 𝒰.J) (j : (𝒰' i).J), IsAffine ((𝒰' i).obj j)
h𝒰' : ∀ (i : 𝒰.J) (j k : (𝒰' i).J), P (pullback.mapDesc ((𝒰' i).map j) ((𝒰' i).map k) pullback.snd)
𝒱 : (pullback f f).OpenCover :=
  (Scheme.Pullback.openCoverOfBase 𝒰 f f).bind fun i =>
    Scheme.Pullback.openCoverOfLeftRight (𝒰' i) (𝒰' i) pullback.snd pullback.snd
i1 : ∀ (i : 𝒱.J), IsAffine (𝒱.obj i)
i : (Scheme.Pullback.openCoverOfBase 𝒰 f f).J
j k : (𝒰' i).J
e_1✝ :
  pullback (pullback.diagonal f)
      (pullback.map ((𝒰' i).map j ≫ pullback.snd) ((𝒰' i).map k ≫ pullback.snd) pullback.snd pullback.snd ((𝒰' i).map j)
          ((𝒰' i).map k) (𝟙 (𝒰.obj i)) ⋯ ⋯ ≫
        pullback.map pullback.snd pullback.snd f f pullback.fst pullback.fst (𝒰.map i) ⋯ ⋯) =
    pullback (pullback.diagonal f)
      (pullback.map ((𝒰' i).map j ≫ pullback.snd) ((𝒰' i).map k ≫ pullback.snd) f f ((𝒰' i).map j ≫ pullback.fst)
        ((𝒰' i).map k ≫ pullback.fst) (𝒰.map i) ⋯ ⋯)
⊢ pullback.map ((𝒰' i).map j ≫ pullback.snd) ((𝒰' i).map k ≫ pullback.snd) pullback.snd pullback.snd ((𝒰' i).map j)
        ((𝒰' i).map k) (𝟙 (𝒰.obj i)) ⋯ ⋯ ≫
      pullback.map pullback.snd pullback.snd f f pullback.fst pullback.fst (𝒰.map i) ⋯ ⋯ =
    pullback.map ((𝒰' i).map j ≫ pullback.snd) ((𝒰' i).map k ≫ pullback.snd) f f ((𝒰' i).map j ≫ pullback.fst)
      ((𝒰' i).map k ≫ pullback.fst) (𝒰.map i) ⋯ ⋯
state_after: no goals