Propositional and Predicate Logic
A Proposition is a declarative sentence, which may be shown to be either true, or false, whether the statement is true or false is not - however - relevant. Both "1+2-=3" and "1+2=4" are example of propositions. Predicate logic allows us to explore the truthfulness of a statement, it has an expressive power which propositional logic does not.
Propositional Operators
Operators can act on the values of propositions, altering them accordingly:
Negation
The negation operator inverts the proposition, for example if we have a proposition
, then the negation of this proposition,
.
Conjunction
The conjunction operator is the same as 'AND' in binary algebra, so if we have two propositions, such that
and
then the conjunction is 
Disjunction (Inclusive)
The disjunction operator (or more specifically the inclusive disjunction operator) is the same as 'OR' in binary algebra, so the disjunction of two propositional variables will be true if either of the two propositions are true, or if both are true, so if we have two propositions, such that
and
then the disjunction is 
Disjunction (Exclusive)
This exclusive disjunction operator is the same as XOR in binary algebra, and is based on the premise that only if one or other (not both) of the propositions is true, will the exclusive disjunction be true. Using our example of
and
, we can say that 
Conditional Statement
The conditional statement is also known as implication, if one proposition is true, then it implies than a further proposition must be true. Again using our running example, we would say that
, which would be written as 
Bi-Conditional Statement
The bi-conditional statement is an extension of the conditional statement, two propositions are bi-conditional if they are always true when the other is true and never else. With our example,
. This is a marked difference from the conditional statement, the bi-conditional statement can also be expressed as 
Predicate Logic
Predicate logic is more concerned with whether a proposition is true or not, so for example if we have a proposition
then P(4) will be true, P(1) will be false, etc. We can use this methodology in lots of applications, for example to verify the output of an algorithm we can define input and output conditions in terms of predicate logic, and then verify the output matches our expectation to prove the validity of the algorithm.
We can use quantifiers to limit - or qualify - the range of acceptable values in a predicate function. There are two main quantifiers we are interested in here:
Universal Quantifier
The universal quantifier means that the proposition should only be considered for all values of the given variable, for example
shows that for all real values of
, the 
Existential Quantifier
The existential quantifier means that the proposition will only hold true for one or more values of the given variable (or, there exists a value for which the proposition holds true), so for example
will only hold true for positive, integer values of
less than 4.
References:
- Nick Holliman - Formal Aspects Set Theory - Lecture 1
- Nick Holliman - Formal Aspects Set Theory - Lecture 2