Finite spaces and maps used by the construction
Lax793645.ConstructionData · concepts/Lax793645/ConstructionData.lean · lax-793645
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Definition
The construction uses binary component matrices on an odd cycle, a quadratic frame at each component, and finite laws of queries at those frames. This module gives the concrete types used by the individual statements. The ambient dimension in the frame coordinates is twice the hyperbolic dimension parameter.
Concept map
Lean source view on GitHub
| 1 | /- |
| 2 | Adapted from OpenAI, openai/math, commit fd4aeeb2ee4fc729c18d98444fed42fd0529eeeb |
| 3 | (Apache-2.0), and the quadratic-frame construction in this submission. |
| 4 | The data have been collected under a public namespace for the paper's statements. |
| 5 | See LICENSE and NOTICE for the source history. |
| 6 | -/ |
| 7 | import Mathlib |
| 8 | |
| 9 | /-! |
| 10 | --- |
| 11 | title: Finite spaces and maps used by the construction |
| 12 | type: definition |
| 13 | --- |
| 14 | The construction uses binary component matrices on an odd cycle, a quadratic frame at |
| 15 | each component, and finite laws of queries at those frames. This module gives the |
| 16 | concrete types used by the individual statements. The ambient dimension in the frame |
| 17 | coordinates is twice the hyperbolic dimension parameter. |
| 18 | -/ |
| 19 | |
| 20 | set_option autoImplicit false |
| 21 | set_option maxHeartbeats 1500000 |
| 22 | |
| 23 | section |
| 24 | namespace Lax793645.ConstructionData.Binary |
| 25 | noncomputable section |
| 26 | namespace HadwigerCounterexample |
| 27 | open scoped BigOperators |
| 28 | open Matrix |
| 29 | abbrev F := ZMod 2 |
| 30 | |
| 31 | abbrev Vec (I : Type) := I → F |
| 32 | |
| 33 | abbrev Mat (I J : Type) := Matrix I J F |
| 34 | |
| 35 | abbrev Space (V : Type) [AddCommGroup V] [Module F V] := Submodule F V |
| 36 | |
| 37 | theorem char_two {V : Type*} [AddCommGroup V] [Module F V] (x : V) : x+x=0 := |
| 38 | ZModModule.add_self x |
| 39 | |
| 40 | section Linear |
| 41 | variable {I J K L R S : Type} [Fintype I] [Fintype J] |
| 42 | def evmat (M : Mat I J) (x : Vec I) (y : Vec J) := dotProduct x (M *ᵥ y) |
| 43 | |
| 44 | def mpair (M : Mat I J) : Mat I J →ₗ[F] F where |
| 45 | toFun A := ∑ i, ∑ j, M i j * A i j |
| 46 | map_add' A B := by simp only [Matrix.add_apply,mul_add,Finset.sum_add_distrib] |
| 47 | map_smul' b A := by |
| 48 | simp only [Matrix.smul_apply, smul_eq_mul,RingHom.id_apply,Finset.mul_sum,mul_left_comm b] |
| 49 | |
| 50 | theorem mpair_comm (M A : Mat I J) : mpair M A = mpair A M := by |
| 51 | dsimp [mpair] |
| 52 | simp only [mul_comm] |
| 53 | |
| 54 | theorem mpair_outer (M : Mat I J) (x : Vec I) (y : Vec J) : |
| 55 | mpair M (vecMulVec x y) = evmat M x y := by |
| 56 | dsimp [mpair,evmat,mulVec,dotProduct,vecMulVec] |
| 57 | simp only [Finset.mul_sum,mul_left_comm] |
| 58 | |
| 59 | /-- Apply frame maps to the two factors of every tensor. -/ |
| 60 | def liftM (P : Mat K I) (Q : Mat L J) : Mat I J →ₗ[F] Mat K L where |
| 61 | toFun A := P* A* Qᵀ |
| 62 | map_add' A B := by rw [Matrix.mul_add,Matrix.add_mul] |
| 63 | map_smul' b A := by simp only [Matrix.mul_smul, Matrix.smul_mul,RingHom.id_apply] |
| 64 | |
| 65 | theorem liftM_def (P : Mat K I) (Q : Mat L J) (A : Mat I J) : |
| 66 | liftM P Q A = P* A* Qᵀ := rfl |
| 67 | |
| 68 | theorem liftM_outer (P : Mat K I) (Q : Mat L J) (x : Vec I) (y : Vec J) : |
| 69 | liftM P Q (vecMulVec x y) = vecMulVec (P *ᵥ x) (Q *ᵥ y) := by |
| 70 | rw [liftM_def,mul_vecMulVec,vecMulVec_mul,vecMul_transpose] |
| 71 | |
| 72 | variable [Fintype K] [Fintype L] |
| 73 | theorem liftM_comp (P : Mat K I) (Q : Mat L J) (P' : Mat R K) (Q' : Mat S L) |
| 74 | (A : Mat I J) : |
| 75 | liftM P' Q' (liftM P Q A) = liftM (P'* P) (Q'* Q) A := by |
| 76 | simp only [liftM_def, Matrix.transpose_mul,Matrix.mul_assoc] |
| 77 | |
| 78 | theorem mpair_liftM (P : Mat K I) (Q : Mat L J) (M : Mat K L) (A : Mat I J) : |
| 79 | mpair M (liftM P Q A) = mpair (liftM Pᵀ Qᵀ M) A := by |
| 80 | |
| 81 | simp only [liftM_def, mpair, transpose_transpose, LinearMap.coe_mk,AddHom.coe_mk, |
| 82 | Matrix.mul_apply, Finset.sum_mul, Finset.mul_sum, transpose_apply] |
| 83 | |
| 84 | conv_lhs => |
| 85 | arg 2 |
| 86 | intro k |
| 87 | rw [Finset.sum_comm] |
| 88 | rw [Finset.sum_comm] |
| 89 | |
| 90 | conv_rhs => rw [Finset.sum_comm] |
| 91 | refine Finset.sum_congr rfl fun j _ => ?_ |
| 92 | conv_lhs => |
| 93 | arg 2 |
| 94 | intro k |
| 95 | rw [Finset.sum_comm] |
| 96 | rw [Finset.sum_comm] |
| 97 | refine Finset.sum_congr rfl fun i _ => ?_ |
| 98 | rw [Finset.sum_comm] |
| 99 | refine Finset.sum_congr rfl fun l _ => Finset.sum_congr rfl fun k _ => ?_ |
| 100 | ring |
| 101 | |
| 102 | theorem mat_left_inv [DecidableEq I] {P : Mat K I} (hp : Function.Injective P.mulVec) : |
| 103 | ∃ Q : Mat I K, Q* P = 1 := by |
| 104 | classical |
| 105 | have hp' : Function.Injective (P.mulVecLin) := hp |
| 106 | obtain ⟨f,hf⟩ := P.mulVecLin.exists_leftInverse_of_injective (LinearMap.ker_eq_bot.mpr hp') |
| 107 | refine ⟨LinearMap.toMatrix' f, ?_⟩ |
| 108 | apply Matrix.toLin'.injective |
| 109 | rw [Matrix.toLin'_mul] |
| 110 | simp only [Matrix.toLin'_one] |
| 111 | change ((LinearMap.toMatrix').symm _) ∘ₗ _ = _ |
| 112 | rw [LinearEquiv.symm_apply_apply] |
| 113 | exact hf |
| 114 | |
| 115 | theorem liftM_inj {P : Mat K I} {Q : Mat L J} (hp : Function.Injective P.mulVec) |
| 116 | (hq : Function.Injective Q.mulVec) : Function.Injective (liftM P Q) := by |
| 117 | classical |
| 118 | obtain ⟨P', hP⟩ := mat_left_inv hp |
| 119 | obtain ⟨Q', hQ⟩ := mat_left_inv hq |
| 120 | intro A B hab |
| 121 | have hh := congrArg (liftM P' Q') hab |
| 122 | rw [liftM_comp,liftM_comp,hP,hQ] at hh |
| 123 | simpa only [liftM_def, Matrix.one_mul, Matrix.transpose_one, |
| 124 | Matrix.mul_one] using hh |
| 125 | |
| 126 | end Linear |
| 127 | end HadwigerCounterexample |
| 128 | end |
| 129 | end Lax793645.ConstructionData.Binary |
| 130 | end |
| 131 | |
| 132 | section |
| 133 | namespace Lax793645.ConstructionData.Binary |
| 134 | noncomputable section |
| 135 | namespace HadwigerCounterexample |
| 136 | open Matrix Module Submodule LinearMap Function |
| 137 | abbrev dim (V : Type) [AddCommGroup V] [Module F V] := finrank F V |
| 138 | |
| 139 | abbrev rk {V W : Type} [AddCommGroup V] [Module F V] |
| 140 | [AddCommGroup W] [Module F W] (f : V →ₗ[F] W) := dim (LinearMap.range f) |
| 141 | |
| 142 | variable {V W U V' : Type} |
| 143 | variable [AddCommGroup V] [Module F V] [AddCommGroup W] [Module F W] |
| 144 | variable [AddCommGroup U] [Module F U] [AddCommGroup V'] [Module F V'] |
| 145 | end HadwigerCounterexample |
| 146 | end |
| 147 | end Lax793645.ConstructionData.Binary |
| 148 | end |
| 149 | |
| 150 | section |
| 151 | namespace Lax793645.ConstructionData.Binary |
| 152 | noncomputable section |
| 153 | namespace HadwigerCounterexample |
| 154 | open Matrix Module LinearMap Function |
| 155 | section Generic |
| 156 | variable {V W U : Type} |
| 157 | [AddCommGroup V] [Module F V] [AddCommGroup W] [Module F W] |
| 158 | [AddCommGroup U] [Module F U] |
| 159 | theorem rk_comp_le_right [FiniteDimensional F W] (f : V →ₗ[F] W) (g : W →ₗ[F] U) : |
| 160 | rk (g ∘ₗ f) ≤ rk f := by |
| 161 | dsimp only [rk]; rw [LinearMap.range_comp] |
| 162 | exact Submodule.finrank_map_le _ _ |
| 163 | |
| 164 | end Generic |
| 165 | variable {I J K : Type} |
| 166 | variable [Fintype I] [Fintype J] |
| 167 | omit [Fintype I] in |
| 168 | theorem rank_cast (P : Mat I J) : P.rank = rk P.mulVecLin := rfl |
| 169 | |
| 170 | abbrev colSp (P : Mat I J) := range P.mulVecLin |
| 171 | |
| 172 | /-- A coordinate set of basis vectors of a subspace arranged as columns. -/ |
| 173 | def pack (S : Space (Vec I)) : Mat I (Fin (dim S)) := |
| 174 | let E : Vec (Fin (dim S)) ≃ₗ[F] S := LinearEquiv.ofFinrankEq (Vec (Fin (dim S))) S (by |
| 175 | rw [finrank_pi]; simp) |
| 176 | LinearMap.toMatrix' (S.subtype ∘ₗ E.toLinearMap) |
| 177 | |
| 178 | theorem pack_eq {S : Space (Vec I)} : |
| 179 | ∃ E : Vec (Fin (dim S)) ≃ₗ[F] S, (pack S).mulVecLin = S.subtype ∘ₗ E.toLinearMap := by |
| 180 | unfold pack |
| 181 | refine ⟨LinearEquiv.ofFinrankEq _ _ (by rw [finrank_pi]; simp),?_⟩ |
| 182 | rw [← toLin'_apply'] |
| 183 | exact LinearEquiv.symm_apply_apply _ _ |
| 184 | |
| 185 | theorem pack_inj (S : Space (Vec I)) : Function.Injective (pack S).mulVec := by |
| 186 | rw [← Matrix.coe_mulVecLin] |
| 187 | obtain ⟨E,he⟩ := pack_eq (S:=S) |
| 188 | rw [he] |
| 189 | exact Subtype.val_injective.comp E.injective |
| 190 | |
| 191 | theorem colSp_pack (S : Space (Vec I)) : colSp (pack S) = S := by |
| 192 | obtain ⟨E,he⟩ := pack_eq (S:=S) |
| 193 | rw [colSp,he,LinearMap.range_comp] |
| 194 | simp |
| 195 | |
| 196 | omit [Fintype I] in |
| 197 | theorem toMat_map [DecidableEq J] (f : Vec J →ₗ[F] Vec I) : |
| 198 | (LinearMap.toMatrix' f).mulVecLin = f := by |
| 199 | rw [← toLin'_apply']; exact LinearEquiv.symm_apply_apply _ _ |
| 200 | |
| 201 | end HadwigerCounterexample |
| 202 | end |
| 203 | end Lax793645.ConstructionData.Binary |
| 204 | end |
| 205 | |
| 206 | section |
| 207 | namespace Lax793645.ConstructionData.Frames |
| 208 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 209 | open Matrix Submodule Module |
| 210 | open scoped BigOperators |
| 211 | noncomputable section |
| 212 | variable {S T : Type} [Fintype S] [Fintype T] |
| 213 | /-- A base-coordinate slice of a vector in the product coordinate space. -/ |
| 214 | def selectorSlice (i : T) : Vec (S × T) →ₗ[F] Vec S where |
| 215 | toFun x a := x (a,i) |
| 216 | map_add' _ _ := rfl |
| 217 | map_smul' _ _ := rfl |
| 218 | |
| 219 | end |
| 220 | end Lax793645.ConstructionData.Frames |
| 221 | end |
| 222 | |
| 223 | section |
| 224 | namespace Lax793645.ConstructionData.Frames.CycleGeometry |
| 225 | open scoped BigOperators |
| 226 | noncomputable section |
| 227 | abbrev Tag := Fin |
| 228 | |
| 229 | abbrev Comp (g : ℕ) := |
| 230 | {e : Tag g × Tag g // e.1 < e.2 ∧ (SimpleGraph.cycleGraph g).Adj e.1 e.2} |
| 231 | |
| 232 | def degree (g : ℕ) := min 2 (g-1) |
| 233 | |
| 234 | def edge {g : ℕ} (l d : Tag g) (h : (SimpleGraph.cycleGraph g).Adj l d) : Comp g := |
| 235 | if hl : l < d then ⟨(l,d),hl,h⟩ else |
| 236 | ⟨(d,l),lt_of_le_of_ne (le_of_not_gt hl) h.ne.symm,h.symm⟩ |
| 237 | |
| 238 | theorem edge_eq {g : ℕ} {l d : Tag g} (h : l < d) |
| 239 | (ha : (SimpleGraph.cycleGraph g).Adj l d) : edge l d ha=⟨(l,d),h,ha⟩ := by |
| 240 | simp [edge,h] |
| 241 | |
| 242 | theorem edge_symm {g : ℕ} {l d : Tag g} (h : (SimpleGraph.cycleGraph g).Adj l d) : |
| 243 | edge l d h=edge d l h.symm := by |
| 244 | rcases lt_or_gt_of_ne h.ne with e|e |
| 245 | · simp [edge,e,not_lt.mpr e.le] |
| 246 | · simp [edge,e,not_lt.mpr e.le] |
| 247 | |
| 248 | def inc {g : ℕ} (e : Comp g) (l : Tag g) := e.val.1=l ∨ e.val.2=l |
| 249 | |
| 250 | theorem inc_edge_iff {g : ℕ} {l d x : Tag g} (h : (SimpleGraph.cycleGraph g).Adj l d) : |
| 251 | inc (edge l d h) x ↔ l=x ∨ d=x := by |
| 252 | by_cases e : l< d <;> simp [inc,edge,e,or_comm] |
| 253 | |
| 254 | def next {g : ℕ} (l : Tag g) : Tag g := |
| 255 | ⟨(l.val+1)%g,Nat.mod_lt _ (by have := l.isLt; omega)⟩ |
| 256 | |
| 257 | theorem next_eq_add {g : ℕ} [NeZero g] (l : Tag g) : next l=l+1 := by |
| 258 | apply Fin.ext |
| 259 | simp [next,Fin.val_add,Nat.add_mod_mod] |
| 260 | |
| 261 | theorem adjacent_next {g : ℕ} (hg : 2≤ g) (l : Tag g) : |
| 262 | (SimpleGraph.cycleGraph g).Adj l (next l) := by |
| 263 | rcases g with _|_|k |
| 264 | · omega |
| 265 | · omega |
| 266 | rw [next_eq_add,SimpleGraph.cycleGraph_adj] |
| 267 | exact Or.inr (add_sub_cancel_left l 1) |
| 268 | |
| 269 | def forward {g : ℕ} (hg : 2≤ g) (l : Tag g) : Comp g := edge l (next l) (adjacent_next hg l) |
| 270 | |
| 271 | theorem inc_forward {g : ℕ} (hg : 2≤ g) (l t : Tag g) : |
| 272 | inc (forward hg l) t ↔ l=t ∨ next l=t := inc_edge_iff _ |
| 273 | |
| 274 | theorem forward_injective {g : ℕ} (hg : 3≤ g) : Function.Injective (forward (by omega : 2≤ g)) := by |
| 275 | have : NeZero g := ⟨by omega⟩ |
| 276 | intro l d he |
| 277 | have h1 : inc (forward (by omega : 2≤ g) d) l := by |
| 278 | rw [←he]; exact (inc_forward _ _ _).mpr (Or.inl rfl) |
| 279 | have h2 : inc (forward (by omega : 2≤ g) d) (next l) := by |
| 280 | rw [←he]; exact (inc_forward _ _ _).mpr (Or.inr rfl) |
| 281 | rcases (inc_forward _ _ _).mp h1 with h|h |
| 282 | · exact h.symm |
| 283 | rcases (inc_forward _ _ _).mp h2 with h'|h' |
| 284 | · simp only [next_eq_add] at h h' |
| 285 | have hx : d+1+1=d := by rw [h,←h'] |
| 286 | have hx' : d+(1+1)=d+0 := by simpa only [add_assoc,add_zero] using hx |
| 287 | have hz := congrArg Fin.val (add_left_cancel hx') |
| 288 | change (1%g+1%g)%g=0 at hz |
| 289 | rw [Nat.mod_eq_of_lt (by omega : 1< g),Nat.mod_eq_of_lt (by omega : 1+1< g)] at hz |
| 290 | omega |
| 291 | simp only [next_eq_add] at h' |
| 292 | exact add_right_cancel h'.symm |
| 293 | |
| 294 | theorem forward_surjective {g : ℕ} (hg : 2≤ g) : Function.Surjective (forward hg) := by |
| 295 | rcases g with _|_|k |
| 296 | · omega |
| 297 | · omega |
| 298 | rintro ⟨⟨l,d⟩,hlt,ha⟩ |
| 299 | rcases SimpleGraph.cycleGraph_adj.mp ha with h|h |
| 300 | · have hd : next d=l := by rw [next_eq_add]; simpa only [add_comm] using (sub_eq_iff_eq_add.mp h).symm |
| 301 | refine ⟨d,?_⟩ |
| 302 | unfold forward |
| 303 | simp only [hd] |
| 304 | rw [edge_symm,edge_eq hlt] |
| 305 | · have hl : next l=d := by rw [next_eq_add]; simpa only [add_comm] using (sub_eq_iff_eq_add.mp h).symm |
| 306 | refine ⟨l,?_⟩ |
| 307 | unfold forward |
| 308 | simp only [hl] |
| 309 | rw [edge_eq hlt] |
| 310 | |
| 311 | def forwardEquiv {g : ℕ} (hg : 3≤ g) : Tag g ≃ Comp g := |
| 312 | Equiv.ofBijective (forward (by omega : 2≤ g)) |
| 313 | ⟨forward_injective hg,forward_surjective (by omega)⟩ |
| 314 | |
| 315 | /-- A total outgoing projection, including the empty one-tag geometry. -/ |
| 316 | def outgoingMap {g : ℕ} {V : Type*} [AddCommGroup V] [Module (ZMod 2) V] |
| 317 | (l : Tag g) : (Comp g → V) →ₗ[ZMod 2] V := |
| 318 | if hg : 2≤ g then LinearMap.proj (forward hg l) else 0 |
| 319 | |
| 320 | /-- The starting vertex of an edge in the matching obtained by deleting t. -/ |
| 321 | def matchingVertex {g : ℕ} (t : Tag g) (i : Fin ((g-1)/2)) : Tag g := |
| 322 | ⟨2* i.val+1,by have := i.isLt; omega⟩+t |
| 323 | |
| 324 | def matchingMap {g : ℕ} {V : Type*} [AddCommGroup V] [Module (ZMod 2) V] |
| 325 | (t : Tag g) : (Comp g → V) →ₗ[ZMod 2] V := |
| 326 | ∑ i : Fin ((g-1)/2),outgoingMap (matchingVertex t i) |
| 327 | |
| 328 | end |
| 329 | end Lax793645.ConstructionData.Frames.CycleGeometry |
| 330 | end |
| 331 | |
| 332 | section |
| 333 | namespace Lax793645.ConstructionData.Binary |
| 334 | noncomputable section |
| 335 | namespace HadwigerCounterexample |
| 336 | abbrev Tag := Fin |
| 337 | |
| 338 | abbrev Comp := Lax793645.ConstructionData.Frames.CycleGeometry.Comp |
| 339 | |
| 340 | abbrev tagDegree := Lax793645.ConstructionData.Frames.CycleGeometry.degree |
| 341 | |
| 342 | def inc {g : ℕ} (e : Comp g) (l : Tag g) := e.val.1=l ∨ e.val.2=l |
| 343 | |
| 344 | instance {g : ℕ} (e : Comp g) (l : Tag g) : Decidable (inc e l) := |
| 345 | inferInstanceAs (Decidable (_ ∨ _)) |
| 346 | |
| 347 | abbrev TagStar {g : ℕ} (l : Tag g) := {e : Comp g // inc e l} |
| 348 | |
| 349 | variable {g : ℕ} |
| 350 | /-- A private ordinary block belongs only to its owner. Empty degenerate |
| 351 | geometries retain no ordinary block. -/ |
| 352 | def allowed (d l : Tag g) := 1< g ∧ d=l |
| 353 | |
| 354 | end HadwigerCounterexample |
| 355 | end |
| 356 | end Lax793645.ConstructionData.Binary |
| 357 | end |
| 358 | |
| 359 | section |
| 360 | namespace Lax793645.ConstructionData.Binary |
| 361 | noncomputable section |
| 362 | namespace HadwigerCounterexample |
| 363 | open scoped BigOperators |
| 364 | open Matrix Finset |
| 365 | /-- Construction parameters that affect dimensions (except n,N). j = selector degree; |
| 366 | r = number of ordered tester pairs in a tester. J, h mix and channel indices. -/ |
| 367 | structure Shape where |
| 368 | g : ℕ |
| 369 | b : ℕ |
| 370 | j : ℕ |
| 371 | J : ℕ |
| 372 | r : ℕ |
| 373 | h : ℕ |
| 374 | |
| 375 | abbrev Block (g : ℕ) := (Tag g × Tag g) ⊕ Fin 3 |
| 376 | |
| 377 | namespace Block |
| 378 | variable {g : ℕ} |
| 379 | abbrev O (d t : Tag g) : Block g := .inl (d,t) |
| 380 | |
| 381 | abbrev S : Block g := .inr 0 |
| 382 | |
| 383 | abbrev sharp : Block g := .inr 1 |
| 384 | |
| 385 | abbrev Z : Block g := .inr 2 |
| 386 | |
| 387 | end Block |
| 388 | abbrev BaseIdx (g n : ℕ) := Block g × Fin n |
| 389 | |
| 390 | abbrev Base (g n : ℕ) := Vec (BaseIdx g n) |
| 391 | |
| 392 | abbrev AIdx (g n : ℕ) := Option (BaseIdx g n) |
| 393 | |
| 394 | abbrev Label (b : ℕ) := Vec (Fin b) |
| 395 | |
| 396 | abbrev SelIdx (b j : ℕ) := { m : Finset (Fin b) // m.card ≤ j } |
| 397 | |
| 398 | abbrev Row (p : Shape) (n : ℕ) := SelIdx p.b p.j × AIdx p.g n |
| 399 | |
| 400 | abbrev Ray (p : Shape) (n : ℕ) := Vec (Row p n) |
| 401 | |
| 402 | abbrev Moment (p : Shape) (n : ℕ) := Mat (Row p n) (Row p n) |
| 403 | |
| 404 | def psize (p : Shape) := Fintype.card (SelIdx p.b p.j) |
| 405 | |
| 406 | def emptySel {b j} : SelIdx b j := ⟨∅,by simp⟩ |
| 407 | |
| 408 | def selV {b} (j) (s : Label b) : Vec (SelIdx b j) := fun x => ∏ i ∈ x.val, s i |
| 409 | |
| 410 | def baseV {g n} (z : Base g n) : Vec (AIdx g n) := Option.elim' 1 z |
| 411 | |
| 412 | variable (p : Shape) |
| 413 | variable {n : ℕ} |
| 414 | /-- Embedding of the affine coordinate space at a fixed label. -/ |
| 415 | def putLab (n : ℕ) (s : Label p.b) : Vec (AIdx p.g n) →ₗ[F] Ray p n where |
| 416 | toFun z r := selV p.j s r.1 * z r.2 |
| 417 | map_add' z w := by ext; simp only [Pi.add_apply,mul_add] |
| 418 | map_smul' b z := by ext; simp only [Pi.smul_apply,RingHom.id_apply,smul_eq_mul]; ring |
| 419 | |
| 420 | def point (s : Label p.b) (z : Base p.g n) : Ray p n := putLab p n s (baseV z) |
| 421 | |
| 422 | def mom (s : Label p.b) (z : Base p.g n) : Moment p n := vecMulVec (point p s z) (point p s z) |
| 423 | |
| 424 | /-- O-blocks disallowed at l are set to zero. -/ |
| 425 | def allows {g n} (l : Tag g) (z : Base g n) := |
| 426 | ∀ d t : Tag g, ¬ allowed d l → ∀ i : Fin n, z (Block.O d t,i) = 0 |
| 427 | |
| 428 | def Wtag (n : ℕ) (l : Tag p.g) : Space (Moment p n) := |
| 429 | Submodule.span F {m | ∃ s z, allows l z ∧ m = mom p s z} |
| 430 | |
| 431 | variable {p} |
| 432 | /-- Cut profiles in the direct sum over unordered components. -/ |
| 433 | abbrev Profile (p : Shape) (n : ℕ) := Comp p.g → Moment p n |
| 434 | |
| 435 | def cut (p : Shape) (n : ℕ) : (Tag p.g → Moment p n) →ₗ[F] Profile p n where |
| 436 | toFun w e := w e.val.1 + w e.val.2 |
| 437 | map_add' w w' := by |
| 438 | funext e |
| 439 | simp only [Pi.add_apply] |
| 440 | ac_rfl |
| 441 | map_smul' b w := by funext; simp only [Pi.smul_apply, RingHom.id_apply, smul_add] |
| 442 | |
| 443 | def Xspace (p : Shape) (n : ℕ) : Space (Profile p n) := |
| 444 | (Submodule.pi Set.univ (fun l => Wtag p n l)).map (cut p n) |
| 445 | |
| 446 | /-- Single star atoms as profiles in ambient coordinates. -/ |
| 447 | def atom (p : Shape) (l : Tag p.g) (s : Label p.b) (z : Base p.g n) : Profile p n := |
| 448 | cut p n (Pi.single l (mom p s z)) |
| 449 | |
| 450 | end HadwigerCounterexample |
| 451 | end |
| 452 | end Lax793645.ConstructionData.Binary |
| 453 | end |
| 454 | |
| 455 | section |
| 456 | namespace Lax793645.ConstructionData.Frames |
| 457 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 458 | open Matrix Submodule |
| 459 | open scoped BigOperators |
| 460 | noncomputable section |
| 461 | variable {S T : Type} [Fintype S] [Fintype T] |
| 462 | def tensorRay (s : Vec S) (t : Vec T) : Vec (S × T) := fun x => s x.1* t x.2 |
| 463 | |
| 464 | def affineTensorSpace (εS : Vec S) (εT : Vec T) : Space (Mat (S × T) (S × T)) := |
| 465 | Submodule.span F {w | ∃ s t, dotProduct εS s=1 ∧ dotProduct εT t=1 ∧ |
| 466 | w=vecMulVec (tensorRay s t) (tensorRay s t)} |
| 467 | |
| 468 | structure TensorIdentities (εS : Vec S) (εT : Vec T) |
| 469 | (w : Mat (S × T) (S × T)) : Prop where |
| 470 | selector_sym : ∀ a b i j, w (a,i) (b,j)=w (b,i) (a,j) |
| 471 | base_sym : ∀ a b i j, w (a,i) (b,j)=w (a,j) (b,i) |
| 472 | selector_diag : ∀ a i j, w (a,i) (a,j)=∑ b, εS b* w (a,i) (b,j) |
| 473 | base_diag : ∀ a b i, w (a,i) (b,i)=∑ j, εT j* w (a,i) (b,j) |
| 474 | |
| 475 | end |
| 476 | end Lax793645.ConstructionData.Frames |
| 477 | end |
| 478 | |
| 479 | section |
| 480 | namespace Lax793645.ConstructionData.Binary |
| 481 | noncomputable section |
| 482 | namespace HadwigerCounterexample |
| 483 | open scoped BigOperators |
| 484 | open Matrix Finset |
| 485 | variable {b : ℕ} |
| 486 | def monoBit (s : Label b) (S : Finset (Fin b)) := ∏ i ∈ S, s i |
| 487 | |
| 488 | variable {p : Shape} {n : ℕ} |
| 489 | def labMat (p : Shape) (n) (s : Label p.b) : |
| 490 | Mat (Row p n) (AIdx p.g n) := |
| 491 | Matrix.of (fun v i => if v.2=i then monoBit s v.1.val else 0) |
| 492 | |
| 493 | end HadwigerCounterexample |
| 494 | end |
| 495 | end Lax793645.ConstructionData.Binary |
| 496 | end |
| 497 | |
| 498 | section |
| 499 | namespace Lax793645.ConstructionData.Binary |
| 500 | noncomputable section |
| 501 | namespace HadwigerCounterexample |
| 502 | open Matrix |
| 503 | open scoped BigOperators |
| 504 | theorem mpair_add {I J : Type} [Fintype I] [Fintype J] (A B M : Mat I J) : |
| 505 | mpair (A+B) M = mpair A M + mpair B M := by rw [mpair_comm,map_add,mpair_comm M,mpair_comm M] |
| 506 | |
| 507 | theorem mpair_smul {I J : Type} [Fintype I] [Fintype J] (b : F) (A M : Mat I J) : |
| 508 | mpair (b • A) M = b * mpair A M := by rw [mpair_comm,map_smul,mpair_comm M, smul_eq_mul] |
| 509 | |
| 510 | variable (p : Shape) |
| 511 | def pick (n : ℕ) (u : SelIdx p.b p.j) (d : Block p.g) (i : ℕ) : Ray p n := |
| 512 | if h : i < n then Pi.single (u,some (d,⟨i,h⟩)) 1 else 0 |
| 513 | |
| 514 | def testM (n : ℕ) (d : Block p.g) : Moment p n := |
| 515 | ∑ i : Fin p.r, vecMulVec (pick p n emptySel d (2* i.val)) |
| 516 | (pick p n emptySel d (2* i.val+1)) |
| 517 | |
| 518 | def etab (n) (d : Block p.g) : Moment p n →ₗ[F] F := mpair (testM p n d) |
| 519 | |
| 520 | /-- all O testers. -/ |
| 521 | def etaO (n) : Moment p n →ₗ[F] F := |
| 522 | ∑ (d : Tag p.g), ∑ (t : Tag p.g), etab p n (Block.O d t) |
| 523 | |
| 524 | def eta (n) : Moment p n →ₗ[F] F := etaO p n + etab p n Block.S |
| 525 | |
| 526 | /-- The ordinary functional reads each owner's outgoing cycle component. -/ |
| 527 | def roleT (n : ℕ) (t : Tag p.g) : Profile p n →ₗ[F] F := |
| 528 | ∑ l : Tag p.g, etab p n (Block.O l t) ∘ₗ |
| 529 | Lax793645.ConstructionData.Frames.CycleGeometry.outgoingMap l |
| 530 | |
| 531 | def role (n : ℕ) := ∑ t : Tag p.g, roleT p n t |
| 532 | |
| 533 | /-- The shared functional sums the matching obtained by deleting t. -/ |
| 534 | def sharedT (n : ℕ) (t : Tag p.g) : Profile p n →ₗ[F] F := |
| 535 | etab p n Block.S ∘ₗ Lax793645.ConstructionData.Frames.CycleGeometry.matchingMap t |
| 536 | |
| 537 | def sharpPick (n : ℕ) (a : Fin p.b) (i : Fin n) : Ray p n := |
| 538 | if h : 1 ≤ p.j then pick p n ⟨{a},by simp [h]⟩ Block.sharp i.val else 0 |
| 539 | |
| 540 | def sharpM (n : ℕ) (Y : Fin p.b → Mat (Fin n) (Fin n)) : Moment p n := |
| 541 | ∑ a : Fin p.b, ∑ i : Fin n, ∑ j : Fin n, |
| 542 | Y a i j • (vecMulVec (sharpPick p n a i) (pick p n emptySel Block.sharp j.val) + |
| 543 | vecMulVec (pick p n emptySel Block.sharp i.val) (sharpPick p n a j)) |
| 544 | |
| 545 | def selfM (n) (Y : Fin p.b → Mat (Fin n) (Fin n)) : Moment p n := |
| 546 | ((∑ d : Tag p.g, ∑ t : Tag p.g, testM p n (Block.O d t)) + |
| 547 | testM p n Block.S) + sharpM p n Y |
| 548 | |
| 549 | end HadwigerCounterexample |
| 550 | end |
| 551 | end Lax793645.ConstructionData.Binary |
| 552 | end |
| 553 | |
| 554 | section |
| 555 | namespace Lax793645.ConstructionData.Binary |
| 556 | noncomputable section |
| 557 | namespace HadwigerCounterexample |
| 558 | open Matrix Module Function |
| 559 | open scoped BigOperators |
| 560 | variable {U V I J K T : Type} [Fintype U] [Fintype V] [Fintype I] [Fintype J] |
| 561 | [Fintype K] [Fintype T] |
| 562 | def embedMat [DecidableEq U] (f : I → U) : Mat U I := Matrix.of (fun i j => if i=f j then 1 else 0) |
| 563 | |
| 564 | omit [Fintype U] in |
| 565 | theorem inj_fromCols {A : Mat U I} {B : Mat U J} (hA : Injective A.mulVec) |
| 566 | (hB : Injective B.mulVec) (h : Disjoint (colSp A) (colSp B)) : |
| 567 | Injective (fromCols A B).mulVec := by |
| 568 | rw [← Matrix.coe_mulVecLin,← LinearMap.ker_eq_bot, Matrix.ker_mulVecLin_eq_bot_iff] |
| 569 | intro x hx |
| 570 | let a := fun i => x (Sum.inl i) |
| 571 | let b := fun j => x (Sum.inr j) |
| 572 | rw [fromCols_mulVec] at hx |
| 573 | have he : A*ᵥa=B*ᵥb := add_right_cancel (hx.trans (char_two (B*ᵥb)).symm) |
| 574 | have hi : A*ᵥa ∈ colSp A ⊓ colSp B := |
| 575 | ⟨⟨a,rfl⟩, he.symm ▸ (show B*ᵥb∈colSp B from ⟨b,rfl⟩)⟩ |
| 576 | rw [h.eq_bot] at hi |
| 577 | have hg : A*ᵥa=0 := by simpa using hi |
| 578 | have ha : a=0 := hA (hg.trans (Matrix.mulVec_zero A).symm) |
| 579 | rw [he] at hg |
| 580 | have hb : b=0 := hB (hg.trans (Matrix.mulVec_zero B).symm) |
| 581 | funext i |
| 582 | cases i |
| 583 | · exact congr_fun ha _ |
| 584 | · exact congr_fun hb _ |
| 585 | |
| 586 | end HadwigerCounterexample |
| 587 | end |
| 588 | end Lax793645.ConstructionData.Binary |
| 589 | end |
| 590 | |
| 591 | section |
| 592 | namespace Lax793645.ConstructionData.Binary |
| 593 | noncomputable section |
| 594 | namespace HadwigerCounterexample |
| 595 | open Matrix |
| 596 | open scoped BigOperators |
| 597 | variable {p : Shape} {n : ℕ} |
| 598 | def blockA (p : Shape) (n : ℕ) (B : Block p.g) : Mat (AIdx p.g n) (Fin n) := |
| 599 | embedMat (fun i => some (B,i)) |
| 600 | |
| 601 | def blockRay (p : Shape) (n : ℕ) (s : Label p.b) (B : Block p.g) : Mat (Row p n) (Fin n) := |
| 602 | labMat p n s * blockA p n B |
| 603 | |
| 604 | def pullM {I J V U : Type} [Fintype V] [Fintype U] (P : Mat V I) (Q : Mat U J) : |
| 605 | Mat V U →ₗ[F] Mat I J := liftM Pᵀ Qᵀ |
| 606 | |
| 607 | theorem pullM_def {I J V U : Type} [Fintype V] [Fintype U] (P : Mat V I) |
| 608 | (Q : Mat U J) (M : Mat V U) : pullM P Q M=Pᵀ* M* Q := rfl |
| 609 | |
| 610 | end HadwigerCounterexample |
| 611 | end |
| 612 | end Lax793645.ConstructionData.Binary |
| 613 | end |
| 614 | |
| 615 | section |
| 616 | namespace Lax793645.ConstructionData.Binary |
| 617 | namespace HadwigerMatching |
| 618 | universe u |
| 619 | variable {V : Type u} |
| 620 | /-- A finite matching whose edges are pairwise touching: each member is a |
| 621 | two-vertex clique, and distinct members are disjoint and joined by an edge. -/ |
| 622 | def IsTouchingMatching (G : SimpleGraph V) (M : Finset (Finset V)) : Prop := |
| 623 | (∀ e ∈ M, e.card = 2 ∧ G.IsClique (e : Set V)) ∧ |
| 624 | (∀ e ∈ M, ∀ f ∈ M, e ≠ f → Disjoint e f) ∧ |
| 625 | (∀ e ∈ M, ∀ f ∈ M, e ≠ f → |
| 626 | ∃ v ∈ e, ∃ w ∈ f, G.Adj v w) |
| 627 | |
| 628 | /-- The supremum of the cardinalities of pairwise touching matchings. |
| 629 | For finite vertex types, this supremum is attained. -/ |
| 630 | noncomputable def connectedMatchingNumber (G : SimpleGraph V) : ℕ := |
| 631 | sSup {n : ℕ | ∃ M : Finset (Finset V), IsTouchingMatching G M ∧ M.card = n} |
| 632 | |
| 633 | end HadwigerMatching |
| 634 | end Lax793645.ConstructionData.Binary |
| 635 | end |
| 636 | |
| 637 | section |
| 638 | namespace Lax793645.ConstructionData.Binary |
| 639 | noncomputable section |
| 640 | namespace HadwigerCounterexample |
| 641 | open HadwigerMatching Finset |
| 642 | variable {A V : Type*} |
| 643 | structure Holes (A : Type*) where |
| 644 | rel : A → A → Prop |
| 645 | sym {x y : A} : rel x y → rel y x |
| 646 | irr (x : A) : ¬ rel x x |
| 647 | ntri {x y z : A} : rel x y → rel y z → ¬ rel x z |
| 648 | |
| 649 | namespace Holes |
| 650 | variable (H : Holes A) |
| 651 | def unit (p : A × A) := ¬H.rel p.1 p.2 |
| 652 | |
| 653 | def conflict (p q : A × A) := H.rel p.1 q.1 ∧ H.rel p.1 q.2 ∧ H.rel p.2 q.1 ∧ H.rel p.2 q.2 |
| 654 | |
| 655 | def graph (x : V → A) : SimpleGraph V where |
| 656 | Adj i j := i ≠ j ∧ ¬H.rel (x i) (x j) |
| 657 | symm := ⟨fun _ _ ⟨hne,h⟩ => ⟨hne.symm,fun h' => h (H.sym h')⟩⟩ |
| 658 | loopless := ⟨fun _ h => h.1 rfl⟩ |
| 659 | |
| 660 | end Holes |
| 661 | end HadwigerCounterexample |
| 662 | end |
| 663 | end Lax793645.ConstructionData.Binary |
| 664 | end |
| 665 | |
| 666 | section |
| 667 | namespace Lax793645.ConstructionData.Binary |
| 668 | noncomputable section |
| 669 | namespace HadwigerCounterexample |
| 670 | open Matrix |
| 671 | open scoped BigOperators |
| 672 | structure Mixer (p : Shape) (n : ℕ) where |
| 673 | mixL : Fin p.J → Comp p.g → Comp p.g → Moment p n |
| 674 | mixR : Fin p.J → Comp p.g → Comp p.g → Moment p n |
| 675 | mixM : Fin p.b → Mat (Fin n) (Fin n) |
| 676 | |
| 677 | abbrev Pdual (p : Shape) (n : ℕ) := Profile p n →ₗ[F] F |
| 678 | |
| 679 | def linTensor {V : Type} [AddCommGroup V] [Module F V] (a b : V →ₗ[F] F) : V →ₗ[F] V →ₗ[F] F := |
| 680 | a.smulRight b |
| 681 | |
| 682 | theorem linTensor_val {V : Type} [AddCommGroup V] [Module F V] (a b : V →ₗ[F] F) |
| 683 | (x y : V) : linTensor a b x y = a x * b y := rfl |
| 684 | |
| 685 | variable {p : Shape} {n N : ℕ} |
| 686 | def T0 (p : Shape) (n : ℕ) : Profile p n →ₗ[F] Pdual p n := |
| 687 | linTensor (role p n) (role p n) + |
| 688 | ∑ i : Tag p.g, (linTensor (roleT p n i) (sharedT p n i) + |
| 689 | linTensor (sharedT p n i) (roleT p n i)) |
| 690 | |
| 691 | theorem T0_val (x y : Profile p n) : T0 p n x y = |
| 692 | role p n x * role p n y + |
| 693 | ∑ i : Tag p.g, (roleT p n i x * sharedT p n i y + sharedT p n i x * roleT p n i y) := by |
| 694 | simp only [T0,LinearMap.add_apply,LinearMap.sum_apply,linTensor_val] |
| 695 | |
| 696 | def B1 (m : Mixer p n) : Profile p n →ₗ[F] Pdual p n where |
| 697 | toFun x := { |
| 698 | toFun := fun y => ∑ j, ∑ e, ∑ f, |
| 699 | mpair (x e) (liftM (m.mixL j e f) (m.mixR j e f) (y f)) |
| 700 | map_add' y z := by simp only [Pi.add_apply,map_add, Finset.sum_add_distrib] |
| 701 | map_smul' b y := by simp only [Pi.smul_apply,map_smul,RingHom.id_apply,smul_eq_mul, |
| 702 | Finset.mul_sum] } |
| 703 | map_add' x y := LinearMap.ext fun z => by |
| 704 | simp only [LinearMap.coe_mk,AddHom.coe_mk,LinearMap.add_apply, |
| 705 | Pi.add_apply,mpair_add, Finset.sum_add_distrib] |
| 706 | map_smul' b x := LinearMap.ext fun z => by |
| 707 | simp only [LinearMap.coe_mk,AddHom.coe_mk,LinearMap.smul_apply,RingHom.id_apply, |
| 708 | Pi.smul_apply,mpair_smul,smul_eq_mul, Finset.mul_sum] |
| 709 | |
| 710 | def Tmix (m : Mixer p n) := B1 m + LinearMap.flip (B1 m) |
| 711 | |
| 712 | def Tsym (m : Mixer p n) := T0 p n + Tmix m |
| 713 | |
| 714 | theorem Tsym_val (m : Mixer p n) (x y : Profile p n) : |
| 715 | Tsym m x y = T0 p n x y + (B1 m x y + B1 m y x) := by |
| 716 | change (T0 p n + (B1 m + _)) x y = _ |
| 717 | simp |
| 718 | |
| 719 | theorem T_swap (m : Mixer p n) (x y : Profile p n) : Tsym m x y = Tsym m y x := by |
| 720 | simp only [Tsym_val,T0_val] |
| 721 | refine congrArg₂ (· + ·) (congrArg₂ (· + ·) (mul_comm _ _) |
| 722 | (Finset.sum_congr rfl fun i _ => ?_)) (add_comm _ _) |
| 723 | rw [mul_comm (roleT p n i x),mul_comm (sharedT p n i x),add_comm] |
| 724 | |
| 725 | def grad (m : Mixer p n) (x : Profile p n) := role p n + Tsym m x |
| 726 | |
| 727 | theorem grad_val (m : Mixer p n) (x y : Profile p n) : |
| 728 | grad m x y = role p n y + Tsym m x y := rfl |
| 729 | |
| 730 | abbrev Ambient (p : Shape) (N : ℕ) := Comp p.g → Mat (Fin N) (Fin N) |
| 731 | |
| 732 | end HadwigerCounterexample |
| 733 | end |
| 734 | end Lax793645.ConstructionData.Binary |
| 735 | end |
| 736 | |
| 737 | section |
| 738 | namespace Lax793645.ConstructionData.Binary |
| 739 | noncomputable section |
| 740 | open scoped BigOperators |
| 741 | namespace HadwigerCounterexample |
| 742 | abbrev Wgt (α : Type*) := α → ℝ |
| 743 | |
| 744 | variable {α β : Type*} |
| 745 | /-- Real indicator. -/ |
| 746 | def ind (p : Prop) : ℝ := @ite ℝ p (Classical.propDecidable _) 1 0 |
| 747 | |
| 748 | /-- Total weight. -/ |
| 749 | def tot [Fintype α] (w : Wgt α) : ℝ := ∑ x, w x |
| 750 | |
| 751 | /-- Weighted average (not normalized if the weights are not a probability law). -/ |
| 752 | def avg [Fintype α] (w f : Wgt α) : ℝ := ∑ x, w x * f x |
| 753 | |
| 754 | /-- Weight of an event. -/ |
| 755 | def pr [Fintype α] (w : Wgt α) (p : α → Prop) := avg w (fun x => ind (p x)) |
| 756 | |
| 757 | structure SubLaw [Fintype α] (w : Wgt α) : Prop where |
| 758 | nz (x : α) : 0 ≤ w x |
| 759 | total : tot w ≤ 1 |
| 760 | |
| 761 | structure IsLaw [Fintype α] (w : Wgt α) : Prop where |
| 762 | nz (x : α) : 0 ≤ w x |
| 763 | total : tot w = 1 |
| 764 | |
| 765 | /-- All positive mass is supported on `p`. We use the equivalent contrapositive with |
| 766 | zero mass (and supply nonnegativity wherever we speak of a law). -/ |
| 767 | def carried (w : Wgt α) (p : α → Prop) := ∀ x : α, ¬ p x → w x = 0 |
| 768 | |
| 769 | section Basic |
| 770 | variable [Fintype α] {w v f g : Wgt α} {p q : α → Prop} |
| 771 | end Basic |
| 772 | /-- Restrict weights; * not* renormalized. -/ |
| 773 | def subW (w : Wgt α) (p : α → Prop) := fun x => w x * ind (p x) |
| 774 | |
| 775 | /-- Divide a finite weight function by its total, giving zero if total is zero. -/ |
| 776 | def normW [Fintype α] (w : Wgt α) := fun x => w x / tot w |
| 777 | |
| 778 | def unif [Fintype α] : Wgt α := normW fun _ => 1 |
| 779 | |
| 780 | def unifOn [Fintype α] (p : α → Prop) : Wgt α := normW (fun x => ind (p x)) |
| 781 | |
| 782 | section Restrict |
| 783 | variable [Fintype α] {w : Wgt α} {p : α → Prop} |
| 784 | end Restrict |
| 785 | def pairW (w : Wgt α) (v : Wgt β) : Wgt (α × β) := fun p => w p.1 * v p.2 |
| 786 | |
| 787 | def mixW [Fintype α] (w : Wgt α) (F : α → Wgt β) : Wgt β := fun y => avg w (fun x => F x y) |
| 788 | |
| 789 | def mapW [Fintype α] (w : Wgt α) (f : α → β) : Wgt β := fun y => pr w (fun x => f x = y) |
| 790 | |
| 791 | section Prod |
| 792 | variable [Fintype α] [Fintype β] {w : Wgt α} {v : Wgt β} |
| 793 | end Prod |
| 794 | end HadwigerCounterexample |
| 795 | end |
| 796 | end Lax793645.ConstructionData.Binary |
| 797 | end |
| 798 | |
| 799 | section |
| 800 | namespace Lax793645.ConstructionData.Binary |
| 801 | noncomputable section |
| 802 | open scoped BigOperators |
| 803 | namespace HadwigerCounterexample |
| 804 | variable {ι κ α : Type*} |
| 805 | variable {β : ι → Type*} |
| 806 | def prodW [Fintype ι] (w : ∀ i, Wgt (β i)) : Wgt (∀ i, β i) := fun x => ∏ i, w i (x i) |
| 807 | |
| 808 | section |
| 809 | variable [Fintype ι] [DecidableEq ι] [∀ i, Fintype (β i)] |
| 810 | end |
| 811 | section |
| 812 | variable [Fintype ι] [Fintype κ] [Fintype α] [DecidableEq κ] |
| 813 | end |
| 814 | end HadwigerCounterexample |
| 815 | end |
| 816 | end Lax793645.ConstructionData.Binary |
| 817 | end |
| 818 | |
| 819 | section |
| 820 | namespace Lax793645.ConstructionData.Binary |
| 821 | noncomputable section |
| 822 | namespace HadwigerCounterexample |
| 823 | open scoped BigOperators |
| 824 | variable {A B : Type*} [Fintype A] |
| 825 | def onW (w : Wgt A) (p : A → Prop) := normW (subW w p) |
| 826 | |
| 827 | variable [Fintype B] |
| 828 | end HadwigerCounterexample |
| 829 | end |
| 830 | end Lax793645.ConstructionData.Binary |
| 831 | end |
| 832 | |
| 833 | section |
| 834 | namespace Lax793645.ConstructionData.Binary |
| 835 | noncomputable section |
| 836 | namespace HadwigerCounterexample |
| 837 | open Filter Real |
| 838 | open scoped Topology |
| 839 | def bp (x : ℝ) := (2:ℝ)^x |
| 840 | |
| 841 | variable {ι : Type*} {l : Filter ι} {n f g : ι → ℝ} |
| 842 | namespace ExpSmall |
| 843 | end ExpSmall |
| 844 | end HadwigerCounterexample |
| 845 | end |
| 846 | end Lax793645.ConstructionData.Binary |
| 847 | end |
| 848 | |
| 849 | section |
| 850 | namespace Lax793645.ConstructionData.Binary |
| 851 | noncomputable section |
| 852 | namespace HadwigerCounterexample |
| 853 | open scoped BigOperators |
| 854 | open Matrix Function LinearMap |
| 855 | abbrev num (I : Type) [Fintype I] : ℝ := (Fintype.card I:ℝ) |
| 856 | |
| 857 | variable {I J U : Type} [Fintype I] [Fintype J] [Fintype U] |
| 858 | variable [DecidableEq U] [DecidableEq I] [DecidableEq J] |
| 859 | end HadwigerCounterexample |
| 860 | end |
| 861 | end Lax793645.ConstructionData.Binary |
| 862 | end |
| 863 | |
| 864 | section |
| 865 | namespace Lax793645.ConstructionData.Binary |
| 866 | noncomputable section |
| 867 | namespace HadwigerCounterexample |
| 868 | open scoped BigOperators |
| 869 | variable {A B I : Type} [Fintype A] [Fintype B] |
| 870 | def semi (w : Wgt A) (k : A → Wgt B) : Wgt (A × B) := fun x => w x.1 * k x.1 x.2 |
| 871 | |
| 872 | variable [Fintype I] [DecidableEq I] |
| 873 | end HadwigerCounterexample |
| 874 | end |
| 875 | end Lax793645.ConstructionData.Binary |
| 876 | end |
| 877 | |
| 878 | section |
| 879 | namespace Lax793645.ConstructionData.Binary |
| 880 | noncomputable section |
| 881 | namespace HadwigerCounterexample |
| 882 | open Matrix |
| 883 | open scoped BigOperators |
| 884 | variable {p : Shape} {n N : ℕ} |
| 885 | instance rowDecidableEq (p : Shape) (n : ℕ) : DecidableEq (Row p n) := inferInstance |
| 886 | |
| 887 | abbrev Place (p : Shape) := Comp p.g × Bool |
| 888 | |
| 889 | end HadwigerCounterexample |
| 890 | end |
| 891 | end Lax793645.ConstructionData.Binary |
| 892 | end |
| 893 | |
| 894 | section |
| 895 | namespace Lax793645.ConstructionData.Binary |
| 896 | noncomputable section |
| 897 | namespace HadwigerCounterexample |
| 898 | open Matrix |
| 899 | open scoped BigOperators |
| 900 | variable {p : Shape} {n : ℕ} |
| 901 | def totalRank (x : Profile p n) : ℕ := ∑ i, (x i).rank |
| 902 | |
| 903 | end HadwigerCounterexample |
| 904 | end |
| 905 | end Lax793645.ConstructionData.Binary |
| 906 | end |
| 907 | |
| 908 | section |
| 909 | namespace Lax793645.ConstructionData.Binary |
| 910 | noncomputable section |
| 911 | namespace HadwigerCounterexample |
| 912 | open Matrix LinearMap Submodule Module |
| 913 | open scoped BigOperators |
| 914 | variable {I J K L : Type} [Fintype I] [Fintype J] [Fintype K] [Fintype L] |
| 915 | def box (S : Space (Vec I)) (T : Space (Vec J)) := |
| 916 | LinearMap.range (liftM (pack S) (pack T)) |
| 917 | |
| 918 | theorem pack_mem_iff (v : Vec I) (S : Space (Vec I)) : |
| 919 | v∈S ↔ ∃ x, pack S *ᵥ x=v := by |
| 920 | change _ ↔ v∈colSp (pack S) |
| 921 | rw [colSp_pack] |
| 922 | |
| 923 | theorem evmat_pull (P : Mat K I) (Q : Mat L J) (A : Mat K L) (x : Vec I) (y : Vec J) : |
| 924 | evmat (pullM P Q A) x y=evmat A (P *ᵥ x) (Q *ᵥ y) := by |
| 925 | rw [←mpair_outer,←mpair_outer,← liftM_outer,mpair_liftM]; rfl |
| 926 | |
| 927 | def annih (S : Space (Vec I)) := ker ((pack S)ᵀ.mulVecLin) |
| 928 | |
| 929 | def vanish (S : Space (Vec I)) (T : Space (Vec J)) (M : Mat I J) := |
| 930 | ∀ x ∈ annih S, ∀ y∈ annih T, evmat M x y=0 |
| 931 | |
| 932 | end HadwigerCounterexample |
| 933 | end |
| 934 | end Lax793645.ConstructionData.Binary |
| 935 | end |
| 936 | |
| 937 | section |
| 938 | namespace Lax793645.ConstructionData.Frames |
| 939 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 940 | open Matrix Submodule Module LinearMap |
| 941 | open scoped BigOperators Kronecker |
| 942 | noncomputable section |
| 943 | variable {S T S' T' : Type} [Fintype S] [Fintype T] [Fintype S'] [Fintype T'] |
| 944 | def flattenMatrix : Mat S T ≃ₗ[F] Vec (S × T) where |
| 945 | toFun M x := M x.1 x.2 |
| 946 | invFun x a i := x (a,i) |
| 947 | left_inv _ := rfl |
| 948 | right_inv _ := rfl |
| 949 | map_add' _ _ := rfl |
| 950 | map_smul' _ _ := rfl |
| 951 | |
| 952 | def tensorRectangle (U : Space (Vec S)) (V : Space (Vec T)) : Space (Vec (S × T)) := |
| 953 | (box U V).map flattenMatrix.toLinearMap |
| 954 | |
| 955 | def tensorCross (U : Space (Vec S)) (V : Space (Vec T)) : Space (Vec (S × T)) := |
| 956 | tensorRectangle U ⊤ ⊔ tensorRectangle ⊤ V |
| 957 | |
| 958 | end |
| 959 | end Lax793645.ConstructionData.Frames |
| 960 | end |
| 961 | |
| 962 | section |
| 963 | namespace Lax793645.ConstructionData.Frames |
| 964 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 965 | open Matrix Submodule Module LinearMap |
| 966 | open scoped BigOperators Kronecker |
| 967 | noncomputable section |
| 968 | variable {S T I S' T' : Type} [Fintype S] [Fintype T] [Fintype I] |
| 969 | [Fintype S'] [Fintype T'] |
| 970 | def selectedTensorSpace (s : I → Vec S) (t : I → Vec T) : Space (Vec (S × T)) := |
| 971 | Submodule.span F (Set.range (fun i => tensorRay (s i) (t i))) |
| 972 | |
| 973 | end |
| 974 | end Lax793645.ConstructionData.Frames |
| 975 | end |
| 976 | |
| 977 | section |
| 978 | namespace Lax793645.ConstructionData.Binary |
| 979 | noncomputable section |
| 980 | namespace HadwigerCounterexample |
| 981 | open Matrix Module |
| 982 | open scoped BigOperators |
| 983 | variable {p : Shape} {n N : ℕ} |
| 984 | def onSide {A : Type} (x : A × A) (b : Bool) := if b then x.1 else x.2 |
| 985 | |
| 986 | abbrev Chan (p : Shape) := Fin p.h |
| 987 | |
| 988 | end HadwigerCounterexample |
| 989 | end |
| 990 | end Lax793645.ConstructionData.Binary |
| 991 | end |
| 992 | |
| 993 | section |
| 994 | namespace Lax793645.ConstructionData.Binary |
| 995 | noncomputable section |
| 996 | namespace HadwigerCounterexample |
| 997 | open Matrix |
| 998 | open scoped BigOperators |
| 999 | variable {p : Shape} {n N : ℕ} |
| 1000 | def fee (N : ℕ) (ζ : ℝ) (t : ℕ) := bp (-(1-ζ)* t* N) |
| 1001 | |
| 1002 | end HadwigerCounterexample |
| 1003 | end |
| 1004 | end Lax793645.ConstructionData.Binary |
| 1005 | end |
| 1006 | |
| 1007 | section |
| 1008 | namespace Lax793645.ConstructionData.Binary |
| 1009 | noncomputable section |
| 1010 | namespace HadwigerCounterexample |
| 1011 | open scoped BigOperators |
| 1012 | open Matrix Finset |
| 1013 | variable {I : Type} [Fintype I] |
| 1014 | variable {p : Shape} {n N : ℕ} |
| 1015 | /-- One side of the lists, with actual point inputs, indexed by the |
| 1016 | simultaneous (both units') list positions. Tags passed separately |
| 1017 | because matched across the two sides. -/ |
| 1018 | structure Volley (p : Shape) (n : ℕ) (I : Type) where |
| 1019 | obj : I → Bool |
| 1020 | sel : I → Label p.b |
| 1021 | par : I → Base p.g n |
| 1022 | |
| 1023 | abbrev Tagging (p : Shape) (I : Type) := I → Tag p.g |
| 1024 | |
| 1025 | abbrev AtomKey {p : Shape} (l : Tag p.g) (N : ℕ) := TagStar l → Bool → Vec (Fin N) |
| 1026 | |
| 1027 | namespace Volley |
| 1028 | variable (v : Volley p n I) |
| 1029 | def atomAt (t : Tagging p I) (i) := atom p (t i) (v.sel i) (v.par i) |
| 1030 | |
| 1031 | def rayAt (i) := point p (v.sel i) (v.par i) |
| 1032 | |
| 1033 | /-- List from endpoint j to endpoint k of the other unit. -/ |
| 1034 | def shoots (w : I → Bool) (j k : Bool) := univ.filter (fun i => v.obj i=j ∧ w i=k) |
| 1035 | |
| 1036 | def here (j : Bool) := Finset.univ.filter (fun i => v.obj i=j) |
| 1037 | |
| 1038 | def sumAt (t : Tagging p I) (w : I→ Bool) (j k : Bool) := |
| 1039 | ∑ i∈shoots v w j k, v.atomAt t i |
| 1040 | |
| 1041 | end Volley |
| 1042 | namespace Volley |
| 1043 | variable (v : Volley p n I) |
| 1044 | end Volley |
| 1045 | end HadwigerCounterexample |
| 1046 | end |
| 1047 | end Lax793645.ConstructionData.Binary |
| 1048 | end |
| 1049 | |
| 1050 | section |
| 1051 | namespace Lax793645.ConstructionData.Binary |
| 1052 | noncomputable section |
| 1053 | namespace HadwigerCounterexample |
| 1054 | open Matrix |
| 1055 | open scoped BigOperators |
| 1056 | variable {p : Shape} {n N : ℕ} {I : Type} [Fintype I] |
| 1057 | namespace Volley |
| 1058 | variable (v w : Volley p n I) |
| 1059 | def legal (t : Tagging p I) := ∀ i : I, allows (t i) (v.par i) |
| 1060 | |
| 1061 | def diagonalAt (i : I) := eta p n (mom p (v.sel i) (v.par i)) |
| 1062 | |
| 1063 | end Volley |
| 1064 | end HadwigerCounterexample |
| 1065 | end |
| 1066 | end Lax793645.ConstructionData.Binary |
| 1067 | end |
| 1068 | |
| 1069 | section |
| 1070 | namespace Lax793645.ConstructionData.Binary |
| 1071 | noncomputable section |
| 1072 | namespace HadwigerCounterexample |
| 1073 | open scoped BigOperators |
| 1074 | open Matrix Submodule |
| 1075 | variable {I : Type} [Fintype I] |
| 1076 | /-- Onto projection in coordinates, killing a specified disjoint subspace. -/ |
| 1077 | structure ProjData (S T : Space (Vec I)) (A : Mat I I) : Prop where |
| 1078 | onto (x) : A *ᵥ x ∈ S |
| 1079 | fixes x : x ∈ S → A *ᵥ x=x |
| 1080 | kills x : x∈T → A *ᵥ x=0 |
| 1081 | |
| 1082 | theorem proj_exists (S T : Space (Vec I)) (h : Disjoint S T) : |
| 1083 | ∃ A, ProjData S T A := by |
| 1084 | classical |
| 1085 | obtain ⟨A,hA⟩ := mat_left_inv (inj_fromCols (pack_inj S) (pack_inj T) |
| 1086 | (by rw [colSp_pack, colSp_pack]; exact h)) |
| 1087 | let B := A.toRows₁ |
| 1088 | let C := A.toRows₂ |
| 1089 | have he : fromRows B C * fromCols (pack S) (pack T)=1 := by |
| 1090 | rw [show fromRows B C=A from Matrix.fromRows_toRows A,hA] |
| 1091 | rw [Matrix.fromRows_mul_fromCols, ← Matrix.fromBlocks_one] at he |
| 1092 | have hb : B* pack S=1 := congrArg Matrix.toBlocks₁₁ he |
| 1093 | have hg : B* pack T=0 := congrArg Matrix.toBlocks₁₂ he |
| 1094 | refine ⟨pack S* B,fun x => ?_,fun x hx => ?_,fun x hx => ?_⟩ |
| 1095 | · rw [←mulVec_mulVec] |
| 1096 | exact (pack_mem_iff ..).mpr ⟨_,rfl⟩ |
| 1097 | · obtain ⟨x,rfl⟩ := (pack_mem_iff ..).mp hx |
| 1098 | rw [←mulVec_mulVec, mulVec_mulVec _ B, hb,one_mulVec] |
| 1099 | · obtain ⟨x,rfl⟩ := (pack_mem_iff ..).mp hx |
| 1100 | rw [←mulVec_mulVec,mulVec_mulVec _ B,hg,zero_mulVec,mulVec_zero] |
| 1101 | |
| 1102 | variable {p : Shape} {n : ℕ} |
| 1103 | end HadwigerCounterexample |
| 1104 | end |
| 1105 | end Lax793645.ConstructionData.Binary |
| 1106 | end |
| 1107 | |
| 1108 | section |
| 1109 | namespace Lax793645.ConstructionData.Frames |
| 1110 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 1111 | open Matrix Submodule Module LinearMap |
| 1112 | open scoped BigOperators |
| 1113 | noncomputable section |
| 1114 | variable {p : Shape} {n : ℕ} {I : Type} [Fintype I] |
| 1115 | abbrev CallsAt (v : Volley p n I) (i : Bool) := {j : I // j ∈ v.here i} |
| 1116 | |
| 1117 | end |
| 1118 | end Lax793645.ConstructionData.Frames |
| 1119 | end |
| 1120 | |
| 1121 | section |
| 1122 | namespace Lax793645.ConstructionData.Binary |
| 1123 | noncomputable section |
| 1124 | namespace HadwigerCounterexample |
| 1125 | open Matrix LinearMap Submodule Module |
| 1126 | open scoped BigOperators |
| 1127 | variable {p : Shape} {N : ℕ} |
| 1128 | variable {I J : Type} [Fintype I] [Fintype J] |
| 1129 | noncomputable def prj (S : Space (Vec I)) : Mat I I := |
| 1130 | (proj_exists S ⊥ disjoint_bot_right).choose |
| 1131 | |
| 1132 | variable [DecidableEq I] [DecidableEq J] |
| 1133 | def chop (S : Space (Vec I)) := 1-prj S |
| 1134 | |
| 1135 | abbrev Cov (p : Shape) (N : ℕ) := Place p → Space (Vec (Fin N)) |
| 1136 | |
| 1137 | def cdSign (p : Shape) {N} (S : Cov p N) (i : Bool) := |
| 1138 | ∑ e : Comp p.g,dim (S (e,i)) |
| 1139 | |
| 1140 | def epoch (p : Shape) {N} (x : Ambient p N) := ∑ e : Comp p.g,(x e).rank |
| 1141 | |
| 1142 | def erased (p : Shape) {N} (S : Cov p N) : Ambient p N →ₗ[F] Ambient p N := |
| 1143 | LinearMap.pi (fun i => liftM (chop (S (i,true))) (chop (S (i,false))) ∘ₗ LinearMap.proj i) |
| 1144 | |
| 1145 | def covered (p : Shape) {N} (S : Cov p N) (x : Ambient p N) := |
| 1146 | erased p S x=0 |
| 1147 | |
| 1148 | end HadwigerCounterexample |
| 1149 | end |
| 1150 | end Lax793645.ConstructionData.Binary |
| 1151 | end |
| 1152 | |
| 1153 | section |
| 1154 | namespace Lax793645.ConstructionData.Binary |
| 1155 | noncomputable section |
| 1156 | namespace HadwigerCounterexample |
| 1157 | open scoped BigOperators |
| 1158 | open Finset |
| 1159 | variable {A I : Type} [Fintype A] [Fintype I] [DecidableEq I] |
| 1160 | def draws (I : Type) [Fintype I] (w : Wgt A) : Wgt (I→ A) := prodW (fun _ : I => w) |
| 1161 | |
| 1162 | variable {p : Shape} {N : ℕ} |
| 1163 | end HadwigerCounterexample |
| 1164 | end |
| 1165 | end Lax793645.ConstructionData.Binary |
| 1166 | end |
| 1167 | |
| 1168 | section |
| 1169 | namespace Lax793645.ConstructionData.Binary |
| 1170 | noncomputable section |
| 1171 | namespace HadwigerCounterexample |
| 1172 | open Matrix LinearMap Finset Function |
| 1173 | open scoped BigOperators |
| 1174 | variable {g r n b : ℕ} {p : Shape} |
| 1175 | abbrev Flavor (_g : ℕ) := Option Unit |
| 1176 | |
| 1177 | namespace Flavor |
| 1178 | abbrev full {g : ℕ} : Flavor g := none |
| 1179 | |
| 1180 | def keeps (f : Flavor g) (x : Tag g) (y : Block g) : Prop := |
| 1181 | match f,y with |
| 1182 | | none, .inl (i,_) => allowed i x |
| 1183 | | some _,.inl _ => False |
| 1184 | | _, .inr _ => True |
| 1185 | |
| 1186 | instance (f : Flavor g) (x : Tag g) (y : Block g) : Decidable (keeps f x y) := |
| 1187 | Classical.propDecidable _ |
| 1188 | |
| 1189 | end Flavor |
| 1190 | abbrev Knobs (g n : ℕ) := Block g → Vec (Fin n) |
| 1191 | |
| 1192 | def lit (f : Flavor g) (x : Tag g) (y : Knobs g n) : Base g n := |
| 1193 | fun i => if f.keeps x i.1 then y i.1 i.2 else 0 |
| 1194 | |
| 1195 | def useAtom (p : Shape) {n : ℕ} (x : Tag p.g) (s : Label p.b) (f : Flavor p.g) |
| 1196 | (y : Knobs p.g n) := atom p x s (lit f x y) |
| 1197 | |
| 1198 | abbrev ProbeIdx (g : ℕ) := (Tag g × Tag g)⊕Unit |
| 1199 | |
| 1200 | abbrev Digest (g : ℕ) := Vec (ProbeIdx g) |
| 1201 | |
| 1202 | def asBlock (i : ProbeIdx g) : Block g := i.elim (fun q => Block.O q.1 q.2) (fun _ => Block.S) |
| 1203 | |
| 1204 | def zget (y : Vec (Fin n)) (i : ℕ) := if h:i< n then y ⟨i,h⟩ else 0 |
| 1205 | |
| 1206 | def tested (r : ℕ) (y : Vec (Fin n)) := |
| 1207 | ∑ i : Fin r,zget y (2* i.val)* zget y (2* i.val+1) |
| 1208 | |
| 1209 | def scan (p : Shape) {n} (l : Tag p.g) (f : Flavor p.g) (x : Knobs p.g n) : |
| 1210 | Digest p.g := |
| 1211 | fun i => if Flavor.keeps f l (asBlock i) then tested p.r (x (asBlock i)) else 0 |
| 1212 | |
| 1213 | namespace Digest |
| 1214 | variable (q : Digest g) |
| 1215 | def feasible (l : Tag g) (f : Flavor g) := ∀ i,¬ Flavor.keeps f l (asBlock i) → q i=0 |
| 1216 | |
| 1217 | def diagO := ∑ d : Tag g, ∑ t,q (.inl (d,t)) |
| 1218 | |
| 1219 | def sumBit := q.diagO+q (.inr ()) |
| 1220 | |
| 1221 | end Digest |
| 1222 | def dialed (p : Shape) {n} (l : Tag p.g) (f : Flavor p.g) (x : Knobs p.g n) := |
| 1223 | (scan p l f x).sumBit |
| 1224 | |
| 1225 | def spins (p : Shape) (n : ℕ) : Wgt (Knobs p.g n) := draws (Block p.g) unif |
| 1226 | |
| 1227 | /-- Projection notation for conditioning on a specified (possible) |
| 1228 | diagnostic or diagonal only. -/ |
| 1229 | def scopedBit (p : Shape) (n : ℕ) (l : Tag p.g) (f : Flavor p.g) (q : F) : |
| 1230 | Wgt (Knobs p.g n) := onW (spins p n) (fun x => dialed p l f x=q) |
| 1231 | |
| 1232 | def scopedScan (p : Shape) (n : ℕ) (l : Tag p.g) (f : Flavor p.g) (z : Digest p.g) : |
| 1233 | Wgt (Knobs p.g n) := onW (spins p n) (fun x => scan p l f x=z) |
| 1234 | |
| 1235 | end HadwigerCounterexample |
| 1236 | end |
| 1237 | end Lax793645.ConstructionData.Binary |
| 1238 | end |
| 1239 | |
| 1240 | section |
| 1241 | namespace Lax793645.ConstructionData.Binary |
| 1242 | noncomputable section |
| 1243 | namespace HadwigerCounterexample |
| 1244 | open Matrix LinearMap Module Submodule Finset Function |
| 1245 | open scoped BigOperators |
| 1246 | variable {A B : Type} [Fintype A] [Fintype B] |
| 1247 | variable {I J U : Type} [Fintype I] [Fintype J] [Fintype U] |
| 1248 | variable [DecidableEq I] [DecidableEq J] [DecidableEq U] |
| 1249 | variable {p : Shape} {n N : ℕ} |
| 1250 | abbrev HMat (p : Shape) (N : ℕ) := Mat (Fin N) (Chan p) |
| 1251 | |
| 1252 | abbrev HFrame (p : Shape) (N : ℕ) := HMat p N × HMat p N |
| 1253 | |
| 1254 | abbrev HCube (p : Shape) (N : ℕ) := Comp p.g → HFrame p N |
| 1255 | |
| 1256 | end HadwigerCounterexample |
| 1257 | end |
| 1258 | end Lax793645.ConstructionData.Binary |
| 1259 | end |
| 1260 | |
| 1261 | section |
| 1262 | namespace Lax793645.ConstructionData.Binary |
| 1263 | noncomputable section |
| 1264 | namespace HadwigerCounterexample |
| 1265 | open Matrix LinearMap Module Submodule Finset |
| 1266 | open scoped BigOperators |
| 1267 | variable {p : Shape} {n : ℕ} {I J : Type} [Fintype I] [Fintype J] |
| 1268 | def nbBlock (p : Shape) := Fintype.card (Block p.g) |
| 1269 | |
| 1270 | def ncComp (p : Shape) := Fintype.card (Comp p.g) |
| 1271 | |
| 1272 | def dbits (p : Shape) (T R : ℕ) := ncComp p*2* psize p*(T+R) |
| 1273 | |
| 1274 | def drow (p : Shape) (T R : ℕ) := psize p+psize p*(nbBlock p* dbits p T R) |
| 1275 | |
| 1276 | end HadwigerCounterexample |
| 1277 | end |
| 1278 | end Lax793645.ConstructionData.Binary |
| 1279 | end |
| 1280 | |
| 1281 | section |
| 1282 | namespace Lax793645.ConstructionData.Binary |
| 1283 | noncomputable section |
| 1284 | namespace HadwigerCounterexample |
| 1285 | open scoped BigOperators |
| 1286 | def wsign (x : F) : ℝ := if x = 0 then 1 else -1 |
| 1287 | |
| 1288 | variable {A B V W : Type} [Fintype A] [Fintype B] |
| 1289 | variable [AddCommGroup V] [Module F V] [AddCommGroup W] [Module F W] [Fintype V] [Fintype W] |
| 1290 | end HadwigerCounterexample |
| 1291 | end |
| 1292 | end Lax793645.ConstructionData.Binary |
| 1293 | end |
| 1294 | |
| 1295 | section |
| 1296 | namespace Lax793645.ConstructionData.Binary |
| 1297 | noncomputable section |
| 1298 | namespace HadwigerCounterexample |
| 1299 | open Matrix LinearMap |
| 1300 | open scoped BigOperators |
| 1301 | variable {I J K : Type} [Fintype I] [Fintype J] [Fintype K] |
| 1302 | [DecidableEq I] [DecidableEq J] [DecidableEq K] |
| 1303 | variable (p : Shape) |
| 1304 | def profileA (K : ℕ) := 10*(K+1)* psize p*(p.g* p.g+5) |
| 1305 | |
| 1306 | open Filter |
| 1307 | end HadwigerCounterexample |
| 1308 | end |
| 1309 | end Lax793645.ConstructionData.Binary |
| 1310 | end |
| 1311 | |
| 1312 | section |
| 1313 | namespace Lax793645.ConstructionData.Binary |
| 1314 | noncomputable section |
| 1315 | namespace HadwigerCounterexample |
| 1316 | open Matrix LinearMap Module Submodule Finset |
| 1317 | open scoped BigOperators |
| 1318 | variable {p : Shape} {n N : ℕ} {J K : Type} [Fintype J] [Fintype K] |
| 1319 | abbrev PhasePair (p : Shape) (N : ℕ) := HCube p N × HCube p N |
| 1320 | |
| 1321 | abbrev Party := Vec Bool |
| 1322 | |
| 1323 | def uPhase (p : Shape) {N} (v : HCube p N) : Ambient p N →ₗ[F] F := |
| 1324 | ∑ e : Comp p.g, mpair ((v e).2*(v e).1ᵀ) ∘ₗ LinearMap.proj e |
| 1325 | |
| 1326 | def joinPhase (p : Shape) {N} (v : PhasePair p N) (o : Party) := |
| 1327 | ∑ b : Bool, o b • uPhase p (onSide v b) |
| 1328 | |
| 1329 | variable [DecidableEq J] [DecidableEq K] |
| 1330 | end HadwigerCounterexample |
| 1331 | end |
| 1332 | end Lax793645.ConstructionData.Binary |
| 1333 | end |
| 1334 | |
| 1335 | section |
| 1336 | namespace Lax793645.ConstructionData.Binary |
| 1337 | noncomputable section |
| 1338 | namespace HadwigerCounterexample |
| 1339 | open Matrix LinearMap Module Submodule Finset Function |
| 1340 | open scoped BigOperators |
| 1341 | variable {p : Shape} {r n N : ℕ} |
| 1342 | variable {q t : Place p→ ℕ} {S : Cov p N} |
| 1343 | def unary (i : Bool) : Party := Pi.single i 1 |
| 1344 | |
| 1345 | variable {I J : Type} [Fintype I] [Fintype J] |
| 1346 | end HadwigerCounterexample |
| 1347 | end |
| 1348 | end Lax793645.ConstructionData.Binary |
| 1349 | end |
| 1350 | |
| 1351 | section |
| 1352 | namespace Lax793645.ConstructionData.Binary |
| 1353 | noncomputable section |
| 1354 | namespace HadwigerCounterexample |
| 1355 | open Matrix LinearMap Module Submodule Function Finset |
| 1356 | open scoped BigOperators |
| 1357 | variable {p : Shape} {n N r : ℕ} {T : Cov p N} |
| 1358 | namespace Bazaar |
| 1359 | end Bazaar |
| 1360 | def loseA (_ : Shape) (N x y : ℕ) := bp (-((x:ℝ)+y)* N+0.01* N) |
| 1361 | |
| 1362 | namespace Bazaar |
| 1363 | end Bazaar |
| 1364 | variable {A B V : Type} [Fintype A] [Fintype B] [Fintype V] |
| 1365 | variable [AddCommGroup V] [Module F V] |
| 1366 | end HadwigerCounterexample |
| 1367 | end |
| 1368 | end Lax793645.ConstructionData.Binary |
| 1369 | end |
| 1370 | |
| 1371 | section |
| 1372 | namespace Lax793645.ConstructionData.Binary |
| 1373 | noncomputable section |
| 1374 | namespace HadwigerCounterexample |
| 1375 | open Matrix LinearMap Module Finset |
| 1376 | open scoped BigOperators |
| 1377 | variable {p : Shape} {n N : ℕ} {A : Type} [Fintype A] |
| 1378 | def exponentErr (p : Shape) (m b : ℕ) (c : ℝ) := |
| 1379 | let s := 2^m*(2* b) |
| 1380 | ((2:ℝ)^s*(2:ℝ)^s)* c^b + bp (- (p.h:ℝ)* b/2) |
| 1381 | |
| 1382 | end HadwigerCounterexample |
| 1383 | end |
| 1384 | end Lax793645.ConstructionData.Binary |
| 1385 | end |
| 1386 | |
| 1387 | section |
| 1388 | namespace Lax793645.ConstructionData.Binary |
| 1389 | noncomputable section |
| 1390 | namespace HadwigerCounterexample |
| 1391 | open Matrix LinearMap Module Submodule Function Finset |
| 1392 | open scoped BigOperators |
| 1393 | variable {p : Shape} {n N r : ℕ} |
| 1394 | variable {A : Type} [Fintype A] |
| 1395 | def rhUp (H c : ℝ) := (c/2)⁻¹ * H |
| 1396 | |
| 1397 | namespace Bazaar |
| 1398 | variable {T : Cov p N} |
| 1399 | end Bazaar |
| 1400 | end HadwigerCounterexample |
| 1401 | end |
| 1402 | end Lax793645.ConstructionData.Binary |
| 1403 | end |
| 1404 | |
| 1405 | section |
| 1406 | namespace Lax793645.ConstructionData.Binary |
| 1407 | noncomputable section |
| 1408 | namespace HadwigerCounterexample |
| 1409 | open Matrix LinearMap Module Finset Function |
| 1410 | open scoped BigOperators |
| 1411 | variable {p : Shape} {r n : ℕ} {A I : Type} [Fintype A] [Fintype I] |
| 1412 | variable [DecidableEq I] |
| 1413 | def scanPrice (p : Shape) : ℝ := (1/4)^Fintype.card (ProbeIdx p.g) |
| 1414 | |
| 1415 | def canDial (p : Shape) (l : Tag p.g) (f : Flavor p.g) (q : F) := |
| 1416 | ∃ v : Digest p.g, v.feasible l f ∧ v.sumBit=q |
| 1417 | |
| 1418 | end HadwigerCounterexample |
| 1419 | end |
| 1420 | end Lax793645.ConstructionData.Binary |
| 1421 | end |
| 1422 | |
| 1423 | section |
| 1424 | namespace Lax793645.ConstructionData.Binary |
| 1425 | noncomputable section |
| 1426 | namespace HadwigerCounterexample |
| 1427 | open Matrix Module LinearMap Finset Function |
| 1428 | open scoped BigOperators |
| 1429 | variable {I J G A B : Type} [Fintype I] [Fintype J] [Fintype A] [Fintype B] |
| 1430 | variable {p : Shape} {n N : ℕ} |
| 1431 | abbrev PlusRack (I : Type) (N : ℕ) := Mat (Fin N) I |
| 1432 | |
| 1433 | abbrev Rack (I : Type) (N : ℕ) := PlusRack I N × PlusRack I N |
| 1434 | |
| 1435 | abbrev Route (I G : Type) := I → G |
| 1436 | |
| 1437 | abbrev Port {I G : Type} (f : Route I G) (g : G) := {i:I//f i=g} |
| 1438 | |
| 1439 | variable [Fintype G] |
| 1440 | variable [DecidableEq I] [DecidableEq J] [DecidableEq G] |
| 1441 | variable {f : Route I G} |
| 1442 | abbrev GeoM (f : Route I G) := ∀ i,Mat (Port f i) (Port f i) |
| 1443 | |
| 1444 | end HadwigerCounterexample |
| 1445 | end |
| 1446 | end Lax793645.ConstructionData.Binary |
| 1447 | end |
| 1448 | |
| 1449 | section |
| 1450 | namespace Lax793645.ConstructionData.Binary |
| 1451 | noncomputable section |
| 1452 | namespace HadwigerCounterexample |
| 1453 | open Matrix Module Finset Filter |
| 1454 | open scoped BigOperators |
| 1455 | variable {p : Shape} {n N : ℕ} |
| 1456 | variable {I A B : Type} [Fintype I] [Fintype A] [Fintype B] |
| 1457 | def density (v w : Wgt I) := fun x => w x/v x |
| 1458 | def overlap (v a b : Wgt I) := avg v (fun x => density v a x * density v b x) |
| 1459 | def lsupp (p q : Wgt I) := ∀ x,p x ≠ 0 → q x ≠ 0 |
| 1460 | |
| 1461 | |
| 1462 | namespace Volley |
| 1463 | end Volley |
| 1464 | end HadwigerCounterexample |
| 1465 | end |
| 1466 | end Lax793645.ConstructionData.Binary |
| 1467 | end |
| 1468 | |
| 1469 | section |
| 1470 | namespace Lax793645.ConstructionData.Binary |
| 1471 | noncomputable section |
| 1472 | namespace HadwigerCounterexample |
| 1473 | open scoped BigOperators |
| 1474 | open Matrix Module LinearMap Function |
| 1475 | variable {p : Shape} {n N : ℕ} {I : Type} [Fintype I] [DecidableEq I] |
| 1476 | structure Template (p : Shape) (I : Type) where |
| 1477 | aim : I→ Bool |
| 1478 | t : Tagging p I |
| 1479 | s : I→ Label p.b |
| 1480 | f : I→ Flavor p.g |
| 1481 | |
| 1482 | abbrev Inputs (p : Shape) (n : ℕ) (I : Type) := I → Knobs p.g n |
| 1483 | |
| 1484 | namespace Template |
| 1485 | variable (v : Template p I) |
| 1486 | def draw (y : Inputs p n I) : Volley p n I where |
| 1487 | obj := v.aim |
| 1488 | sel := v.s |
| 1489 | par i := lit (v.f i) (v.t i) (y i) |
| 1490 | |
| 1491 | def state (q : I→ F) (n : ℕ) : Wgt (Inputs p n I) := |
| 1492 | prodW (fun i : I => scopedBit p n (v.t i) (v.f i) (q i)) |
| 1493 | |
| 1494 | end Template |
| 1495 | abbrev KeySlots (p : Shape) (t : Tagging p I) := Σ i, TagStar (t i) |
| 1496 | |
| 1497 | instance keySlotsFintype (t : Tagging p I) : Fintype (KeySlots p t) := by |
| 1498 | classical |
| 1499 | infer_instance |
| 1500 | |
| 1501 | def ownPort (t : Tagging p I) : Route (KeySlots p t) (Comp p.g) := fun x => x.2.val |
| 1502 | |
| 1503 | def ownMap (t : Tagging p I) (q : I→ F) : GeoM (ownPort (p:=p) t) := |
| 1504 | fun _ => Matrix.diagonal (fun i => q i.val.1) |
| 1505 | |
| 1506 | def ownOne (p : Shape) {N : ℕ} (l : Tag p.g) (q : F) (x : AtomKey (p:=p) l N) := |
| 1507 | ∀ i,dotProduct (x i true) (x i false) = q |
| 1508 | |
| 1509 | def lawOmega (p : Shape) (N : ℕ) (l : Tag p.g) (q : F) : |
| 1510 | Wgt (AtomKey (p:=p) l N) := unifOn (ownOne p l q) |
| 1511 | |
| 1512 | end HadwigerCounterexample |
| 1513 | end |
| 1514 | end Lax793645.ConstructionData.Binary |
| 1515 | end |
| 1516 | |
| 1517 | section |
| 1518 | namespace Lax793645.ConstructionData.Binary |
| 1519 | noncomputable section |
| 1520 | namespace HadwigerCounterexample |
| 1521 | open scoped BigOperators |
| 1522 | open Matrix Module LinearMap Submodule Finset Function |
| 1523 | variable {p : Shape} {n N : ℕ} |
| 1524 | variable {I J K A B : Type} [Fintype I] [Fintype J] [Fintype K] |
| 1525 | variable [DecidableEq I] [DecidableEq J] [DecidableEq K] |
| 1526 | def layerPhase (M : Mat I J) (N : ℕ) : |
| 1527 | PlusRack I N →ₗ[F] (PlusRack J N →ₗ[F] F) where |
| 1528 | toFun X := mpair (X* M) |
| 1529 | map_add' X Y := LinearMap.ext fun Z => by rw [Matrix.add_mul,mpair_add,LinearMap.add_apply] |
| 1530 | map_smul' a X := LinearMap.ext fun Z => by rw [Matrix.smul_mul,mpair_smul,LinearMap.smul_apply]; rfl |
| 1531 | |
| 1532 | end HadwigerCounterexample |
| 1533 | end |
| 1534 | end Lax793645.ConstructionData.Binary |
| 1535 | end |
| 1536 | |
| 1537 | section |
| 1538 | namespace Lax793645.ConstructionData.Binary |
| 1539 | noncomputable section |
| 1540 | namespace HadwigerCounterexample |
| 1541 | open Matrix Module LinearMap Function Finset |
| 1542 | open scoped BigOperators |
| 1543 | variable {I J : Type} [Fintype I] [Fintype J] [DecidableEq I] [DecidableEq J] |
| 1544 | {N : ℕ} |
| 1545 | def vectorPhase (x y : Vec I) := wsign (dotProduct x y) |
| 1546 | |
| 1547 | abbrev Rail (I : Type) := Finset (I × I) |
| 1548 | |
| 1549 | variable {E : Rail I} |
| 1550 | def withinRail (M : Mat I I) (E : Rail I) := |
| 1551 | ∀ i j, (i,j)∉ E→ M i j=0 |
| 1552 | |
| 1553 | def crowded (g : Route I J) : Rail I := Finset.univ.filter (fun x => g x.1=g x.2) |
| 1554 | |
| 1555 | end HadwigerCounterexample |
| 1556 | end |
| 1557 | end Lax793645.ConstructionData.Binary |
| 1558 | end |
| 1559 | |
| 1560 | section |
| 1561 | namespace Lax793645.ConstructionData.Binary |
| 1562 | noncomputable section |
| 1563 | namespace HadwigerCounterexample |
| 1564 | open scoped BigOperators |
| 1565 | open Matrix LinearMap Module Submodule Function Finset |
| 1566 | variable {p : Shape} {n N : ℕ} |
| 1567 | variable {I J G : Type} [Fintype I] [Fintype J] [Fintype G] |
| 1568 | variable [DecidableEq I] [DecidableEq J] [DecidableEq G] |
| 1569 | instance knFin (g n : ℕ) : Fintype (Knobs g n) := inferInstanceAs (Fintype (Knobs g n)) |
| 1570 | |
| 1571 | def freePart (p : Shape) {n} (x : Knobs p.g n) := x Block.Z |
| 1572 | |
| 1573 | variable {g : Route I G} |
| 1574 | namespace Template |
| 1575 | variable (v : Template p I) |
| 1576 | end Template |
| 1577 | end HadwigerCounterexample |
| 1578 | end |
| 1579 | end Lax793645.ConstructionData.Binary |
| 1580 | end |
| 1581 | |
| 1582 | section |
| 1583 | namespace Lax793645.ConstructionData.Binary |
| 1584 | noncomputable section |
| 1585 | namespace HadwigerCounterexample |
| 1586 | open Matrix |
| 1587 | open scoped BigOperators |
| 1588 | variable {p : Shape} {n : ℕ} |
| 1589 | abbrev MIdx (p : Shape) := Fin p.J × Comp p.g × Comp p.g |
| 1590 | |
| 1591 | abbrev MOne (p : Shape) := (MIdx p × Bool) |
| 1592 | |
| 1593 | def orderedM (m : Mixer p n) (i : MOne p) : Moment p n := |
| 1594 | if i.2 then m.mixL i.1.1 i.1.2.1 i.1.2.2 else m.mixR i.1.1 i.1.2.1 i.1.2.2 |
| 1595 | |
| 1596 | def eitherM (b : Bool) {I : Type} (A : Mat I I) := if b then A else Aᵀ |
| 1597 | |
| 1598 | def selfSum (m : Mixer p n) (f : Vec Bool) := |
| 1599 | ∑ i : Bool,f i • eitherM i (selfM p n m.mixM) |
| 1600 | |
| 1601 | def blockRank (d : Block p.g) (s t : Label p.b) (A : Moment p n) := |
| 1602 | (pullM (blockRay p n s d) (blockRay p n t d) A).rank |
| 1603 | |
| 1604 | /-- Matrix on a point's v coordinates for Tmix(x,atom_l). -/ |
| 1605 | def qmix (m : Mixer p n) (x : Profile p n) (l : Tag p.g) : Moment p n := |
| 1606 | ∑ j : Fin p.J, ∑ f : TagStar l, ∑ e : Comp p.g, |
| 1607 | (liftM (m.mixL j e f.val)ᵀ (m.mixR j e f.val)ᵀ (x e) + |
| 1608 | liftM (m.mixL j f.val e) (m.mixR j f.val e) (x e)) |
| 1609 | |
| 1610 | def unaryGood (m : Mixer p n) (K s0 : ℕ) := |
| 1611 | ∀ (x : Profile p n) (l : Tag p.g) (s : Label p.b), totalRank x ≤ K → totalRank x > 0 → |
| 1612 | 2*(p.J-s0) ≤ blockRank Block.Z s s (qmix m x l + (qmix m x l)ᵀ) |
| 1613 | |
| 1614 | end HadwigerCounterexample |
| 1615 | end |
| 1616 | end Lax793645.ConstructionData.Binary |
| 1617 | end |
| 1618 | |
| 1619 | section |
| 1620 | namespace Lax793645.ConstructionData.Binary |
| 1621 | noncomputable section |
| 1622 | namespace HadwigerCounterexample |
| 1623 | open Finset Matrix Module Function |
| 1624 | open scoped BigOperators |
| 1625 | variable {I J A : Type} [Fintype I] [DecidableEq I] [Fintype J] [DecidableEq J] [Fintype A] |
| 1626 | def prism (B : J → Type) [∀ i,Fintype (B i)] [∀ i,DecidableEq (B i)] : |
| 1627 | Wgt (∀ i,Vec (B i)) := prodW (fun _ : J => unif) |
| 1628 | |
| 1629 | def wavelength (B : J → Type) [∀ i,Fintype (B i)] [∀ i,DecidableEq (B i)] := |
| 1630 | prism B 0 |
| 1631 | |
| 1632 | end HadwigerCounterexample |
| 1633 | end |
| 1634 | end Lax793645.ConstructionData.Binary |
| 1635 | end |
| 1636 | |
| 1637 | section |
| 1638 | namespace Lax793645.ConstructionData.Binary |
| 1639 | noncomputable section |
| 1640 | namespace HadwigerCounterexample |
| 1641 | open scoped BigOperators |
| 1642 | open Matrix Finset |
| 1643 | variable {p : Shape} {n N : ℕ} {I : Type} [Fintype I] |
| 1644 | /-- list for a cross edge -/ |
| 1645 | def aiming (a b : I → Bool) (i j : Bool) := |
| 1646 | Finset.univ.filter (fun x => a x=i ∧ b x=j) |
| 1647 | |
| 1648 | /-- within-endpoint L/R bit tests. Read only a x=a y, x≠y. |
| 1649 | (tests between ordered points; no double counting since L,R and |
| 1650 | both orientations are in the mixer hypothesis). -/ |
| 1651 | abbrev Script (p : Shape) (I : Type) := I → I → Vec (MOne p) |
| 1652 | |
| 1653 | namespace Volley |
| 1654 | variable (v : Volley p n I) |
| 1655 | def reads (s : Script p I) (m : Mixer p n) := |
| 1656 | ∀ x y : I,x≠y → v.obj x=v.obj y → |
| 1657 | ∀ i : MOne p, s x y i = evmat (orderedM m i) (v.rayAt x) (v.rayAt y) |
| 1658 | |
| 1659 | end Volley |
| 1660 | def prescribedB (p : Shape) (t : Tagging p I) (s : Script p I) (x y : I) := |
| 1661 | ∑ i : Fin p.J,∑ e : Comp p.g, ∑ f : Comp p.g, if inc e (t x) ∧ inc f (t y) then |
| 1662 | s x y ((i,e,f),true)* s x y ((i,e,f),false) else 0 |
| 1663 | |
| 1664 | noncomputable def prescribedT (p : Shape) (t : Tagging p I) (d : Vec I) |
| 1665 | (h : Mat I I) (s : Script p I) (x y : I) : F := |
| 1666 | @ite _ (x=y) (Classical.propDecidable _) (d x) |
| 1667 | (h x y+(prescribedB p t s x y+prescribedB p t s y x)) |
| 1668 | |
| 1669 | def fulfills (p : Shape) (t : Tagging p I) (d f : Vec I) (u : Mat I I) |
| 1670 | (s : Script p I) (a b : I → Bool) := |
| 1671 | ∀ (x : I) (j : Bool), |
| 1672 | d x+ (∑ i∈aiming a b (a x) j, prescribedT p t d u s i x) = |
| 1673 | if j=b x then 0 else f x |
| 1674 | |
| 1675 | namespace Volley |
| 1676 | variable {v : Volley p n I} |
| 1677 | end Volley |
| 1678 | end HadwigerCounterexample |
| 1679 | end |
| 1680 | end Lax793645.ConstructionData.Binary |
| 1681 | end |
| 1682 | |
| 1683 | section |
| 1684 | namespace Lax793645.ConstructionData.Binary |
| 1685 | noncomputable section |
| 1686 | namespace HadwigerCounterexample |
| 1687 | open Finset Matrix Function LinearMap |
| 1688 | open scoped BigOperators |
| 1689 | variable {p : Shape} {n N : ℕ} {I : Type} [Fintype I] [DecidableEq I] |
| 1690 | namespace Template |
| 1691 | variable (v : Template p I) |
| 1692 | abbrev SameDuet (v : Template p I) := |
| 1693 | {i : I×I//v.aim i.1=v.aim i.2 ∧ Fintype.equivFin I i.1< Fintype.equivFin I i.2} |
| 1694 | |
| 1695 | abbrev OppDuet (v : Template p I) := {i:I×I//v.aim i.1=true∧v.aim i.2=false} |
| 1696 | |
| 1697 | abbrev Chorus (v : Template p I) := v.SameDuet ⊕ v.OppDuet |
| 1698 | |
| 1699 | instance : Fintype v.SameDuet := inferInstance |
| 1700 | |
| 1701 | instance : Fintype v.OppDuet := inferInstance |
| 1702 | |
| 1703 | /-- Self-Gram bits are tested only when the tags share a component. -/ |
| 1704 | def sharesComponent (p : Shape) (l d : Tag p.g) := |
| 1705 | ∃ e : Comp p.g, inc e l ∧ inc e d |
| 1706 | |
| 1707 | instance (p : Shape) (l d : Tag p.g) : Decidable (sharesComponent p l d) := |
| 1708 | inferInstanceAs (Decidable (∃ e : Comp p.g, inc e l ∧ inc e d)) |
| 1709 | |
| 1710 | end Template |
| 1711 | end HadwigerCounterexample |
| 1712 | end |
| 1713 | end Lax793645.ConstructionData.Binary |
| 1714 | end |
| 1715 | |
| 1716 | section |
| 1717 | namespace Lax793645.ConstructionData.Binary |
| 1718 | noncomputable section |
| 1719 | namespace HadwigerCounterexample |
| 1720 | open scoped BigOperators |
| 1721 | open Matrix Finset Filter Function LinearMap |
| 1722 | variable {p : Shape} {n N : ℕ} |
| 1723 | namespace Template |
| 1724 | def solo (p : Shape) (t : Tag p.g) (s : Label p.b) (f : Flavor p.g) : |
| 1725 | Template p Unit := ⟨fun _ => true,fun _=> t,fun _ => s,fun _=> f⟩ |
| 1726 | |
| 1727 | abbrev Solo (p : Shape) := Template p Unit |
| 1728 | |
| 1729 | variable (v : Solo p) |
| 1730 | end Template |
| 1731 | end HadwigerCounterexample |
| 1732 | end |
| 1733 | end Lax793645.ConstructionData.Binary |
| 1734 | end |
| 1735 | |
| 1736 | section |
| 1737 | namespace Lax793645.ConstructionData.Binary |
| 1738 | noncomputable section |
| 1739 | namespace HadwigerCounterexample |
| 1740 | open Finset Real |
| 1741 | open scoped BigOperators |
| 1742 | variable {A B C : Type} [Fintype A] [Fintype B] [Fintype C] |
| 1743 | def varOne (p q : Wgt A) := ∑ x, |p x-q x| |
| 1744 | |
| 1745 | end HadwigerCounterexample |
| 1746 | end |
| 1747 | end Lax793645.ConstructionData.Binary |
| 1748 | end |
| 1749 | |
| 1750 | section |
| 1751 | namespace Lax793645.ConstructionData.Binary |
| 1752 | noncomputable section |
| 1753 | namespace HadwigerCounterexample |
| 1754 | open Matrix Module LinearMap Finset Filter Function |
| 1755 | open scoped BigOperators |
| 1756 | variable {p : Shape} {n N : ℕ} {I : Type} [Fintype I] [DecidableEq I] |
| 1757 | def glintRate (K : ℕ) := bp (-((K^2:ℕ):ℝ)-3) |
| 1758 | |
| 1759 | namespace Template |
| 1760 | variable (v : Solo p) |
| 1761 | def stains (m : Mixer p n) (f : Vec I →ₗ[F] Profile p n) (z : Knobs p.g n) : Vec I := |
| 1762 | fun i=> Tsym m (f (Pi.single i 1)) (useAtom p (v.t ()) (v.s ()) (v.f ()) z) |
| 1763 | |
| 1764 | end Template |
| 1765 | end HadwigerCounterexample |
| 1766 | end |
| 1767 | end Lax793645.ConstructionData.Binary |
| 1768 | end |
| 1769 | |
| 1770 | section |
| 1771 | namespace Lax793645.ConstructionData.Binary |
| 1772 | noncomputable section |
| 1773 | namespace HadwigerCounterexample |
| 1774 | open Finset Matrix Module LinearMap Function Filter |
| 1775 | open scoped BigOperators |
| 1776 | variable {p : Shape} {n N : ℕ} |
| 1777 | namespace Template |
| 1778 | variable (v : Solo p) |
| 1779 | variable {K s : ℕ} |
| 1780 | def basebeta (p : Shape) (K : ℕ) := |
| 1781 | bp (-((K^2:ℕ):ℝ)-1)* scanPrice p |
| 1782 | |
| 1783 | end Template |
| 1784 | end HadwigerCounterexample |
| 1785 | end |
| 1786 | end Lax793645.ConstructionData.Binary |
| 1787 | end |
| 1788 | |
| 1789 | section |
| 1790 | namespace Lax793645.ConstructionData.Binary |
| 1791 | noncomputable section |
| 1792 | namespace HadwigerCounterexample |
| 1793 | open Matrix Module LinearMap Function Finset Submodule |
| 1794 | open scoped BigOperators |
| 1795 | variable {p : Shape} {n N : ℕ} |
| 1796 | def silent (w : Pdual p n) := ∀ x, x∈Xspace p n → w x=0 |
| 1797 | |
| 1798 | end HadwigerCounterexample |
| 1799 | end |
| 1800 | end Lax793645.ConstructionData.Binary |
| 1801 | end |
| 1802 | |
| 1803 | section |
| 1804 | namespace Lax793645.ConstructionData.Frames |
| 1805 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 1806 | open Function Finset |
| 1807 | open scoped BigOperators |
| 1808 | noncomputable section |
| 1809 | set_option backward.isDefEq.respectTransparency false |
| 1810 | variable {V Q A B T : Type} [AddCommGroup V] [Module F V] |
| 1811 | /-- One set of linear coordinates works for every status of the prefix |
| 1812 | (in particular, both possible diagonal bits). -/ |
| 1813 | def HasLinearCells (f : Q→ V→ A) (R : ℕ) : Prop := |
| 1814 | ∃ r : ℕ,r≤ R ∧ ∃ L : V→ₗ[F] Vec (Fin r),∃ φ : Q→ Vec (Fin r)→ A, |
| 1815 | ∀ q x,f q x=φ q (L x) |
| 1816 | |
| 1817 | variable {p : Shape} {N : ℕ} |
| 1818 | end |
| 1819 | end Lax793645.ConstructionData.Frames |
| 1820 | end |
| 1821 | |
| 1822 | section |
| 1823 | namespace Lax793645.ConstructionData.Binary |
| 1824 | noncomputable section |
| 1825 | namespace HadwigerCounterexample |
| 1826 | open Matrix LinearMap Submodule Finset Function Module |
| 1827 | open scoped BigOperators |
| 1828 | namespace StatusAnalysis |
| 1829 | abbrev Nodes := Bool |
| 1830 | |
| 1831 | abbrev Grid := Nodes × Nodes |
| 1832 | |
| 1833 | abbrev Cell (d : ℕ) := Vec (Fin d) |
| 1834 | |
| 1835 | abbrev Par (d : ℕ) := F × Cell d |
| 1836 | |
| 1837 | abbrev Whole (d : ℕ) := Par d × F |
| 1838 | |
| 1839 | abbrev Signal (d e : ℕ) := F × Whole d × Whole e |
| 1840 | |
| 1841 | abbrev View (d e : ℕ) := F × Par d × Par e |
| 1842 | |
| 1843 | abbrev Question (d e : ℕ) := F × F × Cell d × Cell e |
| 1844 | |
| 1845 | variable {d e : ℕ} |
| 1846 | def view (d e : ℕ) : Signal d e→ₗ[F] View d e where |
| 1847 | toFun x := (x.1,x.2.1.1,x.2.2.1) |
| 1848 | map_add' _ _ := rfl |
| 1849 | map_smul' _ _ := rfl |
| 1850 | |
| 1851 | def testV (d e : ℕ) : View d e →ₗ[F] Question d e where |
| 1852 | toFun x := (x.1,x.2.1.1 + x.2.2.1,x.2.1.2,x.2.2.2) |
| 1853 | map_add' _ _ := Prod.ext rfl (Prod.ext (add_add_add_comm ..) rfl) |
| 1854 | map_smul' _ _ := Prod.ext rfl (Prod.ext (mul_add _ _ _).symm rfl) |
| 1855 | |
| 1856 | def want (d e : ℕ) := testV d e ∘ₗ view d e |
| 1857 | |
| 1858 | def couple (d : ℕ) : Whole d→ₗ[F] F where |
| 1859 | toFun x := x.1.1+x.2 |
| 1860 | map_add' _ _ := add_add_add_comm .. |
| 1861 | map_smul' a _ := (mul_add a _ _).symm |
| 1862 | |
| 1863 | def coverBase (V : Space (Signal d e)) := Surjective (view d e ∘ₗ V.subtype) |
| 1864 | |
| 1865 | abbrev Rates := Nodes→ ℕ |
| 1866 | |
| 1867 | abbrev Suite (A B : Rates) (i : Grid) := Signal (A i.1) (B i.2) |
| 1868 | |
| 1869 | abbrev LedgerS (A B : Rates) (i : Grid) := Question (A i.1) (B i.2) |
| 1870 | |
| 1871 | abbrev Cabinet (A B : Rates) := ∀ i, LedgerS A B i |
| 1872 | |
| 1873 | abbrev Quota := Vec Nodes |
| 1874 | |
| 1875 | abbrev Court (A B : Rates) := Cabinet A B × Quota × Quota |
| 1876 | |
| 1877 | abbrev StatusSp (A B : Rates) := ∀ i,Space (Suite A B i) |
| 1878 | |
| 1879 | variable {A B : Rates} |
| 1880 | def separate (A B : Rates) (i : Grid) : |
| 1881 | Suite A B i →ₗ[F] Court A B := |
| 1882 | (LinearMap.single F (LedgerS A B) i ∘ₗ want _ _).prod |
| 1883 | ((LinearMap.single F (fun _ : Bool=> F) i.2 ∘ₗ |
| 1884 | (couple (A i.1) ∘ₗ LinearMap.fst F _ _ ∘ₗ LinearMap.snd F _ _)).prod |
| 1885 | (LinearMap.single F (fun _ : Bool=> F) i.1 ∘ₗ |
| 1886 | (couple (B i.2) ∘ₗ LinearMap.snd F _ _ ∘ₗ LinearMap.snd F _ _))) |
| 1887 | |
| 1888 | def speak (A B : Rates) : |
| 1889 | (∀ i,Suite A B i) →ₗ[F] Court A B := ∑ i:Grid,separate A B i ∘ₗ LinearMap.proj i |
| 1890 | |
| 1891 | def scorecard (V : StatusSp A B) (T : Cabinet A B) := |
| 1892 | ∃ v : ∀ i,Suite A B i,(∀ i,v i∈V i) ∧ speak A B v=(T,0) |
| 1893 | |
| 1894 | structure Critic (A B : Rates) where |
| 1895 | alf : ∀ i : Grid, LedgerS A B i →ₗ[F] F |
| 1896 | altL : Quota |
| 1897 | altR : Quota |
| 1898 | |
| 1899 | def Counter (g : Critic A B) (V : StatusSp A B) := |
| 1900 | ∀ i:Grid,∀ v∈V i, g.alf i (want _ _ v) = |
| 1901 | g.altL i.2 * couple _ v.2.1 + g.altR i.1 * couple _ v.2.2 |
| 1902 | |
| 1903 | end StatusAnalysis |
| 1904 | end HadwigerCounterexample |
| 1905 | end |
| 1906 | end Lax793645.ConstructionData.Binary |
| 1907 | end |
| 1908 | |
| 1909 | section |
| 1910 | namespace Lax793645.ConstructionData.Binary |
| 1911 | noncomputable section |
| 1912 | namespace HadwigerCounterexample |
| 1913 | open Finset Matrix Module LinearMap Submodule Function |
| 1914 | open scoped BigOperators |
| 1915 | namespace StatusAnalysis |
| 1916 | variable {A B : Rates} {d e : ℕ} |
| 1917 | structure DualCoefficients (A B : Rates) where |
| 1918 | left : Quota |
| 1919 | right : Quota |
| 1920 | gam : Grid→ F |
| 1921 | hed : Grid→ F |
| 1922 | north : (i:Grid)→ Cell (A i.1) |
| 1923 | south : (i:Grid)→ Cell (B i.2) |
| 1924 | |
| 1925 | end StatusAnalysis |
| 1926 | end HadwigerCounterexample |
| 1927 | end |
| 1928 | end Lax793645.ConstructionData.Binary |
| 1929 | end |
| 1930 | |
| 1931 | section |
| 1932 | namespace Lax793645.ConstructionData.Binary |
| 1933 | noncomputable section |
| 1934 | namespace HadwigerCounterexample |
| 1935 | open Finset Matrix Function LinearMap Submodule Module |
| 1936 | open scoped BigOperators |
| 1937 | namespace StatusAnalysis |
| 1938 | variable {L I X Y : Type} [DecidableEq L] [DecidableEq I] [AddCommGroup X] |
| 1939 | [Module F X] [AddCommGroup Y] [Module F Y] |
| 1940 | structure Club (I X L : Type) where |
| 1941 | valid : I→ Prop |
| 1942 | writes : I→ X |
| 1943 | addr : I→ Bool→ L |
| 1944 | |
| 1945 | abbrev Straps (L : Type) := Bool→ Finset L |
| 1946 | |
| 1947 | variable (C : Club I X L) |
| 1948 | namespace Club |
| 1949 | def zone (s : Straps L) (i) := C.valid i ∧ ∀ b,C.addr i b∉s b |
| 1950 | |
| 1951 | def band (s : Straps L) : Space X := Submodule.span F {x|∃ i, C.zone s i∧C.writes i=x} |
| 1952 | |
| 1953 | def bundle (p : Finset I) (s : Straps L) := |
| 1954 | (∀ i∈p,zone C s i) ∧ ∀ b : Bool, Set.InjOn (fun i => C.addr i b) (p : Set I) |
| 1955 | |
| 1956 | def contents (p : Finset I) := ∑ i∈p,C.writes i |
| 1957 | |
| 1958 | end Club |
| 1959 | end StatusAnalysis |
| 1960 | end HadwigerCounterexample |
| 1961 | end |
| 1962 | end Lax793645.ConstructionData.Binary |
| 1963 | end |
| 1964 | |
| 1965 | section |
| 1966 | namespace Lax793645.ConstructionData.Binary |
| 1967 | noncomputable section |
| 1968 | namespace HadwigerCounterexample |
| 1969 | open Matrix Module LinearMap Submodule Function Finset |
| 1970 | open scoped BigOperators |
| 1971 | namespace StatusAnalysis |
| 1972 | variable {I L : Type} [DecidableEq L] [DecidableEq I] {d e : ℕ} |
| 1973 | open Club |
| 1974 | variable {I : Grid → Type} [∀ i,DecidableEq (I i)] {A B : Rates} |
| 1975 | abbrev Congress (I : Grid→ Type) (A B : Rates) (L : Type) := ∀ i,Club (I i) (Suite A B i) L |
| 1976 | |
| 1977 | namespace Guild |
| 1978 | variable (C : Congress I A B L) |
| 1979 | abbrev Bags (I : Grid → Type) := ∀ i,Finset (I i) |
| 1980 | def chapter (s : Straps L) : ∀ i,Space (Suite A B i) := fun i => (C i).band s |
| 1981 | end Guild |
| 1982 | end StatusAnalysis |
| 1983 | end HadwigerCounterexample |
| 1984 | end |
| 1985 | end Lax793645.ConstructionData.Binary |
| 1986 | end |
| 1987 | |
| 1988 | section |
| 1989 | namespace Lax793645.ConstructionData.Binary |
| 1990 | noncomputable section |
| 1991 | namespace HadwigerCounterexample |
| 1992 | open Finset Matrix Function Module LinearMap Submodule |
| 1993 | open scoped BigOperators |
| 1994 | namespace StatusAnalysis |
| 1995 | abbrev Ax (p : Shape) (n : ℕ) (d : ℕ) := Cell d→ₗ[F] Profile p n |
| 1996 | |
| 1997 | abbrev Charts (p : Shape) (n : ℕ) (d : Rates) := ∀ i, Ax p n (d i) |
| 1998 | |
| 1999 | variable {p : Shape} {n N : ℕ} {d e : Rates} |
| 2000 | abbrev Format := Grid→ ℕ |
| 2001 | |
| 2002 | abbrev Messenger (q : Format) := Σ i:Grid,Fin (q i) |
| 2003 | |
| 2004 | def sendId (b : Bool) (i : Grid) := if b then i.1 else i.2 |
| 2005 | |
| 2006 | def transit (b : Bool) (q : Grid) := if b then q else (q.2,q.1) |
| 2007 | |
| 2008 | def parcel (b : Bool) {q : Format} (x : Messenger q) := sendId b x.1 |
| 2009 | |
| 2010 | def manager {q : Format} (b : Bool) (t : Tagging p (Messenger q)) (s : Messenger q→ Label p.b) |
| 2011 | (f : Messenger q→ Flavor p.g) : Template p (Messenger q) := ⟨parcel b,t,s,f⟩ |
| 2012 | |
| 2013 | def roll {u : ℕ} (f : Ax p n u) (g : Pdual p n) : Cell u := fun i=> g (f (Pi.single i 1)) |
| 2014 | |
| 2015 | abbrev Magazine (p : Shape) (d : ℕ) := Digest p.g × Whole d |
| 2016 | |
| 2017 | variable {q : Format} |
| 2018 | abbrev Amounts (p : Shape) (q : Format) (d : Rates) (b : Bool) := |
| 2019 | ∀ i:Messenger q,Magazine p (d (parcel b i)) |
| 2020 | |
| 2021 | variable {H : Type} [AddCommMonoid H] |
| 2022 | end StatusAnalysis |
| 2023 | end HadwigerCounterexample |
| 2024 | end |
| 2025 | end Lax793645.ConstructionData.Binary |
| 2026 | end |
| 2027 | |
| 2028 | section |
| 2029 | namespace Lax793645.ConstructionData.Binary |
| 2030 | noncomputable section |
| 2031 | namespace HadwigerCounterexample |
| 2032 | open Matrix Module LinearMap Submodule Finset Function |
| 2033 | open scoped BigOperators |
| 2034 | namespace StatusAnalysis |
| 2035 | variable {d e : Rates} {p : Shape} {n N : ℕ} {q : Format} |
| 2036 | def funds {b : Bool} (x : Amounts p q d b) (i : Grid) : |
| 2037 | Whole (d (sendId b i)) := |
| 2038 | ∑ k: Fin (q i),(x (⟨i,k⟩ : Messenger q)).2 |
| 2039 | |
| 2040 | def fullq (z : Messenger q → F) (i : Grid) := ∑ k:Fin (q i),z ⟨i,k⟩ |
| 2041 | |
| 2042 | def rhyme {b : Bool} (a : Amounts p q d b) (x : Amounts p q e (!b)) := |
| 2043 | ∀ i:Grid,(funds a i).1.1+(funds x i).1.1=1 |
| 2044 | |
| 2045 | end StatusAnalysis |
| 2046 | end HadwigerCounterexample |
| 2047 | end |
| 2048 | end Lax793645.ConstructionData.Binary |
| 2049 | end |
| 2050 | |
| 2051 | section |
| 2052 | namespace Lax793645.ConstructionData.Binary |
| 2053 | noncomputable section |
| 2054 | namespace HadwigerCounterexample |
| 2055 | open Finset Matrix Function LinearMap Module Submodule |
| 2056 | open scoped BigOperators |
| 2057 | namespace StatusAnalysis |
| 2058 | variable {p : Shape} {n N : ℕ} {q : Format} {d e : Rates} |
| 2059 | def owing (p : Shape) {q : Format} {d : Rates} |
| 2060 | (b : Bool) (a : Amounts p q d b) (u : Messenger q→ F) := |
| 2061 | ∀ i,(a i).1.sumBit=u i |
| 2062 | |
| 2063 | end StatusAnalysis |
| 2064 | end HadwigerCounterexample |
| 2065 | end |
| 2066 | end Lax793645.ConstructionData.Binary |
| 2067 | end |
| 2068 | |
| 2069 | section |
| 2070 | namespace Lax793645.ConstructionData.Binary |
| 2071 | noncomputable section |
| 2072 | namespace HadwigerCounterexample |
| 2073 | open Finset Matrix Module LinearMap Function Submodule |
| 2074 | open scoped BigOperators |
| 2075 | namespace StatusAnalysis |
| 2076 | variable {p : Shape} {n N : ℕ} {q : Format} {d e : Rates} |
| 2077 | def mailRole {b} (a : Amounts p q d b) := |
| 2078 | fun i=>(a i).2.1.1 |
| 2079 | |
| 2080 | def mailBias {b} (a : Amounts p q d b) := |
| 2081 | fun i=>(a i).2.2 |
| 2082 | |
| 2083 | def TMill (p : Shape) {b} {d} (t : Tagging p (Messenger q)) (w : Amounts p q d b) : |
| 2084 | Mat (Messenger q) (Messenger q) := |
| 2085 | let a (x : Tag p.g) (i : Messenger q) := ∑ z:Tag p.g,(w i).1 (Sum.inl (z,x)) |
| 2086 | let f (x : Tag p.g) (i : Messenger q) := |
| 2087 | let c:=(w i).1 (Sum.inr ()) |
| 2088 | c+(if t i=x then c else 0) |
| 2089 | Matrix.of fun i j => mailRole w i * mailRole w j + |
| 2090 | ∑ x:Tag p.g,(a x i * f x j + f x i * a x j) |
| 2091 | |
| 2092 | def proclaims {b : Bool} (p : Shape) {d e} |
| 2093 | (a : Amounts p q d b) (w : Amounts p q e (!b)) (t : Tagging p (Messenger q)) |
| 2094 | (g : Script p (Messenger q)) := |
| 2095 | fulfills p t (mailRole a) (mailBias w) (TMill p t a) g (parcel b) (parcel (!b)) |
| 2096 | |
| 2097 | end StatusAnalysis |
| 2098 | end HadwigerCounterexample |
| 2099 | end |
| 2100 | end Lax793645.ConstructionData.Binary |
| 2101 | end |
| 2102 | |
| 2103 | section |
| 2104 | namespace Lax793645.ConstructionData.Binary |
| 2105 | noncomputable section |
| 2106 | namespace HadwigerCounterexample |
| 2107 | open Matrix LinearMap Module Submodule Function Finset |
| 2108 | open scoped BigOperators |
| 2109 | variable {p : Shape} {n N r : ℕ} |
| 2110 | def maxSpan (m b r : ℕ) := r*(2^m*(2* b)) |
| 2111 | |
| 2112 | end HadwigerCounterexample |
| 2113 | end |
| 2114 | end Lax793645.ConstructionData.Binary |
| 2115 | end |
| 2116 | |
| 2117 | section |
| 2118 | namespace Lax793645.ConstructionData.Binary |
| 2119 | noncomputable section |
| 2120 | namespace HadwigerCounterexample |
| 2121 | open scoped BigOperators |
| 2122 | open Finset |
| 2123 | variable {A : Type} [Fintype A] |
| 2124 | abbrev Tiles (A : Type) := Finset (Finset A) |
| 2125 | |
| 2126 | def inTiles (T : Tiles A) := fun x:A => ∃ i∈ T,x∈i |
| 2127 | |
| 2128 | def apart (T : Tiles A) := |
| 2129 | ∀ x,∀ S∈T, ∀ F∈ T,x∈S→ x∈F→ S=F |
| 2130 | |
| 2131 | def partMass (w : Wgt A) (S : Finset A) := pr w (fun x => x∈S) |
| 2132 | |
| 2133 | def partW (w : Wgt A) (S : Finset A) := onW w (fun x => x∈S) |
| 2134 | |
| 2135 | def allMass (w : Wgt A) (T : Tiles A) := pr w (inTiles T) |
| 2136 | |
| 2137 | def allW (w : Wgt A) (T : Tiles A) := onW w (inTiles T) |
| 2138 | |
| 2139 | variable {w : Wgt A} {T : Tiles A} |
| 2140 | def portionW (w : Wgt A) (T : Tiles A) : Wgt T := |
| 2141 | fun x => partMass w x.val / allMass w T |
| 2142 | |
| 2143 | end HadwigerCounterexample |
| 2144 | end |
| 2145 | end Lax793645.ConstructionData.Binary |
| 2146 | end |
| 2147 | |
| 2148 | section |
| 2149 | namespace Lax793645.ConstructionData.Binary |
| 2150 | noncomputable section |
| 2151 | namespace HadwigerCounterexample |
| 2152 | open Filter Real Finset |
| 2153 | open scoped Topology |
| 2154 | variable {A B : Type} {l : Filter A} {U : Ultrafilter A} {x y z v a : A → ℝ} |
| 2155 | /-- At least subexponential mass. -/ |
| 2156 | def warm (l : Filter A) (z x : A→ ℝ) := |
| 2157 | ∀ ε:ℝ,0<ε → ∀ᶠ i in l,bp (-ε * z i) ≤ x i |
| 2158 | |
| 2159 | namespace warm |
| 2160 | end warm |
| 2161 | namespace ExpSmall |
| 2162 | end ExpSmall |
| 2163 | end HadwigerCounterexample |
| 2164 | end |
| 2165 | end Lax793645.ConstructionData.Binary |
| 2166 | end |
| 2167 | |
| 2168 | section |
| 2169 | namespace Lax793645.ConstructionData.Binary |
| 2170 | noncomputable section |
| 2171 | namespace HadwigerCounterexample |
| 2172 | open scoped BigOperators Topology |
| 2173 | open Filter |
| 2174 | variable {p : Shape} {n N : ℕ} |
| 2175 | def mstep (r : ℕ) := 100* r+10 |
| 2176 | |
| 2177 | def Bstep (r : ℕ) := 2^(mstep r)*2 |
| 2178 | |
| 2179 | def denomStep (r : ℕ) := 10000*(r+1)^2* Bstep r |
| 2180 | |
| 2181 | def stage (g r : ℕ) (D : ℝ) := 2* r* num (Comp g)+D+1 |
| 2182 | |
| 2183 | def pcoef (g r : ℕ) (D : ℝ) := |
| 2184 | 12* Bstep r+2*(denomStep r:ℝ)* stage g r D |
| 2185 | |
| 2186 | def tinyPhase (g r : ℕ) (D : ℝ) := bp (-(pcoef g r D)) |
| 2187 | |
| 2188 | def warn := bp (-10) |
| 2189 | |
| 2190 | def coin : ℝ := 0.0001 |
| 2191 | |
| 2192 | def heatloss (r k : ℕ) := 0.001 / (4*(r:ℝ)+k+1 : ℝ) |
| 2193 | |
| 2194 | end HadwigerCounterexample |
| 2195 | end |
| 2196 | end Lax793645.ConstructionData.Binary |
| 2197 | end |
| 2198 | |
| 2199 | section |
| 2200 | namespace Lax793645.ConstructionData.Binary |
| 2201 | noncomputable section |
| 2202 | namespace HadwigerCounterexample |
| 2203 | open Matrix LinearMap Module Submodule Function Finset |
| 2204 | open scoped BigOperators |
| 2205 | variable {p : Shape} {n N : ℕ} |
| 2206 | variable {A B : Type} |
| 2207 | def named (P : A×A → Prop) (C : ℝ) := |
| 2208 | ∃ k : ℕ,(k:ℝ) ≤ C ∧ ∃ S : Fin k → A → Prop,∀ y,∃ i,∀ x,P (x,y)↔S i x |
| 2209 | |
| 2210 | end HadwigerCounterexample |
| 2211 | end |
| 2212 | end Lax793645.ConstructionData.Binary |
| 2213 | end |
| 2214 | |
| 2215 | section |
| 2216 | namespace Lax793645.ConstructionData.Binary |
| 2217 | noncomputable section |
| 2218 | namespace HadwigerCounterexample |
| 2219 | open Matrix LinearMap Module Submodule Function Finset Filter |
| 2220 | open scoped BigOperators Topology |
| 2221 | variable {p : Shape} {n N : ℕ} |
| 2222 | def shine (N : ℕ) := bp (0.01* N) |
| 2223 | |
| 2224 | def edgeError (N : ℕ) := bp (-0.005* N) |
| 2225 | |
| 2226 | end HadwigerCounterexample |
| 2227 | end |
| 2228 | end Lax793645.ConstructionData.Binary |
| 2229 | end |
| 2230 | |
| 2231 | section |
| 2232 | namespace Lax793645.ConstructionData.Binary |
| 2233 | noncomputable section |
| 2234 | namespace HadwigerCounterexample |
| 2235 | open Matrix LinearMap Module Submodule Function Finset |
| 2236 | open scoped BigOperators |
| 2237 | variable {p : Shape} {n N : ℕ} {A B V : Type} [Fintype A] [Fintype B] |
| 2238 | def allSide : Party := fun _ => 1 |
| 2239 | |
| 2240 | variable [AddCommGroup V] [Module F V] [FiniteDimensional F V] |
| 2241 | end HadwigerCounterexample |
| 2242 | end |
| 2243 | end Lax793645.ConstructionData.Binary |
| 2244 | end |
| 2245 | |
| 2246 | section |
| 2247 | namespace Lax793645.ConstructionData.Binary |
| 2248 | noncomputable section |
| 2249 | namespace HadwigerCounterexample |
| 2250 | open Matrix Module Finset |
| 2251 | open scoped BigOperators |
| 2252 | variable {p : Shape} {n N : ℕ} |
| 2253 | abbrev Quad := Party × Party |
| 2254 | |
| 2255 | def repeatQ (i : F) : Quad := (fun _ => i,fun _ => i) |
| 2256 | |
| 2257 | end HadwigerCounterexample |
| 2258 | end |
| 2259 | end Lax793645.ConstructionData.Binary |
| 2260 | end |
| 2261 | |
| 2262 | section |
| 2263 | namespace Lax793645.ConstructionData.Binary |
| 2264 | noncomputable section |
| 2265 | namespace HadwigerCounterexample |
| 2266 | open Filter Matrix Finset |
| 2267 | open scoped BigOperators Topology |
| 2268 | inductive PredictionClass |
| 2269 | | dusk |
| 2270 | | dawn (i : Bool) |
| 2271 | | twinned |
| 2272 | | noon |
| 2273 | deriving Inhabited, DecidableEq |
| 2274 | |
| 2275 | variable {p : Shape} |
| 2276 | namespace PredictionClass |
| 2277 | def active : PredictionClass→ Bool→ Prop |
| 2278 | | dusk,_=> False |
| 2279 | | dawn i,j=> i=j |
| 2280 | | twinned,_=> True |
| 2281 | | noon,_=> True |
| 2282 | |
| 2283 | def firstBit (α : Party) (i : Bool) := 1+α i |
| 2284 | |
| 2285 | def lit (c : PredictionClass) (α : Party) := |
| 2286 | (∀ i,¬c.active i → firstBit α i=0) ∧ |
| 2287 | (c=twinned → α true=α false) |
| 2288 | |
| 2289 | end PredictionClass |
| 2290 | end HadwigerCounterexample |
| 2291 | end |
| 2292 | end Lax793645.ConstructionData.Binary |
| 2293 | end |
| 2294 | |
| 2295 | section |
| 2296 | namespace Lax793645.ConstructionData.Binary |
| 2297 | noncomputable section |
| 2298 | namespace HadwigerCounterexample |
| 2299 | open Matrix Finset LinearMap |
| 2300 | open scoped BigOperators |
| 2301 | variable {p : Shape} {n N : ℕ} |
| 2302 | namespace PredictionClass |
| 2303 | def compatible (α : Party) (x : F) : PredictionClass→ Quad→ Prop |
| 2304 | | dusk,v=> v=repeatQ x |
| 2305 | | dawn i,v=> v.1 i+v.2 i=firstBit α i |
| 2306 | | twinned,v=> dotProduct allSide v.1 +dotProduct allSide v.2=0 |
| 2307 | | noon,_=> True |
| 2308 | |
| 2309 | end PredictionClass |
| 2310 | open PredictionClass |
| 2311 | def glint (p : Shape) {n} (x : Bool → Profile p n) := ∑ i, role p n (x i) |
| 2312 | |
| 2313 | end HadwigerCounterexample |
| 2314 | end |
| 2315 | end Lax793645.ConstructionData.Binary |
| 2316 | end |
| 2317 | |
| 2318 | section |
| 2319 | namespace Lax793645.ConstructionData.Frames |
| 2320 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 2321 | open Matrix Finset LinearMap |
| 2322 | open scoped BigOperators |
| 2323 | noncomputable section |
| 2324 | variable {p : Shape} {n : ℕ} |
| 2325 | def bitSupport {g : ℕ} (t : Fin g → F) : Finset (Fin g) := |
| 2326 | Finset.univ.filter (fun l => t l≠0) |
| 2327 | |
| 2328 | /-- Read just the ordinary testers owned by the outgoing tag. -/ |
| 2329 | def ordinaryBit (p : Shape) (n : ℕ) (x : Profile p n) (l : Tag p.g) : F := |
| 2330 | ∑ t : Tag p.g,etab p n (Block.O l t) (CycleGeometry.outgoingMap l x) |
| 2331 | |
| 2332 | end |
| 2333 | end Lax793645.ConstructionData.Frames |
| 2334 | end |
| 2335 | |
| 2336 | section |
| 2337 | namespace Lax793645.ConstructionData.Binary |
| 2338 | noncomputable section |
| 2339 | namespace HadwigerCounterexample |
| 2340 | open Matrix Module Function Finset |
| 2341 | open scoped BigOperators |
| 2342 | variable {p : Shape} {n : ℕ} |
| 2343 | abbrev Punch (p : Shape) := ProbeIdx p.g × Fin p.r |
| 2344 | |
| 2345 | abbrev Gauge (p : Shape) := Punch p × Bool |
| 2346 | |
| 2347 | end HadwigerCounterexample |
| 2348 | end |
| 2349 | end Lax793645.ConstructionData.Binary |
| 2350 | end |
| 2351 | |
| 2352 | section |
| 2353 | namespace Lax793645.ConstructionData.Binary |
| 2354 | noncomputable section |
| 2355 | namespace HadwigerCounterexample |
| 2356 | open Filter Finset |
| 2357 | open scoped BigOperators Topology |
| 2358 | open PredictionClass |
| 2359 | structure PreparationParameters where |
| 2360 | D : ℕ |
| 2361 | L : ℝ |
| 2362 | d : ℕ |
| 2363 | e : ℕ |
| 2364 | s : ℕ |
| 2365 | u : ℕ |
| 2366 | k : ℕ |
| 2367 | ζ : ℝ |
| 2368 | B : ℕ |
| 2369 | |
| 2370 | namespace PreparationParameters |
| 2371 | def rank (q : PreparationParameters) := 2* q.e + 2 |
| 2372 | |
| 2373 | def leafOld (q : PreparationParameters) : ℝ := ↑q.D+q.e+2 |
| 2374 | |
| 2375 | def leafNew (q : PreparationParameters) : ℝ := q.leafOld+q.u+q.s+2 |
| 2376 | |
| 2377 | def spJoint (q : PreparationParameters) : ℝ := (q.D:ℝ)+1 |
| 2378 | |
| 2379 | def spear (q : PreparationParameters) := bp (100)* q.L |
| 2380 | |
| 2381 | variable {p : Shape} {M n N : ℕ} |
| 2382 | abbrev cycleM (p : Shape) := ∀ n,Mixer p n |
| 2383 | |
| 2384 | end PreparationParameters |
| 2385 | end HadwigerCounterexample |
| 2386 | end |
| 2387 | end Lax793645.ConstructionData.Binary |
| 2388 | end |
| 2389 | |
| 2390 | section |
| 2391 | namespace Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 2392 | noncomputable section |
| 2393 | variable {α : Type*} [Fintype α] |
| 2394 | /-- Individual marginal caps (mapW denotes the actual marginals) and a joint cap. -/ |
| 2395 | def pairCaps (μ : Wgt α) (m d : ℝ) (w : Wgt (α × α)) := |
| 2396 | (∀ x, mapW w Prod.fst x ≤ m * μ x) ∧ |
| 2397 | (∀ x, mapW w Prod.snd x ≤ m * μ x) ∧ |
| 2398 | (∀ p, w p ≤ d * pairW μ μ p) |
| 2399 | |
| 2400 | end |
| 2401 | end Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 2402 | end |
| 2403 | |
| 2404 | section |
| 2405 | namespace Lax793645.ConstructionData.Binary |
| 2406 | noncomputable section |
| 2407 | namespace HadwigerCounterexample |
| 2408 | open Filter Real Finset Matrix Function |
| 2409 | open scoped BigOperators |
| 2410 | variable {p : Shape} {M n N : ℕ} |
| 2411 | variable {I J K G : Type} [Fintype I] [Fintype J] [Fintype K] [Fintype G] |
| 2412 | variable [DecidableEq I] [DecidableEq J] [DecidableEq K] [DecidableEq G] |
| 2413 | namespace Template |
| 2414 | variable (v : Template p I) (z : Template p J) |
| 2415 | instance inpFinite (p : Shape) (I : Type) [Fintype I] [DecidableEq I] (n : ℕ) : |
| 2416 | Fintype (Inputs p n I) := inferInstanceAs (Fintype (I→ Knobs p.g n)) |
| 2417 | |
| 2418 | instance keySlotFinite (v : Template p I) : Fintype (KeySlots p v.t) := inferInstance |
| 2419 | |
| 2420 | end Template |
| 2421 | end HadwigerCounterexample |
| 2422 | end |
| 2423 | end Lax793645.ConstructionData.Binary |
| 2424 | end |
| 2425 | |
| 2426 | section |
| 2427 | namespace Lax793645.ConstructionData.Binary |
| 2428 | noncomputable section |
| 2429 | namespace HadwigerCounterexample |
| 2430 | open Finset Real |
| 2431 | open scoped BigOperators |
| 2432 | variable {A B C X Y : Type} [Fintype A] [Fintype B] [Fintype C] [Fintype X] [Fintype Y] |
| 2433 | variable {w : Wgt X} |
| 2434 | def stained (w : Wgt X) (f : X→ Y) (i : Y) : Wgt X := by |
| 2435 | classical exact if mapW w f i≠0 then onW w (fun x => f x=i) else w |
| 2436 | |
| 2437 | variable {μ : Wgt A} |
| 2438 | def colored (μ : Wgt A) (w : Wgt X) (v : A→ X→ Y) := |
| 2439 | semi μ (fun i => mapW w (v i)) |
| 2440 | |
| 2441 | def coloredP (w : Wgt X) (v : A→ X→ Y) (K : A→ X→ B) := |
| 2442 | fun i : A×Y => mapW (stained w (v i.1) i.2) (K i.1) |
| 2443 | |
| 2444 | end HadwigerCounterexample |
| 2445 | end |
| 2446 | end Lax793645.ConstructionData.Binary |
| 2447 | end |
| 2448 | |
| 2449 | section |
| 2450 | namespace Lax793645.ConstructionData.Binary |
| 2451 | noncomputable section |
| 2452 | namespace HadwigerCounterexample |
| 2453 | open Finset Real Function |
| 2454 | open scoped BigOperators |
| 2455 | variable {A B C K : Type} [Fintype A] [Fintype B] [Fintype C] |
| 2456 | def dip (μ f g : Wgt A) := avg μ (fun i => f i* g i) |
| 2457 | |
| 2458 | def ode (μ f : Wgt A) := dip μ f f |
| 2459 | |
| 2460 | def cashbook (μ : Wgt A) (f : A→ B) (g : Wgt A) := |
| 2461 | fun i => mapW (fun x => μ x* g x) f i / mapW μ f i |
| 2462 | |
| 2463 | def banner (μ : Wgt A) (f : A→ B) (g : Wgt A) := cashbook μ f g ∘ f |
| 2464 | |
| 2465 | end HadwigerCounterexample |
| 2466 | end |
| 2467 | end Lax793645.ConstructionData.Binary |
| 2468 | end |
| 2469 | |
| 2470 | section |
| 2471 | namespace Lax793645.ConstructionData.Binary |
| 2472 | noncomputable section |
| 2473 | namespace HadwigerCounterexample |
| 2474 | open Matrix Module LinearMap Finset Submodule Function |
| 2475 | open scoped BigOperators |
| 2476 | namespace StatusAnalysis |
| 2477 | variable {p : Shape} {n N K : ℕ} |
| 2478 | structure Quill (p : Shape) (q : Format) (d : Rates) (b : Bool) where |
| 2479 | sel : Messenger q → Label p.b |
| 2480 | flav : Messenger q → Flavor p.g |
| 2481 | amp : Amounts p q d b |
| 2482 | script : Script p (Messenger q) |
| 2483 | |
| 2484 | structure Typus (p : Shape) (q : Format) (d e : Rates) where |
| 2485 | t : Tagging p (Messenger q) |
| 2486 | z : Messenger q → F |
| 2487 | qA : Quill p q d true |
| 2488 | qB : Quill p q e false |
| 2489 | |
| 2490 | abbrev Volumes := Grid → Fin 8 |
| 2491 | |
| 2492 | abbrev Stakes (K : ℕ) := Nodes → Fin (K^2+1) |
| 2493 | |
| 2494 | abbrev Master (K : ℕ) := Volumes × Stakes K × Stakes K |
| 2495 | |
| 2496 | def toFormat (q : Volumes) : Format := fun i=>(q i).val |
| 2497 | |
| 2498 | def toRates {K : ℕ} (d : Stakes K) : Rates := fun i=>(d i).val |
| 2499 | |
| 2500 | abbrev OnFile (p : Shape) {K : ℕ} (q : Master K) := |
| 2501 | Typus p (toFormat q.1) (toRates q.2.1) (toRates q.2.2) |
| 2502 | |
| 2503 | variable {q : Format} {d e : Rates} |
| 2504 | namespace Quill |
| 2505 | variable {b : Bool} (w : Quill p q d b) (t : Tagging p (Messenger q)) (z : Messenger q→ F) |
| 2506 | def pen := manager b t w.sel w.flav |
| 2507 | |
| 2508 | def moral := |
| 2509 | Injective w.sel ∧ owing p b w.amp z ∧ ∀ i, (w.amp i).1.feasible (t i) (w.flav i) |
| 2510 | |
| 2511 | end Quill |
| 2512 | namespace Typus |
| 2513 | variable (w : Typus p q d e) |
| 2514 | end Typus |
| 2515 | namespace Station |
| 2516 | variable (w : Typus p q d e) |
| 2517 | end Station |
| 2518 | end StatusAnalysis |
| 2519 | end HadwigerCounterexample |
| 2520 | end |
| 2521 | end Lax793645.ConstructionData.Binary |
| 2522 | end |
| 2523 | |
| 2524 | section |
| 2525 | namespace Lax793645.ConstructionData.Binary |
| 2526 | noncomputable section |
| 2527 | namespace HadwigerCounterexample |
| 2528 | open Filter Finset Matrix Function |
| 2529 | open scoped BigOperators Topology |
| 2530 | variable {A B C H : Type} [Fintype A] [Fintype B] [Fintype C] [Fintype H] |
| 2531 | variable {p : Shape} {n N K M r : ℕ} |
| 2532 | namespace StatusAnalysis |
| 2533 | structure Appearance (p : Shape) where |
| 2534 | l : Tag p.g |
| 2535 | s : Label p.b |
| 2536 | f : Flavor p.g |
| 2537 | q : F |
| 2538 | |
| 2539 | namespace Appearance |
| 2540 | variable (x : Appearance p) |
| 2541 | def apt := canDial p x.l x.f x.q |
| 2542 | |
| 2543 | def trot := Template.solo p x.l x.s x.f |
| 2544 | |
| 2545 | def wit (x : Appearance p) (n : ℕ) := scopedBit p n x.l x.f x.q |
| 2546 | |
| 2547 | variable {d : ℕ} |
| 2548 | end Appearance |
| 2549 | namespace Appearance |
| 2550 | variable {d : ℕ} |
| 2551 | end Appearance |
| 2552 | end StatusAnalysis |
| 2553 | end HadwigerCounterexample |
| 2554 | end |
| 2555 | end Lax793645.ConstructionData.Binary |
| 2556 | end |
| 2557 | |
| 2558 | section |
| 2559 | namespace Lax793645.ConstructionData.Binary |
| 2560 | noncomputable section |
| 2561 | namespace HadwigerCounterexample |
| 2562 | open Filter Finset Matrix Function |
| 2563 | open scoped BigOperators Topology |
| 2564 | variable {p:Shape} {n N K r d : ℕ} |
| 2565 | namespace StatusAnalysis |
| 2566 | open Template |
| 2567 | namespace Appearance |
| 2568 | def nearly (p: Shape) (z: Digest p.g) (u: Par d) (x: Magazine p d) := |
| 2569 | x.1=z∧ x.2.1=u |
| 2570 | |
| 2571 | def fitsink (x : Appearance p) (w : Magazine p d) := |
| 2572 | w.1.feasible x.l x.f ∧ w.1.sumBit=x.q ∧ w.1.diagO=w.2.1.1 |
| 2573 | |
| 2574 | end Appearance |
| 2575 | end StatusAnalysis |
| 2576 | end HadwigerCounterexample |
| 2577 | end |
| 2578 | end Lax793645.ConstructionData.Binary |
| 2579 | end |
| 2580 | |
| 2581 | section |
| 2582 | namespace Lax793645.ConstructionData.Binary |
| 2583 | noncomputable section |
| 2584 | namespace HadwigerCounterexample |
| 2585 | open Filter Finset Matrix Function |
| 2586 | open scoped BigOperators Topology |
| 2587 | open Template |
| 2588 | variable {p : Shape} {n N K M r : ℕ} |
| 2589 | namespace StatusAnalysis |
| 2590 | variable {q:Format} {d : Rates} {b:Bool} |
| 2591 | namespace Quill |
| 2592 | variable (w : Quill p q d b) (t : Tagging p (Messenger q)) (z : Messenger q → F) |
| 2593 | def allure (i : Messenger q) : Appearance p := ⟨t i,w.sel i,w.flav i,z i⟩ |
| 2594 | |
| 2595 | variable (m : Mixer p n) |
| 2596 | end Quill |
| 2597 | end StatusAnalysis |
| 2598 | end HadwigerCounterexample |
| 2599 | end |
| 2600 | end Lax793645.ConstructionData.Binary |
| 2601 | end |
| 2602 | |
| 2603 | section |
| 2604 | namespace Lax793645.ConstructionData.Binary |
| 2605 | noncomputable section |
| 2606 | namespace HadwigerCounterexample |
| 2607 | open Finset Matrix LinearMap Module Filter Function |
| 2608 | open scoped BigOperators |
| 2609 | variable {A B I : Type} [Fintype A] [Fintype B] [Fintype I] |
| 2610 | def lcost (u f g : Wgt A) := avg u (fun i=>|f i-g i|) |
| 2611 | |
| 2612 | end HadwigerCounterexample |
| 2613 | end |
| 2614 | end Lax793645.ConstructionData.Binary |
| 2615 | end |
| 2616 | |
| 2617 | section |
| 2618 | namespace Lax793645.ConstructionData.Binary |
| 2619 | noncomputable section |
| 2620 | namespace HadwigerCounterexample |
| 2621 | open Finset Real Function |
| 2622 | open scoped BigOperators |
| 2623 | variable {A B I J : Type} [Fintype A] [Fintype B] [Fintype I] [Fintype J] |
| 2624 | def bower (f : Wgt A) := (∀ i,0≤ f i)∧ (∀ i,f i≤1) |
| 2625 | |
| 2626 | end HadwigerCounterexample |
| 2627 | end |
| 2628 | end Lax793645.ConstructionData.Binary |
| 2629 | end |
| 2630 | |
| 2631 | section |
| 2632 | namespace Lax793645.ConstructionData.Frames |
| 2633 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 2634 | open Finset Function |
| 2635 | noncomputable section |
| 2636 | set_option backward.isDefEq.respectTransparency false |
| 2637 | variable {A B C J : Type} [Fintype A] [Fintype B] [Fintype C] [Fintype J] |
| 2638 | def densityFamilyEnergy (ν : Wgt A) (μ : Wgt J) (d : J→ Wgt A) (P : A→ B) : ℝ := |
| 2639 | avg μ (fun i=> ode ν (banner ν P (d i))) |
| 2640 | |
| 2641 | end |
| 2642 | end Lax793645.ConstructionData.Frames |
| 2643 | end |
| 2644 | |
| 2645 | section |
| 2646 | namespace Lax793645.ConstructionData.Frames |
| 2647 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 2648 | open Finset Function |
| 2649 | open scoped Classical |
| 2650 | noncomputable section |
| 2651 | set_option backward.isDefEq.respectTransparency false |
| 2652 | variable {O X Y B : Type} [Fintype O] [Fintype X] [Fintype Y] [Fintype B] |
| 2653 | def coloredCutDensities (ν : Wgt B) (κ : Wgt X) (v : O→ X→ Y) (K : O→ X→ B) |
| 2654 | (S : B→ Prop) : O×Y→ Wgt B := |
| 2655 | fun i=> density ν (subW (coloredP κ v K i) S) |
| 2656 | |
| 2657 | end |
| 2658 | end Lax793645.ConstructionData.Frames |
| 2659 | end |
| 2660 | |
| 2661 | section |
| 2662 | namespace Lax793645.ConstructionData.Frames |
| 2663 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 2664 | open Finset Matrix |
| 2665 | noncomputable section |
| 2666 | set_option backward.isDefEq.respectTransparency false |
| 2667 | variable {I : Type} [Fintype I] [DecidableEq I] |
| 2668 | def linearFourier (f : Wgt (Vec I)) (ξ : Vec I) : ℝ := |
| 2669 | avg unif (fun x=> vectorPhase ξ x* f x) |
| 2670 | |
| 2671 | end |
| 2672 | end Lax793645.ConstructionData.Frames |
| 2673 | end |
| 2674 | |
| 2675 | section |
| 2676 | namespace Lax793645.ConstructionData.Frames |
| 2677 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 2678 | open Finset Matrix Function |
| 2679 | noncomputable section |
| 2680 | set_option backward.isDefEq.respectTransparency false |
| 2681 | variable {I : Type} [Fintype I] [DecidableEq I] |
| 2682 | def fourierNorm (f : Wgt (Vec I)) : ℝ := ∑ ξ:Vec I,|linearFourier f ξ| |
| 2683 | |
| 2684 | end |
| 2685 | end Lax793645.ConstructionData.Frames |
| 2686 | end |
| 2687 | |
| 2688 | section |
| 2689 | namespace Lax793645.ConstructionData.Frames |
| 2690 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 2691 | open Finset Matrix Function LinearMap |
| 2692 | noncomputable section |
| 2693 | set_option backward.isDefEq.respectTransparency false |
| 2694 | variable {I J : Type} [Fintype I] [Fintype J] [DecidableEq I] [DecidableEq J] |
| 2695 | variable {N : ℕ} |
| 2696 | abbrev KeyCoordinates (I : Type) (N : ℕ) := Vec (Fin N×(Bool×I)) |
| 2697 | |
| 2698 | def keyPlus : KeyCoordinates I N→ₗ[F] PlusRack I N where |
| 2699 | toFun x u i := x (u,(false,i)) |
| 2700 | map_add' _ _ := rfl |
| 2701 | map_smul' _ _ := rfl |
| 2702 | |
| 2703 | def keyMinus : KeyCoordinates I N→ₗ[F] PlusRack I N where |
| 2704 | toFun x u i := x (u,(true,i)) |
| 2705 | map_add' _ _ := rfl |
| 2706 | map_smul' _ _ := rfl |
| 2707 | |
| 2708 | def gramPrimitive (M : Mat I I) (x : KeyCoordinates I N) : F := |
| 2709 | layerPhase M N (keyPlus x) (keyMinus x) |
| 2710 | |
| 2711 | end |
| 2712 | end Lax793645.ConstructionData.Frames |
| 2713 | end |
| 2714 | |
| 2715 | section |
| 2716 | namespace Lax793645.ConstructionData.Frames |
| 2717 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 2718 | open Finset Matrix Function LinearMap |
| 2719 | noncomputable section |
| 2720 | set_option backward.isDefEq.respectTransparency false |
| 2721 | variable {I J A : Type} [Fintype I] [Fintype J] [Fintype A] |
| 2722 | [DecidableEq I] [DecidableEq J] [DecidableEq A] {N : ℕ} |
| 2723 | /-- Ambient coordinate order used by the Fourier lemmas. -/ |
| 2724 | def rackCoordinates (I : Type) (N : ℕ) : KeyCoordinates I N≃ₗ[F] Rack I N where |
| 2725 | toFun x := (keyPlus x,keyMinus x) |
| 2726 | invFun x v := if v.2.1 then x.2 v.1 v.2.2 else x.1 v.1 v.2.2 |
| 2727 | left_inv x := by funext v; rcases v with ⟨u,b,i⟩; cases b <;> rfl |
| 2728 | right_inv x := rfl |
| 2729 | map_add' _ _ := rfl |
| 2730 | map_smul' _ _ := rfl |
| 2731 | |
| 2732 | end |
| 2733 | end Lax793645.ConstructionData.Frames |
| 2734 | end |
| 2735 | |
| 2736 | section |
| 2737 | namespace Lax793645.ConstructionData.Frames |
| 2738 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 2739 | open Finset Matrix Function LinearMap |
| 2740 | open scoped Classical |
| 2741 | noncomputable section |
| 2742 | set_option backward.isDefEq.respectTransparency false |
| 2743 | variable {I : Type} [Fintype I] [DecidableEq I] {p : Shape} {n N : ℕ} |
| 2744 | def inputCoordinates (p : Shape) (n : ℕ) (I : Type) : |
| 2745 | Vec (I×Block p.g×Fin n)≃ₗ[F] Inputs p n I where |
| 2746 | toFun x i b k:=x (i,b,k) |
| 2747 | invFun x v:=x v.1 v.2.1 v.2.2 |
| 2748 | left_inv _:=rfl |
| 2749 | right_inv _:=rfl |
| 2750 | map_add' _ _:=rfl |
| 2751 | map_smul' _ _:=rfl |
| 2752 | |
| 2753 | def inputFourierNorm (w : Wgt (Inputs p n I)) : ℝ:= |
| 2754 | fourierNorm (fun x=> w (inputCoordinates p n I x)) |
| 2755 | |
| 2756 | end |
| 2757 | end Lax793645.ConstructionData.Frames |
| 2758 | end |
| 2759 | |
| 2760 | section |
| 2761 | namespace Lax793645.ConstructionData.Frames |
| 2762 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 2763 | open StatusAnalysis Finset Matrix Function Filter |
| 2764 | open scoped Classical |
| 2765 | noncomputable section |
| 2766 | set_option backward.isDefEq.respectTransparency false |
| 2767 | variable {p : Shape} {n N : ℕ} {q : Format} {d : Rates} {b : Bool} |
| 2768 | abbrev NominalAmounts (p : Shape) (q : Format) (d : Rates) (b : Bool) := |
| 2769 | ∀ i:Messenger q,Digest p.g×Par (d (parcel b i)) |
| 2770 | |
| 2771 | def nominalPrinted (b : Bool) (v : Charts p n d) (t : Tagging p (Messenger q)) |
| 2772 | (s : Messenger q→ Label p.b) (f : Messenger q→ Flavor p.g) (m : Mixer p n) |
| 2773 | (x : Inputs p n (Messenger q)) : NominalAmounts p q d b := |
| 2774 | fun i=>(scan p (t i) (f i) (x i), |
| 2775 | role p n (useAtom p (t i) (s i) (f i) (x i)), |
| 2776 | roll (v (parcel b i)) (Tsym m (useAtom p (t i) (s i) (f i) (x i)))) |
| 2777 | |
| 2778 | def joinPrinted (a : NominalAmounts p q d b) (r : Messenger q→ F) : Amounts p q d b := |
| 2779 | fun i=>(a i|>.1,a i|>.2,r i) |
| 2780 | |
| 2781 | end |
| 2782 | end Lax793645.ConstructionData.Frames |
| 2783 | end |
| 2784 | |
| 2785 | section |
| 2786 | namespace Lax793645.ConstructionData.Binary |
| 2787 | noncomputable section |
| 2788 | namespace HadwigerCounterexample |
| 2789 | open Filter Finset Matrix LinearMap Function |
| 2790 | open scoped BigOperators Topology |
| 2791 | open Template |
| 2792 | variable {p:Shape} {M n N K r s0:ℕ} |
| 2793 | namespace StatusAnalysis |
| 2794 | namespace Quill |
| 2795 | variable {q:Format} {d:Rates} {b:Bool} (w:Quill p q d b) (t : Tagging p (Messenger q)) |
| 2796 | (z:Messenger q→ F) (m:Mixer p n) |
| 2797 | def prelim (K:ℕ) (s:Charts p n d) (i:Messenger q) := |
| 2798 | d (parcel b i)≤ K^2 ∧ Injective (s (parcel b i)) ∧ |
| 2799 | ∀ x,totalRank (s (parcel b i) x)≤ K |
| 2800 | |
| 2801 | def sameInk (i:Messenger q) (v: Magazine p (d (parcel b i))) := |
| 2802 | Appearance.nearly p (w.amp i).1 (w.amp i).2.1 v |
| 2803 | |
| 2804 | end Quill |
| 2805 | end StatusAnalysis |
| 2806 | end HadwigerCounterexample |
| 2807 | end |
| 2808 | end Lax793645.ConstructionData.Binary |
| 2809 | end |
| 2810 | |
| 2811 | section |
| 2812 | namespace Lax793645.ConstructionData.Binary |
| 2813 | noncomputable section |
| 2814 | namespace HadwigerCounterexample |
| 2815 | open Finset Matrix Function Module LinearMap |
| 2816 | open scoped BigOperators |
| 2817 | variable {p:Shape} {n N M K s0:ℕ} |
| 2818 | namespace StatusAnalysis |
| 2819 | variable {q:Format} {d e: Rates} {b:Bool} |
| 2820 | abbrev Stalls (p:Shape) := Bool→ Finset (Label p.b) |
| 2821 | |
| 2822 | namespace Fabric |
| 2823 | end Fabric |
| 2824 | variable {i j:Bool} {L:ℕ} |
| 2825 | end StatusAnalysis |
| 2826 | end HadwigerCounterexample |
| 2827 | end |
| 2828 | end Lax793645.ConstructionData.Binary |
| 2829 | end |
| 2830 | |
| 2831 | section |
| 2832 | namespace Lax793645.ConstructionData.Binary |
| 2833 | noncomputable section |
| 2834 | namespace HadwigerCounterexample |
| 2835 | open Filter Matrix Finset Function LinearMap Module |
| 2836 | open scoped BigOperators Topology |
| 2837 | open Template |
| 2838 | variable {p : Shape} {N n r K : ℕ} |
| 2839 | namespace StatusAnalysis |
| 2840 | /-- envelope information to certify a generator, shared l and q. -/ |
| 2841 | structure Zodiac (p : Shape) where |
| 2842 | l : Tag p.g |
| 2843 | q : F |
| 2844 | s : Bool → Label p.b |
| 2845 | f : Bool→ Flavor p.g |
| 2846 | |
| 2847 | namespace Zodiac |
| 2848 | def aspect (w : Zodiac p) (b : Bool) : Appearance p := |
| 2849 | ⟨w.l,w.s b,w.f b,w.q⟩ |
| 2850 | |
| 2851 | def common (w : Zodiac p) := ∀ b,(w.aspect b).apt |
| 2852 | |
| 2853 | end Zodiac |
| 2854 | abbrev Terrain (p:Shape) (r:ℕ):= Tag p.g → F → Wgt (Fin r) |
| 2855 | |
| 2856 | abbrev Gazette (p:Shape) (r:ℕ) (d : Rates) := |
| 2857 | (i:Nodes)→ Appearance p → Fin r→ Wgt (Magazine p (d i)) |
| 2858 | |
| 2859 | variable {d e : Rates} |
| 2860 | namespace DualAnalysis |
| 2861 | def origami (p:Shape) (r:ℕ) (u:Terrain p r) (δ:ℝ) := |
| 2862 | (∀ i q,IsLaw (u i q)) ∧ ∀ i q,1/2 ≤ pr (u i q) (fun x=>δ ≤ u i q x) |
| 2863 | |
| 2864 | structure reports (p:Shape) (r:ℕ) (u:Terrain p r) (s:Gazette p r d) |
| 2865 | (β δ:ℝ) : Prop where |
| 2866 | law : ∀ i (x:Appearance p),x.apt → ∀ k:Fin r,IsLaw (s i x k) |
| 2867 | supp : ∀ i (x:Appearance p),x.apt →∀ k,carried (s i x k) x.fitsink |
| 2868 | generous : ∀ i (x:Appearance p), x.f=Flavor.full → x.apt → |
| 2869 | ∀ k:Fin r,δ ≤ u x.l x.q k → ∀ v: Par (d i), |
| 2870 | β ≤ pr (s i x k) (fun w=> w.2.1=v) |
| 2871 | |
| 2872 | def playbook (p : Shape) (K : ℕ) := num (Magazine p (K^2) × Magazine p (K^2)) |
| 2873 | |
| 2874 | abbrev Scriptum (p:Shape) (d e: Rates) (i : Grid) := |
| 2875 | Zodiac p × Magazine p (d i.1) × Magazine p (e i.2) |
| 2876 | |
| 2877 | abbrev Touch (p:Shape) (d e : Rates) (i : Grid) := Magazine p (d i.1) × Magazine p (e i.2) |
| 2878 | |
| 2879 | variable (u:Terrain p r) (s:Gazette p r d) (t:Gazette p r e) |
| 2880 | (η:ℝ) |
| 2881 | def couplePage (x:Zodiac p) (i:Grid) := |
| 2882 | fun j:Fin r=> pairW (s i.1 (x.aspect true) j) (t i.2 (x.aspect false) j) |
| 2883 | |
| 2884 | def circlet (x:Zodiac p) (i:Grid) : Wgt (Touch p d e i) := |
| 2885 | mixW (u x.l x.q) (couplePage s t x i) |
| 2886 | |
| 2887 | def eligible (x:Zodiac p) (i:Grid) (a : Touch p d e i) := |
| 2888 | x.common ∧ (x.aspect true).fitsink a.1 ∧ (x.aspect false).fitsink a.2 ∧ |
| 2889 | η ≤ circlet u s t x i a |
| 2890 | |
| 2891 | def stellar (A B : Stalls p) : Congress (Scriptum p d e) d e (Label p.b) := |
| 2892 | fun i=> { |
| 2893 | valid x:= x.1.s true∉ A i.1 ∧ x.1.s false∉ B i.2 ∧ eligible u s t η x.1 i x.2 |
| 2894 | writes x:= (x.1.q,x.2.1.2,x.2.2.2) |
| 2895 | addr x:= x.1.s |
| 2896 | } |
| 2897 | |
| 2898 | variable {β δ:ℝ} |
| 2899 | end DualAnalysis |
| 2900 | end StatusAnalysis |
| 2901 | end HadwigerCounterexample |
| 2902 | end |
| 2903 | end Lax793645.ConstructionData.Binary |
| 2904 | end |
| 2905 | |
| 2906 | section |
| 2907 | namespace Lax793645.ConstructionData.Binary |
| 2908 | noncomputable section |
| 2909 | namespace HadwigerCounterexample |
| 2910 | open Filter Matrix Finset Function Submodule LinearMap |
| 2911 | open scoped BigOperators Topology |
| 2912 | open Template |
| 2913 | variable {p:Shape} {N n r K : ℕ} |
| 2914 | namespace StatusAnalysis |
| 2915 | namespace DualAnalysis |
| 2916 | open Club Guild |
| 2917 | variable {d e : Rates} |
| 2918 | {u:Terrain p r} {s:Gazette p r d} {t:Gazette p r e} |
| 2919 | {β η δ:ℝ} |
| 2920 | structure RhymeSet (d : ℕ) where |
| 2921 | bit : F |
| 2922 | coal : Cell d |
| 2923 | headBit : F |
| 2924 | gamma : F |
| 2925 | |
| 2926 | def RhymeSet.read {k : ℕ} (s:RhymeSet k) (q:F) (x: Whole k) := |
| 2927 | s.bit* x.2+ dotProduct s.coal x.1.2+ (s.bit+s.headBit)* x.1.1+s.gamma* q |
| 2928 | |
| 2929 | def RhymeSet.soot {k : ℕ} (s:RhymeSet k) {p:Shape} (x:Appearance p) (y:Magazine p k) := |
| 2930 | s.read x.q y.2 |
| 2931 | |
| 2932 | def leftChime (q:DualCoefficients d e) (i:Grid) : RhymeSet (d i.1) := |
| 2933 | ⟨q.left i.2,q.north i,q.hed i,0⟩ |
| 2934 | |
| 2935 | def rightChime (q:DualCoefficients d e) (i:Grid) : RhymeSet (e i.2) := |
| 2936 | ⟨q.right i.1,q.south i,q.hed i,q.gam i⟩ |
| 2937 | |
| 2938 | end DualAnalysis |
| 2939 | end StatusAnalysis |
| 2940 | end HadwigerCounterexample |
| 2941 | end |
| 2942 | end Lax793645.ConstructionData.Binary |
| 2943 | end |
| 2944 | |
| 2945 | section |
| 2946 | namespace Lax793645.ConstructionData.Frames |
| 2947 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 2948 | open StatusAnalysis StatusAnalysis.DualAnalysis Club Guild Finset Function |
| 2949 | noncomputable section |
| 2950 | set_option backward.isDefEq.respectTransparency false |
| 2951 | variable {p : Shape} {r : ℕ} {d e : Rates} |
| 2952 | variable {u : Terrain p r} {s : Gazette p r d} {t : Gazette p r e} |
| 2953 | variable {β δ η : ℝ} |
| 2954 | /-- A fixed positive support gap makes threshold availability exact. |
| 2955 | The statement applies to all labels retained for the scalar system. -/ |
| 2956 | def HasStatusSupportGap (u : Terrain p r) (s : Gazette p r d) |
| 2957 | (t : Gazette p r e) (η : ℝ) : Prop := |
| 2958 | ∀ (x : Zodiac p),x.common→∀ i y, |
| 2959 | circlet u s t x i y=0 ∨ η≤ circlet u s t x i y |
| 2960 | |
| 2961 | end |
| 2962 | end Lax793645.ConstructionData.Frames |
| 2963 | end |
| 2964 | |
| 2965 | section |
| 2966 | namespace Lax793645.ConstructionData.Binary |
| 2967 | noncomputable section |
| 2968 | namespace HadwigerCounterexample |
| 2969 | open Finset Matrix Filter Function Submodule Module LinearMap |
| 2970 | open scoped BigOperators |
| 2971 | variable {A B J H : Type} [Fintype A] [Fintype B] [Fintype J] |
| 2972 | namespace StatusAnalysis |
| 2973 | namespace DualAnalysis |
| 2974 | variable {p:Shape} {d e: Rates} {r K:ℕ} |
| 2975 | abbrev Pulsar (p:Shape) (r:ℕ):= Tag p.g → F → Fin r→ F |
| 2976 | |
| 2977 | variable (u:Terrain p r) (s:Gazette p r d) (t:Gazette p r e) |
| 2978 | end DualAnalysis |
| 2979 | end StatusAnalysis |
| 2980 | end HadwigerCounterexample |
| 2981 | end |
| 2982 | end Lax793645.ConstructionData.Binary |
| 2983 | end |
| 2984 | |
| 2985 | section |
| 2986 | namespace Lax793645.ConstructionData.Frames |
| 2987 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 2988 | open StatusAnalysis StatusAnalysis.DualAnalysis Club Guild Function Finset |
| 2989 | noncomputable section |
| 2990 | set_option backward.isDefEq.respectTransparency false |
| 2991 | variable {p : Shape} {r : ℕ} {d e : Rates} |
| 2992 | variable {u : Terrain p r} {s : Gazette p r d} {t : Gazette p r e} |
| 2993 | variable {β δ η : ℝ} |
| 2994 | def ExactStatusPrediction (u : Terrain p r) (s : Gazette p r d) |
| 2995 | (i : Nodes) (A : Finset (Label p.b)) (a : RhymeSet (d i)) (f : Pulsar p r) : Prop := |
| 2996 | ∀ x : Appearance p,x.s∉A→ x.apt→∀ c,0< u x.l x.q c→ |
| 2997 | ∀ v,0< s i x c v→ a.soot x v=f x.l x.q c |
| 2998 | |
| 2999 | end |
| 3000 | end Lax793645.ConstructionData.Frames |
| 3001 | end |
| 3002 | |
| 3003 | section |
| 3004 | namespace Lax793645.ConstructionData.Binary |
| 3005 | noncomputable section |
| 3006 | namespace HadwigerCounterexample |
| 3007 | open Matrix Filter Finset LinearMap Module Function |
| 3008 | open scoped BigOperators Topology |
| 3009 | open Template |
| 3010 | namespace StatusAnalysis |
| 3011 | namespace DualAnalysis |
| 3012 | variable {p:Shape} {r n N K:ℕ} {d:Rates} |
| 3013 | def yokeSet {n:ℕ} (w:Cell n) (α:F) : RhymeSet n := |
| 3014 | ⟨1,w,1+α,0⟩ |
| 3015 | |
| 3016 | end DualAnalysis |
| 3017 | end StatusAnalysis |
| 3018 | end HadwigerCounterexample |
| 3019 | end |
| 3020 | end Lax793645.ConstructionData.Binary |
| 3021 | end |
| 3022 | |
| 3023 | section |
| 3024 | namespace Lax793645.ConstructionData.Frames |
| 3025 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 3026 | open StatusAnalysis StatusAnalysis.DualAnalysis Function Finset |
| 3027 | noncomputable section |
| 3028 | set_option backward.isDefEq.respectTransparency false |
| 3029 | set_option maxHeartbeats 500000 |
| 3030 | variable {p : Shape} {r : ℕ} {d : Rates} |
| 3031 | def SamePrediction (u : Terrain p r) (f g : Pulsar p r) : Prop := |
| 3032 | ∀ l q c,0< u l q c→ f l q c=g l q c |
| 3033 | |
| 3034 | def ExactCatalog (u : Terrain p r) (s : Gazette p r d) |
| 3035 | (B : ℕ) (f : Nodes→ Pulsar p r) : Prop := |
| 3036 | ∀ i E,(E.card≤ B)→∀ w α g, |
| 3037 | ExactStatusPrediction u s i E (yokeSet w α) g→ SamePrediction u g (f i) |
| 3038 | |
| 3039 | end |
| 3040 | end Lax793645.ConstructionData.Frames |
| 3041 | end |
| 3042 | |
| 3043 | section |
| 3044 | namespace Lax793645.ConstructionData.Binary |
| 3045 | noncomputable section |
| 3046 | namespace HadwigerCounterexample |
| 3047 | open Filter Finset Matrix Module LinearMap |
| 3048 | open scoped BigOperators Topology |
| 3049 | variable {p:Shape} {r n:ℕ} |
| 3050 | namespace StatusAnalysis |
| 3051 | namespace DualAnalysis |
| 3052 | variable {d e:Rates} {u:Terrain p r} {s:Gazette p r d} {t:Gazette p r e} |
| 3053 | open PredictionClass |
| 3054 | abbrev styles (d:Rates) := ∀ i:Nodes, Cell (d i) |
| 3055 | |
| 3056 | end DualAnalysis |
| 3057 | end StatusAnalysis |
| 3058 | end HadwigerCounterexample |
| 3059 | end |
| 3060 | end Lax793645.ConstructionData.Binary |
| 3061 | end |
| 3062 | |
| 3063 | section |
| 3064 | namespace Lax793645.ConstructionData.Frames |
| 3065 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 3066 | open StatusAnalysis StatusAnalysis.DualAnalysis Function Finset |
| 3067 | noncomputable section |
| 3068 | set_option backward.isDefEq.respectTransparency false |
| 3069 | set_option maxHeartbeats 700000 |
| 3070 | variable {p : Shape} {r : ℕ} {d e : Rates} |
| 3071 | def TesterSeparated (u : Terrain p r) (Free : Pulsar p r→ Prop) : Prop := |
| 3072 | ∀ f g γ,Free f→ Free g→ |
| 3073 | SamePrediction u f (fun l q c=> g l q c+γ* q)→γ=0 |
| 3074 | |
| 3075 | /-- The seven possible pairs consist of the zero pair and three |
| 3076 | nonzero endpoint masks for each of the two second-side predictors. -/ |
| 3077 | def sevenPredictionPairs (f : Nodes→ Pulsar p r) : Finset (Nodes→ Pulsar p r) := by |
| 3078 | classical |
| 3079 | exact {0} ∪ (univ.image fun j : Nodes=> fun i=> if i then f j else 0) ∪ |
| 3080 | (univ.image fun j : Nodes=> fun i=> if i then 0 else f j) ∪ |
| 3081 | (univ.image fun j : Nodes=> fun _=> f j) |
| 3082 | |
| 3083 | def ExactAnnounced (u : Terrain p r) (s : Gazette p r d) |
| 3084 | (cat : Nodes→ Pulsar p r) (B : ℕ) : Prop := |
| 3085 | ∃ f∈sevenPredictionPairs cat,∃ w : styles d,∃ α : Party,∃ E : Stalls p, |
| 3086 | ∀ i,(E i).card≤ B ∧ ExactStatusPrediction u s i (E i) (yokeSet (w i) (α i)) (f i) |
| 3087 | |
| 3088 | end |
| 3089 | end Lax793645.ConstructionData.Frames |
| 3090 | end |
| 3091 | |
| 3092 | section |
| 3093 | namespace Lax793645.ConstructionData.Frames |
| 3094 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 3095 | open StatusAnalysis StatusAnalysis.DualAnalysis Club Guild Function LinearMap Finset Matrix Submodule |
| 3096 | open scoped BigOperators Classical |
| 3097 | noncomputable section |
| 3098 | set_option backward.isDefEq.respectTransparency false |
| 3099 | set_option maxHeartbeats 1000000 |
| 3100 | variable {p : Shape} {n N r K c R : ℕ} {d e : Rates} |
| 3101 | variable {u : Terrain p r} {s : Gazette p r d} {t : Gazette p r e} |
| 3102 | variable {β δ η : ℝ} |
| 3103 | def GenericStatusPrediction (u : Terrain p r) (s : Gazette p r d) |
| 3104 | (i : Nodes) (A : Finset (Label p.b)) (a : RhymeSet (d i)) (f : Pulsar p r) : Prop := |
| 3105 | ∀ x : Appearance p,x.s∉A→ x.apt→ x.f=Flavor.full→∀ c,0< u x.l x.q c→ |
| 3106 | ∀ v,0< s i x c v→ a.soot x v=f x.l x.q c |
| 3107 | |
| 3108 | def GenericStatusContinuation (u : Terrain p r) (s : Gazette p r d) (B : ℕ) : Prop := |
| 3109 | ∀ i E,E.card≤ B→∀ a f,GenericStatusPrediction u s i E a f→ |
| 3110 | ExactStatusPrediction u s i ∅ a f |
| 3111 | |
| 3112 | def genericStellar (u : Terrain p r) (s : Gazette p r d) (t : Gazette p r e) |
| 3113 | (η : ℝ) (A B : Stalls p) : Congress (Scriptum p d e) d e (Label p.b) := |
| 3114 | fun i=>{stellar u s t η A B i with |
| 3115 | valid x:=(stellar u s t η A B i).valid x ∧ ∀ side,x.1.f side=Flavor.full} |
| 3116 | |
| 3117 | end |
| 3118 | end Lax793645.ConstructionData.Frames |
| 3119 | end |
| 3120 | |
| 3121 | section |
| 3122 | namespace Lax793645.ConstructionData.Frames |
| 3123 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 3124 | open Function LinearMap Module Finset |
| 3125 | noncomputable section |
| 3126 | set_option backward.isDefEq.respectTransparency false |
| 3127 | variable {V Q A B T : Type} [AddCommGroup V] [Module F V] |
| 3128 | /-- The cells are precisely the fibers of one linear map. Merely being |
| 3129 | a function of linear coordinates would permit arbitrary coarsenings. -/ |
| 3130 | def HasFullLinearCells (f : Q→ V→ A) (R : ℕ) : Prop := |
| 3131 | ∃ r : ℕ,r≤ R ∧ ∃ L : V→ₗ[F]Vec (Fin r), |
| 3132 | ∀ q x y,f q x=f q y ↔ L x=L y |
| 3133 | |
| 3134 | end |
| 3135 | end Lax793645.ConstructionData.Frames |
| 3136 | end |
| 3137 | |
| 3138 | section |
| 3139 | namespace Lax793645.ConstructionData.Frames |
| 3140 | noncomputable section |
| 3141 | abbrev QField := ZMod 2 |
| 3142 | |
| 3143 | variable {B H : Type} [AddCommGroup B] [Module QField B] |
| 3144 | [AddCommGroup H] [Module QField H] |
| 3145 | end |
| 3146 | end Lax793645.ConstructionData.Frames |
| 3147 | end |
| 3148 | |
| 3149 | section |
| 3150 | namespace Lax793645.ConstructionData.Frames |
| 3151 | noncomputable section |
| 3152 | set_option backward.isDefEq.respectTransparency false |
| 3153 | open scoped BigOperators |
| 3154 | abbrev Hyperbolic (h : ℕ) := (Fin h→ QField)×(Fin h→ QField) |
| 3155 | |
| 3156 | def hyperbolicQuadratic (h : ℕ) : QuadraticForm QField (Hyperbolic h) := |
| 3157 | LinearMap.BilinMap.toQuadraticMap |
| 3158 | ((dotProductBilin QField QField : (Fin h→ QField)→ₗ[QField] |
| 3159 | (Fin h→ QField)→ₗ[QField] QField).compl₁₂ |
| 3160 | (LinearMap.fst QField _ _) (LinearMap.snd QField _ _)) |
| 3161 | |
| 3162 | theorem hyperbolic_apply (h : ℕ) (v : Hyperbolic h) : |
| 3163 | hyperbolicQuadratic h v=dotProduct v.1 v.2 := rfl |
| 3164 | |
| 3165 | theorem hyperbolic_polar (h : ℕ) (v w : Hyperbolic h) : |
| 3166 | (hyperbolicQuadratic h).polarBilin v w=dotProduct v.1 w.2+dotProduct w.1 v.2 := by |
| 3167 | rw [QuadraticMap.polarBilin_apply_apply,QuadraticMap.polar] |
| 3168 | simp only [hyperbolic_apply,Prod.fst_add,Prod.snd_add,add_dotProduct,dotProduct_add] |
| 3169 | ring |
| 3170 | |
| 3171 | theorem hyperbolic_nondegenerate (h : ℕ) : |
| 3172 | (hyperbolicQuadratic h).polarBilin.Nondegenerate := by |
| 3173 | constructor |
| 3174 | · intro v hv |
| 3175 | apply Prod.ext |
| 3176 | · funext i |
| 3177 | have hi := hv (0,Pi.single i 1) |
| 3178 | change (hyperbolicQuadratic h).polarBilin v (0,Pi.single i 1)=0 at hi |
| 3179 | rw [hyperbolic_polar] at hi |
| 3180 | simpa using hi |
| 3181 | · funext i |
| 3182 | have hi := hv (Pi.single i 1,0) |
| 3183 | change (hyperbolicQuadratic h).polarBilin v (Pi.single i 1,0)=0 at hi |
| 3184 | rw [hyperbolic_polar] at hi |
| 3185 | simpa using hi |
| 3186 | · intro v hv |
| 3187 | apply Prod.ext |
| 3188 | · funext i |
| 3189 | have hi := hv (0,Pi.single i 1) |
| 3190 | change (hyperbolicQuadratic h).polarBilin (0,Pi.single i 1) v=0 at hi |
| 3191 | rw [hyperbolic_polar] at hi |
| 3192 | simpa using hi |
| 3193 | · funext i |
| 3194 | have hi := hv (Pi.single i 1,0) |
| 3195 | change (hyperbolicQuadratic h).polarBilin (Pi.single i 1,0) v=0 at hi |
| 3196 | rw [hyperbolic_polar] at hi |
| 3197 | simpa using hi |
| 3198 | |
| 3199 | end |
| 3200 | end Lax793645.ConstructionData.Frames |
| 3201 | end |
| 3202 | |
| 3203 | section |
| 3204 | namespace Lax793645.ConstructionData.Frames |
| 3205 | open Matrix |
| 3206 | noncomputable section |
| 3207 | set_option backward.isDefEq.respectTransparency false |
| 3208 | abbrev HyperbolicIdx (h : ℕ) := Fin h⊕Fin h |
| 3209 | |
| 3210 | /-- An ordered matrix representative: its symmetric part is the polar |
| 3211 | form, whereas the matrix itself retains the quadratic values. -/ |
| 3212 | def hyperbolicMatrix (h : ℕ) : Matrix (HyperbolicIdx h) (HyperbolicIdx h) QField := |
| 3213 | Matrix.fromBlocks 0 1 0 0 |
| 3214 | |
| 3215 | def hyperbolicCoordinates (h : ℕ) : |
| 3216 | (HyperbolicIdx h→ QField)≃ₗ[QField]Hyperbolic h := |
| 3217 | LinearEquiv.sumArrowLequivProdArrow _ _ _ _ |
| 3218 | |
| 3219 | theorem hyperbolic_matrix_apply (h : ℕ) (v : HyperbolicIdx h→ QField) : |
| 3220 | (hyperbolicMatrix h).toQuadraticForm' v= |
| 3221 | hyperbolicQuadratic h (hyperbolicCoordinates h v) := by |
| 3222 | change Matrix.toBilin' (hyperbolicMatrix h) v v=_ |
| 3223 | rw [Matrix.toBilin'_apply',hyperbolic_apply] |
| 3224 | change dotProduct v (hyperbolicMatrix h*ᵥv)=dotProduct (v∘Sum.inl) (v∘Sum.inr) |
| 3225 | simp only [hyperbolicMatrix,Matrix.fromBlocks_mulVec,Matrix.zero_mulVec, |
| 3226 | Matrix.one_mulVec,zero_add,add_zero] |
| 3227 | rw [show v=Sum.elim (v∘Sum.inl) (v∘Sum.inr) from by ext i; cases i <;> rfl] |
| 3228 | simp only [sumElim_dotProduct_sumElim,dotProduct_zero,add_zero] |
| 3229 | rfl |
| 3230 | |
| 3231 | end |
| 3232 | end Lax793645.ConstructionData.Frames |
| 3233 | end |
| 3234 | |
| 3235 | section |
| 3236 | namespace Lax793645.ConstructionData.Frames |
| 3237 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 3238 | open Submodule Module |
| 3239 | open scoped BigOperators |
| 3240 | noncomputable section |
| 3241 | set_option backward.isDefEq.respectTransparency false |
| 3242 | theorem linear_image_dimension_growth {V W : Type} [AddCommGroup V] [Module F V] |
| 3243 | [AddCommGroup W] [Module F W] [FiniteDimensional F V] |
| 3244 | (f : V→ₗ[F]W) (S T : Space V) (hST : S≤ T) : |
| 3245 | dim (T.map f)-dim (S.map f)≤ dim T-dim S := by |
| 3246 | let fS:=f.comp S.subtype |
| 3247 | let fT:=f.comp T.subtype |
| 3248 | let g : fS.ker→ₗ[F]fT.ker:= |
| 3249 | ((Submodule.inclusion hST).comp fS.ker.subtype).codRestrict fT.ker (fun x=> x.property) |
| 3250 | have hg : Function.Injective g := by |
| 3251 | intro x y h |
| 3252 | apply Subtype.ext |
| 3253 | apply Subtype.ext |
| 3254 | exact congrArg (fun z : fT.ker=>(z.val:V)) h |
| 3255 | have hk:=LinearMap.finrank_le_finrank_of_injective hg |
| 3256 | have hs:=fS.finrank_range_add_finrank_ker |
| 3257 | have ht:=fT.finrank_range_add_finrank_ker |
| 3258 | have hrS : fS.range=S.map f := by rw [LinearMap.range_comp,Submodule.range_subtype] |
| 3259 | have hrT : fT.range=T.map f := by rw [LinearMap.range_comp,Submodule.range_subtype] |
| 3260 | rw [hrS] at hs |
| 3261 | rw [hrT] at ht |
| 3262 | have hm:=Submodule.finrank_mono hST |
| 3263 | change dim fS.ker≤ dim fT.ker at hk |
| 3264 | change dim (S.map f)+dim fS.ker=dim S at hs |
| 3265 | change dim (T.map f)+dim fT.ker=dim T at ht |
| 3266 | omega |
| 3267 | |
| 3268 | variable {I : Type} [Fintype I] {V : I→ Type} |
| 3269 | [∀ i,AddCommGroup (V i)] [∀ i,Module F (V i)] |
| 3270 | /-- Close a pin space under the coordinate block projections. -/ |
| 3271 | def blockClosure (S : Space (∀ i,V i)) : Space (∀ i,V i) := |
| 3272 | Submodule.pi Set.univ (fun i=> S.map (LinearMap.proj i)) |
| 3273 | |
| 3274 | omit [Fintype I] in |
| 3275 | theorem le_blockClosure (S : Space (∀ i,V i)) : S≤ blockClosure S := by |
| 3276 | intro x hx |
| 3277 | exact Submodule.mem_pi.mpr (fun i _=>⟨x,hx,rfl⟩) |
| 3278 | |
| 3279 | omit [Fintype I] in |
| 3280 | theorem blockClosure_projection (S : Space (∀ i,V i)) (i : I) : |
| 3281 | (blockClosure S).map (LinearMap.proj i)=S.map (LinearMap.proj i) := by |
| 3282 | apply le_antisymm |
| 3283 | · rintro _ ⟨x,hx,rfl⟩ |
| 3284 | exact (Submodule.mem_pi.mp hx) i (Set.mem_univ i) |
| 3285 | · exact Submodule.map_mono (le_blockClosure S) |
| 3286 | |
| 3287 | omit [Fintype I] in |
| 3288 | theorem blockClosure_idempotent (S : Space (∀ i,V i)) : |
| 3289 | blockClosure (blockClosure S)=blockClosure S := by |
| 3290 | unfold blockClosure |
| 3291 | congr 1 |
| 3292 | funext i |
| 3293 | exact blockClosure_projection S i |
| 3294 | |
| 3295 | def blockClosureEquiv (S : Space (∀ i,V i)) : |
| 3296 | blockClosure S≃ₗ[F](∀ i,S.map (LinearMap.proj i)) where |
| 3297 | toFun x i:=⟨x.val i,(Submodule.mem_pi.mp x.property) i (Set.mem_univ i)⟩ |
| 3298 | invFun x:=⟨fun i=>(x i).val,Submodule.mem_pi.mpr (fun i _=>(x i).property)⟩ |
| 3299 | left_inv _:=rfl |
| 3300 | right_inv _:=rfl |
| 3301 | map_add' _ _:=rfl |
| 3302 | map_smul' _ _:=rfl |
| 3303 | |
| 3304 | variable [∀ i,FiniteDimensional F (V i)] |
| 3305 | theorem blockClosure_dimension (S : Space (∀ i,V i)) : |
| 3306 | dim (blockClosure S)=∑ i,dim (S.map (LinearMap.proj i)) := by |
| 3307 | unfold dim |
| 3308 | rw [(blockClosureEquiv S).finrank_eq] |
| 3309 | exact Module.finrank_pi_fintype F |
| 3310 | |
| 3311 | /-- Closing a new t-dimensional extension of an already closed pin space |
| 3312 | adds at most one copy of t for each coordinate block. -/ |
| 3313 | theorem blockClosure_dimension_step (S T : Space (∀ i,V i)) (hST : S≤ T) |
| 3314 | (hS : blockClosure S=S) : |
| 3315 | dim (blockClosure T)-dim S≤ Fintype.card I*(dim T-dim S) := by |
| 3316 | have h (i : I) : dim (T.map (LinearMap.proj i))≤ |
| 3317 | dim (S.map (LinearMap.proj i))+(dim T-dim S) := by |
| 3318 | have hi:=linear_image_dimension_growth (LinearMap.proj i) S T hST |
| 3319 | omega |
| 3320 | have hh:=Finset.sum_le_sum (s:=Finset.univ) (fun i _=> h i) |
| 3321 | rw [Finset.sum_add_distrib,←blockClosure_dimension,←blockClosure_dimension,hS] at hh |
| 3322 | simp only [Finset.sum_const,Finset.card_univ,smul_eq_mul] at hh |
| 3323 | omega |
| 3324 | |
| 3325 | end |
| 3326 | end Lax793645.ConstructionData.Frames |
| 3327 | end |
| 3328 | |
| 3329 | section |
| 3330 | namespace Lax793645.ConstructionData.Frames |
| 3331 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 3332 | open Matrix Submodule |
| 3333 | open scoped BigOperators |
| 3334 | noncomputable section |
| 3335 | set_option backward.isDefEq.respectTransparency false |
| 3336 | abbrev ImagePlan (C I : Type) := C→ Space (Vec I) |
| 3337 | |
| 3338 | def imagePlanRank {C I : Type} [Fintype C] [Fintype I] (P : ImagePlan C I) :=∑ e,dim (P e) |
| 3339 | |
| 3340 | structure ImagePin (C I : Type) (N : ℕ) where |
| 3341 | sp : ImagePlan C I |
| 3342 | target : C→ Mat (Fin N) I |
| 3343 | |
| 3344 | variable {A C I : Type} [Fintype A] [Fintype C] [Fintype I] [DecidableEq I] {N : ℕ} |
| 3345 | def imagePinAgree (X : A→ C→ Mat (Fin N) I) (P : ImagePin C I N) (x : A) := |
| 3346 | ∀ e,∀ v∈P.sp e,X x e*ᵥv=P.target e*ᵥv |
| 3347 | |
| 3348 | end |
| 3349 | end Lax793645.ConstructionData.Frames |
| 3350 | end |
| 3351 | |
| 3352 | section |
| 3353 | namespace Lax793645.ConstructionData.Frames |
| 3354 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 3355 | open Matrix Submodule |
| 3356 | open scoped BigOperators |
| 3357 | noncomputable section |
| 3358 | set_option backward.isDefEq.respectTransparency false |
| 3359 | variable {A C I : Type} [Fintype A] [Fintype C] [Fintype I] [DecidableEq I] {N : ℕ} |
| 3360 | def imagePinClear (X : A→ C→ Mat (Fin N) I) (a : ImagePin C I N) (ζ : ℝ) (w : Wgt A) := |
| 3361 | ∀ b : ImagePin C I N,pr w (imagePinAgree X b)≤ |
| 3362 | fee N ζ (imagePlanRank (a.sp⊔b.sp)-imagePlanRank a.sp) |
| 3363 | |
| 3364 | structure ImageClosure (C I : Type) [Fintype C] [Fintype I] (c : ℕ) where |
| 3365 | close : ImagePlan C I→ ImagePlan C I |
| 3366 | extensive : ∀ P,P≤ close P |
| 3367 | idempotent : ∀ P,close (close P)=close P |
| 3368 | growth : ∀ P Q,P≤ Q→ close P=P→ |
| 3369 | imagePlanRank (close Q)-imagePlanRank P≤ c*(imagePlanRank Q-imagePlanRank P) |
| 3370 | |
| 3371 | end |
| 3372 | end Lax793645.ConstructionData.Frames |
| 3373 | end |
| 3374 | |
| 3375 | section |
| 3376 | namespace Lax793645.ConstructionData.Frames |
| 3377 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 3378 | open Matrix LinearMap Module Submodule |
| 3379 | open scoped BigOperators |
| 3380 | noncomputable section |
| 3381 | set_option backward.isDefEq.respectTransparency false |
| 3382 | variable {A C I : Type} [Fintype A] [Fintype C] [Fintype I] [DecidableEq I] {N : ℕ} |
| 3383 | abbrev ImageCross (C I : Type) := C→ Mat I I |
| 3384 | |
| 3385 | end |
| 3386 | end Lax793645.ConstructionData.Frames |
| 3387 | end |
| 3388 | |
| 3389 | section |
| 3390 | namespace Lax793645.ConstructionData.Frames |
| 3391 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 3392 | open Matrix LinearMap Finset |
| 3393 | noncomputable section |
| 3394 | set_option backward.isDefEq.respectTransparency false |
| 3395 | variable {A C I : Type} [Fintype A] [Fintype C] [Fintype I] [DecidableEq I] {N c : ℕ} |
| 3396 | def imageDustPin : ImagePin C I N:=⟨⊥,0⟩ |
| 3397 | |
| 3398 | structure ImageRipe (X : A→ C→ Mat (Fin N) I) (cl : ImageClosure C I c) |
| 3399 | (w μ : Wgt A) (S : Finset A) (a : ImagePin C I N) (D ζ : ℝ) (K : ℕ) : Prop where |
| 3400 | pos : 0< partMass w S |
| 3401 | fixpin : ∀ x∈S,imagePinAgree X a x |
| 3402 | closed : cl.close a.sp=a.sp |
| 3403 | bound : imagePlanRank a.sp≤ K |
| 3404 | clear : imagePinClear X a ζ (partW w S) |
| 3405 | density x : partW w S x≤ bp (D* N)*μ x |
| 3406 | |
| 3407 | structure ImageLeafMixture (A C I : Type) [Fintype C] [Fintype I] (N : ℕ) where |
| 3408 | T : Tiles A |
| 3409 | pin : Finset A→ ImagePin C I N |
| 3410 | |
| 3411 | namespace ImageLeafMixture |
| 3412 | variable (s : ImageLeafMixture A C I N) |
| 3413 | def poller (x : A) : ImagePin C I N:= |
| 3414 | open scoped Classical in |
| 3415 | if h : inTiles s.T x then s.pin h.choose else imageDustPin |
| 3416 | |
| 3417 | def rooting (x : A):=(s.poller x).sp |
| 3418 | |
| 3419 | def amount (w : Wgt A):=allMass w s.T |
| 3420 | |
| 3421 | def sap (w : Wgt A):=allW w s.T |
| 3422 | |
| 3423 | def within (P : A→ Prop):=∀ i∈s.T,∀ x∈i,P x |
| 3424 | |
| 3425 | structure strength (X : A→ C→ Mat (Fin N) I) (cl : ImageClosure C I c) |
| 3426 | (w μ : Wgt A) (D ζ : ℝ) (K : ℕ) : Prop where |
| 3427 | part : apart s.T |
| 3428 | leaf : ∀ i∈s.T,ImageRipe X cl w μ i (s.pin i) D ζ K |
| 3429 | |
| 3430 | variable {s} {X : A→ C→ Mat (Fin N) I} {cl : ImageClosure C I c} |
| 3431 | {w μ : Wgt A} {D ζ : ℝ} {K : ℕ} |
| 3432 | end ImageLeafMixture |
| 3433 | end |
| 3434 | end Lax793645.ConstructionData.Frames |
| 3435 | end |
| 3436 | |
| 3437 | section |
| 3438 | namespace Lax793645.ConstructionData.Frames |
| 3439 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 3440 | open StatusAnalysis Matrix LinearMap Submodule Module Finset Function |
| 3441 | open scoped BigOperators |
| 3442 | noncomputable section |
| 3443 | namespace IndependentClub |
| 3444 | variable {L I S X Y : Type} [DecidableEq L] [DecidableEq I] [Fintype S] |
| 3445 | variable [AddCommGroup X] [Module F X] [AddCommGroup Y] [Module F Y] |
| 3446 | variable (C : Club I X L) (U : Bool → Space (Vec S)) (v : Bool → I → Vec S) |
| 3447 | def bundle (p : Finset I) (s : Straps L) : Prop := |
| 3448 | (∀ i∈p,C.zone s i) ∧ ∀ b,LinearIndepOn F ((U b).mkQ ∘ v b) (p : Set I) |
| 3449 | |
| 3450 | def length3 (s : Straps L) (π : X →ₗ[F] Y) (x : X) : Prop := |
| 3451 | ∃ p : Finset I,bundle C U v p s ∧ p.card ≤ 3 ∧ C.contents p=x ∧ π x=0 |
| 3452 | |
| 3453 | def ration (s : Straps L) (π : X →ₗ[F] Y) : Space X := |
| 3454 | Submodule.span F (length3 C U v s π) |
| 3455 | |
| 3456 | end IndependentClub |
| 3457 | end |
| 3458 | end Lax793645.ConstructionData.Frames |
| 3459 | end |
| 3460 | |
| 3461 | section |
| 3462 | namespace Lax793645.ConstructionData.Frames |
| 3463 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 3464 | open StatusAnalysis Matrix LinearMap Submodule Module Finset Function |
| 3465 | open scoped BigOperators |
| 3466 | noncomputable section |
| 3467 | namespace IndependentClub |
| 3468 | variable {L I S X Y : Type} [DecidableEq L] [DecidableEq I] [Fintype S] |
| 3469 | variable [AddCommGroup X] [Module F X] [AddCommGroup Y] [Module F Y] |
| 3470 | variable (C : Club I X L) (U : Bool → Space (Vec S)) (v : Bool → I → Vec S) |
| 3471 | def enlarge (p : Finset I) (b : Bool) : Space (Vec S) := |
| 3472 | U b ⊔ Submodule.span F (v b '' (p : Set I)) |
| 3473 | |
| 3474 | variable [Module.Finite F X] |
| 3475 | end IndependentClub |
| 3476 | end |
| 3477 | end Lax793645.ConstructionData.Frames |
| 3478 | end |
| 3479 | |
| 3480 | section |
| 3481 | namespace Lax793645.ConstructionData.Frames |
| 3482 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 3483 | noncomputable section |
| 3484 | set_option backward.isDefEq.respectTransparency false |
| 3485 | variable {B R V : Type} [AddCommGroup B] [Module QField B] |
| 3486 | [AddCommGroup R] [Module QField R] [AddCommGroup V] [Module QField V] |
| 3487 | def quadraticFramesAt (q : QuadraticForm QField V) (C : QuadraticForm QField B→ Prop) |
| 3488 | (P : B→ₗ[QField]V) := Function.Injective P ∧ C (q.comp P) |
| 3489 | |
| 3490 | end |
| 3491 | end Lax793645.ConstructionData.Frames |
| 3492 | end |
| 3493 | |
| 3494 | section |
| 3495 | namespace Lax793645.ConstructionData.Frames |
| 3496 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 3497 | noncomputable section |
| 3498 | set_option backward.isDefEq.respectTransparency false |
| 3499 | variable {B C V R : Type} [AddCommGroup B] [Module QField B] |
| 3500 | [AddCommGroup C] [Module QField C] [AddCommGroup V] [Module QField V] |
| 3501 | [AddCommGroup R] [Module QField R] |
| 3502 | /-- The three stored blocks are one primal block and the two channel blocks. -/ |
| 3503 | abbrev QuadraticFull (B C : Type) := B×(C×C) |
| 3504 | |
| 3505 | def quadraticPrimalIn : B→ₗ[QField]QuadraticFull B C:=LinearMap.inl QField _ _ |
| 3506 | |
| 3507 | def quadraticXIn : C→ₗ[QField]QuadraticFull B C:= |
| 3508 | (LinearMap.inr QField _ _).comp (LinearMap.inl QField _ _) |
| 3509 | |
| 3510 | def quadraticYIn : C→ₗ[QField]QuadraticFull B C:= |
| 3511 | (LinearMap.inr QField _ _).comp (LinearMap.inr QField _ _) |
| 3512 | |
| 3513 | /-- Exactly the proposed own-frame conditions: a prescribed quadratic form |
| 3514 | on the primal image and polar orthogonality of X to that image. Y is free. -/ |
| 3515 | def quadraticChannelClass (Q : QuadraticForm QField B) |
| 3516 | (A : QuadraticForm QField (QuadraticFull B C)) : Prop := |
| 3517 | A.comp quadraticPrimalIn=Q ∧ |
| 3518 | ∀ (c : C) (b : B),A.polarBilin (quadraticXIn c) (quadraticPrimalIn b)=0 |
| 3519 | |
| 3520 | def quadraticChannelValid (q : QuadraticForm QField V) (Q : QuadraticForm QField B) |
| 3521 | (P : QuadraticFull B C→ₗ[QField]V) := |
| 3522 | quadraticFramesAt q (quadraticChannelClass Q) P |
| 3523 | |
| 3524 | def quadraticChannelRaw [Fintype (QuadraticFull B C→ₗ[QField]V)] |
| 3525 | (q : QuadraticForm QField V) (Q : QuadraticForm QField B) : |
| 3526 | Wgt (QuadraticFull B C→ₗ[QField]V):=unifOn (quadraticChannelValid q Q) |
| 3527 | |
| 3528 | end |
| 3529 | end Lax793645.ConstructionData.Frames |
| 3530 | end |
| 3531 | |
| 3532 | section |
| 3533 | namespace Lax793645.ConstructionData.Frames |
| 3534 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 3535 | open Matrix Submodule Module LinearMap |
| 3536 | noncomputable section |
| 3537 | variable {I : Type} [Fintype I] |
| 3538 | /-- Squares in a subspace, over the binary field. -/ |
| 3539 | def quadraticSquares (S : Space (Vec I)) : Space (Mat I I) := |
| 3540 | Submodule.span F {W | ∃ x∈S,W=vecMulVec x x} |
| 3541 | |
| 3542 | def quadraticCross (K : Space (Vec I)) : Space (Mat I I) := |
| 3543 | Submodule.span F {W | ∃ k∈K,∃ b,W=vecMulVec k b+vecMulVec b k} |
| 3544 | |
| 3545 | end |
| 3546 | end Lax793645.ConstructionData.Frames |
| 3547 | end |
| 3548 | |
| 3549 | section |
| 3550 | namespace Lax793645.ConstructionData.Frames |
| 3551 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 3552 | open Matrix |
| 3553 | open scoped BigOperators |
| 3554 | noncomputable section |
| 3555 | set_option backward.isDefEq.respectTransparency false |
| 3556 | variable {I A J : Type} [Fintype I] [Fintype A] [Fintype J] |
| 3557 | /-- A single primal map acts on both factors of a moment. -/ |
| 3558 | def quadraticMomentMap (P : Vec I→ₗ[F]Vec A) : Mat I I→ₗ[F]Mat A A := by |
| 3559 | classical |
| 3560 | exact liftM (LinearMap.toMatrix' P) (LinearMap.toMatrix' P) |
| 3561 | |
| 3562 | theorem quadratic_moment_injective (P : Vec I→ₗ[F]Vec A) |
| 3563 | (hP : Function.Injective P) : Function.Injective (quadraticMomentMap P) := by |
| 3564 | classical |
| 3565 | have hi : Function.Injective (LinearMap.toMatrix' P).mulVec := by |
| 3566 | intro x y he |
| 3567 | exact hP (by simpa only [LinearMap.toMatrix'_mulVec] using he) |
| 3568 | exact liftM_inj hi hi |
| 3569 | |
| 3570 | /-- The ordered product of two polar channel evaluations. Its matrix is |
| 3571 | used only as a representative of a quadratic functional. -/ |
| 3572 | def quadraticChannelBilin (q : QuadraticForm F (Vec A)) |
| 3573 | (X Y : J→ Vec A) : LinearMap.BilinForm F (Vec A) := |
| 3574 | ∑ j,(q.polarBilin (X j)).smulRight (q.polarBilin (Y j)) |
| 3575 | |
| 3576 | def quadraticChannelFunctional (q : QuadraticForm F (Vec A)) |
| 3577 | (X Y : J→ Vec A) : Mat A A→ₗ[F]F := by |
| 3578 | classical |
| 3579 | exact mpair (quadraticChannelBilin q X Y).toMatrix' |
| 3580 | |
| 3581 | end |
| 3582 | end Lax793645.ConstructionData.Frames |
| 3583 | end |
| 3584 | |
| 3585 | section |
| 3586 | namespace Lax793645.ConstructionData.Frames |
| 3587 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 3588 | open Matrix |
| 3589 | noncomputable section |
| 3590 | set_option backward.isDefEq.respectTransparency false |
| 3591 | theorem matrix_quadratic_comp {I A : Type} [Fintype I] [Fintype A] |
| 3592 | [DecidableEq I] [DecidableEq A] (E : Mat A A) (P : Vec I→ₗ[F]Vec A) : |
| 3593 | E.toQuadraticForm'.comp P= |
| 3594 | (pullM (LinearMap.toMatrix' P) (LinearMap.toMatrix' P) E).toQuadraticForm' := by |
| 3595 | apply QuadraticMap.ext |
| 3596 | intro x |
| 3597 | change Matrix.toBilin' E (P x) (P x)= |
| 3598 | Matrix.toBilin' (pullM (LinearMap.toMatrix' P) (LinearMap.toMatrix' P) E) x x |
| 3599 | simp only [Matrix.toBilin'_apply'] |
| 3600 | simpa only [evmat,LinearMap.toMatrix'_mulVec] using |
| 3601 | (evmat_pull (LinearMap.toMatrix' P) (LinearMap.toMatrix' P) E x x).symm |
| 3602 | |
| 3603 | variable {I : Type} [Fintype I] [DecidableEq I] |
| 3604 | end |
| 3605 | end Lax793645.ConstructionData.Frames |
| 3606 | end |
| 3607 | |
| 3608 | section |
| 3609 | namespace Lax793645.ConstructionData.Frames |
| 3610 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 3611 | open Matrix Submodule |
| 3612 | noncomputable section |
| 3613 | set_option backward.isDefEq.respectTransparency false |
| 3614 | variable {I : Type} [Fintype I] [DecidableEq I] |
| 3615 | /-- A hyperbolic channel map of small image has an ordered quadratic |
| 3616 | matrix representative of at most the same rank. -/ |
| 3617 | theorem hyperbolic_matrix_representative (h : ℕ) (g : Vec I→ₗ[F]Hyperbolic h) : |
| 3618 | ∃ M : Mat I I,(∀ v,M.toQuadraticForm' v=hyperbolicQuadratic h (g v)) ∧ |
| 3619 | M.rank≤ rk g := by |
| 3620 | let L:=(hyperbolicCoordinates h).symm.toLinearMap.comp g |
| 3621 | let A:=LinearMap.toMatrix' L |
| 3622 | refine ⟨pullM A A (hyperbolicMatrix h),?_,?_⟩ |
| 3623 | · intro v |
| 3624 | rw [←matrix_quadratic_comp,QuadraticMap.comp_apply,hyperbolic_matrix_apply] |
| 3625 | exact congrArg (hyperbolicQuadratic h) ((hyperbolicCoordinates h).apply_symm_apply (g v)) |
| 3626 | · rw [pullM_def] |
| 3627 | exact (Matrix.rank_mul_le_right ..).trans (by |
| 3628 | change A.rank≤ rk g |
| 3629 | rw [rank_cast,toMat_map] |
| 3630 | exact rk_comp_le_right g (hyperbolicCoordinates h).symm.toLinearMap) |
| 3631 | |
| 3632 | end |
| 3633 | end Lax793645.ConstructionData.Frames |
| 3634 | end |
| 3635 | |
| 3636 | section |
| 3637 | namespace Lax793645.ConstructionData.Frames |
| 3638 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 3639 | open Matrix Submodule |
| 3640 | open scoped BigOperators |
| 3641 | noncomputable section |
| 3642 | set_option backward.isDefEq.respectTransparency false |
| 3643 | variable {p : Shape} {n : ℕ} {I : Type} [Fintype I] [DecidableEq I] |
| 3644 | def selectedAtComponent (l : I→ Tag p.g) (s : I→ Label p.b) (z : I→ Base p.g n) |
| 3645 | (e : Comp p.g) : Space (Ray p n) := |
| 3646 | Submodule.span F {v | ∃ i,inc e (l i) ∧ v=point p (s i) (z i)} |
| 3647 | |
| 3648 | end |
| 3649 | end Lax793645.ConstructionData.Frames |
| 3650 | end |
| 3651 | |
| 3652 | section |
| 3653 | namespace Lax793645.ConstructionData.Frames |
| 3654 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 3655 | open Matrix Submodule |
| 3656 | open scoped BigOperators |
| 3657 | noncomputable section |
| 3658 | set_option backward.isDefEq.respectTransparency false |
| 3659 | variable {D B : Type} [Fintype D] [Fintype B] [DecidableEq B] |
| 3660 | def jointProjection (b : B) : Vec (D×B)→ₗ[F]Vec D where |
| 3661 | toFun v d:=v (d,b) |
| 3662 | map_add' _ _:=rfl |
| 3663 | map_smul' _ _:=rfl |
| 3664 | |
| 3665 | def jointInjection (b : B) : Vec D→ₗ[F]Vec (D×B) where |
| 3666 | toFun v x:=if x.2=b then v x.1 else 0 |
| 3667 | map_add' _ _:=by ext x; by_cases h : x.2=b <;> simp [h] |
| 3668 | map_smul' _ _:=by ext x; by_cases h : x.2=b <;> simp [h] |
| 3669 | |
| 3670 | def jointSpace (P : B→ Space (Vec D)) : Space (Vec (D×B)) where |
| 3671 | carrier:={v | ∀ b,jointProjection b v∈P b} |
| 3672 | add_mem' hx hy b:= (P b).add_mem (hx b) (hy b) |
| 3673 | zero_mem' b:=(P b).zero_mem |
| 3674 | smul_mem' c x hx b:=(P b).smul_mem c (hx b) |
| 3675 | |
| 3676 | end |
| 3677 | end Lax793645.ConstructionData.Frames |
| 3678 | end |
| 3679 | |
| 3680 | section |
| 3681 | namespace Lax793645.ConstructionData.Frames |
| 3682 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 3683 | open Matrix Submodule |
| 3684 | open scoped BigOperators |
| 3685 | noncomputable section |
| 3686 | set_option backward.isDefEq.respectTransparency false |
| 3687 | abbrev JointRay (p : Shape) (n : ℕ) := Vec (Row p n×Bool) |
| 3688 | |
| 3689 | abbrev JointMoment (p : Shape) (n : ℕ) := Mat (Row p n×Bool) (Row p n×Bool) |
| 3690 | |
| 3691 | abbrev JointProfile (p : Shape) (n : ℕ) := Comp p.g→ JointMoment p n |
| 3692 | |
| 3693 | def jointCutEmbed {p : Shape} {n : ℕ} (x : Bool→ Profile p n) : JointProfile p n := |
| 3694 | fun e=> blockDiagonal (fun i=> x i e) |
| 3695 | |
| 3696 | variable {p : Shape} {n : ℕ} {I : Bool→ Type} |
| 3697 | [∀ i,Fintype (I i)] [∀ i,DecidableEq (I i)] |
| 3698 | end |
| 3699 | end Lax793645.ConstructionData.Frames |
| 3700 | end |
| 3701 | |
| 3702 | section |
| 3703 | namespace Lax793645.ConstructionData.Frames |
| 3704 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 3705 | open Finset Matrix Function LinearMap |
| 3706 | noncomputable section |
| 3707 | set_option backward.isDefEq.respectTransparency false |
| 3708 | variable {I : Type} [Fintype I] [DecidableEq I] {N : ℕ} |
| 3709 | /-- Only symmetric supported Gram characters are fixed. This is precisely |
| 3710 | quadratic Gram information, without specifying ordered pairings. -/ |
| 3711 | def quadraticTraced (E : Rail I) (Z : Mat I I) (x : KeyCoordinates I N) : Prop:= |
| 3712 | ∀ M : Mat I I,Mᵀ=M → withinRail M E → gramPrimitive M x=mpair M Z |
| 3713 | |
| 3714 | end |
| 3715 | end Lax793645.ConstructionData.Frames |
| 3716 | end |
| 3717 | |
| 3718 | section |
| 3719 | namespace Lax793645.ConstructionData.Frames |
| 3720 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 3721 | open Finset Matrix Function LinearMap Module Submodule |
| 3722 | noncomputable section |
| 3723 | set_option backward.isDefEq.respectTransparency false |
| 3724 | variable {I G : Type} [Fintype I] [Fintype G] [DecidableEq I] [DecidableEq G] |
| 3725 | def geoMatrix (g : Route I G) (A : GeoM g) : Mat I I:= |
| 3726 | fun i j=> if h:g i=g j then A (g i) ⟨i,rfl⟩ ⟨j,h.symm⟩ else 0 |
| 3727 | |
| 3728 | end |
| 3729 | end Lax793645.ConstructionData.Frames |
| 3730 | end |
| 3731 | |
| 3732 | section |
| 3733 | namespace Lax793645.ConstructionData.Frames |
| 3734 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 3735 | open Matrix |
| 3736 | open scoped BigOperators |
| 3737 | noncomputable section |
| 3738 | set_option backward.isDefEq.respectTransparency false |
| 3739 | /-- N is half the ambient dimension. The primal frame is stored once. -/ |
| 3740 | abbrev OneFrame (p : Shape) (n N : ℕ) := |
| 3741 | QuadraticFull (Ray p n) (Vec (Fin p.h))→ₗ[F]Vec (HyperbolicIdx N) |
| 3742 | |
| 3743 | abbrev OneOrient (p : Shape) (n N : ℕ) := Comp p.g→ OneFrame p n N |
| 3744 | |
| 3745 | abbrev OneAmbient (p : Shape) (N : ℕ) := |
| 3746 | Comp p.g→ Mat (HyperbolicIdx N) (HyperbolicIdx N) |
| 3747 | |
| 3748 | variable {p : Shape} {n N : ℕ} |
| 3749 | def oneFrameLaw (m : Mixer p n) (o : OneOrient p n N) : Prop := |
| 3750 | ∀ e,quadraticChannelValid (hyperbolicMatrix N).toQuadraticForm' |
| 3751 | (selfM p n m.mixM).toQuadraticForm' (o e) |
| 3752 | |
| 3753 | def onePrimal (P : OneFrame p n N) : Ray p n→ₗ[F]Vec (HyperbolicIdx N) := |
| 3754 | P.comp quadraticPrimalIn |
| 3755 | |
| 3756 | def oneChannelX (P : OneFrame p n N) (j : Fin p.h) := |
| 3757 | P (quadraticXIn (Pi.single j 1)) |
| 3758 | |
| 3759 | def oneChannelY (P : OneFrame p n N) (j : Fin p.h) := |
| 3760 | P (quadraticYIn (Pi.single j 1)) |
| 3761 | |
| 3762 | def oneMomentEmbed (o : OneOrient p n N) : Profile p n→ₗ[F]OneAmbient p N where |
| 3763 | toFun x e:=quadraticMomentMap (onePrimal (o e)) (x e) |
| 3764 | map_add' x y:=by ext e i j; simp only [Pi.add_apply,map_add,Matrix.add_apply] |
| 3765 | map_smul' c x:=by ext e i j; simp only [Pi.smul_apply,map_smul,RingHom.id_apply, |
| 3766 | Matrix.smul_apply] |
| 3767 | |
| 3768 | def oneFunctional (o : OneOrient p n N) : OneAmbient p N→ₗ[F]F where |
| 3769 | toFun x:=∑ e,quadraticChannelFunctional (hyperbolicMatrix N).toQuadraticForm' |
| 3770 | (oneChannelX (o e)) (oneChannelY (o e)) (x e) |
| 3771 | map_add' x y:=by simp only [Pi.add_apply,map_add,Finset.sum_add_distrib] |
| 3772 | map_smul' c x:=by simp only [Pi.smul_apply,map_smul,RingHom.id_apply, |
| 3773 | Finset.smul_sum] |
| 3774 | |
| 3775 | theorem one_primal_injective {m : Mixer p n} {o : OneOrient p n N} |
| 3776 | (ho : oneFrameLaw m o) (e : Comp p.g) : Function.Injective (onePrimal (o e)) := by |
| 3777 | intro x y he |
| 3778 | exact congrArg Prod.fst ((ho e).1 he) |
| 3779 | |
| 3780 | theorem one_moment_injective {m : Mixer p n} {o : OneOrient p n N} |
| 3781 | (ho : oneFrameLaw m o) : Function.Injective (oneMomentEmbed o) := by |
| 3782 | intro x y he |
| 3783 | funext e |
| 3784 | exact quadratic_moment_injective _ (one_primal_injective ho e) (congrFun he e) |
| 3785 | |
| 3786 | /-- The hole definition uses the new single-frame embedding and functional. -/ |
| 3787 | def oneHole (m : Mixer p n) (x y : OneOrient p n N) : Prop := |
| 3788 | oneFrameLaw m x ∧ oneFrameLaw m y ∧ ∃ v w : Profile p n, |
| 3789 | v∈Xspace p n ∧ w∈Xspace p n ∧ |
| 3790 | oneMomentEmbed x v=oneMomentEmbed y w ∧ |
| 3791 | (∀ i∈Xspace p n,oneFunctional y (oneMomentEmbed x i)=grad m v i) ∧ |
| 3792 | (∀ i∈Xspace p n,oneFunctional x (oneMomentEmbed y i)=grad m w i) ∧ |
| 3793 | role p n v+role p n w=1 |
| 3794 | |
| 3795 | theorem one_hole_sym {m : Mixer p n} {x y : OneOrient p n N} |
| 3796 | (h : oneHole m x y) : oneHole m y x := by |
| 3797 | obtain ⟨hx,hy,v,w,hv,hw,he,h,g,hp⟩:=h |
| 3798 | exact ⟨hy,hx,w,v,hw,hv,he.symm,g,h,(add_comm _ _).trans hp⟩ |
| 3799 | |
| 3800 | theorem one_hole_irrefl (m : Mixer p n) (x : OneOrient p n N) : ¬oneHole m x x := by |
| 3801 | rintro ⟨hx,_,v,w,_,_,he,_,_,hp⟩ |
| 3802 | rw [one_moment_injective hx he,char_two] at hp |
| 3803 | exact zero_ne_one hp |
| 3804 | |
| 3805 | theorem one_hole_triangle {m : Mixer p n} {x y z : OneOrient p n N} |
| 3806 | (h1 : oneHole m x y) (h2 : oneHole m y z) : ¬oneHole m x z := by |
| 3807 | intro h3 |
| 3808 | obtain ⟨_,_,a,b,ha,hb,hab,u1,u2,p1⟩:=h1 |
| 3809 | obtain ⟨_,_,c,d,hc,hd,hcd,u3,u4,p2⟩:=h2 |
| 3810 | obtain ⟨_,_,e,f,he,hf,hef,u5,u6,p3⟩:=h3 |
| 3811 | have hx : grad m b c=grad m f d := by rw [←u2 _ hc,←u6 _ hd,hcd] |
| 3812 | have hy : grad m a e=grad m d f := by rw [←u1 _ he,←u4 _ hf,hef] |
| 3813 | have hz : grad m e a=grad m c b := by rw [←u5 _ ha,←u3 _ hb,hab] |
| 3814 | simp only [grad_val] at hx hy hz |
| 3815 | let A:=role p n |
| 3816 | let T:=Tsym m |
| 3817 | have cancel (x y : F) (he : x=y) : x+y=0 := by rw [he,char_two] |
| 3818 | have ht (u v) : T u v+T v u=0:=cancel _ _ (T_swap m _ _) |
| 3819 | have hp : (A a+A b)+(A c+A d)+(A e+A f)=0 := by |
| 3820 | change A _+T _ _=A _+T _ _ at hx hy hz |
| 3821 | calc |
| 3822 | (A a+A b)+(A c+A d)+(A e+A f) |
| 3823 | = ((A c+T b c)+(A d+T f d))+ |
| 3824 | ((A e+T a e)+(A f+T d f))+ |
| 3825 | ((A a+T e a)+(A b+T c b)) := by |
| 3826 | symm |
| 3827 | calc |
| 3828 | _ = ((A a+A b)+(A c+A d)+(A e+A f))+ |
| 3829 | (T b c+T c b)+(T f d+T d f)+(T a e+T e a) := by ac_rfl |
| 3830 | _ = _ := by simp only [ht,add_zero] |
| 3831 | _ = 0 := by rw [cancel _ _ hx,cancel _ _ hy,cancel _ _ hz]; simp |
| 3832 | unfold A at hp |
| 3833 | rw [p1,p2,p3,char_two,zero_add] at hp |
| 3834 | exact one_ne_zero hp |
| 3835 | |
| 3836 | def oneRawHoles (m : Mixer p n) : Holes (OneOrient p n N) where |
| 3837 | rel:=oneHole m |
| 3838 | sym:=one_hole_sym |
| 3839 | irr:=one_hole_irrefl m |
| 3840 | ntri:=one_hole_triangle |
| 3841 | |
| 3842 | end |
| 3843 | end Lax793645.ConstructionData.Frames |
| 3844 | end |
| 3845 | |
| 3846 | section |
| 3847 | namespace Lax793645.ConstructionData.Frames |
| 3848 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 3849 | noncomputable section |
| 3850 | set_option backward.isDefEq.respectTransparency false |
| 3851 | variable {p : Shape} {n N : ℕ} |
| 3852 | instance oneFrameFintype (p : Shape) (n N : ℕ) : Fintype (OneFrame p n N) := by |
| 3853 | classical |
| 3854 | letI : Fintype (QuadraticFull (Ray p n) (Vec (Fin p.h))):=inferInstance |
| 3855 | letI : Fintype (Vec (HyperbolicIdx N)):=inferInstance |
| 3856 | exact Fintype.ofInjective (fun f : OneFrame p n N=>⇑f) DFunLike.coe_injective |
| 3857 | |
| 3858 | instance oneOrientFintype (p : Shape) (n N : ℕ) : Fintype (OneOrient p n N) := |
| 3859 | inferInstanceAs (Fintype (Comp p.g→ OneFrame p n N)) |
| 3860 | |
| 3861 | /-- The new raw law samples independent, uniformly distributed single frames |
| 3862 | at the cycle components. The own X-channel constraints are part of its support. -/ |
| 3863 | def oneRaw (m : Mixer p n) (N : ℕ) : Wgt (OneOrient p n N) := by |
| 3864 | classical |
| 3865 | exact prodW (fun _ : Comp p.g=> quadraticChannelRaw (C:=Vec (Fin p.h)) |
| 3866 | (hyperbolicMatrix N).toQuadraticForm' (selfM p n m.mixM).toQuadraticForm') |
| 3867 | |
| 3868 | end |
| 3869 | end Lax793645.ConstructionData.Frames |
| 3870 | end |
| 3871 | |
| 3872 | section |
| 3873 | namespace Lax793645.ConstructionData.Frames |
| 3874 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 3875 | open Matrix Submodule |
| 3876 | open scoped BigOperators |
| 3877 | noncomputable section |
| 3878 | set_option backward.isDefEq.respectTransparency false |
| 3879 | variable {A B : Type} [AddCommGroup A] [Module F A] [AddCommGroup B] [Module F B] |
| 3880 | abbrev UnitChannels (h : ℕ) := Bool→ Hyperbolic h |
| 3881 | |
| 3882 | end |
| 3883 | end Lax793645.ConstructionData.Frames |
| 3884 | end |
| 3885 | |
| 3886 | section |
| 3887 | namespace Lax793645.ConstructionData.Frames |
| 3888 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 3889 | open Matrix Submodule |
| 3890 | open scoped BigOperators |
| 3891 | noncomputable section |
| 3892 | set_option backward.isDefEq.respectTransparency false |
| 3893 | variable {p : Shape} {n : ℕ} |
| 3894 | def jointCutMap : (Bool→ Profile p n)→ₗ[F]JointProfile p n where |
| 3895 | toFun:=jointCutEmbed |
| 3896 | map_add' x y:=by |
| 3897 | funext e |
| 3898 | exact Matrix.blockDiagonal_add _ _ |
| 3899 | map_smul' c x:=by |
| 3900 | funext e |
| 3901 | exact Matrix.blockDiagonal_smul c _ |
| 3902 | |
| 3903 | def jointXspace : Space (JointProfile p n) := |
| 3904 | (Submodule.pi Set.univ (fun _ : Bool=> Xspace p n)).map jointCutMap |
| 3905 | |
| 3906 | def jointEndpointMap (i : Bool) : Profile p n→ₗ[F]JointProfile p n := |
| 3907 | jointCutMap.comp (LinearMap.single F (fun _ : Bool=> Profile p n) i) |
| 3908 | |
| 3909 | def jointMatrixFunctional (M : JointProfile p n) : JointProfile p n→ₗ[F]F := |
| 3910 | ∑ e,(mpair (M e)).comp (LinearMap.proj e) |
| 3911 | |
| 3912 | def jointQuadraticConstraints (P K : Comp p.g→ Space (JointRay p n)) : |
| 3913 | Space (JointProfile p n) := |
| 3914 | Submodule.pi Set.univ (fun e=> quadraticSquares (P e)⊔quadraticCross (K e)) |
| 3915 | |
| 3916 | end |
| 3917 | end Lax793645.ConstructionData.Frames |
| 3918 | end |
| 3919 | |
| 3920 | section |
| 3921 | namespace Lax793645.ConstructionData.Frames |
| 3922 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 3923 | open Matrix Submodule |
| 3924 | open scoped BigOperators |
| 3925 | noncomputable section |
| 3926 | set_option backward.isDefEq.respectTransparency false |
| 3927 | variable {p : Shape} {n : ℕ} |
| 3928 | def jointCompressionRank (p : Shape) (f r : ℕ) : ℕ:=2* drow p (2* f) (2* r) |
| 3929 | |
| 3930 | end |
| 3931 | end Lax793645.ConstructionData.Frames |
| 3932 | end |
| 3933 | |
| 3934 | section |
| 3935 | namespace Lax793645.ConstructionData.Frames |
| 3936 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 3937 | open Matrix Submodule |
| 3938 | noncomputable section |
| 3939 | set_option backward.isDefEq.respectTransparency false |
| 3940 | variable {p : Shape} {n : ℕ} |
| 3941 | def frozenChannelKernel {I : Type} [Fintype I] (h : ℕ) (P : Space (Vec I)) |
| 3942 | (C : Space (Hyperbolic h)) (g₀ : P→ₗ[F]Hyperbolic h) : Space (Vec I) := |
| 3943 | (C.comap g₀).map P.subtype |
| 3944 | |
| 3945 | end |
| 3946 | end Lax793645.ConstructionData.Frames |
| 3947 | end |
| 3948 | |
| 3949 | section |
| 3950 | namespace Lax793645.ConstructionData.Frames |
| 3951 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 3952 | open Matrix Submodule |
| 3953 | open scoped BigOperators |
| 3954 | noncomputable section |
| 3955 | set_option backward.isDefEq.respectTransparency false |
| 3956 | abbrev OneUnit (p : Shape) (n N : ℕ) := Bool→ OneOrient p n N |
| 3957 | |
| 3958 | abbrev OneUnitFull (p : Shape) (n : ℕ) := JointRay p n×UnitChannels p.h |
| 3959 | |
| 3960 | variable {p : Shape} {n N : ℕ} |
| 3961 | def oneUnitMap (x : OneUnit p n N) (e : Comp p.g) : |
| 3962 | OneUnitFull p n→ₗ[F]Vec (HyperbolicIdx N) := |
| 3963 | ∑ i,(x i e).comp |
| 3964 | (((jointProjection i).comp (LinearMap.fst F _ _)).prod |
| 3965 | ((LinearMap.proj i).comp (LinearMap.snd F _ _))) |
| 3966 | |
| 3967 | def oneUnitActual (x y : OneUnit p n N) (e : Comp p.g) : |
| 3968 | OneUnitFull p n→ₗ[F]OneUnitFull p n→ₗ[F]F := |
| 3969 | (hyperbolicMatrix N).toQuadraticForm'.polarBilin.compl₁₂ (oneUnitMap x e) (oneUnitMap y e) |
| 3970 | |
| 3971 | end |
| 3972 | end Lax793645.ConstructionData.Frames |
| 3973 | end |
| 3974 | |
| 3975 | section |
| 3976 | namespace Lax793645.ConstructionData.Frames |
| 3977 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 3978 | open Matrix Submodule |
| 3979 | open scoped BigOperators |
| 3980 | noncomputable section |
| 3981 | set_option backward.isDefEq.respectTransparency false |
| 3982 | variable {p : Shape} {n N : ℕ} {I : Type} [Fintype I] |
| 3983 | abbrev OneKeys (t : Tagging p I) (N : ℕ) := ∀ a,TagStar (t a)→ Vec (HyperbolicIdx N) |
| 3984 | |
| 3985 | def oneVolleyKeys (v : Volley p n I) (t : Tagging p I) (x : OneUnit p n N) : OneKeys t N := |
| 3986 | fun a e=> onePrimal (x (v.obj a) e.val) (v.rayAt a) |
| 3987 | |
| 3988 | end |
| 3989 | end Lax793645.ConstructionData.Frames |
| 3990 | end |
| 3991 | |
| 3992 | section |
| 3993 | namespace Lax793645.ConstructionData.Frames |
| 3994 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 3995 | open Submodule |
| 3996 | open scoped BigOperators |
| 3997 | noncomputable section |
| 3998 | set_option backward.isDefEq.respectTransparency false |
| 3999 | variable {I J : Type} [Fintype I] [Fintype J] {V : J→ Type} |
| 4000 | [∀ j,AddCommGroup (V j)] [∀ j,Module F (V j)] [∀ j,FiniteDimensional F (V j)] |
| 4001 | def coordinateClosure (E : Vec I≃ₗ[F](∀ j,V j)) (P : Space (Vec I)) : Space (Vec I) := |
| 4002 | (blockClosure (P.map E.toLinearMap)).map E.symm.toLinearMap |
| 4003 | |
| 4004 | theorem coordinate_closure_map (E : Vec I≃ₗ[F](∀ j,V j)) (P : Space (Vec I)) : |
| 4005 | (coordinateClosure E P).map E.toLinearMap=blockClosure (P.map E.toLinearMap) := by |
| 4006 | rw [coordinateClosure,←Submodule.map_comp] |
| 4007 | simp |
| 4008 | |
| 4009 | theorem le_coordinate_closure (E : Vec I≃ₗ[F](∀ j,V j)) (P : Space (Vec I)) : |
| 4010 | P≤ coordinateClosure E P := by |
| 4011 | intro v hv |
| 4012 | exact ⟨E v,le_blockClosure _ ⟨v,hv,rfl⟩,E.symm_apply_apply v⟩ |
| 4013 | |
| 4014 | theorem coordinate_closure_idempotent (E : Vec I≃ₗ[F](∀ j,V j)) (P : Space (Vec I)) : |
| 4015 | coordinateClosure E (coordinateClosure E P)=coordinateClosure E P := by |
| 4016 | change (blockClosure ((coordinateClosure E P).map E.toLinearMap)).map E.symm.toLinearMap=_ |
| 4017 | rw [coordinate_closure_map,blockClosure_idempotent] |
| 4018 | rfl |
| 4019 | |
| 4020 | theorem coordinate_closure_growth (E : Vec I≃ₗ[F](∀ j,V j)) (P Q : Space (Vec I)) |
| 4021 | (hPQ : P≤ Q) (hP : coordinateClosure E P=P) : |
| 4022 | dim (coordinateClosure E Q)-dim P≤ Fintype.card J*(dim Q-dim P) := by |
| 4023 | have hp : blockClosure (P.map E.toLinearMap)=P.map E.toLinearMap := |
| 4024 | (coordinate_closure_map E P).symm.trans (congrArg (Submodule.map E.toLinearMap) hP) |
| 4025 | have h:=blockClosure_dimension_step (P.map E.toLinearMap) (Q.map E.toLinearMap) |
| 4026 | (Submodule.map_mono hPQ) hp |
| 4027 | have he : dim (coordinateClosure E Q)=dim (blockClosure (Q.map E.toLinearMap)):= |
| 4028 | E.symm.finrank_map_eq _ |
| 4029 | change dim (blockClosure (Q.map E.toLinearMap))-dim (P.map E.toLinearMap)≤ |
| 4030 | Fintype.card J*(dim (Q.map E.toLinearMap)-dim (P.map E.toLinearMap)) at h |
| 4031 | rw [he] |
| 4032 | simpa only [dim,LinearEquiv.finrank_map_eq] using h |
| 4033 | |
| 4034 | variable {C : Type} [Fintype C] |
| 4035 | /-- Closing every component under the same coordinate blocks has the |
| 4036 | same closure factor; the number of components does not inflate it. -/ |
| 4037 | def coordinateImageClosure (E : Vec I≃ₗ[F](∀ j,V j)) : ImageClosure C I (Fintype.card J) where |
| 4038 | close P e:=coordinateClosure E (P e) |
| 4039 | extensive P e:=le_coordinate_closure E (P e) |
| 4040 | idempotent P:=funext (fun e=> coordinate_closure_idempotent E (P e)) |
| 4041 | growth P Q hPQ hP:=by |
| 4042 | have hg (e : C) : dim (coordinateClosure E (Q e))≤ |
| 4043 | dim (P e)+Fintype.card J*(dim (Q e)-dim (P e)) := by |
| 4044 | have h:=coordinate_closure_growth E (P e) (Q e) (hPQ e) (congrFun hP e) |
| 4045 | omega |
| 4046 | have hh:=Finset.sum_le_sum (s:=Finset.univ) (fun e _=> hg e) |
| 4047 | rw [Finset.sum_add_distrib,←Finset.mul_sum] at hh |
| 4048 | have hd : (∑ e,(dim (Q e)-dim (P e)))=imagePlanRank Q-imagePlanRank P := by |
| 4049 | rw [imagePlanRank,imagePlanRank,Finset.sum_tsub_distrib] |
| 4050 | exact fun e _=> Submodule.finrank_mono (hPQ e) |
| 4051 | rw [hd] at hh |
| 4052 | change imagePlanRank (fun e=> coordinateClosure E (Q e))≤ |
| 4053 | imagePlanRank P+Fintype.card J*(imagePlanRank Q-imagePlanRank P) at hh |
| 4054 | omega |
| 4055 | |
| 4056 | end |
| 4057 | end Lax793645.ConstructionData.Frames |
| 4058 | end |
| 4059 | |
| 4060 | section |
| 4061 | namespace Lax793645.ConstructionData.Frames |
| 4062 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 4063 | open Matrix Submodule |
| 4064 | noncomputable section |
| 4065 | set_option backward.isDefEq.respectTransparency false |
| 4066 | abbrev OneBlock := Bool⊕(Bool⊕Bool) |
| 4067 | |
| 4068 | def oneBlockSlots (p : Shape) (n : ℕ) : OneBlock→ Type |
| 4069 | | Sum.inl _=> Row p n |
| 4070 | | Sum.inr _=> Fin p.h |
| 4071 | |
| 4072 | instance oneBlockSlotsFintype (p : Shape) (n : ℕ) (b : OneBlock) : Fintype (oneBlockSlots p n b) := by |
| 4073 | cases b <;> dsimp only [oneBlockSlots] <;> infer_instance |
| 4074 | |
| 4075 | instance oneBlockSlotsDecidable (p : Shape) (n : ℕ) (b : OneBlock) : DecidableEq (oneBlockSlots p n b) := by |
| 4076 | cases b <;> dsimp only [oneBlockSlots] <;> infer_instance |
| 4077 | |
| 4078 | abbrev OneColumn (p : Shape) (n : ℕ) := Σ b : OneBlock,oneBlockSlots p n b |
| 4079 | |
| 4080 | def oneBlockCoordinates (p : Shape) (n : ℕ) : |
| 4081 | Vec (OneColumn p n)≃ₗ[F](∀ b : OneBlock,Vec (oneBlockSlots p n b)) where |
| 4082 | toFun v b i:=v ⟨b,i⟩ |
| 4083 | invFun v i:=v i.1 i.2 |
| 4084 | left_inv _:=rfl |
| 4085 | right_inv _:=rfl |
| 4086 | map_add' _ _:=rfl |
| 4087 | map_smul' _ _:=rfl |
| 4088 | |
| 4089 | def oneNominalCoordinates (p : Shape) (n : ℕ) : Vec (OneColumn p n)≃ₗ[F]OneUnitFull p n where |
| 4090 | toFun v:=(fun ri=> v ⟨Sum.inl ri.2,ri.1⟩, |
| 4091 | fun i=>(fun j=> v ⟨Sum.inr (Sum.inl i),j⟩,fun j=> v ⟨Sum.inr (Sum.inr i),j⟩)) |
| 4092 | invFun v k:=match k with |
| 4093 | | ⟨Sum.inl i,r⟩=> v.1 (r,i) |
| 4094 | | ⟨Sum.inr (Sum.inl i),j⟩=>((v.2 i).1) j |
| 4095 | | ⟨Sum.inr (Sum.inr i),j⟩=>((v.2 i).2) j |
| 4096 | left_inv v:=by |
| 4097 | funext k |
| 4098 | rcases k with ⟨i,k⟩ |
| 4099 | rcases i with i|i |
| 4100 | · rfl |
| 4101 | · cases i <;> rfl |
| 4102 | right_inv _:=rfl |
| 4103 | map_add' _ _:=rfl |
| 4104 | map_smul' _ _:=rfl |
| 4105 | |
| 4106 | def oneAmbientCoordinates (N : ℕ) : Vec (HyperbolicIdx N)≃ₗ[F]Vec (Fin (2* N)) := |
| 4107 | LinearEquiv.funCongrLeft F F |
| 4108 | (finSumFinEquiv.trans (finCongr (Nat.two_mul N).symm)).symm |
| 4109 | |
| 4110 | def oneCoordinateImages {p : Shape} {n N : ℕ} (x : OneUnit p n N) (e : Comp p.g) : |
| 4111 | Mat (Fin (2* N)) (OneColumn p n) := |
| 4112 | LinearMap.toMatrix' ((oneAmbientCoordinates N).toLinearMap.comp |
| 4113 | ((oneUnitMap x e).comp (oneNominalCoordinates p n).toLinearMap)) |
| 4114 | |
| 4115 | /-- The actual one-frame nominal columns split into P1, P2, X1, X2, Y1, |
| 4116 | Y2. The resulting closure factor is exactly six. -/ |
| 4117 | def onePinClosure (p : Shape) (n : ℕ) : ImageClosure (Comp p.g) (OneColumn p n) 6 := by |
| 4118 | have hc : Fintype.card OneBlock=6:=by simp [OneBlock] |
| 4119 | exact hc ▸ coordinateImageClosure (oneBlockCoordinates p n) |
| 4120 | |
| 4121 | end |
| 4122 | end Lax793645.ConstructionData.Frames |
| 4123 | end |
| 4124 | |
| 4125 | section |
| 4126 | namespace Lax793645.ConstructionData.Frames |
| 4127 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 4128 | open Matrix Submodule |
| 4129 | open scoped BigOperators |
| 4130 | noncomputable section |
| 4131 | set_option backward.isDefEq.respectTransparency false |
| 4132 | abbrev OneFull (p : Shape) (n : ℕ) := QuadraticFull (Ray p n) (Vec (Fin p.h)) |
| 4133 | |
| 4134 | variable {p : Shape} {n N : ℕ} |
| 4135 | end |
| 4136 | end Lax793645.ConstructionData.Frames |
| 4137 | end |
| 4138 | |
| 4139 | section |
| 4140 | namespace Lax793645.ConstructionData.Frames |
| 4141 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 4142 | open Matrix Submodule |
| 4143 | open scoped BigOperators |
| 4144 | noncomputable section |
| 4145 | set_option backward.isDefEq.respectTransparency false |
| 4146 | variable {p : Shape} {n N : ℕ} |
| 4147 | def oneUnitRaw (m : Mixer p n) (N : ℕ) : Wgt (OneUnit p n N) := |
| 4148 | prodW (fun _ : Bool=> oneRaw m N) |
| 4149 | |
| 4150 | end |
| 4151 | end Lax793645.ConstructionData.Frames |
| 4152 | end |
| 4153 | |
| 4154 | section |
| 4155 | namespace Lax793645.ConstructionData.Frames |
| 4156 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 4157 | open Finset Matrix LinearMap Function |
| 4158 | noncomputable section |
| 4159 | set_option backward.isDefEq.respectTransparency false |
| 4160 | variable {I G : Type} [Fintype I] [Fintype G] [DecidableEq I] [DecidableEq G] |
| 4161 | {p : Shape} {n N : ℕ} |
| 4162 | def oneScatter (t : Tagging p I) (N : ℕ) : OneKeys t N ≃ Rack (KeySlots p t) N where |
| 4163 | toFun x:=(fun a i=> x i.1 i.2 (Sum.inl a),fun a i=> x i.1 i.2 (Sum.inr a)) |
| 4164 | invFun x:=fun i e a=> Sum.elim (x.1.col ⟨i,e⟩) (x.2.col ⟨i,e⟩) a |
| 4165 | left_inv x:=by funext i e a; cases a <;> rfl |
| 4166 | right_inv x:=by apply Prod.ext <;> rfl |
| 4167 | |
| 4168 | end |
| 4169 | end Lax793645.ConstructionData.Frames |
| 4170 | end |
| 4171 | |
| 4172 | section |
| 4173 | namespace Lax793645.ConstructionData.Frames |
| 4174 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 4175 | open Finset Matrix Function LinearMap |
| 4176 | open scoped Classical |
| 4177 | noncomputable section |
| 4178 | set_option backward.isDefEq.respectTransparency false |
| 4179 | variable {I T G : Type} [Fintype I] [DecidableEq I] [Fintype T] [DecidableEq T] |
| 4180 | [Fintype G] [DecidableEq G] {p : Shape} {n N : ℕ} |
| 4181 | def oneTemplateCoordinates (v : Template p I) (o : OneUnit p n N) (x : Inputs p n I) : |
| 4182 | KeyCoordinates (KeySlots p v.t) N:= |
| 4183 | (rackCoordinates (KeySlots p v.t) N).symm (oneScatter v.t N (oneVolleyKeys (v.draw x) v.t o)) |
| 4184 | |
| 4185 | end |
| 4186 | end Lax793645.ConstructionData.Frames |
| 4187 | end |
| 4188 | |
| 4189 | section |
| 4190 | namespace Lax793645.ConstructionData.Frames |
| 4191 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 4192 | open LinearMap Module Function |
| 4193 | noncomputable section |
| 4194 | set_option backward.isDefEq.respectTransparency false |
| 4195 | variable {B R V : Type} [AddCommGroup B] [Module F B] |
| 4196 | [AddCommGroup R] [Module F R] [FiniteDimensional F R] |
| 4197 | [AddCommGroup V] [Module F V] [FiniteDimensional F V] |
| 4198 | def quadraticPolarRead (q : QuadraticForm F V) (P : R→ₗ[F]V) : |
| 4199 | V→ₗ[F]Module.Dual F R:=P.dualMap.comp q.polarBilin |
| 4200 | |
| 4201 | variable [Fintype V] [Fintype (B→ₗ[F]V)] [Fintype (Module.Dual F R)] |
| 4202 | end |
| 4203 | end Lax793645.ConstructionData.Frames |
| 4204 | end |
| 4205 | |
| 4206 | section |
| 4207 | namespace Lax793645.ConstructionData.Frames |
| 4208 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 4209 | open Matrix LinearMap Module Submodule |
| 4210 | open scoped BigOperators |
| 4211 | noncomputable section |
| 4212 | set_option backward.isDefEq.respectTransparency false |
| 4213 | abbrev OneChannels (p : Shape) (N : ℕ) := Vec (HyperbolicIdx p.h)→ₗ[F]Vec (HyperbolicIdx N) |
| 4214 | |
| 4215 | def oneChannelIn (p : Shape) (n : ℕ) : Vec (HyperbolicIdx p.h)→ₗ[F]OneFull p n:= |
| 4216 | (LinearMap.inr F _ _).comp (hyperbolicCoordinates p.h).toLinearMap |
| 4217 | |
| 4218 | variable {p : Shape} {n N : ℕ} |
| 4219 | def oneChannels (x : OneFrame p n N) : OneChannels p N:=x.comp (oneChannelIn p n) |
| 4220 | |
| 4221 | def oneChannelPrice (p : Shape) := bp ((2*(p.h:ℝ))^2+2) |
| 4222 | |
| 4223 | def oneCubePrice (p : Shape) := (oneChannelPrice p)^(Fintype.card (Comp p.g)) |
| 4224 | |
| 4225 | end |
| 4226 | end Lax793645.ConstructionData.Frames |
| 4227 | end |
| 4228 | |
| 4229 | section |
| 4230 | namespace Lax793645.ConstructionData.Frames |
| 4231 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 4232 | open Matrix LinearMap Module Submodule |
| 4233 | open scoped BigOperators |
| 4234 | noncomputable section |
| 4235 | set_option backward.isDefEq.respectTransparency false |
| 4236 | def oneDualCoordinates (N : ℕ) : Vec (HyperbolicIdx N)≃ₗ[F]Vec (Fin (2* N)) := |
| 4237 | (LinearEquiv.funCongrLeft F F (Equiv.sumComm (Fin N) (Fin N))).trans |
| 4238 | (oneAmbientCoordinates N) |
| 4239 | |
| 4240 | def splitChannelMatrix {A J : Type} [Fintype A] [Fintype J] : |
| 4241 | Mat A (J⊕J)≃ₗ[F](Mat A J×Mat A J) where |
| 4242 | toFun M:=(fun a j=> M a (Sum.inl j),fun a j=> M a (Sum.inr j)) |
| 4243 | invFun M:=Matrix.fromCols M.1 M.2 |
| 4244 | left_inv M:=by ext a j; cases j <;> rfl |
| 4245 | right_inv _:=rfl |
| 4246 | map_add' _ _:=rfl |
| 4247 | map_smul' _ _:=rfl |
| 4248 | |
| 4249 | /-- Polar channel evaluations are a bijective change of coordinates on |
| 4250 | the entire channel pair, so their uniform law is exactly the old free law. -/ |
| 4251 | def oneChannelPairEquiv (p : Shape) (N : ℕ) : OneChannels p N≃ₗ[F]HFrame p (2* N) := |
| 4252 | (((LinearEquiv.arrowCongr (LinearEquiv.refl F (Vec (HyperbolicIdx p.h))) |
| 4253 | (oneDualCoordinates N)).trans LinearMap.toMatrix').trans splitChannelMatrix).trans |
| 4254 | (LinearEquiv.prodComm F _ _) |
| 4255 | |
| 4256 | def onePhaseCube {p : Shape} {n N : ℕ} (o : OneOrient p n N) : HCube p (2* N) := |
| 4257 | fun e=> oneChannelPairEquiv p N (oneChannels (o e)) |
| 4258 | |
| 4259 | end |
| 4260 | end Lax793645.ConstructionData.Frames |
| 4261 | end |
| 4262 | |
| 4263 | section |
| 4264 | namespace Lax793645.ConstructionData.Frames |
| 4265 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 4266 | open Matrix LinearMap Module Submodule |
| 4267 | open scoped BigOperators |
| 4268 | noncomputable section |
| 4269 | set_option backward.isDefEq.respectTransparency false |
| 4270 | variable {p : Shape} {n N : ℕ} |
| 4271 | def oneListens (x : OneUnit p n N) : PhasePair p (2* N):= |
| 4272 | (onePhaseCube (x true),onePhaseCube (x false)) |
| 4273 | |
| 4274 | end |
| 4275 | end Lax793645.ConstructionData.Frames |
| 4276 | end |
| 4277 | |
| 4278 | section |
| 4279 | namespace Lax793645.ConstructionData.Frames |
| 4280 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 4281 | open LinearMap Module Function Finset |
| 4282 | open scoped Classical |
| 4283 | noncomputable section |
| 4284 | set_option backward.isDefEq.respectTransparency false |
| 4285 | variable {p : Shape} {n N : ℕ} |
| 4286 | def oneFreeColumns (p : Shape) (n : ℕ) (s : Label p.b) : |
| 4287 | Vec (Fin n)→ₗ[F]OneFull p n:= |
| 4288 | quadraticPrimalIn.comp (blockRay p n s Block.Z).mulVecLin |
| 4289 | |
| 4290 | def oneMixedRow (J : Vec (Fin n)→ₗ[F]OneFull p n) (o : OneOrient p n N) : |
| 4291 | (Comp p.g→ Vec (HyperbolicIdx N))→ₗ[F]Module.Dual F (Vec (Fin n)):= |
| 4292 | ∑ e,(quadraticPolarRead (hyperbolicMatrix N).toQuadraticForm' ((o e).comp J)).comp |
| 4293 | (LinearMap.proj e) |
| 4294 | |
| 4295 | end |
| 4296 | end Lax793645.ConstructionData.Frames |
| 4297 | end |
| 4298 | |
| 4299 | section |
| 4300 | namespace Lax793645.ConstructionData.Frames |
| 4301 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 4302 | open LinearMap Module Function Finset Submodule |
| 4303 | open scoped Classical |
| 4304 | noncomputable section |
| 4305 | set_option backward.isDefEq.respectTransparency false |
| 4306 | variable {p : Shape} {n N : ℕ} |
| 4307 | abbrev OneJointKey (p : Shape) (N : ℕ):=Comp p.g→ Vec (HyperbolicIdx N) |
| 4308 | |
| 4309 | abbrev OneAtomKey (l : Tag p.g) (N : ℕ):=TagStar l→ Vec (HyperbolicIdx N) |
| 4310 | |
| 4311 | abbrev OneAugur (p : Shape) (N : ℕ):=∀ l : Tag p.g,F→ OneAtomKey l N→ F |
| 4312 | |
| 4313 | def OneLinearAugur (g : OneAugur p N) (R : ℕ):=∀ l,HasLinearCells (g l) R |
| 4314 | |
| 4315 | def oneStarKey (l : Tag p.g) : OneJointKey p N→ₗ[F]OneAtomKey l N:= |
| 4316 | LinearMap.pi (fun e=> LinearMap.proj e.val) |
| 4317 | |
| 4318 | end |
| 4319 | end Lax793645.ConstructionData.Frames |
| 4320 | end |
| 4321 | |
| 4322 | section |
| 4323 | namespace Lax793645.ConstructionData.Frames |
| 4324 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 4325 | open Matrix Function LinearMap Submodule Finset Module |
| 4326 | open scoped BigOperators |
| 4327 | noncomputable section |
| 4328 | set_option backward.isDefEq.respectTransparency false |
| 4329 | variable {p : Shape} {n N : ℕ} |
| 4330 | def onePrimalKey (o : OneOrient p n N) : Ray p n→ₗ[F]OneJointKey p N:= |
| 4331 | LinearMap.pi (fun e=> onePrimal (o e)) |
| 4332 | |
| 4333 | def oneAtomKeyValue (o : OneOrient p n N) (l : Tag p.g) (s : Label p.b) |
| 4334 | (z : Base p.g n) : OneAtomKey l N:=oneStarKey l (onePrimalKey o (point p s z)) |
| 4335 | |
| 4336 | end |
| 4337 | end Lax793645.ConstructionData.Frames |
| 4338 | end |
| 4339 | |
| 4340 | section |
| 4341 | namespace Lax793645.ConstructionData.Frames |
| 4342 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 4343 | open Finset Matrix Function LinearMap Filter Real |
| 4344 | open scoped Classical Topology |
| 4345 | noncomputable section |
| 4346 | set_option backward.isDefEq.respectTransparency false |
| 4347 | variable {I : Type} [Fintype I] [DecidableEq I] {p : Shape} {n N : ℕ} |
| 4348 | def oneCallOne (v : Template p I) (i : I) (x : Knobs p.g n) (o : OneOrient p n N):= |
| 4349 | oneAtomKeyValue o (v.t i) (v.s i) (lit (v.f i) (v.t i) x) |
| 4350 | |
| 4351 | end |
| 4352 | end Lax793645.ConstructionData.Frames |
| 4353 | end |
| 4354 | |
| 4355 | section |
| 4356 | namespace Lax793645.ConstructionData.Frames |
| 4357 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 4358 | open Finset Matrix Function LinearMap |
| 4359 | open scoped Classical |
| 4360 | noncomputable section |
| 4361 | set_option backward.isDefEq.respectTransparency false |
| 4362 | variable {p : Shape} {n N : ℕ} |
| 4363 | /-- A coordinate equivalence, not a pair of independently sampled frames. -/ |
| 4364 | def oneAtomSplit (l : Tag p.g) (N : ℕ) : OneAtomKey l N≃AtomKey l N where |
| 4365 | toFun x e b a:=x e (if b then Sum.inl a else Sum.inr a) |
| 4366 | invFun x e:=Sum.elim (x e true) (x e false) |
| 4367 | left_inv x:=by funext e a; cases a <;> rfl |
| 4368 | right_inv x:=by funext e b a; cases b <;> rfl |
| 4369 | |
| 4370 | def oneLawOmega (p : Shape) (N : ℕ) (l : Tag p.g) (q : F) : Wgt (OneAtomKey l N):= |
| 4371 | mapW (lawOmega p N l q) (oneAtomSplit l N).symm |
| 4372 | |
| 4373 | def oneDesc (v : Template.Solo p) (x : Knobs p.g n) (o : OneOrient p n N):= |
| 4374 | oneCallOne v () x o |
| 4375 | |
| 4376 | end |
| 4377 | end Lax793645.ConstructionData.Frames |
| 4378 | end |
| 4379 | |
| 4380 | section |
| 4381 | namespace Lax793645.ConstructionData.Frames |
| 4382 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 4383 | open Matrix Submodule |
| 4384 | noncomputable section |
| 4385 | set_option backward.isDefEq.respectTransparency false |
| 4386 | def channelQuadraticMatrix {D : Type} [Fintype D] [DecidableEq D] (h : ℕ) (g : Vec D→ₗ[F]Hyperbolic h) : Mat D D:= |
| 4387 | Classical.choose (hyperbolic_matrix_representative h g) |
| 4388 | |
| 4389 | variable {p : Shape} {n : ℕ} {I : Bool→ Type} |
| 4390 | [∀ i,Fintype (I i)] [∀ i,DecidableEq (I i)] |
| 4391 | end |
| 4392 | end Lax793645.ConstructionData.Frames |
| 4393 | end |
| 4394 | |
| 4395 | section |
| 4396 | namespace Lax793645.ConstructionData.Frames |
| 4397 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 4398 | open Matrix LinearMap Module Submodule |
| 4399 | open scoped BigOperators |
| 4400 | noncomputable section |
| 4401 | set_option backward.isDefEq.respectTransparency false |
| 4402 | def oneAmbientPolar (N : ℕ) : LinearMap.BilinForm F (Vec (Fin (2* N))) := |
| 4403 | (hyperbolicMatrix N).toQuadraticForm'.polarBilin.compl₁₂ |
| 4404 | (oneAmbientCoordinates N).symm.toLinearMap (oneAmbientCoordinates N).symm.toLinearMap |
| 4405 | |
| 4406 | variable {p : Shape} {n N : ℕ} |
| 4407 | abbrev OneCross (p : Shape) (n : ℕ) := ImageCross (Comp p.g) (OneColumn p n) |
| 4408 | |
| 4409 | def oneTableOfCross (Q : OneCross p n) (e : Comp p.g) : |
| 4410 | LinearMap.BilinForm F (OneUnitFull p n):= |
| 4411 | (Q e).toBilin'.compl₁₂ (oneNominalCoordinates p n).symm.toLinearMap |
| 4412 | (oneNominalCoordinates p n).symm.toLinearMap |
| 4413 | |
| 4414 | variable {V : Type} [AddCommGroup V] [Module F V] [Fintype V] |
| 4415 | end |
| 4416 | end Lax793645.ConstructionData.Frames |
| 4417 | end |
| 4418 | |
| 4419 | section |
| 4420 | namespace Lax793645.ConstructionData.Frames |
| 4421 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 4422 | open Matrix Submodule |
| 4423 | open scoped BigOperators |
| 4424 | noncomputable section |
| 4425 | set_option backward.isDefEq.respectTransparency false |
| 4426 | variable {A B : Type} [AddCommGroup A] [Module F A] [AddCommGroup B] [Module F B] |
| 4427 | def unitLeftChannels (h : ℕ) |
| 4428 | (T : (A×UnitChannels h)→ₗ[F](B×UnitChannels h)→ₗ[F]F) (j : Bool) : |
| 4429 | A→ₗ[F]Hyperbolic h := |
| 4430 | (LinearMap.BilinForm.toDual (hyperbolicQuadratic h).polarBilin |
| 4431 | (hyperbolic_nondegenerate h)).symm.toLinearMap.comp |
| 4432 | (T.compl₁₂ (LinearMap.inl F _ _) |
| 4433 | ((LinearMap.inr F _ _).comp (LinearMap.single F (fun _ : Bool=> Hyperbolic h) j))) |
| 4434 | |
| 4435 | def unitRightChannels (h : ℕ) |
| 4436 | (T : (A×UnitChannels h)→ₗ[F](B×UnitChannels h)→ₗ[F]F) (i : Bool) : |
| 4437 | B→ₗ[F]Hyperbolic h := unitLeftChannels h T.flip i |
| 4438 | |
| 4439 | end |
| 4440 | end Lax793645.ConstructionData.Frames |
| 4441 | end |
| 4442 | |
| 4443 | section |
| 4444 | namespace Lax793645.ConstructionData.Frames |
| 4445 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 4446 | open Matrix LinearMap Module Submodule |
| 4447 | open scoped BigOperators |
| 4448 | noncomputable section |
| 4449 | set_option backward.isDefEq.respectTransparency false |
| 4450 | abbrev OneCheckSide (p : Shape) (n : ℕ) := |
| 4451 | Bool→ Comp p.g→ JointRay p n→ₗ[F]Hyperbolic p.h |
| 4452 | |
| 4453 | abbrev OneCheckGram (p : Shape) (n : ℕ) := OneCheckSide p n×OneCheckSide p n |
| 4454 | |
| 4455 | variable {p : Shape} {n N : ℕ} |
| 4456 | end |
| 4457 | end Lax793645.ConstructionData.Frames |
| 4458 | end |
| 4459 | |
| 4460 | section |
| 4461 | namespace Lax793645.ConstructionData.Frames |
| 4462 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 4463 | open Matrix LinearMap Module Submodule |
| 4464 | noncomputable section |
| 4465 | set_option backward.isDefEq.respectTransparency false |
| 4466 | variable {p : Shape} {n N : ℕ} |
| 4467 | def onePrimalPins (P : ImagePlan (Comp p.g) (OneColumn p n)) (e : Comp p.g) : Space (JointRay p n):= |
| 4468 | (P e).map ((LinearMap.fst F _ _).comp (oneNominalCoordinates p n).toLinearMap) |
| 4469 | |
| 4470 | def oneChannelPins (P : ImagePlan (Comp p.g) (OneColumn p n)) (i : Bool) (e : Comp p.g) : |
| 4471 | Space (Hyperbolic p.h):= |
| 4472 | (P e).map ((LinearMap.proj i).comp ((LinearMap.snd F _ _).comp (oneNominalCoordinates p n).toLinearMap)) |
| 4473 | |
| 4474 | variable {I : Type} [Fintype I] |
| 4475 | end |
| 4476 | end Lax793645.ConstructionData.Frames |
| 4477 | end |
| 4478 | |
| 4479 | section |
| 4480 | namespace Lax793645.ConstructionData.Frames |
| 4481 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 4482 | open Matrix LinearMap Module Submodule |
| 4483 | open scoped BigOperators |
| 4484 | noncomputable section |
| 4485 | set_option backward.isDefEq.respectTransparency false |
| 4486 | variable {p : Shape} {n N : ℕ} |
| 4487 | def onePinSafe (P : Bool→ Comp p.g→ Space (Ray p n)) |
| 4488 | (C : Bool→ Comp p.g→ Space (Hyperbolic p.h)) (x y : OneUnit p n N) : Prop := |
| 4489 | ∀ e i j,∀ v∈P i e, |
| 4490 | unitLeftChannels p.h (oneUnitActual x y e) j (jointInjection i v)∈C j e→ v=0 |
| 4491 | |
| 4492 | end |
| 4493 | end Lax793645.ConstructionData.Frames |
| 4494 | end |
| 4495 | |
| 4496 | section |
| 4497 | namespace Lax793645.ConstructionData.Frames |
| 4498 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 4499 | open Matrix LinearMap Module Submodule |
| 4500 | open scoped BigOperators |
| 4501 | noncomputable section |
| 4502 | set_option backward.isDefEq.respectTransparency false |
| 4503 | variable {p : Shape} {n : ℕ} {I : Type} [Fintype I] [DecidableEq I] |
| 4504 | def oneSelectedPrimal (v : Volley p n I) (t : Tagging p I) |
| 4505 | (P : Bool→ Comp p.g→ Space (Ray p n)) (e : Comp p.g) : Space (JointRay p n) := |
| 4506 | jointSpace (fun i=> P i e⊔selectedAtComponent |
| 4507 | (fun a : CallsAt v i=> t a.val) (fun a=> v.sel a.val) (fun a=> v.par a.val) e) |
| 4508 | |
| 4509 | /-- The protected-subspace conditions needed by the joint quadratic |
| 4510 | annihilator, stated directly on the query's actual selected points. -/ |
| 4511 | structure OneProtectedVolley (v : Volley p n I) (t : Tagging p I) |
| 4512 | (P : Bool→ Comp p.g→ Space (Ray p n)) (R : ℕ) where |
| 4513 | selector : Bool→ Space (Vec (SelIdx p.b p.j)) |
| 4514 | base : Bool→ Space (Vec (AIdx p.g n)) |
| 4515 | pinCross : ∀ i e,P i e≤ tensorCross (selector i) (base i) |
| 4516 | selectorIndependent : ∀ i,LinearIndependent F ((selector i).mkQ∘ |
| 4517 | fun a : CallsAt v i=> selV p.j (v.sel a.val)) |
| 4518 | baseIndependent : ∀ i,LinearIndependent F ((base i).mkQ∘ |
| 4519 | fun a : CallsAt v i=> baseV (v.par a.val)) |
| 4520 | rankBound : ∀ e,2* dim (oneSelectedPrimal v t P e)≤ R |
| 4521 | lowPin : ∀ i e,∀ u∈P i e,Matrix.rank (flattenMatrix.symm u)≤ R^2+Fintype.card (CallsAt v i)→ |
| 4522 | u∈tensorRectangle (selector i) (base i) |
| 4523 | |
| 4524 | variable {N : ℕ} |
| 4525 | end |
| 4526 | end Lax793645.ConstructionData.Frames |
| 4527 | end |
| 4528 | |
| 4529 | section |
| 4530 | namespace Lax793645.ConstructionData.Frames |
| 4531 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 4532 | open Matrix LinearMap Module Submodule |
| 4533 | open scoped BigOperators |
| 4534 | noncomputable section |
| 4535 | set_option backward.isDefEq.respectTransparency false |
| 4536 | variable {p : Shape} {n : ℕ} |
| 4537 | def oneEndpointPrimalPins (P : ImagePlan (Comp p.g) (OneColumn p n)) |
| 4538 | (i : Bool) (e : Comp p.g) : Space (Ray p n) := |
| 4539 | (onePrimalPins P e).map (jointProjection i) |
| 4540 | |
| 4541 | variable {I : Type} [Fintype I] [DecidableEq I] |
| 4542 | end |
| 4543 | end Lax793645.ConstructionData.Frames |
| 4544 | end |
| 4545 | |
| 4546 | section |
| 4547 | namespace Lax793645.ConstructionData.Frames |
| 4548 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 4549 | open Matrix LinearMap Module Submodule |
| 4550 | open scoped BigOperators |
| 4551 | noncomputable section |
| 4552 | set_option backward.isDefEq.respectTransparency false |
| 4553 | variable {p : Shape} {n N : ℕ} |
| 4554 | def oneEffectivePins (P : Bool→ Comp p.g→ Space (Ray p n)) (i : Bool) : Space (Profile p n) := |
| 4555 | Xspace p n⊓Submodule.pi Set.univ (fun e=> quadraticSquares (P i e)) |
| 4556 | |
| 4557 | def oneInner (x : OneUnit p n N) (i : Bool) : Profile p n→ₗ[F]F:= |
| 4558 | (oneFunctional (x (!i))).comp (oneMomentEmbed (x i)) |
| 4559 | |
| 4560 | variable {I : Type} [Fintype I] |
| 4561 | structure OneScalarRecipe (v : Volley p n I) (w : I→ Bool) (t : Tagging p I) |
| 4562 | (m : Mixer p n) (x y : OneUnit p n N) |
| 4563 | (P : Bool→ Comp p.g→ Space (Ray p n)) : Prop where |
| 4564 | summ (i j : Bool) : ∑ a∈v.shoots w i j,v.diagonalAt a=1 |
| 4565 | gradient (i j : Bool) (z : Profile p n) : z∈oneEffectivePins P i→ |
| 4566 | grad m (v.sumAt t w i j) z=oneFunctional (y j) (oneMomentEmbed (x i) z) |
| 4567 | |
| 4568 | def oneAttackGrad (v w : Volley p n I) (t : Tagging p I) (m : Mixer p n) |
| 4569 | (y : OneUnit p n N) : Prop :=∀ a j, |
| 4570 | grad m (v.sumAt t w.obj (v.obj a) j) (v.atomAt t a)= |
| 4571 | if j=w.obj a then 0 else oneInner y (w.obj a) (w.atomAt t a) |
| 4572 | |
| 4573 | end |
| 4574 | end Lax793645.ConstructionData.Frames |
| 4575 | end |
| 4576 | |
| 4577 | section |
| 4578 | namespace Lax793645.ConstructionData.Frames |
| 4579 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 4580 | noncomputable section |
| 4581 | variable {p : Shape} {n N : ℕ} |
| 4582 | def oneMismatch (g : OneAugur p N) (w : Pdual p n) (l : Tag p.g) |
| 4583 | (s : Label p.b) (f : Flavor p.g) (o : OneOrient p n N) (y : Knobs p.g n):= |
| 4584 | w (useAtom p l s f y)≠g l (dialed p l f y) (oneAtomKeyValue o l s (lit f l y)) |
| 4585 | |
| 4586 | def onePostulates (o : OneOrient p n N) (g : OneAugur p N) (w : Pdual p n) |
| 4587 | (E : Finset (Label p.b)) (δ : ℝ):= |
| 4588 | ∀ s,s∉E→∀ l f,pr (spins p n) (oneMismatch g w l s f o)≤δ |
| 4589 | |
| 4590 | def oneYoke (m : Mixer p n) (x : OneUnit p n N) (i : Bool) (u : Profile p n) (α : F):= |
| 4591 | oneInner x i+(Tsym m u+α • role p n) |
| 4592 | |
| 4593 | def oneClaimed (x : OneUnit p n N) (g : Bool→ OneAugur p N) (m : Mixer p n) |
| 4594 | (w : Bool→ Profile p n) (α : Bool→ F) (L : Bool→ Finset (Label p.b)) (δ : ℝ):= |
| 4595 | ∀ i,onePostulates (x i) (g i) (oneYoke m x i (w i) (α i)) (L i) δ |
| 4596 | |
| 4597 | end |
| 4598 | end Lax793645.ConstructionData.Frames |
| 4599 | end |
| 4600 | |
| 4601 | section |
| 4602 | namespace Lax793645.ConstructionData.Frames |
| 4603 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 4604 | open Filter Finset PredictionClass |
| 4605 | open scoped Classical Topology |
| 4606 | noncomputable section |
| 4607 | set_option backward.isDefEq.respectTransparency false |
| 4608 | variable {p : Shape} {N M : ℕ} |
| 4609 | def oneAssembly (g : Bool→ OneAugur p N) (i j : Bool) (s t : F) : OneAugur p N:= |
| 4610 | fun l q x=> s* g i l q x+t* g j l q x |
| 4611 | |
| 4612 | abbrev OneSeason (p : Shape) (M : ℕ):=∀ n,OneAugur p (M* n) |
| 4613 | |
| 4614 | end |
| 4615 | end Lax793645.ConstructionData.Frames |
| 4616 | end |
| 4617 | |
| 4618 | section |
| 4619 | namespace Lax793645.ConstructionData.Frames |
| 4620 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 4621 | open PredictionClass |
| 4622 | noncomputable section |
| 4623 | set_option backward.isDefEq.respectTransparency false |
| 4624 | set_option maxHeartbeats 800000 |
| 4625 | variable {p : Shape} {N : ℕ} |
| 4626 | /-- Both predictor values are functions of fixed linear rows. The same |
| 4627 | function is used on the two diagonal slices. -/ |
| 4628 | structure OneAlgebraicRows (g : Bool → OneAugur p N) (R : ℕ) : Prop where |
| 4629 | rows : ∀ i, OneLinearAugur (g i) R |
| 4630 | sameSlice : ∀ i l q x, g i l q x = g i l 0 x |
| 4631 | |
| 4632 | def oneLiteral (g : OneAugur p N) (r : F) := |
| 4633 | ∀ l q x,g l q x=r* q |
| 4634 | |
| 4635 | def oneInactive (g : Bool→ OneAugur p N) (α : Party) (i : Bool) := |
| 4636 | firstBit α i=0 ∧ ∃ r,oneLiteral (g i) r |
| 4637 | |
| 4638 | def oneCoincident (g : Bool→ OneAugur p N) (α : Party) := |
| 4639 | α true=α false ∧ ∃ r,oneLiteral (oneAssembly g true false 1 1) r |
| 4640 | |
| 4641 | def oneFiniteClass (g : Bool→ OneAugur p N) (α : Party) : PredictionClass := by |
| 4642 | classical |
| 4643 | exact if oneInactive g α true then |
| 4644 | if oneInactive g α false then dusk else dawn false |
| 4645 | else if oneInactive g α false then dawn true |
| 4646 | else if oneCoincident g α then twinned else noon |
| 4647 | |
| 4648 | end |
| 4649 | end Lax793645.ConstructionData.Frames |
| 4650 | end |
| 4651 | |
| 4652 | section |
| 4653 | namespace Lax793645.ConstructionData.Frames |
| 4654 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 4655 | open Matrix LinearMap Module |
| 4656 | noncomputable section |
| 4657 | set_option backward.isDefEq.respectTransparency false |
| 4658 | variable {p : Shape} {n N : ℕ} |
| 4659 | def oneDuality (N : ℕ) : Vec (Fin (2* N))≃ₗ[F]Vec (Fin (2* N)):= |
| 4660 | (oneAmbientCoordinates N).symm.trans (oneDualCoordinates N) |
| 4661 | |
| 4662 | def oneDualImages (x : OneUnit p n N) (e : Comp p.g) : Mat (Fin (2* N)) (OneColumn p n):= |
| 4663 | LinearMap.toMatrix' (oneDuality N).toLinearMap* oneCoordinateImages x e |
| 4664 | |
| 4665 | end |
| 4666 | end Lax793645.ConstructionData.Frames |
| 4667 | end |
| 4668 | |
| 4669 | section |
| 4670 | namespace Lax793645.ConstructionData.Frames |
| 4671 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 4672 | open Matrix LinearMap Module Submodule Function |
| 4673 | open scoped BigOperators |
| 4674 | noncomputable section |
| 4675 | set_option backward.isDefEq.respectTransparency false |
| 4676 | abbrev SymCover (p : Shape) (N : ℕ) := Comp p.g→ Space (Vec (Fin N)) |
| 4677 | |
| 4678 | abbrev SymWidths (p : Shape) (r : ℕ) := Comp p.g→ Fin (r+1) |
| 4679 | |
| 4680 | abbrev SymOffsetBasis (p : Shape) (r : ℕ) {N : ℕ} (S : SymCover p N) (q : SymWidths p r) := |
| 4681 | ∀ e,Mat (Fin (dim (S e))) (Fin (q e).val) |
| 4682 | |
| 4683 | abbrev SymOffsetCost (p : Shape) (r : ℕ) (q : SymWidths p r) := |
| 4684 | ∀ e : Comp p.g,Mat (Fin (q e).val) (Fin (q e).val) |
| 4685 | |
| 4686 | abbrev SymAtlas (p : Shape) (r : ℕ) {N : ℕ} (S : SymCover p N) := |
| 4687 | Σ q : SymWidths p r,SymOffsetBasis p r S q×SymOffsetCost p r q |
| 4688 | |
| 4689 | instance symAtlasFintype {p : Shape} {r N : ℕ} (S : SymCover p N) : Fintype (SymAtlas p r S) := by |
| 4690 | classical |
| 4691 | exact inferInstanceAs (Fintype (Σ q : SymWidths p r,SymOffsetBasis p r S q×SymOffsetCost p r q)) |
| 4692 | |
| 4693 | variable {p : Shape} {r N : ℕ} {S : SymCover p N} |
| 4694 | end |
| 4695 | end Lax793645.ConstructionData.Frames |
| 4696 | end |
| 4697 | |
| 4698 | section |
| 4699 | namespace Lax793645.ConstructionData.Frames |
| 4700 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 4701 | open Matrix LinearMap Module Submodule |
| 4702 | open scoped BigOperators |
| 4703 | noncomputable section |
| 4704 | set_option backward.isDefEq.respectTransparency false |
| 4705 | variable {p : Shape} {n N : ℕ} |
| 4706 | def onePrimalMatrix (P : OneFrame p n N) : Mat (Fin (2* N)) (Row p n):= |
| 4707 | LinearMap.toMatrix' ((oneAmbientCoordinates N).toLinearMap.comp (onePrimal P)) |
| 4708 | |
| 4709 | def oneHeatRate (p : Shape) (n N : ℕ) (ζ : ℝ) (q t : ℕ) := |
| 4710 | bp (num (Row p n)* q+4* p.h* t)* fee (2* N) ζ (q+t) |
| 4711 | |
| 4712 | end |
| 4713 | end Lax793645.ConstructionData.Frames |
| 4714 | end |
| 4715 | |
| 4716 | section |
| 4717 | namespace Lax793645.ConstructionData.Frames |
| 4718 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 4719 | open Matrix LinearMap Module |
| 4720 | open scoped BigOperators |
| 4721 | noncomputable section |
| 4722 | set_option backward.isDefEq.respectTransparency false |
| 4723 | variable {p : Shape} {n N : ℕ} |
| 4724 | abbrev OneCover (p : Shape) (N : ℕ) := Comp p.g→ Space (Vec (Fin (2* N))) |
| 4725 | |
| 4726 | def oneCoverDimension (C : OneCover p N) : ℕ:=∑ e,dim (C e) |
| 4727 | |
| 4728 | end |
| 4729 | end Lax793645.ConstructionData.Frames |
| 4730 | end |
| 4731 | |
| 4732 | section |
| 4733 | namespace Lax793645.ConstructionData.Frames |
| 4734 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 4735 | open Matrix LinearMap Module Finset |
| 4736 | open scoped BigOperators |
| 4737 | noncomputable section |
| 4738 | set_option backward.isDefEq.respectTransparency false |
| 4739 | variable {A : Type} [Fintype A] {p : Shape} {N : ℕ} |
| 4740 | def channelPitch (Δ : A→ Ambient p N) (read : A→ PhasePair p N) |
| 4741 | (w : Wgt A) (S R : Party) := |
| 4742 | avg (pairW w w) (fun x=> wsign |
| 4743 | (joinPhase p (read x.1) R (Δ x.2)+joinPhase p (read x.2) S (Δ x.1))) |
| 4744 | |
| 4745 | variable {n : ℕ} |
| 4746 | end |
| 4747 | end Lax793645.ConstructionData.Frames |
| 4748 | end |
| 4749 | |
| 4750 | section |
| 4751 | namespace Lax793645.ConstructionData.Frames |
| 4752 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 4753 | open Matrix LinearMap Module Submodule |
| 4754 | noncomputable section |
| 4755 | set_option backward.isDefEq.respectTransparency false |
| 4756 | variable {p : Shape} {n N r : ℕ} {T : SymCover p (2* N)} |
| 4757 | namespace OneBazaar |
| 4758 | end OneBazaar |
| 4759 | def oneSelectionPrice (p : Shape) (r n N : ℕ) (H ζ : ℝ) : Prop:= |
| 4760 | ∀ q t : ℕ,q≤ r→ t≤ r→ H* oneHeatRate p n N ζ q t≤ loseA p (2* N) q t |
| 4761 | |
| 4762 | namespace OneBazaar |
| 4763 | end OneBazaar |
| 4764 | end |
| 4765 | end Lax793645.ConstructionData.Frames |
| 4766 | end |
| 4767 | |
| 4768 | section |
| 4769 | namespace Lax793645.ConstructionData.Frames |
| 4770 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 4771 | open Matrix LinearMap Module Submodule |
| 4772 | open scoped BigOperators |
| 4773 | noncomputable section |
| 4774 | set_option backward.isDefEq.respectTransparency false |
| 4775 | variable {p : Shape} {n N r : ℕ} |
| 4776 | def oneImageProfile (o : OneOrient p n N) : Profile p n→ₗ[F]Ambient p (2* N) where |
| 4777 | toFun z e:=liftM (onePrimalMatrix (o e)) (onePrimalMatrix (o e)) (z e) |
| 4778 | map_add' z w:=by ext e a b; simp only [Pi.add_apply,map_add,Matrix.add_apply] |
| 4779 | map_smul' c z:=by ext e a b; simp only [Pi.smul_apply,map_smul,RingHom.id_apply,Matrix.smul_apply] |
| 4780 | |
| 4781 | def oneMarkedDelta (x : OneUnit p n N) (marks : Bool→ Profile p n) : Ambient p (2* N):= |
| 4782 | oneImageProfile (x true) (marks true)+oneImageProfile (x false) (marks false) |
| 4783 | |
| 4784 | end |
| 4785 | end Lax793645.ConstructionData.Frames |
| 4786 | end |
| 4787 | |
| 4788 | section |
| 4789 | namespace Lax793645.ConstructionData.Frames |
| 4790 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 4791 | open Matrix LinearMap Module Submodule |
| 4792 | open scoped BigOperators |
| 4793 | noncomputable section |
| 4794 | set_option backward.isDefEq.respectTransparency false |
| 4795 | variable {p : Shape} {n N : ℕ} |
| 4796 | def oneBySide (w : Wgt (OneUnit p n N)) (m : Mixer p n) (H : ℝ) : Prop := |
| 4797 | ∀ i o,mapW w (fun x=> x i) o≤ H* oneRaw m N o |
| 4798 | |
| 4799 | abbrev OnePrimalPinFamily (p : Shape) (n N : ℕ) := |
| 4800 | OneUnit p n N→ Bool→ Comp p.g→ Space (Ray p n) |
| 4801 | |
| 4802 | abbrev OneChannelPinFamily (p : Shape) (n N : ℕ) := |
| 4803 | OneUnit p n N→ Bool→ Comp p.g→ Space (Hyperbolic p.h) |
| 4804 | |
| 4805 | def oneAcceptsPin (P : OnePrimalPinFamily p n N) (B : OneChannelPinFamily p n N) |
| 4806 | (x : OneUnit p n N×OneUnit p n N) :=onePinSafe (P x.1) (B x.2) x.1 x.2 |
| 4807 | |
| 4808 | def oneSecurePin (P : OnePrimalPinFamily p n N) (B : OneChannelPinFamily p n N) |
| 4809 | (x : OneUnit p n N×OneUnit p n N) :=oneAcceptsPin P B x ∧ oneAcceptsPin P B x.swap |
| 4810 | |
| 4811 | end |
| 4812 | end Lax793645.ConstructionData.Frames |
| 4813 | end |
| 4814 | |
| 4815 | section |
| 4816 | namespace Lax793645.ConstructionData.Frames |
| 4817 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 4818 | open Filter Finset |
| 4819 | open scoped Topology |
| 4820 | noncomputable section |
| 4821 | set_option backward.isDefEq.respectTransparency false |
| 4822 | variable {p : Shape} {n N : ℕ} |
| 4823 | abbrev OneLeafMixture (p : Shape) (n N : ℕ):= |
| 4824 | ImageLeafMixture (OneUnit p n N) (Comp p.g) (OneColumn p n) (2* N) |
| 4825 | |
| 4826 | def oneLeafStrength (s : OneLeafMixture p n N) (w : Wgt (OneUnit p n N)) |
| 4827 | (m : Mixer p n) (D ζ : ℝ) (K : ℕ):= |
| 4828 | s.strength oneCoordinateImages (onePinClosure p n) w (oneUnitRaw m N) D ζ K |
| 4829 | |
| 4830 | end |
| 4831 | end Lax793645.ConstructionData.Frames |
| 4832 | end |
| 4833 | |
| 4834 | section |
| 4835 | namespace Lax793645.ConstructionData.Frames |
| 4836 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 4837 | open Matrix LinearMap Module Submodule |
| 4838 | noncomputable section |
| 4839 | set_option backward.isDefEq.respectTransparency false |
| 4840 | variable {p : Shape} {n N : ℕ} {I : Type} [Fintype I] [DecidableEq I] |
| 4841 | def oneGradientRank (p : Shape) : ℕ := |
| 4842 | 2*(15* p.r+14* p.J* Fintype.card (Comp p.g)) |
| 4843 | |
| 4844 | def oneRealizationRoom (p : Shape) (K t : ℕ) : Prop := |
| 4845 | let f:=2*(K+t) |
| 4846 | oneGradientRank p+(f+K)+jointCompressionRank p f (2* f+(f+K))+5* K+6* f+2≤ p.h |
| 4847 | |
| 4848 | end |
| 4849 | end Lax793645.ConstructionData.Frames |
| 4850 | end |
| 4851 | |
| 4852 | section |
| 4853 | namespace Lax793645.ConstructionData.Frames |
| 4854 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 4855 | open Matrix LinearMap Module Submodule Function Finset |
| 4856 | open scoped BigOperators |
| 4857 | noncomputable section |
| 4858 | set_option backward.isDefEq.respectTransparency false |
| 4859 | variable {p : Shape} {n N r : ℕ} {T : SymCover p (2* N)} |
| 4860 | def oneGlimpseBill (p : Shape) (r : ℕ) (H : ℝ):=num (Comp p.g)*(H*2* bp ((r:ℝ)-p.h)) |
| 4861 | |
| 4862 | namespace OneBazaar |
| 4863 | end OneBazaar |
| 4864 | end |
| 4865 | end Lax793645.ConstructionData.Frames |
| 4866 | end |
| 4867 | |
| 4868 | section |
| 4869 | namespace Lax793645.ConstructionData.Frames |
| 4870 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 4871 | open Matrix LinearMap Module Submodule Function Finset |
| 4872 | open scoped BigOperators |
| 4873 | noncomputable section |
| 4874 | set_option backward.isDefEq.respectTransparency false |
| 4875 | variable {p : Shape} {n N r : ℕ} {T : SymCover p (2* N)} |
| 4876 | def oneQuest (p : Shape) (r k n N : ℕ) (H ε : ℝ) := |
| 4877 | ∀ x : ℕ,x≤ r → |
| 4878 | bp ((x:ℝ)*(2* N))* bp (0.51* k*(2* N))*(H* oneHeatRate p n N ε x k)≤ bp (-0.2*(2* N)) |
| 4879 | |
| 4880 | namespace OneBazaar |
| 4881 | end OneBazaar |
| 4882 | end |
| 4883 | end Lax793645.ConstructionData.Frames |
| 4884 | end |
| 4885 | |
| 4886 | section |
| 4887 | namespace Lax793645.ConstructionData.Frames |
| 4888 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 4889 | open Matrix LinearMap Module Submodule Function Finset |
| 4890 | open scoped BigOperators |
| 4891 | noncomputable section |
| 4892 | set_option backward.isDefEq.respectTransparency false |
| 4893 | variable {p : Shape} {n N r : ℕ} |
| 4894 | def oneSymCov {p : Shape} {N : ℕ} (C : SymCover p N) : Cov p N:=fun z=> C z.1 |
| 4895 | |
| 4896 | def oneSymCovered {p : Shape} {N : ℕ} (C : SymCover p N) (x : Ambient p N):=covered p (oneSymCov C) x |
| 4897 | |
| 4898 | def oneTonalMix {p : Shape} {n N} (Δ : OneUnit p n N → Ambient p (2* N)) (w) := |
| 4899 | ∀ S R,S ≠ 0 ∨ R ≠ 0 → |channelPitch Δ oneListens w S R|< 0.005 |
| 4900 | |
| 4901 | def oneTonalTiny {p : Shape} {n N} (Δ : OneUnit p n N → Ambient p (2* N)) (w : Wgt (OneUnit p n N)) (d : ℕ) := |
| 4902 | ∃ S : SymCover p (2* N), oneCoverDimension S≤ d ∧ (∀ x,w x≠0 → oneSymCovered S (Δ x)) ∧ |
| 4903 | ∀ i : Bool,∀ R : Party, |channelPitch Δ oneListens w (unary i) R|≤ bp (-0.24*(2* N)) |
| 4904 | |
| 4905 | namespace OneBazaar |
| 4906 | variable {T : SymCover p (2* N)} |
| 4907 | end OneBazaar |
| 4908 | end |
| 4909 | end Lax793645.ConstructionData.Frames |
| 4910 | end |
| 4911 | |
| 4912 | section |
| 4913 | namespace Lax793645.ConstructionData.Frames |
| 4914 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 4915 | open Matrix LinearMap Module Submodule Function Finset |
| 4916 | open scoped BigOperators |
| 4917 | noncomputable section |
| 4918 | set_option backward.isDefEq.respectTransparency false |
| 4919 | variable {p : Shape} {n N : ℕ} |
| 4920 | def oneQuench (Δ : OneUnit p n N→ Ambient p (2* N)) |
| 4921 | (x : OneUnit p n N×OneUnit p n N) : Quad := |
| 4922 | (fun i=> joinPhase p (oneListens x.2) (unary i) (Δ x.1), |
| 4923 | fun i=> joinPhase p (oneListens x.1) (unary i) (Δ x.2)) |
| 4924 | |
| 4925 | end |
| 4926 | end Lax793645.ConstructionData.Frames |
| 4927 | end |
| 4928 | |
| 4929 | section |
| 4930 | namespace Lax793645.ConstructionData.Frames |
| 4931 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 4932 | open Matrix LinearMap Module Function Finset PredictionClass |
| 4933 | open scoped BigOperators |
| 4934 | noncomputable section |
| 4935 | set_option backward.isDefEq.respectTransparency false |
| 4936 | variable {p : Shape} {n N : ℕ} |
| 4937 | def oneMatchUp (Δ : OneUnit p n N→ Ambient p (2* N)) (α : Party) (r : F) |
| 4938 | (c : PredictionClass) (x : OneUnit p n N×OneUnit p n N) := |
| 4939 | c.compatible α r (oneQuench Δ x) |
| 4940 | |
| 4941 | def oneExactInk (m : Mixer p n) (marks : OneUnit p n N→ Bool→ Profile p n) |
| 4942 | (x : OneUnit p n N) := ∀ i,silent (oneYoke m x i (marks x i) 1) |
| 4943 | |
| 4944 | end |
| 4945 | end Lax793645.ConstructionData.Frames |
| 4946 | end |
| 4947 | |
| 4948 | section |
| 4949 | namespace Lax793645.ConstructionData.Frames |
| 4950 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 4951 | open Matrix LinearMap Module Function Finset PredictionClass |
| 4952 | open scoped BigOperators |
| 4953 | noncomputable section |
| 4954 | set_option backward.isDefEq.respectTransparency false |
| 4955 | variable {p : Shape} {n N : ℕ} |
| 4956 | /-- A finite label for each unit determines a relation on pairs. The bound |
| 4957 | counts labels in either coordinate, including after transposing the test. -/ |
| 4958 | structure PairCode (A : Type) (budget : ℝ) where |
| 4959 | count : ℕ |
| 4960 | fits : (count:ℝ)≤ budget |
| 4961 | label : A→ Fin count |
| 4962 | test : Fin count × Fin count → Prop |
| 4963 | |
| 4964 | def PairCode.read {A : Type} {B : ℝ} (c : PairCode A B) (v : A×A) := |
| 4965 | c.test (c.label v.1,c.label v.2) |
| 4966 | |
| 4967 | end |
| 4968 | end Lax793645.ConstructionData.Frames |
| 4969 | end |
| 4970 | |
| 4971 | section |
| 4972 | namespace Lax793645.ConstructionData.Frames |
| 4973 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 4974 | open Matrix LinearMap Module Submodule Function Finset |
| 4975 | open scoped BigOperators |
| 4976 | noncomputable section |
| 4977 | set_option backward.isDefEq.respectTransparency false |
| 4978 | variable {p : Shape} {n N r : ℕ} |
| 4979 | def oneScaleBill (p : Shape) (n N d : ℕ) (H : ℝ):= |
| 4980 | 2* num (Comp p.g)* H* bp (num (Row p n)+d+3-2*(N:ℝ)) |
| 4981 | |
| 4982 | end |
| 4983 | end Lax793645.ConstructionData.Frames |
| 4984 | end |
| 4985 | |
| 4986 | section |
| 4987 | namespace Lax793645.ConstructionData.Frames |
| 4988 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 4989 | open Matrix LinearMap Module Submodule Function Finset |
| 4990 | open scoped BigOperators |
| 4991 | noncomputable section |
| 4992 | set_option backward.isDefEq.respectTransparency false |
| 4993 | variable {p : Shape} {n N r : ℕ} |
| 4994 | def oneNoSweepBudget (p : Shape) (N m b r : ℕ) (c ψ H : ℝ):= |
| 4995 | bp (2*(r:ℝ)* num (Comp p.g)*(2* N))*(H* oneCubePrice p^2* |
| 4996 | (exponentErr p m b c/ψ^(2^m*(2* b)))) |
| 4997 | |
| 4998 | /-- All numerical costs of the one-frame phase argument. The raw image |
| 4999 | cap is the concrete quadratic-frame cap, not a two-frame assumption. -/ |
| 5000 | structure OnePhaseReady (p : Shape) (n N m b r k d : ℕ) (mix : Mixer p n) |
| 5001 | (c l ψ ε L H : ℝ) : Prop where |
| 5002 | hb : 1≤ b |
| 5003 | hm : 16* r< m |
| 5004 | hk : k≤ d |
| 5005 | hc : 0< c |
| 5006 | hc' : c≤1 |
| 5007 | hl : 0< l |
| 5008 | hl' : l≤1 |
| 5009 | hψ : 0<ψ |
| 5010 | hL : 0≤ L |
| 5011 | hH : 0≤ H |
| 5012 | hroom : Fintype.card (Row p n)+2* p.h+1≤ N |
| 5013 | hN : 5≤ N |
| 5014 | hchannels : 4* p.h+3≤ N |
| 5015 | cap : ∀ a : ImagePin (Comp p.g) (OneColumn p n) (2* N), |
| 5016 | pr (oneUnitRaw mix N) (imagePinAgree oneDualImages a)≤ fee (2* N) ε (imagePlanRank a.sp) |
| 5017 | noBranch : ψ+oneNoSweepBudget p N m b r c ψ H<0.005 |
| 5018 | frames : oneScaleBill p n N (2* maxSpan m b r) L≤ c/2 |
| 5019 | atlas (T : SymCover p (2* N)) (ht : oneCoverDimension T≤2* maxSpan m b r) : |
| 5020 | num (SymAtlas p r T)≤ bp (0.002*(2* N)) |
| 5021 | price : oneSelectionPrice p r n N (rhUp L c) ε |
| 5022 | price' : oneSelectionPrice p r n N (rhUp (rhUp L c) l) ε |
| 5023 | localQ : oneQuest p r k n N (rhUp H c) ε |
| 5024 | testFailure : oneGlimpseBill p k (rhUp L c)+bp (-0.1*(2* N))< l^(k+1) |
| 5025 | testFailure' : 2* oneGlimpseBill p d (rhUp L c)≤ l/2 |
| 5026 | beatSlack : 5* l+bp (-0.24*(2* N))<0.005 |
| 5027 | |
| 5028 | end |
| 5029 | end Lax793645.ConstructionData.Frames |
| 5030 | end |
| 5031 | |
| 5032 | section |
| 5033 | namespace Lax793645.ConstructionData.Frames |
| 5034 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 5035 | open PreparationParameters PredictionClass Filter Finset |
| 5036 | open scoped Topology |
| 5037 | noncomputable section |
| 5038 | set_option backward.isDefEq.respectTransparency false |
| 5039 | variable {p : Shape} {n N M : ℕ} |
| 5040 | abbrev OneTale (p : Shape) (M : ℕ):=∀ n,Wgt (OneUnit p n (M* n)) |
| 5041 | |
| 5042 | abbrev OneRhythms (p : Shape) (M : ℕ):=∀ n,OneLeafMixture p n (M* n) |
| 5043 | |
| 5044 | abbrev OneMarks (p : Shape) (n N : ℕ):=OneUnit p n N→ Bool→ Profile p n |
| 5045 | |
| 5046 | def oneFrameSide (m : Mixer p n) (x : OneUnit p n N):=∀ i,oneFrameLaw m (x i) |
| 5047 | |
| 5048 | def onePreparationPins (q : PreparationParameters):=q.e+q.s |
| 5049 | |
| 5050 | /-- A symmetric cover of dimension d gives a two-sided cover of dimension 2d. -/ |
| 5051 | def onePreparationCover (q : PreparationParameters):=2* q.d |
| 5052 | |
| 5053 | structure OnePreparationAllows (q : PreparationParameters) : Prop where |
| 5054 | pos : 0< q.ζ |
| 5055 | small : q.ζ<1 |
| 5056 | hL : 0≤ q.L |
| 5057 | bigS : q.leafOld+q.u+q.ζ≤((q.ζ/6)-(q.ζ/6)/4)* q.s |
| 5058 | |
| 5059 | structure OneNascent (q : PreparationParameters) (m : Mixer p n) |
| 5060 | (w : Wgt (OneUnit p n N)) : Prop where |
| 5061 | law : IsLaw w |
| 5062 | border : oneBySide w m q.L |
| 5063 | total : ∀ x,w x≤ bp ((q.D:ℝ)*(2* N))* oneUnitRaw m N x |
| 5064 | |
| 5065 | structure OneEntered (q : PreparationParameters) (m : Mixer p n) |
| 5066 | (w : Wgt (OneUnit p n N)) (s : OneLeafMixture p n N) : Prop where |
| 5067 | weight : (1/2:ℝ)≤ s.amount w |
| 5068 | strength : oneLeafStrength s w m q.leafOld q.ζ q.e |
| 5069 | onTile : s.within (fun x=> w x≠0 ∧ (oneRawHoles m).unit (x true,x false) ∧ |
| 5070 | oneFrameSide m x) |
| 5071 | |
| 5072 | structure OneDurable (q : PreparationParameters) (l : Filter ℕ) (m : cycleM p) |
| 5073 | (w : OneTale p M) (s : OneRhythms p M) : Prop where |
| 5074 | mass : warm l (fun n=>(2*(M* n):ℕ)) (fun n=>(s n).amount (w n)) |
| 5075 | shape : ∀ᶠ n in l,oneLeafStrength (s n) (w n) (m n) q.leafNew (2* q.ζ) |
| 5076 | (onePreparationPins q) ∧ (s n).within (oneFrameSide (m n)) |
| 5077 | retained : ∃ c : ℝ,0< c ∧ ∀ᶠ n in l,c≤(s n).amount (w n) |
| 5078 | |
| 5079 | def oneSeems (q : PreparationParameters) (m : Mixer p n) (s : OneLeafMixture p n N) |
| 5080 | (x : OneUnit p n N) (g : Bool→ OneAugur p N) (z : Bool→ Profile p n) |
| 5081 | (L : Bool→ Finset (Label p.b)) (α : Party) (ε : ℝ):= |
| 5082 | (∀ i,(L i).card≤ q.B ∧ z i∈oneEffectivePins (oneEndpointPrimalPins (s.rooting x)) i) ∧ |
| 5083 | oneClaimed x g m z α L ε |
| 5084 | |
| 5085 | def oneSecureAt (s : OneLeafMixture p n N):= |
| 5086 | oneSecurePin (fun x=> oneEndpointPrimalPins (s.rooting x)) |
| 5087 | (fun x=> oneChannelPins (s.rooting x)) |
| 5088 | |
| 5089 | structure OneSketch (p : Shape) (M : ℕ) where |
| 5090 | c : PredictionClass |
| 5091 | α : Party |
| 5092 | r : F |
| 5093 | m : ∀ n,OneMarks p n (M* n) |
| 5094 | L : ∀ n,OneUnit p n (M* n)→ Bool→ Finset (Label p.b) |
| 5095 | g : Bool→ OneSeason p M |
| 5096 | ε : ℕ→ ℝ |
| 5097 | |
| 5098 | def oneMatchProg (b : OneSketch p M) (n : ℕ):= |
| 5099 | oneMatchUp (fun x=> oneMarkedDelta x (b.m n x)) b.α b.r b.c |
| 5100 | |
| 5101 | def oneGlow (s : OneRhythms p M) (w : OneTale p M) (b : OneSketch p M) (n : ℕ):= |
| 5102 | pr (pairW ((s n).sap (w n)) ((s n).sap (w n))) (oneMatchProg b n) |
| 5103 | |
| 5104 | def oneGleam (s : OneRhythms p M) (w : OneTale p M) (b : OneSketch p M) (n : ℕ):= |
| 5105 | pr (pairW ((s n).sap (w n)) ((s n).sap (w n))) |
| 5106 | (fun x=> oneMatchProg b n x ∧ ¬oneSecureAt (s n) x) |
| 5107 | |
| 5108 | abbrev OneCompatibilityCode (q : PreparationParameters) (p : Shape) (n N : ℕ) := |
| 5109 | PairCode (OneUnit p n N) (bp (3*(onePreparationCover q)*(2* N:ℝ))) |
| 5110 | |
| 5111 | def oneCodedLeaves (q : PreparationParameters) (s : OneLeafMixture p n N) |
| 5112 | (R : OneUnit p n N × OneUnit p n N → Prop) := |
| 5113 | ∃ code : OneCompatibilityCode q p n N, |
| 5114 | (∀ i∈s.T,∀ x∈i,∀ y∈i,code.label x=code.label y) ∧ |
| 5115 | ∀ x y,inTiles s.T x → inTiles s.T y → (code.read (x,y) ↔ R (x,y)) |
| 5116 | |
| 5117 | def oneOutside (q : PreparationParameters) (p : Shape) (n N : ℕ):= |
| 5118 | ∀ E : OneUnit p n N×OneUnit p n N→ Prop,named E (bp (3*(onePreparationCover q)*(2* N:ℝ)))→ |
| 5119 | named (E∘Prod.swap) (bp (3*(onePreparationCover q)*(2* N:ℝ)))→ |
| 5120 | ∀ w (s : OneLeafMixture p n N) (m : Mixer p n), |
| 5121 | (∀ x,imagePlanRank (s.rooting x)≤ onePreparationPins q)→ |
| 5122 | IsLaw w→ oneBySide w m (shine (2* N))→ carried w (oneFrameSide m)→ |
| 5123 | pr (pairW w w) (fun x=> E x ∧ ¬oneSecureAt s x)≤ |
| 5124 | 0.0005* pr (pairW w w) E+edgeError (2* N) |
| 5125 | |
| 5126 | end |
| 5127 | end Lax793645.ConstructionData.Frames |
| 5128 | end |
| 5129 | |
| 5130 | section |
| 5131 | namespace Lax793645.ConstructionData.Frames |
| 5132 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 5133 | open Finset Function |
| 5134 | open scoped Classical |
| 5135 | noncomputable section |
| 5136 | set_option backward.isDefEq.respectTransparency false |
| 5137 | variable {p:Shape} {n N K:ℕ} {C ζ:ℝ} |
| 5138 | abbrev OneAspect (pop:OneLeafMixture p n N):=pop.T×OneUnit p n N |
| 5139 | |
| 5140 | def oneTroupe (pop:OneLeafMixture p n N) (μ:Wgt (OneUnit p n N)):= |
| 5141 | semi (portionW μ pop.T) (fun i=> partW μ i.val) |
| 5142 | |
| 5143 | def oneCirque (pop:OneLeafMixture p n N) (μ:Wgt (OneUnit p n N)):= |
| 5144 | pairW (oneTroupe pop μ) (oneTroupe pop μ) |
| 5145 | |
| 5146 | structure OneLead (μ:Wgt (OneUnit p n N)) (pop:OneLeafMixture p n N) |
| 5147 | (m:Mixer p n) (C ζ:ℝ) (K:ℕ):Prop where |
| 5148 | strength:oneLeafStrength pop μ m C ζ K |
| 5149 | amount:0< pop.amount μ |
| 5150 | law:IsLaw μ |
| 5151 | cover:pop.within (oneFrameSide m) |
| 5152 | |
| 5153 | variable {pop:OneLeafMixture p n N} {μ:Wgt (OneUnit p n N)} {m:Mixer p n} |
| 5154 | end |
| 5155 | end Lax793645.ConstructionData.Frames |
| 5156 | end |
| 5157 | |
| 5158 | section |
| 5159 | namespace Lax793645.ConstructionData.Frames |
| 5160 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 5161 | open StatusAnalysis Matrix LinearMap Module Submodule Function |
| 5162 | noncomputable section |
| 5163 | set_option backward.isDefEq.respectTransparency false |
| 5164 | variable {p : Shape} {n N : ℕ} {d : Rates} |
| 5165 | def oneCharted (v : Charts p n d) (a : ImagePlan (Comp p.g) (OneColumn p n)) := |
| 5166 | ∀ i,LinearMap.range (v i)=oneEffectivePins (oneEndpointPrimalPins a) i ∧ Injective (v i) |
| 5167 | |
| 5168 | def oneSpecify (p : Shape) {d : ℕ} (i : Nodes) (v : Ax p n d) |
| 5169 | (m : Mixer p n) (o : OneUnit p n N) (l : Tag p.g) (s : Label p.b) |
| 5170 | (f : Flavor p.g) (x : Knobs p.g n) : Magazine p d := |
| 5171 | let A:=useAtom p l s f x |
| 5172 | (scan p l f x,(role p n A,roll v (Tsym m A)),oneInner o i A) |
| 5173 | |
| 5174 | end |
| 5175 | end Lax793645.ConstructionData.Frames |
| 5176 | end |
| 5177 | |
| 5178 | section |
| 5179 | namespace Lax793645.ConstructionData.Frames |
| 5180 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 5181 | open StatusAnalysis Filter Finset Matrix Function |
| 5182 | open scoped BigOperators Topology |
| 5183 | noncomputable section |
| 5184 | set_option backward.isDefEq.respectTransparency false |
| 5185 | variable {p : Shape} {n N r : ℕ} |
| 5186 | abbrev OneSilhouette (p : Shape) (N r : ℕ):=∀ l : Tag p.g,F→ OneAtomKey l N→ Fin r |
| 5187 | |
| 5188 | namespace OneAppearance |
| 5189 | variable (x : Appearance p) |
| 5190 | def oneFace (o : OneOrient p n N) (w : Knobs p.g n) : OneAtomKey (p:=p) x.l N := |
| 5191 | oneDesc x.trot w o |
| 5192 | |
| 5193 | def oneProfile {d : ℕ} (i : Nodes) (o : OneUnit p n N) (m : Mixer p n) (v : Ax p n d) |
| 5194 | (z : Knobs p.g n) : Magazine p d := |
| 5195 | oneSpecify p i v m o x.l x.s x.f z |
| 5196 | |
| 5197 | variable (Y : OneSilhouette p N r) |
| 5198 | def oneShowTag (o : OneOrient p n N) := fun w=> Y x.l x.q (oneFace x o w) |
| 5199 | |
| 5200 | def oneReference := mapW (oneLawOmega p N x.l x.q) (Y x.l x.q) |
| 5201 | |
| 5202 | def oneEmpirical (o : OneOrient p n N) := mapW (x.wit n) (oneShowTag x Y o) |
| 5203 | |
| 5204 | variable {d : ℕ} |
| 5205 | def oneReflected (i : Nodes) (o : OneUnit p n N) (m : Mixer p n) (v : Ax p n d) (a : Fin r) := |
| 5206 | mapW (stained (x.wit n) (oneShowTag x Y (o i)) a) (oneProfile x i o m v) |
| 5207 | |
| 5208 | def oneClose (o : OneOrient p n N) (ε : ℝ) := |
| 5209 | varOne (oneReference x Y) (oneEmpirical x Y o) ≤ ε |
| 5210 | |
| 5211 | end OneAppearance |
| 5212 | namespace OneAppearance |
| 5213 | variable (x : Appearance p) (Y : OneSilhouette p N r) |
| 5214 | variable {d : ℕ} |
| 5215 | end OneAppearance |
| 5216 | end |
| 5217 | end Lax793645.ConstructionData.Frames |
| 5218 | end |
| 5219 | |
| 5220 | section |
| 5221 | namespace Lax793645.ConstructionData.Frames |
| 5222 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 5223 | open Finset Matrix Function LinearMap Module Submodule Filter Real |
| 5224 | open scoped Classical Topology |
| 5225 | noncomputable section |
| 5226 | set_option backward.isDefEq.respectTransparency false |
| 5227 | variable {p : Shape} {n N K s : ℕ} |
| 5228 | variable (v : Template.Solo p) |
| 5229 | def oneOffBeat (v : Template.Solo p) (P : OneAtomKey (p:=p) (v.t ()) N → Prop) (o : OneOrient p n N) := |
| 5230 | fun z => P (oneDesc v z o) |
| 5231 | |
| 5232 | end |
| 5233 | end Lax793645.ConstructionData.Frames |
| 5234 | end |
| 5235 | |
| 5236 | section |
| 5237 | namespace Lax793645.ConstructionData.Frames |
| 5238 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 5239 | open Template Finset Matrix Function LinearMap Module Submodule Filter Real |
| 5240 | open scoped Classical Topology |
| 5241 | noncomputable section |
| 5242 | set_option backward.isDefEq.respectTransparency false |
| 5243 | variable {p : Shape} {n N : ℕ} |
| 5244 | def oneLuminous (v : Template.Solo p) (m : Mixer p n) (w : Wgt (Knobs p.g n)) (D : OneAtomKey (p:=p) (v.t ()) |
| 5245 | N → Prop) (K : ℕ) (i : OneOrient p n N) := |
| 5246 | let P := oneOffBeat v D i |
| 5247 | 0< pr w P ∧ ∀ (d : ℕ), d≤ K^2 → ∀ f : Vec (Fin d)→ₗ[F] Profile p n, |
| 5248 | Injective f → (∀ x,totalRank (f x)≤ K) → ∀ x, |
| 5249 | (7/8:ℝ)* bp (-(d:ℝ)) ≤ pr (onW w P) (fun z=> stains v m f z=x) |
| 5250 | |
| 5251 | end |
| 5252 | end Lax793645.ConstructionData.Frames |
| 5253 | end |
| 5254 | |
| 5255 | section |
| 5256 | namespace Lax793645.ConstructionData.Frames |
| 5257 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 5258 | open Template Finset Matrix Function LinearMap Module Submodule Filter Real |
| 5259 | open scoped Classical Topology |
| 5260 | noncomputable section |
| 5261 | set_option backward.isDefEq.respectTransparency false |
| 5262 | variable {p : Shape} {n N : ℕ} |
| 5263 | variable (v : Solo p) |
| 5264 | def onePatrol (m : Mixer p n) (w : Wgt (Knobs p.g n)) |
| 5265 | (S : OneAtomKey (p:=p) (v.t ()) N→ Prop) (K : ℕ) (q : F) (x : OneOrient p n N) := |
| 5266 | oneLuminous v m w S K x ∧ |
| 5267 | 3/4* pr (oneLawOmega p N (v.t ()) q) S ≤ pr w (oneOffBeat v S x) |
| 5268 | |
| 5269 | variable {K s : ℕ} |
| 5270 | end |
| 5271 | end Lax793645.ConstructionData.Frames |
| 5272 | end |
| 5273 | |
| 5274 | section |
| 5275 | namespace Lax793645.ConstructionData.Frames |
| 5276 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 5277 | open StatusAnalysis Filter Finset Matrix Function Template |
| 5278 | open scoped BigOperators Topology |
| 5279 | noncomputable section |
| 5280 | set_option backward.isDefEq.respectTransparency false |
| 5281 | variable {p : Shape} {n N K M r : ℕ} |
| 5282 | structure OneUnaryParameters (p : Shape) (M K s : ℕ) : Prop where |
| 5283 | hM : 1≤ M |
| 5284 | hg : Odd p.g |
| 5285 | hJ : 1≤ p.j |
| 5286 | hR : 1≤ p.r |
| 5287 | profiles : 2* profileA p K< s |
| 5288 | gleaming : bp (-((p.J-s:ℕ):ℝ))* bp s< glintRate K |
| 5289 | |
| 5290 | namespace OneAppearance |
| 5291 | variable (x : Appearance p) {s0 : ℕ} |
| 5292 | def oneFoil (x : Appearance p) (Y : OneSilhouette p N r) (o : OneOrient p n N) |
| 5293 | (m : Mixer p n) (K : ℕ) (δ : ℝ) := |
| 5294 | ∀ (z:Digest p.g) (i:Fin r), z.feasible x.l x.f → z.sumBit=x.q → |
| 5295 | δ ≤ oneReference x Y i → onePatrol x.trot m (scopedScan p n x.l x.f z) |
| 5296 | (fun y => Y x.l x.q y=i) K x.q o |
| 5297 | |
| 5298 | end OneAppearance |
| 5299 | open OneAppearance |
| 5300 | variable {s0 : ℕ} |
| 5301 | end |
| 5302 | end Lax793645.ConstructionData.Frames |
| 5303 | end |
| 5304 | |
| 5305 | section |
| 5306 | namespace Lax793645.ConstructionData.Frames |
| 5307 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 5308 | open Template StatusAnalysis StatusAnalysis.DualAnalysis OneAppearance Filter Finset Matrix Function LinearMap Module |
| 5309 | open scoped BigOperators Topology |
| 5310 | noncomputable section |
| 5311 | set_option backward.isDefEq.respectTransparency false |
| 5312 | variable {p : Shape} {n N r : ℕ} {d : Rates} |
| 5313 | def oneWisp (p : Shape) (Y : OneSilhouette p N r) : Terrain p r:= |
| 5314 | fun l q=> mapW (oneLawOmega p N l q) (Y l q) |
| 5315 | |
| 5316 | def oneWake (p : Shape) (Y : OneSilhouette p N r) (m : Mixer p n) (o : OneUnit p n N) |
| 5317 | (s : Charts p n d) : Gazette p r d:=fun i x a=> oneReflected x Y i o m (s i) a |
| 5318 | |
| 5319 | end |
| 5320 | end Lax793645.ConstructionData.Frames |
| 5321 | end |
| 5322 | |
| 5323 | section |
| 5324 | namespace Lax793645.ConstructionData.Frames |
| 5325 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 5326 | open StatusAnalysis StatusAnalysis.DualAnalysis OneAppearance Template |
| 5327 | open Matrix Filter Finset LinearMap Module Function |
| 5328 | open scoped BigOperators Topology |
| 5329 | noncomputable section |
| 5330 | set_option backward.isDefEq.respectTransparency false |
| 5331 | variable {p : Shape} {r n N : ℕ} {d : Rates} |
| 5332 | def oneFromPulse (Y: OneSilhouette p N r) (f:Pulsar p r) : OneAugur p N := |
| 5333 | fun l q x=> f l q (Y l q x) |
| 5334 | |
| 5335 | end |
| 5336 | end Lax793645.ConstructionData.Frames |
| 5337 | end |
| 5338 | |
| 5339 | section |
| 5340 | namespace Lax793645.ConstructionData.Frames |
| 5341 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 5342 | open StatusAnalysis StatusAnalysis.DualAnalysis Function Finset |
| 5343 | open scoped BigOperators |
| 5344 | noncomputable section |
| 5345 | set_option backward.isDefEq.respectTransparency false |
| 5346 | variable {T : Type} {p : Shape} {N r s K R : ℕ} |
| 5347 | def OneLinearSilhouette (Y : OneSilhouette p N r) (K : ℕ) := |
| 5348 | ∀ l,HasLinearCells (Y l) K |
| 5349 | |
| 5350 | end |
| 5351 | end Lax793645.ConstructionData.Frames |
| 5352 | end |
| 5353 | |
| 5354 | section |
| 5355 | namespace Lax793645.ConstructionData.Frames |
| 5356 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 5357 | open Finset Matrix Function Filter |
| 5358 | open scoped Classical |
| 5359 | noncomputable section |
| 5360 | set_option backward.isDefEq.respectTransparency false |
| 5361 | variable {I : Type} [Fintype I] [DecidableEq I] {p : Shape} {n N : ℕ} |
| 5362 | def oneQueryCoordinateEquiv (t : Tagging p I) (N : ℕ) : |
| 5363 | KeyCoordinates (KeySlots p t) N ≃ OneKeys t N := |
| 5364 | (rackCoordinates (KeySlots p t) N).toEquiv.trans (oneScatter t N).symm |
| 5365 | |
| 5366 | end |
| 5367 | end Lax793645.ConstructionData.Frames |
| 5368 | end |
| 5369 | |
| 5370 | section |
| 5371 | namespace Lax793645.ConstructionData.Frames |
| 5372 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 5373 | open Finset Matrix Function LinearMap |
| 5374 | open scoped Classical |
| 5375 | noncomputable section |
| 5376 | set_option backward.isDefEq.respectTransparency false |
| 5377 | set_option maxHeartbeats 200000 |
| 5378 | variable {I T : Type} [Fintype I] [DecidableEq I] [Fintype T] [DecidableEq T] |
| 5379 | {p : Shape} {n N : ℕ} |
| 5380 | /-- The one-frame reference fixes quadratic values and polar pairings |
| 5381 | within each component, without fixing ordered products of its halves. -/ |
| 5382 | def oneOwnPart (t : Tagging p I) (q : I → F) |
| 5383 | (x : KeyCoordinates (KeySlots p t) N) : Prop:= |
| 5384 | quadraticTraced (crowded (ownPort t)) (geoMatrix (ownPort t) (ownMap t q)) x |
| 5385 | |
| 5386 | end |
| 5387 | end Lax793645.ConstructionData.Frames |
| 5388 | end |
| 5389 | |
| 5390 | section |
| 5391 | namespace Lax793645.ConstructionData.Frames |
| 5392 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 5393 | open Matrix LinearMap Module Function Finset |
| 5394 | open scoped Classical BigOperators |
| 5395 | noncomputable section |
| 5396 | set_option backward.isDefEq.respectTransparency false |
| 5397 | variable {I J : Type} [Fintype I] [DecidableEq I] [Fintype J] [DecidableEq J] |
| 5398 | {p : Shape} {N : ℕ} |
| 5399 | def oneOwnKeyPart (t : Tagging p I) (q : I→ F) (x : OneKeys t N):= |
| 5400 | oneOwnPart t q ((oneQueryCoordinateEquiv t N).symm x) |
| 5401 | |
| 5402 | def oneLawNu (p : Shape) (N : ℕ) (t : Tagging p I) (q : I→ F) : Wgt (OneKeys t N):= |
| 5403 | unifOn (oneOwnKeyPart t q) |
| 5404 | |
| 5405 | end |
| 5406 | end Lax793645.ConstructionData.Frames |
| 5407 | end |
| 5408 | |
| 5409 | section |
| 5410 | namespace Lax793645.ConstructionData.Frames |
| 5411 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 5412 | open LinearMap Module Function Finset |
| 5413 | open scoped Classical BigOperators |
| 5414 | noncomputable section |
| 5415 | set_option backward.isDefEq.respectTransparency false |
| 5416 | variable {p : Shape} {N R r s : ℕ} {I T : Type} [Fintype I] [DecidableEq I] |
| 5417 | def OneRefines (Y : OneSilhouette p N r) (X : OneSilhouette p N s):= |
| 5418 | ∀ l q,∃ f : Fin r→ Fin s,∀ x,X l q x=f (Y l q x) |
| 5419 | |
| 5420 | end |
| 5421 | end Lax793645.ConstructionData.Frames |
| 5422 | end |
| 5423 | |
| 5424 | section |
| 5425 | namespace Lax793645.ConstructionData.Frames |
| 5426 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 5427 | open Function LinearMap Module Finset |
| 5428 | open scoped Classical BigOperators |
| 5429 | noncomputable section |
| 5430 | set_option backward.isDefEq.respectTransparency false |
| 5431 | variable {p : Shape} {N r s K R : ℕ} {I T : Type} [Fintype I] [DecidableEq I] |
| 5432 | def OneFullLinearSilhouette (Y : OneSilhouette p N r) (K : ℕ) := |
| 5433 | ∀ l,HasFullLinearCells (Y l) K |
| 5434 | |
| 5435 | end |
| 5436 | end Lax793645.ConstructionData.Frames |
| 5437 | end |
| 5438 | |
| 5439 | section |
| 5440 | namespace Lax793645.ConstructionData.Frames |
| 5441 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 5442 | open Matrix LinearMap Function Finset |
| 5443 | open scoped BigOperators Classical |
| 5444 | noncomputable section |
| 5445 | variable {g : ℕ} |
| 5446 | /-- The vertex at the start of an oriented cycle component. -/ |
| 5447 | def cycleOrigin (e : Comp g) : Tag g := |
| 5448 | if h : 3≤ g then (CycleGeometry.forwardEquiv h).symm e else e.val.1 |
| 5449 | |
| 5450 | def cycleWeight (e f : Comp g) : F := |
| 5451 | if h : 2≤ g then ∑ i : Fin ((g-1)/2), |
| 5452 | if CycleGeometry.forward h (CycleGeometry.matchingVertex (cycleOrigin e) i)=f then 1 else 0 |
| 5453 | else 0 |
| 5454 | |
| 5455 | theorem matching_vertex_injective (t : Tag g) : |
| 5456 | Injective (CycleGeometry.matchingVertex t) := by |
| 5457 | intro i j h |
| 5458 | have he:=congrArg Fin.val (add_right_cancel h) |
| 5459 | apply Fin.ext |
| 5460 | dsimp only [CycleGeometry.matchingVertex] at he |
| 5461 | omega |
| 5462 | |
| 5463 | theorem cycle_weight_exists (hg : 3≤ g) (e : Comp g) : ∃ f,cycleWeight e f=1 := by |
| 5464 | let i : Fin ((g-1)/2):=⟨0,by omega⟩ |
| 5465 | let f:=CycleGeometry.forward (by omega : 2≤ g) (CycleGeometry.matchingVertex (cycleOrigin e) i) |
| 5466 | refine ⟨f,?_⟩ |
| 5467 | simp only [cycleWeight,dif_pos (show 2≤ g by omega)] |
| 5468 | rw [sum_eq_single i] |
| 5469 | · simp [f] |
| 5470 | · intro j _ hji |
| 5471 | rw [if_neg] |
| 5472 | intro h |
| 5473 | exact hji (matching_vertex_injective _ (CycleGeometry.forward_injective hg h)) |
| 5474 | simp |
| 5475 | |
| 5476 | /-- One representative suffices to store the matrix for a whole matching. -/ |
| 5477 | def cycleAnchor (e : Comp g) : Comp g := |
| 5478 | if hg : 3≤ g then (cycle_weight_exists hg e).choose else e |
| 5479 | |
| 5480 | end |
| 5481 | end Lax793645.ConstructionData.Frames |
| 5482 | end |
| 5483 | |
| 5484 | section |
| 5485 | namespace Lax793645.ConstructionData.Frames |
| 5486 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 5487 | open Matrix LinearMap Function Finset |
| 5488 | open scoped BigOperators Classical |
| 5489 | noncomputable section |
| 5490 | set_option backward.isDefEq.respectTransparency false |
| 5491 | variable {p : Shape} {n : ℕ} |
| 5492 | abbrev ReducedIndex (p : Shape):=Fin p.J × Comp p.g |
| 5493 | |
| 5494 | abbrev ReducedOne (p : Shape):=ReducedIndex p × Bool |
| 5495 | |
| 5496 | abbrev ReducedBits (p : Shape):=ReducedOne p × Bool |
| 5497 | |
| 5498 | def reducedSlot (i : ReducedOne p) : MOne p:= |
| 5499 | ((i.1.1,i.1.2,cycleAnchor i.1.2),i.2) |
| 5500 | |
| 5501 | def reducedOrdered (m : Mixer p n) (i : ReducedOne p):=orderedM m (reducedSlot i) |
| 5502 | |
| 5503 | def reducedIndexedSum (m : Mixer p n) (c : Vec (ReducedBits p)):= |
| 5504 | ∑ i,c i •eitherM i.2 (reducedOrdered m i.1) |
| 5505 | |
| 5506 | /-- The expanded storage table contains only one independent L/R pair per |
| 5507 | cycle component. It is retained as an adapter to the scalar geometry API. -/ |
| 5508 | def ReducedMixerLaw (m : Mixer p n) : Prop := |
| 5509 | 3≤ p.g ∧ |
| 5510 | (∀ j e f,m.mixL j e f=cycleWeight e f •m.mixL j e (cycleAnchor e)) ∧ |
| 5511 | (∀ j e f,m.mixR j e f=m.mixR j e (cycleAnchor e)) |
| 5512 | |
| 5513 | def reducedBinaryGood (m : Mixer p n) : Prop := |
| 5514 | ReducedMixerLaw m ∧ ∀ s t : Label p.b,s≠t→ |
| 5515 | ∀ (c : Vec (ReducedBits p)) (b : Vec Bool),c≠0 ∨ b≠0→ |
| 5516 | n≤5* blockRank Block.sharp s t (reducedIndexedSum m c+selfSum m b) |
| 5517 | |
| 5518 | /-- Expand one set of independent prescribed bits along the cycle matchings. -/ |
| 5519 | def reducedScript {I : Type} (s : Script p I) : Script p I:=fun x y i=> |
| 5520 | if i.2 then cycleWeight i.1.2.1 i.1.2.2* s x y ((i.1.1,i.1.2.1,cycleAnchor i.1.2.1),true) |
| 5521 | else s x y ((i.1.1,i.1.2.1,cycleAnchor i.1.2.1),false) |
| 5522 | |
| 5523 | end |
| 5524 | end Lax793645.ConstructionData.Frames |
| 5525 | end |
| 5526 | |
| 5527 | section |
| 5528 | namespace Lax793645.ConstructionData.Frames |
| 5529 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 5530 | open Matrix LinearMap Module Function Finset Filter |
| 5531 | open scoped Classical BigOperators |
| 5532 | noncomputable section |
| 5533 | set_option backward.isDefEq.respectTransparency false |
| 5534 | variable {p : Shape} {n N : ℕ} {I : Type} [Fintype I] [DecidableEq I] |
| 5535 | abbrev OneCrossing (p : Shape) (l d : Tag p.g):={e : Comp p.g//inc e l ∧inc e d} |
| 5536 | |
| 5537 | abbrev OneHarm (p : Shape) (l d : Tag p.g):= |
| 5538 | ReducedBits p⊕{u : Unit//Template.sharesComponent p l d} |
| 5539 | |
| 5540 | abbrev oneAbbey (v : Template p I) : v.Chorus→ Type |
| 5541 | | .inl i=> OneHarm p (v.t i.val.1) (v.t i.val.2) |
| 5542 | | .inr i=> OneCrossing p (v.t i.val.1) (v.t i.val.2) |
| 5543 | |
| 5544 | instance (v : Template p I) (i : v.Chorus) : Fintype (oneAbbey v i):= |
| 5545 | i.rec (fun _=> inferInstanceAs (Fintype (OneHarm p _ _))) |
| 5546 | (fun _=> inferInstanceAs (Fintype (OneCrossing p _ _))) |
| 5547 | |
| 5548 | instance (v : Template p I) (i : v.Chorus) : DecidableEq (oneAbbey v i):=Classical.typeDecidableEq _ |
| 5549 | |
| 5550 | def oneKappa (v : Template p I):=wavelength (oneAbbey v) |
| 5551 | |
| 5552 | end |
| 5553 | end Lax793645.ConstructionData.Frames |
| 5554 | end |
| 5555 | |
| 5556 | section |
| 5557 | namespace Lax793645.ConstructionData.Frames |
| 5558 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 5559 | open Finset |
| 5560 | open scoped Classical |
| 5561 | noncomputable section |
| 5562 | set_option backward.isDefEq.respectTransparency false |
| 5563 | variable {I : Type} [Fintype I] [DecidableEq I] {p : Shape} {n N : ℕ} |
| 5564 | def oneQueryWeightBad (v : Template p I) |
| 5565 | (D : Wgt (KeyCoordinates (KeySlots p v.t) N)) (ψ : Wgt (Inputs p n I)) |
| 5566 | (b ε : ℝ) (o : OneUnit p n N) : Prop := |
| 5567 | ∃ w : Wgt (Inputs p n I),inputFourierNorm w≤ b ∧ |
| 5568 | ε < |avg unif (fun x=> D (oneTemplateCoordinates v o x)*ψ x* w x)| |
| 5569 | |
| 5570 | end |
| 5571 | end Lax793645.ConstructionData.Frames |
| 5572 | end |
| 5573 | |
| 5574 | section |
| 5575 | namespace Lax793645.ConstructionData.Frames |
| 5576 | open Lax793645.ConstructionData.Binary |
| 5577 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 5578 | open Finset Matrix Function Filter |
| 5579 | open scoped Classical |
| 5580 | noncomputable section |
| 5581 | set_option backward.isDefEq.respectTransparency false |
| 5582 | variable {I A : Type} [Fintype I] [DecidableEq I] [Fintype A] [Nonempty A] |
| 5583 | {p : Shape} {n N : ℕ} |
| 5584 | def oneQueryPValues (v : Template p I) (o : OneUnit p n N) (x : Inputs p n I) : I→ F := |
| 5585 | fun i=> oneInner o (v.aim i) (useAtom p (v.t i) (v.s i) (v.f i) (x i)) |
| 5586 | |
| 5587 | end |
| 5588 | end Lax793645.ConstructionData.Frames |
| 5589 | end |
| 5590 | |
| 5591 | section |
| 5592 | namespace Lax793645.ConstructionData.Frames |
| 5593 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 5594 | open Finset Matrix Function Filter |
| 5595 | open scoped Classical |
| 5596 | noncomputable section |
| 5597 | set_option backward.isDefEq.respectTransparency false |
| 5598 | variable {I A : Type} [Fintype I] [DecidableEq I] [Fintype A] [Nonempty A] |
| 5599 | {p : Shape} {n N : ℕ} |
| 5600 | def oneQueryFlags (v : Template p I) (χ : Inputs p n I→ A) |
| 5601 | (o : OneUnit p n N) (x : Inputs p n I) : A×(I→ F):=(χ x,oneQueryPValues v o x) |
| 5602 | |
| 5603 | def oneQueryReferenceSet (v : Template p I) (q : I→ F) (N : ℕ) : |
| 5604 | KeyCoordinates (KeySlots p v.t) N→ Prop := |
| 5605 | fun x=> oneOwnPart v.t q x |
| 5606 | |
| 5607 | end |
| 5608 | end Lax793645.ConstructionData.Frames |
| 5609 | end |
| 5610 | |
| 5611 | section |
| 5612 | namespace Lax793645.ConstructionData.Frames |
| 5613 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 5614 | open StatusAnalysis Finset Matrix Function Filter |
| 5615 | open scoped Classical |
| 5616 | noncomputable section |
| 5617 | set_option backward.isDefEq.respectTransparency false |
| 5618 | variable {p : Shape} {n N : ℕ} {q : Format} {d : Rates} {b : Bool} |
| 5619 | /-- The scalar status vocabulary is unchanged; its parity coordinate now |
| 5620 | comes from the single quadratic frame and its opposite channels. -/ |
| 5621 | def onePrinted (b : Bool) (v : Charts p n d) (t : Tagging p (Messenger q)) |
| 5622 | (s : Messenger q→ Label p.b) (f : Messenger q→ Flavor p.g) (m : Mixer p n) |
| 5623 | (o : OneUnit p n N) (x : Inputs p n (Messenger q)) : Amounts p q d b := |
| 5624 | joinPrinted (nominalPrinted b v t s f m x) (oneQueryPValues (manager b t s f) o x) |
| 5625 | |
| 5626 | end |
| 5627 | end Lax793645.ConstructionData.Frames |
| 5628 | end |
| 5629 | |
| 5630 | section |
| 5631 | namespace Lax793645.ConstructionData.Frames |
| 5632 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 5633 | open StatusAnalysis Filter Finset Matrix Function |
| 5634 | open scoped Classical BigOperators |
| 5635 | noncomputable section |
| 5636 | set_option backward.isDefEq.respectTransparency false |
| 5637 | variable {p : Shape} {n N r : ℕ} {q : Format} {d : Rates} {b : Bool} |
| 5638 | namespace OneQuill |
| 5639 | variable (w : Quill p q d b) (t : Tagging p (Messenger q)) (z : Messenger q→ F) |
| 5640 | (o : OneUnit p n N) |
| 5641 | variable (m : Mixer p n) |
| 5642 | def oneSeraph (s : Charts p n d) (Y : OneSilhouette p N r) (i : Messenger q) : |
| 5643 | Wgt (OneAtomKey (p:=p) (t i) N):=fun h=> |
| 5644 | OneAppearance.oneReflected (w.allure t z i) Y (parcel b i) o m |
| 5645 | (s (parcel b i)) (Y (t i) (z i) h) (w.amp i) |
| 5646 | |
| 5647 | end OneQuill |
| 5648 | end |
| 5649 | end Lax793645.ConstructionData.Frames |
| 5650 | end |
| 5651 | |
| 5652 | section |
| 5653 | namespace Lax793645.ConstructionData.Frames |
| 5654 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 5655 | open Function LinearMap Finset StatusAnalysis Filter |
| 5656 | open scoped Classical Topology |
| 5657 | noncomputable section |
| 5658 | set_option backward.isDefEq.respectTransparency false |
| 5659 | set_option maxHeartbeats 800000 |
| 5660 | def supportLower (θ a : ℝ) : ℝ:=θ* ind (0< a) |
| 5661 | |
| 5662 | end |
| 5663 | end Lax793645.ConstructionData.Frames |
| 5664 | end |
| 5665 | |
| 5666 | section |
| 5667 | namespace Lax793645.ConstructionData.Frames |
| 5668 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 5669 | open StatusAnalysis LinearMap Module Matrix Function Finset |
| 5670 | open scoped Classical BigOperators |
| 5671 | noncomputable section |
| 5672 | set_option backward.isDefEq.respectTransparency false |
| 5673 | set_option maxHeartbeats 800000 |
| 5674 | variable {p : Shape} {n N d : ℕ} |
| 5675 | /-- This budget records the tester coordinates once, then two factors |
| 5676 | for each basis quadratic and for the internal status bit. -/ |
| 5677 | def oneStatusCoordinateBound (p : Shape) (d K : ℕ) : ℕ := |
| 5678 | Fintype.card (Gauge p)+d*(2*(p.J* tagDegree p.g*(2* K)))+ |
| 5679 | 2*(tagDegree p.g*(2* p.h)) |
| 5680 | |
| 5681 | end |
| 5682 | end Lax793645.ConstructionData.Frames |
| 5683 | end |
| 5684 | |
| 5685 | section |
| 5686 | namespace Lax793645.ConstructionData.Frames |
| 5687 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 5688 | open Function LinearMap Finset StatusAnalysis Filter |
| 5689 | open scoped Classical Topology |
| 5690 | noncomputable section |
| 5691 | set_option backward.isDefEq.respectTransparency false |
| 5692 | set_option maxHeartbeats 800000 |
| 5693 | namespace OneQuill |
| 5694 | variable {p : Shape} {n N r : ℕ} {q : Format} {d : Rates} {b : Bool} |
| 5695 | variable (w : Quill p q d b) (t : Tagging p (Messenger q)) (z : Messenger q→ F) |
| 5696 | (o : OneUnit p n N) (m : Mixer p n) (s : Charts p n d) (Y : OneSilhouette p N r) |
| 5697 | def oneSupportSeraph (θ : ℝ) (i : Messenger q) : Wgt (OneAtomKey (p:=p) (t i) N):= |
| 5698 | fun x=> supportLower θ (oneSeraph w t z o m s Y i x) |
| 5699 | |
| 5700 | end OneQuill |
| 5701 | end |
| 5702 | end Lax793645.ConstructionData.Frames |
| 5703 | end |
| 5704 | |
| 5705 | section |
| 5706 | namespace Lax793645.ConstructionData.Frames |
| 5707 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 5708 | open StatusAnalysis Finset Function |
| 5709 | open scoped Classical BigOperators |
| 5710 | noncomputable section |
| 5711 | set_option backward.isDefEq.respectTransparency false |
| 5712 | variable {p : Shape} {n N r : ℕ} {q : Format} {d e : Rates} {b : Bool} |
| 5713 | namespace OneQuill |
| 5714 | variable (w : Quill p q d b) (t : Tagging p (Messenger q)) (z : Messenger q→ F) |
| 5715 | (μ : Wgt (OneUnit p n N)) (P : OneUnit p n N→ Prop) |
| 5716 | (m : Mixer p n) (s : Charts p n d) (Y : OneSilhouette p N r) |
| 5717 | end OneQuill |
| 5718 | namespace OneTypus |
| 5719 | variable (w : Typus p q d e) (o o' : OneUnit p n N) |
| 5720 | (s : Charts p n d) (t : Charts p n e) (m : Mixer p n) (Y : OneSilhouette p N r) |
| 5721 | def oneMomus :=oneKappa (w.qA.pen w.t)* oneKappa (w.qB.pen w.t) |
| 5722 | |
| 5723 | end OneTypus |
| 5724 | end |
| 5725 | end Lax793645.ConstructionData.Frames |
| 5726 | end |
| 5727 | |
| 5728 | section |
| 5729 | namespace Lax793645.ConstructionData.Frames |
| 5730 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 5731 | open Function LinearMap Finset StatusAnalysis Filter |
| 5732 | open scoped Classical Topology |
| 5733 | noncomputable section |
| 5734 | set_option backward.isDefEq.respectTransparency false |
| 5735 | set_option maxHeartbeats 800000 |
| 5736 | namespace OneTypus |
| 5737 | variable {p : Shape} {n N r : ℕ} {q : Format} {d e : Rates} |
| 5738 | variable (w : Typus p q d e) (o o' : OneUnit p n N) |
| 5739 | (s : Charts p n d) (t : Charts p n e) (m : Mixer p n) (Y : OneSilhouette p N r) |
| 5740 | def oneSupportChimera (i : Messenger q):= |
| 5741 | dip (oneLawOmega p N (w.t i) (w.z i)) (OneQuill.oneSupportSeraph w.qA w.t w.z o m s Y 1 i) |
| 5742 | (OneQuill.oneSupportSeraph w.qB w.t w.z o' m t Y 1 i) |
| 5743 | |
| 5744 | def oneSupportConstellation:=oneMomus w*∏ i,oneSupportChimera w o o' s t m Y i |
| 5745 | |
| 5746 | end OneTypus |
| 5747 | namespace OneTypus |
| 5748 | variable {p : Shape} {n N r : ℕ} {q : Format} {d e : Rates} |
| 5749 | variable (w : Typus p q d e) (μ ρ : Wgt (OneUnit p n N)) |
| 5750 | (F G : OneUnit p n N→ Prop) (s : Charts p n d) (t : Charts p n e) |
| 5751 | (m : Mixer p n) (Y : OneSilhouette p N r) (θ : ℝ) |
| 5752 | end OneTypus |
| 5753 | end |
| 5754 | end Lax793645.ConstructionData.Frames |
| 5755 | end |
| 5756 | |
| 5757 | section |
| 5758 | namespace Lax793645.ConstructionData.Frames |
| 5759 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 5760 | open Matrix LinearMap Submodule Module Finset Function |
| 5761 | open scoped BigOperators Classical |
| 5762 | noncomputable section |
| 5763 | set_option backward.isDefEq.respectTransparency false |
| 5764 | variable {p : Shape} {n : ℕ} {I : Type} [Fintype I] [DecidableEq I] |
| 5765 | def oneProtectionThreshold (K t : ℕ):=(4*(K+t))^2+t |
| 5766 | |
| 5767 | def oneSelectorProtectionDim (p : Shape) (K : ℕ):= |
| 5768 | oneProtectionThreshold K 28*(Fintype.card (Bool×Comp p.g)* K) |
| 5769 | |
| 5770 | def oneBaseProtectionDim (p : Shape) (K : ℕ):= |
| 5771 | Fintype.card (SelIdx p.b p.j)*(Fintype.card (Bool×Comp p.g)* K) |
| 5772 | |
| 5773 | def OnePenSpace (v : Template p I) (a : ImagePlan (Comp p.g) (OneColumn p n)) (K : ℕ) : Prop := |
| 5774 | (∀ e,dim (a e)≤ K) ∧ |
| 5775 | ∃ (U : Space (Vec (SelIdx p.b p.j))) (V : Space (Vec (AIdx p.g n))), |
| 5776 | dim U≤ oneSelectorProtectionDim p K ∧ dim V≤ oneBaseProtectionDim p K ∧ |
| 5777 | (∀ i e,oneEndpointPrimalPins a i e≤ tensorCross U V) ∧ |
| 5778 | (∀ i e x,x∈oneEndpointPrimalPins a i e→ |
| 5779 | Matrix.rank (flattenMatrix.symm x)≤ oneProtectionThreshold K (Fintype.card I)→ |
| 5780 | x∈tensorRectangle U V) ∧ |
| 5781 | LinearIndependent F (U.mkQ ∘ (fun j=> selV p.j (v.s j))) |
| 5782 | |
| 5783 | end |
| 5784 | end Lax793645.ConstructionData.Frames |
| 5785 | end |
| 5786 | |
| 5787 | section |
| 5788 | namespace Lax793645.ConstructionData.Frames |
| 5789 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 5790 | open StatusAnalysis |
| 5791 | noncomputable section |
| 5792 | variable {p : Shape} {q : Format} {d e : Rates} |
| 5793 | /-- Scalar compatibility of the deterministic expansion of the smaller |
| 5794 | binary prescription. All other status and flag conditions are unchanged. -/ |
| 5795 | def onePermission (w : Typus p q d e) : Prop := |
| 5796 | (∀ i,1≤ q i ∧q i≤7) ∧w.qA.moral w.t w.z ∧w.qB.moral w.t w.z ∧ |
| 5797 | (∀ i,fullq w.z i=1) ∧rhyme w.qA.amp w.qB.amp ∧ |
| 5798 | proclaims p w.qA.amp w.qB.amp w.t (reducedScript w.qA.script) ∧ |
| 5799 | proclaims p w.qB.amp w.qA.amp w.t (reducedScript w.qB.script) |
| 5800 | |
| 5801 | end |
| 5802 | end Lax793645.ConstructionData.Frames |
| 5803 | end |
| 5804 | |
| 5805 | section |
| 5806 | namespace Lax793645.ConstructionData.Frames |
| 5807 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 5808 | open Matrix Finset LinearMap Submodule Module Function |
| 5809 | open scoped BigOperators Classical |
| 5810 | noncomputable section |
| 5811 | set_option backward.isDefEq.respectTransparency false |
| 5812 | variable {p : Shape} {n : ℕ} |
| 5813 | def oneChannelInjection (p : Shape) (n : ℕ) : (Bool→ Hyperbolic p.h)→ₗ[F]Vec (OneColumn p n):= |
| 5814 | (oneNominalCoordinates p n).symm.toLinearMap.comp (LinearMap.inr F _ _) |
| 5815 | |
| 5816 | def oneAllChannels (p : Shape) (n : ℕ):=LinearMap.range (oneChannelInjection p n) |
| 5817 | |
| 5818 | def oneTabSpace (a : ImagePlan (Comp p.g) (OneColumn p n)) (e : Comp p.g):= |
| 5819 | a e⊔oneAllChannels p n |
| 5820 | |
| 5821 | def oneFitsTable (a b : ImagePlan (Comp p.g) (OneColumn p n)) (T Q : OneCross p n) := |
| 5822 | ∀ e,∀ v∈oneTabSpace a e,∀ w∈oneTabSpace b e,evmat (T e) v w=evmat (Q e) v w |
| 5823 | |
| 5824 | def oneDeckMax (p : Shape) (K : ℕ):=Fintype.card (Comp p.g)*(K+4* p.h)^2 |
| 5825 | |
| 5826 | end |
| 5827 | end Lax793645.ConstructionData.Frames |
| 5828 | end |
| 5829 | |
| 5830 | section |
| 5831 | namespace Lax793645.ConstructionData.Frames |
| 5832 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 5833 | open Matrix LinearMap Submodule Module Function |
| 5834 | open scoped BigOperators Classical |
| 5835 | noncomputable section |
| 5836 | set_option backward.isDefEq.respectTransparency false |
| 5837 | variable {p : Shape} {n N : ℕ} |
| 5838 | def oneTableFlag (a b : ImagePin (Comp p.g) (OneColumn p n) (2* N)) |
| 5839 | (T : OneCross p n) (x : OneUnit p n N) := |
| 5840 | ∀ e,∀ v∈oneTabSpace a.sp e,∀ w∈b.sp e, |
| 5841 | evmat (T e) v w=oneAmbientPolar N (oneCoordinateImages x e*ᵥv) (b.target e*ᵥw) |
| 5842 | |
| 5843 | end |
| 5844 | end Lax793645.ConstructionData.Frames |
| 5845 | end |
| 5846 | |
| 5847 | section |
| 5848 | namespace Lax793645.ConstructionData.Frames |
| 5849 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 5850 | open Matrix LinearMap Submodule Module Function Finset |
| 5851 | open scoped BigOperators Classical |
| 5852 | noncomputable section |
| 5853 | set_option backward.isDefEq.respectTransparency false |
| 5854 | set_option maxHeartbeats 800000 |
| 5855 | variable {p : Shape} {n N : ℕ} |
| 5856 | def oneContract (T : OneCross p n) (i j : Bool) : Profile p n→ₗ[F]F:= |
| 5857 | (jointMatrixFunctional (fun e=> channelQuadraticMatrix p.h |
| 5858 | (unitLeftChannels p.h (oneTableOfCross T e) j))).comp (jointEndpointMap i) |
| 5859 | |
| 5860 | def oneTableSafe (a b : ImagePlan (Comp p.g) (OneColumn p n)) (T : OneCross p n) := |
| 5861 | ∀ e i j,∀ v∈oneEndpointPrimalPins a i e, |
| 5862 | unitLeftChannels p.h (oneTableOfCross T e) j (jointInjection i v)∈oneChannelPins b j e→ v=0 |
| 5863 | |
| 5864 | end |
| 5865 | end Lax793645.ConstructionData.Frames |
| 5866 | end |
| 5867 | |
| 5868 | section |
| 5869 | namespace Lax793645.ConstructionData.Frames |
| 5870 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 5871 | open StatusAnalysis Finset Matrix Function LinearMap Module Submodule |
| 5872 | open scoped BigOperators Classical |
| 5873 | noncomputable section |
| 5874 | set_option backward.isDefEq.respectTransparency false |
| 5875 | set_option maxHeartbeats 800000 |
| 5876 | variable {p : Shape} {n N : ℕ} {q : Format} {d e : Rates} |
| 5877 | def oneTargetMark (v : Charts p n d) (T : OneCross p n) (i j : Bool) : Cell (d i):= |
| 5878 | roll (v i) (oneContract T i j+role p n) |
| 5879 | |
| 5880 | def oneHailing (v : Charts p n d) (w : Charts p n e) (T : OneCross p n) : Cabinet d e:= |
| 5881 | fun i=>(1,1,oneTargetMark v T i.1 i.2,oneTargetMark w (fun e=>(T e)ᵀ) i.2 i.1) |
| 5882 | |
| 5883 | def oneStill (b : Bool) (a : Amounts p q d b) (v : Charts p n d) (T : OneCross p n) := |
| 5884 | (∀ i:Grid,(funds a i).1.2=oneTargetMark v T (sendId b i) (sendId (!b) i)) ∧ |
| 5885 | ∀ j:Bool,couple _ (funds a (transit b (true,j)))= |
| 5886 | couple _ (funds a (transit b (false,j))) |
| 5887 | |
| 5888 | end |
| 5889 | end Lax793645.ConstructionData.Frames |
| 5890 | end |
| 5891 | |
| 5892 | section |
| 5893 | namespace Lax793645.ConstructionData.Frames |
| 5894 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 5895 | open StatusAnalysis Matrix LinearMap Submodule Module Finset Function |
| 5896 | open scoped BigOperators Classical |
| 5897 | noncomputable section |
| 5898 | set_option backward.isDefEq.respectTransparency false |
| 5899 | namespace OneOptions |
| 5900 | variable {p : Shape} {n N K : ℕ} {q : Format} {d e : Rates} {side : Bool} |
| 5901 | def signed (w : Quill p q d side) (t : Tagging p (Messenger q)) |
| 5902 | (x y : ImagePin (Comp p.g) (OneColumn p n) (2* N)) |
| 5903 | (s : Charts p n d) (T : OneCross p n) (K : ℕ) := |
| 5904 | oneCharted s x.sp ∧ OnePenSpace (w.pen t) x.sp K ∧ |
| 5905 | oneStill side w.amp s T ∧ oneTableSafe x.sp y.sp T |
| 5906 | |
| 5907 | def chances (w : Typus p q d e) (s : Charts p n d) (v : Charts p n e) |
| 5908 | (x y : ImagePin (Comp p.g) (OneColumn p n) (2* N)) (T : OneCross p n) (K : ℕ) := |
| 5909 | (onePermission w) ∧ signed w.qA w.t x y s T K ∧ |
| 5910 | signed w.qB w.t y x v (fun e=>(T e)ᵀ) K |
| 5911 | |
| 5912 | def notified (m : Mixer p n) (x y : ImagePin (Comp p.g) (OneColumn p n) (2* N)) |
| 5913 | (T : OneCross p n) (C : Prop) (o : OneUnit p n N) := |
| 5914 | C ∧ imagePinAgree oneCoordinateImages x o ∧ |
| 5915 | (∀ i,oneFrameLaw m (o i)) ∧ oneTableFlag x y T o |
| 5916 | |
| 5917 | end OneOptions |
| 5918 | end |
| 5919 | end Lax793645.ConstructionData.Frames |
| 5920 | end |
| 5921 | |
| 5922 | section |
| 5923 | namespace Lax793645.ConstructionData.Frames |
| 5924 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 5925 | open StatusAnalysis Matrix LinearMap Submodule Module Finset Function |
| 5926 | open scoped BigOperators Classical |
| 5927 | noncomputable section |
| 5928 | set_option backward.isDefEq.respectTransparency false |
| 5929 | variable {p : Shape} {n N K : ℕ} |
| 5930 | abbrev OneScrip (p : Shape) (K : ℕ):=Σ q : Master K,Fin (2^oneDeckMax p K)×OnFile p q |
| 5931 | |
| 5932 | structure OneStation (p : Shape) (n N K : ℕ) (s : OneLeafMixture p n N) where |
| 5933 | cAxes : s.T→(d : Rates)→ Charts p n d |
| 5934 | mails : s.T→ s.T→ Fin (2^oneDeckMax p K)→ OneCross p n |
| 5935 | |
| 5936 | namespace OneStation |
| 5937 | variable {s : OneLeafMixture p n N} (v : OneStation p n N K s) |
| 5938 | def bank := |
| 5939 | (∀ i,let d:=fun j=> dim (oneEffectivePins (oneEndpointPrimalPins (s.pin i.val).sp) j) |
| 5940 | oneCharted (v.cAxes i d) (s.pin i.val).sp) ∧ |
| 5941 | ∀ i j T,∃ k,oneFitsTable (s.pin i.val).sp (s.pin j.val).sp (v.mails i j k) T |
| 5942 | |
| 5943 | variable {q:Format} {d e:Rates} (w:Typus p q d e) |
| 5944 | def news (i j:s.T) (k:Fin (2^oneDeckMax p K)):= |
| 5945 | OneOptions.chances w (v.cAxes i d) (v.cAxes j e) (s.pin i.val) (s.pin j.val) (v.mails i j k) K |
| 5946 | |
| 5947 | def frontPage (m:Mixer p n) (i j:s.T) (k:Fin (2^oneDeckMax p K)):= |
| 5948 | OneOptions.notified m (s.pin i.val) (s.pin j.val) (v.mails i j k) (v.news w i j k) |
| 5949 | |
| 5950 | def backPage (m:Mixer p n) (i j:s.T) (k:Fin (2^oneDeckMax p K)):= |
| 5951 | OneOptions.notified m (s.pin j.val) (s.pin i.val) (fun e=>(v.mails i j k e)ᵀ) (v.news w i j k) |
| 5952 | |
| 5953 | end OneStation |
| 5954 | end |
| 5955 | end Lax793645.ConstructionData.Frames |
| 5956 | end |
| 5957 | |
| 5958 | section |
| 5959 | namespace Lax793645.ConstructionData.Frames |
| 5960 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 5961 | open Matrix LinearMap Submodule Module Finset Function |
| 5962 | open scoped BigOperators Classical |
| 5963 | noncomputable section |
| 5964 | set_option backward.isDefEq.respectTransparency false |
| 5965 | variable {p : Shape} {n N : ℕ} |
| 5966 | variable {I A B : Type} [Fintype I] [DecidableEq I] [Fintype A] [Fintype B] |
| 5967 | def oneSlots (p : Shape) (I : Type) [Fintype I] := Fintype.card I * tagDegree p.g |
| 5968 | def oneMaxSlots (p : Shape):=28* tagDegree p.g |
| 5969 | |
| 5970 | end |
| 5971 | end Lax793645.ConstructionData.Frames |
| 5972 | end |
| 5973 | |
| 5974 | section |
| 5975 | namespace Lax793645.ConstructionData.Frames |
| 5976 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 5977 | open StatusAnalysis Matrix LinearMap Submodule Module Finset Function |
| 5978 | open scoped BigOperators Classical |
| 5979 | noncomputable section |
| 5980 | set_option backward.isDefEq.respectTransparency false |
| 5981 | variable {p : Shape} {n N K : ℕ} {q : Format} {d e : Rates} |
| 5982 | def oneClash (m : Mixer p n) (xy : OneUnit p n N×OneUnit p n N) := |
| 5983 | (oneRawHoles m).conflict (xy.1 true,xy.1 false) (xy.2 true,xy.2 false) |
| 5984 | |
| 5985 | structure OneEarnsScore (p : Shape) (n N K : ℕ) (ζ : ℝ) : Prop where |
| 5986 | hr : 1≤ p.r |
| 5987 | hn : 2* p.r≤ n |
| 5988 | odd : Odd p.g |
| 5989 | room : ∀ t≤28,oneRealizationRoom p K t |
| 5990 | smooth : 0≤ζ |
| 5991 | low : ζ≤0.004 |
| 5992 | light : ζ* oneMaxSlots p≤0.004 |
| 5993 | hN : 100≤2* N |
| 5994 | gram : (dim (OneCheckGram p n):ℝ)≤0.01*(2* N) |
| 5995 | budget : (K+(oneMaxSlots p:ℝ))* num (OneColumn p n)≤0.005*(2* N) |
| 5996 | |
| 5997 | namespace OneStation |
| 5998 | variable {pop : OneLeafMixture p n N} (v : OneStation p n N K pop) |
| 5999 | end OneStation |
| 6000 | end |
| 6001 | end Lax793645.ConstructionData.Frames |
| 6002 | end |
| 6003 | |
| 6004 | section |
| 6005 | namespace Lax793645.ConstructionData.Frames |
| 6006 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 6007 | open StatusAnalysis Finset Function |
| 6008 | open scoped Classical BigOperators |
| 6009 | noncomputable section |
| 6010 | set_option backward.isDefEq.respectTransparency false |
| 6011 | variable {p:Shape} {n N K r:ℕ} {pop:OneLeafMixture p n N} |
| 6012 | namespace OneStation |
| 6013 | def twilight {q:Format} {d e:Rates} (v:OneStation p n N K pop) |
| 6014 | (w:Typus p q d e) (m:Mixer p n) (k:Fin (2^oneDeckMax p K)) |
| 6015 | (Y:OneSilhouette p N r) (i j:pop.T) (o:OneUnit p n N×OneUnit p n N):= |
| 6016 | ind (v.frontPage w m i j k o.1 ∧ v.backPage w m i j k o.2)* |
| 6017 | OneTypus.oneSupportConstellation w o.1 o.2 (v.cAxes i d) (v.cAxes j e) m Y |
| 6018 | |
| 6019 | end OneStation |
| 6020 | def oneSupportBudget (p:Shape) (K:ℕ) (η a:ℝ):= |
| 6021 | 0< a ∧ ∀ k:OneScrip p K,a≤ OneTypus.oneMomus k.2.2* |
| 6022 | η^Fintype.card (Messenger (toFormat k.1.1)) |
| 6023 | |
| 6024 | end |
| 6025 | end Lax793645.ConstructionData.Frames |
| 6026 | end |
| 6027 | |
| 6028 | section |
| 6029 | namespace Lax793645.ConstructionData.Frames |
| 6030 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 6031 | open StatusAnalysis StatusAnalysis.DualAnalysis StatusAnalysis.Guild StatusAnalysis.Club |
| 6032 | open Matrix LinearMap Submodule Module Finset Function |
| 6033 | open scoped BigOperators |
| 6034 | noncomputable section |
| 6035 | variable {p : Shape} {n N r K : ℕ} {d e : Rates} |
| 6036 | variable {u : Terrain p r} {s : Gazette p r d} {t : Gazette p r e} {β η δ : ℝ} |
| 6037 | def oneScalarBudget (p : Shape) (K : ℕ) := |
| 6038 | 2^(oneSelectorProtectionDim p K+34) |
| 6039 | |
| 6040 | end |
| 6041 | end Lax793645.ConstructionData.Frames |
| 6042 | end |
| 6043 | |
| 6044 | section |
| 6045 | namespace Lax793645.ConstructionData.Frames |
| 6046 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 6047 | open Finset Matrix Module LinearMap Submodule Function |
| 6048 | open scoped BigOperators |
| 6049 | noncomputable section |
| 6050 | set_option backward.isDefEq.respectTransparency false |
| 6051 | variable {p : Shape} {n N : ℕ} |
| 6052 | def oneScreenRank (p : Shape) (K : ℕ) := (tagDegree p.g)*(2* p.h+2* p.J* K) |
| 6053 | |
| 6054 | end |
| 6055 | end Lax793645.ConstructionData.Frames |
| 6056 | end |
| 6057 | |
| 6058 | section |
| 6059 | namespace Lax793645.ConstructionData.Frames |
| 6060 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 6061 | open PreparationParameters PredictionClass Filter Finset |
| 6062 | open scoped Topology |
| 6063 | noncomputable section |
| 6064 | set_option backward.isDefEq.respectTransparency false |
| 6065 | variable {p : Shape} {n N M : ℕ} {q : PreparationParameters} |
| 6066 | def oneIntern (q : PreparationParameters) (p : Shape) (n N : ℕ):= |
| 6067 | ∀ m : Mixer p n,OnePhaseReady p n N (mstep q.rank) ((2* N)/denomStep q.rank) |
| 6068 | q.rank q.k q.d m (tinyPhase p.g q.rank q.spJoint) coin warn |
| 6069 | (heatloss q.rank q.k) q.spear (bp (q.spJoint*(2* N))) |
| 6070 | |
| 6071 | /-- The preparation schedule records only bounds already supplied by the |
| 6072 | one-frame counting, closed-pin, phase, and injection calendars. -/ |
| 6073 | structure OnePlanted (q : PreparationParameters) (p : Shape) (M : ℕ) : Prop where |
| 6074 | early : OnePreparationAllows q |
| 6075 | hM : 1≤ M |
| 6076 | hg : Odd p.g |
| 6077 | hG : 3≤ p.g |
| 6078 | hJ : 1≤ p.j |
| 6079 | hR : 1≤ p.r |
| 6080 | hB : (q.B:ℝ)< bp ((p.b:ℝ)-2* p.j) |
| 6081 | exactRoom : 4* oneScreenRank p q.e+2* q.e* p.r< p.g* p.r |
| 6082 | wrap : ∀ᶠ n : ℕ in atTop,let N:=M* n; |
| 6083 | 2* dim (OneFull p n)+3≤ N ∧ 4≤ N ∧ |
| 6084 | (3*(onePreparationCover q):ℝ)*(2* N)≤((q.u:ℝ)-1)*(2* N) ∧ |
| 6085 | (∀ (m : Mixer p n) (a : ImagePin (Comp p.g) (OneColumn p n) (2* N)), |
| 6086 | (onePinClosure p n).close a.sp=a.sp → |
| 6087 | pr (oneUnitRaw m N) (imagePinAgree oneCoordinateImages a)≤ |
| 6088 | fee (2* N) ((q.ζ/6)/4) (imagePlanRank a.sp)) ∧ |
| 6089 | oneIntern q p n N ∧ oneOutside q p n N |
| 6090 | |
| 6091 | end |
| 6092 | end Lax793645.ConstructionData.Frames |
| 6093 | end |
| 6094 | |
| 6095 | section |
| 6096 | namespace Lax793645.ConstructionData.Frames |
| 6097 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 6098 | open PreparationParameters PredictionClass Filter Finset |
| 6099 | open scoped BigOperators Topology |
| 6100 | noncomputable section |
| 6101 | set_option backward.isDefEq.respectTransparency false |
| 6102 | variable {l : Filter ℕ} {p : Shape} {M n N : ℕ} {q : PreparationParameters} |
| 6103 | {m : cycleM p} {s : OneRhythms p M} {w : OneTale p M} |
| 6104 | /-- Inside each pair of independently drawn leaves, every positive |
| 6105 | compatibility probability has at least the specified mass. -/ |
| 6106 | def oneCompatibilityFloor (s : OneLeafMixture p n N) (w : Wgt (OneUnit p n N)) |
| 6107 | (C : OneUnit p n N × OneUnit p n N → Prop) (γ : ℝ) := |
| 6108 | ∀ i j : s.T,0< pr (pairW (partW w i.val) (partW w j.val)) C → |
| 6109 | γ≤ pr (pairW (partW w i.val) (partW w j.val)) C |
| 6110 | |
| 6111 | variable {b : OneSketch p M} |
| 6112 | end |
| 6113 | end Lax793645.ConstructionData.Frames |
| 6114 | end |
| 6115 | |
| 6116 | section |
| 6117 | namespace Lax793645.ConstructionData.Frames |
| 6118 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 6119 | open PreparationParameters PredictionClass Filter Finset Matrix |
| 6120 | open scoped BigOperators Topology |
| 6121 | noncomputable section |
| 6122 | set_option backward.isDefEq.respectTransparency false |
| 6123 | variable {p : Shape} {n N : ℕ} {q : PreparationParameters} |
| 6124 | structure OneSage (p : Shape) (n N : ℕ) where |
| 6125 | g : Bool→ OneAugur p N |
| 6126 | m : OneMarks p n N |
| 6127 | L : OneUnit p n N → Bool→ Finset (Label p.b) |
| 6128 | |
| 6129 | end |
| 6130 | end Lax793645.ConstructionData.Frames |
| 6131 | end |
| 6132 | |
| 6133 | section |
| 6134 | namespace Lax793645.ConstructionData.Frames |
| 6135 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 6136 | open StatusAnalysis OneAppearance Function LinearMap Finset |
| 6137 | open StatusAnalysis.DualAnalysis |
| 6138 | noncomputable section |
| 6139 | set_option backward.isDefEq.respectTransparency false |
| 6140 | variable {p : Shape} {n N c R : ℕ} |
| 6141 | def OnePaletteGood (H : Space (OneJointKey p N)) (o : OneUnit p n N) : Prop := |
| 6142 | ∀ i s,Injective ((oneMixedRow (oneFreeColumns p n s) (o i)).comp H.subtype) |
| 6143 | |
| 6144 | def OneFullTableGap (Y : OneSilhouette p N c) (m : Mixer p n) (K : ℕ) |
| 6145 | (o o' : OneUnit p n N) : Prop := |
| 6146 | ∀ d d',d≤ K^2→ d'≤ K^2→∀ i i',∀ v : Ax p n d,∀ v' : Ax p n d', |
| 6147 | (∀ j : Fin d,totalRank (v (Pi.single j 1))≤ K)→ |
| 6148 | (∀ j : Fin d',totalRank (v' (Pi.single j 1))≤ K)→ |
| 6149 | ∀ l q a b f f', |
| 6150 | (⟨l,a,f,q⟩ : Appearance p).apt→(⟨l,b,f',q⟩ : Appearance p).apt→ |
| 6151 | ∀ z : Magazine p d,∀ z' : Magazine p d',z.1.sumBit=q→ z'.1.sumBit=q→ |
| 6152 | let x : Appearance p:=⟨l,a,f,q⟩ |
| 6153 | let y : Appearance p:=⟨l,b,f',q⟩ |
| 6154 | let overlap:=avg (oneReference x Y) (fun j=> |
| 6155 | oneReflected x Y i o m v j z* oneReflected y Y i' o' m v' j z') |
| 6156 | overlap=0 ∨ bp (-(4*(oneStatusCoordinateBound p (K^2) K:ℝ)+1))≤ overlap |
| 6157 | |
| 6158 | end |
| 6159 | end Lax793645.ConstructionData.Frames |
| 6160 | end |
| 6161 | |
| 6162 | section |
| 6163 | namespace Lax793645.ConstructionData.Frames |
| 6164 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 6165 | open Function LinearMap Finset PreparationParameters |
| 6166 | open scoped BigOperators |
| 6167 | noncomputable section |
| 6168 | set_option backward.isDefEq.respectTransparency false |
| 6169 | set_option maxHeartbeats 800000 |
| 6170 | variable {p : Shape} {n N : ℕ} {q : PreparationParameters} |
| 6171 | def exactPredictorRows (p : Shape) (q : PreparationParameters) := 2* oneScreenRank p q.e |
| 6172 | |
| 6173 | end |
| 6174 | end Lax793645.ConstructionData.Frames |
| 6175 | end |
| 6176 | |
| 6177 | section |
| 6178 | namespace Lax793645.ConstructionData.Frames |
| 6179 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 6180 | open Function LinearMap Finset |
| 6181 | open scoped Classical |
| 6182 | noncomputable section |
| 6183 | set_option backward.isDefEq.respectTransparency false |
| 6184 | variable {p : Shape} {n N : ℕ} |
| 6185 | def oneGenericPostulates (o : OneOrient p n N) (g : OneAugur p N) (w : Pdual p n) |
| 6186 | (E : Finset (Label p.b)) (δ : ℝ):= |
| 6187 | ∀ s,s∉E→∀ l,pr (spins p n) (oneMismatch g w l s Flavor.full o)≤δ |
| 6188 | |
| 6189 | def oneGenericSeems (q : PreparationParameters) (m : Mixer p n) (s : OneLeafMixture p n N) |
| 6190 | (x : OneUnit p n N) (g : Bool→ OneAugur p N) (z : Bool→ Profile p n) |
| 6191 | (L : Bool→ Finset (Label p.b)) (α : Party) (ε : ℝ):= |
| 6192 | (∀ i,(L i).card≤ q.B ∧ z i∈oneEffectivePins (oneEndpointPrimalPins (s.rooting x)) i) ∧ |
| 6193 | ∀ i,oneGenericPostulates (x i) (g i) (oneYoke m x i (z i) (α i)) (L i) ε |
| 6194 | |
| 6195 | end |
| 6196 | end Lax793645.ConstructionData.Frames |
| 6197 | end |
| 6198 | |
| 6199 | section |
| 6200 | namespace Lax793645.ConstructionData.Frames |
| 6201 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 6202 | open PreparationParameters PredictionClass Filter Finset |
| 6203 | open scoped Topology |
| 6204 | noncomputable section |
| 6205 | set_option backward.isDefEq.respectTransparency false |
| 6206 | variable {p : Shape} {n N M : ℕ} {q : PreparationParameters} {l : Filter ℕ} |
| 6207 | {m : cycleM p} {w : OneTale p M} {s : OneRhythms p M} {U : Ultrafilter ℕ} |
| 6208 | {b : OneSketch p M} |
| 6209 | def oneBoundedLinearAugurs (p : Shape) (n N : ℕ) (g : Bool→ OneAugur p N):= |
| 6210 | ∃ R : ℕ,8* p.g* R≤ n ∧ ∀ i,OneLinearAugur (g i) R |
| 6211 | |
| 6212 | def oneBoundedLinearPredicts (q : PreparationParameters) (m : Mixer p n) |
| 6213 | (s : OneLeafMixture p n N) (w : Wgt (OneUnit p n N)) (ε : ℝ):= |
| 6214 | ∃ g : Bool→ OneAugur p N,oneBoundedLinearAugurs p n N g ∧ |
| 6215 | (0.000001:ℝ)≤ pr (s.sap w) (fun x=>∃ z L α,oneGenericSeems q m s x g z L α ε) |
| 6216 | |
| 6217 | def oneLinearSilenceOutcome (q : PreparationParameters) (l : Filter ℕ) (m : cycleM p) |
| 6218 | (w : OneTale p M) (s : OneRhythms p M):= |
| 6219 | ∃ ε : ℝ,0≤ε ∧ ∀ᶠ n in l, |
| 6220 | ¬oneBoundedLinearPredicts q (m n) (s n) (w n) ε ∧ |
| 6221 | 0.99< pr (pairW ((s n).sap (w n)) ((s n).sap (w n))) (oneSecureAt (s n)) |
| 6222 | |
| 6223 | end |
| 6224 | end Lax793645.ConstructionData.Frames |
| 6225 | end |
| 6226 | |
| 6227 | section |
| 6228 | namespace Lax793645.ConstructionData.Frames |
| 6229 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 6230 | open PreparationParameters StatusAnalysis Filter |
| 6231 | open scoped Topology |
| 6232 | noncomputable section |
| 6233 | structure OneAnalyticParameters (p:Shape) (M:ℕ) (q:PreparationParameters) (s0:ℕ):Prop where |
| 6234 | planted:OnePlanted q p M |
| 6235 | unary:OneUnaryParameters p M (onePreparationPins q) s0 |
| 6236 | thickness:4≤ M |
| 6237 | affine:p.j=1 |
| 6238 | jump:1≤ p.J |
| 6239 | reserve:10* oneScalarBudget p (onePreparationPins q)+1000≤ q.B |
| 6240 | poolRoom : 2^(oneSelectorProtectionDim p (onePreparationPins q) + |
| 6241 | 4 * 2^(2*(onePreparationPins q)^2+5)) ≤ q.B |
| 6242 | spare:3* q.B< Fintype.card (Label p.b) |
| 6243 | exactLateRoom:4* oneScreenRank p (onePreparationPins q)< p.g* p.r |
| 6244 | secure:∀ᶠ n:ℕ in atTop,OneEarnsScore p n (M* n) (onePreparationPins q) (2* q.ζ) |
| 6245 | |
| 6246 | def oneConflicted {p:Shape} {n N:ℕ} (m:Mixer p n) (w:Wgt (OneUnit p n N)):= |
| 6247 | pr (pairW w w) (oneClash m)< bp (-200*(2* N:ℝ)) |
| 6248 | |
| 6249 | structure OneVeil (p:Shape) (M:ℕ) (q:PreparationParameters) (s0:ℕ) |
| 6250 | (l:Filter ℕ) (m:cycleM p) (s:OneRhythms p M) (w:OneTale p M):Prop where |
| 6251 | parameters:OneAnalyticParameters p M q s0 |
| 6252 | time:l≤ atTop |
| 6253 | durable:OneDurable q l m w s |
| 6254 | moment:∀ᶠ n in l,OneNascent q (m n) (w n) ∧ |
| 6255 | unaryGood (m n) (onePreparationPins q) s0 ∧ reducedBinaryGood (m n) ∧ oneConflicted (m n) (w n) |
| 6256 | |
| 6257 | abbrev OneStations (p:Shape) (M K:ℕ) (s:OneRhythms p M):= |
| 6258 | ∀ n:ℕ,OneStation p n (M* n) K (s n) |
| 6259 | |
| 6260 | end |
| 6261 | end Lax793645.ConstructionData.Frames |
| 6262 | end |
| 6263 | |
| 6264 | section |
| 6265 | namespace Lax793645.ConstructionData.Frames |
| 6266 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 6267 | open Filter PreparationParameters PredictionClass Finset |
| 6268 | open scoped Topology |
| 6269 | noncomputable section |
| 6270 | set_option backward.isDefEq.respectTransparency false |
| 6271 | abbrev OneBranch := Option (PredictionClass × Party × F × Bool) |
| 6272 | |
| 6273 | def preparationQuota (k : ℕ) : ℝ := 1 / ((k:ℝ)+1) |
| 6274 | |
| 6275 | variable {p : Shape} {n N M : ℕ} {q : PreparationParameters} |
| 6276 | /-- Finite output of preparation at a single size. The rare case gives a |
| 6277 | lower bound on positive conditional compatibility probabilities. -/ |
| 6278 | def OneBranchAt (q : PreparationParameters) (m : Mixer p n) (w : Wgt (OneUnit p n N)) |
| 6279 | (s : OneLeafMixture p n N) (a : ℝ) : OneBranch → Prop |
| 6280 | | none => ¬oneBoundedLinearPredicts q m s w 0 ∧ 0.99< pr (pairW (s.sap w) (s.sap w)) (oneSecureAt s) |
| 6281 | | some (c,α,r,rare) => c.lit α ∧ ∃ i : OneSage p n N, |
| 6282 | OneAlgebraicRows i.g (exactPredictorRows p q) ∧ oneFiniteClass i.g α=c ∧ |
| 6283 | s.within (fun x=> oneSeems q m s x i.g (i.m x) (i.L x) α 0 ∧ |
| 6284 | glint p (i.m x)=r ∧ (c=dusk → oneExactInk m i.m x)) ∧ |
| 6285 | let phases := oneMatchUp (fun x=> oneMarkedDelta x (i.m x)) α r c |
| 6286 | let law := pairW (s.sap w) (s.sap w) |
| 6287 | if rare then oneCompatibilityFloor s w phases a ∧ a/((2* N:ℕ):ℝ)^4≤ pr law phases ∧ |
| 6288 | pr law (fun x=> phases x ∧ ¬oneSecureAt s x)≤0.001* pr law phases |
| 6289 | else a≤ pr law (fun x=> phases x ∧ oneSecureAt s x) |
| 6290 | |
| 6291 | def OnePreparedAt (q : PreparationParameters) (m : Mixer p n) |
| 6292 | (w : Wgt (OneUnit p n N)) (k : ℕ) : Prop := |
| 6293 | ∃ s : OneLeafMixture p n N,preparationQuota k≤ s.amount w ∧ |
| 6294 | (oneLeafStrength s w m q.leafNew (2* q.ζ) (onePreparationPins q) ∧ s.within (oneFrameSide m)) ∧ |
| 6295 | ∃ tag,OneBranchAt q m w s (preparationQuota k) tag |
| 6296 | |
| 6297 | variable {m : cycleM p} {w : OneTale p M} {l : Filter ℕ} |
| 6298 | end |
| 6299 | end Lax793645.ConstructionData.Frames |
| 6300 | end |
| 6301 | |
| 6302 | section |
| 6303 | namespace Lax793645.ConstructionData.Frames |
| 6304 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 6305 | open Filter Matrix PreparationParameters |
| 6306 | open scoped BigOperators Topology |
| 6307 | noncomputable section |
| 6308 | namespace OneParameters |
| 6309 | structure Complete (p:Shape) (M:ℕ) (b:PreparationParameters) (s0:ℕ):Prop |
| 6310 | extends OneAnalyticParameters p M b s0 where |
| 6311 | initial:∀ᶠ n:ℕ in atTop,∀ (m:Mixer p n) (w:Wgt (OneUnit p n (M* n))), |
| 6312 | OneNascent b m w → carried w (fun x=>(oneRawHoles m).unit (x true,x false)) → |
| 6313 | ∃ s:OneLeafMixture p n (M* n),OneEntered b m w s |
| 6314 | mixerRoom:s0≤ p.J |
| 6315 | |
| 6316 | end OneParameters |
| 6317 | end |
| 6318 | end Lax793645.ConstructionData.Frames |
| 6319 | end |
| 6320 | |
| 6321 | section |
| 6322 | namespace Lax793645.ConstructionData.Binary |
| 6323 | noncomputable section |
| 6324 | namespace HadwigerCounterexample |
| 6325 | open Matrix Function Finset Module LinearMap Filter |
| 6326 | open scoped BigOperators Topology |
| 6327 | open Template |
| 6328 | variable {p:Shape} {n N K M r s0:ℕ} |
| 6329 | namespace StatusAnalysis |
| 6330 | open PreparationParameters Station PredictionClass DualAnalysis Club Guild |
| 6331 | def trimBeta (p : Shape) (K:ℕ):=basebeta p K/2 |
| 6332 | |
| 6333 | structure Jubilee (p : Shape) (K:ℕ) (ε η:ℝ) : Prop where |
| 6334 | pos : 0<η |
| 6335 | book : playbook p K*η≤ε |
| 6336 | sturdyR : playbook p K*η<1/2* trimBeta p K^2 |
| 6337 | low : 6*ε<1/2* trimBeta p K |
| 6338 | |
| 6339 | variable {b:PreparationParameters} |
| 6340 | end StatusAnalysis |
| 6341 | end HadwigerCounterexample |
| 6342 | end |
| 6343 | end Lax793645.ConstructionData.Binary |
| 6344 | end |
| 6345 | |
| 6346 | section |
| 6347 | namespace Lax793645.ConstructionData.Frames |
| 6348 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 6349 | open PreparationParameters StatusAnalysis StatusAnalysis.DualAnalysis |
| 6350 | open Filter Finset Matrix Function |
| 6351 | open scoped BigOperators Topology |
| 6352 | noncomputable section |
| 6353 | set_option backward.isDefEq.respectTransparency false |
| 6354 | variable {p:Shape} {n N K M r s0:ℕ} {q:PreparationParameters} |
| 6355 | {pop:OneLeafMixture p n N} {m:Mixer p n} |
| 6356 | structure OneLoupe (pop:OneLeafMixture p n N) (K:ℕ) where |
| 6357 | r:pop.T→ Stakes K |
| 6358 | |
| 6359 | structure OneShipped (pop:OneLeafMixture p n N) (K:ℕ) |
| 6360 | (v:OneStation p n N K pop) (t:OneLoupe pop K):Prop where |
| 6361 | charts i:oneCharted (v.cAxes i (toRates (t.r i))) (pop.pin i.val).sp |
| 6362 | |
| 6363 | def oneRouteC (t:OneLoupe pop K) (v:OneStation p n N K pop) (x:OneAspect pop):= |
| 6364 | v.cAxes x.1 (toRates (t.r x.1)) |
| 6365 | |
| 6366 | end |
| 6367 | end Lax793645.ConstructionData.Frames |
| 6368 | end |
| 6369 | |
| 6370 | section |
| 6371 | namespace Lax793645.ConstructionData.Frames |
| 6372 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 6373 | open StatusAnalysis StatusAnalysis.Appearance StatusAnalysis.DualAnalysis OneAppearance Filter Finset Matrix Function LinearMap Module Template |
| 6374 | open scoped BigOperators Topology |
| 6375 | noncomputable section |
| 6376 | set_option backward.isDefEq.respectTransparency false |
| 6377 | set_option maxHeartbeats 1000000 |
| 6378 | variable {p : Shape} {n N K M r s0 : ℕ} {d : Rates} |
| 6379 | def oneGenericSmoothSilk (p : Shape) (ε δ:ℝ) (Y:OneSilhouette p N r) |
| 6380 | (m:Mixer p n) (K:ℕ) (o:OneOrient p n N) := |
| 6381 | ∀ x : Appearance p,x.f=Flavor.full→ |
| 6382 | (x.apt → oneClose x Y o ε) ∧ oneFoil x Y o m K δ |
| 6383 | |
| 6384 | def oneGenericGauze (p : Shape) (ε δ:ℝ) (Y:OneSilhouette p N r) |
| 6385 | (m:Mixer p n) (K:ℕ) (o:OneUnit p n N) := |
| 6386 | ∀ i,oneGenericSmoothSilk p ε δ Y m K (o i) |
| 6387 | |
| 6388 | namespace OneAppearance |
| 6389 | variable (x : Appearance p) (Y : OneSilhouette p N r) |
| 6390 | variable {d : ℕ} |
| 6391 | end OneAppearance |
| 6392 | namespace OneQuill |
| 6393 | variable {q : Format} {d : Rates} {b : Bool} |
| 6394 | def oneGeneric (w : Quill p q d b) : Prop:=∀ i,w.flav i=Flavor.full |
| 6395 | |
| 6396 | end OneQuill |
| 6397 | def oneGenericOption {q : Format} {d e : Rates} (w : Typus p q d e) : Prop := |
| 6398 | OneQuill.oneGeneric w.qA ∧ OneQuill.oneGeneric w.qB |
| 6399 | |
| 6400 | def oneGenericPermission {q : Format} {d e : Rates} (w : Typus p q d e) : Prop := |
| 6401 | onePermission w ∧ oneGenericOption w |
| 6402 | |
| 6403 | end |
| 6404 | end Lax793645.ConstructionData.Frames |
| 6405 | end |
| 6406 | |
| 6407 | section |
| 6408 | namespace Lax793645.ConstructionData.Frames |
| 6409 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 6410 | open StatusAnalysis Finset Function |
| 6411 | open scoped Classical BigOperators |
| 6412 | noncomputable section |
| 6413 | set_option backward.isDefEq.respectTransparency false |
| 6414 | variable {p:Shape} {n N K r:ℕ} {pop:OneLeafMixture p n N} |
| 6415 | namespace OneStation |
| 6416 | def genericEligiblePair (v:OneStation p n N K pop) (m:Mixer p n) (i j:OneAspect pop) |
| 6417 | (Y:OneSilhouette p N r) (a:ℝ):= |
| 6418 | ∃ k:OneScrip p K,(oneGenericPermission k.2.2 ∧ oneSlots p (Messenger (toFormat k.1.1)) ≤ 32) ∧ a≤ v.twilight k.2.2 m k.2.1 Y i.1 j.1 (i.2,j.2) |
| 6419 | |
| 6420 | end OneStation |
| 6421 | end |
| 6422 | end Lax793645.ConstructionData.Frames |
| 6423 | end |
| 6424 | |
| 6425 | section |
| 6426 | namespace Lax793645.ConstructionData.Frames |
| 6427 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 6428 | open PreparationParameters StatusAnalysis Filter Finset Function |
| 6429 | open scoped Topology BigOperators |
| 6430 | noncomputable section |
| 6431 | set_option backward.isDefEq.respectTransparency false |
| 6432 | set_option maxHeartbeats 1000000 |
| 6433 | variable {p:Shape} {M s0:ℕ} {q:PreparationParameters} {l:Filter ℕ} |
| 6434 | {m:cycleM p} {s:OneRhythms p M} {w:OneTale p M} |
| 6435 | structure OneGenericBeams {n N r K:ℕ} (m:Mixer p n) (Y:OneSilhouette p N r) |
| 6436 | (pop:OneLeafMixture p n N) (μ:Wgt (OneUnit p n N)) |
| 6437 | (v:OneStation p n N K pop) (a ε δ τ:ℝ):Prop where |
| 6438 | soft:StatusAnalysis.DualAnalysis.origami p r (oneWisp p Y) δ |
| 6439 | rare:pr (pop.sap μ) (fun i=>¬oneGenericGauze p δ δ Y m K i)≤τ |
| 6440 | zone:pr (oneCirque pop μ) (fun x=> v.genericEligiblePair m x.1 x.2 Y a)≤τ |
| 6441 | haze:0<δ ∧ δ≤ε |
| 6442 | |
| 6443 | end |
| 6444 | end Lax793645.ConstructionData.Frames |
| 6445 | end |
| 6446 | |
| 6447 | section |
| 6448 | namespace Lax793645.ConstructionData.Frames |
| 6449 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 6450 | open StatusAnalysis StatusAnalysis.DualAnalysis Function LinearMap |
| 6451 | noncomputable section |
| 6452 | set_option backward.isDefEq.respectTransparency false |
| 6453 | set_option maxHeartbeats 600000 |
| 6454 | variable {p : Shape} {n N c R : ℕ} |
| 6455 | def OneTesterFree (Y : OneSilhouette p N c) (f : Pulsar p c) : Prop := |
| 6456 | ∀ l q q' k,oneFromPulse Y f l q k=oneFromPulse Y f l q' k |
| 6457 | |
| 6458 | end |
| 6459 | end Lax793645.ConstructionData.Frames |
| 6460 | end |
| 6461 | |
| 6462 | section |
| 6463 | namespace Lax793645.ConstructionData.Frames |
| 6464 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 6465 | open StatusAnalysis StatusAnalysis.DualAnalysis Club Guild Function LinearMap Finset Matrix Submodule |
| 6466 | open scoped BigOperators Classical |
| 6467 | noncomputable section |
| 6468 | set_option backward.isDefEq.respectTransparency false |
| 6469 | set_option maxHeartbeats 1000000 |
| 6470 | variable {p : Shape} {n N r K c R : ℕ} {d e : Rates} |
| 6471 | variable {u : Terrain p r} {s : Gazette p r d} {t : Gazette p r e} |
| 6472 | variable {β δ η : ℝ} |
| 6473 | open OneAppearance |
| 6474 | def OneFullStatusSupport (Y : OneSilhouette p N r) (m : Mixer p n) |
| 6475 | (o : OneUnit p n N) : Prop := |
| 6476 | ∀ d : Rates, ∀ v : Charts p n d, ∀ i (x : Appearance p), x.apt → |
| 6477 | ∀ c, 0 < oneReference x Y c → ∀ w, 0 < oneWake p Y m o v i x c w → |
| 6478 | 0 < oneWake p Y m o v i {x with f := Flavor.full} c w |
| 6479 | |
| 6480 | |
| 6481 | end |
| 6482 | end Lax793645.ConstructionData.Frames |
| 6483 | end |
| 6484 | |
| 6485 | section |
| 6486 | namespace Lax793645.ConstructionData.Frames |
| 6487 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 6488 | noncomputable section |
| 6489 | open Filter Matrix Module LinearMap Finset Function |
| 6490 | open scoped BigOperators Topology |
| 6491 | open Template |
| 6492 | open StatusAnalysis |
| 6493 | namespace OneExactOptions |
| 6494 | open PreparationParameters OneStation PredictionClass Club Guild DualAnalysis |
| 6495 | variable {p : Shape} {n N M r s0 K coords : ℕ} {w:OneLeafMixture p n N} {b:PreparationParameters} |
| 6496 | def witnessed (w : OneLeafMixture p n N) (v : OneStation p n N K w) (L : OneLoupe w K) |
| 6497 | (m : Mixer p n) (Y : OneSilhouette p N r) (H : Space (OneJointKey p N)) |
| 6498 | (B : ℕ) (cat : Nodes→ Pulsar p r) (x : OneAspect w) := |
| 6499 | OnePaletteGood H x.2 ∧ ExactAnnounced (oneWisp p Y) |
| 6500 | (oneWake p Y m x.2 (oneRouteC L v x)) cat B |
| 6501 | |
| 6502 | end OneExactOptions |
| 6503 | end |
| 6504 | end Lax793645.ConstructionData.Frames |
| 6505 | end |
| 6506 | |
| 6507 | section |
| 6508 | namespace Lax793645.ConstructionData.Frames |
| 6509 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 6510 | open StatusAnalysis Matrix Submodule LinearMap |
| 6511 | open scoped BigOperators |
| 6512 | noncomputable section |
| 6513 | variable {d e : ℕ} |
| 6514 | abbrev PredictedTriple := F × F × F |
| 6515 | |
| 6516 | def predictedGenerator (α β : F) (X : Cell d) (Y : Cell e) |
| 6517 | (r : PredictedTriple) (u : Par d) (v : Par e) : Signal d e := |
| 6518 | (r.1,(u,dotProduct X u.2+α* u.1+r.2.1),(v,dotProduct Y v.2+β* v.1+r.2.2)) |
| 6519 | |
| 6520 | def predictedSpan (α β : F) (X : Cell d) (Y : Cell e) (R : Set PredictedTriple) : |
| 6521 | Space (Signal d e) := |
| 6522 | Submodule.span F {s | ∃ r ∈ R, ∃ u v, s=predictedGenerator α β X Y r u v} |
| 6523 | |
| 6524 | end |
| 6525 | end Lax793645.ConstructionData.Frames |
| 6526 | end |
| 6527 | |
| 6528 | section |
| 6529 | namespace Lax793645.ConstructionData.Frames |
| 6530 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 6531 | open StatusAnalysis StatusAnalysis.DualAnalysis PredictionClass |
| 6532 | open Finset Matrix Function |
| 6533 | open scoped BigOperators |
| 6534 | noncomputable section |
| 6535 | variable {p : Shape} {n N r : ℕ} {A B : Rates} |
| 6536 | def retainedPatterns (u : Terrain p r) (f : Bool → Pulsar p r) (η : ℝ) |
| 6537 | (i : Grid) : Set PredictedTriple := |
| 6538 | {v | ∃ (l : Tag p.g) (k : Fin r), η ≤ u l v.1 k ∧ |
| 6539 | v.2.1=f i.1 l v.1 k ∧ v.2.2=f i.2 l v.1 k} |
| 6540 | |
| 6541 | end |
| 6542 | end Lax793645.ConstructionData.Frames |
| 6543 | end |
| 6544 | |
| 6545 | section |
| 6546 | namespace Lax793645.ConstructionData.Frames |
| 6547 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 6548 | open StatusAnalysis StatusAnalysis.DualAnalysis PredictionClass Template |
| 6549 | open Finset Matrix Function |
| 6550 | open scoped BigOperators |
| 6551 | noncomputable section |
| 6552 | variable {p : Shape} {N r : ℕ} |
| 6553 | def predictorCellCount : ℕ := Fintype.card (F×F) |
| 6554 | |
| 6555 | def predictorPulse (c : PredictionClass) : Bool → Pulsar p predictorCellCount := |
| 6556 | fun i _ _ k => if c=dusk then 0 else if i then |
| 6557 | ((Fintype.equivFin (F×F)).symm k).1 else ((Fintype.equivFin (F×F)).symm k).2 |
| 6558 | |
| 6559 | end |
| 6560 | end Lax793645.ConstructionData.Frames |
| 6561 | end |
| 6562 | |
| 6563 | section |
| 6564 | namespace Lax793645.ConstructionData.Frames |
| 6565 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 6566 | open StatusAnalysis Filter Finset Function |
| 6567 | open scoped Classical BigOperators |
| 6568 | noncomputable section |
| 6569 | set_option backward.isDefEq.respectTransparency false |
| 6570 | variable {p:Shape} {N r s:ℕ} {I J:Type} [Fintype I] [DecidableEq I] [Fintype J] [DecidableEq J] |
| 6571 | structure OnePaint (t:Tagging p I) (N:ℕ) where |
| 6572 | coeff:ℝ |
| 6573 | flies:∀ i,OneAtomKey (p:=p) (t i) N→ Prop |
| 6574 | |
| 6575 | def oneMural {t:Tagging p I} (F:J→ OnePaint t N):Wgt (OneKeys t N):= |
| 6576 | fun x=>∑ j,(F j).coeff*∏ i,ind ((F j).flies i (x i)) |
| 6577 | |
| 6578 | def OneDesign (t:Tagging p I) (W:Wgt (OneKeys t N)) (k:ℕ):Prop:= |
| 6579 | ∃ F:Fin k→ OnePaint t N,W=oneMural F ∧ ∀ j,|(F j).coeff|≤1 |
| 6580 | |
| 6581 | end |
| 6582 | end Lax793645.ConstructionData.Frames |
| 6583 | end |
| 6584 | |
| 6585 | section |
| 6586 | namespace Lax793645.ConstructionData.Frames |
| 6587 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 6588 | open StatusAnalysis StatusAnalysis.DualAnalysis PredictionClass Template Filter |
| 6589 | open Finset Matrix Function |
| 6590 | open scoped BigOperators Classical |
| 6591 | noncomputable section |
| 6592 | set_option backward.isDefEq.respectTransparency false |
| 6593 | variable {p:Shape} {N r:ℕ} |
| 6594 | def onePreparedPredictor (c:PredictionClass) (g:Bool→ OneAugur p N):Bool→ OneAugur p N:= |
| 6595 | if c=dusk then 0 else g |
| 6596 | |
| 6597 | def onePredictorPartition (c:PredictionClass) (g:Bool→ OneAugur p N): |
| 6598 | OneSilhouette p N predictorCellCount:= |
| 6599 | fun l q k=> Fintype.equivFin (F×F) |
| 6600 | (onePreparedPredictor c g true l q k,onePreparedPredictor c g false l q k) |
| 6601 | |
| 6602 | end |
| 6603 | end Lax793645.ConstructionData.Frames |
| 6604 | end |
| 6605 | |
| 6606 | section |
| 6607 | namespace Lax793645.ConstructionData.Frames |
| 6608 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 6609 | open StatusAnalysis StatusAnalysis.DualAnalysis PredictionClass |
| 6610 | open Matrix Finset Function LinearMap Module |
| 6611 | open scoped BigOperators Classical |
| 6612 | noncomputable section |
| 6613 | set_option backward.isDefEq.respectTransparency false |
| 6614 | variable {p:Shape} {n N r:ℕ} {A B:Rates} |
| 6615 | def oneCoordSpec (m:OneUnit p n N→ Bool→ Profile p n) (o:OneUnit p n N) |
| 6616 | (s:Charts p n A) (g:∀ i,Cell (A i)):=∀ i,s i (g i)=m o i |
| 6617 | |
| 6618 | def oneCardTone (m:OneUnit p n N→ Bool→ Profile p n) (x:OneUnit p n N) |
| 6619 | (T:OneCross p n) (j:Bool):F:=∑ i:Bool,oneContract T i j (m x i) |
| 6620 | |
| 6621 | end |
| 6622 | end Lax793645.ConstructionData.Frames |
| 6623 | end |
| 6624 | |
| 6625 | section |
| 6626 | namespace Lax793645.ConstructionData.Frames |
| 6627 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 6628 | open StatusAnalysis OneAppearance Template Filter Finset Matrix Function |
| 6629 | open scoped BigOperators Topology Classical |
| 6630 | noncomputable section |
| 6631 | set_option backward.isDefEq.respectTransparency false |
| 6632 | namespace OneQuill |
| 6633 | variable {p:Shape} {q:Format} {d:Rates} {b:Bool} {n N K r:ℕ} |
| 6634 | variable (w:Quill p q d b) (t:Tagging p (Messenger q)) (z:Messenger q→ F) |
| 6635 | def oneBaseDeposit (m:Mixer p n) (o:OneUnit p n N) (s:Charts p n d) |
| 6636 | (x:Inputs p n (Messenger q)):Prop:= |
| 6637 | (∀ i,w.sameInk i (onePrinted b s t w.sel w.flav m o x i)) ∧ |
| 6638 | ((w.pen t).draw x).reads (reducedScript w.script) m ∧ |
| 6639 | oneOwnKeyPart t z (oneVolleyKeys ((w.pen t).draw x) t o) |
| 6640 | |
| 6641 | def oneBaseProwl (s:Charts p n d) (m:Mixer p n) (o:OneUnit p n N) |
| 6642 | (W:Wgt (OneKeys t N)):= |
| 6643 | avg ((w.pen t).state z n) (fun x=> ind (oneBaseDeposit w t z m o s x)* |
| 6644 | W (oneVolleyKeys ((w.pen t).draw x) t o)) |
| 6645 | |
| 6646 | structure OneBaseSteady (m:Mixer p n) (K:ℕ) (s:Charts p n d) |
| 6647 | (o:OneUnit p n N):Prop where |
| 6648 | frame:∀ i,oneFrameLaw m (o i) |
| 6649 | steadyAxes (i:Messenger q):Quill.prelim (b:=b) K s i |
| 6650 | enough (i:Messenger q):(w.amp i).1.diagO=(w.amp i).2.1.1 |
| 6651 | generic:oneGeneric w |
| 6652 | |
| 6653 | def oneDilate (K:ℕ):=oneKappa (w.pen t)*(basebeta p K/2)^Fintype.card (Messenger q) |
| 6654 | |
| 6655 | end OneQuill |
| 6656 | end |
| 6657 | end Lax793645.ConstructionData.Frames |
| 6658 | end |
| 6659 | |
| 6660 | section |
| 6661 | namespace Lax793645.ConstructionData.Frames |
| 6662 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 6663 | open StatusAnalysis Filter Finset Function |
| 6664 | open scoped Classical Topology BigOperators |
| 6665 | noncomputable section |
| 6666 | set_option backward.isDefEq.respectTransparency false |
| 6667 | namespace OneQuill |
| 6668 | variable {p:Shape} {q:Format} {d:Rates} {b:Bool} {K s0:ℕ} |
| 6669 | def OneBaseSober {n N:ℕ} (w:Quill p q d b) (t:Tagging p (Messenger q)) |
| 6670 | (z:Messenger q→ F) (K:ℕ) (H:OneKeys t N→ Prop) (m:Mixer p n) (α:ℝ) |
| 6671 | (o:OneUnit p n N):= |
| 6672 | ∀ s:Charts p n d,OneBaseSteady w m K s o → |
| 6673 | α≤ oneBaseProwl w t z s m o (fun k=> ind (H k)) |
| 6674 | |
| 6675 | end OneQuill |
| 6676 | end |
| 6677 | end Lax793645.ConstructionData.Frames |
| 6678 | end |
| 6679 | |
| 6680 | section |
| 6681 | namespace Lax793645.ConstructionData.Binary |
| 6682 | noncomputable section |
| 6683 | namespace HadwigerCounterexample |
| 6684 | open HadwigerMatching Real Filter |
| 6685 | def ord (g N : ℕ) := (2:ℕ)^(1000* g* N) |
| 6686 | |
| 6687 | end HadwigerCounterexample |
| 6688 | end |
| 6689 | end Lax793645.ConstructionData.Binary |
| 6690 | end |
| 6691 | |
| 6692 | section |
| 6693 | namespace Lax793645.ConstructionData.Frames |
| 6694 | open Lax793645.ConstructionData.Binary Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 6695 | open Matrix Filter Finset PreparationParameters |
| 6696 | open scoped BigOperators Topology |
| 6697 | noncomputable section |
| 6698 | set_option backward.isDefEq.respectTransparency false |
| 6699 | namespace OneConstruction |
| 6700 | variable {p:Shape} {n N M s0:ℕ} {b:PreparationParameters} |
| 6701 | def conflictLowerBound (m:Mixer p n) (N:ℕ) (b:PreparationParameters):= |
| 6702 | ∀ w:Wgt (OneUnit p n N),OneNascent b m w → |
| 6703 | carried w (fun x=>(oneRawHoles m).unit (x true,x false)) → |
| 6704 | bp (-200*(2* N:ℝ))≤ pr (pairW w w) (oneClash m) |
| 6705 | |
| 6706 | open HadwigerMatching |
| 6707 | end OneConstruction |
| 6708 | end |
| 6709 | end Lax793645.ConstructionData.Frames |
| 6710 | end |
| 6711 | |
| 6712 | namespace Lax793645.ConstructionData.Frames |
| 6713 | open Lax793645.ConstructionData.Binary.HadwigerCounterexample |
| 6714 | open StatusAnalysis StatusAnalysis.Guild Finset Function |
| 6715 | noncomputable section |
| 6716 | variable {I : Grid → Type} [∀ i,DecidableEq (I i)] {A B : Rates} {b j : ℕ} |
| 6717 | def congressDirections (C : Congress I A B (Label b)) (side : Bool) (k : Σ i,I i) := |
| 6718 | selV j ((C k.1).addr k.2 side) |
| 6719 | |
| 6720 | structure IndependentParade (C : Congress I A B (Label b)) |
| 6721 | (U : Bool → Space (Vec (SelIdx b j))) (s : Straps (Label b)) |
| 6722 | (target : ∀ i,Suite A B i) (g : Bags I) (p : Finset Grid) : Prop where |
| 6723 | batch (i) (h : i∈p) : (C i).bundle (g i) s ∧ |
| 6724 | (C i).contents (g i)=target i ∧ 1 ≤ (g i).card ∧ (g i).card ≤ 7 |
| 6725 | independent : ∀ side,LinearIndepOn F ((U side).mkQ ∘ congressDirections C side) |
| 6726 | (p.sigma g : Set (Σ i,I i)) |
| 6727 | |
| 6728 | end |
| 6729 | end Lax793645.ConstructionData.Frames |
| 6730 |
Builds on
none
Used by
Lax793645.AffinePointMatricesLax793645.BaseQueryHitsLax793645.CharacterRefinementLax793645.ClosedPinsLax793645.CoordinateCompletionLax793645.FilteredQueryPartitionLax793645.FourHolesLax793645.FourierComparisonLax793645.FourSummandsLax793645.FrameRealizationLax793645.FreshWitnessListsLax793645.FrozenConstraintsLax793645.HolesLax793645.MatchingExposureLax793645.MatchingNeighborhoodsLax793645.MixingMatricesLax793645.OrderedSlotCompletionLax793645.OrdinaryTesterSupportLax793645.PhaseAlternativeLax793645.PredictedScalarSystemLax793645.PreparedUnitsLax793645.ProjectedOverlapLax793645.QuadraticFrameCountsLax793645.QueryCollisionLax793645.RankOfIndependentSumsLax793645.RareObstructionsLax793645.SafeCompatiblePairsLax793645.ScalarDualityLax793645.ScalarPrescriptionsLax793645.SelectedAtomsLax793645.SelectorConfinementLax793645.SevenPredictionsLax793645.SharedFrequenciesLax793645.SolublePairsLax793645.StatusGeneratorsLax793645.StoredCertificatesLax793645.SuperlevelOverlapLax793645.SupportScoresLax793645.UnpredictedOverlap
From Mathlib
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments