fbpx
Wikipedia

Well-formed formula

In mathematical logic, propositional logic and predicate logic, a well-formed formula, abbreviated WFF or wff, often simply formula, is a finite sequence of symbols from a given alphabet that is part of a formal language.[1] A formal language can be identified with the set of formulas in the language.

A formula is a syntactic object that can be given a semantic meaning by means of an interpretation. Two key uses of formulas are in propositional logic and predicate logic.

Introduction Edit

A key use of formulas is in propositional logic and predicate logic 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 formulas with certain properties, and the final formula in the sequence is what is proven.

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 token instance of formula. This distinction between the vague notion of "property" and the inductively-defined notion of well-formed formula has roots in Weyl's 1910 paper "Uber die Definitionen der mathematischen Grundbegriffe".[2] Thus the same formula may be written more than once, and a formula might in principle be so long that it cannot be written at all within the physical universe.

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 Edit

The formulas of propositional calculus, also called propositional formulas,[3] 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 inductively defined as follows:

  • 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

(((pq) ∧ (rs)) ∨ (¬q ∧ ¬s))

is a formula, because it is grammatically correct. The sequence of symbols

((pq)→(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 standard mathematical order of operations) 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 formula

(((pq) ∧ (rs)) ∨ (¬q ∧ ¬s))

may be abbreviated as

pqrs ∨ ¬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 → (qr)) → (s ∨ (¬q ∧ ¬s))

Predicate logic Edit

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, predicate symbols, and function symbols of the theory at hand, along with the arities of the function and predicate 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.

  1. Any variable is a term.
  2. Any constant symbol from the signature is a term
  3. 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.

  1. If t1 and t2 are terms then t1=t2 is an atomic formula
  2. 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:

  1.   is a formula when   is a formula
  2.   and   are formulas when   and   are formulas;
  3.   is a formula when   is a variable and   is a formula;
  4.   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 Edit

An atomic formula is a formula that contains no logical connectives nor quantifiers, or equivalently a formula that has no strict subformulas. 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.

According to some terminology, an open formula is formed by combining atomic formulas using only logical connectives, to the exclusion of quantifiers.[4] This is not to be confused with a formula which is not closed.

Closed formulas Edit

A closed formula, also ground formula or sentence, is a formula in which there are no free occurrences of any variable. 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.

Properties applicable to formulas Edit

  • A formula A in a language   is valid if it is true for every interpretation of  .
  • A formula A in a language   is satisfiable if it is true for some interpretation of  .
  • A formula A of the language of arithmetic is decidable if it represents a decidable set, i.e. if there is an effective method which, given a substitution of the free variables of A, says that either the resulting instance of A is provable or its negation is.

Usage of the terminology Edit

In earlier works on mathematical logic (e.g. by Church[5]), 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.[6][7][8][9] Modern usages (especially in the context of computer science with mathematical software such as model checkers, automated theorem provers, interactive theorem provers) tend to retain of the notion of formula only the algebraic concept and to leave the question of well-formedness, i.e. of the concrete string representation of formulas (using this or that symbol for connectives and quantifiers, using this or that parenthesizing convention, using Polish or infix notation, etc.) as a mere notational problem.

While the expression well-formed formula is still in use,[10][11][12] these authors do not necessarily[weasel words] use it in contradistinction to the old sense of formula, which is no longer common in mathematical logic.[citation needed]

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 "WFF 'N PROOF: The Game of Modern Logic," by Layman Allen,[13] 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).[14] 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.[15]

See also Edit

