Gerver sofa: related certificate and semantic modules #
GerverSofa.Foundation.Batch001.
Gerver sofa dependency batch #
Basic.KrawczykSpec.RationalInterval.CertificateManifest.ExactReplay.
Basic planar geometry for the moving-sofa problem #
This file fixes the exact hallway convention used by the manuscript. The inner quadrant is open, so contact with an inner wall is allowed.
Cartesian coordinates for the hallway and sofa geometry.
Equations
- GerverSofa.Point = (ℝ × ℝ)
Instances For
Closed outer quarter-plane (-∞,1]².
Equations
- GerverSofa.outerQuarter = {p : GerverSofa.Point | p.1 ≤ 1 ∧ p.2 ≤ 1}
Instances For
Open inner quarter-plane (-∞,0)².
Equations
- GerverSofa.innerQuarter = {p : GerverSofa.Point | p.1 < 0 ∧ p.2 < 0}
Instances For
The standard unit right-angled hallway.
Instances For
Quarter-plane presentation of the standard hallway.
Specification boundary for interval/Krawczyk certification #
The records below make the logical target explicit. A completed numerical
formalisation must construct these records from exact interval operations,
Taylor bounds for sin/cos, a certified interval Jacobian and the general
Krawczyk theorem. No global axiom is introduced here.
A unique solution of a predicate inside an explicit set.
- solution : α
The certified point satisfying the predicate in the specified domain.
- satisfies : P self.solution
Instances For
Any other solution in the certified domain equals the recorded solution.
Real coordinate vectors indexed by a finite type.
Equations
- GerverSofa.Vec n = (Fin n → ℝ)
Instances For
A unique zero of a vector-valued function in a set.
Equations
- GerverSofa.CertifiedUniqueZero F X = GerverSofa.CertifiedUniqueSolution (fun (x : GerverSofa.Vec n) => F x = 0) X
Instances For
Exact rational intervals #
This module is intentionally small. It provides the decidable relations used to audit the published output manifest. It does not assert that a particular transcendental expression is enclosed; that analytic soundness is a distinct proof obligation.
Rational endpoints used by exact interval computations; no ordering is assumed.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Strict inclusion in the interior of another interval.
Instances For
Exact interval addition.
Instances For
Exact interval negation.
Instances For
Exact interval subtraction.
Instances For
Product hull of two rational intervals.
Equations
Instances For
Real semantics #
Exact interval addition is sound over the reals.
Exact interval negation is sound over the reals.
Exact interval subtraction is sound over the reals.
Multiplicative soundness #
The four-corner product hull contains every real product of members.
Rational scaling is a special case of sound interval multiplication.
Semantic validity follows from the existence of a contained real point.
A strict Boolean inclusion is, in particular, a closed semantic inclusion.
Exact rational audit of the published certificate manifest #
This file contains no floating-point literals. Every value is emitted as an
integer numerator and a positive integer denominator from the deterministic
Python Fraction replay. kernel reduction therefore checks the strict box
inclusions and every published rational margin in the Lean kernel/runtime.
This manifest audit deliberately does not by itself prove the analytic
soundness of the sine/cosine enclosures or the Krawczyk existence theorem;
those proof obligations are represented separately in KrawczykSpec.lean and
GerverCertificate.lean.
Reconstruct a natural number from base-10³⁵ chunks to share decimal elaboration.
Equations
- GerverSofa.CertificateManifest.naturalFromChunks chunks = List.foldl (fun (n part : ℕ) => n * 10 ^ 35 + part) 0 chunks
Instances For
Construct an exact rational number from its integer numerator and natural denominator.
Equations
- GerverSofa.CertificateManifest.q n d = ↑n / ↑d
Instances For
The frozen rational enclosure of π used by the certificate manifest.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The frozen interval obtained from the manifest’s Machin-formula computation.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The four rational intervals specifying the reduced parameter box.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The twenty-two rational intervals specifying the full Romik parameter box.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Small kernel-checkable chunks of the frozen rational certificate.
The previous one-shot package asked the kernel to normalize the whole executable
replay in one enormous decide +kernel. That is logically sound but can take
hours. Here the proof path uses the already frozen rational certificate and
checks it in bounded, independent chunks. The expensive executable replay is
still retained in ExactReplay.lean as a diagnostic cross-check, but it is not
recomputed while building the trusted certificate.
Equations
Instances For
Executable exact-rational replay of the 4D and 22D Krawczyk inclusions #
This is a direct, floating-point-free transcription of the companion Python
algorithm. It computes with ℚ, interval automatic differentiation and the
frozen rational preconditioners. The analytic theorem saying that the Taylor
intervals enclose the real sin and cos, and the abstract Krawczyk theorem,
remain separate proof obligations; the arithmetic replay itself is decidable.
Construct an exact rational number from its integer numerator and natural denominator.
Equations
- GerverSofa.ExactReplay.q n d = ↑n / ↑d
Instances For
The singleton rational interval at zero.
Instances For
The singleton rational interval at one.
Instances For
Multiply an interval by a rational singleton using exact interval arithmetic.
Equations
Instances For
A factorial interpreted as an exact rational number.
Equations
Instances For
An alternating Taylor term with the specified power and factorial denominator.
Equations
- GerverSofa.ExactReplay.signedTerm k x power = if k % 2 = 0 then x ^ power / GerverSofa.ExactReplay.factorialQ power else -(x ^ power / GerverSofa.ExactReplay.factorialQ power)
Instances For
The finite odd-power Taylor sum for sine at a rational argument.
Equations
- GerverSofa.ExactReplay.sinPartial x terms = ∑ k ∈ Finset.range terms, GerverSofa.ExactReplay.signedTerm k x (2 * k + 1)
Instances For
The finite even-power Taylor sum for cosine at a rational argument.
Equations
- GerverSofa.ExactReplay.cosPartial x terms = ∑ k ∈ Finset.range terms, GerverSofa.ExactReplay.signedTerm k x (2 * k)
Instances For
The interval between the nineteen- and twenty-term sine Taylor sums.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The interval between the nineteen- and twenty-term cosine Taylor sums.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The rational π enclosure used for trigonometric argument reduction.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A finite alternating rational Taylor sum for arctangent.
Equations
Instances For
The interval between two specified arctangent Taylor sums.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Evaluate the Machin expression 16 atan(1/5) - 4 atan(1/239) by rational intervals.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The same 60-decimal outward rounding used by the submitted verifier.
Equations
Instances For
Evaluate the small-argument sine enclosure with outward decimal rounding.
Equations
Instances For
Evaluate the small-argument cosine enclosure with outward decimal rounding.
Equations
Instances For
A fail-closed enclosure used only when an externally supplied interval is too wide for the small-argument Taylor/range-reduction evaluator. Every certified Gerver call remains in one of the two sharp branches below, so this fallback does not alter the frozen replay.
Equations
- GerverSofa.ExactReplay.universalTrigInterval = { lo := -1, hi := 1 }
Instances For
Evaluate sine by small-argument bounds and complementary-angle reduction.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Evaluate cosine by small-argument bounds and complementary-angle reduction.
Equations
- One or more equations did not get rendered due to their size.
Instances For
An interval value together with a list of interval partial derivatives.
- val : RatInterval
The interval enclosing the scalar value.
- der : List RatInterval
Interval enclosures for the coordinate partial derivatives.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
A constant interval with zero partial derivatives in every coordinate.
Equations
- GerverSofa.ExactReplay.D.const v n = { val := v, der := List.replicate n GerverSofa.ExactReplay.zeroI }
Instances For
A rational singleton with zero partial derivatives.
Equations
Instances For
An interval variable with the selected coordinate derivative equal to one.
Equations
- GerverSofa.ExactReplay.D.varD v j n = { val := v, der := List.map (fun (k : ℕ) => GerverSofa.RatInterval.point (if k = j then 1 else 0)) (List.range n) }
Instances For
Addition with interval propagation of all coordinate derivatives.
Equations
Instances For
Rational scaling with interval propagation of all coordinate derivatives.
Equations
- GerverSofa.ExactReplay.D.scaleD a x = { val := GerverSofa.ExactReplay.scale a x.val, der := List.map (GerverSofa.ExactReplay.scale a) x.der }
Instances For
Sine with interval propagation of all coordinate derivatives.
Equations
Instances For
Cosine with interval propagation of all coordinate derivatives.
Equations
- x.cosD = { val := GerverSofa.ExactReplay.cosI x.val, der := List.map (fun (z : GerverSofa.RatInterval) => ((GerverSofa.ExactReplay.sinI x.val).mul z).neg) x.der }
Instances For
Equations
Equations
Equations
Equations
Equations
Read an interval coordinate, returning the zero interval outside the list.
Equations
Instances For
Read a rational coordinate, returning zero outside the list.
Equations
- GerverSofa.ExactReplay.getQ xs i = xs.getD i 0
Instances For
Reduced 4D system #
Direct 22D Romik system #
Public proof-carrying view and optional executable cross-check #
The full executable Krawczyk/grid replay above is intentionally retained, but
normalizing it in one kernel reduction is prohibitively expensive. The trusted
proof path therefore consumes the frozen exact-rational certificate emitted by
the independent replay and checks that certificate in CertificateManifest.
This is the standard proof-carrying-data split: expensive certificate discovery
is outside the kernel; small rational certificate verification is inside it.
The executable wrappers prefixed by executable remain available for offline
cross-checking and provenance.
The rational interval used internally by the executable replay for Real.pi.
Instances For
Public wrapper around the executable sine enclosure.
Instances For
Public wrapper around the executable cosine enclosure.
Instances For
Frozen reduced input box used by the trusted certificate.
Instances For
Frozen direct-system input box used by the trusted certificate.