Article LATTICE7, MML version 4.99.1005

:: LATTICE7:prednot 1 => LATTICE7:pred 1
definition
  let a1 be 1-sorted;
  let a2, a3 be Element of bool the carrier of a1;
  redefine pred A2 c= A3 means
    for b1 being Element of the carrier of a1
          st b1 in a2
       holds b1 in a3;
  reflexivity;
::  for a1 being 1-sorted
::  for a2 being Element of bool the carrier of a1 holds
::     a2 c= a2;
end;

:: LATTICE7:dfs 1
definiens
  let a1 be 1-sorted;
  let a2, a3 be Element of bool the carrier of a1;
To prove
     a2 c= a3
it is sufficient to prove
  thus for b1 being Element of the carrier of a1
          st b1 in a2
       holds b1 in a3;

:: LATTICE7:def 1
theorem
for b1 being 1-sorted
for b2, b3 being Element of bool the carrier of b1 holds
   b2 c= b3
iff
   for b4 being Element of the carrier of b1
         st b4 in b2
      holds b4 in b3;

:: LATTICE7:exreg 1
registration
  let a1 be reflexive transitive antisymmetric with_suprema with_infima RelStr;
  cluster non empty strongly_connected Element of bool the carrier of a1;
end;

:: LATTICE7:modenot 1 => LATTICE7:mode 1
definition
  let a1 be reflexive transitive antisymmetric with_suprema with_infima RelStr;
  let a2, a3 be Element of the carrier of a1;
  assume a2 <= a3;
  mode Chain of A2,A3 -> non empty strongly_connected Element of bool the carrier of a1 means
    a2 in it &
     a3 in it &
     (for b1 being Element of the carrier of a1
           st b1 in it
        holds a2 <= b1 & b1 <= a3);
end;

:: LATTICE7:dfs 2
definiens
  let a1 be reflexive transitive antisymmetric with_suprema with_infima RelStr;
  let a2, a3 be Element of the carrier of a1;
  let a4 be non empty strongly_connected Element of bool the carrier of a1;
To prove
     a4 is Chain of a2,a3
it is sufficient to prove
thus a2 <= a3;
  thus a2 in a4 &
     a3 in a4 &
     (for b1 being Element of the carrier of a1
           st b1 in a4
        holds a2 <= b1 & b1 <= a3);

:: LATTICE7:def 2
theorem
for b1 being reflexive transitive antisymmetric with_suprema with_infima RelStr
for b2, b3 being Element of the carrier of b1
   st b2 <= b3
for b4 being non empty strongly_connected Element of bool the carrier of b1 holds
      b4 is Chain of b2,b3
   iff
      b2 in b4 &
       b3 in b4 &
       (for b5 being Element of the carrier of b1
             st b5 in b4
          holds b2 <= b5 & b5 <= b3);

:: LATTICE7:th 1
theorem
for b1 being reflexive transitive antisymmetric with_suprema with_infima RelStr
for b2, b3 being Element of the carrier of b1
      st b2 <= b3
   holds {b2,b3} is Chain of b2,b3;

:: LATTICE7:funcnot 1 => LATTICE7:func 1
definition
  let a1 be finite reflexive transitive antisymmetric with_suprema with_infima RelStr;
  let a2 be Element of the carrier of a1;
  func height A2 -> Element of NAT means
    (ex b1 being Chain of Bottom a1,a2 st
        it = card b1) &
     (for b1 being Chain of Bottom a1,a2 holds
        card b1 <= it);
end;

:: LATTICE7:def 3
theorem
for b1 being finite reflexive transitive antisymmetric with_suprema with_infima RelStr
for b2 being Element of the carrier of b1
for b3 being Element of NAT holds
      b3 = height b2
   iff
      (ex b4 being Chain of Bottom b1,b2 st
          b3 = card b4) &
       (for b4 being Chain of Bottom b1,b2 holds
          card b4 <= b3);

:: LATTICE7:th 2
theorem
for b1 being finite reflexive transitive antisymmetric with_suprema with_infima RelStr
for b2, b3 being Element of the carrier of b1
      st b2 < b3
   holds height b2 < height b3;

:: LATTICE7:th 3
theorem
for b1 being finite reflexive transitive antisymmetric with_suprema with_infima RelStr
for b2 being strongly_connected Element of bool the carrier of b1
for b3, b4 being Element of the carrier of b1
      st b3 in b2 & b4 in b2
   holds    b3 < b4
   iff
      height b3 < height b4;

