(* This code is copyrighted by its authors; it is distributed under  *)
(* the terms of the LGPL license (see LICENSE and description files) *)
Definition DecRel (A : Set) (R : Rel A) :=
forall x y : A, {R x y} + {~ R x y}.
(* A computational double induction rule *)

Theorem nat_double_ind_set :
forall R : nat -> nat -> Set,
(forall n : nat, R 0 n) ->
(forall n : nat, R (S n) 0) ->
(forall n m : nat, R n m -> R (S n) (S m)) -> forall n m : nat, R n m.