Module Coproduct


module Coproduct: sig  end
Theory of coproducts
Author(s): Harald Ruess


The signature COP consists of the unary function symbols for The theory COP is the set of equalities and disequalities which can be derived using the usual equality and disequality rules and the universally quantified rules A term is said to be canonical in COP, if it does not contain a term, which is of the form of any of the lhs above. 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

All terms with a toplevel symbol not in COP are treated as variables. Such terms are said to occur uninterpreted.

val is_interp : Term.t -> bool
in_interp a holds if the top-level function symbol is in the signature of COP.
Parameters:
? : Term.t
val is_pure : Term.t -> bool
is_pure a holds if every function symbol in a is in COP; that is, only variables occur at uninterpreted positions.
Parameters:
? : Term.t
val is_diseq : Term.t -> Term.t -> bool
is_diseq a b iff a, b are disequal in the theory of COP.
Parameters:
a : Term.t
b : Term.t
val mk_inl : Term.t -> Term.t
For canonical a, mk_inl a constructs a canonical term for representing inl(a)
Parameters:
a : Term.t
val mk_inr : Term.t -> Term.t
For canonical a, mk_inr a constructs a canonical term for representing inr(a)
Parameters:
a : Term.t
val mk_outl : Term.t -> Term.t
For canonical a, mk_outl a constructs a canonical term for representing outl(a)
Parameters:
a : Term.t
val mk_outr : Term.t -> Term.t
For canonical a, mk_outr a constructs a canonical term for representing outr(a)
Parameters:
a : Term.t
val mk_inj : int -> Term.t -> Term.t
Generalized injection of the form inr(inr(....(inr(x)))) with x uninterpreted or of the form inr(y).
Parameters:
i : int
a : Term.t
val mk_out : int -> Term.t -> Term.t
Generalized coinjection:
Parameters:
i : int
a : Term.t
val map : (Term.t -> Term.t) -> Term.t -> Term.t
map f a homomorphically applies f at uninterpreted positions of a and returns the corresponding canonical term. More precisely, map f (constr a) equals constr (map f a) for constr one of the constructors mk_inl, mk_inr, mk_outl, mk_outr. Otherwise, map f x equals f x
Parameters:
f : Term.t -> Term.t
a : Term.t
val apply : Term.Equal.t -> Term.t -> Term.t
apply (x, b) for uninterpreted occurrences of x in a with b, and normalizes.
Parameters:
? : Term.Equal.t
? : Term.t
val sigma : Sym.coproduct -> Term.t list -> Term.t
sigma op [a] applies mk_inl a if op is equal to the inl symbol. Similarly for all the symbols. Notice that the argument list is required to be unary.
Parameters:
op : Sym.coproduct
l : Term.t list
val solve : Term.t * Term.t -> (Term.t * Term.t) list
Given an equality a = b, solve(a, b)
Parameters:
e : Term.t * Term.t