API
POST /api/verify
Verifies that a set A ⊆ ℤ/Nℤ contains no nontrivial solutions to a + 3b ≡ 2c + 2d (mod N). Elements are reduced mod N; duplicates after reduction are rejected. Limits: N ≤ 50,000 and |A| ≤ 10,000.
Verification is open to everyone, but recording requires authentication:
send a bearer token (create one on your profile page) and a
record-setting witness is saved and attributed to your account. Without a token the verdict
is still returned, but nothing is saved — the record field then reports
{"recorded": false, "reason": "authentication required...", "wouldRecord": ...}.
curl -X POST https://ruzsa-genus-one.icarm.cloud/api/verify \
-H 'content-type: application/json' \
-H 'authorization: Bearer ruzsa_...' \
-d '{ "N": 49, "A": [0, 7, 13, 29, 41] }'
Returns 200 with the verdict, or 400 if the body isn’t JSON of
the form {"N": <integer>, "A": [<integers>]} or violates the limits.
A valid witness that is larger than every previously recorded witness for its modulus
is saved, and record.recorded is true; otherwise
record.recordSize reports the standing record.
{
"ok": true,
"N": 49,
"size": 5,
"ratio": 0.7142857142857143, // |A| / sqrt(N), the score
"valid": true,
"record": { "recorded": true, "recordSize": 5 }
}
An invalid set instead gets valid: false and one concrete nontrivial solution
(no record field):
{
"ok": true,
"valid": false,
"counterexample": { "a": 3, "b": 1, "c": 1, "d": 2 }, // a + 3b ≡ 2c + 2d (mod N)
...
}