Pith. sign in

REVIEW 3 major objections 3 minor 1 cited by

PyRigi -- a general-purpose Python package for the rigidity and flexibility of bar-and-joint frameworks

T0 review · 3 major / 3 minor · reviewed 2026-08-07 · deepseek-v4-flash

Pith's one-line read PyRigi is an open-source Python package that decides whether a bar-and-joint framework is rigid, globally rigid, or redundantly rigid in the plane, and computes flexes, stresses, and motions.

desk verdict A useful, well-documented rigidity software package that merits peer review, but the paper must document the randomized methods' failure-probability conversion and fix a small misstatement of the Jackson–Jordán theorem. read the letter →

arxiv 2505.22652 v2 pith:S5OFLCIQ submitted 2025-05-28 math.MG cs.CGcs.SCmath.CO

classification math.MGcs.CGcs.SCmath.CO MSC 52C25
keywords rigiditytheorybar-and-jointframeworksgenericglobalredundantinfinitesimalflexesNAC-coloringsPythonpackage
verification ladder T0 review T1 audit T2 compute T3 formal

The pith

A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.

The reading

This paper introduces PyRigi, an open-source Python package for the rigidity and flexibility of bar-and-joint frameworks. Its central claim is that PyRigi can decide, for any graph, whether a generic planar framework has finitely many embeddings up to isometries given edge lengths, whether the embedding is unique, and whether these properties survive the removal of any edge. The package implements algorithms from the literature for generic, global, and redundant rigidity, along with tools for infinitesimal flexes, equilibrium stresses, NAC-colorings, and numerical approximation of motions. The authors argue that the software is reliable, well documented, and ready for everyday use by researchers who want to replace hand computation with a general-purpose tool.

What carries the argument

The central object is the rigidity matrix, the Jacobian of the edge-length equations, whose kernel gives infinitesimal flexes and whose cokernel gives equilibrium stresses. The argument for reliability rests on three kinds of machinery: exact symbolic or integer linear algebra over this matrix; combinatorial criteria such as (2,3)-tightness—$|E|=2|V|-3$ with every nonempty subgraph on $n'$ vertices spanning at most $2n'-3$ edges—checked by the pebble game algorithm; and randomized generic-position checks for generic and global rigidity that never report false positives and take a user-specified false-negative bound. A distinctive mechanism of the paper is the tight coupling of each method's docstring to a precise mathematical statement, so the user knows exactly which theorem is being invoked.

What would settle it

Run the randomized generic-rigidity check many times on a graph known to be generically rigid in the plane (for example, the complete graph on four vertices) with a false-negative bound of $10^{-9}$; if any run returns False, the probability guarantee is broken. A stronger test compares randomized results with the deterministic (2,3)-tightness criterion on all graphs up to, say, eight vertices and checks that disagreements occur no more often than the requested bound.

Watch

Extended reading notes

Core claim

The paper's contribution is a working computational platform that unifies many rigidity notions in one place. On a graph, PyRigi can test generic d-rigidity, minimal rigidity, redundant and vertex-redundant rigidity, global rigidity, and weak global linkedness of vertex pairs; on a framework, it can test infinitesimal rigidity, prestress stability, and second-order rigidity, and can return bases of infinitesimal flexes and equilibrium stresses. The underlying algorithms combine exact symbolic linear algebra with randomized methods that, when used for generic and global rigidity, never give false positives and accept a user-supplied upper bound on the probability of a false negative. The package also provides graph transformations (coning, k-extensions), pebble-game sparsity checks, rigid-component decomposition, counting of complex realizations of minimally rigid graphs, and methods to compute and animate parametrized or numerically approximated motions. The claim is that this collection of features is both broad enough and reliable enough to serve as a general-purpose tool for the working mathematician.

Load-bearing premise

The randomized algorithms assume that the requested false-negative probability is correctly translated into a safe range for the randomly chosen coordinates, and that the random generator and exact integer arithmetic behave as expected; if this translation is wrong, the software could silently call a rigid graph flexible.

Editorial extensions

If this is right

  • A researcher can now check generic, global, and redundant rigidity of a graph in one environment, with deterministic or randomized backends, instead of writing custom codes.
  • The package turns rigidity certificates into visible objects: infinitesimal flexes and equilibrium stresses are computed and plotted, and flexible frameworks can be animated along numeric or parametric motions.
  • Pebble-game routines make (k,l)-sparsity and tightness checks available as building blocks for new rigidity results.
  • Counting complex realizations of a minimally rigid graph is exposed through a wrapper around an existing library, extending the package's reach to algebraic rigidity questions.

