FUZZY LOGIC - Lehrstuhl für Automatentheorie · · 2012-11-06About the Course Course Material...
Transcript of FUZZY LOGIC - Lehrstuhl für Automatentheorie · · 2012-11-06About the Course Course Material...
About the Course
Course Material• Metamathematics of Fuzzy Logic by Petr Hájek
• available on course website:– Slides– Lecture Notes (from a previous semester)– Exercise Sheets
Contact Information• [email protected]• lat.inf.tu-dresden.de/teaching/ws2012-2012/FL/
ExamsOral exams at the end of the semester or during semester break
TU Dresden, WS 2012/13 Fuzzy Logic Slide 2
Classical Logic
• suited for properties that are– identifiable,– distinct,– clear-cut.
• Examples:– days of the week,– marital status,– . . .
TU Dresden, WS 2012/13 Fuzzy Logic Slide 3
Imprecise Knowledge
Is Italy a small country?
Depends.
Other examples for fuzzy proper-ties
• old
• warm
• tall
• . . .
TU Dresden, WS 2012/13 Fuzzy Logic Slide 4
Imprecise Knowledge
Is Italy a small country?Depends.
Other examples for fuzzy proper-ties
• old
• warm
• tall
• . . .
TU Dresden, WS 2012/13 Fuzzy Logic Slide 4
Imprecise Knowledge
Is Italy a small country?Depends.
Other examples for fuzzy proper-ties
• old
• warm
• tall
• . . .
TU Dresden, WS 2012/13 Fuzzy Logic Slide 4
Degrees of Membership
large
0 2 4 6 8 10 12 14 16
0
0.2
0.4
0.6
0.8
1
area in 106 km2
trut
hde
gree
TU Dresden, WS 2012/13 Fuzzy Logic Slide 5
Degrees of Membership
warm
0 5 10 15 20 25 30
0
0.2
0.4
0.6
0.8
1
temperature in ◦C
trut
hde
gree
TU Dresden, WS 2012/13 Fuzzy Logic Slide 6
Crisp vs. Fuzzy Logics
• Crisp Logics: Only truth values 1 and 0.=⇒ characteristic function
• Fuzzy Logics: Truth values from the interval [0, 1].=⇒ membership function
TU Dresden, WS 2012/13 Fuzzy Logic Slide 7
Fuzzy vs. Probabilistic Logics
Both use truth values
• Fuzzy Logics: vagueness– statement is neither completely true nor false– e.g. “The Dresden TV Tower is a tall building.”
• Probabilistic Logics: belief or uncertainty– statement is either true nor false, but outcome unknown– e.g. “Tomorrow it will rain.”
TU Dresden, WS 2012/13 Fuzzy Logic Slide 8
Question
How to interpret conjunction?For the country of Turkey we might have:
• membership in Huge: 0.046,
• membership in Asian: 0.969
What is the membership degree of Turkey in Huge u Asian?
Possible choices• Minimum of 0.046 and 0.969
• Product of 0.046 and 0.969
• . . .
=⇒ There is not just one fuzzy logic!
TU Dresden, WS 2012/13 Fuzzy Logic Slide 9
Question
How to interpret conjunction?For the country of Turkey we might have:
• membership in Huge: 0.046,
• membership in Asian: 0.969
What is the membership degree of Turkey in Huge u Asian?
Possible choices• Minimum of 0.046 and 0.969
• Product of 0.046 and 0.969
• . . .
=⇒ There is not just one fuzzy logic!
TU Dresden, WS 2012/13 Fuzzy Logic Slide 9
Generalize Operators
Classical logical operators, such as
• conjunction,
• disjunction,
• negation, and
• implication
need to be generalized.Generalizations should be
• truth functional
• “behave well” logically (e.g. conjunction should be associative, commutative,etc.)
TU Dresden, WS 2012/13 Fuzzy Logic Slide 10
t-Norms
DefinitionBinary operator ⊗ : [0, 1]× [0, 1]→ [0, 1]
• associative,
• commutative,
• monotone, and
• has unit 1.
TU Dresden, WS 2012/13 Fuzzy Logic Slide 11
Continuous t-norms
Fundamental continuous t-normsGödel: x ⊗ y = min(x, y)
Product: x ⊗ y = x · yŁukasiewicz: x ⊗ y = max(0, x + y − 1)
00.2
0.40.6
0.81 0
0.2
0.4
0.6
0.8
1
0
0.2
0.4
0.6
0.8
x ⊗ y
x
y
TU Dresden, WS 2012/13 Fuzzy Logic Slide 12
Continuous t-norms
Fundamental continuous t-normsGödel: x ⊗ y = min(x, y)
Product: x ⊗ y = x · y
Łukasiewicz: x ⊗ y = max(0, x + y − 1)
00.2
0.40.6
0.81 0
0.2
0.4
0.6
0.8
1
0
0.2
0.4
0.6
0.8
x ⊗ y
x
y
TU Dresden, WS 2012/13 Fuzzy Logic Slide 12
Continuous t-norms
Fundamental continuous t-normsGödel: x ⊗ y = min(x, y)
Product: x ⊗ y = x · yŁukasiewicz: x ⊗ y = max(0, x + y − 1)
00.2
0.40.6
0.81 0
0.2
0.4
0.6
0.8
1
0
0.2
0.4
0.6
0.8
x
y
x ⊗ y
TU Dresden, WS 2012/13 Fuzzy Logic Slide 12
Truth Functions for Boolean Connectives
Connective Truth Function Definition
conjunction (&) t-norm (⊗) associative, commutative, monotone,unit 1, (usually also continuous)
implication (→) ?negation (¬) ?disjunction (∨) ?
TU Dresden, WS 2012/13 Fuzzy Logic Slide 13
Generalizing Modus Ponens
Modus Ponens in the Crisp Caseφ ∧ (φ→ ψ) then ψ.
Fuzzy Generalization of Modus Ponensx ⊗ (x ⇒ y)︸ ︷︷ ︸
z
≤ y
ResiduumChoose z maximal with this property:
x ⇒ y = max{z | x ⊗ z ≤ y}
TU Dresden, WS 2012/13 Fuzzy Logic Slide 14
Uniqueness of Residuum
Lemma 1.2For every continous t-norm ⊗
x ⇒ y = max{z | x ⊗ z ≤ y}
is the unique operator satisfying
z ≤ x ⇒ y iff x ⊗ z ≤ y
TU Dresden, WS 2012/13 Fuzzy Logic Slide 15
Truth Functions for Boolean Connectives
Connective Truth Function Definition
conjunction (&) t-norm (⊗) associative, commutative, monotone,unit 1, (usually also continuous)
implication (→) residuum (⇒) x ⊗ y ≤ z iff y ≤ x ⇒ z
negation (¬) precomplement x ⇒ 0
disjunction (∨) ?
TU Dresden, WS 2012/13 Fuzzy Logic Slide 16
Ordinal Sums
DefinitionGiven (ai , bi), i ∈ I family disjoint open intervals, ⊗i , i ∈ I family of t-norms
x ⊗ y =
{s−1
i
(si(x)⊗i si(y)
)if x, y ∈ (ai , bi)
min{x, y} otherwise
wheresi(x) =
x − ai
bi − ai
is the ordinal sum∑
i∈I(⊗i , ai , bi).
TU Dresden, WS 2012/13 Fuzzy Logic Slide 17
Plots of Ordinal Sums
x0 0.3 0.7 1
0
0.3
0.7
1y
Product
Łukasiewicz
Gödel
Gödel
Gödel
TU Dresden, WS 2012/13 Fuzzy Logic Slide 18
Plots of Ordinal Sums
x0 0.3 0.7 1
0
0.3
0.7
1y
Product
Łukasiewicz
Gödel
Gödel
Gödel
TU Dresden, WS 2012/13 Fuzzy Logic Slide 18
Plots of Ordinal Sums
x0 0.3 0.7 1
0
0.3
0.7
1y
Product
Łukasiewicz
Gödel
Gödel
Gödel
TU Dresden, WS 2012/13 Fuzzy Logic Slide 18
Plots of Ordinal Sums
x0 0.3 0.7 1
0
0.3
0.7
1y
Product
Łukasiewicz
Gödel
Gödel
Gödel
TU Dresden, WS 2012/13 Fuzzy Logic Slide 18
Plots of Ordinal Sums
x0 0.3 0.7 1
0
0.3
0.7
1y
Product
Łukasiewicz
Gödel
Gödel
Gödel
TU Dresden, WS 2012/13 Fuzzy Logic Slide 18
Plots of Ordinal Sums
00.2
0.40.6
0.81 0
0.2
0.4
0.6
0.8
1
0
0.2
0.4
0.6
0.8
x
y
x ⊗ y
TU Dresden, WS 2012/13 Fuzzy Logic Slide 18
Isomorphisms between t-norms
Isomorphic t-normsIf there is s is a bijective, monotone function
s : [0, 1]→ [0, 1]
satisfyingx ⊗1 y = s−1(s(x)⊗2 s(y)
)then ⊗1 and ⊗2 are called isomorphic.
TU Dresden, WS 2012/13 Fuzzy Logic Slide 19
Isomorphic t-norms
00.2
0.40.6
0.81 0
0.2
0.4
0.6
0.8
1
0
0.2
0.4
0.6
0.8
x
y
x ⊗ y
Łukasiewicz t-norm (aka 1st Schweizer-Sklar t-norm)
x ⊗ y = max{x + y − 1, 0}
TU Dresden, WS 2012/13 Fuzzy Logic Slide 20
Isomorphic t-norms
00.2
0.40.6
0.81 0
0.2
0.4
0.6
0.8
1
0
0.2
0.4
0.6
0.8
x ⊗ y
x
y
2nd Schweizer-Sklar t-norm
x ⊗ y =√
max{x2 + y2 − 1, 0}
TU Dresden, WS 2012/13 Fuzzy Logic Slide 20
Basic Logic
SyntaxP countable set of propositional variables, ⊗ continuous t-norm.Formulas of PC(⊗) are
• 0,
• p,
• f1 & f2, and
• f1 → f2.
SemanticsValuation V : P → [0, 1]
Zero V(0) = 0,
Strong Conjunction V(φ&ψ) = V(φ)⊗ V(ψ),Implication V(φ→ ψ) = V(φ)⇒ V(ψ).
TU Dresden, WS 2012/13 Fuzzy Logic Slide 21
Abbreviations
Weak Conjunction φ ∧ ψ := φ&(φ→ ψ),
Weak Disjunction φ ∨ ψ :=((φ→ ψ)→ ψ
)∧((ψ → φ)→ φ
)Negation ¬φ := φ→ 0
Equivalence φ ≡ ψ := (φ→ ψ)&(ψ → φ)
One 1 := 0→ 0.
TU Dresden, WS 2012/13 Fuzzy Logic Slide 22
1-Tautologies
Formula φ such thatV(φ) = 1
for every valuation V.
TU Dresden, WS 2012/13 Fuzzy Logic Slide 23
Different t-Norms, Different 1-Tautologies
¬¬φ→ φ
• Łukasiewicz:
V(¬¬φ→ φ) = V(φ)⇒ V(φ)= 1−
(1− V(φ)
)⇒ V(φ)
= V(φ)⇒ V(φ)= 1
1-tautology for Łukasiewicz
• Gödel or Product: Not a 1-tautology! Assume V(φ) = 0.5, then
V(¬¬φ→ φ) = V(φ)⇒ V(φ)= 0⇒ V(φ)= 1⇒ 0.5 = 0.5
TU Dresden, WS 2012/13 Fuzzy Logic Slide 24
Different t-Norms, Different 1-Tautologies
¬¬φ→ φ
• Łukasiewicz:
V(¬¬φ→ φ) = V(φ)⇒ V(φ)= 1−
(1− V(φ)
)⇒ V(φ)
= V(φ)⇒ V(φ)= 1
1-tautology for Łukasiewicz
• Gödel or Product: Not a 1-tautology! Assume V(φ) = 0.5, then
V(¬¬φ→ φ) = V(φ)⇒ V(φ)= 0⇒ V(φ)= 1⇒ 0.5 = 0.5
TU Dresden, WS 2012/13 Fuzzy Logic Slide 24
Different t-Norms, Different 1-Tautologies
¬¬φ→ φ
• Łukasiewicz:
V(¬¬φ→ φ) = V(φ)⇒ V(φ)= 1−
(1− V(φ)
)⇒ V(φ)
= V(φ)⇒ V(φ)= 1
1-tautology for Łukasiewicz
• Gödel or Product: Not a 1-tautology! Assume V(φ) = 0.5, then
V(¬¬φ→ φ) = V(φ)⇒ V(φ)= 0⇒ V(φ)= 1⇒ 0.5 = 0.5
TU Dresden, WS 2012/13 Fuzzy Logic Slide 24
1-Tautologies for all t-Norms
1-tautologiesfor ⊗Ł
1-tautologiesfor ⊗min
1-tautologiesfor ⊗Π
We are interested in 1-tautologies for all t-norms.
TU Dresden, WS 2012/13 Fuzzy Logic Slide 25
1-Tautologies for all t-Norms
1-tautologiesfor ⊗Ł
1-tautologiesfor ⊗min
1-tautologiesfor ⊗Π
We are interested in 1-tautologies for all t-norms.
TU Dresden, WS 2012/13 Fuzzy Logic Slide 25
Axioms of Basic Logic
(A1) (φ→ ψ)→((ψ → χ)→ (φ→ χ)
)(A2) φ&ψ → φ
(A3) φ&ψ → ψ&φ
(A4) φ&(φ→ ψ)→ ψ&(ψ → φ)
(A5)(φ→ (ψ → χ)
)→ (φ&ψ → χ)
(A6) (φ&ψ → χ)→(φ→ (ψ → χ)
)(A7)
((φ→ ψ)→ χ
)→
(((ψ → φ)→ χ
)→ χ
)(A8) 0→ φ
• Deduction Rule: Modus Ponens
TU Dresden, WS 2012/13 Fuzzy Logic Slide 26
Proofs in Basic Logic
InstantiationSubstitution arbitrary formulae for variable names, e.g.
(ρ→ σ)&ψ → (ρ→ σ)
is obtained from φ&ψ → φ by substituting ρ→ σ for φ.
Application of Modus PonensBL ` ρ&σ → σ& ρ Instance of (A3)
BL ` (ρ&σ → σ& ρ)→((σ& ρ→ σ)→ (ρ&σ → σ)
)Instance of (A1)
BL ` (σ& ρ→ σ)→ (ρ&σ → σ) modus ponens
BL ` σ& ρ→ σ Instance of (A2)
BL ` ρ&σ → σ modus ponens
TU Dresden, WS 2012/13 Fuzzy Logic Slide 27
Proofs in Basic Logic
InstantiationSubstitution arbitrary formulae for variable names, e.g.
(ρ→ σ)&ψ → (ρ→ σ)
is obtained from φ&ψ → φ by substituting ρ→ σ for φ.
Application of Modus PonensBL ` ρ&σ → σ& ρ Instance of (A3)
BL ` (ρ&σ → σ& ρ)→((σ& ρ→ σ)→ (ρ&σ → σ)
)Instance of (A1)
BL ` (σ& ρ→ σ)→ (ρ&σ → σ) modus ponens
BL ` σ& ρ→ σ Instance of (A2)
BL ` ρ&σ → σ modus ponens
TU Dresden, WS 2012/13 Fuzzy Logic Slide 27
Goal
1-tautologiesfor ⊗Ł
1-tautologiesfor ⊗min
1-tautologiesfor ⊗Π
=BL?
TU Dresden, WS 2012/13 Fuzzy Logic Slide 28