Notes Edit

  1. ^ Formulas are a standard topic in introductory logic, and are covered by all introductory textbooks, including Enderton (2001), Gamut (1990), and Kleene (1967)
  2. ^ W. Dean, S. Walsh, The Prehistory of the Subsystems of Second-order Arithmetic (2016), p.6
  3. ^ First-order logic and automated theorem proving, Melvin Fitting, Springer, 1996 [1]
  4. ^ 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].
  5. ^ Alonzo Church, [1996] (1944), Introduction to mathematical logic, page 49
  6. ^ Hilbert, David; Ackermann, Wilhelm (1950) [1937], Principles of Mathematical Logic, New York: Chelsea
  7. ^ Hodges, Wilfrid (1997), A shorter model theory, Cambridge University Press, ISBN 978-0-521-58713-6
  8. ^ Barwise, Jon, ed. (1982), Handbook of Mathematical Logic, Studies in Logic and the Foundations of Mathematics, Amsterdam: North-Holland, ISBN 978-0-444-86388-1
  9. ^ Cori, Rene; Lascar, Daniel (2000), Mathematical Logic: A Course with Exercises, Oxford University Press, ISBN 978-0-19-850048-3
  10. ^ Enderton, Herbert [2001] (1972), A mathematical introduction to logic (2nd ed.), Boston, MA: Academic Press, ISBN 978-0-12-238452-3
  11. ^ R. L. Simpson (1999), Essentials of Symbolic Logic, page 12
  12. ^ Mendelson, Elliott [2010] (1964), An Introduction to Mathematical Logic (5th ed.), London: Chapman & Hall
  13. ^ Ehrenburg 2002
  14. ^ More technically, propositional logic using the Fitch-style calculus.
  15. ^ Allen (1965) acknowledges the pun.

References Edit

External links Edit

  • Well-Formed Formula for First Order Predicate Logic - includes a short Java quiz.
  • Well-Formed Formula at ProvenMath

