reserve x,O for set,
  o for Element of O,
  G,H,I for GroupWithOperators of O,
  A, B for Subset of G,
  N for normal StableSubgroup of G,
  H1,H2,H3 for StableSubgroup of G,
  g1,g2 for Element of G,
  h1,h2 for Element of H1,
  h for Homomorphism of G,H;
reserve E for set,
  A for Action of O,E,
  C for Subset of G,
  N1 for normal StableSubgroup of H1;
reserve y for set,
  H19,H29 for StableSubgroup of G,
  N19 for normal StableSubgroup of H19,
  s1,s19,s2,s29 for CompositionSeries of G,
  fs for FinSequence of the_stable_subgroups_of G,
  f1,f2 for FinSequence,
  i,j,n for Nat;

theorem Th99:
  i in dom s1 & i+1 in dom s1 & s1.i = s1.(i+1) & s19 = Del(s1,i)
  & s2 is jordan_holder & s1 is_finer_than s2 implies s19 is_finer_than s2
proof
  assume that
A1: i in dom s1 and
A2: i+1 in dom s1;
A3: i in Seg len s1 by A1,FINSEQ_1:def 3;
  then
A4: 1 <= i by FINSEQ_1:1;
  set k = len s1 - 1;
  assume
A5: s1.i = s1.(i+1);
  reconsider k as Integer;
  assume
A6: s19 = Del(s1,i);
  assume
A7: s2 is jordan_holder;
  i<=len s1 by A3,FINSEQ_1:1;
  then 1 <= len s1 by A4,XXREAL_0:2;
  then 1-1 <= len s1 - 1 by XREAL_1:9;
  then reconsider k as Element of NAT by INT_1:3;
A8: dom s1 = Seg(k+1) by FINSEQ_1:def 3;
  assume s1 is_finer_than s2;
  then consider z be set such that
A9: z c= dom s1 and
A10: s2 = s1 * Sgm z;
a9:  z is included_in_Seg by A8,A9;
A11: i+1 in Seg len s1 by A2,FINSEQ_1:def 3;
  now
    per cases;
    suppose
A12:  not i in z;
      set y = z;
      take y;
      thus y c= Seg(k+1) by A9,FINSEQ_1:def 3;
      thus not i in y by A12;
      thus s2 = s1 * Sgm y by A10;
    end;
    suppose
A13:  i in z;
      now
        let x be object;
        assume
A14:    x in {i+1} /\ {i};
        then x in {i} by XBOOLE_0:def 4;
        then
A15:    x=i by TARSKI:def 1;
        x in {i+1} by A14,XBOOLE_0:def 4;
        then x=i+1 by TARSKI:def 1;
        hence contradiction by A15;
      end;
      then {i+1} /\ {i} = {} by XBOOLE_0:def 1;
      then
A16:  {i+1} misses {i} by XBOOLE_0:def 7;
      reconsider y = (z \/ {i+1}) \ {i} as set;
      take y;
      {i+1} c= Seg(k+1) by A11,ZFMISC_1:31;
      then
A17:  z \/ {i+1} c= Seg(k+1) by A9,A8,XBOOLE_1:8;
      then
a17:  z \/ {i+1} is included_in_Seg;
      thus
A18:  y c= Seg(k+1) by A17;
      then
a18:  y is included_in_Seg;
      y c= dom s1 by A18,FINSEQ_1:def 3;
      then
A19:  rng Sgm y c= dom s1 by a18,FINSEQ_1:def 14;
      reconsider y9=y,z as finite set by A9;
A20:  dom Sgm y9 = Seg card y9 by a17,FINSEQ_3:40;
      i in z \/ {i+1} by A13,XBOOLE_0:def 3;
      then {i} c= z \/ {i+1} by ZFMISC_1:31;
      then card((z \/ {i+1})\{i}) = card(z \/ {i+1}) - card{i} by CARD_2:44;
      then
