Skip to content
Vincent Hsiao edited this page Aug 15, 2017 · 4 revisions
/*Modus Ponens*/
println('If w2knows(p->q) and w2knows(p), then w2knows(q) should be derived').
command(af(
	fif(and(w2knows(if(X,Y)),w2knows(X)),
		conclusion(w2knows(Y))))).
command(sr).
println('Current Database').
command(sdb).

println('Add w2knows(p) and w2knows(p->q) to the database').
		
command(af(w2knows(p))).
command(af(w2knows(if(p,q)))).
command(sr).

println('Current Database').
command(sdb).

println('Step once and q should be derived').
println(sr).

println(sdb).

println('Add w2knows(p->r) to the database').
command(af(w2knows(if(p,r)))).
command(sr).
command(sdb).
println('Step once and r should be derived, if it is not, then there is a bug').
command(sr).
command(sdb).
Clone this wiki locally