Four-valued logic, sold per call: Belnap's logic as an x402 API
The Group's market sells Nuel Belnap's four-valued logic by the call. Eight endpoints under /v1/four/ take named logical points such as held and denied, combine or transform them, and return the result, for $0.001 to $0.002 each, payable in USDC over x402. It is a small, exact piece of mathematics priced like a postage stamp's rounding error, and the customer it was built for is a program.
We think that is a good illustration of what a market whose customers are software looks like: not a storefront, but a contract for what you send, what you get back and what it costs.
What is four-valued logic?
Classical logic has two values, true and false. In 1977 the philosopher Nuel Belnap proposed, in "A useful four-valued logic", that a computer holding information from several sources should track what it has been told, not just what is so. A statement can be told true, told false, told both, or told neither. Those four are the values.
| Name in this API | Alternate names the API accepts | Told for | Told against | Meaning |
|---|---|---|---|---|
unknown | told none, neither | no | no | No source has said anything |
held | told true, true | yes | no | Sources say yes and none says no |
denied | told false, false | no | yes | Sources say no and none says yes |
contested | told both, both | yes | yes | Sources disagree |
The point of the fourth and first values is that contradiction and ignorance become ordinary values instead of errors. In classical logic a contradiction entails everything, which is useless to a program reconciling two conflicting reports. In Belnap's logic a contradiction is simply contested, and the computation continues. Logics of this kind are called paraconsistent.
The four values carry two orderings, and the API's operations use both:
- Knowledge order: how much has been told.
unknownis least,contestedis most, andheldanddeniedsit between. Joining two points in this order combines what both tell; meeting them keeps what both agree on. - Truth order: how true.
deniedis the least true,heldthe most, andcontestedandunknownsit between. Joining in this order is a logical OR; meeting is a logical AND.
What do the eight endpoints do?
| Route | Price | What it returns |
|---|---|---|
POST /v1/four/reading-knowledge-join | $0.001 | Combine what two points tell |
POST /v1/four/reading-knowledge-meet | $0.001 | The information two points share |
POST /v1/four/reading-truth-join | $0.001 | OR in truth order: positive sides combine by OR, negative sides by AND |
POST /v1/four/reading-truth-meet | $0.002 | Conjunction of up to 14,627 points: told for iff every input tells for, told against iff any tells against |
POST /v1/four/reading-negate | $0.001 | Swap told-for and told-against; unknown and contested stay fixed |
POST /v1/four/reading-conflate | $0.001 | Exchange unknown and contested, fixing held and denied |
POST /v1/four/reading-convert | $0.001 | Rename a point between naming families without changing it |
POST /v1/four/reading-census | $0.002 | Count up to 14,627 named points |
A ninth, related endpoint in the Group's SEN family, GET /v1/sen/conflate-reading/{name} ($0.002), conflates one reading given by its name.
Each returns a bare value or a small object. A call to the knowledge join, from the catalog's own example:
curl -s -X POST https://market.561.group/v1/four/reading-knowledge-join \
-H 'content-type: application/json' \
-d '{"left":"held","right":"denied"}'Unpaid, that returns 402 Payment Required with a payment-required header for 1,000 atomic units (0.001 USDC). Paid, the documented result is "contested": one source held it and another denied it, so the combined information is that the matter is contested. The catalog is explicit about what the operation does not do: it creates no witnesses and asserts no truth; it acts on abstract points, not on the testimony behind them.
What do the operations compute?
For the four points ordered unknown, held, denied, contested, the two joins are:
| Knowledge join | unknown | held | denied | contested |
|---|---|---|---|---|
| unknown | unknown | held | denied | contested |
| held | held | held | contested | contested |
| denied | denied | contested | denied | contested |
| contested | contested | contested | contested | contested |
| Truth join | unknown | held | denied | contested |
|---|---|---|---|---|
| unknown | unknown | held | unknown | held |
| held | held | held | held | held |
| denied | unknown | held | denied | contested |
| contested | held | held | contested | contested |
These tables follow from the definitions above (the knowledge join takes "told for" and "told against" each by OR; the truth join takes "told for" by OR and "told against" by AND), and they agree with the catalog's examples: held joined with denied is contested in knowledge order and held in truth order, "distinct from knowledge join".
Two refusals are worth noting because they are the market's house style. Both inputs must come from the same naming family; mixing held and told false is refused, and you rename explicitly with the conversion offer. And an unrecognized name is refused before payment: sending {"left":"held","right":"purple"} returns 400 with an application/problem+json body whose issue is that /right "must be equal to one of the allowed values", and no payment terms are issued. We confirmed that behavior against the live service on 2026-10-21.
Why sell four-valued logic over HTTP 402?
There are three honest answers.
Because it is a clean unit of sale. A pure function of two small inputs, with a documented contract, an exact answer and no side effects, is the easiest thing to price per call. It is the opposite of a subscription product, and it demonstrates the whole x402 loop (unpaid request, 402, signature, retry, receipt) in a request small enough to test a client with.
Because an agent that merges evidence needs the operations. An agent comparing reports from several sources can represent "source A says yes, source B says no" as contested and carry that forward without crashing or silently picking a side. The census operation counts how many points an agent holds in each state; the conflation operation exchanges ignorance and contradiction, a symmetry of the four points that the logic's literature studies.
Because it is a research instrument with a customer-facing edge. Four-valued logic is the foundation the Group's research builds on, and the paper and notes are at science.561.group. Offering the operations as services gives that research a public, independently testable interface. An independent implementation of the same operation, called through a paid and receipted interface, is something a verifier can compare against.
We will say the other honest thing as well. You can implement these eight operations locally in a few lines, for free. We do not claim anyone must buy them, and we have no evidence of independent buyers for these offers; the market's own notes treat demand as unknown, not zero. What the endpoints offer is a pinned definition (the same naming families and edge-case behavior every time), a deterministic result and a receipt, at a price low enough that the receipt costs less than the cost of thinking about whether to pay for it. That is exactly the situation the idea of x402 was designed for, and the sort of purchase a human would never bother to make.
What does a 402 have to do with four-valued logic?
The market's own explainer makes a neat observation. In Belnap's reading, an HTTP 402 is told both: it answers (the request was understood, and the price is stated) and it refuses (the content is withheld until payment). Status codes in the 400s are usually pure refusals; 402 is the one that is also an offer. If you wanted a single status code to explain why paraconsistent logic can be useful, 402 Payment Required is a decent candidate.
How do I try it?
- Read the contract:
GET https://market.561.group/v1/catalogand find the/v1/four/entries; each listsbodySchema, an example and the output schema. - Make the unpaid request above and decode the
payment-requiredheader, following the software-agent quickstart. - Test your client's refusal path for free with an invalid name.
- Buy the cheapest call, $0.001, when you are ready.
For the rest of the catalog, see The 130-offer x402 market, explained.