reserve A, B, X, Y for set;

theorem Th25:
  for R being lower-bounded sup-Semilattice, X being Subset of [:R
  ,R:] st ex_sup_of (sup_op R).:X,R holds sup_op R preserves_sup_of X
proof
  let R be lower-bounded sup-Semilattice;
  set f = sup_op R;
  let X be Subset of [:R,R:] such that
A1: ex_sup_of f.:X,R and
A2: ex_sup_of X,[:R,R:];
  thus ex_sup_of f.:X,R by A1;
A3: dom f = the carrier of [:R,R:] by FUNCT_2:def 1;
  then
A4: dom f = [:the carrier of R,the carrier of R:] by YELLOW_3:def 2;
A5: for b being Element of R st b is_>=_than f.:X holds f.sup X <= b
  proof
    let b be Element of R such that
A6: b is_>=_than f.:X;
    X is_<=_than [b,b]
    proof
      let c be Element of [:R,R:];
      assume c in X;
      then f.c in f.:X by A3,FUNCT_1:def 6;
      then
A7:   f.c <= b by A6;
      consider s, t being object such that
A8:   s in the carrier of R & t in the carrier of R and
A9:   c = [s,t] by A3,A4,ZFMISC_1:def 2;
      reconsider s, t as Element of R by A8;
A10:  f.c = f.(s,t) by A9
        .= s "\/" t by WAYBEL_2:def 5;
      t <= s "\/" t by YELLOW_0:22;
      then
A11:  t <= b by A7,A10,ORDERS_2:3;
      s <= s "\/" t by YELLOW_0:22;
      then s <= b by A7,A10,ORDERS_2:3;
      hence c <= [b,b] by A9,A11,YELLOW_3:11;
    end;
    then sup X <= [b,b] by A2,YELLOW_0:def 9;
    then f.sup X <= f.(b,b) by WAYBEL_1:def 2;
    then b <= b & f.sup X <= b "\/" b by WAYBEL_2:def 5;
    hence thesis by YELLOW_0:24;
  end;
  X is_<=_than sup X by A2,YELLOW_0:def 9;
  then f.:X is_<=_than f.sup X by YELLOW_2:14;
  hence thesis by A1,A5,YELLOW_0:def 9;
end;
