160 likes | 301 Views
Discrete Structures Lecture 26 Predicate Calculus Read Ch 9.1. 8.6(c) without using 8.23, part one. ( V i | 0 ≤ i < n+1: b[i]=0) b[0]=0 V ( V i | 0 < i < n+1: b[i]=0) 0 ≤ i < n+1 = < Remove abbreviation > 0 ≤ i i < n+1 = < 0 ≤ i 0=i V 0<i >
E N D
Discrete Structures Lecture 26 Predicate Calculus Read Ch 9.1
8.6(c) without using 8.23, part one (Vi |0 ≤ i < n+1: b[i]=0) b[0]=0V(Vi |0 < i < n+1: b[i]=0) 0 ≤ i < n+1 = < Remove abbreviation > 0 ≤ i i < n+1 = <0 ≤ i 0=i V 0<i > (0=i V 0<i) i < n+1 = < (3.46) Distributivity of over V > (0 = i i<n+1) V (0 < i i<n+1) = < Reintroduce abbreviation > (0 = i i<n+1) V (0 < i<n+1) = < (3.84a) Substitution > (0 = i 0<n+1) V (0 < i<n+1) < Assump 0≤n;0 ≤ n0<n+1;(3.39) Identity of > 0 = i V (0 < i<n+1)
8.6(c) without using 8.23 (Vi |0 ≤ i < n+1: b[i]=0) b[0]=0V(Vi |0 < i < n+1: b[i]=0) (Vi |0 ≤ i < n+1: b[i]=0) = < Previous Proof > (Vi |0 = iV0 < i < n+1: b[i]=0) = < (8.16) Range Split > (Vi |0 = i: b[i]=0)V(Vi | 0 < i < n+1: b[i]=0) = < (8.14) One Point Rule > b[0]=0 V (Vi |0 < i < n+1: b[i]=0)
A Note about rangesFor example: 2, …, 15 (a) 2 ≤ i ≤ 15 (b) 2 ≤ i < 16 (c) 1 < i ≤ 15 (d) 1 < i < 16 Number of elements in range is equal to upperBound - lowerBound in (b) & (c). Xerox Parc study, said fewest errors with (b).
Predicate Logic An extension of propositional logic that uses variables of types other than B. Propositional Calculus: reasoning about formulas constructed from boolean variables and operators. Predicate Calculus: More expressive class of formulas.
Predicate Calculus Formula Boolean expression in which some Boolean variables may have been replaced by: • Predicates….whose arguments may be of types other than B. • Universal and Existential Quantifiers
Universal Quantification (9.1) (x | Range :P) Read as "for all x such that the Range holds, P holds." is idempotent, so universal quantification satisfies range split (8.18)….. (8.13)-(8.21) hold as well.
Trading with Universal Quantification (9.2) Axiom, Trading (x|Range:P) (x|:Range P) This axiom allows us to prove trading theorems(9.3 a,b,c)and(9.4 a,b,c,d).
Theorem 9.3 (9.3) Theorem, Trading a)(x|R:P) (x|:¬R V P) b)(x|R:P) (x|:R P R) c) (x|R:P) (x|:R V P P)
Theorem 9.4 (9.4) Theorem, Trading a)(x|Q R:P) (x|Q:R P) b)(x|Q R:P) (x|Q:¬R V P) c)(x|Q R:P) (x|Q:R P R) d) (x|Q R:P) (x|Q:R V P P)
Distributivity with (9.5) Axiom, Distributivity of V over P V (x|R: Q) (x|R: P V Q) provided ¬occurs ('x','P')
Problem (9.3) Prove theorem (9.6) (9.6) (x | R : P) P V (x | :¬R) provided ¬occurs ('x','P') (x |R: P) = <(9.3a) Trading > (x | :¬R V P) = <(9.5) V distributes over > P V (x | :¬R)
More theorems with (9.7) Distributivity of over provided ¬occurs ('x','P') ¬(x|:¬R) ((x|R:PQ) P (x|R:Q)) (Antecedent means the range is not everywhere false) Example: ¬(x|:¬(x=0)) ((x|x=0:PQ) P (x|x=0:Q)) ¬(x|:x¹0)) ((x|x=0:PQ) P (x|x=0:Q)) ¬(x¹0) ((x|x=0:PQ) P (x|x=0:Q)) (x = 0) ((x|x=0:PQ) P (x|x=0:Q)) Likewise: ¬(x|:¬(x>=0)) ((x|x>=0:PQ) P (x|x>=0:Q)) ¬(x|: (x<0)) ((x|x>=0:PQ) P (x|x>=0:Q)) (x >= 0) ((x|x>=0:PQ) P (x|x>=0:Q))
More theorems with (9.8) (x | R : true) true (9.9) (x|R:PQ) ((x|R:P) (x|R:Q))
Weakening, Strengthening for Think back to 3.76a and 3.76b (9.10) Range weakening/strengthening (x | Q V R : P) (x | Q : P) (9.11) Body weakening/strengthening (x | R : P Q) (x | R : P)
Monotonicity of (9.12) Monotonicity of (x | R : Q P) ((x | R : Q) (x | R : P))