{"slug":"formal-loop-halting-guarantee","identifier":"formal-loop-halting-guarantee","title":"Loop Halting Guarantee","author":"Maclain Hunter","sourceSha256":"d317154a15be0a16f2474591c1599951ad98b9d245112b7223256dcb541b2125","sourceKind":"formal-theorem","recordedAt":null,"recordedAtMeaning":"Database registration time, not a claim of original handwritten authorship.","originalAuthoredAt":null,"formalizedAt":"2026-10-03T10:37:05.082Z","checkedAt":"2026-10-03T10:40:00.848Z","status":"partial","axiomFree":true,"axioms":[],"theoremNames":["HunterAuthored.fuel_iteration_bound"],"units":[{"id":"fuel_iteration_bound","sourceStatement":"Formal statement: ∀config.maxDepth ∈ ℕ⁺: mcbLoop terminates in ≤ maxDepth iterations","sourceOffset":0,"scope":"For every total transform, including early stopping, the finite-fuel loop executes at most maxDepth steps. This checks the mathematical counter argument, not termination of uninstrumented external callbacks.","status":"candidate","variables":[],"premises":[],"conclusion":"See the exact typed Lean theorem","leanStatement":"def iterations {α : Type} (step : α → Option α) : Nat → α → Nat\n  | 0, _ => 0\n  | n + 1, s =>\n    match step s with\n    | none => 0\n    | some t => iterations step n t + 1\ntheorem fuel_iteration_bound {α : Type} (step : α → Option α) (fuel : Nat) (s : α) :\n    iterations step fuel s ≤ fuel := by\n  induction fuel generalizing s with\n  | zero => exact Nat.le_refl 0\n  | succ n ih =>\n    cases h : step s with\n    | none =>\n      unfold iterations\n      rw [h]\n      exact Nat.zero_le (n + 1)\n    | some t =>\n      unfold iterations\n      rw [h]\n      exact Nat.succ_le_succ (ih t)\n#print axioms fuel_iteration_bound\n","kernelStatus":"verified","axioms":[],"axiomFree":true,"reportedTheorem":"HunterAuthored.fuel_iteration_bound"}],"files":{"source.json":{"sha256":"c430dff91f1aba85eb6679448eb94e98d174564bbdf1cd724080bebe1e581af5","bytes":810},"Proof.lean":{"sha256":"ff0d70c43a9fce17354d249964f0a81725e294136a3777b6f6072a31b92c7fd0","bytes":908},"lean-check.txt":{"sha256":"9096c4d806192c9875376efa6b2842e1689d432f5ee068607e3a457098db70b6","bytes":124}},"boundary":"Lean establishes the listed formal statements and dependencies. The exact authored source, Ground, known premise meanings, application validation and empirical evidence remain separately typed. No unencoded section is certified by a neighboring theorem.","currentSourceSha256":"d317154a15be0a16f2474591c1599951ad98b9d245112b7223256dcb541b2125","timestamp":"2026-10-03T10:42:55.000Z","timestampAuthority":"https://www.freetsa.org","manifestSha256":"6e4e8d5c750a86f20e8f987a742b4eb2f588563a5f23a438ab84950f16eec8c4","url":"/proof-verification/formal-loop-halting-guarantee","jsonUrl":"/proof-verification/formal-loop-halting-guarantee.json","leanUrl":"/proof-verification/formal-loop-halting-guarantee.lean","graph":{"@context":"https://schema.org","@type":"SoftwareSourceCode","@id":"https://4p-mcb.com/proof-verification/formal-loop-halting-guarantee#lean","name":"Lean 4 witness: Loop Halting Guarantee","url":"https://4p-mcb.com/proof-verification/formal-loop-halting-guarantee","dateCreated":"2026-10-03T10:37:05.082Z","dateModified":"2026-10-03T10:40:00.848Z","creator":{"@type":"Organization","name":"Replit Agent"},"programmingLanguage":{"@type":"ComputerLanguage","name":"Lean","version":"Lean (version 4.7.0, commit v4.7.0, Release)"},"author":{"@type":"Organization","name":"Replit Agent"},"description":"Lean establishes the listed formal statements and dependencies. The exact authored source, Ground, known premise meanings, application validation and empirical evidence remain separately typed. No unencoded section is certified by a neighboring theorem.","isBasedOn":{"@type":"CreativeWork","name":"Loop Halting Guarantee","author":{"@type":"Person","name":"Maclain Hunter"},"url":"https://4p-mcb.com/proof-knowledge/formal-loop-halting-guarantee","identifier":"formal-loop-halting-guarantee"},"encoding":{"@type":"MediaObject","encodingFormat":"text/plain","contentUrl":"https://4p-mcb.com/proof-verification/formal-loop-halting-guarantee.lean"},"subjectOf":{"@type":"DigitalDocument","name":"Independently verified RFC 3161 existence timestamp","dateCreated":"2026-10-03T10:42:55.000Z","url":"https://4p-mcb.com/proof-verification/timestamp.json"},"additionalProperty":[{"@type":"PropertyValue","name":"verificationStatus","value":"partial"},{"@type":"PropertyValue","name":"axiomFree","value":"true"},{"@type":"PropertyValue","name":"axiomDependencies","value":"[]"},{"@type":"PropertyValue","name":"theorems","value":"[\"HunterAuthored.fuel_iteration_bound\"]"},{"@type":"PropertyValue","name":"sourceSha256","value":"d317154a15be0a16f2474591c1599951ad98b9d245112b7223256dcb541b2125"},{"@type":"PropertyValue","name":"releaseManifestSha256","value":"6e4e8d5c750a86f20e8f987a742b4eb2f588563a5f23a438ab84950f16eec8c4"},{"@type":"PropertyValue","name":"sourceRecordedAt","value":"null"},{"@type":"PropertyValue","name":"sourceDateMeaning","value":"Database registration time, not a claim of original handwritten authorship."},{"@type":"PropertyValue","name":"originalAuthoredAt","value":"null"},{"@type":"PropertyValue","name":"timestampAuthority","value":"https://www.freetsa.org"},{"@type":"PropertyValue","name":"timestampScope","value":"Independent cryptographic existence timestamp for the manifest and its content-addressed artifacts. Not legal notarization, an authorship adjudication, or a retroactive timestamp for handwritten work."},{"@type":"PropertyValue","name":"governingGround","value":"Logic / Logos / God"},{"@type":"PropertyValue","name":"formalizationAttribution","value":"Machine formalization by Replit Agent of Maclain Hunter's unchanged authored source"}]}}