
theorem Th70:
  for L be continuous lower-bounded LATTICE for B be with_bottom
  CLbasis of L st for B1 be with_bottom CLbasis of L holds B c= B1 for J be
  Element of InclPoset Ids subrelstr B holds J = waybelow "\/"(J,L) /\ B
proof
  let L be continuous lower-bounded LATTICE;
  let B be with_bottom CLbasis of L;
  assume
A1: for B1 be with_bottom CLbasis of L holds B c= B1;
  let J be Element of InclPoset Ids subrelstr B;
  reconsider J1 = J as Ideal of subrelstr B by YELLOW_2:41;
  reconsider J2 = J1 as non empty directed Subset of L by YELLOW_2:7;
  set x = "\/"(J,L);
  set C = (B \ J2) \/ (waybelow x /\ B);
A2: waybelow x /\ B c= B by XBOOLE_1:17;
  B \ J2 c= B by XBOOLE_1:36;
  then
A3: C c= B by A2,XBOOLE_1:8;
A4: now
    let y be Element of L;
    per cases;
    suppose
      not y <= x;
      then consider u be Element of L such that
A5:   u in B and
A6:   not u <= x and
A7:   u << y by Th46;
A8:   now
        let b be Element of L;
        assume
A9:     b is_>=_than waybelow y /\ C;
        b is_>=_than waybelow y /\ B
        proof
          let c be Element of L;
          u <= c "\/" u by YELLOW_0:22;
          then
A10:      not c "\/" u <= x by A6,YELLOW_0:def 2;
          assume
A11:      c in waybelow y /\ B;
          then c in B by XBOOLE_0:def 4;
          then sup {c,u} in B by A5,Th18;
          then
A12:      c "\/" u in B by YELLOW_0:41;
          J is_<=_than x by YELLOW_0:32;
          then not c "\/" u in J by A10;
          then c "\/" u in B \ J by A12,XBOOLE_0:def 5;
          then
A13:      c "\/" u in C by XBOOLE_0:def 3;
          c in waybelow y by A11,XBOOLE_0:def 4;
          then c << y by WAYBEL_3:7;
          then c "\/" u << y by A7,WAYBEL_3:3;
          then c "\/" u in waybelow y by WAYBEL_3:7;
          then c "\/" u in waybelow y /\ C by A13,XBOOLE_0:def 4;
          then
A14:      c "\/" u <= b by A9;
          c <= c "\/" u by YELLOW_0:22;
          hence c <= b by A14,YELLOW_0:def 2;
        end;
        hence sup(waybelow y /\ B) <= b by YELLOW_0:32;
      end;
A15:  waybelow y /\ B is_<=_than sup(waybelow y /\ B) by YELLOW_0:32;
      sup(waybelow y /\ B) is_>=_than waybelow y /\ C
      proof
        let b be Element of L;
        assume
A16:    b in waybelow y /\ C;
        then
A17:    b in C by XBOOLE_0:def 4;
        b in waybelow y by A16,XBOOLE_0:def 4;
        then b in waybelow y /\ B by A3,A17,XBOOLE_0:def 4;
        hence b <= sup(waybelow y /\ B) by A15;
      end;
      then sup(waybelow y /\ B) = sup(waybelow y /\ C) by A8,YELLOW_0:32;
      hence y = sup(waybelow y /\ C) by Def7;
    end;
    suppose
A18:  y <= x;
A19:  waybelow y /\ B c= waybelow y /\ C
      proof
        let a be object;
        assume
A20:    a in waybelow y /\ B;
        then reconsider a1 = a as Element of L;
A21:    a in waybelow y by A20,XBOOLE_0:def 4;
        then a1 << y by WAYBEL_3:7;
        then a1 << x by A18,WAYBEL_3:2;
        then
A22:    a1 in waybelow x by WAYBEL_3:7;
        a in B by A20,XBOOLE_0:def 4;
        then a in waybelow x /\ B by A22,XBOOLE_0:def 4;
        then a in C by XBOOLE_0:def 3;
        hence thesis by A21,XBOOLE_0:def 4;
      end;
      waybelow y /\ C c= waybelow y /\ B by A3,XBOOLE_1:26;
      then waybelow y /\ B = waybelow y /\ C by A19;
      hence y = sup(waybelow y /\ C) by Def7;
    end;
  end;
A23: subrelstr B is join-inheriting by Def2;
  subrelstr C is join-inheriting
  proof
    let a,b be Element of L;
    assume that
A24: a in the carrier of subrelstr C and
A25: b in the carrier of subrelstr C and
A26: ex_sup_of {a,b},L;
A27: b in C by A25,YELLOW_0:def 15;
A28: a in C by A24,YELLOW_0:def 15;
    then
