Constant functors are QPFs #
Constant functors map every type vectors to the same target type. This
is a useful device for constructing data types from more basic types
that are not actually functorial. For instance Const n Nat makes
Nat into a functor that can be used in a functor-based data type
specification.
Constant multivariate functor
Instances For
@[implicit_reducible]
instance
MvQPF.Const.inhabited
(n : ℕ)
{A : Type u_1}
{α : TypeVec.{u_2} n}
[Inhabited A]
:
Inhabited (Const n A α)
Constructor for constant functor
Instances For
Destructor for constant functor
Instances For
@[simp]
@[simp]
map for constant functor
Instances For
@[implicit_reducible]
theorem
MvQPF.Const.map_mk
{n : ℕ}
{A : Type u}
{α β : TypeVec.{u} n}
(f : α.Arrow β)
(x : A)
:
MvFunctor.map f (Const.mk x) = Const.mk x
theorem
MvQPF.Const.get_map
{n : ℕ}
{A : Type u}
{α β : TypeVec.{u} n}
(f : α.Arrow β)
(x : Const n A α)
:
(MvFunctor.map f x).get = x.get
@[implicit_reducible]