reserve i, i1, i2, j, k for Nat,
  r, s for Real;
reserve D for non empty set,
  f1 for FinSequence of D;

theorem Th50:
  for f being non constant standard special_circular_sequence,
      i1,i2 being Nat st 1<=i1 & i1+1<=len f & 1<=i2 & i2+1<=len f & i1<>i2
 ex g1,g2 being FinSequence of TOP-REAL 2 st g1 is_a_part_of f,i1,i2 &
    g2 is_a_part_of f,i1,i2 &
    (L~g1)/\(L~g2)={f.i1,f.i2} & (L~g1) \/ (L~g2)=L~f &
  L~g1 is_S-P_arc_joining f/.i1,f/.i2 & L~g2 is_S-P_arc_joining f/.i1,f/.i2 &
   for g being FinSequence of TOP-REAL 2 st g is_a_part_of f,i1,i2 holds
     g=g1 or g=g2
proof
  let f be non constant standard special_circular_sequence, i1,i2 be Nat;
  assume that
A1: 1<=i1 and
A2: i1+1<=len f and
A3: 1<=i2 and
A4: i2+1<=len f and
A5: i1<>i2;
  now
    per cases;
    case
A6:   i1<=i2;
      set h1=mid(f,i1,i2),h2=mid(f,i1,1)^mid(f,len f-'1,i2);
A7:   i2<len f by A4,NAT_1:13;
      then
A8:   mid(f,i1,i2) is_a_part>_of f,i1,i2 by A1,A6,Th31;
      then
A9:   h1 is_a_part_of f,i1,i2;
A10:  i1<i2 by A5,A6,XXREAL_0:1;
      then
A11:  L~h1 is_S-P_arc_joining f/.i1,f/.i2 by A8,Th44;
A12:  for g being FinSequence of TOP-REAL 2 st g is_a_part_of f,i1,i2
      holds g=h1 or g=h2
      proof
        let g be FinSequence of TOP-REAL 2;
        assume
A13:    g is_a_part_of f,i1,i2;
        now
          per cases by A13;
          case
            g is_a_part>_of f,i1,i2;
            hence thesis by A6,Th25;
          end;
          case
            g is_a_part<_of f,i1,i2;
            hence thesis by A10,Th28;
          end;
        end;
        hence thesis;
      end;
A14:  (L~h1) \/ (L~h2)=L~f by A1,A10,A7,Th43;
A15:  (L~h1)/\(L~h2)={f.i1,f.i2} by A1,A10,A7,Th43;
      mid(f,i1,1)^mid(f,len f-'1,i2) is_a_part<_of f,i1,i2 by A1,A10,A7,Th34;
      then
A16:  h2 is_a_part_of f,i1,i2;
      then L~h2 is_S-P_arc_joining f/.i1,f/.i2 by A5,Th48;
      hence thesis by A9,A16,A15,A14,A11,A12;
    end;
    case
A17:  i1>i2;
      set h1=mid(f,i2,i1),h2=mid(f,i2,1)^mid(f,len f-'1,i1);
      set h3=Rev h1,h4=Rev h2;
A18:  L~h1=L~h3 by SPPOL_2:22;
A19:  for g being FinSequence of TOP-REAL 2 st g is_a_part_of f,i1,i2
      holds g=h3 or g=h4
      proof
        let g be FinSequence of TOP-REAL 2;
        assume
A20:    g is_a_part_of f,i1,i2;
        now
          per cases by A20;
          case
            g is_a_part>_of f,i1,i2;
            then Rev g is_a_part<_of f,i2,i1 by Th29;
            then Rev g= mid(f,i2,1)^mid(f,len f-'1,i1) by A17,Th28;
            hence thesis;
          end;
          case
            g is_a_part<_of f,i1,i2;
            then Rev g is_a_part>_of f,i2,i1 by Th30;
            then Rev g= mid(f,i2,i1) by A17,Th25;
            hence thesis;
          end;
        end;
        hence thesis;
      end;
A21:  i1<len f by A2,NAT_1:13;
      then mid(f,i2,i1) is_a_part>_of f,i2,i1 by A3,A17,Th31;
      then
A22:  L~h3 is_S-P_arc_joining f/.i1,f/.i2 by A17,Th29,Th47;
      (L~h1) \/ (L~h2)=L~f by A3,A17,A21,Th43;
      then
A23:  (L~h3) \/ (L~h4)=L~f by A18,SPPOL_2:22;
      (L~h1)/\(L~h2)={f.i2,f.i1} by A3,A17,A21,Th43;
      then
A24:  (L~h3)/\(L~h4)={f.i1,f.i2} by A18,SPPOL_2:22;
      Rev mid(f,i2,i1) is_a_part<_of f,i1,i2 by A3,A17,A21,Th29,Th31;
      then
A25:  h3 is_a_part_of f,i1,i2;
      Rev (mid(f,i2,1)^mid(f,len f-'1,i1)) is_a_part>_of f,i1,i2 by A3,A17,A21
,Th30,Th34;
      then
A26:  h4 is_a_part_of f,i1,i2;
      then L~h4 is_S-P_arc_joining f/.i1,f/.i2 by A5,Th48;
      hence thesis by A25,A26,A24,A23,A22,A19;
    end;
  end;
  hence thesis;
end;
