Truth table proofs

From Computer Science
Revision as of 15:03, 29 August 2022 by Jkinne (talk | contribs)
Jump to: navigation, search

Truth tables are used to show all possible values that a given logical expression might take.

Examples

Definition of AND

The following gives the definition of the logical AND operation.

A B A ∧ B
false false false
false true false
true false false
true true true

Proof of one of De Morgan's laws

A truth table can also be used to prove a logical identity. The following proves De Morgan's law that ¬ (A ∧ B) is equivalent to (¬ A) ∨ (¬ B). Notice that the truth values for these (the last two columns in the table) are always the same.

A B A ∧ B ¬ (A ∧ B) (¬ A) ∨ (¬ B)
false false false true true
false true false true true
true false false true true
true true true false false

Disproof of a logical fallacy

Truth tables can also be used to disprove a logical fallacy. For example, one fallacy is to assume the converse of an implication holds. If you know that (A → B) is true, and you know that B is true, the fallacy would be to then conclude that A must also be true. Note that the statement - "if an animal is a mammal then it is also a vertebrate" - is true. If we have an animal that is a vertebrate (for example, a dog), it would be a fallacy to now conclude that the animal must also be a mammal.

Consider this truth table.

A B A → B (which is equivalent to ¬ A ∨ B)
false false true
false true true
true false false
true true true

In the


Assignment