foundaons 1 lecture 5
Post on 12-Sep-2021
1 Views
Preview:
TRANSCRIPT
Founda'ons1Lecture5
PatriciaA.Vargas
Lecture5
I. MainPointsofLecture4II. Proposi'onalLogic(Part5)
Calcula'ngwithProposi'ons
2F29FAy‐Founda'ons1‐2009/2010‐Semester1‐PartI‐Logic&Proof
F29FAy‐Founda'ons1‐2009/2010‐Semester1‐PartI‐Logic&Proof 3
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! val== has a lower priority than all connectives.
! Hence we should read Pval== Q ∧ R as P
val== (Q ∧ R).
!
Commutativity:
P ∧ Qval== Q ∧ P,
P ∨ Qval== Q ∨ P,
P ⇔ Qval== Q ⇔ P.
! P ⇒ Q does not have the same truth-value as Q ⇒ P.
P Q P ⇒ Q
0 0 10 1 11 0 01 1 1
P Q Q ⇒ P
0 0 10 1 01 0 11 1 1
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! The Commutativity rules are easy to remember because ∧, ∨and ⇔ are their own mirror image on the vertical axis. (Thisis not the case though for the connective ⇒.)
! The word ’commutativity’ comes from the Latin word’commutare’, which is ’exchange’.
! Other very common cases of ’having the same truth-values as’or ’being equivalent to’ include:
Associativity:
(P ∧ Q) ∧ Rval== P ∧ (Q ∧ R),
(P ∨ Q) ∨ Rval== P ∨ (Q ∨ R),
(P ⇔ Q)⇔ Rval== P ⇔ (Q ⇔ R)
! Again, ⇒ is missing here.! The word ’associativity’ comes from the Latin word
’associare’, which means ’associate’, ’relate’.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
!Idempotence:
P ∧ Pval== P,
P ∨ Pval== P.
! The word ’idempotence’ comes from Latin. ’Idem’ means ’thesame’ and ’potentia’ means ’power’. It is actually the case forboth ∧ and ∨ that the ’second power’ of P is equal to P itself.
! You see this better when you replace ’∧’ by the multiplication
sign: P ∧ Pval== P becomes in that case P · P = P, and
hence P2 = P.
! In the same way you can write P ∨ Pval== P as P + P = P,
again a kind of second-power, but then for ’+’.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
!Double negation:
¬¬Pval== P.
! ’Double negation’ is also called ’involution’ after the Latin’involvere’, which is ’wrap’: when P becomes wrapped in two¬’s, it keeps its own truth value.
!Inversion:
¬True val== False,
¬False val== True.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! The following two rules treat the confrontation of ¬ on onehand with ∧ resp. ∨ on the other.
! Also ¬ distributes in a certain sense, it ’exchanges ∧ and ∨’:
De Morgan:
¬(P ∧ Q)val== ¬P ∨ ¬Q,
¬(P ∨ Q)val== ¬P ∧ ¬Q
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! The standard equivalences so far took care of simplifications.! This will not always be the case with the rules of this section.! We begin with two rules which deal with a ’confrontation’
between ∧ and ∨:
Distributivity:
P ∧ (Q ∨ R)val== (P ∧ Q) ∨ (P ∧ R),
P ∨ (Q ∧ R)val== (P ∨ Q) ∧ (P ∨ R).
! The word ’distributivity’ comes from the Latin ’distribuere’,which is: ’distribute’ or ’divide’.
! In the first rule, for example, P and ∧ are together dividedover Q and R, because Q becomes P ∧ Q, and R becomesP ∧ R.
! One usually says by the first equivalence that ∧ distributesover ∨.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
!Double negation:
¬¬Pval== P.
! ’Double negation’ is also called ’involution’ after the Latin’involvere’, which is ’wrap’: when P becomes wrapped in two¬’s, it keeps its own truth value.
!Inversion:
¬True val== False,
¬False val== True.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! The rules below say what happens with True and False ifthey come across an ∧ or an ∨:
True/False-elimination:
P ∧ Trueval== P,
P ∧ Falseval== False,
P ∨ Trueval== True,
P ∨ Falseval== P.
! In the Boolean algebra where ∧ is written as ’.’ and ∨ iswritten as ’+’, True stands for the number 1 and False for0. The above True -False-laws become then:
P . 1 = P,P . 0 = 0,P + 1 = 1,P + 0 = P.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! Another important rule which involves False, is the following:
Negation:
¬Pval== P ⇒ False
! Remember when reading this formula thatval== has the lowest
priority!! We already saw the equivalence of ¬P and P ⇒ False.! The above rule expresses that ’not-P’ ’means’ the same as ’P
implies falsity’.! Other important rules with True and False are:
Contradiction:
P ∧ ¬Pval== False
Excluded middle:
P ∨ ¬Pval== True.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! Another important rule which involves False, is the following:
Negation:
¬Pval== P ⇒ False
! Remember when reading this formula thatval== has the lowest
priority!! We already saw the equivalence of ¬P and P ⇒ False.! The above rule expresses that ’not-P’ ’means’ the same as ’P
implies falsity’.! Other important rules with True and False are:
Contradiction:
P ∧ ¬Pval== False
Excluded middle:
P ∨ ¬Pval== True.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! An important rule about ⇔:
Bi-implication:
P ⇔ Qval== (P ⇒ Q) ∧ (Q ⇒ P).
! A useful rule which follows as a consequence is the following:
Self-equivalence:
P ⇔ Pval== True.
! This can be seen as follows: First look at the formula P ⇒ P,the ’self-implication’, with unique arrow. It holds that:(1) P ⇒ P is equivalent to ¬P ∨ P, by Implication, and(2) ¬P ∨ P is in its turn equivalent to True, by (Commutativity
and) Excluded middle, therefore
(3) P ⇒ Pval== True.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! There are many equivalences that can be constructed with’⇒’, we only give the most important ones.
! First we give the rules which change ⇒ into ∨, and vice versa.There, one always sees the appearance of ¬:
Implication:
P ⇒ Qval== ¬P ∨ Q,
P ∨ Qval== ¬P ⇒ Q.
! You can check these implications with truth tables.! Be careful that ¬ is always next to the first sub-formula.! If ¬ is next to the second sub-formula, then we lose the
equivalence:(1) P ∨ ¬Q is by Commutativity equivalent to ¬Q ∨ P, therefore
to Q ⇒ P, which is not equivalent to P ⇒ Q.(2) P ⇒ ¬Q is according to the first rule equivalent to ¬P ∨ ¬Q,
which is very different from P ∨ Q.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! The following rule says something about the ’permutation’ ofan implication P ⇒ Q. Note the use of ¬.
Contraposition:
P ⇒ Qval== ¬Q ⇒ ¬P.
! We can check this with the truth tables. But we can alsocheck it as follows:(1) P ⇒ Q is equivalent to ¬P ∨ Q (by one Implication rule)(2) and this is equivalent to Q ∨ ¬P (by Commutativity),(3) which is equivalent to ¬Q ⇒ ¬P (by the otherImplication rule).
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! An important rule about ⇔:
Bi-implication:
P ⇔ Qval== (P ⇒ Q) ∧ (Q ⇒ P).
! A useful rule which follows as a consequence is the following:
Self-equivalence:
P ⇔ Pval== True.
! This can be seen as follows: First look at the formula P ⇒ P,the ’self-implication’, with unique arrow. It holds that:(1) P ⇒ P is equivalent to ¬P ∨ P, by Implication, and(2) ¬P ∨ P is in its turn equivalent to True, by (Commutativity
and) Excluded middle, therefore
(3) P ⇒ Pval== True.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Proposi'onalLogic(Part4)InferenceRules(ExampleofCalcula'ngwithProposi'ons)
F29FAy‐Founda'ons1‐2009/2010‐Semester1‐PartI‐Logic&Proof 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! The following rule says something about the ’permutation’ ofan implication P ⇒ Q. Note the use of ¬.
Contraposition:
P ⇒ Qval== ¬Q ⇒ ¬P.
! We can check this with the truth tables. But we can alsocheck it as follows:(1) P ⇒ Q is equivalent to ¬P ∨ Q (by one Implication rule)(2) and this is equivalent to Q ∨ ¬P (by Commutativity),(3) which is equivalent to ¬Q ⇒ ¬P (by the otherImplication rule).
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
{Implica'onrule1}
{Implica'onrule2}{Commuta'vity}
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! The following rule says something about the ’permutation’ ofan implication P ⇒ Q. Note the use of ¬.
Contraposition:
P ⇒ Qval== ¬Q ⇒ ¬P.
! We can check this with the truth tables. But we can alsocheck it as follows:(1) P ⇒ Q is equivalent to ¬P ∨ Q (by one Implication rule)(2) and this is equivalent to Q ∨ ¬P (by Commutativity),(3) which is equivalent to ¬Q ⇒ ¬P (by the otherImplication rule).
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! There are many equivalences that can be constructed with’⇒’, we only give the most important ones.
! First we give the rules which change ⇒ into ∨, and vice versa.There, one always sees the appearance of ¬:
Implication:
P ⇒ Qval== ¬P ∨ Q,
P ∨ Qval== ¬P ⇒ Q.
! You can check these implications with truth tables.! Be careful that ¬ is always next to the first sub-formula.! If ¬ is next to the second sub-formula, then we lose the
equivalence:(1) P ∨ ¬Q is by Commutativity equivalent to ¬Q ∨ P, therefore
to Q ⇒ P, which is not equivalent to P ⇒ Q.(2) P ⇒ ¬Q is according to the first rule equivalent to ¬P ∨ ¬Q,
which is very different from P ∨ Q.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! val== has a lower priority than all connectives.
! Hence we should read Pval== Q ∧ R as P
val== (Q ∧ R).
!
Commutativity:
P ∧ Qval== Q ∧ P,
P ∨ Qval== Q ∨ P,
P ⇔ Qval== Q ⇔ P.
! P ⇒ Q does not have the same truth-value as Q ⇒ P.
P Q P ⇒ Q
0 0 10 1 11 0 01 1 1
P Q Q ⇒ P
0 0 10 1 01 0 11 1 1
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Proposi'onalLogic(Part4)InferenceRules(ExampleofCalcula'ngwithProposi'ons)
F29FAy‐Founda'ons1‐2009/2010‐Semester1‐PartI‐Logic&Proof 5
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! An important rule about ⇔:
Bi-implication:
P ⇔ Qval== (P ⇒ Q) ∧ (Q ⇒ P).
! A useful rule which follows as a consequence is the following:
Self-equivalence:
P ⇔ Pval== True.
! This can be seen as follows: First look at the formula P ⇒ P,the ’self-implication’, with unique arrow. It holds that:(1) P ⇒ P is equivalent to ¬P ∨ P, by Implication, and(2) ¬P ∨ P is in its turn equivalent to True, by (Commutativity
and) Excluded middle, therefore
(3) P ⇒ Pval== True.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! There are many equivalences that can be constructed with’⇒’, we only give the most important ones.
! First we give the rules which change ⇒ into ∨, and vice versa.There, one always sees the appearance of ¬:
Implication:
P ⇒ Qval== ¬P ∨ Q,
P ∨ Qval== ¬P ⇒ Q.
! You can check these implications with truth tables.! Be careful that ¬ is always next to the first sub-formula.! If ¬ is next to the second sub-formula, then we lose the
equivalence:(1) P ∨ ¬Q is by Commutativity equivalent to ¬Q ∨ P, therefore
to Q ⇒ P, which is not equivalent to P ⇒ Q.(2) P ⇒ ¬Q is according to the first rule equivalent to ¬P ∨ ¬Q,
which is very different from P ∨ Q.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! val== has a lower priority than all connectives.
! Hence we should read Pval== Q ∧ R as P
val== (Q ∧ R).
!
Commutativity:
P ∧ Qval== Q ∧ P,
P ∨ Qval== Q ∨ P,
P ⇔ Qval== Q ⇔ P.
! P ⇒ Q does not have the same truth-value as Q ⇒ P.
P Q P ⇒ Q
0 0 10 1 11 0 01 1 1
P Q Q ⇒ P
0 0 10 1 01 0 11 1 1
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! Another important rule which involves False, is the following:
Negation:
¬Pval== P ⇒ False
! Remember when reading this formula thatval== has the lowest
priority!! We already saw the equivalence of ¬P and P ⇒ False.! The above rule expresses that ’not-P’ ’means’ the same as ’P
implies falsity’.! Other important rules with True and False are:
Contradiction:
P ∧ ¬Pval== False
Excluded middle:
P ∨ ¬Pval== True.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! An important rule about ⇔:
Bi-implication:
P ⇔ Qval== (P ⇒ Q) ∧ (Q ⇒ P).
! A useful rule which follows as a consequence is the following:
Self-equivalence:
P ⇔ Pval== True.
! This can be seen as follows: First look at the formula P ⇒ P,the ’self-implication’, with unique arrow. It holds that:(1) P ⇒ P is equivalent to ¬P ∨ P, by Implication, and(2) ¬P ∨ P is in its turn equivalent to True, by (Commutativity
and) Excluded middle, therefore
(3) P ⇒ Pval== True.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! The rules below say what happens with True and False ifthey come across an ∧ or an ∨:
True/False-elimination:
P ∧ Trueval== P,
P ∧ Falseval== False,
P ∨ Trueval== True,
P ∨ Falseval== P.
! In the Boolean algebra where ∧ is written as ’.’ and ∨ iswritten as ’+’, True stands for the number 1 and False for0. The above True -False-laws become then:
P . 1 = P,P . 0 = 0,P + 1 = 1,P + 0 = P.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Proposi'onalLogic(Part4)InferenceRules(ExampleofCalcula'ngwithProposi'ons)
F29FAy‐Founda'ons1‐2009/2010‐Semester1‐PartI‐Logic&Proof 6
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! An important rule about ⇔:
Bi-implication:
P ⇔ Qval== (P ⇒ Q) ∧ (Q ⇒ P).
! A useful rule which follows as a consequence is the following:
Self-equivalence:
P ⇔ Pval== True.
! This can be seen as follows: First look at the formula P ⇒ P,the ’self-implication’, with unique arrow. It holds that:(1) P ⇒ P is equivalent to ¬P ∨ P, by Implication, and(2) ¬P ∨ P is in its turn equivalent to True, by (Commutativity
and) Excluded middle, therefore
(3) P ⇒ Pval== True.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
{Bi‐Implica'on}
{Commuta'vity,ExcludedMiddle}
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! An important rule about ⇔:
Bi-implication:
P ⇔ Qval== (P ⇒ Q) ∧ (Q ⇒ P).
! A useful rule which follows as a consequence is the following:
Self-equivalence:
P ⇔ Pval== True.
! This can be seen as follows: First look at the formula P ⇒ P,the ’self-implication’, with unique arrow. It holds that:(1) P ⇒ P is equivalent to ¬P ∨ P, by Implication, and(2) ¬P ∨ P is in its turn equivalent to True, by (Commutativity
and) Excluded middle, therefore
(3) P ⇒ Pval== True.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! An important rule about ⇔:
Bi-implication:
P ⇔ Qval== (P ⇒ Q) ∧ (Q ⇒ P).
! A useful rule which follows as a consequence is the following:
Self-equivalence:
P ⇔ Pval== True.
! This can be seen as follows: First look at the formula P ⇒ P,the ’self-implication’, with unique arrow. It holds that:(1) P ⇒ P is equivalent to ¬P ∨ P, by Implication, and(2) ¬P ∨ P is in its turn equivalent to True, by (Commutativity
and) Excluded middle, therefore
(3) P ⇒ Pval== True.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! An important rule about ⇔:
Bi-implication:
P ⇔ Qval== (P ⇒ Q) ∧ (Q ⇒ P).
! A useful rule which follows as a consequence is the following:
Self-equivalence:
P ⇔ Pval== True.
! This can be seen as follows: First look at the formula P ⇒ P,the ’self-implication’, with unique arrow. It holds that:(1) P ⇒ P is equivalent to ¬P ∨ P, by Implication, and(2) ¬P ∨ P is in its turn equivalent to True, by (Commutativity
and) Excluded middle, therefore
(3) P ⇒ Pval== True.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
(4) P⇔Pisequivalentto(P⇒P)∧(P⇒P)
(5) (P⇒P)∧(P⇒P)isequivalenttoTrue∧True {(3)}
(6) HencealsoequivalenttoTrue{True/False‐elimina'onrule1}
{Implica'onrule1}
Calcula'ngwithProposi'ons
Basic properties ofval==
Substitution, Leibniz’Calculations’ with equivalence
Equivalence in mathematicsExercises
! Lemma:(1) Reflexivity: P
val== P.
(2) Symmetry: If Pval== Q, then also Q
val== P.
(3) Transitivity: If Pval== Q and if Q
val== R, then P
val== R.
! Proof of part (1) The column of P in the truth-table is equalto the column of P (which is the same) in the truth-table.
! Proof of part (2) When the columns of P and Q in thetruth-table are equal, then so are those of Q and P.
! Proof of part (3) When in the truth-table, P and Q have thesame columns, and also Q and R have the same columns, thenthe columns of P and R must also be equal.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 5
F29FAy‐Founda'ons1‐2009/2010‐Semester1‐PartI‐Logic&Proof 7
Calcula'ngwithProposi'ons
F29FAy‐Founda'ons1‐2009/2010‐Semester1‐PartI‐Logic&Proof 8
Basic properties ofval==
Substitution, Leibniz’Calculations’ with equivalence
Equivalence in mathematicsExercises
! Now we give an important relation between the
meta-symbolval== and the connective ⇔:
! Lemma: If Pval== Q, then P ⇔ Q is a tautology, and vice
versa.Proof:
! When Pval== Q, then P and Q have the same column of zeros
and ones in the truth-table. Hence, at the same height inthese columns, P and Q always have the same truth-value(either both 0, or both 1). In the column of P ⇔ Q there ishence always a 1, and so this is a tautology.
! On the other hand, when P ⇔ Q is a tautology then in thecolumn of P ⇔ Q there is everywhere a 1, hence at the sameheight in the columns of P and Q the same truth-values mustappear (either both 0, or both 1). Hence, these columns must
be completely equal, and so Pval== Q.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 5
Calcula'ngwithProposi'ons
F29FAy‐Founda'ons1‐2009/2010‐Semester1‐PartI‐Logic&Proof 9
Basic properties ofval==
Substitution, Leibniz’Calculations’ with equivalence
Equivalence in mathematicsExercises
! For example let us take one of the two rules of De Morgan:
¬(P ∨ Q)val== ¬P ∧ ¬Q.
(Let Φ stand for (¬(P ∨ Q))⇔ (¬P ∧ ¬Q))
P Q P ∨ Q ¬(P ∨ Q) ¬P ¬Q ¬P ∧ ¬Q Φ
0 0 0 1 1 1 1 10 1 1 0 1 0 0 11 0 1 0 0 1 0 11 1 1 0 0 0 0 1
! From the equivalence of both columns under ¬(P ∨ Q) and
¬P ∧ ¬Q, it follows that ¬(P ∨ Q)val== ¬P ∧ ¬Q.
! The last column shows that (¬(P ∨ Q))⇔ (¬P ∧ ¬Q) is atautology.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 5
Basic properties ofval==
Substitution, Leibniz’Calculations’ with equivalence
Equivalence in mathematicsExercises
! For example let us take one of the two rules of De Morgan:
¬(P ∨ Q)val== ¬P ∧ ¬Q.
(Let Φ stand for (¬(P ∨ Q))⇔ (¬P ∧ ¬Q))
P Q P ∨ Q ¬(P ∨ Q) ¬P ¬Q ¬P ∧ ¬Q Φ
0 0 0 1 1 1 1 10 1 1 0 1 0 0 11 0 1 0 0 1 0 11 1 1 0 0 0 0 1
! From the equivalence of both columns under ¬(P ∨ Q) and
¬P ∧ ¬Q, it follows that ¬(P ∨ Q)val== ¬P ∧ ¬Q.
! The last column shows that (¬(P ∨ Q))⇔ (¬P ∧ ¬Q) is atautology.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 5
Calcula'ngwithProposi'ons
F29FAy‐Founda'ons1‐2009/2010‐Semester1‐PartI‐Logic&Proof 10
Basic properties ofval==
Substitution, Leibniz’Calculations’ with equivalence
Equivalence in mathematicsExercises
! The word ’substitution’ comes from the Latin ’substituere’,which means ’put in place’ or ’replace’.
! In mathematics and computer science substitution is thisprocess of repeatedly replacing one letter by the same formula.
! With simultaneous substitution more than one letter getsreplaced at the same time.
! Now it holds that equivalence is preserved with substitution:
! Lemma [Substitution] Suppose that a formula is equivalent toanother, and that, for example, the letter P occurs manytimes in both formulas. Then it holds that: If in bothformulas, we substitute something for P, then the resultingformulas are also equivalent. This holds for single, sequentialand simultaneous substitutions.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 5
Basic properties ofval==
Substitution, Leibniz’Calculations’ with equivalence
Equivalence in mathematicsExercises
! The following lemma does not deal with substitution (for aletter P, Q, . . . ), but with a single replacement of asub-formula of a bigger formula.
! Lemma [Leibniz] If in an abstract proposition φ, sub-formulaψ1 is replaced by an equivalent formula ψ2, then the old andthe new φ are equivalent.
! We can write this as follows:ψ1
val== ψ2
. . . ψ1 . . .val== . . . ψ2 . . .
(the old φ) (the new φ)! In this picture you must read . . . ψ1 . . . and . . . ψ2 . . .
as being literally the same formulas, except for that one partwhere in the one we have ψ1 and in the other we have ψ2.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 5
Calcula'ngwithProposi'ons
F29FAy‐Founda'ons1‐2009/2010‐Semester1‐PartI‐Logic&Proof 11
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! The symbolval== expresses the concept ’has the same
truth-value as ’ or ’is equivalent to’.
! val== is not a symbol of the logic itself, but a symbol from theso-called meta-logic .
! We use it exactly like a symbol in the logical formulas, but tospeak about the logical formulas.
! val== specifies a relation between logical formulas.
! Pval== Q is no abstract proposition itself.
! It only expresses that P and Q have always the sametruth-values: when one has truth-value 1 then the other willalso have truth-value 1, the same holds for the truth-value 0.
! ’val’ is a shorthand for ’value’.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
P ∧ ¬Q ? ¬(P ⇒ Q )
F29FAy‐Founda'ons1‐2009/2010‐Semester1‐PartI‐Logic&Proof 12
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! val== has a lower priority than all connectives.
! Hence we should read Pval== Q ∧ R as P
val== (Q ∧ R).
!
Commutativity:
P ∧ Qval== Q ∧ P,
P ∨ Qval== Q ∨ P,
P ⇔ Qval== Q ⇔ P.
! P ⇒ Q does not have the same truth-value as Q ⇒ P.
P Q P ⇒ Q
0 0 10 1 11 0 01 1 1
P Q Q ⇒ P
0 0 10 1 01 0 11 1 1
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! The Commutativity rules are easy to remember because ∧, ∨and ⇔ are their own mirror image on the vertical axis. (Thisis not the case though for the connective ⇒.)
! The word ’commutativity’ comes from the Latin word’commutare’, which is ’exchange’.
! Other very common cases of ’having the same truth-values as’or ’being equivalent to’ include:
Associativity:
(P ∧ Q) ∧ Rval== P ∧ (Q ∧ R),
(P ∨ Q) ∨ Rval== P ∨ (Q ∨ R),
(P ⇔ Q)⇔ Rval== P ⇔ (Q ⇔ R)
! Again, ⇒ is missing here.! The word ’associativity’ comes from the Latin word
’associare’, which means ’associate’, ’relate’.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
!Idempotence:
P ∧ Pval== P,
P ∨ Pval== P.
! The word ’idempotence’ comes from Latin. ’Idem’ means ’thesame’ and ’potentia’ means ’power’. It is actually the case forboth ∧ and ∨ that the ’second power’ of P is equal to P itself.
! You see this better when you replace ’∧’ by the multiplication
sign: P ∧ Pval== P becomes in that case P · P = P, and
hence P2 = P.
! In the same way you can write P ∨ Pval== P as P + P = P,
again a kind of second-power, but then for ’+’.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
!Double negation:
¬¬Pval== P.
! ’Double negation’ is also called ’involution’ after the Latin’involvere’, which is ’wrap’: when P becomes wrapped in two¬’s, it keeps its own truth value.
!Inversion:
¬True val== False,
¬False val== True.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! The following two rules treat the confrontation of ¬ on onehand with ∧ resp. ∨ on the other.
! Also ¬ distributes in a certain sense, it ’exchanges ∧ and ∨’:
De Morgan:
¬(P ∧ Q)val== ¬P ∨ ¬Q,
¬(P ∨ Q)val== ¬P ∧ ¬Q
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! The standard equivalences so far took care of simplifications.! This will not always be the case with the rules of this section.! We begin with two rules which deal with a ’confrontation’
between ∧ and ∨:
Distributivity:
P ∧ (Q ∨ R)val== (P ∧ Q) ∨ (P ∧ R),
P ∨ (Q ∧ R)val== (P ∨ Q) ∧ (P ∨ R).
! The word ’distributivity’ comes from the Latin ’distribuere’,which is: ’distribute’ or ’divide’.
! In the first rule, for example, P and ∧ are together dividedover Q and R, because Q becomes P ∧ Q, and R becomesP ∧ R.
! One usually says by the first equivalence that ∧ distributesover ∨.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
!Double negation:
¬¬Pval== P.
! ’Double negation’ is also called ’involution’ after the Latin’involvere’, which is ’wrap’: when P becomes wrapped in two¬’s, it keeps its own truth value.
!Inversion:
¬True val== False,
¬False val== True.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! The rules below say what happens with True and False ifthey come across an ∧ or an ∨:
True/False-elimination:
P ∧ Trueval== P,
P ∧ Falseval== False,
P ∨ Trueval== True,
P ∨ Falseval== P.
! In the Boolean algebra where ∧ is written as ’.’ and ∨ iswritten as ’+’, True stands for the number 1 and False for0. The above True -False-laws become then:
P . 1 = P,P . 0 = 0,P + 1 = 1,P + 0 = P.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! Another important rule which involves False, is the following:
Negation:
¬Pval== P ⇒ False
! Remember when reading this formula thatval== has the lowest
priority!! We already saw the equivalence of ¬P and P ⇒ False.! The above rule expresses that ’not-P’ ’means’ the same as ’P
implies falsity’.! Other important rules with True and False are:
Contradiction:
P ∧ ¬Pval== False
Excluded middle:
P ∨ ¬Pval== True.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! Another important rule which involves False, is the following:
Negation:
¬Pval== P ⇒ False
! Remember when reading this formula thatval== has the lowest
priority!! We already saw the equivalence of ¬P and P ⇒ False.! The above rule expresses that ’not-P’ ’means’ the same as ’P
implies falsity’.! Other important rules with True and False are:
Contradiction:
P ∧ ¬Pval== False
Excluded middle:
P ∨ ¬Pval== True.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! An important rule about ⇔:
Bi-implication:
P ⇔ Qval== (P ⇒ Q) ∧ (Q ⇒ P).
! A useful rule which follows as a consequence is the following:
Self-equivalence:
P ⇔ Pval== True.
! This can be seen as follows: First look at the formula P ⇒ P,the ’self-implication’, with unique arrow. It holds that:(1) P ⇒ P is equivalent to ¬P ∨ P, by Implication, and(2) ¬P ∨ P is in its turn equivalent to True, by (Commutativity
and) Excluded middle, therefore
(3) P ⇒ Pval== True.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! There are many equivalences that can be constructed with’⇒’, we only give the most important ones.
! First we give the rules which change ⇒ into ∨, and vice versa.There, one always sees the appearance of ¬:
Implication:
P ⇒ Qval== ¬P ∨ Q,
P ∨ Qval== ¬P ⇒ Q.
! You can check these implications with truth tables.! Be careful that ¬ is always next to the first sub-formula.! If ¬ is next to the second sub-formula, then we lose the
equivalence:(1) P ∨ ¬Q is by Commutativity equivalent to ¬Q ∨ P, therefore
to Q ⇒ P, which is not equivalent to P ⇒ Q.(2) P ⇒ ¬Q is according to the first rule equivalent to ¬P ∨ ¬Q,
which is very different from P ∨ Q.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! The following rule says something about the ’permutation’ ofan implication P ⇒ Q. Note the use of ¬.
Contraposition:
P ⇒ Qval== ¬Q ⇒ ¬P.
! We can check this with the truth tables. But we can alsocheck it as follows:(1) P ⇒ Q is equivalent to ¬P ∨ Q (by one Implication rule)(2) and this is equivalent to Q ∨ ¬P (by Commutativity),(3) which is equivalent to ¬Q ⇒ ¬P (by the otherImplication rule).
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! An important rule about ⇔:
Bi-implication:
P ⇔ Qval== (P ⇒ Q) ∧ (Q ⇒ P).
! A useful rule which follows as a consequence is the following:
Self-equivalence:
P ⇔ Pval== True.
! This can be seen as follows: First look at the formula P ⇒ P,the ’self-implication’, with unique arrow. It holds that:(1) P ⇒ P is equivalent to ¬P ∨ P, by Implication, and(2) ¬P ∨ P is in its turn equivalent to True, by (Commutativity
and) Excluded middle, therefore
(3) P ⇒ Pval== True.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Calcula'ngwithProposi'ons
F29FAy‐Founda'ons1‐2009/2010‐Semester1‐PartI‐Logic&Proof 13
Basic properties ofval==
Substitution, Leibniz’Calculations’ with equivalence
Equivalence in mathematicsExercises
! Substitution and/or Leibniz are rarely named in the hint:
¬(P ⇒ Q)val== { Implication}
¬(¬P ∨ Q)val== { De Morgan}
¬¬P ∧ ¬Qval== { Double negation }
P ∧ ¬Q! The scheme above can have the following conclusion:
¬(P ⇒ Q)val== P ∧ ¬Q.
! Let us see another example where Leibniz, substitution,associativity and commutativity are used but not mentioned:
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 5
Calcula'ngwithProposi'ons
F29FAy‐Founda'ons1‐2009/2010‐Semester1‐PartI‐Logic&Proof 14
P ⇔ Q
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! The symbolval== expresses the concept ’has the same
truth-value as ’ or ’is equivalent to’.
! val== is not a symbol of the logic itself, but a symbol from theso-called meta-logic .
! We use it exactly like a symbol in the logical formulas, but tospeak about the logical formulas.
! val== specifies a relation between logical formulas.
! Pval== Q is no abstract proposition itself.
! It only expresses that P and Q have always the sametruth-values: when one has truth-value 1 then the other willalso have truth-value 1, the same holds for the truth-value 0.
! ’val’ is a shorthand for ’value’.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
(P ∧ Q ) ∨ (¬P ∧ ¬Q ) ?
F29FAy‐Founda'ons1‐2009/2010‐Semester1‐PartI‐Logic&Proof 15
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! val== has a lower priority than all connectives.
! Hence we should read Pval== Q ∧ R as P
val== (Q ∧ R).
!
Commutativity:
P ∧ Qval== Q ∧ P,
P ∨ Qval== Q ∨ P,
P ⇔ Qval== Q ⇔ P.
! P ⇒ Q does not have the same truth-value as Q ⇒ P.
P Q P ⇒ Q
0 0 10 1 11 0 01 1 1
P Q Q ⇒ P
0 0 10 1 01 0 11 1 1
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! The Commutativity rules are easy to remember because ∧, ∨and ⇔ are their own mirror image on the vertical axis. (Thisis not the case though for the connective ⇒.)
! The word ’commutativity’ comes from the Latin word’commutare’, which is ’exchange’.
! Other very common cases of ’having the same truth-values as’or ’being equivalent to’ include:
Associativity:
(P ∧ Q) ∧ Rval== P ∧ (Q ∧ R),
(P ∨ Q) ∨ Rval== P ∨ (Q ∨ R),
(P ⇔ Q)⇔ Rval== P ⇔ (Q ⇔ R)
! Again, ⇒ is missing here.! The word ’associativity’ comes from the Latin word
’associare’, which means ’associate’, ’relate’.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
!Idempotence:
P ∧ Pval== P,
P ∨ Pval== P.
! The word ’idempotence’ comes from Latin. ’Idem’ means ’thesame’ and ’potentia’ means ’power’. It is actually the case forboth ∧ and ∨ that the ’second power’ of P is equal to P itself.
! You see this better when you replace ’∧’ by the multiplication
sign: P ∧ Pval== P becomes in that case P · P = P, and
hence P2 = P.
! In the same way you can write P ∨ Pval== P as P + P = P,
again a kind of second-power, but then for ’+’.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
!Double negation:
¬¬Pval== P.
! ’Double negation’ is also called ’involution’ after the Latin’involvere’, which is ’wrap’: when P becomes wrapped in two¬’s, it keeps its own truth value.
!Inversion:
¬True val== False,
¬False val== True.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! The following two rules treat the confrontation of ¬ on onehand with ∧ resp. ∨ on the other.
! Also ¬ distributes in a certain sense, it ’exchanges ∧ and ∨’:
De Morgan:
¬(P ∧ Q)val== ¬P ∨ ¬Q,
¬(P ∨ Q)val== ¬P ∧ ¬Q
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! The standard equivalences so far took care of simplifications.! This will not always be the case with the rules of this section.! We begin with two rules which deal with a ’confrontation’
between ∧ and ∨:
Distributivity:
P ∧ (Q ∨ R)val== (P ∧ Q) ∨ (P ∧ R),
P ∨ (Q ∧ R)val== (P ∨ Q) ∧ (P ∨ R).
! The word ’distributivity’ comes from the Latin ’distribuere’,which is: ’distribute’ or ’divide’.
! In the first rule, for example, P and ∧ are together dividedover Q and R, because Q becomes P ∧ Q, and R becomesP ∧ R.
! One usually says by the first equivalence that ∧ distributesover ∨.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
!Double negation:
¬¬Pval== P.
! ’Double negation’ is also called ’involution’ after the Latin’involvere’, which is ’wrap’: when P becomes wrapped in two¬’s, it keeps its own truth value.
!Inversion:
¬True val== False,
¬False val== True.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! The rules below say what happens with True and False ifthey come across an ∧ or an ∨:
True/False-elimination:
P ∧ Trueval== P,
P ∧ Falseval== False,
P ∨ Trueval== True,
P ∨ Falseval== P.
! In the Boolean algebra where ∧ is written as ’.’ and ∨ iswritten as ’+’, True stands for the number 1 and False for0. The above True -False-laws become then:
P . 1 = P,P . 0 = 0,P + 1 = 1,P + 0 = P.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! Another important rule which involves False, is the following:
Negation:
¬Pval== P ⇒ False
! Remember when reading this formula thatval== has the lowest
priority!! We already saw the equivalence of ¬P and P ⇒ False.! The above rule expresses that ’not-P’ ’means’ the same as ’P
implies falsity’.! Other important rules with True and False are:
Contradiction:
P ∧ ¬Pval== False
Excluded middle:
P ∨ ¬Pval== True.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! Another important rule which involves False, is the following:
Negation:
¬Pval== P ⇒ False
! Remember when reading this formula thatval== has the lowest
priority!! We already saw the equivalence of ¬P and P ⇒ False.! The above rule expresses that ’not-P’ ’means’ the same as ’P
implies falsity’.! Other important rules with True and False are:
Contradiction:
P ∧ ¬Pval== False
Excluded middle:
P ∨ ¬Pval== True.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! An important rule about ⇔:
Bi-implication:
P ⇔ Qval== (P ⇒ Q) ∧ (Q ⇒ P).
! A useful rule which follows as a consequence is the following:
Self-equivalence:
P ⇔ Pval== True.
! This can be seen as follows: First look at the formula P ⇒ P,the ’self-implication’, with unique arrow. It holds that:(1) P ⇒ P is equivalent to ¬P ∨ P, by Implication, and(2) ¬P ∨ P is in its turn equivalent to True, by (Commutativity
and) Excluded middle, therefore
(3) P ⇒ Pval== True.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! There are many equivalences that can be constructed with’⇒’, we only give the most important ones.
! First we give the rules which change ⇒ into ∨, and vice versa.There, one always sees the appearance of ¬:
Implication:
P ⇒ Qval== ¬P ∨ Q,
P ∨ Qval== ¬P ⇒ Q.
! You can check these implications with truth tables.! Be careful that ¬ is always next to the first sub-formula.! If ¬ is next to the second sub-formula, then we lose the
equivalence:(1) P ∨ ¬Q is by Commutativity equivalent to ¬Q ∨ P, therefore
to Q ⇒ P, which is not equivalent to P ⇒ Q.(2) P ⇒ ¬Q is according to the first rule equivalent to ¬P ∨ ¬Q,
which is very different from P ∨ Q.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! The following rule says something about the ’permutation’ ofan implication P ⇒ Q. Note the use of ¬.
Contraposition:
P ⇒ Qval== ¬Q ⇒ ¬P.
! We can check this with the truth tables. But we can alsocheck it as follows:(1) P ⇒ Q is equivalent to ¬P ∨ Q (by one Implication rule)(2) and this is equivalent to Q ∨ ¬P (by Commutativity),(3) which is equivalent to ¬Q ⇒ ¬P (by the otherImplication rule).
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! An important rule about ⇔:
Bi-implication:
P ⇔ Qval== (P ⇒ Q) ∧ (Q ⇒ P).
! A useful rule which follows as a consequence is the following:
Self-equivalence:
P ⇔ Pval== True.
! This can be seen as follows: First look at the formula P ⇒ P,the ’self-implication’, with unique arrow. It holds that:(1) P ⇒ P is equivalent to ¬P ∨ P, by Implication, and(2) ¬P ∨ P is in its turn equivalent to True, by (Commutativity
and) Excluded middle, therefore
(3) P ⇒ Pval== True.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Calcula'ngwithProposi'ons
F29FAy‐Founda'ons1‐2009/2010‐Semester1‐PartI‐Logic&Proof 16
Basic properties ofval==
Substitution, Leibniz’Calculations’ with equivalence
Equivalence in mathematicsExercises
!
P ⇔ Qval== { Bi-implication }
(P ⇒ Q) ∧ (Q ⇒ P)val== { Implication, twice }
(¬P ∨ Q) ∧ (¬Q ∨ P)val== { Distributivity }
(¬P ∧ (¬Q ∨ P)) ∨ (Q ∧ (¬Q ∨ P))val== { Distributivity, twice }
(¬P ∧ ¬Q) ∨ (¬P ∧ P) ∨ (Q ∧ ¬Q) ∨ (Q ∧ P)val== { Contradiction, twice }
(¬P ∧ ¬Q) ∨ False ∨ False ∨ (Q ∧ P)val== { True/False-elimination, twice }
(P ∧ Q) ∨ (¬P ∧ ¬Q)
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 5
Calcula'ngwithProposi'ons
Let’sworkonmoreexamples:• Fortheproposi'onbelow,saywhetheritisatautology.
• Ifyes,giveaproofbyacalcula'onsta'ngpreciselyateachstepwhichrulesofinferenceyouuse.
((Q⇒P)⇒¬Q)⇔(¬P∨¬Q)
F29FAy‐Founda'ons1‐2009/2010‐Semester1‐PartI‐Logic&Proof 17
F29FAy‐Founda'ons1‐2009/2010‐Semester1‐PartI‐Logic&Proof 18
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! val== has a lower priority than all connectives.
! Hence we should read Pval== Q ∧ R as P
val== (Q ∧ R).
!
Commutativity:
P ∧ Qval== Q ∧ P,
P ∨ Qval== Q ∨ P,
P ⇔ Qval== Q ⇔ P.
! P ⇒ Q does not have the same truth-value as Q ⇒ P.
P Q P ⇒ Q
0 0 10 1 11 0 01 1 1
P Q Q ⇒ P
0 0 10 1 01 0 11 1 1
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! The Commutativity rules are easy to remember because ∧, ∨and ⇔ are their own mirror image on the vertical axis. (Thisis not the case though for the connective ⇒.)
! The word ’commutativity’ comes from the Latin word’commutare’, which is ’exchange’.
! Other very common cases of ’having the same truth-values as’or ’being equivalent to’ include:
Associativity:
(P ∧ Q) ∧ Rval== P ∧ (Q ∧ R),
(P ∨ Q) ∨ Rval== P ∨ (Q ∨ R),
(P ⇔ Q)⇔ Rval== P ⇔ (Q ⇔ R)
! Again, ⇒ is missing here.! The word ’associativity’ comes from the Latin word
’associare’, which means ’associate’, ’relate’.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
!Idempotence:
P ∧ Pval== P,
P ∨ Pval== P.
! The word ’idempotence’ comes from Latin. ’Idem’ means ’thesame’ and ’potentia’ means ’power’. It is actually the case forboth ∧ and ∨ that the ’second power’ of P is equal to P itself.
! You see this better when you replace ’∧’ by the multiplication
sign: P ∧ Pval== P becomes in that case P · P = P, and
hence P2 = P.
! In the same way you can write P ∨ Pval== P as P + P = P,
again a kind of second-power, but then for ’+’.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
!Double negation:
¬¬Pval== P.
! ’Double negation’ is also called ’involution’ after the Latin’involvere’, which is ’wrap’: when P becomes wrapped in two¬’s, it keeps its own truth value.
!Inversion:
¬True val== False,
¬False val== True.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! The following two rules treat the confrontation of ¬ on onehand with ∧ resp. ∨ on the other.
! Also ¬ distributes in a certain sense, it ’exchanges ∧ and ∨’:
De Morgan:
¬(P ∧ Q)val== ¬P ∨ ¬Q,
¬(P ∨ Q)val== ¬P ∧ ¬Q
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! The standard equivalences so far took care of simplifications.! This will not always be the case with the rules of this section.! We begin with two rules which deal with a ’confrontation’
between ∧ and ∨:
Distributivity:
P ∧ (Q ∨ R)val== (P ∧ Q) ∨ (P ∧ R),
P ∨ (Q ∧ R)val== (P ∨ Q) ∧ (P ∨ R).
! The word ’distributivity’ comes from the Latin ’distribuere’,which is: ’distribute’ or ’divide’.
! In the first rule, for example, P and ∧ are together dividedover Q and R, because Q becomes P ∧ Q, and R becomesP ∧ R.
! One usually says by the first equivalence that ∧ distributesover ∨.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
!Double negation:
¬¬Pval== P.
! ’Double negation’ is also called ’involution’ after the Latin’involvere’, which is ’wrap’: when P becomes wrapped in two¬’s, it keeps its own truth value.
!Inversion:
¬True val== False,
¬False val== True.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! The rules below say what happens with True and False ifthey come across an ∧ or an ∨:
True/False-elimination:
P ∧ Trueval== P,
P ∧ Falseval== False,
P ∨ Trueval== True,
P ∨ Falseval== P.
! In the Boolean algebra where ∧ is written as ’.’ and ∨ iswritten as ’+’, True stands for the number 1 and False for0. The above True -False-laws become then:
P . 1 = P,P . 0 = 0,P + 1 = 1,P + 0 = P.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! Another important rule which involves False, is the following:
Negation:
¬Pval== P ⇒ False
! Remember when reading this formula thatval== has the lowest
priority!! We already saw the equivalence of ¬P and P ⇒ False.! The above rule expresses that ’not-P’ ’means’ the same as ’P
implies falsity’.! Other important rules with True and False are:
Contradiction:
P ∧ ¬Pval== False
Excluded middle:
P ∨ ¬Pval== True.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! Another important rule which involves False, is the following:
Negation:
¬Pval== P ⇒ False
! Remember when reading this formula thatval== has the lowest
priority!! We already saw the equivalence of ¬P and P ⇒ False.! The above rule expresses that ’not-P’ ’means’ the same as ’P
implies falsity’.! Other important rules with True and False are:
Contradiction:
P ∧ ¬Pval== False
Excluded middle:
P ∨ ¬Pval== True.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! An important rule about ⇔:
Bi-implication:
P ⇔ Qval== (P ⇒ Q) ∧ (Q ⇒ P).
! A useful rule which follows as a consequence is the following:
Self-equivalence:
P ⇔ Pval== True.
! This can be seen as follows: First look at the formula P ⇒ P,the ’self-implication’, with unique arrow. It holds that:(1) P ⇒ P is equivalent to ¬P ∨ P, by Implication, and(2) ¬P ∨ P is in its turn equivalent to True, by (Commutativity
and) Excluded middle, therefore
(3) P ⇒ Pval== True.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! There are many equivalences that can be constructed with’⇒’, we only give the most important ones.
! First we give the rules which change ⇒ into ∨, and vice versa.There, one always sees the appearance of ¬:
Implication:
P ⇒ Qval== ¬P ∨ Q,
P ∨ Qval== ¬P ⇒ Q.
! You can check these implications with truth tables.! Be careful that ¬ is always next to the first sub-formula.! If ¬ is next to the second sub-formula, then we lose the
equivalence:(1) P ∨ ¬Q is by Commutativity equivalent to ¬Q ∨ P, therefore
to Q ⇒ P, which is not equivalent to P ⇒ Q.(2) P ⇒ ¬Q is according to the first rule equivalent to ¬P ∨ ¬Q,
which is very different from P ∨ Q.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! The following rule says something about the ’permutation’ ofan implication P ⇒ Q. Note the use of ¬.
Contraposition:
P ⇒ Qval== ¬Q ⇒ ¬P.
! We can check this with the truth tables. But we can alsocheck it as follows:(1) P ⇒ Q is equivalent to ¬P ∨ Q (by one Implication rule)(2) and this is equivalent to Q ∨ ¬P (by Commutativity),(3) which is equivalent to ¬Q ⇒ ¬P (by the otherImplication rule).
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Commutativity, AssociativityIdempotence, double negation
Rules with True and FalseDistributivity, De Morgan
Rules with⇒Rules with⇔
Exercises
! An important rule about ⇔:
Bi-implication:
P ⇔ Qval== (P ⇒ Q) ∧ (Q ⇒ P).
! A useful rule which follows as a consequence is the following:
Self-equivalence:
P ⇔ Pval== True.
! This can be seen as follows: First look at the formula P ⇒ P,the ’self-implication’, with unique arrow. It holds that:(1) P ⇒ P is equivalent to ¬P ∨ P, by Implication, and(2) ¬P ∨ P is in its turn equivalent to True, by (Commutativity
and) Excluded middle, therefore
(3) P ⇒ Pval== True.
Fairouz Kamareddine Logic and Proof F22HI1 Lecture 4
Lecture5I. Proposi'onalLogic(Part5) Calcula'ngwithProposi'ons
Material:
@hap://www.macs.hw.ac.uk/~pav1(pleasenotethatthislinkonlyworksinMozillaFirefox™orSafari®web
browsers)
@VISION
19F29FAy‐Founda'ons1‐2009/2010‐Semester1‐PartI‐Logic&Proof
Lecture6What’snext?
PredicateLogicorFirst‐OrderLogic
20F29FAy‐Founda'ons1‐2009/2010‐Semester1‐PartI‐Logic&Proof
top related