proposition: Lemma deriv_out a i e I: vars e ≦ I -> ~In i I -> deriv a i e ≡ 0.
proof: Proof. intros He Hi. induction e; simpl deriv; simpl vars in He; fold_ugregex. case eqb_spec. 2: reflexivity. intros <-. apply Hi in He as []. now left. reflexivity. rewrite union_app in He. rewrite IHe1, IHe2 by (rewrite <-He; lattice). apply cupI. rewrite union_app in He. rewrite IHe1, IHe2 by (rewrite <-He; lattice). rewrite dot0x, dotx0. apply cupI. rewrite IHe by assumption. apply dot0x. Qed.
imports: lset kat positives sums glang boolean comparisons powerfix ugregex