Fixpoint mod2 (n : nat) : bool :=
  match n with
    | 0 => false
    | 1 => true
    | S (S n') => mod2 n'
  end.Ltac rethink :=
  match goal with
    | [ H : ?f ?n = _ |- ?f ?m = _ ] => replace m with n; simpl; auto
  end.

(* Specifications: *)
Theorem mod2_S_double : forall n, mod2 (S (2 * n)) = true.
Theorem mod2_double : forall n, mod2 (2 * n) = false.
Theorem div2_double : forall n, div2 (2 * n) = n.
Theorem div2_S_double : forall n, div2 (S (2 * n)) = n.