Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Compatibility of Invocation Graph Composition (Lemma 1 & Corollary) and Well-Foundedness of SCT_G (Theorem 1)

Proved
NishtAbel2024.lemma_1_and_theorem_1

by kmehltretter82 · Oct 31, 2026 · Mathlib 0df444a (Lean v4.33.1)

agdacopatternssize-change-terminationsized-typesstrong-normalizationtermination-checkingtype-theory

Lemma 1, Corollary, and Theorem 1 (Section 5.3, pp. 34–35): (1) compatibility of invocation graph composition G₁ ∘ G₂ with graph conformance ConformsToGraph over any compatible strict/weak orders; (2) compatibility of iterated composition G₁ ∘ ⋯ ∘ Gₙ across finite ordinal chains; and (3) well-foundedness of the semantic call relation SCTCallRel 𝒢 whenever SCTValid 𝒢 holds.

Preamble
import Definitions.Def_NishtAbel2024_Syntax
import Definitions.Def_NishtAbel2024_Semantics
Formal statement
namespace NishtAbel2024

/-- Lemma 1 (Soundness of composition, p. 34), Corollary (Collapsing of finite chains, p. 34),
and Theorem 1 (Soundness of `G`, pp. 34–35):
1. (**Lemma 1**) For any type `S` equipped with transitive relations `ltRel, leRel : S → S → Prop`
   such that `ltRel` implies `leRel` and `ltRel`/`leRel` compose transitively into `ltRel`, if
   `a⃗ ≺_{G₁} b⃗` and `b⃗ ≺_{G₂} c⃗`, then `a⃗ ≺_{G₁ ∘ G₂} c⃗`.
2. (**Corollary**) For any non-empty chain of invocation graphs `G₁ :: Gs` and ordinal tuples
   `s₀ :: s₁ :: ... :: sₙ` of matching length `(G₁ :: Gs).length + 1` where each adjacent step
   satisfies `OrdConformsToGraph`, the endpoints conform to `Gs.foldl InvGraph.comp G₁`.
3. (**Theorem 1**) If `⊢ 𝒢` (`SCTValid 𝒢`), then `SCT_𝒢` (`SCTCallRel 𝒢`) is well-founded. -/
theorem lemma_1_and_theorem_1 :
    (∀ {S : Type} (ltRel leRel : S → S → Prop),
      (∀ x y, ltRel x y → leRel x y) →
      (∀ x y z, leRel x y → leRel y z → leRel x z) →
      (∀ x y z, ltRel x y → leRel y z → ltRel x z) →
      (∀ x y z, leRel x y → ltRel y z → ltRel x z) →
      ∀ (G₁ G₂ : InvGraph) (a b c : List S),
        ConformsToGraph ltRel leRel G₁ a b →
        ConformsToGraph ltRel leRel G₂ b c →
        ConformsToGraph ltRel leRel (G₁.comp G₂) a c) ∧
    (∀ (G₁ : InvGraph) (Gs : List InvGraph) (s₀ sₙ : List SizeOrd) (mid : List (List SizeOrd)),
      let graphs := G₁ :: Gs
      let chain := [s₀] ++ mid ++ [sₙ]
      mid.length = Gs.length →
      (∀ (k : Nat) (hk : k < graphs.length)
         (hk1 : k < chain.length) (hk2 : k + 1 < chain.length),
        OrdConformsToGraph (graphs.get ⟨k, hk⟩) (chain.get ⟨k, hk1⟩) (chain.get ⟨k + 1, hk2⟩)) →
      OrdConformsToGraph (Gs.foldl InvGraph.comp G₁) s₀ sₙ) ∧
    (∀ 𝒢 : InvGraphFamily,
      SCTValid 𝒢 →
      WellFounded (SCTCallRel 𝒢)) := by
  sorry

end NishtAbel2024
Source
Kanstantsin Nisht, 'Type-Based Termination Checking in Agda', Master's Thesis in Computer Science and Engineering, Chalmers University of Technology and University of Gothenburg (supervised by Andreas Abel), 2024; extended abstract by Kanstantsin Nisht and Andreas Abel, 30th International Conference on Types for Proofs and Programs (TYPES 2024). Section 5.3, Lemma 1, Corollary, and Theorem 1 (pp. 34–35).
Read-back

What the Lean code literally says, in plain math · Gemini 3.1 Pro (Independent Blind Auditor)

