
theorem Th5A:
  for m,n,x,y being Nat st x <= m & n = (m-'x)+y holds x-'(m-'n) = y-'(n-'m)
  proof
    let m,n,x,y be Nat;
    assume Z0: x <= m;
    assume Z1: n = (m-'x)+y;
    then m-'n <= x & n-'m <= y by Th5;
    then
A2: x-'(m-'n) = x-(m-'n) & y-'(n-'m) = y-(n-'m) by XREAL_1:233;
A3: n-y = m-x by Z0,Z1,XREAL_1:233;
    per cases;
    suppose m <= n;
      then
A4:   m-'n = 0 & n-'m = n-m by NAT_2:8,XREAL_1:233;
      hence x-'(m-'n) = x by A2 .= y-n+m by A3
      .= y-'(n-'m) by A2,A4;
    end;
    suppose m > n;
      then
A5:   n-'m = 0 & m-'n = m-n by NAT_2:8,XREAL_1:233;
      hence x-'(m-'n) = x-m+n by A2 .= y by A3
      .= y-'(n-'m) by A2,A5;
    end;
  end;
