l3lab/ntp-mathlib huggingface dataset:
/-- The lifted map `s.X ⟶ (gluing 𝒰 f g).glued` in order to show that `(gluing 𝒰 f g).glued` is
indeed the pullback.

Given a pullback cone `s`, we have the maps `s.fst ⁻¹' Uᵢ ⟶ Uᵢ` and
`s.fst ⁻¹' Uᵢ ⟶ s.X ⟶ Y` that we may lift to a map `s.fst ⁻¹' Uᵢ ⟶ Uᵢ ×[Z] Y`.

to glue these into a map `s.X ⟶ Uᵢ ×[Z] Y`, we need to show that the maps agree on
`(s.fst ⁻¹' Uᵢ) ×[s.X] (s.fst ⁻¹' Uⱼ) ⟶ Uᵢ ×[Z] Y`. This is achieved by showing that both of these
maps factors through `gluedLiftPullbackMap`.
-/
def gluedLift : s.pt ⟶ (gluing 𝒰 f g).glued := by
  fapply (𝒰.pullbackCover s.fst).glueMorphisms
  · exact fun i => (pullbackSymmetry _ _).hom ≫
      pullback.map _ _ _ _ (𝟙 _) s.snd f (Category.id_comp _).symm s.condition ≫
        (gluing 𝒰 f g).ι i
  intro i j
  rw [← gluedLiftPullbackMap_fst_assoc]
  have : _ = pullback.fst ≫ _ := (gluing 𝒰 f g).glue_condition i j
  rw [← this, gluing_t, gluing_f]
  simp_rw [← Category.assoc]
  congr 1
  apply pullback.hom_ext <;> simp_rw [Category.assoc]
  · rw [t_fst_fst, gluedLiftPullbackMap_snd]
    congr 1
    rw [← Iso.inv_comp_eq, pullbackSymmetry_inv_comp_snd]
    erw [pullback.lift_fst]
    rw [Category.comp_id]
  · 

Proof state:
case hf.e_a.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 : (OpenCover.pullbackCover 𝒰 (PullbackCone.fst s)).J
this :
  GlueData.t (gluing 𝒰 f g).toGlueData i j ≫ GlueData.f (gluing 𝒰 f g).toGlueData j i ≫ GlueData.ι (gluing 𝒰 f g) j =
    pullback.fst ≫ GlueData.ι (gluing 𝒰 f g) i
⊢ gluedLiftPullbackMap 𝒰 f g s i j ≫ t 𝒰 f g i j ≫ pullback.fst ≫ pullback.snd =
    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) ≫
          pullback.snd

Next tactic:
rw [t_fst_snd, gluedLiftPullbackMap_fst_assoc]
/-- The lifted map `s.X ⟶ (gluing 𝒰 f g).glued` in order to show that `(gluing 𝒰 f g).glued` is
indeed the pullback.

Given a pullback cone `s`, we have the maps `s.fst ⁻¹' Uᵢ ⟶ Uᵢ` and
`s.fst ⁻¹' Uᵢ ⟶ s.X ⟶ Y` that we may lift to a map `s.fst ⁻¹' Uᵢ ⟶ Uᵢ ×[Z] Y`.

to glue these into a map `s.X ⟶ Uᵢ ×[Z] Y`, we need to show that the maps agree on
`(s.fst ⁻¹' Uᵢ) ×[s.X] (s.fst ⁻¹' Uⱼ) ⟶ Uᵢ ×[Z] Y`. This is achieved by showing that both of these
maps factors through `gluedLiftPullbackMap`.
-/
def gluedLift : s.pt ⟶ (gluing 𝒰 f g).glued := by
  fapply (𝒰.pullbackCover s.fst).glueMorphisms
  · exact fun i => (pullbackSymmetry _ _).hom ≫
      pullback.map _ _ _ _ (𝟙 _) s.snd f (Category.id_comp _).symm s.condition ≫
        (gluing 𝒰 f g).ι i
  intro i j
  rw [← gluedLiftPullbackMap_fst_assoc]
  have : _ = pullback.fst ≫ _ := (gluing 𝒰 f g).glue_condition i j
  rw [← this, gluing_t, gluing_f]
  simp_rw [← Category.assoc]
  congr 1
  apply pullback.hom_ext <;> simp_rw [Category.assoc]
  · rw [t_fst_fst, gluedLiftPullbackMap_snd]
    congr 1
    rw [← Iso.inv_comp_eq, pullbackSymmetry_inv_comp_snd]
    erw [pullback.lift_fst]
    rw [Category.comp_id]
  · rw [t_fst_snd, gluedLiftPullbackMap_fst_assoc]
    

