Test Report : Report-logicmoo-base-fol-fiveof-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-junitCombined-rollup.tmp

Test Suite: logicmoo.base.fol.fiveof.FIVE_LEFTOF_02

Package: logicmoo.base.fol.fiveof

Results

Duration0.0 sec
Tests1
Failures1

Tests

logicmoo.base.fol.fiveof.FIVE_LEFTOF_02

Test case:logicmoo.base.fol.fiveof.FIVE_LEFTOF_02@Test_0001_Line_0004__leftof_2_in_user: user: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))))))
Outcome:Failed
Duration:0.0 sec
Failedfailure = "failure=info((why_was_true(user:(\\+exists(_41837784,exists(_41837806,exists(_41837828,exists(_41837850,exists(_41837872,leftof(_41837784,_41837806)&leftof(_41837806,_41837828)&leftof(_41837828,_41837850)&leftof(_41837850,_41837872)))))))),nop(ftrace(user:exists(_41837784,exists(_41837806,exists(_41837828,exists(_41837850,exists(_41837872,leftof(_41837784,_41837806)&leftof(_41837806,_41837828)&leftof(_41837828,_41837850)&leftof(_41837850,_41837872))))))))))\nno_proof_for(\\+exists(H1,exists(H2,exists(H3,exists(H4,exists(H5,leftof(H1,H2)&leftof(H2,H3)&leftof(H3,H4)&leftof(H4,H5))))))).\n\nno_proof_for(\\+exists(H1,exists(H2,exists(H3,exists(H4,exists(H5,leftof(H1,H2)&leftof(H2,H3)&leftof(H3,H4)&leftof(H4,H5))))))).\n\nno_proof_for(\\+exists(H1,exists(H2,exists(H3,exists(H4,exists(H5,leftof(H1,H2)&leftof(H2,H3)&leftof(H3,H4)&leftof(H4,H5))))))).\n\n". failure = [].
failed
Stderr
name=Test_0001_Line_0004__leftof_2_in_user
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.FIVE_LEFTOF_02'.
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_02.pl\']"'.
 (cd /var/lib/jenkins/workspace/logicmoo_workspace@2/back_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_02.pl']")

```
Warning: import/1: parser_lexical_plkb:(cyc_lex/1) is not exported (still imported into system)
%~ 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.
%~ skipped(blocks_on_input,prolog).
running('/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_02.pl'),
%~ this_test_might_need((:-expects_dialect(pfc))).
%~ /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_utils/prolog/logicmoo_test_header.pl:96
%~ 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))))))).

/*~
%~ debugm( user,
%~   show_success( user,
%~     user : ain( clif( exists( H1,
%~                         exists( H2,
%~                           exists( H3,
%~                             exists( H4,
%~                               exists( H5,
%~                                 ( leftof(H1,H2)  &
%~                                   leftof(H2,H3) &
%~                                   leftof(H3,H4) &
%~                                   leftof(H4,H5))))))))))).



=======================================================
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 " )))))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_02.pl:17
%~ kifi = 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))))))).
%~ kifm = exists( Exists_Leftof,
%~          exists( Exists_Leftof6,
%~            exists( Exists_Leftof7,
%~              exists( Exists_Leftof8,
%~                exists( Leftof13,
%~                  nesc( ( leftof(Exists_Leftof,Exists_Leftof6)  &
%~                          leftof(Exists_Leftof6,Exists_Leftof7) &
%~                          leftof(Exists_Leftof7,Exists_Leftof8) &
%~                          leftof(Exists_Leftof8,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))).
.

============================================
%~ kifi = exists( H1,
%~          exists( H2,
%~            exists( H3,
%~              exists( H4,
%~                exists( H5,
%~                  ( leftof(H1,H2)  &
%~                    leftof(H2,H3) &
%~                    leftof(H3,H4) &
%~                    leftof(H4,H5))))))).
%~ kifm = exists( H1,
%~          exists( H2,
%~            exists( H3,
%~              exists( H4,
%~                exists( H5,
%~                  nesc( ( leftof(H1,H2)  &
%~                          leftof(H2,H3) &
%~                          leftof(H3,H4) &
%~                          leftof(H4,H5)))))))).
%~ 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))).
.

~*/

:- include(leftof_tests).
    

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

/*~
%~ ?-( mpred_test( "Test_0001_Line_0004__leftof_2_in_user",
%~       user : exists( H1,
%~                exists( H2,
%~                  exists( H3,
%~                    exists( H4,
%~                      exists( H5,
%~                        ( leftof(H1,H2)  &
%~                          leftof(H2,H3) &
%~                          leftof(H3,H4) &
%~                          leftof(H4,H5))))))))).
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/leftof_tests.pl:4
%~ make_dynamic_here( baseKB,
%~   exists( H1,
%~     exists( H2,
%~       exists( H3,
%~         exists( H4,
%~           exists( H5,
%~             ( leftof(H1,H2)  &
%~               leftof(H2,H3) &
%~               leftof(H3,H4) &
%~               leftof(H4,H5)))))))).
failure=info((why_was_true(user:(\+exists(_41837784,exists(_41837806,exists(_41837828,exists(_41837850,exists(_41837872,leftof(_41837784,_41837806)&leftof(_41837806,
goal=user:exists(_41954184,exists(_41954190,exists(_41954196,exists(_41954202,exists(_41954208,leftof(_41954184,_41954190)&leftof(_41954190,_41954196)&leftof(_41954196,_41954202)&leftof(_41954202,_41954208)))))).
src='/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/leftof_tests.pl':4.
url=/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/leftof_tests.pl#L4
time=0.006845712661743164.
failure=failure=info((why_was_true(user:(\+exists(_41837784,exists(_41837806,exists(_41837828,exists(_41837850,exists(_41837872,leftof(_41837784,_41837806)&leftof(_41837806,_41837828)&leftof(_41837828,_41837850)&leftof(_41837850,_41837872)))))))),nop(ftrace(user:exists(_41837784,exists(_41837806,exists(_41837828,exists(_41837850,exists(_41837872,leftof(_41837784,_41837806)&leftof(_41837806,_41837828)&leftof(_41837828,_41837850)&leftof(_41837850,_41837872))))))))))
no_proof_for(\+exists(H1,exists(H2,exists(H3,exists(H4,exists(H5,leftof(H1,H2)&leftof(H2,H3)&leftof(H3,H4)&leftof(H4,H5))))))).

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

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

result=failure.

Test Suite: logicmoo.base.fol.fiveof.FIVE_LEFTOF_02

Package: logicmoo.base.fol.fiveof

Results

Duration0.0 sec
Tests1
Failures1

Tests

logicmoo.base.fol.fiveof.FIVE_LEFTOF_02

Test case:logicmoo.base.fol.fiveof.FIVE_LEFTOF_02@Test_0002_Line_0008__leftof_2_in_user: user:leftof(Leftof,Leftof6)&leftof(Leftof6,Leftof7)&leftof(Leftof7,Leftof8)&leftof(Leftof8,Leftof9)
Outcome:Failed
Duration:0.0 sec
Failedfailure = "failure=info((why_was_true(user:(\\+leftof(_42565828,_42565850)&leftof(_42565850,_42565872)&leftof(_42565872,_42565894)&leftof(_42565894,_42565916))),nop(ftrace(user:leftof(_42565828,_42565850)&leftof(_42565850,_42565872)&leftof(_42565872,_42565894)&leftof(_42565894,_42565916)))))\nno_proof_for(\\+leftof(H1,H2)&leftof(H2,H3)&leftof(H3,H4)&leftof(H4,H5)).\n\nno_proof_for(\\+leftof(H1,H2)&leftof(H2,H3)&leftof(H3,H4)&leftof(H4,H5)).\n\nno_proof_for(\\+leftof(H1,H2)&leftof(H2,H3)&leftof(H3,H4)&leftof(H4,H5)).\n\n". failure = [].
failed
Stderr
name=Test_0002_Line_0008__leftof_2_in_user
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.FIVE_LEFTOF_02'.
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_02.pl\']"'.
 (cd /var/lib/jenkins/workspace/logicmoo_workspace@2/back_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_02.pl']")

```
Warning: import/1: parser_lexical_plkb:(cyc_lex/1) is not exported (still imported into system)
%~ 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.
%~ skipped(blocks_on_input,prolog).
running('/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_02.pl'),
%~ this_test_might_need((:-expects_dialect(pfc))).
%~ /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_utils/prolog/logicmoo_test_header.pl:96
%~ 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))))))).

/*~
%~ debugm( user,
%~   show_success( user,
%~     user : ain( clif( exists( H1,
%~                         exists( H2,
%~                           exists( H3,
%~                             exists( H4,
%~                               exists( H5,
%~                                 ( leftof(H1,H2)  &
%~                                   leftof(H2,H3) &
%~                                   leftof(H3,H4) &
%~                                   leftof(H4,H5))))))))))).



=======================================================
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 " )))))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_02.pl:17
%~ kifi = 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))))))).
%~ kifm = exists( Exists_Leftof,
%~          exists( Exists_Leftof6,
%~            exists( Exists_Leftof7,
%~              exists( Exists_Leftof8,
%~                exists( Leftof13,
%~                  nesc( ( leftof(Exists_Leftof,Exists_Leftof6)  &
%~                          leftof(Exists_Leftof6,Exists_Leftof7) &
%~                          leftof(Exists_Leftof7,Exists_Leftof8) &
%~                          leftof(Exists_Leftof8,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))).
.

============================================
%~ kifi = exists( H1,
%~          exists( H2,
%~            exists( H3,
%~              exists( H4,
%~                exists( H5,
%~                  ( leftof(H1,H2)  &
%~                    leftof(H2,H3) &
%~                    leftof(H3,H4) &
%~                    leftof(H4,H5))))))).
%~ kifm = exists( H1,
%~          exists( H2,
%~            exists( H3,
%~              exists( H4,
%~                exists( H5,
%~                  nesc( ( leftof(H1,H2)  &
%~                          leftof(H2,H3) &
%~                          leftof(H3,H4) &
%~                          leftof(H4,H5)))))))).
%~ 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))).
.

~*/

:- include(leftof_tests).
    

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

/*~
%~ ?-( mpred_test( "Test_0001_Line_0004__leftof_2_in_user",
%~       user : exists( H1,
%~                exists( H2,
%~                  exists( H3,
%~                    exists( H4,
%~                      exists( H5,
%~                        ( leftof(H1,H2)  &
%~                          leftof(H2,H3) &
%~                          leftof(H3,H4) &
%~                          leftof(H4,H5))))))))).
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/leftof_tests.pl:4
%~ make_dynamic_here( baseKB,
%~   exists( H1,
%~     exists( H2,
%~       exists( H3,
%~         exists( H4,
%~           exists( H5,
%~             ( leftof(H1,H2)  &
%~               leftof(H2,H3) &
%~               leftof(H3,H4) &
%~               leftof(H4,H5)))))))).
failure=info((why_was_true(user:(\+exists(_41837784,exists(_41837806,exists(_41837828,exists(_41837850,exists(_41837872,leftof(_41837784,_41837806)&leftof(_41837806,
goal=user:leftof(_42628534,_42628536)&leftof(_42628536,_42628542)&leftof(_42628542,_42628548)&leftof(_42628548,_42628554).
src='/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/leftof_tests.pl':8.
url=/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/leftof_tests.pl#L8
time=0.0024824142456054688.
failure=failure=info((why_was_true(user:(\+leftof(_42565828,_42565850)&leftof(_42565850,_42565872)&leftof(_42565872,_42565894)&leftof(_42565894,_42565916))),nop(ftrace(user:leftof(_42565828,_42565850)&leftof(_42565850,_42565872)&leftof(_42565872,_42565894)&leftof(_42565894,_42565916)))))
no_proof_for(\+leftof(H1,H2)&leftof(H2,H3)&leftof(H3,H4)&leftof(H4,H5)).

no_proof_for(\+leftof(H1,H2)&leftof(H2,H3)&leftof(H3,H4)&leftof(H4,H5)).

no_proof_for(\+leftof(H1,H2)&leftof(H2,H3)&leftof(H3,H4)&leftof(H4,H5)).

result=failure.

Test Suite: logicmoo.base.fol.fiveof.FIVE_LEFTOF_02

Package: logicmoo.base.fol.fiveof

Results

Duration0.0 sec
Tests1
Failures1

Tests

logicmoo.base.fol.fiveof.FIVE_LEFTOF_02

Test case:logicmoo.base.fol.fiveof.FIVE_LEFTOF_02@Test_0003_Line_0012__H1_in_user: user:leftof(h1,h2)&leftof(h2,h3)&leftof(h3,h4)&leftof(h4,h5)
Outcome:Failed
Duration:0.0 sec
Failedfailure = "failure=info((why_was_true(user:(\\+leftof(h1,h2)&leftof(h2,h3)&leftof(h3,h4)&leftof(h4,h5))),nop(ftrace(user:leftof(h1,h2)&leftof(h2,h3)&leftof(h3,h4)&leftof(h4,h5)))))\nno_proof_for(\\+leftof(h1,h2)&leftof(h2,h3)&leftof(h3,h4)&leftof(h4,h5)).\n\nno_proof_for(\\+leftof(h1,h2)&leftof(h2,h3)&leftof(h3,h4)&leftof(h4,h5)).\n\nno_proof_for(\\+leftof(h1,h2)&leftof(h2,h3)&leftof(h3,h4)&leftof(h4,h5)).\n\n". failure = [].
failed
Stderr
name=Test_0003_Line_0012__H1_in_user
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.FIVE_LEFTOF_02'.
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_02.pl\']"'.
 (cd /var/lib/jenkins/workspace/logicmoo_workspace@2/back_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_02.pl']")

```
Warning: import/1: parser_lexical_plkb:(cyc_lex/1) is not exported (still imported into system)
%~ 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.
%~ skipped(blocks_on_input,prolog).
running('/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_02.pl'),
%~ this_test_might_need((:-expects_dialect(pfc))).
%~ /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_utils/prolog/logicmoo_test_header.pl:96
%~ 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))))))).

/*~
%~ debugm( user,
%~   show_success( user,
%~     user : ain( clif( exists( H1,
%~                         exists( H2,
%~                           exists( H3,
%~                             exists( H4,
%~                               exists( H5,
%~                                 ( leftof(H1,H2)  &
%~                                   leftof(H2,H3) &
%~                                   leftof(H3,H4) &
%~                                   leftof(H4,H5))))))))))).



=======================================================
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 " )))))
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_02.pl:17
%~ kifi = 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))))))).
%~ kifm = exists( Exists_Leftof,
%~          exists( Exists_Leftof6,
%~            exists( Exists_Leftof7,
%~              exists( Exists_Leftof8,
%~                exists( Leftof13,
%~                  nesc( ( leftof(Exists_Leftof,Exists_Leftof6)  &
%~                          leftof(Exists_Leftof6,Exists_Leftof7) &
%~                          leftof(Exists_Leftof7,Exists_Leftof8) &
%~                          leftof(Exists_Leftof8,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))).
.

============================================
%~ kifi = exists( H1,
%~          exists( H2,
%~            exists( H3,
%~              exists( H4,
%~                exists( H5,
%~                  ( leftof(H1,H2)  &
%~                    leftof(H2,H3) &
%~                    leftof(H3,H4) &
%~                    leftof(H4,H5))))))).
%~ kifm = exists( H1,
%~          exists( H2,
%~            exists( H3,
%~              exists( H4,
%~                exists( H5,
%~                  nesc( ( leftof(H1,H2)  &
%~                          leftof(H2,H3) &
%~                          leftof(H3,H4) &
%~                          leftof(H4,H5)))))))).
%~ 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))).
.

~*/

:- include(leftof_tests).
    

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

/*~
%~ ?-( mpred_test( "Test_0001_Line_0004__leftof_2_in_user",
%~       user : exists( H1,
%~                exists( H2,
%~                  exists( H3,
%~                    exists( H4,
%~                      exists( H5,
%~                        ( leftof(H1,H2)  &
%~                          leftof(H2,H3) &
%~                          leftof(H3,H4) &
%~                          leftof(H4,H5))))))))).
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/leftof_tests.pl:4
%~ make_dynamic_here( baseKB,
%~   exists( H1,
%~     exists( H2,
%~       exists( H3,
%~         exists( H4,
%~           exists( H5,
%~             ( leftof(H1,H2)  &
%~               leftof(H2,H3) &
%~               leftof(H3,H4) &
%~               leftof(H4,H5)))))))).
failure=info((why_was_true(user:(\+exists(_41837784,exists(_41837806,exists(_41837828,exists(_41837850,exists(_41837872,leftof(_41837784,_41837806)&leftof(_41837806,
goal=user:leftof(h1,h2)&leftof(h2,h3)&leftof(h3,h4)&leftof(h4,h5).
src='/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/leftof_tests.pl':12.
url=/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/leftof_tests.pl#L12
time=0.0010633468627929688.
failure=failure=info((why_was_true(user:(\+leftof(h1,h2)&leftof(h2,h3)&leftof(h3,h4)&leftof(h4,h5))),nop(ftrace(user:leftof(h1,h2)&leftof(h2,h3)&leftof(h3,h4)&leftof(h4,h5)))))
no_proof_for(\+leftof(h1,h2)&leftof(h2,h3)&leftof(h3,h4)&leftof(h4,h5)).

no_proof_for(\+leftof(h1,h2)&leftof(h2,h3)&leftof(h3,h4)&leftof(h4,h5)).

no_proof_for(\+leftof(h1,h2)&leftof(h2,h3)&leftof(h3,h4)&leftof(h4,h5)).

result=failure.

Test Suite: logicmoo.base.fol.fiveof.FIVE_LEFTOF_03

Package: logicmoo.base.fol.fiveof

Results

Duration0.0 sec
Tests1
Failures0

Tests

logicmoo.base.fol.fiveof.FIVE_LEFTOF_03

Test case:logicmoo.base.fol.fiveof.FIVE_LEFTOF_03@Test_0001_Line_0000__leftof_2_in_user: user:test_boxlog(exists(Exists_Leftof,exists(Different_Leftof4,leftof(Exists_Leftof,Different_Leftof4)&different(Exists_Leftof,Different_Leftof4))))
Outcome:Passed
Duration:0.2 sec
FailedNone
None
Stderr
name=Test_0001_Line_0000__leftof_2_in_user
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.FIVE_LEFTOF_03'.
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_03.pl\']"'.
 (cd /var/lib/jenkins/workspace/logicmoo_workspace@2/back_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_03.pl']")

```
Warning: import/1: parser_lexical_plkb:(cyc_lex/1) is not exported (still imported into system)
%~ 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.
%~ skipped(blocks_on_input,prolog).
running('/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_03.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.

:- test_boxlog([+assert],
 exists(H1,exists(H2,
   (leftof(H1, H2))))).

/*~
%~ kifi = exists(H1,exists(H2,leftof(H1,H2))).
%~ kifm = exists(H1,exists(H2,nesc(leftof(H1,H2)))).
%~ kif_to_boxlog_attvars2 = exists('$VAR'('H1'),exists('$VAR'('H2'),necessary(leftof('$VAR'('H1'),'$VAR'('H2')))))
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~     by default ?H1 exists(H2,nesc(leftof(H1,H2)))  and
%~     by default ?H2 nesc(leftof(H1,H2))
%~  It's Proof that:
%~    " ?H1 leftof ?H2 " is necessarily true
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

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

~*/

:- break.

/*~
%~ skipped(blocks_on_input,break).
~*/

:- test_boxlog(
 exists(H1,exists(H2,
  (leftof(H1, H2) & different(H1, H2))))).
 
/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_03.pl:25
%~ ?-( mpred_test( "Test_0001_Line_0000__leftof_2_in_user",
%~       user : test_boxlog( exists(H1,exists(H2,leftof(H1,H2)&different(H1,H2)))))).
%~ kifi = exists(H1,exists(H2,leftof(H1,H2)&different(H1,H2))).
%~ kifm = exists( H1,
%~          exists(H2,nesc(leftof(H1,H2)&different(H1,H2)))).
%~ kif_to_boxlog_attvars2 = exists('$VAR'('H1'),exists('$VAR'('H2'),necessary(and(leftof('$VAR'('H1'),'$VAR'('H2')),different('$VAR'('H1'),'$VAR'('H2'))))))
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    (" ?H1 leftof ?H2 " is possibly false  and
%~     by default ?H1 exists(H2,nesc(leftof(H1,H2))&nesc(different(H1,H2))) ) and
%~     by default ?H2 nesc(leftof(H1,H2))&nesc(different(H1,H2))
%~  It's Proof that:
%~    " ?H1 different ?H2 " is possibly false
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

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

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

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

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

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

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

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

%~ kifi = exists(H1,exists(H2,leftof(H1,H2)&different(H1,H2))).
%~ kifi=exists(H1,exists(H2,leftof(H1,H2)&different(H1,H2)))
%~ kifm = exists( H1,
%~          exists(H2,nesc(leftof(H1,H2)&different(H1,H2)))).
%~ kifm=exists(H1,exists(H2,nesc(leftof(H1,H2)&different(H1,H2))))
passed=info(why_was_true(user:test_boxlog(exists(_376456,exists(_376478,leftof(_376456,_376478)&different(_376456,_376478))))))
no_proof_for(test_boxlog(exists(H1,exists(H2,leftof(H1,H2)&different(H1,H2))))).

%~ kif_to_boxlog_attvars2 = exists('$VAR'('H1'),exists('$VAR'('H2'),necessary(and(leftof('$VAR'('H1'),'$VAR'('H2')),different('$VAR'('H1'),'$VAR'('H2'))))))
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    (" ?H1 leftof ?H2 " is possibly false  and
%~     by default ?H1 exists(H2,nesc(leftof(H1,H2))&nesc(different(H1,H2))) ) and
%~     by default ?H2 nesc(leftof(H1,H2))&nesc(different(H1,H2))
%~  It's Proof that:
%~    " ?H1 different ?H2 " is possibly false
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

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

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

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

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

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

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

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

