Quotients of Polynomial Functors #
We assume the following:
P: a polynomial functorW: its W-typeM: its M-typeF: a functor
We define:
The main goal is to construct:
Fix: the initial algebra with structure mapF Fix β Fix.Cofix: the final coalgebra with structure mapCofix β F Cofix
We also show that the composition of qpfs is a qpf, and that the quotient of a qpf is a qpf.
The present theory focuses on the univariate case for qpfs
References #
- [Jeremy Avigad, Mario M. Carneiro and Simon Hudon, Data Types as Quotients of Polynomial Functors][avigad-carneiro-hudon2019]
Quotients of polynomial functors.
Roughly speaking, saying that F is a quotient of a polynomial functor means that for each Ξ±,
elements of F Ξ± are represented by pairs β¨a, fβ©, where a is the shape of the object and
f indexes the relevant elements of Ξ±, in a suitably natural manner.
- P : PFunctor.{u, u'}
Instances
two trees are equivalent if their F-abstractions are
- ind {F : Type u β Type v} [q : QPF F] (a : (P F).A) (f f' : (P F).B a β (P F).W) : (β (x : (P F).B a), Wequiv (f x) (f' x)) β Wequiv (WType.mk a f) (WType.mk a f')
- abs {F : Type u β Type v} [q : QPF F] (a : (P F).A) (f : (P F).B a β (P F).W) (a' : (P F).A) (f' : (P F).B a' β (P F).W) : QPF.abs β¨a, fβ© = QPF.abs β¨a', f'β© β Wequiv (WType.mk a f) (WType.mk a' f')
- trans {F : Type u β Type v} [q : QPF F] (u v w : (P F).W) : Wequiv u v β Wequiv v w β Wequiv u w
Instances For
Define the fixed point as the quotient of trees under the equivalence relation Wequiv.
Instances For
recursor of a type defined by a qpf
Instances For
access the underlying W-type of a fixpoint data type
Instances For
constructor of a type defined by a qpf
Instances For
destructor of a type defined by a qpf
Instances For
does recursion on q.P.M using g : Ξ± β F Ξ± rather than g : Ξ± β P Ξ±
Instances For
destructor for type defined by Cofix
Instances For
Given a qpf F and a well-behaved surjection FG_abs from F Ξ± to
functor G Ξ±, G is a qpf. We can consider G a quotient on F where
elements x y : F Ξ± are in the same equivalence class if
FG_abs x = FG_abs y.
Instances For
A qpf is said to be uniform if every polynomial functor representing a single value all have the same range.
Instances For
does abs preserve Liftp?
Instances For
does abs preserve supp?