A21:  card y9 = card(z \/ {i+1}) - 1 by CARD_1:30;
A22:  now
A23:    0+i < 1+i by XREAL_1:6;
        assume i+1 in z;
        then i+1 in rng Sgm z by a9,FINSEQ_1:def 14;
        then consider x99 be object such that
A24:    x99 in dom Sgm z and
A25:    i+1 = Sgm(z).x99 by FUNCT_1:def 3;
        i in rng Sgm z by a9,A13,FINSEQ_1:def 14;
        then consider x9 be object such that
A26:    x9 in dom Sgm z and
A27:    i = Sgm(z).x9 by FUNCT_1:def 3;
        reconsider x9,x99 as Element of NAT by A26,A24;
A28:    dom Sgm z = Seg len Sgm z by FINSEQ_1:def 3;
        then
A29:    x9 <= len Sgm z by A26,FINSEQ_1:1;
        1 <= x99 by A24,A28,FINSEQ_1:1;
        then x9 < x99 by a9,A27,A25,A23,A29,FINSEQ_3:41;
        then reconsider l = x99 - x9 as Element of NAT by INT_1:5;
        per cases;
        suppose
          l = 0;
          hence contradiction by A27,A25,A23;
        end;
        suppose
A30:      0 < l;
          set x999 = x9+1;
          0+1 < l+1 by A30,XREAL_1:6;
          then x9+1-x9 <= x99-x9 by NAT_1:13;
          then
A31:      x999 <= x99 by XREAL_1:9;
          x99 <= len Sgm z by A24,A28,FINSEQ_1:1;
          then
A32:      x999 <= len Sgm z by A31,XXREAL_0:2;
A33:      1+x9 > 0+x9 & 1 <= x9 by A26,A28,FINSEQ_1:1,XREAL_1:6;
          then 1 <= x999 by XXREAL_0:2;
          then x999 in dom Sgm z by A28,A32;
          then reconsider k3= Sgm(z).x999 as Element of NAT by FINSEQ_2:11;
          i < k3 by a9,A27,A33,A32,FINSEQ_1:def 14;
          then
A34:      i+1 <= k3 by NAT_1:13;
A35:      1 <= x999 & x999 < x99 & x99 <= len Sgm z or x999 = x99 by A24,A28
,A31,A33,FINSEQ_1:1,XXREAL_0:1,2;
          then
A36:      x9+1 in dom s2
          by a9,A2,A10,A24,A25,A34,FINSEQ_1:def 14,FUNCT_1:11;
A37:      s2 is strictly_decreasing by A7;
A38:      x9 in dom s2 by A1,A10,A26,A27,FUNCT_1:11;
          then reconsider H1=s2.x9,H2=s2.(x9+1) as Element of
          the_stable_subgroups_of G by A36,FINSEQ_2:11;
          reconsider H1,H2 as StableSubgroup of G by Def11;
          reconsider H1 as GroupWithOperators of O;
          reconsider H2 as normal StableSubgroup of H1 by A38,A36,Def28;
          s2.x9 = s1.(Sgm(z).x9) by A10,A26,FUNCT_1:13
            .= s2.(x9+1) by a9,A5,A10,A27,A24,A25,A35,A34,FINSEQ_1:def 14
,FUNCT_1:13;
          then the carrier of H1 = the carrier of H2;
          then H1./.H2 is trivial by Th77;
          hence contradiction by A38,A36,A37;
        end;
      end;
      then card(z \/ {i+1}) = card z + 1 by CARD_2:41;
      then
A39:  dom Sgm y9 = dom Sgm z by a9,A21,A20,FINSEQ_3:40;
      set z2 = {x where x is Element of NAT: x in z & i+1 < x};
      set z1 = {x where x is Element of NAT: x in z & x < i};
A40:  now
        let x be object;
        assume x in z1 \/ {i} \/ z2;
        then x in z1 \/ {i} or x in z2 by XBOOLE_0:def 3;
        then x in z1 or x in {i} or x in z2 by XBOOLE_0:def 3;
        then consider x9,x99 be Element of NAT such that
