-- Module: Mathlib.AlgebraicGeometry.Cover.Open
Goal:
X Y : Scheme
f : X ⟶ Y
𝒰 : OpenCover.{u_1, u} Y
i : (Precoverage.ZeroHypercover.pullback₁ f 𝒰.affineRefinement.openCover).I₀
simp :
  Eq (α :=
    pullback (X :=
        pullback (X :=
          𝒰.X
            (i.fst (β := fun (i : 𝒰.I₀) ↦
              PreZeroHypercover.I₀ (S := 𝒰.X i) (Precoverage.ZeroHypercover.toPreZeroHypercover (𝒰.X i).affineCover))))
          (𝒰.f
            (i.fst (β := fun (i : 𝒰.I₀) ↦
              PreZeroHypercover.I₀ (S := 𝒰.X i) (Precoverage.ZeroHypercover.toPreZeroHypercover (𝒰.X i).affineCover))))
          f)
        (pullback.fst
          (𝒰.f
            (i.fst (β := fun (i : 𝒰.I₀) ↦
              PreZeroHypercover.I₀ (S := 𝒰.X i) (Precoverage.ZeroHypercover.toPreZeroHypercover (𝒰.X i).affineCover))))
          f)
        (PreZeroHypercover.f
          (Precoverage.ZeroHypercover.toPreZeroHypercover
            (𝒰.X
                (i.fst (β := fun (i : 𝒰.I₀) ↦
                  PreZeroHypercover.I₀ (S := 𝒰.X i)
                    (Precoverage.ZeroHypercover.toPreZeroHypercover (𝒰.X i).affineCover)))).affineCover)
          (i.snd (β := fun (i : 𝒰.I₀) ↦
            PreZeroHypercover.I₀ (S := 𝒰.X i) (Precoverage.ZeroHypercover.toPreZeroHypercover (𝒰.X i).affineCover)))) ⟶
      Spec (𝒰.affineRefinement.X (P := IsOpenImmersion) i))
    (CategoryStruct.comp (Y :=
        pullback (Y :=
          pullback (X :=
            𝒰.X
              (i.fst (β := fun (i : 𝒰.I₀) ↦
                PreZeroHypercover.I₀ (S := 𝒰.X i)
                  (Precoverage.ZeroHypercover.toPreZeroHypercover (𝒰.X i).affineCover))))
            (𝒰.f
              (i.fst (β := fun (i : 𝒰.I₀) ↦
                PreZeroHypercover.I₀ (S := 𝒰.X i)
                  (Precoverage.ZeroHypercover.toPreZeroHypercover (𝒰.X i).affineCover))))
            f)
          (PreZeroHypercover.f
            (Precoverage.ZeroHypercover.toPreZeroHypercover
              (𝒰.X
                  (i.fst (β := fun (i : 𝒰.I₀) ↦
                    PreZeroHypercover.I₀ (S := 𝒰.X i)
                      (Precoverage.ZeroHypercover.toPreZeroHypercover (𝒰.X i).affineCover)))).affineCover)
            (i.snd (β := fun (i : 𝒰.I₀) ↦
              PreZeroHypercover.I₀ (S := 𝒰.X i) (Precoverage.ZeroHypercover.toPreZeroHypercover (𝒰.X i).affineCover))))
          (pullback.fst
            (𝒰.f
              (i.fst (β := fun (i : 𝒰.I₀) ↦
                PreZeroHypercover.I₀ (S := 𝒰.X i)
                  (Precoverage.ZeroHypercover.toPreZeroHypercover (𝒰.X i).affineCover))))
            f))
        (Iso.inv
          (pullbackSymmetry
            (PreZeroHypercover.f
              (Precoverage.ZeroHypercover.toPreZeroHypercover
                (𝒰.X
                    (i.fst (β := fun (i : 𝒰.I₀) ↦
                      PreZeroHypercover.I₀ (S := 𝒰.X i)
                        (Precoverage.ZeroHypercover.toPreZeroHypercover (𝒰.X i).affineCover)))).affineCover)
              (i.snd (β := fun (i : 𝒰.I₀) ↦
                PreZeroHypercover.I₀ (S := 𝒰.X i)
                  (Precoverage.ZeroHypercover.toPreZeroHypercover (𝒰.X i).affineCover))))
            (pullback.fst
              (𝒰.f
                (i.fst (β := fun (i : 𝒰.I₀) ↦
                  PreZeroHypercover.I₀ (S := 𝒰.X i)
                    (Precoverage.ZeroHypercover.toPreZeroHypercover (𝒰.X i).affineCover))))
              f)))
        (Iso.hom
            (pullbackRightPullbackFstIso
              (𝒰.f
                (i.fst (β := fun (i : 𝒰.I₀) ↦
                  PreZeroHypercover.I₀ (S := 𝒰.X i)
                    (Precoverage.ZeroHypercover.toPreZeroHypercover (𝒰.X i).affineCover))))
              f
              (PreZeroHypercover.f
                (Precoverage.ZeroHypercover.toPreZeroHypercover
                  (𝒰.X
                      (i.fst (β := fun (i : 𝒰.I₀) ↦
                        PreZeroHypercover.I₀ (S := 𝒰.X i)
                          (Precoverage.ZeroHypercover.toPreZeroHypercover (𝒰.X i).affineCover)))).affineCover)
                (i.snd (β := fun (i : 𝒰.I₀) ↦
                  PreZeroHypercover.I₀ (S := 𝒰.X i)
                    (Precoverage.ZeroHypercover.toPreZeroHypercover (𝒰.X i).affineCover))))) ≫
          pullback.fst (𝒰.affineRefinement.f (P := IsOpenImmersion) i) f) :
      pullback (X :=
          pullback (X :=
            𝒰.X
              (i.fst (β := fun (i : 𝒰.I₀) ↦
                PreZeroHypercover.I₀ (S := 𝒰.X i)
                  (Precoverage.ZeroHypercover.toPreZeroHypercover (𝒰.X i).affineCover))))
            (𝒰.f
              (i.fst (β := fun (i : 𝒰.I₀) ↦
                PreZeroHypercover.I₀ (S := 𝒰.X i)
                  (Precoverage.ZeroHypercover.toPreZeroHypercover (𝒰.X i).affineCover))))
            f)
          (pullback.fst
            (𝒰.f
              (i.fst (β := fun (i : 𝒰.I₀) ↦
                PreZeroHypercover.I₀ (S := 𝒰.X i)
                  (Precoverage.ZeroHypercover.toPreZeroHypercover (𝒰.X i).affineCover))))
            f)
          (PreZeroHypercover.f
            (Precoverage.ZeroHypercover.toPreZeroHypercover
              (𝒰.X
                  (i.fst (β := fun (i : 𝒰.I₀) ↦
                    PreZeroHypercover.I₀ (S := 𝒰.X i)
                      (Precoverage.ZeroHypercover.toPreZeroHypercover (𝒰.X i).affineCover)))).affineCover)
            (i.snd (β := fun (i : 𝒰.I₀) ↦
              PreZeroHypercover.I₀ (S := 𝒰.X i)
                (Precoverage.ZeroHypercover.toPreZeroHypercover (𝒰.X i).affineCover)))) ⟶
        Spec (𝒰.affineRefinement.X (P := IsOpenImmersion) i))
    (pullback.snd
        (pullback.fst
          (𝒰.f
            (i.fst (β := fun (i : 𝒰.I₀) ↦
              PreZeroHypercover.I₀ (S := 𝒰.X i) (Precoverage.ZeroHypercover.toPreZeroHypercover (𝒰.X i).affineCover))))
          f)
        (PreZeroHypercover.f
          (Precoverage.ZeroHypercover.toPreZeroHypercover
            (𝒰.X
                (i.fst (β := fun (i : 𝒰.I₀) ↦
                  PreZeroHypercover.I₀ (S := 𝒰.X i)
                    (Precoverage.ZeroHypercover.toPreZeroHypercover (𝒰.X i).affineCover)))).affineCover)
          (i.snd (β := fun (i : 𝒰.I₀) ↦
            PreZeroHypercover.I₀ (S := 𝒰.X i) (Precoverage.ZeroHypercover.toPreZeroHypercover (𝒰.X i).affineCover)))) :
      pullback (X :=
          pullback (X :=
            𝒰.X
              (i.fst (β := fun (i : 𝒰.I₀) ↦
                PreZeroHypercover.I₀ (S := 𝒰.X i)
                  (Precoverage.ZeroHypercover.toPreZeroHypercover (𝒰.X i).affineCover))))
            (𝒰.f
              (i.fst (β := fun (i : 𝒰.I₀) ↦
                PreZeroHypercover.I₀ (S := 𝒰.X i)
                  (Precoverage.ZeroHypercover.toPreZeroHypercover (𝒰.X i).affineCover))))
            f)
          (pullback.fst
            (𝒰.f
              (i.fst (β := fun (i : 𝒰.I₀) ↦
                PreZeroHypercover.I₀ (S := 𝒰.X i)
                  (Precoverage.ZeroHypercover.toPreZeroHypercover (𝒰.X i).affineCover))))
            f)
          (PreZeroHypercover.f
            (Precoverage.ZeroHypercover.toPreZeroHypercover
              (𝒰.X
                  (i.fst (β := fun (i : 𝒰.I₀) ↦
                    PreZeroHypercover.I₀ (S := 𝒰.X i)
                      (Precoverage.ZeroHypercover.toPreZeroHypercover (𝒰.X i).affineCover)))).affineCover)
            (i.snd (β := fun (i : 𝒰.I₀) ↦
              PreZeroHypercover.I₀ (S := 𝒰.X i)
                (Precoverage.ZeroHypercover.toPreZeroHypercover (𝒰.X i).affineCover)))) ⟶
        Spec (𝒰.affineRefinement.X (P := IsOpenImmersion) i))
