💎 Reusable layer
← all 82R0082

Ihara trace generating function

showcase

Use this theorem

  1. Create a project

    Shell
    lake +leanprover/lean4:v4.35.0 new myproject std.toml
    cd myproject

    Standard template, not math: the math template adds its own Mathlib requirement pinned to the Lean release tag, not to the Mathlib commit this package is built and tested with, so you would get a second, different Mathlib. Mathlib comes in through this package. Skip this step in an existing project with the same Lean and Mathlib.

  2. Add the dependency to lakefile.toml

    TOML
    [[require]]
    name = "formalizations"
    git = "https://github.com/karlesmarin/formalizations"
    rev = "v0.15.0"
  3. Import the minimal module

    Lean 4
    import Formalizations.Reusable.Combinatorics

    In a file of the project, e.g. Example.lean.

  4. Paste the example

    Lean 4
    open Formalizations.Reusable Filter Topology Classical
    
    /-- `ihara_Nk_explicit` gives the positive Hashimoto traces by coefficient extraction over `ℚ`. -/
    example {V : Type*} [Fintype V] [DecidableEq V] [LinearOrder V]
        (G : SimpleGraph V) [DecidableRel G.Adj] (k : ℕ) :
        let X : Polynomial ℚ := Polynomial.X
        let vertexFactor : PowerSeries ℚ := ((1 - X ^ 2) ^ Fintype.card V : Polynomial ℚ)
        let edgeFactor : PowerSeries ℚ := ((1 - X ^ 2) ^ G.edgeFinset.card : Polynomial ℚ)
        let hashimotoDet : PowerSeries ℚ := (1 - X • (G.hashimoto ℚ).map Polynomial.C).det
        let bassDet : PowerSeries ℚ := (1 - X • (G.adjMatrix ℚ).map Polynomial.C
          + X ^ 2 • ((G.degMatrix ℚ - 1).map Polynomial.C)).det
        (G.hashimoto ℚ ^ (k + 1)).trace = PowerSeries.coeff k
          (PowerSeries.invOfUnit (vertexFactor * hashimotoDet) 1 *
            (hashimotoDet * PowerSeries.derivative vertexFactor - edgeFactor * PowerSeries.derivative bassDet -
              bassDet * PowerSeries.derivative edgeFactor)) := by
      simpa only [PowerSeries.coeff_mk] using congrArg (PowerSeries.coeff k) (ihara_Nk_explicit G ℚ)

    Steps 3 and 4 together are a complete Lean file:FormalizationsTest/ReusableCombinatoricsExample.lean at v0.15.0, compiled by the CI.

  5. Fetch and check

    Shell
    lake update
    lake lean Example.lean

    lake update fetches this package and Mathlib, and Mathlib's update hook downloads the compiled Mathlib (lake exe cache get). lake lean Example.lean builds the imports of the file (steps 3 and 4) and checks it. If the file belongs to a lean_lib of your project, lake build <lib> does the same. Avoid a bare lake build in a project from the standard template: its default target is the executable, whose link compiles every imported Mathlib module to native code. Same versions required: Lean v4.35.0, Mathlib f0b4c81.

Alternative: import Formalizations.Reusable imports the whole layer (all areas).

The series with coefficient tr(B^(k+1)) at X^k for the Hashimoto matrix B is given by differentiating Bass’s determinant identity and inverting its unit factor.

Lean statement

Lean 4
theorem ihara_Nk_explicit {V : Type*} [Fintype V] [DecidableEq V] [LinearOrder V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (R : Type*) [Field R] [Infinite R] :
    let X : Polynomial R := Polynomial.X
    let vertexFactor : PowerSeries R := ((1 - X ^ 2) ^ Fintype.card V : Polynomial R)
    let edgeFactor : PowerSeries R := ((1 - X ^ 2) ^ G.edgeFinset.card : Polynomial R)
    let hashimotoDet : PowerSeries R := (1 - X • (G.hashimoto R).map Polynomial.C).det
    let bassDet : PowerSeries R := (1 - X • (G.adjMatrix R).map Polynomial.C
      + X ^ 2 • ((G.degMatrix R - 1).map Polynomial.C)).det
    PowerSeries.mk (fun k => (G.hashimoto R ^ (k + 1)).trace) =
      PowerSeries.invOfUnit (vertexFactor * hashimotoDet) 1 *
        (hashimotoDet * PowerSeries.derivative vertexFactor - edgeFactor * PowerSeries.derivative bassDet -
          bassDet * PowerSeries.derivative edgeFactor)
Name
Formalizations.Reusable.ihara_Nk_explicit
Import
import Formalizations.Reusable.Combinatorics
Version
formalizations 0.15.0Lean v4.35.0Mathlib f0b4c81
Role
showcase a classical theorem, to consult
Provenance
SimpleGraph.ihara_Nk_explicit in Formalizations.Combinatorics.SimpleGraph.Ihara.TraceFormula
Paper: none
Classical reference
H. Bass, The Ihara–Selberg zeta function of a tree lattice, Internat. J. Math. 3 (1992) 717–797
Trust
standard axioms only propext, Classical.choice, Quot.sound
#print axioms in FormalizationsTest/Axioms.lean, audited by scripts/check_axioms.sh (2758 results), which the CI build workflow runs and passed at this commit.
Status
reusable not an upstream candidate
Area
Combinatorics

Links

Lean docstring

Ihara trace generating function. Let B, A and D be the Hashimoto, adjacency and degree matrices. Differentiating Bass's determinant identity gives the series whose coefficient at X^k is tr(B^(k+1)). The inverse is taken in the formal power series ring and its argument has constant coefficient 1.

  • Archive: SimpleGraph.ihara_Nk_explicit.
  • Classical reference: H. Bass, The Ihara–Selberg zeta function of a tree lattice, Internat. J. Math. 3 (1992) 717–797.
  • Example: extracting the coefficient of X^k over ℚ gives the trace at length k + 1.

Upstream

Uses the archive’s Hashimoto matrix with Mathlib’s graph matrices, determinants and formal power series.

Depends on, in this repository

Formalizations.Combinatorics.SimpleGraph.Ihara.Bass