Proposition 3.6: the subterm order is Artinian
ProvedMSKleene.subterm_wfThe subterm order is artinian (Proposition 3.6).
The order has no strictly descending -chains, i.e. it is Artinian. Moreover is exactly : the variables and the constant symbols.
import Definitions.Def_MSKleene_Subterm
namespace MSKleene
/-- **The subterm order is Artinian** (Proposition 3.6).
On the free algebra `T_Σ(X)` the strict proper-subterm order `SubtermLT` is
well-founded, and a sorted term is minimal for it iff it is a variable or a
constant symbol. -/
theorem subterm_wf {S : Type} (sig : Signature S) (X : SSet S) :
WellFounded (SubtermLT (sig := sig) (X := X))
∧ ∀ b : STerm sig X, Min b ↔
((∃ x : X b.1, b.2 = Term.var x)
∨ (∃ σ : sig [] b.1, b.2 = Term.app σ TermVec.nil)) := by
sorry
end MSKleeneRead-back
What the Lean code literally says, in plain math · claude-sonnet-5
Read-back: MSKleene.subterm_wf
Fix an arbitrary type (its inhabitants are called sorts), an arbitrary family assigning to every pair consisting of a finite list of sorts and a single sort a type (the operation symbols of argument profile and result sort ; formally ), and an arbitrary family assigning to every sort a type (the variables of sort ; formally ). Here is an implicit parameter while and are explicit; the theorem asserts the statement below for every such , , . Over this data one has the mutually inductively defined families (terms of sort ) and (term-vectors of profile ), whose constructors are: for each ; for each list , each and each ; ; and for each and . Let
be the type of dependent pairs with a sort and a term of that sort (a sorted term). Write for the inductively defined membership predicate on term-vectors: always holds (this base case requires to be literally the head entry and of the same sort as the head), and holds whenever (regardless of the head ). Define the immediate-subterm relation on to hold iff
the first equation being an equation in the (dependent) type ; note the sort of is not constrained beyond being whatever sort makes occur in . Define to be the transitive closure of , i.e. there is a finite chain with and for every (at least one step; reflexivity is not included). Define to hold iff , i.e. no sorted term is an immediate subterm of .
The theorem asserts the conjunction of the following two statements.
(1) The relation on is well-founded: every element of is accessible for ; equivalently, there is no infinite sequence of sorted terms with for all (no infinitely descending chain of proper subterms), and equivalently every non-empty predicate on has a -minimal element.
(2) For every sorted term ,
both equalities being equalities in ; that is, has no immediate subterm exactly when its term component is either a variable of sort , or an operation symbol whose argument profile is the empty list and whose result sort is , applied to the empty term-vector (a nullary/constant application). This is a genuine biconditional in both directions.
Degenerate cases the quantifiers silently include: if is empty then is empty, so is well-founded vacuously and the universally quantified biconditional in (2) holds vacuously; more generally, for any for which neither disjunct on the right of (2) is satisfiable (for instance when and are both empty, or when has the form that matches neither shape), statement (2) forces . The types and are permitted to be empty or infinite; no finiteness, decidability, or non-emptiness hypotheses are imposed on , , or .
Confirmed by the mission captain (proposal self-audit).