2
$\begingroup$

I'm currently in Symbolic Logic with homework assignments (not asking for people to do my homework for me) with questions such as the following:

(derive the conclusion using the eighteen rules of inference)

  1. R ⊃ B
  2. R ⊃ (B ⊃ F )
  3. B ⊃ (F ⊃ H )
    Conclusion: R ⊃ H

Two questions: is there a way to go through the logic, with the rules (if there are built-in symbolic logic rules), to arrive at the specific conclusion (there are always multiple ways to solve it, however)? And more importantly, how do I do symbolic logic in mathematica? I can't find any resources that mention how to do it with the relevance of the kind of symbolic logic I'm doing in my class.

$\endgroup$
4
  • $\begingroup$ The superset, ⊃, stands for 'implication' in my class. $\endgroup$
    – Paul Lemus
    Commented May 18, 2016 at 5:07
  • $\begingroup$ 1. Implies[R,B] 2. Implies[R,Implies[B,F]] 3. Division is not a logical operation. $\endgroup$ Commented May 18, 2016 at 5:51
  • $\begingroup$ Oh, that's the conclusion after the forward slash $\endgroup$
    – Paul Lemus
    Commented May 18, 2016 at 6:02
  • $\begingroup$ Fixed @RomkeBontekoe $\endgroup$
    – Paul Lemus
    Commented May 18, 2016 at 6:03

2 Answers 2

3
$\begingroup$

I am no expert on Boolean logic, but this may be some start for you:

homework = Implies[r, b] && Implies[r, Implies[b, f]] && Implies[b, Implies[f, h]]
BooleanConvert[homework]
LogicalExpand[homework]
BooleanTable[homework, {r, b, f, h}]

You could check the documentation and the examples of these functions.

$\endgroup$
0
$\begingroup$

You can make use of my SetSimplify function from my answer to How can I define operators that implement the algebra of sets?. After loading the code, we get:

SetSimplify[R ⊐ H, R ⊐ B && R ⊐ (B ⊐ F) && B ⊐ (F ⊐ H)]

True

where my code uses instead of .

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.