Lukasiewicz's Many-Valued Logic - Arithmetic Semantic
Kahtan H. Alzubaidy
Introduction
Procedures are presented to evaluate propositions and to check tautologies in Lukasiewicz's n-valued logic. Atomic propositions are represented
by numerical variables x,y,z,w and logical connectives by suitable functions. Evaluations and checking are done for compound propositions consisting of at most four atomic propositions.
cp2:=proc(K,L)
[seq(seq([x,y],y in L),x in K)];
end proc;
cp3:=proc(K,L,M)
local G;
G:=cp2(cp2(K, L), M);
[seq(Flatten(J), `in`(J, G))];
cp4:=proc(K,L,M,N)
G:=cp2(cp3(K, L, M),N);
V:=proc(n)
[seq(r/(n-1),r=0..n-1)];
function
m:=proc(x,y)
(x+y)/2 -abs(x-y)/2;
M:=proc(x,y)
(x+y)/2 +abs(x-y)/2;
logical connectives
n:=proc(x)
1-x;
i:=proc(x,y)
m(1,1-x+y);
o:=proc(x,y)
M(x,y);
a:=proc(x,y)
m(x,y);
biconditional
e:=proc(x,y)
1-abs(x-y);
n is the number of truth values.
val1:=proc(n,f)
local W;
W:=V(n);
seq([[x],f(x)],x in W);
An¬A
val2:=proc(n,f)
local W,VV;
VV:=cp2(W,W);
seq([z,f(z[1],z[2])],z in VV);
(A→ B) n (B → A)
val3:=proc(n,f)
local W,VVV,K;
K := cp3(W, W, W);
VVV:=[seq(Flatten(J), `in`(J, K))];
seq([z,f(z[1],z[2],z[3])],z in VVV);
A→(B→C) ≡ (AoB)→C
val4:=proc(n,f)
local W,VVVV,K;
K := cp4(W, W, W,W);
VVVV:=[seq(Flatten(J), `in`(J, K))];
seq([z,f(z[1],z[2],z[3],z[4])],z in VVVV);
(AoB ) →(CnD)
tau1:=proc(n,f)
local W,L,c,x;
L:=[seq(f(x),x in W)];
c:=0;
for x in L do if x=1 then c:=c+1 fi;od;
if c=nops(L) then print(tautology); else print(NO)fi;
A→A
tau2:=proc(n,f)
local W,VV,L,c,x;
L:=[seq(f(z[1],z[2]),z in VV)];
{A→B, ¬B}~¬A
tau3:=proc(n,f)
local W,VVV,K,L,c,x;
K := cp3(W, W,W);VVV:=[seq(Flatten(J), `in`(J, K))];
L:=[seq(f(w[1],w[2],w[3]),w in VVV)];
{A→B,B→C}~A→C
tau4:=proc(n,f)
local W,VVVV,K,L,c,x;
K := cp4(W, W,W,W);VVVV:=[seq(Flatten(J), `in`(J, K))];
L:=[seq(f(w[1],w[2],w[3],w[4]),w in VVVV)];
{A→B,C→D}~(AnC)→(BnD)
References
1) M. Bergmann, Many-Valued and Fuzzy Logic
Cambridge 2008.
2) G.Malinowski, Many-Valued Logics
Clarendon- Oxford 1993.