A41:    x = x9 & x9 in z & x9<i or x in {i} or x = x99 & x99 in z & i +1<x99;
        per cases by A41;
        suppose
          x = x9 & x9 in z & x9<i;
          hence x in z;
        end;
        suppose
          x in {i};
          hence x in z by A13,TARSKI:def 1;
        end;
        suppose
          x = x99 & x99 in z & i+1<x99;
          hence x in z;
        end;
      end;
A42:  z c= Seg(k+1) by A9,FINSEQ_1:def 3;
A43:  now
        let x be object;
        assume
A44:    x in z;
        then x in Seg(k+1) by A42;
        then reconsider x9=x as Element of NAT;
        x9<=i or i+1<=x9 by NAT_1:13;
        then x9<i or x9=i or i+1<x9 by A22,A44,XXREAL_0:1;
        then x in z1 or x in {i} or x in z2 by A44,TARSKI:def 1;
        then x in z1 \/ {i} or x in z2 by XBOOLE_0:def 3;
        hence x in z1 \/ {i} \/ z2 by XBOOLE_0:def 3;
      end;
      then
A45:  z = z1 \/ {i} \/ z2 by A40,TARSKI:2;
      then z2 c= z by XBOOLE_1:7;
      then z2 c= Seg(k+1) by A42;
      then
a46:  z2 is included_in_Seg;
      now
        let x be object;
        assume
A48:    x in z2 /\ {i};
        then x in z2 by XBOOLE_0:def 4;
        then consider x9 be Element of NAT such that
A49:    x9=x and
        x9 in z and
A50:    i+1<x9;
        x in {i} by A48,XBOOLE_0:def 4;
        then x9=i by A49,TARSKI:def 1;
        then i+1-i<i-i by A50,XREAL_1:9;
        then 1<0;
        hence contradiction;
      end;
      then z2 /\ {i} = {} by XBOOLE_0:def 1;
      then
A51:  z2 misses {i} by XBOOLE_0:def 7;
      now
        let x be object;
        assume
A52:    x in z1 /\ {i};
        then x in z1 by XBOOLE_0:def 4;
        then
A53:    ex x9 be Element of NAT st x9=x & x9 in z & x9<i;
        x in {i} by A52,XBOOLE_0:def 4;
        hence contradiction by A53,TARSKI:def 1;
      end;
      then z1 /\ {i} = {} by XBOOLE_0:def 1;
      then
A54:  z1 misses {i} by XBOOLE_0:def 7;
A55:  y = (z1 \/ {i} \/ z2 \/ {i+1}) \ {i} by A43,A40,TARSKI:2
        .= ((z1 \/ {i} \/ z2)\{i}) \/ ({i+1}\{i}) by XBOOLE_1:42
        .= ((z1 \/ {i} \/ z2)\{i}) \/ {i+1} by A16,XBOOLE_1:83
        .= ((z1 \/ {i})\{i}) \/ (z2\{i}) \/ {i+1} by XBOOLE_1:42
        .= ((z1 \/ {i})\{i}) \/ z2 \/ {i+1} by A51,XBOOLE_1:83
        .= (z1\{i}) \/ ({i}\{i}) \/ z2 \/ {i+1} by XBOOLE_1:42
        .= (z1\{i}) \/ {} \/ z2 \/ {i+1} by XBOOLE_1:37
        .= z1 \/ {} \/ z2 \/ {i+1} by A54,XBOOLE_1:83
        .= z1 \/ {i+1} \/ z2 by XBOOLE_1:4;
      now
        assume i in y;
        then not i in {i} by XBOOLE_0:def 5;
        hence contradiction by TARSKI:def 1;
      end;
      hence not i in y;
A58:  now
        let m,n be Nat;
        assume m in z1 \/ {i};
        then m in z1 or m in {i} by XBOOLE_0:def 3;
        then
A59:    ex x9 be Element of NAT st ( m = x9 & x9 in z & x9<i or m in {i});
        assume n in z2;
        then
