
theorem Th23:
  for L being complete Lattice for D being Subset of L holds D is
  supremum-dense iff for a being Element of L holds a = "\/"({d where d is
  Element of L: d in D & d [= a},L)
proof
  let L be complete Lattice;
  let D be Subset of L;
A1: now
    assume
A2: D is supremum-dense;
    thus for a being Element of L holds a = "\/"({d where d is Element of L: d
    in D & d [= a},L)
    proof
      let a be Element of L;
      set X = {d where d is Element of L: d in D & d [= a};
      consider D9 being Subset of D such that
A3:   a = "\/"(D9,L) by A2;
      for x being object holds x in D9 implies x in X
      proof
        let x be object;
        assume
A4:     x in D9;
        then x in D;
        then reconsider x as Element of L;
        D9 is_less_than a by A3,LATTICE3:def 21;
        then x [= a by A4,LATTICE3:def 17;
        hence thesis by A4;
      end;
      then D9 c= X;
      then
A5:   a [= "\/"(X,L) by A3,LATTICE3:45;
      for q being Element of L st q in X holds q [= a
      proof
        let q be Element of L;
        assume q in X;
        then ex q9 being Element of L st q9 = q & q9 in D & q9 [= a;
        hence thesis;
      end;
      then X is_less_than a by LATTICE3:def 17;
      then "\/"(X,L) [= a by LATTICE3:def 21;
      hence thesis by A5,LATTICES:8;
    end;
  end;
  now
    assume
A6: for a being Element of L holds a = "\/"({d where d is Element of
L:  d in D & d [= a},L);
    for a being Element of L holds ex D9 being Subset of D st a = "\/"(D9 ,L)
    proof
      let a be Element of L;
      set X = {d where d is Element of L: d in D & d [= a};
      for x being object holds x in X implies x in D
      proof
        let x be object;
        assume x in X;
        then ex x9 being Element of L st x9 = x & x9 in D & x9 [= a;
        hence thesis;
      end;
      then
A7:   X is Subset of D by TARSKI:def 3;
      a = "\/"(X,L) by A6;
      hence thesis by A7;
    end;
    hence D is supremum-dense;
  end;
  hence thesis by A1;
end;
