Goal:
  
  G : t
  c : nat
  IH : forall m : nat,
       (m < c)%nat ->
       forall s : VSet.t,
       VSet.cardinal s = m ->
       forall (x y : V.t) (n : Z),
       lsp0 s x y = Some n -> exists p : SPath s x y, sweight p = n
  s : VSet.t
  e : VSet.cardinal s = c
  x : V.t
  y : V.t
  n : Z
  H : (if VSet.mem x s
       then
        fold_left max
          (map (fun '(n, y0) => (Some n + lsp0 (VSet.remove x s) y0 y)%nbar)
             (succs x)) (if is_left (V.eq_dec x y) then Some 0 else None)
       else if is_left (V.eq_dec x y) then Some 0 else None) = 
      Some n
  ============================
   (VSet.mem x s = false -> exists p : SPath s x y, sweight p = n)


DEBUG:Going to execute:
<coq-core.plugins.ltac::intro@1> $1

Goals:
  
  G : t
  c : nat
  IH : forall m : nat,
       (m < c)%nat ->
       forall s : VSet.t,
       VSet.cardinal s = m ->
       forall (x y : V.t) (n : Z),
       lsp0 s x y = Some n -> exists p : SPath s x y, sweight p = n
  s : VSet.t
  e : VSet.cardinal s = c
  x : V.t
  y : V.t
  n : Z
  H : (if VSet.mem x s
       then
        fold_left max
          (map (fun '(n, y0) => (Some n + lsp0 (VSet.remove x s) y0 y)%nbar)
             (succs x)) (if is_left (V.eq_dec x y) then Some 0 else None)
       else if is_left (V.eq_dec x y) then Some 0 else None) = 
      Some n
  Hx : VSet.mem x s = true
  ============================
   (exists p : SPath s x y, sweight p = n)

  
  G : t
  c : nat
  IH : forall m : nat,
       (m < c)%nat ->
       forall s : VSet.t,
       VSet.cardinal s = m ->
       forall (x y : V.t) (n : Z),
       lsp0 s x y = Some n -> exists p : SPath s x y, sweight p = n
  s : VSet.t
  e : VSet.cardinal s = c
  x : V.t
  y : V.t
  n : Z
  H : (if VSet.mem x s
       then
        fold_left max
          (map (fun '(n, y0) => (Some n + lsp0 (VSet.remove x s) y0 y)%nbar)
             (succs x)) (if is_left (V.eq_dec x y) then Some 0 else None)
       else if is_left (V.eq_dec x y) then Some 0 else None) = 
      Some n
  Hx : VSet.mem x s = false
  ============================
   (exists p : SPath s x y, sweight p = n)


DEBUG:Going to execute:
rewrite Hx in   H