Independent Mathematical Read-Back: Thm_NishtAbel2024_lemma_1_and_theorem_1.lean

The declaration NishtAbel2024.lemma_1_and_theorem_1 asserts the conjunction P1∧P2∧P3P_1 \land P_2 \land P_3P1​∧P2​∧P3​ of three propositions concerning invocation graphs, ordinal tuples, and the size-change termination (SCT) call relation.

Underlying Definitions.

  • Edge labels and invocation graphs: An edge relation label r∈{lt,le}r \in \{\mathsf{lt}, \mathsf{le}\}r∈{lt,le} represents either a strict inequality (<<<) or a weak inequality (≤\le≤). Sequential composition of edge labels is defined by r1\fatsemir2=ltr_1 \fatsemi r_2 = \mathsf{lt}r1​\fatsemir2​=lt if r1=ltr_1 = \mathsf{lt}r1​=lt or r2=ltr_2 = \mathsf{lt}r2​=lt, and le\fatsemile=le\mathsf{le} \fatsemi \mathsf{le} = \mathsf{le}le\fatsemile=le. Combining optional edge labels o1⊕o2o_1 \oplus o_2o1​⊕o2​ yields some(lt)\mathsf{some}(\mathsf{lt})some(lt) if either argument is some(lt)\mathsf{some}(\mathsf{lt})some(lt), else some(le)\mathsf{some}(\mathsf{le})some(le) if either argument is some(le)\mathsf{some}(\mathsf{le})some(le), and none\mathsf{none}none if both are none\mathsf{none}none.
  • An invocation graph G=(p,q,E)G = (p, q, E)G=(p,q,E) (InvGraph) consists of a left arity p∈Np \in \mathbb{N}p∈N, a right arity q∈Nq \in \mathbb{N}q∈N, and a finite list of directed labeled edges E∈List(N×N×{lt,le})E \in \mathrm{List}(\mathbb{N} \times \mathbb{N} \times \{\mathsf{lt}, \mathsf{le}\})E∈List(N×N×{lt,le}). For any indices i,j∈Ni, j \in \mathbb{N}i,j∈N, the effective edge lookup G.edgeAt(i,j)∈Option {lt,le}G.\mathrm{edgeAt}(i, j) \in \mathrm{Option}\,\{\mathsf{lt}, \mathsf{le}\}G.edgeAt(i,j)∈Option{lt,le} filters EEE for all triples (i′,j′,r)(i', j', r)(i′,j′,r) with i′=ii' = ii′=i and j′=jj' = jj′=j and folds ⊕\oplus⊕ over their labels starting from none\mathsf{none}none (so lt\mathsf{lt}lt dominates le\mathsf{le}le when multiple edges share the same endpoints).
  • Given p,q∈Np, q \in \mathbb{N}p,q∈N and a lookup function L:N→N→Option {lt,le}L : \mathbb{N} \to \mathbb{N} \to \mathrm{Option}\,\{\mathsf{lt}, \mathsf{le}\}L:N→N→Option{lt,le}, the canonical edge list canonicalEdges(p,q,L)\mathrm{canonicalEdges}(p, q, L)canonicalEdges(p,q,L) enumerates i=0,…,p−1i = 0, \dots, p-1i=0,…,p−1 and j=0,…,q−1j = 0, \dots, q-1j=0,…,q−1 in order, emitting (i,j,r)(i, j, r)(i,j,r) whenever L(i,j)=some(r)L(i, j) = \mathsf{some}(r)L(i,j)=some(r). The normalization of G=(p,q,E)G = (p, q, E)G=(p,q,E) is G.normalize=(p,q,canonicalEdges(p,q,G.edgeAt))G.\mathrm{normalize} = (p, q, \mathrm{canonicalEdges}(p, q, G.\mathrm{edgeAt}))G.normalize=(p,q,canonicalEdges(p,q,G.edgeAt)).
  • The composition G1∘G2G_1 \circ G_2G1​∘G2​ (G₁.comp G₂) of two invocation graphs G1=(p1,q1,E1)G_1 = (p_1, q_1, E_1)G1​=(p1​,q1​,E1​) and G2=(p2,q2,E2)G_2 = (p_2, q_2, E_2)G2​=(p2​,q2​,E2​) is the invocation graph (p1,q2,canonicalEdges(p1,q2,LG1,G2))(p_1, q_2, \mathrm{canonicalEdges}(p_1, q_2, L_{G_1, G_2}))(p1​,q2​,canonicalEdges(p1​,q2​,LG1​,G2​​)), where for each i,j∈Ni, j \in \mathbb{N}i,j∈N, LG1,G2(i,j)L_{G_1, G_2}(i, j)LG1​,G2​​(i,j) folds over k=0,1,…,q1−1k = 0, 1, \dots, q_1 - 1k=0,1,…,q1​−1, combining some(r1\fatsemir2)\mathsf{some}(r_1 \fatsemi r_2)some(r1​\fatsemir2​) via ⊕\oplus⊕ (starting from none\mathsf{none}none) for every k<q1k < q_1k<q1​ such that G1.edgeAt(i,k)=some(r1)G_1.\mathrm{edgeAt}(i, k) = \mathsf{some}(r_1)G1​.edgeAt(i,k)=some(r1​) and G2.edgeAt(k,j)=some(r2)G_2.\mathrm{edgeAt}(k, j) = \mathsf{some}(r_2)G2​.edgeAt(k,j)=some(r2​).
  • Graph conformance: Given any type SSS, binary relations <S,≤S<_S, \le_S<S​,≤S​ on SSS, an invocation graph G=(p,q,E)G = (p, q, E)G=(p,q,E), and lists s,s′∈List Ss, s' \in \mathrm{List}\,Ss,s′∈ListS, the conformance relation ConformsToGraph(<S,≤S,G,s,s′)\mathrm{ConformsToGraph}(<_S, \le_S, G, s, s')ConformsToGraph(<S​,≤S​,G,s,s′) holds if and only if:
    1. ∣s∣=p|s| = p∣s∣=p and ∣s′∣=q|s'| = q∣s′∣=q, and
    2. for all natural numbers i<∣s∣i < |s|i<∣s∣ and j<∣s′∣j < |s'|j<∣s′∣, if G.edgeAt(i,j)=some(lt)G.\mathrm{edgeAt}(i, j) = \mathsf{some}(\mathsf{lt})G.edgeAt(i,j)=some(lt) then s[i]<Ss′[j]s[i] <_S s'[j]s[i]<S​s′[j], and if G.edgeAt(i,j)=some(le)G.\mathrm{edgeAt}(i, j) = \mathsf{some}(\mathsf{le})G.edgeAt(i,j)=some(le) then s[i]≤Ss′[j]s[i] \le_S s'[j]s[i]≤S​s′[j].
  • Size ordinals: A size ordinal α=(t,o)∈SizeOrd\alpha = (t, o) \in \mathrm{SizeOrd}α=(t,o)∈SizeOrd is a pair of natural numbers t,o∈Nt, o \in \mathbb{N}t,o∈N (representing tier ttt and offset ooo, corresponding to ω⋅t+o<ω2\omega \cdot t + o < \omega^2ω⋅t+o<ω2). They are ordered lexicographically:
