Skip to content

Add 0047: a rule may conclude a relation - #820

Merged
WaylandYang merged 1 commit into
devfrom
feat/a-rule-may-conclude-a-relation
Sep 20, 2026
Merged

WaylandYang merged 1 commit into
devfrom
feat/a-rule-may-conclude-a-relation

Conversation

@WaylandYang

Copy link
Copy Markdown
Contributor

Which record

Adds 0047 · A rule may conclude a relation, proposed, nothing built. Revises the edge exclusion stated in 0021, which gains a dated revision note where the original claim stands. No code, no schema, no migration.

The gap

A rule reads one entity's own attributes and concludes about that same entity. So a threshold over a chain cannot be written at all: a holding above 50% in a company that itself holds above 50% in another is a control relation nobody can express. The rule engine has the threshold and no chain; the axiom engine has the chain and cannot read a value. paths_between answers the question once at query time, and that answer has no interval, no premises, no retirement and nothing a review queue can see.

From #818.

What the record decides

  1. A conclusion may be a relation between the subject and one entity reached across one declared join relation. derived_facts already carries subject_id, predicate_id and object_id, so this is a fourth conclusion shape in the evaluator rather than a new table.
  2. Validity is the intersection of every premise interval including the join edge's own — 0021 decision 4 unchanged. This is also the thing the query-time walk cannot produce: when the chain held.
  3. A concluded edge rejoins the pool derive() reads, and the axiom pass runs once per round. This couples the two reasoners for the first time.
  4. The three caps in play (MAX_COMBOS, MAX_DERIVED_PER_PREDICATE, MAX_DEPTH rounds) are set by measurement published in the PR that changes them, not chosen here.
  5. Negation, aggregation, user-defined recursion, a second hop and joining on an undeclared predicate all stay out.

Why decision 3 is the whole argument

0021 excluded an edge conclusion because "the ordering is therefore free of a cycle by construction, which a rule concluding an edge would not be". That sentence was written when the rule pass ran once.

0030 has since made the rule pass a fixed point, and in doing so replaced the property being defended: safety now rests on the derivable space being finite, not on the ordering being acyclic. 0030 then parked the rest explicitly — "Axioms and rules stay two reasoners … Folding both into one fixed point is a different question with a different cost, and nobody has asked it." #818 asks it, and this record answers with 0030's own argument rather than a new one.

The obvious alternative, one extra derive() after the rule fixed point, is recorded as a dead end with the reason 0030 already gave: a rule joining on a predicate another rule concluded would silently never fire, and in the result "the criterion was not met" and "the edge was never seen" look identical.

What the record does not re-decide

0032 already decided that a rule may reach a value across a relation (well → field → depth), and has not built it. That is the read side. This record depends on the single-hop edge loader 0032 calls "the bulk of the implementation" and leaves the decision where it is.

Costs named in the record

Checked

  • every relative record link in the new and edited files resolves
  • both index tables in docs/decisions/README.md contiguous 0001–0047
  • the claims about current behaviour were read out of reasoning::materialize() rather than recalled: derive() runs once before the rule rounds, the rounds are bounded by MAX_DEPTH, contradictions() runs once on the single derivation

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
@WaylandYang
WaylandYang merged commit 91469de into dev Sep 20, 2026
@WaylandYang
WaylandYang deleted the feat/a-rule-may-conclude-a-relation branch September 20, 2026 08:24
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