l3lab/ntp-mathlib huggingface dataset:
theorem gluedLift_p2 : gluedLift 𝒰 f g s ≫ p2 𝒰 f g = s.snd := by
  rw [← cancel_epi (𝒰.pullbackCover s.fst).fromGlued]
  apply Multicoequalizer.hom_ext
  intro b
  

Proof state:
case h
C : Type u
inst✝¹ : Category.{v, u} C
X Y Z : Scheme
𝒰 : OpenCover X
f : X ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (i : 𝒰.J), HasPullback (OpenCover.map 𝒰 i ≫ f) g
s : PullbackCone f g
b : (GlueData.diagram (OpenCover.gluedCover (OpenCover.pullbackCover 𝒰 (PullbackCone.fst s))).toGlueData).R
⊢ Multicoequalizer.π
        (GlueData.diagram (OpenCover.gluedCover (OpenCover.pullbackCover 𝒰 (PullbackCone.fst s))).toGlueData) b ≫
      OpenCover.fromGlued (OpenCover.pullbackCover 𝒰 (PullbackCone.fst s)) ≫ gluedLift 𝒰 f g s ≫ p2 𝒰 f g =
    Multicoequalizer.π
        (GlueData.diagram (OpenCover.gluedCover (OpenCover.pullbackCover 𝒰 (PullbackCone.fst s))).toGlueData) b ≫
      OpenCover.fromGlued (OpenCover.pullbackCover 𝒰 (PullbackCone.fst s)) ≫ PullbackCone.snd s

Next tactic:
erw [Multicoequalizer.π_desc_assoc, Multicoequalizer.π_desc_assoc]
theorem gluedLift_p2 : gluedLift 𝒰 f g s ≫ p2 𝒰 f g = s.snd := by
  rw [← cancel_epi (𝒰.pullbackCover s.fst).fromGlued]
  apply Multicoequalizer.hom_ext
  intro b
  erw [Multicoequalizer.π_desc_assoc, Multicoequalizer.π_desc_assoc]
  

Proof state:
case h
C : Type u
inst✝¹ : Category.{v, u} C
X Y Z : Scheme
𝒰 : OpenCover X
f : X ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (i : 𝒰.J), HasPullback (OpenCover.map 𝒰 i ≫ f) g
s : PullbackCone f g
b : (GlueData.diagram (OpenCover.gluedCover (OpenCover.pullbackCover 𝒰 (PullbackCone.fst s))).toGlueData).R
⊢ OpenCover.map (OpenCover.pullbackCover 𝒰 (PullbackCone.fst s)) b ≫ gluedLift 𝒰 f g s ≫ p2 𝒰 f g =
    OpenCover.map (OpenCover.pullbackCover 𝒰 (PullbackCone.fst s)) b ≫ PullbackCone.snd s

Next tactic:
delta gluedLift
theorem gluedLift_p2 : gluedLift 𝒰 f g s ≫ p2 𝒰 f g = s.snd := by
  rw [← cancel_epi (𝒰.pullbackCover s.fst).fromGlued]
  apply Multicoequalizer.hom_ext
  intro b
  erw [Multicoequalizer.π_desc_assoc, Multicoequalizer.π_desc_assoc]
  delta gluedLift
  