no_proof_for(test_boxlog(exists(H1,exis
goal=user:test_boxlog(exists(_9331058,exists(_9331064,leftof(_9331058,_9331064)&different(_9331058,_9331064)))).
time=0.2222907543182373.
passed=passed=info(why_was_true(user:test_boxlog(exists(_376456,exists(_376478,leftof(_376456,_376478)&different(_376456,_376478))))))
no_proof_for(test_boxlog(exists(H1,exists(H2,leftof(H1,H2)&different(H1,H2))))).

%~ kif_to_boxlog_attvars2 = exists('$VAR'('H1'),exists('$VAR'('H2'),necessary(and(leftof('$VAR'('H1'),'$VAR'('H2')),different('$VAR'('H1'),'$VAR'('H2'))))))
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  Whenever:
%~    (" ?H1 leftof ?H2 " is possibly false  and
%~     by default ?H1 exists(H2,nesc(leftof(H1,H2))&nesc(different(H1,H2))) ) and
%~     by default ?H2 nesc(leftof(H1,H2))&nesc(different(H1,H2))
%~  It's Proof that:
%~    " ?H1 different ?H2 " is possibly false
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

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

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

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

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

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

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

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

no_proof_for(test_boxlog(exists(H1,exists(H2,leftof(H1,H2)&different(H1,H2))))).

no_proof_for(test_boxlog(exists(H1,exists(H2,leftof(H1,H2)&different(H1,H2))))).

result=passed.

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

Package: logicmoo.base.fol.fiveof

Results

Duration0.0 sec
Tests1
Failures0

Tests

logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_01

Test case:logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_01@Test_0001_Line_0000__Nesc_in_user: user:listing(nesc)
Outcome:Passed
Duration:0.0 sec
FailedNone
None
Stderr
name=Test_0001_Line_0000__Nesc_in_user
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.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@2/back_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_type_01.pl']")

```
Warning: import/1: parser_lexical_plkb:(cyc_lex/1) is not exported (still imported into system)
%~ 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.
%~ skipped(blocks_on_input,prolog).
running('/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_01.pl'),
%~ /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_utils/prolog/logicmoo_test_header.pl:93
%~ this_test_might_need((:-expects_dialect(pfc))).
%~ this_test_might_need((:-use_module(library(logicmoo_plarkc)))).

:- expects_dialect(clif).

/*~
~*/


:- kif_compile.

% makes the KB monotonic
/*~
~*/

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

% There are five houses in a row.
/*~
~*/

% There are five houses in a row.
nesc(leftof(h1, h2)).
/*~
~*/

leftof(h2, h3).
/*~
%~ kifi=leftof(h2,h3).
%~ kifm=nesc(leftof(h2,h3)).
%~ kifm=nesc(leftof(h2,h3)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h2,h3))
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_01.pl:26
%~ debugm(user,show_success(user,user:ain(clif(leftof(h2,h3))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h2 leftof h3
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h2,h3).
%~ kifm=nesc(leftof(h2,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).
/*~
%~ kifi=leftof(h3,h4).
%~ kifm=nesc(leftof(h3,h4)).
%~ kifm=nesc(leftof(h3,h4)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h3,h4))
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_01.pl:27
%~ debugm(user,show_success(user,user:ain(clif(leftof(h3,h4))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h3 leftof h4
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h3,h4).
%~ kifm=nesc(leftof(h3,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).

% makes the KB non-monotonic
/*~
%~ kifi=leftof(h4,h5).
%~ kifm=nesc(leftof(h4,h5)).
%~ kifm=nesc(leftof(h4,h5)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h4,h5))
%~ debugm(user,show_success(user,user:ain(clif(leftof(h4,h5))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h4 leftof h5
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h4,h5).
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_01.pl:28
%~ kifm=nesc(leftof(h4,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)).
.

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

% makes the KB non-monotonic
:- set_kif_option(qualify_modality,false).
% this should cause h1-h5 to become houses

/*~
~*/

% this should cause h1-h5 to become houses

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

% intractive_test/1 means only run if interactive
/*~
%~ kifm = ( leftof(House_Leftof,House_Leftof3) =>
%~          house(House_Leftof)&house(House_Leftof3)).
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_01.pl:35
%~ kifm = ( leftof(House_Leftof8,House_Leftof9) =>
%~          house(House_Leftof8)&house(House_Leftof9)).
%~ kif_to_boxlog_attvars2 = =>(leftof('$VAR'('House_Leftof8'),'$VAR'('House_Leftof9')),and(house('$VAR'('House_Leftof8')),house('$VAR'('House_Leftof9'))))
%~ debugm(user,show_success(user,user:ain(clif((leftof(_1213770,_1213792)=>house(_1213770)&house(_1213792)))))).



=======================================================
=>(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 "
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifm = ( leftof(House_Leftof,House_Leftof3) =>
%~          house(House_Leftof)&house(House_Leftof3)).
%~ 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))).
.

============================================
%~ kifm=(leftof(H1,H2)=>house(H1)&house(H2)).
%~ 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)).
.

~*/

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

% mpred_test/1 each become a Junit test that must succeed
/*~
%~ message_hook(
%~    error(existence_error(procedure,interactive_test/1),context(system:catch/3,Context_Kw)),
%~    error,
%~    [ '~q/~w: '-[catch,3],
%~      'Unknown procedure: ~q'-[interactive_test/1]]).
catch/3: Unknown procedure: interactive_test/1
ERROR: catch/3: Unknown procedure: interactive_test/1
%~ message_hook(
%~    goal_failed(directive,user:interactive_test(listing(kif_show))),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 user : interactive_test(listing(kif_show))]]).
Goal (directive) failed: user:interactive_test(listing(kif_show))
Warning: Goal (directive) failed: user:interactive_test(listing(kif_show))
~*/

% mpred_test/1 each become a Junit test that
goal=user:listing(nesc).
time=0.0033893585205078125.
passed=passed=info(why_was_true(user:listing(nesc)))
no_proof_for(listing(nesc)).

:- dynamic nesc/1.
:- multifile nesc/1.
:- public nesc/1.
:- module_transparent nesc/1.

nesc(A) :-
    zwc,
    nesc_lc(baseKB, A).
nesc(leftof(h1, h2)).
nesc(leftof(h2, h3)).
nesc(leftof(h3, h4)).
nesc(leftof(h4, h5)).
nesc(house(h1)).
nesc(house(h2)).
nesc(house(h3)).
nesc(house(h4)).
nesc(house(h5)).

:- public kbe:nesc/2.
:- module_transparent kbe:nesc/2.

kbe:nesc(_M, isNamed(X, Y)) :-
    !,
    isNamed_impl(X, Y),
    !.
kbe:nesc(A, B) :-
    swc,
    first_of([ (loop_check_term(A:proven_tru(B), info(A:proven_tru(B), 'common_logic_exists.pl':318), fail), nop(nrlc0(call(call, \+A:proven_neg(B))))),
               (A:proven_helper(B), \+A:proven_helper(~B)),
               A:skolem_tru(B)
             ]).

no_proof_for(listing(nesc)).

no_proof_for(listing(nesc)).

result=passed.

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

Package: logicmoo.base.fol.fiveof

Results

Duration0.0 sec
Tests1
Failures0

Tests

logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_01

Test case:logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_01@Test_0002_Line_0000__H1_in_user: user:house(h1)
Outcome:Passed
Duration:0.0 sec
FailedNone
None
Stderr
name=Test_0002_Line_0000__H1_in_user
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.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@2/back_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_type_01.pl']")

```
Warning: import/1: parser_lexical_plkb:(cyc_lex/1) is not exported (still imported into system)
%~ 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.
%~ skipped(blocks_on_input,prolog).
running('/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_01.pl'),
%~ /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_utils/prolog/logicmoo_test_header.pl:93
%~ this_test_might_need((:-expects_dialect(pfc))).
%~ this_test_might_need((:-use_module(library(logicmoo_plarkc)))).

:- expects_dialect(clif).

/*~
~*/


:- kif_compile.

% makes the KB monotonic
/*~
~*/

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

% There are five houses in a row.
/*~
~*/

% There are five houses in a row.
nesc(leftof(h1, h2)).
/*~
~*/

leftof(h2, h3).
/*~
%~ kifi=leftof(h2,h3).
%~ kifm=nesc(leftof(h2,h3)).
%~ kifm=nesc(leftof(h2,h3)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h2,h3))
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_01.pl:26
%~ debugm(user,show_success(user,user:ain(clif(leftof(h2,h3))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h2 leftof h3
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h2,h3).
%~ kifm=nesc(leftof(h2,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).
/*~
%~ kifi=leftof(h3,h4).
%~ kifm=nesc(leftof(h3,h4)).
%~ kifm=nesc(leftof(h3,h4)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h3,h4))
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_01.pl:27
%~ debugm(user,show_success(user,user:ain(clif(leftof(h3,h4))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h3 leftof h4
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h3,h4).
%~ kifm=nesc(leftof(h3,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).

% makes the KB non-monotonic
/*~
%~ kifi=leftof(h4,h5).
%~ kifm=nesc(leftof(h4,h5)).
%~ kifm=nesc(leftof(h4,h5)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h4,h5))
%~ debugm(user,show_success(user,user:ain(clif(leftof(h4,h5))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h4 leftof h5
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h4,h5).
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_01.pl:28
%~ kifm=nesc(leftof(h4,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)).
.

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

% makes the KB non-monotonic
:- set_kif_option(qualify_modality,false).
% this should cause h1-h5 to become houses

/*~
~*/

% this should cause h1-h5 to become houses

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

% intractive_test/1 means only run if interactive
/*~
%~ kifm = ( leftof(House_Leftof,House_Leftof3) =>
%~          house(House_Leftof)&house(House_Leftof3)).
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_01.pl:35
%~ kifm = ( leftof(House_Leftof8,House_Leftof9) =>
%~          house(House_Leftof8)&house(House_Leftof9)).
%~ kif_to_boxlog_attvars2 = =>(leftof('$VAR'('House_Leftof8'),'$VAR'('House_Leftof9')),and(house('$VAR'('House_Leftof8')),house('$VAR'('House_Leftof9'))))
%~ debugm(user,show_success(user,user:ain(clif((leftof(_1213770,_1213792)=>house(_1213770)&house(_1213792)))))).



=======================================================
=>(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 "
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifm = ( leftof(House_Leftof,House_Leftof3) =>
%~          house(House_Leftof)&house(House_Leftof3)).
%~ 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))).
.

============================================
%~ kifm=(leftof(H1,H2)=>house(H1)&house(H2)).
%~ 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)).
.

~*/

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

% mpred_test/1 each become a Junit test that must succeed
/*~
%~ message_hook(
%~    error(existence_error(procedure,interactive_test/1),context(system:catch/3,Context_Kw)),
%~    error,
%~    [ '~q/~w: '-[catch,3],
%~      'Unknown procedure: ~q'-[interactive_test/1]]).
catch/3: Unknown procedure: interactive_test/1
ERROR: catch/3: Unknown procedure: interactive_test/1
%~ message_hook(
%~    goal_failed(directive,user:interactive_test(listing(kif_show))),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 user : interactive_test(listing(kif_show))]]).
Goal (directive) failed: user:interactive_test(listing(kif_show))
Warning: Goal (directive) failed: user:interactive_test(listing(kif_show))
~*/

% mpred_test/1 each become a Junit test that
goal=user:house(h1).
time=0.0007715225219726562.
passed=passed=info(why_was_true(user:house(h1)))
no_proof_for(house(h1)).

no_proof_for(house(h1)).

no_proof_for(house(h1)).

result=passed.

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

Package: logicmoo.base.fol.fiveof

Results

Duration0.0 sec
Tests1
Failures0

Tests

logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_01

Test case:logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_01@Test_0003_Line_0000__H2_in_user: user:house(h2)
Outcome:Passed
Duration:0.0 sec
FailedNone
None
Stderr
name=Test_0003_Line_0000__H2_in_user
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.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@2/back_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_type_01.pl']")

```
Warning: import/1: parser_lexical_plkb:(cyc_lex/1) is not exported (still imported into system)
%~ 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.
%~ skipped(blocks_on_input,prolog).
running('/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_01.pl'),
%~ /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_utils/prolog/logicmoo_test_header.pl:93
%~ this_test_might_need((:-expects_dialect(pfc))).
%~ this_test_might_need((:-use_module(library(logicmoo_plarkc)))).

:- expects_dialect(clif).

/*~
~*/


:- kif_compile.

% makes the KB monotonic
/*~
~*/

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

% There are five houses in a row.
/*~
~*/

% There are five houses in a row.
nesc(leftof(h1, h2)).
/*~
~*/

leftof(h2, h3).
/*~
%~ kifi=leftof(h2,h3).
%~ kifm=nesc(leftof(h2,h3)).
%~ kifm=nesc(leftof(h2,h3)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h2,h3))
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_01.pl:26
%~ debugm(user,show_success(user,user:ain(clif(leftof(h2,h3))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h2 leftof h3
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h2,h3).
%~ kifm=nesc(leftof(h2,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).
/*~
%~ kifi=leftof(h3,h4).
%~ kifm=nesc(leftof(h3,h4)).
%~ kifm=nesc(leftof(h3,h4)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h3,h4))
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_01.pl:27
%~ debugm(user,show_success(user,user:ain(clif(leftof(h3,h4))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h3 leftof h4
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h3,h4).
%~ kifm=nesc(leftof(h3,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).

% makes the KB non-monotonic
/*~
%~ kifi=leftof(h4,h5).
%~ kifm=nesc(leftof(h4,h5)).
%~ kifm=nesc(leftof(h4,h5)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h4,h5))
%~ debugm(user,show_success(user,user:ain(clif(leftof(h4,h5))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h4 leftof h5
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h4,h5).
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_01.pl:28
%~ kifm=nesc(leftof(h4,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)).
.

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

% makes the KB non-monotonic
:- set_kif_option(qualify_modality,false).
% this should cause h1-h5 to become houses

/*~
~*/

% this should cause h1-h5 to become houses

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

% intractive_test/1 means only run if interactive
/*~
%~ kifm = ( leftof(House_Leftof,House_Leftof3) =>
%~          house(House_Leftof)&house(House_Leftof3)).
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_01.pl:35
%~ kifm = ( leftof(House_Leftof8,House_Leftof9) =>
%~          house(House_Leftof8)&house(House_Leftof9)).
%~ kif_to_boxlog_attvars2 = =>(leftof('$VAR'('House_Leftof8'),'$VAR'('House_Leftof9')),and(house('$VAR'('House_Leftof8')),house('$VAR'('House_Leftof9'))))
%~ debugm(user,show_success(user,user:ain(clif((leftof(_1213770,_1213792)=>house(_1213770)&house(_1213792)))))).



=======================================================
=>(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 "
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifm = ( leftof(House_Leftof,House_Leftof3) =>
%~          house(House_Leftof)&house(House_Leftof3)).
%~ 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))).
.

============================================
%~ kifm=(leftof(H1,H2)=>house(H1)&house(H2)).
%~ 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)).
.

~*/

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

% mpred_test/1 each become a Junit test that must succeed
/*~
%~ message_hook(
%~    error(existence_error(procedure,interactive_test/1),context(system:catch/3,Context_Kw)),
%~    error,
%~    [ '~q/~w: '-[catch,3],
%~      'Unknown procedure: ~q'-[interactive_test/1]]).
catch/3: Unknown procedure: interactive_test/1
ERROR: catch/3: Unknown procedure: interactive_test/1
%~ message_hook(
%~    goal_failed(directive,user:interactive_test(listing(kif_show))),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 user : interactive_test(listing(kif_show))]]).
Goal (directive) failed: user:interactive_test(listing(kif_show))
Warning: Goal (directive) failed: user:interactive_test(listing(kif_show))
~*/

% mpred_test/1 each become a Junit test that
goal=user:house(h2).
time=0.0006945133209228516.
passed=passed=info(why_was_true(user:house(h2)))
no_proof_for(house(h2)).

no_proof_for(house(h2)).

no_proof_for(house(h2)).

result=passed.

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

Package: logicmoo.base.fol.fiveof

Results

Duration0.0 sec
Tests1
Failures0

Tests

logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_01

Test case:logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_01@Test_0004_Line_0000__H3_in_user: user:house(h3)
Outcome:Passed
Duration:0.0 sec
FailedNone
None
Stderr
name=Test_0004_Line_0000__H3_in_user
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.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@2/back_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_type_01.pl']")

```
Warning: import/1: parser_lexical_plkb:(cyc_lex/1) is not exported (still imported into system)
%~ 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.
%~ skipped(blocks_on_input,prolog).
running('/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_01.pl'),
%~ /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_utils/prolog/logicmoo_test_header.pl:93
%~ this_test_might_need((:-expects_dialect(pfc))).
%~ this_test_might_need((:-use_module(library(logicmoo_plarkc)))).

:- expects_dialect(clif).

/*~
~*/


:- kif_compile.

% makes the KB monotonic
/*~
~*/

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

% There are five houses in a row.
/*~
~*/

% There are five houses in a row.
nesc(leftof(h1, h2)).
/*~
~*/

leftof(h2, h3).
/*~
%~ kifi=leftof(h2,h3).
%~ kifm=nesc(leftof(h2,h3)).
%~ kifm=nesc(leftof(h2,h3)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h2,h3))
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_01.pl:26
%~ debugm(user,show_success(user,user:ain(clif(leftof(h2,h3))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h2 leftof h3
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h2,h3).
%~ kifm=nesc(leftof(h2,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).
/*~
%~ kifi=leftof(h3,h4).
%~ kifm=nesc(leftof(h3,h4)).
%~ kifm=nesc(leftof(h3,h4)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h3,h4))
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_01.pl:27
%~ debugm(user,show_success(user,user:ain(clif(leftof(h3,h4))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h3 leftof h4
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h3,h4).
%~ kifm=nesc(leftof(h3,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).

% makes the KB non-monotonic
/*~
%~ kifi=leftof(h4,h5).
%~ kifm=nesc(leftof(h4,h5)).
%~ kifm=nesc(leftof(h4,h5)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h4,h5))
%~ debugm(user,show_success(user,user:ain(clif(leftof(h4,h5))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h4 leftof h5
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h4,h5).
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_01.pl:28
%~ kifm=nesc(leftof(h4,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)).
.

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

% makes the KB non-monotonic
:- set_kif_option(qualify_modality,false).
% this should cause h1-h5 to become houses

/*~
~*/

% this should cause h1-h5 to become houses

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

% intractive_test/1 means only run if interactive
/*~
%~ kifm = ( leftof(House_Leftof,House_Leftof3) =>
%~          house(House_Leftof)&house(House_Leftof3)).
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_01.pl:35
%~ kifm = ( leftof(House_Leftof8,House_Leftof9) =>
%~          house(House_Leftof8)&house(House_Leftof9)).
%~ kif_to_boxlog_attvars2 = =>(leftof('$VAR'('House_Leftof8'),'$VAR'('House_Leftof9')),and(house('$VAR'('House_Leftof8')),house('$VAR'('House_Leftof9'))))
%~ debugm(user,show_success(user,user:ain(clif((leftof(_1213770,_1213792)=>house(_1213770)&house(_1213792)))))).



=======================================================
=>(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 "
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifm = ( leftof(House_Leftof,House_Leftof3) =>
%~          house(House_Leftof)&house(House_Leftof3)).
%~ 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))).
.

============================================
%~ kifm=(leftof(H1,H2)=>house(H1)&house(H2)).
%~ 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)).
.

~*/

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

% mpred_test/1 each become a Junit test that must succeed
/*~
%~ message_hook(
%~    error(existence_error(procedure,interactive_test/1),context(system:catch/3,Context_Kw)),
%~    error,
%~    [ '~q/~w: '-[catch,3],
%~      'Unknown procedure: ~q'-[interactive_test/1]]).
catch/3: Unknown procedure: interactive_test/1
ERROR: catch/3: Unknown procedure: interactive_test/1
%~ message_hook(
%~    goal_failed(directive,user:interactive_test(listing(kif_show))),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 user : interactive_test(listing(kif_show))]]).
Goal (directive) failed: user:interactive_test(listing(kif_show))
Warning: Goal (directive) failed: user:interactive_test(listing(kif_show))
~*/

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

% ensure our rule worked
/*~
%~ ?-mpred_test("Test_0001_Line_0000__Nesc_in_user",user:listing(nesc)).
:- dynamic nesc/1.
:- multifile nesc/1.
:- public nesc/1.
:- module_transparent nesc/1.

nesc(A) :-
    zwc,
    nesc_lc(baseKB, A).
nesc(leftof(h1, h2)).
nesc(leftof(h2, h3)).
nesc(leftof(h3, h4)).
nesc(leftof(h4, h5)).
nesc(house(h1)).
nesc(house(h2)).
nesc(house(h3)).
nesc(house(h4)).
nesc(house(h5)).

:- public kbe:nesc/2.
:- module_transparent kbe:nesc/2.

kbe:nesc(_M, isNamed(X, Y)) :-
    !,
    isNamed_impl(X, Y),
    !.
kbe:nesc(A, B) :-
    swc,
    first_of([ (loop_check_term(A:proven_tru(B), info(A:proven_tru(B), 'common_logic_exists.pl':318), fail), nop(nrlc0(call(call, \+A:proven_neg(B))))),
               (A:proven_helper(B), \+A:proven_helper(~B)),
               A:skolem_tru(B)
             ]).

passed=info(why_was_true(user:listing(nesc)))
no_proof_for(listing(nesc)).

:- dynamic nesc/1.
:- multifile nesc/1.
:- public nesc/1.
:- module_transparent nesc/1.

nesc(A) :-
    zwc,
    nesc_lc(baseKB, A).
nesc(leftof(h1, h2)).
nesc(leftof(h2, h3)).
nesc(leftof(h3, h4)).
nesc(leftof(h4, h5)).
nesc(house(h1)).
nesc(house(h2)).
nesc(house(h3)).
nesc(house(h4)).
nesc(house(h5)).

:- public kbe:nesc/2.
:- module_transparent kbe:nesc/2.

kbe:nesc(_M, isNamed(X, Y)) :-
    !,
    isNamed_impl(X, Y),
    !.
kbe:nesc(A, B) :-
    swc,
    first_of([ (loop_check_term(A:proven_tru(B), info(A:proven_tru(B), 'common_logic_exists.pl':318), fail), nop(nrlc0(call(call, \+A:proven_neg(B))))),
               (A:proven_helper(B), \+A:proven_helper(~B)),
               A:skolem_tru(B)
             ]).

no_proof_for(listing(nesc)).

no_proof_for(listing(nesc)).

name='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_01-Test_0001_Line_0000__Nesc_in_user'.
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.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@2/test_results/jenkins/Report-logicmoo-base-fol-fiveof-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_fol_fiveof_FIVE_LEFTOF_TYPE_01_Test_0001_Line_0000_Nesc_in_user-junit.xml
~*/

% ensure our rule worked
:- mpred_test((house(h1))).
/*~
%~ ?-mpred_test("Test_0002_Line_0000__H1_in_user",user:house(h1)).
passed=info(why_was_true(user:house(h1)))
no_proof_for(house(h1)).

no_proof_for(house(h1)).

no_proof_for(house(h1)).

name='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_01-Test_0002_Line_0000__H1_in_user'.
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.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@2/test_results/jenkins/Report-logicmoo-base-fol-fiveof-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_fol_fiveof_FIVE_LEFTOF_TYPE_01_Test_0002_Line_0000_H1_in_user-junit.xml
~*/

:- mpred_test((house(h2))).
/*~
%~ ?-mpred_test("Test_0003_Line_0000__H2_in_user",user:house(h2)).
passed=info(why_was_true(user:house(h2)))
no_proof_for(house(h2)).

no_proof_for(house(h2)).

no_proof_for(house(h2)).

name='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_01-Test_0003_Line_0000__H2_in_user'.
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.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@2/test_results/jenkins/Report-logicmoo-base-fol-fiveof-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_fol_fiveof_FIVE_LEFTOF_TYPE_01_Test_0003_Line_0000_H2_in_user-junit.xml
~*/

:- mpred_test((house(h3))).
/*~
%~ ?
goal=user:house(h3).
time=0.0006201267242431641.
passed=passed=info(why_was_true(user:house(h3)))
no_proof_for(house(h3)).

no_proof_for(house(h3)).

no_proof_for(house(h3)).

result=passed.

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

Package: logicmoo.base.fol.fiveof

Results

Duration0.0 sec
Tests1
Failures0

Tests

logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_01

Test case:logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_01@Test_0005_Line_0000__H4_in_user: user:house(h4)
Outcome:Passed
Duration:0.0 sec
FailedNone
None
Stderr
name=Test_0005_Line_0000__H4_in_user
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.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@2/back_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_type_01.pl']")

```
Warning: import/1: parser_lexical_plkb:(cyc_lex/1) is not exported (still imported into system)
%~ 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.
%~ skipped(blocks_on_input,prolog).
running('/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_01.pl'),
%~ /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_utils/prolog/logicmoo_test_header.pl:93
%~ this_test_might_need((:-expects_dialect(pfc))).
%~ this_test_might_need((:-use_module(library(logicmoo_plarkc)))).

:- expects_dialect(clif).

/*~
~*/


:- kif_compile.

% makes the KB monotonic
/*~
~*/

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

% There are five houses in a row.
/*~
~*/

% There are five houses in a row.
nesc(leftof(h1, h2)).
/*~
~*/

leftof(h2, h3).
/*~
%~ kifi=leftof(h2,h3).
%~ kifm=nesc(leftof(h2,h3)).
%~ kifm=nesc(leftof(h2,h3)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h2,h3))
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_01.pl:26
%~ debugm(user,show_success(user,user:ain(clif(leftof(h2,h3))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h2 leftof h3
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h2,h3).
%~ kifm=nesc(leftof(h2,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).
/*~
%~ kifi=leftof(h3,h4).
%~ kifm=nesc(leftof(h3,h4)).
%~ kifm=nesc(leftof(h3,h4)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h3,h4))
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_01.pl:27
%~ debugm(user,show_success(user,user:ain(clif(leftof(h3,h4))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h3 leftof h4
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h3,h4).
%~ kifm=nesc(leftof(h3,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).

% makes the KB non-monotonic
/*~
%~ kifi=leftof(h4,h5).
%~ kifm=nesc(leftof(h4,h5)).
%~ kifm=nesc(leftof(h4,h5)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h4,h5))
%~ debugm(user,show_success(user,user:ain(clif(leftof(h4,h5))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h4 leftof h5
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h4,h5).
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_01.pl:28
%~ kifm=nesc(leftof(h4,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)).
.

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

% makes the KB non-monotonic
:- set_kif_option(qualify_modality,false).
% this should cause h1-h5 to become houses

/*~
~*/

% this should cause h1-h5 to become houses

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

% intractive_test/1 means only run if interactive
/*~
%~ kifm = ( leftof(House_Leftof,House_Leftof3) =>
%~          house(House_Leftof)&house(House_Leftof3)).
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_01.pl:35
%~ kifm = ( leftof(House_Leftof8,House_Leftof9) =>
%~          house(House_Leftof8)&house(House_Leftof9)).
%~ kif_to_boxlog_attvars2 = =>(leftof('$VAR'('House_Leftof8'),'$VAR'('House_Leftof9')),and(house('$VAR'('House_Leftof8')),house('$VAR'('House_Leftof9'))))
%~ debugm(user,show_success(user,user:ain(clif((leftof(_1213770,_1213792)=>house(_1213770)&house(_1213792)))))).



=======================================================
=>(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 "
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifm = ( leftof(House_Leftof,House_Leftof3) =>
%~          house(House_Leftof)&house(House_Leftof3)).
%~ 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))).
.

============================================
%~ kifm=(leftof(H1,H2)=>house(H1)&house(H2)).
%~ 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)).
.

~*/

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

% mpred_test/1 each become a Junit test that must succeed
/*~
%~ message_hook(
%~    error(existence_error(procedure,interactive_test/1),context(system:catch/3,Context_Kw)),
%~    error,
%~    [ '~q/~w: '-[catch,3],
%~      'Unknown procedure: ~q'-[interactive_test/1]]).
catch/3: Unknown procedure: interactive_test/1
ERROR: catch/3: Unknown procedure: interactive_test/1
%~ message_hook(
%~    goal_failed(directive,user:interactive_test(listing(kif_show))),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 user : interactive_test(listing(kif_show))]]).
Goal (directive) failed: user:interactive_test(listing(kif_show))
Warning: Goal (directive) failed: user:interactive_test(listing(kif_show))
~*/

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

% ensure our rule worked
/*~
%~ ?-mpred_test("Test_0001_Line_0000__Nesc_in_user",user:listing(nesc)).
:- dynamic nesc/1.
:- multifile nesc/1.
:- public nesc/1.
:- module_transparent nesc/1.

nesc(A) :-
    zwc,
    nesc_lc(baseKB, A).
nesc(leftof(h1, h2)).
nesc(leftof(h2, h3)).
nesc(leftof(h3, h4)).
nesc(leftof(h4, h5)).
nesc(house(h1)).
nesc(house(h2)).
nesc(house(h3)).
nesc(house(h4)).
nesc(house(h5)).

:- public kbe:nesc/2.
:- module_transparent kbe:nesc/2.

kbe:nesc(_M, isNamed(X, Y)) :-
    !,
    isNamed_impl(X, Y),
    !.
kbe:nesc(A, B) :-
    swc,
    first_of([ (loop_check_term(A:proven_tru(B), info(A:proven_tru(B), 'common_logic_exists.pl':318), fail), nop(nrlc0(call(call, \+A:proven_neg(B))))),
               (A:proven_helper(B), \+A:proven_helper(~B)),
               A:skolem_tru(B)
             ]).

passed=info(why_was_true(user:listing(nesc)))
no_proof_for(listing(nesc)).

:- dynamic nesc/1.
:- multifile nesc/1.
:- public nesc/1.
:- module_transparent nesc/1.

nesc(A) :-
    zwc,
    nesc_lc(baseKB, A).
nesc(leftof(h1, h2)).
nesc(leftof(h2, h3)).
nesc(leftof(h3, h4)).
nesc(leftof(h4, h5)).
nesc(house(h1)).
nesc(house(h2)).
nesc(house(h3)).
nesc(house(h4)).
nesc(house(h5)).

:- public kbe:nesc/2.
:- module_transparent kbe:nesc/2.

kbe:nesc(_M, isNamed(X, Y)) :-
    !,
    isNamed_impl(X, Y),
    !.
kbe:nesc(A, B) :-
    swc,
    first_of([ (loop_check_term(A:proven_tru(B), info(A:proven_tru(B), 'common_logic_exists.pl':318), fail), nop(nrlc0(call(call, \+A:proven_neg(B))))),
               (A:proven_helper(B), \+A:proven_helper(~B)),
               A:skolem_tru(B)
             ]).

no_proof_for(listing(nesc)).

no_proof_for(listing(nesc)).

name='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_01-Test_0001_Line_0000__Nesc_in_user'.
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.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@2/test_results/jenkins/Report-logicmoo-base-fol-fiveof-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_fol_fiveof_FIVE_LEFTOF_TYPE_01_Test_0001_Line_0000_Nesc_in_user-junit.xml
~*/

% ensure our rule worked
:- mpred_test((house(h1))).
/*~
%~ ?-mpred_test("Test_0002_Line_0000__H1_in_user",user:house(h1)).
passed=info(why_was_true(user:house(h1)))
no_proof_for(house(h1)).

no_proof_for(house(h1)).

no_proof_for(house(h1)).

name='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_01-Test_0002_Line_0000__H1_in_user'.
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.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@2/test_results/jenkins/Report-logicmoo-base-fol-fiveof-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_fol_fiveof_FIVE_LEFTOF_TYPE_01_Test_0002_Line_0000_H1_in_user-junit.xml
~*/

:- mpred_test((house(h2))).
/*~
%~ ?-mpred_test("Test_0003_Line_0000__H2_in_user",user:house(h2)).
passed=info(why_was_true(user:house(h2)))
no_proof_for(house(h2)).

no_proof_for(house(h2)).

no_proof_for(house(h2)).

name='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_01-Test_0003_Line_0000__H2_in_user'.
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.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@2/test_results/jenkins/Report-logicmoo-base-fol-fiveof-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_fol_fiveof_FIVE_LEFTOF_TYPE_01_Test_0003_Line_0000_H2_in_user-junit.xml
~*/

:- mpred_test((house(h3))).
/*~
%~ ?
goal=user:house(h4).
time=0.0011391639709472656.
passed=passed=info(why_was_true(user:house(h4)))
no_proof_for(house(h4)).

no_proof_for(house(h4)).

no_proof_for(house(h4)).

result=passed.

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

Package: logicmoo.base.fol.fiveof

Results

Duration0.0 sec
Tests1
Failures0

Tests

logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_01

Test case:logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_01@Test_0006_Line_0000__H5_in_user: user:house(h5)
Outcome:Passed
Duration:0.0 sec
FailedNone
None
Stderr
name=Test_0006_Line_0000__H5_in_user
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.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@2/back_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_type_01.pl']")

```
Warning: import/1: parser_lexical_plkb:(cyc_lex/1) is not exported (still imported into system)
%~ 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.
%~ skipped(blocks_on_input,prolog).
running('/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_01.pl'),
%~ /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_utils/prolog/logicmoo_test_header.pl:93
%~ this_test_might_need((:-expects_dialect(pfc))).
%~ this_test_might_need((:-use_module(library(logicmoo_plarkc)))).

:- expects_dialect(clif).

/*~
~*/


:- kif_compile.

% makes the KB monotonic
/*~
~*/

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

% There are five houses in a row.
/*~
~*/

% There are five houses in a row.
nesc(leftof(h1, h2)).
/*~
~*/

leftof(h2, h3).
/*~
%~ kifi=leftof(h2,h3).
%~ kifm=nesc(leftof(h2,h3)).
%~ kifm=nesc(leftof(h2,h3)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h2,h3))
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_01.pl:26
%~ debugm(user,show_success(user,user:ain(clif(leftof(h2,h3))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h2 leftof h3
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h2,h3).
%~ kifm=nesc(leftof(h2,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).
/*~
%~ kifi=leftof(h3,h4).
%~ kifm=nesc(leftof(h3,h4)).
%~ kifm=nesc(leftof(h3,h4)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h3,h4))
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_01.pl:27
%~ debugm(user,show_success(user,user:ain(clif(leftof(h3,h4))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h3 leftof h4
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h3,h4).
%~ kifm=nesc(leftof(h3,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).

% makes the KB non-monotonic
/*~
%~ kifi=leftof(h4,h5).
%~ kifm=nesc(leftof(h4,h5)).
%~ kifm=nesc(leftof(h4,h5)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h4,h5))
%~ debugm(user,show_success(user,user:ain(clif(leftof(h4,h5))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h4 leftof h5
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h4,h5).
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_01.pl:28
%~ kifm=nesc(leftof(h4,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)).
.

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

% makes the KB non-monotonic
:- set_kif_option(qualify_modality,false).
% this should cause h1-h5 to become houses

/*~
~*/

% this should cause h1-h5 to become houses

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

% intractive_test/1 means only run if interactive
/*~
%~ kifm = ( leftof(House_Leftof,House_Leftof3) =>
%~          house(House_Leftof)&house(House_Leftof3)).
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_01.pl:35
%~ kifm = ( leftof(House_Leftof8,House_Leftof9) =>
%~          house(House_Leftof8)&house(House_Leftof9)).
%~ kif_to_boxlog_attvars2 = =>(leftof('$VAR'('House_Leftof8'),'$VAR'('House_Leftof9')),and(house('$VAR'('House_Leftof8')),house('$VAR'('House_Leftof9'))))
%~ debugm(user,show_success(user,user:ain(clif((leftof(_1213770,_1213792)=>house(_1213770)&house(_1213792)))))).



=======================================================
=>(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 "
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifm = ( leftof(House_Leftof,House_Leftof3) =>
%~          house(House_Leftof)&house(House_Leftof3)).
%~ 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))).
.

============================================
%~ kifm=(leftof(H1,H2)=>house(H1)&house(H2)).
%~ 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)).
.

~*/

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

% mpred_test/1 each become a Junit test that must succeed
/*~
%~ message_hook(
%~    error(existence_error(procedure,interactive_test/1),context(system:catch/3,Context_Kw)),
%~    error,
%~    [ '~q/~w: '-[catch,3],
%~      'Unknown procedure: ~q'-[interactive_test/1]]).
catch/3: Unknown procedure: interactive_test/1
ERROR: catch/3: Unknown procedure: interactive_test/1
%~ message_hook(
%~    goal_failed(directive,user:interactive_test(listing(kif_show))),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 user : interactive_test(listing(kif_show))]]).
Goal (directive) failed: user:interactive_test(listing(kif_show))
Warning: Goal (directive) failed: user:interactive_test(listing(kif_show))
~*/

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

% ensure our rule worked
/*~
%~ ?-mpred_test("Test_0001_Line_0000__Nesc_in_user",user:listing(nesc)).
:- dynamic nesc/1.
:- multifile nesc/1.
:- public nesc/1.
:- module_transparent nesc/1.

nesc(A) :-
    zwc,
    nesc_lc(baseKB, A).
nesc(leftof(h1, h2)).
nesc(leftof(h2, h3)).
nesc(leftof(h3, h4)).
nesc(leftof(h4, h5)).
nesc(house(h1)).
nesc(house(h2)).
nesc(house(h3)).
nesc(house(h4)).
nesc(house(h5)).

:- public kbe:nesc/2.
:- module_transparent kbe:nesc/2.

kbe:nesc(_M, isNamed(X, Y)) :-
    !,
    isNamed_impl(X, Y),
    !.
kbe:nesc(A, B) :-
    swc,
    first_of([ (loop_check_term(A:proven_tru(B), info(A:proven_tru(B), 'common_logic_exists.pl':318), fail), nop(nrlc0(call(call, \+A:proven_neg(B))))),
               (A:proven_helper(B), \+A:proven_helper(~B)),
               A:skolem_tru(B)
             ]).

passed=info(why_was_true(user:listing(nesc)))
no_proof_for(listing(nesc)).

:- dynamic nesc/1.
:- multifile nesc/1.
:- public nesc/1.
:- module_transparent nesc/1.

nesc(A) :-
    zwc,
    nesc_lc(baseKB, A).
nesc(leftof(h1, h2)).
nesc(leftof(h2, h3)).
nesc(leftof(h3, h4)).
nesc(leftof(h4, h5)).
nesc(house(h1)).
nesc(house(h2)).
nesc(house(h3)).
nesc(house(h4)).
nesc(house(h5)).

:- public kbe:nesc/2.
:- module_transparent kbe:nesc/2.

kbe:nesc(_M, isNamed(X, Y)) :-
    !,
    isNamed_impl(X, Y),
    !.
kbe:nesc(A, B) :-
    swc,
    first_of([ (loop_check_term(A:proven_tru(B), info(A:proven_tru(B), 'common_logic_exists.pl':318), fail), nop(nrlc0(call(call, \+A:proven_neg(B))))),
               (A:proven_helper(B), \+A:proven_helper(~B)),
               A:skolem_tru(B)
             ]).

no_proof_for(listing(nesc)).

no_proof_for(listing(nesc)).

name='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_01-Test_0001_Line_0000__Nesc_in_user'.
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.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@2/test_results/jenkins/Report-logicmoo-base-fol-fiveof-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_fol_fiveof_FIVE_LEFTOF_TYPE_01_Test_0001_Line_0000_Nesc_in_user-junit.xml
~*/

% ensure our rule worked
:- mpred_test((house(h1))).
/*~
%~ ?-mpred_test("Test_0002_Line_0000__H1_in_user",user:house(h1)).
passed=info(why_was_true(user:house(h1)))
no_proof_for(house(h1)).

no_proof_for(house(h1)).

no_proof_for(house(h1)).

name='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_01-Test_0002_Line_0000__H1_in_user'.
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.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@2/test_results/jenkins/Report-logicmoo-base-fol-fiveof-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_fol_fiveof_FIVE_LEFTOF_TYPE_01_Test_0002_Line_0000_H1_in_user-junit.xml
~*/

:- mpred_test((house(h2))).
/*~
%~ ?-mpred_test("Test_0003_Line_0000__H2_in_user",user:house(h2)).
passed=info(why_was_true(user:house(h2)))
no_proof_for(house(h2)).

no_proof_for(house(h2)).

no_proof_for(house(h2)).

name='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_01-Test_0003_Line_0000__H2_in_user'.
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.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@2/test_results/jenkins/Report-logicmoo-base-fol-fiveof-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_fol_fiveof_FIVE_LEFTOF_TYPE_01_Test_0003_Line_0000_H2_in_user-junit.xml
~*/

:- mpred_test((house(h3))).
/*~
%~ ?
goal=user:house(h5).
time=0.0010228157043457031.
passed=passed=info(why_was_true(user:house(h5)))
no_proof_for(house(h5)).

no_proof_for(house(h5)).

no_proof_for(house(h5)).

result=passed.

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

Package: logicmoo.base.fol.fiveof

Results

Duration0.0 sec
Tests1
Failures0

Tests

logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_01

Test case:logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_01@Test_0007_Line_0000__False_positive_in_user: user:poss(house(false_positive))
Outcome:Passed
Duration:0.0 sec
FailedNone
None
Stderr
name=Test_0007_Line_0000__False_positive_in_user
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.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@2/back_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_type_01.pl']")

```
Warning: import/1: parser_lexical_plkb:(cyc_lex/1) is not exported (still imported into system)
%~ 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.
%~ skipped(blocks_on_input,prolog).
running('/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_01.pl'),
%~ /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_utils/prolog/logicmoo_test_header.pl:93
%~ this_test_might_need((:-expects_dialect(pfc))).
%~ this_test_might_need((:-use_module(library(logicmoo_plarkc)))).

:- expects_dialect(clif).

/*~
~*/


:- kif_compile.

% makes the KB monotonic
/*~
~*/

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

% There are five houses in a row.
/*~
~*/

% There are five houses in a row.
nesc(leftof(h1, h2)).
/*~
~*/

leftof(h2, h3).
/*~
%~ kifi=leftof(h2,h3).
%~ kifm=nesc(leftof(h2,h3)).
%~ kifm=nesc(leftof(h2,h3)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h2,h3))
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_01.pl:26
%~ debugm(user,show_success(user,user:ain(clif(leftof(h2,h3))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h2 leftof h3
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h2,h3).
%~ kifm=nesc(leftof(h2,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).
/*~
%~ kifi=leftof(h3,h4).
%~ kifm=nesc(leftof(h3,h4)).
%~ kifm=nesc(leftof(h3,h4)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h3,h4))
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_01.pl:27
%~ debugm(user,show_success(user,user:ain(clif(leftof(h3,h4))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h3 leftof h4
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h3,h4).
%~ kifm=nesc(leftof(h3,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).

% makes the KB non-monotonic
/*~
%~ kifi=leftof(h4,h5).
%~ kifm=nesc(leftof(h4,h5)).
%~ kifm=nesc(leftof(h4,h5)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h4,h5))
%~ debugm(user,show_success(user,user:ain(clif(leftof(h4,h5))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h4 leftof h5
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h4,h5).
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_01.pl:28
%~ kifm=nesc(leftof(h4,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)).
.

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

% makes the KB non-monotonic
:- set_kif_option(qualify_modality,false).
% this should cause h1-h5 to become houses

/*~
~*/

% this should cause h1-h5 to become houses

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

% intractive_test/1 means only run if interactive
/*~
%~ kifm = ( leftof(House_Leftof,House_Leftof3) =>
%~          house(House_Leftof)&house(House_Leftof3)).
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_01.pl:35
%~ kifm = ( leftof(House_Leftof8,House_Leftof9) =>
%~          house(House_Leftof8)&house(House_Leftof9)).
%~ kif_to_boxlog_attvars2 = =>(leftof('$VAR'('House_Leftof8'),'$VAR'('House_Leftof9')),and(house('$VAR'('House_Leftof8')),house('$VAR'('House_Leftof9'))))
%~ debugm(user,show_success(user,user:ain(clif((leftof(_1213770,_1213792)=>house(_1213770)&house(_1213792)))))).



=======================================================
=>(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 "
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifm = ( leftof(House_Leftof,House_Leftof3) =>
%~          house(House_Leftof)&house(House_Leftof3)).
%~ 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))).
.

============================================
%~ kifm=(leftof(H1,H2)=>house(H1)&house(H2)).
%~ 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)).
.

~*/

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

% mpred_test/1 each become a Junit test that must succeed
/*~
%~ message_hook(
%~    error(existence_error(procedure,interactive_test/1),context(system:catch/3,Context_Kw)),
%~    error,
%~    [ '~q/~w: '-[catch,3],
%~      'Unknown procedure: ~q'-[interactive_test/1]]).
catch/3: Unknown procedure: interactive_test/1
ERROR: catch/3: Unknown procedure: interactive_test/1
%~ message_hook(
%~    goal_failed(directive,user:interactive_test(listing(kif_show))),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 user : interactive_test(listing(kif_show))]]).
Goal (directive) failed: user:interactive_test(listing(kif_show))
Warning: Goal (directive) failed: user:interactive_test(listing(kif_show))
~*/

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

% ensure our rule worked
/*~
%~ ?-mpred_test("Test_0001_Line_0000__Nesc_in_user",user:listing(nesc)).
:- dynamic nesc/1.
:- multifile nesc/1.
:- public nesc/1.
:- module_transparent nesc/1.

nesc(A) :-
    zwc,
    nesc_lc(baseKB, A).
nesc(leftof(h1, h2)).
nesc(leftof(h2, h3)).
nesc(leftof(h3, h4)).
nesc(leftof(h4, h5)).
nesc(house(h1)).
nesc(house(h2)).
nesc(house(h3)).
nesc(house(h4)).
nesc(house(h5)).

:- public kbe:nesc/2.
:- module_transparent kbe:nesc/2.

kbe:nesc(_M, isNamed(X, Y)) :-
    !,
    isNamed_impl(X, Y),
    !.
kbe:nesc(A, B) :-
    swc,
    first_of([ (loop_check_term(A:proven_tru(B), info(A:proven_tru(B), 'common_logic_exists.pl':318), fail), nop(nrlc0(call(call, \+A:proven_neg(B))))),
               (A:proven_helper(B), \+A:proven_helper(~B)),
               A:skolem_tru(B)
             ]).

passed=info(why_was_true(user:listing(nesc)))
no_proof_for(listing(nesc)).

:- dynamic nesc/1.
:- multifile nesc/1.
:- public nesc/1.
:- module_transparent nesc/1.

nesc(A) :-
    zwc,
    nesc_lc(baseKB, A).
nesc(leftof(h1, h2)).
nesc(leftof(h2, h3)).
nesc(leftof(h3, h4)).
nesc(leftof(h4, h5)).
nesc(house(h1)).
nesc(house(h2)).
nesc(house(h3)).
nesc(house(h4)).
nesc(house(h5)).

:- public kbe:nesc/2.
:- module_transparent kbe:nesc/2.

kbe:nesc(_M, isNamed(X, Y)) :-
    !,
    isNamed_impl(X, Y),
    !.
kbe:nesc(A, B) :-
    swc,
    first_of([ (loop_check_term(A:proven_tru(B), info(A:proven_tru(B), 'common_logic_exists.pl':318), fail), nop(nrlc0(call(call, \+A:proven_neg(B))))),
               (A:proven_helper(B), \+A:proven_helper(~B)),
               A:skolem_tru(B)
             ]).

no_proof_for(listing(nesc)).

no_proof_for(listing(nesc)).

name='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_01-Test_0001_Line_0000__Nesc_in_user'.
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.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@2/test_results/jenkins/Report-logicmoo-base-fol-fiveof-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_fol_fiveof_FIVE_LEFTOF_TYPE_01_Test_0001_Line_0000_Nesc_in_user-junit.xml
~*/

% ensure our rule worked
:- mpred_test((house(h1))).
/*~
%~ ?-mpred_test("Test_0002_Line_0000__H1_in_user",user:house(h1)).
passed=info(why_was_true(user:house(h1)))
no_proof_for(house(h1)).

no_proof_for(house(h1)).

no_proof_for(house(h1)).

name='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_01-Test_0002_Line_0000__H1_in_user'.
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.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@2/test_results/jenkins/Report-logicmoo-base-fol-fiveof-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_fol_fiveof_FIVE_LEFTOF_TYPE_01_Test_0002_Line_0000_H1_in_user-junit.xml
~*/

:- mpred_test((house(h2))).
/*~
%~ ?-mpred_test("Test_0003_Line_0000__H2_in_user",user:house(h2)).
passed=info(why_was_true(user:house(h2)))
no_proof_for(house(h2)).

no_proof_for(house(h2)).

no_proof_for(house(h2)).

name='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_01-Test_0003_Line_0000__H2_in_user'.
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.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@2/test_results/jenkins/Report-logicmoo-base-fol-fiveof-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_fol_fiveof_FIVE_LEFTOF_TYPE_01_Test_0003_Line_0000_H2_in_user-junit.xml
~*/

:- mpred_test((house(h3))).
/*~
%~ ?
goal=user:poss(house(false_positive)).
time=0.0012302398681640625.
passed=passed=info(why_was_true(user:poss(house(false_positive))))
no_proof_for(poss(house(false_positive))).

no_proof_for(poss(house(false_positive))).

no_proof_for(poss(house(false_positive))).

result=passed.

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

Package: logicmoo.base.fol.fiveof

Results

Duration0.0 sec
Tests1
Failures0

Tests

logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_01

Test case:logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_01@Test_0008_Line_0000__naf_False_positive_in_user: user:(\\+nesc(house(false_positive)))
Outcome:Passed
Duration:0.0 sec
FailedNone
None
Stderr
name=Test_0008_Line_0000__naf_False_positive_in_user
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.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@2/back_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_type_01.pl']")

```
Warning: import/1: parser_lexical_plkb:(cyc_lex/1) is not exported (still imported into system)
%~ 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.
%~ skipped(blocks_on_input,prolog).
running('/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_01.pl'),
%~ /var/lib/jenkins/.local/share/swi-prolog/pack/logicmoo_utils/prolog/logicmoo_test_header.pl:93
%~ this_test_might_need((:-expects_dialect(pfc))).
%~ this_test_might_need((:-use_module(library(logicmoo_plarkc)))).

:- expects_dialect(clif).

/*~
~*/


:- kif_compile.

% makes the KB monotonic
/*~
~*/

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

% There are five houses in a row.
/*~
~*/

% There are five houses in a row.
nesc(leftof(h1, h2)).
/*~
~*/

leftof(h2, h3).
/*~
%~ kifi=leftof(h2,h3).
%~ kifm=nesc(leftof(h2,h3)).
%~ kifm=nesc(leftof(h2,h3)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h2,h3))
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_01.pl:26
%~ debugm(user,show_success(user,user:ain(clif(leftof(h2,h3))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h2 leftof h3
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h2,h3).
%~ kifm=nesc(leftof(h2,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).
/*~
%~ kifi=leftof(h3,h4).
%~ kifm=nesc(leftof(h3,h4)).
%~ kifm=nesc(leftof(h3,h4)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h3,h4))
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_01.pl:27
%~ debugm(user,show_success(user,user:ain(clif(leftof(h3,h4))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h3 leftof h4
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h3,h4).
%~ kifm=nesc(leftof(h3,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).

% makes the KB non-monotonic
/*~
%~ kifi=leftof(h4,h5).
%~ kifm=nesc(leftof(h4,h5)).
%~ kifm=nesc(leftof(h4,h5)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h4,h5))
%~ debugm(user,show_success(user,user:ain(clif(leftof(h4,h5))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h4 leftof h5
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h4,h5).
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_01.pl:28
%~ kifm=nesc(leftof(h4,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)).
.

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

% makes the KB non-monotonic
:- set_kif_option(qualify_modality,false).
% this should cause h1-h5 to become houses

/*~
~*/

% this should cause h1-h5 to become houses

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

% intractive_test/1 means only run if interactive
/*~
%~ kifm = ( leftof(House_Leftof,House_Leftof3) =>
%~          house(House_Leftof)&house(House_Leftof3)).
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_01.pl:35
%~ kifm = ( leftof(House_Leftof8,House_Leftof9) =>
%~          house(House_Leftof8)&house(House_Leftof9)).
%~ kif_to_boxlog_attvars2 = =>(leftof('$VAR'('House_Leftof8'),'$VAR'('House_Leftof9')),and(house('$VAR'('House_Leftof8')),house('$VAR'('House_Leftof9'))))
%~ debugm(user,show_success(user,user:ain(clif((leftof(_1213770,_1213792)=>house(_1213770)&house(_1213792)))))).



=======================================================
=>(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 "
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifm = ( leftof(House_Leftof,House_Leftof3) =>
%~          house(House_Leftof)&house(House_Leftof3)).
%~ 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))).
.

============================================
%~ kifm=(leftof(H1,H2)=>house(H1)&house(H2)).
%~ 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)).
.

~*/

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

% mpred_test/1 each become a Junit test that must succeed
/*~
%~ message_hook(
%~    error(existence_error(procedure,interactive_test/1),context(system:catch/3,Context_Kw)),
%~    error,
%~    [ '~q/~w: '-[catch,3],
%~      'Unknown procedure: ~q'-[interactive_test/1]]).
catch/3: Unknown procedure: interactive_test/1
ERROR: catch/3: Unknown procedure: interactive_test/1
%~ message_hook(
%~    goal_failed(directive,user:interactive_test(listing(kif_show))),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 user : interactive_test(listing(kif_show))]]).
Goal (directive) failed: user:interactive_test(listing(kif_show))
Warning: Goal (directive) failed: user:interactive_test(listing(kif_show))
~*/

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

% ensure our rule worked
/*~
%~ ?-mpred_test("Test_0001_Line_0000__Nesc_in_user",user:listing(nesc)).
:- dynamic nesc/1.
:- multifile nesc/1.
:- public nesc/1.
:- module_transparent nesc/1.

nesc(A) :-
    zwc,
    nesc_lc(baseKB, A).
nesc(leftof(h1, h2)).
nesc(leftof(h2, h3)).
nesc(leftof(h3, h4)).
nesc(leftof(h4, h5)).
nesc(house(h1)).
nesc(house(h2)).
nesc(house(h3)).
nesc(house(h4)).
nesc(house(h5)).

:- public kbe:nesc/2.
:- module_transparent kbe:nesc/2.

kbe:nesc(_M, isNamed(X, Y)) :-
    !,
    isNamed_impl(X, Y),
    !.
kbe:nesc(A, B) :-
    swc,
    first_of([ (loop_check_term(A:proven_tru(B), info(A:proven_tru(B), 'common_logic_exists.pl':318), fail), nop(nrlc0(call(call, \+A:proven_neg(B))))),
               (A:proven_helper(B), \+A:proven_helper(~B)),
               A:skolem_tru(B)
             ]).

passed=info(why_was_true(user:listing(nesc)))
no_proof_for(listing(nesc)).

:- dynamic nesc/1.
:- multifile nesc/1.
:- public nesc/1.
:- module_transparent nesc/1.

nesc(A) :-
    zwc,
    nesc_lc(baseKB, A).
nesc(leftof(h1, h2)).
nesc(leftof(h2, h3)).
nesc(leftof(h3, h4)).
nesc(leftof(h4, h5)).
nesc(house(h1)).
nesc(house(h2)).
nesc(house(h3)).
nesc(house(h4)).
nesc(house(h5)).

:- public kbe:nesc/2.
:- module_transparent kbe:nesc/2.

kbe:nesc(_M, isNamed(X, Y)) :-
    !,
    isNamed_impl(X, Y),
    !.
kbe:nesc(A, B) :-
    swc,
    first_of([ (loop_check_term(A:proven_tru(B), info(A:proven_tru(B), 'common_logic_exists.pl':318), fail), nop(nrlc0(call(call, \+A:proven_neg(B))))),
               (A:proven_helper(B), \+A:proven_helper(~B)),
               A:skolem_tru(B)
             ]).

no_proof_for(listing(nesc)).

no_proof_for(listing(nesc)).

name='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_01-Test_0001_Line_0000__Nesc_in_user'.
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.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@2/test_results/jenkins/Report-logicmoo-base-fol-fiveof-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_fol_fiveof_FIVE_LEFTOF_TYPE_01_Test_0001_Line_0000_Nesc_in_user-junit.xml
~*/

% ensure our rule worked
:- mpred_test((house(h1))).
/*~
%~ ?-mpred_test("Test_0002_Line_0000__H1_in_user",user:house(h1)).
passed=info(why_was_true(user:house(h1)))
no_proof_for(house(h1)).

no_proof_for(house(h1)).

no_proof_for(house(h1)).

name='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_01-Test_0002_Line_0000__H1_in_user'.
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.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@2/test_results/jenkins/Report-logicmoo-base-fol-fiveof-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_fol_fiveof_FIVE_LEFTOF_TYPE_01_Test_0002_Line_0000_H1_in_user-junit.xml
~*/

:- mpred_test((house(h2))).
/*~
%~ ?-mpred_test("Test_0003_Line_0000__H2_in_user",user:house(h2)).
passed=info(why_was_true(user:house(h2)))
no_proof_for(house(h2)).

no_proof_for(house(h2)).

no_proof_for(house(h2)).

name='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_01-Test_0003_Line_0000__H2_in_user'.
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.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@2/test_results/jenkins/Report-logicmoo-base-fol-fiveof-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_fol_fiveof_FIVE_LEFTOF_TYPE_01_Test_0003_Line_0000_H2_in_user-junit.xml
~*/

:- mpred_test((house(h3))).
/*~
%~ ?-mpred_test("Test_0004_Line_0000__H3_in_user",user:house(h3)).
passed=info(why_was_true(user:house(h3)))
no_proof_for(house(h3)).

no_proof_for(house(h3)).

no_proof_for(house(h3)).

name='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_01-Test_0004_Line_0000__H3_in_user'.
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.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@2/test_results/jenkins/Report-logicmoo-base-fol-fiveof-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_fol_fiveof_FIVE_LEFTOF_TYPE_01_Test_0004_Line_0000_H3_in_user-junit.xml
~*/

:- mpred_test((house(h4))).
/*~
%~ ?-mpred_test("Test_0005_Line_0000__H4_in_user",user:house(h4)).
passed=info(why_was_true(user:house(h4)))
no_proof_for(house(h4)).

no_proof_for(house(h4)).

no_proof_for(house(h4)).

name='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_01-Test_0005_Line_0000__H4_in_user'.
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.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@2/test_results/jenkins/Report-logicmoo-base-fol-fiveof-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_fol_fiveof_FIVE_LEFTOF_TYPE_01_Test_0005_Line_0000_H4_in_user-junit.xml
~*/

:- mpred_test((house(h5))).

% ensure we are being nice
/*~
%~ ?-mpred_test("Test_0006_Line_0000__H5_in_user",user:house(h5)).
passed=info(why_was_true(user:house(h5)))
no_proof_for(house(h5)).

no_proof_for(house(h5)).

no_proof_for(house(h5)).

name='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_01-Test_0006_Line_0000__H5_in_user'.
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.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@2/test_results/jenkins/Report-logicmoo-base-fol-fiveof-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_fol_fiveof_FIVE_LEFTOF_TYPE_01_Test_0006_Line_0000_H5_in_user-junit.xml
~*/

% ensure we are being nice
:- mpred_test(poss(house(false_positive))).
% but not "too" nice
/*~
%~ ?-mpred_test("Test_0007_Line_0000__False_positive_in_user",user:poss(house(false_positive))).
passed=info(why_was_true(user:poss(house(false_positive))))
no_proof_for(poss(house(false_positive))).

no_proof_for(poss(house(false_positive))).

no_proof_for(poss(house(false_positive))).

name='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_01-Test_0007_Line_0000__False_positive_in_user'.
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.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@2/test_results/jenkins/Report-logicmoo-base-fol-fiveof-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_fol_fiveof_FIVE_LEFTOF_TYPE_01_Test_0007_Line_0000_False_positive_in_user-junit.xml
~*/

% but not "too" nice
:- mpred_test(\+ nesc(house(false_positive))).

% EDIT: https://github.com/logicmoo/logicmoo_workspace/edit/master/packs_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_01.pl
% JENKINS: https://jenkins.logicmoo.org/job/logicmoo_workspace/lastBuild/testReport/logicmoo.base.fol.fiveof/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/619
/*~
%~ ?-mpred_test("Test_0008_
goal=user:(\+nesc(house(false_positive))).
time=0.0012428760528564453.
passed=passed=info(why_was_true(user:(\+nesc(house(false_positive)))))
no_proof_for(\+nesc(house(false_positive))).

no_proof_for(\+nesc(house(false_positive))).

no_proof_for(\+nesc(house(false_positive))).

result=passed.

Test Suite: logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02

Package: logicmoo.base.fol.fiveof

Results

Duration0.0 sec
Tests1
Failures0

Tests

logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02

Test case:logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02@Test_0001_Line_0000__Pfclog_compile_in_user: user:pfclog_compile
Outcome:Passed
Duration:0.0 sec
FailedNone
None
Stderr
name=Test_0001_Line_0000__Pfclog_compile_in_user
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02'.
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_02.pl\']"'.
 (cd /var/lib/jenkins/workspace/logicmoo_workspace@2/back_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_type_02.pl']")

```
Warning: import/1: parser_lexical_plkb:(cyc_lex/1) is not exported (still imported into system)
%~ 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.
%~ skipped(blocks_on_input,prolog).
running('/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_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 $
% =============================================
%

% 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(user,show_success(user,user:ain(clif(leftof(h1,h2))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h1 leftof h2
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_02.pl:20
%~ kifi=leftof(h1,h2).
%~ kifm=nesc(leftof(h1,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(user,show_success(user,user:ain(clif(leftof(h2,h3))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h2 leftof h3
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h2,h3).
%~ kifm=nesc(leftof(h2,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(user,show_success(user,user:ain(clif(leftof(h3,h4))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h3 leftof h4
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h3,h4).
%~ kifm=nesc(leftof(h3,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
/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_02.pl:23
%~ debugm(user,show_success(user,user:ain(clif(leftof(h4,h5))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h4 leftof h5
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h4,h5).
%~ kifm=nesc(leftof(h4,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(user,show_success(user,user:ain(clif((leftof(_554300,_554322)=>house(_554300)&house(_554322)))))).



=======================================================
=>(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 "
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifm = ( leftof(House_Leftof,House_Leftof3) =>
%~          house(House_Leftof)&house(House_Leftof3)).
%~ 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))).
.

============================================
%~ kifm=(leftof(H1,H2)=>house(H1)&house(H2)).
%~ 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)).
.

~*/

:- kif_compile.

% intractive_test/1 means only run if interactive
/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_02.pl:28
%~ kifi=leftof(h1,h2).
%~ kifm=nesc(leftof(h1,h2)).
%~ kifi=leftof(h2,h3).
%~ kifm=nesc(leftof(h2,h3)).
%~ kifi=leftof(h3,h4).
%~ kifm=nesc(leftof(h3,h4)).
%~ kifi=leftof(h4,h5).
%~ kifm=nesc(leftof(h4,h5)).
%~ kifm = ( leftof(House_Leftof,House_Leftof1) =>
%~          house(House_Leftof)&house(House_Leftof1)).
%~ kifm=nesc(leftof(h1,h2)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h1,h2))
%~ kifm=nesc(leftof(h2,h3)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h2,h3))
%~ kifm=nesc(leftof(h3,h4)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h3,h4))
%~ kifm=nesc(leftof(h4,h5)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h4,h5))
%~ kifm = ( leftof(House_Leftof,House_Leftof1) =>
%~          house(House_Leftof)&house(House_Leftof1)).
%~ kif_to_boxlog_attvars2 = =>(leftof('$VAR'('House_Leftof'),'$VAR'('House_Leftof1')),and(house('$VAR'('House_Leftof')),house('$VAR'('Hou
goal=user:pfclog_compile.
time=0.0014374256134033203.
passed=passed=info(why_was_true(user:pfclog_compile))
no_proof_for(pfclog_compile).

no_proof_for(pfclog_compile).

no_proof_for(pfclog_compile).

result=passed.

Test Suite: logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02

Package: logicmoo.base.fol.fiveof

Results

Duration0.1 sec
Tests1
Failures0

Tests

logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02

Test case:logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02@Test_0002_Line_0000__Pfclog_uncompile_in_user: user:pfclog_uncompile
Outcome:Passed
Duration:0.0 sec
FailedNone
None
Stderr
name=Test_0002_Line_0000__Pfclog_uncompile_in_user
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02'.
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_02.pl\']"'.
 (cd /var/lib/jenkins/workspace/logicmoo_workspace@2/back_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_type_02.pl']")

```
Warning: import/1: parser_lexical_plkb:(cyc_lex/1) is not exported (still imported into system)
%~ 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.
%~ skipped(blocks_on_input,prolog).
running('/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_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 $
% =============================================
%

% 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(user,show_success(user,user:ain(clif(leftof(h1,h2))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h1 leftof h2
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_02.pl:20
%~ kifi=leftof(h1,h2).
%~ kifm=nesc(leftof(h1,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(user,show_success(user,user:ain(clif(leftof(h2,h3))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h2 leftof h3
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h2,h3).
%~ kifm=nesc(leftof(h2,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(user,show_success(user,user:ain(clif(leftof(h3,h4))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h3 leftof h4
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h3,h4).
%~ kifm=nesc(leftof(h3,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
/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_02.pl:23
%~ debugm(user,show_success(user,user:ain(clif(leftof(h4,h5))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h4 leftof h5
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h4,h5).
%~ kifm=nesc(leftof(h4,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(user,show_success(user,user:ain(clif((leftof(_554300,_554322)=>house(_554300)&house(_554322)))))).



=======================================================
=>(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 "
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifm = ( leftof(House_Leftof,House_Leftof3) =>
%~          house(House_Leftof)&house(House_Leftof3)).
%~ 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))).
.

============================================
%~ kifm=(leftof(H1,H2)=>house(H1)&house(H2)).
%~ 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)).
.

~*/

:- kif_compile.

% intractive_test/1 means only run if interactive
/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_02.pl:28
%~ kifi=leftof(h1,h2).
%~ kifm=nesc(leftof(h1,h2)).
%~ kifi=leftof(h2,h3).
%~ kifm=nesc(leftof(h2,h3)).
%~ kifi=leftof(h3,h4).
%~ kifm=nesc(leftof(h3,h4)).
%~ kifi=leftof(h4,h5).
%~ kifm=nesc(leftof(h4,h5)).
%~ kifm = ( leftof(House_Leftof,House_Leftof1) =>
%~          house(House_Leftof)&house(House_Leftof1)).
%~ kifm=nesc(leftof(h1,h2)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h1,h2))
%~ kifm=nesc(leftof(h2,h3)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h2,h3))
%~ kifm=nesc(leftof(h3,h4)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h3,h4))
%~ kifm=nesc(leftof(h4,h5)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h4,h5))
%~ kifm = ( leftof(House_Leftof,House_Leftof1) =>
%~          house(House_Leftof)&house(House_Leftof1)).
%~ kif_to_boxlog_attvars2 = =>(leftof('$VAR'('House_Leftof'),'$VAR'('House_Leftof1')),and(house('$VAR'('House_Leftof')),house('$VAR'('House_Leftof1'))))
~*/

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

% mpred_test/1 each become a Junit test that must succeed
/*~
%~ message_hook(
%~    error(existence_error(procedure,interactive_test/1),context(system:catch/3,Context_Kw)),
%~    error,
%~    [ '~q/~w: '-[catch,3],
%~      'Unknown procedure: ~q'-[interactive_test/1]]).
catch/3: Unknown procedure: interactive_test/1
ERROR: catch/3: Unknown procedure: interactive_test/1
%~ message_hook(
%~    goal_failed(directive,user:interactive_test(listing(pfclog))),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 user : interactive_test(listing(pfclog))]]).
Goal (directive) failed: user:interactive_test(listing(pfclog))
Warning: Goal (directive) failed: user:interactive_test(listing(pfclog))
~*/

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

/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_02.pl:34
%~ ?-mpred_test("Test_0001_Line_0000__Pfclog_compile_in_user",user:pfclog_compile).
passed=info(why_was_true(user:pfclog_compile))
no_proof_for(pfclog_compile).

no_proof_for(pfclog_compile).

no_proof_for(pfclog_compile).

name='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02-Test_0001_Line_0000__Pfclog_compile_in_user'.
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02'.
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_02.pl\']"'.
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-fol-fiveof-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_fol_fiveof_FIVE_LEFTOF_TYPE_02_Test_0001_Line_0000_Pfclog_compile_in_user-junit.xml
~*/

:- mpred_test(pfclog_uncompile).
% This is the real test we care about here
/*~
%~ ?-mpred_test("Test_0002_Line_0000__Pfclog_uncompile_in_user",user:pfclog_uncompile).
%~ debugm( baseKB,
%~   show_success( baseKB,
%~     baseKB : mpred_withdraw( compiled_pfclog,
%~                ( mfl4( User,
%~                    user,
%~                     '/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_02.pl', 36) ,
%~                  ax)))).
:- 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)))).

%~ debugm( baseKB,
%~   show_success( baseKB,
%~     baseKB : mpred_withdraw( compiled_pfclog,
%~                ( mfl4( User,
%~                    user,
%~                     '/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_02.pl', 36) ,
%~                  ax)))).
passed=info(why_was_true(user:pfclog_uncompile))
no_proof_for(pfclog_uncompile).

:- 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)))).

no_proof_for(pfclog_uncompile).

n
goal=user:pfclog_uncompile.
time=0.045583248138427734.
passed=passed=info(why_was_true(user:pfclog_uncompile))
no_proof_for(pfclog_uncompile).

:- 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)))).

no_proof_for(pfclog_uncompile).

no_proof_for(pfclog_uncompile).

result=passed.

Test Suite: logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02

Package: logicmoo.base.fol.fiveof

Results

Duration0.0 sec
Tests1
Failures1

Tests

logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02

Test case:logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02@Test_0003_Line_0000__H1_in_user: user:nesc(house(h1))
Outcome:Failed
Duration:0.0 sec
Failedfailure = "failure=info((why_was_true(user:(\\+nesc(house(h1)))),nop(ftrace(user:nesc(house(h1))))))\nno_proof_for(\\+nesc(house(h1))).\n\nno_proof_for(\\+nesc(house(h1))).\n\nno_proof_for(\\+nesc(house(h1))).\n\n". failure = [].
failed
Stderr
name=Test_0003_Line_0000__H1_in_user
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02'.
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_02.pl\']"'.
 (cd /var/lib/jenkins/workspace/logicmoo_workspace@2/back_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_type_02.pl']")

```
Warning: import/1: parser_lexical_plkb:(cyc_lex/1) is not exported (still imported into system)
%~ 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.
%~ skipped(blocks_on_input,prolog).
running('/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_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 $
% =============================================
%

% 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(user,show_success(user,user:ain(clif(leftof(h1,h2))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h1 leftof h2
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_02.pl:20
%~ kifi=leftof(h1,h2).
%~ kifm=nesc(leftof(h1,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(user,show_success(user,user:ain(clif(leftof(h2,h3))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h2 leftof h3
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h2,h3).
%~ kifm=nesc(leftof(h2,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(user,show_success(user,user:ain(clif(leftof(h3,h4))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h3 leftof h4
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h3,h4).
%~ kifm=nesc(leftof(h3,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
/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_02.pl:23
%~ debugm(user,show_success(user,user:ain(clif(leftof(h4,h5))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h4 leftof h5
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h4,h5).
%~ kifm=nesc(leftof(h4,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(user,show_success(user,user:ain(clif((leftof(_554300,_554322)=>house(_554300)&house(_554322)))))).



=======================================================
=>(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 "
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifm = ( leftof(House_Leftof,House_Leftof3) =>
%~          house(House_Leftof)&house(House_Leftof3)).
%~ 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))).
.

============================================
%~ kifm=(leftof(H1,H2)=>house(H1)&house(H2)).
%~ 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)).
.

~*/

:- kif_compile.

% intractive_test/1 means only run if interactive
/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_02.pl:28
%~ kifi=leftof(h1,h2).
%~ kifm=nesc(leftof(h1,h2)).
%~ kifi=leftof(h2,h3).
%~ kifm=nesc(leftof(h2,h3)).
%~ kifi=leftof(h3,h4).
%~ kifm=nesc(leftof(h3,h4)).
%~ kifi=leftof(h4,h5).
%~ kifm=nesc(leftof(h4,h5)).
%~ kifm = ( leftof(House_Leftof,House_Leftof1) =>
%~          house(House_Leftof)&house(House_Leftof1)).
%~ kifm=nesc(leftof(h1,h2)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h1,h2))
%~ kifm=nesc(leftof(h2,h3)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h2,h3))
%~ kifm=nesc(leftof(h3,h4)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h3,h4))
%~ kifm=nesc(leftof(h4,h5)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h4,h5))
%~ kifm = ( leftof(House_Leftof,House_Leftof1) =>
%~          house(House_Leftof)&house(House_Leftof1)).
%~ kif_to_boxlog_attvars2 = =>(leftof('$VAR'('House_Leftof'),'$VAR'('House_Leftof1')),and(house('$VAR'('House_Leftof')),house('$VAR'('House_Leftof1'))))
~*/

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

% mpred_test/1 each become a Junit test that must succeed
/*~
%~ message_hook(
%~    error(existence_error(procedure,interactive_test/1),context(system:catch/3,Context_Kw)),
%~    error,
%~    [ '~q/~w: '-[catch,3],
%~      'Unknown procedure: ~q'-[interactive_test/1]]).
catch/3: Unknown procedure: interactive_test/1
ERROR: catch/3: Unknown procedure: interactive_test/1
%~ message_hook(
%~    goal_failed(directive,user:interactive_test(listing(pfclog))),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 user : interactive_test(listing(pfclog))]]).
Goal (directive) failed: user:interactive_test(listing(pfclog))
Warning: Goal (directive) failed: user:interactive_test(listing(pfclog))
~*/

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

/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_02.pl:34
%~ ?-mpred_test("Test_0001_Line_0000__Pfclog_compile_in_user",user:pfclog_compile).
passed=info(why_was_true(user:pfclog_compile))
no_proof_for(pfclog_compile).

no_proof_for(pfclog_compile).

no_proof_for(pfclog_compile).

name='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02-Test_0001_Line_0000__Pfclog_compile_in_user'.
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02'.
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_02.pl\']"'.
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-fol-fiveof-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_fol_fiveof_FIVE_LEFTOF_TYPE_02_Test_0001_Line_0000_Pfclog_compile_in_user-junit.xml
~*/

:- mpred_test(pfclog_uncompile).
% This is the real test we care about here
/*~
%~ ?-mpred_test("Test_0002_Line_0000__Pfclog_uncompile_in_user",user:pfclog_uncompile).
%~ debugm( baseKB,
%~   show_success( baseKB,
%~     baseKB : mpred_withdraw( compiled_pfclog,
%~                ( mfl4( User,
%~                    user,
%~                     '/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_02.pl', 36) ,
%~                  ax)))).
:- 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)))).

%~ debugm( baseKB,
%~   show_success( baseKB,
%~     baseKB : mpred_withdraw( compiled_pfclog,
%~                ( mfl4( User,
%~                    user,
%~                     '/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_02.pl', 36) ,
%~                  ax)))).
passed=info(why_was_true(user:pfclog_uncompile))
no_proof_for(pfclog_uncompile).

:- 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)))).

no_proof_for(pfclog_uncompile).

n
goal=user:nesc(house(h1)).
time=0.00063323974609375.
failure=failure=info((why_was_true(user:(\+nesc(house(h1)))),nop(ftrace(user:nesc(house(h1))))))
no_proof_for(\+nesc(house(h1))).

no_proof_for(\+nesc(house(h1))).

no_proof_for(\+nesc(house(h1))).

result=failure.

Test Suite: logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02

Package: logicmoo.base.fol.fiveof

Results

Duration0.0 sec
Tests1
Failures0

Tests

logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02

Test case:logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02@Test_0004_Line_0000__False_positive_in_user: user:poss(house(false_positive))
Outcome:Passed
Duration:0.0 sec
FailedNone
None
Stderr
name=Test_0004_Line_0000__False_positive_in_user
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02'.
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_02.pl\']"'.
 (cd /var/lib/jenkins/workspace/logicmoo_workspace@2/back_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_type_02.pl']")

```
Warning: import/1: parser_lexical_plkb:(cyc_lex/1) is not exported (still imported into system)
%~ 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.
%~ skipped(blocks_on_input,prolog).
running('/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_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 $
% =============================================
%

% 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(user,show_success(user,user:ain(clif(leftof(h1,h2))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h1 leftof h2
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_02.pl:20
%~ kifi=leftof(h1,h2).
%~ kifm=nesc(leftof(h1,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(user,show_success(user,user:ain(clif(leftof(h2,h3))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h2 leftof h3
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h2,h3).
%~ kifm=nesc(leftof(h2,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(user,show_success(user,user:ain(clif(leftof(h3,h4))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h3 leftof h4
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h3,h4).
%~ kifm=nesc(leftof(h3,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
/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_02.pl:23
%~ debugm(user,show_success(user,user:ain(clif(leftof(h4,h5))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h4 leftof h5
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h4,h5).
%~ kifm=nesc(leftof(h4,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(user,show_success(user,user:ain(clif((leftof(_554300,_554322)=>house(_554300)&house(_554322)))))).



=======================================================
=>(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 "
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifm = ( leftof(House_Leftof,House_Leftof3) =>
%~          house(House_Leftof)&house(House_Leftof3)).
%~ 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))).
.

============================================
%~ kifm=(leftof(H1,H2)=>house(H1)&house(H2)).
%~ 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)).
.

~*/

:- kif_compile.

% intractive_test/1 means only run if interactive
/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_02.pl:28
%~ kifi=leftof(h1,h2).
%~ kifm=nesc(leftof(h1,h2)).
%~ kifi=leftof(h2,h3).
%~ kifm=nesc(leftof(h2,h3)).
%~ kifi=leftof(h3,h4).
%~ kifm=nesc(leftof(h3,h4)).
%~ kifi=leftof(h4,h5).
%~ kifm=nesc(leftof(h4,h5)).
%~ kifm = ( leftof(House_Leftof,House_Leftof1) =>
%~          house(House_Leftof)&house(House_Leftof1)).
%~ kifm=nesc(leftof(h1,h2)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h1,h2))
%~ kifm=nesc(leftof(h2,h3)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h2,h3))
%~ kifm=nesc(leftof(h3,h4)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h3,h4))
%~ kifm=nesc(leftof(h4,h5)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h4,h5))
%~ kifm = ( leftof(House_Leftof,House_Leftof1) =>
%~          house(House_Leftof)&house(House_Leftof1)).
%~ kif_to_boxlog_attvars2 = =>(leftof('$VAR'('House_Leftof'),'$VAR'('House_Leftof1')),and(house('$VAR'('House_Leftof')),house('$VAR'('House_Leftof1'))))
~*/

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

% mpred_test/1 each become a Junit test that must succeed
/*~
%~ message_hook(
%~    error(existence_error(procedure,interactive_test/1),context(system:catch/3,Context_Kw)),
%~    error,
%~    [ '~q/~w: '-[catch,3],
%~      'Unknown procedure: ~q'-[interactive_test/1]]).
catch/3: Unknown procedure: interactive_test/1
ERROR: catch/3: Unknown procedure: interactive_test/1
%~ message_hook(
%~    goal_failed(directive,user:interactive_test(listing(pfclog))),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 user : interactive_test(listing(pfclog))]]).
Goal (directive) failed: user:interactive_test(listing(pfclog))
Warning: Goal (directive) failed: user:interactive_test(listing(pfclog))
~*/

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

/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_02.pl:34
%~ ?-mpred_test("Test_0001_Line_0000__Pfclog_compile_in_user",user:pfclog_compile).
passed=info(why_was_true(user:pfclog_compile))
no_proof_for(pfclog_compile).

no_proof_for(pfclog_compile).

no_proof_for(pfclog_compile).

name='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02-Test_0001_Line_0000__Pfclog_compile_in_user'.
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02'.
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_02.pl\']"'.
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-fol-fiveof-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_fol_fiveof_FIVE_LEFTOF_TYPE_02_Test_0001_Line_0000_Pfclog_compile_in_user-junit.xml
~*/

:- mpred_test(pfclog_uncompile).
% This is the real test we care about here
/*~
%~ ?-mpred_test("Test_0002_Line_0000__Pfclog_uncompile_in_user",user:pfclog_uncompile).
%~ debugm( baseKB,
%~   show_success( baseKB,
%~     baseKB : mpred_withdraw( compiled_pfclog,
%~                ( mfl4( User,
%~                    user,
%~                     '/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_02.pl', 36) ,
%~                  ax)))).
:- 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)))).

%~ debugm( baseKB,
%~   show_success( baseKB,
%~     baseKB : mpred_withdraw( compiled_pfclog,
%~                ( mfl4( User,
%~                    user,
%~                     '/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_02.pl', 36) ,
%~                  ax)))).
passed=info(why_was_true(user:pfclog_uncompile))
no_proof_for(pfclog_uncompile).

:- 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)))).

no_proof_for(pfclog_uncompile).

n
goal=user:poss(house(false_positive)).
time=0.0008263587951660156.
passed=passed=info(why_was_true(user:poss(house(false_positive))))
no_proof_for(poss(house(false_positive))).

no_proof_for(poss(house(false_positive))).

no_proof_for(poss(house(false_positive))).

result=passed.

Test Suite: logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02

Package: logicmoo.base.fol.fiveof

Results

Duration0.0 sec
Tests1
Failures0

Tests

logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02

Test case:logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02@Test_0005_Line_0000__naf_False_positive_in_user: user:(\\+nesc(house(false_positive)))
Outcome:Passed
Duration:0.0 sec
FailedNone
None
Stderr
name=Test_0005_Line_0000__naf_False_positive_in_user
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02'.
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_02.pl\']"'.
 (cd /var/lib/jenkins/workspace/logicmoo_workspace@2/back_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_type_02.pl']")

```
Warning: import/1: parser_lexical_plkb:(cyc_lex/1) is not exported (still imported into system)
%~ 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.
%~ skipped(blocks_on_input,prolog).
running('/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_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 $
% =============================================
%

% 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(user,show_success(user,user:ain(clif(leftof(h1,h2))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h1 leftof h2
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_02.pl:20
%~ kifi=leftof(h1,h2).
%~ kifm=nesc(leftof(h1,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(user,show_success(user,user:ain(clif(leftof(h2,h3))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h2 leftof h3
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h2,h3).
%~ kifm=nesc(leftof(h2,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(user,show_success(user,user:ain(clif(leftof(h3,h4))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h3 leftof h4
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h3,h4).
%~ kifm=nesc(leftof(h3,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
/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_02.pl:23
%~ debugm(user,show_success(user,user:ain(clif(leftof(h4,h5))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h4 leftof h5
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h4,h5).
%~ kifm=nesc(leftof(h4,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(user,show_success(user,user:ain(clif((leftof(_554300,_554322)=>house(_554300)&house(_554322)))))).



=======================================================
=>(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 "
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifm = ( leftof(House_Leftof,House_Leftof3) =>
%~          house(House_Leftof)&house(House_Leftof3)).
%~ 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))).
.

============================================
%~ kifm=(leftof(H1,H2)=>house(H1)&house(H2)).
%~ 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)).
.

~*/

:- kif_compile.

% intractive_test/1 means only run if interactive
/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_02.pl:28
%~ kifi=leftof(h1,h2).
%~ kifm=nesc(leftof(h1,h2)).
%~ kifi=leftof(h2,h3).
%~ kifm=nesc(leftof(h2,h3)).
%~ kifi=leftof(h3,h4).
%~ kifm=nesc(leftof(h3,h4)).
%~ kifi=leftof(h4,h5).
%~ kifm=nesc(leftof(h4,h5)).
%~ kifm = ( leftof(House_Leftof,House_Leftof1) =>
%~          house(House_Leftof)&house(House_Leftof1)).
%~ kifm=nesc(leftof(h1,h2)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h1,h2))
%~ kifm=nesc(leftof(h2,h3)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h2,h3))
%~ kifm=nesc(leftof(h3,h4)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h3,h4))
%~ kifm=nesc(leftof(h4,h5)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h4,h5))
%~ kifm = ( leftof(House_Leftof,House_Leftof1) =>
%~          house(House_Leftof)&house(House_Leftof1)).
%~ kif_to_boxlog_attvars2 = =>(leftof('$VAR'('House_Leftof'),'$VAR'('House_Leftof1')),and(house('$VAR'('House_Leftof')),house('$VAR'('House_Leftof1'))))
~*/

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

% mpred_test/1 each become a Junit test that must succeed
/*~
%~ message_hook(
%~    error(existence_error(procedure,interactive_test/1),context(system:catch/3,Context_Kw)),
%~    error,
%~    [ '~q/~w: '-[catch,3],
%~      'Unknown procedure: ~q'-[interactive_test/1]]).
catch/3: Unknown procedure: interactive_test/1
ERROR: catch/3: Unknown procedure: interactive_test/1
%~ message_hook(
%~    goal_failed(directive,user:interactive_test(listing(pfclog))),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 user : interactive_test(listing(pfclog))]]).
Goal (directive) failed: user:interactive_test(listing(pfclog))
Warning: Goal (directive) failed: user:interactive_test(listing(pfclog))
~*/

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

/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_02.pl:34
%~ ?-mpred_test("Test_0001_Line_0000__Pfclog_compile_in_user",user:pfclog_compile).
passed=info(why_was_true(user:pfclog_compile))
no_proof_for(pfclog_compile).

no_proof_for(pfclog_compile).

no_proof_for(pfclog_compile).

name='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02-Test_0001_Line_0000__Pfclog_compile_in_user'.
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02'.
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_02.pl\']"'.
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-fol-fiveof-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_fol_fiveof_FIVE_LEFTOF_TYPE_02_Test_0001_Line_0000_Pfclog_compile_in_user-junit.xml
~*/

:- mpred_test(pfclog_uncompile).
% This is the real test we care about here
/*~
%~ ?-mpred_test("Test_0002_Line_0000__Pfclog_uncompile_in_user",user:pfclog_uncompile).
%~ debugm( baseKB,
%~   show_success( baseKB,
%~     baseKB : mpred_withdraw( compiled_pfclog,
%~                ( mfl4( User,
%~                    user,
%~                     '/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_02.pl', 36) ,
%~                  ax)))).
:- 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)))).

%~ debugm( baseKB,
%~   show_success( baseKB,
%~     baseKB : mpred_withdraw( compiled_pfclog,
%~                ( mfl4( User,
%~                    user,
%~                     '/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_02.pl', 36) ,
%~                  ax)))).
passed=info(why_was_true(user:pfclog_uncompile))
no_proof_for(pfclog_uncompile).

:- 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)))).

no_proof_for(pfclog_uncompile).

no_proof_for(pfclog_uncompile).

name='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02-Test_0002_Line_0000__Pfclog_uncompile_in_user'.
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02'.
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_02.pl\']"'.
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-fol-fiveof-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_fol_fiveof_FIVE_LEFTOF_TYPE_02_Test_0002_Line_0000_Pfclog_uncompile_in_user-junit.xml
~*/

% This is the real test we care about here
:- interactive_test(pfclog_recompile).

/*~
%~ message_hook(
%~    error(existence_error(procedure,interactive_test/1),context(system:catch/3,Context_Kw)),
%~    error,
%~    [ '~q/~w: '-[catch,3],
%~      'Unknown procedure: ~q'-[interactive_test/1]]).
catch/3: Unknown procedure: interactive_test/1
ERROR: catch/3: Unknown procedure: interactive_test/1
%~ message_hook(
%~    goal_failed(directive,user:interactive_test(pfclog_recompile)),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 user : interactive_test(pfclog_recompile)]]).
Goal (directive) failed: user:interactive_test(pfclog_recompile)
Warning: Goal (directive) failed: user:interactive_test(pfclog_recompile)
~*/

:- interactive_test(listing(nesc)).

% ensure our rule worked
/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_02.pl:40
%~ message_hook(
%~    error(existence_error(procedure,interactive_test/1),context(system:catch/3,Context_Kw)),
%~    error,
%~    [ '~q/~w: '-[catch,3],
%~      'Unknown procedure: ~q'-[interactive_test/1]]).
catch/3: Unknown procedure: interactive_test/1
ERROR: catch/3: Unknown procedure: interactive_test/1
%~ message_hook(
%~    goal_failed(directive,user:interactive_test(listing(nesc))),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 user : interactive_test(listing(nesc))]]).
Goal (directive) failed: user:interactive_test(listing(nesc))
Warning: Goal (directive) failed: user:interactive_test(listing(nesc))
~*/

% ensure our rule worked
:- mpred_test(nesc(house(h1))).

% ensure we are being nice
/*~
%~ ?-mpred_test("Test_0003_Line_0000__H1_in_user",user:nesc(house(h1))).
failure=info((why_was_true(user:(\+nesc(house(h1)))),nop(ftrace(user:nesc(house(h1))))))
no_proof_for(\+nesc(house(h1))).

no_proof_for(\+nesc(house(h1))).

no_proof_for(\+nesc(house(h1))).

name='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02-Test_0003_Line_0000__H1_in_user'.
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02'.
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_02.pl\']"'.
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-fol-fiveof-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_fol_fiveof_FIVE_LEFTOF_TYPE_02_Test_0003_Line_0000_H1_in_user-junit.xml
~*/

% ensure we are being nice
:- mpred_test(poss(house(false_positive))).
% but not "too" nice
/*~
%~ ?-mpred_test("Test_0004_Line_0000__False_positive_in_user",user:poss(house(false_positive))).
passed=info(why_was_true(user:poss(house(false_positive))))
no_proof_for(poss(house(false_positive))).

no_proof_for(poss(house(false_positive))).

no_proof_for(poss(house(false_positive))).

name='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02-Test_0004_Line_0000__False_positive_in_user'.
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02'.
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_02.pl\']"'.
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_
goal=user:(\+nesc(house(false_positive))).
time=0.0013005733489990234.
passed=passed=info(why_was_true(user:(\+nesc(house(false_positive)))))
no_proof_for(\+nesc(house(false_positive))).

no_proof_for(\+nesc(house(false_positive))).

no_proof_for(\+nesc(house(false_positive))).

result=passed.

Test Suite: logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02

Package: logicmoo.base.fol.fiveof

Results

Duration0.0 sec
Tests1
Failures0

Tests

logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02

Test case:logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02@Test_0006_Line_0000__naf_H2_in_user: user:(\\+nesc(house(h2)))
Outcome:Passed
Duration:0.0 sec
FailedNone
None
Stderr
name=Test_0006_Line_0000__naf_H2_in_user
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02'.
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_02.pl\']"'.
 (cd /var/lib/jenkins/workspace/logicmoo_workspace@2/back_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_type_02.pl']")

```
Warning: import/1: parser_lexical_plkb:(cyc_lex/1) is not exported (still imported into system)
%~ 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.
%~ skipped(blocks_on_input,prolog).
running('/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_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 $
% =============================================
%

% 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(user,show_success(user,user:ain(clif(leftof(h1,h2))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h1 leftof h2
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_02.pl:20
%~ kifi=leftof(h1,h2).
%~ kifm=nesc(leftof(h1,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(user,show_success(user,user:ain(clif(leftof(h2,h3))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h2 leftof h3
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h2,h3).
%~ kifm=nesc(leftof(h2,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(user,show_success(user,user:ain(clif(leftof(h3,h4))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h3 leftof h4
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h3,h4).
%~ kifm=nesc(leftof(h3,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
/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_02.pl:23
%~ debugm(user,show_success(user,user:ain(clif(leftof(h4,h5))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h4 leftof h5
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h4,h5).
%~ kifm=nesc(leftof(h4,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(user,show_success(user,user:ain(clif((leftof(_554300,_554322)=>house(_554300)&house(_554322)))))).



=======================================================
=>(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 "
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifm = ( leftof(House_Leftof,House_Leftof3) =>
%~          house(House_Leftof)&house(House_Leftof3)).
%~ 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))).
.

============================================
%~ kifm=(leftof(H1,H2)=>house(H1)&house(H2)).
%~ 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)).
.

~*/

:- kif_compile.

% intractive_test/1 means only run if interactive
/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_02.pl:28
%~ kifi=leftof(h1,h2).
%~ kifm=nesc(leftof(h1,h2)).
%~ kifi=leftof(h2,h3).
%~ kifm=nesc(leftof(h2,h3)).
%~ kifi=leftof(h3,h4).
%~ kifm=nesc(leftof(h3,h4)).
%~ kifi=leftof(h4,h5).
%~ kifm=nesc(leftof(h4,h5)).
%~ kifm = ( leftof(House_Leftof,House_Leftof1) =>
%~          house(House_Leftof)&house(House_Leftof1)).
%~ kifm=nesc(leftof(h1,h2)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h1,h2))
%~ kifm=nesc(leftof(h2,h3)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h2,h3))
%~ kifm=nesc(leftof(h3,h4)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h3,h4))
%~ kifm=nesc(leftof(h4,h5)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h4,h5))
%~ kifm = ( leftof(House_Leftof,House_Leftof1) =>
%~          house(House_Leftof)&house(House_Leftof1)).
%~ kif_to_boxlog_attvars2 = =>(leftof('$VAR'('House_Leftof'),'$VAR'('House_Leftof1')),and(house('$VAR'('House_Leftof')),house('$VAR'('House_Leftof1'))))
~*/

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

% mpred_test/1 each become a Junit test that must succeed
/*~
%~ message_hook(
%~    error(existence_error(procedure,interactive_test/1),context(system:catch/3,Context_Kw)),
%~    error,
%~    [ '~q/~w: '-[catch,3],
%~      'Unknown procedure: ~q'-[interactive_test/1]]).
catch/3: Unknown procedure: interactive_test/1
ERROR: catch/3: Unknown procedure: interactive_test/1
%~ message_hook(
%~    goal_failed(directive,user:interactive_test(listing(pfclog))),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 user : interactive_test(listing(pfclog))]]).
Goal (directive) failed: user:interactive_test(listing(pfclog))
Warning: Goal (directive) failed: user:interactive_test(listing(pfclog))
~*/

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

/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_02.pl:34
%~ ?-mpred_test("Test_0001_Line_0000__Pfclog_compile_in_user",user:pfclog_compile).
passed=info(why_was_true(user:pfclog_compile))
no_proof_for(pfclog_compile).

no_proof_for(pfclog_compile).

no_proof_for(pfclog_compile).

name='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02-Test_0001_Line_0000__Pfclog_compile_in_user'.
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02'.
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_02.pl\']"'.
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-fol-fiveof-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_fol_fiveof_FIVE_LEFTOF_TYPE_02_Test_0001_Line_0000_Pfclog_compile_in_user-junit.xml
~*/

:- mpred_test(pfclog_uncompile).
% This is the real test we care about here
/*~
%~ ?-mpred_test("Test_0002_Line_0000__Pfclog_uncompile_in_user",user:pfclog_uncompile).
%~ debugm( baseKB,
%~   show_success( baseKB,
%~     baseKB : mpred_withdraw( compiled_pfclog,
%~                ( mfl4( User,
%~                    user,
%~                     '/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_02.pl', 36) ,
%~                  ax)))).
:- 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)))).

%~ debugm( baseKB,
%~   show_success( baseKB,
%~     baseKB : mpred_withdraw( compiled_pfclog,
%~                ( mfl4( User,
%~                    user,
%~                     '/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_02.pl', 36) ,
%~                  ax)))).
passed=info(why_was_true(user:pfclog_uncompile))
no_proof_for(pfclog_uncompile).

:- 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)))).

no_proof_for(pfclog_uncompile).

no_proof_for(pfclog_uncompile).

name='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02-Test_0002_Line_0000__Pfclog_uncompile_in_user'.
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02'.
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_02.pl\']"'.
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-fol-fiveof-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_fol_fiveof_FIVE_LEFTOF_TYPE_02_Test_0002_Line_0000_Pfclog_uncompile_in_user-junit.xml
~*/

% This is the real test we care about here
:- interactive_test(pfclog_recompile).

/*~
%~ message_hook(
%~    error(existence_error(procedure,interactive_test/1),context(system:catch/3,Context_Kw)),
%~    error,
%~    [ '~q/~w: '-[catch,3],
%~      'Unknown procedure: ~q'-[interactive_test/1]]).
catch/3: Unknown procedure: interactive_test/1
ERROR: catch/3: Unknown procedure: interactive_test/1
%~ message_hook(
%~    goal_failed(directive,user:interactive_test(pfclog_recompile)),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 user : interactive_test(pfclog_recompile)]]).
Goal (directive) failed: user:interactive_test(pfclog_recompile)
Warning: Goal (directive) failed: user:interactive_test(pfclog_recompile)
~*/

:- interactive_test(listing(nesc)).

% ensure our rule worked
/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_02.pl:40
%~ message_hook(
%~    error(existence_error(procedure,interactive_test/1),context(system:catch/3,Context_Kw)),
%~    error,
%~    [ '~q/~w: '-[catch,3],
%~      'Unknown procedure: ~q'-[interactive_test/1]]).
catch/3: Unknown procedure: interactive_test/1
ERROR: catch/3: Unknown procedure: interactive_test/1
%~ message_hook(
%~    goal_failed(directive,user:interactive_test(listing(nesc))),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 user : interactive_test(listing(nesc))]]).
Goal (directive) failed: user:interactive_test(listing(nesc))
Warning: Goal (directive) failed: user:interactive_test(listing(nesc))
~*/

