| Author |
Comment/Response |
LogicProgramming
|
10/26/12 4:41pm
Hi,
I am new to Mathematica and am using it to program propositional logic.
I'm wondering what the difference is between the If and the Implies operators. For example, both If[p,q] and Implies[p,q] return q for p=True (as a logical conditional is expected to).
But when I try to obtain SatisfiabilityInstances, I get the following:
- SatisfiabilityInstances[If[p, q], {p, q}]
returns {{True, True}}, unless I ask it for more instances:
- SatisfiabilityInstances[If[p, q], {p, q}, All]
returns SatisfiabilityInstances::boolv: "If[p,q] is not Boolean valued at {False,True}."
However:
- SatisfiabilityInstances[Implies[p, q], {p, q}, All] returns the expected out of: {{True, True}, {False, True}, {False, False}}.
Can you please explain what is causing this difference in the outputs? Thank you!
URL: , |
|