> |

|
Polynomizing Lukasiewicz's Many-Valued Logics by Maple
Kahtan H. Alzubaidy
Introduction
Polynomizing of Lukasiewicz's Many-Valued Logics ![L[n], n = 2, 3, `and`(() .. is*the*expression*of*propositions, `in`(connectives, L[n]))](/view.aspx?SI=154488/5adb329acc3b0b5ae89cf9318a7115a7.gif)
by certain reduced polynomials of several variables over the ring 
This method is applicable when n is a prime or a power of a prime. We shall restrict ourselves to n = 2, 3, 4 only.
Numerical representations
Propositional Lukasiewicz's many valued logics can be introduced by the matrix !["L[n]=< {0,1,...,n-1},∼,->, or , and ,↔,{n-1}> ; n=2,3,... . "](/view.aspx?SI=154488/157d457f7d56241f9ecefc7e6038ad64.gif)
Suppose that n is a prime.Then connectives are expressed by the numeric functions.
negation(ne) wx = n-1- x
implication(im) x
disjunction(di) x
conjunction(co) x
biconditional(bi) x
!["We consider L[2] , L[3] and L[4] only. The connectives are given by the following numerical functions as follows"](/view.aspx?SI=154488/c30acdc168ca85c78c09a89b999b792a.gif)
For ![L[2]](/view.aspx?SI=154488/a82f3f24ef22da8c27d016d19e7eec52.gif)
> |

|
> |

|

|
(1) |
> |

|

|
(2) |
> |

|

|
(3) |
> |

|

|
(4) |
> |

|

|
(5) |
For ![L[3]](/view.aspx?SI=154488/90ca0fe6dd6b6313166c3c7f693cb66b.gif)
> |

|

|
(6) |
> |

|

|
(7) |
> |

|

|
(8) |
> |

|

|
(9) |
> |

|

|
(10) |
> |

|
Representations by polynomials
Let n be a prime.
!["R[n]=`ℤ`[n][x[1],x[2],..,x[n]: (x[i])^(n)=x[i]] is a polynomial ring in x[1],x[2],..,x[n] over a field `ℤ`[n] subject to the relations (x[i])^(n)=x[i ] ."](/view.aspx?SI=154488/76de61f0ed91a9508badd7fed562fd03.gif)
Any polynomial p in !["R[n] has the reduced form p(x[1],x[2],..,x[n])=(∑)a(x[1])^(i[1])...(x[n])^(i[n]) ; a in {0,...,n-1} ."](/view.aspx?SI=154488/8b1adf7c824004bd297d0fffa1ad7dfb.gif)
Special cases
In ![R[2]](/view.aspx?SI=154488/90cb9fbc862816cecd0115089270bbe5.gif)
p(x)=a
p(x,y)=axy+bx+cy+d
In ![R[3]](/view.aspx?SI=154488/ec4bcecf27bc843bdb2c96b1901a054b.gif)
p(x)=a
p(x,y)=a
Atomic proposition in !["L[n] is represented by a variable x in { x[1],x[2],..,x[n]}. The connectives are given as follows "](/view.aspx?SI=154488/67cf8163c17042914d3cdb07cafa5165.gif)
In ![L[2]](/view.aspx?SI=154488/206f1b1b59751dd2c6c9300c07594268.gif)
the unary onnective x= ax+b ; a,b![" in `ℤ`[2]"](/view.aspx?SI=154488/dafc2e7ee9e2fd46e2a791c64225df29.gif)
the binary connectives !["->, or , and ,↔ are given by by axy+bx+cy ; a,b,c in `ℤ`[2] In L[3]"](/view.aspx?SI=154488/5ec84083f356e8a0408a11051e6a3f2f.gif)
the unary onnective x= a ; a,b![",c in `ℤ`[3]"](/view.aspx?SI=154488/dca8e899983cab4631188ce3bee69b02.gif)
the binary connectives a ; !["a,b,c,d,e,f,g,h,k in `ℤ`[3] ."](/view.aspx?SI=154488/d5ce9758ee6b97c7345dc42fbcfe49aa.gif)
To find now the connectives
> |

|
> |

|
> |

|

|
(11) |
> |
DS2 := [seq(seq([i, j], i = 0 .. 1), j = 0 .. 1)];
|
> |
Eq2 := [seq(p2(u[])-ff(u[]), `in`(u, DS2))];
|
> |
modp(Linear(Eq2, [a, b, c, d]),2);
|
![proc (ff) local DS2, Eq2; DS2 := [seq(seq([i, j], i = 0 .. 1), j = 0 .. 1)]; Eq2 := [seq(p2(u[])-ff(u[]), `in`(u, DS2))]; modp(SolveTools:-Linear(Eq2, [a, b, c, d]), 2) end proc](/view.aspx?SI=154488/af72584bc16e55dd3f2d18a406db36eb.gif)
|
(12) |
> |

