Fixpoint naryFunc (n : nat) : Set :=
match n with
| O => nat
| S n => nat -> naryFunc n
end.
Fixpoint naryRel (n : nat) : Set :=
match n with
| O => bool
| S n => nat -> naryRel n
end.
Definition extEqual (n : nat) (a b : naryFunc n) : Prop.
intros.
induction n as [| n Hrecn].
exact (a = b).
exact (forall c : nat, Hrecn (a c) (b c)).
Defined.

(* Specifications: *)
Lemma extEqualRefl : forall (n : nat) (a : naryFunc n), extEqual n a a.
Lemma extEqualSym :
forall (n : nat) (a b : naryFunc n), extEqual n a b -> extEqual n b a.
Lemma extEqualTrans :
forall (n : nat) (a b c : naryFunc n),
extEqual n a b -> extEqual n b c -> extEqual n a c.