Natural Deduction Problem formula

61 Views Asked by At

We define the size $Size(q)$ of a proposition $q$ as the number of variable occurrences in it, i.e.

\begin{align} Size(x) &= 1 \\ Size(¬q) &= Size(q) \\ Size(q_1 \text{ op } q_2) &= Size(q_1) + Size(q_2) \end{align}

Let $P(n,s)$ denote the set of all propositions over $n$ variables that have size at most $s$.

How can we generate the formula to finding $P(n,s)$?

Any help will be appreciated.

1

There are 1 best solutions below

0
On BEST ANSWER

Ignoring negation, as asked in the comments, you have $P(n,1)=n$ because that is the number of variables. Any larger formula consists of two smaller formulas combined with an operator. Let there be $m$ binary operators. Then $$P(n,s)=\sum_{i=1}^{s-1}P(n,i)mP(n,s-i)$$