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 Th96:
  len s2 = len s1 & s2 is_finer_than s1 implies s1 = s2
proof
  reconsider X = Seg len s2 as finite set;
  assume len s2 = len s1;
  then
A1: dom s1 = Seg len s2 by FINSEQ_1:def 3
    .= dom s2 by FINSEQ_1:def 3;
  assume s2 is_finer_than s1;
  then consider x such that
A2: x c= dom s2 and
A3: s1 = s2 * Sgm x;
  set y = X \ x;
A4: x c= Seg len s2 by A2,FINSEQ_1:def 3;
  then
a4: x is included_in_Seg;
  then x = rng Sgm x by FINSEQ_1:def 14;
  then
A5: dom(s2 * Sgm x)=dom Sgm x by A2,RELAT_1:27;
  reconsider x,y as finite set by A2;
  dom Sgm x = Seg len s2 by A3,A1,A5,FINSEQ_1:def 3;
  then len Sgm x = len s2 by FINSEQ_1:def 3;
  then
A6: card x = len s2 by a4,FINSEQ_3:39;
A7: X = X \/ x by A4,XBOOLE_1:12
    .= x \/ y by XBOOLE_1:39;
  card(x \/ y) = (card x) + (card y) by CARD_2:40,XBOOLE_1:79;
  then len s2 = (card x) + (card y) by A7,FINSEQ_1:57;
  then y = {} by A6;
  then Sgm x = idseq len s2 by A7,FINSEQ_3:48;
  hence thesis by A3,FINSEQ_2:54;
end;