Proof state:
case hf.e_a.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 : (OpenCover.pullbackCover 𝒰 (PullbackCone.fst s)).J
this :
  GlueData.t (gluing 𝒰 f g).toGlueData i j ≫ GlueData.f (gluing 𝒰 f g).toGlueData j i ≫ GlueData.ι (gluing 𝒰 f g) j =
    pullback.fst ≫ GlueData.ι (gluing 𝒰 f g) i
⊢ 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) ≫
          pullback.snd =
    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) ≫
          pullback.snd

Next tactic:
erw [pullback.lift_snd, pullback.lift_snd]
/-- The lifted map `s.X ⟶ (gluing 𝒰 f g).glued` in order to show that `(gluing 𝒰 f g).glued` is
indeed the pullback.

Given a pullback cone `s`, we have the maps `s.fst ⁻¹' Uᵢ ⟶ Uᵢ` and
`s.fst ⁻¹' Uᵢ ⟶ s.X ⟶ Y` that we may lift to a map `s.fst ⁻¹' Uᵢ ⟶ Uᵢ ×[Z] Y`.

to glue these into a map `s.X ⟶ Uᵢ ×[Z] Y`, we need to show that the maps agree on
`(s.fst ⁻¹' Uᵢ) ×[s.X] (s.fst ⁻¹' Uⱼ) ⟶ Uᵢ ×[Z] Y`. This is achieved by showing that both of these
maps factors through `gluedLiftPullbackMap`.
-/
def gluedLift : s.pt ⟶ (gluing 𝒰 f g).glued := by
  fapply (𝒰.pullbackCover s.fst).glueMorphisms
  · exact fun i => (pullbackSymmetry _ _).hom ≫
      pullback.map _ _ _ _ (𝟙 _) s.snd f (Category.id_comp _).symm s.condition ≫
        (gluing 𝒰 f g).ι i
  intro i j
  rw [← gluedLiftPullbackMap_fst_assoc]
  have : _ = pullback.fst ≫ _ := (gluing 𝒰 f g).glue_condition i j
  rw [← this, gluing_t, gluing_f]
  simp_rw [← Category.assoc]
  congr 1
  apply pullback.hom_ext <;> simp_rw [Category.assoc]
  · rw [t_fst_fst, gluedLiftPullbackMap_snd]
    congr 1
    rw [← Iso.inv_comp_eq, pullbackSymmetry_inv_comp_snd]
    erw [pullback.lift_fst]
    rw [Category.comp_id]
  · rw [t_fst_snd, gluedLiftPullbackMap_fst_assoc]
    erw [pullback.lift_snd, pullback.lift_snd]
    

Proof state:
case hf.e_a.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 : (OpenCover.pullbackCover 𝒰 (PullbackCone.fst s)).J
this :
  GlueData.t (gluing 𝒰 f g).toGlueData i j ≫ GlueData.f (gluing 𝒰 f g).toGlueData j i ≫ GlueData.ι (gluing 𝒰 f g) j =
    pullback.fst ≫ GlueData.ι (gluing 𝒰 f g) i
⊢ pullback.fst ≫ (pullbackSymmetry (PullbackCone.fst s) (OpenCover.map 𝒰 i)).hom ≫ pullback.snd ≫ PullbackCone.snd s =
    pullback.snd ≫ (pullbackSymmetry (PullbackCone.fst s) (OpenCover.map 𝒰 j)).hom ≫ pullback.snd ≫ PullbackCone.snd s

Next tactic:
rw [pullbackSymmetry_hom_comp_snd_assoc, pullbackSymmetry_hom_comp_snd_assoc]
/-- The lifted map `s.X ⟶ (gluing 𝒰 f g).glued` in order to show that `(gluing 𝒰 f g).glued` is
indeed the pullback.

Given a pullback cone `s`, we have the maps `s.fst ⁻¹' Uᵢ ⟶ Uᵢ` and
`s.fst ⁻¹' Uᵢ ⟶ s.X ⟶ Y` that we may lift to a map `s.fst ⁻¹' Uᵢ ⟶ Uᵢ ×[Z] Y`.

