Propositional Logic (PL)
- A simple language that is useful for showing key ideas and
definitions
- User defines a set of propositional symbols, like
P and Q. User defines the semantics of each of
these symbols. For example,
- P means "It is hot"
- Q means "It is humid"
- R means "It is raining"
- A sentence (also called a formula or well-formed formula
or wff) is defined as:
- A symbol
- If S is a sentence, then ~S is a sentence, where "~" is the "not"
logical operator
- If S and T are sentences, then (S v T), (S ^ T),
(S => T), and (S <=> T) are sentences, where the four logical connectives
correspond to "or," "and," "implies," and "if and only if,"
respectively
- A finite number of applications of (1)-(3)
- Examples of PL sentences:
- (P ^ Q) => R (here meaning "If it is hot and humid, then it is raining")
- Q => P (here meaning "If it is humid, then it is hot")
- Q (here meaning "It is humid.")
- Given the truth values of all of the constituent symbols in a sentence,
that sentence can be "evaluated" to determine its truth value (True or
False). This is called an interpretation of the sentence.
- A model is an interpretation (i.e., an assignment of truth values
to symbols) of a set of sentences such that each sentence is True.
A model is just a formal mathematical structure that "stands in"
for the world.
- A valid sentence (also called a tautology is a sentence
that is True under all interpretations. Hence, no matter what
the world is actually like or what the semantics is, the sentence is True.
For example "It's raining or it's not raining."
- An inconsistent sentence (also called a contradiction)
is a sentence that is False under all interpretations. Hence the
world is never like what it describes. For example, "It's raining and
it's not raining."
- Sentence P entails sentence Q, written P |= Q,
means that whenever P is True, so is Q. In other words, all models of
P are also models of Q