Logic and Proof Techniques
In questa pagina 7
Mathematics is made of statements and of arguments that lead from one statement to another. Logic is the grammar of those arguments: it says how statements are written with symbols, when they are true and how they are negated. Everything that follows in the course (sets, supremum, limits) is written in this language. Related notes: Sets and Set OperationsWays of describing a set, subsets and equality, the power set, finite and infinite sets, union, intersection, difference, complement, De Morgan laws and the Cartesian product.Sets and Set Operations → (set operations are logic "seen through sets") and Induction, Sums and the Binomial TheoremThe principle of induction with its proof, summation notation and its properties, Gauss and geometric sums, factorials, binomial coefficients, Pascal's triangle and Newton's binomial theorem.Induction, Sums and the Binomial Theorem → (a fourth proof technique, for statements about all ).
Propositions
A proposition is a statement that is either true (T) or false (F), with nothing in between. They are denoted by letters such as , .
| Sentence | Proposition? | Value |
|---|---|---|
| "" | yes | T |
| " is even" | yes | F |
| "" | no: depends on | - |
| "What time is it?" | no (a question) | - |
A statement containing a free variable is neither true nor false until the variable is given a value: this is a predicate (see below).
Logical connectives
| Symbol | Read | True when |
|---|---|---|
| ("not ") | not | is false |
| and | both are true | |
| or | at least one is true (possibly both) | |
| implies , if then | whenever is true, is true too | |
| if and only if | and are true or false together |
Careful with "or". In mathematics is true also when both are true: it is not the exclusive "or" of everyday language.
Careful with implication. only says: "if is true, then is true". It says nothing when is false ("if it rains I take the umbrella": if it does not rain, the sentence is never contradicted). So is false only in the case " true and false".
| T | T | F | T | T | T | T |
| T | F | F | F | T | F | F |
| F | T | T | F | T | T | F |
| F | F | T | F | F | T | T |
means that both and hold: to prove an "if and only if" one proves two implications.
Predicates
Definition (predicate). A predicate is a statement containing a variable taken from a set , which becomes a proposition (T or F) as soon as a value of is chosen.
Example. , : "". For : , so is T. For : is false, so is F. For : , so is T.
Two predicates are equivalent if they are true for exactly the same : for instance (indeed , values between the roots).
Quantifiers
A predicate becomes a proposition also by saying for how many it must hold:
| Symbol | Read | Meaning |
|---|---|---|
| for all | holds for every element | |
| there exists | holds for at least one | |
| there is no | holds for none | |
| there exists a unique | holds for exactly one |
In formulas the colon "" reads "such that" or "we have". Golden rule: quantifier + predicate = proposition.
- "" is false: one counterexample suffices, ( is not ). To disprove a "for all" one counterexample is enough; to prove it, a thousand examples are not enough, an argument valid for every is needed.
- "" is true (). To prove an "exists" it suffices to exhibit an example.
- "" is true: has inverse .
The order of quantifiers matters
- "" ("every number has a larger one") is true: given take . Here may depend on .
- "" ("there is a number larger than all") is false: no is larger than .
This will come back in the definitions of sup, inf and limit ("for every there exists ...": what "exists" may depend on ).
Negation
Law (negation of quantifiers). The negation swaps with and negates the predicate.
"Not all students passed the exam" means "at least one did not pass" (not "none passed"!). With several quantifiers apply the rule one piece at a time, left to right:
Law (logical De Morgan).
Example: is , i.e. .
Law (negation of an implication). .
Example: the negation of "if is a multiple of then is even" is " is a multiple of and not even" (impossible, so the implication is true).
Note that the negation of "" is "", not "". A statement and its negation always have opposite truth values.
| Proposition | Value | Negation | Value |
|---|---|---|---|
| F | T (with ) | ||
| T | F ( has an inverse) |
Hypothesis and thesis; proof techniques
A theorem almost always has the form : is the hypothesis (assumed true), is the thesis (to be shown). To prove it means to show, through justified steps (a definition, an already proved theorem, a computation rule), that whenever holds holds. There are three main, logically equivalent ways.
1. Direct proof
Start from and reach step by step. Wording: is a sufficient condition for .
Example. "If is odd then is odd": write , then , which is odd.
2. Proof by contrapositive
Instead of prove (if the thesis is false, then the hypothesis is false). They are equivalent: both are false exactly in the case " true, false".
| T | T | T | F | F | T |
| T | F | F | T | F | F |
| F | T | T | F | T | T |
| F | F | T | T | T | T |
Wording: is a necessary condition for . "If it rains the street is wet" is equivalent to "if the street is not wet it does not rain", but not to "if the street is wet it rains" (that is the converse , a different statement). Every theorem gives two: from " odd odd" we get " even even", which is what is needed to show that is irrational.
3. Proof by contradiction
Assume the hypothesis true and the thesis false (, the only case where fails) and reason until a contradiction is reached (something impossible, e.g. a statement both true and false). Then that case cannot occur, so the implication is true.
Example. "": suppose and in lowest terms; then , so is even, hence is even (contrapositive above), , so , and is even too: contradiction with coprime.
How to choose
| Situation | Usual choice |
|---|---|
| the hypothesis gives a formula to compute with (e.g. ) | direct |
| the thesis is "negative" (, , "does not exist") | contradiction |
| negating the thesis gives more usable information than the hypothesis | contrapositive |
| statement "for all " | Induction, Sums and the Binomial TheoremThe principle of induction with its proof, summation notation and its properties, Gauss and geometric sums, factorials, binomial coefficients, Pascal's triangle and Newton's binomial theorem.Induction, Sums and the Binomial Theorem → |
Numerical examples do not prove anything for all cases: reason on a generic element ( with arbitrary).
Common mistakes
- Negating "for all" with "for none"; negating with (the opposite of is ).
- Proving a "for all" with examples; swapping the order of quantifiers.
- Reading as : "multiple of implies even" is true, "even implies multiple of " is false ().
- Confusing the contrapositive (, equivalent) with (not equivalent).
- In a proof by contradiction, negating the thesis incorrectly or forgetting to say where the contradiction lies.
Versione ripasso
A proposition is true (T) or false (F). A predicate contains a variable and becomes a proposition when is chosen or a quantifier is added. Example: "" is T for , F for , equivalent to .
| T | T | F | T | T | T | T |
| T | F | F | F | T | F | F |
| F | T | T | F | T | T | F |
| F | F | T | F | F | T | T |
- is true also when both are true. is false only when is true and false. is proved with two implications.
- : disprove with one counterexample, prove with an argument for every . : prove with one example.
- Order matters: "" is true (), "" is false. This is the order in the definition of limit.
Negations. Negation of is . With several quantifiers negate one at a time: .
Proof techniques for ( hypothesis, thesis):
- Direct: from reach . ( odd, , odd.) is sufficient conditionknowing p is enough to get q for .
- Contrapositive: prove , equivalent to the original. is necessary conditionwithout q there cannot be p for . Gives for free: even even.
- Contradiction: assume and reach an impossibility. Used when the thesis is negative (, ), e.g. .
- For "for all ": Induction, Sums and the Binomial TheoremThe principle of induction with its proof, summation notation and its properties, Gauss and geometric sums, factorials, binomial coefficients, Pascal's triangle and Newton's binomial theorem.Induction, Sums and the Binomial Theorem →.
Mistakes: negating "for all" with "for none"; negated as ; proving the converse instead; examples as proofs; swapping quantifiers. The set operations mirror these rules: Sets and Set OperationsWays of describing a set, subsets and equality, the power set, finite and infinite sets, union, intersection, difference, complement, De Morgan laws and the Cartesian product.Sets and Set Operations →.