α<ordβ  ⟺  α.tier<β.tier∨(α.tier=β.tier∧α.offset<β.offset),\alpha <_{\mathrm{ord}} \beta \iff \alpha.\mathrm{tier} < \beta.\mathrm{tier} \lor (\alpha.\mathrm{tier} = \beta.\mathrm{tier} \land \alpha.\mathrm{offset} < \beta.\mathrm{offset}),α<ord​β⟺α.tier<β.tier∨(α.tier=β.tier∧α.offset<β.offset), α≤ordβ  ⟺  α.tier<β.tier∨(α.tier=β.tier∧α.offset≤β.offset).\alpha \le_{\mathrm{ord}} \beta \iff \alpha.\mathrm{tier} < \beta.\mathrm{tier} \lor (\alpha.\mathrm{tier} = \beta.\mathrm{tier} \land \alpha.\mathrm{offset} \le \beta.\mathrm{offset}).α≤ord​β⟺α.tier<β.tier∨(α.tier=β.tier∧α.offset≤β.offset).

For lists of size ordinals βs,αs∈List SizeOrd\beta s, \alpha s \in \mathrm{List}\,\mathrm{SizeOrd}βs,αs∈ListSizeOrd, OrdConformsToGraph(G,βs,αs)\mathrm{OrdConformsToGraph}(G, \beta s, \alpha s)OrdConformsToGraph(G,βs,αs) is defined as ConformsToGraph(<ord,≤ord,G,βs,αs)\mathrm{ConformsToGraph}(<_{\mathrm{ord}}, \le_{\mathrm{ord}}, G, \beta s, \alpha s)ConformsToGraph(<ord​,≤ord​,G,βs,αs).

  • Invocation graph families and SCT validity: Function names are natural numbers (FunName=N\mathrm{FunName} = \mathbb{N}FunName=N). An invocation graph family G=(arity,graphs)\mathcal{G} = (\mathrm{arity}, \mathrm{graphs})G=(arity,graphs) (InvGraphFamily) consists of a total arity assignment arity:N→N\mathrm{arity} : \mathbb{N} \to \mathbb{N}arity:N→N and a total assignment graphs:N→N→List InvGraph\mathrm{graphs} : \mathbb{N} \to \mathbb{N} \to \mathrm{List}\,\mathrm{InvGraph}graphs:N→N→ListInvGraph.
    • G\mathcal{G}G is arity-well-formed (G.ArityWf\mathcal{G}.\mathrm{ArityWf}G.ArityWf) if:
      1. there exists a finite domain list dom∈List N\mathrm{dom} \in \mathrm{List}\,\mathbb{N}dom∈ListN such that for all f,g∈Nf, g \in \mathbb{N}f,g∈N, whenever G.graphs(f,g)≠[]\mathcal{G}.\mathrm{graphs}(f, g) \ne []G.graphs(f,g)=[], both f∈domf \in \mathrm{dom}f∈dom and g∈domg \in \mathrm{dom}g∈dom; and
      2. for all f,g∈Nf, g \in \mathbb{N}f,g∈N and every G∈G.graphs(f,g)G \in \mathcal{G}.\mathrm{graphs}(f, g)G∈G.graphs(f,g), G.leftArity=G.arity(g)G.\mathrm{leftArity} = \mathcal{G}.\mathrm{arity}(g)G.leftArity=G.arity(g), G.rightArity=G.arity(f)G.\mathrm{rightArity} = \mathcal{G}.\mathrm{arity}(f)G.rightArity=G.arity(f), and G=G.normalizeG = G.\mathrm{normalize}G=G.normalize.
    • The closure InvGraphClosure(G,f,g,G)\mathrm{InvGraphClosure}(\mathcal{G}, f, g, G)InvGraphClosure(G,f,g,G) is the smallest relation on N×N×InvGraph\mathbb{N} \times \mathbb{N} \times \mathrm{InvGraph}N×N×InvGraph such that: (i) if G∈G.graphs(f,g)G \in \mathcal{G}.\mathrm{graphs}(f, g)G∈G.graphs(f,g), then InvGraphClosure(G,f,g,G.normalize)\mathrm{InvGraphClosure}(\mathcal{G}, f, g, G.\mathrm{normalize})InvGraphClosure(G,f,g,G.normalize) holds; and (ii) if InvGraphClosure(G,h,g,G1)\mathrm{InvGraphClosure}(\mathcal{G}, h, g, G_1)InvGraphClosure(G,h,g,G1​) and InvGraphClosure(G,f,h,G2)\mathrm{InvGraphClosure}(\mathcal{G}, f, h, G_2)InvGraphClosure(G,f,h,G2​) hold, then InvGraphClosure(G,f,g,G1∘G2)\mathrm{InvGraphClosure}(\mathcal{G}, f, g, G_1 \circ G_2)InvGraphClosure(G,f,g,G1​∘G2​) holds.
    • G\mathcal{G}G is SCT-valid (SCTValid(G)\mathrm{SCTValid}(\mathcal{G})SCTValid(G)) if G.ArityWf\mathcal{G}.\mathrm{ArityWf}G.ArityWf holds and for every function name f∈Nf \in \mathbb{N}f∈N and every graph GGG, whenever InvGraphClosure(G,f,f,G)\mathrm{InvGraphClosure}(\mathcal{G}, f, f, G)InvGraphClosure(G,f,f,G) holds and G∘G=GG \circ G = GG∘G=G (equality of InvGraph structures), there exists an index k<G.leftArityk < G.\mathrm{leftArity}k<G.leftArity such that G.edgeAt(k,k)=some(lt)G.\mathrm{edgeAt}(k, k) = \mathsf{some}(\mathsf{lt})G.edgeAt(k,k)=some(lt).
    • An SCT state is a pair (f,αs)∈N×List SizeOrd(f, \alpha s) \in \mathbb{N} \times \mathrm{List}\,\mathrm{SizeOrd}(f,αs)∈N×ListSizeOrd. A step SCTStep(G,(f,αs),(g,βs))\mathrm{SCTStep}(\mathcal{G}, (f, \alpha s), (g, \beta s))SCTStep(G,(f,αs),(g,βs)) holds if there exists G∈G.graphs(f,g)G \in \mathcal{G}.\mathrm{graphs}(f, g)G∈G.graphs(f,g) such that OrdConformsToGraph(G,βs,αs)\mathrm{OrdConformsToGraph}(G, \beta s, \alpha s)OrdConformsToGraph(G,βs,αs) holds. The call relation is SCTCallRel(G,u,v)  ⟺  SCTStep(G,v,u)\mathrm{SCTCallRel}(\mathcal{G}, u, v) \iff \mathrm{SCTStep}(\mathcal{G}, v, u)SCTCallRel(G,u,v)⟺SCTStep(G,v,u).

