Skip to content

feat(cont): prove CONT-1 checkpoint ordering is determined by slot - #38

Merged
adust09 merged 3 commits into
mainfrom
feat/cont-1-checkpoint-order
Jul 2, 2026
Merged

feat(cont): prove CONT-1 checkpoint ordering is determined by slot#38
adust09 merged 3 commits into
mainfrom
feat/cont-1-checkpoint-order

Conversation

@adust09

@adust09 adust09 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Discharges CONT-1 from docs/lean4-proof-propositions.md, completing the Containers domain (2/2 proved).

  • LeanSpec/Forks/Lstar/Containers/Checkpoint.lean:
    • instance : LT Checkpoint — slot-based strict order. Upstream Checkpoint has no explicit __lt__; the ordering in use is the slot comparison inside advance_to, which the instance packages (plus a DecidableRel instance).
    • checkpoint_lt_iff_slot_lt (CONT-1) — definitional (Iff.rfl).
    • advanceTo_eq_iteadvanceTo is exactly if self < candidate then candidate else self, keeping the instance honest against the in-use comparison.
  • Catalog: CONT-1 checked off — Containers domain complete (2/0/0), total 14 proved.

Stacked on #37 — merge order: #37 → this (retarget to main before merging #37).

Verification

  • lake build green with zero warnings; no sorry, no new axioms.

Closes #36

adust09 added 2 commits July 3, 2026 00:41
…or pronic

Prove justifiable_iff: the executable Slot.isJustifiableAfter holds iff
the slot distance from the finalized slot is at most 5, a perfect
square, or a pronic number. The core is correctness of the hand-rolled
isqrt (isqrt_le / isqrt_lt_succ by functional induction on the base-4
recursion, uniqueness via isqrt_eq), plus the square-expansion helpers
sq_succ / odd_sq and the pronic discriminant identity
4k(k+1) + 1 = (2k+1)^2 that justifies the upstream odd-square trick.
Axiom-free, no Mathlib.
Give Checkpoint its slot-based strict order — the comparison in use
inside advance_to, since upstream defines no explicit __lt__ — and prove
checkpoint_lt_iff_slot_lt (definitional) plus advanceTo_eq_ite
connecting the order to the forward-only progression. Axiom-free.

Closes #36
@adust09
adust09 changed the base branch from feat/cont-2-justifiable-iff to main July 2, 2026 15:58
@adust09
adust09 merged commit 18828c2 into main Jul 2, 2026
1 check passed
@adust09
adust09 deleted the feat/cont-1-checkpoint-order branch July 2, 2026 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Containers] CONT-1: Checkpoint ordering is determined by slot

1 participant