Theorem: AlgebraicGeometry.morphismRestrict_comp
File: Mathlib/AlgebraicGeometry/Restrict.lean

Proof steps:
state_before: C : Type u₁
inst✝ : Category.{v, u₁} C
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
U : Opens ↑↑Z.toPresheafedSpace
⊢ (f ≫ g) ∣_ U = f ∣_ g ⁻¹ᵁ U ≫ g ∣_ U
state_after: C : Type u₁
inst✝ : Category.{v, u₁} C
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
U : Opens ↑↑Z.toPresheafedSpace
⊢ (pullbackRestrictIsoRestrict (f ≫ g) U).inv ≫ pullback.snd (f ≫ g) (Scheme.Opens.ι U) =
    ((pullbackRestrictIsoRestrict f (g ⁻¹ᵁ U)).inv ≫ pullback.snd f (g ⁻¹ᵁ U).ι) ≫
      (pullbackRestrictIsoRestrict g U).inv ≫ pullback.snd g (Scheme.Opens.ι U)
tactic: delta morphismRestrict
state_before: C : Type u₁
inst✝ : Category.{v, u₁} C
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
U : Opens ↑↑Z.toPresheafedSpace
⊢ (pullbackRestrictIsoRestrict (f ≫ g) U).inv ≫ pullback.snd (f ≫ g) (Scheme.Opens.ι U) =
    ((pullbackRestrictIsoRestrict f (g ⁻¹ᵁ U)).inv ≫ pullback.snd f (g ⁻¹ᵁ U).ι) ≫
      (pullbackRestrictIsoRestrict g U).inv ≫ pullback.snd g (Scheme.Opens.ι U)
state_after: C : Type u₁
inst✝ : Category.{v, u₁} C
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
U : Opens ↑↑Z.toPresheafedSpace
⊢ (pullbackRestrictIsoRestrict (f ≫ g) U).inv ≫
      (pullbackRightPullbackFstIso g (Scheme.Opens.ι U) f).inv ≫
        pullback.snd f (pullback.fst g (Scheme.Opens.ι U)) ≫ pullback.snd g (Scheme.Opens.ι U) =
    ((pullbackRestrictIsoRestrict f (g ⁻¹ᵁ U)).inv ≫ pullback.snd f (g ⁻¹ᵁ U).ι) ≫
      (pullbackRestrictIsoRestrict g U).inv ≫ pullback.snd g (Scheme.Opens.ι U)
tactic: rw [← pullbackRightPullbackFstIso_inv_snd_snd]
state_before: C : Type u₁
inst✝ : Category.{v, u₁} C
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
U : Opens ↑↑Z.toPresheafedSpace
⊢ (pullbackRestrictIsoRestrict (f ≫ g) U).inv ≫
      (pullbackRightPullbackFstIso g (Scheme.Opens.ι U) f).inv ≫
        pullback.snd f (pullback.fst g (Scheme.Opens.ι U)) ≫ pullback.snd g (Scheme.Opens.ι U) =
    ((pullbackRestrictIsoRestrict f (g ⁻¹ᵁ U)).inv ≫ pullback.snd f (g ⁻¹ᵁ U).ι) ≫
      (pullbackRestrictIsoRestrict g U).inv ≫ pullback.snd g (Scheme.Opens.ι U)
state_after: C : Type u₁
inst✝ : Category.{v, u₁} C
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
U : Opens ↑↑Z.toPresheafedSpace
⊢ (((pullbackRestrictIsoRestrict (f ≫ g) U).inv ≫ (pullbackRightPullbackFstIso g (Scheme.Opens.ι U) f).inv) ≫
        pullback.snd f (pullback.fst g (Scheme.Opens.ι U))) ≫
      pullback.snd g (Scheme.Opens.ι U) =
    (((pullbackRestrictIsoRestrict f (g ⁻¹ᵁ U)).inv ≫ pullback.snd f (g ⁻¹ᵁ U).ι) ≫
        (pullbackRestrictIsoRestrict g U).inv) ≫
      pullback.snd g (Scheme.Opens.ι U)
tactic: simp_rw [← Category.assoc]
state_before: C : Type u₁
inst✝ : Category.{v, u₁} C
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
U : Opens ↑↑Z.toPresheafedSpace
⊢ (((pullbackRestrictIsoRestrict (f ≫ g) U).inv ≫ (pullbackRightPullbackFstIso g (Scheme.Opens.ι U) f).inv) ≫
        pullback.snd f (pullback.fst g (Scheme.Opens.ι U))) ≫
      pullback.snd g (Scheme.Opens.ι U) =
    (((pullbackRestrictIsoRestrict f (g ⁻¹ᵁ U)).inv ≫ pullback.snd f (g ⁻¹ᵁ U).ι) ≫
        (pullbackRestrictIsoRestrict g U).inv) ≫
      pullback.snd g (Scheme.Opens.ι U)
state_after: case e_a
C : Type u₁
inst✝ : Category.{v, u₁} C
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
U : Opens ↑↑Z.toPresheafedSpace
⊢ ((pullbackRestrictIsoRestrict (f ≫ g) U).inv ≫ (pullbackRightPullbackFstIso g (Scheme.Opens.ι U) f).inv) ≫
      pullback.snd f (pullback.fst g (Scheme.Opens.ι U)) =
    ((pullbackRestrictIsoRestrict f (g ⁻¹ᵁ U)).inv ≫ pullback.snd f (g ⁻¹ᵁ U).ι) ≫ (pullbackRestrictIsoRestrict g U).inv
tactic: congr 1
state_before: case e_a
C : Type u₁
inst✝ : Category.{v, u₁} C
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
U : Opens ↑↑Z.toPresheafedSpace
⊢ ((pullbackRestrictIsoRestrict (f ≫ g) U).inv ≫ (pullbackRightPullbackFstIso g (Scheme.Opens.ι U) f).inv) ≫
      pullback.snd f (pullback.fst g (Scheme.Opens.ι U)) =
    ((pullbackRestrictIsoRestrict f (g ⁻¹ᵁ U)).inv ≫ pullback.snd f (g ⁻¹ᵁ U).ι) ≫ (pullbackRestrictIsoRestrict g U).inv
state_after: case e_a
C : Type u₁
inst✝ : Category.{v, u₁} C
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
U : Opens ↑↑Z.toPresheafedSpace
⊢ (((pullbackRestrictIsoRestrict (f ≫ g) U).inv ≫ (pullbackRightPullbackFstIso g (Scheme.Opens.ι U) f).inv) ≫
        pullback.snd f (pullback.fst g (Scheme.Opens.ι U))) ≫
      pullback.fst g (Scheme.Opens.ι U) =
    (((pullbackRestrictIsoRestrict f (g ⁻¹ᵁ U)).inv ≫ pullback.snd f (g ⁻¹ᵁ U).ι) ≫
        (pullbackRestrictIsoRestrict g U).inv) ≫
      pullback.fst g (Scheme.Opens.ι U)
tactic: rw [← cancel_mono (pullback.fst _ _)]
state_before: case e_a
C : Type u₁
inst✝ : Category.{v, u₁} C
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
U : Opens ↑↑Z.toPresheafedSpace
⊢ (((pullbackRestrictIsoRestrict (f ≫ g) U).inv ≫ (pullbackRightPullbackFstIso g (Scheme.Opens.ι U) f).inv) ≫
        pullback.snd f (pullback.fst g (Scheme.Opens.ι U))) ≫
      pullback.fst g (Scheme.Opens.ι U) =
    (((pullbackRestrictIsoRestrict f (g ⁻¹ᵁ U)).inv ≫ pullback.snd f (g ⁻¹ᵁ U).ι) ≫
        (pullbackRestrictIsoRestrict g U).inv) ≫
      pullback.fst g (Scheme.Opens.ι U)
state_after: case e_a
C : Type u₁
inst✝ : Category.{v, u₁} C
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
U : Opens ↑↑Z.toPresheafedSpace
⊢ (pullbackRestrictIsoRestrict (f ≫ g) U).inv ≫
      (pullbackRightPullbackFstIso g (Scheme.Opens.ι U) f).inv ≫
        pullback.snd f (pullback.fst g (Scheme.Opens.ι U)) ≫ pullback.fst g (Scheme.Opens.ι U) =
    (pullbackRestrictIsoRestrict f (g ⁻¹ᵁ U)).inv ≫
      pullback.snd f (g ⁻¹ᵁ U).ι ≫ (pullbackRestrictIsoRestrict g U).inv ≫ pullback.fst g (Scheme.Opens.ι U)
tactic: simp_rw [Category.assoc]
state_before: case e_a
C : Type u₁
inst✝ : Category.{v, u₁} C
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
U : Opens ↑↑Z.toPresheafedSpace
⊢ (pullbackRestrictIsoRestrict (f ≫ g) U).inv ≫
      (pullbackRightPullbackFstIso g (Scheme.Opens.ι U) f).inv ≫
        pullback.snd f (pullback.fst g (Scheme.Opens.ι U)) ≫ pullback.fst g (Scheme.Opens.ι U) =
    (pullbackRestrictIsoRestrict f (g ⁻¹ᵁ U)).inv ≫
      pullback.snd f (g ⁻¹ᵁ U).ι ≫ (pullbackRestrictIsoRestrict g U).inv ≫ pullback.fst g (Scheme.Opens.ι U)
state_after: case e_a
C : Type u₁
inst✝ : Category.{v, u₁} C
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
U : Opens ↑↑Z.toPresheafedSpace
⊢ ((f ≫ g) ⁻¹ᵁ U).ι ≫ f = (f ⁻¹ᵁ g ⁻¹ᵁ U).ι ≫ f
tactic: rw [pullbackRestrictIsoRestrict_inv_fst, pullbackRightPullbackFstIso_inv_snd_fst, ←
    pullback.condition, pullbackRestrictIsoRestrict_inv_fst_assoc,
    pullbackRestrictIsoRestrict_inv_fst_assoc]
state_before: case e_a
C : Type u₁
inst✝ : Category.{v, u₁} C
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
U : Opens ↑↑Z.toPresheafedSpace
⊢ ((f ≫ g) ⁻¹ᵁ U).ι ≫ f = (f ⁻¹ᵁ g ⁻¹ᵁ U).ι ≫ f
state_after: no goals
tactic: rfl