|

|
(13) |
> |

|

|
(14) |
> |

|

|
(15) |
> |

|

|
(16) |
Thus the connectives in ![`in`(L[2], terms*of*polynomials*are*as*follows)](/view.aspx?SI=154488/a906296fc6f584553b9ac1277a1e9575.gif)
wx = 1+x
x
x
x
x
In terms of polynomial functions
> |

|

|
(17) |
> |

|

|
(18) |
> |

|

|
(19) |
> |

|

|
(20) |
> |

|

|
(21) |
> |

|
> |

|

|
(22) |
> |
DS3 := [seq(seq([i, j], i = 0 .. 2), j = 0 .. 2)];
|
> |
Eq3:= [seq(p3(u[])-ff(u[]), `in`(u, DS3))];
|
> |
`mod`(Linear(Eq3, [a, b, c, d,e,f,g,h,k]), 3);
|
![proc (ff) local DS3, Eq3; DS3 := [seq(seq([i, j], i = 0 .. 2), j = 0 .. 2)]; Eq3 := [seq(p3(u[])-ff(u[]), `in`(u, DS3))]; `mod`(SolveTools:-Linear(Eq3, [a, b, c, d, e, f, g, h, k]), 3) end proc](/view.aspx?SI=154488/9345d6a2504697db87104645cbe21448.gif)
|
(23) |
> |

|
> |

|

|
(24) |
> |

|

|
(25) |
> |

|

|
(26) |
> |

|

|
(27) |
> |

|
Therefore the connectives in !["L[3] in terms of polynomials are given by "](/view.aspx?SI=154488/e51143f96d1fbf11d276f71664b0546f.gif)
wx = 
x
x
x
x
In terms of polynomial functions
> |

|

|
(28) |
> |

|

|
(29) |
> |

|

|
(30) |
> |

|

|
(31) |
> |

|

|
(32) |
Checking tautologies
The following procedure based on Groebner basis can compute compound proposition as a reduced polynomial in !["R[n] for n=2,3 ."](/view.aspx?SI=154488/a1658c72821d6a3dcd7051f2610f417f.gif)
The proposition is a tautolog if the result is 1 for !["L[2] and 2 for L[3]."](/view.aspx?SI=154488/f6f374daac35f1f16d8113e60065df49.gif)
In the following procedure ev (evaluate).
p = 2, 3 primes
V is the list of variables x,y,z,...
q is the proposition as a polynomial in x, y, z, ...
> |

|
> |
K:=[seq(x^p-x,x in W)];
|
> |
B:=Basis(K,tdeg(seq(V[i],i=1..n)));
|
> |
modp(NormalForm(q,B,tdeg(seq(V[i],i=1..n))),p);
|
![proc (p, V, q) local n, W, K, B; n := nops(V); W := [seq(V[i], i = 1 .. n)]; K := [seq(x^p-x, `in`(x, W))]; B := Groebner:-Basis(K, tdeg(seq(V[i], i = 1 .. n))); modp(Groebner:-NormalForm(q, B, tdeg(seq(V[i], i = 1 .. n))), p) end proc](/view.aspx?SI=154488/b0863750521df560f021971e204c179b.gif)
|
(33) |
> |

|
![L[2]*axioms](/view.aspx?SI=154488/946518a319f1708836b2383ba72d14d5.gif)
1) x→(y→x)
2) (x→(y→z)→((x→y)→(x→z))
3) (wx→wy)→(y→x)
To verify the second axiom for example. The other two axioms are similar.
> |

|

|
(34) |
> |

|

|
(35) |
> |
![ev(2, [x, y, z], q)](/view.aspx?SI=154488/943f5c1bf8f99875785cdc7c891022db.gif)
|

|
(36) |
> |

|
![L[3]*axioms](/view.aspx?SI=154488/f985fc63f67788b74e98ad3eac36cc71.gif)
1) x→(y→x)
2) (x→y)→((y→z)→(x→z))
3) (wx→wy)→(y→x)
4) ((x→wx )→x)→x
To verify the fourth axiom. The rest are similar.
> |

|

|
(37) |
> |
![ev(3, [x], qq)](/view.aspx?SI=154488/ec0b7291f162ebcdec8ecd3ccf512616.gif)
|

|
(38) |
> |

|
> |

|

