Codync
A free, open-source 1:1 alternative to Grok Bot and Muse. Message Claude Code, Codex, Cursor and 40+ coding agents as persistent bots from your iPhone, Mac or Linux desktop. Group chats, threads, appr
Two ways into the formal development: the ellipsoid-fitting paper and its new results, and the reusable GaussianAnalysis mathematics library.
Developer toolsRocq Prover · PythonGitHub @LLM4RocqOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
Rocq proofs, checked by the kernel, of the sharp threshold for random ellipsoid fitting and of new results on optimal conditioning, mixtures, dependent laws and translated samples, with the reusable library GaussianAnalysis.
Taken from the repository README
Loading the full README.
Read the full README ↗This repository holds Rocq proofs, checked by the Rocq kernel, of theorems on
fitting an ellipsoid to n random points x_1, ..., x_n of R^d. The base is the
sharp threshold of Misiakiewicz and Wen for independent standard Gaussian
points, ellipsoid_fitting_main in theories/MainTheorem.v. The probability
that some positive semidefinite matrix S satisfies x_i^T S x_i = d for every i
tends to 1 if limsup n/d^2 < 1/4, and to 0 if liminf n/d^2 > 1/4. The main
result beyond Gaussian points is the optimal condition number,
condition_kappa_theorem in extension/ConditionKappaTheorem.v. Take i.i.d.
points whose law is a finite or countable mixture of product laws, with
coordinates of mean 0, variance 1 and subgaussian norm at most K in every
component and unconditional fourth moment kappa > 1. For every C > 1, an exact
fit of condition number at most C exists with probability tending to one if
n/d^2 tends to some alpha with 0 < alpha < alpha(C, kappa), and to zero if
alpha > alpha(C, kappa). For 0 < alpha < alpha*(kappa), the optimal condition
number of the sample tends in probability to C_star(alpha, kappa), the inverse
of C -> alpha(C, kappa). This theorem rests on Theorem 1.2 of Koehler and Sohn,
which extends the Gaussian threshold to independent subgaussian coordinates,
and on its extension to mixtures. The repository also holds proofs of thirteen
theorems from manuscripts of the OpenAI math collection, and the library
GaussianAnalysis on which these proofs build.
The statement files below, with the definitions they import, are what a reader
has to trust; each has a header comment that describes it. make check checks
that the code of each, comments aside, is unchanged since a commit that the
checker names, that each theorem has its statement as its type, and that its
axioms are among those of its expected list. Every list is a subset of
check/assumptions.expected, the eight classical
axioms of the Gaussian theorem: nothing from the papers is assumed. The symbols
are defined in the header of each statement file, except for S1 to S7, whose
short headers leave them to their code and to the definitions they import.
| Result | Statement | Theorem | Axiom check |
|---|---|---|---|
| Gaussian points. Misiakiewicz and Wen (arXiv:2608.10184v1): the threshold 1/4 for a positive semidefinite fit (thm:main), well-conditioned fits of trace d below it (thm:conditioned) and the balanced positive definite alternative (cor:alternative) | theories/MainStatement.v | ellipsoid_fitting_main, MainTheorem.v | Assumptions.v |
| Beyond Gaussian points. Koehler and Sohn (arXiv:2608.27372v1), Theorem 1.2: for independent coordinates of mean 0, variance 1, fourth moment kappa > 1 and subgaussian norm at most K, the threshold alpha*(kappa), well-conditioned fits below it and the limit e*(alpha, kappa) of the fitting error above it | extension/UniversalityStatement.v | universality_theorem, UniversalityTheorem.v | UniversalityAssumptions.v |
| The same conclusions for finite mixtures of product laws, with a number of components that may grow with d | extension/MixtureStatement.v | mixture_theorem, MixtureTheorem.v |
EllipsoidFitting, 588 .v files): the
Gaussian theorem, with its statement and definitions at the top.EllipsoidUniversality, 177 .v files): the
results beyond Gaussian points; see its README.GaussianApplications, 57 .v files): T1 to
T14 except T8, which was deferred; see its README.GaussianAnalysis, 128 .v files): general results
over any R : realType; 75 of its statements were reviewed and accepted.scripts/check_sources.py.Tested with OCaml 5.3.0, Rocq 9.1.1 (rocq-core), Rocq Stdlib 9.0.0, Hierarchy
Builder 1.10.3, MathComp 2.6.0, MathComp finmap 2.2.4 and MathComp-Analysis
1.16.0 (with reals-stdlib and analysis-stdlib). In a new opam switch:
opam switch create ellipsoid-fitting ocaml-base-compiler.5.3.0
opam repo add rocq-released https://rocq-prover.org/opam/released
opam repo add coq-released https://coq.inria.fr/opam/released
opam install --deps-only ./rocq-ellipsoid-fitting.opam
make build ROCQ_SWITCH=ellipsoid-fitting JOBS=3
ROCQ_SWITCH= uses the rocq on your PATH; without it, the Makefile uses the
switch rocq-analysis. With 12 GiB of memory, use JOBS=3. The package has no
install step: the modules are used from the clone. Without Rocq, in a clone
with its full history, python3 -I -B scripts/check_sources.py --before-build
applies the checker's rules to the sources: no Admitted or Axiom, the
statement files unchanged, the pinned files intact.
A bare make runs make check, which applies these rules, builds, then
compiles the check files and compares their outputs with the expected ones. It
runs in the pinned Docker image ellipsoid-rocq:2026-10-01 (image id
sha256:d28a2af774271dc1c3592aa423b064ae134a16bc22220ff5faf897b7aa9468fb),
which is not public. Elsewhere it is expected to fail: the checker requires
OCaml 5.3.0, findlib 1.9.8 and a rebuilt exporter plugin identical to the one
that wrote the references of check/identity/. It last passed on 25 October
2026, on commit 5893184e (run d8bb8f380183817de780a550701eabc6); the later
commits change only documentation and metadata, whose content the checker does
not read. The GitHub workflow build.yml is
disabled: its public image has OCaml 4.14.2 and findlib 1.9.6, and its last
run, on 25 October 2026, stopped on a stack overflow during the build.
LLM4Rocq/ellipsoid-fitting-web): the results, a guide to GaussianAnalysis
with a dated phase 12 browser, how the proofs were made and PDFs of the notes.doc/.AGENTS.md. The new
AGENTS.md says how a change is checked and overrides them.AI agents, including Claude and Codex, contributed to the formalization, review
and documentation under the direction of Marc Lelarge (Inria), who maintains
this research artifact. Issue reports are welcome; responses may be delayed. The
MIT license (LICENSE, NOTICE) covers the code and the
documents. Cite this work with CITATION.cff. The tag shifted
(24 October 2026, commit 305747af) is the mathematical release, shifted-docs
(27 October 2026) the documentation release, whose GitHub release has the PDF of
the note: git does not track PDFs. CHANGELOG.md lists the tags.
| MixtureAssumptions.v |
| The same for countable mixtures of product laws | extension/CountableMixtureStatement.v | countable_theorem, CountableTheorem.v | CountableAssumptions.v |
| The same for laws within o(d^-2) in total variation of such a family; o(d^-2) cannot be relaxed to O(d^-2) in general | extension/RobustStatement.v | robust_theorem, RobustTheorem.v | RobustAssumptions.v |
| The optimal condition number at fourth moment kappa > 1: the threshold alpha(C, kappa) and the limit C_star(alpha, kappa), for finite and countable mixtures | extension/ConditionKappaStatement.v | condition_kappa_theorem, ConditionKappaTheorem.v | ConditionKappaAssumptions.v |
| The curve alpha(C, kappa): the value of a variational problem over the semicircle law, continuous and increasing from 0 to alpha*(kappa), with the inverse C_star(alpha, kappa) | extension/ConditionKappaCurveStatement.v | condition_kappa_curve_theorem, ConditionKappaCurveTheorem.v | ConditionKappaCurveAssumptions.v |
| The same threshold and limit for laws within o(d^-2) in total variation of a finite or countable family of fourth moment kappa | extension/ConditionKappaRobustStatement.v | condition_kappa_robust_theorem, ConditionKappaRobustTheorem.v | ConditionKappaRobustAssumptions.v |
| The case kappa = 3, where the curve alpha_C is given by the semicircle law | extension/ConditionStatement.v | condition_theorem, ConditionTheorem.v | ConditionAssumptions.v |
| The robust form at kappa = 3 | extension/ConditionRobustStatement.v | robust_condition_theorem, ConditionRobustTheorem.v | ConditionRobustAssumptions.v |
| The expansions of alpha_C near C = 1 and as C -> oo, and of C_star near alpha = 0 and alpha = 1/4 | extension/ConditionEndpoints.v | condition_endpoints_theorem, ConditionEndpointsTheorem.v | ConditionEndpointsAssumptions.v |
| Exact fitting for the paired law, whose coordinates come in dependent pairs, for -1 <= eps <= 7/3 | extension/PairedStatement.v | paired_theorem, PairedTheorem.v | PairedAssumptions.v |
| Exact fitting for the latent-sign law, in which one hidden sign couples all the coordinates of a point | extension/LatentSignStatement.v | latent_sign_theorem, LatentSignTheorem.v | LatentSignAssumptions.v |
| Identities showing that the dependence of the latent-sign law persists in every dimension | extension/LatentSignScope.v | latent_scope_theorem, LatentScopeTheorem.v | LatentScopeAssumptions.v |
| Every constant of the coordinate tensorization of the variance for the latent-sign law is at least 1 + (d - 1) s^2 / 9 | extension/LatentTensorization.v | latent_tensor_theorem, LatentTensorTheorem.v | LatentTensorAssumptions.v |
| The latent-sign law satisfies this tensorization with the constant 2 ((1 + s) / (1 - 3 s / 7))^d | extension/LatentTensorUpper.v | latent_tensor_upper_theorem, LatentTensorUpperTheorem.v | LatentTensorUpperAssumptions.v |
| A continuous latent mixture at total variation distance one from every countable mixture of product laws, for d >= 2 | extension/ContinuousLatent.v | continuous_latent_theorem, ContinuousLatentTheorem.v | ContinuousLatentAssumptions.v |
| Translated samples. S1: for i.i.d. N(m_d, I_d) points with norm(m_d) = o(sqrt d), the threshold alpha_C and the limit C_star(alpha) of centered Gaussian points | extension/ShiftedConditionStatement.v | shifted_condition_theorem, Shifted/ConditionTheorem.v | ShiftedConditionAssumptions.v |
| S2: for arbitrary shifts m_d and n/d^2 -> alpha with 0 < alpha < 1/4, with probability tending to one, a positive definite fit and an optimal condition number between c (1 + norm(m_d) / sqrt d) and C (1 + norm(m_d) / sqrt d), where the constants c and C depend only on alpha; the lower bound holds at every alpha > 0, on one event for all shifts | extension/ShiftedGaussianStatement.v | shifted_gaussian_theorem, Shifted/GaussianTheorem.v | ShiftedGaussianAssumptions.v |
| S3: above 1/4, one event excludes every quadric with nonzero positive semidefinite quadratic part, whatever its linear and constant terms | extension/ShiftedQuadricStatement.v | shifted_quadric_theorem, Shifted/QuadricTheorem.v | ShiftedQuadricAssumptions.v |
| S4: for n/d^2 -> alpha with alpha > 0 and arbitrary shifts, the optimal fitting error of the translated sample, and its infimum over all translations, tend in probability to e*(alpha, 3) | extension/ShiftedErrorStatement.v | shifted_error_theorem, Shifted/ErrorTheorem.v | ShiftedErrorAssumptions.v |
| S5: the same exclusion of quadrics above alpha*(kappa) for mixtures of product laws whose point law is centrally symmetric | extension/ShiftedMixtureUnsatStatement.v | shifted_mixture_unsat_theorem, Shifted/MixtureUnsatTheorem.v | ShiftedMixtureUnsatAssumptions.v |
| S6: positive definite fits below alpha*(kappa) for mixtures of product laws with shifts supported on o(d) coordinates, with no symmetry assumption | extension/ShiftedMixtureSatStatement.v | shifted_mixture_sat_theorem, Shifted/MixtureSatTheorem.v | ShiftedMixtureSatAssumptions.v |
| S7: the mixtures of the translates by m_d and -m_d of a centrally symmetric law have the centered-fitting statistics of the translate by m_d | extension/ShiftedSignStatement.v | shifted_sign_theorem, Shifted/SignTheorem.v | ShiftedSignAssumptions.v |
| Applications. T1: for symmetric H_1, ..., H_r, S = sum_j H_j^2 and q >= 1, the moment bound E tr (sum_j g_j H_j)^(2q) <= (2q - 1)!! opnorm(S)^(q-1) tr S of a Gaussian matrix series | applications/MatrixSeriesStatement.v | matrix_series_theorem, MatrixSeriesTheorem.v | MatrixSeriesAssumptions.v |
| T2: tensor packing in finite dimensions, with a universal constant C (30000 in the proof) | applications/TensorPackingStatement.v | tensor_packing_theorem, TensorPackingTheorem.v | TensorPackingAssumptions.v |
| T3: E lambda_max(W) <= 2 for the GOE, with the tails exp(-d t^2 / 4) | applications/GoeEdgeStatement.v | goe_edge_theorem, GoeEdgeTheorem.v | GoeEdgeAssumptions.v |
| T4: for 0 <= beta < 1/2, a spectral gap of at least (1 - 2 beta)/2 for the heat-bath dynamics of the Sherrington-Kirkpatrick model, on measurable good-disorder events of probability tending to one | applications/SKGapStatement.v | sk_gap_theorem, SKGapTheorem.v | SKGapAssumptions.v |
| T5: the orthogonal splitting of positive semidefinite matrices | applications/PsdSplittingStatement.v | psd_splitting_theorem, PsdSplittingTheorem.v | PsdSplittingAssumptions.v |
| T6: for potentials f of class C^3 with f, f', f'' and f''' bounded, the sign/Gaussian comparison of the pressure of the Ising perceptron, with error at most C M N^(-3/2) | applications/PerceptronSignStatement.v | perceptron_sign_theorem, PerceptronSignTheorem.v | PerceptronSignAssumptions.v |
| T7: for every k >= 3, Var(V_n) = O_k(n^(1 + 2/k)) for the capped satisfiable prefix of random k-SAT | applications/SatVarianceStatement.v | sat_variance_theorem, SatVarianceTheorem.v | SatVarianceAssumptions.v |
| T9: for every k >= 3, a satisfiability threshold for random k-SAT | applications/SatThresholdStatement.v | sat_threshold_theorem, SatThresholdTheorem.v | SatThresholdAssumptions.v |
| T10: the normalization of the factors of a PSD factorization | applications/PsdNormalizationStatement.v | psd_normalization_theorem, PsdNormalizationTheorem.v | PsdNormalizationAssumptions.v |
| T11: the product smoothing of matrix squares, with shared witnesses | applications/ProductSmoothingStatement.v | product_smoothing_theorem, ProductSmoothingTheorem.v | ProductSmoothingAssumptions.v |
| T12: a real sequence with approximate minimum inequalities for comparable sizes and an approximate neighbor step, u(s + 1) >= u(s) - A s^(-beta), has a finite-size lower bound, and converges if it is bounded | applications/MinSuperadditiveStatement.v | min_superadditive_theorem, MinSuperadditiveTheorem.v | MinSuperadditiveAssumptions.v |
| T13: for some K > 0 and every 0 < rho < 1, every PSD factorization of size r of the shifted matching matrix A_n(rho) has 2^n <= r^K for every even n large enough | applications/PsdRankStatement.v | psd_rank_theorem, PsdRankTheorem.v | PsdRankAssumptions.v |
| T14: the same bound for A_n(0), for the slack matrix T_n(0) and for exact semidefinite lifts of the perfect matching polytope | applications/PsdLiftStatement.v | psd_lift_theorem, PsdLiftTheorem.v | PsdLiftAssumptions.v |