Repository navigation
Numeric cut: ABOVE against RANGE strict, numeric conditions at the cut stated (WM.35) - #30
Merged
Merged
Conversation
…t stated (WM.35)
Change-track work on Jon's ruling 1 on stage b3b (October 15, 2026), with his
rulings 2 to 5 recorded in the b3b proposal file and WM.E224 to WM.E239 decided.
The boundary. ABOVE(NUMFL.i, x, RANGE, q) is strict (value > point) and BELOW
inclusive (value <= point), so the numeric adjectives mean exactly the world's
numeric literals, > t and its negation <= t: runtime.above, BruteForce.compare,
and the oracle's pole_at, each changed on its own. The comparisons of scalars
against a comparison class are unchanged, and so are both world definitions.
Numeric conditions at the cut. A conditional effect whose numeric threshold
literal is > cut_high or <= cut_low is stated as a conditional causal statement,
with the numeric adjective as a before predication ("hungry things that eat
things become full"); its proposition is the pole against RANGE at the cut,
BEFORE(EVENTVAR.1, ABOVE(NUMFL.1, VAR.1, RANGE, 0.75)) in the rendering, and the
JSON literal records its cut. Every other numeric threshold literal stays
unstated (decision 23), and no precondition with a numeric literal is stated.
Engineering choices (change track; none is Jon's decision):
- The cut points are the runtime's arithmetic, low + cut * (high - low), kept
on Truth.cut_points by fluent; a world literal matches when its threshold
equals the point exactly (float equality, as the brief asks).
- A numeric condition literal is a Condition whose label is the pole and whose
value is always true (no negated numeric pole: <= cut_high and > cut_low have
no word). Condition gains numeric and timed; the sort order puts NUMFL after
BOOLFL.
- The cut is no part of the Proposition, as for a numeric pole predicate
(ruling 4 on b3a): logical.with_cut writes it on the subject's and the causal
record's numeric literals, and the rendering carries it in the comparison.
Tests that hand a bare to_json() form to the oracle wrap it in with_cut.
- The grammar realizes a numeric condition exactly as a Boolean fluent
condition (a before predication of kind precondition), so realizable_condition
treats it as timed: a numeric condition of the patient in a statement about
the patient has no place (counted as patient_relative, no longer as
numeric_condition).
- A test item's meta.causal and statement_record carry the cuts too, as the
documents' causal record does, so an item's form and its metadata agree.
- The oracle matches a form's numeric literal to a record literal by
recomputing the point from the record's range and the form's cut, apart from
the corpus.
- The test-set format check compares the literals of a condition by their
shapes (a numeric literal has a cut, a feature or fluent literal none), as it
already exempted their notation.
- hand_28 is the fixture at the cut; hand_22's expectation at exactly 0.5 moves
from above to not above.
Changed expectations:
- tests/world/test_world_comparisons.py: above against RANGE is `>`.
- tests/fixtures/world/hand_22_numeric_drift.json: ABOVE at 0.5 of a value
exactly 0.5 is false.
- tests/corpus/test_corpus_numeric.py: numeric conditions at the cut are
stated (the test checks them against the record and the rendering); the
raises/lowers forms carry their cut for the oracle.
- tests/corpus/test_corpus_causal.py: the enumeration and rereading helpers map
a numeric literal at the cut to its pole, and a numeric pole literal of the
patient is unrealizable in an object relative.
- tests/corpus/test_corpus_item_sets.py: the default world has ten conditional
statements (four before), still with no law-like false item.
Figures (python -m semantic_world.figures snapshot moved 34 figures, all of
the default corpus; the tiny world and corpus and every baseline are
unchanged, and both rule-set identities keep their values):
- causal.conditional_effects: 10 of 10 stated (4 before; the 6 numeric
conditions of the default world all sit at a cut, 0 unstated).
- effect_statements 80 -> 86; conditional_sentences 111 -> 229; causal
sentences 2446 -> 2508 (raises 334 -> 419, lowers 193 -> 181, effects
1816 -> 1877, preconditions 630 -> 631).
- causal_effect_condition 4 -> 10 pairs; the effect sets grow by the six
statements (polarity 80 -> 86, role 45 -> 51, predicate 257 -> 263, event
78 -> 84 statements); causal_effect_condition_lawlike stays empty.
- Sentences 100,906 -> 100,917, tokens 482,455 -> 483,329, pairs 16,433 ->
16,457; the seen shares of the class sets move by a few thousandths.
The lexicon and the word-form requests are unchanged; the existing word forms
were re-attached with render.
Counts for Jon (not built): (a) no conditional statement of the default world
is silenced by the grammar gap of ruling 3 (0 effects, 0 category statements,
0 role-swap items); (b) 13 of the 32 numeric precondition literals of the
default world's event types with events equal a cut (9 "> 0.75", 4 "<= 0.25"),
all on event types with words.
Run times (October 15, 2026, each alone; stage b3b in parentheses): tiny world
1.4 s (1.3 s), tiny corpus 1.8 s (1.7 s), default world 6.5 s (6.3 s), default
corpus 149 s on the final code and 165 s in an earlier run of the day (141 s;
the reference run of main on the same day took 145 s). No step grew by more
than half. The check list: cargo fmt, clippy, and test (the crates are
untouched), maturin develop, ruff, the fast tier (101 s) and the slow tier
(7 min 27 s), each alone, all passing; check-fixtures passes 34 fixtures.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change-track work after stage b3b: Jon's rulings on b3b, the aligned boundary, and numeric conditions stated at the language's cut.