Statement of the Three Conjuncts.

  1. First Conjunct (P1P_1P1​): For every type SSS (in Type 0), all binary relations <S,≤S:S→S→Prop<_S, \le_S : S \to S \to \mathrm{Prop}<S​,≤S​:S→S→Prop satisfying:
    • ∀x,y∈S,  x<Sy  ⟹  x≤Sy\forall x, y \in S,\; x <_S y \implies x \le_S y∀x,y∈S,x<S​y⟹x≤S​y,
    • ∀x,y,z∈S,  x≤Sy  ⟹  y≤Sz  ⟹  x≤Sz\forall x, y, z \in S,\; x \le_S y \implies y \le_S z \implies x \le_S z∀x,y,z∈S,x≤S​y⟹y≤S​z⟹x≤S​z,
    • ∀x,y,z∈S,  x<Sy  ⟹  y≤Sz  ⟹  x<Sz\forall x, y, z \in S,\; x <_S y \implies y \le_S z \implies x <_S z∀x,y,z∈S,x<S​y⟹y≤S​z⟹x<S​z,
    • ∀x,y,z∈S,  x≤Sy  ⟹  y<Sz  ⟹  x<Sz\forall x, y, z \in S,\; x \le_S y \implies y <_S z \implies x <_S z∀x,y,z∈S,x≤S​y⟹y<S​z⟹x<S​z, and for all invocation graphs G1,G2∈InvGraphG_1, G_2 \in \mathrm{InvGraph}G1​,G2​∈InvGraph and all lists a,b,c∈List Sa, b, c \in \mathrm{List}\,Sa,b,c∈ListS, if ConformsToGraph(<S,≤S,G1,a,b)\mathrm{ConformsToGraph}(<_S, \le_S, G_1, a, b)ConformsToGraph(<S​,≤S​,G1​,a,b) and ConformsToGraph(<S,≤S,G2,b,c)\mathrm{ConformsToGraph}(<_S, \le_S, G_2, b, c)ConformsToGraph(<S​,≤S​,G2​,b,c) hold, then ConformsToGraph(<S,≤S,G1∘G2,a,c)\mathrm{ConformsToGraph}(<_S, \le_S, G_1 \circ G_2, a, c)ConformsToGraph(<S​,≤S​,G1​∘G2​,a,c) holds.
  2. Second Conjunct (P2P_2P2​): For every initial invocation graph G1∈InvGraphG_1 \in \mathrm{InvGraph}G1​∈InvGraph, list of invocation graphs Gs∈List InvGraphGs \in \mathrm{List}\,\mathrm{InvGraph}Gs∈ListInvGraph, endpoint size-ordinal lists s0,sn∈List SizeOrds_0, s_n \in \mathrm{List}\,\mathrm{SizeOrd}s0​,sn​∈ListSizeOrd, and list of intermediate size-ordinal lists mid∈List(List SizeOrd)\mathrm{mid} \in \mathrm{List}(\mathrm{List}\,\mathrm{SizeOrd})mid∈List(ListSizeOrd), let graphs=G1::Gs\mathrm{graphs} = G_1 :: Gsgraphs=G1​::Gs and chain=[s0]+ ⁣+mid+ ⁣+[sn]\mathrm{chain} = [s_0] \mathbin{+\!+} \mathrm{mid} \mathbin{+\!+} [s_n]chain=[s0​]++mid++[sn​]. If ∣mid∣=∣Gs∣|\mathrm{mid}| = |Gs|∣mid∣=∣Gs∣ and for every k∈Nk \in \mathbb{N}k∈N with k<∣graphs∣k < |\mathrm{graphs}|k<∣graphs∣ (and k<∣chain∣k < |\mathrm{chain}|k<∣chain∣, k+1<∣chain∣k + 1 < |\mathrm{chain}|k+1<∣chain∣),
