:: LATTICE8 semantic presentation

definition
let c1 be non empty set ;
let c2, c3 be Relation of c1;
redefine pred c= as c2 c= c3 means :: LATTICE8:def 1
for b1, b2 being Element of a1 st [b1,b2] in a2 holds
[b1,b2] in a3;
compatibility
( c2 c= c3 iff for b1, b2 being Element of c1 st [b1,b2] in c2 holds
[b1,b2] in c3 )
proof end;
end;

:: deftheorem Def1 defines c= LATTICE8:def 1 :
for b1 being non empty set
for b2, b3 being Relation of b1 holds
( b2 c= b3 iff for b4, b5 being Element of b1 st [b4,b5] in b2 holds
[b4,b5] in b3 );

definition
let c1 be RelStr ;
attr a1 is finitely_typed means :Def2: :: LATTICE8:def 2
ex b1 being non empty set st
( ( for b2 being set st b2 in the carrier of a1 holds
b2 is Equivalence_Relation of b1 ) & ex b2 being Nat st
for b3, b4 being Equivalence_Relation of b1
for b5, b6 being set st b3 in the carrier of a1 & b4 in the carrier of a1 & [b5,b6] in b3 "\/" b4 holds
ex b7 being non empty FinSequence of b1 st
( len b7 = b2 & b5,b6 are_joint_by b7,b3,b4 ) );
end;

:: deftheorem Def2 defines finitely_typed LATTICE8:def 2 :
for b1 being RelStr holds
( b1 is finitely_typed iff ex b2 being non empty set st
( ( for b3 being set st b3 in the carrier of b1 holds
b3 is Equivalence_Relation of b2 ) & ex b3 being Nat st
for b4, b5 being Equivalence_Relation of b2
for b6, b7 being set st b4 in the carrier of b1 & b5 in the carrier of b1 & [b6,b7] in b4 "\/" b5 holds
ex b8 being non empty FinSequence of b2 st
( len b8 = b3 & b6,b7 are_joint_by b8,b4,b5 ) ) );

definition
let c1 be lower-bounded LATTICE;
let c2 be Nat;
pred c1 has_a_representation_of_type<= c2 means :Def3: :: LATTICE8:def 3
ex b1 being non trivial set ex b2 being Homomorphism of a1,(EqRelLATT b1) st
( b2 is one-to-one & Image b2 is finitely_typed & ex b3 being Equivalence_Relation of b1 st
( b3 in the carrier of (Image b2) & b3 <> id b1 ) & type_of (Image b2) <= a2 );
end;

:: deftheorem Def3 defines has_a_representation_of_type<= LATTICE8:def 3 :
for b1 being lower-bounded LATTICE
for b2 being Nat holds
( b1 has_a_representation_of_type<= b2 iff ex b3 being non trivial set ex b4 being Homomorphism of b1,(EqRelLATT b3) st
( b4 is one-to-one & Image b4 is finitely_typed & ex b5 being Equivalence_Relation of b3 st
( b5 in the carrier of (Image b4) & b5 <> id b3 ) & type_of (Image b4) <= b2 ) );

registration
cluster lower-bounded distributive finite RelStr ;
existence
ex b1 being LATTICE st
( b1 is lower-bounded & b1 is distributive & b1 is finite )
proof end;
end;

Lemma3: not 1 is even
proof end;

Lemma4: 2 is even
proof end;

registration
let c1 be non trivial set ;
cluster non empty full non trivial finitely_typed SubRelStr of EqRelLATT a1;
existence
ex b1 being non empty Sublattice of EqRelLATT c1 st
( not b1 is trivial & b1 is finitely_typed & b1 is full )
proof end;
end;

theorem Th1: :: LATTICE8:1
for b1 being non empty set
for b2 being lower-bounded LATTICE
for b3 being distance_function of b1,b2 holds succ {} c= DistEsti b3
proof end;

theorem Th2: :: LATTICE8:2
for b1 being trivial Semilattice holds b1 is modular
proof end;

theorem Th3: :: LATTICE8:3
for b1 being non empty set
for b2 being non empty Sublattice of EqRelLATT b1 holds
( b2 is trivial or ex b3 being Equivalence_Relation of b1 st
( b3 in the carrier of b2 & b3 <> id b1 ) )
proof end;

theorem Th4: :: LATTICE8:4
for b1, b2 being lower-bounded LATTICE
for b3 being Function of b1,b2 st b3 is infs-preserving & b3 is sups-preserving holds
( b3 is meet-preserving & b3 is join-preserving )
proof end;