:: LATTICE7:th 4
theorem
for b1 being finite reflexive transitive antisymmetric with_suprema with_infima RelStr
for b2 being strongly_connected Element of bool the carrier of b1
for b3, b4 being Element of the carrier of b1
      st b3 in b2 & b4 in b2
   holds    b3 = b4
   iff
      height b3 = height b4;

:: LATTICE7:th 5
theorem
for b1 being finite reflexive transitive antisymmetric with_suprema with_infima RelStr
for b2 being strongly_connected Element of bool the carrier of b1
for b3, b4 being Element of the carrier of b1
      st b3 in b2 & b4 in b2
   holds    b3 <= b4
   iff
      height b3 <= height b4;

:: LATTICE7:th 6
theorem
for b1 being finite reflexive transitive antisymmetric with_suprema with_infima RelStr
for b2 being Element of the carrier of b1 holds
      height b2 = 1
   iff
      b2 = Bottom b1;

:: LATTICE7:th 7
theorem
for b1 being non empty finite reflexive transitive antisymmetric with_suprema with_infima RelStr
for b2 being Element of the carrier of b1 holds
   1 <= height b2;

:: LATTICE7:sch 1
scheme LATTICE7:sch 1
{F1 -> finite reflexive transitive antisymmetric with_suprema with_infima RelStr}:
for b1 being Element of the carrier of F1() holds
   P1[b1]
provided
   for b1 being Element of the carrier of F1()
         st for b2 being Element of the carrier of F1()
                 st b2 < b1
              holds P1[b2]
      holds P1[b1];


:: LATTICE7:exreg 2
registration
  cluster non empty finite total reflexive transitive antisymmetric distributive with_suprema with_infima RelStr;
end;

:: LATTICE7:prednot 2 => LATTICE7:pred 2
definition
  let a1 be reflexive transitive antisymmetric with_suprema with_infima RelStr;
  let a2, a3 be Element of the carrier of a1;
  pred A2 <(1) A3 means
    a2 < a3 &
     (for b1 being Element of the carrier of a1
           st a2 < b1
        holds not b1 < a3);
end;

:: LATTICE7:dfs 4
definiens
  let a1 be reflexive transitive antisymmetric with_suprema with_infima RelStr;
  let a2, a3 be Element of the carrier of a1;
To prove
     a2 <(1) a3
it is sufficient to prove
  thus a2 < a3 &
     (for b1 being Element of the carrier of a1
           st a2 < b1
        holds not b1 < a3);

:: LATTICE7:def 4
theorem
for b1 being reflexive transitive antisymmetric with_suprema with_infima RelStr
for b2, b3 being Element of the carrier of b1 holds
   b2 <(1) b3
iff
   b2 < b3 &
    (for b4 being Element of the carrier of b1
          st b2 < b4
       holds not b4 < b3);

:: LATTICE7:th 8
theorem
for b1 being finite reflexive transitive antisymmetric with_suprema with_infima RelStr
for b2 being non empty Element of bool the carrier of b1 holds
   ex b3 being Element of the carrier of b1 st
      b3 in b2 &
       (for b4 being Element of the carrier of b1
             st b4 in b2
          holds not b3 < b4);

:: LATTICE7:funcnot 2 => LATTICE7:func 2
definition
  let a1 be finite reflexive transitive antisymmetric with_suprema with_infima RelStr;
  let a2 be non empty strongly_connected Element of bool the carrier of a1;
  func max A2 -> Element of the carrier of a1 means
    (for b1 being Element of the carrier of a1
           st b1 in a2
        holds b1 <= it) &
     it in a2;
end;

:: LATTICE7:def 5
theorem
for b1 being finite reflexive transitive antisymmetric with_suprema with_infima RelStr
for b2 being non empty strongly_connected Element of bool the carrier of b1
for b3 being Element of the carrier of b1 holds
      b3 = max b2
   iff
      (for b4 being Element of the carrier of b1
             st b4 in b2
          holds b4 <= b3) &
       b3 in b2;

:: LATTICE7:th 9
theorem
for b1 being finite reflexive transitive antisymmetric with_suprema with_infima RelStr
for b2 being Element of the carrier of b1
      st b2 <> Bottom b1
   holds ex b3 being Element of the carrier of b1 st
      b3 <(1) b2;