% ensure our rule worked
:- mpred_test(nesc(house(h1))).

% ensure we are being nice
/*~
%~ ?-mpred_test("Test_0003_Line_0000__H1_in_user",user:nesc(house(h1))).
failure=info((why_was_true(user:(\+nesc(house(h1)))),nop(ftrace(user:nesc(house(h1))))))
no_proof_for(\+nesc(house(h1))).

no_proof_for(\+nesc(house(h1))).

no_proof_for(\+nesc(house(h1))).

name='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02-Test_0003_Line_0000__H1_in_user'.
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02'.
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_02.pl\']"'.
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-fol-fiveof-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_fol_fiveof_FIVE_LEFTOF_TYPE_02_Test_0003_Line_0000_H1_in_user-junit.xml
~*/

% ensure we are being nice
:- mpred_test(poss(house(false_positive))).
% but not "too" nice
/*~
%~ ?-mpred_test("Test_0004_Line_0000__False_positive_in_user",user:poss(house(false_positive))).
passed=info(why_was_true(user:poss(house(false_positive))))
no_proof_for(poss(house(false_positive))).

no_proof_for(poss(house(false_positive))).

no_proof_for(poss(house(false_positive))).

name='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02-Test_0004_Line_0000__False_positive_in_user'.
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02'.
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_02.pl\']"'.
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_
goal=user:(\+nesc(house(h2))).
time=0.0006647109985351562.
passed=passed=info(why_was_true(user:(\+nesc(house(h2)))))
no_proof_for(\+nesc(house(h2))).

no_proof_for(\+nesc(house(h2))).

no_proof_for(\+nesc(house(h2))).

result=passed.

Test Suite: logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02

Package: logicmoo.base.fol.fiveof

Results

Duration0.0 sec
Tests1
Failures0

Tests

logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02

Test case:logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02@Test_0007_Line_0000__naf_H1_in_user: user:(\\+nesc(house(h1)))
Outcome:Passed
Duration:0.0 sec
FailedNone
None
Stderr
name=Test_0007_Line_0000__naf_H1_in_user
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02'.
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_02.pl\']"'.
 (cd /var/lib/jenkins/workspace/logicmoo_workspace@2/back_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_type_02.pl']")

```
Warning: import/1: parser_lexical_plkb:(cyc_lex/1) is not exported (still imported into system)
%~ 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.
%~ skipped(blocks_on_input,prolog).
running('/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_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 $
% =============================================
%

% 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(user,show_success(user,user:ain(clif(leftof(h1,h2))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h1 leftof h2
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_02.pl:20
%~ kifi=leftof(h1,h2).
%~ kifm=nesc(leftof(h1,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(user,show_success(user,user:ain(clif(leftof(h2,h3))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h2 leftof h3
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h2,h3).
%~ kifm=nesc(leftof(h2,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(user,show_success(user,user:ain(clif(leftof(h3,h4))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h3 leftof h4
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h3,h4).
%~ kifm=nesc(leftof(h3,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
/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_02.pl:23
%~ debugm(user,show_success(user,user:ain(clif(leftof(h4,h5))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h4 leftof h5
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h4,h5).
%~ kifm=nesc(leftof(h4,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(user,show_success(user,user:ain(clif((leftof(_554300,_554322)=>house(_554300)&house(_554322)))))).



=======================================================
=>(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 "
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifm = ( leftof(House_Leftof,House_Leftof3) =>
%~          house(House_Leftof)&house(House_Leftof3)).
%~ 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))).
.

============================================
%~ kifm=(leftof(H1,H2)=>house(H1)&house(H2)).
%~ 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)).
.

~*/