Reading between the lines

Editorial extensions of the paper, not claims the author makes directly.

  • The undocumented mapping from a requested false-negative probability to a coordinate range is the most likely failure point; a quick empirical stress test against the deterministic 2D criterion would settle whether the claimed bound is actually honored.
  • Because the package exposes documented definitions for each method, it could serve as a teaching platform for rigidity theory, letting students test conjectures on small graphs before proving them.
  • The same architecture could absorb future notions—gain graphs, symmetric frameworks, line-constrained frameworks—and the maintainers explicitly list these as future work; extending the randomized backend to modular arithmetic, as the paper notes, would probably speed up large instances.
Share X Bluesky LinkedIn Reddit HN

Editorial analysis

A structured set of objections, weighed in public.

Desk editor's note, referee report, and a circularity audit.

Referee Report

3 major / 3 minor

Summary. The paper presents PyRigi, an open-source Python package for the rigidity and flexibility of bar-and-joint frameworks. It describes the package's design around three classes (Graph, Framework, Motion) and surveys the implemented functionality: generic, infinitesimal, redundant, and global rigidity checks; (k,l)-sparsity via pebble-game algorithms; rigidity-matroid operations; NAC-colorings; drawing and plotting tools; and numerical and parametric motion generation. The central claim is that PyRigi is a general-purpose, reliable, and robust computational tool that lets working mathematicians determine rigidity properties that would be infeasible by hand. The manuscript emphasizes the tight coupling between mathematical definitions/theorems and the code documentation, and it outlines the project's development infrastructure, testing levels, and planned extensions.

Significance. If the claims hold, PyRigi is a useful community resource: it unifies many algorithms from the recent literature in one open-source package, provides documented links from code to mathematical theorems, and includes databases, visualization, and motion tools. The reliance on independent external results (Laman, Pollaczek-Geiringer, Jackson-Jordán, Gortler-Healy-Thurston, Connelly-Whiteley) is a strength, and the authors are explicit about current limitations. However, the paper's stated reliability guarantees are not backed by any empirical evaluation or by a complete description of the randomized methods' probability parameters, so the practical significance is currently underevidenced.

major comments (3)
  1. [Section 3.2, 'Generic Rigidity'] The randomized method is described as never giving false positives and as allowing the user to specify an upper bound on the probability of a false negative, but the paper does not document how that bound is converted into the range of randomly chosen integer coordinates, nor how the implementation selects the range. Since this method is the only generic-rigidity option in dimensions d >= 3 and the global-rigidity check also rests on the same Gortler-Healy-Thurston algorithm, the reader cannot verify the advertised probability guarantee. Please state the conversion formula (as derived from GHT Prop 5.7) and the exact procedure used in code, or provide an empirical verification of the bound on a battery of representative graphs.
  2. [Section 3.2, 'Global Rigidity'] The statement that a graph is globally 2-rigid if and only if it is 3-connected and redundantly rigid omits the standard caveat for small complete graphs, and the version of 3-connectivity in use (minimum vertex count) is not specified. If the algorithm='redundancy' path is applied literally to a complete graph on three vertices, it could return False even though such graphs are globally rigid under the usual definitions. Please state the exact theorem with its vertex-count hypothesis and describe how PyRigi treats the exceptional small cases.
  3. [Section 4, 'Development Tools'] The paper asserts 'high test coverage' and repeatedly calls the algorithms reliable and robust, but it reports no test-results summary, no benchmarks, and no explicit validation against known graphs or frameworks. For a software paper whose central claim is practical reliability, at least one representative evaluation is needed: for example, a small table of correctness results on a suite of graphs with known rigidity/global-rigidity status, along with runtimes and any known failure modes, or a reproducible test suite with summary output. Without this, the central claim is unverified.
minor comments (3)
  1. [Section 1, Introduction] There are two typos: 'summerized' should be 'summarized' and 'taylored' should be 'tailored'.
  2. [Section 3.2, 'NAC-colorings'] The citation for the NP-completeness of the NAC-coloring existence problem points to Garamvölgyi (2022), but the title of that paper concerns global rigidity on the line; please verify the reference and correct it if a different source is intended.
  3. [Section 3.1, 'Equivalence and Congruence'] The numerical mode uses a 'predefined numeric tolerance' whose default value is not stated in the paper; please document the default tolerance and how a user-overridden tolerance affects the symbolic-versus-numerical comparison.

Circularity Check

0 steps flagged · score 0.0 of 10