Proof state:
case h
C : Type u
inst✝¹ : Category.{v, u} C
X Y Z : Scheme
𝒰 : OpenCover X
f : X ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (i : 𝒰.J), HasPullback (OpenCover.map 𝒰 i ≫ f) g
s : PullbackCone f g
b : (GlueData.diagram (OpenCover.gluedCover (OpenCover.pullbackCover 𝒰 (PullbackCone.fst s))).toGlueData).R
⊢ OpenCover.map (OpenCover.pullbackCover 𝒰 (PullbackCone.fst s)) b ≫
      OpenCover.glueMorphisms (OpenCover.pullbackCover 𝒰 (PullbackCone.fst s))
          (fun i =>
            (pullbackSymmetry (PullbackCone.fst s) (OpenCover.map 𝒰 i)).hom ≫
              pullback.map (OpenCover.map 𝒰 i) (PullbackCone.fst s) (OpenCover.map 𝒰 i ≫ f) g (𝟙 (OpenCover.obj 𝒰 i))
                  (PullbackCone.snd s) f (_ : OpenCover.map 𝒰 i ≫ f = 𝟙 (OpenCover.obj 𝒰 i) ≫ OpenCover.map 𝒰 i ≫ f)
                  (_ : PullbackCone.fst s ≫ f = PullbackCone.snd s ≫ g) ≫
                GlueData.ι (gluing 𝒰 f g) i)
          (_ :
            ∀ (i j : (OpenCover.pullbackCover 𝒰 (PullbackCone.fst s)).J),
              pullback.fst ≫
                  (pullbackSymmetry (PullbackCone.fst s) (OpenCover.map 𝒰 i)).hom ≫
                    pullback.map (OpenCover.map 𝒰 i) (PullbackCone.fst s) (OpenCover.map 𝒰 i ≫ f) g
                        (𝟙 (OpenCover.obj 𝒰 i)) (PullbackCone.snd s) f
                        (_ : OpenCover.map 𝒰 i ≫ f = 𝟙 (OpenCover.obj 𝒰 i) ≫ OpenCover.map 𝒰 i ≫ f)
                        (_ : PullbackCone.fst s ≫ f = PullbackCone.snd s ≫ g) ≫
                      GlueData.ι (gluing 𝒰 f g) i =
                pullback.snd ≫
                  (pullbackSymmetry (PullbackCone.fst s) (OpenCover.map 𝒰 j)).hom ≫
                    pullback.map (OpenCover.map 𝒰 j) (PullbackCone.fst s) (OpenCover.map 𝒰 j ≫ f) g
                        (𝟙 (OpenCover.obj 𝒰 j)) (PullbackCone.snd s) f
                        (_ : OpenCover.map 𝒰 j ≫ f = 𝟙 (OpenCover.obj 𝒰 j) ≫ OpenCover.map 𝒰 j ≫ f)
                        (_ : PullbackCone.fst s ≫ f = PullbackCone.snd s ≫ g) ≫
                      GlueData.ι (gluing 𝒰 f g) j) ≫
        p2 𝒰 f g =
    OpenCover.map (OpenCover.pullbackCover 𝒰 (PullbackCone.fst s)) b ≫ PullbackCone.snd s

Next tactic:
simp_rw [← Category.assoc]
theorem gluedLift_p2 : gluedLift 𝒰 f g s ≫ p2 𝒰 f g = s.snd := by
  rw [← cancel_epi (𝒰.pullbackCover s.fst).fromGlued]
  apply Multicoequalizer.hom_ext
  intro b
  erw [Multicoequalizer.π_desc_assoc, Multicoequalizer.π_desc_assoc]
  delta gluedLift
  simp_rw [← Category.assoc]
  

Proof state:
case h
C : Type u
inst✝¹ : Category.{v, u} C
X Y Z : Scheme
𝒰 : OpenCover X
f : X ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (i : 𝒰.J), HasPullback (OpenCover.map 𝒰 i ≫ f) g
s : PullbackCone f g
b : (GlueData.diagram (OpenCover.gluedCover (OpenCover.pullbackCover 𝒰 (PullbackCone.fst s))).toGlueData).R
⊢ (OpenCover.map (OpenCover.pullbackCover 𝒰 (PullbackCone.fst s)) b ≫
        OpenCover.glueMorphisms (OpenCover.pullbackCover 𝒰 (PullbackCone.fst s))
          (fun i =>
            ((pullbackSymmetry (PullbackCone.fst s) (OpenCover.map 𝒰 i)).hom ≫
                pullback.map (OpenCover.map 𝒰 i) (PullbackCone.fst s) (OpenCover.map 𝒰 i ≫ f) g (𝟙 (OpenCover.obj 𝒰 i))
                  (PullbackCone.snd s) f (_ : OpenCover.map 𝒰 i ≫ f = 𝟙 (OpenCover.obj 𝒰 i) ≫ OpenCover.map 𝒰 i ≫ f)
                  (_ : PullbackCone.fst s ≫ f = PullbackCone.snd s ≫ g)) ≫
              GlueData.ι (gluing 𝒰 f g) i)
          (_ :
            ∀ (x y : (OpenCover.pullbackCover 𝒰 (PullbackCone.fst s)).J),
              pullback.fst ≫
                  (fun i =>
                      ((pullbackSymmetry (PullbackCone.fst s) (OpenCover.map 𝒰 i)).hom ≫
                          pullback.map (OpenCover.map 𝒰 i) (PullbackCone.fst s) (OpenCover.map 𝒰 i ≫ f) g
                            (𝟙 (OpenCover.obj 𝒰 i)) (PullbackCone.snd s) f
                            (_ : OpenCover.map 𝒰 i ≫ f = 𝟙 (OpenCover.obj 𝒰 i) ≫ OpenCover.map 𝒰 i ≫ f)
                            (_ : PullbackCone.fst s ≫ f = PullbackCone.snd s ≫ g)) ≫
                        GlueData.ι (gluing 𝒰 f g) i)
                    x =
                pullback.snd ≫
                  (fun i =>
                      ((pullbackSymmetry (PullbackCone.fst s) (OpenCover.map 𝒰 i)).hom ≫
                          pullback.map (OpenCover.map 𝒰 i) (PullbackCone.fst s) (OpenCover.map 𝒰 i ≫ f) g
                            (𝟙 (OpenCover.obj 𝒰 i)) (PullbackCone.snd s) f
                            (_ : OpenCover.map 𝒰 i ≫ f = 𝟙 (OpenCover.obj 𝒰 i) ≫ OpenCover.map 𝒰 i ≫ f)
                            (_ : PullbackCone.fst s ≫ f = PullbackCone.snd s ≫ g)) ≫
                        GlueData.ι (gluing 𝒰 f g) i)
                    y)) ≫
      p2 𝒰 f g =
    OpenCover.map (OpenCover.pullbackCover 𝒰 (PullbackCone.fst s)) b ≫ PullbackCone.snd s

