Well-formed formula

El directorio enciclopédico desde la Wikipedia.

In computer science and mathematical logic, a well-formed formula or formula (often abbreviated WFF, pronounced "wiff" or "wuff") is a symbol or string of symbols that is generated by the formal grammar of a formal language. To say that a string \ S is a WFF with respect to a given formal grammar \ G is equivalent to saying that \ S belongs to the language generated by \ G. A formal language can be identified with the set of its WFFs.

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. This final WFF is called a theorem when it plays a significant role in the theory being developed, or a lemma when it plays an accessory role in the proof of a theorem.

Contents

[edit] Propositional calculus

The well-formed formulae of the propositional calculus \mathcal{L} are recursively defined as follows:

  • Each propositional variable is, on its own, a formula.
  • If φ is a formula, then \lnot \phi is a formula.
  • If φ and ψ are formulas, and • is any binary connective, then ( φ • ψ) is a formula. Here • could be ∨, ∧, →, or ↔.

This definition can also be written as a formal grammar in Backus–Naur form:

<alpha set> ::= p | q | r | s | t | u | ... (arbitrary finite set of propositional variables)
<wff> ::= <alpha set> | \neg<wff> | (<wff>\wedge<wff>) | (<wff>\vee<wff>) | (<wff>\rightarrow<wff>) | (<wff>\leftrightarrow<wff>)

Using this grammar, the sequence of symbols

(((p \rightarrow q) \wedge (r \rightarrow s)) \vee (\negq \wedge \negs))

is a WFF because it is grammatically correct. The sequence of symbols

((p \rightarrow q)\rightarrow(qq))p))

is not a WFF, because it does not conform to the grammar of \mathcal{L}.

Note that sometimes WFF may become very hard 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. \neg   2. \rightarrow  3. \wedge  4. \vee, the above correct expression may be written as:

p \rightarrow q \wedge r \rightarrow s \vee \negq \wedge \negs

This is, however, only a convention used to simplify the written representation of a WFF (commonly used in programming languages).

[edit] 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.

  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 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:

  1. \neg\phi is a WFF when \ \phi is a WFF
  2. (\phi \land \psi) and (\phi \lor \psi) are WFFs when \ \phi and \ \psi are WFFs;
  3. \exists x\, \phi is a WFF when x is a variable and \ \phi is a WFF;
  4. \forall x\, \phi is a WFF when \ x is a variable and \ \phi is a WFF (alternatively, \forall x\, \phi could be defined as an abbreviation for \neg\exists x\, \neg\phi).

If a formula has no occurrences of \exists x or \forall x, for any variable \ x, then it is called quantifier-free. An existential formula is a string of existential quantification followed by a quantifier-free formula.

[edit] Trivia

WFF is part of an esoteric pun used in the name of "WFF 'N PROOF: The Game of Modern Logic," by Layman Allen[1], 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)[2]. Its name is a pun on whiffenpoof, a nonsense word used as a cheer at Yale University made popular in The Whiffenpoof Song and The Whiffenpoofs[3].

[edit] See also

[edit] Notes

  1. ^ Ehrenberg, Rachel (Spring 2002). "He's Positively Logical", Michigan Today, University of Michigan. Retrieved on 19 August 2007. 
  2. ^ More technically, propositional logic using the Fitch-style calculus.
  3. ^ Layman E. Allen.Toward Autotelic Learning of Mathematical Logic by the WFF 'N PROOF Games, Monographs of the Society for Research in Child Development, Vol. 30, No. 1, Mathematical Learning: Report of a Conference Sponsored by the Committee on Intellective Processes Research of the Social Science Research Council (1965), pp. 29-41. Acknowledges the pun.

[edit] External links

Página espejo de la Wikipedia
Directorio de Enlaces Directorio dmoz Directorio espejo dmoz Pedro Bernardo