Unfolding defined symbols #
A language L is often extended by symbols that are definable in L. For example, successor can
be added to an ordered vocabulary as a primitive relation. Cslib.Logic.FO.unfoldSymbols
translates formulas of the extended language back into L. Each function symbol is replaced by
a term of L and each relation symbol by a formula of L; variables, connectives and
quantifiers are unchanged. A symbol that L already has is replaced by itself, applied to its
argument variables. If every replacement defines its symbol in a structure M, the translation
preserves truth in M (Cslib.Logic.FO.realize_unfoldSymbols).
The definitions may use quantifiers, so the translation of a quantifier-free formula need not
be quantifier-free; it is when every relation definition is (Cslib.Logic.FO.isQF_unfoldSymbols).
Function symbols are replaced with Mathlib's Term.substFunc.
Cslib.Logic.FO.Interpretation.onFormula also replaces each relation symbol by a formula. It
interprets a relational language on tuples cut out by a domain formula, so it changes the
universe and handles no function symbols. Here the universe stays the same and the language may
keep its constants and functions.
Main definitions #
Cslib.Logic.FO.unfoldSymbols: replace each symbol by its definition.
Main results #
Cslib.Logic.FO.realize_unfoldSymbols,Cslib.Logic.FO.realize_unfoldSymbols_formula: the translation preserves truth in every structure where the definitions hold.Cslib.Logic.FO.isQF_unfoldSymbols: quantifier-free relation definitions preserve quantifier-freeness.
Replace each function symbol of L by a term of L' and each relation symbol of L by a
formula of L' in the argument variables. Variables, connectives and quantifiers are kept.
Unfolding by quantifier-free relation definitions preserves quantifier-freeness. Function symbols may be replaced by arbitrary terms.
Unfolding preserves truth. If each function symbol of L agrees in M with its
replacement term and each relation symbol with its replacement formula, then a bounded formula
and its translation hold under the same assignments.
Unfolding preserves the truth of formulas, under the hypotheses of
Cslib.Logic.FO.realize_unfoldSymbols.