(*************************************************************************)
(** ** Progress *)
(*************************************************************************)
(** *** Exercise [progress]  Complete the proof of the progress lemma.  The induction hypothesis has already been appropriately generalized by the given proof fragment.  Proof sketch: By induction on the typing derivation for [e].  - [typing_var] case: Can't happen; the empty context doesn't bind anything.  - [typing_abs] case: Abstractions are values.  - [typing_app] case: Applications reduce.  The result follows from an exhaustive case analysis on whether the two components of the application step or are values and the fact that a value must be an abstraction. *)
(* HINTS:  - Use [auto] and [eauto], especially with [;], to solve "uninteresting" subgoals.  - Use [inversion] to rule out impossible cases.  - The lemma [typing_to_lc] will be useful for reasoning about local closure.  - In the [typing_app] case:  -- Use [destruct] to perform a case analysis on the conclusions of the induction hypotheses.  -- Use [inversion] on a [value] judgement to determine that the value must be an abstraction. *)

Lemma progress : forall e T,
typing nil e T ->
is_value e \/ exists e', step e e'.