Skip to content

Research: 平方剰余障害・ψ 型障害・対合上限・有限否定証明書の Lean 化(既知の障害の形式化) - #6

Draft
betyourluck wants to merge 6 commits into
AwakeningOS:mainfrom
betyourluck:luna/p001-jacobi-obstruction
Draft

betyourluck wants to merge 6 commits into
AwakeningOS:mainfrom
betyourluck:luna/p001-jacobi-obstruction

Conversation

@betyourluck

@betyourluck betyourluck commented Oct 5, 2026 •

Copy link
Copy Markdown

Outcasts #27 までの「反例探し」($u=1 \to 2 \to 3$ と動かす)を一度止め、失敗の構造を分類する方針に切り替えた最初の部品です。
ここで形式化しているのは既知の障害で、新しい結果ではありません。Schinzel・Yamamoto(1965)に始まり、Elsholtz–Tao(arXiv:1107.1010)Proposition 1.6「奇数の平方数には Type I / II の解がない」として整理されている平方剰余の障害を、Dahan(arXiv:2608.24035)Theorem 3.9(ii) の正規形($s \mid ap+u$、$s \equiv -1 \pmod{4au}$)に書き直したものです。存在については何も言いません。

出典の状態(2026-10-10 追記): Elsholtz–Tao は査読済み(J. Aust. Math. Soc. 94 (2013) 50–105)。Dahan(arXiv:2608.24035v1、2026-08)は査読前のプレプリントです。この PR で使うのは判定式の形、Lemma 4.2(InvolutionBound で Lean で独立に証明)、Prop 3.13 の数値例だけで、Dahan の検証されていない結果(篩の評価など)には依存しません。

base は main で、P001 の問題ファイルや他 PR のソースには触れていません。研究モジュールなので OutcastsMathLab/Research/ に置きました。作成者はルナ側(Outcasts Neo & ルナ)です。head fc6ed03 までは、境界測量士が Outcasts >>30 で独立レビュー済みです(マージ・採択はしていません)。命題 N の 6 定理(78c557f)は作者しか確認していません。

追加

  • OutcastsMathLab/Research/JacobiObstruction.lean(12 定理。命題 N の 6 定理は 4 回目の push 78c557f で追加)+ Research/JacobiObstruction/README.md
  • OutcastsMathLab/Research/PsiObstruction.lean(5 定理)+ Research/PsiObstruction/README.md
  • OutcastsMathLab/Research/InvolutionBound.lean(6 定理、2 回目の push 843913b で追加)+ Research/InvolutionBound/README.md
  • OutcastsMathLab/Research/DeterministicFailure.lean(一般補題 4 定理)+ OutcastsMathLab/Research/HardPrimes20261005.lean(生成された有限証明書 108 定理)+ Research/DeterministicFailure/README.md・gen_certificates.py(3 回目の push で追加)
  • OutcastsMathLab.lean に import 5 行

JacobiObstruction: 証人は $p$ を $s$ の非剰余にする

DivisorWitness p a u s := s ∣ a*p+u ∧ 4*a*u ∣ s+1(研究ブランチの同名の定義と同じ形)。

定理 内容
jacobi_eq_one_of_dvd_succ $a>0$、$4a \mid s+1$ なら $J(a,\vert, s)=1$($a$ の 2 冪部分は $\chi_8$、奇数部分は相互法則)
witness_jacobi_eq_neg_one 証人があれば $J(p ,\vert, s) = -1$
no_witness_of_square 平方数 $m^2$ には、どの $(a,u,s)$ でも証人がない(Elsholtz–Tao Prop 1.6 の Type II の場合)
no_witness_of_mod_eq_one $p \equiv 1 \pmod s$ なら $s$ はどの $(a,u)$ でも証人にならない
finite_witnesses_miss_infinitely_many_primes 有限集合 $S$ の証人 $(a,u,s)$ に対し、どの $N$ にも $S$ のどれも使えない素数 $p>N$ がある($p \equiv 1 \pmod{\prod s}$、Mathlib の Dirichlet の定理 Nat.forall_exists_prime_gt_and_modEq)
witness_409 非空虚性: Dahan Prop 3.13 の $n=409$、$(u,a)=(1,2)$、$s=7$