A60:    ex x99 be Element of NAT st n = x99 & x99 in z & i+1< x99;
        0+i<1+i by XREAL_1:6;
        then m<i+1 by A59,TARSKI:def 1,XXREAL_0:2;
        hence m < n by A60,XXREAL_0:2;
      end;
A61:  now
        let m,n be Nat;
        assume m in z1;
        then
A62:    ex x9 be Element of NAT st m = x9 & x9 in z & x9<i;
        assume n in {i};
        hence m < n by A62,TARSKI:def 1;
      end;
A63:  now
        let m,n be Nat;
        assume m in z1 \/ {i+1};
        then m in z1 or m in {i+1} by XBOOLE_0:def 3;
        then
A64:    ex x9 be Element of NAT st ( m = x9 & x9 in z & x9<i or m in {i+1 });
        assume n in z2;
        then
A65:    ex x99 be Element of NAT st n = x99 & x99 in z & i+1< x99;
        0+i<1+i by XREAL_1:6;
        then m<i+1 or m=i+1 by A64,TARSKI:def 1,XXREAL_0:2;
        hence m < n by A65,XXREAL_0:2;
      end;
A66:  now
        let m,n be Nat;
A67:    0+i<1+i by XREAL_1:6;
        assume m in z1;
        then
A68:    ex x9 be Element of NAT st m = x9 & x9 in z & x9<i;
        assume n in {i+1};
        then n=i+1 by TARSKI:def 1;
        hence m < n by A68,A67,XXREAL_0:2;
      end;
      z1 c= y by A55,XBOOLE_1:7,11;
      then z1 c= Seg(k+1) by A18;
      then
bbb:  z1 is included_in_Seg;
      then
A69:  Sgm(z1 \/ {i+1}) = Sgm z1 ^ Sgm {i+1} by A66,FINSEQ_3:42;
      z1 \/ {i} c= z by A45,XBOOLE_1:7;
      then z1 \/ {i} c= Seg(k+1) by A42;
      then z1 \/ {i} is included_in_Seg;
      then
A70:  Sgm z = Sgm(z1 \/ {i}) ^ Sgm z2 by a46,A45,A58,FINSEQ_3:42;
      {i} c= z by A45,XBOOLE_1:7,11;
      then {i} c= Seg(k+1) by A42;
      then {i} is included_in_Seg;
      then
A71:  Sgm(z1 \/ {i}) = Sgm z1 ^ Sgm {i} by bbb,A61,FINSEQ_3:42;
      then
A72:  Sgm z = Sgm z1 ^ <*i*> ^ Sgm z2 by A4,A70,FINSEQ_3:44;
      z1 \/ {i+1} c= y by A55,XBOOLE_1:7;
      then z1 \/ {i+1} c= Seg(k+1) by A18;
      then z1 \/ {i+1} is included_in_Seg;
      then
A73:  Sgm y = Sgm(z1 \/ {i+1}) ^ Sgm z2 by a46,A55,A63,FINSEQ_3:42;
      then
A74:  Sgm y = Sgm z1 ^ <*i+1*> ^ Sgm z2 by A69,FINSEQ_3:44;
A75:  now
        let x;
A76:    len(Sgm z1 ^ <*i*>) = len Sgm z1 + len <*i*> by FINSEQ_1:22
          .= len Sgm z1 + 1 by FINSEQ_1:40
          .= len Sgm z1 + len <*i+1*> by FINSEQ_1:40
          .= len(Sgm z1 ^ <*i+1*>) by FINSEQ_1:22;
        assume
A77:    x in dom Sgm z;
        then reconsider x9=x as Element of NAT;
A78:    dom(Sgm z1 ^ <*i*>) = Seg len(Sgm z1 ^ <*i*>) by FINSEQ_1:def 3
          .= dom(Sgm z1 ^ <*i+1*>) by A76,FINSEQ_1:def 3;
        per cases by A72,A77,FINSEQ_1:25;
        suppose
