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 Th95:
  s1 is_finer_than s2 implies ex n st len s1 = len s2 + n
proof
  set n=len s1 - len s2;
  assume s1 is_finer_than s2;
  then consider x such that
A1: x c= dom s1 and
A2: s2 = s1 * Sgm x;
  x c= Seg len s1 by A1,FINSEQ_1:def 3;
  then
a3: x is included_in_Seg;
  reconsider x as finite set by A1;
  now
    let y1 be object;
    assume y1 in dom s2;
    then y1 in dom Sgm x by A2,FUNCT_1:11;
    then
A4: y1 in Seg card x by a3,FINSEQ_3:40;
    card x <= card dom s1 by A1,NAT_1:43;
    then Seg card x c= Seg card dom s1 by FINSEQ_1:5;
    then y1 in Seg card dom s1 by A4;
    then y1 in Seg card Seg len s1 by FINSEQ_1:def 3;
    then y1 in Seg len s1 by FINSEQ_1:57;
    hence y1 in dom s1 by FINSEQ_1:def 3;
  end;
  then dom s2 c= dom s1;
  then Seg len s2 c= dom s1 by FINSEQ_1:def 3;
  then Seg len s2 c= Seg len s1 by FINSEQ_1:def 3;
  then len s2 <= len s1 by FINSEQ_1:5;
  then len s2 - len s2 <= len s1 - len s2 by XREAL_1:9;
  then n in NAT by INT_1:3;
  then reconsider n as Nat;
  take n;
  thus thesis;
end;
