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

theorem ::3.12 (1-6), p.70
  for L being continuous distributive lower-bounded LATTICE for l being
Element of L st l <> Top L holds l is prime iff ex F being Open Filter of L st
  l is_maximal_in (F`)
proof
  let L be continuous distributive lower-bounded LATTICE, l be Element of L;
  set F = (downarrow l)`;
  assume
A1: l <> Top L;
  thus l is prime implies ex F being Open Filter of L st l is_maximal_in (F`)
  proof
A2: for x being Element of L holds waybelow x is non empty directed;
A3: now
      let x be Element of L;
      assume x in F;
      then not x in (downarrow l) by XBOOLE_0:def 5;
      then not x <= l by WAYBEL_0:17;
      then consider y be Element of L such that
A4:   y << x and
A5:   not y <= l by A2,WAYBEL_3:24;
      not y in (downarrow l) by A5,WAYBEL_0:17;
      then y in F by XBOOLE_0:def 5;
      hence ex y be Element of L st y in F & y << x by A4;
    end;
    assume l is prime;
    then reconsider F as Open Filter of L by A1,A3,Def1,Th26;
    take F;
A6: not ex y being Element of L st y in F` &  y > l by WAYBEL_0:17,ORDERS_2:6;
    l <= l;
    then l in (F`) by WAYBEL_0:17;
    hence thesis by A6,WAYBEL_4:55;
  end;
  thus (ex F being Open Filter of L st l is_maximal_in (F`)) implies l is prime
  proof
    assume ex O being Open Filter of L st l is_maximal_in (O`);
    then
A7: l is irreducible by Th13;
    now
      let x,y be Element of L;
      assume x "/\" y <= l;
      then l = l "\/" (x "/\" y) by YELLOW_0:24
        .= (l "\/" x) "/\" (l "\/" y) by WAYBEL_1:5;
      then
A8:  l = (l "\/" x) or l = (l "\/" y) by A7;
      assume ( not x <= l)& not y <= l;
      hence contradiction by A8,YELLOW_0:24;
    end;
    hence thesis;
  end;
end;
