mathlib documentation

category_theory.concrete_category.bundled

Bundled types

bundled c provides a uniform structure for bundling a type equipped with a type class.

We provide category instances for these in category_theory/unbundled_hom.lean (for categories with unbundled homs, e.g. topological spaces) and in category_theory/bundled_hom.lean (for categories with bundled homs, e.g. monoids).

@[nolint]
structure category_theory.bundled  :
(Type uType v)Type (max (u+1) v)
  • α : Type ?
  • str : c c_1.α . "apply_instance"

bundled is a type bundled with a type class instance for that type. Only the type class is exposed as a parameter.

def category_theory.bundled.of {c : Type uType v} (α : Type u) [str : c α] :

A generic function for lifting a type equipped with an instance to a bundled object.

Equations
@[simp]
theorem category_theory.bundled.coe_mk {c : Type uType v} (α : Type u) (str : c α . "apply_instance") :
{α := α, str := str} = α

def category_theory.bundled.map {c d : Type uType v} :
(Π {α : Type u}, c αd α)category_theory.bundled ccategory_theory.bundled d

Map over the bundled structure

Equations