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 Th104:
  i in dom s1 & i+1 in dom s1 & s1.i=s1.(i+1) & s2=Del(s1,i)
  implies the_series_of_quotients_of s2=Del(the_series_of_quotients_of s1,i)
proof
  set f1 = the_series_of_quotients_of s1;
  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);
A6: i in Seg len s1 by A1,FINSEQ_1:def 3;
  then 1<=i by FINSEQ_1:1;
  then
A7: 1+1<=i+1 by XREAL_1:6;
  then 2 <= len s1 by A4,XXREAL_0:2;
  then
A8: 1 < len s1 by XXREAL_0:2;
  then
A9: len s1 = len f1 + 1 by Def33;
  assume
A10: s2=Del(s1,i);
  then 1+1 <= len s2+1 by A7,A4,A2,A3,XXREAL_0:2;
  then
A11: 1 <= len s2 by XREAL_1:6;
  per cases by A11,XXREAL_0:1;
  suppose
A12: len s2 = 1;
    then 1 in Seg len f1 by A10,A2,A3,A9;
    then 1 in dom f1 by FINSEQ_1:def 3;
    then
A13: ex k1 be Nat st len f1 = k1 + 1 & len Del(f1,1) = k1 by FINSEQ_3:104;
A14: 1<=i by A6,FINSEQ_1:1;
A15: the_series_of_quotients_of s2 = {} by A12,Def33;
    i<=1 by A10,A4,A2,A3,A12,XREAL_1:6;
    then len Del(f1,i) = 0 by A10,A2,A3,A9,A12,A13,A14,XXREAL_0:1;
    hence thesis by A15;
  end;
  suppose
A16: len s2 > 1;
    i+1-1<=len s1-1 & 1 <= i by A6,A4,FINSEQ_1:1,XREAL_1:9;
    then i in Seg len f1 by A9;
    then
A17: i in dom f1 by FINSEQ_1:def 3;
    then consider k1 be Nat such that
A18: len f1 = k1 + 1 and
A19: len Del(f1,i) = k1 by FINSEQ_3:104;
    now
      let n;
      set n1 = n+1;
      assume n in dom Del(f1,i);
      then
A20:  n in Seg len Del(f1,i) by FINSEQ_1:def 3;
      then
A21:  n<=k1 by A19,FINSEQ_1:1;
      then
A22:  n1<=k by A2,A9,A18,XREAL_1:6;
      1<=n by A20,FINSEQ_1:1;
      then 1+1<=n+1 by XREAL_1:6;
      then 1<=n1 by XXREAL_0:2;
      then n1 in Seg len f1 by A2,A9,A22;
      then
A23:  n1 in dom f1 by FINSEQ_1:def 3;
      reconsider n1 as Nat;
      let H1, N1;
      assume
A24:  H1 = s2.n;
      0+n<1+n by XREAL_1:6;
      then
A25:  n<=k by A22,XXREAL_0:2;
      len f1-len Del(f1,i)+len Del(f1,i)>0+len Del(f1,i) by A18,A19,XREAL_1:6;
      then Seg len Del(f1,i) c= Seg len f1 by FINSEQ_1:5;
      then n in Seg len f1 by A20;
      then
A26:  n in dom f1 by FINSEQ_1:def 3;
      assume
A27:  N1 = s2.(n+1);
      per cases;
      suppose
A28:    n<i;
        then
A29:    n1<=i by NAT_1:13;
        per cases by A29,XXREAL_0:1;
        suppose
A30:      n1<i;
          reconsider n9=n as Element of NAT by INT_1:3;
A31:      s1.(n9+1) = N1 by A10,A27,A30,FINSEQ_3:110;
          s1.n9 = H1 by A10,A24,A28,FINSEQ_3:110;
          then f1.n = H1./.N1 by A8,A26,A31,Def33;
          hence Del(f1,i).n = H1./.N1 by A28,FINSEQ_3:110;
        end;
        suppose
          n1=i;
          then s1.n = H1 & s1.(n+1) = N1 by A1,A5,A10,A2,A24,A27,A22,A28,
FINSEQ_3:110,111;
          then f1.n = H1./.N1 by A8,A26,Def33;
          hence Del(f1,i).n = H1./.N1 by A28,FINSEQ_3:110;
        end;
      end;
      suppose
A32:    n>=i;
        reconsider n19=n1 as Element of NAT;
        0+i<1+i & n+1>=i+1 by A32,XREAL_1:6;
        then n1>=i by XXREAL_0:2;
        then
A33:    s1.(n19+1) = N1 by A1,A10,A2,A27,A22,FINSEQ_3:111;
        s1.n19 = H1 by A1,A10,A2,A24,A25,A32,FINSEQ_3:111;
        then f1.n1 = H1./.N1 by A8,A23,A33,Def33;
        hence Del(f1,i).n = H1./.N1 by A17,A18,A21,A32,FINSEQ_3:111;
      end;
    end;
    hence thesis by A10,A2,A3,A9,A16,A18,A19,Def33;
  end;
end;
