petrial_matrix
Given a finite type V with decidable equality, a simple graph G on V with decidable adjacency, and a finite subset F : Finset V, petrial_matrix G F is the V × V matrix over ZMod 2 defined as the sum of the adjacency matrix of G (over ZMod 2) and the diagonal matrix whose (v, v) diagonal entry is 1 if v ∈ F and 0 otherwise.
Statement
noncomputable def petrial_matrix {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] (F : Finset V) : Matrix V V (ZMod 2)
- Defined in
- arXiv:2611.07503, Eq. (1)
- Verified
- 06 Nov 2026
- Axioms
- none listed
- Used by 7
- op_1239_at_most_two_nonzero_coeffs_log_concaveEvery simple graph G on a finite type V with decidable equality and decidable adjacency for which the number of k in the range from 0 to…
- petrial_coeffGiven a finite type V with decidable equality, a simple graph G on V with decidable adjacency, and k : ℕ, petrial_coeff G k is the…
- op_1239_path_graph_petrial_log_concaveFor every n : ℕ, the path graph pathGraph n has a log-concave partial Petrial polynomial (petrial_log_concave (SimpleGraph.pathGraph n)).
- petrial_matrix_rank_le_cardFor any finite simple graph G and any subset F of vertices, the rank of the petrial matrix of G and F over ZMod 2 is at most the number of…
- petrial_nullity_polyThe nullity generating polynomial of a finite graph G on V: the sum over all vertex subsets F of w raised to the nullity of the partial…
- petrial_coeff_eq_zero_of_gt_cardFor any finite simple graph G and any integer k strictly greater than the number of vertices, petrial_coeff G k equals 0.
- petrial_coeff_sumFor any simple graph G on a finite type V with decidable equality and decidable adjacency, the sum of petrial_coeff G k for k in the range…
Read back from the Lean
Definition of petrial_matrix: Given a finite type V with decidable equality, a simple graph G on V with decidable adjacency, and a finset of vertices F : Finset V, petrial_matrix G F is the V × V matrix over ZMod 2 defined as the sum of the adjacency matrix of G (over ZMod 2) and the diagonal matrix whose (v, v)-entry is 1 if v ∈ F and 0 otherwise.
Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.
Lean source view module on GitHub
/-- Diagonal perturbation of the adjacency matrix over GF(2) by a vertex subset. -/ noncomputable def petrial_matrix {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] (F : Finset V) : Matrix V V (ZMod 2) := G.adjMatrix (ZMod 2) + Matrix.diagonal (fun v => if v ∈ F then 1 else 0)