
theorem
  for L being Lattice,
      F being Filter of L holds
    F is prime iff
      F` is Ideal of L or F` = {}
  proof
    let L be Lattice,
        I be Filter of L;
    set F = I`;
    thus I is prime implies F is Ideal of L or F = {}
    proof
      assume I is prime; then
  A1: for x,y being Element of L st x "\/" y in I holds x in I or y in I
        by FILTER_0:def 5;
  A2: F is join-closed
      proof
        let x,y be Element of L;
        assume x in F & y in F;
        then (not x in I) & not y in I by XBOOLE_0:def 5;
        hence thesis by A1,SUBSET_1:29;
      end;
      F is initial
      proof
        let x,y be Element of L;
        assume that
  A5:   x [= y and
  A4:   y in F;
        x in I implies y in I by A5,LATTICES:def 23;
        hence thesis by A4,XBOOLE_0:def 5;
      end;
      hence thesis by A2;
    end;
    assume
A6: I` is Ideal of L or I` = {};
    for x, y being Element of L holds
      x "\/" y in I iff x in I or y in I
    proof
      let x,y be Element of L;
      hereby
        assume x "\/" y in I; then
  T1:   not x "\/" y in F by XBOOLE_0:def 5;
        per cases by A6;
        suppose F is Ideal of L; then
          not x in F or not y in F by T1,FILTER_2:21;
          hence x in I or y in I by XBOOLE_0:def 5;
        end;
        suppose
      T2: F = {};
          I = F`;
          hence x in I or y in I by T2;
        end;
      end;
      assume x in I or y in I; then
  T4: not x in F or not y in F by XBOOLE_0:def 5;
      per cases by A6;
      suppose F is Ideal of L; then
        not x "\/" y in F by FILTER_2:86,T4;
        hence x "\/" y in I by XBOOLE_0:def 5;
      end;
      suppose
    T2: F = {};
        I = F`;
        hence x "\/" y in I by T2;
      end;
    end;
    hence thesis by FILTER_0:def 5;
  end;
