File size: 14,777 Bytes
2fca478
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
import OAI.Geometry.PinnedDistances.ArithmeticContradiction

namespace OAI

universe u1 u2 u3 u4 u5 u6 u7 u8 u9 u10 u11

section
noncomputable section
namespace WeakPinned
open Filter
open scoped Topology BigOperators

/-- Diagonalized extraction of genuine configurations. The errors tend to zero
and vertex numbers tend to infinity. -/
theorem graph_sequence_of_failure (hfail : ¬ MainStatement) :
    ∃ c s γ : ℝ, 0<c ∧ c<γ ∧ γ<s ∧ s<1 ∧ 0<Theta s ∧
      ∃ (P : ℕ → Finset Plane) (C : ∀ j, Finset (P j)),
        (∀ j, j<(C j).card) ∧
        ∀ j, PreparedGraph (C j) ((planarFibers (P j) s).Active (cutoff s (P j).card) (C j))
          (coreGraph (P j) s (C j)) (Theta s) γ c (Theta s/(j+2)) := by
  classical
  obtain ⟨c,s,γ,hc,hc3,hcs,hs,hcγ,hγs,hct,hθ⟩ := extremal_parameters hfail
  have hcrit := critical_le_one hfail
  have hsc : (1-c)*criticalExponent<s := (le_max_right _ _).trans_lt hcs
  have hc1 : c<1 := by linarith
  have hγ0 : 0<γ := hc.trans hcγ
  have hex (j : ℕ) := arbitrarily_large_graph hfail hγ0 hγs hc hc1 hsc hct
    (Theta s/(j+2)) (div_pos hθ (by positivity)) j
  choose P C hC hG using hex
  exact ⟨c,s,γ,hc,hcγ,hγs,hs.trans_le hcrit,hθ,P,C,hC,hG⟩

lemma graph_card_tendsto {P : ℕ → Finset Plane} {C : ∀ j, Finset (P j)}
    (hC : ∀ j, j<(C j).card) : Tendsto (fun j => (C j).card) atTop atTop :=
  tendsto_atTop_mono (fun j => (hC j).le) tendsto_id

lemma graph_error_tendsto (θ : ℝ) : Tendsto (fun j : ℕ => θ/((j:ℝ)+2)) atTop (𝓝 0) := by
  have ht : Tendsto (fun j : ℕ => (j:ℝ)+2) atTop atTop := tendsto_atTop_add_const_right _ _ tendsto_natCast_atTop_atTop
  exact tendsto_const_nhds.div_atTop ht

end WeakPinned

/- Algebraic representation of the finite rational polynomial pattern of a
   real configuration in a number field. -/

noncomputable section

namespace WeakPinned.Transfer
open MvPolynomial

/-- A system of rational polynomial equations with a complex solution has an
    algebraic solution. No finite set assumption on the equations is needed. -/
theorem equations {ι : Type u1} [Finite ι]
    (S : Set (MvPolynomial ι ℚ)) (x : ι → ℂ)
    (hx : ∀ p ∈ S, aeval x p = 0) :
    ∃ y : ι → AlgebraicClosure ℚ, ∀ p ∈ S, aeval y p = 0 := by
  let I : Ideal (MvPolynomial ι ℚ) := vanishingIdeal ℚ {x}
  have hI : I ≠ ⊤ := by
    intro h
    have h1 : (1 : MvPolynomial ι ℚ) ∈ I := by rw [h]; trivial
    have hz := (mem_vanishingIdeal_singleton_iff x 1).mp h1
    simp at hz
  obtain ⟨M, hM, hIM⟩ := Ideal.exists_le_maximal I hI
  obtain ⟨y, hy⟩ := eq_vanishingIdeal_singleton_of_isMaximal (AlgebraicClosure ℚ) hM
  refine ⟨y, fun p hp => ?_⟩
  apply (mem_vanishingIdeal_singleton_iff y p).mp
  rw [← hy]
  exact hIM ((mem_vanishingIdeal_singleton_iff x p).mpr (hx p hp))

/-- Simultaneous equations and finitely many inequations transfer to algebraic
    coordinates. The inverse-variable equation enforces every inequation. -/
