A synonym for ->
, acting as a carrier for the standard category of Sets.
Think of Fun A B
as analogous to the textbook "Set(A, B)".
Equations
- Category.Fun A B = (A → B)
Instances For
Naturally, we can form a category of types (in a given universe) and functions between them.
For Type
, we get the usual category of sets.
For Prop
, we instead get the category of propositions and implications.
Equations
- ⋯ = ⋯
Instances For
Equations
- Category.«term_⨂_» = Lean.ParserDescr.trailingNode `Category.«term_⨂_» 100 101 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ⨂ ") (Lean.ParserDescr.cat `term 100))
Instances For
A category structure on A ⨂ B
which is compatible with the underlying categories.
There's a natural way of turning A ⨂ B
into the morphisms of a category, which behaves
particularly nicely pointwise. This class captures that this category is being used,
allowing us to do reasoning beyond that of a plain category.
This is a bit of a "Lean hack" allowing us to assume that the category instance for
A ⨂ B
has particular properties relating it to A
and B
individually.
Instances
Equations
- Category.BiMorphism.bicategory = Category.BiCategory.mk ⋯ ⋯
The opposite of a given type of morphisms, i.e. morphisms in the reverse direction.
We define this as an opaque struct for better wieldiness.
- unop : A y x
Instances For
A morphism can be treated as an opposite morphism, with the direction reversed.
Equations
- Category.Op.op f = { unop := f }
Instances For
To show that two opposite morphisms are the same, show that the underlying morphisms are.
The category of opposites.
Because of our morphism centric approach, rather than looking at "the opposite category", we instead look at "the category of opposite morphisms".
Equations
- One or more equations did not get rendered due to their size.
The opposite identity is in fact just the identity.
Composing two opposite morphisms is just backwards composition.
Naturally, opposite morphisms form a category, if the underlying morphisms do.
Equations
- Category.Op.category = Category.mk ⋯ ⋯ ⋯