Unit 1: Logic and Proofs
1. Propositional Logic
Logic is the foundational framework for rigorous mathematical reasoning, formal verification in computer science, and algorithmic design.
1.1 Propositions and Truth Values
A proposition is a declarative statement (a sentence that declares a fact) that is either strictly true ( or ) or strictly false ( or ), but not both simultaneously.
- Examples of Propositions:
- "" (True)
- "" (False)
- "LPU is a university in Punjab" (True)
- Non-Propositions:
- "" (Contains a free variable; neither true nor false until is specified)
- "Read this textbook carefully." (Imperative command)
- "Is discrete mathematics difficult?" (Interrogative question)
1.2 Fundamental Logical Connectives and Truth Tables
Complex statements are constructed from atomic propositions using logical operators (connectives).
| Connective | Symbol | Notation | Natural Language Equivalent | Truth Condition |
|---|---|---|---|---|
| Negation | or | "Not " | Inverts truth value: | |
| Conjunction | " and " | True if and only if both and are true | ||
| Disjunction | " or " (inclusive or) | True if at least one of or is true | ||
| Exclusive Or | or | " or , but not both" | True if exactly one operand is true | |
| Conditional | "If , then " | False only when hypothesis is true and conclusion is false | ||
| Biconditional | " if and only if " | True when and share the identical truth value |
Master Truth Table
1.3 Conditional Statement Variants: Converse, Contrapositive, and Inverse
Given an implication (where is the hypothesis/antecedent and is the conclusion/consequent):
| Implication Variant | Formal Statement | Truth Relation to Original |
|---|---|---|
| Original Implication | Baseline statement | |
| Contrapositive | Logically equivalent to () | |
| Converse | NOT equivalent to ; equivalent to Inverse | |
| Inverse | NOT equivalent to ; equivalent to Converse |
[!IMPORTANT]
A conditional statement is always logically equivalent to its contrapositive, but is never guaranteed to be equivalent to its converse or inverse. Confusing an implication with its converse is a common logical fallacy.
2. Propositional Equivalences
2.1 Classification of Compound Propositions
- Tautology: A compound proposition that is always true for every possible truth assignment of its propositional variables (e.g., , ).
- Contradiction: A compound proposition that is always false for every possible truth assignment (e.g., ).
- Contingency: A proposition that is neither a tautology nor a contradiction (its truth value depends on variable assignments).
2.2 Logical Equivalence ( or )
Two compound propositions and are logically equivalent, denoted , if is a tautology. That is, and have identical truth values under every truth assignment.
2.3 Fundamental Laws of Logical Equivalences
| Law Name | Identity 1 | Identity 2 |
|---|---|---|
| Identity Laws | ||
| Domination Laws | ||
| Idempotent Laws | ||
| Double Negation Law | — | |
| Commutative Laws | ||
| Associative Laws | ||
| Distributive Laws | ||
| De Morgan's Laws | ||
| Absorption Laws | ||
| Negation Laws |
Essential Conditional Equivalences:
- (Material Implication)
- (Contrapositive Equivalence)
- (Negation of Implication)
3. Predicates and Quantifiers
Propositional logic cannot express assertions about individual objects or categories (e.g., "Every prime number greater than 2 is odd"). First-order predicate logic extends propositional logic by introducing variables, predicates, and quantifiers.
3.1 Predicates and Truth Sets
- A predicate is a statement containing a variable . Once a specific value from the domain of discourse (universe of discourse ) is assigned to , becomes a proposition with a definite truth value.
- The truth set of is the set of all elements for which is true:
3.2 Quantifiers
| Quantifier | Notation | Meaning | True Condition | False Condition |
|---|---|---|---|---|
| Universal Quantifier | "For all , " | is true for every | There is at least one for which is false (counterexample) | |
| Existential Quantifier | "There exists an such that " | There is at least one for which is true | is false for every | |
| Uniqueness Quantifier | "There exists a unique such that " | Exactly one element satisfies | No element or more than one element satisfies |
3.3 Negation of Quantified Statements (Generalized De Morgan's Laws)
To negate a quantified statement, toggle the quantifier and negate the predicate:
3.4 Nested Quantifiers and Order Dependence
When multiple quantifiers are applied to a multi-variable predicate :
- Commutativity of Identical Quantifiers:
- Non-Commutativity of Mixed Quantifiers:
- : For every , there exists a (which may depend on ) such that holds.
- : There exists a single universal that simultaneously works for all .
- The second statement is strictly stronger: , but the converse does not hold.
4. Rules of Inference
An argument is a sequence of statements ending in a conclusion. An argument is valid if the truth of all its premises guarantees the truth of its conclusion:
| Rule of Inference | Premise 1 | Premise 2 | Conclusion | Tautology Form |
|---|---|---|---|---|
| Modus Ponens (Law of Detachment) | ||||
| Modus Tollens | ||||
| Hypothetical Syllogism | ||||
| Disjunctive Syllogism | ||||
| Addition | — | |||
| Simplification | — | |||
| Conjunction | ||||
| Resolution |
4.1 Common Fallacies (Invalid Reasoning)
- Fallacy of Affirming the Conclusion:
- Premises: and . Conclusion: .
- Invalid because is a contingency, not a tautology.
- Fallacy of Denying the Hypothesis:
- Premises: and . Conclusion: .
- Invalid because is a contingency.
5. Methods of Mathematical Proof
A proof is a valid mathematical argument that establishes the absolute truth of a statement.
5.1 Proof Terminology
- Axiom (Postulate): A statement assumed to be true without proof.
- Theorem: A mathematical statement that has been proven true.
- Proposition: A less significant or standalone mathematical statement.
- Lemma: A stepping-stone theorem proved primarily to assist in proving a broader theorem.
- Corollary: A theorem that follows directly from another theorem with minimal additional proof.
- Conjecture: A statement proposed to be true, but not yet verified or disproved.
5.2 Direct Proof
To prove a conditional statement directly:
- Assume the hypothesis is true.
- Use definitions, axioms, previously established theorems, and valid rules of inference.
- Deduce that the conclusion must be true.
Example:
Theorem: If is an odd integer, then is an odd integer.
- Proof:
- Let be an arbitrary odd integer.
- By definition of an odd integer, for some integer .
- Compute :
- Since is an integer, is also an integer.
- Thus , which by definition means is odd.
5.3 Proof by Contraposition (Indirect Proof)
Since , proving the contrapositive establishes the original implication:
- Assume the negation of the conclusion: is true.
- Deduce through direct argument that the negation of the hypothesis: is true.
Example:
Theorem: If is odd, then is odd (for integer ).
- Proof by Contraposition:
- The contrapositive statement is: "If is even, then is even."
- Assume is even. By definition, for some integer .
- Substitute into :
- Let , which is an integer. Then , which is even.
- Since the contrapositive is true, the original theorem is true.
5.4 Proof by Contradiction (Reductio ad Absurdum)
To prove a proposition :
- Assume the negation is true.
- Deduce an impossible logical absurdity or contradiction: (a statement that is both true and false simultaneously).
- Conclude that must be false, which proves is true.
Classic Example: Irrationality of
Theorem: is an irrational number.
- Proof:
- Assume for contradiction that is rational.
- Then , where have no common positive factors other than 1 (, i.e., the fraction is in lowest terms).
- Squaring both sides: .
- This implies is even, which guarantees is even (as proved in Section 5.3).
- Since is even, write for some integer .
- Substitute into :
- This implies is even, which guarantees is even.
- Therefore, both and are even, meaning 2 divides both and .
- This contradicts the initial premise that .
- Hence, the assumption that is rational is false; must be irrational.
5.5 Vacuous and Trivial Proofs
- Vacuous Proof: If hypothesis in is demonstrably false, the conditional statement is automatically true regardless of .
- Example: "If , then discrete mathematics is trivial." True because is false.
- Trivial Proof: If conclusion in is demonstrably true on its own, then is automatically true regardless of .
- Example: "If is an integer, then ." True because for all real .
5.6 Proof of Equivalence (Biconditional Proofs)
To prove a biconditional statement :
Prove both directions separately:
- (forward direction).
- (backward direction).
For a circular chain of equivalences :
Prove the cyclic chain of implications:
5.7 Counterexamples
To disprove a universally quantified assertion , it suffices to find a single instance in the domain of discourse such that is false. Such an instance is called a counterexample.
- Assertion: "Every odd number is a prime number."
- Counterexample: Let . is odd, but , so is composite. Hence the universal assertion is disproved.
- Assertion: " is prime for all positive integers ."
- Counterexample: At , , which is composite.
5.8 Mistakes and Pitfalls in Proofs
- Begging the Question (Circular Reasoning): Using the statement to be proved (or an equivalent assumption) as a premise in the proof.
- Division by Zero: Hiding an algebraic division by where .
- Misuse of Quantifiers: Assuming an existential witness holds universally for all .
- Generalizing from Specific Examples: Showing a statement holds for does not constitute a valid proof for all .
6. Summary Comparison of Proof Techniques
| Proof Technique | Strategy | When to Choose |
|---|---|---|
| Direct Proof | Assume , derive algebraically | Straightforward algebraic or definition-driven implications |
| Contraposition | Assume , derive | When provides more concrete algebraic structure than |
| Contradiction | Assume , find absurdity | When dealing with negative assertions (e.g., irrationality, infinitude of primes) |
| Counterexample | Find single instance where is false | Disproving a universal statement |
| Biconditional | Prove and | Establishing "if and only if" characterizations |