
theorem :: PROPOSITION 4.21 (ii)
  for L be distributive complete LATTICE st L opp is meet-continuous for
p be Element of L holds p is completely-irreducible implies ex k be Element of
L st k in the carrier of CompactSublatt L & p is_maximal_in (the carrier of L)
  \ uparrow k
proof
  let L be distributive complete LATTICE;
  assume
A1: L opp is meet-continuous;
  let p be Element of L;
  assume
A2: p is completely-irreducible;
  then reconsider
  V = (the carrier of L) \ downarrow p as Open Filter of L by A1,Th29;
  now
    let b be Element of L;
    assume b in (uparrow p) \ {p};
    then b in uparrow p by XBOOLE_0:def 5;
    hence p <= b by WAYBEL_0:18;
  end;
  then p is_<=_than (uparrow p) \ {p} by LATTICE3:def 8;
  then
A3: p <= "/\"((uparrow p) \ {p},L) by YELLOW_0:33;
  "/\"((uparrow p) \ {p},L) <> p by A2,Th19;
  then
A4: p < "/\"((uparrow p) \ {p},L) by A3,ORDERS_2:def 6;
A5: ex_inf_of V,L & (inf V)~ = inf V by LATTICE3:def 6,YELLOW_0:17;
  take k = inf V;
  reconsider V9 = V as non empty directed Subset of L opp by YELLOW_7:27;
A6: ex_inf_of {p~} "/\" V9,L by YELLOW_0:17;
A7: ex_inf_of {p} "\/" V,L & ex_inf_of (uparrow p) \ {p},L by YELLOW_0:17;
A8: {p} "\/" V c= (uparrow p) \ {p}
  proof
    let x be object;
    assume x in {p} "\/" V;
    then x in {p "\/" v where v is Element of L: v in V} by YELLOW_4:15;
    then consider v be Element of L such that
A9: x = p "\/" v and
A10: v in V;
    not v in downarrow p by A10,XBOOLE_0:def 5;
    then not v <= p by WAYBEL_0:17;
    then p "\/" v <> p by YELLOW_0:22;
    then
A11: not p "\/" v in {p} by TARSKI:def 1;
    p <= p "\/" v by YELLOW_0:22;
    then p "\/" v in uparrow p by WAYBEL_0:18;
    hence thesis by A9,A11,XBOOLE_0:def 5;
  end;
A12: p = p~ by LATTICE3:def 6;
  p "\/" k = (p~) "/\" (inf V)~ by YELLOW_7:23
    .= (p~) "/\" "\/"(V,L opp) by A5,YELLOW_7:13
    .= "\/"({p~} "/\" V9,L opp) by A1,WAYBEL_2:def 6
    .= "/\"({p~} "/\" V9,L) by A6,YELLOW_7:13
    .= inf ({p} "\/" V) by A12,Th5;
  then
A13: "/\"((uparrow p) \ {p},L) <= p "\/" k by A7,A8,YELLOW_0:35;
A14: not k <= p
  proof
    assume k <= p;
    then p "\/" k = p by YELLOW_0:24;
    hence contradiction by A13,A4,ORDERS_2:7;
  end;
  uparrow k = V
  proof
    thus uparrow k c= V
    proof
      let x be object;
      assume
A15:  x in uparrow k;
      then reconsider x1 = x as Element of L;
      k <= x1 by A15,WAYBEL_0:18;
      then not x1 <= p by A14,ORDERS_2:3;
      then not x1 in downarrow p by WAYBEL_0:17;
      hence thesis by XBOOLE_0:def 5;
    end;
    let x be object;
    assume
A16: x in V;
    then reconsider x1 = x as Element of L;
    k is_<=_than V by YELLOW_0:33;
    then k <= x1 by A16,LATTICE3:def 8;
    hence thesis by WAYBEL_0:18;
  end;
  then k is compact by WAYBEL_8:2;
  hence k in the carrier of CompactSublatt L by WAYBEL_8:def 1;
A17: not ex y be Element of L st y in (the carrier of L) \ uparrow k & p < y
  proof
    given y be Element of L such that
A18: y in (the carrier of L) \ uparrow k and
A19: p < y;
    not y in uparrow k by A18,XBOOLE_0:def 5;
    then k is_<=_than V & not k <= y by WAYBEL_0:18,YELLOW_0:33;
    then not y in V by LATTICE3:def 8;
    then y in downarrow p by XBOOLE_0:def 5;
    then y <= p by WAYBEL_0:17;
    hence contradiction by A19,ORDERS_2:6;
  end;
  not p in uparrow k by A14,WAYBEL_0:18;
  then p in (the carrier of L) \ uparrow k by XBOOLE_0:def 5;
  hence thesis by A17,WAYBEL_4:55;
end;
