Lemma 4.9: every singleton of a term is regular
ProvedMSKleene.singleton_term_regularEvery singleton of a term is regular (Lemma 4.9).
Let and . Then and . Consequently .
import Definitions.Def_MSKleene_Regular
namespace MSKleene
/-- **Every singleton of a term is regular** (Lemma 4.9).
For finite `S`, `Σ`, and `X`, every `P ∈ T_Σ(X)_s`, viewed as a regular
expression over `(S,Σ,X)`, denotes exactly `{P}`. Consequently, `{P}` is an
`s`-regular language. -/
theorem singleton_term_regular {S : Type} [Finite S]
(sig : Signature S) (X : SSet S) (hsig : SigFinite sig) (hX : SFinite X)
{s : S} (P : Term sig X s) :
interpExpr sig X s (Term.toReg P) = {P}
∧ {P} ∈ RegS sig X s := by
sorry
end MSKleene
Read-back
What the Lean code literally says, in plain math · gpt-5
For every type of sorts equipped with the assumption that is finite; every many-sorted signature , meaning a family of types of operation symbols indexed by a finite list of input sorts and an output sort ; every sorted family of variable types ; assumptions that the dependent sum of all operation-symbol types is finite and that the dependent sum is finite; every sort ; and every finite -term of sort built recursively either from a variable in of the appropriate sort or by applying an operation symbol to a matching tuple of subterms, the following conjunction holds. First, if is converted to a regular expression by leaving every variable node unchanged and replacing every original operation-symbol node by the corresponding base-symbol node, then interpreting that expression as a language of -terms—variables denote their singleton variable terms and a base operation applied to languages denotes all operation applications obtained by choosing one argument term from each component language—gives exactly the singleton language . Second, is regular in the following literal sense: there exist a sorted family of auxiliary variable types for which is finite, and a regular expression of sort over the enlarged variables , such that the language denoted by is exactly the image of under recursive relabelling along the injections . Here such a regular expression is a term whose operation symbols are either base symbols from or the added empty-language, binary-union, variable-indexed iteration, and variable-indexed substitution symbols, interpreted respectively as the empty set, union, finite-stage iteration, and completely additive term substitution. The existentially asserted and in the second conjunct are not stated to be any particular choices, and in particular the statement does not identify with the converted expression from the first conjunct. No nonemptiness assumption is imposed on , , or the signature; when there is no possible choice of the explicitly quantified and , the corresponding universal assertion has no instances.
Confirmed by the mission captain (proposal self-audit).