Logic and Sql - Logic and SQL Propositions and Predicates...

Info iconThis preview shows pages 1–11. Sign up to view the full content.

View Full Document Right Arrow Icon
Logic and SQL
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Propositions and Predicates Proposition A statement that evaluates unconditionally to TRUE or FALSE Predicate A truth valued function A function that when invoked or “instantiated” returns a truth value (TRUE or FALSE) Every Proposition is a Predicate The reverse is not true
Background image of page 2
Simple and Compound Simple Single Logical Predicate or Proposition - No Logical Connectives or Operators Compound Multiple Logical Predicates or Propositions - Connected by Logical Connectives or Operators
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Truth Tables p NOT p T F F T p q p and q p or q p implies q p equiv q T T T T T T
Background image of page 4
Monadic and Dyadic Monadic Has one parameter or argument Dyadic Has two parameters or arguments A monadic Predicate has one argument A dyadic Predicate has two arguments These terms do not have to do with the number of connectives used Just the number of parameters or arguments
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Implies Implies is sometimes thought of as: IF p then q Do not confuse this with natural language or what you think of in programming p implies q is often stated as IF p Then q where p is considered to be an antecedent and q is a consequent The arguments around a logical connective are context independent In Logic the antecedent and consequent are context independent truth values
Background image of page 6
Examples IF (Mars has two moons) then (Venus is between Earth and Mercury) p = (Mars has two moons) is TRUE q = (Venus is between Earth and Mercury) is TRUE From the truth table p implies q is true BUT, one has nothing to do with the other
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
AND “I was seriously disappointed and I voted for a change in leadership” “I voted for a change in leadership and I was seriously disappointed” p and q Clearly not the same meaning Context Dependent vs Context Independent
Background image of page 8
Logic and Natural Language (Computer Language Sometimes) Logic and Language are not the same thing Logic Connectives are Formally Defined Causes “understanding” issues IF (Jupiter is a star) THEN (Mars has two moons) is TRUE By the Truth Tables - But Jupiter is certainly not a star IF p THEN q is Logically Equivalent to: NOT(p) or q
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
A Database Example A constraint All RED parts must be stored in London
Background image of page 10
Image of page 11
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 06/20/2011 for the course CSC CSC5921 taught by Professor Albert during the Spring '11 term at University of Colorado Denver.

Page1 / 35

Logic and Sql - Logic and SQL Propositions and Predicates...

This preview shows document pages 1 - 11. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online