File: Mathlib/CategoryTheory/Limits/Shapes/Pullback/Pasting.lean

full_name: CategoryTheory.Limits.bigSquareIsPullback
code: /-- Given

```
X₁ - f₁ -> X₂ - f₂ -> X₃
|          |          |
i₁         i₂         i₃
↓          ↓          ↓
Y₁ - g₁ -> Y₂ - g₂ -> Y₃
```

Then the big square is a pullback if both the small squares are.
-/
def bigSquareIsPullback (H : IsLimit (PullbackCone.mk _ _ h₂))
    (H' : IsLimit (PullbackCone.mk _ _ h₁)) :
    IsLimit
      (PullbackCone.mk _ _
        (show i₁ ≫ g₁ ≫ g₂ = (f₁ ≫ f₂) ≫ i₃ by
          rw [← Category.assoc, h₁, Category.assoc, h₂, Category.assoc])) 
goal: CategoryTheory.Limits.IsLimit (CategoryTheory.Limits.PullbackCone.mk i₁ (f₁ ≫ f₂) ⋯)

full_name: CategoryTheory.Limits.bigSquareIsPushout
code: /-- Given

```
X₁ - f₁ -> X₂ - f₂ -> X₃
|          |          |
i₁         i₂         i₃
↓          ↓          ↓
Y₁ - g₁ -> Y₂ - g₂ -> Y₃
```

Then the big square is a pushout if both the small squares are.
-/
def bigSquareIsPushout (H : IsColimit (PushoutCocone.mk _ _ h₂))
    (H' : IsColimit (PushoutCocone.mk _ _ h₁)) :
    IsColimit
      (PushoutCocone.mk _ _
        (show i₁ ≫ g₁ ≫ g₂ = (f₁ ≫ f₂) ≫ i₃ by
          rw [← Category.assoc, h₁, Category.assoc, h₂, Category.assoc])) 
goal: CategoryTheory.Limits.IsColimit (CategoryTheory.Limits.PushoutCocone.mk (g₁ ≫ g₂) i₃ ⋯)

full_name: CategoryTheory.Limits.leftSquareIsPullback
code: /-- Given

```
X₁ - f₁ -> X₂ - f₂ -> X₃
|          |          |
i₁         i₂         i₃
↓          ↓          ↓
Y₁ - g₁ -> Y₂ - g₂ -> Y₃
```

Then the left square is a pullback if the right square and the big square are.
-/
def leftSquareIsPullback (H : IsLimit (PullbackCone.mk _ _ h₂))
    (H' :
      IsLimit
        (PullbackCone.mk _ _
          (show i₁ ≫ g₁ ≫ g₂ = (f₁ ≫ f₂) ≫ i₃ by
            rw [← Category.assoc, h₁, Category.assoc, h₂, Category.assoc]))) :
    IsLimit (PullbackCone.mk _ _ h₁) 
goal: CategoryTheory.Limits.IsLimit (CategoryTheory.Limits.PullbackCone.mk i₁ f₁ h₁)

full_name: CategoryTheory.Limits.rightSquareIsPushout
code: /-- Given

```
X₁ - f₁ -> X₂ - f₂ -> X₃
|          |          |
i₁         i₂         i₃
↓          ↓          ↓
Y₁ - g₁ -> Y₂ - g₂ -> Y₃
```

Then the right square is a pushout if the left square and the big square are.
-/
def rightSquareIsPushout (H : IsColimit (PushoutCocone.mk _ _ h₁))
    (H' :
      IsColimit
        (PushoutCocone.mk _ _
          (show i₁ ≫ g₁ ≫ g₂ = (f₁ ≫ f₂) ≫ i₃ by
            rw [← Category.assoc, h₁, Category.assoc, h₂, Category.assoc]))) :
    IsColimit (PushoutCocone.mk _ _ h₂) 
goal: CategoryTheory.Limits.IsColimit (CategoryTheory.Limits.PushoutCocone.mk g₂ i₃ h₂)

full_name: CategoryTheory.Limits.pullbackRightPullbackFstIso
code: /-- The canonical isomorphism `W ×[X] (X ×[Z] Y) ≅ W ×[Z] Y` -/
noncomputable def pullbackRightPullbackFstIso :
    pullback f' (pullback.fst f g) ≅ pullback (f' ≫ f) g 
goal: CategoryTheory.Limits.pullback f' (CategoryTheory.Limits.pullback.fst f g) ≅ CategoryTheory.Limits.pullback (f' ≫ f) g

