Examples
Examples -> FirstOrderLogic -> quantifiers8.in% quantificational logic, axioms from p. 138 of Kleene, Introduction to Metamathematics
% This file asks Otter-lambda to prove the law for "there exists" from the other laws.
% It illustrates the use of list(types).
set(lambda).
set(demod_inf).
set(hyper_res).
set(ur_res). %Without this it doesn't find a proof, or at least not quickly.
set(types).
assign(max_distinct_vars,3).
assign(max_weight,18).
assign(pick_given_ratio,2).
weight_list(pick_and_purge).
weight(junk,50).
end_of_list.
% typings:
% The types are: PF (propositional function), prop (proposition), var, and obj (object)
list(types).
type(PF, lambda(var, prop)).
type(prop, all(PF)).
type(bool, P(prop)).
type(prop, i(prop,prop)).
type(prop, n(prop)).
type(prop, Ap(PF, obj)).
type(obj,c).
type(PF,a).
end_of_list.
% P(i(all(lambda(x,i(Ap(a,c),x))),y))
list(usable).
P(i(x,i(y,x))).
P(i(i(x,y),i(i(x,i(y,z)),i(x,z)))).
P(i(i(x,y),i(i(x,n(y)),n(x)))).
%P(i(n(n(x)),x)). %for the classical system -- use one or the other of this and the next line
P(i(n(x),i(x,y))). % for the intuitionistic system.
P(i(u,u)). %an extra axiom
P(i( i(n(x),n(y)), i(y,x))).
P(i( i(x,y), i(n(y),n(x)))).
P(i(all(lambda(x,Ap(y,x))), Ap(y,z))).
P(Ap(a,c)).
end_of_list.
list(demodulators).
% It finds the proof without these demodulaters but generates about 25% more clauses doing so
n(n(x)) = junk.
i(i(i(x,y),z),w) = junk.
n(junk)= junk.
i(x,junk) = junk.
i(junk,x)= junk.
P(junk) = junk.
end_of_list.
list(sos).
-P(x) | -P(i(x,y)) | P(y). % condensed detachment
% axioms from Kleene IM p. 82
-P(n(all(lambda(x,n(Ap(a,x)))))).
end_of_list.