2.1 KiB
Logic
Definition: a statement is a sentence that is either true or false, never both.
Definition - Logical operators: let
A
andB
be assertions.
- The assertion
A
andB
(A \land B
) is true, iff bothA
andB
are true.- The assertion
A
orB
(A \lor B
) is true, iff at least one ofA
andB
is true.- The negation of
A
(\neg A
) is true iffA
is false.
Definition - Implies: if
A
andB
are assertions then the assertion ifA
thenB
(A \implies B
) is true iff
A
is true andB
is true,A
is false andB
is true,A
is false andB
is false.This also works the opposite way, if
B
thenA
(A \Longleftarrow B
)
Definition - If and only if: if
A
andB
are assertions then the assertionA
if 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
P
andQ
are assertions.P
impliesQ
ifP \implies Q
is true.P
andQ
are equivalent ifP
impliesQ
andQ
impliesP
.
Methods of proof
Direct proof: for proving P \implies Q
only consider the case where P
is true.
Proof by contraposition: proving P \implies Q
to be true by showing that \neg Q \implies \neg P
is true.
Proof by contradiction: using the equivalence of P \implies Q
and \neg Q \implies \neg P
by assuming P
is not true and deducing a contradiction with some obviously true statement Q
.
Proof by cases: dividing a proof into cases which makes use of the equivalence of (P \lor Q) \implies R
and (P \implies R) \land (Q \implies R)
. Which together cover all situations under consideration.