Set Implicit Arguments.
Unset Strict Implicit.
Section Syntax.
(* AST *)
Variables variable function constructor : Type.
Variable max_arity : nat.
Inductive value : Type :=
| c_capply : constructor -> list value -> value.
Inductive term : Type :=
| var : variable -> term
| capply : constructor -> list term -> term
| fapply : function -> list term -> term.
Inductive pattern : Type :=
| p_var : variable -> pattern
| p_capply : constructor -> list pattern -> pattern.
Inductive rule : Type :=
| rule_intro : function -> list pattern -> term -> rule.
(* Smarter induction principles than the ones automatically generated *)

Lemma term_ind2 :
forall (P : term -> Prop),
(forall x, P (var x)) ->
(forall c l, (forall t, In t l -> P t) -> P (capply c l)) ->
(forall f l, (forall t, In t l -> P t) -> P (fapply f l)) ->
forall t, P t.