Substitution and free-variable relabelling of infinitary formulas #
BoundedFormulaInf.subst substitutes terms for free variables, leaving bound slots unchanged.
BoundedFormulaInf.relabel can instead send free variables to free variables or to newly
introduced bound slots. These operations preserve the branching carrier and work without
countability assumptions. Their realization laws describe the resulting valuations, including
under quantifiers and infinitary connectives.
Relabelling follows Mathlib's FirstOrder.Language.BoundedFormula.relabel: the new slots come
before the old slots. In particular, a map α → β ⊕ Fin m sends a formula with n slots to one
with m + n slots. We reuse Mathlib's BoundedFormula.relabelAux and its valuation law rather
than implementing the finite-index arithmetic again. Substitution similarly follows
BoundedFormula.subst and reuses Term.subst.
The corresponding operations in Cameron Freer's cameronfreer/infinitary-logic,
InfinitaryLogic/Lomega1omega/Operations.lean at checkpoint
9f82bd572af2d79a043c6bc3f1b745f14e0bcaa4, are specialized to the carrier ℕ. Here both
operations and their realization laws are carrier-generic, and relabelling allows an arbitrary
map into free variables and bound slots, not just a free-variable map.
Substitute terms for the free variables of an infinitary formula. The substituted terms have only free variables, so no bound variable can capture one of their variables.
Instances For
Substitution is realized by assigning to each original free variable the value of its substituted term. The bound-variable valuation is unchanged.
Relabel free variables by free variables or new bound slots. The m new slots are placed
before the original n slots, and quantifiers continue to bind the last slot.
Instances For
Relabelling evaluates each original free variable at its image under g. The first m
slots evaluate newly bound variables and the remaining n slots evaluate the original slots.
Embedding a substituted finitary formula is the same as substituting in its embedding.
Embedding a relabelled finitary formula is the same as relabelling its embedding.