|
(39) |
4-valued Logic ![L[4]](/view.aspx?SI=154488/95be308c84447fc29db5bb6c03645632.gif)
The truth values of propositional Lukasiewicz's 4- valued logic !["L[4]={0,1/(3),2/(3),1} can be represented by the elements of Galois field GF(4)."](/view.aspx?SI=154488/57573a44bdcd8569e7145c0d0e681cae.gif)
GF(4)= !["(`ℤ`[2][t])/(<t^(2)+t+1>). GF(4)={0,1,t,t+1} modulo 2, modulo(t^(2)+t+1) . We reserve the letter t for this purpose only."](/view.aspx?SI=154488/4599e35afbcb8543f07567f878a7fcfc.gif)
Minimum and maximum functions on GF(4) are given by the following two proceddures.

|
(40) |

|
(41) |
> |

|

|
(42) |
> |

|

|
(43) |
The order on GF(4) is therefore given by 0 < 1 < t < t+1 .
The connectives are given by the following functions
> |

|

|
(44) |
> |

|

|
(45) |
> |

|

|
(46) |
> |

|

|
(47) |
> |

|

|
(48) |
> |

|
Consider the following lists
> |
![CC := [seq(a[i], i = 1 .. 16)]](/view.aspx?SI=154488/484894aa0ce12df30377ca6797d9ef00.gif)
|
![[a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15], a[16]]](/view.aspx?SI=154488/604562f62e5f64796967eed1a693d95a.gif)
|
(49) |
> |
![L4 := [0, 1, t, t+1]](/view.aspx?SI=154488/72931e1f09c498464187bb9cb9ff514e.gif)
|
![[0, 1, t, t+1]](/view.aspx?SI=154488/d0dc28e774218dc78a2ab4a93f5ee908.gif)
|
(50) |
> |

|
> |
![DS4 := [seq(seq([i, j], `in`(i, L4)), `in`(j, L4))]](/view.aspx?SI=154488/993ba9ec052e4d3150d2528e284e36e9.gif)
|
![[[0, 0], [1, 0], [t, 0], [t+1, 0], [0, 1], [1, 1], [t, 1], [t+1, 1], [0, t], [1, t], [t, t], [t+1, t], [0, t+1], [1, t+1], [t, t+1], [t+1, t+1]]](/view.aspx?SI=154488/3883bfd77bcd2c033ed8c04823359f44.gif)
|
(51) |
> |

|
> |

|
The reduced polynomial when n = 4
> |
![p4 := proc (x, y) options operator, arrow; a[1]*x^3*y^3+a[2]*x^3*y^2+a[3]*x^2*y^3+a[4]*x^3*y+a[5]*x^2*y^2+a[6]*x*y^3+a[7]*x^3+a[8]*x^2*y+a[9]*x*y^2+a[10]*y^3+a[11]*x^2+a[12]*x*y+a[13]*y^2+a[14]*x+a[15]*y+a[16] end proc](/view.aspx?SI=154488/403e4bc72e74c4fb6243d9eaadebc783.gif)
|
![proc (x, y) options operator, arrow; a[1]*x^3*y^3+a[2]*x^3*y^2+a[3]*x^2*y^3+a[4]*x^3*y+a[5]*x^2*y^2+a[6]*x*y^3+a[7]*x^3+a[8]*x^2*y+a[9]*x*y^2+a[10]*y^3+a[11]*x^2+a[12]*x*y+a[13]*y^2+a[14]*x+a[15]*y+a[16] end proc](/view.aspx?SI=154488/6401f82244971350c1de1ad80ccec35a.gif)
|
(52) |
!["The coefficients a[1], ... ,a[16] in `ℤ`[2] ."](/view.aspx?SI=154488/1bbde12f2141a9bd2864ec90e60378e4.gif)
> |
DS4 := [seq(seq([i, j], `in`(i, L4)), `in`(j, L4))];
|
> |
Eq4:= [seq(p4(u[])-ff(u[]), `in`(u, DS4))];
|
> |
`mod`(Linear(Eq4, CC), 2);
|
![proc (ff) local DS4, Eq4; DS4 := [seq(seq([i, j], `in`(i, L4)), `in`(j, L4))]; Eq4 := [seq(p4(u[])-ff(u[]), `in`(u, DS4))]; `mod`(SolveTools:-Linear(Eq4, CC), 2) end proc](/view.aspx?SI=154488/a38a7324d685ae4bee87293b5fd94e0d.gif)
|
(53) |
> |

|
The connectives
> |

|
![{a[1] = t, a[2] = 1, a[3] = 0, a[4] = 0, a[5] = t, a[6] = t+1, a[7] = 0, a[8] = 1, a[9] = t+1, a[10] = 0, a[11] = 0, a[12] = 1, a[13] = 0, a[14] = 1, a[15] = 0, a[16] = t+1}](/view.aspx?SI=154488/1fa0312b28bd2c8be27835a47e2dbb33.gif)
|
(54) |
> |