A79:      x9 in dom(Sgm z1 ^ <*i*>);
          per cases by A79,FINSEQ_1:25;
          suppose
A80:        x9 in dom Sgm z1;
            then
A81:        (Sgm z1).x9 = (Sgm z1 ^ <*i*>).x9 by FINSEQ_1:def 7
              .= (Sgm z1 ^ <*i*> ^ Sgm z2).x9 by A79,FINSEQ_1:def 7
              .= (Sgm z).x9 by A4,A70,A71,FINSEQ_3:44;
            (Sgm z1).x9 = (Sgm z1 ^ <*i+1*>).x9 by A80,FINSEQ_1:def 7
              .= (Sgm z1 ^ <*i+1*> ^ Sgm z2).x9 by A78,A79,FINSEQ_1:def 7
              .= (Sgm y).x9 by A73,A69,FINSEQ_3:44;
            hence (Sgm z).x <> i implies (Sgm y).x = (Sgm z).x by A81;
            thus (Sgm z).x = i implies (Sgm y).x = i+1
            proof
              assume (Sgm z).x = i;
              then i in rng Sgm z1 by A80,A81,FUNCT_1:3;
              then i in z1 by bbb,FINSEQ_1:def 14;
              then ex x999 be Element of NAT st x999=i & x999 in z & x999< i;
              hence thesis;
            end;
          end;
          suppose
            ex x99 being Nat st x99 in dom <*i*> & x9=len Sgm z1 + x99;
            then consider x99 be Nat such that
A82:        x99 in dom <*i*> and
A83:        x9=len Sgm z1 + x99;
A84:        x99 in Seg 1 by A82,FINSEQ_1:38;
            then
A85:        x99 = 1 by FINSEQ_1:2,TARSKI:def 1;
            then i = <*i*>.x99
              .= (Sgm z1 ^ <*i*>).x9 by A82,A83,FINSEQ_1:def 7
              .= (Sgm z1 ^ <*i*> ^ Sgm z2).x9 by A79,FINSEQ_1:def 7
              .= (Sgm z).x9 by A4,A70,A71,FINSEQ_3:44;
            hence (Sgm z).x <> i implies (Sgm y).x = (Sgm z).x;
            thus (Sgm z).x = i implies (Sgm y).x = i+1
            proof
              assume (Sgm z).x = i;
A86:          x99 in dom <*i+1*> by A84,FINSEQ_1:38;
              i+1 = <*i+1*>.x99 by A85
                .= (Sgm z1 ^ <*i+1*>).x9 by A83,A86,FINSEQ_1:def 7
                .= (Sgm z1 ^ <*i+1*> ^ Sgm z2).x9 by A78,A79,FINSEQ_1:def 7;
              hence thesis by A73,A69,FINSEQ_3:44;
            end;
          end;
        end;
        suppose
          ex x99 being Nat st x99 in dom Sgm z2 & x9=len(Sgm z1 ^ <*
          i*>) + x99;
          then consider x99 be Nat such that
A87:      x99 in dom Sgm z2 and
A88:      x9=len(Sgm z1 ^ <*i*>) + x99;
          (Sgm y).x9 = (Sgm z2).x99 by A74,A76,A87,A88,FINSEQ_1:def 7;
          hence
          (Sgm z).x <> i implies (Sgm y).x = (Sgm z).x by A72,A87,A88,
FINSEQ_1:def 7;
          thus (Sgm z).x = i implies (Sgm y).x = i+1
          proof
            assume (Sgm z).x = i;
            then (Sgm z2).x99 = i by A72,A87,A88,FINSEQ_1:def 7;
            then i in rng Sgm z2 by A87,FUNCT_1:3;
            then i in z2 by a46,FINSEQ_1:def 14;
            then ex x999 be Element of NAT st x999=i & x999 in z & i+1< x999;
            then i+1-i<i-i by XREAL_1:9;
            then 1<0;
            hence thesis;
          end;
        end;
      end;
      rng Sgm z c= dom s1 by a9,A9,FINSEQ_1:def 14;
      then
