copilothow to find invariants site:math.stackexchange.com - Search