% problem-set/geometry/tarski/t3.ver1.in
% created : 07/16/86
% revised : 07/20/89

% description : 

% Theorem T3: y is between x and y.

% representation :
%
% declare_predicates(4,[L]).
% declare_predicates(3,[B,C]).
% declare_predicates(2,[EQUAL]).
% declare_functions(6,[cont]).
% declare_functions(5,[op,euc1,euc2]).
% declare_functions(4,[ext]).
% declare_constants([C1,C2,C3,a,b,c,d,e]).
% declare_variables([u,v,w,x,y,z,v1,v2,v3,v4,v5,x1,y1,z1]). 
%
% Note that skolem functions have been renamed to agree with the second
% axiom set's names, for purposed of consistency and readability. Also,
% the weakened form of the continuity axiom, axiom A13', is used.
%
% B(x,y,z) : y is between x and z.
% L(x1,y1,x2,y2) : the distance from x1 to y1 equals that from x2 to y2. 
% C1, C2, C3 : Skolem constants arising from the Lower Dimension Axiom (A11)
% op   : Skolem function arising from Outer Pasch Axiom (A7)
% euc1 : Skolem function arising from Euclid's Axiom (A8)
% euc2 : Skolem function arising from Euclid's Axiom (A8)
% ext  : Skolem function arising from the Segment Construction Axiom (A10)
% cont : Skolem function arising from the Weakened form of the Elementary
% 	Continuity Axiom (A13')

set(ur_res).
set(unit_deletion).
assign(max_seconds,1800).
assign(max_weight,50).


list(axioms).

% A2 : Transitivity axiom for betweenness
-B(x,y,v) | -B(y,z,v) |  B(x,y,z).

% A3 : Connectivity axiom for betweenness
-B(x,y,z) | -B(x,y,v) |  EQUAL(x,y) |  B(x,z,v) |  B(x,v,z).

% A6 : Transitivity axiom for equidistance
-L(x,y,z,v) | -L(x,y,v2,w) |  L(z,v,v2,w).

% A7 : Outer Pasch Axiom
-B(x,w,v) | -B(y,v,z) |  B(x,op(w,x,y,z,v),y).
-B(x,w,v) | -B(y,v,z) |  B(z,w,op(w,x,y,z,v)).

% A8 : Euclid's Axiom
% B(u,v,euc1(u,v,w,x,y)) | -B(u,w,y) | -B(v,w,x) |  EQ(u,w).
% B(u,x,euc2(u,v,w,x,y)) | -B(u,w,y) | -B(v,w,x) |  EQ(u,w).
% B(euc1(u,v,w,x,y),y,euc2(u,v,w,x,y)) | -B(u,w,y) | -B(v,w,x) |  EQ(x,v).

% A9 : Five Segment Axiom
-L(x,y,x1,y1) | -L(y,z,y1,z1) | -L(x,v,x1,v1) | -L(y,v,y1,v1) |
	-B(x,y,z) | -B(x1,y1,z1) |  EQUAL(x,y) |  L(z,v,z1,v1).

% A11 : Lower Dimension Axiom
-B(C1,C2,C3).
-B(C2,C3,C1).
-B(C3,C1,C2).

% A12 : Upper Dimension Axiom
% -L(x,w,x,v) | -L(y,w,y,v) | -L(z,w,z,v) |  EQUAL(w,v) |  B(x,y,z) |
% 	B(y,z,x) |  B(z,x,y).

% A13 : Continuity Axiom (Weak Form)
% -L(v,x,v,x1) | -L(v,z,v,z1) | -B(v,x,z) | -B(x,y,z) |
% 	L(v,y,v,cont(x,y,z,x1,z1,v)).
% -L(v,x,v,x1) | -L(v,z,v,z1) | -B(v,x,z) | -B(x,y,z) |
% 	B(x1,cont(x,y,z,x1,z1,v),z1).

%  Equality axioms
EQUAL(x,x).
-EQUAL(x,y) | EQUAL(y,x).
-EQUAL(x,y) | -EQUAL(y,z) |  EQUAL(x,z).
 
%  Equality Substitution Axioms
-EQUAL(x,y) | -B(x,w,z) |  B(y,w,z).
-EQUAL(x,y) | -B(w,x,z) |  B(w,y,z).
-EQUAL(x,y) | -B(w,z,x) |  B(w,z,y).
-EQUAL(x,y) | -L(x,v,w,z) |  L(y,v,w,z).
-EQUAL(x,y) | -L(v,x,w,z) |  L(v,y,w,z).
-EQUAL(x,y) | -L(v,w,x,z) |  L(v,w,y,z).
-EQUAL(x,y) | -L(v,w,z,x) |  L(v,w,y,z).
-EQUAL(x,y) |  EQUAL(op(x,v1,v2,v3,v4),op(y,v1,v2,v3,v4)).
-EQUAL(x,y) |  EQUAL(op(v1,x,v2,v3,v4),op(v1,y,v2,v3,v4)).
-EQUAL(x,y) |  EQUAL(op(v1,v2,x,v3,v4),op(v1,v2,y,v3,v4)).
-EQUAL(x,y) |  EQUAL(op(v1,v2,v3,x,v4),op(v1,v2,v3,y,v4)).
-EQUAL(x,y) |  EQUAL(op(v1,v2,v3,v4,x),op(v1,v2,v3,v4,y)).
-EQUAL(x,y) |  EQUAL(ext(x,v1,v2,v3),ext(y,v1,v2,v3)).
-EQUAL(x,y) |  EQUAL(ext(v1,x,v2,v3),ext(v1,y,v2,v3)).
-EQUAL(x,y) |  EQUAL(ext(v1,v2,x,v3),ext(v1,v2,y,v3)).
-EQUAL(x,y) |  EQUAL(ext(v1,v2,v3,x),ext(v1,v2,v3,y)).

end_of_list.


list(sos).

% A1 : Identity axiom for betweenness 
-B(x,y,x) |  EQUAL(x,y).

% A4 : Reflexivity axiom for equidistance
L(x,y,y,x).

% A5 : Identity axiom for equidistance
-L(x,y,z,z) |  EQUAL(x,y).

% A10 : Segment Construction Axiom
B(x,y,ext(x,y,w,v)).
L(y,ext(x,y,w,v),w,v).

% denial of the theorem:
-B(a,b,b).

end_of_list.


weight_list(purge_gen).

% to purge (almost all) non-ground clauses
weight(x,10).
weight(C1,0).
weight(C2,0).
weight(C3,0).
weight(a,0).
weight(b,0).

end_of_list.