to glue these into a map `s.X ⟶ Uᵢ ×[Z] Y`, we need to show that the maps agree on
`(s.fst ⁻¹' Uᵢ) ×[s.X] (s.fst ⁻¹' Uⱼ) ⟶ Uᵢ ×[Z] Y`. This is achieved by showing that both of these
maps factors through `gluedLiftPullbackMap`.
-/
def gluedLift : s.pt ⟶ (gluing 𝒰 f g).glued := by
  fapply (𝒰.pullbackCover s.fst).glueMorphisms
  · exact fun i => (pullbackSymmetry _ _).hom ≫
      pullback.map _ _ _ _ (𝟙 _) s.snd f (Category.id_comp _).symm s.condition ≫
        (gluing 𝒰 f g).ι i
  intro i j
  rw [← gluedLiftPullbackMap_fst_assoc]
  have : _ = pullback.fst ≫ _ := (gluing 𝒰 f g).glue_condition i j
  rw [← this, gluing_t, gluing_f]
  simp_rw [← Category.assoc]
  congr 1
  apply pullback.hom_ext <;> simp_rw [Category.assoc]
  · rw [t_fst_fst, gluedLiftPullbackMap_snd]
    congr 1
    rw [← Iso.inv_comp_eq, pullbackSymmetry_inv_comp_snd]
    erw [pullback.lift_fst]
    rw [Category.comp_id]
  · rw [t_fst_snd, gluedLiftPullbackMap_fst_assoc]
    erw [pullback.lift_snd, pullback.lift_snd]
    rw [pullbackSymmetry_hom_comp_snd_assoc, pullbackSymmetry_hom_comp_snd_assoc]
    

Proof state:
case hf.e_a.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 : (OpenCover.pullbackCover 𝒰 (PullbackCone.fst s)).J
this :
  GlueData.t (gluing 𝒰 f g).toGlueData i j ≫ GlueData.f (gluing 𝒰 f g).toGlueData j i ≫ GlueData.ι (gluing 𝒰 f g) j =
    pullback.fst ≫ GlueData.ι (gluing 𝒰 f g) i
⊢ pullback.fst ≫ pullback.fst ≫ PullbackCone.snd s = pullback.snd ≫ pullback.fst ≫ PullbackCone.snd s

Next tactic:
exact pullback.condition_assoc _
theorem gluedLift_p1 : gluedLift 𝒰 f g s ≫ p1 𝒰 f g = s.fst := 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
⊢ gluedLift 𝒰 f g s ≫ p1 𝒰 f g = PullbackCone.fst s

Next tactic:
rw [← cancel_epi (𝒰.pullbackCover s.fst).fromGlued]
theorem gluedLift_p1 : gluedLift 𝒰 f g s ≫ p1 𝒰 f g = s.fst := by
  rw [← cancel_epi (𝒰.pullbackCover s.fst).fromGlued]
  

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
⊢ OpenCover.fromGlued (OpenCover.pullbackCover 𝒰 (PullbackCone.fst s)) ≫ gluedLift 𝒰 f g s ≫ p1 𝒰 f g =
    OpenCover.fromGlued (OpenCover.pullbackCover 𝒰 (PullbackCone.fst s)) ≫ PullbackCone.fst s

Next tactic:
apply Multicoequalizer.hom_ext
theorem gluedLift_p1 : gluedLift 𝒰 f g s ≫ p1 𝒰 f g = s.fst := by
  rw [← cancel_epi (𝒰.pullbackCover s.fst).fromGlued]
  apply Multicoequalizer.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
⊢ ∀ (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 ≫ p1 𝒰 f g =
      Multicoequalizer.π
          (GlueData.diagram (OpenCover.gluedCover (OpenCover.pullbackCover 𝒰 (PullbackCone.fst s))).toGlueData) b ≫
        OpenCover.fromGlued (OpenCover.pullbackCover 𝒰 (PullbackCone.fst s)) ≫ PullbackCone.fst s

Next tactic:
intro b
theorem gluedLift_p1 : gluedLift 𝒰 f g s ≫ p1 𝒰 f g = s.fst := 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 ≫ p1 𝒰 f g =
    Multicoequalizer.π
        (GlueData.diagram (OpenCover.gluedCover (OpenCover.pullbackCover 𝒰 (PullbackCone.fst s))).toGlueData) b ≫
      OpenCover.fromGlued (OpenCover.pullbackCover 𝒰 (PullbackCone.fst s)) ≫ PullbackCone.fst s

Next tactic:
erw [Multicoequalizer.π_desc_assoc, Multicoequalizer.π_desc_assoc]
theorem gluedLift_p1 : gluedLift 𝒰 f g s ≫ p1 𝒰 f g = s.fst := 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 ≫ p1 𝒰 f g =
    OpenCover.map (OpenCover.pullbackCover 𝒰 (PullbackCone.fst s)) b ≫ PullbackCone.fst s

Next tactic:
delta gluedLift
theorem gluedLift_p1 : gluedLift 𝒰 f g s ≫ p1 𝒰 f g = s.fst := 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) ≫
        p1 𝒰 f g =
    OpenCover.map (OpenCover.pullbackCover 𝒰 (PullbackCone.fst s)) b ≫ PullbackCone.fst s

