Jump to content

Ground expression: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Fixed confusion about ground and closed terms; also fixed recursive definition of ground formulas
Line 1: Line 1:
In [[mathematical logic]], a '''ground term''' of a [[formal system]] is a [[term (logic)|term]] that does not contain any variables at all, and a '''closed term''' is a term that has no free variables. In [[first-order logic]] all ground terms are closed terms, but in [[lambda calculus]] the closed term {{nowrap|λ ''x''. ''x'' (λ ''y''. ''y'')}} is not a ground term.
In [[mathematical logic]], a '''ground term''' of a [[formal system]] is a [[term (logic)|term]] that does not contain any free variables.


Similarly, a '''ground formula''' is a [[well formed formula|formula]] that does not contain any variables, and a '''closed formula''' or '''sentence''' is a formula that has no free variables. In first-order logic with identity, the sentence {{all}} ''x'' (''x''=''x'') is not a ground formula.
Similarly, a '''ground formula''' is a [[well formed formula|formula]] that does not contain any free variables. In first-order logic with identity, the sentence {{all}} ''x'' (''x''=''x'') is a ground formula.


A '''ground expression''' is a ground term or ground formula.
A '''ground expression''' is a ground term or ground formula.
Line 12: Line 12:
* '''x'''+''s''(1) and ''s''('''x''') are terms, but not ground terms;
* '''x'''+''s''(1) and ''s''('''x''') are terms, but not ground terms;
* ''s''(0)=1 and 0+0=0 are ground formulae;
* ''s''(0)=1 and 0+0=0 are ground formulae;
* ''s''('''z''')=1 and ∀'''x''': (''s''('''x''')+1=''s''(''s''('''x'''))) are expressions, but are not ground expressions.
* ''s''('''z''')=1 and ∀'''x''': (''s''('''x''')+1=''s''(''s''('''x'''))) are ground expressions.

Ground expressions are necessarily closed. The last example, ∀'''x''': (''s''('''x''')+1=''s''(''s''('''x'''))), shows that a closed expression is not necessarily a ground expression. So, this formula is a closed formula, but not a ground formula, because it ''contains'' a logical variable, even though that variable is not free.


== Formal definition ==
== Formal definition ==
Line 29: Line 27:


=== Ground atom ===
=== Ground atom ===
A '''ground predicate''' or '''ground atom''' is an [[atomic formula]] all of whose terms are ground terms. That is,
A '''ground predicate''' or '''ground atom''' is an [[atomic formula]] all of whose argument terms are ground terms.


If ''p''∈''P'' is an ''n''-ary predicate symbol and α<sub>1</sub>, α<sub>2</sub>, ..., α<sub>n</sub> are ground terms, then ''p''(α<sub>1</sub>, α<sub>2</sub>, ..., α<sub>n</sub>) is a ground predicate or ground atom.
If ''p''∈''P'' is an ''n''-ary predicate symbol and α<sub>1</sub>, α<sub>2</sub>, ..., α<sub>n</sub> are ground terms, then ''p''(α<sub>1</sub>, α<sub>2</sub>, ..., α<sub>n</sub>) is a ground predicate or ground atom.
Line 36: Line 34:


=== Ground formula ===
=== Ground formula ===
A ground formula or ground clause is a formula all of whose arguments are ground atoms.
A ground formula or ground clause is a formula without free variables.


Ground formulae may be defined by syntactic recursion as follows:
Formulas with free variables may be defined by syntactic recursion as follows:
# The free variables of a ground atom are all variables occurring in it;
# A ground atom is a ground formula; that is, if ''p''∈''P'' is an ''n''-ary predicate symbol and α<sub>1</sub>, α<sub>2</sub>, ..., α<sub>n</sub> are ground terms, then ''p''(α<sub>1</sub>, α<sub>2</sub>, ..., α<sub>n</sub>) is a ground formula (and is a ground atom);
# If ''p'' and ''q'' are ground formulae, then ¬(''p''), (''p'')∨(''q''), (''p'')∧(''q''), (''p'')→(''q''), formulas composed with [[logical connective]]s, are ground formulae, too.
# The free variables of ¬(''p'') are the same as those of (''p''). The free variables of (''p'')∨(''q''), (''p'')∧(''q''), (''p'')→(''q'') are those which are free variables of (''p'') or free variables of (''q'').
# The free variables of {{all}}&nbsp;''x''&nbsp;(''p'') and {{exists}}&nbsp;''x''&nbsp;(''p'') are the free variables of ''p'' without ''x''.
# If ''p'' is a ground formula and we can get q from it that way some ( or ) we delete or insert in the p formula, and then the result, q is well-formed and equivalent with p, then q is a ground formula.{{Clarify|date=February 2009}}
# We can get all ground formulae applying these three rules.


== References ==
== References ==

Revision as of 13:13, 3 April 2012

In mathematical logic, a ground term of a formal system is a term that does not contain any free variables.

Similarly, a ground formula is a formula that does not contain any free variables. In first-order logic with identity, the sentence  x (x=x) is a ground formula.

A ground expression is a ground term or ground formula.

Examples

Consider the following expressions from first order logic over a signature containing a constant symbol 0 for the number 0, a unary function symbol s for the successor function and a binary function symbol + for addition.

  • s(0), s(s(0)), s(s(s(0))) ... are ground terms;
  • 0+1, 0+1+1, ... are ground terms.
  • x+s(1) and s(x) are terms, but not ground terms;
  • s(0)=1 and 0+0=0 are ground formulae;
  • s(z)=1 and ∀x: (s(x)+1=s(s(x))) are ground expressions.

Formal definition

What follows is a formal definition for first-order languages. Let a first-order language be given, with the the set of constant symbols, the set of (individual) variables, the set of functional operators, and the set of predicate symbols.

Ground terms

Ground terms are terms that contain no variables. They may be defined by logical recursion (formula-recursion):

  1. elements of C are ground terms;
  2. If fF is an n-ary function symbol and α1, α2, ..., αn are ground terms, then f1, α2, ..., αn) is a ground term.
  3. Every ground term can be given by a finite application of the above two rules (there are no other ground terms; in particular, predicates cannot be ground terms).

Roughly speaking, the Herbrand universe is the set of all ground terms.

Ground atom

A ground predicate or ground atom is an atomic formula all of whose argument terms are ground terms.

If pP is an n-ary predicate symbol and α1, α2, ..., αn are ground terms, then p1, α2, ..., αn) is a ground predicate or ground atom.

Roughly speaking, the Herbrand base is the set of all ground atoms, while a Herbrand interpretation assigns a truth value to each ground atom in the base.

Ground formula

A ground formula or ground clause is a formula without free variables.

Formulas with free variables may be defined by syntactic recursion as follows:

  1. The free variables of a ground atom are all variables occurring in it;
  2. The free variables of ¬(p) are the same as those of (p). The free variables of (p)∨(q), (p)∧(q), (p)→(q) are those which are free variables of (p) or free variables of (q).
  3. The free variables of  x (p) and

x (p) are the free variables of p without x.

References

  • Dalal, M. (2000), "Logic-based computer programming paradigms", in Rosen, K.H.; Michaels, J.G. (eds.), Handbook of discrete and combinatorial mathematics, p. 68
  • Hodges, Wilfrid (1997), A shorter model theory, Cambridge University Press, ISBN 978-0-521-58713-6
  • First-Order Logic: Syntax and Semantics