Documentation

LeanPool.MovingSofa.GerverSofa.KernelOnly.Core.Bundle004

Gerver sofa: related certificate and semantic modules #

Gerver sofa dependency batch #

Part A final adapter data #

The original Gerver boxes are affinely normalized to [-1,1]^n. If x = m + D u, then the preconditioner is transformed from C to D⁻¹ C. Consequently

I - (D⁻¹ C) (J_F(x) D) = D⁻¹ (I - C J_F(x)) D,

so the old weighted sup-norm contraction becomes the ordinary infinity norm used by LeanCert.

The preconditioner literals below are exact public copies of the frozen rational data already used by ExactReplay. This avoids exposing private helpers during simplification.

Construct an exact rational from an integer numerator and natural denominator.

Equations
Instances For

    The rational preconditioner table for the four reduced equations.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For

      The rational preconditioner table for the twenty-two full equations.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For

        Interpret rational row lists as a square matrix, using zero for missing entries.

        Equations
        Instances For

          The rational midpoint of a selected interval coordinate.

          Equations
          Instances For

            Half the width of a selected rational interval coordinate.

            Equations
            Instances For

              Map normalized coordinates to the given box using its midpoints and radii.

              Equations
              Instances For
                noncomputable def GerverSofa.PartALeanCert.normalizeToBox {n : ℕ} (box : List RatInterval) (x : Fin n → ℝ) :
                Fin n → ℝ

                Subtract each box midpoint and divide by its coordinate radius.

                Equations
                Instances For

                  The coordinate box with interval [-1, 1] in every dimension.

                  Equations
                  Instances For

                    The rational origin used as the normalized Newton center.

                    Equations
                    Instances For

                      Rescale each preconditioner row by the inverse box radius.

                      Equations
                      Instances For

                        Map the normalized unit box into the full Romik parameter box.

                        Equations
                        Instances For
                          noncomputable def GerverSofa.PartALeanCert.reducedNormalize :
                          (Fin 4 → ℝ) → Fin 4 → ℝ

                          Convert reduced parameter coordinates to normalized box coordinates.

                          Equations
                          Instances For

                            A deliberately generous verified contraction target. The legacy exact bounds are ~5.2e-13 (4D) and ~8.6e-11 (22D), so 1/100 leaves many orders of magnitude of slack while keeping the normalized self-map well inside the unit box.

                            Equations
                            Instances For

                              Minimal named-constant extension of LeanCert's AD soundness layer #

                              LeanCert's computable total dual evaluator already evaluates Expr.namedConst c as DualInterval.ofMathConst c, whose derivative component is the singleton interval {0}. Its public ADSupported predicate, however, does not currently include namedConst.

                              The Gerver systems necessarily contain the exact constant Real.pi. This file adds exactly one missing syntactic case -- differentiable named mathematical constants -- while reusing LeanCert's existing evaluator, interval Jacobian, matrix norm machinery, Newton map, and contraction theorem unchanged.

                              No interval arithmetic is reimplemented here.

                              Dual-evaluator domain validity is likewise automatic for this fragment.

                              Calculus layer #

                              theorem GerverSofa.PartALeanCert.evalDualTotalCore_der_correct_idx_const (e : LeanCert.Core.Expr) (h : ADConstSupported e) (ρReal : ℕ → ℝ) (ρInt : LeanCert.Engine.IntervalEnv) (idx : ℕ) (hρ : ∀ (i : ℕ), ρReal i ∈ ρInt i) (x : ℝ) (hx : x ∈ ρInt idx) (cfg : LeanCert.Engine.EvalConfig) :

                              LeanCert's computable total AD derivative theorem, extended by the single missing namedConst case. The computed interval is unchanged.

                              Krawczyk calculus adapters retaining LeanCert's data path #

                              theorem GerverSofa.PartALeanCert.jacobianAt_apply_const {n : ℕ} (F : Fin n → LeanCert.Core.Expr) (h : ∀ (i : Fin n), ADConstSupported (F i)) (x : Fin n → ℝ) (i j : Fin n) :

                              LeanCert expression models for the normalized Gerver systems #

                              These expressions use LeanCert's differentiable AD fragment plus exact named mathematical constants. LeanCertNamedConstAD supplies the one missing soundness case for namedConst (derivative zero).

                              @[reducible, inline]

                              The expression syntax interpreted by the certified interval evaluator.

                              Equations
                              Instances For

                                A rational constant expression.

                                Equations
                                Instances For

                                  An indexed variable expression.

                                  Equations
                                  Instances For

                                    Construct the sum of two expressions.

                                    Equations
                                    Instances For

                                      Construct the negation of an expression.

                                      Equations
                                      Instances For

                                        Construct a difference using addition and negation.

                                        Equations
                                        Instances For

                                          Construct the product of two expressions.

                                          Equations
                                          Instances For

                                            Multiply an expression by a rational constant.

                                            Equations
                                            Instances For

                                              Apply sine in the expression syntax.

                                              Equations
                                              Instances For

                                                Apply cosine in the expression syntax.

                                                Equations
                                                Instances For

                                                  An expression for a box coordinate in terms of its normalized variable.

                                                  Equations
                                                  • One or more equations did not get rendered due to their size.
                                                  Instances For

                                                    Reduced 4D #

                                                    The four reduced equations encoded as evaluator expressions.

                                                    Equations
                                                    • One or more equations did not get rendered due to their size.
                                                    Instances For

                                                      Select an equation from the reduced four-dimensional expression system.

                                                      Equations
                                                      Instances For

                                                        Direct 22D #

                                                        A full Romik parameter encoded as a normalized variable expression.

                                                        Equations
                                                        Instances For

                                                          The expression for the first switching angle φ.

                                                          Equations
                                                          Instances For

                                                            The expression for the second switching angle θ.

                                                            Equations
                                                            Instances For

                                                              Rotate a pair of coordinate expressions by an angle expression.

                                                              Equations
                                                              • One or more equations did not get rendered due to their size.
                                                              Instances For

                                                                Encode a selected closed path branch as two coordinate expressions.

                                                                Equations
                                                                • One or more equations did not get rendered due to their size.
                                                                Instances For

                                                                  Encode the body-frame velocity of a selected path branch.

                                                                  Equations
                                                                  • One or more equations did not get rendered due to their size.
                                                                  Instances For

                                                                    Encode the world-frame derivative of a selected path branch.

                                                                    Equations
                                                                    Instances For

                                                                      The twenty-two full equations encoded as evaluator expressions.

                                                                      Equations
                                                                      • One or more equations did not get rendered due to their size.
                                                                      Instances For

                                                                        Select one equation from the full Romik expression system.

                                                                        Equations
                                                                        Instances For

                                                                          Purely syntactic support checks for the Gerver expression fragment.

                                                                          Gerver Sofa / Kernel Only / Lean Cert Gerver Correspondence #

                                                                          @[simp]

                                                                          LeanCert's named π has exactly Mathlib's real value.

                                                                          Reduced semantic correspondence.

                                                                          Full 22D semantic correspondence through the already proved public fullDualOutput_model_eq. This avoids unfolding the private pathPrime helper.

                                                                          Box transport #

                                                                          theorem GerverSofa.PartALeanCert.affine_mem_interval (z : RatInterval) (hz : z.lo < z.hi) (u : ℝ) (hu : -1 ≤ u ∧ u ≤ 1) :
                                                                          z.Contains (↑((z.lo + z.hi) / 2) + ↑((z.hi - z.lo) / 2) * u)
                                                                          theorem GerverSofa.PartALeanCert.normalize_mem_unit (z : RatInterval) (hz : z.lo < z.hi) (x : ℝ) (hx : z.Contains x) :
                                                                          (x - ↑((z.lo + z.hi) / 2)) / ↑((z.hi - z.lo) / 2) ∈ unitBox 0
                                                                          theorem GerverSofa.PartALeanCert.affine_normalize_coord (z : RatInterval) (hz : z.lo < z.hi) (x : ℝ) :
                                                                          ↑((z.lo + z.hi) / 2) + ↑((z.hi - z.lo) / 2) * ((x - ↑((z.lo + z.hi) / 2)) / ↑((z.hi - z.lo) / 2)) = x

                                                                          Determinant-free checked Krawczyk endgame #

                                                                          For a square system, the usual explicit determinant test on the preconditioner is redundant once ‖I - YJ‖ < 1 is known: at any point in the box, YJ = 1 - T with ‖T‖ < 1, hence YJ is a unit by the Neumann-series theorem. Therefore Y is surjective, hence injective in finite dimension.

                                                                          This matters computationally in dimension 22 because Mathlib's generic Leibniz determinant is the wrong algorithm for a huge exact rational matrix.

                                                                          Kernel-reducible finite interval sums #

                                                                          LeanCert's public intervalRatMatVec uses Finset.sum with a local proof-transported AddCommMonoid IntervalRat. That is semantically sound, but closed decide +kernel computations can get stuck reducing the transported typeclass instance.

                                                                          We keep LeanCert's interval operations and mathematical semantics, but package this one finite sum by structural recursion on Fin n. Mathlib's existing Fin.sum_univ_succ is the semantic bridge to the ordinary real finite sum.

                                                                          A finite interval sum that reduces by structural recursion, with no AddCommMonoid IntervalRat instance involved in computation.

                                                                          Equations
                                                                          Instances For
                                                                            theorem GerverSofa.PartALeanCert.mem_kernelIntervalFinSum (n : ℕ) (x : Fin n → ℝ) (I : Fin n → LeanCert.Core.IntervalRat) :
                                                                            (∀ (i : Fin n), x i ∈ I i) → ∑ i : Fin n, x i ∈ kernelIntervalFinSum I

                                                                            Semantic soundness of the kernel-reducible finite interval sum.

                                                                            Kernel-reducible point values at the Newton center #

                                                                            LeanCert's ordinary rational evaluator uses sinComputableReduced and cosComputableReduced. Those are mathematically excellent general-purpose routines, but their period-reduction step computes a rational floor. On the closed Gerver certificates that floor can prevent decide +kernel from normalizing an otherwise entirely rational proposition.

                                                                            For the exact Gerver expression fragment (ADConstSupported) we therefore use a tiny point evaluator that is identical on algebraic operations and named constants, but calls the already-proved unreduced Taylor enclosures sinComputable and cosComputable. These enclosures are globally sound for arbitrary real arguments; argument reduction is an optimization, not a soundness requirement. This keeps the Newton-center calculation purely in kernel-reducible rational arithmetic without changing the mathematical map.

                                                                            A kernel-reducible interval for π, using the exact project interval whose semantic soundness is already proved in TranscendentalSoundness.

                                                                            The generic LeanCert MathConst.interval route is mathematically sound, but its named-constant machinery does not always normalize far enough for closed decide +kernel comparisons. Reusing the project's already-certified exact rational π endpoints removes only that reduction bottleneck; it does not change the represented real constant or weaken any enclosure.

                                                                            Equations
                                                                            Instances For

                                                                              The true real π lies in the kernel-reducible π interval.

                                                                              Named constants for the point evaluator. π takes the specialized kernel-reducible path; every other LeanCert named constant keeps LeanCert's public certified interval unchanged.

                                                                              Equations
                                                                              Instances For

                                                                                Point evaluator for the everywhere-defined Gerver expression fragment. Unsupported constructors are deliberately mapped to {0}; the soundness lemma below is only stated for ADConstSupported, whose constructors are all handled explicitly.

                                                                                Equations
                                                                                Instances For

                                                                                  Soundness of the kernel-reducible point evaluator on exactly the Gerver fragment. In the sine/cosine cases this uses LeanCert's global Taylor correctness theorems directly, so no period-reduction hypothesis is needed.

                                                                                  Taylor depth used only for the Newton-center point values. The reduced system has coordinates at scale about 10^-15; the 22D system contains substantially thinner coordinates. Depth 26 is the smallest retained value after an exact-rational replay of all 22 normalized Newton-center images that still leaves the direct self-map strictly inside the unit box. It materially reduces kernel rational size compared with depth 27/34 while leaving the Jacobian evaluator and its already-passing certificates untouched.

                                                                                  Equations
                                                                                  Instances For

                                                                                    Point-value enclosures for a square system at a rational center.

                                                                                    Equations
                                                                                    • One or more equations did not get rendered due to their size.
                                                                                    Instances For

                                                                                      Every real system coordinate at the rational center lies in the kernel-reducible point enclosure.

                                                                                      Kernel-reducible version of LeanCert's Newton-center enclosure.

                                                                                      Equations
                                                                                      • One or more equations did not get rendered due to their size.
                                                                                      Instances For
                                                                                        theorem GerverSofa.PartALeanCert.newtonMap_center_mem_kernel_const {n : ℕ} (F : Fin n → LeanCert.Core.Expr) (h : ∀ (i : Fin n), ADConstSupported (F i)) (m : Fin n → ℚ) (Y : Matrix (Fin n) (Fin n) ℚ) (cfg : LeanCert.Engine.EvalConfig) (i : Fin n) :
                                                                                        LeanCert.Engine.newtonMap (Y.map fun (q : ℚ) => ↑q) F (fun (j : Fin n) => ↑(m j)) i ∈ kernelNewtonCenterInterval F m Y cfg i

                                                                                        The real Newton center lies in the kernel-reducible enclosure.

                                                                                        Same checked self-map enclosure as before, now with a kernel-reducible finite interval sum at the Newton center.

                                                                                        Equations
                                                                                        • One or more equations did not get rendered due to their size.
                                                                                        Instances For
                                                                                          theorem GerverSofa.PartALeanCert.fixedPoint_iff_systemZero_of_injective {n : ℕ} (F : Fin n → LeanCert.Core.Expr) (Y : Matrix (Fin n) (Fin n) ℚ) (hinj : Function.Injective fun (v : Fin n → ℝ) => (Y.map fun (r : ℚ) => ↑r).mulVec v) (x : Fin n → ℝ) :

                                                                                          Cached Newton-center values for large closed systems #

                                                                                          For the direct 22D Gerver certificate, recomputing all 22 transcendental point values inside every image-row proposition creates a very large kernel reduction. The following variant accepts independently checked point-value enclosures. It changes no mathematics: each cached interval is accompanied by a kernel proof that the corresponding real system value lies in it.

                                                                                          Endpoint inclusion between two rational intervals.

                                                                                          Equations
                                                                                          Instances For

                                                                                            Newton-center enclosure from externally supplied, proof-carrying point value intervals.

                                                                                            Equations
                                                                                            Instances For
                                                                                              theorem GerverSofa.PartALeanCert.newtonMap_center_mem_kernel_values {n : ℕ} (F : Fin n → LeanCert.Core.Expr) (m : Fin n → ℚ) (Y : Matrix (Fin n) (Fin n) ℚ) (V : Fin n → LeanCert.Core.IntervalRat) (hV : ∀ (j : Fin n), LeanCert.Engine.systemEval F (fun (k : Fin n) => ↑(m k)) j ∈ V j) (i : Fin n) :
                                                                                              LeanCert.Engine.newtonMap (Y.map fun (q : ℚ) => ↑q) F (fun (j : Fin n) => ↑(m j)) i ∈ kernelNewtonCenterIntervalWithValues m Y V i

                                                                                              Self-map enclosure built from independently certified center values.

                                                                                              Equations
                                                                                              • One or more equations did not get rendered due to their size.
                                                                                              Instances For
                                                                                                theorem GerverSofa.PartALeanCert.uniqueSystemZero_of_certified_contraction_values {n : ℕ} (F : Fin n → LeanCert.Core.Expr) (hsupp : ∀ (i : Fin n), ADConstSupported (F i)) (X : Fin n → LeanCert.Core.IntervalRat) (m : Fin n → ℚ) (hm : LeanCert.Engine.FinBoxMem (fun (i : Fin n) => ↑(m i)) X) (Y : Matrix (Fin n) (Fin n) ℚ) (cfg : LeanCert.Engine.EvalConfig) (q : ℚ) (hq0 : 0 ≤ q) (hq1 : q < 1) (hbound : LeanCert.Engine.intervalMatrixBound (LeanCert.Engine.preconditionedJacobian Y (LeanCert.Engine.intervalJacobian F X cfg)) ≤ q) (V : Fin n → LeanCert.Core.IntervalRat) (hV : ∀ (j : Fin n), LeanCert.Engine.systemEval F (fun (k : Fin n) => ↑(m k)) j ∈ V j) (hencl : ∀ (i : Fin n), LeanCert.Engine.intervalStrictInside (imageEnclosureWithValuesQ X m Y V q i) (X i) = true) :

                                                                                                LeanCert Gerver numerical core #

                                                                                                Only shared definitions and lightweight list lemmas live here. The expensive 22D kernel checks are split into one Lake module per row.

                                                                                                The default evaluation configuration used for the numerical certificates.

                                                                                                Equations
                                                                                                Instances For

                                                                                                  The interval enclosure of the normalized reduced Newton-map derivative.

                                                                                                  Equations
                                                                                                  • One or more equations did not get rendered due to their size.
                                                                                                  Instances For

                                                                                                    The interval enclosure of the normalized full Newton-map derivative.

                                                                                                    Equations
                                                                                                    • One or more equations did not get rendered due to their size.
                                                                                                    Instances For
                                                                                                      theorem GerverSofa.PartALeanCert.foldl_max_lt {xs : List ℚ} {a q : ℚ} (ha : a < q) (hxs : ∀ x ∈ xs, x < q) :

                                                                                                      Assemble a bound from independently kernel-checked rows without re-running AD.

                                                                                                      Proof-carrying cache for the 22 Newton-center residuals #

                                                                                                      These deliberately simple rational intervals are much wider than the actual point residuals, but still narrow enough after the scaled preconditioner to leave a large self-map margin. Each coordinate is checked independently in a separate module before it is used by the final contraction theorem.

                                                                                                      Cached interval evaluations of the full system at the normalized center.

                                                                                                      Equations
                                                                                                      • One or more equations did not get rendered due to their size.
                                                                                                      Instances For

                                                                                                        The full Newton image enclosure computed with cached center evaluations.

                                                                                                        Equations
                                                                                                        • One or more equations did not get rendered due to their size.
                                                                                                        Instances For

                                                                                                          The reduced Newton image enclosure on the normalized unit box.

                                                                                                          Equations
                                                                                                          • One or more equations did not get rendered due to their size.
                                                                                                          Instances For