# P versus NP, round 2: the defeater-free fragment

This is an attack report, not a proof of anything about P versus NP. It
defines the defeater-free fragment of recipe composition search
explicitly from the real repo code, exhibits a polynomial-time search
algorithm for it, measures the algorithm on the real registry, checks it
against brute-force enumeration, and runs a 3-SAT reduction attempt that
stalls for a structural reason. No separation or collapse is claimed,
and none follows from anything here.

Repo: NeuruhAI/lead-recipe-os, HEAD 7363dcb1efab4dad3e44c7408ba921b193304ff7
(2026-10-03), cloned read-only 2026-11-20, unmodified. Hunt script:
compute/p_vs_np_r2.py. Numbers: data/p_vs_np_r2.json. All numbers below
were measured by running the repo code (registry loader, evaluator,
composer, validator), not estimated. Registry counts re-confirmed this
round: 558 recipes (58 canonical, 500 curated), 317 signals, 107
ingredients, 154 sources, 3293 territories, matching round 1 exactly.

## The fragment definition

DF-COMP, the defeater-free composer fragment, is the set of recipes
buildable by `lead_recipe_os/composer/compose.py` (through `build()` in
`lead_recipe_os/registry/seed/recipes_curated.py`) whose signal logic
contains no `SignalClause` with `defeater=True`. A composed recipe in
this fragment is always a flat `ALL` over nodes of exactly nine forms:
required leaves (plain PRESENT, ABSENT-state, or typed comparison),
`ANY` groups of leaves, `NOT(leaf)` for negatives, `ABSENT(signal)`,
`WITHIN_DAYS`, `SEQUENCE`, `RECURRENCE`, `NEAR`, and `ADJACENT`. There
is no `COUNT_AT_LEAST`, no `CONVERGENCE`, no `CONTRADICTION_FREE`, no
`CHANGE`, `ACCELERATION`, or `PERSISTENCE`, and no nesting deeper than
`ALL` over `ANY` over a leaf. The decision problem DF-COMP-SEARCH asks:
given a subject timeline T (and, where relevant, a RelationContext),
does there exist a DF-COMP recipe, passing `validate()` in
`lead_recipe_os/composer/validate.py`, whose membership evaluation by
`evaluate_logic` in `lead_recipe_os/signals/graph.py` returns SATISFIED?

Two facts make this definition non-vacuous. First, the composer never
emits a defeater: 200 random `ComposeRequest` values covering every
composer field produced 198 built recipes (2 failed at compose time
with an empty thesis) and 0 of them contained a defeater clause. The
defeater enters the repo only through hand-built canonical recipes: 7
canonical recipes carry 8 defeater clauses in total, 0 in the curated
library. Second, the fragment is not the whole `LogicNode` language:
the registry's own membership logic uses only the nine composer forms
(ALL 557, ANY 26, NOT 13, ABSENT 10, ADJACENT 9, RECURRENCE 10,
SEQUENCE 19, WITHIN_DAYS 20, NEAR 1, leaves 1167, across 558 recipes),
so the composer grammar already covers every op the registry uses.

## The defeater hinge, re-measured

Round 1 showed that a `NOT` over a defeater leaf is SATISFIED on an
empty timeline. The fragment removes exactly that path. Measured on the
real evaluator with signal `ownership.government`:

| timeline | NOT(defeater leaf) | NOT(plain leaf) |
|---|---|---|
| empty | SATISFIED | UNKNOWN |
| signal PRESENT | CONTRADICTED | CONTRADICTED |
| signal evidentially ABSENT | SATISFIED | SATISFIED |
| signal CONFLICTED | SATISFIED | UNKNOWN |

In the fragment, `NOT` maps UNKNOWN to UNKNOWN: a tree can be
SATISFIED only on decided evidence, never on its absence. That single
change is what makes the greedy search below work. Note also the
`_combine_all` rule, which matters for the 3-SAT section: an `ALL` over
one CONTRADICTED non-decisive child returns UNKNOWN, not CONTRADICTED,
because a non-decisive contradiction is negative evidence, not the
opposite fact. A bare `NOT(leaf)` on a PRESENT signal is CONTRADICTED,
but `ALL(NOT(leaf))` on the same timeline is UNKNOWN.

## The greedy algorithm

Claim: DF-COMP-SEARCH is decidable by one pass over a candidate node
pool, each node tested with the real evaluator, followed by witness
construction with the real composer and validator. The argument has
three parts, each checked against the code and each measured below.