最後の定理は被覆合同式の障害(Mordell)で、$s$ が $p$ とともに大きくなる証人については何も言いません。本題はそちら側にあります。

追加: 命題 N(78c557f、6 定理) — witness_jacobi_eq_neg_one の系です。

定理 内容
exists_prime_dvd_jacobiSym_eq_neg_one $J(a ,\vert, s) = -1$ なら、$s$ の素因数 $q$ で $J(a ,\vert, q) = -1$ となるものがある
witness_has_nonresidue_prime_factor 命題 N: 証人 $s$ は $J(p ,\vert, q) = -1$ の素因数 $q$ を持つ
no_smooth_witness $p$ が $T$ 以下のどの素数を法としても非剰余でないなら、$T$ 以下の素因数だけからなる証人はない
witness_prime_factor_nonsquare $p$ が素数で $p \equiv 1 \pmod 4$ なら、その $q$ は $p$ を法とする平方非剰余(相互法則)
witness_eleven_nonresidue $s = 11$ が証人なら $p \bmod 11 \in {2,6,7,8,10}$(11 を法とする非剰余)
witness_1009_eleven 非空虚性: $p = 1009$、$(a,u) = (1,3)$、$s = 11$

小さい素数をすべて平方剰余にもつ素数では、証人に必ず大きい素因数が入ります。小さい素因数の情報だけで証人の存在を決める論法は成り立たない、という形で Outcasts の「条件つき独立」の整理に使いました。jacobiSym の数値計算のために Mathlib.Tactic.NormNum.LegendreSymbol を import しています。

PsiObstruction: ψ 型の障害は $u$ を剰余に強制する

$(a,u)$ と $p$ に対して $\psi(q) = J(-au ,\vert, q)$。$ap+u$ の奇素因数がすべて $\ker\psi$ に入ると証人はありません($\psi(-1)=-1$)。有限の失敗の地図で、この型が最多でした。

定理 内容
jacobi_eq_one_of_prime_factors $n \ne 0$ の奇素因数 $q$ がすべて $J(p,\vert,q)=1$ なら、$n$ の奇数の約数すべてで $J(p,\vert,m)=1$
psi_obstruction_forces_residue $p \equiv 1 \pmod 8$、$u>0$、$ap+u$ の奇素因数がすべて $J(p,\vert,q)=1$ なら $J(u,\vert,p)=1$
psi_eq_jacobi 素数 $q \mid ap+u$、$\gcd(a,u)=1$ なら $J(-au,\vert,q)=J(p,\vert,q)$
psi_kernel_forces_residue 上 2 つを合わせた ψ の形
nonresidue_shift_escapes_psi 対偶: $J(u,\vert,p)=-1$ なら $ap+u$ に $\psi(q)\ne 1$ の奇素因数がある(証人の必要条件で、十分条件ではない)

$p$ の素数性は使っていません($p \equiv 1 \pmod 8$ のみ)。

InvolutionBound: Dahan Lemma 4.2(対合による上限)

$M$ に $\equiv -1 \pmod{4m}$ の約数がなければ、$M$ の素因数の剰余集合 $T \subseteq (\mathbb{Z}/4m)^\times$ は $|T| \le \varphi(4m)/2$。対合 $\iota(x) = -x^{-1}$ は、$-1$ が $4m$ を法として平方でないため固定点を持たず、$x, \iota(x) \in T$ なら対応する相異なる素数の積が $M$ を割って $\equiv -1$ になります。これは証人が無いことの必要条件で、Dahan が「素因数の生成する部分群では指数が 2 を超えると破綻する」と述べて置き換えた議論です。

定理 内容
neg_one_ne_sq ZMod (4m) で $x^2 \ne -1$(ZMod 4 に写して decide)
card_le_half_of_fixedPointFree_involution 単射 $\iota$ と、その像に交わらない有限集合 $T$ について $2
iota_injective / iota_ne_self $\iota(x) = -x^{-1}$ は単射で固定点がない
card_le_half_totient_of_no_neg_one_divisor 各元が $M$ の素因数の剰余である任意の $T \subseteq (\mathrm{ZMod},(4m))^\times$ について $2
dahan_involution_bound Lemma 4.2 そのもの(Dahan の $T$ を primeResidues M (4m) として定義)
no_witness_bound 証人条件への特殊化: pair $(a,u)$ に $p$ の証人がなければ、$ap+u$ の素因数の剰余は $(\mathbb{Z}/4au)^\times$ の高々半分

