Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- */
- % ============================================================
- % all rooms have a door
- % ============================================================
- :- test_boxlog(all(R, implies(room(R), exists(D, and(door(D), has(R, D)))))).
- /*
- % /home/prologmud_server/lib/swipl/pack/logicmoo_base/t/examples/fol/boxlog_sanity.pl:18
- % :- test_boxlog(all(R_VAR,
- % implies(room(R_VAR),
- % exists(D_VAR, and(door(D_VAR), has(R_VAR, D_VAR)))))).
- % kif :-
- % all(R, (room(R)=>exists(D, door(D)&has(R, D)))).
- % qualify_nesc :-
- % all(R, nesc((room(R)=>exists(D, door(D)&has(R, D))))).
- % debugm(user, sc_success(user, user:nnf(KB, all(R, nesc(b_d(KB, nesc, poss), (room(R)=>exists(D, door(D)&has(R, D))))), nesc(b_d(KB, nesc, poss), ~room(R)v(door(D)v~skolem(D, skFn(door(D)&has(R, D)))))&nesc(b_d(KB, nesc, poss), ~room(R)v(has(R, D)v~skolem(D, skFn(door(D)&has(R, D)))))))).
- % nnf :-
- % nesc(~room(R)v(door(D)v~skolem(D, skFn(door(D)&has(R, D)))))&nesc(~room(R)v(has(R, D)v~skolem(D, skFn(door(D)&has(R, D))))).
- % th_nnf_in :-
- % ( neg(room(R))
- % ; tru(door(D))
- % ; neg(skolem(D, skFn((door(D), has(R, D)))))
- % ),
- % ( neg(room(R))
- % ; tru(has(R, D))
- % ; neg(skolem(D, skFn((door(D), has(R, D)))))
- % ).
- % th_nnf_out :-
- % ~ (n(neg(room(R))), n(tru(door(D))), n(neg(skolem(D, skFn((door(D), has(R, D))))));n(neg(room(R))), n(tru(has(R, D))), n(neg(skolem(D, skFn((door(D), has(R, D))))))).
- % proven_neg(room(R)) :-
- % ~door(D),
- % skolem(D, skFn((door(D), has(R, D)))).
- % proven_tru(door(D)) :-
- % room(R),
- % skolem(D, skFn((door(D), has(R, D)))).
- % proven_neg(skolem(D, skFn((door(D), has(R, D))))) :-
- % ~door(D),
- % room(R).
- % proven_neg(room(R)) :-
- % ~has(R, D),
- % skolem(D, skFn((door(D), has(R, D)))).
- % proven_tru(has(R, D)) :-
- % room(R),
- % skolem(D, skFn((door(D), has(R, D)))).
- % proven_neg(skolem(D, skFn((door(D), has(R, D))))) :-
- % ~has(R, D),
- % room(R).
- % pfc :-
- % ~door(D), {ignore(D=skFn((door(D), has(R, D))))}, {is_unit(R)}==>proven_neg(room(R)).
- % pfc :-
- % room(R), {is_unit(R)}==>if_missing(if_missing(proven_tru(door(_79604)), proven_tru(door(skFn(door(D)&has(R, D))))), if_missing(proven_tru(door(_79604)), proven_tru(door(skFn(door(skFn((door(D), has(R, D))))&has(R, skFn((door(D), has(R, D))))))))).
- % pfc :-
- % ~door(D), room(R), {is_unit(D, R)}==>if_missing(proven_neg(skolem(_98630, skFn((door(_98630), has(R, _98630))))), proven_neg(skolem(skFn(door(D)&has(R, D)), skFn((door(skFn(door(D)&has(R, D))), has(R, skFn(door(D)&has(R, D)))))))).
- % pfc :-
- % ~has(R, D), {ignore(D=skFn((door(D), has(R, D))))}, {is_unit(R)}==>proven_neg(room(R)).
- % pfc :-
- % room(R), {is_unit(R)}==>if_missing(if_missing(proven_tru(has(R, _129926)), proven_tru(has(R, skFn(door(D)&has(R, D))))), if_missing(proven_tru(has(R, _129926)), proven_tru(has(R, skFn(door(skFn((door(D), has(R, D))))&has(R, skFn((door(D), has(R, D))))))))).
- % pfc :-
- % ~has(R, D), room(R), {is_unit(D, R)}==>if_missing(proven_neg(skolem(_149310, skFn((door(_149310), has(R, _149310))))), proven_neg(skolem(skFn(door(D)&has(R, D)), skFn((door(skFn(door(D)&has(R, D))), has(R, skFn(door(D)&has(R, D)))))))).
- */
- % Should be simular in meaning to
- %
- % door(D) :-
- % room(R),
- % skolem(D, skIsDoorInUnkArg2ofHas_1Fn(R)).
- % ~room(R) :-
- % \+ (
- % door(D)
- % ).
- % ~room(R) :-
- % \+ (
- % has(R, D)
- % ).
- % has(R, D) :-
- % room(R),
- % skolem(D, skIsDoorInUnkArg2ofHas_1Fn(R)).
- % ============================================================
- % joe knows all rooms have a door
- % ============================================================
- :- test_boxlog(knows(joe,
- all(R, implies(room(R), exists(D, and(door(D), has(R, D))))))).
- /*
- % /home/prologmud_server/lib/swipl/pack/logicmoo_base/t/examples/fol/boxlog_sanity.pl:40
- % :- test_boxlog(knows(joe,
- % all(R_VAR,
- % implies(room(R_VAR),
- % exists(D_VAR,
- % and(door(D_VAR), has(R_VAR, D_VAR))))))).
- % kif :-
- % knows(joe, all(R, (room(R)=>exists(D, door(D)&has(R, D))))).
- % qualify_nesc :-
- % nesc(knows(joe, all(R, (room(R)=>exists(D, door(D)&has(R, D)))))).
- % debugm(user, sc_success(user, user:nnf(KB, nesc(b_d(KB, nesc, poss), knows(joe, all(R, (room(R)=>exists(D, door(D)&has(R, D)))))), nesc(b_d(KB, nesc, poss), ~knows(joe, room(R))v(knows(joe, door(D))v~skolem(D, skFn(knows(joe, door(D))&knows(joe, has(R, D))))))&nesc(b_d(KB, nesc, poss), ~knows(joe, room(R))v(knows(joe, has(R, D))v~skolem(D, skFn(knows(joe, door(D))&knows(joe, has(R, D))))))))).
- % nnf :-
- % nesc(~knows(joe, room(R))v(knows(joe, door(D))v~skolem(D, skFn(knows(joe, door(D))&knows(joe, has(R, D))))))&nesc(~knows(joe, room(R))v(knows(joe, has(R, D))v~skolem(D, skFn(knows(joe, door(D))&knows(joe, has(R, D)))))).
- % th_nnf_in :-
- % ( neg(knows(joe, room(R)))
- % ; tru(knows(joe, door(D)))
- % ; neg(skolem(D, skFn((knows(joe, door(D)), knows(joe, has(R, D))))))
- % ),
- % ( neg(knows(joe, room(R)))
- % ; tru(knows(joe, has(R, D)))
- % ; neg(skolem(D, skFn((knows(joe, door(D)), knows(joe, has(R, D))))))
- % ).
- % th_nnf_out :-
- % ~ (n(neg(knows(joe, room(R)))), n(tru(knows(joe, door(D)))), n(neg(skolem(D, skFn((knows(joe, door(D)), knows(joe, has(R, D)))))));n(neg(knows(joe, room(R)))), n(tru(knows(joe, has(R, D)))), n(neg(skolem(D, skFn((knows(joe, door(D)), knows(joe, has(R, D)))))))).
- % proven_neg(knows(joe, room(R))) :-
- % ~knows(joe, door(D)),
- % skolem(D, skFn((knows(joe, door(D)), knows(joe, has(R, D))))).
- % proven_tru(knows(joe, door(D))) :-
- % knows(joe, room(R)),
- % skolem(D, skFn((knows(joe, door(D)), knows(joe, has(R, D))))).
- % proven_neg(skolem(D, skFn((knows(joe, door(D)), knows(joe, has(R, D)))))) :-
- % ~knows(joe, door(D)),
- % knows(joe, room(R)).
- % proven_neg(knows(joe, room(R))) :-
- % ~knows(joe, has(R, D)),
- % skolem(D, skFn((knows(joe, door(D)), knows(joe, has(R, D))))).
- % proven_tru(knows(joe, has(R, D))) :-
- % knows(joe, room(R)),
- % skolem(D, skFn((knows(joe, door(D)), knows(joe, has(R, D))))).
- % proven_neg(skolem(D, skFn((knows(joe, door(D)), knows(joe, has(R, D)))))) :-
- % ~knows(joe, has(R, D)),
- % knows(joe, room(R)).
- % pfc :-
- % ~knows(joe, door(D)), {ignore(D=skFn((knows(joe, door(D)), knows(joe, has(R, D)))))}, {is_unit(R)}==>proven_neg(knows(joe, room(R))).
- % pfc :-
- % knows(joe, room(R)), {is_unit(R)}==>if_missing(if_missing(proven_tru(knows(joe, door(_97736))), proven_tru(knows(joe, door(skFn(knows(joe, door(D))&knows(joe, has(R, D))))))), if_missing(proven_tru(knows(joe, door(_97736))), proven_tru(knows(joe, door(skFn(knows(joe, door(skFn((knows(joe, door(D)), knows(joe, has(R, D))))))&knows(joe, has(R, skFn((knows(joe, door(D)), knows(joe, has(R, D)))))))))))).
- % pfc :-
- % ~knows(joe, door(D)), knows(joe, room(R)), {is_unit(D, R)}==>if_missing(proven_neg(skolem(_124440, skFn((knows(joe, door(_124440)), knows(joe, has(R, _124440)))))), proven_neg(skolem(skFn(knows(joe, door(D))&knows(joe, has(R, D))), skFn((knows(joe, door(skFn(knows(joe, door(D))&knows(joe, has(R, D))))), knows(joe, has(R, skFn(knows(joe, door(D))&knows(joe, has(R, D)))))))))).
- % pfc :-
- % ~knows(joe, has(R, D)), {ignore(D=skFn((knows(joe, door(D)), knows(joe, has(R, D)))))}, {is_unit(R)}==>proven_neg(knows(joe, room(R))).
- % pfc :-
- % knows(joe, room(R)), {is_unit(R)}==>if_missing(if_missing(proven_tru(knows(joe, has(R, _166808))), proven_tru(knows(joe, has(R, skFn(knows(joe, door(D))&knows(joe, has(R, D))))))), if_missing(proven_tru(knows(joe, has(R, _166808))), proven_tru(knows(joe, has(R, skFn(knows(joe, door(skFn((knows(joe, door(D)), knows(joe, has(R, D))))))&knows(joe, has(R, skFn((knows(joe, door(D)), knows(joe, has(R, D)))))))))))).
- % pfc :-
- % ~knows(joe, has(R, D)), knows(joe, room(R)), {is_unit(D, R)}==>if_missing(proven_neg(skolem(_193870, skFn((knows(joe, door(_193870)), knows(joe, has(R, _193870)))))), proven_neg(skolem(skFn(knows(joe, door(D))&knows(joe, has(R, D))), skFn((knows(joe, door(skFn(knows(joe, door(D))&knows(joe, has(R, D))))), knows(joe, has(R, skFn(knows(joe, door(D))&knows(joe, has(R, D)))))))))).
- */
- % Should be simular in meaning to
- % ~knows(joe, room(A)) :-
- % \+ (
- % knows(joe, door(B))
- % ).
- % ~knows(joe, room(A)) :-
- % \+ (
- % knows(joe, has(A, B))
- % ).
- % knows(joe, door(A)) :-
- % knows(joe, room(B)),
- % skolem(A, skIsDoorInUnkArg2ofHas_2Fn(B)).
- % knows(joe, has(A, B)) :-
- % knows(joe, room(A)),
- % skolem(B, skIsDoorInUnkArg2ofHas_2Fn(A)).
- % ============================================================
- % for all rooms joe knows about he belives a door exists
- % ============================================================
- :- test_boxlog(all(R,
- implies(knows(joe, room(R)),
- belives(joe, exists(D, and(door(D), has(R, D))))))).
- /*
- % /home/prologmud_server/lib/swipl/pack/logicmoo_base/t/examples/fol/boxlog_sanity.pl:61
- % :- test_boxlog(all(R_VAR,
- % implies(knows(joe, room(R_VAR)),
- % belives(joe,
- % exists(D_VAR,
- % and(door(D_VAR), has(R_VAR, D_VAR))))))).
- % kif :-
- % all(R, (knows(joe, room(R))=>belives(joe, exists(D, door(D)&has(R, D))))).
- % qualify_nesc :-
- % all(R,
- % nesc((knows(joe, room(R))=>belives(joe, exists(D, door(D)&has(R, D)))))).
- % debugm(user, sc_success(user, user:nnf(KB, all(R, nesc(b_d(KB, nesc, poss), (knows(joe, room(R))=>belives(joe, exists(D, door(D)&has(R, D)))))), nesc(b_d(KB, nesc, poss), ~knows(joe, room(R))v(belives(joe, door(D))v~skolem(D, skFn(belives(joe, door(D))&belives(joe, has(R, D))))))&nesc(b_d(KB, nesc, poss), ~knows(joe, room(R))v(belives(joe, has(R, D))v~skolem(D, skFn(belives(joe, door(D))&belives(joe, has(R, D))))))))).
- % nnf :-
- % nesc(~knows(joe, room(R))v(belives(joe, door(D))v~skolem(D, skFn(belives(joe, door(D))&belives(joe, has(R, D))))))&nesc(~knows(joe, room(R))v(belives(joe, has(R, D))v~skolem(D, skFn(belives(joe, door(D))&belives(joe, has(R, D)))))).
- % th_nnf_in :-
- % ( neg(knows(joe, room(R)))
- % ; tru(belives(joe, door(D)))
- % ; neg(skolem(D, skFn((belives(joe, door(D)), belives(joe, has(R, D))))))
- % ),
- % ( neg(knows(joe, room(R)))
- % ; tru(belives(joe, has(R, D)))
- % ; neg(skolem(D, skFn((belives(joe, door(D)), belives(joe, has(R, D))))))
- % ).
- % th_nnf_out :-
- % ~ (n(neg(knows(joe, room(R)))), n(tru(belives(joe, door(D)))), n(neg(skolem(D, skFn((belives(joe, door(D)), belives(joe, has(R, D)))))));n(neg(knows(joe, room(R)))), n(tru(belives(joe, has(R, D)))), n(neg(skolem(D, skFn((belives(joe, door(D)), belives(joe, has(R, D)))))))).
- % proven_neg(knows(joe, room(R))) :-
- % ~belives(joe, door(D)),
- % skolem(D, skFn((belives(joe, door(D)), belives(joe, has(R, D))))).
- % proven_tru(belives(joe, door(D))) :-
- % knows(joe, room(R)),
- % skolem(D, skFn((belives(joe, door(D)), belives(joe, has(R, D))))).
- % proven_neg(skolem(D, skFn((belives(joe, door(D)), belives(joe, has(R, D)))))) :-
- % ~belives(joe, door(D)),
- % knows(joe, room(R)).
- % proven_neg(knows(joe, room(R))) :-
- % ~belives(joe, has(R, D)),
- % skolem(D, skFn((belives(joe, door(D)), belives(joe, has(R, D))))).
- % proven_tru(belives(joe, has(R, D))) :-
- % knows(joe, room(R)),
- % skolem(D, skFn((belives(joe, door(D)), belives(joe, has(R, D))))).
- % proven_neg(skolem(D, skFn((belives(joe, door(D)), belives(joe, has(R, D)))))) :-
- % ~belives(joe, has(R, D)),
- % knows(joe, room(R)).
- % pfc :-
- % ~belives(joe, door(D)), {ignore(D=skFn((belives(joe, door(D)), belives(joe, has(R, D)))))}, {is_unit(R)}==>proven_neg(knows(joe, room(R))).
- % pfc :-
- % knows(joe, room(R)), {is_unit(R)}==>if_missing(if_missing(proven_tru(belives(joe, door(_97822))), proven_tru(belives(joe, door(skFn(belives(joe, door(D))&belives(joe, has(R, D))))))), if_missing(proven_tru(belives(joe, door(_97822))), proven_tru(belives(joe, door(skFn(belives(joe, door(skFn((belives(joe, door(D)), belives(joe, has(R, D))))))&belives(joe, has(R, skFn((belives(joe, door(D)), belives(joe, has(R, D)))))))))))).
- % pfc :-
- % ~belives(joe, door(D)), knows(joe, room(R)), {is_unit(D, R)}==>if_missing(proven_neg(skolem(_124526, skFn((belives(joe, door(_124526)), belives(joe, has(R, _124526)))))), proven_neg(skolem(skFn(belives(joe, door(D))&belives(joe, has(R, D))), skFn((belives(joe, door(skFn(belives(joe, door(D))&belives(joe, has(R, D))))), belives(joe, has(R, skFn(belives(joe, door(D))&belives(joe, has(R, D)))))))))).
- % pfc :-
- % ~belives(joe, has(R, D)), {ignore(D=skFn((belives(joe, door(D)), belives(joe, has(R, D)))))}, {is_unit(R)}==>proven_neg(knows(joe, room(R))).
- % pfc :-
- % knows(joe, room(R)), {is_unit(R)}==>if_missing(if_missing(proven_tru(belives(joe, has(R, _166894))), proven_tru(belives(joe, has(R, skFn(belives(joe, door(D))&belives(joe, has(R, D))))))), if_missing(proven_tru(belives(joe, has(R, _166894))), proven_tru(belives(joe, has(R, skFn(belives(joe, door(skFn((belives(joe, door(D)), belives(joe, has(R, D))))))&belives(joe, has(R, skFn((belives(joe, door(D)), belives(joe, has(R, D)))))))))))).
- % pfc :-
- % ~belives(joe, has(R, D)), knows(joe, room(R)), {is_unit(D, R)}==>if_missing(proven_neg(skolem(_193956, skFn((belives(joe, door(_193956)), belives(joe, has(R, _193956)))))), proven_neg(skolem(skFn(belives(joe, door(D))&belives(joe, has(R, D))), skFn((belives(joe, door(skFn(belives(joe, door(D))&belives(joe, has(R, D))))), belives(joe, has(R, skFn(belives(joe, door(D))&belives(joe, has(R, D)))))))))).
- */
- % ~knows(joe, room(A)) :-
- % \+ (
- % belives(joe, door(B))
- % ).
- % ~knows(joe, room(A)) :-
- % \+ (
- % belives(joe, has(A, B))
- % ).
- % belives(joe, door(A)) :-
- % knows(joe, room(B)),
- % skolem(A, skIsDoorInUnkArg2ofHas_3Fn(B)).
- % belives(joe, has(A, B)) :-
- % knows(joe, room(A)),
- % skolem(B, skIsDoorInUnkArg2ofHas_3Fn(A)).
- % ============================================================
- % For joe to eat the food it must be possible that the food is food and joe can eat it
- % ============================================================
- :- test_boxlog((poss(eats(joe, X)&food(X))=>eats(joe, X), food(X))).
- /*
- % /home/prologmud_server/lib/swipl/pack/logicmoo_base/t/examples/fol/boxlog_sanity.pl:83
- % :- test_boxlog((poss(eats(joe, X_VAR)&food(X_VAR))=>eats(joe, X_VAR), food(X_VAR))).
- % debugm(user, sc_success(user, user:nnf(KB, all(X, (poss(b_d(KB, nesc, poss), eats(joe, X)&food(X))=>eats(joe, X)&food(X))), nesc(b_d(KB, nesc, poss), ~eats(joe, X)v~food(X))v(eats(joe, X)&food(X))))).
- % nnf :-
- % nesc(~eats(joe, X)v~food(X))v(eats(joe, X)&food(X)).
- % th_nnf_in :-
- % ( ( neg(eats(joe, X))
- % ; neg(food(X))
- % )
- % ; tru(eats(joe, X)),
- % tru(food(X))
- % ).
- % th_nnf_out :-
- % ~ ((n(neg(eats(joe, X))), n(neg(food(X)))), (n(tru(eats(joe, X)));n(tru(food(X))))).
- % proven_neg(eats(joe, X)) :-
- % naf(eats(joe, X)).
- % proven_neg(food(X)) :-
- % naf(food(X)).
- % proven_tru(eats(joe, X)) :-
- % food(X),
- % poss(eats(joe, X)).
- % proven_tru(food(X)) :-
- % eats(joe, X),
- % poss(food(X)).
- % pfc :-
- % naf(eats(joe, X)), {is_unit(X)}==>proven_neg(eats(joe, X)).
- % pfc :-
- % naf(food(X)), {is_unit(X)}==>proven_neg(food(X)).
- % pfc :-
- % food(X), poss(eats(joe, X)), {is_unit(X)}==>proven_tru(eats(joe, X)).
- % pfc :-
- % eats(joe, X), poss(food(X)), {is_unit(X)}==>proven_tru(food(X)).
- */
- % eats(joe,X) :-
- % \+ ~eats(joe,X),
- % \+ ~food(X).
- % food(X) :-
- % \+ ~eats(joe,X),
- % \+ ~food(X).
- % ============================================================================================
- % At least one man exists
- % ============================================================================================
- :- test_boxlog(atleast(1, X, man(X))).
- /*
- % /home/prologmud_server/lib/swipl/pack/logicmoo_base/t/examples/fol/boxlog_sanity.pl:96
- % :- test_boxlog(atleast(1, X_VAR, man(X_VAR))).
- % kif :-
- % all(X, atleast(1, X, man(X))).
- % qualify_nesc :-
- % all(X, nesc(atleast(1, X, man(X)))).
- % debugm(user, sc_success(user, user:nnf(KB, all(X, nesc(b_d(KB, nesc, poss), atleast(1, X, man(X)))), nesc(b_d(KB, nesc, poss), man(X)v~skolem(X, skFn(man(X))))))).
- % nnf :-
- % nesc(man(X)v~skolem(X, skFn(man(X)))).
- % th_nnf_in :-
- % ( tru(man(X))
- % ; neg(skolem(X, skFn(man(X))))
- % ).
- % th_nnf_out :-
- % ~ (n(tru(man(X))), n(neg(skolem(X, skFn(man(X)))))).
- % proven_tru(man(X)) :-
- % skolem(X, skFn(man(X))).
- % proven_neg(skolem(X, skFn(man(X)))) :-
- % ~man(X).
- % pfc :-
- % if_missing(if_missing(proven_tru(man(_414162)),
- % proven_tru(man(skFn(man(X))))),
- % if_missing(proven_tru(man(_414162)),
- % proven_tru(man(skFn(man(skFn(man(X)))))))).
- % pfc :-
- % ~man(X), {is_unit(X)}==>if_missing(proven_neg(skolem(_427034, skFn(man(_427034)))), proven_neg(skolem(skFn(man(X)), skFn(man(skFn(man(X))))))).
- */
- % ============================================================================================
- % At least three men exist
- % ============================================================================================
- :- test_boxlog(atleast(3, X, man(X))).
- /*
- % /home/prologmud_server/lib/swipl/pack/logicmoo_base/t/examples/fol/boxlog_sanity.pl:102
- % :- test_boxlog(atleast(3, X_VAR, man(X_VAR))).
- % kif :-
- % all(X, atleast(3, X, man(X))).
- % qualify_nesc :-
- % all(X, nesc(atleast(3, X, man(X)))).
- % debugm(user, sc_success(user, user:nnf(KB, all(X, nesc(b_d(KB, nesc, poss), atleast(3, X, man(X)))), nesc(b_d(KB, nesc, poss), ~man(X)v~man(_1540)v~man(_1548)v different(X, _1540))&nesc(b_d(KB, nesc, poss), ~man(X)v~man(_1540)v~man(_1548)v different(X, _1548))&nesc(b_d(KB, nesc, poss), ~man(X)v~man(_1540)v~man(_1548)v different(_1540, _1548))))).
- % nnf :-
- % nesc(~man(X)v~man(_1540)v~man(_1548)v different(X, _1540))&nesc(~man(X)v~man(_1540)v~man(_1548)v different(X, _1548))&nesc(~man(X)v~man(_1540)v~man(_1548)v different(_1540, _1548)).
- % th_nnf_in :-
- % ( ( ( ( neg(man(X))
- % ; neg(man(_1540))
- % )
- % ; neg(man(_1548))
- % )
- % ; tru(different(X, _1540))
- % ),
- % ( ( ( neg(man(X))
- % ; neg(man(_1540))
- % )
- % ; neg(man(_1548))
- % )
- % ; tru(different(X, _1548))
- % )
- % ),
- % ( ( ( neg(man(X))
- % ; neg(man(_1540))
- % )
- % ; neg(man(_1548))
- % )
- % ; tru(different(_1540, _1548))
- % ).
- % th_nnf_out :-
- % ~ ((((n(neg(man(X))), n(neg(man(_1540)))), n(neg(man(_1548)))), n(tru(different(X, _1540)));((n(neg(man(X))), n(neg(man(_1540)))), n(neg(man(_1548)))), n(tru(different(X, _1548))));((n(neg(man(X))), n(neg(man(_1540)))), n(neg(man(_1548)))), n(tru(different(_1540, _1548)))).
- % proven_neg(man(X)) :-
- % man(_1540),
- % man(_1548),
- % ~different(X, _1540).
- % proven_neg(man(_1540)) :-
- % man(X),
- % man(_1548),
- % ~different(X, _1540).
- % proven_neg(man(_1548)) :-
- % man(X),
- % man(_1540),
- % ~different(X, _1540).
- % proven_tru(different(X, _1540)) :-
- % man(X),
- % man(_1540),
- % man(_1548).
- % proven_neg(man(X)) :-
- % man(_1540),
- % man(_1548),
- % ~different(X, _1548).
- % proven_neg(man(_1540)) :-
- % man(X),
- % man(_1548),
- % ~different(X, _1548).
- % proven_neg(man(_1548)) :-
- % man(X),
- % man(_1540),
- % ~different(X, _1548).
- % proven_tru(different(X, _1548)) :-
- % man(X),
- % man(_1540),
- % man(_1548).
- % proven_neg(man(X)) :-
- % man(_1540),
- % man(_1548),
- % ~different(_1540, _1548).
- % proven_neg(man(_1540)) :-
- % man(X),
- % man(_1548),
- % ~different(_1540, _1548).
- % proven_neg(man(_1548)) :-
- % man(X),
- % man(_1540),
- % ~different(_1540, _1548).
- % proven_tru(different(_1540, _1548)) :-
- % man(X),
- % man(_1540),
- % man(_1548).
- % pfc :-
- % man(_1540), man(_1548), not_different(X, _1540), {is_unit(X)}==>proven_neg(man(X)).
- % pfc :-
- % man(X), man(_1548), not_different(X, _1540), {is_unit(_1540)}==>proven_neg(man(_1540)).
- % pfc :-
- % man(X), man(_1540), not_different(X, _1540), {is_unit}==>proven_neg(man(_1548)).
- % pfc :-
- % man(X), man(_1540), man(_1548), {is_unit(_1540, X)}==>proven_tru(different(X, _1540)).
- % pfc :-
- % man(_1540), man(_1548), not_different(X, _1548), {is_unit(X)}==>proven_neg(man(X)).
- % pfc :-
- % man(X), man(_1548), not_different(X, _1548), {is_unit}==>proven_neg(man(_1540)).
- % pfc :-
- % man(X), man(_1540), not_different(X, _1548), {is_unit(_1548)}==>proven_neg(man(_1548)).
- % pfc :-
- % man(X), man(_1540), man(_1548), {is_unit(_1548, X)}==>proven_tru(different(X, _1548)).
- % pfc :-
- % man(_1540), man(_1548), not_different(_1540, _1548), {is_unit}==>proven_neg(man(X)).
- % pfc :-
- % man(X), man(_1548), not_different(_1540, _1548), {is_unit(_1540)}==>proven_neg(man(_1540)).
- % pfc :-
- % man(X), man(_1540), not_different(_1540, _1548), {is_unit(_1548)}==>proven_neg(man(_1548)).
- % pfc :-
- % man(X), man(_1540), man(_1548), {is_unit(_1548, _1540)}==>proven_tru(different(_1540, _1548)).
- */
- % ============================================================================================
- % Organized Groups of prolog programmers have prolog programmers as members
- % ============================================================================================
- :- test_boxlog(implies(and(instance(M, tGroupedPrologOrganization),
- hasMembers(M, A)),
- instance(A, tClazzPrologPerson))).
- /*
- % /home/prologmud_server/lib/swipl/pack/logicmoo_base/t/examples/fol/boxlog_sanity.pl:108
- % :- test_boxlog(implies(and(instance(M_VAR, tGroupedPrologOrganization),
- % hasMembers(M_VAR, A_VAR)),
- % instance(A_VAR, tClazzPrologPerson))).
- % kif :-
- % all(M,
- % all(A,
- % (tGroupedPrologOrganization(M)&hasMembers(M, A)=>tClazzPrologPerson(A)))).
- % qualify_nesc :-
- % all(M,
- % all(A,
- % nesc((tGroupedPrologOrganization(M)&hasMembers(M, A)=>tClazzPrologPerson(A))))).
- % debugm(user, sc_success(user, user:nnf(KB, all(M, all(A, nesc(b_d(KB, nesc, poss), (tGroupedPrologOrganization(M)&hasMembers(M, A)=>tClazzPrologPerson(A))))), nesc(b_d(KB, nesc, poss), ~tGroupedPrologOrganization(M)v~hasMembers(M, A)v tClazzPrologPerson(A))))).
- % nnf :-
- % nesc(~tGroupedPrologOrganization(M)v~hasMembers(M, A)v tClazzPrologPerson(A)).
- % th_nnf_in :-
- % ( ( neg(tGroupedPrologOrganization(M))
- % ; neg(hasMembers(M, A))
- % )
- % ; tru(isa(A, tClazzPrologPerson))
- % ).
- % th_nnf_out :-
- % ~ ((n(neg(tGroupedPrologOrganization(M))), n(neg(hasMembers(M, A)))), n(tru(isa(A, tClazzPrologPerson)))).
- % proven_neg(tGroupedPrologOrganization(M)) :-
- % hasMembers(M, A),
- % ~isa(A, tClazzPrologPerson).
- % proven_neg(hasMembers(M, A)) :-
- % tGroupedPrologOrganization(M),
- % ~isa(A, tClazzPrologPerson).
- % proven_tru(isa(A, tClazzPrologPerson)) :-
- % tGroupedPrologOrganization(M),
- % hasMembers(M, A).
- % pfc :-
- % hasMembers(M, A), ~tClazzPrologPerson(A), {is_unit(M)}==>proven_neg(tGroupedPrologOrganization(M)).
- % pfc :-
- % tGroupedPrologOrganization(M), ~tClazzPrologPerson(A), {is_unit(A, M)}==>proven_neg(hasMembers(M, A)).
- % pfc :-
- % tGroupedPrologOrganization(M), hasMembers(M, A), {is_unit(A)}==>proven_tru(tClazzPrologPerson(A)).
- */
- /*
- ~hasMembers(_11164,_11142):- \+ (instance(_11164,tGroupedPrologOrganization),instance(_11142,tClazzPrologPerson)).
- ~instance(_11540,tGroupedPrologOrganization):- \+ (hasMembers(_11540,_11518),instance(_11518,tClazzPrologPerson)).
- instance(_11874,tClazzPrologPerson):-instance(_11896,tGroupedPrologOrganization),hasMembers(_11896,_11874).
- */
- % ============================================================================================
- % Those competeing in watersports may not wear shoes
- % ============================================================================================
- :- test_boxlog((instance(ATH, tAgent)=>implies(and(instance(COMP, actAquaticSportsEvent), competingAgents(COMP, ATH)), holdsIn(COMP, all(CLOTHING, not(and(instance(CLOTHING, tObjectShoe), wearsClothing(ATH, CLOTHING)))))))).
- /*
- % /home/prologmud_server/lib/swipl/pack/logicmoo_base/t/examples/fol/boxlog_sanity.pl:120
- % :- test_boxlog((instance(ATH_VAR, tAgent)=>implies(and(instance(COMP_VAR, actAquaticSportsEvent), competingAgents(COMP_VAR, ATH_VAR)), holdsIn(COMP_VAR, all(CLOTHING_VAR, not(and(instance(CLOTHING_VAR, tObjectShoe), wearsClothing(ATH_VAR, CLOTHING_VAR)))))))).
- % kif :-
- % all(COMP,
- % all(ATH,
- % (tAgent(ATH)=>(actAquaticSportsEvent(COMP)&competingAgents(COMP, ATH)=>holdsIn(COMP, all(CLOTHING, ~ (tObjectShoe(CLOTHING)&wearsClothing(ATH, CLOTHING)))))))).
- % qualify_nesc :-
- % all(COMP,
- % all(ATH,
- % nesc((tAgent(ATH)=>(actAquaticSportsEvent(COMP)&competingAgents(COMP, ATH)=>holdsIn(COMP, all(CLOTHING, ~ (tObjectShoe(CLOTHING)&wearsClothing(ATH, CLOTHING))))))))).
- % debugm(user, sc_success(user, user:nnf(KB, all(COMP, all(ATH, nesc(b_d(KB, nesc, poss), (tAgent(ATH)=>(actAquaticSportsEvent(COMP)&competingAgents(COMP, ATH)=>holdsIn(COMP, all(CLOTHING, ~ (tObjectShoe(CLOTHING)&wearsClothing(ATH, CLOTHING))))))))), nesc(b_d(KB, nesc, poss), ~tAgent(ATH)v(~actAquaticSportsEvent(COMP)v~competingAgents(COMP, ATH)v(~occuring(COMP)v(~tObjectShoe(CLOTHING)v~wearsClothing(ATH, CLOTHING)))))))).
- % nnf :-
- % nesc(~tAgent(ATH)v(~actAquaticSportsEvent(COMP)v~competingAgents(COMP, ATH)v(~occuring(COMP)v(~tObjectShoe(CLOTHING)v~wearsClothing(ATH, CLOTHING))))).
- % th_nnf_in :-
- % ( neg(tAgent(ATH))
- % ; ( neg(actAquaticSportsEvent(COMP))
- % ; neg(competingAgents(COMP, ATH))
- % )
- % ; neg(occuring(COMP))
- % ; neg(tObjectShoe(CLOTHING))
- % ; neg(wearsClothing(ATH, CLOTHING))
- % ).
- % th_nnf_out :-
- % ~ (n(neg(tAgent(ATH))), (n(neg(actAquaticSportsEvent(COMP))), n(neg(competingAgents(COMP, ATH)))), n(neg(occuring(COMP))), n(neg(tObjectShoe(CLOTHING))), n(neg(wearsClothing(ATH, CLOTHING)))).
- % proven_neg(tAgent(ATH)) :-
- % actAquaticSportsEvent(COMP),
- % competingAgents(COMP, ATH),
- % occuring(COMP),
- % tObjectShoe(CLOTHING),
- % wearsClothing(ATH, CLOTHING).
- % proven_neg(actAquaticSportsEvent(COMP)) :-
- % competingAgents(COMP, ATH),
- % occuring(COMP),
- % tObjectShoe(CLOTHING),
- % wearsClothing(ATH, CLOTHING),
- % tAgent(ATH).
- % proven_neg(competingAgents(COMP, ATH)) :-
- % actAquaticSportsEvent(COMP),
- % occuring(COMP),
- % tObjectShoe(CLOTHING),
- % wearsClothing(ATH, CLOTHING),
- % tAgent(ATH).
- % proven_neg(occuring(COMP)) :-
- % tObjectShoe(CLOTHING),
- % wearsClothing(ATH, CLOTHING),
- % actAquaticSportsEvent(COMP),
- % competingAgents(COMP, ATH),
- % tAgent(ATH).
- % proven_neg(tObjectShoe(CLOTHING)) :-
- % wearsClothing(ATH, CLOTHING),
- % occuring(COMP),
- % actAquaticSportsEvent(COMP),
- % competingAgents(COMP, ATH),
- % tAgent(ATH).
- % proven_neg(wearsClothing(ATH, CLOTHING)) :-
- % tObjectShoe(CLOTHING),
- % occuring(COMP),
- % actAquaticSportsEvent(COMP),
- % competingAgents(COMP, ATH),
- % tAgent(ATH).
- % pfc :-
- % actAquaticSportsEvent(COMP), competingAgents(COMP, ATH), occuring(COMP), tObjectShoe(CLOTHING), wearsClothing(ATH, CLOTHING), {is_unit(ATH)}==>proven_neg(tAgent(ATH)).
- % pfc :-
- % competingAgents(COMP, ATH), occuring(COMP), tObjectShoe(CLOTHING), wearsClothing(ATH, CLOTHING), tAgent(ATH), {is_unit(COMP)}==>proven_neg(actAquaticSportsEvent(COMP)).
- % pfc :-
- % actAquaticSportsEvent(COMP), occuring(COMP), tObjectShoe(CLOTHING), wearsClothing(ATH, CLOTHING), tAgent(ATH), {is_unit(ATH, COMP)}==>proven_neg(competingAgents(COMP, ATH)).
- % pfc :-
- % tObjectShoe(CLOTHING), wearsClothing(ATH, CLOTHING), actAquaticSportsEvent(COMP), competingAgents(COMP, ATH), tAgent(ATH), {is_unit(COMP)}==>proven_neg(occuring(COMP)).
- % pfc :-
- % wearsClothing(ATH, CLOTHING), occuring(COMP), actAquaticSportsEvent(COMP), competingAgents(COMP, ATH), tAgent(ATH), {is_unit(CLOTHING)}==>proven_neg(tObjectShoe(CLOTHING)).
- % pfc :-
- % tObjectShoe(CLOTHING), occuring(COMP), actAquaticSportsEvent(COMP), competingAgents(COMP, ATH), tAgent(ATH), {is_unit(CLOTHING, ATH)}==>proven_neg(wearsClothing(ATH, CLOTHING)).
- */
- /*
- ~competingAgents(_20514,_20492):- ~holdsIn(_20514,v(~instance(_20470,tObjectShoe),~wearsClothing(_20492,_20470))),instance(_20514,actAquaticSportsEvent),instance(_20492,tAgent)
- ~instance(_20902,tAgent):- ~holdsIn(_20858,v(~instance(_20880,tObjectShoe),~wearsClothing(_20902,_20880))),instance(_20858,actAquaticSportsEvent),competingAgents(_20858,_20902)
- ~instance(_21272,actAquaticSportsEvent):- ~holdsIn(_21272,v(~instance(_21250,tObjectShoe),~wearsClothing(_21228,_21250))),competingAgents(_21272,_21228),instance(_21228,tAgent)
- holdsIn(_21612,v(~instance(_21634,tObjectShoe),~wearsClothing(_21590,_21634))):-instance(_21612,actAquaticSportsEvent),competingAgents(_21612,_21590),instance(_21590,tAgent)
- */
- % ~occuring(COMP) :-
- % instance(ATH, tAgent),
- % instance(COMP, actAquaticSportsEvent),
- % competingAgents(COMP, ATH),
- % instance(CLOTHING, tObjectShoe),
- % wearsClothing(ATH, CLOTHING).
- % ~competingAgents(COMP, ATH) :-
- % instance(ATH, tAgent),
- % instance(COMP, actAquaticSportsEvent),
- % occuring(COMP),
- % instance(CLOTHING, tObjectShoe),
- % wearsClothing(ATH, CLOTHING).
- % ~instance(CLOTHING, tObjectShoe) :-
- % instance(ATH, tAgent),
- % instance(COMP, actAquaticSportsEvent),
- % competingAgents(COMP, ATH),
- % occuring(COMP),
- % wearsClothing(ATH, CLOTHING).
- % ~instance(COMP, actAquaticSportsEvent) :-
- % instance(ATH, tAgent),
- % competingAgents(COMP, ATH),
- % occuring(COMP),
- % instance(CLOTHING, tObjectShoe),
- % wearsClothing(ATH, CLOTHING).
- % ~instance(ATH, tAgent) :-
- % instance(COMP, actAquaticSportsEvent),
- % competingAgents(COMP, ATH),
- % occuring(COMP),
- % instance(CLOTHING, tObjectShoe),
- % wearsClothing(ATH, CLOTHING).
- % ~wearsClothing(ATH, CLOTHING) :-
- % instance(ATH, tAgent),
- % instance(COMP, actAquaticSportsEvent),
- % competingAgents(COMP, ATH),
- % occuring(COMP),
- % instance(CLOTHING, tObjectShoe).
- % ================================================================================================================
- % When sightgseeing is occuring .. there is a tourist present
- % ================================================================================================================
- :- test_boxlog(implies(and(instance(Act, actSightseeing),
- performedBy(Person, Act)),
- holdsIn(Act, instance(Person, mobTourist)))).
- /*
- % /home/prologmud_server/lib/swipl/pack/logicmoo_base/t/examples/fol/boxlog_sanity.pl:168
- % :- test_boxlog(implies(and(instance(Act_VAR, actSightseeing),
- % performedBy(Person_VAR, Act_VAR)),
- % holdsIn(Act_VAR, instance(Person_VAR, mobTourist)))).
- % kif :-
- % all(Act,
- % all(Person,
- % (actSightseeing(Act)&performedBy(Person, Act)=>holdsIn(Act, mobTourist(Person))))).
- % qualify_nesc :-
- % all(Act,
- % all(Person,
- % nesc((actSightseeing(Act)&performedBy(Person, Act)=>holdsIn(Act, mobTourist(Person)))))).
- % debugm(user, sc_success(user, user:nnf(KB, all(Act, all(Person, nesc(b_d(KB, nesc, poss), (actSightseeing(Act)&performedBy(Person, Act)=>holdsIn(Act, mobTourist(Person)))))), nesc(b_d(KB, nesc, poss), ~actSightseeing(Act)v~performedBy(Person, Act)v(~occuring(Act)v mobTourist(Person)))))).
- % nnf :-
- % nesc(~actSightseeing(Act)v~performedBy(Person, Act)v(~occuring(Act)v mobTourist(Person))).
- % th_nnf_in :-
- % ( ( neg(actSightseeing(Act))
- % ; neg(performedBy(Person, Act))
- % )
- % ; neg(occuring(Act))
- % ; tru(mobTourist(Person))
- % ).
- % th_nnf_out :-
- % ~ ((n(neg(actSightseeing(Act))), n(neg(performedBy(Person, Act)))), n(neg(occuring(Act))), n(tru(mobTourist(Person)))).
- % proven_neg(actSightseeing(Act)) :-
- % performedBy(Person, Act),
- % occuring(Act),
- % ~mobTourist(Person).
- % proven_neg(performedBy(Person, Act)) :-
- % actSightseeing(Act),
- % occuring(Act),
- % ~mobTourist(Person).
- % proven_neg(occuring(Act)) :-
- % ~mobTourist(Person),
- % actSightseeing(Act),
- % performedBy(Person, Act).
- % proven_tru(mobTourist(Person)) :-
- % occuring(Act),
- % actSightseeing(Act),
- % performedBy(Person, Act).
- % pfc :-
- % performedBy(Person, Act), occuring(Act), ~mobTourist(Person), {is_unit(Act)}==>proven_neg(actSightseeing(Act)).
- % pfc :-
- % actSightseeing(Act), occuring(Act), ~mobTourist(Person), {is_unit(Act, Person)}==>proven_neg(performedBy(Person, Act)).
- % pfc :-
- % ~mobTourist(Person), actSightseeing(Act), performedBy(Person, Act), {is_unit(Act)}==>proven_neg(occuring(Act)).
- % pfc :-
- % occuring(Act), actSightseeing(Act), performedBy(Person, Act), {is_unit(Person)}==>proven_tru(mobTourist(Person)).
- */
- /* OLD
- ~instance(_11704,actSightseeing):- \+ (performedBy(_11704,_11682),holdsIn(_11704,instance(_11682,mobTourist)))
- ~performedBy(_12092,_12070):- \+ (instance(_12092,actSightseeing),holdsIn(_12092,instance(_12070,mobTourist)))
- holdsIn(_12442,instance(_12420,mobTourist)):-instance(_12442,actSightseeing),performedBy(_12442,_12420)
- */
- % ~occuring(Act) :-
- % \+ ( instance(Act, actSightseeing),
- % naf(~performedBy(Person, Act)),
- % instance(Y, mobTourist)
- % ).
- % ~instance(Act, actSightseeing) :-
- % \+ ( performedBy(Person, Act),
- % naf(~occuring(Act)),
- % instance(Y, mobTourist)
- % ).
- % ~performedBy(Person, Act) :-
- % \+ ( instance(Act, actSightseeing),
- % naf(~occuring(Act)),
- % instance(Y, mobTourist)
- % ).
- % instance(Y, mobTourist) :-
- % instance(Act, actSightseeing),
- % performedBy(Person, Act),
- % occuring(Act).
- % ================================================================================================================
- % All rooms have a door (Odd syntax issue)
- % ================================================================================================================
- :- test_boxlog(all(R, (room(R)=>exists(D, and([door(D), has(R, D)]))))).
- /*
- % /home/prologmud_server/lib/swipl/pack/logicmoo_base/t/examples/fol/boxlog_sanity.pl:201
- % :- test_boxlog(all(R_VAR,
- % (room(R_VAR)=>exists(D_VAR, and([door(D_VAR), has(R_VAR, D_VAR)]))))).
- % kif :-
- % all(R, (room(R)=>exists(D, [door(D), has(R, D)]))).
- % qualify_nesc :-
- % all(R, nesc((room(R)=>exists(D, [door(D), has(R, D)])))).
- % debugm(user, sc_success(user, user:nnf(KB, all(R, nesc(b_d(KB, nesc, poss), (room(R)=>exists(D, [door(D), has(R, D)])))), nesc(b_d(KB, nesc, poss), ~room(R)v(~skolem(D, skFn([door(D), has(R, D)]))v[door(D), has(R, D)]))))).
- % nnf :-
- % nesc(~room(R)v(~skolem(D, skFn([door(D), has(R, D)]))v[door(D), has(R, D)])).
- % th_nnf_in :-
- % ( neg(room(R))
- % ; neg(skolem(D, skFn([door(D), has(R, D)])))
- % ; tru([door(D), has(R, D)])
- % ).
- % th_nnf_out :-
- % ~ (n(neg(room(R))), n(neg(skolem(D, skFn([door(D), has(R, D)])))), n(tru([door(D), has(R, D)]))).
- % proven_neg(room(R)) :-
- % skolem(D, skFn([door(D), has(R, D)])),
- % ~[door(D), has(R, D)].
- % proven_neg(skolem(D, skFn([door(D), has(R, D)]))) :-
- % room(R),
- % ~[door(D), has(R, D)].
- % proven_tru([door(D), has(R, D)]) :-
- % room(R),
- % skolem(D, skFn([door(D), has(R, D)])).
- % pfc :-
- % {ignore(D=skFn([door(D), has(R, D)]))}, ~[door(D), has(R, D)], {is_unit(R)}==>proven_neg(room(R)).
- % pfc :-
- % room(R), ~[door(D), has(R, D)], {is_unit(D, R)}==>if_missing(proven_neg(skolem(_186806, skFn([door(_186806), has(R, _186806)]))), proven_neg(skolem(skFn([door(D), has(R, D)]), skFn([door(skFn([door(D), has(R, D)])), has(R, skFn([door(D), has(R, D)]))])))).
- % pfc :-
- % room(R), {is_unit(R)}==>if_missing(if_missing(proven_tru([door(_209580), has(R, _209580)]), proven_tru([door(skFn([door(D), has(R, D)])), has(R, skFn([door(D), has(R, D)]))])), if_missing(proven_tru([door(_209580), has(R, _209580)]), proven_tru([door(skFn([door(skFn([door(D), has(R, D)])), has(R, skFn([door(D), has(R, D)]))])), has(R, skFn([door(skFn([door(D), has(R, D)])), has(R, skFn([door(D), has(R, D)]))]))]))).
- */
- % door(D) :-
- % room(R),
- % skolem(D, skIsDoorInUnkArg2ofHas_2Fn(R)),
- % \+ ~has(R, D).
- % ~room(R) :-
- % \+ ( has(R, D),
- % door(D)
- % ).
- % has(R, D) :-
- % room(R),
- % skolem(D, skIsDoorInUnkArg2ofHas_2Fn(R)),
- % \+ ~door(D).
- % ================================================================================================================
- % No one whom pays taxes in North america can be a dependant of another in the same year
- % ================================================================================================================
- :- test_boxlog(or(holdsIn(YEAR,
- instance(PERSON,
- nartR(tClazzCitizenFn,
- iGroup_UnitedStatesOfAmerica))),
- holdsIn(YEAR,
- instance(PERSON,
- nartR(mobTaxResidentsFn, iGroup_Canada))),
- holdsIn(YEAR,
- instance(PERSON, nartR(mobTaxResidentsFn, iMexico))),
- holdsIn(YEAR,
- instance(PERSON,
- nartR(mobTaxResidentsFn,
- iGroup_UnitedStatesOfAmerica))),
- forbiddenToDoWrt(iCW_USIncomeTax,
- SUPPORTER,
- claimsAsDependent(YEAR,
- SUPPORTER,
- _SUPPORTEE)))).
- /*
- % /home/prologmud_server/lib/swipl/pack/logicmoo_base/t/examples/fol/boxlog_sanity.pl:222
- % :- test_boxlog(or(holdsIn(YEAR_VAR,
- % instance(PERSON_VAR,
- % nartR(tClazzCitizenFn,
- % iGroup_UnitedStatesOfAmerica))),
- % holdsIn(YEAR_VAR,
- % instance(PERSON_VAR,
- % nartR(mobTaxResidentsFn, iGroup_Canada))),
- % holdsIn(YEAR_VAR,
- % instance(PERSON_VAR,
- % nartR(mobTaxResidentsFn, iMexico))),
- % holdsIn(YEAR_VAR,
- % instance(PERSON_VAR,
- % nartR(mobTaxResidentsFn,
- % iGroup_UnitedStatesOfAmerica))),
- % forbiddenToDoWrt(iCW_USIncomeTax,
- % SUPPORTER_VAR,
- % claimsAsDependent(YEAR_VAR,
- % SUPPORTER_VAR,
- % _SUPPORTEE_VAR)))).
- % kif :-
- % all(YEAR,
- % all(PERSON,
- % all(SUPPORTER,
- % all(_SUPPORTEE,
- % holdsIn(YEAR, isa(PERSON, tClazzCitizenFn(iGroup_UnitedStatesOfAmerica)))v(holdsIn(YEAR, isa(PERSON, mobTaxResidentsFn(iGroup_Canada)))v(holdsIn(YEAR, isa(PERSON, mobTaxResidentsFn(iMexico)))v(holdsIn(YEAR, isa(PERSON, mobTaxResidentsFn(iGroup_UnitedStatesOfAmerica)))v forbiddenToDoWrt(iCW_USIncomeTax, SUPPORTER, claimsAsDependent(YEAR, SUPPORTER, _SUPPORTEE))))))))).
- % qualify_nesc :-
- % all(YEAR,
- % all(PERSON,
- % all(SUPPORTER,
- % all(_SUPPORTEE,
- % (~nesc(holdsIn(YEAR, isa(PERSON, tClazzCitizenFn(iGroup_UnitedStatesOfAmerica)))v(holdsIn(YEAR, isa(PERSON, mobTaxResidentsFn(iGroup_Canada)))v(holdsIn(YEAR, isa(PERSON, mobTaxResidentsFn(iMexico)))v(holdsIn(YEAR, isa(PERSON, mobTaxResidentsFn(iGroup_UnitedStatesOfAmerica)))v forbiddenToDoWrt(iCW_USIncomeTax, SUPPORTER, claimsAsDependent(YEAR, SUPPORTER, _SUPPORTEE))))))=>nesc(holdsIn(YEAR, isa(PERSON, tClazzCitizenFn(iGroup_UnitedStatesOfAmerica)))v(holdsIn(YEAR, isa(PERSON, mobTaxResidentsFn(iGroup_Canada)))v(holdsIn(YEAR, isa(PERSON, mobTaxResidentsFn(iMexico)))v(holdsIn(YEAR, isa(PERSON, mobTaxResidentsFn(iGroup_UnitedStatesOfAmerica)))v forbiddenToDoWrt(iCW_USIncomeTax, SUPPORTER, claimsAsDependent(YEAR, SUPPORTER, _SUPPORTEE))))))))))).
- % debugm(user, sc_success(user, user:nnf(KB, all(YEAR, all(PERSON, all(SUPPORTER, all(_SUPPORTEE, (~nesc(holdsIn(YEAR, isa(PERSON, tClazzCitizenFn(iGroup_UnitedStatesOfAmerica)))v(holdsIn(YEAR, isa(PERSON, mobTaxResidentsFn(iGroup_Canada)))v(holdsIn(YEAR, isa(PERSON, mobTaxResidentsFn(iMexico)))v(holdsIn(YEAR, isa(PERSON, mobTaxResidentsFn(iGroup_UnitedStatesOfAmerica)))v forbiddenToDoWrt(iCW_USIncomeTax, SUPPORTER, claimsAsDependent(YEAR, SUPPORTER, _SUPPORTEE))))))=>nesc(b_d(KB, nesc, poss), holdsIn(YEAR, isa(PERSON, tClazzCitizenFn(iGroup_UnitedStatesOfAmerica)))v(holdsIn(YEAR, isa(PERSON, mobTaxResidentsFn(iGroup_Canada)))v(holdsIn(YEAR, isa(PERSON, mobTaxResidentsFn(iMexico)))v(holdsIn(YEAR, isa(PERSON, mobTaxResidentsFn(iGroup_UnitedStatesOfAmerica)))v forbiddenToDoWrt(iCW_USIncomeTax, SUPPORTER, claimsAsDependent(YEAR, SUPPORTER, _SUPPORTEE))))))))))), nesc(b_d(KB, nesc, poss), ~occuring(YEAR)v isa(PERSON, tClazzCitizenFn(iGroup_UnitedStatesOfAmerica))v(~occuring(YEAR)v isa(PERSON, mobTaxResidentsFn(iGroup_Canada))v(~occuring(YEAR)v isa(PERSON, mobTaxResidentsFn(iMexico))v(~occuring(YEAR)v isa(PERSON, mobTaxResidentsFn(iGroup_UnitedStatesOfAmerica))v forbiddenToDoWrt(iCW_USIncomeTax, SUPPORTER, claimsAsDependent(YEAR, SUPPORTER, _SUPPORTEE))))))v nesc(b_d(KB, nesc, poss), ~occuring(YEAR)v isa(PERSON, tClazzCitizenFn(iGroup_UnitedStatesOfAmerica))v(~occuring(YEAR)v isa(PERSON, mobTaxResidentsFn(iGroup_Canada))v(~occuring(YEAR)v isa(PERSON, mobTaxResidentsFn(iMexico))v(~occuring(YEAR)v isa(PERSON, mobTaxResidentsFn(iGroup_UnitedStatesOfAmerica))v forbiddenToDoWrt(iCW_USIncomeTax, SUPPORTER, claimsAsDependent(YEAR, SUPPORTER, _SUPPORTEE))))))))).
- % nnf :-
- % nesc(~occuring(YEAR)v isa(PERSON, tClazzCitizenFn(iGroup_UnitedStatesOfAmerica))v(~occuring(YEAR)v isa(PERSON, mobTaxResidentsFn(iGroup_Canada))v(~occuring(YEAR)v isa(PERSON, mobTaxResidentsFn(iMexico))v(~occuring(YEAR)v isa(PERSON, mobTaxResidentsFn(iGroup_UnitedStatesOfAmerica))v forbiddenToDoWrt(iCW_USIncomeTax, SUPPORTER, claimsAsDependent(YEAR, SUPPORTER, _SUPPORTEE))))))v nesc(~occuring(YEAR)v isa(PERSON, tClazzCitizenFn(iGroup_UnitedStatesOfAmerica))v(~occuring(YEAR)v isa(PERSON, mobTaxResidentsFn(iGroup_Canada))v(~occuring(YEAR)v isa(PERSON, mobTaxResidentsFn(iMexico))v(~occuring(YEAR)v isa(PERSON, mobTaxResidentsFn(iGroup_UnitedStatesOfAmerica))v forbiddenToDoWrt(iCW_USIncomeTax, SUPPORTER, claimsAsDependent(YEAR, SUPPORTER, _SUPPORTEE)))))).
- % th_nnf_in :-
- % ( ( ( neg(occuring(YEAR))
- % ; tru(isa(PERSON,
- % tClazzCitizenFn(iGroup_UnitedStatesOfAmerica)))
- % )
- % ; ( neg(occuring(YEAR))
- % ; tru(isa(PERSON, mobTaxResidentsFn(iGroup_Canada)))
- % )
- % ; ( neg(occuring(YEAR))
- % ; tru(isa(PERSON, mobTaxResidentsFn(iMexico)))
- % )
- % ; ( neg(occuring(YEAR))
- % ; tru(isa(PERSON,
- % mobTaxResidentsFn(iGroup_UnitedStatesOfAmerica)))
- % )
- % ; tru(forbiddenToDoWrt(iCW_USIncomeTax,
- % SUPPORTER,
- % claimsAsDependent(YEAR,
- % SUPPORTER,
- % _SUPPORTEE)))
- % )
- % ; ( neg(occuring(YEAR))
- % ; tru(isa(PERSON, tClazzCitizenFn(iGroup_UnitedStatesOfAmerica)))
- % )
- % ; ( neg(occuring(YEAR))
- % ; tru(isa(PERSON, mobTaxResidentsFn(iGroup_Canada)))
- % )
- % ; ( neg(occuring(YEAR))
- % ; tru(isa(PERSON, mobTaxResidentsFn(iMexico)))
- % )
- % ; ( neg(occuring(YEAR))
- % ; tru(isa(PERSON,
- % mobTaxResidentsFn(iGroup_UnitedStatesOfAmerica)))
- % )
- % ; tru(forbiddenToDoWrt(iCW_USIncomeTax,
- % SUPPORTER,
- % claimsAsDependent(YEAR, SUPPORTER, _SUPPORTEE)))
- % ).
- % th_nnf_out :-
- % ~ (((n(neg(occuring(YEAR))), n(tru(isa(PERSON, tClazzCitizenFn(iGroup_UnitedStatesOfAmerica))))), (n(neg(occuring(YEAR))), n(tru(isa(PERSON, mobTaxResidentsFn(iGroup_Canada))))), (n(neg(occuring(YEAR))), n(tru(isa(PERSON, mobTaxResidentsFn(iMexico))))), (n(neg(occuring(YEAR))), n(tru(isa(PERSON, mobTaxResidentsFn(iGroup_UnitedStatesOfAmerica))))), n(tru(forbiddenToDoWrt(iCW_USIncomeTax, SUPPORTER, claimsAsDependent(YEAR, SUPPORTER, _SUPPORTEE))))), (n(neg(occuring(YEAR))), n(tru(isa(PERSON, tClazzCitizenFn(iGroup_UnitedStatesOfAmerica))))), (n(neg(occuring(YEAR))), n(tru(isa(PERSON, mobTaxResidentsFn(iGroup_Canada))))), (n(neg(occuring(YEAR))), n(tru(isa(PERSON, mobTaxResidentsFn(iMexico))))), (n(neg(occuring(YEAR))), n(tru(isa(PERSON, mobTaxResidentsFn(iGroup_UnitedStatesOfAmerica))))), n(tru(forbiddenToDoWrt(iCW_USIncomeTax, SUPPORTER, claimsAsDependent(YEAR, SUPPORTER, _SUPPORTEE))))).
- % proven_neg(occuring(YEAR)) :-
- % ~isa(PERSON, TCLAZZCITIZENFNIGROUP_UNITEDSTATESOFAMERICA9_VAR),
- % occuring(YEAR),
- % ~isa(PERSON, MOBTAXRESIDENTSFNIGROUP_CANADA9_VAR),
- % ~isa(PERSON, MOBTAXRESIDENTSFNIMEXICO9_VAR),
- % ~isa(PERSON, MOBTAXRESIDENTSFNIGROUP_UNITEDSTATESOFAMERICA9_VAR),
- % ~forbiddenToDoWrt(iCW_USIncomeTax, SUPPORTER, claimsAsDependent(YEAR, SUPPORTER, _SUPPORTEE)).
- % proven_tru(isa(PERSON, TCLAZZCITIZENFNIGROUP_UNITEDSTATESOFAMERICA8_VAR)) :-
- % ignore(mudEquals(TCLAZZCITIZENFNIGROUP_UNITEDSTATESOFAMERICA8_VAR,
- % tClazzCitizenFn(iGroup_UnitedStatesOfAmerica))),
- % occuring(YEAR),
- % \+ isa(PERSON, MOBTAXRESIDENTSFNIGROUP_CANADA8_VAR),
- % \+ isa(PERSON, MOBTAXRESIDENTSFNIMEXICO8_VAR),
- % \+ isa(PERSON, MOBTAXRESIDENTSFNIGROUP_UNITEDSTATESOFAMERICA8_VAR),
- % \+ forbiddenToDoWrt(iCW_USIncomeTax,
- % SUPPORTER,
- % claimsAsDependent(YEAR, SUPPORTER, _SUPPORTEE)),
- % \+ isa(PERSON, TCLAZZCITIZENFNIGROUP_UNITEDSTATESOFAMERICA8_VAR).
- % proven_neg(occuring(YEAR)) :-
- % ~isa(PERSON, MOBTAXRESIDENTSFNIGROUP_CANADA7_VAR),
- % occuring(YEAR),
- % ~isa(PERSON, MOBTAXRESIDENTSFNIMEXICO7_VAR),
- % ~isa(PERSON, MOBTAXRESIDENTSFNIGROUP_UNITEDSTATESOFAMERICA7_VAR),
- % ~forbiddenToDoWrt(iCW_USIncomeTax, SUPPORTER, claimsAsDependent(YEAR, SUPPORTER, _SUPPORTEE)),
- % ~isa(PERSON, TCLAZZCITIZENFNIGROUP_UNITEDSTATESOFAMERICA7_VAR).
- % proven_tru(isa(PERSON, MOBTAXRESIDENTSFNIGROUP_CANADA6_VAR)) :-
- % ignore(mudEquals(MOBTAXRESIDENTSFNIGROUP_CANADA6_VAR,
- % mobTaxResidentsFn(iGroup_Canada))),
- % occuring(YEAR),
- % \+ isa(PERSON, MOBTAXRESIDENTSFNIMEXICO6_VAR),
- % \+ isa(PERSON, MOBTAXRESIDENTSFNIGROUP_UNITEDSTATESOFAMERICA6_VAR),
- % \+ forbiddenToDoWrt(iCW_USIncomeTax,
- % SUPPORTER,
- % claimsAsDependent(YEAR, SUPPORTER, _SUPPORTEE)),
- % \+ isa(PERSON, TCLAZZCITIZENFNIGROUP_UNITEDSTATESOFAMERICA6_VAR),
- % \+ isa(PERSON, MOBTAXRESIDENTSFNIGROUP_CANADA6_VAR).
- % proven_neg(occuring(YEAR)) :-
- % ~isa(PERSON, MOBTAXRESIDENTSFNIMEXICO5_VAR),
- % occuring(YEAR),
- % ~isa(PERSON, MOBTAXRESIDENTSFNIGROUP_UNITEDSTATESOFAMERICA5_VAR),
- % ~forbiddenToDoWrt(iCW_USIncomeTax, SUPPORTER, claimsAsDependent(YEAR, SUPPORTER, _SUPPORTEE)),
- % ~isa(PERSON, MOBTAXRESIDENTSFNIGROUP_CANADA5_VAR),
- % ~isa(PERSON, TCLAZZCITIZENFNIGROUP_UNITEDSTATESOFAMERICA5_VAR).
- % proven_tru(isa(PERSON, MOBTAXRESIDENTSFNIMEXICO4_VAR)) :-
- % ignore(mudEquals(MOBTAXRESIDENTSFNIMEXICO4_VAR,
- % mobTaxResidentsFn(iMexico))),
- % occuring(YEAR),
- % \+ isa(PERSON, MOBTAXRESIDENTSFNIGROUP_UNITEDSTATESOFAMERICA4_VAR),
- % \+ forbiddenToDoWrt(iCW_USIncomeTax,
- % SUPPORTER,
- % claimsAsDependent(YEAR, SUPPORTER, _SUPPORTEE)),
- % \+ isa(PERSON, MOBTAXRESIDENTSFNIGROUP_CANADA4_VAR),
- % \+ isa(PERSON, TCLAZZCITIZENFNIGROUP_UNITEDSTATESOFAMERICA4_VAR),
- % \+ isa(PERSON, MOBTAXRESIDENTSFNIMEXICO4_VAR).
- % proven_neg(occuring(YEAR)) :-
- % ~isa(PERSON, MOBTAXRESIDENTSFNIGROUP_UNITEDSTATESOFAMERICA3_VAR),
- % ~forbiddenToDoWrt(iCW_USIncomeTax, SUPPORTER, claimsAsDependent(YEAR, SUPPORTER, _SUPPORTEE)),
- % occuring(YEAR),
- % ~isa(PERSON, MOBTAXRESIDENTSFNIMEXICO3_VAR),
- % ~isa(PERSON, MOBTAXRESIDENTSFNIGROUP_CANADA3_VAR),
- % ~isa(PERSON, TCLAZZCITIZENFNIGROUP_UNITEDSTATESOFAMERICA3_VAR).
- % proven_tru(isa(PERSON, MOBTAXRESIDENTSFNIGROUP_UNITEDSTATESOFAMERICA2_VAR)) :-
- % ignore(mudEquals(MOBTAXRESIDENTSFNIGROUP_UNITEDSTATESOFAMERICA2_VAR,
- % mobTaxResidentsFn(iGroup_UnitedStatesOfAmerica))),
- % occuring(YEAR),
- % \+ forbiddenToDoWrt(iCW_USIncomeTax,
- % SUPPORTER,
- % claimsAsDependent(YEAR, SUPPORTER, _SUPPORTEE)),
- % \+ isa(PERSON, MOBTAXRESIDENTSFNIMEXICO2_VAR),
- % \+ isa(PERSON, MOBTAXRESIDENTSFNIGROUP_CANADA2_VAR),
- % \+ isa(PERSON, TCLAZZCITIZENFNIGROUP_UNITEDSTATESOFAMERICA2_VAR),
- % \+ isa(PERSON, MOBTAXRESIDENTSFNIGROUP_UNITEDSTATESOFAMERICA2_VAR).
- % proven_tru(forbiddenToDoWrt(iCW_USIncomeTax, SUPPORTER, claimsAsDependent(YEAR, SUPPORTER, _SUPPORTEE))) :-
- % occuring(YEAR),
- % \+ isa(PERSON, MOBTAXRESIDENTSFNIGROUP_UNITEDSTATESOFAMERICA1_VAR),
- % \+ isa(PERSON, MOBTAXRESIDENTSFNIMEXICO1_VAR),
- % \+ isa(PERSON, MOBTAXRESIDENTSFNIGROUP_CANADA1_VAR),
- % \+ isa(PERSON, TCLAZZCITIZENFNIGROUP_UNITEDSTATESOFAMERICA1_VAR),
- % \+ forbiddenToDoWrt(iCW_USIncomeTax,
- % SUPPORTER,
- % claimsAsDependent(YEAR, SUPPORTER, _SUPPORTEE)).
- % pfc :-
- % ~isa(PERSON, TCLAZZCITIZENFNIGROUP_UNITEDSTATESOFAMERICA9), occuring(YEAR), ~isa(PERSON, MOBTAXRESIDENTSFNIGROUP_CANADA9), ~isa(PERSON, MOBTAXRESIDENTSFNIMEXICO9), ~isa(PERSON, MOBTAXRESIDENTSFNIGROUP_UNITEDSTATESOFAMERICA9), ~forbiddenToDoWrt(iCW_USIncomeTax, SUPPORTER, claimsAsDependent(YEAR, SUPPORTER, _SUPPORTEE)), {is_unit(YEAR)}==>proven_neg(occuring(YEAR)).
- % pfc :-
- % ignore(mudEquals(TCLAZZCITIZENFNIGROUP_UNITEDSTATESOFAMERICA8, tClazzCitizenFn(iGroup_UnitedStatesOfAmerica))), occuring(YEAR), \+isa(PERSON, MOBTAXRESIDENTSFNIGROUP_CANADA8), \+isa(PERSON, MOBTAXRESIDENTSFNIMEXICO8), \+isa(PERSON, MOBTAXRESIDENTSFNIGROUP_UNITEDSTATESOFAMERICA8), \+forbiddenToDoWrt(iCW_USIncomeTax, SUPPORTER, claimsAsDependent(YEAR, SUPPORTER, _SUPPORTEE)), \+isa(PERSON, TCLAZZCITIZENFNIGROUP_UNITEDSTATESOFAMERICA8), {is_unit(TCLAZZCITIZENFNIGROUP_UNITEDSTATESOFAMERICA8, PERSON)}==>proven_tru(isa(PERSON, TCLAZZCITIZENFNIGROUP_UNITEDSTATESOFAMERICA8)).
- % pfc :-
- % ~isa(PERSON, MOBTAXRESIDENTSFNIGROUP_CANADA7), occuring(YEAR), ~isa(PERSON, MOBTAXRESIDENTSFNIMEXICO7), ~isa(PERSON, MOBTAXRESIDENTSFNIGROUP_UNITEDSTATESOFAMERICA7), ~forbiddenToDoWrt(iCW_USIncomeTax, SUPPORTER, claimsAsDependent(YEAR, SUPPORTER, _SUPPORTEE)), ~isa(PERSON, TCLAZZCITIZENFNIGROUP_UNITEDSTATESOFAMERICA7), {is_unit(YEAR)}==>proven_neg(occuring(YEAR)).
- % pfc :-
- % ignore(mudEquals(MOBTAXRESIDENTSFNIGROUP_CANADA6, mobTaxResidentsFn(iGroup_Canada))), occuring(YEAR), \+isa(PERSON, MOBTAXRESIDENTSFNIMEXICO6), \+isa(PERSON, MOBTAXRESIDENTSFNIGROUP_UNITEDSTATESOFAMERICA6), \+forbiddenToDoWrt(iCW_USIncomeTax, SUPPORTER, claimsAsDependent(YEAR, SUPPORTER, _SUPPORTEE)), \+isa(PERSON, TCLAZZCITIZENFNIGROUP_UNITEDSTATESOFAMERICA6), \+isa(PERSON, MOBTAXRESIDENTSFNIGROUP_CANADA6), {is_unit(MOBTAXRESIDENTSFNIGROUP_CANADA6, PERSON)}==>proven_tru(isa(PERSON, MOBTAXRESIDENTSFNIGROUP_CANADA6)).
- % pfc :-
- % ~isa(PERSON, MOBTAXRESIDENTSFNIMEXICO5), occuring(YEAR), ~isa(PERSON, MOBTAXRESIDENTSFNIGROUP_UNITEDSTATESOFAMERICA5), ~forbiddenToDoWrt(iCW_USIncomeTax, SUPPORTER, claimsAsDependent(YEAR, SUPPORTER, _SUPPORTEE)), ~isa(PERSON, MOBTAXRESIDENTSFNIGROUP_CANADA5), ~isa(PERSON, TCLAZZCITIZENFNIGROUP_UNITEDSTATESOFAMERICA5), {is_unit(YEAR)}==>proven_neg(occuring(YEAR)).
- % pfc :-
- % ignore(mudEquals(MOBTAXRESIDENTSFNIMEXICO4, mobTaxResidentsFn(iMexico))), occuring(YEAR), \+isa(PERSON, MOBTAXRESIDENTSFNIGROUP_UNITEDSTATESOFAMERICA4), \+forbiddenToDoWrt(iCW_USIncomeTax, SUPPORTER, claimsAsDependent(YEAR, SUPPORTER, _SUPPORTEE)), \+isa(PERSON, MOBTAXRESIDENTSFNIGROUP_CANADA4), \+isa(PERSON, TCLAZZCITIZENFNIGROUP_UNITEDSTATESOFAMERICA4), \+isa(PERSON, MOBTAXRESIDENTSFNIMEXICO4), {is_unit(MOBTAXRESIDENTSFNIMEXICO4, PERSON)}==>proven_tru(isa(PERSON, MOBTAXRESIDENTSFNIMEXICO4)).
- % pfc :-
- % ~isa(PERSON, MOBTAXRESIDENTSFNIGROUP_UNITEDSTATESOFAMERICA3), ~forbiddenToDoWrt(iCW_USIncomeTax, SUPPORTER, claimsAsDependent(YEAR, SUPPORTER, _SUPPORTEE)), occuring(YEAR), ~isa(PERSON, MOBTAXRESIDENTSFNIMEXICO3), ~isa(PERSON, MOBTAXRESIDENTSFNIGROUP_CANADA3), ~isa(PERSON, TCLAZZCITIZENFNIGROUP_UNITEDSTATESOFAMERICA3), {is_unit(YEAR)}==>proven_neg(occuring(YEAR)).
- % pfc :-
- % ignore(mudEquals(MOBTAXRESIDENTSFNIGROUP_UNITEDSTATESOFAMERICA2, mobTaxResidentsFn(iGroup_UnitedStatesOfAmerica))), occuring(YEAR), \+forbiddenToDoWrt(iCW_USIncomeTax, SUPPORTER, claimsAsDependent(YEAR, SUPPORTER, _SUPPORTEE)), \+isa(PERSON, MOBTAXRESIDENTSFNIMEXICO2), \+isa(PERSON, MOBTAXRESIDENTSFNIGROUP_CANADA2), \+isa(PERSON, TCLAZZCITIZENFNIGROUP_UNITEDSTATESOFAMERICA2), \+isa(PERSON, MOBTAXRESIDENTSFNIGROUP_UNITEDSTATESOFAMERICA2), {is_unit(MOBTAXRESIDENTSFNIGROUP_UNITEDSTATESOFAMERICA2, PERSON)}==>proven_tru(isa(PERSON, MOBTAXRESIDENTSFNIGROUP_UNITEDSTATESOFAMERICA2)).
- % pfc :-
- % occuring(YEAR), \+isa(PERSON, MOBTAXRESIDENTSFNIGROUP_UNITEDSTATESOFAMERICA1), \+isa(PERSON, MOBTAXRESIDENTSFNIMEXICO1), \+isa(PERSON, MOBTAXRESIDENTSFNIGROUP_CANADA1), \+isa(PERSON, TCLAZZCITIZENFNIGROUP_UNITEDSTATESOFAMERICA1), \+forbiddenToDoWrt(iCW_USIncomeTax, SUPPORTER, claimsAsDependent(YEAR, SUPPORTER, _SUPPORTEE)), {is_unit(SUPPORTER, _SUPPORTEE, YEAR)}==>proven_tru(forbiddenToDoWrt(iCW_USIncomeTax, SUPPORTER, claimsAsDependent(YEAR, SUPPORTER, _SUPPORTEE))).
- */
- % ~occuring(YEAR) :-
- % ~instance(PERSON, nartR(tClazzCitizenFn, iGroup_UnitedStatesOfAmerica)),
- % ~instance(PERSON, nartR(mobTaxResidentsFn, iGroup_Canada)),
- % \+ ( ( forbiddenToDoWrt(iCW_USIncomeTax,
- % SUPPORTER,
- % claimsAsDependent(YEAR, SUPPORTER, SUPPORTEE)),
- % instance(PERSON,
- % nartR(mobTaxResidentsFn, iGroup_UnitedStatesOfAmerica))
- % ),
- % instance(PERSON, nartR(mobTaxResidentsFn, iMexico))
- % ).
- % instance(PERSON, nartR(mobTaxResidentsFn, iGroup_UnitedStatesOfAmerica)) :-
- % occuring(YEAR),
- % ~instance(PERSON, nartR(tClazzCitizenFn, iGroup_UnitedStatesOfAmerica)),
- % ~instance(PERSON, nartR(mobTaxResidentsFn, iGroup_Canada)),
- % ~instance(PERSON, nartR(mobTaxResidentsFn, iMexico)),
- % \+ ~forbiddenToDoWrt(iCW_USIncomeTax, SUPPORTER, claimsAsDependent(YEAR, SUPPORTER, SUPPORTEE)).
- % instance(PERSON, nartR(mobTaxResidentsFn, iMexico)) :-
- % occuring(YEAR),
- % ~instance(PERSON, nartR(tClazzCitizenFn, iGroup_UnitedStatesOfAmerica)),
- % ~instance(PERSON, nartR(mobTaxResidentsFn, iGroup_Canada)),
- % ~instance(PERSON, nartR(mobTaxResidentsFn, iGroup_UnitedStatesOfAmerica)),
- % \+ ~forbiddenToDoWrt(iCW_USIncomeTax, SUPPORTER, claimsAsDependent(YEAR, SUPPORTER, SUPPORTEE)).
- % instance(PERSON, nartR(mobTaxResidentsFn, iGroup_Canada)) :-
- % occuring(YEAR),
- % ~instance(PERSON, nartR(tClazzCitizenFn, iGroup_UnitedStatesOfAmerica)),
- % ~instance(PERSON, nartR(mobTaxResidentsFn, iMexico)),
- % ~instance(PERSON, nartR(mobTaxResidentsFn, iGroup_UnitedStatesOfAmerica)),
- % \+ ~forbiddenToDoWrt(iCW_USIncomeTax, SUPPORTER, claimsAsDependent(YEAR, SUPPORTER, SUPPORTEE)).
- % instance(PERSON, nartR(tClazzCitizenFn, iGroup_UnitedStatesOfAmerica)) :-
- % occuring(YEAR),
- % ~instance(PERSON, nartR(mobTaxResidentsFn, iGroup_Canada)),
- % ~instance(PERSON, nartR(mobTaxResidentsFn, iMexico)),
- % ~instance(PERSON, nartR(mobTaxResidentsFn, iGroup_UnitedStatesOfAmerica)),
- % \+ ~forbiddenToDoWrt(iCW_USIncomeTax, SUPPORTER, claimsAsDependent(YEAR, SUPPORTER, SUPPORTEE)).
- % forbiddenToDoWrt(iCW_USIncomeTax, SUPPORTER, claimsAsDependent(YEAR, SUPPORTER, SUPPORTEE)) :-
- % occuring(YEAR),
- % ~instance(PERSON, nartR(tClazzCitizenFn, iGroup_UnitedStatesOfAmerica)),
- % ~instance(PERSON, nartR(mobTaxResidentsFn, iGroup_Canada)),
- % ~instance(PERSON, nartR(mobTaxResidentsFn, iMexico)),
- % \+ ~instance(PERSON, nartR(mobTaxResidentsFn, iGroup_UnitedStatesOfAmerica)).
- % ================================================================================================================
- % Everything is human or god
- % ================================================================================================================
- :- test_boxlog(human(X)v god(X)).
- /*
- % /home/prologmud_server/lib/swipl/pack/logicmoo_base/t/examples/fol/boxlog_sanity.pl:276
- % :- test_boxlog(human(X_VAR)v god(X_VAR)).
- % kif :-
- % all(X, human(X)v god(X)).
- % qualify_nesc :-
- % all(X, (~nesc(human(X)v god(X))=>nesc(human(X)v god(X)))).
- % debugm(user, sc_success(user, user:nnf(KB, all(X, (~nesc(human(X)v god(X))=>nesc(b_d(KB, nesc, poss), human(X)v god(X)))), nesc(b_d(KB, nesc, poss), human(X)v god(X))v nesc(b_d(KB, nesc, poss), human(X)v god(X))))).
- % nnf :-
- % nesc(human(X)v god(X))v nesc(human(X)v god(X)).
- % th_nnf_in :-
- % ( ( tru(human(X))
- % ; tru(god(X))
- % )
- % ; tru(human(X))
- % ; tru(god(X))
- % ).
- % th_nnf_out :-
- % ~ ((n(tru(human(X))), n(tru(god(X)))), n(tru(human(X))), n(tru(god(X)))).
- % proven_tru(human(X)) :-
- % \+ god(X),
- % \+ human(X).
- % proven_tru(god(X)) :-
- % \+ human(X),
- % \+ god(X).
- % pfc :-
- % \+god(X), \+human(X), {is_unit(X)}==>proven_tru(human(X)).
- % pfc :-
- % \+human(X), \+god(X), {is_unit(X)}==>proven_tru(god(X)).
- */
- % human(_19658) :-
- % ~god(_19658).
- % god(_23530) :-
- % ~human(_23530).
- % ================================================================================================================
- % Everything that is human is possibly male
- % ================================================================================================================
- :- test_boxlog((human(X)=>poss(male(X)))).
- /*
- % /home/prologmud_server/lib/swipl/pack/logicmoo_base/t/examples/fol/boxlog_sanity.pl:288
- % :- test_boxlog((human(X_VAR)=>poss(male(X_VAR)))).
- % debugm(user, sc_success(user, user:nnf(KB, all(X, (human(X)=>poss(b_d(KB, nesc, poss), male(X)))), ~human(X)v poss(b_d(KB, nesc, poss), male(X))))).
- % nnf :-
- % ~human(X)v poss(male(X)).
- % th_nnf_in :-
- % ( neg(human(X))
- % ; poss(male(X))
- % ).
- % th_nnf_out :-
- % ~ (n(neg(human(X))), n(poss(male(X)))).
- % proven_neg(human(X)) :-
- % proven_not_poss(male(X)).
- % proven_poss(male(X)) :-
- % poss(human(X)).
- % pfc :-
- % proven_not_poss(male(X)), {is_unit(X)}==>proven_neg(human(X)).
- % pfc :-
- % poss(human(X)), {is_unit(X)}==>proven_poss(male(X)).
- */
- % ~(human(X)) :-
- % ~poss_t(male, X).
- % proven_tru(poss_t(male, X)) :-
- % human(X).
- % ================================================================================================================
- % Everything is human and male
- % ================================================================================================================
- % BAD!! these need co-mingled!
- :- test_boxlog(human(X)&male(X)).
- /*
- % /home/prologmud_server/lib/swipl/pack/logicmoo_base/t/examples/fol/boxlog_sanity.pl:301
- % :- test_boxlog(human(X_VAR)&male(X_VAR)).
- % kif :-
- % all(X, human(X)&male(X)).
- % qualify_nesc :-
- % all(X, (~nesc(human(X)&male(X))=>nesc(human(X)&male(X)))).
- % debugm(user, sc_success(user, user:nnf(KB, all(X, (~nesc(human(X)&male(X))=>nesc(b_d(KB, nesc, poss), human(X)&male(X)))), nesc(b_d(KB, nesc, poss), human(X))&nesc(b_d(KB, nesc, poss), male(X))v(nesc(b_d(KB, nesc, poss), human(X))&nesc(b_d(KB, nesc, poss), male(X)))))).
- % nnf :-
- % nesc(human(X))&nesc(male(X))v(nesc(human(X))&nesc(male(X))).
- % th_nnf_in :-
- % ( tru(human(X)),
- % tru(male(X))
- % ; tru(human(X)),
- % tru(male(X))
- % ).
- % th_nnf_out :-
- % ~ ((n(tru(human(X)));n(tru(male(X)))), (n(tru(human(X)));n(tru(male(X))))).
- % proven_tru(human(X)) :-
- % ( \+ human(X)
- % ; \+ male(X)
- % ).
- % proven_tru(male(X)) :-
- % ( \+ human(X)
- % ; \+ male(X)
- % ).
- % pfc :-
- % (\+human(X);\+male(X)), {is_unit(X)}==>proven_tru(human(X)).
- % pfc :-
- % (\+human(X);\+male(X)), {is_unit(X)}==>proven_tru(male(X)).
- */
- % human(_21936).
- % male(_24006).
- % =======
- % Co-mingled!
- % =======
- :- P=human(X)&male(X),
- test_boxlog((poss(P)=>P)).
- /*
- % /home/prologmud_server/lib/swipl/pack/logicmoo_base/t/examples/fol/boxlog_sanity.pl:312
- % :- test_boxlog((poss(human(X_VAR)&male(X_VAR))=>human(X_VAR)&male(X_VAR))).
- % debugm(user, sc_success(user, user:nnf(KB, all(X, (poss(b_d(KB, nesc, poss), human(X)&male(X))=>human(X)&male(X))), nesc(b_d(KB, nesc, poss), ~human(X)v~male(X))v(human(X)&male(X))))).
- % nnf :-
- % nesc(~human(X)v~male(X))v(human(X)&male(X)).
- % th_nnf_in :-
- % ( ( neg(human(X))
- % ; neg(male(X))
- % )
- % ; tru(human(X)),
- % tru(male(X))
- % ).
- % th_nnf_out :-
- % ~ ((n(neg(human(X))), n(neg(male(X)))), (n(tru(human(X)));n(tru(male(X))))).
- % proven_neg(human(X)) :-
- % naf(human(X)).
- % proven_neg(male(X)) :-
- % naf(male(X)).
- % proven_tru(human(X)) :-
- % male(X),
- % poss(human(X)).
- % proven_tru(male(X)) :-
- % human(X),
- % poss(male(X)).
- % pfc :-
- % naf(human(X)), {is_unit(X)}==>proven_neg(human(X)).
- % pfc :-
- % naf(male(X)), {is_unit(X)}==>proven_neg(male(X)).
- % pfc :-
- % male(X), poss(human(X)), {is_unit(X)}==>proven_tru(human(X)).
- % pfc :-
- % human(X), poss(male(X)), {is_unit(X)}==>proven_tru(male(X)).
- */
- % human(X) :-
- % \+ ~human(X),
- % \+ ~male(X).
- % male(X) :-
- % \+ ~human(X),
- % \+ ~male(X).
- % These to?
- % ~human(A) :-
- % \+ ( \+ ~male(A),
- % human(A)
- % ).
- % ~human(A) :-
- % \+ ( \+ ~male(A),
- % male(A)
- % ).
- % ~male(A) :-
- % \+ ( \+ ~human(A),
- % human(A)
- % ).
- % ~male(A) :-
- % \+ ( \+ ~human(A),
- % male(A)
- % ).
- % ================================================================================================================
- % Nothing is both human and god
- % ================================================================================================================
- :- test_boxlog(~ (human(X)&god(X))).
- /*
- % /home/prologmud_server/lib/swipl/pack/logicmoo_base/t/examples/fol/boxlog_sanity.pl:346
- % :- test_boxlog(~ (human(X_VAR)&god(X_VAR))).
- % kif :-
- % all(X, ~ (human(X)&god(X))).
- % qualify_nesc :-
- % all(X, nesc(~ (human(X)&god(X)))).
- % debugm(user, sc_success(user, user:nnf(KB, all(X, nesc(b_d(KB, nesc, poss), ~ (human(X)&god(X)))), nesc(b_d(KB, nesc, poss), ~human(X)v~god(X))))).
- % nnf :-
- % nesc(~human(X)v~god(X)).
- % th_nnf_in :-
- % ( neg(human(X))
- % ; neg(god(X))
- % ).
- % th_nnf_out :-
- % ~ (n(neg(human(X))), n(neg(god(X)))).
- % proven_neg(human(X)) :-
- % god(X).
- % proven_neg(god(X)) :-
- % human(X).
- % pfc :-
- % god(X), {is_unit(X)}==>proven_neg(human(X)).
- % pfc :-
- % human(X), {is_unit(X)}==>proven_neg(god(X)).
- */
- % ~human(_830) :-
- % god(_830).
- % ~god(_904) :-
- % human(_904).
- % ================================================================================================================
- % There exists something not evil
- % ================================================================================================================
- :- test_boxlog(exists(X, ~evil(X))).
- /*
- % /home/prologmud_server/lib/swipl/pack/logicmoo_base/t/examples/fol/boxlog_sanity.pl:356
- % :- test_boxlog(exists(X_VAR, ~evil(X_VAR))).
- % kif :-
- % exists(X, ~evil(X)).
- % qualify_nesc :-
- % exists(X, nesc(~evil(X))).
- % debugm(user, sc_success(user, user:nnf(KB, exists(X, nesc(b_d(KB, nesc, poss), ~evil(X))), nesc(b_d(KB, nesc, poss), ~evil(X))v~skolem(X, skFn(nesc(b_d(KB, nesc, poss), ~evil(X))))))).
- % nnf :-
- % nesc(~evil(X))v~skolem(X, skFn(nesc(~evil(X)))).
- % th_nnf_in :-
- % ( neg(evil(X))
- % ; neg(skolem(X, skFn(nesc(~evil(X)))))
- % ).
- % th_nnf_out :-
- % ~ (n(neg(evil(X))), n(neg(skolem(X, skFn(nesc(~evil(X))))))).
- % proven_neg(evil(X)) :-
- % skolem(X, skFn(nesc(~evil(X)))).
- % proven_neg(skolem(X, skFn(nesc(~evil(X))))) :-
- % evil(X).
- % pfc :-
- % if_missing(if_missing(proven_neg(evil(_1223194)),
- % proven_neg(evil(skFn(nesc(~evil(X)))))),
- % if_missing(proven_neg(evil(_1223194)),
- % proven_neg(evil(skFn(nesc(~evil(skFn(nesc(~evil(X)))))))))).
- % pfc :-
- % evil(X), {is_unit(X)}==>if_missing(proven_neg(skolem(_1240538, skFn(nesc(~evil(_1240538))))), proven_neg(skolem(skFn(nesc(~evil(X))), skFn(nesc(~evil(skFn(nesc(~evil(X))))))))).
- */
- % ~evil(_788{sk = ...}) :-
- % skolem(_788{sk = ...}, skIsIn_8Fn).
- % ================================================================================================================
- % There exists something evil
- % ================================================================================================================
- :- test_boxlog(exists(X, evil(X))).
- /*
- % /home/prologmud_server/lib/swipl/pack/logicmoo_base/t/examples/fol/boxlog_sanity.pl:364
- % :- test_boxlog(exists(X_VAR, evil(X_VAR))).
- % kif :-
- % exists(X, evil(X)).
- % qualify_nesc :-
- % exists(X, nesc(evil(X))).
- % debugm(user, sc_success(user, user:nnf(KB, exists(X, nesc(b_d(KB, nesc, poss), evil(X))), nesc(b_d(KB, nesc, poss), evil(X))v~skolem(X, skFn(nesc(b_d(KB, nesc, poss), evil(X))))))).
- % nnf :-
- % nesc(evil(X))v~skolem(X, skFn(nesc(evil(X)))).
- % th_nnf_in :-
- % ( tru(evil(X))
- % ; neg(skolem(X, skFn(nesc(evil(X)))))
- % ).
- % th_nnf_out :-
- % ~ (n(tru(evil(X))), n(neg(skolem(X, skFn(nesc(evil(X))))))).
- % proven_tru(evil(X)) :-
- % skolem(X, skFn(nesc(evil(X)))).
- % proven_neg(skolem(X, skFn(nesc(evil(X))))) :-
- % ~evil(X).
- % pfc :-
- % if_missing(if_missing(proven_tru(evil(_1314492)),
- % proven_tru(evil(skFn(nesc(evil(X)))))),
- % if_missing(proven_tru(evil(_1314492)),
- % proven_tru(evil(skFn(nesc(evil(skFn(nesc(evil(X)))))))))).
- % pfc :-
- % ~evil(X), {is_unit(X)}==>if_missing(proven_neg(skolem(_1330982, skFn(nesc(evil(_1330982))))), proven_neg(skolem(skFn(nesc(evil(X))), skFn(nesc(evil(skFn(nesc(evil(X))))))))).
- */
- % evil(_788{sk = ...}) :-
- % skolem(_788{sk = ...}, skIsIn_9Fn).
- % ================================================================================================================
- % When a man exists there will be a god
- % ================================================================================================================
- :- test_boxlog((exists(X, man(X))=>exists(G, god(G)))).
- /*
- % /home/prologmud_server/lib/swipl/pack/logicmoo_base/t/examples/fol/boxlog_sanity.pl:371
- % :- test_boxlog((exists(X_VAR, man(X_VAR))=>exists(G_VAR, god(G_VAR)))).
- % kif :-
- % exists(X, man(X))=>exists(G, god(G)).
- % qualify_nesc :-
- % nesc((exists(X, man(X))=>exists(G, god(G)))).
- % debugm(user, sc_success(user, user:nnf(KB, nesc(b_d(KB, nesc, poss), (exists(X, man(X))=>exists(G, god(G)))), nesc(b_d(KB, nesc, poss), ~man(X)v(god(G)v~skolem(G, skFn(god(G)))))))).
- % nnf :-
- % nesc(~man(X)v(god(G)v~skolem(G, skFn(god(G))))).
- % th_nnf_in :-
- % ( neg(man(X))
- % ; tru(god(G))
- % ; neg(skolem(G, skFn(god(G))))
- % ).
- % th_nnf_out :-
- % ~ (n(neg(man(X))), n(tru(god(G))), n(neg(skolem(G, skFn(god(G)))))).
- % proven_neg(man(X)) :-
- % ~god(G),
- % skolem(G, skFn(god(G))).
- % proven_tru(god(G)) :-
- % man(X),
- % skolem(G, skFn(god(G))).
- % proven_neg(skolem(G, skFn(god(G)))) :-
- % ~god(G),
- % man(X).
- % pfc :-
- % ~god(G), {ignore(G=skFn(god(G)))}, {is_unit}==>proven_neg(man(X)).
- % pfc :-
- % man(X), {is_unit}==>if_missing(if_missing(proven_tru(god(_1429242)), proven_tru(god(skFn(god(G))))), if_missing(proven_tru(god(_1429242)), proven_tru(god(skFn(god(skFn(god(G)))))))).
- % pfc :-
- % ~god(G), man(X), {is_unit(G)}==>if_missing(proven_neg(skolem(_1444024, skFn(god(_1444024)))), proven_neg(skolem(skFn(god(G)), skFn(god(skFn(god(G))))))).
- */
- % god(_866{sk = ...}) :-
- % man(_1082),
- % skolem(_866{sk = ...}, skIsGodIn_1Fn(_1082)).
- % ~man(_2276) :-
- % \+ ( skolem(_896{sk = ...}, skIsGodIn_1Fn(_2276)),
- % god(_896{sk = ...})
- % ).
- % this would be better though if
- % god(_866{sk = ...}) :-
- % \= \+ (man(_1082)),
- % skolem(_866{sk = ...}, skIsGodIn_1Fn).
- % ~man(_2276) :-
- % \+ god(_896).
- % ================================================================================================================
- % When two men exists there will be a god
- % ================================================================================================================
- :- test_boxlog((atleast(2, X, man(X))=>exists(G, god(G)))).
- /*
- % /home/prologmud_server/lib/swipl/pack/logicmoo_base/t/examples/fol/boxlog_sanity.pl:391
- % :- test_boxlog((atleast(2, X_VAR, man(X_VAR))=>exists(G_VAR, god(G_VAR)))).
- % kif :-
- % all(X, (atleast(2, X, man(X))=>exists(G, god(G)))).
- % qualify_nesc :-
- % all(X, nesc((atleast(2, X, man(X))=>exists(G, god(G))))).
- % debugm(user, sc_success(user, user:nnf(KB, all(X, nesc(b_d(KB, nesc, poss), (atleast(2, X, man(X))=>exists(G, god(G))))), nesc(b_d(KB, nesc, poss), god(G)v~skolem(G, skFn(god(G)))v(~man(_2068)v(~different(X, _2192)v(~man(X)v~different(X, _2068)v(~man(_2192)v~different(X, _2068))))))))).
- % nnf :-
- % nesc(god(G)v~skolem(G, skFn(god(G)))v(~man(_2068)v(~different(X, _2192)v(~man(X)v~different(X, _2068)v(~man(_2192)v~different(X, _2068)))))).
- % th_nnf_in :-
- % ( ( tru(god(G))
- % ; neg(skolem(G, skFn(god(G))))
- % )
- % ; neg(man(_2068))
- % ; neg(different(X, _2192))
- % ; ( neg(man(X))
- % ; neg(different(X, _2068))
- % )
- % ; neg(man(_2192))
- % ; neg(different(X, _2068))
- % ).
- % th_nnf_out :-
- % ~ ((n(tru(god(G))), n(neg(skolem(G, skFn(god(G)))))), n(neg(man(_2068))), n(neg(different(X, _2192))), (n(neg(man(X))), n(neg(different(X, _2068)))), n(neg(man(_2192))), n(neg(different(X, _2068)))).
- % proven_tru(god(G)) :-
- % man(_2068),
- % different(X, _2192),
- % man(X),
- % different(X, _2068),
- % man(_2192),
- % skolem(G, skFn(god(G))).
- % proven_neg(skolem(G, skFn(god(G)))) :-
- % ~god(G),
- % man(_2068),
- % different(X, _2192),
- % man(X),
- % different(X, _2068),
- % man(_2192).
- % proven_neg(man(_2068)) :-
- % different(X, _2192),
- % man(X),
- % different(X, _2068),
- % man(_2192),
- % ~god(G),
- % skolem(G, skFn(god(G))).
- % proven_neg(different(X, _2192)) :-
- % man(X),
- % different(X, _2068),
- % man(_2192),
- % man(_2068),
- % ~god(G),
- % skolem(G, skFn(god(G))).
- % proven_neg(man(X)) :-
- % different(X, _2068),
- % man(_2192),
- % different(X, _2192),
- % man(_2068),
- % ~god(G),
- % skolem(G, skFn(god(G))).
- % proven_neg(different(X, _2068)) :-
- % man(X),
- % man(_2192),
- % different(X, _2068),
- % different(X, _2192),
- % man(_2068),
- % ~god(G),
- % skolem(G, skFn(god(G))).
- % proven_neg(man(_2192)) :-
- % different(X, _2068),
- % man(X),
- % different(X, _2192),
- % man(_2068),
- % ~god(G),
- % skolem(G, skFn(god(G))).
- % proven_neg(different(X, _2068)) :-
- % man(_2192),
- % man(X),
- % different(X, _2068),
- % different(X, _2192),
- % man(_2068),
- % ~god(G),
- % skolem(G, skFn(god(G))).
- % pfc :-
- % man(_2068), {dif:dif(X, _2192)}, man(X), {dif:dif(X, _2068)}, man(_2192), {is_unit}==>if_missing(if_missing(proven_tru(god(_113446)), proven_tru(god(skFn(god(G))))), if_missing(proven_tru(god(_113446)), proven_tru(god(skFn(god(skFn(god(G)))))))).
- % pfc :-
- % ~god(G), man(_2068), {dif:dif(X, _2192)}, man(X), {dif:dif(X, _2068)}, man(_2192), {is_unit(G)}==>if_missing(proven_neg(skolem(_136182, skFn(god(_136182)))), proven_neg(skolem(skFn(god(G)), skFn(god(skFn(god(G))))))).
- % pfc :-
- % {dif:dif(X, _2192)}, man(X), {dif:dif(X, _2068)}, man(_2192), ~god(G), {ignore(G=skFn(god(G)))}, {is_unit(_2068)}==>proven_neg(man(_2068)).
- % pfc :-
- % man(X), {dif:dif(X, _2068)}, man(_2192), man(_2068), ~god(G), {ignore(G=skFn(god(G)))}, {is_unit(_2192, X)}==>proven_neg(different(X, _2192)).
- % pfc :-
- % {dif:dif(X, _2068)}, man(_2192), {dif:dif(X, _2192)}, man(_2068), ~god(G), {ignore(G=skFn(god(G)))}, {is_unit(X)}==>proven_neg(man(X)).
- % pfc :-
- % man(X), man(_2192), {dif:dif(X, _2068), dif:dif(X, _2192)}, man(_2068), ~god(G), {ignore(G=skFn(god(G)))}, {is_unit(_2068, X)}==>proven_neg(different(X, _2068)).
- % pfc :-
- % {dif:dif(X, _2068)}, man(X), {dif:dif(X, _2192)}, man(_2068), ~god(G), {ignore(G=skFn(god(G)))}, {is_unit(_2192)}==>proven_neg(man(_2192)).
- % pfc :-
- % man(_2192), man(X), {dif:dif(X, _2068), dif:dif(X, _2192)}, man(_2068), ~god(G), {ignore(G=skFn(god(G)))}, {is_unit(_2068, X)}==>proven_neg(different(X, _2068)).
- */
- % god(_1298{sk = ...}) :-
- % skolem(_1358{sk = ...}, skIsManIn_1Fn(_10978, _1298{sk = ...})),
- % ~man(_1358{sk = ...}),
- % skolem(_1298{sk = ...}, skIsGodIn_2Fn(_10978)).
- % god(_3110{sk = ...}) :-
- % man(_11144),
- % man(_11166),
- % skolem(_3110{sk = ...}, skIsGodIn_2Fn(_11166)).
- % man(_2204{sk = ...}) :-
- % skolem(_2204{sk = ...}, skIsManIn_1Fn(_11314, _2224{sk = ...})),
- % skolem(_2224{sk = ...}, skIsGodIn_2Fn(_11314)),
- % \+ ~god(_2224{sk = ...}).
- % ~man(_11494) :-
- % \+ ( man(_11516),
- % naf(~skolem(_4090{sk = ...}, skIsGodIn_2Fn(_11494))),
- % god(_4090{sk = ...})
- % ).
- % ~man(_11656) :-
- % \+ ( man(_11678),
- % naf(~skolem(_4504{sk = ...}, skIsGodIn_2Fn(_11678))),
- % god(_4504{sk = ...})
- % ).
- % OR?
- % god(G) :-
- % skolem(_1316_sk, skIsManIn_1Fn(X, G)),
- % ~man(_1316_sk),
- % skolem(G, skIsGodIn_1Fn(X)).
- % god(G) :-
- % man(_2720),
- % ~equals(_2742, X),
- % man(X),
- % skolem(G, skIsGodIn_1Fn(X)).
- % man(_1342_sk) :-
- % skolem(_1342_sk, skIsManIn_1Fn(X, G)),
- % skolem(G, skIsGodIn_1Fn(X)),
- % \+ ~god(G).
- % naf(~equals(_3108, X)) :-
- % man(_3148),
- % man(X),
- % skolem(G, skIsGodIn_1Fn(X)),
- % \+ ~god(G).
- % ~man(X) :-
- % man(_3330),
- % \+ ( \+ ~ (~equals(_3352, X)),
- % naf(~skolem(G, skIsGodIn_1Fn(X))),
- % god(G)
- % ).
- % ~man(_3544) :-
- % ~equals(_3566, X),
- % \+ ( man(X),
- % naf(~skolem(G, skIsGodIn_1Fn(X))),
- % god(G)
- % ).
- % ~equals(_1478_sk, X) :-
- % \+ ( skolem(G, skIsGodIn_1Fn(X)),
- % god(G)
- % ).
- % ================================================================================================================
- % A person holding a bird is performing bird holding
- % ================================================================================================================
- :- test_boxlog(implies(and(instance(HOLD, actHoldingAnObject),
- objectActedOn(HOLD, BIRD),
- instance(BIRD, tClazzBird),
- performedBy(HOLD, PER),
- instance(PER, mobPerson)),
- holdsIn(HOLD, onPhysical(BIRD, PER))),
- O),
- maplist(wdmsg, O).
- /*
- % /home/prologmud_server/lib/swipl/pack/logicmoo_base/t/examples/fol/boxlog_sanity.pl:460
- % kif :-
- % all(HOLD,
- % all(BIRD,
- % all(PER,
- % (actHoldingAnObject(HOLD)&(objectActedOn(HOLD, BIRD)&(tClazzBird(BIRD)&(performedBy(HOLD, PER)&mobPerson(PER))))=>holdsIn(HOLD, onPhysical(BIRD, PER)))))).
- % qualify_nesc :-
- % all(HOLD,
- % all(BIRD,
- % all(PER,
- % nesc((actHoldingAnObject(HOLD)&(objectActedOn(HOLD, BIRD)&(tClazzBird(BIRD)&(performedBy(HOLD, PER)&mobPerson(PER))))=>holdsIn(HOLD, onPhysical(BIRD, PER))))))).
- % debugm(user, sc_success(user, user:nnf(KB, all(HOLD, all(BIRD, all(PER, nesc(b_d(KB, nesc, poss), (actHoldingAnObject(HOLD)&(objectActedOn(HOLD, BIRD)&(tClazzBird(BIRD)&(performedBy(HOLD, PER)&mobPerson(PER))))=>holdsIn(HOLD, onPhysical(BIRD, PER))))))), nesc(b_d(KB, nesc, poss), ~actHoldingAnObject(HOLD)v(~objectActedOn(HOLD, BIRD)v(~tClazzBird(BIRD)v(~performedBy(HOLD, PER)v~mobPerson(PER))))v(~occuring(HOLD)v onPhysical(BIRD, PER)))))).
- % nnf :-
- % nesc(~actHoldingAnObject(HOLD)v(~objectActedOn(HOLD, BIRD)v(~tClazzBird(BIRD)v(~performedBy(HOLD, PER)v~mobPerson(PER))))v(~occuring(HOLD)v onPhysical(BIRD, PER))).
- % th_nnf_in :-
- % ( ( neg(actHoldingAnObject(HOLD))
- % ; neg(objectActedOn(HOLD, BIRD))
- % ; neg(tClazzBird(BIRD))
- % ; neg(performedBy(HOLD, PER))
- % ; neg(mobPerson(PER))
- % )
- % ; neg(occuring(HOLD))
- % ; tru(onPhysical(BIRD, PER))
- % ).
- % th_nnf_out :-
- % ~ ((n(neg(actHoldingAnObject(HOLD))), n(neg(objectActedOn(HOLD, BIRD))), n(neg(tClazzBird(BIRD))), n(neg(performedBy(HOLD, PER))), n(neg(mobPerson(PER)))), n(neg(occuring(HOLD))), n(tru(onPhysical(BIRD, PER)))).
- % proven_neg(actHoldingAnObject(HOLD)) :-
- % objectActedOn(HOLD, BIRD),
- % tClazzBird(BIRD),
- % performedBy(HOLD, PER),
- % mobPerson(PER),
- % occuring(HOLD),
- % ~onPhysical(BIRD, PER).
- % proven_neg(objectActedOn(HOLD, BIRD)) :-
- % tClazzBird(BIRD),
- % performedBy(HOLD, PER),
- % mobPerson(PER),
- % actHoldingAnObject(HOLD),
- % occuring(HOLD),
- % ~onPhysical(BIRD, PER).
- % proven_neg(tClazzBird(BIRD)) :-
- % performedBy(HOLD, PER),
- % mobPerson(PER),
- % objectActedOn(HOLD, BIRD),
- % actHoldingAnObject(HOLD),
- % occuring(HOLD),
- % ~onPhysical(BIRD, PER).
- % proven_neg(performedBy(HOLD, PER)) :-
- % mobPerson(PER),
- % tClazzBird(BIRD),
- % objectActedOn(HOLD, BIRD),
- % actHoldingAnObject(HOLD),
- % occuring(HOLD),
- % ~onPhysical(BIRD, PER).
- % proven_neg(mobPerson(PER)) :-
- % performedBy(HOLD, PER),
- % tClazzBird(BIRD),
- % objectActedOn(HOLD, BIRD),
- % actHoldingAnObject(HOLD),
- % occuring(HOLD),
- % ~onPhysical(BIRD, PER).
- % proven_neg(occuring(HOLD)) :-
- % ~onPhysical(BIRD, PER),
- % actHoldingAnObject(HOLD),
- % objectActedOn(HOLD, BIRD),
- % tClazzBird(BIRD),
- % performedBy(HOLD, PER),
- % mobPerson(PER).
- % proven_tru(onPhysical(BIRD, PER)) :-
- % occuring(HOLD),
- % actHoldingAnObject(HOLD),
- % objectActedOn(HOLD, BIRD),
- % tClazzBird(BIRD),
- % performedBy(HOLD, PER),
- % mobPerson(PER).
- */
- % ~occuring(_2056) :-
- % instance(_2056, actHoldingAnObject),
- % objectActedOn(_2056, _2078),
- % instance(_2078, tClazzBird),
- % \+ ( performedBy(_2056, _2100),
- % naf(~instance(_2100, mobPerson)),
- % onPhysical(_2078, _2100)
- % ).
- % ~instance(_2260, mobPerson) :-
- % instance(_2282, actHoldingAnObject),
- % objectActedOn(_2282, _2304),
- % instance(_2304, tClazzBird),
- % \+ ( performedBy(_2282, _2260),
- % naf(~occuring(_2282)),
- % onPhysical(_2304, _2260)
- % ).
- % ~instance(_2520, tClazzBird) :-
- % instance(_2542, actHoldingAnObject),
- % objectActedOn(_2542, _2520),
- % performedBy(_2542, _2564),
- % \+ ( instance(_2564, mobPerson),
- % naf(~occuring(_2542)),
- % onPhysical(_2520, _2564)
- % ).
- % ~instance(_2752, actHoldingAnObject) :-
- % objectActedOn(_2752, _2774),
- % instance(_2774, tClazzBird),
- % performedBy(_2752, _2796),
- % \+ ( instance(_2796, mobPerson),
- % naf(~occuring(_2752)),
- % onPhysical(_2774, _2796)
- % ).
- % ~objectActedOn(_2984, _3006) :-
- % instance(_2984, actHoldingAnObject),
- % instance(_3006, tClazzBird),
- % performedBy(_2984, _3028),
- % \+ ( instance(_3028, mobPerson),
- % naf(~occuring(_2984)),
- % onPhysical(_3006, _3028)
- % ).
- % ~performedBy(_3190, _3212) :-
- % instance(_3190, actHoldingAnObject),
- % objectActedOn(_3190, _3234),
- % instance(_3234, tClazzBird),
- % \+ ( instance(_3212, mobPerson),
- % naf(~occuring(_3190)),
- % onPhysical(_3234, _3212)
- % ).
- % onPhysical(_3396, _3418) :-
- % instance(_3440, actHoldingAnObject),
- % objectActedOn(_3440, _3396),
- % instance(_3396, tClazzBird),
- % performedBy(_3440, _3418),
- % instance(_3418, mobPerson),
- % occuring(_3440).
- :- test_boxlog(sourceSchemaObjectID(SOURCE,
- SCHEMA,
- uU(uSourceSchemaObjectFn, SOURCE, SCHEMA, ID),
- ID)).
- /*
- % /home/prologmud_server/lib/swipl/pack/logicmoo_base/t/examples/fol/boxlog_sanity.pl:524
- % :- test_boxlog(sourceSchemaObjectID(SOURCE_VAR,
- % SCHEMA_VAR,
- % uU(uSourceSchemaObjectFn,
- % SOURCE_VAR,
- % SCHEMA_VAR,
- % ID_VAR),
- % ID_VAR)).
- % kif :-
- % all(SOURCE,
- % all(SCHEMA,
- % all(ID,
- % sourceSchemaObjectID(SOURCE,
- % SCHEMA,
- % u(uSourceSchemaObjectFn,
- % SOURCE,
- % SCHEMA,
- % ID),
- % ID)))).
- % qualify_nesc :-
- % all(SOURCE,
- % all(SCHEMA,
- % all(ID,
- % nesc(sourceSchemaObjectID(SOURCE,
- % SCHEMA,
- % u(uSourceSchemaObjectFn,
- % SOURCE,
- % SCHEMA,
- % ID),
- % ID))))).
- % debugm(user, sc_success(user, user:nnf(KB, all(SOURCE, all(SCHEMA, all(ID, nesc(b_d(KB, nesc, poss), sourceSchemaObjectID(SOURCE, SCHEMA, u(uSourceSchemaObjectFn, SOURCE, SCHEMA, ID), ID))))), nesc(b_d(KB, nesc, poss), sourceSchemaObjectID(SOURCE, SCHEMA, u(uSourceSchemaObjectFn, SOURCE, SCHEMA, ID), ID))))).
- % nnf :-
- % nesc(sourceSchemaObjectID(SOURCE,
- % SCHEMA,
- % u(uSourceSchemaObjectFn, SOURCE, SCHEMA, ID),
- % ID)).
- % th_nnf_in :-
- % tru(t(sourceSchemaObjectID,
- % SOURCE,
- % SCHEMA,
- % u(uSourceSchemaObjectFn, SOURCE, SCHEMA, ID),
- % ID)).
- % th_nnf_out :-
- % ~n(tru(t(sourceSchemaObjectID, SOURCE, SCHEMA, u(uSourceSchemaObjectFn, SOURCE, SCHEMA, ID), ID))).
- % proven_tru(t(sourceSchemaObjectID, SOURCE, SCHEMA, u(uSourceSchemaObjectFn, SOURCE, SCHEMA, ID), ID)).
- % pfc :-
- % proven_tru(sourceSchemaObjectID(SOURCE,
- % SCHEMA,
- % u(uSourceSchemaObjectFn,
- % SOURCE,
- % SCHEMA,
- % ID),
- % ID)).
- */
- % ~mudEquals(_1236{???UUUSOURCESCHEMAOBJECTFN1}, uU(uSourceSchemaObjectFn, _2438, _2460, _2482)) :-
- % ~sourceSchemaObjectID(_2438, _2460, _1280{???UUUSOURCESCHEMAOBJECTFN1}, _2482).
- % sourceSchemaObjectID(_2614, _2636, UUUSOURCESCHEMAOBJECTFN1_VAR, _2658) :-
- % mudEquals(_1006{???UUUSOURCESCHEMAOBJECTFN1},
- % uU(uSourceSchemaObjectFn, _2614, _2636, _2658)).
- :- test_boxlog(sourceSchemaObjectID(SOURCE,
- SCHEMA,
- THING,
- uU(uSourceSchemaObjectIDFn,
- SOURCE,
- SCHEMA,
- THING))).
- /*
- % /home/prologmud_server/lib/swipl/pack/logicmoo_base/t/examples/fol/boxlog_sanity.pl:532
- % :- test_boxlog(sourceSchemaObjectID(SOURCE_VAR,
- % SCHEMA_VAR,
- % THING_VAR,
- % uU(uSourceSchemaObjectIDFn,
- % SOURCE_VAR,
- % SCHEMA_VAR,
- % THING_VAR))).
- % kif :-
- % all(SOURCE,
- % all(SCHEMA,
- % all(THING,
- % sourceSchemaObjectID(SOURCE,
- % SCHEMA,
- % THING,
- % u(uSourceSchemaObjectIDFn,
- % SOURCE,
- % SCHEMA,
- % THING))))).
- % qualify_nesc :-
- % all(SOURCE,
- % all(SCHEMA,
- % all(THING,
- % nesc(sourceSchemaObjectID(SOURCE,
- % SCHEMA,
- % THING,
- % u(uSourceSchemaObjectIDFn,
- % SOURCE,
- % SCHEMA,
- % THING)))))).
- % debugm(user, sc_success(user, user:nnf(KB, all(SOURCE, all(SCHEMA, all(THING, nesc(b_d(KB, nesc, poss), sourceSchemaObjectID(SOURCE, SCHEMA, THING, u(uSourceSchemaObjectIDFn, SOURCE, SCHEMA, THING)))))), nesc(b_d(KB, nesc, poss), sourceSchemaObjectID(SOURCE, SCHEMA, THING, u(uSourceSchemaObjectIDFn, SOURCE, SCHEMA, THING)))))).
- % nnf :-
- % nesc(sourceSchemaObjectID(SOURCE,
- % SCHEMA,
- % THING,
- % u(uSourceSchemaObjectIDFn,
- % SOURCE,
- % SCHEMA,
- % THING))).
- % th_nnf_in :-
- % tru(t(sourceSchemaObjectID,
- % SOURCE,
- % SCHEMA,
- % THING,
- % u(uSourceSchemaObjectIDFn, SOURCE, SCHEMA, THING))).
- % th_nnf_out :-
- % ~n(tru(t(sourceSchemaObjectID, SOURCE, SCHEMA, THING, u(uSourceSchemaObjectIDFn, SOURCE, SCHEMA, THING)))).
- % proven_tru(t(sourceSchemaObjectID, SOURCE, SCHEMA, THING, u(uSourceSchemaObjectIDFn, SOURCE, SCHEMA, THING))).
- % pfc :-
- % proven_tru(sourceSchemaObjectID(SOURCE,
- % SCHEMA,
- % THING,
- % u(uSourceSchemaObjectIDFn,
- % SOURCE,
- % SCHEMA,
- % THING))).
- */
- % ~mudEquals(_886{???UUUSOURCESCHEMAOBJECTIDFN1}, uU(uSourceSchemaObjectIDFn, _1072, _1094, _1116)) :-
- % ~sourceSchemaObjectID(_1072, _1094, _1116, _906{???UUUSOURCESCHEMAOBJECTIDFN1}).
- % sourceSchemaObjectID(_1248, _1270, _1292, UUUSOURCESCHEMAOBJECTIDFN1_VAR) :-
- % mudEquals(_868{???UUUSOURCESCHEMAOBJECTIDFN1},
- % uU(uSourceSchemaObjectIDFn, _1248, _1270, _1292)).
- :- test_defunctionalize(implies(instance(YEAR, tClazzCalendarYear),
- temporallyFinishedBy(YEAR,
- uU(iTimeOf_SecondFn,
- 59,
- uU(iTimeOf_MinuteFn,
- 59,
- uU(iTimeOf_HourFn,
- 23,
- uU(iTimeOf_DayFn,
- 31,
- uU(iTimeOf_MonthFn,
- vDecember,
- YEAR)))))))).
- /*
- % /home/prologmud_server/lib/swipl/pack/logicmoo_base/t/examples/fol/boxlog_sanity.pl:541
- % '' :-
- % mudEquals(UUITIMEOF_SECONDFN1_VAR, uU(iTimeOf_SecondFn, 59, UUITIMEOF_MINUTEFN1_VAR))=>(mudEquals(UUITIMEOF_MINUTEFN1_VAR, uU(iTimeOf_MinuteFn, 59, UUITIMEOF_HOURFN1_VAR))=>(mudEquals(UUITIMEOF_HOURFN1_VAR, uU(iTimeOf_HourFn, 23, UUITIMEOF_DAYFN1_VAR))=>(mudEquals(UUITIMEOF_DAYFN1_VAR, uU(iTimeOf_DayFn, 31, UUITIMEOF_MONTHFN1_VAR))=>(mudEquals(UUITIMEOF_MONTHFN1_VAR, uU(iTimeOf_MonthFn, vDecember, YEAR))=>implies(instance(YEAR, tClazzCalendarYear), temporallyFinishedBy(YEAR, UUITIMEOF_SECONDFN1_VAR)))))).
- */
- % >(mudEquals(UUITIMEOF_SECONDFN1_VAR, uU(iTimeOf_SecondFn, 59, UUITIMEOF_MINUTEFN1_VAR)), =>(mudEquals(UUITIMEOF_MINUTEFN1_VAR, uU(iTimeOf_MinuteFn, 59, UUITIMEOF_HOURFN1_VAR)), =>(mudEquals(UUITIMEOF_HOURFN1_VAR, uU(iTimeOf_HourFn, 23, UUITIMEOF_DAYFN1_VAR)), =>(mudEquals(UUITIMEOF_DAYFN1_VAR, uU(iTimeOf_DayFn, 31, UUITIMEOF_MONTHFN1_VAR)), =>(mudEquals(UUITIMEOF_MONTHFN1_VAR, uU(iTimeOf_MonthFn, vDecember, _200)), implies(instance(_200, tClazzCalendarYear), temporallyFinishedBy(_200, UUITIMEOF_SECONDFN1_VAR))))))).
- % init_why(after('/home/prologmud_server/lib/swipl/pack/logicmoo_base/t/examples/fol/boxlog_sanity.pl')).
- % start_x_ide
- % Dont forget to ?- logicmoo_i_cyc_xform.
- % after_boot
- % init_why(program).
- baseKB: ?-
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement