l3lab/ntp-mathlib huggingface dataset:
/-- The identity diffeomorphism between a manifold with model `I` and the same manifold
with model `I.trans_diffeomorph e`. -/
def toTransDiffeomorph (e : E ≃ₘ[𝕜] F) : M ≃ₘ⟮I, I.transDiffeomorph e⟯ M where
  toEquiv := Equiv.refl M
  contMDiff_toFun x := by
    refine' contMDiffWithinAt_iff'.2 ⟨continuousWithinAt_id, _⟩
    refine' e.contDiff.contDiffWithinAt.congr' (fun y hy => _) _
    · simp only [Equiv.coe_refl, id, (· ∘ ·), I.coe_extChartAt_transDiffeomorph]
      -- porting note: `simp only` failed to used next lemma, converted to `rw`
      rw [(extChartAt I x).right_inv hy.1]
    exact
      ⟨(extChartAt I x).map_source (mem_extChartAt_source I x), trivial, by simp only [mfld_simps]⟩
  contMDiff_invFun x := by
    refine' contMDiffWithinAt_iff'.2 ⟨continuousWithinAt_id, _⟩
    refine' e.symm.contDiff.contDiffWithinAt.congr' (fun y hy => _) _
    · simp only [mem_inter_iff, I.extChartAt_transDiffeomorph_target] at hy
      

