Published September 27, 2026 | Version v0.1.0

SUCURI: SymPy Unified Compiler for Unambiguous Rendered Input

  • 1. Departamento de Física, Universidade do Estado de Santa Catarina (UDESC), Joinville, SC, Brazil

Description

SUCURI (SymPy Unified Compiler for Unambiguous Rendered Input) turns the LaTeX you already write into SymPy objects you can compute and prove with. When the notation is ambiguous, it does not guess.

Source code, manual and issue tracker: https://github.com/RafaelCRdeLima/SUCURI

Try it online, nothing to install: https://sucuri.pages.dev/caderno

The problem

LaTeX is typography, not semantics. SymPy's LaTeX parser returns well-formed but wrong expressions and gives no warning: \dot{x} becomes a symbol called "dot" times x, y'' becomes a plain symbol, A^\mu becomes A raised to the power μ, \frac{d^2y}{dx^2} becomes a fraction of the symbols d and dx, and \nabla_U X becomes a product, so curvature silently vanishes. SUCURI finds every ambiguous spot and won't produce an expression until each one is settled, either by your choice or by a declaration such as u = u(t,x), \mu, \nu = indices, g = metric or \nabla = levi-civita. Every reading records where it came from.

What it does

  • Calculus and differential equations: primes, Newton's dots, Leibniz d/dx and ∂, several independent variables. ODEs are solved and the solution is checked by substitution. The result says what kind of answer it is (closed form, truncated series, implicit relation or nothing found), and "nothing found" is never reported as "no solution exists".
  • Tensor index notation: declared indices and tensor types (M,N), Einstein contraction, declared symmetries with canonicalization, (anti)symmetrization brackets, Kronecker delta and Levi-Civita symbol, raising and lowering with a declared metric, and ∂ and ∇ with indices. SUCURI reads the Christoffel symbols, Riemann tensor, Ricci tensor and scalar from the definitions you write, so each book's sign and slot conventions (Carroll, MTW, Wald, …) are respected rather than assumed. The dimension can be a number or a symbol d.
  • Index-free differential geometry: ∇_U X, the Lie bracket [U,X], R(U,X)W, g(X,Y), slot notation for (0,n) tensors, and ∀-quantified definitions. Index-free equations can be translated into index notation.
  • Differential forms: exterior derivative, wedge product, interior product, Lie derivative with Cartan's formula, and the Hodge star defined from a declared metric signature.
  • Proofs from stated hypotheses: prove(goal, h1, h2, …) looks for a linear combination of the named hypotheses and of what follows from them (instances, derivatives, contractions, products). The sum is re-checked from scratch before the ∎ is printed, and the proof is shown step by step. Worked examples include the geodesic deviation equation, the Koszul formula, conservation of TabXb for a Killing vector X, and the contracted Bianchi identity. Only the hypotheses you name are used, and when no proof is found SUCURI says so without claiming the statement is false.
  • Components in a chart: a metric can be given as a diagonal or as a line element ds². From it SUCURI computes Christoffel symbols and the Ricci and scalar curvature (Schwarzschild takes three lines) and evaluates index expressions to explicit components. It can also count independent components (20 for the Riemann tensor in 4D), check identities component by component, and linearize around a background (g = η + εh).
  • Export: any result can be exported as a plain SymPy script that runs without SUCURI.

Interface

A notebook in the browser in English and Portuguese, with numbered equations (eq1, eq2, …) and verbs such as solve, simplify, contract, evaluate and prove. Notebooks are saved as readable text files. It runs locally (pip install ., then sucuri) or entirely inside the browser via Pyodide/WebAssembly (sucuri.pages.dev/caderno), where nothing you type leaves your machine. A full manual and a tutorial exercise book are included in both languages, and the test suite runs every example in the manual.

Python ≥ 3.10 · MIT license.

Files

RafaelCRdeLima/SUCURI-v0.1.0.zip

Files (2.1 MB)

Name Size Download all
md5:014c00cf320d7adb2b62172dd9676344
2.1 MB Preview Download

Additional details

Related works