Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » sci.math.* » sci.math

Topic: MODUS PONENS PROGRAM <<REVISION>>
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
Hercules ofZeus

Posts: 27
Registered: 9/19/11
MODUS PONENS PROGRAM <<REVISION>>
Posted: Nov 8, 2012 4:49 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

AN INFERENCE RULE IN PROLOG LOGIC

==LHS=============RHS
if( and(lt(X,Y),lt(Y,Z)) , lt(X,Z) ).

LOG4.PRO uses MODUS PONENS on the above inference rule!

MP
t(RHS) <- if(LHS,RHS) ^ t(LHS).

--------------------------------
TEST RUN!

lt(2,5).
lt(5,10). (ADD SOME FACTS ABOUT 2<5, 5<10)

?- lt(2,X).
X = 5 (PROLOG MISSED THE INFERENCE RULE)

?- t(lt(2,X)). (TRY AGAIN!)
X = 5
X = 10

This is the format to Query and include further inferences.

.
.


- - - - - - - - - - - -MODUS PONENS
(2<5) ^ (5<10) ---------------------------> (2<10)
- - - - - - - - - - - -INFERENCE RULE


.
.
.
.
.
Herc

----LOG4.PRO-----
f(0).
t(1).
t(X) :- f(f(X)).
wff(X) :- t(X).
wff(X) :- f(X).
what(X,true) :- t(X).
what(X,false) :- f(X).

t(if(X,Y)) :- t(X), t(Y).
t(if(X,Y)) :- f(X), f(Y).
t(if(X,Y)) :- f(X), t(Y).
t(or(X,Y)) :- t(X).
t(or(X,Y)) :- t(Y).
t(and(X,Y)) :- t(X),t(Y).
t(iff(X,Y)) :- t(X),t(Y).
t(iff(X,Y)) :- f(X),f(Y).
t(xor(X,Y)) :- t(X),f(Y).
t(xor(X,Y)) :- f(X),t(Y).

f(if(X,Y)) :- t(X),f(Y).
f(or(X,Y)) :- f(X),f(Y).
f(and(X,Y)) :- f(X).
f(and(X,Y)) :- f(Y).
f(iff(X,Y)) :- t(X),f(Y).
f(iff(X,Y)) :- f(X),t(Y).
f(xor(X,Y)) :- t(X),t(Y).
f(xor(X,Y)) :- f(X),f(Y).

t(lt(A,B)) :- lt(A,B).

if( and(lt(X,Y),lt(Y,Z)) , lt(X,Z) ). .... INFERENCE RULE

t(RHS) :- if(LHS,RHS), t(LHS). .... MODUS PONENS




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.