2.1 KiB
Logic
Definition: a statement is a sentence that is either true or false, never both.
Definition - Logical operators: let
AandBbe assertions.
- The assertion
AandB(A \land B) is true, iff bothAandBare true.- The assertion
AorB(A \lor B) is true, iff at least one ofAandBis true.- The negation of
A(\neg A) is true iffAis false.
Definition - Implies: if
AandBare assertions then the assertion ifAthenB(A \implies B) is true iff
Ais true andBis true,Ais false andBis true,Ais false andBis false.This also works the opposite way, if
BthenA(A \Longleftarrow B)
Definition - If and only if: if
AandBare assertions then the assertionAif and only ifB(A \iff B) is true iff
(A \Longleftarrow B) \land (a \implies B).This leads to the following table.
A |
B |
A \implies B |
A \Longleftarrow B |
A \iff B |
|---|---|---|---|---|
| true | true | true | true | true |
| true | false | false | true | false |
| false | true | true | false | false |
| false | false | true | true | true |
Definition: suppose
PandQare assertions.PimpliesQifP \implies Qis true.PandQare equivalent ifPimpliesQandQimpliesP.
Methods of proof
Direct proof: for proving
P \implies Qonly consider the case wherePis true.
Proof by contraposition: proving
P \implies Qto be true by showing that\neg Q \implies \neg Pis true.
Proof by contradiction: using the equivalence of
P \implies Qand\neg Q \implies \neg Pby assumingPis not true and deducing a contradiction with some obviously true statementQ.
Proof by cases: dividing a proof into cases which makes use of the equivalence of
(P \lor Q) \implies Rand(P \implies R) \land (Q \implies R). Which together cover all situations under consideration.