, .
2 * + *
+ * , 2, , . , + * , . , . 3,6, Prolog * :
+ (* (2,), * <,))
, , Prolog , Prolog : 2* + *
. 3.6. 2*a + b*c
, , Prolog, , .
, Prolog . + , Prolog , +{ , ). Prolog , + *, , * , +. , + , *, . , + b-
+ {, Mb,))
*(+(,!, )
, . , + *, , + , *. + to* , + (*). , , , [ + ) *.
3. , , 87
. , , has supports , ;
peter has information.
floor supports table.
:
has(peter, information). Supports! floor, table).
, , (directive), . , . has :
|
|
:- [ 600, xtX, has).
Prolog, "has" , £300 "£"; . "xfx" , , "f", , "".
, - . , ( ). , , , , , "" - .
, , . , . , 1-1200.
, , xfx. .
1. : xfx xfy y-fx
2. :
Ex fy
3. :
xf yf
, , "f , "" "" . "f" , , , , , .
"" "" . . , 0; , . V , , , "" , .
, . , - -
|. Prolog
( - ) - , - ( - ). "-" yfx. . 3.7 , .
500 50
. 3.7. - - , , " -" 500. "-" yfx, . - "-"
not. not fy, not not
|
|
, not fx, , not not p, , not. , :
nOt(not )
Prolog , , , . , Prolog. , "" , , 3.1. , Prolog, not. , 3.1, , . .
. ,
, , ,
(de Morgan),
:
-( ) <---- > -a v -
Prolog : equivalence (not (and (, )), or (not < ), not ())).
3.1.
:- < 1200, xfx, [:-,->']]'.:- (1200, fx, [:-,?-]).:- (1100, xfy, ';').
3. , ,
:- (1050, xfy, ->).
:- (1000, xfy, ',') -
:- opt 900, fy, [ not, ' X + 'll.
:- opt 700, xfx, [ - \~, -, \--, =..]).
:- op | 700, xfx, [ is, =:=, = \=, <, =<, >, >-, @<, @=<, @>, <a>=])
:- op(500, yfx, [ -, -]).
:- op(400, yfx, [ *, /, //, rood]).
:- op(200, xfx, **].
:- op(200, xfy, -).
:- op{ 200, fy, -).
, , , , . . : :- (, xfx, <>J .:- (700, xfy, v).:- (600, xfy, &) .:- (500, fy, -).
:
-(ASB) <> -A v -.
, . 3.8.
D
/\ I I
. 3.8. ~ (A S )
<> -A v -
.
. , .
, - , . ; . , , .
. , .
, , 1-1200.
|
|
I. Prolog
. , . , -, , -, . xf , , , .