Definition SR_fin (S: sigT (fun (sig:finType) => (prod (prod (srs sig) (list sig)) (list sig)))) :=
   match (projT2 S) with
    |(rules,x,y) => rewt' rules x y
   end.Definition conf :Type := mconfig sig (states T).Instance eq_dec_states : eq_dec (states T).Inductive rsig' : Type := hash | dollar | sigma (s: sig).Inductive rsig' : Type := hash | dollar | sigma (s: sig).Inductive rsig' : Type := hash | dollar | sigma (s: sig).Inductive rsig' : Type := hash | dollar | sigma (s: sig).Instance eq_dec_rsig' : eq_dec rsig'.Instance finType_rsig': finTypeC (EqType rsig').Inductive rsig : Type := state (q: states T) | symb (s: (FinType (EqType rsig'))).Inductive rsig : Type := state (q: states T) | symb (s: (FinType (EqType rsig'))).Inductive rsig : Type := state (q: states T) | symb (s: (FinType (EqType rsig'))).Definition sym : sig -> rsig := fun s => symb (sigma s).Notation "$" := (symb dollar).Global Instance eq_dec_rsig : eq_dec rsig.

(* Specifications: *)
Lemma state_count_one q: count (map (fun s : states T => state s) (elem (states T))) (state q) = 1.
Lemma symb_count_one s: count (map (fun s0 : FinType (EqType rsig') => symb s0) (elem (FinType (EqType rsig')))) (symb s) = 1.