Module Product


module Product: sig  end
Theory of products.
Author(s): Harald Ruess


The signature P of pairs consists of A term a is pure in P if it is a variable or built-up completely from cons(b, c), car(b), cdr(b) with b, c interpreted. Nonpure terms are treated as variables.

The theory P of pairs consists of the equalities which can be derived using the usual equality rules and the universally quantified equations

A term is said to be canonical in P, if it does not contain any redex of the form car(cons(.,.)), cdr(cons(.,.)), or cons(car(.), cdr(.)). For a, b in canonical form: a = b holds in P iff a is syntactically equal to b (that is, Term.eqa b holds).

This module provides



val is_interp : Term.t -> bool
in_interp a holds if the top-level function symbol is in the signature of P.
Parameters:
? : Term.t
val is_pure : Term.t -> bool
is_pure a holds if every function symbol in a is in P; that is, only variables occur at uninterpreted positions.
Parameters:
? : Term.t
val mk_cons : Term.t -> Term.t -> Term.t
Given canonical terms a, b, mk_cons a b constructs a canonical term for representing a pair of a and b.
Parameters:
a : Term.t
b : Term.t
val mk_car : Term.t -> Term.t
Given a canonical term a, mk_car a constructs a canonical term for representing the first projection on a.
Parameters:
a : Term.t
val mk_cdr : Term.t -> Term.t
Given a canonical term a, mk_cdr a constructs a canonical term for representing the second projection on a.
Parameters:
a : Term.t
val mk_tuple : Term.t list -> Term.t
For n > 0 canonical terms ai, 0 <= i <= n, mk_tuple [a1;a2;...;an] constructs a canonical representation of (a1, ((a2, ...)...), an).
Parameters:
? : Term.t list
val mk_proj : int -> Term.t -> Term.t
mk_proj i a projects the term ai in a tuple of the form (a1, ((a2, ...)...), an).
Parameters:
i : int
a : Term.t
val map : (Term.t -> Term.t) -> Term.t -> Term.t
map f a applies f at uninterpreted positions of a an builds a canonical term from the results. More precisely,
Parameters:
f : Term.t -> Term.t
a : Term.t
val apply : Term.Equal.t -> Term.t -> Term.t
apply (x, b) a replaces uninterpreted occurrences of x in a with b, and returns a canonical form.
Parameters:
? : Term.Equal.t
? : Term.t
val sigma : Sym.product -> Term.t list -> Term.t
sigma op l applies the function symbol op from the pair theory to the list l of argument terms to build a canonical term equal to op(l).
Parameters:
op : Sym.product
l : Term.t list
val solve : Term.Equal.t -> Term.Equal.t list
Given an equality a = b, the pair solver solve(a, b)
Parameters:
e : Term.Equal.t