1. Node independence. Evaluation of one composer node reads only the
timeline and the RelationContext, never another node. And `ALL` is
SATISFIED exactly when every child is SATISFIED (`_combine_all`:
SATISFIED only if all children SATISFIED). So a SATISFIED composed
recipe exists exactly when at least one individually SATISFIED node
exists that can be assembled into a recipe passing `validate()`. An
`ANY` group adds nothing: it is SATISFIED only when one of its member
leaves is SATISFIED, and that leaf alone is already a node.

2. Candidate completeness. Every composer node form is covered by the
pool, with parameters read off the timeline data so that no parameter
choice is missed. Plain leaves are tested at the loosest evidence
floors (`min_confidence` UNKNOWN, `min_basis` PREDICTED) as well as the
composer defaults, and the loosest floors dominate: loosening floors
can only admit lower-ranked instances, which cannot displace the best
admissible instance, so a leaf SATISFIED under any floors is SATISFIED
under the loosest floors. A typed comparison leaf SATISFIED implies a
plain PRESENT leaf SATISFIED (the instance is PRESENT), and a typed
leaf CONTRADICTED implies a plain PRESENT or plain ABSENT leaf
SATISFIED, so typed leaves add no new witnesses; the `exists` form is
still used as the witness vehicle for loose floors, since the composer
reaches custom floors only through a 4-tuple required item.
`WITHIN_DAYS` is tested with days equal to the signal recency,
`RECURRENCE` with window equal to the event span, `SEQUENCE` with
within equal to the witnessing pair gap, `NEAR` with distance equal to
the resolved distance. If a temporal or relational node is SATISFIED
for any parameter, it is SATISFIED for the parameter listed here.

3. Validity is enforced by construction, not assumed. The witness
builder tries satisfied nodes in preference order through the real
`compose()` and `validate()`, then falls back to pairs of satisfied
leaves (a pair changes the recipe signature, so a single leaf refused
as an exact duplicate can still witness as part of a pair). Validity
bites in measured ways: a single-signal recipe whose only signal is
source-blocked fails with verdict SOURCE_BLOCKED; a non-BOOLEAN signal
used as a PRESENT/ABSENT leaf fails the schema check in
`Registry.validate` (`_check_logic_kinds`); and an ABSENT-required
recipe on `ownership.government` fails contradiction detection because
`build()` auto-adds the `NOT_GOV` disqualifier on that same signal.
The builder routes around all three by trying further candidates.

Complexity: the pool holds at most 6 leaves per signal plus one
`WITHIN_DAYS` and one `RECURRENCE` per signal with events, plus ordered
`SEQUENCE` pairs over event signals (capped at 20 signals, 380 pairs,
in the implementation) plus relational nodes. Each candidate costs one
linear evaluation. Measured on the full 317-signal vocabulary the pool
is at most 2,599 nodes and a greedy run takes 0.10 to 0.58 seconds.

## Measured results: the timeline battery

Nine timelines, all run through the greedy search, witness
construction, validation, and re-evaluation:

| timeline | candidates | satisfied nodes | valid witness | witness kind | attempts |
|---|---|---|---|---|---|
| empty | 1902 | 0 | no | none | 0 |
| empty with relations | 1906 | 2 | no | none | 2 |
| full evidence (all 317 PRESENT) | 2599 | 1331 | yes | PL_default | 1 |
| random p 0.5 | 2441 | 857 | yes | PL_default | 1 |
| mixed (PRESENT, ABSENT, CONFLICTED, low-floor, events) | 2005 | 129 | yes | PL_default | 4 |
| mixed with relations | 2009 | 131 | yes | PL_default | 4 |
| single PRESENT signal | 1903 | 3 | yes | PL_default | 1 |
| ABSENT only (2 signals) | 1902 | 8 | yes | NOT_PL | 6 |
| low-floor only (2 signals) | 1906 | 6 | yes | PL_loose | 1 |

