fact: Fixpoint cgram d b0 (w : chromogram) {struct w} : chromogram := match w with | [::] => [:: if d is 0 then Gskip else if b0 then Gpop1 else Gpop0] | s :: w' => s :: match s with | Gpush => cgram d.+1 b0 w' | Gskip => cgram d (~~ b0) w' | Gpop0 => cgram d.-1 b0 w' | Gpop1 => cgram d.-1 (~~ b0) w' end end.
imports: HB(structures) mathcomp(ssreflect ssrfun ssrbool eqtype ssrnat seq choice) mathcomp(fintype) fourcolor(color)