No circularity: PyRigi is an implementation report whose algorithmic claims rest on independent published theorems; the GHT range-calibration gap is a reliability issue, not a circular reduction.

full rationale

PyRigi is a software-description paper rather than a derivation paper. The central claims concern available functionality, not a mathematical deduction, and no derivation chain is presented that reduces to its own inputs. Each rigidity predicate is attached to an external theorem: (2,3)-tightness for planar generic rigidity (Pollaczek-Geiringer and Laman), connectedness in dimension 1, Jackson-Jordán for global 2-rigidity, Gortler-Healy-Thurston for randomized generic and global rigidity, Jordán-Villányi for weakly globally linked pairs, and Clinch et al. for stable separating sets. None of the quoted equations or algorithms is defined in terms of the output it is claimed to produce. The authors' own prior work appears, for example FlexRiLoG, Laštovička-Legerský, and Heaton-Himmelmann, but only as provenance for implemented code; the corresponding correctness criteria are external published results, such as the NAC-coloring criterion cited to Grasegger-Legerský-Schicho (2019), which has independent mathematical content. The paper itself flags a real limitation in Section 3.2: the randomized linear algebra currently lacks the modular lifting approach recommended by GHT, and the conversion from the user-specified false-negative probability bound to the coordinate range is not documented. That is an implementation and reliability gap, not a circularity: a false negative would indicate that the implementation is incorrect or the range is miscalibrated, not that the answer was presupposed. No step reduces to its input by construction, so the circularity score is 0.

Assumptions & free parameters 0 free parameters · 5 assumptions · 0 invented entities

No free parameters are introduced and no new entities are postulated. The package's correctness rests on cited mathematical theorems and external software libraries.

assumptions (5)
  • standard math Laman/Pollaczek-Geiringer theorem: a graph is generically rigid in the plane if and only if it contains a spanning (2,3)-tight subgraph.
    Used as the default algorithm for Graph.is_rigid in dimension 2 (Section 3.2).
  • standard math Jackson-Jordán theorem: a graph is globally 2-rigid if and only if it is 3-connected and redundantly rigid.
    Implemented in is_globally_rigid(algorithm='redundancy') (Section 3.2). The usual vertex-count lower bound is not stated, which is a potential gap in documentation.
  • standard math Gortler-Healy-Thurston results: generic global rigidity is a graph property, and the randomized rank algorithm has no false positives and controllable false-negative probability.
    Basis for the randomized methods for is_rigid and is_globally_rigid (Section 3.2).
  • standard math Prestress stability and second-order rigidity imply continuous rigidity; the implemented checks use the sums of nonnegative circuits decomposition of Iliman-Wolff.
    Section 3.1, Prestress Stability and Second-Order Rigidity.
  • domain assumption External software (NetworkX, SymPy, NumPy, Matplotlib, HomotopyContinuation.jl, lnumber) behaves as documented.
    Section 4 lists these dependencies; the paper does not independently verify them.

how reviews work

0 comments
Cite this review

Pith. "Pith review of PyRigi -- a general-purpose Python package for the rigidity and flexibility of bar-and-joint frameworks." pith.science (2026). https://pith.science/paper/S5OFLCIQ

