
theorem Th23:
  for L being distributive LATTICE, I being Ideal of L, F being
  Filter of L st I misses F ex P being Ideal of L st P is prime & I c= P & P
  misses F
proof
  let L be distributive LATTICE, I be Ideal of L, F be Filter of L such that
A1: I misses F;
  set X = {P where P is Ideal of L: I c= P & P misses F};
A2: now
    let A be set;
    assume A in X;
    then ex P being Ideal of L st A = P & I c= P & P misses F;
    hence I c= A & A misses F;
  end;
A3: now
    let Z be set such that
A4: Z <> {} and
A5: Z c= X and
A6: Z is c=-linear;
    Z c= bool the carrier of L
    proof
      let x be object;
      assume x in Z;
      then x in X by A5;
      then ex P being Ideal of L st x = P & I c= P & P misses F;
      hence thesis;
    end;
    then reconsider ZI = Z as Subset-Family of L;
    now
      let A be Subset of L;
      assume A in ZI;
      then A in X by A5;
      then ex P being Ideal of L st A = P & I c= P & P misses F;
      hence A is lower;
    end;
    then reconsider J = union ZI as lower Subset of L by WAYBEL_0:26;
A7: now
      set y = the Element of Z;
      y in Z by A4;
      then
A8:   I c= y by A2,A5;
A9:   y c= J by A4,ZFMISC_1:74;
      hence I c= J by A8;
      thus J is non empty by A8,A9;
      let A,B be Subset of L;
      assume
A10:  A in ZI & B in ZI;
      then A, B are_c=-comparable by A6,ORDINAL1:def 8;
      then A c= B or B c= A;
      then A \/ B = A or A \/ B = B by XBOOLE_1:12;
      hence ex C being Subset of L st C in ZI & A \/ B c= C by A10;
    end;
    now
      let A be Subset of L;
      assume A in ZI;
      then A in X by A5;
      then ex P being Ideal of L st A = P & I c= P & P misses F;
      hence A is directed;
    end;
    then reconsider J as Ideal of L by A7,WAYBEL_0:46;
    now
      let x be object;
      assume x in J;
      then consider A being set such that
A11:  x in A and
A12:  A in Z by TARSKI:def 4;
      A misses F by A2,A5,A12;
      hence not x in F by A11,XBOOLE_0:3;
    end;
    then J misses F by XBOOLE_0:3;
    hence union Z in X by A7;
  end;
  I in X by A1;
  then consider Y being set such that
A13: Y in X and
A14: for Z being set st Z in X & Z <> Y holds not Y c= Z by A3,ORDERS_1:67;
  consider P being Ideal of L such that
A15: P = Y and
A16: I c= P and
A17: P misses F by A13;
  take P;
  hereby
    let x,y be Element of L;
    assume that
A18: x"/\"y in P and
A19: not x in P and
A20: not y in P;
    set Py = downarrow finsups (P \/ {y});
A21: P \/ {y} c= Py by WAYBEL_0:61;
A22: P c= P \/ {y} by XBOOLE_1:7;
    then P c= Py by A21;
    then
A23: I c= Py by A16;
    y in {y} by TARSKI:def 1;
    then y in P \/ {y} by XBOOLE_0:def 3;
    then
A24: y in Py by A21;
    now
      assume Py misses F;
      then Py in X by A23;
      hence contradiction by A14,A15,A20,A21,A22,A24,XBOOLE_1:1;
    end;
    then consider v being object such that
A25: v in Py and
A26: v in F by XBOOLE_0:3;
    set Px = downarrow finsups (P \/ {x});
A27: P \/ {x} c= Px by WAYBEL_0:61;
A28: P c= P \/ {x} by XBOOLE_1:7;
    then P c= Px by A27;
    then
A29: I c= Px by A16;
    x in {x} by TARSKI:def 1;
    then x in P \/ {x} by XBOOLE_0:def 3;
    then
A30: x in Px by A27;
    now
      assume Px misses F;
      then Px in X by A29;
      hence contradiction by A14,A15,A19,A27,A28,A30,XBOOLE_1:1;
    end;
    then consider u being object such that
A31: u in Px and
A32: u in F by XBOOLE_0:3;
    reconsider u, v as Element of L by A31,A25;
    consider u9 being Element of L such that
A33: u9 in P and
A34: u <= u9 "\/" sup {x} by A31,Lm2;
    consider v9 being Element of L such that
A35: v9 in P and
A36: v <= v9 "\/" sup {y} by A25,Lm2;
    set w = u9"\/"v9;
    (v9"\/"u9)"\/"x = v9"\/"(u9"\/"x) by LATTICE3:14;
    then sup {x} = x & w"\/"x >= u9"\/"x by YELLOW_0:22,39;
    then w"\/"x >= u by A34,ORDERS_2:3;
    then
A37: w"\/"x in F by A32,WAYBEL_0:def 20;
    w"\/"y = u9"\/"(v9"\/"y) by LATTICE3:14;
    then sup {y} = y & w"\/"y >= v9"\/"y by YELLOW_0:22,39;
    then w"\/"y >= v by A36,ORDERS_2:3;
    then w"\/"y in F by A26,WAYBEL_0:def 20;
    then (w"\/"x)"/\"(w"\/"y) in F by A37,WAYBEL_0:41;
    then
A38: w"\/"(x"/\"y) in F by WAYBEL_1:5;
    w in P by A33,A35,WAYBEL_0:40;
    then w"\/"(x"/\"y) in P by A18,WAYBEL_0:40;
    hence contradiction by A17,A38,XBOOLE_0:3;
  end;
  thus thesis by A16,A17;
end;
