Opposites #
In this file we define a structure Opposite α
containing a single field of type α
and
two bijections op : α → αᵒᵖ
and unop : αᵒᵖ → α
. If α
is a category, then αᵒᵖ
is the
opposite category, with all arrows reversed.
The type of objects of the opposite of α
; used to define the opposite category.
Now that Lean 4 supports definitional eta equality for records,
both unop (op X) = X
and op (unop X) = X
are definitional equalities.
Equations
- «term_ᵒᵖ» = Lean.ParserDescr.trailingNode `term_ᵒᵖ 1024 0 (Lean.ParserDescr.symbol "ᵒᵖ")
Instances For
@[simp]
The type-level equivalence between a type and its opposite.
Equations
- Opposite.equivToOpposite = { toFun := Opposite.op, invFun := Opposite.unop, left_inv := (_ : ∀ (x : α), (Opposite.op x).unop = x), right_inv := (_ : ∀ (x : αᵒᵖ), Opposite.op x.unop = x) }
Instances For
@[simp]
@[simp]
theorem
Opposite.equivToOpposite_symm_coe
{α : Sort u}
:
↑Opposite.equivToOpposite.symm = Opposite.unop
Equations
- Opposite.instInhabitedOpposite = { default := Opposite.op default }
A recursor for Opposite
.
The @[eliminator]
attribute makes it the default induction principle for Opposite
so you don't need to use induction x using Opposite.rec'
.
Equations
- Opposite.rec' h X = h X.unop