(*************************************************************************)
(** * Progress *)
(*************************************************************************)
(** *** Exercise  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_c] case: Can't happen; the empty environment doesn't bind anything.  - [typing_abs_c] case: Abstractions are values.  - [typing_app_c] 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_c] will be useful for reasoning about local closure.  - In the [typing_app_c] 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_c : forall e T,
typing_c nil e T ->
value_c e \/ exists e', eval_c e e'.