
theorem HelpMaxPrime2:
  for L be Lattice,
      F be Ideal of L,
      a be Element of L,
      G be set st
      G = { x where x is Element of L : ex u being Element of L st
        u in F & x [= a "\/" u } & a in G holds
      G is Ideal of L
  proof
    let L be Lattice;
    let F be Ideal of L;
    let a be Element of L;
    let G be set;
    assume
A1: G = { x where x is Element of L : ex u being Element of L st
      u in F & x [= a "\/" u } & a in G;
    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 by A1;
      thus thesis by S2;
    end; then
    reconsider G as Subset of L;
    set u = the Element of F;
ZD: G is join-closed
    proof
      let p,q be Element of L;
      assume
  P0: p in G & q in G; then
      consider xx being Element of L such that
  P1: xx = p & ex u being Element of L st u in F & xx [= a "\/" u by A1;
      consider u1 being Element of L such that
  P3: u1 in F & p [= a "\/" u1 by P1;
      consider yy being Element of L such that
  P2: yy = q & ex u being Element of L st u in F & yy [= a "\/" u by P0,A1;
      consider u2 being Element of L such that
  P4: u2 in F & q [= a "\/" u2 by P2;
  P6: p "\/" q [= (a "\/" u1) "\/" (a "\/" u2) by P3,P4,FILTER_0:4;
  P7: u1 "\/" u2 in F by P3,P4,FILTER_2:86;
      (a "\/" u1) "\/" (a "\/" u2) = a "\/" u1 "\/" a "\/" u2
        by LATTICES:def 5
        .= (a "\/" a) "\/" u1 "\/" u2 by LATTICES:def 5
        .= a "\/" (u1 "\/" u2) by LATTICES:def 5;
      hence thesis by P7,P6,A1;
    end;
    G is initial
    proof
      let p, q be Element of L;
      assume
Y0:   p [= q & q in G; then
      consider s being Element of L such that
Y1:   s = q & ex u being Element of L st
      u in F & s [= a "\/" u by A1;
      consider u being Element of L such that
Y2:   u in F & s [= a "\/" u by Y1;
      p [= a "\/" u by Y2,Y0,Y1,LATTICES:7;
      hence thesis by Y2,A1;
    end;
    hence thesis by ZD,A1;
end;