:- kif_compile.

% intractive_test/1 means only run if interactive
/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_02.pl:28
%~ kifi=leftof(h1,h2).
%~ kifm=nesc(leftof(h1,h2)).
%~ kifi=leftof(h2,h3).
%~ kifm=nesc(leftof(h2,h3)).
%~ kifi=leftof(h3,h4).
%~ kifm=nesc(leftof(h3,h4)).
%~ kifi=leftof(h4,h5).
%~ kifm=nesc(leftof(h4,h5)).
%~ kifm = ( leftof(House_Leftof,House_Leftof1) =>
%~          house(House_Leftof)&house(House_Leftof1)).
%~ kifm=nesc(leftof(h1,h2)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h1,h2))
%~ kifm=nesc(leftof(h2,h3)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h2,h3))
%~ kifm=nesc(leftof(h3,h4)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h3,h4))
%~ kifm=nesc(leftof(h4,h5)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h4,h5))
%~ kifm = ( leftof(House_Leftof,House_Leftof1) =>
%~          house(House_Leftof)&house(House_Leftof1)).
%~ kif_to_boxlog_attvars2 = =>(leftof('$VAR'('House_Leftof'),'$VAR'('House_Leftof1')),and(house('$VAR'('House_Leftof')),house('$VAR'('House_Leftof1'))))
~*/

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

% mpred_test/1 each become a Junit test that must succeed
/*~
%~ message_hook(
%~    error(existence_error(procedure,interactive_test/1),context(system:catch/3,Context_Kw)),
%~    error,
%~    [ '~q/~w: '-[catch,3],
%~      'Unknown procedure: ~q'-[interactive_test/1]]).
catch/3: Unknown procedure: interactive_test/1
ERROR: catch/3: Unknown procedure: interactive_test/1
%~ message_hook(
%~    goal_failed(directive,user:interactive_test(listing(pfclog))),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 user : interactive_test(listing(pfclog))]]).
Goal (directive) failed: user:interactive_test(listing(pfclog))
Warning: Goal (directive) failed: user:interactive_test(listing(pfclog))
~*/

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

/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_02.pl:34
%~ ?-mpred_test("Test_0001_Line_0000__Pfclog_compile_in_user",user:pfclog_compile).
passed=info(why_was_true(user:pfclog_compile))
no_proof_for(pfclog_compile).

no_proof_for(pfclog_compile).

no_proof_for(pfclog_compile).

name='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02-Test_0001_Line_0000__Pfclog_compile_in_user'.
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02'.
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_02.pl\']"'.
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-fol-fiveof-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_fol_fiveof_FIVE_LEFTOF_TYPE_02_Test_0001_Line_0000_Pfclog_compile_in_user-junit.xml
~*/

:- mpred_test(pfclog_uncompile).
% This is the real test we care about here
/*~
%~ ?-mpred_test("Test_0002_Line_0000__Pfclog_uncompile_in_user",user:pfclog_uncompile).
%~ debugm( baseKB,
%~   show_success( baseKB,
%~     baseKB : mpred_withdraw( compiled_pfclog,
%~                ( mfl4( User,
%~                    user,
%~                     '/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_02.pl', 36) ,
%~                  ax)))).
:- 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)))).

%~ debugm( baseKB,
%~   show_success( baseKB,
%~     baseKB : mpred_withdraw( compiled_pfclog,
%~                ( mfl4( User,
%~                    user,
%~                     '/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_02.pl', 36) ,
%~                  ax)))).
passed=info(why_was_true(user:pfclog_uncompile))
no_proof_for(pfclog_uncompile).

:- 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)))).

no_proof_for(pfclog_uncompile).

no_proof_for(pfclog_uncompile).

name='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02-Test_0002_Line_0000__Pfclog_uncompile_in_user'.
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02'.
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_02.pl\']"'.
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-fol-fiveof-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_fol_fiveof_FIVE_LEFTOF_TYPE_02_Test_0002_Line_0000_Pfclog_uncompile_in_user-junit.xml
~*/

% This is the real test we care about here
:- interactive_test(pfclog_recompile).

/*~
%~ message_hook(
%~    error(existence_error(procedure,interactive_test/1),context(system:catch/3,Context_Kw)),
%~    error,
%~    [ '~q/~w: '-[catch,3],
%~      'Unknown procedure: ~q'-[interactive_test/1]]).
catch/3: Unknown procedure: interactive_test/1
ERROR: catch/3: Unknown procedure: interactive_test/1
%~ message_hook(
%~    goal_failed(directive,user:interactive_test(pfclog_recompile)),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 user : interactive_test(pfclog_recompile)]]).
Goal (directive) failed: user:interactive_test(pfclog_recompile)
Warning: Goal (directive) failed: user:interactive_test(pfclog_recompile)
~*/

:- interactive_test(listing(nesc)).

% ensure our rule worked
/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_02.pl:40
%~ message_hook(
%~    error(existence_error(procedure,interactive_test/1),context(system:catch/3,Context_Kw)),
%~    error,
%~    [ '~q/~w: '-[catch,3],
%~      'Unknown procedure: ~q'-[interactive_test/1]]).
catch/3: Unknown procedure: interactive_test/1
ERROR: catch/3: Unknown procedure: interactive_test/1
%~ message_hook(
%~    goal_failed(directive,user:interactive_test(listing(nesc))),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 user : interactive_test(listing(nesc))]]).
Goal (directive) failed: user:interactive_test(listing(nesc))
Warning: Goal (directive) failed: user:interactive_test(listing(nesc))
~*/

% ensure our rule worked
:- mpred_test(nesc(house(h1))).

% ensure we are being nice
/*~
%~ ?-mpred_test("Test_0003_Line_0000__H1_in_user",user:nesc(house(h1))).
failure=info((why_was_true(user:(\+nesc(house(h1)))),nop(ftrace(user:nesc(house(h1))))))
no_proof_for(\+nesc(house(h1))).

no_proof_for(\+nesc(house(h1))).

no_proof_for(\+nesc(house(h1))).

name='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02-Test_0003_Line_0000__H1_in_user'.
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02'.
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_02.pl\']"'.
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-fol-fiveof-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_fol_fiveof_FIVE_LEFTOF_TYPE_02_Test_0003_Line_0000_H1_in_user-junit.xml
~*/

