theorem Th48:
  R is ascending iff inversions R = {}
  proof
    thus R is ascending implies inversions R = {}
    proof assume
A1:   for a,b st a in dom R & b in dom R & a in b holds R/.a <= R/.b;
      set x = the Element of inversions R;
      assume
A2:   inversions R <> {}; then x in inversions R; then
      consider a,b being Element of dom R such that
A3:   x = [a,b] & a in b & R/.a > R/.b;
      R <> {} by A2; then
      R/.a <= R/.b by A1,A3;
      hence thesis by A3,Th45;
    end;
    assume
A4: inversions R = {};
    let a,b; assume
    a in dom R & b in dom R & a in b; then
    R/.a > R/.b implies [a,b] in inversions R;
    hence thesis by A4,Th45;
  end;
