roseking's picture
Add lean source and binary files (part 72)
cead56f verified
Raw History Blame Contribute Delete
1.52 kB
import Mathlib
namespace OAI
noncomputable section
open Set MeasureTheory
open scoped RealInnerProductSpace Pointwise
namespace Paper092
noncomputable def simplexConstant (d : ℕ) : ℝ :=
(d + 1) * (d : ℝ) ^ d / d.factorial
abbrev Euclidean (n : ℕ) := EuclideanSpace ℝ (Fin n)
def normalHyperplane {n : ℕ} (u : Euclidean n) : Submodule ℝ (Euclidean n) :=
(Submodule.span ℝ ({u} : Set (Euclidean n)))ᗮ
def projectionVolume {n : ℕ} (K : Set (Euclidean n)) (u : Euclidean n) : ENNReal :=
(volume : Measure (normalHyperplane u))
((normalHyperplane u).orthogonalProjectionOnto '' K)
def brightness {n : ℕ} (K : Set (Euclidean n)) (u : Euclidean n) : ℝ :=
‖u‖ * (projectionVolume K u).toReal
def projectionBody {n : ℕ} (K : Set (Euclidean n)) : Set (Euclidean n) :=
{y | ∀ u, ⟪u, y⟫ ≤ brightness K u}
def normalizedProjectionVolume {n : ℕ} (K : Set (Euclidean n)) : ℝ :=
(volume (projectionBody K)).toReal / (volume K).toReal ^ (n - 1)
def standardSimplex (n : ℕ) : Set (Euclidean n) :=
convexHull ℝ (insert 0 (Set.range fun i : Fin n => EuclideanSpace.single i (1 : ℝ)))
def firstBlock (x : Euclidean 20) : Euclidean 10 :=
WithLp.toLp 2 (fun i : Fin 10 => x (Fin.castAdd 10 i))
def secondBlock (x : Euclidean 20) : Euclidean 10 :=
WithLp.toLp 2 (fun i : Fin 10 => x (Fin.natAdd 10 i))
def productWitness : Set (Euclidean 20) :=
{x | firstBlock x ∈ standardSimplex 10 ∧ secondBlock x ∈ standardSimplex 10}
end Paper092
end
end OAI