等号の達成($T = \ker\chi$、$\chi(-1) = -1$)は形式化していません。

DeterministicFailure / HardPrimes20261005: 有限否定の証明書

Outcasts #28 で境界測量士が「全候補の不成立は Python の有限照合で、Lean で全否定を形式化したとは述べていない」と区別していた部分の、Lean 側の部品です。$ap+u = \prod q_i^{e_i}$ の因数分解を証明書として与えると、一般補題 mem_subProducts_of_dvd(素数冪の積の約数はすべて部分積 $\prod q_i^{f_i}$、$f_i \le e_i$。核は gcd で証明した dvd_mul_split と Nat.dvd_prime_pow)で約数が有限集合に落ち、(d+1) \bmod 4au \ne 0 を decide で確かめられます(noWitnessCert)。素数性は norm_num。

定理 内容
dvd_mul_split ℕ で $s \mid mn$ なら $s = yz$、$y \mid m$、$z \mid n$
mem_subProducts_of_dvd $\prod q_i^{e_i}$($q_i$ 素数)の約数は subProducts L の元
no_witness_of_cert / no_divisorWitness_of_cert 証明書の健全性: 因数分解 + 素数性 + noWitnessCert = true から $\forall s,\ \lnot,\mathrm{DivisorWitness}\ p\ a\ u\ s$
no_witness_345601_box / no_witness_670849_box(生成) 失敗の地図で箱の全 53 pair($a,u \le 6$ 互いに素 + $u \in {11,13,17,19,23}$、$a \le 6$)が失敗した 2 素数について、全 pair で証人がないことの Lean 証明(pair ごとの 106 定理から)

生成スクリプト gen_certificates.py は Python 側でも全約数を走査して証人がないことを assert しています(Lean とは独立の検査)。箱の外に証人が無いとは言いません(実際にはあります)。

数値の照合(Lean の外)

  • 素数 $p<20000$、$a,u \le 8$ の証人 41,390 件すべてで $J(p,\vert,s)=-1$。
  • 事前登録して走らせた検査: 840 の平方類の素数 $p<10^6$(2,370 個)、$u \in {11,13,17,19,23}$、$a \le 6$ の 71,100 行で、$J(u,\vert,p)=-1$ の 36,750 行に ψ 型の失敗は 0 件($J(u,\vert,p)=+1$ の 34,350 行では 22,370 件)。
  • 同じ地図の失敗 107,627 行すべてで $T \cap \iota(T) = \emptyset$、$|T| \le \varphi(4au)/2$(Lemma 4.2 と整合)。指数型の失敗の 92% は $|T|$ が上限の 0.2 倍以下で、上限が効くのは $\ker\chi$ に収まる QR 型。

検証(ローカル Windows、Lean 4.34.0 / mathlib v4.34.0)

項目 結果
lake build(Research/ の生成物を削除して再コンパイル、78c557f) InvolutionBound Built(17s)、DeterministicFailure Built(22s)、PsiObstruction Built(23s)、JacobiObstruction Built(28s)、HardPrimes20261005 Built(17s)、3770 jobs、終了コード 0、警告なし
#print axioms(23 + 6 定理) すべて propext / Classical.choice / Quot.sound の部分集合(witness_409 は propext のみ、dvd_mul_split は propext / Quot.sound)、sorryAx なし
check_policy.py 7 files 通過
fork CI(upstream の verify.yml は main 宛て PR で動くが、各 push の前に fork で手動実行) 1 回目 5733528: https://github.com/betyourluck/Outcasts-MathLab/actions/runs/37256678976 — 2 ジョブ success、PsiObstruction Built(2.8s)、JacobiObstruction Built(3.5s)、3765 jobs、11 定理の公理はローカルと同一、policy 4 files。2 回目 843913b: https://github.com/betyourluck/Outcasts-MathLab/actions/runs/37263478755 — 2 ジョブ success、InvolutionBound Built(2.1s)、3766 jobs、Build completed successfully、17 定理の #print axioms、policy 5 files。3 回目 fc6ed03: https://github.com/betyourluck/Outcasts-MathLab/actions/runs/37267304124 — 2 ジョブ success、DeterministicFailure Built(1.8s)、HardPrimes20261005 Built(4.5s)、3769 jobs、Build completed successfully、policy 7 files。4 回目 78c557f: https://github.com/betyourluck/Outcasts-MathLab/actions/runs/38023945126 — 2 ジョブ success、5 モジュールすべて Built、3770 jobs、29 定理の公理はローカルと同じく標準の範囲、policy 7 files
git merge-tree PR #4(a51cc44)とは OutcastsMathLab.lean の import 行で衝突する(内容は両方の行を残せばよい)

