An example of a closed formula with truth value
false involves the sequence of
Fermat numbers :F_{n} = 2^{2^n} + 1, studied by Fermat in connection to the primality. The attachment of the predicate letter P (
is prime) to each number from the Fermat sequence gives a set of closed formulae. While they are true for
n = 0,...,4, no larger value of
n is known that obtains a true formula, ; for example, F_5 = 4 \,294 \,967 \,297 = 641 \cdot 6\,700\,417 is not a prime. Thus the closed formula ∀
n P(
Fn) is false. In
database theory, when expressing a query as an open
first-order formula, the free variables represent the ones that in an
SQL query would occur in the
SELECT clause. For example, a formula like: :\varphi(son) = birthYear(son,2020) \land \exists mom\textbf{.}(motherOf(mom,son) \land birthYear(mom,1999)) where son is the only free variable, could be expressed in SQL as follows: SELECT y1.person AS son FROM birth_year y1 WHERE y1.year = 2020 AND EXISTS ( SELECT * FROM mother_of m1 JOIN birth_year y2 ON m1.mother = y2.person WHERE m1.son = y1.person AND y2.year = 1999 ) which selects all the people born in 2020 and having a mother born in 1999. Formally, executing the above SQL query over a database is equivalent to look for all the
substitutions \sigma of the free variables of \varphi with constants such that the
Herbrand interpretation of \mathcal{D}
satisfies \sigma(\varphi), where \mathcal{D} is the set of
ground atoms representing the database. == See also ==