phanerozoic commited on
Commit
fccf6d2
·
1 Parent(s): a9a489a

Prove Lemma 3.3 in Rocq, shorten the abstract, and set the paper in the format of the Stellarocq paper

Browse files
README.md CHANGED
@@ -600,7 +600,8 @@ proves for every window of 2^α cells, number of banks, bank and tape. `rocq/`
600
  also proves that the host family computes SUBLEQ at every word width, with its
601
  depth and its numbers of units and edges, the same for the family of depth 11 that
602
  folds the address decoders into the reads, that the levelization of every clocked
603
- netlist computes its step, that a read and the branch need two ternary levels, that
 
604
  the recipes and their encoder have the stated lengths, that the 21- and
605
  27-instruction programs do what the paper states at every word width from 8 on, and
606
  that the H_8 it defines is the netlist of the published serialization.
 
600
  also proves that the host family computes SUBLEQ at every word width, with its
601
  depth and its numbers of units and edges, the same for the family of depth 11 that
602
  folds the address decoders into the reads, that the levelization of every clocked
603
+ netlist computes its step, that two ternary units compute the branch and a read and
604
+ the branch need two ternary levels, that
605
  the recipes and their encoder have the stated lengths, that the 21- and
606
  27-instruction programs do what the paper states at every word width from 8 on, and
607
  that the H_8 it defines is the netlist of the published serialization.
paper/runs/paper_rocq.json CHANGED
@@ -1,7 +1,7 @@
1
  {
2
  "rocq": "The Rocq Prover, version 9.1.1",
3
  "files": 66,
4
- "build_seconds": 102.9,
5
  "theorems": {
6
  "PhysSem.netlist_step": "closed",
7
  "PhysMain.network_orbit": "closed",
@@ -94,6 +94,7 @@
94
  "Lower.read_needs_two_levels": "reals",
95
  "Lower.onehot_needs_two_levels": "reals",
96
  "Lower.branch_not_ternary": "closed",
 
97
  "Margin.margin": "reals",
98
  "Margin.margin_tight": "reals",
99
  "Margin.mismatch_all": "reals",
@@ -144,7 +145,7 @@
144
  "AmpHost.amp_selfrep": "closed"
145
  },
146
  "extraction_identical": true,
147
- "lines": 24178,
148
  "host_extraction": {
149
  "members": [
150
  {
 
1
  {
2
  "rocq": "The Rocq Prover, version 9.1.1",
3
  "files": 66,
4
+ "build_seconds": 101.6,
5
  "theorems": {
6
  "PhysSem.netlist_step": "closed",
7
  "PhysMain.network_orbit": "closed",
 
94
  "Lower.read_needs_two_levels": "reals",
95
  "Lower.onehot_needs_two_levels": "reals",
96
  "Lower.branch_not_ternary": "closed",
97
+ "Lower.branch_unit": "closed",
98
  "Margin.margin": "reals",
99
  "Margin.margin_tight": "reals",
100
  "Margin.mismatch_all": "reals",
 
145
  "AmpHost.amp_selfrep": "closed"
146
  },
147
  "extraction_identical": true,
148
+ "lines": 24230,
149
  "host_extraction": {
150
  "members": [
151
  {
paper/universal_construction_ternary.pdf CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:305f38033584a59bc3532f2d7e92bf7fa8d96afbf75a9eebebaf387766b41b01
3
- size 369468
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dc252d176a48dce307c85088813dd89a501c9ef564d9a50d8929e4643cc16cb6
3
+ size 350822
paper/universal_construction_ternary.tex CHANGED
@@ -1,19 +1,26 @@
1
  % !TEX program = pdflatex
2
- \documentclass[11pt]{amsart}
3
-
4
- \usepackage[utf8]{inputenc}
5
- \IfFileExists{lmodern.sty}{\usepackage[T1]{fontenc}\usepackage{lmodern}}{}
 
 
 
 
 
 
6
  \usepackage{amsmath,amssymb,amsthm,mathtools}
7
- \usepackage{booktabs,tabularx,array}
8
- \usepackage{cite}
9
  \usepackage{enumitem}
10
  \usepackage{tikz}
11
  \usetikzlibrary{arrows.meta,calc}
12
  \usepackage{pgfplots}
13
  \pgfplotsset{compat=1.18}
14
- \usepackage[margin=1in]{geometry}
15
- \setlength{\emergencystretch}{2em}
16
- \usepackage[colorlinks=true,linkcolor=blue,citecolor=blue,urlcolor=blue]{hyperref}
 
 
17
 
18
  % ---- theorem environments ---------------------------------------------------
19
  \newtheorem{theorem}{Theorem}[section]
@@ -50,57 +57,32 @@
50
  \DeclareMathOperator{\popcount}{popcount}
51
 
52
  % ---- front matter -----------------------------------------------------------
53
- \title[Universal construction and self-reproduction in ternary threshold networks]
54
- {Universal Construction and Exact Self-Reproduction\\ in Ternary McCulloch--Pitts Networks}
55
-
56
  \author{Charles Norton}
57
- \date{\today}
58
-
59
- \subjclass[2020]{Primary 68Q06; Secondary 68T07, 92B20, 94C11}
60
- \keywords{McCulloch--Pitts networks, threshold circuits, ternary weights,
61
- self-reproducing automata, universal constructor, noise margin}
62
 
63
  \begin{document}
 
64
 
65
  \begin{abstract}
66
- We study recurrent networks of McCulloch--Pitts threshold units with weights in
67
- $\{-1,0,1\}$ and integer thresholds, iterated as a fixed composition of ternary
68
- matrix--vector products and Heaviside steps, and construct networks of this kind
69
- that carry out von Neumann's universal construction and self-reproduction exactly.
70
- A SUBLEQ computer of $17{,}598$ units belongs to a family whose step has depth $13$
71
- and is proved in Rocq to be the step of SUBLEQ at every word width. It runs a
72
- program of $21$ instructions that emits any byte string from a run-length
73
- description, and one of $27$ instructions that decodes a description and then
74
- copies it; both are proved in Rocq for every word width from $8$ on. With the
75
- second, the computer emits the serialization of its own weights, memory and tape.
76
- A second network, fixed once and for all, interprets stored networks: its state
77
- holds a ring of $K$ banks of records and $K$ tapes, each step evaluates one record,
78
- and its netlist is proved in Rocq to compute this machine for every number and size
79
- of banks and tapes. Stored in the ring as $36{,}080$ records of two inputs, the
80
- SUBLEQ computer decodes a description of its own records into the next bank, copies
81
- the description onto the next tape and hands control to the copy. The fixed network
82
- thus rebuilds the stored computer, weights included, in every generation. For every
83
- word width from $8$ on and every ring it is proved in Rocq that the stored computer
84
- builds every
85
- image that fits a bank from a description of it, and that, started on its own, it
86
- reproduces: the copies accumulate until every bank holds one, and from then on the
87
- whole state repeats every $K$ generations. A constructor of $143$ records with a
88
- description code of its own does the same, also proved in Rocq.
89
- Every pre-activation is an integer, so every orbit survives perturbations below
90
- $1/2$ of each pre-activation. Under independent Gaussian noise on the
91
- pre-activations, a bound computed from the orbit lies within the $95\%$ interval of
92
- the measured failure rate at every noise level at which failures were observed.
93
- Replicating every unit $r$ times multiplies every margin by $r$: under noise on the
94
- pre-activations, which does not grow with fan-in, every noise level is survived
95
- with $r=O(s\sqrt{\log(TM/\delta)})$. Under von Neumann's independent output flips a
96
- threshold appears: the same redundancy is reliable for flip probabilities below
97
- $1/(2ek)$, $k$ the largest fan-in, and above $1/(2k)$ a disjunction of fan-in $k$
98
- fails with a probability that tends to one as $r$ grows. The margin, the noise bounds
99
- and the threshold are proved in Rocq.
100
  \end{abstract}
101
 
102
- \maketitle
103
-
104
  % =============================================================================
105
  \section{Introduction}\label{sec:intro}
106
  % =============================================================================
@@ -214,13 +196,13 @@ of the threefold host where the first-order bound exceeds one
214
  \begin{table}[ht]
215
  \centering\small
216
  \begin{tabularx}{\textwidth}{@{}>{\raggedright\arraybackslash}p{0.36\textwidth}>{\raggedright\arraybackslash}p{0.2\textwidth}>{\raggedright\arraybackslash}X@{}}
217
- \toprule
218
  Claim & Where & Evidence\\
219
- \midrule
220
  Levelization; the sizes of $\Lev(\Nhost)$ & Lem.~\ref{lem:lev}, Rem.~\ref{rem:levsizes} & Rocq\\
221
  The step of $H_A$ is the step of $\mathrm{SUBLEQ}_A$, every $A\ge3$ & Prop.~\ref{prop:host} & Rocq; the netlists extracted for $A=8,9,10$ equal the generator's\\
222
  Depth $13$, units, edges, weights and biases of $H_A$, every $A\ge3$ & Prop.~\ref{prop:host} & Rocq; rebuilt independently for $A=3$ to $12$\\
223
- A read and the branch need two ternary levels & Lem.~\ref{lem:muxdepth}, Rem.~\ref{rem:ternarydepth} & Rocq; exhaustive search on eight inputs\\
224
  The folded host: its step, depth $11$, units and edges, every $A\ge3$ & Rem.~\ref{rem:fold} & Rocq; random states for $A=3$ to $12$\\
225
  Length and optimality of the recipes and of $\describe$ & Lems.~\ref{lem:complete}, \ref{lem:describe}, Prop.~\ref{prop:optimal} & Rocq; checked on $971$ MB and on $68{,}061$ boundary strings\\
226
  $P$ builds every string, in the stated steps, every $A\ge8$ & Thm.~\ref{thm:univ} & Rocq; $29$ recipes run on the reference and four on the netlist\\
@@ -235,7 +217,7 @@ A pass of the stored host, every $A\ge8$ & Prop.~\ref{prop:storedpass} & Rocq, b
235
  Construction and reproduction by the stored host: copies, period, network, counts, every $A\ge8$ & Thms.~\ref{thm:storedconstruct}--\ref{thm:widths} & Rocq; the extracted image equal to the generator's for $A=8,9$; six generations of $\mathcal S_8$ run\\
236
  The stored host under noise & Cor.~\ref{cor:storednoise} & Rocq\\
237
  The organism: code, pass, construction, copies, period, network & Lem.~\ref{lem:code}, Prop.~\ref{prop:pass}, Thms.~\ref{thm:construct}, \ref{thm:organism} & Rocq; six generations run, one on the netlist\\
238
- \bottomrule
239
  \end{tabularx}
240
  \caption{The claims of the paper and the evidence for each: the proof checked in Rocq,
241
  and the computations and runs recorded in the artifact.}
@@ -388,9 +370,9 @@ point; $F$ treats the device cells as ordinary memory.
388
  \begin{table}[ht]
389
  \centering\small
390
  \begin{tabular}{@{}llll@{}}
391
- \toprule
392
  Address & Symbol & Role & Effect \\
393
- \midrule
394
  \cell{0xF9} & $c_{\mathrm{wr}}$ & write request & value $1$ emits $R_{\mathrm{out}}$ and clears it\\
395
  \cell{0xFA} & $c_{\mathrm{eot}}$ & end-of-tape status& set by a read at $h=|\tau|$, cleared by a read at $h<|\tau|$\\
396
  \cell{0xFB} & $c_{\mathrm{rw}}$ & rewind request & value $1$ sets $h=0$\\
@@ -398,7 +380,7 @@ Address & Symbol & Role & Effect \\
398
  \cell{0xFD} & $R_{\mathrm{in}}$ & input register & written by the device\\
399
  \cell{0xFE} & $R_{\mathrm{out}}$ & output register & written by the program, cleared on emit\\
400
  \cell{0xFF} & -- & halt & the machine halts when $p=255$\\
401
- \bottomrule
402
  \end{tabular}
403
  \caption{Memory-mapped device cells of the host transducer.}
404
  \label{tab:device}
@@ -555,7 +537,8 @@ the branch condition $[r\le 0]$ equals $\Hv(r_7+z(r)-1)$.
555
 
556
  \begin{proof}
557
  $-\sum_i r_i\ge 0$ holds exactly when every $r_i=0$. The value $r$ is at most $0$
558
- exactly when $r=0$ or $r_7=1$, so $[r\le 0]=\mathrm{OR}(r_7,z(r))$.
 
559
  \end{proof}
560
 
561
  \begin{remark}[Ternary weights cost one level at the branch]\label{rem:ternarydepth}
@@ -645,9 +628,9 @@ The host is $\Nhost=H_8$.
645
  \begin{table}[ht]
646
  \centering\small
647
  \begin{tabular}{@{}lrcl@{}}
648
- \toprule
649
  Block & Units & Layer & Computes\\
650
- \midrule
651
  $P_j$ & $2^A$ & 1 & decode lines of $p$\\
652
  $HP_i$ & $A$ & 1 & $h\wedge p_i$\\
653
  $FA_{o,t,j}$ & $3A2^A$ & 2 & $\mu_{j+o,t}\wedge P_j$\\
@@ -665,7 +648,7 @@ $\mathrm{LEQ}$ & $1$ & 11 & $[r\le0]$\\
665
  $TA_i$, $TB_i$, $NP_i$ & $3A$ & 12--13 & next counter\\
666
  $HA$, $HB$, $NH$ & $3$ & 12--13 & next halt bit\\
667
  $WR_{j,t}$, $NM_{j,t}$ & $2A2^A$ & 12--13 & next memory (9--10 for $t=0$)\\
668
- \bottomrule
669
  \end{tabular}
670
  \caption{The blocks of $H_A$ in the order of the netlist. The layer is the depth
671
  of the block's units.}
@@ -942,9 +925,9 @@ elsewhere, and let
942
 
943
  \begin{table}[t]\centering\small
944
  \begin{tabular}{@{}rlllll@{}}
945
- \toprule
946
  $k$ & addr & $A$ & $B$ & $C$ & effect\\
947
- \midrule
948
  0 & \cell{0x00} & \cell{T2} & \cell{T2} & \cell{0x03} & $M[\cell{T2}]\leftarrow 0$\\
949
  1 & \cell{0x03} & \cell{T1} & \cell{T1} & \cell{0x06} & $M[\cell{T1}]\leftarrow 0$\\
950
  2 & \cell{0x06} & \cell{NEG1} & $c_{\mathrm{rd}}$ & \cell{0x09} & read request\\
@@ -973,7 +956,7 @@ $k$ & addr & $A$ & $B$ & $C$ & effect\\
973
  24 & \cell{0x48} & \cell{Z} & $R_{\mathrm{out}}$ & \cell{0x4B} & $M[R_{\mathrm{out}}]\leftarrow b$\\
974
  25 & \cell{0x4B} & \cell{NEG1} & $c_{\mathrm{wr}}$ & \cell{0x4E} & write request\\
975
  26 & \cell{0x4E} & \cell{Z} & \cell{Z} & \cell{0x3F} & $M[\cell{Z}]\leftarrow0$; goto \textsc{b}\\
976
- \bottomrule
977
  \end{tabular}
978
  \caption{The constructor $P$ of Construction~\ref{con:P}, instructions $0$ to $20$ at
979
  \cell{0x00}--\cell{0x3E}, and the self-reproducing program $P^\ast$ of
@@ -1162,10 +1145,11 @@ Let the perturbations be independent centred Gaussians of standard deviation
1162
  $s$, let $(x_t)$ be the orbit of $F$ from $x_0$, and for $t\ge0$ and each row $i$
1163
  of each layer let $z_{t,i}$ be the pre-activation of row $i$ on the input
1164
  $x_t$ and $d_{t,i}=|z_{t,i}+\tfrac12|$. Put
1165
- \[
1166
  b'(t)=1-\prod_i\Bigl(1-Q\bigl(d_{t,i}/s\bigr)\Bigr),\qquad
1167
- b(t)=\sum_i Q\bigl(d_{t,i}/s\bigr),\qquad Q(u)=\Pr(\mathcal N(0,1)>u)=\tfrac12\erfc(u/\sqrt2).
1168
- \]
 
1169
  Given that a perturbed trajectory from $x_0$ agrees with the orbit up to step $t$,
1170
  the probability that it differs from it at step $t+1$ is at most $b'(t)$, the
1171
  probability that some row of the step fails while it reads the values of the orbit;
@@ -2500,10 +2484,11 @@ the product form does not.
2500
 
2501
  \begin{table}[ht]
2502
  \centering\small
 
2503
  \begin{tabular}{@{}lrrllll@{}}
2504
- \toprule
2505
  $s$ & Deviated & Exposure & Measured rate, $95\%$ interval & $b'$ & $b$ & $Mp$\\
2506
- \midrule
2507
  $0.06$ & 0/256 & 768{,}000 & $0$, $[0,\,4.80\times10^{-6}]$ & $1.21\times10^{-12}$ & $1.21\times10^{-12}$ & $3.30\times10^{-12}$\\
2508
  $0.08$ & 7/256 & 1{,}008{,}916 & $6.94\times10^{-6}$, $[2.79,\,14.3]\times10^{-6}$ & $6.34\times10^{-6}$ & $6.34\times10^{-6}$ & $1.72\times10^{-5}$\\
2509
  $0.09$ & 202/256 & 496{,}131 & $4.07\times10^{-4}$, $[3.53,\,4.67]\times10^{-4}$ & $4.27\times10^{-4}$ & $4.27\times10^{-4}$ & $1.16\times10^{-3}$\\
@@ -2512,7 +2497,7 @@ $0.11$ & 256/256 & 3{,}325 & $7.70\times10^{-2}$, $[6.79,\,8.70]\times10^{-2}$ &
2512
  $0.12$ & 256/256 & 714 & $3.59\times10^{-1}$, $[3.16,\,4.05]\times10^{-1}$ & $3.77\times10^{-1}$ & $4.73\times10^{-1}$ & $1.30$\\
2513
  $0.15$ & 256/256 & 256 & $1.00$, $[0.88,\,1]$ & $1.00$ & $1.30\times10^{1}$ & $3.60\times10^{1}$\\
2514
  $0.20$ & 256/256 & 256 & $1.00$, $[0.88,\,1]$ & $1.00$ & $1.89\times10^{2}$ & $5.21\times10^{2}$\\
2515
- \bottomrule
2516
  \end{tabular}
2517
  \caption{The per-step probability that $\Lev(\Nhost)$ leaves the exact orbit under
2518
  read noise of standard deviation $s$. One noise-free copy and $256$ noisy copies
@@ -2563,9 +2548,9 @@ $20{,}000$ steps, against $5$ of the $64$ copies.
2563
  \begin{table}[ht]
2564
  \centering\small
2565
  \begin{tabular}{@{}lrrlll@{}}
2566
- \toprule
2567
  $s$ & Failed & Exposure & Measured rate, $95\%$ interval & Restoration bound & $rM\erfc(r/2\sqrt2s)$\\
2568
- \midrule
2569
  $0.10$ & --- & --- & --- & $8.62\times10^{-59}$ & $9.24\times10^{-46}$\\
2570
  $0.15$ & --- & --- & --- & $4.02\times10^{-25}$ & $1.92\times10^{-18}$\\
2571
  $0.20$ & --- & --- & --- & $3.59\times10^{-13}$ & $8.03\times10^{-9}$\\
@@ -2575,7 +2560,7 @@ $0.27$ & 5/64 & 1{,}237{,}505 & $4.04\times10^{-6}$, $[1.31,\,9.43]\times10^{-6}
2575
  $0.30$ & 63/64 & 295{,}163 & $2.13\times10^{-4}$, $[1.64,\,2.73]\times10^{-4}$ & $2.26\times10^{-4}$ & $7.22\times10^{-2}$\\
2576
  $0.33$ & 64/64 & 17{,}472 & $3.66\times10^{-3}$, $[2.82,\,4.68]\times10^{-3}$ & $4.34\times10^{-3}$ & $6.90\times10^{-1}$\\
2577
  $0.36$ & 64/64 & 2{,}188 & $2.93\times10^{-2}$, $[2.25,\,3.74]\times10^{-2}$ & $4.30\times10^{-2}$ & $3.89$\\
2578
- \bottomrule
2579
  \end{tabular}
2580
  \caption{The per-step probability that the state of $N_3$ read by majority leaves the orbit under read noise of standard deviation $s$: $64$ noisy copies stepped beside an exact one from the initial state of the self-describing instance for up to $20{,}000$ steps, each stopped at its first wrong majority-read state, with the exact $95\%$ interval for a Poisson count over the exposure, against the bound $b(t)$ of Proposition~\ref{prop:restore} along the same orbit, weighted by the steps each copy ran where copies ran and averaged over the $20{,}000$ steps elsewhere, and the first-order bound of Theorem~\ref{thm:amplify}(ii).}
2581
  \label{tab:bound3}
@@ -2612,7 +2597,7 @@ on the accelerator; it gives the sizes, depths and exact runs stated here, and n
2612
  runs within sampling error.
2613
 
2614
  The Rocq development, \texttt{rocq/} in the artifact, has $66$ files and
2615
- $24{,}178$ lines and builds with Rocq 9.1.1 in about two minutes on the machine
2616
  below, most of it in the kernel's evaluation of the $15{,}872$ abstract passes of
2617
  Proposition~\ref{prop:pass} and in the device records of the stored host. It proves
2618
  Lemma~\ref{lem:lev} for every clocked netlist. It defines the host family $H_A$
@@ -2621,7 +2606,7 @@ $A\ge3$, with its depth, its numbers of units, memory units and edges, its weigh
2621
  and biases and the sizes of $\Lev(H_A)$ (Proposition~\ref{prop:host},
2622
  Remark~\ref{rem:levsizes}), and does the same for the step, the depth and the
2623
  numbers of units and edges of the folded host (Remark~\ref{rem:fold}). It proves
2624
- Lemma~\ref{lem:muxdepth} and Remark~\ref{rem:ternarydepth}. It defines the recipes, $\describe$, the device of
2625
  Definition~\ref{def:transducer} and the programs $P$ and $P^\ast$ in $2^A$ words, and
2626
  proves Lemmas~\ref{lem:complete} and~\ref{lem:describe},
2627
  Proposition~\ref{prop:optimal}, Theorems~\ref{thm:univ} and~\ref{thm:selfrep} and
@@ -2747,362 +2732,306 @@ with $20$ hardware threads and $31$ GiB of memory and an NVIDIA GeForce RTX 3070
2747
  Ti Laptop GPU with $8$ GiB of memory.
2748
 
2749
  % =============================================================================
2750
- \begin{thebibliography}{99}
2751
- \setlength{\itemsep}{0pt}
2752
 
2753
- \bibitem{AgueraYArcas2024}
2754
- B.~Ag\"uera y Arcas, J.~Alakuijala, J.~Evans, B.~Laurie, A.~Mordvintsev,
2755
- E.~Niklasson, E.~Randazzo, and L.~Versari,
2756
- \emph{Computational life: How well-formed, self-replicating programs emerge from
2757
- simple interaction}, arXiv:2406.19108, 2024.
2758
 
2759
- \bibitem{AlonDewdneyOtt1991}
2760
- N.~Alon, A.~K.~Dewdney, and T.~J.~Ott,
2761
- \emph{Efficient simulation of finite automata by neural nets},
2762
- J. ACM \textbf{38} (1991), no.~2, 495--514.
2763
 
2764
- \bibitem{Arbib1966}
2765
- M.~A.~Arbib,
2766
- \emph{A simple self-reproducing universal automaton},
2767
- Information and Control \textbf{9} (1966), 177--189.
2768
 
2769
- \bibitem{BeiuQuintanaAvedillo2003}
2770
- V.~Beiu, J.~M.~Quintana, and M.~J.~Avedillo,
2771
- \emph{VLSI implementations of threshold logic---a comprehensive survey},
2772
- IEEE Trans. Neural Networks \textbf{14} (2003), no.~5, 1217--1243.
2773
 
2774
- \bibitem{BoldoLelayMelquiond2015}
2775
- S.~Boldo, C.~Lelay, and G.~Melquiond,
2776
- \emph{Coquelicot: A user-friendly library of real analysis for Coq}, Math. Comput.
2777
- Sci. \textbf{9} (2015), no.~1, 41--62.
2778
 
2779
- \bibitem{Burks1970}
2780
- A.~W.~Burks (ed.),
2781
- \emph{Essays on Cellular Automata}, University of Illinois Press, Urbana, 1970.
2782
 
2783
- \bibitem{CabessaSiegelmann2014}
2784
- J.~Cabessa and H.~T.~Siegelmann,
2785
- \emph{The super-Turing computational power of plastic recurrent neural
2786
- networks}, Int. J. Neural Systems \textbf{24} (2014), no.~8, 1450029.
2787
 
2788
- \bibitem{ChangLipson2018}
2789
- O.~Chang and H.~Lipson,
2790
- \emph{Neural network quine}, ALIFE 2018, MIT Press, 2018; arXiv:1803.05859.
2791
 
2792
- \bibitem{ChungSiegelmann2021}
2793
- S.~Chung and H.~T.~Siegelmann,
2794
- \emph{Turing completeness of bounded-precision recurrent neural networks},
2795
- Advances in Neural Information Processing Systems \textbf{34} (2021),
2796
- 28431--28441.
2797
 
2798
- \bibitem{CoatesLewis1964}
2799
- C.~L.~Coates and P.~M.~Lewis~II,
2800
- \emph{DONUT: A threshold gate computer},
2801
- IEEE Trans. Electronic Computers \textbf{EC-13} (1964), no.~3, 240--247.
2802
 
2803
- \bibitem{Codd1968}
2804
- E.~F.~Codd, \emph{Cellular Automata}, Academic Press, New York, 1968.
 
2805
 
2806
- \bibitem{CotlerHonglerHudcova2025}
2807
- J.~Cotler, C.~Hongler, and B.~Hudcov\'a,
2808
- \emph{Self-replication and computational universality}, arXiv:2510.08342, 2025.
2809
 
2810
- \bibitem{DobrushinOrtyukov1977}
2811
- R.~L.~Dobrushin and S.~I.~Ortyukov,
2812
- \emph{Upper bound on the redundancy of self-correcting arrangements of unreliable
2813
- functional elements}, Problems Inform. Transmission \textbf{13} (1977), no.~3,
2814
- 203--218.
2815
 
2816
- \bibitem{Denneau1982}
2817
- M.~M.~Denneau,
2818
- \emph{The Yorktown simulation engine}, Proceedings of the 19th Design Automation
2819
- Conference, 1982, 55--59.
2820
 
2821
- \bibitem{DurbeckMacias2001}
2822
- L.~J.~K.~Durbeck and N.~J.~Macias,
2823
- \emph{The Cell Matrix: an architecture for nanocomputing},
2824
- Nanotechnology \textbf{12} (2001), 217--230.
2825
 
2826
- \bibitem{EvansSchulman1999}
2827
- W.~S.~Evans and L.~J.~Schulman,
2828
- \emph{Signal propagation and noisy circuits}, IEEE Trans. Inform. Theory
2829
- \textbf{45} (1999), no.~7, 2367--2373.
2830
 
2831
- \bibitem{Gabor2022}
2832
- T.~Gabor, S.~Illium, M.~Zorn, C.~Lenta, A.~Mattausch, L.~Belzner, and
2833
- C.~Linnhoff-Popien,
2834
- \emph{Self-replication in neural networks},
2835
- Artificial Life \textbf{28} (2022), no.~2, 205--223.
2836
 
2837
- \bibitem{GiannouEtAl2023}
2838
- A.~Giannou, S.~Rajput, J.-y.~Sohn, K.~Lee, J.~D.~Lee, and D.~Papailiopoulos,
2839
- \emph{Looped transformers as programmable computers}, Proceedings of the 40th
2840
- International Conference on Machine Learning, PMLR \textbf{202} (2023),
2841
- 11398--11442.
2842
 
2843
- \bibitem{GoldmannHastadRazborov1992}
2844
- M.~Goldmann, J.~H\aa stad, and A.~Razborov,
2845
- \emph{Majority gates vs.\ general weighted threshold gates},
2846
- Comput. Complexity \textbf{2} (1992), 277--300.
2847
 
2848
- \bibitem{GoldmannKarpinski1998}
2849
- M.~Goldmann and M.~Karpinski,
2850
- \emph{Simulating threshold circuits by majority circuits},
2851
- SIAM J. Comput. \textbf{27} (1998), no.~1, 230--246.
2852
 
2853
- \bibitem{Goto1959}
2854
- E.~Goto,
2855
- \emph{The parametron, a digital computing element which utilizes parametric
2856
- oscillation}, Proc. IRE \textbf{47} (1959), no.~8, 1304--1316.
2857
 
2858
- \bibitem{GruauEtAl1995}
2859
- F.~Gruau, J.-Y.~Ratajszczak, and G.~Wiber,
2860
- \emph{A neural compiler}, Theoret. Comput. Sci. \textbf{141} (1995), 1--52.
2861
 
2862
  \bibitem{HajekWeller1991}
2863
- B.~Hajek and T.~Weller,
2864
- \emph{On the maximum tolerable noise for reliable computation by formulas},
2865
- IEEE Trans. Inform. Theory \textbf{37} (1991), no.~2, 388--391.
2866
 
2867
- \bibitem{HaDaiLe2017}
2868
- D.~Ha, A.~M.~Dai, and Q.~V.~Le,
2869
- \emph{HyperNetworks}, International Conference on Learning Representations, 2017.
2870
 
2871
- \bibitem{IbanezEtAl1995}
2872
- J.~Ib\'a\~nez, D.~Anabitarte, I.~Azpeitia, O.~Barrera, A.~Barrutieta, H.~Blanco,
2873
- and F.~Echarte,
2874
- \emph{Self-inspection based reproduction in cellular automata}, Advances in
2875
- Artificial Life (ECAL 1995), Lecture Notes in Comput. Sci. \textbf{929}, Springer,
2876
- 1995, 564--576.
2877
 
2878
- \bibitem{Indyk1995}
2879
- P.~Indyk,
2880
- \emph{Optimal simulation of automata by neural nets}, STACS 95, Lecture Notes in
2881
- Comput. Sci. \textbf{900}, Springer, 1995, 337--348.
2882
 
2883
- \bibitem{IrieEtAl2022}
2884
- K.~Irie, I.~Schlag, R.~Csord\'as, and J.~Schmidhuber,
2885
- \emph{A modern self-referential weight matrix that learns to modify itself},
2886
- Proceedings of the 39th International Conference on Machine Learning, PMLR
2887
- \textbf{162} (2022), 9660--9677.
2888
 
2889
- \bibitem{Kleene1956}
2890
- S.~C.~Kleene,
2891
- \emph{Representation of events in nerve nets and finite automata}, Automata
2892
- Studies (C.~E.~Shannon and J.~McCarthy, eds.), Annals of Mathematics Studies
2893
- \textbf{34}, Princeton University Press, 1956, 3--41.
2894
 
2895
- \bibitem{Langton1984}
2896
- C.~G.~Langton,
2897
- \emph{Self-reproduction in cellular automata}, Physica D \textbf{10} (1984),
2898
- 135--144.
2899
 
2900
- \bibitem{Lee1963}
2901
- C.~Y.~Lee,
2902
- \emph{A Turing machine which prints its own code script}, Proceedings of the
2903
- Symposium on Mathematical Theory of Automata, Polytechnic Press, Brooklyn, 1963,
2904
- 155--164.
2905
 
2906
- \bibitem{LiangEtAl2025}
2907
- Y.~Liang, Z.~Sha, Z.~Shi, Z.~Song, and Y.~Zhou,
2908
- \emph{Looped ReLU MLPs may be all you need as practical programmable computers},
2909
- Proceedings of the 28th International Conference on Artificial Intelligence and
2910
- Statistics, PMLR \textbf{258} (2025), 2647--2655.
2911
 
2912
- \bibitem{LindnerEtAl2023}
2913
- D.~Lindner, J.~Kram\'ar, S.~Farquhar, M.~Rahtz, T.~McGrath, and V.~Mikulik,
2914
- \emph{Tracr: Compiled transformers as a laboratory for interpretability},
2915
- Advances in Neural Information Processing Systems, 2023.
2916
 
2917
- \bibitem{LiuAndoniHsu2026}
2918
- J.~Liu, A.~Andoni, and D.~Hsu,
2919
- \emph{Fixed universal transformers}, arXiv:2605.31423, 2026.
2920
 
2921
- \bibitem{MaassOrponen1998}
2922
- W.~Maass and P.~Orponen,
2923
- \emph{On the effect of analog noise in discrete-time analog computations},
2924
- Neural Computation \textbf{10} (1998), no.~5, 1071--1095.
2925
 
2926
- \bibitem{MangeEtAl1998}
2927
- D.~Mange, E.~Sanchez, A.~Stauffer, G.~Tempesti, P.~Marchal, and C.~Piguet,
2928
- \emph{Embryonics: A new methodology for designing field-programmable gate arrays
2929
- with self-repair and self-replicating properties}, IEEE Trans. VLSI Systems
2930
- \textbf{6} (1998), no.~3, 387--399.
2931
 
2932
- \bibitem{MavaddatParhami1988}
2933
- F.~Mavaddat and B.~Parhami,
2934
- \emph{URISC: The ultimate reduced instruction set computer}, Int. J. Electrical
2935
- Engineering Education \textbf{25} (1988), no.~4, 327--334.
2936
 
2937
- \bibitem{McCullochPitts1943}
2938
- W.~S.~McCulloch and W.~Pitts,
2939
- \emph{A logical calculus of the ideas immanent in nervous activity}, Bull. Math.
2940
- Biophys. \textbf{5} (1943), 115--133.
2941
 
2942
- \bibitem{Melquiond2008}
2943
- G.~Melquiond,
2944
- \emph{Proving bounds on real-valued functions with computations}, Automated
2945
- Reasoning (IJCAR 2008), Lecture Notes in Comput. Sci. \textbf{5195}, Springer, 2008,
2946
- 2--17.
2947
 
2948
- \bibitem{Minsky1967}
2949
- M.~L.~Minsky,
2950
- \emph{Computation: Finite and Infinite Machines}, Prentice-Hall, Englewood Cliffs,
2951
- NJ, 1967.
2952
 
2953
- \bibitem{Moore1962}
2954
- E.~F.~Moore,
2955
- \emph{Machine models of self-reproduction}, Proc. Sympos. Appl. Math.
2956
- \textbf{14}, Amer. Math. Soc., Providence, RI, 1962, 17--33.
2957
 
2958
- \bibitem{MooreShannon1956}
2959
- E.~F.~Moore and C.~E.~Shannon,
2960
- \emph{Reliable circuits using less reliable relays}, J. Franklin Inst.
2961
- \textbf{262} (1956), 191--208 and 281--297.
2962
 
2963
- \bibitem{Muroga1971}
2964
- S.~Muroga,
2965
- \emph{Threshold Logic and Its Applications}, Wiley-Interscience, New York, 1971.
 
2966
 
2967
- \bibitem{MurogaTakashima1959}
2968
- S.~Muroga and K.~Takashima,
2969
- \emph{The parametron digital computer MUSASINO-1}, IRE Trans. Electronic
2970
- Computers \textbf{EC-8} (1959), no.~3, 308--316.
2971
 
2972
- \bibitem{Myhill1964}
2973
- J.~Myhill,
2974
- \emph{The abstract theory of self-reproduction}, Views on General Systems Theory
2975
- (M.~D.~Mesarovi\'c, ed.), Wiley, New York, 1964, 106--118.
2976
 
2977
- \bibitem{Norton2026}
2978
- C.~Norton,
2979
- \emph{threshold-computers: a family of threshold-logic machines}, Hugging Face
2980
- repository, 2026, \url{https://huggingface.co/phanerozoic/threshold-computers}.
2981
 
2982
- \bibitem{Okoma2002}
2983
- S.~Okoma,
2984
- \emph{The first Japanese computers and their software simulators}, The First
2985
- Computers: History and Architectures (R.~Rojas and U.~Hashagen, eds.), MIT Press,
2986
- Cambridge, MA, 2002, 419--449.
2987
 
2988
- \bibitem{PerrierSipperZahnd1996}
2989
- J.-Y.~Perrier, M.~Sipper, and J.~Zahnd,
2990
- \emph{Toward a viable, self-reproducing universal computer}, Physica D
2991
- \textbf{97} (1996), 335--352.
2992
 
2993
- \bibitem{Pesavento1995}
2994
- U.~Pesavento,
2995
- \emph{An implementation of von Neumann's self-reproducing machine}, Artificial
2996
- Life \textbf{2} (1995), no.~4, 337--354.
2997
 
2998
- \bibitem{Pierce1964}
2999
- W.~H.~Pierce,
3000
- \emph{Interwoven redundant logic}, J. Franklin Inst. \textbf{277} (1964), no.~1,
3001
- 55--85.
3002
 
3003
- \bibitem{Pierce1965}
3004
- W.~H.~Pierce,
3005
- \emph{Failure-Tolerant Computer Design}, Academic Press, New York, 1965.
3006
 
3007
- \bibitem{Pippenger1985}
3008
- N.~Pippenger,
3009
- \emph{On networks of noisy gates}, Proceedings of the 26th Annual Symposium on
3010
- Foundations of Computer Science, IEEE, 1985, 30--38.
3011
 
3012
- \bibitem{RandazzoVersariMordvintsev2021}
3013
- E.~Randazzo, L.~Versari, and A.~Mordvintsev,
3014
- \emph{Recursively fertile self-replicating neural agents}, ALIFE 2021, MIT Press,
3015
- 2021.
3016
 
3017
- \bibitem{Ray1991}
3018
- T.~S.~Ray,
3019
- \emph{An approach to the synthesis of life}, Artificial Life II (C.~G.~Langton
3020
- et al., eds.), Addison-Wesley, 1991, 371--408.
3021
 
3022
- \bibitem{RiosWilsonTheyssier2024a}
3023
- M.~R\'ios-Wilson and G.~Theyssier,
3024
- \emph{Intrinsic universality in automata networks I: Families and simulations},
3025
- Theoret. Comput. Sci. \textbf{997} (2024), 114511.
3026
 
3027
- \bibitem{RiosWilsonTheyssier2024c}
3028
- M.~R\'ios-Wilson and G.~Theyssier,
3029
- \emph{Intrinsic universality in automata networks III: On symmetry versus
3030
- asynchrony}, Theoret. Comput. Sci. \textbf{1022} (2024), 114890.
3031
 
3032
- \bibitem{Schmidgall2021}
3033
- S.~Schmidgall,
3034
- \emph{Self-replicating neural programs}, arXiv:2109.12786, 2021.
 
 
3035
 
3036
- \bibitem{Schmidhuber1993}
3037
- J.~Schmidhuber,
3038
- \emph{A self-referential weight matrix}, Proceedings of the International
3039
- Conference on Artificial Neural Networks (ICANN 1993), Springer, 1993, 446--451.
3040
 
3041
- \bibitem{ShvartzmanRam2024}
3042
- B.~Shvartzman and Y.~Ram,
3043
- \emph{Self-replicating artificial neural networks give rise to universal
3044
- evolutionary dynamics}, PLoS Comput. Biol. \textbf{20} (2024), no.~3, e1012004.
3045
 
3046
- \bibitem{SiegelmannSontag1995}
3047
- H.~T.~Siegelmann and E.~D.~Sontag,
3048
- \emph{On the computational power of neural nets}, J. Comput. System Sci.
3049
- \textbf{50} (1995), no.~1, 132--150.
3050
 
3051
- \bibitem{SimaOrponen2003}
3052
- J.~{\v S}\'ima and P.~Orponen,
3053
- \emph{General-purpose computation with neural networks: A survey of complexity
3054
- theoretic results}, Neural Computation \textbf{15} (2003), no.~12, 2727--2778.
3055
 
3056
- \bibitem{SimaWiedermann1998}
3057
- J.~{\v S}\'ima and J.~Wiedermann,
3058
- \emph{Theory of neuromata}, J. ACM \textbf{45} (1998), no.~1, 155--178.
 
3059
 
3060
- \bibitem{Sipper1998}
3061
- M.~Sipper,
3062
- \emph{Fifty years of research on self-replication: An overview}, Artificial Life
3063
- \textbf{4} (1998), no.~3, 237--257.
3064
 
3065
- \bibitem{SiuRoychowdhuryKailath1995}
3066
- K.-Y.~Siu, V.~Roychowdhury, and T.~Kailath,
3067
- \emph{Discrete Neural Computation: A Theoretical Foundation}, Prentice Hall,
3068
- Englewood Cliffs, NJ, 1995.
3069
 
3070
- \bibitem{Thatcher1963}
3071
- J.~W.~Thatcher,
3072
- \emph{The construction of a self-describing Turing machine}, Proceedings of the
3073
- Symposium on Mathematical Theory of Automata, Polytechnic Press, Brooklyn, 1963,
3074
- 165--171.
3075
 
3076
- \bibitem{Turkcan2026}
3077
- M.~K.~Turkcan,
3078
- \emph{Loom: A scalable analytical neural computer architecture},
3079
- arXiv:2604.08816, 2026.
3080
 
3081
- \bibitem{Valiant1976}
3082
- L.~G.~Valiant,
3083
- \emph{Universal circuits (preliminary report)}, Proceedings of the 8th Annual ACM
3084
- Symposium on Theory of Computing, 1976, 196--203.
3085
 
3086
- \bibitem{vonNeumann1945}
3087
- J.~von Neumann,
3088
- \emph{First Draft of a Report on the EDVAC}, Moore School of Electrical
3089
- Engineering, University of Pennsylvania, 1945.
3090
 
3091
- \bibitem{vonNeumann1956}
3092
- J.~von Neumann,
3093
- \emph{Probabilistic logics and the synthesis of reliable organisms from unreliable
3094
- components}, Automata Studies, Annals of Mathematics Studies \textbf{34},
3095
- Princeton University Press, 1956, 43--98.
3096
 
3097
- \bibitem{vonNeumann1966}
3098
- J.~von Neumann,
3099
- \emph{Theory of Self-Reproducing Automata} (A.~W.~Burks, ed.), University of
3100
- Illinois Press, Urbana, 1966.
3101
 
3102
- \bibitem{WinogradCowan1963}
3103
- S.~Winograd and J.~D.~Cowan,
3104
- \emph{Reliable Computation in the Presence of Noise}, MIT Press, Cambridge, MA,
3105
- 1963.
3106
 
3107
  \end{thebibliography}
3108
 
 
1
  % !TEX program = pdflatex
2
+ \documentclass[11pt]{article}
3
+ \setlength{\textwidth}{6.5in}
4
+ \setlength{\oddsidemargin}{0pt}
5
+ \setlength{\evensidemargin}{0pt}
6
+ \setlength{\textheight}{9in}
7
+ \setlength{\topmargin}{0pt}
8
+ \addtolength{\topmargin}{-\headheight}
9
+ \addtolength{\topmargin}{-\headsep}
10
+ \ifdefined\pdfpagewidth \pdfpagewidth=8.5in \pdfpageheight=11in \fi
11
+ \ifdefined\pagewidth \pagewidth=8.5in \pageheight=11in \fi
12
  \usepackage{amsmath,amssymb,amsthm,mathtools}
13
+ \usepackage{tabularx,array}
 
14
  \usepackage{enumitem}
15
  \usepackage{tikz}
16
  \usetikzlibrary{arrows.meta,calc}
17
  \usepackage{pgfplots}
18
  \pgfplotsset{compat=1.18}
19
+ \emergencystretch=3em
20
+ \makeatletter
21
+ \def\tc@slash{/}
22
+ \newcommand{\link}[1]{\texttt{\@tfor\tc@t:=#1\do{\tc@t\ifx\tc@t\tc@slash\allowbreak\fi}}}
23
+ \makeatother
24
 
25
  % ---- theorem environments ---------------------------------------------------
26
  \newtheorem{theorem}{Theorem}[section]
 
57
  \DeclareMathOperator{\popcount}{popcount}
58
 
59
  % ---- front matter -----------------------------------------------------------
60
+ \title{Universal Construction and Exact Self-Reproduction\\ in Ternary McCulloch--Pitts Networks}
 
 
61
  \author{Charles Norton}
62
+ \date{}
 
 
 
 
63
 
64
  \begin{document}
65
+ \maketitle
66
 
67
  \begin{abstract}
68
+ We construct networks of McCulloch--Pitts threshold units with weights in
69
+ $\{-1,0,1\}$ that carry out von Neumann's universal construction and
70
+ self-reproduction exactly. A SUBLEQ computer of $17{,}598$ units, the eight-bit
71
+ member of a family of depth $13$, runs a program of $21$ instructions that builds
72
+ any byte string from a run-length description, and one of $27$ instructions with
73
+ which it emits the serialization of its own weights, memory and tape. A second,
74
+ fixed network holds threshold networks as records in a ring of banks and tapes and
75
+ evaluates one record per step. Stored in it as $36{,}080$ records, the SUBLEQ
76
+ computer builds any image that fits a bank from a description of it and, started on
77
+ its own description, rebuilds itself, weights included, in every generation; a
78
+ constructor of $143$
79
+ records with a description code of its own does the same. Integer pre-activations
80
+ give every orbit a margin of $1/2$, and replicating each unit $r$ times multiplies
81
+ it by $r$. That suffices against noise of any size on the pre-activations, but
82
+ against von Neumann's output flips only below a threshold inversely proportional to
83
+ the fan-in. These results are proved in Rocq.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
84
  \end{abstract}
85
 
 
 
86
  % =============================================================================
87
  \section{Introduction}\label{sec:intro}
88
  % =============================================================================
 
196
  \begin{table}[ht]
197
  \centering\small
198
  \begin{tabularx}{\textwidth}{@{}>{\raggedright\arraybackslash}p{0.36\textwidth}>{\raggedright\arraybackslash}p{0.2\textwidth}>{\raggedright\arraybackslash}X@{}}
199
+ \hline
200
  Claim & Where & Evidence\\
201
+ \hline
202
  Levelization; the sizes of $\Lev(\Nhost)$ & Lem.~\ref{lem:lev}, Rem.~\ref{rem:levsizes} & Rocq\\
203
  The step of $H_A$ is the step of $\mathrm{SUBLEQ}_A$, every $A\ge3$ & Prop.~\ref{prop:host} & Rocq; the netlists extracted for $A=8,9,10$ equal the generator's\\
204
  Depth $13$, units, edges, weights and biases of $H_A$, every $A\ge3$ & Prop.~\ref{prop:host} & Rocq; rebuilt independently for $A=3$ to $12$\\
205
+ The branch unit; a read and the branch need two ternary levels & Lems.~\ref{lem:branch}, \ref{lem:muxdepth}, Rem.~\ref{rem:ternarydepth} & Rocq; exhaustive search on eight inputs\\
206
  The folded host: its step, depth $11$, units and edges, every $A\ge3$ & Rem.~\ref{rem:fold} & Rocq; random states for $A=3$ to $12$\\
207
  Length and optimality of the recipes and of $\describe$ & Lems.~\ref{lem:complete}, \ref{lem:describe}, Prop.~\ref{prop:optimal} & Rocq; checked on $971$ MB and on $68{,}061$ boundary strings\\
208
  $P$ builds every string, in the stated steps, every $A\ge8$ & Thm.~\ref{thm:univ} & Rocq; $29$ recipes run on the reference and four on the netlist\\
 
217
  Construction and reproduction by the stored host: copies, period, network, counts, every $A\ge8$ & Thms.~\ref{thm:storedconstruct}--\ref{thm:widths} & Rocq; the extracted image equal to the generator's for $A=8,9$; six generations of $\mathcal S_8$ run\\
218
  The stored host under noise & Cor.~\ref{cor:storednoise} & Rocq\\
219
  The organism: code, pass, construction, copies, period, network & Lem.~\ref{lem:code}, Prop.~\ref{prop:pass}, Thms.~\ref{thm:construct}, \ref{thm:organism} & Rocq; six generations run, one on the netlist\\
220
+ \hline
221
  \end{tabularx}
222
  \caption{The claims of the paper and the evidence for each: the proof checked in Rocq,
223
  and the computations and runs recorded in the artifact.}
 
370
  \begin{table}[ht]
371
  \centering\small
372
  \begin{tabular}{@{}llll@{}}
373
+ \hline
374
  Address & Symbol & Role & Effect \\
375
+ \hline
376
  \cell{0xF9} & $c_{\mathrm{wr}}$ & write request & value $1$ emits $R_{\mathrm{out}}$ and clears it\\
377
  \cell{0xFA} & $c_{\mathrm{eot}}$ & end-of-tape status& set by a read at $h=|\tau|$, cleared by a read at $h<|\tau|$\\
378
  \cell{0xFB} & $c_{\mathrm{rw}}$ & rewind request & value $1$ sets $h=0$\\
 
380
  \cell{0xFD} & $R_{\mathrm{in}}$ & input register & written by the device\\
381
  \cell{0xFE} & $R_{\mathrm{out}}$ & output register & written by the program, cleared on emit\\
382
  \cell{0xFF} & -- & halt & the machine halts when $p=255$\\
383
+ \hline
384
  \end{tabular}
385
  \caption{Memory-mapped device cells of the host transducer.}
386
  \label{tab:device}
 
537
 
538
  \begin{proof}
539
  $-\sum_i r_i\ge 0$ holds exactly when every $r_i=0$. The value $r$ is at most $0$
540
+ exactly when $r=0$ or $r_7=1$, so $[r\le 0]=\mathrm{OR}(r_7,z(r))$. The lemma is
541
+ proved in Rocq for words of every width.
542
  \end{proof}
543
 
544
  \begin{remark}[Ternary weights cost one level at the branch]\label{rem:ternarydepth}
 
628
  \begin{table}[ht]
629
  \centering\small
630
  \begin{tabular}{@{}lrcl@{}}
631
+ \hline
632
  Block & Units & Layer & Computes\\
633
+ \hline
634
  $P_j$ & $2^A$ & 1 & decode lines of $p$\\
635
  $HP_i$ & $A$ & 1 & $h\wedge p_i$\\
636
  $FA_{o,t,j}$ & $3A2^A$ & 2 & $\mu_{j+o,t}\wedge P_j$\\
 
648
  $TA_i$, $TB_i$, $NP_i$ & $3A$ & 12--13 & next counter\\
649
  $HA$, $HB$, $NH$ & $3$ & 12--13 & next halt bit\\
650
  $WR_{j,t}$, $NM_{j,t}$ & $2A2^A$ & 12--13 & next memory (9--10 for $t=0$)\\
651
+ \hline
652
  \end{tabular}
653
  \caption{The blocks of $H_A$ in the order of the netlist. The layer is the depth
654
  of the block's units.}
 
925
 
926
  \begin{table}[t]\centering\small
927
  \begin{tabular}{@{}rlllll@{}}
928
+ \hline
929
  $k$ & addr & $A$ & $B$ & $C$ & effect\\
930
+ \hline
931
  0 & \cell{0x00} & \cell{T2} & \cell{T2} & \cell{0x03} & $M[\cell{T2}]\leftarrow 0$\\
932
  1 & \cell{0x03} & \cell{T1} & \cell{T1} & \cell{0x06} & $M[\cell{T1}]\leftarrow 0$\\
933
  2 & \cell{0x06} & \cell{NEG1} & $c_{\mathrm{rd}}$ & \cell{0x09} & read request\\
 
956
  24 & \cell{0x48} & \cell{Z} & $R_{\mathrm{out}}$ & \cell{0x4B} & $M[R_{\mathrm{out}}]\leftarrow b$\\
957
  25 & \cell{0x4B} & \cell{NEG1} & $c_{\mathrm{wr}}$ & \cell{0x4E} & write request\\
958
  26 & \cell{0x4E} & \cell{Z} & \cell{Z} & \cell{0x3F} & $M[\cell{Z}]\leftarrow0$; goto \textsc{b}\\
959
+ \hline
960
  \end{tabular}
961
  \caption{The constructor $P$ of Construction~\ref{con:P}, instructions $0$ to $20$ at
962
  \cell{0x00}--\cell{0x3E}, and the self-reproducing program $P^\ast$ of
 
1145
  $s$, let $(x_t)$ be the orbit of $F$ from $x_0$, and for $t\ge0$ and each row $i$
1146
  of each layer let $z_{t,i}$ be the pre-activation of row $i$ on the input
1147
  $x_t$ and $d_{t,i}=|z_{t,i}+\tfrac12|$. Put
1148
+ \begin{gather*}
1149
  b'(t)=1-\prod_i\Bigl(1-Q\bigl(d_{t,i}/s\bigr)\Bigr),\qquad
1150
+ b(t)=\sum_i Q\bigl(d_{t,i}/s\bigr),\\
1151
+ Q(u)=\Pr(\mathcal N(0,1)>u)=\tfrac12\erfc(u/\sqrt2).
1152
+ \end{gather*}
1153
  Given that a perturbed trajectory from $x_0$ agrees with the orbit up to step $t$,
1154
  the probability that it differs from it at step $t+1$ is at most $b'(t)$, the
1155
  probability that some row of the step fails while it reads the values of the orbit;
 
2484
 
2485
  \begin{table}[ht]
2486
  \centering\small
2487
+ \setlength{\tabcolsep}{5pt}
2488
  \begin{tabular}{@{}lrrllll@{}}
2489
+ \hline
2490
  $s$ & Deviated & Exposure & Measured rate, $95\%$ interval & $b'$ & $b$ & $Mp$\\
2491
+ \hline
2492
  $0.06$ & 0/256 & 768{,}000 & $0$, $[0,\,4.80\times10^{-6}]$ & $1.21\times10^{-12}$ & $1.21\times10^{-12}$ & $3.30\times10^{-12}$\\
2493
  $0.08$ & 7/256 & 1{,}008{,}916 & $6.94\times10^{-6}$, $[2.79,\,14.3]\times10^{-6}$ & $6.34\times10^{-6}$ & $6.34\times10^{-6}$ & $1.72\times10^{-5}$\\
2494
  $0.09$ & 202/256 & 496{,}131 & $4.07\times10^{-4}$, $[3.53,\,4.67]\times10^{-4}$ & $4.27\times10^{-4}$ & $4.27\times10^{-4}$ & $1.16\times10^{-3}$\\
 
2497
  $0.12$ & 256/256 & 714 & $3.59\times10^{-1}$, $[3.16,\,4.05]\times10^{-1}$ & $3.77\times10^{-1}$ & $4.73\times10^{-1}$ & $1.30$\\
2498
  $0.15$ & 256/256 & 256 & $1.00$, $[0.88,\,1]$ & $1.00$ & $1.30\times10^{1}$ & $3.60\times10^{1}$\\
2499
  $0.20$ & 256/256 & 256 & $1.00$, $[0.88,\,1]$ & $1.00$ & $1.89\times10^{2}$ & $5.21\times10^{2}$\\
2500
+ \hline
2501
  \end{tabular}
2502
  \caption{The per-step probability that $\Lev(\Nhost)$ leaves the exact orbit under
2503
  read noise of standard deviation $s$. One noise-free copy and $256$ noisy copies
 
2548
  \begin{table}[ht]
2549
  \centering\small
2550
  \begin{tabular}{@{}lrrlll@{}}
2551
+ \hline
2552
  $s$ & Failed & Exposure & Measured rate, $95\%$ interval & Restoration bound & $rM\erfc(r/2\sqrt2s)$\\
2553
+ \hline
2554
  $0.10$ & --- & --- & --- & $8.62\times10^{-59}$ & $9.24\times10^{-46}$\\
2555
  $0.15$ & --- & --- & --- & $4.02\times10^{-25}$ & $1.92\times10^{-18}$\\
2556
  $0.20$ & --- & --- & --- & $3.59\times10^{-13}$ & $8.03\times10^{-9}$\\
 
2560
  $0.30$ & 63/64 & 295{,}163 & $2.13\times10^{-4}$, $[1.64,\,2.73]\times10^{-4}$ & $2.26\times10^{-4}$ & $7.22\times10^{-2}$\\
2561
  $0.33$ & 64/64 & 17{,}472 & $3.66\times10^{-3}$, $[2.82,\,4.68]\times10^{-3}$ & $4.34\times10^{-3}$ & $6.90\times10^{-1}$\\
2562
  $0.36$ & 64/64 & 2{,}188 & $2.93\times10^{-2}$, $[2.25,\,3.74]\times10^{-2}$ & $4.30\times10^{-2}$ & $3.89$\\
2563
+ \hline
2564
  \end{tabular}
2565
  \caption{The per-step probability that the state of $N_3$ read by majority leaves the orbit under read noise of standard deviation $s$: $64$ noisy copies stepped beside an exact one from the initial state of the self-describing instance for up to $20{,}000$ steps, each stopped at its first wrong majority-read state, with the exact $95\%$ interval for a Poisson count over the exposure, against the bound $b(t)$ of Proposition~\ref{prop:restore} along the same orbit, weighted by the steps each copy ran where copies ran and averaged over the $20{,}000$ steps elsewhere, and the first-order bound of Theorem~\ref{thm:amplify}(ii).}
2566
  \label{tab:bound3}
 
2597
  runs within sampling error.
2598
 
2599
  The Rocq development, \texttt{rocq/} in the artifact, has $66$ files and
2600
+ $24{,}230$ lines and builds with Rocq 9.1.1 in about two minutes on the machine
2601
  below, most of it in the kernel's evaluation of the $15{,}872$ abstract passes of
2602
  Proposition~\ref{prop:pass} and in the device records of the stored host. It proves
2603
  Lemma~\ref{lem:lev} for every clocked netlist. It defines the host family $H_A$
 
2606
  and biases and the sizes of $\Lev(H_A)$ (Proposition~\ref{prop:host},
2607
  Remark~\ref{rem:levsizes}), and does the same for the step, the depth and the
2608
  numbers of units and edges of the folded host (Remark~\ref{rem:fold}). It proves
2609
+ Lemmas~\ref{lem:branch} and~\ref{lem:muxdepth} and Remark~\ref{rem:ternarydepth}. It defines the recipes, $\describe$, the device of
2610
  Definition~\ref{def:transducer} and the programs $P$ and $P^\ast$ in $2^A$ words, and
2611
  proves Lemmas~\ref{lem:complete} and~\ref{lem:describe},
2612
  Proposition~\ref{prop:optimal}, Theorems~\ref{thm:univ} and~\ref{thm:selfrep} and
 
2732
  Ti Laptop GPU with $8$ GiB of memory.
2733
 
2734
  % =============================================================================
2735
+ \begin{thebibliography}{99}\small\raggedright
2736
+ \setlength{\itemsep}{1pt}
2737
 
2738
+ \bibitem{McCullochPitts1943}
2739
+ W.~S. McCulloch and W.~Pitts, A logical calculus of the ideas immanent in nervous
2740
+ activity, \emph{Bull. Math. Biophys.} \textbf{5}, 115 (1943).
 
 
2741
 
2742
+ \bibitem{vonNeumann1945}
2743
+ J.~von~Neumann, \emph{First Draft of a Report on the EDVAC} (Moore School of
2744
+ Electrical Engineering, University of Pennsylvania, Philadelphia, 1945).
 
2745
 
2746
+ \bibitem{vonNeumann1966}
2747
+ J.~von~Neumann, \emph{Theory of Self-Reproducing Automata}, edited by A.~W. Burks
2748
+ (University of Illinois Press, Urbana, 1966).
 
2749
 
2750
+ \bibitem{Arbib1966}
2751
+ M.~A. Arbib, A simple self-reproducing universal automaton, \emph{Inf. Control}
2752
+ \textbf{9}, 177 (1966).
 
2753
 
2754
+ \bibitem{Codd1968}
2755
+ E.~F. Codd, \emph{Cellular Automata} (Academic Press, New York, 1968).
 
 
2756
 
2757
+ \bibitem{Langton1984}
2758
+ C.~G. Langton, Self-reproduction in cellular automata, \emph{Physica D}
2759
+ \textbf{10}, 135 (1984).
2760
 
2761
+ \bibitem{Pesavento1995}
2762
+ U.~Pesavento, An implementation of von Neumann's self-reproducing machine,
2763
+ \emph{Artif. Life} \textbf{2}, 337 (1995).
 
2764
 
2765
+ \bibitem{PerrierSipperZahnd1996}
2766
+ J.-Y. Perrier, M.~Sipper and J.~Zahnd, Toward a viable, self-reproducing universal
2767
+ computer, \emph{Physica D} \textbf{97}, 335 (1996).
2768
 
2769
+ \bibitem{Sipper1998}
2770
+ M.~Sipper, Fifty years of research on self-replication: An overview, \emph{Artif.
2771
+ Life} \textbf{4}, 237 (1998).
 
 
2772
 
2773
+ \bibitem{CotlerHonglerHudcova2025}
2774
+ J.~Cotler, C.~Hongler and B.~Hudcov\'a, Self-replication and computational
2775
+ universality, arXiv:2510.08342 (2025).
 
2776
 
2777
+ \bibitem{MavaddatParhami1988}
2778
+ F.~Mavaddat and B.~Parhami, URISC: The ultimate reduced instruction set computer,
2779
+ \emph{Int. J. Electr. Eng. Educ.} \textbf{25}, 327 (1988).
2780
 
2781
+ \bibitem{Pierce1965}
2782
+ W.~H. Pierce, \emph{Failure-Tolerant Computer Design} (Academic Press, New York,
2783
+ 1965).
2784
 
2785
+ \bibitem{Muroga1971}
2786
+ S.~Muroga, \emph{Threshold Logic and Its Applications} (Wiley-Interscience, New
2787
+ York, 1971).
 
 
2788
 
2789
+ \bibitem{Kleene1956}
2790
+ S.~C. Kleene, Representation of events in nerve nets and finite automata, in
2791
+ \emph{Automata Studies}, edited by C.~E. Shannon and J.~McCarthy, Ann. Math. Stud.
2792
+ 34 (Princeton University Press, Princeton, 1956), 3.
2793
 
2794
+ \bibitem{Minsky1967}
2795
+ M.~L. Minsky, \emph{Computation: Finite and Infinite Machines} (Prentice-Hall,
2796
+ Englewood Cliffs, NJ, 1967).
 
2797
 
2798
+ \bibitem{AlonDewdneyOtt1991}
2799
+ N.~Alon, A.~K. Dewdney and T.~J. Ott, Efficient simulation of finite automata by
2800
+ neural nets, \emph{J. ACM} \textbf{38}, 495 (1991).
 
2801
 
2802
+ \bibitem{Indyk1995}
2803
+ P.~Indyk, Optimal simulation of automata by neural nets, in \emph{STACS 95}, LNCS
2804
+ 900, 337 (1995).
 
 
2805
 
2806
+ \bibitem{Lee1963}
2807
+ C.~Y. Lee, A Turing machine which prints its own code script, in
2808
+ \emph{Proceedings of the Symposium on Mathematical Theory of Automata} (Polytechnic
2809
+ Press, Brooklyn, 1963), 155.
 
2810
 
2811
+ \bibitem{Thatcher1963}
2812
+ J.~W. Thatcher, The construction of a self-describing Turing machine, in
2813
+ \emph{Proceedings of the Symposium on Mathematical Theory of Automata} (Polytechnic
2814
+ Press, Brooklyn, 1963), 165.
2815
 
2816
+ \bibitem{vonNeumann1956}
2817
+ J.~von~Neumann, Probabilistic logics and the synthesis of reliable organisms from
2818
+ unreliable components, in \emph{Automata Studies}, edited by C.~E. Shannon and
2819
+ J.~McCarthy, Ann. Math. Stud. 34 (Princeton University Press, Princeton, 1956), 43.
2820
 
2821
+ \bibitem{DobrushinOrtyukov1977}
2822
+ R.~L. Dobrushin and S.~I. Ortyukov, Upper bound on the redundancy of
2823
+ self-correcting arrangements of unreliable functional elements, \emph{Probl. Inf.
2824
+ Transm.} \textbf{13}, 203 (1977).
2825
 
2826
+ \bibitem{Pippenger1985}
2827
+ N.~Pippenger, On networks of noisy gates, in \emph{26th Annual Symposium on
2828
+ Foundations of Computer Science}, 30 (1985).
2829
 
2830
  \bibitem{HajekWeller1991}
2831
+ B.~Hajek and T.~Weller, On the maximum tolerable noise for reliable computation by
2832
+ formulas, \emph{IEEE Trans. Inf. Theory} \textbf{37}, 388 (1991).
 
2833
 
2834
+ \bibitem{EvansSchulman1999}
2835
+ W.~S. Evans and L.~J. Schulman, Signal propagation and noisy circuits, \emph{IEEE
2836
+ Trans. Inf. Theory} \textbf{45}, 2367 (1999).
2837
 
2838
+ \bibitem{MooreShannon1956}
2839
+ E.~F. Moore and C.~E. Shannon, Reliable circuits using less reliable relays,
2840
+ \emph{J. Franklin Inst.} \textbf{262}, 191 and 281 (1956).
 
 
 
2841
 
2842
+ \bibitem{WinogradCowan1963}
2843
+ S.~Winograd and J.~D. Cowan, \emph{Reliable Computation in the Presence of Noise}
2844
+ (MIT Press, Cambridge, MA, 1963).
 
2845
 
2846
+ \bibitem{Pierce1964}
2847
+ W.~H. Pierce, Interwoven redundant logic, \emph{J. Franklin Inst.} \textbf{277}, 55
2848
+ (1964).
 
 
2849
 
2850
+ \bibitem{Denneau1982}
2851
+ M.~M. Denneau, The Yorktown simulation engine, in \emph{19th Design Automation
2852
+ Conference}, 55 (1982).
 
 
2853
 
2854
+ \bibitem{RiosWilsonTheyssier2024c}
2855
+ M.~R\'ios-Wilson and G.~Theyssier, Intrinsic universality in automata networks III:
2856
+ On symmetry versus asynchrony, \emph{Theor. Comput. Sci.} \textbf{1022}, 114890
2857
+ (2024).
2858
 
2859
+ \bibitem{Goto1959}
2860
+ E.~Goto, The parametron, a digital computing element which utilizes parametric
2861
+ oscillation, \emph{Proc. IRE} \textbf{47}, 1304 (1959).
 
 
2862
 
2863
+ \bibitem{MurogaTakashima1959}
2864
+ S.~Muroga and K.~Takashima, The parametron digital computer MUSASINO-1, \emph{IRE
2865
+ Trans. Electron. Comput.} \textbf{EC-8}, 308 (1959).
 
 
2866
 
2867
+ \bibitem{Okoma2002}
2868
+ S.~Okoma, The first Japanese computers and their software simulators, in \emph{The
2869
+ First Computers: History and Architectures}, edited by R.~Rojas and U.~Hashagen
2870
+ (MIT Press, Cambridge, MA, 2002), 419.
2871
 
2872
+ \bibitem{CoatesLewis1964}
2873
+ C.~L. Coates and P.~M. Lewis~II, DONUT: A threshold gate computer, \emph{IEEE
2874
+ Trans. Electron. Comput.} \textbf{EC-13}, 240 (1964).
2875
 
2876
+ \bibitem{BeiuQuintanaAvedillo2003}
2877
+ V.~Beiu, J.~M. Quintana and M.~J. Avedillo, VLSI implementations of threshold
2878
+ logic---a comprehensive survey, \emph{IEEE Trans. Neural Netw.} \textbf{14}, 1217
2879
+ (2003).
2880
 
2881
+ \bibitem{GoldmannHastadRazborov1992}
2882
+ M.~Goldmann, J.~H\aa stad and A.~Razborov, Majority gates vs.\ general weighted
2883
+ threshold gates, \emph{Comput. Complexity} \textbf{2}, 277 (1992).
 
 
2884
 
2885
+ \bibitem{GoldmannKarpinski1998}
2886
+ M.~Goldmann and M.~Karpinski, Simulating threshold circuits by majority circuits,
2887
+ \emph{SIAM J. Comput.} \textbf{27}, 230 (1998).
 
2888
 
2889
+ \bibitem{SiuRoychowdhuryKailath1995}
2890
+ K.-Y. Siu, V.~Roychowdhury and T.~Kailath, \emph{Discrete Neural Computation: A
2891
+ Theoretical Foundation} (Prentice Hall, Englewood Cliffs, NJ, 1995).
 
2892
 
2893
+ \bibitem{SiegelmannSontag1995}
2894
+ H.~T. Siegelmann and E.~D. Sontag, On the computational power of neural nets,
2895
+ \emph{J. Comput. Syst. Sci.} \textbf{50}, 132 (1995).
 
 
2896
 
2897
+ \bibitem{SimaOrponen2003}
2898
+ J.~{\v S}\'ima and P.~Orponen, General-purpose computation with neural networks: A
2899
+ survey of complexity theoretic results, \emph{Neural Comput.} \textbf{15}, 2727
2900
+ (2003).
2901
 
2902
+ \bibitem{GruauEtAl1995}
2903
+ F.~Gruau, J.-Y. Ratajszczak and G.~Wiber, A neural compiler, \emph{Theor. Comput.
2904
+ Sci.} \textbf{141}, 1 (1995).
 
2905
 
2906
+ \bibitem{LindnerEtAl2023}
2907
+ D.~Lindner, J.~Kram\'ar, S.~Farquhar, M.~Rahtz, T.~McGrath and V.~Mikulik, Tracr:
2908
+ Compiled transformers as a laboratory for interpretability, in \emph{Advances in
2909
+ Neural Information Processing Systems} (2023).
2910
 
2911
+ \bibitem{GiannouEtAl2023}
2912
+ A.~Giannou, S.~Rajput, J.-y. Sohn, K.~Lee, J.~D. Lee and D.~Papailiopoulos, Looped
2913
+ transformers as programmable computers, in \emph{40th International Conference on
2914
+ Machine Learning}, PMLR 202, 11398 (2023).
2915
 
2916
+ \bibitem{LiangEtAl2025}
2917
+ Y.~Liang, Z.~Sha, Z.~Shi, Z.~Song and Y.~Zhou, Looped ReLU MLPs may be all you need
2918
+ as practical programmable computers, in \emph{28th International Conference on
2919
+ Artificial Intelligence and Statistics}, PMLR 258, 2647 (2025).
2920
 
2921
+ \bibitem{LiuAndoniHsu2026}
2922
+ J.~Liu, A.~Andoni and D.~Hsu, Fixed universal transformers, arXiv:2605.31423
2923
+ (2026).
 
2924
 
2925
+ \bibitem{Turkcan2026}
2926
+ M.~K. Turkcan, Loom: A scalable analytical neural computer architecture,
2927
+ arXiv:2604.08816 (2026).
 
2928
 
2929
+ \bibitem{Valiant1976}
2930
+ L.~G. Valiant, Universal circuits (preliminary report), in \emph{8th Annual ACM
2931
+ Symposium on Theory of Computing}, 196 (1976).
 
 
2932
 
2933
+ \bibitem{RiosWilsonTheyssier2024a}
2934
+ M.~R\'ios-Wilson and G.~Theyssier, Intrinsic universality in automata networks I:
2935
+ Families and simulations, \emph{Theor. Comput. Sci.} \textbf{997}, 114511 (2024).
 
2936
 
2937
+ \bibitem{SimaWiedermann1998}
2938
+ J.~{\v S}\'ima and J.~Wiedermann, Theory of neuromata, \emph{J. ACM} \textbf{45},
2939
+ 155 (1998).
 
2940
 
2941
+ \bibitem{ChungSiegelmann2021}
2942
+ S.~Chung and H.~T. Siegelmann, Turing completeness of bounded-precision recurrent
2943
+ neural networks, in \emph{Advances in Neural Information Processing Systems}
2944
+ \textbf{34}, 28431 (2021).
2945
 
2946
+ \bibitem{CabessaSiegelmann2014}
2947
+ J.~Cabessa and H.~T. Siegelmann, The super-Turing computational power of plastic
2948
+ recurrent neural networks, \emph{Int. J. Neural Syst.} \textbf{24}, 1450029 (2014).
2949
 
2950
+ \bibitem{Burks1970}
2951
+ A.~W. Burks (ed.), \emph{Essays on Cellular Automata} (University of Illinois
2952
+ Press, Urbana, 1970).
 
2953
 
2954
+ \bibitem{MaassOrponen1998}
2955
+ W.~Maass and P.~Orponen, On the effect of analog noise in discrete-time analog
2956
+ computations, \emph{Neural Comput.} \textbf{10}, 1071 (1998).
 
2957
 
2958
+ \bibitem{Moore1962}
2959
+ E.~F. Moore, Machine models of self-reproduction, \emph{Proc. Sympos. Appl. Math.}
2960
+ \textbf{14}, 17 (1962).
 
2961
 
2962
+ \bibitem{Myhill1964}
2963
+ J.~Myhill, The abstract theory of self-reproduction, in \emph{Views on General
2964
+ Systems Theory}, edited by M.~D. Mesarovi\'c (Wiley, New York, 1964), 106.
 
2965
 
2966
+ \bibitem{IbanezEtAl1995}
2967
+ J.~Ib\'a\~nez, D.~Anabitarte, I.~Azpeitia, O.~Barrera, A.~Barrutieta, H.~Blanco and
2968
+ F.~Echarte, Self-inspection based reproduction in cellular automata, in
2969
+ \emph{Advances in Artificial Life (ECAL 1995)}, LNCS 929, 564 (1995).
2970
 
2971
+ \bibitem{MangeEtAl1998}
2972
+ D.~Mange, E.~Sanchez, A.~Stauffer, G.~Tempesti, P.~Marchal and C.~Piguet,
2973
+ Embryonics: A new methodology for designing field-programmable gate arrays with
2974
+ self-repair and self-replicating properties, \emph{IEEE Trans. VLSI Syst.}
2975
+ \textbf{6}, 387 (1998).
2976
 
2977
+ \bibitem{DurbeckMacias2001}
2978
+ L.~J.~K. Durbeck and N.~J. Macias, The Cell Matrix: an architecture for
2979
+ nanocomputing, \emph{Nanotechnology} \textbf{12}, 217 (2001).
 
2980
 
2981
+ \bibitem{Ray1991}
2982
+ T.~S. Ray, An approach to the synthesis of life, in \emph{Artificial Life II},
2983
+ edited by C.~G. Langton et al. (Addison-Wesley, 1991), 371.
 
2984
 
2985
+ \bibitem{AgueraYArcas2024}
2986
+ B.~Ag\"uera y Arcas, J.~Alakuijala, J.~Evans, B.~Laurie, A.~Mordvintsev,
2987
+ E.~Niklasson, E.~Randazzo and L.~Versari, Computational life: How well-formed,
2988
+ self-replicating programs emerge from simple interaction, arXiv:2406.19108 (2024).
2989
 
2990
+ \bibitem{ChangLipson2018}
2991
+ O.~Chang and H.~Lipson, Neural network quine, in \emph{ALIFE 2018} (MIT Press,
2992
+ 2018), arXiv:1803.05859.
 
2993
 
2994
+ \bibitem{Gabor2022}
2995
+ T.~Gabor, S.~Illium, M.~Zorn, C.~Lenta, A.~Mattausch, L.~Belzner and
2996
+ C.~Linnhoff-Popien, Self-replication in neural networks, \emph{Artif. Life}
2997
+ \textbf{28}, 205 (2022).
2998
 
2999
+ \bibitem{RandazzoVersariMordvintsev2021}
3000
+ E.~Randazzo, L.~Versari and A.~Mordvintsev, Recursively fertile self-replicating
3001
+ neural agents, in \emph{ALIFE 2021} (MIT Press, 2021).
 
3002
 
3003
+ \bibitem{ShvartzmanRam2024}
3004
+ B.~Shvartzman and Y.~Ram, Self-replicating artificial neural networks give rise to
3005
+ universal evolutionary dynamics, \emph{PLoS Comput. Biol.} \textbf{20}, e1012004
3006
+ (2024).
3007
 
3008
+ \bibitem{Schmidgall2021}
3009
+ S.~Schmidgall, Self-replicating neural programs, arXiv:2109.12786 (2021).
 
 
 
3010
 
3011
+ \bibitem{HaDaiLe2017}
3012
+ D.~Ha, A.~M. Dai and Q.~V. Le, HyperNetworks, in \emph{International Conference on
3013
+ Learning Representations} (2017).
 
3014
 
3015
+ \bibitem{Schmidhuber1993}
3016
+ J.~Schmidhuber, A self-referential weight matrix, in \emph{International Conference
3017
+ on Artificial Neural Networks (ICANN 1993)}, 446 (1993).
 
3018
 
3019
+ \bibitem{IrieEtAl2022}
3020
+ K.~Irie, I.~Schlag, R.~Csord\'as and J.~Schmidhuber, A modern self-referential
3021
+ weight matrix that learns to modify itself, in \emph{39th International Conference
3022
+ on Machine Learning}, PMLR 162, 9660 (2022).
3023
 
3024
+ \bibitem{BoldoLelayMelquiond2015}
3025
+ S.~Boldo, C.~Lelay and G.~Melquiond, Coquelicot: A user-friendly library of real
3026
+ analysis for Coq, \emph{Math. Comput. Sci.} \textbf{9}, 41 (2015).
 
 
3027
 
3028
+ \bibitem{Melquiond2008}
3029
+ G.~Melquiond, Proving bounds on real-valued functions with computations, in
3030
+ \emph{IJCAR 2008}, LNCS 5195, 2 (2008).
 
3031
 
3032
+ \bibitem{Norton2026}
3033
+ C.~Norton, threshold-computers: a family of threshold-logic machines, Hugging Face
3034
+ repository (2026), \link{https://huggingface.co/phanerozoic/threshold-computers}.
 
3035
 
3036
  \end{thebibliography}
3037
 
rocq/Assumptions.v CHANGED
@@ -100,6 +100,7 @@ Print Assumptions PhysLev.phys_lev_rows_S.
100
  Print Assumptions Lower.read_needs_two_levels.
101
  Print Assumptions Lower.onehot_needs_two_levels.
102
  Print Assumptions Lower.branch_not_ternary.
 
103
  Print Assumptions Margin.margin.
104
  Print Assumptions Margin.margin_tight.
105
  Print Assumptions Margin.mismatch_all.
 
100
  Print Assumptions Lower.read_needs_two_levels.
101
  Print Assumptions Lower.onehot_needs_two_levels.
102
  Print Assumptions Lower.branch_not_ternary.
103
+ Print Assumptions Lower.branch_unit.
104
  Print Assumptions Margin.margin.
105
  Print Assumptions Margin.margin_tight.
106
  Print Assumptions Margin.mismatch_all.
rocq/Lower.v CHANGED
@@ -210,3 +210,55 @@ Proof.
210
  replace (2 ^ Z.of_nat (n - 1) - 1 - 1 * 2 ^ Z.of_nat (n - 1) <=? 0) with true in H by (symmetry; apply Z.leb_le; lia).
211
  apply Z.leb_le in H. specialize (Hw (n - 1)%nat). lia.
212
  Qed.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
210
  replace (2 ^ Z.of_nat (n - 1) - 1 - 1 * 2 ^ Z.of_nat (n - 1) <=? 0) with true in H by (symmetry; apply Z.leb_le; lia).
211
  apply Z.leb_le in H. specialize (Hw (n - 1)%nat). lia.
212
  Qed.
213
+
214
+ (* ---- Lemma 3.3 --------------------------------------------------------------------------------------------- *)
215
+ (* z(r) = H(-(r_0 + ... + r_(n-1))) *)
216
+ Definition zunit (n : nat) (r : nat -> bool) : bool := zfire n (fun _ => -1) 0 r.
217
+
218
+ Lemma zsum_neg_le : forall r l, zsum (fun _ => -1) r l <= 0.
219
+ Proof. intros r l. induction l as [|i t IH]; cbn [zsum]; [lia|]. destruct (r i); lia. Qed.
220
+
221
+ Lemma zsum_neg : forall r l, Z.leb 0 (zsum (fun _ => -1) r l) = forallb (fun i => negb (r i)) l.
222
+ Proof.
223
+ intros r l. induction l as [|i t IH]; cbn [zsum forallb]; [reflexivity|].
224
+ pose proof (zsum_neg_le r t). destruct (r i); cbn [negb andb].
225
+ - apply Z.leb_gt. lia.
226
+ - rewrite Z.add_0_l. exact IH.
227
+ Qed.
228
+
229
+ Lemma uval_bound : forall r k, 0 <= uval r k < 2 ^ Z.of_nat k.
230
+ Proof.
231
+ intros r k. induction k as [|k IH]; cbn [uval]; [cbn; lia|].
232
+ rewrite Nat2Z.inj_succ, Z.pow_succ_r by lia. destruct (r k); cbn [Z.b2z]; lia.
233
+ Qed.
234
+
235
+ Lemma uval_zero : forall r k, Z.eqb (uval r k) 0 = forallb (fun i => negb (r i)) (seq 0 k).
236
+ Proof.
237
+ intros r k. induction k as [|k IH]; [reflexivity|]. cbn [uval]. rewrite seq_S, forallb_app, <- IH.
238
+ cbn [forallb Nat.add]. pose proof (uval_bound r k) as B.
239
+ assert (P : 0 < 2 ^ Z.of_nat k) by (apply Z.pow_pos_nonneg; lia).
240
+ destruct (r k); cbn [Z.b2z negb andb].
241
+ - rewrite andb_false_r. apply Z.eqb_neq. lia.
242
+ - rewrite andb_true_r, Z.mul_0_l, Z.add_0_r. reflexivity.
243
+ Qed.
244
+
245
+ (* z(r) is 1 exactly when r = 0, and [r <= 0] = H(r_(n-1) + z(r) - 1): the branch takes two ternary units *)
246
+ Theorem branch_unit : forall n r, (1 <= n)%nat ->
247
+ zunit n r = Z.eqb (tval n r) 0 /\ branch n r = Z.leb 0 (Z.b2z (r (n - 1)%nat) + Z.b2z (zunit n r) - 1).
248
+ Proof.
249
+ intros n r Hn.
250
+ assert (Hz : zunit n r = Z.eqb (uval r (n - 1)) 0 && negb (r (n - 1)%nat)).
251
+ { unfold zunit, zfire. rewrite Z.add_0_r, zsum_neg.
252
+ replace (seq 0 n) with (seq 0 (n - 1) ++ [(n - 1)%nat])
253
+ by (replace n with (S (n - 1)) at 3 by lia; rewrite seq_S; reflexivity).
254
+ rewrite forallb_app, <- uval_zero. cbn [forallb]. rewrite andb_true_r. reflexivity. }
255
+ unfold branch, tval. rewrite Hz. pose proof (uval_bound r (n - 1)) as B.
256
+ assert (P : 0 < 2 ^ Z.of_nat (n - 1)) by (apply Z.pow_pos_nonneg; lia).
257
+ set (u := uval r (n - 1)) in *.
258
+ destruct (r (n - 1)%nat); cbn [negb]; rewrite ?andb_false_r, ?andb_true_r; cbn [Z.b2z].
259
+ - split; [symmetry; apply Z.eqb_neq; lia|].
260
+ rewrite (proj2 (Z.leb_le (u - 1 * 2 ^ Z.of_nat (n - 1)) 0)) by lia. reflexivity.
261
+ - replace (u - 0 * 2 ^ Z.of_nat (n - 1)) with u by lia. split; [reflexivity|].
262
+ destruct (Z.eqb_spec u 0) as [E|E]; cbn [Z.b2z]; [rewrite E; reflexivity|].
263
+ rewrite (proj2 (Z.leb_gt u 0)) by lia. reflexivity.
264
+ Qed.