1, Prolog: . Prolog. . :
1- Q,
, R . .
, q r . Q " .
.
, Q,
0'''" Q, - .
!. Prolog
, , , , .
.
, , . , . , . , . , : hasachildf x):- parent(X, y;.
.
hasachild() -parent(A, 3). hasachildl XI}:- patent (XI, 2).
: hasachildf peter):- parent peter, 2). hasachildl fcarryi:- parentt barry, small(Caroline)).
, .
G (.. , ), :
1. , ,
2. I , ,
) I G
) I .
Prolog . , Prolog , . , . .
, . Prolog , . . ,
: - Q; R
:? , Q R, , :
: - Q. ;- R.
, .
:- Q, R; S, , .
:
:- (Q, R);! S, , ).
, : - Q, R
P:- S, ' , U.
2. Prolog