File: Mathlib/Data/Opposite.lean

full_name: Opposite.op
code: /-- 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.

-/
structure Opposite :=
  /-- The canonical map `α → αᵒᵖ`. -/
  op ::
  /-- The canonical map `αᵒᵖ → α`. -/
  unop : α
goal: αᵒᵖ

full_name: Opposite.unop
code: /-- 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.

-/
structure Opposite :=
  /-- The canonical map `α → αᵒᵖ`. -/
  op ::
  /-- The canonical map `αᵒᵖ → α`. -/
  unop : α
goal: α

full_name: Opposite
code: /-- 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.

-/
structure Opposite :=
  /-- The canonical map `α → αᵒᵖ`. -/
  op ::
  /-- The canonical map `αᵒᵖ → α`. -/
  unop : α
goal: Sort (max 1 u)

full_name: Opposite.unexpander_op
code: /-- Make sure that `Opposite.op a` is pretty-printed as `op a` instead of `{ unop := a }` or
`⟨a⟩`. -/
@[app_unexpander Opposite.op]
protected def Opposite.unexpander_op : Lean.PrettyPrinter.Unexpander
  
goal: Lean.PrettyPrinter.Unexpander

full_name: _aux_Mathlib_Data_Opposite___unexpand_Opposite_1
code: @[inherit_doc]
notation:max -- Use a high right binding power (like that of postfix ⁻¹) so that, for example,
-- `Presheaf Cᵒᵖ` parses as `Presheaf (Cᵒᵖ)` and not `(Presheaf C)ᵒᵖ`.
α "ᵒᵖ" => Opposite α
goal: Lean.PrettyPrinter.Unexpander

full_name: «_aux_Mathlib_Data_Opposite___macroRules_term_ᵒᵖ_1»
code: @[inherit_doc]
notation:max -- Use a high right binding power (like that of postfix ⁻¹) so that, for example,
-- `Presheaf Cᵒᵖ` parses as `Presheaf (Cᵒᵖ)` and not `(Presheaf C)ᵒᵖ`.
α "ᵒᵖ" => Opposite α
goal: Lean.Macro

full_name: Opposite.op_injective
code: theorem op_injective : Function.Injective (op : α → αᵒᵖ) 
goal: Function.Injective Opposite.op

full_name: Opposite.unop_injective
code: theorem unop_injective : Function.Injective (unop : αᵒᵖ → α) 
goal: Function.Injective Opposite.unop

full_name: Opposite.op_unop
code: @[simp]
theorem op_unop (x : αᵒᵖ) : op (unop x) = x 
goal: Opposite.op (Opposite.unop x) = x

full_name: Opposite.unop_op
code: theorem unop_op (x : α) : unop (op x) = x 
goal: Opposite.unop (Opposite.op x) = x

full_name: Opposite.op_inj_iff
code: theorem op_inj_iff (x y : α) : op x = op y ↔ x = y 
goal: Opposite.op x = Opposite.op y ↔ x = y

full_name: Opposite.unop_inj_iff
code: @[simp]
theorem unop_inj_iff (x y : αᵒᵖ) : unop x = unop y ↔ x = y 
goal: Opposite.unop x = Opposite.unop y ↔ x = y

full_name: Opposite.equivToOpposite
code: /-- The type-level equivalence between a type and its opposite. -/
def equivToOpposite : α ≃ αᵒᵖ 
goal: α ≃ αᵒᵖ

full_name: Opposite.op_surjective
code: theorem op_surjective : Function.Surjective (op : α → αᵒᵖ) 
goal: Function.Surjective Opposite.op

full_name: Opposite.unop_surjective
code: theorem unop_surjective : Function.Surjective (unop : αᵒᵖ → α) 
goal: Function.Surjective Opposite.unop

full_name: Opposite.equivToOpposite_coe
code: @[simp]
theorem equivToOpposite_coe : (equivToOpposite : α → αᵒᵖ) = op 
goal: ⇑Opposite.equivToOpposite = Opposite.op

full_name: Opposite.equivToOpposite_symm_coe
code: @[simp]
theorem equivToOpposite_symm_coe : (equivToOpposite.symm : αᵒᵖ → α) = unop 
goal: ⇑Opposite.equivToOpposite.symm = Opposite.unop

full_name: Opposite.op_eq_iff_eq_unop
code: theorem op_eq_iff_eq_unop {x : α} {y} : op x = y ↔ x = unop y 
goal: Opposite.op x = y ↔ x = Opposite.unop y

full_name: Opposite.unop_eq_iff_eq_op
code: theorem unop_eq_iff_eq_op {x} {y : α} : unop x = y ↔ x = op y 
goal: Opposite.unop x = y ↔ x = Opposite.op y

full_name: Opposite.instInhabited
code: instance [Inhabited α] : Inhabited αᵒᵖ 
goal: Inhabited αᵒᵖ

full_name: Opposite.instNonempty
code: instance [Nonempty α] : Nonempty αᵒᵖ 
goal: Nonempty αᵒᵖ

full_name: Opposite.instSubsingleton
code: instance [Subsingleton α] : Subsingleton αᵒᵖ 
goal: Subsingleton αᵒᵖ

full_name: Opposite.rec'
code: /-- A recursor for `Opposite`.
The `@[induction_eliminator]` attribute makes it the default induction principle for `Opposite`
so you don't need to use `induction x using Opposite.rec'`. -/
@[simp, induction_eliminator]
protected def rec' {F : αᵒᵖ → Sort v} (h : ∀ X, F (op X)) : ∀ X, F X 
goal: F X