AFTD Auto-Formalizing Theoretical Domains

relu_encode_vec3

def

Encoding of a rational vector of length 3 as the concatenation of the encodings of its three entries.

Statement

def relu_encode_vec3 (v : Fin 3 → ℚ) : 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_ratEncoding of a rational in lowest terms as a Bool word: its numerator and denominator in binary.
Used by 5
  • 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.
  • relu_network3_encodeEncoding of a width-3 ReLU network as a Bool word, of length linear in the total bit length of its rational entries: input weights, input…
  • relu_encode_hidden_layer3Encoding of a width-3 ReLU hidden layer as a Bool word: its 3 by 3 weight matrix row by row, then its bias vector.

Lean source view module on GitHub

def relu_encode_vec3 (v : Fin 3 → ℚ) : List Bool :=
  relu_encode_rat (v 0) ++ relu_encode_rat (v 1) ++ relu_encode_rat (v 2)
See it in the graphDiscuss this resultChallenge it