Propositions

A proposition is a statement which is either true or false.

Propositions can have truth values, for example here are propositions with a truth value of true:

  • 1 is greater than 0
  • Python is an interpreted programming language
  • A week is longer than a day

And here are propositions with a false truth value:

  • Green looks the same as Red
  • C++ is an interpreted programming language
  • A year is longer than a decade

Logic

Absolute truth values are not as important in logic, we focus more on propositions.
We aren’t philosophers, after all!

Axioms are propositions which are assumed to be true.

Logic is used to determine the consequences of these axioms.
We do not prove that axioms are true.
However, if the axiom is true, then so are its consequences - for example:

\[ \textrm{If I stand in the rain}\\ \textrm{then I will get wet} \]

This shows that getting wet will be true if I stand in the rain.
However, if I don't stand in the rain, I may still get wet, we can’t tell.

Logical Operations

That’s right - It’s time to learn MORE NOTATION!!!
P will refer to a proposition.

NOT ¬ (negation)

P¬P
TF
FT

Examples:

  • ¬(2 + 2 = 5) is true
  • ¬(6 + 6 = 12) is false

AND $\wedge$ (conjunction)

PQP $\wedge$ Q
FFF
FTF
TFF
TTT

OR $\vee$ (disjunction)

PQP $\vee$ Q
FFF
FTT
TFT
TTT

AND $\wedge$ (conjunction)

PQP $\wedge$ Q
FFF
FTF
TFF
TTT

IMPLIES $\Rightarrow$ (implication)

If P is true, then Q must be true

PQP $\Rightarrow$ Q
FFT
FTT
TFF
TTT
Despite what you may believe, the formal definition is in the above table, as such, this is only really a correlation.
It does NOT imply causation.

LOGICALLY EQUIVALENT $\Leftrightarrow$ (equal)

PQP $\Leftrightarrow$ Q
FFT
FTF
TFF
TTT

Precedence

Logical operations have the following prcedence:

  • Not/negation
  • And
  • Or
  • Implication
  • Equivalence