Categories #
Defines a category, as a type class parametrised by the type of objects.
Notations #
Introduces notations in the CategoryTheory scope
X ⟶ Yfor the morphism spaces (type as\hom),𝟙 Xfor the identity morphism onX(type as\b1),f ≫ gfor composition in the 'arrows' convention (type as\gg).
Users may like to add g ⊚ f for composition in the standard convention, using
local notation g ` ⊚ `:80 f:80 := category.comp f g -- type as \oo
Porting note #
I am experimenting with using the aesop tactic as a replacement for tidy.
A wrapper for ext that we can pass to aesop.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Notation for the identity morphism in a category.
Equations
- CategoryTheory.«term𝟙» = Lean.ParserDescr.node `CategoryTheory.term𝟙 1024 (Lean.ParserDescr.symbol "𝟙")
Instances For
Notation for composition of morphisms in a category.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A thin wrapper for aesop which adds the CategoryTheory rule set and
allows aesop to look through semireducible definitions when calling intros.
It also turns on zetaDelta in the simp config, allowing aesop_cat to unfold any lets.
This tactic fails when it is unable to solve the goal, making it suitable for
use in auto-params.
Equations
- One or more equations did not get rendered due to their size.
Instances For
We also use aesop_cat? to pass along a Try this suggestion when using aesop_cat
Equations
- One or more equations did not get rendered due to their size.
Instances For
A variant of aesop_cat which does not fail when it is unable to solve the
goal. Use this only for exploration! Nonterminal aesop is even worse than
nonterminal simp.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The typeclass Category C describes morphisms associated to objects of type C.
The universe levels of the objects and morphisms are unconstrained, and will often need to be
specified explicitly, as Category.{v} C. (See also LargeCategory and SmallCategory.)
See
- Hom : obj → obj → Type v
- id : (X : obj) → X ⟶ X
- id_comp : ∀ {X Y : obj} (f : X ⟶ Y), CategoryTheory.CategoryStruct.comp (CategoryTheory.CategoryStruct.id X) f = f
Identity morphisms are left identities for composition.
- comp_id : ∀ {X Y : obj} (f : X ⟶ Y), CategoryTheory.CategoryStruct.comp f (CategoryTheory.CategoryStruct.id Y) = f
Identity morphisms are right identities for composition.
- assoc : ∀ {W X Y Z : obj} (f : W ⟶ X) (g : X ⟶ Y) (h : Y ⟶ Z), CategoryTheory.CategoryStruct.comp (CategoryTheory.CategoryStruct.comp f g) h = CategoryTheory.CategoryStruct.comp f (CategoryTheory.CategoryStruct.comp g h)
Composition in a category is associative.
Instances
A LargeCategory has objects in one universe level higher than the universe level of
the morphisms. It is useful for examples such as the category of types, or the category
of groups, etc.
Instances For
A SmallCategory has objects and morphisms in the same universe level.
Equations
Instances For
postcompose an equation between morphisms by another morphism
precompose an equation between morphisms by another morphism
Notation for whiskering an equation by a morphism (on the right).
If f g : X ⟶ Y and w : f = g and h : Y ⟶ Z, then w =≫ h : f ≫ h = g ≫ h.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Notation for whiskering an equation by a morphism (on the left).
If g h : Y ⟶ Z and w : g = h and h : X ⟶ Y, then f ≫= w : f ≫ g = f ≫ h.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A morphism f is an epimorphism if it can be cancelled when precomposed:
f ≫ g = f ≫ h implies g = h.
See
- left_cancellation : ∀ {Z : C} (g h : Y ⟶ Z), CategoryTheory.CategoryStruct.comp f g = CategoryTheory.CategoryStruct.comp f h → g = h
A morphism
fis an epimorphism if it can be cancelled when precomposed.
Instances
A morphism f is a monomorphism if it can be cancelled when postcomposed:
g ≫ f = h ≫ f implies g = h.
See
- right_cancellation : ∀ {Z : C} (g h : Z ⟶ X), CategoryTheory.CategoryStruct.comp g f = CategoryTheory.CategoryStruct.comp h f → g = h
A morphism
fis a monomorphism if it can be cancelled when postcomposed.
Instances
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