From: Confutus on
I've done a little work on a four-valued system, and I wanted to check
to see whether it was the same one Lukasiewicz was working on. It
doesn't look like it. But thanks for looking it up.

Frederick Williams wrote:
>
> J Lukasiewicz "A System of Modal Logic" Journal of Computing System"
> vol i, no 3 July 1953
>
> Also see the papers referred to in
>
> A N Prior "Time and Modality" OUP (1979 Greenwood reprint)
>
> in which you'll find this truth-table
>
> K | 1 2 3 4 | N | M | L
> ---+---------+---+---+---
> 1 | 1 2 3 4 | 4 | 1 | 1
> 2 | 2 2 4 4 | 3 | 2 | 4
> 3 | 3 4 3 4 | 2 | 1 | 3
> 4 | 4 4 4 4 | 1 | 4 | 4
>
> 1 is distinguished.
>
> Happy hunting.

From: Jan Burse on
Hi

Confutus wrote:
> Jan Burse wrote:
> Unfortunately, the track record of multi-valued logic in successfully
> extending classical logic is dismal. I don't think anyone actually does
> deductive reasoning with any version of it.

3-valued logic has very nice applications in
logic programm, in database, etc..

For example SQL is based on 3-valued logic,
you have there TRUE, FALSE, UNKNOW, the later
arising if null values are used.

Thus a query of the form:

SELECT *
FROM sales
WHERE price<10 or price>=10

does not return all rows, but
all rows except those where price
is null. Because if price is
null then:

price<10 --> UNKNOWN
price>=10 --> UNKNOWN
price<10 OR price>=10 --> UNKNOWN

One might question whether null values
and 3-valued logic in databases is
really necessary, but its reality
for millions of user nowadays.

The application of 3-valued logic
in logic programming is more subtle.
It goes that you split up a
predicate P into:

P+: The predicate successeeds
P-: The predicate fails
~P+ & ~P-: The predicate loops,
flounders, or what ever

The 3-valued logic for logic
programming can be based on the
kleene logic which is based on
the following lattice:

t
|
u
|
f

Here is an example:

poison(X) :- green(X), smelly(X).
green(X) :- X=alfa.
grenn(X) :- X=beta.
smelly(X) :- X=alfa.

The 2-valued rewriting of the 3-valued
interpretation of this logic programm
gives the following 2-valued (sic!)
result:

poison(X)+ <- green(X)+, smelly(X)+.
green(X)+ <- X=alfa
green(X)+ <- X=beta
smelly(X)+ <- X=alfa

poison(X)- <- green(X)-
poison(X)- <- smelly(X)-
green(X)- <- X\=alfa, X\=beta
smelly(X)- <- X\=alfa.

The above rewriting is not necessary
because the program has no loops. But
it would allow to give a new meaning to
a query:

?- \+poison(X)

Which can be translated into:

?- poison(X)-

In a constraint solving system, the
answer would be:

X\=alfa, X\=beta
;
X\=alfa

Thus allowing negation also for non
ground queries.

Bye
From: Confutus on

Jan Burse wrote:
> Hi
>
>
> 3-valued logic has very nice applications in
> logic programm, in database, etc..
>
> For example SQL is based on 3-valued logic,
> you have there TRUE, FALSE, UNKNOW, the later
> arising if null values are used.

