inverse_permutation
std.seq.inverse_permutation · Level L3The inverse of a permutation: inv[perm[i]] = i. Each position is scattered to where it came from, then Cast back to integers.
inv[permᵢ] = i
Signature
inverse_permutation(perm: i64[n]) → i64[n]
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.
- input
- operation
- constant
- call
- output
Verification
- Signature proven by NOVA’s shape solver, for every size.
- Equal to the reference
np.argsort(perm)in exact rational arithmetic, on all 40 test cases. - All 178 int64 results are exact: the error is zero.
- Interpreter and NumPy backend return bit-identical results.
Accuracy in detail
- correctly rounded (the int64 nearest the exact value)
- 100%
- bit-equal to the NumPy formula in int64
- 100%
- largest error, in units in the last place
- 0
Identity
Calls
—
Called by
—
sha256:c754fdcea214e333b904f5b11a8183b000e38989146fbc4b9e6dc941fb5e1e61The semantic hash of the graph. It changes when the program changes, and never when only its documentation does.
Control handle
- Symbol
- Ω:std.seq.inverse_permutation · Ω:inverse_permutation
- Pins
sha256:5c45caf603188ad453754a87dcb92e8b47d43d0eaa1542b04e55de7191cd3a30this graph alone- Evidence
sha256:bfe84fe36f858b639b5f229f7bbfb6181d0872cb7c320e8f87b317def4fade05the 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.