WFFs

Next Related Topic on Ring

A WFF or a Well Formed Formula results from putting the logic symbols together in a proper sequence. In English, proper sequencing is the root of the idea of grammar. So, to learn to write a WFF is like learning the rules of logical grammar.

A related idea is that of precedence, or putting items into their proper order. In logic, precedence is indicated by the use of parentheses, '( )' and their equivalents, '[ ]' and '{ }'. What is inside has a narrower scope than what is outside. The most important operation is the one with the widest scope; it lies outside of all parentheses. It is called the main operator since its outcome is the result for the entire WFF.

We start with a stock of simple WFFs. These are represented by the capital letters, A..Z. Each, all by itself, is a WFF. Compound WFFs are built out of the simples by combining them with the logic operators. Next is a discussion of the "grammar" of building compounds.

Definitions:

Compound Rule 1: An input to an operator, that on which it operates, must be a WFF.

Compound Rule 2: A uniary operator is always placed immediately to the left of its input. For example, ~W is a WFF but W~ is not.

Compound Rule 3: A binary operator is always placed between its inputs. For example, A•B is a WFF but •A is not; neither is •AB. (Interestingly, there are special cases in which the binary can be evaluated from just one input, as if the other is unnecessary. Exercise 6.2, Part IV leads to this discovery.)

Compound Rule 4: A binary WFF is surrounded with parentheses if and only it is an input to an operator. (In performing the operations, the binary inside is done first and then its outcome is the input to the one outside. The parentheses indicate the precedence of the operations by surrounding or marking the scope of the binary operation.)

Consider the difference between ~X•Y and ~(X•Y) when X and Y are both false.

In ~X•Y, the absence of a parenthesis between the ~ and the X indicates that the X is the input to the ~. The result from the ~ operation is the (left) input to the with Y being the (right) input. Since X is false, ~X is true. Therefore ~X•Y is something like "true•false" which is false.

In ~(X•Y), the parenthesis between the ~ and the X indicates that the X is not the input to the ~ since it does not immediately follow the ~! Here, X•Y is the input to the ~ since the ~ is immediately followed by the parentheses that mark the scope of the binary. Now, X•Y is something like "false•false" which is false. So, the final result is something like "~false" which is true!

Another example. Consider ~(X•Y)≡Z
Again the X•Y is the input to the ~ but we are not done. Here the outcome of the ~ is the (left) input to the with Z as its (right) input. Since the is outside of any parentheses, it is the operator of widest scope; it is the main operator.

The final example. In ~[(X•Y)≡Z] the binary (X•Y) is surrounded or encapsulated by the parentheses so it is not considered inside the brackets. There is exactly one binary inside the brackets and that is the triple-bar. What is inside the brackets is the result of the dot operation.

Some consequences of Compound Rule 4.