Skip to content

@enumeratio/modular ​

The modular group PSL(2,Z)\mathrm{PSL}(2,\mathbb{Z}) for compute-engine: S/T and L/R words, continued fractions, the Stern–Brocot tree, hyperbolic conjugacy classes as necklaces, and the Rademacher symbol. The group is a free product Z/2∗Z/3\mathbb{Z}/2 * \mathbb{Z}/3, so every element is a word and questions about the group become questions about words — the same combinatorics this catalogue already counts elsewhere. See the guide for the construction and the payoff: a conjugacy class as a knotted orbit, linked to the trefoil by a number you read off the word.

Declaring ​

ts
import { ComputeEngine } from "@cortex-js/compute-engine";
import { declareModular } from "@enumeratio/modular";

const ce = new ComputeEngine();
declareModular(ce);

Heads ​

Usage ​

ContinuedFraction(355/113)          // [3, 7, 16] — pi's famous convergent
SternBrocotPath(5, 3)               // "RLR"
RademacherSymbol("LRRRR")           // 3 — four rights, one left
DedekindSum(4, 3)                   // 1/18
RademacherPhi(ModularMatrix(1, 7, 0, 1))   // 7 — Phi on T^n just counts

Next ​

@enumeratio/braid builds its Lorenz braids directly on the S/T words here; the guide's linking-number payoff is the bridge between the two packages.

Pages ​