reserve x,y,Y,Z for set,
  L for LATTICE,
  l for Element of L;

theorem Th23:
  for L being sup-Semilattice, x being Element of L holds x is
co-prime iff for A being finite non empty Subset of L st x <= sup A ex a being
  Element of L st a in A & x <= a
proof
  let L be sup-Semilattice, x be Element of L;
  thus x is co-prime implies for A being finite non empty Subset of L st x <=
  sup A ex a being Element of L st a in A & x <= a
  proof
    assume x is co-prime;
    then
A1: x~ is prime;
    let A be finite non empty Subset of L;
    reconsider A1 = A as finite non empty Subset of L~;
    assume x <= sup A;
    then
A2: x~ >= (sup A)~ by LATTICE3:9;
A3: ex_sup_of A,L by YELLOW_0:54;
    then "\/"(A,L) is_>=_than A by YELLOW_0:def 9;
    then
A4: "\/"(A,L)~ is_<=_than A by YELLOW_7:8;
A5: now
      let y be Element of L~;
      assume y is_<=_than A;
      then ~y is_>=_than A by YELLOW_7:9;
      then ~y >= "\/"(A,L) by A3,YELLOW_0:def 9;
      hence y <= "\/"(A,L)~ by YELLOW_7:2;
    end;
    ex_inf_of A,L~ by A3,YELLOW_7:10;
    then (sup A)~ = (inf A1) by A4,A5,YELLOW_0:def 10;
    then consider a being Element of L~ such that
A6: a in A1 & x~ >= a by A1,A2,Th22;
    take ~a;
    thus thesis by A6,YELLOW_7:2;
  end;
  thus (for A being finite non empty Subset of L st x <= sup A ex a being
  Element of L st a in A & x <= a) implies x is co-prime
  proof
    assume
A7: for A being finite non empty Subset of L st x <= sup A ex a being
    Element of L st a in A & x <= a;
    now
      let a,b be Element of L~;
      set A = {~a,~b};
      assume a "/\" b <= x~;
      then x <= ~(a "/\" b) by YELLOW_7:2;
      then sup A = (~a)"\/"(~b) & x <= (~a)"\/"(~b) by YELLOW_0:41,YELLOW_7:24;
      then consider l being Element of L such that
A8:   l in A and
A9:   x <= l by A7;
      l = ~a or l = ~b by A8,TARSKI:def 2;
      hence a <= x~ or b <= x~ by A9,YELLOW_7:2;
    end;
    then x~ is prime;
    hence thesis;
  end;
end;