theorem Th5: :: LATTICE8:5
for b1, b2 being lower-bounded LATTICE st b1,b2 are_isomorphic & b1 is modular holds
b2 is modular
proof end;

theorem Th6: :: LATTICE8:6
for b1 being non empty lower-bounded Poset
for b2 being non empty Poset
for b3 being monotone Function of b1,b2 holds Image b3 is lower-bounded
proof end;

theorem Th7: :: LATTICE8:7
for b1 being lower-bounded LATTICE
for b2, b3 being Element of b1
for b4 being non empty set
for b5 being Homomorphism of b1,(EqRelLATT b4) st b5 is one-to-one & (corestr b5) . b2 <= (corestr b5) . b3 holds
b2 <= b3
proof end;

theorem Th8: :: LATTICE8:8
for b1 being non trivial set
for b2 being non empty full finitely_typed Sublattice of EqRelLATT b1
for b3 being Equivalence_Relation of b1 st b3 in the carrier of b2 & b3 <> id b1 & type_of b2 <= 2 holds
b2 is modular
proof end;

theorem Th9: :: LATTICE8:9
for b1 being lower-bounded LATTICE st b1 has_a_representation_of_type<= 2 holds
b1 is modular
proof end;

definition
let c1 be set ;
func new_set2 c1 -> set equals :: LATTICE8:def 4
a1 \/ {{a1},{{a1}}};
correctness
coherence
c1 \/ {{c1},{{c1}}} is set
;
;
end;

:: deftheorem Def4 defines new_set2 LATTICE8:def 4 :
for b1 being set holds new_set2 b1 = b1 \/ {{b1},{{b1}}};

registration
let c1 be set ;
cluster new_set2 a1 -> non empty ;
coherence
not new_set2 c1 is empty
proof end;
end;