⊢ (pullbackCoverAffineRefinementObjIso f 𝒰 i).inv ≫
      Cover.pullbackHom (P := IsOpenImmersion) 𝒰.affineRefinement.openCover f i =
    Cover.pullbackHom (P := IsOpenImmersion)
      (𝒰.X
          (i.fst (β := fun (i : 𝒰.I₀) ↦
            PreZeroHypercover.I₀ (C := Scheme) (S := 𝒰.X i)
              ((fun (i : 𝒰.I₀) ↦
                  (Precoverage.ZeroHypercover.toPreZeroHypercover (J := precoverage IsOpenImmersion)
                      ((fun (j : 𝒰.I₀) ↦ ((𝒰.X j).affineCover : (𝒰.X j).OpenCover)) i) :
                    PreZeroHypercover (𝒰.X i)))
                i)))).affineCover
      (Cover.pullbackHom (P := IsOpenImmersion) 𝒰 f
        (i.fst (β := fun (i : 𝒰.I₀) ↦
          PreZeroHypercover.I₀ (C := Scheme) (S := 𝒰.X i)
            ((fun (i : 𝒰.I₀) ↦
                (Precoverage.ZeroHypercover.toPreZeroHypercover (J := precoverage IsOpenImmersion)
                    ((fun (j : 𝒰.I₀) ↦ ((𝒰.X j).affineCover : (𝒰.X j).OpenCover)) i) :
                  PreZeroHypercover (𝒰.X i)))
              i))))
      (i.snd (β := fun (i : 𝒰.I₀) ↦
        PreZeroHypercover.I₀ (C := Scheme) (S := 𝒰.X i)
          ((fun (i : 𝒰.I₀) ↦
              (Precoverage.ZeroHypercover.toPreZeroHypercover (J := precoverage IsOpenImmersion)
                  ((fun (j : 𝒰.I₀) ↦ ((𝒰.X j).affineCover : (𝒰.X j).OpenCover)) i) :
                PreZeroHypercover (𝒰.X i)))
            i)))