Next tactic:
simp_rw [← Category.assoc]
theorem gluedLift_p1 : gluedLift 𝒰 f g s ≫ p1 𝒰 f g = s.fst := 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)) ≫
      p1 𝒰 f g =
    OpenCover.map (OpenCover.pullbackCover 𝒰 (PullbackCone.fst s)) b ≫ PullbackCone.fst s

Next tactic:
rw [(𝒰.pullbackCover s.fst).ι_glueMorphisms]
theorem gluedLift_p1 : gluedLift 𝒰 f g s ≫ p1 𝒰 f g = s.fst := 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) ≫
      p1 𝒰 f g =
    OpenCover.map (OpenCover.pullbackCover 𝒰 (PullbackCone.fst s)) b ≫ PullbackCone.fst s

Next tactic:
simp_rw [Category.assoc]
theorem gluedLift_p1 : gluedLift 𝒰 f g s ≫ p1 𝒰 f g = s.fst := 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]
  -- Porting note : `Category.comp_id` is no longer necessary, don't know where `𝟙 _` has gone
  

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 ≫ p1 𝒰 f g =
    OpenCover.map (OpenCover.pullbackCover 𝒰 (PullbackCone.fst s)) b ≫ PullbackCone.fst s

Next tactic:
erw [Multicoequalizer.π_desc, pullback.lift_fst_assoc, pullback.condition]
theorem gluedLift_p1 : gluedLift 𝒰 f g s ≫ p1 𝒰 f g = s.fst := 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]
  -- Porting note : `Category.comp_id` is no longer necessary, don't know where `𝟙 _` has gone
  erw [Multicoequalizer.π_desc, pullback.lift_fst_assoc, pullback.condition]
  

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.fst s =
    OpenCover.map (OpenCover.pullbackCover 𝒰 (PullbackCone.fst s)) b ≫ PullbackCone.fst s

Next tactic:
rw [pullbackSymmetry_hom_comp_snd_assoc]
theorem gluedLift_p1 : gluedLift 𝒰 f g s ≫ p1 𝒰 f g = s.fst := 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]
  -- Porting note : `Category.comp_id` is no longer necessary, don't know where `𝟙 _` has gone
  erw [Multicoequalizer.π_desc, pullback.lift_fst_assoc, pullback.condition]
  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.fst s =
    OpenCover.map (OpenCover.pullbackCover 𝒰 (PullbackCone.fst s)) b ≫ PullbackCone.fst s

Next tactic:
rfl
theorem gluedLift_p2 : gluedLift 𝒰 f g s ≫ p2 𝒰 f g = s.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
⊢ gluedLift 𝒰 f g s ≫ p2 𝒰 f g = PullbackCone.snd s

Next tactic:
rw [← cancel_epi (𝒰.pullbackCover s.fst).fromGlued]
theorem gluedLift_p2 : gluedLift 𝒰 f g s ≫ p2 𝒰 f g = s.snd := by
  rw [← cancel_epi (𝒰.pullbackCover s.fst).fromGlued]
  

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
⊢ OpenCover.fromGlued (OpenCover.pullbackCover 𝒰 (PullbackCone.fst s)) ≫ gluedLift 𝒰 f g s ≫ p2 𝒰 f g =
    OpenCover.fromGlued (OpenCover.pullbackCover 𝒰 (PullbackCone.fst s)) ≫ PullbackCone.snd s

Next tactic:
apply Multicoequalizer.hom_ext
theorem gluedLift_p2 : gluedLift 𝒰 f g s ≫ p2 𝒰 f g = s.snd := by
  rw [← cancel_epi (𝒰.pullbackCover s.fst).fromGlued]
  apply Multicoequalizer.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
⊢ ∀ (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:
intro b