Definition: Declarative Sentence
Definition: Declarative Sentence
Definition: Declarative Sentence
Denition
Toronto Maple Leaf will not win the Stanley cup this year. x + 1 = 3. What time is it? Read this carefully.
Denition: Proposition
Notation
A proposition is a declarative sentence that is either true or false, but not both. Examples of declarative sentences that are not propositions:
Denition
Toronto Maple Leaf will not win the Stanley cup this year. x + 1 = 3. Washington is the capital of Canada. 2 + 2 = 4.
We use letters to denote propositional variables (or statement variables), that is, variables that represent propositions, just as letters are used to denote numerical variables. The conventional letters used for propositional variables are p, q, r , s, ... The area of logic that deals with propositions is called the propositional calculus or propositional logic. The truth value of a proposition is true (denoted T) if it is a true proposition; the truth value of a proposition is false (denoted F) otherwise.
Denition
George Boole
Many mathematical statements are constructed by combining one or more propositions. New propositions, called compound propositions, are formed from existing propositions using logical operators.
Born on November 2, 1815 in Lincoln, England. Died on December 8, 1864 in Ballintemple, Ireland at 49 ans years old.
www-groups.dcs.st-and.ac.uk/ ~history/Mathematicians/Boole.html
Denition: Negation
In 1854, George Boole established the rules of symbolic logic in his book The Laws of Thought.
www-groups.dcs.st-and.ac.uk/ ~history/Mathematicians/Boole.html
Let p be a proposition. The compound proposition it is not the case that p is an other proposition, called the negation of p, and denoted p. The truth value of the negation of p is the opposite of the truth value of p. The proposition p is read not p.
Denition
Denition: Conjunction
Let p and q be propositions. The compound proposition p and q, denoted p q, is true when both p and q are true and false otherwise. This compound proposition p q is called the conjunction of p and q. Truth table for the conjunction p q of the propositions p and q: p T T F F q T F T F pq T F F F
Denition
A truth table presents the relations between the truth value of many propositions involved in a compound proposition. This table has a row for each possible truth value of the propositions. Truth table for the negation p of the proposition p: p T F p F T
Denition: Disjunction
Let p and q be propositions. The compound proposition p or q, denoted p q, is false when both p and q are false and true otherwise. This compound proposition p q is called the disjunction of p and q. Truth table for the disjunction p q of the propositions p and q: p T T F F q T F T F pq T T T F
Denition
Denition
Denition: Implication
Let p and q be propositions. The compound proposition if p, then q, denoted p q, is false when p is true and q is false, and is true otherwise. This compound proposition p q is called the implication (or the conditional statement) of p and q. In this implication, p is called the hypothesis (or antecedent or premise) and q is called the conclusion (or consequence).
Denition
p T T F F Remarks:
q T F T F
pq T F T T
The implication p q is false only when p is true and q is false. The implication p q is true when p is false whatever the truth value of q.
The Implication
Variety of terminology is used to express the implication p q.
The Implication
if p, then q; p implies q; q if p; p only if q; q when p; p is sucient for q; a sucient condition for q is p; q follows from p; q whenever p.
In natural language, there is a relationship between the hypothesis and the conclusion of an implication. In mathematical reasoning, we consider conditional statements of a more general sort that we use in English. The implication If today is Friday, then 2 + 3 = 6 is true every day except Friday, even though 2 + 3 = 6 is false. The mathematical concept of a conditional statement is independent of a cause-and-eect relationship between hypothesis and conclusion. We only parallel English usage to make it easy to use and remember.
Denition
We can form some new conditional statements starting with the implication p q. There are three related implications that occur so often that they have special names.
The converse of p q is the proposition q p. The inverse of p q is the proposition p q. The contrapositive of p q is the proposition q p.
Remember the contrapositive. The contrapositive q p of the implication p q always has the same truth value as p q.
(p q) (p q)
q
a
F T F T
a T F
a F T
q T F T F
q F T F T
b
p q
a
T T F T
a T T F F
b T F T F
ab T T T F
p T T F F
a
q T F T F
b
q F T F T
p q T T F T
p q
a
T F F F
a T T F F
b T F T F
ab T F F F
pq T F F F
b
(p q) (p q)
a
T F T F
a T T F F
b T F T F
ab T F T T
Operator ()
Precedence 0 1 2 3 4 5
Dont make the assumption that precedence of logical operators are well known. Put parentheses instead to make it clear.
A variable is called a Boolean variable if its value is either true or false. Computers represent information using bits. A bit is a symbol with two possible values, namely, 0 (zero) and 1 (one). Consequently, a Boolean variable can be represented using a bit. As is customarily done, we will use a 1 bit to represent true and a 0 bit to represent false.
We will also use the notation AND, OR and XOR for the operators , and , as is done in various programming languages.
A bit string is a sequence of zero or more bits. The length of this bit string is the number of bits in the string. Example: 1 1001 0111 is a bit string of length 9. We dene the bitwise AND, bitwise OR and bitwise XOR of two bit strings of the same length to be the strings that have as their bits the AND, OR or XOR of the corresponding bits in the two strings respectively. We use the symbols , and to represent the bitwise AND, bitwise OR and bitwise XOR operations, respectively. Example: 1 0110 1 0101 1 0100 1 0110 1 0101 1 0111 1 0110 1 0101 0 0011