Well-formed formula
In mathematical logic, a well-formed formula (often abbreviated wff) is a word (i.e. a finite sequence of symbols from a given alphabet) which is part of a formal language.[2] It is a syntactic object that can be given a semantic meaning. A formal language can be considered to be identical to the set containing all and only its wffs.
In more recent usage well-formed formulas are simply called formulas[3], because it is no longer common in this context to refer to arbitrary words in this way.
Contents |
Introduction
A key use of wffs is in propositional logic and predicate logics such as first-order logic. In those contexts, a formula is a string of symbols φ for which it makes sense to ask "is φ true?", once any free variables in φ have been instantiated. In formal logic, proofs can be represented by sequences of wffs with certain properties, and the final wff in the sequence is what is proven.
Although the term "well-formed formula" may be used for written marks (for instance, on a piece of paper or chalkboard), it is more precisely understood as the sequence being expressed, with the marks being a token instance of formula. It is not necessary for the existence of a well-formed formula that there be any actual tokens of it. A formal language may thus have an infinite number of well-formed formulas regardless whether each formula has a token instance. Moreover, a single formula may have more than one token instance, if it is written more than once.
Well-formed formulas are quite often interpreted as propositions (as, for instance, in propositional logic). However wffs are syntactic entities, and as such must be specified in a formal language without regard to any interpretation of them. An interpreted well-formed formula may be the name of something, an adjective, an adverb, a preposition, a phrase, a clause, an imperative sentence, a string of sentences, a string of names, etcetera. A well-formed formula may even turn out to be nonsense, if the symbols of the language are specified so that it does. Furthermore, a well-formed formula need not be given any interpretation.
Propositional calculus
The well-formed formulas of propositional calculus are expressions such as
. Their definition begins with the arbitrary choice of a set of V propositional variables. The alphabet consists of the letters in V along with the symbols for the propositional connectives and parentheses "(" and ")", all of which are assumed to not be in V. The wffs will be certain expressions (that is, strings of symbols) over this alphabet.
The well-formed formulas are inductively defined as follows:
- Each propositional variable is, on its own, a wff.
- If φ is a wff, then
φ is a wff. - If φ and ψ are wffs, and • is any binary connective, then ( φ • ψ) is a wff. Here • could be ∨, ∧, →, or ↔.
This definition can also be written as a formal grammar in Backus–Naur form, provided the set of variables is finite:
- <alpha set> ::= p | q | r | s | t | u | ... (the arbitrary finite set of propositional variables)
- <wff> ::= <alpha set> |
<wff> | (<wff>
<wff>) | (<wff>
<wff>) | (<wff>
<wff>) | (<wff>
<wff>)
Using this grammar, the sequence of symbols
- (((p
q)
(r
s))
(
q
s))
is a WFF, because it is grammatically correct. The sequence of symbols
- ((p
q)
(qq))p))
is not a WFF, because it does not conform to the grammar.
A complex wff may be difficult to read, owing to, for example, the proliferation of parentheses. To alleviate this last phenomenon, precedence rules are assumed among the operators, making some operators more binding than others. For example, assuming the precedence (from most binding to least binding) 1.
2.
3.
4.
. Then the wff
- (((p
q)
(r
s))
(
q
s))
may be abbreviated as
- p
q
r
s
q
s
This is, however, only a convention used to simplify the written representation of a wff.
Predicate logic
The definition of a formula in first-order logic
is relative to the signature of the theory at hand. This signature specifies the constant symbols, relation symbols, and function symbols of the theory at hand, along with the arities of the function and relation symbols.
The definition of a formula comes in several parts. First, the set of terms is defined recursively. Terms, informally, are expressions that represent objects from the domain of discourse.
- Any variable is a term.
- Any constant symbol from the signature is a term
- an expression of the form f(t1,...,tn), where f is an n-ary function symbol, and t1,...,tn are terms, is again a term.
The next step is to define the atomic formulas.
- If t1 and t2 are terms then t1=t2 is an atomic formula
- If R is an n-ary relation symbol, and t1,...,tn are terms, then R(t1,...,tn) is an atomic formula
Finally, the set of WFFs is defined to be the smallest set containing the set of atomic WFFs such that the following holds:
is a WFF when
is a WFF
and
are WFFs when
and
are WFFs;
is a WFF when x is a variable and
is a WFF;
is a WFF when
is a variable and
is a WFF (alternatively,
could be defined as an abbreviation for
).
If a formula has no occurrences of
or
, for any variable
, then it is called quantifier-free. An existential formula is a string of existential quantification followed by a quantifier-free formula.
Atomic and open formulas
An atomic formula is a formula that contains no logical connectives or equivalently a formula that has no strict subformulas.
An open formula is formed by combining atomic formulas using logical connectives.
The precise form of atomic formulas depends on the formal system under consideration; for propositional logic, for example, the atomic formulas are the propositional variables. For predicate logic, the atoms are predicate symbols together with their arguments, each argument being a term.
Closed formulas
A closed formula is a formula in which there are no free occurrences of any variable.
Valid formula
A formula A of a first order language
is valid if it is true for every interpretation of
.
Closure of a formula
If A is a formula of a first-order language in which the variables v1, ... , vn have free occurrences, then A preceded by
v1 ...
vn is a closure of A.
Satisfiable formula
A formula A of a first order language
is satisfiable iff there is some interpretation
of
for which A is satisfied (i.e. there is an interpretation
such that A is satisfied by at least one denumerable sequence of members of the domain of
.)
Undecidable formula
A formula A is decidable in a first-order system
iff either A or its negation is a theorem of
.
Wffs in popular culture
WFF is part of an esoteric pun used in the name of "WFF 'N PROOF: The Game of Modern Logic," by Layman Allen[4], developed while he was at Yale Law School (he was later a professor at the University of Michigan). The suite of games is designed to teach the principles of symbolic logic to children (in Polish notation)[5]. Its name is an echo of whiffenpoof, a nonsense word used as a cheer at Yale University made popular in The Whiffenpoof Song and The Whiffenpoofs[6].
See also
Notes
- ^ Hofstadter 1980
- ^ Wffs are a standard topic in introductory logic, and are covered by all introductory textbooks, including Enderton (2001), Gamut (1990), and Kleene (1967)
- ^ Hodges 2001
- ^ Ehrenburg 2002
- ^ More technically, propositional logic using the Fitch-style calculus.
- ^ Allen (1965) acknowledges the pun.
References
- Allen, Layman E. (1965), "Toward Autotelic Learning of Mathematical Logic by the WFF 'N PROOF Games", Mathematical Learning: Report of a Conference Sponsored by the Committee on Intellective Processes Research of the Social Science Research Council, Monographs of the Society for Research in Child Development 30 (1): 29–41
- Boolos, George; Burgess, John; Jeffrey, Richard (2002), Computability and Logic (4th ed.), Cambridge University Press, ISBN 9780521007580 (pb.)
- Ehrenberg, Rachel (Spring 2002). "He's Positively Logical". Michigan Today (University of Michigan). http://www.umich.edu/~newsinfo/MT/02/Spr02/mt9s02.html. Retrieved 2007-08-19.
- Enderton, Herbert (2001), A mathematical introduction to logic (2nd ed.), Boston, MA: Academic Press, ISBN 978-0-12-238452-3
- Gamut, L.T.F. (1990), Logic, Language, and Meaning, Volume 1: Introduction to Logic, University Of Chicago Press, ISBN 0226280853
- Goble, Lou, ed. (2001), The Blackwell Guide to Philosophical Logic, Blackwell, ISBN 978-0-631-20692-7
- Hofstadter, Douglas (1980), Gödel, Escher, Bach: An Eternal Golden Braid, Penguin Books, ISBN 978-0-14-005579-5
- Kleene, Stephen Cole (2002) [1967], Mathematical logic, New York: Dover Publications, MR1950307, ISBN 978-0-486-42533-7
External links
- Well-Formed Formula for First Order Predicate Logic - includes a short Java quiz.
- Well-Formed Formula at ProvenMath
- WFF N PROOF game site