convex_set_membership

std.geometry.convex_set_membership · Level L1

Membership of points (the rows of X) in two convex sets: the closed box lo ≤ x ≤ hi, and the closed half-space w·x ≤ β, each as 1 or 0 per point. Both sets are convex for every choice of their data, which is the algebraic certificate; sampling convex combinations would not prove convexity, but one combination of members that falls outside refutes a set's convexity.

lo ≤ x ≤ hi; w·x ≤ β

Signature

convex_set_membership(X: f64[m, n], lo: f64[n], hi: f64[n], w: f64[n], beta: f64[]) → f64[m], f64[m]

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.

lof64[n]Xf64[m, n]hif64[n]wf64[n]betaf64[]ReshapelrReshapehrmatvecaxLessbelowGreaterabove1.0GreateroverMaximumoutSubtractin_halfspaceReduceMaxany_outSubtractin_boxin_boxf64[m]in_halfspacef64[m]
  • input
  • operation
  • constant
  • call
  • output

Verification

  • Signature proven by NOVA’s shape solver, for every size.
  • Equal to the reference coordinatewise bounds, and the dot product against β in exact rational arithmetic, on all 40 test cases.
  • All 320 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:d96704ee29c527df36330733f5d713d64576b8e8047b61d124bfde43421099f0

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

Control handle

Symbol
Ω:std.geometry.convex_set_membership · Ω:convex_set_membership
Pins
sha256:7fedaea741e621578c3c65d95b87950326277fcd22075c3852cd86479273a4f5this graph and the 1 it reaches through calls
Evidence
sha256:0af5fa7baebae4b8f981af6ae70400c76213c339218c572ab63853e655966ed0the 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.