AFTD Auto-Formalizing Theoretical Domains

word_block_exchange_transport_back

def

Given a block exchange E = (X, A, B, Y) and a binary mask N of type List Bool, word_block_exchange_transport_back E N is the binary mask defined by N.take E.X.length ++ (N.drop (E.X.length + E.B.length)).take E.A.length ++ (N.drop E.X.length).take E.B.length ++ N.drop (E.X.length + E.B.length + E.A.length).

Statement

def word_block_exchange_transport_back {α : Type*} (E : WordBlockExchange α) (N : List Bool) : List Bool
Defined in
arXiv:2610.39941, Section 4
Verified
31 Oct 2026
Axioms
none listed
Built on 1
  • WordBlockExchangeA word block exchange consists of four words X, A, B, Y over an alphabet.
Used by 1

Read back from the Lean

Given a type α, a word block exchange E : WordBlockExchange α (having list components X, A, B, and Y), and a list of booleans N, word_block_exchange_transport_back E N is the list of booleans obtained by concatenating: 1. the first E.X.length elements of N, 2. the segment of E.A.length elements of N starting at index E.X.length + E.B.length, 3. the segment of E.B.length elements of N starting at index E.X.length, and 4. the suffix of N starting at index E.X.length + E.B.length + E.A.length.

Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.

Lean source view module on GitHub

/-- Transport a mask N of XBAY back to XABY. -/
def word_block_exchange_transport_back {α : Type*} (E : WordBlockExchange α) (N : List Bool) : List Bool :=
  N.take E.X.length ++
  (N.drop (E.X.length + E.B.length)).take E.A.length ++
  (N.drop E.X.length).take E.B.length ++
  N.drop (E.X.length + E.B.length + E.A.length)
See it in the graphDiscuss this resultChallenge it