Add lean source and binary files (part 4)
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- lean/ComparatorChallenges/TraceReconstruction.json +16 -0
- lean/ComparatorChallenges/TraceReconstruction.lean +91 -0
- lean/ComparatorChallenges/TreeEdit.json +14 -0
- lean/ComparatorChallenges/TreeEdit.lean +51 -0
- lean/ComparatorChallenges/TriangleFace.json +14 -0
- lean/ComparatorChallenges/TriangleFace.lean +190 -0
- lean/ComparatorChallenges/TriangleRemoval.json +14 -0
- lean/ComparatorChallenges/TriangleRemoval.lean +67 -0
- lean/ComparatorChallenges/TriangularCovering.json +14 -0
- lean/ComparatorChallenges/TriangularCovering.lean +72 -0
- lean/ComparatorChallenges/TriangularEnergy.json +14 -0
- lean/ComparatorChallenges/TriangularEnergy.lean +74 -0
- lean/ComparatorChallenges/TriangularGaussian.json +14 -0
- lean/ComparatorChallenges/TriangularGaussian.lean +275 -0
- lean/ComparatorChallenges/TriangularHilbert.json +14 -0
- lean/ComparatorChallenges/TriangularHilbert.lean +57 -0
- lean/ComparatorChallenges/TruffetCounterexample.json +14 -0
- lean/ComparatorChallenges/TruffetCounterexample.lean +134 -0
- lean/ComparatorChallenges/TwoWayComplementation.json +14 -0
- lean/ComparatorChallenges/TwoWayComplementation.lean +45 -0
- lean/ComparatorChallenges/TwoWayDeterminization.json +14 -0
- lean/ComparatorChallenges/TwoWayDeterminization.lean +73 -0
- lean/ComparatorChallenges/TypeSystemNormalization.json +14 -0
- lean/ComparatorChallenges/TypeSystemNormalization.lean +122 -0
- lean/ComparatorChallenges/UniformCommutator.json +14 -0
- lean/ComparatorChallenges/UniformCommutator.lean +40 -0
- lean/ComparatorChallenges/UniformGamma.json +14 -0
- lean/ComparatorChallenges/UniformGamma.lean +607 -0
- lean/ComparatorChallenges/UniformKServer.json +14 -0
- lean/ComparatorChallenges/UniformKServer.lean +205 -0
- lean/ComparatorChallenges/UniformSparsestCut.json +14 -0
- lean/ComparatorChallenges/UniformSparsestCut.lean +55 -0
- lean/ComparatorChallenges/UniqueGamesTheorem.json +14 -0
- lean/ComparatorChallenges/UniqueGamesTheorem.lean +239 -0
- lean/ComparatorChallenges/UniversalFInfinity.json +14 -0
- lean/ComparatorChallenges/UniversalFInfinity.lean +25 -0
- lean/ComparatorChallenges/UniversalTensorSquares.json +13 -0
- lean/ComparatorChallenges/UniversalTensorSquares.lean +110 -0
- lean/ComparatorChallenges/VariableWL.json +14 -0
- lean/ComparatorChallenges/VariableWL.lean +130 -0
- lean/ComparatorChallenges/VelocityHemisphere.json +14 -0
- lean/ComparatorChallenges/VelocityHemisphere.lean +102 -0
- lean/ComparatorChallenges/VertexAlgebraNet.json +14 -0
- lean/ComparatorChallenges/VertexAlgebraNet.lean +830 -0
- lean/ComparatorChallenges/VertexCover.json +15 -0
- lean/ComparatorChallenges/VertexCover.lean +154 -0
- lean/ComparatorChallenges/VlasovMaxwell.json +14 -0
- lean/ComparatorChallenges/VlasovMaxwell.lean +112 -0
- lean/ComparatorChallenges/WLIdentification.json +14 -0
- lean/ComparatorChallenges/WLIdentification.lean +146 -0
lean/ComparatorChallenges/TraceReconstruction.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"challenge_module": "ComparatorChallenges.TraceReconstruction",
|
| 3 |
+
"solution_module": "OAI.Probability.TraceReconstruction",
|
| 4 |
+
"theorem_names": [
|
| 5 |
+
"OAI.TraceReconstruction.quantitative_sample_lower_bound",
|
| 6 |
+
"OAI.TraceReconstruction.superpolynomial_one_trace",
|
| 7 |
+
"OAI.TraceReconstruction.superpolynomial_sample_complexity"
|
| 8 |
+
],
|
| 9 |
+
"definition_names": [],
|
| 10 |
+
"permitted_axioms": [
|
| 11 |
+
"propext",
|
| 12 |
+
"Quot.sound",
|
| 13 |
+
"Classical.choice"
|
| 14 |
+
],
|
| 15 |
+
"enable_nanoda": false
|
| 16 |
+
}
|
lean/ComparatorChallenges/TraceReconstruction.lean
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Mathlib
|
| 2 |
+
|
| 3 |
+
namespace OAI
|
| 4 |
+
|
| 5 |
+
open scoped ENNReal
|
| 6 |
+
noncomputable section
|
| 7 |
+
|
| 8 |
+
namespace TraceReconstruction
|
| 9 |
+
|
| 10 |
+
abbrev Word (n : ℕ) := Fin n → Bool
|
| 11 |
+
abbrev Mask (n : ℕ) := Fin n → Bool
|
| 12 |
+
abbrev Trace := List Bool
|
| 13 |
+
|
| 14 |
+
/-- `true` retains the bit. The observer gets only the resulting list. -/
|
| 15 |
+
def traceOfMask {n : ℕ} (x : Word n) (a : Mask n) : Trace :=
|
| 16 |
+
((List.finRange n).filter fun i => a i).map x
|
| 17 |
+
|
| 18 |
+
/-- The deletion-mask probability, with deletion probability `q`. -/
|
| 19 |
+
def maskWeight {n : ℕ} (q : ℝ) (a : Mask n) : ℝ :=
|
| 20 |
+
∏ i, if a i then 1 - q else q
|
| 21 |
+
|
| 22 |
+
/-- Law of a single complete trace. -/
|
| 23 |
+
def traceMass {n : ℕ} (q : ℝ) (x : Word n) (w : Trace) : ℝ :=
|
| 24 |
+
∑ a : Mask n, if traceOfMask x a = w then maskWeight q a else 0
|
| 25 |
+
|
| 26 |
+
/-- All possible complete outputs from length-n inputs, with lengths included. -/
|
| 27 |
+
def traceSpace (n : ℕ) : Finset Trace :=
|
| 28 |
+
Finset.univ.biUnion fun k : Fin (n + 1) =>
|
| 29 |
+
Finset.univ.image fun x : Word k.val => List.ofFn x
|
| 30 |
+
|
| 31 |
+
/-- 1/2 sum of absolute differences, on the full finite output space. -/
|
| 32 |
+
def traceTV {n : ℕ} (q : ℝ) (x y : Word n) : ℝ :=
|
| 33 |
+
(1 / 2 : ℝ) * ∑ w ∈ traceSpace n, |traceMass q x w - traceMass q y w|
|
| 34 |
+
|
| 35 |
+
/-- The estimator may depend arbitrarily on n, q and every complete sample.
|
| 36 |
+
Its value is its conditional probability of reporting the given input. -/
|
| 37 |
+
def IsEstimator {n m : ℕ} (A : (Fin m → Trace) → Word n → ℝ) : Prop :=
|
| 38 |
+
(∀ z x, 0 ≤ A z x) ∧ (∀ z, ∑ x : Word n, A z x = 1)
|
| 39 |
+
|
| 40 |
+
/-- Independent masks generate independent complete traces; no retained
|
| 41 |
+
positions, boundaries or other latent variables are revealed to A. -/
|
| 42 |
+
def reconstructionSuccess {n m : ℕ} (q : ℝ)
|
| 43 |
+
(A : (Fin m → Trace) → Word n → ℝ) (x : Word n) : ℝ :=
|
| 44 |
+
∑ a : Fin m → Mask n,
|
| 45 |
+
(∏ j, maskWeight q (a j)) * A (fun j => traceOfMask x (a j)) x
|
| 46 |
+
|
| 47 |
+
def SufficientBudget (n : ℕ) (q s : ℝ) (m : ℕ) : Prop :=
|
| 48 |
+
∃ A : (Fin m → Trace) → Word n → ℝ,
|
| 49 |
+
IsEstimator A ∧ ∀ x, s ≤ reconstructionSuccess q A x
|
| 50 |
+
|
| 51 |
+
/-- Natural fixed sample budget; infimum of the empty set is infinity. -/
|
| 52 |
+
noncomputable def sampleComplexity (n : ℕ) (q s : ℝ) : ℝ≥0∞ :=
|
| 53 |
+
sInf {t | ∃ m : ℕ, SufficientBudget n q s m ∧ t = (m : ℝ≥0∞)}
|
| 54 |
+
|
| 55 |
+
/-- The real infimum is a minimum for n>0 (a nonempty finite set). -/
|
| 56 |
+
noncomputable def minTraceTV (n : ℕ) (q : ℝ) : ℝ :=
|
| 57 |
+
sInf {t | ∃ x y : Word n, x ≠ y ∧ t = traceTV q x y}
|
| 58 |
+
|
| 59 |
+
open Filter
|
| 60 |
+
open scoped Topology Classical ENNReal
|
| 61 |
+
|
| 62 |
+
theorem quantitative_sample_lower_bound
|
| 63 |
+
(s c : ℝ) (hs : s ∈ Set.Ioc 0 1)
|
| 64 |
+
(hc : c ∈ Set.Ioo 0 (1 / (4 * Real.log 2)))
|
| 65 |
+
(n : ℕ → ℕ) (q : ℕ → ℝ)
|
| 66 |
+
(hn : Tendsto n atTop atTop)
|
| 67 |
+
(hq : ∀ k, q k ∈ Set.Ioo 0 1)
|
| 68 |
+
(hscale : Tendsto (fun k => (q k) ^ 3 * Real.log (n k)) atTop atTop) :
|
| 69 |
+
∀ᶠ k in atTop,
|
| 70 |
+
ENNReal.ofReal ((n k : ℝ) ^ (c * Real.log ((q k) ^ 3 * Real.log (n k)))) ≤
|
| 71 |
+
sampleComplexity (n k) (q k) s := by
|
| 72 |
+
sorry
|
| 73 |
+
|
| 74 |
+
theorem superpolynomial_one_trace
|
| 75 |
+
(q : ℝ) (hq : q ∈ Set.Ioo 0 1) (C : ℝ) (hC : 0 < C) :
|
| 76 |
+
Tendsto (fun n : ℕ => (n : ℝ) ^ C * minTraceTV n q) atTop (𝓝 0) := by
|
| 77 |
+
sorry
|
| 78 |
+
|
| 79 |
+
theorem superpolynomial_sample_complexity
|
| 80 |
+
(q : ℝ) (hq : q ∈ Set.Ioo 0 1) (s : ℝ) (hs : s ∈ Set.Ioc 0 1)
|
| 81 |
+
(C : ℝ) (hC : 0 < C) :
|
| 82 |
+
Tendsto
|
| 83 |
+
(fun n : ℕ => sampleComplexity n q s / ENNReal.ofReal ((n : ℝ) ^ C))
|
| 84 |
+
atTop (𝓝 ⊤) := by
|
| 85 |
+
sorry
|
| 86 |
+
|
| 87 |
+
end TraceReconstruction
|
| 88 |
+
|
| 89 |
+
end
|
| 90 |
+
|
| 91 |
+
end OAI
|
lean/ComparatorChallenges/TreeEdit.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"challenge_module": "ComparatorChallenges.TreeEdit",
|
| 3 |
+
"solution_module": "OAI.Combinatorics.TreeEdit.TorusLowerBound",
|
| 4 |
+
"theorem_names": [
|
| 5 |
+
"OAI.TreeEdit.binary_torus"
|
| 6 |
+
],
|
| 7 |
+
"definition_names": [],
|
| 8 |
+
"permitted_axioms": [
|
| 9 |
+
"propext",
|
| 10 |
+
"Quot.sound",
|
| 11 |
+
"Classical.choice"
|
| 12 |
+
],
|
| 13 |
+
"enable_nanoda": false
|
| 14 |
+
}
|
lean/ComparatorChallenges/TreeEdit.lean
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Mathlib
|
| 2 |
+
|
| 3 |
+
namespace OAI
|
| 4 |
+
|
| 5 |
+
namespace TreeEdit
|
| 6 |
+
|
| 7 |
+
universe u
|
| 8 |
+
|
| 9 |
+
/-- A single unit-cost insertion, deletion or substitution, at any position. -/
|
| 10 |
+
inductive EditStep {α : Type u} : List α → List α → Prop
|
| 11 |
+
| insert (p q : List α) (a : α) : EditStep (p ++ q) (p ++ a :: q)
|
| 12 |
+
| delete (p q : List α) (a : α) : EditStep (p ++ a :: q) (p ++ q)
|
| 13 |
+
| substitute (p q : List α) (a b : α) : EditStep (p ++ a :: q) (p ++ b :: q)
|
| 14 |
+
|
| 15 |
+
/-- A script of precisely `n` edits. There is no restriction on its intermediate lengths. -/
|
| 16 |
+
inductive EditScript {α : Type u} : List α → List α → ℕ → Prop
|
| 17 |
+
| nil (x : List α) : EditScript x x 0
|
| 18 |
+
| cons {x y z : List α} {n : ℕ} :
|
| 19 |
+
EditStep x y → EditScript y z n → EditScript x z (n + 1)
|
| 20 |
+
|
| 21 |
+
/-- Ordinary unit-cost edit distance. The set is nonempty (delete then insert). -/
|
| 22 |
+
noncomputable def ed {α : Type u} (x y : List α) : ℕ :=
|
| 23 |
+
sInf {n | EditScript x y n}
|
| 24 |
+
|
| 25 |
+
/-- The full infinite-dimensional real ℓ₁ space. -/
|
| 26 |
+
abbrev RealL1 := lp (fun _ : ℕ => ℝ) 1
|
| 27 |
+
|
| 28 |
+
/-- Product of the two maximal pairwise distance ratios. -/
|
| 29 |
+
noncomputable def distortion (W : Finset (List Bool)) (f : W → RealL1) : ℝ :=
|
| 30 |
+
sSup {r : ℝ | ∃ x y : W, x ≠ y ∧
|
| 31 |
+
r = dist (f x) (f y) / (ed x.val y.val : ℝ)} *
|
| 32 |
+
sSup {r : ℝ | ∃ x y : W, x ≠ y ∧
|
| 33 |
+
r = (ed x.val y.val : ℝ) / dist (f x) (f y)}
|
| 34 |
+
|
| 35 |
+
/-- Infimum over all injective ℓ₁ maps, used on finite sets with at least two points. -/
|
| 36 |
+
noncomputable def c1 (W : Finset (List Bool)) : ℝ :=
|
| 37 |
+
sInf {D : ℝ | ∃ f : W → RealL1, Function.Injective f ∧ distortion W f = D}
|
| 38 |
+
|
| 39 |
+
/-- The binary main endpoint, for every sufficiently large cap (natural logarithms). -/
|
| 40 |
+
def BinaryLowerBound : Prop :=
|
| 41 |
+
∃ c : ℝ, 0 < c ∧ ∃ d₀ : ℕ, ∀ d : ℕ, d₀ ≤ d →
|
| 42 |
+
∃ n : ℕ, n ≤ d ∧ ∃ W : Finset (List Bool),
|
| 43 |
+
2 ≤ W.card ∧ (∀ w ∈ W, w.length = n) ∧
|
| 44 |
+
Real.exp (c * Real.sqrt (Real.log (d : ℝ) * Real.log (Real.log (d : ℝ)))) ≤ c1 W
|
| 45 |
+
|
| 46 |
+
theorem binary_torus : BinaryLowerBound := by
|
| 47 |
+
sorry
|
| 48 |
+
|
| 49 |
+
end TreeEdit
|
| 50 |
+
|
| 51 |
+
end OAI
|
lean/ComparatorChallenges/TriangleFace.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"challenge_module": "ComparatorChallenges.TriangleFace",
|
| 3 |
+
"solution_module": "OAI.Combinatorics.TriangleFace.Main",
|
| 4 |
+
"theorem_names": [
|
| 5 |
+
"OAI.TriangleFace198.triangle_expansion_face"
|
| 6 |
+
],
|
| 7 |
+
"definition_names": [],
|
| 8 |
+
"permitted_axioms": [
|
| 9 |
+
"propext",
|
| 10 |
+
"Quot.sound",
|
| 11 |
+
"Classical.choice"
|
| 12 |
+
],
|
| 13 |
+
"enable_nanoda": false
|
| 14 |
+
}
|
lean/ComparatorChallenges/TriangleFace.lean
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Mathlib
|
| 2 |
+
|
| 3 |
+
namespace OAI
|
| 4 |
+
|
| 5 |
+
noncomputable section
|
| 6 |
+
|
| 7 |
+
open scoped BigOperators Topology
|
| 8 |
+
open Filter
|
| 9 |
+
|
| 10 |
+
universe uV uE uIndex uι
|
| 11 |
+
|
| 12 |
+
namespace MatchingEntropyBounds
|
| 13 |
+
|
| 14 |
+
structure LooplessGraph (V : Type uV) (E : Type uE) where
|
| 15 |
+
left : E → V
|
| 16 |
+
right : E → V
|
| 17 |
+
loopless : ∀ e, left e ≠ right e
|
| 18 |
+
|
| 19 |
+
variable {V : Type uV} {E : Type uE}
|
| 20 |
+
[Fintype V] [Fintype E] [DecidableEq V] [DecidableEq E]
|
| 21 |
+
|
| 22 |
+
namespace LooplessGraph
|
| 23 |
+
|
| 24 |
+
def Incident (G : LooplessGraph V E) (v : V) (e : E) : Prop :=
|
| 25 |
+
G.left e = v ∨ G.right e = v
|
| 26 |
+
|
| 27 |
+
instance incidentDecidable (G : LooplessGraph V E) (v : V) (e : E) :
|
| 28 |
+
Decidable (G.Incident v e) := inferInstanceAs (Decidable (G.left e = v ∨ G.right e = v))
|
| 29 |
+
|
| 30 |
+
def IsPerfectMatching (G : LooplessGraph V E) (M : Finset E) : Prop :=
|
| 31 |
+
∀ v, ∃! e, e ∈ M ∧ G.Incident v e
|
| 32 |
+
|
| 33 |
+
abbrev Matching (G : LooplessGraph V E) := {M : Finset E // G.IsPerfectMatching M}
|
| 34 |
+
|
| 35 |
+
instance matchingFintype (G : LooplessGraph V E) : Fintype G.Matching :=
|
| 36 |
+
Fintype.ofFinite _
|
| 37 |
+
|
| 38 |
+
def indicator (G : LooplessGraph V E) (M : G.Matching) (e : E) : ℝ :=
|
| 39 |
+
if e ∈ M.val then 1 else 0
|
| 40 |
+
|
| 41 |
+
def polytope (G : LooplessGraph V E) : Set (E → ℝ) :=
|
| 42 |
+
convexHull ℝ (Set.range G.indicator)
|
| 43 |
+
|
| 44 |
+
end LooplessGraph
|
| 45 |
+
end MatchingEntropyBounds
|
| 46 |
+
end
|
| 47 |
+
|
| 48 |
+
noncomputable section
|
| 49 |
+
|
| 50 |
+
open scoped BigOperators Topology
|
| 51 |
+
open Filter
|
| 52 |
+
|
| 53 |
+
universe uV uE uI uJ uA uB uC uW uF uD uι
|
| 54 |
+
|
| 55 |
+
namespace MatchingEntropyBounds.LooplessGraph
|
| 56 |
+
|
| 57 |
+
variable {V : Type uV} {E : Type uE} [Fintype V] [Fintype E] [DecidableEq V] [DecidableEq E]
|
| 58 |
+
|
| 59 |
+
def Crosses (G : LooplessGraph V E) (S : Finset V) (e : E) : Prop :=
|
| 60 |
+
(G.left e ∈ S ∧ G.right e ∉ S) ∨ (G.left e ∉ S ∧ G.right e ∈ S)
|
| 61 |
+
|
| 62 |
+
instance crossesDecidable (G : LooplessGraph V E) (S : Finset V) (e : E) :
|
| 63 |
+
Decidable (G.Crosses S e) := inferInstanceAs (Decidable
|
| 64 |
+
((G.left e ∈ S ∧ G.right e ∉ S) ∨ (G.left e ∉ S ∧ G.right e ∈ S)))
|
| 65 |
+
|
| 66 |
+
def cut (G : LooplessGraph V E) (S : Finset V) : Finset E :=
|
| 67 |
+
Finset.univ.filter (G.Crosses S)
|
| 68 |
+
|
| 69 |
+
def degree (G : LooplessGraph V E) (x : E → ℝ) (v : V) : ℝ :=
|
| 70 |
+
∑ e, if G.Incident v e then x e else 0
|
| 71 |
+
|
| 72 |
+
def cutMass (G : LooplessGraph V E) (x : E → ℝ) (S : Finset V) : ℝ :=
|
| 73 |
+
∑ e ∈ G.cut S, x e
|
| 74 |
+
|
| 75 |
+
end MatchingEntropyBounds.LooplessGraph
|
| 76 |
+
end
|
| 77 |
+
|
| 78 |
+
noncomputable section
|
| 79 |
+
|
| 80 |
+
open scoped BigOperators Topology
|
| 81 |
+
open Filter
|
| 82 |
+
|
| 83 |
+
universe uV uE uI uJ uA uB uC uW uF uD uι
|
| 84 |
+
|
| 85 |
+
namespace MatchingEntropyBounds.Refined
|
| 86 |
+
|
| 87 |
+
section TriangleExpansion
|
| 88 |
+
variable {V : Type uV} {E : Type uE} [Fintype V] [Fintype E] [DecidableEq V] [DecidableEq E]
|
| 89 |
+
|
| 90 |
+
def triangleTip (v : V) (i : Fin 3) : V ⊕ Fin 2 := ![Sum.inl v, Sum.inr 0, Sum.inr 1] i
|
| 91 |
+
|
| 92 |
+
def triangleCollapse (v : V) : V ⊕ Fin 2 → V := Sum.elim id (fun _ => v)
|
| 93 |
+
|
| 94 |
+
def reattach (v : V) (i : Fin 3) (w : V) : V ⊕ Fin 2 :=
|
| 95 |
+
if w = v then triangleTip v i else Sum.inl w
|
| 96 |
+
|
| 97 |
+
omit [Fintype V] [Fintype E] [DecidableEq E] in
|
| 98 |
+
theorem collapse_reattach (v : V) (i : Fin 3) (w : V) :
|
| 99 |
+
triangleCollapse v (reattach v i w) = w := by
|
| 100 |
+
by_cases h : w = v
|
| 101 |
+
· subst w
|
| 102 |
+
fin_cases i <;> simp [reattach,triangleTip,triangleCollapse]
|
| 103 |
+
· simp [reattach,h,triangleCollapse]
|
| 104 |
+
|
| 105 |
+
def triangleExpansion (G : LooplessGraph V E) (c : E → Fin 3) (v : V) :
|
| 106 |
+
LooplessGraph (V ⊕ Fin 2) (E ⊕ Fin 3) where
|
| 107 |
+
left := Sum.elim (fun e => reattach v (c e) (G.left e)) (fun i => triangleTip v (i + 1))
|
| 108 |
+
right := Sum.elim (fun e => reattach v (c e) (G.right e)) (fun i => triangleTip v (i + 2))
|
| 109 |
+
loopless := by
|
| 110 |
+
intro e h
|
| 111 |
+
rcases e with e | i
|
| 112 |
+
· have hh := congrArg (triangleCollapse v) h
|
| 113 |
+
exact G.loopless e ((collapse_reattach v (c e) (G.left e)).symm.trans
|
| 114 |
+
(hh.trans (collapse_reattach v (c e) (G.right e))))
|
| 115 |
+
· fin_cases i <;> simp [triangleTip] at h
|
| 116 |
+
|
| 117 |
+
def triangleVertices (v : V) : Finset (V ⊕ Fin 2) := Finset.univ.image (triangleTip v)
|
| 118 |
+
|
| 119 |
+
end TriangleExpansion
|
| 120 |
+
end MatchingEntropyBounds.Refined
|
| 121 |
+
end
|
| 122 |
+
|
| 123 |
+
namespace CanonicalFace198
|
| 124 |
+
|
| 125 |
+
variable {A B : Type*} [AddCommGroup A] [Module ℝ A]
|
| 126 |
+
[AddCommGroup B] [Module ℝ B]
|
| 127 |
+
|
| 128 |
+
def facesThrough (P : Set A) (x : A) : Set (Set A) :=
|
| 129 |
+
{F | Convex ℝ F ∧ IsExtreme ℝ P F ∧ x ∈ F}
|
| 130 |
+
|
| 131 |
+
def minFace (P : Set A) (x : A) : Set A := ⋂₀ facesThrough P x
|
| 132 |
+
|
| 133 |
+
end CanonicalFace198
|
| 134 |
+
|
| 135 |
+
noncomputable section
|
| 136 |
+
open scoped BigOperators
|
| 137 |
+
open MatchingEntropyBounds MatchingEntropyBounds.Refined
|
| 138 |
+
namespace TriangleFace198
|
| 139 |
+
variable {V E : Type*} [Fintype V] [Fintype E] [DecidableEq V] [DecidableEq E]
|
| 140 |
+
|
| 141 |
+
def LocalLabels (G : LooplessGraph V E) (v : V) (c : E → Fin 3) : Prop :=
|
| 142 |
+
∀ i, ∃! e, G.Incident v e ∧ c e = i
|
| 143 |
+
|
| 144 |
+
def localEdge (G : LooplessGraph V E) (c : E → Fin 3) (v : V)
|
| 145 |
+
(hc : LocalLabels G v c) (i : Fin 3) : E := Classical.choose (hc i)
|
| 146 |
+
|
| 147 |
+
def localExtension (G : LooplessGraph V E) (c : E → Fin 3) (v : V)
|
| 148 |
+
(hc : LocalLabels G v c) : (E → ℝ) →ₗ[ℝ] (E ⊕ Fin 3 → ℝ) where
|
| 149 |
+
toFun x := Sum.elim x (fun i => x (localEdge G c v hc i))
|
| 150 |
+
map_add' x y := by ext e; cases e <;> rfl
|
| 151 |
+
map_smul' a x := by ext e; cases e <;> rfl
|
| 152 |
+
|
| 153 |
+
def oldRestriction : (E ⊕ Fin 3 → ℝ) →ₗ[ℝ] (E → ℝ) where
|
| 154 |
+
toFun y e := y (Sum.inl e)
|
| 155 |
+
map_add' _ _ := rfl
|
| 156 |
+
map_smul' _ _ := rfl
|
| 157 |
+
|
| 158 |
+
end TriangleFace198
|
| 159 |
+
|
| 160 |
+
end
|
| 161 |
+
|
| 162 |
+
noncomputable section
|
| 163 |
+
open scoped BigOperators
|
| 164 |
+
open MatchingEntropyBounds MatchingEntropyBounds.Refined
|
| 165 |
+
namespace TriangleFace198
|
| 166 |
+
universe uV uE
|
| 167 |
+
variable {V : Type uV} {E : Type uE} [instFintypeV : Fintype V] [Fintype E] [DecidableEq V] [instDecidableEqE : DecidableEq E]
|
| 168 |
+
|
| 169 |
+
theorem triangle_expansion_face {V : Type uV} {E : Type uE}
|
| 170 |
+
[Fintype V] [Fintype E] [DecidableEq V] [DecidableEq E] (G : LooplessGraph V E) (v : V)
|
| 171 |
+
(hdeg : Fintype.card {e : E // G.Incident v e} = 3)
|
| 172 |
+
(_hmatching : Nonempty G.Matching) :
|
| 173 |
+
∃ (c : E → Fin 3) (hc : LocalLabels G v c),
|
| 174 |
+
let H := triangleExpansion G c v
|
| 175 |
+
let f := localExtension G c v hc
|
| 176 |
+
let Q := {y | y ∈ H.polytope ∧ H.cutMass y (triangleVertices v) = 1}
|
| 177 |
+
f '' G.polytope = Q ∧
|
| 178 |
+
Convex ℝ Q ∧ IsExtreme ℝ H.polytope Q ∧
|
| 179 |
+
(∀ x, oldRestriction (f x) = x) ∧
|
| 180 |
+
(∀ y ∈ Q, f (oldRestriction y) = y) ∧
|
| 181 |
+
(∀ x e, f x (Sum.inl e) = x e) ∧
|
| 182 |
+
(∀ x i, f x (Sum.inr i) = x (localEdge G c v hc i)) ∧
|
| 183 |
+
(∀ x, (∀ e, x e = (1/3 : ℝ)) → ∀ e, f x e = (1/3 : ℝ)) ∧
|
| 184 |
+
(∀ x ∈ G.polytope, CanonicalFace198.minFace H.polytope (f x) = f '' CanonicalFace198.minFace G.polytope x) := by
|
| 185 |
+
sorry
|
| 186 |
+
|
| 187 |
+
end TriangleFace198
|
| 188 |
+
end
|
| 189 |
+
|
| 190 |
+
end OAI
|
lean/ComparatorChallenges/TriangleRemoval.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"challenge_module": "ComparatorChallenges.TriangleRemoval",
|
| 3 |
+
"solution_module": "OAI.Combinatorics.TriangleRemoval.Main",
|
| 4 |
+
"theorem_names": [
|
| 5 |
+
"OAI.SharpTerminalLeave.sharp_terminal_leave"
|
| 6 |
+
],
|
| 7 |
+
"definition_names": [],
|
| 8 |
+
"permitted_axioms": [
|
| 9 |
+
"propext",
|
| 10 |
+
"Classical.choice",
|
| 11 |
+
"Quot.sound"
|
| 12 |
+
],
|
| 13 |
+
"enable_nanoda": false
|
| 14 |
+
}
|
lean/ComparatorChallenges/TriangleRemoval.lean
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Mathlib
|
| 2 |
+
|
| 3 |
+
namespace OAI
|
| 4 |
+
|
| 5 |
+
section
|
| 6 |
+
section
|
| 7 |
+
|
| 8 |
+
open Filter
|
| 9 |
+
open scoped BigOperators Topology
|
| 10 |
+
|
| 11 |
+
namespace SharpTerminalLeave
|
| 12 |
+
|
| 13 |
+
abbrev Graph (n : ℕ) := Finset (Finset (Fin n))
|
| 14 |
+
|
| 15 |
+
def completeGraph (n : ℕ) : Graph n := Finset.univ.powersetCard 2
|
| 16 |
+
|
| 17 |
+
def triangles {n : ℕ} (G : Graph n) : Finset (Finset (Fin n)) :=
|
| 18 |
+
(Finset.univ.powersetCard 3).filter (fun t => t.powersetCard 2 ⊆ G)
|
| 19 |
+
|
| 20 |
+
noncomputable def step {n : ℕ} (G : Graph n) : PMF (Graph n) :=
|
| 21 |
+
if h : (triangles G).Nonempty then
|
| 22 |
+
(PMF.uniformOfFinset (triangles G) h).map (fun t => G \ t.powersetCard 2)
|
| 23 |
+
else PMF.pure G
|
| 24 |
+
|
| 25 |
+
noncomputable def evolve {n : ℕ} (G : Graph n) : ℕ → PMF (Graph n)
|
| 26 |
+
| 0 => PMF.pure G
|
| 27 |
+
| k + 1 => (evolve G k).bind step
|
| 28 |
+
|
| 29 |
+
noncomputable def terminalLaw (n : ℕ) : PMF (Graph n) :=
|
| 30 |
+
evolve (completeGraph n) (n.choose 2)
|
| 31 |
+
|
| 32 |
+
noncomputable def expectation (n : ℕ) (f : Graph n → ℝ) : ℝ :=
|
| 33 |
+
∑ G, (terminalLaw n G).toReal * f G
|
| 34 |
+
|
| 35 |
+
noncomputable def probability (n : ℕ) (P : Graph n → Prop) : ℝ := by
|
| 36 |
+
classical
|
| 37 |
+
exact expectation n (fun G => if P G then 1 else 0)
|
| 38 |
+
|
| 39 |
+
noncomputable def normalization (n : ℕ) : ℝ := (n : ℝ) ^ (3 / 2 : ℝ)
|
| 40 |
+
|
| 41 |
+
noncomputable def normalizedLeave (n : ℕ) (G : Graph n) : ℝ :=
|
| 42 |
+
(G.card : ℝ) / normalization n
|
| 43 |
+
|
| 44 |
+
noncomputable def sharpConstant : ℝ := 1 / (2 * Real.sqrt 2)
|
| 45 |
+
|
| 46 |
+
end SharpTerminalLeave
|
| 47 |
+
end
|
| 48 |
+
end
|
| 49 |
+
|
| 50 |
+
open Filter
|
| 51 |
+
open scoped BigOperators Topology
|
| 52 |
+
|
| 53 |
+
namespace SharpTerminalLeave
|
| 54 |
+
|
| 55 |
+
theorem sharp_terminal_leave :
|
| 56 |
+
Tendsto (fun n => expectation n (fun G =>
|
| 57 |
+
(normalizedLeave n G - sharpConstant) ^ 2)) atTop (𝓝 0) ∧
|
| 58 |
+
(∀ ε : ℝ, 0 < ε →
|
| 59 |
+
Tendsto (fun n => probability n (fun G =>
|
| 60 |
+
ε < |normalizedLeave n G - sharpConstant|)) atTop (𝓝 0)) ∧
|
| 61 |
+
Tendsto (fun n => expectation n (fun G => (G.card : ℝ)) / normalization n)
|
| 62 |
+
atTop (𝓝 sharpConstant) := by
|
| 63 |
+
sorry
|
| 64 |
+
|
| 65 |
+
end SharpTerminalLeave
|
| 66 |
+
|
| 67 |
+
end OAI
|
lean/ComparatorChallenges/TriangularCovering.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"challenge_module": "ComparatorChallenges.TriangularCovering",
|
| 3 |
+
"solution_module": "OAI.Geometry.TriangularCovering.Main",
|
| 4 |
+
"theorem_names": [
|
| 5 |
+
"OAI.TriangularCovering.main"
|
| 6 |
+
],
|
| 7 |
+
"definition_names": [],
|
| 8 |
+
"permitted_axioms": [
|
| 9 |
+
"propext",
|
| 10 |
+
"Quot.sound",
|
| 11 |
+
"Classical.choice"
|
| 12 |
+
],
|
| 13 |
+
"enable_nanoda": false
|
| 14 |
+
}
|
lean/ComparatorChallenges/TriangularCovering.lean
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Mathlib
|
| 2 |
+
|
| 3 |
+
namespace OAI
|
| 4 |
+
|
| 5 |
+
open Set MeasureTheory
|
| 6 |
+
open scoped InnerProductSpace BigOperators Interval
|
| 7 |
+
|
| 8 |
+
noncomputable section
|
| 9 |
+
namespace TriangularCovering
|
| 10 |
+
|
| 11 |
+
abbrev Space := EuclideanSpace ℝ (Fin 3)
|
| 12 |
+
|
| 13 |
+
def H : ℝ := Real.sqrt 2
|
| 14 |
+
|
| 15 |
+
def point (x y t : ℝ) : Space := !₂[x, y, H * t]
|
| 16 |
+
|
| 17 |
+
def K : Set Space :=
|
| 18 |
+
{z | ∃ x y t : ℝ, 0 ≤ t ∧ t ≤ 1 ∧ |x| ≤ 1 - t ∧ |y| ≤ t ∧ z = point x y t}
|
| 19 |
+
|
| 20 |
+
def projection (u z : Space) : Space := z - (inner ℝ u z) • u
|
| 21 |
+
|
| 22 |
+
def area (B : Set Space) : ℝ := (Measure.euclideanHausdorffMeasure 2 B).toReal
|
| 23 |
+
|
| 24 |
+
def shadowArea (u : Space) : ℝ := area (projection u '' K)
|
| 25 |
+
|
| 26 |
+
def A_min : ℝ := sInf {a : ℝ | ∃ u : Space, ‖u‖ = 1 ∧ a = shadowArea u}
|
| 27 |
+
|
| 28 |
+
structure TriCylinder where
|
| 29 |
+
axis : Space
|
| 30 |
+
base : Set Space
|
| 31 |
+
unit_axis : ‖axis‖ = 1
|
| 32 |
+
perpendicular : ∀ z ∈ base, inner ℝ axis z = 0
|
| 33 |
+
triangular : ∃ v : Fin 3 → Space, AffineIndependent ℝ v ∧
|
| 34 |
+
base = convexHull ℝ (Set.range v)
|
| 35 |
+
compact : IsCompact base
|
| 36 |
+
convex : Convex ℝ base
|
| 37 |
+
measurable : MeasurableSet base
|
| 38 |
+
finite_area : Measure.euclideanHausdorffMeasure 2 base ≠ ⊤
|
| 39 |
+
|
| 40 |
+
def TriCylinder.carrier (c : TriCylinder) : Set Space :=
|
| 41 |
+
{z | ∃ b ∈ c.base, ∃ r : ℝ, z = b + r • c.axis}
|
| 42 |
+
|
| 43 |
+
def Covers {m : ℕ} (c : Fin m → TriCylinder) : Prop :=
|
| 44 |
+
∀ z ∈ K, ∃ i : Fin m, z ∈ (c i).carrier
|
| 45 |
+
|
| 46 |
+
def totalArea {m : ℕ} (c : Fin m → TriCylinder) : ℝ :=
|
| 47 |
+
∑ i : Fin m, area (c i).base
|
| 48 |
+
|
| 49 |
+
def relativeCost {m : ℕ} (c : Fin m → TriCylinder) : ℝ :=
|
| 50 |
+
∑ i : Fin m, area (c i).base / shadowArea (c i).axis
|
| 51 |
+
|
| 52 |
+
def n (ε : ℝ) : ℕ := ⌈2 / ε ^ 2⌉₊
|
| 53 |
+
|
| 54 |
+
def MainAsymptotic : Prop :=
|
| 55 |
+
∃ δ C : ℝ, 0 < δ ∧ 0 < C ∧
|
| 56 |
+
∀ ε : ℝ, 0 < ε → ε < δ →
|
| 57 |
+
∃ c : Fin (2 * n ε) → TriCylinder,
|
| 58 |
+
Covers c ∧
|
| 59 |
+
|totalArea c / H - (1 / 2 - (13 / 6000 : ℝ) * ε ^ 2)| ≤ C * ε ^ 4 ∧
|
| 60 |
+
totalArea c < A_min / 2
|
| 61 |
+
|
| 62 |
+
def NormalizedCounterexample : Prop :=
|
| 63 |
+
∃ m : ℕ, ∃ c : Fin m → TriCylinder, Covers c ∧ relativeCost c < 1 / 2
|
| 64 |
+
|
| 65 |
+
theorem main : A_min = H ∧ MainAsymptotic ∧ NormalizedCounterexample := by
|
| 66 |
+
sorry
|
| 67 |
+
|
| 68 |
+
end TriangularCovering
|
| 69 |
+
|
| 70 |
+
end
|
| 71 |
+
|
| 72 |
+
end OAI
|
lean/ComparatorChallenges/TriangularEnergy.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"challenge_module": "ComparatorChallenges.TriangularEnergy",
|
| 3 |
+
"solution_module": "OAI.Analysis.Triangular.Energy.Universal",
|
| 4 |
+
"theorem_names": [
|
| 5 |
+
"OAI.AtomicTriangular.universal_energy_minimum"
|
| 6 |
+
],
|
| 7 |
+
"definition_names": [],
|
| 8 |
+
"permitted_axioms": [
|
| 9 |
+
"propext",
|
| 10 |
+
"Quot.sound",
|
| 11 |
+
"Classical.choice"
|
| 12 |
+
],
|
| 13 |
+
"enable_nanoda": false
|
| 14 |
+
}
|
lean/ComparatorChallenges/TriangularEnergy.lean
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Mathlib
|
| 2 |
+
|
| 3 |
+
namespace OAI
|
| 4 |
+
|
| 5 |
+
noncomputable section
|
| 6 |
+
open scoped BigOperators Topology ENNReal
|
| 7 |
+
open Classical Filter
|
| 8 |
+
|
| 9 |
+
namespace TriangularUniversal
|
| 10 |
+
|
| 11 |
+
abbrev Plane := EuclideanSpace ℝ (Fin 2)
|
| 12 |
+
|
| 13 |
+
def LocallyFinite (C : Set Plane) : Prop :=
|
| 14 |
+
∀ R : ℝ, (C ∩ Metric.closedBall (0 : Plane) R).Finite
|
| 15 |
+
|
| 16 |
+
def diskPoints (C : Set Plane) (R : ℝ) : Finset Plane :=
|
| 17 |
+
if h : (C ∩ Metric.closedBall (0 : Plane) R).Finite then h.toFinset else ∅
|
| 18 |
+
|
| 19 |
+
def diskCount (C : Set Plane) (R : ℝ) : ℕ := (diskPoints C R).card
|
| 20 |
+
|
| 21 |
+
def DensityOne (C : Set Plane) : Prop :=
|
| 22 |
+
Tendsto (fun R : ℝ => (diskCount C R : ℝ) / (Real.pi * R ^ 2))
|
| 23 |
+
atTop (𝓝 1)
|
| 24 |
+
|
| 25 |
+
def AdmissiblePotential (g : ℝ → ℝ) : Prop :=
|
| 26 |
+
ContDiffOn ℝ (⊤ : ℕ∞) g (Set.Ioi 0) ∧
|
| 27 |
+
(∀ t : ℝ, 0 < t → 0 ≤ g t) ∧
|
| 28 |
+
∀ (r : ℕ) (t : ℝ), 0 < t → 0 ≤ (-1 : ℝ) ^ r * iteratedDeriv r g t
|
| 29 |
+
|
| 30 |
+
def diskEnergy (g : ℝ → ℝ) (C : Set Plane) (R : ℝ) : ℝ≥0∞ :=
|
| 31 |
+
(diskCount C R : ℝ≥0∞)⁻¹ *
|
| 32 |
+
∑ x ∈ diskPoints C R, ∑ y ∈ (diskPoints C R).erase x,
|
| 33 |
+
ENNReal.ofReal (g (‖x - y‖ ^ 2))
|
| 34 |
+
|
| 35 |
+
def energy (g : ℝ → ℝ) (C : Set Plane) : ℝ≥0∞ :=
|
| 36 |
+
Filter.liminf (diskEnergy g C) atTop
|
| 37 |
+
|
| 38 |
+
end TriangularUniversal
|
| 39 |
+
|
| 40 |
+
namespace AtomicTriangular
|
| 41 |
+
|
| 42 |
+
abbrev Plane := EuclideanSpace ℝ (Fin 2)
|
| 43 |
+
|
| 44 |
+
def b : ℝ := Real.sqrt 3 / 2
|
| 45 |
+
|
| 46 |
+
def triangularPoint (jk : ℤ × ℤ) : Plane :=
|
| 47 |
+
(Real.sqrt b)⁻¹ •
|
| 48 |
+
(EuclideanSpace.single 0 ((jk.1 : ℝ) + (jk.2 : ℝ) / 2) +
|
| 49 |
+
EuclideanSpace.single 1 ((jk.2 : ℝ) * b))
|
| 50 |
+
|
| 51 |
+
def A : Set Plane := Set.range triangularPoint
|
| 52 |
+
|
| 53 |
+
abbrev LocallyFinite := TriangularUniversal.LocallyFinite
|
| 54 |
+
abbrev diskPoints := TriangularUniversal.diskPoints
|
| 55 |
+
abbrev diskCount := TriangularUniversal.diskCount
|
| 56 |
+
abbrev DensityOne := TriangularUniversal.DensityOne
|
| 57 |
+
abbrev AdmissiblePotential := TriangularUniversal.AdmissiblePotential
|
| 58 |
+
abbrev diskEnergy := TriangularUniversal.diskEnergy
|
| 59 |
+
abbrev energy := TriangularUniversal.energy
|
| 60 |
+
|
| 61 |
+
/-- The full nonzero-lattice energy, allowing a divergent series. -/
|
| 62 |
+
def latticeEnergy (g : ℝ → ℝ) : ℝ≥0∞ :=
|
| 63 |
+
∑' a : {x : Plane // x ∈ A ∧ x ≠ 0}, ENNReal.ofReal (g (‖a.val‖ ^ 2))
|
| 64 |
+
|
| 65 |
+
/-- Universal energy minimality for smooth completely monotone potentials, with attainment. -/
|
| 66 |
+
theorem universal_energy_minimum (g : ℝ → ℝ) (C : Set Plane)
|
| 67 |
+
(hg : AdmissiblePotential g) (hC : LocallyFinite C) (hd : DensityOne C) :
|
| 68 |
+
latticeEnergy g ≤ energy g C ∧ latticeEnergy g = energy g A := by
|
| 69 |
+
sorry
|
| 70 |
+
|
| 71 |
+
end AtomicTriangular
|
| 72 |
+
end
|
| 73 |
+
|
| 74 |
+
end OAI
|
lean/ComparatorChallenges/TriangularGaussian.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"challenge_module": "ComparatorChallenges.TriangularGaussian",
|
| 3 |
+
"solution_module": "OAI.Analysis.Triangular.GaussianMinorants",
|
| 4 |
+
"theorem_names": [
|
| 5 |
+
"OAI.AtomicTriangular.sharp_gaussian_minorants_with_construction"
|
| 6 |
+
],
|
| 7 |
+
"definition_names": [],
|
| 8 |
+
"permitted_axioms": [
|
| 9 |
+
"propext",
|
| 10 |
+
"Quot.sound",
|
| 11 |
+
"Classical.choice"
|
| 12 |
+
],
|
| 13 |
+
"enable_nanoda": false
|
| 14 |
+
}
|
lean/ComparatorChallenges/TriangularGaussian.lean
ADDED
|
@@ -0,0 +1,275 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Mathlib
|
| 2 |
+
|
| 3 |
+
namespace OAI
|
| 4 |
+
|
| 5 |
+
/-!
|
| 6 |
+
# Sharp Gaussian minorants with atomic interpolation
|
| 7 |
+
|
| 8 |
+
The sharp Gaussian minorants of the atomic certificate for triangular-lattice
|
| 9 |
+
universal optimality, including the construction for parameters at least one.
|
| 10 |
+
-/
|
| 11 |
+
|
| 12 |
+
noncomputable section
|
| 13 |
+
open scoped BigOperators FourierTransform SchwartzMap
|
| 14 |
+
open Complex Polynomial
|
| 15 |
+
|
| 16 |
+
namespace AtomicTriangular
|
| 17 |
+
|
| 18 |
+
abbrev Plane := EuclideanSpace ℝ (Fin 2)
|
| 19 |
+
|
| 20 |
+
def b : ℝ := Real.sqrt 3 / 2
|
| 21 |
+
|
| 22 |
+
def triangularPoint (jk : ℤ × ℤ) : Plane :=
|
| 23 |
+
(Real.sqrt b)⁻¹ •
|
| 24 |
+
(EuclideanSpace.single 0 ((jk.1 : ℝ) + (jk.2 : ℝ) / 2) +
|
| 25 |
+
EuclideanSpace.single 1 ((jk.2 : ℝ) * b))
|
| 26 |
+
|
| 27 |
+
def A : Set Plane := Set.range triangularPoint
|
| 28 |
+
|
| 29 |
+
def dualA : Set Plane := {w | ∀ a ∈ A, ∃ n : ℤ, inner ℝ a w = (n : ℝ)}
|
| 30 |
+
|
| 31 |
+
def gaussian (α : ℝ) (x : Plane) : ℝ := Real.exp (-Real.pi * α * ‖x‖ ^ 2)
|
| 32 |
+
|
| 33 |
+
def Radial (f : Plane → ℝ) : Prop := ∀ x y, ‖x‖ = ‖y‖ → f x = f y
|
| 34 |
+
|
| 35 |
+
def realFourier (f : Plane → ℝ) (w : Plane) : ℂ := 𝓕 (fun x => (f x : ℂ)) w
|
| 36 |
+
|
| 37 |
+
end AtomicTriangular
|
| 38 |
+
|
| 39 |
+
namespace AtomicTriangular.Construction
|
| 40 |
+
|
| 41 |
+
def b : ℝ := Real.sqrt 3 / 2
|
| 42 |
+
|
| 43 |
+
def h : ℝ := 17 / 50
|
| 44 |
+
|
| 45 |
+
def H : ℝ := 27 / 50
|
| 46 |
+
|
| 47 |
+
def eta : ℝ := 1 / 5
|
| 48 |
+
|
| 49 |
+
def kappa : ℝ := Real.pi / 36
|
| 50 |
+
|
| 51 |
+
def residues : Finset ℤ := {0,1,3,4,7,9,12,13,16,19,21,25,27,28,31}
|
| 52 |
+
|
| 53 |
+
def residue (a : Fin 15) : ℤ := ![0,1,3,4,7,9,12,13,16,19,21,25,27,28,31] a
|
| 54 |
+
|
| 55 |
+
def Node : Type := {n : ℤ // 0 < n ∧ n % 36 ∈ residues}
|
| 56 |
+
|
| 57 |
+
def FiniteNodes : Finset ℤ := {1,3,4,7,9,12,13,16,19,21}
|
| 58 |
+
|
| 59 |
+
def sineFactor (a : Fin 15) (s : ℂ) : ℂ :=
|
| 60 |
+
2 * Complex.sin ((kappa : ℂ) * (s - (residue a : ℂ)))
|
| 61 |
+
|
| 62 |
+
def P (s : ℂ) : ℂ := ∏ a : Fin 15, (sineFactor a s)^2
|
| 63 |
+
|
| 64 |
+
def dBasis (n : Node) : ℂ → ℂ := dslope P (n.val : ℂ)
|
| 65 |
+
|
| 66 |
+
def cBasis (n : Node) : ℂ → ℂ := dslope (dBasis n) (n.val : ℂ)
|
| 67 |
+
|
| 68 |
+
def finiteC (a : Fin 15) (s : ℂ) : ℂ :=
|
| 69 |
+
4 * (kappa : ℂ)^2 * ∏ r ∈ Finset.univ.erase a, (sineFactor r s)^2
|
| 70 |
+
|
| 71 |
+
def finiteD (a : Fin 15) (s : ℂ) : ℂ :=
|
| 72 |
+
2 * (kappa : ℂ) * sineFactor a s *
|
| 73 |
+
Complex.cos ((kappa : ℂ) * (s - (residue a : ℂ))) *
|
| 74 |
+
∏ r ∈ Finset.univ.erase a, (sineFactor r s)^2
|
| 75 |
+
|
| 76 |
+
def phase (s : ℂ) : ℂ := Complex.exp ((Real.pi : ℂ) * Complex.I * s / 18)
|
| 77 |
+
|
| 78 |
+
def atomFactor (a : Fin 15) : Polynomial ℂ :=
|
| 79 |
+
-C (phase (residue a)) + C 2 * X - C (phase (-residue a)) * X^2
|
| 80 |
+
|
| 81 |
+
def atomPolynomial : Polynomial ℂ := ∏ a : Fin 15, atomFactor a
|
| 82 |
+
|
| 83 |
+
def cAtomPolynomial (a : Fin 15) : Polynomial ℂ :=
|
| 84 |
+
C (4 * (kappa : ℂ)^2) * ∏ r ∈ Finset.univ.erase a, atomFactor r
|
| 85 |
+
|
| 86 |
+
def dAtomPolynomial (a : Fin 15) : Polynomial ℂ :=
|
| 87 |
+
C (Complex.I * (kappa : ℂ)) *
|
| 88 |
+
(C (phase (residue a)) - C (phase (-residue a)) * X^2) *
|
| 89 |
+
∏ r ∈ Finset.univ.erase a, atomFactor r
|
| 90 |
+
|
| 91 |
+
def fourierCoeff (j : Fin 31) : ℂ := atomPolynomial.coeff j.val
|
| 92 |
+
|
| 93 |
+
def frequency (j : Fin 31) : ℝ := ((j.val : ℝ)-15)/18
|
| 94 |
+
|
| 95 |
+
def waveDerivative (k : ℕ) (s : ℂ) : ℂ :=
|
| 96 |
+
∑ j : Fin 31, fourierCoeff j * (I*Real.pi*frequency j)^k *
|
| 97 |
+
exp (I*Real.pi*frequency j*s)
|
| 98 |
+
|
| 99 |
+
def Q (n : ℤ) : ℝ := (waveDerivative 2 n).re / 2
|
| 100 |
+
|
| 101 |
+
def D (n : ℤ) : ℝ := (waveDerivative 3 n).re / (6 * Q n)
|
| 102 |
+
|
| 103 |
+
end AtomicTriangular.Construction
|
| 104 |
+
|
| 105 |
+
namespace AtomicTriangular.FiniteCertificate
|
| 106 |
+
open Construction
|
| 107 |
+
|
| 108 |
+
def cShiftPolynomial (a : Fin 15) : Polynomial ℂ := X * cAtomPolynomial a
|
| 109 |
+
|
| 110 |
+
def cCoefficient (a : Fin 15) (j : Fin 31) : ℂ := (cShiftPolynomial a).coeff j.val
|
| 111 |
+
|
| 112 |
+
def dCoefficient (a : Fin 15) (j : Fin 31) : ℂ := (dAtomPolynomial a).coeff j.val
|
| 113 |
+
|
| 114 |
+
end AtomicTriangular.FiniteCertificate
|
| 115 |
+
|
| 116 |
+
namespace AtomicTriangular.Construction
|
| 117 |
+
|
| 118 |
+
abbrev Plane := EuclideanSpace ℝ (Fin 2)
|
| 119 |
+
|
| 120 |
+
def radial (x : Plane) : ℝ := b*‖x‖^2
|
| 121 |
+
|
| 122 |
+
def waveDen (k t : ℝ) : ℝ := k^2+t^2
|
| 123 |
+
|
| 124 |
+
def Xwave (k t : ℝ) : ℝ := (4/3)/waveDen k t
|
| 125 |
+
|
| 126 |
+
def lambda (k t : ℝ) : ℂ := ((k:ℂ)+I*t)/(b*waveDen k t : ℝ)
|
| 127 |
+
|
| 128 |
+
def zeta (k v t : ℝ) : ℂ := -(t:ℂ)*(Xwave k t:ℂ)+I*(k*Xwave k t-v:ℝ)
|
| 129 |
+
|
| 130 |
+
def transformedWave (k v t : ℝ) (s : ℂ) : ℂ := lambda k t*exp (I*Real.pi*zeta k v t*s)
|
| 131 |
+
|
| 132 |
+
def finiteColumn (col : Fin 23) (j : Fin 31) : ℂ :=
|
| 133 |
+
if hc : col.val<22 then
|
| 134 |
+
if col.val%2=0 then FiniteCertificate.cCoefficient ⟨col.val/2,by omega⟩ j
|
| 135 |
+
else FiniteCertificate.dCoefficient ⟨col.val/2,by omega⟩ j
|
| 136 |
+
else fourierCoeff j
|
| 137 |
+
|
| 138 |
+
def finiteNode (n : Fin 10) : ℤ := residue ⟨n.val+1,by omega⟩
|
| 139 |
+
|
| 140 |
+
def jetMultiplier (k v : ℝ) (n : ℤ) (d : Fin 2) (t : ℝ) : ℂ :=
|
| 141 |
+
(Q n:ℂ)⁻¹*transformedWave k v t n *
|
| 142 |
+
(if d.val=0 then -1 else (D n:ℂ)-I*Real.pi*zeta k v t)
|
| 143 |
+
|
| 144 |
+
def jet (k v : ℝ) (n : ℤ) (d : Fin 2) (S : Fin 31 → ℂ) : ℝ :=
|
| 145 |
+
(∑ j : Fin 31, jetMultiplier k v n d (frequency j)*S j).re
|
| 146 |
+
|
| 147 |
+
def fullJetMatrix : Matrix (Fin 20) (Fin 23) ℝ := fun i col =>
|
| 148 |
+
jet (if col.val=22 then h else H) H
|
| 149 |
+
(finiteNode ⟨i.val/2,by omega⟩) ⟨i.val%2,by omega⟩ (finiteColumn col)
|
| 150 |
+
|
| 151 |
+
def R : Matrix (Fin 20) (Fin 20) ℝ := fun i j => fullJetMatrix i ⟨j.val+2,by omega⟩
|
| 152 |
+
|
| 153 |
+
def R0 : Matrix (Fin 20) (Fin 3) ℝ := fun i j =>
|
| 154 |
+
fullJetMatrix i (if j.val<2 then ⟨j.val,by omega⟩ else 22)
|
| 155 |
+
|
| 156 |
+
abbrev TailNode := {n : Node // n.val ∉ FiniteNodes}
|
| 157 |
+
|
| 158 |
+
structure InputCoefficients where
|
| 159 |
+
C : ℝ
|
| 160 |
+
finiteC : Fin 11 → ℝ
|
| 161 |
+
finiteD : Fin 11 → ℝ
|
| 162 |
+
tailC : TailNode → ℝ
|
| 163 |
+
tailD : TailNode → ℝ
|
| 164 |
+
summable : Summable (fun n => |tailC n|+|tailD n|)
|
| 165 |
+
|
| 166 |
+
def tailInput (a : InputCoefficients) (s : ℂ) : ℂ :=
|
| 167 |
+
(a.C:ℂ)*P s + ∑' n : TailNode, ((a.tailC n:ℂ)*cBasis n.val s+(a.tailD n:ℂ)*dBasis n.val s)
|
| 168 |
+
|
| 169 |
+
def finiteInput (a : InputCoefficients) (s : ℂ) : ℂ :=
|
| 170 |
+
∑ j : Fin 11, ((a.finiteC j:ℂ)*finiteC ⟨j.val,by omega⟩ s +
|
| 171 |
+
(a.finiteD j:ℂ)*finiteD ⟨j.val,by omega⟩ s)
|
| 172 |
+
|
| 173 |
+
def inputComplex (a : InputCoefficients) (x : Plane) : ℂ :=
|
| 174 |
+
exp (-(Real.pi:ℂ)*h*(radial x:ℂ))*tailInput a (radial x) +
|
| 175 |
+
exp (-(Real.pi:ℂ)*H*(radial x:ℂ))*finiteInput a (radial x)
|
| 176 |
+
|
| 177 |
+
def targetCoefficient (n : Fin 10) : ℝ := Q 1 / Q (finiteNode n) * Real.exp (Real.pi*eta*(finiteNode n))
|
| 178 |
+
|
| 179 |
+
def Yf : Matrix (Fin 20) (Fin 8) ℝ := fun i j =>
|
| 180 |
+
if i.val<8 then
|
| 181 |
+
targetCoefficient ⟨i.val/2,by omega⟩ *
|
| 182 |
+
(if i.val%2=0 then (if j.val=i.val then 1 else 0)
|
| 183 |
+
else (if j.val=i.val then -1 else if j.val=i.val-1 then Real.pi*eta-D (finiteNode ⟨i.val/2,by omega⟩) else 0))
|
| 184 |
+
else 0
|
| 185 |
+
|
| 186 |
+
def gamma (side : Fin 2) : Matrix (Fin 3) (Fin 8) ℝ := fun i j =>
|
| 187 |
+
if j.val=1 then (if i.val=0 then 11/25 else if i.val=1 then 0 else if side.val=0 then -(3/500) else 3/500) else 0
|
| 188 |
+
|
| 189 |
+
def Uplus : Matrix (Fin 20) (Fin 8) ℝ :=
|
| 190 |
+
(1-R)⁻¹*(Yf+R0*(gamma 1+gamma 0))
|
| 191 |
+
|
| 192 |
+
def Uminus : Matrix (Fin 20) (Fin 8) ℝ :=
|
| 193 |
+
(1+R)⁻¹*(Yf+R0*(gamma 1-gamma 0))
|
| 194 |
+
|
| 195 |
+
def finiteSolution (side : Fin 2) : Matrix (Fin 20) (Fin 8) ℝ :=
|
| 196 |
+
if side.val=0 then (1/2:ℝ) • (Uplus+Uminus) else (1/2:ℝ) • (Uplus-Uminus)
|
| 197 |
+
|
| 198 |
+
def Acoefficient (side : Fin 2) : Matrix (Fin 23) (Fin 8) ℝ := fun i j =>
|
| 199 |
+
if hi : i.val<2 then gamma side ⟨i.val,by omega⟩ j
|
| 200 |
+
else if h22 : i.val=22 then gamma side 2 j
|
| 201 |
+
else finiteSolution side ⟨i.val-2,by omega⟩ j
|
| 202 |
+
|
| 203 |
+
def gaussianZ (α : ℝ) : ℝ := 1/(Real.pi*(α/b-h))
|
| 204 |
+
|
| 205 |
+
def actualParameter (z : ℝ) : Fin 8 → ℝ :=
|
| 206 |
+
![z,1,z*Real.exp (-2/z),Real.exp (-2/z),z*Real.exp (-3/z),Real.exp (-3/z),
|
| 207 |
+
z*Real.exp (-6/z),Real.exp (-6/z)]
|
| 208 |
+
|
| 209 |
+
def normalizingDen (z : ℝ) := Q 1*z*Real.exp (1/z)
|
| 210 |
+
|
| 211 |
+
end AtomicTriangular.Construction
|
| 212 |
+
|
| 213 |
+
end
|
| 214 |
+
|
| 215 |
+
noncomputable section
|
| 216 |
+
open scoped BigOperators FourierTransform
|
| 217 |
+
|
| 218 |
+
namespace AtomicTriangular.Construction
|
| 219 |
+
|
| 220 |
+
def correctedFinite (side : Fin 2) (z : ℝ) (δ : Fin 20 → ℝ) (j : Fin 22) : ℝ :=
|
| 221 |
+
(∑ r : Fin 8, Acoefficient side ⟨j.val, by omega⟩ r * actualParameter z r) +
|
| 222 |
+
if hj : j.val < 2 then 0 else δ ⟨j.val - 2, by omega⟩
|
| 223 |
+
|
| 224 |
+
end AtomicTriangular.Construction
|
| 225 |
+
|
| 226 |
+
namespace AtomicTriangular
|
| 227 |
+
open Construction
|
| 228 |
+
|
| 229 |
+
local instance finite_pair_neZero : NeZero (2 : ℕ) := inferInstance
|
| 230 |
+
local instance three_atLeastTwo : Nat.AtLeastTwo 3 := inferInstance
|
| 231 |
+
local instance ten_atLeastTwo : Nat.AtLeastTwo 10 := inferInstance
|
| 232 |
+
local instance five_hundred_atLeastTwo : Nat.AtLeastTwo 500 := inferInstance
|
| 233 |
+
local instance plane_borelSpace : BorelSpace Plane := inferInstance
|
| 234 |
+
local instance plane_finite : Module.Finite ℝ Plane := inferInstance
|
| 235 |
+
|
| 236 |
+
def AtomicConstruction (α : ℝ) (f : Plane → ℝ) : Prop :=
|
| 237 |
+
IsUnit (1 - R) ∧ IsUnit (1 + R) ∧
|
| 238 |
+
(1 - R) * Uplus = Yf + R0 * (gamma 1 + gamma 0) ∧
|
| 239 |
+
(1 + R) * Uminus = Yf + R0 * (gamma 1 - gamma 0) ∧
|
| 240 |
+
∃ (δ : Fin 2 → Fin 20 → ℝ) (a : Fin 2 → InputCoefficients),
|
| 241 |
+
(∀ side, (∑ j : Fin 20, |δ side j|) < (1 / 10^5 : ℝ)) ∧
|
| 242 |
+
(∀ side, (a side).C = if side.val = 0 then -(3/500) else 3/500) ∧
|
| 243 |
+
(∀ side (j : Fin 11),
|
| 244 |
+
(a side).finiteC j =
|
| 245 |
+
correctedFinite side (gaussianZ α) (δ side) ⟨2*j.val, by omega⟩ ∧
|
| 246 |
+
(a side).finiteD j =
|
| 247 |
+
correctedFinite side (gaussianZ α) (δ side) ⟨2*j.val+1, by omega⟩) ∧
|
| 248 |
+
(∀ side, Summable (fun n => |(a side).tailC n| + |(a side).tailD n|) ∧
|
| 249 |
+
(∑' n, (|(a side).tailC n| + |(a side).tailD n|)) < (3 / 10^9 : ℝ)) ∧
|
| 250 |
+
(∀ x, (f x : ℂ) =
|
| 251 |
+
(inputComplex (a 0) x + 𝓕 (inputComplex (a 1)) x) /
|
| 252 |
+
(normalizingDen (gaussianZ α) : ℂ))
|
| 253 |
+
|
| 254 |
+
end AtomicTriangular
|
| 255 |
+
end
|
| 256 |
+
|
| 257 |
+
noncomputable section
|
| 258 |
+
open scoped BigOperators FourierTransform
|
| 259 |
+
|
| 260 |
+
namespace AtomicTriangular
|
| 261 |
+
open Construction
|
| 262 |
+
|
| 263 |
+
theorem sharp_gaussian_minorants_with_construction (α : ℝ) (hα : 0 < α) :
|
| 264 |
+
∃ f : SchwartzMap Plane ℝ,
|
| 265 |
+
Radial f ∧ (∀ x, f x ≤ gaussian α x) ∧
|
| 266 |
+
(∀ w, (realFourier f w).im = 0 ∧ 0 ≤ (realFourier f w).re) ∧
|
| 267 |
+
(∀ a ∈ A, a ≠ 0 → f a = gaussian α a) ∧
|
| 268 |
+
(∀ w ∈ dualA, w ≠ 0 → realFourier f w = 0) ∧
|
| 269 |
+
(1 ≤ α → AtomicConstruction α f) := by
|
| 270 |
+
sorry
|
| 271 |
+
|
| 272 |
+
end AtomicTriangular
|
| 273 |
+
end
|
| 274 |
+
|
| 275 |
+
end OAI
|
lean/ComparatorChallenges/TriangularHilbert.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"challenge_module": "ComparatorChallenges.TriangularHilbert",
|
| 3 |
+
"solution_module": "OAI.Analysis.TriangularHilbert.Main",
|
| 4 |
+
"theorem_names": [
|
| 5 |
+
"OAI.TriangularHilbert.main_estimate"
|
| 6 |
+
],
|
| 7 |
+
"definition_names": [],
|
| 8 |
+
"permitted_axioms": [
|
| 9 |
+
"propext",
|
| 10 |
+
"Quot.sound",
|
| 11 |
+
"Classical.choice"
|
| 12 |
+
],
|
| 13 |
+
"enable_nanoda": false
|
| 14 |
+
}
|
lean/ComparatorChallenges/TriangularHilbert.lean
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Mathlib
|
| 2 |
+
|
| 3 |
+
namespace OAI
|
| 4 |
+
|
| 5 |
+
noncomputable section
|
| 6 |
+
|
| 7 |
+
open MeasureTheory
|
| 8 |
+
open scoped ENNReal NNReal
|
| 9 |
+
|
| 10 |
+
namespace TriangularHilbert
|
| 11 |
+
|
| 12 |
+
abbrev Plane := ℝ × ℝ
|
| 13 |
+
|
| 14 |
+
structure Endpoints where
|
| 15 |
+
lower : ℝ
|
| 16 |
+
upper : ℝ
|
| 17 |
+
lower_pos : 0 < lower
|
| 18 |
+
lower_lt_upper : lower < upper
|
| 19 |
+
|
| 20 |
+
def annulus (ε R : ℝ) : Set ℝ := {t | ε < |t| ∧ |t| < R}
|
| 21 |
+
|
| 22 |
+
def integrand (F G : Plane → ℂ) (z : Plane) (t : ℝ) : ℂ :=
|
| 23 |
+
F (z.1 + t, z.2) * G (z.1, z.2 + t) / (t : ℂ)
|
| 24 |
+
|
| 25 |
+
def truncation (F G : Plane → ℂ) (E : Endpoints) (z : Plane) : ℂ :=
|
| 26 |
+
∫ t in annulus E.lower E.upper, integrand F G z t
|
| 27 |
+
|
| 28 |
+
def GoodPoint (F G : Plane → ℂ) (z : Plane) : Prop :=
|
| 29 |
+
∀ n : ℕ, IntegrableOn (integrand F G z)
|
| 30 |
+
(annulus (1 / ((n : ℝ) + 2)) ((n : ℝ) + 2))
|
| 31 |
+
|
| 32 |
+
def maximal (F G : Plane → ℂ) (z : Plane) : ℝ≥0∞ := by
|
| 33 |
+
classical
|
| 34 |
+
exact if GoodPoint F G z then
|
| 35 |
+
⨆ E : Endpoints, ENNReal.ofReal ‖truncation F G E z‖ else 0
|
| 36 |
+
|
| 37 |
+
def maximalNorm (F G : Plane → ℂ) : ℝ≥0∞ :=
|
| 38 |
+
(∫⁻ z : Plane, maximal F G z ^ ((3 : ℝ) / 2)) ^ ((2 : ℝ) / 3)
|
| 39 |
+
|
| 40 |
+
def MainEstimate : Prop :=
|
| 41 |
+
∃ C : ℝ≥0, ∀ F G : Plane → ℂ,
|
| 42 |
+
MemLp F 3 volume → MemLp G 3 volume →
|
| 43 |
+
(∀ᵐ z ∂volume, GoodPoint F G z) ∧
|
| 44 |
+
AEMeasurable (maximal F G) volume ∧
|
| 45 |
+
maximalNorm F G ≤ (C : ℝ≥0∞) * eLpNorm F 3 volume * eLpNorm G 3 volume
|
| 46 |
+
|
| 47 |
+
open MeasureTheory Filter
|
| 48 |
+
open scoped ENNReal
|
| 49 |
+
|
| 50 |
+
theorem main_estimate : MainEstimate := by
|
| 51 |
+
sorry
|
| 52 |
+
|
| 53 |
+
end TriangularHilbert
|
| 54 |
+
|
| 55 |
+
end
|
| 56 |
+
|
| 57 |
+
end OAI
|
lean/ComparatorChallenges/TruffetCounterexample.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"challenge_module": "ComparatorChallenges.TruffetCounterexample",
|
| 3 |
+
"solution_module": "OAI.Optimization.Tropical.TruffetCounterexample",
|
| 4 |
+
"theorem_names": [
|
| 5 |
+
"OAI.TruffetV4Counterexample.finite_execution_not_optimal"
|
| 6 |
+
],
|
| 7 |
+
"definition_names": [],
|
| 8 |
+
"permitted_axioms": [
|
| 9 |
+
"propext",
|
| 10 |
+
"Classical.choice",
|
| 11 |
+
"Quot.sound"
|
| 12 |
+
],
|
| 13 |
+
"enable_nanoda": false
|
| 14 |
+
}
|
lean/ComparatorChallenges/TruffetCounterexample.lean
ADDED
|
@@ -0,0 +1,134 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Mathlib
|
| 2 |
+
|
| 3 |
+
namespace OAI
|
| 4 |
+
|
| 5 |
+
noncomputable section
|
| 6 |
+
namespace TruffetV4Counterexample
|
| 7 |
+
|
| 8 |
+
abbrev Coeff := WithBot ℝ
|
| 9 |
+
|
| 10 |
+
abbrev Form := Fin 3 → Coeff
|
| 11 |
+
|
| 12 |
+
abbrev Var := Fin 2
|
| 13 |
+
|
| 14 |
+
abbrev RowIndex := Fin 2
|
| 15 |
+
|
| 16 |
+
def column (j : Var) : Fin 3 := ⟨j.val, Nat.lt_trans j.isLt (by decide)⟩
|
| 17 |
+
|
| 18 |
+
def nullForm : Form := fun _ => ⊥
|
| 19 |
+
|
| 20 |
+
structure Row where
|
| 21 |
+
lhs : Form
|
| 22 |
+
rhs : Form
|
| 23 |
+
|
| 24 |
+
structure State where
|
| 25 |
+
rows : RowIndex → Row
|
| 26 |
+
cost : Form
|
| 27 |
+
remaining : Var → Prop
|
| 28 |
+
|
| 29 |
+
def wellFormed (s : State) : Prop := ∀ j, ¬ s.remaining j →
|
| 30 |
+
s.cost (column j) = ⊥ ∧ ∀ i,
|
| 31 |
+
(s.rows i).lhs (column j) = ⊥ ∧ (s.rows i).rhs (column j) = ⊥
|
| 32 |
+
|
| 33 |
+
def eval (f : Form) (w : Fin 3 → ℝ) : Coeff :=
|
| 34 |
+
max (f 0 + (w 0 : Coeff)) (max (f 1 + (w 1 : Coeff)) (f 2 + (w 2 : Coeff)))
|
| 35 |
+
|
| 36 |
+
def feasible (s : State) (w : Fin 3 → ℝ) : Prop :=
|
| 37 |
+
∀ i, eval (s.rows i).rhs w ≤ eval (s.rows i).lhs w
|
| 38 |
+
|
| 39 |
+
def lower (s : State) (i : RowIndex) (j : Var) : Prop :=
|
| 40 |
+
(s.rows i).lhs (column j) ≠ ⊥ ∧
|
| 41 |
+
(s.rows i).rhs (column j) < (s.rows i).lhs (column j)
|
| 42 |
+
|
| 43 |
+
def upper (s : State) (i : RowIndex) (j : Var) : Prop :=
|
| 44 |
+
(s.rows i).rhs (column j) ≠ ⊥ ∧
|
| 45 |
+
(s.rows i).lhs (column j) < (s.rows i).rhs (column j)
|
| 46 |
+
|
| 47 |
+
def dominating (s : State) (j : Var) : Prop :=
|
| 48 |
+
s.remaining j ∧ (∃ i, lower s i j) ∧ ∃ i, upper s i j
|
| 49 |
+
|
| 50 |
+
def eligible (s : State) (i : RowIndex) (j : Var) : Prop :=
|
| 51 |
+
s.remaining j ∧ lower s i j ∧ ((∃ k, dominating s k) → dominating s j)
|
| 52 |
+
|
| 53 |
+
def bounded (s : State) : Prop :=
|
| 54 |
+
∀ j, s.remaining j → (∃ i, lower s i j) ∨ ∃ i, upper s i j
|
| 55 |
+
|
| 56 |
+
def stop (s : State) : Prop := ∀ i, (s.rows i).rhs 2 ≤ (s.rows i).lhs 2
|
| 57 |
+
|
| 58 |
+
def switch (s : State) : Prop :=
|
| 59 |
+
(∀ j, s.remaining j → s.cost (column j) = ⊥) ∧ ¬ stop s ∧
|
| 60 |
+
(∃ j, s.remaining j) ∧
|
| 61 |
+
(¬ ∃ i j, s.remaining j ∧ lower s i j) ∧
|
| 62 |
+
∃ i j, s.remaining j ∧ upper s i j
|
| 63 |
+
|
| 64 |
+
def failure (s : State) : Prop := ¬ stop s ∧
|
| 65 |
+
((¬ ∃ j, s.remaining j) ∨
|
| 66 |
+
((¬ ∃ i j, s.remaining j ∧ lower s i j) ∧
|
| 67 |
+
(¬ ∃ i j, s.remaining j ∧ upper s i j)))
|
| 68 |
+
|
| 69 |
+
def lowerForm (s : State) (i : RowIndex) (j : Var) : Form := fun k =>
|
| 70 |
+
if k = column j then ⊥ else
|
| 71 |
+
(s.rows i).rhs k + ((-WithBot.unbotD 0 ((s.rows i).lhs (column j)) : ℝ) : Coeff)
|
| 72 |
+
|
| 73 |
+
def substitute (f : Form) (j : Var) (g : Form) : Form := fun k =>
|
| 74 |
+
if k = column j then ⊥ else max (f k) (f (column j) + g k)
|
| 75 |
+
|
| 76 |
+
def cleanup (r : Row) : Row := by
|
| 77 |
+
classical
|
| 78 |
+
exact if ∀ k, r.rhs k ≤ r.lhs k then ⟨nullForm, nullForm⟩ else r
|
| 79 |
+
|
| 80 |
+
def advance (s : State) (i : RowIndex) (j : Var) : State where
|
| 81 |
+
rows := fun r => cleanup ⟨substitute (s.rows r).lhs j (lowerForm s i j),
|
| 82 |
+
substitute (s.rows r).rhs j (lowerForm s i j)⟩
|
| 83 |
+
cost := substitute s.cost j (lowerForm s i j)
|
| 84 |
+
remaining := fun k => s.remaining k ∧ k ≠ j
|
| 85 |
+
|
| 86 |
+
def ForcedSingletonStep (s s' : State) (i : RowIndex) (j : Var) : Prop :=
|
| 87 |
+
wellFormed s ∧ wellFormed s' ∧
|
| 88 |
+
bounded s ∧ ¬ stop s ∧ ¬ switch s ∧ ¬ failure s ∧
|
| 89 |
+
(∀ r k, eligible s r k ↔ r = i ∧ k = j) ∧
|
| 90 |
+
(∃ k, (substitute s.cost j (lowerForm s i j)) k ≠ ⊥) ∧
|
| 91 |
+
s' = advance s i j
|
| 92 |
+
|
| 93 |
+
def initial : State where
|
| 94 |
+
rows := ![⟨![(0 : Coeff), 0, ⊥], ![⊥, ⊥, (0 : Coeff)]⟩,
|
| 95 |
+
⟨![(0 : Coeff), ⊥, ⊥], ![⊥, (1 : Coeff), ((-2 : ℝ) : Coeff)]⟩]
|
| 96 |
+
cost := ![(0 : Coeff), ⊥, ⊥]
|
| 97 |
+
remaining := fun _ => True
|
| 98 |
+
|
| 99 |
+
def middle : State where
|
| 100 |
+
rows := ![⟨nullForm, nullForm⟩,
|
| 101 |
+
⟨![(0 : Coeff), ⊥, ⊥], ![⊥, ⊥, (1 : Coeff)]⟩]
|
| 102 |
+
cost := ![(0 : Coeff), ⊥, ⊥]
|
| 103 |
+
remaining := fun j => j = 0
|
| 104 |
+
|
| 105 |
+
def finalState : State where
|
| 106 |
+
rows := fun _ => ⟨nullForm, nullForm⟩
|
| 107 |
+
cost := ![⊥, ⊥, (1 : Coeff)]
|
| 108 |
+
remaining := fun _ => False
|
| 109 |
+
|
| 110 |
+
def crossRowRestriction (s : State) : Prop :=
|
| 111 |
+
∀ i r : RowIndex, i ≠ r → ∀ α : ℝ, ∃ w : Fin 3 → ℝ,
|
| 112 |
+
eval (s.rows i).lhs w < (α : Coeff) + eval (s.rows r).rhs w
|
| 113 |
+
|
| 114 |
+
def output : Fin 3 → ℝ := ![1, 0, 0]
|
| 115 |
+
|
| 116 |
+
def better : Fin 3 → ℝ := ![0, -1, 0]
|
| 117 |
+
|
| 118 |
+
theorem finite_execution_not_optimal :
|
| 119 |
+
crossRowRestriction initial ∧
|
| 120 |
+
ForcedSingletonStep initial middle 0 1 ∧
|
| 121 |
+
ForcedSingletonStep middle finalState 1 0 ∧
|
| 122 |
+
(¬ ∃ j, finalState.remaining j) ∧ stop finalState ∧
|
| 123 |
+
feasible initial output ∧ feasible initial better ∧
|
| 124 |
+
output 2 = 0 ∧ better 2 = 0 ∧
|
| 125 |
+
(output 1 : Coeff) = eval (lowerForm initial 0 1) output ∧
|
| 126 |
+
(output 0 : Coeff) = eval (lowerForm middle 1 0) output ∧
|
| 127 |
+
eval initial.cost output = eval finalState.cost output ∧
|
| 128 |
+
eval initial.cost better < eval finalState.cost output := by
|
| 129 |
+
sorry
|
| 130 |
+
|
| 131 |
+
end TruffetV4Counterexample
|
| 132 |
+
end
|
| 133 |
+
|
| 134 |
+
end OAI
|
lean/ComparatorChallenges/TwoWayComplementation.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"challenge_module": "ComparatorChallenges.TwoWayComplementation",
|
| 3 |
+
"solution_module": "OAI.Combinatorics.TwoWayAutomata.Main",
|
| 4 |
+
"theorem_names": [
|
| 5 |
+
"OAI.TwoWayComplementation.complementation_lower_bound_finite"
|
| 6 |
+
],
|
| 7 |
+
"definition_names": [],
|
| 8 |
+
"permitted_axioms": [
|
| 9 |
+
"propext",
|
| 10 |
+
"Quot.sound",
|
| 11 |
+
"Classical.choice"
|
| 12 |
+
],
|
| 13 |
+
"enable_nanoda": false
|
| 14 |
+
}
|
lean/ComparatorChallenges/TwoWayComplementation.lean
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Mathlib
|
| 2 |
+
|
| 3 |
+
namespace OAI
|
| 4 |
+
|
| 5 |
+
namespace TwoWayComplementation
|
| 6 |
+
|
| 7 |
+
open scoped SetRel
|
| 8 |
+
|
| 9 |
+
def relStar {α : Type*} (R : SetRel α α) : SetRel α α :=
|
| 10 |
+
{(x, y) | Relation.ReflTransGen (fun a b => (a, b) ∈ R) x y}
|
| 11 |
+
|
| 12 |
+
structure TwoNFA (Sigma Q : Type*) where
|
| 13 |
+
initial : Q
|
| 14 |
+
accepting : Set Q
|
| 15 |
+
transition : Q → (Fin 2 ⊕ Sigma) → Set (Q × Fin 3)
|
| 16 |
+
|
| 17 |
+
def tapeSymbol {Sigma : Type*} (w : List Sigma) (p : Fin (w.length + 2)) : Fin 2 ⊕ Sigma :=
|
| 18 |
+
if hleft : p.val = 0 then .inl 0
|
| 19 |
+
else if hright : p.val = w.length + 1 then .inl 1
|
| 20 |
+
else .inr (w[p.val - 1]'(by omega))
|
| 21 |
+
|
| 22 |
+
namespace TwoNFA
|
| 23 |
+
|
| 24 |
+
def step {Sigma Q : Type*} (A : TwoNFA Sigma Q) (w : List Sigma) :
|
| 25 |
+
SetRel (Q × Fin (w.length + 2)) (Q × Fin (w.length + 2)) :=
|
| 26 |
+
{(c, d) | ∃ move : Fin 3,
|
| 27 |
+
(d.1, move) ∈ A.transition c.1 (tapeSymbol w c.2) ∧
|
| 28 |
+
(d.2.val : ℤ) = (c.2.val : ℤ) + (move.val : ℤ) - 1}
|
| 29 |
+
|
| 30 |
+
def language {Sigma Q : Type*} (A : TwoNFA Sigma Q) : Set (List Sigma) :=
|
| 31 |
+
{w | ∃ c, c.1 ∈ A.accepting ∧
|
| 32 |
+
((A.initial, ⟨0, by omega⟩), c) ∈ relStar (A.step w)}
|
| 33 |
+
|
| 34 |
+
end TwoNFA
|
| 35 |
+
|
| 36 |
+
theorem complementation_lower_bound_finite (n : ℕ) (hn : 4 ≤ n) :
|
| 37 |
+
∃ A : TwoNFA (SetRel (Fin (n - 2)) (Fin (n - 2))) (Fin n),
|
| 38 |
+
∀ (Q : Type*) [Fintype Q], ∀ B : TwoNFA (SetRel (Fin (n - 2)) (Fin (n - 2))) Q,
|
| 39 |
+
B.language = A.languageᶜ →
|
| 40 |
+
(1 / 2 : ℝ) * 2 ^ ((n - 4) / 127) - 1 ≤ (Fintype.card Q : ℝ) := by
|
| 41 |
+
sorry
|
| 42 |
+
|
| 43 |
+
end TwoWayComplementation
|
| 44 |
+
|
| 45 |
+
end OAI
|
lean/ComparatorChallenges/TwoWayDeterminization.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"challenge_module": "ComparatorChallenges.TwoWayDeterminization",
|
| 3 |
+
"solution_module": "OAI.Combinatorics.TwoWayAutomata.ExplicitFamily",
|
| 4 |
+
"theorem_names": [
|
| 5 |
+
"OAI.TwoWayComplementation.explicit_family_main"
|
| 6 |
+
],
|
| 7 |
+
"definition_names": [],
|
| 8 |
+
"permitted_axioms": [
|
| 9 |
+
"propext",
|
| 10 |
+
"Classical.choice",
|
| 11 |
+
"Quot.sound"
|
| 12 |
+
],
|
| 13 |
+
"enable_nanoda": false
|
| 14 |
+
}
|
lean/ComparatorChallenges/TwoWayDeterminization.lean
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Mathlib
|
| 2 |
+
|
| 3 |
+
namespace OAI
|
| 4 |
+
|
| 5 |
+
namespace TwoWayComplementation
|
| 6 |
+
|
| 7 |
+
open scoped SetRel
|
| 8 |
+
|
| 9 |
+
/-- Reflexive transitive closure, including the empty path. -/
|
| 10 |
+
def relStar {α : Type*} (R : SetRel α α) : SetRel α α :=
|
| 11 |
+
{(x, y) | Relation.ReflTransGen (fun a b => (a, b) ∈ R) x y}
|
| 12 |
+
|
| 13 |
+
/-- A read-only 2NFA. The two endmarkers are `Sum.inl 0` and `Sum.inl 1`.
|
| 14 |
+
Move codes 0, 1, 2 mean left, stay, right. -/
|
| 15 |
+
structure TwoNFA (Sigma Q : Type*) where
|
| 16 |
+
/-- The state in which the machine starts on the left endmarker. -/
|
| 17 |
+
initial : Q
|
| 18 |
+
/-- States whose occurrence on a finite run constitutes acceptance. -/
|
| 19 |
+
accepting : Set Q
|
| 20 |
+
/-- Allowed next-state and move pairs, determined by the state and scanned symbol. -/
|
| 21 |
+
transition : Q → (Fin 2 ⊕ Sigma) → Set (Q × Fin 3)
|
| 22 |
+
|
| 23 |
+
/-- Tape lookup includes two distinct endmarkers, even on empty input. -/
|
| 24 |
+
def tapeSymbol {Sigma : Type*} (w : List Sigma) (p : Fin (w.length + 2)) : Fin 2 ⊕ Sigma :=
|
| 25 |
+
if hleft : p.val = 0 then .inl 0
|
| 26 |
+
else if hright : p.val = w.length + 1 then .inl 1
|
| 27 |
+
else .inr (w[p.val - 1]'(by omega))
|
| 28 |
+
|
| 29 |
+
namespace TwoNFA
|
| 30 |
+
|
| 31 |
+
/-- One legal step: both head positions stay within the marked input. -/
|
| 32 |
+
def step {Sigma Q : Type*} (A : TwoNFA Sigma Q) (w : List Sigma) :
|
| 33 |
+
SetRel (Q × Fin (w.length + 2)) (Q × Fin (w.length + 2)) :=
|
| 34 |
+
{(c, d) | ∃ move : Fin 3,
|
| 35 |
+
(d.1, move) ∈ A.transition c.1 (tapeSymbol w c.2) ∧
|
| 36 |
+
(d.2.val : ℤ) = (c.2.val : ℤ) + (move.val : ℤ) - 1}
|
| 37 |
+
|
| 38 |
+
/-- Existential finite-run acceptance, allowing a run of length zero. -/
|
| 39 |
+
def language {Sigma Q : Type*} (A : TwoNFA Sigma Q) : Set (List Sigma) :=
|
| 40 |
+
{w | ∃ c, c.1 ∈ A.accepting ∧
|
| 41 |
+
((A.initial, ⟨0, by omega⟩), c) ∈ relStar (A.step w)}
|
| 42 |
+
|
| 43 |
+
end TwoNFA
|
| 44 |
+
|
| 45 |
+
/-- At most one next-state/move pair at every state and scanned symbol. -/
|
| 46 |
+
def TwoNFA.Deterministic {Sigma Q : Type*} (A : TwoNFA Sigma Q) : Prop :=
|
| 47 |
+
∀ q symbol, (A.transition q symbol).Subsingleton
|
| 48 |
+
|
| 49 |
+
/-- Relation product for an input word; the empty product is the identity. -/
|
| 50 |
+
def relationProduct {H : Type*} (w : List (SetRel H H)) : SetRel H H :=
|
| 51 |
+
w.foldr SetRel.comp SetRel.id
|
| 52 |
+
|
| 53 |
+
/-- The source language consists of the words with nonempty relation product. -/
|
| 54 |
+
def sourceLanguage (H : Type*) : Set (List (SetRel H H)) :=
|
| 55 |
+
{w | (relationProduct w).Nonempty}
|
| 56 |
+
|
| 57 |
+
/-- Both lower bounds hold for the same n-state liveness witness. -/
|
| 58 |
+
theorem explicit_family_main (n : ℕ) (hn : 4 ≤ n) :
|
| 59 |
+
∃ A : TwoNFA (SetRel (Fin (n - 2)) (Fin (n - 2))) (Fin n),
|
| 60 |
+
A.language = sourceLanguage (Fin (n - 2)) ∧
|
| 61 |
+
(∀ (Q : Type*) [Fintype Q],
|
| 62 |
+
∀ B : TwoNFA (SetRel (Fin (n - 2)) (Fin (n - 2))) Q,
|
| 63 |
+
B.language = A.languageᶜ →
|
| 64 |
+
(1 / 2 : ℝ) * 2 ^ ((n - 4) / 127) - 1 ≤ (Fintype.card Q : ℝ)) ∧
|
| 65 |
+
(131 ≤ n → ∀ (Q : Type*) [Fintype Q],
|
| 66 |
+
∀ D : TwoNFA (SetRel (Fin (n - 2)) (Fin (n - 2))) Q,
|
| 67 |
+
D.Deterministic → D.language = A.language →
|
| 68 |
+
(1 / 2 : ℝ) * 2 ^ ((n - 4) / 127) ≤ (Fintype.card Q : ℝ)) := by
|
| 69 |
+
sorry
|
| 70 |
+
|
| 71 |
+
end TwoWayComplementation
|
| 72 |
+
|
| 73 |
+
end OAI
|
lean/ComparatorChallenges/TypeSystemNormalization.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"challenge_module": "ComparatorChallenges.TypeSystemNormalization",
|
| 3 |
+
"solution_module": "OAI.Computability.TypeSystem.Normalization",
|
| 4 |
+
"theorem_names": [
|
| 5 |
+
"OAI.PureTypeSystem.weak_implies_strong"
|
| 6 |
+
],
|
| 7 |
+
"definition_names": [],
|
| 8 |
+
"permitted_axioms": [
|
| 9 |
+
"propext",
|
| 10 |
+
"Quot.sound",
|
| 11 |
+
"Classical.choice"
|
| 12 |
+
],
|
| 13 |
+
"enable_nanoda": false
|
| 14 |
+
}
|
lean/ComparatorChallenges/TypeSystemNormalization.lean
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Mathlib
|
| 2 |
+
|
| 3 |
+
namespace OAI
|
| 4 |
+
|
| 5 |
+
/-!
|
| 6 |
+
Full annotated PTS syntax, modulo alpha-renaming via de Bruijn indices.
|
| 7 |
+
Contexts are stored newest-first, each declaration in its prefix context.
|
| 8 |
+
No functionality assumptions on axioms or product rules.
|
| 9 |
+
-/
|
| 10 |
+
|
| 11 |
+
namespace PureTypeSystem
|
| 12 |
+
|
| 13 |
+
universe u
|
| 14 |
+
|
| 15 |
+
inductive Expr (Sorts : Type u) : Type u
|
| 16 |
+
| var : Nat → Expr Sorts
|
| 17 |
+
| sort : Sorts → Expr Sorts
|
| 18 |
+
| app : Expr Sorts → Expr Sorts → Expr Sorts
|
| 19 |
+
| lam : Expr Sorts → Expr Sorts → Expr Sorts
|
| 20 |
+
| pi : Expr Sorts → Expr Sorts → Expr Sorts
|
| 21 |
+
deriving DecidableEq
|
| 22 |
+
|
| 23 |
+
namespace Expr
|
| 24 |
+
|
| 25 |
+
variable {S : Type u}
|
| 26 |
+
|
| 27 |
+
def liftRen (ρ : Nat → Nat) : Nat → Nat
|
| 28 |
+
| 0 => 0
|
| 29 |
+
| n + 1 => ρ n + 1
|
| 30 |
+
|
| 31 |
+
def rename (ρ : Nat → Nat) : Expr S → Expr S
|
| 32 |
+
| var n => var (ρ n)
|
| 33 |
+
| sort s => sort s
|
| 34 |
+
| app f a => app (rename ρ f) (rename ρ a)
|
| 35 |
+
| lam A b => lam (rename ρ A) (rename (liftRen ρ) b)
|
| 36 |
+
| pi A B => pi (rename ρ A) (rename (liftRen ρ) B)
|
| 37 |
+
|
| 38 |
+
def liftSub (σ : Nat → Expr S) : Nat → Expr S
|
| 39 |
+
| 0 => var 0
|
| 40 |
+
| n + 1 => rename Nat.succ (σ n)
|
| 41 |
+
|
| 42 |
+
def subst (σ : Nat → Expr S) : Expr S → Expr S
|
| 43 |
+
| var n => σ n
|
| 44 |
+
| sort s => sort s
|
| 45 |
+
| app f a => app (subst σ f) (subst σ a)
|
| 46 |
+
| lam A b => lam (subst σ A) (subst (liftSub σ) b)
|
| 47 |
+
| pi A B => pi (subst σ A) (subst (liftSub σ) B)
|
| 48 |
+
|
| 49 |
+
def single (a : Expr S) : Nat → Expr S
|
| 50 |
+
| 0 => a
|
| 51 |
+
| n + 1 => var n
|
| 52 |
+
|
| 53 |
+
def instantiate (b a : Expr S) : Expr S := subst (single a) b
|
| 54 |
+
|
| 55 |
+
end Expr
|
| 56 |
+
|
| 57 |
+
structure Specification (S : Type u) where
|
| 58 |
+
axioms : S → S → Prop
|
| 59 |
+
rule : S → S → S → Prop
|
| 60 |
+
|
| 61 |
+
inductive Beta {S : Type u} : Expr S → Expr S → Prop
|
| 62 |
+
| head (A b a) : Beta (.app (.lam A b) a) (b.instantiate a)
|
| 63 |
+
| app_left {f f' a} : Beta f f' → Beta (.app f a) (.app f' a)
|
| 64 |
+
| app_right {f a a'} : Beta a a' → Beta (.app f a) (.app f a')
|
| 65 |
+
| lam_domain {A A' b} : Beta A A' → Beta (.lam A b) (.lam A' b)
|
| 66 |
+
| lam_body {A b b'} : Beta b b' → Beta (.lam A b) (.lam A b')
|
| 67 |
+
| pi_domain {A A' B} : Beta A A' → Beta (.pi A B) (.pi A' B)
|
| 68 |
+
| pi_body {A B B'} : Beta B B' → Beta (.pi A B) (.pi A B')
|
| 69 |
+
|
| 70 |
+
def Converts {S : Type u} : Expr S → Expr S → Prop := Relation.EqvGen Beta
|
| 71 |
+
|
| 72 |
+
def Normal {S : Type u} (M : Expr S) : Prop := ∀ N, ¬ Beta M N
|
| 73 |
+
|
| 74 |
+
def WeaklyNormalizing {S : Type u} (M : Expr S) : Prop :=
|
| 75 |
+
∃ N, Relation.ReflTransGen Beta M N ∧ Normal N
|
| 76 |
+
|
| 77 |
+
/-- Accessibility for the converse of reduction: strong normalization,
|
| 78 |
+
including reductions in all type annotations. -/
|
| 79 |
+
def StronglyNormalizing {S : Type u} (M : Expr S) : Prop :=
|
| 80 |
+
Acc (fun N M : Expr S => Beta M N) M
|
| 81 |
+
|
| 82 |
+
inductive HasType {S : Type u} (P : Specification S) :
|
| 83 |
+
List (Expr S) → Expr S → Expr S → Prop
|
| 84 |
+
| ax {s t} : P.axioms s t → HasType P [] (.sort s) (.sort t)
|
| 85 |
+
| var {Γ A s} : HasType P Γ A (.sort s) →
|
| 86 |
+
HasType P (A :: Γ) (.var 0) (A.rename Nat.succ)
|
| 87 |
+
| weaken {Γ M B A s} : HasType P Γ M B → HasType P Γ A (.sort s) →
|
| 88 |
+
HasType P (A :: Γ) (M.rename Nat.succ) (B.rename Nat.succ)
|
| 89 |
+
| product {Γ A B s₁ s₂ s₃} : HasType P Γ A (.sort s₁) →
|
| 90 |
+
HasType P (A :: Γ) B (.sort s₂) → P.rule s₁ s₂ s₃ →
|
| 91 |
+
HasType P Γ (.pi A B) (.sort s₃)
|
| 92 |
+
| abstraction {Γ A b B s} : HasType P (A :: Γ) b B →
|
| 93 |
+
HasType P Γ (.pi A B) (.sort s) →
|
| 94 |
+
HasType P Γ (.lam A b) (.pi A B)
|
| 95 |
+
| application {Γ f a A B} : HasType P Γ f (.pi A B) →
|
| 96 |
+
HasType P Γ a A → HasType P Γ (.app f a) (B.instantiate a)
|
| 97 |
+
| conversion {Γ M A B s} : HasType P Γ M A → HasType P Γ B (.sort s) →
|
| 98 |
+
Converts A B → HasType P Γ M B
|
| 99 |
+
|
| 100 |
+
inductive ValidContext {S : Type u} (P : Specification S) : List (Expr S) → Prop
|
| 101 |
+
| nil : ValidContext P []
|
| 102 |
+
| cons {Γ A s} : ValidContext P Γ → HasType P Γ A (.sort s) →
|
| 103 |
+
ValidContext P (A :: Γ)
|
| 104 |
+
|
| 105 |
+
def Legal {S : Type u} (P : Specification S) (Γ : List (Expr S)) (M : Expr S) : Prop :=
|
| 106 |
+
∃ A, HasType P Γ M A ∨ HasType P Γ A M
|
| 107 |
+
|
| 108 |
+
def SystemWeaklyNormalizing {S : Type u} (P : Specification S) : Prop :=
|
| 109 |
+
∀ Γ, ValidContext P Γ → ∀ M, Legal P Γ M → WeaklyNormalizing M
|
| 110 |
+
|
| 111 |
+
def SystemStronglyNormalizing {S : Type u} (P : Specification S) : Prop :=
|
| 112 |
+
∀ Γ, ValidContext P Γ → ∀ M, Legal P Γ M → StronglyNormalizing M
|
| 113 |
+
|
| 114 |
+
/-- System-wide weak normalization implies strong normalization for every PTS,
|
| 115 |
+
including arbitrary sort types, nonfunctional rules and annotated terms. -/
|
| 116 |
+
theorem weak_implies_strong {S : Type u} (P : Specification S)
|
| 117 |
+
(h : SystemWeaklyNormalizing P) : SystemStronglyNormalizing P := by
|
| 118 |
+
sorry
|
| 119 |
+
|
| 120 |
+
end PureTypeSystem
|
| 121 |
+
|
| 122 |
+
end OAI
|
lean/ComparatorChallenges/UniformCommutator.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"challenge_module": "ComparatorChallenges.UniformCommutator",
|
| 3 |
+
"solution_module": "OAI.Analysis.Commutator.Main",
|
| 4 |
+
"theorem_names": [
|
| 5 |
+
"OAI.Kadison.uniform_commutator"
|
| 6 |
+
],
|
| 7 |
+
"definition_names": [],
|
| 8 |
+
"permitted_axioms": [
|
| 9 |
+
"propext",
|
| 10 |
+
"Quot.sound",
|
| 11 |
+
"Classical.choice"
|
| 12 |
+
],
|
| 13 |
+
"enable_nanoda": false
|
| 14 |
+
}
|
lean/ComparatorChallenges/UniformCommutator.lean
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Mathlib
|
| 2 |
+
|
| 3 |
+
namespace OAI
|
| 4 |
+
|
| 5 |
+
noncomputable section
|
| 6 |
+
universe u v
|
| 7 |
+
namespace Kadison
|
| 8 |
+
|
| 9 |
+
variable {K : Type u} [NormedAddCommGroup K] [InnerProductSpace ℂ K]
|
| 10 |
+
[CompleteSpace K]
|
| 11 |
+
|
| 12 |
+
def commutatorSeminorm (P : VonNeumannAlgebra K) (Y : K →L[ℂ] K) : ℝ :=
|
| 13 |
+
sSup {r : ℝ | ∃ a : K →L[ℂ] K, a ∈ P ∧ ‖a‖ ≤ 1 ∧ r = ‖Y * a - a * Y‖}
|
| 14 |
+
|
| 15 |
+
def matrixOperator (h : ℕ) (X : Matrix (Fin h) (Fin h) (K →L[ℂ] K)) :
|
| 16 |
+
(PiLp 2 fun _ : Fin h => K) →L[ℂ] (PiLp 2 fun _ : Fin h => K) :=
|
| 17 |
+
(PiLp.continuousLinearEquiv 2 ℂ (fun _ : Fin h => K)).symm.toContinuousLinearMap.comp
|
| 18 |
+
(ContinuousLinearMap.pi (fun i => ∑ j : Fin h,
|
| 19 |
+
(X i j).comp (PiLp.proj 2 (fun _ : Fin h => K) j)))
|
| 20 |
+
|
| 21 |
+
def diagonalAmplification (h : ℕ) (Y : K →L[ℂ] K) :
|
| 22 |
+
(PiLp 2 fun _ : Fin h => K) →L[ℂ] (PiLp 2 fun _ : Fin h => K) :=
|
| 23 |
+
(PiLp.continuousLinearEquiv 2 ℂ (fun _ : Fin h => K)).symm.toContinuousLinearMap.comp
|
| 24 |
+
(ContinuousLinearMap.pi (fun i => Y.comp (PiLp.proj 2 (fun _ : Fin h => K) i)))
|
| 25 |
+
|
| 26 |
+
theorem uniform_commutator :
|
| 27 |
+
∃ C : ℝ, 0 ≤ C ∧ ∀ (K : Type u) [NormedAddCommGroup K] [InnerProductSpace ℂ K]
|
| 28 |
+
[CompleteSpace K] (P : VonNeumannAlgebra K) (Y : K →L[ℂ] K)
|
| 29 |
+
(h : ℕ), 1 ≤ h → ∀ (X : Matrix (Fin h) (Fin h) (K →L[ℂ] K)),
|
| 30 |
+
(∀ i j, X i j ∈ P) →
|
| 31 |
+
‖diagonalAmplification h Y * matrixOperator h X -
|
| 32 |
+
matrixOperator h X * diagonalAmplification h Y‖ ≤
|
| 33 |
+
C * commutatorSeminorm P Y * ‖matrixOperator h X‖ := by
|
| 34 |
+
sorry
|
| 35 |
+
|
| 36 |
+
end Kadison
|
| 37 |
+
|
| 38 |
+
end
|
| 39 |
+
|
| 40 |
+
end OAI
|
lean/ComparatorChallenges/UniformGamma.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"challenge_module": "ComparatorChallenges.UniformGamma",
|
| 3 |
+
"solution_module": "OAI.Analysis.TracialSplitting.Challenge",
|
| 4 |
+
"theorem_names": [
|
| 5 |
+
"OAI.ComparatorModel.CurrentMain.main"
|
| 6 |
+
],
|
| 7 |
+
"definition_names": [],
|
| 8 |
+
"permitted_axioms": [
|
| 9 |
+
"propext",
|
| 10 |
+
"Quot.sound",
|
| 11 |
+
"Classical.choice"
|
| 12 |
+
],
|
| 13 |
+
"enable_nanoda": false
|
| 14 |
+
}
|
lean/ComparatorChallenges/UniformGamma.lean
ADDED
|
@@ -0,0 +1,607 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Mathlib
|
| 2 |
+
|
| 3 |
+
namespace OAI
|
| 4 |
+
|
| 5 |
+
noncomputable section
|
| 6 |
+
|
| 7 |
+
/-!
|
| 8 |
+
The final claim constructs the tracial quotients and states the original gamma assertion.
|
| 9 |
+
`Analysis.TracialSplitting.Challenge.main_iff_original` verifies statement preservation.
|
| 10 |
+
-/
|
| 11 |
+
|
| 12 |
+
universe uA uD uE uI uR uX u v
|
| 13 |
+
|
| 14 |
+
namespace Pureness
|
| 15 |
+
|
| 16 |
+
open scoped ComplexOrder
|
| 17 |
+
|
| 18 |
+
structure CStarAlgebraNorm (R : Type uR) [Ring R] [StarRing R] [Algebra ℂ R]
|
| 19 |
+
extends AlgebraNorm ℂ R where
|
| 20 |
+
cstar : ∀ x, toAlgebraNorm (star x * x) = toAlgebraNorm x * toAlgebraNorm x
|
| 21 |
+
|
| 22 |
+
structure TracialState (A : Type uA) [CStarAlgebra A] [PartialOrder A] where
|
| 23 |
+
functional : A →ₚ[ℂ] ℂ
|
| 24 |
+
normalized : functional 1 = 1
|
| 25 |
+
tracial : ∀ a b : A, functional (a * b) = functional (b * a)
|
| 26 |
+
|
| 27 |
+
structure ClosedStarIdeal (D : Type uD) [CStarAlgebra D] where
|
| 28 |
+
ideal : TwoSidedIdeal D
|
| 29 |
+
star_mem : ∀ {u : D}, u ∈ ideal → star u ∈ ideal
|
| 30 |
+
isClosed : IsClosed (ideal : Set D)
|
| 31 |
+
|
| 32 |
+
end Pureness
|
| 33 |
+
|
| 34 |
+
universe uNuclear
|
| 35 |
+
|
| 36 |
+
namespace ComparatorModel
|
| 37 |
+
|
| 38 |
+
namespace Pureness
|
| 39 |
+
|
| 40 |
+
open scoped TensorProduct ComplexOrder
|
| 41 |
+
|
| 42 |
+
abbrev CStarAlgebraNorm := @_root_.OAI.Pureness.CStarAlgebraNorm
|
| 43 |
+
|
| 44 |
+
def IsNuclear (A : Type u) [CStarAlgebra A] : Prop :=
|
| 45 |
+
∀ (B : Type v) [CStarAlgebra B], Subsingleton (CStarAlgebraNorm (A ⊗[ℂ] B))
|
| 46 |
+
|
| 47 |
+
abbrev TracialState := @_root_.OAI.Pureness.TracialState
|
| 48 |
+
|
| 49 |
+
end Pureness
|
| 50 |
+
|
| 51 |
+
namespace CurrentMain
|
| 52 |
+
|
| 53 |
+
open _root_.OAI.ComparatorModel.Pureness
|
| 54 |
+
|
| 55 |
+
open scoped ComplexOrder
|
| 56 |
+
|
| 57 |
+
def RealRankZero (D : Type) [CStarAlgebra D] : Prop :=
|
| 58 |
+
∀ a : D, IsSelfAdjoint a → ∀ ε : ℝ, 0 < ε →
|
| 59 |
+
∃ b : D, IsSelfAdjoint b ∧ (spectrum ℂ b).Finite ∧ ‖a - b‖ < ε
|
| 60 |
+
|
| 61 |
+
def traceTwoNorm {D : Type} [CStarAlgebra D] [PartialOrder D]
|
| 62 |
+
(τ : TracialState D) (a : D) : ℝ :=
|
| 63 |
+
Real.sqrt (τ.functional (star a * a)).re
|
| 64 |
+
|
| 65 |
+
end CurrentMain
|
| 66 |
+
|
| 67 |
+
section
|
| 68 |
+
|
| 69 |
+
open Filter
|
| 70 |
+
|
| 71 |
+
open scoped Topology NNReal ENNReal
|
| 72 |
+
|
| 73 |
+
abbrev Pureness.ClosedStarIdeal := @_root_.OAI.Pureness.ClosedStarIdeal
|
| 74 |
+
|
| 75 |
+
namespace Pureness.ClosedStarIdeal
|
| 76 |
+
|
| 77 |
+
section
|
| 78 |
+
|
| 79 |
+
variable {D : Type} [CStarAlgebra D] (J : ClosedStarIdeal D)
|
| 80 |
+
|
| 81 |
+
abbrev Quotient := J.ideal.ringCon.Quotient
|
| 82 |
+
|
| 83 |
+
def quotientMap : D →ₐ[ℂ] J.Quotient := J.ideal.ringCon.mkₐ ℂ
|
| 84 |
+
|
| 85 |
+
instance quotientStar : Star (J.Quotient) where
|
| 86 |
+
star := Quotient.map' star (by
|
| 87 |
+
intro u v h
|
| 88 |
+
change J.ideal.ringCon u v at h
|
| 89 |
+
change J.ideal.ringCon (star u) (star v)
|
| 90 |
+
rw [TwoSidedIdeal.rel_iff] at h ⊢
|
| 91 |
+
simpa only [star_sub] using J.star_mem h)
|
| 92 |
+
|
| 93 |
+
instance quotientStarRing : StarRing (J.Quotient) where
|
| 94 |
+
star_involutive x := Quotient.inductionOn' x (fun u => congrArg J.quotientMap (star_star u))
|
| 95 |
+
star_mul x y := Quotient.inductionOn₂' x y (fun u v => congrArg J.quotientMap (star_mul u v))
|
| 96 |
+
star_add x y := Quotient.inductionOn₂' x y (fun u v => congrArg J.quotientMap (star_add u v))
|
| 97 |
+
|
| 98 |
+
instance quotientStarModule : StarModule ℂ (J.Quotient) where
|
| 99 |
+
star_smul c x := Quotient.inductionOn' x (fun u => congrArg J.quotientMap (star_smul c u))
|
| 100 |
+
|
| 101 |
+
abbrev idealSubmodule : Submodule ℂ (D) :=
|
| 102 |
+
(J.quotientMap).toLinearMap.ker
|
| 103 |
+
|
| 104 |
+
instance idealSubmodule_closed : IsClosed (J.idealSubmodule : Set D) := by
|
| 105 |
+
have he : (J.idealSubmodule : Set D) = (J.ideal : Set D) := by
|
| 106 |
+
ext u
|
| 107 |
+
change J.ideal.ringCon.mk' u = J.ideal.ringCon.mk' 0 ↔ u ∈ J.ideal
|
| 108 |
+
exact Quotient.eq
|
| 109 |
+
rw [he]
|
| 110 |
+
exact J.isClosed
|
| 111 |
+
|
| 112 |
+
def quotientLinearEquiv :
|
| 113 |
+
(D ⧸ J.idealSubmodule) ≃ₗ[ℂ] J.Quotient :=
|
| 114 |
+
(J.quotientMap).toLinearMap.quotKerEquivOfSurjective ((J.ideal.ringCon.mkₐ_surjective (α := ℂ)))
|
| 115 |
+
|
| 116 |
+
instance quotientNormedAddCommGroup : NormedAddCommGroup (J.Quotient) :=
|
| 117 |
+
NormedAddCommGroup.induced _ _ (J.quotientLinearEquiv).symm
|
| 118 |
+
(J.quotientLinearEquiv).symm.injective
|
| 119 |
+
|
| 120 |
+
instance quotientNormedSpace : NormedSpace ℂ (J.Quotient) :=
|
| 121 |
+
NormedSpace.induced ℂ _ _ (J.quotientLinearEquiv).symm
|
| 122 |
+
|
| 123 |
+
def quotientNormEquiv : J.Quotient ≃ₗᵢ[ℂ]
|
| 124 |
+
(D ⧸ J.idealSubmodule) where
|
| 125 |
+
__ := (J.quotientLinearEquiv).symm
|
| 126 |
+
norm_map' _ := rfl
|
| 127 |
+
|
| 128 |
+
instance quotientCompleteSpace : CompleteSpace (J.Quotient) :=
|
| 129 |
+
(J.quotientNormEquiv).toIsometryEquiv.completeSpace_iff.mpr inferInstance
|
| 130 |
+
|
| 131 |
+
class NormConstruction : Prop where
|
| 132 |
+
mul_le : ∀ {D : Type} [CStarAlgebra D] (J : ClosedStarIdeal D) (x y : J.Quotient),
|
| 133 |
+
‖x*y‖ ≤ ‖x‖*‖y‖
|
| 134 |
+
star_eq : ∀ {D : Type} [CStarAlgebra D] (J : ClosedStarIdeal D) (x : J.Quotient),
|
| 135 |
+
‖star x‖ = ‖x‖
|
| 136 |
+
square_le : ∀ {D : Type} [CStarAlgebra D] [PartialOrder D] [StarOrderedRing D]
|
| 137 |
+
(J : ClosedStarIdeal D) (x : J.Quotient), ‖x‖ * ‖x‖ ≤ ‖star x * x‖
|
| 138 |
+
|
| 139 |
+
variable [ComparatorModel.Pureness.ClosedStarIdeal.NormConstruction]
|
| 140 |
+
|
| 141 |
+
instance quotientNormedRing : NormedRing (J.Quotient) where
|
| 142 |
+
dist_eq := dist_eq_norm_neg_add
|
| 143 |
+
norm_mul_le := NormConstruction.mul_le J
|
| 144 |
+
|
| 145 |
+
instance quotientNormedAlgebra : NormedAlgebra ℂ (J.Quotient) where
|
| 146 |
+
norm_smul_le := norm_smul_le
|
| 147 |
+
|
| 148 |
+
instance quotientNormedStarGroup : NormedStarGroup (J.Quotient) where
|
| 149 |
+
norm_star_le x := (NormConstruction.star_eq J x).le
|
| 150 |
+
|
| 151 |
+
end
|
| 152 |
+
|
| 153 |
+
open Filter
|
| 154 |
+
|
| 155 |
+
open scoped Topology NNReal ENNReal
|
| 156 |
+
|
| 157 |
+
variable {D : Type} [CStarAlgebra D] [PartialOrder D] [StarOrderedRing D]
|
| 158 |
+
|
| 159 |
+
variable (J : ClosedStarIdeal D)
|
| 160 |
+
|
| 161 |
+
variable [ComparatorModel.Pureness.ClosedStarIdeal.NormConstruction]
|
| 162 |
+
|
| 163 |
+
instance quotientCStarAlgebra : CStarAlgebra (J.Quotient) where
|
| 164 |
+
norm_mul_self_le := NormConstruction.square_le J
|
| 165 |
+
|
| 166 |
+
end Pureness.ClosedStarIdeal
|
| 167 |
+
|
| 168 |
+
end
|
| 169 |
+
|
| 170 |
+
section
|
| 171 |
+
|
| 172 |
+
open _root_.OAI.ComparatorModel.Pureness
|
| 173 |
+
|
| 174 |
+
section UniformTraceNorm
|
| 175 |
+
|
| 176 |
+
variable {D : Type} {I : Type} [CStarAlgebra D] [PartialOrder D] [StarOrderedRing D]
|
| 177 |
+
|
| 178 |
+
variable (τ : I → TracialState D) [Nonempty I]
|
| 179 |
+
|
| 180 |
+
variable [ComparatorModel.Pureness.ClosedStarIdeal.NormConstruction]
|
| 181 |
+
|
| 182 |
+
def CurrentMain.familyTwoNorm (a : D) : ℝ := ⨆ i, traceTwoNorm (τ i) a
|
| 183 |
+
|
| 184 |
+
end UniformTraceNorm
|
| 185 |
+
|
| 186 |
+
open _root_.OAI.ComparatorModel.Pureness Filter
|
| 187 |
+
|
| 188 |
+
open scoped Topology NNReal ENNReal
|
| 189 |
+
|
| 190 |
+
variable [ComparatorModel.Pureness.ClosedStarIdeal.NormConstruction]
|
| 191 |
+
|
| 192 |
+
instance CurrentMain.boundedFamilyProductCStar {X : Type} {D : Type} [CStarAlgebra D] [Nontrivial D] :
|
| 193 |
+
CStarAlgebra (lp (fun _ : X => D) ∞) where
|
| 194 |
+
|
| 195 |
+
section UniformNull
|
| 196 |
+
|
| 197 |
+
variable {D : Type} {I : Type} {X : Type} [CStarAlgebra D] [PartialOrder D] [StarOrderedRing D]
|
| 198 |
+
|
| 199 |
+
variable (τ : I → TracialState D) [Nonempty I]
|
| 200 |
+
|
| 201 |
+
def CurrentMain.IsFamilyNull (F : Filter X) (u : X → D) : Prop :=
|
| 202 |
+
Tendsto (fun n => familyTwoNorm τ (u n)) F (𝓝 0)
|
| 203 |
+
|
| 204 |
+
class CurrentMain.NullConstruction : Prop where
|
| 205 |
+
zero : ∀ {D I X : Type} [CStarAlgebra D] [PartialOrder D] [StarOrderedRing D] (τ : I → Pureness.TracialState D) [Nonempty I]
|
| 206 |
+
(F : Filter X), IsFamilyNull τ F (fun _ => 0)
|
| 207 |
+
add : ∀ {D I X : Type} [CStarAlgebra D] [PartialOrder D] [StarOrderedRing D] (τ : I → Pureness.TracialState D) [Nonempty I]
|
| 208 |
+
{F : Filter X} {u v : X → D}, IsFamilyNull τ F u → IsFamilyNull τ F v →
|
| 209 |
+
IsFamilyNull τ F (fun n => u n + v n)
|
| 210 |
+
neg : ∀ {D I X : Type} [CStarAlgebra D] [PartialOrder D] [StarOrderedRing D] (τ : I → Pureness.TracialState D) [Nonempty I]
|
| 211 |
+
{F : Filter X} {u : X → D}, IsFamilyNull τ F u → IsFamilyNull τ F (fun n => -u n)
|
| 212 |
+
star : ∀ {D I X : Type} [CStarAlgebra D] [PartialOrder D] [StarOrderedRing D] (τ : I → Pureness.TracialState D) [Nonempty I]
|
| 213 |
+
{F : Filter X} {u : X → D}, IsFamilyNull τ F u → IsFamilyNull τ F (fun n => star (u n))
|
| 214 |
+
mul_left : ∀ {D I X : Type} [CStarAlgebra D] [PartialOrder D] [StarOrderedRing D] (τ : I → Pureness.TracialState D) [Nonempty I]
|
| 215 |
+
{F : Filter X} {u v : X → D}, IsFamilyNull τ F v → ∀ {M : ℝ},
|
| 216 |
+
(∀ n, ‖u n‖ ≤ M) → IsFamilyNull τ F (fun n => u n * v n)
|
| 217 |
+
mul_right : ∀ {D I X : Type} [CStarAlgebra D] [PartialOrder D] [StarOrderedRing D] (τ : I → Pureness.TracialState D) [Nonempty I]
|
| 218 |
+
{F : Filter X} {u v : X → D}, IsFamilyNull τ F u → ∀ {M : ℝ},
|
| 219 |
+
(∀ n, ‖v n‖ ≤ M) → IsFamilyNull τ F (fun n => u n * v n)
|
| 220 |
+
closed : ∀ {D I X : Type} [CStarAlgebra D] [PartialOrder D] [StarOrderedRing D] (τ : I → Pureness.TracialState D) [Nonempty I] (F : Filter X),
|
| 221 |
+
IsClosed {u : lp (fun _ : X => D) ∞ | IsFamilyNull τ F (fun n => u n)}
|
| 222 |
+
|
| 223 |
+
variable [Nontrivial D]
|
| 224 |
+
|
| 225 |
+
variable [ComparatorModel.CurrentMain.NullConstruction]
|
| 226 |
+
|
| 227 |
+
def CurrentMain.familyNullTwoSided (F : Filter X) : TwoSidedIdeal (lp (fun _ : X => D) ∞) :=
|
| 228 |
+
TwoSidedIdeal.mk' {u | IsFamilyNull τ F (fun n => u n)}
|
| 229 |
+
(NullConstruction.zero τ F)
|
| 230 |
+
(fun hu hv => NullConstruction.add τ hu hv)
|
| 231 |
+
(fun hu => NullConstruction.neg τ hu)
|
| 232 |
+
(fun {u _} hv => NullConstruction.mul_left τ hv
|
| 233 |
+
(lp.norm_apply_le_norm ENNReal.top_ne_zero u))
|
| 234 |
+
(fun {_ v} hu => NullConstruction.mul_right τ hu
|
| 235 |
+
(lp.norm_apply_le_norm ENNReal.top_ne_zero v))
|
| 236 |
+
|
| 237 |
+
def CurrentMain.familyNullIdeal (F : Filter X) : ClosedStarIdeal (lp (fun _ : X => D) ∞) where
|
| 238 |
+
ideal := familyNullTwoSided τ F
|
| 239 |
+
star_mem := by
|
| 240 |
+
intro u hu
|
| 241 |
+
apply (TwoSidedIdeal.mem_mk' _ _ _ _ _ _ (star u)).mpr
|
| 242 |
+
exact NullConstruction.star τ ((TwoSidedIdeal.mem_mk' _ _ _ _ _ _ u).mp hu)
|
| 243 |
+
isClosed := by
|
| 244 |
+
have he : (familyNullTwoSided τ F : Set (lp (fun _ : X => D) ∞)) =
|
| 245 |
+
{u | IsFamilyNull τ F (fun n => u n)} := by
|
| 246 |
+
ext u
|
| 247 |
+
exact TwoSidedIdeal.mem_mk' _ _ _ _ _ _ u
|
| 248 |
+
rw [he]
|
| 249 |
+
exact NullConstruction.closed τ F
|
| 250 |
+
|
| 251 |
+
end UniformNull
|
| 252 |
+
|
| 253 |
+
variable {D : Type} {I : Type} [CStarAlgebra D] [PartialOrder D] [StarOrderedRing D]
|
| 254 |
+
|
| 255 |
+
variable (τ : I → TracialState D) [Nonempty I]
|
| 256 |
+
|
| 257 |
+
variable [ComparatorModel.CurrentMain.NullConstruction]
|
| 258 |
+
|
| 259 |
+
def CurrentMain.IsFamilyCauchy (u : ℕ → D) : Prop :=
|
| 260 |
+
IsFamilyNull τ (atTop : Filter (ℕ × ℕ)) (fun p => u p.1 - u p.2)
|
| 261 |
+
|
| 262 |
+
class CurrentMain.CauchyConstruction : Prop where
|
| 263 |
+
const : ∀ {D I : Type} [CStarAlgebra D] [PartialOrder D] [StarOrderedRing D]
|
| 264 |
+
(τ : I → Pureness.TracialState D) [Nonempty I] (a : D), IsFamilyCauchy τ (fun _ => a)
|
| 265 |
+
add : ∀ {D I : Type} [CStarAlgebra D] [PartialOrder D] [StarOrderedRing D]
|
| 266 |
+
(τ : I → Pureness.TracialState D) [Nonempty I] {u v : ℕ → D},
|
| 267 |
+
IsFamilyCauchy τ u → IsFamilyCauchy τ v → IsFamilyCauchy τ (fun n => u n+v n)
|
| 268 |
+
star : ∀ {D I : Type} [CStarAlgebra D] [PartialOrder D] [StarOrderedRing D]
|
| 269 |
+
(τ : I → Pureness.TracialState D) [Nonempty I] {u : ℕ → D},
|
| 270 |
+
IsFamilyCauchy τ u → IsFamilyCauchy τ (fun n => star (u n))
|
| 271 |
+
mul : ∀ {D I : Type} [CStarAlgebra D] [PartialOrder D] [StarOrderedRing D]
|
| 272 |
+
(τ : I → Pureness.TracialState D) [Nonempty I] {u v : ℕ → D},
|
| 273 |
+
IsFamilyCauchy τ u → IsFamilyCauchy τ v → ∀ {M N : ℝ},
|
| 274 |
+
(∀ n, ‖u n‖ ≤ M) → (∀ n, ‖v n‖ ≤ N) → IsFamilyCauchy τ (fun n => u n*v n)
|
| 275 |
+
closed : ∀ {D I : Type} [CStarAlgebra D] [PartialOrder D] [StarOrderedRing D]
|
| 276 |
+
(τ : I → Pureness.TracialState D) [Nonempty I] [Nontrivial D],
|
| 277 |
+
IsClosed {u : lp (fun _ : ℕ => D) ∞ | IsFamilyCauchy τ (fun n => u n)}
|
| 278 |
+
|
| 279 |
+
variable [Nontrivial D]
|
| 280 |
+
|
| 281 |
+
variable [ComparatorModel.CurrentMain.CauchyConstruction]
|
| 282 |
+
|
| 283 |
+
def CurrentMain.familyCauchyAlgebra : StarSubalgebra ℂ (lp (fun _ : ℕ => D) ∞) where
|
| 284 |
+
carrier := {u | IsFamilyCauchy τ (fun n => u n)}
|
| 285 |
+
zero_mem' := CauchyConstruction.const τ 0
|
| 286 |
+
one_mem' := CauchyConstruction.const τ 1
|
| 287 |
+
add_mem' hu hv := CauchyConstruction.add τ hu hv
|
| 288 |
+
mul_mem' {u v} hu hv := CauchyConstruction.mul τ hu hv
|
| 289 |
+
(lp.norm_apply_le_norm ENNReal.top_ne_zero u)
|
| 290 |
+
(lp.norm_apply_le_norm ENNReal.top_ne_zero v)
|
| 291 |
+
algebraMap_mem' z := CauchyConstruction.const τ (algebraMap ℂ D z)
|
| 292 |
+
star_mem' hu := CauchyConstruction.star τ hu
|
| 293 |
+
|
| 294 |
+
instance CurrentMain.familyCauchy_complete : CompleteSpace (familyCauchyAlgebra τ) :=
|
| 295 |
+
(CauchyConstruction.closed τ).completeSpace_coe
|
| 296 |
+
|
| 297 |
+
instance CurrentMain.familyCauchy_cstar : CStarAlgebra (familyCauchyAlgebra τ) where
|
| 298 |
+
|
| 299 |
+
def CurrentMain.familyCauchyNullIdeal : ClosedStarIdeal (familyCauchyAlgebra τ) where
|
| 300 |
+
ideal := TwoSidedIdeal.comap (familyCauchyAlgebra τ).val.toRingHom
|
| 301 |
+
(familyNullIdeal τ atTop).ideal
|
| 302 |
+
star_mem := by
|
| 303 |
+
intro u hu
|
| 304 |
+
apply (familyNullIdeal τ atTop).star_mem hu
|
| 305 |
+
isClosed := by
|
| 306 |
+
exact (familyNullIdeal τ atTop).isClosed.preimage
|
| 307 |
+
(continuous_subtype_val : Continuous (fun u : familyCauchyAlgebra τ => u.1))
|
| 308 |
+
|
| 309 |
+
abbrev CurrentMain.UniformTracialCompletion := (familyCauchyNullIdeal τ).Quotient
|
| 310 |
+
|
| 311 |
+
end
|
| 312 |
+
|
| 313 |
+
section
|
| 314 |
+
|
| 315 |
+
open scoped ComplexOrder
|
| 316 |
+
|
| 317 |
+
variable {D : Type} [CStarAlgebra D] [PartialOrder D] [StarOrderedRing D]
|
| 318 |
+
|
| 319 |
+
variable [ComparatorModel.Pureness.ClosedStarIdeal.NormConstruction] [ComparatorModel.CurrentMain.NullConstruction] [ComparatorModel.CurrentMain.CauchyConstruction]
|
| 320 |
+
|
| 321 |
+
instance Pureness.ClosedStarIdeal.quotientOrder (J : ClosedStarIdeal D) : PartialOrder J.Quotient :=
|
| 322 |
+
CStarAlgebra.spectralOrder _
|
| 323 |
+
|
| 324 |
+
instance Pureness.ClosedStarIdeal.quotientStarOrdered (J : ClosedStarIdeal D) : StarOrderedRing J.Quotient :=
|
| 325 |
+
CStarAlgebra.spectralOrderedRing _
|
| 326 |
+
|
| 327 |
+
variable (J : Pureness.ClosedStarIdeal D)
|
| 328 |
+
|
| 329 |
+
variable (τ : Pureness.TracialState D) (hτ : ∀ a ∈ J.ideal, τ.functional a = 0)
|
| 330 |
+
|
| 331 |
+
def Pureness.ClosedStarIdeal.descendedValue : J.Quotient → ℂ := Quotient.lift τ.functional (by
|
| 332 |
+
intro u v huv
|
| 333 |
+
change J.ideal.ringCon u v at huv
|
| 334 |
+
rw [TwoSidedIdeal.rel_iff] at huv
|
| 335 |
+
have h := hτ (u-v) huv
|
| 336 |
+
rw [map_sub, sub_eq_zero] at h
|
| 337 |
+
exact h)
|
| 338 |
+
|
| 339 |
+
def Pureness.ClosedStarIdeal.descendedLinear : J.Quotient →ₗ[ℂ] ℂ where
|
| 340 |
+
toFun := J.descendedValue τ hτ
|
| 341 |
+
map_add' x y := Quotient.inductionOn₂' x y (fun u v => τ.functional.map_add u v)
|
| 342 |
+
map_smul' c x := Quotient.inductionOn' x (fun u => τ.functional.map_smul c u)
|
| 343 |
+
|
| 344 |
+
def Pureness.ClosedStarIdeal.descendedTrace : TracialState J.Quotient where
|
| 345 |
+
functional := { J.descendedLinear τ hτ with
|
| 346 |
+
monotone' := by
|
| 347 |
+
intro x y hxy
|
| 348 |
+
apply sub_nonneg.mp
|
| 349 |
+
change 0 ≤ J.descendedLinear τ hτ y - J.descendedLinear τ hτ x
|
| 350 |
+
rw [← map_sub]
|
| 351 |
+
obtain ⟨z,hz⟩ := CStarAlgebra.nonneg_iff_eq_star_mul_self.mp (sub_nonneg.mpr hxy)
|
| 352 |
+
rw [hz]
|
| 353 |
+
induction z using Quotient.inductionOn' with
|
| 354 |
+
| h u => exact τ.functional.map_nonneg (star_mul_self_nonneg u) }
|
| 355 |
+
normalized := τ.normalized
|
| 356 |
+
tracial x y := Quotient.inductionOn₂' x y (fun u v => τ.tracial u v)
|
| 357 |
+
|
| 358 |
+
end
|
| 359 |
+
|
| 360 |
+
section
|
| 361 |
+
|
| 362 |
+
open _root_.OAI.ComparatorModel.Pureness Filter
|
| 363 |
+
|
| 364 |
+
open scoped Topology NNReal ENNReal ComplexOrder
|
| 365 |
+
|
| 366 |
+
section UltraTrace
|
| 367 |
+
|
| 368 |
+
variable {D : Type} {X : Type} [CStarAlgebra D] [PartialOrder D] [StarOrderedRing D] [Nontrivial D]
|
| 369 |
+
|
| 370 |
+
variable (θ : X → TracialState D) (U : Ultrafilter X)
|
| 371 |
+
|
| 372 |
+
variable [ComparatorModel.Pureness.ClosedStarIdeal.NormConstruction] [ComparatorModel.CurrentMain.NullConstruction] [ComparatorModel.CurrentMain.CauchyConstruction]
|
| 373 |
+
|
| 374 |
+
instance CurrentMain.boundedFamilyProductOrder : PartialOrder (lp (fun _ : X => D) ∞) :=
|
| 375 |
+
CStarAlgebra.spectralOrder _
|
| 376 |
+
|
| 377 |
+
instance CurrentMain.boundedFamilyProductStarOrdered : StarOrderedRing (lp (fun _ : X => D) ∞) :=
|
| 378 |
+
CStarAlgebra.spectralOrderedRing _
|
| 379 |
+
|
| 380 |
+
def CurrentMain.ultraTraceValue (u : lp (fun _ : X => D) ∞) : ℂ :=
|
| 381 |
+
limUnder (U : Filter X) (fun n => (θ n).functional (u n))
|
| 382 |
+
|
| 383 |
+
class CurrentMain.LimitConstruction : Prop where
|
| 384 |
+
tendsto : ∀ {D X : Type} [CStarAlgebra D] [PartialOrder D] [StarOrderedRing D]
|
| 385 |
+
(θ : X ��� Pureness.TracialState D) (U : Ultrafilter X) (u : lp (fun _ : X => D) ∞),
|
| 386 |
+
Tendsto (fun n => (θ n).functional (u n)) (U : Filter X) (𝓝 (ultraTraceValue θ U u))
|
| 387 |
+
|
| 388 |
+
variable [ComparatorModel.CurrentMain.LimitConstruction]
|
| 389 |
+
|
| 390 |
+
def CurrentMain.ultraTraceLinear : lp (fun _ : X => D) ∞ →ₗ[ℂ] ℂ where
|
| 391 |
+
toFun := ultraTraceValue θ U
|
| 392 |
+
map_add' u v := by
|
| 393 |
+
apply tendsto_nhds_unique (LimitConstruction.tendsto θ U (u+v))
|
| 394 |
+
simpa only [lp.coeFn_add, Pi.add_apply, map_add] using
|
| 395 |
+
(LimitConstruction.tendsto θ U u).add (LimitConstruction.tendsto θ U v)
|
| 396 |
+
map_smul' z u := by
|
| 397 |
+
apply tendsto_nhds_unique (LimitConstruction.tendsto θ U (z • u))
|
| 398 |
+
simpa only [lp.coeFn_smul, Pi.smul_apply, map_smul, RingHom.id_apply, smul_eq_mul] using
|
| 399 |
+
(LimitConstruction.tendsto θ U u).const_mul z
|
| 400 |
+
|
| 401 |
+
def CurrentMain.boundedFamilyEval (n : X) : lp (fun _ : X => D) ∞ →⋆ₐ[ℂ] D where
|
| 402 |
+
toFun u := u n
|
| 403 |
+
map_zero' := rfl
|
| 404 |
+
map_one' := rfl
|
| 405 |
+
map_add' _ _ := rfl
|
| 406 |
+
map_mul' _ _ := rfl
|
| 407 |
+
commutes' _ := rfl
|
| 408 |
+
map_star' _ := rfl
|
| 409 |
+
|
| 410 |
+
def CurrentMain.ultraTrace : TracialState (lp (fun _ : X => D) ∞) where
|
| 411 |
+
functional := { ultraTraceLinear θ U with
|
| 412 |
+
monotone' := by
|
| 413 |
+
intro u v huv
|
| 414 |
+
exact le_of_tendsto_of_tendsto (LimitConstruction.tendsto θ U u)
|
| 415 |
+
(LimitConstruction.tendsto θ U v) (Eventually.of_forall (fun n =>
|
| 416 |
+
(θ n).functional.monotone (map_rel (boundedFamilyEval n) huv))) }
|
| 417 |
+
normalized := by
|
| 418 |
+
apply tendsto_nhds_unique (LimitConstruction.tendsto θ U 1)
|
| 419 |
+
have he (n : X) : (θ n).functional ((1 : lp (fun _ : X => D) ∞) n) = 1 :=
|
| 420 |
+
(θ n).normalized
|
| 421 |
+
simp only [he]
|
| 422 |
+
exact tendsto_const_nhds
|
| 423 |
+
tracial u v := by
|
| 424 |
+
change ultraTraceValue θ U (u*v) = ultraTraceValue θ U (v*u)
|
| 425 |
+
apply tendsto_nhds_unique (LimitConstruction.tendsto θ U (u*v))
|
| 426 |
+
have he (n : X) : (θ n).functional ((u*v) n) = (θ n).functional ((v*u) n) :=
|
| 427 |
+
(θ n).tracial (u n) (v n)
|
| 428 |
+
simpa only [he] using LimitConstruction.tendsto θ U (v*u)
|
| 429 |
+
|
| 430 |
+
end UltraTrace
|
| 431 |
+
|
| 432 |
+
section UniformQuotient
|
| 433 |
+
|
| 434 |
+
variable {D : Type} {I : Type} {X : Type} [CStarAlgebra D] [PartialOrder D] [StarOrderedRing D] [Nontrivial D]
|
| 435 |
+
|
| 436 |
+
variable (τ : I → TracialState D) [Nonempty I] (U : Ultrafilter X)
|
| 437 |
+
|
| 438 |
+
variable [ComparatorModel.Pureness.ClosedStarIdeal.NormConstruction] [ComparatorModel.CurrentMain.NullConstruction] [ComparatorModel.CurrentMain.CauchyConstruction] [ComparatorModel.CurrentMain.LimitConstruction]
|
| 439 |
+
|
| 440 |
+
abbrev CurrentMain.FamilyUltrapower := (familyNullIdeal τ (U : Filter X)).Quotient
|
| 441 |
+
|
| 442 |
+
class CurrentMain.TraceConstruction : Prop where
|
| 443 |
+
null : ∀ {D I X : Type} [CStarAlgebra D] [PartialOrder D] [StarOrderedRing D] [Nontrivial D] (τ : I → Pureness.TracialState D) [Nonempty I]
|
| 444 |
+
(U : Ultrafilter X) (s : X → I) (u : lp (fun _ : X => D) ∞),
|
| 445 |
+
IsFamilyNull τ (U : Filter X) (fun n => u n) →
|
| 446 |
+
(ultraTrace (fun n => τ (s n)) U).functional u = 0
|
| 447 |
+
|
| 448 |
+
variable [ComparatorModel.CurrentMain.TraceConstruction]
|
| 449 |
+
|
| 450 |
+
def CurrentMain.familyLimitTrace (s : X → I) : TracialState (FamilyUltrapower τ U) :=
|
| 451 |
+
(familyNullIdeal τ (U : Filter X)).descendedTrace
|
| 452 |
+
(ultraTrace (fun n => τ (s n)) U) (fun u hu => by
|
| 453 |
+
apply TraceConstruction.null τ U s u
|
| 454 |
+
have he : u ∈ familyNullTwoSided τ (U : Filter X) ↔
|
| 455 |
+
IsFamilyNull τ (U : Filter X) (fun n => u n) := by
|
| 456 |
+
unfold familyNullTwoSided
|
| 457 |
+
exact TwoSidedIdeal.mem_mk' _ _ _ _ _ _ u
|
| 458 |
+
exact he.mp hu)
|
| 459 |
+
|
| 460 |
+
end UniformQuotient
|
| 461 |
+
|
| 462 |
+
section PullbackTrace
|
| 463 |
+
|
| 464 |
+
variable {D : Type} {E : Type} [CStarAlgebra D] [PartialOrder D] [StarOrderedRing D]
|
| 465 |
+
|
| 466 |
+
variable [CStarAlgebra E] [PartialOrder E] [StarOrderedRing E]
|
| 467 |
+
|
| 468 |
+
variable [ComparatorModel.Pureness.ClosedStarIdeal.NormConstruction] [ComparatorModel.CurrentMain.NullConstruction] [ComparatorModel.CurrentMain.CauchyConstruction] [ComparatorModel.CurrentMain.LimitConstruction] [ComparatorModel.CurrentMain.TraceConstruction]
|
| 469 |
+
|
| 470 |
+
def CurrentMain.pullbackTrace (τ : TracialState E) (ι : D →⋆ₐ[ℂ] E) : TracialState D where
|
| 471 |
+
functional := { τ.functional.toLinearMap.comp ι.toLinearMap with
|
| 472 |
+
monotone' := fun _ _ h => τ.functional.monotone (map_rel ι h) }
|
| 473 |
+
normalized := by change τ.functional (ι 1) = 1; rw [map_one, τ.normalized]
|
| 474 |
+
tracial x y := by
|
| 475 |
+
change τ.functional (ι (x*y)) = τ.functional (ι (y*x))
|
| 476 |
+
rw [map_mul ι x y, map_mul ι y x]
|
| 477 |
+
exact τ.tracial _ _
|
| 478 |
+
|
| 479 |
+
end PullbackTrace
|
| 480 |
+
|
| 481 |
+
section CompletionTraces
|
| 482 |
+
|
| 483 |
+
variable {D : Type} {I : Type} [CStarAlgebra D] [PartialOrder D] [StarOrderedRing D]
|
| 484 |
+
|
| 485 |
+
variable [Nontrivial D] (τ : I → TracialState D) [Nonempty I]
|
| 486 |
+
|
| 487 |
+
variable [ComparatorModel.Pureness.ClosedStarIdeal.NormConstruction] [ComparatorModel.CurrentMain.NullConstruction] [ComparatorModel.CurrentMain.CauchyConstruction] [ComparatorModel.CurrentMain.LimitConstruction] [ComparatorModel.CurrentMain.TraceConstruction]
|
| 488 |
+
|
| 489 |
+
instance CurrentMain.familyCauchyOrder : PartialOrder (familyCauchyAlgebra τ) :=
|
| 490 |
+
CStarAlgebra.spectralOrder _
|
| 491 |
+
|
| 492 |
+
instance CurrentMain.familyCauchyStarOrdered : StarOrderedRing (familyCauchyAlgebra τ) :=
|
| 493 |
+
CStarAlgebra.spectralOrderedRing _
|
| 494 |
+
|
| 495 |
+
def CurrentMain.cauchyTrace (i : I) : TracialState (familyCauchyAlgebra τ) :=
|
| 496 |
+
pullbackTrace (ultraTrace (fun _ : ℕ => τ i) (Ultrafilter.of atTop))
|
| 497 |
+
(familyCauchyAlgebra τ).subtype
|
| 498 |
+
|
| 499 |
+
def CurrentMain.completionTrace (i : I) : TracialState (UniformTracialCompletion τ) :=
|
| 500 |
+
(familyCauchyNullIdeal τ).descendedTrace (cauchyTrace τ i) (fun u hu => by
|
| 501 |
+
apply TraceConstruction.null τ (Ultrafilter.of atTop) (fun _ => i) u.1
|
| 502 |
+
have he : u.1 ∈ familyNullTwoSided τ atTop ↔
|
| 503 |
+
IsFamilyNull τ atTop (fun n => u.1 n) := by
|
| 504 |
+
unfold familyNullTwoSided
|
| 505 |
+
exact TwoSidedIdeal.mem_mk' _ _ _ _ _ _ u.1
|
| 506 |
+
have hn : IsFamilyNull τ atTop (fun n => u.1 n) := he.mp hu
|
| 507 |
+
exact hn.mono_left (Ultrafilter.of_le atTop))
|
| 508 |
+
|
| 509 |
+
def CurrentMain.boundedFamilyConstant {X : Type} (a : D) : lp (fun _ : X => D) ∞ :=
|
| 510 |
+
⟨fun _ => a, memℓp_infty_iff.mpr ⟨‖a‖,by rintro _ ⟨n,rfl⟩; exact le_rfl⟩⟩
|
| 511 |
+
|
| 512 |
+
instance CurrentMain.completionNontrivial : Nontrivial (UniformTracialCompletion τ) := by
|
| 513 |
+
obtain ⟨i⟩ := ‹Nonempty I›
|
| 514 |
+
refine ⟨⟨1,0,?_⟩⟩
|
| 515 |
+
intro h
|
| 516 |
+
have he := congrArg (completionTrace τ i).functional h
|
| 517 |
+
rw [(completionTrace τ i).normalized, map_zero] at he
|
| 518 |
+
exact one_ne_zero he
|
| 519 |
+
|
| 520 |
+
end CompletionTraces
|
| 521 |
+
|
| 522 |
+
variable {D : Type} {I : Type} {X : Type} [CStarAlgebra D] [PartialOrder D] [StarOrderedRing D]
|
| 523 |
+
|
| 524 |
+
variable [Nontrivial D] (τ : I → TracialState D) [Nonempty I] (U : Ultrafilter X)
|
| 525 |
+
|
| 526 |
+
variable [ComparatorModel.Pureness.ClosedStarIdeal.NormConstruction] [ComparatorModel.CurrentMain.NullConstruction] [ComparatorModel.CurrentMain.CauchyConstruction] [ComparatorModel.CurrentMain.LimitConstruction] [ComparatorModel.CurrentMain.TraceConstruction]
|
| 527 |
+
|
| 528 |
+
def CurrentMain.familyUltrapowerMap : D →⋆ₐ[ℂ] FamilyUltrapower τ U where
|
| 529 |
+
toFun a := (familyNullIdeal τ (U : Filter X)).quotientMap (boundedFamilyConstant a)
|
| 530 |
+
map_zero' := (familyNullIdeal τ (U : Filter X)).quotientMap.map_zero
|
| 531 |
+
map_one' := (familyNullIdeal τ (U : Filter X)).quotientMap.map_one
|
| 532 |
+
map_add' a b := (familyNullIdeal τ (U : Filter X)).quotientMap.map_add
|
| 533 |
+
(boundedFamilyConstant a) (boundedFamilyConstant b)
|
| 534 |
+
map_mul' a b := (familyNullIdeal τ (U : Filter X)).quotientMap.map_mul
|
| 535 |
+
(boundedFamilyConstant a) (boundedFamilyConstant b)
|
| 536 |
+
commutes' z := (familyNullIdeal τ (U : Filter X)).quotientMap.commutes z
|
| 537 |
+
map_star' _a := rfl
|
| 538 |
+
|
| 539 |
+
end
|
| 540 |
+
|
| 541 |
+
section
|
| 542 |
+
|
| 543 |
+
open Filter Topology
|
| 544 |
+
|
| 545 |
+
variable {A : Type uA} [NormedRing A]
|
| 546 |
+
|
| 547 |
+
variable [ComparatorModel.Pureness.ClosedStarIdeal.NormConstruction] [ComparatorModel.CurrentMain.NullConstruction] [ComparatorModel.CurrentMain.CauchyConstruction] [ComparatorModel.CurrentMain.LimitConstruction] [ComparatorModel.CurrentMain.TraceConstruction]
|
| 548 |
+
|
| 549 |
+
def Pureness.TopologicallySimple (A : Type uA) [NormedRing A] : Prop :=
|
| 550 |
+
∀ I : TwoSidedIdeal A, IsClosed (I : Set A) → I = ⊥ ∨ I = ⊤
|
| 551 |
+
|
| 552 |
+
end
|
| 553 |
+
|
| 554 |
+
section
|
| 555 |
+
|
| 556 |
+
open _root_.OAI.ComparatorModel.Pureness Filter
|
| 557 |
+
|
| 558 |
+
variable [ComparatorModel.Pureness.ClosedStarIdeal.NormConstruction] [ComparatorModel.CurrentMain.NullConstruction] [ComparatorModel.CurrentMain.CauchyConstruction] [ComparatorModel.CurrentMain.LimitConstruction] [ComparatorModel.CurrentMain.TraceConstruction]
|
| 559 |
+
|
| 560 |
+
def CurrentMain.StablyFinite (A : Type uA) [CStarAlgebra A] : Prop :=
|
| 561 |
+
∀ n : ℕ, ∀ v : CStarMatrix (Fin n) (Fin n) A,
|
| 562 |
+
star v*v = 1 → v*star v = 1
|
| 563 |
+
|
| 564 |
+
def CurrentMain.UniformPropertyGammaAt (A : Type) [CStarAlgebra A]
|
| 565 |
+
[PartialOrder A] [StarOrderedRing A] [Nontrivial A]
|
| 566 |
+
[Nonempty (TracialState A)] (U : Ultrafilter ℕ) : Prop :=
|
| 567 |
+
∃ p : FamilyUltrapower (completionTrace (fun τ : TracialState A => τ)) U,
|
| 568 |
+
IsStarProjection p ∧ ∀ x : UniformTracialCompletion (fun τ : TracialState A => τ),
|
| 569 |
+
p * familyUltrapowerMap (completionTrace (fun τ : TracialState A => τ)) U x =
|
| 570 |
+
familyUltrapowerMap (completionTrace (fun τ : TracialState A => τ)) U x * p ∧
|
| 571 |
+
∀ s : ℕ → TracialState A,
|
| 572 |
+
(familyLimitTrace (completionTrace (fun τ : TracialState A => τ)) U s).functional
|
| 573 |
+
(p * familyUltrapowerMap (completionTrace (fun τ : TracialState A => τ)) U x) =
|
| 574 |
+
(1/2 : ℂ) *
|
| 575 |
+
(familyLimitTrace (completionTrace (fun τ : TracialState A => τ)) U s).functional
|
| 576 |
+
(familyUltrapowerMap (completionTrace (fun τ : TracialState A => τ)) U x)
|
| 577 |
+
|
| 578 |
+
open _root_.OAI.ComparatorModel.Pureness Filter
|
| 579 |
+
|
| 580 |
+
def CurrentMain.Statement : Prop := ∀
|
| 581 |
+
{A : Type} [CStarAlgebra A] [PartialOrder A] [StarOrderedRing A]
|
| 582 |
+
[Nontrivial A] [TopologicalSpace.SeparableSpace A]
|
| 583 |
+
(_hsimple : TopologicallySimple A) (_hinf : ¬FiniteDimensional ℂ A)
|
| 584 |
+
(_hA : IsNuclear.{0, uNuclear} A) (_hfinite : StablyFinite A)
|
| 585 |
+
[Nonempty (TracialState A)] (U : Ultrafilter ℕ)
|
| 586 |
+
(_hfree : (U : Filter ℕ) ≤ atTop)
|
| 587 |
+
(_hRR : RealRankZero (FamilyUltrapower (completionTrace (fun τ : TracialState A => τ)) U)),
|
| 588 |
+
UniformPropertyGammaAt A U
|
| 589 |
+
|
| 590 |
+
end
|
| 591 |
+
|
| 592 |
+
def CurrentMain.MainClaim : Prop :=
|
| 593 |
+
∃ h0 : ComparatorModel.Pureness.ClosedStarIdeal.NormConstruction, letI := h0;
|
| 594 |
+
∃ h1 : ComparatorModel.CurrentMain.NullConstruction, letI := h1;
|
| 595 |
+
∃ h2 : ComparatorModel.CurrentMain.CauchyConstruction, letI := h2;
|
| 596 |
+
∃ h3 : ComparatorModel.CurrentMain.LimitConstruction, letI := h3;
|
| 597 |
+
∃ h4 : ComparatorModel.CurrentMain.TraceConstruction, letI := h4;
|
| 598 |
+
Statement.{uNuclear}
|
| 599 |
+
|
| 600 |
+
theorem CurrentMain.main : MainClaim.{uNuclear} := by
|
| 601 |
+
sorry
|
| 602 |
+
|
| 603 |
+
end ComparatorModel
|
| 604 |
+
|
| 605 |
+
end
|
| 606 |
+
|
| 607 |
+
end OAI
|
lean/ComparatorChallenges/UniformKServer.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"challenge_module": "ComparatorChallenges.UniformKServer",
|
| 3 |
+
"solution_module": "OAI.Combinatorics.UniformKServer.Main",
|
| 4 |
+
"theorem_names": [
|
| 5 |
+
"OAI.UniformKServer.uniform_squared_logarithmic_main"
|
| 6 |
+
],
|
| 7 |
+
"definition_names": [],
|
| 8 |
+
"permitted_axioms": [
|
| 9 |
+
"propext",
|
| 10 |
+
"Quot.sound",
|
| 11 |
+
"Classical.choice"
|
| 12 |
+
],
|
| 13 |
+
"enable_nanoda": false
|
| 14 |
+
}
|
lean/ComparatorChallenges/UniformKServer.lean
ADDED
|
@@ -0,0 +1,205 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Mathlib
|
| 2 |
+
|
| 3 |
+
namespace OAI
|
| 4 |
+
|
| 5 |
+
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
namespace UniformKServer
|
| 11 |
+
|
| 12 |
+
structure RationalMetric (n : ℕ) where
|
| 13 |
+
distance : Fin n → Fin n → ℚ
|
| 14 |
+
nonneg : ∀ x y, 0 ≤ distance x y
|
| 15 |
+
eq_zero : ∀ x y, distance x y = 0 ↔ x = y
|
| 16 |
+
symm : ∀ x y, distance x y = distance y x
|
| 17 |
+
triangle : ∀ x y z, distance x z ≤ distance x y + distance y z
|
| 18 |
+
|
| 19 |
+
abbrev Configuration (n k : ℕ) := Fin k → Fin n
|
| 20 |
+
abbrev History (n k : ℕ) := List (Fin n × Fin k)
|
| 21 |
+
|
| 22 |
+
def serve {n k : ℕ} (s : Configuration n k) (r : Fin n) (j : Fin k) :
|
| 23 |
+
Configuration n k := Function.update s j r
|
| 24 |
+
|
| 25 |
+
def costAlong {n k : ℕ} (d : RationalMetric n) :
|
| 26 |
+
Configuration n k → History n k → ℝ
|
| 27 |
+
| _, [] => 0
|
| 28 |
+
| s, (r, j) :: h => (d.distance (s j) r : ℝ) + costAlong d (serve s r j) h
|
| 29 |
+
|
| 30 |
+
/-- All finite serving-label choices, knowing the entire request word. -/
|
| 31 |
+
noncomputable def offlineCost {n k : ℕ} (d : RationalMetric n) (s : Configuration n k)
|
| 32 |
+
(w : List (Fin n)) : ℝ :=
|
| 33 |
+
sInf {c | ∃ h : History n k, h.map Prod.fst = w ∧ c = costAlong d s h}
|
| 34 |
+
|
| 35 |
+
inductive HeadMove where
|
| 36 |
+
| left | stay | right
|
| 37 |
+
deriving DecidableEq
|
| 38 |
+
|
| 39 |
+
structure BitTape where
|
| 40 |
+
left : List (Option Bool)
|
| 41 |
+
head : Option Bool
|
| 42 |
+
right : List (Option Bool)
|
| 43 |
+
|
| 44 |
+
namespace BitTape
|
| 45 |
+
|
| 46 |
+
def blank : BitTape := ⟨[], none, []⟩
|
| 47 |
+
|
| 48 |
+
def ofWord (w : List Bool) : BitTape :=
|
| 49 |
+
match w with
|
| 50 |
+
| [] => blank
|
| 51 |
+
| b :: bs => ⟨[], some b, bs.map some⟩
|
| 52 |
+
|
| 53 |
+
def shift (T : BitTape) : HeadMove → BitTape
|
| 54 |
+
| .stay => T
|
| 55 |
+
| .left => match T.left with
|
| 56 |
+
| [] => ⟨[], none, T.head :: T.right⟩
|
| 57 |
+
| a :: as => ⟨as, a, T.head :: T.right⟩
|
| 58 |
+
| .right => match T.right with
|
| 59 |
+
| [] => ⟨T.head :: T.left, none, []⟩
|
| 60 |
+
| a :: as => ⟨T.head :: T.left, a, as⟩
|
| 61 |
+
|
| 62 |
+
end BitTape
|
| 63 |
+
|
| 64 |
+
structure BitAction (q m : ℕ) where
|
| 65 |
+
control : Fin q
|
| 66 |
+
inputMove : HeadMove
|
| 67 |
+
write : Fin m → Option Bool
|
| 68 |
+
workMove : Fin m → HeadMove
|
| 69 |
+
emit : Option Bool
|
| 70 |
+
yield : Bool
|
| 71 |
+
|
| 72 |
+
structure BitMachine where
|
| 73 |
+
controls : ℕ
|
| 74 |
+
tapes : ℕ
|
| 75 |
+
start : Fin controls
|
| 76 |
+
transition : Fin controls → Option Bool → (Fin tapes → Option Bool) →
|
| 77 |
+
Bool → BitAction controls tapes
|
| 78 |
+
|
| 79 |
+
structure MachineState (M : BitMachine) where
|
| 80 |
+
control : Fin M.controls
|
| 81 |
+
input : BitTape
|
| 82 |
+
work : Fin M.tapes → BitTape
|
| 83 |
+
outputRev : List Bool
|
| 84 |
+
yielded : Bool
|
| 85 |
+
|
| 86 |
+
namespace BitMachine
|
| 87 |
+
|
| 88 |
+
def initial (M : BitMachine) (input : List Bool) : MachineState M :=
|
| 89 |
+
⟨M.start, BitTape.ofWord input, fun _ => BitTape.blank, [], false⟩
|
| 90 |
+
|
| 91 |
+
def step (M : BitMachine) (s : MachineState M) (coin : Bool) : MachineState M :=
|
| 92 |
+
if s.yielded then s else
|
| 93 |
+
let a := M.transition s.control s.input.head (fun i => (s.work i).head) coin
|
| 94 |
+
{ control := a.control
|
| 95 |
+
input := s.input.shift a.inputMove
|
| 96 |
+
work := fun i => ({s.work i with head := a.write i}).shift (a.workMove i)
|
| 97 |
+
outputRev := match a.emit with
|
| 98 |
+
| none => s.outputRev
|
| 99 |
+
| some b => b :: s.outputRev
|
| 100 |
+
yielded := a.yield }
|
| 101 |
+
|
| 102 |
+
def run (M : BitMachine) (s : MachineState M) (coins : List Bool) : MachineState M :=
|
| 103 |
+
coins.foldl M.step s
|
| 104 |
+
|
| 105 |
+
/-- At a request boundary only the input/output interface is refreshed.
|
| 106 |
+
Work tapes and control retain the complete internal state. -/
|
| 107 |
+
def install (M : BitMachine) (s : MachineState M) (input : List Bool) : MachineState M :=
|
| 108 |
+
{s with input := BitTape.ofWord input, outputRev := [], yielded := false}
|
| 109 |
+
|
| 110 |
+
end BitMachine
|
| 111 |
+
|
| 112 |
+
/-- Self-delimiting binary code: ℓ ones, a zero, then ℓ low-to-high bits.
|
| 113 |
+
This fixes one standard binary encoding rather than allowing a nonuniform
|
| 114 |
+
advice string to be included in the input. -/
|
| 115 |
+
def natCode (a : ℕ) : List Bool :=
|
| 116 |
+
List.replicate a.bits.length true ++ [false] ++ a.bits
|
| 117 |
+
|
| 118 |
+
def rationalCode (a : ℚ) : List Bool :=
|
| 119 |
+
(a.num < 0) :: (natCode a.num.natAbs ++ natCode a.den)
|
| 120 |
+
|
| 121 |
+
def instanceCode {n k : ℕ} (d : RationalMetric n) (s : Configuration n k) : List Bool :=
|
| 122 |
+
natCode n ++ natCode k ++
|
| 123 |
+
(List.ofFn fun x : Fin n =>
|
| 124 |
+
(List.ofFn fun y : Fin n => rationalCode (d.distance x y)).flatten).flatten ++
|
| 125 |
+
(List.ofFn fun j : Fin k => natCode ((s j).val + 1)).flatten
|
| 126 |
+
|
| 127 |
+
def bitValue : List Bool → ℕ
|
| 128 |
+
| [] => 0
|
| 129 |
+
| b :: bs => (if b then 1 else 0) + 2 * bitValue bs
|
| 130 |
+
|
| 131 |
+
def outputValue {M : BitMachine} (s : MachineState M) : ℕ :=
|
| 132 |
+
bitValue s.outputRev.reverse
|
| 133 |
+
|
| 134 |
+
/-- A dominating polynomial; every fixed polynomial nonnegative on natural
|
| 135 |
+
inputs is bounded by one of this form after increasing c and e. -/
|
| 136 |
+
def polynomialBudget (c e x : ℕ) : ℕ := c * (x + 1)^e
|
| 137 |
+
|
| 138 |
+
def requestBudget (c e L t : ℕ) : ℕ :=
|
| 139 |
+
polynomialBudget c e (L + Nat.clog 2 (t + 1))
|
| 140 |
+
|
| 141 |
+
def boot {n k : ℕ} (M : BitMachine) (c e : ℕ)
|
| 142 |
+
(d : RationalMetric n) (s : Configuration n k) : MachineState M :=
|
| 143 |
+
M.run (M.initial (instanceCode d s))
|
| 144 |
+
(List.replicate (polynomialBudget c e (instanceCode d s).length) false)
|
| 145 |
+
|
| 146 |
+
def requestStep {n : ℕ} (M : BitMachine) (c e L t : ℕ)
|
| 147 |
+
(s : MachineState M) (r : Fin n)
|
| 148 |
+
(coins : Fin (requestBudget c e L t) → Bool) : MachineState M :=
|
| 149 |
+
M.run (M.install s (natCode (r.val + 1))) (List.ofFn coins)
|
| 150 |
+
|
| 151 |
+
/-- Reachability includes every binary choice, not merely an almost-sure set.
|
| 152 |
+
The index counts requests already served. -/
|
| 153 |
+
inductive Reachable {n k : ℕ} (M : BitMachine) (c e : ℕ)
|
| 154 |
+
(d : RationalMetric n) (s : Configuration n k) : ℕ → MachineState M → Prop
|
| 155 |
+
| boot : Reachable M c e d s 0 (boot M c e d s)
|
| 156 |
+
| next {t z} : Reachable M c e d s t z → (r : Fin n) →
|
| 157 |
+
(bits : Fin (requestBudget c e (instanceCode d s).length (t+1)) → Bool) →
|
| 158 |
+
Reachable M c e d s (t+1)
|
| 159 |
+
(requestStep M c e (instanceCode d s).length (t+1) z r bits)
|
| 160 |
+
|
| 161 |
+
/-- Modulo makes the semantic recursion total even for unsuccessful machines.
|
| 162 |
+
The main statement separately requires the output to be < k at *every*
|
| 163 |
+
reachable outcome, so no invalid output is accepted or silently repaired. -/
|
| 164 |
+
def selectedLabel {M : BitMachine} {k : ℕ} (hk : 0 < k) (s : MachineState M) : Fin k :=
|
| 165 |
+
⟨outputValue s % k, Nat.mod_lt _ hk⟩
|
| 166 |
+
|
| 167 |
+
noncomputable def machineExpectedCost {n k : ℕ} (M : BitMachine) (c e L : ℕ)
|
| 168 |
+
(d : RationalMetric n) (hk : 0 < k) :
|
| 169 |
+
ℕ → MachineState M → Configuration n k → List (Fin n) → ℝ
|
| 170 |
+
| _, _, _, [] => 0
|
| 171 |
+
| t, z, s, r :: w =>
|
| 172 |
+
let B := requestBudget c e L (t+1)
|
| 173 |
+
(∑ bits : Fin B → Bool,
|
| 174 |
+
let z' := requestStep M c e L (t+1) z r bits
|
| 175 |
+
let j := selectedLabel hk z'
|
| 176 |
+
(d.distance (s j) r : ℝ) +
|
| 177 |
+
machineExpectedCost M c e L d hk (t+1) z' (serve s r j) w) / (2 : ℝ)^B
|
| 178 |
+
|
| 179 |
+
/-- Full uniform main objective in the explicit bit model, not a theorem or
|
| 180 |
+
assumption. Machine transition steps are bit operations. Installing the
|
| 181 |
+
standard input and reading/erasing the output adds only O(L + budget)
|
| 182 |
+
charged bit operations, hence is absorbed by a single larger polynomial.
|
| 183 |
+
A single deterministic boot is sufficient for the source construction. -/
|
| 184 |
+
def UniformAlgorithmClaim : Prop :=
|
| 185 |
+
∃ (M : BitMachine) (c e : ℕ) (C : ℝ), 0 < c ∧ 0 < C ∧
|
| 186 |
+
∀ (n k : ℕ) (hn : 3 ≤ n) (hk : 2 ≤ k) (hkn : k < n)
|
| 187 |
+
(d : RationalMetric n) (s : Configuration n k),
|
| 188 |
+
let L := (instanceCode d s).length
|
| 189 |
+
(boot M c e d s).yielded = true ∧
|
| 190 |
+
(∀ (t : ℕ) (z : MachineState M), Reachable M c e d s t z →
|
| 191 |
+
∀ (r : Fin n) (bits : Fin (requestBudget c e L (t+1)) → Bool),
|
| 192 |
+
let z' := requestStep M c e L (t+1) z r bits
|
| 193 |
+
z'.yielded = true ∧ outputValue z' < k) ∧
|
| 194 |
+
(∃ B : ℝ, 0 ≤ B ∧ ∀ w : List (Fin n),
|
| 195 |
+
machineExpectedCost M c e L d (by omega) 0 (boot M c e d s) s w ≤
|
| 196 |
+
C * (Real.log (k + 1))^2 * offlineCost d s w + B)
|
| 197 |
+
|
| 198 |
+
/-- A single uniform randomized bit machine has squared-logarithmic expected movement
|
| 199 |
+
and a uniform polynomial bound on each request's bit operations. -/
|
| 200 |
+
theorem uniform_squared_logarithmic_main : UniformAlgorithmClaim := by
|
| 201 |
+
sorry
|
| 202 |
+
|
| 203 |
+
end UniformKServer
|
| 204 |
+
|
| 205 |
+
end OAI
|
lean/ComparatorChallenges/UniformSparsestCut.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"challenge_module": "ComparatorChallenges.UniformSparsestCut",
|
| 3 |
+
"solution_module": "OAI.Combinatorics.SparsestCut.Main",
|
| 4 |
+
"theorem_names": [
|
| 5 |
+
"OAI.UniformSparsestCut.mainGap"
|
| 6 |
+
],
|
| 7 |
+
"definition_names": [],
|
| 8 |
+
"permitted_axioms": [
|
| 9 |
+
"propext",
|
| 10 |
+
"Quot.sound",
|
| 11 |
+
"Classical.choice"
|
| 12 |
+
],
|
| 13 |
+
"enable_nanoda": false
|
| 14 |
+
}
|
lean/ComparatorChallenges/UniformSparsestCut.lean
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Mathlib
|
| 2 |
+
|
| 3 |
+
namespace OAI
|
| 4 |
+
|
| 5 |
+
noncomputable section
|
| 6 |
+
|
| 7 |
+
open scoped BigOperators
|
| 8 |
+
|
| 9 |
+
namespace UniformSparsestCut
|
| 10 |
+
|
| 11 |
+
structure Capacity (n : ℕ) where
|
| 12 |
+
cap : Fin n → Fin n → ℝ
|
| 13 |
+
nonneg : ∀ i j, 0 ≤ cap i j
|
| 14 |
+
symm : ∀ i j, cap i j = cap j i
|
| 15 |
+
diagonal : ∀ i, cap i i = 0
|
| 16 |
+
|
| 17 |
+
def pairSum {n : ℕ} (f : Fin n → Fin n → ℝ) : ℝ :=
|
| 18 |
+
∑ i, ∑ j, if i < j then f i j else 0
|
| 19 |
+
|
| 20 |
+
noncomputable def cutRatio {n : ℕ} (C : Capacity n) (B : Finset (Fin n)) : ℝ :=
|
| 21 |
+
(∑ i ∈ B, ∑ j ∈ Bᶜ, C.cap i j) /
|
| 22 |
+
((B.card : ℝ) * ((n : ℝ) - (B.card : ℝ)))
|
| 23 |
+
|
| 24 |
+
noncomputable def OPT {n : ℕ} (C : Capacity n) : ℝ :=
|
| 25 |
+
sInf {r | ∃ B : Finset (Fin n), B.Nonempty ∧ B ≠ Finset.univ ∧ r = cutRatio C B}
|
| 26 |
+
|
| 27 |
+
def NegativeType {n : ℕ} (d : Fin n → Fin n → ℝ) : Prop :=
|
| 28 |
+
(∃ x : Fin n → EuclideanSpace ℝ (Fin n), ∀ i j, d i j = ‖x i - x j‖ ^ 2) ∧
|
| 29 |
+
∀ i j k, d i k ≤ d i j + d j k
|
| 30 |
+
|
| 31 |
+
def Feasible {n : ℕ} (d : Fin n → Fin n → ℝ) : Prop :=
|
| 32 |
+
NegativeType d ∧ pairSum d = 1
|
| 33 |
+
|
| 34 |
+
noncomputable def glValue {n : ℕ} (C : Capacity n) : ℝ :=
|
| 35 |
+
sInf {r | ∃ d : Fin n → Fin n → ℝ, Feasible d ∧
|
| 36 |
+
r = pairSum (fun i j => C.cap i j * d i j)}
|
| 37 |
+
|
| 38 |
+
open Filter
|
| 39 |
+
|
| 40 |
+
theorem mainGap :
|
| 41 |
+
∃ c : ℝ, 0 < c ∧
|
| 42 |
+
∃ n : ℕ → ℕ, ∃ C : (j : ℕ) → Capacity (n j),
|
| 43 |
+
(∀ j, 2 ≤ n j) ∧
|
| 44 |
+
Tendsto n atTop atTop ∧
|
| 45 |
+
(∀ j, 0 < glValue (C j)) ∧
|
| 46 |
+
∀ᶠ j in atTop,
|
| 47 |
+
c * Real.sqrt (Real.log (n j : ℝ)) / (Real.log (Real.log (n j : ℝ))) ^ 3 ≤
|
| 48 |
+
OPT (C j) / glValue (C j) := by
|
| 49 |
+
sorry
|
| 50 |
+
|
| 51 |
+
end UniformSparsestCut
|
| 52 |
+
|
| 53 |
+
end
|
| 54 |
+
|
| 55 |
+
end OAI
|
lean/ComparatorChallenges/UniqueGamesTheorem.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"challenge_module": "ComparatorChallenges.UniqueGamesTheorem",
|
| 3 |
+
"solution_module": "OAI.Computability.UniqueGames.Main",
|
| 4 |
+
"theorem_names": [
|
| 5 |
+
"OAI.UniqueGamesTheorem.theorem11"
|
| 6 |
+
],
|
| 7 |
+
"definition_names": [],
|
| 8 |
+
"permitted_axioms": [
|
| 9 |
+
"propext",
|
| 10 |
+
"Quot.sound",
|
| 11 |
+
"Classical.choice"
|
| 12 |
+
],
|
| 13 |
+
"enable_nanoda": false
|
| 14 |
+
}
|
lean/ComparatorChallenges/UniqueGamesTheorem.lean
ADDED
|
@@ -0,0 +1,239 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Mathlib
|
| 2 |
+
|
| 3 |
+
namespace OAI
|
| 4 |
+
|
| 5 |
+
namespace UniqueGamesTheorem.Foundations.Target
|
| 6 |
+
|
| 7 |
+
/-- Finite forward and inverse tables make totality and invertibility explicit.
|
| 8 |
+
An eventual external encoding only needs to serialize the forward table. -/
|
| 9 |
+
structure PermutationTable (alphabet : Nat) where
|
| 10 |
+
images : Vector (Fin alphabet) alphabet
|
| 11 |
+
inverseImages : Vector (Fin alphabet) alphabet
|
| 12 |
+
leftInverse : ∀ label : Fin alphabet, inverseImages[images[label]] = label
|
| 13 |
+
rightInverse : ∀ label : Fin alphabet, images[inverseImages[label]] = label
|
| 14 |
+
|
| 15 |
+
structure Constraint (vertices alphabet : Nat) where
|
| 16 |
+
source : Fin vertices
|
| 17 |
+
target : Fin vertices
|
| 18 |
+
permutation : PermutationTable alphabet
|
| 19 |
+
|
| 20 |
+
def Constraint.satisfied {n q : Nat} (constraint : Constraint n q)
|
| 21 |
+
(labeling : Fin n → Fin q) : Bool :=
|
| 22 |
+
decide (constraint.permutation.images[labeling constraint.source] = labeling constraint.target)
|
| 23 |
+
|
| 24 |
+
/-- Constraint occurrences are list entries, so repeated parallel edges retain
|
| 25 |
+
their multiplicity. No weights are hidden in this representation. -/
|
| 26 |
+
structure Instance (alphabet : Nat) where
|
| 27 |
+
vertices : Nat
|
| 28 |
+
constraints : List (Constraint vertices alphabet)
|
| 29 |
+
nonempty : constraints ≠ []
|
| 30 |
+
|
| 31 |
+
def countSatisfied {n q : Nat} (labeling : Fin n → Fin q) :
|
| 32 |
+
List (Constraint n q) → Nat
|
| 33 |
+
| [] => 0
|
| 34 |
+
| constraint :: rest =>
|
| 35 |
+
(if constraint.satisfied labeling then 1 else 0) + countSatisfied labeling rest
|
| 36 |
+
|
| 37 |
+
end UniqueGamesTheorem.Foundations.Target
|
| 38 |
+
|
| 39 |
+
namespace UniqueGamesTheorem.BinaryFormula
|
| 40 |
+
|
| 41 |
+
open UniqueGamesTheorem.Foundations
|
| 42 |
+
|
| 43 |
+
structure Literal where
|
| 44 |
+
name : Nat
|
| 45 |
+
positive : Bool
|
| 46 |
+
deriving DecidableEq
|
| 47 |
+
|
| 48 |
+
def Literal.eval (literal : Literal) (assignment : Nat → Bool) : Bool :=
|
| 49 |
+
if literal.positive then assignment literal.name else !(assignment literal.name)
|
| 50 |
+
|
| 51 |
+
abbrev Clause := Vector Literal 3
|
| 52 |
+
|
| 53 |
+
def Clause.eval (clause : Clause) (assignment : Nat → Bool) : Bool :=
|
| 54 |
+
(clause[0].eval assignment || clause[1].eval assignment) || clause[2].eval assignment
|
| 55 |
+
|
| 56 |
+
/-- An ordinary conjunction of three-slot clauses with sparse variable names.
|
| 57 |
+
Repeated names and repeated literals are permitted in every clause. -/
|
| 58 |
+
structure Formula where
|
| 59 |
+
clauses : List Clause
|
| 60 |
+
|
| 61 |
+
def Formula.Satisfiable (F : Formula) : Prop :=
|
| 62 |
+
∃ assignment : Nat → Bool, ∀ clause ∈ F.clauses, clause.eval assignment = true
|
| 63 |
+
|
| 64 |
+
end UniqueGamesTheorem.BinaryFormula
|
| 65 |
+
|
| 66 |
+
namespace UniqueGamesTheorem.BinaryEncoding
|
| 67 |
+
|
| 68 |
+
open BinaryFormula
|
| 69 |
+
|
| 70 |
+
def bitsValue : List Bool → Nat
|
| 71 |
+
| [] => 0
|
| 72 |
+
| b :: bits => Nat.bit b (bitsValue bits)
|
| 73 |
+
|
| 74 |
+
def parseFrame : List Bool → Option (List Bool × List Bool)
|
| 75 |
+
| false :: rest => some ([], rest)
|
| 76 |
+
| true :: b :: rest => do
|
| 77 |
+
let (bits, trailing) ← parseFrame rest
|
| 78 |
+
return (b :: bits, trailing)
|
| 79 |
+
| _ => none
|
| 80 |
+
|
| 81 |
+
/-- Equality with the canonical digits rejects alternate padded encodings. -/
|
| 82 |
+
def parseName (input : List Bool) : Option (Nat × List Bool) := do
|
| 83 |
+
let (digits, rest) ← parseFrame input
|
| 84 |
+
let name := bitsValue digits
|
| 85 |
+
if digits = name.bits then some (name, rest) else none
|
| 86 |
+
|
| 87 |
+
def parseLiteral : List Bool → Option (Literal × List Bool)
|
| 88 |
+
| sign :: input => do
|
| 89 |
+
let (name, rest) ← parseName input
|
| 90 |
+
return (⟨name, sign⟩, rest)
|
| 91 |
+
| [] => none
|
| 92 |
+
|
| 93 |
+
def parseClause (input : List Bool) : Option (Clause × List Bool) := do
|
| 94 |
+
let (a, input) ← parseLiteral input
|
| 95 |
+
let (b, input) ← parseLiteral input
|
| 96 |
+
let (c, rest) ← parseLiteral input
|
| 97 |
+
return (#v[a, b, c], rest)
|
| 98 |
+
|
| 99 |
+
/-- Fuel bounds the number of clause iterations, not the size of any name. -/
|
| 100 |
+
def parseClauses : Nat → List Bool → Option (List Clause × List Bool)
|
| 101 |
+
| 0, _ => none
|
| 102 |
+
| _ + 1, false :: rest => some ([], rest)
|
| 103 |
+
| fuel + 1, true :: input => do
|
| 104 |
+
let (clause, input) ← parseClause input
|
| 105 |
+
let (clauses, rest) ← parseClauses fuel input
|
| 106 |
+
return (clause :: clauses, rest)
|
| 107 |
+
| _ + 1, [] => none
|
| 108 |
+
|
| 109 |
+
def decodeFormula (input : List Bool) : Option Formula := do
|
| 110 |
+
let (clauses, rest) ← parseClauses (input.length + 1) input
|
| 111 |
+
if rest = [] then some ⟨clauses⟩ else none
|
| 112 |
+
|
| 113 |
+
end UniqueGamesTheorem.BinaryEncoding
|
| 114 |
+
|
| 115 |
+
namespace UniqueGamesTheorem.BinaryLanguage
|
| 116 |
+
|
| 117 |
+
open UniqueGamesTheorem.Foundations
|
| 118 |
+
|
| 119 |
+
def language (input : List Bool) : Prop :=
|
| 120 |
+
∃ formula, BinaryEncoding.decodeFormula input = some formula ∧ formula.Satisfiable
|
| 121 |
+
|
| 122 |
+
end UniqueGamesTheorem.BinaryLanguage
|
| 123 |
+
|
| 124 |
+
namespace UniqueGamesTheorem.Integration.BinaryLinear
|
| 125 |
+
|
| 126 |
+
abbrev F2 := ZMod 2
|
| 127 |
+
|
| 128 |
+
abbrev Vector (n : Nat) := Fin n → F2
|
| 129 |
+
|
| 130 |
+
end UniqueGamesTheorem.Integration.BinaryLinear
|
| 131 |
+
|
| 132 |
+
namespace UniqueGamesTheorem.Integration.TranslationTarget
|
| 133 |
+
|
| 134 |
+
open UniqueGamesTheorem.Foundations
|
| 135 |
+
open Target
|
| 136 |
+
|
| 137 |
+
def IsTranslationInstance {q s : Nat} (coordinates : Fin q ≃ BinaryLinear.Vector s)
|
| 138 |
+
(g : Instance q) : Prop :=
|
| 139 |
+
∀ constraint ∈ g.constraints, ∃ shift : BinaryLinear.Vector s,
|
| 140 |
+
∀ label : Fin q,
|
| 141 |
+
coordinates (constraint.permutation.images[label]) = coordinates label + shift
|
| 142 |
+
|
| 143 |
+
end UniqueGamesTheorem.Integration.TranslationTarget
|
| 144 |
+
|
| 145 |
+
namespace UniqueGamesTheorem.Foundations.Complexity
|
| 146 |
+
|
| 147 |
+
def encodeWord (n : Nat) : List Bool := List.replicate n true ++ [false]
|
| 148 |
+
|
| 149 |
+
def encodeWords : List Nat → List Bool
|
| 150 |
+
| [] => []
|
| 151 |
+
| n :: ns => encodeWord n ++ encodeWords ns
|
| 152 |
+
|
| 153 |
+
end UniqueGamesTheorem.Foundations.Complexity
|
| 154 |
+
|
| 155 |
+
namespace UniqueGamesTheorem.Foundations.Complexity
|
| 156 |
+
|
| 157 |
+
open Target
|
| 158 |
+
|
| 159 |
+
def tableWords {q : Nat} (table : PermutationTable q) : List Nat :=
|
| 160 |
+
table.images.toList.map Fin.val
|
| 161 |
+
|
| 162 |
+
def constraintWords {n q : Nat} (constraint : Constraint n q) : List Nat :=
|
| 163 |
+
[constraint.source.val, constraint.target.val] ++ tableWords constraint.permutation
|
| 164 |
+
|
| 165 |
+
def gameWords {q : Nat} (game : Instance q) : List Nat :=
|
| 166 |
+
[game.vertices, q, game.constraints.length] ++ game.constraints.flatMap constraintWords
|
| 167 |
+
|
| 168 |
+
def gameBits {q : Nat} (game : Instance q) : List Bool := encodeWords (gameWords game)
|
| 169 |
+
|
| 170 |
+
end UniqueGamesTheorem.Foundations.Complexity
|
| 171 |
+
|
| 172 |
+
namespace UniqueGamesTheorem.Foundations.Complexity.MachineFiniteAlphabet
|
| 173 |
+
|
| 174 |
+
open Turing
|
| 175 |
+
|
| 176 |
+
/-- Every physical tape has a finite alphabet. Together with `M.kFin`, this
|
| 177 |
+
also makes the disjoint union of all physical tape alphabets finite. -/
|
| 178 |
+
def FiniteAlphabet (M : FinTM2) : Prop := ∀ k, Finite (M.Γ k)
|
| 179 |
+
|
| 180 |
+
end UniqueGamesTheorem.Foundations.Complexity.MachineFiniteAlphabet
|
| 181 |
+
|
| 182 |
+
namespace UniqueGamesTheorem.Explicit.MachineOutputContract
|
| 183 |
+
|
| 184 |
+
open UniqueGamesTheorem.Foundations
|
| 185 |
+
open Target
|
| 186 |
+
open scoped BigOperators
|
| 187 |
+
|
| 188 |
+
/-- A canonical orientation from the false side to the true side. Injectivity
|
| 189 |
+
is on occurrence indices, so two distinct list entries cannot be parallel even
|
| 190 |
+
when their constraint tables are different. -/
|
| 191 |
+
structure SimpleBipartite {q : Nat} (game : Instance q) where
|
| 192 |
+
side : Fin game.vertices → Bool
|
| 193 |
+
sourceSide : ∀ i : Fin game.constraints.length,
|
| 194 |
+
side game.constraints[i].source = false
|
| 195 |
+
targetSide : ∀ i : Fin game.constraints.length,
|
| 196 |
+
side game.constraints[i].target = true
|
| 197 |
+
endpoints_injective : Function.Injective (fun i : Fin game.constraints.length =>
|
| 198 |
+
(game.constraints[i].source, game.constraints[i].target))
|
| 199 |
+
|
| 200 |
+
/-- Every parameter, coordinate identification, program, and polynomial is
|
| 201 |
+
fixed before the input quantifier. The identity input encoding measures runtime
|
| 202 |
+
in the original raw bit length, including sparse binary variable names. -/
|
| 203 |
+
structure BinaryGapReduction (ε δ : ℝ) where
|
| 204 |
+
alphabet : Nat
|
| 205 |
+
alphabetAtLeastTwo : 2 ≤ alphabet
|
| 206 |
+
dimension : Nat
|
| 207 |
+
dimensionPositive : 1 ≤ dimension
|
| 208 |
+
coordinates : Fin alphabet ≃ Integration.BinaryLinear.Vector dimension
|
| 209 |
+
construct : List Bool → Instance alphabet
|
| 210 |
+
simpleBipartite : ∀ input, SimpleBipartite (construct input)
|
| 211 |
+
translations : ∀ input,
|
| 212 |
+
Integration.TranslationTarget.IsTranslationInstance coordinates (construct input)
|
| 213 |
+
computation : Turing.TM2ComputableInPolyTime (id : List Bool → List Bool)
|
| 214 |
+
Complexity.gameBits construct
|
| 215 |
+
finiteAlphabet : Complexity.MachineFiniteAlphabet.FiniteAlphabet computation.tm
|
| 216 |
+
completeness : ∀ input, BinaryLanguage.language input →
|
| 217 |
+
∃ labeling, 1 - ε ≤
|
| 218 |
+
(countSatisfied labeling (construct input).constraints : ℝ) /
|
| 219 |
+
(construct input).constraints.length
|
| 220 |
+
soundness : ∀ input, ¬BinaryLanguage.language input →
|
| 221 |
+
∀ labeling, (countSatisfied labeling (construct input).constraints : ℝ) /
|
| 222 |
+
(construct input).constraints.length ≤ δ
|
| 223 |
+
|
| 224 |
+
end UniqueGamesTheorem.Explicit.MachineOutputContract
|
| 225 |
+
|
| 226 |
+
namespace UniqueGamesTheorem
|
| 227 |
+
|
| 228 |
+
/-- For every fixed pair of errors in `(0, 1/2)`, binary 3SAT reduces in
|
| 229 |
+
polynomial time to translation Unique Games with completeness at least `1 - ε`
|
| 230 |
+
and soundness at most `δ`. The alphabet and machine depend only on the errors. -/
|
| 231 |
+
theorem theorem11 (ε δ : ℝ)
|
| 232 |
+
(hε : 0 < ε) (hεhalf : ε < 1 / 2)
|
| 233 |
+
(hδ : 0 < δ) (hδhalf : δ < 1 / 2) :
|
| 234 |
+
Nonempty (Explicit.MachineOutputContract.BinaryGapReduction ε δ) := by
|
| 235 |
+
sorry
|
| 236 |
+
|
| 237 |
+
end UniqueGamesTheorem
|
| 238 |
+
|
| 239 |
+
end OAI
|
lean/ComparatorChallenges/UniversalFInfinity.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"challenge_module": "ComparatorChallenges.UniversalFInfinity",
|
| 3 |
+
"solution_module": "OAI.GroupTheory.UniversalGroup.Main",
|
| 4 |
+
"theorem_names": [
|
| 5 |
+
"OAI.UniversalFInfinity.universal_group_of_type_FInfinity"
|
| 6 |
+
],
|
| 7 |
+
"definition_names": [],
|
| 8 |
+
"permitted_axioms": [
|
| 9 |
+
"propext",
|
| 10 |
+
"Quot.sound",
|
| 11 |
+
"Classical.choice"
|
| 12 |
+
],
|
| 13 |
+
"enable_nanoda": false
|
| 14 |
+
}
|
lean/ComparatorChallenges/UniversalFInfinity.lean
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Mathlib
|
| 2 |
+
|
| 3 |
+
namespace OAI
|
| 4 |
+
|
| 5 |
+
namespace UniversalFInfinity
|
| 6 |
+
universe u
|
| 7 |
+
|
| 8 |
+
def HasTypeFInfinity (G : Type u) [Group G] : Prop :=
|
| 9 |
+
∃ (X : Type u) (_ : TopologicalSpace X) (_ : T2Space X)
|
| 10 |
+
(_ : ConnectedSpace X) (cw : Topology.CWComplex (Set.univ : Set X)),
|
| 11 |
+
(∀ n : ℕ, Finite (cw.cell n)) ∧
|
| 12 |
+
(∃ x : X, Nonempty (FundamentalGroup X x ≃* G)) ∧
|
| 13 |
+
∃ (E : Type u) (_ : TopologicalSpace E) (_ : ContractibleSpace E)
|
| 14 |
+
(p : E → X), Function.Surjective p ∧ IsCoveringMap p
|
| 15 |
+
|
| 16 |
+
theorem universal_group_of_type_FInfinity :
|
| 17 |
+
∃ (H : Type u) (groupH : Group H),
|
| 18 |
+
@HasTypeFInfinity H groupH ∧
|
| 19 |
+
∀ (G : Type u) [Group G] [Group.IsFinitelyPresented G],
|
| 20 |
+
∃ φ : G →* H, Function.Injective φ := by
|
| 21 |
+
sorry
|
| 22 |
+
|
| 23 |
+
end UniversalFInfinity
|
| 24 |
+
|
| 25 |
+
end OAI
|
lean/ComparatorChallenges/UniversalTensorSquares.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"challenge_module": "ComparatorChallenges.UniversalTensorSquares",
|
| 3 |
+
"definition_names": [],
|
| 4 |
+
"permitted_axioms": [
|
| 5 |
+
"propext",
|
| 6 |
+
"Quot.sound",
|
| 7 |
+
"Classical.choice"
|
| 8 |
+
],
|
| 9 |
+
"solution_module": "OAI.RepresentationTheory.UniversalSquare.Main",
|
| 10 |
+
"theorem_names": [
|
| 11 |
+
"OAI.UniversalTensorSquares.universal_tensor_square"
|
| 12 |
+
]
|
| 13 |
+
}
|
lean/ComparatorChallenges/UniversalTensorSquares.lean
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Mathlib
|
| 2 |
+
|
| 3 |
+
namespace OAI
|
| 4 |
+
|
| 5 |
+
/-! Universal tensor squares of irreducible complex symmetric-group representations. -/
|
| 6 |
+
|
| 7 |
+
noncomputable section
|
| 8 |
+
|
| 9 |
+
open scoped TensorProduct
|
| 10 |
+
|
| 11 |
+
universe uG uV
|
| 12 |
+
|
| 13 |
+
namespace Saxl
|
| 14 |
+
|
| 15 |
+
abbrev WordSpace (n d : ℕ) := (Fin n → Fin d) → ℂ
|
| 16 |
+
|
| 17 |
+
def wordRep (n d : ℕ) : Representation ℂ (Equiv.Perm (Fin n)) (WordSpace n d) where
|
| 18 |
+
toFun g :=
|
| 19 |
+
{ toFun := fun f a => f (a ∘ g)
|
| 20 |
+
map_add' := by intros; rfl
|
| 21 |
+
map_smul' := by intros; rfl }
|
| 22 |
+
map_one' := by ext f a; rfl
|
| 23 |
+
map_mul' g h := by ext f a; rfl
|
| 24 |
+
|
| 25 |
+
def cyclic {G : Type uG} {V : Type uV} [Group G] [AddCommGroup V] [Module ℂ V]
|
| 26 |
+
(ρ : Representation ℂ G V) (v : V) : Subrepresentation ρ where
|
| 27 |
+
toSubmodule := Submodule.span ℂ (Set.range fun g : G => ρ g v)
|
| 28 |
+
apply_mem_toSubmodule g := by
|
| 29 |
+
intro x hx
|
| 30 |
+
induction hx using Submodule.span_induction with
|
| 31 |
+
| mem x hx =>
|
| 32 |
+
obtain ⟨h, rfl⟩ := hx
|
| 33 |
+
apply Submodule.subset_span
|
| 34 |
+
exact ⟨g * h, by simp only [map_mul, Module.End.mul_apply]⟩
|
| 35 |
+
| zero => simp
|
| 36 |
+
| add x y hx hy ihx ihy =>
|
| 37 |
+
simpa only [map_add] using Submodule.add_mem _ ihx ihy
|
| 38 |
+
| smul a x hx ih =>
|
| 39 |
+
simpa only [map_smul] using Submodule.smul_mem _ a ih
|
| 40 |
+
|
| 41 |
+
abbrev Tableau (n : ℕ) (μ : YoungDiagram) := Fin n ≃ μ.cells
|
| 42 |
+
|
| 43 |
+
def canonicalTableau {n : ℕ} (μ : YoungDiagram) (hn : μ.card = n) : Tableau n μ :=
|
| 44 |
+
(Fintype.equivFinOfCardEq (by simpa using hn)).symm
|
| 45 |
+
|
| 46 |
+
def rowWord {n : ℕ} {μ : YoungDiagram} (t : Tableau n μ) : Fin n → Fin (μ.colLen 0) :=
|
| 47 |
+
fun i => ⟨(t i).val.1, YoungDiagram.mem_iff_lt_colLen.mp
|
| 48 |
+
(μ.up_left_mem le_rfl (Nat.zero_le _) (t i).property)⟩
|
| 49 |
+
|
| 50 |
+
def columnGroup {n : ℕ} {μ : YoungDiagram} (t : Tableau n μ) :
|
| 51 |
+
Subgroup (Equiv.Perm (Fin n)) where
|
| 52 |
+
carrier := {g | ∀ i, (t (g i)).val.2 = (t i).val.2}
|
| 53 |
+
one_mem' := by intro i; rfl
|
| 54 |
+
mul_mem' := by
|
| 55 |
+
intro g h hg hh i
|
| 56 |
+
exact (hg (h i)).trans (hh i)
|
| 57 |
+
inv_mem' := by
|
| 58 |
+
intro g hg i
|
| 59 |
+
have h := hg (g⁻¹ i)
|
| 60 |
+
simpa using h.symm
|
| 61 |
+
|
| 62 |
+
def polytabloid {n : ℕ} {μ : YoungDiagram} (t : Tableau n μ) :
|
| 63 |
+
WordSpace n (μ.colLen 0) := by
|
| 64 |
+
classical
|
| 65 |
+
letI := Fintype.ofFinite (columnGroup t)
|
| 66 |
+
exact ∑ g : columnGroup t,
|
| 67 |
+
(((Equiv.Perm.sign (g : Equiv.Perm (Fin n))) : ℤ) : ℂ) •
|
| 68 |
+
wordRep n (μ.colLen 0) (g : Equiv.Perm (Fin n)) (Pi.single (rowWord t) 1)
|
| 69 |
+
|
| 70 |
+
def spechtSub {n : ℕ} {μ : YoungDiagram} (t : Tableau n μ) :=
|
| 71 |
+
cyclic (wordRep n (μ.colLen 0)) (polytabloid t)
|
| 72 |
+
|
| 73 |
+
abbrev Specht {n : ℕ} {μ : YoungDiagram} (t : Tableau n μ) :=
|
| 74 |
+
(spechtSub t).toSubmodule
|
| 75 |
+
|
| 76 |
+
def spechtRep {n : ℕ} {μ : YoungDiagram} (t : Tableau n μ) :
|
| 77 |
+
Representation ℂ (Equiv.Perm (Fin n)) (Specht t) :=
|
| 78 |
+
(spechtSub t).toRepresentation
|
| 79 |
+
|
| 80 |
+
def kronecker {n : ℕ} {α β μ : YoungDiagram}
|
| 81 |
+
(a : Tableau n α) (b : Tableau n β) (t : Tableau n μ) : ℕ :=
|
| 82 |
+
Module.finrank ℂ (Representation.IntertwiningMap (spechtRep t)
|
| 83 |
+
((spechtRep a).tprod (spechtRep b)))
|
| 84 |
+
|
| 85 |
+
end Saxl
|
| 86 |
+
|
| 87 |
+
namespace UniversalTensorSquares
|
| 88 |
+
|
| 89 |
+
universe u
|
| 90 |
+
|
| 91 |
+
theorem universal_tensor_square
|
| 92 |
+
(n : ℕ) (hn : 0 < n) (h2 : n ≠ 2) (h4 : n ≠ 4) (h9 : n ≠ 9) :
|
| 93 |
+
∃ (lam : YoungDiagram) (hlam : lam.card = n),
|
| 94 |
+
(∀ (ν : YoungDiagram) (hν : ν.card = n),
|
| 95 |
+
0 < Saxl.kronecker (Saxl.canonicalTableau lam hlam)
|
| 96 |
+
(Saxl.canonicalTableau lam hlam) (Saxl.canonicalTableau ν hν)) ∧
|
| 97 |
+
Representation.IsIrreducible (Saxl.spechtRep (Saxl.canonicalTableau lam hlam)) ∧
|
| 98 |
+
∀ (V : Type u) [AddCommGroup V] [Module ℂ V] [Module.Finite ℂ V]
|
| 99 |
+
(ρ : Representation ℂ (Equiv.Perm (Fin n)) V) [Representation.IsIrreducible ρ],
|
| 100 |
+
∃ F : Representation.IntertwiningMap ρ
|
| 101 |
+
((Saxl.spechtRep (Saxl.canonicalTableau lam hlam)).tprod
|
| 102 |
+
(Saxl.spechtRep (Saxl.canonicalTableau lam hlam))),
|
| 103 |
+
Function.Injective F := by
|
| 104 |
+
sorry
|
| 105 |
+
|
| 106 |
+
end UniversalTensorSquares
|
| 107 |
+
|
| 108 |
+
end
|
| 109 |
+
|
| 110 |
+
end OAI
|
lean/ComparatorChallenges/VariableWL.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"challenge_module": "ComparatorChallenges.VariableWL",
|
| 3 |
+
"solution_module": "OAI.Combinatorics.VariableWL.Completeness",
|
| 4 |
+
"theorem_names": [
|
| 5 |
+
"OAI.VariableWL.main"
|
| 6 |
+
],
|
| 7 |
+
"definition_names": [],
|
| 8 |
+
"permitted_axioms": [
|
| 9 |
+
"propext",
|
| 10 |
+
"Quot.sound",
|
| 11 |
+
"Classical.choice"
|
| 12 |
+
],
|
| 13 |
+
"enable_nanoda": false
|
| 14 |
+
}
|
lean/ComparatorChallenges/VariableWL.lean
ADDED
|
@@ -0,0 +1,130 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Mathlib
|
| 2 |
+
|
| 3 |
+
namespace OAI
|
| 4 |
+
|
| 5 |
+
namespace VariableWL
|
| 6 |
+
|
| 7 |
+
abbrev Word := List Bool
|
| 8 |
+
|
| 9 |
+
inductive Motion where
|
| 10 |
+
| left | stay | right
|
| 11 |
+
deriving DecidableEq
|
| 12 |
+
|
| 13 |
+
def Motion.displacement : Motion → ℤ
|
| 14 |
+
| .left => -1
|
| 15 |
+
| .stay => 0
|
| 16 |
+
| .right => 1
|
| 17 |
+
|
| 18 |
+
structure Machine where
|
| 19 |
+
states : ℕ
|
| 20 |
+
workSymbols : ℕ
|
| 21 |
+
extraTapes : ℕ
|
| 22 |
+
transition : Fin (states + 1) →
|
| 23 |
+
(Fin (extraTapes + 1) → Fin (workSymbols + 3)) →
|
| 24 |
+
Option (Fin (states + 1) ×
|
| 25 |
+
(Fin (extraTapes + 1) → Fin (workSymbols + 3) × Motion))
|
| 26 |
+
|
| 27 |
+
structure Configuration (M : Machine) where
|
| 28 |
+
control : Fin (M.states + 1)
|
| 29 |
+
heads : Fin (M.extraTapes + 1) → ℤ
|
| 30 |
+
cells : Fin (M.extraTapes + 1) → ℤ → Fin (M.workSymbols + 3)
|
| 31 |
+
|
| 32 |
+
def wordCells (a : ℕ) (w : Word) (i : ℤ) : Fin (a + 3) :=
|
| 33 |
+
if 0 ≤ i then
|
| 34 |
+
match w[i.toNat]? with
|
| 35 |
+
| none => 0
|
| 36 |
+
| some false => 1
|
| 37 |
+
| some true => 2
|
| 38 |
+
else 0
|
| 39 |
+
|
| 40 |
+
def initial (M : Machine) (w : Word) : Configuration M where
|
| 41 |
+
control := 0
|
| 42 |
+
heads := fun _ => 0
|
| 43 |
+
cells := fun j => if j = 0 then wordCells M.workSymbols w else fun _ => 0
|
| 44 |
+
|
| 45 |
+
def scanned {M : Machine} (c : Configuration M) :
|
| 46 |
+
Fin (M.extraTapes + 1) → Fin (M.workSymbols + 3) :=
|
| 47 |
+
fun j => c.cells j (c.heads j)
|
| 48 |
+
|
| 49 |
+
def step (M : Machine) (c : Configuration M) : Option (Configuration M) :=
|
| 50 |
+
(M.transition c.control (scanned c)).map fun data =>
|
| 51 |
+
{ control := data.1
|
| 52 |
+
heads := fun j => c.heads j + (data.2 j).2.displacement
|
| 53 |
+
cells := fun j i => if i = c.heads j then (data.2 j).1 else c.cells j i }
|
| 54 |
+
|
| 55 |
+
def run (M : Machine) (w : Word) : ℕ → Configuration M
|
| 56 |
+
| 0 => initial M w
|
| 57 |
+
| n + 1 => (step M (run M w n)).getD (run M w n)
|
| 58 |
+
|
| 59 |
+
def OutputsWithin (M : Machine) (w out : Word) (bound : ℕ) : Prop :=
|
| 60 |
+
∃ t ≤ bound, step M (run M w t) = none ∧
|
| 61 |
+
(run M w t).cells 0 = wordCells M.workSymbols out
|
| 62 |
+
|
| 63 |
+
abbrev Language := Set Word
|
| 64 |
+
|
| 65 |
+
def InEXPTIME (L : Language) : Prop :=
|
| 66 |
+
∃ M : Machine, ∃ c d : ℕ, ∀ w : Word,
|
| 67 |
+
∃ b : Bool, (b = true ↔ w ∈ L) ∧
|
| 68 |
+
OutputsWithin M w [b] (2 ^ (c * (w.length + 1) ^ d))
|
| 69 |
+
|
| 70 |
+
def PolytimeReduces (L R : Language) : Prop :=
|
| 71 |
+
∃ M : Machine, ∃ c d : ℕ, ∀ w : Word,
|
| 72 |
+
∃ out : Word, OutputsWithin M w out (c * (w.length + 1) ^ d) ∧
|
| 73 |
+
(w ∈ L ↔ out ∈ R)
|
| 74 |
+
|
| 75 |
+
def EXPTIMEComplete (L : Language) : Prop :=
|
| 76 |
+
InEXPTIME L ∧ ∀ R : Language, InEXPTIME R → PolytimeReduces R L
|
| 77 |
+
|
| 78 |
+
structure Graph where
|
| 79 |
+
order : ℕ
|
| 80 |
+
graph : SimpleGraph (Fin order)
|
| 81 |
+
|
| 82 |
+
abbrev Tuple (G : Graph) (k : ℕ) := Fin k → Fin G.order
|
| 83 |
+
|
| 84 |
+
def Color (k : ℕ) : ℕ → Type
|
| 85 |
+
| 0 => Fin k → Fin k → Bool × Bool
|
| 86 |
+
| s + 1 => Color k s × Multiset (Fin k → Color k s)
|
| 87 |
+
|
| 88 |
+
noncomputable def color (G : Graph) (k : ℕ) : (s : ℕ) → Tuple G k → Color k s
|
| 89 |
+
| 0, v => by
|
| 90 |
+
classical
|
| 91 |
+
exact fun i j => (decide (v i = v j), decide (G.graph.Adj (v i) (v j)))
|
| 92 |
+
| s + 1, v => (color G k s v,
|
| 93 |
+
Finset.univ.val.map (fun z => fun i => color G k s (Function.update v i z)))
|
| 94 |
+
|
| 95 |
+
noncomputable def histogram (G : Graph) (k s : ℕ) : Multiset (Color k s) :=
|
| 96 |
+
Finset.univ.val.map (color G k s)
|
| 97 |
+
|
| 98 |
+
def Equivalent (G H : Graph) (k : ℕ) : Prop :=
|
| 99 |
+
∀ s : ℕ, histogram G k s = histogram H k s
|
| 100 |
+
|
| 101 |
+
def integerCode (n : ℕ) : Word :=
|
| 102 |
+
List.replicate (Nat.bits n).length true ++ [false] ++ Nat.bits n
|
| 103 |
+
|
| 104 |
+
noncomputable def graphCode (G : Graph) : Word := by
|
| 105 |
+
classical
|
| 106 |
+
exact integerCode G.order ++
|
| 107 |
+
(List.ofFn fun i : Fin G.order =>
|
| 108 |
+
List.ofFn fun j : Fin G.order => decide (G.graph.Adj i j)).flatten
|
| 109 |
+
|
| 110 |
+
noncomputable def pairCode (G H : Graph) (k : ℕ) : Word :=
|
| 111 |
+
graphCode G ++ graphCode H ++ integerCode k
|
| 112 |
+
|
| 113 |
+
def WL : Language :=
|
| 114 |
+
{ w | ∃ G H : Graph, ∃ k : ℕ, w = pairCode G H k ∧ 2 ≤ k ∧ Equivalent G H k }
|
| 115 |
+
|
| 116 |
+
noncomputable def Subcubic (G : Graph) : Prop := by
|
| 117 |
+
classical
|
| 118 |
+
exact ∀ v : Fin G.order, G.graph.degree v ≤ 3
|
| 119 |
+
|
| 120 |
+
def SubWL : Language :=
|
| 121 |
+
{ w | ∃ G H : Graph, ∃ k : ℕ, w = pairCode G H k ∧ 2 ≤ k ∧
|
| 122 |
+
0 < G.order ∧ G.order = H.order ∧ G.graph.Connected ∧ H.graph.Connected ∧
|
| 123 |
+
Subcubic G ∧ Subcubic H ∧ Equivalent G H k }
|
| 124 |
+
|
| 125 |
+
theorem main : EXPTIMEComplete WL ∧ EXPTIMEComplete SubWL := by
|
| 126 |
+
sorry
|
| 127 |
+
|
| 128 |
+
end VariableWL
|
| 129 |
+
|
| 130 |
+
end OAI
|
lean/ComparatorChallenges/VelocityHemisphere.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"challenge_module": "ComparatorChallenges.VelocityHemisphere",
|
| 3 |
+
"solution_module": "OAI.Probability.Ballisticity.VelocityHemisphere",
|
| 4 |
+
"theorem_names": [
|
| 5 |
+
"OAI.DirectionalTransience.positive_probability_transience_velocity_hemisphere"
|
| 6 |
+
],
|
| 7 |
+
"definition_names": [],
|
| 8 |
+
"permitted_axioms": [
|
| 9 |
+
"propext",
|
| 10 |
+
"Quot.sound",
|
| 11 |
+
"Classical.choice"
|
| 12 |
+
],
|
| 13 |
+
"enable_nanoda": false
|
| 14 |
+
}
|
lean/ComparatorChallenges/VelocityHemisphere.lean
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Mathlib
|
| 2 |
+
|
| 3 |
+
namespace OAI
|
| 4 |
+
|
| 5 |
+
open MeasureTheory ProbabilityTheory Filter
|
| 6 |
+
open scoped ENNReal NNReal BigOperators Topology
|
| 7 |
+
|
| 8 |
+
namespace DirectionalTransience
|
| 9 |
+
|
| 10 |
+
abbrev Lattice (d : ℕ) := Fin d → ℤ
|
| 11 |
+
abbrev Direction (d : ℕ) := Fin d × Bool
|
| 12 |
+
abbrev Vector (d : ℕ) := Fin d → ℝ
|
| 13 |
+
abbrev Row (d : ℕ) := {p : Direction d → ℝ≥0 // ∑ e, p e = 1}
|
| 14 |
+
abbrev Environment (d : ℕ) := Lattice d → Row d
|
| 15 |
+
abbrev State (d : ℕ) := Environment d × Lattice d
|
| 16 |
+
abbrev Path (d : ℕ) := ℕ → Lattice d
|
| 17 |
+
|
| 18 |
+
def step {d : ℕ} (e : Direction d) : Lattice d :=
|
| 19 |
+
fun i => if i = e.1 then (if e.2 then 1 else -1) else 0
|
| 20 |
+
|
| 21 |
+
noncomputable def environmentLaw {d : ℕ} (ν : Measure (Row d)) :
|
| 22 |
+
Measure (Environment d) := Measure.infinitePi (fun _ => ν)
|
| 23 |
+
|
| 24 |
+
def UniformElliptic {d : ℕ} (ν : Measure (Row d)) : Prop :=
|
| 25 |
+
∃ κ : ℝ≥0, 0 < κ ∧ ∀ᵐ p ∂ν, ∀ e, κ ≤ p.1 e
|
| 26 |
+
|
| 27 |
+
lemma measurable_current_row {d : ℕ} :
|
| 28 |
+
Measurable (fun z : State d => z.1 z.2) := by
|
| 29 |
+
apply measurable_from_prod_countable_left
|
| 30 |
+
intro x
|
| 31 |
+
exact measurable_pi_apply x
|
| 32 |
+
|
| 33 |
+
noncomputable def transition {d : ℕ} : Kernel (State d) (State d) where
|
| 34 |
+
toFun z := ∑ e : Direction d,
|
| 35 |
+
((z.1 z.2).1 e : ℝ≥0∞) • Measure.dirac (z.1, z.2 + step e)
|
| 36 |
+
measurable' := by
|
| 37 |
+
apply Measure.measurable_of_measurable_coe
|
| 38 |
+
intro s hs
|
| 39 |
+
simp only [Measure.finsetSum_apply, Measure.smul_apply, smul_eq_mul]
|
| 40 |
+
apply Finset.measurable_fun_sum
|
| 41 |
+
intro e _
|
| 42 |
+
apply Measurable.mul
|
| 43 |
+
· exact (measurable_pi_apply e |>.comp
|
| 44 |
+
(measurable_subtype_coe.comp measurable_current_row)).coe_nnreal_ennreal
|
| 45 |
+
· exact (Measure.measurable_coe hs).comp
|
| 46 |
+
(Measure.measurable_dirac.comp (measurable_fst.prodMk
|
| 47 |
+
(measurable_snd.add_const (step e))))
|
| 48 |
+
|
| 49 |
+
instance transition_markov {d : ℕ} : IsMarkovKernel (transition (d := d)) where
|
| 50 |
+
isProbabilityMeasure z := by
|
| 51 |
+
constructor
|
| 52 |
+
change (∑ e : Direction d,
|
| 53 |
+
((z.1 z.2).1 e : ℝ≥0∞) • Measure.dirac (z.1, z.2 + step e)) Set.univ = 1
|
| 54 |
+
simp only [Measure.finsetSum_apply, Measure.smul_apply, Measure.dirac_apply_of_mem
|
| 55 |
+
(Set.mem_univ _), smul_eq_mul, mul_one]
|
| 56 |
+
rw [← ENNReal.ofNNReal_finsetSum, (z.1 z.2).2]
|
| 57 |
+
rfl
|
| 58 |
+
|
| 59 |
+
noncomputable def historyTransition {d : ℕ} (n : ℕ) :
|
| 60 |
+
Kernel ((i : Finset.Iic n) → State d) (State d) where
|
| 61 |
+
toFun z := transition (z ⟨n, Finset.mem_Iic.mpr le_rfl⟩)
|
| 62 |
+
measurable' := transition.measurable.comp (measurable_pi_apply _)
|
| 63 |
+
|
| 64 |
+
instance historyTransition_markov {d : ℕ} (n : ℕ) :
|
| 65 |
+
IsMarkovKernel (historyTransition (d := d) n) where
|
| 66 |
+
isProbabilityMeasure _ := transition_markov.isProbabilityMeasure _
|
| 67 |
+
|
| 68 |
+
noncomputable def initialLaw {d : ℕ} (ν : Measure (Row d)) : Measure (State d) :=
|
| 69 |
+
(environmentLaw ν).map (fun ω => (ω, (0 : Lattice d)))
|
| 70 |
+
|
| 71 |
+
noncomputable def annealedLaw {d : ℕ} (ν : Measure (Row d)) : Measure (Path d) :=
|
| 72 |
+
(@Kernel.trajMeasure (fun _ => State d) _ (initialLaw ν) (historyTransition (d := d)) _).map
|
| 73 |
+
(fun z n => (z n).2)
|
| 74 |
+
|
| 75 |
+
def dot {d : ℕ} (v ℓ : Vector d) : ℝ := ∑ i, v i * ℓ i
|
| 76 |
+
|
| 77 |
+
def realPosition {d : ℕ} (x : Lattice d) : Vector d := fun i => (x i : ℝ)
|
| 78 |
+
|
| 79 |
+
def TransientPaths {d : ℕ} (ℓ : Vector d) : Set (Path d) :=
|
| 80 |
+
{X | Tendsto (fun n => dot (realPosition (X n)) ℓ) atTop atTop}
|
| 81 |
+
|
| 82 |
+
def VelocityPaths {d : ℕ} (v : Vector d) : Set (Path d) :=
|
| 83 |
+
{X | Tendsto (fun n : ℕ => fun i => (X n i:ℝ)/(n:ℝ)) atTop (𝓝 v)}
|
| 84 |
+
|
| 85 |
+
theorem positive_probability_transience_velocity_hemisphere
|
| 86 |
+
{d : ℕ} (hd : 3 ≤ d) (ν : Measure (Row d)) [IsProbabilityMeasure ν]
|
| 87 |
+
(hue : UniformElliptic ν) (ℓ : Vector d) (hℓ : ℓ ≠ 0)
|
| 88 |
+
(hpos : 0 < annealedLaw ν (TransientPaths ℓ)) :
|
| 89 |
+
∃ v : Vector d,
|
| 90 |
+
v ≠ 0 ∧ 0 < dot v ℓ ∧ annealedLaw ν (VelocityPaths v) = 1 ∧
|
| 91 |
+
(∀ w : Vector d, annealedLaw ν (VelocityPaths w) = 1 → w = v) ∧
|
| 92 |
+
{u : Vector d | dot u u = 1 ∧ annealedLaw ν (TransientPaths u) = 1} =
|
| 93 |
+
{u : Vector d | dot u u = 1 ∧ 0 < annealedLaw ν (TransientPaths u)} ∧
|
| 94 |
+
{u : Vector d | dot u u = 1 ∧ 0 < annealedLaw ν (TransientPaths u)} =
|
| 95 |
+
{u : Vector d | dot u u = 1 ∧ 0 < dot v u} ∧
|
| 96 |
+
(∀ u : Vector d, dot u u = 1 → dot v u ≤ 0 →
|
| 97 |
+
annealedLaw ν (TransientPaths u) = 0) := by
|
| 98 |
+
sorry
|
| 99 |
+
|
| 100 |
+
end DirectionalTransience
|
| 101 |
+
|
| 102 |
+
end OAI
|
lean/ComparatorChallenges/VertexAlgebraNet.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"challenge_module": "ComparatorChallenges.VertexAlgebraNet",
|
| 3 |
+
"solution_module": "OAI.RepresentationTheory.VertexAlgebra.MinimalComparator",
|
| 4 |
+
"theorem_names": [
|
| 5 |
+
"OAI.MinimalVertex.main"
|
| 6 |
+
],
|
| 7 |
+
"definition_names": [],
|
| 8 |
+
"permitted_axioms": [
|
| 9 |
+
"propext",
|
| 10 |
+
"Quot.sound",
|
| 11 |
+
"Classical.choice"
|
| 12 |
+
],
|
| 13 |
+
"enable_nanoda": false
|
| 14 |
+
}
|
lean/ComparatorChallenges/VertexAlgebraNet.lean
ADDED
|
@@ -0,0 +1,830 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Mathlib
|
| 2 |
+
|
| 3 |
+
/-! The strongly rational unitary vertex operator algebra main result, clause (1). -/
|
| 4 |
+
|
| 5 |
+
noncomputable section
|
| 6 |
+
universe u v w
|
| 7 |
+
|
| 8 |
+
namespace OAI.StronglyRationalVOA
|
| 9 |
+
variable {V : Type u} [AddCommGroup V] [Module ℂ V]
|
| 10 |
+
|
| 11 |
+
noncomputable abbrev StateField (V : Type u) (W : Type v)
|
| 12 |
+
[AddCommGroup V] [Module ℂ V] [AddCommGroup W] [Module ℂ W] :=
|
| 13 |
+
V →ₗ[ℂ] VertexOperator ℂ W
|
| 14 |
+
|
| 15 |
+
noncomputable def mode {W : Type v} [AddCommGroup W] [Module ℂ W]
|
| 16 |
+
(Y : OAI.StronglyRationalVOA.StateField V W) (a : V) (n : ℤ) : Module.End ℂ W :=
|
| 17 |
+
VertexOperator.ncoeff (Y a) n
|
| 18 |
+
|
| 19 |
+
noncomputable def JacobiIdentity (Y : OAI.StronglyRationalVOA.StateField V V) : Prop :=
|
| 20 |
+
∀ (a b c : V) (m n k : ℤ),
|
| 21 |
+
(∑ᶠ j : ℕ, Ring.choose (m : ℂ) j •
|
| 22 |
+
OAI.StronglyRationalVOA.mode Y (OAI.StronglyRationalVOA.mode Y a (n + j) b) (m + k - j) c) =
|
| 23 |
+
∑ᶠ j : ℕ, ((-1 : ℂ) ^ j * Ring.choose (n : ℂ) j) •
|
| 24 |
+
(OAI.StronglyRationalVOA.mode Y a (m + n - j) (OAI.StronglyRationalVOA.mode Y b (k + j) c) -
|
| 25 |
+
(-1 : ℂ) ^ n • OAI.StronglyRationalVOA.mode Y b (n + k - j) (OAI.StronglyRationalVOA.mode Y a (m + j) c))
|
| 26 |
+
|
| 27 |
+
structure VertexAlgebra (V : Type u) [AddCommGroup V] [Module ℂ V] where
|
| 28 |
+
vacuum : V
|
| 29 |
+
fields : OAI.StronglyRationalVOA.StateField V V
|
| 30 |
+
vacuum_mode : ∀ (n : ℤ), OAI.StronglyRationalVOA.mode fields vacuum n = if n = -1 then 1 else 0
|
| 31 |
+
creation : ∀ a : V, OAI.StronglyRationalVOA.mode fields a (-1) vacuum = a
|
| 32 |
+
creation_truncation : ∀ (a : V) (n : ℤ), 0 ≤ n → OAI.StronglyRationalVOA.mode fields a n vacuum = 0
|
| 33 |
+
jacobi : OAI.StronglyRationalVOA.JacobiIdentity fields
|
| 34 |
+
|
| 35 |
+
end OAI.StronglyRationalVOA
|
| 36 |
+
|
| 37 |
+
namespace OAI.StronglyRationalVOA.VertexAlgebra
|
| 38 |
+
variable {V : Type u} [AddCommGroup V] [Module ℂ V]
|
| 39 |
+
variable (A : VertexAlgebra V)
|
| 40 |
+
|
| 41 |
+
noncomputable def translation : Module.End ℂ V where
|
| 42 |
+
toFun a := OAI.StronglyRationalVOA.mode A.fields a (-2) A.vacuum
|
| 43 |
+
map_add' a b := by simp [OAI.StronglyRationalVOA.mode]
|
| 44 |
+
map_smul' z a := by simp [OAI.StronglyRationalVOA.mode]
|
| 45 |
+
|
| 46 |
+
noncomputable def c2 : Submodule ℂ V :=
|
| 47 |
+
Submodule.span ℂ {x | ∃ a b : V, x = OAI.StronglyRationalVOA.mode A.fields a (-2) b}
|
| 48 |
+
|
| 49 |
+
noncomputable def C2Cofinite : Prop := FiniteDimensional ℂ (V ⧸ A.c2)
|
| 50 |
+
|
| 51 |
+
noncomputable def IsIdeal (I : Submodule ℂ V) : Prop :=
|
| 52 |
+
(∀ a : V, ∀ n : ℤ, ∀ x ∈ I, OAI.StronglyRationalVOA.mode A.fields a n x ∈ I) ∧
|
| 53 |
+
∀ x ∈ I, A.translation x ∈ I
|
| 54 |
+
|
| 55 |
+
noncomputable def IsSimple : Prop :=
|
| 56 |
+
A.vacuum ≠ 0 ∧ ∀ I : Submodule ℂ V, A.IsIdeal I → I = ⊥ ∨ I = ⊤
|
| 57 |
+
|
| 58 |
+
end OAI.StronglyRationalVOA.VertexAlgebra
|
| 59 |
+
|
| 60 |
+
namespace OAI.StronglyRationalVOA
|
| 61 |
+
variable {V : Type u} [AddCommGroup V] [Module ℂ V]
|
| 62 |
+
|
| 63 |
+
noncomputable def ModuleJacobiIdentity {W : Type v} [AddCommGroup W] [Module ℂ W]
|
| 64 |
+
(A : OAI.StronglyRationalVOA.VertexAlgebra V) (Y : OAI.StronglyRationalVOA.StateField V W) : Prop :=
|
| 65 |
+
∀ (a b : V) (c : W) (m n k : ℤ),
|
| 66 |
+
(∑ᶠ j : ℕ, Ring.choose (m : ℂ) j •
|
| 67 |
+
OAI.StronglyRationalVOA.mode Y (OAI.StronglyRationalVOA.mode A.fields a (n + j) b) (m + k - j) c) =
|
| 68 |
+
∑ᶠ j : ℕ, ((-1 : ℂ) ^ j * Ring.choose (n : ℂ) j) •
|
| 69 |
+
(OAI.StronglyRationalVOA.mode Y a (m + n - j) (OAI.StronglyRationalVOA.mode Y b (k + j) c) -
|
| 70 |
+
(-1 : ℂ) ^ n • OAI.StronglyRationalVOA.mode Y b (n + k - j) (OAI.StronglyRationalVOA.mode Y a (m + j) c))
|
| 71 |
+
|
| 72 |
+
structure WeakModule (A : OAI.StronglyRationalVOA.VertexAlgebra V) (W : Type v)
|
| 73 |
+
[AddCommGroup W] [Module ℂ W] where
|
| 74 |
+
fields : OAI.StronglyRationalVOA.StateField V W
|
| 75 |
+
vacuum_mode : ∀ n : ℤ, OAI.StronglyRationalVOA.mode fields A.vacuum n = if n = -1 then 1 else 0
|
| 76 |
+
jacobi : OAI.StronglyRationalVOA.ModuleJacobiIdentity A fields
|
| 77 |
+
|
| 78 |
+
end OAI.StronglyRationalVOA
|
| 79 |
+
|
| 80 |
+
namespace OAI.StronglyRationalVOA.WeakModule
|
| 81 |
+
variable {V : Type u} [AddCommGroup V] [Module ℂ V]
|
| 82 |
+
variable {W : Type v} [AddCommGroup W] [Module ℂ W]
|
| 83 |
+
{A : VertexAlgebra V} (M : WeakModule A W)
|
| 84 |
+
|
| 85 |
+
noncomputable def IsInvariant (I : Submodule ℂ W) : Prop :=
|
| 86 |
+
∀ a : V, ∀ n : ℤ, ∀ x ∈ I, OAI.StronglyRationalVOA.mode M.fields a n x ∈ I
|
| 87 |
+
|
| 88 |
+
noncomputable def CompletelyReducible : Prop :=
|
| 89 |
+
∀ I : Submodule ℂ W, M.IsInvariant I →
|
| 90 |
+
∃ J : Submodule ℂ W, M.IsInvariant J ∧ IsCompl I J
|
| 91 |
+
|
| 92 |
+
end OAI.StronglyRationalVOA.WeakModule
|
| 93 |
+
|
| 94 |
+
namespace OAI.StronglyRationalVOA
|
| 95 |
+
variable {V : Type u} [AddCommGroup V] [Module ℂ V]
|
| 96 |
+
|
| 97 |
+
structure CFTTypeVOA (V : Type u) [AddCommGroup V] [Module ℂ V]
|
| 98 |
+
extends OAI.StronglyRationalVOA.VertexAlgebra V where
|
| 99 |
+
conformalVector : V
|
| 100 |
+
centralCharge : ℂ
|
| 101 |
+
grade : ℕ → Submodule ℂ V
|
| 102 |
+
grading_internal : DirectSum.IsInternal grade
|
| 103 |
+
grade_finite : ∀ d, FiniteDimensional ℂ (grade d)
|
| 104 |
+
vacuum_ne_zero : vacuum ≠ 0
|
| 105 |
+
grade_zero : grade 0 = ℂ ∙ vacuum
|
| 106 |
+
conformal_mem : conformalVector ∈ grade 2
|
| 107 |
+
conformal_energy : ∀ d, ∀ a ∈ grade d,
|
| 108 |
+
OAI.StronglyRationalVOA.mode fields conformalVector 1 a = (d : ℂ) • a
|
| 109 |
+
conformal_translation : OAI.StronglyRationalVOA.mode fields conformalVector 0 = toVertexAlgebra.translation
|
| 110 |
+
translation_covariance : ∀ a : V, ∀ n : ℤ,
|
| 111 |
+
OAI.StronglyRationalVOA.mode fields (toVertexAlgebra.translation a) n =
|
| 112 |
+
(-(n : ℂ)) • OAI.StronglyRationalVOA.mode fields a (n - 1)
|
| 113 |
+
virasoro : ∀ m n : ℤ,
|
| 114 |
+
(OAI.StronglyRationalVOA.mode fields conformalVector (m + 1)).comp (OAI.StronglyRationalVOA.mode fields conformalVector (n + 1)) -
|
| 115 |
+
(OAI.StronglyRationalVOA.mode fields conformalVector (n + 1)).comp (OAI.StronglyRationalVOA.mode fields conformalVector (m + 1)) =
|
| 116 |
+
((m - n : ℤ) : ℂ) • OAI.StronglyRationalVOA.mode fields conformalVector (m + n + 1) +
|
| 117 |
+
(if m + n = 0 then (centralCharge / 12) * ((m : ℂ)^3 - m) else 0) •
|
| 118 |
+
(1 : Module.End ℂ V)
|
| 119 |
+
|
| 120 |
+
end OAI.StronglyRationalVOA
|
| 121 |
+
|
| 122 |
+
namespace OAI.StronglyRationalVOA.CFTTypeVOA
|
| 123 |
+
variable {V : Type u} [AddCommGroup V] [Module ℂ V]
|
| 124 |
+
variable (A : CFTTypeVOA V)
|
| 125 |
+
|
| 126 |
+
noncomputable def virasoroMode (m : ℤ) : Module.End ℂ V :=
|
| 127 |
+
OAI.StronglyRationalVOA.mode A.fields A.conformalVector (m + 1)
|
| 128 |
+
|
| 129 |
+
noncomputable def physicalMode (a : V) (d : ℕ) (m : ℤ) : Module.End ℂ V :=
|
| 130 |
+
OAI.StronglyRationalVOA.mode A.fields a (m + d - 1)
|
| 131 |
+
|
| 132 |
+
noncomputable def energyShift : Module.End ℂ V := 1 + A.virasoroMode 0
|
| 133 |
+
|
| 134 |
+
noncomputable def gradingEquiv : V ≃ₗ[ℂ] DirectSum ℕ (fun d => A.grade d) :=
|
| 135 |
+
(LinearEquiv.ofBijective (DirectSum.coeLinearMap A.grade) A.grading_internal).symm
|
| 136 |
+
|
| 137 |
+
noncomputable def IsAdmissible {W : Type v} [AddCommGroup W] [Module ℂ W]
|
| 138 |
+
(M : OAI.StronglyRationalVOA.WeakModule A.toVertexAlgebra W) : Prop :=
|
| 139 |
+
∃ G : ℤ → Submodule ℂ W,
|
| 140 |
+
DirectSum.IsInternal G ∧ (∀ k : ℤ, k < 0 → G k = ⊥) ∧
|
| 141 |
+
∀ d : ℕ, ∀ a ∈ A.grade d, ∀ n k : ℤ, ∀ x ∈ G k,
|
| 142 |
+
OAI.StronglyRationalVOA.mode M.fields a n x ∈ G (k + d - n - 1)
|
| 143 |
+
|
| 144 |
+
noncomputable def IsRational : Prop :=
|
| 145 |
+
∀ (W : Type v) [AddCommGroup W] [Module ℂ W]
|
| 146 |
+
(M : OAI.StronglyRationalVOA.WeakModule A.toVertexAlgebra W),
|
| 147 |
+
A.IsAdmissible M → M.CompletelyReducible
|
| 148 |
+
|
| 149 |
+
end OAI.StronglyRationalVOA.CFTTypeVOA
|
| 150 |
+
|
| 151 |
+
namespace OAI.StronglyRationalVOA.CFTTypeVOA
|
| 152 |
+
variable {V : Type u} [NormedAddCommGroup V] [InnerProductSpace ℂ V]
|
| 153 |
+
(A : CFTTypeVOA V)
|
| 154 |
+
|
| 155 |
+
noncomputable def PolynomialEnergyBound (a : V) : Prop :=
|
| 156 |
+
∃ C : ℝ, 0 < C ∧ ∃ p k : ℕ, ∀ (n : ℤ) (b : V),
|
| 157 |
+
‖OAI.StronglyRationalVOA.mode A.fields a n b‖ ≤ C * (1 + |(n : ℝ)|) ^ p * ‖(A.energyShift ^ k) b‖
|
| 158 |
+
|
| 159 |
+
noncomputable def PolynomialEnergyBounds : Prop := ∀ a : V, A.PolynomialEnergyBound a
|
| 160 |
+
|
| 161 |
+
structure UnitaryStructure where
|
| 162 |
+
pct : V →ₛₗ[starRingEnd ℂ] V
|
| 163 |
+
pct_involutive : Function.Involutive pct
|
| 164 |
+
pct_vacuum : pct A.vacuum = A.vacuum
|
| 165 |
+
pct_conformal : pct A.conformalVector = A.conformalVector
|
| 166 |
+
pct_modes : ∀ (a b : V) (n : ℤ),
|
| 167 |
+
pct (OAI.StronglyRationalVOA.mode A.fields a n b) = OAI.StronglyRationalVOA.mode A.fields (pct a) n (pct b)
|
| 168 |
+
vacuum_norm : ‖A.vacuum‖ = 1
|
| 169 |
+
invariant : ∀ d : ℕ, ∀ a ∈ A.grade d, ∀ n : ℤ, ∀ b c : V,
|
| 170 |
+
inner ℂ (OAI.StronglyRationalVOA.mode A.fields a n b) c =
|
| 171 |
+
inner ℂ b (((-1 : ℂ) ^ d) •
|
| 172 |
+
∑ j ∈ Finset.range (d + 1), ((j.factorial : ℂ)⁻¹) •
|
| 173 |
+
OAI.StronglyRationalVOA.mode A.fields ((A.virasoroMode 1 ^ j) (pct a))
|
| 174 |
+
(2 * (d : ℤ) - j - n - 2) c)
|
| 175 |
+
|
| 176 |
+
end OAI.StronglyRationalVOA.CFTTypeVOA
|
| 177 |
+
|
| 178 |
+
namespace OAI.StronglyRationalVOA.HilbertCore
|
| 179 |
+
open Filter
|
| 180 |
+
open UniformSpace
|
| 181 |
+
variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℂ V]
|
| 182 |
+
|
| 183 |
+
noncomputable def _root_.OAI.MinimalVertex.Code.StronglyRationalVOA.HilbertCore.space (V : Type*) [NormedAddCommGroup V] [InnerProductSpace ℂ V] :
|
| 184 |
+
Submodule ℂ (Completion V) :=
|
| 185 |
+
LinearMap.range (Completion.toComplₗᵢ : V →ₗᵢ[ℂ] Completion V).toLinearMap
|
| 186 |
+
|
| 187 |
+
noncomputable def _root_.OAI.MinimalVertex.Code.StronglyRationalVOA.HilbertCore.equiv (V : Type*) [NormedAddCommGroup V] [InnerProductSpace ℂ V] :
|
| 188 |
+
V ≃ₗ[ℂ] (OAI.MinimalVertex.Code.StronglyRationalVOA.HilbertCore.space V) :=
|
| 189 |
+
LinearEquiv.ofInjective (Completion.toComplₗᵢ : V →ₗᵢ[ℂ] Completion V).toLinearMap
|
| 190 |
+
(Completion.toComplₗᵢ : V →ₗᵢ[ℂ] Completion V).injective
|
| 191 |
+
|
| 192 |
+
noncomputable def _root_.OAI.MinimalVertex.Code.StronglyRationalVOA.HilbertCore.operator (T : V →ₗ[ℂ] Completion V) : Completion V →ₗ.[ℂ] Completion V where
|
| 193 |
+
domain := (OAI.MinimalVertex.Code.StronglyRationalVOA.HilbertCore.space V)
|
| 194 |
+
toFun := T.comp (OAI.MinimalVertex.Code.StronglyRationalVOA.HilbertCore.equiv V).symm.toLinearMap
|
| 195 |
+
|
| 196 |
+
end OAI.StronglyRationalVOA.HilbertCore
|
| 197 |
+
|
| 198 |
+
namespace OAI.StronglyRationalVOA
|
| 199 |
+
open Filter
|
| 200 |
+
|
| 201 |
+
noncomputable def RapidCoefficients (f : ℤ → ℂ) : Prop :=
|
| 202 |
+
∀ p : ℕ, Summable (fun n : ℤ => ‖f n‖*(1+|(n : ℝ)|)^p)
|
| 203 |
+
|
| 204 |
+
end OAI.StronglyRationalVOA
|
| 205 |
+
|
| 206 |
+
namespace OAI.StronglyRationalVOA.SummableLinearFamily
|
| 207 |
+
open Filter
|
| 208 |
+
variable {ι V H : Type*} [NormedAddCommGroup V] [NormedSpace ℂ V]
|
| 209 |
+
[NormedAddCommGroup H] [NormedSpace ℂ H]
|
| 210 |
+
|
| 211 |
+
noncomputable def tsumMap (T : ι → V →ₗ[ℂ] H) (hT : ∀ v, Summable (fun n => T n v)) : V →ₗ[ℂ] H where
|
| 212 |
+
toFun v := ∑' n, T n v
|
| 213 |
+
map_add' v w := by simpa only [map_add] using (hT v).tsum_add (hT w)
|
| 214 |
+
map_smul' z v := by
|
| 215 |
+
simpa only [map_smul, RingHom.id_apply] using (hT v).tsum_const_smul z
|
| 216 |
+
|
| 217 |
+
end OAI.StronglyRationalVOA.SummableLinearFamily
|
| 218 |
+
|
| 219 |
+
namespace OAI.StronglyRationalVOA
|
| 220 |
+
open Filter
|
| 221 |
+
open scoped ContDiff
|
| 222 |
+
|
| 223 |
+
structure SmoothCircleFunction where
|
| 224 |
+
toFun : ℝ → ℂ
|
| 225 |
+
periodic : Function.Periodic toFun (2*Real.pi)
|
| 226 |
+
smooth : ContDiff ℝ ∞ toFun
|
| 227 |
+
|
| 228 |
+
end OAI.StronglyRationalVOA
|
| 229 |
+
|
| 230 |
+
namespace OAI.StronglyRationalVOA.SmoothCircleFunction
|
| 231 |
+
open Filter
|
| 232 |
+
open scoped ContDiff
|
| 233 |
+
|
| 234 |
+
noncomputable instance : CoeFun OAI.StronglyRationalVOA.SmoothCircleFunction (fun _ => ℝ → ℂ) := ⟨OAI.StronglyRationalVOA.SmoothCircleFunction.toFun⟩
|
| 235 |
+
|
| 236 |
+
noncomputable def _root_.OAI.MinimalVertex.Code.StronglyRationalVOA.SmoothCircleFunction.coefficient (f : OAI.StronglyRationalVOA.SmoothCircleFunction) (n : ℤ) : ℂ := by
|
| 237 |
+
classical
|
| 238 |
+
have h_OAI_StronglyRationalVOA_SmoothCircleFunction_period_pos : 0 < 2*Real.pi := by positivity
|
| 239 |
+
exact
|
| 240 |
+
fourierCoeffOn h_OAI_StronglyRationalVOA_SmoothCircleFunction_period_pos f n
|
| 241 |
+
|
| 242 |
+
end OAI.StronglyRationalVOA.SmoothCircleFunction
|
| 243 |
+
|
| 244 |
+
namespace OAI.StronglyRationalVOA.ClosedGraphData
|
| 245 |
+
open Filter
|
| 246 |
+
open scoped ContDiff
|
| 247 |
+
variable {H : Type u} [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H]
|
| 248 |
+
|
| 249 |
+
noncomputable abbrev _root_.OAI.MinimalVertex.Code.StronglyRationalVOA.ClosedGraphData.Double (H : Type u) := WithLp 2 (H × H)
|
| 250 |
+
|
| 251 |
+
noncomputable def _root_.OAI.MinimalVertex.Code.StronglyRationalVOA.ClosedGraphData.graph (T : H →ₗ.[ℂ] H) : Submodule ℂ (OAI.MinimalVertex.Code.StronglyRationalVOA.ClosedGraphData.Double H) :=
|
| 252 |
+
T.graph.comap (WithLp.prodContinuousLinearEquiv 2 ℂ H H).toLinearEquiv.toLinearMap
|
| 253 |
+
|
| 254 |
+
noncomputable def _root_.OAI.MinimalVertex.Code.StronglyRationalVOA.ClosedGraphData.projection (T : H →ₗ.[ℂ] H) (hT : T.IsClosed) : (OAI.MinimalVertex.Code.StronglyRationalVOA.ClosedGraphData.Double H) →L[ℂ] (OAI.MinimalVertex.Code.StronglyRationalVOA.ClosedGraphData.Double H) := by
|
| 255 |
+
classical
|
| 256 |
+
have h_OAI_StronglyRationalVOA_ClosedGraphData_graph_closed {H : Type u} [instLocal1 : NormedAddCommGroup H] [instLocal2 : InnerProductSpace ℂ H] {T : H →ₗ.[ℂ] H} (hT : T.IsClosed) :
|
| 257 |
+
IsClosed ((OAI.MinimalVertex.Code.StronglyRationalVOA.ClosedGraphData.graph T) : Set (OAI.MinimalVertex.Code.StronglyRationalVOA.ClosedGraphData.Double H)) :=
|
| 258 |
+
hT.preimage (WithLp.prodContinuousLinearEquiv 2 ℂ H H).continuous
|
| 259 |
+
letI : IsClosed ((OAI.MinimalVertex.Code.StronglyRationalVOA.ClosedGraphData.graph T) : Set (OAI.MinimalVertex.Code.StronglyRationalVOA.ClosedGraphData.Double H)) := (h_OAI_StronglyRationalVOA_ClosedGraphData_graph_closed hT)
|
| 260 |
+
exact (OAI.MinimalVertex.Code.StronglyRationalVOA.ClosedGraphData.graph T).starProjection
|
| 261 |
+
|
| 262 |
+
noncomputable def _root_.OAI.MinimalVertex.Code.StronglyRationalVOA.ClosedGraphData.inclusion (i : Bool) : H →L[ℂ] (OAI.MinimalVertex.Code.StronglyRationalVOA.ClosedGraphData.Double H) :=
|
| 263 |
+
(WithLp.prodContinuousLinearEquiv 2 ℂ H H).symm.toContinuousLinearMap.comp
|
| 264 |
+
(if i then ContinuousLinearMap.inr ℂ H H else ContinuousLinearMap.inl ℂ H H)
|
| 265 |
+
|
| 266 |
+
noncomputable def _root_.OAI.MinimalVertex.Code.StronglyRationalVOA.ClosedGraphData.coordinate (i : Bool) : (OAI.MinimalVertex.Code.StronglyRationalVOA.ClosedGraphData.Double H) →L[ℂ] H :=
|
| 267 |
+
(if i then ContinuousLinearMap.snd ℂ H H else ContinuousLinearMap.fst ℂ H H).comp
|
| 268 |
+
(WithLp.prodContinuousLinearEquiv 2 ℂ H H).toContinuousLinearMap
|
| 269 |
+
|
| 270 |
+
noncomputable def _root_.OAI.MinimalVertex.Code.StronglyRationalVOA.ClosedGraphData.entry (T : H →ₗ.[ℂ] H) (hT : T.IsClosed) (i j : Bool) : H →L[ℂ] H :=
|
| 271 |
+
(OAI.MinimalVertex.Code.StronglyRationalVOA.ClosedGraphData.coordinate i).comp ((OAI.MinimalVertex.Code.StronglyRationalVOA.ClosedGraphData.projection T hT).comp (OAI.MinimalVertex.Code.StronglyRationalVOA.ClosedGraphData.inclusion j))
|
| 272 |
+
|
| 273 |
+
end OAI.StronglyRationalVOA.ClosedGraphData
|
| 274 |
+
|
| 275 |
+
namespace OAI.StronglyRationalVOA.LocalOperatorAlgebra
|
| 276 |
+
open Filter
|
| 277 |
+
open scoped ContDiff
|
| 278 |
+
variable {H : Type u} [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H]
|
| 279 |
+
open scoped Pointwise
|
| 280 |
+
|
| 281 |
+
noncomputable def _root_.OAI.MinimalVertex.Code.StronglyRationalVOA.LocalOperatorAlgebra.generated (s : Set (H →L[ℂ] H)) : VonNeumannAlgebra H where
|
| 282 |
+
toStarSubalgebra := StarSubalgebra.centralizer ℂ (StarSubalgebra.centralizer ℂ s : Set (H →L[ℂ] H))
|
| 283 |
+
centralizer_centralizer' := by
|
| 284 |
+
change Set.centralizer (Set.centralizer
|
| 285 |
+
(StarSubalgebra.centralizer ℂ (StarSubalgebra.centralizer ℂ s : Set (H →L[ℂ] H)) : Set (H →L[ℂ] H))) =
|
| 286 |
+
(StarSubalgebra.centralizer ℂ (StarSubalgebra.centralizer ℂ s : Set (H →L[ℂ] H)) : Set (H →L[ℂ] H))
|
| 287 |
+
rw [StarSubalgebra.coe_centralizer_centralizer]
|
| 288 |
+
rw [Set.centralizer_centralizer_centralizer]
|
| 289 |
+
|
| 290 |
+
end OAI.StronglyRationalVOA.LocalOperatorAlgebra
|
| 291 |
+
|
| 292 |
+
namespace OAI.StronglyRationalVOA.SmoothCircleFunction
|
| 293 |
+
open Filter
|
| 294 |
+
open scoped ContDiff
|
| 295 |
+
|
| 296 |
+
noncomputable def _root_.OAI.MinimalVertex.Code.StronglyRationalVOA.SmoothCircleFunction.onCircle (f : OAI.StronglyRationalVOA.SmoothCircleFunction) : AddCircle (2*Real.pi) → ℂ :=
|
| 297 |
+
f.periodic.lift
|
| 298 |
+
|
| 299 |
+
end OAI.StronglyRationalVOA.SmoothCircleFunction
|
| 300 |
+
|
| 301 |
+
namespace OAI.StronglyRationalVOA
|
| 302 |
+
open Filter
|
| 303 |
+
open scoped ContDiff
|
| 304 |
+
|
| 305 |
+
structure ProperCircleArc where
|
| 306 |
+
left : ℝ
|
| 307 |
+
right : ℝ
|
| 308 |
+
nonempty' : left < right
|
| 309 |
+
nondense' : right < left + 2*Real.pi
|
| 310 |
+
|
| 311 |
+
end OAI.StronglyRationalVOA
|
| 312 |
+
|
| 313 |
+
namespace OAI.StronglyRationalVOA.ProperCircleArc
|
| 314 |
+
open Filter
|
| 315 |
+
open scoped ContDiff
|
| 316 |
+
|
| 317 |
+
noncomputable def _root_.OAI.MinimalVertex.Code.StronglyRationalVOA.ProperCircleArc.carrier (I : OAI.StronglyRationalVOA.ProperCircleArc) : Set (AddCircle (2*Real.pi)) :=
|
| 318 |
+
(fun t : ℝ => (t : AddCircle (2*Real.pi))) '' Set.Ioo I.left I.right
|
| 319 |
+
|
| 320 |
+
noncomputable def _root_.OAI.MinimalVertex.Code.StronglyRationalVOA.ProperCircleArc.complement (I : OAI.StronglyRationalVOA.ProperCircleArc) : OAI.StronglyRationalVOA.ProperCircleArc where
|
| 321 |
+
left := I.right
|
| 322 |
+
right := I.left + 2*Real.pi
|
| 323 |
+
nonempty' := I.nondense'
|
| 324 |
+
nondense' := by linarith [I.nonempty']
|
| 325 |
+
|
| 326 |
+
end OAI.StronglyRationalVOA.ProperCircleArc
|
| 327 |
+
|
| 328 |
+
namespace OAI.StronglyRationalVOA.BoundedFlow
|
| 329 |
+
open scoped Topology
|
| 330 |
+
open Filter
|
| 331 |
+
open scoped Topology
|
| 332 |
+
open Filter
|
| 333 |
+
open scoped Topology
|
| 334 |
+
variable {H : Type*} [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H]
|
| 335 |
+
|
| 336 |
+
local instance _root_.OAI.MinimalVertex.Code.StronglyRationalVOA.BoundedFlow.boundedFlowRationalNormedAlgebra : NormedAlgebra ℚ (H →L[ℂ] H) :=
|
| 337 |
+
.restrictScalars ℚ ℂ (H →L[ℂ] H)
|
| 338 |
+
|
| 339 |
+
noncomputable def _root_.OAI.MinimalVertex.Code.StronglyRationalVOA.BoundedFlow.flow (K : H →L[ℂ] H) (t : ℝ) : H →L[ℂ] H := NormedSpace.exp (t • K)
|
| 340 |
+
|
| 341 |
+
end OAI.StronglyRationalVOA.BoundedFlow
|
| 342 |
+
|
| 343 |
+
namespace OAI.StronglyRationalVOA
|
| 344 |
+
open scoped ContDiff
|
| 345 |
+
|
| 346 |
+
structure SmoothCircleLift where
|
| 347 |
+
toOrderIso : ℝ ≃o ℝ
|
| 348 |
+
smooth : ContDiff ℝ ∞ toOrderIso
|
| 349 |
+
inverse_smooth : ContDiff ℝ ∞ toOrderIso.symm
|
| 350 |
+
period : ∀ t, toOrderIso (t+2*Real.pi)=toOrderIso t+2*Real.pi
|
| 351 |
+
|
| 352 |
+
end OAI.StronglyRationalVOA
|
| 353 |
+
|
| 354 |
+
namespace OAI.StronglyRationalVOA.SmoothCircleLift
|
| 355 |
+
open scoped ContDiff
|
| 356 |
+
|
| 357 |
+
noncomputable instance : CoeFun OAI.StronglyRationalVOA.SmoothCircleLift (fun _ => ℝ → ℝ) := ⟨fun F => F.toOrderIso⟩
|
| 358 |
+
|
| 359 |
+
noncomputable def _root_.OAI.MinimalVertex.Code.StronglyRationalVOA.SmoothCircleLift.identity : OAI.StronglyRationalVOA.SmoothCircleLift where
|
| 360 |
+
toOrderIso := OrderIso.refl ℝ
|
| 361 |
+
smooth := contDiff_id
|
| 362 |
+
inverse_smooth := contDiff_id
|
| 363 |
+
period := fun _ => rfl
|
| 364 |
+
|
| 365 |
+
noncomputable def _root_.OAI.MinimalVertex.Code.StronglyRationalVOA.SmoothCircleLift.compose (F G : OAI.StronglyRationalVOA.SmoothCircleLift) : OAI.StronglyRationalVOA.SmoothCircleLift where
|
| 366 |
+
toOrderIso := G.toOrderIso.trans F.toOrderIso
|
| 367 |
+
smooth := F.smooth.comp G.smooth
|
| 368 |
+
inverse_smooth := G.inverse_smooth.comp F.inverse_smooth
|
| 369 |
+
period := by intro t; change F (G (t+2*Real.pi))=F (G t)+2*Real.pi; rw [G.period,F.period]
|
| 370 |
+
|
| 371 |
+
noncomputable def _root_.OAI.MinimalVertex.Code.StronglyRationalVOA.SmoothCircleLift.inverse (F : OAI.StronglyRationalVOA.SmoothCircleLift) : OAI.StronglyRationalVOA.SmoothCircleLift where
|
| 372 |
+
toOrderIso := F.toOrderIso.symm
|
| 373 |
+
smooth := F.inverse_smooth
|
| 374 |
+
inverse_smooth := F.smooth
|
| 375 |
+
period := by
|
| 376 |
+
intro t
|
| 377 |
+
apply F.toOrderIso.injective
|
| 378 |
+
rw [F.toOrderIso.apply_symm_apply,F.period,F.toOrderIso.apply_symm_apply]
|
| 379 |
+
|
| 380 |
+
noncomputable instance _root_.OAI.MinimalVertex.Code.StronglyRationalVOA.SmoothCircleLift.instGroup : Group OAI.StronglyRationalVOA.SmoothCircleLift := by
|
| 381 |
+
classical
|
| 382 |
+
have h_OAI_StronglyRationalVOA_SmoothCircleLift_ext {F G : OAI.StronglyRationalVOA.SmoothCircleLift} (h : ∀ t, F t=G t) : F=G := by
|
| 383 |
+
cases F with
|
| 384 |
+
| mk f hf hfi hp =>
|
| 385 |
+
cases G with
|
| 386 |
+
| mk g hg hgi hgp =>
|
| 387 |
+
have he : f=g := DFunLike.ext _ _ h
|
| 388 |
+
subst g
|
| 389 |
+
rfl
|
| 390 |
+
exact {
|
| 391 |
+
mul := OAI.MinimalVertex.Code.StronglyRationalVOA.SmoothCircleLift.compose
|
| 392 |
+
one := OAI.MinimalVertex.Code.StronglyRationalVOA.SmoothCircleLift.identity
|
| 393 |
+
inv := OAI.MinimalVertex.Code.StronglyRationalVOA.SmoothCircleLift.inverse
|
| 394 |
+
npow := @npowRec OAI.StronglyRationalVOA.SmoothCircleLift
|
| 395 |
+
⟨OAI.MinimalVertex.Code.StronglyRationalVOA.SmoothCircleLift.identity⟩
|
| 396 |
+
⟨OAI.MinimalVertex.Code.StronglyRationalVOA.SmoothCircleLift.compose⟩
|
| 397 |
+
div := fun F G => OAI.MinimalVertex.Code.StronglyRationalVOA.SmoothCircleLift.compose F
|
| 398 |
+
(OAI.MinimalVertex.Code.StronglyRationalVOA.SmoothCircleLift.inverse G)
|
| 399 |
+
zpow := @zpowRec OAI.StronglyRationalVOA.SmoothCircleLift
|
| 400 |
+
⟨OAI.MinimalVertex.Code.StronglyRationalVOA.SmoothCircleLift.identity⟩
|
| 401 |
+
⟨OAI.MinimalVertex.Code.StronglyRationalVOA.SmoothCircleLift.compose⟩
|
| 402 |
+
⟨OAI.MinimalVertex.Code.StronglyRationalVOA.SmoothCircleLift.inverse⟩
|
| 403 |
+
(@npowRec OAI.StronglyRationalVOA.SmoothCircleLift
|
| 404 |
+
⟨OAI.MinimalVertex.Code.StronglyRationalVOA.SmoothCircleLift.identity⟩
|
| 405 |
+
⟨OAI.MinimalVertex.Code.StronglyRationalVOA.SmoothCircleLift.compose⟩)
|
| 406 |
+
mul_assoc F G H := by apply h_OAI_StronglyRationalVOA_SmoothCircleLift_ext; intro t; rfl
|
| 407 |
+
one_mul F := by apply h_OAI_StronglyRationalVOA_SmoothCircleLift_ext; intro t; rfl
|
| 408 |
+
mul_one F := by apply h_OAI_StronglyRationalVOA_SmoothCircleLift_ext; intro t; rfl
|
| 409 |
+
inv_mul_cancel F := by apply h_OAI_StronglyRationalVOA_SmoothCircleLift_ext; intro t; exact F.toOrderIso.symm_apply_apply t
|
| 410 |
+
}
|
| 411 |
+
|
| 412 |
+
noncomputable def _root_.OAI.MinimalVertex.Code.StronglyRationalVOA.SmoothCircleLift.onCircle (F : OAI.StronglyRationalVOA.SmoothCircleLift) : AddCircle (2*Real.pi) → AddCircle (2*Real.pi) := by
|
| 413 |
+
classical
|
| 414 |
+
have h_OAI_StronglyRationalVOA_SmoothCircleLift_one_apply (t : ℝ) : (1 : OAI.StronglyRationalVOA.SmoothCircleLift) t=t := rfl
|
| 415 |
+
have h_OAI_StronglyRationalVOA_SmoothCircleLift_mul_apply (F G : OAI.StronglyRationalVOA.SmoothCircleLift) (t : ℝ) : (F*G) t=F (G t) := rfl
|
| 416 |
+
have h_OAI_StronglyRationalVOA_SmoothCircleLift_circle_periodic (F : OAI.StronglyRationalVOA.SmoothCircleLift) : Function.Periodic (fun t : ℝ => (F t : AddCircle (2*Real.pi))) (2*Real.pi) := by
|
| 417 |
+
intro t
|
| 418 |
+
change ((F.toOrderIso (t+2*Real.pi) : ℝ) : AddCircle (2*Real.pi)) =
|
| 419 |
+
(F.toOrderIso t : AddCircle (2*Real.pi))
|
| 420 |
+
rw [F.period,AddCircle.coe_add]
|
| 421 |
+
simp
|
| 422 |
+
exact
|
| 423 |
+
(h_OAI_StronglyRationalVOA_SmoothCircleLift_circle_periodic F).lift
|
| 424 |
+
|
| 425 |
+
noncomputable def _root_.OAI.MinimalVertex.Code.StronglyRationalVOA.SmoothCircleLift.circleHomeomorph (F : OAI.StronglyRationalVOA.SmoothCircleLift) :
|
| 426 |
+
AddCircle (2*Real.pi) ≃ₜ AddCircle (2*Real.pi) := by
|
| 427 |
+
classical
|
| 428 |
+
have h_OAI_StronglyRationalVOA_SmoothCircleLift_one_apply (t : ℝ) : (1 : OAI.StronglyRationalVOA.SmoothCircleLift) t=t := rfl
|
| 429 |
+
have h_OAI_StronglyRationalVOA_SmoothCircleLift_onCircle_one (t : AddCircle (2*Real.pi)) : (OAI.MinimalVertex.Code.StronglyRationalVOA.SmoothCircleLift.onCircle 1 t)=t := by
|
| 430 |
+
induction t using QuotientAddGroup.induction_on with
|
| 431 |
+
| H t => rfl
|
| 432 |
+
have h_OAI_StronglyRationalVOA_SmoothCircleLift_onCircle_mul (F G : OAI.StronglyRationalVOA.SmoothCircleLift) (t : AddCircle (2*Real.pi)) :
|
| 433 |
+
(OAI.MinimalVertex.Code.StronglyRationalVOA.SmoothCircleLift.onCircle (F * G) t)=(OAI.MinimalVertex.Code.StronglyRationalVOA.SmoothCircleLift.onCircle F (OAI.MinimalVertex.Code.StronglyRationalVOA.SmoothCircleLift.onCircle G t)) := by
|
| 434 |
+
induction t using QuotientAddGroup.induction_on with
|
| 435 |
+
| H t => rfl
|
| 436 |
+
have h_OAI_StronglyRationalVOA_SmoothCircleLift_onCircle_inverse (F : OAI.StronglyRationalVOA.SmoothCircleLift) (t : AddCircle (2*Real.pi)) : (OAI.MinimalVertex.Code.StronglyRationalVOA.SmoothCircleLift.onCircle F⁻¹ (OAI.MinimalVertex.Code.StronglyRationalVOA.SmoothCircleLift.onCircle F t))=t := by
|
| 437 |
+
rw [← h_OAI_StronglyRationalVOA_SmoothCircleLift_onCircle_mul,inv_mul_cancel,h_OAI_StronglyRationalVOA_SmoothCircleLift_onCircle_one]
|
| 438 |
+
have h_OAI_StronglyRationalVOA_SmoothCircleLift_continuous_onCircle (F : OAI.StronglyRationalVOA.SmoothCircleLift) : Continuous (OAI.MinimalVertex.Code.StronglyRationalVOA.SmoothCircleLift.onCircle F) := by
|
| 439 |
+
exact ((AddCircle.continuous_mk' (2*Real.pi)).comp F.smooth.continuous).quotient_liftOn' _
|
| 440 |
+
have h_OAI_StronglyRationalVOA_SmoothCircleLift_mul_apply (F G : OAI.StronglyRationalVOA.SmoothCircleLift) (t : ℝ) : (F*G) t=F (G t) := rfl
|
| 441 |
+
exact {
|
| 442 |
+
toFun := (OAI.MinimalVertex.Code.StronglyRationalVOA.SmoothCircleLift.onCircle F)
|
| 443 |
+
invFun := (OAI.MinimalVertex.Code.StronglyRationalVOA.SmoothCircleLift.onCircle F⁻¹)
|
| 444 |
+
left_inv := (h_OAI_StronglyRationalVOA_SmoothCircleLift_onCircle_inverse F)
|
| 445 |
+
right_inv := by intro t; simpa [h_OAI_StronglyRationalVOA_SmoothCircleLift_one_apply, h_OAI_StronglyRationalVOA_SmoothCircleLift_mul_apply] using (h_OAI_StronglyRationalVOA_SmoothCircleLift_onCircle_inverse F⁻¹ t)
|
| 446 |
+
continuous_toFun := (h_OAI_StronglyRationalVOA_SmoothCircleLift_continuous_onCircle F)
|
| 447 |
+
continuous_invFun := (h_OAI_StronglyRationalVOA_SmoothCircleLift_continuous_onCircle F⁻¹)
|
| 448 |
+
}
|
| 449 |
+
|
| 450 |
+
noncomputable def _root_.OAI.MinimalVertex.Code.StronglyRationalVOA.SmoothCircleLift.circleAction : OAI.StronglyRationalVOA.SmoothCircleLift →* Equiv.Perm (AddCircle (2*Real.pi)) := by
|
| 451 |
+
classical
|
| 452 |
+
have h_OAI_StronglyRationalVOA_SmoothCircleLift_onCircle_one (t : AddCircle (2*Real.pi)) : (OAI.MinimalVertex.Code.StronglyRationalVOA.SmoothCircleLift.onCircle 1 t)=t := by
|
| 453 |
+
induction t using QuotientAddGroup.induction_on with
|
| 454 |
+
| H t => rfl
|
| 455 |
+
have h_OAI_StronglyRationalVOA_SmoothCircleLift_onCircle_mul (F G : OAI.StronglyRationalVOA.SmoothCircleLift) (t : AddCircle (2*Real.pi)) :
|
| 456 |
+
(OAI.MinimalVertex.Code.StronglyRationalVOA.SmoothCircleLift.onCircle (F * G) t)=(OAI.MinimalVertex.Code.StronglyRationalVOA.SmoothCircleLift.onCircle F (OAI.MinimalVertex.Code.StronglyRationalVOA.SmoothCircleLift.onCircle G t)) := by
|
| 457 |
+
induction t using QuotientAddGroup.induction_on with
|
| 458 |
+
| H t => rfl
|
| 459 |
+
exact {
|
| 460 |
+
toFun F := (OAI.MinimalVertex.Code.StronglyRationalVOA.SmoothCircleLift.circleHomeomorph F).toEquiv
|
| 461 |
+
map_one' := by ext x; exact (h_OAI_StronglyRationalVOA_SmoothCircleLift_onCircle_one x)
|
| 462 |
+
map_mul' F G := by ext x; exact (h_OAI_StronglyRationalVOA_SmoothCircleLift_onCircle_mul F G x)
|
| 463 |
+
}
|
| 464 |
+
|
| 465 |
+
end OAI.StronglyRationalVOA.SmoothCircleLift
|
| 466 |
+
|
| 467 |
+
namespace OAI.StronglyRationalVOA
|
| 468 |
+
open scoped ContDiff
|
| 469 |
+
|
| 470 |
+
noncomputable def _root_.OAI.MinimalVertex.Code.StronglyRationalVOA.SmoothCircleDiffeomorphism := OAI.StronglyRationalVOA.SmoothCircleLift ⧸ (OAI.MinimalVertex.Code.StronglyRationalVOA.SmoothCircleLift.circleAction).ker
|
| 471 |
+
|
| 472 |
+
noncomputable instance _root_.OAI.MinimalVertex.Code.StronglyRationalVOA.instGroupSmoothCircleDiffeomorphism : Group OAI.MinimalVertex.Code.StronglyRationalVOA.SmoothCircleDiffeomorphism := inferInstanceAs
|
| 473 |
+
(Group (OAI.StronglyRationalVOA.SmoothCircleLift ⧸ (OAI.MinimalVertex.Code.StronglyRationalVOA.SmoothCircleLift.circleAction).ker))
|
| 474 |
+
|
| 475 |
+
end OAI.StronglyRationalVOA
|
| 476 |
+
|
| 477 |
+
namespace OAI.StronglyRationalVOA
|
| 478 |
+
open UniformSpace
|
| 479 |
+
|
| 480 |
+
noncomputable def scalarPhaseSubgroup (H : Type*) [NormedAddCommGroup H] [InnerProductSpace ℂ H] :
|
| 481 |
+
Subgroup (H ≃ₗᵢ[ℂ] H) where
|
| 482 |
+
carrier := {E | ∃ c : ℂ, ‖c‖=1 ∧ ∀ x : H, E x=c • x}
|
| 483 |
+
one_mem' := ⟨1,by simp,fun x => (one_smul ℂ x).symm⟩
|
| 484 |
+
mul_mem' := by
|
| 485 |
+
rintro E F ⟨c,hc,he⟩ ⟨d,hd,hf⟩
|
| 486 |
+
refine ⟨c*d,by rw [norm_mul,hc,hd,one_mul],?_⟩
|
| 487 |
+
intro x
|
| 488 |
+
change E (F x)=(c*d) • x
|
| 489 |
+
rw [hf,he,mul_smul]
|
| 490 |
+
inv_mem' := by
|
| 491 |
+
rintro E ⟨c,hc,he⟩
|
| 492 |
+
have hn : c ≠ 0 := by intro h; rw [h,norm_zero] at hc; norm_num at hc
|
| 493 |
+
refine ⟨c⁻¹,by rw [norm_inv,hc,inv_one],?_⟩
|
| 494 |
+
intro x
|
| 495 |
+
apply E.injective
|
| 496 |
+
change E (E.symm x)=E (c⁻¹ • x)
|
| 497 |
+
rw [E.apply_symm_apply,map_smul,he,smul_smul,inv_mul_cancel₀ hn,one_smul]
|
| 498 |
+
|
| 499 |
+
noncomputable instance scalarPhaseSubgroup_normal (H : Type*) [NormedAddCommGroup H] [InnerProductSpace ℂ H] :
|
| 500 |
+
(OAI.StronglyRationalVOA.scalarPhaseSubgroup H).Normal where
|
| 501 |
+
conj_mem := by
|
| 502 |
+
rintro E ⟨c,hc,he⟩ F
|
| 503 |
+
refine ⟨c,hc,?_⟩
|
| 504 |
+
intro x
|
| 505 |
+
change F (E (F.symm x))=c • x
|
| 506 |
+
rw [he,map_smul,F.apply_symm_apply]
|
| 507 |
+
|
| 508 |
+
noncomputable abbrev ProjectiveUnitaryGroup (H : Type*) [NormedAddCommGroup H] [InnerProductSpace ℂ H] :=
|
| 509 |
+
(H ≃ₗᵢ[ℂ] H) ⧸ OAI.StronglyRationalVOA.scalarPhaseSubgroup H
|
| 510 |
+
|
| 511 |
+
end OAI.StronglyRationalVOA
|
| 512 |
+
|
| 513 |
+
namespace OAI.StronglyRationalVOA.SmoothCircleLift
|
| 514 |
+
open Filter Set
|
| 515 |
+
open scoped Topology ContDiff
|
| 516 |
+
|
| 517 |
+
noncomputable def jet (F : OAI.StronglyRationalVOA.SmoothCircleLift) (k : ℕ) : C(ℝ,ℝ) :=
|
| 518 |
+
⟨iteratedDeriv k F, F.smooth.continuous_iteratedDeriv k
|
| 519 |
+
(by exact_mod_cast (le_top : (k : ℕ∞) ≤ ⊤))⟩
|
| 520 |
+
|
| 521 |
+
noncomputable instance : TopologicalSpace OAI.StronglyRationalVOA.SmoothCircleLift :=
|
| 522 |
+
TopologicalSpace.induced (fun F => OAI.StronglyRationalVOA.SmoothCircleLift.jet F) inferInstance
|
| 523 |
+
|
| 524 |
+
end OAI.StronglyRationalVOA.SmoothCircleLift
|
| 525 |
+
|
| 526 |
+
namespace OAI.StronglyRationalVOA
|
| 527 |
+
open UniformSpace Filter Set
|
| 528 |
+
open scoped Topology
|
| 529 |
+
|
| 530 |
+
noncomputable instance unitaryStrongTopology (H : Type*) [NormedAddCommGroup H] [InnerProductSpace ℂ H] :
|
| 531 |
+
TopologicalSpace (H ≃ₗᵢ[ℂ] H) :=
|
| 532 |
+
TopologicalSpace.induced (fun E : H ≃ₗᵢ[ℂ] H => (E : H → H)) inferInstance
|
| 533 |
+
|
| 534 |
+
noncomputable instance _root_.OAI.MinimalVertex.Code.StronglyRationalVOA.instTopologicalSpaceSmoothCircleDiffeomorphism : TopologicalSpace OAI.MinimalVertex.Code.StronglyRationalVOA.SmoothCircleDiffeomorphism := inferInstanceAs
|
| 535 |
+
(TopologicalSpace (OAI.StronglyRationalVOA.SmoothCircleLift ⧸ (OAI.MinimalVertex.Code.StronglyRationalVOA.SmoothCircleLift.circleAction).ker))
|
| 536 |
+
|
| 537 |
+
end OAI.StronglyRationalVOA
|
| 538 |
+
|
| 539 |
+
namespace OAI.StronglyRationalVOA.CircleMobiusGeometry
|
| 540 |
+
open Set
|
| 541 |
+
open scoped MatrixGroups
|
| 542 |
+
|
| 543 |
+
noncomputable def _root_.OAI.MinimalVertex.Code.StronglyRationalVOA.CircleMobiusGeometry.Rel (M : SL(2,ℝ)) (x y : ℝ) : Prop :=
|
| 544 |
+
(M 0 0*Real.cos (x/2)+M 0 1*Real.sin (x/2))*Real.sin (y/2)=
|
| 545 |
+
(M 1 0*Real.cos (x/2)+M 1 1*Real.sin (x/2))*Real.cos (y/2)
|
| 546 |
+
|
| 547 |
+
noncomputable def _root_.OAI.MinimalVertex.Code.StronglyRationalVOA.CircleMobiusGeometry.Implements (M : SL(2,ℝ)) (F : OAI.StronglyRationalVOA.SmoothCircleLift) : Prop := ∀ x, (OAI.MinimalVertex.Code.StronglyRationalVOA.CircleMobiusGeometry.Rel M x ((OAI.StronglyRationalVOA.SmoothCircleLift.toOrderIso F) x))
|
| 548 |
+
|
| 549 |
+
noncomputable def _root_.OAI.MinimalVertex.Code.StronglyRationalVOA.CircleMobiusGeometry.lifts : Subgroup OAI.StronglyRationalVOA.SmoothCircleLift := by
|
| 550 |
+
classical
|
| 551 |
+
have h_OAI_StronglyRationalVOA_SmoothCircleLift_one_apply (t : ℝ) : (1 : OAI.StronglyRationalVOA.SmoothCircleLift) t=t := rfl
|
| 552 |
+
have h_OAI_StronglyRationalVOA_SmoothCircleLift_mul_apply (F G : OAI.StronglyRationalVOA.SmoothCircleLift) (t : ℝ) : (F*G) t=F (G t) := rfl
|
| 553 |
+
have h_OAI_StronglyRationalVOA_SmoothCircleLift_apply_inv_apply (F : OAI.StronglyRationalVOA.SmoothCircleLift) (t : ℝ) : F (F⁻¹ t)=t := F.toOrderIso.apply_symm_apply t
|
| 554 |
+
have h_OAI_StronglyRationalVOA_CircleMobiusGeometry_implements_inv {M : SL(2,ℝ)} {F : OAI.StronglyRationalVOA.SmoothCircleLift}
|
| 555 |
+
(hF : (OAI.MinimalVertex.Code.StronglyRationalVOA.CircleMobiusGeometry.Implements M F)) : (OAI.MinimalVertex.Code.StronglyRationalVOA.CircleMobiusGeometry.Implements M⁻¹ F⁻¹) := by
|
| 556 |
+
intro x
|
| 557 |
+
have h := hF (F⁻¹ x)
|
| 558 |
+
rw [OAI.MinimalVertex.Code.StronglyRationalVOA.CircleMobiusGeometry.Rel,(h_OAI_StronglyRationalVOA_SmoothCircleLift_apply_inv_apply F)] at h
|
| 559 |
+
simp only [OAI.MinimalVertex.Code.StronglyRationalVOA.CircleMobiusGeometry.Rel,Matrix.SpecialLinearGroup.SL2_inv_expl,Matrix.cons_val_zero,
|
| 560 |
+
Matrix.cons_val_one,Matrix.cons_val_fin_one]
|
| 561 |
+
linear_combination -h
|
| 562 |
+
have h_OAI_StronglyRationalVOA_CircleMobiusGeometry_implements_one : (OAI.MinimalVertex.Code.StronglyRationalVOA.CircleMobiusGeometry.Implements 1 1) := by
|
| 563 |
+
intro x
|
| 564 |
+
simp [h_OAI_StronglyRationalVOA_SmoothCircleLift_one_apply, OAI.MinimalVertex.Code.StronglyRationalVOA.CircleMobiusGeometry.Rel,mul_comm]
|
| 565 |
+
have h_OAI_StronglyRationalVOA_CircleMobiusGeometry_collinear_unit {p q c s : ℝ} (hu : c^2+s^2=1) (h : p*s=q*c) :
|
| 566 |
+
(p*c+q*s)*c=p ∧ (p*c+q*s)*s=q := by
|
| 567 |
+
constructor
|
| 568 |
+
· linear_combination p*hu-s*h
|
| 569 |
+
· linear_combination q*hu+c*h
|
| 570 |
+
have h_OAI_StronglyRationalVOA_CircleMobiusGeometry_cos_sq_add_sin_sq (x : ℝ) : Real.cos x^2+Real.sin x^2=1 := by
|
| 571 |
+
nlinarith [Real.sin_sq_add_cos_sq x]
|
| 572 |
+
have h_OAI_StronglyRationalVOA_CircleMobiusGeometry_implements_mul {M N : SL(2,ℝ)} {F G : OAI.StronglyRationalVOA.SmoothCircleLift}
|
| 573 |
+
(hF : (OAI.MinimalVertex.Code.StronglyRationalVOA.CircleMobiusGeometry.Implements M F)) (hG : (OAI.MinimalVertex.Code.StronglyRationalVOA.CircleMobiusGeometry.Implements N G)) : (OAI.MinimalVertex.Code.StronglyRationalVOA.CircleMobiusGeometry.Implements (M * N) (F * G)) := by
|
| 574 |
+
intro x
|
| 575 |
+
have hh := hF (G x)
|
| 576 |
+
have hg := hG x
|
| 577 |
+
obtain ⟨hr1,hr2⟩ := (h_OAI_StronglyRationalVOA_CircleMobiusGeometry_collinear_unit
|
| 578 |
+
(h_OAI_StronglyRationalVOA_CircleMobiusGeometry_cos_sq_add_sin_sq
|
| 579 |
+
((OAI.StronglyRationalVOA.SmoothCircleLift.toOrderIso G) x / 2))
|
| 580 |
+
hg)
|
| 581 |
+
let r := (N 0 0*Real.cos (x/2)+N 0 1*Real.sin (x/2))*Real.cos (G x/2)+
|
| 582 |
+
(N 1 0*Real.cos (x/2)+N 1 1*Real.sin (x/2))*Real.sin (G x/2)
|
| 583 |
+
change r*Real.cos (G x/2)=N 0 0*Real.cos (x/2)+N 0 1*Real.sin (x/2) at hr1
|
| 584 |
+
change r*Real.sin (G x/2)=N 1 0*Real.cos (x/2)+N 1 1*Real.sin (x/2) at hr2
|
| 585 |
+
change (M 0 0*Real.cos (G x/2)+M 0 1*Real.sin (G x/2))*Real.sin (F (G x)/2)=
|
| 586 |
+
(M 1 0*Real.cos (G x/2)+M 1 1*Real.sin (G x/2))*Real.cos (F (G x)/2) at hh
|
| 587 |
+
simp only [OAI.MinimalVertex.Code.StronglyRationalVOA.CircleMobiusGeometry.Rel,(h_OAI_StronglyRationalVOA_SmoothCircleLift_mul_apply),Matrix.SpecialLinearGroup.coe_mul,
|
| 588 |
+
Matrix.mul_apply,Fin.sum_univ_two]
|
| 589 |
+
linear_combination r*hh+(M 1 0*Real.cos (F (G x)/2)-M 0 0*Real.sin (F (G x)/2))*hr1+
|
| 590 |
+
(M 1 1*Real.cos (F (G x)/2)-M 0 1*Real.sin (F (G x)/2))*hr2
|
| 591 |
+
exact {
|
| 592 |
+
carrier := {F | ∃ M : SL(2,ℝ), (OAI.MinimalVertex.Code.StronglyRationalVOA.CircleMobiusGeometry.Implements M F)}
|
| 593 |
+
one_mem' := ⟨1,h_OAI_StronglyRationalVOA_CircleMobiusGeometry_implements_one⟩
|
| 594 |
+
mul_mem' := by rintro F G ⟨M,hM⟩ ⟨N,hN⟩; exact ⟨M*N,(h_OAI_StronglyRationalVOA_CircleMobiusGeometry_implements_mul hM hN)⟩
|
| 595 |
+
inv_mem' := by rintro F ⟨M,hM⟩; exact ⟨M⁻¹,(h_OAI_StronglyRationalVOA_CircleMobiusGeometry_implements_inv hM)⟩
|
| 596 |
+
}
|
| 597 |
+
|
| 598 |
+
noncomputable def _root_.OAI.MinimalVertex.Code.StronglyRationalVOA.CircleMobiusGeometry.rotationMatrix (s : ℝ) : SL(2,ℝ) := by
|
| 599 |
+
classical
|
| 600 |
+
have h_OAI_StronglyRationalVOA_CircleMobiusGeometry_cos_sq_add_sin_sq (x : ℝ) : Real.cos x^2+Real.sin x^2=1 := by
|
| 601 |
+
nlinarith [Real.sin_sq_add_cos_sq x]
|
| 602 |
+
exact
|
| 603 |
+
⟨!![Real.cos (s/2),-Real.sin (s/2);Real.sin (s/2),Real.cos (s/2)],by
|
| 604 |
+
simp only [Matrix.det_fin_two_of]
|
| 605 |
+
nlinarith [(h_OAI_StronglyRationalVOA_CircleMobiusGeometry_cos_sq_add_sin_sq (s / 2))]⟩
|
| 606 |
+
|
| 607 |
+
noncomputable abbrev _root_.OAI.MinimalVertex.Code.StronglyRationalVOA.CircleMobiusGeometry.Group := OAI.MinimalVertex.Code.StronglyRationalVOA.CircleMobiusGeometry.lifts ⧸ ((OAI.MinimalVertex.Code.StronglyRationalVOA.SmoothCircleLift.circleAction).comp OAI.MinimalVertex.Code.StronglyRationalVOA.CircleMobiusGeometry.lifts.subtype).ker
|
| 608 |
+
|
| 609 |
+
noncomputable def _root_.OAI.MinimalVertex.Code.StronglyRationalVOA.CircleMobiusGeometry.inclusion : OAI.MinimalVertex.Code.StronglyRationalVOA.CircleMobiusGeometry.Group →* OAI.MinimalVertex.Code.StronglyRationalVOA.SmoothCircleDiffeomorphism :=
|
| 610 |
+
QuotientGroup.lift ((OAI.MinimalVertex.Code.StronglyRationalVOA.SmoothCircleLift.circleAction).comp OAI.MinimalVertex.Code.StronglyRationalVOA.CircleMobiusGeometry.lifts.subtype).ker
|
| 611 |
+
((QuotientGroup.mk' (OAI.MinimalVertex.Code.StronglyRationalVOA.SmoothCircleLift.circleAction).ker).comp OAI.MinimalVertex.Code.StronglyRationalVOA.CircleMobiusGeometry.lifts.subtype) (by
|
| 612 |
+
intro F hF
|
| 613 |
+
exact (QuotientGroup.eq_one_iff _).mpr hF)
|
| 614 |
+
|
| 615 |
+
end OAI.StronglyRationalVOA.CircleMobiusGeometry
|
| 616 |
+
|
| 617 |
+
namespace OAI.MinimalVertex.Code.StronglyRationalVOA.SmoothCircleDiffeomorphism
|
| 618 |
+
open Set
|
| 619 |
+
open scoped Topology MatrixGroups
|
| 620 |
+
|
| 621 |
+
noncomputable def _root_.OAI.MinimalVertex.Code.StronglyRationalVOA.SmoothCircleDiffeomorphism.action : OAI.MinimalVertex.Code.StronglyRationalVOA.SmoothCircleDiffeomorphism →* Equiv.Perm (AddCircle (2*Real.pi)) :=
|
| 622 |
+
QuotientGroup.lift (OAI.MinimalVertex.Code.StronglyRationalVOA.SmoothCircleLift.circleAction).ker (OAI.MinimalVertex.Code.StronglyRationalVOA.SmoothCircleLift.circleAction)
|
| 623 |
+
(fun _ h => h)
|
| 624 |
+
|
| 625 |
+
end OAI.MinimalVertex.Code.StronglyRationalVOA.SmoothCircleDiffeomorphism
|
| 626 |
+
|
| 627 |
+
namespace OAI.StronglyRationalVOA
|
| 628 |
+
open Set
|
| 629 |
+
open scoped Topology MatrixGroups
|
| 630 |
+
|
| 631 |
+
noncomputable def _root_.OAI.MinimalVertex.Code.StronglyRationalVOA.projectiveConjugation {H : Type*} [NormedAddCommGroup H] [InnerProductSpace ℂ H]
|
| 632 |
+
[CompleteSpace H] : OAI.StronglyRationalVOA.ProjectiveUnitaryGroup H → ((H →L[ℂ] H) ≃⋆ₐ[ℂ] (H →L[ℂ] H)) := by
|
| 633 |
+
classical
|
| 634 |
+
have h_OAI_StronglyRationalVOA_projective_equality_conjugation {H : Type _} [NormedAddCommGroup H]
|
| 635 |
+
[InnerProductSpace ℂ H] [CompleteSpace H] (E F : H ≃ₗᵢ[ℂ] H)
|
| 636 |
+
(h : (QuotientGroup.mk E : OAI.StronglyRationalVOA.ProjectiveUnitaryGroup H)=QuotientGroup.mk F) :
|
| 637 |
+
E.conjStarAlgEquiv=F.conjStarAlgEquiv := by
|
| 638 |
+
obtain ⟨c,_,hc⟩ := QuotientGroup.eq.mp h
|
| 639 |
+
have he (x : H) : F x=c • E x := by
|
| 640 |
+
have H := congrArg E (hc x)
|
| 641 |
+
change E (E.symm (F x))=E (c • x) at H
|
| 642 |
+
simpa only [E.apply_symm_apply,map_smul] using H
|
| 643 |
+
ext B x
|
| 644 |
+
change E (B (E.symm x))=F (B (F.symm x))
|
| 645 |
+
have hi : E.symm x=c • F.symm x := by
|
| 646 |
+
apply E.injective
|
| 647 |
+
rw [E.apply_symm_apply,map_smul,← he,F.apply_symm_apply]
|
| 648 |
+
rw [hi,map_smul,map_smul,← he]
|
| 649 |
+
exact
|
| 650 |
+
Quotient.lift (fun E : H ≃ₗᵢ[ℂ] H => E.conjStarAlgEquiv) (by
|
| 651 |
+
intro E F h
|
| 652 |
+
exact (h_OAI_StronglyRationalVOA_projective_equality_conjugation E F (Quotient.sound h)))
|
| 653 |
+
|
| 654 |
+
noncomputable def _root_.OAI.MinimalVertex.Code.StronglyRationalVOA.globalObservableAlgebra {H : Type*} [NormedAddCommGroup H] [InnerProductSpace ℂ H]
|
| 655 |
+
[CompleteSpace H] (N : OAI.StronglyRationalVOA.ProperCircleArc → VonNeumannAlgebra H) :
|
| 656 |
+
Subalgebra ℂ (H →L[ℂ] H) :=
|
| 657 |
+
Algebra.adjoin ℂ (⋃ I, (N I : Set (H →L[ℂ] H)))
|
| 658 |
+
|
| 659 |
+
noncomputable def _root_.OAI.MinimalVertex.Code.StronglyRationalVOA.globalCyclicSpace {H : Type*} [NormedAddCommGroup H] [InnerProductSpace ℂ H]
|
| 660 |
+
[CompleteSpace H] (N : OAI.StronglyRationalVOA.ProperCircleArc → VonNeumannAlgebra H) (Ω : H) : Submodule ℂ H :=
|
| 661 |
+
(Submodule.span ℂ {x | ∃ B ∈ (OAI.MinimalVertex.Code.StronglyRationalVOA.globalObservableAlgebra N), x=B Ω}).topologicalClosure
|
| 662 |
+
|
| 663 |
+
end OAI.StronglyRationalVOA
|
| 664 |
+
|
| 665 |
+
namespace OAI.StronglyRationalVOA.CFTTypeVOA
|
| 666 |
+
variable {V : Type u} [AddCommGroup V] [Module ℂ V] (A : CFTTypeVOA V)
|
| 667 |
+
|
| 668 |
+
noncomputable abbrev GradedDual := DirectSum ℕ (fun d => Module.Dual ℂ (A.grade d))
|
| 669 |
+
|
| 670 |
+
noncomputable def gradedDualPairing (φ : A.GradedDual) (b : V) : ℂ := by
|
| 671 |
+
classical
|
| 672 |
+
exact φ.sum (fun d f => f (A.gradingEquiv b d))
|
| 673 |
+
|
| 674 |
+
noncomputable def IsSelfContragredient : Prop :=
|
| 675 |
+
∃ e : V ≃ₗ[ℂ] A.GradedDual,
|
| 676 |
+
∀ d : ℕ, ∀ a ∈ A.grade d, ∀ n : ℤ, ∀ b c : V,
|
| 677 |
+
A.gradedDualPairing (e (OAI.StronglyRationalVOA.mode A.fields a n b)) c =
|
| 678 |
+
((-1 : ℂ)^d) * ∑ j ∈ Finset.range (d+1), ((j.factorial : ℂ)⁻¹) *
|
| 679 |
+
A.gradedDualPairing (e b)
|
| 680 |
+
(OAI.StronglyRationalVOA.mode A.fields ((A.virasoroMode 1 ^ j) a) (2*(d:ℤ)-j-n-2) c)
|
| 681 |
+
|
| 682 |
+
noncomputable def IsStronglyRational : Prop :=
|
| 683 |
+
A.IsSelfContragredient ∧ A.IsRational.{u,v} ∧ A.toVertexAlgebra.C2Cofinite
|
| 684 |
+
|
| 685 |
+
end OAI.StronglyRationalVOA.CFTTypeVOA
|
| 686 |
+
|
| 687 |
+
namespace OAI.MinimalVertex
|
| 688 |
+
open Filter Set UniformSpace
|
| 689 |
+
open scoped Topology MatrixGroups
|
| 690 |
+
open StronglyRationalVOA
|
| 691 |
+
variable {V : Type u} [NormedAddCommGroup V] [InnerProductSpace ℂ V]
|
| 692 |
+
{A : CFTTypeVOA V}
|
| 693 |
+
|
| 694 |
+
noncomputable def smearedMap (A : OAI.StronglyRationalVOA.CFTTypeVOA V) (a : V) (d : ℕ) (_ha : A.PolynomialEnergyBound a)
|
| 695 |
+
(f : ℤ → ℂ) (_hf : OAI.StronglyRationalVOA.RapidCoefficients f) : V →ₗ[ℂ] Completion V := by
|
| 696 |
+
classical
|
| 697 |
+
let family : ℤ → (V →ₗ[ℂ] Completion V) := fun m =>
|
| 698 |
+
f m • (Completion.toComplₗᵢ : V →ₗᵢ[ℂ] Completion V).toLinearMap.comp
|
| 699 |
+
(A.physicalMode a d m)
|
| 700 |
+
exact if h : ∀ v, Summable (fun m => family m v) then
|
| 701 |
+
SummableLinearFamily.tsumMap family h
|
| 702 |
+
else 0
|
| 703 |
+
|
| 704 |
+
noncomputable def smoothSmearedField (_U : A.UnitaryStructure) (_hc : A.toVertexAlgebra.C2Cofinite)
|
| 705 |
+
(a : V) (d : ℕ) (f : OAI.StronglyRationalVOA.SmoothCircleFunction) : Completion V →ₗ.[ℂ] Completion V := by
|
| 706 |
+
classical
|
| 707 |
+
exact if h : A.PolynomialEnergyBounds ∧ OAI.StronglyRationalVOA.RapidCoefficients (OAI.MinimalVertex.Code.StronglyRationalVOA.SmoothCircleFunction.coefficient f) then
|
| 708 |
+
(OAI.MinimalVertex.Code.StronglyRationalVOA.HilbertCore.operator
|
| 709 |
+
(OAI.MinimalVertex.smearedMap A a d (And.left h a) (OAI.MinimalVertex.Code.StronglyRationalVOA.SmoothCircleFunction.coefficient f)
|
| 710 |
+
(And.right h)))
|
| 711 |
+
else 0
|
| 712 |
+
|
| 713 |
+
noncomputable def closedSmoothField (U : A.UnitaryStructure) (hc : A.toVertexAlgebra.C2Cofinite)
|
| 714 |
+
(a : V) (d : ℕ) (f : OAI.StronglyRationalVOA.SmoothCircleFunction) : Completion V →ₗ.[ℂ] Completion V :=
|
| 715 |
+
(OAI.MinimalVertex.smoothSmearedField U hc a d f).closure
|
| 716 |
+
|
| 717 |
+
noncomputable def localGraphData (U : A.UnitaryStructure) (hc : A.toVertexAlgebra.C2Cofinite)
|
| 718 |
+
(O : Set (AddCircle (2*Real.pi))) : Set (Completion V →L[ℂ] Completion V) :=
|
| 719 |
+
{x | ∃ (a : V) (d : ℕ), a ∈ A.grade d ∧ ∃ (f : OAI.StronglyRationalVOA.SmoothCircleFunction),
|
| 720 |
+
tsupport (OAI.MinimalVertex.Code.StronglyRationalVOA.SmoothCircleFunction.onCircle f) ⊆ O ∧ ∃ (h : (OAI.MinimalVertex.closedSmoothField U hc a d f).IsClosed),
|
| 721 |
+
∃ i j : Bool, x = (OAI.MinimalVertex.Code.StronglyRationalVOA.ClosedGraphData.entry (OAI.MinimalVertex.closedSmoothField U hc a d f) h i j)}
|
| 722 |
+
|
| 723 |
+
noncomputable def localAlgebra (U : A.UnitaryStructure) (hc : A.toVertexAlgebra.C2Cofinite)
|
| 724 |
+
(O : Set (AddCircle (2*Real.pi))) : VonNeumannAlgebra (Completion V) :=
|
| 725 |
+
(OAI.MinimalVertex.Code.StronglyRationalVOA.LocalOperatorAlgebra.generated (OAI.MinimalVertex.localGraphData U hc O))
|
| 726 |
+
|
| 727 |
+
noncomputable def intervalAlgebra (U : A.UnitaryStructure) (hc : A.toVertexAlgebra.C2Cofinite)
|
| 728 |
+
(I : OAI.StronglyRationalVOA.ProperCircleArc) : VonNeumannAlgebra (Completion V) :=
|
| 729 |
+
OAI.MinimalVertex.localAlgebra U hc (OAI.MinimalVertex.Code.StronglyRationalVOA.ProperCircleArc.carrier I)
|
| 730 |
+
|
| 731 |
+
noncomputable def CKLWStrongLocal (U : A.UnitaryStructure) (hc : A.toVertexAlgebra.C2Cofinite) : Prop :=
|
| 732 |
+
(∀ a : V, A.PolynomialEnergyBound a) ∧
|
| 733 |
+
∀ I : OAI.StronglyRationalVOA.ProperCircleArc, OAI.MinimalVertex.intervalAlgebra U hc I ≤
|
| 734 |
+
(OAI.MinimalVertex.intervalAlgebra U hc (OAI.MinimalVertex.Code.StronglyRationalVOA.ProperCircleArc.complement I)).commutant
|
| 735 |
+
|
| 736 |
+
end OAI.MinimalVertex
|
| 737 |
+
|
| 738 |
+
namespace OAI.MinimalVertex
|
| 739 |
+
open Filter Set UniformSpace
|
| 740 |
+
open scoped Topology MatrixGroups
|
| 741 |
+
open StronglyRationalVOA
|
| 742 |
+
variable {H : Type*} [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H]
|
| 743 |
+
|
| 744 |
+
noncomputable def resolvent (T : H →ₗ.[ℂ] H) (_hs : IsSelfAdjoint T) (z : ℂ) (_hz : 1 ≤ |z.im|) :
|
| 745 |
+
H →L[ℂ] H := by
|
| 746 |
+
classical
|
| 747 |
+
exact if h : ∃ R : H →L[ℂ] H, ∀ y, (R y, y + z • R y) ∈ T.graph then h.choose
|
| 748 |
+
else 0
|
| 749 |
+
|
| 750 |
+
noncomputable def boundedGenerator (T : H →ₗ.[ℂ] H) (hs : IsSelfAdjoint T)
|
| 751 |
+
(r : ℝ) (hr : 1 ≤ r) : H →L[ℂ] H :=
|
| 752 |
+
((r : ℂ)^2/2) •
|
| 753 |
+
(OAI.MinimalVertex.resolvent T hs ((r : ℂ)*Complex.I) (by simpa [abs_of_nonneg (by linarith : 0 ≤ r)] using hr) +
|
| 754 |
+
OAI.MinimalVertex.resolvent T hs (-((r : ℂ)*Complex.I)) (by simpa [abs_of_nonneg (by linarith : 0 ≤ r)] using hr))
|
| 755 |
+
|
| 756 |
+
noncomputable def approximatingFlow (T : H →ₗ.[ℂ] H) (hs : IsSelfAdjoint T) (n : ℕ) (t : ℝ) : H →L[ℂ] H :=
|
| 757 |
+
(OAI.MinimalVertex.Code.StronglyRationalVOA.BoundedFlow.flow
|
| 758 |
+
(Complex.I • OAI.MinimalVertex.boundedGenerator T hs (↑n + 1) (le_add_of_nonneg_left (Nat.cast_nonneg n))) t)
|
| 759 |
+
|
| 760 |
+
end OAI.MinimalVertex
|
| 761 |
+
|
| 762 |
+
namespace OAI.MinimalVertex
|
| 763 |
+
open Filter Set UniformSpace
|
| 764 |
+
open scoped Topology MatrixGroups
|
| 765 |
+
open StronglyRationalVOA
|
| 766 |
+
|
| 767 |
+
noncomputable def flow {H : Type*} [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H]
|
| 768 |
+
(T : H →ₗ.[ℂ] H) (hs : IsSelfAdjoint T) (t : ℝ) : H →L[ℂ] H := by
|
| 769 |
+
classical
|
| 770 |
+
exact if h : ∃ L : H →L[ℂ] H, ∀ x,
|
| 771 |
+
Tendsto (fun n => OAI.MinimalVertex.approximatingFlow T hs n t x) atTop (𝓝 (L x)) then
|
| 772 |
+
h.choose
|
| 773 |
+
else 0
|
| 774 |
+
|
| 775 |
+
noncomputable def projectiveStandardAction : PSL(2,ℝ) →* (OAI.MinimalVertex.Code.StronglyRationalVOA.CircleMobiusGeometry.Group) := by
|
| 776 |
+
classical
|
| 777 |
+
exact if h : ∃ L : PSL(2,ℝ) →* (OAI.MinimalVertex.Code.StronglyRationalVOA.CircleMobiusGeometry.Group),
|
| 778 |
+
∀ M : SL(2,ℝ), ∃ F : OAI.StronglyRationalVOA.SmoothCircleLift, ∃ hF : (OAI.MinimalVertex.Code.StronglyRationalVOA.CircleMobiusGeometry.Implements M F),
|
| 779 |
+
L (QuotientGroup.mk M) =
|
| 780 |
+
QuotientGroup.mk (⟨F, M, hF⟩ : (OAI.MinimalVertex.Code.StronglyRationalVOA.CircleMobiusGeometry.lifts)) then h.choose
|
| 781 |
+
else 1
|
| 782 |
+
|
| 783 |
+
structure IrreducibleConformalNetStructure {H : Type*} [NormedAddCommGroup H]
|
| 784 |
+
[InnerProductSpace ℂ H] [CompleteSpace H]
|
| 785 |
+
(N : OAI.StronglyRationalVOA.ProperCircleArc → VonNeumannAlgebra H) where
|
| 786 |
+
separable : TopologicalSpace.SeparableSpace H
|
| 787 |
+
carrier_congr : ∀ I J, (OAI.MinimalVertex.Code.StronglyRationalVOA.ProperCircleArc.carrier I)=(OAI.MinimalVertex.Code.StronglyRationalVOA.ProperCircleArc.carrier J) → N I=N J
|
| 788 |
+
isotony : ∀ I J, (OAI.MinimalVertex.Code.StronglyRationalVOA.ProperCircleArc.carrier I) ⊆ (OAI.MinimalVertex.Code.StronglyRationalVOA.ProperCircleArc.carrier J) → N I ≤ N J
|
| 789 |
+
locality : ∀ I J, Disjoint (OAI.MinimalVertex.Code.StronglyRationalVOA.ProperCircleArc.carrier I) (OAI.MinimalVertex.Code.StronglyRationalVOA.ProperCircleArc.carrier J) → N I ≤ (N J).commutant
|
| 790 |
+
mobius : PSL(2,ℝ) →* (H ≃ₗᵢ[ℂ] H)
|
| 791 |
+
mobius_continuous : Continuous mobius
|
| 792 |
+
diffeomorphism : OAI.MinimalVertex.Code.StronglyRationalVOA.SmoothCircleDiffeomorphism →* OAI.StronglyRationalVOA.ProjectiveUnitaryGroup H
|
| 793 |
+
diffeomorphism_continuous : Continuous diffeomorphism
|
| 794 |
+
extends_mobius : ∀ F, diffeomorphism ((OAI.MinimalVertex.Code.StronglyRationalVOA.CircleMobiusGeometry.inclusion) (OAI.MinimalVertex.projectiveStandardAction F))=QuotientGroup.mk (mobius F)
|
| 795 |
+
covariance : ∀ F I J, (OAI.MinimalVertex.Code.StronglyRationalVOA.ProperCircleArc.carrier J)=(OAI.MinimalVertex.Code.StronglyRationalVOA.SmoothCircleDiffeomorphism.action) F '' (OAI.MinimalVertex.Code.StronglyRationalVOA.ProperCircleArc.carrier I) →
|
| 796 |
+
∀ B : H →L[ℂ] H, OAI.MinimalVertex.Code.StronglyRationalVOA.projectiveConjugation (diffeomorphism F) B ∈ N J ↔ B ∈ N I
|
| 797 |
+
local_action : ∀ F I, (∀ x ∈ (OAI.MinimalVertex.Code.StronglyRationalVOA.ProperCircleArc.carrier I), (OAI.MinimalVertex.Code.StronglyRationalVOA.SmoothCircleDiffeomorphism.action) F x=x) →
|
| 798 |
+
∀ B ∈ N I, OAI.MinimalVertex.Code.StronglyRationalVOA.projectiveConjugation (diffeomorphism F) B=B
|
| 799 |
+
vacuum : H
|
| 800 |
+
vacuum_norm : ‖vacuum‖=1
|
| 801 |
+
vacuum_invariant : ∀ F, mobius F vacuum=vacuum
|
| 802 |
+
vacuum_unique : ∀ x : H, (∀ F, mobius F x=x) → ∃ c : ℂ, x=c • vacuum
|
| 803 |
+
vacuum_cyclic : (OAI.MinimalVertex.Code.StronglyRationalVOA.globalCyclicSpace N vacuum)=⊤
|
| 804 |
+
hamiltonian : H →ₗ.[ℂ] H
|
| 805 |
+
hamiltonian_selfAdjoint : IsSelfAdjoint hamiltonian
|
| 806 |
+
positive_energy : ∀ x y, (x,y) ∈ hamiltonian.graph → 0 ≤ (inner ℂ x y).re
|
| 807 |
+
rotation_flow : ∀ t : ℝ,
|
| 808 |
+
(mobius (QuotientGroup.mk (OAI.MinimalVertex.Code.StronglyRationalVOA.CircleMobiusGeometry.rotationMatrix t))).toLinearIsometry.toContinuousLinearMap=
|
| 809 |
+
OAI.MinimalVertex.flow hamiltonian hamiltonian_selfAdjoint t
|
| 810 |
+
irreducible : ∀ Q : H →L[ℂ] H, (∀ I, Q ∈ (N I).commutant) →
|
| 811 |
+
∃ c : ℂ, Q=c • (1 : H →L[ℂ] H)
|
| 812 |
+
|
| 813 |
+
end OAI.MinimalVertex
|
| 814 |
+
|
| 815 |
+
namespace OAI.MinimalVertex
|
| 816 |
+
open Filter Set UniformSpace
|
| 817 |
+
open scoped Topology MatrixGroups
|
| 818 |
+
open StronglyRationalVOA
|
| 819 |
+
variable {V : Type u} [NormedAddCommGroup V] [InnerProductSpace ℂ V]
|
| 820 |
+
{A : CFTTypeVOA V} (U : A.UnitaryStructure)
|
| 821 |
+
|
| 822 |
+
theorem main (_hSimple : A.toVertexAlgebra.IsSimple)
|
| 823 |
+
(hSR : A.IsStronglyRational.{u,v}) :
|
| 824 |
+
A.PolynomialEnergyBounds ∧ OAI.MinimalVertex.CKLWStrongLocal U hSR.2.2 ∧
|
| 825 |
+
Nonempty (OAI.MinimalVertex.IrreducibleConformalNetStructure (OAI.MinimalVertex.intervalAlgebra U hSR.2.2)) := by
|
| 826 |
+
sorry
|
| 827 |
+
|
| 828 |
+
end OAI.MinimalVertex
|
| 829 |
+
|
| 830 |
+
end
|
lean/ComparatorChallenges/VertexCover.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"challenge_module": "ComparatorChallenges.VertexCover",
|
| 3 |
+
"solution_module": "OAI.Computability.VertexCover.Main",
|
| 4 |
+
"theorem_names": [
|
| 5 |
+
"OAI.VertexCover.explicit_cover_gap",
|
| 6 |
+
"OAI.VertexCover.every_fixed_factor_below_two"
|
| 7 |
+
],
|
| 8 |
+
"definition_names": [],
|
| 9 |
+
"permitted_axioms": [
|
| 10 |
+
"propext",
|
| 11 |
+
"Quot.sound",
|
| 12 |
+
"Classical.choice"
|
| 13 |
+
],
|
| 14 |
+
"enable_nanoda": false
|
| 15 |
+
}
|
lean/ComparatorChallenges/VertexCover.lean
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Mathlib
|
| 2 |
+
|
| 3 |
+
namespace OAI
|
| 4 |
+
|
| 5 |
+
namespace UniqueGames.BinaryFormula
|
| 6 |
+
|
| 7 |
+
structure Literal where
|
| 8 |
+
name : Nat
|
| 9 |
+
positive : Bool
|
| 10 |
+
deriving DecidableEq
|
| 11 |
+
|
| 12 |
+
def Literal.eval (literal : Literal) (assignment : Nat → Bool) : Bool :=
|
| 13 |
+
if literal.positive then assignment literal.name else !(assignment literal.name)
|
| 14 |
+
|
| 15 |
+
abbrev Clause := Vector Literal 3
|
| 16 |
+
|
| 17 |
+
def Clause.eval (clause : Clause) (assignment : Nat → Bool) : Bool :=
|
| 18 |
+
(clause[0].eval assignment || clause[1].eval assignment) || clause[2].eval assignment
|
| 19 |
+
|
| 20 |
+
structure Formula where
|
| 21 |
+
clauses : List Clause
|
| 22 |
+
|
| 23 |
+
def Formula.Satisfiable (F : Formula) : Prop :=
|
| 24 |
+
∃ assignment : Nat → Bool, ∀ clause ∈ F.clauses, clause.eval assignment = true
|
| 25 |
+
|
| 26 |
+
end UniqueGames.BinaryFormula
|
| 27 |
+
|
| 28 |
+
namespace UniqueGames.BinaryEncoding
|
| 29 |
+
|
| 30 |
+
open BinaryFormula
|
| 31 |
+
|
| 32 |
+
def bitsValue : List Bool → Nat
|
| 33 |
+
| [] => 0
|
| 34 |
+
| b :: bits => Nat.bit b (bitsValue bits)
|
| 35 |
+
|
| 36 |
+
def frame : List Bool → List Bool
|
| 37 |
+
| [] => [false]
|
| 38 |
+
| b :: bits => true :: b :: frame bits
|
| 39 |
+
|
| 40 |
+
def parseFrame : List Bool → Option (List Bool × List Bool)
|
| 41 |
+
| false :: rest => some ([], rest)
|
| 42 |
+
| true :: b :: rest => do
|
| 43 |
+
let (bits, trailing) ← parseFrame rest
|
| 44 |
+
return (b :: bits, trailing)
|
| 45 |
+
| _ => none
|
| 46 |
+
|
| 47 |
+
def nameBits (name : Nat) : List Bool := frame name.bits
|
| 48 |
+
|
| 49 |
+
def parseName (input : List Bool) : Option (Nat × List Bool) := do
|
| 50 |
+
let (digits, rest) ← parseFrame input
|
| 51 |
+
let name := bitsValue digits
|
| 52 |
+
if digits = name.bits then some (name, rest) else none
|
| 53 |
+
|
| 54 |
+
def parseLiteral : List Bool → Option (Literal × List Bool)
|
| 55 |
+
| sign :: input => do
|
| 56 |
+
let (name, rest) ← parseName input
|
| 57 |
+
return (⟨name, sign⟩, rest)
|
| 58 |
+
| [] => none
|
| 59 |
+
|
| 60 |
+
def parseClause (input : List Bool) : Option (Clause × List Bool) := do
|
| 61 |
+
let (a, input) ← parseLiteral input
|
| 62 |
+
let (b, input) ← parseLiteral input
|
| 63 |
+
let (c, rest) ← parseLiteral input
|
| 64 |
+
return (#v[a, b, c], rest)
|
| 65 |
+
|
| 66 |
+
def parseClauses : Nat → List Bool → Option (List Clause × List Bool)
|
| 67 |
+
| 0, _ => none
|
| 68 |
+
| _fuel + 1, false :: rest => some ([], rest)
|
| 69 |
+
| fuel + 1, true :: input => do
|
| 70 |
+
let (clause, input) ← parseClause input
|
| 71 |
+
let (clauses, rest) ← parseClauses fuel input
|
| 72 |
+
return (clause :: clauses, rest)
|
| 73 |
+
| _ + 1, [] => none
|
| 74 |
+
|
| 75 |
+
def decodeFormula (input : List Bool) : Option Formula := do
|
| 76 |
+
let (clauses, rest) ← parseClauses (input.length + 1) input
|
| 77 |
+
if rest = [] then some ⟨clauses⟩ else none
|
| 78 |
+
|
| 79 |
+
end UniqueGames.BinaryEncoding
|
| 80 |
+
|
| 81 |
+
namespace VertexCover
|
| 82 |
+
|
| 83 |
+
def ThreeSAT (input : List Bool) : Prop :=
|
| 84 |
+
∃ formula, UniqueGames.BinaryEncoding.decodeFormula input = some formula ∧
|
| 85 |
+
formula.Satisfiable
|
| 86 |
+
|
| 87 |
+
structure ExplicitGraph where
|
| 88 |
+
n : ℕ
|
| 89 |
+
edges : List (Fin n × Fin n)
|
| 90 |
+
increasing : ∀ e ∈ edges, e.1 < e.2
|
| 91 |
+
nodup : edges.Nodup
|
| 92 |
+
|
| 93 |
+
namespace ExplicitGraph
|
| 94 |
+
|
| 95 |
+
def Cover (G : ExplicitGraph) (S : Finset (Fin G.n)) : Prop :=
|
| 96 |
+
∀ e ∈ G.edges, e.1 ∈ S ∨ e.2 ∈ S
|
| 97 |
+
|
| 98 |
+
instance (G : ExplicitGraph) (S : Finset (Fin G.n)) : Decidable (G.Cover S) :=
|
| 99 |
+
inferInstanceAs (Decidable (∀ e ∈ G.edges, e.1 ∈ S ∨ e.2 ∈ S))
|
| 100 |
+
|
| 101 |
+
noncomputable def coverNumber (G : ExplicitGraph) : ℕ :=
|
| 102 |
+
Nat.find (show ∃ k : ℕ, ∃ S : Finset (Fin G.n), G.Cover S ∧ S.card = k from
|
| 103 |
+
⟨G.n, Finset.univ, by simp [Cover], by simp⟩)
|
| 104 |
+
|
| 105 |
+
def bits (G : ExplicitGraph) : List Bool :=
|
| 106 |
+
let names := [G.n] ++ List.range G.n ++ [G.edges.length] ++
|
| 107 |
+
G.edges.flatMap (fun e => [e.1.val, e.2.val])
|
| 108 |
+
names.flatMap UniqueGames.BinaryEncoding.nameBits
|
| 109 |
+
|
| 110 |
+
end ExplicitGraph
|
| 111 |
+
|
| 112 |
+
def FiniteAlphabet (M : Turing.FinTM2) : Prop := ∀ k, Finite (M.Γ k)
|
| 113 |
+
|
| 114 |
+
structure GapReduction (m : ℕ) where
|
| 115 |
+
construct : List Bool → ExplicitGraph
|
| 116 |
+
computation : Turing.TM2ComputableInPolyTime (id : List Bool → List Bool)
|
| 117 |
+
ExplicitGraph.bits construct
|
| 118 |
+
finiteAlphabet : FiniteAlphabet computation.tm
|
| 119 |
+
completeness : ∀ input, ThreeSAT input →
|
| 120 |
+
((construct input).coverNumber : ℝ) <
|
| 121 |
+
(1 / 2 + 1 / (m : ℝ)) * (construct input).n
|
| 122 |
+
soundness : ∀ input, ¬ ThreeSAT input →
|
| 123 |
+
(1 - 1 / (m : ℝ)) * (construct input).n <
|
| 124 |
+
((construct input).coverNumber : ℝ)
|
| 125 |
+
|
| 126 |
+
def natListBits (L : List ℕ) : List Bool :=
|
| 127 |
+
(L.length :: L).flatMap UniqueGames.BinaryEncoding.nameBits
|
| 128 |
+
|
| 129 |
+
structure Approximation (α : ℝ) where
|
| 130 |
+
run : ExplicitGraph → List ℕ
|
| 131 |
+
computation : Turing.TM2ComputableInPolyTime ExplicitGraph.bits natListBits run
|
| 132 |
+
finiteAlphabet : FiniteAlphabet computation.tm
|
| 133 |
+
nodup : ∀ G, (run G).Nodup
|
| 134 |
+
vertices : ∀ G, ∀ v ∈ run G, v < G.n
|
| 135 |
+
covers : ∀ G, ∀ e ∈ G.edges, e.1.val ∈ run G ∨ e.2.val ∈ run G
|
| 136 |
+
quality : ∀ G, ((run G).length : ℝ) ≤ α * (G.coverNumber : ℝ)
|
| 137 |
+
|
| 138 |
+
structure ThreeSATDecision where
|
| 139 |
+
run : List Bool → Bool
|
| 140 |
+
computation : Turing.TM2ComputableInPolyTime (id : List Bool → List Bool)
|
| 141 |
+
(fun b : Bool => [b]) run
|
| 142 |
+
finiteAlphabet : FiniteAlphabet computation.tm
|
| 143 |
+
correct : ∀ input, run input = true ↔ ThreeSAT input
|
| 144 |
+
|
| 145 |
+
theorem explicit_cover_gap (m : ℕ) (hm : 4 ≤ m) : Nonempty (GapReduction m) := by
|
| 146 |
+
sorry
|
| 147 |
+
|
| 148 |
+
theorem every_fixed_factor_below_two (α : ℝ) (hα : 1 ≤ α) (hα2 : α < 2)
|
| 149 |
+
(algorithm : Approximation α) : Nonempty ThreeSATDecision := by
|
| 150 |
+
sorry
|
| 151 |
+
|
| 152 |
+
end VertexCover
|
| 153 |
+
|
| 154 |
+
end OAI
|
lean/ComparatorChallenges/VlasovMaxwell.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"challenge_module": "ComparatorChallenges.VlasovMaxwell",
|
| 3 |
+
"solution_module": "OAI.Analysis.VlasovMaxwell.Main",
|
| 4 |
+
"theorem_names": [
|
| 5 |
+
"OAI.RVM.global_classical_solution"
|
| 6 |
+
],
|
| 7 |
+
"definition_names": [],
|
| 8 |
+
"permitted_axioms": [
|
| 9 |
+
"propext",
|
| 10 |
+
"Quot.sound",
|
| 11 |
+
"Classical.choice"
|
| 12 |
+
],
|
| 13 |
+
"enable_nanoda": false
|
| 14 |
+
}
|
lean/ComparatorChallenges/VlasovMaxwell.lean
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Mathlib
|
| 2 |
+
|
| 3 |
+
namespace OAI
|
| 4 |
+
|
| 5 |
+
noncomputable section
|
| 6 |
+
open MeasureTheory Set
|
| 7 |
+
open scoped ContDiff
|
| 8 |
+
namespace RVM
|
| 9 |
+
|
| 10 |
+
abbrev Vec := EuclideanSpace ℝ (Fin 3)
|
| 11 |
+
abbrev Phase := Vec × Vec
|
| 12 |
+
abbrev Particle := ℝ × Phase → ℝ
|
| 13 |
+
abbrev Field := ℝ × Vec → Vec
|
| 14 |
+
|
| 15 |
+
def q (v : Vec) : ℝ := Real.sqrt (1 + ‖v‖ ^ 2)
|
| 16 |
+
def velocity (v : Vec) : Vec := (q v)⁻¹ • v
|
| 17 |
+
|
| 18 |
+
def basis (i : Fin 3) : Vec := WithLp.toLp 2 (Pi.single i (1 : ℝ))
|
| 19 |
+
def dot (a b : Vec) : ℝ := ∑ i : Fin 3, a i * b i
|
| 20 |
+
def cross (a b : Vec) : Vec := WithLp.toLp 2
|
| 21 |
+
![a 1 * b 2 - a 2 * b 1, a 2 * b 0 - a 0 * b 2,
|
| 22 |
+
a 0 * b 1 - a 1 * b 0]
|
| 23 |
+
|
| 24 |
+
def spatialPartial (g : Vec → ℝ) (x : Vec) (i : Fin 3) : ℝ :=
|
| 25 |
+
fderiv ℝ g x (basis i)
|
| 26 |
+
def divergence (F : Vec → Vec) (x : Vec) : ℝ :=
|
| 27 |
+
∑ i : Fin 3, spatialPartial (fun y => F y i) x i
|
| 28 |
+
|
| 29 |
+
def curl (F : Vec → Vec) (x : Vec) : Vec := WithLp.toLp 2
|
| 30 |
+
![spatialPartial (fun y => F y 2) x 1 - spatialPartial (fun y => F y 1) x 2,
|
| 31 |
+
spatialPartial (fun y => F y 0) x 2 - spatialPartial (fun y => F y 2) x 0,
|
| 32 |
+
spatialPartial (fun y => F y 1) x 0 - spatialPartial (fun y => F y 0) x 1]
|
| 33 |
+
|
| 34 |
+
def rho (g : Phase → ℝ) (x : Vec) : ℝ := ∫ v : Vec, g (x, v)
|
| 35 |
+
def current (g : Phase → ℝ) (x : Vec) : Vec :=
|
| 36 |
+
∫ v : Vec, g (x, v) • velocity v
|
| 37 |
+
|
| 38 |
+
structure Datum where
|
| 39 |
+
f₀ : Phase → ℝ
|
| 40 |
+
E₀ : Vec → Vec
|
| 41 |
+
B₀ : Vec → Vec
|
| 42 |
+
|
| 43 |
+
def BoundedSmooth (F : Vec → Vec) : Prop :=
|
| 44 |
+
ContDiff ℝ ∞ F ∧ ∀ n : ℕ, ∃ C : ℝ, ∀ x : Vec,
|
| 45 |
+
‖iteratedFDeriv ℝ n F x‖ ≤ C
|
| 46 |
+
|
| 47 |
+
def Admissible (d : Datum) : Prop :=
|
| 48 |
+
ContDiff ℝ ∞ d.f₀ ∧ HasCompactSupport d.f₀ ∧ (∀ z, 0 ≤ d.f₀ z) ∧
|
| 49 |
+
BoundedSmooth d.E₀ ∧ BoundedSmooth d.B₀ ∧
|
| 50 |
+
MemLp d.E₀ 2 volume ∧ MemLp d.B₀ 2 volume ∧
|
| 51 |
+
(∀ x, divergence d.E₀ x = rho d.f₀ x) ∧
|
| 52 |
+
(∀ x, divergence d.B₀ x = 0)
|
| 53 |
+
|
| 54 |
+
structure Solution where
|
| 55 |
+
f : Particle
|
| 56 |
+
E : Field
|
| 57 |
+
B : Field
|
| 58 |
+
|
| 59 |
+
def particleHalfSpace : Set (ℝ × Phase) := {z | 0 ≤ z.1}
|
| 60 |
+
def fieldHalfSpace : Set (ℝ × Vec) := {z | 0 ≤ z.1}
|
| 61 |
+
def particleSlab (T : ℝ) : Set (ℝ × Phase) := {z | z.1 ∈ Icc 0 T}
|
| 62 |
+
def fieldSlab (T : ℝ) : Set (ℝ × Vec) := {z | z.1 ∈ Icc 0 T}
|
| 63 |
+
|
| 64 |
+
def TimeContinuousL2 (F : Field) : Prop :=
|
| 65 |
+
∃ F₂ : ℝ → Lp Vec 2 (volume : Measure Vec),
|
| 66 |
+
ContinuousOn F₂ (Ici 0) ∧
|
| 67 |
+
∀ t, 0 ≤ t → (F₂ t : Vec → Vec) =ᵐ[volume] (fun x => F (t, x))
|
| 68 |
+
|
| 69 |
+
def Equations (s : Solution) : Prop := ∀ t, 0 ≤ t →
|
| 70 |
+
(∀ x v,
|
| 71 |
+
derivWithin (fun t' => s.f (t', x, v)) (Ici 0) t +
|
| 72 |
+
(∑ i : Fin 3, velocity v i * spatialPartial (fun y => s.f (t, y, v)) x i) +
|
| 73 |
+
(∑ i : Fin 3, (s.E (t, x) + cross (velocity v) (s.B (t, x))) i *
|
| 74 |
+
spatialPartial (fun v' => s.f (t, x, v')) v i) = 0) ∧
|
| 75 |
+
(∀ x, derivWithin (fun t' => s.E (t', x)) (Ici 0) t -
|
| 76 |
+
curl (fun y => s.B (t, y)) x = -current (fun z => s.f (t, z)) x) ∧
|
| 77 |
+
(∀ x, derivWithin (fun t' => s.B (t', x)) (Ici 0) t +
|
| 78 |
+
curl (fun y => s.E (t, y)) x = 0) ∧
|
| 79 |
+
(∀ x, divergence (fun y => s.E (t, y)) x = rho (fun z => s.f (t, z)) x) ∧
|
| 80 |
+
(∀ x, divergence (fun y => s.B (t, y)) x = 0)
|
| 81 |
+
|
| 82 |
+
def CompactOnFiniteHorizons (s : Solution) : Prop :=
|
| 83 |
+
∀ T : ℝ, 0 ≤ T → ∃ K : Set Phase, IsCompact K ∧
|
| 84 |
+
∀ t ∈ Icc 0 T, tsupport (fun z => s.f (t, z)) ⊆ K
|
| 85 |
+
|
| 86 |
+
def Classical (d : Datum) (s : Solution) : Prop :=
|
| 87 |
+
ContDiffOn ℝ 1 s.f particleHalfSpace ∧
|
| 88 |
+
ContDiffOn ℝ 1 s.E fieldHalfSpace ∧ ContDiffOn ℝ 1 s.B fieldHalfSpace ∧
|
| 89 |
+
(∀ t, 0 ≤ t → ∀ z, 0 ≤ s.f (t, z)) ∧
|
| 90 |
+
TimeContinuousL2 s.E ∧ TimeContinuousL2 s.B ∧
|
| 91 |
+
CompactOnFiniteHorizons s ∧ Equations s ∧
|
| 92 |
+
(∀ z, s.f (0, z) = d.f₀ z) ∧
|
| 93 |
+
(∀ x, s.E (0, x) = d.E₀ x) ∧ (∀ x, s.B (0, x) = d.B₀ x)
|
| 94 |
+
|
| 95 |
+
def SmoothOnFiniteHorizons (s : Solution) : Prop := ∀ T : ℝ, 0 ≤ T →
|
| 96 |
+
ContDiffOn ℝ ∞ s.f (particleSlab T) ∧
|
| 97 |
+
ContDiffOn ℝ ∞ s.E (fieldSlab T) ∧ ContDiffOn ℝ ∞ s.B (fieldSlab T)
|
| 98 |
+
|
| 99 |
+
def SameNonnegativeTime (s s' : Solution) : Prop := ∀ t, 0 ≤ t →
|
| 100 |
+
(∀ z, s.f (t, z) = s'.f (t, z)) ∧
|
| 101 |
+
(∀ x, s.E (t, x) = s'.E (t, x)) ∧ (∀ x, s.B (t, x) = s'.B (t, x))
|
| 102 |
+
|
| 103 |
+
theorem global_classical_solution (d : Datum) (hd : Admissible d) :
|
| 104 |
+
∃ s : Solution, Classical d s ∧ SmoothOnFiniteHorizons s ∧
|
| 105 |
+
∀ s' : Solution, Classical d s' → SameNonnegativeTime s s' := by
|
| 106 |
+
sorry
|
| 107 |
+
|
| 108 |
+
end RVM
|
| 109 |
+
|
| 110 |
+
end
|
| 111 |
+
|
| 112 |
+
end OAI
|
lean/ComparatorChallenges/WLIdentification.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"challenge_module": "ComparatorChallenges.WLIdentification",
|
| 3 |
+
"solution_module": "OAI.Computability.WLIdentification.Main",
|
| 4 |
+
"theorem_names": [
|
| 5 |
+
"OAI.WLIdentification.main"
|
| 6 |
+
],
|
| 7 |
+
"definition_names": [],
|
| 8 |
+
"permitted_axioms": [
|
| 9 |
+
"propext",
|
| 10 |
+
"Quot.sound",
|
| 11 |
+
"Classical.choice"
|
| 12 |
+
],
|
| 13 |
+
"enable_nanoda": false
|
| 14 |
+
}
|
lean/ComparatorChallenges/WLIdentification.lean
ADDED
|
@@ -0,0 +1,146 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Mathlib
|
| 2 |
+
|
| 3 |
+
namespace OAI
|
| 4 |
+
|
| 5 |
+
namespace WLIdentification
|
| 6 |
+
|
| 7 |
+
structure Graph where
|
| 8 |
+
order : ℕ
|
| 9 |
+
edge : Fin order → Fin order → Bool
|
| 10 |
+
symmetric : ∀ u v, edge u v = edge v u
|
| 11 |
+
loopless : ∀ u, edge u u = false
|
| 12 |
+
|
| 13 |
+
def Isomorphic (G H : Graph) : Prop :=
|
| 14 |
+
∃ e : Fin G.order ≃ Fin H.order, ∀ u v, G.edge u v = H.edge (e u) (e v)
|
| 15 |
+
|
| 16 |
+
/-- Colors retain their full history, and hence are shared between graphs. -/
|
| 17 |
+
def NeighborColor : ℕ → Type
|
| 18 |
+
| 0 => Unit
|
| 19 |
+
| s + 1 => NeighborColor s × Multiset (NeighborColor s)
|
| 20 |
+
|
| 21 |
+
def neighborColor (G : Graph) : (s : ℕ) → Fin G.order → NeighborColor s
|
| 22 |
+
| 0, _ => ()
|
| 23 |
+
| s + 1, v => (neighborColor G s v,
|
| 24 |
+
(Finset.univ.filter (fun w => G.edge v w = true)).val.map (neighborColor G s))
|
| 25 |
+
|
| 26 |
+
def neighborHistogram (G : Graph) (s : ℕ) : Multiset (NeighborColor s) :=
|
| 27 |
+
Finset.univ.val.map (neighborColor G s)
|
| 28 |
+
|
| 29 |
+
def TupleColor (k : ℕ) : ℕ → Type
|
| 30 |
+
| 0 => (Fin k → Fin k → Bool) × (Fin k → Fin k → Bool)
|
| 31 |
+
| s + 1 => TupleColor k s × Multiset (Fin k → TupleColor k s)
|
| 32 |
+
|
| 33 |
+
/-- Joint update: one multiset of whole replacement vectors, not independent marginals. -/
|
| 34 |
+
def tupleColor (G : Graph) (k : ℕ) : (s : ℕ) → (Fin k → Fin G.order) → TupleColor k s
|
| 35 |
+
| 0, v => (fun i j => decide (v i = v j), fun i j => G.edge (v i) (v j))
|
| 36 |
+
| s + 1, v => (tupleColor G k s v,
|
| 37 |
+
Finset.univ.val.map (fun z => fun i => tupleColor G k s (Function.update v i z)))
|
| 38 |
+
|
| 39 |
+
def tupleHistogram (G : Graph) (k s : ℕ) : Multiset (TupleColor k s) :=
|
| 40 |
+
Finset.univ.val.map (tupleColor G k s)
|
| 41 |
+
|
| 42 |
+
def Equivalent (k : ℕ) (G H : Graph) : Prop :=
|
| 43 |
+
if k = 1 then ∀ s, neighborHistogram G s = neighborHistogram H s
|
| 44 |
+
else ∀ s, tupleHistogram G k s = tupleHistogram H k s
|
| 45 |
+
|
| 46 |
+
/-- There is no restriction to mates from a graph construction or to a selected order. -/
|
| 47 |
+
def Identifies (k : ℕ) (G : Graph) : Prop :=
|
| 48 |
+
∀ H : Graph, Equivalent k G H → Isomorphic G H
|
| 49 |
+
|
| 50 |
+
/-- The infimum of the positive identifying dimensions; this set is nonempty for finite G. -/
|
| 51 |
+
noncomputable def WLdim (G : Graph) : ℕ :=
|
| 52 |
+
sInf {k : ℕ | 0 < k ∧ Identifies k G}
|
| 53 |
+
|
| 54 |
+
abbrev Word := List Bool
|
| 55 |
+
abbrev BinaryLanguage := Set Word
|
| 56 |
+
|
| 57 |
+
def binaryValue (bits : Word) : ℕ :=
|
| 58 |
+
bits.foldl (fun z b => 2 * z + if b then 1 else 0) 0
|
| 59 |
+
|
| 60 |
+
def matrixWord (G : Graph) : Word :=
|
| 61 |
+
(List.ofFn (fun i : Fin G.order => List.ofFn (G.edge i))).flatten
|
| 62 |
+
|
| 63 |
+
/-- Unary order header, row-major binary matrix, then most-significant-first binary k. -/
|
| 64 |
+
def inputWord (G : Graph) (bits : Word) : Word :=
|
| 65 |
+
List.replicate G.order true ++ [false] ++ matrixWord G ++ bits
|
| 66 |
+
|
| 67 |
+
/-- A malformed word is rejected: membership requires a valid nonempty simple matrix and k>0. -/
|
| 68 |
+
def dimensionLanguage : BinaryLanguage :=
|
| 69 |
+
{w | ∃ (G : Graph) (bits : Word),
|
| 70 |
+
0 < G.order ∧ (∃ tail, bits = true :: tail) ∧ 0 < binaryValue bits ∧
|
| 71 |
+
w = inputWord G bits ∧ WLdim G ≤ binaryValue bits}
|
| 72 |
+
|
| 73 |
+
/- The deterministic local machine model is explicit; no oracle or arbitrary
|
| 74 |
+
state-transition on whole inputs is included. Both alphabets are fixed finite
|
| 75 |
+
types for each machine. Extra symbols and states allow arbitrary finite tables. -/
|
| 76 |
+
inductive Move where
|
| 77 |
+
| left | stay | right
|
| 78 |
+
deriving DecidableEq
|
| 79 |
+
|
| 80 |
+
def Move.displacement : Move → ℤ
|
| 81 |
+
| .left => -1
|
| 82 |
+
| .stay => 0
|
| 83 |
+
| .right => 1
|
| 84 |
+
|
| 85 |
+
structure Machine where
|
| 86 |
+
extraSymbols : ℕ
|
| 87 |
+
extraStates : ℕ
|
| 88 |
+
transition : Fin (extraStates + 3) → Fin (extraSymbols + 3) →
|
| 89 |
+
Fin (extraStates + 3) × Fin (extraSymbols + 3) × Move
|
| 90 |
+
|
| 91 |
+
structure Configuration (M : Machine) where
|
| 92 |
+
state : Fin (M.extraStates + 3)
|
| 93 |
+
head : ℤ
|
| 94 |
+
tape : ℤ → Fin (M.extraSymbols + 3)
|
| 95 |
+
|
| 96 |
+
def inputSymbol (M : Machine) (b : Bool) : Fin (M.extraSymbols + 3) :=
|
| 97 |
+
if b then 2 else 1
|
| 98 |
+
|
| 99 |
+
def initial (M : Machine) (w : Word) : Configuration M where
|
| 100 |
+
state := 0
|
| 101 |
+
head := 0
|
| 102 |
+
tape z := if 0 ≤ z then (w[z.toNat]?).elim 0 (inputSymbol M) else 0
|
| 103 |
+
|
| 104 |
+
def Halted {M : Machine} (c : Configuration M) : Prop :=
|
| 105 |
+
c.state = 1 ∨ c.state = 2
|
| 106 |
+
|
| 107 |
+
/-- One read/write/head-movement transition. A halted configuration is frozen. -/
|
| 108 |
+
def step (M : Machine) (c : Configuration M) : Configuration M :=
|
| 109 |
+
if c.state = 1 ∨ c.state = 2 then c else
|
| 110 |
+
let t := M.transition c.state (c.tape c.head)
|
| 111 |
+
{ state := t.1, head := c.head + t.2.2.displacement,
|
| 112 |
+
tape := Function.update c.tape c.head t.2.1 }
|
| 113 |
+
|
| 114 |
+
def run (M : Machine) (w : Word) (t : ℕ) : Configuration M :=
|
| 115 |
+
(step M)^[t] (initial M w)
|
| 116 |
+
|
| 117 |
+
/-- Output is the binary word beginning at origin and ending at its first blank. -/
|
| 118 |
+
def Output {M : Machine} (c : Configuration M) (w : Word) : Prop :=
|
| 119 |
+
(∀ i : Fin w.length, c.tape (i.val : ℤ) = inputSymbol M w[i]) ∧
|
| 120 |
+
c.tape (w.length : ℤ) = 0
|
| 121 |
+
|
| 122 |
+
/-- Uniform genuine executions on every bit word, including malformed graph words. -/
|
| 123 |
+
def DecidesWithin (M : Machine) (L : BinaryLanguage) (bound : ℕ → ℕ) : Prop :=
|
| 124 |
+
∀ w, ∃ t ≤ bound w.length, Halted (run M w t) ∧ ((run M w t).state = 1 ↔ w ∈ L)
|
| 125 |
+
|
| 126 |
+
def InEXPTIME (L : BinaryLanguage) : Prop :=
|
| 127 |
+
∃ (M : Machine) (C d : ℕ),
|
| 128 |
+
DecidesWithin M L (fun n => 2 ^ (C * (n + 1) ^ d))
|
| 129 |
+
|
| 130 |
+
def ComputesWithin (M : Machine) (f : Word → Word) (bound : ℕ → ℕ) : Prop :=
|
| 131 |
+
∀ w, ∃ t ≤ bound w.length, (run M w t).state = 1 ∧ Output (run M w t) (f w)
|
| 132 |
+
|
| 133 |
+
def PolytimeManyOne (L S : BinaryLanguage) : Prop :=
|
| 134 |
+
∃ (f : Word → Word) (M : Machine) (C d : ℕ),
|
| 135 |
+
ComputesWithin M f (fun n => C * (n + 1) ^ d) ∧ ∀ w, w ∈ L ↔ f w ∈ S
|
| 136 |
+
|
| 137 |
+
def EXPTIMEComplete (S : BinaryLanguage) : Prop :=
|
| 138 |
+
InEXPTIME S ∧ ∀ L : BinaryLanguage, InEXPTIME L → PolytimeManyOne L S
|
| 139 |
+
|
| 140 |
+
theorem main : EXPTIMEComplete dimensionLanguage :=
|
| 141 |
+
by
|
| 142 |
+
sorry
|
| 143 |
+
|
| 144 |
+
end WLIdentification
|
| 145 |
+
|
| 146 |
+
end OAI
|