% ensure we are being nice
:- mpred_test(poss(house(false_positive))).
% but not "too" nice
/*~
%~ ?-mpred_test("Test_0004_Line_0000__False_positive_in_user",user:poss(house(false_positive))).
passed=info(why_was_true(user:poss(house(false_positive))))
no_proof_for(poss(house(false_positive))).

no_proof_for(poss(house(false_positive))).

no_proof_for(poss(house(false_positive))).

name='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02-Test_0004_Line_0000__False_positive_in_user'.
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02'.
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_02.pl\']"'.
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_
goal=user:(\+nesc(house(h1))).
time=0.0007002353668212891.
passed=passed=info(why_was_true(user:(\+nesc(house(h1)))))
no_proof_for(\+nesc(house(h1))).

no_proof_for(\+nesc(house(h1))).

no_proof_for(\+nesc(house(h1))).

result=passed.

Test Suite: logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02

Package: logicmoo.base.fol.fiveof

Results

Duration0.0 sec
Tests1
Failures0

Tests

logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02

Test case:logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02@Test_0008_Line_0000__naf_H5_in_user: user:ignore(\\+nesc(house(h5)))
Outcome:Passed
Duration:0.0 sec
FailedNone
None
Stderr
name=Test_0008_Line_0000__naf_H5_in_user
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02'.
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_02.pl\']"'.
 (cd /var/lib/jenkins/workspace/logicmoo_workspace@2/back_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_type_02.pl']")

```
Warning: import/1: parser_lexical_plkb:(cyc_lex/1) is not exported (still imported into system)
%~ 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.
%~ skipped(blocks_on_input,prolog).
running('/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_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 $
% =============================================
%

% 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(user,show_success(user,user:ain(clif(leftof(h1,h2))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h1 leftof h2
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_02.pl:20
%~ kifi=leftof(h1,h2).
%~ kifm=nesc(leftof(h1,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(user,show_success(user,user:ain(clif(leftof(h2,h3))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h2 leftof h3
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h2,h3).
%~ kifm=nesc(leftof(h2,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(user,show_success(user,user:ain(clif(leftof(h3,h4))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h3 leftof h4
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h3,h4).
%~ kifm=nesc(leftof(h3,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
/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_02.pl:23
%~ debugm(user,show_success(user,user:ain(clif(leftof(h4,h5))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h4 leftof h5
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h4,h5).
%~ kifm=nesc(leftof(h4,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(user,show_success(user,user:ain(clif((leftof(_554300,_554322)=>house(_554300)&house(_554322)))))).



=======================================================
=>(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 "
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifm = ( leftof(House_Leftof,House_Leftof3) =>
%~          house(House_Leftof)&house(House_Leftof3)).
%~ 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))).
.

============================================
%~ kifm=(leftof(H1,H2)=>house(H1)&house(H2)).
%~ 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)).
.

~*/

:- kif_compile.

% intractive_test/1 means only run if interactive
/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_02.pl:28
%~ kifi=leftof(h1,h2).
%~ kifm=nesc(leftof(h1,h2)).
%~ kifi=leftof(h2,h3).
%~ kifm=nesc(leftof(h2,h3)).
%~ kifi=leftof(h3,h4).
%~ kifm=nesc(leftof(h3,h4)).
%~ kifi=leftof(h4,h5).
%~ kifm=nesc(leftof(h4,h5)).
%~ kifm = ( leftof(House_Leftof,House_Leftof1) =>
%~          house(House_Leftof)&house(House_Leftof1)).
%~ kifm=nesc(leftof(h1,h2)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h1,h2))
%~ kifm=nesc(leftof(h2,h3)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h2,h3))
%~ kifm=nesc(leftof(h3,h4)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h3,h4))
%~ kifm=nesc(leftof(h4,h5)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h4,h5))
%~ kifm = ( leftof(House_Leftof,House_Leftof1) =>
%~          house(House_Leftof)&house(House_Leftof1)).
%~ kif_to_boxlog_attvars2 = =>(leftof('$VAR'('House_Leftof'),'$VAR'('House_Leftof1')),and(house('$VAR'('House_Leftof')),house('$VAR'('House_Leftof1'))))
~*/

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

% mpred_test/1 each become a Junit test that must succeed
/*~
%~ message_hook(
%~    error(existence_error(procedure,interactive_test/1),context(system:catch/3,Context_Kw)),
%~    error,
%~    [ '~q/~w: '-[catch,3],
%~      'Unknown procedure: ~q'-[interactive_test/1]]).
catch/3: Unknown procedure: interactive_test/1
ERROR: catch/3: Unknown procedure: interactive_test/1
%~ message_hook(
%~    goal_failed(directive,user:interactive_test(listing(pfclog))),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 user : interactive_test(listing(pfclog))]]).
Goal (directive) failed: user:interactive_test(listing(pfclog))
Warning: Goal (directive) failed: user:interactive_test(listing(pfclog))
~*/

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

/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_02.pl:34
%~ ?-mpred_test("Test_0001_Line_0000__Pfclog_compile_in_user",user:pfclog_compile).
passed=info(why_was_true(user:pfclog_compile))
no_proof_for(pfclog_compile).

no_proof_for(pfclog_compile).

no_proof_for(pfclog_compile).

name='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02-Test_0001_Line_0000__Pfclog_compile_in_user'.
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02'.
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_02.pl\']"'.
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-fol-fiveof-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_fol_fiveof_FIVE_LEFTOF_TYPE_02_Test_0001_Line_0000_Pfclog_compile_in_user-junit.xml
~*/

:- mpred_test(pfclog_uncompile).
% This is the real test we care about here
/*~
%~ ?-mpred_test("Test_0002_Line_0000__Pfclog_uncompile_in_user",user:pfclog_uncompile).
%~ debugm( baseKB,
%~   show_success( baseKB,
%~     baseKB : mpred_withdraw( compiled_pfclog,
%~                ( mfl4( User,
%~                    user,
%~                     '/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_02.pl', 36) ,
%~                  ax)))).
:- 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)))).

%~ debugm( baseKB,
%~   show_success( baseKB,
%~     baseKB : mpred_withdraw( compiled_pfclog,
%~                ( mfl4( User,
%~                    user,
%~                     '/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_02.pl', 36) ,
%~                  ax)))).
passed=info(why_was_true(user:pfclog_uncompile))
no_proof_for(pfclog_uncompile).

:- 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)))).

no_proof_for(pfclog_uncompile).

no_proof_for(pfclog_uncompile).

name='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02-Test_0002_Line_0000__Pfclog_uncompile_in_user'.
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02'.
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_02.pl\']"'.
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-fol-fiveof-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_fol_fiveof_FIVE_LEFTOF_TYPE_02_Test_0002_Line_0000_Pfclog_uncompile_in_user-junit.xml
~*/

% This is the real test we care about here
:- interactive_test(pfclog_recompile).

/*~
%~ message_hook(
%~    error(existence_error(procedure,interactive_test/1),context(system:catch/3,Context_Kw)),
%~    error,
%~    [ '~q/~w: '-[catch,3],
%~      'Unknown procedure: ~q'-[interactive_test/1]]).
catch/3: Unknown procedure: interactive_test/1
ERROR: catch/3: Unknown procedure: interactive_test/1
%~ message_hook(
%~    goal_failed(directive,user:interactive_test(pfclog_recompile)),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 user : interactive_test(pfclog_recompile)]]).
Goal (directive) failed: user:interactive_test(pfclog_recompile)
Warning: Goal (directive) failed: user:interactive_test(pfclog_recompile)
~*/

:- interactive_test(listing(nesc)).

% ensure our rule worked
/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/five_leftof_type_02.pl:40
%~ message_hook(
%~    error(existence_error(procedure,interactive_test/1),context(system:catch/3,Context_Kw)),
%~    error,
%~    [ '~q/~w: '-[catch,3],
%~      'Unknown procedure: ~q'-[interactive_test/1]]).
catch/3: Unknown procedure: interactive_test/1
ERROR: catch/3: Unknown procedure: interactive_test/1
%~ message_hook(
%~    goal_failed(directive,user:interactive_test(listing(nesc))),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 user : interactive_test(listing(nesc))]]).
Goal (directive) failed: user:interactive_test(listing(nesc))
Warning: Goal (directive) failed: user:interactive_test(listing(nesc))
~*/

% ensure our rule worked
:- mpred_test(nesc(house(h1))).

% ensure we are being nice
/*~
%~ ?-mpred_test("Test_0003_Line_0000__H1_in_user",user:nesc(house(h1))).
failure=info((why_was_true(user:(\+nesc(house(h1)))),nop(ftrace(user:nesc(house(h1))))))
no_proof_for(\+nesc(house(h1))).

no_proof_for(\+nesc(house(h1))).

no_proof_for(\+nesc(house(h1))).

name='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02-Test_0003_Line_0000__H1_in_user'.
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02'.
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_02.pl\']"'.
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-fol-fiveof-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_fol_fiveof_FIVE_LEFTOF_TYPE_02_Test_0003_Line_0000_H1_in_user-junit.xml
~*/

% ensure we are being nice
:- mpred_test(poss(house(false_positive))).
% but not "too" nice
/*~
%~ ?-mpred_test("Test_0004_Line_0000__False_positive_in_user",user:poss(house(false_positive))).
passed=info(why_was_true(user:poss(house(false_positive))))
no_proof_for(poss(house(false_positive))).

no_proof_for(poss(house(false_positive))).

no_proof_for(poss(house(false_positive))).

name='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02-Test_0004_Line_0000__False_positive_in_user'.
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.FIVE_LEFTOF_TYPE_02'.
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_02.pl\']"'.
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_
goal=user:ignore(\+nesc(house(h5))).
time=0.0005891323089599609.
passed=passed=info(why_was_true(user:ignore(\+nesc(house(h5)))))
no_proof_for(ignore(\+nesc(house(h5)))).

no_proof_for(ignore(\+nesc(house(h5)))).

no_proof_for(ignore(\+nesc(house(h5)))).

result=passed.

Test Suite: logicmoo.base.fol.fiveof.MONOTONIC_TYPE_01

Package: logicmoo.base.fol.fiveof

Results

Duration0.0 sec
Tests1
Failures0

Tests

logicmoo.base.fol.fiveof.MONOTONIC_TYPE_01

Test case:logicmoo.base.fol.fiveof.MONOTONIC_TYPE_01@Test_0001_Line_0000__H1_in_user: user:house(h1)
Outcome:Passed
Duration:0.0 sec
FailedNone
None
Stderr
name=Test_0001_Line_0000__H1_in_user
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.MONOTONIC_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 "[\'monotonic_type_01.pl\']"'.
 (cd /var/lib/jenkins/workspace/logicmoo_workspace@2/back_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 "['monotonic_type_01.pl']")

```
Warning: import/1: parser_lexical_plkb:(cyc_lex/1) is not exported (still imported into system)
%~ 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.
%~ skipped(blocks_on_input,prolog).
running('/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/monotonic_type_01.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 $
% =============================================
%

:- nop(module( baseKB)).

/*~
~*/

:- expects_dialect(clif).

/*~
~*/

:- kif_compile.

% makes the KB monotonic
/*~
~*/

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

% There are five houses in a row.
/*~
~*/

% There are five houses in a row.
leftof(h1, h2).
/*~
%~ kifi=leftof(h1,h2).
%~ kifm=nesc(leftof(h1,h2)).
%~ kifm=nesc(leftof(h1,h2)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h1,h2))
%~ debugm(user,show_success(user,user:ain(clif(leftof(h1,h2))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h1 leftof h2
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h1,h2).
%~ kifm=nesc(leftof(h1,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).
/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/monotonic_type_01.pl:27
%~ kifi=leftof(h2,h3).
%~ kifm=nesc(leftof(h2,h3)).
%~ kifm=nesc(leftof(h2,h3)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h2,h3))
%~ debugm(user,show_success(user,user:ain(clif(leftof(h2,h3))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h2 leftof h3
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h2,h3).
%~ kifm=nesc(leftof(h2,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).
/*~
%~ kifi=leftof(h3,h4).
%~ kifm=nesc(leftof(h3,h4)).
%~ kifm=nesc(leftof(h3,h4)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h3,h4))
%~ debugm(user,show_success(user,user:ain(clif(leftof(h3,h4))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h3 leftof h4
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h3,h4).
%~ kifm=nesc(leftof(h3,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).

% uncomment the next line and this will fail the test
/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/monotonic_type_01.pl:29
%~ kifi=leftof(h4,h5).
%~ kifm=nesc(leftof(h4,h5)).
%~ kifm=nesc(leftof(h4,h5)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h4,h5))
%~ debugm(user,show_success(user,user:ain(clif(leftof(h4,h5))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h4 leftof h5
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h4,h5).
%~ kifm=nesc(leftof(h4,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)).
.

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

% uncomment the next line and this will fail the test
:- set_kif_option(qualify_modality,false).
% this should cause h1-h5 to become houses
/*~
~*/

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

% intractive_test/1 means only run if interactive
/*~
%~ kifm = ( leftof(House_Leftof,House_Leftof3) =>
%~          house(House_Leftof)&house(House_Leftof3)).
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/monotonic_type_01.pl:34
%~ kifm = ( leftof(House_Leftof8,House_Leftof9) =>
%~          house(House_Leftof8)&house(House_Leftof9)).
%~ kif_to_boxlog_attvars2 = =>(leftof('$VAR'('House_Leftof8'),'$VAR'('House_Leftof9')),and(house('$VAR'('House_Leftof8')),house('$VAR'('House_Leftof9'))))
%~ debugm(user,show_success(user,user:ain(clif((leftof(_1540666,_1540688)=>house(_1540666)&house(_1540688)))))).



=======================================================
=>(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 "
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifm = ( leftof(House_Leftof,House_Leftof3) =>
%~          house(House_Leftof)&house(House_Leftof3)).
%~ 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))).
.

============================================
%~ kifm=(leftof(H1,H2)=>house(H1)&house(H2)).
%~ 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
goal=user:house(h1).
time=0.0012142658233642578.
passed=passed=info(why_was_true(user:house(h1)))
no_proof_for(house(h1)).

no_proof_for(house(h1)).

no_proof_for(house(h1)).

result=passed.

Test Suite: logicmoo.base.fol.fiveof.MONOTONIC_TYPE_01

Package: logicmoo.base.fol.fiveof

Results

Duration0.0 sec
Tests1
Failures0

Tests

logicmoo.base.fol.fiveof.MONOTONIC_TYPE_01

Test case:logicmoo.base.fol.fiveof.MONOTONIC_TYPE_01@Test_0002_Line_0000__H2_in_user: user:house(h2)
Outcome:Passed
Duration:0.0 sec
FailedNone
None
Stderr
name=Test_0002_Line_0000__H2_in_user
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.MONOTONIC_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 "[\'monotonic_type_01.pl\']"'.
 (cd /var/lib/jenkins/workspace/logicmoo_workspace@2/back_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 "['monotonic_type_01.pl']")

```
Warning: import/1: parser_lexical_plkb:(cyc_lex/1) is not exported (still imported into system)
%~ 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.
%~ skipped(blocks_on_input,prolog).
running('/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/monotonic_type_01.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 $
% =============================================
%

:- nop(module( baseKB)).

/*~
~*/

:- expects_dialect(clif).

/*~
~*/

:- kif_compile.

% makes the KB monotonic
/*~
~*/

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

% There are five houses in a row.
/*~
~*/

% There are five houses in a row.
leftof(h1, h2).
/*~
%~ kifi=leftof(h1,h2).
%~ kifm=nesc(leftof(h1,h2)).
%~ kifm=nesc(leftof(h1,h2)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h1,h2))
%~ debugm(user,show_success(user,user:ain(clif(leftof(h1,h2))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h1 leftof h2
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h1,h2).
%~ kifm=nesc(leftof(h1,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).
/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/monotonic_type_01.pl:27
%~ kifi=leftof(h2,h3).
%~ kifm=nesc(leftof(h2,h3)).
%~ kifm=nesc(leftof(h2,h3)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h2,h3))
%~ debugm(user,show_success(user,user:ain(clif(leftof(h2,h3))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h2 leftof h3
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h2,h3).
%~ kifm=nesc(leftof(h2,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).
/*~
%~ kifi=leftof(h3,h4).
%~ kifm=nesc(leftof(h3,h4)).
%~ kifm=nesc(leftof(h3,h4)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h3,h4))
%~ debugm(user,show_success(user,user:ain(clif(leftof(h3,h4))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h3 leftof h4
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h3,h4).
%~ kifm=nesc(leftof(h3,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).

% uncomment the next line and this will fail the test
/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/monotonic_type_01.pl:29
%~ kifi=leftof(h4,h5).
%~ kifm=nesc(leftof(h4,h5)).
%~ kifm=nesc(leftof(h4,h5)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h4,h5))
%~ debugm(user,show_success(user,user:ain(clif(leftof(h4,h5))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h4 leftof h5
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h4,h5).
%~ kifm=nesc(leftof(h4,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)).
.

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

% uncomment the next line and this will fail the test
:- set_kif_option(qualify_modality,false).
% this should cause h1-h5 to become houses
/*~
~*/

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

% intractive_test/1 means only run if interactive
/*~
%~ kifm = ( leftof(House_Leftof,House_Leftof3) =>
%~          house(House_Leftof)&house(House_Leftof3)).
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/monotonic_type_01.pl:34
%~ kifm = ( leftof(House_Leftof8,House_Leftof9) =>
%~          house(House_Leftof8)&house(House_Leftof9)).
%~ kif_to_boxlog_attvars2 = =>(leftof('$VAR'('House_Leftof8'),'$VAR'('House_Leftof9')),and(house('$VAR'('House_Leftof8')),house('$VAR'('House_Leftof9'))))
%~ debugm(user,show_success(user,user:ain(clif((leftof(_1540666,_1540688)=>house(_1540666)&house(_1540688)))))).



=======================================================
=>(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 "
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifm = ( leftof(House_Leftof,House_Leftof3) =>
%~          house(House_Leftof)&house(House_Leftof3)).
%~ 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))).
.

============================================
%~ kifm=(leftof(H1,H2)=>house(H1)&house(H2)).
%~ 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
goal=user:house(h2).
time=0.0011548995971679688.
passed=passed=info(why_was_true(user:house(h2)))
no_proof_for(house(h2)).

no_proof_for(house(h2)).

no_proof_for(house(h2)).

result=passed.

Test Suite: logicmoo.base.fol.fiveof.MONOTONIC_TYPE_01

Package: logicmoo.base.fol.fiveof

Results

Duration0.0 sec
Tests1
Failures0

Tests

logicmoo.base.fol.fiveof.MONOTONIC_TYPE_01

Test case:logicmoo.base.fol.fiveof.MONOTONIC_TYPE_01@Test_0003_Line_0000__H3_in_user: user:house(h3)
Outcome:Passed
Duration:0.0 sec
FailedNone
None
Stderr
name=Test_0003_Line_0000__H3_in_user
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.MONOTONIC_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 "[\'monotonic_type_01.pl\']"'.
 (cd /var/lib/jenkins/workspace/logicmoo_workspace@2/back_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 "['monotonic_type_01.pl']")

```
Warning: import/1: parser_lexical_plkb:(cyc_lex/1) is not exported (still imported into system)
%~ 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.
%~ skipped(blocks_on_input,prolog).
running('/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/monotonic_type_01.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 $
% =============================================
%

:- nop(module( baseKB)).

/*~
~*/

:- expects_dialect(clif).

/*~
~*/

:- kif_compile.

% makes the KB monotonic
/*~
~*/

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

% There are five houses in a row.
/*~
~*/

% There are five houses in a row.
leftof(h1, h2).
/*~
%~ kifi=leftof(h1,h2).
%~ kifm=nesc(leftof(h1,h2)).
%~ kifm=nesc(leftof(h1,h2)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h1,h2))
%~ debugm(user,show_success(user,user:ain(clif(leftof(h1,h2))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h1 leftof h2
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h1,h2).
%~ kifm=nesc(leftof(h1,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).
/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/monotonic_type_01.pl:27
%~ kifi=leftof(h2,h3).
%~ kifm=nesc(leftof(h2,h3)).
%~ kifm=nesc(leftof(h2,h3)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h2,h3))
%~ debugm(user,show_success(user,user:ain(clif(leftof(h2,h3))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h2 leftof h3
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h2,h3).
%~ kifm=nesc(leftof(h2,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).
/*~
%~ kifi=leftof(h3,h4).
%~ kifm=nesc(leftof(h3,h4)).
%~ kifm=nesc(leftof(h3,h4)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h3,h4))
%~ debugm(user,show_success(user,user:ain(clif(leftof(h3,h4))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h3 leftof h4
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h3,h4).
%~ kifm=nesc(leftof(h3,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).

% uncomment the next line and this will fail the test
/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/monotonic_type_01.pl:29
%~ kifi=leftof(h4,h5).
%~ kifm=nesc(leftof(h4,h5)).
%~ kifm=nesc(leftof(h4,h5)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h4,h5))
%~ debugm(user,show_success(user,user:ain(clif(leftof(h4,h5))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h4 leftof h5
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h4,h5).
%~ kifm=nesc(leftof(h4,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)).
.

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

% uncomment the next line and this will fail the test
:- set_kif_option(qualify_modality,false).
% this should cause h1-h5 to become houses
/*~
~*/

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

% intractive_test/1 means only run if interactive
/*~
%~ kifm = ( leftof(House_Leftof,House_Leftof3) =>
%~          house(House_Leftof)&house(House_Leftof3)).
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/monotonic_type_01.pl:34
%~ kifm = ( leftof(House_Leftof8,House_Leftof9) =>
%~          house(House_Leftof8)&house(House_Leftof9)).
%~ kif_to_boxlog_attvars2 = =>(leftof('$VAR'('House_Leftof8'),'$VAR'('House_Leftof9')),and(house('$VAR'('House_Leftof8')),house('$VAR'('House_Leftof9'))))
%~ debugm(user,show_success(user,user:ain(clif((leftof(_1540666,_1540688)=>house(_1540666)&house(_1540688)))))).



=======================================================
=>(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 "
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifm = ( leftof(House_Leftof,House_Leftof3) =>
%~          house(House_Leftof)&house(House_Leftof3)).
%~ 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))).
.

============================================
%~ kifm=(leftof(H1,H2)=>house(H1)&house(H2)).
%~ 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
goal=user:house(h3).
time=0.0011246204376220703.
passed=passed=info(why_was_true(user:house(h3)))
no_proof_for(house(h3)).

no_proof_for(house(h3)).

no_proof_for(house(h3)).

result=passed.

Test Suite: logicmoo.base.fol.fiveof.MONOTONIC_TYPE_01

Package: logicmoo.base.fol.fiveof

Results

Duration0.0 sec
Tests1
Failures0

Tests

logicmoo.base.fol.fiveof.MONOTONIC_TYPE_01

Test case:logicmoo.base.fol.fiveof.MONOTONIC_TYPE_01@Test_0004_Line_0000__H4_in_user: user:house(h4)
Outcome:Passed
Duration:0.0 sec
FailedNone
None
Stderr
name=Test_0004_Line_0000__H4_in_user
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.MONOTONIC_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 "[\'monotonic_type_01.pl\']"'.
 (cd /var/lib/jenkins/workspace/logicmoo_workspace@2/back_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 "['monotonic_type_01.pl']")

```
Warning: import/1: parser_lexical_plkb:(cyc_lex/1) is not exported (still imported into system)
%~ 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.
%~ skipped(blocks_on_input,prolog).
running('/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/monotonic_type_01.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 $
% =============================================
%

:- nop(module( baseKB)).

/*~
~*/

:- expects_dialect(clif).

/*~
~*/

:- kif_compile.

% makes the KB monotonic
/*~
~*/

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

% There are five houses in a row.
/*~
~*/

% There are five houses in a row.
leftof(h1, h2).
/*~
%~ kifi=leftof(h1,h2).
%~ kifm=nesc(leftof(h1,h2)).
%~ kifm=nesc(leftof(h1,h2)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h1,h2))
%~ debugm(user,show_success(user,user:ain(clif(leftof(h1,h2))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h1 leftof h2
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h1,h2).
%~ kifm=nesc(leftof(h1,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).
/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/monotonic_type_01.pl:27
%~ kifi=leftof(h2,h3).
%~ kifm=nesc(leftof(h2,h3)).
%~ kifm=nesc(leftof(h2,h3)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h2,h3))
%~ debugm(user,show_success(user,user:ain(clif(leftof(h2,h3))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h2 leftof h3
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h2,h3).
%~ kifm=nesc(leftof(h2,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).
/*~
%~ kifi=leftof(h3,h4).
%~ kifm=nesc(leftof(h3,h4)).
%~ kifm=nesc(leftof(h3,h4)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h3,h4))
%~ debugm(user,show_success(user,user:ain(clif(leftof(h3,h4))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h3 leftof h4
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h3,h4).
%~ kifm=nesc(leftof(h3,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).

% uncomment the next line and this will fail the test
/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/monotonic_type_01.pl:29
%~ kifi=leftof(h4,h5).
%~ kifm=nesc(leftof(h4,h5)).
%~ kifm=nesc(leftof(h4,h5)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h4,h5))
%~ debugm(user,show_success(user,user:ain(clif(leftof(h4,h5))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h4 leftof h5
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h4,h5).
%~ kifm=nesc(leftof(h4,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)).
.

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

% uncomment the next line and this will fail the test
:- set_kif_option(qualify_modality,false).
% this should cause h1-h5 to become houses
/*~
~*/

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