well, formed, formula, broader, coverage, this, topic, mathematical, formula, mathematical, logic, propositional, logic, predicate, logic, well, formed, formula, abbreviated, often, simply, formula, finite, sequence, symbols, from, given, alphabet, that, part,. For broader coverage of this topic see Mathematical formula In mathematical logic propositional logic and predicate logic a well formed formula abbreviated WFF or wff often simply formula is a finite sequence of symbols from a given alphabet that is part of a formal language 1 A formal language can be identified with the set of formulas in the language A formula is a syntactic object that can be given a semantic meaning by means of an interpretation Two key uses of formulas are in propositional logic and predicate logic Contents 1 Introduction 2 Propositional calculus 3 Predicate logic 4 Atomic and open formulas 5 Closed formulas 6 Properties applicable to formulas 7 Usage of the terminology 8 See also 9 Notes 10 References 11 External linksIntroduction EditA key use of formulas is in propositional logic and predicate logic such as first order logic In those contexts a formula is a string of symbols f for which it makes sense to ask is f true once any free variables in f have been instantiated In formal logic proofs can be represented by sequences of formulas with certain properties and the final formula in the sequence is what is proven 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 token instance of formula This distinction between the vague notion of property and the inductively defined notion of well formed formula has roots in Weyl s 1910 paper Uber die Definitionen der mathematischen Grundbegriffe 2 Thus the same formula may be written more than once and a formula might in principle be so long that it cannot be written at all within the physical universe 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 EditMain article Propositional calculus The formulas of propositional calculus also called propositional formulas 3 are expressions such as A B C displaystyle A land B lor C nbsp 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 inductively defined as follows Each propositional variable is on its own a formula If f is a formula then f is a formula If f and ps are formulas and is any binary connective then f ps 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 lt alpha set gt p q r s t u the arbitrary finite set of propositional variables lt form gt lt alpha set gt lt form gt lt form gt lt form gt lt form gt lt form gt lt form gt lt form gt lt form gt lt form gt 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 standard mathematical order of operations 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 formula p q r s q s may be abbreviated as p q r s q sThis 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 EditThe definition of a formula in first order logic Q S displaystyle mathcal QS nbsp is relative to the signature of the theory at hand This signature specifies the constant symbols predicate symbols and function symbols of the theory at hand along with the arities of the function and predicate 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 predicate symbol and t1 tn are terms then R t1 tn is an atomic formulaFinally the set of formulas is defined to be the smallest set containing the set of atomic formulas such that the following holds ϕ displaystyle neg phi nbsp is a formula when ϕ displaystyle phi nbsp is a formula ϕ ps displaystyle phi land psi nbsp and ϕ ps displaystyle phi lor psi nbsp are formulas when ϕ displaystyle phi nbsp and ps displaystyle psi nbsp are formulas x ϕ displaystyle exists x phi nbsp is a formula when x displaystyle x nbsp is a variable and ϕ displaystyle phi nbsp is a formula x ϕ displaystyle forall x phi nbsp is a formula when x displaystyle x nbsp is a variable and ϕ displaystyle phi nbsp is a formula alternatively x ϕ displaystyle forall x phi nbsp could be defined as an abbreviation for x ϕ displaystyle neg exists x neg phi nbsp If a formula has no occurrences of x displaystyle exists x nbsp or x displaystyle forall x nbsp for any variable x displaystyle x nbsp 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 EditMain article Atomic formula An atomic formula is a formula that contains no logical connectives nor quantifiers or equivalently a formula that has no strict subformulas 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 According to some terminology an open formula is formed by combining atomic formulas using only logical connectives to the exclusion of quantifiers 4 This is not to be confused with a formula which is not closed Closed formulas EditMain article Sentence logic A closed formula also ground formula or sentence is a formula in which there are no free occurrences of any variable 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 Properties applicable to formulas EditA formula A in a language Q displaystyle mathcal Q nbsp is valid if it is true for every interpretation of Q displaystyle mathcal Q nbsp A formula A in a language Q displaystyle mathcal Q nbsp is satisfiable if it is true for some interpretation of Q displaystyle mathcal Q nbsp A formula A of the language of arithmetic is decidable if it represents a decidable set i e if there is an effective method which given a substitution of the free variables of A says that either the resulting instance of A is provable or its negation is Usage of the terminology EditIn earlier works on mathematical logic e g by Church 5 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 6 7 8 9 Modern usages especially in the context of computer science with mathematical software such as model checkers automated theorem provers interactive theorem provers tend to retain of the notion of formula only the algebraic concept and to leave the question of well formedness i e of the concrete string representation of formulas using this or that symbol for connectives and quantifiers using this or that parenthesizing convention using Polish or infix notation etc as a mere notational problem While the expression well formed formula is still in use 10 11 12 these authors do not necessarily weasel words use it in contradistinction to the old sense of formula which is no longer common in mathematical logic citation needed 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 WFF N PROOF The Game of Modern Logic by Layman Allen 13 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 14 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 15 See also Edit nbsp Philosophy portalGround expression Well defined expressionNotes Edit Formulas are a standard topic in introductory logic and are covered by all introductory textbooks including Enderton 2001 Gamut 1990 and Kleene 1967 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 Hodges Wilfrid 1997 A shorter model theory Cambridge University Press ISBN 978 0 521 58713 6 Barwise Jon ed 1982 Handbook of Mathematical Logic Studies in Logic and the Foundations of Mathematics Amsterdam North Holland ISBN 978 0 444 86388 1 Cori Rene Lascar Daniel 2000 Mathematical Logic A Course with Exercises Oxford University Press ISBN 978 0 19 850048 3 Enderton Herbert 2001 1972 A mathematical introduction to logic 2nd ed Boston MA Academic Press ISBN 978 0 12 238452 3 R L Simpson 1999 Essentials of Symbolic Logic page 12 Mendelson Elliott 2010 1964 An Introduction to Mathematical Logic 5th ed London Chapman amp Hall Ehrenburg 2002 More technically propositional logic using the Fitch style calculus Allen 1965 acknowledges the pun References EditAllen 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 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 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 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 Hofstadter Douglas 1980 Godel 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 ISBN 978 0 486 42533 7 MR 1950307 Rautenberg Wolfgang 2010 A Concise Introduction to Mathematical Logic 3rd ed New York Springer Science Business Media doi 10 1007 978 1 4419 1221 3 ISBN 978 1 4419 1220 6External links EditWell Formed Formula for First Order Predicate Logic includes a short Java quiz Well Formed Formula at ProvenMath Retrieved from https en wikipedia org w index php title Well formed formula amp oldid 1180270845, wikipedia, wiki, book, books, library,

article

, read, download, free, free download, mp3, video, mp4, 3gp, jpg, jpeg, gif, png, picture, music, song, movie, book, game, games.