full_name: CategoryTheory.Limits.pullbackRightPullbackFstIso_hom_fst
code: @[reassoc (attr := simp)]
theorem pullbackRightPullbackFstIso_hom_fst :
    (pullbackRightPullbackFstIso f g f').hom ≫ pullback.fst _ _ = pullback.fst _ _ 
goal: (CategoryTheory.Limits.pullbackRightPullbackFstIso f g f').hom ≫ CategoryTheory.Limits.pullback.fst (f' ≫ f) g =
  CategoryTheory.Limits.pullback.fst f' (CategoryTheory.Limits.pullback.fst f g)

full_name: CategoryTheory.Limits.pullbackRightPullbackFstIso_hom_snd
code: @[reassoc (attr := simp)]
theorem pullbackRightPullbackFstIso_hom_snd :
    (pullbackRightPullbackFstIso f g f').hom ≫ pullback.snd _ _ =
      pullback.snd _ _ ≫ pullback.snd _ _ 
goal: (CategoryTheory.Limits.pullbackRightPullbackFstIso f g f').hom ≫ CategoryTheory.Limits.pullback.snd (f' ≫ f) g =
  CategoryTheory.Limits.pullback.snd f' (CategoryTheory.Limits.pullback.fst f g) ≫
    CategoryTheory.Limits.pullback.snd f g

full_name: CategoryTheory.Limits.pullbackRightPullbackFstIso_inv_fst
code: @[reassoc (attr := simp)]
theorem pullbackRightPullbackFstIso_inv_fst :
    (pullbackRightPullbackFstIso f g f').inv ≫ pullback.fst _ _ = pullback.fst _ _ 
goal: (CategoryTheory.Limits.pullbackRightPullbackFstIso f g f').inv ≫
    CategoryTheory.Limits.pullback.fst f' (CategoryTheory.Limits.pullback.fst f g) =
  CategoryTheory.Limits.pullback.fst (f' ≫ f) g

full_name: CategoryTheory.Limits.pullbackRightPullbackFstIso_inv_snd_snd
code: @[reassoc (attr := simp)]
theorem pullbackRightPullbackFstIso_inv_snd_snd :
    (pullbackRightPullbackFstIso f g f').inv ≫ pullback.snd _ _ ≫ pullback.snd _ _ =
      pullback.snd _ _ 
goal: (CategoryTheory.Limits.pullbackRightPullbackFstIso f g f').inv ≫
    CategoryTheory.Limits.pullback.snd f' (CategoryTheory.Limits.pullback.fst f g) ≫
      CategoryTheory.Limits.pullback.snd f g =
  CategoryTheory.Limits.pullback.snd (f' ≫ f) g

full_name: CategoryTheory.Limits.pullbackRightPullbackFstIso_inv_snd_fst
code: @[reassoc (attr := simp)]
theorem pullbackRightPullbackFstIso_inv_snd_fst :
    (pullbackRightPullbackFstIso f g f').inv ≫ pullback.snd _ _ ≫ pullback.fst _ _ =
      pullback.fst _ _ ≫ f' 
goal: (CategoryTheory.Limits.pullbackRightPullbackFstIso f g f').inv ≫
    CategoryTheory.Limits.pullback.snd f' (CategoryTheory.Limits.pullback.fst f g) ≫
      CategoryTheory.Limits.pullback.fst f g =
  CategoryTheory.Limits.pullback.fst (f' ≫ f) g ≫ f'

full_name: CategoryTheory.Limits.pushoutLeftPushoutInrIso
code: /-- The canonical isomorphism `(Y ⨿[X] Z) ⨿[Z] W ≅ Y ×[X] W` -/
noncomputable def pushoutLeftPushoutInrIso :
    pushout (pushout.inr _ _ : _ ⟶ pushout f g) g' ≅ pushout f (g ≫ g') 
goal: CategoryTheory.Limits.pushout (CategoryTheory.Limits.pushout.inr f g) g' ≅ CategoryTheory.Limits.pushout f (g ≫ g')

full_name: CategoryTheory.Limits.inl_pushoutLeftPushoutInrIso_inv
code: @[reassoc (attr := simp)]
theorem inl_pushoutLeftPushoutInrIso_inv :
    pushout.inl _ _ ≫ (pushoutLeftPushoutInrIso f g g').inv = pushout.inl _ _ ≫ pushout.inl _ _ 
goal: CategoryTheory.Limits.pushout.inl f (g ≫ g') ≫ (CategoryTheory.Limits.pushoutLeftPushoutInrIso f g g').inv =
  CategoryTheory.Limits.pushout.inl f g ≫ CategoryTheory.Limits.pushout.inl (CategoryTheory.Limits.pushout.inr f g) g'

full_name: CategoryTheory.Limits.inr_pushoutLeftPushoutInrIso_hom
code: @[reassoc (attr := simp)]
theorem inr_pushoutLeftPushoutInrIso_hom :
    pushout.inr _ _ ≫ (pushoutLeftPushoutInrIso f g g').hom = pushout.inr _ _ 
goal: CategoryTheory.Limits.pushout.inr (CategoryTheory.Limits.pushout.inr f g) g' ≫
    (CategoryTheory.Limits.pushoutLeftPushoutInrIso f g g').hom =
  CategoryTheory.Limits.pushout.inr f (g ≫ g')

full_name: CategoryTheory.Limits.inr_pushoutLeftPushoutInrIso_inv
code: @[reassoc (attr := simp)]
theorem inr_pushoutLeftPushoutInrIso_inv :
    pushout.inr _ _ ≫ (pushoutLeftPushoutInrIso f g g').inv = pushout.inr _ _ 
goal: CategoryTheory.Limits.pushout.inr f (g ≫ g') ≫ (CategoryTheory.Limits.pushoutLeftPushoutInrIso f g g').inv =
  CategoryTheory.Limits.pushout.inr (CategoryTheory.Limits.pushout.inr f g) g'

full_name: CategoryTheory.Limits.inl_inl_pushoutLeftPushoutInrIso_hom
code: @[reassoc (attr := simp)]
theorem inl_inl_pushoutLeftPushoutInrIso_hom :
    pushout.inl _ _ ≫ pushout.inl _ _ ≫ (pushoutLeftPushoutInrIso f g g').hom =
      pushout.inl _ _ 
goal: CategoryTheory.Limits.pushout.inl f g ≫
    CategoryTheory.Limits.pushout.inl (CategoryTheory.Limits.pushout.inr f g) g' ≫
      (CategoryTheory.Limits.pushoutLeftPushoutInrIso f g g').hom =
  CategoryTheory.Limits.pushout.inl f (g ≫ g')

full_name: CategoryTheory.Limits.inr_inl_pushoutLeftPushoutInrIso_hom
code: @[reassoc (attr := simp)]
theorem inr_inl_pushoutLeftPushoutInrIso_hom :
    pushout.inr _ _ ≫ pushout.inl _ _ ≫ (pushoutLeftPushoutInrIso f g g').hom =
      g' ≫ pushout.inr _ _ 
goal: CategoryTheory.Limits.pushout.inr f g ≫
    CategoryTheory.Limits.pushout.inl (CategoryTheory.Limits.pushout.inr f g) g' ≫
      (CategoryTheory.Limits.pushoutLeftPushoutInrIso f g g').hom =
  g' ≫ CategoryTheory.Limits.pushout.inr f (g ≫ g')