:: CONLAT_1 semantic presentation

definition
attr a1 is strict;
struct 2-sorted -> ;
aggr 2-sorted(# Objects, Attributes #) -> 2-sorted ;
sel Objects c1 -> set ;
sel Attributes c1 -> set ;
end;

definition
let c1 be 2-sorted ;
attr a1 is empty means :Def1: :: CONLAT_1:def 1
( the Objects of a1 is empty & the Attributes of a1 is empty );
attr a1 is quasi-empty means :Def2: :: CONLAT_1:def 2
( the Objects of a1 is empty or the Attributes of a1 is empty );
end;

:: deftheorem Def1 defines empty CONLAT_1:def 1 :
for b1 being 2-sorted holds
( b1 is empty iff ( the Objects of b1 is empty & the Attributes of b1 is empty ) );

:: deftheorem Def2 defines quasi-empty CONLAT_1:def 2 :
for b1 being 2-sorted holds
( b1 is quasi-empty iff ( the Objects of b1 is empty or the Attributes of b1 is empty ) );

registration
cluster strict non empty 2-sorted ;
existence
ex b1 being 2-sorted st
( b1 is strict & not b1 is empty )
proof end;
cluster strict non quasi-empty 2-sorted ;
existence
ex b1 being 2-sorted st
( b1 is strict & not b1 is quasi-empty )
proof end;
end;

registration
cluster strict empty quasi-empty 2-sorted ;
existence
ex b1 being 2-sorted st
( b1 is strict & b1 is empty & b1 is quasi-empty )
proof end;
end;

definition
attr a1 is strict;
struct ContextStr -> 2-sorted ;
aggr ContextStr(# Objects, Attributes, Information #) -> ContextStr ;
sel Information c1 -> Relation of the Objects of a1,the Attributes of a1;
end;

registration
cluster non empty strict ContextStr ;
existence
ex b1 being ContextStr st
( b1 is strict & not b1 is empty )
proof end;
cluster non quasi-empty strict ContextStr ;
existence
ex b1 being ContextStr st
( b1 is strict & not b1 is quasi-empty )
proof end;
end;

definition
mode FormalContext is non quasi-empty ContextStr ;
end;

definition
let c1 be 2-sorted ;
mode Object of a1 is Element of the Objects of a1;
mode Attribute of a1 is Element of the Attributes of a1;
end;

registration
let c1 be non quasi-empty 2-sorted ;
cluster the Attributes of a1 -> non empty ;
coherence
not the Attributes of c1 is empty
by Def2;
cluster the Objects of a1 -> non empty ;
coherence
not the Objects of c1 is empty
by Def2;
end;

registration
let c1 be non quasi-empty 2-sorted ;
cluster non empty Element of bool the Objects of a1;
existence
not for b1 being Subset of the Objects of c1 holds b1 is empty
proof end;
cluster non empty Element of bool the Attributes of a1;
existence
not for b1 being Subset of the Attributes of c1 holds b1 is empty
proof end;
end;

definition
let c1 be FormalContext;
let c2 be Object of c1;
let c3 be Attribute of c1;
canceled;
canceled;
pred c2 is-connected-with c3 means :Def5: :: CONLAT_1:def 5
[a2,a3] in the Information of a1;
end;

:: deftheorem Def3 CONLAT_1:def 3 :
canceled;

:: deftheorem Def4 CONLAT_1:def 4 :
canceled;

:: deftheorem Def5 defines is-connected-with CONLAT_1:def 5 :
for b1 being FormalContext
for b2 being Object of b1
for b3 being Attribute of b1 holds
( b2 is-connected-with b3 iff [b2,b3] in the Information of b1 );

notation
let c1 be FormalContext;
let c2 be Object of c1;
let c3 be Attribute of c1;
antonym c2 is-not-connected-with c3 for c2 is-connected-with c3;
end;

definition
let c1 be FormalContext;
func ObjectDerivation c1 -> Function of bool the Objects of a1, bool the Attributes of a1 means :Def6: :: CONLAT_1:def 6
for b1 being Subset of the Objects of a1 holds a2 . b1 = { b2 where B is Attribute of a1 : for b1 being Object of a1 st b3 in b1 holds
b3 is-connected-with b2
}
;
existence
ex b1 being Function of bool the Objects of c1, bool the Attributes of c1 st
for b2 being Subset of the Objects of c1 holds b1 . b2 = { b3 where B is Attribute of c1 : for b1 being Object of c1 st b4 in b2 holds
b4 is-connected-with b3
}
proof end;
uniqueness
for b1, b2 being Function of bool the Objects of c1, bool the Attributes of c1 st ( for b3 being Subset of the Objects of c1 holds b1 . b3 = { b4 where B is Attribute of c1 : for b1 being Object of c1 st b5 in b3 holds
b5 is-connected-with b4
}
) & ( for b3 being Subset of the Objects of c1 holds b2 . b3 = { b4 where B is Attribute of c1 : for b1 being Object of c1 st b5 in b3 holds
b5 is-connected-with b4
}
) holds
b1 = b2
proof end;
end;

:: deftheorem Def6 defines ObjectDerivation CONLAT_1:def 6 :
for b1 being FormalContext
for b2 being Function of bool the Objects of b1, bool the Attributes of b1 holds
( b2 = ObjectDerivation b1 iff for b3 being Subset of the Objects of b1 holds b2 . b3 = { b4 where B is Attribute of b1 : for b1 being Object of b1 st b5 in b3 holds
b5 is-connected-with b4
}
);

definition
let c1 be FormalContext;
func AttributeDerivation c1 -> Function of bool the Attributes of a1, bool the Objects of a1 means :Def7: :: CONLAT_1:def 7
for b1 being Subset of the Attributes of a1 holds a2 . b1 = { b2 where B is Object of a1 : for b1 being Attribute of a1 st b3 in b1 holds
b2 is-connected-with b3
}
;
existence
ex b1 being Function of bool the Attributes of c1, bool the Objects of c1 st
for b2 being Subset of the Attributes of c1 holds b1 . b2 = { b3 where B is Object of c1 : for b1 being Attribute of c1 st b4 in b2 holds
b3 is-connected-with b4
}
proof end;
uniqueness
for b1, b2 being Function of bool the Attributes of c1, bool the Objects of c1 st ( for b3 being Subset of the Attributes of c1 holds b1 . b3 = { b4 where B is Object of c1 : for b1 being Attribute of c1 st b5 in b3 holds
b4 is-connected-with b5
}
) & ( for b3 being Subset of the Attributes of c1 holds b2 . b3 = { b4 where B is Object of c1 : for b1 being Attribute of c1 st b5 in b3 holds
b4 is-connected-with b5
}
) holds
b1 = b2
proof end;
end;

:: deftheorem Def7 defines AttributeDerivation CONLAT_1:def 7 :
for b1 being FormalContext
for b2 being Function of bool the Attributes of b1, bool the Objects of b1 holds
( b2 = AttributeDerivation b1 iff for b3 being Subset of the Attributes of b1 holds b2 . b3 = { b4 where B is Object of b1 : for b1 being Attribute of b1 st b5 in b3 holds
b4 is-connected-with b5
}
);

theorem Th1: :: CONLAT_1:1
for b1 being FormalContext
for b2 being Object of b1 holds (ObjectDerivation b1) . {b2} = { b3 where B is Attribute of b1 : b2 is-connected-with b3 }
proof end;

theorem Th2: :: CONLAT_1:2
for b1 being FormalContext
for b2 being Attribute of b1 holds (AttributeDerivation b1) . {b2} = { b3 where B is Object of b1 : b3 is-connected-with b2 }
proof end;

theorem Th3: :: CONLAT_1:3
for b1 being FormalContext
for b2, b3 being Subset of the Objects of b1 st b2 c= b3 holds
(ObjectDerivation b1) . b3 c= (ObjectDerivation b1) . b2
proof end;

theorem Th4: :: CONLAT_1:4
for b1 being FormalContext
for b2, b3 being Subset of the Attributes of b1 st b2 c= b3 holds
(AttributeDerivation b1) . b3 c= (AttributeDerivation b1) . b2
proof end;

theorem Th5: :: CONLAT_1:5
for b1 being FormalContext
for b2 being Subset of the Objects of b1 holds b2 c= (AttributeDerivation b1) . ((ObjectDerivation b1) . b2)
proof end;

theorem Th6: :: CONLAT_1:6
for b1 being FormalContext
for b2 being Subset of the Attributes of b1 holds b2 c= (ObjectDerivation b1) . ((AttributeDerivation b1) . b2)
proof end;

theorem Th7: :: CONLAT_1:7
for b1 being FormalContext
for b2 being Subset of the Objects of b1 holds (ObjectDerivation b1) . b2 = (ObjectDerivation b1) . ((AttributeDerivation b1) . ((ObjectDerivation b1) . b2))
proof end;

theorem Th8: :: CONLAT_1:8
for b1 being FormalContext
for b2 being Subset of the Attributes of b1 holds (AttributeDerivation b1) . b2 = (AttributeDerivation b1) . ((ObjectDerivation b1) . ((AttributeDerivation b1) . b2))
proof end;

theorem Th9: :: CONLAT_1:9
for b1 being FormalContext
for b2 being Subset of the Objects of b1
for b3 being Subset of the Attributes of b1 holds
( b2 c= (AttributeDerivation b1) . b3 iff [:b2,b3:] c= the Information of b1 )
proof end;

theorem Th10: :: CONLAT_1:10
for b1 being FormalContext
for b2 being Subset of the Objects of b1
for b3 being Subset of the Attributes of b1 holds
( b3 c= (ObjectDerivation b1) . b2 iff [:b2,b3:] c= the Information of b1 )
proof end;

theorem Th11: :: CONLAT_1:11
for b1 being FormalContext
for b2 being Subset of the Objects of b1
for b3 being Subset of the Attributes of b1 holds
( b2 c= (AttributeDerivation b1) . b3 iff b3 c= (ObjectDerivation b1) . b2 )
proof end;

definition
let c1 be FormalContext;
func phi c1 -> Function of (BoolePoset the Objects of a1),(BoolePoset the Attributes of a1) equals :: CONLAT_1:def 8
ObjectDerivation a1;
coherence
ObjectDerivation c1 is Function of (BoolePoset the Objects of c1),(BoolePoset the Attributes of c1)
proof end;
end;

:: deftheorem Def8 defines phi CONLAT_1:def 8 :
for b1 being FormalContext holds phi b1 = ObjectDerivation b1;

definition
let c1 be FormalContext;
func psi c1 -> Function of (BoolePoset the Attributes of a1),(BoolePoset the Objects of a1) equals :: CONLAT_1:def 9
AttributeDerivation a1;
coherence
AttributeDerivation c1 is Function of (BoolePoset the Attributes of c1),(BoolePoset the Objects of c1)
proof end;
end;

:: deftheorem Def9 defines psi CONLAT_1:def 9 :
for b1 being FormalContext holds psi b1 = AttributeDerivation b1;

definition
let c1, c2 be non empty RelStr ;
let c3 be Connection of c1,c2;
attr a3 is co-Galois means :Def10: :: CONLAT_1:def 10
ex b1 being Function of a1,a2ex b2 being Function of a2,a1 st
( a3 = [b1,b2] & b1 is antitone & b2 is antitone & ( for b3, b4 being Element of a1
for b5, b6 being Element of a2 holds
( b3 <= b2 . (b1 . b3) & b5 <= b1 . (b2 . b5) ) ) );
end;

:: deftheorem Def10 defines co-Galois CONLAT_1:def 10 :
for b1, b2 being non empty RelStr
for b3 being Connection of b1,b2 holds
( b3 is co-Galois iff ex b4 being Function of b1,b2ex b5 being Function of b2,b1 st
( b3 = [b4,b5] & b4 is antitone & b5 is antitone & ( for b6, b7 being Element of b1
for b8, b9 being Element of b2 holds
( b6 <= b5 . (b4 . b6) & b8 <= b4 . (b5 . b8) ) ) ) );

theorem Th12: :: CONLAT_1:12
canceled;

theorem Th13: :: CONLAT_1:13
for b1, b2 being non empty Poset
for b3 being Connection of b1,b2
for b4 being Function of b1,b2
for b5 being Function of b2,b1 st b3 = [b4,b5] holds
( b3 is co-Galois iff for b6 being Element of b1
for b7 being Element of b2 holds
( b6 <= b5 . b7 iff b7 <= b4 . b6 ) )
proof end;

theorem Th14: :: CONLAT_1:14
for b1, b2 being non empty Poset
for b3 being Connection of b1,b2 st b3 is co-Galois holds
for b4 being Function of b1,b2
for b5 being Function of b2,b1 st b3 = [b4,b5] holds
( b4 = b4 * (b5 * b4) & b5 = b5 * (b4 * b5) )
proof end;

theorem Th15: :: CONLAT_1:15
for b1 being FormalContext holds [(phi b1),(psi b1)] is co-Galois
proof end;

theorem Th16: :: CONLAT_1:16
for b1 being FormalContext
for b2, b3 being Subset of the Objects of b1 holds (ObjectDerivation b1) . (b2 \/ b3) = ((ObjectDerivation b1) . b2) /\ ((ObjectDerivation b1) . b3)
proof end;

theorem Th17: :: CONLAT_1:17
for b1 being FormalContext
for b2, b3 being Subset of the Attributes of b1 holds (AttributeDerivation b1) . (b2 \/ b3) = ((AttributeDerivation b1) . b2) /\ ((AttributeDerivation b1) . b3)
proof end;

theorem Th18: :: CONLAT_1:18
for b1 being FormalContext holds (ObjectDerivation b1) . {} = the Attributes of b1
proof end;

theorem Th19: :: CONLAT_1:19
for b1 being FormalContext holds (AttributeDerivation b1) . {} = the Objects of b1
proof end;

definition
let c1 be 2-sorted ;
attr a2 is strict;
struct ConceptStr of c1 -> ;
aggr ConceptStr(# Extent, Intent #) -> ConceptStr of a1;
sel Extent c2 -> Subset of the Objects of a1;
sel Intent c2 -> Subset of the Attributes of a1;
end;

definition
let c1 be 2-sorted ;
let c2 be ConceptStr of c1;
attr a2 is empty means :Def11: :: CONLAT_1:def 11
( the Extent of a2 is empty & the Intent of a2 is empty );
attr a2 is quasi-empty means :Def12: :: CONLAT_1:def 12
( the Extent of a2 is empty or the Intent of a2 is empty );
end;

:: deftheorem Def11 defines empty CONLAT_1:def 11 :
for b1 being 2-sorted
for b2 being ConceptStr of b1 holds
( b2 is empty iff ( the Extent of b2 is empty & the Intent of b2 is empty ) );

:: deftheorem Def12 defines quasi-empty CONLAT_1:def 12 :
for b1 being 2-sorted
for b2 being ConceptStr of b1 holds
( b2 is quasi-empty iff ( the Extent of b2 is empty or the Intent of b2 is empty ) );

registration
let c1 be non quasi-empty 2-sorted ;
cluster strict non empty ConceptStr of a1;
existence
ex b1 being ConceptStr of c1 st
( b1 is strict & not b1 is empty )
proof end;
cluster strict quasi-empty ConceptStr of a1;
existence
ex b1 being ConceptStr of c1 st
( b1 is strict & b1 is quasi-empty )
proof end;
end;

registration
let c1 be empty 2-sorted ;
cluster -> empty ConceptStr of a1;
coherence
for b1 being ConceptStr of c1 holds b1 is empty
proof end;
end;

registration
let c1 be quasi-empty 2-sorted ;
cluster -> quasi-empty ConceptStr of a1;
coherence
for b1 being ConceptStr of c1 holds b1 is quasi-empty
proof end;
end;

Lemma22: for b1 being FormalContext
for b2 being ConceptStr of b1 st (ObjectDerivation b1) . the Extent of b2 = the Intent of b2 & (AttributeDerivation b1) . the Intent of b2 = the Extent of b2 holds
not b2 is empty
proof end;

definition
let c1 be FormalContext;
let c2 be ConceptStr of c1;
attr a2 is concept-like means :Def13: :: CONLAT_1:def 13
( (ObjectDerivation a1) . the Extent of a2 = the Intent of a2 & (AttributeDerivation a1) . the Intent of a2 = the Extent of a2 );
end;

:: deftheorem Def13 defines concept-like CONLAT_1:def 13 :
for b1 being FormalContext
for b2 being ConceptStr of b1 holds
( b2 is concept-like iff ( (ObjectDerivation b1) . the Extent of b2 = the Intent of b2 & (AttributeDerivation b1) . the Intent of b2 = the Extent of b2 ) );

registration
let c1 be FormalContext;
cluster non empty concept-like ConceptStr of a1;
existence
ex b1 being ConceptStr of c1 st
( b1 is concept-like & not b1 is empty )
proof end;
end;

definition
let c1 be FormalContext;
mode FormalConcept of a1 is non empty concept-like ConceptStr of a1;
end;

registration
let c1 be FormalContext;
cluster strict ConceptStr of a1;
existence
ex b1 being FormalConcept of c1 st b1 is strict
proof end;
end;

theorem Th20: :: CONLAT_1:20
for b1 being FormalContext
for b2 being Subset of the Objects of b1 holds
( ConceptStr(# ((AttributeDerivation b1) . ((ObjectDerivation b1) . b2)),((ObjectDerivation b1) . b2) #) is FormalConcept of b1 & ( for b3 being Subset of the Objects of b1
for b4 being Subset of the Attributes of b1 st ConceptStr(# b3,b4 #) is FormalConcept of b1 & b2 c= b3 holds
(AttributeDerivation b1) . ((ObjectDerivation b1) . b2) c= b3 ) )
proof end;

theorem Th21: :: CONLAT_1:21
for b1 being FormalContext
for b2 being Subset of the Objects of b1 holds
( ex b3 being Subset of the Attributes of b1 st ConceptStr(# b2,b3 #) is FormalConcept of b1 iff (AttributeDerivation b1) . ((ObjectDerivation b1) . b2) = b2 )
proof end;

theorem Th22: :: CONLAT_1:22
for b1 being FormalContext
for b2 being Subset of the Attributes of b1 holds
( ConceptStr(# ((AttributeDerivation b1) . b2),((ObjectDerivation b1) . ((AttributeDerivation b1) . b2)) #) is FormalConcept of b1 & ( for b3 being Subset of the Objects of b1
for b4 being Subset of the Attributes of b1 st ConceptStr(# b3,b4 #) is FormalConcept of b1 & b2 c= b4 holds
(ObjectDerivation b1) . ((AttributeDerivation b1) . b2) c= b4 ) )
proof end;

theorem Th23: :: CONLAT_1:23
for b1 being FormalContext
for b2 being Subset of the Attributes of b1 holds
( ex b3 being Subset of the Objects of b1 st ConceptStr(# b3,b2 #) is FormalConcept of b1 iff (ObjectDerivation b1) . ((AttributeDerivation b1) . b2) = b2 )
proof end;

definition
let c1 be FormalContext;
let c2 be ConceptStr of c1;
attr a2 is universal means :Def14: :: CONLAT_1:def 14
the Extent of a2 = the Objects of a1;
end;

:: deftheorem Def14 defines universal CONLAT_1:def 14 :
for b1 being FormalContext
for b2 being ConceptStr of b1 holds
( b2 is universal iff the Extent of b2 = the Objects of b1 );

definition
let c1 be FormalContext;
let c2 be ConceptStr of c1;
attr a2 is co-universal means :Def15: :: CONLAT_1:def 15
the Intent of a2 = the Attributes of a1;
end;

:: deftheorem Def15 defines co-universal CONLAT_1:def 15 :
for b1 being FormalContext
for b2 being ConceptStr of b1 holds
( b2 is co-universal iff the Intent of b2 = the Attributes of b1 );

registration
let c1 be FormalContext;
cluster strict universal ConceptStr of a1;
existence
ex b1 being FormalConcept of c1 st
( b1 is strict & b1 is universal )
proof end;
cluster strict co-universal ConceptStr of a1;
existence
ex b1 being FormalConcept of c1 st
( b1 is strict & b1 is co-universal )
proof end;
end;

definition
let c1 be FormalContext;
func Concept-with-all-Objects c1 -> strict universal FormalConcept of a1 means :Def16: :: CONLAT_1:def 16
ex b1 being Subset of the Objects of a1ex b2 being Subset of the Attributes of a1 st
( a2 = ConceptStr(# b1,b2 #) & b1 = (AttributeDerivation a1) . {} & b2 = (ObjectDerivation a1) . ((AttributeDerivation a1) . {} ) );
existence
ex b1 being strict universal FormalConcept of c1ex b2 being Subset of the Objects of c1ex b3 being Subset of the Attributes of c1 st
( b1 = ConceptStr(# b2,b3 #) & b2 = (AttributeDerivation c1) . {} & b3 = (ObjectDerivation c1) . ((AttributeDerivation c1) . {} ) )
proof end;
uniqueness
for b1, b2 being strict universal FormalConcept of c1 st ex b3 being Subset of the Objects of c1ex b4 being Subset of the Attributes of c1 st
( b1 = ConceptStr(# b3,b4 #) & b3 = (AttributeDerivation c1) . {} & b4 = (ObjectDerivation c1) . ((AttributeDerivation c1) . {} ) ) & ex b3 being Subset of the Objects of c1ex b4 being Subset of the Attributes of c1 st
( b2 = ConceptStr(# b3,b4 #) & b3 = (AttributeDerivation c1) . {} & b4 = (ObjectDerivation c1) . ((AttributeDerivation c1) . {} ) ) holds
b1 = b2
;
end;

:: deftheorem Def16 defines Concept-with-all-Objects CONLAT_1:def 16 :
for b1 being FormalContext
for b2 being strict universal FormalConcept of b1 holds
( b2 = Concept-with-all-Objects b1 iff ex b3 being Subset of the Objects of b1ex b4 being Subset of the Attributes of b1 st
( b2 = ConceptStr(# b3,b4 #) & b3 = (AttributeDerivation b1) . {} & b4 = (ObjectDerivation b1) . ((AttributeDerivation b1) . {} ) ) );

definition
let c1 be FormalContext;
func Concept-with-all-Attributes c1 -> strict co-universal FormalConcept of a1 means :Def17: :: CONLAT_1:def 17
ex b1 being Subset of the Objects of a1ex b2 being Subset of the Attributes of a1 st
( a2 = ConceptStr(# b1,b2 #) & b1 = (AttributeDerivation a1) . ((ObjectDerivation a1) . {} ) & b2 = (ObjectDerivation a1) . {} );
existence
ex b1 being strict co-universal FormalConcept of c1ex b2 being Subset of the Objects of c1ex b3 being Subset of the Attributes of c1 st
( b1 = ConceptStr(# b2,b3 #) & b2 = (AttributeDerivation c1) . ((ObjectDerivation c1) . {} ) & b3 = (ObjectDerivation c1) . {} )
proof end;
uniqueness
for b1, b2 being strict co-universal FormalConcept of c1 st ex b3 being Subset of the Objects of c1ex b4 being Subset of the Attributes of c1 st
( b1 = ConceptStr(# b3,b4 #) & b3 = (AttributeDerivation c1) . ((ObjectDerivation c1) . {} ) & b4 = (ObjectDerivation c1) . {} ) & ex b3 being Subset of the Objects of c1ex b4 being Subset of the Attributes of c1 st
( b2 = ConceptStr(# b3,b4 #) & b3 = (AttributeDerivation c1) . ((ObjectDerivation c1) . {} ) & b4 = (ObjectDerivation c1) . {} ) holds
b1 = b2
;
end;

:: deftheorem Def17 defines Concept-with-all-Attributes CONLAT_1:def 17 :
for b1 being FormalContext
for b2 being strict co-universal FormalConcept of b1 holds
( b2 = Concept-with-all-Attributes b1 iff ex b3 being Subset of the Objects of b1ex b4 being Subset of the Attributes of b1 st
( b2 = ConceptStr(# b3,b4 #) & b3 = (AttributeDerivation b1) . ((ObjectDerivation b1) . {} ) & b4 = (ObjectDerivation b1) . {} ) );

theorem Th24: :: CONLAT_1:24
for b1 being FormalContext holds
( the Extent of (Concept-with-all-Objects b1) = the Objects of b1 & the Intent of (Concept-with-all-Attributes b1) = the Attributes of b1 )
proof end;

theorem Th25: :: CONLAT_1:25
for b1 being FormalContext
for b2 being FormalConcept of b1 holds
( ( the Extent of b2 = {} implies b2 is co-universal ) & ( the Intent of b2 = {} implies b2 is universal ) )
proof end;

theorem Th26: :: CONLAT_1:26
for b1 being FormalContext
for b2 being strict FormalConcept of b1 holds
( ( the Extent of b2 = {} implies b2 = Concept-with-all-Attributes b1 ) & ( the Intent of b2 = {} implies b2 = Concept-with-all-Objects b1 ) )
proof end;

theorem Th27: :: CONLAT_1:27
for b1 being FormalContext
for b2 being quasi-empty ConceptStr of b1 holds
( not b2 is FormalConcept of b1 or b2 is universal or b2 is co-universal )
proof end;

theorem Th28: :: CONLAT_1:28
for b1 being FormalContext
for b2 being quasi-empty ConceptStr of b1 holds
( not b2 is strict FormalConcept of b1 or b2 = Concept-with-all-Objects b1 or b2 = Concept-with-all-Attributes b1 )
proof end;

definition
let c1 be FormalContext;
mode Set-of-FormalConcepts of c1 -> non empty set means :Def18: :: CONLAT_1:def 18
for b1 being set st b1 in a2 holds
b1 is FormalConcept of a1;
existence
ex b1 being non empty set st
for b2 being set st b2 in b1 holds
b2 is FormalConcept of c1
proof end;
end;

:: deftheorem Def18 defines Set-of-FormalConcepts CONLAT_1:def 18 :
for b1 being FormalContext
for b2 being non empty set holds
( b2 is Set-of-FormalConcepts of b1 iff for b3 being set st b3 in b2 holds
b3 is FormalConcept of b1 );

definition
let c1 be FormalContext;
let c2 be Set-of-FormalConcepts of c1;
redefine mode Element as Element of c2 -> FormalConcept of a1;
coherence
for b1 being Element of c2 holds b1 is FormalConcept of c1
by Def18;
end;

definition
let c1 be FormalContext;
let c2, c3 be FormalConcept of c1;
pred c2 is-SubConcept-of c3 means :Def19: :: CONLAT_1:def 19
the Extent of a2 c= the Extent of a3;
end;

:: deftheorem Def19 defines is-SubConcept-of CONLAT_1:def 19 :
for b1 being FormalContext
for b2, b3 being FormalConcept of b1 holds
( b2 is-SubConcept-of b3 iff the Extent of b2 c= the Extent of b3 );

notation
let c1 be FormalContext;
let c2, c3 be FormalConcept of c1;
synonym c3 is-SuperConcept-of c2 for c2 is-SubConcept-of c3;
end;

theorem Th29: :: CONLAT_1:29
canceled;

theorem Th30: :: CONLAT_1:30
canceled;

theorem Th31: :: CONLAT_1:31
for b1 being FormalContext
for b2, b3 being FormalConcept of b1 holds
( b2 is-SubConcept-of b3 iff the Intent of b3 c= the Intent of b2 )
proof end;

theorem Th32: :: CONLAT_1:32
canceled;

theorem Th33: :: CONLAT_1:33
for b1 being FormalContext
for b2, b3 being FormalConcept of b1 holds
( b2 is-SuperConcept-of b3 iff the Intent of b2 c= the Intent of b3 ) by Th31;

theorem Th34: :: CONLAT_1:34
for b1 being FormalContext
for b2 being FormalConcept of b1 holds
( b2 is-SubConcept-of Concept-with-all-Objects b1 & Concept-with-all-Attributes b1 is-SubConcept-of b2 )
proof end;

definition
let c1 be FormalContext;
func B-carrier c1 -> non empty set equals :: CONLAT_1:def 20
{ ConceptStr(# b1,b2 #) where B is Subset of the Objects of a1, B is Subset of the Attributes of a1 : ( not ConceptStr(# b1,b2 #) is empty & (ObjectDerivation a1) . b1 = b2 & (AttributeDerivation a1) . b2 = b1 ) } ;
coherence
{ ConceptStr(# b1,b2 #) where B is Subset of the Objects of c1, B is Subset of the Attributes of c1 : ( not ConceptStr(# b1,b2 #) is empty & (ObjectDerivation c1) . b1 = b2 & (AttributeDerivation c1) . b2 = b1 ) } is non empty set
proof end;
end;

:: deftheorem Def20 defines B-carrier CONLAT_1:def 20 :
for b1 being FormalContext holds B-carrier b1 = { ConceptStr(# b2,b3 #) where B is Subset of the Objects of b1, B is Subset of the Attributes of b1 : ( not ConceptStr(# b2,b3 #) is empty & (ObjectDerivation b1) . b2 = b3 & (AttributeDerivation b1) . b3 = b2 ) } ;

definition
let c1 be FormalContext;
redefine func B-carrier as B-carrier c1 -> Set-of-FormalConcepts of a1;
coherence
B-carrier c1 is Set-of-FormalConcepts of c1
proof end;
end;

registration
let c1 be FormalContext;
cluster B-carrier a1 -> non empty ;
coherence
not B-carrier c1 is empty
;
end;

theorem Th35: :: CONLAT_1:35
for b1 being FormalContext
for b2 being set holds
( b2 in B-carrier b1 iff b2 is strict FormalConcept of b1 )
proof end;

definition
let c1 be FormalContext;
func B-meet c1 -> BinOp of B-carrier a1 means :Def21: :: CONLAT_1:def 21
for b1, b2 being strict FormalConcept of a1 ex b3 being Subset of the Objects of a1ex b4 being Subset of the Attributes of a1 st
( a2 . b1,b2 = ConceptStr(# b3,b4 #) & b3 = the Extent of b1 /\ the Extent of b2 & b4 = (ObjectDerivation a1) . ((AttributeDerivation a1) . (the Intent of b1 \/ the Intent of b2)) );
existence
ex b1 being BinOp of B-carrier c1 st
for b2, b3 being strict FormalConcept of c1 ex b4 being Subset of the Objects of c1ex b5 being Subset of the Attributes of c1 st
( b1 . b2,b3 = ConceptStr(# b4,b5 #) & b4 = the Extent of b2 /\ the Extent of b3 & b5 = (ObjectDerivation c1) . ((AttributeDerivation c1) . (the Intent of b2 \/ the Intent of b3)) )
proof end;
uniqueness
for b1, b2 being BinOp of B-carrier c1 st ( for b3, b4 being strict FormalConcept of c1 ex b5 being Subset of the Objects of c1ex b6 being Subset of the Attributes of c1 st
( b1 . b3,b4 = ConceptStr(# b5,b6 #) & b5 = the Extent of b3 /\ the Extent of b4 & b6 = (ObjectDerivation c1) . ((AttributeDerivation c1) . (the Intent of b3 \/ the Intent of b4)) ) ) & ( for b3, b4 being strict FormalConcept of c1 ex b5 being Subset of the Objects of c1ex b6 being Subset of the Attributes of c1 st
( b2 . b3,b4 = ConceptStr(# b5,b6 #) & b5 = the Extent of b3 /\ the Extent of b4 & b6 = (ObjectDerivation c1) . ((AttributeDerivation c1) . (the Intent of b3 \/ the Intent of b4)) ) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def21 defines B-meet CONLAT_1:def 21 :
for b1 being FormalContext
for b2 being BinOp of B-carrier b1 holds
( b2 = B-meet b1 iff for b3, b4 being strict FormalConcept of b1 ex b5 being Subset of the Objects of b1ex b6 being Subset of the Attributes of b1 st
( b2 . b3,b4 = ConceptStr(# b5,b6 #) & b5 = the Extent of b3 /\ the Extent of b4 & b6 = (ObjectDerivation b1) . ((AttributeDerivation b1) . (the Intent of b3 \/ the Intent of b4)) ) );

definition
let c1 be FormalContext;
func B-join c1 -> BinOp of B-carrier a1 means :Def22: :: CONLAT_1:def 22
for b1, b2 being strict FormalConcept of a1 ex b3 being Subset of the Objects of a1ex b4 being Subset of the Attributes of a1 st
( a2 . b1,b2 = ConceptStr(# b3,b4 #) & b3 = (AttributeDerivation a1) . ((ObjectDerivation a1) . (the Extent of b1 \/ the Extent of b2)) & b4 = the Intent of b1 /\ the Intent of b2 );
existence
ex b1 being BinOp of B-carrier c1 st
for b2, b3 being strict FormalConcept of c1 ex b4 being Subset of the Objects of c1ex b5 being Subset of the Attributes of c1 st
( b1 . b2,b3 = ConceptStr(# b4,b5 #) & b4 = (AttributeDerivation c1) . ((ObjectDerivation c1) . (the Extent of b2 \/ the Extent of b3)) & b5 = the Intent of b2 /\ the Intent of b3 )
proof end;
uniqueness
for b1, b2 being BinOp of B-carrier c1 st ( for b3, b4 being strict FormalConcept of c1 ex b5 being Subset of the Objects of c1ex b6 being Subset of the Attributes of c1 st
( b1 . b3,b4 = ConceptStr(# b5,b6 #) & b5 = (AttributeDerivation c1) . ((ObjectDerivation c1) . (the Extent of b3 \/ the Extent of b4)) & b6 = the Intent of b3 /\ the Intent of b4 ) ) & ( for b3, b4 being strict FormalConcept of c1 ex b5 being Subset of the Objects of c1ex b6 being Subset of the Attributes of c1 st
( b2 . b3,b4 = ConceptStr(# b5,b6 #) & b5 = (AttributeDerivation c1) . ((ObjectDerivation c1) . (the Extent of b3 \/ the Extent of b4)) & b6 = the Intent of b3 /\ the Intent of b4 ) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def22 defines B-join CONLAT_1:def 22 :
for b1 being FormalContext
for b2 being BinOp of B-carrier b1 holds
( b2 = B-join b1 iff for b3, b4 being strict FormalConcept of b1 ex b5 being Subset of the Objects of b1ex b6 being Subset of the Attributes of b1 st
( b2 . b3,b4 = ConceptStr(# b5,b6 #) & b5 = (AttributeDerivation b1) . ((ObjectDerivation b1) . (the Extent of b3 \/ the Extent of b4)) & b6 = the Intent of b3 /\ the Intent of b4 ) );

Lemma38: for b1 being FormalContext
for b2, b3 being strict FormalConcept of b1 holds (B-meet b1) . b2,b3 in rng (B-meet b1)
proof end;

Lemma39: for b1 being FormalContext
for b2, b3 being strict FormalConcept of b1 holds (B-join b1) . b2,b3 in rng (B-join b1)
proof end;

Lemma40: for b1 being FormalContext
for b2, b3 being strict FormalConcept of b1 holds
( (B-meet b1) . b2,b3 is strict FormalConcept of b1 & (B-join b1) . b2,b3 is strict FormalConcept of b1 )
proof end;

theorem Th36: :: CONLAT_1:36
for b1 being FormalContext
for b2, b3 being strict FormalConcept of b1 holds (B-meet b1) . b2,b3 = (B-meet b1) . b3,b2
proof end;

theorem Th37: :: CONLAT_1:37
for b1 being FormalContext
for b2, b3 being strict FormalConcept of b1 holds (B-join b1) . b2,b3 = (B-join b1) . b3,b2
proof end;

theorem Th38: :: CONLAT_1:38
for b1 being FormalContext
for b2, b3, b4 being strict FormalConcept of b1 holds (B-meet b1) . b2,((B-meet b1) . b3,b4) = (B-meet b1) . ((B-meet b1) . b2,b3),b4
proof end;

theorem Th39: :: CONLAT_1:39
for b1 being FormalContext
for b2, b3, b4 being strict FormalConcept of b1 holds (B-join b1) . b2,((B-join b1) . b3,b4) = (B-join b1) . ((B-join b1) . b2,b3),b4
proof end;

theorem Th40: :: CONLAT_1:40
for b1 being FormalContext
for b2, b3 being strict FormalConcept of b1 holds (B-join b1) . ((B-meet b1) . b2,b3),b3 = b3
proof end;

theorem Th41: :: CONLAT_1:41
for b1 being FormalContext
for b2, b3 being strict FormalConcept of b1 holds (B-meet b1) . b2,((B-join b1) . b2,b3) = b2
proof end;

theorem Th42: :: CONLAT_1:42
for b1 being FormalContext
for b2 being strict FormalConcept of b1 holds (B-meet b1) . b2,(Concept-with-all-Objects b1) = b2
proof end;

theorem Th43: :: CONLAT_1:43
for b1 being FormalContext
for b2 being strict FormalConcept of b1 holds (B-join b1) . b2,(Concept-with-all-Objects b1) = Concept-with-all-Objects b1
proof end;

theorem Th44: :: CONLAT_1:44
for b1 being FormalContext
for b2 being strict FormalConcept of b1 holds (B-join b1) . b2,(Concept-with-all-Attributes b1) = b2
proof end;

theorem Th45: :: CONLAT_1:45
for b1 being FormalContext
for b2 being strict FormalConcept of b1 holds (B-meet b1) . b2,(Concept-with-all-Attributes b1) = Concept-with-all-Attributes b1
proof end;

definition
let c1 be FormalContext;
func ConceptLattice c1 -> non empty strict LattStr equals :: CONLAT_1:def 23
LattStr(# (B-carrier a1),(B-join a1),(B-meet a1) #);
coherence
LattStr(# (B-carrier c1),(B-join c1),(B-meet c1) #) is non empty strict LattStr
;
end;

:: deftheorem Def23 defines ConceptLattice CONLAT_1:def 23 :
for b1 being FormalContext holds ConceptLattice b1 = LattStr(# (B-carrier b1),(B-join b1),(B-meet b1) #);

theorem Th46: :: CONLAT_1:46
for b1 being FormalContext holds ConceptLattice b1 is Lattice
proof end;

registration
let c1 be FormalContext;
cluster ConceptLattice a1 -> non empty strict Lattice-like ;
coherence
( ConceptLattice c1 is strict & not ConceptLattice c1 is empty & ConceptLattice c1 is Lattice-like )
by Th46;
end;

definition
let c1 be FormalContext;
let c2 be non empty Subset of (ConceptLattice c1);
redefine mode Element as Element of c2 -> FormalConcept of a1;
coherence
for b1 being Element of c2 holds b1 is FormalConcept of c1
proof end;
end;

definition
let c1 be FormalContext;
let c2 be Element of (ConceptLattice c1);
func c2 @ -> strict FormalConcept of a1 equals :: CONLAT_1:def 24
a2;
coherence
c2 is strict FormalConcept of c1
by Th35;
end;

:: deftheorem Def24 defines @ CONLAT_1:def 24 :
for b1 being FormalContext
for b2 being Element of (ConceptLattice b1) holds b2 @ = b2;

theorem Th47: :: CONLAT_1:47
for b1 being FormalContext
for b2, b3 being Element of (ConceptLattice b1) holds
( b2 [= b3 iff b2 @ is-SubConcept-of b3 @ )
proof end;

theorem Th48: :: CONLAT_1:48
for b1 being FormalContext holds ConceptLattice b1 is complete Lattice
proof end;

registration
let c1 be FormalContext;
cluster ConceptLattice a1 -> non empty strict Lattice-like complete ;
coherence
ConceptLattice c1 is complete
by Th48;
end;