cnf(truthteller_or_liar,axiom,
    ( a_truth(truthteller(X))
    | a_truth(liar(X)) ) ).

cnf(not_both,axiom,
    ( ~ a_truth(truthteller(X))
    | ~ a_truth(liar(X)) ) ).

cnf(truthtellers_tell_truth,axiom,
    ( ~ a_truth(truthteller(Truthteller))
    | ~ a_truth(says(Truthteller,Statement))
    | a_truth(Statement) ) ).

cnf(liars_lie,axiom,
    ( ~ a_truth(liar(Liar))
    | ~ a_truth(says(Liar,Statement))
    | ~ a_truth(Statement) ) ).

cnf(truths_are_told_by_truthtellers,axiom,
    ( ~ a_truth(Statement)
    | ~ a_truth(says(Truthteller,Statement))
    | a_truth(truthteller(Truthteller)) ) ).

cnf(liars_are_told_by_liars,axiom,
    ( a_truth(Statement)
    | ~ a_truth(says(Liar,Statement))
    | a_truth(liar(Liar)) ) ).

cnf(two_liars_are_equal,axiom,
    ( ~ people(X,Y,Z)
    | ~ a_truth(liar(X))
    | ~ a_truth(liar(Y))
    | a_truth(equal_type(X,Y)) ) ).

cnf(two_truthtellers_are_equal,axiom,
    ( ~ people(X,Y,Z)
    | ~ a_truth(truthteller(X))
    | ~ a_truth(truthteller(Y))
    | a_truth(equal_type(X,Y)) ) ).

cnf(truthteller_equals_truthtller,axiom,
    ( ~ a_truth(equal_type(X,Y))
    | ~ a_truth(truthteller(X))
    | a_truth(truthteller(Y)) ) ).

cnf(liar_equals_liar,axiom,
    ( ~ a_truth(equal_type(X,Y))
    | ~ a_truth(liar(X))
    | a_truth(liar(Y)) ) ).

cnf(truthteller_not_equal_liar,axiom,
    ( ~ a_truth(truthteller(X))
    | a_truth(equal_type(X,Y))
    | a_truth(liar(Y)) ) ).

cnf(liar_not_equal_truthteller,axiom,
    ( ~ a_truth(liar(X))
    | a_truth(equal_type(X,Y))
    | a_truth(truthteller(Y)) ) ).

cnf(symmetry_of_equal_type,axiom,
    ( ~ a_truth(equal_type(X,Y))
    | a_truth(equal_type(Y,X)) ) ).

cnf(truthteller_identifies_truths,axiom,
    ( ~ ask_1_if_2(X,Y)
    | ~ a_truth(truthteller(X))
    | ~ a_truth(Y)
    | answer(yes) ) ).

cnf(truthteller_denies_lies,axiom,
    ( ~ ask_1_if_2(X,Y)
    | ~ a_truth(truthteller(X))
    | a_truth(Y)
    | answer(no) ) ).

cnf(liar_denies_truths,axiom,
    ( ~ ask_1_if_2(X,Y)
    | ~ a_truth(liar(X))
    | ~ a_truth(Y)
    | answer(no) ) ).

cnf(liar_supports_lies,axiom,
    ( ~ ask_1_if_2(X,Y)
    | ~ a_truth(liar(X))
    | a_truth(Y)
    | answer(yes) ) ).

cnf(b_c_a_are_people,hypothesis,
    people(b,c,a) ).

%----bugs here
cnf(a_b_c_are_people,hypothesis,
    people(a,b,a) ).

cnf(a_c_b_are_people,hypothesis,
    people(a,c,b) ).

cnf(c_b_a_are_people,hypothesis,
    people(c,b,a) ).

cnf(a_says_b_and_c_equal,hypothesis,
    a_truth(says(a,equal_type(b,c))) ).

cnf(ask_c_if_a_and_b_equal,hypothesis,
    ask_1_if_2(c,equal_type(a,b)) ).

cnf(prove_there_is_an_answer,negated_conjecture,
    ~ answer(Answer) ).