# Finite witness modulo 1331 [MagicResearch/Certificate1331.lean](../../../../../../MagicResearch/Certificate1331.lean) formalizes the supplied witness for the isolated coupled equations of class `I0:0000/0101/0110`. Its only explicit import is the merged `MagicResearch.Center` from trunk `c49c47b`. The proof uses the standard Lean 4.33.1 release. The selected Mathlib closure at `0df444a360eaa60ab8c11dca51a86af692955474` is unnecessary for this module. [Witness data](https://api.imd.fun/artifacts/cb555848a431bd451859429e8bbf4dc39a72a50096199da282b9a54e03acbb0b) · [Mathlib closure reference](https://api.imd.fun/artifacts/28eca342e4d3a8a3880f6e8767e93703f2eedb21c99508d495083e3b97d37e28) ## Theorem contract All names below are in `MagicResearch.Certificate1331`. - `exists_certificate : ∃ p q r : GaussianPair, IsCertificate p q r` packages the explicit witness `((1090, 22), (1090, 22), (122, 1243))`. The concrete theorem `witness` proves the same conjunction at those pairs by kernel reduction with `decide`. - `IsCertificate` requires that the three norms be 1 modulo 1331. It computes `V_c` as the imaginary coordinate of the product with exponent vector `2J[:,c]` and checks `(V₀,V₁,V₂,V₃) = (88,1111,1023,132)`. With `s = (-V₀,V₁,V₂,V₃)` it checks `s₂ ≡ s₀+s₁` and `s₃ ≡ s₀−s₁` modulo 1331, in edge order `(2,3)`. It also checks `11 ∣ V_c` and `V_c % 121 ≠ 0` at all four columns. For each of the six unordered pairs it requires that both the difference and sum be nonzero modulo 1331. - `conj_inverse` proves for any integer pair of norm one modulo 1331 that multiplying it by its conjugate in either order gives `(1,0)`. The signed power definition uses repeated complex pair multiplication and takes powers of the conjugate for negative exponents. An independent Python calculation multiplied the factors as ordinary integer pairs and reduced each full column product modulo 1331. It gave the following values. | Column | Doubled exponents in row order `p,q,r` | Product pair | Imaginary residue mod 121 | | --- | --- | --- | --- | | 0 | `(-2,-2,-2)` | `(122,88)` | 88 | | 1 | `(-4,2,2)` | `(1090,1111)` | 22 | | 2 | `(-4,-2,2)` | `(485,1023)` | 55 | | 3 | `(-4,2,-2)` | `(606,132)` | 11 | The unreduced norms were `(1188584,1188584,1559933)`, and the signed residuals were `(0,1331)`. The least nonnegative representatives up to sign were `(88,220,308,132)`. The witness shows that this isolated local system admits simultaneous 11-adic valuation exactly one at all four offsets. The existence of an integral grid remains open on Left to Solve. Rome and Yamagishi prove existence for orders at least four and discuss the order-three problem in their introduction. [Left to Solve statement and activity](https://lefttosolve.com/p/MagicSquares.exists_magic_square_squares) · [Rome and Yamagishi, *On the existence of magic squares of powers*](https://link.springer.com/article/10.1007/s40993-025-00671-5) ## Reproducible preparation Run from the repository root. The references are for inspection and are independent of compilation. ```sh set -eu scratch="$PWD/test/scratch/finite-witness" mkdir -p "$scratch/refs" ( cd "$scratch" curl -fLsS --retry 2 \ https://github.com/leanprover/lean4/releases/download/v4.33.1/lean-4.33.1-linux.tar.zst \ -o lean-4.33.1-linux.tar.zst test "$(wc -c < lean-4.33.1-linux.tar.zst)" -eq 570405234 sha256sum -c <<'HASHES' 890afd185370f85666025b883914ab4f4b339136f8c96167b69cfb62aecaf235 lean-4.33.1-linux.tar.zst HASHES tar --no-same-owner --zstd -xf lean-4.33.1-linux.tar.zst lean-4.33.1-linux/bin/lean --version curl -fLsS https://api.imd.fun/artifacts/cb555848a431bd451859429e8bbf4dc39a72a50096199da282b9a54e03acbb0b \ -o refs/witness curl -fLsS https://api.imd.fun/artifacts/28eca342e4d3a8a3880f6e8767e93703f2eedb21c99508d495083e3b97d37e28 \ -o refs/mathlib sha256sum -c <<'HASHES' cb555848a431bd451859429e8bbf4dc39a72a50096199da282b9a54e03acbb0b refs/witness 28eca342e4d3a8a3880f6e8767e93703f2eedb21c99508d495083e3b97d37e28 refs/mathlib HASHES ) ``` All three hashes and the archive size matched. The bundled compiler reported Lean 4.33.1, release commit `819816b2e0a3bf405af45ae5c7af2491d8f5bee6`. ## Offline compilation and replay Run from the repository root after preparation. All compiled project files go into the scratch directory. ```sh set -eu scratch="$PWD/test/scratch/finite-witness" export PATH="$scratch/lean-4.33.1-linux/bin:$PATH" export LEAN_PATH="$scratch/offline-olean" mkdir -p "$LEAN_PATH/MagicResearch" lean -DwarningAsError=true -o "$LEAN_PATH/MagicResearch/Center.olean" MagicResearch/Center.lean lean -DwarningAsError=true -o "$LEAN_PATH/MagicResearch/Certificate1331.olean" MagicResearch/Certificate1331.lean leanchecker -v MagicResearch.Certificate1331 lean -DwarningAsError=true --stdin <<'LEAN' import MagicResearch.Certificate1331 #print axioms MagicResearch.Certificate1331.GaussianPair #print axioms MagicResearch.Certificate1331.modulus #print axioms MagicResearch.Certificate1331.mul #print axioms MagicResearch.Certificate1331.conj #print axioms MagicResearch.Certificate1331.norm #print axioms MagicResearch.Certificate1331.conj_inverse #print axioms MagicResearch.Certificate1331.pow #print axioms MagicResearch.Certificate1331.column #print axioms MagicResearch.Certificate1331.imag #print axioms MagicResearch.Certificate1331.IsCertificate #print axioms MagicResearch.Certificate1331.witness #print axioms MagicResearch.Certificate1331.exists_certificate LEAN ``` Both compilations exited 0 with warnings treated as errors. The bundled checker printed `replaying MagicResearch.Certificate1331` and exited 0. The full sequence also exited 0 with the Linux `socket` syscall blocked using a seccomp filter. The axiom audit reported the following dependencies. | Declarations | Reported axioms | | --- | --- | | `GaussianPair`, `modulus`, `mul`, `conj`, `norm`, `pow` | None | | `column`, `imag`, `IsCertificate`, `conj_inverse`, `witness`, `exists_certificate` | `[propext]` | The first archive extraction returned exit 2 when restoring archive ownership. Re-extraction with `--no-same-owner` succeeded. The first Lean compile flagged two unsolved additive cancellations at `MagicResearch/Certificate1331.lean:23:46` and `:25:47`. Both were closed with explicit core integer lemmas. A replay attempt without the release binaries on `PATH` failed to find the checker’s child `lean` process. The commands above supply that path. An attempt to trace network syscalls with `strace` was denied by the sandbox, so the offline run used the seccomp socket filter. The checkout’s Git metadata is read-only. `git add -- MagicResearch/Certificate1331.lean` failed to create `.git/index.lock` and exited 128. The source remains in the checkout, and the Markdown result is untracked for upload.