FLINT3.7.0-dev

bool_mat_is_nilpotent

Synopsis#include <flint/bool_mat.h>
int bool_mat_is_nilpotent(const bool_mat_t A)source

Returns 1 if some power A^k with k \ge 1 is zero, that is, if the graph of A has no cycles (including loops A_{ii} = 1), and 0 otherwise. Uses a depth-first search for cycles, in O(n^2) operations. Throws an exception if A is not square. For an empty matrix it returns 0.

Cite this page

The FLINT team, “bool_mat_is_nilpotent (bool_mat.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/bool_mat/bool_mat_is_nilpotent.html (generated 2026-10-20).