Lecture 10

Many-valued Logic

Johannes Korbmacher Lecture slides

Logical methods for AI

Many-valued Logic

Lecture 10

What you’ll be able to do

Bivalence

Every formula has value 0 or 1.

mv_db_understandIt's me again. Turnsout you also need 3-valued logic to understand me..

Missing information: no language recorded for Zimbabwe.

mv_ai_warmC°

Vagueness: is 20°C warm? And 19.999°C?

Missing values

SELECT country FROM LanguageOf
WHERE (language = 'Dutch');

SELECT country FROM LanguageOf
WHERE NOT (language = 'Dutch');
Each run starts with the example database. Powered by sql.js

Enable JavaScript to edit and run this SQL.

The Kleene functions

NOTNOT value
01
ωω
10
AND0ω1
0000
ω0ωω
10ω1
OR0ω1
00ω1
ωωω1
1111

K₃ consequence

1 is the only designated value (glossary, opens in a new tab) here.

mv_kleene-spaceM7M8M9M4M5M6M1M2M3

3² = 9 information states for SUN and RAIN.

The Kleene model space

The examples in the text give the initial values. Enable JavaScript to change them.

Excluded middle and explosion

v(SUN) = ω:

v(SUN ∨ ¬SUN) = ω

All ω gives ω: no tautologies in ¬, ∧, ∨.

No model gives A and ¬A both value 1.

ai_paniekPanik???

Natural deduction for K₃

Classical rules that fail in K₃

Conditional introduction

A → A has value ω when A does.

Negation introduction

¬(B ∧ ¬B) has value ω when B does.

Classical reductio

It would prove C ∨ ¬C, even when C is unknown.

K₃ derivations

Countermodels in SQL

Premises IS TRUE, conclusion IS NOT TRUE: a row is a countermodel.

-- SUN → RAIN, RAIN ∴ SUN
SELECT SUN, RAIN FROM Valuations
WHERE (NOT SUN OR RAIN) IS TRUE
  AND RAIN IS TRUE
  AND SUN IS NOT TRUE;
Each run starts with the example database. Powered by sql.js

Enable JavaScript to edit and run this SQL.

Fuzzy predicates

⟦IsWarm⟧ : ℝ → [0,1],   v(IsWarm(15°C)) = ⟦IsWarm⟧(15°C)

The examples in the text give the initial values. Enable JavaScript to change them.

Combining degrees

The examples in the text give the initial values. Enable JavaScript to change them.

Fuzzy logic

Invalid with v(A) = 0.5 and v(B) = 0

Explosion

v(A) = v(¬A) = 0.5 > 0 = v(B)

Disjunctive syllogism

v(A ∨ B) = v(¬A) = 0.5 > 0 = v(B)

Fuzzy rules

snow_flake

The examples in the text give the initial values. Enable JavaScript to change them.

Sugeno controllers

  • IsCold(x) ↦ 1
  • IsWarm(x) ↦ 0
  • IsHot(x) ↦ 0

Weights 0.4, 0.6, 0: 40% power.

proof_ai_radiatorHEATER-2000

A Sugeno heating controller

The examples in the text give the initial values. Enable JavaScript to change them.

Mamdani controllers

sun

Defuzzification

The examples in the text give the initial values. Enable JavaScript to change them.

Cooling a humid room

The examples in the text give the initial values. Enable JavaScript to change them.