Goal:
    A : Type  d : A  i : nat  v : A  H : nth i [] d = v
  ============================
   ((nth_error [] i = Some v) + (nth_error [] i = None ∧ v = d))%type


DEBUG:Going to execute:
solve
[ do
![ solve
 [ trivial | apply : eq_sym ; trivial ]
 | discriminate
 | contradiction
 | Ltac.split ]
| case not_locked_false_eq_true; Ltac.assumption
| match goal with
  | H:¬ _ |- _ => solve [ case H; trivial ]
  end ]