Overview
This week we begin Chapter 3: Symbolic Logic and Proofs after taking our test on sequences.
Thursday, April 11th
Classwork / Homework
We'll start class by running this program:
import ttg print(ttg.Truths( ['p', 'q', 'r'], ['p => q', 'q => r', '(p => q) or (q => r)'], ints=False) )
After that we'll spend the rest of our class time and our homeword time working all the exercises at the end of Section 3.1: Propositional Logic.
Note: The makeup for the Sequence test is today after school beginning at 3:10 p.m.
Monday, April 8th
Classwork
Sequence test!
Homework
Run the following commands to install a Python virtual environment which we can use for Python resources in support of our study of discrete math:
% cd % python3 -m venv pyvenv % source pyvenv/bin/activate % (pyvenv) % pip install wheel % (pyvenv) % pip install truth-table-generator
Now run the following to prove the first of De Morgan's laws:
(pyvenv) % ttg_cli.py "['p', 'q']" -p "['~(p and q)', '~p or ~q']" -i False
This should give you the following output:
+-------+-------+--------------+------------+ | p | q | ~(p and q) | ~p or ~q | |-------+-------+--------------+------------| | True | True | False | False | | True | False | True | True | | False | True | True | True | | False | False | True | True | +-------+-------+--------------+------------+
Read the first section of chapter 3 in our text, pages 197 to 208, taking
notes in your git repo. Use ttg_cli.py
to prove the other of De
Morgan's laws, and experiment with it until you feel comfortable you can
generate different truth tables with it.