
/*
The lion lies on mondays, tuesdays and wednesdays and tells the truth
the other days.

The unicorn lies on thursdays, fridays and saturdays and tells the truth
the other days.

Lion: 		the day before yesterday was one of my lying days
Unicorn: 	the day before yesterday was one of my lying days

Whay day is it?
*/


%precedence( [yes,we,th,fr,mo,tu,sa,su,mon,tues,wes,thus,fri,sat,sun,lion,unicorn] ).
predicates( [ll,lu,day,lies,crea,we,th,fr,mo,tu,sa,su] ).
%first_predicate_precedence( [lies,ll,lu,day,crea] ).

axiom( [ [], [mo(mon)] ] ).
axiom( [ [], [tu(tues)] ] ).
axiom( [ [], [we(wes)] ] ).
axiom( [ [], [th(thus)] ] ).
axiom( [ [], [fr(fri)] ] ).
axiom( [ [], [sa(sat)] ] ).
axiom( [ [], [su(sun)] ] ).
axiom( [ [mo(X1)], [ll(X1)] ] ).
axiom( [ [tu(X2)], [ll(X2)] ] ).
axiom( [ [we(X3)], [ll(X3)] ] ).
axiom( [ [th(X4), ll(X4)], [] ] ).
axiom( [ [fr(X5), ll(X5)], [] ] ).
axiom( [ [sa(X6), ll(X6)], [] ] ).
axiom( [ [su(X7), ll(X7)], [] ] ).
axiom( [ [mo(X1), lu(X1)], [] ] ).
axiom( [ [tu(X2), lu(X2)], [] ] ).
axiom( [ [we(X3), lu(X3)], [] ] ).
axiom( [ [th(X4)], [lu(X4)] ] ).
axiom( [ [fr(X5)], [lu(X5)] ] ).
axiom( [ [sa(X6)], [lu(X6)] ] ).
axiom( [ [su(X7),lu(X7)], [] ] ).
axiom( [ [mo(X1)], [day(X1)] ] ).
axiom( [ [tu(X2)], [day(X2)] ] ).
axiom( [ [we(X3)], [day(X3)] ] ).
axiom( [ [th(X4)], [day(X4)] ] ).
axiom( [ [fr(X5)], [day(X5)] ] ).
axiom( [ [sa(X6)], [day(X6)] ] ).
axiom( [ [su(X7)], [day(X7)] ] ).
axiom( [ [ll(X)], [day(X)] ] ).
axiom( [ [lu(Y)], [day(Y)] ] ).
axiom( [ [], [crea(lion)] ] ).
axiom( [ [], [crea(unicorn)] ] ).
axiom( [ [mo(X1)], [su(yes(X1))] ] ).
axiom( [ [tu(X2)], [mo(yes(X2))] ] ).
axiom( [ [we(X3)], [tu(yes(X3))] ] ).
axiom( [ [th(X4)], [we(yes(X4))] ] ).
axiom( [ [fr(X5)], [th(yes(X5))] ] ).
axiom( [ [sa(X6)], [fr(yes(X6))] ] ).
axiom( [ [su(X7)], [sa(yes(X7))] ] ).
axiom( [ [day(X),day(Y),lies(lion,X,Y)], [ll(X),ll(Y)] ] ).
axiom( [ [day(X),ll(Y),day(Y)], [ll(X), lies(lion,X,Y)] ] ).
axiom( [ [day(X),day(Y),ll(X),lies(lion,X,Y),ll(Y)], [] ] ).
axiom( [ [day(X),day(Y),ll(X)], [lies(lion,X,Y),ll(Y)] ] ).
axiom( [ [day(X),day(Y),lies(unicorn,X,Y)], [lu(X),lu(Y)] ] ).
axiom( [ [day(X),day(Y),lu(Y)], [lu(X),lies(unicorn,X,Y) ] ] ).
axiom( [ [day(X),day(Y),lu(X),lies(unicorn,X,Y),lu(Y)], [] ] ).
axiom( [ [day(X),day(Y),lu(X)], [lies(unicorn,X,Y),lu(Y)] ] ).

axiom( [ [ day(X),lies(lion,X,yes(yes(X))),lies(unicorn,X,yes(yes(X)))], []] ).
