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.

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