type t = Nil | One of int | Cons of int * t |
t
, with three constructors
that build values of type t
. These three constructors define the
complete signature of type t
.
Every constructor has an arity, i.e. the number of arguments it takes.
Here arity of Nil is zero,
while the arities of One and Cons are one and two
respectively.
A constructor of arity zero is called a constant constructor,
while other constructors are non-constant constructors.[]
and cons the infix constructor
::
), and tuples (the type of n-tuples defines one constructor
of arity n, pairs being written with the infix constructor “,”).
For our purpose, integers are constant constructors, and the signature
of the integer type is infinite.
|
(P → L)= |
|
|
V(_) | = | ∅ |
V(x) | = | {x} |
V(c(p1, … , pa)) | = | V(p1… pa) |
V(p1… pa) | = | V(p1) ∪ … ∪ V(pa) |
if for all i ≠ j, V(pi) ∩ V(pj) = ∅ | ||
V(p1∣p2) | = | V(p1), if V(p1) = V(p2) |
⎧ ⎪ ⎨ ⎪ ⎩ |
|
|
||||||
p↑(q1∣q2) = (q1∣q2)↑p |