Module M.
Function test_m (n:nat) : nat :=
match n with
| 0 => 0
| S n =>  S (S (test_m n))
end.
End M.
(* We redefine a new Function with the same name *)
Function test_m (n:nat) : nat :=
pred n.
intro n.
(* here we should apply M.test_m_ind *)
functional induction (M.test_m n).
reflexivity.
simpl;rewrite IHn0;reflexivity.
Qed.
(* Now test_m is the one which defines double *)

Lemma test_m_is_double : forall n, div2 (M.test_m n) = n.