Goal:
  
  G : t
  HI : invariants G
  HG : acyclic_no_loop G
  y_0 : V.t
  x_0 : V.t
  Hxs : lsp G x_0 y_0 = None
  K : Z
  s0 : VSet.t
  s' : VSet.t
  x : V.t
  y : V.t
  z : V.t
  d : DisjointAdd x s0 s'
  e : EdgeOf G' x y
  q : SPath G' s0 y z
  IHq : sweight q =
        match from_G' q with
        | inl q' => sweight q'
        | inr (q1, q2) => sweight q1 + K + sweight q2
        end
  ============================
   (e.π1 + sweight q =
    match
      sumbool_rect
        (fun
           _ : {(y_0, K, x_0) = (x, e.π1, y)} +
               {(y_0, K, x_0) <> (x, e.π1, y)} =>
         (SPath G s' x z + (SPath G s' x y_0 × SPath G s' x_0 z))%type)
        (fun XX : (y_0, K, x_0) = (x, e.π1, y) =>
         inr
           (eq_rect_r
              (fun _pattern_value_ : V.t => SPath G s' x _pattern_value_)
              (spath_refl G s' x) (fst_eq (fst_eq XX)),
            SPath_sub G (DisjointAdd_Subset d)
              (sum_rect
                 (fun
                    _ : SPath G s0 y z +
                        (SPath G s0 y y_0 × SPath G s0 x_0 z) =>
                  SPath G s0 x_0 z)
                 (fun IHq : SPath G s0 y z =>
                  eq_rect_r
                    (fun _pattern_value_ : V.t =>
                     SPath G s0 _pattern_value_ z) IHq 
                    (snd_eq XX))
                 (fun IHq : SPath G s0 y y_0 × SPath G s0 x_0 z => IHq.2)
                 (from_G' q))))
        (fun XX : (y_0, K, x_0) <> (x, e.π1, y) =>
         sum_rect
           (fun _ : SPath G s0 y z + (SPath G s0 y y_0 × SPath G s0 x_0 z) =>
            (SPath G s' x z + (SPath G s' x y_0 × SPath G s' x_0 z))%type)
           (fun IHq : SPath G s0 y z =>
            inl
              (spath_step G s0 s' x y z d (e.π1; EdgeSetFact.add_3 XX e.π2)
                 IHq))
           (fun IHq : SPath G s0 y y_0 × SPath G s0 x_0 z =>
            inr
              (spath_step G s0 s' x y y_0 d (e.π1; EdgeSetFact.add_3 XX e.π2)
                 IHq.1, SPath_sub G (DisjointAdd_Subset d) IHq.2))
           (from_G' q)) (Edge.eq_dec (y_0, K, x_0) (x, e.π1, y))
    with
    | inl q' => sweight q'
    | inr (q1, q2) => sweight q1 + K + sweight q2
    end)


DEBUG:Going to execute:
destruct (Edge.eq_dec (y_0, K, x_0) (x, e.π1, y)) as [XX| XX]

Goals:
  
  G : t
  HI : invariants G
  HG : acyclic_no_loop G
  y_0 : V.t
  x_0 : V.t
  Hxs : lsp G x_0 y_0 = None
  K : Z
  s0 : VSet.t
  s' : VSet.t
  x : V.t
  y : V.t
  z : V.t
  d : DisjointAdd x s0 s'
  e : EdgeOf G' x y
  q : SPath G' s0 y z
  IHq : sweight q =
        match from_G' q with
        | inl q' => sweight q'
        | inr (q1, q2) => sweight q1 + K + sweight q2
        end
  XX : (y_0, K, x_0) = (x, e.π1, y)
  ============================
   (e.π1 + sweight q =
    match
      sumbool_rect
        (fun
           _ : {(y_0, K, x_0) = (x, e.π1, y)} +
               {(y_0, K, x_0) <> (x, e.π1, y)} =>
         (SPath G s' x z + (SPath G s' x y_0 × SPath G s' x_0 z))%type)
        (fun XX : (y_0, K, x_0) = (x, e.π1, y) =>
         inr
           (eq_rect_r
              (fun _pattern_value_ : V.t => SPath G s' x _pattern_value_)
              (spath_refl G s' x) (fst_eq (fst_eq XX)),
            SPath_sub G (DisjointAdd_Subset d)
              (sum_rect
                 (fun
                    _ : SPath G s0 y z +
                        (SPath G s0 y y_0 × SPath G s0 x_0 z) =>
                  SPath G s0 x_0 z)
                 (fun IHq : SPath G s0 y z =>
                  eq_rect_r
                    (fun _pattern_value_ : V.t =>
                     SPath G s0 _pattern_value_ z) IHq 
                    (snd_eq XX))
                 (fun IHq : SPath G s0 y y_0 × SPath G s0 x_0 z => IHq.2)
                 (from_G' q))))
        (fun XX : (y_0, K, x_0) <> (x, e.π1, y) =>
         sum_rect
           (fun _ : SPath G s0 y z + (SPath G s0 y y_0 × SPath G s0 x_0 z) =>
            (SPath G s' x z + (SPath G s' x y_0 × SPath G s' x_0 z))%type)
           (fun IHq : SPath G s0 y z =>
            inl
              (spath_step G s0 s' x y z d (e.π1; EdgeSetFact.add_3 XX e.π2)
                 IHq))
           (fun IHq : SPath G s0 y y_0 × SPath G s0 x_0 z =>
            inr
              (spath_step G s0 s' x y y_0 d (e.π1; EdgeSetFact.add_3 XX e.π2)
                 IHq.1, SPath_sub G (DisjointAdd_Subset d) IHq.2))
           (from_G' q)) (left XX)
    with
    | inl q' => sweight q'
    | inr (q1, q2) => sweight q1 + K + sweight q2
    end)

  
  G : t
  HI : invariants G
  HG : acyclic_no_loop G
  y_0 : V.t
  x_0 : V.t
  Hxs : lsp G x_0 y_0 = None
  K : Z
  s0 : VSet.t
  s' : VSet.t
  x : V.t
  y : V.t
  z : V.t
  d : DisjointAdd x s0 s'
  e : EdgeOf G' x y
  q : SPath G' s0 y z
  IHq : sweight q =
        match from_G' q with
        | inl q' => sweight q'
        | inr (q1, q2) => sweight q1 + K + sweight q2
        end
  XX : (y_0, K, x_0) <> (x, e.π1, y)
  ============================
   (e.π1 + sweight q =
    match
      sumbool_rect
        (fun
           _ : {(y_0, K, x_0) = (x, e.π1, y)} +
               {(y_0, K, x_0) <> (x, e.π1, y)} =>
         (SPath G s' x z + (SPath G s' x y_0 × SPath G s' x_0 z))%type)
        (fun XX : (y_0, K, x_0) = (x, e.π1, y) =>
         inr
           (eq_rect_r
              (fun _pattern_value_ : V.t => SPath G s' x _pattern_value_)
              (spath_refl G s' x) (fst_eq (fst_eq XX)),
            SPath_sub G (DisjointAdd_Subset d)
              (sum_rect
                 (fun
                    _ : SPath G s0 y z +
                        (SPath G s0 y y_0 × SPath G s0 x_0 z) =>
                  SPath G s0 x_0 z)
                 (fun IHq : SPath G s0 y z =>
                  eq_rect_r
                    (fun _pattern_value_ : V.t =>
                     SPath G s0 _pattern_value_ z) IHq 
                    (snd_eq XX))
                 (fun IHq : SPath G s0 y y_0 × SPath G s0 x_0 z => IHq.2)
                 (from_G' q))))
        (fun XX : (y_0, K, x_0) <> (x, e.π1, y) =>
         sum_rect
           (fun _ : SPath G s0 y z + (SPath G s0 y y_0 × SPath G s0 x_0 z) =>
            (SPath G s' x z + (SPath G s' x y_0 × SPath G s' x_0 z))%type)
           (fun IHq : SPath G s0 y z =>
            inl
              (spath_step G s0 s' x y z d (e.π1; EdgeSetFact.add_3 XX e.π2)
                 IHq))
           (fun IHq : SPath G s0 y y_0 × SPath G s0 x_0 z =>
            inr
              (spath_step G s0 s' x y y_0 d (e.π1; EdgeSetFact.add_3 XX e.π2)
                 IHq.1, SPath_sub G (DisjointAdd_Subset d) IHq.2))
           (from_G' q)) (right XX)
    with
    | inl q' => sweight q'
    | inr (q1, q2) => sweight q1 + K + sweight q2
    end)


DEBUG:Going to execute:
simpl
DEBUG LTAC Evaluated term: (Edge.eq_dec (y_0, K, x_0) (x, e.π1, y))