- inj {a : Type} : f a → g a
Instances
- inj {a : Type} : f a → g a
Instances
Equations
- One or more equations did not get rendered due to their size.
A constructor of a functor / an inductive is characterized by the fixed types it contains, and the number of time it recurses. For example, the constructor
| foo: Nat → String → α → α → MyFunctor α
of a functor, or equivalently the constructor
| foo: Nat → String → MyInductive → MyInductive → MyInductive
of an inductive is described by the Ctor
{ Data := Nat × String nRec := 2 }
Instances For
Equations
- One or more equations did not get rendered due to their size.
A functor is "representable" when there exists a set of Ctor
such that the functor is isomorphic to FunctorRepr with this set of Ctor.
- CtorId : Type
- toRepr {a : Type} : f a → FunctorRepr ctors a
- fromRepr {a : Type} : FunctorRepr ctors a → f a
- sizeOf_eq {a : Type} [SizeOf a] (x : f a) : FunctorSizeOf.sizeOf x = FunctorSizeOf.sizeOf (toRepr x)
Instances
- id : CtorId
- as : Array (BareContainer ctors)
Instances For
Container ctors is a type that is, by construction, isomorphic to FunctorRepr ctors (Container ctors).
Equations
Instances For
When a functor is Representable, we can use ContainerFor as a shorthand for Container.
It has the property that ContainerFor f is isomorphic to f (ContainerFor f):
ContainerFor f
= Container ctors [by unfolding ContainerFor] ≅ FunctorRepr ctors (Container ctors) [by property of Container] = FunctorRepr ctors (ContainerFor f) [by refolding ContainerFor] ≅ f (ContainerFor f) [by f being Representable]
Instances For
When we have a collection of functors,
we can create the union using FunctorUnion.
Such an union is representable,
and each functor will then be a sub-functor of this union.
- id : a
- val : Functors self.id t
Instances For
- idHead : a
- idTail : Representable.CtorId (Functors self.idHead)
Instances For
Equations
- DY.ALaCarte.instFunctorSizeOfFunctorUnion Functors = { sizeOf := fun {t : Type} [SizeOf t] (x : DY.ALaCarte.FunctorUnion Functors t) => DY.ALaCarte.FunctorSizeOf.sizeOf x.val }
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
Instances For
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- DY.ALaCarte.Container.PartialFun f g a = ((x : f (DY.ALaCarte.ContainerFor g)) → ((y : DY.ALaCarte.ContainerFor g) → sizeOf y ≤ DY.ALaCarte.FunctorSizeOf.sizeOf x → a) → a)
Instances For
Generic recursion principle on Container.
This allows to define functions, predicates, and to do proofs.
Equations
- One or more equations did not get rendered due to their size.
Instances For
- pf (x : f (ContainerFor h)) (rec : (y : ContainerFor h) → sizeOf y ≤ FunctorSizeOf.sizeOf x → a) : f1 x rec = f2 (SubFunctor.inj x) fun (y : ContainerFor h) (h_1 : sizeOf y ≤ FunctorSizeOf.sizeOf (SubFunctor.inj x)) => rec y ⋯
Instances
- pf (x : f (ContainerFor h)) (rec : (y : ContainerFor h) → sizeOf y ≤ FunctorSizeOf.sizeOf x → a) : f1 x rec = f2 (SubFunctorTC.inj x) fun (y : ContainerFor h) (h_1 : sizeOf y ≤ FunctorSizeOf.sizeOf (SubFunctorTC.inj x)) => rec y ⋯
Instances
Equations
- DY.ALaCarte.Container.PartialFun.combine funs { id := id, val := val } rec_2 = funs id val rec_2
Instances For
Equations
- DY.ALaCarte.Container.PartialFunDep.combine funs { id := id, val := val } rec_2 = funs id val rec_2
Instances For
Helper to write a modular proof on one modular function
Equations
- One or more equations did not get rendered due to their size.
Instances For
Helper to write a modular proof on two modular functions
Equations
- One or more equations did not get rendered due to their size.