Goal:
  
  A : Type
  B : Type
  f : nat → A → B
  g : nat → A → B
  l : list A
  n : nat
  Hfg : ∀ (k : nat) (x : A), n ≤ k → k < #|l| + n → f k x = g k x
  ============================
   (mapi_rec f l n = mapi_rec g l n)


DEBUG:Going to execute:
induction l in n, Hfg |- *

Goals:
  
  A : Type
  B : Type
  f : nat → A → B
  g : nat → A → B
  n : nat
  Hfg : ∀ (k : nat) (x : A), n ≤ k → k < #|[]| + n → f k x = g k x
  ============================
   (mapi_rec f [] n = mapi_rec g [] n)

  
  A : Type
  B : Type
  f : nat → A → B
  g : nat → A → B
  a : A
  l : list A
  n : nat
  Hfg : ∀ (k : nat) (x : A), n ≤ k → k < #|a :: l| + n → f k x = g k x
  IHl : ∀ n : nat,
          (∀ (k : nat) (x : A), n ≤ k → k < #|l| + n → f k x = g k x)
          → mapi_rec f l n = mapi_rec g l n
  ============================
   (mapi_rec f (a :: l) n = mapi_rec g (a :: l) n)


DEBUG:Going to execute:
simpl
DEBUG LTAC Evaluated term: l

Goals:
  
  A : Type
  B : Type
  f : nat → A → B
  g : nat → A → B
  n : nat
  Hfg : ∀ (k : nat) (x : A), n ≤ k → k < #|[]| + n → f k x = g k x
  ============================
   ([] = [])

  
  A : Type
  B : Type
  f : nat → A → B
  g : nat → A → B
  a : A
  l : list A
  n : nat
  Hfg : ∀ (k : nat) (x : A), n ≤ k → k < #|a :: l| + n → f k x = g k x
  IHl : ∀ n : nat,
          (∀ (k : nat) (x : A), n ≤ k → k < #|l| + n → f k x = g k x)
          → mapi_rec f l n = mapi_rec g l n
  ============================
   (f n a :: mapi_rec f l (S n) = g n a :: mapi_rec g l (S n))


DEBUG:Going to execute:
try congruence