Files
LithosAnanake/proof
Robert Allan JamesandClaude Sonnet 5 b196c95e44 proof/: complete StarForth_Double_Words.thy (arithmetic + 2>R/2R>/2R@)
Both blockers recorded at the previous resume point turned out to be
resolvable, not permanent:

- The "cell is unbounded int" blocker for D+/D-/DNEGATE/etc. was stale --
  cell was already migrated to a 64-bit word type in commit fe6e705, before
  this file was first touched. The note was never re-checked against
  current StarForth_Base.thy before being carried forward. Same lesson the
  control_words.c vm_ip finding taught one file earlier in this sweep:
  re-verify carried-forward reasoning against the current file, don't just
  trust a previous session's note.
- The missing vm->ecw_nesting field for 2>R/2R>/2R@ was a real, scoped gap
  -- added ecw_nesting :: nat to vm_state in StarForth_Base.thy.

Adds S>D, D+, D-, DNEGATE, DABS, a d_compare helper, DMAX, DMIN, D<, D=,
D0=, D0<, D2*, D2/, 2>R, 2R>, 2R@. D2*/D2/ use push_bit/drop_bit/bit
(established idiom from StarForth_Q48_16.thy) for the 128-bit shifts; D2/
uses sint/div (floor division) rather than cell_sdiv (C99 truncating
division) since arithmetic right shift is floor division, not truncation,
for negative operands. DNEGATE's double-negation-is-identity property is
true but left unproved (needs the same carry/borrow-across-the-pair
algebra as D+/D-, not just simp) -- a nice-to-have, not core plumbing.

All 20 registered words in double_words.c are now covered. 28 theory
files verify with zero errors.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-13 22:23:47 -04:00
..

proof/

Isabelle/HOL theory files providing machine-checkable proofs of determinism and correctness for StarForth. 24 theory files covering all 7 feedback loops, core word categories, and the word-level ACL system.

Running proofs

isabelle build -D proof/

Requires an Isabelle installation. See docs/01-getting-started/DEVELOPER.md.

Theory files

Foundations

File Covers
StarForth_Base.thy Base definitions and type system
StarForth_Correctness.thy Overall correctness
StarForth_Transition.thy State transitions
StarForth_Concurrent.thy Concurrency properties
StarForth_Mutex.thy Mutual exclusion

Physics loops (17)

File Loop
StarForth_Loop1_Heat.thy Execution heat tracking
StarForth_Loop2_Window.thy Rolling window of truth
StarForth_Loop3_Decay.thy Linear decay
StarForth_Loop4_Pipeline.thy Word transition prediction
StarForth_Loop5_WinInf.thy Window width inference
StarForth_Loop6_DecayInf.thy Decay slope inference
StarForth_Loop7_Heartrate.thy Adaptive heartrate

Word categories

StarForth_Arithmetic_Words.thy, StarForth_Stack_Words.thy, StarForth_Logical_Words.thy, StarForth_Memory_Words.thy, StarForth_Return_Stack_Words.thy, StarForth_Q48_16.thy

ACL system (Phase 6)

File Property
ACL_Pin_Monotone.thy Pin is one-way
ACL_Inherit_Clears_Pin.thy Inheritance clears pin
ACL_TTL_Bounded.thy TTL stays within bounds
ACL_Emergency_Bypass.thy Emergency console bypass
ACL_No_Escalation.thy No privilege escalation

See also