proposition: Lemma testbit_bitwise_1 : forall op, (forall b, op false b = false) -> forall n m a b, a<=n -> testbit (bitwise op n a b) m = op (testbit a m) (testbit b m).
proof: Proof. intros op Hop. intro n; induction n as [|n IHn]; intros m a b Ha. - simpl; inversion Ha; subst. now rewrite testbit_0_l. - destruct m. + apply odd_bitwise. + unfold testbit; fold testbit; rewrite div2_bitwise. apply IHn; now apply div2_decr. Qed.
imports: NAxioms NProperties OrdersFacts DecidableClass