|
> |

|
![{a[1] = 0, a[2] = t+1, a[3] = t+1, a[4] = t, a[5] = 1, a[6] = t, a[7] = 0, a[8] = t, a[9] = t, a[10] = 0, a[11] = 0, a[12] = 0, a[13] = 0, a[14] = 1, a[15] = 1, a[16] = 0}](/view.aspx?SI=154488/221f84b3239d9d1e5d03f20c6b9a8458.gif)
|
(55) |
> |

|
![{a[1] = 0, a[2] = t+1, a[3] = t+1, a[4] = t, a[5] = 1, a[6] = t, a[7] = 0, a[8] = t, a[9] = t, a[10] = 0, a[11] = 0, a[12] = 0, a[13] = 0, a[14] = 0, a[15] = 0, a[16] = 0}](/view.aspx?SI=154488/219e36d4fef3e91442560ef2deccda80.gif)
|
(56) |
> |

|
![{a[1] = 0, a[2] = 1, a[3] = 1, a[4] = t+1, a[5] = 0, a[6] = t+1, a[7] = 0, a[8] = t, a[9] = t, a[10] = 0, a[11] = 0, a[12] = 0, a[13] = 0, a[14] = 1, a[15] = 1, a[16] = t+1}](/view.aspx?SI=154488/37b757db7859b6eaa710bcc956970717.gif)
|
(57) |
> |

|

Connectives in terms of polynomials





> |

|

> |

|

|
(58) |
> |

|

|
(59) |
> |

|

|
(60) |
> |

|

|
(61) |
> |

|

|
(62) |
The following procedure evaluate compound propositions in terms of reduced polynomials in !["L[4] . "](/view.aspx?SI=154488/5863e343aa4e4c44c7b76cc85860a6e9.gif)
p = 2 and V, q as above in ev.
> |
K:=[seq(x^(2*p)-x,x in W)];
|
> |
B:=Basis(K,tdeg(seq(V[i],i=1..n)));
|
> |
modp(NormalForm(q,B,tdeg(seq(V[i],i=1..n))),p);
|
![proc (p, V, q) local n, W, K, B; n := nops(V); W := [seq(V[i], i = 1 .. n)]; K := [seq(x^(2*p)-x, `in`(x, W))]; B := Groebner:-Basis(K, tdeg(seq(V[i], i = 1 .. n))); modp(Groebner:-NormalForm(q, B, tdeg(seq(V[i], i = 1 .. n))), p) end proc](/view.aspx?SI=154488/34c9bf76311b91efc7524af8213b9ab2.gif)
|
(63) |
> |

|
Checking tautologies in ![L[4]](/view.aspx?SI=154488/7fe403622c05534c947cad8662a8c52d.gif)
The above proceduer ev4 can be used to check tautologies in !["L[4]. If the result is t+1, then the proposition is a tautology."](/view.aspx?SI=154488/5147a1825cc6101a2ce24e5bc8b1175e.gif)
Examples
1) x →x
> |

|

|
(64) |
> |
![ev4(2, [x], w)](/view.aspx?SI=154488/6674f765001d0273ec4a284bdc2258e5.gif)
|

|
(65) |
2) x→(y→x)
> |

|

|
(66) |
> |
![ev4(2, [x, y], ww)](/view.aspx?SI=154488/b225cbae81128b17713f3f6f4d6adb63.gif)
|

|
(67) |
> |

|
3) xnwx is not tautology in !["L[4]."](/view.aspx?SI=154488/ca93f3357caee5ca46077dbb10c44b8f.gif)
> |

|

|
(68) |
> |
![ev4(2, [x], www)](/view.aspx?SI=154488/e77a8192dbe467c4e97dd5ca74e2faf7.gif)
|

|
(69) |
> |

|
Remark
We can deduce from → the other connectives n,o,↔ .
For example xny = (x→y)→y
> |

|

|
(70) |
> |

|
> |
![ev4(2, [x, y], g)](/view.aspx?SI=154488/017e0a6bdaea0b21bc2c10c64945c474.gif)
|

|
(71) |
> |

|

|
(72) |
> |

|

|
(73) |
> |

|
References
1) M. Bergmann
Many-Valued and Fuzzy Logic
Cambridge 2008.
2) Walter Carnielli
Polynomial Ring Calculus for Many-Valued Logics
Proceedings of the 35th International Symposium on Multiple-Valued Logic (ISMVL’05)
|