Truth, deduction, computation lecture a

24
Truth, Deduction, Computation Lecture A Intuitionistic logic Vlad Patryshev SCU 2013

description

My logic lectures at SCU Intuitionistic Logic

Transcript of Truth, deduction, computation lecture a

Page 1: Truth, deduction, computation   lecture a

Truth, Deduction, ComputationLecture AIntuitionistic logic

Vlad PatryshevSCU2013

Page 2: Truth, deduction, computation   lecture a

Clean Up the Field

● Nullary functions● Nullary predicates● ⊥ and ⊤ (remember, we have a monoid)● or maybe more? (it depends)

Page 3: Truth, deduction, computation   lecture a

P v ¬P? Really?

● Home(claire) v ¬Home(claire)● How about incomplete logical system?● Or something like probability?● Or properties that change with time● Live or dead?

○ clinical death○ Terry Schiavo

Page 4: Truth, deduction, computation   lecture a

Getting rid of Pv¬P

How do we define P→Q if not via ¬PvQ?

→ Intro P

Q

P→Q

Page 5: Truth, deduction, computation   lecture a

Getting rid of Pv¬P

An even better definition

P∧Q

R

P

Q→R⇔

Page 6: Truth, deduction, computation   lecture a

Digression: Currying

P∧Q ⊢ R ⇔ P ⊢ Q→R

f(x:X, y:Y):Z ⇔ fc(x:X):(Y=>Z)f(x,y) = fc(x)(y)

Page 7: Truth, deduction, computation   lecture a

Digression: Currying - now in JavaFunction2<X,Y,Z> f = new Function2<X,Y,Z>() { public Z apply(X x, Y y) { Z z = /*bla-bla-bla with x and y*/ … return z; }}

Function<X,Function<Y,Z>> fc = curry<X,Y,Z>(f)/* where */

public static curry<X,Y,Z>(final Function2<X,Y,Z> f) { return new Function<X,Function<Y,Z>>() { public Function<Y,Z> apply(final X x) { return new Function<Y,Z>() { public Z apply(Y y) { return f(x,y) } } } }}

Page 8: Truth, deduction, computation   lecture a

Now define ¬

Definition:¬P is the same as P→⊥

1. P∧¬P ⊢ ⊥ …right?

2. ¬¬P ⊢ P …right? can we prove it? how?

3. P ⊢ ¬¬P …right?

4. ¬(P∧Q) ⊢ ¬P∨¬Q …right?

5. ¬P∨¬Q ⊢ ¬(P∧Q) …right?

6. ¬(P∨Q) ⊢ ¬P∧¬Q …right?

7. ¬P∧¬Q ⊢ ¬(P∨Q) …right?

⊢⊨¬∨∧→↔⊤⊥

Page 9: Truth, deduction, computation   lecture a

Okay, an example. True, False, ?

P Q P∧Q

⊤ ⊤ ⊤

⊤ ? ?

⊤ ⊥ ⊥

? ⊤ ?

? ? ?

? ⊥ ⊥

⊥ ⊤ ⊥

⊥ ? ⊥

⊥ ⊥ ⊥

P Q P∨Q

⊤ ⊤ ⊤

⊤ ? ⊤

⊤ ⊥ ⊤

? ⊤ ⊤

? ? ?

? ⊥ ?

⊥ ⊤ ⊤

⊥ ? ?

⊥ ⊥ ⊥

Page 10: Truth, deduction, computation   lecture a

Okay, an example. ⊤rue, False, ?

P Q P∧Q

⊤ ⊤ ⊤

⊤ ? ?

⊤ ⊥ ⊥

? ⊤ ?

? ? ?

? ⊥ ⊥

⊥ ⊤ ⊥

⊥ ? ⊥

⊥ ⊥ ⊥

Q R Q→R

⊤ ⊤ ⊤

⊤ ? ?

⊤ ⊥ ⊥

? ⊤ ⊤

? ? ⊤

? ⊥ ⊥

⊥ ⊤ ⊤

⊥ ? ⊤

⊥ ⊥ ⊤

Using

P^Q ⊢ RP ⊢ Q→R

P ¬P

⊤ ⊥

? ⊥

⊥ ⊤

Page 11: Truth, deduction, computation   lecture a

Can we have 7.30 in our logic?

Page 12: Truth, deduction, computation   lecture a

We had 3-valued; can we have 4? 5?

⊤, ‘sure!’, ‘maybe’, ‘on weekends’, ‘probably not’, ⊥

Can we build a logic based on it?Yes we can… remember, we need a monoid! (And more)

Page 13: Truth, deduction, computation   lecture a

We can have Boolean, if n is 2k

⊤, ‘on weekends’, ‘if it rains’, ⊥ - and all combinations

¬P∨P - check!

Like parallel universes

Page 14: Truth, deduction, computation   lecture a

We can have Infinity

[0,1]; ⊥=0, ⊤=1

x ∨ y = max(x,y)

x ∧ y = min(x,y)

Monoids, distributive law.

Define →x ∧ y < z ⇔ x < (y → z)

Negation?

Page 15: Truth, deduction, computation   lecture a

We can have Infinity

[0,1]; ⊥=0, ⊤=1

x ∨ y = max(x,y)

x ∧ y = min(x,y)

Monoids, distributive law.

Define →x ∧ y < z ⇔ x < (y → z)

Negation?

Page 16: Truth, deduction, computation   lecture a

What We Need From Logical Values

DefinitionPartial Order - a transitive reflexive antisymmetric binary relation

Examples● ⊤⊥● ⊤⊥?● N, [0, 1]● tree

Page 17: Truth, deduction, computation   lecture a

But we need more

Definitionmin (a.k.a. ∧), max (a.k.a. v) functions in Partial Order

min(a,b) (if exists) - such that x < min(a,b) ⇔ x < a ∧ x < b

max(a,b) (if exists) - such that x > max(a,b) ⇔ x > a ∧ x > b

Page 18: Truth, deduction, computation   lecture a

Not all partial orders have it:

Page 19: Truth, deduction, computation   lecture a

Still not enough

Definitionmin, max functions in Partial Ordermin(a,b) (if exists) - such that x < min(a,b) ⇔ x < a ∧ x < b

max(a,b) (if exists) - such that x > max(a,b) ⇔ x > a ∧ x > b

Page 20: Truth, deduction, computation   lecture a

Closer… meet Lattice

DefinitionLattice is a partial order where min and max are defined for all elements

Page 21: Truth, deduction, computation   lecture a

We need ⊤ and ⊥

This one is no good (and it also does not have min/max):

Page 22: Truth, deduction, computation   lecture a

Bounded Lattice

DefinitionBounded Lattice is a lattice with top ⊤ and bottom ⊥

Page 23: Truth, deduction, computation   lecture a

Still not good enough...

what do we miss?

P∧Q ⊢ R ⇔ P ⊢ Q → R

Now we have Heyting Algebra

Page 24: Truth, deduction, computation   lecture a

That’s it for today