Goal:
  
  A : Type
  B : Type
  f : nat → A → B
  x : A
  l : list A
  IHl : ∀ n k : nat,
          k ≤ n
          → List.rev (mapi_rec f l (n - k)) =
            mapi_rec (λ (k0 : nat) (x : A), f (Nat.pred #|l| + n - k0) x)
              (List.rev l) k
  n : nat
  k : nat
  H : k ≤ n
  ============================
   (List.rev (mapi_rec f [x] (#|l| + (n - k))) ++
    List.rev (mapi_rec f l (n - k)) =
    f (Nat.pred #|l ++ [x]| + n - k) x
    :: mapi_rec (λ (k : nat) (x0 : A), f (Nat.pred #|l ++ [x]| + n - k) x0)
         (List.rev l) (S k))


DEBUG:Going to execute:
simpl
DEBUG LTAC Evaluated term: mapi_rec_app
DEBUG LTAC Evaluated term: mapi_rec_app
DEBUG LTAC Evaluated term: rev_app_distr
DEBUG LTAC Evaluated term: rev_app_distr