The objective of this project is to build a Prolog program that can transform
Well-formed formulas (fbf) of a first order logical language to normal form (conjunctive
cnf or normal form).
To properly handle the existential variables we introduce a new rewrite rules,
exist(X, p(X)) -> p(sk00042)
Note how sk00042 'and a constant and not variable. Note also that this operation 'and realt'a
pi'u complicated in the presence of variables universally quantified.
every(Y, exist(X, p(X, Y))) -> every(Y, p(sf666(Y), Y))
A variable existential can be replaced by a function (called Skolem) which is applied
variables pi'u universal "external".
You'll need the following code to manage the operation of Skolemization:
skolem_variable(V, SK) :- var(V), gensym(skv, SK).
skolem_function(, SF) :- skolem_var(_, SF).
skolem_function([A | ARGS], SF) :-
SF =.. [SF_op, A | ARGS].
Unfortunately, your question requires a lot of work and cannot be done for free. Submit it with all requirements as an assignment to our control panel and we'll assist you.