Next tactic:
rw [(𝒰.pullbackCover s.fst).ι_glueMorphisms]
theorem gluedLift_p2 : gluedLift 𝒰 f g s ≫ p2 𝒰 f g = s.snd := by
  rw [← cancel_epi (𝒰.pullbackCover s.fst).fromGlued]
  apply Multicoequalizer.hom_ext
  intro b
  erw [Multicoequalizer.π_desc_assoc, Multicoequalizer.π_desc_assoc]
  delta gluedLift
  simp_rw [← Category.assoc]
  rw [(𝒰.pullbackCover s.fst).ι_glueMorphisms]
  

Proof state:
case h
C : Type u
inst✝¹ : Category.{v, u} C
X Y Z : Scheme
𝒰 : OpenCover X
f : X ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (i : 𝒰.J), HasPullback (OpenCover.map 𝒰 i ≫ f) g
s : PullbackCone f g
b : (GlueData.diagram (OpenCover.gluedCover (OpenCover.pullbackCover 𝒰 (PullbackCone.fst s))).toGlueData).R
⊢ (((pullbackSymmetry (PullbackCone.fst s) (OpenCover.map 𝒰 b)).hom ≫
          pullback.map (OpenCover.map 𝒰 b) (PullbackCone.fst s) (OpenCover.map 𝒰 b ≫ f) g (𝟙 (OpenCover.obj 𝒰 b))
            (PullbackCone.snd s) f (_ : OpenCover.map 𝒰 b ≫ f = 𝟙 (OpenCover.obj 𝒰 b) ≫ OpenCover.map 𝒰 b ≫ f)
            (_ : PullbackCone.fst s ≫ f = PullbackCone.snd s ≫ g)) ≫
        GlueData.ι (gluing 𝒰 f g) b) ≫
      p2 𝒰 f g =
    OpenCover.map (OpenCover.pullbackCover 𝒰 (PullbackCone.fst s)) b ≫ PullbackCone.snd s

Next tactic:
simp_rw [Category.assoc]
theorem gluedLift_p2 : gluedLift 𝒰 f g s ≫ p2 𝒰 f g = s.snd := by
  rw [← cancel_epi (𝒰.pullbackCover s.fst).fromGlued]
  apply Multicoequalizer.hom_ext
  intro b
  erw [Multicoequalizer.π_desc_assoc, Multicoequalizer.π_desc_assoc]
  delta gluedLift
  simp_rw [← Category.assoc]
  rw [(𝒰.pullbackCover s.fst).ι_glueMorphisms]
  simp_rw [Category.assoc]
  

