Lemma 3.25: substitution composition inclusion
ProvedMSKleene.subst_compSubstitution composition inclusion (Lemma 3.25).
Let , , , and . Then .
import Definitions.Def_MSKleene_Subst
namespace MSKleene
/-- **Substitution composition inclusion** (Lemma 3.25).
For `z ∈ X_u`, languages `L, L' ⊆ T_Σ(X)_u`, and `K ⊆ T_Σ(X)_s`,
`⟨z/⟨z/L⟩^♯ᵖ_u(L')⟩^♯ᵖ_s(K) ⊆ ⟨z/L⟩^♯ᵖ_s(⟨z/L'⟩^♯ᵖ_s(K))`. -/
theorem subst_comp {S : Type} (sig : Signature S) (X : SSet S) {u s : S}
(z : X u) (L L' : Set (Term sig X u)) (K : Set (Term sig X s)) :
substP z (substP z L u L') s K ⊆ substP z L s (substP z L' s K) := by
sorry
end MSKleeneRead-back
What the Lean code literally says, in plain math · claude-sonnet-5
The data of the statement are: a signature , assigning to every input word and output sort a type of operation symbols; an -indexed family of variable types ; two implicit sorts ; a single distinguished variable of sort ; two sets of sort- terms; and a set of sort- terms. Here is the type of sort- terms, generated (mutually with sorted finite tuples of terms) by injecting a variable as a term and by applying an operation symbol to a length- vector of terms of the matching sorts. For the variable and a set , define a nondeterministic substitution operator as follows: it is the (classically defined) algebra homomorphism from the term algebra into the power algebra of the term algebra — the algebra whose carrier at sort is and whose operation sends a tuple of sets to the set of all -applications formed by choosing one representative from each argument set independently — determined by the assignment that sends the variable (of sort ) to the entire set and sends every other variable of any sort (whether , or but , equality of variables being decided classically) to the singleton set ; writing for the value of this homomorphism at a term , it is concretely the set of all terms obtained from by replacing each leaf occurrence of independently by some element of while leaving all other variables fixed and without recursing into the substituted terms, so that when does not occur in , and when occurs in but . Then, for an explicitly given target sort and a set , set
which is when ; the sort of the substituted variable is an implicit argument recovered from , whereas the superscript sort is passed explicitly and pins down the common sort of the input set and of the result. The theorem asserts the single set inclusion
where on the left one first forms (substituting by elements of throughout the members of , at target sort ) and then uses that set as the replacement set for a single substitution of into the members of ; and on the right one first substitutes by elements of throughout the members of (at sort ) and then substitutes by elements of throughout the members of that intermediate result. In words: the set of terms produced by rewriting each occurrence of in some element of by a single element of the pre-composed set " with replaced by " is contained in the set produced by two successive sweeps, first over and then over the outcome. The quantified data , , (together with the sorts , the variable , the signature , and the family ) are arbitrary, with no finiteness, nonemptiness, or occurrence hypotheses imposed; hence the degenerate cases (both sides equal ), , and all fall under the claim, as does the case where members of or themselves contain the variable (on the left such residual occurrences are left untouched by the outer single-pass substitution, whereas on the right they are exposed to the second substitution pass). The assertion is exactly this , not an equality and not the reverse inclusion.
Confirmed by the mission captain (proposal self-audit).