Build the idea in three steps
- A modular form replaced the vague word shape with something checkable: a precise demand relating the function’s values before and after a transformation.
- The library’s SlashInvariantForm carries exactly two parts: the underlying function toFun, and one demanded equation for every allowed transformation γ, written f ∣[k] γ = f.
- The symbol ∣[k] is the slash action, and the integer k inside the brackets is the weight. Holding this equality for every γ in the subgroup Γ is what invariance means here. ModularForm extends this same structure with differentiability and cusp behavior.
A small example
For a matrix with c = 0 and d = 1 — transformations of the form τ ↦ aτ + b — the weight factor (cτ + d)^{−k} is exactly 1, so the demand reduces to comparing f(aτ + b) with f(τ).