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 Th101:
  i in dom s1 & j in dom s1 & i<=j & H1 = s1.i & H2 = s1.j
  implies H2 is StableSubgroup of H1
proof
  assume that
A1: i in dom s1 and
A2: j in dom s1;
  defpred P[Nat] means for n,H2 st i+$1 in dom s1 & H2 = s1.(i+$1) holds H2 is
  StableSubgroup of H1;
  assume
A3: i<=j;
  assume that
A4: H1 = s1.i and
A5: H2 = s1.j;
A6: for n st P[n] holds P[n+1]
  proof
    let n;
    assume
A7: P[n];
    set H2 = s1.(i+n);
    per cases;
    suppose
A8:   i+n in dom s1;
      then reconsider H2 as Element of the_stable_subgroups_of G by FINSEQ_2:11
;
      reconsider H2 as StableSubgroup of G by Def11;
A9:   H2 is StableSubgroup of H1 by A7,A8;
      now
        let k be Element of NAT;
        let H3;
        assume i+(n+1) in dom s1;
        then
A10:    i+n+1 in dom s1;
        assume H3 = s1.(i+(n+1));
        then H3 is StableSubgroup of H2 by A8,A10,Def28;
        hence H3 is StableSubgroup of H1 by A9,Th11;
      end;
      hence thesis;
    end;
    suppose
      not i+n in dom s1;
      then
A11:  not i+n in Seg len s1 by FINSEQ_1:def 3;
      per cases by A11;
      suppose
        i+n<0+1;
        then n=0 by NAT_1:13;
        hence thesis by A1,A4,Def28;
      end;
      suppose
A12:    i+n>len s1;
A13:    1+len s1>0+len s1 by XREAL_1:6;
        i+n+1>len s1+1 by A12,XREAL_1:6;
        then i+n+1>len s1 by A13,XXREAL_0:2;
        then not i+n+1 in Seg len s1 by FINSEQ_1:1;
        hence thesis by FINSEQ_1:def 3;
      end;
    end;
  end;
A14: P[0] by A4,Th10;
A15: for n holds P[n] from NAT_1:sch 2(A14,A6);
  set n=j-i;
  i-i<=j-i by A3,XREAL_1:9;
  then reconsider n as Element of NAT by INT_1:3;
  reconsider n as Nat;
  j=i+n;
  hence thesis by A2,A5,A15;
end;