Proof state:
case h
C : Type u
inst✝¹ : Category.{v, u} C
X Y Z : Scheme
𝒰 : OpenCover X
f : X ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (i : 𝒰.J), HasPullback (OpenCover.map 𝒰 i ≫ f) g
s : PullbackCone f g
b : (GlueData.diagram (OpenCover.gluedCover (OpenCover.pullbackCover 𝒰 (PullbackCone.fst s))).toGlueData).R
⊢ (pullbackSymmetry (PullbackCone.fst s) (OpenCover.map 𝒰 b)).hom ≫
      pullback.map (OpenCover.map 𝒰 b) (PullbackCone.fst s) (OpenCover.map 𝒰 b ≫ f) g (𝟙 (OpenCover.obj 𝒰 b))
          (PullbackCone.snd s) f (_ : OpenCover.map 𝒰 b ≫ f = 𝟙 (OpenCover.obj 𝒰 b) ≫ OpenCover.map 𝒰 b ≫ f)
          (_ : PullbackCone.fst s ≫ f = PullbackCone.snd s ≫ g) ≫
        GlueData.ι (gluing 𝒰 f g) b ≫ p2 𝒰 f g =
    OpenCover.map (OpenCover.pullbackCover 𝒰 (PullbackCone.fst s)) b ≫ PullbackCone.snd s

Next tactic:
erw [Multicoequalizer.π_desc, pullback.lift_snd]
theorem gluedLift_p2 : gluedLift 𝒰 f g s ≫ p2 𝒰 f g = s.snd := by
  rw [← cancel_epi (𝒰.pullbackCover s.fst).fromGlued]
  apply Multicoequalizer.hom_ext
  intro b
  erw [Multicoequalizer.π_desc_assoc, Multicoequalizer.π_desc_assoc]
  delta gluedLift
  simp_rw [← Category.assoc]
  rw [(𝒰.pullbackCover s.fst).ι_glueMorphisms]
  simp_rw [Category.assoc]
  erw [Multicoequalizer.π_desc, pullback.lift_snd]
  

Proof state:
case h
C : Type u
inst✝¹ : Category.{v, u} C
X Y Z : Scheme
𝒰 : OpenCover X
f : X ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (i : 𝒰.J), HasPullback (OpenCover.map 𝒰 i ≫ f) g
s : PullbackCone f g
b : (GlueData.diagram (OpenCover.gluedCover (OpenCover.pullbackCover 𝒰 (PullbackCone.fst s))).toGlueData).R
⊢ (pullbackSymmetry (PullbackCone.fst s) (OpenCover.map 𝒰 b)).hom ≫ pullback.snd ≫ PullbackCone.snd s =
    OpenCover.map (OpenCover.pullbackCover 𝒰 (PullbackCone.fst s)) b ≫ PullbackCone.snd s

Next tactic:
rw [pullbackSymmetry_hom_comp_snd_assoc]
theorem gluedLift_p2 : gluedLift 𝒰 f g s ≫ p2 𝒰 f g = s.snd := by
  rw [← cancel_epi (𝒰.pullbackCover s.fst).fromGlued]
  apply Multicoequalizer.hom_ext
  intro b
  erw [Multicoequalizer.π_desc_assoc, Multicoequalizer.π_desc_assoc]
  delta gluedLift
  simp_rw [← Category.assoc]
  rw [(𝒰.pullbackCover s.fst).ι_glueMorphisms]
  simp_rw [Category.assoc]
  erw [Multicoequalizer.π_desc, pullback.lift_snd]
  rw [pullbackSymmetry_hom_comp_snd_assoc]
  

Proof state:
case h
C : Type u
inst✝¹ : Category.{v, u} C
X Y Z : Scheme
𝒰 : OpenCover X
f : X ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (i : 𝒰.J), HasPullback (OpenCover.map 𝒰 i ≫ f) g
s : PullbackCone f g
b : (GlueData.diagram (OpenCover.gluedCover (OpenCover.pullbackCover 𝒰 (PullbackCone.fst s))).toGlueData).R
⊢ pullback.fst ≫ PullbackCone.snd s =
    OpenCover.map (OpenCover.pullbackCover 𝒰 (PullbackCone.fst s)) b ≫ PullbackCone.snd s

