open List in
theorem QuasiSeparated.affine_openCover_TFAE {X Y : Scheme.{u}} (f : X ⟶ Y) :
    TFAE
      [QuasiSeparated f,
        ∃ (𝒰 : Scheme.OpenCover.{u} Y) (_ : ∀ i, IsAffine (𝒰.obj i)),
          ∀ i : 𝒰.J, QuasiSeparatedSpace (pullback f (𝒰.map i)).carrier,
        ∀ (𝒰 : Scheme.OpenCover.{u} Y) [∀ i, IsAffine (𝒰.obj i)] (i : 𝒰.J),
          QuasiSeparatedSpace (pullback f (𝒰.map i)).carrier,
        ∀ {U : Scheme} (g : U ⟶ Y) [IsAffine U] [IsOpenImmersion g],
          QuasiSeparatedSpace (pullback f g).carrier,
        ∃ (𝒰 : Scheme.OpenCover.{u} Y) (_ : ∀ i, IsAffine (𝒰.obj i)) (𝒰' :
          ∀ i : 𝒰.J, Scheme.OpenCover.{u} (pullback f (𝒰.map i))) (_ :
          ∀ i j, IsAffine ((𝒰' i).obj j)),
          ∀ (i : 𝒰.J) (j k : (𝒰' i).J),
            CompactSpace (pullback ((𝒰' i).map j) ((𝒰' i).map k)).carrier] := by
  have := QuasiCompact.affineProperty_isLocal.diagonal_affine_openCover_TFAE f
  

Proof state:
X✝ Y✝ : Scheme
f✝ : X✝ ⟶ Y✝
X Y : Scheme
f : X ⟶ Y
this :
  TFAE
    [MorphismProperty.diagonal (targetAffineLocally QuasiCompact.affineProperty) f,
      ∃ 𝒰,
        ∃ (x : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)),
          ∀ (i : 𝒰.J), AffineTargetMorphismProperty.diagonal QuasiCompact.affineProperty pullback.snd,
      ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),
        AffineTargetMorphismProperty.diagonal QuasiCompact.affineProperty pullback.snd,
      ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g],
        AffineTargetMorphismProperty.diagonal QuasiCompact.affineProperty pullback.snd,
      ∃ 𝒰,
        ∃ (x : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)),
          ∃ 𝒰',
            ∃ (x_1 : ∀ (i : 𝒰.J) (j : (𝒰' i).J), IsAffine (Scheme.OpenCover.obj (𝒰' i) j)),
              ∀ (i : 𝒰.J) (j k : (𝒰' i).J),
                QuasiCompact.affineProperty
                  (pullback.mapDesc (Scheme.OpenCover.map (𝒰' i) j) (Scheme.OpenCover.map (𝒰' i) k) pullback.snd)]
⊢ TFAE
    [QuasiSeparated f,
      ∃ 𝒰,
        ∃ (_ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)),
          ∀ (i : 𝒰.J),
            QuasiSeparatedSpace
              ↑↑(pullback f (Scheme.OpenCover.map 𝒰 i)).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace,
      ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),
        QuasiSeparatedSpace
          ↑↑(pullback f (Scheme.OpenCover.map 𝒰 i)).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace,
      ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst : IsOpenImmersion g],
        QuasiSeparatedSpace ↑↑(pullback f g).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace,
      ∃ 𝒰,
        ∃ (_ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)),
          ∃ 𝒰',
            ∃ (_ : ∀ (i : 𝒰.J) (j : (𝒰' i).J), IsAffine (Scheme.OpenCover.obj (𝒰' i) j)),
              ∀ (i : 𝒰.J) (j k : (𝒰' i).J),
                CompactSpace
                  ↑↑(pullback (Scheme.OpenCover.map (𝒰' i) j)
                              (Scheme.OpenCover.map (𝒰' i) k)).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace]

Next tactic:
simp_rw [← quasiCompact_eq_affineProperty, ← quasiSeparated_eq_diagonal_is_quasiCompact,
    quasi_compact_affineProperty_diagonal_eq] at this