💎 Reusable layer
← all 82R0036

Bass's determinant formula over any commutative ring

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
    
    /-- Bass's formula over `ℤ` at `u = 2`. -/
    example {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] :
        (1 - (2 : ℤ) ^ 2) ^ (Fintype.card V) * (1 - (2 : ℤ) • G.hashimoto ℤ).det
          = (1 - (2 : ℤ) ^ 2) ^ G.edgeFinset.card
            * (1 - (2 : ℤ) • G.adjMatrix ℤ + (2 : ℤ) ^ 2 • (G.degMatrix ℤ - 1)).det :=
      bass_determinant_commRing G ℤ 2

    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).

Bass's determinant formula over any commutative ring: (1-u²)^|V| det(1-uB) = (1-u²)^|E| det(1-uA+u²(D-1)) with B the Hashimoto matrix.

Lean statement

Lean 4
theorem bass_determinant_commRing {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V)
    [DecidableRel G.Adj] (R : Type*) [CommRing R] (u : R) :
    (1 - u ^ 2) ^ (Fintype.card V) * (1 - u • G.hashimoto R).det
      = (1 - u ^ 2) ^ G.edgeFinset.card
        * (1 - u • G.adjMatrix R + u ^ 2 • (G.degMatrix R - 1)).det
Name
Formalizations.Reusable.bass_determinant_commRing
Import
import Formalizations.Reusable.Combinatorics
Version
formalizations 0.15.0Lean v4.35.0Mathlib f0b4c81
Role
showcase a classical theorem, to consult
Provenance
SimpleGraph.bass_determinant_commRing in Formalizations.Combinatorics.SimpleGraph.Ihara.BassCommRing
Paper: none
Classical reference
H. Bass, The Ihara-Selberg zeta function of a tree lattice, Internat. J. Math. 3 (1992)
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

Bass's determinant formula over any commutative ring. For a finite simple graph with Hashimoto (non-backtracking) matrix B, adjacency matrix A and degree matrix D, (1 - u²)^|V| · det (1 - u B) = (1 - u²)^|E| · det (1 - u A + u² (D - 1)) for every u in any commutative ring: the Ihara zeta function in determinant form, with no field and no vertex order.

  • Archive: SimpleGraph.bass_determinant_commRing (Formalizations.Combinatorics.SimpleGraph.Ihara.BassCommRing, from the field case bass_charpolyRev); the module cites no paper DOI of ours.
  • Classical reference: H. Bass, The Ihara–Selberg zeta function of a tree lattice, Internat. J. Math. 3 (1992) 717–797.
  • Example: u = 0 gives 1 = 1.

Upstream

needs the Hashimoto matrix, not in Mathlib

Depends on, in this repository

None besides the archive module (repo_dependencies = []).