Index of theproofnetwork/open-problems@860a535/Prove2Me/Definitions/Def_EinsteinFour.lean

qedmarket’s copy of theproofnetwork/open-problems@860a535, 3 Dec 2026original source β†—

242 lines Β· 8.7 kBraw
/-From Prove2Me, definition `EinsteinFour` (https://prove2.me/definitions/d30440ca-8fb5-4264-bf6e-f54839f39090). Apache-2.0 per Prove2Me's terms.-/import Mathlib -- Generated from openai/math @ adc7f1241b42e322a6451854ab7e4b4c146bf78a-- Source: lean/ComparatorChallenges/EinsteinFour.lean; bytes 16..6785-- Kind: block; original declaration names and bodies preserved.-- Source groups are independent. Target: Lean 4.33.1; see compilation.json.  -- Lean 4.33 compatibility: exact bundled-manifold carrier and instances from-- Mathlib/Geometry/Manifold/Category/MfldCat/OfModel.lean at-- d13f23b723b8a846827a245b89c10fc7d3f11612 (Lean 4.34.1).-- Copyright (c) 2026 Jack McCarthy. Apache 2.0; author: Jack McCarthy.-- Category morphisms are not used by this challenge and are omitted.section Lean433MfldCatCompatibilityopen scoped Manifold ContDiffuniverse u v namespace ModelWithCorners variable {π•œ : Type*} [NontriviallyNormedField π•œ]  {E : Type*} [NormedAddCommGroup E] [NormedSpace π•œ E]  {H : Type*} [TopologicalSpace H] /-- The category of `C^n` manifolds modeled on a fixed model with corners `I`. -/structure MfldCat (I : ModelWithCorners π•œ E H) (n : β„•βˆžΟ‰) where  _mkInternal ::  /-- The underlying type. -/  carrier : Type u  [topologicalSpace : TopologicalSpace carrier]  [chartedSpace : ChartedSpace H carrier]  [isManifold : IsManifold I n carrier] attribute [instance] MfldCat.topologicalSpace MfldCat.chartedSpace MfldCat.isManifold initialize_simps_projections MfldCat (-topologicalSpace, -chartedSpace, -isManifold) namespace MfldCatvariable {I : ModelWithCorners π•œ E H} {n : β„•βˆžΟ‰} {M N P : MfldCat I n} {X Y Z : Type u}  [TopologicalSpace X] [ChartedSpace H X] [IsManifold I n X]  [TopologicalSpace Y] [ChartedSpace H Y] [IsManifold I n Y]  [TopologicalSpace Z] [ChartedSpace H Z] [IsManifold I n Z] instance : CoeSort (MfldCat I n) (Type u) := ⟨MfldCat.carrier⟩ attribute [coe] MfldCat.carrier end MfldCatend ModelWithCornersend Lean433MfldCatCompatibility namespace OAI noncomputable section open scoped Manifold ContDiff BigOperators ENNRealopen Bundle namespace EinsteinFour abbrev FourSpace := EuclideanSpace ℝ (Fin 4)abbrev I4 := π“˜(ℝ, FourSpace) def coordinateVector (i : Fin 4) : FourSpace := EuclideanSpace.single i 1 abbrev RoundSphere4 := {x : EuclideanSpace ℝ (Fin 5) // β€–xβ€– = 1} abbrev ComplexProjective2 := Projectivization β„‚ (EuclideanSpace β„‚ (Fin 3)) abbrev RealProjective4 := Projectivization ℝ (EuclideanSpace ℝ (Fin 5)) def roundDistance (p q : RoundSphere4) : ℝ :=  Real.arccos (inner ℝ p.val q.val) def fubiniStudyDistance (p q : ComplexProjective2) : ℝ :=  Real.arccos (β€–inner β„‚ p.rep q.repβ€– / (β€–p.repβ€– * β€–q.repβ€–)) def realProjectiveDistance (p q : RealProjective4) : ℝ :=  Real.arccos (β€–inner ℝ p.rep q.repβ€– / (β€–p.repβ€– * β€–q.repβ€–)) section Metric variable (M : Type*) [TopologicalSpace M] [ChartedSpace FourSpace M]  [IsManifold I4 ∞ M] abbrev SmoothMetric :=  ContMDiffRiemannianMetric I4 ∞ FourSpace (TangentSpace I4 : M β†’ Type _) variable {M} def metricInChart (g : SmoothMetric M) (c : M) (z : FourSpace) :    Matrix (Fin 4) (Fin 4) ℝ :=  let e := chartAt FourSpace c  let d := mfderiv I4 I4 e.symm z  fun i j => g.inner (e.symm z) (d (coordinateVector i)) (d (coordinateVector j)) def partialDeriv (f : FourSpace β†’ ℝ) (i : Fin 4) (z : FourSpace) : ℝ :=  fderiv ℝ f z (coordinateVector i) def christoffel (g : SmoothMetric M) (c : M) (z : FourSpace)    (k i j : Fin 4) : ℝ :=  (1 / 2 : ℝ) * βˆ‘ l : Fin 4, (metricInChart g c z)⁻¹ k l *    (partialDeriv (fun w => metricInChart g c w j l) i z +     partialDeriv (fun w => metricInChart g c w i l) j z -     partialDeriv (fun w => metricInChart g c w i j) l z) def curvatureComponent (g : SmoothMetric M) (c : M) (z : FourSpace)    (l i j k : Fin 4) : ℝ :=  partialDeriv (fun w => christoffel g c w l j k) i z -  partialDeriv (fun w => christoffel g c w l i k) j z +  βˆ‘ p : Fin 4,    (christoffel g c z l i p * christoffel g c z p j k -     christoffel g c z l j p * christoffel g c z p i k) def ricciInChart (g : SmoothMetric M) (c : M) (z : FourSpace)    (i j : Fin 4) : ℝ :=  βˆ‘ k : Fin 4, curvatureComponent g c z k k i j def sectionalNumerator (g : SmoothMetric M) (c : M) (z : FourSpace)    (u v : FourSpace) : ℝ :=  βˆ‘ l : Fin 4, βˆ‘ m : Fin 4, βˆ‘ i : Fin 4, βˆ‘ j : Fin 4, βˆ‘ k : Fin 4,    metricInChart g c z l m * curvatureComponent g c z l i j k *      u i * v j * v k * u m def IsEinstein (g : SmoothMetric M) : Prop :=  βˆƒ lam : ℝ, βˆ€ (c : M) (i j : Fin 4),    ricciInChart g c (chartAt FourSpace c c) i j =      lam * metricInChart g c (chartAt FourSpace c c) i j def HasPositiveSectionalCurvature (g : SmoothMetric M) : Prop :=  βˆ€ (c : M) (u v : FourSpace), LinearIndependent ℝ ![u, v] β†’    0 < sectionalNumerator g c (chartAt FourSpace c c) u v def scaledEDistance (g : SmoothMetric M) (a : ℝ) (x y : M) : ℝβ‰₯0∞ :=  letI : RiemannianBundle (TangentSpace I4 : M β†’ Type _) := ⟨g.toRiemannianMetric⟩  ENNReal.ofReal (Real.sqrt a) * Manifold.riemannianEDist I4 x y def ScaledIsometricTo {N : Type*} (g : SmoothMetric M) (a : ℝ)    (modelDistance : N β†’ N β†’ ℝ) : Prop :=  βˆƒ f : M ≃ N, βˆ€ x y : M,    ENNReal.ofReal (modelDistance (f x) (f y)) = scaledEDistance g a x y end Metric end EinsteinFour  namespace PositiveEinsteinFour.Geometry open EinsteinFour Matrix variable {M : Type*} [TopologicalSpace M] [ChartedSpace FourSpace M]  [IsManifold I4 ∞ M] abbrev Mat4 := Matrix (Fin 4) (Fin 4) ℝ def chartMetric (g : SmoothMetric M) (c : M) : Mat4 :=  metricInChart g c (chartAt FourSpace c c) structure OrthonormalFrame (g : SmoothMetric M) (c : M) where  matrix : Mat4  orthonormal : matrixα΅€ * chartMetric g c * matrix = 1 def OrthonormalFrame.map {g : SmoothMetric M} {c : M} (e : OrthonormalFrame g c) :    FourSpace β†’β‚—[ℝ] FourSpace :=  (WithLp.linearEquiv 2 ℝ (Fin 4 β†’ ℝ)).symm.toLinearMap βˆ˜β‚—    (Matrix.mulVecLin e.matrix) βˆ˜β‚— (WithLp.linearEquiv 2 ℝ (Fin 4 β†’ ℝ)).toLinearMap def OrthonormalFrame.vector {g : SmoothMetric M} {c : M}    (e : OrthonormalFrame g c) (i : Fin 4) : FourSpace :=  WithLp.toLp 2 (fun a => e.matrix a i) structure FrameBundle (g : SmoothMetric M) where  base : M  frame : OrthonormalFrame g base def frameRealization {g : SmoothMetric M} (e : FrameBundle g) :    M Γ— (Fin 4 β†’ TangentBundle I4 M) :=  (e.base, fun i => ⟨e.base, e.frame.vector i⟩)  instance (g : SmoothMetric M) : TopologicalSpace (FrameBundle g) :=  TopologicalSpace.induced frameRealization inferInstance /-- An orientation is a clopen choice of determinant sign in every frame fiber. -/structure FrameOrientation (g : SmoothMetric M) where  positive : Set (FrameBundle g)  clopen : IsClopen positive  nonempty_fiber : βˆ€ c, βˆƒ e : OrthonormalFrame g c, (⟨c, e⟩ : FrameBundle g) ∈ positive  compatible : βˆ€ c (e f : OrthonormalFrame g c),    (⟨c, e⟩ : FrameBundle g) ∈ positive β†’      ((⟨c, f⟩ : FrameBundle g) ∈ positive ↔ 0 < e.matrix.det * f.matrix.det) end PositiveEinsteinFour.Geometry namespace PositiveEinsteinFour open EinsteinFour universe u /-- A connected closed oriented smooth Riemannian four-manifold. -/structure ClosedOrientedMetricFour where  manifold : ModelWithCorners.MfldCat.{u} I4 ∞  [regular : T3Space manifold]  [secondCountable : SecondCountableTopology manifold]  [compact : CompactSpace manifold]  [connected : ConnectedSpace manifold]  metric : SmoothMetric manifold  orientation : Geometry.FrameOrientation metric attribute [instance] ClosedOrientedMetricFour.regular  ClosedOrientedMetricFour.secondCountable ClosedOrientedMetricFour.compact  ClosedOrientedMetricFour.connected section ClassificationDefinitions variable {M : Type*} [TopologicalSpace M] [ChartedSpace FourSpace M]  [IsManifold I4 ∞ M] /-- Positive rescaling identifies the metric with one of the three standard models. -/def Classified (g : SmoothMetric M) : Prop :=  βˆƒ a : ℝ, 0 < a ∧    (ScaledIsometricTo g a roundDistance ∨      ScaledIsometricTo g a fubiniStudyDistance ∨      ScaledIsometricTo g a realProjectiveDistance) def ClassificationOn (M : Type*) [TopologicalSpace M] [ChartedSpace FourSpace M]    [IsManifold I4 ∞ M] [T2Space M] [SecondCountableTopology M]    [CompactSpace M] [ConnectedSpace M] : Prop :=  βˆ€ g : SmoothMetric M,    IsEinstein g β†’ HasPositiveSectionalCurvature g β†’ Classified g end ClassificationDefinitions   end PositiveEinsteinFourendend OAI

download (.tar)