% intractive_test/1 means only run if interactive
/*~
%~ kifm = ( leftof(House_Leftof,House_Leftof3) =>
%~          house(House_Leftof)&house(House_Leftof3)).
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/monotonic_type_01.pl:34
%~ kifm = ( leftof(House_Leftof8,House_Leftof9) =>
%~          house(House_Leftof8)&house(House_Leftof9)).
%~ kif_to_boxlog_attvars2 = =>(leftof('$VAR'('House_Leftof8'),'$VAR'('House_Leftof9')),and(house('$VAR'('House_Leftof8')),house('$VAR'('House_Leftof9'))))
%~ debugm(user,show_success(user,user:ain(clif((leftof(_1540666,_1540688)=>house(_1540666)&house(_1540688)))))).



=======================================================
=>(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 "
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifm = ( leftof(House_Leftof,House_Leftof3) =>
%~          house(House_Leftof)&house(House_Leftof3)).
%~ 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))).
.

============================================
%~ kifm=(leftof(H1,H2)=>house(H1)&house(H2)).
%~ 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
goal=user:house(h4).
time=0.0013303756713867188.
passed=passed=info(why_was_true(user:house(h4)))
no_proof_for(house(h4)).

no_proof_for(house(h4)).

no_proof_for(house(h4)).

result=passed.

Test Suite: logicmoo.base.fol.fiveof.MONOTONIC_TYPE_01

Package: logicmoo.base.fol.fiveof

Results

Duration0.0 sec
Tests1
Failures0

Tests

logicmoo.base.fol.fiveof.MONOTONIC_TYPE_01

Test case:logicmoo.base.fol.fiveof.MONOTONIC_TYPE_01@Test_0005_Line_0000__H5_in_user: user:house(h5)
Outcome:Passed
Duration:0.0 sec
FailedNone
None
Stderr
name=Test_0005_Line_0000__H5_in_user
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.MONOTONIC_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 "[\'monotonic_type_01.pl\']"'.
 (cd /var/lib/jenkins/workspace/logicmoo_workspace@2/back_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 "['monotonic_type_01.pl']")

```
Warning: import/1: parser_lexical_plkb:(cyc_lex/1) is not exported (still imported into system)
%~ 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.
%~ skipped(blocks_on_input,prolog).
running('/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/monotonic_type_01.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 $
% =============================================
%

:- nop(module( baseKB)).

/*~
~*/

:- expects_dialect(clif).

/*~
~*/

:- kif_compile.

% makes the KB monotonic
/*~
~*/

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

% There are five houses in a row.
/*~
~*/

% There are five houses in a row.
leftof(h1, h2).
/*~
%~ kifi=leftof(h1,h2).
%~ kifm=nesc(leftof(h1,h2)).
%~ kifm=nesc(leftof(h1,h2)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h1,h2))
%~ debugm(user,show_success(user,user:ain(clif(leftof(h1,h2))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h1 leftof h2
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h1,h2).
%~ kifm=nesc(leftof(h1,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).
/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/monotonic_type_01.pl:27
%~ kifi=leftof(h2,h3).
%~ kifm=nesc(leftof(h2,h3)).
%~ kifm=nesc(leftof(h2,h3)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h2,h3))
%~ debugm(user,show_success(user,user:ain(clif(leftof(h2,h3))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h2 leftof h3
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h2,h3).
%~ kifm=nesc(leftof(h2,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).
/*~
%~ kifi=leftof(h3,h4).
%~ kifm=nesc(leftof(h3,h4)).
%~ kifm=nesc(leftof(h3,h4)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h3,h4))
%~ debugm(user,show_success(user,user:ain(clif(leftof(h3,h4))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h3 leftof h4
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h3,h4).
%~ kifm=nesc(leftof(h3,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).

% uncomment the next line and this will fail the test
/*~
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/monotonic_type_01.pl:29
%~ kifi=leftof(h4,h5).
%~ kifm=nesc(leftof(h4,h5)).
%~ kifm=nesc(leftof(h4,h5)).
%~ kif_to_boxlog_attvars2 = necessary(leftof(h4,h5))
%~ debugm(user,show_success(user,user:ain(clif(leftof(h4,h5))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h4 leftof h5
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifi=leftof(h4,h5).
%~ kifm=nesc(leftof(h4,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)).
.

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

% uncomment the next line and this will fail the test
:- set_kif_option(qualify_modality,false).
% this should cause h1-h5 to become houses
/*~
~*/

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

% intractive_test/1 means only run if interactive
/*~
%~ kifm = ( leftof(House_Leftof,House_Leftof3) =>
%~          house(House_Leftof)&house(House_Leftof3)).
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/monotonic_type_01.pl:34
%~ kifm = ( leftof(House_Leftof8,House_Leftof9) =>
%~          house(House_Leftof8)&house(House_Leftof9)).
%~ kif_to_boxlog_attvars2 = =>(leftof('$VAR'('House_Leftof8'),'$VAR'('House_Leftof9')),and(house('$VAR'('House_Leftof8')),house('$VAR'('House_Leftof9'))))
%~ debugm(user,show_success(user,user:ain(clif((leftof(_1540666,_1540688)=>house(_1540666)&house(_1540688)))))).



=======================================================
=>(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 "
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifm = ( leftof(House_Leftof,House_Leftof3) =>
%~          house(House_Leftof)&house(House_Leftof3)).
%~ 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))).
.

============================================
%~ kifm=(leftof(H1,H2)=>house(H1)&house(H2)).
%~ 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)).
.

~*/

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

% ensure our rule worked
% mpred_test/1 each become a Junit test that must succeed
/*~
%~ message_hook(
%~    error(existence_error(procedure,interactive_test/1),context(system:catch/3,Context_Kw)),
%~    error,
%~    [ '~q/~w: '-[catch,3],
%~      'Unknown procedure: ~q'-[interactive_test/1]]).
catch/3: Unknown procedure: interactive_test/1
ERROR: catch/3: Unknown procedure: interactive_test/1
%~ message_hook(
%~    goal_failed(directive,user:interactive_test(listing(kif_show))),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 user : interactive_test(listing(kif_show))]]).
Goal (directive) failed: user:interactive_test(listing(kif_show))
Warning: Goal (directive) failed: user:interactive_test(listing(kif_show))
~*/

% ensure our rule worked
% mpred_test/1 each become a Junit test that must succeed
:- mpred_test((house(h1))).
/*~
%~ ?-mpred_test("Test_0001_Line_0000__H1_in_user",user:house(h1)).
passed=info(why_was_true(user:house(h1)))
no_proof_for(house(h1)).

no_proof_for(house(h1)).

no_proof_for(house(h1)).

name='logicmoo.base.fol.fiveof.MONOTONIC_TYPE_01-Test_0001_Line_0000__H1_in_user'.
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.MONOTONIC_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 "[\'monotonic_type_01.pl\']"'.
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-fol-fiveof-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_fol_fiveof_MONOTONIC_TYPE_01_Test_0001_Line_0000_H1_in_user-junit.xml
~*/

:- mpred_test((house(h2))).
/*~
%~ ?-mpred_test("Test_0002_Line_0000__H2_in_user",user:house(h2)).
passed=info(why_was_true(user:house(h2)))
no_proof_for(house(h2)).

no_proof_for(house(h2)).

no_proof_for(house(h2)).

name='logicmoo.base.fol.fiveof.MONOTONIC_TYPE_01-Test_0002_Line_0000__H2_in_user'.
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.MONOTONIC_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 "[\'monotonic_type_01.pl\']"'.
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-fol-fiveof-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_fol_fiveof_MONOTONIC_TYPE_01_Test_0002_Line_0000_H2_in_user-junit.xml
~*/

:- mpred_test((house(h3))).
/*~
%~ ?-mpred_test("Test_0003_Line_0000__H3_in_user",user:house(h3)).
passed=info(why_was_true(user:house(h3)))
no_proof_for(house(h3)).

no_proof_for(house(h3)).

no_proof_for(house(h3)).

name='logicmoo.base.fol.fiveof.MONOTONIC_TYPE_01-Test_0003_Line_0000__H3_in_user'.
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.MONOTONIC_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 "[\'monotonic_type_01.pl\']"'.
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-fol-fiveof-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_fol_fiveof_MONOTONIC_TYPE_01_Test_0003_Line_0000_H3_in_user-junit.xml
~*/

:- mpred_test((house(h4))).
/*~
%~ ?-mpred_test("Test_0004_Line_0000__H4_in_user",user:house(h4)).
passed=info(why_was_true(user:house(h4)))
no_proof_for(house(h4)).

no_proof_for(house(h4)).

no_proof_for(house(h4)).

name='logicmoo.base.fol.fiveof.MONOTONIC_TYPE_01-Test_0004_Line_0000__H4_in_user'.
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.MONOTONIC_TYPE_01'.
JUNIT_CMD='timeout
goal=user:house(h5).
time=0.0010859966278076172.
passed=passed=info(why_was_true(user:house(h5)))
no_proof_for(house(h5)).

no_proof_for(house(h5)).

no_proof_for(house(h5)).

result=passed.

Test Suite: logicmoo.base.fol.fiveof.NONMONOTONIC_TYPE_01

Package: logicmoo.base.fol.fiveof

Results

Duration0.0 sec
Tests1
Failures1

Tests

logicmoo.base.fol.fiveof.NONMONOTONIC_TYPE_01

Test case:logicmoo.base.fol.fiveof.NONMONOTONIC_TYPE_01@Test_0001_Line_0038__H1_in_user: user:house(h1)
Outcome:Failed
Duration:0.0 sec
Failedfailure = "failure=info((why_was_true(user:(\\+house(h1))),nop(ftrace(user:house(h1)))))\nno_proof_for(\\+house(h1)).\n\nno_proof_for(\\+house(h1)).\n\nno_proof_for(\\+house(h1)).\n\n". failure = [].
failed
Stderr
name=Test_0001_Line_0038__H1_in_user
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.NONMONOTONIC_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 "[\'nonmonotonic_type_01.pl\']"'.
 (cd /var/lib/jenkins/workspace/logicmoo_workspace@2/back_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 "['nonmonotonic_type_01.pl']")

```
Warning: import/1: parser_lexical_plkb:(cyc_lex/1) is not exported (still imported into system)
%~ 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.
%~ skipped(blocks_on_input,prolog).
running('/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.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 $
% =============================================
%

:- nop(module( baseKB)).
/*~
~*/

:- process_script_file.
/*~
%~ kifm=leftof(h1,h2).
%~ kifm=leftof(h1,h2).
%~ kif_to_boxlog_attvars2 = leftof(h1,h2)
%~ debugm(user,show_success(user,user:ain(clif(leftof(h1,h2))))).



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

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


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

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

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h1 leftof h2
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

leftof(h1,h2).
.

============================================
%~ kifm=leftof(h2,h3).
%~ kifm=leftof(h2,h3).
%~ kif_to_boxlog_attvars2 = leftof(h2,h3)
%~ debugm(user,show_success(user,user:ain(clif(leftof(h2,h3))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h2 leftof h3
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl:24
%~ kifm=leftof(h2,h3).
%~ kif_to_boxlog_attvars2 = leftof(h2,h3)

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

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h2 leftof h3
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

leftof(h2,h3).
.

============================================
%~ kifm=leftof(h3,h4).
%~ kifm=leftof(h3,h4).
%~ kif_to_boxlog_attvars2 = leftof(h3,h4)
%~ debugm(user,show_success(user,user:ain(clif(leftof(h3,h4))))).



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

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


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

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

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h3 leftof h4
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

leftof(h3,h4).
.

============================================
%~ kifm=leftof(h4,h5).
%~ kifm=leftof(h4,h5).
%~ kif_to_boxlog_attvars2 = leftof(h4,h5)
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl:26
%~ debugm(user,show_success(user,user:ain(clif(leftof(h4,h5))))).



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

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


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

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

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h4 leftof h5
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

leftof(h4,h5).
.

============================================
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl:31
%~ kifm = ( leftof(House_Leftof,House_Leftof3) =>
%~          house(House_Leftof)&house(House_Leftof3)).
%~ kifm = ( leftof(House_Leftof8,House_Leftof9) =>
%~          house(House_Leftof8)&house(House_Leftof9)).
%~ kif_to_boxlog_attvars2 = =>(leftof('$VAR'('House_Leftof8'),'$VAR'('House_Leftof9')),and(house('$VAR'('House_Leftof8')),house('$VAR'('House_Leftof9'))))
%~ debugm(user,show_success(user,user:ain(clif((leftof(_1287732,_1287754)=>house(_1287732)&house(_1287754)))))).



=======================================================
=>(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 "
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifm = ( leftof(House_Leftof,House_Leftof3) =>
%~          house(House_Leftof)&house(House_Leftof3)).
%~ 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))).
.

============================================
%~ kifm=(leftof(H1,H2)=>house(H1)&house(H2)).
%~ 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)).
.

%~ message_hook(
%~    error(existence_error(procedure,interactive_test/1),context(system:catch/3,Context_Kw)),
%~    error,
%~    [ '~q/~w: '-[catch,3],
%~      'Unknown procedure: ~q'-[interactive_test/1]]).
%~ source_location( '/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl',
%~   34).
catch/3: Unknown procedure: interactive_test/1
ERROR: /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl:34:
ERROR:    catch/3: Unknown procedure: interactive_test/1
%~ message_hook(
%~    goal_failed(directive,user:interactive_test(listing(kif_show))),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 user : interactive_test(listing(kif_show))]]).
%~ source_location( '/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logic
goal=user:house(h1).
src='/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl':38.
url=/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl#L38
time=0.0008471012115478516.
failure=failure=info((why_was_true(user:(\+house(h1))),nop(ftrace(user:house(h1)))))
no_proof_for(\+house(h1)).

no_proof_for(\+house(h1)).

no_proof_for(\+house(h1)).

result=failure.

Test Suite: logicmoo.base.fol.fiveof.NONMONOTONIC_TYPE_01

Package: logicmoo.base.fol.fiveof

Results

Duration0.0 sec
Tests1
Failures1

Tests

logicmoo.base.fol.fiveof.NONMONOTONIC_TYPE_01

Test case:logicmoo.base.fol.fiveof.NONMONOTONIC_TYPE_01@Test_0002_Line_0039__H2_in_user: user:house(h2)
Outcome:Failed
Duration:0.0 sec
Failedfailure = "failure=info((why_was_true(user:(\\+house(h2))),nop(ftrace(user:house(h2)))))\nno_proof_for(\\+house(h2)).\n\nno_proof_for(\\+house(h2)).\n\nno_proof_for(\\+house(h2)).\n\n". failure = [].
failed
Stderr
name=Test_0002_Line_0039__H2_in_user
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.NONMONOTONIC_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 "[\'nonmonotonic_type_01.pl\']"'.
 (cd /var/lib/jenkins/workspace/logicmoo_workspace@2/back_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 "['nonmonotonic_type_01.pl']")

```
Warning: import/1: parser_lexical_plkb:(cyc_lex/1) is not exported (still imported into system)
%~ 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.
%~ skipped(blocks_on_input,prolog).
running('/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.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 $
% =============================================
%

:- nop(module( baseKB)).
/*~
~*/

:- process_script_file.
/*~
%~ kifm=leftof(h1,h2).
%~ kifm=leftof(h1,h2).
%~ kif_to_boxlog_attvars2 = leftof(h1,h2)
%~ debugm(user,show_success(user,user:ain(clif(leftof(h1,h2))))).



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

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


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

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

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h1 leftof h2
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

leftof(h1,h2).
.

============================================
%~ kifm=leftof(h2,h3).
%~ kifm=leftof(h2,h3).
%~ kif_to_boxlog_attvars2 = leftof(h2,h3)
%~ debugm(user,show_success(user,user:ain(clif(leftof(h2,h3))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h2 leftof h3
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl:24
%~ kifm=leftof(h2,h3).
%~ kif_to_boxlog_attvars2 = leftof(h2,h3)

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

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h2 leftof h3
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

leftof(h2,h3).
.

============================================
%~ kifm=leftof(h3,h4).
%~ kifm=leftof(h3,h4).
%~ kif_to_boxlog_attvars2 = leftof(h3,h4)
%~ debugm(user,show_success(user,user:ain(clif(leftof(h3,h4))))).



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

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


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

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

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h3 leftof h4
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

leftof(h3,h4).
.

============================================
%~ kifm=leftof(h4,h5).
%~ kifm=leftof(h4,h5).
%~ kif_to_boxlog_attvars2 = leftof(h4,h5)
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl:26
%~ debugm(user,show_success(user,user:ain(clif(leftof(h4,h5))))).



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

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


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

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

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h4 leftof h5
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

leftof(h4,h5).
.

============================================
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl:31
%~ kifm = ( leftof(House_Leftof,House_Leftof3) =>
%~          house(House_Leftof)&house(House_Leftof3)).
%~ kifm = ( leftof(House_Leftof8,House_Leftof9) =>
%~          house(House_Leftof8)&house(House_Leftof9)).
%~ kif_to_boxlog_attvars2 = =>(leftof('$VAR'('House_Leftof8'),'$VAR'('House_Leftof9')),and(house('$VAR'('House_Leftof8')),house('$VAR'('House_Leftof9'))))
%~ debugm(user,show_success(user,user:ain(clif((leftof(_1287732,_1287754)=>house(_1287732)&house(_1287754)))))).



=======================================================
=>(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 "
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifm = ( leftof(House_Leftof,House_Leftof3) =>
%~          house(House_Leftof)&house(House_Leftof3)).
%~ 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))).
.

============================================
%~ kifm=(leftof(H1,H2)=>house(H1)&house(H2)).
%~ 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)).
.

%~ message_hook(
%~    error(existence_error(procedure,interactive_test/1),context(system:catch/3,Context_Kw)),
%~    error,
%~    [ '~q/~w: '-[catch,3],
%~      'Unknown procedure: ~q'-[interactive_test/1]]).
%~ source_location( '/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl',
%~   34).
catch/3: Unknown procedure: interactive_test/1
ERROR: /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl:34:
ERROR:    catch/3: Unknown procedure: interactive_test/1
%~ message_hook(
%~    goal_failed(directive,user:interactive_test(listing(kif_show))),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 user : interactive_test(listing(kif_show))]]).
%~ source_location( '/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logic
goal=user:house(h2).
src='/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl':39.
url=/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl#L39
time=0.0006251335144042969.
failure=failure=info((why_was_true(user:(\+house(h2))),nop(ftrace(user:house(h2)))))
no_proof_for(\+house(h2)).

no_proof_for(\+house(h2)).

no_proof_for(\+house(h2)).

result=failure.

Test Suite: logicmoo.base.fol.fiveof.NONMONOTONIC_TYPE_01

Package: logicmoo.base.fol.fiveof

Results

Duration0.0 sec
Tests1
Failures1

Tests

logicmoo.base.fol.fiveof.NONMONOTONIC_TYPE_01

Test case:logicmoo.base.fol.fiveof.NONMONOTONIC_TYPE_01@Test_0003_Line_0040__H3_in_user: user:house(h3)
Outcome:Failed
Duration:0.0 sec
Failedfailure = "failure=info((why_was_true(user:(\\+house(h3))),nop(ftrace(user:house(h3)))))\nno_proof_for(\\+house(h3)).\n\nno_proof_for(\\+house(h3)).\n\nno_proof_for(\\+house(h3)).\n\n". failure = [].
failed
Stderr
name=Test_0003_Line_0040__H3_in_user
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.NONMONOTONIC_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 "[\'nonmonotonic_type_01.pl\']"'.
 (cd /var/lib/jenkins/workspace/logicmoo_workspace@2/back_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 "['nonmonotonic_type_01.pl']")

```
Warning: import/1: parser_lexical_plkb:(cyc_lex/1) is not exported (still imported into system)
%~ 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.
%~ skipped(blocks_on_input,prolog).
running('/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.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 $
% =============================================
%

:- nop(module( baseKB)).
/*~
~*/

:- process_script_file.
/*~
%~ kifm=leftof(h1,h2).
%~ kifm=leftof(h1,h2).
%~ kif_to_boxlog_attvars2 = leftof(h1,h2)
%~ debugm(user,show_success(user,user:ain(clif(leftof(h1,h2))))).



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

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


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

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

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h1 leftof h2
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

leftof(h1,h2).
.

============================================
%~ kifm=leftof(h2,h3).
%~ kifm=leftof(h2,h3).
%~ kif_to_boxlog_attvars2 = leftof(h2,h3)
%~ debugm(user,show_success(user,user:ain(clif(leftof(h2,h3))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h2 leftof h3
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl:24
%~ kifm=leftof(h2,h3).
%~ kif_to_boxlog_attvars2 = leftof(h2,h3)

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

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h2 leftof h3
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

leftof(h2,h3).
.

============================================
%~ kifm=leftof(h3,h4).
%~ kifm=leftof(h3,h4).
%~ kif_to_boxlog_attvars2 = leftof(h3,h4)
%~ debugm(user,show_success(user,user:ain(clif(leftof(h3,h4))))).



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

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


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

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

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h3 leftof h4
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

leftof(h3,h4).
.

============================================
%~ kifm=leftof(h4,h5).
%~ kifm=leftof(h4,h5).
%~ kif_to_boxlog_attvars2 = leftof(h4,h5)
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl:26
%~ debugm(user,show_success(user,user:ain(clif(leftof(h4,h5))))).



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

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


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

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

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h4 leftof h5
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

leftof(h4,h5).
.

============================================
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl:31
%~ kifm = ( leftof(House_Leftof,House_Leftof3) =>
%~          house(House_Leftof)&house(House_Leftof3)).
%~ kifm = ( leftof(House_Leftof8,House_Leftof9) =>
%~          house(House_Leftof8)&house(House_Leftof9)).
%~ kif_to_boxlog_attvars2 = =>(leftof('$VAR'('House_Leftof8'),'$VAR'('House_Leftof9')),and(house('$VAR'('House_Leftof8')),house('$VAR'('House_Leftof9'))))
%~ debugm(user,show_success(user,user:ain(clif((leftof(_1287732,_1287754)=>house(_1287732)&house(_1287754)))))).



=======================================================
=>(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 "
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifm = ( leftof(House_Leftof,House_Leftof3) =>
%~          house(House_Leftof)&house(House_Leftof3)).
%~ 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))).
.

============================================
%~ kifm=(leftof(H1,H2)=>house(H1)&house(H2)).
%~ 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)).
.

%~ message_hook(
%~    error(existence_error(procedure,interactive_test/1),context(system:catch/3,Context_Kw)),
%~    error,
%~    [ '~q/~w: '-[catch,3],
%~      'Unknown procedure: ~q'-[interactive_test/1]]).
%~ source_location( '/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl',
%~   34).
catch/3: Unknown procedure: interactive_test/1
ERROR: /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl:34:
ERROR:    catch/3: Unknown procedure: interactive_test/1
%~ message_hook(
%~    goal_failed(directive,user:interactive_test(listing(kif_show))),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 user : interactive_test(listing(kif_show))]]).
%~ source_location( '/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logic
goal=user:house(h3).
src='/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl':40.
url=/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl#L40
time=0.0006940364837646484.
failure=failure=info((why_was_true(user:(\+house(h3))),nop(ftrace(user:house(h3)))))
no_proof_for(\+house(h3)).

no_proof_for(\+house(h3)).

no_proof_for(\+house(h3)).

result=failure.

Test Suite: logicmoo.base.fol.fiveof.NONMONOTONIC_TYPE_01

Package: logicmoo.base.fol.fiveof

Results

Duration0.0 sec
Tests1
Failures1

Tests

logicmoo.base.fol.fiveof.NONMONOTONIC_TYPE_01

Test case:logicmoo.base.fol.fiveof.NONMONOTONIC_TYPE_01@Test_0004_Line_0041__H4_in_user: user:house(h4)
Outcome:Failed
Duration:0.0 sec
Failedfailure = "failure=info((why_was_true(user:(\\+house(h4))),nop(ftrace(user:house(h4)))))\nno_proof_for(\\+house(h4)).\n\nno_proof_for(\\+house(h4)).\n\nno_proof_for(\\+house(h4)).\n\n". failure = [].
failed
Stderr
name=Test_0004_Line_0041__H4_in_user
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.NONMONOTONIC_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 "[\'nonmonotonic_type_01.pl\']"'.
 (cd /var/lib/jenkins/workspace/logicmoo_workspace@2/back_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 "['nonmonotonic_type_01.pl']")

```
Warning: import/1: parser_lexical_plkb:(cyc_lex/1) is not exported (still imported into system)
%~ 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.
%~ skipped(blocks_on_input,prolog).
running('/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.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 $
% =============================================
%

:- nop(module( baseKB)).
/*~
~*/

