Ltac inv_tac :=
apply: esym (etrans _ (mul1g _)); apply: canRL (mulgK _) _;
let a := fresh "a" in apply/permP => a;
apply/eqP; rewrite permM !permE; case: a; do 4?case.

(* Specifications: *)
Lemma r1_inv : r1^-1 = r3.
Lemma F_r1 : 'Fix_to[r1] =
[set x | (coin0 x == coin1 x)&&(coin1 x == coin2 x)&&(coin2 x == coin3 x)].
Lemma F_r3 : 'Fix_to[r3] =
[set x | (coin0 x == coin1 x)&&(coin1 x == coin2 x)&&(coin2 x == coin3 x)].
Lemma card_n2 : forall x y z t : square, uniq [:: x; y; z; t] ->
#|[set p : col_squares | (p x == p y) && (p z == p t)]| = (n ^ 2)%N.
Lemma card_n :
#|[set x | (coin0 x == coin1 x)&&(coin1 x == coin2 x)&& (coin2 x == coin3 x)]|
= n.
Lemma burnside_app2 : (square_coloring_number2 * 2 = n ^ 4 + n ^ 2)%N.
Lemma burnside_app_rot :
(square_coloring_number4 * 4 = n ^ 4 + n ^ 2 + 2 * n)%N.
Lemma F_Sd1 : 'Fix_to[sd1] = [set x | coin1 x == coin3 x].
Lemma card_n3 : forall x y : square, x != y ->
#|[set k : col_squares | k x == k y]| = (n ^ 3)%N.
Lemma F_Sd2 : 'Fix_to[sd2] = [set x | coin0 x == coin2 x].
Lemma burnside_app_iso :
(square_coloring_number8 * 8 = n ^ 4 + 2 * n ^ 3 + 3 * n ^ 2 + 2 * n)%N.