definition
let c1 be non empty set ;
let c2 be lower-bounded LATTICE;
let c3 be BiFunction of c1,c2;
let c4 be Element of [:c1,c1,the carrier of c2,the carrier of c2:];
func new_bi_fun2 c3,c4 -> BiFunction of (new_set2 a1),a2 means :Def5: :: LATTICE8:def 5
( ( for b1, b2 being Element of a1 holds a5 . b1,b2 = a3 . b1,b2 ) & a5 . {a1},{a1} = Bottom a2 & a5 . {{a1}},{{a1}} = Bottom a2 & a5 . {a1},{{a1}} = ((a3 . (a4 `1 ),(a4 `2 )) "\/" (a4 `3 )) "/\" (a4 `4 ) & a5 . {{a1}},{a1} = ((a3 . (a4 `1 ),(a4 `2 )) "\/" (a4 `3 )) "/\" (a4 `4 ) & ( for b1 being Element of a1 holds
( a5 . b1,{a1} = (a3 . b1,(a4 `1 )) "\/" (a4 `3 ) & a5 . {a1},b1 = (a3 . b1,(a4 `1 )) "\/" (a4 `3 ) & a5 . b1,{{a1}} = (a3 . b1,(a4 `2 )) "\/" (a4 `3 ) & a5 . {{a1}},b1 = (a3 . b1,(a4 `2 )) "\/" (a4 `3 ) ) ) );
existence
ex b1 being BiFunction of (new_set2 c1),c2 st
( ( for b2, b3 being Element of c1 holds b1 . b2,b3 = c3 . b2,b3 ) & b1 . {c1},{c1} = Bottom c2 & b1 . {{c1}},{{c1}} = Bottom c2 & b1 . {c1},{{c1}} = ((c3 . (c4 `1 ),(c4 `2 )) "\/" (c4 `3 )) "/\" (c4 `4 ) & b1 . {{c1}},{c1} = ((c3 . (c4 `1 ),(c4 `2 )) "\/" (c4 `3 )) "/\" (c4 `4 ) & ( for b2 being Element of c1 holds
( b1 . b2,{c1} = (c3 . b2,(c4 `1 )) "\/" (c4 `3 ) & b1 . {c1},b2 = (c3 . b2,(c4 `1 )) "\/" (c4 `3 ) & b1 . b2,{{c1}} = (c3 . b2,(c4 `2 )) "\/" (c4 `3 ) & b1 . {{c1}},b2 = (c3 . b2,(c4 `2 )) "\/" (c4 `3 ) ) ) )
proof end;
uniqueness
for b1, b2 being BiFunction of (new_set2 c1),c2 st ( for b3, b4 being Element of c1 holds b1 . b3,b4 = c3 . b3,b4 ) & b1 . {c1},{c1} = Bottom c2 & b1 . {{c1}},{{c1}} = Bottom c2 & b1 . {c1},{{c1}} = ((c3 . (c4 `1 ),(c4 `2 )) "\/" (c4 `3 )) "/\" (c4 `4 ) & b1 . {{c1}},{c1} = ((c3 . (c4 `1 ),(c4 `2 )) "\/" (c4 `3 )) "/\" (c4 `4 ) & ( for b3 being Element of c1 holds
( b1 . b3,{c1} = (c3 . b3,(c4 `1 )) "\/" (c4 `3 ) & b1 . {c1},b3 = (c3 . b3,(c4 `1 )) "\/" (c4 `3 ) & b1 . b3,{{c1}} = (c3 . b3,(c4 `2 )) "\/" (c4 `3 ) & b1 . {{c1}},b3 = (c3 . b3,(c4 `2 )) "\/" (c4 `3 ) ) ) & ( for b3, b4 being Element of c1 holds b2 . b3,b4 = c3 . b3,b4 ) & b2 . {c1},{c1} = Bottom c2 & b2 . {{c1}},{{c1}} = Bottom c2 & b2 . {c1},{{c1}} = ((c3 . (c4 `1 ),(c4 `2 )) "\/" (c4 `3 )) "/\" (c4 `4 ) & b2 . {{c1}},{c1} = ((c3 . (c4 `1 ),(c4 `2 )) "\/" (c4 `3 )) "/\" (c4 `4 ) & ( for b3 being Element of c1 holds
( b2 . b3,{c1} = (c3 . b3,(c4 `1 )) "\/" (c4 `3 ) & b2 . {c1},b3 = (c3 . b3,(c4 `1 )) "\/" (c4 `3 ) & b2 . b3,{{c1}} = (c3 . b3,(c4 `2 )) "\/" (c4 `3 ) & b2 . {{c1}},b3 = (c3 . b3,(c4 `2 )) "\/" (c4 `3 ) ) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def5 defines new_bi_fun2 LATTICE8:def 5 :
for b1 being non empty set
for b2 being lower-bounded LATTICE
for b3 being BiFunction of b1,b2
for b4 being Element of [:b1,b1,the carrier of b2,the carrier of b2:]
for b5 being BiFunction of (new_set2 b1),b2 holds
( b5 = new_bi_fun2 b3,b4 iff ( ( for b6, b7 being Element of b1 holds b5 . b6,b7 = b3 . b6,b7 ) & b5 . {b1},{b1} = Bottom b2 & b5 . {{b1}},{{b1}} = Bottom b2 & b5 . {b1},{{b1}} = ((b3 . (b4 `1 ),(b4 `2 )) "\/" (b4 `3 )) "/\" (b4 `4 ) & b5 . {{b1}},{b1} = ((b3 . (b4 `1 ),(b4 `2 )) "\/" (b4 `3 )) "/\" (b4 `4 ) & ( for b6 being Element of b1 holds
( b5 . b6,{b1} = (b3 . b6,(b4 `1 )) "\/" (b4 `3 ) & b5 . {b1},b6 = (b3 . b6,(b4 `1 )) "\/" (b4 `3 ) & b5 . b6,{{b1}} = (b3 . b6,(b4 `2 )) "\/" (b4 `3 ) & b5 . {{b1}},b6 = (b3 . b6,(b4 `2 )) "\/" (b4 `3 ) ) ) ) );

theorem Th10: :: LATTICE8:10
for b1 being non empty set
for b2 being lower-bounded LATTICE
for b3 being BiFunction of b1,b2 st b3 is zeroed holds
for b4 being Element of [:b1,b1,the carrier of b2,the carrier of b2:] holds new_bi_fun2 b3,b4 is zeroed
proof end;

theorem Th11: :: LATTICE8:11
for b1 being non empty set
for b2 being lower-bounded LATTICE
for b3 being BiFunction of b1,b2 st b3 is symmetric holds
for b4 being Element of [:b1,b1,the carrier of b2,the carrier of b2:] holds new_bi_fun2 b3,b4 is symmetric
proof end;

theorem Th12: :: LATTICE8:12
for b1 being non empty set
for b2 being lower-bounded LATTICE st b2 is modular holds
for b3 being BiFunction of b1,b2 st b3 is symmetric & b3 is u.t.i. holds
for b4 being Element of [:b1,b1,the carrier of b2,the carrier of b2:] st b3 . (b4 `1 ),(b4 `2 ) <= (b4 `3 ) "\/" (b4 `4 ) holds
new_bi_fun2 b3,b4 is u.t.i.
proof end;

theorem Th13: :: LATTICE8:13
for b1 being set holds b1 c= new_set2 b1 by XBOOLE_1:7;

theorem Th14: :: LATTICE8:14
for b1 being non empty set
for b2 being lower-bounded LATTICE
for b3 being BiFunction of b1,b2
for b4 being Element of [:b1,b1,the carrier of b2,the carrier of b2:] holds b3 c= new_bi_fun2 b3,b4
proof end;

definition
let c1 be non empty set ;
let c2 be Ordinal;
func ConsecutiveSet2 c1,c2 -> set means :Def6: :: LATTICE8:def 6
ex b1 being T-Sequence st
( a3 = last b1 & dom b1 = succ a2 & b1 . {} = a1 & ( for b2 being Ordinal st succ b2 in succ a2 holds
b1 . (succ b2) = new_set2 (b1 . b2) ) & ( for b2 being Ordinal st b2 in succ a2 & b2 <> {} & b2 is_limit_ordinal holds
b1 . b2 = union (rng (b1 | b2)) ) );
correctness
existence
ex b1 being set ex b2 being T-Sequence st
( b1 = last b2 & dom b2 = succ c2 & b2 . {} = c1 & ( for b3 being Ordinal st succ b3 in succ c2 holds
b2 . (succ b3) = new_set2 (b2 . b3) ) & ( for b3 being Ordinal st b3 in succ c2 & b3 <> {} & b3 is_limit_ordinal holds
b2 . b3 = union (rng (b2 | b3)) ) )
;
uniqueness
for b1, b2 being set st ex b3 being T-Sequence st
( b1 = last b3 & dom b3 = succ c2 & b3 . {} = c1 & ( for b4 being Ordinal st succ b4 in succ c2 holds
b3 . (succ b4) = new_set2 (b3 . b4) ) & ( for b4 being Ordinal st b4 in succ c2 & b4 <> {} & b4 is_limit_ordinal holds
b3 . b4 = union (rng (b3 | b4)) ) ) & ex b3 being T-Sequence st
( b2 = last b3 & dom b3 = succ c2 & b3 . {} = c1 & ( for b4 being Ordinal st succ b4 in succ c2 holds
b3 . (succ b4) = new_set2 (b3 . b4) ) & ( for b4 being Ordinal st b4 in succ c2 & b4 <> {} & b4 is_limit_ordinal holds
b3 . b4 = union (rng (b3 | b4)) ) ) holds
b1 = b2
;
proof end;
end;

:: deftheorem Def6 defines ConsecutiveSet2 LATTICE8:def 6 :
for b1 being non empty set
for b2 being Ordinal
for b3 being set holds
( b3 = ConsecutiveSet2 b1,b2 iff ex b4 being T-Sequence st
( b3 = last b4 & dom b4 = succ b2 & b4 . {} = b1 & ( for b5 being Ordinal st succ b5 in succ b2 holds
b4 . (succ b5) = new_set2 (b4 . b5) ) & ( for b5 being Ordinal st b5 in succ b2 & b5 <> {} & b5 is_limit_ordinal holds
b4 . b5 = union (rng (b4 | b5)) ) ) );

theorem Th15: :: LATTICE8:15
for b1 being non empty set holds ConsecutiveSet2 b1,{} = b1
proof end;

theorem Th16: :: LATTICE8:16
for b1 being non empty set
for b2 being Ordinal holds ConsecutiveSet2 b1,(succ b2) = new_set2 (ConsecutiveSet2 b1,b2)
proof end;

theorem Th17: :: LATTICE8:17
for b1 being non empty set
for b2 being Ordinal
for b3 being T-Sequence st b2 <> {} & b2 is_limit_ordinal & dom b3 = b2 & ( for b4 being Ordinal st b4 in b2 holds
b3 . b4 = ConsecutiveSet2 b1,b4 ) holds
ConsecutiveSet2 b1,b2 = union (rng b3)
proof end;

registration
let c1 be non empty set ;
let c2 be Ordinal;
cluster ConsecutiveSet2 a1,a2 -> non empty ;
coherence
not ConsecutiveSet2 c1,c2 is empty
proof end;
end;

theorem Th18: :: LATTICE8:18
for b1 being non empty set
for b2 being Ordinal holds b1 c= ConsecutiveSet2 b1,b2
proof end;

definition
let c1 be non empty set ;
let c2 be lower-bounded LATTICE;
let c3 be BiFunction of c1,c2;
let c4 be QuadrSeq of c3;
let c5 be Ordinal;
assume E23: c5 in dom c4 ;
func Quadr2 c4,c5 -> Element of [:(ConsecutiveSet2 a1,a5),(ConsecutiveSet2 a1,a5),the carrier of a2,the carrier of a2:] equals :Def7: :: LATTICE8:def 7
a4 . a5;
correctness
coherence
c4 . c5 is Element of [:(ConsecutiveSet2 c1,c5),(ConsecutiveSet2 c1,c5),the carrier of c2,the carrier of c2:]
;
proof end;
end;

:: deftheorem Def7 defines Quadr2 LATTICE8:def 7 :
for b1 being non empty set
for b2 being lower-bounded LATTICE
for b3 being BiFunction of b1,b2
for b4 being QuadrSeq of b3
for b5 being Ordinal st b5 in dom b4 holds
Quadr2 b4,b5 = b4 . b5;

definition
let c1 be non empty set ;
let c2 be lower-bounded LATTICE;
let c3 be BiFunction of c1,c2;
let c4 be QuadrSeq of c3;
let c5 be Ordinal;
func ConsecutiveDelta2 c4,c5 -> set means :Def8: :: LATTICE8:def 8
ex b1 being T-Sequence st
( a6 = last b1 & dom b1 = succ a5 & b1 . {} = a3 & ( for b2 being Ordinal st succ b2 in succ a5 holds
b1 . (succ b2) = new_bi_fun2 (BiFun (b1 . b2),(ConsecutiveSet2 a1,b2),a2),(Quadr2 a4,b2) ) & ( for b2 being Ordinal st b2 in succ a5 & b2 <> {} & b2 is_limit_ordinal holds
b1 . b2 = union (rng (b1 | b2)) ) );
correctness
existence
ex b1 being set ex b2 being T-Sequence st
( b1 = last b2 & dom b2 = succ c5 & b2 . {} = c3 & ( for b3 being Ordinal st succ b3 in succ c5 holds
b2 . (succ b3) = new_bi_fun2 (BiFun (b2 . b3),(ConsecutiveSet2 c1,b3),c2),(Quadr2 c4,b3) ) & ( for b3 being Ordinal st b3 in succ c5 & b3 <> {} & b3 is_limit_ordinal holds
b2 . b3 = union (rng (b2 | b3)) ) )
;
uniqueness
for b1, b2 being set st ex b3 being T-Sequence st
( b1 = last b3 & dom b3 = succ c5 & b3 . {} = c3 & ( for b4 being Ordinal st succ b4 in succ c5 holds
b3 . (succ b4) = new_bi_fun2 (BiFun (b3 . b4),(ConsecutiveSet2 c1,b4),c2),(Quadr2 c4,b4) ) & ( for b4 being Ordinal st b4 in succ c5 & b4 <> {} & b4 is_limit_ordinal holds
b3 . b4 = union (rng (b3 | b4)) ) ) & ex b3 being T-Sequence st
( b2 = last b3 & dom b3 = succ c5 & b3 . {} = c3 & ( for b4 being Ordinal st succ b4 in succ c5 holds
b3 . (succ b4) = new_bi_fun2 (BiFun (b3 . b4),(ConsecutiveSet2 c1,b4),c2),(Quadr2 c4,b4) ) & ( for b4 being Ordinal st b4 in succ c5 & b4 <> {} & b4 is_limit_ordinal holds
b3 . b4 = union (rng (b3 | b4)) ) ) holds
b1 = b2
;
proof end;
end;

:: deftheorem Def8 defines ConsecutiveDelta2 LATTICE8:def 8 :
for b1 being non empty set
for b2 being lower-bounded LATTICE
for b3 being BiFunction of b1,b2
for b4 being QuadrSeq of b3
for b5 being Ordinal
for b6 being set holds
( b6 = ConsecutiveDelta2 b4,b5 iff ex b7 being T-Sequence st
( b6 = last b7 & dom b7 = succ b5 & b7 . {} = b3 & ( for b8 being Ordinal st succ b8 in succ b5 holds
b7 . (succ b8) = new_bi_fun2 (BiFun (b7 . b8),(ConsecutiveSet2 b1,b8),b2),(Quadr2 b4,b8) ) & ( for b8 being Ordinal st b8 in succ b5 & b8 <> {} & b8 is_limit_ordinal holds
b7 . b8 = union (rng (b7 | b8)) ) ) );

theorem Th19: :: LATTICE8:19
for b1 being non empty set
for b2 being lower-bounded LATTICE
for b3 being BiFunction of b1,b2
for b4 being QuadrSeq of b3 holds ConsecutiveDelta2 b4,{} = b3
proof end;

theorem Th20: :: LATTICE8:20
for b1 being non empty set
for b2 being lower-bounded LATTICE
for b3 being BiFunction of b1,b2
for b4 being QuadrSeq of b3
for b5 being Ordinal holds ConsecutiveDelta2 b4,(succ b5) = new_bi_fun2 (BiFun (ConsecutiveDelta2 b4,b5),(ConsecutiveSet2 b1,b5),b2),(Quadr2 b4,b5)
proof end;

theorem Th21: :: LATTICE8:21
for b1 being non empty set
for b2 being lower-bounded LATTICE
for b3 being BiFunction of b1,b2
for b4 being QuadrSeq of b3
for b5 being T-Sequence
for b6 being Ordinal st b6 <> {} & b6 is_limit_ordinal & dom b5 = b6 & ( for b7 being Ordinal st b7 in b6 holds
b5 . b7 = ConsecutiveDelta2 b4,b7 ) holds
ConsecutiveDelta2 b4,b6 = union (rng b5)
proof end;

theorem Th22: :: LATTICE8:22
for b1 being non empty set
for b2, b3, b4 being Ordinal st b3 c= b4 holds
ConsecutiveSet2 b1,b3 c= ConsecutiveSet2 b1,b4
proof end;

theorem Th23: :: LATTICE8:23
for b1 being non empty set
for b2 being lower-bounded LATTICE
for b3 being BiFunction of b1,b2
for b4 being QuadrSeq of b3
for b5 being Ordinal holds ConsecutiveDelta2 b4,b5 is BiFunction of (ConsecutiveSet2 b1,b5),b2
proof end;

definition
let c1 be non empty set ;
let c2 be lower-bounded LATTICE;
let c3 be BiFunction of c1,c2;
let c4 be QuadrSeq of c3;
let c5 be Ordinal;
redefine func ConsecutiveDelta2 as ConsecutiveDelta2 c4,c5 -> BiFunction of (ConsecutiveSet2 a1,a5),a2;
coherence
ConsecutiveDelta2 c4,c5 is BiFunction of (ConsecutiveSet2 c1,c5),c2
by Th23;
end;

theorem Th24: :: LATTICE8:24
for b1 being non empty set
for b2 being lower-bounded LATTICE
for b3 being BiFunction of b1,b2
for b4 being QuadrSeq of b3
for b5 being Ordinal holds b3 c= ConsecutiveDelta2 b4,b5
proof end;

theorem Th25: :: LATTICE8:25
for b1 being non empty set
for b2 being lower-bounded LATTICE
for b3 being BiFunction of b1,b2
for b4, b5 being Ordinal
for b6 being QuadrSeq of b3 st b4 c= b5 holds
ConsecutiveDelta2 b6,b4 c= ConsecutiveDelta2 b6,b5
proof end;

theorem Th26: :: LATTICE8:26
for b1 being non empty set
for b2 being lower-bounded LATTICE
for b3 being BiFunction of b1,b2 st b3 is zeroed holds
for b4 being QuadrSeq of b3
for b5 being Ordinal holds ConsecutiveDelta2 b4,b5 is zeroed
proof end;

theorem Th27: :: LATTICE8:27
for b1 being non empty set
for b2 being lower-bounded LATTICE
for b3 being BiFunction of b1,b2 st b3 is symmetric holds
for b4 being QuadrSeq of b3
for b5 being Ordinal holds ConsecutiveDelta2 b4,b5 is symmetric
proof end;

theorem Th28: :: LATTICE8:28
for b1 being non empty set
for b2 being lower-bounded LATTICE st b2 is modular holds
for b3 being BiFunction of b1,b2 st b3 is symmetric & b3 is u.t.i. holds
for b4 being Ordinal
for b5 being QuadrSeq of b3 st b4 c= DistEsti b3 holds
ConsecutiveDelta2 b5,b4 is u.t.i.
proof end;

theorem Th29: :: LATTICE8:29
for b1 being non empty set
for b2 being lower-bounded modular LATTICE
for b3 being distance_function of b1,b2
for b4 being Ordinal
for b5 being QuadrSeq of b3 st b4 c= DistEsti b3 holds
ConsecutiveDelta2 b5,b4 is distance_function of (ConsecutiveSet2 b1,b4),b2 by Th26, Th27, Th28;

definition
let c1 be non empty set ;
let c2 be lower-bounded LATTICE;
let c3 be BiFunction of c1,c2;
func NextSet2 c3 -> set equals :: LATTICE8:def 9
ConsecutiveSet2 a1,(DistEsti a3);
correctness
coherence
ConsecutiveSet2 c1,(DistEsti c3) is set
;
;
end;

:: deftheorem Def9 defines NextSet2 LATTICE8:def 9 :
for b1 being non empty set
for b2 being lower-bounded LATTICE
for b3 being BiFunction of b1,b2 holds NextSet2 b3 = ConsecutiveSet2 b1,(DistEsti b3);

registration
let c1 be non empty set ;
let c2 be lower-bounded LATTICE;
let c3 be BiFunction of c1,c2;
cluster NextSet2 a3 -> non empty ;
coherence
not NextSet2 c3 is empty
;
end;

definition
let c1 be non empty set ;
let c2 be lower-bounded LATTICE;
let c3 be BiFunction of c1,c2;
let c4 be QuadrSeq of c3;
func NextDelta2 c4 -> set equals :: LATTICE8:def 10
ConsecutiveDelta2 a4,(DistEsti a3);
correctness
coherence
ConsecutiveDelta2 c4,(DistEsti c3) is set
;
;
end;

:: deftheorem Def10 defines NextDelta2 LATTICE8:def 10 :
for b1 being non empty set
for b2 being lower-bounded LATTICE
for b3 being BiFunction of b1,b2
for b4 being QuadrSeq of b3 holds NextDelta2 b4 = ConsecutiveDelta2 b4,(DistEsti b3);

definition
let c1 be non empty set ;
let c2 be lower-bounded modular LATTICE;
let c3 be distance_function of c1,c2;
let c4 be QuadrSeq of c3;
redefine func NextDelta2 as NextDelta2 c4 -> distance_function of (NextSet2 a3),a2;
coherence
NextDelta2 c4 is distance_function of (NextSet2 c3),c2
by Th26, Th27, Th28;
end;

definition
let c1 be non empty set ;
let c2 be lower-bounded LATTICE;
let c3 be distance_function of c1,c2;
let c4 be non empty set ;
let c5 be distance_function of c4,c2;
pred c4,c5 is_extension2_of c1,c3 means :Def11: :: LATTICE8:def 11
ex b1 being QuadrSeq of a3 st
( a4 = NextSet2 a3 & a5 = NextDelta2 b1 );
end;

:: deftheorem Def11 defines is_extension2_of LATTICE8:def 11 :
for b1 being non empty set
for b2 being lower-bounded LATTICE
for b3 being distance_function of b1,b2
for b4 being non empty set
for b5 being distance_function of b4,b2 holds
( b4,b5 is_extension2_of b1,b3 iff ex b6 being QuadrSeq of b3 st
( b4 = NextSet2 b3 & b5 = NextDelta2 b6 ) );

theorem Th30: :: LATTICE8:30
for b1 being non empty set
for b2 being lower-bounded LATTICE
for b3 being distance_function of b1,b2
for b4 being non empty set
for b5 being distance_function of b4,b2 st b4,b5 is_extension2_of b1,b3 holds
for b6, b7 being Element of b1
for b8, b9 being Element of b2 st b3 . b6,b7 <= b8 "\/" b9 holds
ex b10, b11 being Element of b4 st
( b5 . b6,b10 = b8 & b5 . b10,b11 = ((b3 . b6,b7) "\/" b8) "/\" b9 & b5 . b11,b7 = b8 )
proof end;

definition
let c1 be non empty set ;
let c2 be lower-bounded modular LATTICE;
let c3 be distance_function of c1,c2;
mode ExtensionSeq2 of c1,c3 -> Function means :Def12: :: LATTICE8:def 12
( dom a4 = NAT & a4 . 0 = [a1,a3] & ( for b1 being Nat ex b2 being non empty set ex b3 being distance_function of b2,a2ex b4 being non empty set ex b5 being distance_function of b4,a2 st
( b4,b5 is_extension2_of b2,b3 & a4 . b1 = [b2,b3] & a4 . (b1 + 1) = [b4,b5] ) ) );
existence
ex b1 being Function st
( dom b1 = NAT & b1 . 0 = [c1,c3] & ( for b2 being Nat ex b3 being non empty set ex b4 being distance_function of b3,c2ex b5 being non empty set ex b6 being distance_function of b5,c2 st
( b5,b6 is_extension2_of b3,b4 & b1 . b2 = [b3,b4] & b1 . (b2 + 1) = [b5,b6] ) ) )
proof end;
end;

:: deftheorem Def12 defines ExtensionSeq2 LATTICE8:def 12 :
for b1 being non empty set
for b2 being lower-bounded modular LATTICE
for b3 being distance_function of b1,b2
for b4 being Function holds
( b4 is ExtensionSeq2 of b1,b3 iff ( dom b4 = NAT & b4 . 0 = [b1,b3] & ( for b5 being Nat ex b6 being non empty set ex b7 being distance_function of b6,b2ex b8 being non empty set ex b9 being distance_function of b8,b2 st
( b8,b9 is_extension2_of b6,b7 & b4 . b5 = [b6,b7] & b4 . (b5 + 1) = [b8,b9] ) ) ) );

theorem Th31: :: LATTICE8:31
for b1 being non empty set
for b2 being lower-bounded modular LATTICE
for b3 being distance_function of b1,b2
for b4 being ExtensionSeq2 of b1,b3
for b5, b6 being Nat st b5 <= b6 holds
(b4 . b5) `1 c= (b4 . b6) `1
proof end;

theorem Th32: :: LATTICE8:32
for b1 being non empty set
for b2 being lower-bounded modular LATTICE
for b3 being distance_function of b1,b2
for b4 being ExtensionSeq2 of b1,b3
for b5, b6 being Nat st b5 <= b6 holds
(b4 . b5) `2 c= (b4 . b6) `2
proof end;

theorem Th33: :: LATTICE8:33
for b1 being lower-bounded modular LATTICE
for b2 being ExtensionSeq2 of the carrier of b1, BasicDF b1
for b3 being non empty set st b3 = union { ((b2 . b4) `1 ) where B is Nat : verum } holds
union { ((b2 . b4) `2 ) where B is Nat : verum } is distance_function of b3,b1
proof end;

theorem Th34: :: LATTICE8:34
for b1 being lower-bounded modular LATTICE
for b2 being ExtensionSeq2 of the carrier of b1, BasicDF b1
for b3 being non empty set
for b4 being distance_function of b3,b1
for b5, b6 being Element of b3
for b7, b8 being Element of b1 st b3 = union { ((b2 . b9) `1 ) where B is Nat : verum } & b4 = union { ((b2 . b9) `2 ) where B is Nat : verum } & b4 . b5,b6 <= b7 "\/" b8 holds
ex b9, b10 being Element of b3 st
( b4 . b5,b9 = b7 & b4 . b9,b10 = ((b4 . b5,b6) "\/" b7) "/\" b8 & b4 . b10,b6 = b7 )
proof end;

Lemma42: for b1 being Nat holds
( not b1 in Seg 4 or b1 = 1 or b1 = 2 or b1 = 3 or b1 = 4 )
proof end;

Lemma43: for b1 being Nat st 1 <= b1 & b1 < 4 & not b1 = 1 & not b1 = 2 holds
b1 = 3
proof end;

theorem Th35: :: LATTICE8:35
for b1 being lower-bounded modular LATTICE
for b2 being ExtensionSeq2 of the carrier of b1, BasicDF b1
for b3 being non empty set
for b4 being distance_function of b3,b1
for b5 being Homomorphism of b1,(EqRelLATT b3)
for b6, b7 being Equivalence_Relation of b3
for b8, b9 being set st b5 = alpha b4 & b3 = union { ((b2 . b10) `1 ) where B is Nat : verum } & b4 = union { ((b2 . b10) `2 ) where B is Nat : verum } & b6 in the carrier of (Image b5) & b7 in the carrier of (Image b5) & [b8,b9] in b6 "\/" b7 holds
ex b10 being non empty FinSequence of b3 st
( len b10 = 2 + 2 & b8,b9 are_joint_by b10,b6,b7 )
proof end;

theorem Th36: :: LATTICE8:36
for b1 being lower-bounded modular LATTICE holds b1 has_a_representation_of_type<= 2
proof end;

theorem Th37: :: LATTICE8:37
for b1 being lower-bounded LATTICE holds
( b1 has_a_representation_of_type<= 2 iff b1 is modular ) by Th9, Th36;