:: LATTICE7:funcnot 3 => LATTICE7:func 3
definition
  let a1 be reflexive transitive antisymmetric with_suprema with_infima RelStr;
  func Join-IRR A1 -> Element of bool the carrier of a1 equals
    {b1 where b1 is Element of the carrier of a1: b1 <> Bottom a1 &
     (for b2, b3 being Element of the carrier of a1
           st b1 = b2 "\/" b3 & b1 <> b2
        holds b1 = b3)};
end;

:: LATTICE7:def 6
theorem
for b1 being reflexive transitive antisymmetric with_suprema with_infima RelStr holds
   Join-IRR b1 = {b2 where b2 is Element of the carrier of b1: b2 <> Bottom b1 &
    (for b3, b4 being Element of the carrier of b1
          st b2 = b3 "\/" b4 & b2 <> b3
       holds b2 = b4)};

:: LATTICE7:th 10
theorem
for b1 being reflexive transitive antisymmetric with_suprema with_infima RelStr
for b2 being Element of the carrier of b1 holds
      b2 in Join-IRR b1
   iff
      b2 <> Bottom b1 &
       (for b3, b4 being Element of the carrier of b1
             st b2 = b3 "\/" b4 & b2 <> b3
          holds b2 = b4);

:: LATTICE7:th 11
theorem
for b1 being finite reflexive transitive antisymmetric distributive with_suprema with_infima RelStr
for b2 being Element of the carrier of b1
      st b2 in Join-IRR b1
   holds ex b3 being Element of the carrier of b1 st
      b3 < b2 &
       (for b4 being Element of the carrier of b1
             st b4 < b2
          holds b4 <= b3);

:: LATTICE7:th 12
theorem
for b1 being finite reflexive transitive antisymmetric distributive with_suprema with_infima RelStr
for b2 being Element of the carrier of b1 holds
   "\/"((downarrow b2) /\ Join-IRR b1,b1) = b2;

:: LATTICE7:funcnot 4 => LATTICE7:func 4
definition
  let a1 be RelStr;
  func LOWER A1 -> non empty set equals
    {b1 where b1 is Element of bool the carrier of a1: b1 is lower(a1)};
end;

:: LATTICE7:def 7
theorem
for b1 being RelStr holds
   LOWER b1 = {b2 where b2 is Element of bool the carrier of b1: b2 is lower(b1)};

:: LATTICE7:th 13
theorem
for b1 being finite reflexive transitive antisymmetric distributive with_suprema with_infima RelStr holds
   ex b2 being Function-like quasi_total Relation of the carrier of b1,the carrier of InclPoset LOWER subrelstr Join-IRR b1 st
      b2 is isomorphic(b1, InclPoset LOWER subrelstr Join-IRR b1) &
       (for b3 being Element of the carrier of b1 holds
          b2 . b3 = (downarrow b3) /\ Join-IRR b1);

:: LATTICE7:th 14
theorem
for b1 being finite reflexive transitive antisymmetric distributive with_suprema with_infima RelStr holds
   b1,InclPoset LOWER subrelstr Join-IRR b1 are_isomorphic;

:: LATTICE7:modenot 2 => LATTICE7:mode 2
definition
  mode Ring_of_sets means
    it includes_lattice_of it;
end;

:: LATTICE7:dfs 8
definiens
  let a1 be set;
To prove
     a1 is Ring_of_sets
it is sufficient to prove
  thus a1 includes_lattice_of a1;

:: LATTICE7:def 8
theorem
for b1 being set holds
      b1 is Ring_of_sets
   iff
      b1 includes_lattice_of b1;

:: LATTICE7:exreg 3
registration
  cluster non empty Ring_of_sets;
end;

:: LATTICE7:funcreg 1
registration
  let a1 be non empty Ring_of_sets;
  cluster InclPoset a1 -> strict distributive with_suprema with_infima;
end;

:: LATTICE7:th 15
theorem
for b1 being finite reflexive transitive antisymmetric with_suprema with_infima RelStr holds
   LOWER subrelstr Join-IRR b1 is Ring_of_sets;

:: LATTICE7:th 16
theorem
for b1 being finite reflexive transitive antisymmetric with_suprema with_infima RelStr holds
      b1 is distributive
   iff
      ex b2 being non empty Ring_of_sets st
         b1,InclPoset b2 are_isomorphic;