proposition: Lemma is_mask_def : forall m n, is_mask m n -> forall p, testbit m p = if Nat.eq_dec p n then true else false.
proof: Proof. unfold is_mask; intros. destruct (Nat.eq_dec p n). subst. rewrite H. reflexivity. specialize (H p). destruct (testbit m p); auto. intuition congruence. Qed.
imports: List Bool ZArith Lia