def top

bend-collections-laws-crypto@1.0.0.0 · spec/crypto/aes/poly.bend:34

import bend-collections-laws-crypto@1.0.0.0/spec/crypto/aes/poly.bend as Poly
import Base

34# The coefficient of x^(n-1) of a residue.
35def top(n: Nat, w: Word(n)) -> Bool:
36  match n w:
37    case 0n WNil{}:
38      False{}
39    case 1n WCon{b, t}:
40      b
41    case 2n+p WCon{b, t}:
42      top(1n+p, t)

Uses (5)

Used by (7)