含まないもの

エルデシュ=シュトラウス方程式の解の存在、Type I の場合、$s$ が $p$ とともに増える証人についての主張、失敗の地図(有限の統計)の Lean 化、Lemma 4.2 の等号達成($T = \ker\chi$)。

🤖 Generated with Claude Code

betyourluck and others added 3 commits October 5, 2026 10:45
…sses

Known obstruction (Schinzel, Yamamoto; Elsholtz-Tao Prop. 1.6), restated in
the normal form of Dahan Thm 3.9(ii): any divisor s of ap+u with
s = -1 (mod 4au) forces J(p|s) = -1. Consequences: perfect squares have no
witness, p = 1 (mod s) rules out s, and no finite set of fixed witnesses
(a,u,s) covers all primes (Dirichlet's theorem from Mathlib).

No existence statement is made; witnesses whose s grows with p are untouched.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
For a Dahan pair (a,u) and p = 1 (mod 8): if every odd prime factor q of
ap+u satisfies J(p|q) = 1 (equivalently J(-au|q) = 1 when gcd(a,u) = 1),
then J(u|p) = 1. Contrapositive: a non-residue shift u always has an odd
prime factor of ap+u outside ker psi. A consequence of quadratic
reciprocity; it does not assert that a witness exists.

Preregistered numeric check (H2'): 36,750 rows with J(u|p) = -1 show no
psi-type failure, against 22,370 among the J(u|p) = +1 rows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Known lemma, not a new result. If M has no divisor s = -1 (mod 4m), the
residues of its prime factors meet each orbit of the fixed-point-free
involution x -> -x^{-1} at most once, so 2|T| <= phi(4m). Fixed-point
freeness comes from -1 not being a square mod 4m (reduce mod 4).
Specialized to Dahan's divisor criterion as no_witness_bound. Equality
attainment (T = ker chi) is not formalized.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@betyourluck betyourluck changed the title Research: 証人条件の平方剰余障害と ψ 型障害の Lean 化(既知の障害の形式化) Research: 証人条件の平方剰余障害・ψ 型障害・対合上限の Lean 化(既知の障害の形式化) Oct 5, 2026
General lemmas: every divisor of a product of prime powers is a
sub-product (dvd_mul_split via gcd, Nat.dvd_prime_pow), so "no divisor s
with 4au | s+1" reduces to a decide-able check over the sub-products;
primality of the factors is discharged by norm_num.

Generated certificates (gen_certificates.py): the two primes 345601 and
670849, which fail every pair of the 53-pair box of the failure atlas,
have no Dahan witness at any of those pairs (106 pair theorems, two box
theorems). Known criterion; no existence claim and nothing outside the box.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@betyourluck betyourluck changed the title Research: 証人条件の平方剰余障害・ψ 型障害・対合上限の Lean 化(既知の障害の形式化) Research: 平方剰余障害・ψ 型障害・対合上限・有限否定証明書の Lean 化(既知の障害の形式化) Oct 5, 2026
betyourluck added a commit to betyourluck/Outcasts-MathLab that referenced this pull request Oct 8, 2026
Pre-registered in 0e7ac68. On 1,985 primes in (5*10^6, 6*10^6) (125,055 rows),
the mean character sign of prime factors 29..997 is -0.0487 against the
prediction -0.0462 from "q divides ap+u with probability 1/(q-1), sign fixed
at (d|q)" (-1.5 SE); none of the 12 most frequent d is beyond 3 SE; and
(-au|q) = (p|q) holds for all 324,013 usable factors (PR AwakeningOS#6 L2 relation).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
betyourluck and others added 2 commits October 10, 2026 13:24
…tion N)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…the PR AwakeningOS#6 notes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant