Introduction To Propositional Logic
- We will define propositional logic
- We will discuss the properties of propositional logic
- As well as then discussion of the applications of propositional logic
Propositional logic is a branch of logic that is interested in studying mathematical statements. It is the basis of all of the reasoning and the rules we use for constructing mathematical theories.
It dates back to Aristotle and was used for basically algebra of proposition, with the variables being unknown propositions instead of unknown real numbers, the operators used are:
∧and∨or¬not/negate→implies↔if and only if⊕exclusive or
This is really useful for things like designing circuits on computer boards, and can also be used in things like programming languages and systems. Many systems in computer science, such as theorem prove(rs), program versifiers, and applications in the field of artificial intelligence have used logic-based programming.
Propositions
A proposition is a declarative sentence that is either true or false, but is not both. It is the most basic element of logic, and is the building block for every other form of logical statement in this section of mathematics.
Examples of Propositions:
- London is the capital of the United Kingdom, this is a declarative sentence, and is proved to be true, and therefore is a proposition
- 1 + 1 = 2, this is also a declarative statement that is in fact true, and is also a proposition
- 2 > 3, this is a declarative statement that is false, and even though it is false, it is still a proposition
Examples that are not Propositions
- x + 1 = 2, this is not a proposition because we do not know the value of x, it could be 1 which makes the statement true, or it could be not one which makes the statement false, and this we cannot say that it is either true or false and so is not a proposition.
- It should be known however that we can in fact make these propositions if we give values or even ranges to the variables, so suddenly something like
∃x∈ℕ, x + 1 = 2this is in fact true because there does exist some value of x in the set of normal numbers where x + 1 is equal to 2.
In order to not have to rewrite very long propositional statements each and every single time that you want to use them in a mathematical sense, what you end up doing is have a variable represent them, this is generally denoted by variables like p, q, r and so on, given the number of propositions you have:
Truth Tables and Truth Sets
A truth table is a tabular representation o fall the possible combinations of it’s constituent variables, so basically you have your two propositions, and then you can define how they would interact, defining out all of the possible outcomes that you can get from your compound proposition:
| p | q | p ^ q |
|---|---|---|
| true | false | false |
| true | true | true |
| false | false | false |
| false | true | true |
This is very useful for when you end up having very large and very complex propositions with a lot of moving parts, and this can be very good for doing things like defining what propositions might always be contradictions or might always be tautologies as well. It is also good for showcasing that two different compound propositions have the same outputs such as p → q and it’s contrapositive of ¬q → ¬p. The number of rows in a truth table is defined by where x = # of propositions
Definition of a Truth set:
Truth Set: let p be a proposition on a set S. The truth set of p is the set of elements of S for which p is true
Generally, a capital letter is used to refer to a truth set of a proposition, i. e., the truth set of a proposition p is noted as P for example
Example:
- Let
S = {1, 2, 3 4, 5, 6, 7, 8, 9, 10} - Let
p and qbe two propositions concerning an integer n such thatn ∈ S, defined as follows:p: n is evenq: n is odd
- With this we can now defined the truth sets for the propositions as applied to the given set, and this would be:
P = {2, 4, 6, 8, 10}Q = {1, 3, 5, 7, 9}
Compound Propositions:
Compound Propositions are statements built by combining multiple propositions using certain rules and operators.
Negation (¬) This one negates a given proposition, and so basically inverts their value, so if a proposition p is true, then ¬p is false. It is read as not p
Conjunction (∧) This is basically the and operator, and serves as a way of checking if both propositions are true. So basically if p, q are both true, then p ^ q is also true. However, if either one or both are false, then then entire proposition is false. You read it as p and q
Disjunction (∨) This is the or operator, and is good for checking if only one of the propositions is true, regardless of the other. So if p is true and q is not true, then p V q is true, p V q is only false if both p and q are false. It is read as p or q
Exclusive-or (⊕) This is the XOR operator, and is basically sort of a weird mix of the or and the and properties. It only works if the two values have different truth values, so p and q cannot be both true or both false, only one would need to be true and the other false for p ⊕ q to be considered true
Precedence of Logical Operators
So this is kind of similar to how programming languages would bind these operators, and in reality it is pretty similar to how it works there, and it follows a level of pemdas as well.
Basically speaking negation binds the closest, as which point conjunction is second, and then the disjunction comes right after, things like implication of the XOR operative work after that as well. It works just how you would expect a boolean expression to compile inside of a standard programming language.
Book Reading
Read the following pages to consolidate your knowledge of these topics: the definition of a proposition; truth tables and truth set; and compound propositions.
- Rosen, K.H. Discrete Mathematics and its Applications. (New York: McGraw Hill, 2012) 7th Edition [ISBN 9780073383095] pp.1–6.
Once you’ve finished the readings, please attempt the following exercises from Rosen (2012):
- pp.12 exercises 1–4
- pp.13 exercises 5, 6, 8 (a, b, d, e, g and h), 9 (a, b, c and h)
- pp. 15 exercises 34 and 36.
You should also read the following:
Koshy, pp.2–9.
Once you’ve finished these pages, please attempt the following exercises from the Koshy (2004):
- pp.17 exercises 3, 6, 9, 16, 19, 23, 25 and 31.
Several exercises have solutions at the back of the book under the section, ‘Solutions to Odd-Numbered Exercises’. Please consult this section to check the answer to your exercises. If you got the answer wrong, take a look back at the question and see how you can arrive at the right answer this time.
Book Reading
This has already all been read, please see the book section for: Week 1


