
theorem Th30:
  for I being non empty set for J being Poset-yielding non-Empty
ManySortedSet of I for X being Subset of product J holds ex_sup_of X, product J
  iff for i being Element of I holds ex_sup_of pi(X,i), J.i
proof
  let I be non empty set;
  let J be Poset-yielding non-Empty ManySortedSet of I;
  let X be Subset of product J;
  hereby
    set f = sup X;
    assume
A1: ex_sup_of X, product J;
    let i be Element of I;
A2: now
      let x be Element of J.i;
      assume
A3:   pi(X,i) is_<=_than x;
      set g = f+*(i,x);
A4:   dom g = dom f by FUNCT_7:30;
      dom f = I by WAYBEL_3:27;
      then
A5:   g.i = x by FUNCT_7:31;
      now
        let j be Element of I;
        g.j = f.j or g.j = x & j = i by A5,FUNCT_7:32;
        hence g.j is Element of J.j;
      end;
      then reconsider g as Element of product J by A4,WAYBEL_3:27;
A6:   X is_<=_than f by A1,YELLOW_0:30;
      X is_<=_than g
      proof
        let h be Element of product J;
        assume
A7:     h in X;
        then
A8:     h.i in pi(X, i) by CARD_3:def 6;
A9:     h <= f by A6,A7;
        now
          let j be Element of I;
          g.j = f.j or g.j = x & j = i by A5,FUNCT_7:32;
          hence h.j <= g.j by A3,A9,A8,WAYBEL_3:28;
        end;
        hence h <= g by WAYBEL_3:28;
      end;
      then f <= g by A1,YELLOW_0:30;
      hence f.i <= x by A5,WAYBEL_3:28;
    end;
    f is_>=_than X by A1,YELLOW_0:30;
    then f.i is_>=_than pi(X, i) by Th28;
    hence ex_sup_of pi(X, i), J.i by A2,YELLOW_0:30;
  end;
  assume for i being Element of I holds ex_sup_of pi(X,i), J.i;
  then ex f being Element of product J st ( for i being Element of I holds f.i
  = sup pi(X,i))& f is_>=_than X & for g being Element of product J st X
  is_<=_than g holds f <= g by Lm1;
  hence thesis by YELLOW_0:30;
end;
