math / data /lean /ComparatorChallenges /CylinderCovering.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
19.3 kB
import Mathlib
namespace OAI
section
open Set MeasureTheory
open scoped InnerProductSpace BigOperators Interval
noncomputable section
namespace TriangularCovering
abbrev Space := EuclideanSpace โ„ (Fin 3)
def H : โ„ := Real.sqrt 2
def point (x y t : โ„) : Space := !โ‚‚[x, y, H * t]
def K : Set Space :=
{z | โˆƒ x y t : โ„, 0 โ‰ค t โˆง t โ‰ค 1 โˆง |x| โ‰ค 1 - t โˆง |y| โ‰ค t โˆง z = point x y t}
def projection (u z : Space) : Space := z - (inner โ„ u z) โ€ข u
def area (B : Set Space) : โ„ := (Measure.euclideanHausdorffMeasure 2 B).toReal
def shadowArea (u : Space) : โ„ := area (projection u '' K)
def A_min : โ„ := sInf {a : โ„ | โˆƒ u : Space, โ€–uโ€– = 1 โˆง a = shadowArea u}
structure TriCylinder where
axis : Space
base : Set Space
unit_axis : โ€–axisโ€– = 1
perpendicular : โˆ€ z โˆˆ base, inner โ„ axis z = 0
triangular : โˆƒ v : Fin 3 โ†’ Space, AffineIndependent โ„ v โˆง
base = convexHull โ„ (Set.range v)
compact : IsCompact base
convex : Convex โ„ base
measurable : MeasurableSet base
finite_area : Measure.euclideanHausdorffMeasure 2 base โ‰  โŠค
def TriCylinder.carrier (c : TriCylinder) : Set Space :=
{z | โˆƒ b โˆˆ c.base, โˆƒ r : โ„, z = b + r โ€ข c.axis}
def Covers {m : โ„•} (c : Fin m โ†’ TriCylinder) : Prop :=
โˆ€ z โˆˆ K, โˆƒ i : Fin m, z โˆˆ (c i).carrier
def totalArea {m : โ„•} (c : Fin m โ†’ TriCylinder) : โ„ :=
โˆ‘ i : Fin m, area (c i).base
def relativeCost {m : โ„•} (c : Fin m โ†’ TriCylinder) : โ„ :=
โˆ‘ i : Fin m, area (c i).base / shadowArea (c i).axis
def n (ฮต : โ„) : โ„• := โŒˆ2 / ฮต ^ 2โŒ‰โ‚Š
end TriangularCovering
end
end
run_cmd Lean.modifyEnv fun env => Lean.Meta.auxLemmasExt.setState env {}
section
open Set MeasureTheory
open scoped InnerProductSpace BigOperators Interval
noncomputable section
namespace TriangularCovering
def ฮท : โ„ := 1 / 1000
def alpha (a b : โ„) : โ„ := (1 + a * b) / 4
def beta (a b : โ„) : โ„ := (a + b) / 4
def d (q : โ„) : โ„ := q ^ 2 * (1 + q ^ 2) / 16
def cutoffCoeff (a b : โ„) : โ„ := ฮท + max (d a) (d b)
def step (N : โ„•) : โ„ := 2 / N
def mesh (N i : โ„•) : โ„ := -1 + i * step N
def cutoff (ฮต a b : โ„) : โ„ := 1 / 2 + ฮต ^ 2 * cutoffCoeff a b
def speedSq (a b : โ„) : โ„ := (alpha a b)^2 + 2*(beta a b)^2
def normalizedTerm (ฮต a b : โ„) : โ„ :=
(b-a) * (cutoff ฮต a b)^2 / Real.sqrt (1+ฮต^2*speedSq a b)
end TriangularCovering
end
end
run_cmd Lean.modifyEnv fun env => Lean.Meta.auxLemmasExt.setState env {}
section
open Set MeasureTheory
open scoped InnerProductSpace BigOperators Interval
noncomputable section
namespace TriangularCovering
def unit (v : Space) : Space := โ€–vโ€–โปยน โ€ข v
end TriangularCovering
end
end
run_cmd Lean.modifyEnv fun env => Lean.Meta.auxLemmasExt.setState env {}
section
open Set MeasureTheory
open scoped InnerProductSpace BigOperators Interval
noncomputable section
namespace TriangularCovering
def tiltV (ฮต A B : โ„) : Space := !โ‚‚[1, ฮต*A, H*ฮต*B]
def tiltW (ฮต A B : โ„) : Space := !โ‚‚[-ฮต*A, 1, H*ฮต*B]
def lowerVertices (a b T : โ„) : Fin 3 โ†’ Space :=
![point 0 0 0, point 0 (a*T) T, point 0 (b*T) T]
def upperVertices (a b T : โ„) : Fin 3 โ†’ Space :=
![point 0 0 1, point (a*T) 0 (1-T), point (b*T) 0 (1-T)]
end TriangularCovering
end
end
run_cmd Lean.modifyEnv fun env => Lean.Meta.auxLemmasExt.setState env {}
section
open Set MeasureTheory
open scoped InnerProductSpace BigOperators Interval
noncomputable section
namespace TriangularCovering.Planar
abbrev Coord := Fin 2 โ†’ โ„
def standard : Set Coord := {x | 0 โ‰ค x 0 โˆง 0 โ‰ค x 1 โˆง x 0 + x 1 โ‰ค 1}
def vertices : Fin 3 โ†’ Coord := ![0, ![1, 0], ![0, 1] ]
end TriangularCovering.Planar
namespace TriangularCovering
section Triangles
variable {E F : Type*} [AddCommGroup E] [Module โ„ E] [AddCommGroup F] [Module โ„ F]
def triangle (a b c : E) : Set E := convexHull โ„ (range (![a, b, c] : Fin 3 โ†’ E))
end Triangles
end TriangularCovering
end
end
run_cmd Lean.modifyEnv fun env => Lean.Meta.auxLemmasExt.setState env {}
section
open Set MeasureTheory
open scoped InnerProductSpace
noncomputable section
namespace TriangularCovering
def lowerAngularIndex {N : โ„•} (j : Fin N) : Fin (2*N) :=
Fin.cast (two_mul N).symm (Fin.castAdd N j)
def upperAngularIndex {N : โ„•} (j : Fin N) : Fin (2*N) :=
Fin.cast (two_mul N).symm (Fin.natAdd N j)
def lowerAngularAxis (ฮต : โ„) (j : โ„•) : Space :=
let a := mesh (n ฮต) j
let b := mesh (n ฮต) (j+1)
unit (tiltV ฮต (alpha a b) (beta a b))
def upperAngularAxis (ฮต : โ„) (j : โ„•) : Space :=
let a := mesh (n ฮต) j
let b := mesh (n ฮต) (j+1)
unit (tiltW ฮต (alpha a b) (beta a b))
def lowerAngularBase (ฮต : โ„) (j : โ„•) : Set Space :=
let a := mesh (n ฮต) j
let b := mesh (n ฮต) (j+1)
let v := lowerVertices a b (cutoff ฮต a b)
projection (lowerAngularAxis ฮต j) '' triangle (v 0) (v 1) (v 2)
def upperAngularBase (ฮต : โ„) (j : โ„•) : Set Space :=
let a := mesh (n ฮต) j
let b := mesh (n ฮต) (j+1)
let v := upperVertices a b (cutoff ฮต a b)
projection (upperAngularAxis ฮต j) '' triangle (v 0) (v 1) (v 2)
def ExplicitAngularFamily (ฮต : โ„) (c : Fin (2*n ฮต) โ†’ TriCylinder) : Prop :=
โˆ€ j : Fin (n ฮต),
(c (lowerAngularIndex j)).axis = lowerAngularAxis ฮต j โˆง
(c (lowerAngularIndex j)).base = lowerAngularBase ฮต j โˆง
(c (upperAngularIndex j)).axis = upperAngularAxis ฮต j โˆง
(c (upperAngularIndex j)).base = upperAngularBase ฮต j
def AngularAreaStatement : Prop :=
โˆ€ ฮต : โ„, 0 < ฮต โ†’ ฮต โ‰ค 1 โ†’
โˆƒ c : Fin (2*n ฮต) โ†’ TriCylinder,
ExplicitAngularFamily ฮต c โˆง
totalArea c/H = โˆ‘ j : Fin (n ฮต),
normalizedTerm ฮต (mesh (n ฮต) j) (mesh (n ฮต) (j+1)) โˆง
|totalArea c/H - (1/2-(13/6000:โ„)*ฮต^2)| โ‰ค 2*ฮต^4
def ExplicitAngularStatement : Prop :=
A_min = H โˆง
โˆ€ ฮต : โ„, 0 < ฮต โ†’ ฮต โ‰ค 1/2000 โ†’
โˆƒ c : Fin (2*n ฮต) โ†’ TriCylinder,
ExplicitAngularFamily ฮต c โˆง Covers c โˆง
|totalArea c/H - (1/2-(13/6000:โ„)*ฮต^2)| โ‰ค 2*ฮต^4 โˆง
totalArea c < A_min/2 โˆง relativeCost c < 1/2
end TriangularCovering
end
end
run_cmd Lean.modifyEnv fun env => Lean.Meta.auxLemmasExt.setState env {}
section
noncomputable section
open Set MeasureTheory Filter Metric
open scoped Topology ContDiff Pointwise
namespace RuledApproximation
abbrev Plane := EuclideanSpace โ„ (Fin 2)
abbrev Space := EuclideanSpace โ„ (Fin 3)
def vec2 (x y : โ„) : Plane := WithLp.toLp 2 ![x, y]
def vec3 (x y z : โ„) : Space := WithLp.toLp 2 ![x, y, z]
def axial (s : โ„) (p : Plane) : Space := vec3 s (p 0) (p 1)
def IsParallelogram {E : Type*} [AddCommGroup E] [Module โ„ E] (P : Set E) : Prop :=
โˆƒ c u v : E, LinearIndependent โ„ ![u, v] โˆง
P = {x | โˆƒ s โˆˆ Icc (0 : โ„) 1, โˆƒ t โˆˆ Icc (0 : โ„) 1,
x = c + s โ€ข u + t โ€ข v}
structure Cylinder where
axis : Space
unit_axis : โ€–axisโ€– = 1
base : Set ((Submodule.span โ„ ({axis} : Set Space))แ—ฎ)
namespace Cylinder
def carrier (C : Cylinder) : Set Space :=
{x | โˆƒ b โˆˆ C.base, โˆƒ t : โ„, x = (b : Space) + t โ€ข C.axis}
def area (C : Cylinder) : โ„ := volume.real C.base
def parallelogram (C : Cylinder) : Prop := IsParallelogram C.base
def openBounded (C : Cylinder) : Prop :=
IsOpen C.base โˆง Bornology.IsBounded C.base โˆง MeasurableSet C.base
end Cylinder
def familySet {n : โ„•} (C : Fin n โ†’ Cylinder) : Set Space := โ‹ƒ i, (C i).carrier
def familyArea {n : โ„•} (C : Fin n โ†’ Cylinder) : โ„ := โˆ‘ i, (C i).area
def HasFiniteCover (shape : Cylinder โ†’ Prop) (S : Set Space) (A : โ„) : Prop :=
โˆƒ n : โ„•, โˆƒ C : Fin n โ†’ Cylinder,
(โˆ€ i, shape (C i)) โˆง S โІ familySet C โˆง familyArea C โ‰ค A
def SmoothNear (n : WithTop โ„•โˆž) (D : Set Plane) (v : Plane โ†’ Plane) : Prop :=
โˆƒ U : Set Plane, IsOpen U โˆง D โІ U โˆง ContDiffOn โ„ n v U
def HyperbolicAt (L : โ„) (v : Plane โ†’ Plane) (p : Plane) : Prop :=
โˆƒ lam : โ„, 0 < L * lam โˆง L * lam < 1 โˆง
Module.End.HasEigenvalue (fderiv โ„ v p).toLinearMap lam โˆง
Module.End.HasEigenvalue (fderiv โ„ v p).toLinearMap (-lam)
def weight (v : Plane) : โ„ := 1 / Real.sqrt (1 + โ€–vโ€– ^ 2)
def physicalWeight (h : โ„) (w : Plane) : โ„ :=
1 / Real.sqrt (1 + w 0 ^ 2 + h ^ 2 * w 1 ^ 2)
def ruled (D : Set Plane) (v : Plane โ†’ Plane) (L : โ„) : Set Space :=
{z | โˆƒ p โˆˆ D, โˆƒ r : โ„, |r| โ‰ค L โˆง
z = vec3 (p 0 + r * v p 0) (p 1 + r * v p 1) r}
def physicalRuled (h : โ„) (D : Set Plane) (v : Plane โ†’ Plane) (L : โ„) : Set Space :=
{z | โˆƒ p โˆˆ D, โˆƒ s : โ„, |s| โ‰ค L โˆง
z = vec3 s (p 0 + s * v p 0) (h * (p 1 + s * v p 1))}
def HyperbolicStatement : Prop :=
โˆ€ (D : Set Plane) (v : Plane โ†’ Plane) (L : โ„),
IsCompact D โ†’ SmoothNear 1 D v โ†’ 0 < L โ†’
(โˆ€ p โˆˆ D, HyperbolicAt L v p) โ†’
โˆ€ e : โ„, 0 < e โ†’ HasFiniteCover Cylinder.parallelogram (ruled D v L)
((โˆซ p in D, weight (v p)) + e)
def unitSquare : Set Plane := {x | โˆ€ i, |x i| โ‰ค (1 : โ„) / 2}
def IsSquareTile (T : Set Plane) : Prop :=
โˆƒ c : Plane, โˆƒ R : Plane โ‰ƒโ‚—แตข[โ„] Plane, โˆƒ a : โ„, 0 < a โˆง
T = (fun x => c + a โ€ข R x) '' unitSquare
def auxiliaryCylinder (T : Set Plane) (g : Plane) : Set Space :=
{z | โˆƒ s : โ„, โˆƒ b โˆˆ T, z = axial s (b + s โ€ข g)}
def firstPhysicalMap (h : โ„) (z : Space) : Space := vec3 (z 0) (z 1) (h * z 2)
def secondPhysicalMap (h a : โ„) (z : Space) : Space :=
vec3 (z 1) (z 0) (h * (a - z 2))
end RuledApproximation
end
end
run_cmd Lean.modifyEnv fun env => Lean.Meta.auxLemmasExt.setState env {}
section
noncomputable section
open Set MeasureTheory
open scoped InnerProductSpace
namespace CylinderCovering
abbrev Space := EuclideanSpace โ„ (Fin 3)
def IsRegularTetrahedron (K : Set Space) : Prop :=
โˆƒ v : Fin 4 โ†’ Space, AffineIndependent โ„ v โˆง
โˆƒ edge : โ„, 0 < edge โˆง
(โˆ€ i j : Fin 4, i โ‰  j โ†’ dist (v i) (v j) = edge) โˆง
K = convexHull โ„ (range v)
def shadowArea (K : Set Space) (u : Space) : โ„ :=
TriangularCovering.area (TriangularCovering.projection u '' K)
def minimumShadowArea (K : Set Space) : โ„ :=
sInf {a : โ„ | โˆƒ u : Space, โ€–uโ€– = 1 โˆง a = shadowArea K u}
def triangularCovers {n : โ„•} (K : Set Space)
(C : Fin n โ†’ TriangularCovering.TriCylinder) : Prop :=
โˆ€ x โˆˆ K, โˆƒ i : Fin n, x โˆˆ (C i).carrier
def triangularRelativeCost {n : โ„•} (K : Set Space)
(C : Fin n โ†’ TriangularCovering.TriCylinder) : โ„ :=
โˆ‘ i, TriangularCovering.area (C i).base / shadowArea K (C i).axis
def relativeCost {n : โ„•} (K : Set Space)
(C : Fin n โ†’ RuledApproximation.Cylinder) : โ„ :=
โˆ‘ i, (C i).area / shadowArea K (C i).axis
def AngularExplicitStatement : Prop :=
TriangularCovering.AngularAreaStatement โˆง TriangularCovering.ExplicitAngularStatement
def RegularTriangularCounterexampleStatement : Prop :=
โˆ€ K : Set Space, IsRegularTetrahedron K โ†’
โˆƒ n : โ„•, โˆƒ C : Fin n โ†’ TriangularCovering.TriCylinder,
triangularCovers K C โˆง
TriangularCovering.totalArea C < minimumShadowArea K / 2 โˆง
triangularRelativeCost K C < 1 / 2
def RegularParallelogramCounterexampleStatement : Prop :=
โˆ€ K : Set Space, IsRegularTetrahedron K โ†’
โˆƒ n : โ„•, โˆƒ C : Fin n โ†’ RuledApproximation.Cylinder,
(โˆ€ i, (C i).parallelogram) โˆง
K โІ RuledApproximation.familySet C โˆง
RuledApproximation.familyArea C < minimumShadowArea K / 2 โˆง
relativeCost K C < 1 / 2
def RegularOpenCounterexampleStatement : Prop :=
โˆ€ K : Set Space, IsRegularTetrahedron K โ†’
โˆƒ n : โ„•, โˆƒ C : Fin n โ†’ RuledApproximation.Cylinder,
(โˆ€ i, (C i).openBounded) โˆง
K โІ RuledApproximation.familySet C โˆง
RuledApproximation.familyArea C < minimumShadowArea K / 2 โˆง
relativeCost K C < 1 / 2
end CylinderCovering
end
end
run_cmd Lean.modifyEnv fun env => Lean.Meta.auxLemmasExt.setState env {}
section
noncomputable section
open Set MeasureTheory Filter
open scoped Topology ContDiff
namespace RuledApproximation
def NilpotentC1Statement : Prop :=
โˆ€ (D : Set Plane) (G : Plane โ†’ Plane), IsCompact D โ†’ SmoothNear 1 D G โ†’
(โˆ€ b โˆˆ D, (fderiv โ„ G b).comp (fderiv โ„ G b) = 0) โ†’
โˆ€ h eps : โ„, 0 < h โ†’ 0 < eps โ†’
โˆƒ n : โ„•, โˆƒ T : Fin n โ†’ Set Plane, โˆƒ g : Fin n โ†’ Plane,
(โˆ€ i, IsSquareTile (T i)) โˆง
physicalRuled 1 D G 1 โІ โ‹ƒ i, auxiliaryCylinder (T i) (g i) โˆง
(โˆ‘ i, volume.real (T i) * physicalWeight h (g i)) โ‰ค
(โˆซ b in D, physicalWeight h (G b)) + eps โˆง
โˆ€ a : โ„, โˆƒ Cโ‚ Cโ‚‚ : Fin n โ†’ Cylinder,
(โˆ€ i, (Cโ‚ i).parallelogram โˆง (Cโ‚‚ i).parallelogram โˆง
(Cโ‚ i).carrier = firstPhysicalMap h '' auxiliaryCylinder (T i) (g i) โˆง
(Cโ‚‚ i).carrier = secondPhysicalMap h a '' auxiliaryCylinder (T i) (g i) โˆง
(Cโ‚ i).area = h * volume.real (T i) * physicalWeight h (g i) โˆง
(Cโ‚‚ i).area = h * volume.real (T i) * physicalWeight h (g i))
end RuledApproximation
end
end
run_cmd Lean.modifyEnv fun env => Lean.Meta.auxLemmasExt.setState env {}
section
noncomputable section
namespace CylinderCovering.RadialRiemann
open Set
def step (a b : โ„) (N : โ„•) : โ„ := (b - a) / N
def point (a b : โ„) (N i : โ„•) : โ„ := a + i * step a b N
def cell (a b : โ„) (N : โ„•) (i : Fin N) : Set โ„ :=
Icc (point a b N i) (point a b N (i + 1))
def IsTagged (a b : โ„) (N : โ„•) (tag : Fin N โ†’ โ„) : Prop :=
โˆ€ i, tag i โˆˆ cell a b N i
def capMax (R : โ„ โ†’ โ„) (a b : โ„) (N : โ„•) (i : Fin N) : โ„ :=
sSup (R '' cell a b N i)
end CylinderCovering.RadialRiemann
end
end
run_cmd Lean.modifyEnv fun env => Lean.Meta.auxLemmasExt.setState env {}
section
open Set MeasureTheory Filter
open scoped InnerProductSpace Topology
noncomputable section
namespace CylinderCovering.RadialSweep
abbrev Space := TriangularCovering.Space
structure Data where
e : Space
a : Space
b : Space
pโ‚€ : Space
ฮฑ : โ„
ฮฒ : โ„
L : โ„
R : โ„ โ†’ โ„
lam : โ„ โ†’ โ„
w : โ„ โ†’ Space
interval_nonempty : ฮฑ < ฮฒ
length_pos : 0 < L
normal_unit : โ€–eโ€– = 1
a_perp : inner โ„ e a = 0
b_perp : inner โ„ e b = 0
origin_perp : inner โ„ e pโ‚€ = 0
independent : LinearIndependent โ„ ![a, b]
cap_continuous : ContinuousOn R (Icc ฮฑ ฮฒ)
cap_nonneg : โˆ€ t โˆˆ Icc ฮฑ ฮฒ, 0 โ‰ค R t
scalar_continuous : ContinuousOn lam (Icc ฮฑ ฮฒ)
velocity_continuous : ContinuousOn w (Icc ฮฑ ฮฒ)
velocity_perp : โˆ€ t โˆˆ Icc ฮฑ ฮฒ, inner โ„ e (w t) = 0
aligned : โˆ€ t โˆˆ Icc ฮฑ ฮฒ,
HasDerivWithinAt w (lam t โ€ข (a + t โ€ข b)) (Icc ฮฑ ฮฒ) t
def sweep (D : Data) : Set Space :=
{z | โˆƒ t โˆˆ Icc D.ฮฑ D.ฮฒ, โˆƒ ฯ โˆˆ Icc (0 : โ„) (D.R t),
โˆƒ s : โ„, |s| โ‰ค D.L โˆง
z = D.pโ‚€ + ฯ โ€ข (D.a + t โ€ข D.b) + s โ€ข (D.e + D.w t)}
def kappa (D : Data) : โ„ :=
Real.sqrt (inner โ„ D.a D.a * inner โ„ D.b D.b - (inner โ„ D.a D.b) ^ 2)
def direction (D : Data) (t : โ„) : Space :=
โ€–D.e + D.w tโ€–โปยน โ€ข (D.e + D.w t)
def weightedArea (D : Data) : โ„ :=
kappa D * โˆซ t in D.ฮฑ..D.ฮฒ,
D.R t ^ 2 / (2 * Real.sqrt (1 + โ€–D.w tโ€– ^ 2))
def scalarBound (D : Data) : โ„ := sSup ((fun t => |D.lam t|) '' Icc D.ฮฑ D.ฮฒ)
def radialError (D : Data) : โ„ := D.L * scalarBound D
def collar (D : Data) : โ„ := 3 * radialError D + 1
def midpoint (D : Data) (N : โ„•) (i : Fin N) : โ„ :=
(RadialRiemann.point D.ฮฑ D.ฮฒ N i + RadialRiemann.point D.ฮฑ D.ฮฒ N (i + 1)) / 2
def leftTip (D : Data) (N : โ„•) : โ„ := -collar D * RadialRiemann.step D.ฮฑ D.ฮฒ N
def rightEdge (D : Data) (N : โ„•) (i : Fin N) : โ„ :=
RadialRiemann.capMax D.R D.ฮฑ D.ฮฒ N i + radialError D * RadialRiemann.step D.ฮฑ D.ฮฒ N
def coordinateMap (D : Data) (p : โ„ ร— โ„) : Space := D.pโ‚€ + p.1 โ€ข D.a + p.2 โ€ข D.b
def frozenVertices (D : Data) (N : โ„•) (i : Fin N) : Fin 3 โ†’ Space :=
let l := leftTip D N
let r := rightEdge D N i
let m := midpoint D N i
let d := RadialRiemann.step D.ฮฑ D.ฮฒ N
![coordinateMap D (l, m * l),
coordinateMap D (r, m * r - d / 2 * (r - l)),
coordinateMap D (r, m * r + d / 2 * (r - l))]
def frozenTriangle (D : Data) (N : โ„•) (i : Fin N) : Set Space :=
convexHull โ„ (Set.range (frozenVertices D N i))
def frozenBase (D : Data) (N : โ„•) (tag : Fin N โ†’ โ„) (i : Fin N) : Set Space :=
TriangularCovering.projection (direction D (tag i)) '' frozenTriangle D N i
def frozenArea (D : Data) (N : โ„•) (tag : Fin N โ†’ โ„) (i : Fin N) : โ„ :=
kappa D * RadialRiemann.step D.ฮฑ D.ฮฒ N *
(RadialRiemann.capMax D.R D.ฮฑ D.ฮฒ N i +
(radialError D + collar D) * RadialRiemann.step D.ฮฑ D.ฮฒ N) ^ 2 /
(2 * Real.sqrt (1 + โ€–D.w (tag i)โ€– ^ 2))
def localSweep (D : Data) (N : โ„•) (i : Fin N) : Set Space :=
{z | โˆƒ t โˆˆ RadialRiemann.cell D.ฮฑ D.ฮฒ N i,
โˆƒ ฯ โˆˆ Icc (0 : โ„) (D.R t), โˆƒ s : โ„, |s| โ‰ค D.L โˆง
z = D.pโ‚€ + ฯ โ€ข (D.a + t โ€ข D.b) + s โ€ข (D.e + D.w t)}
def actualBase (D : Data) (N : โ„•) (tag : Fin N โ†’ โ„) (i : Fin N) : Set Space :=
TriangularCovering.projection (direction D (tag i)) '' localSweep D N i
def cylinder (u : Space) (B : Set Space) : Set Space :=
{z | โˆƒ b โˆˆ B, โˆƒ s : โ„, z = b + s โ€ข u}
def actualCost (D : Data) (N : โ„•) (tag : Fin N โ†’ โ„) : โ„ :=
โˆ‘ i : Fin N, TriangularCovering.area (actualBase D N tag i)
def AlignedStatement : Prop :=
โˆ€ D : Data, โˆ€ tag : (N : โ„•) โ†’ Fin N โ†’ โ„,
(โˆ€ N, RadialRiemann.IsTagged D.ฮฑ D.ฮฒ N (tag N)) โ†’
โˆƒ C : (N : โ„•) โ†’ Fin N โ†’ TriangularCovering.TriCylinder,
(โˆ€ N, 0 < N โ†’
(โˆ€ i, (C N i).axis = direction D (tag N i) โˆง
(C N i).base = frozenBase D N (tag N) i โˆง
TriangularCovering.area (C N i).base = frozenArea D N (tag N) i) โˆง
(โˆ€ z โˆˆ sweep D, โˆƒ i : Fin N, z โˆˆ (C N i).carrier)) โˆง
Tendsto (fun N => TriangularCovering.totalArea (C N)) atTop (๐“ (weightedArea D))
def ActualSweepStatement : Prop :=
โˆ€ D : Data, โˆ€ tag : (N : โ„•) โ†’ Fin N โ†’ โ„,
(โˆ€ N, RadialRiemann.IsTagged D.ฮฑ D.ฮฒ N (tag N)) โ†’
(โˆ€ N, 0 < N โ†’
(โˆ€ i : Fin N, โ€–direction D (tag N i)โ€– = 1 โˆง
IsCompact (actualBase D N (tag N) i) โˆง
MeasurableSet (actualBase D N (tag N) i) โˆง
Measure.euclideanHausdorffMeasure 2 (actualBase D N (tag N) i) โ‰  โŠค โˆง
(โˆ€ z โˆˆ actualBase D N (tag N) i, inner โ„ (direction D (tag N i)) z = 0) โˆง
actualBase D N (tag N) i โІ frozenBase D N (tag N) i) โˆง
(โˆ€ z โˆˆ sweep D, โˆƒ i : Fin N,
z โˆˆ cylinder (direction D (tag N i)) (actualBase D N (tag N) i))) โˆง
(โˆ€ ฮต : โ„, 0 < ฮต โ†’ โˆ€แถ  N in atTop, actualCost D N (tag N) โ‰ค weightedArea D + ฮต) โˆง
Filter.limsup (fun N => actualCost D N (tag N)) atTop โ‰ค weightedArea D
end CylinderCovering.RadialSweep
end
end
namespace CylinderCovering
theorem fourPaperMain :
AngularExplicitStatement โˆง
RuledApproximation.HyperbolicStatement โˆง
RuledApproximation.NilpotentC1Statement โˆง
RegularParallelogramCounterexampleStatement โˆง
RegularOpenCounterexampleStatement โˆง
RadialSweep.AlignedStatement โˆง
RadialSweep.ActualSweepStatement := by
sorry
end CylinderCovering
end OAI