Prenex and Skolem normal forms.
Function or value | Description |
|
It performs a simplification eliminating the basic propositional
constants Example
Evaluates to `p <=> ~p>` .
Example
Evaluates to `exists x z. P(x) ==> ~Q(z)` .
|
|
It performs a simplification routine but just at the first level of the
input formula Example
Evaluates to `P(y)` .
Example
Evaluates to `exists x. P(x)` .
|
Function or value | Description |
It eliminates implication and equivalence, and pushes down negations through quantifiers.
NotePay attention that in Prop there is a propositional version of Prop.nnf. If all modules have been opened, qualify the exact version to be used. Example
Evaluates to `forall x. P(x) /\ ~Q(x) \/ ~P(x) /\ Q(x)` .
|
Function or value | Description |
Example
Evaluates to `exists x. forall z. ~P(x) /\ ~R(y) \/ Q(x) \/ ~P(z) \/ ~Q(z)` .
|
|
It deals with the subformulas of quantified formulas, and for the others (conjunctions and disjunctions) calls Skolem.pullquants.
Example
Evaluates to `forall x y. P(X) /\ Q(x,y)` .
|
|
Full Usage:
pullq (l, r) fm quant op x y p q
Parameters:
bool
-
The flag to indicate if the left hand formula should be changed.
r : bool
-
The flag to indicate if the right hand formula should be changed.
fm : formula<fol>
-
The input formula.
quant : string -> formula<fol> -> formula<fol>
-
The quantification constructor to apply.
op : formula<fol> -> formula<fol> -> formula<fol>
-
The binary connective constructor to apply.
x : string
-
The variable to check in the left hand formula to prevent it from being bound.
y : string
-
The variable to check in the right hand formula to prevent it from being bound.
p : formula<fol>
-
The left hand formula.
q : formula<fol>
-
The right hand formula.
Returns: formula<fol>
The formula with the quantifiers pulled out.
|
It deals with various similar subcases and calls the main Skolem.pullquants function again on the body to pull up further quantifiers.
Example
val fm: obj
Evaluates to `forall x. exists y. P(x) /\ P(y)` .
|
|
Function or value | Description |
Example
Evaluates to [("+", 2); ("1", 0)] .
|
|
|
Function or value | Description |
Full Usage:
skolem fm fns
Parameters:
formula<fol>
-
The input formula.
fns : string list
-
The list of strings to avoid as names of the Skolem functions.
Returns: formula<fol> * string list
The pair of the Skolemized formula together with the updated list of
strings to avoid as names of the Skolem functions.
|
It simply recursively descends the formula, Skolemizing any existential formulas and then proceeding to subformulas using skolem2 for binary connectives.
Example
Evaluates to (`forall x. P(x,f_y(x))`, ["f_y"]) .
|
Full Usage:
skolem2 cons (p, q) fns
Parameters:
formula<fol> * formula<fol> -> formula<fol>
-
The binary connective constructor to apply.
p : formula<fol>
-
The left hand formula.
q : formula<fol>
-
The right hand formula.
fns : string list
-
The list of strings to avoid as names of the Skolem
functions.
Returns: formula<fol> * string list
The pair of the Skolemized and reconstructed binary formula together
with the updated list of strings to avoid as names of the Skolem
functions.
|
It updates the set of functions to avoid with new Skolem functions introduced into one formula before tackling the other.
Example
val p: obj
val q: obj
Evaluates to (`(forall x. P(x,f_y(x))) /\ (forall x. Q(x,f_y'(x)))`, ["f_y'"; "f_y"]) .
|
Function or value | Description |
|
NoteSee also: Skolem.nnf, Skolem.simplify Example
Evaluates to `forall x. R(x,f_y(x))` .
|
|
It puts the formula in prenex normal form, substitutes existential quantifiers with Skolem functions and also removes all universal quantifiers.
Example
Evaluates to `R(x,f_y(x))` .
|
|