feat(CategoryTheory/Limits): Pullback squares in cartesian monoidal categories#37045
feat(CategoryTheory/Limits): Pullback squares in cartesian monoidal categories#37045edegeltje wants to merge 12 commits intoleanprover-community:masterfrom
Conversation
PR summary 96c77b07ffImport changes for modified filesNo significant changes to the import graph Import changes for all files
|
Mathlib/CategoryTheory/Limits/Shapes/Pullback/IsPullback/CartesianMonoidal.lean
Outdated
Show resolved
Hide resolved
Mathlib/CategoryTheory/Limits/Shapes/Pullback/IsPullback/CartesianMonoidal.lean
Outdated
Show resolved
Hide resolved
Mathlib/CategoryTheory/Limits/Shapes/Pullback/IsPullback/CartesianMonoidal.lean
Outdated
Show resolved
Hide resolved
Mathlib/CategoryTheory/Limits/Shapes/Pullback/IsPullback/CartesianMonoidal.lean
Outdated
Show resolved
Hide resolved
Mathlib/CategoryTheory/Limits/Shapes/Pullback/IsPullback/CartesianMonoidal.lean
Outdated
Show resolved
Hide resolved
Mathlib/CategoryTheory/Limits/Shapes/Pullback/IsPullback/CartesianMonoidal.lean
Outdated
Show resolved
Hide resolved
Mathlib/CategoryTheory/Limits/Shapes/Pullback/IsPullback/CartesianMonoidal.lean
Outdated
Show resolved
Hide resolved
Mathlib/CategoryTheory/Limits/Shapes/Pullback/IsPullback/CartesianMonoidal.lean
Outdated
Show resolved
Hide resolved
Mathlib/CategoryTheory/Limits/Shapes/Pullback/IsPullback/CartesianMonoidal.lean
Outdated
Show resolved
Hide resolved
Mathlib/CategoryTheory/Limits/Shapes/Pullback/IsPullback/CartesianMonoidal.lean
Outdated
Show resolved
Hide resolved
| /-- | ||
| In a cartesian monoidal category, the following is a pullback square: | ||
| ``` | ||
| (f ▷ Z) | ||
| X ⊗ Z → Y ⊗ Z | ||
| | | | ||
| π₁ π₁ | ||
| ↓ ↓ | ||
| X -f→ Y | ||
| ``` | ||
| -/ | ||
| lemma IsPullback.whiskerRight_horiz {X Y : C} (f : X ⟶ Y) (Z : C) : | ||
| IsPullback (f ▷ Z) (fst X Z) (fst Y Z) f := by | ||
| refine IsPullback.of_isLimit' (by simp) ?_ | ||
| apply PullbackCone.IsLimit.mk _ fun s => CartesianMonoidalCategory.lift s.snd (s.fst ≫ snd _ _) | ||
| · intro s | ||
| ext <;> simp [s.condition] | ||
| · cat_disch | ||
| · intro s m hm₁ hm₂ | ||
| ext | ||
| · simpa | ||
| · simp [← hm₁] |
There was a problem hiding this comment.
I didn’t try with this one, but perhaps you can reduce it to CategoryTheory.IsPullback.of_prod_fst_with_id?
There was a problem hiding this comment.
i tried it, and it turns out that that lemma is bait. instead this is more easily proven with IsPullback.of_right and IsPullback.fst_snd_toUnit_toUnit twice. In order to go the route via IsPullback.of_prod_fst_with_id, we need better API for an Iso between Limits.prod and tensorObj. I wrote some API in the Monoidal/Cartesian/Basic file, which can be split from this PR if you think it's good enough.
|
Also, since we're adding this kind of square, we could as well give this one as a shortcut lemma isPullback_toUnit_toUnit (X Y : C) :
IsPullback (fst X Y) (snd X Y) (toUnit _) (toUnit _) :=
.of_isLimit_binaryFan_of_isTerminal (tensorProductIsBinaryProduct X Y) isTerminalTensorUnit(or maybe with a better name) |
Mathlib/CategoryTheory/Limits/Shapes/Pullback/IsPullback/CartesianMonoidal.lean
Outdated
Show resolved
Hide resolved
Mathlib/CategoryTheory/Limits/Shapes/Pullback/IsPullback/CartesianMonoidal.lean
Outdated
Show resolved
Hide resolved
Mathlib/CategoryTheory/Limits/Shapes/Pullback/IsPullback/CartesianMonoidal.lean
Outdated
Show resolved
Hide resolved
Mathlib/CategoryTheory/Limits/Shapes/Pullback/IsPullback/CartesianMonoidal.lean
Outdated
Show resolved
Hide resolved
| use hpb.lift (a ≫ f) (CartesianMonoidalCategory.lift a b) (by cat_disch) | ||
| simp) | ||
|
|
||
| lemma IsPullback.pullback_fst_monoidal {A₁ A₂ A₃ B₁ B₂ B₃ Z₁ Z₂ : C} |
There was a problem hiding this comment.
| lemma IsPullback.pullback_fst_monoidal {A₁ A₂ A₃ B₁ B₂ B₃ Z₁ Z₂ : C} | |
| lemma IsPullback.comp_lift_of_isPullback {A₁ A₂ A₃ B₁ B₂ B₃ Z₁ Z₂ : C} |
maybe? I have to admit I’m not sure what would be a good name for this one, but given that fst is not in the statement, I think the current one is not correct. Same for its snd twin below.
Also, can you please copy over the description from the module docstring as a docstring here? so that in other files we can have some info by hovering of the term
There was a problem hiding this comment.
the fst refers to the fact that we're taking the pullback of the top morphisms in two pullback squares which are commonly named fst as a variable, similar to how one would refer to pullback.fst if we were using the HasPullback API... but i agree that it's hard to determine the statement of the lemma merely from the names. I suppose we might just drop the snd version, since it can be obtained relatively easily from this one some combination of fliping the fst version? which then leaves name space (hah) for the fst version not to mention fst
There was a problem hiding this comment.
I removed the snd variant. I decided to also add of_cartesianMonoidal to the name, since other than that i don't see what disambiguates this lemma from the (possibly hypothetical) HasProducts variant (i.e. the one that uses Limits.prod instead), but i'm open to other disambiguating strategies. I did this for the HasEqualizer lemmas as well
This PR adds various lemmas about standard pullback squares in categories with chosen finite products.