Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
| Download
Project: Applied Discrete Structures
Views: 509An Introduction to Logic using Sage
Applied Discrete Structures by Alan Doerr & Kenneth Levasseur is licensed under a Creative Commons Attribution - Noncommercial - No Derivative Works 3.0 United States License.
Here are a few tips on how to get started using Sage to work logic.
(a&b)|(a&c)
a b c value
False False False False
False False True False
False True False False
False True True False
True False False False
True False True True
True True False True
True True True True
a b c value
False False False True
False False True True
False True False True
False True True True
True False False True
True False True True
True True False True
True True True True
True
True
x y z value
False False False True
False False True True
False True False True
False True True True
True False False True
True False True True
True True False False
True True True True
'&a|bc'
(a|b|c)&(a|b|~c)&(a|~b|c)&(a|~b|~c)&(~a|b|c)
['|', ['&', 'a', 'b'], ['&', 'a', 'c']]
False
Here is an algorithmic solution to exercise 10 at the end of Section 3.7, on Mathematical Induction. The problem was to prove that all postage amounts greater than or equal to 8 can be made using 3 and 5 cent stamps. Notice that the solution for any value of greater than 8 relies on the solution of the previous value, , in the same way as we can verify by induction that if the case of can be solved, then we can use it to solve the case of .
[17, 1]