SlideShare a Scribd company logo
1 of 24
1
Predicate Logic
Rosen 6th ed., § 1.3-1.4
2
Predicate Logic
• Predicate logic is an extension of
propositional logic that permits concisely
reasoning about whole classes of entities.
E.g., “x>1”, “x+y=10”
• Such statements are neither true or false
when the values of the variables are not
specified.
3
Applications of Predicate Logic
• It is the formal notation for writing perfectly
clear, concise, and unambiguous
mathematical definitions, axioms, and
theorems for any branch of mathematics.
• Supported by some of the more
sophisticated database query engines.
• Basis for automatic theorem provers and
many other Artificial Intelligence systems.
4
Subjects and Predicates
• The proposition
“The dog is sleeping”
has two parts:
° “the dog” denotes the subject - the object or
entity that the sentence is about.
° “is sleeping” denotes the predicate- a property
that the subject can have.
5
Propositional Functions
• A predicate is modeled as a function P(·) from
objects to propositions.
° P(x) = “x is sleeping” (where x is any object).
• The result of applying a predicate P to an object
x=a is the proposition P(a).
° e.g. if P(x) = “x > 1”,
then P(3) is the proposition “3 is greater than 1.”
• Note: The predicate P itself (e.g. P=“is sleeping”)
is not a proposition (not a complete sentence).
6
Propositional Functions
• Predicate logic includes propositional
functions of any number of arguments.
e.g. let P(x,y,z) = “x gave y the grade z”,
x=“Mike”, y=“Mary”, z=“A”,
P(x,y,z) = “Mike gave Mary the grade A.”
7
Universe of Discourse
• The collection of values that a variable x
can take is called x’s universe of discourse.
e.g., let P(x)=“x+1>x”.
we could define the course of universe as
the set of integers.
8
Quantifier Expressions
• Quantifiers allow us to quantify (count) how many
objects in the universe of discourse satisfy a given
predicate:
- “” is the FORLL or universal quantifier.
x P(x) means for all x in the u.d., P holds.
- “” is the XISTS or existential quantifier.
x P(x) means there exists an x in the u.d. (that
is, one or more) such that P(x) is true.
9
Universal Quantifier : Example
• Let P(x) be the predicate “x is full.”
• Let the u.d. of x be parking spaces at UNR.
• The universal quantification of P(x),
x P(x), is the proposition:
° “All parking spaces at UNR are full.” or
° “Every parking space at UNR is full.” or
° “For each parking space at UNR, that space is full.”
10
The Universal Quantifier 
• To prove that a statement of the form
x P(x) is false, it suffices to find a
counterexample (i.e., one value of x in the
universe of discourse such that P(x) is false)
° e.g., P(x) is the predicate “x>0”
11
Existential Quantifier  Example
• Let P(x) be the predicate “x is full.”
• Let the u.d. of x be parking spaces at UNR.
• The universal quantification of P(x),
x P(x), is the proposition:
° “Some parking space at UNR is full.” or
° “There is a parking space at UNR that is full.” or
° “At least one parking space at UNR is full.”
12
Quantifier Equivalence Laws
• Definitions of quantifiers: If u.d.=a,b,c,…
x P(x)  P(a)  P(b)  P(c)  …
x P(x)  P(a)  P(b)  P(c)  …
• We can prove the following laws:
x P(x)  x P(x)
x P(x)  x P(x)
• Which propositional equivalence laws can
be used to prove this?
13
More Equivalence Laws
• x P(x)  x  P(x)
x P(x)  x  P(x)
• x y P(x,y)  y x P(x,y)
x y P(x,y)  y x P(x,y)
• x (P(x)  Q(x))  (x P(x))  (x Q(x))
x (P(x)  Q(x))  (x P(x))  (x Q(x))
14
Scope of Quantifiers
• The part of a logical expression to which a
quantifier is applied is called the scope of
this quantifier.
e.g., (x P(x))  (y Q(y))
e.g., (x P(x))  (x Q(x))
15
Free and Bound Variables
• An expression like P(x) is said to have a
free variable x (meaning x is undefined).
• A quantifier (either  or ) operates on an
expression having one or more free
variables, and binds one or more of those
variables, to produce an expression having
one or more bound variables.
16
Examples of Binding
• P(x,y) has 2 free variables, x and y.
• x P(x,y) has 1 free variable, and one bound
variable. [which is which?]
• “P(x), where x=3” is another way to bind x.
• An expression with zero free variables is an actual
proposition.
• An expression with one or more free variables is
still only a predicate: x P(x,y)
17
More to Know About Binding
• x x P(x) - x is not a free variable in
x P(x), therefore the x binding isn’t used.
• (x P(x))  Q(x) - The variable x is outside of the
scope of the x quantifier, and is therefore free.
Not a proposition.
• (x P(x))  (x Q(x)) - Legal because there are 2
different x’s!
• Quantifiers bind as loosely as needed:
parenthesize x P(x)  Q(x)
( )
18
Nested Quantifiers
Exist within the scope of other quantifiers
• Let the u.d. of x & y be people.
• Let P(x,y)=“x likes y” (a predicate with 2 f.v.’s)
• Then y P(x,y) = “There is someone whom x
likes.” (a predicate with 1 free variable, x)
• Then x (y P(x,y)) = “Everyone has someone
whom they like.”
(A __________ with ___ free variables.)
19
Order of Quantifiers Is Important!!
If P(x,y)=“x relies upon y,” express the
following in unambiguous English:
x(y P(x,y))=
y(x P(x,y))=
x(y P(x,y))=
y(x P(x,y))=
x(y P(x,y))=
Everyone has someone to rely on.
There’s a poor overworked soul whom
everyone relies upon (including himself)!
There’s some needy person who relies
upon everybody (including himself).
Everyone has someone who relies upon them.
Everyone relies upon everybody,
(including themselves)!
20
Natural language is ambiguous!
• “Everybody likes somebody.”
° For everybody, there is somebody they like,
• x y Likes(x,y)
° or, there is somebody (a popular person) whom
everyone likes?
• y x Likes(x,y)
[Probably more likely.]
21
Notational Conventions
• Consecutive quantifiers of the same type can be
combined: x y z P(x,y,z) 
x,y,z P(x,y,z) or even xyz P(x,y,z)
• Sometimes the universe of discourse is restricted
within the quantification, e.g.,
° x>0 P(x) is shorthand for
“For all x that are greater than zero, P(x).”
° x>0 P(x) is shorthand for
“There is an x greater than zero such that P(x).”
22
Defining New Quantifiers
As per their name, quantifiers can be used to
express that a predicate is true of any given
quantity (number) of objects.
Define !x P(x) to mean “P(x) is true of
exactly one x in the universe of discourse.”
!x P(x)  x (P(x)  y (P(y)  y x))
“There is an x such that P(x), where there is
no y such that P(y) and y is other than x.”
23
Some Number Theory Examples
• Let u.d. = the natural numbers 0, 1, 2, …
• “A number x is even, E(x), if and only if it is
equal to 2 times some other number.”
x (E(x)  (y x=2y))
• “A number is prime, P(x), iff it isn’t the
product of two non-unity numbers.”
x (P(x)  (y,z x=yz  y1  z1))
24
Calculus Example
• Precisely defining the concept of a limit
using quantifiers:
 
   
























