% generates proof directory "exercise1a"
newcontext "exercise1a";
% a type
T: TYPE;
% predicates
p: T -> BOOLEAN;
q: (T,T) -> BOOLEAN;
r: T -> BOOLEAN;
s: T -> BOOLEAN;
% a function
f: T->T;
% formulas to be proved
A: FORMULA
(EXISTS(x: T): p(x)) AND
(FORALL(x: T): p(x) => (EXISTS(y: T): q(x, y))) =>
(EXISTS(x, y: T): q(x, y));
B: FORMULA
(FORALL(x: T): p(x) OR r(x)) AND
(FORALL(x: T): p(x) => q(x, x)) AND
(FORALL(x: T): r(x) => q(x, f(x))) =>
(FORALL(x: T): (EXISTS(y: T): q(x, y)));
C: FORMULA
(FORALL(x: T): p(x) => r(x)) AND
(FORALL(x: T): r(x) => (EXISTS(y:T): q(x, f(y)))) AND
NOT(EXISTS(x: T, y: T): q(x, y)) =>
(FORALL(x: T): NOT p(x));