Documentation

Formalizations.Combinatorics.SimpleGraph.OrientedIncMatrix

Oriented incidence matrix #

This file defines the oriented incidence matrix G.orientedIncMatrix R of a simple graph G over a linearly ordered vertex type, and proves the Gram factorization

G.orientedIncMatrix R * (G.orientedIncMatrix R)ᵀ = G.lapMatrix R,

the standard factorization of the graph Laplacian D - A. This complements the unoriented G.incMatrix R, whose Gram matrix is the signless Laplacian D + A (incMatrix_mul_transpose_diag ff.): the signs are what produce the Laplacian.

Main definitions #

Main results #

Implementation notes #

The orientation (each edge points from its smaller to its larger endpoint) is induced by the linear order on the vertex type. Any orientation yields the same Gram matrix, since each edge contributes (±1)² to a diagonal entry and (+1) * (-1) to an off-diagonal one.

def SimpleGraph.orientedIncMatrix (R : Type u_1) {α : Type u_2} (G : SimpleGraph α) [Zero R] [One R] [Neg R] [LinearOrder α] [DecidableRel G.Adj] :
Matrix α (Sym2 α) R

The oriented incidence matrix: for an edge e incident to v, the entry is +1 if v is the larger endpoint of e and -1 if it is the smaller one; entries vanish off the incidence set.

Equations
Instances For
    theorem SimpleGraph.orientedIncMatrix_apply {R : Type u_1} {α : Type u_2} (G : SimpleGraph α) [Ring R] [LinearOrder α] [DecidableRel G.Adj] {v : α} {e : Sym2 α} :
    theorem SimpleGraph.orientedIncMatrix_of_notMem_incidenceSet {R : Type u_1} {α : Type u_2} (G : SimpleGraph α) [Ring R] [LinearOrder α] [DecidableRel G.Adj] {v : α} {e : Sym2 α} (h : e ∉ G.incidenceSet v) :
    theorem SimpleGraph.orientedIncMatrix_mul_self {R : Type u_1} {α : Type u_2} (G : SimpleGraph α) [Ring R] [LinearOrder α] [DecidableRel G.Adj] {v : α} {e : Sym2 α} :

    On its incidence set the oriented entry squares to 1, so the square of any entry is the corresponding unoriented incidence entry.

    theorem SimpleGraph.orientedIncMatrix_apply_mul_apply_of_adj {R : Type u_1} {α : Type u_2} (G : SimpleGraph α) [Ring R] [LinearOrder α] [DecidableRel G.Adj] {u w : α} (hadj : G.Adj u w) :

    The two endpoints of an edge carry opposite signs: the product of the oriented entries of u ≠ w at their common edge s(u, w) is -1.

    theorem SimpleGraph.orientedIncMatrix_apply_add_apply_of_adj {R : Type u_1} {α : Type u_2} (G : SimpleGraph α) [Ring R] [LinearOrder α] [DecidableRel G.Adj] {u w : α} (hadj : G.Adj u w) :

    The two endpoints of an edge carry cancelling signs: the column of an edge sums to zero over its two endpoints.

    theorem SimpleGraph.orientedIncMatrix_apply_mul_apply_of_ne {R : Type u_1} {α : Type u_2} (G : SimpleGraph α) [Ring R] [LinearOrder α] [DecidableRel G.Adj] {u w : α} {e : Sym2 α} (hne : u ≠ w) (he : e ≠ s(u, w)) :

    Distinct vertices see disjoint signed columns away from their common edge: the product of oriented entries vanishes at every e ≠ s(u, w).

    Laplacian factorization. The Gram matrix of the oriented incidence matrix is the graph Laplacian: N * Nᵀ = D - A. (The unoriented incidence matrix gives D + A instead; the signs are what make the Laplacian.)