Fixpoint lst_length (l : term_list) : nat :=
match l with
| tnil => 0
| tcons _ l' => S (lst_length l')
end.
Fixpoint term_high (t : term) : nat :=
match t with
| app a l => S (term_high_0 l)
end
with term_high_0 (l : term_list) : nat :=
match l with
| tnil => 0
| tcons hd tl => max (term_high hd) (term_high_0 tl)
end.

Lemma high_aux_1 :
forall (a : ad) (l : term_list), S (term_high_0 l) = term_high (app a l).