Skip to content

feat(fc): prove FC-4 the fork-choice tree is acyclic - #44

Merged
adust09 merged 1 commit into
mainfrom
feat/fc-4-fork-choice-acyclic
Jul 5, 2026
Merged

feat(fc): prove FC-4 the fork-choice tree is acyclic#44
adust09 merged 1 commit into
mainfrom
feat/fc-4-fork-choice-acyclic

Conversation

@adust09

@adust09 adust09 commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Second FC proposition, building on the Store model and Store.WellFormed from #43.

Approach

Store/Ancestry.lean states block ancestry relationally: ProperAncestor st a d holds when parent_root links from d reach a in one or more steps inside the store. Upstream has no standalone is_proper_ancestor helper — the convention lives in the _checkpoint_is_ancestor walk (already modeled as checkpointIsAncestor) and in the parent-slot ordering established at block insertion (on_block runs the STF, which admits only strictly-future slots), stated as WellFormed.parentSlotLt (leanEthereum/leanSpec#1176).

Theorems

  • ProperAncestor.descendant_block — the descendant end of every derivation is a stored block
  • getBlock?_isSome_of_mem — a stored entry makes the lookup succeed
  • properAncestor_slot_lt — slots strictly decrease along proper ancestry on a well-formed store
  • fork_choice_acyclic (FC-4) — no stored block is a proper ancestor of itself: a cycle would put the block's slot strictly below itself

Catalog: FC-4 checked (with a note that blocks are keyed pairs, so the statement quantifies over p ∈ st.blocks), progress table 18/12/1. lake build passes with no sorry.

Store/Ancestry.lean states block ancestry relationally: ProperAncestor
st a d holds when parent_root links from d reach a in one or more steps
inside the store. Upstream has no standalone helper - the convention
lives in the _checkpoint_is_ancestor walk and in the parent-slot
ordering established at block insertion, stated here as
WellFormed.parentSlotLt (leanEthereum/leanSpec#1176).

properAncestor_slot_lt shows slots strictly decrease along every
proper-ancestor step, so a self-ancestor cycle would put a block's slot
strictly below itself: fork_choice_acyclic.
@adust09
adust09 merged commit 7e5846a into main Jul 5, 2026
1 check passed
@adust09
adust09 deleted the feat/fc-4-fork-choice-acyclic branch July 5, 2026 14:41
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.

1 participant