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.
Equations
Instances For
recursor of a type defined by a qpf
Equations
Instances For
access the underlying W-type of a fixpoint data type
Equations
Instances For
constructor of a type defined by a qpf
Equations
Instances For
destructor of a type defined by a qpf
Equations
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.
Equations
Instances For
A qpf is said to be uniform if every polynomial functor representing a single value all have the same range.