@misc{pith2026250522652,
  author       = {Pith},
  title        = {Pith review of: PyRigi -- a general-purpose Python package for the rigidity and flexibility of bar-and-joint frameworks},
  year         = {2026},
  howpublished = {\url{https://pith.science/paper/S5OFLCIQ}},
  note         = {Machine review of arXiv:2505.22652}
}
read the original abstract

We present PyRigi, a novel Python package designed to study the rigidity properties of graphs and frameworks. Among many other capabilities, PyRigi can determine whether a graph admits only finitely many ways, up to isometries, of being drawn in the plane once the edge lengths are fixed, whether it has a unique embedding, or whether it satisfied such properties even after the removal of any of its edges. By implementing algorithms from the scientific literature, PyRigi enables the exploration of rigidity properties of structures that would be out of reach for computations by hand. With reliable and robust algorithms, as well as clear, well-documented methods that are closely connected to the underlying mathematical definitions and results, PyRigi aims to be a practical and powerful general-purpose tool for the working mathematician interested in rigidity theory. PyRigi is open source and easy to use, and awaits researchers to benefit from its computational potential.

Discussion (0). Sign in to comment.

Forward citations

Cited by 1 Pith paper

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score. Full citation record

  1. 5-regular graphs and the 3-dimensional rigidity matroid

    math.CO 2025-06 conditional novelty 7.0 of 10

    Every 5-regular graph satisfying Maxwell's edge-count condition on all subgraphs is independent in the 3-dimensional rigidity matroid.

Reference graph

Works this paper leans on

8 extracted references · 4 canonical work pages · cited by 1 Pith paper

  1. [1]

    Generalizations of Kempe’s Universality Theorem

    Abbott, Timothy G. (2008). “Generalizations of Kempe’s Universality Theorem”. Mas- ter’s Thesis. Massachusetts Institute of Technology.url: http://hdl.handle.net/1721 .1/44375. Anand, Ritwik (2024).Minimally Rigid Graphs and their Circle Packings. GitHub: htt ps://github.com/Titwik/Dissertation. Barker, Michelle et al. (2022). “Introducing the FAIR Princi...

  2. [6]

    ArrayprogrammingwithNumPy

    Harris,CharlesR.etal.(2020).“ArrayprogrammingwithNumPy”.In: Nature585.7825, pp. 357–362. doi: 10.1038/s41586-020-2649-2. Heaton, Alexander and Matthias Himmelmann (2025). “Computing Euclidean distance and maximum likelihood retraction maps for constrained optimization”. In:Compu- tational Geometry126, p. 102147.doi: 10.1016/j.comgeo.2024.102147. Hermans, ...

  3. [17]

    Generating Isostatic Frameworks

    Tay, Tiong-Seng and Walter Whiteley (1985). “Generating Isostatic Frameworks”. In: Structural Topology11, pp. 21–69. HDL: 2099/1047. The PyRigi Developers (2025).PyRigi 1.1.0. Archived on Zenodo.doi: 10.5281/zenod o.15537828. Thorpe, Michael F. and Phillip M. Duxbury (2002). “Rigidity Theory and Applications”. In: Boston, MA: Springer US.doi: 10.1007/b115...

  4. [25]

    Exploring Network Structure,Dynamics,andFunctionusingNetworkX

    The Dolciani Mathematical Expositions. Washington, DC: MAA, Mathematical Association of America.doi: 10.1090/dol/025. Hagberg, Aric A., Daniel A. Schult, and Pieter J. Swart (2008). “Exploring Network Structure,Dynamics,andFunctionusingNetworkX”.In: Proceedings of the 7th Python in Science Conference. Ed. by Gaël Varoquaux, Travis Vaught, and Jarrod Millm...

  5. [34]

    Onminimallyhighlyvertex-redundantly rigid graphs

    MSJ Memoirs. The Mathematical Society of Japan, pp. 33–112.doi: 10.2969/msjmemoirs/03401c020. Kaszanitzky,ViktóriaE.andCsabaKirály(2016).“Onminimallyhighlyvertex-redundantly rigid graphs”. In:Graphs and Combinatorics32.1, pp. 225–240.doi: 10.1007/s00373- 015-1560-3. Krekel, Holger et al. (2004).pytest 8.3.5. url: https://github.com/pytest-dev/pytest. Lama...

  6. [42]

    Global rigidity of (quasi-)injective frameworks on the line

    Garamvölgyi, Dániel (2022). “Global rigidity of (quasi-)injective frameworks on the line”. In: Discrete Mathematics345.2, p. 112687.doi: 10.1016/j.disc.2021.112687. Gortler, Steven J., Alexander D. Healy, and Dylan P. Thurston (2010). “Characterizing generic global rigidity”. In:American Journal of Mathematics132.4, pp. 897–939.doi: 10.1353/ajm.0.0132. Gr...

  7. [357]

    Stable cuts, NAC-colourings and flexible realisations of graphs

    doi: 10.1007/s00200-020-00447-7. Breiding, Paul and Sascha Timme (2018). “HomotopyContinuation.jl: A Package for Ho- motopy Continuation in Julia”. In:International Congress on Mathematical Software. Springer, pp. 458–465.doi: 10.1007/978-3-319-96418-8_54. Capco, Jose (2024).lnumber: Toolkit for Computing the Laman Number. doi: 10.5281/z enodo.8301012. ur...

  8. [2020]

    Graphs with Flexible La- belings

    Vol. 12097. Lecture Notes in Computer Science. Springer International Publishing, pp. 442–450.doi: 10.1 007/978-3-030-52200-1_44. Grasegger, Georg, Jan Legerský, and Josef Schicho (2019). “Graphs with Flexible La- belings”. In:Discrete & Computational Geometry62.2, pp. 461–480.doi: 10.1007/s0 0454-018-0026-9. Graver, Jack E. (2001).Counting on frameworks....

Pith tools

Reviewed August 7, 2026 · model on record in the stance chip above.