relu_encode_int
def
Encoding of an integer as a Bool word: a sign bit followed by the binary encoding of its absolute value.
Statement
def relu_encode_int (z : ℤ) : List Bool- Source
- Helper encoding serving OP-75 (arXiv:2610.06092, Remark 5.15). Section 2.1 of the paper writes rational entries as pairs of integers in binary; the bit-level layout is a choice made here.
- Verified
- 09 Nov 2026
- Axioms
- none listed
- Built on 1
- relu_encode_natBinary encoding of a natural number as a self-delimiting Bool word: each base-2 digit, least significant first, is preceded by a true…
- Used by 6
- op75_final_encoding_templateThe final target layer encoding is a fixed prefix followed by the negative and positive target coefficient encodings.
- op75_block_encoding_templateThe seven-layer block encoding is a fixed prefix, the positive coefficient encoding, a fixed middle, the negative coefficient encoding,…
- relu_network3_encode_injectiveSanity check of the encoding: distinct width-3 ReLU networks have distinct Bool encodings.
- op75_negative_rat_bit_encodingThe encoding of the negative of a nonnegative integer has sign bit set exactly when that integer is nonzero, followed by its canonical…
- relu_encode_ratEncoding of a rational in lowest terms as a Bool word: its numerator and denominator in binary.
- op75_positive_rat_bit_encodingThe encoding of a nonnegative integer as a rational is its nonnegative sign bit, canonical natural encoding, and denominator-one encoding.
Lean source view module on GitHub
def relu_encode_int (z : ℤ) : List Bool := decide (z < 0) :: relu_encode_nat z.natAbs