Claim 4.13 (Main Claim): the auxiliary languages are regular
ProvedMSKleene.main_claimThe auxiliary languages are regular (Claim 4.13 (Main Claim)).
In the recognition context of the proof of Proposition 4.10: for every , every , every with , and every , there exists a regular expression with ; that is, the languages are -regular. Proved by induction on the budget size .
import Definitions.Def_MSKleene_AuxLang
namespace MSKleene
/-- **Main Claim** (Claim 4.13).
In the recognition context `ctx` of the proof of Proposition 4.10, for every
sort `u`, every set `C ⊆ N` of leaf-admissible states, every sortwise budget
`K ≤ N`, and every target state `l ∈ N_u`, the auxiliary language
`L_u(C,K,l)` is `u`-regular over `Z`: there is a regular expression `R` of type
`u` over `(S,Σ,Z)` with `{R}^{Z♯}_u = L_u(C,K,l)`. -/
theorem main_claim {S : Type} [Finite S] (sig : Signature S) (X : SSet S)
(hsig : SigFinite sig) (hX : SFinite X) (ctx : KleeneCtx sig X) (u : S)
(C : (s : S) → Set (Fin (ctx.n s))) (K : S → ℕ) (hK : ∀ s, K s ≤ ctx.n s)
(l : Fin (ctx.n u)) :
∃ R : RegExpr sig ctx.Z u,
interpExpr sig ctx.Z u R = ctx.auxLang u C K l := by
sorry
end MSKleeneRead-back
What the Lean code literally says, in plain math · claude-sonnet-5
Read-back of MSKleene.main_claim
Fix a type of sorts that is finite (; note that some sort is provided, so is inhabited in any instance). A signature assigns to every arity word (a finite list of sorts) and every result sort a type of operation symbols; a sorted variable family assigns to every sort a type . The hypotheses and assert respectively that the total collection of all operation symbols is finite and that the total collection of all variables is finite. A Kleene context over consists of three pieces of data: a function ; for every symbol an interpreting map (so the tuple of finite sets , with these operations, forms a -algebra ); and a variable assignment sending each to an element . Write for the disjoint union (this is ctx.Z), with left injection and right injection . Let denote the set of -terms of sort with variables drawn from : each such term is either for some , or for a symbol and terms . There is a canonical evaluation homomorphism determined by
and for a sort‑tagged term we write (the underlying natural number of the element of ).
The theorem's remaining inputs are: a distinguished sort ; a family assigning to every sort a subset ; a function ; a hypothesis stating for every sort (this is satisfiable, e.g. by , and enters the conclusion only through below); and a distinguished element (whose existence forces ; for any sort with one necessarily has and ). Call a variable-occurrence condition -admissible for a term: every variable appearing at a leaf that has the form at sort satisfies , while leaves of the form are unconstrained (formally Term.varsIn (ctx.inXC C), using to send ‑variables to and at sort to ). Let mean the strict, transitive closure of the immediate‑subterm relation, where is an immediate subterm of iff 's term is an application (over the plain signature ) and 's term is one of the (at the corresponding sort); and call a sort‑tagged term minimal if it has no immediate subterm at all — i.e. it is either a variable or an application of a symbol to the empty argument list. Then is the subset of consisting of exactly those terms such that:
- is -admissible (every -variable occurring anywhere in , at whatever sort , has );
- for every sort‑tagged term that is a proper subterm of , that is not minimal (so is an application with at least one argument), and that is itself -admissible, one has
(if is a variable or a nullary application this condition is vacuous); 3. in .
Next, the regular signature over has, at arity , the following operation symbols: for each ; a symbol of arity ; a symbol of arity for each ; a symbol of arity ; and a symbol of arity for each . A regular expression of sort , RegExpr sig ctx.Z u, is a term of sort over whose variables are drawn from . Its interpretation (this is interpExpr sig ctx.Z s, the unique homomorphic extension into the powerset -algebra whose carrier at sort is , sending each generator to the singleton ) is defined recursively by:
Here denotes the set of all terms obtained from by replacing each occurrence of the specific variable (matched by both its sort and its identity in ) independently by an arbitrary term of , leaving every other variable and every operation symbol unchanged (the nondeterministic substitution homomorphism substHom). The claim of the theorem is that, under all the hypotheses above, there exists a regular expression such that
as subsets of — i.e. the language is exactly the interpretation of some regular expression over with variables in . The existential is plain (, not ): no uniqueness of is asserted, and the finiteness hypotheses , , , together with , are assumed but do not otherwise appear in the concluding equation.
Confirmed by the mission captain (proposal self-audit).