Tactic:
simp only [Precoverage.ZeroHypercover.pullback₁_toPreZeroHypercover,
    PreZeroHypercover.pullback₁_X, Cover.pullbackHom, AffineOpenCover.openCover_X,
    AffineOpenCover.openCover_f, pullbackCoverAffineRefinementObjIso, Iso.trans_inv, asIso_inv,
    Iso.symm_inv, Category.assoc, pullbackSymmetry_inv_comp_snd, IsIso.inv_comp_eq, limit.lift_π,
    PullbackCone.mk_pt, PullbackCone.mk_π_app, Category.comp_id]

Premises used: AlgebraicGeometry.Scheme.AffineOpenCover.openCover_f, CategoryTheory.Precoverage.ZeroHypercover.pullback₁_toPreZeroHypercover, CategoryTheory.PreZeroHypercover.pullback₁_X, CategoryTheory.Category.assoc, AlgebraicGeometry.Scheme.Cover.pullbackHom, CategoryTheory.Limits.PullbackCone.mk_π_app, CategoryTheory.IsIso.inv_comp_eq, CategoryTheory.asIso_inv, CategoryTheory.Iso.symm_inv, CategoryTheory.Category.comp_id, CategoryTheory.Limits.PullbackCone.mk_pt, AlgebraicGeometry.Scheme.OpenCover.pullbackCoverAffineRefinementObjIso, CategoryTheory.Limits.pullbackSymmetry_inv_comp_snd, CategoryTheory.Iso.trans_inv, CategoryTheory.Limits.limit.lift_π, AlgebraicGeometry.Scheme.AffineOpenCover.openCover_X