|
)
(
|
|
|
:
:
0
:
0
)
(
lim
L
x
f
a
x
x
L
x
f
a
x

More Related Content

What's hot

Foundations of hci the computer
Foundations of hci   the computerFoundations of hci   the computer
Foundations of hci the computerswarna sudha
 
Data science.chapter-1,2,3
Data science.chapter-1,2,3Data science.chapter-1,2,3
Data science.chapter-1,2,3varshakumar21
 
Psychology Human Computer Interaction
Psychology Human Computer InteractionPsychology Human Computer Interaction
Psychology Human Computer InteractionSeta Wicaksana
 
Direct manipulation and virtual environments
Direct manipulation and virtual environmentsDirect manipulation and virtual environments
Direct manipulation and virtual environmentsSanjog Sigdel
 
Introduction to Distributed System
Introduction to Distributed SystemIntroduction to Distributed System
Introduction to Distributed SystemSunita Sahu
 
Human Computer Interaction Introduction
Human Computer Interaction IntroductionHuman Computer Interaction Introduction
Human Computer Interaction IntroductionN.Jagadish Kumar
 
Interaction design and cognitive aspects
Interaction design and cognitive aspects Interaction design and cognitive aspects
Interaction design and cognitive aspects Andres Baravalle
 
Human Computer Interaction Notes 176.pdf
Human Computer Interaction Notes 176.pdfHuman Computer Interaction Notes 176.pdf
Human Computer Interaction Notes 176.pdfvijaykumarK44
 
Introduction to Distributed System
Introduction to Distributed SystemIntroduction to Distributed System
Introduction to Distributed SystemRKGhosh3
 
HCI 3e - Ch 3: The interaction
HCI 3e - Ch 3:  The interactionHCI 3e - Ch 3:  The interaction
HCI 3e - Ch 3: The interactionAlan Dix
 
HCI 3e - Ch 10: Universal design
HCI 3e - Ch 10:  Universal designHCI 3e - Ch 10:  Universal design
HCI 3e - Ch 10: Universal designAlan Dix
 
5.1 mining data streams
5.1 mining data streams5.1 mining data streams
5.1 mining data streamsKrish_ver2
 
CSI-503 - 11.Distributed Operating System
CSI-503 - 11.Distributed Operating SystemCSI-503 - 11.Distributed Operating System
CSI-503 - 11.Distributed Operating Systemghayour abbas
 
FUTURE OF DATA SCIENCE IN INDIA
FUTURE OF DATA SCIENCE IN INDIAFUTURE OF DATA SCIENCE IN INDIA
FUTURE OF DATA SCIENCE IN INDIAkaranramani4
 

What's hot (20)

Foundations of hci the computer
Foundations of hci   the computerFoundations of hci   the computer
Foundations of hci the computer
 
Data science.chapter-1,2,3
Data science.chapter-1,2,3Data science.chapter-1,2,3
Data science.chapter-1,2,3
 
Psychology Human Computer Interaction
Psychology Human Computer InteractionPsychology Human Computer Interaction
Psychology Human Computer Interaction
 
Direct manipulation and virtual environments
Direct manipulation and virtual environmentsDirect manipulation and virtual environments
Direct manipulation and virtual environments
 
Introduction to Distributed System
Introduction to Distributed SystemIntroduction to Distributed System
Introduction to Distributed System
 
Human Computer Interaction Introduction
Human Computer Interaction IntroductionHuman Computer Interaction Introduction
Human Computer Interaction Introduction
 
Unit 1
Unit 1Unit 1
Unit 1
 
Interaction design and cognitive aspects
Interaction design and cognitive aspects Interaction design and cognitive aspects
Interaction design and cognitive aspects
 
Cloud Service Models
Cloud Service ModelsCloud Service Models
Cloud Service Models
 
Human Computer Interaction Notes 176.pdf
Human Computer Interaction Notes 176.pdfHuman Computer Interaction Notes 176.pdf
Human Computer Interaction Notes 176.pdf
 
Introduction to Distributed System
Introduction to Distributed SystemIntroduction to Distributed System
Introduction to Distributed System
 
HCI 3e - Ch 3: The interaction
HCI 3e - Ch 3:  The interactionHCI 3e - Ch 3:  The interaction
HCI 3e - Ch 3: The interaction
 
HCI 3e - Ch 10: Universal design
HCI 3e - Ch 10:  Universal designHCI 3e - Ch 10:  Universal design
HCI 3e - Ch 10: Universal design
 
Unit 4
Unit 4Unit 4
Unit 4
 
5.1 mining data streams
5.1 mining data streams5.1 mining data streams
5.1 mining data streams
 
HCI Presentation
HCI PresentationHCI Presentation
HCI Presentation
 
CSI-503 - 11.Distributed Operating System
CSI-503 - 11.Distributed Operating SystemCSI-503 - 11.Distributed Operating System
CSI-503 - 11.Distributed Operating System
 
FUTURE OF DATA SCIENCE IN INDIA
FUTURE OF DATA SCIENCE IN INDIAFUTURE OF DATA SCIENCE IN INDIA
FUTURE OF DATA SCIENCE IN INDIA
 
Current Forensic Tools
Current Forensic Tools Current Forensic Tools
Current Forensic Tools
 
1.intro. to distributed system
1.intro. to distributed system1.intro. to distributed system
1.intro. to distributed system
 

Similar to PredicateLogic.pptx

Lecture 2 predicates quantifiers and rules of inference
Lecture 2 predicates quantifiers and rules of inferenceLecture 2 predicates quantifiers and rules of inference
Lecture 2 predicates quantifiers and rules of inferenceasimnawaz54
 
Predicates and Quantifiers
Predicates and QuantifiersPredicates and Quantifiers
Predicates and Quantifiersblaircomp2003
 
Discrete Structure Lecture #5 & 6.pdf
Discrete Structure Lecture #5 & 6.pdfDiscrete Structure Lecture #5 & 6.pdf
Discrete Structure Lecture #5 & 6.pdfMuhammadUmerIhtisham
 
Chapter 01 - p2.pdf
Chapter 01 - p2.pdfChapter 01 - p2.pdf
Chapter 01 - p2.pdfsmarwaneid
 
Predicates and Quantifiers
Predicates and Quantifiers Predicates and Quantifiers
Predicates and Quantifiers Istiak Ahmed
 
Predicates and quantifiers
Predicates and quantifiersPredicates and quantifiers
Predicates and quantifiersIstiak Ahmed
 
Quantifiers and its Types
Quantifiers and its TypesQuantifiers and its Types
Quantifiers and its TypesHumayunNaseer4
 
Predicates and quantifiers presentation topics
Predicates  and quantifiers  presentation topicsPredicates  and quantifiers  presentation topics
Predicates and quantifiers presentation topicsR.h. Himel
 
Predicate logic_2(Artificial Intelligence)
Predicate logic_2(Artificial Intelligence)Predicate logic_2(Artificial Intelligence)
Predicate logic_2(Artificial Intelligence)SHUBHAM KUMAR GUPTA
 
Unit 1 quantifiers
Unit 1  quantifiersUnit 1  quantifiers
Unit 1 quantifiersraksharao
 
Probability statistics assignment help
Probability statistics assignment helpProbability statistics assignment help
Probability statistics assignment helpHomeworkAssignmentHe
 
SESSION-11 PPT.pptx
SESSION-11 PPT.pptxSESSION-11 PPT.pptx
SESSION-11 PPT.pptxNaniSarath
 

Similar to PredicateLogic.pptx (20)

Lecture 2 predicates quantifiers and rules of inference
Lecture 2 predicates quantifiers and rules of inferenceLecture 2 predicates quantifiers and rules of inference
Lecture 2 predicates quantifiers and rules of inference
 
Predicates and Quantifiers
Predicates and QuantifiersPredicates and Quantifiers
Predicates and Quantifiers
 
Discrete Structure Lecture #5 & 6.pdf
Discrete Structure Lecture #5 & 6.pdfDiscrete Structure Lecture #5 & 6.pdf
Discrete Structure Lecture #5 & 6.pdf
 
Chapter 01 - p2.pdf
Chapter 01 - p2.pdfChapter 01 - p2.pdf
Chapter 01 - p2.pdf
 
X02PredCalculus.ppt
X02PredCalculus.pptX02PredCalculus.ppt
X02PredCalculus.ppt
 
Quantifier
QuantifierQuantifier
Quantifier
 
Formal Logic - Lesson 8 - Predicates and Quantifiers
Formal Logic - Lesson 8 - Predicates and QuantifiersFormal Logic - Lesson 8 - Predicates and Quantifiers
Formal Logic - Lesson 8 - Predicates and Quantifiers
 
Predicate & quantifier
Predicate & quantifierPredicate & quantifier
Predicate & quantifier
 
Per3 logika
Per3 logikaPer3 logika
Per3 logika
 
Predicates and Quantifiers
Predicates and Quantifiers Predicates and Quantifiers
Predicates and Quantifiers
 
Predicates and quantifiers
Predicates and quantifiersPredicates and quantifiers
Predicates and quantifiers
 
Module_5_1.pptx
Module_5_1.pptxModule_5_1.pptx
Module_5_1.pptx
 
Quantifiers and its Types
Quantifiers and its TypesQuantifiers and its Types
Quantifiers and its Types
 
Universal Quantification DM
Universal Quantification DMUniversal Quantification DM
Universal Quantification DM
 
Predicates and quantifiers presentation topics
Predicates  and quantifiers  presentation topicsPredicates  and quantifiers  presentation topics
Predicates and quantifiers presentation topics
 
Predicate logic_2(Artificial Intelligence)
Predicate logic_2(Artificial Intelligence)Predicate logic_2(Artificial Intelligence)
Predicate logic_2(Artificial Intelligence)
 
Quantification
QuantificationQuantification
Quantification
 
Unit 1 quantifiers
Unit 1  quantifiersUnit 1  quantifiers
Unit 1 quantifiers
 
Probability statistics assignment help
Probability statistics assignment helpProbability statistics assignment help
Probability statistics assignment help
 
SESSION-11 PPT.pptx
SESSION-11 PPT.pptxSESSION-11 PPT.pptx
SESSION-11 PPT.pptx
 

Recently uploaded

Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 

Recently uploaded (20)

Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 

PredicateLogic.pptx

  • 1. 1 Predicate Logic Rosen 6th ed., § 1.3-1.4
  • 2. 2 Predicate Logic • Predicate logic is an extension of propositional logic that permits concisely reasoning about whole classes of entities. E.g., “x>1”, “x+y=10” • Such statements are neither true or false when the values of the variables are not specified.
  • 3. 3 Applications of Predicate Logic • It is the formal notation for writing perfectly clear, concise, and unambiguous mathematical definitions, axioms, and theorems for any branch of mathematics. • Supported by some of the more sophisticated database query engines. • Basis for automatic theorem provers and many other Artificial Intelligence systems.
  • 4. 4 Subjects and Predicates • The proposition “The dog is sleeping” has two parts: ° “the dog” denotes the subject - the object or entity that the sentence is about. ° “is sleeping” denotes the predicate- a property that the subject can have.
  • 5. 5 Propositional Functions • A predicate is modeled as a function P(·) from objects to propositions. ° P(x) = “x is sleeping” (where x is any object). • The result of applying a predicate P to an object x=a is the proposition P(a). ° e.g. if P(x) = “x > 1”, then P(3) is the proposition “3 is greater than 1.” • Note: The predicate P itself (e.g. P=“is sleeping”) is not a proposition (not a complete sentence).
  • 6. 6 Propositional Functions • Predicate logic includes propositional functions of any number of arguments. e.g. let P(x,y,z) = “x gave y the grade z”, x=“Mike”, y=“Mary”, z=“A”, P(x,y,z) = “Mike gave Mary the grade A.”
  • 7. 7 Universe of Discourse • The collection of values that a variable x can take is called x’s universe of discourse. e.g., let P(x)=“x+1>x”. we could define the course of universe as the set of integers.
  • 8. 8 Quantifier Expressions • Quantifiers allow us to quantify (count) how many objects in the universe of discourse satisfy a given predicate: - “” is the FORLL or universal quantifier. x P(x) means for all x in the u.d., P holds. - “” is the XISTS or existential quantifier. x P(x) means there exists an x in the u.d. (that is, one or more) such that P(x) is true.
  • 9. 9 Universal Quantifier : Example • Let P(x) be the predicate “x is full.” • Let the u.d. of x be parking spaces at UNR. • The universal quantification of P(x), x P(x), is the proposition: ° “All parking spaces at UNR are full.” or ° “Every parking space at UNR is full.” or ° “For each parking space at UNR, that space is full.”
  • 10. 10 The Universal Quantifier  • To prove that a statement of the form x P(x) is false, it suffices to find a counterexample (i.e., one value of x in the universe of discourse such that P(x) is false) ° e.g., P(x) is the predicate “x>0”
  • 11. 11 Existential Quantifier  Example • Let P(x) be the predicate “x is full.” • Let the u.d. of x be parking spaces at UNR. • The universal quantification of P(x), x P(x), is the proposition: ° “Some parking space at UNR is full.” or ° “There is a parking space at UNR that is full.” or ° “At least one parking space at UNR is full.”
  • 12. 12 Quantifier Equivalence Laws • Definitions of quantifiers: If u.d.=a,b,c,… x P(x)  P(a)  P(b)  P(c)  … x P(x)  P(a)  P(b)  P(c)  … • We can prove the following laws: x P(x)  x P(x) x P(x)  x P(x) • Which propositional equivalence laws can be used to prove this?
  • 13. 13 More Equivalence Laws • x P(x)  x  P(x) x P(x)  x  P(x) • x y P(x,y)  y x P(x,y) x y P(x,y)  y x P(x,y) • x (P(x)  Q(x))  (x P(x))  (x Q(x)) x (P(x)  Q(x))  (x P(x))  (x Q(x))
  • 14. 14 Scope of Quantifiers • The part of a logical expression to which a quantifier is applied is called the scope of this quantifier. e.g., (x P(x))  (y Q(y)) e.g., (x P(x))  (x Q(x))
  • 15. 15 Free and Bound Variables • An expression like P(x) is said to have a free variable x (meaning x is undefined). • A quantifier (either  or ) operates on an expression having one or more free variables, and binds one or more of those variables, to produce an expression having one or more bound variables.
  • 16. 16 Examples of Binding • P(x,y) has 2 free variables, x and y. • x P(x,y) has 1 free variable, and one bound variable. [which is which?] • “P(x), where x=3” is another way to bind x. • An expression with zero free variables is an actual proposition. • An expression with one or more free variables is still only a predicate: x P(x,y)
  • 17. 17 More to Know About Binding • x x P(x) - x is not a free variable in x P(x), therefore the x binding isn’t used. • (x P(x))  Q(x) - The variable x is outside of the scope of the x quantifier, and is therefore free. Not a proposition. • (x P(x))  (x Q(x)) - Legal because there are 2 different x’s! • Quantifiers bind as loosely as needed: parenthesize x P(x)  Q(x) ( )
  • 18. 18 Nested Quantifiers Exist within the scope of other quantifiers • Let the u.d. of x & y be people. • Let P(x,y)=“x likes y” (a predicate with 2 f.v.’s) • Then y P(x,y) = “There is someone whom x likes.” (a predicate with 1 free variable, x) • Then x (y P(x,y)) = “Everyone has someone whom they like.” (A __________ with ___ free variables.)
  • 19. 19 Order of Quantifiers Is Important!! If P(x,y)=“x relies upon y,” express the following in unambiguous English: x(y P(x,y))= y(x P(x,y))= x(y P(x,y))= y(x P(x,y))= x(y P(x,y))= Everyone has someone to rely on. There’s a poor overworked soul whom everyone relies upon (including himself)! There’s some needy person who relies upon everybody (including himself). Everyone has someone who relies upon them. Everyone relies upon everybody, (including themselves)!
  • 20. 20 Natural language is ambiguous! • “Everybody likes somebody.” ° For everybody, there is somebody they like, • x y Likes(x,y) ° or, there is somebody (a popular person) whom everyone likes? • y x Likes(x,y) [Probably more likely.]
  • 21. 21 Notational Conventions • Consecutive quantifiers of the same type can be combined: x y z P(x,y,z)  x,y,z P(x,y,z) or even xyz P(x,y,z) • Sometimes the universe of discourse is restricted within the quantification, e.g., ° x>0 P(x) is shorthand for “For all x that are greater than zero, P(x).” ° x>0 P(x) is shorthand for “There is an x greater than zero such that P(x).”
  • 22. 22 Defining New Quantifiers As per their name, quantifiers can be used to express that a predicate is true of any given quantity (number) of objects. Define !x P(x) to mean “P(x) is true of exactly one x in the universe of discourse.” !x P(x)  x (P(x)  y (P(y)  y x)) “There is an x such that P(x), where there is no y such that P(y) and y is other than x.”
  • 23. 23 Some Number Theory Examples • Let u.d. = the natural numbers 0, 1, 2, … • “A number x is even, E(x), if and only if it is equal to 2 times some other number.” x (E(x)  (y x=2y)) • “A number is prime, P(x), iff it isn’t the product of two non-unity numbers.” x (P(x)  (y,z x=yz  y1  z1))
  • 24. 24 Calculus Example • Precisely defining the concept of a limit using quantifiers:                               | ) ( | | | : : 0 : 0 ) ( lim L x f a x x L x f a x