Goal:
  
  A : Type
  B : Type
  P : list A → list A → A → A → B → Type
  a : B
  ls1 : list B
  IH : ∀ ls2 ls3 : list A,
         All
           (λ z : B,
              All2_fold (λ (l1 l2 : list A) (x y : A), P l1 l2 x y z) ls2 ls3)
           ls1
         → (ls1 = []) +
           All2_fold (λ (l1 l2 : list A) (x y : A), All (P l1 l2 x y) ls1)
             ls2 ls3
  a0 : A
  ls2 : list A
  a1 : A
  ls3 : list A
  X0 : All2_fold (λ (l1 l2 : list A) (x y : A), P l1 l2 x y a) 
         (a0 :: ls2) (a1 :: ls3)
  X1 : All
         (λ z : B,
            All2_fold (λ (l1 l2 : list A) (x y : A), P l1 l2 x y z)
              (a0 :: ls2) (a1 :: ls3)) ls1
  ============================
   ((a :: ls1 = []) +
    All2_fold (λ (l1 l2 : list A) (x y : A), All (P l1 l2 x y) (a :: ls1))
      (a0 :: ls2) (a1 :: ls3))%type


DEBUG:Going to execute:
let is_ctor_list x :=
            lazymatch x with
            | [] => idtac
            | _ :: _ => idtac
            end
           in
           match goal with
           | H:All2 _ ?x ?y
             |- _ =>
                 (first [ is_ctor_list x | is_ctor_list y ]); inversion H;
                  clear H
           | H:All2_fold _ ?x ?y
             |- _ =>
                 (first [ is_ctor_list x | is_ctor_list y ]); inversion H;
                  clear H
           | H:All _ ?x |- _ => is_ctor_list x; inversion H; clear H
           | |- (_ :: _ = []) + _ => right
           | |- (?x = ?x) + _ => left
           end
Level 0: Backtrace:

Failed to progress.
Level 0: Backtrace:

Failed to progress.
Level 0: Backtrace:

Failed to progress.