Next tactic:
rfl
@[simp, reassoc]
theorem pullbackFstιToV_fst (i j : 𝒰.J) :
    pullbackFstιToV 𝒰 f g i j ≫ pullback.fst = pullback.snd := by
  

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
X Y Z : Scheme
𝒰 : OpenCover X
f : X ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (i : 𝒰.J), HasPullback (OpenCover.map 𝒰 i ≫ f) g
s : PullbackCone f g
i j : 𝒰.J
⊢ pullbackFstιToV 𝒰 f g i j ≫ pullback.fst = pullback.snd

Next tactic:
delta pullbackFstιToV
@[simp, reassoc]
theorem pullbackFstιToV_fst (i j : 𝒰.J) :
    pullbackFstιToV 𝒰 f g i j ≫ pullback.fst = pullback.snd := by
  delta pullbackFstιToV
  

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
X Y Z : Scheme
𝒰 : OpenCover X
f : X ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (i : 𝒰.J), HasPullback (OpenCover.map 𝒰 i ≫ f) g
s : PullbackCone f g
i j : 𝒰.J
⊢ ((pullbackSymmetry pullback.fst (GlueData.ι (gluing 𝒰 f g) j) ≪≫
            pullbackRightPullbackFstIso (p1 𝒰 f g) (OpenCover.map 𝒰 i) (GlueData.ι (gluing 𝒰 f g) j)).hom ≫
        (pullback.congrHom
            (_ :
              Multicoequalizer.π (GlueData.diagram (gluing 𝒰 f g).toGlueData) j ≫
                  Multicoequalizer.desc (GlueData.diagram (gluing 𝒰 f g).toGlueData) X
                    (fun i => pullback.fst ≫ OpenCover.map 𝒰 i)
                    (_ :
                      ∀ (a : (GlueData.diagram (gluing 𝒰 f g).toGlueData).L),
                        MultispanIndex.fst (GlueData.diagram (gluing 𝒰 f g).toGlueData) a ≫
                            pullback.fst ≫
                              OpenCover.map 𝒰 (MultispanIndex.fstFrom (GlueData.diagram (gluing 𝒰 f g).toGlueData) a) =
                          MultispanIndex.snd (GlueData.diagram (gluing 𝒰 f g).toGlueData) a ≫
                            pullback.fst ≫
                              OpenCover.map 𝒰 (MultispanIndex.sndFrom (GlueData.diagram (gluing 𝒰 f g).toGlueData) a)) =
                pullback.fst ≫ OpenCover.map 𝒰 j)
            (_ : OpenCover.map 𝒰 i = OpenCover.map 𝒰 i)).hom) ≫
      pullback.fst =
    pullback.snd

Next tactic:
simp only [Iso.trans_hom, pullback.congrHom_hom, Category.assoc, pullback.lift_fst,
    Category.comp_id]
@[simp, reassoc]
theorem pullbackFstιToV_fst (i j : 𝒰.J) :
    pullbackFstιToV 𝒰 f g i j ≫ pullback.fst = pullback.snd := by
  delta pullbackFstιToV
  simp only [Iso.trans_hom, pullback.congrHom_hom, Category.assoc, pullback.lift_fst,
    Category.comp_id]
  -- Porting note : `pullbackRightPullbackFstIso_hom_fst` is not used in `simp` even though
  -- instructed, forcing `pullbackSymmetry_hom_comp_fst` to be manually `rw`ed as well.
  

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
X Y Z : Scheme
𝒰 : OpenCover X
f : X ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (i : 𝒰.J), HasPullback (OpenCover.map 𝒰 i ≫ f) g
s : PullbackCone f g
i j : 𝒰.J
⊢ (pullbackSymmetry pullback.fst (GlueData.ι (gluing 𝒰 f g) j)).hom ≫
      (pullbackRightPullbackFstIso (p1 𝒰 f g) (OpenCover.map 𝒰 i) (GlueData.ι (gluing 𝒰 f g) j)).hom ≫ pullback.fst =
    pullback.snd

Next tactic:
erw [pullbackRightPullbackFstIso_hom_fst]
@[simp, reassoc]
theorem pullbackFstιToV_fst (i j : 𝒰.J) :
    pullbackFstιToV 𝒰 f g i j ≫ pullback.fst = pullback.snd := by
  delta pullbackFstιToV
  simp only [Iso.trans_hom, pullback.congrHom_hom, Category.assoc, pullback.lift_fst,
    Category.comp_id]
  -- Porting note : `pullbackRightPullbackFstIso_hom_fst` is not used in `simp` even though
  -- instructed, forcing `pullbackSymmetry_hom_comp_fst` to be manually `rw`ed as well.
  erw [pullbackRightPullbackFstIso_hom_fst]
  

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
X Y Z : Scheme
𝒰 : OpenCover X
f : X ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (i : 𝒰.J), HasPullback (OpenCover.map 𝒰 i ≫ f) g
s : PullbackCone f g
i j : 𝒰.J
⊢ (pullbackSymmetry pullback.fst (GlueData.ι (gluing 𝒰 f g) j)).hom ≫ pullback.fst = pullback.snd

