reserve a,b for object, I,J for set;
reserve b for bag of I;
reserve R for asymmetric transitive non empty RelStr,
  a,b,c for bag of the carrier of R,
  x,y,z for Element of R;
reserve p for partition of b-'a, q for partition of b;
reserve J for set, m for bag of I;

theorem
  for p,q being partition of b st p is ordered & q is ordered holds p = q
  proof
    let p,q be partition of b;
    defpred P[Nat] means for b,q st len q = $1 & q is ordered
    for p being partition of b st p is ordered holds q = p;
A1: P[0]
    proof let b,q; assume
      len q = 0 & q is ordered;
      then
A3:   b = Sum q & Sum <*>Bags the carrier of R = EmptyBag the carrier of R &
      q = {} by PART,Th21;
      let p be partition of b;
      assume
A4:   p is ordered;
      Sum p = b by PART;
      hence q = p by A3,A4,Lem10;
    end;
A5: for i being Nat st P[i] holds P[i+1]
    proof
      let i be Nat; assume
A6:   P[i];
      let b,q; assume
A7:   len q = i+1 & q is ordered;
      then q <> {} & q is FinSequence of Bags the carrier of R
      by RELAT_1:def 19,FINSEQ_1:def 4;
      then consider w being FinSequence of Bags the carrier of R,
      n being Element of Bags the carrier of R such that
A8:   q = <*n*>^w by FINSEQ_2:130;
      reconsider w as partition of b-'n by A8,Th28;
A9:   b = Sum q = n+Sum w <> EmptyBag the carrier of R
      by A8,A7,Th32A,Th25,Lem11,PART;
      let p be partition of b; assume
A10:  p is ordered;
      Sum p = b & rng p c= Bags the carrier of R by PART,RELAT_1:def 19;
      then p <> <*>Bags the carrier of R &
      p is FinSequence of Bags the carrier of R by A9,Th21,FINSEQ_1:def 4;
      then consider u being FinSequence of Bags the carrier of R,
      m being Element of Bags the carrier of R such that
A11:  p = <*m*>^u by FINSEQ_2:130;
      reconsider u as partition of b-'m by A11,Th28;
      u = u & w = w;
      then
A12:  m = b|{x: x is_maximal_in support b} = n by A10,A11,A7,A8,Th40;
A13:  w is ordered & u is ordered by A10,A11,A7,A8,Th30;
      len q = len <*n*> + len w = 1+len w by A8,FINSEQ_1:22,40;
      hence thesis by A6,A7,A8,A11,A12,A13;
    end;
    for i being Nat holds P[i] from NAT_1:sch 2(A1,A5);
    then P[len p];
    hence thesis;
  end;
