Module Leftmost.
(* ** Leftmost reduction *)
Reserved Notation "s '≻lm' t" (at level 50).
Inductive step_lm : term -> term -> Prop :=
| step_lmApp  s t     : app (lam s) (lam t) ≻lm subst s 0 (lam t)
| step_lmAppR s t  t' : t ≻lm t' -> app (lam s) t ≻lm app (lam s) t'
| step_lmAppL s s' t  : s ≻lm s' -> app s t ≻lm app s' t
where "s '≻lm' t" := (step_lm s t).
Hint Constructors step_lm : core.

Lemma step_lm_functional :
functional step_lm.