reserve x,X,Y for set;
reserve g,r,r1,r2,p,p1,p2 for Real;
reserve R for Subset of REAL;
reserve seq,seq1,seq2,seq3 for Real_Sequence;
reserve Ns for increasing sequence of NAT;
reserve n for Nat;
reserve W for non empty set;
reserve h,h1,h2 for PartFunc of W,REAL;
reserve e1,e2 for ExtReal;
reserve h,h1,h2 for PartFunc of REAL,REAL;

theorem Th22:
  h|Y is non-decreasing iff for r1,r2 st r1 in Y /\ dom h & r2 in
  Y /\ dom h & r1<r2 holds h.r1 <= h.r2
proof
  thus h|Y is non-decreasing implies for r1,r2 st r1 in Y /\ dom h & r2 in Y
  /\ dom h & r1<r2 holds h.r1 <= h.r2
  proof
    assume
A1: h|Y is non-decreasing;
    let r1,r2 such that
A2: r1 in Y /\ dom h and
A3: r2 in Y /\ dom h and
A4: r1<r2;
A5: r2 in dom(h|Y) by A3,RELAT_1:61;
    then
A6: (h|Y).r2 = h.r2 by FUNCT_1:47;
A7: r1 in dom(h|Y) by A2,RELAT_1:61;
    then (h|Y).r1 = h.r1 by FUNCT_1:47;
    hence thesis by A1,A4,A7,A5,A6;
  end;
  assume
A8: for r1,r2 st r1 in Y /\ dom h & r2 in Y /\ dom h & r1<r2 holds h.r1
  <= h.r2;
  let r1,r2;
  assume that
A9: r1 in dom(h|Y) & r2 in dom(h|Y) and
A10: r1<r2;
A11: (h|Y).r1 = h.r1 & (h|Y).r2 = h.r2 by A9,FUNCT_1:47;
  r1 in Y /\ dom h & r2 in Y /\ dom h by A9,RELAT_1:61;
  hence thesis by A8,A10,A11;
end;