OrdConformsToGraph(graphs[k],chain[k],chain[k+1])\mathrm{OrdConformsToGraph}(\mathrm{graphs}[k], \mathrm{chain}[k], \mathrm{chain}[k+1])OrdConformsToGraph(graphs[k],chain[k],chain[k+1])

holds, then OrdConformsToGraph(foldl(∘,G1,Gs),s0,sn)\mathrm{OrdConformsToGraph}(\mathrm{foldl}(\circ, G_1, Gs), s_0, s_n)OrdConformsToGraph(foldl(∘,G1​,Gs),s0​,sn​) holds, where foldl(∘,G1,[G2,…,Gm])=(⋯((G1∘G2)∘G3)⋯∘Gm)\mathrm{foldl}(\circ, G_1, [G_2, \dots, G_m]) = (\cdots((G_1 \circ G_2) \circ G_3)\cdots \circ G_m)foldl(∘,G1​,[G2​,…,Gm​])=(⋯((G1​∘G2​)∘G3​)⋯∘Gm​). 3. Third Conjunct (P3P_3P3​): For every invocation graph family G∈InvGraphFamily\mathcal{G} \in \mathrm{InvGraphFamily}G∈InvGraphFamily, if SCTValid(G)\mathrm{SCTValid}(\mathcal{G})SCTValid(G) holds, then the relation SCTCallRel(G)\mathrm{SCTCallRel}(\mathcal{G})SCTCallRel(G) is well-founded (i.e., there exists no infinite sequence of states (f0,αs0),(f1,αs1),(f2,αs2),…(f_0, \alpha s_0), (f_1, \alpha s_1), (f_2, \alpha s_2), \dots(f0​,αs0​),(f1​,αs1​),(f2​,αs2​),… in N×List SizeOrd\mathbb{N} \times \mathrm{List}\,\mathrm{SizeOrd}N×ListSizeOrd such that SCTStep(G,(fm,αsm),(fm+1,αsm+1))\mathrm{SCTStep}(\mathcal{G}, (f_m, \alpha s_m), (f_{m+1}, \alpha s_{m+1}))SCTStep(G,(fm​,αsm​),(fm+1​,αsm+1​)) holds for all m∈Nm \in \mathbb{N}m∈N).