:- process_script_file.
/*~
%~ kifm=leftof(h1,h2).
%~ kifm=leftof(h1,h2).
%~ kif_to_boxlog_attvars2 = leftof(h1,h2)
%~ debugm(user,show_success(user,user:ain(clif(leftof(h1,h2))))).



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

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


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

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

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h1 leftof h2
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

leftof(h1,h2).
.

============================================
%~ kifm=leftof(h2,h3).
%~ kifm=leftof(h2,h3).
%~ kif_to_boxlog_attvars2 = leftof(h2,h3)
%~ debugm(user,show_success(user,user:ain(clif(leftof(h2,h3))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h2 leftof h3
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl:24
%~ kifm=leftof(h2,h3).
%~ kif_to_boxlog_attvars2 = leftof(h2,h3)

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

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h2 leftof h3
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

leftof(h2,h3).
.

============================================
%~ kifm=leftof(h3,h4).
%~ kifm=leftof(h3,h4).
%~ kif_to_boxlog_attvars2 = leftof(h3,h4)
%~ debugm(user,show_success(user,user:ain(clif(leftof(h3,h4))))).



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

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


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

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

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h3 leftof h4
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

leftof(h3,h4).
.

============================================
%~ kifm=leftof(h4,h5).
%~ kifm=leftof(h4,h5).
%~ kif_to_boxlog_attvars2 = leftof(h4,h5)
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl:26
%~ debugm(user,show_success(user,user:ain(clif(leftof(h4,h5))))).



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

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


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

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

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h4 leftof h5
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

leftof(h4,h5).
.

============================================
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl:31
%~ kifm = ( leftof(House_Leftof,House_Leftof3) =>
%~          house(House_Leftof)&house(House_Leftof3)).
%~ kifm = ( leftof(House_Leftof8,House_Leftof9) =>
%~          house(House_Leftof8)&house(House_Leftof9)).
%~ kif_to_boxlog_attvars2 = =>(leftof('$VAR'('House_Leftof8'),'$VAR'('House_Leftof9')),and(house('$VAR'('House_Leftof8')),house('$VAR'('House_Leftof9'))))
%~ debugm(user,show_success(user,user:ain(clif((leftof(_1287732,_1287754)=>house(_1287732)&house(_1287754)))))).



=======================================================
=>(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 "
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifm = ( leftof(House_Leftof,House_Leftof3) =>
%~          house(House_Leftof)&house(House_Leftof3)).
%~ 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))).
.

============================================
%~ kifm=(leftof(H1,H2)=>house(H1)&house(H2)).
%~ 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)).
.

%~ message_hook(
%~    error(existence_error(procedure,interactive_test/1),context(system:catch/3,Context_Kw)),
%~    error,
%~    [ '~q/~w: '-[catch,3],
%~      'Unknown procedure: ~q'-[interactive_test/1]]).
%~ source_location( '/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl',
%~   34).
catch/3: Unknown procedure: interactive_test/1
ERROR: /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl:34:
ERROR:    catch/3: Unknown procedure: interactive_test/1
%~ message_hook(
%~    goal_failed(directive,user:interactive_test(listing(kif_show))),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 user : interactive_test(listing(kif_show))]]).
%~ source_location( '/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logic
goal=user:house(h4).
src='/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl':41.
url=/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl#L41
time=0.0007224082946777344.
failure=failure=info((why_was_true(user:(\+house(h4))),nop(ftrace(user:house(h4)))))
no_proof_for(\+house(h4)).

no_proof_for(\+house(h4)).

no_proof_for(\+house(h4)).

result=failure.

Test Suite: logicmoo.base.fol.fiveof.NONMONOTONIC_TYPE_01

Package: logicmoo.base.fol.fiveof

Results

Duration0.0 sec
Tests1
Failures1

Tests

logicmoo.base.fol.fiveof.NONMONOTONIC_TYPE_01

Test case:logicmoo.base.fol.fiveof.NONMONOTONIC_TYPE_01@Test_0005_Line_0042__H5_in_user: user:house(h5)
Outcome:Failed
Duration:0.0 sec
Failedfailure = "failure=info((why_was_true(user:(\\+house(h5))),nop(ftrace(user:house(h5)))))\nno_proof_for(\\+house(h5)).\n\nno_proof_for(\\+house(h5)).\n\nno_proof_for(\\+house(h5)).\n\n". failure = [].
failed
Stderr
name=Test_0005_Line_0042__H5_in_user
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.NONMONOTONIC_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 "[\'nonmonotonic_type_01.pl\']"'.
 (cd /var/lib/jenkins/workspace/logicmoo_workspace@2/back_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 "['nonmonotonic_type_01.pl']")

```
Warning: import/1: parser_lexical_plkb:(cyc_lex/1) is not exported (still imported into system)
%~ 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.
%~ skipped(blocks_on_input,prolog).
running('/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.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 $
% =============================================
%

:- nop(module( baseKB)).
/*~
~*/

:- process_script_file.
/*~
%~ kifm=leftof(h1,h2).
%~ kifm=leftof(h1,h2).
%~ kif_to_boxlog_attvars2 = leftof(h1,h2)
%~ debugm(user,show_success(user,user:ain(clif(leftof(h1,h2))))).



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

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


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

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

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h1 leftof h2
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

leftof(h1,h2).
.

============================================
%~ kifm=leftof(h2,h3).
%~ kifm=leftof(h2,h3).
%~ kif_to_boxlog_attvars2 = leftof(h2,h3)
%~ debugm(user,show_success(user,user:ain(clif(leftof(h2,h3))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h2 leftof h3
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl:24
%~ kifm=leftof(h2,h3).
%~ kif_to_boxlog_attvars2 = leftof(h2,h3)

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

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h2 leftof h3
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

leftof(h2,h3).
.

============================================
%~ kifm=leftof(h3,h4).
%~ kifm=leftof(h3,h4).
%~ kif_to_boxlog_attvars2 = leftof(h3,h4)
%~ debugm(user,show_success(user,user:ain(clif(leftof(h3,h4))))).



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

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


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

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

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h3 leftof h4
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

leftof(h3,h4).
.

============================================
%~ kifm=leftof(h4,h5).
%~ kifm=leftof(h4,h5).
%~ kif_to_boxlog_attvars2 = leftof(h4,h5)
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl:26
%~ debugm(user,show_success(user,user:ain(clif(leftof(h4,h5))))).



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

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


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

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

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h4 leftof h5
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

leftof(h4,h5).
.

============================================
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl:31
%~ kifm = ( leftof(House_Leftof,House_Leftof3) =>
%~          house(House_Leftof)&house(House_Leftof3)).
%~ kifm = ( leftof(House_Leftof8,House_Leftof9) =>
%~          house(House_Leftof8)&house(House_Leftof9)).
%~ kif_to_boxlog_attvars2 = =>(leftof('$VAR'('House_Leftof8'),'$VAR'('House_Leftof9')),and(house('$VAR'('House_Leftof8')),house('$VAR'('House_Leftof9'))))
%~ debugm(user,show_success(user,user:ain(clif((leftof(_1287732,_1287754)=>house(_1287732)&house(_1287754)))))).



=======================================================
=>(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 "
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifm = ( leftof(House_Leftof,House_Leftof3) =>
%~          house(House_Leftof)&house(House_Leftof3)).
%~ 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))).
.

============================================
%~ kifm=(leftof(H1,H2)=>house(H1)&house(H2)).
%~ 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)).
.

%~ message_hook(
%~    error(existence_error(procedure,interactive_test/1),context(system:catch/3,Context_Kw)),
%~    error,
%~    [ '~q/~w: '-[catch,3],
%~      'Unknown procedure: ~q'-[interactive_test/1]]).
%~ source_location( '/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl',
%~   34).
catch/3: Unknown procedure: interactive_test/1
ERROR: /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl:34:
ERROR:    catch/3: Unknown procedure: interactive_test/1
%~ message_hook(
%~    goal_failed(directive,user:interactive_test(listing(kif_show))),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 user : interactive_test(listing(kif_show))]]).
%~ source_location( '/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl',
%~   34).
Goal (directive) failed: user:interactive_test(listing(kif_show))
Warning: /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl:34:
Warning:    Goal (directive) failed: user:interactive_test(listing(kif_show))
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl:34
%~ message_hook( failed(interactive_test(listing(kif_show))),
%~   warning,
%~   ['Unknown message: ~p'-[failed(interactive_test(listing(kif_show)))]]).
%~ source_location( '/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl',
%~   34).
Unknown message: failed(interactive_test(listing(kif_show)))
Warning: /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl:34:
Warning:    Unknown message: failed(interactive_test(listing(kif_show)))
%~ ?-mpred_test("Test_0001_Line_0038__H1_in_user",user:house(h1)).
failure=info((why_was_true(user:(\+house(h1))),nop(ftrace(user:house(h1)))))
no_proof_for(\+house(h1)).

no_proof_for(\+house(h1)).

no_proof_for(\+house(h1)).

name='logicmoo.base.fol.fiveof.NONMONOTONIC_TYPE_01-Test_0001_Line_0038__H1_in_user'.
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.NONMONOTONIC_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 "[\'nonmonotonic_type_01.pl\']"'.
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-fol-fiveof-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_fol_fiveof_NONMONOTONIC_TYPE_01_Test_0001_Line_0038_H1_in_user-junit.xml
%~ ?-mpred_test("Test_0002_Line_0039__H2_in_user",user:house(h2)).
failure=info((why_was_true(user:(\+house(h2))),nop(ftrace(user:house(h2)))))
no_proof_for(\+house(h2)).

no_proof_for(\+house(h2)).

no_proof_for(\+house(h2)).

name='logicmoo.base.fol.fiveof.NONMONOTONIC_TYPE_01-Test_0002_Line_0039__H2_in_user'.
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.NONMONOTONIC_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 "[\'nonmonotonic_type_01.pl\']"'.
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-fol-fiveof-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_fol_fiveof_NONMONOTONIC_TYPE_01_Test_0002_Line_0039_H2_in_user-junit.xml
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl:40
%~ ?-mpred_test("Test_0003_Line_0040__H3_in_user",user:house(h3)).
failure=info((why_was_true(user:(\+house(h3))),nop(ftrace(user:house(h3)))))
no_proof_for(\+house(h3)).

no_proof_for(\+house(h3)).

no_proof_for(\+house(h3)).

name='logicmoo.base.fol.fiveof.NONMONOTONIC_TYPE_01-Test_0003_Line_0040__H3_in_user'.
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.NONMONOTONIC_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 "[\'nonmonotonic_type_01.pl\']"'.
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-fol-fiveof-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_fol_fiveof_NONMONOTONIC_TYPE_01_Test_0003_Line_0040_H3_in_user-junit.xml
%~ ?-mpred_test("Test_0004_Line_0041__H4_in_user",user:house(h4)).
failure=info((why_was_true(user:(\+house(h4))),nop(ftrace(user:house(h4)))))
no_proof_for(\+house(h4)).

no_proof_for(\+house(h4)).

no_proof_for(\+house(h4)).

name='logicmoo.base.fol.fiveof.NONMONOTONIC_TYPE_01-Test_0004_Line_0041__H4_in_user'.
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.NONMONOTONIC_TYPE_01'.
JUNIT
goal=user:house(h5).
src='/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl':42.
url=/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl#L42
time=0.0006735324859619141.
failure=failure=info((why_was_true(user:(\+house(h5))),nop(ftrace(user:house(h5)))))
no_proof_for(\+house(h5)).

no_proof_for(\+house(h5)).

no_proof_for(\+house(h5)).

result=failure.

Test Suite: logicmoo.base.fol.fiveof.NONMONOTONIC_TYPE_01

Package: logicmoo.base.fol.fiveof

Results

Duration0.0 sec
Tests1
Failures0

Tests

logicmoo.base.fol.fiveof.NONMONOTONIC_TYPE_01

Test case:logicmoo.base.fol.fiveof.NONMONOTONIC_TYPE_01@Test_0006_Line_0045__False_positive_in_user: user:poss(house(false_positive))
Outcome:Passed
Duration:0.0 sec
FailedNone
None
Stderr
name=Test_0006_Line_0045__False_positive_in_user
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.NONMONOTONIC_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 "[\'nonmonotonic_type_01.pl\']"'.
 (cd /var/lib/jenkins/workspace/logicmoo_workspace@2/back_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 "['nonmonotonic_type_01.pl']")

```
Warning: import/1: parser_lexical_plkb:(cyc_lex/1) is not exported (still imported into system)
%~ 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.
%~ skipped(blocks_on_input,prolog).
running('/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.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 $
% =============================================
%

:- nop(module( baseKB)).
/*~
~*/

:- process_script_file.
/*~
%~ kifm=leftof(h1,h2).
%~ kifm=leftof(h1,h2).
%~ kif_to_boxlog_attvars2 = leftof(h1,h2)
%~ debugm(user,show_success(user,user:ain(clif(leftof(h1,h2))))).



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

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


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

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

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h1 leftof h2
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

leftof(h1,h2).
.

============================================
%~ kifm=leftof(h2,h3).
%~ kifm=leftof(h2,h3).
%~ kif_to_boxlog_attvars2 = leftof(h2,h3)
%~ debugm(user,show_success(user,user:ain(clif(leftof(h2,h3))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h2 leftof h3
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl:24
%~ kifm=leftof(h2,h3).
%~ kif_to_boxlog_attvars2 = leftof(h2,h3)

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

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h2 leftof h3
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

leftof(h2,h3).
.

============================================
%~ kifm=leftof(h3,h4).
%~ kifm=leftof(h3,h4).
%~ kif_to_boxlog_attvars2 = leftof(h3,h4)
%~ debugm(user,show_success(user,user:ain(clif(leftof(h3,h4))))).



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

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


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

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

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h3 leftof h4
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

leftof(h3,h4).
.

============================================
%~ kifm=leftof(h4,h5).
%~ kifm=leftof(h4,h5).
%~ kif_to_boxlog_attvars2 = leftof(h4,h5)
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl:26
%~ debugm(user,show_success(user,user:ain(clif(leftof(h4,h5))))).



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

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


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

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

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h4 leftof h5
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

leftof(h4,h5).
.

============================================
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl:31
%~ kifm = ( leftof(House_Leftof,House_Leftof3) =>
%~          house(House_Leftof)&house(House_Leftof3)).
%~ kifm = ( leftof(House_Leftof8,House_Leftof9) =>
%~          house(House_Leftof8)&house(House_Leftof9)).
%~ kif_to_boxlog_attvars2 = =>(leftof('$VAR'('House_Leftof8'),'$VAR'('House_Leftof9')),and(house('$VAR'('House_Leftof8')),house('$VAR'('House_Leftof9'))))
%~ debugm(user,show_success(user,user:ain(clif((leftof(_1287732,_1287754)=>house(_1287732)&house(_1287754)))))).



=======================================================
=>(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 "
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifm = ( leftof(House_Leftof,House_Leftof3) =>
%~          house(House_Leftof)&house(House_Leftof3)).
%~ 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))).
.

============================================
%~ kifm=(leftof(H1,H2)=>house(H1)&house(H2)).
%~ 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)).
.

%~ message_hook(
%~    error(existence_error(procedure,interactive_test/1),context(system:catch/3,Context_Kw)),
%~    error,
%~    [ '~q/~w: '-[catch,3],
%~      'Unknown procedure: ~q'-[interactive_test/1]]).
%~ source_location( '/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl',
%~   34).
catch/3: Unknown procedure: interactive_test/1
ERROR: /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl:34:
ERROR:    catch/3: Unknown procedure: interactive_test/1
%~ message_hook(
%~    goal_failed(directive,user:interactive_test(listing(kif_show))),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 user : interactive_test(listing(kif_show))]]).
%~ source_location( '/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl',
%~   34).
Goal (directive) failed: user:interactive_test(listing(kif_show))
Warning: /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl:34:
Warning:    Goal (directive) failed: user:interactive_test(listing(kif_show))
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl:34
%~ message_hook( failed(interactive_test(listing(kif_show))),
%~   warning,
%~   ['Unknown message: ~p'-[failed(interactive_test(listing(kif_show)))]]).
%~ source_location( '/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl',
%~   34).
Unknown message: failed(interactive_test(listing(kif_show)))
Warning: /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl:34:
Warning:    Unknown message: failed(interactive_test(listing(kif_show)))
%~ ?-mpred_test("Test_0001_Line_0038__H1_in_user",user:house(h1)).
failure=info((why_was_true(user:(\+house(h1))),nop(ftrace(user:house(h1)))))
no_proof_for(\+house(h1)).

no_proof_for(\+house(h1)).

no_proof_for(\+house(h1)).

name='logicmoo.base.fol.fiveof.NONMONOTONIC_TYPE_01-Test_0001_Line_0038__H1_in_user'.
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.NONMONOTONIC_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 "[\'nonmonotonic_type_01.pl\']"'.
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-fol-fiveof-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_fol_fiveof_NONMONOTONIC_TYPE_01_Test_0001_Line_0038_H1_in_user-junit.xml
%~ ?-mpred_test("Test_0002_Line_0039__H2_in_user",user:house(h2)).
failure=info((why_was_true(user:(\+house(h2))),nop(ftrace(user:house(h2)))))
no_proof_for(\+house(h2)).

no_proof_for(\+house(h2)).

no_proof_for(\+house(h2)).

name='logicmoo.base.fol.fiveof.NONMONOTONIC_TYPE_01-Test_0002_Line_0039__H2_in_user'.
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.NONMONOTONIC_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 "[\'nonmonotonic_type_01.pl\']"'.
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-fol-fiveof-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_fol_fiveof_NONMONOTONIC_TYPE_01_Test_0002_Line_0039_H2_in_user-junit.xml
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl:40
%~ ?-mpred_test("Test_0003_Line_0040__H3_in_user",user:house(h3)).
failure=info((why_was_true(user:(\+house(h3))),nop(ftrace(user:house(h3)))))
no_proof_for(\+house(h3)).

no_proof_for(\+house(h3)).

no_proof_for(\+house(h3)).

name='logicmoo.base.fol.fiveof.NONMONOTONIC_TYPE_01-Test_0003_Line_0040__H3_in_user'.
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.NONMONOTONIC_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 "[\'nonmonotonic_type_01.pl\']"'.
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-fol-fiveof-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_fol_fiveof_NONMONOTONIC_TYPE_01_Test_0003_Line_0040_H3_in_user-junit.xml
%~ ?-mpred_test("Test_0004_Line_0041__H4_in_user",user:house(h4)).
failure=info((why_was_true(user:(\+house(h4))),nop(ftrace(user:house(h4)))))
no_proof_for(\+house(h4)).

no_proof_for(\+house(h4)).

no_proof_for(\+house(h4)).

name='logicmoo.base.fol.fiveof.NONMONOTONIC_TYPE_01-Test_0004_Line_0041__H4_in_user'.
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.NONMONOTONIC_TYPE_01'.
JUNIT
goal=user:poss(house(false_positive)).
src='/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl':45.
url=/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl#L45
time=0.0008127689361572266.
passed=passed=info(why_was_true(user:poss(house(false_positive))))
no_proof_for(poss(house(false_positive))).

no_proof_for(poss(house(false_positive))).

no_proof_for(poss(house(false_positive))).

result=passed.

Test Suite: logicmoo.base.fol.fiveof.NONMONOTONIC_TYPE_01

Package: logicmoo.base.fol.fiveof

Results

Duration0.0 sec
Tests1
Failures0

Tests

logicmoo.base.fol.fiveof.NONMONOTONIC_TYPE_01

Test case:logicmoo.base.fol.fiveof.NONMONOTONIC_TYPE_01@Test_0007_Line_0047__naf_False_positive_in_user: user:(\\+nesc(house(false_positive)))
Outcome:Passed
Duration:0.0 sec
FailedNone
None
Stderr
name=Test_0007_Line_0047__naf_False_positive_in_user
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.NONMONOTONIC_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 "[\'nonmonotonic_type_01.pl\']"'.
 (cd /var/lib/jenkins/workspace/logicmoo_workspace@2/back_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 "['nonmonotonic_type_01.pl']")

```
Warning: import/1: parser_lexical_plkb:(cyc_lex/1) is not exported (still imported into system)
%~ 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.
%~ skipped(blocks_on_input,prolog).
running('/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.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 $
% =============================================
%

:- nop(module( baseKB)).
/*~
~*/

:- process_script_file.
/*~
%~ kifm=leftof(h1,h2).
%~ kifm=leftof(h1,h2).
%~ kif_to_boxlog_attvars2 = leftof(h1,h2)
%~ debugm(user,show_success(user,user:ain(clif(leftof(h1,h2))))).



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

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


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

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

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h1 leftof h2
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

leftof(h1,h2).
.

============================================
%~ kifm=leftof(h2,h3).
%~ kifm=leftof(h2,h3).
%~ kif_to_boxlog_attvars2 = leftof(h2,h3)
%~ debugm(user,show_success(user,user:ain(clif(leftof(h2,h3))))).



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

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


% In English:
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h2 leftof h3
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl:24
%~ kifm=leftof(h2,h3).
%~ kif_to_boxlog_attvars2 = leftof(h2,h3)

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

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h2 leftof h3
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

leftof(h2,h3).
.

============================================
%~ kifm=leftof(h3,h4).
%~ kifm=leftof(h3,h4).
%~ kif_to_boxlog_attvars2 = leftof(h3,h4)
%~ debugm(user,show_success(user,user:ain(clif(leftof(h3,h4))))).



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

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


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

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

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h3 leftof h4
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

leftof(h3,h4).
.

============================================
%~ kifm=leftof(h4,h5).
%~ kifm=leftof(h4,h5).
%~ kif_to_boxlog_attvars2 = leftof(h4,h5)
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl:26
%~ debugm(user,show_success(user,user:ain(clif(leftof(h4,h5))))).



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

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


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

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

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~  h4 leftof h5
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

leftof(h4,h5).
.

============================================
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl:31
%~ kifm = ( leftof(House_Leftof,House_Leftof3) =>
%~          house(House_Leftof)&house(House_Leftof3)).
%~ kifm = ( leftof(House_Leftof8,House_Leftof9) =>
%~          house(House_Leftof8)&house(House_Leftof9)).
%~ kif_to_boxlog_attvars2 = =>(leftof('$VAR'('House_Leftof8'),'$VAR'('House_Leftof9')),and(house('$VAR'('House_Leftof8')),house('$VAR'('House_Leftof9'))))
%~ debugm(user,show_success(user,user:ain(clif((leftof(_1287732,_1287754)=>house(_1287732)&house(_1287754)))))).



=======================================================
=>(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 "
%~
%~ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%~ kifm = ( leftof(House_Leftof,House_Leftof3) =>
%~          house(House_Leftof)&house(House_Leftof3)).
%~ 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))).
.

============================================
%~ kifm=(leftof(H1,H2)=>house(H1)&house(H2)).
%~ 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)).
.

%~ message_hook(
%~    error(existence_error(procedure,interactive_test/1),context(system:catch/3,Context_Kw)),
%~    error,
%~    [ '~q/~w: '-[catch,3],
%~      'Unknown procedure: ~q'-[interactive_test/1]]).
%~ source_location( '/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl',
%~   34).
catch/3: Unknown procedure: interactive_test/1
ERROR: /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl:34:
ERROR:    catch/3: Unknown procedure: interactive_test/1
%~ message_hook(
%~    goal_failed(directive,user:interactive_test(listing(kif_show))),
%~    warning,
%~    [ 'Goal (~w) failed: ~p' - [ directive,
%~                                 user : interactive_test(listing(kif_show))]]).
%~ source_location( '/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl',
%~   34).
Goal (directive) failed: user:interactive_test(listing(kif_show))
Warning: /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl:34:
Warning:    Goal (directive) failed: user:interactive_test(listing(kif_show))
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl:34
%~ message_hook( failed(interactive_test(listing(kif_show))),
%~   warning,
%~   ['Unknown message: ~p'-[failed(interactive_test(listing(kif_show)))]]).
%~ source_location( '/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl',
%~   34).
Unknown message: failed(interactive_test(listing(kif_show)))
Warning: /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl:34:
Warning:    Unknown message: failed(interactive_test(listing(kif_show)))
%~ ?-mpred_test("Test_0001_Line_0038__H1_in_user",user:house(h1)).
failure=info((why_was_true(user:(\+house(h1))),nop(ftrace(user:house(h1)))))
no_proof_for(\+house(h1)).

no_proof_for(\+house(h1)).

no_proof_for(\+house(h1)).

name='logicmoo.base.fol.fiveof.NONMONOTONIC_TYPE_01-Test_0001_Line_0038__H1_in_user'.
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.NONMONOTONIC_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 "[\'nonmonotonic_type_01.pl\']"'.
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-fol-fiveof-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_fol_fiveof_NONMONOTONIC_TYPE_01_Test_0001_Line_0038_H1_in_user-junit.xml
%~ ?-mpred_test("Test_0002_Line_0039__H2_in_user",user:house(h2)).
failure=info((why_was_true(user:(\+house(h2))),nop(ftrace(user:house(h2)))))
no_proof_for(\+house(h2)).

no_proof_for(\+house(h2)).

no_proof_for(\+house(h2)).

name='logicmoo.base.fol.fiveof.NONMONOTONIC_TYPE_01-Test_0002_Line_0039__H2_in_user'.
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.NONMONOTONIC_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 "[\'nonmonotonic_type_01.pl\']"'.
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-fol-fiveof-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_fol_fiveof_NONMONOTONIC_TYPE_01_Test_0002_Line_0039_H2_in_user-junit.xml
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl:40
%~ ?-mpred_test("Test_0003_Line_0040__H3_in_user",user:house(h3)).
failure=info((why_was_true(user:(\+house(h3))),nop(ftrace(user:house(h3)))))
no_proof_for(\+house(h3)).

no_proof_for(\+house(h3)).

no_proof_for(\+house(h3)).

name='logicmoo.base.fol.fiveof.NONMONOTONIC_TYPE_01-Test_0003_Line_0040__H3_in_user'.
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.NONMONOTONIC_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 "[\'nonmonotonic_type_01.pl\']"'.
% saving_junit: /var/lib/jenkins/workspace/logicmoo_workspace@2/test_results/jenkins/Report-logicmoo-base-fol-fiveof-vSTARv0vSTARvvDOTvvSTARv-2-1--grep-2-i-WARN-ERROR-_file-00-fail-pass--Units-Logicmoo_base_fol_fiveof_NONMONOTONIC_TYPE_01_Test_0003_Line_0040_H3_in_user-junit.xml
%~ ?-mpred_test("Test_0004_Line_0041__H4_in_user",user:house(h4)).
failure=info((why_was_true(user:(\+house(h4))),nop(ftrace(user:house(h4)))))
no_proof_for(\+house(h4)).

no_proof_for(\+house(h4)).

no_proof_for(\+house(h4)).

name='logicmoo.base.fol.fiveof.NONMONOTONIC_TYPE_01-Test_0004_Line_0041__H4_in_user'.
JUNIT_CLASSNAME='logicmoo.base.fol.fiveof.NONMONOTONIC_TYPE_01'.
JUNIT
goal=user:(\+nesc(house(false_positive))).
src='/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl':47.
url=/var/lib/jenkins/workspace/logicmoo_workspace@2/back_sys/logicmoo_base/t/examples/fol/fiveof/nonmonotonic_type_01.pl#L47
time=0.0013184547424316406.
passed=passed=info(why_was_true(user:(\+nesc(house(false_positive)))))
no_proof_for(\+nesc(house(false_positive))).

no_proof_for(\+nesc(house(false_positive))).

no_proof_for(\+nesc(house(false_positive))).

result=passed.