Propositional logic deals with statements that can be true or false, using logical operators.
Propositional logic deals with propositions or statements that can be either true or false. These propositions are represented by variables such as \(P\), \(Q\), \(R\), etc., and logical operators are used to combine or manipulate these propositions to form compound statements.
Propositional logic deals with propositions or statements that can be either true or false. Logical operators are used to form compound statements.
Example: Let \(P\) be "It is raining" and \(Q\) be "I will take an umbrella."
\[ P \land Q \text{ (AND)} \]
\[ P \lor Q \text{ (OR)} \]
\[ \lnot P \text{ (NOT)} \]
\[ P \rightarrow Q \text{ (IMPLICATION)} \]
\[ P \leftrightarrow Q \text{ (BICONDITIONAL)} \]
These logical operators are fundamental in constructing compound statements and analyzing their truth values.
These types of propositional logic are fundamental in constructing logical statements and reasoning about their truth values based on the truth values of their components.
Predicate logic extends propositional logic with variables, predicates, and quantifiers.
Example: For all real numbers \(x\), if \(x\) is positive, then \(x^2\) is positive: \(\forall x \in \mathbb{R}, \, (x > 0 \rightarrow x^2 > 0)\).
Inductive logic involves reasoning from specific instances to general conclusions, often used in mathematical induction.
Example (Mathematical Induction): Prove that \(\sum_{i=1}^n i = \frac{n(n+1)}{2}\) for all natural numbers \(n\).
Deductive logic derives conclusions from general principles, commonly used in formal proofs.
A mathematical proof is an argument that confirms the truth of a mathematical statement. It shows that a list of stated assumptions will guarantee a conclusion.
For example, consider the following simple claim involving even and odd numbers.
Assumption | Conclusion |
---|---|
If m and n are odd integers | then m + n is an even integer |
Assume that both \( m \) and \( n \) are odd integers. Then \( m = 2a + 1 \) and \( n = 2b + 1 \), for integers \( a \) and \( b \).
Therefore,
\[ m + n = (2a + 1) + (2b + 1) \] \[ = 2a + 2b + 2 \] \[ = 2(a + b + 1) \] \[ = 2k \]
where \( k = a + b + 1 \) is an integer. Hence \( m + n \) is even.
Let \( a \) and \( b \) be integers. Then we say that \( a \) is divisible by \( b \) if there exists an integer \( k \) such that \( a = kb \). In this case, we also say that \( b \) is a divisor of \( a \).
Note: Alternatively, we can say that \( a \) is a multiple of \( b \) and that \( b \) is a factor of \( a \).
On the other hand, the integer 14 is not divisible by 3. In this case, the best we can write is
14 = 4 × 3 + 2
We say that 14 leaves a remainder of 2 when divided by 3. More generally, we have the following important result.
If \( a \) and \( b \) are integers with \( b \neq 0 \), then there are unique integers \( q \) and \( r \) such that
$$ a = qb + r $$
where \( 0 \leq r < |b| \)
Note: Here \( q \) is the quotient and \( r \) is the remainder when \( a \) is divided by \( b \).
The statement proved in Example 1 can be broken down into two parts:
Statement: If \( n \) is an integer then \( n^3 - n \) is divisible by 3.
This is an example of a conditional statement and has the form:
Statement: If \( P \) is true then \( Q \) is true.
This can be abbreviated as \( P \Rightarrow Q \), which is read as ‘\( P \) implies \( Q \)’. We call \( P \) the hypothesis and \( Q \) the conclusion.
To give a direct proof of a conditional statement \( P \Rightarrow Q \), we assume that the hypothesis \( P \) is true, and then show that the conclusion \( Q \) follows.
To negate a statement \( P \) we write its very opposite, which we call ‘not \( P \)’. Negation turns a true statement into a false statement, and a false statement into a true statement.
Statement: The sum of any two odd numbers is even. (true)
Negation: There are two odd numbers whose sum is odd. (false)
Negating statements that involve ‘and’ and ‘or’ requires the use of De Morgan’s laws.
For example, we can use the second law to negate the following statement about integers \( a \) and \( b \):
Statement: \( a \) is odd or \( b \) is odd
Negation: \( a \) is even and \( b \) is even
Note: When negating a statement involving variables, it helps to know the set that each variable takes its value from. For example, if we know that \( a \) is an integer, then the negation of ‘\( a \) is odd’ is ‘\( a \) is even’.
Consider this statement about an integer \( n \):
Statement: If \( n^2 + 2n \) is odd, then \( n \) is odd.
By switching the hypothesis and the conclusion and negating both, we obtain the contrapositive statement:
Contrapositive: If \( n \) is even, then \( n^2 + 2n \) is even.
Note that a conditional statement and its contrapositive are always logically equivalent:
This means that to prove a conditional statement, we can instead prove its contrapositive. This is helpful, as it is often easier to prove the contrapositive than the original statement.
The basic outline of a proof by contradiction is:
A proof by induction of \( P(n) \), a mathematical statement involving a value \( n \), involves these main steps:
The combination of these steps shows that \( P(n) \) is true for all values of \( n \).
Consider this statement about integers \( m \) and \( n \):
Statement: If \( m \) and \( n \) are odd then \( m + n \) is even. (true)
By switching the hypothesis and the conclusion, we obtain the converse statement:
Converse: If \( m + n \) is even then \( m \) and \( n \) are odd. (false)
The converse of a true statement may not be true. When we switch the hypothesis and the conclusion of a conditional statement, \( P \Rightarrow Q \), we obtain the converse statement, \( Q \Rightarrow P \).
Now consider the following two statements about a particular triangle:
P: The triangle has three equal sides.
Q: The triangle has three equal angles.
Both \( P \Rightarrow Q \) and its converse \( Q \Rightarrow P \) are true statements. In this case, we say that \( P \) and \( Q \) are equivalent statements. We write \( P \Leftrightarrow Q \).
We can also say that \( P \) is true if and only if \( Q \) is true. So in the above example, we can say that a triangle has three equal sides if and only if it has three equal angles.
To prove that two statements \( P \) and \( Q \) are equivalent, you have to prove two things: \( P \Rightarrow Q \) and \( Q \Rightarrow P \).