# ternary logic

A Kleene-type ternary logic can be shown to exist "embedded" in integer arithmetic modulo 3 by assigning polynomials to the logical connectives, like so: ${\displaystyle {\mbox{NOT}}(x)=-x,}$
${\displaystyle {\mbox{OR}}(x,y)={x+x^{2}+y+y^{2}-xy-x^{2}y^{2} \over 2},\quad {\mbox{AND}}(x,y)={x-x^{2}+y-y^{2}+xy+x^{2}y^{2} \over 2}.}$