Yes, I'm more or less familiar with this application. Several years
ago when I was working with 3VL, I was directed to a series of articles
which advanced various arguments in favor of and opposed to the use of
3VL in SQL. The proponents argued that it worked. The opponents argued
that the theory was weak and would lead to unsound implementations and
erroneous answers to queries. After I had made sufficent progress in
my own studies, I returned to these articles and found, in short, that
both proponents and opponents were partly correct. The 3VL used in SQL
is a fragment of what I have, and in many versions a poorly understood
and poorly implemented one at that.
I' m entirely unfamiliar with logic programming, so your second
example means nothing to me. About all I can say is that at least one
Kleene logic described in the references in MVL can also be taken as a
fragment of the enhanced Lukasiewicz logic I have been working with.
But these applications don't invalidate the point I was trying to
make. These (and most other MVL's) lack conditionals that are
sufficiently well behaved to permit ordinary deduction. It would be a
far stetch to call them *modal* logics.

From: Owen on

Frederick Williams wrote:

>
> Sure, S5 is not n valued for finite n, but the op says _similar_ to the
> Lewis system S5. Didn't Lukasiewicz have a four-valued modal logic?
> Iirc it's in his North-Holland collected papers and Prior discusses it
> somewhere.
>
> >
> > Confutus wrote:
> > > I'm interested, but I have a radically unorthodox approach to the
> > > subject. A number of years ago I worked out how a modal logic formally
> > > similar to the Lewis system S5 could be based on Lukasiewicz 3-valued
> > > logic, and I haven't yet been able to find anyone much interested in
> > > it.


Truth tables for Modal logic

We begin with, (T=logical truth) and (t=factual truth) and (f=factual
falsity) and (F= logical falsity).

If we restrict our remarks to logical functions of one variable p, then
...

p

T
t
f
F

...is the truth table of p.

~p

F
f
t
T

...is the truth table of ~p.

The usual connectives; v, &, ->, <->, are defined in the same way.


[]p

T
F
F
F


<>p

T
T
T
F

We can now establish (by truth tables) the theorems:

[]p -> p.
p -> <>p.
[]p <-> ~<>~p.
<>p <-> ~[]~p.
[]([]p) <-> []p.
p -> []<>p.
<>[]p <-> []p.
[]<>p <-> <>p.
etc.


Not (~)
~t = f, ~f = t, ~F = T, ~T = F.

And (&)
t & t = t, t & f = F, t & F = F,
f & t = F, f & f = f, f & F = F, f & T = f,
F & t = F, F & f = F, F & F = F, F & T = F,
T & t = t, T & f = f, T & F = F, T & T = T.

Or (v)
t v t = t, t v f = T, t v F = t, t v T = T,
f v t = T, f v f = f, f v F = f, f v T = T,
F v t = t, F v f = f, F v F = F, F v T = T,
T v t = T, T v f = T, T v F = T, T v T = T.

Implies (->)
t -> t = T, t -> f = f, t -> F = f, t -> T = T,
f -> t = t, f -> f = T, f -> F = t, f -> T = T,
F -> t = T, F -> f, = T, F -> F = T, F -> T = T,
T -> t = t, T -> f = f, T -> F = F, T -> T = T.

Equivalence (<->)
t <-> t = T, t <-> f = F, t <-> F = f, t <-> T = t,
f <-> t = T, f <-> f = T, f <-> F = t, f <-> T = f,
F <-> t = f, F <-> t = f, F <-> F = T, F <-> T = F,
T <-> t = t, T <-> f = f, T <-> F = F, T <-> T = T.

Necessity ([])
[]t = F, []f = F, []F = F, []T = T.

Possibility (<>)
<>t = T, <>f = T, <>F = F, <>T = T.

Tautologies (theorems) are those expressions that have T for every
logical calculation of its truth values.

To deal with theorems involving two propositional variables then we
expand the truth values to 16 values.

All of the axioms and theorems of classical propositional logic and,
the axioms and theorems of modal propositional logic (eg.S5) are truth
functional tautologies.

This logic greatly expands classical logic.

Owen

From: Confutus on
Some time ago I developed a four-valued extension of the three valued
logic I have been working with. This comes very close to the same
thing. On the basis of my experience with it, I'd like to make some
suggestions.

1) in your table for implies, third line first entry, why f -> t = t?

Try [](p & (p -> q)) ->q and watch what happens when p=f & q = t.
[]P should evaluate as T for any tautology P.
I would suggest f -> t = T instead.

Try this definition:
p => q :: [](p -> q) and see what happens.

2) In the table for equivalence, there are three problems.
a) first line, second entry, you have t <-> f = F. This doesn't match
the entry for implies; I would sugges instead, t t <-> f = f i
b) second line, first entry you have f <-> t = T. Surely this must be
an error. I would suggest
f <-> t = f in accord with 2a)
c) third line, second entry is a duplicate of third line, first entry
and there is thus no entry for F <-> f. I would suggest F <-> f = t,
for symmetry with the second line, third entry.

These changes would allow you to define the "equivalence"
p <-> q :: (p->q) & (q -> p)

I'd also suggest that the "equivalence" you mention should be renamed
the "biconditional" and that equivalence be reserved for a new function
==, defined thus:
p == q :: [](p <-> q), or (equivalently)
P == q :: (p => q) & (q => p)

It isn't S5 or any of the other traditional systems of modal logic, but
it is functional.