
theorem MaxIPrime:
  for L being distributive Lattice,
      F being Ideal of L st
    F is maximal holds F is prime
  proof
    let L be distributive Lattice,
        F be Ideal of L;
    assume
a5: F is maximal;
    assume F is not prime; then
    consider a, b being Element of L such that
S1: a "/\" b in F & not a in F & not b in F by Lem2;
    set G = { x where x is Element of L : ex u being Element of L st
      u in F & x [= a "\/" u };
    G c= the carrier of L
    proof
      let y be object; assume y in G; then
      consider x being Element of L such that
  S2: y = x & ex u being Element of L st u in F & x [= a "\/" u;
      thus thesis by S2;
    end; then
    reconsider G as Subset of L;
    set u = the Element of F;
    a [= a "\/" u by LATTICES:5; then
ze: a in G;
    reconsider G as Ideal of L by HelpMaxPrime2,ze;
HH: not b in G
    proof
      assume b in G; then
      consider x being Element of L such that
  J1: x = b & ex m being Element of L st
      m in F & x [= a "\/" m;
      consider c being Element of L such that
  J2: c in F & b [= a "\/" c by J1;
      c "/\" b in F by J2,FILTER_2:22; then
      (a "/\" b) "\/" (c "/\" b) in F by FILTER_2:21,S1; then
      (a "\/" c) "/\" b in F by LATTICES:def 11;
      hence thesis by S1,J2,LATTICES:4;
    end;
H1: F c= G
    proof
      let v be object;
      assume
H2:   v in F; then
      reconsider vv = v as Element of L;
      vv [= a "\/" vv by LATTICES:5;
      hence thesis by H2;
    end;
    G <> the carrier of L by HH; then
    G is proper by SUBSET_1:def 6;
    hence thesis by H1,a5,S1,ze;
  end;