Satisfied-node breakdowns: full evidence gives PL_loose 317,
PL_default 317, WITHIN_DAYS 317, SEQUENCE 380 (capped), and nothing
else. Random p 0.5 gives PL_loose 159, PL_default 159, WITHIN_DAYS 159,
SEQUENCE 380. Mixed gives PL_loose 10, PL_default 8, AL_loose 2,
AL_default 2, NOT_PL 2, ABSENT_op 2, WITHIN_DAYS 10, RECURRENCE 3,
SEQUENCE 90. The two extra PL_loose nodes in mixed are the low-floor
instances, invisible at default floors and visible at the loosest
floors, which is why the loose enumeration exists. Low-floor only gives
PL_loose 2, WITHIN_DAYS 2, SEQUENCE 2, and its witness is the
`exists`-form loose leaf (`gen_greedy_witness_1f85dad7`), built,
validated, and re-evaluated SATISFIED on the first attempt.

Two rows deserve emphasis. First, the empty timeline with resolved
relations: the only satisfied nodes are the two relational nodes
(NEAR river at 100 m, ADJACENT parcel), and both witness attempts fail
validation on evidence feasibility, which needs at least one signal
with an independence group. Node existence and valid-recipe existence
diverge here, and the validity-aware decision is NO. The greedy
decision reported for the fragment is the validity-aware one: a
SATISFIED node that cannot validate does not witness a YES. Second,
the mixed witness needed 4 attempts (two singles refused as
SOURCE_BLOCKED, one refused on schema for a non-BOOLEAN leaf used as
PRESENT) and the ABSENT-only witness needed 6 (including the
`NOT_GOV` self-contradiction on `ownership.government`), which is why
the builder tries candidates in order instead of stopping at the
first satisfied node.

## Check: greedy against brute force, 44 of 44

Over an 8-signal vocabulary, the greedy answer was compared with
exhaustive enumeration of all `ALL` trees over subsets of size 1 to 3
from the per-signal node pool (plain, ABSENT, NOT, ABSENT-op,
WITHIN_DAYS, RECURRENCE, SEQUENCE forms). 40 seeded random timelines
plus 4 deterministic trials that stress the NO direction (empty,
conflicted-only, withdrawn-only, low-floor-only with registered
signals): 44 agreements, 0 disagreements, in 3.21 seconds. A withdrawn
PRESENT instance is inadmissible at every evidence floor, so the
withdrawn-only timeline is a genuine NO case for both methods. The
check confirms the implementation, not the theorem: the case analysis
above is the argument, and the 44 of 44 is measured support for it.

Cost comparison, full vocabulary: one greedy pass over 2,599 nodes
takes 0.57 seconds at a measured 0.000194 seconds per node evaluation.
Extrapolating that per-evaluation cost, exhaustive enumeration would
take about 0.5 seconds for 1-node trees, about 656 seconds for 2-node
trees, and about 567,586 seconds for 3-node trees. The greedy decision
needs the one pass only.

## The 3-SAT reduction attempt, and where it stalls

Variables are three registered signals (`tax.delinquent`,
`probate.opened`, `listing.active`). Two natural encodings were run on
small instances with the real evaluator.

Encoding A: the formula lives in the tree, the assignment lives in the
timeline. `phi_sat` is two 3-clauses, satisfiable; `phi_unsat` is all
eight 3-clauses over three variables, unsatisfiable. The assignment
alpha (x1 PRESENT, x2 PRESENT, x3 evidentially ABSENT) satisfies
`phi_sat`. Measured: the formula tree for `phi_sat` on the alpha
timeline is SATISFIED, the formula tree for `phi_unsat` on the same
timeline is UNKNOWN (seven clauses SATISFIED, the alpha-forbidding
clause CONTRADICTED non-decisive, so the ALL is UNKNOWN), and both
formula trees on an empty timeline are UNKNOWN. So the formula tree
itself distinguishes SAT from UNSAT under alpha. But the decision
problem does not ask about the formula tree; it asks whether ANY tree
is SATISFIED. On the alpha timeline the trivial one-leaf tree
`ALL(leaf(x1, PRESENT))` is SATISFIED, so the decision answers YES
while `phi_unsat` is UNSAT. On an empty timeline the greedy finds no
satisfied node at all, so the decision answers NO while `phi_sat` is
SAT. Both directions of the equivalence fail.

Encoding B: the assignment lives in the tree (an ALL over one literal
per variable), the formula has nowhere to live. The evaluator checks
literals only against the timeline, and the timeline fixes a single
assignment, so a tree is SATISFIED exactly when its literals match
that assignment, whatever the formula says. Measured: on an x1 PRESENT
timeline, `ALL(leaf(x1))` is SATISFIED and the bare `NOT(leaf(x1))` is
CONTRADICTED, while the ALL-wrapped `ALL(NOT(leaf(x1)))` is UNKNOWN
under the non-decisive contradiction rule. The formula is never
consulted.

