Bundled types #
Bundled c
provides a uniform structure for bundling a type equipped with a type class.
We provide Category
instances for these in
Mathlib/CategoryTheory/HasForget/UnbundledHom.lean
(for categories with unbundled homs, e.g. topological spaces)
and in Mathlib/CategoryTheory/HasForget/BundledHom.lean
(for categories with bundled homs, e.g. monoids).
A generic function for lifting a type equipped with an instance to a bundled object.
Equations
- CategoryTheory.Bundled.of α = { α := α, str := str }
Instances For
Equations
@[reducible, inline]
abbrev
CategoryTheory.Bundled.map
{c d : Type u → Type v}
(f : {α : Type u} → c α → d α)
(b : Bundled c)
:
Bundled d
Map over the bundled structure
Equations
- CategoryTheory.Bundled.map f b = { α := ↑b, str := f b.str }