In
logic:
A well-formed formula (
wff) is a
string of symbols from the
alphabet of a (formal) language, that conforms to the
grammar of the language.
For example: Let's look at a language L. L contains the symbols A and B only, with the following grammar rules:
- A and B are wffs.
- If C and D are wffs then (C v D) is a wff.
Admittedly not a very exciting or useful language. But it serves us well enough for this example. So, in L:
- A is a wff
- A v B is not
- (A v (A v A)) is a wff.
- (A v B v A) is not