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;

theorem Th12:
  w1^v1 = w2^v2 & ( len w1 <= len w2 or len v1 >= len v2 ) implies
  ex u st w1^u = w2 & v1 = u^v2
proof
  assume that
A1: w1^v1 = w2^v2 and
A2: len w1 <= len w2 or len v1 >= len v2;
  len w1 + len v1 = len (w2^v2) by A1,AFINSQ_1:17
    .= len w2 + len v2 by AFINSQ_1:17;
  then len v1 >= len v2 implies len w1 + len v1 - len v1 <= len w2 + len v2 -
  len v2 by XREAL_1:13;
  then consider u9 being XFinSequence such that
A3: w1^u9 = w2 by A1,A2,AFINSQ_1:41;
  reconsider u = u9 as Element of E^omega by A3,FLANG_1:5;
  take u;
  thus w1^u = w2 by A3;
  w2^v2 = w1^(u^v2) by A3,AFINSQ_1:27;
  hence thesis by A1,AFINSQ_1:28;
end;
