let simple_intersect (l1 : lang) (l2 : lang) : lang = match l1, l2 with
| Unrestricted, Unrestricted -> Unrestricted
| Machine m, Unrestricted
| Unrestricted, Machine m -> Machine (Nfa.copy_nfa m)
| Machine m1, Machine m2 -> Machine (Nfa.simple_intersect m1 m2)
| _ -> raise (IllegalLangOp "simple_intersect")