A29: sup {a,b} in B by A3,A26,A27,Th16;
    reconsider a1 = a, b1 = b as Element of subrelstr B by A3,A28,A27,
YELLOW_0:def 15;
A30: a1 <= a1 "\/" b1 by YELLOW_0:22;
A31: b1 <= a1 "\/" b1 by YELLOW_0:22;
    now
      per cases by A28,A27,XBOOLE_0:def 3;
      suppose
        a in B \ J & b in B \ J;
        then
A32:    not a in J by XBOOLE_0:def 5;
        not a "\/" b in J
        proof
          assume a "\/" b in J;
          then a1 "\/" b1 in J1 by A23,YELLOW_0:70;
          hence contradiction by A30,A32,WAYBEL_0:def 19;
        end;
        then not sup {a,b} in J by YELLOW_0:41;
        then sup {a,b} in B \ J by A29,XBOOLE_0:def 5;
        hence sup {a,b} in C by XBOOLE_0:def 3;
      end;
      suppose
        a in B \ J & b in waybelow x /\ B;
        then
A33:    not a in J by XBOOLE_0:def 5;
        not a "\/" b in J
        proof
          assume a "\/" b in J;
          then a1 "\/" b1 in J1 by A23,YELLOW_0:70;
          hence contradiction by A30,A33,WAYBEL_0:def 19;
        end;
        then not sup {a,b} in J by YELLOW_0:41;
        then sup {a,b} in B \ J by A29,XBOOLE_0:def 5;
        hence sup {a,b} in C by XBOOLE_0:def 3;
      end;
      suppose
        a in waybelow x /\ B & b in B \ J;
        then
A34:    not b in J by XBOOLE_0:def 5;
        not a "\/" b in J
        proof
          assume a "\/" b in J;
          then a1 "\/" b1 in J1 by A23,YELLOW_0:70;
          hence contradiction by A31,A34,WAYBEL_0:def 19;
        end;
        then not sup {a,b} in J by YELLOW_0:41;
        then sup {a,b} in B \ J by A29,XBOOLE_0:def 5;
        hence sup {a,b} in C by XBOOLE_0:def 3;
      end;
      suppose
A35:    a in waybelow x /\ B & b in waybelow x /\ B;
        then b in waybelow x by XBOOLE_0:def 4;
        then
A36:    b << x by WAYBEL_3:7;
        a in waybelow x by A35,XBOOLE_0:def 4;
        then a << x by WAYBEL_3:7;
        then a "\/" b << x by A36,WAYBEL_3:3;
        then a "\/" b in waybelow x by WAYBEL_3:7;
        then sup {a,b} in waybelow x by YELLOW_0:41;
        then sup {a,b} in waybelow x /\ B by A29,XBOOLE_0:def 4;
        hence sup {a,b} in C by XBOOLE_0:def 3;
      end;
    end;
    hence thesis by YELLOW_0:def 15;
  end;
  then
A37: C is join-closed;
  Bottom L << x by WAYBEL_3:4;
  then
A38: Bottom L in waybelow x by WAYBEL_3:7;
  reconsider C as CLbasis of L by A37,A4,Def7;
  Bottom L in B by Def8;
  then Bottom L in waybelow x /\ B by A38,XBOOLE_0:def 4;
  then Bottom L in C by XBOOLE_0:def 3;
  then C is with_bottom;
  then B c= C by A1;
  then
A39: B = C by A3;
A40: J c= waybelow x /\ B
  proof
    let a be object;
    assume
A41: a in J;
    then a in J1;
    then a in the carrier of subrelstr B;
    then
A42: a in C by A39,YELLOW_0:def 15;
    not a in B \ J2 by A41,XBOOLE_0:def 5;
    hence thesis by A42,XBOOLE_0:def 3;
  end;
  waybelow x /\ B c= J
  proof
    let a be object;
    assume
A43: a in waybelow x /\ B;
    then reconsider a1 = a as Element of L;
    a in B by A43,XBOOLE_0:def 4;
    then reconsider a2 = a as Element of subrelstr B by YELLOW_0:def 15;
    a in waybelow x by A43,XBOOLE_0:def 4;
    then a1 << x by WAYBEL_3:7;
    then consider d1 be Element of L such that
A44: d1 in J2 and
A45: a1 <= d1 by WAYBEL_3:def 1;
    reconsider d2 = d1 as Element of subrelstr B by A44;
    a2 <= d2 by A45,YELLOW_0:60;
    hence thesis by A44,WAYBEL_0:def 19;
  end;
  hence thesis by A40;
end;
