fact: Fixpoint has_match bs (ct : spec_ctree) (w : chromogram) {struct w} := let sct e et := ct (e :: et) in match w with | [::] => ct [::] | Gpush :: w' => has_match (Bpush0 bs) (sct Color2) w' || has_match (Bpush1 bs) (sct Color3) w' | Gskip :: w' => has_match bs (sct Color1) w' | Gpop0 :: w' => match bs with | Bpush0 bs' => has_match bs' (sct Color2) w' | Bpush1 bs' => has_match bs' (sct Color3) w' | _ => false end | Gpop1 :: w' => match bs with | Bpush0 bs' => has_match bs' (sct Color3) w' | Bpush1 bs' => has_match bs' (sct Color2) w' | _ => false end end.
imports: mathcomp(ssreflect ssrfun ssrbool eqtype ssrnat seq) fourcolor(color chromogram)