Edge Cases and Notes.

  • Degenerate empty list in P2P_2P2​: When Gs=[]Gs = []Gs=[] and mid=[]\mathrm{mid} = []mid=[], graphs=[G1]\mathrm{graphs} = [G_1]graphs=[G1​], chain=[s0,sn]\mathrm{chain} = [s_0, s_n]chain=[s0​,sn​], and foldl(∘,G1,[])=G1\mathrm{foldl}(\circ, G_1, []) = G_1foldl(∘,G1​,[])=G1​, so P2P_2P2​ reduces directly to the hypothesis at k=0k = 0k=0.
  • Zero-arity graphs in P3P_3P3​: If G\mathcal{G}G has a self-loop G∈G.graphs(f,f)G \in \mathcal{G}.\mathrm{graphs}(f, f)G∈G.graphs(f,f) on a function fff with G.arity(f)=0\mathcal{G}.\mathrm{arity}(f) = 0G.arity(f)=0, then G=(0,0,[])G = (0, 0, [])G=(0,0,[]) satisfies G∘G=GG \circ G = GG∘G=G, and the condition ∃k<0,  G.edgeAt(k,k)=some(lt)\exists k < 0,\; G.\mathrm{edgeAt}(k, k) = \mathsf{some}(\mathsf{lt})∃k<0,G.edgeAt(k,k)=some(lt) in SCTValid is impossible, so SCTValid forbids self-loops on 0-arity functions.
Human review
  • Endorsed by Shuze Chen · Nov 1, 2026

    Confirmed by the moderator at approval.

  • Endorsed by kmehltretter82 · Nov 1, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me