← All papers
First page of Linear-Time FPT Rectilinear Planarity Testing of Series-Parallel Graphs

Linear-Time FPT Rectilinear Planarity Testing of Series-Parallel Graphs

Giacomo Ortali

cs.DS Oct 27, 2026 · v1
Key Lemma, piece-count bounds, algorithm correctness and fixed-root cost are formalized in a single sorry-free Lean 4 file using Mathlib.
A planar graph is rectilinear planar if it admits a planar orthogonal drawing without bends. For series-parallel graphs in the variable embedding setting the best known testing algorithm takes $O(n^2)$ time. We show that rectilinear planarity of a series-parallel graph with maximum degree four can be tested in $2^{O(k)}\cdot n$ time, where $k$ is the number of degree-4 vertices; the planar embedding is not fixed. In particular, the running time is subquadratic when $k=o(\log n)$. Each node of the SPQ$^*$-tree stores the set of its admissible spiralities; we show that this set is a union of $2^{O(k)}$ arithmetic progressions of step two. All proofs are in the paper and are additionally verified in Lean 4 with Mathlib.

Rectilinear planarity testing of series-parallel graphs with maximum degree four, in the variable embedding setting, had a best known bound of O(n^2) time. The quadratic cost arises because spirality sets at SPQ*-tree nodes need not be intervals.

Spirality sets are represented as unions of arithmetic progressions of step two (pieces). A Key Lemma shows that light P2-nodes with a light child do not increase the number of pieces, which gives a 36^{4k} bound on pieces per node, where k is the number of degree-4 vertices. The Key Lemma, the combinatorial bounds, algorithm correctness and the fixed-root cost model are formalized in Lean 4 with Mathlib, with SPQ*-trees as an inductive type. Some steps are not formalized: correspondence of the rules to rectilinear representations, Lemmas 4 and 5, re-rooting, and tree construction.

Rectilinear planarity is testable in 2^{O(k)}·n time, which is subquadratic when k=o(log n). The Lean file contains no sorry and uses only the standard axioms.

StatementLean
Lemma 8 (Key Lemma)KeyLemma.key_lemma
Lemma 6T1_2, T1_3
Lemma 11T4_0–T4_3, T5_0–T5_2
Lemma 13T6b
Root testT6d_1, T6d_2
Paper statements and formal theorems (excerpt)