Next tactic:
rw [pullbackSymmetry_hom_comp_fst]
@[simp, reassoc]
theorem pullbackFstιToV_snd (i j : 𝒰.J) :
    pullbackFstιToV 𝒰 f g i j ≫ pullback.snd = pullback.fst ≫ pullback.snd := by
  

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
X Y Z : Scheme
𝒰 : OpenCover X
f : X ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (i : 𝒰.J), HasPullback (OpenCover.map 𝒰 i ≫ f) g
s : PullbackCone f g
i j : 𝒰.J
⊢ pullbackFstιToV 𝒰 f g i j ≫ pullback.snd = pullback.fst ≫ pullback.snd

Next tactic:
delta pullbackFstιToV
@[simp, reassoc]
theorem pullbackFstιToV_snd (i j : 𝒰.J) :
    pullbackFstιToV 𝒰 f g i j ≫ pullback.snd = pullback.fst ≫ pullback.snd := by
  delta pullbackFstιToV
  

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
X Y Z : Scheme
𝒰 : OpenCover X
f : X ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (i : 𝒰.J), HasPullback (OpenCover.map 𝒰 i ≫ f) g
s : PullbackCone f g
i j : 𝒰.J
⊢ ((pullbackSymmetry pullback.fst (GlueData.ι (gluing 𝒰 f g) j) ≪≫
            pullbackRightPullbackFstIso (p1 𝒰 f g) (OpenCover.map 𝒰 i) (GlueData.ι (gluing 𝒰 f g) j)).hom ≫
        (pullback.congrHom
            (_ :
              Multicoequalizer.π (GlueData.diagram (gluing 𝒰 f g).toGlueData) j ≫
                  Multicoequalizer.desc (GlueData.diagram (gluing 𝒰 f g).toGlueData) X
                    (fun i => pullback.fst ≫ OpenCover.map 𝒰 i)
                    (_ :
                      ∀ (a : (GlueData.diagram (gluing 𝒰 f g).toGlueData).L),
                        MultispanIndex.fst (GlueData.diagram (gluing 𝒰 f g).toGlueData) a ≫
                            pullback.fst ≫
                              OpenCover.map 𝒰 (MultispanIndex.fstFrom (GlueData.diagram (gluing 𝒰 f g).toGlueData) a) =
                          MultispanIndex.snd (GlueData.diagram (gluing 𝒰 f g).toGlueData) a ≫
                            pullback.fst ≫
                              OpenCover.map 𝒰 (MultispanIndex.sndFrom (GlueData.diagram (gluing 𝒰 f g).toGlueData) a)) =
                pullback.fst ≫ OpenCover.map 𝒰 j)
            (_ : OpenCover.map 𝒰 i = OpenCover.map 𝒰 i)).hom) ≫
      pullback.snd =
    pullback.fst ≫ pullback.snd

Next tactic:
simp only [Iso.trans_hom, pullback.congrHom_hom, Category.assoc, pullback.lift_snd,
    Category.comp_id]
@[simp, reassoc]
theorem pullbackFstιToV_snd (i j : 𝒰.J) :
    pullbackFstιToV 𝒰 f g i j ≫ pullback.snd = pullback.fst ≫ pullback.snd := by
  delta pullbackFstιToV
  simp only [Iso.trans_hom, pullback.congrHom_hom, Category.assoc, pullback.lift_snd,
    Category.comp_id]
  -- Porting note : `pullbackRightPullbackFstIso_hom_snd` is not used in `simp` even though
  -- instructed, forcing `pullbackSymmetry_hom_comp_snd_assoc` to be manually `rw`ed as well.
  

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
X Y Z : Scheme
𝒰 : OpenCover X
f : X ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (i : 𝒰.J), HasPullback (OpenCover.map 𝒰 i ≫ f) g
s : PullbackCone f g
i j : 𝒰.J
⊢ (pullbackSymmetry pullback.fst (GlueData.ι (gluing 𝒰 f g) j)).hom ≫
      (pullbackRightPullbackFstIso (p1 𝒰 f g) (OpenCover.map 𝒰 i) (GlueData.ι (gluing 𝒰 f g) j)).hom ≫ pullback.snd =
    pullback.fst ≫ pullback.snd

