discrete mathematics mathematical reasoning predicates
play

Discrete Mathematics & Mathematical Reasoning Predicates, - PowerPoint PPT Presentation

Discrete Mathematics & Mathematical Reasoning Predicates, Quantifiers and Proof Techniques Colin Stirling Informatics Colin Stirling (Informatics) Discrete Mathematics (Chap 1) Today 1 / 30 Recall propositional logic from last year (in


  1. Discrete Mathematics & Mathematical Reasoning Predicates, Quantifiers and Proof Techniques Colin Stirling Informatics Colin Stirling (Informatics) Discrete Mathematics (Chap 1) Today 1 / 30

  2. Recall propositional logic from last year (in Inf1CL) Propositions can be constructed from other propositions using logical connectives Colin Stirling (Informatics) Discrete Mathematics (Chap 1) Today 2 / 30

  3. Recall propositional logic from last year (in Inf1CL) Propositions can be constructed from other propositions using logical connectives Negation: ¬ Conjunction: ∧ Disjunction: ∨ Implication: → Biconditional: ↔ Colin Stirling (Informatics) Discrete Mathematics (Chap 1) Today 2 / 30

  4. Recall propositional logic from last year (in Inf1CL) Propositions can be constructed from other propositions using logical connectives Negation: ¬ Conjunction: ∧ Disjunction: ∨ Implication: → Biconditional: ↔ The truth of a proposition is defined by the truth values of its elementary propositions and the meaning of connectives Colin Stirling (Informatics) Discrete Mathematics (Chap 1) Today 2 / 30

  5. Recall propositional logic from last year (in Inf1CL) Propositions can be constructed from other propositions using logical connectives Negation: ¬ Conjunction: ∧ Disjunction: ∨ Implication: → Biconditional: ↔ The truth of a proposition is defined by the truth values of its elementary propositions and the meaning of connectives The meaning of logical connectives can be defined using truth tables Colin Stirling (Informatics) Discrete Mathematics (Chap 1) Today 2 / 30

  6. Examples of logical implication and equivalence ( p ∧ ( p → q )) → q ( p ∧ ¬ p ) → q (( p → q ) ∧ ( q → r )) → ( p → r ) . . . Colin Stirling (Informatics) Discrete Mathematics (Chap 1) Today 3 / 30

  7. Examples of logical implication and equivalence ( p ∧ ( p → q )) → q ( p ∧ ¬ p ) → q (( p → q ) ∧ ( q → r )) → ( p → r ) . . . ( p → q ) ↔ ( ¬ q → ¬ p ) ¬ ( p ∧ q ) ↔ ( ¬ p ∨ ¬ q ) De Morgan ¬ ( p ∨ q ) ↔ ( ¬ p ∧ ¬ q ) De Morgan ¬ ( p → q ) ↔ ( p ∧ ¬ q ) . . . Colin Stirling (Informatics) Discrete Mathematics (Chap 1) Today 3 / 30

  8. Propositional logic is not “enough” Colin Stirling (Informatics) Discrete Mathematics (Chap 1) Today 4 / 30

  9. Propositional logic is not “enough” In propositional logic, from All cats have whiskers (proposition p ) Sansa is a cat (proposition q ) we cannot derive Sansa has whiskers (proposition r ) Colin Stirling (Informatics) Discrete Mathematics (Chap 1) Today 4 / 30

  10. Propositional logic is not “enough” In propositional logic, from All cats have whiskers (proposition p ) Sansa is a cat (proposition q ) we cannot derive Sansa has whiskers (proposition r ) ( p ∧ q ) → r is not a tautology Colin Stirling (Informatics) Discrete Mathematics (Chap 1) Today 4 / 30

  11. Propositional logic is not “enough” In propositional logic, from All cats have whiskers (proposition p ) Sansa is a cat (proposition q ) we cannot derive Sansa has whiskers (proposition r ) ( p ∧ q ) → r is not a tautology We need a language to talk about objects, their properties and their relations Colin Stirling (Informatics) Discrete Mathematics (Chap 1) Today 4 / 30

  12. Sansa the cat (with whiskers) Colin Stirling (Informatics) Discrete Mathematics (Chap 1) Today 5 / 30

  13. Formally same argument as Given the following two premises All students in this class understand logic Colin is a student in this class Colin Stirling (Informatics) Discrete Mathematics (Chap 1) Today 6 / 30

  14. Formally same argument as Given the following two premises All students in this class understand logic Colin is a student in this class it follows that Colin understands logic Colin Stirling (Informatics) Discrete Mathematics (Chap 1) Today 6 / 30

  15. Predicate logic Extends propositional logic by the new features Variables: x , y , z , . . . Predicates: P ( x ) , Q ( x ) , R ( x , y ) , M ( x , y , z ) , . . . Quantifiers: ∀ , ∃ Colin Stirling (Informatics) Discrete Mathematics (Chap 1) Today 7 / 30

  16. Predicate logic Extends propositional logic by the new features Variables: x , y , z , . . . Predicates: P ( x ) , Q ( x ) , R ( x , y ) , M ( x , y , z ) , . . . Quantifiers: ∀ , ∃ Predicates are a generalisation of propositions Can contain variables M ( x , y , z ) Variables stand for (and can be replaced by) elements from their domain The truth value of a predicate depends on the values of its variables Colin Stirling (Informatics) Discrete Mathematics (Chap 1) Today 7 / 30

  17. Examples P ( x ) is “ x > 5” and x ranges over Z (integers) P ( 8 ) is true P ( − 1 ) is false Colin Stirling (Informatics) Discrete Mathematics (Chap 1) Today 8 / 30

  18. Examples P ( x ) is “ x > 5” and x ranges over Z (integers) P ( 8 ) is true P ( − 1 ) is false C ( x ) is “ x is a cat”; W ( x ) is “ x has whiskers” and x ranges over animals C ( Sansa ) is true C ( Colin ) is false W ( Sansa ) is true Colin Stirling (Informatics) Discrete Mathematics (Chap 1) Today 8 / 30

  19. Examples P ( x ) is “ x > 5” and x ranges over Z (integers) P ( 8 ) is true P ( − 1 ) is false C ( x ) is “ x is a cat”; W ( x ) is “ x has whiskers” and x ranges over animals C ( Sansa ) is true C ( Colin ) is false W ( Sansa ) is true D ( x , y ) is “ x divides y ” and x , y range over Z + (positive integers) D ( 3 , 9 ) is true D ( 2 , 9 ) is false Colin Stirling (Informatics) Discrete Mathematics (Chap 1) Today 8 / 30

  20. Examples P ( x ) is “ x > 5” and x ranges over Z (integers) P ( 8 ) is true P ( − 1 ) is false C ( x ) is “ x is a cat”; W ( x ) is “ x has whiskers” and x ranges over animals C ( Sansa ) is true C ( Colin ) is false W ( Sansa ) is true D ( x , y ) is “ x divides y ” and x , y range over Z + (positive integers) D ( 3 , 9 ) is true D ( 2 , 9 ) is false S ( x 1 , . . . , x 11 , y ) is “ x 1 + . . . + x 11 = y ” S ( 1 , 2 , . . . , 11 , 66 ) is true Colin Stirling (Informatics) Discrete Mathematics (Chap 1) Today 8 / 30

  21. Quantifiers Universal quantifier, “For all”: ∀ ∀ x P ( x ) asserts that P ( x ) is true for every x in the assumed domain Colin Stirling (Informatics) Discrete Mathematics (Chap 1) Today 9 / 30

  22. Quantifiers Universal quantifier, “For all”: ∀ ∀ x P ( x ) asserts that P ( x ) is true for every x in the assumed domain Existential quantifier, “There exists”: ∃ ∃ x P ( x ) asserts that P ( x ) is true for some x in the assumed domain Colin Stirling (Informatics) Discrete Mathematics (Chap 1) Today 9 / 30

  23. Quantifiers Universal quantifier, “For all”: ∀ ∀ x P ( x ) asserts that P ( x ) is true for every x in the assumed domain Existential quantifier, “There exists”: ∃ ∃ x P ( x ) asserts that P ( x ) is true for some x in the assumed domain The quantifiers are said to bind the variable x in these expressions. Variables in the scope of some quantifier are called bound variables. All other variables in the expression are called free variables Colin Stirling (Informatics) Discrete Mathematics (Chap 1) Today 9 / 30

  24. Quantifiers Universal quantifier, “For all”: ∀ ∀ x P ( x ) asserts that P ( x ) is true for every x in the assumed domain Existential quantifier, “There exists”: ∃ ∃ x P ( x ) asserts that P ( x ) is true for some x in the assumed domain The quantifiers are said to bind the variable x in these expressions. Variables in the scope of some quantifier are called bound variables. All other variables in the expression are called free variables A formula that does not contain any free variables is a proposition and has a truth value Colin Stirling (Informatics) Discrete Mathematics (Chap 1) Today 9 / 30

  25. Quantifier Rule Rule of inference ∀ x P ( x ) v is a value in assumed domain P ( v ) Colin Stirling (Informatics) Discrete Mathematics (Chap 1) Today 10 / 30

  26. Quantifier Rule Rule of inference ∀ x P ( x ) v is a value in assumed domain P ( v ) From ∀ x P ( x ) is true infer that P ( v ) is true for any value v in the assumed domain ¬ ( ∀ x P ( x )) ↔ ∃ x ¬ P ( x ) ¬ ( ∃ x P ( x )) ↔ ∀ x ¬ P ( x ) Colin Stirling (Informatics) Discrete Mathematics (Chap 1) Today 10 / 30

  27. Quantifier Rule Rule of inference ∀ x P ( x ) v is a value in assumed domain P ( v ) From ∀ x P ( x ) is true infer that P ( v ) is true for any value v in the assumed domain ¬ ( ∀ x P ( x )) ↔ ∃ x ¬ P ( x ) ¬ ( ∃ x P ( x )) ↔ ∀ x ¬ P ( x ) It is not the case that for all x P ( x ) if, and only if, P ( x ) is not true for some x Colin Stirling (Informatics) Discrete Mathematics (Chap 1) Today 10 / 30

  28. Quantifier Rule Rule of inference ∀ x P ( x ) v is a value in assumed domain P ( v ) From ∀ x P ( x ) is true infer that P ( v ) is true for any value v in the assumed domain ¬ ( ∀ x P ( x )) ↔ ∃ x ¬ P ( x ) ¬ ( ∃ x P ( x )) ↔ ∀ x ¬ P ( x ) It is not the case that for all x P ( x ) if, and only if, P ( x ) is not true for some x We always assume that a domain is nonempty Colin Stirling (Informatics) Discrete Mathematics (Chap 1) Today 10 / 30

  29. Our example From All cats have whiskers and Sansa is a cat derive Sansa has whiskers Colin Stirling (Informatics) Discrete Mathematics (Chap 1) Today 11 / 30

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend