fact: Definition rewrite (t : string) (d : data) : option string := let (p,a) := d in let (l,r) := a in if mem (@beq_rule Sig) (mkRule l r) R then match split t p with | None => None | Some (u,v) => match matches l v with | None => None | Some w => Some (u ++ r ++ w) end end else None.
imports: Coq(Euclid Wf_nat) CoLoR(LogicUtil Srs ListUtil EqUtil RelUtil ListDec NatUtil)