Next tactic:
erw [pullbackRightPullbackFstIso_hom_snd]
@[simp, reassoc]
theorem pullbackFstιToV_snd (i j : 𝒰.J) :
    pullbackFstιToV 𝒰 f g i j ≫ pullback.snd = pullback.fst ≫ pullback.snd := by
  delta pullbackFstιToV
  simp only [Iso.trans_hom, pullback.congrHom_hom, Category.assoc, pullback.lift_snd,
    Category.comp_id]
  -- Porting note : `pullbackRightPullbackFstIso_hom_snd` is not used in `simp` even though
  -- instructed, forcing `pullbackSymmetry_hom_comp_snd_assoc` to be manually `rw`ed as well.
  erw [pullbackRightPullbackFstIso_hom_snd]
  

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
X Y Z : Scheme
𝒰 : OpenCover X
f : X ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (i : 𝒰.J), HasPullback (OpenCover.map 𝒰 i ≫ f) g
s : PullbackCone f g
i j : 𝒰.J
⊢ (pullbackSymmetry pullback.fst (GlueData.ι (gluing 𝒰 f g) j)).hom ≫ pullback.snd ≫ pullback.snd =
    pullback.fst ≫ pullback.snd

Next tactic:
rw [pullbackSymmetry_hom_comp_snd_assoc]
/-- We show that the map `W ×[X] Uᵢ ⟶ Uᵢ ×[Z] Y ⟶ W` is the first projection, where the
first map is given by the lift of `W ×[X] Uᵢ ⟶ Uᵢ` and `W ×[X] Uᵢ ⟶ W ⟶ Y`.

