Skip to content

feat(fc): prove FC-2 the head descends from latest justified - #45

Merged
adust09 merged 1 commit into
mainfrom
feat/fc-2-head-descends-from-justified
Jul 5, 2026
Merged

feat(fc): prove FC-2 the head descends from latest justified#45
adust09 merged 1 commit into
mainfrom
feat/fc-2-head-descends-from-justified

Conversation

@adust09

@adust09 adust09 commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Third FC proposition, completing the head-selection safety trio (FC-1 determinism → FC-4 acyclicity → FC-2 descent), on the Store model of #43 and the ProperAncestor relation of #44.

Theorems (Store/Ancestry.lean)

  • AncestorOrEqual st a d := a = d ∨ ProperAncestor st a d — the catalog's isAncestorOrEqual, stated relationally
  • ProperAncestor.trans — proper ancestry composes
  • mem_unique_of_keys_nodup / getBlock?_eq_some_of_mem — under Python-dict key uniqueness (WellFormed.blocksKeysNodup) the lookup returns exactly the stored entry
  • childrenOf_parent — an eligible child is stored with its parent link at the walk's current head
  • ghostWalk_ancestorOrEqual — the GHOST descent never leaves the subtree of its start
  • computeLmdGhostHead_descends — for any vote set and threshold, the selected head sits in the anchor's subtree
  • head_descends_from_justified (FC-2) — under Store.WellFormed, update_head selects the justified root or a strict descendant

ghostWalk loses its private marker so the descent lemmas can state per-step facts about it (noted in its docstring).

Catalog: FC-2 checked, progress table 19/11/1 — FC now 3 proved / 2 open (remaining: FC-3 validate_attestation, FC-5 production-loop termination). lake build passes with no sorry.

AncestorOrEqual states the catalog's isAncestorOrEqual relationally:
a = d or ProperAncestor st a d. The GHOST descent never leaves the
subtree of its start (ghostWalk_ancestorOrEqual): each step lands on a
childrenOf element, which under nodup keys is a stored block whose
parent link is the current head (childrenOf_parent,
getBlock?_eq_some_of_mem), and ProperAncestor.trans composes the
steps. computeLmdGhostHead_descends lifts this through the anchor
match, and head_descends_from_justified instantiates it at
update_head's justified anchor under Store.WellFormed.

ghostWalk loses its private marker so the descent lemmas can state
per-step facts about it.
@adust09
adust09 merged commit 2f27c36 into main Jul 5, 2026
1 check passed
@adust09
adust09 deleted the feat/fc-2-head-descends-from-justified branch July 5, 2026 14:48
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