0
$\begingroup$

Prove that for each finite binary tree $T$ there exists formula in first order logic $\phi_n$ such that $T\models \phi_n$ iff $T$ is complete binary tree with depth $n$. Structure is two binary relations: $L(x,y)$ iff $y$ is left son of father $y$, and analogically for $R(\cdot, \cdot)$. Additional difficulty is fact that formula can use only two variables, but it is possible to requantify them.

Being honestly I have no idea how to start. First of all, I don't know how to think about it - I have no root, moreover I have never solved similiar exercise. I ask for help :)

  • 0
    "$y$ is left son of father $y$"? One of them should be $x$2017-02-10

1 Answers 1

0

Let $$\psi_0(x)\equiv \forall y\,(\neg L(x,y)\land\neg R(x,y))$$ ("$x$ is a leaf" or: "the subtree rooted at $x$ is complete binary of depth $0$") and then recursively $$\psi_{n+1}(x)\equiv \exists y\,(L(x,y)\land\psi_n(y))\land \exists y\,(R(x,y)\land\psi_n(y)).$$ Finally, $$\phi_n\equiv \exists x\,(\psi_n(x)\land \forall y \,(\neg L(y,x)\land \neg R(y,x))) $$

  • 0
    thanks you very much! It was such easy!2017-02-10
  • 0
    http://math.stackexchange.com/questions/2139330/prove-that-sentence-in-first-order-logic-exists-directed-cycle-with-3n-dist very similar :)2017-02-11
  • 0
    Generally I understand your solution. It means for examle, I can see that depth is $n$. And I can see that root has no parent. However, I cant see how you guarantee that internal node has exactly two sons ? You guarantee that there exists at least one left and at least one right son. But you solution seems to accept each tree of depth $n$.2017-02-11