docs: sub-references name bookspec's statements, invariants and scenarios
Unit S-E rewrote each `B-n` citation to its bookspec id but kept the
sub-reference after it ("item 7", "rule 11", "INVARIANT 2"). Those
numbers counted parts of the retired rules.md text, so `BS-statement-5
item 7` pointed at finished and abandoned projects, not at the snapshot
it meant. Bookspec numbers a record's parts from 1 as `statement`,
`invariant` and `scenario`; every sub-reference now says so.
The map was built by content, not by position: each old item,
INVARIANT or SCENARIO was read in `git show ca8d676d5^:docs/spec/rules.md`
(the last full rule text), found in the pinned records
(bookspec bc92cf3) and in docs/spec/claims/, and each reference was
read in its context before it was mapped. Where the old numbering still
survives as the "Rule n" labels inside bookspec's statements (the cash
flow, party totals) the new number is that statement's position; where
a record carries the whole rule differently (the asset depreciation, the
IIF file, the arap invariants) the reference follows the content. Where
bookspec keeps no counterpart, the product rule that states it is cited
instead: WB-statement-5 (a project's facts and names), -7 (the snapshot),
WB-arap-4 (the document_standing feature), -8 (the issued PDF), -15 (a
payment event names its line), WB-ledger-15 (BS-ledger-12 is retired).
A reference that had pointed at the wrong part is corrected, for example
the discount-reason references that said BS-arap-6 INVARIANT 2 (a
bound) now say invariant 6 (the discount cap and date).
Only the reference tokens and their sentence change; no paragraph is
reflowed. A reference wrapped across a comment prefix keeps its wrap.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
609e4e6b26
commit
e41cc3a161
78 files changed
+298
-302
No files matched your search
@@ -17,7 +17,7 @@
|
||||
//! is the callers' answer rather than a division by zero.
|
||||
//! SOURCE: BS-partner-1 (partners share by the agreement; largest
|
||||
//! remainder), BS-1099-1 (a payment's buckets), BS-statement-3
|
||||
//! rule 5 (the government's part), BS-arap-3 (a document line's
|
||||
//! statement 8 (the government's part), BS-arap-3 (a document line's
|
||||
//! exact amount), BS-ledger-1 (whole smallest units).
|
||||
//! INVARIANTS:
|
||||
//! 1. The parts sum to the whole, for every policy.
|
||||
|
||||
@@ -968,7 +968,7 @@ fn apply_cash_mirrors() {
|
||||
/// An accepted entry always has cash flows, and they explain its cash
|
||||
/// exactly: the sections' cash sums to the entry's cash, and what no cash
|
||||
/// settled (each section's movement plus its cash) sums to zero
|
||||
/// (BS-statement-3 rules 3 and 9: the statement foots, entry by entry).
|
||||
/// (BS-statement-3 statements 4 and 14: the statement foots, entry by entry).
|
||||
#[kani::proof]
|
||||
#[kani::unwind(5)]
|
||||
fn entry_flows_sum_to_cash() {
|
||||
@@ -1043,7 +1043,7 @@ fn entry_flows_are_bounded() {
|
||||
|
||||
/// A reversal's cash flows are its original's, negated, part by part:
|
||||
/// what lets an entry and its reversal in one period drop out of the
|
||||
/// statement together (BS-statement-3 rule 6). End to end, on entries of
|
||||
/// statement together (BS-statement-3 statement 11). End to end, on entries of
|
||||
/// up to two lines: at three (`NF`) one run went past half an hour at
|
||||
/// four jobs on a busy machine (2026-10-21), so three lines are proved in
|
||||
/// two halves, `entry_movements_of_a_reversal_mirror` and
|
||||
@@ -1228,7 +1228,7 @@ fn any_way() -> kernel::OnBehalf {
|
||||
}
|
||||
|
||||
/// What a member or a lender paid or received for the company (
|
||||
/// BS-statement-3 rule 11, D-42) invents and loses nothing: the parts net to zero,
|
||||
/// BS-statement-3 statement 16, D-42) invents and loses nothing: the parts net to zero,
|
||||
/// so an entry's flows still sum to its cash; each part settles its own
|
||||
/// movement toward zero, never past it; and as much is settled as can be.
|
||||
#[kani::proof]
|
||||
@@ -1276,7 +1276,7 @@ fn constructive_nets_to_zero() {
|
||||
|
||||
/// The other way, minus the sources and minus the uses give minus the
|
||||
/// parts: a reversal of a payment made on the company's behalf mirrors it
|
||||
/// (BS-statement-3 rule 6), so the two drop out together.
|
||||
/// (BS-statement-3 statement 11), so the two drop out together.
|
||||
#[kani::proof]
|
||||
#[kani::unwind(4)]
|
||||
fn constructive_mirrors() {
|
||||
@@ -1320,7 +1320,7 @@ fn any_party_inputs() -> (Option<(i64, i64)>, i64, i64, i64) {
|
||||
(capital, any_amount(), any_amount(), debits)
|
||||
}
|
||||
|
||||
/// BS-partner-3 items 1-4: the direction is the sign of what counts (paid above
|
||||
/// BS-partner-3 statements 1-5: the direction is the sign of what counts (paid above
|
||||
/// zero, received below), neither exactly when nothing counts; cash and
|
||||
/// in kind each carry the whole's sign and together never exceed it; a
|
||||
/// money target is all cash; a contribution counts all of itself; a
|
||||
@@ -1393,7 +1393,7 @@ fn direction_of_is_the_sign() {
|
||||
kani::cover!(amount == 0, "nothing moved");
|
||||
}
|
||||
|
||||
/// BS-partner-3 item 3 and BS-ledger-5: the target is odd. Negating the lines negates the
|
||||
/// BS-partner-3 statement 3 and BS-ledger-5: the target is odd. Negating the lines negates the
|
||||
/// capital movement, the money net and the own-account movement, and the
|
||||
/// property comes from the other side, so it keeps its size: the result
|
||||
/// is the original's reverse_target, whenever it isn't the debits fallback
|
||||
@@ -1837,7 +1837,7 @@ fn basis_figures_laws() {
|
||||
);
|
||||
}
|
||||
|
||||
/// `kernel::unrecovered_cost` (BS-statement-5 item 4), for every revenue
|
||||
/// `kernel::unrecovered_cost` (BS-statement-5 statement 5), for every revenue
|
||||
/// and expense a line could carry: never below zero; the shortfall when
|
||||
/// expenses exceed revenue, else zero; never above max(expenses, 0) when
|
||||
/// revenue isn't negative (expenses may be negative: a reimbursement
|
||||
@@ -1859,7 +1859,7 @@ fn unrecovered_cost_laws() {
|
||||
kani::cover!(u == 0 && revenue > expenses, "repaid, and more");
|
||||
}
|
||||
|
||||
/// `kernel::running_bounds` (BS-arap-2 INVARIANT 2; the bounds every
|
||||
/// `kernel::running_bounds` (BS-arap-2 invariant 6; the bounds every
|
||||
/// document command and reversal checks), for every total and every
|
||||
/// sequence of up to `N` dated movements a line could carry: it says
|
||||
/// Within exactly when every running balance is in `0 ..= total`, and
|
||||
@@ -1899,7 +1899,7 @@ fn bounds_check_matches_definition() {
|
||||
}
|
||||
|
||||
/// `kernel::bounds_kept` (the check every document command and reversal
|
||||
/// runs, BS-arap-2 INVARIANT 2): on books in bounds at every date it
|
||||
/// runs, BS-arap-2 invariant 6): on books in bounds at every date it
|
||||
/// is the definition (`running_bounds` of the books after the step); and
|
||||
/// whenever it says Within, no running balance after the step is further
|
||||
/// outside `0 ..= total` than before it, so a step that mends books an
|
||||
|
||||
Reference in new issue
Block a user