Test Report : junit-all.xml

Test Suite: Rollup logicmoo.agi.agi_test.adv_story in /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_agi/t/agi_tests/adv_story

Package: logicmoo.agi.agi_test.adv_story

Results

Duration0.0 sec
Tests2
Failures2

Tests

logicmoo.agi.agi_test.adv_story.ADV_TEST_02

Test case:logicmoo.agi.agi_test.adv_story.ADV_TEST_02 JUnit
Outcome:Failed
Duration:10.0 sec
FailedFAILED: /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-junit-minor -k adv_test_02.pl (returned 137)
failed
Stderr
 (cd /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_agi/t/agi_tests/adv_story ; timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "['adv_test_02.pl']")

% EDIT: https://github.com/logicmoo/logicmoo_workspace/edit/master/packs_sys/logicmoo_agi/t/agi_tests/adv_story/adv_test_02.pl 
% JENKINS: https://jenkins.logicmoo.org/job/logicmoo_workspace/lastBuild/testReport/logicmoo.agi.agi_test.adv_story/ADV_TEST_02/ 
% ISSUE_SEARCH: https://github.com/logicmoo/logicmoo_workspace/issues?q=is%3Aissue+label%3AADV_TEST_02 
% ISSUE: https://github.com/logicmoo/logicmoo_workspace/issues/704 


```
%~ init_phase(after_load)
%~ init_phase(restore_state)
%
%~ init_why(after_boot,program)
%~ READONLY PACKAGES
%~ READONLY PACKAGES
%~ READONLY PACKAGES
%~ after_boot.
%~ Dont forget to ?- logicmoo_i_cyc_xform.
%~ message_hook_type(warning)
%~ message_hook(
%~    redefined_procedure(static,mu:aXiom/1),
%~    warning,
%~    [ 'Redefined ~w procedure ~p' - [ static,
%~                                      mu : aXiom/1]])
%~ source_location('/var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_agi/prolog/episodic_memory/adv_axiom.pl',44)
Redefined static procedure mu:(aXiom/1)
Warning: /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_agi/prolog/episodic_memory/adv_axiom.pl:44:
Warning:    Redefined static procedure mu:(aXiom/1)
/* ==>>(will_need_touch(Agent,Thing),h(spatial,touchable,Agent,Thing)) */
%~ will_need_touch(Agent,Thing,A9,B9) :-
%~ 
%~   h(spatial,touchable,Agent,Thing,A9,B9).
%~ /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_agi/prolog/episodic_memory/adv_axiom.pl:51 
%~ will_need_touch(Touchable_Will_need_touch5,Will_need_touch4,Will_need_touch,Touch) :-
%~ 
%~   h(spatial,touchable,Touchable_Will_need_touch5,Will_need_touch4,Will_need_touch,Touch).
/* ( will_need_touch(Agent,Thing) ==>> 
  ( can_sense(Agent,Sense_Agent2,Thing) , 
    h(spatial,touchable,Agent,Thing))) */
%~ will_need_touch(Agent,Thing,A9,C9) :-
%~   can_sense(Agent,Sense_Agent2,Thing,A9,B9) ,
%~   h(spatial,touchable,Agent,Thing,B9,C9).
:- multifile will_need_touch/4.

/* ( will_need_touch(Source_Agent_Touchable_Will_need_touch,Target_Thing_Touch) ==>> 
  ( can_sense(Source_Agent_Touchable_Will_need_touch,Can_senseWill_need_touch,Target_Thing_Touch) , 
    h(spatial,touchable,Source_Agent_Touchable_Will_need_touch,Target_Thing_Touch))) */
%~ /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_agi/prolog/episodic_memory/adv_axiom.pl:59 
%~ will_need_touch(Agent_Touchable_Will_need_touch,Thing,A9,C9) :-
%~   can_sense( Agent_Touchable_Will_need_touch,
%~     Can_senseWill_need_touch, Thing,A9,B9) ,
%~   h(spatial,touchable,Agent_Touchable_Will_need_touch,Thing,B9,C9).
will_need_touch(Agent, Thing, A, B) :-
    can_sense(Agent, _, Thing, A, C),
    h(spatial, touchable, Agent, Thing, C, B).

/* ( eVent(Agent,Event) ==>> 
  send_1percept(Agent,Event),apply_aXioms(Event)) */
%~ eVent(Agent,Event,A9,C9) :-
%~   send_1percept(Agent,Event,A9,B9) ,
%~   must_mw1(apply_aXioms(Event),B9,C9).
/* ( aXiom(Action,_S0,_S9) ::= 
  xnotrace((\+trival_act(Action),dbug1(aXiom(Action)))),xnotrace(fail)) */
%~ aXiom(Action,_S0,_S9) :-
%~   xnotrace( \+trival_act(Action),dbug1(aXiom(Action))) ,
%~   xnotrace(fail).
/* ==>>(aXiom(Action),aXiom_p1(Action)) */
%~ aXiom(Action,A9,B9) :-
%~ 
%~   aXiom_p1(Action,A9,B9).
/* ==>>(aXiom(Action),aXiom_p2(Action)) */
%~ aXiom(Action,A9,B9) :-
%~ 
%~   aXiom_p2(Action,A9,B9).
/* ==>>(aXiom_p1((P1,P11)),(!,aXiom_p1(P1),aXiom_p1(P11))) */
%~ aXiom_p1((_4718,_4720),A9,C9) :-
%~   ! ,
%~   A9=A9 ,
%~   aXiom_p1(_4718,A9,B9) ,
%~   aXiom_p1(_4720,B9,C9).
/* ==>>(aXiom_p1((P1;P11)),(!,(aXiom_p1(P1);aXiom_p1(P11)))) */
%~ aXiom_p1((_50948;_50950),A9,B9) :-
%~   ! ,
%~   A9=A9 ,
%~   aXiom_p1(_50948,A9,B9);aXiom_p1(_50950,A9,B9).
/* ==>>(aXiom_p1((P1->P11)),(!,(aXiom_p1(P1)->aXiom_p1(P11)))) */
%~ aXiom_p1((_35010->_35012),A9,C9) ->
%~   ! ,
%~   A9=A9 ,
%~   aXiom_p1(_35010,A9,B9) ->
%~ 
%~     aXiom_p1(_35012,B9,C9).
/* ==>>(aXiom_p1(true),!) */
%~ aXiom_p1(true,A9,B9) :-
%~   ! ,
%~   B9=A9.
/* ( aXiom_p1( P1_Xx_c62*->P1;P1_Xx_c621) ==>> 
  !,(aXiom_p1(P1_Xx_c62)*->aXiom_p1(P1);aXiom_p1(P1_Xx_c621))) */
%~ aXiom_p1((Xx_c62*->Xx_c622;Xx_c621),A9,C9) :-
%~   ! ,
%~   A9=A9 ,
%~   ( aXiom_p1(Xx_c62,A9,B9)*->aXiom_p1(Xx_c622,B9,C9) ;
%~     aXiom_p1(Xx_c621,A9,C9)).
/* ( aXiom_p1( P1_Xx_c623*->P1) ==>> 
  !,(aXiom_p1(P1_Xx_c623)*->aXiom_p1(P1))) */
%~ aXiom_p1((Xx_c623*->Xx_c6234),A9,C9) :-
%~   ! ,
%~   A9=A9 ,
%~   aXiom_p1(Xx_c623,A9,B9)*->aXiom_p1(Xx_c6234,B9,C9).
/* ( aXiom_p2(Action) ==>> 
  ( { implications(DoesEvent,Action,Preconds,Postconds), 
      action_doer(Action,Agent) }  ,
    satisfy_each(preCond(_1),Preconds) , 
    ( sg(member(failed(Why))),send_1percept(Agent,failed(Action,Why)) ; 
      satisfy_each(postCond(_2),Postconds),send_1percept(Agent,Action)) , 
    { episodic_mem(Agent,implications(DoesEvent,Action,Preconds,Postconds)) } , 
    { dbug1( used_implications(DoesEvent,Action,Preconds,Postconds)) } , 
    !)) */
%~ aXiom_p2(Action,A9,I9) :-
%~   implications(DoesEvent,Action,Preconds,Postconds) ,
%~   action_doer(Action,Agent) ,
%~   H9=A9 ,
%~   satisfy_each(preCond(_1),Preconds,H9,G9) ,
%~   ( ( sg(member(failed(Why)),G9,F9) ,
%~       send_1percept(Agent,failed(Action,Why),F9,E9)) ;
%~     ( satisfy_each(postCond(_2),Postconds,G9,D9) ,
%~       send_1percept(Agent,Action,D9,E9))) ,
%~   episodic_mem( Agent,
%~     implications(DoesEvent,Action,Preconds,Postconds)) ,
%~   C9=E9 ,
%~   dbug1( used_implications(DoesEvent,Action,Preconds,Postconds)) ,
%~   B9=C9 ,
%~   ! ,
%~   I9=B9.
/* ( aXiom_p1(Action) ==>> 
  ( { oper_splitk(Agent,Action,Preconds,Postconds) }  ,
    { dbug1( using_oper_splitk(Agent,Action,Preconds,Postconds)) } , 
    satisfy_each(preCond(_1),Preconds) , 
    ( sg(member(failed(Why))),send_1percept(Agent,failed(Action,Why)) ; 
      ( satisfy_each(postCond(_2),Postconds) , 
        send_1percept(Agent,success(Action)))) , 
    { dbug1( used_oper_splitk(Agent,Action,Preconds,Postconds)) } , 
    !)) */
%~ aXiom_p1(Action,A9,I9) :-
%~   oper_splitk(Agent,Action,Preconds,Postconds) ,
%~   H9=A9 ,
%~   dbug1( using_oper_splitk(Agent,Action,Preconds,Postconds)) ,
%~   G9=H9 ,
%~   satisfy_each(preCond(_1),Preconds,G9,F9) ,
%~   ( ( sg(member(failed(Why)),F9,E9) ,
%~       send_1percept(Agent,failed(Action,Why),E9,D9)) ;
%~     ( satisfy_each(postCond(_2),Postconds,F9,C9) ,
%~       send_1percept(Agent,success(Action),C9,D9))) ,
%~   dbug1( used_oper_splitk(Agent,Action,Preconds,Postconds)) ,
%~   B9=D9 ,
%~   ! ,
%~   I9=B9.
/* ( aXiom_p2(Action,S,E) ::= 
  ( append_termlist(Action,[S,E],ActionSE)  ,
    current_predicate(_26162,mu:ActionSE) , 
    adv_safe_to_call(ActionSE) , 
    ! , 
    call(Action,S,E))) */
%~ aXiom_p2(Action,S,E) :-
%~   append_termlist(Action,[S,E],ActionSE) ,
%~   current_predicate(Kw,mu:ActionSE) ,
%~   adv_safe_to_call(ActionSE) ,
%~   ! ,
%~   call(Action,S,E).
/* ( aXiom_p2(Action,S,E) ::= 
  ( current_predicate(Kw,mu:Action)  ,
    ! , 
    adv_safe_to_call(Action) , 
    call(Action) , 
    S=E)) */
%~ aXiom_p2(Action,S,E) :-
%~   current_predicate(Kw,mu:Action) ,
%~   ! ,
%~   adv_safe_to_call(Action) ,
%~   call(Action) ,
%~   S=E.
/* ( aXiom_p1(Action) ==>> 
  ( action_doer(Action,Agent)  ,
    invoke_introspect(Agent,Action,Answer) , 
    send_1percept(Agent,[answer(Answer),Answer]) , 
    !)) */
%~ aXiom_p1(Action,A9,E9) :-
%~   action_doer(Action,Agent,A9,D9) ,
%~   invoke_introspect(Agent,Action,Answer,D9,C9) ,
%~   send_1percept(Agent,[answer(Answer),Answer],C9,B9) ,
%~   ! ,
%~   E9=B9.
/* ( aXiom_p1( print_(Agent,Msg)) ==>> 
  ( h(spatial,descended,Agent,Here) , 
    queue_local_event(msg_from(Agent,Msg),[Here]))) */
%~ aXiom_p1(print_(Agent,Msg),A9,C9) :-
%~   h(spatial,descended,Agent,Here,A9,B9) ,
%~   queue_local_event(msg_from(Agent,Msg),[Here],B9,C9).
/* ( aXiom_p1( attempts(Agent,act3(wait,Agent,[]))) ==>> 
  from_loc(Agent,Here),queue_local_event(time_passes(Agent),Here)) */
%~ aXiom_p1(attempts(Agent,act3(wait,Agent,[])),A9,C9) :-
%~   from_loc(Agent,Here,A9,B9) ,
%~   queue_local_event(time_passes(Agent),Here,B9,C9).
/* ( aXiom_p1( attempts(Agent,act3(english,Agent,[English]))) ==>> 
  eng2cmd(Agent,English,Action),add_intent(Agent,Action)) */
%~ aXiom_p1(attempts(Agent,act3(english,Agent,[English])),A9,C9) :-
%~   eng2cmd(Agent,English,Action,A9,B9) ,
%~   add_intent(Agent,Action,B9,C9).
/* ( aXiom_p1( intent_english(Agent,English)) ==>> 
  !,{assertz(mu_global:console_tokens(Agent,English))}) */
%~ /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_agi/prolog/episodic_memory/adv_axiom.pl:143 
%~ aXiom_p1(intent_english(Agent,English),A9,B9) :-
%~   ! ,
%~   A9=A9 ,
%~   assertz( mu_global : console_tokens(Agent,English)) ,
%~   B9=A9.
/* ( aXiom_p1( attempts(Agent,act3(talk,Agent,[Object,Message]))) ==>> 
  ( can_sense(Agent,audio,Object)  ,
    from_loc(Agent,Here) , 
    queue_local_event( 
       [ did( Agent, 
           act3(talk,Agent,[Here,Object,Message]))], 
       [Here]))) */
%~ /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_agi/prolog/episodic_memory/adv_axiom.pl:147 
%~ aXiom_p1(
%~    attempts(Agent,act3(talk,Agent,[Object,Message])), A9,D9) :-
%~   can_sense(Agent,audio,Object,A9,C9) ,
%~   from_loc(Agent,Here,C9,B9) ,
%~   queue_local_event(
%~      [ did( Agent,
%~          act3(talk,Agent,[Here,Object,Message]))], [Here],B9,D9).
/* ( aXiom_p1( say(Agent,Message)) ==>> 
  ( from_loc(Agent,Here) , 
    queue_local_event( 
       [ did(Agent,act3(talk,Agent,[Here,*,Message]))], 
       [Here]))) */
%~ aXiom_p1(say(Agent,Message),A9,C9) :-
%~   from_loc(Agent,Here,A9,B9) ,
%~   queue_local_event(
%~      [ did(Agent,act3(talk,Agent,[Here,*,Message]))], [Here],B9,C9).
/* ( aXiom_p1( attempts( Agent, 
              act3(emote,Agent,[EmoteType,Object,Message]))) ==>> 
  ( !  ,
    from_loc(Agent,Here) , 
    queue_local_event( 
       [ act3(emote,Agent,[EmoteType,Object,Message])], 
       [Here]))) */
%~ aXiom_p1(
%~    attempts( Agent,
%~      act3(emote,Agent,[EmoteType,Object,Message])), A9,C9) :-
%~   ! ,
%~   A9=A9 ,
%~   from_loc(Agent,Here,A9,B9) ,
%~   queue_local_event(
%~      [ act3(emote,Agent,[EmoteType,Object,Message])], [Here],B9,C9).
/* ( aXiom_p1( terminates( h(Spatially,Prep,Object,Here))) ==>> 
  !,undeclare(h(Spatially,Prep,Object,Here))) */
%~ aXiom_p1(terminates(h(Spatially,Prep,Object,Here)),A9,B9) :-
%~   ! ,
%~   A9=A9 ,
%~   undeclare(h(Spatially,Prep,Object,Here),A9,B9).
/* ( aXiom_p1( attempts( Agent, 
              act3(go__prep_obj,Agent,[Walk,At,Object]))) ==>> 
  ( will_need_touch(Agent,Object)  ,
    has_rel(At,Object) , 
    \+( is_closed(At,Object)) , 
    eVent( Agent, 
      event3( arrive, 
        [At,Agent,Object], 
        [Walk,At])))) */
%~ aXiom_p1(
%~    attempts( Agent,
%~      act3(go__prep_obj,Agent,[Walk,At,Object])), A9,F9) :-
%~   will_need_touch(Agent,Object,A9,E9) ,
%~   has_rel(At,Object,E9,D9) ,
%~   \+( is_closed(At,Object,D9,C9)) ,
%~   B9=D9 ,
%~   eVent( Agent,
%~     event3( arrive,
%~       [At,Agent,Object],
%~       [Walk,At]), B9,F9).
/* ( aXiom_p1( initiates( h(Spatially,Prep,Object,Dest))) ==>> 
  !,declare(h(Spatially,Prep,Object,Dest))) */
%~ aXiom_p1(initiates(h(Spatially,Prep,Object,Dest)),A9,B9) :-
%~   ! ,
%~   A9=A9 ,
%~   declare(h(Spatially,Prep,Object,Dest),A9,B9).
/* ==>>(aXiom_p1(status_msg(_Begin,_End)),[]) */
%~ aXiom_p1(status_msg(_Begin,_End),P1_Status_msg,P1_Status_msg) :-
%~ 
%~   true.
/* ( axiom_Recalc_e( 
     attempts(Agent,act3(go__obj,Agent,[Walk,Object])), 
     RECALC) ==>> 
  ( has_rel(At,Object) , 
    RECALC =  
         
      attempts( Agent, 
        act3(go__prep_obj,Agent,[Walk,At,Object])))) */
%~ axiom_Recalc_e(
%~    attempts(Agent,act3(go__obj,Agent,[Walk,Object])), RECALC,A9,C9) :-
%~   has_rel(At,Object,A9,B9) ,
%~   =( RECALC,
%~     attempts( Agent,
%~       act3(go__prep_obj,Agent,[Walk,At,Object])), B9,C9).
/* ( aXiom_p1( attempts(Agent,act3(go__loc,Agent,[_Walk,There]))) ==>> 
  ( has_rel(fn(exit,Fn_Exit),There) , 
    eVent(Agent,make_true(Agent,h(spatial,in,Agent,There))))) */
%~ aXiom_p1(
%~    attempts(Agent,act3(go__loc,Agent,[_Walk,There])), A9,C9) :-
%~   has_rel(fn(exit,Fn_Exit),There,A9,B9) ,
%~   eVent( Agent,
%~     make_true(Agent,h(spatial,in,Agent,There)), B9,C9).
/* ( aXiom_p1( make_true(Doer,h(spatial,in,Agent,There))) ==>> 
  ( { Doer==Agent }  ,
    has_rel(fn(exit,Fn_Exit),There) , 
    from_loc(Agent,Here) , 
    agent_thought_model(Agent,ModelData) , 
    { find_path(Doer,Here,There,Route,ModelData) } , 
    ! , 
    eVent( Agent, 
      follow_plan( Agent, 
        did(Agent,act3(go__loc,Agent,[walk,There])), 
        Route)))) */
%~ aXiom_p1(make_true(Doer,h(spatial,in,Agent,There)),A9,H9) :-
%~   Doer==Agent ,
%~   G9=A9 ,
%~   has_rel(fn(exit,Fn_Exit),There,G9,F9) ,
%~   from_loc(Agent,Here,F9,E9) ,
%~   agent_thought_model(Agent,ModelData,E9,D9) ,
%~   find_path(Doer,Here,There,Route,ModelData) ,
%~   C9=D9 ,
%~   ! ,
%~   B9=C9 ,
%~   eVent( Agent,
%~     follow_plan( Agent,
%~       did(Agent,act3(go__loc,Agent,[walk,There])),
%~       Route), B9,H9).
/* ==>>(aXiom_p1(make_true(Agent,FACT)),add_agent_goal(Agent,FACT)) */
%~ aXiom_p1(make_true(Agent,FACT),A9,B9) :-
%~ 
%~   add_agent_goal(Agent,FACT,A9,B9).
/* ==>>(aXiom_p1(add_intent(Agent,TODO)),add_agent_intent(Agent,TODO)) */
%~ aXiom_p1(add_intent(Agent,TODO),A9,B9) :-
%~ 
%~   add_agent_intent(Agent,TODO,A9,B9).
/* ( aXiom_p1( follow_plan(Agent,Name,[])) ==>> 
  !,send_1percept(Agent,[success(followed_plan(Agent,Name))])) */
%~ aXiom_p1(follow_plan(Agent,Name,[]),A9,B9) :-
%~   ! ,
%~   A9=A9 ,
%~   send_1percept( Agent,
%~     [ success( followed_plan(Agent,Name))], A9,B9).
/* ( aXiom_p1( follow_plan(Agent,Name,[Step])) ==>> 
  ( eVent(Agent,follow_step(Agent,Name,Step)) , 
    eVent(Agent,follow_plan(Agent,Name,CO_Route)))) */
%~ aXiom_p1(follow_plan(Agent,Name,[Step|Route]),A9,C9) :-
%~   eVent(Agent,follow_step(Agent,Name,Step),A9,B9) ,
%~   eVent(Agent,follow_plan(Agent,Name,Route),B9,C9).
/* ( aXiom_p1( follow_step(Agent,Name,Step)) ==>> 
  {dbug1(follow_step(Agent,Name,Step))},raise_aXiom_events(Step)) */
%~ aXiom_p1(follow_step(Agent,Name,Step),A9,C9) :-
%~   dbug1( follow_step(Agent,Name,Step)) ,
%~   B9=A9 ,
%~   raise_aXiom_events(Step,B9,C9).
/* ( axiom_Recalc_e(attempts(Agent,act3(take,Agent,[Thing])),RECALC) ==>> 
  ( ! , 
    RECALC =  
         
      attempts( Agent, 
        act3(put__via,Agent,[take,Thing,held_by,Agent])))) */
%~ axiom_Recalc_e(
%~    attempts(Agent,act3(take,Agent,[Thing])), RECALC,A9,B9) :-
%~   ! ,
%~   A9=A9 ,
%~   =( RECALC,
%~     attempts( Agent,
%~       act3(put__via,Agent,[take,Thing,held_by,Agent])), A9,B9).
/* ( axiom_Recalc_e(attempts(Agent,act3(drop,Agent,[Thing])),RECALC) ==>> 
  ( !  ,
    dshow_failure( h(spatial,At,Agent,Here)) , 
    RECALC =  
         
      attempts( Agent, 
        act3(put__via,Agent,[drop,Thing,At,Here])))) */
%~ axiom_Recalc_e(
%~    attempts(Agent,act3(drop,Agent,[Thing])), RECALC,A9,C9) :-
%~   ! ,
%~   A9=A9 ,
%~   dshow_failure(h(spatial,At,Agent,Here),A9,B9) ,
%~   =( RECALC,
%~     attempts( Agent,
%~       act3(put__via,Agent,[drop,Thing,At,Here])), B9,C9).
/* ( axiom_Recalc_e( 
     attempts( Agent, 
       act3(put,Agent,[Thing1,PrepAt,Thing2])), 
     RECALC) ==>> 
  RECALC =  
       
    attempts( Agent, 
      act3(put__via,Agent,[put,Thing1,PrepAt,Thing2]))) */
%~ axiom_Recalc_e(
%~    attempts( Agent,
%~      act3(put,Agent,[Thing1,PrepAt,Thing2])), RECALC,A9,B9) :-
%~ 
%~   =( RECALC,
%~     attempts( Agent,
%~       act3(put__via,Agent,[put,Thing1,PrepAt,Thing2])), A9,B9).
/* ( axiom_Recalc_e( 
     attempts(Agent,act3(give,Agent,[Thing,Recipient])), 
     RECALC) ==>> 
  RECALC =  
       
    attempts( Agent, 
      act3(put__via,Agent,[give,Thing,held_by,Recipient]))) */
%~ axiom_Recalc_e(
%~    attempts(Agent,act3(give,Agent,[Thing,Recipient])), RECALC,A9,B9) :-
%~ 
%~   =( RECALC,
%~     attempts( Agent,
%~       act3(put__via,Agent,[give,Thing,held_by,Recipient])), A9,B9).
/* ( aXiom_p1( attempts( Agent, 
              act3( put__via, 
                Agent, 
                [How,Thing1,Prep,Thing2]))) ==>> 
  ( {fail}  ,
    ! , 
    dshow_failure( prep_to_rel(Thing2,Prep,At)) , 
    from_loc(Agent,Here) , 
    dshow_failure( has_rel(At,Thing2)) , 
    dshow_failure( will_need_touch(Agent,Thing2)) , 
    moveto( Agent, 
      How, Thing1,At,Thing2, 
      [Here], 
      [ cap( subj(Agent)), 
        person(How,es(How)), Thing1,At,Thing2, 
        '.']))) */
%~ aXiom_p1(
%~    attempts( Agent,
%~      act3( put__via,
%~        Agent,
%~        [How,Thing1,Prep,Thing2])), A9,H9) :-
%~   fail ,
%~   G9=A9 ,
%~   ! ,
%~   F9=G9 ,
%~   dshow_failure(prep_to_rel(Thing2,Prep,At),F9,E9) ,
%~   from_loc(Agent,Here,E9,D9) ,
%~   dshow_failure(has_rel(At,Thing2),D9,C9) ,
%~   dshow_failure(will_need_touch(Agent,Thing2),C9,B9) ,
%~   moveto( Agent,
%~     How, Thing1,At,Thing2,
%~     [Here],
%~     [ cap( subj(Agent)), person(How,es(How)),Thing1,
%~       At,Thing2,'.'], B9,H9).
/* ( axiom_Recalc_e( 
     attempts(Agent,act3(throw_dir,Agent,[Thing,ExitName])), 
     RECALC) ==>> 
  ( from_loc(Agent,Here) , 
    RECALC =  
         
      attempts( Agent, 
        act3(throw_prep_obj,Agent,[Thing,ExitName,Here])))) */
%~ axiom_Recalc_e(
%~    attempts(Agent,act3(throw_dir,Agent,[Thing,ExitName])), RECALC,A9,C9) :-
%~   from_loc(Agent,Here,A9,B9) ,
%~   =( RECALC,
%~     attempts( Agent,
%~       act3(throw_prep_obj,Agent,[Thing,ExitName,Here])), B9,C9).
/* ( axiom_Recalc_e( 
     attempts(Agent,act3(throw_at,Agent,[Thing,Target])), 
     RECALC) ==>> 
  RECALC =  
       
    attempts( Agent, 
      act3(throw_prep_obj,Agent,[Thing,at,Target]))) */
%~ /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_agi/prolog/episodic_memory/adv_axiom.pl:274 
%~ axiom_Recalc_e(
%~    attempts(Agent,act3(throw_at,Agent,[Thing,Target])), RECALC,A9,B9) :-
%~ 
%~   =( RECALC,
%~     attempts( Agent,
%~       act3(throw_prep_obj,Agent,[Thing,at,Target])), A9,B9).
/* ( axiom_Recalc_e( 
     attempts( Agent, 
       act3(throw_prep_obj,Agent,[Thing,Prep,Target])), 
     RECALC) ==>> 
  ( prep_to_rel(Target,Prep,Rel) , 
    RECALC =  
         
      attempts( Agent, 
        act3(put,Agent,[throw,Thing,Rel,Target])))) */
%~ axiom_Recalc_e(
%~    attempts( Agent,
%~      act3(throw_prep_obj,Agent,[Thing,Prep,Target])), RECALC,A9,C9) :-
%~   prep_to_rel(Target,Prep,Rel,A9,B9) ,
%~   =( RECALC,
%~     attempts( Agent,
%~       act3(put,Agent,[throw,Thing,Rel,Target])), B9,C9).
/* ( axiom_Recalc_e( 
     attempts( Agent, 
       act3(throw,Agent,[Thing,Prep,Target])), 
     RECALC) ==>> 
  ( prep_to_rel(Target,Prep,Rel);Prep=Rel , 
    RECALC =  
         
      attempts( Agent, 
        act3(put,Agent,[throw,Thing,Rel,Target])))) */
%~ axiom_Recalc_e(
%~    attempts( Agent,
%~      act3(throw,Agent,[Thing,Prep,Target])), RECALC,A9,C9) :-
%~   ( prep_to_rel(Target,Prep,Rel,A9,B9) ;
%~     =(Prep,Rel,A9,B9)) ,
%~   =( RECALC,
%~     attempts( Agent,
%~       act3(put,Agent,[throw,Thing,Rel,Target])), B9,C9).
/* ( aXiom_p1( attempts( Agent, 
              act3(throw,Agent,[Thing,At,Target]))) ==>> 
  ( will_need_touch(Agent,Thing)  ,
    can_sense(Agent,see,Target) , 
    eVent( Agent, 
      act3(throw,Agent,[Thing,At,Target])))) */
%~ aXiom_p1(
%~    attempts( Agent,
%~      act3(throw,Agent,[Thing,At,Target])), A9,D9) :-
%~   will_need_touch(Agent,Thing,A9,C9) ,
%~   can_sense(Agent,see,Target,C9,B9) ,
%~   eVent( Agent,
%~     act3(throw,Agent,[Thing,At,Target]), B9,D9).
/* ( aXiom_p1( act3(throw,Agent,[Thing,AtTarget,Target])) ==>> 
  ( ignore( ( getprop(Thing,breaks_into(Broken))  ,
              dbug(general,'object ~p is breaks_into~n',[Thing]) , 
              eVent(Agent,thing_transforms(Thing,Broken)))) , 
    eVent( Agent, 
      disgorge( Agent, 
        do_throw, Target,AtTarget,Target, 
        [Target],'Something falls out.')))) */
%~ aXiom_p1(
%~    act3(throw,Agent,[Thing,AtTarget,Target]), A9,C9) :-
%~   ignore(
%~      ( getprop(Thing,breaks_into(Broken))  ,
%~        dbug(general,'object ~p is breaks_into~n',[Thing]) ,
%~        eVent(Agent,thing_transforms(Thing,Broken))), A9,B9) ,
%~   eVent( Agent,
%~     disgorge( Agent,
%~       do_throw, Target,AtTarget,Target,
%~       [Target],'Something falls out.'), B9,C9).
/* ( aXiom_p1( thing_transforms(Thing,Broken)) ==>> 
  ( undeclare( h(Spatial,At,Thing,Here))  ,
    declare( h(Spatial,At,Broken,Here)) , 
    queue_local_event([transformed(Thing,Broken)],Here))) */
%~ aXiom_p1(thing_transforms(Thing,Broken),A9,D9) :-
%~   undeclare(h(Spatial,At,Thing,Here),A9,C9) ,
%~   declare(h(Spatial,At,Broken,Here),C9,B9) ,
%~   queue_local_event([transformed(Thing,Broken)],Here,B9,D9).
/* ( aXiom_p1( attempts(Agent,act3(hit_with,Agent,[Thing,With]))) ==>> 
  ( from_loc(Agent,Here)  ,
    invoke_hit(Agent,Thing,With,[Here]) , 
    send_1percept(Agent,[true,'OK.']))) */
%~ aXiom_p1(
%~    attempts(Agent,act3(hit_with,Agent,[Thing,With])), A9,D9) :-
%~   from_loc(Agent,Here,A9,C9) ,
%~   invoke_hit(Agent,Thing,With,[Here],C9,B9) ,
%~   send_1percept(Agent,[true,'OK.'],B9,D9).
/* ( aXiom_p1( attempts(Agent,act3(hit,Agent,[Thing]))) ==>> 
  ( from_loc(Agent,Here)  ,
    invoke_hit(Agent,Thing,Agent,[Here]) , 
    send_1percept(Agent,[true,'OK.']))) */
%~ /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_agi/prolog/episodic_memory/adv_axiom.pl:311 
%~ aXiom_p1(attempts(Agent,act3(hit,Agent,[Thing])),A9,D9) :-
%~   from_loc(Agent,Here,A9,C9) ,
%~   invoke_hit(Agent,Thing,Agent,[Here],C9,B9) ,
%~   send_1percept(Agent,[true,'OK.'],B9,D9).
/* ( invoke_hit(Doer,Target,_With,Vicinity) ==>> 
  ignore( ( getprop(Target,breaks_into(Broken))  ,
            dbug(general,'target ~p is breaks_into~n',[Target]) , 
            undeclare( h(Spatial,Prep,Target,Here)) , 
            queue_local_event([transformed(Target,Broken)],Vicinity) , 
            declare( h(Spatial,Prep,Broken,Here)) , 
            disgorge(Doer,hit,Target,Prep,Here,Vicinity,'Something falls out.')))) */
%~ invoke_hit(Doer,Target,_With,Vicinity,A9,B9) :-
%~ 
%~   ignore(
%~      ( getprop(Target,breaks_into(Broken))  ,
%~        dbug(general,'target ~p is breaks_into~n',[Target]) ,
%~        undeclare( h(Spatial,Prep,Target,Here)) ,
%~        queue_local_event([transformed(Target,Broken)],Vicinity) ,
%~        declare( h(Spatial,Prep,Broken,Here)) ,
%~        disgorge(Doer,hit,Target,Prep,Here,Vicinity,'Something falls out.')), A9,B9).
/* ( aXiom_p1( attempts( Agent, 
              act3(dig,Agent,[Hole,Where,Tool]))) ==>> 
  ( { memberchk(Hole,[hole,trench,pit,ditch]), 
      memberchk(Where,[garden]), 
      memberchk(Tool,[shovel,spade]) }  ,
    open_traverse(Tool,Agent) , 
    from_loc(Agent,Where) , 
    \+( h(spatial,_At,Hole,Where)) , 
    declare( h(spatial,in,Hole,Where)) , 
    setprop(Hole,default_rel=in) , 
    setprop(Hole,can_be(move,f)) , 
    setprop(Hole,can_be(take,f)) , 
    declare( h(spatial,in,dirt,Where)) , 
    queue_event( [ created(Hole,Where), 
                   [ cap( subj(Agent)), person(dig,digs),a,Hole,'in the', 
                     Where,'.']]))) */
%~ /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_agi/prolog/episodic_memory/adv_axiom.pl:326 
%~ aXiom_p1(
%~    attempts( Agent,
%~      act3(dig,Agent,[Hole,Where,Tool])), A9,L9) :-
%~   memberchk(Hole,[hole,trench,pit,ditch]) ,
%~   memberchk(Where,[garden]) ,
%~   memberchk(Tool,[shovel,spade]) ,
%~   K9=A9 ,
%~   open_traverse(Tool,Agent,K9,J9) ,
%~   from_loc(Agent,Where,J9,I9) ,
%~   \+( h(spatial,_At,Hole,Where,I9,H9)) ,
%~   G9=I9 ,
%~   declare(h(spatial,in,Hole,Where),G9,F9) ,
%~   setprop(Hole,default_rel=in,F9,E9) ,
%~   setprop(Hole,can_be(move,f),E9,D9) ,
%~   setprop(Hole,can_be(take,f),D9,C9) ,
%~   declare(h(spatial,in,dirt,Where),C9,B9) ,
%~   queue_event(
%~      [ created(Hole,Where),
%~        [ cap( subj(Agent)), person(dig,digs),a,Hole,'in the',
%~          Where,'.']], B9,L9).
/* ( aXiom_p1( attempts(Agent,act3(eat,Agent,[Thing]))) ==>> 
  ( getprop(Thing,can_be(eat,t)) ->  
         
      ( undeclare( h(spatial,_1,Thing,_2)) , 
        send_1percept(Agent,[destroyed(Thing),'Mmmm, good!'])) ; 
    send_1percept( Agent, [
      [ failure( attempts(Agent,act3(eat,Agent,[Thing]))), 
        'It\'s inedible!'])])) */
%~ aXiom_p1(attempts(Agent,act3(eat,Agent,[Thing])),A9,D9) ->
%~ 
%~   ( getprop(Thing,can_be(eat,t),A9,C9) ->
%~       undeclare(h(spatial,_1,Thing,_2),C9,B9) ,
%~       send_1percept(Agent,[destroyed(Thing),'Mmmm, good!'],B9,D9) ;
%~     send_1percept( Agent,
%~       [ failure( attempts(Agent,act3(eat,Agent,[Thing]))),
%~         'It\'s inedible!'], A9,D9)).
/* ( aXiom_p1( attempts(Agent,act3(switch,Agent,[OnOff,Thing]))) ==>> 
  ( will_need_touch(Agent,Thing)  ,
    getprop(Thing,can_be(switch(OnOff),t)) , 
    getprop(Thing,effect(switch(OnOff),Term0)) , 
    { adv_subst(equivalent,$self,Thing,Term0,Term) } , 
    call(Term) , 
    send_1percept(Agent,[success(true,'OK')]))) */
%~ aXiom_p1(
%~    attempts(Agent,act3(switch,Agent,[OnOff,Thing])), A9,G9) :-
%~   will_need_touch(Agent,Thing,A9,F9) ,
%~   getprop(Thing,can_be(switch(OnOff),t),F9,E9) ,
%~   getprop(Thing,effect(switch(OnOff),Term0),E9,D9) ,
%~   adv_subst(equivalent,$self,Thing,Term0,Term) ,
%~   C9=D9 ,
%~   call(Term,C9,B9) ,
%~   send_1percept(Agent,[success(true,'OK')],B9,G9).
/* ( axiom_Recalc_e(attempts(Agent,act3(inventory,Who,[])),RECALC) ==>> 
  RECALC =  
       
    attempts(Agent,act3(examine,Agent,[Who]))) */
%~ axiom_Recalc_e(attempts(Agent,act3(inventory,Who,[])),RECALC,A9,B9) :-
%~ 
%~   =( RECALC,
%~     attempts(Agent,act3(examine,Agent,[Who])), A9,B9).
/* ( axiom_Recalc_e(attempts(Agent,act3(look,Agent,[])),RECALC) ==>> 
  ( h(spatial,At,Agent,Here) , 
    RECALC =  
         
      attempts( Agent, 
        act3(examine__D3,Agent,[see,At,Here])))) */
%~ /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_agi/prolog/episodic_memory/adv_axiom.pl:365 
%~ axiom_Recalc_e(attempts(Agent,act3(look,Agent,[])),RECALC,A9,C9) :-
%~   h(spatial,At,Agent,Here,A9,B9) ,
%~   =( RECALC,
%~     attempts(Agent,act3(examine__D3,Agent,[see,At,Here])), B9,C9).
/* ( axiom_Recalc_e(attempts(Agent,act3(examine,Agent,[Sense])),RECALC) ==>> 
  ( { is_sense(Sense) }  ,
    ! , 
    from_loc(Agent,Place) , 
    RECALC =  
         
      attempts(Agent,act3(examine__D3,Agent,[see,in,Place])))) */
%~ axiom_Recalc_e(
%~    attempts(Agent,act3(examine,Agent,[Sense])), RECALC,A9,E9) :-
%~   is_sense(Sense) ,
%~   D9=A9 ,
%~   ! ,
%~   C9=D9 ,
%~   from_loc(Agent,Place,C9,B9) ,
%~   =( RECALC,
%~     attempts(Agent,act3(examine__D3,Agent,[see,in,Place])), B9,E9).
/* ( axiom_Recalc_e(attempts(Agent,act3(examine,Agent,[Object])),RECALC) ==>> 
  RECALC =  
       
    attempts(Agent,act3(examine__D3,Agent,[see,at,Object]))) */
%~ axiom_Recalc_e(
%~    attempts(Agent,act3(examine,Agent,[Object])), RECALC,A9,B9) :-
%~ 
%~   =( RECALC,
%~     attempts(Agent,act3(examine__D3,Agent,[see,at,Object])), A9,B9).
/* ( axiom_Recalc_e( 
     attempts(Agent,act3(examine,Agent,[Sense,Object])), 
     RECALC) ==>> 
  ( RECALC =  
         
      attempts( Agent, 
        act3(examine__D3,Agent,[Sense,at,Object])) , 
    !)) */
%~ axiom_Recalc_e(
%~    attempts(Agent,act3(examine,Agent,[Sense,Object])), RECALC,A9,C9) :-
%~   =( RECALC,
%~     attempts(Agent,act3(examine__D3,Agent,[Sense,at,Object])), A9,B9) ,
%~   ! ,
%~   C9=B9.
/* ( axiom_Recalc_e( 
     attempts( Agent, 
       act3(examine,Agent,[Sense,Prep,Object])), 
     RECALC) ==>> 
  ( RECALC =  
         
      attempts( Agent, 
        act3(examine__D3,Agent,[Sense,Prep,Object])) , 
    !)) */
%~ axiom_Recalc_e(
%~    attempts( Agent,
%~      act3(examine,Agent,[Sense,Prep,Object])), RECALC,A9,C9) :-
%~   =( RECALC,
%~     attempts( Agent,
%~       act3(examine__D3,Agent,[Sense,Prep,Object])), A9,B9) ,
%~   ! ,
%~   C9=B9.
/* ( axiom_Recalc_e( 
     attempts( Agent, 
       act3( examine, 
         Agent, 
         [Sense,Prep,Object,Depth])), 
     RECALC) ==>> 
  ( RECALC =  
         
      attempts( Agent, 
        act3( examine__D3, 
          Agent, 
          [Sense,Prep,Object,Depth])) , 
    !)) */
%~ axiom_Recalc_e(
%~    attempts( Agent,
%~      act3( examine,
%~        Agent,
%~        [Sense,Prep,Object,Depth])), RECALC,A9,C9) :-
%~   =( RECALC,
%~     attempts( Agent,
%~       act3( examine__D3,
%~         Agent,
%~         [Sense,Prep,Object,Depth])), A9,B9) ,
%~   ! ,
%~   C9=B9.
/* ( axiom_Recalc_e( 
     attempts( Agent, 
       act3(examine__D3,Agent,[Sense,Prep,Object])), 
     RECALC) ==>> 
  ( RECALC =  
         
      attempts( Agent, 
        act3(examine__D5,Agent,[Sense,Prep,Object,3])) , 
    !)) */
%~ /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_agi/prolog/episodic_memory/adv_axiom.pl:380 
%~ axiom_Recalc_e(
%~    attempts( Agent,
%~      act3(examine__D3,Agent,[Sense,Prep,Object])), RECALC,A9,C9) :-
%~   =( RECALC,
%~     attempts( Agent,
%~       act3(examine__D5,Agent,[Sense,Prep,Object,3])), A9,B9) ,
%~   ! ,
%~   C9=B9.
/* ( axiom_Recalc_e( 
     attempts( Agent, 
       act3( examine__D3, 
         Agent, 
         [Sense,Prep,Object,Depth])), 
     RECALC) ==>> 
  ( RECALC =  
         
      attempts( Agent, 
        act3( examine__D5, 
          Agent, 
          [Sense,Prep,Object,Depth])) , 
    !)) */
%~ axiom_Recalc_e(
%~    attempts( Agent,
%~      act3( examine__D3,
%~        Agent,
%~        [Sense,Prep,Object,Depth])), RECALC,A9,C9) :-
%~   =( RECALC,
%~     attempts( Agent,
%~       act3( examine__D5,
%~         Agent,
%~         [Sense,Prep,Object,Depth])), A9,B9) ,
%~   ! ,
%~   C9=B9.
/* ( aXiom_p1( attempts( Agent, 
              act3( examine__D5, 
                Agent, 
                [Sense,Prep,Object,Depth]))) ==>> 
  ( \+( sg( can_sense_here(Agent,Sense)))  ,
    ! , 
    raise_aXiom_events( failed( 
                           did( Agent, 
                             act3( examine, 
                               Agent, 
                               [Sense,Prep,Object,Depth])), 
                           \+( can_sense_here(Agent,Sense)))))) */
%~ aXiom_p1(
%~    attempts( Agent,
%~      act3( examine__D5,
%~        Agent,
%~        [Sense,Prep,Object,Depth])), A9,E9) :-
%~   \+( sg(can_sense_here(Agent,Sense),A9,D9)) ,
%~   C9=A9 ,
%~   ! ,
%~   B9=C9 ,
%~   raise_aXiom_events(
%~      failed(
%~         did( Agent,
%~           act3( examine,
%~             Agent,
%~             [Sense,Prep,Object,Depth])),
%~         \+( can_sense_here(Agent,Sense))), B9,E9).
/* ( aXiom_p1( attempts( Agent, 
              act3( examine__D5, 
                Agent, 
                [Sense,Prep,Object,Depth]))) ==>> 
  ( \+( sg( can_sense(Agent,Sense,Object)))  ,
    ! , 
    raise_aXiom_events( failed( 
                           did( Agent, 
                             act3( examine, 
                               Agent, 
                               [Sense,Prep,Object,Depth])), 
                           \+( can_sense(Agent,Sense,Object)))))) */
%~ aXiom_p1(
%~    attempts( Agent,
%~      act3( examine__D5,
%~        Agent,
%~        [Sense,Prep,Object,Depth])), A9,E9) :-
%~   \+( sg(can_sense(Agent,Sense,Object),A9,D9)) ,
%~   C9=A9 ,
%~   ! ,
%~   B9=C9 ,
%~   raise_aXiom_events(
%~      failed(
%~         did( Agent,
%~           act3( examine,
%~             Agent,
%~             [Sense,Prep,Object,Depth])),
%~         \+( can_sense(Agent,Sense,Object))), B9,E9).
/* ( aXiom_p1( attempts( Agent, 
              act3( examine__D5, 
                Agent, 
                [Sense,Prep,Object,Depth]))) ==>> 
  act_examine(Agent,Sense,Prep,Object,Depth),!) */
%~ aXiom_p1(
%~    attempts( Agent,
%~      act3( examine__D5,
%~        Agent,
%~        [Sense,Prep,Object,Depth])), A9,C9) :-
%~   must_mw1(
%~      act_examine(Agent,Sense,Prep,Object,Depth), A9,B9) ,
%~   ! ,
%~   C9=B9.
/* ( aXiom_p1( attempts(Agent,act3(touch,Agent,[Thing]))) ==>> 
  ( ! , 
    unless_reason( Agent, 
      will_need_touch(Agent,Thing), 
      cant( reach(Agent,Thing)), 
      send_1percept(Agent,[success(act3(touch,Agent,[Thing]),'Ok.')])))) */
%~ aXiom_p1(attempts(Agent,act3(touch,Agent,[Thing])),A9,B9) :-
%~   ! ,
%~   A9=A9 ,
%~   unless_reason( Agent,
%~     will_need_touch(Agent,Thing),
%~     cant( reach(Agent,Thing)),
%~     send_1percept(Agent,[success(act3(touch,Agent,[Thing]),'Ok.')]), A9,B9).
/* ( aXiom_p1( change_state(Agent,Action,Thing,Prop)) ==>> 
  !,change_state(Agent,Action,Thing,Prop)) */
%~ aXiom_p1(change_state(Agent,Action,Thing,Prop),A9,B9) :-
%~   ! ,
%~   A9=A9 ,
%~   change_state(Agent,Action,Thing,Prop,A9,B9).
/* ( aXiom_p1(Action,S0,S9) ::= 
  ( action_verb_agent_thing(Action,Verb,Agent,Thing)  ,
    nonvar(Verb) , 
    nonvar(Thing) , 
    nonvar(Agent) , 
    act_change_state_or_fallback(Verb,State,TF) , 
    ! , 
    eVent( Agent, 
      change_state(Agent,Action,Thing,State=TF), S0,S9) , 
    !)) */
%~ /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_agi/prolog/episodic_memory/adv_axiom.pl:406 
%~ aXiom_p1(Action,S0,S9) :-
%~   action_verb_agent_thing(Action,Verb,Agent,Thing) ,
%~   nonvar(Verb) ,
%~   nonvar(Thing) ,
%~   nonvar(Agent) ,
%~   act_change_state_or_fallback(Verb,State,TF) ,
%~   ! ,
%~   eVent( Agent,
%~     change_state(Agent,Action,Thing,State=TF), S0,S9) ,
%~   !.
/* ( invoke_command(Requester,attempts(Agent,Action)) ==>> 
  ( { Requester==Agent }  ,
    invoke_command(Agent,Action) , 
    !)) */
%~ invoke_command(Requester,attempts(Agent,Action),A9,D9) :-
%~   Requester==Agent ,
%~   C9=A9 ,
%~   invoke_command(Agent,Action,C9,B9) ,
%~   ! ,
%~   D9=B9.
/* ( invoke_command(Agent,Action) ==>> 
  ( invoke_metacmd(Agent,Action)  ,
    { overwrote_prompt(Agent) } , 
    !)) */
%~ invoke_command(Agent,Action,A9,D9) :-
%~   invoke_metacmd(Agent,Action,A9,C9) ,
%~   overwrote_prompt(Agent) ,
%~   B9=C9 ,
%~   ! ,
%~   D9=B9.
/* ( invoke_command(Agent,Action) ==>> 
  ( { set_last_action(Agent,Action) }  ,
    agent_try_action(Agent,Action) , 
    !)) */
%~ /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_agi/prolog/episodic_memory/adv_action.pl:137 
%~ invoke_command(Agent,Action,A9,D9) :-
%~   set_last_action(Agent,Action) ,
%~   C9=A9 ,
%~   agent_try_action(Agent,Action,C9,B9) ,
%~   ! ,
%~   D9=B9.
/* ( invoke_intents(Agent) ==>> 
  ( sg( declared( memories(Agent,Mem0)))  ,
    { member(intent(Agent,[]),Mem0) } , 
    !)) */
%~ /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_agi/prolog/episodic_memory/adv_action.pl:154 
%~ invoke_intents(Agent,A9,D9) :-
%~   sg(declared(memories(Agent,Mem0)),A9,C9) ,
%~   member(intent(Agent,[]),Mem0) ,
%~   B9=C9 ,
%~   ! ,
%~   D9=B9.
/* ==>>(satisfy_each_cond(Ctxt,[],success(Ctxt)),!) */
%~ satisfy_each_cond(Ctxt,[],success(Ctxt),A9,B9) :-
%~   ! ,
%~   B9=A9.
/* ( satisfy_each_cond(Context,[Cond],Out) ==>> 
  ( satisfy_each(Context,Cond)  ,
    ! , 
    ( sg( member( failed(Why))) ->  
           
        Out =  
             
          failed(Why) ; 
      satisfy_each_cond(Context,CondList,Out)) , 
    !)) */
%~ satisfy_each_cond(Context,[Cond|CondList],Out,A9,F9) ->
%~   dmust_tracing(satisfy_each(Context,Cond),A9,E9) ,
%~   ! ,
%~   D9=E9 ,
%~   ( sg(member(failed(Why)),D9,C9) ->
%~ 
%~       =(Out,failed(Why),C9,B9) ;
%~     satisfy_each_cond(Context,CondList,Out,D9,B9)) ,
%~   ! ,
%~   F9=B9.
/* ==>>(satisfy_each2(Ctx,Cond),satisfy_each1(Ctx,Cond)) */
%~ satisfy_each2(Ctx,Cond,A9,B9) :-
%~ 
%~   satisfy_each1(Ctx,Cond,A9,B9).
/* ==>>(satisfy_each2(Cond3,Cond),[failed(Cond)]) */
%~ satisfy_each2( Cond2,
%~   Cond,
%~   [ failed(Cond) |
%~     Each2_Failed],
%~   Each2_Failed) :-
%~ 
%~   true.
/* ( satisfy_each1(_Context,h(spatial,P,_X,_Y)) ==>> 
  {P==takeable},!) */
%~ satisfy_each1(_Context,h(spatial,P,_X,_Y),A9,C9) :-
%~   P==takeable ,
%~   B9=A9 ,
%~   ! ,
%~   C9=B9.
/* ( satisfy_each1(Context,List) ==>> 
  ( { is_list(List) }  ,
    ! , 
    satisfy_each_cond(Context,List,Out) , 
    ! , 
    { Out\=failed(Failed) })) */
%~ satisfy_each1(Context,List,A9,F9) :-
%~   is_list(List) ,
%~   E9=A9 ,
%~   ! ,
%~   D9=E9 ,
%~   satisfy_each_cond(Context,List,Out,D9,C9) ,
%~   ! ,
%~   B9=C9 ,
%~   Out\=failed(Failed) ,
%~   F9=B9.
/* ==>>(satisfy_each1(_Ctx,A\=B),({dif(A,B)},!)) */
%~ /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_agi/prolog/episodic_memory/adv_action.pl:281 
%~ satisfy_each1(_Ctx,A\=B,A9,C9) :-
%~   dif(A,B) ,
%~   B9=A9 ,
%~   ! ,
%~   C9=B9.
/* ==>>(satisfy_each1(_Ctxt,exists(Ex)),(!,{ground(Ex)})) */
%~ satisfy_each1(_Ctxt,exists(Ex),A9,B9) :-
%~   ! ,
%~   A9=A9 ,
%~   ground(Ex) ,
%~   B9=A9.
/* ( satisfy_each1(Context,believe(Beliver,Cond)) ==>> 
  ( pre_redeclare( memories(Beliver,Memory))  ,
    { satisfy_each_always(Context,Cond,Memory,NewMemory) } , 
    ! , 
    redeclare( memories(Beliver,NewMemory)))) */
%~ /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_agi/prolog/episodic_memory/adv_action.pl:286 
%~ satisfy_each1(Context,believe(Beliver,Cond),A9,E9) :-
%~   pre_redeclare(memories(Beliver,Memory),A9,D9) ,
%~   satisfy_each_always(Context,Cond,Memory,NewMemory) ,
%~   C9=D9 ,
%~   ! ,
%~   B9=C9 ,
%~   redeclare(memories(Beliver,NewMemory),B9,E9).
/* ( satisfy_each1(Context,believe(_Beliver,Cond)) ==>> 
  ( !  ,
    satisfy_each(Context,Cond) , 
    !)) */
%~ satisfy_each1(Context,believe(_Beliver,Cond),A9,C9) :-
%~   ! ,
%~   A9=A9 ,
%~   satisfy_each(Context,Cond,A9,B9) ,
%~   ! ,
%~   C9=B9.
/* ==>>(satisfy_each1(postCond(_Action),~Cond),(!,undeclare_always(Cond))) */
%~ satisfy_each1(postCond(_Action),~Cond,A9,B9) :-
%~   ! ,
%~   A9=A9 ,
%~   undeclare_always(Cond,A9,B9).
/* ( satisfy_each1(Ctx_Percept_local,percept_local(Where,Event)) ==>> 
  !,queue_local_event([Event],[Where])) */
%~ /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_agi/prolog/episodic_memory/adv_action.pl:305 
%~ satisfy_each1(Percept_local,percept_local(Where,Event),A9,B9) :-
%~   ! ,
%~   A9=A9 ,
%~   queue_local_event([Event],[Where],A9,B9).
/* ( satisfy_each1(Ctx_Percept,percept(Agent,Event)) ==>> 
  !,send_1percept(Agent,Event)) */
%~ satisfy_each1(Percept,percept(Agent,Event),A9,B9) :-
%~   ! ,
%~   A9=A9 ,
%~   send_1percept(Agent,Event,A9,B9).
/* ( satisfy_each1(Context,~Cond) ==>> 
  !,(\+satisfy_each1(Context,Cond);[failed(Cond)])) */
%~ /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_agi/prolog/episodic_memory/adv_action.pl:307 
%~ satisfy_each1(Context,~Cond,A9,C9) :-
%~   ! ,
%~   A9=A9 ,
%~   ( \+satisfy_each1(Context,Cond,A9,B9),C9=A9 ;
%~     A9 =
%~ 
%~       [ failed(Cond) |
%~         C9]).
/* ( satisfy_each1(Ctx_Call,call(Cond)) ==>> 
  declared(Cond)*->true;apply_aXioms(Cond)) */
%~ satisfy_each1(Call,call(Cond),A9,C9) :-
%~ 
%~   ( declared(Cond,A9,B9)*->true(B9,C9) ;
%~     apply_aXioms(Cond,A9,C9)).
/* ==>>(satisfy_each1(Ctx_Cond1,Cond),(declared(Cond),!)) */
%~ /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_agi/prolog/episodic_memory/adv_action.pl:309 
%~ satisfy_each1(Cond1,Cond,A9,C9) :-
%~   declared(Cond,A9,B9) ,
%~   ! ,
%~   C9=B9.
/* ( satisfy_each1(postCond(_Action),Cond) ==>> 
  ( { old_figment(Cond,_F,_A,Old) }  ,
    undeclare_always(Old) , 
    ! , 
    declare(Cond))) */
%~ satisfy_each1(postCond(_Action),Cond,A9,D9) :-
%~   must(
%~      {old_figment(Cond,_F,_A,Old)},undeclare_always(Old), A9,C9) ,
%~   ! ,
%~   B9=C9 ,
%~   declare(Cond,B9,D9).
/* ==>>(api_invoke(Action),apply_aXioms(Action)) */
%~ /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_agi/prolog/episodic_memory/adv_action.pl:341 
%~ api_invoke(Action,A9,B9) :-
%~ 
%~   apply_aXioms(Action,A9,B9).
/* ==>>(apply_aXioms(Action),(aXiom(Action),!)) */
%~ apply_aXioms(Action,A9,C9) :-
%~   aXiom(Action,A9,B9) ,
%~   ! ,
%~   C9=B9.
/* ( raise_aXiom_events(Action) ==>> 
  ( action_doer(Action,Agent) , 
    send_1percept(Agent,[failure(Action,unknown_to(Agent,Action))]))) */
%~ raise_aXiom_events(Action,A9,C9) :-
%~   action_doer(Action,Agent,A9,B9) ,
%~   send_1percept( Agent,
%~     [ failure(Action,unknown_to(Agent,Action))], B9,C9).
/* ==>>(unless_reason(_Agent,Then,_Msg),(Then,!)) */
%~ unless_reason(_Agent,Then,_Msg,A9,C9) :-
%~   phrase(Then,A9,B9) ,
%~   ! ,
%~   C9=B9.
/* ( unless_reason(Agent,_Then,Msg) ==>> 
  ( { event_failed(Agent,Msg) }  ,
    ! , 
    {fail})) */
%~ unless_reason(Agent,_Then,Msg,A9,D9) :-
%~   event_failed(Agent,Msg) ,
%~   C9=A9 ,
%~   ! ,
%~   B9=C9 ,
%~   fail ,
%~   D9=B9.
/* ( unless_reason(_Agent,Unless,_Msg,Then) ==>> 
  ( Unless  ,
    ! , 
    Then)) */
%~ unless_reason(_Agent,Unless,_Msg,Then,A9,D9) :-
%~   phrase(Unless,A9,C9) ,
%~   ! ,
%~   B9=C9 ,
%~   phrase(Then,B9,D9).
/* ( unless_reason(Agent,_Unless,Msg,_Then) ==>> 
  {event_failed(Agent,Msg)},!) */
%~ unless_reason(Agent,_Unless,Msg,_Then,A9,C9) :-
%~   event_failed(Agent,Msg) ,
%~   B9=A9 ,
%~   ! ,
%~   C9=B9.
/* ==>>(unless(_Agent,Required,Then),(Required,!,Then)) */
%~ /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_agi/prolog/episodic_memory/adv_action.pl:429 
%~ unless(_Agent,Required,Then,A9,D9) :-
%~   phrase(Required,A9,C9) ,
%~   ! ,
%~   B9=C9 ,
%~   phrase(Then,B9,D9).
/* ( unless(Agent,Required,_Then) ==>> 
  ( { simplify_reason(Required,CUZ), 
      event_failed(Agent,cant(cuz(\+CUZ))) } , 
    !)) */
%~ /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_agi/prolog/episodic_memory/adv_action.pl:430 
%~ unless(Agent,Required,_Then,A9,C9) :-
%~   simplify_reason(Required,CUZ) ,
%~   event_failed(Agent,cant(cuz(\+CUZ))) ,
%~   B9=A9 ,
%~   ! ,
%~   C9=B9.
/* ( add_intent_look(Agent) ==>> 
  ( h(spatial,inside,Agent,_Somewhere) , 
    add_agent_intent(Agent,attempts(Agent,act3(look,Agent,[]))))) */
%~ /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_agi/prolog/episodic_memory/adv_action.pl:474 
%~ add_intent_look(Agent,A9,C9) :-
%~   h(spatial,inside,Agent,_Somewhere,A9,B9) ,
%~   add_agent_intent(Agent,attempts(Agent,act3(look,Agent,[])),B9,C9).
/* ( disgorge( Doer, 
    Verb, Container,Prep,Here, 
    Vicinity,Msg) ==>> 
  ( verb_domain(Verb,Spatially)  ,
    findall(Inner,h(Spatially,child,Inner,Container),Contents) , 
    { dbug(general,'~p childs: ~p~n',[Container,Contents]) } , 
    moveto( Doer, 
      Verb, Contents,Prep,Here, 
      Vicinity,Msg))) */
%~ disgorge( Doer,
%~   Verb, Container,Prep,Here,
%~   Vicinity,Msg,A9,
%~   E9) :-
%~   verb_domain(Verb,Spatially,A9,D9) ,
%~   findall( Inner,
%~     h(Spatially,child,Inner,Container), Contents,D9,C9) ,
%~   dbug(general,'~p childs: ~p~n',[Container,Contents]) ,
%~   B9=C9 ,
%~   moveto( Doer,
%~     Verb, Contents,Prep,Here,
%~     Vicinity,Msg,B9,
%~     E9).
/* ( moveto(Doer,Verb,List,At,Dest,Vicinity,Msg) ==>> 
  ( { is_list(List) }  ,
    ! , 
    apply_mapl_rest_state( moveto(Doer,Verb), 
      List, 
      [At,Dest,Vicinity,Msg]))) */
%~ /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_agi/prolog/episodic_memory/adv_action.pl:560 
%~ moveto( Doer,
%~   Verb, List,At,Dest,
%~   Vicinity,Msg,A9,
%~   D9) :-
%~   is_list(List) ,
%~   C9=A9 ,
%~   ! ,
%~   B9=C9 ,
%~   apply_mapl_rest_state( moveto(Doer,Verb),
%~     List,
%~     [At,Dest,Vicinity,Msg], B9,D9).
/* ( moveto(Doer,Verb,Object,At,Dest,Vicinity,Msg) ==>> 
  ( undeclare( h(spatial,Prep_Spatial,Object,From))  ,
    declare( h(spatial,At,Object,Dest)) , 
    queue_local_event( 
       [ act3( move, 
           Doer, 
           [ Verb, Object,From,At, 
             Dest]), 
         Msg], 
       Vicinity))) */
%~ moveto( Doer,
%~   Verb, Object,At,Dest,
%~   Vicinity,Msg,A9,
%~   D9) :-
%~   undeclare(h(spatial,Prep_Spatial,Object,From),A9,C9) ,
%~   declare(h(spatial,At,Object,Dest),C9,B9) ,
%~   queue_local_event(
%~      [ act3( move,
%~          Doer,
%~          [ Verb, Object,From,At,
%~            Dest]),
%~        Msg], Vicinity,B9,D9).
/* ( setloc_silent(Prep,Object,Dest) ==>> 
  ( undeclare( h(spatial,Prep_Spatial,Object,Target_Object4)) , 
    declare( h(spatial,Prep,Object,Dest)))) */
%~ setloc_silent(Prep,Object,Dest,A9,C9) :-
%~   undeclare(h(spatial,Prep_Spatial,Object,Target_Object4),A9,B9) ,
%~   declare(h(spatial,Prep,Object,Dest),B9,C9).
ORDERING TEST:
 unordered was [before(start,completeFn(CompleteFn)),before(start,x),before(start,y),before(y,completeFn(CompleteFn)),before(x,z),before(z,completeFn(CompleteFn))]
 ordering is [before(z,completeFn(CompleteFn)),before(x,completeFn(CompleteFn)),before(x,z),before(start,z),before(y,completeFn(CompleteFn)),before(start,y),before(start,x),before(start,completeFn(CompleteFn))]
 picked [start,x,y,z,completeFn(CompleteFn3)]
 END ORDERING TEST
=============================================
RESET STATE
%~ /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_agi/t/agi_tests/adv_story/adv_test_01.pl:34 
%~ create_1obj(se_subregion,i1)
%~ create_1obj(ttt_table,i1)
%~ create_1obj(ss_subregion,i1)
%~ create_1obj(ttt_table,i1)
%~ create_1obj(sw_subregion,i1)
%~ create_1obj(ttt_table,i1)
%~ create_1obj(ee_subregion,i1)
%~ create_1obj(ttt_table,i1)
%~ create_1obj(cc_subregion,i1)
%~ create_1obj(ttt_table,i1)
%~ create_1obj(ww_subregion,i1)
%~ create_1obj(ttt_table,i1)
%~ create_1obj(ne_subregion,i1)
%~ create_1obj(ttt_table,i1)
%~ create_1obj(nn_subregion,i1)
%~ create_1obj(ttt_table,i1)
%~ create_1obj(nw_subregion,i1)
%~ create_1obj(ttt_table,i1)
%~ create_1obj(x(red_pebble,5),i1)
%~ create_1obj(player,i1)
%~ create_1obj(x(red_pebble,4),i1)
%~ create_1obj(player,i1)
%~ create_1obj(x(red_pebble,3),i1)
%~ create_1obj(player,i1)
%~ create_1obj(x(red_pebble,2),i1)
%~ create_1obj(player,i1)
%~ create_1obj(x(red_pebble,1),i1)
%~ create_1obj(player,i1)
%~ create_1obj(x(blue_pebble,5),i1)
%~ create_1obj(floyd,i1)
%~ create_1obj(x(blue_pebble,4),i1)
%~ create_1obj(floyd,i1)
%~ create_1obj(x(blue_pebble,3),i1)
%~ create_1obj(floyd,i1)
%~ create_1obj(x(blue_pebble,2),i1)
%~ create_1obj(floyd,i1)
%~ create_1obj(x(blue_pebble,1),i1)
%~ create_1obj(floyd,i1)
%~ create_1obj(ttt_table,i1)
%~ create_1obj(kitchen,i1)
%~ create_1obj(brklamp,i1)
%~ create_1obj(garden,i1)
%~ create_1obj(screendoor,i1)
%~ create_1obj(garden,i1)
%~ create_1obj(apple,i1)
%~ create_1obj(crate,i1)
%~ create_1obj(crate,i1)
%~ create_1obj(kitchen,i1)
%~ create_1obj(screendoor,i1)
%~ create_1obj(kitchen,i1)
%~ create_1obj(fireplace,i1)
%~ create_1obj(living_room,i1)
%~ create_1obj(videocamera,i1)
%~ create_1obj(living_room,i1)
%~ create_1obj(shovel,i1)
%~ create_1obj(basement,i1)
%~ create_1obj(mushroom,i1)
%~ create_1obj(garden,i1)
%~ create_1obj(water,i1)
%~ create_1obj(fountain,i1)
%~ create_1obj(fountain,i1)
%~ create_1obj(garden,i1)
%~ create_1obj(x(rock,2),i1)
%~ create_1obj(garden,i1)
%~ create_1obj(rock,i1)
%~ create_1obj(garden,i1)
%~ create_1obj(locker,i1)
%~ create_1obj(pantry,i1)
%~ create_1obj(shelf,i1)
%~ create_1obj(pantry,i1)
%~ create_1obj(living_room,i1)
%~ create_1obj(dining_room,i1)
%~ create_1obj(dining_room,i1)
%~ create_1obj(living_room,i1)
%~ create_1obj(dining_room,i1)
%~ create_1obj(kitchen,i1)
%~ create_1obj(kitchen,i1)
%~ create_1obj(dining_room,i1)
%~ create_1obj(garden,i1)
%~ create_1obj(kitchen,i1)
%~ create_1obj(kitchen,i1)
%~ create_1obj(garden,i1)
%~ create_1obj(basement,i1)
%~ create_1obj(pantry,i1)
%~ create_1obj(pantry,i1)
%~ create_1obj(basement,i1)
%~ create_1obj(pantry,i1)
%~ create_1obj(kitchen,i1)
%~ create_1obj(kitchen,i1)
%~ create_1obj(pantry,i1)
%~ create_1obj(wrench,i1)
%~ create_1obj(floyd,i1)
%~ create_1obj(coins,i1)
%~ create_1obj(bag,i1)
%~ create_1obj(bag,i1)
%~ create_1obj(player,i1)
%~ create_1obj(watch,i1)
%~ create_1obj(player,i1)
%~ create_1obj(player,i1)
%~ create_1obj(kitchen,i1)
%~ create_1obj(floyd,i1)
%~ create_1obj(pantry,i1)
%~ create_1obj(cup,i1)
%~ create_1obj(cabinate,i1)
%~ create_1obj(cabinate,i1)
%~ create_1obj(kitchen,i1)
%~ create_1obj(plate,i1)
%~ create_1obj(sink,i1)
%~ create_1obj(sink,i1)
%~ create_1obj(kitchen,i1)
%~ create_1obj(lamp,i1)
%~ create_1obj(table,i1)
%~ create_1obj(table,i1)
%~ create_1obj(kitchen,i1)
%~ create_1obj(flour,i1)
%~ create_1obj(bowl,i1)
%~ create_1obj(bowl,i1)
%~ create_1obj(box,i1)
%~ create_1obj(box,i1)
%~ create_1obj(table,i1)
%~ create_1obj(table,i1)
%~ create_1obj(table_leg,i1)
/* oldObjectList=[] */
/* newObjectList = [ x(table_leg,i1), x(table,i1),x(box,i1),x(bowl,i1), 
                  x(flour,i1),x(kitchen,i1),x(lamp,i1), 
                  x(sink,i1),x(plate,i1),x(cabinate,i1), 
                  x(cup,i1),x(pantry,i1),x(floyd,i1), 
                  x(player,i1),x(watch,i1),x(bag,i1), 
                  x(coins,i1),x(wrench,i1), 
                  x(basement,i1),x(garden,i1), 
                  x(dining_room,i1),x(living_room,i1), 
                  x(shelf,i1),x(locker,i1),x(rock,i1), 
                  x(fountain,i1),x(water,i1), 
                  x(mushroom,i1),x(shovel,i1), 
                  x(videocamera,i1),x(fireplace,i1), 
                  x(screendoor,i1),x(crate,i1), 
                  x(apple,i1),x(brklamp,i1), 
                  x(ttt_table,i1),x(nw_subregion,i1), 
                  x(nn_subregion,i1),x(ne_subregion,i1), 
                  x(ww_subregion,i1),x(cc_subregion,i1), 
                  x(ee_subregion,i1),x(sw_subregion,i1), 
                  x(ss_subregion,i1),x(se_subregion,i1)] */
/* mu_create_object( x(table_leg,i1), [
  [ shape=table_leg, traits([table_leg]),inherit(table_leg,t), 
    sp(nouns,[table_leg])])] */
/* mu_create_object( x(table,i1), [
  [ shape=(table), traits([table]),inherit(table,t), 
    sp(nouns,[table])])] */
/* mu_create_object( x(box,i1), [
  [ shape=box, traits([box]),inherit(box,t), 
    sp(nouns,[box])])] */
/* mu_create_object( x(bowl,i1), [
  [ shape=bowl, traits([bowl]),inherit(bowl,t), 
    sp(nouns,[bowl])])] */
/* mu_create_object( x(flour,i1), [
  [ shape=flour, traits([flour]),inherit(flour,t), 
    sp(nouns,[flour])])] */
/* mu_create_object( x(kitchen,i1), [
  [ shape=kitchen, traits([kitchen]),inherit(kitchen,t), 
    sp(nouns,[kitchen])])] */
/* mu_create_object( x(lamp,i1), [
  [ shape=lamp, traits([lamp]),inherit(lamp,t), 
    sp(nouns,[lamp])])] */
/* mu_create_object( x(sink,i1), [
  [ shape=sink, traits([sink]),inherit(sink,t), 
    sp(nouns,[sink])])] */
/* mu_create_object( x(plate,i1), [
  [ shape=plate, traits([plate]),inherit(plate,t), 
    sp(nouns,[plate])])] */
/* mu_create_object( x(cabinate,i1), [
  [ shape=cabinate, traits([cabinate]),inherit(cabinate,t), 
    sp(nouns,[cabinate])])] */
/* mu_create_object( x(cup,i1), [
  [ shape=cup, traits([cup]),inherit(cup,t), 
    sp(nouns,[cup])])] */
/* mu_create_object( x(pantry,i1), [
  [ shape=pantry, traits([pantry]),inherit(pantry,t), 
    sp(nouns,[pantry])])] */
/* mu_create_object( x(floyd,i1), [
  [ shape=floyd, traits([floyd]),inherit(floyd,t), 
    sp(nouns,[floyd])])] */
/* mu_create_object( x(player,i1), [
  [ shape=player, traits([player]),inherit(player,t), 
    sp(nouns,[player])])] */
/* mu_create_object( x(watch,i1), [
  [ shape=watch, traits([watch]),inherit(watch,t), 
    sp(nouns,[watch])])] */
/* mu_create_object( x(bag,i1), [
  [ shape=bag, traits([bag]),inherit(bag,t), 
    sp(nouns,[bag])])] */
/* mu_create_object( x(coins,i1), [
  [ shape=coins, traits([coins]),inherit(coins,t), 
    sp(nouns,[coins])])] */
/* mu_create_object( x(wrench,i1), [
  [ shape=wrench, traits([wrench]),inherit(wrench,t), 
    sp(nouns,[wrench])])] */
/* mu_create_object( x(basement,i1), [
  [ shape=basement, traits([basement]),inherit(basement,t), 
    sp(nouns,[basement])])] */
/* mu_create_object( x(garden,i1), [
  [ shape=garden, traits([garden]),inherit(garden,t), 
    sp(nouns,[garden])])] */
/* mu_create_object( x(dining_room,i1), [
  [ shape=dining_room, traits([dining_room]),inherit(dining_room,t), 
    sp(nouns,[dining_room])])] */
/* mu_create_object( x(living_room,i1), [
  [ shape=living_room, traits([living_room]),inherit(living_room,t), 
    sp(nouns,[living_room])])] */
/* mu_create_object( x(shelf,i1), [
  [ shape=shelf, traits([shelf]),inherit(shelf,t), 
    sp(nouns,[shelf])])] */
/* mu_create_object( x(locker,i1), [
  [ shape=locker, traits([locker]),inherit(locker,t), 
    sp(nouns,[locker])])] */
/* mu_create_object( x(rock,i1), [
  [ shape=rock, traits([rock]),inherit(rock,t), 
    sp(nouns,[rock])])] */
/* mu_create_object( x(fountain,i1), [
  [ shape=fountain, traits([fountain]),inherit(fountain,t), 
    sp(nouns,[fountain])])] */
/* mu_create_object( x(water,i1), [
  [ shape=water, traits([water]),inherit(water,t), 
    sp(nouns,[water])])] */
/* mu_create_object( x(mushroom,i1), [
  [ shape=mushroom, traits([mushroom]),inherit(mushroom,t), 
    sp(nouns,[mushroom])])] */
/* mu_create_object( x(shovel,i1), [
  [ shape=shovel, traits([shovel]),inherit(shovel,t), 
    sp(nouns,[shovel])])] */
/* mu_create_object( x(videocamera,i1), [
  [ shape=videocamera, traits([videocamera]),inherit(videocamera,t), 
    sp(nouns,[videocamera])])] */
/* mu_create_object( x(fireplace,i1), [
  [ shape=fireplace, traits([fireplace]),inherit(fireplace,t), 
    sp(nouns,[fireplace])])] */
/* mu_create_object( x(screendoor,i1), [
  [ shape=screendoor, traits([screendoor]),inherit(screendoor,t), 
    sp(nouns,[screendoor])])] */
/* mu_create_object( x(crate,i1), [
  [ shape=crate, traits([crate]),inherit(crate,t), 
    sp(nouns,[crate])])] */
/* mu_create_object( x(apple,i1), [
  [ shape=apple, traits([apple]),inherit(apple,t), 
    sp(nouns,[apple])])] */
/* mu_create_object( x(brklamp,i1), [
  [ shape=brklamp, traits([brklamp]),inherit(brklamp,t), 
    sp(nouns,[brklamp])])] */
/* mu_create_object( x(ttt_table,i1), [
  [ shape=ttt_table, traits([ttt_table]),inherit(ttt_table,t), 
    sp(nouns,[ttt_table])])] */
/* mu_create_object( x(nw_subregion,i1), [
  [ shape=nw_subregion, traits([nw_subregion]),inherit(nw_subregion,t), 
    sp(nouns,[nw_subregion])])] */
/* mu_create_object( x(nn_subregion,i1), [
  [ shape=nn_subregion, traits([nn_subregion]),inherit(nn_subregion,t), 
    sp(nouns,[nn_subregion])])] */
/* mu_create_object( x(ne_subregion,i1), [
  [ shape=ne_subregion, traits([ne_subregion]),inherit(ne_subregion,t), 
    sp(nouns,[ne_subregion])])] */
/* mu_create_object( x(ww_subregion,i1), [
  [ shape=ww_subregion, traits([ww_subregion]),inherit(ww_subregion,t), 
    sp(nouns,[ww_subregion])])] */
/* mu_create_object( x(cc_subregion,i1), [
  [ shape=cc_subregion, traits([cc_subregion]),inherit(cc_subregion,t), 
    sp(nouns,[cc_subregion])])] */
/* mu_create_object( x(ee_subregion,i1), [
  [ shape=ee_subregion, traits([ee_subregion]),inherit(ee_subregion,t), 
    sp(nouns,[ee_subregion])])] */
/* mu_create_object( x(sw_subregion,i1), [
  [ shape=sw_subregion, traits([sw_subregion]),inherit(sw_subregion,t), 
    sp(nouns,[sw_subregion])])] */
/* mu_create_object( x(ss_subregion,i1), [
  [ shape=ss_subregion, traits([ss_subregion]),inherit(ss_subregion,t), 
    sp(nouns,[ss_subregion])])] */
/* mu_create_object( x(se_subregion,i1), [
  [ shape=se_subregion, traits([se_subregion]),inherit(se_subregion,t), 
    sp(nouns,[se_subregion])])] */
=============================================
=============================================
INIT STATE
=============================================
```
totalTime=10.000

FAILED: /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-junit-minor -k adv_test_02.pl (returned 137) Add_LABELS='Errors,Overtime' Rem_LABELS='Skipped,Skipped,Warnings,Skipped'

logicmoo.agi.agi_test.adv_story.ADV_TEST_01

Test case:logicmoo.agi.agi_test.adv_story.ADV_TEST_01 JUnit
Outcome:Failed
Duration:10.0 sec
FailedFAILED: /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-junit-minor -k adv_test_01.pl (returned 137)
failed
Stderr
 (cd /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_agi/t/agi_tests/adv_story ; timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "['adv_test_01.pl']")

% EDIT: https://github.com/logicmoo/logicmoo_workspace/edit/master/packs_sys/logicmoo_agi/t/agi_tests/adv_story/adv_test_01.pl 
% JENKINS: https://jenkins.logicmoo.org/job/logicmoo_workspace/lastBuild/testReport/logicmoo.agi.agi_test.adv_story/ADV_TEST_01/ 
% ISSUE_SEARCH: https://github.com/logicmoo/logicmoo_workspace/issues?q=is%3Aissue+label%3AADV_TEST_01 
% ISSUE: https://github.com/logicmoo/logicmoo_workspace/issues/703 


```
%~ init_phase(after_load)
%~ init_phase(restore_state)
%
%~ init_why(after_boot,program)
%~ READONLY PACKAGES
%~ READONLY PACKAGES
%~ READONLY PACKAGES
%~ after_boot.
%~ Dont forget to ?- logicmoo_i_cyc_xform.
%~ /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_agi/prolog/episodic_memory/adv_axiom.pl:44 
%~ message_hook_type(warning)
%~ message_hook(
%~    redefined_procedure(static,mu:aXiom/1),
%~    warning,
%~    [ 'Redefined ~w procedure ~p' - [ static,
%~                                      mu : aXiom/1]])
%~ source_location('/var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_agi/prolog/episodic_memory/adv_axiom.pl',44)
Redefined static procedure mu:(aXiom/1)
Warning: /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_agi/prolog/episodic_memory/adv_axiom.pl:44:
Warning:    Redefined static procedure mu:(aXiom/1)
/* ==>>(will_need_touch(Agent,Thing),h(spatial,touchable,Agent,Thing)) */
%~ will_need_touch(Agent,Thing,A9,B9) :-
%~ 
%~   h(spatial,touchable,Agent,Thing,A9,B9).
%~ will_need_touch(Touchable_Will_need_touch5,Will_need_touch4,Will_need_touch,Touch) :-
%~ 
%~   h(spatial,touchable,Touchable_Will_need_touch5,Will_need_touch4,Will_need_touch,Touch).
/* ( will_need_touch(Agent,Thing) ==>> 
  ( can_sense(Agent,Sense_Agent2,Thing) , 
    h(spatial,touchable,Agent,Thing))) */
%~ will_need_touch(Agent,Thing,A9,C9) :-
%~   can_sense(Agent,Sense_Agent2,Thing,A9,B9) ,
%~   h(spatial,touchable,Agent,Thing,B9,C9).
:- multifile will_need_touch/4.

/* ( will_need_touch(Source_Agent_Touchable_Will_need_touch,Target_Thing_Touch) ==>> 
  ( can_sense(Source_Agent_Touchable_Will_need_touch,Can_senseWill_need_touch,Target_Thing_Touch) , 
    h(spatial,touchable,Source_Agent_Touchable_Will_need_touch,Target_Thing_Touch))) */
%~ will_need_touch(Agent_Touchable_Will_need_touch,Thing,A9,C9) :-
%~   can_sense( Agent_Touchable_Will_need_touch,
%~     Can_senseWill_need_touch, Thing,A9,B9) ,
%~   h(spatial,touchable,Agent_Touchable_Will_need_touch,Thing,B9,C9).
will_need_touch(Agent, Thing, A, B) :-
    can_sense(Agent, _, Thing, A, C),
    h(spatial, touchable, Agent, Thing, C, B).

/* ( eVent(Agent,Event) ==>> 
  send_1percept(Agent,Event),apply_aXioms(Event)) */
%~ eVent(Agent,Event,A9,C9) :-
%~   send_1percept(Agent,Event,A9,B9) ,
%~   must_mw1(apply_aXioms(Event),B9,C9).
/* ( aXiom(Action,_S0,_S9) ::= 
  xnotrace((\+trival_act(Action),dbug1(aXiom(Action)))),xnotrace(fail)) */
%~ aXiom(Action,_S0,_S9) :-
%~   xnotrace( \+trival_act(Action),dbug1(aXiom(Action))) ,
%~   xnotrace(fail).
/* ==>>(aXiom(Action),aXiom_p1(Action)) */
%~ aXiom(Action,A9,B9) :-
%~ 
%~   aXiom_p1(Action,A9,B9).
/* ==>>(aXiom(Action),aXiom_p2(Action)) */
%~ aXiom(Action,A9,B9) :-
%~ 
%~   aXiom_p2(Action,A9,B9).
/* ==>>(aXiom_p1((P1,P11)),(!,aXiom_p1(P1),aXiom_p1(P11))) */
%~ /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_agi/prolog/episodic_memory/adv_axiom.pl:71 
%~ aXiom_p1((_57744,_57746),A9,C9) :-
%~   ! ,
%~   A9=A9 ,
%~   aXiom_p1(_57744,A9,B9) ,
%~   aXiom_p1(_57746,B9,C9).
/* ==>>(aXiom_p1((P1;P11)),(!,(aXiom_p1(P1);aXiom_p1(P11)))) */
%~ aXiom_p1((_45140;_45142),A9,B9) :-
%~   ! ,
%~   A9=A9 ,
%~   aXiom_p1(_45140,A9,B9);aXiom_p1(_45142,A9,B9).
/* ==>>(aXiom_p1((P1->P11)),(!,(aXiom_p1(P1)->aXiom_p1(P11)))) */
%~ aXiom_p1((_29328->_29330),A9,C9) ->
%~   ! ,
%~   A9=A9 ,
%~   aXiom_p1(_29328,A9,B9) ->
%~ 
%~     aXiom_p1(_29330,B9,C9).
/* ==>>(aXiom_p1(true),!) */
%~ aXiom_p1(true,A9,B9) :-
%~   ! ,
%~   B9=A9.
/* ( aXiom_p1( P1_Xx_c62*->P1;P1_Xx_c621) ==>> 
  !,(aXiom_p1(P1_Xx_c62)*->aXiom_p1(P1);aXiom_p1(P1_Xx_c621))) */
%~ aXiom_p1((Xx_c62*->Xx_c622;Xx_c621),A9,C9) :-
%~   ! ,
%~   A9=A9 ,
%~   ( aXiom_p1(Xx_c62,A9,B9)*->aXiom_p1(Xx_c622,B9,C9) ;
%~     aXiom_p1(Xx_c621,A9,C9)).
/* ( aXiom_p1( P1_Xx_c623*->P1) ==>> 
  !,(aXiom_p1(P1_Xx_c623)*->aXiom_p1(P1))) */
%~ aXiom_p1((Xx_c623*->Xx_c6234),A9,C9) :-
%~   ! ,
%~   A9=A9 ,
%~   aXiom_p1(Xx_c623,A9,B9)*->aXiom_p1(Xx_c6234,B9,C9).
/* ( aXiom_p2(Action) ==>> 
  ( { implications(DoesEvent,Action,Preconds,Postconds), 
      action_doer(Action,Agent) }  ,
    satisfy_each(preCond(_1),Preconds) , 
    ( sg(member(failed(Why))),send_1percept(Agent,failed(Action,Why)) ; 
      satisfy_each(postCond(_2),Postconds),send_1percept(Agent,Action)) , 
    { episodic_mem(Agent,implications(DoesEvent,Action,Preconds,Postconds)) } , 
    { dbug1( used_implications(DoesEvent,Action,Preconds,Postconds)) } , 
    !)) */
%~ aXiom_p2(Action,A9,I9) :-
%~   implications(DoesEvent,Action,Preconds,Postconds) ,
%~   action_doer(Action,Agent) ,
%~   H9=A9 ,
%~   satisfy_each(preCond(_1),Preconds,H9,G9) ,
%~   ( ( sg(member(failed(Why)),G9,F9) ,
%~       send_1percept(Agent,failed(Action,Why),F9,E9)) ;
%~     ( satisfy_each(postCond(_2),Postconds,G9,D9) ,
%~       send_1percept(Agent,Action,D9,E9))) ,
%~   episodic_mem( Agent,
%~     implications(DoesEvent,Action,Preconds,Postconds)) ,
%~   C9=E9 ,
%~   dbug1( used_implications(DoesEvent,Action,Preconds,Postconds)) ,
%~   B9=C9 ,
%~   ! ,
%~   I9=B9.
/* ( aXiom_p1(Action) ==>> 
  ( { oper_splitk(Agent,Action,Preconds,Postconds) }  ,
    { dbug1( using_oper_splitk(Agent,Action,Preconds,Postconds)) } , 
    satisfy_each(preCond(_1),Preconds) , 
    ( sg(member(failed(Why))),send_1percept(Agent,failed(Action,Why)) ; 
      ( satisfy_each(postCond(_2),Postconds) , 
        send_1percept(Agent,success(Action)))) , 
    { dbug1( used_oper_splitk(Agent,Action,Preconds,Postconds)) } , 
    !)) */
%~ aXiom_p1(Action,A9,I9) :-
%~   oper_splitk(Agent,Action,Preconds,Postconds) ,
%~   H9=A9 ,
%~   dbug1( using_oper_splitk(Agent,Action,Preconds,Postconds)) ,
%~   G9=H9 ,
%~   satisfy_each(preCond(_1),Preconds,G9,F9) ,
%~   ( ( sg(member(failed(Why)),F9,E9) ,
%~       send_1percept(Agent,failed(Action,Why),E9,D9)) ;
%~     ( satisfy_each(postCond(_2),Postconds,F9,C9) ,
%~       send_1percept(Agent,success(Action),C9,D9))) ,
%~   dbug1( used_oper_splitk(Agent,Action,Preconds,Postconds)) ,
%~   B9=D9 ,
%~   ! ,
%~   I9=B9.
/* ( aXiom_p2(Action,S,E) ::= 
  ( append_termlist(Action,[S,E],ActionSE)  ,
    current_predicate(_15778,mu:ActionSE) , 
    adv_safe_to_call(ActionSE) , 
    ! , 
    call(Action,S,E))) */
%~ /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_agi/prolog/episodic_memory/adv_axiom.pl:107 
%~ aXiom_p2(Action,S,E) :-
%~   append_termlist(Action,[S,E],ActionSE) ,
%~   current_predicate(Kw,mu:ActionSE) ,
%~   adv_safe_to_call(ActionSE) ,
%~   ! ,
%~   call(Action,S,E).
/* ( aXiom_p2(Action,S,E) ::= 
  ( current_predicate(Kw,mu:Action)  ,
    ! , 
    adv_safe_to_call(Action) , 
    call(Action) , 
    S=E)) */
%~ /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_agi/prolog/episodic_memory/adv_axiom.pl:114 
%~ aXiom_p2(Action,S,E) :-
%~   current_predicate(Kw,mu:Action) ,
%~   ! ,
%~   adv_safe_to_call(Action) ,
%~   call(Action) ,
%~   S=E.
/* ( aXiom_p1(Action) ==>> 
  ( action_doer(Action,Agent)  ,
    invoke_introspect(Agent,Action,Answer) , 
    send_1percept(Agent,[answer(Answer),Answer]) , 
    !)) */
%~ aXiom_p1(Action,A9,E9) :-
%~   action_doer(Action,Agent,A9,D9) ,
%~   invoke_introspect(Agent,Action,Answer,D9,C9) ,
%~   send_1percept(Agent,[answer(Answer),Answer],C9,B9) ,
%~   ! ,
%~   E9=B9.
/* ( aXiom_p1( print_(Agent,Msg)) ==>> 
  ( h(spatial,descended,Agent,Here) , 
    queue_local_event(msg_from(Agent,Msg),[Here]))) */
%~ /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_agi/prolog/episodic_memory/adv_axiom.pl:130 
%~ aXiom_p1(print_(Agent,Msg),A9,C9) :-
%~   h(spatial,descended,Agent,Here,A9,B9) ,
%~   queue_local_event(msg_from(Agent,Msg),[Here],B9,C9).
/* ( aXiom_p1( attempts(Agent,act3(wait,Agent,[]))) ==>> 
  from_loc(Agent,Here),queue_local_event(time_passes(Agent),Here)) */
%~ aXiom_p1(attempts(Agent,act3(wait,Agent,[])),A9,C9) :-
%~   from_loc(Agent,Here,A9,B9) ,
%~   queue_local_event(time_passes(Agent),Here,B9,C9).
/* ( aXiom_p1( attempts(Agent,act3(english,Agent,[English]))) ==>> 
  eng2cmd(Agent,English,Action),add_intent(Agent,Action)) */
%~ aXiom_p1(attempts(Agent,act3(english,Agent,[English])),A9,C9) :-
%~   eng2cmd(Agent,English,Action,A9,B9) ,
%~   add_intent(Agent,Action,B9,C9).
/* ( aXiom_p1( intent_english(Agent,English)) ==>> 
  !,{assertz(mu_global:console_tokens(Agent,English))}) */
%~ aXiom_p1(intent_english(Agent,English),A9,B9) :-
%~   ! ,
%~   A9=A9 ,
%~   assertz( mu_global : console_tokens(Agent,English)) ,
%~   B9=A9.
/* ( aXiom_p1( attempts(Agent,act3(talk,Agent,[Object,Message]))) ==>> 
  ( can_sense(Agent,audio,Object)  ,
    from_loc(Agent,Here) , 
    queue_local_event( 
       [ did( Agent, 
           act3(talk,Agent,[Here,Object,Message]))], 
       [Here]))) */
%~ aXiom_p1(
%~    attempts(Agent,act3(talk,Agent,[Object,Message])), A9,D9) :-
%~   can_sense(Agent,audio,Object,A9,C9) ,
%~   from_loc(Agent,Here,C9,B9) ,
%~   queue_local_event(
%~      [ did( Agent,
%~          act3(talk,Agent,[Here,Object,Message]))], [Here],B9,D9).
/* ( aXiom_p1( say(Agent,Message)) ==>> 
  ( from_loc(Agent,Here) , 
    queue_local_event( 
       [ did(Agent,act3(talk,Agent,[Here,*,Message]))], 
       [Here]))) */
%~ aXiom_p1(say(Agent,Message),A9,C9) :-
%~   from_loc(Agent,Here,A9,B9) ,
%~   queue_local_event(
%~      [ did(Agent,act3(talk,Agent,[Here,*,Message]))], [Here],B9,C9).
/* ( aXiom_p1( attempts( Agent, 
              act3(emote,Agent,[EmoteType,Object,Message]))) ==>> 
  ( !  ,
    from_loc(Agent,Here) , 
    queue_local_event( 
       [ act3(emote,Agent,[EmoteType,Object,Message])], 
       [Here]))) */
%~ aXiom_p1(
%~    attempts( Agent,
%~      act3(emote,Agent,[EmoteType,Object,Message])), A9,C9) :-
%~   ! ,
%~   A9=A9 ,
%~   from_loc(Agent,Here,A9,B9) ,
%~   queue_local_event(
%~      [ act3(emote,Agent,[EmoteType,Object,Message])], [Here],B9,C9).
/* ( aXiom_p1( terminates( h(Spatially,Prep,Object,Here))) ==>> 
  !,undeclare(h(Spatially,Prep,Object,Here))) */
%~ /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_agi/prolog/episodic_memory/adv_axiom.pl:163 
%~ aXiom_p1(terminates(h(Spatially,Prep,Object,Here)),A9,B9) :-
%~   ! ,
%~   A9=A9 ,
%~   undeclare(h(Spatially,Prep,Object,Here),A9,B9).
/* ( aXiom_p1( attempts( Agent, 
              act3(go__prep_obj,Agent,[Walk,At,Object]))) ==>> 
  ( will_need_touch(Agent,Object)  ,
    has_rel(At,Object) , 
    \+( is_closed(At,Object)) , 
    eVent( Agent, 
      event3( arrive, 
        [At,Agent,Object], 
        [Walk,At])))) */
%~ aXiom_p1(
%~    attempts( Agent,
%~      act3(go__prep_obj,Agent,[Walk,At,Object])), A9,F9) :-
%~   will_need_touch(Agent,Object,A9,E9) ,
%~   has_rel(At,Object,E9,D9) ,
%~   \+( is_closed(At,Object,D9,C9)) ,
%~   B9=D9 ,
%~   eVent( Agent,
%~     event3( arrive,
%~       [At,Agent,Object],
%~       [Walk,At]), B9,F9).
/* ( aXiom_p1( initiates( h(Spatially,Prep,Object,Dest))) ==>> 
  !,declare(h(Spatially,Prep,Object,Dest))) */
%~ aXiom_p1(initiates(h(Spatially,Prep,Object,Dest)),A9,B9) :-
%~   ! ,
%~   A9=A9 ,
%~   declare(h(Spatially,Prep,Object,Dest),A9,B9).
/* ==>>(aXiom_p1(status_msg(_Begin,_End)),[]) */
%~ aXiom_p1(status_msg(_Begin,_End),P1_Status_msg,P1_Status_msg) :-
%~ 
%~   true.
/* ( axiom_Recalc_e( 
     attempts(Agent,act3(go__obj,Agent,[Walk,Object])), 
     RECALC) ==>> 
  ( has_rel(At,Object) , 
    RECALC =  
         
      attempts( Agent, 
        act3(go__prep_obj,Agent,[Walk,At,Object])))) */
%~ axiom_Recalc_e(
%~    attempts(Agent,act3(go__obj,Agent,[Walk,Object])), RECALC,A9,C9) :-
%~   has_rel(At,Object,A9,B9) ,
%~   =( RECALC,
%~     attempts( Agent,
%~       act3(go__prep_obj,Agent,[Walk,At,Object])), B9,C9).
/* ( aXiom_p1( attempts(Agent,act3(go__loc,Agent,[_Walk,There]))) ==>> 
  ( has_rel(fn(exit,Fn_Exit),There) , 
    eVent(Agent,make_true(Agent,h(spatial,in,Agent,There))))) */
%~ aXiom_p1(
%~    attempts(Agent,act3(go__loc,Agent,[_Walk,There])), A9,C9) :-
%~   has_rel(fn(exit,Fn_Exit),There,A9,B9) ,
%~   eVent( Agent,
%~     make_true(Agent,h(spatial,in,Agent,There)), B9,C9).
/* ( aXiom_p1( make_true(Doer,h(spatial,in,Agent,There))) ==>> 
  ( { Doer==Agent }  ,
    has_rel(fn(exit,Fn_Exit),There) , 
    from_loc(Agent,Here) , 
    agent_thought_model(Agent,ModelData) , 
    { find_path(Doer,Here,There,Route,ModelData) } , 
    ! , 
    eVent( Agent, 
      follow_plan( Agent, 
        did(Agent,act3(go__loc,Agent,[walk,There])), 
        Route)))) */
%~ aXiom_p1(make_true(Doer,h(spatial,in,Agent,There)),A9,H9) :-
%~   Doer==Agent ,
%~   G9=A9 ,
%~   has_rel(fn(exit,Fn_Exit),There,G9,F9) ,
%~   from_loc(Agent,Here,F9,E9) ,
%~   agent_thought_model(Agent,ModelData,E9,D9) ,
%~   find_path(Doer,Here,There,Route,ModelData) ,
%~   C9=D9 ,
%~   ! ,
%~   B9=C9 ,
%~   eVent( Agent,
%~     follow_plan( Agent,
%~       did(Agent,act3(go__loc,Agent,[walk,There])),
%~       Route), B9,H9).
/* ==>>(aXiom_p1(make_true(Agent,FACT)),add_agent_goal(Agent,FACT)) */
%~ aXiom_p1(make_true(Agent,FACT),A9,B9) :-
%~ 
%~   add_agent_goal(Agent,FACT,A9,B9).
/* ==>>(aXiom_p1(add_intent(Agent,TODO)),add_agent_intent(Agent,TODO)) */
%~ aXiom_p1(add_intent(Agent,TODO),A9,B9) :-
%~ 
%~   add_agent_intent(Agent,TODO,A9,B9).
/* ( aXiom_p1( follow_plan(Agent,Name,[])) ==>> 
  !,send_1percept(Agent,[success(followed_plan(Agent,Name))])) */
%~ aXiom_p1(follow_plan(Agent,Name,[]),A9,B9) :-
%~   ! ,
%~   A9=A9 ,
%~   send_1percept( Agent,
%~     [ success( followed_plan(Agent,Name))], A9,B9).
/* ( aXiom_p1( follow_plan(Agent,Name,[Step])) ==>> 
  ( eVent(Agent,follow_step(Agent,Name,Step)) , 
    eVent(Agent,follow_plan(Agent,Name,CO_Route)))) */
%~ aXiom_p1(follow_plan(Agent,Name,[Step|Route]),A9,C9) :-
%~   eVent(Agent,follow_step(Agent,Name,Step),A9,B9) ,
%~   eVent(Agent,follow_plan(Agent,Name,Route),B9,C9).
/* ( aXiom_p1( follow_step(Agent,Name,Step)) ==>> 
  {dbug1(follow_step(Agent,Name,Step))},raise_aXiom_events(Step)) */
%~ aXiom_p1(follow_step(Agent,Name,Step),A9,C9) :-
%~   dbug1( follow_step(Agent,Name,Step)) ,
%~   B9=A9 ,
%~   raise_aXiom_events(Step,B9,C9).
/* ( axiom_Recalc_e(attempts(Agent,act3(take,Agent,[Thing])),RECALC) ==>> 
  ( ! , 
    RECALC =  
         
      attempts( Agent, 
        act3(put__via,Agent,[take,Thing,held_by,Agent])))) */
%~ /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_agi/prolog/episodic_memory/adv_axiom.pl:243 
%~ axiom_Recalc_e(
%~    attempts(Agent,act3(take,Agent,[Thing])), RECALC,A9,B9) :-
%~   ! ,
%~   A9=A9 ,
%~   =( RECALC,
%~     attempts( Agent,
%~       act3(put__via,Agent,[take,Thing,held_by,Agent])), A9,B9).
/* ( axiom_Recalc_e(attempts(Agent,act3(drop,Agent,[Thing])),RECALC) ==>> 
  ( !  ,
    dshow_failure( h(spatial,At,Agent,Here)) , 
    RECALC =  
         
      attempts( Agent, 
        act3(put__via,Agent,[drop,Thing,At,Here])))) */
%~ axiom_Recalc_e(
%~    attempts(Agent,act3(drop,Agent,[Thing])), RECALC,A9,C9) :-
%~   ! ,
%~   A9=A9 ,
%~   dshow_failure(h(spatial,At,Agent,Here),A9,B9) ,
%~   =( RECALC,
%~     attempts( Agent,
%~       act3(put__via,Agent,[drop,Thing,At,Here])), B9,C9).
/* ( axiom_Recalc_e( 
     attempts( Agent, 
       act3(put,Agent,[Thing1,PrepAt,Thing2])), 
     RECALC) ==>> 
  RECALC =  
       
    attempts( Agent, 
      act3(put__via,Agent,[put,Thing1,PrepAt,Thing2]))) */
%~ axiom_Recalc_e(
%~    attempts( Agent,
%~      act3(put,Agent,[Thing1,PrepAt,Thing2])), RECALC,A9,B9) :-
%~ 
%~   =( RECALC,
%~     attempts( Agent,
%~       act3(put__via,Agent,[put,Thing1,PrepAt,Thing2])), A9,B9).
/* ( axiom_Recalc_e( 
     attempts(Agent,act3(give,Agent,[Thing,Recipient])), 
     RECALC) ==>> 
  RECALC =  
       
    attempts( Agent, 
      act3(put__via,Agent,[give,Thing,held_by,Recipient]))) */
%~ axiom_Recalc_e(
%~    attempts(Agent,act3(give,Agent,[Thing,Recipient])), RECALC,A9,B9) :-
%~ 
%~   =( RECALC,
%~     attempts( Agent,
%~       act3(put__via,Agent,[give,Thing,held_by,Recipient])), A9,B9).
/* ( aXiom_p1( attempts( Agent, 
              act3( put__via, 
                Agent, 
                [How,Thing1,Prep,Thing2]))) ==>> 
  ( {fail}  ,
    ! , 
    dshow_failure( prep_to_rel(Thing2,Prep,At)) , 
    from_loc(Agent,Here) , 
    dshow_failure( has_rel(At,Thing2)) , 
    dshow_failure( will_need_touch(Agent,Thing2)) , 
    moveto( Agent, 
      How, Thing1,At,Thing2, 
      [Here], 
      [ cap( subj(Agent)), 
        person(How,es(How)), Thing1,At,Thing2, 
        '.']))) */
%~ aXiom_p1(
%~    attempts( Agent,
%~      act3( put__via,
%~        Agent,
%~        [How,Thing1,Prep,Thing2])), A9,H9) :-
%~   fail ,
%~   G9=A9 ,
%~   ! ,
%~   F9=G9 ,
%~   dshow_failure(prep_to_rel(Thing2,Prep,At),F9,E9) ,
%~   from_loc(Agent,Here,E9,D9) ,
%~   dshow_failure(has_rel(At,Thing2),D9,C9) ,
%~   dshow_failure(will_need_touch(Agent,Thing2),C9,B9) ,
%~   moveto( Agent,
%~     How, Thing1,At,Thing2,
%~     [Here],
%~     [ cap( subj(Agent)), person(How,es(How)),Thing1,
%~       At,Thing2,'.'], B9,H9).
/* ( axiom_Recalc_e( 
     attempts(Agent,act3(throw_dir,Agent,[Thing,ExitName])), 
     RECALC) ==>> 
  ( from_loc(Agent,Here) , 
    RECALC =  
         
      attempts( Agent, 
        act3(throw_prep_obj,Agent,[Thing,ExitName,Here])))) */
%~ axiom_Recalc_e(
%~    attempts(Agent,act3(throw_dir,Agent,[Thing,ExitName])), RECALC,A9,C9) :-
%~   from_loc(Agent,Here,A9,B9) ,
%~   =( RECALC,
%~     attempts( Agent,
%~       act3(throw_prep_obj,Agent,[Thing,ExitName,Here])), B9,C9).
/* ( axiom_Recalc_e( 
     attempts(Agent,act3(throw_at,Agent,[Thing,Target])), 
     RECALC) ==>> 
  RECALC =  
       
    attempts( Agent, 
      act3(throw_prep_obj,Agent,[Thing,at,Target]))) */
%~ axiom_Recalc_e(
%~    attempts(Agent,act3(throw_at,Agent,[Thing,Target])), RECALC,A9,B9) :-
%~ 
%~   =( RECALC,
%~     attempts( Agent,
%~       act3(throw_prep_obj,Agent,[Thing,at,Target])), A9,B9).
/* ( axiom_Recalc_e( 
     attempts( Agent, 
       act3(throw_prep_obj,Agent,[Thing,Prep,Target])), 
     RECALC) ==>> 
  ( prep_to_rel(Target,Prep,Rel) , 
    RECALC =  
         
      attempts( Agent, 
        act3(put,Agent,[throw,Thing,Rel,Target])))) */
%~ axiom_Recalc_e(
%~    attempts( Agent,
%~      act3(throw_prep_obj,Agent,[Thing,Prep,Target])), RECALC,A9,C9) :-
%~   prep_to_rel(Target,Prep,Rel,A9,B9) ,
%~   =( RECALC,
%~     attempts( Agent,
%~       act3(put,Agent,[throw,Thing,Rel,Target])), B9,C9).
/* ( axiom_Recalc_e( 
     attempts( Agent, 
       act3(throw,Agent,[Thing,Prep,Target])), 
     RECALC) ==>> 
  ( prep_to_rel(Target,Prep,Rel);Prep=Rel , 
    RECALC =  
         
      attempts( Agent, 
        act3(put,Agent,[throw,Thing,Rel,Target])))) */
%~ axiom_Recalc_e(
%~    attempts( Agent,
%~      act3(throw,Agent,[Thing,Prep,Target])), RECALC,A9,C9) :-
%~   ( prep_to_rel(Target,Prep,Rel,A9,B9) ;
%~     =(Prep,Rel,A9,B9)) ,
%~   =( RECALC,
%~     attempts( Agent,
%~       act3(put,Agent,[throw,Thing,Rel,Target])), B9,C9).
/* ( aXiom_p1( attempts( Agent, 
              act3(throw,Agent,[Thing,At,Target]))) ==>> 
  ( will_need_touch(Agent,Thing)  ,
    can_sense(Agent,see,Target) , 
    eVent( Agent, 
      act3(throw,Agent,[Thing,At,Target])))) */
%~ aXiom_p1(
%~    attempts( Agent,
%~      act3(throw,Agent,[Thing,At,Target])), A9,D9) :-
%~   will_need_touch(Agent,Thing,A9,C9) ,
%~   can_sense(Agent,see,Target,C9,B9) ,
%~   eVent( Agent,
%~     act3(throw,Agent,[Thing,At,Target]), B9,D9).
/* ( aXiom_p1( act3(throw,Agent,[Thing,AtTarget,Target])) ==>> 
  ( ignore( ( getprop(Thing,breaks_into(Broken))  ,
              dbug(general,'object ~p is breaks_into~n',[Thing]) , 
              eVent(Agent,thing_transforms(Thing,Broken)))) , 
    eVent( Agent, 
      disgorge( Agent, 
        do_throw, Target,AtTarget,Target, 
        [Target],'Something falls out.')))) */
%~ aXiom_p1(
%~    act3(throw,Agent,[Thing,AtTarget,Target]), A9,C9) :-
%~   ignore(
%~      ( getprop(Thing,breaks_into(Broken))  ,
%~        dbug(general,'object ~p is breaks_into~n',[Thing]) ,
%~        eVent(Agent,thing_transforms(Thing,Broken))), A9,B9) ,
%~   eVent( Agent,
%~     disgorge( Agent,
%~       do_throw, Target,AtTarget,Target,
%~       [Target],'Something falls out.'), B9,C9).
/* ( aXiom_p1( thing_transforms(Thing,Broken)) ==>> 
  ( undeclare( h(Spatial,At,Thing,Here))  ,
    declare( h(Spatial,At,Broken,Here)) , 
    queue_local_event([transformed(Thing,Broken)],Here))) */
%~ aXiom_p1(thing_transforms(Thing,Broken),A9,D9) :-
%~   undeclare(h(Spatial,At,Thing,Here),A9,C9) ,
%~   declare(h(Spatial,At,Broken,Here),C9,B9) ,
%~   queue_local_event([transformed(Thing,Broken)],Here,B9,D9).
/* ( aXiom_p1( attempts(Agent,act3(hit_with,Agent,[Thing,With]))) ==>> 
  ( from_loc(Agent,Here)  ,
    invoke_hit(Agent,Thing,With,[Here]) , 
    send_1percept(Agent,[true,'OK.']))) */
%~ aXiom_p1(
%~    attempts(Agent,act3(hit_with,Agent,[Thing,With])), A9,D9) :-
%~   from_loc(Agent,Here,A9,C9) ,
%~   invoke_hit(Agent,Thing,With,[Here],C9,B9) ,
%~   send_1percept(Agent,[true,'OK.'],B9,D9).
/* ( aXiom_p1( attempts(Agent,act3(hit,Agent,[Thing]))) ==>> 
  ( from_loc(Agent,Here)  ,
    invoke_hit(Agent,Thing,Agent,[Here]) , 
    send_1percept(Agent,[true,'OK.']))) */
%~ aXiom_p1(attempts(Agent,act3(hit,Agent,[Thing])),A9,D9) :-
%~   from_loc(Agent,Here,A9,C9) ,
%~   invoke_hit(Agent,Thing,Agent,[Here],C9,B9) ,
%~   send_1percept(Agent,[true,'OK.'],B9,D9).
/* ( invoke_hit(Doer,Target,_With,Vicinity) ==>> 
  ignore( ( getprop(Target,breaks_into(Broken))  ,
            dbug(general,'target ~p is breaks_into~n',[Target]) , 
            undeclare( h(Spatial,Prep,Target,Here)) , 
            queue_local_event([transformed(Target,Broken)],Vicinity) , 
            declare( h(Spatial,Prep,Broken,Here)) , 
            disgorge(Doer,hit,Target,Prep,Here,Vicinity,'Something falls out.')))) */
%~ invoke_hit(Doer,Target,_With,Vicinity,A9,B9) :-
%~ 
%~   ignore(
%~      ( getprop(Target,breaks_into(Broken))  ,
%~        dbug(general,'target ~p is breaks_into~n',[Target]) ,
%~        undeclare( h(Spatial,Prep,Target,Here)) ,
%~        queue_local_event([transformed(Target,Broken)],Vicinity) ,
%~        declare( h(Spatial,Prep,Broken,Here)) ,
%~        disgorge(Doer,hit,Target,Prep,Here,Vicinity,'Something falls out.')), A9,B9).
/* ( aXiom_p1( attempts( Agent, 
              act3(dig,Agent,[Hole,Where,Tool]))) ==>> 
  ( { memberchk(Hole,[hole,trench,pit,ditch]), 
      memberchk(Where,[garden]), 
      memberchk(Tool,[shovel,spade]) }  ,
    open_traverse(Tool,Agent) , 
    from_loc(Agent,Where) , 
    \+( h(spatial,_At,Hole,Where)) , 
    declare( h(spatial,in,Hole,Where)) , 
    setprop(Hole,default_rel=in) , 
    setprop(Hole,can_be(move,f)) , 
    setprop(Hole,can_be(take,f)) , 
    declare( h(spatial,in,dirt,Where)) , 
    queue_event( [ created(Hole,Where), 
                   [ cap( subj(Agent)), person(dig,digs),a,Hole,'in the', 
                     Where,'.']]))) */
%~ aXiom_p1(
%~    attempts( Agent,
%~      act3(dig,Agent,[Hole,Where,Tool])), A9,L9) :-
%~   memberchk(Hole,[hole,trench,pit,ditch]) ,
%~   memberchk(Where,[garden]) ,
%~   memberchk(Tool,[shovel,spade]) ,
%~   K9=A9 ,
%~   open_traverse(Tool,Agent,K9,J9) ,
%~   from_loc(Agent,Where,J9,I9) ,
%~   \+( h(spatial,_At,Hole,Where,I9,H9)) ,
%~   G9=I9 ,
%~   declare(h(spatial,in,Hole,Where),G9,F9) ,
%~   setprop(Hole,default_rel=in,F9,E9) ,
%~   setprop(Hole,can_be(move,f),E9,D9) ,
%~   setprop(Hole,can_be(take,f),D9,C9) ,
%~   declare(h(spatial,in,dirt,Where),C9,B9) ,
%~   queue_event(
%~      [ created(Hole,Where),
%~        [ cap( subj(Agent)), person(dig,digs),a,Hole,'in the',
%~          Where,'.']], B9,L9).
/* ( aXiom_p1( attempts(Agent,act3(eat,Agent,[Thing]))) ==>> 
  ( getprop(Thing,can_be(eat,t)) ->  
         
      ( undeclare( h(spatial,_1,Thing,_2)) , 
        send_1percept(Agent,[destroyed(Thing),'Mmmm, good!'])) ; 
    send_1percept( Agent, [
      [ failure( attempts(Agent,act3(eat,Agent,[Thing]))), 
        'It\'s inedible!'])])) */
%~ aXiom_p1(attempts(Agent,act3(eat,Agent,[Thing])),A9,D9) ->
%~ 
%~   ( getprop(Thing,can_be(eat,t),A9,C9) ->
%~       undeclare(h(spatial,_1,Thing,_2),C9,B9) ,
%~       send_1percept(Agent,[destroyed(Thing),'Mmmm, good!'],B9,D9) ;
%~     send_1percept( Agent,
%~       [ failure( attempts(Agent,act3(eat,Agent,[Thing]))),
%~         'It\'s inedible!'], A9,D9)).
/* ( aXiom_p1( attempts(Agent,act3(switch,Agent,[OnOff,Thing]))) ==>> 
  ( will_need_touch(Agent,Thing)  ,
    getprop(Thing,can_be(switch(OnOff),t)) , 
    getprop(Thing,effect(switch(OnOff),Term0)) , 
    { adv_subst(equivalent,$self,Thing,Term0,Term) } , 
    call(Term) , 
    send_1percept(Agent,[success(true,'OK')]))) */
%~ aXiom_p1(
%~    attempts(Agent,act3(switch,Agent,[OnOff,Thing])), A9,G9) :-
%~   will_need_touch(Agent,Thing,A9,F9) ,
%~   getprop(Thing,can_be(switch(OnOff),t),F9,E9) ,
%~   getprop(Thing,effect(switch(OnOff),Term0),E9,D9) ,
%~   adv_subst(equivalent,$self,Thing,Term0,Term) ,
%~   C9=D9 ,
%~   call(Term,C9,B9) ,
%~   send_1percept(Agent,[success(true,'OK')],B9,G9).
/* ( axiom_Recalc_e(attempts(Agent,act3(inventory,Who,[])),RECALC) ==>> 
  RECALC =  
       
    attempts(Agent,act3(examine,Agent,[Who]))) */
%~ axiom_Recalc_e(attempts(Agent,act3(inventory,Who,[])),RECALC,A9,B9) :-
%~ 
%~   =( RECALC,
%~     attempts(Agent,act3(examine,Agent,[Who])), A9,B9).
/* ( axiom_Recalc_e(attempts(Agent,act3(look,Agent,[])),RECALC) ==>> 
  ( h(spatial,At,Agent,Here) , 
    RECALC =  
         
      attempts( Agent, 
        act3(examine__D3,Agent,[see,At,Here])))) */
%~ axiom_Recalc_e(attempts(Agent,act3(look,Agent,[])),RECALC,A9,C9) :-
%~   h(spatial,At,Agent,Here,A9,B9) ,
%~   =( RECALC,
%~     attempts(Agent,act3(examine__D3,Agent,[see,At,Here])), B9,C9).
/* ( axiom_Recalc_e(attempts(Agent,act3(examine,Agent,[Sense])),RECALC) ==>> 
  ( { is_sense(Sense) }  ,
    ! , 
    from_loc(Agent,Place) , 
    RECALC =  
         
      attempts(Agent,act3(examine__D3,Agent,[see,in,Place])))) */
%~ axiom_Recalc_e(
%~    attempts(Agent,act3(examine,Agent,[Sense])), RECALC,A9,E9) :-
%~   is_sense(Sense) ,
%~   D9=A9 ,
%~   ! ,
%~   C9=D9 ,
%~   from_loc(Agent,Place,C9,B9) ,
%~   =( RECALC,
%~     attempts(Agent,act3(examine__D3,Agent,[see,in,Place])), B9,E9).
/* ( axiom_Recalc_e(attempts(Agent,act3(examine,Agent,[Object])),RECALC) ==>> 
  RECALC =  
       
    attempts(Agent,act3(examine__D3,Agent,[see,at,Object]))) */
%~ axiom_Recalc_e(
%~    attempts(Agent,act3(examine,Agent,[Object])), RECALC,A9,B9) :-
%~ 
%~   =( RECALC,
%~     attempts(Agent,act3(examine__D3,Agent,[see,at,Object])), A9,B9).
/* ( axiom_Recalc_e( 
     attempts(Agent,act3(examine,Agent,[Sense,Object])), 
     RECALC) ==>> 
  ( RECALC =  
         
      attempts( Agent, 
        act3(examine__D3,Agent,[Sense,at,Object])) , 
    !)) */
%~ /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_agi/prolog/episodic_memory/adv_axiom.pl:374 
%~ axiom_Recalc_e(
%~    attempts(Agent,act3(examine,Agent,[Sense,Object])), RECALC,A9,C9) :-
%~   =( RECALC,
%~     attempts(Agent,act3(examine__D3,Agent,[Sense,at,Object])), A9,B9) ,
%~   ! ,
%~   C9=B9.
/* ( axiom_Recalc_e( 
     attempts( Agent, 
       act3(examine,Agent,[Sense,Prep,Object])), 
     RECALC) ==>> 
  ( RECALC =  
         
      attempts( Agent, 
        act3(examine__D3,Agent,[Sense,Prep,Object])) , 
    !)) */
%~ axiom_Recalc_e(
%~    attempts( Agent,
%~      act3(examine,Agent,[Sense,Prep,Object])), RECALC,A9,C9) :-
%~   =( RECALC,
%~     attempts( Agent,
%~       act3(examine__D3,Agent,[Sense,Prep,Object])), A9,B9) ,
%~   ! ,
%~   C9=B9.
/* ( axiom_Recalc_e( 
     attempts( Agent, 
       act3( examine, 
         Agent, 
         [Sense,Prep,Object,Depth])), 
     RECALC) ==>> 
  ( RECALC =  
         
      attempts( Agent, 
        act3( examine__D3, 
          Agent, 
          [Sense,Prep,Object,Depth])) , 
    !)) */
%~ /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_agi/prolog/episodic_memory/adv_axiom.pl:377 
%~ axiom_Recalc_e(
%~    attempts( Agent,
%~      act3( examine,
%~        Agent,
%~        [Sense,Prep,Object,Depth])), RECALC,A9,C9) :-
%~   =( RECALC,
%~     attempts( Agent,
%~       act3( examine__D3,
%~         Agent,
%~         [Sense,Prep,Object,Depth])), A9,B9) ,
%~   ! ,
%~   C9=B9.
/* ( axiom_Recalc_e( 
     attempts( Agent, 
       act3(examine__D3,Agent,[Sense,Prep,Object])), 
     RECALC) ==>> 
  ( RECALC =  
         
      attempts( Agent, 
        act3(examine__D5,Agent,[Sense,Prep,Object,3])) , 
    !)) */
%~ axiom_Recalc_e(
%~    attempts( Agent,
%~      act3(examine__D3,Agent,[Sense,Prep,Object])), RECALC,A9,C9) :-
%~   =( RECALC,
%~     attempts( Agent,
%~       act3(examine__D5,Agent,[Sense,Prep,Object,3])), A9,B9) ,
%~   ! ,
%~   C9=B9.
/* ( axiom_Recalc_e( 
     attempts( Agent, 
       act3( examine__D3, 
         Agent, 
         [Sense,Prep,Object,Depth])), 
     RECALC) ==>> 
  ( RECALC =  
         
      attempts( Agent, 
        act3( examine__D5, 
          Agent, 
          [Sense,Prep,Object,Depth])) , 
    !)) */
%~ axiom_Recalc_e(
%~    attempts( Agent,
%~      act3( examine__D3,
%~        Agent,
%~        [Sense,Prep,Object,Depth])), RECALC,A9,C9) :-
%~   =( RECALC,
%~     attempts( Agent,
%~       act3( examine__D5,
%~         Agent,
%~         [Sense,Prep,Object,Depth])), A9,B9) ,
%~   ! ,
%~   C9=B9.
/* ( aXiom_p1( attempts( Agent, 
              act3( examine__D5, 
                Agent, 
                [Sense,Prep,Object,Depth]))) ==>> 
  ( \+( sg( can_sense_here(Agent,Sense)))  ,
    ! , 
    raise_aXiom_events( failed( 
                           did( Agent, 
                             act3( examine, 
                               Agent, 
                               [Sense,Prep,Object,Depth])), 
                           \+( can_sense_here(Agent,Sense)))))) */
%~ aXiom_p1(
%~    attempts( Agent,
%~      act3( examine__D5,
%~        Agent,
%~        [Sense,Prep,Object,Depth])), A9,E9) :-
%~   \+( sg(can_sense_here(Agent,Sense),A9,D9)) ,
%~   C9=A9 ,
%~   ! ,
%~   B9=C9 ,
%~   raise_aXiom_events(
%~      failed(
%~         did( Agent,
%~           act3( examine,
%~             Agent,
%~             [Sense,Prep,Object,Depth])),
%~         \+( can_sense_here(Agent,Sense))), B9,E9).
/* ( aXiom_p1( attempts( Agent, 
              act3( examine__D5, 
                Agent, 
                [Sense,Prep,Object,Depth]))) ==>> 
  ( \+( sg( can_sense(Agent,Sense,Object)))  ,
    ! , 
    raise_aXiom_events( failed( 
                           did( Agent, 
                             act3( examine, 
                               Agent, 
                               [Sense,Prep,Object,Depth])), 
                           \+( can_sense(Agent,Sense,Object)))))) */
%~ aXiom_p1(
%~    attempts( Agent,
%~      act3( examine__D5,
%~        Agent,
%~        [Sense,Prep,Object,Depth])), A9,E9) :-
%~   \+( sg(can_sense(Agent,Sense,Object),A9,D9)) ,
%~   C9=A9 ,
%~   ! ,
%~   B9=C9 ,
%~   raise_aXiom_events(
%~      failed(
%~         did( Agent,
%~           act3( examine,
%~             Agent,
%~             [Sense,Prep,Object,Depth])),
%~         \+( can_sense(Agent,Sense,Object))), B9,E9).
/* ( aXiom_p1( attempts( Agent, 
              act3( examine__D5, 
                Agent, 
                [Sense,Prep,Object,Depth]))) ==>> 
  act_examine(Agent,Sense,Prep,Object,Depth),!) */
%~ aXiom_p1(
%~    attempts( Agent,
%~      act3( examine__D5,
%~        Agent,
%~        [Sense,Prep,Object,Depth])), A9,C9) :-
%~   must_mw1(
%~      act_examine(Agent,Sense,Prep,Object,Depth), A9,B9) ,
%~   ! ,
%~   C9=B9.
/* ( aXiom_p1( attempts(Agent,act3(touch,Agent,[Thing]))) ==>> 
  ( ! , 
    unless_reason( Agent, 
      will_need_touch(Agent,Thing), 
      cant( reach(Agent,Thing)), 
      send_1percept(Agent,[success(act3(touch,Agent,[Thing]),'Ok.')])))) */
%~ aXiom_p1(attempts(Agent,act3(touch,Agent,[Thing])),A9,B9) :-
%~   ! ,
%~   A9=A9 ,
%~   unless_reason( Agent,
%~     will_need_touch(Agent,Thing),
%~     cant( reach(Agent,Thing)),
%~     send_1percept(Agent,[success(act3(touch,Agent,[Thing]),'Ok.')]), A9,B9).
/* ( aXiom_p1( change_state(Agent,Action,Thing,Prop)) ==>> 
  !,change_state(Agent,Action,Thing,Prop)) */
%~ aXiom_p1(change_state(Agent,Action,Thing,Prop),A9,B9) :-
%~   ! ,
%~   A9=A9 ,
%~   change_state(Agent,Action,Thing,Prop,A9,B9).
/* ( aXiom_p1(Action,S0,S9) ::= 
  ( action_verb_agent_thing(Action,Verb,Agent,Thing)  ,
    nonvar(Verb) , 
    nonvar(Thing) , 
    nonvar(Agent) , 
    act_change_state_or_fallback(Verb,State,TF) , 
    ! , 
    eVent( Agent, 
      change_state(Agent,Action,Thing,State=TF), S0,S9) , 
    !)) */
%~ aXiom_p1(Action,S0,S9) :-
%~   action_verb_agent_thing(Action,Verb,Agent,Thing) ,
%~   nonvar(Verb) ,
%~   nonvar(Thing) ,
%~   nonvar(Agent) ,
%~   act_change_state_or_fallback(Verb,State,TF) ,
%~   ! ,
%~   eVent( Agent,
%~     change_state(Agent,Action,Thing,State=TF), S0,S9) ,
%~   !.
/* ( invoke_command(Requester,attempts(Agent,Action)) ==>> 
  ( { Requester==Agent }  ,
    invoke_command(Agent,Action) , 
    !)) */
%~ invoke_command(Requester,attempts(Agent,Action),A9,D9) :-
%~   Requester==Agent ,
%~   C9=A9 ,
%~   invoke_command(Agent,Action,C9,B9) ,
%~   ! ,
%~   D9=B9.
/* ( invoke_command(Agent,Action) ==>> 
  ( invoke_metacmd(Agent,Action)  ,
    { overwrote_prompt(Agent) } , 
    !)) */
%~ invoke_command(Agent,Action,A9,D9) :-
%~   invoke_metacmd(Agent,Action,A9,C9) ,
%~   overwrote_prompt(Agent) ,
%~   B9=C9 ,
%~   ! ,
%~   D9=B9.
/* ( invoke_command(Agent,Action) ==>> 
  ( { set_last_action(Agent,Action) }  ,
    agent_try_action(Agent,Action) , 
    !)) */
%~ invoke_command(Agent,Action,A9,D9) :-
%~   set_last_action(Agent,Action) ,
%~   C9=A9 ,
%~   agent_try_action(Agent,Action,C9,B9) ,
%~   ! ,
%~   D9=B9.
/* ( invoke_intents(Agent) ==>> 
  ( sg( declared( memories(Agent,Mem0)))  ,
    { member(intent(Agent,[]),Mem0) } , 
    !)) */
%~ invoke_intents(Agent,A9,D9) :-
%~   sg(declared(memories(Agent,Mem0)),A9,C9) ,
%~   member(intent(Agent,[]),Mem0) ,
%~   B9=C9 ,
%~   ! ,
%~   D9=B9.
/* ==>>(satisfy_each_cond(Ctxt,[],success(Ctxt)),!) */
%~ satisfy_each_cond(Ctxt,[],success(Ctxt),A9,B9) :-
%~   ! ,
%~   B9=A9.
/* ( satisfy_each_cond(Context,[Cond],Out) ==>> 
  ( satisfy_each(Context,Cond)  ,
    ! , 
    ( sg( member( failed(Why))) ->  
           
        Out =  
             
          failed(Why) ; 
      satisfy_each_cond(Context,CondList,Out)) , 
    !)) */
%~ satisfy_each_cond(Context,[Cond|CondList],Out,A9,F9) ->
%~   dmust_tracing(satisfy_each(Context,Cond),A9,E9) ,
%~   ! ,
%~   D9=E9 ,
%~   ( sg(member(failed(Why)),D9,C9) ->
%~ 
%~       =(Out,failed(Why),C9,B9) ;
%~     satisfy_each_cond(Context,CondList,Out,D9,B9)) ,
%~   ! ,
%~   F9=B9.
/* ==>>(satisfy_each2(Ctx,Cond),satisfy_each1(Ctx,Cond)) */
%~ satisfy_each2(Ctx,Cond,A9,B9) :-
%~ 
%~   satisfy_each1(Ctx,Cond,A9,B9).
/* ==>>(satisfy_each2(Cond3,Cond),[failed(Cond)]) */
%~ satisfy_each2( Cond2,
%~   Cond,
%~   [ failed(Cond) |
%~     Each2_Failed],
%~   Each2_Failed) :-
%~ 
%~   true.
/* ( satisfy_each1(_Context,h(spatial,P,_X,_Y)) ==>> 
  {P==takeable},!) */
%~ satisfy_each1(_Context,h(spatial,P,_X,_Y),A9,C9) :-
%~   P==takeable ,
%~   B9=A9 ,
%~   ! ,
%~   C9=B9.
/* ( satisfy_each1(Context,List) ==>> 
  ( { is_list(List) }  ,
    ! , 
    satisfy_each_cond(Context,List,Out) , 
    ! , 
    { Out\=failed(Failed) })) */
%~ satisfy_each1(Context,List,A9,F9) :-
%~   is_list(List) ,
%~   E9=A9 ,
%~   ! ,
%~   D9=E9 ,
%~   satisfy_each_cond(Context,List,Out,D9,C9) ,
%~   ! ,
%~   B9=C9 ,
%~   Out\=failed(Failed) ,
%~   F9=B9.
/* ==>>(satisfy_each1(_Ctx,A\=B),({dif(A,B)},!)) */
%~ satisfy_each1(_Ctx,A\=B,A9,C9) :-
%~   dif(A,B) ,
%~   B9=A9 ,
%~   ! ,
%~   C9=B9.
/* ==>>(satisfy_each1(_Ctxt,exists(Ex)),(!,{ground(Ex)})) */
%~ satisfy_each1(_Ctxt,exists(Ex),A9,B9) :-
%~   ! ,
%~   A9=A9 ,
%~   ground(Ex) ,
%~   B9=A9.
/* ( satisfy_each1(Context,believe(Beliver,Cond)) ==>> 
  ( pre_redeclare( memories(Beliver,Memory))  ,
    { satisfy_each_always(Context,Cond,Memory,NewMemory) } , 
    ! , 
    redeclare( memories(Beliver,NewMemory)))) */
%~ satisfy_each1(Context,believe(Beliver,Cond),A9,E9) :-
%~   pre_redeclare(memories(Beliver,Memory),A9,D9) ,
%~   satisfy_each_always(Context,Cond,Memory,NewMemory) ,
%~   C9=D9 ,
%~   ! ,
%~   B9=C9 ,
%~   redeclare(memories(Beliver,NewMemory),B9,E9).
/* ( satisfy_each1(Context,believe(_Beliver,Cond)) ==>> 
  ( !  ,
    satisfy_each(Context,Cond) , 
    !)) */
%~ /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_agi/prolog/episodic_memory/adv_action.pl:291 
%~ satisfy_each1(Context,believe(_Beliver,Cond),A9,C9) :-
%~   ! ,
%~   A9=A9 ,
%~   satisfy_each(Context,Cond,A9,B9) ,
%~   ! ,
%~   C9=B9.
/* ==>>(satisfy_each1(postCond(_Action),~Cond),(!,undeclare_always(Cond))) */
%~ satisfy_each1(postCond(_Action),~Cond,A9,B9) :-
%~   ! ,
%~   A9=A9 ,
%~   undeclare_always(Cond,A9,B9).
/* ( satisfy_each1(Ctx_Percept_local,percept_local(Where,Event)) ==>> 
  !,queue_local_event([Event],[Where])) */
%~ satisfy_each1(Percept_local,percept_local(Where,Event),A9,B9) :-
%~   ! ,
%~   A9=A9 ,
%~   queue_local_event([Event],[Where],A9,B9).
/* ( satisfy_each1(Ctx_Percept,percept(Agent,Event)) ==>> 
  !,send_1percept(Agent,Event)) */
%~ satisfy_each1(Percept,percept(Agent,Event),A9,B9) :-
%~   ! ,
%~   A9=A9 ,
%~   send_1percept(Agent,Event,A9,B9).
/* ( satisfy_each1(Context,~Cond) ==>> 
  !,(\+satisfy_each1(Context,Cond);[failed(Cond)])) */
%~ satisfy_each1(Context,~Cond,A9,C9) :-
%~   ! ,
%~   A9=A9 ,
%~   ( \+satisfy_each1(Context,Cond,A9,B9),C9=A9 ;
%~     A9 =
%~ 
%~       [ failed(Cond) |
%~         C9]).
/* ( satisfy_each1(Ctx_Call,call(Cond)) ==>> 
  declared(Cond)*->true;apply_aXioms(Cond)) */
%~ /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_agi/prolog/episodic_memory/adv_action.pl:308 
%~ satisfy_each1(Call,call(Cond),A9,C9) :-
%~ 
%~   ( declared(Cond,A9,B9)*->true(B9,C9) ;
%~     apply_aXioms(Cond,A9,C9)).
/* ==>>(satisfy_each1(Ctx_Cond1,Cond),(declared(Cond),!)) */
%~ /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_agi/prolog/episodic_memory/adv_action.pl:309 
%~ satisfy_each1(Cond1,Cond,A9,C9) :-
%~   declared(Cond,A9,B9) ,
%~   ! ,
%~   C9=B9.
/* ( satisfy_each1(postCond(_Action),Cond) ==>> 
  ( { old_figment(Cond,_F,_A,Old) }  ,
    undeclare_always(Old) , 
    ! , 
    declare(Cond))) */
%~ satisfy_each1(postCond(_Action),Cond,A9,D9) :-
%~   must(
%~      {old_figment(Cond,_F,_A,Old)},undeclare_always(Old), A9,C9) ,
%~   ! ,
%~   B9=C9 ,
%~   declare(Cond,B9,D9).
/* ==>>(api_invoke(Action),apply_aXioms(Action)) */
%~ api_invoke(Action,A9,B9) :-
%~ 
%~   apply_aXioms(Action,A9,B9).
/* ==>>(apply_aXioms(Action),(aXiom(Action),!)) */
%~ apply_aXioms(Action,A9,C9) :-
%~   aXiom(Action,A9,B9) ,
%~   ! ,
%~   C9=B9.
/* ( raise_aXiom_events(Action) ==>> 
  ( action_doer(Action,Agent) , 
    send_1percept(Agent,[failure(Action,unknown_to(Agent,Action))]))) */
%~ raise_aXiom_events(Action,A9,C9) :-
%~   action_doer(Action,Agent,A9,B9) ,
%~   send_1percept( Agent,
%~     [ failure(Action,unknown_to(Agent,Action))], B9,C9).
/* ==>>(unless_reason(_Agent,Then,_Msg),(Then,!)) */
%~ /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_agi/prolog/episodic_memory/adv_action.pl:421 
%~ unless_reason(_Agent,Then,_Msg,A9,C9) :-
%~   phrase(Then,A9,B9) ,
%~   ! ,
%~   C9=B9.
/* ( unless_reason(Agent,_Then,Msg) ==>> 
  ( { event_failed(Agent,Msg) }  ,
    ! , 
    {fail})) */
%~ unless_reason(Agent,_Then,Msg,A9,D9) :-
%~   event_failed(Agent,Msg) ,
%~   C9=A9 ,
%~   ! ,
%~   B9=C9 ,
%~   fail ,
%~   D9=B9.
/* ( unless_reason(_Agent,Unless,_Msg,Then) ==>> 
  ( Unless  ,
    ! , 
    Then)) */
%~ unless_reason(_Agent,Unless,_Msg,Then,A9,D9) :-
%~   phrase(Unless,A9,C9) ,
%~   ! ,
%~   B9=C9 ,
%~   phrase(Then,B9,D9).
/* ( unless_reason(Agent,_Unless,Msg,_Then) ==>> 
  {event_failed(Agent,Msg)},!) */
%~ unless_reason(Agent,_Unless,Msg,_Then,A9,C9) :-
%~   event_failed(Agent,Msg) ,
%~   B9=A9 ,
%~   ! ,
%~   C9=B9.
/* ==>>(unless(_Agent,Required,Then),(Required,!,Then)) */
%~ /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_agi/prolog/episodic_memory/adv_action.pl:429 
%~ unless(_Agent,Required,Then,A9,D9) :-
%~   phrase(Required,A9,C9) ,
%~   ! ,
%~   B9=C9 ,
%~   phrase(Then,B9,D9).
/* ( unless(Agent,Required,_Then) ==>> 
  ( { simplify_reason(Required,CUZ), 
      event_failed(Agent,cant(cuz(\+CUZ))) } , 
    !)) */
%~ unless(Agent,Required,_Then,A9,C9) :-
%~   simplify_reason(Required,CUZ) ,
%~   event_failed(Agent,cant(cuz(\+CUZ))) ,
%~   B9=A9 ,
%~   ! ,
%~   C9=B9.
/* ( add_intent_look(Agent) ==>> 
  ( h(spatial,inside,Agent,_Somewhere) , 
    add_agent_intent(Agent,attempts(Agent,act3(look,Agent,[]))))) */
%~ add_intent_look(Agent,A9,C9) :-
%~   h(spatial,inside,Agent,_Somewhere,A9,B9) ,
%~   add_agent_intent(Agent,attempts(Agent,act3(look,Agent,[])),B9,C9).
/* ( disgorge( Doer, 
    Verb, Container,Prep,Here, 
    Vicinity,Msg) ==>> 
  ( verb_domain(Verb,Spatially)  ,
    findall(Inner,h(Spatially,child,Inner,Container),Contents) , 
    { dbug(general,'~p childs: ~p~n',[Container,Contents]) } , 
    moveto( Doer, 
      Verb, Contents,Prep,Here, 
      Vicinity,Msg))) */
%~ disgorge( Doer,
%~   Verb, Container,Prep,Here,
%~   Vicinity,Msg,A9,
%~   E9) :-
%~   verb_domain(Verb,Spatially,A9,D9) ,
%~   findall( Inner,
%~     h(Spatially,child,Inner,Container), Contents,D9,C9) ,
%~   dbug(general,'~p childs: ~p~n',[Container,Contents]) ,
%~   B9=C9 ,
%~   moveto( Doer,
%~     Verb, Contents,Prep,Here,
%~     Vicinity,Msg,B9,
%~     E9).
/* ( moveto(Doer,Verb,List,At,Dest,Vicinity,Msg) ==>> 
  ( { is_list(List) }  ,
    ! , 
    apply_mapl_rest_state( moveto(Doer,Verb), 
      List, 
      [At,Dest,Vicinity,Msg]))) */
%~ moveto( Doer,
%~   Verb, List,At,Dest,
%~   Vicinity,Msg,A9,
%~   D9) :-
%~   is_list(List) ,
%~   C9=A9 ,
%~   ! ,
%~   B9=C9 ,
%~   apply_mapl_rest_state( moveto(Doer,Verb),
%~     List,
%~     [At,Dest,Vicinity,Msg], B9,D9).
/* ( moveto(Doer,Verb,Object,At,Dest,Vicinity,Msg) ==>> 
  ( undeclare( h(spatial,Prep_Spatial,Object,From))  ,
    declare( h(spatial,At,Object,Dest)) , 
    queue_local_event( 
       [ act3( move, 
           Doer, 
           [ Verb, Object,From,At, 
             Dest]), 
         Msg], 
       Vicinity))) */
%~ moveto( Doer,
%~   Verb, Object,At,Dest,
%~   Vicinity,Msg,A9,
%~   D9) :-
%~   undeclare(h(spatial,Prep_Spatial,Object,From),A9,C9) ,
%~   declare(h(spatial,At,Object,Dest),C9,B9) ,
%~   queue_local_event(
%~      [ act3( move,
%~          Doer,
%~          [ Verb, Object,From,At,
%~            Dest]),
%~        Msg], Vicinity,B9,D9).
/* ( setloc_silent(Prep,Object,Dest) ==>> 
  ( undeclare( h(spatial,Prep_Spatial,Object,Target_Object4)) , 
    declare( h(spatial,Prep,Object,Dest)))) */
%~ /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_agi/prolog/episodic_memory/adv_action.pl:579 
%~ setloc_silent(Prep,Object,Dest,A9,C9) :-
%~   undeclare(h(spatial,Prep_Spatial,Object,Target_Object4),A9,B9) ,
%~   declare(h(spatial,Prep,Object,Dest),B9,C9).
ORDERING TEST:
 unordered was [before(start,completeFn(CompleteFn)),before(start,x),before(start,y),before(y,completeFn(CompleteFn)),before(x,z),before(z,completeFn(CompleteFn))]
 ordering is [before(z,completeFn(CompleteFn)),before(x,completeFn(CompleteFn)),before(x,z),before(start,z),before(y,completeFn(CompleteFn)),before(start,y),before(start,x),before(start,completeFn(CompleteFn))]
 picked [start,x,y,z,completeFn(CompleteFn3)]
 END ORDERING TEST
=============================================
RESET STATE
%~ create_1obj(se_subregion,i1)
%~ create_1obj(ttt_table,i1)
%~ create_1obj(ss_subregion,i1)
%~ create_1obj(ttt_table,i1)
%~ create_1obj(sw_subregion,i1)
%~ create_1obj(ttt_table,i1)
%~ create_1obj(ee_subregion,i1)
%~ create_1obj(ttt_table,i1)
%~ create_1obj(cc_subregion,i1)
%~ create_1obj(ttt_table,i1)
%~ create_1obj(ww_subregion,i1)
%~ create_1obj(ttt_table,i1)
%~ create_1obj(ne_subregion,i1)
%~ create_1obj(ttt_table,i1)
%~ create_1obj(nn_subregion,i1)
%~ create_1obj(ttt_table,i1)
%~ create_1obj(nw_subregion,i1)
%~ create_1obj(ttt_table,i1)
%~ /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_agi/t/agi_tests/adv_story/adv_test_01.pl:34 
%~ create_1obj(x(red_pebble,5),i1)
%~ create_1obj(player,i1)
%~ create_1obj(x(red_pebble,4),i1)
%~ create_1obj(player,i1)
%~ create_1obj(x(red_pebble,3),i1)
%~ create_1obj(player,i1)
%~ create_1obj(x(red_pebble,2),i1)
%~ create_1obj(player,i1)
%~ create_1obj(x(red_pebble,1),i1)
%~ create_1obj(player,i1)
%~ create_1obj(x(blue_pebble,5),i1)
%~ create_1obj(floyd,i1)
%~ create_1obj(x(blue_pebble,4),i1)
%~ create_1obj(floyd,i1)
%~ create_1obj(x(blue_pebble,3),i1)
%~ create_1obj(floyd,i1)
%~ create_1obj(x(blue_pebble,2),i1)
%~ create_1obj(floyd,i1)
%~ create_1obj(x(blue_pebble,1),i1)
%~ create_1obj(floyd,i1)
%~ create_1obj(ttt_table,i1)
%~ create_1obj(kitchen,i1)
%~ create_1obj(brklamp,i1)
%~ create_1obj(garden,i1)
%~ create_1obj(screendoor,i1)
%~ create_1obj(garden,i1)
%~ create_1obj(apple,i1)
%~ create_1obj(crate,i1)
%~ create_1obj(crate,i1)
%~ create_1obj(kitchen,i1)
%~ create_1obj(screendoor,i1)
%~ create_1obj(kitchen,i1)
%~ create_1obj(fireplace,i1)
%~ create_1obj(living_room,i1)
%~ create_1obj(videocamera,i1)
%~ create_1obj(living_room,i1)
%~ create_1obj(shovel,i1)
%~ create_1obj(basement,i1)
%~ create_1obj(mushroom,i1)
%~ create_1obj(garden,i1)
%~ create_1obj(water,i1)
%~ create_1obj(fountain,i1)
%~ create_1obj(fountain,i1)
%~ create_1obj(garden,i1)
%~ create_1obj(x(rock,2),i1)
%~ create_1obj(garden,i1)
%~ create_1obj(rock,i1)
%~ create_1obj(garden,i1)
%~ create_1obj(locker,i1)
%~ create_1obj(pantry,i1)
%~ create_1obj(shelf,i1)
%~ create_1obj(pantry,i1)
%~ create_1obj(living_room,i1)
%~ create_1obj(dining_room,i1)
%~ create_1obj(dining_room,i1)
%~ create_1obj(living_room,i1)
%~ create_1obj(dining_room,i1)
%~ create_1obj(kitchen,i1)
%~ create_1obj(kitchen,i1)
%~ create_1obj(dining_room,i1)
%~ create_1obj(garden,i1)
%~ create_1obj(kitchen,i1)
%~ create_1obj(kitchen,i1)
%~ create_1obj(garden,i1)
%~ create_1obj(basement,i1)
%~ create_1obj(pantry,i1)
%~ create_1obj(pantry,i1)
%~ create_1obj(basement,i1)
%~ create_1obj(pantry,i1)
%~ create_1obj(kitchen,i1)
%~ create_1obj(kitchen,i1)
%~ create_1obj(pantry,i1)
%~ create_1obj(wrench,i1)
%~ create_1obj(floyd,i1)
%~ create_1obj(coins,i1)
%~ create_1obj(bag,i1)
%~ create_1obj(bag,i1)
%~ create_1obj(player,i1)
%~ create_1obj(watch,i1)
%~ create_1obj(player,i1)
%~ create_1obj(player,i1)
%~ create_1obj(kitchen,i1)
%~ create_1obj(floyd,i1)
%~ create_1obj(pantry,i1)
%~ create_1obj(cup,i1)
%~ create_1obj(cabinate,i1)
%~ create_1obj(cabinate,i1)
%~ create_1obj(kitchen,i1)
%~ create_1obj(plate,i1)
%~ create_1obj(sink,i1)
%~ create_1obj(sink,i1)
%~ create_1obj(kitchen,i1)
%~ create_1obj(lamp,i1)
%~ create_1obj(table,i1)
%~ create_1obj(table,i1)
%~ create_1obj(kitchen,i1)
%~ create_1obj(flour,i1)
%~ create_1obj(bowl,i1)
%~ create_1obj(bowl,i1)
%~ create_1obj(box,i1)
%~ create_1obj(box,i1)
%~ create_1obj(table,i1)
%~ create_1obj(table,i1)
%~ create_1obj(table_leg,i1)
/* oldObjectList=[] */
/* newObjectList = [ x(table_leg,i1), x(table,i1),x(box,i1),x(bowl,i1), 
                  x(flour,i1),x(kitchen,i1),x(lamp,i1), 
                  x(sink,i1),x(plate,i1),x(cabinate,i1), 
                  x(cup,i1),x(pantry,i1),x(floyd,i1), 
                  x(player,i1),x(watch,i1),x(bag,i1), 
                  x(coins,i1),x(wrench,i1), 
                  x(basement,i1),x(garden,i1), 
                  x(dining_room,i1),x(living_room,i1), 
                  x(shelf,i1),x(locker,i1),x(rock,i1), 
                  x(fountain,i1),x(water,i1), 
                  x(mushroom,i1),x(shovel,i1), 
                  x(videocamera,i1),x(fireplace,i1), 
                  x(screendoor,i1),x(crate,i1), 
                  x(apple,i1),x(brklamp,i1), 
                  x(ttt_table,i1),x(nw_subregion,i1), 
                  x(nn_subregion,i1),x(ne_subregion,i1), 
                  x(ww_subregion,i1),x(cc_subregion,i1), 
                  x(ee_subregion,i1),x(sw_subregion,i1), 
                  x(ss_subregion,i1),x(se_subregion,i1)] */
/* mu_create_object( x(table_leg,i1), [
  [ shape=table_leg, traits([table_leg]),inherit(table_leg,t), 
    sp(nouns,[table_leg])])] */
/* mu_create_object( x(table,i1), [
  [ shape=(table), traits([table]),inherit(table,t), 
    sp(nouns,[table])])] */
/* mu_create_object( x(box,i1), [
  [ shape=box, traits([box]),inherit(box,t), 
    sp(nouns,[box])])] */
/* mu_create_object( x(bowl,i1), [
  [ shape=bowl, traits([bowl]),inherit(bowl,t), 
    sp(nouns,[bowl])])] */
/* mu_create_object( x(flour,i1), [
  [ shape=flour, traits([flour]),inherit(flour,t), 
    sp(nouns,[flour])])] */
/* mu_create_object( x(kitchen,i1), [
  [ shape=kitchen, traits([kitchen]),inherit(kitchen,t), 
    sp(nouns,[kitchen])])] */
/* mu_create_object( x(lamp,i1), [
  [ shape=lamp, traits([lamp]),inherit(lamp,t), 
    sp(nouns,[lamp])])] */
/* mu_create_object( x(sink,i1), [
  [ shape=sink, traits([sink]),inherit(sink,t), 
    sp(nouns,[sink])])] */
/* mu_create_object( x(plate,i1), [
  [ shape=plate, traits([plate]),inherit(plate,t), 
    sp(nouns,[plate])])] */
/* mu_create_object( x(cabinate,i1), [
  [ shape=cabinate, traits([cabinate]),inherit(cabinate,t), 
    sp(nouns,[cabinate])])] */
/* mu_create_object( x(cup,i1), [
  [ shape=cup, traits([cup]),inherit(cup,t), 
    sp(nouns,[cup])])] */
/* mu_create_object( x(pantry,i1), [
  [ shape=pantry, traits([pantry]),inherit(pantry,t), 
    sp(nouns,[pantry])])] */
/* mu_create_object( x(floyd,i1), [
  [ shape=floyd, traits([floyd]),inherit(floyd,t), 
    sp(nouns,[floyd])])] */
/* mu_create_object( x(player,i1), [
  [ shape=player, traits([player]),inherit(player,t), 
    sp(nouns,[player])])] */
/* mu_create_object( x(watch,i1), [
  [ shape=watch, traits([watch]),inherit(watch,t), 
    sp(nouns,[watch])])] */
/* mu_create_object( x(bag,i1), [
  [ shape=bag, traits([bag]),inherit(bag,t), 
    sp(nouns,[bag])])] */
/* mu_create_object( x(coins,i1), [
  [ shape=coins, traits([coins]),inherit(coins,t), 
    sp(nouns,[coins])])] */
/* mu_create_object( x(wrench,i1), [
  [ shape=wrench, traits([wrench]),inherit(wrench,t), 
    sp(nouns,[wrench])])] */
/* mu_create_object( x(basement,i1), [
  [ shape=basement, traits([basement]),inherit(basement,t), 
    sp(nouns,[basement])])] */
/* mu_create_object( x(garden,i1), [
  [ shape=garden, traits([garden]),inherit(garden,t), 
    sp(nouns,[garden])])] */
/* mu_create_object( x(dining_room,i1), [
  [ shape=dining_room, traits([dining_room]),inherit(dining_room,t), 
    sp(nouns,[dining_room])])] */
/* mu_create_object( x(living_room,i1), [
  [ shape=living_room, traits([living_room]),inherit(living_room,t), 
    sp(nouns,[living_room])])] */
/* mu_create_object( x(shelf,i1), [
  [ shape=shelf, traits([shelf]),inherit(shelf,t), 
    sp(nouns,[shelf])])] */
/* mu_create_object( x(locker,i1), [
  [ shape=locker, traits([locker]),inherit(locker,t), 
    sp(nouns,[locker])])] */
/* mu_create_object( x(rock,i1), [
  [ shape=rock, traits([rock]),inherit(rock,t), 
    sp(nouns,[rock])])] */
/* mu_create_object( x(fountain,i1), [
  [ shape=fountain, traits([fountain]),inherit(fountain,t), 
    sp(nouns,[fountain])])] */
/* mu_create_object( x(water,i1), [
  [ shape=water, traits([water]),inherit(water,t), 
    sp(nouns,[water])])] */
/* mu_create_object( x(mushroom,i1), [
  [ shape=mushroom, traits([mushroom]),inherit(mushroom,t), 
    sp(nouns,[mushroom])])] */
/* mu_create_object( x(shovel,i1), [
  [ shape=shovel, traits([shovel]),inherit(shovel,t), 
    sp(nouns,[shovel])])] */
/* mu_create_object( x(videocamera,i1), [
  [ shape=videocamera, traits([videocamera]),inherit(videocamera,t), 
    sp(nouns,[videocamera])])] */
/* mu_create_object( x(fireplace,i1), [
  [ shape=fireplace, traits([fireplace]),inherit(fireplace,t), 
    sp(nouns,[fireplace])])] */
/* mu_create_object( x(screendoor,i1), [
  [ shape=screendoor, traits([screendoor]),inherit(screendoor,t), 
    sp(nouns,[screendoor])])] */
/* mu_create_object( x(crate,i1), [
  [ shape=crate, traits([crate]),inherit(crate,t), 
    sp(nouns,[crate])])] */
/* mu_create_object( x(apple,i1), [
  [ shape=apple, traits([apple]),inherit(apple,t), 
    sp(nouns,[apple])])] */
/* mu_create_object( x(brklamp,i1), [
  [ shape=brklamp, traits([brklamp]),inherit(brklamp,t), 
    sp(nouns,[brklamp])])] */
/* mu_create_object( x(ttt_table,i1), [
  [ shape=ttt_table, traits([ttt_table]),inherit(ttt_table,t), 
    sp(nouns,[ttt_table])])] */
/* mu_create_object( x(nw_subregion,i1), [
  [ shape=nw_subregion, traits([nw_subregion]),inherit(nw_subregion,t), 
    sp(nouns,[nw_subregion])])] */
/* mu_create_object( x(nn_subregion,i1), [
  [ shape=nn_subregion, traits([nn_subregion]),inherit(nn_subregion,t), 
    sp(nouns,[nn_subregion])])] */
/* mu_create_object( x(ne_subregion,i1), [
  [ shape=ne_subregion, traits([ne_subregion]),inherit(ne_subregion,t), 
    sp(nouns,[ne_subregion])])] */
/* mu_create_object( x(ww_subregion,i1), [
  [ shape=ww_subregion, traits([ww_subregion]),inherit(ww_subregion,t), 
    sp(nouns,[ww_subregion])])] */
/* mu_create_object( x(cc_subregion,i1), [
  [ shape=cc_subregion, traits([cc_subregion]),inherit(cc_subregion,t), 
    sp(nouns,[cc_subregion])])] */
/* mu_create_object( x(ee_subregion,i1), [
  [ shape=ee_subregion, traits([ee_subregion]),inherit(ee_subregion,t), 
    sp(nouns,[ee_subregion])])] */
/* mu_create_object( x(sw_subregion,i1), [
  [ shape=sw_subregion, traits([sw_subregion]),inherit(sw_subregion,t), 
    sp(nouns,[sw_subregion])])] */
/* mu_create_object( x(ss_subregion,i1), [
  [ shape=ss_subregion, traits([ss_subregion]),inherit(ss_subregion,t), 
    sp(nouns,[ss_subregion])])] */
/* mu_create_object( x(se_subregion,i1), [
  [ shape=se_subregion, traits([se_subregion]),inherit(se_subregion,t), 
    sp(nouns,[se_subregion])])] */
=============================================
=============================================
INIT STATE
=============================================
```
totalTime=10.000

FAILED: /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-junit-minor -k adv_test_01.pl (returned 137) Add_LABELS='Errors,Overtime' Rem_LABELS='Skipped,Skipped,Warnings,Skipped'

Test Suite: Rollup logicmoo.agi.agi_test.comprehension in /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_agi/t/agi_tests/comprehension

Package: logicmoo.agi.agi_test.comprehension

Results

Duration0.0 sec
Tests1
Failures1

Tests

logicmoo.agi.agi_test.comprehension.COMPREHENSION_01

Test case:logicmoo.agi.agi_test.comprehension.COMPREHENSION_01 JUnit
Outcome:Failed
Duration:10.0 sec
FailedFAILED: /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-junit-minor -k comprehension_01.pl (returned 137)
failed
Stderr
 (cd /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_agi/t/agi_tests/comprehension ; timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "['comprehension_01.pl']")

% EDIT: https://github.com/logicmoo/logicmoo_workspace/edit/master/packs_sys/logicmoo_agi/t/agi_tests/comprehension/comprehension_01.pl 
% JENKINS: https://jenkins.logicmoo.org/job/logicmoo_workspace/lastBuild/testReport/logicmoo.agi.agi_test.comprehension/COMPREHENSION_01/ 
% ISSUE_SEARCH: https://github.com/logicmoo/logicmoo_workspace/issues?q=is%3Aissue+label%3ACOMPREHENSION_01 
% ISSUE: https://github.com/logicmoo/logicmoo_workspace/issues/645 


```
%~ init_phase(after_load)
%~ init_phase(restore_state)
%
%~ init_why(after_boot,program)
%~ after_boot.
%~ Dont forget to ?- logicmoo_i_cyc_xform.
running('/var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_agi/t/agi_tests/comprehension/comprehension_01.pl'),
%~ this_test_might_need( :-( expects_dialect(pfc)))
%~ this_test_might_need( :-( use_module( library(logicmoo_plarkc))))


test_here(X):- notrace(mpred_test(e2c(X))).

/*~
No source location!?
~*/


test_convo_file(File):- atom_contains(File,'0'),!.
/*~
No source location!?
~*/

test_convo_file(File):-
  open(File,read,IS),
  repeat,
  catch(read_term(IS,Term,[syntax_errors(error)]),_,fail),
   (Term == end_of_file -> close(IS) ;  
    (ignore(test_convo_term(Term)),fail)).

/*~
No source location!?
~*/


test_convo_term(X):- 
 forall((sub_term(E,X),atomic(E),atom_contains(E,' '), 
   %dont parse end comment (Yet)
   \+ atom_contains(E,'CasAm')),
  test_here(E)).

/*~
No source location!?
~*/


:- prolog_load_context(directory,X), cd(X), 
   expand_file_name('Meta*Peacock.plt',Files),
   maplist(test_convo_file,Files).


% EDIT: https://github.com/logicmoo/logicmoo_workspace/edit/master/packs_sys/logicmoo_agi/t/agi_tests/comprehension/comprehension_01.pl 
% JENKINS: https://jenkins.logicmoo.org/job/logicmoo_workspace/lastBuild/testReport/logicmoo.agi.agi_test.comprehension/COMPREHENSION_01/logicmoo_agi_agi_test_comprehension_COMPREHENSION_01/ 
% ISSUE_SEARCH: https://github.com/logicmoo/logicmoo_workspace/issues?q=is%3Aissue+label%3ACOMPREHENSION_01 

% ISSUE: https://github.com/logicmoo/logicmoo_workspace/issues/645
/*~
%~ ?-( mpred_test("Test_0001_Line_0015__What_is_a_peacock_c63",baseKB:e2c('What is a peacock?'))).
?-e2c('What is a peacock?')
asserted( exists( Exists, 
            ( info( 'XVAR_NP_What_1_1', [
                [ loc(1), pos('NP'),equals('XVAR_NP_What_1_1'),seg(1,1), 
                  phrase('NP'),size(1),lnks(2), 
                  #(r('NP',seg(1,1))),txt(["What"]),childs(0), 
                  link(1,'SBAR',r('SBAR',seg(1,5))), 
                  link(2,'CORENLP',r('CORENLP',seg(1,5)))])]  &
              info( 'XVAR_NP_Peacock_3_4', [
                [ loc(3), pos('NP'),equals('XVAR_NP_Peacock_3_4'),seg(3,4), 
                  phrase('NP'),size(2),lnks(3), 
                  #(r('NP',seg(3,4))),txt(["a","peacock"]), 
                  childs(0),link(1,'S',r('S',seg(2,4))), 
                  link(2,'SBAR',r('SBAR',seg(1,5))), 
                  link(3,'CORENLP',r('CORENLP',seg(1,5)))])] & 
              warn( unparsed( Exists, [
                      [ w( 'XVAR_NP_What_1_1', [
                          [ loc(1), pos('NP'),equals('XVAR_NP_What_1_1'),seg(1,1), 
                            phrase('NP'),size(1),lnks(2), 
                            #(r('NP',seg(1,1))),txt(["What"]),childs(0), 
                            link(1,'SBAR',r('SBAR',seg(1,5))), 
                            link(2,'CORENLP',r('CORENLP',seg(1,5)))])], 
                        w( is, [
                          [ pos(vbz), root(be),loc(2),lnks(3),txt("is"), 
                            truecase('LOWER'),link(1,'S',r('S',seg(2,4))), 
                            link(2,'SBAR',r('SBAR',seg(1,5))), link(3,'CORENLP',r('CORENLP',seg(1,5))),lex_winfo, 
                            flexicon(bv,[person=3,agr=sg,verb_form=tensed],is), 
                            talk_db(intransitive,be,is,was,being,been), 
                            talk_db(intransitive,am,is,was,being,been), 
                            talk_db(intransitive,are,is,was,being,been)])], 
                        w( 'XVAR_NP_Peacock_3_4', [
                          [ loc(3), pos('NP'),equals('XVAR_NP_Peacock_3_4'),seg(3,4), 
                            phrase('NP'),size(2),lnks(3), 
                            #(r('NP',seg(3,4))),txt(["a","peacock"]), 
                            childs(0),link(1,'S',r('S',seg(2,4))), 
                            link(2,'SBAR',r('SBAR',seg(1,5))), 
                            link(3,'CORENLP',r('CORENLP',seg(1,5)))])], 
                        w( ?, [
                          [ pos('.'), root(?),loc(5),lnks(2),txt("?"), 
                            link(1,'SBAR',r('SBAR',seg(1,5))), link(2,'CORENLP',r('CORENLP',seg(1,5))),lex_winfo, 
                            terminator_lex(?,?),char_type_sentence(?,ask)])], 
                        span( [ seg(2,4), phrase('S'),size(3),lnks(2),#(r('S',seg(2,4))), 
                                txt(["is","a","peacock"]),childs(1), 
                                child(1,'NP',r('NP',seg(3,4))), 
                                link(1,'SBAR',r('SBAR',seg(1,5))), 
                                link(2,'CORENLP',r('CORENLP',seg(1,5)))]), 
                        span( [ seg(1,5), phrase('CORENLP'),size(5),lnks(0), 
                                #( r('CORENLP',seg(1,5))), 
                                txt( [ "What", "is","a","peacock","?"]), childs(1),child(1,'SBAR',r('SBAR',seg(1,5)))]), 
                        span( [ seg(1,5), phrase('SBAR'),size(5),lnks(1), 
                                #( r('SBAR',seg(1,5))), 
                                txt( [ "What", "is","a","peacock","?"]), childs(2),child(1,'NP',r('NP',seg(1,1))), 
                                child(2,'S',r('S',seg(2,4))), 
                                link(1,'CORENLP',r('CORENLP',seg(1,5)))])])]))))
passed=info(why_was_true(baseKB:e2c('What is a peacock?')))
no_proof_for(e2c('What is a peacock?')).

?-e2c('What is a peacock?')
asserted( exists( Exists, 
            ( info( 'XVAR_NP_What_1_1', [
                [ loc(1), pos('NP'),equals('XVAR_NP_What_1_1'),seg(1,1), 
                  phrase('NP'),size(1),lnks(2), 
                  #(r('NP',seg(1,1))),txt(["What"]),childs(0), 
                  link(1,'SBAR',r('SBAR',seg(1,5))), 
                  link(2,'CORENLP',r('CORENLP',seg(1,5)))])]  &
              info( 'XVAR_NP_Peacock_3_4', [
                [ loc(3), pos('NP'),equals('XVAR_NP_Peacock_3_4'),seg(3,4), 
                  phrase('NP'),size(2),lnks(3), 
                  #(r('NP',seg(3,4))),txt(["a","peacock"]), 
                  childs(0),link(1,'S',r('S',seg(2,4))), 
                  link(2,'SBAR',r('SBAR',seg(1,5))), 
                  link(3,'CORENLP',r('CORENLP',seg(1,5)))])] & 
              warn( unparsed( Exists, [
                      [ w( 'XVAR_NP_What_1_1', [
                          [ loc(1), pos('NP'),equals('XVAR_NP_What_1_1'),seg(1,1), 
                            phrase('NP'),size(1),lnks(2), 
                            #(r('NP',seg(1,1))),txt(["What"]),childs(0), 
                            link(1,'SBAR',r('SBAR',seg(1,5))), 
                            link(2,'CORENLP',r('CORENLP',seg(1,5)))])], 
                        w( is, [
                          [ pos(vbz), root(be),loc(2),lnks(3),txt("is"), 
                            truecase('LOWER'),link(1,'S',r('S',seg(2,4))), 
                            link(2,'SBAR',r('SBAR',seg(1,5))), link(3,'CORENLP',r('CORENLP',seg(1,5))),lex_winfo, 
                            flexicon(bv,[person=3,agr=sg,verb_form=tensed],is), 
                            talk_db(intransitive,be,is,was,being,been), 
                            talk_db(intransitive,am,is,was,being,been), 
                            talk_db(intransitive,are,is,was,being,been)])], 
                        w( 'XVAR_NP_Peacock_3_4', [
                          [ loc(3), pos('NP'),equals('XVAR_NP_Peacock_3_4'),seg(3,4), 
                            phrase('NP'),size(2),lnks(3), 
                            #(r('NP',seg(3,4))),txt(["a","peacock"]), 
                            childs(0),link(1,'S',r('S',seg(2,4))), 
                            link(2,'SBAR',r('SBAR',seg(1,5))), 
                            link(3,'CORENLP',r('CORENLP',seg(1,5)))])], 
                        w( ?, [
                          [ pos('.'), root(?),loc(5),lnks(2),txt("?"), 
                            link(1,'SBAR',r('SBAR',seg(1,5))), link(2,'CORENLP',r('CORENLP',seg(1,5))),lex_winfo, 
                            terminator_lex(?,?),char_type_sentence(?,ask)])], 
                        span( [ seg(2,4), phrase('S'),size(3),lnks(2),#(r('S',seg(2,4))), 
                                txt(["is","a","peacock"]),childs(1), 
                                child(1,'NP',r('NP',seg(3,4))), 
                                link(1,'SBAR',r('SBAR',seg(1,5))), 
                                link(2,'CORENLP',r('CORENLP',seg(1,5)))]), 
                        span( [ seg(1,5), phrase('CORENLP'),size(5),lnks(0), 
                                #( r('CORENLP',seg(1,5))), 
                                txt( [ "What", "is","a","peacock","?"]), childs(1),child(1,'SBAR',r('SBAR',seg(1,5)))]), 
                        span( [ seg(1,5), phrase('SBAR'),size(5),lnks(1), 
                                #( r('SBAR',seg(1,5))), 
                                txt( [ "What", "is","a","peacock","?"]), childs(2),child(1,'NP',r('NP',seg(1,1))), 
                                child(2,'S',r('S',seg(2,4))), 
                                link(1,'CORENLP',r('CORENLP',seg(1,5)))])])]))))
no_proof_for(e2c('What is a peacock?')).

no_proof_for(e2c('What is a peacock?')).

	name	=	'logicmoo.agi.agi_test.comprehension.COMPREHENSION_01-Test_0001_Line_0015__What_is_a_peacock_c63'. 
	JUNIT_CLASSNAME	=	'logicmoo.agi.agi_test.comprehension.COMPREHENSION_01'. 
	JUNIT_CMD	=	'timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'comprehension_01.pl\']"'. 
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace/test_results/jenkins/Report-logicmoo-agi-agi_test-comprehension-vSTARv_01vSTARvvDOTvpl-Units-Logicmoo_agi_agi_test_comprehension_COMPREHENSION_01_Test_0001_Line_0015_What_is_a_peacock_c63-junit.xml
%~ ?-( mpred_test("Test_0002_Line_0015__What_is_a_peacock_c63",baseKB:e2c('What is a peacock?'))).
?-e2c('What is a peacock?')
asserted( exists( Exists, 
            ( info( 'XVAR_NP_What_1_1', [
                [ loc(1), pos('NP'),equals('XVAR_NP_What_1_1'),seg(1,1), 
                  phrase('NP'),size(1),lnks(2), 
                  #(r('NP',seg(1,1))),txt(["What"]),childs(0), 
                  link(1,'SBAR',r('SBAR',seg(1,5))), 
                  link(2,'CORENLP',r('CORENLP',seg(1,5)))])]  &
              info( 'XVAR_NP_Peacock_3_4', [
                [ loc(3), pos('NP'),equals('XVAR_NP_Peacock_3_4'),seg(3,4), 
                  phrase('NP'),size(2),lnks(3), 
                  #(r('NP',seg(3,4))),txt(["a","peacock"]), 
                  childs(0),link(1,'S',r('S',seg(2,4))), 
                  link(2,'SBAR',r('SBAR',seg(1,5))), 
                  link(3,'CORENLP',r('CORENLP',seg(1,5)))])] & 
              warn( unparsed( Exists, [
                      [ w( 'XVAR_NP_What_1_1', [
                          [ loc(1), pos('NP'),equals('XVAR_NP_What_1_1'),seg(1,1), 
                            phrase('NP'),size(1),lnks(2), 
                            #(r('NP',seg(1,1))),txt(["What"]),childs(0), 
                            link(1,'SBAR',r('SBAR',seg(1,5))), 
                            link(2,'CORENLP',r('CORENLP',seg(1,5)))])], 
                        w( is, [
                          [ pos(vbz), root(be),loc(2),lnks(3),txt("is"), 
                            truecase('LOWER'),link(1,'S',r('S',seg(2,4))), 
                            link(2,'SBAR',r('SBAR',seg(1,5))), link(3,'CORENLP',r('CORENLP',seg(1,5))),lex_winfo, 
                            flexicon(bv,[person=3,agr=sg,verb_form=tensed],is), 
                            talk_db(intransitive,be,is,was,being,been), 
                            talk_db(intransitive,am,is,was,being,been), 
                            talk_db(intransitive,are,is,was,being,been)])], 
                        w( 'XVAR_NP_Peacock_3_4', [
                          [ loc(3), pos('NP'),equals('XVAR_NP_Peacock_3_4'),seg(3,4), 
                            phrase('NP'),size(2),lnks(3), 
                            #(r('NP',seg(3,4))),txt(["a","peacock"]), 
                            childs(0),link(1,'S',r('S',seg(2,4))), 
                            link(2,'SBAR',r('SBAR',seg(1,5))), 
                            link(3,'CORENLP',r('CORENLP',seg(1,5)))])], 
                        w( ?, [
                          [ pos('.'), root(?),loc(5),lnks(2),txt("?"), 
                            link(1,'SBAR',r('SBAR',seg(1,5))), link(2,'CORENLP',r('CORENLP',seg(1,5))),lex_winfo, 
                            terminator_lex(?,?),char_type_sentence(?,ask)])], 
                        span( [ seg(2,4), phrase('S'),size(3),lnks(2),#(r('S',seg(2,4))), 
                                txt(["is","a","peacock"]),childs(1), 
                                child(1,'NP',r('NP',seg(3,4))), 
                                link(1,'SBAR',r('SBAR',seg(1,5))), 
                                link(2,'CORENLP',r('CORENLP',seg(1,5)))]), 
                        span( [ seg(1,5), phrase('CORENLP'),size(5),lnks(0), 
                                #( r('CORENLP',seg(1,5))), 
                                txt( [ "What", "is","a","peacock","?"]), childs(1),child(1,'SBAR',r('SBAR',seg(1,5)))]), 
                        span( [ seg(1,5), phrase('SBAR'),size(5),lnks(1), 
                                #( r('SBAR',seg(1,5))), 
                                txt( [ "What", "is","a","peacock","?"]), childs(2),child(1,'NP',r('NP',seg(1,1))), 
                                child(2,'S',r('S',seg(2,4))), 
                                link(1,'CORENLP',r('CORENLP',seg(1,5)))])])]))))
passed=info(why_was_true(baseKB:e2c('What is a peacock?')))
no_proof_for(e2c('What is a peacock?')).

?-e2c('What is a peacock?')
asserted( exists( Exists, 
            ( info( 'XVAR_NP_What_1_1', [
                [ loc(1), pos('NP'),equals('XVAR_NP_What_1_1'),seg(1,1), 
                  phrase('NP'),size(1),lnks(2), 
                  #(r('NP',seg(1,1))),txt(["What"]),childs(0), 
                  link(1,'SBAR',r('SBAR',seg(1,5))), 
                  link(2,'CORENLP',r('CORENLP',seg(1,5)))])]  &
              info( 'XVAR_NP_Peacock_3_4', [
                [ loc(3), pos('NP'),equals('XVAR_NP_Peacock_3_4'),seg(3,4), 
                  phrase('NP'),size(2),lnks(3), 
                  #(r('NP',seg(3,4))),txt(["a","peacock"]), 
                  childs(0),link(1,'S',r('S',seg(2,4))), 
                  link(2,'SBAR',r('SBAR',seg(1,5))), 
                  link(3,'CORENLP',r('CORENLP',seg(1,5)))])] & 
              warn( unparsed( Exists, [
                      [ w( 'XVAR_NP_What_1_1', [
                          [ loc(1), pos('NP'),equals('XVAR_NP_What_1_1'),seg(1,1), 
                            phrase('NP'),size(1),lnks(2), 
                            #(r('NP',seg(1,1))),txt(["What"]),childs(0), 
                            link(1,'SBAR',r('SBAR',seg(1,5))), 
                            link(2,'CORENLP',r('CORENLP',seg(1,5)))])], 
                        w( is, [
                          [ pos(vbz), root(be),loc(2),lnks(3),txt("is"), 
                            truecase('LOWER'),link(1,'S',r('S',seg(2,4))), 
                            link(2,'SBAR',r('SBAR',seg(1,5))), link(3,'CORENLP',r('CORENLP',seg(1,5))),lex_winfo, 
                            flexicon(bv,[person=3,agr=sg,verb_form=tensed],is), 
                            talk_db(intransitive,be,is,was,being,been), 
                            talk_db(intransitive,am,is,was,being,been), 
                            talk_db(intransitive,are,is,was,being,been)])], 
                        w( 'XVAR_NP_Peacock_3_4', [
                          [ loc(3), pos('NP'),equals('XVAR_NP_Peacock_3_4'),seg(3,4), 
                            phrase('NP'),size(2),lnks(3), 
                            #(r('NP',seg(3,4))),txt(["a","peacock"]), 
                            childs(0),link(1,'S',r('S',seg(2,4))), 
                            link(2,'SBAR',r('SBAR',seg(1,5))), 
                            link(3,'CORENLP',r('CORENLP',seg(1,5)))])], 
                        w( ?, [
                          [ pos('.'), root(?),loc(5),lnks(2),txt("?"), 
                            link(1,'SBAR',r('SBAR',seg(1,5))), link(2,'CORENLP',r('CORENLP',seg(1,5))),lex_winfo, 
                            terminator_lex(?,?),char_type_sentence(?,ask)])], 
                        span( [ seg(2,4), phrase('S'),size(3),lnks(2),#(r('S',seg(2,4))), 
                                txt(["is","a","peacock"]),childs(1), 
                                child(1,'NP',r('NP',seg(3,4))), 
                                link(1,'SBAR',r('SBAR',seg(1,5))), 
                                link(2,'CORENLP',r('CORENLP',seg(1,5)))]), 
                        span( [ seg(1,5), phrase('CORENLP'),size(5),lnks(0), 
                                #( r('CORENLP',seg(1,5))), 
                                txt( [ "What", "is","a","peacock","?"]), childs(1),child(1,'SBAR',r('SBAR',seg(1,5)))]), 
                        span( [ seg(1,5), phrase('SBAR'),size(5),lnks(1), 
                                #( r('SBAR',seg(1,5))), 
                                txt( [ "What", "is","a","peacock","?"]), childs(2),child(1,'NP',r('NP',seg(1,1))), 
                                child(2,'S',r('S',seg(2,4))), 
                                link(1,'CORENLP',r('CORENLP',seg(1,5)))])])]))))
no_proof_for(e2c('What is a peacock?')).

no_proof_for(e2c('What is a peacock?')).

	name	=	'logicmoo.agi.agi_test.comprehension.COMPREHENSION_01-Test_0002_Line_0015__What_is_a_peacock_c63'. 
	JUNIT_CLASSNAME	=	'logicmoo.agi.agi_test.comprehension.COMPREHENSION_01'. 
	JUNIT_CMD	=	'timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'comprehension_01.pl\']"'. 
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace/test_results/jenkins/Report-logicmoo-agi-agi_test-comprehension-vSTARv_01vSTARvvDOTvpl-Units-Logicmoo_agi_agi_test_comprehension_COMPREHENSION_01_Test_0002_Line_0015_What_is_a_peacock_c63-junit.xml
%~ ?-( mpred_test("Test_0003_Line_0015__What_is_a_peacock_c63",baseKB:e2c('What is a peacock?'))).
?-e2c('What is a peacock?')
```
totalTime=10.000

FAILED: /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-junit-minor -k comprehension_01.pl (returned 137) Add_LABELS='Errors,Overtime' Rem_LABELS='Skipped,Skipped,Warnings,Skipped'

Test Suite: Rollup logicmoo.base.examples.fol in /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_base/t/examples/fol

Package: logicmoo.base.examples.fol

Results

Duration0.0 sec
Tests4
Failures4

Tests

logicmoo.base.examples.fol.ZEBRA_03

Test case:logicmoo.base.examples.fol.ZEBRA_03 JUnit
Outcome:Failed
Duration:10.0 sec
FailedFAILED: /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-junit-minor -k zebra_03.clif (returned 137)
failed
Stderr
 (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_03.clif']")

% EDIT: https://github.com/logicmoo/logicmoo_workspace/edit/master/packs_sys/logicmoo_base/t/examples/fol/zebra_03.clif 
% JENKINS: https://jenkins.logicmoo.org/job/logicmoo_workspace/lastBuild/testReport/logicmoo.base.examples.fol/ZEBRA_03/ 
% ISSUE_SEARCH: https://github.com/logicmoo/logicmoo_workspace/issues?q=is%3Aissue+label%3AZEBRA_03 
% ISSUE: https://github.com/logicmoo/logicmoo_workspace/issues/637 


```
%~ init_phase(after_load)
%~ init_phase(restore_state)
%
%~ init_why(after_boot,program)
%~ after_boot.
%~ Dont forget to ?- logicmoo_i_cyc_xform.
%~ comment(";")
%~ /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_utils/prolog/logicmoo_test_header.pl:30 
%~ 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: 29 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 3.06 sec, 1 clauses
% /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_utils/prolog/debuggery/dmsg compiled into dmsg 0.13 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
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_base/t/examples/fol/zebra_03.clif:747 
%~ 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.")
%~ 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( ```
totalTime=10.000

FAILED: /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-junit-minor -k zebra_03.clif (returned 137) Add_LABELS='Errors,Overtime' Rem_LABELS='Skipped,Skipped,Warnings,Skipped'

logicmoo.base.examples.fol.ZEBRA_04

Test case:logicmoo.base.examples.fol.ZEBRA_04 JUnit
Outcome:Failed
Duration:10.0 sec
FailedFAILED: /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-junit-minor -k zebra_04.clif (returned 137)
failed
Stderr
 (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_04.clif']")

% EDIT: https://github.com/logicmoo/logicmoo_workspace/edit/master/packs_sys/logicmoo_base/t/examples/fol/zebra_04.clif 
% JENKINS: https://jenkins.logicmoo.org/job/logicmoo_workspace/lastBuild/testReport/logicmoo.base.examples.fol/ZEBRA_04/ 
% ISSUE_SEARCH: https://github.com/logicmoo/logicmoo_workspace/issues?q=is%3Aissue+label%3AZEBRA_04 
% ISSUE: https://github.com/logicmoo/logicmoo_workspace/issues/638 


```
%~ init_phase(after_load)
%~ init_phase(restore_state)
%
%~ init_why(after_boot,program)
%~ after_boot.
%~ Dont forget to ?- logicmoo_i_cyc_xform.
%~ comment(";")
%~ comment("; deduct-einstein.scm")
%~ comment(";")
%~ comment("; Full set of Einstein Puzzle facts.")
%~ /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_utils/prolog/logicmoo_test_header.pl:30 
%~ 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: 25 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.65 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_04.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("	(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("	(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)
```
totalTime=10.000

FAILED: /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-junit-minor -k zebra_04.clif (returned 137) Add_LABELS='Errors,Overtime' Rem_LABELS='Skipped,Skipped,Warnings,Skipped'

logicmoo.base.examples.fol.ZEBRA_05

Test case:logicmoo.base.examples.fol.ZEBRA_05 JUnit
Outcome:Failed
Duration:10.0 sec
FailedFAILED: /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-junit-minor -k zebra_05.clif (returned 137)
failed
Stderr
 (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_05.clif']")

% EDIT: https://github.com/logicmoo/logicmoo_workspace/edit/master/packs_sys/logicmoo_base/t/examples/fol/zebra_05.clif 
% JENKINS: https://jenkins.logicmoo.org/job/logicmoo_workspace/lastBuild/testReport/logicmoo.base.examples.fol/ZEBRA_05/ 
% ISSUE_SEARCH: https://github.com/logicmoo/logicmoo_workspace/issues?q=is%3Aissue+label%3AZEBRA_05 
% ISSUE: https://github.com/logicmoo/logicmoo_workspace/issues/459 


```
%~ init_phase(after_load)
%~ init_phase(restore_state)
%
%~ init_why(after_boot,program)
%~ after_boot.
%~ Dont forget to ?- logicmoo_i_cyc_xform.
%~ comment("; Module zebra5 - Test Zerbra Puzzle in CLIF for SWI-Prolog")
%~ comment("; Maintainer: Douglas Miles")
%~ comment("; Load with  ?- load_clif(pack('logicmoo_base/t/examples/fol/zebra5.clif'))")
%~ comment("; causes deduction of argument types")
%~ debugm(common_logic_loader,show_success(common_logic_loader,common_logic_loader:maplist(zebra5:export,[])))
%~ error( missing_kif_process(call,zebra5:ensure_loaded(library(logicmoo_clif))))
%~ 'set-kif-option'('assume-wff')
t_l:kif_action_mode(tell)
%~ /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_utils/prolog/logicmoo_test_header.pl:30 
%~ comment("; PROGRAM A")
%~ debugm( common_logic_loader,
%~   show_success(common_logic_loader,common_logic_loader:ain(clif(domain(livesIn,1,tHuman)))))


** Grammar from file /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_nlu/ext/chat80/original/clone.xg: -60 words .. **



** Grammar from file /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_nlu/ext/chat80/original/lex.xg: 143 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.49 sec, 1 clauses
% /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_utils/prolog/debuggery/dmsg compiled into dmsg 0.12 sec, -16 clauses




=======================================================
domain(livesIn,1,tHuman)
============================================


?- kif_to_boxlog( domain(livesIn,1,tHuman) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  domain(livesIn,1,tHuman)
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(argIsa(livesIn,1,tHuman))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s): 
nesc(argIsa(livesIn,1,tHuman)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  it is necessarily true that argIsa(livesIn,1,tHuman)
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc( argIsa(livesIn,1,tHuman)).

============================================
%~ debugm( common_logic_loader,
%~   show_success(common_logic_loader,common_logic_loader:ain(clif(domain(livesIn,2,tHouse)))))




=======================================================
domain(livesIn,2,tHouse)
============================================


?- kif_to_boxlog( domain(livesIn,2,tHouse) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  domain(livesIn,2,tHouse)
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(argIsa(livesIn,2,tHouse))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s): 
nesc(argIsa(livesIn,2,tHouse)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  it is necessarily true that argIsa(livesIn,2,tHouse)
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc( argIsa(livesIn,2,tHouse)).

============================================
%~ debugm( common_logic_loader,
%~   show_success(common_logic_loader,common_logic_loader:ain(clif(domain(natOrigin,1,tHuman)))))




=======================================================
domain(natOrigin,1,tHuman)
============================================


?- kif_to_boxlog( domain(natOrigin,1,tHuman) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  domain(natOrigin,1,tHuman)
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(argIsa(natOrigin,1,tHuman))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s): 
nesc(argIsa(natOrigin,1,tHuman)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  it is necessarily true that argIsa(natOrigin,1,tHuman)
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc( argIsa(natOrigin,1,tHuman)).

============================================
%~ debugm( common_logic_loader,
%~   show_success(common_logic_loader,common_logic_loader:ain(clif(domain(natOrigin,2,tCountry)))))




=======================================================
domain(natOrigin,2,tCountry)
============================================


?- kif_to_boxlog( domain(natOrigin,2,tCountry) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  domain(natOrigin,2,tCountry)
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(argIsa(natOrigin,2,tCountry))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s): 
nesc(argIsa(natOrigin,2,tCountry)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  it is necessarily true that argIsa(natOrigin,2,tCountry)
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc( argIsa(natOrigin,2,tCountry)).

============================================
%~ debugm( common_logic_loader,
%~   show_success(common_logic_loader,common_logic_loader:ain(clif(domain(colorOf,1,tPhysical)))))




=======================================================
domain(colorOf,1,tPhysical)
============================================


?- kif_to_boxlog( domain(colorOf,1,tPhysical) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  domain(colorOf,1,tPhysical)
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(argIsa(colorOf,1,tPhysical))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s): 
nesc(argIsa(colorOf,1,tPhysical)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  it is necessarily true that argIsa(colorOf,1,tPhysical)
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc( argIsa(colorOf,1,tPhysical)).

============================================
%~ debugm( common_logic_loader,
%~   show_success(common_logic_loader,common_logic_loader:ain(clif(domain(colorOf,2,vtColor)))))




=======================================================
domain(colorOf,2,vtColor)
============================================


?- kif_to_boxlog( domain(colorOf,2,vtColor) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  domain(colorOf,2,vtColor)
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(argIsa(colorOf,2,vtColor))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s): 
nesc(argIsa(colorOf,2,vtColor)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  it is necessarily true that argIsa(colorOf,2,vtColor)
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc( argIsa(colorOf,2,vtColor)).

============================================
%~ /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_base/t/examples/fol/zebra_05.clif:333 
%~ debugm( common_logic_loader,
%~   show_success(common_logic_loader,common_logic_loader:ain(clif(domain(address,1,tHouse)))))




=======================================================
domain(address,1,tHouse)
============================================


?- kif_to_boxlog( domain(address,1,tHouse) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  domain(address,1,tHouse)
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(argIsa(address,1,tHouse))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s): 
nesc(argIsa(address,1,tHouse)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  it is necessarily true that argIsa(address,1,tHouse)
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc( argIsa(address,1,tHouse)).

============================================
%~ debugm( common_logic_loader,
%~   show_success(common_logic_loader,common_logic_loader:ain(clif(domain(address,2,tAddress)))))




=======================================================
domain(address,2,tAddress)
============================================


?- kif_to_boxlog( domain(address,2,tAddress) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  domain(address,2,tAddress)
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(argIsa(address,2,tAddress))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s): 
nesc(argIsa(address,2,tAddress)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  it is necessarily true that argIsa(address,2,tAddress)
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc( argIsa(address,2,tAddress)).

============================================
%~ debugm( common_logic_loader,
%~   show_success(common_logic_loader,common_logic_loader:ain(clif(argQuotedIsa(address,2,ftInt)))))




=======================================================
argQuotedIsa(address,2,ftInt)
============================================


?- kif_to_boxlog( argQuotedIsa(address,2,ftInt) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  argQuotedIsa(address,2,ftInt)
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(argQuotedIsa(address,2,ftInt))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s): 
nesc(argQuotedIsa(address,2,ftInt)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  it is necessarily true that argQuotedIsa(address,2,ftInt)
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc( argQuotedIsa(address,2,ftInt)).

============================================
%~ debugm( common_logic_loader,
%~   show_success(common_logic_loader,common_logic_loader:ain(clif(domain(caresFor,1,tHuman)))))




=======================================================
domain(caresFor,1,tHuman)
============================================


?- kif_to_boxlog( domain(caresFor,1,tHuman) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  domain(caresFor,1,tHuman)
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(argIsa(caresFor,1,tHuman))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s): 
nesc(argIsa(caresFor,1,tHuman)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  it is necessarily true that argIsa(caresFor,1,tHuman)
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc( argIsa(caresFor,1,tHuman)).

============================================
%~ debugm( common_logic_loader,
%~   show_success(common_logic_loader,common_logic_loader:ain(clif(domain(caresFor,2,tAnimal)))))




=======================================================
domain(caresFor,2,tAnimal)
============================================


?- kif_to_boxlog( domain(caresFor,2,tAnimal) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  domain(caresFor,2,tAnimal)
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(argIsa(caresFor,2,tAnimal))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s): 
nesc(argIsa(caresFor,2,tAnimal)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  it is necessarily true that argIsa(caresFor,2,tAnimal)
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc( argIsa(caresFor,2,tAnimal)).

============================================
%~ debugm( common_logic_loader,
%~   show_success(common_logic_loader,common_logic_loader:ain(clif(subclass(tNonHumanAnimal,tAnimal)))))




=======================================================
subclass(tNonHumanAnimal,tAnimal)
============================================


?- kif_to_boxlog( subclass(tNonHumanAnimal,tAnimal) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  tNonHumanAnimal subclass tAnimal
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(genls(tNonHumanAnimal,tAnimal))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s): 
nesc(genls(tNonHumanAnimal,tAnimal)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  it is necessarily true that tNonHumanAnimal genls tAnimal
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc( genls(tNonHumanAnimal,tAnimal)).

============================================
%~ debugm( common_logic_loader,
%~   show_success(common_logic_loader,common_logic_loader:ain(clif(subclass(tHuman,tAnimal)))))




=======================================================
subclass(tHuman,tAnimal)
============================================


?- kif_to_boxlog( subclass(tHuman,tAnimal) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  tHuman subclass tAnimal
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(genls(tHuman,tAnimal))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s): 
nesc(genls(tHuman,tAnimal)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  it is necessarily true that tHuman genls tAnimal
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc( genls(tHuman,tAnimal)).

============================================
%~ debugm( common_logic_loader,
%~   show_success(common_logic_loader,common_logic_loader:ain(clif(disjointWith(tHuman,tNonHumanAnimal)))))




=======================================================
disjointWith(tHuman,tNonHumanAnimal)
============================================


?- kif_to_boxlog( disjointWith(tHuman,tNonHumanAnimal) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  tHuman disjointWith tNonHumanAnimal
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(disjointWith(tHuman,tNonHumanAnimal))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s): 
nesc(disjointWith(tHuman,tNonHumanAnimal)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  it is necessarily true that tHuman disjointWith tNonHumanAnimal
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc( disjointWith(tHuman,tNonHumanAnimal)).

============================================
%~ debugm(common_logic_loader,show_success(common_logic_loader,common_logic_loader:ain(clif(domain(drinks,1,tHuman)))))




=======================================================
domain(drinks,1,tHuman)
============================================


?- kif_to_boxlog( domain(drinks,1,tHuman) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  domain(drinks,1,tHuman)
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(argIsa(drinks,1,tHuman))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s): 
nesc(argIsa(drinks,1,tHuman)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  it is necessarily true that argIsa(drinks,1,tHuman)
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc( argIsa(drinks,1,tHuman)).

============================================
%~ debugm( common_logic_loader,
%~   show_success(common_logic_loader,common_logic_loader:ain(clif(domain(drinks,2,tBeverage)))))




=======================================================
domain(drinks,2,tBeverage)
============================================


?- kif_to_boxlog( domain(drinks,2,tBeverage) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  domain(drinks,2,tBeverage)
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(argIsa(drinks,2,tBeverage))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s): 
nesc(argIsa(drinks,2,tBeverage)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  it is necessarily true that argIsa(drinks,2,tBeverage)
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc( argIsa(drinks,2,tBeverage)).

============================================
%~ debugm( common_logic_loader,
%~   show_success(common_logic_loader,common_logic_loader:ain(clif(typeGenls(ttBeverageType,tBeverage)))))




=======================================================
typeGenls(ttBeverageType,tBeverage)
============================================


?- kif_to_boxlog( typeGenls(ttBeverageType,tBeverage) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  ttBeverageType typeGenls tBeverage
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(typeGenls(ttBeverageType,tBeverage))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s): 
nesc(typeGenls(ttBeverageType,tBeverage)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  it is necessarily true that ttBeverageType typeGenls tBeverage
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc( typeGenls(ttBeverageType,tBeverage)).

============================================
%~ debugm( common_logic_loader,
%~   show_success(common_logic_loader,common_logic_loader:ain(clif(instance(tCoffee,ttBeverageType)))))




=======================================================
instance(tCoffee,ttBeverageType)
============================================


?- kif_to_boxlog( instance(tCoffee,ttBeverageType) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  tCoffee instance ttBeverageType
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(ttBeverageType(tCoffee))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s): 
nesc(ttBeverageType(tCoffee)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  it is necessarily true that tCoffee isa ttBeverageType
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc( ttBeverageType(tCoffee)).

============================================
%~ debugm( common_logic_loader,
%~   show_success(common_logic_loader,common_logic_loader:ain(clif(domain(smokesBrand,1,tHuman)))))




=======================================================
domain(smokesBrand,1,tHuman)
============================================


?- kif_to_boxlog( domain(smokesBrand,1,tHuman) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  domain(smokesBrand,1,tHuman)
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(argIsa(smokesBrand,1,tHuman))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s): 
nesc(argIsa(smokesBrand,1,tHuman)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  it is necessarily true that argIsa(smokesBrand,1,tHuman)
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc( argIsa(smokesBrand,1,tHuman)).

============================================
%~ debugm( common_logic_loader,
%~   show_success(common_logic_loader,common_logic_loader:ain(clif(domain(smokesBrand,2,tBrandName)))))




=======================================================
domain(smokesBrand,2,tBrandName)
============================================


?- kif_to_boxlog( domain(smokesBrand,2,tBrandName) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  domain(smokesBrand,2,tBrandName)
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(argIsa(smokesBrand,2,tBrandName))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s): 
nesc(argIsa(smokesBrand,2,tBrandName)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  it is necessarily true that argIsa(smokesBrand,2,tBrandName)
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc( argIsa(smokesBrand,2,tBrandName)).

============================================
%~ debugm( common_logic_loader,
%~   show_success(common_logic_loader,common_logic_loader:ain(clif(argQuotedIsa(smokesBrand,2,ftString)))))




=======================================================
argQuotedIsa(smokesBrand,2,ftString)
============================================


?- kif_to_boxlog( argQuotedIsa(smokesBrand,2,ftString) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  argQuotedIsa(smokesBrand,2,ftString)
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(argQuotedIsa(smokesBrand,2,ftString))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s): 
nesc(argQuotedIsa(smokesBrand,2,ftString)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  it is necessarily true that argQuotedIsa(smokesBrand,2,ftString)
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc( argQuotedIsa(smokesBrand,2,ftString)).

============================================
%~ debugm( common_logic_loader,
%~   show_success(common_logic_loader,common_logic_loader:ain(clif(domain(caresForType,1,tHuman)))))




=======================================================
domain(caresForType,1,tHuman)
============================================


?- kif_to_boxlog( domain(caresForType,1,tHuman) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  domain(caresForType,1,tHuman)
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(argIsa(caresForType,1,tHuman))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s): 
nesc(argIsa(caresForType,1,tHuman)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  it is necessarily true that argIsa(caresForType,1,tHuman)
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc( argIsa(caresForType,1,tHuman)).

============================================
%~ debugm( common_logic_loader,
%~   show_success(common_logic_loader,common_logic_loader:ain(clif(domainSubclass(caresForType,2,tAnimal)))))




=======================================================
domainSubclass(caresForType,2,tAnimal)
============================================


?- kif_to_boxlog( domainSubclass(caresForType,2,tAnimal) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  domainSubclass(caresForType,2,tAnimal)
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(argGenl(caresForType,2,tAnimal))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s): 
nesc(argGenl(caresForType,2,tAnimal)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  it is necessarily true that argGenl(caresForType,2,tAnimal)
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc( argGenl(caresForType,2,tAnimal)).

============================================
%~ debugm( common_logic_loader,
%~   show_success( common_logic_loader,
%~     common_logic_loader : ain( clif( iff(
%~                                         and(caresForType(M1,T1),instance(P1,T1)),
%~                                         caresFor(M1,P1))))))




=======================================================
iff(and(caresForType('$VAR'('M1'),'$VAR'('T1')),instance('$VAR'('P1'),'$VAR'('T1'))),caresFor('$VAR'('M1'),'$VAR'('P1')))
============================================


?- kif_to_boxlog( iff(and(caresForType(M1,T1),instance(P1,T1)),caresFor(M1,P1)) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  ?M1 caresForType ?T1 and ?P1 instance ?T1 iff ?M1 caresFor ?P1
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(<gt;=>(and(caresForType('$VAR'('M1'),'$VAR'('T1')),isa('$VAR'('P1'),'$VAR'('T1'))),caresFor('$VAR'('M1'),'$VAR'('P1'))))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 25 entailment(s): 
poss(~caresFor(M1,P1))&nesc(caresForType(M1,T1))&nesc(isa(P1,T1))==>nesc(caresFor(M1,P1)).
poss(~caresFor(M1,P1))&poss(~caresFor(M1,P1))&nesc(caresForType(M1,T1))==>poss(~isa(P1,T1)).
poss(~caresFor(M1,P1))&poss(~caresFor(M1,P1))&nesc(isa(P1,T1))==>poss(~caresForType(M1,T1)).
poss(~caresFor(M1,P1))&v(poss(poss(~caresForType(M1,T1))&nesc(isa(P1,T1))),poss(nesc(caresForType(M1,T1))&poss(~isa(P1,T1))))==>poss(~caresFor(M1,P1)).
poss(~caresForType(M1,T1))&poss(~caresFor(M1,P1))&v(nesc(caresFor(M1,P1)),nesc(caresFor(M1,P1)))&v(nesc(caresFor(M1,P1)),poss(nesc(caresForType(M1,T1))&poss(~isa(P1,T1))))==>poss(~isa(P1,T1)).
poss(~caresForType(M1,T1))&((v(poss(~caresForType(M1,T1)),nesc(caresForType(M1,T1)))&v(poss(~caresForType(M1,T1)),poss(~isa(P1,T1))))&v(nesc(caresForType(M1,T1)),nesc(isa(P1,T1)))&v(nesc(isa(P1,T1)),poss(~isa(P1,T1))))&v(nesc(caresFor(M1,P1)),nesc(caresFor(M1,P1)))&v(nesc(caresFor(M1,P1)),poss(nesc(caresForType(M1,T1))&poss(~isa(P1,T1))))==>poss(~isa(P1,T1)).
poss(caresForType(M1,T1))&poss(~caresFor(M1,P1))&v(nesc(caresFor(M1,P1)),nesc(caresFor(M1,P1)))&v(poss(poss(~caresForType(M1,T1))&nesc(isa(P1,T1))),nesc(caresFor(M1,P1)))==>nesc(isa(P1,T1)).
poss(caresForType(M1,T1))&((v(poss(~caresForType(M1,T1)),nesc(caresForType(M1,T1)))&v(poss(~caresForType(M1,T1)),poss(~isa(P1,T1))))&v(nesc(caresForType(M1,T1)),nesc(isa(P1,T1)))&v(nesc(isa(P1,T1)),poss(~isa(P1,T1))))&v(nesc(caresFor(M1,P1)),nesc(caresFor(M1,P1)))&v(poss(poss(~caresForType(M1,T1))&nesc(isa(P1,T1))),nesc(caresFor(M1,P1)))==>nesc(isa(P1,T1)).
(poss(~caresFor(M1,P1))&nesc(caresForType(M1,T1))&nesc(isa(P1,T1)))&v(nesc(caresForType(M1,T1)),nesc(isa(P1,T1)))&v(poss(~isa(P1,T1)),nesc(isa(P1,T1)))==>nesc(caresForType(M1,T1)).
(poss(~caresFor(M1,P1))&nesc(caresForType(M1,T1))&nesc(isa(P1,T1)))&v(poss(~caresForType(M1,T1)),poss(~isa(P1,T1)))&v(nesc(isa(P1,T1)),poss(~isa(P1,T1)))==>poss(~caresForType(M1,T1)).
(poss(~caresFor(M1,P1))&v(nesc(caresFor(M1,P1)),nesc(caresFor(M1,P1)))&v(nesc(caresFor(M1,P1)),poss(nesc(caresForType(M1,T1))&poss(~isa(P1,T1)))))&poss(isa(P1,T1))==>nesc(caresForType(M1,T1)).
(poss(~caresFor(M1,P1))&v(nesc(caresFor(M1,P1)),nesc(caresFor(M1,P1)))&v(poss(poss(~caresForType(M1,T1))&nesc(isa(P1,T1))),nesc(caresFor(M1,P1))))&poss(~isa(P1,T1))==>poss(~caresForType(M1,T1)).
(((v(poss(~caresForType(M1,T1)),nesc(caresForType(M1,T1)))&v(poss(~caresForType(M1,T1)),poss(~isa(P1,T1))))&v(nesc(caresForType(M1,T1)),nesc(isa(P1,T1)))&v(nesc(isa(P1,T1)),poss(~isa(P1,T1))))&v(nesc(caresFor(M1,P1)),nesc(caresFor(M1,P1)))&v(nesc(caresFor(M1,P1)),poss(nesc(caresForType(M1,T1))&poss(~isa(P1,T1)))))&poss(isa(P1,T1))==>nesc(caresForType(M1,T1)).
(((v(poss(~caresForType(M1,T1)),nesc(caresForType(M1,T1)))&v(poss(~caresForType(M1,T1)),poss(~isa(P1,T1))))&v(nesc(caresForType(M1,T1)),nesc(isa(P1,T1)))&v(nesc(isa(P1,T1)),poss(~isa(P1,T1))))&v(nesc(caresFor(M1,P1)),nesc(caresFor(M1,P1)))&v(poss(poss(~caresForType(M1,T1))&nesc(isa(P1,T1))),nesc(caresFor(M1,P1))))&poss(~isa(P1,T1))==>poss(~caresForType(M1,T1)).
((v(nesc(caresFor(M1,P1)),nesc(caresFor(M1,P1)))&v(nesc(caresFor(M1,P1)),poss(nesc(caresForType(M1,T1))&poss(~isa(P1,T1)))))&v(poss(poss(~caresForType(M1,T1))&nesc(isa(P1,T1))),nesc(caresFor(M1,P1)))&v(poss(poss(~caresForType(M1,T1))&nesc(isa(P1,T1))),poss(nesc(caresForType(M1,T1))&poss(~isa(P1,T1)))))&v(nesc(caresForType(M1,T1)),nesc(isa(P1,T1)))&v(poss(~isa(P1,T1)),nesc(isa(P1,T1)))==>nesc(caresForType(M1,T1)).
((v(nesc(caresFor(M1,P1)),nesc(caresFor(M1,P1)))&v(nesc(caresFor(M1,P1)),poss(nesc(caresForType(M1,T1))&poss(~isa(P1,T1)))))&v(poss(poss(~caresForType(M1,T1))&nesc(isa(P1,T1))),nesc(caresFor(M1,P1)))&v(poss(poss(~caresForType(M1,T1))&nesc(isa(P1,T1))),poss(nesc(caresForType(M1,T1))&poss(~isa(P1,T1)))))&v(poss(~caresForType(M1,T1)),poss(~isa(P1,T1)))&v(nesc(isa(P1,T1)),poss(~isa(P1,T1)))==>poss(~caresForType(M1,T1)).
((v(poss(~caresForType(M1,T1)),nesc(caresForType(M1,T1)))&v(poss(~caresForType(M1,T1)),poss(~isa(P1,T1))))&v(nesc(caresForType(M1,T1)),nesc(isa(P1,T1)))&v(nesc(isa(P1,T1)),poss(~isa(P1,T1))))&nesc(caresForType(M1,T1))&nesc(isa(P1,T1))==>nesc(caresFor(M1,P1)).
((v(poss(~caresForType(M1,T1)),nesc(caresForType(M1,T1)))&v(poss(~caresForType(M1,T1)),poss(~isa(P1,T1))))&v(nesc(caresForType(M1,T1)),nesc(isa(P1,T1)))&v(nesc(isa(P1,T1)),poss(~isa(P1,T1))))&poss(~caresFor(M1,P1))&nesc(caresForType(M1,T1))==>poss(~isa(P1,T1)).
((v(poss(~caresForType(M1,T1)),nesc(caresForType(M1,T1)))&v(poss(~caresForType(M1,T1)),poss(~isa(P1,T1))))&v(nesc(caresForType(M1,T1)),nesc(isa(P1,T1)))&v(nesc(isa(P1,T1)),poss(~isa(P1,T1))))&poss(~caresFor(M1,P1))&nesc(isa(P1,T1))==>poss(~caresForType(M1,T1)).
((v(poss(~caresForType(M1,T1)),nesc(caresForType(M1,T1)))&v(poss(~caresForType(M1,T1)),poss(~isa(P1,T1))))&v(nesc(caresForType(M1,T1)),nesc(isa(P1,T1)))&v(nesc(isa(P1,T1)),poss(~isa(P1,T1))))&v(poss(poss(~caresForType(M1,T1))&nesc(isa(P1,T1))),poss(nesc(caresForType(M1,T1))&poss(~isa(P1,T1))))==>poss(~caresFor(M1,P1)).
(v(nesc(caresFor(M1,P1)),nesc(caresFor(M1,P1)))&v(nesc(caresFor(M1,P1)),poss(nesc(caresForType(M1,T1))&poss(~isa(P1,T1)))))&v(poss(poss(~caresForType(M1,T1))&nesc(isa(P1,T1))),nesc(caresFor(M1,P1)))&v(poss(poss(~caresForType(M1,T1))&nesc(isa(P1,T1))),poss(nesc(caresForType(M1,T1))&poss(~isa(P1,T1))))==>nesc(caresFor(M1,P1)).
(v(poss(~caresForType(M1,T1)),nesc(caresForType(M1,T1)))&v(nesc(caresForType(M1,T1)),nesc(isa(P1,T1))))&poss(~caresFor(M1,P1))&nesc(caresForType(M1,T1))&nesc(isa(P1,T1))==>nesc(isa(P1,T1)).
(v(poss(~caresForType(M1,T1)),nesc(caresForType(M1,T1)))&v(nesc(caresForType(M1,T1)),nesc(isa(P1,T1))))&(v(nesc(caresFor(M1,P1)),nesc(caresFor(M1,P1)))&v(nesc(caresFor(M1,P1)),poss(nesc(caresForType(M1,T1))&poss(~isa(P1,T1)))))&v(poss(poss(~caresForType(M1,T1))&nesc(isa(P1,T1))),nesc(caresFor(M1,P1)))&v(poss(poss(~caresForType(M1,T1))&nesc(isa(P1,T1))),poss(nesc(caresForType(M1,T1))&poss(~isa(P1,T1))))==>nesc(isa(P1,T1)).
(v(poss(~caresForType(M1,T1)),nesc(caresForType(M1,T1)))&v(poss(~caresForType(M1,T1)),poss(~isa(P1,T1))))&poss(~caresFor(M1,P1))&nesc(caresForType(M1,T1))&nesc(isa(P1,T1))==>poss(~isa(P1,T1)).
(v(poss(~caresForType(M1,T1)),nesc(caresForType(M1,T1)))&v(poss(~caresForType(M1,T1)),poss(~isa(P1,T1))))&(v(nesc(caresFor(M1,P1)),nesc(caresFor(M1,P1)))&v(nesc(caresFor(M1,P1)),poss(nesc(caresForType(M1,T1))&poss(~isa(P1,T1)))))&v(poss(poss(~caresForType(M1,T1))&nesc(isa(P1,T1))),nesc(caresFor(M1,P1)))&v(poss(poss(~caresForType(M1,T1))&nesc(isa(P1,T1))),poss(nesc(caresForType(M1,T1))&poss(~isa(P1,T1))))==>poss(~isa(P1,T1)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?M1 caresFor ?P1 " is possibly false  and
%~    (" ?M1 caresForType ?T1 " is necessarily true  and
%~    " ?P1 isa ?T1 " is necessarily true )
%~  It's Proof that:
%~    " ?M1 caresFor ?P1 " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( poss( ~( caresFor(M1,P1)))  &
    nesc( caresForType(M1,T1)) & 
    nesc( isa(P1,T1))) ==> 
  nesc( caresFor(M1,P1))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?M1 caresFor ?P1 " is possibly false  and
%~    (" ?M1 caresFor ?P1 " is possibly false  and
%~    " ?M1 caresForType ?T1 " is necessarily true )
%~  It's Proof that:
%~    " ?P1 isa ?T1 " is possibly false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( poss( ~( caresFor(M1,P1)))  &
    poss( ~( caresFor(M1,P1))) & 
    nesc( caresForType(M1,T1))) ==> 
  poss( ~( isa(P1,T1)))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?M1 caresFor ?P1 " is possibly false  and
%~    (" ?M1 caresFor ?P1 " is possibly false  and
%~    " ?P1 isa ?T1 " is necessarily true )
%~  It's Proof that:
%~    " ?M1 caresForType ?T1 " is possibly false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( poss( ~( caresFor(M1,P1)))  &
    poss( ~( caresFor(M1,P1))) & 
    nesc( isa(P1,T1))) ==> 
  poss( ~( caresForType(M1,T1)))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?M1 caresFor ?P1 " is possibly false  and
%~    (((" ?M1 caresForType ?T1 " is possibly false  and
%~    " ?P1 isa ?T1 " is necessarily true )is possible ) or ((" ?M1 caresForType ?T1 " is necessarily true  and
%~    " ?P1 isa ?T1 " is possibly false )is possible ))
%~  It's Proof that:
%~    " ?M1 caresFor ?P1 " is possibly false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( poss( ~( caresFor(M1,P1))) & 
    v( poss( poss(~caresForType(M1,T1))&nesc(isa(P1,T1))), 
       poss( nesc(caresForType(M1,T1))&poss(~isa(P1,T1))))) ==> 
  poss( ~( caresFor(M1,P1)))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?M1 caresForType ?T1 " is possibly false  and
%~    (" ?M1 caresFor ?P1 " is possibly false  and
%~    ((" ?M1 caresFor ?P1 " is necessarily true  or " ?M1 caresFor ?P1 " is necessarily true ) and
%~    (" ?M1 caresFor ?P1 " is necessarily true  or ((" ?M1 caresForType ?T1 " is necessarily true  and
%~    " ?P1 isa ?T1 " is possibly false )is possible ))))
%~  It's Proof that:
%~    " ?P1 isa ?T1 " is possibly false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( poss( ~( caresForType(M1,T1)))  &
    poss( ~( caresFor(M1,P1))) & 
    v(nesc(caresFor(M1,P1)),nesc(caresFor(M1,P1))) & 
    v( nesc( caresFor(M1,P1)), 
       poss( nesc(caresForType(M1,T1))&poss(~isa(P1,T1))))) ==> 
  poss( ~( isa(P1,T1)))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?M1 caresForType ?T1 " is possibly false  and
%~    ((((" ?M1 caresForType ?T1 " is possibly false  or " ?M1 caresForType ?T1 " is necessarily true ) and
%~    (" ?M1 caresForType ?T1 " is possibly false  or " ?P1 isa ?T1 " is possibly false )) and
%~    ((" ?M1 caresForType ?T1 " is necessarily true  or " ?P1 isa ?T1 " is necessarily true ) and
%~    (" ?P1 isa ?T1 " is necessarily true  or " ?P1 isa ?T1 " is possibly false ))) and
%~    ((" ?M1 caresFor ?P1 " is necessarily true  or " ?M1 caresFor ?P1 " is necessarily true ) and
%~    (" ?M1 caresFor ?P1 " is necessarily true  or ((" ?M1 caresForType ?T1 " is necessarily true  and
%~    " ?P1 isa ?T1 " is possibly false )is possible ))))
%~  It's Proof that:
%~    " ?P1 isa ?T1 " is possibly false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( poss( ~( caresForType(M1,T1)))  &
    v(poss(~caresForType(M1,T1)),nesc(caresForType(M1,T1))) & 
    v(poss(~caresForType(M1,T1)),poss(~isa(P1,T1))) & 
    v(nesc(caresForType(M1,T1)),nesc(isa(P1,T1))) & 
    v(nesc(isa(P1,T1)),poss(~isa(P1,T1))) & 
    v(nesc(caresFor(M1,P1)),nesc(caresFor(M1,P1))) & 
    v( nesc( caresFor(M1,P1)), 
       poss( nesc(caresForType(M1,T1))&poss(~isa(P1,T1))))) ==> 
  poss( ~( isa(P1,T1)))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?M1 caresForType ?T1 " is possible  and
%~    (" ?M1 caresFor ?P1 " is possibly false  and
%~    ((" ?M1 caresFor ?P1 " is necessarily true  or " ?M1 caresFor ?P1 " is necessarily true ) and
%~    (((" ?M1 caresForType ?T1 " is possibly false  and
%~    " ?P1 isa ?T1 " is necessarily true )is possible ) or " ?M1 caresFor ?P1 " is necessarily true )))
%~  It's Proof that:
%~    " ?P1 isa ?T1 " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( poss( caresForType(M1,T1))  &
    poss( ~( caresFor(M1,P1))) & 
    v(nesc(caresFor(M1,P1)),nesc(caresFor(M1,P1))) & 
    v( poss( poss(~caresForType(M1,T1))&nesc(isa(P1,T1))), 
       nesc( caresFor(M1,P1)))) ==> 
  nesc( isa(P1,T1))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?M1 caresForType ?T1 " is possible  and
%~    ((((" ?M1 caresForType ?T1 " is possibly false  or " ?M1 caresForType ?T1 " is necessarily true ) and
%~    (" ?M1 caresForType ?T1 " is possibly false  or " ?P1 isa ?T1 " is possibly false )) and
%~    ((" ?M1 caresForType ?T1 " is necessarily true  or " ?P1 isa ?T1 " is necessarily true ) and
%~    (" ?P1 isa ?T1 " is necessarily true  or " ?P1 isa ?T1 " is possibly false ))) and
%~    ((" ?M1 caresFor ?P1 " is necessarily true  or " ?M1 caresFor ?P1 " is necessarily true ) and
%~    (((" ?M1 caresForType ?T1 " is possibly false  and
%~    " ?P1 isa ?T1 " is necessarily true )is possible ) or " ?M1 caresFor ?P1 " is necessarily true )))
%~  It's Proof that:
%~    " ?P1 isa ?T1 " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( poss( caresForType(M1,T1))  &
    v(poss(~caresForType(M1,T1)),nesc(caresForType(M1,T1))) & 
    v(poss(~caresForType(M1,T1)),poss(~isa(P1,T1))) & 
    v(nesc(caresForType(M1,T1)),nesc(isa(P1,T1))) & 
    v(nesc(isa(P1,T1)),poss(~isa(P1,T1))) & 
    v(nesc(caresFor(M1,P1)),nesc(caresFor(M1,P1))) & 
    v( poss( poss(~caresForType(M1,T1))&nesc(isa(P1,T1))), 
       nesc( caresFor(M1,P1)))) ==> 
  nesc( isa(P1,T1))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    (" ?M1 caresFor ?P1 " is possibly false  and
%~    (" ?M1 caresForType ?T1 " is necessarily true  and
%~    " ?P1 isa ?T1 " is necessarily true )) and
%~    ((" ?M1 caresForType ?T1 " is necessarily true  or " ?P1 isa ?T1 " is necessarily true ) and
%~    (" ?P1 isa ?T1 " is possibly false  or " ?P1 isa ?T1 " is necessarily true ))
%~  It's Proof that:
%~    " ?M1 caresForType ?T1 " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( poss( ~( caresFor(M1,P1)))  &
    nesc( caresForType(M1,T1)) & 
    nesc( isa(P1,T1)) & 
    v(nesc(caresForType(M1,T1)),nesc(isa(P1,T1))) & 
    v(poss(~isa(P1,T1)),nesc(isa(P1,T1)))) ==> 
  nesc( caresForType(M1,T1))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    (" ?M1 caresFor ?P1 " is possibly false  and
%~    (" ?M1 caresForType ?T1 " is necessarily true  and
%~    " ?P1 isa ?T1 " is necessarily true )) and
%~    ((" ?M1 caresForType ?T1 " is possibly false  or " ?P1 isa ?T1 " is possibly false ) and
%~    (" ?P1 isa ?T1 " is necessarily true  or " ?P1 isa ?T1 " is possibly false ))
%~  It's Proof that:
%~    " ?M1 caresForType ?T1 " is possibly false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( poss( ~( caresFor(M1,P1)))  &
    nesc( caresForType(M1,T1)) & 
    nesc( isa(P1,T1)) & 
    v(poss(~caresForType(M1,T1)),poss(~isa(P1,T1))) & 
    v(nesc(isa(P1,T1)),poss(~isa(P1,T1)))) ==> 
  poss( ~( caresForType(M1,T1)))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    (" ?M1 caresFor ?P1 " is possibly false  and
%~    ((" ?M1 caresFor ?P1 " is necessarily true  or " ?M1 caresFor ?P1 " is necessarily true ) and
%~    (" ?M1 caresFor ?P1 " is necessarily true  or ((" ?M1 caresForType ?T1 " is necessarily true  and
%~    " ?P1 isa ?T1 " is possibly false )is possible )))) and
%~    " ?P1 isa ?T1 " is possible
%~  It's Proof that:
%~    " ?M1 caresForType ?T1 " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( poss( ~( caresFor(M1,P1)))  &
    v(nesc(caresFor(M1,P1)),nesc(caresFor(M1,P1))) & 
    v( nesc( caresFor(M1,P1)), 
       poss( nesc(caresForType(M1,T1))&poss(~isa(P1,T1)))) & 
    poss( isa(P1,T1))) ==> 
  nesc( caresForType(M1,T1))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    (" ?M1 caresFor ?P1 " is possibly false  and
%~    ((" ?M1 caresFor ?P1 " is necessarily true  or " ?M1 caresFor ?P1 " is necessarily true ) and
%~    (((" ?M1 caresForType ?T1 " is possibly false  and
%~    " ?P1 isa ?T1 " is necessarily true )is possible ) or " ?M1 caresFor ?P1 " is necessarily true ))) and
%~    " ?P1 isa ?T1 " is possibly false
%~  It's Proof that:
%~    " ?M1 caresForType ?T1 " is possibly false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( poss( ~( caresFor(M1,P1)))  &
    v(nesc(caresFor(M1,P1)),nesc(caresFor(M1,P1))) & 
    v( poss( poss(~caresForType(M1,T1))&nesc(isa(P1,T1))), 
       nesc( caresFor(M1,P1))) & 
    poss( ~( isa(P1,T1)))) ==> 
  poss( ~( caresForType(M1,T1)))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    ((((" ?M1 caresForType ?T1 " is possibly false  or " ?M1 caresForType ?T1 " is necessarily true ) and
%~    (" ?M1 caresForType ?T1 " is possibly false  or " ?P1 isa ?T1 " is possibly false )) and
%~    ((" ?M1 caresForType ?T1 " is necessarily true  or " ?P1 isa ?T1 " is necessarily true ) and
%~    (" ?P1 isa ?T1 " is necessarily true  or " ?P1 isa ?T1 " is possibly false ))) and
%~    ((" ?M1 caresFor ?P1 " is necessarily true  or " ?M1 caresFor ?P1 " is necessarily true ) and
%~    (" ?M1 caresFor ?P1 " is necessarily true  or ((" ?M1 caresForType ?T1 " is necessarily true  and
%~    " ?P1 isa ?T1 " is possibly false )is possible )))) and
%~    " ?P1 isa ?T1 " is possible
%~  It's Proof that:
%~    " ?M1 caresForType ?T1 " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( v(poss(~caresForType(M1,T1)),nesc(caresForType(M1,T1)))  &
    v(poss(~caresForType(M1,T1)),poss(~isa(P1,T1))) & 
    v(nesc(caresForType(M1,T1)),nesc(isa(P1,T1))) & 
    v(nesc(isa(P1,T1)),poss(~isa(P1,T1))) & 
    v(nesc(caresFor(M1,P1)),nesc(caresFor(M1,P1))) & 
    v( nesc( caresFor(M1,P1)), 
       poss( nesc(caresForType(M1,T1))&poss(~isa(P1,T1)))) & 
    poss( isa(P1,T1))) ==> 
  nesc( caresForType(M1,T1))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    ((((" ?M1 caresForType ?T1 " is possibly false  or " ?M1 caresForType ?T1 " is necessarily true ) and
%~    (" ?M1 caresForType ?T1 " is possibly false  or " ?P1 isa ?T1 " is possibly false )) and
%~    ((" ?M1 caresForType ?T1 " is necessarily true  or " ?P1 isa ?T1 " is necessarily true ) and
%~    (" ?P1 isa ?T1 " is necessarily true  or " ?P1 isa ?T1 " is possibly false ))) and
%~    ((" ?M1 caresFor ?P1 " is necessarily true  or " ?M1 caresFor ?P1 " is necessarily true ) and
%~    (((" ?M1 caresForType ?T1 " is possibly false  and
%~    " ?P1 isa ?T1 " is necessarily true )is possible ) or " ?M1 caresFor ?P1 " is necessarily true ))) and
%~    " ?P1 isa ?T1 " is possibly false
%~  It's Proof that:
%~    " ?M1 caresForType ?T1 " is possibly false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( v(poss(~caresForType(M1,T1)),nesc(caresForType(M1,T1)))  &
    v(poss(~caresForType(M1,T1)),poss(~isa(P1,T1))) & 
    v(nesc(caresForType(M1,T1)),nesc(isa(P1,T1))) & 
    v(nesc(isa(P1,T1)),poss(~isa(P1,T1))) & 
    v(nesc(caresFor(M1,P1)),nesc(caresFor(M1,P1))) & 
    v( poss( poss(~caresForType(M1,T1))&nesc(isa(P1,T1))), 
       nesc( caresFor(M1,P1))) & 
    poss( ~( isa(P1,T1)))) ==> 
  poss( ~( caresForType(M1,T1)))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    (((" ?M1 caresFor ?P1 " is necessarily true  or " ?M1 caresFor ?P1 " is necessarily true ) and
%~    (" ?M1 caresFor ?P1 " is necessarily true  or ((" ?M1 caresForType ?T1 " is necessarily true  and
%~    " ?P1 isa ?T1 " is possibly false )is possible ))) and
%~    ((((" ?M1 caresForType ?T1 " is possibly false  and
%~    " ?P1 isa ?T1 " is necessarily true )is possible ) or " ?M1 caresFor ?P1 " is necessarily true ) and
%~    (((" ?M1 caresForType ?T1 " is possibly false  and
%~    " ?P1 isa ?T1 " is necessarily true )is possible ) or ((" ?M1 caresForType ?T1 " is necessarily true  and
%~    " ?P1 isa ?T1 " is possibly false )is possible )))) and
%~    ((" ?M1 caresForType ?T1 " is necessarily true  or " ?P1 isa ?T1 " is necessarily true ) and
%~    (" ?P1 isa ?T1 " is possibly false  or " ?P1 isa ?T1 " is necessarily true ))
%~  It's Proof that:
%~    " ?M1 caresForType ?T1 " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( v(nesc(caresFor(M1,P1)),nesc(caresFor(M1,P1)))  &
    v( nesc( caresFor(M1,P1)), 
       poss( nesc(caresForType(M1,T1))&poss(~isa(P1,T1)))) & 
    v( poss( poss(~caresForType(M1,T1))&nesc(isa(P1,T1))), 
       nesc( caresFor(M1,P1))) & 
    v( poss( poss(~caresForType(M1,T1))&nesc(isa(P1,T1))), 
       poss( nesc(caresForType(M1,T1))&poss(~isa(P1,T1)))) & 
    v(nesc(caresForType(M1,T1)),nesc(isa(P1,T1))) & 
    v(poss(~isa(P1,T1)),nesc(isa(P1,T1)))) ==> 
  nesc( caresForType(M1,T1))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    (((" ?M1 caresFor ?P1 " is necessarily true  or " ?M1 caresFor ?P1 " is necessarily true ) and
%~    (" ?M1 caresFor ?P1 " is necessarily true  or ((" ?M1 caresForType ?T1 " is necessarily true  and
%~    " ?P1 isa ?T1 " is possibly false )is possible ))) and
%~    ((((" ?M1 caresForType ?T1 " is possibly false  and
%~    " ?P1 isa ?T1 " is necessarily true )is possible ) or " ?M1 caresFor ?P1 " is necessarily true ) and
%~    (((" ?M1 caresForType ?T1 " is possibly false  and
%~    " ?P1 isa ?T1 " is necessarily true )is possible ) or ((" ?M1 caresForType ?T1 " is necessarily true  and
%~    " ?P1 isa ?T1 " is possibly false )is possible )))) and
%~    ((" ?M1 caresForType ?T1 " is possibly false  or " ?P1 isa ?T1 " is possibly false ) and
%~    (" ?P1 isa ?T1 " is necessarily true  or " ?P1 isa ?T1 " is possibly false ))
%~  It's Proof that:
%~    " ?M1 caresForType ?T1 " is possibly false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( v(nesc(caresFor(M1,P1)),nesc(caresFor(M1,P1)))  &
    v( nesc( caresFor(M1,P1)), 
       poss( nesc(caresForType(M1,T1))&poss(~isa(P1,T1)))) & 
    v( poss( poss(~caresForType(M1,T1))&nesc(isa(P1,T1))), 
       nesc( caresFor(M1,P1))) & 
    v( poss( poss(~caresForType(M1,T1))&nesc(isa(P1,T1))), 
       poss( nesc(caresForType(M1,T1))&poss(~isa(P1,T1)))) & 
    v(poss(~caresForType(M1,T1)),poss(~isa(P1,T1))) & 
    v(nesc(isa(P1,T1)),poss(~isa(P1,T1)))) ==> 
  poss( ~( caresForType(M1,T1)))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    (((" ?M1 caresForType ?T1 " is possibly false  or " ?M1 caresForType ?T1 " is necessarily true ) and
%~    (" ?M1 caresForType ?T1 " is possibly false  or " ?P1 isa ?T1 " is possibly false )) and
%~    ((" ?M1 caresForType ?T1 " is necessarily true  or " ?P1 isa ?T1 " is necessarily true ) and
%~    (" ?P1 isa ?T1 " is necessarily true  or " ?P1 isa ?T1 " is possibly false ))) and
%~    (" ?M1 caresForType ?T1 " is necessarily true  and
%~    " ?P1 isa ?T1 " is necessarily true )
%~  It's Proof that:
%~    " ?M1 caresFor ?P1 " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( v(poss(~caresForType(M1,T1)),nesc(caresForType(M1,T1)))  &
    v(poss(~caresForType(M1,T1)),poss(~isa(P1,T1))) & 
    v(nesc(caresForType(M1,T1)),nesc(isa(P1,T1))) & 
    v(nesc(isa(P1,T1)),poss(~isa(P1,T1))) & 
    nesc( caresForType(M1,T1)) & 
    nesc( isa(P1,T1))) ==> 
  nesc( caresFor(M1,P1))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    (((" ?M1 caresForType ?T1 " is possibly false  or " ?M1 caresForType ?T1 " is necessarily true ) and
%~    (" ?M1 caresForType ?T1 " is possibly false  or " ?P1 isa ?T1 " is possibly false )) and
%~    ((" ?M1 caresForType ?T1 " is necessarily true  or " ?P1 isa ?T1 " is necessarily true ) and
%~    (" ?P1 isa ?T1 " is necessarily true  or " ?P1 isa ?T1 " is possibly false ))) and
%~    (" ?M1 caresFor ?P1 " is possibly false  and
%~    " ?M1 caresForType ?T1 " is necessarily true )
%~  It's Proof that:
%~    " ?P1 isa ?T1 " is possibly false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( v(poss(~caresForType(M1,T1)),nesc(caresForType(M1,T1)))  &
    v(poss(~caresForType(M1,T1)),poss(~isa(P1,T1))) & 
    v(nesc(caresForType(M1,T1)),nesc(isa(P1,T1))) & 
    v(nesc(isa(P1,T1)),poss(~isa(P1,T1))) & 
    poss( ~( caresFor(M1,P1))) & 
    nesc( caresForType(M1,T1))) ==> 
  poss( ~( isa(P1,T1)))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    (((" ?M1 caresForType ?T1 " is possibly false  or " ?M1 caresForType ?T1 " is necessarily true ) and
%~    (" ?M1 caresForType ?T1 " is possibly false  or " ?P1 isa ?T1 " is possibly false )) and
%~    ((" ?M1 caresForType ?T1 " is necessarily true  or " ?P1 isa ?T1 " is necessarily true ) and
%~    (" ?P1 isa ?T1 " is necessarily true  or " ?P1 isa ?T1 " is possibly false ))) and
%~    (" ?M1 caresFor ?P1 " is possibly false  and
%~    " ?P1 isa ?T1 " is necessarily true )
%~  It's Proof that:
%~    " ?M1 caresForType ?T1 " is possibly false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( v(poss(~caresForType(M1,T1)),nesc(caresForType(M1,T1)))  &
    v(poss(~caresForType(M1,T1)),poss(~isa(P1,T1))) & 
    v(nesc(caresForType(M1,T1)),nesc(isa(P1,T1))) & 
    v(nesc(isa(P1,T1)),poss(~isa(P1,T1))) & 
    poss( ~( caresFor(M1,P1))) & 
    nesc( isa(P1,T1))) ==> 
  poss( ~( caresForType(M1,T1)))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    (((" ?M1 caresForType ?T1 " is possibly false  or " ?M1 caresForType ?T1 " is necessarily true ) and
%~    (" ?M1 caresForType ?T1 " is possibly false  or " ?P1 isa ?T1 " is possibly false )) and
%~    ((" ?M1 caresForType ?T1 " is necessarily true  or " ?P1 isa ?T1 " is necessarily true ) and
%~    (" ?P1 isa ?T1 " is necessarily true  or " ?P1 isa ?T1 " is possibly false ))) and
%~    (((" ?M1 caresForType ?T1 " is possibly false  and
%~    " ?P1 isa ?T1 " is necessarily true )is possible ) or ((" ?M1 caresForType ?T1 " is necessarily true  and
%~    " ?P1 isa ?T1 " is possibly false )is possible ))
%~  It's Proof that:
%~    " ?M1 caresFor ?P1 " is possibly false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( v(poss(~caresForType(M1,T1)),nesc(caresForType(M1,T1)))  &
    v(poss(~caresForType(M1,T1)),poss(~isa(P1,T1))) & 
    v(nesc(caresForType(M1,T1)),nesc(isa(P1,T1))) & 
    v(nesc(isa(P1,T1)),poss(~isa(P1,T1))) & 
    v( poss( poss(~caresForType(M1,T1))&nesc(isa(P1,T1))), 
       poss( nesc(caresForType(M1,T1))&poss(~isa(P1,T1))))) ==> 
  poss( ~( caresFor(M1,P1)))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    ((" ?M1 caresFor ?P1 " is necessarily true  or " ?M1 caresFor ?P1 " is necessarily true ) and
%~    (" ?M1 caresFor ?P1 " is necessarily true  or ((" ?M1 caresForType ?T1 " is necessarily true  and
%~    " ?P1 isa ?T1 " is possibly false )is possible ))) and
%~    ((((" ?M1 caresForType ?T1 " is possibly false  and
%~    " ?P1 isa ?T1 " is necessarily true )is possible ) or " ?M1 caresFor ?P1 " is necessarily true ) and
%~    (((" ?M1 caresForType ?T1 " is possibly false  and
%~    " ?P1 isa ?T1 " is necessarily true )is possible ) or ((" ?M1 caresForType ?T1 " is necessarily true  and
%~    " ?P1 isa ?T1 " is possibly false )is possible )))
%~  It's Proof that:
%~    " ?M1 caresFor ?P1 " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( v(nesc(caresFor(M1,P1)),nesc(caresFor(M1,P1)))  &
    v( nesc( caresFor(M1,P1)), 
       poss( nesc(caresForType(M1,T1))&poss(~isa(P1,T1)))) & 
    v( poss( poss(~caresForType(M1,T1))&nesc(isa(P1,T1))), 
       nesc( caresFor(M1,P1))) & 
    v( poss( poss(~caresForType(M1,T1))&nesc(isa(P1,T1))), 
       poss( nesc(caresForType(M1,T1))&poss(~isa(P1,T1))))) ==> 
  nesc( caresFor(M1,P1))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    ((" ?M1 caresForType ?T1 " is possibly false  or " ?M1 caresForType ?T1 " is necessarily true ) and
%~    (" ?M1 caresForType ?T1 " is necessarily true  or " ?P1 isa ?T1 " is necessarily true )) and
%~    (" ?M1 caresFor ?P1 " is possibly false  and
%~    (" ?M1 caresForType ?T1 " is necessarily true  and
%~    " ?P1 isa ?T1 " is necessarily true ))
%~  It's Proof that:
%~    " ?P1 isa ?T1 " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( v(poss(~caresForType(M1,T1)),nesc(caresForType(M1,T1)))  &
    v(nesc(caresForType(M1,T1)),nesc(isa(P1,T1))) & 
    poss( ~( caresFor(M1,P1))) & 
    nesc( caresForType(M1,T1)) & 
    nesc( isa(P1,T1))) ==> 
  nesc( isa(P1,T1))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    ((" ?M1 caresForType ?T1 " is possibly false  or " ?M1 caresForType ?T1 " is necessarily true ) and
%~    (" ?M1 caresForType ?T1 " is necessarily true  or " ?P1 isa ?T1 " is necessarily true )) and
%~    (((" ?M1 caresFor ?P1 " is necessarily true  or " ?M1 caresFor ?P1 " is necessarily true ) and
%~    (" ?M1 caresFor ?P1 " is necessarily true  or ((" ?M1 caresForType ?T1 " is necessarily true  and
%~    " ?P1 isa ?T1 " is possibly false )is possible ))) and
%~    ((((" ?M1 caresForType ?T1 " is possibly false  and
%~    " ?P1 isa ?T1 " is necessarily true )is possible ) or " ?M1 caresFor ?P1 " is necessarily true ) and
%~    (((" ?M1 caresForType ?T1 " is possibly false  and
%~    " ?P1 isa ?T1 " is necessarily true )is possible ) or ((" ?M1 caresForType ?T1 " is necessarily true  and
%~    " ?P1 isa ?T1 " is possibly false )is possible ))))
%~  It's Proof that:
%~    " ?P1 isa ?T1 " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( v(poss(~caresForType(M1,T1)),nesc(caresForType(M1,T1)))  &
    v(nesc(caresForType(M1,T1)),nesc(isa(P1,T1))) & 
    v(nesc(caresFor(M1,P1)),nesc(caresFor(M1,P1))) & 
    v( nesc( caresFor(M1,P1)), 
       poss( nesc(caresForType(M1,T1))&poss(~isa(P1,T1)))) & 
    v( poss( poss(~caresForType(M1,T1))&nesc(isa(P1,T1))), 
       nesc( caresFor(M1,P1))) & 
    v( poss( poss(~caresForType(M1,T1))&nesc(isa(P1,T1))), 
       poss( nesc(caresForType(M1,T1))&poss(~isa(P1,T1))))) ==> 
  nesc( isa(P1,T1))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    ((" ?M1 caresForType ?T1 " is possibly false  or " ?M1 caresForType ?T1 " is necessarily true ) and
%~    (" ?M1 caresForType ?T1 " is possibly false  or " ?P1 isa ?T1 " is possibly false )) and
%~    (" ?M1 caresFor ?P1 " is possibly false  and
%~    (" ?M1 caresForType ?T1 " is necessarily true  and
%~    " ?P1 isa ?T1 " is necessarily true ))
%~  It's Proof that:
%~    " ?P1 isa ?T1 " is possibly false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( v(poss(~caresForType(M1,T1)),nesc(caresForType(M1,T1)))  &
    v(poss(~caresForType(M1,T1)),poss(~isa(P1,T1))) & 
    poss( ~( caresFor(M1,P1))) & 
    nesc( caresForType(M1,T1)) & 
    nesc( isa(P1,T1))) ==> 
  poss( ~( isa(P1,T1)))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    ((" ?M1 caresForType ?T1 " is possibly false  or " ?M1 caresForType ?T1 " is necessarily true ) and
%~    (" ?M1 caresForType ?T1 " is possibly false  or " ?P1 isa ?T1 " is possibly false )) and
%~    (((" ?M1 caresFor ?P1 " is necessarily true  or " ?M1 caresFor ?P1 " is necessarily true ) and
%~    (" ?M1 caresFor ?P1 " is necessarily true  or ((" ?M1 caresForType ?T1 " is necessarily true  and
%~    " ?P1 isa ?T1 " is possibly false )is possible ))) and
%~    ((((" ?M1 caresForType ?T1 " is possibly false  and
%~    " ?P1 isa ?T1 " is necessarily true )is possible ) or " ?M1 caresFor ?P1 " is necessarily true ) and
%~    (((" ?M1 caresForType ?T1 " is possibly false  and
%~    " ?P1 isa ?T1 " is necessarily true )is possible ) or ((" ?M1 caresForType ?T1 " is necessarily true  and
%~    " ?P1 isa ?T1 " is possibly false )is possible ))))
%~  It's Proof that:
%~    " ?P1 isa ?T1 " is possibly false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( v(poss(~caresForType(M1,T1)),nesc(caresForType(M1,T1)))  &
    v(poss(~caresForType(M1,T1)),poss(~isa(P1,T1))) & 
    v(nesc(caresFor(M1,P1)),nesc(caresFor(M1,P1))) & 
    v( nesc( caresFor(M1,P1)), 
       poss( nesc(caresForType(M1,T1))&poss(~isa(P1,T1)))) & 
    v( poss( poss(~caresForType(M1,T1))&nesc(isa(P1,T1))), 
       nesc( caresFor(M1,P1))) & 
    v( poss( poss(~caresForType(M1,T1))&nesc(isa(P1,T1))), 
       poss( nesc(caresForType(M1,T1))&poss(~isa(P1,T1))))) ==> 
  poss( ~( isa(P1,T1)))).

============================================
%~ kif_to_boxlog_attvars2 = necessary(<gt;=>(and(caresForType('$VAR'('M1'),'$VAR'('T1')),isa('$VAR'('P1'),'$VAR'('T1'))),caresFor('$VAR'('M1'),'$VAR'('P1'))))
```
totalTime=10.000

FAILED: /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-junit-minor -k zebra_05.clif (returned 137) Add_LABELS='Errors,Overtime' Rem_LABELS='Skipped,Skipped,Warnings,Skipped'

logicmoo.base.examples.fol.ZEBRA_06

Test case:logicmoo.base.examples.fol.ZEBRA_06 JUnit
Outcome:Failed
Duration:10.0 sec
FailedFAILED: /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-junit-minor -k zebra_06.clif (returned 137)
failed
Stderr
 (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("	(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("	(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'

Test Suite: Rollup logicmoo.base.fol.fiveof in /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_base/t/examples/fol/fiveof

Package: logicmoo.base.fol.fiveof

Results

Duration0.0 sec
Tests4
Failures4

Tests

logicmoo.base.fol.fiveof.FIVE_LEFTOF_EXACTLY_02

Test case:logicmoo.base.fol.fiveof.FIVE_LEFTOF_EXACTLY_02 JUnit
Outcome:Failed
Duration:5.0 sec
FailedFAILED: /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-junit-minor -k five_leftof_exactly_02.pl (returned 0)
failed
Stderr
 (cd /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_base/t/examples/fol/fiveof ; timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "['five_leftof_exactly_02.pl']")

% EDIT: https://github.com/logicmoo/logicmoo_workspace/edit/master/packs_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_exactly_02.pl 
% JENKINS: https://jenkins.logicmoo.org/job/logicmoo_workspace/lastBuild/testReport/logicmoo.base.fol.fiveof/FIVE_LEFTOF_EXACTLY_02/ 
% ISSUE_SEARCH: https://github.com/logicmoo/logicmoo_workspace/issues?q=is%3Aissue+label%3AFIVE_LEFTOF_EXACTLY_02 
% ISSUE: https://github.com/logicmoo/logicmoo_workspace/issues/622 


```
%~ init_phase(after_load)
%~ init_phase(restore_state)
%
%~ init_why(after_boot,program)
%~ after_boot.
%~ Dont forget to ?- logicmoo_i_cyc_xform.
running('/var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_exactly_02.pl'),
%~ this_test_might_need( :-( expects_dialect(pfc)))
%~ this_test_might_need( :-( use_module( library(logicmoo_plarkc))))

% =============================================
% File 'mpred_builtin.pfc'
% Purpose: Agent Reactivity for SWI-Prolog
% Maintainer: Douglas Miles
% Contact: $Author: dmiles $@users.sourceforge.net %
% Version: 'interface' 1.0.0
% Revision: $Revision: 1.9 $
% Revised At: $Date: 2002/06/27 14:13:20 $
% =============================================
%
:- expects_dialect(clif).
/*~
~*/

:- set_prolog_flag(gc,false).
  
% There are five houses in a row.


/*~
~*/

  
% There are five houses in a row.


exists(H1,exists(H2,exists(H3,exists(H4,exists(H5,
 (leftof(H1, H2) & leftof(H2, H3) & leftof(H3, H4) & leftof(H4, H5))))))).




% EDIT: https://github.com/logicmoo/logicmoo_workspace/edit/master/packs_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_exactly_02.pl 
% JENKINS: https://jenkins.logicmoo.org/job/logicmoo_workspace/lastBuild/testReport/logicmoo.base.fol.fiveof/FIVE_LEFTOF_EXACTLY_02/logicmoo_base_fol_fiveof_FIVE_LEFTOF_EXACTLY_02_JUnit/ 
% ISSUE_SEARCH: https://github.com/logicmoo/logicmoo_workspace/issues?q=is%3Aissue+label%3AFIVE_LEFTOF_EXACTLY_02 

% ISSUE: https://github.com/logicmoo/logicmoo_workspace/issues/622
/*~
%~ debugm( baseKB,
%~   show_success( baseKB,
%~     baseKB : ain( clif( exists( H1,
%~                           exists( H2,
%~                             exists( H3,
%~                               exists( H4,
%~                                 exists( H5,
%~                                   ( leftof(H1,H2)  &
%~                                     leftof(H2,H3) &
%~                                     leftof(H3,H4) &
%~                                     leftof(H4,H5)))))))))))
%   xgrun compiled into parser_chat80 0.00 sec, 0 clauses
%   xgproc compiled into parser_chat80 0.02 sec, 0 clauses


** Grammar from file /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_nlu/ext/chat80/original/clone.xg: 1610 words .. **



** Grammar from file /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_nlu/ext/chat80/original/lex.xg: 362 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.28 sec, 3 clauses
% /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_utils/prolog/debuggery/dmsg compiled into dmsg 0.12 sec, -16 clauses




=======================================================
exists('$VAR'('Exists_Leftof'),exists('$VAR'('Exists_Leftof6'),exists('$VAR'('Exists_Leftof7'),exists('$VAR'('Exists_Leftof8'),exists('$VAR'('Leftof13'),&(&(&(leftof('$VAR'('Exists_Leftof'),'$VAR'('Exists_Leftof6')),leftof('$VAR'('Exists_Leftof6'),'$VAR'('Exists_Leftof7'))),leftof('$VAR'('Exists_Leftof7'),'$VAR'('Exists_Leftof8'))),leftof('$VAR'('Exists_Leftof8'),'$VAR'('Leftof13'))))))))
============================================


?- kif_to_boxlog( exists(Exists_Leftof,exists(Exists_Leftof6,exists(Exists_Leftof7,exists(Exists_Leftof8,exists(Leftof13,((leftof(Exists_Leftof,Exists_Leftof6)&leftof(Exists_Leftof6,Exists_Leftof7))&leftof(Exists_Leftof7,Exists_Leftof8))&leftof(Exists_Leftof8,Leftof13)))))) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ 
%~  There exists ?Exists_Leftof
%~    (
%~  There exists ?Exists_Leftof6
%~    (
%~  There exists ?Exists_Leftof7
%~    (
%~  There exists ?Exists_Leftof8
%~    (
%~  There exists ?Leftof13
%~    (((" ?Exists_Leftof leftof ?Exists_Leftof6 "  and
%~    " ?Exists_Leftof6 leftof ?Exists_Leftof7 " ) and
%~    " ?Exists_Leftof7 leftof ?Exists_Leftof8 " ) and
%~    " ?Exists_Leftof8 leftof ?Leftof13 " )))))
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = exists('$VAR'('Exists_Leftof'),exists('$VAR'('Exists_Leftof6'),exists('$VAR'('Exists_Leftof7'),exists('$VAR'('Exists_Leftof8'),exists('$VAR'('Leftof13'),necessary(and(and(and(leftof('$VAR'('Exists_Leftof'),'$VAR'('Exists_Leftof6')),leftof('$VAR'('Exists_Leftof6'),'$VAR'('Exists_Leftof7'))),leftof('$VAR'('Exists_Leftof7'),'$VAR'('Exists_Leftof8'))),leftof('$VAR'('Exists_Leftof8'),'$VAR'('Leftof13')))))))))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 6 entailment(s): 
(((nesc(leftof(Exists_Leftof,Exists_Leftof6))&'$existential'(Exists_Leftof6,1,exists(Exists_Leftof7,exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))))))&'$existential'(Exists_Leftof7,1,exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))))))&'$existential'(Exists_Leftof8,1,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))))&'$existential'(Leftof13,1,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))==>nesc(leftof(Exists_Leftof6,Exists_Leftof7)).
(((poss(~leftof(Exists_Leftof,Exists_Leftof6))&'$existential'(Exists_Leftof6,1,exists(Exists_Leftof7,exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))))))&'$existential'(Exists_Leftof7,1,exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))))))&'$existential'(Exists_Leftof8,1,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))))&'$existential'(Leftof13,1,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))==>poss(~leftof(Exists_Leftof6,Exists_Leftof7)).
((((nesc(leftof(Exists_Leftof6,Exists_Leftof7))&'$existential'(Exists_Leftof,1,exists(Exists_Leftof6,exists(Exists_Leftof7,exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))))))))&'$existential'(Exists_Leftof6,1,exists(Exists_Leftof7,exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))))))&'$existential'(Exists_Leftof7,1,exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))))))&'$existential'(Exists_Leftof8,1,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))))&'$existential'(Leftof13,1,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))==>nesc(leftof(Exists_Leftof,Exists_Leftof6)).
((((poss(~leftof(Exists_Leftof6,Exists_Leftof7))&'$existential'(Exists_Leftof,1,exists(Exists_Leftof6,exists(Exists_Leftof7,exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))))))))&'$existential'(Exists_Leftof6,1,exists(Exists_Leftof7,exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))))))&'$existential'(Exists_Leftof7,1,exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))))))&'$existential'(Exists_Leftof8,1,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))))&'$existential'(Leftof13,1,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))==>poss(~leftof(Exists_Leftof,Exists_Leftof6)).
('$existential'(Exists_Leftof7,1,exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))))&'$existential'(Exists_Leftof8,1,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))))&'$existential'(Leftof13,1,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))==>nesc(leftof(Exists_Leftof7,Exists_Leftof8)).
'$existential'(Exists_Leftof8,1,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))))&'$existential'(Leftof13,1,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))==>nesc(leftof(Exists_Leftof8,Leftof13)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    (((" ?Exists_Leftof leftof ?Exists_Leftof6 " is necessarily true  and
%~     by default ?Exists_Leftof6 exists(Exists_Leftof7,exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))))) ) and
%~     by default ?Exists_Leftof7 exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))) ) and
%~     by default ?Exists_Leftof8 exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))) ) and
%~     by default ?Leftof13 ((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))
%~  It's Proof that:
%~    " ?Exists_Leftof6 leftof ?Exists_Leftof7 " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
    '$existential'( Exists_Leftof6, 
      1, 
      exists( Exists_Leftof7, 
        exists( Exists_Leftof8, 
          exists( Leftof13, 
            ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
              nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
              nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
              nesc( leftof(Exists_Leftof8,Leftof13))))))) & 
    '$existential'( Exists_Leftof7, 
      1, 
      exists( Exists_Leftof8, 
        exists( Leftof13, 
          ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
            nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
            nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
            nesc( leftof(Exists_Leftof8,Leftof13)))))) & 
    '$existential'( Exists_Leftof8, 
      1, 
      exists( Leftof13, 
        ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
          nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
          nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
          nesc( leftof(Exists_Leftof8,Leftof13))))) & 
    '$existential'( Leftof13, 
      1, 
      ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
        nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
        nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
        nesc( leftof(Exists_Leftof8,Leftof13))))) ==> 
  nesc( leftof(Exists_Leftof6,Exists_Leftof7))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    (((" ?Exists_Leftof leftof ?Exists_Leftof6 " is possibly false  and
%~     by default ?Exists_Leftof6 exists(Exists_Leftof7,exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))))) ) and
%~     by default ?Exists_Leftof7 exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))) ) and
%~     by default ?Exists_Leftof8 exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))) ) and
%~     by default ?Leftof13 ((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))
%~  It's Proof that:
%~    " ?Exists_Leftof6 leftof ?Exists_Leftof7 " is possibly false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( poss( ~( leftof(Exists_Leftof,Exists_Leftof6)))  &
    '$existential'( Exists_Leftof6, 
      1, 
      exists( Exists_Leftof7, 
        exists( Exists_Leftof8, 
          exists( Leftof13, 
            ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
              nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
              nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
              nesc( leftof(Exists_Leftof8,Leftof13))))))) & 
    '$existential'( Exists_Leftof7, 
      1, 
      exists( Exists_Leftof8, 
        exists( Leftof13, 
          ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
            nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
            nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
            nesc( leftof(Exists_Leftof8,Leftof13)))))) & 
    '$existential'( Exists_Leftof8, 
      1, 
      exists( Leftof13, 
        ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
          nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
          nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
          nesc( leftof(Exists_Leftof8,Leftof13))))) & 
    '$existential'( Leftof13, 
      1, 
      ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
        nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
        nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
        nesc( leftof(Exists_Leftof8,Leftof13))))) ==> 
  poss( ~( leftof(Exists_Leftof6,Exists_Leftof7)))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    ((((" ?Exists_Leftof6 leftof ?Exists_Leftof7 " is necessarily true  and
%~     by default ?Exists_Leftof exists(Exists_Leftof6,exists(Exists_Leftof7,exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))))) ) and
%~     by default ?Exists_Leftof6 exists(Exists_Leftof7,exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))))) ) and
%~     by default ?Exists_Leftof7 exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))) ) and
%~     by default ?Exists_Leftof8 exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))) ) and
%~     by default ?Leftof13 ((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))
%~  It's Proof that:
%~    " ?Exists_Leftof leftof ?Exists_Leftof6 " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( nesc( leftof(Exists_Leftof6,Exists_Leftof7))  &
    '$existential'( Exists_Leftof, 
      1, 
      exists( Exists_Leftof6, 
        exists( Exists_Leftof7, 
          exists( Exists_Leftof8, 
            exists( Leftof13, 
              ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
                nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
                nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
                nesc( leftof(Exists_Leftof8,Leftof13)))))))) & 
    '$existential'( Exists_Leftof6, 
      1, 
      exists( Exists_Leftof7, 
        exists( Exists_Leftof8, 
          exists( Leftof13, 
            ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
              nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
              nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
              nesc( leftof(Exists_Leftof8,Leftof13))))))) & 
    '$existential'( Exists_Leftof7, 
      1, 
      exists( Exists_Leftof8, 
        exists( Leftof13, 
          ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
            nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
            nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
            nesc( leftof(Exists_Leftof8,Leftof13)))))) & 
    '$existential'( Exists_Leftof8, 
      1, 
      exists( Leftof13, 
        ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
          nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
          nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
          nesc( leftof(Exists_Leftof8,Leftof13))))) & 
    '$existential'( Leftof13, 
      1, 
      ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
        nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
        nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
        nesc( leftof(Exists_Leftof8,Leftof13))))) ==> 
  nesc( leftof(Exists_Leftof,Exists_Leftof6))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    ((((" ?Exists_Leftof6 leftof ?Exists_Leftof7 " is possibly false  and
%~     by default ?Exists_Leftof exists(Exists_Leftof6,exists(Exists_Leftof7,exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))))) ) and
%~     by default ?Exists_Leftof6 exists(Exists_Leftof7,exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))))) ) and
%~     by default ?Exists_Leftof7 exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))) ) and
%~     by default ?Exists_Leftof8 exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))) ) and
%~     by default ?Leftof13 ((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))
%~  It's Proof that:
%~    " ?Exists_Leftof leftof ?Exists_Leftof6 " is possibly false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( poss( ~( leftof(Exists_Leftof6,Exists_Leftof7)))  &
    '$existential'( Exists_Leftof, 
      1, 
      exists( Exists_Leftof6, 
        exists( Exists_Leftof7, 
          exists( Exists_Leftof8, 
            exists( Leftof13, 
              ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
                nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
                nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
                nesc( leftof(Exists_Leftof8,Leftof13)))))))) & 
    '$existential'( Exists_Leftof6, 
      1, 
      exists( Exists_Leftof7, 
        exists( Exists_Leftof8, 
          exists( Leftof13, 
            ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
              nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
              nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
              nesc( leftof(Exists_Leftof8,Leftof13))))))) & 
    '$existential'( Exists_Leftof7, 
      1, 
      exists( Exists_Leftof8, 
        exists( Leftof13, 
          ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
            nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
            nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
            nesc( leftof(Exists_Leftof8,Leftof13)))))) & 
    '$existential'( Exists_Leftof8, 
      1, 
      exists( Leftof13, 
        ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
          nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
          nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
          nesc( leftof(Exists_Leftof8,Leftof13))))) & 
    '$existential'( Leftof13, 
      1, 
      ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
        nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
        nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
        nesc( leftof(Exists_Leftof8,Leftof13))))) ==> 
  poss( ~( leftof(Exists_Leftof,Exists_Leftof6)))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    ( by default ?Exists_Leftof7 exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))))  and
%~     by default ?Exists_Leftof8 exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))) ) and
%~     by default ?Leftof13 ((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))
%~  It's Proof that:
%~    " ?Exists_Leftof7 leftof ?Exists_Leftof8 " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( '$existential'( Exists_Leftof7, 
      1, 
      exists( Exists_Leftof8, 
        exists( Leftof13, 
          ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
            nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
            nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
            nesc( leftof(Exists_Leftof8,Leftof13))))))  &
    '$existential'( Exists_Leftof8, 
      1, 
      exists( Leftof13, 
        ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
          nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
          nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
          nesc( leftof(Exists_Leftof8,Leftof13))))) & 
    '$existential'( Leftof13, 
      1, 
      ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
        nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
        nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
        nesc( leftof(Exists_Leftof8,Leftof13))))) ==> 
  nesc( leftof(Exists_Leftof7,Exists_Leftof8))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~     by default ?Exists_Leftof8 exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))  and
%~     by default ?Leftof13 ((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))
%~  It's Proof that:
%~    " ?Exists_Leftof8 leftof ?Leftof13 " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( '$existential'( Exists_Leftof8, 
      1, 
      exists( Leftof13, 
        ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
          nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
          nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
          nesc( leftof(Exists_Leftof8,Leftof13))))) & 
    '$existential'( Leftof13, 
      1, 
      ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
        nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
        nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
        nesc( leftof(Exists_Leftof8,Leftof13))))) ==> 
  nesc( leftof(Exists_Leftof8,Leftof13))).

============================================
%~ kif_to_boxlog_attvars2 = exists('$VAR'('H1'),exists('$VAR'('H2'),exists('$VAR'('H3'),exists('$VAR'('H4'),exists('$VAR'('H5'),necessary(and(and(and(leftof('$VAR'('H1'),'$VAR'('H2')),leftof('$VAR'('H2'),'$VAR'('H3'))),leftof('$VAR'('H3'),'$VAR'('H4'))),leftof('$VAR'('H4'),'$VAR'('H5')))))))))
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~     by default ?H4 exists(H5,((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5)))  and
%~     by default ?H5 ((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5))
%~  It's Proof that:
%~    " ?H4 leftof ?H5 " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( '$existential'( H4, 
      1, 
      exists( H5, 
        ( nesc( leftof(H1,H2))  &
          nesc( leftof(H2,H3)) & 
          nesc( leftof(H3,H4)) & 
          nesc( leftof(H4,H5))))) & 
    '$existential'( H5, 
      1, 
      ( nesc( leftof(H1,H2))  &
        nesc( leftof(H2,H3)) & 
        nesc( leftof(H3,H4)) & 
        nesc( leftof(H4,H5))))) ==> 
  nesc( leftof(H4,H5))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    ( by default ?H3 exists(H4,exists(H5,((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5))))  and
%~     by default ?H4 exists(H5,((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5))) ) and
%~     by default ?H5 ((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5))
%~  It's Proof that:
%~    " ?H3 leftof ?H4 " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( '$existential'( H3, 
      1, 
      exists( H4, 
        exists( H5, 
          ( nesc( leftof(H1,H2))  &
            nesc( leftof(H2,H3)) & 
            nesc( leftof(H3,H4)) & 
            nesc( leftof(H4,H5))))))  &
    '$existential'( H4, 
      1, 
      exists( H5, 
        ( nesc( leftof(H1,H2))  &
          nesc( leftof(H2,H3)) & 
          nesc( leftof(H3,H4)) & 
          nesc( leftof(H4,H5))))) & 
    '$existential'( H5, 
      1, 
      ( nesc( leftof(H1,H2))  &
        nesc( leftof(H2,H3)) & 
        nesc( leftof(H3,H4)) & 
        nesc( leftof(H4,H5))))) ==> 
  nesc( leftof(H3,H4))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    (((" ?H1 leftof ?H2 " is possibly false  and
%~     by default ?H2 exists(H3,exists(H4,exists(H5,((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5))))) ) and
%~     by default ?H3 exists(H4,exists(H5,((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5)))) ) and
%~     by default ?H4 exists(H5,((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5))) ) and
%~     by default ?H5 ((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5))
%~  It's Proof that:
%~    " ?H2 leftof ?H3 " is possibly false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( poss( ~( leftof(H1,H2)))  &
    '$existential'( H2, 
      1, 
      exists( H3, 
        exists( H4, 
          exists( H5, 
            ( nesc( leftof(H1,H2))  &
              nesc( leftof(H2,H3)) & 
              nesc( leftof(H3,H4)) & 
              nesc( leftof(H4,H5))))))) & 
    '$existential'( H3, 
      1, 
      exists( H4, 
        exists( H5, 
          ( nesc( leftof(H1,H2))  &
            nesc( leftof(H2,H3)) & 
            nesc( leftof(H3,H4)) & 
            nesc( leftof(H4,H5)))))) & 
    '$existential'( H4, 
      1, 
      exists( H5, 
        ( nesc( leftof(H1,H2))  &
          nesc( leftof(H2,H3)) & 
          nesc( leftof(H3,H4)) & 
          nesc( leftof(H4,H5))))) & 
    '$existential'( H5, 
      1, 
      ( nesc( leftof(H1,H2))  &
        nesc( leftof(H2,H3)) & 
        nesc( leftof(H3,H4)) & 
        nesc( leftof(H4,H5))))) ==> 
  poss( ~( leftof(H2,H3)))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    ((((" ?H2 leftof ?H3 " is necessarily true  and
%~     by default ?H1 exists(H2,exists(H3,exists(H4,exists(H5,((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5)))))) ) and
%~     by default ?H2 exists(H3,exists(H4,exists(H5,((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5))))) ) and
%~     by default ?H3 exists(H4,exists(H5,((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5)))) ) and
%~     by default ?H4 exists(H5,((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5))) ) and
%~     by default ?H5 ((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5))
%~  It's Proof that:
%~    " ?H1 leftof ?H2 " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( nesc( leftof(H2,H3))  &
    '$existential'( H1, 
      1, 
      exists( H2, 
        exists( H3, 
          exists( H4, 
            exists( H5, 
              ( nesc( leftof(H1,H2))  &
                nesc( leftof(H2,H3)) & 
                nesc( leftof(H3,H4)) & 
                nesc( leftof(H4,H5)))))))) & 
    '$existential'( H2, 
      1, 
      exists( H3, 
        exists( H4, 
          exists( H5, 
            ( nesc( leftof(H1,H2))  &
              nesc( leftof(H2,H3)) & 
              nesc( leftof(H3,H4)) & 
              nesc( leftof(H4,H5))))))) & 
    '$existential'( H3, 
      1, 
      exists( H4, 
        exists( H5, 
          ( nesc( leftof(H1,H2))  &
            nesc( leftof(H2,H3)) & 
            nesc( leftof(H3,H4)) & 
            nesc( leftof(H4,H5)))))) & 
    '$existential'( H4, 
      1, 
      exists( H5, 
        ( nesc( leftof(H1,H2))  &
          nesc( leftof(H2,H3)) & 
          nesc( leftof(H3,H4)) & 
          nesc( leftof(H4,H5))))) & 
    '$existential'( H5, 
      1, 
      ( nesc( leftof(H1,H2))  &
        nesc( leftof(H2,H3)) & 
        nesc( leftof(H3,H4)) & 
        nesc( leftof(H4,H5))))) ==> 
  nesc( leftof(H1,H2))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    ((((" ?H2 leftof ?H3 " is possibly false  and
%~     by default ?H1 exists(H2,exists(H3,exists(H4,exists(H5,((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5)))))) ) and
%~     by default ?H2 exists(H3,exists(H4,exists(H5,((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5))))) ) and
%~     by default ?H3 exists(H4,exists(H5,((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5)))) ) and
%~     by default ?H4 exists(H5,((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5))) ) and
%~     by default ?H5 ((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5))
%~  It's Proof that:
%~    " ?H1 leftof ?H2 " is possibly false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( poss( ~( leftof(H2,H3)))  &
    '$existential'( H1, 
      1, 
      exists( H2, 
        exists( H3, 
          exists( H4, 
            exists( H5, 
              ( nesc( leftof(H1,H2))  &
                nesc( leftof(H2,H3)) & 
                nesc( leftof(H3,H4)) & 
                nesc( leftof(H4,H5)))))))) & 
    '$existential'( H2, 
      1, 
      exists( H3, 
        exists( H4, 
          exists( H5, 
            ( nesc( leftof(H1,H2))  &
              nesc( leftof(H2,H3)) & 
              nesc( leftof(H3,H4)) & 
              nesc( leftof(H4,H5))))))) & 
    '$existential'( H3, 
      1, 
      exists( H4, 
        exists( H5, 
          ( nesc( leftof(H1,H2))  &
            nesc( leftof(H2,H3)) & 
            nesc( leftof(H3,H4)) & 
            nesc( leftof(H4,H5)))))) & 
    '$existential'( H4, 
      1, 
      exists( H5, 
        ( nesc( leftof(H1,H2))  &
          nesc( leftof(H2,H3)) & 
          nesc( leftof(H3,H4)) & 
          nesc( leftof(H4,H5))))) & 
    '$existential'( H5, 
      1, 
      ( nesc( leftof(H1,H2))  &
        nesc( leftof(H2,H3)) & 
        nesc( leftof(H3,H4)) & 
        nesc( leftof(H4,H5))))) ==> 
  poss( ~( leftof(H1,H2)))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    (((" ?H1 leftof ?H2 " is necessarily true  and
%~     by default ?H2 exists(H3,exists(H4,exists(H5,((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5))))) ) and
%~     by default ?H3 exists(H4,exists(H5,((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5)))) ) and
%~     by default ?H4 exists(H5,((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5))) ) and
%~     by default ?H5 ((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5))
%~  It's Proof that:
%~    " ?H2 leftof ?H3 " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( nesc( leftof(H1,H2))  &
    '$existential'( H2, 
      1, 
      exists( H3, 
        exists( H4, 
          exists( H5, 
            ( nesc( leftof(H1,H2))  &
              nesc( leftof(H2,H3)) & 
              nesc( leftof(H3,H4)) & 
              nesc( leftof(H4,H5))))))) & 
    '$existential'( H3, 
      1, 
      exists( H4, 
        exists( H5, 
          ( nesc( leftof(H1,H2))  &
            nesc( leftof(H2,H3)) & 
            nesc( leftof(H3,H4)) & 
            nesc( leftof(H4,H5)))))) & 
    '$existential'( H4, 
      1, 
      exists( H5, 
        ( nesc( leftof(H1,H2))  &
          nesc( leftof(H2,H3)) & 
          nesc( leftof(H3,H4)) & 
          nesc( leftof(H4,H5))))) & 
    '$existential'( H5, 
      1, 
      ( nesc( leftof(H1,H2))  &
        nesc( leftof(H2,H3)) & 
        nesc( leftof(H3,H4)) & 
        nesc( leftof(H4,H5))))) ==> 
  nesc( leftof(H2,H3))).

~*/
%~ unused(no_junit_results)

%~ test_completed_exit(0)
```
totalTime=5.000

FAILED: /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-junit-minor -k five_leftof_exactly_02.pl (returned 0) Add_LABELS='' Rem_LABELS='Skipped,Skipped,Errors,Warnings,Overtime,Skipped,Skipped'

logicmoo.base.fol.fiveof.FIVE_LEFTOF_INSTS_02

Test case:logicmoo.base.fol.fiveof.FIVE_LEFTOF_INSTS_02 JUnit
Outcome:Failed
Duration:3.0 sec
FailedFAILED: /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-junit-minor -k five_leftof_insts_02.pl (returned 0)
failed
Stderr
 (cd /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_base/t/examples/fol/fiveof ; timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "['five_leftof_insts_02.pl']")

% EDIT: https://github.com/logicmoo/logicmoo_workspace/edit/master/packs_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_insts_02.pl 
% JENKINS: https://jenkins.logicmoo.org/job/logicmoo_workspace/lastBuild/testReport/logicmoo.base.fol.fiveof/FIVE_LEFTOF_INSTS_02/ 
% ISSUE_SEARCH: https://github.com/logicmoo/logicmoo_workspace/issues?q=is%3Aissue+label%3AFIVE_LEFTOF_INSTS_02 
% ISSUE: https://github.com/logicmoo/logicmoo_workspace/issues/621 


```
%~ init_phase(after_load)
%~ init_phase(restore_state)
%
%~ init_why(after_boot,program)
%~ after_boot.
%~ Dont forget to ?- logicmoo_i_cyc_xform.
running('/var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_insts_02.pl'),
%~ this_test_might_need( :-( expects_dialect(pfc)))
%~ /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_utils/prolog/logicmoo_test_header.pl:93 
%~ this_test_might_need( :-( use_module( library(logicmoo_plarkc))))

% =============================================
% File 'mpred_builtin.pfc'
% Purpose: Agent Reactivity for SWI-Prolog
% Maintainer: Douglas Miles
% Contact: $Author: dmiles $@users.sourceforge.net %
% Version: 'interface' 1.0.0
% Revision: $Revision: 1.9 $
% Revised At: $Date: 2002/06/27 14:13:20 $
% =============================================
%
:- expects_dialect(clif).
/*~
~*/

:- set_prolog_flag(gc,false).
  
% There are five houses in a row.



/*~
~*/

  
% There are five houses in a row.



(leftof(h1, h2) & leftof(h2, h3) & leftof(h3, h4) & leftof(h4, h5)).

% leftof(h3,h4)
% leftof(h4,h5)
% poss(leftof(h1,h2))==>leftof(h2,h3).
% poss(leftof(h2,h3))==>leftof(h1,h2).
% ~leftof(h1,h2)==>nesc(~leftof(h2,h3)).
% ~leftof(h2,h3)==>nesc(~leftof(h1,h2)).



% EDIT: https://github.com/logicmoo/logicmoo_workspace/edit/master/packs_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_insts_02.pl 
% JENKINS: https://jenkins.logicmoo.org/job/logicmoo_workspace/lastBuild/testReport/logicmoo.base.fol.fiveof/FIVE_LEFTOF_INSTS_02/logicmoo_base_fol_fiveof_FIVE_LEFTOF_INSTS_02_JUnit/ 
% ISSUE_SEARCH: https://github.com/logicmoo/logicmoo_workspace/issues?q=is%3Aissue+label%3AFIVE_LEFTOF_INSTS_02 

% ISSUE: https://github.com/logicmoo/logicmoo_workspace/issues/621
/*~
%~ debugm( baseKB,
%~   show_success(baseKB,baseKB:ain(clif(((leftof(h1,h2)&leftof(h2,h3))&leftof(h3,h4))&leftof(h4,h5)))))
%   xgrun compiled into parser_chat80 0.00 sec, 0 clauses
%   xgproc compiled into parser_chat80 0.02 sec, 0 clauses


** Grammar from file /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_nlu/ext/chat80/original/clone.xg: 1617 words .. **



** Grammar from file /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_nlu/ext/chat80/original/lex.xg: 336 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.24 sec, 3 clauses
% /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_utils/prolog/debuggery/dmsg compiled into dmsg 0.12 sec, -16 clauses




=======================================================
&(&(&(leftof(h1,h2),leftof(h2,h3)),leftof(h3,h4)),leftof(h4,h5))
============================================


?- kif_to_boxlog( ((leftof(h1,h2)&leftof(h2,h3))&leftof(h3,h4))&leftof(h4,h5) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  ((" h1 leftof h2 "  and
%~    " h2 leftof h3 " ) and
%~    " h3 leftof h4 " ) and
%~    " h4 leftof h5 "
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(and(and(and(leftof(h1,h2),leftof(h2,h3)),leftof(h3,h4)),leftof(h4,h5)))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 6 entailment(s): 
nesc(leftof(h3,h4)).
nesc(leftof(h4,h5)).
nesc(leftof(h1,h2))==>nesc(leftof(h2,h3)).
nesc(leftof(h2,h3))==>nesc(leftof(h1,h2)).
poss(~leftof(h1,h2))==>poss(~leftof(h2,h3)).
poss(~leftof(h2,h3))==>poss(~leftof(h1,h2)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  it is necessarily true that h3 leftof h4
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc( leftof(h3,h4)).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  it is necessarily true that h4 leftof h5
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc( leftof(h4,h5)).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " h1 leftof h2 " is necessarily true
%~  It's Proof that:
%~    " h2 leftof h3 " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc(leftof(h1,h2))==>nesc(leftof(h2,h3)).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " h2 leftof h3 " is necessarily true
%~  It's Proof that:
%~    " h1 leftof h2 " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc(leftof(h2,h3))==>nesc(leftof(h1,h2)).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " h1 leftof h2 " is possibly false
%~  It's Proof that:
%~    " h2 leftof h3 " is possibly false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

poss(~leftof(h1,h2))==>poss(~leftof(h2,h3)).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " h2 leftof h3 " is possibly false
%~  It's Proof that:
%~    " h1 leftof h2 " is possibly false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

poss(~leftof(h2,h3))==>poss(~leftof(h1,h2)).

============================================
%~ kif_to_boxlog_attvars2 = necessary(and(and(and(leftof(h1,h2),leftof(h2,h3)),leftof(h3,h4)),leftof(h4,h5)))
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  it is necessarily true that h4 leftof h5
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc( leftof(h4,h5)).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  it is necessarily true that h3 leftof h4
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc( leftof(h3,h4)).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " h1 leftof h2 " is possibly false
%~  It's Proof that:
%~    " h2 leftof h3 " is possibly false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

poss(~leftof(h1,h2))==>poss(~leftof(h2,h3)).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " h2 leftof h3 " is necessarily true
%~  It's Proof that:
%~    " h1 leftof h2 " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc(leftof(h2,h3))==>nesc(leftof(h1,h2)).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " h2 leftof h3 " is possibly false
%~  It's Proof that:
%~    " h1 leftof h2 " is possibly false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

poss(~leftof(h2,h3))==>poss(~leftof(h1,h2)).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " h1 leftof h2 " is necessarily true
%~  It's Proof that:
%~    " h2 leftof h3 " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc(leftof(h1,h2))==>nesc(leftof(h2,h3)).

~*/
%~ unused(no_junit_results)

%~ test_completed_exit(0)
```
totalTime=3.000

FAILED: /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-junit-minor -k five_leftof_insts_02.pl (returned 0) Add_LABELS='' Rem_LABELS='Skipped,Skipped,Errors,Warnings,Overtime,Skipped,Skipped'

logicmoo.base.fol.fiveof.FIVE_LEFTOF_SKOLLEM_02

Test case:logicmoo.base.fol.fiveof.FIVE_LEFTOF_SKOLLEM_02 JUnit
Outcome:Failed
Duration:5.0 sec
FailedFAILED: /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-junit-minor -k five_leftof_skollem_02.pl (returned 0)
failed
Stderr
 (cd /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_base/t/examples/fol/fiveof ; timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "['five_leftof_skollem_02.pl']")

% EDIT: https://github.com/logicmoo/logicmoo_workspace/edit/master/packs_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_skollem_02.pl 
% JENKINS: https://jenkins.logicmoo.org/job/logicmoo_workspace/lastBuild/testReport/logicmoo.base.fol.fiveof/FIVE_LEFTOF_SKOLLEM_02/ 
% ISSUE_SEARCH: https://github.com/logicmoo/logicmoo_workspace/issues?q=is%3Aissue+label%3AFIVE_LEFTOF_SKOLLEM_02 
% ISSUE: https://github.com/logicmoo/logicmoo_workspace/issues/620 


```
%~ init_phase(after_load)
%~ init_phase(restore_state)
%
%~ init_why(after_boot,program)
%~ after_boot.
%~ Dont forget to ?- logicmoo_i_cyc_xform.
running('/var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_skollem_02.pl'),
%~ this_test_might_need( :-( expects_dialect(pfc)))
%~ this_test_might_need( :-( use_module( library(logicmoo_plarkc))))

% =============================================
% File 'mpred_builtin.pfc'
% Purpose: Agent Reactivity for SWI-Prolog
% Maintainer: Douglas Miles
% Contact: $Author: dmiles $@users.sourceforge.net %
% Version: 'interface' 1.0.0
% Revision: $Revision: 1.9 $
% Revised At: $Date: 2002/06/27 14:13:20 $
% =============================================
%
:- expects_dialect(clif).
/*~
~*/

:- set_prolog_flag(gc,false).
  
% There are five houses in a row.

/*~
~*/

  
% There are five houses in a row.

exists(H1,exists(H2,exists(H3,exists(H4,exists(H5,
 (leftof(H1, H2) & leftof(H2, H3) & leftof(H3, H4) & leftof(H4, H5))))))).




% EDIT: https://github.com/logicmoo/logicmoo_workspace/edit/master/packs_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_skollem_02.pl 
% JENKINS: https://jenkins.logicmoo.org/job/logicmoo_workspace/lastBuild/testReport/logicmoo.base.fol.fiveof/FIVE_LEFTOF_SKOLLEM_02/logicmoo_base_fol_fiveof_FIVE_LEFTOF_SKOLLEM_02_JUnit/ 
% ISSUE_SEARCH: https://github.com/logicmoo/logicmoo_workspace/issues?q=is%3Aissue+label%3AFIVE_LEFTOF_SKOLLEM_02 

% ISSUE: https://github.com/logicmoo/logicmoo_workspace/issues/620
/*~
%~ debugm( baseKB,
%~   show_success( baseKB,
%~     baseKB : ain( clif( exists( H1,
%~                           exists( H2,
%~                             exists( H3,
%~                               exists( H4,
%~                                 exists( H5,
%~                                   ( leftof(H1,H2)  &
%~                                     leftof(H2,H3) &
%~                                     leftof(H3,H4) &
%~                                     leftof(H4,H5)))))))))))
%   xgrun compiled into parser_chat80 0.00 sec, 0 clauses
%   xgproc compiled into parser_chat80 0.02 sec, 0 clauses


** Grammar from file /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_nlu/ext/chat80/original/clone.xg: 1597 words .. **



** Grammar from file /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_nlu/ext/chat80/original/lex.xg: 357 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.27 sec, 3 clauses
% /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_utils/prolog/debuggery/dmsg compiled into dmsg 0.12 sec, -16 clauses




=======================================================
exists('$VAR'('Exists_Leftof'),exists('$VAR'('Exists_Leftof6'),exists('$VAR'('Exists_Leftof7'),exists('$VAR'('Exists_Leftof8'),exists('$VAR'('Leftof13'),&(&(&(leftof('$VAR'('Exists_Leftof'),'$VAR'('Exists_Leftof6')),leftof('$VAR'('Exists_Leftof6'),'$VAR'('Exists_Leftof7'))),leftof('$VAR'('Exists_Leftof7'),'$VAR'('Exists_Leftof8'))),leftof('$VAR'('Exists_Leftof8'),'$VAR'('Leftof13'))))))))
============================================


?- kif_to_boxlog( exists(Exists_Leftof,exists(Exists_Leftof6,exists(Exists_Leftof7,exists(Exists_Leftof8,exists(Leftof13,((leftof(Exists_Leftof,Exists_Leftof6)&leftof(Exists_Leftof6,Exists_Leftof7))&leftof(Exists_Leftof7,Exists_Leftof8))&leftof(Exists_Leftof8,Leftof13)))))) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ 
%~  There exists ?Exists_Leftof
%~    (
%~  There exists ?Exists_Leftof6
%~    (
%~  There exists ?Exists_Leftof7
%~    (
%~  There exists ?Exists_Leftof8
%~    (
%~  There exists ?Leftof13
%~    (((" ?Exists_Leftof leftof ?Exists_Leftof6 "  and
%~    " ?Exists_Leftof6 leftof ?Exists_Leftof7 " ) and
%~    " ?Exists_Leftof7 leftof ?Exists_Leftof8 " ) and
%~    " ?Exists_Leftof8 leftof ?Leftof13 " )))))
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = exists('$VAR'('Exists_Leftof'),exists('$VAR'('Exists_Leftof6'),exists('$VAR'('Exists_Leftof7'),exists('$VAR'('Exists_Leftof8'),exists('$VAR'('Leftof13'),necessary(and(and(and(leftof('$VAR'('Exists_Leftof'),'$VAR'('Exists_Leftof6')),leftof('$VAR'('Exists_Leftof6'),'$VAR'('Exists_Leftof7'))),leftof('$VAR'('Exists_Leftof7'),'$VAR'('Exists_Leftof8'))),leftof('$VAR'('Exists_Leftof8'),'$VAR'('Leftof13')))))))))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 6 entailment(s): 
(((nesc(leftof(Exists_Leftof,Exists_Leftof6))&'$existential'(Exists_Leftof6,1,exists(Exists_Leftof7,exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))))))&'$existential'(Exists_Leftof7,1,exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))))))&'$existential'(Exists_Leftof8,1,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))))&'$existential'(Leftof13,1,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))==>nesc(leftof(Exists_Leftof6,Exists_Leftof7)).
(((poss(~leftof(Exists_Leftof,Exists_Leftof6))&'$existential'(Exists_Leftof6,1,exists(Exists_Leftof7,exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))))))&'$existential'(Exists_Leftof7,1,exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))))))&'$existential'(Exists_Leftof8,1,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))))&'$existential'(Leftof13,1,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))==>poss(~leftof(Exists_Leftof6,Exists_Leftof7)).
((((nesc(leftof(Exists_Leftof6,Exists_Leftof7))&'$existential'(Exists_Leftof,1,exists(Exists_Leftof6,exists(Exists_Leftof7,exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))))))))&'$existential'(Exists_Leftof6,1,exists(Exists_Leftof7,exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))))))&'$existential'(Exists_Leftof7,1,exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))))))&'$existential'(Exists_Leftof8,1,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))))&'$existential'(Leftof13,1,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))==>nesc(leftof(Exists_Leftof,Exists_Leftof6)).
((((poss(~leftof(Exists_Leftof6,Exists_Leftof7))&'$existential'(Exists_Leftof,1,exists(Exists_Leftof6,exists(Exists_Leftof7,exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))))))))&'$existential'(Exists_Leftof6,1,exists(Exists_Leftof7,exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))))))&'$existential'(Exists_Leftof7,1,exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))))))&'$existential'(Exists_Leftof8,1,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))))&'$existential'(Leftof13,1,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))==>poss(~leftof(Exists_Leftof,Exists_Leftof6)).
('$existential'(Exists_Leftof7,1,exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))))&'$existential'(Exists_Leftof8,1,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))))&'$existential'(Leftof13,1,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))==>nesc(leftof(Exists_Leftof7,Exists_Leftof8)).
'$existential'(Exists_Leftof8,1,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))))&'$existential'(Leftof13,1,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))==>nesc(leftof(Exists_Leftof8,Leftof13)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    (((" ?Exists_Leftof leftof ?Exists_Leftof6 " is necessarily true  and
%~     by default ?Exists_Leftof6 exists(Exists_Leftof7,exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))))) ) and
%~     by default ?Exists_Leftof7 exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))) ) and
%~     by default ?Exists_Leftof8 exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))) ) and
%~     by default ?Leftof13 ((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))
%~  It's Proof that:
%~    " ?Exists_Leftof6 leftof ?Exists_Leftof7 " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
    '$existential'( Exists_Leftof6, 
      1, 
      exists( Exists_Leftof7, 
        exists( Exists_Leftof8, 
          exists( Leftof13, 
            ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
              nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
              nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
              nesc( leftof(Exists_Leftof8,Leftof13))))))) & 
    '$existential'( Exists_Leftof7, 
      1, 
      exists( Exists_Leftof8, 
        exists( Leftof13, 
          ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
            nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
            nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
            nesc( leftof(Exists_Leftof8,Leftof13)))))) & 
    '$existential'( Exists_Leftof8, 
      1, 
      exists( Leftof13, 
        ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
          nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
          nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
          nesc( leftof(Exists_Leftof8,Leftof13))))) & 
    '$existential'( Leftof13, 
      1, 
      ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
        nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
        nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
        nesc( leftof(Exists_Leftof8,Leftof13))))) ==> 
  nesc( leftof(Exists_Leftof6,Exists_Leftof7))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    (((" ?Exists_Leftof leftof ?Exists_Leftof6 " is possibly false  and
%~     by default ?Exists_Leftof6 exists(Exists_Leftof7,exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))))) ) and
%~     by default ?Exists_Leftof7 exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))) ) and
%~     by default ?Exists_Leftof8 exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))) ) and
%~     by default ?Leftof13 ((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))
%~  It's Proof that:
%~    " ?Exists_Leftof6 leftof ?Exists_Leftof7 " is possibly false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( poss( ~( leftof(Exists_Leftof,Exists_Leftof6)))  &
    '$existential'( Exists_Leftof6, 
      1, 
      exists( Exists_Leftof7, 
        exists( Exists_Leftof8, 
          exists( Leftof13, 
            ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
              nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
              nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
              nesc( leftof(Exists_Leftof8,Leftof13))))))) & 
    '$existential'( Exists_Leftof7, 
      1, 
      exists( Exists_Leftof8, 
        exists( Leftof13, 
          ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
            nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
            nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
            nesc( leftof(Exists_Leftof8,Leftof13)))))) & 
    '$existential'( Exists_Leftof8, 
      1, 
      exists( Leftof13, 
        ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
          nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
          nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
          nesc( leftof(Exists_Leftof8,Leftof13))))) & 
    '$existential'( Leftof13, 
      1, 
      ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
        nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
        nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
        nesc( leftof(Exists_Leftof8,Leftof13))))) ==> 
  poss( ~( leftof(Exists_Leftof6,Exists_Leftof7)))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    ((((" ?Exists_Leftof6 leftof ?Exists_Leftof7 " is necessarily true  and
%~     by default ?Exists_Leftof exists(Exists_Leftof6,exists(Exists_Leftof7,exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))))) ) and
%~     by default ?Exists_Leftof6 exists(Exists_Leftof7,exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))))) ) and
%~     by default ?Exists_Leftof7 exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))) ) and
%~     by default ?Exists_Leftof8 exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))) ) and
%~     by default ?Leftof13 ((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))
%~  It's Proof that:
%~    " ?Exists_Leftof leftof ?Exists_Leftof6 " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( nesc( leftof(Exists_Leftof6,Exists_Leftof7))  &
    '$existential'( Exists_Leftof, 
      1, 
      exists( Exists_Leftof6, 
        exists( Exists_Leftof7, 
          exists( Exists_Leftof8, 
            exists( Leftof13, 
              ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
                nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
                nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
                nesc( leftof(Exists_Leftof8,Leftof13)))))))) & 
    '$existential'( Exists_Leftof6, 
      1, 
      exists( Exists_Leftof7, 
        exists( Exists_Leftof8, 
          exists( Leftof13, 
            ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
              nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
              nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
              nesc( leftof(Exists_Leftof8,Leftof13))))))) & 
    '$existential'( Exists_Leftof7, 
      1, 
      exists( Exists_Leftof8, 
        exists( Leftof13, 
          ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
            nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
            nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
            nesc( leftof(Exists_Leftof8,Leftof13)))))) & 
    '$existential'( Exists_Leftof8, 
      1, 
      exists( Leftof13, 
        ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
          nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
          nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
          nesc( leftof(Exists_Leftof8,Leftof13))))) & 
    '$existential'( Leftof13, 
      1, 
      ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
        nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
        nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
        nesc( leftof(Exists_Leftof8,Leftof13))))) ==> 
  nesc( leftof(Exists_Leftof,Exists_Leftof6))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    ((((" ?Exists_Leftof6 leftof ?Exists_Leftof7 " is possibly false  and
%~     by default ?Exists_Leftof exists(Exists_Leftof6,exists(Exists_Leftof7,exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))))) ) and
%~     by default ?Exists_Leftof6 exists(Exists_Leftof7,exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))))) ) and
%~     by default ?Exists_Leftof7 exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))) ) and
%~     by default ?Exists_Leftof8 exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))) ) and
%~     by default ?Leftof13 ((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))
%~  It's Proof that:
%~    " ?Exists_Leftof leftof ?Exists_Leftof6 " is possibly false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( poss( ~( leftof(Exists_Leftof6,Exists_Leftof7)))  &
    '$existential'( Exists_Leftof, 
      1, 
      exists( Exists_Leftof6, 
        exists( Exists_Leftof7, 
          exists( Exists_Leftof8, 
            exists( Leftof13, 
              ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
                nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
                nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
                nesc( leftof(Exists_Leftof8,Leftof13)))))))) & 
    '$existential'( Exists_Leftof6, 
      1, 
      exists( Exists_Leftof7, 
        exists( Exists_Leftof8, 
          exists( Leftof13, 
            ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
              nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
              nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
              nesc( leftof(Exists_Leftof8,Leftof13))))))) & 
    '$existential'( Exists_Leftof7, 
      1, 
      exists( Exists_Leftof8, 
        exists( Leftof13, 
          ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
            nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
            nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
            nesc( leftof(Exists_Leftof8,Leftof13)))))) & 
    '$existential'( Exists_Leftof8, 
      1, 
      exists( Leftof13, 
        ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
          nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
          nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
          nesc( leftof(Exists_Leftof8,Leftof13))))) & 
    '$existential'( Leftof13, 
      1, 
      ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
        nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
        nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
        nesc( leftof(Exists_Leftof8,Leftof13))))) ==> 
  poss( ~( leftof(Exists_Leftof,Exists_Leftof6)))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    ( by default ?Exists_Leftof7 exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))))  and
%~     by default ?Exists_Leftof8 exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))) ) and
%~     by default ?Leftof13 ((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))
%~  It's Proof that:
%~    " ?Exists_Leftof7 leftof ?Exists_Leftof8 " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( '$existential'( Exists_Leftof7, 
      1, 
      exists( Exists_Leftof8, 
        exists( Leftof13, 
          ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
            nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
            nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
            nesc( leftof(Exists_Leftof8,Leftof13))))))  &
    '$existential'( Exists_Leftof8, 
      1, 
      exists( Leftof13, 
        ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
          nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
          nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
          nesc( leftof(Exists_Leftof8,Leftof13))))) & 
    '$existential'( Leftof13, 
      1, 
      ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
        nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
        nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
        nesc( leftof(Exists_Leftof8,Leftof13))))) ==> 
  nesc( leftof(Exists_Leftof7,Exists_Leftof8))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~     by default ?Exists_Leftof8 exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))  and
%~     by default ?Leftof13 ((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))
%~  It's Proof that:
%~    " ?Exists_Leftof8 leftof ?Leftof13 " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( '$existential'( Exists_Leftof8, 
      1, 
      exists( Leftof13, 
        ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
          nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
          nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
          nesc( leftof(Exists_Leftof8,Leftof13))))) & 
    '$existential'( Leftof13, 
      1, 
      ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
        nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
        nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
        nesc( leftof(Exists_Leftof8,Leftof13))))) ==> 
  nesc( leftof(Exists_Leftof8,Leftof13))).

============================================
%~ kif_to_boxlog_attvars2 = exists('$VAR'('H1'),exists('$VAR'('H2'),exists('$VAR'('H3'),exists('$VAR'('H4'),exists('$VAR'('H5'),necessary(and(and(and(leftof('$VAR'('H1'),'$VAR'('H2')),leftof('$VAR'('H2'),'$VAR'('H3'))),leftof('$VAR'('H3'),'$VAR'('H4'))),leftof('$VAR'('H4'),'$VAR'('H5')))))))))
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~     by default ?H4 exists(H5,((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5)))  and
%~     by default ?H5 ((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5))
%~  It's Proof that:
%~    " ?H4 leftof ?H5 " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( '$existential'( H4, 
      1, 
      exists( H5, 
        ( nesc( leftof(H1,H2))  &
          nesc( leftof(H2,H3)) & 
          nesc( leftof(H3,H4)) & 
          nesc( leftof(H4,H5))))) & 
    '$existential'( H5, 
      1, 
      ( nesc( leftof(H1,H2))  &
        nesc( leftof(H2,H3)) & 
        nesc( leftof(H3,H4)) & 
        nesc( leftof(H4,H5))))) ==> 
  nesc( leftof(H4,H5))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    ( by default ?H3 exists(H4,exists(H5,((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5))))  and
%~     by default ?H4 exists(H5,((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5))) ) and
%~     by default ?H5 ((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5))
%~  It's Proof that:
%~    " ?H3 leftof ?H4 " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( '$existential'( H3, 
      1, 
      exists( H4, 
        exists( H5, 
          ( nesc( leftof(H1,H2))  &
            nesc( leftof(H2,H3)) & 
            nesc( leftof(H3,H4)) & 
            nesc( leftof(H4,H5))))))  &
    '$existential'( H4, 
      1, 
      exists( H5, 
        ( nesc( leftof(H1,H2))  &
          nesc( leftof(H2,H3)) & 
          nesc( leftof(H3,H4)) & 
          nesc( leftof(H4,H5))))) & 
    '$existential'( H5, 
      1, 
      ( nesc( leftof(H1,H2))  &
        nesc( leftof(H2,H3)) & 
        nesc( leftof(H3,H4)) & 
        nesc( leftof(H4,H5))))) ==> 
  nesc( leftof(H3,H4))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    (((" ?H1 leftof ?H2 " is possibly false  and
%~     by default ?H2 exists(H3,exists(H4,exists(H5,((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5))))) ) and
%~     by default ?H3 exists(H4,exists(H5,((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5)))) ) and
%~     by default ?H4 exists(H5,((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5))) ) and
%~     by default ?H5 ((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5))
%~  It's Proof that:
%~    " ?H2 leftof ?H3 " is possibly false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( poss( ~( leftof(H1,H2)))  &
    '$existential'( H2, 
      1, 
      exists( H3, 
        exists( H4, 
          exists( H5, 
            ( nesc( leftof(H1,H2))  &
              nesc( leftof(H2,H3)) & 
              nesc( leftof(H3,H4)) & 
              nesc( leftof(H4,H5))))))) & 
    '$existential'( H3, 
      1, 
      exists( H4, 
        exists( H5, 
          ( nesc( leftof(H1,H2))  &
            nesc( leftof(H2,H3)) & 
            nesc( leftof(H3,H4)) & 
            nesc( leftof(H4,H5)))))) & 
    '$existential'( H4, 
      1, 
      exists( H5, 
        ( nesc( leftof(H1,H2))  &
          nesc( leftof(H2,H3)) & 
          nesc( leftof(H3,H4)) & 
          nesc( leftof(H4,H5))))) & 
    '$existential'( H5, 
      1, 
      ( nesc( leftof(H1,H2))  &
        nesc( leftof(H2,H3)) & 
        nesc( leftof(H3,H4)) & 
        nesc( leftof(H4,H5))))) ==> 
  poss( ~( leftof(H2,H3)))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    ((((" ?H2 leftof ?H3 " is necessarily true  and
%~     by default ?H1 exists(H2,exists(H3,exists(H4,exists(H5,((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5)))))) ) and
%~     by default ?H2 exists(H3,exists(H4,exists(H5,((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5))))) ) and
%~     by default ?H3 exists(H4,exists(H5,((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5)))) ) and
%~     by default ?H4 exists(H5,((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5))) ) and
%~     by default ?H5 ((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5))
%~  It's Proof that:
%~    " ?H1 leftof ?H2 " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( nesc( leftof(H2,H3))  &
    '$existential'( H1, 
      1, 
      exists( H2, 
        exists( H3, 
          exists( H4, 
            exists( H5, 
              ( nesc( leftof(H1,H2))  &
                nesc( leftof(H2,H3)) & 
                nesc( leftof(H3,H4)) & 
                nesc( leftof(H4,H5)))))))) & 
    '$existential'( H2, 
      1, 
      exists( H3, 
        exists( H4, 
          exists( H5, 
            ( nesc( leftof(H1,H2))  &
              nesc( leftof(H2,H3)) & 
              nesc( leftof(H3,H4)) & 
              nesc( leftof(H4,H5))))))) & 
    '$existential'( H3, 
      1, 
      exists( H4, 
        exists( H5, 
          ( nesc( leftof(H1,H2))  &
            nesc( leftof(H2,H3)) & 
            nesc( leftof(H3,H4)) & 
            nesc( leftof(H4,H5)))))) & 
    '$existential'( H4, 
      1, 
      exists( H5, 
        ( nesc( leftof(H1,H2))  &
          nesc( leftof(H2,H3)) & 
          nesc( leftof(H3,H4)) & 
          nesc( leftof(H4,H5))))) & 
    '$existential'( H5, 
      1, 
      ( nesc( leftof(H1,H2))  &
        nesc( leftof(H2,H3)) & 
        nesc( leftof(H3,H4)) & 
        nesc( leftof(H4,H5))))) ==> 
  nesc( leftof(H1,H2))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    ((((" ?H2 leftof ?H3 " is possibly false  and
%~     by default ?H1 exists(H2,exists(H3,exists(H4,exists(H5,((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5)))))) ) and
%~     by default ?H2 exists(H3,exists(H4,exists(H5,((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5))))) ) and
%~     by default ?H3 exists(H4,exists(H5,((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5)))) ) and
%~     by default ?H4 exists(H5,((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5))) ) and
%~     by default ?H5 ((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5))
%~  It's Proof that:
%~    " ?H1 leftof ?H2 " is possibly false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( poss( ~( leftof(H2,H3)))  &
    '$existential'( H1, 
      1, 
      exists( H2, 
        exists( H3, 
          exists( H4, 
            exists( H5, 
              ( nesc( leftof(H1,H2))  &
                nesc( leftof(H2,H3)) & 
                nesc( leftof(H3,H4)) & 
                nesc( leftof(H4,H5)))))))) & 
    '$existential'( H2, 
      1, 
      exists( H3, 
        exists( H4, 
          exists( H5, 
            ( nesc( leftof(H1,H2))  &
              nesc( leftof(H2,H3)) & 
              nesc( leftof(H3,H4)) & 
              nesc( leftof(H4,H5))))))) & 
    '$existential'( H3, 
      1, 
      exists( H4, 
        exists( H5, 
          ( nesc( leftof(H1,H2))  &
            nesc( leftof(H2,H3)) & 
            nesc( leftof(H3,H4)) & 
            nesc( leftof(H4,H5)))))) & 
    '$existential'( H4, 
      1, 
      exists( H5, 
        ( nesc( leftof(H1,H2))  &
          nesc( leftof(H2,H3)) & 
          nesc( leftof(H3,H4)) & 
          nesc( leftof(H4,H5))))) & 
    '$existential'( H5, 
      1, 
      ( nesc( leftof(H1,H2))  &
        nesc( leftof(H2,H3)) & 
        nesc( leftof(H3,H4)) & 
        nesc( leftof(H4,H5))))) ==> 
  poss( ~( leftof(H1,H2)))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    (((" ?H1 leftof ?H2 " is necessarily true  and
%~     by default ?H2 exists(H3,exists(H4,exists(H5,((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5))))) ) and
%~     by default ?H3 exists(H4,exists(H5,((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5)))) ) and
%~     by default ?H4 exists(H5,((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5))) ) and
%~     by default ?H5 ((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5))
%~  It's Proof that:
%~    " ?H2 leftof ?H3 " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( nesc( leftof(H1,H2))  &
    '$existential'( H2, 
      1, 
      exists( H3, 
        exists( H4, 
          exists( H5, 
            ( nesc( leftof(H1,H2))  &
              nesc( leftof(H2,H3)) & 
              nesc( leftof(H3,H4)) & 
              nesc( leftof(H4,H5))))))) & 
    '$existential'( H3, 
      1, 
      exists( H4, 
        exists( H5, 
          ( nesc( leftof(H1,H2))  &
            nesc( leftof(H2,H3)) & 
            nesc( leftof(H3,H4)) & 
            nesc( leftof(H4,H5)))))) & 
    '$existential'( H4, 
      1, 
      exists( H5, 
        ( nesc( leftof(H1,H2))  &
          nesc( leftof(H2,H3)) & 
          nesc( leftof(H3,H4)) & 
          nesc( leftof(H4,H5))))) & 
    '$existential'( H5, 
      1, 
      ( nesc( leftof(H1,H2))  &
        nesc( leftof(H2,H3)) & 
        nesc( leftof(H3,H4)) & 
        nesc( leftof(H4,H5))))) ==> 
  nesc( leftof(H2,H3))).

~*/
%~ unused(no_junit_results)

%~ /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_skollem_02.pl:28 
%~ test_completed_exit(0)
```
totalTime=5.000

FAILED: /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-junit-minor -k five_leftof_skollem_02.pl (returned 0) Add_LABELS='' Rem_LABELS='Skipped,Skipped,Errors,Warnings,Overtime,Skipped,Skipped'

logicmoo.base.fol.fiveof.FIVE_LEFTOF_UP_DOWN_02

Test case:logicmoo.base.fol.fiveof.FIVE_LEFTOF_UP_DOWN_02 JUnit
Outcome:Failed
Duration:5.0 sec
FailedFAILED: /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-junit-minor -k five_leftof_up_down_02.pl (returned 0)
failed
Stderr
 (cd /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_base/t/examples/fol/fiveof ; timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "['five_leftof_up_down_02.pl']")

% EDIT: https://github.com/logicmoo/logicmoo_workspace/edit/master/packs_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_up_down_02.pl 
% JENKINS: https://jenkins.logicmoo.org/job/logicmoo_workspace/lastBuild/testReport/logicmoo.base.fol.fiveof/FIVE_LEFTOF_UP_DOWN_02/ 
% ISSUE_SEARCH: https://github.com/logicmoo/logicmoo_workspace/issues?q=is%3Aissue+label%3AFIVE_LEFTOF_UP_DOWN_02 
% ISSUE: https://github.com/logicmoo/logicmoo_workspace/issues/618 


```
%~ init_phase(after_load)
%~ init_phase(restore_state)
%
%~ init_why(after_boot,program)
%~ after_boot.
%~ Dont forget to ?- logicmoo_i_cyc_xform.
running('/var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_up_down_02.pl'),
%~ this_test_might_need( :-( expects_dialect(pfc)))
%~ /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_utils/prolog/logicmoo_test_header.pl:93 
%~ this_test_might_need( :-( use_module( library(logicmoo_plarkc))))

% =============================================
% File 'mpred_builtin.pfc'
% Purpose: Agent Reactivity for SWI-Prolog
% Maintainer: Douglas Miles
% Contact: $Author: dmiles $@users.sourceforge.net %
% Version: 'interface' 1.0.0
% Revision: $Revision: 1.9 $
% Revised At: $Date: 2002/06/27 14:13:20 $
% =============================================
%
:- expects_dialect(clif).
/*~
~*/

:- set_prolog_flag(gc,false).
  
% There are five houses in a row.

/*~
~*/

  
% There are five houses in a row.

exists(H1,exists(H2,exists(H3,exists(H4,exists(H5,
 (leftof(H1, H2) & leftof(H2, H3) & leftof(H3, H4) & leftof(H4, H5))))))).




% EDIT: https://github.com/logicmoo/logicmoo_workspace/edit/master/packs_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_up_down_02.pl 
% JENKINS: https://jenkins.logicmoo.org/job/logicmoo_workspace/lastBuild/testReport/logicmoo.base.fol.fiveof/FIVE_LEFTOF_UP_DOWN_02/logicmoo_base_fol_fiveof_FIVE_LEFTOF_UP_DOWN_02_JUnit/ 
% ISSUE_SEARCH: https://github.com/logicmoo/logicmoo_workspace/issues?q=is%3Aissue+label%3AFIVE_LEFTOF_UP_DOWN_02 

% ISSUE: https://github.com/logicmoo/logicmoo_workspace/issues/618
/*~
%~ debugm( baseKB,
%~   show_success( baseKB,
%~     baseKB : ain( clif( exists( H1,
%~                           exists( H2,
%~                             exists( H3,
%~                               exists( H4,
%~                                 exists( H5,
%~                                   ( leftof(H1,H2)  &
%~                                     leftof(H2,H3) &
%~                                     leftof(H3,H4) &
%~                                     leftof(H4,H5)))))))))))
%   xgrun compiled into parser_chat80 0.00 sec, 0 clauses
%   xgproc compiled into parser_chat80 0.02 sec, 0 clauses


** Grammar from file /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_nlu/ext/chat80/original/clone.xg: 1609 words .. **



** Grammar from file /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_nlu/ext/chat80/original/lex.xg: 360 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.23 sec, 3 clauses
% /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_utils/prolog/debuggery/dmsg compiled into dmsg 0.13 sec, -16 clauses




=======================================================
exists('$VAR'('Exists_Leftof'),exists('$VAR'('Exists_Leftof6'),exists('$VAR'('Exists_Leftof7'),exists('$VAR'('Exists_Leftof8'),exists('$VAR'('Leftof13'),&(&(&(leftof('$VAR'('Exists_Leftof'),'$VAR'('Exists_Leftof6')),leftof('$VAR'('Exists_Leftof6'),'$VAR'('Exists_Leftof7'))),leftof('$VAR'('Exists_Leftof7'),'$VAR'('Exists_Leftof8'))),leftof('$VAR'('Exists_Leftof8'),'$VAR'('Leftof13'))))))))
============================================


?- kif_to_boxlog( exists(Exists_Leftof,exists(Exists_Leftof6,exists(Exists_Leftof7,exists(Exists_Leftof8,exists(Leftof13,((leftof(Exists_Leftof,Exists_Leftof6)&leftof(Exists_Leftof6,Exists_Leftof7))&leftof(Exists_Leftof7,Exists_Leftof8))&leftof(Exists_Leftof8,Leftof13)))))) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ 
%~  There exists ?Exists_Leftof
%~    (
%~  There exists ?Exists_Leftof6
%~    (
%~  There exists ?Exists_Leftof7
%~    (
%~  There exists ?Exists_Leftof8
%~    (
%~  There exists ?Leftof13
%~    (((" ?Exists_Leftof leftof ?Exists_Leftof6 "  and
%~    " ?Exists_Leftof6 leftof ?Exists_Leftof7 " ) and
%~    " ?Exists_Leftof7 leftof ?Exists_Leftof8 " ) and
%~    " ?Exists_Leftof8 leftof ?Leftof13 " )))))
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = exists('$VAR'('Exists_Leftof'),exists('$VAR'('Exists_Leftof6'),exists('$VAR'('Exists_Leftof7'),exists('$VAR'('Exists_Leftof8'),exists('$VAR'('Leftof13'),necessary(and(and(and(leftof('$VAR'('Exists_Leftof'),'$VAR'('Exists_Leftof6')),leftof('$VAR'('Exists_Leftof6'),'$VAR'('Exists_Leftof7'))),leftof('$VAR'('Exists_Leftof7'),'$VAR'('Exists_Leftof8'))),leftof('$VAR'('Exists_Leftof8'),'$VAR'('Leftof13')))))))))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 6 entailment(s): 
(((nesc(leftof(Exists_Leftof,Exists_Leftof6))&'$existential'(Exists_Leftof6,1,exists(Exists_Leftof7,exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))))))&'$existential'(Exists_Leftof7,1,exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))))))&'$existential'(Exists_Leftof8,1,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))))&'$existential'(Leftof13,1,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))==>nesc(leftof(Exists_Leftof6,Exists_Leftof7)).
(((poss(~leftof(Exists_Leftof,Exists_Leftof6))&'$existential'(Exists_Leftof6,1,exists(Exists_Leftof7,exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))))))&'$existential'(Exists_Leftof7,1,exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))))))&'$existential'(Exists_Leftof8,1,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))))&'$existential'(Leftof13,1,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))==>poss(~leftof(Exists_Leftof6,Exists_Leftof7)).
((((nesc(leftof(Exists_Leftof6,Exists_Leftof7))&'$existential'(Exists_Leftof,1,exists(Exists_Leftof6,exists(Exists_Leftof7,exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))))))))&'$existential'(Exists_Leftof6,1,exists(Exists_Leftof7,exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))))))&'$existential'(Exists_Leftof7,1,exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))))))&'$existential'(Exists_Leftof8,1,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))))&'$existential'(Leftof13,1,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))==>nesc(leftof(Exists_Leftof,Exists_Leftof6)).
((((poss(~leftof(Exists_Leftof6,Exists_Leftof7))&'$existential'(Exists_Leftof,1,exists(Exists_Leftof6,exists(Exists_Leftof7,exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))))))))&'$existential'(Exists_Leftof6,1,exists(Exists_Leftof7,exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))))))&'$existential'(Exists_Leftof7,1,exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))))))&'$existential'(Exists_Leftof8,1,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))))&'$existential'(Leftof13,1,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))==>poss(~leftof(Exists_Leftof,Exists_Leftof6)).
('$existential'(Exists_Leftof7,1,exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))))&'$existential'(Exists_Leftof8,1,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))))&'$existential'(Leftof13,1,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))==>nesc(leftof(Exists_Leftof7,Exists_Leftof8)).
'$existential'(Exists_Leftof8,1,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))))&'$existential'(Leftof13,1,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))==>nesc(leftof(Exists_Leftof8,Leftof13)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    (((" ?Exists_Leftof leftof ?Exists_Leftof6 " is necessarily true  and
%~     by default ?Exists_Leftof6 exists(Exists_Leftof7,exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))))) ) and
%~     by default ?Exists_Leftof7 exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))) ) and
%~     by default ?Exists_Leftof8 exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))) ) and
%~     by default ?Leftof13 ((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))
%~  It's Proof that:
%~    " ?Exists_Leftof6 leftof ?Exists_Leftof7 " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
    '$existential'( Exists_Leftof6, 
      1, 
      exists( Exists_Leftof7, 
        exists( Exists_Leftof8, 
          exists( Leftof13, 
            ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
              nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
              nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
              nesc( leftof(Exists_Leftof8,Leftof13))))))) & 
    '$existential'( Exists_Leftof7, 
      1, 
      exists( Exists_Leftof8, 
        exists( Leftof13, 
          ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
            nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
            nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
            nesc( leftof(Exists_Leftof8,Leftof13)))))) & 
    '$existential'( Exists_Leftof8, 
      1, 
      exists( Leftof13, 
        ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
          nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
          nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
          nesc( leftof(Exists_Leftof8,Leftof13))))) & 
    '$existential'( Leftof13, 
      1, 
      ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
        nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
        nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
        nesc( leftof(Exists_Leftof8,Leftof13))))) ==> 
  nesc( leftof(Exists_Leftof6,Exists_Leftof7))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    (((" ?Exists_Leftof leftof ?Exists_Leftof6 " is possibly false  and
%~     by default ?Exists_Leftof6 exists(Exists_Leftof7,exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))))) ) and
%~     by default ?Exists_Leftof7 exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))) ) and
%~     by default ?Exists_Leftof8 exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))) ) and
%~     by default ?Leftof13 ((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))
%~  It's Proof that:
%~    " ?Exists_Leftof6 leftof ?Exists_Leftof7 " is possibly false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( poss( ~( leftof(Exists_Leftof,Exists_Leftof6)))  &
    '$existential'( Exists_Leftof6, 
      1, 
      exists( Exists_Leftof7, 
        exists( Exists_Leftof8, 
          exists( Leftof13, 
            ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
              nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
              nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
              nesc( leftof(Exists_Leftof8,Leftof13))))))) & 
    '$existential'( Exists_Leftof7, 
      1, 
      exists( Exists_Leftof8, 
        exists( Leftof13, 
          ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
            nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
            nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
            nesc( leftof(Exists_Leftof8,Leftof13)))))) & 
    '$existential'( Exists_Leftof8, 
      1, 
      exists( Leftof13, 
        ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
          nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
          nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
          nesc( leftof(Exists_Leftof8,Leftof13))))) & 
    '$existential'( Leftof13, 
      1, 
      ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
        nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
        nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
        nesc( leftof(Exists_Leftof8,Leftof13))))) ==> 
  poss( ~( leftof(Exists_Leftof6,Exists_Leftof7)))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    ((((" ?Exists_Leftof6 leftof ?Exists_Leftof7 " is necessarily true  and
%~     by default ?Exists_Leftof exists(Exists_Leftof6,exists(Exists_Leftof7,exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))))) ) and
%~     by default ?Exists_Leftof6 exists(Exists_Leftof7,exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))))) ) and
%~     by default ?Exists_Leftof7 exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))) ) and
%~     by default ?Exists_Leftof8 exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))) ) and
%~     by default ?Leftof13 ((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))
%~  It's Proof that:
%~    " ?Exists_Leftof leftof ?Exists_Leftof6 " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( nesc( leftof(Exists_Leftof6,Exists_Leftof7))  &
    '$existential'( Exists_Leftof, 
      1, 
      exists( Exists_Leftof6, 
        exists( Exists_Leftof7, 
          exists( Exists_Leftof8, 
            exists( Leftof13, 
              ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
                nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
                nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
                nesc( leftof(Exists_Leftof8,Leftof13)))))))) & 
    '$existential'( Exists_Leftof6, 
      1, 
      exists( Exists_Leftof7, 
        exists( Exists_Leftof8, 
          exists( Leftof13, 
            ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
              nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
              nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
              nesc( leftof(Exists_Leftof8,Leftof13))))))) & 
    '$existential'( Exists_Leftof7, 
      1, 
      exists( Exists_Leftof8, 
        exists( Leftof13, 
          ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
            nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
            nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
            nesc( leftof(Exists_Leftof8,Leftof13)))))) & 
    '$existential'( Exists_Leftof8, 
      1, 
      exists( Leftof13, 
        ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
          nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
          nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
          nesc( leftof(Exists_Leftof8,Leftof13))))) & 
    '$existential'( Leftof13, 
      1, 
      ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
        nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
        nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
        nesc( leftof(Exists_Leftof8,Leftof13))))) ==> 
  nesc( leftof(Exists_Leftof,Exists_Leftof6))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    ((((" ?Exists_Leftof6 leftof ?Exists_Leftof7 " is possibly false  and
%~     by default ?Exists_Leftof exists(Exists_Leftof6,exists(Exists_Leftof7,exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))))) ) and
%~     by default ?Exists_Leftof6 exists(Exists_Leftof7,exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))))) ) and
%~     by default ?Exists_Leftof7 exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))) ) and
%~     by default ?Exists_Leftof8 exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))) ) and
%~     by default ?Leftof13 ((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))
%~  It's Proof that:
%~    " ?Exists_Leftof leftof ?Exists_Leftof6 " is possibly false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( poss( ~( leftof(Exists_Leftof6,Exists_Leftof7)))  &
    '$existential'( Exists_Leftof, 
      1, 
      exists( Exists_Leftof6, 
        exists( Exists_Leftof7, 
          exists( Exists_Leftof8, 
            exists( Leftof13, 
              ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
                nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
                nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
                nesc( leftof(Exists_Leftof8,Leftof13)))))))) & 
    '$existential'( Exists_Leftof6, 
      1, 
      exists( Exists_Leftof7, 
        exists( Exists_Leftof8, 
          exists( Leftof13, 
            ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
              nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
              nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
              nesc( leftof(Exists_Leftof8,Leftof13))))))) & 
    '$existential'( Exists_Leftof7, 
      1, 
      exists( Exists_Leftof8, 
        exists( Leftof13, 
          ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
            nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
            nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
            nesc( leftof(Exists_Leftof8,Leftof13)))))) & 
    '$existential'( Exists_Leftof8, 
      1, 
      exists( Leftof13, 
        ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
          nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
          nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
          nesc( leftof(Exists_Leftof8,Leftof13))))) & 
    '$existential'( Leftof13, 
      1, 
      ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
        nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
        nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
        nesc( leftof(Exists_Leftof8,Leftof13))))) ==> 
  poss( ~( leftof(Exists_Leftof,Exists_Leftof6)))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    ( by default ?Exists_Leftof7 exists(Exists_Leftof8,exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))))  and
%~     by default ?Exists_Leftof8 exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))) ) and
%~     by default ?Leftof13 ((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))
%~  It's Proof that:
%~    " ?Exists_Leftof7 leftof ?Exists_Leftof8 " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( '$existential'( Exists_Leftof7, 
      1, 
      exists( Exists_Leftof8, 
        exists( Leftof13, 
          ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
            nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
            nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
            nesc( leftof(Exists_Leftof8,Leftof13))))))  &
    '$existential'( Exists_Leftof8, 
      1, 
      exists( Leftof13, 
        ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
          nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
          nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
          nesc( leftof(Exists_Leftof8,Leftof13))))) & 
    '$existential'( Leftof13, 
      1, 
      ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
        nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
        nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
        nesc( leftof(Exists_Leftof8,Leftof13))))) ==> 
  nesc( leftof(Exists_Leftof7,Exists_Leftof8))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~     by default ?Exists_Leftof8 exists(Leftof13,((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13)))  and
%~     by default ?Leftof13 ((nesc(leftof(Exists_Leftof,Exists_Leftof6))&nesc(leftof(Exists_Leftof6,Exists_Leftof7)))&nesc(leftof(Exists_Leftof7,Exists_Leftof8)))&nesc(leftof(Exists_Leftof8,Leftof13))
%~  It's Proof that:
%~    " ?Exists_Leftof8 leftof ?Leftof13 " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( '$existential'( Exists_Leftof8, 
      1, 
      exists( Leftof13, 
        ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
          nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
          nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
          nesc( leftof(Exists_Leftof8,Leftof13))))) & 
    '$existential'( Leftof13, 
      1, 
      ( nesc( leftof(Exists_Leftof,Exists_Leftof6))  &
        nesc( leftof(Exists_Leftof6,Exists_Leftof7)) & 
        nesc( leftof(Exists_Leftof7,Exists_Leftof8)) & 
        nesc( leftof(Exists_Leftof8,Leftof13))))) ==> 
  nesc( leftof(Exists_Leftof8,Leftof13))).

============================================
%~ kif_to_boxlog_attvars2 = exists('$VAR'('H1'),exists('$VAR'('H2'),exists('$VAR'('H3'),exists('$VAR'('H4'),exists('$VAR'('H5'),necessary(and(and(and(leftof('$VAR'('H1'),'$VAR'('H2')),leftof('$VAR'('H2'),'$VAR'('H3'))),leftof('$VAR'('H3'),'$VAR'('H4'))),leftof('$VAR'('H4'),'$VAR'('H5')))))))))
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~     by default ?H4 exists(H5,((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5)))  and
%~     by default ?H5 ((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5))
%~  It's Proof that:
%~    " ?H4 leftof ?H5 " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( '$existential'( H4, 
      1, 
      exists( H5, 
        ( nesc( leftof(H1,H2))  &
          nesc( leftof(H2,H3)) & 
          nesc( leftof(H3,H4)) & 
          nesc( leftof(H4,H5))))) & 
    '$existential'( H5, 
      1, 
      ( nesc( leftof(H1,H2))  &
        nesc( leftof(H2,H3)) & 
        nesc( leftof(H3,H4)) & 
        nesc( leftof(H4,H5))))) ==> 
  nesc( leftof(H4,H5))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    ( by default ?H3 exists(H4,exists(H5,((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5))))  and
%~     by default ?H4 exists(H5,((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5))) ) and
%~     by default ?H5 ((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5))
%~  It's Proof that:
%~    " ?H3 leftof ?H4 " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( '$existential'( H3, 
      1, 
      exists( H4, 
        exists( H5, 
          ( nesc( leftof(H1,H2))  &
            nesc( leftof(H2,H3)) & 
            nesc( leftof(H3,H4)) & 
            nesc( leftof(H4,H5))))))  &
    '$existential'( H4, 
      1, 
      exists( H5, 
        ( nesc( leftof(H1,H2))  &
          nesc( leftof(H2,H3)) & 
          nesc( leftof(H3,H4)) & 
          nesc( leftof(H4,H5))))) & 
    '$existential'( H5, 
      1, 
      ( nesc( leftof(H1,H2))  &
        nesc( leftof(H2,H3)) & 
        nesc( leftof(H3,H4)) & 
        nesc( leftof(H4,H5))))) ==> 
  nesc( leftof(H3,H4))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    (((" ?H1 leftof ?H2 " is possibly false  and
%~     by default ?H2 exists(H3,exists(H4,exists(H5,((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5))))) ) and
%~     by default ?H3 exists(H4,exists(H5,((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5)))) ) and
%~     by default ?H4 exists(H5,((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5))) ) and
%~     by default ?H5 ((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5))
%~  It's Proof that:
%~    " ?H2 leftof ?H3 " is possibly false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( poss( ~( leftof(H1,H2)))  &
    '$existential'( H2, 
      1, 
      exists( H3, 
        exists( H4, 
          exists( H5, 
            ( nesc( leftof(H1,H2))  &
              nesc( leftof(H2,H3)) & 
              nesc( leftof(H3,H4)) & 
              nesc( leftof(H4,H5))))))) & 
    '$existential'( H3, 
      1, 
      exists( H4, 
        exists( H5, 
          ( nesc( leftof(H1,H2))  &
            nesc( leftof(H2,H3)) & 
            nesc( leftof(H3,H4)) & 
            nesc( leftof(H4,H5)))))) & 
    '$existential'( H4, 
      1, 
      exists( H5, 
        ( nesc( leftof(H1,H2))  &
          nesc( leftof(H2,H3)) & 
          nesc( leftof(H3,H4)) & 
          nesc( leftof(H4,H5))))) & 
    '$existential'( H5, 
      1, 
      ( nesc( leftof(H1,H2))  &
        nesc( leftof(H2,H3)) & 
        nesc( leftof(H3,H4)) & 
        nesc( leftof(H4,H5))))) ==> 
  poss( ~( leftof(H2,H3)))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    ((((" ?H2 leftof ?H3 " is necessarily true  and
%~     by default ?H1 exists(H2,exists(H3,exists(H4,exists(H5,((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5)))))) ) and
%~     by default ?H2 exists(H3,exists(H4,exists(H5,((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5))))) ) and
%~     by default ?H3 exists(H4,exists(H5,((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5)))) ) and
%~     by default ?H4 exists(H5,((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5))) ) and
%~     by default ?H5 ((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5))
%~  It's Proof that:
%~    " ?H1 leftof ?H2 " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( nesc( leftof(H2,H3))  &
    '$existential'( H1, 
      1, 
      exists( H2, 
        exists( H3, 
          exists( H4, 
            exists( H5, 
              ( nesc( leftof(H1,H2))  &
                nesc( leftof(H2,H3)) & 
                nesc( leftof(H3,H4)) & 
                nesc( leftof(H4,H5)))))))) & 
    '$existential'( H2, 
      1, 
      exists( H3, 
        exists( H4, 
          exists( H5, 
            ( nesc( leftof(H1,H2))  &
              nesc( leftof(H2,H3)) & 
              nesc( leftof(H3,H4)) & 
              nesc( leftof(H4,H5))))))) & 
    '$existential'( H3, 
      1, 
      exists( H4, 
        exists( H5, 
          ( nesc( leftof(H1,H2))  &
            nesc( leftof(H2,H3)) & 
            nesc( leftof(H3,H4)) & 
            nesc( leftof(H4,H5)))))) & 
    '$existential'( H4, 
      1, 
      exists( H5, 
        ( nesc( leftof(H1,H2))  &
          nesc( leftof(H2,H3)) & 
          nesc( leftof(H3,H4)) & 
          nesc( leftof(H4,H5))))) & 
    '$existential'( H5, 
      1, 
      ( nesc( leftof(H1,H2))  &
        nesc( leftof(H2,H3)) & 
        nesc( leftof(H3,H4)) & 
        nesc( leftof(H4,H5))))) ==> 
  nesc( leftof(H1,H2))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    ((((" ?H2 leftof ?H3 " is possibly false  and
%~     by default ?H1 exists(H2,exists(H3,exists(H4,exists(H5,((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5)))))) ) and
%~     by default ?H2 exists(H3,exists(H4,exists(H5,((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5))))) ) and
%~     by default ?H3 exists(H4,exists(H5,((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5)))) ) and
%~     by default ?H4 exists(H5,((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5))) ) and
%~     by default ?H5 ((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5))
%~  It's Proof that:
%~    " ?H1 leftof ?H2 " is possibly false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( poss( ~( leftof(H2,H3)))  &
    '$existential'( H1, 
      1, 
      exists( H2, 
        exists( H3, 
          exists( H4, 
            exists( H5, 
              ( nesc( leftof(H1,H2))  &
                nesc( leftof(H2,H3)) & 
                nesc( leftof(H3,H4)) & 
                nesc( leftof(H4,H5)))))))) & 
    '$existential'( H2, 
      1, 
      exists( H3, 
        exists( H4, 
          exists( H5, 
            ( nesc( leftof(H1,H2))  &
              nesc( leftof(H2,H3)) & 
              nesc( leftof(H3,H4)) & 
              nesc( leftof(H4,H5))))))) & 
    '$existential'( H3, 
      1, 
      exists( H4, 
        exists( H5, 
          ( nesc( leftof(H1,H2))  &
            nesc( leftof(H2,H3)) & 
            nesc( leftof(H3,H4)) & 
            nesc( leftof(H4,H5)))))) & 
    '$existential'( H4, 
      1, 
      exists( H5, 
        ( nesc( leftof(H1,H2))  &
          nesc( leftof(H2,H3)) & 
          nesc( leftof(H3,H4)) & 
          nesc( leftof(H4,H5))))) & 
    '$existential'( H5, 
      1, 
      ( nesc( leftof(H1,H2))  &
        nesc( leftof(H2,H3)) & 
        nesc( leftof(H3,H4)) & 
        nesc( leftof(H4,H5))))) ==> 
  poss( ~( leftof(H1,H2)))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    (((" ?H1 leftof ?H2 " is necessarily true  and
%~     by default ?H2 exists(H3,exists(H4,exists(H5,((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5))))) ) and
%~     by default ?H3 exists(H4,exists(H5,((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5)))) ) and
%~     by default ?H4 exists(H5,((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5))) ) and
%~     by default ?H5 ((nesc(leftof(H1,H2))&nesc(leftof(H2,H3)))&nesc(leftof(H3,H4)))&nesc(leftof(H4,H5))
%~  It's Proof that:
%~    " ?H2 leftof ?H3 " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( ( nesc( leftof(H1,H2))  &
    '$existential'( H2, 
      1, 
      exists( H3, 
        exists( H4, 
          exists( H5, 
            ( nesc( leftof(H1,H2))  &
              nesc( leftof(H2,H3)) & 
              nesc( leftof(H3,H4)) & 
              nesc( leftof(H4,H5))))))) & 
    '$existential'( H3, 
      1, 
      exists( H4, 
        exists( H5, 
          ( nesc( leftof(H1,H2))  &
            nesc( leftof(H2,H3)) & 
            nesc( leftof(H3,H4)) & 
            nesc( leftof(H4,H5)))))) & 
    '$existential'( H4, 
      1, 
      exists( H5, 
        ( nesc( leftof(H1,H2))  &
          nesc( leftof(H2,H3)) & 
          nesc( leftof(H3,H4)) & 
          nesc( leftof(H4,H5))))) & 
    '$existential'( H5, 
      1, 
      ( nesc( leftof(H1,H2))  &
        nesc( leftof(H2,H3)) & 
        nesc( leftof(H3,H4)) & 
        nesc( leftof(H4,H5))))) ==> 
  nesc( leftof(H2,H3))).

~*/
%~ unused(no_junit_results)

%~ /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_up_down_02.pl:28 
%~ test_completed_exit(0)
```
totalTime=5.000

FAILED: /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-junit-minor -k five_leftof_up_down_02.pl (returned 0) Add_LABELS='' Rem_LABELS='Skipped,Skipped,Errors,Warnings,Overtime,Skipped,Skipped'

Test Suite: Rollup logicmoo.base.fol.quick_test in /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_base/t/examples/fol/quick_test

Package: logicmoo.base.fol.quick_test

Results

Duration0.0 sec
Tests1
Failures0

Tests

logicmoo.base.fol.quick_test.FIVE_LEFTOF_TYPE_01

Test case:logicmoo.base.fol.quick_test.FIVE_LEFTOF_TYPE_01 JUnit
Outcome:Passed
Duration:4.0 sec
FailedNone
None
Stdout
 (cd /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_base/t/examples/fol/quick_test ; timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "['five_leftof_type_01.pl']")

% EDIT: https://github.com/logicmoo/logicmoo_workspace/edit/master/packs_sys/logicmoo_base/t/examples/fol/quick_test/five_leftof_type_01.pl 
% JENKINS: https://jenkins.logicmoo.org/job/logicmoo_workspace/lastBuild/testReport/logicmoo.base.fol.quick_test/FIVE_LEFTOF_TYPE_01/ 
% ISSUE_SEARCH: https://github.com/logicmoo/logicmoo_workspace/issues?q=is%3Aissue+label%3AFIVE_LEFTOF_TYPE_01 
% ISSUE: https://github.com/logicmoo/logicmoo_workspace/issues/623 


```
%~ init_phase(after_load)
%~ init_phase(restore_state)
%
%~ init_why(after_boot,program)
%~ after_boot.
%~ Dont forget to ?- logicmoo_i_cyc_xform.
running('/var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_base/t/examples/fol/quick_test/five_leftof_type_01.pl'),
%~ /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_utils/prolog/logicmoo_test_header.pl:91 
%~ this_test_might_need( :-( expects_dialect(pfc)))
%~ this_test_might_need( :-( use_module( library(logicmoo_plarkc))))

% =============================================
% File 'mpred_builtin.pfc'
% Purpose: Agent Reactivity for SWI-Prolog
% Maintainer: Douglas Miles
% Contact: $Author: dmiles $@users.sourceforge.net %
% Version: 'interface' 1.0.0
% Revision: $Revision: 1.9 $
% Revised At: $Date: 2002/06/27 14:13:20 $
% =============================================
%

:- mpred_test(true).

% There are five houses in a row.
/*~
%~ ?-( mpred_test("Test_0001_Line_0000__True",baseKB:true)).
passed=info(why_was_true(baseKB:true))
no_proof_for(true).

no_proof_for(true).

no_proof_for(true).

	name	=	'logicmoo.base.fol.quick_test.FIVE_LEFTOF_TYPE_01-Test_0001_Line_0000__True'. 
	JUNIT_CLASSNAME	=	'logicmoo.base.fol.quick_test.FIVE_LEFTOF_TYPE_01'. 
	JUNIT_CMD	=	'timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'five_leftof_type_01.pl\']"'. 
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace/test_results/jenkins/Report-logicmoo-base-fol-quick_test-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_fol_quick_test_FIVE_LEFTOF_TYPE_01_Test_0001_Line_0000_True-junit.xml
~*/


% There are five houses in a row.
:- nop(module( baseKB)).

% makes the KB monotonic
/*~
~*/


% makes the KB monotonic
:- set_kif_option(qualify_modality,simple_nesc).

/*~
~*/


leftof(h1, h2).
/*~
%~ debugm(baseKB,show_success(baseKB,baseKB:ain(clif(leftof(h1,h2)))))
%   xgrun compiled into parser_chat80 0.00 sec, 0 clauses
%   xgproc compiled into parser_chat80 0.02 sec, 0 clauses


** Grammar from file /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_nlu/ext/chat80/original/clone.xg: 1616 words .. **



** Grammar from file /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_nlu/ext/chat80/original/lex.xg: 372 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.25 sec, 3 clauses
% /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_utils/prolog/debuggery/dmsg compiled into dmsg 0.12 sec, -16 clauses




=======================================================
leftof(h1,h2)
============================================


?- kif_to_boxlog( leftof(h1,h2) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h1 leftof h2
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(leftof(h1,h2))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s): 
nesc(leftof(h1,h2)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  it is necessarily true that h1 leftof h2
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc( leftof(h1,h2)).

============================================
~*/

leftof(h2, h3).
/*~
%~ debugm(baseKB,show_success(baseKB,baseKB:ain(clif(leftof(h2,h3)))))




=======================================================
leftof(h2,h3)
============================================


?- kif_to_boxlog( leftof(h2,h3) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h2 leftof h3
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(leftof(h2,h3))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s): 
nesc(leftof(h2,h3)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  it is necessarily true that h2 leftof h3
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc( leftof(h2,h3)).

============================================
~*/

leftof(h3, h4).
/*~
%~ debugm(baseKB,show_success(baseKB,baseKB:ain(clif(leftof(h3,h4)))))




=======================================================
leftof(h3,h4)
============================================


?- kif_to_boxlog( leftof(h3,h4) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h3 leftof h4
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(leftof(h3,h4))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s): 
nesc(leftof(h3,h4)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  it is necessarily true that h3 leftof h4
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc( leftof(h3,h4)).

============================================
~*/

leftof(h4, h5).

% this should cause h1-h5 to become houses
/*~
%~ debugm(baseKB,show_success(baseKB,baseKB:ain(clif(leftof(h4,h5)))))




=======================================================
leftof(h4,h5)
============================================


?- kif_to_boxlog( leftof(h4,h5) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h4 leftof h5
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(leftof(h4,h5))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s): 
nesc(leftof(h4,h5)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  it is necessarily true that h4 leftof h5
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc( leftof(h4,h5)).

============================================
~*/


% this should cause h1-h5 to become houses
leftof(H1, H2) => house(H1) & house(H2).

/*~
%~ debugm( baseKB,
%~   show_success( baseKB,
%~     baseKB : ain( clif( leftof(H1,H2)=>(house(H1)&house(H2))))))




=======================================================
=>(leftof('$VAR'('House_Leftof'),'$VAR'('House_Leftof3')),&(house('$VAR'('House_Leftof')),house('$VAR'('House_Leftof3'))))
============================================


?- kif_to_boxlog( leftof(House_Leftof,House_Leftof3)=>(house(House_Leftof)&house(House_Leftof3)) ).



% In English: 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  If:
%~    ?House_Leftof leftof ?House_Leftof3 then it is
%~  Implied that:
%~    " ?House_Leftof isa house "  and
%~    " ?House_Leftof3 isa house "
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = =>(leftof('$VAR'('House_Leftof'),'$VAR'('House_Leftof3')),and(house('$VAR'('House_Leftof')),house('$VAR'('House_Leftof3'))))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 6 entailment(s): 
nesc(leftof(House_Leftof,House_Leftof3))&nesc(~house(House_Leftof))==>nesc(~house(House_Leftof3)).
nesc(leftof(House_Leftof,House_Leftof3))&nesc(~house(House_Leftof3))==>nesc(~house(House_Leftof)).
nesc(leftof(House_Leftof,House_Leftof3))&poss(house(House_Leftof))==>nesc(house(House_Leftof3)).
nesc(leftof(House_Leftof,House_Leftof3))&poss(house(House_Leftof3))==>nesc(house(House_Leftof)).
poss(house(House_Leftof))&nesc(~house(House_Leftof3))==>nesc(~leftof(House_Leftof,House_Leftof3)).
poss(house(House_Leftof3))&nesc(~house(House_Leftof))==>nesc(~leftof(House_Leftof,House_Leftof3)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?House_Leftof leftof ?House_Leftof3 " is necessarily true  and
%~    " ?House_Leftof isa house " is necessarily false
%~  It's Proof that:
%~    " ?House_Leftof3 isa house " is necessarily false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( nesc(leftof(House_Leftof,House_Leftof3))&nesc(~house(House_Leftof)) ==> 
  nesc( ~( house(House_Leftof3)))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?House_Leftof leftof ?House_Leftof3 " is necessarily true  and
%~    " ?House_Leftof3 isa house " is necessarily false
%~  It's Proof that:
%~    " ?House_Leftof isa house " is necessarily false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( nesc(leftof(House_Leftof,House_Leftof3))&nesc(~house(House_Leftof3)) ==> 
  nesc( ~( house(House_Leftof)))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?House_Leftof leftof ?House_Leftof3 " is necessarily true  and
%~    " ?House_Leftof isa house " is possible
%~  It's Proof that:
%~    " ?House_Leftof3 isa house " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( nesc(leftof(House_Leftof,House_Leftof3))&poss(house(House_Leftof)) ==> 
  nesc( house(House_Leftof3))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?House_Leftof leftof ?House_Leftof3 " is necessarily true  and
%~    " ?House_Leftof3 isa house " is possible
%~  It's Proof that:
%~    " ?House_Leftof isa house " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( nesc(leftof(House_Leftof,House_Leftof3))&poss(house(House_Leftof3)) ==> 
  nesc( house(House_Leftof))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?House_Leftof isa house " is possible  and
%~    " ?House_Leftof3 isa house " is necessarily false
%~  It's Proof that:
%~    " ?House_Leftof leftof ?House_Leftof3 " is necessarily false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( poss(house(House_Leftof))&nesc(~house(House_Leftof3)) ==> 
  nesc( ~( leftof(House_Leftof,House_Leftof3)))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?House_Leftof3 isa house " is possible  and
%~    " ?House_Leftof isa house " is necessarily false
%~  It's Proof that:
%~    " ?House_Leftof leftof ?House_Leftof3 " is necessarily false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( poss(house(House_Leftof3))&nesc(~house(House_Leftof)) ==> 
  nesc( ~( leftof(House_Leftof,House_Leftof3)))).

============================================
%~ kif_to_boxlog_attvars2 = =>(leftof('$VAR'('H1'),'$VAR'('H2')),and(house('$VAR'('H1')),house('$VAR'('H2'))))
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?H2 isa house " is possible  and
%~    " ?H1 isa house " is necessarily false
%~  It's Proof that:
%~    " ?H1 leftof ?H2 " is necessarily false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

poss(house(H2))&nesc(~house(H1))==>nesc(~leftof(H1,H2)).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?H1 leftof ?H2 " is necessarily true  and
%~    " ?H1 isa house " is necessarily false
%~  It's Proof that:
%~    " ?H2 isa house " is necessarily false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc(leftof(H1,H2))&nesc(~house(H1))==>nesc(~house(H2)).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?H1 leftof ?H2 " is necessarily true  and
%~    " ?H2 isa house " is possible
%~  It's Proof that:
%~    " ?H1 isa house " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc(leftof(H1,H2))&poss(house(H2))==>nesc(house(H1)).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?H1 isa house " is possible  and
%~    " ?H2 isa house " is necessarily false
%~  It's Proof that:
%~    " ?H1 leftof ?H2 " is necessarily false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

poss(house(H1))&nesc(~house(H2))==>nesc(~leftof(H1,H2)).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?H1 leftof ?H2 " is necessarily true  and
%~    " ?H2 isa house " is necessarily false
%~  It's Proof that:
%~    " ?H1 isa house " is necessarily false
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc(leftof(H1,H2))&nesc(~house(H2))==>nesc(~house(H1)).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?H1 leftof ?H2 " is necessarily true  and
%~    " ?H1 isa house " is possible
%~  It's Proof that:
%~    " ?H2 isa house " is necessarily true
%~ 
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc(leftof(H1,H2))&poss(house(H1))==>nesc(house(H2)).

~*/


:- mpred_test(kif_compile).

% intractive_test/1 means only run if interactive
/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_base/t/examples/fol/quick_test/five_leftof_type_01.pl:29 
%~ ?-( mpred_test("Test_0002_Line_0000__Kif_compile",baseKB:kif_compile)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h1,h2))
%~ kif_to_boxlog_attvars2 = necessary(leftof(h2,h3))
%~ kif_to_boxlog_attvars2 = necessary(leftof(h3,h4))
%~ kif_to_boxlog_attvars2 = necessary(leftof(h4,h5))
%~ kif_to_boxlog_attvars2 = =>(leftof('$VAR'('House_Leftof'),'$VAR'('House_Leftof1')),and(house('$VAR'('House_Leftof')),house('$VAR'('House_Leftof1'))))
passed=info(why_was_true(baseKB:kif_compile))
no_proof_for(kif_compile).

no_proof_for(kif_compile).

no_proof_for(kif_compile).

	name	=	'logicmoo.base.fol.quick_test.FIVE_LEFTOF_TYPE_01-Test_0002_Line_0000__Kif_compile'. 
	JUNIT_CLASSNAME	=	'logicmoo.base.fol.quick_test.FIVE_LEFTOF_TYPE_01'. 
	JUNIT_CMD	=	'timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'five_leftof_type_01.pl\']"'. 
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace/test_results/jenkins/Report-logicmoo-base-fol-quick_test-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_fol_quick_test_FIVE_LEFTOF_TYPE_01_Test_0002_Line_0000_Kif_compile-junit.xml
~*/


% intractive_test/1 means only run if interactive
:- interactive_test(listing(pfclog)).

% mpred_test/1 each become a Junit test that must succeed
/*~
?-listing(pfclog)
:- dynamic pfclog/1.
:- multifile pfclog/1.
:- public pfclog/1.
:- module_transparent pfclog/1.

pfclog(nesc(leftof(h1, h2))).
pfclog(nesc(leftof(h2, h3))).
pfclog(nesc(leftof(h3, h4))).
pfclog(nesc(leftof(h4, h5))).
pfclog((poss(house(A)), nesc(~house(B))==>nesc(~leftof(B, A)))).
pfclog((nesc(leftof(A, B)), nesc(~house(A))==>nesc(~house(B)))).
pfclog((nesc(leftof(A, B)), poss(house(B))==>nesc(house(A)))).
pfclog((poss(house(A)), nesc(~house(B))==>nesc(~leftof(A, B)))).
pfclog((nesc(leftof(A, B)), nesc(~house(B))==>nesc(~house(A)))).
pfclog((nesc(leftof(A, B)), poss(house(A))==>nesc(house(B)))).

~*/


% mpred_test/1 each become a Junit test that must succeed
:- mpred_test(pfclog_compile).


% :- mpred_test(nesc(leftof(h4, h5))).



% EDIT: https://github.com/logicmoo/logicmoo_workspace/edit/master/packs_sys/logicmoo_base/t/examples/fol/quick_test/five_leftof_type_01.pl 
% JENKINS: https://jenkins.logicmoo.org/job/logicmoo_workspace/lastBuild/testReport/logicmoo.base.fol.quick_test/FIVE_LEFTOF_TYPE_01/ 
% ISSUE_SEARCH: https://github.com/logicmoo/logicmoo_workspace/issues?q=is%3Aissue+label%3AFIVE_LEFTOF_TYPE_01 

% ISSUE: https://github.com/logicmoo/logicmoo_workspace/issues/623
/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_base/t/examples/fol/quick_test/five_leftof_type_01.pl:35 
%~ ?-( mpred_test("Test_0003_Line_0000__Pfclog_compile",baseKB:pfclog_compile)).
passed=info(why_was_true(baseKB:pfclog_compile))
no_proof_for(pfclog_compile).

no_proof_for(pfclog_compile).

no_proof_for(pfclog_compile).

	name	=	'logicmoo.base.fol.quick_test.FIVE_LEFTOF_TYPE_01-Test_0003_Line_0000__Pfclog_compile'. 
	JUNIT_CLASSNAME	=	'logicmoo.base.fol.quick_test.FIVE_LEFTOF_TYPE_01'. 
	JUNIT_CMD	=	'timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'five_leftof_type_01.pl\']"'. 
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace/test_results/jenkins/Report-logicmoo-base-fol-quick_test-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_fol_quick_test_FIVE_LEFTOF_TYPE_01_Test_0003_Line_0000_Pfclog_compile-junit.xml
~*/
%~ /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_base/t/examples/fol/quick_test/five_leftof_type_01.pl:47 
%~ unused(no_junit_results)
Test_0001_Line_0000__True	result	=	passed. 
Test_0002_Line_0000__Kif_compile	result	=	passed. 
Test_0003_Line_0000__Pfclog_compile	result	=	passed. 

%~ test_completed_exit(64)
```
totalTime=4.000

SUCCESS: /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-junit-minor -k five_leftof_type_01.pl (returned 64) Add_LABELS='' Rem_LABELS='Skipped,Errors,Warnings,Overtime,Skipped,Skipped'

Test Suite: Rollup logicmoo.pfc.sanity_base.quick_test in /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/pfc/t/sanity_base/quick_test

Package: logicmoo.pfc.sanity_base.quick_test

Results

Duration0.0 sec
Tests3
Failures1

Tests

logicmoo.pfc.sanity_base.quick_test.ATTVAR_03

Test case:logicmoo.pfc.sanity_base.quick_test.ATTVAR_03 JUnit
Outcome:Failed
Duration:1.0 sec
FailedFAILED: /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-junit-minor -k attvar_03.pfc (returned 8)
failed
Stderr
 (cd /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/pfc/t/sanity_base/quick_test ; timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "['attvar_03.pfc']")

% EDIT: https://github.com/logicmoo/logicmoo_workspace/edit/master/packs_sys/pfc/t/sanity_base/quick_test/attvar_03.pfc 
% JENKINS: https://jenkins.logicmoo.org/job/logicmoo_workspace/lastBuild/testReport/logicmoo.pfc.sanity_base.quick_test/ATTVAR_03/ 
% ISSUE_SEARCH: https://github.com/logicmoo/logicmoo_workspace/issues?q=is%3Aissue+label%3AATTVAR_03 
% ISSUE: https://github.com/logicmoo/logicmoo_workspace/issues/633 


```
%~ init_phase(after_load)
%~ init_phase(restore_state)
%
%~ init_why(after_boot,program)
%~ after_boot.
%~ Dont forget to ?- logicmoo_i_cyc_xform.
running('/var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/pfc/t/sanity_base/quick_test/attvar_03.pfc'),
%~ this_test_might_need( :-( use_module( library(logicmoo_plarkc))))

:- if(\+ current_module(attvar_reader)).
:- use_module(library(logicmoo/attvar_reader)).
/*~
~*/

:- endif.
% :- '$set_source_module'(ABox),'$set_typein_module'(ABox).

:- ABox = user, '$set_source_module'(ABox),'$set_typein_module'(ABox).
% Tests Non-module Forward chaining of assertable attributed variables


/*~
~*/

% Tests Non-module Forward chaining of assertable attributed variables


:- debug_logicmoo(_).
/*~
~*/

:- nodebug_logicmoo(http(_)).
/*~
~*/

:- debug_logicmoo(logicmoo(_)).

/*~
~*/


:- mpred_trace_exec.
% :- expects_dialect(pfc).

/*~
~*/

% :- expects_dialect(pfc).

:- dynamic(sk_out/1).
/*~
~*/

:- dynamic(sk_in/1).

% :- process_this_script.


/*~
~*/


% :- process_this_script.


sk_in(Ex)==>sk_out(Ex).

/*~
~*/


sk_in(foo).

/*~
~*/


:- read_attvars(true).
/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/pfc/t/sanity_base/quick_test/attvar_03.pfc:40 
%~ install_attvar_expander(user)
~*/

:- set_prolog_flag(access_level,system).

/*~
~*/


sk_in(avar([vn='Ex',sk='SKF-666'])).

/*~
~*/


:- listing(sk_out/1).
/*~
%~ skipped( listing( sk_out/1))
~*/

:- listing(sk_in/1).


/*~
%~ skipped( listing( sk_in/1))
~*/



:- must((sk_in(VAR),get_attr(VAR,sk,What),What='SKF-666')).



% EDIT: https://github.com/logicmoo/logicmoo_workspace/edit/master/packs_sys/pfc/t/sanity_base/attvar_03.pfc 
% JENKINS: https://jenkins.logicmoo.org/job/logicmoo_workspace/lastBuild/testReport/logicmoo.pfc.test.sanity_base/ATTVAR_03/ 
% ISSUE_SEARCH: https://github.com/logicmoo/logicmoo_workspace/issues?q=is%3Aissue+label%3AATTVAR_03 

% ISSUE: https://github.com/logicmoo/logicmoo_workspace/issues/633
/*~
%~ ?-( mpred_test( "Test_0001_Line_0000__sk_in_1_in_user",
%~       user : ( sk_in(VAR)  ,
%~                get_attr(VAR,sk,What) ,
%~                What='SKF-666'))).
failure=info((why_was_true(user:(\+ (sk_in(_28160),get_attr(_28160,sk,_28182),_28182='SKF-666'))),nop(ftrace(user:(sk_in(_28160),get_attr(_28160,sk,_28182),_28182='SKF-666')))))
no_proof_for(\+ (sk_in(In_Sk),get_attr(In_Sk,sk,Attr_SKF_666),Attr_SKF_666='SKF-666')).

no_proof_for(\+ (sk_in(In_Sk),get_attr(In_Sk,sk,Attr_SKF_666),Attr_SKF_666='SKF-666')).

no_proof_for(\+ (sk_in(In_Sk),get_attr(In_Sk,sk,Attr_SKF_666),Attr_SKF_666='SKF-666')).

	name	=	'logicmoo.pfc.sanity_base.quick_test.ATTVAR_03-Test_0001_Line_0000__sk_in_1_in_user'. 
	JUNIT_CLASSNAME	=	'logicmoo.pfc.sanity_base.quick_test.ATTVAR_03'. 
	JUNIT_CMD	=	'timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'attvar_03.pfc\']"'. 
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace/test_results/jenkins/Report-logicmoo-pfc-sanity_base-quick_test-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_pfc_sanity_base_quick_test_ATTVAR_03_Test_0001_Line_0000_sk_in_1_in_user-junit.xml
~*/
%~ unused(no_junit_results)
Test_0001_Line_0000__sk_in_1_in_user	result	=	failure. 

%~ test_completed_exit(8)
```
totalTime=1.000

FAILED: /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-junit-minor -k attvar_03.pfc (returned 8) Add_LABELS='' Rem_LABELS='Skipped,Skipped,Errors,Warnings,Overtime,Skipped'

logicmoo.pfc.sanity_base.quick_test.FC_01

Test case:logicmoo.pfc.sanity_base.quick_test.FC_01 JUnit
Outcome:Passed
Duration:1.0 sec
FailedNone
None
Stdout
 (cd /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/pfc/t/sanity_base/quick_test ; timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "['fc_01.pfc']")

% EDIT: https://github.com/logicmoo/logicmoo_workspace/edit/master/packs_sys/pfc/t/sanity_base/quick_test/fc_01.pfc 
% JENKINS: https://jenkins.logicmoo.org/job/logicmoo_workspace/lastBuild/testReport/logicmoo.pfc.sanity_base.quick_test/FC_01/ 
% ISSUE_SEARCH: https://github.com/logicmoo/logicmoo_workspace/issues?q=is%3Aissue+label%3AFC_01 
% ISSUE: https://github.com/logicmoo/logicmoo_workspace/issues/631 


```
%~ init_phase(after_load)
%~ init_phase(restore_state)
%
%~ init_why(after_boot,program)
%~ after_boot.
%~ Dont forget to ?- logicmoo_i_cyc_xform.
running('/var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/pfc/t/sanity_base/quick_test/fc_01.pfc'),
%~ /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_utils/prolog/logicmoo_test_header.pl:93 
%~ this_test_might_need( :-( use_module( library(logicmoo_plarkc))))


:- expects_dialect(pfc).

/*~
~*/


a11 ==> b11.
/*~
~*/

a11.

/*~
~*/


:- mpred_test(b11).

/*~
%~ ?-( mpred_test("Test_0001_Line_0000__B11",baseKB:b11)).
%~ FIlE: * https://logicmoo.org:2082/gitlab/logicmoo/logicmoo_workspace/-/edit/master/packs_sys/pfc/t/sanity_base/quick_test/fc_01.pfc#L14  
passed=info(why_was_true(baseKB:b11))

Justifications for b11:
    1.1 a11  % [* https://logicmoo.org:2082/gitlab/logicmoo/logicmoo_workspace/-/edit/master/packs_sys/pfc/t/sanity_base/quick_test/fc_01.pfc#L12 ] 
    1.2 a11==>b11  % [* https://logicmoo.org:2082/gitlab/logicmoo/logicmoo_workspace/-/edit/master/packs_sys/pfc/t/sanity_base/quick_test/fc_01.pfc#L11 ] 
    1.3 mfl4(_,baseKB,'* https://logicmoo.org:2082/gitlab/logicmoo/logicmoo_workspace/-/edit/master/packs_sys/pfc/t/sanity_base/quick_test/fc_01.pfc#L12 ',12) 
    1.4 mfl4(_,baseKB,'* https://logicmoo.org:2082/gitlab/logicmoo/logicmoo_workspace/-/edit/master/packs_sys/pfc/t/sanity_base/quick_test/fc_01.pfc#L11 ',11) 
	name	=	'logicmoo.pfc.sanity_base.quick_test.FC_01-Test_0001_Line_0000__B11'. 
	JUNIT_CLASSNAME	=	'logicmoo.pfc.sanity_base.quick_test.FC_01'. 
	JUNIT_CMD	=	'timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'fc_01.pfc\']"'. 
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace/test_results/jenkins/Report-logicmoo-pfc-sanity_base-quick_test-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_pfc_sanity_base_quick_test_FC_01_Test_0001_Line_0000_B11-junit.xml
~*/


:- listing(j_u:junit_prop/3).

/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/pfc/t/sanity_base/quick_test/fc_01.pfc:16 
%~ skipped( listing( j_u : junit_prop/3))
~*/


:- test_completed. 




/*~
%~ unused(no_junit_results)
Test_0001_Line_0000__B11	result	=	passed. 

%~ test_completed_exit(64)
```
totalTime=1.000

SUCCESS: /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-junit-minor -k fc_01.pfc (returned 64) Add_LABELS='' Rem_LABELS='Skipped,Errors,Warnings,Overtime,Skipped,Skipped'

logicmoo.pfc.sanity_base.quick_test.BC_01

Test case:logicmoo.pfc.sanity_base.quick_test.BC_01 JUnit
Outcome:Passed
Duration:1.0 sec
FailedNone
None
Stdout
 (cd /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/pfc/t/sanity_base/quick_test ; timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "['bc_01.pfc']")

% EDIT: https://github.com/logicmoo/logicmoo_workspace/edit/master/packs_sys/pfc/t/sanity_base/quick_test/bc_01.pfc 
% JENKINS: https://jenkins.logicmoo.org/job/logicmoo_workspace/lastBuild/testReport/logicmoo.pfc.sanity_base.quick_test/BC_01/ 
% ISSUE_SEARCH: https://github.com/logicmoo/logicmoo_workspace/issues?q=is%3Aissue+label%3ABC_01 
% ISSUE: https://github.com/logicmoo/logicmoo_workspace/issues/635 


```
%~ init_phase(after_load)
%~ init_phase(restore_state)
%
%~ init_why(after_boot,program)
%~ after_boot.
%~ Dont forget to ?- logicmoo_i_cyc_xform.
running('/var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/pfc/t/sanity_base/quick_test/bc_01.pfc'),
%~ this_test_might_need( :-( use_module( library(logicmoo_plarkc))))



:- dynamic(bc_q/1).
/*~
~*/

:- dynamic(bc_p/1).

/*~
~*/


:- (ain((bc_q(N) <gt;- bc_p(N)))).
/*~
~*/

:- listing(bc_q/1).

/*~
%~ skipped( listing( bc_q/1))
~*/


bc_p(a).
/*~
~*/

bc_p(b).
/*~
~*/

:- listing(bc_p/1).

/*~
%~ skipped( listing( bc_p/1))
~*/


:- mpred_trace_exec.

/*~
~*/


:- mpred_test(call_u(bc_p(b))).

%= nothing cached ?
/*~
%~ ?-( mpred_test("Test_0001_Line_0000__B",baseKB:call_u(bc_p(b)))).
passed=info(why_was_true(baseKB:call_u(bc_p(b))))
no_proof_for(call_u(bc_p(b))).

no_proof_for(call_u(bc_p(b))).

no_proof_for(call_u(bc_p(b))).

	name	=	'logicmoo.pfc.sanity_base.quick_test.BC_01-Test_0001_Line_0000__B'. 
	JUNIT_CLASSNAME	=	'logicmoo.pfc.sanity_base.quick_test.BC_01'. 
	JUNIT_CMD	=	'timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'bc_01.pfc\']"'. 
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace/test_results/jenkins/Report-logicmoo-pfc-sanity_base-quick_test-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_pfc_sanity_base_quick_test_BC_01_Test_0001_Line_0000_B-junit.xml
~*/


%= nothing cached ?
:- listing(bc_q/1).

/*~
%~ skipped( listing( bc_q/1))
~*/


:- mpred_test(\+ clause_u(bc_q(_),true)).

/*~
%~ ?-( mpred_test("Test_0002_Line_0000__naf_bc_q_1",baseKB:(\+clause_u(bc_q(Q),true)))).
passed=info(why_was_true(baseKB:(\+clause_u(bc_q(_2540),true))))
no_proof_for(\+clause_u(bc_q(Q1),true)).

no_proof_for(\+clause_u(bc_q(Q1),true)).

no_proof_for(\+clause_u(bc_q(Q1),true)).

	name	=	'logicmoo.pfc.sanity_base.quick_test.BC_01-Test_0002_Line_0000__naf_bc_q_1'. 
	JUNIT_CLASSNAME	=	'logicmoo.pfc.sanity_base.quick_test.BC_01'. 
	JUNIT_CMD	=	'timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'bc_01.pfc\']"'. 
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace/test_results/jenkins/Report-logicmoo-pfc-sanity_base-quick_test-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_pfc_sanity_base_quick_test_BC_01_Test_0002_Line_0000_naf_bc_q_1-junit.xml
~*/


:- mpred_test((call_u(bc_q(b)))).

%= something cached
/*~
%~ ?-( mpred_test("Test_0003_Line_0000__B",baseKB:call_u(bc_q(b)))).
%~ %~ 	Adding positive
%~ %~ 		trigger: bc_p(b)
%~ %~ 		body: rhs([ bc_q(b)])
%~ %~ 	 Support: (bc_q(P_Q)<gt;-bc_p(P_Q)),mfl4(['N'=N],baseKB,'* https://logicmoo.org:2082/gitlab/logicmoo/logicmoo_workspace/-/edit/master/packs_sys/pfc/t/sanity_base/quick_test/bc_01.pfc#L19 ',19)
%~ call_mpred_post4 :-
%~   level=147 ,
%~   que=0 ,
%~   assertion_status=unique ,
%~   support_status=none ,
%~   post1 = mpred_prop(baseKB,bc_p,1,pfcPosTrigger) ,
%~   fix_mp=baseKB ,
%~   mz=baseKB ,
%~   p0 = mpred_prop(baseKB,bc_p,1,pfcPosTrigger) ,
%~   support_fact = ( bc_q(_2028)<gt;-bc_p(_2028) ,
%~                    mfl4(
%~                       [ 'N'=N],
%~                        baseKB, '/var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/pfc/t/sanity_base/quick_test/bc_01.pfc', 19)) ,
%~   support_trig=ax.
%~ baseKB : mpred_fwc1( mpred_prop(baseKB,bc_p,1,pfcPosTrigger)).
%~ %~ 	Found positive trigger: mpred_prop(baseKB,bc_p,1,pfcPosTrigger)
%~ %~ 		body: \+ground((bc_p/1))*->rhs([ { trace_or_throw( mpred_prop(baseKB,bc_p,1,pfcPosTrigger)) }])
%~ %~ 	Found positive trigger: mpred_prop(baseKB,bc_p,1,pfcPosTrigger)
%~ %~ 		body: rhs([ mpred_prop(baseKB,bc_p,1,pfcWatches)])
%~ %~ 	RHS-Post1: mpred_prop(baseKB,bc_p,1,pfcWatches)
%~ %~ 	Support: mpred_prop(baseKB,bc_p,1,pfcPosTrigger),$pt(baseKB,mpred_prop(baseKB,bc_p,1,pfcPosTrigger),rhs([ mpred_prop(baseKB,bc_p,1,pfcWatches)]))
%~ call_mpred_post4 :-
%~   level=185 ,
%~   que=0 ,
%~   assertion_status=unique ,
%~   support_status=none ,
%~   post1 = mpred_prop(baseKB,bc_p,1,pfcWatches) ,
%~   fix_mp=baseKB ,
%~   mz=baseKB ,
%~   p0 = mpred_prop(baseKB,bc_p,1,pfcWatches) ,
%~   support_fact = mpred_prop(baseKB,bc_p,1,pfcPosTrigger) ,
%~   support_trig = '$pt'( baseKB,
%~                    mpred_prop(baseKB,bc_p,1,pfcPosTrigger),
%~                    rhs([mpred_prop(baseKB,bc_p,1,pfcWatches)])).
%~ baseKB : mpred_fwc1( mpred_prop(baseKB,bc_p,1,pfcWatches)).
%~ %~ 	Found positive trigger: mpred_prop(baseKB,bc_p,1,pfcWatches)
%~ %~ 		body: \+ground((bc_p/1))*->rhs([ { trace_or_throw( mpred_prop(baseKB,bc_p,1,pfcWatches)) }])
%~ %~ 	Found positive trigger: mpred_prop(baseKB,bc_p,1,pfcWatches)
%~ %~ 		body: rhs([ { kb_shared( baseKB : bc_p/1) }])
%~ call_mpred_post4 :-
%~   level=302 ,
%~   que=0 ,
%~   assertion_status=unique ,
%~   support_status=none ,
%~   post1 = mpred_prop(baseKB,bc_p,1,kb_shared) ,
%~   fix_mp=baseKB ,
%~   mz=baseKB ,
%~   p0 = mpred_prop(baseKB,bc_p,1,kb_shared) ,
%~   support_fact = mfl4(_28554,baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/pfc/t/sanity_base/quick_test/bc_01.pfc',35) ,
%~   support_trig=ax.
%~ baseKB : mpred_fwc1( mpred_prop(baseKB,bc_p,1,kb_shared)).
%~ %~ 	Found positive trigger: mpred_prop(baseKB,bc_p,1,kb_shared)
%~ %~ 		body: $pt(baseKB,genlMt(Call_BaseKB,baseKB),(Call_BaseKB\=baseKB*->rhs([ { nop( dmsg_pretty( Call_BaseKB :
%~ %~
%~ %~                                                                                          call(kb_shared,Call_BaseKB:bc_p/1))),
%~ %~                                                                      show_failure( on_x_fail( Call_BaseKB :
%~ %~
%~ %~                                                                                                 call(kb_shared,Call_BaseKB:bc_p/1))) }])))
%~ %~ 	Adding positive
%~ %~ 		trigger: genlMt(BaseKB,baseKB)
%~ %~ 		body: Call_BaseKB\=baseKB*->rhs([ { nop( dmsg_pretty( Call_BaseKB :
%~ %~
%~ %~                                                   call(kb_shared,Call_BaseKB:bc_p/1))),
%~ %~                               show_failure( on_x_fail( Call_BaseKB :
%~ %~
%~ %~                                                          call(kb_shared,Call_BaseKB:bc_p/1))) }])
%~ %~ 	 Support: mpred_prop(baseKB,bc_p,1,kb_shared),$pt(baseKB,mpred_prop(baseKB,bc_p,1,kb_shared),$pt(baseKB,genlMt(Call_BaseKB,baseKB),(Call_BaseKB\=baseKB*->rhs(
%~ %~                             [ { nop( dmsg_pretty( Call_BaseKB :
%~ %~
%~ %~                                                     call(kb_shared,Call_BaseKB:bc_p/1))),
%~ %~                                 show_failure( on_x_fail( Call_BaseKB :
%~ %~
%~ %~                                                            call(kb_shared,Call_BaseKB:bc_p/1))) }]))))
%~ %~ 	Found positive trigger: mpred_prop(baseKB,bc_p,1,kb_shared)
%~ %~ 		body: \+ground((bc_p/1))*->rhs([ { trace_or_throw( mpred_prop(baseKB,bc_p,1,kb_shared)) }])
%~ %~ 	Found positive trigger: mpred_prop(baseKB,bc_p,1,kb_shared)
%~ %~ 		body: genlPreds(kb_shared,Prop_GenlPreds_Kb_shared)*->rhs([ mpred_prop(baseKB,bc_p,1,Prop_GenlPreds_Kb_shared)])
%~ %~ 	Found positive trigger: mpred_prop(baseKB,bc_p,1,pfcWatches)
%~ %~ 		body: genlPreds(pfcWatches,Prop_GenlPreds_PfcWatches)*->rhs([ mpred_prop(baseKB,bc_p,1,Prop_GenlPreds_PfcWatches)])
%~ %~ 	Found positive trigger: mpred_prop(baseKB,bc_p,1,pfcPosTrigger)
%~ %~ 		body: genlPreds(pfcPosTrigger,Prop_GenlPreds_PfcPosTrigger)*->rhs([ mpred_prop(baseKB,bc_p,1,Prop_GenlPreds_PfcPosTrigger)])
%~ %~ 	RHS-Post1: bc_q(b)
%~ %~ 	Support: bc_p(b),$pt(baseKB,bc_p(b),rhs([ bc_q(b)]))
%~ call_mpred_post4 :-
%~   level=139 ,
%~   que=0 ,
%~   assertion_status=unique ,
%~   support_status=none ,
%~   post1 = bc_q(b) ,
%~   fix_mp=baseKB ,
%~   mz=baseKB ,
%~   p0 = bc_q(b) ,
%~   support_fact = bc_p(b) ,
%~   support_trig = '$pt'(baseKB,bc_p(b),rhs([bc_q(b)])).
%~ baseKB : mpred_fwc1( bc_q(b)).
passed=info(why_was_true(baseKB:call_u(bc_q(b))))
no_proof_for(call_u(bc_q(b))).

%~ %~ 	Adding positive
%~ %~ 		trigger: bc_p(b)
%~ %~ 		body: rhs([ bc_q(b)])
%~ %~ 	 Support: (bc_q(P_Q)<gt;-bc_p(P_Q)),mfl4(['N'=N],baseKB,'* https://logicmoo.org:2082/gitlab/logicmoo/logicmoo_workspace/-/edit/master/packs_sys/pfc/t/sanity_base/quick_test/bc_01.pfc#L19 ',19)
%~ %~ 	RHS-Post1: bc_q(b)
%~ %~ 	Support: bc_p(b),$pt(baseKB,bc_p(b),rhs([ bc_q(b)]))
%~ call_mpred_post4 :-
%~   level=191 ,
%~   que=0 ,
%~   assertion_status=identical ,
%~   support_status=exact ,
%~   post1 = bc_q(b) ,
%~   fix_mp=baseKB ,
%~   mz=baseKB ,
%~   p0 = bc_q(b) ,
%~   support_fact = bc_p(b) ,
%~   support_trig = '$pt'(baseKB,bc_p(b),rhs([bc_q(b)])).
no_proof_for(call_u(bc_q(b))).

no_proof_for(call_u(bc_q(b))).

	name	=	'logicmoo.pfc.sanity_base.quick_test.BC_01-Test_0003_Line_0000__B'. 
	JUNIT_CLASSNAME	=	'logicmoo.pfc.sanity_base.quick_test.BC_01'. 
	JUNIT_CMD	=	'timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'bc_01.pfc\']"'. 
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace/test_results/jenkins/Report-logicmoo-pfc-sanity_base-quick_test-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_pfc_sanity_base_quick_test_BC_01_Test_0003_Line_0000_B-junit.xml
~*/


%= something cached
:- listing(bc_q/1).
/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/pfc/t/sanity_base/quick_test/bc_01.pfc:38 
%~ skipped( listing( bc_q/1))
~*/

:- mpred_test( clause_u(bc_q(_),true)).


/*~
%~ ?-( mpred_test("Test_0004_Line_0000__bc_q_1",baseKB:clause_u(bc_q(Q),true))).
passed=info(why_was_true(baseKB:clause_u(bc_q(b),true)))
no_proof_for(clause_u(bc_q(b),true)).

no_proof_for(clause_u(bc_q(b),true)).

no_proof_for(clause_u(bc_q(b),true)).

	name	=	'logicmoo.pfc.sanity_base.quick_test.BC_01-Test_0004_Line_0000__bc_q_1'. 
	JUNIT_CLASSNAME	=	'logicmoo.pfc.sanity_base.quick_test.BC_01'. 
	JUNIT_CMD	=	'timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'bc_01.pfc\']"'. 
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace/test_results/jenkins/Report-logicmoo-pfc-sanity_base-quick_test-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_pfc_sanity_base_quick_test_BC_01_Test_0004_Line_0000_bc_q_1-junit.xml
~*/
%~ unused(no_junit_results)
Test_0001_Line_0000__B	result	=	passed. 
Test_0002_Line_0000__naf_bc_q_1	result	=	passed. 
Test_0003_Line_0000__B	result	=	passed. 
Test_0004_Line_0000__bc_q_1	result	=	passed. 

%~ test_completed_exit(64)
```
totalTime=1.000

SUCCESS: /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-junit-minor -k bc_01.pfc (returned 64) Add_LABELS='' Rem_LABELS='Skipped,Errors,Warnings,Overtime,Skipped,Skipped'

Test Suite: Rollup logicmoo.pfc.test.sanity_base in /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/pfc/t/sanity_base

Package: logicmoo.pfc.test.sanity_base

Results

Duration0.0 sec
Tests4
Failures4

Tests

logicmoo.pfc.test.sanity_base.DL_01

Test case:logicmoo.pfc.test.sanity_base.DL_01 JUnit
Outcome:Failed
Duration:1.0 sec
FailedFAILED: /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-junit-minor -k dl_01.pfc (returned 0)
failed
Stderr
 (cd /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/pfc/t/sanity_base ; timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "['dl_01.pfc']")

% EDIT: https://github.com/logicmoo/logicmoo_workspace/edit/master/packs_sys/pfc/t/sanity_base/dl_01.pfc 
% JENKINS: https://jenkins.logicmoo.org/job/logicmoo_workspace/lastBuild/testReport/logicmoo.pfc.test.sanity_base/DL_01/ 
% ISSUE_SEARCH: https://github.com/logicmoo/logicmoo_workspace/issues?q=is%3Aissue+label%3ADL_01 
% ISSUE: https://github.com/logicmoo/logicmoo_workspace/issues/92 


```
%~ init_phase(after_load)
%~ init_phase(restore_state)
%
%~ init_why(after_boot,program)
%~ after_boot.
%~ Dont forget to ?- logicmoo_i_cyc_xform.
running('/var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/pfc/t/sanity_base/dl_01.pfc'),
%~ this_test_might_need( :-( use_module( library(logicmoo_plarkc))))


:- dynamic(meta_argtypes/1).

/*~
~*/


:- expects_dialect(pfc).

/*~
~*/


:- include('df_include.pi').

/*~
running(-),
%~ /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_utils/prolog/logicmoo_test_header.pl:44 
%~ reload_of_test_header.
%~ this_test_might_need( :-( use_module( library(logicmoo_plarkc))))
~*/


:-dynamic((a/1,b/1,c/1)).

/*~
~*/


a(X) ==> c(X).
/*~
~*/

a(1).

/*~
~*/


most(c(X) ==> b(X)) .

/*~
~*/


:- listing([a/1,b/1,c/1,(==>)/2,most/1,pt,nt,bct]).


% ISSUE: https://github.com/logicmoo/logicmoo_workspace/issues/92 
% EDIT: https://github.com/logicmoo/logicmoo_workspace/edit/master/packs_sys/pfc/t/sanity_base/dl_01.pfc 
% JENKINS: https://jenkins.logicmoo.org/job/logicmoo_workspace/lastBuild/testReport/logicmoo.pfc.test.sanity_base/DL_01/ 
% ISSUE_SEARCH: https://github.com/logicmoo/logicmoo_workspace/issues?q=is%3Aissue+label%3ADL_01 

/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/pfc/t/sanity_base/dl_01.pfc:28 
%~ skipped( listing( [ a/1, b/1,c/1,(==>)/2,most/1,pt,
%~                     nt,bct]))
~*/
%~ unused(no_junit_results)

%~ test_completed_exit(0)
```
totalTime=1.000

FAILED: /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-junit-minor -k dl_01.pfc (returned 0) Add_LABELS='' Rem_LABELS='Skipped,Skipped,Errors,Warnings,Overtime,Skipped,Skipped'

logicmoo.pfc.test.sanity_base.DF_05

Test case:logicmoo.pfc.test.sanity_base.DF_05 JUnit
Outcome:Failed
Duration:1.0 sec
FailedFAILED: /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-junit-minor -k df_05.pfc (returned 8)
failed
Stderr
 (cd /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/pfc/t/sanity_base ; timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "['df_05.pfc']")

% EDIT: https://github.com/logicmoo/logicmoo_workspace/edit/master/packs_sys/pfc/t/sanity_base/df_05.pfc 
% JENKINS: https://jenkins.logicmoo.org/job/logicmoo_workspace/lastBuild/testReport/logicmoo.pfc.test.sanity_base/DF_05/ 
% ISSUE_SEARCH: https://github.com/logicmoo/logicmoo_workspace/issues?q=is%3Aissue+label%3ADF_05 
% ISSUE: https://github.com/logicmoo/logicmoo_workspace/issues/306 


```
%~ init_phase(after_load)
%~ init_phase(restore_state)
%
%~ init_why(after_boot,program)
%~ after_boot.
%~ Dont forget to ?- logicmoo_i_cyc_xform.
running('/var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/pfc/t/sanity_base/df_05.pfc'),
%~ /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_utils/prolog/logicmoo_test_header.pl:93 
%~ this_test_might_need( :-( use_module( library(logicmoo_plarkc))))


:- expects_dialect(pfc).

/*~
~*/


:- dynamic(test1_2_3/3).
/*~
~*/

:- dynamic(meta_argtypes/1).

%
%  PFC is a language extension for prolog.. there is so much that can be done in this language extension to Prolog
%
% Dec 13, 2035
% Douglas Miles
%  cls ; kill -9 %1 ; fg ; swipl -g "ensure_loaded(pack(logicmoo_base/t/examples/base/'sanity_abc.pfc'))."
 
/*~
~*/


%
%  PFC is a language extension for prolog.. there is so much that can be done in this language extension to Prolog
%
% Dec 13, 2035
% Douglas Miles
%  cls ; kill -9 %1 ; fg ; swipl -g "ensure_loaded(pack(logicmoo_base/t/examples/base/'sanity_abc.pfc'))."
 
:- dynamic(most/1).

/*~
~*/


:- expects_dialect(pfc).

/*~
~*/


meta_argtypes(most(ftAssertable)).

% BWD chaining
/*~
~*/


% BWD chaining
most((Q <gt;- P))/mpred_literal(Q) ==> (Q <gt;-(P, \+ ~(Q))).

% FWD chaining
/*~
~*/


% FWD chaining
most(P==>Q)/nonvar(Q) ==> (((P ==> most(Q)))).

% NEG chaining
/*~
~*/


% NEG chaining
most(~Q)/mpred_positive_literal(Q)  ==>  (( \+ Q ) ==> ~ Q ).

% POS chaining 1
/*~
~*/


% POS chaining 1
most(Q)/(mpred_positive_literal(Q),if_missing_mask(Q,R,Test)) ==> (  ( ( \+R /Test , (\+ ~ Q)) ==> Q )).

% POS chaining 2
/*~
~*/


% POS chaining 2
most(Q)/(mpred_positive_literal(Q),if_missing_mask(Q,R,Test)) ==> ( ((R/( \+(R=Q), Test)) ==> (\+ Q))).

% POS chaining 1+2
% most(Q)/(mpred_positive_literal(Q),if_missing_mask(Q,R,Test)) ==> (  ( ( \+R /Test ) ==> Q ) ,((R/( \+(R=Q), Test)) ==> (\+ Q))).

% most(Q) ==> if_missing(Q,Q).

%(most(P=>Q)/(mpred_literal_nv(Q),if_missing_mask(Q,R,Test)))  ==> ((P, \+ R/Test) => Q).
%(most(P=>Q)/nonvar(Q)) ==> (P => most(Q)).

 
/*~
~*/


% POS chaining 1+2
% most(Q)/(mpred_positive_literal(Q),if_missing_mask(Q,R,Test)) ==> (  ( ( \+R /Test ) ==> Q ) ,((R/( \+(R=Q), Test)) ==> (\+ Q))).

% most(Q) ==> if_missing(Q,Q).

%(most(P=>Q)/(mpred_literal_nv(Q),if_missing_mask(Q,R,Test)))  ==> ((P, \+ R/Test) => Q).
%(most(P=>Q)/nonvar(Q)) ==> (P => most(Q)).

 
:-ain(most(t(test1_2_3,1,2,3))).

/*~
~*/


most(t(test1_2_3,1,2,3)).


/*~
~*/



?- listing(test1_2_3).

/*~
:- dynamic test1_2_3/3.
:- multifile test1_2_3/3.
:- public test1_2_3/3.
:- module_transparent test1_2_3/3.


~*/


:- mpred_test(test1_2_3(1,2,3)).



% ISSUE: https://github.com/logicmoo/logicmoo_workspace/issues/306 
% EDIT: https://github.com/logicmoo/logicmoo_workspace/edit/master/packs_sys/pfc/t/sanity_base/df_05.pfc 
% JENKINS: https://jenkins.logicmoo.org/job/logicmoo_workspace/lastBuild/testReport/logicmoo.pfc.test.sanity_base/DF_05/ 
% ISSUE_SEARCH: https://github.com/logicmoo/logicmoo_workspace/issues?q=is%3Aissue+label%3ADF_05 

/*~
%~ ?-( mpred_test("Test_0001_Line_0000__test1_2_3_1",baseKB:test1_2_3(1,2,3))).
failure=info((why_was_true(baseKB:(\+test1_2_3(1,2,3))),nop(ftrace(baseKB:test1_2_3(1,2,3)))))
no_proof_for(\+test1_2_3(1,2,3)).

no_proof_for(\+test1_2_3(1,2,3)).

no_proof_for(\+test1_2_3(1,2,3)).

	name	=	'logicmoo.pfc.test.sanity_base.DF_05-Test_0001_Line_0000__test1_2_3_1'. 
	JUNIT_CLASSNAME	=	'logicmoo.pfc.test.sanity_base.DF_05'. 
	JUNIT_CMD	=	'timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'df_05.pfc\']"'. 
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace/test_results/jenkins/Report-logicmoo-pfc-test-sanity_base-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_pfc_test_sanity_base_DF_05_Test_0001_Line_0000_test1_2_3_1-junit.xml
~*/
%~ unused(no_junit_results)
Test_0001_Line_0000__test1_2_3_1	result	=	failure. 

%~ /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/pfc/t/sanity_base/df_05.pfc:71 
%~ test_completed_exit(8)
```
totalTime=1.000

FAILED: /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-junit-minor -k df_05.pfc (returned 8) Add_LABELS='' Rem_LABELS='Skipped,Skipped,Errors,Warnings,Overtime,Skipped'

logicmoo.pfc.test.sanity_base.NLDM320_FWD

Test case:logicmoo.pfc.test.sanity_base.NLDM320_FWD JUnit
Outcome:Failed
Duration:1.0 sec
FailedFAILED: /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-junit-minor -k nldm320_fwd.pl (returned 0)
failed
Stderr
 (cd /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/pfc/t/sanity_base ; timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "['nldm320_fwd.pl']")

% EDIT: https://github.com/logicmoo/logicmoo_workspace/edit/master/packs_sys/pfc/t/sanity_base/nldm320_fwd.pl 
% JENKINS: https://jenkins.logicmoo.org/job/logicmoo_workspace/lastBuild/testReport/logicmoo.pfc.test.sanity_base/NLDM320_FWD/ 
% ISSUE_SEARCH: https://github.com/logicmoo/logicmoo_workspace/issues?q=is%3Aissue+label%3ANLDM320_FWD 
% ISSUE: https://github.com/logicmoo/logicmoo_workspace/issues/360 


```
%~ 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/workspace/logicmoo_workspace/packs_sys/pfc/t/sanity_base/nldm320_fwd.pl:37 
%~ skipped(messy_on_output,cls)


adj=10

%~ message_hook_type(warning)
%~ message_hook(
%~    goal_failed( directive,
%~      user : ( predicate_property(tc(Tc,Tc3),number_of_clauses(CC)) ,
%~               write_ln( tc=CC))),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 user : ( predicate_property(tc(Tc,Tc3),number_of_clauses(CC)) ,
%~                                          write_ln( tc=CC))]])
%~ source_location('/var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/pfc/t/sanity_base/nldm320_fwd.pl',48)
Goal (directive) failed: user:(predicate_property(tc(_490,_494),number_of_clauses(_498)),write_ln(tc=_498))
Warning: /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/pfc/t/sanity_base/nldm320_fwd.pl:48:
Warning:    Goal (directive) failed: user:(predicate_property(tc(_490,_494),number_of_clauses(_498)),write_ln(tc=_498))
% 85 inferences, 0.000 CPU in 0.000 seconds (99% CPU, 2470930 Lips)
%~ message_hook_type(error)
%~ message_hook(
%~    error(existence_error(procedure,tc/2),context('$bags':findall_loop/4,Context_Kw)),
%~    error,
%~    [ '~q/~w: '-[findall_loop,4],
%~      'Unknown procedure: ~q' - [ tc/2]])
%~ source_location('/var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/pfc/t/sanity_base/nldm320_fwd.pl',52)
findall_loop/4: Unknown procedure: tc/2
ERROR: /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/pfc/t/sanity_base/nldm320_fwd.pl:52:
ERROR:    findall_loop/4: Unknown procedure: tc/2
%~ message_hook_type(warning)
%~ message_hook(
%~    goal_failed( directive,
%~      user : ( time( findall(Tc,tc(_X,_Y),L))  ,
%~               ! ,
%~               length(L,N) ,
%~               write_ln( length_was(N)))),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 user : ( time( findall(Tc,tc(_X,_Y),L))  ,
%~                                          ! ,
%~                                          length(L,N) ,
%~                                          write_ln( length_was(N)))]])
%~ source_location('/var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/pfc/t/sanity_base/nldm320_fwd.pl',52)
Goal (directive) failed: user:(time(findall(_524,tc(_526,_528),_530)),!,length(_530,_544),write_ln(length_was(_544)))
Warning: /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/pfc/t/sanity_base/nldm320_fwd.pl:52:
Warning:    Goal (directive) failed: user:(time(findall(_524,tc(_526,_528),_530)),!,length(_530,_544),write_ln(length_was(_544)))


time_was(0.02637983899999985)

% halt
```
totalTime=1.000

FAILED: /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-junit-minor -k nldm320_fwd.pl (returned 0) Add_LABELS='' Rem_LABELS='Skipped,Skipped,Errors,Warnings,Overtime,Skipped,Skipped'

logicmoo.pfc.test.sanity_base.NLDM1000

Test case:logicmoo.pfc.test.sanity_base.NLDM1000 JUnit
Outcome:Failed
Duration:10.0 sec
FailedFAILED: /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-junit-minor -k nldm1000.pfc (returned 137)
failed
Stderr
 (cd /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/pfc/t/sanity_base ; timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "['nldm1000.pfc']")

% EDIT: https://github.com/logicmoo/logicmoo_workspace/edit/master/packs_sys/pfc/t/sanity_base/nldm1000.pfc 
% JENKINS: https://jenkins.logicmoo.org/job/logicmoo_workspace/lastBuild/testReport/logicmoo.pfc.test.sanity_base/NLDM1000/ 
% ISSUE_SEARCH: https://github.com/logicmoo/logicmoo_workspace/issues?q=is%3Aissue+label%3ANLDM1000 
% ISSUE: https://github.com/logicmoo/logicmoo_workspace/issues/412 


```
%~ 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/workspace/logicmoo_workspace/packs_sys/pfc/t/sanity_base/nldm1000.pfc:3 
%~ skipped(messy_on_output,cls)
```
totalTime=10.000

FAILED: /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-junit-minor -k nldm1000.pfc (returned 137) Add_LABELS='Errors,Overtime' Rem_LABELS='Skipped,Skipped,Warnings,Skipped'

Test Suite: logicmoo.agi.agi_test.comprehension.COMPREHENSION_01

Package: logicmoo.agi.agi_test.comprehension

Results

Duration0.0 sec
Tests1
Failures0

Tests

logicmoo.agi.agi_test.comprehension.COMPREHENSION_01

Test case:logicmoo.agi.agi_test.comprehension.COMPREHENSION_01@Test_0001_Line_0015__What_is_a_peacock_c63: baseKB:e2c('What is a peacock?')
Outcome:Passed
Duration:2.0 sec
FailedNone
None
Stderr
name=Test_0001_Line_0015__What_is_a_peacock_c63
JUNIT_CLASSNAME='logicmoo.agi.agi_test.comprehension.COMPREHENSION_01'.
JUNIT_CMD='timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'comprehension_01.pl\']"'.
 (cd /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_agi/t/agi_tests/comprehension ; timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "['comprehension_01.pl']")

```
%~ init_phase(after_load)
%~ init_phase(restore_state)
%
%~ init_why(after_boot,program)
%~ after_boot.
%~ Dont forget to ?- logicmoo_i_cyc_xform.
running('/var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_agi/t/agi_tests/comprehension/comprehension_01.pl'),
%~ this_test_might_need( :-( expects_dialect(pfc)))
%~ this_test_might_need( :-( use_module( library(logicmoo_plarkc))))

test_here(X):- notrace(mpred_test(e2c(X))).

/*~
No source location!?
~*/

test_convo_file(File):- atom_contains(File,'0'),!.
/*~
No source location!?
~*/

test_convo_file(File):-
  open(File,read,IS),
  repeat,
  catch(read_term(IS,Term,[syntax_errors(error)]),_,fail),
   (Term == end_of_file -> close(IS) ; 
    (ignore(test_convo_term(Term)),fail)).

/*~
No source location!?
~*/

test_convo_term(X):-
 forall((sub_term(E,X),atomic(E),atom_contains(E,' '),
   %dont parse end comment (Yet)
   \+ atom_contains(E,'CasAm')),
  test_here(E)).

/*~
No source location!?
~*/

:- prolog_load_context(directory,X), cd(X),
   expand_file_name('Meta*Peacock.plt',Files),
   maplist(test_convo_file,Files).

% EDIT: https://github.com/logicmoo/logicmoo_workspace/edit/master/packs_sys/logicmoo_agi/t/agi_tests/comprehension/comprehension_01.pl
% JENKINS: https://jenkins.logicmoo.org/job/logicmoo_workspace/lastBuild/testReport/logicmoo.agi.agi_test.comprehension/COMPREHENSION_01/logicmoo_agi_agi_test_comprehension_COMPREHENSION_01/
% ISSUE_SEARCH: https://github.com/logicmoo/logicmoo_workspace/issues?q=is%3Aissue+label%3ACOMPREHENSION_01

% ISSUE: https://github.com/logicmoo/logicmoo_workspace/issues/645
/*~
%~ ?-( mpred_test("Test_0001_Line_0015__What_is_a_peacock_c63",baseKB:e2c('What is a peacock?'))).
?-e2c('What is a peacock?')
asserted( exists( Exists,
            ( info( 'XVAR_NP_What_1_1', [
                [ loc(1), pos('NP'),equals('XVAR_NP_What_1_1'),seg(1,1),
                  phrase('NP'),size(1),lnks(2),
                  #(r('NP',seg(1,1))),txt(["What"]),childs(0),
                  link(1,'SBAR',r('SBAR',seg(1,5))),
                  link(2,'CORENLP',r('CORENLP',seg(1,5)))])]  &
              info( 'XVAR_NP_Peacock_3_4', [
                [ loc(3), pos('NP'),equals('XVAR_NP_Peacock_3_4'),seg(3,4),
                  phrase('NP'),size(2),lnks(3),
                  #(r('NP',seg(3,4))),txt(["a","peacock"]),
                  childs(0),link(1,'S',r('S',seg(2,4))),
                  link(2,'SBAR',r('SBAR',seg(1,5))),
                  link(3,'CORENLP',r('CORENLP',seg(1,5)))])] &
              warn( unparsed( Exists, [
                      [ w( 'XVAR_NP_What_1_1', [
                          [ loc(1), pos('NP'),equals('XVAR_NP_What_1_1'),seg(1,1),
                            phrase('NP'),size(1),lnks(2),
                            #(r('NP',seg(1,1))),txt(["What"]),childs(0),
                            link(1,'SBAR',r('SBAR',seg(1,5))),
                            link(2,'CORENLP',r('CORENLP',seg(1,5)))])],
                        w( is, [
                          [ pos(vbz), root(be),loc(2),lnks(3),txt("is"),
                            truecase('LOWER'),link(1,'S',r('S',seg(2,4))),
                            link(2,'SBAR',r('SBAR',seg(1,5))), link(3,'CORENLP',r('CORENLP',seg(1,5))),lex_winfo,
                            flexicon(bv,[person=3,agr=sg,verb_form=tensed],is),
                            talk_db(intransitive,be,is,was,being,been),
                            talk_db(intransitive,am,is,was,being,been),
                            talk_db(intransitive,are,is,was,being,been)])],
                        w( 'XVAR_NP_Peacock_3_4', [
                          [ loc(3), pos('NP'),equals('XVAR_NP_Peacock_3_4'),seg(3,4),
                            phrase('NP'),size(2),lnks(3),
                            #(r('NP',seg(3,4))),txt(["a","peacock"]),
                            childs(0),link(1,'S',r('S',seg(2,4))),
                            link(2,'SBAR',r('SBAR',seg(1,5))),
                            link(3,'CORENLP',r('CORENLP',seg(1,5)))])],
                        w( ?, [
                          [ pos('.'), root(?),loc(5),lnks(2),txt("?"),
                            link(1,'SBAR',r('SBAR',seg(1,5))), link(2,'CORENLP',r('CORENLP',seg(1,5))),lex_winfo,
                            terminator_lex(?,?),char_type_sentence(?,ask)])],
                        span( [ seg(2,4), phrase('S'),size(3),lnks(2),#(r('S',seg(2,4))),
                                txt(["is","a","peacock"]),childs(1),
                                child(1,'NP',r('NP',seg(3,4))),
                                link(1,'SBAR',r('SBAR',seg(1,5))),
                                link(2,'CORENLP',r('CORENLP',seg(1,5)))]),
                        span( [ seg(1,5), phrase('CORENLP'),size(5),lnks(0),
                                #( r('CORENLP',seg(1,5))),
                                txt( [ "What", "is","a","peacock","?"]), childs(1),child(1,'SBAR',r('SBAR',seg(1,5)))]),
                        span( [ seg(1,5), phrase('SBAR'),size(5),lnks(1),
                                #( r('SBAR',seg(1,5))),
                                txt( [ "What", "is","a","peacock","?"]), childs(2),child(1,'NP',r('NP',seg(1,1))),
                                child(2,'S',r('S',seg(2,4))),
                                link(1,'CORENLP',r('CORENLP',seg(1,5)))])])]))))
passed=info(why_was_true(baseKB:e2c('What is a peacock?')))
no_proof_for(e2c('What is a peacock?')).

?-e2c('What is a peacock?')
asserted( exists( Exists,
            ( info( 'XVAR_NP_What_1_1', [
                [ loc(1), pos('NP'),equals('XVAR_NP_What_1_1'),seg(1,1),
                  phrase('NP'),size(1),lnks(2),
                  #(r('NP',seg(1,1))),txt(["What"]),childs(0),
                  link(1,'SBAR',r('SBAR',seg(1,5))),
                  link(2,'CORENLP',r('CORENLP',seg(1,5)))])]  &
              info( 'XVAR_NP_Peacock_3_4', [
                [ loc(3), pos('NP'),equals('XVAR_NP_Peacock_3_4'),seg(3,4),
                  phrase('NP'),size(2),lnks(3),
                  #(r('NP',seg(3,4))),txt(["a","peacock"]),
                  childs(0),link(1,'S',r('S',seg(2,4))),
                  link(2,'SBAR',r('SBAR',seg(1,5))),
                  link(3,'CORENLP',r('CORENLP',seg(1,5)))])] &
              warn( unparsed( Exists, [
                      [ w( 'XVAR_NP_What_1_1', [
                          [ loc(1), pos('NP'),equals('XVAR_NP_What_1_1'),seg(1,1),
                            phrase('NP'),size(1),lnks(2),
                            #(r('NP',seg(1,1))),txt(["What"]),childs(0),
                            link(1,'SBAR',r('SBAR',seg(1,5))),
                            link(2,'CORENLP',r('CORENLP',seg(1,5)))])],
                        w( is, [
                          [ pos(vbz), root(be),loc(2),lnks(3),txt("is"),
                            truecase('LOWER'),link(1,'S',r('S',seg(2,4))),
                            link(2,'SBAR',r('SBAR',seg(1,5))), link(3,'CORENLP',r('CORENLP',seg(1,5))),lex_winfo,
                            flexicon(bv,[person=3,agr=sg,verb_form=tensed],is),
                            talk_db(intransitive,be,is,was,being,been),
                            talk_db(intransitive,am,is,was,being,been),
                            talk_db(intransitive,are,is,was,being,been)])],
                        w( 'XVAR_NP_Peacock_3_4', [
                          [ loc(3), pos('NP'),equals('XVAR_NP_Peacock_3_4'),seg(3,4),
                            phrase('NP'),size(2),lnks(3),
                            #(r('NP',seg(3,4))),txt(["a","peacock"]),
                            childs(0),link(1,'S',r('S',seg(2,4))),
                            link(2,'SBAR',r('SBAR',seg(1,5))),
                            link(3,'CORENLP',r('CORENLP',seg(1,5)))])],
                        w( ?, [
                          [ pos('.'), root(?),loc(5),lnks(2),txt("?"),
                            link(1,'SBAR',r('SBAR',seg(1,5))), link(2,'CORENLP',r('CORENLP',seg(1,5))),lex_winfo,
                            terminator_lex(?,?),char_type_sentence(?,ask)])],
                        span( [ seg(2,4), phrase('S'),size(3),lnks(2),#(r('S',seg(2,4))),
      
goal=baseKB:e2c('What is a peacock?').
src='Metaphor_StandardOnly_Peacock.plt':15.
url=Metaphor_StandardOnly_Peacock.plt#L15
time=1.9760229587554932.
passed=passed=info(why_was_true(baseKB:e2c('What is a peacock?')))
no_proof_for(e2c('What is a peacock?')).

?-e2c('What is a peacock?')
asserted( exists( Exists,
            ( info( 'XVAR_NP_What_1_1', [
                [ loc(1), pos('NP'),equals('XVAR_NP_What_1_1'),seg(1,1),
                  phrase('NP'),size(1),lnks(2),
                  #(r('NP',seg(1,1))),txt(["What"]),childs(0),
                  link(1,'SBAR',r('SBAR',seg(1,5))),
                  link(2,'CORENLP',r('CORENLP',seg(1,5)))])]  &
              info( 'XVAR_NP_Peacock_3_4', [
                [ loc(3), pos('NP'),equals('XVAR_NP_Peacock_3_4'),seg(3,4),
                  phrase('NP'),size(2),lnks(3),
                  #(r('NP',seg(3,4))),txt(["a","peacock"]),
                  childs(0),link(1,'S',r('S',seg(2,4))),
                  link(2,'SBAR',r('SBAR',seg(1,5))),
                  link(3,'CORENLP',r('CORENLP',seg(1,5)))])] &
              warn( unparsed( Exists, [
                      [ w( 'XVAR_NP_What_1_1', [
                          [ loc(1), pos('NP'),equals('XVAR_NP_What_1_1'),seg(1,1),
                            phrase('NP'),size(1),lnks(2),
                            #(r('NP',seg(1,1))),txt(["What"]),childs(0),
                            link(1,'SBAR',r('SBAR',seg(1,5))),
                            link(2,'CORENLP',r('CORENLP',seg(1,5)))])],
                        w( is, [
                          [ pos(vbz), root(be),loc(2),lnks(3),txt("is"),
                            truecase('LOWER'),link(1,'S',r('S',seg(2,4))),
                            link(2,'SBAR',r('SBAR',seg(1,5))), link(3,'CORENLP',r('CORENLP',seg(1,5))),lex_winfo,
                            flexicon(bv,[person=3,agr=sg,verb_form=tensed],is),
                            talk_db(intransitive,be,is,was,being,been),
                            talk_db(intransitive,am,is,was,being,been),
                            talk_db(intransitive,are,is,was,being,been)])],
                        w( 'XVAR_NP_Peacock_3_4', [
                          [ loc(3), pos('NP'),equals('XVAR_NP_Peacock_3_4'),seg(3,4),
                            phrase('NP'),size(2),lnks(3),
                            #(r('NP',seg(3,4))),txt(["a","peacock"]),
                            childs(0),link(1,'S',r('S',seg(2,4))),
                            link(2,'SBAR',r('SBAR',seg(1,5))),
                            link(3,'CORENLP',r('CORENLP',seg(1,5)))])],
                        w( ?, [
                          [ pos('.'), root(?),loc(5),lnks(2),txt("?"),
                            link(1,'SBAR',r('SBAR',seg(1,5))), link(2,'CORENLP',r('CORENLP',seg(1,5))),lex_winfo,
                            terminator_lex(?,?),char_type_sentence(?,ask)])],
                        span( [ seg(2,4), phrase('S'),size(3),lnks(2),#(r('S',seg(2,4))),
                                txt(["is","a","peacock"]),childs(1),
                                child(1,'NP',r('NP',seg(3,4))),
                                link(1,'SBAR',r('SBAR',seg(1,5))),
                                link(2,'CORENLP',r('CORENLP',seg(1,5)))]),
                        span( [ seg(1,5), phrase('CORENLP'),size(5),lnks(0),
                                #( r('CORENLP',seg(1,5))),
                                txt( [ "What", "is","a","peacock","?"]), childs(1),child(1,'SBAR',r('SBAR',seg(1,5)))]),
                        span( [ seg(1,5), phrase('SBAR'),size(5),lnks(1),
                                #( r('SBAR',seg(1,5))),
                                txt( [ "What", "is","a","peacock","?"]), childs(2),child(1,'NP',r('NP',seg(1,1))),
                                child(2,'S',r('S',seg(2,4))),
                                link(1,'CORENLP',r('CORENLP',seg(1,5)))])])]))))
no_proof_for(e2c('What is a peacock?')).

no_proof_for(e2c('What is a peacock?')).

result=passed.

Test Suite: logicmoo.agi.agi_test.comprehension.COMPREHENSION_01

Package: logicmoo.agi.agi_test.comprehension

Results

Duration4.0 sec
Tests1
Failures0

Tests

logicmoo.agi.agi_test.comprehension.COMPREHENSION_01

Test case:logicmoo.agi.agi_test.comprehension.COMPREHENSION_01@Test_0002_Line_0015__What_is_a_peacock_c63: baseKB:e2c('What is a peacock?')
Outcome:Passed
Duration:1.9 sec
FailedNone
None
Stderr
name=Test_0002_Line_0015__What_is_a_peacock_c63
JUNIT_CLASSNAME='logicmoo.agi.agi_test.comprehension.COMPREHENSION_01'.
JUNIT_CMD='timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'comprehension_01.pl\']"'.
 (cd /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_agi/t/agi_tests/comprehension ; timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "['comprehension_01.pl']")

```
%~ init_phase(after_load)
%~ init_phase(restore_state)
%
%~ init_why(after_boot,program)
%~ after_boot.
%~ Dont forget to ?- logicmoo_i_cyc_xform.
running('/var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_agi/t/agi_tests/comprehension/comprehension_01.pl'),
%~ this_test_might_need( :-( expects_dialect(pfc)))
%~ this_test_might_need( :-( use_module( library(logicmoo_plarkc))))

test_here(X):- notrace(mpred_test(e2c(X))).

/*~
No source location!?
~*/

test_convo_file(File):- atom_contains(File,'0'),!.
/*~
No source location!?
~*/

test_convo_file(File):-
  open(File,read,IS),
  repeat,
  catch(read_term(IS,Term,[syntax_errors(error)]),_,fail),
   (Term == end_of_file -> close(IS) ; 
    (ignore(test_convo_term(Term)),fail)).

/*~
No source location!?
~*/

test_convo_term(X):-
 forall((sub_term(E,X),atomic(E),atom_contains(E,' '),
   %dont parse end comment (Yet)
   \+ atom_contains(E,'CasAm')),
  test_here(E)).

/*~
No source location!?
~*/

:- prolog_load_context(directory,X), cd(X),
   expand_file_name('Meta*Peacock.plt',Files),
   maplist(test_convo_file,Files).

% EDIT: https://github.com/logicmoo/logicmoo_workspace/edit/master/packs_sys/logicmoo_agi/t/agi_tests/comprehension/comprehension_01.pl
% JENKINS: https://jenkins.logicmoo.org/job/logicmoo_workspace/lastBuild/testReport/logicmoo.agi.agi_test.comprehension/COMPREHENSION_01/logicmoo_agi_agi_test_comprehension_COMPREHENSION_01/
% ISSUE_SEARCH: https://github.com/logicmoo/logicmoo_workspace/issues?q=is%3Aissue+label%3ACOMPREHENSION_01

% ISSUE: https://github.com/logicmoo/logicmoo_workspace/issues/645
/*~
%~ ?-( mpred_test("Test_0001_Line_0015__What_is_a_peacock_c63",baseKB:e2c('What is a peacock?'))).
?-e2c('What is a peacock?')
asserted( exists( Exists,
            ( info( 'XVAR_NP_What_1_1', [
                [ loc(1), pos('NP'),equals('XVAR_NP_What_1_1'),seg(1,1),
                  phrase('NP'),size(1),lnks(2),
                  #(r('NP',seg(1,1))),txt(["What"]),childs(0),
                  link(1,'SBAR',r('SBAR',seg(1,5))),
                  link(2,'CORENLP',r('CORENLP',seg(1,5)))])]  &
              info( 'XVAR_NP_Peacock_3_4', [
                [ loc(3), pos('NP'),equals('XVAR_NP_Peacock_3_4'),seg(3,4),
                  phrase('NP'),size(2),lnks(3),
                  #(r('NP',seg(3,4))),txt(["a","peacock"]),
                  childs(0),link(1,'S',r('S',seg(2,4))),
                  link(2,'SBAR',r('SBAR',seg(1,5))),
                  link(3,'CORENLP',r('CORENLP',seg(1,5)))])] &
              warn( unparsed( Exists, [
                      [ w( 'XVAR_NP_What_1_1', [
                          [ loc(1), pos('NP'),equals('XVAR_NP_What_1_1'),seg(1,1),
                            phrase('NP'),size(1),lnks(2),
                            #(r('NP',seg(1,1))),txt(["What"]),childs(0),
                            link(1,'SBAR',r('SBAR',seg(1,5))),
                            link(2,'CORENLP',r('CORENLP',seg(1,5)))])],
                        w( is, [
                          [ pos(vbz), root(be),loc(2),lnks(3),txt("is"),
                            truecase('LOWER'),link(1,'S',r('S',seg(2,4))),
                            link(2,'SBAR',r('SBAR',seg(1,5))), link(3,'CORENLP',r('CORENLP',seg(1,5))),lex_winfo,
                            flexicon(bv,[person=3,agr=sg,verb_form=tensed],is),
                            talk_db(intransitive,be,is,was,being,been),
                            talk_db(intransitive,am,is,was,being,been),
                            talk_db(intransitive,are,is,was,being,been)])],
                        w( 'XVAR_NP_Peacock_3_4', [
                          [ loc(3), pos('NP'),equals('XVAR_NP_Peacock_3_4'),seg(3,4),
                            phrase('NP'),size(2),lnks(3),
                            #(r('NP',seg(3,4))),txt(["a","peacock"]),
                            childs(0),link(1,'S',r('S',seg(2,4))),
                            link(2,'SBAR',r('SBAR',seg(1,5))),
                            link(3,'CORENLP',r('CORENLP',seg(1,5)))])],
                        w( ?, [
                          [ pos('.'), root(?),loc(5),lnks(2),txt("?"),
                            link(1,'SBAR',r('SBAR',seg(1,5))), link(2,'CORENLP',r('CORENLP',seg(1,5))),lex_winfo,
                            terminator_lex(?,?),char_type_sentence(?,ask)])],
                        span( [ seg(2,4), phrase('S'),size(3),lnks(2),#(r('S',seg(2,4))),
                                txt(["is","a","peacock"]),childs(1),
                                child(1,'NP',r('NP',seg(3,4))),
                                link(1,'SBAR',r('SBAR',seg(1,5))),
                                link(2,'CORENLP',r('CORENLP',seg(1,5)))]),
                        span( [ seg(1,5), phrase('CORENLP'),size(5),lnks(0),
                                #( r('CORENLP',seg(1,5))),
                                txt( [ "What", "is","a","peacock","?"]), childs(1),child(1,'SBAR',r('SBAR',seg(1,5)))]),
                        span( [ seg(1,5), phrase('SBAR'),size(5),lnks(1),
                                #( r('SBAR',seg(1,5))),
                                txt( [ "What", "is","a","peacock","?"]), childs(2),child(1,'NP',r('NP',seg(1,1))),
                                child(2,'S',r('S',seg(2,4))),
                                link(1,'CORENLP',r('CORENLP',seg(1,5)))])])]))))
passed=info(why_was_true(baseKB:e2c('What is a peacock?')))
no_proof_for(e2c('What is a peacock?')).

?-e2c('What is a peacock?')
asserted( exists( Exists,
            ( info( 'XVAR_NP_What_1_1', [
                [ loc(1), pos('NP'),equals('XVAR_NP_What_1_1'),seg(1,1),
                  phrase('NP'),size(1),lnks(2),
                  #(r('NP',seg(1,1))),txt(["What"]),childs(0),
                  link(1,'SBAR',r('SBAR',seg(1,5))),
                  link(2,'CORENLP',r('CORENLP',seg(1,5)))])]  &
              info( 'XVAR_NP_Peacock_3_4', [
                [ loc(3), pos('NP'),equals('XVAR_NP_Peacock_3_4'),seg(3,4),
                  phrase('NP'),size(2),lnks(3),
                  #(r('NP',seg(3,4))),txt(["a","peacock"]),
                  childs(0),link(1,'S',r('S',seg(2,4))),
                  link(2,'SBAR',r('SBAR',seg(1,5))),
                  link(3,'CORENLP',r('CORENLP',seg(1,5)))])] &
              warn( unparsed( Exists, [
                      [ w( 'XVAR_NP_What_1_1', [
                          [ loc(1), pos('NP'),equals('XVAR_NP_What_1_1'),seg(1,1),
                            phrase('NP'),size(1),lnks(2),
                            #(r('NP',seg(1,1))),txt(["What"]),childs(0),
                            link(1,'SBAR',r('SBAR',seg(1,5))),
                            link(2,'CORENLP',r('CORENLP',seg(1,5)))])],
                        w( is, [
                          [ pos(vbz), root(be),loc(2),lnks(3),txt("is"),
                            truecase('LOWER'),link(1,'S',r('S',seg(2,4))),
                            link(2,'SBAR',r('SBAR',seg(1,5))), link(3,'CORENLP',r('CORENLP',seg(1,5))),lex_winfo,
                            flexicon(bv,[person=3,agr=sg,verb_form=tensed],is),
                            talk_db(intransitive,be,is,was,being,been),
                            talk_db(intransitive,am,is,was,being,been),
                            talk_db(intransitive,are,is,was,being,been)])],
                        w( 'XVAR_NP_Peacock_3_4', [
                          [ loc(3), pos('NP'),equals('XVAR_NP_Peacock_3_4'),seg(3,4),
                            phrase('NP'),size(2),lnks(3),
                            #(r('NP',seg(3,4))),txt(["a","peacock"]),
                            childs(0),link(1,'S',r('S',seg(2,4))),
                            link(2,'SBAR',r('SBAR',seg(1,5))),
                            link(3,'CORENLP',r('CORENLP',seg(1,5)))])],
                        w( ?, [
                          [ pos('.'), root(?),loc(5),lnks(2),txt("?"),
                            link(1,'SBAR',r('SBAR',seg(1,5))), link(2,'CORENLP',r('CORENLP',seg(1,5))),lex_winfo,
                            terminator_lex(?,?),char_type_sentence(?,ask)])],
                        span( [ seg(2,4), phrase('S'),size(3),lnks(2),#(r('S',seg(2,4))),
                                txt(["is","a","peacock"]),childs(1),
                                child(1,'NP',r('NP',seg(3,4))),
                                link(1,'SBAR',r('SBAR',seg(1,5))),
                                link(2,'CORENLP',r('CORENLP',seg(1,5)))]),
                        span( [ seg(1,5), phrase('CORENLP'),size(5),lnks(0),
                                #( r('CORENLP',seg(1,5))),
                                txt( [ "What", "is","a","peacock","?"]), childs(1),child(1,'SBAR',r('SBAR',seg(1,5)))]),
                        span( [ seg(1,5), phrase('SBAR'),size(5),lnks(1),
                                #( r('SBAR',seg(1,5))),
                                txt( [ "What", "is","a","peacock","?"]), childs(2),child(1,'NP',r('NP',seg(1,1))),
                                child(2,'S',r('S',seg(2,4))),
                                link(1,'CORENLP',r('CORENLP',seg(1,5)))])])]))))
no_proof_for(e2c('What is a peacock?')).

no_proof_for(e2c('What is a peacock?')).

name='logicmoo.agi.agi_test.comprehension.COMPREHENSION_01-Test_0001_Line_0015__What_is_a_peacock_c63'.
JUNIT_CLASSNAME='logicmoo.agi.agi_test.comprehension.COMPREHENSION_01'.
JUNIT_CMD='timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'comprehension_01.pl\']"'.
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace/test_results/jenkins/Report-logicmoo-agi-agi_test-comprehension-vSTARv_01vSTARvvDOTvpl-Units-Logicmoo_agi_agi_test_comprehension_COMPREHENSION_01_Test_0001_Line_0015_What_is_a_peacock_c63-junit.xml
%~ ?-( mpred_test("Test_0002_Line_0015__What_is_a_peacock_c63",baseKB:e2c('What is a peacock?'))).
?-e2c('What is a peacock?')
asserted( exists( Exists,
            ( info( 'XVAR_NP_What_1_1', [
                [ loc(1), pos('NP'),equals('XVAR_NP_What_1_1'),seg(1,1),
                  phrase('NP'),size(1),lnks(2),
                  #(r('NP',seg(1,1))),txt(["What"]),childs(0),
                  link(1,'SBAR',r('SBAR',seg(1,5))),
                  link(2,'CORENLP',r('CORENLP',seg(1,5)))])]  &
              info( 'XVAR_NP_Peacock_3_4', [
                [ loc(3), pos('NP'),equals('XVAR_NP_Peacock_3_4'),seg(3,4),
                  phrase('NP'),size(2),lnks(3),
                  #(r('NP',seg(3,4))),txt(["a","peacock"]),
                  childs(0),link(1,'S',r('S',seg(2,4))),
                  link(2,'SBAR',r('SBAR',seg(1,5))),
                  link(3,'CORENLP',r('CORENLP',seg(1,5)))])] &
              warn( unparsed( Exists, [
                      [ w( 'XVAR_NP_What_1_1', [
                          [ loc(1), pos('NP'),equals('XVAR_NP_What_1_1'),seg(1,1),
                            phrase('NP'),size(1),lnks(2),
                            #(r('NP',seg(1,1))),txt(["What"]),childs(0),
                            link(1,'SBAR',r('SBAR',seg(1,5))),
                            link(2,'CORENLP',r('CORENLP',seg(1,5)))])],
                        w( is, [
                          [ pos(vbz), root(be),loc(2),lnks(3),txt("is"),
                            truecase('LOWER'),link(1,'S',r('S',seg(2,4))),
                            link(2,'SBAR',r('SBAR',seg(1,5))), link(3,'CORENLP',r('CORENLP',seg(1,5))),lex_winfo,
                            flexicon(bv,[person=3,agr=sg,verb_form=tensed],is),
                            talk_db(intransitive,be,is,was,being,been),
                            talk_db(intransitive,am,is,was,being,been),
                            talk_db(intransitive,are,is,was,being,been)])],
                        w( 'XVAR_NP_Peacock_3_4', [
                          [ loc(3), pos('NP'),equals('XVAR_NP_Peacock_3_4'),seg(3,4),
                            phrase('NP'),size(2),lnks(3),
                            #(r('NP',seg(3,4))),txt(["a","peacock"]),
                            childs(0),link(1,'S',r('S',seg(2,4))),
                            link(2,'SBAR',r('SBAR',seg(1,5))),
                            link(3,'CORENLP',r('CORENLP',seg(1,5)))])],
                        w( ?, [
                          [ pos('.'), root(?),loc(5),lnks(2),txt("?"),
                            link(1,'SBAR',r('SBAR',seg(1,5))), link(2,'CORENLP',r('CORENLP',seg(1,5))),lex_winfo,
                            terminator_lex(?,?),char_type_sentence(?,ask)])],
                        span( [ seg(2,4), phrase('S'),size(3),lnks(2),#(r('S',seg(2,4))),
                                txt(["is","a","peacock"]),childs(1),
                                child(1,'NP',r('NP',seg(3,4))),
                                link(1,'SBAR',r('SBAR',seg(1,5))),
                                link(2,'CORENLP',r('CORENLP',seg(1,5)))]),
                        span( [ seg(1,5), phrase('CORENLP'),size(5),lnks(0),
                                #( r('CORENLP',seg(1,5))),
                                txt( [ "What", "is","a","peacock","?"]), childs(1),child(1,'SBAR',r('SBAR',seg(1,5)))]),
                        span( [ seg(1,5), phrase('SBAR'),size(5),lnks(1),
                                #( r('SBAR',seg(1,5))),
                                txt( [ "What", "is","a","peacock","?"]), childs(2),child(1,'NP',r('NP',seg(1,1))),
                                child(2,'S',r('S',seg(2,4))),
                                link(1,'CORENLP',r('CORENLP',seg(1,5)))])])]))))
passed=info(why_was_true(baseKB:e2c('What is a peacock?')))
no_proof_for(e2c('What is a peacock?')).

?-e2c('What is a peacock?')
asserted( exists( Exists,
            ( info( 'XVAR_NP_What_1_1', [
                [ loc(1), pos('NP'),equals('XVAR_NP_What_1_1'),seg(1,1),
                  phrase('NP'),size(1),lnks(2),
                  #(r('NP',seg(1,1))),txt(["What"]),childs(0),
                  link(1,'SBAR',r('SBAR',seg(1,5))),
                  link(2,'CORENLP',r('CORENLP',seg(1,5)))])]  &
              info( 'XVAR_NP_Peacock_3_4', [
                [ loc(3), pos('NP'),equals('XVAR_NP_Peacock_3_4'),seg(3,4),
                  phrase('NP'),size(2),lnks(3),
                  #(r('NP',seg(3,4))),txt(["a","peacock"]),
                  childs(0),link(1,'S',r('S',seg(2,4))),
                  link(2,'SBAR',r('SBAR',seg(1,5))),
                  link(3,'CORENLP',r('CORENLP',seg(1,5)))])] &
              warn( unparsed( Exists, [
                      [ w( 'XVAR_NP_What_1_1', [
                          [ loc(1), pos('NP'),equals('XVAR_NP_What_1_1'),seg(1,1),
                            phrase('NP'),size(1),lnks(2),
                            #(r('NP',seg(1,1))),txt(["What"]),childs(0),
                            link(1,'SBAR',r('SBAR',seg(1,5))),
                            link(2,'CORENLP',r('CORENLP',seg(1,5)))])],
                        w( is, [
                          [ pos(vbz), root(be),loc(2),lnks(3),txt("is"),
                            truecase('LOWER'),link(1,'S',r('S',seg(2,4))),
                            link(2,'SBAR',r('SBAR',seg(1,5))), link(3,'CORENLP',r('CORENLP',seg(1,5))),lex_winfo,
                            flexicon(bv,[person=3,agr=sg,verb_form=tensed],is),
                            talk_db(intransitive,be,is,was,being,been),
                            talk_db(intransitive,am,is,was,being,been),
                            talk_db(intransitive,are,is,was,being,been)])],
                        w( 'XVAR_NP_Peacock_3_4', [
                          [ loc(3), pos('NP'),equals('XVAR_NP_Peacock_3_4'),seg(3,4),
                            phrase('NP'),size(2),lnks(3),
                            #(r('NP',seg(3,4))),txt(["a","peacock"]),
                            childs(0),link(1,'S',r('S',seg(2,4))),
                            link(2,'SBAR',r('SBAR',seg(1,5))),
                            link(3,'CORENLP',r('CORENLP',seg(1,5)))])],
                        w( ?, [
                          [ pos('.'), root(?),loc(5),lnks(2),txt("?"),
                            link(1,'SBAR',r('SBAR',seg(1,5))), link(2,'CORENLP',r('CORENLP',seg(1,5))),lex_winfo,
                            terminator_lex(?,?),char_type_sentence(?,ask)])],
                        span( [ seg(2,4), phrase('S'),size(3),lnks(2),#(r('S',seg(2,4
goal=baseKB:e2c('What is a peacock?').
src='Metaphor_StandardOnly_Peacock.plt':15.
url=Metaphor_StandardOnly_Peacock.plt#L15
time=1.9035918712615967.
passed=passed=info(why_was_true(baseKB:e2c('What is a peacock?')))
no_proof_for(e2c('What is a peacock?')).

?-e2c('What is a peacock?')
asserted( exists( Exists,
            ( info( 'XVAR_NP_What_1_1', [
                [ loc(1), pos('NP'),equals('XVAR_NP_What_1_1'),seg(1,1),
                  phrase('NP'),size(1),lnks(2),
                  #(r('NP',seg(1,1))),txt(["What"]),childs(0),
                  link(1,'SBAR',r('SBAR',seg(1,5))),
                  link(2,'CORENLP',r('CORENLP',seg(1,5)))])]  &
              info( 'XVAR_NP_Peacock_3_4', [
                [ loc(3), pos('NP'),equals('XVAR_NP_Peacock_3_4'),seg(3,4),
                  phrase('NP'),size(2),lnks(3),
                  #(r('NP',seg(3,4))),txt(["a","peacock"]),
                  childs(0),link(1,'S',r('S',seg(2,4))),
                  link(2,'SBAR',r('SBAR',seg(1,5))),
                  link(3,'CORENLP',r('CORENLP',seg(1,5)))])] &
              warn( unparsed( Exists, [
                      [ w( 'XVAR_NP_What_1_1', [
                          [ loc(1), pos('NP'),equals('XVAR_NP_What_1_1'),seg(1,1),
                            phrase('NP'),size(1),lnks(2),
                            #(r('NP',seg(1,1))),txt(["What"]),childs(0),
                            link(1,'SBAR',r('SBAR',seg(1,5))),
                            link(2,'CORENLP',r('CORENLP',seg(1,5)))])],
                        w( is, [
                          [ pos(vbz), root(be),loc(2),lnks(3),txt("is"),
                            truecase('LOWER'),link(1,'S',r('S',seg(2,4))),
                            link(2,'SBAR',r('SBAR',seg(1,5))), link(3,'CORENLP',r('CORENLP',seg(1,5))),lex_winfo,
                            flexicon(bv,[person=3,agr=sg,verb_form=tensed],is),
                            talk_db(intransitive,be,is,was,being,been),
                            talk_db(intransitive,am,is,was,being,been),
                            talk_db(intransitive,are,is,was,being,been)])],
                        w( 'XVAR_NP_Peacock_3_4', [
                          [ loc(3), pos('NP'),equals('XVAR_NP_Peacock_3_4'),seg(3,4),
                            phrase('NP'),size(2),lnks(3),
                            #(r('NP',seg(3,4))),txt(["a","peacock"]),
                            childs(0),link(1,'S',r('S',seg(2,4))),
                            link(2,'SBAR',r('SBAR',seg(1,5))),
                            link(3,'CORENLP',r('CORENLP',seg(1,5)))])],
                        w( ?, [
                          [ pos('.'), root(?),loc(5),lnks(2),txt("?"),
                            link(1,'SBAR',r('SBAR',seg(1,5))), link(2,'CORENLP',r('CORENLP',seg(1,5))),lex_winfo,
                            terminator_lex(?,?),char_type_sentence(?,ask)])],
                        span( [ seg(2,4), phrase('S'),size(3),lnks(2),#(r('S',seg(2,4))),
                                txt(["is","a","peacock"]),childs(1),
                                child(1,'NP',r('NP',seg(3,4))),
                                link(1,'SBAR',r('SBAR',seg(1,5))),
                                link(2,'CORENLP',r('CORENLP',seg(1,5)))]),
                        span( [ seg(1,5), phrase('CORENLP'),size(5),lnks(0),
                                #( r('CORENLP',seg(1,5))),
                                txt( [ "What", "is","a","peacock","?"]), childs(1),child(1,'SBAR',r('SBAR',seg(1,5)))]),
                        span( [ seg(1,5), phrase('SBAR'),size(5),lnks(1),
                                #( r('SBAR',seg(1,5))),
                                txt( [ "What", "is","a","peacock","?"]), childs(2),child(1,'NP',r('NP',seg(1,1))),
                                child(2,'S',r('S',seg(2,4))),
                                link(1,'CORENLP',r('CORENLP',seg(1,5)))])])]))))
no_proof_for(e2c('What is a peacock?')).

no_proof_for(e2c('What is a peacock?')).

result=passed.

Test Suite: logicmoo.base.fol.quick_test.FIVE_LEFTOF_TYPE_01

Package: logicmoo.base.fol.quick_test

Results

Duration0.0 sec
Tests1
Failures0

Tests

logicmoo.base.fol.quick_test.FIVE_LEFTOF_TYPE_01

Test case:logicmoo.base.fol.quick_test.FIVE_LEFTOF_TYPE_01@Test_0001_Line_0000__True: baseKB:true
Outcome:Passed
Duration:0.0 sec
FailedNone
None
Stderr
name=Test_0001_Line_0000__True
JUNIT_CLASSNAME='logicmoo.base.fol.quick_test.FIVE_LEFTOF_TYPE_01'.
JUNIT_CMD='timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'five_leftof_type_01.pl\']"'.
 (cd /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_base/t/examples/fol/quick_test ; timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "['five_leftof_type_01.pl']")

```
goal=baseKB:true.
time=0.00011372566223144531.
passed=passed=info(why_was_true(baseKB:true))
no_proof_for(true).

no_proof_for(true).

no_proof_for(true).

result=passed.

Test Suite: logicmoo.base.fol.quick_test.FIVE_LEFTOF_TYPE_01

Package: logicmoo.base.fol.quick_test

Results

Duration3.1 sec
Tests1
Failures0

Tests

logicmoo.base.fol.quick_test.FIVE_LEFTOF_TYPE_01

Test case:logicmoo.base.fol.quick_test.FIVE_LEFTOF_TYPE_01@Test_0002_Line_0000__Kif_compile: baseKB:kif_compile
Outcome:Passed
Duration:0.3 sec
FailedNone
None
Stderr
name=Test_0002_Line_0000__Kif_compile
JUNIT_CLASSNAME='logicmoo.base.fol.quick_test.FIVE_LEFTOF_TYPE_01'.
JUNIT_CMD='timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'five_leftof_type_01.pl\']"'.
 (cd /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_base/t/examples/fol/quick_test ; timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "['five_leftof_type_01.pl']")

```
%~ init_phase(after_load)
%~ init_phase(restore_state)
%
%~ init_why(after_boot,program)
%~ after_boot.
%~ Dont forget to ?- logicmoo_i_cyc_xform.
running('/var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_base/t/examples/fol/quick_test/five_leftof_type_01.pl'),
%~ /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_utils/prolog/logicmoo_test_header.pl:91
%~ this_test_might_need( :-( expects_dialect(pfc)))
%~ this_test_might_need( :-( use_module( library(logicmoo_plarkc))))

% =============================================
% File 'mpred_builtin.pfc'
% Purpose: Agent Reactivity for SWI-Prolog
% Maintainer: Douglas Miles
% Contact: $Author: dmiles $@users.sourceforge.net %
% Version: 'interface' 1.0.0
% Revision: $Revision: 1.9 $
% Revised At: $Date: 2002/06/27 14:13:20 $
% =============================================
%

:- mpred_test(true).

% There are five houses in a row.
/*~
%~ ?-( mpred_test("Test_0001_Line_0000__True",baseKB:true)).
passed=info(why_was_true(baseKB:true))
no_proof_for(true).

no_proof_for(true).

no_proof_for(true).

name='logicmoo.base.fol.quick_test.FIVE_LEFTOF_TYPE_01-Test_0001_Line_0000__True'.
JUNIT_CLASSNAME='logicmoo.base.fol.quick_test.FIVE_LEFTOF_TYPE_01'.
JUNIT_CMD='timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'five_leftof_type_01.pl\']"'.
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace/test_results/jenkins/Report-logicmoo-base-fol-quick_test-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_fol_quick_test_FIVE_LEFTOF_TYPE_01_Test_0001_Line_0000_True-junit.xml
~*/

% There are five houses in a row.
:- nop(module( baseKB)).

% makes the KB monotonic
/*~
~*/

% makes the KB monotonic
:- set_kif_option(qualify_modality,simple_nesc).

/*~
~*/

leftof(h1, h2).
/*~
%~ debugm(baseKB,show_success(baseKB,baseKB:ain(clif(leftof(h1,h2)))))
%   xgrun compiled into parser_chat80 0.00 sec, 0 clauses
%   xgproc compiled into parser_chat80 0.02 sec, 0 clauses

** Grammar from file /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_nlu/ext/chat80/original/clone.xg: 1616 words .. **


** Grammar from file /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_nlu/ext/chat80/original/lex.xg: 372 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.25 sec, 3 clauses
% /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_utils/prolog/debuggery/dmsg compiled into dmsg 0.12 sec, -16 clauses



=======================================================
leftof(h1,h2)
============================================

?- kif_to_boxlog( leftof(h1,h2) ).


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h1 leftof h2
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(leftof(h1,h2))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(leftof(h1,h2)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  it is necessarily true that h1 leftof h2
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc( leftof(h1,h2)).

============================================
~*/

leftof(h2, h3).
/*~
%~ debugm(baseKB,show_success(baseKB,baseKB:ain(clif(leftof(h2,h3)))))



=======================================================
leftof(h2,h3)
============================================

?- kif_to_boxlog( leftof(h2,h3) ).


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h2 leftof h3
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(leftof(h2,h3))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(leftof(h2,h3)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  it is necessarily true that h2 leftof h3
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc( leftof(h2,h3)).

============================================
~*/

leftof(h3, h4).
/*~
%~ debugm(baseKB,show_success(baseKB,baseKB:ain(clif(leftof(h3,h4)))))



=======================================================
leftof(h3,h4)
============================================

?- kif_to_boxlog( leftof(h3,h4) ).


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h3 leftof h4
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(leftof(h3,h4))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(leftof(h3,h4)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  it is necessarily true that h3 leftof h4
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc( leftof(h3,h4)).

============================================
~*/

leftof(h4, h5).

% this should cause h1-h5 to become houses
/*~
%~ debugm(baseKB,show_success(baseKB,baseKB:ain(clif(leftof(h4,h5)))))



=======================================================
leftof(h4,h5)
============================================

?- kif_to_boxlog( leftof(h4,h5) ).


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h4 leftof h5
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(leftof(h4,h5))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(leftof(h4,h5)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  it is necessarily true that h4 leftof h5
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc( leftof(h4,h5)).

============================================
~*/

% this should cause h1-h5 to become houses
leftof(H1, H2) => house(H1) & house(H2).

/*~
%~ debugm( baseKB,
%~   show_success( baseKB,
%~     baseKB : ain( clif( leftof(H1,H2)=>(house(H1)&house(H2))))))



=======================================================
=>(leftof('$VAR'('House_Leftof'),'$VAR'('House_Leftof3')),&(house('$VAR'('House_Leftof')),house('$VAR'('House_Leftof3'))))
============================================

?- kif_to_boxlog( leftof(House_Leftof,House_Leftof3)=>(house(House_Leftof)&house(House_Leftof3)) ).


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  If:
%~    ?House_Leftof leftof ?House_Leftof3 then it is
%~  Implied that:
%~    " ?House_Leftof isa house "  and
%~    " ?House_Leftof3 isa house "
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = =>(leftof('$VAR'('House_Leftof'),'$VAR'('House_Leftof3')),and(house('$VAR'('House_Leftof')),house('$VAR'('House_Leftof3'))))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 6 entailment(s):
nesc(leftof(House_Leftof,House_Leftof3))&nesc(~house(House_Leftof))==>nesc(~house(House_Leftof3)).
nesc(leftof(House_Leftof,House_Leftof3))&nesc(~house(House_Leftof3))==>nesc(~house(House_Leftof)).
nesc(leftof(House_Leftof,House_Leftof3))&poss(house(House_Leftof))==>nesc(house(House_Leftof3)).
nesc(leftof(House_Leftof,House_Leftof3))&poss(house(House_Leftof3))==>nesc(house(House_Leftof)).
poss(house(House_Leftof))&nesc(~house(House_Leftof3))==>nesc(~leftof(House_Leftof,House_Leftof3)).
poss(house(House_Leftof3))&nesc(~house(House_Leftof))==>nesc(~leftof(House_Leftof,House_Leftof3)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?House_Leftof leftof ?House_Leftof3 " is necessarily true  and
%~    " ?House_Leftof isa house " is necessarily false
%~  It's Proof that:
%~    " ?House_Leftof3 isa house " is necessarily false
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( nesc(leftof(House_Leftof,House_Leftof3))&nesc(~house(House_Leftof)) ==>
  nesc( ~( house(House_Leftof3)))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?House_Leftof leftof ?House_Leftof3 " is necessarily true  and
%~    " ?House_Leftof3 isa house " is necessarily false
%~  It's Proof that:
%~    " ?House_Leftof isa house " is necessarily false
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( nesc(leftof(House_Leftof,House_Leftof3))&nesc(~house(House_Leftof3)) ==>
  nesc( ~( house(House_Leftof)))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?House_Leftof leftof ?House_Leftof3 " is necessarily true  and
%~    " ?House_Leftof isa house " is possible
%~  It's Proof that:
%~    " ?House_Leftof3 isa house " is necessarily true
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( nesc(leftof(House_Leftof,House_Leftof3))&poss(house(House_Leftof)) ==>
  nesc( house(House_Leftof3))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?House_Leftof leftof ?House_Leftof3 " is necessarily true  and
%~    " ?House_Leftof3 isa house " is possible
%~  It's Proof that:
%~    " ?House_Leftof isa house " is necessarily true
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( nesc(leftof(House_Leftof,House_Leftof3))&poss(house(House_Leftof3)) ==>
  nesc( house(House_Leftof))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?House_Leftof isa house " is possible  and
%~    " ?House_Leftof3 isa house " is necessarily false
%~  It's Proof that:
%~    " ?House_Leftof leftof ?House_Leftof3 " is necessarily false
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( poss(house(House_Leftof))&nesc(~house(House_Leftof3)) ==>
  nesc( ~( leftof(House_Leftof,House_Leftof3)))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?House_Leftof3 isa house " is possible  and
%~    " ?House_Leftof isa house " is necessarily false
%~  It's Proof that:
%~    " ?House_Leftof leftof ?House_Leftof3 " is necessarily false
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( poss(house(House_Leftof3))&nesc(~house(House_Leftof)) ==>
  nesc( ~( leftof(House_Leftof,House_Leftof3)))).

============================================
%~ kif_to_boxlog_attvars2 = =>(leftof('$VAR'('H1'),'$VAR'('H2')),and(house('$VAR'('H1')),house('$VAR'('H2'))))
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?H2 isa house " is possible  and
%~    " ?H1 isa house " is necessarily false
%~  It's Proof that:
%~    " ?H1 leftof ?H2 " is necessarily false
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

poss(house(H2))&nesc(~house(H1))==>nesc(~leftof(H1,H2)).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?H1 leftof ?H2 " is necessarily true  and
%~    " ?H1 isa house " is necessarily false
%~  It's Proof that:
%~    " ?H2 isa house " is necessarily false
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc(leftof(H1,H2))&nesc(~house(H1))==>nesc(~house(H2)).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?H1 leftof ?H2 " is necessarily true  and
%~    " ?H2 isa house " is possible
%~  It's Proof that:
%~    " ?H1 isa house " is necessarily true
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc(leftof(H1,H2))&poss(house(H2))==>nesc(house(H1)).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?H1 isa house " is possible  and
%~    " ?H2 isa house " is necessarily false
%~  It's Proof that:
%~    " ?H1 leftof ?H2 " is necessarily false
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

poss(house(H1))&nesc(~house(H2))==>nesc(~leftof(H1,H2)).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?H1 leftof ?H2 " is necessarily true  and
%~    " ?H2 isa house " is necessarily false
%~  It's Proof that:
%~    " ?H1 isa house " is necessarily false
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc(leftof(H1,H2))&nesc(~house(H2))==>nesc(~house(H1)).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?H1 leftof ?H2 " is necessarily true  and
%~    " ?H1 isa house " is possible
%~  It's Proof that:
%~    " ?H2 isa house " is necessarily true
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
goal=baseKB:kif_compile.
time=0.3076591491699219.
passed=passed=info(why_was_true(baseKB:kif_compile))
no_proof_for(kif_compile).

no_proof_for(kif_compile).

no_proof_for(kif_compile).

result=passed.

Test Suite: logicmoo.base.fol.quick_test.FIVE_LEFTOF_TYPE_01

Package: logicmoo.base.fol.quick_test

Results

Duration0.0 sec
Tests1
Failures0

Tests

logicmoo.base.fol.quick_test.FIVE_LEFTOF_TYPE_01

Test case:logicmoo.base.fol.quick_test.FIVE_LEFTOF_TYPE_01@Test_0003_Line_0000__Pfclog_compile: baseKB:pfclog_compile
Outcome:Passed
Duration:0.0 sec
FailedNone
None
Stderr
name=Test_0003_Line_0000__Pfclog_compile
JUNIT_CLASSNAME='logicmoo.base.fol.quick_test.FIVE_LEFTOF_TYPE_01'.
JUNIT_CMD='timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'five_leftof_type_01.pl\']"'.
 (cd /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_base/t/examples/fol/quick_test ; timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "['five_leftof_type_01.pl']")

```
%~ init_phase(after_load)
%~ init_phase(restore_state)
%
%~ init_why(after_boot,program)
%~ after_boot.
%~ Dont forget to ?- logicmoo_i_cyc_xform.
running('/var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/logicmoo_base/t/examples/fol/quick_test/five_leftof_type_01.pl'),
%~ /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_utils/prolog/logicmoo_test_header.pl:91
%~ this_test_might_need( :-( expects_dialect(pfc)))
%~ this_test_might_need( :-( use_module( library(logicmoo_plarkc))))

% =============================================
% File 'mpred_builtin.pfc'
% Purpose: Agent Reactivity for SWI-Prolog
% Maintainer: Douglas Miles
% Contact: $Author: dmiles $@users.sourceforge.net %
% Version: 'interface' 1.0.0
% Revision: $Revision: 1.9 $
% Revised At: $Date: 2002/06/27 14:13:20 $
% =============================================
%

:- mpred_test(true).

% There are five houses in a row.
/*~
%~ ?-( mpred_test("Test_0001_Line_0000__True",baseKB:true)).
passed=info(why_was_true(baseKB:true))
no_proof_for(true).

no_proof_for(true).

no_proof_for(true).

name='logicmoo.base.fol.quick_test.FIVE_LEFTOF_TYPE_01-Test_0001_Line_0000__True'.
JUNIT_CLASSNAME='logicmoo.base.fol.quick_test.FIVE_LEFTOF_TYPE_01'.
JUNIT_CMD='timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'five_leftof_type_01.pl\']"'.
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace/test_results/jenkins/Report-logicmoo-base-fol-quick_test-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_fol_quick_test_FIVE_LEFTOF_TYPE_01_Test_0001_Line_0000_True-junit.xml
~*/

% There are five houses in a row.
:- nop(module( baseKB)).

% makes the KB monotonic
/*~
~*/

% makes the KB monotonic
:- set_kif_option(qualify_modality,simple_nesc).

/*~
~*/

leftof(h1, h2).
/*~
%~ debugm(baseKB,show_success(baseKB,baseKB:ain(clif(leftof(h1,h2)))))
%   xgrun compiled into parser_chat80 0.00 sec, 0 clauses
%   xgproc compiled into parser_chat80 0.02 sec, 0 clauses

** Grammar from file /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_nlu/ext/chat80/original/clone.xg: 1616 words .. **


** Grammar from file /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_nlu/ext/chat80/original/lex.xg: 372 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.25 sec, 3 clauses
% /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_utils/prolog/debuggery/dmsg compiled into dmsg 0.12 sec, -16 clauses



=======================================================
leftof(h1,h2)
============================================

?- kif_to_boxlog( leftof(h1,h2) ).


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h1 leftof h2
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(leftof(h1,h2))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(leftof(h1,h2)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  it is necessarily true that h1 leftof h2
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc( leftof(h1,h2)).

============================================
~*/

leftof(h2, h3).
/*~
%~ debugm(baseKB,show_success(baseKB,baseKB:ain(clif(leftof(h2,h3)))))



=======================================================
leftof(h2,h3)
============================================

?- kif_to_boxlog( leftof(h2,h3) ).


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h2 leftof h3
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(leftof(h2,h3))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(leftof(h2,h3)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  it is necessarily true that h2 leftof h3
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc( leftof(h2,h3)).

============================================
~*/

leftof(h3, h4).
/*~
%~ debugm(baseKB,show_success(baseKB,baseKB:ain(clif(leftof(h3,h4)))))



=======================================================
leftof(h3,h4)
============================================

?- kif_to_boxlog( leftof(h3,h4) ).


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h3 leftof h4
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(leftof(h3,h4))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(leftof(h3,h4)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  it is necessarily true that h3 leftof h4
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc( leftof(h3,h4)).

============================================
~*/

leftof(h4, h5).

% this should cause h1-h5 to become houses
/*~
%~ debugm(baseKB,show_success(baseKB,baseKB:ain(clif(leftof(h4,h5)))))



=======================================================
leftof(h4,h5)
============================================

?- kif_to_boxlog( leftof(h4,h5) ).


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h4 leftof h5
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = necessary(leftof(h4,h5))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 1 entailment(s):
nesc(leftof(h4,h5)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  it is necessarily true that h4 leftof h5
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc( leftof(h4,h5)).

============================================
~*/

% this should cause h1-h5 to become houses
leftof(H1, H2) => house(H1) & house(H2).

/*~
%~ debugm( baseKB,
%~   show_success( baseKB,
%~     baseKB : ain( clif( leftof(H1,H2)=>(house(H1)&house(H2))))))



=======================================================
=>(leftof('$VAR'('House_Leftof'),'$VAR'('House_Leftof3')),&(house('$VAR'('House_Leftof')),house('$VAR'('House_Leftof3'))))
============================================

?- kif_to_boxlog( leftof(House_Leftof,House_Leftof3)=>(house(House_Leftof)&house(House_Leftof3)) ).


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  If:
%~    ?House_Leftof leftof ?House_Leftof3 then it is
%~  Implied that:
%~    " ?House_Leftof isa house "  and
%~    " ?House_Leftof3 isa house "
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kif_to_boxlog_attvars2 = =>(leftof('$VAR'('House_Leftof'),'$VAR'('House_Leftof3')),and(house('$VAR'('House_Leftof')),house('$VAR'('House_Leftof3'))))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results in the following 6 entailment(s):
nesc(leftof(House_Leftof,House_Leftof3))&nesc(~house(House_Leftof))==>nesc(~house(House_Leftof3)).
nesc(leftof(House_Leftof,House_Leftof3))&nesc(~house(House_Leftof3))==>nesc(~house(House_Leftof)).
nesc(leftof(House_Leftof,House_Leftof3))&poss(house(House_Leftof))==>nesc(house(House_Leftof3)).
nesc(leftof(House_Leftof,House_Leftof3))&poss(house(House_Leftof3))==>nesc(house(House_Leftof)).
poss(house(House_Leftof))&nesc(~house(House_Leftof3))==>nesc(~leftof(House_Leftof,House_Leftof3)).
poss(house(House_Leftof3))&nesc(~house(House_Leftof))==>nesc(~leftof(House_Leftof,House_Leftof3)).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?House_Leftof leftof ?House_Leftof3 " is necessarily true  and
%~    " ?House_Leftof isa house " is necessarily false
%~  It's Proof that:
%~    " ?House_Leftof3 isa house " is necessarily false
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( nesc(leftof(House_Leftof,House_Leftof3))&nesc(~house(House_Leftof)) ==>
  nesc( ~( house(House_Leftof3)))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?House_Leftof leftof ?House_Leftof3 " is necessarily true  and
%~    " ?House_Leftof3 isa house " is necessarily false
%~  It's Proof that:
%~    " ?House_Leftof isa house " is necessarily false
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( nesc(leftof(House_Leftof,House_Leftof3))&nesc(~house(House_Leftof3)) ==>
  nesc( ~( house(House_Leftof)))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?House_Leftof leftof ?House_Leftof3 " is necessarily true  and
%~    " ?House_Leftof isa house " is possible
%~  It's Proof that:
%~    " ?House_Leftof3 isa house " is necessarily true
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( nesc(leftof(House_Leftof,House_Leftof3))&poss(house(House_Leftof)) ==>
  nesc( house(House_Leftof3))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?House_Leftof leftof ?House_Leftof3 " is necessarily true  and
%~    " ?House_Leftof3 isa house " is possible
%~  It's Proof that:
%~    " ?House_Leftof isa house " is necessarily true
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( nesc(leftof(House_Leftof,House_Leftof3))&poss(house(House_Leftof3)) ==>
  nesc( house(House_Leftof))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?House_Leftof isa house " is possible  and
%~    " ?House_Leftof3 isa house " is necessarily false
%~  It's Proof that:
%~    " ?House_Leftof leftof ?House_Leftof3 " is necessarily false
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( poss(house(House_Leftof))&nesc(~house(House_Leftof3)) ==>
  nesc( ~( leftof(House_Leftof,House_Leftof3)))).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?House_Leftof3 isa house " is possible  and
%~    " ?House_Leftof isa house " is necessarily false
%~  It's Proof that:
%~    " ?House_Leftof leftof ?House_Leftof3 " is necessarily false
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

( poss(house(House_Leftof3))&nesc(~house(House_Leftof)) ==>
  nesc( ~( leftof(House_Leftof,House_Leftof3)))).

============================================
%~ kif_to_boxlog_attvars2 = =>(leftof('$VAR'('H1'),'$VAR'('H2')),and(house('$VAR'('H1')),house('$VAR'('H2'))))
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?H2 isa house " is possible  and
%~    " ?H1 isa house " is necessarily false
%~  It's Proof that:
%~    " ?H1 leftof ?H2 " is necessarily false
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

poss(house(H2))&nesc(~house(H1))==>nesc(~leftof(H1,H2)).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?H1 leftof ?H2 " is necessarily true  and
%~    " ?H1 isa house " is necessarily false
%~  It's Proof that:
%~    " ?H2 isa house " is necessarily false
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc(leftof(H1,H2))&nesc(~house(H1))==>nesc(~house(H2)).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?H1 leftof ?H2 " is necessarily true  and
%~    " ?H2 isa house " is possible
%~  It's Proof that:
%~    " ?H1 isa house " is necessarily true
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc(leftof(H1,H2))&poss(house(H2))==>nesc(house(H1)).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?H1 isa house " is possible  and
%~    " ?H2 isa house " is necessarily false
%~  It's Proof that:
%~    " ?H1 leftof ?H2 " is necessarily false
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

poss(house(H1))&nesc(~house(H2))==>nesc(~leftof(H1,H2)).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?H1 leftof ?H2 " is necessarily true  and
%~    " ?H2 isa house " is necessarily false
%~  It's Proof that:
%~    " ?H1 isa house " is necessarily false
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nesc(leftof(H1,H2))&nesc(~house(H2))==>nesc(~house(H1)).

%  AND
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    " ?H1 leftof ?H2 " is necessarily true  and
%~    " ?H1 isa house " is possible
%~  It's Proof that:
%~    " ?H2 isa house " is necessarily true
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
goal=baseKB:pfclog_compile.
time=0.014423131942749023.
passed=passed=info(why_was_true(baseKB:pfclog_compile))
no_proof_for(pfclog_compile).

no_proof_for(pfclog_compile).

no_proof_for(pfclog_compile).

result=passed.

Test Suite: logicmoo.pfc.sanity_base.quick_test.ATTVAR_03

Package: logicmoo.pfc.sanity_base.quick_test

Results

Duration0.0 sec
Tests1
Failures1

Tests

logicmoo.pfc.sanity_base.quick_test.ATTVAR_03

Test case:logicmoo.pfc.sanity_base.quick_test.ATTVAR_03@Test_0001_Line_0000__sk_in_1_in_user: user:(sk_in(In_Sk),get_attr(In_Sk,sk,Attr_SKF_666),Attr_SKF_666='SKF-666')
Outcome:Failed
Duration:0.0 sec
Failedfailure = "failure=info((why_was_true(user:(\\+ (sk_in(_28160),get_attr(_28160,sk,_28182),_28182='SKF-666'))),nop(ftrace(user:(sk_in(_28160),get_attr(_28160,sk,_28182),_28182='SKF-666')))))\nno_proof_for(\\+ (sk_in(In_Sk),get_attr(In_Sk,sk,Attr_SKF_666),Attr_SKF_666='SKF-666')).\n\nno_proof_for(\\+ (sk_in(In_Sk),get_attr(In_Sk,sk,Attr_SKF_666),Attr_SKF_666='SKF-666')).\n\nno_proof_for(\\+ (sk_in(In_Sk),get_attr(In_Sk,sk,Attr_SKF_666),Attr_SKF_666='SKF-666')).\n\n". failure = [].
failed
Stderr
name=Test_0001_Line_0000__sk_in_1_in_user
JUNIT_CLASSNAME='logicmoo.pfc.sanity_base.quick_test.ATTVAR_03'.
JUNIT_CMD='timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'attvar_03.pfc\']"'.
 (cd /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/pfc/t/sanity_base/quick_test ; timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "['attvar_03.pfc']")

```
goal=user:(sk_in(_62338),get_attr(_62338,sk,_62352),_62352='SKF-666').
time=0.0005528926849365234.
failure=failure=info((why_was_true(user:(\+ (sk_in(_28160),get_attr(_28160,sk,_28182),_28182='SKF-666'))),nop(ftrace(user:(sk_in(_28160),get_attr(_28160,sk,_28182),_28182='SKF-666')))))
no_proof_for(\+ (sk_in(In_Sk),get_attr(In_Sk,sk,Attr_SKF_666),Attr_SKF_666='SKF-666')).

no_proof_for(\+ (sk_in(In_Sk),get_attr(In_Sk,sk,Attr_SKF_666),Attr_SKF_666='SKF-666')).

no_proof_for(\+ (sk_in(In_Sk),get_attr(In_Sk,sk,Attr_SKF_666),Attr_SKF_666='SKF-666')).

result=failure.

Test Suite: logicmoo.pfc.sanity_base.quick_test.BC_01

Package: logicmoo.pfc.sanity_base.quick_test

Results

Duration0.0 sec
Tests1
Failures0

Tests

logicmoo.pfc.sanity_base.quick_test.BC_01

Test case:logicmoo.pfc.sanity_base.quick_test.BC_01@Test_0001_Line_0000__B: baseKB:call_u(bc_p(b))
Outcome:Passed
Duration:0.0 sec
FailedNone
None
Stderr
name=Test_0001_Line_0000__B
JUNIT_CLASSNAME='logicmoo.pfc.sanity_base.quick_test.BC_01'.
JUNIT_CMD='timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'bc_01.pfc\']"'.
 (cd /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/pfc/t/sanity_base/quick_test ; timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "['bc_01.pfc']")

```
goal=baseKB:call_u(bc_p(b)).
time=0.00015664100646972656.
passed=passed=info(why_was_true(baseKB:call_u(bc_p(b))))
no_proof_for(call_u(bc_p(b))).

no_proof_for(call_u(bc_p(b))).

no_proof_for(call_u(bc_p(b))).

result=passed.

Test Suite: logicmoo.pfc.sanity_base.quick_test.BC_01

Package: logicmoo.pfc.sanity_base.quick_test

Results

Duration0.0 sec
Tests1
Failures0

Tests

logicmoo.pfc.sanity_base.quick_test.BC_01

Test case:logicmoo.pfc.sanity_base.quick_test.BC_01@Test_0002_Line_0000__naf_bc_q_1: baseKB:(\\+clause_u(bc_q(Q1),true))
Outcome:Passed
Duration:0.0 sec
FailedNone
None
Stderr
name=Test_0002_Line_0000__naf_bc_q_1
JUNIT_CLASSNAME='logicmoo.pfc.sanity_base.quick_test.BC_01'.
JUNIT_CMD='timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'bc_01.pfc\']"'.
 (cd /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/pfc/t/sanity_base/quick_test ; timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "['bc_01.pfc']")

```
goal=baseKB:(\+clause_u(bc_q(_25108),true)).
time=0.00012183189392089844.
passed=passed=info(why_was_true(baseKB:(\+clause_u(bc_q(_2540),true))))
no_proof_for(\+clause_u(bc_q(Q1),true)).

no_proof_for(\+clause_u(bc_q(Q1),true)).

no_proof_for(\+clause_u(bc_q(Q1),true)).

result=passed.

Test Suite: logicmoo.pfc.sanity_base.quick_test.BC_01

Package: logicmoo.pfc.sanity_base.quick_test

Results

Duration0.1 sec
Tests1
Failures0

Tests

logicmoo.pfc.sanity_base.quick_test.BC_01

Test case:logicmoo.pfc.sanity_base.quick_test.BC_01@Test_0003_Line_0000__B: baseKB:call_u(bc_q(b))
Outcome:Passed
Duration:0.1 sec
FailedNone
None
Stderr
name=Test_0003_Line_0000__B
JUNIT_CLASSNAME='logicmoo.pfc.sanity_base.quick_test.BC_01'.
JUNIT_CMD='timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'bc_01.pfc\']"'.
 (cd /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/pfc/t/sanity_base/quick_test ; timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "['bc_01.pfc']")

```
%~ init_phase(after_load)
%~ init_phase(restore_state)
%
%~ init_why(after_boot,program)
%~ after_boot.
%~ Dont forget to ?- logicmoo_i_cyc_xform.
running('/var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/pfc/t/sanity_base/quick_test/bc_01.pfc'),
%~ this_test_might_need( :-( use_module( library(logicmoo_plarkc))))


:- dynamic(bc_q/1).
/*~
~*/

:- dynamic(bc_p/1).

/*~
~*/

:- (ain((bc_q(N) <gt;- bc_p(N)))).
/*~
~*/

:- listing(bc_q/1).

/*~
%~ skipped( listing( bc_q/1))
~*/

bc_p(a).
/*~
~*/

bc_p(b).
/*~
~*/

:- listing(bc_p/1).

/*~
%~ skipped( listing( bc_p/1))
~*/

:- mpred_trace_exec.

/*~
~*/

:- mpred_test(call_u(bc_p(b))).

%= nothing cached ?
/*~
%~ ?-( mpred_test("Test_0001_Line_0000__B",baseKB:call_u(bc_p(b)))).
passed=info(why_was_true(baseKB:call_u(bc_p(b))))
no_proof_for(call_u(bc_p(b))).

no_proof_for(call_u(bc_p(b))).

no_proof_for(call_u(bc_p(b))).

name='logicmoo.pfc.sanity_base.quick_test.BC_01-Test_0001_Line_0000__B'.
JUNIT_CLASSNAME='logicmoo.pfc.sanity_base.quick_test.BC_01'.
JUNIT_CMD='timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'bc_01.pfc\']"'.
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace/test_results/jenkins/Report-logicmoo-pfc-sanity_base-quick_test-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_pfc_sanity_base_quick_test_BC_01_Test_0001_Line_0000_B-junit.xml
~*/

%= nothing cached ?
:- listing(bc_q/1).

/*~
%~ skipped( listing( bc_q/1))
~*/

:- mpred_test(\+ clause_u(bc_q(_),true)).

/*~
%~ ?-( mpred_test("Test_0002_Line_0000__naf_bc_q_1",baseKB:(\+clause_u(bc_q(Q),true)))).
passed=info(why_was_true(baseKB:(\+clause_u(bc_q(_2540),true))))
no_proof_for(\+clause_u(bc_q(Q1),true)).

no_proof_for(\+clause_u(bc_q(Q1),true)).

no_proof_for(\+clause_u(bc_q(Q1),true)).

name='logicmoo.pfc.sanity_base.quick_test.BC_01-Test_0002_Line_0000__naf_bc_q_1'.
JUNIT_CLASSNAME='logicmoo.pfc.sanity_base.quick_test.BC_01'.
JUNIT_CMD='timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'bc_01.pfc\']"'.
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace/test_results/jenkins/Report-logicmoo-pfc-sanity_base-quick_test-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_pfc_sanity_base_quick_test_BC_01_Test_0002_Line_0000_naf_bc_q_1-junit.xml
~*/

:- mpred_test((call_u(bc_q(b)))).

%= something cached
/*~
%~ ?-( mpred_test("Test_0003_Line_0000__B",baseKB:call_u(bc_q(b)))).
%~ %~ Adding positive
%~ %~ trigger: bc_p(b)
%~ %~ body: rhs([ bc_q(b)])
%~ %~  Support: (bc_q(P_Q)<gt;-bc_p(P_Q)),mfl4(['N'=N],baseKB,'* https://logicmoo.org:2082/gitlab/logicmoo/logicmoo_workspace/-/edit/master/packs_sys/pfc/t/sanity_base/quick_test/bc_01.pfc#L19 ',19)
%~ call_mpred_post4 :-
%~   level=147 ,
%~   que=0 ,
%~   assertion_status=unique ,
%~   support_status=none ,
%~   post1 = mpred_prop(baseKB,bc_p,1,pfcPosTrigger) ,
%~   fix_mp=baseKB ,
%~   mz=baseKB ,
%~   p0 = mpred_prop(baseKB,bc_p,1,pfcPosTrigger) ,
%~   support_fact = ( bc_q(_2028)<gt;-bc_p(_2028) ,
%~                    mfl4(
%~                       [ 'N'=N],
%~                        baseKB, '/var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/pfc/t/sanity_base/quick_test/bc_01.pfc', 19)) ,
%~   support_trig=ax.
%~ baseKB : mpred_fwc1( mpred_prop(baseKB,bc_p,1,pfcPosTrigger)).
%~ %~ Found positive trigger: mpred_prop(baseKB,bc_p,1,pfcPosTrigger)
%~ %~ body: \+ground((bc_p/1))*->rhs([ { trace_or_throw( mpred_prop(baseKB,bc_p,1,pfcPosTrigger)) }])
%~ %~ Found positive trigger: mpred_prop(baseKB,bc_p,1,pfcPosTrigger)
%~ %~ body: rhs([ mpred_prop(baseKB,bc_p,1,pfcWatches)])
%~ %~ RHS-Post1: mpred_prop(baseKB,bc_p,1,pfcWatches)
%~ %~ Support: mpred_prop(baseKB,bc_p,1,pfcPosTrigger),$pt(baseKB,mpred_prop(baseKB,bc_p,1,pfcPosTrigger),rhs([ mpred_prop(baseKB,bc_p,1,pfcWatches)]))
%~ call_mpred_post4 :-
%~   level=185 ,
%~   que=0 ,
%~   assertion_status=un
goal=baseKB:call_u(bc_q(b)).
time=0.07241511344909668.
passed=passed=info(why_was_true(baseKB:call_u(bc_q(b))))
no_proof_for(call_u(bc_q(b))).

%~ %~ Adding positive
%~ %~ trigger: bc_p(b)
%~ %~ body: rhs([ bc_q(b)])
%~ %~  Support: (bc_q(P_Q)<-bc_p(P_Q)),mfl4(['N'=N],baseKB,'* https://logicmoo.org:2082/gitlab/logicmoo/logicmoo_workspace/-/edit/master/packs_sys/pfc/t/sanity_base/quick_test/bc_01.pfc#L19 ',19)
%~ %~ RHS-Post1: bc_q(b)
%~ %~ Support: bc_p(b),$pt(baseKB,bc_p(b),rhs([ bc_q(b)]))
%~ call_mpred_post4 :-
%~   level=191 ,
%~   que=0 ,
%~   assertion_status=identical ,
%~   support_status=exact ,
%~   post1 = bc_q(b) ,
%~   fix_mp=baseKB ,
%~   mz=baseKB ,
%~   p0 = bc_q(b) ,
%~   support_fact = bc_p(b) ,
%~   support_trig = '$pt'(baseKB,bc_p(b),rhs([bc_q(b)])).
no_proof_for(call_u(bc_q(b))).

no_proof_for(call_u(bc_q(b))).

result=passed.

Test Suite: logicmoo.pfc.sanity_base.quick_test.BC_01

Package: logicmoo.pfc.sanity_base.quick_test

Results

Duration0.0 sec
Tests1
Failures0

Tests

logicmoo.pfc.sanity_base.quick_test.BC_01

Test case:logicmoo.pfc.sanity_base.quick_test.BC_01@Test_0004_Line_0000__bc_q_1: baseKB:clause_u(bc_q(Q1),true)
Outcome:Passed
Duration:0.0 sec
FailedNone
None
Stderr
name=Test_0004_Line_0000__bc_q_1
JUNIT_CLASSNAME='logicmoo.pfc.sanity_base.quick_test.BC_01'.
JUNIT_CMD='timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'bc_01.pfc\']"'.
 (cd /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/pfc/t/sanity_base/quick_test ; timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "['bc_01.pfc']")

```
%~ init_phase(after_load)
%~ init_phase(restore_state)
%
%~ init_why(after_boot,program)
%~ after_boot.
%~ Dont forget to ?- logicmoo_i_cyc_xform.
running('/var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/pfc/t/sanity_base/quick_test/bc_01.pfc'),
%~ this_test_might_need( :-( use_module( library(logicmoo_plarkc))))


:- dynamic(bc_q/1).
/*~
~*/

:- dynamic(bc_p/1).

/*~
~*/

:- (ain((bc_q(N) <gt;- bc_p(N)))).
/*~
~*/

:- listing(bc_q/1).

/*~
%~ skipped( listing( bc_q/1))
~*/

bc_p(a).
/*~
~*/

bc_p(b).
/*~
~*/

:- listing(bc_p/1).

/*~
%~ skipped( listing( bc_p/1))
~*/

:- mpred_trace_exec.

/*~
~*/

:- mpred_test(call_u(bc_p(b))).

%= nothing cached ?
/*~
%~ ?-( mpred_test("Test_0001_Line_0000__B",baseKB:call_u(bc_p(b)))).
passed=info(why_was_true(baseKB:call_u(bc_p(b))))
no_proof_for(call_u(bc_p(b))).

no_proof_for(call_u(bc_p(b))).

no_proof_for(call_u(bc_p(b))).

name='logicmoo.pfc.sanity_base.quick_test.BC_01-Test_0001_Line_0000__B'.
JUNIT_CLASSNAME='logicmoo.pfc.sanity_base.quick_test.BC_01'.
JUNIT_CMD='timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'bc_01.pfc\']"'.
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace/test_results/jenkins/Report-logicmoo-pfc-sanity_base-quick_test-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_pfc_sanity_base_quick_test_BC_01_Test_0001_Line_0000_B-junit.xml
~*/

%= nothing cached ?
:- listing(bc_q/1).

/*~
%~ skipped( listing( bc_q/1))
~*/

:- mpred_test(\+ clause_u(bc_q(_),true)).

/*~
%~ ?-( mpred_test("Test_0002_Line_0000__naf_bc_q_1",baseKB:(\+clause_u(bc_q(Q),true)))).
passed=info(why_was_true(baseKB:(\+clause_u(bc_q(_2540),true))))
no_proof_for(\+clause_u(bc_q(Q1),true)).

no_proof_for(\+clause_u(bc_q(Q1),true)).

no_proof_for(\+clause_u(bc_q(Q1),true)).

name='logicmoo.pfc.sanity_base.quick_test.BC_01-Test_0002_Line_0000__naf_bc_q_1'.
JUNIT_CLASSNAME='logicmoo.pfc.sanity_base.quick_test.BC_01'.
JUNIT_CMD='timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'bc_01.pfc\']"'.
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace/test_results/jenkins/Report-logicmoo-pfc-sanity_base-quick_test-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_pfc_sanity_base_quick_test_BC_01_Test_0002_Line_0000_naf_bc_q_1-junit.xml
~*/

:- mpred_test((call_u(bc_q(b)))).

%= something cached
/*~
%~ ?-( mpred_test("Test_0003_Line_0000__B",baseKB:call_u(bc_q(b)))).
%~ %~ Adding positive
%~ %~ trigger: bc_p(b)
%~ %~ body: rhs([ bc_q(b)])
%~ %~  Support: (bc_q(P_Q)<gt;-bc_p(P_Q)),mfl4(['N'=N],baseKB,'* https://logicmoo.org:2082/gitlab/logicmoo/logicmoo_workspace/-/edit/master/packs_sys/pfc/t/sanity_base/quick_test/bc_01.pfc#L19 ',19)
%~ call_mpred_post4 :-
%~   level=147 ,
%~   que=0 ,
%~   assertion_status=unique ,
%~   support_status=none ,
%~   post1 = mpred_prop(baseKB,bc_p,1,pfcPosTrigger) ,
%~   fix_mp=baseKB ,
%~   mz=baseKB ,
%~   p0 = mpred_prop(baseKB,bc_p,1,pfcPosTrigger) ,
%~   support_fact = ( bc_q(_2028)<gt;-bc_p(_2028) ,
%~                    mfl4(
%~                       [ 'N'=N],
%~                        baseKB, '/var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/pfc/t/sanity_base/quick_test/bc_01.pfc', 19)) ,
%~   support_trig=ax.
%~ baseKB : mpred_fwc1( mpred_prop(baseKB,bc_p,1,pfcPosTrigger)).
%~ %~ Found positive trigger: mpred_prop(baseKB,bc_p,1,pfcPosTrigger)
%~ %~ body: \+ground((bc_p/1))*->rhs([ { trace_or_throw( mpred_prop(baseKB,bc_p,1,pfcPosTrigger)) }])
%~ %~ Found positive trigger: mpred_prop(baseKB,bc_p,1,pfcPosTrigger)
%~ %~ body: rhs([ mpred_prop(baseKB,bc_p,1,pfcWatches)])
%~ %~ RHS-Post1: mpred_prop(baseKB,bc_p,1,pfcWatches)
%~ %~ Support: mpred_prop(baseKB,bc_p,1,pfcPosTrigger),$pt(baseKB,mpred_prop(baseKB,bc_p,1,pfcPosTrigger),rhs([ mpred_prop(baseKB,bc_p,1,pfcWatches)]))
%~ call_mpred_post4 :-
%~   level=185 ,
%~   que=0 ,
%~   assertion_status=unique ,
%~   support_status=none ,
%~   post1 = mpred_prop(baseKB,bc_p,1,pfcWatches) ,
%~   fix_mp=baseKB ,
%~   mz=baseKB ,
%~   p0 = mpred_prop(baseKB,bc_p,1,pfcWatches) ,
%~   support_fact = mpred_prop(baseKB,bc_p,1,pfcPosTrigger) ,
%~   support_trig = '$pt'( baseKB,
%~                    mpred_prop(baseKB,bc_p,1,pfcPosTrigger),
%~                    rhs([mpred_prop(baseKB,bc_p,1,pfcWatches)])).
%~ baseKB : mpred_fwc1( mpred_prop(baseKB,bc_p,1,pfcWatches)).
%~ %~ Found positive trigger: mpred_prop(baseKB,bc_p,1,pfcWatches)
%~ %~ body: \+ground((bc_p/1))*->rhs([ { trace_or_throw( mpred_prop(baseKB,bc_p,1,pfcWatches)) }])
%~ %~ Found positive trigger: mpred_prop(baseKB,bc_p,1,pfcWatches)
%~ %~ body: rhs([ { kb_shared( baseKB : bc_p/1) }])
%~ call_mpred_post4 :-
%~   level=302 ,
%~   que=0 ,
%~   assertion_status=unique ,
%~   support_status=none ,
%~   post1 = mpred_prop(baseKB,bc_p,1,kb_shared) ,
%~   fix_mp=baseKB ,
%~   mz=baseKB ,
%~   p0 = mpred_prop(baseKB,bc_p,1,kb_shared) ,
%~   support_fact = mfl4(_28554,baseKB,'/var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/pfc/t/sanity_base/quick_test/bc_01.pfc',35) ,
%~   support_trig=ax.
%~ baseKB : mpred_fwc1( mpred_prop(baseKB,bc_p,1,kb_shared)).
%~ %~ Found positive trigger: mpred_prop(baseKB,bc_p,1,kb_shared)
%~ %~ body: $pt(baseKB,genlMt(Call_BaseKB,baseKB),(Call_BaseKB\=baseKB*->rhs([ { nop( dmsg_pretty( Call_BaseKB :
%~ %~
%~ %~                                                                                          call(kb_shared,Call_BaseKB:bc_p/1))),
%~ %~                                                                      show_failure( on_x_fail( Call_BaseKB :
%~ %~
%~ %~                                                                                                 call(kb_shared,Call_BaseKB:bc_p/1))) }])))
%~ %~ Adding positive
%~ %~ trigger: genlMt(BaseKB,baseKB)
%~ %~ body: Call_BaseKB\=baseKB*->rhs([ { nop( dmsg_pretty( Call_BaseKB :
%~ %~
%~ %~                                                   call(kb_shared,Call_BaseKB:bc_p/1))),
%~ %~                               show_failure( on_x_fail( Call_BaseKB :
%~ %~
%~ %~                                                          call(kb_shared,Call_BaseKB:bc_p/1))) }])
%~ %~  Support: mpred_prop(baseKB,bc_p,1,kb_shared),$pt(baseKB,mpred_prop(baseKB,bc_p,1,kb_shared),$pt(baseKB,genlMt(Call_BaseKB,baseKB),(Call_BaseKB\=baseKB*->rhs(
%~ %~                             [ { nop( dmsg_pretty( Call_BaseKB :
%~ %~
%~ %~                                                     call(kb_shared,Call_BaseKB:bc_p/1))),
%~ %~                                 show_failure( on_x_fail( Call_BaseKB :
%~ %~
%~ %~                                                            call(kb_shared,Call_BaseKB:bc_p/1))) }]))))
%~ %~ Found positive trigger: mpred_prop(baseKB,bc_p,1,kb_shared)
%~ %~ body: \+ground((bc_p/1))*->rhs([ { trace_or_throw( mpred_prop(baseKB,bc_p,1,kb_shared)) }])
%~ %~ Found positive trigger: mpred_prop(baseKB,bc_p,1,kb_shared)
%~ %~ body: genlPreds(kb_shared,Prop_GenlPreds_Kb_shared)*->rhs([ mpred_prop(baseKB,bc_p,1,Prop_GenlPreds_Kb_shared)])
%~ %~ Found positive trigger: mpred_prop(baseKB,bc_p,1,pfcWatches)
%~ %~ body: genlPreds(pfcWatches,Prop_GenlPreds_PfcWatches)*->rhs([ mpred_prop(baseKB,bc_p,1,Prop_GenlPreds_PfcWatches)])
%~ %~ Found positive trigger: mpred_prop(baseKB,bc_p,1,pfcPosTrigger)
%~ %~ body: genlPreds(pfcPosTrigger,Prop_GenlPreds_PfcPosTrigger)*->rhs([ mpred_prop(baseKB,bc_p,1,Prop_GenlPreds_PfcPosTrigger)])
%~ %~ RHS-Post1: bc_q(b)
%~ %~ Support: bc_p(b),$pt(baseKB,bc_p(b),rhs([ bc_q(b)]))
%~ call_mpred_post4 :-
%~   level=139 ,
%~   que=0 ,
%~   assertion_status=unique ,
%~   support_status=none ,
%~   post1 = bc_q(b) ,
%~   fix_mp=baseKB ,
%~   mz=baseKB ,
%~   p0 = bc_q(b) ,
%~   support_fact = bc_p(b) ,
%~   support_trig = '$pt'(baseKB,bc_p(b),rhs([bc_q(b)])).
%~ baseKB : mpred_fwc1( bc_q(b)).
passed=info(why_was_true(baseKB:call_u(bc_q(b))))
no_proof_for(call_u(bc_q(b))).

%~ %~ Adding positive
%~ %~ trigger: bc_p(b)
%~ %~ body: rhs([ bc_q(b)])
%~ %~  Support:
goal=baseKB:clause_u(bc_q(_113786),true).
time=0.00011491775512695312.
passed=passed=info(why_was_true(baseKB:clause_u(bc_q(b),true)))
no_proof_for(clause_u(bc_q(b),true)).

no_proof_for(clause_u(bc_q(b),true)).

no_proof_for(clause_u(bc_q(b),true)).

result=passed.

Test Suite: logicmoo.pfc.sanity_base.quick_test.FC_01

Package: logicmoo.pfc.sanity_base.quick_test

Results

Duration0.0 sec
Tests1
Failures0

Tests

logicmoo.pfc.sanity_base.quick_test.FC_01

Test case:logicmoo.pfc.sanity_base.quick_test.FC_01@Test_0001_Line_0000__B11: baseKB:b11
Outcome:Passed
Duration:0.0 sec
FailedNone
None
Stderr
name=Test_0001_Line_0000__B11
JUNIT_CLASSNAME='logicmoo.pfc.sanity_base.quick_test.FC_01'.
JUNIT_CMD='timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'fc_01.pfc\']"'.
 (cd /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/pfc/t/sanity_base/quick_test ; timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "['fc_01.pfc']")

```
goal=baseKB:b11.
time=0.00011587142944335938.
passed=passed=info(why_was_true(baseKB:b11))

Justifications for b11:
36m    1.1 a11 0m90m % [* https://logicmoo.org:2082/gitlab/logicmoo/logicmoo_workspace/-/edit/master/packs_sys/pfc/t/sanity_base/quick_test/fc_01.pfc#L12 ] 0m36m
    1.2 a11==>b11 0m90m % [* https://logicmoo.org:2082/gitlab/logicmoo/logicmoo_workspace/-/edit/master/packs_sys/pfc/t/sanity_base/quick_test/fc_01.pfc#L11 ] 0m36m
    1.3 mfl4(_,baseKB,'* https://logicmoo.org:2082/gitlab/logicmoo/logicmoo_workspace/-/edit/master/packs_sys/pfc/t/sanity_base/quick_test/fc_01.pfc#L12 ',12) 0m36m
    1.4 mfl4(_,baseKB,'* https://logicmoo.org:2082/gitlab/logicmoo/logicmoo_workspace/-/edit/master/packs_sys/pfc/t/sanity_base/quick_test/fc_01.pfc#L11 ',11) 0m

result=passed.

Test Suite: logicmoo.pfc.test.sanity_base.DF_05

Package: logicmoo.pfc.test.sanity_base

Results

Duration0.0 sec
Tests1
Failures1

Tests

logicmoo.pfc.test.sanity_base.DF_05

Test case:logicmoo.pfc.test.sanity_base.DF_05@Test_0001_Line_0000__test1_2_3_1: baseKB:test1_2_3(1,2,3)
Outcome:Failed
Duration:0.0 sec
Failedfailure = "failure=info((why_was_true(baseKB:(\\+test1_2_3(1,2,3))),nop(ftrace(baseKB:test1_2_3(1,2,3)))))\nno_proof_for(\\+test1_2_3(1,2,3)).\n\nno_proof_for(\\+test1_2_3(1,2,3)).\n\nno_proof_for(\\+test1_2_3(1,2,3)).\n\n". failure = [].
failed
Stderr
name=Test_0001_Line_0000__test1_2_3_1
JUNIT_CLASSNAME='logicmoo.pfc.test.sanity_base.DF_05'.
JUNIT_CMD='timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "[\'df_05.pfc\']"'.
 (cd /var/lib/jenkins/workspace/logicmoo_workspace/packs_sys/pfc/t/sanity_base ; timeout --foreground --preserve-status -s SIGKILL -k 10s 10s swipl -x /var/lib/jenkins/workspace/logicmoo_workspace/bin/lmoo-clif -t "['df_05.pfc']")

```
goal=baseKB:test1_2_3(1,2,3).
time=0.00016045570373535156.
failure=failure=info((why_was_true(baseKB:(\+test1_2_3(1,2,3))),nop(ftrace(baseKB:test1_2_3(1,2,3)))))
no_proof_for(\+test1_2_3(1,2,3)).

no_proof_for(\+test1_2_3(1,2,3)).

no_proof_for(\+test1_2_3(1,2,3)).

result=failure.