I have to write a constructive proof that for every propositional formula has an equivalent formula in Layers-Norm
We define Layer-Norm for propositional formulas as follows:
Literals are in Layer-Norm.
Are $\phi$ and $\psi$ in Layers-Norm we call $(\phi \lor \psi)$ a U- Formula.
Are $\phi$ and $\psi$ both U-Formulas is $(\phi \land \psi)$ in Layers-Norm.
Could someone advice me on this one? I can't come up with anything. First off I don't get it how to transform any formula into layers norm.
Second, I don't really understand the definition confused about it.
Edit 1: Now i have the following
For literals : S(L):= L U(L):= L∨L S(ϕ∧ψ):=U(ϕ)∧U(ψ), U(ϕ∨ψ):=S(ϕ)∨S(ψ), S(ϕ ∨ ψ) := U(ϕ ∨ ψ) ∧ U(ϕ ∨ ψ), U(ϕ∧ψ) := S(ϕ∧ψ) ∨ S(ϕ∧ψ)
Any advice now how to construct the proof for that?
Any truth-function, no matter how complex, can be expressed with $\land$, $\lor$, and $\neg$.
You can see this by thinking about truth-tables, which is just a special way of representing any truth-function.
For example, suppose we have a truth-function whose truth-conditions are given by the following table:
\begin{array}{ccc|c} P&Q&R&f(P,Q,R)\\ \hline T&T&T&F\\ T&T&F&T\\ T&F&T&F\\ T&F&F&T\\ F&T&T&T\\ F&T&F&F\\ F&F&T&F\\ F&F&F&F\\ \end{array}
This function is true in rows 2,4, and 5, and thus we generate the terms $P \land Q \land \neg R$, $P \land \neg Q \land \neg R$, and $\neg P \land Q \land R$ respectively. Disjuncting them gives us:
$$(P \land Q \land \neg R) \lor (P \land \neg Q \land \neg R) \lor (\neg P \land Q \land R)$$
This particular formula is said to be in Disjunctive Normal Form (DNF): it is a generalized disjunction, where each disjunct is a generalized conjunction of literals, and where a literal is either an atomic variable or the negation thereof.
Now, even though this is just an example, I think it should also be pretty clear that this should work for any truth-function: For every row where the function evaluates to $T$, just write a conjunction of literals corresponding to the truth-values of the atomic claims for that particular row. And, once you have those for all rows,, then disjunct them all together. The result will be in DNF, and will capture the original function,
Now, there is also something called the Conjunctive Normal Form (CNF): this is a generalized conjunction, where each conjunct is a generalized disjunction of literals.
And, just as any function can be written using a DNF expression (it can be 'turned into' DNF), it can also be shown that any truth-function can be expressed using a CNF expression.
I mention the CNF, because the CNF feeels very much like the 'Layers-Norm' that you are dealing with (and, the 'U-formula' feels like a DNF). For example, the expression:
$$(P \lor \neg Q) \land (\neg R \lor S)$$
is in CNF, and also in 'Layers-Norm' format.
However, the two are nor the same. There are two important differences between CNF and Layers-Norm:
On the other hand, in a 'Layers-Norm' expression, while you once again have literals as your 'leaves', you can keep going back and forth between layers of disjunctions and conjunctions to arbitrary depth. For example, the following expression would be in 'Layers-Norm', though not in CNF:
$$[(P \lor \neg Q) \land (\neg R \lor S)] \lor T$$
However, the 'Layers-Norm' format requires that every disjunction has exactly two disjuncts, and that every conjunction has exactly two conjuncts. Thus, the following expression is in CNF, but not in 'Layers-Norm':
$$P \land Q \land R$$
Still, with the literals as the 'leaves' in DNF CNF, as well as 'Layers-Norm', you would think that one should be able to transform the one format into the other fairly easily. And this is indeed the case. For example, the above expression can be put into 'Layers-Norm' as follows:
$$((P \land Q) \lor (P \land Q)) \land (R \lor R)$$
And if we have another conjunct:
$$P \land Q \land R \land S$$
we simply add one more layer:
$$(((P \land Q) \lor (P \land Q)) \land (R \lor R)) \lor (((P \land Q) \lor (P \land Q)) \land (R \lor R)) \land (S \lor S)$$
See how that works?
As a recursive function that transforms any geralized conjunction of literals $\phi$ into a Layer-Norm:
$Layers-Norm(\phi) = \phi$
$Layers-Norm(\phi_1 \land \phi_2) = \phi_1 \land \phi_2$
and for $n > 2$:
$Layers-Norm(\phi_1 \land ... \land \phi_{n-1} \land \phi_n) = (Layers-Norm(\phi_1 \land ... \land \phi_{n-1}) \lor Layers-Norm(\phi_1 \land ... \land \phi_{n-1})) \land (\phi_n \lor \phi_n)$
(if you want a more 'balanced' tree, you can of course keep breaking up near the middle rather than breaking off one conjunct at a time ... but for this problem we just need to show that there is some 'Layers-Norm' ... not necessarily a 'nice' one or 'efficient' one)
We can do something similar with disjunctions. For example:
$$P \lor Q \lor R$$
can be put into a U-expression like so:
$$((P \lor Q) \land (P \lor Q)) \lor R$$
and that becomes a 'Layers-Norm' simply by:
$$(((P \lor Q) \land (P \lor Q)) \lor R) \land (((P \lor Q) \land (P \lor Q)) \lor R)$$
So, where all $\phi_i$ are generalized conjunctions of literals:
$Layers-Norm(\phi_1 \lor ... \lor \phi_{n-1} \lor \phi_n) = (U-Expression(\phi_1 \lor... \lor\phi_{n-1} \lor \phi_n)) \land (U-Expression(\phi_1 \lor... \lor\phi_{n-1} \lor \phi_n)) $
where:
$U-Expression(\phi) = Layers-Norm (\phi)$
$U-Expression(\phi_1 \lor \phi_2) = Layers-Norm(\phi_1) \lor Layers-Norm(\phi_2)$
and for $n>2$:
$U-Expression(\phi_1 \lor... \lor\phi_{n-1} \lor \phi_n) = (U-Expression(\phi_1 \lor... \lor\phi_{n-1}) \land U-Expression(\phi_1 \lor... \lor\phi_{n-1})) \lor Layers-Norm(\phi_n)$
Let's apply this algorithm to the expression of the earlier example:
$$(P \land Q \land \neg R) \lor (P \land \neg Q \land \neg R) \lor (\neg P \land Q \land R)$$
Here goes (I'll use $LN$ for $Layers-Norm$ and $U$ for $U-Expression$):
$$LN((P \land Q \land \neg R) \lor (P \land \neg Q \land \neg R) \lor (\neg P \land Q \land R))=$$
$$U((P \land Q \land \neg R) \lor (P \land \neg Q \land \neg R) \lor (\neg P \land Q \land R))\land U((P \land Q \land \neg R) \lor (P \land \neg Q \land \neg R) \lor (\neg P \land Q \land R))=$$
$$(U((P \land Q \land \neg R) \lor (P \land \neg Q \land \neg R)) \land U((P \land Q \land \neg R) \lor (P \land \neg Q \land \neg R))) \lor LN(\neg P \land Q \land R))\land (U((P \land Q \land \neg R) \lor (P \land \neg Q \land \neg R)) \land U((P \land Q \land \neg R) \lor (P \land \neg Q \land \neg R))) \lor LN(\neg P \land Q \land R))=$$
$$((LN(P \land Q \land \neg R) \lor LN(P \land \neg Q \land \neg R)) \land (LN(P \land Q \land \neg R) \lor LN(P \land \neg Q \land \neg R))) \lor LN(\neg P \land Q \land R))\land ((LN(P \land Q \land \neg R) \lor LN(P \land \neg Q \land \neg R)) \land (LN(P \land Q \land \neg R) \lor LN(P \land \neg Q \land \neg R))) \lor LN(\neg P \land Q \land R))=$$
$$(((LN(P \land Q) \lor LN(P \land Q))\land \neg R) \lor (LN(P \land \neg Q)\lor LN(P \land \neg Q)) \land \neg R)) \land ((LN(P \land Q) \lor LN(P \land Q))\land \neg R) \lor (LN(P \land \neg Q)\lor LN(P \land \neg Q)) \land \neg R))) \lor ((LN(\neg P \land Q) \lor LN(\neg P \land Q)) \land R))\land (((LN(P \land Q) \lor LN(P \land Q))\land \neg R) \lor (LN(P \land \neg Q)\lor LN(P \land \neg Q)) \land \neg R)) \land ((LN(P \land Q) \lor LN(P \land Q))\land \neg R) \lor (LN(P \land \neg Q)\lor LN(P \land \neg Q)) \land \neg R))) \lor ((LN(\neg P \land Q) \lor LN(\neg P \land Q)) \land R))=$$
$$((((P \land Q) \lor (P \land Q))\land \neg R) \lor ((P \land \neg Q)\lor (P \land \neg Q)) \land \neg R)) \land (((P \land Q) \lor (P \land Q))\land \neg R) \lor ((P \land \neg Q)\lor (P \land \neg Q)) \land \neg R))) \lor (((\neg P \land Q) \lor (\neg P \land Q)) \land R))\land ((((P \land Q) \lor (P \land Q))\land \neg R) \lor ((P \land \neg Q)\lor (P \land \neg Q)) \land \neg R)) \land (((P \land Q) \lor (P \land Q))\land \neg R) \lor ((P \land \neg Q)\lor (P \land \neg Q)) \land \neg R))) \lor (((\neg P \land Q) \lor (\neg P \land Q)) \land R))$$
Yikes! ... but it works!