reserve a,a1,a2,b,c,d for Ordinal,
  n,m,k for Nat,
  x,y,z,t,X,Y,Z for set;
reserve f,g for Function;
reserve A,B,C for array;
reserve O for connected non empty Poset;
reserve R,Q for array of O;
reserve T for non empty array of O;
reserve p,q,r,s for Element of dom T;

theorem Th72:
  [x,y] in inversions R implies
  (R,x,y)incl.:inversions Swap(R,x,y) c< inversions R
  proof assume
A1: [x,y] in inversions R; then
A2: x in dom R & y in dom R & x in y & R/.x > R/.y by Th46;
    reconsider T=R as non empty array of O by A1;
    reconsider p=x, q=y as Element of dom T by A1,Th46;
    set j = (R,x,y)incl, k = (T,p,q)incl;
    set s = Swap(R,x,y), t = Swap(T,p,q);
    set ws = inversions s, w = inversions R;
A3: dom t = dom T by FUNCT_7:99;
    thus j.:ws c= w
    proof
      let z,t be object; assume
      [z,t] in j.:ws; then
      consider a,b being object such that
A4:   [a,b] in ws & [a,b] in dom j & [z,t] = j.(a,b) by Th5;
      reconsider a,b as set by TARSKI:1;
      [a,b] in inversions s implies
      a in dom s & b in dom s & a in b by Th46;
      then
A5:   a in b & a in dom T & b in dom T by A4,A3;
      then reconsider a,b as Element of dom T;
      per cases by A2,A5,Th2;
      suppose
A6:     a <> p & a <> q & b <> p & b <> q; then
        [z,t] = [a,b] by A4,A2,Th67;
        hence thesis by A4,A6,Th52;
      end;
      suppose
A7:     a in p & b = p; then
        [z,t] = [a,q] by A4,A2,Th68;
        hence thesis by A1,A4,A7,Th53;
      end;
      suppose
A8:     a in p & b = q; then
        [z,t] = [a,p] by A4,A2,Th68;
        hence thesis by A1,A4,A8,Th54;
      end;
      suppose
A9:     a = p & b in q; then
        [z,t] = [a,b] by A5,A4,Th69;
        hence thesis by A1,A4,A9,Th55;
      end;
      suppose
        a = p & b = q;
        hence thesis by A1,A4,A2,Th66;
      end;
      suppose
A10:     a = p & q in b; then
        [z,t] = [q,b] by A4,A2,Th70;
        hence thesis by A1,A4,A10,Th57;
      end;
      suppose
A11:     a = q & q in b; then
        [z,t] = [p,b] by A4,A2,Th70;
        hence thesis by A1,A4,A11,Th58;
      end;
      suppose
A12:     p in a & q = b; then
        [z,t] = [a,b] by A4,A5,Th69;
        hence thesis by A1,A4,A12,Th56;
      end;
    end;
    now assume
      [x,y] in j.:ws;  then
      consider a,b being object such that
A13:   [a,b] in ws & [a,b] in dom j & [x,y] = j.(a,b) by Th5;
A14:   j.(p,q) = [p,q] by A2,Th66;
        reconsider a,b as set by TARSKI:1;
      [a,b] in inversions s implies
      a in dom s & b in dom s & a in b by Th46;
      then
A15:   a in b & a in dom T & b in dom T by A13,A3;
      then reconsider a,b as Element of dom T;
      a = p & b = q by A2,A13,A14,A15,Lm1;
      hence [x,y] in ws by A13;
    end;
    hence thesis by A1,Th51;
  end;
