Corollary 3.31: single-variable substitution preserves recognizability
ProvedMSKleene.rec_subst_singleSingle-variable substitution preserves recognizability (Corollary 3.31).
Assume and finite. Let , , , and . Then . (From CVCL20, Cor. 3.20.)
import Definitions.Def_MSKleene_Recognizable import Definitions.Def_MSKleene_Subst
namespace MSKleene
/-- **Single-variable substitution preserves recognizability** (Corollary 3.31;
from CVCL20).
With `S` and `X` finite: for `z ∈ X_t`, if `L ⊆ T_Σ(X)_t` and `K ⊆ T_Σ(X)_s`
are recognizable, then `⟨z/L⟩^♯ᵖ_s(K)` is `s`-recognizable. -/
theorem rec_subst_single {S : Type} [Finite S] (sig : Signature S) (X : SSet S)
(hX : SFinite X) {s t : S} (z : X t) (L : Set (Term sig X t))
(K : Set (Term sig X s)) (hL : sRecognizable (freeAlgebra sig X) t L)
(hK : sRecognizable (freeAlgebra sig X) s K) :
sRecognizable (freeAlgebra sig X) s (substP z L s K) := by
sorry
end MSKleeneRead-back
What the Lean code literally says, in plain math · claude-sonnet-5
Fix a type of sorts, assumed finite, and a signature that assigns to every finite list of sorts and every sort a type of operation symbols ( is not assumed finite); fix also an -indexed family of variable types, with the standing assumption that the disjoint union is finite. For each sort write for the type of well-sorted terms of sort , generated inductively by and, for each , a former taking a vector of subterms of sorts to a term of sort ; let be the free -algebra on , whose carrier at is and whose -operation is , and let be its power algebra, whose carrier at is the powerset and whose operation, for and a tuple with , is
The theorem takes two implicit sorts (which may be equal), a variable , a set of terms , and a set of terms . From these define the assignment sending each sort and variable to the subset of
(the equality tests use classical decidability), and let be the homomorphism evaluating terms in under , i.e. the map defined by recursion on terms with and ; the object under discussion is
the union over all terms lying in of the set . The predicate , for a -algebra , a sort , and a set (the carrier of at ), asserts that
that is, exactly. Under the hypotheses , that holds (some -algebra with finite total carrier, a homomorphism from into it, and a subset of its sort- carrier whose preimage under the homomorphism's sort- component is precisely ), and , that holds (the analogous statement for at sort ), the theorem concludes : there exist a -algebra with finite, a -homomorphism , and a set such that
Degenerate cases silently included: if then and the assertion is that the empty subset of is recognizable; if then , so under every term that mentions evaluates to while every term not mentioning evaluates to its own singleton; and range over all sorts and may coincide; is finite and is finite, but no finiteness is imposed on ; and the hypotheses and are assumptions whose satisfiability is not addressed here.
Confirmed by the mission captain (proposal self-audit).