It was not necessary to use any external libraries. I did not know about this Z3 and managed to solve it with linear algebra [1]. It was not the first time I had to implement a linear system solver to solve and Advent of Code problem [2]. Rather than specific tools it required specific knowledge, but that was not unique to this problem.
[1] https://git.tronto.net/aoc/tree/2025/10/b.py
[2] https://git.tronto.net/aoc/tree/2023/24/24b.c