A89:  dom(s1 * Sgm z) = dom Sgm z by RELAT_1:27;
      then
A90:  dom(s1 * Sgm y) = dom(s1 * Sgm z) by A39,A19,RELAT_1:27;
      now
        let x be object;
        assume
A91:    x in dom(s1 * Sgm y);
        then
A92:    x in dom Sgm z by A39,A19,RELAT_1:27;
A93:    x in dom(s1 * Sgm z) by A39,A19,A89,A91,RELAT_1:27;
        per cases;
        suppose
A94:      (Sgm z).x = i;
          (s1 * Sgm y).x = s1.((Sgm y).x) by A91,FUNCT_1:12
            .= s1.((Sgm z).x) by A5,A75,A92,A94
            .= (s1 * Sgm z).x by A90,A91,FUNCT_1:12;
          hence (s1 * Sgm y).x = (s1 * Sgm z).x;
        end;
        suppose
A95:      (Sgm z).x <> i;
          (s1 * Sgm y).x = s1.((Sgm y).x) by A91,FUNCT_1:12
            .= s1.((Sgm z).x) by A75,A92,A95
            .= (s1 * Sgm z).x by A93,FUNCT_1:12;
          hence (s1 * Sgm y).x = (s1 * Sgm z).x;
        end;
      end;
      hence s2 = s1 * Sgm y by A10,A39,A19,A89,FUNCT_1:2,RELAT_1:27;
    end;
  end;
  then consider y be set such that
A96: y c= Seg(k+1) and
A97: not i in y and
A98: s2 = s1 * Sgm y;
a96: y is included_in_Seg by A96;
  now
    consider x such that
A99: Sgm x = Sgm(Seg(k+1)\{i})" * Sgm y and
A100: x c= Seg k by A3,A96,A97,Lm38;
    take x;
    ex m be Nat st len s1 = m + 1 & len Del(s1,i) = m by A1,FINSEQ_3:104;
    hence x c= dom s19 by A6,A100,FINSEQ_1:def 3;
    set f = Sgm (Seg(k+1)\{i});
    set X = dom f;
    set Y = rng f;
    reconsider f as Function of X,Y by FUNCT_2:1;
A101: f is one-to-one by FINSEQ_3:92;
A102: rng f = Seg(k+1)\{i} by FINSEQ_1:def 14;
    now
      let x9 be object;
      assume
A103: x9 in y;
      then not x9 in {i} by A97,TARSKI:def 1;
      hence x9 in rng f by A96,A102,A103,XBOOLE_0:def 5;
    end;
    then y c= rng f;
    then
A104: rng Sgm y c= rng f by a96,FINSEQ_1:def 14;
A105: now
      1<=i by A3,FINSEQ_1:1;
      then
A106: 1+1<=i+1 by XREAL_1:6;
      i+1<=len s1 by A11,FINSEQ_1:1;
      then 2<=len s1 by A106,XXREAL_0:2;
      then Seg 2 c= Seg(k+1) by FINSEQ_1:5;
      then
A107: Seg 2\{i} c= rng f by A102,XBOOLE_1:33;
      assume
A108: rng f = {};
      per cases by A108,A107,XBOOLE_1:3,ZFMISC_1:58;
      suppose
        Seg 2 = {};
        hence contradiction;
      end;
      suppose
        Seg 2 = {i};
        hence contradiction by FINSEQ_1:2,ZFMISC_1:5;
      end;
    end;
    s19 * Sgm x = s1 * f * Sgm x by A6,FINSEQ_1:def 3
      .= s1 * f * f" * Sgm y by A99,RELAT_1:36
      .= s1 * (f * f") * Sgm y by RELAT_1:36
      .= s1 * id rng f * Sgm y by A101,A105,FUNCT_2:29
      .= s1 * (id rng f * Sgm y) by RELAT_1:36
      .= s1 * Sgm y by A104,RELAT_1:53;
    hence s2 = s19 * Sgm x by A98;
  end;
  hence thesis;
end;
