Propositional logic and truth table (CSCI 2824 Spring 2015)In this lecture, we will cover the following concepts:
This lecture corresponds to section 1.3 in Ensley and Crawley's book. LogicIn a very crude sense, logic is the assembly language of mathematics (or philosophy). Logic can be defined as the study of reasoning itself or the study of techniques for drawing valid conclusions from premises. Understanding Logic is very important to computing at many levels. For instance, propositional Logic and propositional connectives such as AND, OR and NOT form the basic building block of digital circuits from which we build modern computers. Logic is also key to areas of CS such as automata theory, programming language semantics and artificial intelligence. Propositional LogicWhat are propositions? Propositions are simply declarative statements that are either true or false, but not both. Examples of propositions:
While studying propositional logic, we do not really care about what the proposition itself “means” just that it is either true or it is false. Therefore, we simply use propositional variables (also called Boolean variables) to represent propositions. Why this? Just makes it nice and algebra like. Proposition variables can take on boolean values, i.e., T (true) or F (false). We use letters like Propositional Logic FormulaeFormulae in propositional logic are defined as follows:
Caution on “OR” operator When we say ‘‘Either This is different from the exclusive OR (written as XOR or
Let us try some examples. Read the following propositional formulae aloud:
ExampleConsider the following two propositions:
Then:
Truth tableWe evaluate propositional formulae using truth tables. For any given proposition formula depending on several propositional variables, we can draw a truth table considering all possible combinations of boolean values that the variables can take, and in the table we evaluate the resulting boolean value of the proposition formula for each combination of boolean values. Truth Table for AND
Each row represents some kind of a situation. For example, the top most row represents the
situation when propositions Logicians call these situations models. In this case, a Logician would
say that the truth assignment To avoid confusion let us use the term “situations” and “models”. We will formalize models later for first-order (predicate) logic. Truth Table for OR
Can you write down all the models of Does this correspond to your conception of Truth Table for NOT
Truth Table for Compound FormulaeXOR is an important derived connective that is defined in terms of
Its truth table can be written as below:
We will go through few more examples of truth tables in the book. Other examples of derived connectives are:
Let us write the truth table for the
Tautology, Fallacies and EquivalenceTautologyA formula is a tautology if and only if it is true no matter what value one gives to the propositions involved in the formula. Example is
No matter what you value one gives Other examples of tautology are
FallaciesFallacies are the opposite of tautologies. These are formulae that are false no matter what the truth values of the propositions in them. Example:
If we take a tautology and negate it then it becomes a fallacy. Therefore Logical EquivalenceTwo formulae are logically equivalent if and only if they have the same truth value in each row
of the (joint) truth table.
When two propositional formulae Example: The formulae
Notice that for all the truth table rows, Examples of equivalent formulae include
Technically, you need not assume that the formulae have the same set of propositions. For example, Similarly, Example: De Morgan's lawsThe De Morgan's laws are good examples of logically equivalent
formulae: for any two proposition formulae ![]() Again, the equivalence can be provde using truth tables. Theorem:Statement of Theorem:
Whenever two formulae Proof: Consider the truth table for the formula
Note that for As a result, the |