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 Th94:
  i in dom s1 & i+1 in dom s1 & s1.i=s1.(i+1) & fs=Del(s1,i)
  implies fs is composition_series
proof
  assume
A1: i in dom s1;
  then consider k be Nat such that
A2: len s1 = k + 1 and
A3: len Del(s1,i) = k by FINSEQ_3:104;
  assume i+1 in dom s1;
  then i+1 in Seg len s1 by FINSEQ_1:def 3;
  then
A4: i+1<=len s1 by FINSEQ_1:1;
  assume
A5: s1.i=s1.(i+1);
  assume
A6: fs = Del(s1,i);
A7: i in Seg len s1 by A1,FINSEQ_1:def 3;
  then
A8: 1<=i by FINSEQ_1:1;
  then 1+1<=i+1 by XREAL_1:6;
  then 1+1 <= len fs+1 by A6,A4,A2,A3,XXREAL_0:2;
  then
A9: 1 <= len fs by XREAL_1:6;
  per cases by A9,XXREAL_0:1;
  suppose
A10: len fs = 1;
A11: now
      let n be Nat;
      assume n in dom fs;
      then n in Seg 1 by A10,FINSEQ_1:def 3;
      then
A12:  n=1 by FINSEQ_1:2,TARSKI:def 1;
      assume
A13:  n+1 in dom fs;
      let H1,H2;
      assume that
      H1=fs.n and
      H2=fs.(n+1);
      2 in Seg 1 by A10,A12,A13,FINSEQ_1:def 3;
      hence H2 is normal StableSubgroup of H1 by FINSEQ_1:2,TARSKI:def 1;
    end;
A14: s1.1=(Omega).G by Def28;
A15: 1<=i by A7,FINSEQ_1:1;
A16: i<=1 by A6,A4,A2,A3,A10,XREAL_1:6;
    then
A17: i=1 by A15,XXREAL_0:1;
    dom s1 = Seg 2 by A6,A2,A3,A10,FINSEQ_1:def 3;
    then 1 in dom s1;
    then
A18: i in dom s1 by A15,A16,XXREAL_0:1;
    i<=1 by A6,A4,A2,A3,A10,XREAL_1:6;
    then
A19: fs.(len fs) = s1.(1+1) by A6,A2,A3,A10,A18,FINSEQ_3:111
      .= (1).G by A6,A2,A3,A10,Def28;
    s1.2=(1).G by A6,A2,A3,A10,Def28;
    hence thesis by A5,A10,A17,A14,A19,A11;
  end;
  suppose
A20: len fs > 1;
A21: fs.1=(Omega).G
    proof
      per cases by A8,XXREAL_0:1;
      suppose
A22:    i=1;
        then fs.1 = s1.(1+1) by A1,A6,A2,A3,A20,FINSEQ_3:111;
        hence thesis by A5,A22,Def28;
      end;
      suppose
A23:    i>1;
        reconsider i as Element of NAT by INT_1:3;
        fs.1 = s1.1 by A23,A6,FINSEQ_3:110;
        hence thesis by Def28;
      end;
    end;
A24: now
      let n be Nat;
      assume that
A25:  n in dom fs and
A26:  n+1 in dom fs;
A27:  n in Seg len fs by A25,FINSEQ_1:def 3;
      then
A28:  n <= k by A6,A3,FINSEQ_1:1;
      reconsider n1=n+1 as Nat;
A29:  n+1 in Seg len fs by A26,FINSEQ_1:def 3;
      then
A30:  n1 <= k by A6,A3,FINSEQ_1:1;
A31:  0+len fs < 1+len fs by XREAL_1:6;
      then
A32:  Seg len fs c= Seg len s1 by A6,A2,A3,FINSEQ_1:5;
      then n in Seg len s1 by A27;
      then
A33:  n in dom s1 by FINSEQ_1:def 3;
      n1 in Seg len s1 by A29,A32;
      then
A34:  n1 in dom s1 by FINSEQ_1:def 3;
      n1 <= len fs by A29,FINSEQ_1:1;
      then n1 < len s1 by A6,A2,A3,A31,XXREAL_0:2;
      then n1 + 1 <= k + 1 by A2,NAT_1:13;
      then Seg(n1+1) c= Seg len s1 by A2,FINSEQ_1:5;
      then
A35:  Seg(n1+1) c= dom s1 by FINSEQ_1:def 3;
A36:  n1+1 in Seg(n1+1) by FINSEQ_1:4;
      let H1, H2;
      assume
A37:  H1 = fs.n;
      assume
A38:  H2 = fs.(n+1);
      reconsider i,n as Nat;
      per cases;
      suppose
A39:    n<i;
        then
A40:    n1<=i by NAT_1:13;
        reconsider n9=n,i as Element of NAT by INT_1:3;
A41:    Del(s1,i).n9 = s1.n9 by A39,FINSEQ_3:110;
        per cases by A40,XXREAL_0:1;
        suppose
A42:      n1<i;
          reconsider n19=n1,i as Element of NAT;
          Del(s1,i).n19 = s1.n19 by A42,FINSEQ_3:110;
          hence H2 is normal StableSubgroup of H1 by A6,A37,A38,A33,A34,A41
,Def28;
        end;
        suppose
A43:      n1=i;
          then Del(s1,i).n1 = s1.(n1+1) by A1,A2,A30,FINSEQ_3:111;
          hence
          H2 is normal StableSubgroup of H1 by A5,A6,A37,A38,A33,A34,A41,A43
,Def28;
        end;
      end;
      suppose
A44:    n>=i;
        reconsider n9=n,i as Element of NAT by INT_1:3;
A45:    Del(s1,i).n9 = s1.(n9+1) by A1,A2,A28,A44,FINSEQ_3:111;
        reconsider n19=n1,i,k as Element of NAT by INT_1:3;
        0+n<=n+1 by XREAL_1:6;
        then
A46:    i<=n19 by A44,XXREAL_0:2;
        n19<=k by A6,A3,A29,FINSEQ_1:1;
        then Del(s1,i).n19 = s1.(n19+1) by A1,A2,A46,FINSEQ_3:111;
        hence H2 is normal StableSubgroup of H1 by A6,A37,A38,A34,A35,A36,A45
,Def28;
      end;
    end;
    i<=len fs by A6,A4,A2,A3,XREAL_1:6;
    then fs.(len fs) = s1.(len s1) by A1,A6,A2,A3,FINSEQ_3:111;
    then fs.(len fs)=(1).G by Def28;
    hence thesis by A21,A24;
  end;
end;
