(* Inductive Set nat : O:nat | S:nat->nat. *)

Fixpoint egal_nat (n : nat) : nat -> bool :=
  fun m : nat =>
  match n, m with
  | O, O => true
  | S n, S m => egal_nat n m
  | _, _ => false
  end.Fixpoint inf_egal (n : nat) : nat -> bool :=
  fun m : nat =>
  match n, m with
  | O, m => true
  | S n, O => false
  | S n, S m => inf_egal n m
  end.

(* Specifications: *)
Lemma inf_egal_eq1 : forall m : nat, inf_egal 0 m = true.
Lemma inf_egal_eq2 : forall n : nat, inf_egal (S n) 0 = false.
Lemma inf_egal_eq3 : forall n m : nat, inf_egal (S n) (S m) = inf_egal n m.