Goal:
  
  A : Type
  B : Type
  C : Type
  R : nat → A → C → Type
  g : A → B → C
  x : A
  xs : list A
  ih : ∀ (l' : list B) (k : nat),
         All2i (λ (i : nat) (x : A) (y : B), R i x (g x y)) k xs l'
         → All2i R k xs (map2 g xs l')
  y : B
  ys : list B
  k : nat
  z : All2i (λ (i : nat) (x : A) (y : B), R i x (g x y)) k 
        (x :: xs) (y :: ys)
  ============================
   (All2i R k (x :: xs) (g x y :: map2 g xs ys))


DEBUG:Going to execute:
constructor
Level 0: Backtrace:

In environment
A : Type
B : Type
C : Type
R : nat → A → C → Type
g : A → B → C
x : A
xs : list A
ih : ∀ (l' : list B) (k : nat),
       All2i (λ (i : nat) (x : A) (y : B), R i x (g x y)) k xs l'
       → All2i R k xs (map2 g xs l')
k : nat
z : All2i (λ (i : nat) (x : A) (y : B), R i x (g x y)) k (x :: xs) []
Unable to unify "All2i ?M3017 ?M3018 (?M3019 :: ?M3021) (?M3020 :: ?M3022)"
with "All2i R k (x :: xs) []".
Level 0: Backtrace:

In environment
A : Type
B : Type
C : Type
R : nat → A → C → Type
g : A → B → C
x : A
xs : list A
ih : ∀ (l' : list B) (k : nat),
       All2i (λ (i : nat) (x : A) (y : B), R i x (g x y)) k xs l'
       → All2i R k xs (map2 g xs l')
k : nat
z : All2i (λ (i : nat) (x : A) (y : B), R i x (g x y)) k (x :: xs) []
Unable to unify "All2i ?M3017 ?M3018 (?M3019 :: ?M3021) (?M3020 :: ?M3022)"
with "All2i R k (x :: xs) []".