fact: Definition mkPlus r1 r2 := nosimpl match r1,r2 with | CVoid, _ => r2 | _, CVoid => r1 | CPlus l1, CPlus l2 => match undup (merge' (sort' l1) (sort' l2)) with | [::] => CVoid | [:: r] => r | rs => CPlus rs end | CPlus l1, _ => match undup (merge' (sort' l1) [::r2]) with | [::] => CVoid | [:: r] => r | rs => CPlus rs end | _, CPlus l2 => match undup (merge' [:: r1] (sort' l2)) with | [::] => CVoid | [:: r] => r | rs => CPlus rs end | _,_ => match compare r1 r2 with | Lt => CPlus [:: r1; r2] | Eq => r1 | Gt => CPlus [:: r2; r1] end end.
imports: Coq(RelationClasses Setoid Morphisms) HB(structures) mathcomp(ssreflect ssrfun ssrbool eqtype ssrnat seq fintype) mathcomp(bigop path) RegLang(languages) RegexpBrzozowski(glue regexp finite_der equiv)