theorem equations_and_inequations {ι : Type u2} [Finite ι]
    (S : Set (MvPolynomial ι ℚ)) (T : Finset (MvPolynomial ι ℚ)) (x : ι → ℂ)
    (hx : ∀ p ∈ S, aeval x p = 0) (hT : ∀ p ∈ T, aeval x p ≠ 0) :
    ∃ y : ι → AlgebraicClosure ℚ,
      (∀ p ∈ S, aeval y p = 0) ∧ (∀ p ∈ T, aeval y p ≠ 0) := by
  let q : MvPolynomial ι ℚ := ∏ p ∈ T, p
  let r : MvPolynomial (Option ι) ℚ := X none * rename some q - 1
  let S' : Set (MvPolynomial (Option ι) ℚ) := (rename some) '' S ∪ {r}
  let x' : Option ι → ℂ := fun j => j.elim (aeval x q)⁻¹ x
  have hq : aeval x q ≠ 0 := by
    simpa [q] using Finset.prod_ne_zero_iff.mpr hT
  have hl (p : MvPolynomial ι ℚ) : aeval x' (rename some p) = aeval x p := by
    simp [aeval_rename, Function.comp_def, x']
  have hx' : ∀ p ∈ S', aeval x' p = 0 := by
    intro p hp
    rcases hp with ⟨p, hp, rfl⟩ | rfl
    · rw [hl]
      exact hx p hp
    · simp [r, hl, x', hq]
  obtain ⟨y', hy'⟩ := equations S' x' hx'
  let y : ι → AlgebraicClosure ℚ := fun i => y' (some i)
  have hl' (p : MvPolynomial ι ℚ) : aeval y' (rename some p) = aeval y p := by
    simp [aeval_rename, Function.comp_def, y]
  refine ⟨y, ?_, ?_⟩
  · intro p hp
    rw [← hl']
    exact hy' _ (Or.inl ⟨p, hp, rfl⟩)
  · have hr := hy' r (Or.inr rfl)
    have hq' : aeval y q ≠ 0 := by
      intro hz
      simp [r, hl', hz] at hr
    have hprod : (∏ p ∈ T, aeval y p) ≠ 0 := by simpa [q] using hq'
    exact Finset.prod_ne_zero_iff.mp hprod

/-- The algebraic realization lies in a single number field generated by its
    finitely many coordinates. The field is not fixed in advance. -/
theorem numberField_pattern {ι : Type u3} [Finite ι]
    (S : Set (MvPolynomial ι ℚ)) (T : Finset (MvPolynomial ι ℚ)) (x : ι → ℂ)
    (hx : ∀ p ∈ S, aeval x p = 0) (hT : ∀ p ∈ T, aeval x p ≠ 0) :
    ∃ K : IntermediateField ℚ (AlgebraicClosure ℚ), NumberField K ∧
      ∃ y : ι → K, (∀ p ∈ S, aeval y p = 0) ∧ (∀ p ∈ T, aeval y p ≠ 0) := by
  obtain ⟨y, hy, hTy⟩ := equations_and_inequations S T x hx hT
  let K := IntermediateField.adjoin ℚ (Set.range y)
  have : Finite (Set.range y) := (Set.finite_range y).to_subtype
  have : Algebra.IsAlgebraic ℚ (AlgebraicClosure ℚ) := AlgebraicClosure.isAlgebraic ℚ
  have : Algebra.IsIntegral ℚ (AlgebraicClosure ℚ) := Algebra.IsAlgebraic.isIntegral
  have hfd : FiniteDimensional ℚ K :=
    IntermediateField.finiteDimensional_adjoin (fun z _ => Algebra.IsIntegral.isIntegral z)
  have hnf : NumberField K := { to_charZero := inferInstance, to_finiteDimensional := hfd }
  let z : ι → K := fun i => ⟨y i, IntermediateField.subset_adjoin ℚ (Set.range y) ⟨i, rfl⟩⟩
  have he (p : MvPolynomial ι ℚ) : K.val (aeval z p) = aeval y p :=
    comp_aeval_apply z K.val p
  refine ⟨K, hnf, z, ?_, ?_⟩
  · intro p hp
    apply K.val.injective
    change K.val (aeval z p) = K.val 0
    rw [he, map_zero, hy p hp]
  · intro p hp hz
    apply hTy p hp
    rw [← he, hz, map_zero]

/-- Preservation of an arbitrary finite zero-pattern, simultaneously, in one
    number field. In particular this preserves all selected equalities exactly. -/
theorem numberField_zero_pattern {ι : Type u4} [Finite ι]
    (T : Finset (MvPolynomial ι ℚ)) (x : ι → ℂ) :
    ∃ K : IntermediateField ℚ (AlgebraicClosure ℚ), NumberField K ∧
      ∃ y : ι → K, ∀ p ∈ T, aeval y p = 0 ↔ aeval x p = 0 := by
  classical
  let S : Set (MvPolynomial ι ℚ) := {p | p ∈ T ∧ aeval x p = 0}
  let U := T.filter (fun p => aeval x p ≠ 0)
  obtain ⟨K, hK, y, hy, hUy⟩ := numberField_pattern S U x
    (fun _ hp => hp.2) (fun p hp => (Finset.mem_filter.mp hp).2)
  refine ⟨K, hK, y, fun p hp => ⟨?_, ?_⟩⟩
  · intro h
    by_contra h'
    exact hUy p (Finset.mem_filter.mpr ⟨hp, h'⟩) h
  · intro h
    exact hy p ⟨hp, h⟩

abbrev Plane := EuclideanSpace ℝ (Fin 2)

/-- Complexified variables; the extra variable forces a square root of -1
    into the field, so every archimedean place is complex. -/
abbrev Variables (ι : Type u5) := Option (Bool × ι)

def secondCoord (b : Bool) (z : Plane) : ℂ :=
  if b then ⟨z 0, -z 1⟩ else ⟨z 0, z 1⟩

def complexAssignment {ι : Type u6} (x : ι → Plane) : Variables ι → ℂ :=
  fun j => j.elim Complex.I (fun bi => secondCoord bi.1 (x bi.2))

def distancePoly {ι : Type u7} (a b : ι) : MvPolynomial (Variables ι) ℚ :=
  (X (some (false, a)) - X (some (false, b))) *
  (X (some (true, a)) - X (some (true, b)))

lemma eval_distancePoly {ι : Type u8} (x : ι → Plane) (a b : ι) :
    aeval (complexAssignment x) (distancePoly a b) = ((dist (x a) (x b)) ^ 2 : ℝ) := by
  simp only [distancePoly, map_mul, map_sub, aeval_X, complexAssignment,
    Option.elim_some, secondCoord, Bool.false_eq_true, reduceIte]
  rw [EuclideanSpace.dist_sq_eq]
  simp only [Fin.sum_univ_two, Real.dist_eq, sq_abs]
  apply Complex.ext <;> simp [-Complex.ofReal_pow] <;> ring

/-- Every finite real planar configuration has a faithful number-field model
    for BOTH distance factors. The real configuration is not restricted or
    replaced: the exact equality pattern of ALL its distances is retained.
    The factorization at every place does not require conjugacy in the new field. -/
theorem planar_factor_model {ι : Type u9} [Finite ι]
    (x : ι → Plane) (hx : Function.Injective x) :
    ∃ K : IntermediateField ℚ (AlgebraicClosure ℚ), NumberField K ∧
      ∃ (ii : K) (Z₁ Z₂ : ι → K), ii ^ 2 = -1 ∧
        Function.Injective Z₁ ∧ Function.Injective Z₂ ∧
        ∀ a b c d, (Z₁ a - Z₁ b) * (Z₂ a - Z₂ b) =
          (Z₁ c - Z₁ d) * (Z₂ c - Z₂ d) ↔ dist (x a) (x b) = dist (x c) (x d) := by
  classical
  let := Fintype.ofFinite ι
  let D := @distancePoly ι
  let root : MvPolynomial (Variables ι) ℚ := X none ^ 2 + 1
  let pairs := Finset.univ.image (fun t : ι × ι => D t.1 t.2)
  let quadruples := Finset.univ.image (fun t : (ι × ι) × (ι × ι) =>
    D t.1.1 t.1.2 - D t.2.1 t.2.2)
  let T := pairs ∪ quadruples ∪ {root}
  obtain ⟨K, hK, y, hy⟩ := numberField_zero_pattern T (complexAssignment x)
  let Z₁ : ι → K := fun a => y (some (false, a))
  let Z₂ : ι → K := fun a => y (some (true, a))
  have he (a b : ι) : aeval y (D a b) = (Z₁ a - Z₁ b) * (Z₂ a - Z₂ b) := by
    simp [D, distancePoly, Z₁, Z₂]
  have hp (a b : ι) : D a b ∈ T := by
    apply Finset.mem_union.mpr
    left
    apply Finset.mem_union.mpr
    left
    exact Finset.mem_image.mpr ⟨(a,b), Finset.mem_univ _, rfl⟩
  have h0 (a b : ι) : (Z₁ a - Z₁ b) * (Z₂ a - Z₂ b) = 0 ↔ a = b := by
    rw [← he, hy _ (hp a b), eval_distancePoly]
    simp [hx.eq_iff]
  have hdist (a b c d : ι) : D a b - D c d ∈ T := by
    apply Finset.mem_union.mpr
    left
    apply Finset.mem_union.mpr
    right
    exact Finset.mem_image.mpr ⟨((a,b),(c,d)), Finset.mem_univ _, rfl⟩
  have hroot : y none ^ 2 + 1 = 0 := by
    have hm : root ∈ T := Finset.mem_union.mpr (Or.inr (Finset.mem_singleton_self _))
    have hc : aeval (complexAssignment x) root = 0 := by
      simp [root, complexAssignment, Complex.I_sq]
    simpa [root] using (hy root hm).mpr hc
  refine ⟨K, hK, y none, Z₁, Z₂, eq_neg_of_add_eq_zero_left hroot, ?_, ?_, ?_⟩
  · intro a b hab
    apply (h0 a b).mp
    rw [hab, sub_self, zero_mul]
  · intro a b hab
    apply (h0 a b).mp
    rw [hab, sub_self, mul_zero]
  · intro a b c d
    rw [← he, ← he]
    have h := hy _ (hdist a b c d)
    rw [map_sub, sub_eq_zero, map_sub, sub_eq_zero, eval_distancePoly,
      eval_distancePoly, Complex.ofReal_inj] at h
    exact h.trans (sq_eq_sq₀ dist_nonneg dist_nonneg)

end WeakPinned.Transfer

namespace WeakPinned
open scoped BigOperators

/-- The exact arithmetic model for each extracted real graph. No point is
assumed algebraic; the original graph's complete distance-equality pattern
is preserved by the proved finite specialization theorem. -/
theorem core_arithmetic_model (P : Finset Plane) (s : ℝ) (C : Finset P)
    (hne : ∀ e, ((coreGraph P s C).targets e).Nonempty) :
    ∃ K : IntermediateField ℚ (AlgebraicClosure ℚ), NumberField K ∧
      ∃ (ii : K) (Z₁ Z₂ : C → K) (t : (planarFibers P s).Active (cutoff s P.card) C → K),
        ii^2 = -1 ∧ Function.Injective Z₁ ∧ Function.Injective Z₂ ∧
        (∀ e, t e ≠ 0) ∧
        (∀ e y, y ∈ (coreGraph P s C).targets e →
          (Z₁ ((coreGraph P s C).source e)-Z₁ y)*(Z₂ ((coreGraph P s C).source e)-Z₂ y)=t e) ∧
        (∀ a b c d : C, (Z₁ a-Z₁ b)*(Z₂ a-Z₂ b)=(Z₁ c-Z₁ d)*(Z₂ c-Z₂ d) ↔
          dist a.val.val b.val.val=dist c.val.val d.val.val) := by
  classical
  let x : C → Plane := fun a => a.val.val
  have hx : Function.Injective x := Subtype.val_injective.comp Subtype.val_injective
  obtain ⟨K,hK,ii,Z₁,Z₂,hii,h₁,h₂,hpat⟩ := Transfer.planar_factor_model x hx
  choose y hy using hne
  let G := coreGraph P s C
  let t := fun e => (Z₁ (G.source e)-Z₁ (y e))*(Z₂ (G.source e)-Z₂ (y e))
  refine ⟨K,hK,ii,Z₁,Z₂,t,hii,h₁,h₂,?_,?_,hpat⟩
  · intro e
    have hxy : G.source e ≠ y e := by intro he; exact G.no_loop e (he ▸ hy e)
    exact mul_ne_zero (sub_ne_zero.mpr (h₁.ne hxy)) (sub_ne_zero.mpr (h₂.ne hxy))
  · intro e z hz
    apply (hpat _ _ _ _).mpr
    have hz' := (Finset.mem_filter.mp hz).2
    have hy' := (Finset.mem_filter.mp (hy e)).2
    have hzdist := (planar_target_iff P s e.val z.val).mp hz'
    have hydist := (planar_target_iff P s e.val (y e).val).mp hy'
    change dist e.val.val.1 z.val.val=dist e.val.val.1 (y e).val.val
    rw [dist_comm,dist_comm e.val.val.1,hzdist,hydist]

lemma PreparedGraph.targets_nonempty {V : Type u10} {I : Type u11} [Fintype V] [Fintype I] [DecidableEq V]
    {G : Core.Fibers V I} {θ γ c η : ℝ} (h : PreparedGraph V I G θ γ c η) :
    ∀ e, (G.targets e).Nonempty := by
  intro e
  have hn : (0:ℝ)<Fintype.card V := by exact_mod_cast (show 0<Fintype.card V by have := h.card_ge; omega)
  have hh : (0:ℝ)<(G.targets e).card := (Real.rpow_pos_of_pos hn γ).trans (h.fiber e)
  exact Finset.card_pos.mp (by exact_mod_cast hh)

/-- Specialization is available independently for EVERY graph in the genuine
counterexample sequence, over number fields of unrestricted degree. -/
theorem sequence_arithmetic_model (hfail : ¬ MainStatement) :
    ∃ c s γ : ℝ, 0<c ∧ c<γ ∧ γ<s ∧ s<1 ∧ 0<Theta s ∧
      ∃ (P : ℕ → Finset Plane) (C : ∀ j, Finset (P j)),
        (∀ j, j<(C j).card) ∧
        (∀ j, PreparedGraph (C j) ((planarFibers (P j) s).Active (cutoff s (P j).card) (C j))
          (coreGraph (P j) s (C j)) (Theta s) γ c (Theta s/(j+2))) ∧
        ∀ j, ∃ K : IntermediateField ℚ (AlgebraicClosure ℚ), NumberField K ∧
          ∃ (ii : K) (Z₁ Z₂ : C j → K) (t : (planarFibers (P j) s).Active (cutoff s (P j).card) (C j) → K),
            ii^2 = -1 ∧ Function.Injective Z₁ ∧ Function.Injective Z₂ ∧
            (∀ e, t e ≠ 0) ∧
            (∀ e y, y ∈ (coreGraph (P j) s (C j)).targets e →
              (Z₁ ((coreGraph (P j) s (C j)).source e)-Z₁ y)*(Z₂ ((coreGraph (P j) s (C j)).source e)-Z₂ y)=t e) := by
  obtain ⟨c,s,γ,hc,hcγ,hγs,hs,hθ,P,C,hC,hG⟩ := graph_sequence_of_failure hfail
  refine ⟨c,s,γ,hc,hcγ,hγs,hs,hθ,P,C,hC,hG,?_⟩
  intro j
  obtain ⟨K,hK,ii,Z₁,Z₂,t,hii,h₁,h₂,ht,hfiber,_⟩ :=
    core_arithmetic_model (P j) s (C j) (hG j).targets_nonempty
  exact ⟨K,hK,ii,Z₁,Z₂,t,hii,h₁,h₂,ht,hfiber⟩

end WeakPinned

end
end
end

end OAI