Documentation

InfinitaryLogic.Methods.ConstantInstances

Constant instances: instConst, closeBy, and their substitution algebra #

The two closing operations by the auxiliary constants of L[[ℕ]], in a neutral module below both the interpolation layer and the countable-completion kernel:

Their semantic consumer lemmas (realize_instConst, realize_closeBy, …) stay in the modules that own the structures they realize in. This module holds only syntax: the connective/universal algebra of closeBy — how it commutes with the connectives, what the arity-one remainder of a closed universal is, and that the constant instance of that remainder is closeBy at the extended tuple. Atomic template lemmas (closing an equality or relation template gives constEq / relInst) belong with those atoms, above this module.

The public surface is deliberately small: instConst, closeBy, the closeBy_* commutations, closeBy_zero, instConst_eq_closeBy, instConst_closeBy_all_remainder, and the generic substitution laws Term.subst_subst / Term.subst_relabel / Term.relabel_subst / BoundedFormulaω.subst_subst. Everything else is proof scaffolding and is private.

The all case #

closeBy φ.all τ is (remainder).all, where the remainder is φ opened, relabeled so that the last bound variable stays bound, and closed by τ. The instance of that remainder at a constant c must be closeBy φ (Fin.snoc τ c) — this is what makes universal-instance closure of a constants-expanded universe follow from a fragment's all_mem. Proving it directly fights castLE inside BoundedFormulaω.relabel, so instead:

Term-level substitution algebra #

theorem FirstOrder.Language.Term.subst_subst {L : Language} {α β γ : Type u'} (t : L.Term α) (f : α → L.Term β) (g : β → L.Term γ) :
(t.subst f).subst g = t.subst fun (a : α) => (f a).subst g

Substituting after substituting is substituting the composite.

theorem FirstOrder.Language.Term.subst_relabel {L : Language} {α β γ : Type u'} (t : L.Term α) (f : α → β) (g : β → L.Term γ) :
(relabel f t).subst g = t.subst (g ∘ f)

Substituting after relabeling is substituting along the relabeling.

theorem FirstOrder.Language.Term.relabel_subst {L : Language} {α β γ : Type u'} (t : L.Term α) (f : α → L.Term β) (g : β → γ) :
relabel g (t.subst f) = t.subst fun (a : α) => relabel g (f a)

Relabeling after substituting is substituting the relabeled terms.

theorem FirstOrder.Language.Term.subst_var_eq {L : Language} {α : Type u'} (t : L.Term α) :
t.subst var = t

Substituting variables for themselves does nothing.

Formula-level substitution composition #

theorem FirstOrder.Language.BoundedFormulaω.subst_subst {L : Language} {α β γ : Type u'} {n : ℕ} (φ : L.BoundedFormulaω α n) (f : α → L.Term β) (g : β → L.Term γ) :
(φ.subst f).subst g = φ.subst fun (a : α) => (f a).subst g

Composition of substitutions: substituting f and then g is substituting a ↦ (f a).subst g. No side condition: subst never touches bound variables.

The closing operations #

The constant instance ψ(c): open the bound variable of ψ and substitute the constant c_c.

Equations
Instances For
    noncomputable def FirstOrder.Language.closeBy {L : Language} {n : ℕ} (φ : (L.withConstants ℕ).BoundedFormulaω Empty n) (τ : Fin n → ℕ) :

    The closing substitution of a bounded formula by constants.

    Equations
    Instances For

      Definitional commutations of closeBy #

      Each holds by unfolding openBounds and subst on the constructor. The all case exhibits the arity-one remainder explicitly; relating its instConst to closeBy at the extended parameter tuple is a separate lemma about openBounds, proved where it is consumed.

      @[simp]
      theorem FirstOrder.Language.closeBy_imp {L : Language} {n : ℕ} (φ ψ : (L.withConstants ℕ).BoundedFormulaω Empty n) (τ : Fin n → ℕ) :
      closeBy (φ.imp ψ) τ = BoundedFormulaω.imp (closeBy φ τ) (closeBy ψ τ)
      @[simp]
      theorem FirstOrder.Language.closeBy_iInf {L : Language} {n : ℕ} (φs : ℕ → (L.withConstants ℕ).BoundedFormulaω Empty n) (τ : Fin n → ℕ) :
      @[simp]
      theorem FirstOrder.Language.closeBy_iSup {L : Language} {n : ℕ} (φs : ℕ → (L.withConstants ℕ).BoundedFormulaω Empty n) (τ : Fin n → ℕ) :

      The arity-one remainder of closing a universal: closeBy φ.all τ is the universal closure of φ opened, relabeled so that the last bound variable stays bound, and closed by τ.

      instConst is closeBy at arity one.

      closeWith: closing bound variables by a term assignment, without relabeling formulas #

      Composition #

      The bridge to openBounds #

      closeBy, instConst, and the arity-one remainder of closeBy_all are all ((openBounds φ).relabel g).subst τ' for a splitting g. This is the one place where relabel of a formula — and hence castLE — is met; it is discharged by the two composition lemmas of Operations.lean, exactly as in openBounds_relabel_sumInr.

      closeBy, its arity-one remainder, and instConst, as closeWith #

      Opening a sentence and substituting the empty tuple of closed terms does nothing.

      theorem FirstOrder.Language.closeBy_zero {L : Language} (φ : (L.withConstants ℕ).Sentenceω) (τ : Fin 0 → ℕ) :
      closeBy φ τ = φ

      Closing a sentence by the empty tuple does nothing.

      The instance of the remainder is the closure at the extended tuple.