Proposition 3.29: basic terms are recognizable
ProvedMSKleene.rec_basicBasic terms are recognizable (Proposition 3.29).
Assume finite. For every : (1) for every , is -recognizable; (2) for every , is -recognizable; (3) for every , , and , is -recognizable. (From CVCL20, Prop. 3.1–3.3.)
import Definitions.Def_MSKleene_Term import Definitions.Def_MSKleene_Recognizable import Definitions.Def_MSKleene_Power
namespace MSKleene
/-- **Basic terms are recognizable** (Proposition 3.29; from CVCL20).
With `S` finite: for every sort `s`, every singleton `{x}` of a variable, and
every singleton `{σ(x₁,…,x_k)}` of an operation symbol applied to variables
(the constant case `k = 0` included), is `s`-recognizable. -/
theorem rec_basic {S : Type} [Finite S] (sig : Signature S) (X : SSet S) (s : S) :
(∀ x : X s, sRecognizable (freeAlgebra sig X) s {Term.var x})
∧ (∀ (w : List S) (σ : sig w s) (xs : Args X w),
sRecognizable (freeAlgebra sig X) s
{Term.app σ (TermVec.ofArgs (Args.map (fun _ x => Term.var x) xs))}) := by
sorry
end MSKleeneRead-back
What the Lean code literally says, in plain math · claude-sonnet-5
Fix a type carrying a Finite instance (so has only finitely many elements), a signature over — that is, an assignment of a type of operation symbols to each pair consisting of a word (the input profile) and a sort (the output sort) — an ‑sorted family of variable types , and a distinguished sort . Let be the ‑sorted set of terms: is inductively generated by term‑variables for and by applications where, for some word , and is a vector holding one term of sort in position . Let be the term (free) algebra on and : its carrier at sort is , and its interpretation of a symbol maps an argument vector to the term . For a ‑algebra , a sort , and a set , call ‑recognizable in when there exist (i) a ‑algebra whose total carrier is a finite type, (ii) a ‑homomorphism , i.e. a family of maps such that for every , every , every and every argument vector one has , and (iii) a set , such that exactly (equality of sets, not mere inclusion). The theorem asserts the conjunction of the following two statements, in which the algebra , the homomorphism and the set witnessing recognizability may be chosen independently for each instance:
where in (2) the single term named is the application of directly to the variable terms as its immediate subterms. Edge cases folded into the quantifiers: in (1), if is empty the claim is vacuous; in (2), the quantifier over ranges over the sorted tuple type , which is empty (making that instance vacuous) whenever is nonempty and some is empty, and the quantifier over contributes nothing when is empty; when the symbol is a constant, the tuple is the unique element of a one‑point type, and (2) asserts that the singleton containing the constant term is ‑recognizable in . No finiteness is assumed of the signature or of the variable family ; the only finiteness hypotheses are that is finite and that each recognizing algebra has finite total carrier.
Confirmed by the mission captain (proposal self-audit).