Categories #
Defines a category, as a type class parametrised by the type of objects.
Notations #
Introduces notations in the CategoryTheory
scope
X ⟶ Y
for the morphism spaces (type as\hom
),𝟙 X
for the identity morphism onX
(type as\b1
),f ≫ g
for composition in the 'arrows' convention (type as\gg
).
Users may like to add f ⊚ g
for composition in the standard convention, using
local notation f ` ⊚ `:80 g:80 := category.comp g f -- 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
- CategoryTheory.«term_≫_» = Lean.ParserDescr.trailingNode `CategoryTheory.term_≫_ 80 81 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ≫ ") (Lean.ParserDescr.cat `term 80))
Instances For
A thin wrapper for aesop
which adds the CategoryTheory
rule set and
allows aesop
to look through semireducible definitions when calling intros
.
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
- 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.
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 https://stacks.math.columbia.edu/tag/0014.
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
- left_cancellation : ∀ {Z : C} (g h : Y ⟶ Z), CategoryTheory.CategoryStruct.comp f g = CategoryTheory.CategoryStruct.comp f h → g = h
A morphism
f
is an epimorphism if it can be cancelled when precomposed.
A morphism f
is an epimorphism if it can be cancelled when precomposed:
f ≫ g = f ≫ h
implies g = h
.
See https://stacks.math.columbia.edu/tag/003B.
Instances
- right_cancellation : ∀ {Z : C} (g h : Z ⟶ X), CategoryTheory.CategoryStruct.comp g f = CategoryTheory.CategoryStruct.comp h f → g = h
A morphism
f
is a monomorphism if it can be cancelled when postcomposed.
A morphism f
is a monomorphism if it can be cancelled when postcomposed:
g ≫ f = h ≫ f
implies g = h
.
See https://stacks.math.columbia.edu/tag/003B.
Instances
Equations
- CategoryTheory.uliftCategory C = CategoryTheory.Category.mk