Making a Formula positive.

We define a program turning every formula A into a positive (i.e.: implication-free, and with negation on atomic formulas only) formula Pos[A], classically equivalent to it. In negative subformulas we switch disjunction and conjunction, existential and universal. We turn every subformula B⇒C or B→C into ¬B∨C if it is positive, into B∧¬C if it is negative.

In[68]:=

Pos[Un[x_, A_], s_]              : ...            := If[sPosSign, A, Neg[A]] ;

We start the program by the following clause:

In[76]:=

Pos[A_]               &n ... nbsp;           :=   Pos[A, PosSign] ;

Some examples.

In[77]:=

Lin[F1] Lin[Pos[F1]]

Out[77]=

(((¬A∨C)∧B))

Out[78]=

(((A∧¬C)∨¬B)∨)

In[79]:=

Lin[F2] Lin[Pos[F2]]

Out[79]=

∀x.(((¬A∨C)∧B))

Out[80]=

∀x.(((A∧¬C)∨¬B)∨)

In[81]:=

Lin[F3] Lin[Pos[F3]]

Out[81]=

∃x.(((¬A∨C)∧B))

Out[82]=

∃x.(((A∧¬C)∨¬B)∨)

In[83]:=

Lin[F4] Lin[Pos[F4]]

Out[83]=

(∃x.∀y.f(x)≤f(y)∃x.(f(x)≤f(g(x))∧f(x)≤f(h(x))))

Out[84]=

(∀x.∃y.¬f(x)≤f(y)∨∃x.(f(x)≤f(g(x))∧f(x)≤f(h(x))))

In[85]:=

Lin[F5] Lin[Pos[F5]]

Out[85]=

∀x.¬¬(∃y.P(x,y)∨¬∃y.P(x,y))

Out[86]=

∀x.(∃y.P(x,y)∨∀y.¬P(x,y))

In[87]:=

Lin[F6] Lin[Pos[F6]]

Out[87]=

∃x.∀y.f(x)≤f(y)

Out[88]=

∃x.∀y.f(x)≤f(y)

In[89]:=

Lin[F7] Lin[Pos[F7]]

Out[89]=

∀x.(∃y.∀z.P(x,y,z)∨∀y.∃z.¬P(x,y,z))

Out[90]=

∀x.(∃y.∀z.P(x,y,z)∨∀y.∃z.¬P(x,y,z))


Created by Mathematica  (October 17, 2006)