Add lean source and binary files (part 2)
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
Files changed (50)
- lean/ComparatorChallenges/ExactInfiniteness.leanAdded+179
- lean/ComparatorChallenges/ExactQuantumFactoring.jsonAdded+14
- lean/ComparatorChallenges/ExactQuantumFactoring.leanAdded+154
- lean/ComparatorChallenges/FKCRT.jsonAdded+14
- lean/ComparatorChallenges/FKCRT.leanAdded+214
- lean/ComparatorChallenges/FactorGeneration.jsonAdded+14
- lean/ComparatorChallenges/FactorGeneration.leanAdded+50
- lean/ComparatorChallenges/FalconerAllDimensions.jsonAdded+14
- lean/ComparatorChallenges/FalconerAllDimensions.leanAdded+19
- lean/ComparatorChallenges/FillingCoefficient.jsonAdded+14
- lean/ComparatorChallenges/FillingCoefficient.leanAdded+130
- lean/ComparatorChallenges/FiniteCircle.jsonAdded+14
- lean/ComparatorChallenges/FiniteCircle.leanAdded+228
- lean/ComparatorChallenges/FiniteCongruenceGraph.jsonAdded+13
- lean/ComparatorChallenges/FiniteCongruenceGraph.leanAdded+63
- lean/ComparatorChallenges/FiniteEntropySeparation.jsonAdded+14
- lean/ComparatorChallenges/FiniteEntropySeparation.leanAdded+125
- lean/ComparatorChallenges/FiniteFactor.jsonAdded+14
- lean/ComparatorChallenges/FiniteFactor.leanAdded+46
- lean/ComparatorChallenges/FinitisticAsymmetry.jsonAdded+14
- lean/ComparatorChallenges/FinitisticAsymmetry.leanAdded+41
- lean/ComparatorChallenges/FixedClauseThreshold.jsonAdded+14
- lean/ComparatorChallenges/FixedClauseThreshold.leanAdded+56
- lean/ComparatorChallenges/ForcedNavierStokesComputation.jsonAdded+14
- lean/ComparatorChallenges/ForcedNavierStokesComputation.leanAdded+232
- lean/ComparatorChallenges/ForestSpace.jsonAdded+14
- lean/ComparatorChallenges/ForestSpace.leanAdded+468
- lean/ComparatorChallenges/FormulaHitting.jsonAdded+13
- lean/ComparatorChallenges/FormulaHitting.leanAdded+66
- lean/ComparatorChallenges/FoulkesHowe.jsonAdded+14
- lean/ComparatorChallenges/FoulkesHowe.leanAdded+50
- lean/ComparatorChallenges/FourRowPermanent.jsonAdded+14
- lean/ComparatorChallenges/FourRowPermanent.leanAdded+48
- lean/ComparatorChallenges/FreeIsing.jsonAdded+14
- lean/ComparatorChallenges/FreeIsing.leanAdded+95
- lean/ComparatorChallenges/FreeUniformSpanningForest.jsonAdded+14
- lean/ComparatorChallenges/FreeUniformSpanningForest.leanAdded+149
- lean/ComparatorChallenges/GammaPassage.jsonAdded+14
- lean/ComparatorChallenges/GammaPassage.leanAdded+112
- lean/ComparatorChallenges/GaussianFiniteEntropy.jsonAdded+14
- lean/ComparatorChallenges/GaussianFiniteEntropy.leanAdded+205
- lean/ComparatorChallenges/GaussianInformation.jsonAdded+17
- lean/ComparatorChallenges/GaussianInformation.leanAdded+204
- lean/ComparatorChallenges/GaussianMoat.jsonAdded+14
- lean/ComparatorChallenges/GaussianMoat.leanAdded+41
- lean/ComparatorChallenges/GaussianPropeller.jsonAdded+14
- lean/ComparatorChallenges/GaussianPropeller.leanAdded+43
- lean/ComparatorChallenges/GaussianReplacement.jsonAdded+24
- lean/ComparatorChallenges/GaussianReplacement.leanAdded+524
- lean/ComparatorChallenges/GeneralMahler.jsonAdded+14
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179import Mathlib
namespace OAI
noncomputable sectionuniverse u vopen scoped TensorProduct ENNReal ComplexOrderopen UniformSpacenamespace WeakPureInfiniteness
section CompletedOperators
variable {domain codomain : Type*} [NormedAddCommGroup domain] [NormedSpace ℂ domain] [NormedAddCommGroup codomain] [NormedSpace ℂ codomain]
lemma norm_completion_le (operator : domain →L[ℂ] codomain) : ‖operator.completion‖ ≤ ‖operator‖ := by apply ContinuousLinearMap.opNorm_le_bound _ (norm_nonneg operator) intro vector induction vector using Completion.induction_on with | hp => exact isClosed_le (by fun_prop) (by fun_prop) | ih vector => simpa using operator.le_opNorm vector
lemma norm_completion (operator : domain →L[ℂ] codomain) : ‖operator.completion‖ = ‖operator‖ := by apply le_antisymm (norm_completion_le operator) apply ContinuousLinearMap.opNorm_le_bound _ (norm_nonneg _) intro vector simpa using operator.completion.le_opNorm (vector : Completion domain)
end CompletedOperators
structure ComplexHilbert where Carrier : Type u [normedAddCommGroup : NormedAddCommGroup Carrier] [innerProductSpace : InnerProductSpace ℂ Carrier] [completeSpace : CompleteSpace Carrier]
attribute [instance] ComplexHilbert.normedAddCommGroup ComplexHilbert.innerProductSpace ComplexHilbert.completeSpaceinstance : CoeSort ComplexHilbert.{u} (Type u) := ⟨ComplexHilbert.Carrier⟩
instance completedTensorCStar (H K : ComplexHilbert.{u}) : CStarAlgebra (Completion (H ⊗[ℂ] K) →L[ℂ] Completion (H ⊗[ℂ] K)) := inferInstance
instance hilbertOperatorsCStar (H : ComplexHilbert.{u}) : CStarAlgebra (H →L[ℂ] H) := inferInstance
structure SpatialRepresentation (A : Type u) (B : Type v) [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B] where left : ComplexHilbert.{max u v} right : ComplexHilbert.{max u v} leftRep : A →⋆ₙₐ[ℂ] (left →L[ℂ] left) rightRep : B →⋆ₙₐ[ℂ] (right →L[ℂ] right)
abbrev SpatialRepresentation.hilbert {A : Type u} {B : Type v} [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B] (π : SpatialRepresentation A B) : ComplexHilbert.{max u v} where Carrier := Completion (π.left ⊗[ℂ] π.right)
abbrev SpatialRepresentation.space {A : Type u} {B : Type v} [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B] (π : SpatialRepresentation A B) := Completion (π.left ⊗[ℂ] π.right)
def SpatialAmbient (A : Type u) (B : Type v) [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B] : Type (max u v + 1) := lp (fun π : SpatialRepresentation A B => π.space →L[ℂ] π.space) ∞
instance spatialAmbientCStar (A : Type u) (B : Type v) [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B] : NonUnitalCStarAlgebra (SpatialAmbient A B) := by unfold SpatialAmbient infer_instance
instance spatialAmbientCoeFun (A : Type u) (B : Type v) [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B] : CoeFun (SpatialAmbient A B) (fun _ => ∀ π : SpatialRepresentation A B, π.space →L[ℂ] π.space) := ⟨fun z => z.val⟩
def spatialElementary {A : Type u} {B : Type v} [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B] (a : A) (b : B) : SpatialAmbient A B := ⟨fun π => (TensorProduct.mapL (π.leftRep a) (π.rightRep b)).completion, memℓp_infty ⟨‖a‖ * ‖b‖, by rintro _ ⟨π, rfl⟩ dsimp only rw [norm_completion] exact (TensorProduct.norm_mapL_le _ _).trans (mul_le_mul (NonUnitalStarAlgHom.norm_apply_le π.leftRep a) (NonUnitalStarAlgHom.norm_apply_le π.rightRep b) (norm_nonneg _) (norm_nonneg _))⟩⟩
def minimalTensorSubalgebra (A : Type u) (B : Type v) [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B] : NonUnitalStarSubalgebra ℂ (SpatialAmbient A B) := (NonUnitalStarAlgebra.adjoin ℂ (Set.range fun p : A × B => spatialElementary p.1 p.2)).topologicalClosure
abbrev MinimalTensor (A : Type u) (B : Type v) [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B] := minimalTensorSubalgebra A B
instance (A : Type u) (B : Type v) [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B] : NonUnitalCStarAlgebra (MinimalTensor A B) := by letI : IsClosed ((minimalTensorSubalgebra A B : NonUnitalStarSubalgebra ℂ (SpatialAmbient A B)) : Set (SpatialAmbient A B)) := isClosed_closure exact inferInstance
section Exactness
variable {A : Type u} {C D : Type v} [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra C] [NonUnitalCStarAlgebra D]
def SpatialRepresentation.precompRight (π : SpatialRepresentation A D) (q : C →⋆ₙₐ[ℂ] D) : SpatialRepresentation A C where left := π.left right := π.right leftRep := π.leftRep rightRep := π.rightRep.comp q
def tensorKernelIdeal (q : C →⋆ₙₐ[ℂ] D) : NonUnitalStarSubalgebra ℂ (SpatialAmbient A C) := (NonUnitalStarAlgebra.adjoin ℂ {z | ∃ a : A, ∃ c : C, q c = 0 ∧ z = spatialElementary a c}).topologicalClosure
end Exactness
def Exact (A : Type u) [NonUnitalCStarAlgebra A] : Prop := ∀ (C D : Type u) [NonUnitalCStarAlgebra C] [NonUnitalCStarAlgebra D] (q : C →⋆ₙₐ[ℂ] D), Function.Surjective q → ∀ z : MinimalTensor A C, (∀ π : SpatialRepresentation A D, (z.val : SpatialAmbient A C) (π.precompRight q) = 0) → z.val ∈ tensorKernelIdeal (A := A) q
section Definitions
variable {A : Type*} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A]variable {m k : Type*} [Fintype m] [Fintype k]
def CuntzSubequiv (a : CStarMatrix m m A) (b : CStarMatrix k k A) : Prop := ∀ ε : ℝ, 0 < ε → ∃ v : CStarMatrix k m A, ‖v.conjTranspose * b * v - a‖ < ε
def blockSum (a : CStarMatrix m m A) (b : CStarMatrix k k A) : CStarMatrix (m ⊕ k) (m ⊕ k) A := CStarMatrix.ofMatrix (Matrix.fromBlocks (CStarMatrix.ofMatrix.symm a) 0 0 (CStarMatrix.ofMatrix.symm b))
def ProperlyInfinite (a : CStarMatrix m m A) : Prop := CuntzSubequiv (blockSum a a) a
def diagonalCopies (n : ℕ) (a : A) : CStarMatrix (Fin n) (Fin n) A := CStarMatrix.ofMatrix (Matrix.diagonal fun _ => a)
variable (A)
def WeaklyPurelyInfinite : Prop := ∃ n : ℕ, 1 ≤ n ∧ ∀ a : A, 0 ≤ a → a ≠ 0 → ProperlyInfinite (diagonalCopies n a)
def StronglyPurelyInfinite : Prop := ∀ a b : A, 0 ≤ a → 0 ≤ b → ∀ ε : ℝ, 0 < ε → ∃ s t : A, ‖star s * (a * a) * s - a * a‖ < ε ∧ ‖star t * (b * b) * t - b * b‖ < ε ∧ ‖star s * a * b * t‖ < ε
end Definitions
theorem exact_weaklyPurelyInfinite_individuallyProperlyInfinite_any {A : Type u} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] (hA : Exact A) (hW : WeaklyPurelyInfinite A) {a : A} (ha : 0 ≤ a) : ProperlyInfinite (diagonalCopies 1 a) := by sorry
theorem exact_weaklyPurelyInfinite_stronglyPurelyInfinite (A : Type u) [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] (hExact : Exact A) (hWeak : WeaklyPurelyInfinite A) : StronglyPurelyInfinite A := by sorry
end WeakPureInfiniteness
end
end OAI1234567891011121314{ "challenge_module": "ComparatorChallenges.ExactQuantumFactoring", "solution_module": "OAI.Computability.QuantumFactoring.Main", "theorem_names": [ "OAI.ExactQuantumFactoring.exact_quantum_factoring" ], "definition_names": [], "permitted_axioms": [ "propext", "Quot.sound", "Classical.choice" ], "enable_nanoda": false}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154import Mathlib
namespace OAI
namespace ExactQuantumFactoring
open scoped BigOperators
/-- The five primitive gates exactly as in Section 2. -/inductive Primitive where | not | cnot | toffoli | hadamard | phase deriving DecidableEq
def Primitive.arity : Primitive → ℕ | .not | .hadamard | .phase => 1 | .cnot => 2 | .toffoli => 3
def Primitive.code : Primitive → ℕ | .not => 0 | .cnot => 1 | .toffoli => 2 | .hadamard => 3 | .phase => 4
/-- An inverse and/or one added control. This is a fixed set of 20 gate names,not an unbounded-control or arbitrary-angle gate model. -/structure Gate where primitive : Primitive inverse : Bool controlled : Bool deriving DecidableEq
def Gate.arity (g : Gate) : ℕ := g.primitive.arity + if g.controlled then 1 else 0
/-- Matrix entries are indexed by lists in wire order (row first, column second).Entries on ill-sized lists are irrelevant and set to zero. -/noncomputable def Primitive.matrix : Primitive → List Bool → List Bool → ℂ | .not, [a], [b] => if a = !b then 1 else 0 | .cnot, [a,b], [c,d] => if a = c ∧ b = Bool.xor c d then 1 else 0 | .toffoli, [a,b,c], [d,e,f] => if a = d ∧ b = e ∧ c = Bool.xor f (d && e) then 1 else 0 | .hadamard, [a], [b] => (if a && b then -1 else 1) / (Real.sqrt 2 : ℂ) | .phase, [a], [b] => if a = b then (if b then Complex.I else 1) else 0 | _, _, _ => 0
noncomputable def Gate.baseMatrix (g : Gate) (a b : List Bool) : ℂ := if g.inverse then star (g.primitive.matrix b a) else g.primitive.matrix a b
noncomputable def Gate.matrix (g : Gate) (a b : List Bool) : ℂ := if g.controlled then match a, b with | false :: a', false :: b' => if a' = b' then 1 else 0 | true :: a', true :: b' => g.baseMatrix a' b' | _, _ => 0 else g.baseMatrix a b
/-- A primitive is placed on distinct actual wires, with no operation ofunbounded arity hidden in a circuit instruction. -/structure Instruction (q : ℕ) where gate : Gate wire : Fin gate.arity → Fin q distinct : Function.Injective wire
abbrev Basis (q : ℕ) := Fin q → Boolabbrev State (q : ℕ) := Basis q → ℂ
noncomputable def Instruction.matrix {q : ℕ} (o : Instruction q) : Matrix (Basis q) (Basis q) ℂ := by classical exact fun a b => if ∀ i : Fin q, (∀ j, o.wire j ≠ i) → a i = b i then o.gate.matrix (List.ofFn (a ∘ o.wire)) (List.ofFn (b ∘ o.wire)) else 0
structure Circuit where qubits : ℕ instructions : List (Instruction qubits)
noncomputable def Circuit.apply (c : Circuit) (ψ : State c.qubits) : State c.qubits := c.instructions.foldl (fun v o => o.matrix.mulVec v) ψ
/-- Input wires are first, least significant bit first; all other wires start zero. -/def inputBasis (q ℓ N : ℕ) : Basis q := fun i => if i.val < ℓ then N.testBit i.val else false
noncomputable def Circuit.outputState (c : Circuit) (ℓ N : ℕ) : State c.qubits := by classical exact c.apply (fun x => if x = inputBasis c.qubits ℓ N then 1 else 0)
/-- The cutoff and padding are the standing parameters in Section 2. -/def paddedLength (ℓ : ℕ) : ℕ := max 128 ℓ
def readBit {q : ℕ} (x : Basis q) (i : ℕ) : Bool := if h : i < q then x ⟨i,h⟩ else false
/-- n entries of n bits each, in the n² wires immediately after the input. -/def outputList {q : ℕ} (ℓ : ℕ) (x : Basis q) : List ℕ := let n := paddedLength ℓ List.ofFn (fun a : Fin n => ∑ j ∈ Finset.range n, if readBit x (ℓ + a.val * n + j) then 2^j else 0)
/-- Complete nondecreasing prime factorization, multiplicities included,padded by zeros, as in Section 6. There is no primality oracle in the circuit. -/def CorrectEncoding (N n : ℕ) (xs : List ℕ) : Prop := ∃ ps : List ℕ, (∀ p ∈ ps, Nat.Prime p) ∧ ps.Pairwise (· ≤ ·) ∧ ps.prod = N ∧ ps.length ≤ n ∧ xs = ps ++ List.replicate (n - ps.length) 0
/-- Unnormalized Born sum on correct outputs; success is exactly one,not positivity, postselection, or a limiting high probability. -/noncomputable def Circuit.correctProbability (c : Circuit) (ℓ N : ℕ) : ℝ := by classical exact ∑ x : Basis c.qubits, if CorrectEncoding N (paddedLength ℓ) (outputList ℓ x) then Complex.normSq (c.outputState ℓ N x) else 0
/-- Unary natural words with delimiters make the circuit description explicit.Unary wire addresses cause at most polynomial overhead when width is polynomial. -/def natWord (k : ℕ) : List Bool := List.replicate k true ++ [false]
def Instruction.encode {q : ℕ} (o : Instruction q) : List Bool := natWord o.gate.primitive.code ++ [o.gate.inverse, o.gate.controlled] ++ (List.ofFn (fun i => o.wire i |>.val)).flatMap natWord
def Circuit.encode (c : Circuit) : List Bool := natWord c.qubits ++ natWord c.instructions.length ++ c.instructions.flatMap Instruction.encode
/-- A single finite-alphabet classical generator receives only the INPUT LENGTH.All stack alphabets, states and labels are finite: no large-integer unit-costoracle is hidden in TM2 push/branch functions. -/def Uniform (family : ℕ → Circuit) : Prop := ∃ generator : Turing.TM2ComputableInPolyTime (fun ℓ => List.replicate ℓ true) Circuit.encode family, ∀ k, Finite (generator.tm.Γ k)
def PolynomialResources (family : ℕ → Circuit) : Prop := ∃ bound : Polynomial ℕ, ∀ ℓ, (family ℓ).qubits ≤ bound.eval ℓ ∧ (family ℓ).instructions.length ≤ bound.eval ℓ
/-- Literal main endpoint: one length-uniform family, exact output for EVERYbinary integer N≥2, and worst-case polynomial gates AND qubits. -/def MainTheorem : Prop := ∃ family : ℕ → Circuit, Uniform family ∧ PolynomialResources family ∧ ∀ (ℓ N : ℕ), 2 ≤ N → N.size = ℓ → ℓ + (paddedLength ℓ)^2 ≤ (family ℓ).qubits ∧ (family ℓ).correctProbability ℓ N = 1
theorem exact_quantum_factoring : MainTheorem := by sorry
end ExactQuantumFactoring
end OAI1234567891011121314{ "challenge_module": "ComparatorChallenges.FKCRT", "solution_module": "OAI.Probability.FKMaps.Convergence", "theorem_names": [ "OAI.FKCRT.finite_fk_maps_converge_to_brownian_crt" ], "definition_names": [], "permitted_axioms": [ "propext", "Quot.sound", "Classical.choice" ], "enable_nanoda": false}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214import Mathlib
namespace OAI
/-!Finite Fortuin–Kasteleyn maps and the Brownian continuum random tree.
All combinatorial maps below have a distinguished dart 0 and are quotientedby orientation-preserving dart relabellings fixing that dart. A rotation systemwith Euler characteristic 2 encodes precisely a connected oriented-sphere map.No simplicity restriction is imposed. Vertices and edges are rotation andedge-reversal orbits, respectively. Every edge subset is included in the law.The index n here represents source size n+1, so the limit is through ALLpositive edge sizes, not a subsequence.
MetricMeasureData packages the actual distance, measurable space and measure,without using arbitrary representatives of measure-preserving isometry classesas a global typeclass. Valid objects are compact metric probability spaces.The GHP extended distance is the infimum over common isometric embeddings,represented by pseudometrics on the disjoint union; zero cross distances simplyidentify points in the common ambient space. Tests are bounded functionscontinuous for that distance on valid objects. Thus GHP convergence is writtenin its bounded-continuous-test (weak distributional convergence) definition.
A standard normalized Brownian excursion is represented in its standardthree-dimensional Bessel-bridge realization: the norm of three independentstandard Brownian bridges of duration 1. No rescaling of the excursion is used.-/
noncomputable sectionopen Set Filter MeasureTheory ProbabilityTheoryopen scoped Topology BigOperators ENNReal NNReal
namespace FKCRT
abbrev Dart (n : ℕ) := Fin (2 * (n + 1))
abbrev Orbit {n : ℕ} (s : Equiv.Perm (Dart n)) := Quotient (Equiv.Perm.SameCycle.setoid s)
def orbit {n : ℕ} (s : Equiv.Perm (Dart n)) (d : Dart n) : Orbit s := Quotient.mk _ d
instance {n : ℕ} (s : Equiv.Perm (Dart n)) : Fintype (Orbit s) := Fintype.ofFinite _
/-- The spanning graph with precisely the edges in A, with loops omitted onlyfrom adjacency: they still exist as edge orbits, have FK weight, and contributetwo darts to the degree measure. Omitting loops does not change distance or k. -/def spanningGraph {n : ℕ} (a s : Equiv.Perm (Dart n)) (A : Set (Orbit a)) : SimpleGraph (Orbit s) := SimpleGraph.fromRel fun v w => ∃ d : Dart n, orbit a d ∈ A ∧ orbit s d = v ∧ orbit s (a d) = w
/-- Labelled connected orientable genus-zero rotation systems. -/def MapConditions {n : ℕ} (P : Equiv.Perm (Dart n) × Equiv.Perm (Dart n)) : Prop := Function.Involutive P.1 ∧ (∀ d, P.1 d ≠ d) ∧ (spanningGraph P.1 P.2 Set.univ).Connected ∧ Nat.card (Orbit P.2) + Nat.card (Orbit (P.2 * P.1)) = n + 3
abbrev LabelledMap (n : ℕ) := {P : Equiv.Perm (Dart n) × Equiv.Perm (Dart n) // MapConditions P}
/-- Root-preserving isomorphism of oriented maps (both dart permutations intertwine). -/def MapIso {n : ℕ} (M N : LabelledMap n) : Prop := ∃ r : Equiv.Perm (Dart n), r 0 = 0 ∧ (∀ d, N.val.1 (r d) = r (M.val.1 d)) ∧ (∀ d, N.val.2 (r d) = r (M.val.2 d))
abbrev RootedMap (n : ℕ) := Quotient (Relation.EqvGen.setoid (@MapIso n))
instance (n : ℕ) : Fintype (RootedMap n) := Fintype.ofFinite _
def reversal {n : ℕ} (M : RootedMap n) : Equiv.Perm (Dart n) := M.out.val.1
def rotation {n : ℕ} (M : RootedMap n) : Equiv.Perm (Dart n) := M.out.val.2
abbrev Vertex {n : ℕ} (M : RootedMap n) := Orbit (rotation M)abbrev Edge {n : ℕ} (M : RootedMap n) := Orbit (reversal M)
def graph {n : ℕ} (M : RootedMap n) (A : Set (Edge M)) : SimpleGraph (Vertex M) := spanningGraph (reversal M) (rotation M) A
/-- The source k_M(A), including isolated vertices. -/def clusterCount {n : ℕ} (M : RootedMap n) (A : Finset (Edge M)) : ℕ := Nat.card (graph M (A : Set (Edge M))).ConnectedComponent
/-- Exact decorated finite-map weight from eq:finite-law. -/def fkWeight {n : ℕ} (q : ℝ) (M : RootedMap n) (A : Finset (Edge M)) : ℝ := Real.rpow q ((clusterCount M A : ℝ) + ((A.card : ℝ) - (Nat.card (Vertex M) : ℝ)) / 2)
def partition (q : ℝ) (n : ℕ) : ℝ := ∑ M : RootedMap n, ∑ A : Finset (Edge M), fkWeight q M A
/-- Unbundled presentation of a measured metric space; validity is specified below. -/structure MetricMeasureData where Carrier : Type distance : Carrier → Carrier → ℝ measurableSpace : MeasurableSpace Carrier mass : @Measure Carrier measurableSpace
/-- Exactly compact metric probability spaces, with their Borel sigma algebras. -/def MetricMeasureData.Valid (X : MetricMeasureData) : Prop := ∃ m : MetricSpace X.Carrier, letI := m (∀ x y, dist x y = X.distance x y) ∧ CompactSpace X.Carrier ∧ X.measurableSpace = borel X.Carrier ∧ X.mass Set.univ = 1
/-- Normalized degree measure is uniform dart mass pushed to vertices. -/def degreeMass {n : ℕ} (M : RootedMap n) : @Measure (Vertex M) ⊤ := letI : MeasurableSpace (Vertex M) := ⊤ ∑ d : Dart n, ENNReal.ofReal (1 / (2 * (n + 1) : ℝ)) • Measure.dirac (orbit (rotation M) d)
/-- Root and decoration are not included in the metric probability space. -/def mapSpace {n : ℕ} (scale : ℝ) (M : RootedMap n) : MetricMeasureData where Carrier := Vertex M distance v w := scale * ((graph M Set.univ).dist v w : ℝ) measurableSpace := ⊤ mass := degreeMass M
/-- An ambient pseudometric on the disjoint union giving isometric embeddings. -/def Amalgamates (X Y : MetricMeasureData) (m : PseudoMetricSpace (X.Carrier ⊕ Y.Carrier)) : Prop := letI := m (∀ x x', dist (Sum.inl x : X.Carrier ⊕ Y.Carrier) (Sum.inl x') = X.distance x x') ∧ (∀ y y', dist (Sum.inr y : X.Carrier ⊕ Y.Carrier) (Sum.inr y') = Y.distance y y')
def ambientCost (X Y : MetricMeasureData) (m : PseudoMetricSpace (X.Carrier ⊕ Y.Carrier)) : ℝ≥0∞ := letI := m letI : MeasurableSpace (X.Carrier ⊕ Y.Carrier) := borel _ max (Metric.hausdorffEDist (Set.range (Sum.inl : X.Carrier → X.Carrier ⊕ Y.Carrier)) (Set.range (Sum.inr : Y.Carrier → X.Carrier ⊕ Y.Carrier))) (levyProkhorovEDist (@Measure.map X.Carrier (X.Carrier ⊕ Y.Carrier) X.measurableSpace (borel _) Sum.inl X.mass) (@Measure.map Y.Carrier (X.Carrier ⊕ Y.Carrier) Y.measurableSpace (borel _) Sum.inr Y.mass))
/-- The common-isometric-embedding definition of the source GHP distance. -/def ghpEDist (X Y : MetricMeasureData) : ℝ≥0∞ := ⨅ m : {m : PseudoMetricSpace (X.Carrier ⊕ Y.Carrier) // Amalgamates X Y m}, ambientCost X Y m.val
/-- Bounded continuous tests on compact metric probability spaces modulomeasure-preserving isometry, expressed on presentations. -/def IsGHPTest (F : MetricMeasureData → ℝ) : Prop := (∃ C : ℝ, ∀ X, |F X| ≤ C) ∧ ∀ X, X.Valid → ∀ ε : ℝ, 0 < ε → ∃ δ : ℝ, 0 < δ ∧ ∀ Y, Y.Valid → ghpEDist X Y < ENNReal.ofReal δ → |F Y - F X| < ε
/-- Source excursion pseudometric, with the closed interval minimum. -/def excursionDist (e : unitInterval → ℝ) (s t : unitInterval) : ℝ := e s + e t - 2 * sInf (e '' Set.uIcc s t)
abbrev ExcursionTree (e : unitInterval → ℝ) := Quotient (Relation.EqvGen.setoid (fun s t => excursionDist e s t = 0))
def treeProjection (e : unitInterval → ℝ) (t : unitInterval) : ExcursionTree e := Quotient.mk _ t
/-- The quotient by d_e=0, its induced metric, and pushforward of uniform time.The equivalence closure is redundant for continuous e; the induced distanceis independent of representatives, as required by the pseudometric proof. -/def treeSpace (e : unitInterval → ℝ) : MetricMeasureData := letI : TopologicalSpace (ExcursionTree e) := TopologicalSpace.coinduced (treeProjection e) inferInstance letI : MeasurableSpace (ExcursionTree e) := borel _ { Carrier := ExcursionTree e distance := fun x y => excursionDist e x.out y.out measurableSpace := borel _ mass := Measure.map (treeProjection e) (volume : Measure unitInterval) }
/-- Standard normalized excursion, realized as the 3D Bessel bridge. -/def standardExcursion {Ω : Type} (B : Fin 3 → ℝ≥0 → Ω → ℝ) (ω : Ω) (t : unitInterval) : ℝ := Real.sqrt (∑ i : Fin 3, (B i ⟨(t : ℝ), t.property.1⟩ ω - (t : ℝ) * B i 1 ω) ^ 2)
/-- Exact expectation under the finite law, with n+1 edges. -/def finiteExpectation (q scale : ℝ) (n : ℕ) (F : MetricMeasureData → ℝ) : ℝ := ∑ M : RootedMap n, ∑ A : Finset (Edge M), (fkWeight q M A / partition q n) * F (mapSpace scale M)
def brownianExpectation {Ω : Type} [MeasurableSpace Ω] (P : Measure Ω) (B : Fin 3 → ℝ≥0 → Ω → ℝ) (F : MetricMeasureData → ℝ) : ℝ := ∫ ω, F (treeSpace (standardExcursion B ω)) ∂P
/-- thm:main. The quantifiers over Brownian realizations express that the limitis the standard excursion-tree law, not a coupling-specific object. -/def MainStatement : Prop := ∀ q : ℝ, 4 < q → ∃ c : ℝ, 0 < c ∧ ∀ (Ω : Type) (mΩ : MeasurableSpace Ω) (P : @Measure Ω mΩ), @IsProbabilityMeasure Ω mΩ P → ∀ B : Fin 3 → ℝ≥0 → Ω → ℝ, (∀ i, @IsBrownianReal Ω mΩ (B i) P) → @iIndepFun Ω (Fin 3) mΩ (fun _ => ℝ≥0 → ℝ) (fun _ => inferInstance) (fun i ω t => B i t ω) P → ∀ F : MetricMeasureData → ℝ, IsGHPTest F → Tendsto (fun n : ℕ => finiteExpectation q (c / Real.sqrt (n + 1)) n F) atTop (𝓝 (@brownianExpectation Ω mΩ P B F))
/-- Finite FK maps converge in GHP distribution to the standard Brownian CRT. -/theorem finite_fk_maps_converge_to_brownian_crt : MainStatement := by sorry
end FKCRTend
end OAI1234567891011121314{ "challenge_module": "ComparatorChallenges.FactorGeneration", "solution_module": "OAI.Analysis.FactorGeneration.Main", "theorem_names": [ "OAI.Generator.single_generation_of_II1_separable_predual" ], "definition_names": [], "permitted_axioms": [ "propext", "Quot.sound", "Classical.choice" ], "enable_nanoda": false}1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950import Mathlib.Analysis.CStarAlgebra.ContinuousLinearMapimport Mathlib.Analysis.InnerProductSpace.WeakOperatorTopologyimport Mathlib.Analysis.VonNeumannAlgebra.Basic
namespace OAI
noncomputable section
namespace Generator
universe u
variable {H : Type u} [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H]
attribute [-instance] instCStarAlgebraContinuousLinearMapComplexIdOfCompleteSpace
def WOTClosed (S : StarSubalgebra ℂ (H →L[ℂ] H)) : Prop := IsClosed {T : H →WOT[ℂ] H | T.toCLM ∈ S}
def wstar (s : Set (H →L[ℂ] H)) : StarSubalgebra ℂ (H →L[ℂ] H) := sInf {S | WOTClosed S ∧ s ⊆ S}
structure IsII1Factor (S : StarSubalgebra ℂ (H →L[ℂ] H)) : Prop where nonzero : (0 : H →L[ℂ] H) ≠ 1 weaklyClosed : WOTClosed S factor : ∀ x : S, (∀ y : S, y * x = x * y) → ∃ c : ℂ, x = algebraMap ℂ S c finite : ∀ v : S, star v * v = 1 → v * star v = 1 diffuse : ∀ p : S, IsStarProjection p → p ≠ 0 → ∃ q : S, IsStarProjection q ∧ q ≠ 0 ∧ q ≠ p ∧ p * q = q ∧ q * p = q
def HasSeparablePredual (S : StarSubalgebra ℂ (H →L[ℂ] H)) : Prop := ∃ (X : Type u) (_ : NormedAddCommGroup X) (_ : NormedSpace ℂ X) (_ : CompleteSpace X) (_ : TopologicalSpace.SeparableSpace X), Nonempty (StrongDual ℂ X ≃ₗᵢ⋆[ℂ] S)
def SinglyGenerated (S : StarSubalgebra ℂ (H →L[ℂ] H)) : Prop := ∃ x ∈ S, wstar {x} = S
attribute [instance] instCStarAlgebraContinuousLinearMapComplexIdOfCompleteSpace
theorem single_generation_of_II1_separable_predual (S : StarSubalgebra ℂ (H →L[ℂ] H)) (hS : IsII1Factor S) (hsep : HasSeparablePredual S) : SinglyGenerated S := by sorry
end Generator
end
end OAI1234567891011121314{ "challenge_module": "ComparatorChallenges.FalconerAllDimensions", "solution_module": "OAI.MeasureTheory.Falconer.Campaign123PlanarFurstenbergProof", "theorem_names": [ "OAI.Falconer.falconer_distance_conjecture" ], "definition_names": [], "permitted_axioms": [ "propext", "Quot.sound", "Classical.choice" ], "enable_nanoda": false}12345678910111213141516171819import Mathlib
namespace OAI
namespace Falconeropen MeasureTheoryopen scoped ENNReal
/-- A compact subset of Euclidean space with Hausdorff dimension greater thanhalf the ambient dimension determines a distance set of positive Lebesgue measure. -/theorem falconer_distance_conjecture : ∀ (d : ℕ), 2 ≤ d → ∀ E : Set (EuclideanSpace ℝ (Fin d)), IsCompact E → (d : ℝ≥0∞) / 2 < dimH E → 0 < volume {r : ℝ | ∃ x ∈ E, ∃ y ∈ E, dist x y = r} := by sorry
end Falconer
end OAI1234567891011121314{ "challenge_module": "ComparatorChallenges.FillingCoefficient", "solution_module": "OAI.Geometry.IntegralFillings.Main", "theorem_names": [ "OAI.SharpIntegralFillings.coefficient_optimal" ], "definition_names": [], "permitted_axioms": [ "propext", "Classical.choice", "Quot.sound" ], "enable_nanoda": false}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130import Mathlib
namespace OAI
open Set Filter MeasureTheoryopen scoped Topology ENNReal NNReal
namespace SharpIntegralFillings
attribute [local instance] Classical.propDecidable
universe u
abbrev Euc (k : ℕ) := EuclideanSpace ℝ (Fin k)abbrev Functional (X : Type u) (k : ℕ) := (X → ℝ) → (Fin k → X → ℝ) → ℝ
section MetricCurrents
variable {X : Type u} [MetricSpace X] [MeasurableSpace X] [BorelSpace X]
def BoundedLip (b : X → ℝ) : Prop := (∃ K : ℝ≥0, LipschitzWith K b) ∧ ∃ M : ℝ, ∀ x, |b x| ≤ M
def Admissible {k : ℕ} (b : X → ℝ) (π : Fin k → X → ℝ) : Prop := BoundedLip b ∧ ∀ i, ∃ K : ℝ≥0, LipschitzWith K (π i)
def Controls {k : ℕ} (T : Functional X k) (μ : Measure X) : Prop := ∀ (b : X → ℝ) (π : Fin k → X → ℝ), BoundedLip b → (∀ i, LipschitzWith 1 (π i)) → |T b π| ≤ ∫ x, |b x| ∂μ
noncomputable def mass {k : ℕ} (T : Functional X k) : ℝ := sInf {r : ℝ | ∃ μ : Measure X, IsFiniteMeasure μ ∧ Controls T μ ∧ r = μ.real univ}
structure IsMetricCurrent {k : ℕ} (T : Functional X k) : Prop where offDomain : ∀ b π, ¬Admissible b π → T b π = 0 linearFirst : ∀ b₁ b₂ π (a c : ℝ), BoundedLip b₁ → BoundedLip b₂ → (∀ i, ∃ K : ℝ≥0, LipschitzWith K (π i)) → T (fun x => a * b₁ x + c * b₂ x) π = a * T b₁ π + c * T b₂ π linearCoord : ∀ b π i f (a c : ℝ), Admissible b π → (∃ K : ℝ≥0, LipschitzWith K f) → T b (Function.update π i (fun x => a * π i x + c * f x)) = a * T b π + c * T b (Function.update π i f) sequentialContinuity : ∀ b π (πs : ℕ → Fin k → X → ℝ), BoundedLip b → (∀ i, ∃ K : ℝ≥0, ∀ j, LipschitzWith K (πs j i)) → (∀ i x, Tendsto (fun j => πs j i x) atTop (𝓝 (π i x))) → Tendsto (fun j => T b (πs j)) atTop (𝓝 (T b π)) locality : ∀ b π, Admissible b π → (∃ (i : Fin k) (U : Set X) (c : ℝ), IsOpen U ∧ Function.support b ⊆ U ∧ ∀ x ∈ U, π i x = c) → T b π = 0 finiteMass : ∃ μ : Measure X, IsFiniteMeasure μ ∧ Controls T μ
noncomputable def boundarySucc {k : ℕ} (T : Functional X (k + 1)) : Functional X k := fun b π => if Admissible b π then T (fun _ => 1) (Matrix.vecCons b π) else 0
noncomputable def boundary : {k : ℕ} → Functional X k → Functional X (k - 1) | 0, _ => fun _ _ => 0 | _ + 1, T => boundarySucc T
structure IntegerChart (X : Type u) [MetricSpace X] (k : ℕ) where domain : Set (Euc k) borel : MeasurableSet domain bounded : Bornology.IsBounded domain param : domain → X bilipschitz : ∃ L U : ℝ≥0, LipschitzWith L param ∧ AntilipschitzWith U param multiplicity : Euc k → ℤ integrable : Integrable (fun z => (multiplicity z : ℝ)) (volume.restrict domain)
namespace IntegerChart
variable {k : ℕ} (C : IntegerChart X k)
noncomputable def scalar (f : X → ℝ) (z : Euc k) : ℝ := if hz : z ∈ C.domain then f (C.param ⟨z, hz⟩) else 0
noncomputable def jacobian (π : Fin k → X → ℝ) (z : Euc k) : ℝ := Matrix.det (fun i j => (fderivWithin ℝ (C.scalar (π i)) C.domain z) (EuclideanSpace.single j 1))
noncomputable def action : Functional X k := fun b π => if Admissible b π then ∫ z in C.domain, (C.multiplicity z : ℝ) * C.scalar b z * C.jacobian π z else 0
def image : Set X := Set.range C.param
end IntegerChart
def IntegerRectifiable {k : ℕ} (T : Functional X k) : Prop := ∃ C : ℕ → IntegerChart X k, Pairwise (fun i j => Disjoint (C i).image (C j).image) ∧ (∀ i, IsMetricCurrent (C i).action) ∧ Summable (fun i => mass (C i).action) ∧ ∀ b π, T b π = ∑' i, (C i).action b π
def IsIntegral : (k : ℕ) → Functional X k → Prop | 0, T => IsMetricCurrent T ∧ IntegerRectifiable T | _ + 1, T => IsMetricCurrent T ∧ IntegerRectifiable T ∧ IsMetricCurrent (boundarySucc T) ∧ IntegerRectifiable (boundarySucc T)
abbrev IntegralCurrent (X : Type u) [MetricSpace X] [MeasurableSpace X] [BorelSpace X] (k : ℕ) := { T : Functional X k // IsIntegral k T }
def CompactlySupported {k : ℕ} (T : Functional X k) : Prop := ∃ K : Set X, IsCompact K ∧ ∀ b π, Admissible b π → (∀ x ∈ K, b x = 0) → T b π = 0
def IsCycle {k : ℕ} (T : Functional X k) : Prop := boundary T = fun _ _ => 0
end MetricCurrents
noncomputable def omega (k : ℕ) : ℝ := (volume (Metric.ball (0 : Euc k) 1)).toRealnoncomputable def sphereArea (n : ℕ) : ℝ := (n + 1 : ℝ) * omega (n + 1)noncomputable def fillingCoefficient (n : ℕ) : ℝ := 1 / ((n + 1 : ℝ) * (sphereArea n) ^ (1 / (n : ℝ)))noncomputable def fillingPower (n : ℕ) : ℝ := (n + 1 : ℝ) / (n : ℝ)
theorem coefficient_optimal (n : ℕ) (hn : 2 ≤ n) : ∃ T : IntegralCurrent (Euc (n + 1)) n, CompactlySupported T.val ∧ IsCycle T.val ∧ 0 < mass T.val ∧ ∀ S : IntegralCurrent (Euc (n + 1)) (n + 1), CompactlySupported S.val → boundarySucc S.val = T.val → fillingCoefficient n * (mass T.val) ^ fillingPower n ≤ mass S.val := by sorry
end SharpIntegralFillings
end OAI1234567891011121314{ "challenge_module": "ComparatorChallenges.FiniteCircle", "solution_module": "OAI.Combinatorics.FiniteCircle.Main", "theorem_names": [ "OAI.finiteCircle_fullMain" ], "definition_names": [], "permitted_axioms": [ "propext", "Quot.sound", "Classical.choice" ], "enable_nanoda": false}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228import Mathlib
namespace OAI
namespace FiniteCircle
open scoped BigOperators List
universe u v
inductive EditStep {α : Type u} : List α → List α → Prop | insert (u v : List α) (a : α) : EditStep (u ++ v) (u ++ a :: v) | delete (u v : List α) (a : α) : EditStep (u ++ a :: v) (u ++ v) | substitute (u v : List α) (a b : α) : EditStep (u ++ a :: v) (u ++ b :: v)
inductive EditScript {α : Type u} : ℕ → List α → List α → Prop | nil (x : List α) : EditScript 0 x x | cons {n : ℕ} {x y z : List α} : EditStep x y → EditScript n y z → EditScript (n + 1) x z
noncomputable def editDistance {α : Type u} (x y : List α) : ℕ := sInf {n : ℕ | EditScript n x y}
noncomputable def lcs {α : Type u} (x y : List α) : ℕ := sSup {n : ℕ | ∃ z : List α, z <+ x ∧ z <+ y ∧ z.length = n}
noncomputable def deficit {α : Type u} (x y : List α) : ℕ := x.length - lcs x y
abbrev Words (α : Type u) (d : ℕ) := {x : List α // x.length ≤ d}abbrev RealL1 := lp (fun _ : ℕ => ℝ) 1
noncomputable def distortion {α : Type u} {X : Type v} (word : X → List α) (f : X → RealL1) : ℝ := (sSup {r : ℝ | ∃ x y : X, x ≠ y ∧ r = ‖f x - f y‖ / (editDistance (word x) (word y) : ℝ)}) * (sSup {r : ℝ | ∃ x y : X, x ≠ y ∧ r = (editDistance (word x) (word y) : ℝ) / ‖f x - f y‖})
noncomputable def optimalDistortion {α : Type u} {X : Type v} (word : X → List α) : ℝ := sInf {D | ∃ f : X → RealL1, Function.Injective f ∧ D = distortion word f}
noncomputable def E (α : Type u) (d : ℕ) : ℝ := optimalDistortion (fun x : Words α d => x.val)
noncomputable def setDistortion (S : Set (List Bool)) : ℝ := optimalDistortion (fun x : S => x.val)
noncomputable def alphabetSupremum (d : ℕ) : ℝ := sSup {r | ∃ A : ℕ, 2 ≤ A ∧ r = E (Fin A) d}
noncomputable def exponentScale (d : ℕ) : ℝ := Real.sqrt (Real.log d * Real.log (Real.log d))
def encode {α : Type u} {w : ℕ} (c : α → Fin w → Bool) (x : List α) : List Bool := x.flatMap (fun a => List.ofFn (c a))
def interval {α : Type u} {w : ℕ} (c : α → Fin w → Bool) (a : α) (s len : ℕ) : List Bool := ((List.ofFn (c a)).drop s).take len
def OffsetLocal {α : Type u} {w : ℕ} (δ : ℝ) (c : α → Fin w → Bool) : Prop := ∀ a b : α, a ≠ b → ∀ s t : ℕ, s + w / 8 ≤ w → t + w / 8 ≤ w → (lcs (interval c a s (w / 8)) (interval c b t (w / 8)) : ℝ) ≤ (1 - δ) * (w / 8 : ℕ)
def indexSpan {w : ℕ} (is : List (Fin w)) : ℕ := match is with | [] => 0 | i :: js => (js.getLastD i).val + 1 - i.val
def AnchorLocal {α : Type u} {w : ℕ} (ε : ℝ) (c : α → Fin w → Bool) : Prop := ∀ a b : α, ∀ is js : List (Fin w), is.Pairwise (fun i j => i.val < j.val) → js.Pairwise (fun i j => i.val < j.val) → is.length = js.length → (w : ℝ) / 4 ≤ is.length → (indexSpan is - is.length : ℕ) ≤ ε * w → (indexSpan js - js.length : ℕ) ≤ ε * w → (∀ ij ∈ is.zip js, c a ij.1 = c b ij.2) → a = b ∧ ∃ i : Fin w, (i, i) ∈ is.zip js
def SubstitutionBounds {α : Type u} [Fintype α] {w : ℕ} (a C : ℝ) (c : α → Fin w → Bool) : Prop := 0 < w ∧ (w : ℝ) ≤ C * Real.log (2 * Fintype.card α) ∧ (∀ L : ℕ, ∀ x y : List α, x.length = L → y.length = L → a * w * deficit x y ≤ (deficit (encode c x) (encode c y) : ℝ) ∧ deficit (encode c x) (encode c y) ≤ w * deficit x y) ∧ (∀ x y : List α, editDistance (encode c x) (encode c y) ≤ w * editDistance x y)
def TwoCodes (a C δ ε : ℝ) : Prop := ∀ (α : Type) [Fintype α], 2 ≤ Fintype.card α → (∃ (w : ℕ) (c : α → Fin w → Bool), SubstitutionBounds a C c ∧ OffsetLocal δ c) ∧ (∃ (w : ℕ) (c : α → Fin w → Bool), SubstitutionBounds a C c ∧ AnchorLocal ε c)
def period (h : ℕ) (p : ℕ → ℕ → ℕ) (l : ℕ) : ℕ := ∏ k : Fin h, p l k
def circleSize (h : ℕ) (p : ℕ → ℕ → ℕ) : ℕ := 2 * ∏ l : Fin h, period h p (l.val + 1)
def MaskPrimes (h : ℕ) (p : ℕ → ℕ → ℕ) : Prop := (∀ l k : Fin h, Nat.Prime (p (l.val + 1) k)) ∧ Function.Injective (fun lk : Fin h × Fin h => p (lk.1.val + 1) lk.2) ∧ ∀ l k : Fin h, h ^ 3 ≤ p (l.val + 1) k ∧ p (l.val + 1) k ≤ 2 * h ^ 3
def ExcludedPrimes (m : ℕ) (p : ℕ → ℕ → ℕ) : Prop := (∀ l k : Fin m, Nat.Prime (p (l.val + 1) k)) ∧ Function.Injective (fun lk : Fin m × Fin m => p (lk.1.val + 1) lk.2) ∧ ∀ l k : Fin m, m ^ 3 < p (l.val + 1) k ∧ p (l.val + 1) k ≤ m ^ 5
abbrev MaskTag (h : ℕ) (p : ℕ → ℕ → ℕ) (l : ℕ) := Σ k : Fin h, Fin (p l k)
def maskTags (h : ℕ) (p : ℕ → ℕ → ℕ) (l : ℕ) : List (MaskTag h p l) := (List.ofFn fun k : Fin h => List.ofFn fun b : Fin (p l k) => Sigma.mk k b).flatten
def MaskAlphabet (h : ℕ) (p : ℕ → ℕ → ℕ) : ℕ → Type | 0 => Bool | l + 1 => MaskTag h p (l + 1) × MaskAlphabet h p l
instance maskAlphabetFintype (h : ℕ) (p : ℕ → ℕ → ℕ) (l : ℕ) : Fintype (MaskAlphabet h p l) := by induction l with | zero => exact inferInstanceAs (Fintype Bool) | succ l ih => exact @instFintypeProd _ _ inferInstance ih
def MaskState (h : ℕ) (p : ℕ → ℕ → ℕ) (M : ℕ) : ℕ → Type | 0 => ZMod M | l + 1 => MaskTag h p (l + 1) → MaskState h p M l
def shiftMaskState (h : ℕ) (p : ℕ → ℕ → ℕ) (M : ℕ) : (l : ℕ) → MaskState h p M l → ZMod M → MaskState h p M l | 0, v, θ => (show ZMod M from v) + θ | l + 1, v, θ => fun j => shiftMaskState h p M l (v j) θ
def maskGamma (h : ℕ) (p : ℕ → ℕ → ℕ) (M l a : ℕ) (j : MaskTag h p l) : ZMod M := (∑ k : Fin h, ((M / p l k * (a % p l k) : ℕ) : ZMod M)) + ((j.2.val * (M / p l j.1) * (a % p l j.1) : ℕ) : ZMod M)
def maskWord (h : ℕ) (p : ℕ → ℕ → ℕ) (R M : ℕ) : (l : ℕ) → MaskState h p M l → List (MaskAlphabet h p l) | 0, v => (List.range M).map (fun b => decide (((b : ZMod M) - (show ZMod M from v)).val < M / 2)) | l + 1, v => (List.range (R * period h p (l + 1))).flatMap fun a => (maskTags h p (l + 1)).flatMap fun j => (maskWord h p R M l (shiftMaskState h p M l (v j) (maskGamma h p M (l + 1) a j))).map (fun x => (j, x))
def ExcludedAlphabet (m L : ℕ) : ℕ → Type | 0 => Fin L × Bool | l + 1 => Fin m × ExcludedAlphabet m L l
instance excludedAlphabetFintype (m L l : ℕ) : Fintype (ExcludedAlphabet m L l) := by induction l with | zero => exact inferInstanceAs (Fintype (Fin L × Bool)) | succ l ih => exact @instFintypeProd _ _ inferInstance ih
def ExcludedState (m L : ℕ) : ℕ → Type | 0 => ZMod L | l + 1 => Fin m → ExcludedState m L l
def shiftExcludedState (m L : ℕ) : (l : ℕ) → ExcludedState m L l → ZMod L → ExcludedState m L l | 0, v, θ => (show ZMod L from v) + θ | l + 1, v, θ => fun i => shiftExcludedState m L l (v i) θ
def excludedTranslation (m : ℕ) (p : ℕ → ℕ → ℕ) (L l s : ℕ) (i : Fin m) : ZMod L := ∑ j ∈ Finset.univ.erase i, ((L / p l j * (s % p l j) : ℕ) : ZMod L)
def excludedWord (m : ℕ) (p : ℕ → ℕ → ℕ) (R L : ℕ) : (l : ℕ) → ExcludedState m L l → List (ExcludedAlphabet m L l) | 0, v => List.ofFn fun b : Fin L => (b, decide (((b.val : ZMod L) - (show ZMod L from v)).val < L / 2)) | l + 1, v => (List.range (R * period m p (l + 1))).flatMap fun s => (List.ofFn fun i : Fin m => (excludedWord m p R L l (shiftExcludedState m L l (v i) (excludedTranslation m p L (l + 1) s i))).map (fun x => (i, x))).flatten
def MaskWitness (a C δ lower : ℝ) (d : ℕ) : Prop := ∃ h : ℕ, 2 ≤ h ∧ ∃ p : ℕ → ℕ → ℕ, MaskPrimes h p ∧ ∃ (w : ℕ) (c : MaskAlphabet h p h → Fin w → Bool), SubstitutionBounds a C c ∧ OffsetLocal δ c ∧ ∃ n : ℕ, 0 < n ∧ n ≤ d ∧ (∀ v : MaskState h p (circleSize h p) h, (encode c (maskWord h p (h ^ (2 * h)) (circleSize h p) h v)).length = n) ∧ Real.exp (lower * exponentScale d) ≤ setDistortion (Set.range fun v : MaskState h p (circleSize h p) h => encode c (maskWord h p (h ^ (2 * h)) (circleSize h p) h v))
def ExcludedWitness (a C ε lower : ℝ) (d : ℕ) : Prop := ∃ m : ℕ, 2 ≤ m ∧ ∃ p : ℕ → ℕ → ℕ, ExcludedPrimes m p ∧ ∃ (w : ℕ) (c : ExcludedAlphabet m (circleSize m p) m → Fin w → Bool), SubstitutionBounds a C c ∧ AnchorLocal ε c ∧ ∃ n : ℕ, 0 < n ∧ n ≤ d ∧ (∀ v : ExcludedState m (circleSize m p) m, (encode c (excludedWord m p (m ^ (2 * m)) (circleSize m p) m v)).length = n) ∧ Real.exp (lower * exponentScale d) ≤ setDistortion (Set.range fun v : ExcludedState m (circleSize m p) m => encode c (excludedWord m p (m ^ (2 * m)) (circleSize m p) m v))
def UniformUpper (C : ℝ) (d₀ : ℕ) : Prop := ∀ (α : Type) [Fintype α], 2 ≤ Fintype.card α → ∀ d : ℕ, d₀ ≤ d → ∃ (M : ℕ) (F : Words α d → Fin M → ℝ), ∀ x y : Words α d, (editDistance x.val y.val : ℝ) ≤ ∑ i, |F x i - F y i| ∧ (∑ i, |F x i - F y i|) ≤ Real.exp (C * exponentScale d) * editDistance x.val y.val
def FullMain : Prop := ∃ c C a Ccode δ ε : ℝ, ∃ d₀ : ℕ, 0 < c ∧ 0 < C ∧ 0 < a ∧ 0 < Ccode ∧ 0 < δ ∧ 0 < ε ∧ TwoCodes a Ccode δ ε ∧ UniformUpper C d₀ ∧ (∀ (α : Type) [Fintype α], 2 ≤ Fintype.card α → ∀ d : ℕ, d₀ ≤ d → Real.exp (c * exponentScale d) ≤ E α d ∧ E α d ≤ Real.exp (C * exponentScale d)) ∧ (∀ d : ℕ, d₀ ≤ d → MaskWitness a Ccode δ c d ∧ ExcludedWitness a Ccode ε c d ∧ Real.exp (c * exponentScale d) ≤ alphabetSupremum d ∧ alphabetSupremum d ≤ Real.exp (C * exponentScale d))
end FiniteCircle
theorem finiteCircle_fullMain : FiniteCircle.FullMain := by sorry
end OAI12345678910111213{ "challenge_module": "ComparatorChallenges.FiniteCongruenceGraph", "solution_module": "OAI.Algebra.Universal.GraphCriterion", "theorem_names": [ "OAI.FiniteCongruence.graph_criterion" ], "permitted_axioms": [ "propext", "Quot.sound", "Classical.choice" ], "enable_nanoda": false}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263import Mathlib.Data.Finset.Lattice.Foldimport Mathlib.Data.Fintype.Defsimport Mathlib.Data.Setoid.Basicimport Mathlib.Order.Hom.Basic
namespace OAI
namespace FiniteCongruence
structure Algebra (Carrier : Type) where numOps : ℕ arity : Fin numOps → ℕ op : (index : Fin numOps) → (Fin (arity index) → Carrier) → Carrier
def Compatible {Carrier : Type} (alg : Algebra Carrier) (rel : Setoid Carrier) : Prop := ∀ (index : Fin alg.numOps) (left right : Fin (alg.arity index) → Carrier), (∀ coord, rel (left coord) (right coord)) → rel (alg.op index left) (alg.op index right)
def Congruence {Carrier : Type} (alg : Algebra Carrier) := {rel : Setoid Carrier // Compatible alg rel}
instance {Carrier : Type} (alg : Algebra Carrier) : PartialOrder (Congruence alg) := inferInstanceAs (PartialOrder {rel : Setoid Carrier // Compatible alg rel})
def Representable (Lat : Type) [PartialOrder Lat] : Prop := ∃ size : ℕ, 0 < size ∧ ∃ alg : Algebra (Fin size), Nonempty (Lat ≃o Congruence alg)
def Admissible {Lat Carrier : Type} [LE Lat] (color : Carrier → Carrier → Lat) (placement : Carrier → Carrier) : Prop := ∀ left right, color (placement left) (placement right) ≤ color left right
def Marked {Lat Carrier : Type} [LE Lat] (color : Carrier → Carrier → Lat) (seeds : Finset (Carrier × Carrier)) (left right : Carrier) : Prop := ∃ placement : Carrier → Carrier, Admissible color placement ∧ ∃ edge ∈ seeds, placement edge.1 = left ∧ placement edge.2 = right
def Connected {Lat Carrier : Type} [LE Lat] (color : Carrier → Carrier → Lat) (seeds : Finset (Carrier × Carrier)) (left right : Carrier) : Prop := Relation.EqvGen (Marked color seeds) left right
def IsGraphWitness {Lat Carrier : Type} [Lattice Lat] [OrderBot Lat] (color : Carrier → Carrier → Lat) : Prop := (∀ left right, color left right = color right left) ∧ (∀ left right, color left right = ⊥ ↔ left = right) ∧ (∀ left right middle, color left right ≤ color left middle ⊔ color middle right) ∧ (∀ lower upper : Lat, ¬ lower ≤ upper → ∃ left right, color left right ≤ lower ∧ ¬ color left right ≤ upper) ∧ (∀ seeds : Finset (Carrier × Carrier), seeds.Nonempty → ∀ left right, color left right ≤ seeds.sup (fun edge => color edge.1 edge.2) → Connected color seeds left right)
def HasGraphWitness (Lat : Type) [Lattice Lat] [OrderBot Lat] : Prop := ∃ size : ℕ, 0 < size ∧ ∃ color : Fin size → Fin size → Lat, IsGraphWitness color
/-- A finite lattice is representable as the full congruence lattice of a nonempty finitealgebra exactly when it has a finite nonempty colored-graph witness. -/theorem graph_criterion (Lat : Type) [Fintype Lat] [Lattice Lat] [OrderBot Lat] : Representable Lat ↔ HasGraphWitness Lat := by sorry
end FiniteCongruence
end OAI1234567891011121314{ "challenge_module": "ComparatorChallenges.FiniteEntropySeparation", "solution_module": "OAI.Analysis.FreeEntropy.Main", "theorem_names": [ "OAI.FiniteEntropySeparation.main" ], "definition_names": [], "permitted_axioms": [ "propext", "Quot.sound", "Classical.choice" ], "enable_nanoda": false}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125import Mathlib
namespace OAI
noncomputable section
open scoped ENNReal NNReal ComplexConjugateopen MeasureTheory Filter
namespace FiniteEntropySeparation
variable {H : Type} [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H]
structure TracialVector (M : VonNeumannAlgebra H) where vacuum : H norm_vacuum : ‖vacuum‖ = 1 tracial : ∀ A ∈ M, ∀ B ∈ M, inner ℂ vacuum ((A * B) vacuum) = inner ℂ vacuum ((B * A) vacuum) separating : ∀ A ∈ M, A vacuum = 0 → A = 0
def trace {M : VonNeumannAlgebra H} (τ : TracialVector M) (A : H →L[ℂ] H) : ℂ := inner ℂ τ.vacuum (A τ.vacuum)
def wordEval {n : ℕ} (X : Fin n → H →L[ℂ] H) (w : List (Fin n)) : H →L[ℂ] H := (w.map X).prod
def wordMoment {M : VonNeumannAlgebra H} (τ : TracialVector M) {n : ℕ} (X : Fin n → H →L[ℂ] H) (w : List (Fin n)) : ℂ := trace τ (wordEval X w)
def FreeSubalgebras {ι : Type} {M : VonNeumannAlgebra H} (τ : TracialVector M) (A : ι → Subalgebra ℂ (H →L[ℂ] H)) : Prop := ∀ (k : ℕ), 0 < k → ∀ (j : Fin k → ι) (a : Fin k → H →L[ℂ] H), (∀ r, a r ∈ A (j r)) → (∀ r, trace τ (a r) = 0) → (∀ (r : ℕ) (hr : r + 1 < k), j ⟨r, Nat.lt_trans (Nat.lt_succ_self r) hr⟩ ≠ j ⟨r + 1, hr⟩) → trace τ (List.ofFn a).prod = 0
def FreeStandardNoise {M : VonNeumannAlgebra H} (τ : TracialVector M) {n : ℕ} (X S : Fin n → H →L[ℂ] H) : Prop := (∀ i k, trace τ (S i ^ k) = if Even k then (catalan (k / 2) : ℂ) else 0) ∧ FreeSubalgebras τ (fun j : Option (Fin n) => match j with | none => Algebra.adjoin ℂ (Set.range X) | some i => Algebra.adjoin ℂ {S i})
def polynomialL2 {M : VonNeumannAlgebra H} (τ : TracialVector M) {n : ℕ} (X : Fin n → H →L[ℂ] H) : Submodule ℂ H := (Submodule.span ℂ (Set.range (fun w : List (Fin n) => wordEval X w τ.vacuum))).topologicalClosure
def derivativeMoment {M : VonNeumannAlgebra H} (τ : TracialVector M) {n : ℕ} (X : Fin n → H →L[ℂ] H) (i : Fin n) (w : List (Fin n)) : ℂ := ∑ r : Fin w.length, if w[r.val] = i then wordMoment τ X (w.take r.val) * wordMoment τ X (w.drop (r.val + 1)) else 0
def ConjugateSystem {M : VonNeumannAlgebra H} (τ : TracialVector M) {n : ℕ} (X : Fin n → H →L[ℂ] H) (ξ : Fin n → H) : Prop := ∀ i, ξ i ∈ polynomialL2 τ X ∧ ∀ w : List (Fin n), inner ℂ (ξ i) (wordEval X w τ.vacuum) = derivativeMoment τ X i w
def freeFisher {M : VonNeumannAlgebra H} (τ : TracialVector M) {n : ℕ} (X : Fin n → H →L[ℂ] H) : ℝ≥0∞ := ⨅ (ξ : Fin n → H) (_ : ConjugateSystem τ X ξ), ENNReal.ofReal (∑ i, ‖ξ i‖ ^ 2)
def heatTuple {n : ℕ} (X S : Fin n → H →L[ℂ] H) (s : ℝ) : Fin n → H →L[ℂ] H := fun i => X i + (Real.sqrt s : ℂ) • S i
def chiStar {M : VonNeumannAlgebra H} (τ : TracialVector M) {n : ℕ} (X S : Fin n → H →L[ℂ] H) : EReal := let b : ℝ → ℝ≥0∞ := fun s => ENNReal.ofReal ((n : ℝ) / (1 + s)) let f : ℝ → ℝ≥0∞ := fun s => freeFisher τ (heatTuple X S s) ((n / 2 * Real.log (2 * Real.pi * Real.exp 1) : ℝ) : EReal) + (1 / 2 : EReal) * (∫⁻ s in Set.Ioi (0 : ℝ), b s - f s).toEReal - (1 / 2 : EReal) * (∫⁻ s in Set.Ioi (0 : ℝ), f s - b s).toEReal
abbrev MatrixCoordinates (n d : ℕ) := EuclideanSpace ℝ (Fin n × Fin d × Fin d)
def hermitianMatrix {n d : ℕ} (a : MatrixCoordinates n d) (i : Fin n) : Matrix (Fin d) (Fin d) ℂ := fun j k => if j = k then (a (i, j, j) : ℂ) else if j < k then ((a (i, j, k) : ℂ) + Complex.I * (a (i, k, j) : ℂ)) / Real.sqrt 2 else ((a (i, k, j) : ℂ) - Complex.I * (a (i, j, k) : ℂ)) / Real.sqrt 2
def matrixOpNorm {d : ℕ} (A : Matrix (Fin d) (Fin d) ℂ) : ℝ := ‖(Matrix.toEuclideanLin A).toContinuousLinearMap‖
def matrixMoment {n d : ℕ} (a : MatrixCoordinates n d) (w : List (Fin n)) : ℂ := (d : ℂ)⁻¹ * Matrix.trace (w.map (hermitianMatrix a)).prod
def microstates {M : VonNeumannAlgebra H} (τ : TracialVector M) {n : ℕ} (X : Fin n → H →L[ℂ] H) (R : ℝ) (m d : ℕ) (ε : ℝ) : Set (MatrixCoordinates n d) := {a | (∀ i, matrixOpNorm (hermitianMatrix a i) ≤ R) ∧ ∀ w : List (Fin n), w.length ≤ m → ‖matrixMoment a w - wordMoment τ X w‖ < ε}
def chiCutoff {M : VonNeumannAlgebra H} (τ : TracialVector M) {n : ℕ} (X : Fin n → H →L[ℂ] H) (R : ℝ) : EReal := ⨅ m : ℕ, ⨅ ε : {ε : ℝ // 0 < ε}, limsup (fun d : ℕ => (((((d + 1 : ℕ) : ℝ) ^ 2)⁻¹ : ℝ) : EReal) * (volume (microstates τ X R m (d + 1) ε.val)).log + (((n : ℝ) / 2 * Real.log (d + 1) : ℝ) : EReal)) atTop
def chi {M : VonNeumannAlgebra H} (τ : TracialVector M) {n : ℕ} (X : Fin n → H →L[ℂ] H) : EReal := ⨆ R : {R : ℝ // 0 < R}, chiCutoff τ X R.val
open MeasureTheory
theorem main : ∃ (H : Type) (_ : NormedAddCommGroup H) (_ : InnerProductSpace ℂ H) (_ : CompleteSpace H) (M : VonNeumannAlgebra H) (τ : TracialVector M) (n : ℕ) (X S : Fin n → H →L[ℂ] H), 2 ≤ n ∧ (∀ i, X i ∈ M ∧ IsSelfAdjoint (X i)) ∧ (∀ i, S i ∈ M ∧ IsSelfAdjoint (S i)) ∧ FreeStandardNoise τ X S ∧ (⊥ : EReal) < chi τ X ∧ chi τ X ≤ chiStar τ X S - (1 / 2 : EReal) ∧ chiStar τ X S - (1 / 2 : EReal) < (⊤ : EReal) := by sorry
end FiniteEntropySeparation
end
end OAI1234567891011121314{ "challenge_module": "ComparatorChallenges.FiniteFactor", "solution_module": "OAI.Analysis.FiniteFactor.Main", "theorem_names": [ "OAI.FiniteFactor.main_theorem" ], "definition_names": [], "permitted_axioms": [ "propext", "Quot.sound", "Classical.choice" ], "enable_nanoda": false}12345678910111213141516171819202122232425262728293031323334353637383940414243444546import Mathlib.Analysis.VonNeumannAlgebra.Basicimport Mathlib.Analysis.SpecialFunctions.Pow.Real
namespace OAI
namespace FiniteFactoropen Filteropen scoped Topologyuniverse u
variable {H : Type u} [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H]
/-- A concrete factor has scalar center. -/def HasScalarCenter (M : VonNeumannAlgebra H) : Prop := ∀ a ∈ M, (∀ b ∈ M, a * b = b * a) → ∃ z : ℂ, a = z • (1 : H →L[ℂ] H)
/-- Finiteness: every isometry in the algebra is unitary. -/def IsFiniteAlgebra (M : VonNeumannAlgebra H) : Prop := ∀ v ∈ M, star v * v = 1 → v * star v = 1
/-- No nonzero projection is minimal, excluding matrix factors. -/def HasNoMinimalProjection (M : VonNeumannAlgebra H) : Prop := ∀ p ∈ M, IsStarProjection p → p ≠ 0 → ∃ q ∈ M, IsStarProjection q ∧ q ≠ 0 ∧ q ≠ p ∧ q * p = q
/-- A separable Banach space whose dual is conjugate-linearly isometric to M. -/def HasSeparablePredual (M : VonNeumannAlgebra H) : Prop := ∃ (E : Type u) (_ : NormedAddCommGroup E) (_ : NormedSpace ℂ E) (_ : CompleteSpace E) (_ : TopologicalSpace.SeparableSpace E), Nonempty (StrongDual ℂ E ≃ₗᵢ⋆[ℂ] M.toStarSubalgebra)
def MainTarget : Prop := ∃ (H : Type u) (_ : NormedAddCommGroup H) (_ : InnerProductSpace ℂ H) (_ : CompleteSpace H) (M : VonNeumannAlgebra H), HasScalarCenter M ∧ IsFiniteAlgebra M ∧ HasNoMinimalProjection M ∧ HasSeparablePredual M ∧ ∃ T : H →L[ℂ] H, T ∈ M ∧ T ≠ 0 ∧ Tendsto (fun n : ℕ => ‖T ^ n‖ ^ (1 / (n : ℝ))) atTop (𝓝 0) ∧ ∀ p ∈ M, IsStarProjection p → (1 - p) * T * p = 0 → p = 0 ∨ p = 1
theorem main_theorem : MainTarget.{0} := by sorry
end FiniteFactor
end OAI1234567891011121314{ "challenge_module": "ComparatorChallenges.FinitisticAsymmetry", "solution_module": "OAI.Algebra.FinitisticAsymmetry.Main", "theorem_names": [ "OAI.LittleFinitistic.extreme_left_right_asymmetry" ], "definition_names": [], "permitted_axioms": [ "propext", "Quot.sound", "Classical.choice" ], "enable_nanoda": false}1234567891011121314151617181920212223242526272829303132333435363738394041import Mathlib
namespace OAI
noncomputable sectionopen CategoryTheory
namespace LittleFinitisticuniverse uvariable (A : Type u) [Ring A]
attribute [-instance] CompletePartialOrder.toSupSet indef littleFinitisticDimension : WithBot ℕ∞ := ⨆ (M : ModuleCat.{u} A) (_ : Module.Finite A M) (_ : projectiveDimension M < ⊤), projectiveDimension M
def bigFinitisticDimension : WithBot ℕ∞ := ⨆ (M : ModuleCat.{u} A) (_ : projectiveDimension M < ⊤), projectiveDimension M
def InjectivesGenerate : Prop := letI := HasDerivedCategory.standard (ModuleCat.{u} A) ∀ (P : ObjectProperty (DerivedCategory (ModuleCat.{u} A))), P.IsClosedUnderIsomorphisms → P.IsTriangulated → (∀ I : Type u, P.IsClosedUnderColimitsOfShape (Discrete I)) → (∀ (M : ModuleCat.{u} A), Injective M → P ((DerivedCategory.singleFunctor (ModuleCat.{u} A) 0).obj M)) → ∀ X, P X
theorem extreme_left_right_asymmetry : ∃ (Λ : Type) (_ : Ring Λ) (_ : Algebra ℂ Λ), FiniteDimensional ℂ Λ ∧ littleFinitisticDimension Λ = ⊤ ∧ bigFinitisticDimension Λ = ⊤ ∧ littleFinitisticDimension Λᵐᵒᵖ = 0 ∧ bigFinitisticDimension Λᵐᵒᵖ = 0 ∧ ¬ InjectivesGenerate Λ ∧ InjectivesGenerate Λᵐᵒᵖ := by sorry
end LittleFinitistic
end
end OAI1234567891011121314{ "challenge_module": "ComparatorChallenges.FixedClauseThreshold", "solution_module": "OAI.Probability.RandomSAT.Main", "theorem_names": [ "OAI.FixedClauseThreshold.main" ], "definition_names": [], "permitted_axioms": [ "propext", "Quot.sound", "Classical.choice" ], "enable_nanoda": false}1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556import Mathlib
namespace OAI
/-!Proper clauses choose distinct variables uniformly and give them independent fairsigns. Formulas consist of independent uniform whole-clause draws with replacement.Their satisfiability probability is the literal finite cardinality ratio.For zero clauses this probability is one, including when there are fewer variablesthan literals per clause. When there are fewer variables than literals per clauseand the clause count is positive, the ensemble is empty and its probability is zeroby the convention that division by zero is zero.
For each fixed clause size at least three, one positive finite real thresholdgoverns the limits at every fixed density below or above it. There is no assertionat the critical density, no explicit threshold value, and no varying-size claim.-/
namespace FixedClauseThreshold
abbrev Assignment (n : ℕ) := Fin n → Bool
abbrev ProperClause (n k : ℕ) := { C : Fin n → Option Bool // (Finset.univ.filter fun i => (C i).isSome).card = k }
abbrev Formula (n k m : ℕ) := Fin m → ProperClause n k
def SatisfiesClause {n k : ℕ} (σ : Assignment n) (C : ProperClause n k) : Prop := ∃ i : Fin n, C.val i = some (σ i)
def Satisfies {n k m : ℕ} (σ : Assignment n) (F : Formula n k m) : Prop := ∀ j, SatisfiesClause σ (F j)
def Satisfiable {n k m : ℕ} (F : Formula n k m) : Prop := ∃ σ : Assignment n, Satisfies σ F
noncomputable def properSATProbability (n k m : ℕ) : ℝ := by classical exact (Fintype.card { F : Formula n k m // Satisfiable F } : ℝ) / (Fintype.card (Formula n k m) : ℝ)
def HasLimitingThreshold (k : ℕ) : Prop := ∃ α : ℝ, 0 < α ∧ (∀ c : ℝ, 0 ≤ c → c < α → Filter.Tendsto (fun n : ℕ => properSATProbability n k ⌊c * (n : ℝ)⌋₊) Filter.atTop (nhds 1)) ∧ (∀ c : ℝ, α < c → Filter.Tendsto (fun n : ℕ => properSATProbability n k ⌊c * (n : ℝ)⌋₊) Filter.atTop (nhds 0))
theorem main (k : ℕ) (hk : 3 ≤ k) : HasLimitingThreshold k := by sorry
end FixedClauseThreshold
end OAI1234567891011121314{ "challenge_module": "ComparatorChallenges.ForcedNavierStokesComputation", "solution_module": "OAI.MathematicalPhysics.NavierStokes.BalancedTransport.MainResult", "theorem_names": [ "OAI.BalancedTransport.balanced_three_stack_realization" ], "definition_names": [], "permitted_axioms": [ "propext", "Quot.sound", "Classical.choice" ], "enable_nanoda": false}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232import Mathlib
/-! A single main result: effective forced Navier–Stokes computation detected by afixed particle entering a fixed open box, exactly when the encoded machine halts. -/
namespace OAI.BalancedTransportnamespace Recorderinductive Direction where | stay | left | right deriving DecidableEq
structure Transition (Q Γ : Type*) where state : Q write : Γ move : Directionend Recorder
structure FiniteMachine where states : ℕ symbols : ℕ initial : Fin (states + 1) blank : Fin (symbols + 1) transition : Fin (states + 1) → Fin (symbols + 1) → Option (Recorder.Transition (Fin (states + 1)) (Fin (symbols + 1)))
abbrev Input (M : FiniteMachine) := List (Fin (M.symbols + 1))
structure TapeConfiguration (M : FiniteMachine) where state : Fin (M.states + 1) head : ℤ tape : ℤ → Fin (M.symbols + 1)
def initialConfiguration (M : FiniteMachine) (w : Input M) : TapeConfiguration M := ⟨M.initial, 0, fun z => if 0 ≤ z then w[z.toNat]?.getD M.blank else M.blank⟩
def machineStep (M : FiniteMachine) (c : TapeConfiguration M) : Option (TapeConfiguration M) := (M.transition c.state (c.tape c.head)).map fun v => ⟨v.state, c.head + (match v.move with | .stay => 0 | .left => -1 | .right => 1), Function.update c.tape c.head v.write⟩
def Halts (M : FiniteMachine) (w : Input M) : Prop := ∃ c, Relation.ReflTransGen (fun c d => machineStep M c = some d) (initialConfiguration M w) c ∧ machineStep M c = none
def Recorder.Direction.number : Recorder.Direction → ℕ | .stay => 0 | .left => 1 | .right => 2
def FiniteMachine.code (M : FiniteMachine) : ℕ := Encodable.encode (M.states, M.symbols, M.initial.val, M.blank.val, (List.finRange (M.states + 1)).map fun q => (List.finRange (M.symbols + 1)).map fun a => (M.transition q a).map fun v => (v.state.val, v.write.val, v.move.number))
def inputCode (M : FiniteMachine) (w : Input M) : ℕ := Encodable.encode (M.code, w.map Fin.val)
abbrev Space := Fin 3 → ℝabbrev Field (F : Type*) := ℝ → Space → Fabbrev Velocity := Field Spaceabbrev Pressure := Field ℝabbrev Family (F : Type*) := (M : FiniteMachine) → Input M → Fabbrev MaterialFlow := ℝ → Space → Spaceabbrev MultiIndex := List (Option (Fin 3))abbrev RationalPoint := ℚ × (Fin 3 → ℚ)
noncomputable section
open MeasureTheoryopen scoped ENNReal
variable {F : Type*} [NormedAddCommGroup F] [NormedSpace ℝ F]
def timeD (v : Field F) : Field F := fun t x => derivWithin (fun s => v s x) (Set.Ici 0) t
def spaceD (i : Fin 3) (v : Field F) : Field F := fun t x => fderiv ℝ (v t) x (Pi.single i 1)
def mixedD : MultiIndex → Field F → Field F | [], v => v | none :: a, v => timeD (mixedD a v) | some i :: a, v => spaceD i (mixedD a v)
def spatialD : List (Fin 3) → Field F → Field F | [], v => v | i :: a, v => spaceD i (spatialD a v)
def Smooth (v : Field F) : Prop := ContDiffOn ℝ (⊤ : ℕ∞) (fun z : ℝ × Space => v z.1 z.2) (Set.Ici 0 ×ˢ Set.univ)
def BoundedMixed (v : Field F) : Prop := ∀ a : MultiIndex, ∃ C : ℝ, 0 ≤ C ∧ ∀ t, 0 ≤ t → ∀ x, ‖mixedD a v t x‖ ≤ C
def CH (k : ℕ) (v : Field F) : Prop := ∀ a : List (Fin 3), a.length ≤ k → ∃ V : ℝ → Lp F 2 (volume : Measure Space), ContinuousOn V (Set.Ici 0) ∧ ∀ t, 0 ≤ t → (V t : Space → F) =ᵐ[volume] spatialD a v t
def C1L2 (v : Field F) : Prop := ∃ V W : ℝ → Lp F 2 (volume : Measure Space), ContinuousOn V (Set.Ici 0) ∧ ContinuousOn W (Set.Ici 0) ∧ ∀ t, 0 ≤ t → (V t : Space → F) =ᵐ[volume] v t ∧ (W t : Space → F) =ᵐ[volume] timeD v t ∧ HasDerivWithinAt V (W t) (Set.Ici 0) t
def div (u : Velocity) (t : ℝ) (x : Space) : ℝ := ∑ i, spaceD i u t x i
def laplacian (u : Velocity) : Velocity := fun t x => ∑ i, spaceD i (spaceD i u) t x
def convection (u : Velocity) : Velocity := fun t x => ∑ i, (u t x i) • spaceD i u t x
def gradient (p : Pressure) (t : ℝ) (x : Space) : Space := fun i => spaceD i p t x
def affineForce (f₀ f₁ : Velocity) (ν : ℝ) : Velocity := fun t x => f₀ t x + ν • f₁ t x
def inertialCoefficient (u : Velocity) : Velocity := fun t x => timeD u t x + convection u t x
def viscousCoefficient (u : Velocity) : Velocity := fun t x => -laplacian u t x
def ZeroDataSolution (ν : ℝ) (f u : Velocity) (p : Pressure) : Prop := Smooth u ∧ Smooth p ∧ (∀ x, u 0 x = 0) ∧ (∀ t, 0 ≤ t → ∀ x, div u t x = 0) ∧ (∀ t, 0 ≤ t → ∀ x, timeD u t x + convection u t x = -gradient p t x + ν • laplacian u t x + f t x)
def BoundedOnFiniteSlabs (u : Velocity) : Prop := ∀ T : ℝ, 0 ≤ T → ∃ C : ℝ, 0 ≤ C ∧ ∀ t ∈ Set.Icc (0 : ℝ) T, ∀ x, ‖u t x‖ ≤ C ∧ ∀ i : Fin 3, ‖spaceD i u t x‖ ≤ C
def ComparisonClass (u : Velocity) (p : Pressure) : Prop := CH 2 u ∧ C1L2 u ∧ BoundedOnFiniteSlabs u ∧ ∃ c : ℝ → ℝ, CH 1 (fun t x => p t x - c t)
def UniqueInComparison (ν : ℝ) (f U : Velocity) : Prop := ∀ u p, ZeroDataSolution ν f u p → ComparisonClass u p → (∀ t, 0 ≤ t → ∀ x, u t x = U t x) ∧ (∀ t, 0 ≤ t → ∀ x y, p t x = p t y)
def CommonCompactSupport (U f₀ f₁ : Velocity) : Prop := ∃ K : Set Space, IsCompact K ∧ ∀ t, 0 ≤ t → ∀ x, x ∉ K → U t x = 0 ∧ f₀ t x = 0 ∧ f₁ t x = 0
def PeriodicAfterOne (v : Velocity) : Prop := ∀ t, 1 ≤ t → ∀ x, v (t + 1) x = v t x
def IsMaterialFlow (u : Velocity) (X : MaterialFlow) : Prop := (∀ a, X 0 a = a) ∧ ∀ a t, 0 ≤ t → HasDerivWithinAt (fun s => X s a) (u t (X t a)) (Set.Ici 0) t
def fixedLabel : Space := ![4, 0, 0]
def observer : Set Space := Set.pi Set.univ (fun _ : Fin 3 => Set.Ioo (-1 : ℝ) 2)
def rationalSpace (x : Fin 3 → ℚ) : Space := fun i => (x i : ℝ)
def error (n : ℕ) : ℝ := (2 : ℝ)⁻¹ ^ n
def EffectiveFamily (v : Family Velocity) : Prop := ∃ E : (ℕ × MultiIndex × RationalPoint × ℕ) → (Fin 3 → ℚ), ∃ b : (ℕ × MultiIndex) → ℕ, ∃ R : ℕ → ℕ, Computable E ∧ Computable b ∧ Computable R ∧ (∀ M w a z n, 0 ≤ z.1 → ∀ i, |(E (inputCode M w, a, z, n) i : ℝ) - mixedD a (v M w) (z.1 : ℝ) (rationalSpace z.2) i| ≤ error n) ∧ (∀ M w a t, 0 ≤ t → ∀ x, ‖mixedD a (v M w) t x‖ ≤ (b (inputCode M w, a) : ℝ)) ∧ (∀ M w t, 0 ≤ t → ∀ x, (R (inputCode M w) : ℝ) < ‖x‖ → v M w t x = 0)
def EffectiveFieldIn (O : Set (ℕ →. ℕ)) (v : Velocity) : Prop := ∃ E : (MultiIndex × RationalPoint × ℕ) → (Fin 3 → ℚ), ∃ b : MultiIndex → ℕ, ComputableIn O E ∧ ComputableIn O b ∧ (∀ a z n, 0 ≤ z.1 → ∀ i, |(E (a, z, n) i : ℝ) - mixedD a v (z.1 : ℝ) (rationalSpace z.2) i| ≤ error n) ∧ (∀ a t, 0 ≤ t → ∀ x, ‖mixedD a v t x‖ ≤ (b a : ℝ))
def RealName (name : ℕ → ℚ) (x : ℝ) : Prop := ∀ n, |(name n : ℝ) - x| ≤ error n
def ComputableReal (x : ℝ) : Prop := ∃ name : ℕ → ℚ, Computable name ∧ RealName name x
def nameOracle (name : ℕ → ℚ) : ℕ →. ℕ := fun n => Part.some (Encodable.encode (name n))
end
theorem balanced_three_stack_realization : ∃ U f₀ f₁ : Family Velocity, ∃ X : Family MaterialFlow, ∃ repeated : FiniteMachine → Velocity, EffectiveFamily U ∧ EffectiveFamily f₀ ∧ EffectiveFamily f₁ ∧ (∀ M, Function.Periodic (repeated M) 1) ∧ ∀ (M : FiniteMachine) (w : Input M), Smooth (U M w) ∧ Smooth (f₀ M w) ∧ Smooth (f₁ M w) ∧ f₀ M w = inertialCoefficient (U M w) ∧ f₁ M w = viscousCoefficient (U M w) ∧ CommonCompactSupport (U M w) (f₀ M w) (f₁ M w) ∧ BoundedMixed (U M w) ∧ PeriodicAfterOne (U M w) ∧ (∀ t, 1 ≤ t → ∀ x, U M w t x = repeated M t x) ∧ ComparisonClass (U M w) (fun _ _ => 0) ∧ IsMaterialFlow (U M w) (X M w) ∧ ((∃ t : ℝ, 0 ≤ t ∧ X M w t fixedLabel ∈ observer) ↔ Halts M w) ∧ ∀ ν : ℝ, 0 < ν → let f := affineForce (f₀ M w) (f₁ M w) ν ZeroDataSolution ν f (U M w) (fun _ _ => 0) ∧ Smooth f ∧ BoundedMixed f ∧ PeriodicAfterOne f ∧ UniqueInComparison ν f (U M w) ∧ (ComputableReal ν → EffectiveFieldIn ∅ f) ∧ (∀ name : ℕ → ℚ, RealName name ν → EffectiveFieldIn {nameOracle name} f) := by sorry
end OAI.BalancedTransport1234567891011121314{ "challenge_module": "ComparatorChallenges.ForestSpace", "solution_module": "OAI.Analysis.ForestSpace.Main", "theorem_names": [ "OAI.ForestSpace.main_theorem" ], "definition_names": [], "permitted_axioms": [ "propext", "Quot.sound", "Classical.choice" ], "enable_nanoda": false}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468import Mathlib
namespace OAI
noncomputable section
open scoped BigOperatorsopen Finset
namespace ForestSpace
attribute [local instance] Classical.propDecidable
section ModulusDefinitions
variable (E : Type) [NormedAddCommGroup E] [NormedSpace ℝ E]
/-- The closed finite-codimensional subspaces. -/def Cofinite : Type := {F : Submodule ℝ E // IsClosed (F : Set E) ∧ FiniteDimensional ℝ (E ⧸ F)}
/-- The inner one-sided excess values and their infimum. -/def aucValues (N : E → ℝ) (t : ℝ) (x : E) (F : Cofinite E) : Set ℝ := {a | ∃ y : E, y ∈ F.val ∧ N y = 1 ∧ a = N (x + t • y) - 1}
noncomputable def aucInner (N : E → ℝ) (t : ℝ) (x : E) (F : Cofinite E) : ℝ := sInf (aucValues E N t x F)
noncomputable def aucCenter (N : E → ℝ) (t : ℝ) (x : E) : ℝ := sSup (Set.range (aucInner E N t x))
/-- The one-sided asymptotic uniform convexity modulus, with the orderof infimum, supremum and infimum. -/noncomputable def aucModulus (N : E → ℝ) (t : ℝ) : ℝ := sInf {a | ∃ x : E, N x = 1 ∧ a = aucCenter E N t x}
/-- The inner averaged signed excess; it is not replaced by a maximum. -/def averageValues (N : E → ℝ) (t : ℝ) (x : E) (F : Cofinite E) : Set ℝ := {a | ∃ y : E, y ∈ F.val ∧ N y = 1 ∧ a = (N (x+t•y) + N (x-t•y))/((2 : ℕ) : ℝ) - 1}
noncomputable def averageInner (N : E → ℝ) (t : ℝ) (x : E) (F : Cofinite E) : ℝ := sInf (averageValues E N t x F)
noncomputable def averageCenter (N : E → ℝ) (t : ℝ) (x : E) : ℝ := sSup (Set.range (averageInner E N t x))
/-- The averaged asymptotic midpoint modulus. -/noncomputable def averageModulus (N : E → ℝ) (t : ℝ) : ℝ := sInf {a | ∃ x : E, N x = 1 ∧ a = averageCenter E N t x}
end ModulusDefinitions
/-- An equivalent norm is kept as its exact real seminorm, with explicit positivecomparison constants. The lower inequality makes it a norm. -/structure EquivalentNorm (E : Type) [NormedAddCommGroup E] [NormedSpace ℝ E] (α β : ℝ) where N : Seminorm ℝ E alpha_pos : 0 < α alpha_le_beta : α ≤ β lower : ∀ x : E, α*‖x‖ ≤ N x upper : ∀ x : E, N x ≤ β*‖x‖
/-- Canonical (not merely abstract) reflexivity. -/def Reflexive (E : Type) [NormedAddCommGroup E] [NormedSpace ℝ E] : Prop := Function.Surjective (NormedSpace.inclusionInDoubleDual ℝ E)
/-- AUC requires positivity at every strictly positive parameter. -/def IsAUC {E : Type} [NormedAddCommGroup E] [NormedSpace ℝ E] (N : E → ℝ) : Prop := ∀ t : ℝ, 0 < t → 0 < aucModulus E N t
/-- A finite, order-convex chain. The empty chain is a harmless zero test. -/def IsSegment {V : Type} [PartialOrder V] (S : Finset V) : Prop := (∀ a ∈ S, ∀ b ∈ S, a ≤ b ∨ b ≤ a) ∧ (∀ a ∈ S, ∀ b ∈ S, ∀ c, a ≤ c → c ≤ b → c ∈ S)
/-- The sum of coordinates over a segment. -/def segSum {V : Type} (u : V → ℝ) (S : Finset V) : ℝ := ∑ v ∈ S, u v
/-- Squared bound on every disjoint family of segment tests. -/def TestBound {V : Type} [PartialOrder V] (u : V → ℝ) (C : ℝ) : Prop := ∀ (ι : Type) (_ : Fintype ι) (S : ι → Finset V), (∀ i, IsSegment (S i)) → Pairwise (fun i j => Disjoint (S i) (S j)) → ∑ i, segSum u (S i) ^ 2 ≤ C
section SegmentNorm
variable {V : Type} [PartialOrder V]
/-- All squared disjoint-segment tests. Quantifying over finite index typesis equivalent to families S₁,...,Sₘ; a zero-sized familyadds only zero to the set of test values. -/def testValues (u : V → ℝ) : Set ℝ := {r | ∃ (ι : Type) (_ : Fintype ι) (S : ι → Finset V), (∀ i, IsSegment (S i)) ∧ Pairwise (fun i j => Disjoint (S i) (S j)) ∧ r = ∑ i, segSum u (S i) ^ 2}
noncomputable def squareSup (u : V → ℝ) : ℝ := sSup (testValues u)
/-- Exactly the disjoint-segment norm, written as the square root of itssquared testing supremum. -/noncomputable def rho (u : V → ℝ) : ℝ := Real.sqrt (squareSup u)
noncomputable def l1size (u : V →₀ ℝ) : ℝ := ∑ v ∈ u.support, |u v|
end SegmentNorm
/-- The disjoint-segment seminorm on finite coordinate vectors. -/def segmentSeminorm (V : Type) [PartialOrder V] : Seminorm ℝ (V →₀ ℝ) := by have segSum_zero [PartialOrder V] (S : Finset V) : segSum (0 : V → ℝ) S = 0 := by simp [segSum] have segSum_add [PartialOrder V] (u v : V → ℝ) (S : Finset V) : segSum (u + v) S = segSum u S + segSum v S := by simp [segSum, Finset.sum_add_distrib] have segSum_smul [PartialOrder V] (a : ℝ) (u : V → ℝ) (S : Finset V) : segSum (a • u) S = a * segSum u S := by simp [segSum, Finset.mul_sum] have TestBound.nonneg {u : V → ℝ} {C : ℝ} (h : TestBound u C) : 0 ≤ C := by simpa using h PEmpty inferInstance PEmpty.elim (by simp) (by simp [Pairwise]) have TestBound.zero : TestBound (0 : V → ℝ) 0 := by intro ι inst S hS hd simp [segSum] have TestBound.smul {u : V → ℝ} {C : ℝ} (h : TestBound u C) (a : ℝ) : TestBound (a • u) (a ^ 2 * C) := by intro ι inst S hS hd have hh := mul_le_mul_of_nonneg_left (h ι inst S hS hd) (sq_nonneg a) simpa only [segSum_smul, mul_pow, Finset.mul_sum] using hh have TestBound.add {u v : V → ℝ} {A B : ℝ} (hu : TestBound u (A ^ 2)) (hv : TestBound v (B ^ 2)) (hA : 0 ≤ A) (hB : 0 ≤ B) : TestBound (u + v) ((A + B) ^ 2) := by intro ι inst S hS hd have h₁ := hu ι inst S hS hd have h₂ := hv ι inst S hS hd have hc := Real.sum_mul_le_sqrt_mul_sqrt (univ : Finset ι) (fun i => segSum u (S i)) (fun i => segSum v (S i)) have hs₁ : Real.sqrt (∑ i, segSum u (S i) ^ 2) ≤ A := (Real.sqrt_le_iff).2 ⟨hA, h₁⟩ have hs₂ : Real.sqrt (∑ i, segSum v (S i) ^ 2) ≤ B := (Real.sqrt_le_iff).2 ⟨hB, h₂⟩ have hc' : ∑ i, segSum u (S i) * segSum v (S i) ≤ A * B := hc.trans (mul_le_mul hs₁ hs₂ (Real.sqrt_nonneg _) hA) have he : (∑ i, segSum (u + v) (S i) ^ 2) = (∑ i, segSum u (S i) ^ 2) + 2 * (∑ i, segSum u (S i) * segSum v (S i)) + (∑ i, segSum v (S i) ^ 2) := by simp only [segSum_add, add_sq, Finset.sum_add_distrib, Finset.mul_sum] congr 1 congr 1 apply Finset.sum_congr rfl intro i hi ring rw [he] nlinarith have zero_mem_testValues (u : V → ℝ) : 0 ∈ testValues u := by refine ⟨PEmpty, inferInstance, PEmpty.elim, by simp, by simp [Pairwise], ?_⟩ simp [segSum] have TestBound.bddAbove {u : V → ℝ} {C : ℝ} (h : TestBound u C) : BddAbove (testValues u) := by refine ⟨C, ?_⟩ rintro r ⟨ι, inst, S, hs, hd, rfl⟩ exact h ι inst S hs hd have TestBound.squareSup_le {u : V → ℝ} {C : ℝ} (h : TestBound u C) : squareSup u ≤ C := by apply csSup_le ⟨0, zero_mem_testValues u⟩ rintro r ⟨ι, inst, S, hs, hd, rfl⟩ exact h ι inst S hs hd have testBound_squareSup {u : V → ℝ} (hu : ∃ C, TestBound u C) : TestBound u (squareSup u) := by intro ι inst S hs hd exact le_csSup (TestBound.bddAbove hu.choose_spec) ⟨ι, inst, S, hs, hd, rfl⟩ have squareSup_nonneg {u : V → ℝ} (hu : ∃ C, TestBound u C) : 0 ≤ squareSup u := TestBound.nonneg (testBound_squareSup hu) have rho_nonneg (u : V → ℝ) : 0 ≤ rho u := Real.sqrt_nonneg _ have rho_sq {u : V → ℝ} (hu : ∃ C, TestBound u C) : rho u ^ 2 = squareSup u := Real.sq_sqrt (squareSup_nonneg hu) have testBound_rho_sq {u : V → ℝ} (hu : ∃ C, TestBound u C) : TestBound u (rho u ^ 2) := by rw [rho_sq hu] exact testBound_squareSup hu have rho_le_of_testBound {u : V → ℝ} {C : ℝ} (hC : 0 ≤ C) (hu : TestBound u (C ^ 2)) : rho u ≤ C := Real.sqrt_le_iff.mpr ⟨hC, TestBound.squareSup_le hu⟩ have rho_add_le {u v : V → ℝ} (hu : ∃ C, TestBound u C) (hv : ∃ C, TestBound v C) : rho (u + v) ≤ rho u + rho v := rho_le_of_testBound (add_nonneg (rho_nonneg u) (rho_nonneg v)) (TestBound.add (testBound_rho_sq hu) (testBound_rho_sq hv) (rho_nonneg u) (rho_nonneg v)) have rho_smul_le {u : V → ℝ} (hu : ∃ C, TestBound u C) (a : ℝ) : rho (a • u) ≤ |a| * rho u := by apply rho_le_of_testBound (mul_nonneg (abs_nonneg a) (rho_nonneg u)) have hh := TestBound.smul (testBound_rho_sq hu) a simpa only [mul_pow, sq_abs] using hh have rho_zero : rho (0 : V → ℝ) = 0 := by apply le_antisymm _ (rho_nonneg _) apply rho_le_of_testBound (C := 0) (by norm_num) simpa using (TestBound.zero : TestBound (0 : V → ℝ) 0) have l1size_nonneg [PartialOrder V] (u : V →₀ ℝ) : 0 ≤ l1size u := sum_nonneg (fun vertex _ => abs_nonneg (u vertex)) have finset_abs_sum_le_l1size [PartialOrder V] (u : V →₀ ℝ) (S : Finset V) : ∑ v ∈ S, |u v| ≤ l1size u := by have he : (∑ v ∈ S ∪ u.support, |u v|) = l1size u := by symm apply sum_subset subset_union_right intro v hv hn rw [Finsupp.notMem_support_iff.mp hn, abs_zero] rw [← he] exact sum_le_sum_of_subset_of_nonneg subset_union_left (fun v hv hn => abs_nonneg _) have testBound_l1size (u : V →₀ ℝ) : TestBound u (l1size u ^ 2) := by intro ι inst S hS hd have habs : (∑ i, |segSum u (S i)|) ≤ l1size u := by calc (∑ i, |segSum u (S i)|) ≤ ∑ i, ∑ v ∈ S i, |u v| := sum_le_sum fun i hi => abs_sum_le_sum_abs _ _ _ = ∑ v ∈ univ.biUnion S, |u v| := (sum_biUnion (by intro i hi j hj hij; exact hd hij)).symm _ ≤ l1size u := finset_abs_sum_le_l1size u _ have hsq := sum_sq_le_sq_sum_of_nonneg (s := (univ : Finset ι)) (f := fun i => |segSum u (S i)|) (fun i hi => abs_nonneg _) simp only [sq_abs] at hsq have hnonneg : 0 ≤ ∑ i, |segSum u (S i)| := sum_nonneg (fun i hi => abs_nonneg _) nlinarith [l1size_nonneg u] have finsupp_has_testBound (u : V →₀ ℝ) : ∃ C, TestBound u C := ⟨_, testBound_l1size u⟩ exact Seminorm.ofSMulLE (fun u : V →₀ ℝ => rho u) rho_zero (fun u v => rho_add_le (finsupp_has_testBound u) (finsupp_has_testBound v)) (fun a u => by simpa only [Real.norm_eq_abs, Finsupp.coe_smul] using rho_smul_le (finsupp_has_testBound u) a)
/-- Finite coordinate vectors with the segment norm (a type synonym preventsclashes with any other norm on finitely supported functions). -/def TestVector (V : Type) := V →₀ ℝ
namespace TestVector
variable {V : Type}
instance : AddCommGroup (TestVector V) := inferInstanceAs (AddCommGroup (V →₀ ℝ))
instance : Module ℝ (TestVector V) := inferInstanceAs (Module ℝ (V →₀ ℝ))
def toFinsupp (u : TestVector V) : V →₀ ℝ := u
instance : CoeFun (TestVector V) (fun _ => V → ℝ) := ⟨fun u => u.toFinsupp⟩
variable [PartialOrder V]
instance : Norm (TestVector V) := ⟨fun u => rho u⟩
instance : NormedAddCommGroup (TestVector V) := by have isSegment_singleton (v : V) : IsSegment ({v} : Finset V) := by constructor · intro a ha b hb simp only [mem_singleton] at ha hb subst a subst b exact Or.inl le_rfl · intro a ha b hb c hac hcb simp only [mem_singleton] at ha hb ⊢ subst a subst b exact le_antisymm hcb hac have TestBound.nonneg {u : V → ℝ} {C : ℝ} (h : TestBound u C) : 0 ≤ C := by simpa using h PEmpty inferInstance PEmpty.elim (by simp) (by simp [Pairwise]) have TestBound.single {u : V → ℝ} {C : ℝ} (h : TestBound u C) {S : Finset V} (hS : IsSegment S) : segSum u S ^ 2 ≤ C := by simpa using h Unit inferInstance (fun _ => S) (fun _ => hS) (by simp [Pairwise]) have TestBound.bddAbove {u : V → ℝ} {C : ℝ} (h : TestBound u C) : BddAbove (testValues u) := by refine ⟨C, ?_⟩ rintro r ⟨ι, inst, S, hs, hd, rfl⟩ exact h ι inst S hs hd have testBound_squareSup {u : V → ℝ} (hu : ∃ C, TestBound u C) : TestBound u (squareSup u) := by intro ι inst S hs hd exact le_csSup (TestBound.bddAbove hu.choose_spec) ⟨ι, inst, S, hs, hd, rfl⟩ have squareSup_nonneg {u : V → ℝ} (hu : ∃ C, TestBound u C) : 0 ≤ squareSup u := TestBound.nonneg (testBound_squareSup hu) have rho_nonneg (u : V → ℝ) : 0 ≤ rho u := Real.sqrt_nonneg _ have rho_sq {u : V → ℝ} (hu : ∃ C, TestBound u C) : rho u ^ 2 = squareSup u := Real.sq_sqrt (squareSup_nonneg hu) have testBound_rho_sq {u : V → ℝ} (hu : ∃ C, TestBound u C) : TestBound u (rho u ^ 2) := by rw [rho_sq hu] exact testBound_squareSup hu have coordinate_le_rho {u : V → ℝ} (hu : ∃ C, TestBound u C) (v : V) : |u v| ≤ rho u := by have hh := TestBound.single (testBound_rho_sq hu) (isSegment_singleton v) simp only [segSum, sum_singleton] at hh exact (sq_le_sq₀ (abs_nonneg _) (rho_nonneg _)).mp (by simpa only [sq_abs] using hh) have l1size_nonneg [PartialOrder V] (u : V →₀ ℝ) : 0 ≤ l1size u := sum_nonneg (fun vertex _ => abs_nonneg (u vertex)) have finset_abs_sum_le_l1size [PartialOrder V] (u : V →₀ ℝ) (S : Finset V) : ∑ v ∈ S, |u v| ≤ l1size u := by have he : (∑ v ∈ S ∪ u.support, |u v|) = l1size u := by symm apply sum_subset subset_union_right intro v hv hn rw [Finsupp.notMem_support_iff.mp hn, abs_zero] rw [← he] exact sum_le_sum_of_subset_of_nonneg subset_union_left (fun v hv hn => abs_nonneg _) have testBound_l1size (u : V →₀ ℝ) : TestBound u (l1size u ^ 2) := by intro ι inst S hS hd have habs : (∑ i, |segSum u (S i)|) ≤ l1size u := by calc (∑ i, |segSum u (S i)|) ≤ ∑ i, ∑ v ∈ S i, |u v| := sum_le_sum fun i hi => abs_sum_le_sum_abs _ _ _ = ∑ v ∈ univ.biUnion S, |u v| := (sum_biUnion (by intro i hi j hj hij; exact hd hij)).symm _ ≤ l1size u := finset_abs_sum_le_l1size u _ have hsq := sum_sq_le_sq_sum_of_nonneg (s := (univ : Finset ι)) (f := fun i => |segSum u (S i)|) (fun i hi => abs_nonneg _) simp only [sq_abs] at hsq have hnonneg : 0 ≤ ∑ i, |segSum u (S i)| := sum_nonneg (fun i hi => abs_nonneg _) nlinarith [l1size_nonneg u] have finsupp_has_testBound (u : V →₀ ℝ) : ∃ C, TestBound u C := ⟨_, testBound_l1size u⟩ exact NormedAddCommGroup.ofCore (𝕜 := ℝ) { norm_nonneg u := apply_nonneg (segmentSeminorm V) u.toFinsupp norm_triangle u v := map_add_le_add (segmentSeminorm V) u.toFinsupp v.toFinsupp norm_smul a u := map_smul_eq_mul (segmentSeminorm V) a u.toFinsupp norm_eq_zero_iff u := ⟨by intro h apply Finsupp.ext intro v have hh := coordinate_le_rho (finsupp_has_testBound u.toFinsupp) v change rho u.toFinsupp = 0 at h rw [h] at hh exact abs_nonpos_iff.mp hh, by rintro rfl exact map_zero (segmentSeminorm V)⟩ }
instance : NormedSpace ��� (TestVector V) where norm_smul_le a u := le_of_eq (map_smul_eq_mul (segmentSeminorm V) a u.toFinsupp)
end TestVector
/-- J(T), completion of the finite-support disjoint-segment norm. -/abbrev J (V : Type) [PartialOrder V] := UniformSpace.Completion (TestVector V)
/-- The full continuous dual, used for the finite-height forest example. -/abbrev FullDual (V : Type) [PartialOrder V] := StrongDual ℝ (J V)
section CoordinateCompletion
variable {W : no_index Type} [PartialOrder W]
instance fullDualAddCommGroup : AddCommGroup (FullDual W) := inferInstanceAs (AddCommGroup (StrongDual ℝ (J W)))
end CoordinateCompletion
/-- Finite words, ordered by extension, including the empty root. -/structure Word where letters : List ℕ deriving DecidableEq
namespace Word
instance : PartialOrder Word where le a b := a.letters <+: b.letters le_refl _ := List.prefix_rfl le_trans _ _ _ := List.IsPrefix.trans le_antisymm a b hab hba := by have h := hab.eq_of_length (Nat.le_antisymm hab.length_le hba.length_le) cases a; cases b; cases h; rfl
end Word
/-- A disjoint forest: one copy of `Nat^{≤h}` for every `h≥1`. -/structure Vertex where height : ℕ positive : 1 ≤ height word : Word bounded : word.letters.length ≤ height deriving DecidableEq
namespace Vertex
instance : PartialOrder Vertex where le a b := a.height = b.height ∧ a.word ≤ b.word le_refl _ := ⟨rfl,le_rfl⟩ le_trans a b c hab hbc := ⟨hab.1.trans hbc.1,hab.2.trans hbc.2⟩ le_antisymm a b hab hba := by obtain ⟨hh, hw⟩ := hab have he := le_antisymm hw hba.2 cases a; cases b; cases hh; cases he; rfl
end Vertex
namespace Diamond
/-- An oriented edge enumeration; only the associated undirected unit-edgesimple graph is used for distances. -/structure Network where V : Type E : Type left : E → V right : E → V distinct : ∀ e, left e ≠ right e
namespace Network
variable (A : Network)
def graph : SimpleGraph A.V where Adj u v := ∃ e : A.E, (A.left e = u ∧ A.right e = v) ∨ (A.right e = u ∧ A.left e = v) symm := ⟨by rintro u v ⟨e,h | h⟩ · exact ⟨e,Or.inr ⟨h.2,h.1⟩⟩ · exact ⟨e,Or.inl ⟨h.2,h.1⟩⟩⟩ loopless := ⟨by rintro u ⟨e,h | h⟩ · exact A.distinct e (h.1.trans h.2.symm) · exact A.distinct e (h.2.trans h.1.symm)⟩
/-- Every edge is replaced by countably many internally disjoint two-edgepaths. All old vertices remain, and each pair (edge,index) is a new midpoint. -/@[reducible] def refine : Network where V := Sum A.V (A.E × ℕ) E := A.E × ℕ × Bool left e := if e.2.2 then Sum.inr (e.1,e.2.1) else Sum.inl (A.left e.1) right e := if e.2.2 then Sum.inl (A.right e.1) else Sum.inr (e.1,e.2.1) distinct := by rintro ⟨e,j,b⟩; cases b <;> simp
/-- Iterating the very same edge replacement, starting from an arbitrarynetwork. This recursion groups the first replacement before the remaining ones. -/@[reducible] def iterate : Network → ℕ → Network | A,0 => A | A,n+1 => iterate A.refine n
end Network
/-- D₀ is precisely one edge. -/@[reducible] def base : Network where V := Bool E := Unit left _ := false right _ := true distinct _ := by decide
/-- Countably branching diamonds, all current edges of length one. -/@[reducible] def diamond (k : ℕ) := base.iterate k
/-- The shortest-path distance, via Mathlib's actual graph distance. -/def distance (k : ℕ) (u v : (diamond k).V) : ℝ := ((diamond k).graph.dist u v : ℝ)variable {E : Type} [NormedAddCommGroup E] [NormedSpace ℝ E]
/-- The distortion convention, including its arbitrary positive scale. -/def EmbeddingBound (k : ℕ) (f : (diamond k).V → E) (C : ℝ) : Prop := ∃ s : ℝ, 0 < s ∧ ∀ u v, s*distance k u v ≤ ‖f u-f v‖ ∧ ‖f u-f v‖ ≤ C*s*distance k u v
end Diamond
/-- The spaceis the full continuous dual of the specified segment-norm completion, not thecoordinate completion in place of that dual. -/theorem main_theorem : (¬FiniteDimensional ℝ (FullDual Vertex)) ∧ TopologicalSpace.SeparableSpace (FullDual Vertex) ∧ Reflexive (FullDual Vertex) ∧ (∀ (α β : ℝ) (R : EquivalentNorm (FullDual Vertex) α β), ¬IsAUC R.N) ∧ (∀ t : ℝ, 0 < t → Real.sqrt (1+t^2/12)-1 ≤ averageModulus (FullDual Vertex) norm t) ∧ (∀ (k : ℕ) (f : (Diamond.diamond k).V → FullDual Vertex) (C : ℝ), Diamond.EmbeddingBound k f C → Real.sqrt (1+(k:ℝ)/12) ≤ C) := by sorry
end ForestSpace
end
end OAI12345678910111213{ "challenge_module": "ComparatorChallenges.FormulaHitting", "solution_module": "OAI.Algebra.FormulaHitting.Hitting", "theorem_names": [ "OAI.NCHitting.universal_hitting" ], "permitted_axioms": [ "propext", "Quot.sound", "Classical.choice" ], "enable_nanoda": false}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566import Mathlib.Data.Matrix.Basicimport Mathlib.Data.Rat.Defs
namespace OAI
namespace NCHitting
abbrev Word (n : ℕ) := List (Fin n)abbrev WordSeries (F : Type*) (n : ℕ) := Word n → F
def convolution {F : Type*} {n : ℕ} [Semiring F] (f g : WordSeries F n) : Word n → F | [] => f [] * g [] | i :: w => f [] * g (i :: w) + convolution (fun v => f (i :: v)) g w
inductive Formula (F : Type*) (n : ℕ) where | scalar : F → Formula F n | var : Fin n → Formula F n | add : Formula F n → Formula F n → Formula F n | mul : Formula F n → Formula F n → Formula F n
namespace Formula
def size {F : Type*} {n : ℕ} : Formula F n → ℕ | scalar _ => 1 | var _ => 1 | add f g => f.size + g.size + 1 | mul f g => f.size + g.size + 1
noncomputable def coeff {F : Type*} {n : ℕ} [Semiring F] : Formula F n → WordSeries F n | scalar a => fun w => if w = [] then a else 0 | var i => fun w => if w = [i] then 1 else 0 | add f g => fun w => coeff f w + coeff g w | mul f g => convolution (coeff f) (coeff g)
def eval {F A : Type*} {n : ℕ} [Semiring A] (scalarMap : F → A) (T : Fin n → A) : Formula F n → A | scalar a => scalarMap a | var i => T i | add f g => eval scalarMap T f + eval scalarMap T g | mul f g => eval scalarMap T f * eval scalarMap T g
end Formula
def dimension (n s : ℕ) : ℕ := if n = 1 ∧ s = 1 then 1 else 2 * n * s ^ 2
def matrixEntry (i r q : ℕ) : ℚ := if q < r then (-1 : ℚ) ^ (r - q - 1) / ((r : ℚ) * (i : ℚ) ^ (r - q)) else 0
def generator (n s : ℕ) : Fin n → Matrix (Fin (dimension n s)) (Fin (dimension n s)) ℚ := fun i r q => if n = 1 ∧ s = 1 then 1 else matrixEntry (i.val + 1) r.val q.val
universe u_2
theorem universal_hitting (n s : ℕ) (hn : 1 ≤ n) (hs : 1 ≤ s) (F : Type u_2) [Field F] [CharZero F] (f : Formula F n) (hsize : f.size ≤ s) (hf : ∃ w, f.coeff w ≠ 0) : f.eval (Matrix.scalar (Fin (dimension n s))) (fun i r q => (generator n s i r q : F)) ≠ 0 := by sorry
end NCHitting
end OAI1234567891011121314{ "challenge_module": "ComparatorChallenges.FoulkesHowe", "solution_module": "OAI.RepresentationTheory.FoulkesHowe.Stabilization", "theorem_names": [ "OAI.Problem346.canonical_foulkes_howe_surjective" ], "definition_names": [], "permitted_axioms": [ "propext", "Quot.sound", "Classical.choice" ], "enable_nanoda": false}1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950import Mathlib
namespace OAI
noncomputable section
open scoped BigOperatorsuniverse u
namespace Problem346
def symMonomialRaw (n : ℕ) (V : Type u) [AddCommGroup V] [Module ℂ V] (v : Fin n → V) : SymmetricAlgebra ℂ V := ∏ i : Fin n, SymmetricAlgebra.ι ℂ V (v i)
def symPowSubmodule (n : ℕ) (V : Type u) [AddCommGroup V] [Module ℂ V] : Submodule ℂ (SymmetricAlgebra ℂ V) := Submodule.span ℂ (Set.range (symMonomialRaw n V))
abbrev SymPow (n : ℕ) (V : Type u) [AddCommGroup V] [Module ℂ V] := ↥(symPowSubmodule n V)
def symMonomial (n : ℕ) (V : Type u) [AddCommGroup V] [Module ℂ V] (v : Fin n → V) : SymPow n V := ⟨symMonomialRaw n V v, Submodule.subset_span (Set.mem_range_self v)⟩
def foulkesFormula (a b : ℕ) (V : Type u) [AddCommGroup V] [Module ℂ V] (v : Fin b → Fin a → V) : SymPow a (SymPow b V) := by classical exact ((a.factorial : ℂ) ^ b)⁻¹ • ∑ σ : Fin b → Equiv.Perm (Fin a), symMonomial a (SymPow b V) (fun i => symMonomial b V (fun j => v j ((σ j) i)))
def IsFoulkesMap (a b : ℕ) (V : Type u) [AddCommGroup V] [Module ℂ V] (μ : SymPow b (SymPow a V) →ₗ[ℂ] SymPow a (SymPow b V)) : Prop := ∀ v : Fin b → Fin a → V, μ (symMonomial b (SymPow a V) (fun j => symMonomial a V (v j))) = foulkesFormula a b V v
theorem canonical_foulkes_howe_surjective : ∀ (V : Type u) [AddCommGroup V] [Module ℂ V] [FiniteDimensional ℂ V] (a b : ℕ), 2 ≤ a → a * (a - 1) ≤ b → ∃ μ : SymPow b (SymPow a V) →ₗ[ℂ] SymPow a (SymPow b V), IsFoulkesMap a b V μ ∧ Function.Surjective μ ∧ ∀ ν : SymPow b (SymPow a V) →ₗ[ℂ] SymPow a (SymPow b V), IsFoulkesMap a b V ν → ν = μ := by sorry
end Problem346
end
end OAI1234567891011121314{ "challenge_module": "ComparatorChallenges.FourRowPermanent", "solution_module": "OAI.Combinatorics.Permanent.Main", "theorem_names": [ "OAI.FourRow.robust_permanent" ], "definition_names": [], "permitted_axioms": [ "propext", "Quot.sound", "Classical.choice" ], "enable_nanoda": false}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748import Mathlib
namespace OAI
/-!# A robust four-row permanent inequality
`Fin 4` labels four sites. A law is represented by real probability masses;`IsProbability` asserts nonnegativity and total mass one. All row norms usethe uniform counting normalization.-/
noncomputable sectionnamespace FourRowopen scoped BigOperators
abbrev Site := Fin 4abbrev Perm := Equiv.Perm Siteabbrev Law := Perm → ℝabbrev Functions := Site → Site → ℝ
def IsProbability (ν : Law) : Prop := (∀ π, 0 ≤ ν π) ∧ ∑ π, ν π = 1
def UniformMarginals (ν : Law) : Prop := ∀ i j : Site, ∑ π, (if π i = j then ν π else 0) = 1 / 4
def totalVariation (ν : Law) : ℝ := (∑ π, |ν π - 1 / 24|) / 2
def lpNorm (p : ℝ) (f : Site → ℝ) : ℝ := ((∑ j, (f j) ^ p) / 4) ^ (1 / p)
def permanentExpectation (ν : Law) (f : Functions) : ℝ := ∑ π, ν π * ∏ i, f i (π i)
theorem robust_permanent : ∃ p₀ : ℝ, 4 / 3 < p₀ ∧ p₀ < 2 ∧ ∃ ε : ℝ, 0 < ε ∧ ∀ ν : Law, IsProbability ν → totalVariation ν < ε → UniformMarginals ν → ∀ f : Functions, (∀ i j, 0 ≤ f i j) → permanentExpectation ν f ≤ ∏ i, lpNorm p₀ (f i) := by sorry
end FourRowend
end OAI1234567891011121314{ "challenge_module": "ComparatorChallenges.FreeIsing", "definition_names": [], "enable_nanoda": false, "permitted_axioms": [ "propext", "Quot.sound", "Classical.choice" ], "solution_module": "OAI.Probability.FreeIsing.Main", "theorem_names": [ "OAI.Problem367.free_ising_factor_iff_threshold" ]}1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495import Mathlib
namespace OAI
noncomputable section
open MeasureTheory
namespace Problem367
abbrev TreeVertex (d : ℕ) := {word : List (Fin d) // List.IsChain (fun first second : Fin d => first ≠ second) word}
def treeAdj {d : ℕ} (u v : TreeVertex d) : Prop := (∃ c : Fin d, v.1 = u.1 ++ [c]) ∨ (∃ c : Fin d, u.1 = v.1 ++ [c])
structure TreeAut (d : ℕ) where toEquiv : TreeVertex d ≃ TreeVertex d map_adj : ∀ u v, treeAdj (toEquiv u) (toEquiv v) ↔ treeAdj u v
def relabel {d : ℕ} {α : Type*} (g : TreeAut d) (x : TreeVertex d → α) : TreeVertex d → α := fun v => x (g.toEquiv.symm v)
inductive IsingSpin where | neg | pos deriving DecidableEq
protected abbrev IsingSpin.enumList : List IsingSpin := [.neg, .pos]
protected theorem IsingSpin.enumList_getElem?_ctorIdx_eq (x : IsingSpin) : IsingSpin.enumList[x.ctorIdx]? = some x := by cases x <;> rfl
protected theorem IsingSpin.enumList_nodup : IsingSpin.enumList.Nodup := by decide
instance : Fintype IsingSpin where elems := ⟨IsingSpin.enumList, IsingSpin.enumList_nodup⟩ complete x := by cases x <;> decide
instance isingSpinMeasurable : MeasurableSpace IsingSpin := ⊤
def uniform01 : Measure ℝ := volume.restrict (Set.Icc (0 : ℝ) 1)
instance uniform01Probability : IsProbabilityMeasure uniform01 where measure_univ := by simp [uniform01]
def labelMeasure (d : ℕ) : Measure (TreeVertex d → ℝ) := by classical exact Measure.infinitePi (fun _ : TreeVertex d => uniform01)
def ConnectedFinset {d : ℕ} (D : Finset (TreeVertex d)) : Prop := D.Nonempty ∧ ∀ u ∈ D, ∀ v ∈ D, Relation.ReflTransGen (fun x y : TreeVertex d => x ∈ D ∧ y ∈ D ∧ treeAdj x y) u v
def inducedEdges {d : ℕ} (D : Finset (TreeVertex d)) : Finset (TreeVertex d × TreeVertex d) := by classical exact (D.product D).filter (fun e => treeAdj e.1 e.2 ∧ e.1.1.length < e.2.1.length)
def freeCylinderWeight {d : ℕ} (theta : ℝ) (D : Finset (TreeVertex d)) (eta : TreeVertex d → IsingSpin) : ENNReal := ENNReal.ofReal ((1 / 2 : ℝ) * Finset.prod (inducedEdges D) (fun e => (1 + (if eta e.1 = eta e.2 then theta else -theta)) / 2))
def HasFreeIsingLaw {d : ℕ} (theta : ℝ) (mu : Measure (TreeVertex d → IsingSpin)) : Prop := ∀ (D : Finset (TreeVertex d)), ConnectedFinset D → ∀ eta : TreeVertex d → IsingSpin, mu {x | ∀ v ∈ D, x v = eta v} = freeCylinderWeight theta D eta
def IsFactorOfIID (d : ℕ) (theta : ℝ) : Prop := ∃ Phi : (TreeVertex d → ℝ) → (TreeVertex d → IsingSpin), Measurable Phi ∧ HasFreeIsingLaw theta (Measure.map Phi (labelMeasure d)) ∧ ∀ g : TreeAut d, ∀ᵐ U ∂labelMeasure d, Phi (relabel g U) = relabel g (Phi U)
theorem free_ising_factor_iff_threshold : ∀ (d : ℕ) (beta : ℝ), 3 ≤ d → 0 ≤ beta → (IsFactorOfIID d (Real.tanh beta) ↔ Real.tanh beta ≤ 1 / Real.sqrt ((d : ℝ) - 1)) := by sorry
end Problem367
end
end OAI1234567891011121314{ "challenge_module": "ComparatorChallenges.FreeUniformSpanningForest", "solution_module": "OAI.Probability.SpanningForest.Factor", "theorem_names": [ "OAI.Problem336.fusf_is_factor_iid" ], "definition_names": [], "permitted_axioms": [ "propext", "Quot.sound", "Classical.choice" ], "enable_nanoda": false}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149import Mathlib
namespace OAI
noncomputable section
open MeasureTheoryopen scoped BigOperators ENNReal Topology
namespace Problem336
abbrev GraphCode := {a : ℕ → ℕ → Bool // (∀ u, a u u = false) ∧ (∀ u v, a u v = a v u)}
abbrev EdgeCode := {p : ℕ × ℕ // p.1 < p.2}
abbrev EdgeConfiguration := EdgeCode → Bool
abbrev FactorRule := GraphCode → (ℕ → ℝ) → EdgeCode → Bool
abbrev FiniteSubgraphCode := Finset ℕ × Finset (ℕ × ℕ)
def Adj (G : GraphCode) (u v : ℕ) : Prop := G.1 u v = true
def GraphConnected (G : GraphCode) : Prop := ∀ u v, Relation.ReflTransGen (fun x y => Adj G x y) u v
def GraphLocallyFinite (G : GraphCode) : Prop := ∀ u, Set.Finite {v : ℕ | Adj G u v}
def mkEdge (u v : ℕ) (h : u ≠ v) : EdgeCode := by by_cases huv : u < v · exact ⟨(u, v), huv⟩ · exact ⟨(v, u), lt_of_le_of_ne (Nat.le_of_not_gt huv) (Ne.symm h)⟩
def rawPair (u v : ℕ) : ℕ × ℕ := if u < v then (u, v) else (v, u)
def relabelGraph (σ : Equiv ℕ ℕ) (G : GraphCode) : GraphCode := ⟨fun u v => G.1 (σ.symm u) (σ.symm v), by constructor · intro u exact G.2.1 (σ.symm u) · intro u v exact G.2.2 (σ.symm u) (σ.symm v)⟩
def relabelLabels (σ : Equiv ℕ ℕ) (U : ℕ → ℝ) : ℕ → ℝ := fun u => U (σ.symm u)
def mapEdge (σ : Equiv ℕ ℕ) (e : EdgeCode) : EdgeCode := mkEdge (σ e.1.1) (σ e.1.2) (by intro h apply Nat.ne_of_lt e.2 exact σ.injective h)
def RuleBorel (Phi : FactorRule) : Prop := Measurable (fun q : GraphCode × ((ℕ → ℝ) × EdgeCode) => Phi q.1 q.2.1 q.2.2)
def RuleEquivariant (Phi : FactorRule) : Prop := ∀ (σ : Equiv ℕ ℕ) (G : GraphCode) (U : ℕ → ℝ) (e : EdgeCode), Phi (relabelGraph σ G) (relabelLabels σ U) (mapEdge σ e) = Phi G U e
def TreeAdj (T : Finset (ℕ × ℕ)) (u v : ℕ) : Prop := rawPair u v ∈ T
def SubgraphAdj (K : FiniteSubgraphCode) (u v : ℕ) : Prop := u ∈ K.1 ∧ v ∈ K.1 ∧ rawPair u v ∈ K.2
def TreeOn (K : FiniteSubgraphCode) (T : Finset (ℕ × ℕ)) : Prop := T ⊆ K.2 ∧ T.card + 1 = K.1.card ∧ ∀ u ∈ K.1, ∀ v ∈ K.1, Relation.ReflTransGen (TreeAdj T) u v
def spanningTrees (K : FiniteSubgraphCode) : Finset (Finset (ℕ × ℕ)) := by classical exact K.2.powerset.filter (TreeOn K)
def ustCylinder (K : FiniteSubgraphCode) (A B : Finset EdgeCode) : ℝ≥0∞ := by classical let all := spanningTrees K let good := all.filter (fun T => (∀ e ∈ A, e.1 ∈ T) ∧ (∀ e ∈ B, e.1 ∉ T)) exact (good.card : ℝ≥0∞) / (all.card : ℝ≥0∞)
def IsFiniteConnectedSubgraph (G : GraphCode) (K : FiniteSubgraphCode) : Prop := K.1.Nonempty ∧ (∀ p ∈ K.2, p.1 ∈ K.1 ∧ p.2 ∈ K.1 ∧ p.1 < p.2 ∧ Adj G p.1 p.2) ∧ ∀ u ∈ K.1, ∀ v ∈ K.1, Relation.ReflTransGen (SubgraphAdj K) u v
def IsConnectedExhaustion (G : GraphCode) (H : ℕ → FiniteSubgraphCode) : Prop := (∀ n, IsFiniteConnectedSubgraph G (H n)) ∧ (∀ n, (H n).1 ⊆ (H (n + 1)).1 ∧ (H n).2 ⊆ (H (n + 1)).2) ∧ (∀ u v, u < v → Adj G u v → ∃ n, (u, v) ∈ (H n).2)
def uniform01 : Measure ℝ := volume.restrict (Set.Icc (0 : ℝ) 1)
def IsVertexIID {Ω : Type} [MeasurableSpace Ω] (P : Measure Ω) (U : ℕ → Ω → ℝ) : Prop := (∀ i, Measurable (U i)) ∧ ∀ (s : Finset ℕ) (A : ℕ → Set ℝ), (∀ i ∈ s, MeasurableSet (A i)) → P {ω | ∀ i ∈ s, U i ω ∈ A i} = Finset.prod s (fun i => uniform01 (A i))
def HasFUSFLaw {Ω : Type} [MeasurableSpace Ω] (G : GraphCode) (P : Measure Ω) (X : Ω → EdgeConfiguration) : Prop := (∀ e, Measurable (fun ω => X ω e)) ∧ ∀ (H : ℕ → FiniteSubgraphCode), IsConnectedExhaustion G H → ∀ (A B : Finset EdgeCode), Filter.Tendsto (fun n => ustCylinder (H n) A B) Filter.atTop (nhds (P {ω | (∀ e ∈ A, X ω e = true) ∧ (∀ e ∈ B, X ω e = false)}))
def WorksOnGraph (Phi : FactorRule) (G : GraphCode) : Prop := GraphConnected G → GraphLocallyFinite G → ∀ (Ω : Type) [MeasurableSpace Ω] (P : Measure Ω) (U : ℕ → Ω → ℝ), IsVertexIID P U → HasFUSFLaw G P (fun ω e => Phi G (fun v => U v ω) e)
theorem fusf_is_factor_iid : ∃ Phi : FactorRule, RuleBorel Phi ∧ RuleEquivariant Phi ∧ ∀ G : GraphCode, WorksOnGraph Phi G := by sorry
end Problem336
end
end OAI1234567891011121314{ "challenge_module": "ComparatorChallenges.GammaPassage", "solution_module": "OAI.Probability.GammaPassage.Differentiability", "theorem_names": [ "OAI.GammaFPP.gamma_differentiability" ], "definition_names": [], "permitted_axioms": [ "propext", "Quot.sound", "Classical.choice" ], "enable_nanoda": false}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112import Mathlib.Algebra.BigOperators.Group.List.Basicimport Mathlib.Algebra.Group.Prodimport Mathlib.Analysis.Calculus.ContDiff.Defsimport Mathlib.Analysis.Calculus.Deriv.Basicimport Mathlib.Analysis.Calculus.FDeriv.Basicimport Mathlib.Analysis.InnerProductSpace.PiL2import Mathlib.Probability.Distributions.Gammaimport Mathlib.Probability.Independence.Basic
namespace OAI
namespace PlanarFPP
open Set MeasureTheory ProbabilityTheory Filteropen scoped Topology
abbrev Vertex := ℤ × ℤ
abbrev Edge := Vertex × Bool
inductive Step where | east | west | north | south deriving DecidableEq
def Step.delta : Step → Vertex | .east => (1, 0) | .west => (-1, 0) | .north => (0, 1) | .south => (0, -1)
def Step.edge (p : Vertex) : Step → Edge | .east => (p, false) | .west => (p + (-1, 0), false) | .north => (p, true) | .south => (p + (0, -1), true)
def displacement (ds : List Step) : Vertex := (ds.map Step.delta).sum
def pathCost (τ : Edge → ℝ) (p : Vertex) : List Step → ℝ | [] => 0 | d :: ds => τ (d.edge p) + pathCost τ (p + d.delta) ds
abbrev Plane := EuclideanSpace ℝ (Fin 2)
noncomputable def latticeFloor (v : Plane) : Vertex := (⌊v 0⌋, ⌊v 1⌋)
noncomputable def passageTime (τ : Edge → ℝ) (p q : Vertex) : ℝ := sInf {t | ∃ ds : List Step, p + displacement ds = q ∧ pathCost τ p ds = t}
structure TimeConstantNorm (μ : Plane → ℝ) : Prop where nonneg : ∀ v, 0 ≤ μ v zero_iff : ∀ v, μ v = 0 ↔ v = 0 triangle : ∀ v w, μ (v + w) ≤ μ v + μ w homogeneous : ∀ (a : ℝ) v, μ (a • v) = |a| * μ v
def IsTimeConstant {Ω : Type*} [MeasurableSpace Ω] (P : Measure Ω) (τ : Edge → Ω → ℝ) (μ : Plane → ℝ) : Prop := ∀ v : Plane, ∀ᵐ ω ∂P, Tendsto (fun t : ℝ => passageTime (fun e => τ e ω) (0, 0) (latticeFloor (t • v)) / t) atTop (𝓝 (μ v))
def DifferentiableAwayFromOrigin (μ : Plane → ℝ) : Prop := ∀ v : Plane, v ≠ 0 → ∃ ℓ : Plane →L[ℝ] ℝ, HasFDerivAt μ ℓ v
end PlanarFPP
namespace GammaFPP
open Set MeasureTheory ProbabilityTheory PlanarFPP
structure IidEnvironment {Ω : Type*} [MeasurableSpace Ω] (ν : Measure ℝ) (P : Measure Ω) (τ : PlanarFPP.Edge → Ω → ℝ) : Prop where probability : IsProbabilityMeasure P measurable : ∀ e, Measurable (τ e) independent : iIndepFun τ P marginal : ∀ e, Measure.map (τ e) P = ν
abbrev GammaEnvironment {Ω : Type*} [MeasurableSpace Ω] (shape rate : ℝ) (P : Measure Ω) (τ : PlanarFPP.Edge → Ω → ℝ) := IidEnvironment (gammaMeasure shape rate) P τ
/-- A regular C¹ parametrization of the curve near a point, with a continuous inverse. -/def HasC1CurveChart (S : Set Plane) (v : Plane) : Prop := ∃ U : Set Plane, IsOpen U ∧ v ∈ U ∧ v ∈ S ∧ ∃ γ : ℝ → Plane, ∃ θ : Plane → ℝ, ContDiff ℝ 1 γ ∧ ContinuousOn θ U ∧ (∀ t, γ t ∈ S ∩ U) ∧ (∀ t, θ (γ t)=t) ∧ (∀ z ∈ S ∩ U, γ (θ z)=z) ∧ (∀ t, ∃ d : Plane, HasDerivAt γ d t ∧ d ≠ 0)
/-- The Gamma theorem: an actual deterministic passage-time limit norm existsfor every positive shape and rate and every iid environment with that law.Its Frechet differentiability and literal unit-ball boundary charts areconclusions. No shape theorem, norm, or no-corner hypothesis is supplied. -/def GammaDifferentiabilityTarget : Prop := ∀ (shape rate : ℝ), 0 < shape → 0 < rate → ∀ (Ω : Type) [MeasurableSpace Ω] (P : Measure Ω) (τ : PlanarFPP.Edge → Ω → ℝ), GammaEnvironment shape rate P τ → ∃ μ : Plane → ℝ, TimeConstantNorm μ ∧ IsTimeConstant P τ μ ∧ DifferentiableAwayFromOrigin μ ∧ ∀ v ∈ frontier {z : Plane | μ z ≤ 1}, HasC1CurveChart (frontier {z : Plane | μ z ≤ 1}) v
theorem gamma_differentiability : GammaDifferentiabilityTarget := by sorry
end GammaFPP
end OAI1234567891011121314{ "challenge_module": "ComparatorChallenges.GaussianFiniteEntropy", "solution_module": "OAI.Probability.Localization.Main", "theorem_names": [ "OAI.RepeatedLocalization.FiniteEntropy.finite_expected_regularization" ], "definition_names": [], "permitted_axioms": [ "propext", "Classical.choice", "Quot.sound" ], "enable_nanoda": false}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205import Mathlib
namespace OAI
open MeasureTheory ProbabilityTheory Setopen scoped BigOperators ENNReal
namespace RepeatedLocalization
abbrev Coordinate (n : ℕ) := Fin n → ℝabbrev GaussianBlock (n : ℕ) := Fin (n / 16) → Fin (n + 1) → ℝabbrev Label (n : ℕ) := Fin (n / 16) → ℝabbrev History (N t : ℕ) := Fin t → Fin Nabbrev Cell (n : ℕ) := Σ J : ℕ, Fin n → Fin (2 ^ J)
instance cellMeasurableSpace (n : ℕ) : MeasurableSpace (Cell n) := ⊤
noncomputable def initialCube (n : ℕ) : Set (Coordinate n) := Set.pi Set.univ (fun _ => Set.Ico (-1 / (2 * Real.sqrt n)) (1 / (2 * Real.sqrt n)))
noncomputable def cubePrior (n : ℕ) : Measure (Coordinate n) := ProbabilityTheory.cond volume (initialCube n)
noncomputable def chart {n : ℕ} (z : Coordinate n) : Fin (n + 1) → ℝ := Fin.lastCases (Real.sqrt (1 - ∑ a, (z a) ^ 2)) z
noncomputable def cellSet {n : ℕ} (Q : Cell n) : Set (Coordinate n) := {z | ∀ a, -1 / (2 * Real.sqrt n) + (Q.2 a : ℝ) / (Real.sqrt n * (2 : ℝ) ^ Q.1) ≤ z a ∧ z a < -1 / (2 * Real.sqrt n) + ((Q.2 a : ℝ) + 1) / (Real.sqrt n * (2 : ℝ) ^ Q.1)}
def rootCell (n : ℕ) : Cell n := ⟨0, fun _ => 0⟩
noncomputable def gaussianBlockLaw (n : ℕ) : Measure (GaussianBlock n) := Measure.pi (fun _ => Measure.pi (fun _ => gaussianReal 0 1))
noncomputable def exactLabel {n : ℕ} (X : GaussianBlock n) (z : Coordinate n) : Label n := fun row => ∑ a, X row a * chart z a
structure BlockRule (n N : ℕ) where prob : (GaussianBlock n × Label n) → Fin N → ℝ measurable_prob : ∀ w, Measurable (fun data => prob data w) nonneg : ∀ data w, 0 ≤ prob data w sum_one : ∀ data, ∑ w, prob data w = 1
abbrev Rules (n N t : ℕ) := ∀ i : Fin t, History N i.val → BlockRule n N
def past {N t : ℕ} (w : History N t) (i : Fin t) : History N i.val := fun j => w ⟨j.val, Nat.lt_trans j.isLt i.isLt⟩
def through {N t : ℕ} (w : History N t) (i : Fin t) : History N (i.val + 1) := fun j => w ⟨j.val, Nat.lt_of_lt_of_le j.isLt i.isLt⟩
noncomputable def blockProbability {n N : ℕ} (rule : BlockRule n N) (z : Coordinate n) (w : Fin N) : ℝ := ∫ X, rule.prob (X, exactLabel X z) w ∂gaussianBlockLaw n
noncomputable def historyLikelihood {n N t : ℕ} (rules : Rules n N t) (z : Coordinate n) (w : History N t) : ℝ := ∏ i, blockProbability (rules i (past w i)) z (w i)
noncomputable def experimentLaw {n N t : ℕ} (rules : Rules n N t) : Measure (Coordinate n × History N t) := ∑ w : History N t, ((cubePrior n).withDensity (fun z => ENNReal.ofReal (historyLikelihood rules z w))).map (fun z => (z, w))
abbrev Disclosure (n N t : ℕ) := ∀ i : Fin t, Coordinate n → History N (i.val + 1) → Cell n
def ValidDisclosure {n N t : ℕ} (Q : Disclosure n N t) : Prop := (∀ i, Measurable (fun zh : Coordinate n × History N (i.val + 1) => Q i zh.1 zh.2)) ∧ (∀ i, (Set.range (fun zh : Coordinate n × History N (i.val + 1) => Q i zh.1 zh.2)).Finite) ∧ (∀ z ∈ initialCube n, ∀ w : History N t, ∀ i, z ∈ cellSet (Q i z (through w i)) ∧ cellSet (Q i z (through w i)) ⊆ initialCube n) ∧ (∀ z ∈ initialCube n, ∀ w : History N t, ∀ i j : Fin t, i ≤ j → cellSet (Q j z (through w j)) ⊆ cellSet (Q i z (through w i)))
noncomputable def transcriptMap {n N t : ℕ} (Q : Disclosure n N t) (zw : Coordinate n × History N t) : Coordinate n × (History N t × (Fin t → Cell n)) := (zw.1, (zw.2, fun i => Q i zw.1 (through zw.2 i)))
noncomputable def augmentedLaw {n N t : ℕ} (rules : Rules n N t) (Q : Disclosure n N t) := (experimentLaw rules).map (transcriptMap Q)
noncomputable def mutualInformation {α β : Type*} [MeasurableSpace α] [MeasurableSpace β] (μ : Measure (α × β)) : ℝ≥0∞ := InformationTheory.klDiv μ ((μ.map Prod.fst).prod (μ.map Prod.snd))
noncomputable def finalLevel {n N t : ℕ} (Q : Disclosure n N t) (zw : Coordinate n × History N t) : ℕ := if ht : 0 < t then let i : Fin t := ⟨t - 1, by omega⟩ (Q i zw.1 (through zw.2 i)).1 else 0
def MainStatement : Prop := ∃ c : ℝ, 0 < c ∧ ∃ n₀ : ℕ, ∀ C₀ : ℝ, 0 < C₀ → ∃ C : ℝ, 0 < C ∧ ∀ (n N t : ℕ), n₀ ≤ n → 1 ≤ N → ∀ rules : Rules n N t, (2 / (n / 8 : ℕ) + Real.exp (-c * (n / 16 : ℕ))) * Real.log N ≤ C₀ * (n + 1) → ∃ Q : Disclosure n N t, ValidDisclosure Q ∧ mutualInformation (augmentedLaw rules Q) ≤ ENNReal.ofReal (C * (n + 1) * t) ∧ (∫ zw, (finalLevel Q zw : ℝ) ∂experimentLaw rules) ≤ C * t
namespace FiniteEntropy
noncomputable def uniformCell {n : ℕ} (Q : Cell n) : Measure (Coordinate n) := ProbabilityTheory.cond volume (cellSet Q)
def Descendant {n : ℕ} (Q R : Cell n) : Prop := Q.1 ≤ R.1 ∧ cellSet R ⊆ cellSet Q
noncomputable def threshold (n h : ℕ) : ℝ := (2:ℝ)^(-(n:ℝ)*h/2)
def Heavy {n : ℕ} (P : Measure (Coordinate n)) (Q R : Cell n) : Prop := Descendant Q R ∧ Q.1 < R.1 ∧ threshold n (R.1-Q.1) < (P (cellSet R)).toReal
def FirstHeavy {n : ℕ} (P : Measure (Coordinate n)) (Q R : Cell n) : Prop := Heavy P Q R ∧ ∀ E : Cell n, Heavy P Q E → Descendant E R → E = R
noncomputable def residual {n : ℕ} (P : Measure (Coordinate n)) (Q : Cell n) : Set (Coordinate n) := cellSet Q \ ⋃ R : {R : Cell n // FirstHeavy P Q R}, cellSet R.val
abbrev Letter (n : ℕ) := Option (Cell n)abbrev Log (n : ℕ) := List (Letter n)instance logMeasurableSpace (n : ℕ) : MeasurableSpace (Log n) := ⊤
noncomputable def branch {n : ℕ} (P : Measure (Coordinate n)) (Q : Cell n) : Letter n → Set (Coordinate n) := by classical exact fun | none => residual P Q | some R => if FirstHeavy P Q R then cellSet R else ∅
noncomputable def attemptLetter {n : ℕ} (P : Measure (Coordinate n)) (Q : Cell n) (z : Coordinate n) : Letter n := by classical exact if h : ∃ R : Cell n, FirstHeavy P Q R ∧ z ∈ cellSet R then some h.choose else none
structure State (n : ℕ) where cell : Cell n event : Set (Coordinate n) stopped : Bool
noncomputable def update {n : ℕ} (P : Measure (Coordinate n)) (s : State n) (a : Letter n) : State n := if s.stopped then s else let μ := ProbabilityTheory.cond P s.event let E := branch μ s.cell a { cell := a.getD s.cell event := s.event ∩ E stopped := if a = none then decide ((1/2:ℝ) ≤ (μ E).toReal) else false }
noncomputable def state {n : ℕ} (P : Measure (Coordinate n)) (Q : Cell n) (h : Log n) : State n := h.foldl (update P) ⟨Q,cellSet Q,false⟩
noncomputable def run {n : ℕ} (P : Measure (Coordinate n)) (Q : Cell n) : ℕ → Coordinate n → Log n | 0, _ => [] | N+1, z => let h := run P Q N z let s := state P Q h if s.stopped then h else h ++ [attemptLetter (ProbabilityTheory.cond P s.event) s.cell z]
def Terminates {n : ℕ} (P : Measure (Coordinate n)) (Q : Cell n) (z : Coordinate n) : Prop := ∃ N, (state P Q (run P Q N z)).stopped = true
noncomputable def attempts {n : ℕ} (P : Measure (Coordinate n)) (Q : Cell n) (z : Coordinate n) : ℕ := by classical exact if h : Terminates P Q z then Nat.find h else 0
noncomputable def terminalLog {n : ℕ} (P : Measure (Coordinate n)) (Q : Cell n) (z : Coordinate n) : Log n := run P Q (attempts P Q z) z
noncomputable def terminalCell {n : ℕ} (P : Measure (Coordinate n)) (Q : Cell n) (h : Log n) : Cell n := (state P Q h).cell
noncomputable def terminalLaw {n : ℕ} (P : Measure (Coordinate n)) (Q : Cell n) (h : Log n) : Measure (Coordinate n) := ProbabilityTheory.cond P {z | terminalLog P Q z = h}
noncomputable def depth {n : ℕ} (P : Measure (Coordinate n)) (Q : Cell n) (z : Coordinate n) : ℕ := (terminalCell P Q (terminalLog P Q z)).1-Q.1
def Regular {n : ℕ} (P : Measure (Coordinate n)) (Q : Cell n) : Prop := P (cellSet Q) = 1 ∧ ∀ R : Cell n, Descendant Q R → Q.1 < R.1 → (P (cellSet R)).toReal ≤ 2 * threshold n (R.1-Q.1)
def FiniteEntropyStatement : Prop := ∃ n₀ : ℕ, ∀ n : ℕ, n₀ ≤ n → ∀ Q : Cell n, ∀ P : Measure (Coordinate n), IsProbabilityMeasure P → P ≪ uniformCell Q → InformationTheory.klDiv P (uniformCell Q) ≠ ∞ → (∀ᵐ z ∂P, Terminates P Q z) ∧ Measurable (terminalLog P Q) ∧ (∀ h : Log n, P {z | terminalLog P Q z = h} ≠ 0 → Descendant Q (terminalCell P Q h) ∧ Regular (terminalLaw P Q h) (terminalCell P Q h)) ∧ Integrable (fun z => (depth P Q z : ℝ)) P ∧ Integrable (fun z => (attempts P Q z : ℝ)) P ∧ (∫ z,(attempts P Q z : ℝ) ∂P) ≤ 2*(1+∫ z,(depth P Q z : ℝ) ∂P) ∧ (∫⁻ z,InformationTheory.klDiv (terminalLaw P Q (terminalLog P Q z)) (uniformCell (terminalCell P Q (terminalLog P Q z))) ∂P) + ENNReal.ofReal ((Real.log 2/4)*n*(∫ z,(depth P Q z : ℝ) ∂P)) ≤ InformationTheory.klDiv P (uniformCell Q) + ENNReal.ofReal (2/Real.exp 1)
theorem finite_expected_regularization : FiniteEntropyStatement := by sorry
end FiniteEntropy
end RepeatedLocalization
end OAI1234567891011121314151617{ "challenge_module": "ComparatorChallenges.GaussianInformation", "solution_module": "OAI.Probability.GaussianInformation.Main", "theorem_names": [ "OAI.RepeatedLocalization.repeated_localization", "OAI.AllScaleInverseVolume.inverse_volume_without_support", "OAI.KernelPotential.kernel_coercivity", "OAI.KernelPotential.actual_row_drift" ], "definition_names": [], "permitted_axioms": [ "propext", "Classical.choice", "Quot.sound" ], "enable_nanoda": false}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204import Mathlib
namespace OAI
open MeasureTheory ProbabilityTheory Setopen scoped BigOperators ENNReal
namespace RepeatedLocalization
abbrev Coordinate (n : ℕ) := Fin n → ℝabbrev GaussianBlock (n : ℕ) := Fin (n / 16) → Fin (n + 1) → ℝabbrev Label (n : ℕ) := Fin (n / 16) → ℝabbrev History (N t : ℕ) := Fin t → Fin Nabbrev Cell (n : ℕ) := Σ J : ℕ, Fin n → Fin (2 ^ J)
instance cellMeasurableSpace (n : ℕ) : MeasurableSpace (Cell n) := ⊤
noncomputable def initialCube (n : ℕ) : Set (Coordinate n) := Set.pi Set.univ (fun _ => Set.Ico (-1 / (2 * Real.sqrt n)) (1 / (2 * Real.sqrt n)))
noncomputable def cubePrior (n : ℕ) : Measure (Coordinate n) := ProbabilityTheory.cond volume (initialCube n)
noncomputable def chart {n : ℕ} (z : Coordinate n) : Fin (n + 1) → ℝ := Fin.lastCases (Real.sqrt (1 - ∑ a, (z a) ^ 2)) z
noncomputable def cellSet {n : ℕ} (Q : Cell n) : Set (Coordinate n) := {z | ∀ a, -1 / (2 * Real.sqrt n) + (Q.2 a : ℝ) / (Real.sqrt n * (2 : ℝ) ^ Q.1) ≤ z a ∧ z a < -1 / (2 * Real.sqrt n) + ((Q.2 a : ℝ) + 1) / (Real.sqrt n * (2 : ℝ) ^ Q.1)}
def rootCell (n : ℕ) : Cell n := ⟨0, fun _ => 0⟩
noncomputable def gaussianBlockLaw (n : ℕ) : Measure (GaussianBlock n) := Measure.pi (fun _ => Measure.pi (fun _ => gaussianReal 0 1))
noncomputable def exactLabel {n : ℕ} (X : GaussianBlock n) (z : Coordinate n) : Label n := fun row => ∑ a, X row a * chart z a
structure BlockRule (n N : ℕ) where prob : (GaussianBlock n × Label n) → Fin N → ℝ measurable_prob : ∀ w, Measurable (fun data => prob data w) nonneg : ∀ data w, 0 ≤ prob data w sum_one : ∀ data, ∑ w, prob data w = 1
abbrev Rules (n N t : ℕ) := ∀ i : Fin t, History N i.val → BlockRule n N
def past {N t : ℕ} (w : History N t) (i : Fin t) : History N i.val := fun j => w ⟨j.val, Nat.lt_trans j.isLt i.isLt⟩
def through {N t : ℕ} (w : History N t) (i : Fin t) : History N (i.val + 1) := fun j => w ⟨j.val, Nat.lt_of_lt_of_le j.isLt i.isLt⟩
noncomputable def blockProbability {n N : ℕ} (rule : BlockRule n N) (z : Coordinate n) (w : Fin N) : ℝ := ∫ X, rule.prob (X, exactLabel X z) w ∂gaussianBlockLaw n
noncomputable def historyLikelihood {n N t : ℕ} (rules : Rules n N t) (z : Coordinate n) (w : History N t) : ℝ := ∏ i, blockProbability (rules i (past w i)) z (w i)
noncomputable def experimentLaw {n N t : ℕ} (rules : Rules n N t) : Measure (Coordinate n × History N t) := ∑ w : History N t, ((cubePrior n).withDensity (fun z => ENNReal.ofReal (historyLikelihood rules z w))).map (fun z => (z, w))
abbrev Disclosure (n N t : ℕ) := ∀ i : Fin t, Coordinate n → History N (i.val + 1) → Cell n
def ValidDisclosure {n N t : ℕ} (Q : Disclosure n N t) : Prop := (∀ i, Measurable (fun zh : Coordinate n × History N (i.val + 1) => Q i zh.1 zh.2)) ∧ (∀ i, (Set.range (fun zh : Coordinate n × History N (i.val + 1) => Q i zh.1 zh.2)).Finite) ∧ (∀ z ∈ initialCube n, ∀ w : History N t, ∀ i, z ∈ cellSet (Q i z (through w i)) ∧ cellSet (Q i z (through w i)) ⊆ initialCube n) ∧ (∀ z ∈ initialCube n, ∀ w : History N t, ∀ i j : Fin t, i ≤ j → cellSet (Q j z (through w j)) ⊆ cellSet (Q i z (through w i)))
noncomputable def transcriptMap {n N t : ℕ} (Q : Disclosure n N t) (zw : Coordinate n × History N t) : Coordinate n × (History N t × (Fin t → Cell n)) := (zw.1, (zw.2, fun i => Q i zw.1 (through zw.2 i)))
noncomputable def augmentedLaw {n N t : ℕ} (rules : Rules n N t) (Q : Disclosure n N t) := (experimentLaw rules).map (transcriptMap Q)
noncomputable def mutualInformation {α β : Type*} [MeasurableSpace α] [MeasurableSpace β] (μ : Measure (α × β)) : ℝ≥0∞ := InformationTheory.klDiv μ ((μ.map Prod.fst).prod (μ.map Prod.snd))
noncomputable def finalLevel {n N t : ℕ} (Q : Disclosure n N t) (zw : Coordinate n × History N t) : ℕ := if ht : 0 < t then let i : Fin t := ⟨t - 1, by omega⟩ (Q i zw.1 (through zw.2 i)).1 else 0
def MainStatement : Prop := ∃ c : ℝ, 0 < c ∧ ∃ n₀ : ℕ, ∀ C₀ : ℝ, 0 < C₀ → ∃ C : ℝ, 0 < C ∧ ∀ (n N t : ℕ), n₀ ≤ n → 1 ≤ N → ∀ rules : Rules n N t, (2 / (n / 8 : ℕ) + Real.exp (-c * (n / 16 : ℕ))) * Real.log N ≤ C₀ * (n + 1) → ∃ Q : Disclosure n N t, ValidDisclosure Q ∧ mutualInformation (augmentedLaw rules Q) ≤ ENNReal.ofReal (C * (n + 1) * t) ∧ (∫ zw, (finalLevel Q zw : ℝ) ∂experimentLaw rules) ≤ C * t
theorem repeated_localization : MainStatement := by sorry
end RepeatedLocalization
open MeasureTheory Metricopen scoped ENNRealnamespace AllScaleInverseVolumelocal instance namedAtLeastTwoTwo : Nat.AtLeastTwo 2 := ⟨Nat.le_refl 2⟩
abbrev Ambient (d : ℕ) := EuclideanSpace ℝ (Fin d)
noncomputable local instance ambientSub (d : ℕ) : Sub (Ambient d) where sub vector other := WithLp.toLp (2 : ℝ≥0∞) (WithLp.ofLp (p := (2 : ℝ≥0∞)) vector - WithLp.ofLp (p := (2 : ℝ≥0∞)) other)
noncomputable local instance ambientInner (d : ℕ) : Inner ℝ (Ambient d) where inner vector other := ∑ coordinate : Fin d, inner ℝ (WithLp.ofLp (p := (2 : ℝ≥0∞)) vector coordinate) (WithLp.ofLp (p := (2 : ℝ≥0∞)) other coordinate)
noncomputable def gramVolume {d k : ℕ} (u : Ambient d) (z : Fin k → Ambient d) : ℝ := Real.sqrt (Matrix.gram ℝ (fun i => z i-u)).detnoncomputable def inverseVolume {d : ℕ} (u : Ambient d) (z : Fin (d/100) → Ambient d) : ℝ≥0∞ := ((ENNReal.ofReal (gramVolume u z))⁻¹)^(d/100)def BallBound {d : ℕ} (ν : Measure (Ambient d)) : Prop := ∀ (x : Ambient d) (r : ℝ), 0 < r → ν (ball x r) ≤ ENNReal.ofReal (r^(((d:ℝ)-1)/2))def InverseVolumeStatement : Prop := ∃ C : ℝ, 0 < C ∧ ∃ d₀ : ℕ, ∀ d : ℕ, d₀ ≤ d → ∀ ν : Measure (Ambient d), IsProbabilityMeasure ν → BallBound ν → ∀ u : Ambient d, (∫⁻ z,inverseVolume u z ∂Measure.pi (fun _ : Fin (d/100) => ν)) ≤ ENNReal.ofReal (Real.exp (C*d*(d/100:ℕ)))theorem inverse_volume_without_support : InverseVolumeStatement := by sorryend AllScaleInverseVolume
open MeasureTheory ProbabilityTheory Metric Setopen scoped ENNRealnamespace KernelPotentiallocal instance namedAtLeastTwoTwo : Nat.AtLeastTwo 2 := ⟨Nat.le_refl 2⟩
abbrev Ambient (d : ℕ) := EuclideanSpace ℝ (Fin d)abbrev Rows (d : ℕ) := Fin (d/16) → Fin d → ℝnoncomputable def radial {d : ℕ} (x : Ambient d) : Ambient d := ‖x‖⁻¹ • xnoncomputable def sphereProbability (d : ℕ) : Measure (Ambient d) := ((volume (ball (0 : Ambient d) 1))⁻¹ • volume.restrict (ball (0 : Ambient d) 1)).map radialnoncomputable def J {d : ℕ} (ν : Measure (Ambient d)) (s : Ambient d) : ℝ≥0∞ := ∫⁻ u,((ENNReal.ofReal ‖u-s‖)⁻¹)^(2*(d/16)) ∂νnoncomputable def B {d : ℕ} (ν : Measure (Ambient d)) : ℝ := ∫ s, Real.log ((J ν s).toReal) ∂νnoncomputable def Phi {d : ℕ} (ν : Measure (Ambient d)) : ℝ := (InformationTheory.klDiv ν (sphereProbability d)).toReal - B ν
def BoundedDensity {d : ℕ} (ν : Measure (Ambient d)) : Prop := ∃ H : ℝ, 0 < H ∧ ν ≤ ENNReal.ofReal H • sphereProbability d
noncomputable def rowLaw (d : ℕ) : Measure (Rows d) := Measure.pi (fun _ : Fin (d/16) => Measure.pi (fun _ : Fin d => gaussianReal 0 1))noncomputable def labels {d : ℕ} (a : Rows d) (s : Ambient d) : Fin (d/16) → ℝ := fun i => ∑ j,a i j*s jstructure BlockRule (d N : ℕ) where prob : (Fin N × (Rows d × (Fin (d/16) → ℝ))) → Fin N → ℝ measurable_prob : ∀ w, Measurable (fun x => prob x w) nonneg_prob : ∀ x w, 0 ≤ prob x w sum_prob : ∀ x, ∑ w,prob x w=1
noncomputable def outgoingLaw {d N : ℕ} (μ : Measure (Ambient d × Fin N)) (rule : BlockRule d N) : Measure (Ambient d × Fin N) := ∑ w : Fin N, ((μ.prod (rowLaw d)).withDensity (fun x => ENNReal.ofReal (rule.prob (x.1.2,x.2,labels x.2 x.1.1) w))).map (fun x => (x.1.1,w))noncomputable def component {d N : ℕ} (μ : Measure (Ambient d × Fin N)) (v : Fin N) : Measure (Ambient d) := (μ.restrict {x|x.2=v}).map Prod.fstnoncomputable def posterior {d N : ℕ} (μ : Measure (Ambient d × Fin N)) (v : Fin N) : Measure (Ambient d) := (component μ v univ)⁻¹ • component μ vnoncomputable def averagePhi {d N : ℕ} (μ : Measure (Ambient d × Fin N)) : ℝ := ∑ v : Fin N, (component μ v univ).toReal * Phi (posterior μ v)
def CoercivityStatement : Prop := ∃ C : ℝ, 0 < C ∧ ∃ d₀ : ℕ, ∀ d : ℕ, d₀ ≤ d → (∀ ν : Measure (Ambient d), IsProbabilityMeasure ν → BoundedDensity ν → (1/2:ℝ)*(InformationTheory.klDiv ν (sphereProbability d)).toReal-C*d ≤ Phi ν) ∧ Phi (sphereProbability d) ≤ (2*(d/16):ℕ)*Real.log 2 ∧ (∀ (q : ℕ) (w : Fin q → ℝ), (∀ i,0 ≤ w i) → (∑ i,w i)=1 → ∀ ν : Fin q → Measure (Ambient d), (∀ i,IsProbabilityMeasure (ν i)) → (∀ i,BoundedDensity (ν i)) → Phi (∑ i,ENNReal.ofReal (w i) • ν i) ≤ ∑ i,w i*Phi (ν i))
def DriftStatement : Prop := ∃ C : ℝ, 0 < C ∧ ∃ d₀ : ℕ, ∀ d : ℕ, d₀ ≤ d → ∀ N : ℕ, 1 ≤ N → Real.log N ≤ (d:ℝ)^2 → ∀ μ : Measure (Ambient d × Fin N), IsProbabilityMeasure μ → μ.map Prod.fst=sphereProbability d → ∀ rule : BlockRule d N, averagePhi (outgoingLaw μ rule) ≤ averagePhi μ+C*d
theorem kernel_coercivity : CoercivityStatement := by sorrytheorem actual_row_drift : DriftStatement := by sorryend KernelPotential
end OAI1234567891011121314{ "challenge_module": "ComparatorChallenges.GaussianMoat", "solution_module": "OAI.NumberTheory.GaussianMoat.Main", "theorem_names": [ "OAI.GaussianMoat.fullMain" ], "definition_names": [], "permitted_axioms": [ "propext", "Quot.sound", "Classical.choice" ], "enable_nanoda": false}1234567891011121314151617181920212223242526272829303132333435363738394041import Mathlib
namespace OAI
namespace GaussianMoat
abbrev PrimeVertex := {z : GaussianInt // Irreducible z}
noncomputable def primeGraph (D : ℝ) : SimpleGraph PrimeVertex where Adj p q := p ≠ q ∧ dist (p.val : ℂ) (q.val : ℂ) ≤ D symm := by constructor intro p q h exact ⟨h.1.symm, by simpa only [dist_comm] using h.2⟩ loopless := by constructor intro p h exact h.1 rfl
def component (D : ℝ) (p : PrimeVertex) : Set PrimeVertex := {q | (primeGraph D).Reachable p q}
def MainEndpoint : Prop := ∀ (D : ℝ) (z : ℕ → GaussianInt), (∀ t, Irreducible (z t)) → Function.Injective z → (∀ t, dist (z (t + 1) : ℂ) (z t : ℂ) ≤ D) → False
def UniformEndpoint : Prop := ∀ D : ℝ, ∃ B : ℕ, (∀ p : PrimeVertex, (component D p).Finite ∧ (component D p).ncard ≤ B) ∧ (∀ (n : ℕ) (z : Fin n → GaussianInt), (∀ i, Irreducible (z i)) → Function.Injective z → (∀ i j : Fin n, j.val = i.val + 1 → dist (z j : ℂ) (z i : ℂ) ≤ D) → n ≤ B)
theorem fullMain : MainEndpoint ∧ UniformEndpoint := by sorry
end GaussianMoat
end OAI1234567891011121314{ "challenge_module": "ComparatorChallenges.GaussianPropeller", "solution_module": "OAI.Probability.GaussianPropeller.Main", "theorem_names": [ "OAI.GaussianPropeller.all_partitions" ], "definition_names": [], "permitted_axioms": [ "propext", "Quot.sound", "Classical.choice" ], "enable_nanoda": false}12345678910111213141516171819202122232425262728293031323334353637383940414243import Mathlib
namespace OAI
open MeasureTheory ProbabilityTheoryopen scoped ENNReal
namespace GaussianPropeller
abbrev Space (d : ℕ) := EuclideanSpace ℝ (Fin d)
noncomputable def gaussian (d : ℕ) : Measure (Space d) := stdGaussian (Space d)
def IsPartition {d k : ℕ} (A : Fin k → Set (Space d)) : Prop := (∀ i, MeasurableSet (A i)) ∧ ∀ᵐ x ∂gaussian d, ∃! i, x ∈ A i
noncomputable def centroid {d : ℕ} (A : Set (Space d)) : Space d := ∫ x in A, x ∂gaussian d
noncomputable def value {d k : ℕ} (A : Fin k → Set (Space d)) : ℝ := ∑ i, ‖centroid (A i)‖ ^ 2
def coord {d : ℕ} (j : ℕ) (x : Space d) : ℝ := if h : j < d then x ⟨j, h⟩ else 0
noncomputable def propeller (d k : ℕ) (i : Fin k) : Set (Space d) := if i.val = 0 then {x | |coord 1 x| ≤ Real.sqrt 3 * coord 0 x} else if i.val = 1 then {x | 0 ≤ coord 1 x ∧ Real.sqrt 3 * coord 0 x ≤ coord 1 x} else if i.val = 2 then {x | coord 1 x ≤ 0 ∧ Real.sqrt 3 * coord 0 x ≤ -coord 1 x} else ∅
def AllPartitions : Prop := (∀ (d k : ℕ), 0 < d → 0 < k → ∀ A : Fin k → Set (Space d), IsPartition A → value A ≤ 9 / (8 * Real.pi)) ∧ (∀ (d k : ℕ), 2 ≤ d → 3 ≤ k → IsPartition (propeller d k) ∧ value (propeller d k) = 9 / (8 * Real.pi))
theorem all_partitions : AllPartitions := by sorry
end GaussianPropeller
end OAI123456789101112131415161718192021222324{ "challenge_module": "ComparatorChallenges.GaussianReplacement", "solution_module": "OAI.Probability.GaussianReplacement.FiberEquality", "theorem_names": [ "OAI.CurrentProjection.mixedMomentMain", "OAI.CurrentProjection.actualRowMain", "OAI.CurrentProjection.actualRowRefinement", "OAI.CurrentProjection.actualRowSourceMain", "OAI.CurrentProjection.actualRowSourceRefinement", "OAI.CurrentProjection.criticalComparisonMain", "OAI.CurrentProjection.oneLevelComparisonMain", "OAI.CurrentProjection.twoLabelComparisonMain", "OAI.CurrentProjection.hybridBlockMain", "OAI.CurrentProjection.fiberTwoPointMain", "OAI.CurrentProjection.fiberBlockMain" ], "definition_names": [], "permitted_axioms": [ "propext", "Quot.sound", "Classical.choice" ], "enable_nanoda": false}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524import Mathlib
namespace OAI
open MeasureTheory ProbabilityTheory Set Filter InformationTheoryopen scoped ENNReal NNReal RealInnerProductSpace Topology
noncomputable section
namespace CurrentProjection
abbrev Vector (d : ℕ) := EuclideanSpace ℝ (Fin d)
abbrev Sphere (d : ℕ) := Metric.sphere (0 : Vector d) 1
abbrev Rows (k d : ℕ) := Fin k → Vector d
def uniformSphere (d : ℕ) : Measure (Sphere d) := let σ := (volume : Measure (Vector d)).toSphere (σ Set.univ)⁻¹ • σ
def gaussianRows (k d : ℕ) : Measure (Rows k d) := Measure.pi fun _ => stdGaussian (Vector d)
def label {k d : ℕ} (g : Rows k d) (s : Vector d) : Fin k → ℝ := fun i => ⟪s, g i⟫
def LocalGrowth {d : ℕ} (ρ : Measure (Sphere d)) (a : ℕ) (B : ℝ) : Prop := ∀ z : Vector d, ∀ t : ℝ, 0 < t → ρ {u | dist (u : Vector d) z ≤ t} ≤ ENNReal.ofReal (B * t ^ a)
def cubeAverage {k d : ℕ} (ρ : Measure (Sphere d)) (g : Rows k d) (y : Fin k → ℝ) (δ : ℝ) : ℝ≥0∞ := ENNReal.ofReal ((2 * δ)⁻¹ ^ k) * ρ {u | ∀ i, |label g (u : Vector d) i - y i| ≤ δ}
def exactDensity {k d : ℕ} (ρ : Measure (Sphere d)) (g : Rows k d) (y : Fin k → ℝ) : ℝ≥0∞ := by classical let f := fun j : ℕ => (cubeAverage ρ g y (1 / (j : ℝ))).toReal exact if h : ∃ L : ℝ, Tendsto f atTop (𝓝 L) then ENNReal.ofReal h.choose else 0
def AdmissibleDimensions (d m r q : ℕ) : Prop := 1 ≤ m ∧ 1 ≤ r ∧ 1 ≤ q ∧ m + r < d - 1 ∧ m + r - m - (q - 1) ≥ 1
def momentConstant (C : ℝ) (d : ℕ) (B D : ℝ) : ℝ≥0∞ := ENNReal.ofReal (Real.exp (C * d) * B * (1 + max (Real.log (D / B)) 0))
def MixedMomentMain : Prop := ∃ C : ℝ, 0 < C ∧ ∀ (d m r q : ℕ), AdmissibleDimensions d m r q → ∀ (ρ : Measure (Sphere d)), IsFiniteMeasure ρ → ∀ (B D : ℝ), 0 < B → 0 < D → LocalGrowth ρ (m+r) B → LocalGrowth ρ (d-1) D → (∀ (s : Sphere d) (δ : ℝ), 0 < δ → (∫⁻ X, (∫⁻ Z, cubeAverage ρ (Fin.append X Z) (label (Fin.append X Z) (s : Vector d)) δ ∂gaussianRows r d)^q ∂gaussianRows m d) ≤ (momentConstant C d B D)^q) ∧ (ρ ≪ uniformSphere d → ∃ E : Set (Sphere d), MeasurableSet E ∧ ρ E = 0 ∧ ∀ s ∉ E, (∀ᵐ G ∂gaussianRows (m+r) d, Tendsto (fun δ : ℝ => cubeAverage ρ G (label G (s : Vector d)) δ) (𝓝[>] 0) (𝓝 (exactDensity ρ G (label G (s : Vector d))))) ∧ ((∫⁻ X, (∫⁻ Z, exactDensity ρ (Fin.append X Z) (label (Fin.append X Z) (s : Vector d)) ∂gaussianRows r d)^q ∂gaussianRows m d) ≤ (momentConstant C d B D)^q) ∧ (ρ ≠ 0 → ∀ᵐ G ∂gaussianRows (m+r) d, 0 < exactDensity ρ G (label G (s : Vector d)) ∧ exactDensity ρ G (label G (s : Vector d)) < ∞))
instance gaussianRows_isProbabilityMeasure (k d : ℕ) : IsProbabilityMeasure (gaussianRows k d) := by unfold gaussianRows infer_instance
lemma measurable_own_label {k d : ℕ} : Measurable (fun z : Rows k d × Sphere d => label z.1 (z.2:Vector d)) := by apply Measurable.of_eval intro i exact (continuous_inner.comp <| (continuous_subtype_val.comp continuous_snd).prodMk ((continuous_apply i).comp continuous_fst)).measurable
def swapLast {A B C : Type*} [MeasurableSpace A] [MeasurableSpace B] [MeasurableSpace C] : (A × B) × C ≃ᵐ (A × C) × B where toFun p := ((p.1.1,p.2),p.1.2) invFun p := ((p.1.1,p.2),p.1.2) left_inv _ := rfl right_inv _ := rfl measurable_toFun := (measurable_fst.fst.prodMk measurable_snd).prodMk measurable_fst.snd measurable_invFun := (measurable_fst.fst.prodMk measurable_snd).prodMk measurable_fst.snd
def rowInformation {S W X : Type*} [MeasurableSpace S] [MeasurableSpace W] [MeasurableSpace X] (P : Measure ((S×W)×X)) (γ : Measure X) : ℝ≥0∞ := klDiv P (P.fst.prod γ)
noncomputable def shannonEntropy {W : Type*} [MeasurableSpace W] (π : Measure W) : ℝ≥0∞ := ∫⁻ w, ENNReal.ofReal (-Real.log (π {w}).toReal) ∂π
def conditionalMutualInformation {Z A B : Type*} [MeasurableSpace Z] [MeasurableSpace A] [MeasurableSpace B] [StandardBorelSpace A] [StandardBorelSpace B] (P : Measure (Z×(A×B))) [IsFiniteMeasure P] : ℝ≥0∞ := by classical exact if h : Nonempty (A×B) then letI := h InformationTheory.klDiv P (P.fst ⊗ₘ (P.condKernel.fst ×ₖ P.condKernel.snd)) else 0
def actualExperiment {d m r : ℕ} {W : Type*} [MeasurableSpace W] (P : Measure ((Sphere d × W) × Rows m d)) : Measure (((Sphere d × W) × Rows m d) × Rows r d) := P.prod (gaussianRows r d)
instance actualExperiment_isProbabilityMeasure {d m r : ℕ} {W : Type*} [MeasurableSpace W] (P : Measure ((Sphere d×W)×Rows m d)) [IsProbabilityMeasure P] : IsProbabilityMeasure (actualExperiment (r:=r) P) := inferInstanceAs (IsProbabilityMeasure (P.prod (gaussianRows r d)))
def actualObservation {d m r : ℕ} {W : Type*} (p : ((Sphere d × W) × Rows m d) × Rows r d) : (Rows (m+r) d × W) × (Fin (m+r) → ℝ) := ((Fin.append p.1.2 p.2,p.1.1.2), label (Fin.append p.1.2 p.2) (p.1.1.1 : Vector d))
instance actualObservation_isProbabilityMeasure {d m r : ℕ} {W : Type*} [MeasurableSpace W] (P : Measure ((Sphere d×W)×Rows m d)) [IsProbabilityMeasure P] : IsProbabilityMeasure ((actualExperiment (r:=r) P).map actualObservation) := inferInstance
def selectedCube {k d : ℕ} {W : Type*} (ρ : W → Measure (Sphere d)) (δ : ℝ) (z : (Rows k d×W)×(Fin k → ℝ)) : ℝ≥0∞ := cubeAverage (ρ z.1.2) z.1.1 z.2 δ
def selectedExact {k d : ℕ} {W : Type*} (ρ : W → Measure (Sphere d)) (z : (Rows k d×W)×(Fin k → ℝ)) : ℝ≥0∞ := exactDensity (ρ z.1.2) z.1.1 z.2
def momentBound (C : ℝ) (d : ℕ) (B D : ℝ) : ℝ := Real.exp (C*d)*B*(1+max (Real.log (D/B)) 0)
def logPositive (x : ℝ≥0∞) : ℝ := max (Real.log x.toReal) 0
def logNegative (x : ℝ≥0∞) : ℝ≥0∞ := if x = 0 then ∞ else ENNReal.ofReal (-Real.log x.toReal)
def extendedLogExpectation {A : Type*} [MeasurableSpace A] (μ : Measure A) (f : A → ℝ≥0∞) : EReal := ((∫⁻ a, ENNReal.ofReal (logPositive (f a)) ∂μ) : EReal) - ((∫⁻ a, logNegative (f a) ∂μ) : EReal)
def PositiveMessage {W : Type*} [MeasurableSpace W] (π : Measure W) := {w : W // 0 < π {w}}
def completeFamily {W : Type*} [MeasurableSpace W] {T : Type*} (π : Measure W) (f : PositiveMessage π → T) (t₀ : T) (w : W) : T := if h : 0 < π {w} then f ⟨w,h⟩ else t₀
structure ActualRowConclusion {d m r q : ℕ} {W : Type*} [MeasurableSpace W] (P : Measure ((Sphere d×W)×Rows m d)) [IsProbabilityMeasure P] (ρ : W → Measure (Sphere d)) (B D : W → ℝ) : Prop where row_finite : rowInformation P (gaussianRows m d) ≠ ∞ row_le_entropy : (rowInformation P (gaussianRows m d)).toReal ≤ (shannonEntropy (P.map swapLast).snd).toReal conditional_density : ∀ᵐ gw ∂((actualExperiment (r:=r) P).map actualObservation).fst, ((actualExperiment (r:=r) P).map actualObservation).condKernel gw ≪ volume actual_limit : ∀ᵐ p ∂actualExperiment (r:=r) P, Tendsto (fun j : ℕ => selectedCube ρ (1/(j:ℝ)) (actualObservation p)) atTop (𝓝 (selectedExact ρ (actualObservation p))) smoothed_bound : ∀ δ : ℝ, 0 < δ → Integrable (fun p => Real.log (1+(selectedCube ρ δ (actualObservation p)).toReal)) (actualExperiment (r:=r) P) ∧ (∫ p, Real.log (1+(selectedCube ρ δ (actualObservation p)).toReal) ∂actualExperiment (r:=r) P) ≤ (rowInformation P (gaussianRows m d)).toReal/q + ∫ sw : Sphere d×W, Real.log (1+momentBound 9 d (B sw.2) (D sw.2)) ∂P.fst exact_integrable : Integrable (fun p => Real.log (1+(selectedExact ρ (actualObservation p)).toReal)) (actualExperiment (r:=r) P) exact_bound : (∫ p, Real.log (1+(selectedExact ρ (actualObservation p)).toReal) ∂actualExperiment (r:=r) P) ≤ (rowInformation P (gaussianRows m d)).toReal/q + ∫ sw : Sphere d×W, Real.log (1+momentBound 9 d (B sw.2) (D sw.2)) ∂P.fst entropy_bound : (rowInformation P (gaussianRows m d)).toReal/q + ∫ sw : Sphere d×W, Real.log (1+momentBound 9 d (B sw.2) (D sw.2)) ∂P.fst ≤ (shannonEntropy (P.map swapLast).snd).toReal/q + ∫ sw : Sphere d×W, Real.log (1+momentBound 9 d (B sw.2) (D sw.2)) ∂P.fst positive_log_integrable : Integrable (fun p => logPositive (selectedExact ρ (actualObservation p))) (actualExperiment (r:=r) P) extended_log_bound : extendedLogExpectation (actualExperiment (r:=r) P) (fun p => selectedExact ρ (actualObservation p)) ≤ (((rowInformation P (gaussianRows m d)).toReal/q + ∫ sw : Sphere d×W, Real.log (1+momentBound 9 d (B sw.2) (D sw.2)) ∂P.fst) : EReal)
def actualConditionalRowInformation {d m : ℕ} {W : Type*} [MeasurableSpace W] [StandardBorelSpace W] (P : Measure ((Sphere d×W)×Rows m d)) [IsFiniteMeasure P] : ℝ≥0∞ := conditionalMutualInformation (P.map (fun p => (p.1.1,(p.2,p.1.2))))
structure ActualRowSourceConclusion {d m r q : ℕ} {W : Type*} [MeasurableSpace W] [StandardBorelSpace W] (P : Measure ((Sphere d×W)×Rows m d)) [IsProbabilityMeasure P] (ρ : W → Measure (Sphere d)) (B D : W → ℝ) : Prop where row_finite : actualConditionalRowInformation P ≠ ∞ row_le_entropy : (actualConditionalRowInformation P).toReal ≤ (shannonEntropy (P.map swapLast).snd).toReal conditional_density : ∀ᵐ gw ∂((actualExperiment (r:=r) P).map actualObservation).fst, ((actualExperiment (r:=r) P).map actualObservation).condKernel gw ≪ volume actual_limit : ∀ᵐ p ∂actualExperiment (r:=r) P, Tendsto (fun j : ℕ => selectedCube ρ (1/(j:ℝ)) (actualObservation p)) atTop (𝓝 (selectedExact ρ (actualObservation p))) smoothed_bound : ∀ δ : ℝ, 0 < δ → Integrable (fun p => Real.log (1+(selectedCube ρ δ (actualObservation p)).toReal)) (actualExperiment (r:=r) P) ∧ (∫ p, Real.log (1+(selectedCube ρ δ (actualObservation p)).toReal) ∂actualExperiment (r:=r) P) ≤ (actualConditionalRowInformation P).toReal/q + ∫ sw : Sphere d×W, Real.log (1+momentBound 9 d (B sw.2) (D sw.2)) ∂P.fst exact_integrable : Integrable (fun p => Real.log (1+(selectedExact ρ (actualObservation p)).toReal)) (actualExperiment (r:=r) P) exact_bound : (∫ p, Real.log (1+(selectedExact ρ (actualObservation p)).toReal) ∂actualExperiment (r:=r) P) ≤ (actualConditionalRowInformation P).toReal/q + ∫ sw : Sphere d×W, Real.log (1+momentBound 9 d (B sw.2) (D sw.2)) ∂P.fst entropy_bound : (actualConditionalRowInformation P).toReal/q + ∫ sw : Sphere d×W, Real.log (1+momentBound 9 d (B sw.2) (D sw.2)) ∂P.fst ≤ (shannonEntropy (P.map swapLast).snd).toReal/q + ∫ sw : Sphere d×W, Real.log (1+momentBound 9 d (B sw.2) (D sw.2)) ∂P.fst positive_log_integrable : Integrable (fun p => logPositive (selectedExact ρ (actualObservation p))) (actualExperiment (r:=r) P) extended_log_bound : extendedLogExpectation (actualExperiment (r:=r) P) (fun p => selectedExact ρ (actualObservation p)) ≤ (((actualConditionalRowInformation P).toReal/q + ∫ sw : Sphere d×W, Real.log (1+momentBound 9 d (B sw.2) (D sw.2)) ∂P.fst) : EReal)
def alignedExperiment {d m r : ℕ} {W : Type*} [MeasurableSpace W] (P : Measure ((Sphere d×W)×Rows m d)) : Measure ((Sphere d×W)×Rows (m+r) d) := (actualExperiment (r:=r) P).map (fun p => (p.1.1,Fin.append p.1.2 p.2))
instance alignedExperiment_probability {d m r : ℕ} {W : Type*} [MeasurableSpace W] (P : Measure ((Sphere d×W)×Rows m d)) [IsProbabilityMeasure P] : IsProbabilityMeasure (alignedExperiment (r:=r) P) := by unfold alignedExperiment infer_instance
def exposedJointMap {d k : ℕ} {W : Type*} (p : (Sphere d×W)×Rows k d) : (Rows k d×(Fin k → ℝ))×(Sphere d×W) := ((p.2,label p.2 (p.1.1:Vector d)),p.1)
def exposedInformation {d k : ℕ} {W : Type*} [MeasurableSpace W] [StandardBorelSpace W] (P : Measure ((Sphere d×W)×Rows k d)) [IsFiniteMeasure P] : ℝ≥0∞ := conditionalMutualInformation (P.map exposedJointMap)
def CriticalComparisonMain : Prop := ∃ (K : ℝ) (d₀ : ℕ), 0 < K ∧ ∀ (d : ℕ), d₀ ≤ d → ∀ (W : Type) [MeasurableSpace W] [Countable W] [MeasurableSingletonClass W], ∀ (P : Measure ((Sphere d×W)×Rows (d/10) d)) [IsProbabilityMeasure P], (P.map swapLast).fst = (uniformSphere d).prod (gaussianRows (d/10) d) → shannonEntropy (P.map swapLast).snd ≤ ENNReal.ofReal ((d:ℝ)^2) → exposedInformation (P.fst.prod (gaussianRows (d/10+(d/2-d/10)) d)) ≤ exposedInformation (alignedExperiment (r:=d/2-d/10) P) + ENNReal.ofReal (K*d)
def OneLevelComparisonMain : Prop := ∃ (C : ℝ) (d₀ : ℕ), 0 < C ∧ ∀ d, d₀ ≤ d → ∀ (U : Type) [MeasurableSpace U] [Finite U] [MeasurableSingletonClass U], ∀ (P : Measure ((Sphere d×U)×Rows (d/32) d)) [IsProbabilityMeasure P], (P.map swapLast).fst = (uniformSphere d).prod (gaussianRows (d/32) d) → exposedInformation (P.fst.prod (gaussianRows (d/32+(d/4-d/32)) d)) ≤ exposedInformation (alignedExperiment (r:=d/4-d/32) P) + ENNReal.ofReal (C*((d:ℝ)+Real.log (1+(d:ℝ)+(shannonEntropy P.fst.snd).toReal)+ (shannonEntropy P.fst.snd).toReal/(d:ℝ)))
def TwoLabelComparisonMain : Prop := ∃ (C : ℝ) (d₀ : ℕ), 0 < C ∧ ∀ d, d₀ ≤ d → ∀ (V : Type) [MeasurableSpace V] [Finite V] [MeasurableSingletonClass V], ∀ (P : Measure ((Sphere d×V)×Rows (d/8) d)) [IsProbabilityMeasure P], (P.map swapLast).fst = (uniformSphere d).prod (gaussianRows (d/8) d) → shannonEntropy P.fst.snd ≤ ENNReal.ofReal ((d:ℝ)^2) → exposedInformation (P.fst.prod (gaussianRows (d/8+(d/2-d/8)) d)) ≤ exposedInformation (alignedExperiment (r:=d/2-d/8) P) + ENNReal.ofReal (C*d)
def blockInput {d m : ℕ} {U : Type*} (z : (Sphere d × U) × Rows m d) : U × (Rows m d × (Fin m → ℝ)) := (z.1.2, z.2, label z.2 (z.1.1 : Vector d))
lemma measurable_blockInput {d m : ℕ} {U : Type*} [MeasurableSpace U] : Measurable (blockInput (d:=d) (m:=m) (U:=U)) := by exact measurable_fst.snd.prodMk (measurable_snd.prodMk ((measurable_own_label (d:=d) (k:=m)).comp (measurable_snd.prodMk measurable_fst.fst)))
def blockLaw {d m : ℕ} {U V : Type*} [MeasurableSpace U] [MeasurableSpace V] (P : Measure (Sphere d × U)) (κ : Kernel (U × (Rows m d × (Fin m → ℝ))) V) : Measure (((Sphere d × U) × Rows m d) × V) := (P.prod (gaussianRows m d)) ⊗ₘ κ.comap blockInput measurable_blockInput
instance blockLaw_probability {d m : ℕ} {U V : Type*} [MeasurableSpace U] [MeasurableSpace V] (P : Measure (Sphere d × U)) [IsProbabilityMeasure P] (κ : Kernel (U × (Rows m d × (Fin m → ℝ))) V) [IsMarkovKernel κ] : IsProbabilityMeasure (blockLaw P κ) := by unfold blockLaw infer_instance
def endingSignalLaw {d m : ℕ} {U V : Type*} [MeasurableSpace U] [MeasurableSpace V] (P : Measure (Sphere d × U)) (κ : Kernel (U × (Rows m d × (Fin m → ℝ))) V) : Measure (Sphere d × V) := (blockLaw P κ).map (fun z => (z.1.1.1, z.2))
instance endingSignalLaw_probability {d m : ℕ} {U V : Type*} [MeasurableSpace U] [MeasurableSpace V] (P : Measure (Sphere d × U)) [IsProbabilityMeasure P] (κ : Kernel (U × (Rows m d × (Fin m → ℝ))) V) [IsMarkovKernel κ] : IsProbabilityMeasure (endingSignalLaw P κ) := by unfold endingSignalLaw infer_instance
def freshInformation {d : ℕ} {U : Type*} [MeasurableSpace U] [StandardBorelSpace U] (P : Measure (Sphere d × U)) [IsFiniteMeasure P] (k : ℕ) : ℝ≥0∞ := exposedInformation (P.prod (gaussianRows k d))
def hybridFirst (d : ℕ) : ℕ := (d+3)/4
def hybridLast (d : ℕ) : ℕ := d/2
def hybridCount (d : ℕ) : ℕ := hybridLast d - hybridFirst d + 1
def averagedFreshInformation {d : ℕ} {U : Type*} [MeasurableSpace U] [StandardBorelSpace U] (P : Measure (Sphere d × U)) [IsFiniteMeasure P] : ℝ := (∑ k ∈ Finset.Icc (hybridFirst d) (hybridLast d), (freshInformation P k).toReal) / hybridCount d
def HybridBlockMain : Prop := ∃ (C C' : ℝ) (d₀ : ℕ), 0 < C ∧ 0 < C' ∧ ∀ d, d₀ ≤ d → ∀ m, 1 ≤ m → m ≤ d/8 → ∀ (U V : Type) [Fintype U] [Fintype V] [MeasurableSpace U] [MeasurableSpace V] [MeasurableSingletonClass U] [MeasurableSingletonClass V], ∀ (P : Measure (Sphere d × U)) [IsProbabilityMeasure P], P.fst = uniformSphere d → ∀ (κ : Kernel (U × (Rows m d × (Fin m → ℝ))) V) [IsMarkovKernel κ], ∀ (B : ℝ), 0 ≤ B → shannonEntropy (endingSignalLaw P κ).snd ≤ ENNReal.ofReal B → averagedFreshInformation (endingSignalLaw P κ) - averagedFreshInformation P ≤ C*m + (m:ℝ) / hybridCount d * (C + B / (d/8:ℕ)) + B / (d/32:ℕ) ∧ (B ≤ (d:ℝ)^2 → averagedFreshInformation (endingSignalLaw P κ) - averagedFreshInformation P ≤ C'*d)
def FiberBlockMain : Prop := ∃ (K : ℝ) (d₀ : ℕ), 0 < K ∧ ∀ d, d₀ ≤ d → ∀ (U V : Type) [Fintype U] [Fintype V] [MeasurableSpace U] [MeasurableSpace V] [MeasurableSingletonClass U] [MeasurableSingletonClass V], ∀ (P : Measure (Sphere d×U)) [IsProbabilityMeasure P], P.fst = uniformSphere d → ∀ (κ : Kernel (U×(Rows (d/10) d×(Fin (d/10)→ℝ))) V) [IsMarkovKernel κ], ∀ N : ℕ, 1 ≤ N → Fintype.card V ≤ N → Real.log N ≤ (d:ℝ)^2 → freshInformation (endingSignalLaw P κ) (d/3) ≤ freshInformation P (d/3) + ENNReal.ofReal (K*d)
def dependentMapKernel {A B D : Type*} [MeasurableSpace A] [MeasurableSpace B] [MeasurableSpace D] (κ : Kernel A B) (f : A×B → D) : Kernel A D := (Kernel.id ×ₖ κ).map f
def fiberObservationLaw (d k : ℕ) : Measure ((Rows k d×(Fin k→ℝ))×Sphere d) := ((gaussianRows k d).prod (uniformSphere d)).map (fun z => ((z.1,label z.1 (z.2:Vector d)),z.2))
instance uniformSphere_finite (d : ℕ) : IsFiniteMeasure (uniformSphere d) := by constructor unfold uniformSphere rw [Measure.smul_apply, smul_eq_mul] exact lt_of_le_of_lt (ENNReal.inv_mul_le_one _) ENNReal.one_lt_top
instance fiberObservationLaw_finite (d k : ℕ) : IsFiniteMeasure (fiberObservationLaw d k) := by unfold fiberObservationLaw infer_instance
lemma sphere_standardBorel (d : ℕ) : StandardBorelSpace (Sphere d) := Metric.isClosed_sphere.measurableSet.standardBorel
def sphericalFiberKernel (d k : ℕ) [sphereNonempty : Nonempty (Sphere d)] : Kernel (Rows k d×(Fin k→ℝ)) (Sphere d) := @Measure.condKernel (Rows k d×(Fin k→ℝ)) (Sphere d) _ _ (sphere_standardBorel d) sphereNonempty (fiberObservationLaw d k) (fiberObservationLaw_finite d k)
instance sphericalFiberKernel_markov (d k : ℕ) [Nonempty (Sphere d)] : IsMarkovKernel (sphericalFiberKernel d k) := by unfold sphericalFiberKernel infer_instance
def fiberTwoPointLeft (d k : ℕ) [Nonempty (Sphere d)] : Measure (Rows k d×(Sphere d×Sphere d)) := ((((gaussianRows k d).prod (uniformSphere d)).withDensity (fun z => exactDensity (uniformSphere d) z.1 (label z.1 (z.2:Vector d)))) ⊗ₘ ((sphericalFiberKernel d k).comap (fun z => (z.1,label z.1 (z.2:Vector d))) (measurable_fst.prodMk measurable_own_label))).map (fun z => (z.1.1,(z.1.2,z.2)))
def perpendicularRow {d : ℕ} (v g : Vector d) : Vector d := letI : NormedAddCommGroup (Vector d) := PiLp.normedAddCommGroup 2 (fun _ : Fin d => ℝ) letI : InnerProductSpace ℝ (Vector d) := PiLp.innerProductSpace (fun _ : Fin d => ℝ) g - (⟪v,g⟫ / ‖v‖^2) • v
def perpendicularRowsKernel (d k : ℕ) : Kernel (Sphere d×Sphere d) (Rows k d) := dependentMapKernel (Kernel.const (Sphere d×Sphere d) (gaussianRows k d)) (fun z => fun i => perpendicularRow ((z.1.1:Vector d)-(z.1.2:Vector d)) (z.2 i))
def fiberTwoPointConstant (k : ℕ) : ℝ≥0∞ := letI : OfNat ℝ 2 := @instOfNatAtLeastTwo ℝ 2 Real.instNatCast inferInstance letI : Mul ℝ := Real.instMul letI : Inv ℝ := Real.instInv letI : Pow ℝ ℕ := @NPow.toPow ℝ Real.instMonoid.toNPow ENNReal.ofReal ((Real.sqrt (2*Real.pi))⁻¹ ^ k)
def fiberDistanceWeight {d : ℕ} (k : ℕ) (z : Sphere d×Sphere d) : ℝ≥0∞ := (ENNReal.ofReal ‖(z.1:Vector d)-(z.2:Vector d)‖)⁻¹ ^ k
def fiberTwoPointRight (d k : ℕ) : Measure (Rows k d×(Sphere d×Sphere d)) := letI : IsScalarTower ℝ≥0∞ ℝ≥0∞ ℝ≥0∞ := Semigroup.isScalarTower fiberTwoPointConstant k • Measure.map (Prod.swap : (Sphere d×Sphere d)×Rows k d → Rows k d×(Sphere d×Sphere d)) (Measure.compProd (Measure.withDensity (Measure.prod (uniformSphere d) (uniformSphere d)) (fiberDistanceWeight k)) (perpendicularRowsKernel d k))
lemma uniformSphere_probability_of_pos {d : ℕ} (hd : 0 < d) : IsProbabilityMeasure (uniformSphere d) := by let : Nonempty (Fin d) := ⟨⟨0, hd⟩⟩ constructor rw [uniformSphere, Measure.smul_apply, smul_eq_mul] apply ENNReal.inv_mul_cancel _ (measure_ne_top _ _) rw [Measure.toSphere_apply_univ] exact mul_ne_zero (by exact_mod_cast (Module.finrank_pos (R := ℝ) (M := Vector d)).ne') (Metric.measure_ball_pos volume 0 zero_lt_one).ne'
def FiberTwoPointMain : Prop := ∀ (d k : ℕ) (_hk : 1 ≤ k) (hkd : k < d-1), letI : IsProbabilityMeasure (uniformSphere d) := uniformSphere_probability_of_pos (by omega) letI : Nonempty (Sphere d) := nonempty_of_isProbabilityMeasure (uniformSphere d) IsFiniteMeasure (fiberTwoPointLeft d k) ∧ IsFiniteMeasure (fiberTwoPointRight d k) ∧ fiberTwoPointLeft d k = fiberTwoPointRight d k
theorem mixedMomentMain : MixedMomentMain := by sorry
theorem actualRowMain {d m r q : ℕ} {W : Type*} [MeasurableSpace W] [Countable W] [MeasurableSingletonClass W] (hdim : AdmissibleDimensions d m r q) (P : Measure ((Sphere d×W)×Rows m d)) [IsProbabilityMeasure P] (ν : Measure (Sphere d)) [IsProbabilityMeasure ν] (hInd : (P.map swapLast).fst = ν.prod (gaussianRows m d)) (H : ℝ) (hν : ν ≤ ENNReal.ofReal H • uniformSphere d) (hEntropy : shannonEntropy (P.map swapLast).snd ≠ ∞) (ρ : PositiveMessage (P.map swapLast).snd → Measure (Sphere d)) [∀ w, IsFiniteMeasure (ρ w)] (_hρac : ∀ w, ρ w ≪ uniformSphere d) (B D : PositiveMessage (P.map swapLast).snd → ℝ) (hB : ∀ w, 0 < B w) (hD : ∀ w, 0 < D w) (hgB : ∀ w, LocalGrowth (ρ w) (m+r) (B w)) (hgD : ∀ w, LocalGrowth (ρ w) (d-1) (D w)) (hCI : Integrable (fun sw : Sphere d×W => Real.log (1+momentBound 9 d (completeFamily (P.map swapLast).snd B 1 sw.2) (completeFamily (P.map swapLast).snd D 1 sw.2))) P.fst) : ActualRowConclusion (r:=r) (q:=q) P (completeFamily (P.map swapLast).snd ρ 0) (completeFamily (P.map swapLast).snd B 1) (completeFamily (P.map swapLast).snd D 1) := by sorry
theorem actualRowRefinement {d m : ℕ} {W E : Type*} [MeasurableSpace W] [MeasurableSpace E] [Countable W] [MeasurableSingletonClass W] [Countable E] [MeasurableSingletonClass E] (P : Measure ((Sphere d×W)×Rows m d)) [IsProbabilityMeasure P] (e : Sphere d×W → E) (he : Measurable e) (_hEntropy : shannonEntropy ((P.map (fun p => ((p.1.1,(p.1.2,e p.1)),p.2))).map swapLast).snd ≠ ∞) : rowInformation (P.map (fun p => ((p.1.1,(p.1.2,e p.1)),p.2))) (gaussianRows m d) = rowInformation P (gaussianRows m d) := by sorry
theorem actualRowSourceMain {d m r q : ℕ} {W : Type*} [MeasurableSpace W] [Countable W] [MeasurableSingletonClass W] (hdim : AdmissibleDimensions d m r q) (P : Measure ((Sphere d×W)×Rows m d)) [IsProbabilityMeasure P] (ν : Measure (Sphere d)) [IsProbabilityMeasure ν] (hInd : (P.map swapLast).fst = ν.prod (gaussianRows m d)) (H : ℝ) (hν : ν ≤ ENNReal.ofReal H • uniformSphere d) (hEntropy : shannonEntropy (P.map swapLast).snd ≠ ∞) (ρ : PositiveMessage (P.map swapLast).snd → Measure (Sphere d)) [∀ w, IsFiniteMeasure (ρ w)] (_hρac : ∀ w, ρ w ≪ uniformSphere d) (B D : PositiveMessage (P.map swapLast).snd → ℝ) (hB : ∀ w, 0 < B w) (hD : ∀ w, 0 < D w) (hgB : ∀ w, LocalGrowth (ρ w) (m+r) (B w)) (hgD : ∀ w, LocalGrowth (ρ w) (d-1) (D w)) (hCI : Integrable (fun sw : Sphere d×W => Real.log (1+momentBound 9 d (completeFamily (P.map swapLast).snd B 1 sw.2) (completeFamily (P.map swapLast).snd D 1 sw.2))) P.fst) : ActualRowSourceConclusion (r:=r) (q:=q) P (completeFamily (P.map swapLast).snd ρ 0) (completeFamily (P.map swapLast).snd B 1) (completeFamily (P.map swapLast).snd D 1) := by sorry
theorem actualRowSourceRefinement {d m : ℕ} {W E : Type*} [MeasurableSpace W] [MeasurableSpace E] [Countable W] [MeasurableSingletonClass W] [Countable E] [MeasurableSingletonClass E] (P : Measure ((Sphere d×W)×Rows m d)) [IsProbabilityMeasure P] (ν : Measure (Sphere d)) [IsProbabilityMeasure ν] (hInd : (P.map swapLast).fst = ν.prod (gaussianRows m d)) (e : Sphere d×W → E) (he : Measurable e) (hEntropy : shannonEntropy ((P.map (fun p => ((p.1.1,(p.1.2,e p.1)),p.2))).map swapLast).snd ≠ ∞) : actualConditionalRowInformation (P.map (fun p => ((p.1.1,(p.1.2,e p.1)),p.2))) = actualConditionalRowInformation P := by sorry
theorem criticalComparisonMain : CriticalComparisonMain := by sorry
theorem oneLevelComparisonMain : OneLevelComparisonMain := by sorry
theorem twoLabelComparisonMain : TwoLabelComparisonMain := by sorry
theorem hybridBlockMain : HybridBlockMain := by sorry
theorem fiberTwoPointMain : FiberTwoPointMain := by sorry
theorem fiberBlockMain : FiberBlockMain := by sorry
end CurrentProjection
end
end OAI1234567891011121314{ "challenge_module": "ComparatorChallenges.GeneralMahler", "solution_module": "OAI.Geometry.Convex.GeneralMahler.Theorem", "theorem_names": [ "OAI.GeneralMahler.general_mahler" ], "definition_names": [], "permitted_axioms": [ "propext", "Quot.sound", "Classical.choice" ], "enable_nanoda": false}lean/ComparatorChallenges/ExactInfiniteness.leanAdded+179
lean/ComparatorChallenges/ExactQuantumFactoring.jsonAdded+14
lean/ComparatorChallenges/ExactQuantumFactoring.leanAdded+154
lean/ComparatorChallenges/FKCRT.jsonAdded+14
lean/ComparatorChallenges/FKCRT.leanAdded+214
lean/ComparatorChallenges/FactorGeneration.jsonAdded+14
lean/ComparatorChallenges/FactorGeneration.leanAdded+50
lean/ComparatorChallenges/FalconerAllDimensions.jsonAdded+14
lean/ComparatorChallenges/FalconerAllDimensions.leanAdded+19
lean/ComparatorChallenges/FillingCoefficient.jsonAdded+14
lean/ComparatorChallenges/FillingCoefficient.leanAdded+130
lean/ComparatorChallenges/FiniteCircle.jsonAdded+14
lean/ComparatorChallenges/FiniteCircle.leanAdded+228
lean/ComparatorChallenges/FiniteCongruenceGraph.jsonAdded+13
lean/ComparatorChallenges/FiniteCongruenceGraph.leanAdded+63
lean/ComparatorChallenges/FiniteEntropySeparation.jsonAdded+14
lean/ComparatorChallenges/FiniteEntropySeparation.leanAdded+125
lean/ComparatorChallenges/FiniteFactor.jsonAdded+14
lean/ComparatorChallenges/FiniteFactor.leanAdded+46
lean/ComparatorChallenges/FinitisticAsymmetry.jsonAdded+14
lean/ComparatorChallenges/FinitisticAsymmetry.leanAdded+41
lean/ComparatorChallenges/FixedClauseThreshold.jsonAdded+14
lean/ComparatorChallenges/FixedClauseThreshold.leanAdded+56
lean/ComparatorChallenges/ForcedNavierStokesComputation.jsonAdded+14
lean/ComparatorChallenges/ForcedNavierStokesComputation.leanAdded+232
lean/ComparatorChallenges/ForestSpace.jsonAdded+14
lean/ComparatorChallenges/ForestSpace.leanAdded+468
lean/ComparatorChallenges/FormulaHitting.jsonAdded+13
lean/ComparatorChallenges/FormulaHitting.leanAdded+66
lean/ComparatorChallenges/FoulkesHowe.jsonAdded+14
lean/ComparatorChallenges/FoulkesHowe.leanAdded+50
lean/ComparatorChallenges/FourRowPermanent.jsonAdded+14
lean/ComparatorChallenges/FourRowPermanent.leanAdded+48
lean/ComparatorChallenges/FreeIsing.jsonAdded+14
lean/ComparatorChallenges/FreeIsing.leanAdded+95
lean/ComparatorChallenges/FreeUniformSpanningForest.jsonAdded+14
lean/ComparatorChallenges/FreeUniformSpanningForest.leanAdded+149
lean/ComparatorChallenges/GammaPassage.jsonAdded+14
lean/ComparatorChallenges/GammaPassage.leanAdded+112
lean/ComparatorChallenges/GaussianFiniteEntropy.jsonAdded+14
lean/ComparatorChallenges/GaussianFiniteEntropy.leanAdded+205
lean/ComparatorChallenges/GaussianInformation.jsonAdded+17
lean/ComparatorChallenges/GaussianInformation.leanAdded+204
lean/ComparatorChallenges/GaussianMoat.jsonAdded+14
lean/ComparatorChallenges/GaussianMoat.leanAdded+41
lean/ComparatorChallenges/GaussianPropeller.jsonAdded+14
lean/ComparatorChallenges/GaussianPropeller.leanAdded+43
lean/ComparatorChallenges/GaussianReplacement.jsonAdded+24
lean/ComparatorChallenges/GaussianReplacement.leanAdded+524
lean/ComparatorChallenges/GeneralMahler.jsonAdded+14