It suffices to show that the two map agrees when restricted onto `Uⱼ ×[Z] Y`. In this case,
both maps factor through `V j i` via `pullback_fst_ι_to_V` -/
theorem lift_comp_ι (i : 𝒰.J) :
    pullback.lift pullback.snd (pullback.fst ≫ p2 𝒰 f g)
          (by 

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
X Y Z : Scheme
𝒰 : OpenCover X
f : X ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (i : 𝒰.J), HasPullback (OpenCover.map 𝒰 i ≫ f) g
s : PullbackCone f g
i : 𝒰.J
⊢ pullback.snd ≫ OpenCover.map 𝒰 i ≫ f = (pullback.fst ≫ p2 𝒰 f g) ≫ g

Next tactic:
rw [← pullback.condition_assoc, Category.assoc, p_comm]
/-- We show that the map `W ×[X] Uᵢ ⟶ Uᵢ ×[Z] Y ⟶ W` is the first projection, where the
first map is given by the lift of `W ×[X] Uᵢ ⟶ Uᵢ` and `W ×[X] Uᵢ ⟶ W ⟶ Y`.

It suffices to show that the two map agrees when restricted onto `Uⱼ ×[Z] Y`. In this case,
both maps factor through `V j i` via `pullback_fst_ι_to_V` -/
theorem lift_comp_ι (i : 𝒰.J) :
    pullback.lift pullback.snd (pullback.fst ≫ p2 𝒰 f g)
          (by rw [← pullback.condition_assoc, Category.assoc, p_comm]) ≫
        (gluing 𝒰 f g).ι i =
      (pullback.fst : pullback (p1 𝒰 f g) (𝒰.map i) ⟶ _) := by
  

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
X Y Z : Scheme
𝒰 : OpenCover X
f : X ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (i : 𝒰.J), HasPullback (OpenCover.map 𝒰 i ≫ f) g
s : PullbackCone f g
i : 𝒰.J
⊢ pullback.lift pullback.snd (pullback.fst ≫ p2 𝒰 f g)
        (_ : pullback.snd ≫ OpenCover.map 𝒰 i ≫ f = (pullback.fst ≫ p2 𝒰 f g) ≫ g) ≫
      GlueData.ι (gluing 𝒰 f g) i =
    pullback.fst

Next tactic:
apply ((gluing 𝒰 f g).openCover.pullbackCover pullback.fst).hom_ext
/-- We show that the map `W ×[X] Uᵢ ⟶ Uᵢ ×[Z] Y ⟶ W` is the first projection, where the
first map is given by the lift of `W ×[X] Uᵢ ⟶ Uᵢ` and `W ×[X] Uᵢ ⟶ W ⟶ Y`.

It suffices to show that the two map agrees when restricted onto `Uⱼ ×[Z] Y`. In this case,
both maps factor through `V j i` via `pullback_fst_ι_to_V` -/
theorem lift_comp_ι (i : 𝒰.J) :
    pullback.lift pullback.snd (pullback.fst ≫ p2 𝒰 f g)
          (by rw [← pullback.condition_assoc, Category.assoc, p_comm]) ≫
        (gluing 𝒰 f g).ι i =
      (pullback.fst : pullback (p1 𝒰 f g) (𝒰.map i) ⟶ _) := by
  apply ((gluing 𝒰 f g).openCover.pullbackCover pullback.fst).hom_ext
  

Proof state:
case h
C : Type u
inst✝¹ : Category.{v, u} C
X Y Z : Scheme
𝒰 : OpenCover X
f : X ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (i : 𝒰.J), HasPullback (OpenCover.map 𝒰 i ≫ f) g
s : PullbackCone f g
i : 𝒰.J
⊢ ∀ (x : (OpenCover.pullbackCover (GlueData.openCover (gluing 𝒰 f g)) pullback.fst).J),
    OpenCover.map (OpenCover.pullbackCover (GlueData.openCover (gluing 𝒰 f g)) pullback.fst) x ≫
        pullback.lift pullback.snd (pullback.fst ≫ p2 𝒰 f g)
            (_ : pullback.snd ≫ OpenCover.map 𝒰 i ≫ f = (pullback.fst ≫ p2 𝒰 f g) ≫ g) ≫
          GlueData.ι (gluing 𝒰 f g) i =
      OpenCover.map (OpenCover.pullbackCover (GlueData.openCover (gluing 𝒰 f g)) pullback.fst) x ≫ pullback.fst

Next tactic:
intro j
/-- We show that the map `W ×[X] Uᵢ ⟶ Uᵢ ×[Z] Y ⟶ W` is the first projection, where the
first map is given by the lift of `W ×[X] Uᵢ ⟶ Uᵢ` and `W ×[X] Uᵢ ⟶ W ⟶ Y`.

It suffices to show that the two map agrees when restricted onto `Uⱼ ×[Z] Y`. In this case,
both maps factor through `V j i` via `pullback_fst_ι_to_V` -/
theorem lift_comp_ι (i : 𝒰.J) :
    pullback.lift pullback.snd (pullback.fst ≫ p2 𝒰 f g)
          (by rw [← pullback.condition_assoc, Category.assoc, p_comm]) ≫
        (gluing 𝒰 f g).ι i =
      (pullback.fst : pullback (p1 𝒰 f g) (𝒰.map i) ⟶ _) := by
  apply ((gluing 𝒰 f g).openCover.pullbackCover pullback.fst).hom_ext
  intro j
  

Proof state:
case h
C : Type u
inst✝¹ : Category.{v, u} C
X Y Z : Scheme
𝒰 : OpenCover X
f : X ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (i : 𝒰.J), HasPullback (OpenCover.map 𝒰 i ≫ f) g
s : PullbackCone f g
i : 𝒰.J
j : (OpenCover.pullbackCover (GlueData.openCover (gluing 𝒰 f g)) pullback.fst).J
⊢ OpenCover.map (OpenCover.pullbackCover (GlueData.openCover (gluing 𝒰 f g)) pullback.fst) j ≫
      pullback.lift pullback.snd (pullback.fst ≫ p2 𝒰 f g)
          (_ : pullback.snd ≫ OpenCover.map 𝒰 i ≫ f = (pullback.fst ≫ p2 𝒰 f g) ≫ g) ≫
        GlueData.ι (gluing 𝒰 f g) i =
    OpenCover.map (OpenCover.pullbackCover (GlueData.openCover (gluing 𝒰 f g)) pullback.fst) j ≫ pullback.fst

Next tactic:
dsimp only [OpenCover.pullbackCover]