reserve I for non empty set;
reserve M for ManySortedSet of I;
reserve Y,x,y,i for set;
reserve r,r1,r2 for Real;

theorem Th21:
  ex L9 be SubLattice of RealSubLatt(In(0,REAL),In(1,REAL))
   st L9 is \/-inheriting
  non /\-inheriting
proof
  set B = {0,1} \/ ].1/2,1.[;
  set L = RealSubLatt(In(0,REAL),In(1,REAL));
  set R = Real_Lattice;
A1: B c= {0} \/ { x where x is Real: 1/2 < x & x <= 1 }
  proof
    let x1 be object;
    assume
A2: x1 in B;
    now
      per cases by A2,XBOOLE_0:def 3;
      suppose
        x1 in {0,1};
        then x1 = 0 or x1 = 1 by TARSKI:def 2;
        then x1 in {0} or x1 in { x where x is Real: 1/2 < x & x
        <= jj } by TARSKI:def 1;
        hence thesis by XBOOLE_0:def 3;
      end;
      suppose
        x1 in ].1/2,1.[;
        then x1 in { r : 1/2 < r & r < 1 } by RCOMP_1:def 2;
        then consider y be Real such that
A3:     x1 = y and
A4:     1/2 < y & y < 1;
        y in { x where x is Real : 1/2 < x & x <= 1 } by A4;
        hence thesis by A3,XBOOLE_0:def 3;
      end;
    end;
    hence thesis;
  end;
  {0} \/ { x where x is Real : 1/2 < x & x <= 1 } c= B
  proof
    let x1 be object;
    assume
A5: x1 in {0} \/ { x where x is Real : 1/2 < x & x <= 1 };
    now
      per cases by A5,XBOOLE_0:def 3;
      suppose
        x1 in {0};
        then x1 = 0 by TARSKI:def 1;
        then x1 in {0,1} by TARSKI:def 2;
        hence thesis by XBOOLE_0:def 3;
      end;
      suppose
        x1 in { x where x is Real : 1/2 < x & x <= 1 };
        then consider y be Real such that
A6:     x1 = y and
A7:     1/2 < y and
A8:     y <= 1;
        y < 1 or y = 1 by A8,XXREAL_0:1;
        then y in { r : 1/2 < r & r < 1 } or y = 1 by A7;
        then y in ].1/2,1.[ or y in {0,1} by RCOMP_1:def 2,TARSKI:def 2;
        hence thesis by A6,XBOOLE_0:def 3;
      end;
    end;
    hence thesis;
  end;
  then
A9: B = {0} \/ { x where x is Real : 1/2 < x & x <= 1 } by A1,
XBOOLE_0:def 10;
A10: 0 in { r : 0 <= r & r <= 1 };
  then reconsider A = [.0,jj.] as non empty set by RCOMP_1:def 1;
A11: the L_meet of L = minreal||[.0,jj.] by Def4;
  reconsider B as non empty set;
A12: the L_join of L = maxreal||[.0,jj.] by Def4;
A13: A = the carrier of L by Def4;
  then reconsider Ma = maxreal||A, Mi = minreal||A as BinOp of A by Def4;
A14: now
    let x1 be object;
    assume
A15: x1 in B;
    now
      per cases by A1,A15,XBOOLE_0:def 3;
      suppose
        x1 in {0};
        then x1 = 0 by TARSKI:def 1;
        hence x1 in A by A10,RCOMP_1:def 1;
      end;
      suppose
        x1 in { x where x is Real: 1/2 < x & x <= 1 };
        then ex y be Real st x1 = y & 1/2 < y & y <= 1;
        then x1 in { r : 0 <= r & r <= 1 };
        hence x1 in A by RCOMP_1:def 1;
      end;
    end;
    hence x1 in A;
  end;
  then
A16: B c= A;
  then
A17: [:B,B:] c= [:A,A:] by ZFMISC_1:96;
  then reconsider ma = Ma||B, mi = Mi||B as Function of [:B,B:],A by FUNCT_2:32
;
A18: for x1 being Element of A holds x1 is Element of R
      by REAL_LAT:def 3,XREAL_0:def 1;
A19: dom mi = [:B,B:] by FUNCT_2:def 1;
A20: now
    let x9 be object;
    assume
A21: x9 in dom mi;
    then consider x1,x2 be object such that
A22: x9 = [x1,x2] by RELAT_1:def 1;
A23: x2 in B by A21,A22,ZFMISC_1:87;
A24: x1 in B by A21,A22,ZFMISC_1:87;
    now
      per cases by A1,A24,XBOOLE_0:def 3;
      suppose
        x1 in {0};
        then
A25:    x1 = 0 by TARSKI:def 1;
        now
          per cases by A1,A23,XBOOLE_0:def 3;
          suppose
            x2 in {0};
            then
A26:        x2 = 0 by TARSKI:def 1;
            mi.x9 = Mi. [x1,x2] by A21,A22,FUNCT_1:49
              .= minreal.(x1,x2) by A17,A21,A22,FUNCT_1:49
              .= min(0,0) by A25,A26,REAL_LAT:def 1
              .= 0;
            then mi.x9 in {0} by TARSKI:def 1;
            hence mi.x9 in B by A9,XBOOLE_0:def 3;
          end;
          suppose
            x2 in { x where x is Real : 1/2 < x & x <= 1 };
            then consider y2 be Real such that
A27:        x2 = y2 and
A28:        1/2 < y2 & y2 <= 1;
            reconsider y2 as Real;
            mi.x9 = Mi. [x1,x2] by A21,A22,FUNCT_1:49
              .= minreal.(x1,x2) by A17,A21,A22,FUNCT_1:49
              .= min(0,y2) by A25,A27,REAL_LAT:def 1;
            then mi.x9 = 0 or mi.x9 = y2 by XXREAL_0:15;
            then
            mi.x9 in {0} or mi.x9 in { x where x is Real : 1/2
            < x & x <= 1 } by A28,TARSKI:def 1;
            hence mi.x9 in B by A9,XBOOLE_0:def 3;
          end;
        end;
        hence mi.x9 in B;
      end;
      suppose
        x1 in { x where x is Real : 1/2 < x & x <= 1 };
        then consider y1 be Real such that
A29:    x1 = y1 and
A30:    1/2 < y1 & y1 <= 1;
        reconsider y1 as Real;
        now
          per cases by A1,A23,XBOOLE_0:def 3;
          suppose
            x2 in {0};
            then
A31:        x2 = 0 by TARSKI:def 1;
            mi.x9 = Mi. [x1,x2] by A21,A22,FUNCT_1:49
              .= minreal.(x1,x2) by A17,A21,A22,FUNCT_1:49
              .= min(y1,0) by A29,A31,REAL_LAT:def 1;
            then mi.x9 = y1 or mi.x9 = 0 by XXREAL_0:15;
            then mi.x9 in { x where x is Real : 1/2 < x & x <= 1 }
            or mi.x9 in {0} by A30,TARSKI:def 1;
            hence mi.x9 in B by A9,XBOOLE_0:def 3;
          end;
          suppose
            x2 in { x where x is Real : 1/2 < x & x <= 1 };
            then consider y2 be Real such that
A32:        x2 = y2 and
A33:        1/2 < y2 & y2 <= 1;
            reconsider y2 as Real;
            mi.x9 = Mi. [x1,x2] by A21,A22,FUNCT_1:49
              .= minreal.(x1,x2) by A17,A21,A22,FUNCT_1:49
              .= min(y1,y2) by A29,A32,REAL_LAT:def 1;
            then mi.x9 = y1 or mi.x9 = y2 by XXREAL_0:15;
            then mi.x9 in { x where x is Real : 1/2 < x & x <= 1 }
            by A30,A33;
            hence mi.x9 in B by A9,XBOOLE_0:def 3;
          end;
        end;
        hence mi.x9 in B;
      end;
    end;
    hence mi.x9 in B;
  end;
A34: dom ma = [:B,B:] by FUNCT_2:def 1;
A35: now
    let x9 be object;
    assume
A36: x9 in dom ma;
    then consider x1,x2 be object such that
A37: x9 = [x1,x2] by RELAT_1:def 1;
A38: x2 in B by A36,A37,ZFMISC_1:87;
A39: x1 in B by A36,A37,ZFMISC_1:87;
    now
      per cases by A1,A39,XBOOLE_0:def 3;
      suppose
        x1 in {0};
        then
A40:    x1 = 0 by TARSKI:def 1;
        now
          per cases by A1,A38,XBOOLE_0:def 3;
          suppose
            x2 in {0};
            then
A41:        x2 = 0 by TARSKI:def 1;
            ma.x9 = Ma. [x1,x2] by A36,A37,FUNCT_1:49
              .= maxreal.(x1,x2) by A17,A36,A37,FUNCT_1:49
              .= max(0,0) by A40,A41,REAL_LAT:def 2
              .= 0;
            then ma.x9 in {0} by TARSKI:def 1;
            hence ma.x9 in B by A9,XBOOLE_0:def 3;
          end;
          suppose
            x2 in { x where x is Real : 1/2 < x & x <= 1 };
            then consider y2 be Real such that
A42:        x2 = y2 and
A43:        1/2 < y2 & y2 <= 1;
            reconsider y2 as Real;
            ma.x9 = Ma. [x1,x2] by A36,A37,FUNCT_1:49
              .= maxreal.(x1,x2) by A17,A36,A37,FUNCT_1:49
              .= max(0,y2) by A40,A42,REAL_LAT:def 2;
            then ma.x9 = 0 or ma.x9 = y2 by XXREAL_0:16;
            then
            ma.x9 in {0} or ma.x9 in { x where x is Real : 1/2
            < x & x <= 1 } by A43,TARSKI:def 1;
            hence ma.x9 in B by A9,XBOOLE_0:def 3;
          end;
        end;
        hence ma.x9 in B;
      end;
      suppose
        x1 in { x where x is Real : 1/2 < x & x <= 1 };
        then consider y1 be Real such that
A44:    x1 = y1 and
A45:    1/2 < y1 & y1 <= 1;
        reconsider y1 as Real;
        now
          per cases by A1,A38,XBOOLE_0:def 3;
          suppose
            x2 in {0};
            then
A46:        x2 = 0 by TARSKI:def 1;
            ma.x9 = Ma. [x1,x2] by A36,A37,FUNCT_1:49
              .= maxreal.(x1,x2) by A17,A36,A37,FUNCT_1:49
              .= max(y1,0) by A44,A46,REAL_LAT:def 2;
            then ma.x9 = y1 or ma.x9 = 0 by XXREAL_0:16;
            then ma.x9 in { x where x is Real: 1/2 < x & x <= 1 }
            or ma.x9 in {0} by A45,TARSKI:def 1;
            hence ma.x9 in B by A9,XBOOLE_0:def 3;
          end;
          suppose
            x2 in { x where x is Real : 1/2 < x & x <= 1 };
            then consider y2 be Real such that
A47:        x2 = y2 and
A48:        1/2 < y2 & y2 <= 1;
            reconsider y2 as Real;
            ma.x9 = Ma. [x1,x2] by A36,A37,FUNCT_1:49
              .= maxreal.(x1,x2) by A17,A36,A37,FUNCT_1:49
              .= max(y1,y2) by A44,A47,REAL_LAT:def 2;
            then ma.x9 = y1 or ma.x9 = y2 by XXREAL_0:16;
            then ma.x9 in { x where x is Real: 1/2 < x & x <= 1 }
            by A45,A48;
            hence ma.x9 in B by A9,XBOOLE_0:def 3;
          end;
        end;
        hence ma.x9 in B;
      end;
    end;
    hence ma.x9 in B;
  end;
  reconsider mi as BinOp of B by A19,A20,FUNCT_2:3;
  reconsider ma as BinOp of B by A34,A35,FUNCT_2:3;
  reconsider L9 = LattStr (# B, ma, mi #) as non empty LattStr;
A49: now
    let a,b be Element of L9;
    thus a"\/"b = (the L_join of L9).(a,b) by LATTICES:def 1
      .= (maxreal||A). [a,b] by FUNCT_1:49
      .= maxreal.(a,b) by A17,FUNCT_1:49;
    thus a"/\"b = (the L_meet of L9).(a,b) by LATTICES:def 2
      .= (minreal||A). [a,b] by FUNCT_1:49
      .= minreal.(a,b) by A17,FUNCT_1:49;
  end;
  reconsider L as complete Lattice by Th20;
A50: now
    let x1 be Element of B;
    now
      per cases by A9,XBOOLE_0:def 3;
      suppose
        x1 in {0};
        then x1 = 0 by TARSKI:def 1;
        hence x1 is Element of L by A10,A13,RCOMP_1:def 1;
      end;
      suppose
        x1 in { x where x is Real : 1/2 < x & x <= 1 };
        then ex y be Real st x1 = y & 1/2 < y & y <= 1;
        then x1 in { r : 0 <= r & r <= 1 };
        hence x1 is Element of L by A13,RCOMP_1:def 1;
      end;
    end;
    hence x1 is Element of L;
  end;
A51: now
    let p,q be Element of L9;
    reconsider p9 = p, q9 = q as Element of L by A50;
    reconsider p9, q9 as Element of R by A13,A18;
    thus p"\/"q = maxreal.(p,q) by A49
      .= maxreal.(q9,p9) by REAL_LAT:1
      .= q"\/"p by A49;
  end;
A52: now
    let p,q be Element of L9;
    reconsider p9 = p, q9 = q as Element of L by A50;
    reconsider p9, q9 as Element of R by A13,A18;
    thus p"/\"(p"\/"q) = minreal.(p,p"\/"q) by A49
      .= minreal.(p9,maxreal.(p9,q9)) by A49
      .= p by REAL_LAT:6;
  end;
A53: now
    let p,q be Element of L9;
    reconsider p9 = p, q9 = q as Element of L by A50;
    reconsider p9, q9 as Element of R by A13,A18;
    thus p"/\"q = minreal.(p,q) by A49
      .= minreal.(q9,p9) by REAL_LAT:2
      .= q"/\"p by A49;
  end;
A54: now
    let p,q be Element of L9;
    reconsider p9 = p, q9 = q as Element of L by A50;
    reconsider p9, q9 as Element of R by A13,A18;
    thus (p"/\"q)"\/"q = maxreal.(p"/\"q,q) by A49
      .= maxreal.(minreal.(p9,q9),q9) by A49
      .= q by REAL_LAT:5;
  end;
A55: now
    let p,q,r be Element of L9;
    reconsider p9 = p, q9 = q, r9 = r as Element of L by A50;
    reconsider p9, q9, r9 as Element of R by A13,A18;
    thus p"/\"(q"/\"r) = minreal.(p,q"/\"r) by A49
      .= minreal.(p,minreal.(q,r)) by A49
      .= minreal.(minreal.(p9,q9),r9) by REAL_LAT:4
      .= minreal.(p"/\"q,r) by A49
      .= (p"/\"q)"/\"r by A49;
  end;
  now
    let p,q,r be Element of L9;
    reconsider p9 = p, q9 = q, r9 = r as Element of L by A50;
    reconsider p9, q9, r9 as Element of R by A13,A18;
    thus p"\/"(q"\/"r) = maxreal.(p,q"\/"r) by A49
      .= maxreal.(p,maxreal.(q,r)) by A49
      .= maxreal.(maxreal.(p9,q9),r9) by REAL_LAT:3
      .= maxreal.(p"\/"q,r) by A49
      .= (p"\/"q)"\/"r by A49;
  end;
  then L9 is join-commutative join-associative meet-absorbing
  meet-commutative meet-associative join-absorbing by A51,A54,A53,A55,A52,
LATTICES:def 4,def 5,def 6,def 7,def 8,def 9;
  then reconsider L9 as Lattice;
  reconsider L9 as SubLattice of
    RealSubLatt(In(0,REAL),In(1,REAL)) by A13,A12,A11,A16,
NAT_LAT:def 12;
  take L9;
  now
    let X be Subset of L9;
    thus "\/" (X,L) in the carrier of L9
    proof
      0 in { r : 0 <= r & r <= 1 };
      then reconsider w = 0 as Element of L by A13,RCOMP_1:def 1;
A56:  X is_less_than "\/" (X,L) by LATTICE3:def 21;
      "\/" (X,L) in [.0,1.] by A13;
      then "\/" (X,L) in { r : 0 <= r & r <= 1 } by RCOMP_1:def 1;
      then consider y be Real such that
A57:  y = "\/" (X,L) and
      0 <= y and
A58:  y <= 1;
      reconsider y as Real;
      assume
A59:  not "\/" (X,L) in the carrier of L9;
      then not "\/" (X,L) in { x where x is Real : 1/2 < x & x <=
      1 } by A9,XBOOLE_0:def 3;
      then
A60:  y <= 1/2 by A57,A58;
      now
        let z9 be object;
        assume
A61:    z9 in X;
        then reconsider z = z9 as Element of L9;
        reconsider z as Element of L by A13,A14;
A62:    z [= "\/" (X,L) by A56,A61;
        reconsider z1 = z as Real;
        reconsider z1 as Real;
        min(z1,y) = minreal.(z1,"\/" (X,L)) by A57,REAL_LAT:def 1
          .= (minreal||A). [z,"\/" (X,L)] by A13,FUNCT_1:49
          .= (minreal||A).(z,"\/" (X,L))
          .= z "/\" "\/" (X,L) by A11,LATTICES:def 2
          .= z1 by A62,LATTICES:4;
        then z1 <= y by XXREAL_0:def 9;
        then y + z1 <= 1/2 + y by A60,XREAL_1:7;
        then for v be Real holds not (z1 = v & 1/2 < v & v <= 1)
        by XREAL_1:6;
        then not z1 in { x where x is Real: 1/2 < x & x <= 1 };
        hence z9 in {0} by A9,XBOOLE_0:def 3;
      end;
      then
A63:  X c= {0};
      now
        per cases by A63,ZFMISC_1:33;
        suppose
A64:      X = {};
A65:      now
            let r1 be Element of L;
            assume X is_less_than r1;
            r1 in [.0,1.] by A13;
            then r1 in { r : 0 <= r & r <= 1 } by RCOMP_1:def 1;
            then consider e be Real such that
A66:        r1 = e and
A67:        0 <= e and
            e <= 1;
            reconsider e as Real;
            w "/\" r1 = (minreal||A).(w,r1) by A11,LATTICES:def 2
              .= minreal. [w,r1] by A13,FUNCT_1:49
              .= minreal.(w,r1)
              .= min(0,e) by A66,REAL_LAT:def 1
              .= w by A67,XXREAL_0:def 9;
            hence w [= r1 by LATTICES:4;
          end;
          for q be Element of L st q in X holds q [= w by A64;
          then X is_less_than w;
          then "\/" (X,L) = w by A65,LATTICE3:def 21;
          then "\/" (X,L) in {0} by TARSKI:def 1;
          hence contradiction by A9,A59,XBOOLE_0:def 3;
        end;
        suppose
          X = {0};
          then "\/" (X,L) = w by LATTICE3:42;
          then "\/" (X,L) in {0} by TARSKI:def 1;
          hence contradiction by A9,A59,XBOOLE_0:def 3;
        end;
      end;
      hence contradiction;
    end;
  end;
  hence L9 is \/-inheriting;
  now
    1/2 in { x where x is Real: 0 <= x & x <= 1 };
    then reconsider z = 1/2 as Element of L by A13,RCOMP_1:def 1;
    set X = { x where x is Real : 1/2 < x & x <= 1 };
    for y be Real holds not ( y = 1/2 & 1/2 < y & y <= 1);
    then
A68: ( not 1/2 in {0})& not 1/2 in { x where x is Real: 1/2 <
    x & x <= 1 } by TARSKI:def 1;
    for x1 be object st x1 in { x where x is Real: 1/2 < x & x
    <= 1 } holds x1 in B by A9,XBOOLE_0:def 3;
    then reconsider X as Subset of L9 by TARSKI:def 3;
    take X;
A69: now
      let b be Element of L;
      b in A by A13;
      then b in { r : 0 <= r & r <= 1 } by RCOMP_1:def 1;
      then consider b9 be Real such that
A70:  b = b9 and
A71:  0 <= b9 and
A72:  b9 <= 1;
      reconsider b9 as Real;
      assume
A73:  b is_less_than X;
A74:  b9 <= 1/2
      proof
        assume
A75:    1/2 < b9;
        then b9 in X by A72;
        then
A76:    b = "/\" (X,L) by A70,A73,LATTICE3:41;
        1/2 + b9 < b9 + b9 by A75,XREAL_1:6;
        then
A77:    (1/2 + b9)/2 < (b9 + b9)/2 by XREAL_1:74;
        then (1/2 + b9)/2 + b9 <= b9 + 1 by A72,XREAL_1:7;
        then
A78:    (1/2 + b9)/2 <= 1 by XREAL_1:6;
        then (1/2 + b9)/2 in { r : 0 <= r & r <= 1} by A71;
        then reconsider c = (1/2 + b9)/2 as Element of L by A13,RCOMP_1:def 1;
        reconsider cc = c as Real;
        1/2 + 1/2 < b9 + 1/2 by A75,XREAL_1:6;
        then 1/2 < (1/2 + b9)/2 by XREAL_1:74;
        then (1/2 + b9)/2 in X by A78;
        then b [= c by A76,LATTICE3:38;
        then b9 = b "/\" c by A70,LATTICES:4
          .= (minreal||A).(b,c) by A11,LATTICES:def 2
          .= minreal. [b,c] by A13,FUNCT_1:49
          .= minreal.(b,cc)
          .= min(b9,(1/2 + b9)/2) by A70,REAL_LAT:def 1;
        hence contradiction by A77,XXREAL_0:def 9;
      end;
      b "/\" z = (minreal||A).(b,z) by A11,LATTICES:def 2
        .= minreal. [b,z] by A13,FUNCT_1:49
        .= minreal.(b,z)
        .= min(b9,jd) by A70,REAL_LAT:def 1
        .= b by A70,A74,XXREAL_0:def 9;
      hence b [= z by LATTICES:4;
    end;
    now
      let q be Element of L;
      assume q in X;
      then
A79:  ex y be Real st q = y & 1/2 < y & y <= 1;
      q in A by A13;
      then q in { r : 0 <= r & r <= 1 } by RCOMP_1:def 1;
      then consider q9 be Real such that
A80:  q = q9 and
      0 <= q9 and
      q9 <= 1;
      reconsider q9 as Real;
      z "/\" q = (minreal||A).(z,q) by A11,LATTICES:def 2
        .= minreal. [z,q] by A13,FUNCT_1:49
        .= minreal.(z,q)
        .= min(jd,q9) by A80,REAL_LAT:def 1
        .= z by A80,A79,XXREAL_0:def 9;
      hence z [= q by LATTICES:4;
    end;
    then z is_less_than X;
    then "/\"(X,L) = jd by A69,LATTICE3:34;
    hence not "/\" (X,L) in the carrier of L9 by A1,A68,XBOOLE_0:def 3;
  end;
  hence thesis;
end;
