Well-formed formula
Part of Formal languages |
In
The abbreviation wff is pronounced "woof", or sometimes "wiff", "weff", or "whiff". [12]
A formal language can be identified with the set of formulas in the language. A formula is a
Introduction
A key use of formulas is in
Although the term "formula" may be used for written marks (for instance, on a piece of paper or chalkboard), it is more precisely understood as the sequence of symbols being expressed, with the marks being a
Formulas themselves are syntactic objects. They are given meanings by interpretations. For example, in a propositional formula, each propositional variable may be interpreted as a concrete proposition, so that the overall formula expresses a relationship between these propositions. A formula need not be interpreted, however, to be considered solely as a formula.
Propositional calculus
The formulas of propositional calculus, also called propositional formulas,[14] are expressions such as . Their definition begins with the arbitrary choice of a set V of 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 formulas will be certain expressions (that is, strings of symbols) over this alphabet.
The formulas are
- Each propositional variable is, on its own, a formula.
- If φ is a formula, then ¬φ is a formula.
- If φ and ψ are formulas, and • is any binary connective, then ( φ • ψ) is a formula. Here • could be (but is not limited to) the usual operators ∨, ∧, →, 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)
<form> ::= <alpha set> | ¬<form> | (<form>∧<form>) | (<form>∨<form>) | (<form>→<form>) | (<form>↔<form>)
Using this grammar, the sequence of symbols
- (((p → q) ∧ (r → s)) ∨ (¬q ∧ ¬s))
is a formula, because it is grammatically correct. The sequence of symbols
- ((p → q)→(qq))p))
is not a formula, because it does not conform to the grammar.
A complex formula may be difficult to read, owing to, for example, the proliferation of parentheses. To alleviate this last phenomenon, precedence rules (akin to the
- (((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 formula. If the precedence was assumed, for example, to be left-right associative, in following order: 1. ¬ 2. ∧ 3. ∨ 4. →, then the same formula above (without parentheses) would be rewritten as
- (p → (q ∧ r)) → (s ∨ (¬q ∧ ¬s))
Predicate logic
The definition of a formula in first-order logic is relative to the
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 predicate symbol, and t1,...,tn are terms, then R(t1,...,tn) is an atomic formula
Finally, the set of formulas is defined to be the smallest set containing the set of atomic formulas such that the following holds:
- is a formula when is a formula
- and are formulas when and are formulas;
- is a formula when is a variable and is a formula;
- is a formula when is a variable and is a formula (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 formula starting with a sequence of existential quantification followed by a quantifier-free formula.
Atomic and open formulas
An atomic formula is a formula that contains no
According to some terminology, an open formula is formed by combining atomic formulas using only logical connectives, to the exclusion of quantifiers.[15] This is not to be confused with a formula which is not closed.
Closed formulas
A closed formula, also
Properties applicable to formulas
- A formula A in a language is valid if it is true for every interpretationof .
- A formula A in a language is satisfiable if it is true for some interpretationof .
- A formula A of the language of substitutionof the free variables of A, says that either the resulting instance of A is provable or its negation is.
Usage of the terminology
In earlier works on mathematical logic (e.g. by Church[16]), formulas referred to any strings of symbols and among these strings, well-formed formulas were the strings that followed the formation rules of (correct) formulas.
Several authors simply say formula.
The expression "well-formed formulas" (WFF) also crept into popular culture. WFF is part of an esoteric pun used in the name of the academic game "
See also
Notes
- ^ Formulas are a standard topic in introductory logic, and are covered by all introductory textbooks, including Enderton (2001), Gamut (1990), and Kleene (1967)
- ISBN 978-1-134-58880-0.
- ISBN 978-1-4471-3657-6.
- ISBN 978-1-4422-1742-3.
- ISBN 978-1-77048-495-5.
- ISBN 978-1-77048-868-7.
- ISBN 978-1-56881-166-6.
- ISBN 978-1-77048-215-9.
- ISBN 978-1-4302-1042-9.
- ISBN 978-1-4919-5171-2.
- ISBN 978-1-55111-250-3.
- ^ All sources supported "woof". The sources cited for "wiff", "weff", and "whiff" gave these pronunciations as alternatives to "woof". The Gensler source gives "wood" and "woofer" as examples of how to pronounce the vowel in "woof".
- ^ W. Dean, S. Walsh, The Prehistory of the Subsystems of Second-order Arithmetic (2016), p.6
- ^ First-order logic and automated theorem proving, Melvin Fitting, Springer, 1996 [1]
- ^ Handbook of the history of logic, (Vol 5, Logic from Russell to Church), Tarski's logic by Keith Simmons, D. Gabbay and J. Woods Eds, p568 [2].
- ^ Alonzo Church, [1996] (1944), Introduction to mathematical logic, page 49
- ^ Hilbert, David; Ackermann, Wilhelm (1950) [1937], Principles of Mathematical Logic, New York: Chelsea
- ISBN 978-0-521-58713-6
- ISBN 978-0-444-86388-1
- ISBN 978-0-19-850048-3
- ^ Ehrenburg 2002
- 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
- ISBN 978-0-521-00758-0
- Ehrenberg, Rachel (Spring 2002). "He's Positively Logical". Michigan Today. University of Michigan. Archived from the original on 2009-02-08. Retrieved 2007-08-19.
- Enderton, Herbert (2001), A mathematical introduction to logic (2nd ed.), Boston, MA: 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 0-226-28085-3
- Hodges, Wilfrid (2001), "Classical Logic I: First-Order Logic", in Goble, Lou (ed.), The Blackwell Guide to Philosophical Logic, Blackwell, ISBN 978-0-631-20692-7
- ISBN 978-0-14-005579-5
- MR 1950307
- ISBN 978-1-4419-1220-6
External links
- Well-Formed Formula for First Order Predicate Logic - includes a short Java quiz.
- Well-Formed Formula at ProvenMath