logicmoo_workspace
logicmoo_workspace copied to clipboard
logicmoo.base.examples.fol.ZEBRA_06 JUnit
(cd /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_base/t/examples/fol ; timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "['zebra_06.clif']")
% EDIT: https://github.com/logicmoo/logicmoo_workspace/edit/master/packs_sys/logicmoo_base/t/examples/fol/zebra_06.clif % JENKINS: https://jenkins.logicmoo.org/job/logicmoo_workspace/lastBuild/testReport/logicmoo.base.examples.fol/ZEBRA_06/ % ISSUE_SEARCH: https://github.com/logicmoo/logicmoo_workspace/issues?q=is%3Aissue+label%3AZEBRA_06 % ISSUE: https://github.com/logicmoo/logicmoo_workspace/issues/639
%~ init_phase(after_load)
%~ init_phase(restore_state)
%
%~ init_why(after_boot,program)
%~ after_boot.
%~ Dont forget to ?- logicmoo_i_cyc_xform.
%~ /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_utils/prolog/logicmoo_test_header.pl:30
%~ comment(";")
%~ comment("; deduct-einstein.scm")
%~ comment(";")
%~ comment("; Full set of Einstein Puzzle facts.")
%~ comment("; There are 15 explicitly stated facts, and four additional implicit")
%~ comment("; facts about ordinal counting (ordering of houses in a row).")
%~ comment(";")
%~ comment("; The facts are stated in a fashion that is as close as possible to")
%~ comment("; the natural-language source. The point being that we want the")
%~ comment("; expression of facts to be closely tied to human patterns of speech.")
%~ comment("; Being \"efficient\" or \"clever\" is NOT the point.")
%~ debugm( common_logic_loader,
%~ show_success(common_logic_loader,common_logic_loader:ain(clif(define(stv(mean,conf),'cog-new-stv'(mean,conf))))))
** Grammar from file /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_nlu/ext/chat80/original/clone.xg: 182 words .. **
** Grammar from file /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_nlu/ext/chat80/original/lex.xg: 23 words .. **
% chatops compiled into parser_chat80 0.00 sec, 0 clauses
% chatops compiled into parser_chat80 0.00 sec, 0 clauses
% :- share_mfa_pt2(parser_chat80,test_chat80,1).
% :- share_mfa_pt2(parser_chat80,hi80,0).
% :- share_mfa_pt2(parser_chat80,hi80,1).
% :- share_mfa_pt2(parser_chat80,control80,1).
% :- share_mfa_pt2(parser_chat80,trace_chat80,1).
% /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_nlu/ext/chat80/original/load compiled into parser_chat80 2.64 sec, 1 clauses
% /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_utils/prolog/debuggery/dmsg compiled into dmsg 0.12 sec, -16 clauses
=======================================================
define(stv(mean,conf),'cog-new-stv'(mean,conf))
============================================
?- kif_to_boxlog( define(stv(mean,conf),'cog-new-stv'(mean,conf)) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ mean stv conf define mean 'cog-new-stv' conf
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ azzert_rename('cog-new-stv',cogNewStv)
%~ kif_to_boxlog_attvars2 = necessary(define(stv(mean,conf),cogNewStv(mean,conf)))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(define(stv(mean,conf),cogNewStv(mean,conf))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that mean stv conf define mean cogNewStv conf
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( define(stv(mean,conf),cogNewStv(mean,conf))).
============================================
%~ comment("; A little handly-dandy utility to avoid over-reporting of \"obvious\"")
%~ comment("; results. We declare that person1 is the same as person1, etc.")
%~ comment("; A kind-of pauli-exclusion-principle at work.")
%~ /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_base/t/examples/fol/zebra_06.clif:747
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( define( same(person),
%~ 'EvaluationLink'( stv(1,1),
%~ PredicateNode( '$STRING'("IsSamePerson")),
%~ 'ListLink'('FeatureNode'(person),'FeatureNode'(person))))))))
=======================================================
define(same(person),'EvaluationLink'(stv(1,1),'PredicateNode'('$STRING'("IsSamePerson")),'ListLink'('FeatureNode'(person),'FeatureNode'(person))))
============================================
?- kif_to_boxlog( define(same(person),'EvaluationLink'(stv(1,1),'PredicateNode'('$STRING'("IsSamePerson")),'ListLink'('FeatureNode'(person),'FeatureNode'(person)))) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ person isa same define 'EvaluationLink'(stv(1,1),'PredicateNode'('$STRING'("IsSamePerson")),'ListLink'('FeatureNode'(person),'FeatureNode'(person)))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(define(same(person),'EvaluationLink'(stv(1,1),'PredicateNode'('$STRING'("IsSamePerson")),'ListLink'('FeatureNode'(person),'FeatureNode'(person)))))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(define(same(person),'EvaluationLink'(stv(1,1),'PredicateNode'('$STRING'("IsSamePerson")),'ListLink'('FeatureNode'(person),'FeatureNode'(person))))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that person isa same define 'EvaluationLink'(stv(1,1),'PredicateNode'('$STRING'("IsSamePerson")),'ListLink'('FeatureNode'(person),'FeatureNode'(person)))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( define( same(person),
'EvaluationLink'( stv(1,1),
PredicateNode( '$STRING'("IsSamePerson")),
'ListLink'('FeatureNode'(person),'FeatureNode'(person))))).
============================================
%~ comment(" AvatarNode")
%~ comment(" AvatarNode")
%~ comment("; A declaration of fact: it is true that pred has value for person.")
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( define( fact(person,pred,value),
%~ same(person),
%~ 'EvaluationLink'(stv(1,1),'PredicateNode'(pred),'ListLink'('FeatureNode'(person),'ConceptNode'(value))))))))
=======================================================
define(fact(person,pred,value),same(person),'EvaluationLink'(stv(1,1),'PredicateNode'(pred),'ListLink'('FeatureNode'(person),'ConceptNode'(value))))
============================================
?- kif_to_boxlog( define(fact(person,pred,value),same(person),'EvaluationLink'(stv(1,1),'PredicateNode'(pred),'ListLink'('FeatureNode'(person),'ConceptNode'(value)))) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ define(fact(person,pred,value),same(person),'EvaluationLink'(stv(1,1),'PredicateNode'(pred),'ListLink'('FeatureNode'(person),'ConceptNode'(value))))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(define(fact(person,pred,value),same(person),'EvaluationLink'(stv(1,1),'PredicateNode'(pred),'ListLink'('FeatureNode'(person),'ConceptNode'(value)))))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(define(fact(person,pred,value),same(person),'EvaluationLink'(stv(1,1),'PredicateNode'(pred),'ListLink'('FeatureNode'(person),'ConceptNode'(value))))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that define(fact(person,pred,value),same(person),'EvaluationLink'(stv(1,1),'PredicateNode'(pred),'ListLink'('FeatureNode'(person),'ConceptNode'(value))))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( define( fact(person,pred,value),
same(person),
'EvaluationLink'(stv(1,1),'PredicateNode'(pred),'ListLink'('FeatureNode'(person),'ConceptNode'(value))))).
============================================
%~ comment("; A neighbor-predicate: two people live next to each other.")
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( define( neighbor(person1,person2),
%~ same(person1),
%~ same(person2),
%~ 'EvaluationLink'( stv(1,1),
%~ PredicateNode( '$STRING'("Neighbor")),
%~ 'ListLink'('FeatureNode'(person1),'FeatureNode'(person2))))))))
=======================================================
define(neighbor(person1,person2),same(person1),same(person2),'EvaluationLink'(stv(1,1),'PredicateNode'('$STRING'("Neighbor")),'ListLink'('FeatureNode'(person1),'FeatureNode'(person2))))
============================================
?- kif_to_boxlog( define(neighbor(person1,person2),same(person1),same(person2),'EvaluationLink'(stv(1,1),'PredicateNode'('$STRING'("Neighbor")),'ListLink'('FeatureNode'(person1),'FeatureNode'(person2)))) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ define(neighbor(person1,person2),same(person1),same(person2),'EvaluationLink'(stv(1,1),'PredicateNode'('$STRING'("Neighbor")),'ListLink'('FeatureNode'(person1),'FeatureNode'(person2))))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(define(neighbor(person1,person2),same(person1),same(person2),'EvaluationLink'(stv(1,1),'PredicateNode'('$STRING'("Neighbor")),'ListLink'('FeatureNode'(person1),'FeatureNode'(person2)))))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(define(neighbor(person1,person2),same(person1),same(person2),'EvaluationLink'(stv(1,1),'PredicateNode'('$STRING'("Neighbor")),'ListLink'('FeatureNode'(person1),'FeatureNode'(person2))))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that define(neighbor(person1,person2),same(person1),same(person2),'EvaluationLink'(stv(1,1),'PredicateNode'('$STRING'("Neighbor")),'ListLink'('FeatureNode'(person1),'FeatureNode'(person2))))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( define( neighbor(person1,person2),
same(person1),
same(person2),
'EvaluationLink'( stv(1,1),
PredicateNode( '$STRING'("Neighbor")),
'ListLink'('FeatureNode'(person1),'FeatureNode'(person2))))).
============================================
%~ comment("; A left-of predicate: one house is left of another")
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( define( 'left-of'(house1,house2),
%~ 'EvaluationLink'(stv(1,1),'PredicateNode'('$STRING'("LeftOf")),'ListLink'('ConceptNode'(house1),'ConceptNode'(house2))))))))
=======================================================
define('left-of'(house1,house2),'EvaluationLink'(stv(1,1),'PredicateNode'('$STRING'("LeftOf")),'ListLink'('ConceptNode'(house1),'ConceptNode'(house2))))
============================================
?- kif_to_boxlog( define('left-of'(house1,house2),'EvaluationLink'(stv(1,1),'PredicateNode'('$STRING'("LeftOf")),'ListLink'('ConceptNode'(house1),'ConceptNode'(house2)))) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ house1 'left-of' house2 define 'EvaluationLink'(stv(1,1),'PredicateNode'('$STRING'("LeftOf")),'ListLink'('ConceptNode'(house1),'ConceptNode'(house2)))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ azzert_rename('left-of',leftOf)
%~ kif_to_boxlog_attvars2 = necessary(define(leftOf(house1,house2),'EvaluationLink'(stv(1,1),'PredicateNode'('$STRING'("LeftOf")),'ListLink'('ConceptNode'(house1),'ConceptNode'(house2)))))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(define(leftOf(house1,house2),'EvaluationLink'(stv(1,1),'PredicateNode'('$STRING'("LeftOf")),'ListLink'('ConceptNode'(house1),'ConceptNode'(house2))))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that house1 leftOf house2 define 'EvaluationLink'(stv(1,1),'PredicateNode'('$STRING'("LeftOf")),'ListLink'('ConceptNode'(house1),'ConceptNode'(house2)))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( define( leftOf(house1,house2),
'EvaluationLink'(stv(1,1),'PredicateNode'('$STRING'("LeftOf")),'ListLink'('ConceptNode'(house1),'ConceptNode'(house2))))).
============================================
%~ comment("; 1. The Englishman lives in the red house.")
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( fact('$STRING'("person1"),'$STRING'("Nationality"),'$STRING'("Englishman"))))))
=======================================================
fact('$STRING'("person1"),'$STRING'("Nationality"),'$STRING'("Englishman"))
============================================
?- kif_to_boxlog( fact('$STRING'("person1"),'$STRING'("Nationality"),'$STRING'("Englishman")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ fact('$STRING'("person1"),'$STRING'("Nationality"),'$STRING'("Englishman"))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(fact('$STRING'("person1"),'$STRING'("Nationality"),'$STRING'("Englishman")))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(fact('$STRING'("person1"),'$STRING'("Nationality"),'$STRING'("Englishman"))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that fact('$STRING'("person1"),'$STRING'("Nationality"),'$STRING'("Englishman"))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( fact('$STRING'("person1"),'$STRING'("Nationality"),'$STRING'("Englishman"))).
============================================
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( fact('$STRING'("person1"),'$STRING'("LivesIn"),'$STRING'("red house"))))))
=======================================================
fact('$STRING'("person1"),'$STRING'("LivesIn"),'$STRING'("red house"))
============================================
?- kif_to_boxlog( fact('$STRING'("person1"),'$STRING'("LivesIn"),'$STRING'("red house")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ fact('$STRING'("person1"),'$STRING'("LivesIn"),'$STRING'("red house"))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(fact('$STRING'("person1"),'$STRING'("LivesIn"),'$STRING'(s('[|]'(red,'[|]'(house,[]))))))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(fact('$STRING'("person1"),'$STRING'("LivesIn"),'$STRING'(s([red,house])))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that fact('$STRING'("person1"),'$STRING'("LivesIn"),'$STRING'(s([red,house])))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( fact('$STRING'("person1"),'$STRING'("LivesIn"),'$STRING'(s([red,house])))).
============================================
%~ comment("; 2. The Swede keeps dogs.")
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( fact('$STRING'("person2"),'$STRING'("Nationality"),'$STRING'("Swede"))))))
=======================================================
fact('$STRING'("person2"),'$STRING'("Nationality"),'$STRING'("Swede"))
============================================
?- kif_to_boxlog( fact('$STRING'("person2"),'$STRING'("Nationality"),'$STRING'("Swede")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ fact('$STRING'("person2"),'$STRING'("Nationality"),'$STRING'("Swede"))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(fact('$STRING'("person2"),'$STRING'("Nationality"),'$STRING'("Swede")))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(fact('$STRING'("person2"),'$STRING'("Nationality"),'$STRING'("Swede"))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that fact('$STRING'("person2"),'$STRING'("Nationality"),'$STRING'("Swede"))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( fact('$STRING'("person2"),'$STRING'("Nationality"),'$STRING'("Swede"))).
============================================
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( fact('$STRING'("person2"),'$STRING'("Keeps"),'$STRING'("dogs"))))))
=======================================================
fact('$STRING'("person2"),'$STRING'("Keeps"),'$STRING'("dogs"))
============================================
?- kif_to_boxlog( fact('$STRING'("person2"),'$STRING'("Keeps"),'$STRING'("dogs")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ fact('$STRING'("person2"),'$STRING'("Keeps"),'$STRING'("dogs"))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(fact('$STRING'("person2"),'$STRING'("Keeps"),'$STRING'("dogs")))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(fact('$STRING'("person2"),'$STRING'("Keeps"),'$STRING'("dogs"))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that fact('$STRING'("person2"),'$STRING'("Keeps"),'$STRING'("dogs"))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( fact('$STRING'("person2"),'$STRING'("Keeps"),'$STRING'("dogs"))).
============================================
%~ comment("; 3. The Dane drinks tea.")
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( fact('$STRING'("person3"),'$STRING'("Nationality"),'$STRING'("Dane"))))))
=======================================================
fact('$STRING'("person3"),'$STRING'("Nationality"),'$STRING'("Dane"))
============================================
?- kif_to_boxlog( fact('$STRING'("person3"),'$STRING'("Nationality"),'$STRING'("Dane")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ fact('$STRING'("person3"),'$STRING'("Nationality"),'$STRING'("Dane"))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(fact('$STRING'("person3"),'$STRING'("Nationality"),'$STRING'("Dane")))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(fact('$STRING'("person3"),'$STRING'("Nationality"),'$STRING'("Dane"))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that fact('$STRING'("person3"),'$STRING'("Nationality"),'$STRING'("Dane"))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( fact('$STRING'("person3"),'$STRING'("Nationality"),'$STRING'("Dane"))).
============================================
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( fact('$STRING'("person3"),'$STRING'("Drinks"),'$STRING'("tea"))))))
=======================================================
fact('$STRING'("person3"),'$STRING'("Drinks"),'$STRING'("tea"))
============================================
?- kif_to_boxlog( fact('$STRING'("person3"),'$STRING'("Drinks"),'$STRING'("tea")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ fact('$STRING'("person3"),'$STRING'("Drinks"),'$STRING'("tea"))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(fact('$STRING'("person3"),'$STRING'("Drinks"),'$STRING'("tea")))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(fact('$STRING'("person3"),'$STRING'("Drinks"),'$STRING'("tea"))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that fact('$STRING'("person3"),'$STRING'("Drinks"),'$STRING'("tea"))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( fact('$STRING'("person3"),'$STRING'("Drinks"),'$STRING'("tea"))).
============================================
%~ comment("; 4. The green house is just to the left of the white_house one.")
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( 'left-of'('$STRING'("green house"),'$STRING'("white house"))))))
=======================================================
'left-of'('$STRING'("green house"),'$STRING'("white house"))
============================================
?- kif_to_boxlog( 'left-of'('$STRING'("green house"),'$STRING'("white house")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ "green house" isa '$STRING' 'left-of' "white house" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(leftOf('$STRING'(s('[|]'(green,'[|]'(house,[])))),'$STRING'(s('[|]'(white,'[|]'(house,[]))))))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(leftOf('$STRING'(s([green,house])),'$STRING'(s([white,house])))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that green house isa s isa '$STRING' leftOf white house isa s isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( leftOf('$STRING'(s([green,house])),'$STRING'(s([white,house])))).
============================================
%~ comment("; 5. The owner of the green house drinks coffee.")
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( fact('$STRING'("person5"),'$STRING'("LivesIn"),'$STRING'("green house"))))))
=======================================================
fact('$STRING'("person5"),'$STRING'("LivesIn"),'$STRING'("green house"))
============================================
?- kif_to_boxlog( fact('$STRING'("person5"),'$STRING'("LivesIn"),'$STRING'("green house")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ fact('$STRING'("person5"),'$STRING'("LivesIn"),'$STRING'("green house"))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(fact('$STRING'("person5"),'$STRING'("LivesIn"),'$STRING'(s('[|]'(green,'[|]'(house,[]))))))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(fact('$STRING'("person5"),'$STRING'("LivesIn"),'$STRING'(s([green,house])))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that fact('$STRING'("person5"),'$STRING'("LivesIn"),'$STRING'(s([green,house])))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( fact('$STRING'("person5"),'$STRING'("LivesIn"),'$STRING'(s([green,house])))).
============================================
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( fact('$STRING'("person5"),'$STRING'("Drinks"),'$STRING'("coffee"))))))
=======================================================
fact('$STRING'("person5"),'$STRING'("Drinks"),'$STRING'("coffee"))
============================================
?- kif_to_boxlog( fact('$STRING'("person5"),'$STRING'("Drinks"),'$STRING'("coffee")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ fact('$STRING'("person5"),'$STRING'("Drinks"),'$STRING'("coffee"))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(fact('$STRING'("person5"),'$STRING'("Drinks"),'$STRING'("coffee")))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(fact('$STRING'("person5"),'$STRING'("Drinks"),'$STRING'("coffee"))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that fact('$STRING'("person5"),'$STRING'("Drinks"),'$STRING'("coffee"))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( fact('$STRING'("person5"),'$STRING'("Drinks"),'$STRING'("coffee"))).
============================================
%~ comment("; 6. The Pall Mall smoker keeps birds.")
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( fact('$STRING'("person6"),'$STRING'("Smokes"),'$STRING'("PallMall"))))))
=======================================================
fact('$STRING'("person6"),'$STRING'("Smokes"),'$STRING'("PallMall"))
============================================
?- kif_to_boxlog( fact('$STRING'("person6"),'$STRING'("Smokes"),'$STRING'("PallMall")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ fact('$STRING'("person6"),'$STRING'("Smokes"),'$STRING'("PallMall"))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(fact('$STRING'("person6"),'$STRING'("Smokes"),'$STRING'("PallMall")))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(fact('$STRING'("person6"),'$STRING'("Smokes"),'$STRING'("PallMall"))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that fact('$STRING'("person6"),'$STRING'("Smokes"),'$STRING'("PallMall"))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( fact('$STRING'("person6"),'$STRING'("Smokes"),'$STRING'("PallMall"))).
============================================
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( fact('$STRING'("person6"),'$STRING'("Keeps"),'$STRING'("birds"))))))
=======================================================
fact('$STRING'("person6"),'$STRING'("Keeps"),'$STRING'("birds"))
============================================
?- kif_to_boxlog( fact('$STRING'("person6"),'$STRING'("Keeps"),'$STRING'("birds")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ fact('$STRING'("person6"),'$STRING'("Keeps"),'$STRING'("birds"))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(fact('$STRING'("person6"),'$STRING'("Keeps"),'$STRING'("birds")))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(fact('$STRING'("person6"),'$STRING'("Keeps"),'$STRING'("birds"))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that fact('$STRING'("person6"),'$STRING'("Keeps"),'$STRING'("birds"))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( fact('$STRING'("person6"),'$STRING'("Keeps"),'$STRING'("birds"))).
============================================
%~ comment("; 7. The owner of the yellow house smokes Dunhills.")
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( fact('$STRING'("person7"),'$STRING'("Smokes"),'$STRING'("Dunhill"))))))
=======================================================
fact('$STRING'("person7"),'$STRING'("Smokes"),'$STRING'("Dunhill"))
============================================
?- kif_to_boxlog( fact('$STRING'("person7"),'$STRING'("Smokes"),'$STRING'("Dunhill")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ fact('$STRING'("person7"),'$STRING'("Smokes"),'$STRING'("Dunhill"))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(fact('$STRING'("person7"),'$STRING'("Smokes"),'$STRING'("Dunhill")))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(fact('$STRING'("person7"),'$STRING'("Smokes"),'$STRING'("Dunhill"))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that fact('$STRING'("person7"),'$STRING'("Smokes"),'$STRING'("Dunhill"))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( fact('$STRING'("person7"),'$STRING'("Smokes"),'$STRING'("Dunhill"))).
============================================
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( fact('$STRING'("person7"),'$STRING'("LivesIn"),'$STRING'("yellow house"))))))
=======================================================
fact('$STRING'("person7"),'$STRING'("LivesIn"),'$STRING'("yellow house"))
============================================
?- kif_to_boxlog( fact('$STRING'("person7"),'$STRING'("LivesIn"),'$STRING'("yellow house")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ fact('$STRING'("person7"),'$STRING'("LivesIn"),'$STRING'("yellow house"))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(fact('$STRING'("person7"),'$STRING'("LivesIn"),'$STRING'(s('[|]'(yellow,'[|]'(house,[]))))))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(fact('$STRING'("person7"),'$STRING'("LivesIn"),'$STRING'(s([yellow,house])))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that fact('$STRING'("person7"),'$STRING'("LivesIn"),'$STRING'(s([yellow,house])))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( fact('$STRING'("person7"),'$STRING'("LivesIn"),'$STRING'(s([yellow,house])))).
============================================
%~ comment("; 8. The man in the center house drinks milk.")
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( fact('$STRING'("person8"),'$STRING'("Drinks"),'$STRING'("milk"))))))
=======================================================
fact('$STRING'("person8"),'$STRING'("Drinks"),'$STRING'("milk"))
============================================
?- kif_to_boxlog( fact('$STRING'("person8"),'$STRING'("Drinks"),'$STRING'("milk")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ fact('$STRING'("person8"),'$STRING'("Drinks"),'$STRING'("milk"))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(fact('$STRING'("person8"),'$STRING'("Drinks"),'$STRING'("milk")))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(fact('$STRING'("person8"),'$STRING'("Drinks"),'$STRING'("milk"))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that fact('$STRING'("person8"),'$STRING'("Drinks"),'$STRING'("milk"))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( fact('$STRING'("person8"),'$STRING'("Drinks"),'$STRING'("milk"))).
============================================
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( fact('$STRING'("person8"),'$STRING'("Address"),'$STRING'("103 Main Street"))))))
=======================================================
fact('$STRING'("person8"),'$STRING'("Address"),'$STRING'("103 Main Street"))
============================================
?- kif_to_boxlog( fact('$STRING'("person8"),'$STRING'("Address"),'$STRING'("103 Main Street")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ fact('$STRING'("person8"),'$STRING'("Address"),'$STRING'("103 Main Street"))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(fact('$STRING'("person8"),'$STRING'("Address"),'$STRING'(s('[|]'('103','[|]'(iMain,'[|]'(tSumoStreet,[])))))))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(fact('$STRING'("person8"),'$STRING'("Address"),'$STRING'(s(['103',iMain,tSumoStreet])))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that fact('$STRING'("person8"),'$STRING'("Address"),'$STRING'(s(['103',iMain,tSumoStreet])))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( fact('$STRING'("person8"),'$STRING'("Address"),'$STRING'(s(['103',iMain,tSumoStreet])))).
============================================
%~ comment("; 9. The Norwegian lives in the first house.")
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( fact('$STRING'("person9"),'$STRING'("Nationality"),'$STRING'("Norwegian"))))))
=======================================================
fact('$STRING'("person9"),'$STRING'("Nationality"),'$STRING'("Norwegian"))
============================================
?- kif_to_boxlog( fact('$STRING'("person9"),'$STRING'("Nationality"),'$STRING'("Norwegian")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ fact('$STRING'("person9"),'$STRING'("Nationality"),'$STRING'("Norwegian"))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(fact('$STRING'("person9"),'$STRING'("Nationality"),'$STRING'("Norwegian")))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(fact('$STRING'("person9"),'$STRING'("Nationality"),'$STRING'("Norwegian"))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that fact('$STRING'("person9"),'$STRING'("Nationality"),'$STRING'("Norwegian"))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( fact('$STRING'("person9"),'$STRING'("Nationality"),'$STRING'("Norwegian"))).
============================================
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( fact('$STRING'("person9"),'$STRING'("Address"),'$STRING'("101 Main Street"))))))
=======================================================
fact('$STRING'("person9"),'$STRING'("Address"),'$STRING'("101 Main Street"))
============================================
?- kif_to_boxlog( fact('$STRING'("person9"),'$STRING'("Address"),'$STRING'("101 Main Street")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ fact('$STRING'("person9"),'$STRING'("Address"),'$STRING'("101 Main Street"))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(fact('$STRING'("person9"),'$STRING'("Address"),'$STRING'(s('[|]'('101','[|]'(iMain,'[|]'(tSumoStreet,[])))))))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(fact('$STRING'("person9"),'$STRING'("Address"),'$STRING'(s(['101',iMain,tSumoStreet])))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that fact('$STRING'("person9"),'$STRING'("Address"),'$STRING'(s(['101',iMain,tSumoStreet])))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( fact('$STRING'("person9"),'$STRING'("Address"),'$STRING'(s(['101',iMain,tSumoStreet])))).
============================================
%~ comment("; 10. The Blend smoker has a neighbor who keeps cats.")
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( fact('$STRING'("person10"),'$STRING'("Smokes"),'$STRING'("Blend"))))))
=======================================================
fact('$STRING'("person10"),'$STRING'("Smokes"),'$STRING'("Blend"))
============================================
?- kif_to_boxlog( fact('$STRING'("person10"),'$STRING'("Smokes"),'$STRING'("Blend")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ fact('$STRING'("person10"),'$STRING'("Smokes"),'$STRING'("Blend"))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(fact('$STRING'("person10"),'$STRING'("Smokes"),'$STRING'("Blend")))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(fact('$STRING'("person10"),'$STRING'("Smokes"),'$STRING'("Blend"))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that fact('$STRING'("person10"),'$STRING'("Smokes"),'$STRING'("Blend"))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( fact('$STRING'("person10"),'$STRING'("Smokes"),'$STRING'("Blend"))).
============================================
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( neighbor('$STRING'("person10"),'$STRING'("catperson"))))))
=======================================================
neighbor('$STRING'("person10"),'$STRING'("catperson"))
============================================
?- kif_to_boxlog( neighbor('$STRING'("person10"),'$STRING'("catperson")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ "person10" isa '$STRING' neighbor "catperson" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(neighbor('$STRING'("person10"),'$STRING'("catperson")))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(neighbor('$STRING'("person10"),'$STRING'("catperson"))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that "person10" isa '$STRING' neighbor "catperson" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( neighbor('$STRING'("person10"),'$STRING'("catperson"))).
============================================
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( fact('$STRING'("catperson"),'$STRING'("Keeps"),'$STRING'("cats"))))))
=======================================================
fact('$STRING'("catperson"),'$STRING'("Keeps"),'$STRING'("cats"))
============================================
?- kif_to_boxlog( fact('$STRING'("catperson"),'$STRING'("Keeps"),'$STRING'("cats")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ fact('$STRING'("catperson"),'$STRING'("Keeps"),'$STRING'("cats"))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(fact('$STRING'("catperson"),'$STRING'("Keeps"),'$STRING'("cats")))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(fact('$STRING'("catperson"),'$STRING'("Keeps"),'$STRING'("cats"))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that fact('$STRING'("catperson"),'$STRING'("Keeps"),'$STRING'("cats"))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( fact('$STRING'("catperson"),'$STRING'("Keeps"),'$STRING'("cats"))).
============================================
%~ comment("; 11. The man who smokes Blue Masters drinks bier.")
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( fact('$STRING'("person11"),'$STRING'("Smokes"),'$STRING'("Blue Master"))))))
=======================================================
fact('$STRING'("person11"),'$STRING'("Smokes"),'$STRING'("Blue Master"))
============================================
?- kif_to_boxlog( fact('$STRING'("person11"),'$STRING'("Smokes"),'$STRING'("Blue Master")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ fact('$STRING'("person11"),'$STRING'("Smokes"),'$STRING'("Blue Master"))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(fact('$STRING'("person11"),'$STRING'("Smokes"),'$STRING'(s('[|]'(tSumoBlue,'[|]'('Master',[]))))))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(fact('$STRING'("person11"),'$STRING'("Smokes"),'$STRING'(s([tSumoBlue,'Master'])))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that fact('$STRING'("person11"),'$STRING'("Smokes"),'$STRING'(s([tSumoBlue,'Master'])))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( fact('$STRING'("person11"),'$STRING'("Smokes"),'$STRING'(s([tSumoBlue,'Master'])))).
============================================
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( fact('$STRING'("person11"),'$STRING'("Drinks"),'$STRING'("bier"))))))
=======================================================
fact('$STRING'("person11"),'$STRING'("Drinks"),'$STRING'("bier"))
============================================
?- kif_to_boxlog( fact('$STRING'("person11"),'$STRING'("Drinks"),'$STRING'("bier")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ fact('$STRING'("person11"),'$STRING'("Drinks"),'$STRING'("bier"))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(fact('$STRING'("person11"),'$STRING'("Drinks"),'$STRING'("bier")))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(fact('$STRING'("person11"),'$STRING'("Drinks"),'$STRING'("bier"))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that fact('$STRING'("person11"),'$STRING'("Drinks"),'$STRING'("bier"))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( fact('$STRING'("person11"),'$STRING'("Drinks"),'$STRING'("bier"))).
============================================
%~ comment("; 12. The man who keeps horses lives next to the Dunhill smoker.")
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( fact('$STRING'("person12"),'$STRING'("Keeps"),'$STRING'("horses"))))))
=======================================================
fact('$STRING'("person12"),'$STRING'("Keeps"),'$STRING'("horses"))
============================================
?- kif_to_boxlog( fact('$STRING'("person12"),'$STRING'("Keeps"),'$STRING'("horses")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ fact('$STRING'("person12"),'$STRING'("Keeps"),'$STRING'("horses"))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(fact('$STRING'("person12"),'$STRING'("Keeps"),'$STRING'("horses")))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(fact('$STRING'("person12"),'$STRING'("Keeps"),'$STRING'("horses"))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that fact('$STRING'("person12"),'$STRING'("Keeps"),'$STRING'("horses"))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( fact('$STRING'("person12"),'$STRING'("Keeps"),'$STRING'("horses"))).
============================================
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( neighbor('$STRING'("person12"),'$STRING'("dun_smoke_person"))))))
=======================================================
neighbor('$STRING'("person12"),'$STRING'("dun_smoke_person"))
============================================
?- kif_to_boxlog( neighbor('$STRING'("person12"),'$STRING'("dun_smoke_person")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ "person12" isa '$STRING' neighbor "dun_smoke_person" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(neighbor('$STRING'("person12"),'$STRING'("dun_smoke_person")))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(neighbor('$STRING'("person12"),'$STRING'("dun_smoke_person"))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that "person12" isa '$STRING' neighbor "dun_smoke_person" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( neighbor('$STRING'("person12"),'$STRING'("dun_smoke_person"))).
============================================
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( fact('$STRING'("dun_smoke_person"),'$STRING'("Smokes"),'$STRING'("Dunhill"))))))
=======================================================
fact('$STRING'("dun_smoke_person"),'$STRING'("Smokes"),'$STRING'("Dunhill"))
============================================
?- kif_to_boxlog( fact('$STRING'("dun_smoke_person"),'$STRING'("Smokes"),'$STRING'("Dunhill")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ fact('$STRING'("dun_smoke_person"),'$STRING'("Smokes"),'$STRING'("Dunhill"))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(fact('$STRING'("dun_smoke_person"),'$STRING'("Smokes"),'$STRING'("Dunhill")))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(fact('$STRING'("dun_smoke_person"),'$STRING'("Smokes"),'$STRING'("Dunhill"))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that fact('$STRING'("dun_smoke_person"),'$STRING'("Smokes"),'$STRING'("Dunhill"))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( fact('$STRING'("dun_smoke_person"),'$STRING'("Smokes"),'$STRING'("Dunhill"))).
============================================
%~ comment("; 13. The German smokes Prince.")
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( fact('$STRING'("person13"),'$STRING'("Nationality"),'$STRING'("German"))))))
=======================================================
fact('$STRING'("person13"),'$STRING'("Nationality"),'$STRING'("German"))
============================================
?- kif_to_boxlog( fact('$STRING'("person13"),'$STRING'("Nationality"),'$STRING'("German")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ fact('$STRING'("person13"),'$STRING'("Nationality"),'$STRING'("German"))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(fact('$STRING'("person13"),'$STRING'("Nationality"),'$STRING'("German")))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(fact('$STRING'("person13"),'$STRING'("Nationality"),'$STRING'("German"))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that fact('$STRING'("person13"),'$STRING'("Nationality"),'$STRING'("German"))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( fact('$STRING'("person13"),'$STRING'("Nationality"),'$STRING'("German"))).
============================================
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( fact('$STRING'("person13"),'$STRING'("Smokes"),'$STRING'("Prince"))))))
=======================================================
fact('$STRING'("person13"),'$STRING'("Smokes"),'$STRING'("Prince"))
============================================
?- kif_to_boxlog( fact('$STRING'("person13"),'$STRING'("Smokes"),'$STRING'("Prince")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ fact('$STRING'("person13"),'$STRING'("Smokes"),'$STRING'("Prince"))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(fact('$STRING'("person13"),'$STRING'("Smokes"),'$STRING'("Prince")))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(fact('$STRING'("person13"),'$STRING'("Smokes"),'$STRING'("Prince"))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that fact('$STRING'("person13"),'$STRING'("Smokes"),'$STRING'("Prince"))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( fact('$STRING'("person13"),'$STRING'("Smokes"),'$STRING'("Prince"))).
============================================
%~ comment("; 14. The Norwegian lives next to the blue house.")
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( fact('$STRING'("person14"),'$STRING'("Nationality"),'$STRING'("Norwegian"))))))
=======================================================
fact('$STRING'("person14"),'$STRING'("Nationality"),'$STRING'("Norwegian"))
============================================
?- kif_to_boxlog( fact('$STRING'("person14"),'$STRING'("Nationality"),'$STRING'("Norwegian")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ fact('$STRING'("person14"),'$STRING'("Nationality"),'$STRING'("Norwegian"))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(fact('$STRING'("person14"),'$STRING'("Nationality"),'$STRING'("Norwegian")))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(fact('$STRING'("person14"),'$STRING'("Nationality"),'$STRING'("Norwegian"))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that fact('$STRING'("person14"),'$STRING'("Nationality"),'$STRING'("Norwegian"))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( fact('$STRING'("person14"),'$STRING'("Nationality"),'$STRING'("Norwegian"))).
============================================
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( neighbor('$STRING'("person14"),'$STRING'("blue_person"))))))
=======================================================
neighbor('$STRING'("person14"),'$STRING'("blue_person"))
============================================
?- kif_to_boxlog( neighbor('$STRING'("person14"),'$STRING'("blue_person")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ "person14" isa '$STRING' neighbor "blue_person" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(neighbor('$STRING'("person14"),'$STRING'("blue_person")))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(neighbor('$STRING'("person14"),'$STRING'("blue_person"))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that "person14" isa '$STRING' neighbor "blue_person" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( neighbor('$STRING'("person14"),'$STRING'("blue_person"))).
============================================
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( fact('$STRING'("blue_person"),'$STRING'("LivesIn"),'$STRING'("blue house"))))))
=======================================================
fact('$STRING'("blue_person"),'$STRING'("LivesIn"),'$STRING'("blue house"))
============================================
?- kif_to_boxlog( fact('$STRING'("blue_person"),'$STRING'("LivesIn"),'$STRING'("blue house")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ fact('$STRING'("blue_person"),'$STRING'("LivesIn"),'$STRING'("blue house"))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(fact('$STRING'("blue_person"),'$STRING'("LivesIn"),'$STRING'(s('[|]'(blue,'[|]'(house,[]))))))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(fact('$STRING'("blue_person"),'$STRING'("LivesIn"),'$STRING'(s([blue,house])))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that fact('$STRING'("blue_person"),'$STRING'("LivesIn"),'$STRING'(s([blue,house])))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( fact('$STRING'("blue_person"),'$STRING'("LivesIn"),'$STRING'(s([blue,house])))).
============================================
%~ comment("; 15. The Blend smoker has a neighbor who drinks water.")
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( fact('$STRING'("person15"),'$STRING'("Smokes"),'$STRING'("Blend"))))))
=======================================================
fact('$STRING'("person15"),'$STRING'("Smokes"),'$STRING'("Blend"))
============================================
?- kif_to_boxlog( fact('$STRING'("person15"),'$STRING'("Smokes"),'$STRING'("Blend")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ fact('$STRING'("person15"),'$STRING'("Smokes"),'$STRING'("Blend"))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(fact('$STRING'("person15"),'$STRING'("Smokes"),'$STRING'("Blend")))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(fact('$STRING'("person15"),'$STRING'("Smokes"),'$STRING'("Blend"))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that fact('$STRING'("person15"),'$STRING'("Smokes"),'$STRING'("Blend"))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( fact('$STRING'("person15"),'$STRING'("Smokes"),'$STRING'("Blend"))).
============================================
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( neighbor('$STRING'("person15"),'$STRING'("water_person"))))))
=======================================================
neighbor('$STRING'("person15"),'$STRING'("water_person"))
============================================
?- kif_to_boxlog( neighbor('$STRING'("person15"),'$STRING'("water_person")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ "person15" isa '$STRING' neighbor "water_person" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(neighbor('$STRING'("person15"),'$STRING'("water_person")))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(neighbor('$STRING'("person15"),'$STRING'("water_person"))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that "person15" isa '$STRING' neighbor "water_person" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( neighbor('$STRING'("person15"),'$STRING'("water_person"))).
============================================
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( fact('$STRING'("water_person"),'$STRING'("Drinks"),'$STRING'("water"))))))
=======================================================
fact('$STRING'("water_person"),'$STRING'("Drinks"),'$STRING'("water"))
============================================
?- kif_to_boxlog( fact('$STRING'("water_person"),'$STRING'("Drinks"),'$STRING'("water")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ fact('$STRING'("water_person"),'$STRING'("Drinks"),'$STRING'("water"))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(fact('$STRING'("water_person"),'$STRING'("Drinks"),'$STRING'("water")))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(fact('$STRING'("water_person"),'$STRING'("Drinks"),'$STRING'("water"))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that fact('$STRING'("water_person"),'$STRING'("Drinks"),'$STRING'("water"))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( fact('$STRING'("water_person"),'$STRING'("Drinks"),'$STRING'("water"))).
============================================
%~ comment("; ---------------------------------------------------------------")
%~ comment("; Assorted supplemental facts. These are somehow implicit in the")
%~ comment("; problem statement. We'd mostly like to derive these, from more")
%~ comment("; basic assumptions, but, for now, we'l just state them.")
%~ comment(";")
%~ comment("; A supplemental fact for fact 4: someone lives in the white house.")
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( fact('$STRING'("person4"),'$STRING'("LivesIn"),'$STRING'("white house"))))))
=======================================================
fact('$STRING'("person4"),'$STRING'("LivesIn"),'$STRING'("white house"))
============================================
?- kif_to_boxlog( fact('$STRING'("person4"),'$STRING'("LivesIn"),'$STRING'("white house")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ fact('$STRING'("person4"),'$STRING'("LivesIn"),'$STRING'("white house"))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(fact('$STRING'("person4"),'$STRING'("LivesIn"),'$STRING'(s('[|]'(white,'[|]'(house,[]))))))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(fact('$STRING'("person4"),'$STRING'("LivesIn"),'$STRING'(s([white,house])))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that fact('$STRING'("person4"),'$STRING'("LivesIn"),'$STRING'(s([white,house])))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( fact('$STRING'("person4"),'$STRING'("LivesIn"),'$STRING'(s([white,house])))).
============================================
%~ comment("; Supplemental fact: someone keeps fish.")
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( fact('$STRING'("fish_person"),'$STRING'("Keeps"),'$STRING'("fish"))))))
=======================================================
fact('$STRING'("fish_person"),'$STRING'("Keeps"),'$STRING'("fish"))
============================================
?- kif_to_boxlog( fact('$STRING'("fish_person"),'$STRING'("Keeps"),'$STRING'("fish")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ fact('$STRING'("fish_person"),'$STRING'("Keeps"),'$STRING'("fish"))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(fact('$STRING'("fish_person"),'$STRING'("Keeps"),'$STRING'("fish")))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(fact('$STRING'("fish_person"),'$STRING'("Keeps"),'$STRING'("fish"))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that fact('$STRING'("fish_person"),'$STRING'("Keeps"),'$STRING'("fish"))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( fact('$STRING'("fish_person"),'$STRING'("Keeps"),'$STRING'("fish"))).
============================================
%~ comment("; State some implicitly assumed facts about neighboring houses")
%~ comment("; This is the 'successor' function for ordinal numbers.")
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( define( successor(house1,house2),
%~ 'EvaluationLink'( stv(1,1),
%~ PredicateNode( '$STRING'("Successor")),
%~ 'ListLink'('ConceptNode'(house1),'ConceptNode'(house2))))))))
=======================================================
define(successor(house1,house2),'EvaluationLink'(stv(1,1),'PredicateNode'('$STRING'("Successor")),'ListLink'('ConceptNode'(house1),'ConceptNode'(house2))))
============================================
?- kif_to_boxlog( define(successor(house1,house2),'EvaluationLink'(stv(1,1),'PredicateNode'('$STRING'("Successor")),'ListLink'('ConceptNode'(house1),'ConceptNode'(house2)))) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ house1 successor house2 define 'EvaluationLink'(stv(1,1),'PredicateNode'('$STRING'("Successor")),'ListLink'('ConceptNode'(house1),'ConceptNode'(house2)))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(define(successor(house1,house2),'EvaluationLink'(stv(1,1),'PredicateNode'('$STRING'("Successor")),'ListLink'('ConceptNode'(house1),'ConceptNode'(house2)))))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(define(successor(house1,house2),'EvaluationLink'(stv(1,1),'PredicateNode'('$STRING'("Successor")),'ListLink'('ConceptNode'(house1),'ConceptNode'(house2))))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that house1 successor house2 define 'EvaluationLink'(stv(1,1),'PredicateNode'('$STRING'("Successor")),'ListLink'('ConceptNode'(house1),'ConceptNode'(house2)))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( define( successor(house1,house2),
'EvaluationLink'( stv(1,1),
PredicateNode( '$STRING'("Successor")),
'ListLink'('ConceptNode'(house1),'ConceptNode'(house2))))).
============================================
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( successor('$STRING'("101 Main Street"),'$STRING'("102 Main Street"))))))
=======================================================
successor('$STRING'("101 Main Street"),'$STRING'("102 Main Street"))
============================================
?- kif_to_boxlog( successor('$STRING'("101 Main Street"),'$STRING'("102 Main Street")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ "101 Main Street" isa '$STRING' successor "102 Main Street" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(successor('$STRING'(s('[|]'('101','[|]'(iMain,'[|]'(tSumoStreet,[]))))),'$STRING'(s('[|]'('102','[|]'(iMain,'[|]'(tSumoStreet,[])))))))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(successor('$STRING'(s(['101',iMain,tSumoStreet])),'$STRING'(s(['102',iMain,tSumoStreet])))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that '101' iMain tSumoStreet isa s isa '$STRING' successor '102' iMain tSumoStreet isa s isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( successor(
$STRING( s( ['101',iMain,tSumoStreet])),
$STRING( s( ['102',iMain,tSumoStreet])))).
============================================
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( successor('$STRING'("102 Main Street"),'$STRING'("103 Main Street"))))))
=======================================================
successor('$STRING'("102 Main Street"),'$STRING'("103 Main Street"))
============================================
?- kif_to_boxlog( successor('$STRING'("102 Main Street"),'$STRING'("103 Main Street")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ "102 Main Street" isa '$STRING' successor "103 Main Street" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(successor('$STRING'(s('[|]'('102','[|]'(iMain,'[|]'(tSumoStreet,[]))))),'$STRING'(s('[|]'('103','[|]'(iMain,'[|]'(tSumoStreet,[])))))))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(successor('$STRING'(s(['102',iMain,tSumoStreet])),'$STRING'(s(['103',iMain,tSumoStreet])))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that '102' iMain tSumoStreet isa s isa '$STRING' successor '103' iMain tSumoStreet isa s isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( successor(
$STRING( s( ['102',iMain,tSumoStreet])),
$STRING( s( ['103',iMain,tSumoStreet])))).
============================================
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( successor('$STRING'("103 Main Street"),'$STRING'("104 Main Street"))))))
=======================================================
successor('$STRING'("103 Main Street"),'$STRING'("104 Main Street"))
============================================
?- kif_to_boxlog( successor('$STRING'("103 Main Street"),'$STRING'("104 Main Street")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ "103 Main Street" isa '$STRING' successor "104 Main Street" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(successor('$STRING'(s('[|]'('103','[|]'(iMain,'[|]'(tSumoStreet,[]))))),'$STRING'(s('[|]'('104','[|]'(iMain,'[|]'(tSumoStreet,[])))))))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(successor('$STRING'(s(['103',iMain,tSumoStreet])),'$STRING'(s(['104',iMain,tSumoStreet])))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that '103' iMain tSumoStreet isa s isa '$STRING' successor '104' iMain tSumoStreet isa s isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( successor(
$STRING( s( ['103',iMain,tSumoStreet])),
$STRING( s( ['104',iMain,tSumoStreet])))).
============================================
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( successor('$STRING'("104 Main Street"),'$STRING'("105 Main Street"))))))
=======================================================
successor('$STRING'("104 Main Street"),'$STRING'("105 Main Street"))
============================================
?- kif_to_boxlog( successor('$STRING'("104 Main Street"),'$STRING'("105 Main Street")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ "104 Main Street" isa '$STRING' successor "105 Main Street" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(successor('$STRING'(s('[|]'('104','[|]'(iMain,'[|]'(tSumoStreet,[]))))),'$STRING'(s('[|]'('105','[|]'(iMain,'[|]'(tSumoStreet,[])))))))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(successor('$STRING'(s(['104',iMain,tSumoStreet])),'$STRING'(s(['105',iMain,tSumoStreet])))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that '104' iMain tSumoStreet isa s isa '$STRING' successor '105' iMain tSumoStreet isa s isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( successor(
$STRING( s( ['104',iMain,tSumoStreet])),
$STRING( s( ['105',iMain,tSumoStreet])))).
============================================
%~ comment("; ---------------------------------------------------------------")
%~ comment("; By-process-of-elimination facts")
%~ comment("; If person doesn''t live in one of the four houses, they must live in")
%~ comment("; the fifth. Likewsie, if person doesn''t smoke/drink/keep one of the four,")
%~ comment("; they must have the fifth.")
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( define('is-a'(x,y),'InheritanceLink'('ConceptNode'(x),'ConceptNode'(y)))))))
=======================================================
define('is-a'(x,y),'InheritanceLink'('ConceptNode'(x),'ConceptNode'(y)))
============================================
?- kif_to_boxlog( define('is-a'(x,y),'InheritanceLink'('ConceptNode'(x),'ConceptNode'(y))) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ x 'is-a' y define x isa 'ConceptNode' 'InheritanceLink' y isa 'ConceptNode'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ azzert_rename('is-a',isA)
%~ kif_to_boxlog_attvars2 = necessary(define(isA(x,y),'InheritanceLink'('ConceptNode'(x),'ConceptNode'(y))))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(define(isA(x,y),'InheritanceLink'('ConceptNode'(x),'ConceptNode'(y)))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that x isA y define x isa 'ConceptNode' 'InheritanceLink' y isa 'ConceptNode'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( define(isA(x,y),'InheritanceLink'('ConceptNode'(x),'ConceptNode'(y)))).
============================================
%~ debugm( common_logic_loader,
%~ show_success(common_logic_loader,common_logic_loader:ain(clif('is-a'('$STRING'("red house"),'$STRING'("house"))))))
=======================================================
'is-a'('$STRING'("red house"),'$STRING'("house"))
============================================
?- kif_to_boxlog( 'is-a'('$STRING'("red house"),'$STRING'("house")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ "red house" isa '$STRING' 'is-a' "house" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(isA('$STRING'(s('[|]'(red,'[|]'(house,[])))),'$STRING'("house")))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(isA('$STRING'(s([red,house])),'$STRING'("house"))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that red house isa s isa '$STRING' isA "house" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( isA('$STRING'(s([red,house])),'$STRING'("house"))).
============================================
%~ debugm( common_logic_loader,
%~ show_success(common_logic_loader,common_logic_loader:ain(clif('is-a'('$STRING'("white house"),'$STRING'("house"))))))
=======================================================
'is-a'('$STRING'("white house"),'$STRING'("house"))
============================================
?- kif_to_boxlog( 'is-a'('$STRING'("white house"),'$STRING'("house")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ "white house" isa '$STRING' 'is-a' "house" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(isA('$STRING'(s('[|]'(white,'[|]'(house,[])))),'$STRING'("house")))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(isA('$STRING'(s([white,house])),'$STRING'("house"))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that white house isa s isa '$STRING' isA "house" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( isA('$STRING'(s([white,house])),'$STRING'("house"))).
============================================
%~ debugm( common_logic_loader,
%~ show_success(common_logic_loader,common_logic_loader:ain(clif('is-a'('$STRING'("green house"),'$STRING'("house"))))))
=======================================================
'is-a'('$STRING'("green house"),'$STRING'("house"))
============================================
?- kif_to_boxlog( 'is-a'('$STRING'("green house"),'$STRING'("house")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ "green house" isa '$STRING' 'is-a' "house" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(isA('$STRING'(s('[|]'(green,'[|]'(house,[])))),'$STRING'("house")))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(isA('$STRING'(s([green,house])),'$STRING'("house"))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that green house isa s isa '$STRING' isA "house" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( isA('$STRING'(s([green,house])),'$STRING'("house"))).
============================================
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( 'is-a'('$STRING'("yellow house"),'$STRING'("house"))))))
=======================================================
'is-a'('$STRING'("yellow house"),'$STRING'("house"))
============================================
?- kif_to_boxlog( 'is-a'('$STRING'("yellow house"),'$STRING'("house")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ "yellow house" isa '$STRING' 'is-a' "house" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(isA('$STRING'(s('[|]'(yellow,'[|]'(house,[])))),'$STRING'("house")))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(isA('$STRING'(s([yellow,house])),'$STRING'("house"))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that yellow house isa s isa '$STRING' isA "house" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( isA('$STRING'(s([yellow,house])),'$STRING'("house"))).
============================================
%~ debugm( common_logic_loader,
%~ show_success(common_logic_loader,common_logic_loader:ain(clif('is-a'('$STRING'("blue house"),'$STRING'("house"))))))
=======================================================
'is-a'('$STRING'("blue house"),'$STRING'("house"))
============================================
?- kif_to_boxlog( 'is-a'('$STRING'("blue house"),'$STRING'("house")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ "blue house" isa '$STRING' 'is-a' "house" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(isA('$STRING'(s('[|]'(blue,'[|]'(house,[])))),'$STRING'("house")))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(isA('$STRING'(s([blue,house])),'$STRING'("house"))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that blue house isa s isa '$STRING' isA "house" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( isA('$STRING'(s([blue,house])),'$STRING'("house"))).
============================================
%~ debugm( common_logic_loader,
%~ show_success(common_logic_loader,common_logic_loader:ain(clif('is-a'('$STRING'("water"),'$STRING'("drink"))))))
=======================================================
'is-a'('$STRING'("water"),'$STRING'("drink"))
============================================
?- kif_to_boxlog( 'is-a'('$STRING'("water"),'$STRING'("drink")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ "water" isa '$STRING' 'is-a' "drink" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(isA('$STRING'("water"),'$STRING'("drink")))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(isA('$STRING'("water"),'$STRING'("drink"))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that "water" isa '$STRING' isA "drink" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( isA('$STRING'("water"),'$STRING'("drink"))).
============================================
%~ debugm( common_logic_loader,
%~ show_success(common_logic_loader,common_logic_loader:ain(clif('is-a'('$STRING'("milk"),'$STRING'("drink"))))))
=======================================================
'is-a'('$STRING'("milk"),'$STRING'("drink"))
============================================
?- kif_to_boxlog( 'is-a'('$STRING'("milk"),'$STRING'("drink")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ "milk" isa '$STRING' 'is-a' "drink" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(isA('$STRING'("milk"),'$STRING'("drink")))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(isA('$STRING'("milk"),'$STRING'("drink"))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that "milk" isa '$STRING' isA "drink" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( isA('$STRING'("milk"),'$STRING'("drink"))).
============================================
%~ debugm( common_logic_loader,
%~ show_success(common_logic_loader,common_logic_loader:ain(clif('is-a'('$STRING'("bier"),'$STRING'("drink"))))))
=======================================================
'is-a'('$STRING'("bier"),'$STRING'("drink"))
============================================
?- kif_to_boxlog( 'is-a'('$STRING'("bier"),'$STRING'("drink")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ "bier" isa '$STRING' 'is-a' "drink" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(isA('$STRING'("bier"),'$STRING'("drink")))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(isA('$STRING'("bier"),'$STRING'("drink"))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that "bier" isa '$STRING' isA "drink" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( isA('$STRING'("bier"),'$STRING'("drink"))).
============================================
%~ debugm( common_logic_loader,
%~ show_success(common_logic_loader,common_logic_loader:ain(clif('is-a'('$STRING'("coffee"),'$STRING'("drink"))))))
=======================================================
'is-a'('$STRING'("coffee"),'$STRING'("drink"))
============================================
?- kif_to_boxlog( 'is-a'('$STRING'("coffee"),'$STRING'("drink")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ "coffee" isa '$STRING' 'is-a' "drink" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(isA('$STRING'("coffee"),'$STRING'("drink")))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(isA('$STRING'("coffee"),'$STRING'("drink"))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that "coffee" isa '$STRING' isA "drink" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( isA('$STRING'("coffee"),'$STRING'("drink"))).
============================================
%~ debugm( common_logic_loader,
%~ show_success(common_logic_loader,common_logic_loader:ain(clif('is-a'('$STRING'("tea"),'$STRING'("drink"))))))
=======================================================
'is-a'('$STRING'("tea"),'$STRING'("drink"))
============================================
?- kif_to_boxlog( 'is-a'('$STRING'("tea"),'$STRING'("drink")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ "tea" isa '$STRING' 'is-a' "drink" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(isA('$STRING'("tea"),'$STRING'("drink")))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(isA('$STRING'("tea"),'$STRING'("drink"))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that "tea" isa '$STRING' isA "drink" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( isA('$STRING'("tea"),'$STRING'("drink"))).
============================================
%~ debugm( common_logic_loader,
%~ show_success(common_logic_loader,common_logic_loader:ain(clif('is-a'('$STRING'("Prince"),'$STRING'("tobacco"))))))
=======================================================
'is-a'('$STRING'("Prince"),'$STRING'("tobacco"))
============================================
?- kif_to_boxlog( 'is-a'('$STRING'("Prince"),'$STRING'("tobacco")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ "Prince" isa '$STRING' 'is-a' "tobacco" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(isA('$STRING'("Prince"),'$STRING'("tobacco")))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(isA('$STRING'("Prince"),'$STRING'("tobacco"))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that "Prince" isa '$STRING' isA "tobacco" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( isA('$STRING'("Prince"),'$STRING'("tobacco"))).
============================================
%~ debugm( common_logic_loader,
%~ show_success(common_logic_loader,common_logic_loader:ain(clif('is-a'('$STRING'("PallMall"),'$STRING'("tobacco"))))))
=======================================================
'is-a'('$STRING'("PallMall"),'$STRING'("tobacco"))
============================================
?- kif_to_boxlog( 'is-a'('$STRING'("PallMall"),'$STRING'("tobacco")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ "PallMall" isa '$STRING' 'is-a' "tobacco" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(isA('$STRING'("PallMall"),'$STRING'("tobacco")))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(isA('$STRING'("PallMall"),'$STRING'("tobacco"))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that "PallMall" isa '$STRING' isA "tobacco" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( isA('$STRING'("PallMall"),'$STRING'("tobacco"))).
============================================
%~ debugm( common_logic_loader,
%~ show_success(common_logic_loader,common_logic_loader:ain(clif('is-a'('$STRING'("Dunhill"),'$STRING'("tobacco"))))))
=======================================================
'is-a'('$STRING'("Dunhill"),'$STRING'("tobacco"))
============================================
?- kif_to_boxlog( 'is-a'('$STRING'("Dunhill"),'$STRING'("tobacco")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ "Dunhill" isa '$STRING' 'is-a' "tobacco" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(isA('$STRING'("Dunhill"),'$STRING'("tobacco")))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(isA('$STRING'("Dunhill"),'$STRING'("tobacco"))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that "Dunhill" isa '$STRING' isA "tobacco" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( isA('$STRING'("Dunhill"),'$STRING'("tobacco"))).
============================================
%~ debugm( common_logic_loader,
%~ show_success(common_logic_loader,common_logic_loader:ain(clif('is-a'('$STRING'("Blend"),'$STRING'("tobacco"))))))
=======================================================
'is-a'('$STRING'("Blend"),'$STRING'("tobacco"))
============================================
?- kif_to_boxlog( 'is-a'('$STRING'("Blend"),'$STRING'("tobacco")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ "Blend" isa '$STRING' 'is-a' "tobacco" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(isA('$STRING'("Blend"),'$STRING'("tobacco")))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(isA('$STRING'("Blend"),'$STRING'("tobacco"))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that "Blend" isa '$STRING' isA "tobacco" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( isA('$STRING'("Blend"),'$STRING'("tobacco"))).
============================================
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( 'is-a'('$STRING'("Blue Master"),'$STRING'("tobacco"))))))
=======================================================
'is-a'('$STRING'("Blue Master"),'$STRING'("tobacco"))
============================================
?- kif_to_boxlog( 'is-a'('$STRING'("Blue Master"),'$STRING'("tobacco")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ "Blue Master" isa '$STRING' 'is-a' "tobacco" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(isA('$STRING'(s('[|]'(tSumoBlue,'[|]'('Master',[])))),'$STRING'("tobacco")))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(isA('$STRING'(s([tSumoBlue,'Master'])),'$STRING'("tobacco"))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that tSumoBlue 'Master' isa s isa '$STRING' isA "tobacco" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( isA('$STRING'(s([tSumoBlue,'Master'])),'$STRING'("tobacco"))).
============================================
%~ debugm( common_logic_loader,
%~ show_success(common_logic_loader,common_logic_loader:ain(clif('is-a'('$STRING'("fish"),'$STRING'("keeps_as_pet"))))))
=======================================================
'is-a'('$STRING'("fish"),'$STRING'("keeps_as_pet"))
============================================
?- kif_to_boxlog( 'is-a'('$STRING'("fish"),'$STRING'("keeps_as_pet")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ "fish" isa '$STRING' 'is-a' "keeps_as_pet" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(isA('$STRING'("fish"),'$STRING'("keeps_as_pet")))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(isA('$STRING'("fish"),'$STRING'("keeps_as_pet"))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that "fish" isa '$STRING' isA "keeps_as_pet" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( isA('$STRING'("fish"),'$STRING'("keeps_as_pet"))).
============================================
%~ debugm( common_logic_loader,
%~ show_success(common_logic_loader,common_logic_loader:ain(clif('is-a'('$STRING'("dogs"),'$STRING'("keeps_as_pet"))))))
=======================================================
'is-a'('$STRING'("dogs"),'$STRING'("keeps_as_pet"))
============================================
?- kif_to_boxlog( 'is-a'('$STRING'("dogs"),'$STRING'("keeps_as_pet")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ "dogs" isa '$STRING' 'is-a' "keeps_as_pet" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(isA('$STRING'("dogs"),'$STRING'("keeps_as_pet")))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(isA('$STRING'("dogs"),'$STRING'("keeps_as_pet"))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that "dogs" isa '$STRING' isA "keeps_as_pet" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( isA('$STRING'("dogs"),'$STRING'("keeps_as_pet"))).
============================================
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( 'is-a'('$STRING'("birds"),'$STRING'("keeps_as_pet"))))))
=======================================================
'is-a'('$STRING'("birds"),'$STRING'("keeps_as_pet"))
============================================
?- kif_to_boxlog( 'is-a'('$STRING'("birds"),'$STRING'("keeps_as_pet")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ "birds" isa '$STRING' 'is-a' "keeps_as_pet" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(isA('$STRING'("birds"),'$STRING'("keeps_as_pet")))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(isA('$STRING'("birds"),'$STRING'("keeps_as_pet"))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that "birds" isa '$STRING' isA "keeps_as_pet" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( isA('$STRING'("birds"),'$STRING'("keeps_as_pet"))).
============================================
%~ debugm( common_logic_loader,
%~ show_success(common_logic_loader,common_logic_loader:ain(clif('is-a'('$STRING'("cats"),'$STRING'("keeps_as_pet"))))))
=======================================================
'is-a'('$STRING'("cats"),'$STRING'("keeps_as_pet"))
============================================
?- kif_to_boxlog( 'is-a'('$STRING'("cats"),'$STRING'("keeps_as_pet")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ "cats" isa '$STRING' 'is-a' "keeps_as_pet" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(isA('$STRING'("cats"),'$STRING'("keeps_as_pet")))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(isA('$STRING'("cats"),'$STRING'("keeps_as_pet"))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that "cats" isa '$STRING' isA "keeps_as_pet" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( isA('$STRING'("cats"),'$STRING'("keeps_as_pet"))).
============================================
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( 'is-a'('$STRING'("horses"),'$STRING'("keeps_as_pet"))))))
=======================================================
'is-a'('$STRING'("horses"),'$STRING'("keeps_as_pet"))
============================================
?- kif_to_boxlog( 'is-a'('$STRING'("horses"),'$STRING'("keeps_as_pet")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ "horses" isa '$STRING' 'is-a' "keeps_as_pet" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(isA('$STRING'("horses"),'$STRING'("keeps_as_pet")))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(isA('$STRING'("horses"),'$STRING'("keeps_as_pet"))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that "horses" isa '$STRING' isA "keeps_as_pet" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( isA('$STRING'("horses"),'$STRING'("keeps_as_pet"))).
============================================
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( 'is-a'('$STRING'("Englishman"),'$STRING'("citizenship"))))))
=======================================================
'is-a'('$STRING'("Englishman"),'$STRING'("citizenship"))
============================================
?- kif_to_boxlog( 'is-a'('$STRING'("Englishman"),'$STRING'("citizenship")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ "Englishman" isa '$STRING' 'is-a' "citizenship" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(isA('$STRING'("Englishman"),'$STRING'("citizenship")))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(isA('$STRING'("Englishman"),'$STRING'("citizenship"))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that "Englishman" isa '$STRING' isA "citizenship" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( isA('$STRING'("Englishman"),'$STRING'("citizenship"))).
============================================
%~ debugm( common_logic_loader,
%~ show_success(common_logic_loader,common_logic_loader:ain(clif('is-a'('$STRING'("Swede"),'$STRING'("citizenship"))))))
=======================================================
'is-a'('$STRING'("Swede"),'$STRING'("citizenship"))
============================================
?- kif_to_boxlog( 'is-a'('$STRING'("Swede"),'$STRING'("citizenship")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ "Swede" isa '$STRING' 'is-a' "citizenship" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(isA('$STRING'("Swede"),'$STRING'("citizenship")))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(isA('$STRING'("Swede"),'$STRING'("citizenship"))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that "Swede" isa '$STRING' isA "citizenship" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( isA('$STRING'("Swede"),'$STRING'("citizenship"))).
============================================
%~ debugm( common_logic_loader,
%~ show_success(common_logic_loader,common_logic_loader:ain(clif('is-a'('$STRING'("Dane"),'$STRING'("citizenship"))))))
=======================================================
'is-a'('$STRING'("Dane"),'$STRING'("citizenship"))
============================================
?- kif_to_boxlog( 'is-a'('$STRING'("Dane"),'$STRING'("citizenship")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ "Dane" isa '$STRING' 'is-a' "citizenship" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(isA('$STRING'("Dane"),'$STRING'("citizenship")))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(isA('$STRING'("Dane"),'$STRING'("citizenship"))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that "Dane" isa '$STRING' isA "citizenship" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( isA('$STRING'("Dane"),'$STRING'("citizenship"))).
============================================
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( 'is-a'('$STRING'("Norwegian"),'$STRING'("citizenship"))))))
=======================================================
'is-a'('$STRING'("Norwegian"),'$STRING'("citizenship"))
============================================
?- kif_to_boxlog( 'is-a'('$STRING'("Norwegian"),'$STRING'("citizenship")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ "Norwegian" isa '$STRING' 'is-a' "citizenship" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(isA('$STRING'("Norwegian"),'$STRING'("citizenship")))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(isA('$STRING'("Norwegian"),'$STRING'("citizenship"))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that "Norwegian" isa '$STRING' isA "citizenship" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( isA('$STRING'("Norwegian"),'$STRING'("citizenship"))).
============================================
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( 'is-a'('$STRING'("German"),'$STRING'("citizenship"))))))
=======================================================
'is-a'('$STRING'("German"),'$STRING'("citizenship"))
============================================
?- kif_to_boxlog( 'is-a'('$STRING'("German"),'$STRING'("citizenship")) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ "German" isa '$STRING' 'is-a' "citizenship" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(isA('$STRING'("German"),'$STRING'("citizenship")))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(isA('$STRING'("German"),'$STRING'("citizenship"))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that "German" isa '$STRING' isA "citizenship" isa '$STRING'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( isA('$STRING'("German"),'$STRING'("citizenship"))).
============================================
%~ comment(";")
%~ comment("; deduct-keep.scm")
%~ comment(";")
%~ comment("; Print out who keeps what")
%~ comment(";")
%~ comment("; Part of the \"Einstein puzzle\" demo.")
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( define( 'print-ownership',
%~ 'BindLink'(
%~ 'VariableList'(
%~ 'TypedVariableLink'('VariableNode'('$STRING'("$person")),'TypeNode'('$STRING'("FeatureNode"))),
%~ VariableNode( '$STRING'("$nationality")),
%~ VariableNode( '$STRING'("$house")),
%~ VariableNode( '$STRING'("$pet"))),
%~ 'AndLink'(
%~ 'EvaluationLink'(
%~ PredicateNode( '$STRING'("Nationality")),
%~ 'ListLink'('VariableNode'('$STRING'("$person")),'VariableNode'('$STRING'("$nationality")))),
%~ 'EvaluationLink'(
%~ PredicateNode( '$STRING'("LivesIn")),
%~ 'ListLink'('VariableNode'('$STRING'("$person")),'VariableNode'('$STRING'("$house")))),
%~ 'EvaluationLink'(
%~ PredicateNode( '$STRING'("KeepsPet")),
%~ 'ListLink'('VariableNode'('$STRING'("$person")),'VariableNode'('$STRING'("$pet"))))),
%~ 'OrderedLink'(
%~ VariableNode( '$STRING'("$person")),
%~ VariableNode( '$STRING'("$nationality")),
%~ VariableNode( '$STRING'("$house")),
%~ VariableNode( '$STRING'("$pet")))))))))
=======================================================
define('print-ownership','BindLink'('VariableList'('TypedVariableLink'('VariableNode'('$STRING'("$person")),'TypeNode'('$STRING'("FeatureNode"))),'VariableNode'('$STRING'("$nationality")),'VariableNode'('$STRING'("$house")),'VariableNode'('$STRING'("$pet"))),'AndLink'('EvaluationLink'('PredicateNode'('$STRING'("Nationality")),'ListLink'('VariableNode'('$STRING'("$person")),'VariableNode'('$STRING'("$nationality")))),'EvaluationLink'('PredicateNode'('$STRING'("LivesIn")),'ListLink'('VariableNode'('$STRING'("$person")),'VariableNode'('$STRING'("$house")))),'EvaluationLink'('PredicateNode'('$STRING'("KeepsPet")),'ListLink'('VariableNode'('$STRING'("$person")),'VariableNode'('$STRING'("$pet"))))),'OrderedLink'('VariableNode'('$STRING'("$person")),'VariableNode'('$STRING'("$nationality")),'VariableNode'('$STRING'("$house")),'VariableNode'('$STRING'("$pet")))))
============================================
?- kif_to_boxlog( define('print-ownership','BindLink'('VariableList'('TypedVariableLink'('VariableNode'('$STRING'("$person")),'TypeNode'('$STRING'("FeatureNode"))),'VariableNode'('$STRING'("$nationality")),'VariableNode'('$STRING'("$house")),'VariableNode'('$STRING'("$pet"))),'AndLink'('EvaluationLink'('PredicateNode'('$STRING'("Nationality")),'ListLink'('VariableNode'('$STRING'("$person")),'VariableNode'('$STRING'("$nationality")))),'EvaluationLink'('PredicateNode'('$STRING'("LivesIn")),'ListLink'('VariableNode'('$STRING'("$person")),'VariableNode'('$STRING'("$house")))),'EvaluationLink'('PredicateNode'('$STRING'("KeepsPet")),'ListLink'('VariableNode'('$STRING'("$person")),'VariableNode'('$STRING'("$pet"))))),'OrderedLink'('VariableNode'('$STRING'("$person")),'VariableNode'('$STRING'("$nationality")),'VariableNode'('$STRING'("$house")),'VariableNode'('$STRING'("$pet"))))) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ 'print-ownership' define 'BindLink'('VariableList'('TypedVariableLink'('VariableNode'('$STRING'("$person")),'TypeNode'('$STRING'("FeatureNode"))),'VariableNode'('$STRING'("$nationality")),'VariableNode'('$STRING'("$house")),'VariableNode'('$STRING'("$pet"))),'AndLink'('EvaluationLink'('PredicateNode'('$STRING'("Nationality")),'ListLink'('VariableNode'('$STRING'("$person")),'VariableNode'('$STRING'("$nationality")))),'EvaluationLink'('PredicateNode'('$STRING'("LivesIn")),'ListLink'('VariableNode'('$STRING'("$person")),'VariableNode'('$STRING'("$house")))),'EvaluationLink'('PredicateNode'('$STRING'("KeepsPet")),'ListLink'('VariableNode'('$STRING'("$person")),'VariableNode'('$STRING'("$pet"))))),'OrderedLink'('VariableNode'('$STRING'("$person")),'VariableNode'('$STRING'("$nationality")),'VariableNode'('$STRING'("$house")),'VariableNode'('$STRING'("$pet"))))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ azzert_rename('print-ownership',printOwnership)
%~ azzert_rename('VariableList',ftVariableList)
%~ kif_to_boxlog_attvars2 = necessary(define(printOwnership,'BindLink'(ftVariableList('TypedVariableLink'('VariableNode'('$STRING'("$person")),'TypeNode'('$STRING'("FeatureNode"))),'VariableNode'('$STRING'("$nationality")),'VariableNode'('$STRING'("$house")),'VariableNode'('$STRING'("$pet"))),'AndLink'('EvaluationLink'('PredicateNode'('$STRING'("Nationality")),'ListLink'('VariableNode'('$STRING'("$person")),'VariableNode'('$STRING'("$nationality")))),'EvaluationLink'('PredicateNode'('$STRING'("LivesIn")),'ListLink'('VariableNode'('$STRING'("$person")),'VariableNode'('$STRING'("$house")))),'EvaluationLink'('PredicateNode'('$STRING'("KeepsPet")),'ListLink'('VariableNode'('$STRING'("$person")),'VariableNode'('$STRING'("$pet"))))),'OrderedLink'('VariableNode'('$STRING'("$person")),'VariableNode'('$STRING'("$nationality")),'VariableNode'('$STRING'("$house")),'VariableNode'('$STRING'("$pet"))))))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(define(printOwnership,'BindLink'(ftVariableList('TypedVariableLink'('VariableNode'('$STRING'("$person")),'TypeNode'('$STRING'("FeatureNode"))),'VariableNode'('$STRING'("$nationality")),'VariableNode'('$STRING'("$house")),'VariableNode'('$STRING'("$pet"))),'AndLink'('EvaluationLink'('PredicateNode'('$STRING'("Nationality")),'ListLink'('VariableNode'('$STRING'("$person")),'VariableNode'('$STRING'("$nationality")))),'EvaluationLink'('PredicateNode'('$STRING'("LivesIn")),'ListLink'('VariableNode'('$STRING'("$person")),'VariableNode'('$STRING'("$house")))),'EvaluationLink'('PredicateNode'('$STRING'("KeepsPet")),'ListLink'('VariableNode'('$STRING'("$person")),'VariableNode'('$STRING'("$pet"))))),'OrderedLink'('VariableNode'('$STRING'("$person")),'VariableNode'('$STRING'("$nationality")),'VariableNode'('$STRING'("$house")),'VariableNode'('$STRING'("$pet")))))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that printOwnership define 'BindLink'(ftVariableList('TypedVariableLink'('VariableNode'('$STRING'("$person")),'TypeNode'('$STRING'("FeatureNode"))),'VariableNode'('$STRING'("$nationality")),'VariableNode'('$STRING'("$house")),'VariableNode'('$STRING'("$pet"))),'AndLink'('EvaluationLink'('PredicateNode'('$STRING'("Nationality")),'ListLink'('VariableNode'('$STRING'("$person")),'VariableNode'('$STRING'("$nationality")))),'EvaluationLink'('PredicateNode'('$STRING'("LivesIn")),'ListLink'('VariableNode'('$STRING'("$person")),'VariableNode'('$STRING'("$house")))),'EvaluationLink'('PredicateNode'('$STRING'("KeepsPet")),'ListLink'('VariableNode'('$STRING'("$person")),'VariableNode'('$STRING'("$pet"))))),'OrderedLink'('VariableNode'('$STRING'("$person")),'VariableNode'('$STRING'("$nationality")),'VariableNode'('$STRING'("$house")),'VariableNode'('$STRING'("$pet"))))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( define( printOwnership,
'BindLink'(
ftVariableList(
'TypedVariableLink'('VariableNode'('$STRING'("$person")),'TypeNode'('$STRING'("FeatureNode"))),
VariableNode( '$STRING'("$nationality")),
VariableNode( '$STRING'("$house")),
VariableNode( '$STRING'("$pet"))),
'AndLink'(
'EvaluationLink'(
PredicateNode( '$STRING'("Nationality")),
'ListLink'('VariableNode'('$STRING'("$person")),'VariableNode'('$STRING'("$nationality")))),
'EvaluationLink'(
PredicateNode( '$STRING'("LivesIn")),
'ListLink'('VariableNode'('$STRING'("$person")),'VariableNode'('$STRING'("$house")))),
'EvaluationLink'(
PredicateNode( '$STRING'("KeepsPet")),
'ListLink'('VariableNode'('$STRING'("$person")),'VariableNode'('$STRING'("$pet"))))),
'OrderedLink'(
VariableNode( '$STRING'("$person")),
VariableNode( '$STRING'("$nationality")),
VariableNode( '$STRING'("$house")),
VariableNode( '$STRING'("$pet")))))).
============================================
%~ comment("; variable declarations")
%~ comment("; body -- if all parts of AndLink hold true ... then")
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( define( 'print-results',
%~ 'BindLink'(
%~ 'VariableList'(
%~ 'TypedVariableLink'('VariableNode'('$STRING'("$person")),'TypeNode'('$STRING'("FeatureNode"))),
%~ VariableNode( '$STRING'("$pred")),
%~ 'TypedVariableLink'('VariableNode'('$STRING'("$attr")),'TypeNode'('$STRING'("ConceptNode")))),
%~ AndLink( 'EvaluationLink'(
%~ VariableNode( '$STRING'("$pred")),
%~ 'ListLink'('VariableNode'('$STRING'("$person")),'VariableNode'('$STRING'("$attr"))))),
%~ 'OrderedLink'(
%~ VariableNode( '$STRING'("$person")),
%~ VariableNode( '$STRING'("$pred")),
%~ VariableNode( '$STRING'("$attr")))))))))
=======================================================
define('print-results','BindLink'('VariableList'('TypedVariableLink'('VariableNode'('$STRING'("$person")),'TypeNode'('$STRING'("FeatureNode"))),'VariableNode'('$STRING'("$pred")),'TypedVariableLink'('VariableNode'('$STRING'("$attr")),'TypeNode'('$STRING'("ConceptNode")))),'AndLink'('EvaluationLink'('VariableNode'('$STRING'("$pred")),'ListLink'('VariableNode'('$STRING'("$person")),'VariableNode'('$STRING'("$attr"))))),'OrderedLink'('VariableNode'('$STRING'("$person")),'VariableNode'('$STRING'("$pred")),'VariableNode'('$STRING'("$attr")))))
============================================
?- kif_to_boxlog( define('print-results','BindLink'('VariableList'('TypedVariableLink'('VariableNode'('$STRING'("$person")),'TypeNode'('$STRING'("FeatureNode"))),'VariableNode'('$STRING'("$pred")),'TypedVariableLink'('VariableNode'('$STRING'("$attr")),'TypeNode'('$STRING'("ConceptNode")))),'AndLink'('EvaluationLink'('VariableNode'('$STRING'("$pred")),'ListLink'('VariableNode'('$STRING'("$person")),'VariableNode'('$STRING'("$attr"))))),'OrderedLink'('VariableNode'('$STRING'("$person")),'VariableNode'('$STRING'("$pred")),'VariableNode'('$STRING'("$attr"))))) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ 'print-results' define 'BindLink'('VariableList'('TypedVariableLink'('VariableNode'('$STRING'("$person")),'TypeNode'('$STRING'("FeatureNode"))),'VariableNode'('$STRING'("$pred")),'TypedVariableLink'('VariableNode'('$STRING'("$attr")),'TypeNode'('$STRING'("ConceptNode")))),'AndLink'('EvaluationLink'('VariableNode'('$STRING'("$pred")),'ListLink'('VariableNode'('$STRING'("$person")),'VariableNode'('$STRING'("$attr"))))),'OrderedLink'('VariableNode'('$STRING'("$person")),'VariableNode'('$STRING'("$pred")),'VariableNode'('$STRING'("$attr"))))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ azzert_rename('print-results',printResults)
%~ kif_to_boxlog_attvars2 = necessary(define(printResults,'BindLink'(ftVariableList('TypedVariableLink'('VariableNode'('$STRING'("$person")),'TypeNode'('$STRING'("FeatureNode"))),'VariableNode'('$STRING'("$pred")),'TypedVariableLink'('VariableNode'('$STRING'("$attr")),'TypeNode'('$STRING'("ConceptNode")))),'AndLink'('EvaluationLink'('VariableNode'('$STRING'("$pred")),'ListLink'('VariableNode'('$STRING'("$person")),'VariableNode'('$STRING'("$attr"))))),'OrderedLink'('VariableNode'('$STRING'("$person")),'VariableNode'('$STRING'("$pred")),'VariableNode'('$STRING'("$attr"))))))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(define(printResults,'BindLink'(ftVariableList('TypedVariableLink'('VariableNode'('$STRING'("$person")),'TypeNode'('$STRING'("FeatureNode"))),'VariableNode'('$STRING'("$pred")),'TypedVariableLink'('VariableNode'('$STRING'("$attr")),'TypeNode'('$STRING'("ConceptNode")))),'AndLink'('EvaluationLink'('VariableNode'('$STRING'("$pred")),'ListLink'('VariableNode'('$STRING'("$person")),'VariableNode'('$STRING'("$attr"))))),'OrderedLink'('VariableNode'('$STRING'("$person")),'VariableNode'('$STRING'("$pred")),'VariableNode'('$STRING'("$attr")))))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that printResults define 'BindLink'(ftVariableList('TypedVariableLink'('VariableNode'('$STRING'("$person")),'TypeNode'('$STRING'("FeatureNode"))),'VariableNode'('$STRING'("$pred")),'TypedVariableLink'('VariableNode'('$STRING'("$attr")),'TypeNode'('$STRING'("ConceptNode")))),'AndLink'('EvaluationLink'('VariableNode'('$STRING'("$pred")),'ListLink'('VariableNode'('$STRING'("$person")),'VariableNode'('$STRING'("$attr"))))),'OrderedLink'('VariableNode'('$STRING'("$person")),'VariableNode'('$STRING'("$pred")),'VariableNode'('$STRING'("$attr"))))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( define( printResults,
'BindLink'(
ftVariableList(
'TypedVariableLink'('VariableNode'('$STRING'("$person")),'TypeNode'('$STRING'("FeatureNode"))),
VariableNode( '$STRING'("$pred")),
'TypedVariableLink'('VariableNode'('$STRING'("$attr")),'TypeNode'('$STRING'("ConceptNode")))),
AndLink( 'EvaluationLink'(
VariableNode( '$STRING'("$pred")),
'ListLink'('VariableNode'('$STRING'("$person")),'VariableNode'('$STRING'("$attr"))))),
'OrderedLink'(
VariableNode( '$STRING'("$person")),
VariableNode( '$STRING'("$pred")),
VariableNode( '$STRING'("$attr")))))).
============================================
%~ comment("; variable declarations")
%~ comment("; body -- if all parts of AndLink hold true ... then")
%~ comment(";")
%~ comment("; deduct-rules.scm")
%~ comment(";")
%~ comment("; Deduction rules for Einstein puzzle.")
%~ comment(";")
%~ comment("; The rules here are written in a fashion as close as possible to")
%~ comment("; 'ordinary' common-sense deductive rules. In particular, they are")
%~ comment("; not written to predispose the problem into a 5x5 solution grid")
%~ comment("; (although this is what they eventually must lead to). In other")
%~ comment("; words, there is no effort made to make this the most \"efficient\"")
%~ comment("; possible set of rules; instead, they''re the most \"natural\" or")
%~ comment("; \"common-sense-like\" for this task.")
%~ debugm( common_logic_loader,
%~ show_success(common_logic_loader,common_logic_loader:ain(clif('use-modules'(srfi('srfi-1'))))))
=======================================================
'use-modules'(srfi('srfi-1'))
============================================
?- kif_to_boxlog( 'use-modules'(srfi('srfi-1')) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ 'srfi-1' isa srfi isa 'use-modules'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ azzert_rename('use-modules',useModules)
%~ azzert_rename('srfi-1',srfi_1)
%~ kif_to_boxlog_attvars2 = necessary(useModules(srfi(srfi_1)))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(useModules(srfi(srfi_1))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that srfi_1 isa srfi isa useModules
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( useModules( srfi(srfi_1))).
============================================
%~ comment("; Define simple truth value")
%~ debugm( common_logic_loader,
%~ show_success(common_logic_loader,common_logic_loader:ain(clif(define(stv(mean,conf),'cog-new-stv'(mean,conf))))))
=======================================================
define(stv(mean,conf),'cog-new-stv'(mean,conf))
============================================
?- kif_to_boxlog( define(stv(mean,conf),'cog-new-stv'(mean,conf)) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ mean stv conf define mean 'cog-new-stv' conf
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(define(stv(mean,conf),cogNewStv(mean,conf)))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(define(stv(mean,conf),cogNewStv(mean,conf))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that mean stv conf define mean cogNewStv conf
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( define(stv(mean,conf),cogNewStv(mean,conf))).
============================================
%~ comment("; Shorthand for the node types")
%~ debugm( common_logic_loader,
%~ show_success(common_logic_loader,common_logic_loader:ain(clif(define('VN','VariableNode')))))
=======================================================
define('VN','VariableNode')
============================================
?- kif_to_boxlog( define('VN','VariableNode') ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ 'VN' define 'VariableNode'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(define('VN','VariableNode'))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(define('VN','VariableNode')).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that 'VN' define 'VariableNode'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( define('VN','VariableNode')).
============================================
%~ debugm( common_logic_loader,
%~ show_success(common_logic_loader,common_logic_loader:ain(clif(define('PN','PredicateNode')))))
=======================================================
define('PN','PredicateNode')
============================================
?- kif_to_boxlog( define('PN','PredicateNode') ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ 'PN' define 'PredicateNode'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(define('PN','PredicateNode'))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(define('PN','PredicateNode')).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that 'PN' define 'PredicateNode'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( define('PN','PredicateNode')).
============================================
%~ debugm( common_logic_loader,
%~ show_success(common_logic_loader,common_logic_loader:ain(clif(define('CN','ConceptNode')))))
=======================================================
define('CN','ConceptNode')
============================================
?- kif_to_boxlog( define('CN','ConceptNode') ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ 'CN' define 'ConceptNode'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(define('CN','ConceptNode'))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(define('CN','ConceptNode')).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that 'CN' define 'ConceptNode'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( define('CN','ConceptNode')).
============================================
%~ debugm( common_logic_loader,
%~ show_success(common_logic_loader,common_logic_loader:ain(clif(define('AN','FeatureNode')))))
=======================================================
define('AN','FeatureNode')
============================================
?- kif_to_boxlog( define('AN','FeatureNode') ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ 'AN' define 'FeatureNode'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(define('AN','FeatureNode'))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(define('AN','FeatureNode')).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that 'AN' define 'FeatureNode'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( define('AN','FeatureNode')).
============================================
%~ comment(" AvatarNode")
%~ comment("; Predicate clause specifies a predicate that associates attribute to person")
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( define(clause(t1,v1,t2,v2,t3,v3),'EvaluationLink'(t1(v1),'ListLink'(t2(v2),t3(v3))))))))
=======================================================
define(clause(t1,v1,t2,v2,t3,v3),'EvaluationLink'(t1(v1),'ListLink'(t2(v2),t3(v3))))
============================================
?- kif_to_boxlog( define(clause(t1,v1,t2,v2,t3,v3),'EvaluationLink'(t1(v1),'ListLink'(t2(v2),t3(v3)))) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ clause(t1,v1,t2,v2,t3,v3) define v1 isa t1 'EvaluationLink' v2 isa t2 'ListLink' v3 isa t3
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(define(clause(t1,v1,t2,v2,t3,v3),'EvaluationLink'(t1(v1),'ListLink'(t2(v2),t3(v3)))))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(define(clause(t1,v1,t2,v2,t3,v3),'EvaluationLink'(t1(v1),'ListLink'(t2(v2),t3(v3))))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that clause(t1,v1,t2,v2,t3,v3) define v1 isa t1 'EvaluationLink' v2 isa t2 'ListLink' v3 isa t3
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( define(clause(t1,v1,t2,v2,t3,v3),'EvaluationLink'(t1(v1),'ListLink'(t2(v2),t3(v3))))).
============================================
%~ comment("; Predicate clause negating the third attribute.")
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( define('not-clause'(t1,v1,t2,v2,t3,v3),'EvaluationLink'(t1(v1),'ListLink'(t2(v2),'NotLink'(t3(v3)))))))))
=======================================================
define('not-clause'(t1,v1,t2,v2,t3,v3),'EvaluationLink'(t1(v1),'ListLink'(t2(v2),'NotLink'(t3(v3)))))
============================================
?- kif_to_boxlog( define('not-clause'(t1,v1,t2,v2,t3,v3),'EvaluationLink'(t1(v1),'ListLink'(t2(v2),'NotLink'(t3(v3))))) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ 'not-clause'(t1,v1,t2,v2,t3,v3) define v1 isa t1 'EvaluationLink' v2 isa t2 'ListLink' v3 isa t3 isa 'NotLink'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ azzert_rename('not-clause',notClause)
%~ kif_to_boxlog_attvars2 = necessary(define(notClause(t1,v1,t2,v2,t3,v3),'EvaluationLink'(t1(v1),'ListLink'(t2(v2),'NotLink'(t3(v3))))))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(define(notClause(t1,v1,t2,v2,t3,v3),'EvaluationLink'(t1(v1),'ListLink'(t2(v2),'NotLink'(t3(v3)))))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that notClause(t1,v1,t2,v2,t3,v3) define v1 isa t1 'EvaluationLink' v2 isa t2 'ListLink' v3 isa t3 isa 'NotLink'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( define(notClause(t1,v1,t2,v2,t3,v3),'EvaluationLink'(t1(v1),'ListLink'(t2(v2),'NotLink'(t3(v3)))))).
============================================
%~ comment("; Predicate clause, asserting that v2 and v3 are different atoms.")
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( define( differ(t2,v2,t3,v3),
%~ 'EvaluationLink'('GroundedPredicateNode'('$STRING'("c++:exclusive")),'ListLink'(t2(v2),t3(v3))))))))
=======================================================
define(differ(t2,v2,t3,v3),'EvaluationLink'('GroundedPredicateNode'('$STRING'("c++:exclusive")),'ListLink'(t2(v2),t3(v3))))
============================================
?- kif_to_boxlog( define(differ(t2,v2,t3,v3),'EvaluationLink'('GroundedPredicateNode'('$STRING'("c++:exclusive")),'ListLink'(t2(v2),t3(v3)))) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ differ(t2,v2,t3,v3) define "c++:exclusive" isa '$STRING' isa 'GroundedPredicateNode' 'EvaluationLink' v2 isa t2 'ListLink' v3 isa t3
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(define(differ(t2,v2,t3,v3),'EvaluationLink'('GroundedPredicateNode'('$STRING'("c++:exclusive")),'ListLink'(t2(v2),t3(v3)))))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(define(differ(t2,v2,t3,v3),'EvaluationLink'('GroundedPredicateNode'('$STRING'("c++:exclusive")),'ListLink'(t2(v2),t3(v3))))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that differ(t2,v2,t3,v3) define "c++:exclusive" isa '$STRING' isa 'GroundedPredicateNode' 'EvaluationLink' v2 isa t2 'ListLink' v3 isa t3
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( define( differ(t2,v2,t3,v3),
'EvaluationLink'('GroundedPredicateNode'('$STRING'("c++:exclusive")),'ListLink'(t2(v2),t3(v3))))).
============================================
%~ comment("; Declare a variable var to be of type type")
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( define('decl-var'(type,var),'TypedVariableLink'('VariableNode'(var),'TypeNode'(type)))))))
=======================================================
define('decl-var'(type,var),'TypedVariableLink'('VariableNode'(var),'TypeNode'(type)))
============================================
?- kif_to_boxlog( define('decl-var'(type,var),'TypedVariableLink'('VariableNode'(var),'TypeNode'(type))) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ type 'decl-var' var define var isa 'VariableNode' 'TypedVariableLink' type isa 'TypeNode'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ azzert_rename('decl-var',declVar)
%~ kif_to_boxlog_attvars2 = necessary(define(declVar(type,var),'TypedVariableLink'('VariableNode'(var),'TypeNode'(type))))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(define(declVar(type,var),'TypedVariableLink'('VariableNode'(var),'TypeNode'(type)))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that type declVar var define var isa 'VariableNode' 'TypedVariableLink' type isa 'TypeNode'
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( define(declVar(type,var),'TypedVariableLink'('VariableNode'(var),'TypeNode'(type)))).
============================================
%~ comment("; ---------------------------------------------------------------------")
%~ comment("; \"Is the same person\" deduction rule.")
%~ comment("; If person A and person B both share the same predicate and property,")
%~ comment("; then they must be the same person.")
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( define( 'is-same-rule',
%~ 'BindLink'(
%~ 'VariableList'(
%~ 'decl-var'('$STRING'("PredicateNode"),'$STRING'("$predicate")),
%~ 'decl-var'('$STRING'("FeatureNode"),'$STRING'("$person_a")),
%~ 'decl-var'('$STRING'("FeatureNode"),'$STRING'("$person_b")),
%~ 'decl-var'('$STRING'("ConceptNode"),'$STRING'("$attribute"))),
%~ 'AndLink'(
%~ clause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_a"),'VN','$STRING'("$attribute")),
%~ clause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute")),
%~ AbsentLink( clause('PN','$STRING'("IsSamePerson"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b")))),
%~ clause('PN','$STRING'("IsSamePerson"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b"))))))))
=======================================================
define('is-same-rule','BindLink'('VariableList'('decl-var'('$STRING'("PredicateNode"),'$STRING'("$predicate")),'decl-var'('$STRING'("FeatureNode"),'$STRING'("$person_a")),'decl-var'('$STRING'("FeatureNode"),'$STRING'("$person_b")),'decl-var'('$STRING'("ConceptNode"),'$STRING'("$attribute"))),'AndLink'(clause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_a"),'VN','$STRING'("$attribute")),clause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute")),'AbsentLink'(clause('PN','$STRING'("IsSamePerson"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b")))),clause('PN','$STRING'("IsSamePerson"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b"))))
============================================
?- kif_to_boxlog( define('is-same-rule','BindLink'('VariableList'('decl-var'('$STRING'("PredicateNode"),'$STRING'("$predicate")),'decl-var'('$STRING'("FeatureNode"),'$STRING'("$person_a")),'decl-var'('$STRING'("FeatureNode"),'$STRING'("$person_b")),'decl-var'('$STRING'("ConceptNode"),'$STRING'("$attribute"))),'AndLink'(clause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_a"),'VN','$STRING'("$attribute")),clause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute")),'AbsentLink'(clause('PN','$STRING'("IsSamePerson"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b")))),clause('PN','$STRING'("IsSamePerson"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b")))) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ 'is-same-rule' define 'BindLink'('VariableList'('decl-var'('$STRING'("PredicateNode"),'$STRING'("$predicate")),'decl-var'('$STRING'("FeatureNode"),'$STRING'("$person_a")),'decl-var'('$STRING'("FeatureNode"),'$STRING'("$person_b")),'decl-var'('$STRING'("ConceptNode"),'$STRING'("$attribute"))),'AndLink'(clause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_a"),'VN','$STRING'("$attribute")),clause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute")),'AbsentLink'(clause('PN','$STRING'("IsSamePerson"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b")))),clause('PN','$STRING'("IsSamePerson"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b")))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ azzert_rename('is-same-rule',isSameRule)
%~ kif_to_boxlog_attvars2 = necessary(define(isSameRule,'BindLink'(ftVariableList(declVar('$STRING'("PredicateNode"),'$STRING'("$predicate")),declVar('$STRING'("FeatureNode"),'$STRING'("$person_a")),declVar('$STRING'("FeatureNode"),'$STRING'("$person_b")),declVar('$STRING'("ConceptNode"),'$STRING'("$attribute"))),'AndLink'(clause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_a"),'VN','$STRING'("$attribute")),clause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute")),'AbsentLink'(clause('PN','$STRING'("IsSamePerson"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b")))),clause('PN','$STRING'("IsSamePerson"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b")))))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(define(isSameRule,'BindLink'(ftVariableList(declVar('$STRING'("PredicateNode"),'$STRING'("$predicate")),declVar('$STRING'("FeatureNode"),'$STRING'("$person_a")),declVar('$STRING'("FeatureNode"),'$STRING'("$person_b")),declVar('$STRING'("ConceptNode"),'$STRING'("$attribute"))),'AndLink'(clause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_a"),'VN','$STRING'("$attribute")),clause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute")),'AbsentLink'(clause('PN','$STRING'("IsSamePerson"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b")))),clause('PN','$STRING'("IsSamePerson"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b"))))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that isSameRule define 'BindLink'(ftVariableList(declVar('$STRING'("PredicateNode"),'$STRING'("$predicate")),declVar('$STRING'("FeatureNode"),'$STRING'("$person_a")),declVar('$STRING'("FeatureNode"),'$STRING'("$person_b")),declVar('$STRING'("ConceptNode"),'$STRING'("$attribute"))),'AndLink'(clause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_a"),'VN','$STRING'("$attribute")),clause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute")),'AbsentLink'(clause('PN','$STRING'("IsSamePerson"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b")))),clause('PN','$STRING'("IsSamePerson"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b")))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( define( isSameRule,
'BindLink'(
ftVariableList(
declVar('$STRING'("PredicateNode"),'$STRING'("$predicate")),
declVar('$STRING'("FeatureNode"),'$STRING'("$person_a")),
declVar('$STRING'("FeatureNode"),'$STRING'("$person_b")),
declVar('$STRING'("ConceptNode"),'$STRING'("$attribute"))),
'AndLink'(
clause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_a"),'VN','$STRING'("$attribute")),
clause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute")),
AbsentLink( clause('PN','$STRING'("IsSamePerson"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b")))),
clause('PN','$STRING'("IsSamePerson"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b"))))).
============================================
%~ comment("; variable declarations")
%~ comment("; body -- if all parts of AndLink hold true ... ")
%~ comment("; Avoid reporting things we already know.")
%~ comment("; Basically, if we already know that person A and B")
%~ comment("; are the same person, then lets not deduce it again.")
%~ comment("; This not link is identical to the conclusion below")
%~ comment("; implicand -- then the following is true too")
%~ comment("; ---------------------------------------------------------------------")
%~ comment("; Transitive deduction rule.")
%~ comment(";")
%~ comment("; If attribute X holds for person A, and person A is same as person B")
%~ comment("; then attribute X also holds for person B.")
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( define( 'transitive-rule',
%~ 'BindLink'(
%~ 'VariableList'(
%~ 'decl-var'('$STRING'("PredicateNode"),'$STRING'("$predicate")),
%~ 'decl-var'('$STRING'("FeatureNode"),'$STRING'("$person_a")),
%~ 'decl-var'('$STRING'("FeatureNode"),'$STRING'("$person_b")),
%~ 'decl-var'('$STRING'("ConceptNode"),'$STRING'("$attribute"))),
%~ 'AndLink'(
%~ clause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_a"),'VN','$STRING'("$attribute")),
%~ clause('PN','$STRING'("IsSamePerson"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b")),
%~ AbsentLink( clause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute")))),
%~ clause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute"))))))))
=======================================================
define('transitive-rule','BindLink'('VariableList'('decl-var'('$STRING'("PredicateNode"),'$STRING'("$predicate")),'decl-var'('$STRING'("FeatureNode"),'$STRING'("$person_a")),'decl-var'('$STRING'("FeatureNode"),'$STRING'("$person_b")),'decl-var'('$STRING'("ConceptNode"),'$STRING'("$attribute"))),'AndLink'(clause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_a"),'VN','$STRING'("$attribute")),clause('PN','$STRING'("IsSamePerson"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b")),'AbsentLink'(clause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute")))),clause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute"))))
============================================
?- kif_to_boxlog( define('transitive-rule','BindLink'('VariableList'('decl-var'('$STRING'("PredicateNode"),'$STRING'("$predicate")),'decl-var'('$STRING'("FeatureNode"),'$STRING'("$person_a")),'decl-var'('$STRING'("FeatureNode"),'$STRING'("$person_b")),'decl-var'('$STRING'("ConceptNode"),'$STRING'("$attribute"))),'AndLink'(clause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_a"),'VN','$STRING'("$attribute")),clause('PN','$STRING'("IsSamePerson"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b")),'AbsentLink'(clause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute")))),clause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute")))) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ 'transitive-rule' define 'BindLink'('VariableList'('decl-var'('$STRING'("PredicateNode"),'$STRING'("$predicate")),'decl-var'('$STRING'("FeatureNode"),'$STRING'("$person_a")),'decl-var'('$STRING'("FeatureNode"),'$STRING'("$person_b")),'decl-var'('$STRING'("ConceptNode"),'$STRING'("$attribute"))),'AndLink'(clause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_a"),'VN','$STRING'("$attribute")),clause('PN','$STRING'("IsSamePerson"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b")),'AbsentLink'(clause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute")))),clause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute")))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ azzert_rename('transitive-rule',transitiveRule)
%~ kif_to_boxlog_attvars2 = necessary(define(transitiveRule,'BindLink'(ftVariableList(declVar('$STRING'("PredicateNode"),'$STRING'("$predicate")),declVar('$STRING'("FeatureNode"),'$STRING'("$person_a")),declVar('$STRING'("FeatureNode"),'$STRING'("$person_b")),declVar('$STRING'("ConceptNode"),'$STRING'("$attribute"))),'AndLink'(clause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_a"),'VN','$STRING'("$attribute")),clause('PN','$STRING'("IsSamePerson"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b")),'AbsentLink'(clause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute")))),clause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute")))))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(define(transitiveRule,'BindLink'(ftVariableList(declVar('$STRING'("PredicateNode"),'$STRING'("$predicate")),declVar('$STRING'("FeatureNode"),'$STRING'("$person_a")),declVar('$STRING'("FeatureNode"),'$STRING'("$person_b")),declVar('$STRING'("ConceptNode"),'$STRING'("$attribute"))),'AndLink'(clause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_a"),'VN','$STRING'("$attribute")),clause('PN','$STRING'("IsSamePerson"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b")),'AbsentLink'(clause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute")))),clause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute"))))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that transitiveRule define 'BindLink'(ftVariableList(declVar('$STRING'("PredicateNode"),'$STRING'("$predicate")),declVar('$STRING'("FeatureNode"),'$STRING'("$person_a")),declVar('$STRING'("FeatureNode"),'$STRING'("$person_b")),declVar('$STRING'("ConceptNode"),'$STRING'("$attribute"))),'AndLink'(clause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_a"),'VN','$STRING'("$attribute")),clause('PN','$STRING'("IsSamePerson"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b")),'AbsentLink'(clause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute")))),clause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute")))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( define( transitiveRule,
'BindLink'(
ftVariableList(
declVar('$STRING'("PredicateNode"),'$STRING'("$predicate")),
declVar('$STRING'("FeatureNode"),'$STRING'("$person_a")),
declVar('$STRING'("FeatureNode"),'$STRING'("$person_b")),
declVar('$STRING'("ConceptNode"),'$STRING'("$attribute"))),
'AndLink'(
clause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_a"),'VN','$STRING'("$attribute")),
clause('PN','$STRING'("IsSamePerson"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b")),
AbsentLink( clause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute")))),
clause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute"))))).
============================================
%~ comment("; variable declarations")
%~ comment("; body -- if all parts of AndLink hold true ... then")
%~ comment("; Don''t deduce thigs we already know...")
%~ comment("; i.e. this not link is identical to conclusion, below.")
%~ comment("; implicand -- then the following is true too")
%~ comment("; ---------------------------------------------------------------------")
%~ comment("; Transitive-not deduction rule.")
%~ comment(";")
%~ comment("; If attribute X doesn''t hold for person A, and person A is same as person B")
%~ comment("; then attribute X also doesn''t hold for person B.")
%~ comment(";")
%~ comment("; Very similar to above")
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( define( 'transitive-not-rule',
%~ 'BindLink'(
%~ 'VariableList'(
%~ 'decl-var'('$STRING'("PredicateNode"),'$STRING'("$predicate")),
%~ 'decl-var'('$STRING'("FeatureNode"),'$STRING'("$person_a")),
%~ 'decl-var'('$STRING'("FeatureNode"),'$STRING'("$person_b")),
%~ 'decl-var'('$STRING'("ConceptNode"),'$STRING'("$attribute"))),
%~ 'AndLink'(
%~ 'not-clause'('VN','$STRING'("$predicate"),'VN','$STRING'("$person_a"),'VN','$STRING'("$attribute")),
%~ clause('PN','$STRING'("IsSamePerson"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b")),
%~ AbsentLink( 'not-clause'('VN','$STRING'("$predicate"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute")))),
%~ 'not-clause'('VN','$STRING'("$predicate"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute"))))))))
=======================================================
define('transitive-not-rule','BindLink'('VariableList'('decl-var'('$STRING'("PredicateNode"),'$STRING'("$predicate")),'decl-var'('$STRING'("FeatureNode"),'$STRING'("$person_a")),'decl-var'('$STRING'("FeatureNode"),'$STRING'("$person_b")),'decl-var'('$STRING'("ConceptNode"),'$STRING'("$attribute"))),'AndLink'('not-clause'('VN','$STRING'("$predicate"),'VN','$STRING'("$person_a"),'VN','$STRING'("$attribute")),clause('PN','$STRING'("IsSamePerson"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b")),'AbsentLink'('not-clause'('VN','$STRING'("$predicate"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute")))),'not-clause'('VN','$STRING'("$predicate"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute"))))
============================================
?- kif_to_boxlog( define('transitive-not-rule','BindLink'('VariableList'('decl-var'('$STRING'("PredicateNode"),'$STRING'("$predicate")),'decl-var'('$STRING'("FeatureNode"),'$STRING'("$person_a")),'decl-var'('$STRING'("FeatureNode"),'$STRING'("$person_b")),'decl-var'('$STRING'("ConceptNode"),'$STRING'("$attribute"))),'AndLink'('not-clause'('VN','$STRING'("$predicate"),'VN','$STRING'("$person_a"),'VN','$STRING'("$attribute")),clause('PN','$STRING'("IsSamePerson"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b")),'AbsentLink'('not-clause'('VN','$STRING'("$predicate"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute")))),'not-clause'('VN','$STRING'("$predicate"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute")))) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ 'transitive-not-rule' define 'BindLink'('VariableList'('decl-var'('$STRING'("PredicateNode"),'$STRING'("$predicate")),'decl-var'('$STRING'("FeatureNode"),'$STRING'("$person_a")),'decl-var'('$STRING'("FeatureNode"),'$STRING'("$person_b")),'decl-var'('$STRING'("ConceptNode"),'$STRING'("$attribute"))),'AndLink'('not-clause'('VN','$STRING'("$predicate"),'VN','$STRING'("$person_a"),'VN','$STRING'("$attribute")),clause('PN','$STRING'("IsSamePerson"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b")),'AbsentLink'('not-clause'('VN','$STRING'("$predicate"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute")))),'not-clause'('VN','$STRING'("$predicate"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute")))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ azzert_rename('transitive-not-rule',transitiveNotRule)
%~ kif_to_boxlog_attvars2 = necessary(define(transitiveNotRule,'BindLink'(ftVariableList(declVar('$STRING'("PredicateNode"),'$STRING'("$predicate")),declVar('$STRING'("FeatureNode"),'$STRING'("$person_a")),declVar('$STRING'("FeatureNode"),'$STRING'("$person_b")),declVar('$STRING'("ConceptNode"),'$STRING'("$attribute"))),'AndLink'(notClause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_a"),'VN','$STRING'("$attribute")),clause('PN','$STRING'("IsSamePerson"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b")),'AbsentLink'(notClause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute")))),notClause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute")))))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(define(transitiveNotRule,'BindLink'(ftVariableList(declVar('$STRING'("PredicateNode"),'$STRING'("$predicate")),declVar('$STRING'("FeatureNode"),'$STRING'("$person_a")),declVar('$STRING'("FeatureNode"),'$STRING'("$person_b")),declVar('$STRING'("ConceptNode"),'$STRING'("$attribute"))),'AndLink'(notClause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_a"),'VN','$STRING'("$attribute")),clause('PN','$STRING'("IsSamePerson"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b")),'AbsentLink'(notClause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute")))),notClause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute"))))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that transitiveNotRule define 'BindLink'(ftVariableList(declVar('$STRING'("PredicateNode"),'$STRING'("$predicate")),declVar('$STRING'("FeatureNode"),'$STRING'("$person_a")),declVar('$STRING'("FeatureNode"),'$STRING'("$person_b")),declVar('$STRING'("ConceptNode"),'$STRING'("$attribute"))),'AndLink'(notClause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_a"),'VN','$STRING'("$attribute")),clause('PN','$STRING'("IsSamePerson"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b")),'AbsentLink'(notClause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute")))),notClause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute")))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( define( transitiveNotRule,
'BindLink'(
ftVariableList(
declVar('$STRING'("PredicateNode"),'$STRING'("$predicate")),
declVar('$STRING'("FeatureNode"),'$STRING'("$person_a")),
declVar('$STRING'("FeatureNode"),'$STRING'("$person_b")),
declVar('$STRING'("ConceptNode"),'$STRING'("$attribute"))),
'AndLink'(
notClause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_a"),'VN','$STRING'("$attribute")),
clause('PN','$STRING'("IsSamePerson"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b")),
AbsentLink( notClause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute")))),
notClause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute"))))).
============================================
%~ comment("; variable declarations")
%~ comment("; body -- if all parts of AndLink hold true ... then")
%~ comment("; Don''t deduce thigs we already know...")
%~ comment("; i.e. this not link is identical to conclusion, below.")
%~ comment("; implicand -- then the following is true too")
%~ comment("; ---------------------------------------------------------------------")
%~ comment("; elimination")
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( define( 'by-elimination-rule',
%~ 'BindLink'(
%~ 'VariableList'(
%~ 'decl-var'('$STRING'("FeatureNode"),'$STRING'("$person")),
%~ 'decl-var'('$STRING'("PredicateNode"),'$STRING'("$predicate")),
%~ 'decl-var'('$STRING'("ConceptNode"),'$STRING'("$attr_a")),
%~ 'decl-var'('$STRING'("ConceptNode"),'$STRING'("$attr_b")),
%~ 'decl-var'('$STRING'("ConceptNode"),'$STRING'("$attr_c")),
%~ 'decl-var'('$STRING'("ConceptNode"),'$STRING'("$attr_d")),
%~ 'decl-var'('$STRING'("ConceptNode"),'$STRING'("$attr_e")),
%~ 'decl-var'('$STRING'("ConceptNode"),'$STRING'("$attr_type"))),
%~ 'AndLink'(
%~ 'not-clause'('VN','$STRING'("$predicate"),'VN','$STRING'("$person"),'VN','$STRING'("$attr_a")),
%~ 'not-clause'('VN','$STRING'("$predicate"),'VN','$STRING'("$person"),'VN','$STRING'("$attr_b")),
%~ 'not-clause'('VN','$STRING'("$predicate"),'VN','$STRING'("$person"),'VN','$STRING'("$attr_c")),
%~ 'not-clause'('VN','$STRING'("$predicate"),'VN','$STRING'("$person"),'VN','$STRING'("$attr_d")),
%~ 'InheritanceLink'('VN'('$STRING'("$attr_a")),'VN'('$STRING'("$attr_type"))),
%~ 'InheritanceLink'('VN'('$STRING'("$attr_b")),'VN'('$STRING'("$attr_type"))),
%~ 'InheritanceLink'('VN'('$STRING'("$attr_c")),'VN'('$STRING'("$attr_type"))),
%~ 'InheritanceLink'('VN'('$STRING'("$attr_d")),'VN'('$STRING'("$attr_type"))),
%~ 'InheritanceLink'('VN'('$STRING'("$attr_e")),'VN'('$STRING'("$attr_type"))),
%~ 'EvaluationLink'(
%~ GroundedPredicateNode( '$STRING'("c++:exclusive")),
%~ 'ListLink'(
%~ VN( '$STRING'("$attr_a")),
%~ VN( '$STRING'("$attr_b")),
%~ VN( '$STRING'("$attr_c")),
%~ VN( '$STRING'("$attr_d")),
%~ VN( '$STRING'("$attr_e"))))),
%~ clause('VN','$STRING'("$predicate"),'VN','$STRING'("$person"),'VN','$STRING'("$attr_e"))))))))
=======================================================
define('by-elimination-rule','BindLink'('VariableList'('decl-var'('$STRING'("FeatureNode"),'$STRING'("$person")),'decl-var'('$STRING'("PredicateNode"),'$STRING'("$predicate")),'decl-var'('$STRING'("ConceptNode"),'$STRING'("$attr_a")),'decl-var'('$STRING'("ConceptNode"),'$STRING'("$attr_b")),'decl-var'('$STRING'("ConceptNode"),'$STRING'("$attr_c")),'decl-var'('$STRING'("ConceptNode"),'$STRING'("$attr_d")),'decl-var'('$STRING'("ConceptNode"),'$STRING'("$attr_e")),'decl-var'('$STRING'("ConceptNode"),'$STRING'("$attr_type"))),'AndLink'('not-clause'('VN','$STRING'("$predicate"),'VN','$STRING'("$person"),'VN','$STRING'("$attr_a")),'not-clause'('VN','$STRING'("$predicate"),'VN','$STRING'("$person"),'VN','$STRING'("$attr_b")),'not-clause'('VN','$STRING'("$predicate"),'VN','$STRING'("$person"),'VN','$STRING'("$attr_c")),'not-clause'('VN','$STRING'("$predicate"),'VN','$STRING'("$person"),'VN','$STRING'("$attr_d")),'InheritanceLink'('VN'('$STRING'("$attr_a")),'VN'('$STRING'("$attr_type"))),'InheritanceLink'('VN'('$STRING'("$attr_b")),'VN'('$STRING'("$attr_type"))),'InheritanceLink'('VN'('$STRING'("$attr_c")),'VN'('$STRING'("$attr_type"))),'InheritanceLink'('VN'('$STRING'("$attr_d")),'VN'('$STRING'("$attr_type"))),'InheritanceLink'('VN'('$STRING'("$attr_e")),'VN'('$STRING'("$attr_type"))),'EvaluationLink'('GroundedPredicateNode'('$STRING'("c++:exclusive")),'ListLink'('VN'('$STRING'("$attr_a")),'VN'('$STRING'("$attr_b")),'VN'('$STRING'("$attr_c")),'VN'('$STRING'("$attr_d")),'VN'('$STRING'("$attr_e"))))),clause('VN','$STRING'("$predicate"),'VN','$STRING'("$person"),'VN','$STRING'("$attr_e"))))
============================================
?- kif_to_boxlog( define('by-elimination-rule','BindLink'('VariableList'('decl-var'('$STRING'("FeatureNode"),'$STRING'("$person")),'decl-var'('$STRING'("PredicateNode"),'$STRING'("$predicate")),'decl-var'('$STRING'("ConceptNode"),'$STRING'("$attr_a")),'decl-var'('$STRING'("ConceptNode"),'$STRING'("$attr_b")),'decl-var'('$STRING'("ConceptNode"),'$STRING'("$attr_c")),'decl-var'('$STRING'("ConceptNode"),'$STRING'("$attr_d")),'decl-var'('$STRING'("ConceptNode"),'$STRING'("$attr_e")),'decl-var'('$STRING'("ConceptNode"),'$STRING'("$attr_type"))),'AndLink'('not-clause'('VN','$STRING'("$predicate"),'VN','$STRING'("$person"),'VN','$STRING'("$attr_a")),'not-clause'('VN','$STRING'("$predicate"),'VN','$STRING'("$person"),'VN','$STRING'("$attr_b")),'not-clause'('VN','$STRING'("$predicate"),'VN','$STRING'("$person"),'VN','$STRING'("$attr_c")),'not-clause'('VN','$STRING'("$predicate"),'VN','$STRING'("$person"),'VN','$STRING'("$attr_d")),'InheritanceLink'('VN'('$STRING'("$attr_a")),'VN'('$STRING'("$attr_type"))),'InheritanceLink'('VN'('$STRING'("$attr_b")),'VN'('$STRING'("$attr_type"))),'InheritanceLink'('VN'('$STRING'("$attr_c")),'VN'('$STRING'("$attr_type"))),'InheritanceLink'('VN'('$STRING'("$attr_d")),'VN'('$STRING'("$attr_type"))),'InheritanceLink'('VN'('$STRING'("$attr_e")),'VN'('$STRING'("$attr_type"))),'EvaluationLink'('GroundedPredicateNode'('$STRING'("c++:exclusive")),'ListLink'('VN'('$STRING'("$attr_a")),'VN'('$STRING'("$attr_b")),'VN'('$STRING'("$attr_c")),'VN'('$STRING'("$attr_d")),'VN'('$STRING'("$attr_e"))))),clause('VN','$STRING'("$predicate"),'VN','$STRING'("$person"),'VN','$STRING'("$attr_e")))) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ 'by-elimination-rule' define 'BindLink'('VariableList'('decl-var'('$STRING'("FeatureNode"),'$STRING'("$person")),'decl-var'('$STRING'("PredicateNode"),'$STRING'("$predicate")),'decl-var'('$STRING'("ConceptNode"),'$STRING'("$attr_a")),'decl-var'('$STRING'("ConceptNode"),'$STRING'("$attr_b")),'decl-var'('$STRING'("ConceptNode"),'$STRING'("$attr_c")),'decl-var'('$STRING'("ConceptNode"),'$STRING'("$attr_d")),'decl-var'('$STRING'("ConceptNode"),'$STRING'("$attr_e")),'decl-var'('$STRING'("ConceptNode"),'$STRING'("$attr_type"))),'AndLink'('not-clause'('VN','$STRING'("$predicate"),'VN','$STRING'("$person"),'VN','$STRING'("$attr_a")),'not-clause'('VN','$STRING'("$predicate"),'VN','$STRING'("$person"),'VN','$STRING'("$attr_b")),'not-clause'('VN','$STRING'("$predicate"),'VN','$STRING'("$person"),'VN','$STRING'("$attr_c")),'not-clause'('VN','$STRING'("$predicate"),'VN','$STRING'("$person"),'VN','$STRING'("$attr_d")),'InheritanceLink'('VN'('$STRING'("$attr_a")),'VN'('$STRING'("$attr_type"))),'InheritanceLink'('VN'('$STRING'("$attr_b")),'VN'('$STRING'("$attr_type"))),'InheritanceLink'('VN'('$STRING'("$attr_c")),'VN'('$STRING'("$attr_type"))),'InheritanceLink'('VN'('$STRING'("$attr_d")),'VN'('$STRING'("$attr_type"))),'InheritanceLink'('VN'('$STRING'("$attr_e")),'VN'('$STRING'("$attr_type"))),'EvaluationLink'('GroundedPredicateNode'('$STRING'("c++:exclusive")),'ListLink'('VN'('$STRING'("$attr_a")),'VN'('$STRING'("$attr_b")),'VN'('$STRING'("$attr_c")),'VN'('$STRING'("$attr_d")),'VN'('$STRING'("$attr_e"))))),clause('VN','$STRING'("$predicate"),'VN','$STRING'("$person"),'VN','$STRING'("$attr_e")))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ azzert_rename('by-elimination-rule',byEliminationRule)
%~ kif_to_boxlog_attvars2 = necessary(define(byEliminationRule,'BindLink'(ftVariableList(declVar('$STRING'("FeatureNode"),'$STRING'("$person")),declVar('$STRING'("PredicateNode"),'$STRING'("$predicate")),declVar('$STRING'("ConceptNode"),'$STRING'("$attr_a")),declVar('$STRING'("ConceptNode"),'$STRING'("$attr_b")),declVar('$STRING'("ConceptNode"),'$STRING'("$attr_c")),declVar('$STRING'("ConceptNode"),'$STRING'("$attr_d")),declVar('$STRING'("ConceptNode"),'$STRING'("$attr_e")),declVar('$STRING'("ConceptNode"),'$STRING'("$attr_type"))),'AndLink'(notClause('VN','$STRING'("$predicate"),'VN','$STRING'("$person"),'VN','$STRING'("$attr_a")),notClause('VN','$STRING'("$predicate"),'VN','$STRING'("$person"),'VN','$STRING'("$attr_b")),notClause('VN','$STRING'("$predicate"),'VN','$STRING'("$person"),'VN','$STRING'("$attr_c")),notClause('VN','$STRING'("$predicate"),'VN','$STRING'("$person"),'VN','$STRING'("$attr_d")),'InheritanceLink'('VN'('$STRING'("$attr_a")),'VN'('$STRING'("$attr_type"))),'InheritanceLink'('VN'('$STRING'("$attr_b")),'VN'('$STRING'("$attr_type"))),'InheritanceLink'('VN'('$STRING'("$attr_c")),'VN'('$STRING'("$attr_type"))),'InheritanceLink'('VN'('$STRING'("$attr_d")),'VN'('$STRING'("$attr_type"))),'InheritanceLink'('VN'('$STRING'("$attr_e")),'VN'('$STRING'("$attr_type"))),'EvaluationLink'('GroundedPredicateNode'('$STRING'("c++:exclusive")),'ListLink'('VN'('$STRING'("$attr_a")),'VN'('$STRING'("$attr_b")),'VN'('$STRING'("$attr_c")),'VN'('$STRING'("$attr_d")),'VN'('$STRING'("$attr_e"))))),clause('VN','$STRING'("$predicate"),'VN','$STRING'("$person"),'VN','$STRING'("$attr_e")))))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(define(byEliminationRule,'BindLink'(ftVariableList(declVar('$STRING'("FeatureNode"),'$STRING'("$person")),declVar('$STRING'("PredicateNode"),'$STRING'("$predicate")),declVar('$STRING'("ConceptNode"),'$STRING'("$attr_a")),declVar('$STRING'("ConceptNode"),'$STRING'("$attr_b")),declVar('$STRING'("ConceptNode"),'$STRING'("$attr_c")),declVar('$STRING'("ConceptNode"),'$STRING'("$attr_d")),declVar('$STRING'("ConceptNode"),'$STRING'("$attr_e")),declVar('$STRING'("ConceptNode"),'$STRING'("$attr_type"))),'AndLink'(notClause('VN','$STRING'("$predicate"),'VN','$STRING'("$person"),'VN','$STRING'("$attr_a")),notClause('VN','$STRING'("$predicate"),'VN','$STRING'("$person"),'VN','$STRING'("$attr_b")),notClause('VN','$STRING'("$predicate"),'VN','$STRING'("$person"),'VN','$STRING'("$attr_c")),notClause('VN','$STRING'("$predicate"),'VN','$STRING'("$person"),'VN','$STRING'("$attr_d")),'InheritanceLink'('VN'('$STRING'("$attr_a")),'VN'('$STRING'("$attr_type"))),'InheritanceLink'('VN'('$STRING'("$attr_b")),'VN'('$STRING'("$attr_type"))),'InheritanceLink'('VN'('$STRING'("$attr_c")),'VN'('$STRING'("$attr_type"))),'InheritanceLink'('VN'('$STRING'("$attr_d")),'VN'('$STRING'("$attr_type"))),'InheritanceLink'('VN'('$STRING'("$attr_e")),'VN'('$STRING'("$attr_type"))),'EvaluationLink'('GroundedPredicateNode'('$STRING'("c++:exclusive")),'ListLink'('VN'('$STRING'("$attr_a")),'VN'('$STRING'("$attr_b")),'VN'('$STRING'("$attr_c")),'VN'('$STRING'("$attr_d")),'VN'('$STRING'("$attr_e"))))),clause('VN','$STRING'("$predicate"),'VN','$STRING'("$person"),'VN','$STRING'("$attr_e"))))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that byEliminationRule define 'BindLink'(ftVariableList(declVar('$STRING'("FeatureNode"),'$STRING'("$person")),declVar('$STRING'("PredicateNode"),'$STRING'("$predicate")),declVar('$STRING'("ConceptNode"),'$STRING'("$attr_a")),declVar('$STRING'("ConceptNode"),'$STRING'("$attr_b")),declVar('$STRING'("ConceptNode"),'$STRING'("$attr_c")),declVar('$STRING'("ConceptNode"),'$STRING'("$attr_d")),declVar('$STRING'("ConceptNode"),'$STRING'("$attr_e")),declVar('$STRING'("ConceptNode"),'$STRING'("$attr_type"))),'AndLink'(notClause('VN','$STRING'("$predicate"),'VN','$STRING'("$person"),'VN','$STRING'("$attr_a")),notClause('VN','$STRING'("$predicate"),'VN','$STRING'("$person"),'VN','$STRING'("$attr_b")),notClause('VN','$STRING'("$predicate"),'VN','$STRING'("$person"),'VN','$STRING'("$attr_c")),notClause('VN','$STRING'("$predicate"),'VN','$STRING'("$person"),'VN','$STRING'("$attr_d")),'InheritanceLink'('VN'('$STRING'("$attr_a")),'VN'('$STRING'("$attr_type"))),'InheritanceLink'('VN'('$STRING'("$attr_b")),'VN'('$STRING'("$attr_type"))),'InheritanceLink'('VN'('$STRING'("$attr_c")),'VN'('$STRING'("$attr_type"))),'InheritanceLink'('VN'('$STRING'("$attr_d")),'VN'('$STRING'("$attr_type"))),'InheritanceLink'('VN'('$STRING'("$attr_e")),'VN'('$STRING'("$attr_type"))),'EvaluationLink'('GroundedPredicateNode'('$STRING'("c++:exclusive")),'ListLink'('VN'('$STRING'("$attr_a")),'VN'('$STRING'("$attr_b")),'VN'('$STRING'("$attr_c")),'VN'('$STRING'("$attr_d")),'VN'('$STRING'("$attr_e"))))),clause('VN','$STRING'("$predicate"),'VN','$STRING'("$person"),'VN','$STRING'("$attr_e")))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( define( byEliminationRule,
'BindLink'(
ftVariableList(
declVar('$STRING'("FeatureNode"),'$STRING'("$person")),
declVar('$STRING'("PredicateNode"),'$STRING'("$predicate")),
declVar('$STRING'("ConceptNode"),'$STRING'("$attr_a")),
declVar('$STRING'("ConceptNode"),'$STRING'("$attr_b")),
declVar('$STRING'("ConceptNode"),'$STRING'("$attr_c")),
declVar('$STRING'("ConceptNode"),'$STRING'("$attr_d")),
declVar('$STRING'("ConceptNode"),'$STRING'("$attr_e")),
declVar('$STRING'("ConceptNode"),'$STRING'("$attr_type"))),
'AndLink'(
notClause('VN','$STRING'("$predicate"),'VN','$STRING'("$person"),'VN','$STRING'("$attr_a")),
notClause('VN','$STRING'("$predicate"),'VN','$STRING'("$person"),'VN','$STRING'("$attr_b")),
notClause('VN','$STRING'("$predicate"),'VN','$STRING'("$person"),'VN','$STRING'("$attr_c")),
notClause('VN','$STRING'("$predicate"),'VN','$STRING'("$person"),'VN','$STRING'("$attr_d")),
'InheritanceLink'('VN'('$STRING'("$attr_a")),'VN'('$STRING'("$attr_type"))),
'InheritanceLink'('VN'('$STRING'("$attr_b")),'VN'('$STRING'("$attr_type"))),
'InheritanceLink'('VN'('$STRING'("$attr_c")),'VN'('$STRING'("$attr_type"))),
'InheritanceLink'('VN'('$STRING'("$attr_d")),'VN'('$STRING'("$attr_type"))),
'InheritanceLink'('VN'('$STRING'("$attr_e")),'VN'('$STRING'("$attr_type"))),
'EvaluationLink'(
GroundedPredicateNode( '$STRING'("c++:exclusive")),
'ListLink'(
VN( '$STRING'("$attr_a")),
VN( '$STRING'("$attr_b")),
VN( '$STRING'("$attr_c")),
VN( '$STRING'("$attr_d")),
VN( '$STRING'("$attr_e"))))),
clause('VN','$STRING'("$predicate"),'VN','$STRING'("$person"),'VN','$STRING'("$attr_e"))))).
============================================
%~ comment("; variable declarations")
%~ comment("; body -- if all parts of AndLink hold true ... then")
%~ comment("; If person does NOT have atttribute a,b,c or d ...")
%~ comment("; and the attributes a,b,c,d,e are all of the same kind")
%~ comment("; and attributes a,b,c,d,e are all different from one-another")
%~ comment("; Don''t deduce thigs we already know...")
%~ comment("; i.e. this not link is identical to conclusion, below.")
%~ comment("(AbsentLink")
%~ comment("\t(clause VN \"$predicate\" VN \"$person\" VN \"$attr_e\")")
%~ comment(")")
%~ comment("; implicand -- then the following is true too")
%~ comment("; Then by elimination, person must have attribute e.")
%~ comment("; ---------------------------------------------------------------------")
%~ comment("; distinct-attr rule.")
%~ comment("; If, for a given attribute, person a and person b take on different")
%~ comment("; values, then they cannot be the same person. Therefore, any other")
%~ comment("; attributes they have must also be exclusive.")
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( define( 'distinct-attr-rule',
%~ 'BindLink'(
%~ 'VariableList'(
%~ 'decl-var'('$STRING'("FeatureNode"),'$STRING'("$person_a")),
%~ 'decl-var'('$STRING'("FeatureNode"),'$STRING'("$person_b")),
%~ 'decl-var'('$STRING'("PredicateNode"),'$STRING'("$predicate_common")),
%~ 'decl-var'('$STRING'("ConceptNode"),'$STRING'("$attribute_comm_a")),
%~ 'decl-var'('$STRING'("ConceptNode"),'$STRING'("$attribute_comm_b")),
%~ 'decl-var'('$STRING'("PredicateNode"),'$STRING'("$predicate_exclusive")),
%~ 'decl-var'('$STRING'("ConceptNode"),'$STRING'("$attribute_excl"))),
%~ 'AndLink'(
%~ clause('VN','$STRING'("$predicate_common"),'VN','$STRING'("$person_a"),'VN','$STRING'("$attribute_comm_a")),
%~ clause('VN','$STRING'("$predicate_common"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute_comm_b")),
%~ differ('VN','$STRING'("$attribute_comm_a"),'VN','$STRING'("$attribute_comm_b")),
%~ clause('VN','$STRING'("$predicate_exclusive"),'VN','$STRING'("$person_a"),'VN','$STRING'("$attribute_excl"))),
%~ 'not-clause'('VN','$STRING'("$predicate_exclusive"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute_excl"))))))))
=======================================================
define('distinct-attr-rule','BindLink'('VariableList'('decl-var'('$STRING'("FeatureNode"),'$STRING'("$person_a")),'decl-var'('$STRING'("FeatureNode"),'$STRING'("$person_b")),'decl-var'('$STRING'("PredicateNode"),'$STRING'("$predicate_common")),'decl-var'('$STRING'("ConceptNode"),'$STRING'("$attribute_comm_a")),'decl-var'('$STRING'("ConceptNode"),'$STRING'("$attribute_comm_b")),'decl-var'('$STRING'("PredicateNode"),'$STRING'("$predicate_exclusive")),'decl-var'('$STRING'("ConceptNode"),'$STRING'("$attribute_excl"))),'AndLink'(clause('VN','$STRING'("$predicate_common"),'VN','$STRING'("$person_a"),'VN','$STRING'("$attribute_comm_a")),clause('VN','$STRING'("$predicate_common"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute_comm_b")),differ('VN','$STRING'("$attribute_comm_a"),'VN','$STRING'("$attribute_comm_b")),clause('VN','$STRING'("$predicate_exclusive"),'VN','$STRING'("$person_a"),'VN','$STRING'("$attribute_excl"))),'not-clause'('VN','$STRING'("$predicate_exclusive"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute_excl"))))
============================================
?- kif_to_boxlog( define('distinct-attr-rule','BindLink'('VariableList'('decl-var'('$STRING'("FeatureNode"),'$STRING'("$person_a")),'decl-var'('$STRING'("FeatureNode"),'$STRING'("$person_b")),'decl-var'('$STRING'("PredicateNode"),'$STRING'("$predicate_common")),'decl-var'('$STRING'("ConceptNode"),'$STRING'("$attribute_comm_a")),'decl-var'('$STRING'("ConceptNode"),'$STRING'("$attribute_comm_b")),'decl-var'('$STRING'("PredicateNode"),'$STRING'("$predicate_exclusive")),'decl-var'('$STRING'("ConceptNode"),'$STRING'("$attribute_excl"))),'AndLink'(clause('VN','$STRING'("$predicate_common"),'VN','$STRING'("$person_a"),'VN','$STRING'("$attribute_comm_a")),clause('VN','$STRING'("$predicate_common"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute_comm_b")),differ('VN','$STRING'("$attribute_comm_a"),'VN','$STRING'("$attribute_comm_b")),clause('VN','$STRING'("$predicate_exclusive"),'VN','$STRING'("$person_a"),'VN','$STRING'("$attribute_excl"))),'not-clause'('VN','$STRING'("$predicate_exclusive"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute_excl")))) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ 'distinct-attr-rule' define 'BindLink'('VariableList'('decl-var'('$STRING'("FeatureNode"),'$STRING'("$person_a")),'decl-var'('$STRING'("FeatureNode"),'$STRING'("$person_b")),'decl-var'('$STRING'("PredicateNode"),'$STRING'("$predicate_common")),'decl-var'('$STRING'("ConceptNode"),'$STRING'("$attribute_comm_a")),'decl-var'('$STRING'("ConceptNode"),'$STRING'("$attribute_comm_b")),'decl-var'('$STRING'("PredicateNode"),'$STRING'("$predicate_exclusive")),'decl-var'('$STRING'("ConceptNode"),'$STRING'("$attribute_excl"))),'AndLink'(clause('VN','$STRING'("$predicate_common"),'VN','$STRING'("$person_a"),'VN','$STRING'("$attribute_comm_a")),clause('VN','$STRING'("$predicate_common"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute_comm_b")),differ('VN','$STRING'("$attribute_comm_a"),'VN','$STRING'("$attribute_comm_b")),clause('VN','$STRING'("$predicate_exclusive"),'VN','$STRING'("$person_a"),'VN','$STRING'("$attribute_excl"))),'not-clause'('VN','$STRING'("$predicate_exclusive"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute_excl")))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ azzert_rename('distinct-attr-rule',distinctAttrRule)
%~ kif_to_boxlog_attvars2 = necessary(define(distinctAttrRule,'BindLink'(ftVariableList(declVar('$STRING'("FeatureNode"),'$STRING'("$person_a")),declVar('$STRING'("FeatureNode"),'$STRING'("$person_b")),declVar('$STRING'("PredicateNode"),'$STRING'("$predicate_common")),declVar('$STRING'("ConceptNode"),'$STRING'("$attribute_comm_a")),declVar('$STRING'("ConceptNode"),'$STRING'("$attribute_comm_b")),declVar('$STRING'("PredicateNode"),'$STRING'("$predicate_exclusive")),declVar('$STRING'("ConceptNode"),'$STRING'("$attribute_excl"))),'AndLink'(clause('VN','$STRING'("$predicate_common"),'VN','$STRING'("$person_a"),'VN','$STRING'("$attribute_comm_a")),clause('VN','$STRING'("$predicate_common"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute_comm_b")),differ('VN','$STRING'("$attribute_comm_a"),'VN','$STRING'("$attribute_comm_b")),clause('VN','$STRING'("$predicate_exclusive"),'VN','$STRING'("$person_a"),'VN','$STRING'("$attribute_excl"))),notClause('VN','$STRING'("$predicate_exclusive"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute_excl")))))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(define(distinctAttrRule,'BindLink'(ftVariableList(declVar('$STRING'("FeatureNode"),'$STRING'("$person_a")),declVar('$STRING'("FeatureNode"),'$STRING'("$person_b")),declVar('$STRING'("PredicateNode"),'$STRING'("$predicate_common")),declVar('$STRING'("ConceptNode"),'$STRING'("$attribute_comm_a")),declVar('$STRING'("ConceptNode"),'$STRING'("$attribute_comm_b")),declVar('$STRING'("PredicateNode"),'$STRING'("$predicate_exclusive")),declVar('$STRING'("ConceptNode"),'$STRING'("$attribute_excl"))),'AndLink'(clause('VN','$STRING'("$predicate_common"),'VN','$STRING'("$person_a"),'VN','$STRING'("$attribute_comm_a")),clause('VN','$STRING'("$predicate_common"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute_comm_b")),differ('VN','$STRING'("$attribute_comm_a"),'VN','$STRING'("$attribute_comm_b")),clause('VN','$STRING'("$predicate_exclusive"),'VN','$STRING'("$person_a"),'VN','$STRING'("$attribute_excl"))),notClause('VN','$STRING'("$predicate_exclusive"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute_excl"))))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that distinctAttrRule define 'BindLink'(ftVariableList(declVar('$STRING'("FeatureNode"),'$STRING'("$person_a")),declVar('$STRING'("FeatureNode"),'$STRING'("$person_b")),declVar('$STRING'("PredicateNode"),'$STRING'("$predicate_common")),declVar('$STRING'("ConceptNode"),'$STRING'("$attribute_comm_a")),declVar('$STRING'("ConceptNode"),'$STRING'("$attribute_comm_b")),declVar('$STRING'("PredicateNode"),'$STRING'("$predicate_exclusive")),declVar('$STRING'("ConceptNode"),'$STRING'("$attribute_excl"))),'AndLink'(clause('VN','$STRING'("$predicate_common"),'VN','$STRING'("$person_a"),'VN','$STRING'("$attribute_comm_a")),clause('VN','$STRING'("$predicate_common"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute_comm_b")),differ('VN','$STRING'("$attribute_comm_a"),'VN','$STRING'("$attribute_comm_b")),clause('VN','$STRING'("$predicate_exclusive"),'VN','$STRING'("$person_a"),'VN','$STRING'("$attribute_excl"))),notClause('VN','$STRING'("$predicate_exclusive"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute_excl")))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( define( distinctAttrRule,
'BindLink'(
ftVariableList(
declVar('$STRING'("FeatureNode"),'$STRING'("$person_a")),
declVar('$STRING'("FeatureNode"),'$STRING'("$person_b")),
declVar('$STRING'("PredicateNode"),'$STRING'("$predicate_common")),
declVar('$STRING'("ConceptNode"),'$STRING'("$attribute_comm_a")),
declVar('$STRING'("ConceptNode"),'$STRING'("$attribute_comm_b")),
declVar('$STRING'("PredicateNode"),'$STRING'("$predicate_exclusive")),
declVar('$STRING'("ConceptNode"),'$STRING'("$attribute_excl"))),
'AndLink'(
clause('VN','$STRING'("$predicate_common"),'VN','$STRING'("$person_a"),'VN','$STRING'("$attribute_comm_a")),
clause('VN','$STRING'("$predicate_common"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute_comm_b")),
differ('VN','$STRING'("$attribute_comm_a"),'VN','$STRING'("$attribute_comm_b")),
clause('VN','$STRING'("$predicate_exclusive"),'VN','$STRING'("$person_a"),'VN','$STRING'("$attribute_excl"))),
notClause('VN','$STRING'("$predicate_exclusive"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute_excl"))))).
============================================
%~ comment("; variable declarations")
%~ comment("; body -- if all parts of AndLink hold true ... then")
%~ comment("; Don''t deduce thigs we already know...")
%~ comment("; i.e. this not link is identical to conclusion, below.")
%~ comment("(AbsentLink")
%~ comment("\t(not-clause VN \"$predicate_exclusive\" VN \"$person_b\" VN \"$attribute_excl\")")
%~ comment(")")
%~ comment("; implicand -- then the following is true too")
%~ comment("; ---------------------------------------------------------------------")
%~ comment("; neighbor-not-attr rule.")
%~ comment("; If some attribute holds true for a person, it cannot hold for the")
%~ comment("; person''s neighbor.")
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( define( 'neighbor-not-attr-rule',
%~ 'BindLink'(
%~ 'VariableList'(
%~ 'decl-var'('$STRING'("FeatureNode"),'$STRING'("$person_a")),
%~ 'decl-var'('$STRING'("FeatureNode"),'$STRING'("$person_b")),
%~ 'decl-var'('$STRING'("PredicateNode"),'$STRING'("$predicate")),
%~ 'decl-var'('$STRING'("ConceptNode"),'$STRING'("$attribute"))),
%~ 'AndLink'(
%~ clause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_a"),'VN','$STRING'("$attribute")),
%~ clause('PN','$STRING'("Neighbor"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b")),
%~ AbsentLink( 'not-clause'('VN','$STRING'("$predicate"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute")))),
%~ 'not-clause'('VN','$STRING'("$predicate"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute"))))))))
=======================================================
define('neighbor-not-attr-rule','BindLink'('VariableList'('decl-var'('$STRING'("FeatureNode"),'$STRING'("$person_a")),'decl-var'('$STRING'("FeatureNode"),'$STRING'("$person_b")),'decl-var'('$STRING'("PredicateNode"),'$STRING'("$predicate")),'decl-var'('$STRING'("ConceptNode"),'$STRING'("$attribute"))),'AndLink'(clause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_a"),'VN','$STRING'("$attribute")),clause('PN','$STRING'("Neighbor"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b")),'AbsentLink'('not-clause'('VN','$STRING'("$predicate"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute")))),'not-clause'('VN','$STRING'("$predicate"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute"))))
============================================
?- kif_to_boxlog( define('neighbor-not-attr-rule','BindLink'('VariableList'('decl-var'('$STRING'("FeatureNode"),'$STRING'("$person_a")),'decl-var'('$STRING'("FeatureNode"),'$STRING'("$person_b")),'decl-var'('$STRING'("PredicateNode"),'$STRING'("$predicate")),'decl-var'('$STRING'("ConceptNode"),'$STRING'("$attribute"))),'AndLink'(clause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_a"),'VN','$STRING'("$attribute")),clause('PN','$STRING'("Neighbor"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b")),'AbsentLink'('not-clause'('VN','$STRING'("$predicate"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute")))),'not-clause'('VN','$STRING'("$predicate"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute")))) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ 'neighbor-not-attr-rule' define 'BindLink'('VariableList'('decl-var'('$STRING'("FeatureNode"),'$STRING'("$person_a")),'decl-var'('$STRING'("FeatureNode"),'$STRING'("$person_b")),'decl-var'('$STRING'("PredicateNode"),'$STRING'("$predicate")),'decl-var'('$STRING'("ConceptNode"),'$STRING'("$attribute"))),'AndLink'(clause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_a"),'VN','$STRING'("$attribute")),clause('PN','$STRING'("Neighbor"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b")),'AbsentLink'('not-clause'('VN','$STRING'("$predicate"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute")))),'not-clause'('VN','$STRING'("$predicate"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute")))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ azzert_rename('neighbor-not-attr-rule',neighborNotAttrRule)
%~ kif_to_boxlog_attvars2 = necessary(define(neighborNotAttrRule,'BindLink'(ftVariableList(declVar('$STRING'("FeatureNode"),'$STRING'("$person_a")),declVar('$STRING'("FeatureNode"),'$STRING'("$person_b")),declVar('$STRING'("PredicateNode"),'$STRING'("$predicate")),declVar('$STRING'("ConceptNode"),'$STRING'("$attribute"))),'AndLink'(clause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_a"),'VN','$STRING'("$attribute")),clause('PN','$STRING'("Neighbor"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b")),'AbsentLink'(notClause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute")))),notClause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute")))))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(define(neighborNotAttrRule,'BindLink'(ftVariableList(declVar('$STRING'("FeatureNode"),'$STRING'("$person_a")),declVar('$STRING'("FeatureNode"),'$STRING'("$person_b")),declVar('$STRING'("PredicateNode"),'$STRING'("$predicate")),declVar('$STRING'("ConceptNode"),'$STRING'("$attribute"))),'AndLink'(clause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_a"),'VN','$STRING'("$attribute")),clause('PN','$STRING'("Neighbor"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b")),'AbsentLink'(notClause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute")))),notClause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute"))))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that neighborNotAttrRule define 'BindLink'(ftVariableList(declVar('$STRING'("FeatureNode"),'$STRING'("$person_a")),declVar('$STRING'("FeatureNode"),'$STRING'("$person_b")),declVar('$STRING'("PredicateNode"),'$STRING'("$predicate")),declVar('$STRING'("ConceptNode"),'$STRING'("$attribute"))),'AndLink'(clause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_a"),'VN','$STRING'("$attribute")),clause('PN','$STRING'("Neighbor"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b")),'AbsentLink'(notClause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute")))),notClause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute")))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( define( neighborNotAttrRule,
'BindLink'(
ftVariableList(
declVar('$STRING'("FeatureNode"),'$STRING'("$person_a")),
declVar('$STRING'("FeatureNode"),'$STRING'("$person_b")),
declVar('$STRING'("PredicateNode"),'$STRING'("$predicate")),
declVar('$STRING'("ConceptNode"),'$STRING'("$attribute"))),
'AndLink'(
clause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_a"),'VN','$STRING'("$attribute")),
clause('PN','$STRING'("Neighbor"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b")),
AbsentLink( notClause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute")))),
notClause('VN','$STRING'("$predicate"),'VN','$STRING'("$person_b"),'VN','$STRING'("$attribute"))))).
============================================
%~ comment("; variable declarations")
%~ comment("; body -- if all parts of AndLink hold true ... then")
%~ comment("; Don''t deduce thigs we already know...")
%~ comment("; i.e. this not link is identical to conclusion, below.")
%~ comment("; implicand -- then the following is true too")
%~ comment("; ---------------------------------------------------------------------")
%~ comment("; Houses at the end of the street can only have one neighbor, ever.")
%~ comment("; This is a rather narrow rule, as it can only ever apply to the first")
%~ comment("; address (first ordinal -- a boundary condition).")
%~ comment("; This is used to combine rules 9 and 14.")
%~ comment("; There should be a symmetric rule for the last address too ...")
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( define( 'first-addr-rule',
%~ 'BindLink'(
%~ 'VariableList'(
%~ 'decl-var'('$STRING'("FeatureNode"),'$STRING'("$person_a")),
%~ 'decl-var'('$STRING'("FeatureNode"),'$STRING'("$person_b")),
%~ 'decl-var'('$STRING'("ConceptNode"),'$STRING'("$addr_a")),
%~ 'decl-var'('$STRING'("ConceptNode"),'$STRING'("$addr_b"))),
%~ 'AndLink'(
%~ clause('PN','$STRING'("Address"),'VN','$STRING'("$person_a"),'CN','$STRING'("101 Main Street")),
%~ clause('PN','$STRING'("Address"),'VN','$STRING'("$person_a"),'VN','$STRING'("$addr_a")),
%~ clause('PN','$STRING'("Neighbor"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b")),
%~ clause('PN','$STRING'("Successor"),'VN','$STRING'("$addr_a"),'VN','$STRING'("$addr_b")),
%~ AbsentLink( clause('PN','$STRING'("Address"),'VN','$STRING'("$person_b"),'VN','$STRING'("$addr_b")))),
%~ clause('PN','$STRING'("Address"),'VN','$STRING'("$person_b"),'VN','$STRING'("$addr_b"))))))))
=======================================================
define('first-addr-rule','BindLink'('VariableList'('decl-var'('$STRING'("FeatureNode"),'$STRING'("$person_a")),'decl-var'('$STRING'("FeatureNode"),'$STRING'("$person_b")),'decl-var'('$STRING'("ConceptNode"),'$STRING'("$addr_a")),'decl-var'('$STRING'("ConceptNode"),'$STRING'("$addr_b"))),'AndLink'(clause('PN','$STRING'("Address"),'VN','$STRING'("$person_a"),'CN','$STRING'("101 Main Street")),clause('PN','$STRING'("Address"),'VN','$STRING'("$person_a"),'VN','$STRING'("$addr_a")),clause('PN','$STRING'("Neighbor"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b")),clause('PN','$STRING'("Successor"),'VN','$STRING'("$addr_a"),'VN','$STRING'("$addr_b")),'AbsentLink'(clause('PN','$STRING'("Address"),'VN','$STRING'("$person_b"),'VN','$STRING'("$addr_b")))),clause('PN','$STRING'("Address"),'VN','$STRING'("$person_b"),'VN','$STRING'("$addr_b"))))
============================================
?- kif_to_boxlog( define('first-addr-rule','BindLink'('VariableList'('decl-var'('$STRING'("FeatureNode"),'$STRING'("$person_a")),'decl-var'('$STRING'("FeatureNode"),'$STRING'("$person_b")),'decl-var'('$STRING'("ConceptNode"),'$STRING'("$addr_a")),'decl-var'('$STRING'("ConceptNode"),'$STRING'("$addr_b"))),'AndLink'(clause('PN','$STRING'("Address"),'VN','$STRING'("$person_a"),'CN','$STRING'("101 Main Street")),clause('PN','$STRING'("Address"),'VN','$STRING'("$person_a"),'VN','$STRING'("$addr_a")),clause('PN','$STRING'("Neighbor"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b")),clause('PN','$STRING'("Successor"),'VN','$STRING'("$addr_a"),'VN','$STRING'("$addr_b")),'AbsentLink'(clause('PN','$STRING'("Address"),'VN','$STRING'("$person_b"),'VN','$STRING'("$addr_b")))),clause('PN','$STRING'("Address"),'VN','$STRING'("$person_b"),'VN','$STRING'("$addr_b")))) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ 'first-addr-rule' define 'BindLink'('VariableList'('decl-var'('$STRING'("FeatureNode"),'$STRING'("$person_a")),'decl-var'('$STRING'("FeatureNode"),'$STRING'("$person_b")),'decl-var'('$STRING'("ConceptNode"),'$STRING'("$addr_a")),'decl-var'('$STRING'("ConceptNode"),'$STRING'("$addr_b"))),'AndLink'(clause('PN','$STRING'("Address"),'VN','$STRING'("$person_a"),'CN','$STRING'("101 Main Street")),clause('PN','$STRING'("Address"),'VN','$STRING'("$person_a"),'VN','$STRING'("$addr_a")),clause('PN','$STRING'("Neighbor"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b")),clause('PN','$STRING'("Successor"),'VN','$STRING'("$addr_a"),'VN','$STRING'("$addr_b")),'AbsentLink'(clause('PN','$STRING'("Address"),'VN','$STRING'("$person_b"),'VN','$STRING'("$addr_b")))),clause('PN','$STRING'("Address"),'VN','$STRING'("$person_b"),'VN','$STRING'("$addr_b")))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ azzert_rename('first-addr-rule',firstAddrRule)
%~ kif_to_boxlog_attvars2 = necessary(define(firstAddrRule,'BindLink'(ftVariableList(declVar('$STRING'("FeatureNode"),'$STRING'("$person_a")),declVar('$STRING'("FeatureNode"),'$STRING'("$person_b")),declVar('$STRING'("ConceptNode"),'$STRING'("$addr_a")),declVar('$STRING'("ConceptNode"),'$STRING'("$addr_b"))),'AndLink'(clause('PN','$STRING'("Address"),'VN','$STRING'("$person_a"),'CN','$STRING'(s('[|]'('101','[|]'(iMain,'[|]'(tSumoStreet,[])))))),clause('PN','$STRING'("Address"),'VN','$STRING'("$person_a"),'VN','$STRING'("$addr_a")),clause('PN','$STRING'("Neighbor"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b")),clause('PN','$STRING'("Successor"),'VN','$STRING'("$addr_a"),'VN','$STRING'("$addr_b")),'AbsentLink'(clause('PN','$STRING'("Address"),'VN','$STRING'("$person_b"),'VN','$STRING'("$addr_b")))),clause('PN','$STRING'("Address"),'VN','$STRING'("$person_b"),'VN','$STRING'("$addr_b")))))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(define(firstAddrRule,'BindLink'(ftVariableList(declVar('$STRING'("FeatureNode"),'$STRING'("$person_a")),declVar('$STRING'("FeatureNode"),'$STRING'("$person_b")),declVar('$STRING'("ConceptNode"),'$STRING'("$addr_a")),declVar('$STRING'("ConceptNode"),'$STRING'("$addr_b"))),'AndLink'(clause('PN','$STRING'("Address"),'VN','$STRING'("$person_a"),'CN','$STRING'(s(['101',iMain,tSumoStreet]))),clause('PN','$STRING'("Address"),'VN','$STRING'("$person_a"),'VN','$STRING'("$addr_a")),clause('PN','$STRING'("Neighbor"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b")),clause('PN','$STRING'("Successor"),'VN','$STRING'("$addr_a"),'VN','$STRING'("$addr_b")),'AbsentLink'(clause('PN','$STRING'("Address"),'VN','$STRING'("$person_b"),'VN','$STRING'("$addr_b")))),clause('PN','$STRING'("Address"),'VN','$STRING'("$person_b"),'VN','$STRING'("$addr_b"))))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that firstAddrRule define 'BindLink'(ftVariableList(declVar('$STRING'("FeatureNode"),'$STRING'("$person_a")),declVar('$STRING'("FeatureNode"),'$STRING'("$person_b")),declVar('$STRING'("ConceptNode"),'$STRING'("$addr_a")),declVar('$STRING'("ConceptNode"),'$STRING'("$addr_b"))),'AndLink'(clause('PN','$STRING'("Address"),'VN','$STRING'("$person_a"),'CN','$STRING'(s(['101',iMain,tSumoStreet]))),clause('PN','$STRING'("Address"),'VN','$STRING'("$person_a"),'VN','$STRING'("$addr_a")),clause('PN','$STRING'("Neighbor"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b")),clause('PN','$STRING'("Successor"),'VN','$STRING'("$addr_a"),'VN','$STRING'("$addr_b")),'AbsentLink'(clause('PN','$STRING'("Address"),'VN','$STRING'("$person_b"),'VN','$STRING'("$addr_b")))),clause('PN','$STRING'("Address"),'VN','$STRING'("$person_b"),'VN','$STRING'("$addr_b")))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( define( firstAddrRule,
'BindLink'(
ftVariableList(
declVar('$STRING'("FeatureNode"),'$STRING'("$person_a")),
declVar('$STRING'("FeatureNode"),'$STRING'("$person_b")),
declVar('$STRING'("ConceptNode"),'$STRING'("$addr_a")),
declVar('$STRING'("ConceptNode"),'$STRING'("$addr_b"))),
'AndLink'(
clause( 'PN',
'$STRING'("Address"), 'VN','$STRING'("$person_a"),'CN',
$STRING( s( ['101',iMain,tSumoStreet]))),
clause('PN','$STRING'("Address"),'VN','$STRING'("$person_a"),'VN','$STRING'("$addr_a")),
clause('PN','$STRING'("Neighbor"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b")),
clause('PN','$STRING'("Successor"),'VN','$STRING'("$addr_a"),'VN','$STRING'("$addr_b")),
AbsentLink( clause('PN','$STRING'("Address"),'VN','$STRING'("$person_b"),'VN','$STRING'("$addr_b")))),
clause('PN','$STRING'("Address"),'VN','$STRING'("$person_b"),'VN','$STRING'("$addr_b"))))).
============================================
%~ comment("; variable declarations")
%~ comment("; body -- if all parts of AndLink hold true ... ")
%~ comment("; if adress of personA is 1st house")
%~ comment("; and A is neighbor of B")
%~ comment("; and the next house is one over")
%~ comment("; and we don''t already know the conclusion")
%~ comment("; implicand -- then the B lives one house over.")
%~ comment("; ---------------------------------------------------------------------")
%~ comment("; Neighbor deduction rule.")
%~ comment(";")
%~ comment("; If Address X is left of address Y, then person who lives in X is")
%~ comment("; a neighbor of person who lives in Y")
%~ debugm( common_logic_loader,
%~ show_success( common_logic_loader,
%~ common_logic_loader : ain( clif( define( 'neighbor-rule',
%~ 'BindLink'(
%~ 'VariableList'(
%~ 'decl-var'('$STRING'("FeatureNode"),'$STRING'("$person_a")),
%~ 'decl-var'('$STRING'("FeatureNode"),'$STRING'("$person_b")),
%~ 'decl-var'('$STRING'("ConceptNode"),'$STRING'("$addr_a")),
%~ 'decl-var'('$STRING'("ConceptNode"),'$STRING'("$addr_b"))),
%~ 'AndLink'(
%~ clause('PN','$STRING'("Address"),'VN','$STRING'("$person_a"),'VN','$STRING'("$addr_a")),
%~ clause('PN','$STRING'("Address"),'VN','$STRING'("$person_b"),'VN','$STRING'("$addr_b")),
%~ clause('PN','$STRING'("Successor"),'VN','$STRING'("$addr_a"),'VN','$STRING'("$addr_b")),
%~ AbsentLink( clause('PN','$STRING'("Neighbor"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b")))),
%~ clause('PN','$STRING'("Neighbor"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b"))))))))
=======================================================
define('neighbor-rule','BindLink'('VariableList'('decl-var'('$STRING'("FeatureNode"),'$STRING'("$person_a")),'decl-var'('$STRING'("FeatureNode"),'$STRING'("$person_b")),'decl-var'('$STRING'("ConceptNode"),'$STRING'("$addr_a")),'decl-var'('$STRING'("ConceptNode"),'$STRING'("$addr_b"))),'AndLink'(clause('PN','$STRING'("Address"),'VN','$STRING'("$person_a"),'VN','$STRING'("$addr_a")),clause('PN','$STRING'("Address"),'VN','$STRING'("$person_b"),'VN','$STRING'("$addr_b")),clause('PN','$STRING'("Successor"),'VN','$STRING'("$addr_a"),'VN','$STRING'("$addr_b")),'AbsentLink'(clause('PN','$STRING'("Neighbor"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b")))),clause('PN','$STRING'("Neighbor"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b"))))
============================================
?- kif_to_boxlog( define('neighbor-rule','BindLink'('VariableList'('decl-var'('$STRING'("FeatureNode"),'$STRING'("$person_a")),'decl-var'('$STRING'("FeatureNode"),'$STRING'("$person_b")),'decl-var'('$STRING'("ConceptNode"),'$STRING'("$addr_a")),'decl-var'('$STRING'("ConceptNode"),'$STRING'("$addr_b"))),'AndLink'(clause('PN','$STRING'("Address"),'VN','$STRING'("$person_a"),'VN','$STRING'("$addr_a")),clause('PN','$STRING'("Address"),'VN','$STRING'("$person_b"),'VN','$STRING'("$addr_b")),clause('PN','$STRING'("Successor"),'VN','$STRING'("$addr_a"),'VN','$STRING'("$addr_b")),'AbsentLink'(clause('PN','$STRING'("Neighbor"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b")))),clause('PN','$STRING'("Neighbor"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b")))) ).
% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ 'neighbor-rule' define 'BindLink'('VariableList'('decl-var'('$STRING'("FeatureNode"),'$STRING'("$person_a")),'decl-var'('$STRING'("FeatureNode"),'$STRING'("$person_b")),'decl-var'('$STRING'("ConceptNode"),'$STRING'("$addr_a")),'decl-var'('$STRING'("ConceptNode"),'$STRING'("$addr_b"))),'AndLink'(clause('PN','$STRING'("Address"),'VN','$STRING'("$person_a"),'VN','$STRING'("$addr_a")),clause('PN','$STRING'("Address"),'VN','$STRING'("$person_b"),'VN','$STRING'("$addr_b")),clause('PN','$STRING'("Successor"),'VN','$STRING'("$addr_a"),'VN','$STRING'("$addr_b")),'AbsentLink'(clause('PN','$STRING'("Neighbor"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b")))),clause('PN','$STRING'("Neighbor"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b")))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ azzert_rename('neighbor-rule',neighborRule)
%~ kif_to_boxlog_attvars2 = necessary(define(neighborRule,'BindLink'(ftVariableList(declVar('$STRING'("FeatureNode"),'$STRING'("$person_a")),declVar('$STRING'("FeatureNode"),'$STRING'("$person_b")),declVar('$STRING'("ConceptNode"),'$STRING'("$addr_a")),declVar('$STRING'("ConceptNode"),'$STRING'("$addr_b"))),'AndLink'(clause('PN','$STRING'("Address"),'VN','$STRING'("$person_a"),'VN','$STRING'("$addr_a")),clause('PN','$STRING'("Address"),'VN','$STRING'("$person_b"),'VN','$STRING'("$addr_b")),clause('PN','$STRING'("Successor"),'VN','$STRING'("$addr_a"),'VN','$STRING'("$addr_b")),'AbsentLink'(clause('PN','$STRING'("Neighbor"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b")))),clause('PN','$STRING'("Neighbor"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b")))))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(define(neighborRule,'BindLink'(ftVariableList(declVar('$STRING'("FeatureNode"),'$STRING'("$person_a")),declVar('$STRING'("FeatureNode"),'$STRING'("$person_b")),declVar('$STRING'("ConceptNode"),'$STRING'("$addr_a")),declVar('$STRING'("ConceptNode"),'$STRING'("$addr_b"))),'AndLink'(clause('PN','$STRING'("Address"),'VN','$STRING'("$person_a"),'VN','$STRING'("$addr_a")),clause('PN','$STRING'("Address"),'VN','$STRING'("$person_b"),'VN','$STRING'("$addr_b")),clause('PN','$STRING'("Successor"),'VN','$STRING'("$addr_a"),'VN','$STRING'("$addr_b")),'AbsentLink'(clause('PN','$STRING'("Neighbor"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b")))),clause('PN','$STRING'("Neighbor"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b"))))).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ it is necessarily true that neighborRule define 'BindLink'(ftVariableList(declVar('$STRING'("FeatureNode"),'$STRING'("$person_a")),declVar('$STRING'("FeatureNode"),'$STRING'("$person_b")),declVar('$STRING'("ConceptNode"),'$STRING'("$addr_a")),declVar('$STRING'("ConceptNode"),'$STRING'("$addr_b"))),'AndLink'(clause('PN','$STRING'("Address"),'VN','$STRING'("$person_a"),'VN','$STRING'("$addr_a")),clause('PN','$STRING'("Address"),'VN','$STRING'("$person_b"),'VN','$STRING'("$addr_b")),clause('PN','$STRING'("Successor"),'VN','$STRING'("$addr_a"),'VN','$STRING'("$addr_b")),'AbsentLink'(clause('PN','$STRING'("Neighbor"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b")))),clause('PN','$STRING'("Neighbor"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b")))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nesc( define( neighborRule,
'BindLink'(
ftVariableList(
declVar('$STRING'("FeatureNode"),'$STRING'("$person_a")),
declVar('$STRING'("FeatureNode"),'$STRING'("$person_b")),
declVar('$STRING'("ConceptNode"),'$STRING'("$addr_a")),
declVar('$STRING'("ConceptNode"),'$STRING'("$addr_b"))),
'AndLink'(
clause('PN','$STRING'("Address"),'VN','$STRING'("$person_a"),'VN','$STRING'("$addr_a")),
clause('PN','$STRING'("Address"),'VN','$STRING'("$person_b"),'VN','$STRING'("$addr_b")),
clause('PN','$STRING'("Successor"),'VN','$STRING'("$addr_a"),'VN','$STRING'("$addr_b")),
AbsentLink( clause('PN','$STRING'("Neighbor"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b")))),
clause('PN','$STRING'("Neighbor"),'VN','$STRING'("$person_a"),'VN','$STRING'("$person_b"))))).
============================================
%~ comment("; variable declarations")
%~ comment("; body -- if all parts of AndLink hold true ... then")
%~ comment(" Not interested in what we already know.")
%~ comment("; implicand -- then the following is true too")
%~ comment("; ---------------------------------------------------------------------")
%~ comment("; Neighbor relation is symmetric")
%~ comment(";")
%~ comment("; If A is a neighbor of B then B is a neighbor of A")
totalTime=10.000
FAILED: /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-junit-minor -k zebra_06.clif (returned 137) Add_LABELS='Errors,Overtime' Rem_LABELS='Skipped,Skipped,Warnings,Skipped'