reserve x, x1, x2, y, y1, y2, z, z1, z2 for object, X, X1, X2 for set;
reserve E for non empty set;
reserve e for Element of E;
reserve u, u9, u1, u2, v, v1, v2, w, w1, w2 for Element of E^omega;
reserve F, F1, F2 for Subset of E^omega;
reserve i, k, l, n for Nat;
reserve TS for non empty transition-system over F;
reserve s, s9, s1, s2, t, t1, t2 for Element of TS;
reserve S for Subset of TS;

theorem Th54:
  for P being RedSequence of ==>.-relation(TS) st P.1 = [x, u] & P
  .len P = [y, u] holds for k st k in dom P holds (P.k)`2 = u
proof
  defpred P[Nat] means for P being RedSequence of ==>.-relation(TS), x, y st P
.1 = [x, u] & P.len P = [y, u] & len P = $1 holds (for k st k in dom P holds (P
  .k)`2 = u);
A1: now
    let k;
    assume
A2: P[k];
    now
      let P be RedSequence of ==>.-relation(TS), x, y such that
A3:   P.1 = [x, u] and
A4:   P.len P = [y, u] and
A5:   len P = k + 1;
      per cases;
      suppose
A6:     k = 0;
        hereby
          let l;
          assume l in dom P;
          then l <= 1 & 1 <= l by A5,A6,FINSEQ_3:25;
          then l = 1 by XXREAL_0:1;
          hence (P.l)`2 = u by A3;
        end;
      end;
      suppose
        k <> 0;
        then
A7:     k + 1 > 0 + 1 by XREAL_1:6;
        then
A8:     1 in dom P by A5,FINSEQ_3:25;
        len P >= 1 + 1 by A5,A7,NAT_1:8;
        then
A9:     1 + 1 in dom P by FINSEQ_3:25;
        then
A10:    P.(1 + 1) = [(P.(1 + 1))`1, (P.(1 + 1))`2] by A8,Th48;
        reconsider u1 = (P.(1 + 1))`2 as Element of E^omega by A8,A9,Th49;
        ==>.-relation(TS) reduces P.1, P.(1 + 1) by A8,A9,REWRITE1:17;
        then ex P9 being RedSequence of ==>.-relation(TS) st P9.1 = P. 1 & P9.
        len P9 = P.(1 + 1) by REWRITE1:def 3;
        then consider w such that
A11:    u = w^u1 by A3,A10,Th53;
A12:    len <*P.1*> = 1 by FINSEQ_1:40;
        consider Q being RedSequence of ==>.-relation(TS) such that
A13:    <*P.1*>^Q = P and
A14:    len P = len Q + 1 by A5,A7,Th5;
A15:    len Q >= 0 + 1 by NAT_1:8;
        then
A16:    Q.1 = [(P.(1 + 1))`1, (P.(1 + 1))`2] by A13,A12,A10,FINSEQ_1:65;
A17:    Q.len Q = [y, u] by A4,A13,A14,A12,A15,FINSEQ_1:65;
        then consider v such that
A18:    u1 = v^u by A16,Th53;
A19:      {}^u1 = u1;
        u = w^v^u by A18,A11,AFINSQ_1:27;
        then w^v = {} by FLANG_2:4;
        then
A20:    Q.1 = [(P.(1 + 1))`1, u] by A16,A11,A19,AFINSQ_1:30;
        hereby
          let l;
          assume
A21:      l in dom P;
          then
A22:      1 <= l by FINSEQ_3:25;
          then reconsider l9 = l - 1 as Nat by NAT_1:21;
          1 + 1 <= l + 1 by A22,XREAL_1:6;
          then
A23:      1 + 1 = l + 1 or 1 + 1 <= l by NAT_1:8;
          l <= len P by A21,FINSEQ_3:25;
          then
1 = l or 1 + 1 - 1 <= l - 1 & l - 1 <= len Q + 1 - 1 by A14,A23,XREAL_1:9;
          then
A24:      l = 1 or l9 in dom Q by FINSEQ_3:25;
          per cases by A24;
          suppose
            l = 1;
            hence (P.l)`2 = u by A3;
          end;
          suppose
A25:        (l - 1) in dom Q;
            then l - 1 <= len Q by FINSEQ_3:25;
            then
A26:        l - 1 + 1 <= len Q + 1 by XREAL_1:6;
            1 <= l - 1 by A25,FINSEQ_3:25;
            then
A27:        1 + 0 < l - 1 + 1 by XREAL_1:6;
            (Q.(l - 1))`2 = u by A2,A5,A14,A17,A20,A25;
            hence (P.l)`2 = u by A13,A14,A12,A27,A26,FINSEQ_1:24;
          end;
        end;
      end;
    end;
    hence P[k + 1];
  end;
A28: P[0];
  for k holds P[k] from NAT_1:sch 2(A28, A1);
  hence thesis;
end;
