Documentation

HexGraph.Sparse.Relabel

Relabel by the bijection from new vertices to old vertices. Neighbours are mapped by its inverse and sorted, without a dense adjacency matrix.

Equations
Instances For
    @[simp]
    theorem Hex.SparseGraph.adj_relabel {n : Nat} (G : SparseGraph n) (p : Perm n) (i j : Fin n) :
    (G.relabel p).adj i j = G.adj (p.get i) (p.get j)
    theorem Hex.SparseGraph.nbrs_relabel_perm {n : Nat} (G : SparseGraph n) (p : Perm n) (i : Fin n) :
    ((G.relabel p).nbrs i).toList.Perm (List.map p.inv.get (G.nbrs (p.get i)).toList)

    Row normalization changes only the order of the mapped neighbours.

    @[simp]
    theorem Hex.SparseGraph.degree_relabel {n : Nat} (G : SparseGraph n) (p : Perm n) (i : Fin n) :
    (G.relabel p).degree i = G.degree (p.get i)

    The packed storage length is the sum of the row lengths.

    @[simp]

    Relabelling preserves the allocation needed for packed adjacency.

    @[simp]
    theorem Hex.SparseGraph.relabel_relabel {n : Nat} (G : SparseGraph n) (p q : Perm n) :
    (G.relabel p).relabel q = G.relabel (p.comp q)
    @[simp]