Download research/chapters/implementation.tex from PureOne/Aethra-Veylith-Sharp-Recovery-Law: direct link, hf CLI and curl.
- Browser
- Download file 10.8 kB
-
https://huggingface.co/datasets/PureOne/Aethra-Veylith-Sharp-Recovery-Law/resolve/main/research/chapters/implementation.tex
- Command line
-
hf download hf://datasets/PureOne/Aethra-Veylith-Sharp-Recovery-Law/research/chapters/implementation.tex
-
curl -L -o implementation.tex https://huggingface.co/datasets/PureOne/Aethra-Veylith-Sharp-Recovery-Law/resolve/main/research/chapters/implementation.tex
10.8 kB
| \section{Constructive failure certificates and executable recovery} | |
| \label{sec:implementation} | |
| The reference package implements both principal architectures using exact | |
| finite-field arithmetic. It includes the encoder, recovery planner, decoder, | |
| certificate checks, and separate audit programs. The default runtime needs | |
| Python 3.10 or later and the standard library. Plot regeneration additionally | |
| uses NumPy and Matplotlib. The manuscript source uses XeLaTeX; the text fonts | |
| and their license are included. | |
| \subsection{Every rejected moment certificate has a concrete obstruction} | |
| The moment criterion supplies a source collision as well as a yes-or-no | |
| answer. This makes the necessity direction operational. | |
| If $\sigma=0$, set every source symbol to one and erase the entire data | |
| layer. Every surviving parity value is $\sigma=0$, exactly as for the zero | |
| source. The two sources are different and their surviving observations agree. | |
| Suppose $\sigma\ne0$ but $Q(a)=0$ for a nonzero binary normal $a$. | |
| Put $b=Ra$. If $a\ne b$, choose any offset pair, for example | |
| $\beta=\tau=0$, and form the two-by-two augmented recovery table from | |
| Section~\ref{sec:twisted-certificate}. Its determinant vanishes, so choose | |
| a nonzero vector in its kernel over $\mathbb K$. Assign its two coordinates | |
| as constant source values on the two missing-source cosets of | |
| $\ker a\cap\ker b$, and assign zero outside the erased data half. | |
| Convolution acts on these constant functions by augmentation, so every | |
| surviving parity difference is zero. The surviving systematic difference is | |
| also zero. | |
| If $a=b$, at least one of the two kernel half-sums is zero. Choose $\beta$ | |
| so that this half-kernel is the recovery operator, and put one at every | |
| missing data site and zero elsewhere. This again gives a nonzero invisible | |
| source difference. The implementation returns the bad hyperplane and the | |
| entire difference vector through \texttt{TwistedCodec.obstruction()}. | |
| The witnesses use the original coding field. No passage to an extension or | |
| probabilistic choice is required. | |
| \subsection{Interfaces and physical coordinates} | |
| \texttt{twisted\_codec.py} represents $u\in\mathbb F_2^d$ by its $d$-bit | |
| integer label. A physical address is the pair $(u,c)$, with $c=1$ for data | |
| and $c=0$ for parity. A hyperplane is specified by the triple | |
| $(a,\beta,\tau)$, where the binary dot product is the parity of the set bits | |
| in $a\mathbin{\&}u$. | |
| The primary methods have the following roles: | |
| \begin{itemize} | |
| \item \texttt{TwistedCodec.optimal(d, field)} constructs the explicit | |
| alphabet-optimal family. Its general update count is $\lceil3d/2\rceil$; | |
| the method name does not assert minimum support. | |
| \item \texttt{minimum\_support\_example(d)} supplies the exact finite | |
| examples for $2\le d\le6$ that attain both bounds. | |
| \item \texttt{certificate()} evaluates the moment criterion; | |
| \texttt{obstruction()} supplies a collision when it fails. | |
| \item \texttt{encode(source)} produces all systematic and parity values. | |
| \texttt{decode(observed, plane)} applies the sparse inverse. Omitting the | |
| plane asks the implementation to infer one from the erased addresses. | |
| \end{itemize} | |
| \texttt{matrix\_codec.py} implements arbitrary constant rectangular ray | |
| maps. It uses the small ordinary quotient matrix and the finite iteration | |
| of Section~\ref{sec:general-decoder}. It also exposes a direct rectangular | |
| Gaussian solve as a reference check. The polynomial constructor expands | |
| each scalar weight into its rectangular convolution matrix, so the finite | |
| packet decoder also handles certified weights whose leading coefficient | |
| matrix is singular. | |
| Input validation checks addresses, field labels, packet lengths, and the | |
| declared containing hyperplane. After reconstruction, the default decoder | |
| re-encodes the source and compares every supplied observation. This check | |
| detects inconsistent observations when sufficient redundant information | |
| remains. It is not a general error-correction or authentication guarantee: | |
| at an information-tight cut, changed observations can represent a different | |
| valid source. | |
| \subsection{A complete byte-field example} | |
| Set $d=16$ and use the field | |
| \[ | |
| \mathbb K=\mathbb F_2[X]/(X^8+X^4+X^3+X^2+1). | |
| \] | |
| Its polynomial-basis labels are ordinary bytes. The even-dimensional | |
| construction uses eight independent weights summing to one; in this | |
| representation they are | |
| \[ | |
| (255,2,4,8,16,32,64,128). | |
| \] | |
| Each weight is placed at the three nonzero points of its coordinate pair. | |
| The normal relabeling has eight blocks | |
| $R(x_i,y_i)=(y_i,x_i+y_i)$, and $T=R^{-\mathsf T}$. | |
| The kernel has exactly 24 nonzero coefficients and augmentation one. | |
| \begin{center} | |
| \begin{tabular}{lr} | |
| \toprule | |
| Quantity & Exact value\\ | |
| \midrule | |
| Physical sites & 131,072\\ | |
| Data sites / bytes & 65,536\\ | |
| Parity sites / bytes & 65,536\\ | |
| Payload width at every site & 8 bits\\ | |
| Parity updates per changed source byte & 24\\ | |
| Sites in every affine hyperplane & 65,536\\ | |
| Possible affine hyperplanes & 262,142\\ | |
| Moment normals checked for this implementation & 65,535\\ | |
| \bottomrule | |
| \end{tabular} | |
| \end{center} | |
| The deterministic test generates 65,021 bytes with seed 506112026, then | |
| adds 515 zero bytes to fill the data layer. It stores 65,536 parity bytes. | |
| The complete encoded array therefore occupies 131,072 bytes, excluding | |
| addresses and code parameters. The source hash is | |
| \begin{center}\small\ttfamily | |
| 6107664657227d3b46e9842bdb2a7c657092291a44bbb6a2ab8f490dda289a54 | |
| \end{center} | |
| Two independent erasures were applied to that same encoded array: | |
| \begin{center} | |
| \begin{tabular}{lrrr} | |
| \toprule | |
| Erasure & Missing data & Missing parity & Inverse layers\\ | |
| \midrule | |
| Entire data layer & 65,536 & 0 & 1\\ | |
| Oblique cut $(a,\beta,\tau)=(47453,1,0)$ & 32,768 & 32,768 & 3\\ | |
| \bottomrule | |
| \end{tabular} | |
| \end{center} | |
| Both recoveries reproduced all source bytes and the displayed SHA-256 | |
| exactly. The general theorem covers every hyperplane; this payload test | |
| executes the two stated cuts, while the moment test evaluates every normal | |
| for the large instance. No claim of exhaustive large-payload testing of all | |
| 262,142 cuts is made. | |
| For this instance, the algebraic inverse on an oblique cut has | |
| $|W|=16,384$. The direct bounds from | |
| Section~\ref{sec:twisted-decoder} give at most 1,212,416 field multiplications | |
| after residual formation and at most 1,605,632 including residual formation, | |
| apart from scalar setup. These counts describe an implementation that | |
| accumulates the sparse products as specified. The reference program also | |
| performs validation and re-encoding, and uses Python dictionaries. Its | |
| recorded wall times are diagnostics, not a throughput comparison. | |
| \subsection{The structured-erasure boundary is explicit} | |
| Although every 65,536-site hyperplane is correctable, some much smaller | |
| unstructured erasures are not. Change one source byte by a nonzero value. | |
| Only that source site and its 24 parity neighbors change. Erasing those | |
| 25 sites makes the changed source indistinguishable from the original. | |
| The package constructs this exact collision and verifies that its support | |
| is not contained in a hyperplane. | |
| This distinction is part of the mathematical result. The code targets a | |
| specified geometric family; it is not a maximum-distance-separable code for | |
| arbitrary half-array losses. Addresses, the field representation, the kernel, | |
| and the relabeling must remain available to the decoder. Unknown errors, | |
| arbitrary permutations of addresses, several unrelated erasure regions, and | |
| loss of encoding metadata are separate failure models. | |
| \section{Verification and reproducibility} | |
| \label{sec:verification} | |
| The independent moment audit has its own field multiplication, rank routine, | |
| and physical matrix construction. It imports neither the proposed codec nor | |
| its moment implementation. It checks the all-data slab and every oblique | |
| cut for each tested encoder. In dimension two it enumerates every kernel and | |
| every invertible binary relabeling over both $\mathbb F_2$ and $\mathbb F_4$; | |
| larger tests use fixed-seed arbitrary kernels and transforms. | |
| \begin{longtable}{@{}>{\raggedright\arraybackslash}p{0.78\linewidth}r@{}} | |
| \toprule | |
| Check & Exact count\\ | |
| \midrule\endhead | |
| Independent arbitrary encoders & 2,304\\ | |
| Independent oblique physical recovery matrices & 45,568\\ | |
| Independent full-data slab matrices & 2,304\\ | |
| Discrepancies with the moment criterion & 0\\ | |
| Explicit-family decoder roundtrips, every cut for $d=1,\ldots,8$ & 2,024\\ | |
| Separate physical Gaussian solutions for small explicit cases & 486\\ | |
| Decoder roundtrips for 92 sampled certified arbitrary-kernel trials & 2,440\\ | |
| Roundtrips for the minimum-support examples, $d=2,\ldots,6$ & 486\\ | |
| Whole-hyperplane inference checks & 238\\ | |
| Partial-erasure recovery checks with inferred hyperplanes & 55\\ | |
| Additional larger-field construction roundtrips & 18\\ | |
| Nonzero $\mathbb F_4$ combinations of the noncommuting triple & 63\\ | |
| Physical hyperplane ranks for that binary four-bit code & 84\\ | |
| Complete source-coordinate basis checks for the packet decoder & 2,665\\ | |
| Packet decoder full-hyperplane roundtrips & 359\\ | |
| Packet decoder direct Gaussian comparisons & 36\\ | |
| Packet decoder partial-hyperplane roundtrips & 9\\ | |
| \bottomrule | |
| \end{longtable} | |
| The arbitrary-kernel decoder trials are deterministic sampling and may repeat | |
| a small encoder. The independent exhaustive moment audit is separately | |
| identified. Negative controls reject insufficient alphabet choices, | |
| affinely spanning erasure sets, and inconsistent redundant observations. | |
| Three explicit collision witnesses cover zero augmentation, coincident | |
| normals, and independent normals. Raw JSON records state each test's scope, | |
| parameters, seeds, and outcomes. | |
| To reproduce the main checks from the package root, run | |
| \begin{verbatim} | |
| python src/verify.py | |
| python src/audits/independent_twist_audit.py | |
| python src/audits/binary_escape_audit.py | |
| python src/verify_matrix.py | |
| \end{verbatim} | |
| The first program also performs the byte-field payload experiment. The audit | |
| programs write their own result records. The matrix audit checks the finite | |
| error operator on complete coordinate bases and compares packet recovery | |
| with direct physical linear systems; its detailed configuration counts are | |
| included in the result file. The separate arithmetic and direct-matrix routes | |
| help detect shared indexing or representation errors. | |
| For the document and figures, run | |
| \begin{verbatim} | |
| python src/make_figures.py | |
| xelatex -interaction=nonstopmode Aethra_Veylith_Sharp_Recovery_Law.tex | |
| xelatex -interaction=nonstopmode Aethra_Veylith_Sharp_Recovery_Law.tex | |
| \end{verbatim} | |
| The release includes the complete sources, generated figures, result records, | |
| font license, and a SHA-256 manifest. The small examples are exact finite | |
| certificates; the all-dimensional conclusions remain consequences of the | |
| proofs, with the computational checks serving as implementation validation. | |