fact: Fixpoint gram_flip_rec (n : nat) (w : chromogram) {struct w} : chromogram := match w, n with | Gpush :: w', _ => Gpush :: gram_flip_rec n.+1 w' | Gskip :: w', _ => Gskip :: gram_flip_rec n w' | s :: w', n.+1 => s :: gram_flip_rec n w' | Gpop0 :: w', 0 => Gpush :: gram_neg w' | Gpop1 :: w', 0 => Gpush :: w' | [::], _ => Gpush :: w end.
imports: mathcomp(ssreflect ssrfun ssrbool eqtype ssrnat seq choice) mathcomp(fintype path fingraph) fourcolor(hypermap walkup jordan geometry color chromogram) fourcolor(coloring)