construction of well-formed formulas

construction of well-formed formulas

Given a

countable set

V

of

propositional variables

, and a set

F

of

logical connectives

disjoint

from

V

, one can create the set of all finite strings (or words) over

V

∪

F

.

Ways of Forming a Single Well-formed Formula

A

well-formed formula

, or wff for short, is then a special kind of finite string, sometimes called a term, formed in a specific, pre-determined manner:

1.

First, any propositional variable is always a wff. A wff that is a propositional variable is sometimes called an

atom

.

2.

Once we have formed a set wffs, we may form new ones. Given an

n

-ary

connective

α

∈

F

, and wffs

p

1

,

…

,

p

n

, there are several methods to

represent

the newly formed wff, some of the common ones are:

–

α

⁢

p

1

⁢

⋯

⁢

p

n

–

p

1

⁢

⋯

⁢

p

n

⁢

α

–

(

α

⁢

p

1

⁢

⋯

⁢

p

n

)

–

α

⁢

(

p

1

,

⋯

,

p

n

)

In particular, every nullary connective (

constant

) is a wff (with no additional wffs attached).

3.

The above two rules are the only rules of forming wffs.

Using the first method, therefore, finite strings such as

v

2

,

α

⁢

v

1

⁢

v

2

,

and

β

⁢

v

3

⁢

α

⁢

v

2

⁢

β

⁢

v

1

⁢

v

1

⁢

v

3

⁢

v

2

are well-formed formulas, while

v

2

⁢

v

3

,

v

1

⁢

α

⁢

v

2

⁢

v

1

,

and

β

⁢

v

2

⁢

v

3

are not, where

α

and

β

are binary and ternary connectives respectively, and

v

i

are atoms.

Notice that in the last two methods,

auxiliary symbols

, such as the parentheses and the comma, are introduced to help the comprehensibility of wffs. Therefore, the third wff above becomes

(

β

⁢

v

3

⁢

(

α

⁢

v

2

⁢

(

β

⁢

v

1

⁢

v

1

⁢

v

3

)

)

⁢

v

2

)

using the second method, and

β

⁢

(

v

3

,

α

⁢

(

v

2

,

β

⁢

(

v

1

,

v

1

,

v

3

)

)

,

v

2

)

using the third method.

Remark

. It is customary is to infix the connective between the two wffs, when the connective is binary, so that

(

α

⁢

p

⁢

q

)

or

α

⁢

(

p

,

q

)

becomes

(

p

⁢

α

⁢

q

)

. Parentheses become necessary when using the

infix notations

, so as to avoid ambiguity. For example, is

p

∨

q

∧

r

constructed from

p

∨

q

and

r

via

∧

, or

p

and

q

∧

r

via

∨

? Both are possible!

Formation of All Well-formed Formulas

Pick a method of forming wffs above, say, the first method. Rules 1 and 2 above suggest that if we were to

construct

the set

V

¯

of all wffs, we need to start with the set

V

of atoms. From

V

, we next form the set of wffs of the form

α

⁢

p

1

⁢

⋯

⁢

p

n

, where each

p

i

is an atom, and where

α

(

n

-ary) ranges over the entire set

F

. This will go one indefinitely. In other words, we construct

V

¯

inductively as follows:

1.

V

0

:=

V

,

2.

V

i

+

1

:=

V

i

∪

⋃

α

∈

F

{

α

⁢

p

1

⁢

⋯

⁢

p

n

∣

α

⁢

is

⁢

n

⁢

-ary and each

⁢

p

j

∈

V

i

}

,

3.

V

¯

:=

⋃

i

=

0

∞

V

i

.

Notice that constants are in every

V

i

where

i

>

0

.

It can be shown that every wff can be uniquely written as

α

⁢

p

1

⁢

⋯

⁢

p

n

for some

n

-ary connective and wffs

p

i

in

V

¯

. This is called the

unique readability

of wffs.

Furthermore,

V

¯

has a natural

algebraic structure

, as we may associate each

α

∈

F

a finitary operation

[

α

]

on

V

¯

, given by

[

α

]

⁢

(

p

1

,

…

,

p

n

)

=

α

⁢

p

1

⁢

⋯

⁢

p

n

. By defining

[

F

]

:=

{

[

α

]

∣

α

∈

F

}

, we see that

V

¯

is

closed under

each

operation

in

[

F

]

, or that

V

¯

is an

inductive set

over

V

with respect to

[

F

]

. In fact, it is the smallest inductive set over

V

(See Rule 3 above).

Finally, if

F

is finite, it is not hard to see that

V

¯

is effectively enumerable, and there is an algorithm deciding whether a string is a wff or not.

Title

construction of well-formed formulas

Canonical

name

ConstructionOfWellformedFormulas

Date of creation

2013-03-22 18:52:20

Last modified on

2013-03-22 18:52:20

Owner

CWoo (3771)

Last modified by

CWoo (3771)

Numerical id

10

Author

CWoo (3771)

Entry type

Feature

Classification

msc 03B05

Generated on Thu Feb 8 19:22:38 2018 by

LaTeXML