The structural diagnosis: the evaluator is a matcher, not a verifier
of a hidden formula. A reduction would need the formula to live in the
checker's input (the timeline) in a form the evaluator can consult
while checking a guessed assignment, and the evaluator consults only
per-signal values. Per-signal values cannot carry the formula, because
a tree chooses its own comparison values and can always pick one that
matches, and restricting literals to PRESENT/ABSENT leaves only fixes
one bit per signal, which makes the answer a function of the timeline
alone. The missing piece is a validity rule that forces the tree to
encode the whole formula and forbids trivial witnesses, for example a
required skeleton (a fixed ALL-of-ANY shape with one group per clause)
plus a coverage rule (every variable used exactly once). That is a
different decision problem, not RECIPE-COMPOSITION-SEARCH as defined,
and it is not attempted here. This stalls the hardness direction; it
does not prove no reduction exists.

## Barrier check for the new direction

Relativization: no grip. The greedy is a concrete uniform algorithm on
a fixed finite object; it claims nothing about P versus NP in general
and does not relativize to a separation.

Natural proofs: no grip. No circuit lower bound is claimed anywhere
here; the constructive result is an upper bound (an algorithm), which
is the opposite direction from what the barrier blocks.

Algebrization: no grip. There is no arithmetization of the evaluator
in this work, and none is needed for it.

Scope notes. The polynomial-time result is for DF-COMP as defined
(composer grammar, no defeaters, `validate()` enforced). It does not
show that unbounded composition search over arbitrary `LogicNode`
trees is in P, and it does not show that it is not. The atom argument
sketched in the hunt notes, that every SATISFIED tree decomposes into
directly checkable SATISFIED or CONTRADICTED atoms, would extend the
result to arbitrary defeater-free trees, but the induction over all
fifteen ops with parameter witnesses was not carried out here, and the
validate-only reading of the problem is degenerate anyway (a zero-arg
`CONTRADICTION_FREE` node evaluates SATISFIED on every timeline, so
that reading answers YES trivially). Neither gap affects the fragment
verdict. Nothing here separates or collapses P and NP.

## Verdict

The constructive direction succeeds for the defeater-free fragment:
DF-COMP-SEARCH is decidable by a node-wise greedy search in
polynomial time, exhibited and measured (at most 2,599 candidates and
0.58 seconds on the full 317-signal vocabulary, witnesses built with
the real composer and validator, 44 of 44 agreement with brute force
on a small vocabulary). The hardness direction stalls: both natural
3-SAT encodings fail the equivalence, for the structural reason that
any decidable literal yields a trivial SATISFIED tree and an empty
timeline kills every fragment tree. The open move is no longer the
fragment itself; it is whether a skeleton-constrained variant of the
problem, with a validity rule that ties the tree shape to a formula,
admits a reduction, or whether the atom argument can be completed for
the full logic.

## Sources and method

Repo NeuruhAI/lead-recipe-os, HEAD 7363dcb1, read 2026-11-20.
`lead_recipe_os/signals/graph.py` (evaluate_logic, defeater rule,
_combine_all), `lead_recipe_os/signals/model.py` (SignalTimeline.best,
evidence floors), `lead_recipe_os/signals/temporal.py` (sequence,
within_days, recurrence), `lead_recipe_os/signals/linear.py`
(compare, exists), `lead_recipe_os/registry/contracts.py` (LogicNode,
SignalClause, leaf helpers), `lead_recipe_os/registry/store.py`
(load_default, Registry.validate, _check_logic_kinds),
`lead_recipe_os/composer/compose.py` (ComposeRequest, compose),
`lead_recipe_os/composer/validate.py` (validate, nine checks),
`lead_recipe_os/composer/graph.py` (near_duplicates, differential),
`lead_recipe_os/registry/seed/recipes_curated.py` (build, the composer
grammar), `lead_recipe_os/registry/seed/recipes_canonical.py` (the 7
defeater-bearing recipes). Hunt script compute/p_vs_np_r2.py, run with
the sovereign-runtime venv Python (pydantic 2.14.4), 32.2 seconds total.
No receipt ledger writes, no page rebuild, no deploy, no repo
modification.
