arXiv Science⌕ Search

arXiv · 2611.17359

fieldsmith: Automated symbolic derivation in classical field theory and gauge theory from LaTeX input

Abstract

We present fieldsmith, an open-source Python library for the automated derivation of analytical results in classical field theory, and non-abelian gauge theories. A Lagrangian is entered the way it is written on a blackboard, in LaTeX index notation, and the library produces and verifies Euler-Lagrange equations (of arbitrary derivative order, on flat or curved backgrounds), Noether currents and identities, canonical and Hilbert energy-momentum tensors, canonical momenta and Hamiltonians, local Poisson brackets and a Dirac-Bergmann constraint analysis with degree-of-freedom counting, linearised wave equations and dispersion relations, gauge-covariant derivatives and field strengths for products of unitary groups, and mass spectra after spontaneous symmetry breaking. A fitting routine translates component-level output back into covariant index notation, and a grading module checks students' submitted field equations, identities and conserved currents. The implementation is a compact (about 2,700 lines) layer on top of SymPy: tensors are stored by components with labelled, variance-aware slots, and every statement is established by exact symbolic computation rather than pattern matching. This document is the companion guide to the library. It explains the intent and design, describes the algorithms, and then works through eighteen self-checking examples, ranging from the Klein-Gordon field to the BPST instanton and the 't Hooft-Polyakov monopole, each preceded by the background physics needed to follow it. The examples double as a compact introduction to classical field theory and gauge theory as seen through a computational lens. We are explicit about the limitations of the approach.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Nikola Mirkov. 2026-10-28. fieldsmith: Automated symbolic derivation in classical field theory and gauge theory from LaTeX input. https://arxiv.science/abs/2611.17359

Citations retain the original authors and DOI and include this site’s record URL. If this discovery service contributed to your research, you can also cite arXiv Science by Indiciae: BibTeX · RIS.

KEEP EXPLORING

Related papers

A Survey on the Use of Machine Learning within Computer Algebra

This survey explores the use of Machine Learning (ML) in the field of Computer Algebra (CA), both to optimise existing CA algorithms, and to perform symbolic computation directly. Traditional symbolic methods, while mathematically rigorous, often are computationally expensive thus limiting their use in real-world applications. Recent advances have shown that data-driven techniques can address these limitations by guiding heuristic decisions, selecting optimal algorithms, predicting structural properties of algebraic objects, or even making direct symbolic computations. We take a systematic literature review approach and uncover work in CA applications including cylindrical algebraic decomposition, Gröbner basis computation, symbolic integration, and many more. The survey compares the different ML approaches that have been employed for these tasks, ranging from decision trees to transformers. Issues uncovered by the survey include the lack of benchmark datasets for CA, which hinders the comparison of methods and the generalizability of ML models. The survey identifies the potential for explainable AI tools to help develop trust in decisions, and to drive forward CA research itself.

cs.SC↗

Symmetric compatibility of theta structures, with applications to change of level and isogenies

Let $m,n,d >1$ be integers such that $n=md$ and let $(B, \mathscr{M}, Θ\_{\mathscr{M}})$ be a marked abelian variety of level $m$ over a field of odd characteristic. We study the theta structures of level $n$ for $\mathscr{M}^d$, and the theta structures on the abelian varieties $d$-isogenous to $B$, which are compatible with $Θ\_{\mathscr{M}}$. When $d$ is odd and coprime to $m$, they correspond to the isotropic subgroups of $B[n]$, and this correspondence underlies the known algorithms in theta coordinates. In general, this is no longer true. We introduce the notion of symmetric compatibility of a torsion point with a symmetric level subgroup, and we show that a subgroup of $B[n]$ isomorphic to $(\mathbb{Z}/n\mathbb{Z})^g$ comes from a compatible theta structure if and only if it is isotropic and all its points are symmetric compatible. We extend to every $d$ Mumford's notion of compatible pairs of theta structures, defined by Mumford for $d=2$, and prove that it is equivalent to our notion, which can be tested on theta coordinates; we also describe exactly the remaining ambiguity, which explains the sign choices met when the duplication formula is used to change the level. As applications, we obtain change of level and isogeny algorithms without assuming that $d$ is odd and coprime to $m$, using $O(n^{3g} \log(d))$ and $O(n^{2g} \log(d))$ operations in the base field respectively. In particular, they give change of level algorithms for even $d$, and $2$-isogenies in level $4$ theta coordinates with an explicit control of the theta structure of the codomain.

cs.SC↗

LieDiscover: Adaptive Symbolic Library Construction for Explicit Open-form Symmetry Discovery

Discovering symmetries from observational data provides interpretable insights into dynamical systems and priors for scientific machine learning. However, existing symmetry discovery methods face two limitations. Many methods represent symmetries implicitly, making it difficult to obtain explicit infinitesimal generators that can serve as physical priors for learning dynamical systems. Meanwhile, methods that explicitly identify generators often rely on predefined function libraries, limiting their ability to capture complex symmetries involving high-order polynomials or transcendental functions. To address these limitations, we propose LieDiscover, a framework that explicitly identifies infinitesimal generators through an iterative symbolic search process that dynamically expands the symbolic function library to capture complex functional forms. Specifically, at each search step, we design an encoder-decoder architecture to generate a candidate symbolic expression. An adaptive singular value decomposition (SVD)-based evaluation is introduced to assess how each candidate contributes to the recoverable symmetry subspace. The resulting evaluations are incorporated into step-wise rewards to guide reinforcement learning toward discovering richer symmetry structures with concise symbolic representations. Experiments on eight partial differential equation (PDE) benchmarks demonstrate that LieDiscover recovers explicit generators involving higher-order polynomial, exponential, and trigonometric terms, while achieving more accurate symmetry subspace recovery and improved robustness to noise. Furthermore, the recovered generators enable effective symmetry-based data augmentation, improving the accuracy of downstream neural PDE solvers.

cs.SC↗