is_reduction

std.sets.is_reduction · Level L3

Whether a total map f from a finite input set of problem A to one of problem B is a many-one reduction A ≤ₘ B, as 1 or 0: x ∈ A exactly when f(x) ∈ B, both directions checked for every x (yes-instances alone are not enough); and the first x where it fails. If A ≤ₘ B and B is decidable, computing f and then B's decider decides A; the converse does not hold. A finite table proves the reduction on that finite domain only.

x ∈ A ⇔ f(x) ∈ B ∀x

Signature

is_reduction(A: f64[n], B: f64[k], f: i64[n]) → f64[], f64[]

Structure

The function as NOVA stores it: one box per input, operation and output, and arrows that carry values. A double border marks another library function this one runs — called once, or by Scan once per element; select it to open that function.

Af64[n]Bf64[k]fi64[n]GatherBfEqualagree1.0ReduceMinreducesSubtractmissArgMaxcounterexamplereducesf64[]counterexamplef64[]
  • input
  • operation
  • constant
  • call
  • output

Verification

  • Signature proven by NOVA’s shape solver, for every size.
  • Equal to the reference A[x] against B[f(x)] for every x in exact rational arithmetic, on all 40 test cases.
  • All 80 float64 results are exact: the error is zero.
  • Interpreter and NumPy backend return bit-identical results.
  • At float32 too: the 40 test cases rounded to float32, and 40 of them exact, with zero error.
Accuracy in detail
correctly rounded (the float64 nearest the exact value)
100%
bit-equal to the NumPy formula in float64
100%
largest error, in units in the last place
0

Identity

Calls
—
Called by
—
sha256:2a68118223dd32ca73a4e51ce744e5744cb644197a9590cc94638e568627f4c5

The semantic hash of the graph. It changes when the program changes, and never when only its documentation does.

Control handle

Symbol
Ω:std.sets.is_reduction · Ω:is_reduction
Pins
sha256:bbb29f35659207ec1aad609cbcfae27807866d05afdecb1030d23c5056a61a29this graph alone
Evidence
sha256:78bdcf021c39988295f9b69c31985821c3c8cef04f0b253755d900d0a1e6858bthe hash of its verification record
Needs
no capability: a pure function

Through NOVA’s control layer, the symbol launches this function only while the program still matches what it pins: a change to this graph, or to any graph it reaches, needs a migration first.

ΣEML 2026

Efficient New Language — a high-density semantic overlay for humans and AI agents.

This site’s demos run on the real EML toolchain, in your browser.

© 2026 EveMissLab (一言諾科技有限公司) / Neo.K. All rights reserved.