Proof state:
case refine'_1
𝕜 : Type u_1
inst✝¹⁸ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝¹⁷ : NormedAddCommGroup E
inst✝¹⁶ : NormedSpace 𝕜 E
E' : Type u_3
inst✝¹⁵ : NormedAddCommGroup E'
inst✝¹⁴ : NormedSpace 𝕜 E'
F : Type u_4
inst✝¹³ : NormedAddCommGroup F
inst✝¹² : NormedSpace 𝕜 F
H : Type u_5
inst✝¹¹ : TopologicalSpace H
H' : Type u_6
inst✝¹⁰ : TopologicalSpace H'
G : Type u_7
inst✝⁹ : TopologicalSpace G
G' : Type u_8
inst✝⁸ : TopologicalSpace G'
I : ModelWithCorners 𝕜 E H
I' : ModelWithCorners 𝕜 E' H'
J : ModelWithCorners 𝕜 F G
J' : ModelWithCorners 𝕜 F G'
M : Type u_9
inst✝⁷ : TopologicalSpace M
inst✝⁶ : ChartedSpace H M
M' : Type u_10
inst✝⁵ : TopologicalSpace M'
inst✝⁴ : ChartedSpace H' M'
N : Type u_11
inst✝³ : TopologicalSpace N
inst✝² : ChartedSpace G N
N' : Type u_12
inst✝¹ : TopologicalSpace N'
inst✝ : ChartedSpace G' N'
n : ℕ∞
e✝ e : E ≃ₘ⟮𝓘(𝕜, E), 𝓘(𝕜, F)⟯ F
x : M
y : F
hy :
  y ∈ ⇑e.symm ⁻¹' (extChartAt I x).target ∧
    y ∈
      ↑(PartialEquiv.symm (extChartAt (ModelWithCorners.transDiffeomorph I e) x)) ⁻¹'
        (univ ∩ ⇑(Equiv.refl M).symm ⁻¹' (extChartAt I ((Equiv.refl M).symm x)).source)
⊢ (↑(extChartAt I ((Equiv.refl M).symm x)) ∘
        ⇑(Equiv.refl M).symm ∘ ↑(PartialEquiv.symm (extChartAt (ModelWithCorners.transDiffeomorph I e) x)))
      y =
    e.symm y

Next tactic:
simp only [Equiv.coe_refl, Equiv.refl_symm, id, (· ∘ ·),
        I.coe_extChartAt_transDiffeomorph_symm, (extChartAt I x).right_inv hy.1]
/-- The identity diffeomorphism between a manifold with model `I` and the same manifold
with model `I.trans_diffeomorph e`. -/
def toTransDiffeomorph (e : E ≃ₘ[𝕜] F) : M ≃ₘ⟮I, I.transDiffeomorph e⟯ M where
  toEquiv := Equiv.refl M
  contMDiff_toFun x := by
    refine' contMDiffWithinAt_iff'.2 ⟨continuousWithinAt_id, _⟩
    refine' e.contDiff.contDiffWithinAt.congr' (fun y hy => _) _
    · simp only [Equiv.coe_refl, id, (· ∘ ·), I.coe_extChartAt_transDiffeomorph]
      -- porting note: `simp only` failed to used next lemma, converted to `rw`
      rw [(extChartAt I x).right_inv hy.1]
    exact
      ⟨(extChartAt I x).map_source (mem_extChartAt_source I x), trivial, by simp only [mfld_simps]⟩
  contMDiff_invFun x := by
    refine' contMDiffWithinAt_iff'.2 ⟨continuousWithinAt_id, _⟩
    refine' e.symm.contDiff.contDiffWithinAt.congr' (fun y hy => _) _
    · simp only [mem_inter_iff, I.extChartAt_transDiffeomorph_target] at hy
      simp only [Equiv.coe_refl, Equiv.refl_symm, id, (· ∘ ·),
        I.coe_extChartAt_transDiffeomorph_symm, (extChartAt I x).right_inv hy.1]
    

Proof state:
case refine'_2
𝕜 : Type u_1
inst✝¹⁸ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝¹⁷ : NormedAddCommGroup E
inst✝¹⁶ : NormedSpace 𝕜 E
E' : Type u_3
inst✝¹⁵ : NormedAddCommGroup E'
inst✝¹⁴ : NormedSpace 𝕜 E'
F : Type u_4
inst✝¹³ : NormedAddCommGroup F
inst✝¹² : NormedSpace 𝕜 F
H : Type u_5
inst✝¹¹ : TopologicalSpace H
H' : Type u_6
inst✝¹⁰ : TopologicalSpace H'
G : Type u_7
inst✝⁹ : TopologicalSpace G
G' : Type u_8
inst✝⁸ : TopologicalSpace G'
I : ModelWithCorners 𝕜 E H
I' : ModelWithCorners 𝕜 E' H'
J : ModelWithCorners 𝕜 F G
J' : ModelWithCorners 𝕜 F G'
M : Type u_9
inst✝⁷ : TopologicalSpace M
inst✝⁶ : ChartedSpace H M
M' : Type u_10
inst✝⁵ : TopologicalSpace M'
inst✝⁴ : ChartedSpace H' M'
N : Type u_11
inst✝³ : TopologicalSpace N
inst✝² : ChartedSpace G N
N' : Type u_12
inst✝¹ : TopologicalSpace N'
inst✝ : ChartedSpace G' N'
n : ℕ∞
e✝ e : E ≃ₘ⟮𝓘(𝕜, E), 𝓘(𝕜, F)⟯ F
x : M
⊢ ↑(extChartAt (ModelWithCorners.transDiffeomorph I e) x) x ∈
    (extChartAt (ModelWithCorners.transDiffeomorph I e) x).target ∩
      ↑(PartialEquiv.symm (extChartAt (ModelWithCorners.transDiffeomorph I e) x)) ⁻¹'
        (univ ∩ ⇑(Equiv.refl M).symm ⁻¹' (extChartAt I ((Equiv.refl M).symm x)).source)

Next tactic:
exact ⟨(extChartAt _ x).map_source (mem_extChartAt_source _ x), trivial, by
      simp only [e.symm_apply_apply, Equiv.refl_symm, Equiv.coe_refl, mfld_simps]⟩
/-- The identity diffeomorphism between a manifold with model `I` and the same manifold
with model `I.trans_diffeomorph e`. -/
def toTransDiffeomorph (e : E ≃ₘ[𝕜] F) : M ≃ₘ⟮I, I.transDiffeomorph e⟯ M where
  toEquiv := Equiv.refl M
  contMDiff_toFun x := by
    refine' contMDiffWithinAt_iff'.2 ⟨continuousWithinAt_id, _⟩
    refine' e.contDiff.contDiffWithinAt.congr' (fun y hy => _) _
    · simp only [Equiv.coe_refl, id, (· ∘ ·), I.coe_extChartAt_transDiffeomorph]
      -- porting note: `simp only` failed to used next lemma, converted to `rw`
      rw [(extChartAt I x).right_inv hy.1]
    exact
      ⟨(extChartAt I x).map_source (mem_extChartAt_source I x), trivial, by simp only [mfld_simps]⟩
  contMDiff_invFun x := by
    refine' contMDiffWithinAt_iff'.2 ⟨continuousWithinAt_id, _⟩
    refine' e.symm.contDiff.contDiffWithinAt.congr' (fun y hy => _) _
    · simp only [mem_inter_iff, I.extChartAt_transDiffeomorph_target] at hy
      simp only [Equiv.coe_refl, Equiv.refl_symm, id, (· ∘ ·),
        I.coe_extChartAt_transDiffeomorph_symm, (extChartAt I x).right_inv hy.1]
    exact ⟨(extChartAt _ x).map_source (mem_extChartAt_source _ x), trivial, by
      

Proof state:
𝕜 : Type u_1
inst✝¹⁸ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝¹⁷ : NormedAddCommGroup E
inst✝¹⁶ : NormedSpace 𝕜 E
E' : Type u_3
inst✝¹⁵ : NormedAddCommGroup E'
inst✝¹⁴ : NormedSpace 𝕜 E'
F : Type u_4
inst✝¹³ : NormedAddCommGroup F
inst✝¹² : NormedSpace 𝕜 F
H : Type u_5
inst✝¹¹ : TopologicalSpace H
H' : Type u_6
inst✝¹⁰ : TopologicalSpace H'
G : Type u_7
inst✝⁹ : TopologicalSpace G
G' : Type u_8
inst✝⁸ : TopologicalSpace G'
I : ModelWithCorners 𝕜 E H
I' : ModelWithCorners 𝕜 E' H'
J : ModelWithCorners 𝕜 F G
J' : ModelWithCorners 𝕜 F G'
M : Type u_9
inst✝⁷ : TopologicalSpace M
inst✝⁶ : ChartedSpace H M
M' : Type u_10
inst✝⁵ : TopologicalSpace M'
inst✝⁴ : ChartedSpace H' M'
N : Type u_11
inst✝³ : TopologicalSpace N
inst✝² : ChartedSpace G N
N' : Type u_12
inst✝¹ : TopologicalSpace N'
inst✝ : ChartedSpace G' N'
n : ℕ∞
e✝ e : E ≃ₘ⟮𝓘(𝕜, E), 𝓘(𝕜, F)⟯ F
x : M
⊢ ↑(PartialEquiv.symm (extChartAt (ModelWithCorners.transDiffeomorph I e) x))
      (↑(extChartAt (ModelWithCorners.transDiffeomorph I e) x) x) ∈
    ⇑(Equiv.refl M).symm ⁻¹' (extChartAt I ((Equiv.refl M).symm x)).source

Next tactic:
simp only [e.symm_apply_apply, Equiv.refl_symm, Equiv.coe_refl, mfld_simps]
@[simp, elementwise]
theorem res_π (i : ι) : res F U ≫ limit.π _ ⟨i⟩ = F.map (Opens.leSupr U i).op := by
  

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasProducts C
X : TopCat
F : Presheaf C X
ι : Type v'
U : ι → Opens ↑X
i : ι
⊢ res F U ≫ limit.π (Discrete.functor fun i => F.obj (op (U i))) { as := i } = F.map (leSupr U i).op

Next tactic:
rw [res, limit.lift_π, Fan.mk_π_app]
@[elementwise]
theorem w : res F U ≫ leftRes F U = res F U ≫ rightRes F U := by
  

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasProducts C
X : TopCat
F : Presheaf C X
ι : Type v'
U : ι → Opens ↑X
⊢ res F U ≫ leftRes F U = res F U ≫ rightRes F U

Next tactic:
dsimp [res, leftRes, rightRes]
@[elementwise]
theorem w : res F U ≫ leftRes F U = res F U ≫ rightRes F U := by
  dsimp [res, leftRes, rightRes]
  -- Porting note : `ext` can't see `limit.hom_ext` applies here:
  -- See https://github.com/leanprover-community/mathlib4/issues/5229
  

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasProducts C
X : TopCat
F : Presheaf C X
ι : Type v'
U : ι → Opens ↑X
⊢ ((Pi.lift fun i => F.map (leSupr U i).op) ≫
      Pi.lift fun p => Pi.π (fun i => F.obj (op (U i))) p.1 ≫ F.map (infLELeft (U p.1) (U p.2)).op) =
    (Pi.lift fun i => F.map (leSupr U i).op) ≫
      Pi.lift fun p => Pi.π (fun i => F.obj (op (U i))) p.2 ≫ F.map (infLERight (U p.1) (U p.2)).op

Next tactic:
refine limit.hom_ext (fun _ => ?_)
@[elementwise]
theorem w : res F U ≫ leftRes F U = res F U ≫ rightRes F U := by
  dsimp [res, leftRes, rightRes]
  -- Porting note : `ext` can't see `limit.hom_ext` applies here:
  -- See https://github.com/leanprover-community/mathlib4/issues/5229
  refine limit.hom_ext (fun _ => ?_)
  

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasProducts C
X : TopCat
F : Presheaf C X
ι : Type v'
U : ι → Opens ↑X
x✝ : Discrete (ι × ι)
⊢ ((Pi.lift fun i => F.map (leSupr U i).op) ≫
        Pi.lift fun p => Pi.π (fun i => F.obj (op (U i))) p.1 ≫ F.map (infLELeft (U p.1) (U p.2)).op) ≫
      limit.π (Discrete.functor fun p => F.obj (op (U p.1 ⊓ U p.2))) x✝ =
    ((Pi.lift fun i => F.map (leSupr U i).op) ≫
        Pi.lift fun p => Pi.π (fun i => F.obj (op (U i))) p.2 ≫ F.map (infLERight (U p.1) (U p.2)).op) ≫
      limit.π (Discrete.functor fun p => F.obj (op (U p.1 ⊓ U p.2))) x✝

Next tactic:
simp only [limit.lift_π, limit.lift_π_assoc, Fan.mk_π_app, Category.assoc]
@[elementwise]
theorem w : res F U ≫ leftRes F U = res F U ≫ rightRes F U := by
  dsimp [res, leftRes, rightRes]
  -- Porting note : `ext` can't see `limit.hom_ext` applies here:
  -- See https://github.com/leanprover-community/mathlib4/issues/5229
  refine limit.hom_ext (fun _ => ?_)
  simp only [limit.lift_π, limit.lift_π_assoc, Fan.mk_π_app, Category.assoc]
  

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasProducts C
X : TopCat
F : Presheaf C X
ι : Type v'
U : ι → Opens ↑X
x✝ : Discrete (ι × ι)
⊢ F.map (leSupr U x✝.as.1).op ≫ F.map (infLELeft (U x✝.as.1) (U x✝.as.2)).op =
    F.map (leSupr U x✝.as.2).op ≫ F.map (infLERight (U x✝.as.1) (U x✝.as.2)).op

Next tactic:
rw [← F.map_comp]
@[elementwise]
theorem w : res F U ≫ leftRes F U = res F U ≫ rightRes F U := by
  dsimp [res, leftRes, rightRes]
  -- Porting note : `ext` can't see `limit.hom_ext` applies here:
  -- See https://github.com/leanprover-community/mathlib4/issues/5229
  refine limit.hom_ext (fun _ => ?_)
  simp only [limit.lift_π, limit.lift_π_assoc, Fan.mk_π_app, Category.assoc]
  rw [← F.map_comp]
  

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasProducts C
X : TopCat
F : Presheaf C X
ι : Type v'
U : ι → Opens ↑X
x✝ : Discrete (ι × ι)
⊢ F.map ((leSupr U x✝.as.1).op ≫ (infLELeft (U x✝.as.1) (U x✝.as.2)).op) =
    F.map (leSupr U x✝.as.2).op ≫ F.map (infLERight (U x✝.as.1) (U x✝.as.2)).op

Next tactic:
rw [← F.map_comp]
@[elementwise]
theorem w : res F U ≫ leftRes F U = res F U ≫ rightRes F U := by
  dsimp [res, leftRes, rightRes]
  -- Porting note : `ext` can't see `limit.hom_ext` applies here:
  -- See https://github.com/leanprover-community/mathlib4/issues/5229
  refine limit.hom_ext (fun _ => ?_)
  simp only [limit.lift_π, limit.lift_π_assoc, Fan.mk_π_app, Category.assoc]
  rw [← F.map_comp]
  rw [← F.map_comp]
  

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasProducts C
X : TopCat
F : Presheaf C X
ι : Type v'
U : ι → Opens ↑X
x✝ : Discrete (ι × ι)
⊢ F.map ((leSupr U x✝.as.1).op ≫ (infLELeft (U x✝.as.1) (U x✝.as.2)).op) =
    F.map ((leSupr U x✝.as.2).op ≫ (infLERight (U x✝.as.1) (U x✝.as.2)).op)

Next tactic:
congr 1
/-- Isomorphic presheaves have isomorphic sheaf condition diagrams. -/
def diagram.isoOfIso (α : F ≅ G) : diagram F U ≅ diagram.{v'} G U :=
  NatIso.ofComponents (by 

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasProducts C
X : TopCat
F : Presheaf C X
ι : Type v'
U : ι → Opens ↑X
G : Presheaf C X
α : F ≅ G
⊢ (X_1 : WalkingParallelPair) → (diagram F U).obj X_1 ≅ (diagram G U).obj X_1

Next tactic:
rintro ⟨⟩
/-- Isomorphic presheaves have isomorphic sheaf condition diagrams. -/
def diagram.isoOfIso (α : F ≅ G) : diagram F U ≅ diagram.{v'} G U :=
  NatIso.ofComponents (by rintro ⟨⟩; 

Proof state:
case zero
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasProducts C
X : TopCat
F : Presheaf C X
ι : Type v'
U : ι → Opens ↑X
G : Presheaf C X
α : F ≅ G
⊢ (diagram F U).obj WalkingParallelPair.zero ≅ (diagram G U).obj WalkingParallelPair.zero
case one
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasProducts C
X : TopCat
F : Presheaf C X
ι : Type v'
U : ι → Opens ↑X
G : Presheaf C X
α : F ≅ G
⊢ (diagram F U).obj WalkingParallelPair.one ≅ (diagram G U).obj WalkingParallelPair.one

Next tactic:
exact piOpens.isoOfIso U α
/-- Isomorphic presheaves have isomorphic sheaf condition diagrams. -/
def diagram.isoOfIso (α : F ≅ G) : diagram F U ≅ diagram.{v'} G U :=
  NatIso.ofComponents (by rintro ⟨⟩; exact piOpens.isoOfIso U α; 

Proof state:
case one
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasProducts C
X : TopCat
F : Presheaf C X
ι : Type v'
U : ι → Opens ↑X
G : Presheaf C X
α : F ≅ G
⊢ (diagram F U).obj WalkingParallelPair.one ≅ (diagram G U).obj WalkingParallelPair.one

Next tactic:
exact piInters.isoOfIso U α
/-- Isomorphic presheaves have isomorphic sheaf condition diagrams. -/
def diagram.isoOfIso (α : F ≅ G) : diagram F U ≅ diagram.{v'} G U :=
  NatIso.ofComponents (by rintro ⟨⟩; exact piOpens.isoOfIso U α; exact piInters.isoOfIso U α)
    (by
      

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasProducts C
X : TopCat
F : Presheaf C X
ι : Type v'
U : ι → Opens ↑X
G : Presheaf C X
α : F ≅ G
⊢ ∀ {X_1 Y : WalkingParallelPair} (f : X_1 ⟶ Y),
    (diagram F U).map f ≫ (WalkingParallelPair.casesOn Y (piOpens.isoOfIso U α) (piInters.isoOfIso U α)).hom =
      (WalkingParallelPair.casesOn X_1 (piOpens.isoOfIso U α) (piInters.isoOfIso U α)).hom ≫ (diagram G U).map f

Next tactic:
rintro ⟨⟩ ⟨⟩ ⟨⟩
/-- Isomorphic presheaves have isomorphic sheaf condition diagrams. -/
def diagram.isoOfIso (α : F ≅ G) : diagram F U ≅ diagram.{v'} G U :=
  NatIso.ofComponents (by rintro ⟨⟩; exact piOpens.isoOfIso U α; exact piInters.isoOfIso U α)
    (by
      rintro ⟨⟩ ⟨⟩ ⟨⟩
      · 

Proof state:
case zero.zero.id
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasProducts C
X : TopCat
F : Presheaf C X
ι : Type v'
U : ι → Opens ↑X
G : Presheaf C X
α : F ≅ G
⊢ (diagram F U).map (WalkingParallelPairHom.id WalkingParallelPair.zero) ≫
      (WalkingParallelPair.casesOn WalkingParallelPair.zero (piOpens.isoOfIso U α) (piInters.isoOfIso U α)).hom =
    (WalkingParallelPair.casesOn WalkingParallelPair.zero (piOpens.isoOfIso U α) (piInters.isoOfIso U α)).hom ≫
      (diagram G U).map (WalkingParallelPairHom.id WalkingParallelPair.zero)

Next tactic:
simp
/-- Isomorphic presheaves have isomorphic sheaf condition diagrams. -/
def diagram.isoOfIso (α : F ≅ G) : diagram F U ≅ diagram.{v'} G U :=
  NatIso.ofComponents (by rintro ⟨⟩; exact piOpens.isoOfIso U α; exact piInters.isoOfIso U α)
    (by
      rintro ⟨⟩ ⟨⟩ ⟨⟩
      · simp
      · -- Porting note : `ext` can't see `limit.hom_ext` applies here:
        -- See https://github.com/leanprover-community/mathlib4/issues/5229
        

Proof state:
case zero.one.left
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasProducts C
X : TopCat
F : Presheaf C X
ι : Type v'
U : ι → Opens ↑X
G : Presheaf C X
α : F ≅ G
⊢ (diagram F U).map WalkingParallelPairHom.left ≫
      (WalkingParallelPair.casesOn WalkingParallelPair.one (piOpens.isoOfIso U α) (piInters.isoOfIso U α)).hom =
    (WalkingParallelPair.casesOn WalkingParallelPair.zero (piOpens.isoOfIso U α) (piInters.isoOfIso U α)).hom ≫
      (diagram G U).map WalkingParallelPairHom.left

Next tactic:
refine limit.hom_ext (fun _ => ?_)
/-- Isomorphic presheaves have isomorphic sheaf condition diagrams. -/
def diagram.isoOfIso (α : F ≅ G) : diagram F U ≅ diagram.{v'} G U :=
  NatIso.ofComponents (by rintro ⟨⟩; exact piOpens.isoOfIso U α; exact piInters.isoOfIso U α)
    (by
      rintro ⟨⟩ ⟨⟩ ⟨⟩
      · simp
      · -- Porting note : `ext` can't see `limit.hom_ext` applies here:
        -- See https://github.com/leanprover-community/mathlib4/issues/5229
        refine limit.hom_ext (fun _ => ?_)
        

Proof state:
case zero.one.left
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasProducts C
X : TopCat
F : Presheaf C X
ι : Type v'
U : ι → Opens ↑X
G : Presheaf C X
α : F ≅ G
x✝ : Discrete (ι × ι)
⊢ ((diagram F U).map WalkingParallelPairHom.left ≫
        (WalkingParallelPair.casesOn WalkingParallelPair.one (piOpens.isoOfIso U α) (piInters.isoOfIso U α)).hom) ≫
      limit.π (Discrete.functor fun p => G.obj (op (U p.1 ⊓ U p.2))) x✝ =
    ((WalkingParallelPair.casesOn WalkingParallelPair.zero (piOpens.isoOfIso U α) (piInters.isoOfIso U α)).hom ≫
        (diagram G U).map WalkingParallelPairHom.left) ≫
      limit.π (Discrete.functor fun p => G.obj (op (U p.1 ⊓ U p.2))) x✝

Next tactic:
simp only [leftRes, piOpens.isoOfIso, piInters.isoOfIso, parallelPair_map_left,
          Functor.mapIso_hom, lim_map, limit.lift_map, limit.lift_π, Cones.postcompose_obj_π,
          NatTrans.comp_app, Fan.mk_π_app, Discrete.natIso_hom_app, Iso.app_hom, Category.assoc,
          NatTrans.naturality, limMap_π_assoc]
/-- Isomorphic presheaves have isomorphic sheaf condition diagrams. -/
def diagram.isoOfIso (α : F ≅ G) : diagram F U ≅ diagram.{v'} G U :=
  NatIso.ofComponents (by rintro ⟨⟩; exact piOpens.isoOfIso U α; exact piInters.isoOfIso U α)
    (by
      rintro ⟨⟩ ⟨⟩ ⟨⟩
      · simp
      · -- Porting note : `ext` can't see `limit.hom_ext` applies here:
        -- See https://github.com/leanprover-community/mathlib4/issues/5229
        refine limit.hom_ext (fun _ => ?_)
        simp only [leftRes, piOpens.isoOfIso, piInters.isoOfIso, parallelPair_map_left,
          Functor.mapIso_hom, lim_map, limit.lift_map, limit.lift_π, Cones.postcompose_obj_π,
          NatTrans.comp_app, Fan.mk_π_app, Discrete.natIso_hom_app, Iso.app_hom, Category.assoc,
          NatTrans.naturality, limMap_π_assoc]
      · -- Porting note : `ext` can't see `limit.hom_ext` applies here:
        -- See https://github.com/leanprover-community/mathlib4/issues/5229
        

Proof state:
case zero.one.right
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasProducts C
X : TopCat
F : Presheaf C X
ι : Type v'
U : ι → Opens ↑X
G : Presheaf C X
α : F ≅ G
⊢ (diagram F U).map WalkingParallelPairHom.right ≫
      (WalkingParallelPair.casesOn WalkingParallelPair.one (piOpens.isoOfIso U α) (piInters.isoOfIso U α)).hom =
    (WalkingParallelPair.casesOn WalkingParallelPair.zero (piOpens.isoOfIso U α) (piInters.isoOfIso U α)).hom ≫
      (diagram G U).map WalkingParallelPairHom.right

Next tactic:
refine limit.hom_ext (fun _ => ?_)
/-- Isomorphic presheaves have isomorphic sheaf condition diagrams. -/
def diagram.isoOfIso (α : F ≅ G) : diagram F U ≅ diagram.{v'} G U :=
  NatIso.ofComponents (by rintro ⟨⟩; exact piOpens.isoOfIso U α; exact piInters.isoOfIso U α)
    (by
      rintro ⟨⟩ ⟨⟩ ⟨⟩
      · simp
      · -- Porting note : `ext` can't see `limit.hom_ext` applies here:
        -- See https://github.com/leanprover-community/mathlib4/issues/5229
        refine limit.hom_ext (fun _ => ?_)
        simp only [leftRes, piOpens.isoOfIso, piInters.isoOfIso, parallelPair_map_left,
          Functor.mapIso_hom, lim_map, limit.lift_map, limit.lift_π, Cones.postcompose_obj_π,
          NatTrans.comp_app, Fan.mk_π_app, Discrete.natIso_hom_app, Iso.app_hom, Category.assoc,
          NatTrans.naturality, limMap_π_assoc]
      · -- Porting note : `ext` can't see `limit.hom_ext` applies here:
        -- See https://github.com/leanprover-community/mathlib4/issues/5229
        refine limit.hom_ext (fun _ => ?_)
        

Proof state:
case zero.one.right
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasProducts C
X : TopCat
F : Presheaf C X
ι : Type v'
U : ι → Opens ↑X
G : Presheaf C X
α : F ≅ G
x✝ : Discrete (ι × ι)
⊢ ((diagram F U).map WalkingParallelPairHom.right ≫
        (WalkingParallelPair.casesOn WalkingParallelPair.one (piOpens.isoOfIso U α) (piInters.isoOfIso U α)).hom) ≫
      limit.π (Discrete.functor fun p => G.obj (op (U p.1 ⊓ U p.2))) x✝ =
    ((WalkingParallelPair.casesOn WalkingParallelPair.zero (piOpens.isoOfIso U α) (piInters.isoOfIso U α)).hom ≫
        (diagram G U).map WalkingParallelPairHom.right) ≫
      limit.π (Discrete.functor fun p => G.obj (op (U p.1 ⊓ U p.2))) x✝

Next tactic:
simp only [rightRes, piOpens.isoOfIso, piInters.isoOfIso, parallelPair_map_right,
          Functor.mapIso_hom, lim_map, limit.lift_map, limit.lift_π, Cones.postcompose_obj_π,
          NatTrans.comp_app, Fan.mk_π_app, Discrete.natIso_hom_app, Iso.app_hom, Category.assoc,
          NatTrans.naturality, limMap_π_assoc]
/-- Isomorphic presheaves have isomorphic sheaf condition diagrams. -/
def diagram.isoOfIso (α : F ≅ G) : diagram F U ≅ diagram.{v'} G U :=
  NatIso.ofComponents (by rintro ⟨⟩; exact piOpens.isoOfIso U α; exact piInters.isoOfIso U α)
    (by
      rintro ⟨⟩ ⟨⟩ ⟨⟩
      · simp
      · -- Porting note : `ext` can't see `limit.hom_ext` applies here:
        -- See https://github.com/leanprover-community/mathlib4/issues/5229
        refine limit.hom_ext (fun _ => ?_)
        simp only [leftRes, piOpens.isoOfIso, piInters.isoOfIso, parallelPair_map_left,
          Functor.mapIso_hom, lim_map, limit.lift_map, limit.lift_π, Cones.postcompose_obj_π,
          NatTrans.comp_app, Fan.mk_π_app, Discrete.natIso_hom_app, Iso.app_hom, Category.assoc,
          NatTrans.naturality, limMap_π_assoc]
      · -- Porting note : `ext` can't see `limit.hom_ext` applies here:
        -- See https://github.com/leanprover-community/mathlib4/issues/5229
        refine limit.hom_ext (fun _ => ?_)
        simp only [rightRes, piOpens.isoOfIso, piInters.isoOfIso, parallelPair_map_right,
          Functor.mapIso_hom, lim_map, limit.lift_map, limit.lift_π, Cones.postcompose_obj_π,
          NatTrans.comp_app, Fan.mk_π_app, Discrete.natIso_hom_app, Iso.app_hom, Category.assoc,
          NatTrans.naturality, limMap_π_assoc]
      · 

Proof state:
case one.one.id
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasProducts C
X : TopCat
F : Presheaf C X
ι : Type v'
U : ι → Opens ↑X
G : Presheaf C X
α : F ≅ G
⊢ (diagram F U).map (WalkingParallelPairHom.id WalkingParallelPair.one) ≫
      (WalkingParallelPair.casesOn WalkingParallelPair.one (piOpens.isoOfIso U α) (piInters.isoOfIso U α)).hom =
    (WalkingParallelPair.casesOn WalkingParallelPair.one (piOpens.isoOfIso U α) (piInters.isoOfIso U α)).hom ≫
      (diagram G U).map (WalkingParallelPairHom.id WalkingParallelPair.one)

Next tactic:
simp
/-- If `F G : presheaf C X` are isomorphic presheaves,
then the `fork F U`, the canonical cone of the sheaf condition diagram for `F`,
is isomorphic to `fork F G` postcomposed with the corresponding isomorphism between
sheaf condition diagrams.
-/
def fork.isoOfIso (α : F ≅ G) :
    fork F U ≅ (Cones.postcompose (diagram.isoOfIso U α).inv).obj (fork G U) := by
  

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasProducts C
X : TopCat
F : Presheaf C X
ι : Type v'
U : ι → Opens ↑X
G : Presheaf C X
α : F ≅ G
⊢ fork F U ≅ (Cones.postcompose (diagram.isoOfIso U α).inv).obj (fork G U)

Next tactic:
fapply Fork.ext
/-- If `F G : presheaf C X` are isomorphic presheaves,
then the `fork F U`, the canonical cone of the sheaf condition diagram for `F`,
is isomorphic to `fork F G` postcomposed with the corresponding isomorphism between
sheaf condition diagrams.
-/
def fork.isoOfIso (α : F ≅ G) :
    fork F U ≅ (Cones.postcompose (diagram.isoOfIso U α).inv).obj (fork G U) := by
  fapply Fork.ext
  · 

Proof state:
case i
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasProducts C
X : TopCat
F : Presheaf C X
ι : Type v'
U : ι → Opens ↑X
G : Presheaf C X
α : F ≅ G
⊢ (fork F U).pt ≅ ((Cones.postcompose (diagram.isoOfIso U α).inv).obj (fork G U)).pt

Next tactic:
apply α.app