:: CONLAT_2 semantic presentation

definition
let c1 be FormalContext;
let c2 be strict FormalConcept of c1;
func @ c2 -> Element of (ConceptLattice a1) equals :: CONLAT_2:def 1
a2;
coherence
c2 is Element of (ConceptLattice c1)
proof end;
end;

:: deftheorem Def1 defines @ CONLAT_2:def 1 :
for b1 being FormalContext
for b2 being strict FormalConcept of b1 holds @ b2 = b2;

registration
let c1 be FormalContext;
cluster ConceptLattice a1 -> bounded ;
coherence
ConceptLattice c1 is bounded
proof end;
end;

theorem Th1: :: CONLAT_2:1
for b1 being FormalContext holds
( Bottom (ConceptLattice b1) = Concept-with-all-Attributes b1 & Top (ConceptLattice b1) = Concept-with-all-Objects b1 )
proof end;

theorem Th2: :: CONLAT_2:2
for b1 being FormalContext
for b2 being non empty Subset-Family of the Objects of b1 holds (ObjectDerivation b1) . (union b2) = meet { ((ObjectDerivation b1) . b3) where B is Subset of the Objects of b1 : b3 in b2 }
proof end;

theorem Th3: :: CONLAT_2:3
for b1 being FormalContext
for b2 being non empty Subset-Family of the Attributes of b1 holds (AttributeDerivation b1) . (union b2) = meet { ((AttributeDerivation b1) . b3) where B is Subset of the Attributes of b1 : b3 in b2 }
proof end;

theorem Th4: :: CONLAT_2:4
for b1 being FormalContext
for b2 being Subset of (ConceptLattice b1) holds
( "/\" b2,(ConceptLattice b1) is FormalConcept of b1 & "\/" b2,(ConceptLattice b1) is FormalConcept of b1 )
proof end;

definition
let c1 be FormalContext;
let c2 be Subset of (ConceptLattice c1);
func "/\" c2,c1 -> FormalConcept of a1 equals :: CONLAT_2:def 2
"/\" a2,(ConceptLattice a1);
coherence
"/\" c2,(ConceptLattice c1) is FormalConcept of c1
by Th4;
func "\/" c2,c1 -> FormalConcept of a1 equals :: CONLAT_2:def 3
"\/" a2,(ConceptLattice a1);
coherence
"\/" c2,(ConceptLattice c1) is FormalConcept of c1
by Th4;
end;

:: deftheorem Def2 defines "/\" CONLAT_2:def 2 :
for b1 being FormalContext
for b2 being Subset of (ConceptLattice b1) holds "/\" b2,b1 = "/\" b2,(ConceptLattice b1);

:: deftheorem Def3 defines "\/" CONLAT_2:def 3 :
for b1 being FormalContext
for b2 being Subset of (ConceptLattice b1) holds "\/" b2,b1 = "\/" b2,(ConceptLattice b1);

theorem Th5: :: CONLAT_2:5
for b1 being FormalContext holds
( "\/" ({} (ConceptLattice b1)),b1 = Concept-with-all-Attributes b1 & "/\" ({} (ConceptLattice b1)),b1 = Concept-with-all-Objects b1 )
proof end;

theorem Th6: :: CONLAT_2:6
for b1 being FormalContext holds
( "\/" ([#] the carrier of (ConceptLattice b1)),b1 = Concept-with-all-Objects b1 & "/\" ([#] the carrier of (ConceptLattice b1)),b1 = Concept-with-all-Attributes b1 )
proof end;

theorem Th7: :: CONLAT_2:7
for b1 being FormalContext
for b2 being non empty Subset of (ConceptLattice b1) holds
( the Extent of ("\/" b2,b1) = (AttributeDerivation b1) . ((ObjectDerivation b1) . (union { the Extent of ConceptStr(# b3,b4 #) where B is Subset of the Objects of b1, B is Subset of the Attributes of b1 : ConceptStr(# b3,b4 #) in b2 } )) & the Intent of ("\/" b2,b1) = meet { the Intent of ConceptStr(# b3,b4 #) where B is Subset of the Objects of b1, B is Subset of the Attributes of b1 : ConceptStr(# b3,b4 #) in b2 } )
proof end;

theorem Th8: :: CONLAT_2:8
for b1 being FormalContext
for b2 being non empty Subset of (ConceptLattice b1) holds
( the Extent of ("/\" b2,b1) = meet { the Extent of ConceptStr(# b3,b4 #) where B is Subset of the Objects of b1, B is Subset of the Attributes of b1 : ConceptStr(# b3,b4 #) in b2 } & the Intent of ("/\" b2,b1) = (ObjectDerivation b1) . ((AttributeDerivation b1) . (union { the Intent of ConceptStr(# b3,b4 #) where B is Subset of the Objects of b1, B is Subset of the Attributes of b1 : ConceptStr(# b3,b4 #) in b2 } )) )
proof end;

theorem Th9: :: CONLAT_2:9
for b1 being FormalContext
for b2 being strict FormalConcept of b1 holds "\/" { ConceptStr(# b3,b4 #) where B is Subset of the Objects of b1, B is Subset of the Attributes of b1 : ex b1 being Object of b1 st
( b5 in the Extent of b2 & b3 = (AttributeDerivation b1) . ((ObjectDerivation b1) . {b5}) & b4 = (ObjectDerivation b1) . {b5} )
}
,(ConceptLattice b1) = b2
proof end;

theorem Th10: :: CONLAT_2:10
for b1 being FormalContext
for b2 being strict FormalConcept of b1 holds "/\" { ConceptStr(# b3,b4 #) where B is Subset of the Objects of b1, B is Subset of the Attributes of b1 : ex b1 being Attribute of b1 st
( b5 in the Intent of b2 & b3 = (AttributeDerivation b1) . {b5} & b4 = (ObjectDerivation b1) . ((AttributeDerivation b1) . {b5}) )
}
,(ConceptLattice b1) = b2
proof end;

definition
let c1 be FormalContext;
func gamma c1 -> Function of the Objects of a1,the carrier of (ConceptLattice a1) means :Def4: :: CONLAT_2:def 4
for b1 being Element of the Objects of a1 ex b2 being Subset of the Objects of a1ex b3 being Subset of the Attributes of a1 st
( a2 . b1 = ConceptStr(# b2,b3 #) & b2 = (AttributeDerivation a1) . ((ObjectDerivation a1) . {b1}) & b3 = (ObjectDerivation a1) . {b1} );
existence
ex b1 being Function of the Objects of c1,the carrier of (ConceptLattice c1) st
for b2 being Element of the Objects of c1 ex b3 being Subset of the Objects of c1ex b4 being Subset of the Attributes of c1 st
( b1 . b2 = ConceptStr(# b3,b4 #) & b3 = (AttributeDerivation c1) . ((ObjectDerivation c1) . {b2}) & b4 = (ObjectDerivation c1) . {b2} )
proof end;
uniqueness
for b1, b2 being Function of the Objects of c1,the carrier of (ConceptLattice c1) st ( for b3 being Element of the Objects of c1 ex b4 being Subset of the Objects of c1ex b5 being Subset of the Attributes of c1 st
( b1 . b3 = ConceptStr(# b4,b5 #) & b4 = (AttributeDerivation c1) . ((ObjectDerivation c1) . {b3}) & b5 = (ObjectDerivation c1) . {b3} ) ) & ( for b3 being Element of the Objects of c1 ex b4 being Subset of the Objects of c1ex b5 being Subset of the Attributes of c1 st
( b2 . b3 = ConceptStr(# b4,b5 #) & b4 = (AttributeDerivation c1) . ((ObjectDerivation c1) . {b3}) & b5 = (ObjectDerivation c1) . {b3} ) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def4 defines gamma CONLAT_2:def 4 :
for b1 being FormalContext
for b2 being Function of the Objects of b1,the carrier of (ConceptLattice b1) holds
( b2 = gamma b1 iff for b3 being Element of the Objects of b1 ex b4 being Subset of the Objects of b1ex b5 being Subset of the Attributes of b1 st
( b2 . b3 = ConceptStr(# b4,b5 #) & b4 = (AttributeDerivation b1) . ((ObjectDerivation b1) . {b3}) & b5 = (ObjectDerivation b1) . {b3} ) );

definition
let c1 be FormalContext;
func delta c1 -> Function of the Attributes of a1,the carrier of (ConceptLattice a1) means :Def5: :: CONLAT_2:def 5
for b1 being Element of the Attributes of a1 ex b2 being Subset of the Objects of a1ex b3 being Subset of the Attributes of a1 st
( a2 . b1 = ConceptStr(# b2,b3 #) & b2 = (AttributeDerivation a1) . {b1} & b3 = (ObjectDerivation a1) . ((AttributeDerivation a1) . {b1}) );
existence
ex b1 being Function of the Attributes of c1,the carrier of (ConceptLattice c1) st
for b2 being Element of the Attributes of c1 ex b3 being Subset of the Objects of c1ex b4 being Subset of the Attributes of c1 st
( b1 . b2 = ConceptStr(# b3,b4 #) & b3 = (AttributeDerivation c1) . {b2} & b4 = (ObjectDerivation c1) . ((AttributeDerivation c1) . {b2}) )
proof end;
uniqueness
for b1, b2 being Function of the Attributes of c1,the carrier of (ConceptLattice c1) st ( for b3 being Element of the Attributes of c1 ex b4 being Subset of the Objects of c1ex b5 being Subset of the Attributes of c1 st
( b1 . b3 = ConceptStr(# b4,b5 #) & b4 = (AttributeDerivation c1) . {b3} & b5 = (ObjectDerivation c1) . ((AttributeDerivation c1) . {b3}) ) ) & ( for b3 being Element of the Attributes of c1 ex b4 being Subset of the Objects of c1ex b5 being Subset of the Attributes of c1 st
( b2 . b3 = ConceptStr(# b4,b5 #) & b4 = (AttributeDerivation c1) . {b3} & b5 = (ObjectDerivation c1) . ((AttributeDerivation c1) . {b3}) ) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def5 defines delta CONLAT_2:def 5 :
for b1 being FormalContext
for b2 being Function of the Attributes of b1,the carrier of (ConceptLattice b1) holds
( b2 = delta b1 iff for b3 being Element of the Attributes of b1 ex b4 being Subset of the Objects of b1ex b5 being Subset of the Attributes of b1 st
( b2 . b3 = ConceptStr(# b4,b5 #) & b4 = (AttributeDerivation b1) . {b3} & b5 = (ObjectDerivation b1) . ((AttributeDerivation b1) . {b3}) ) );

theorem Th11: :: CONLAT_2:11
for b1 being FormalContext
for b2 being Object of b1
for b3 being Attribute of b1 holds
( (gamma b1) . b2 is FormalConcept of b1 & (delta b1) . b3 is FormalConcept of b1 )
proof end;

theorem Th12: :: CONLAT_2:12
for b1 being FormalContext holds
( rng (gamma b1) is supremum-dense & rng (delta b1) is infimum-dense )
proof end;

theorem Th13: :: CONLAT_2:13
for b1 being FormalContext
for b2 being Object of b1
for b3 being Attribute of b1 holds
( b2 is-connected-with b3 iff (gamma b1) . b2 [= (delta b1) . b3 )
proof end;

Lemma11: for b1, b2 being Lattice
for b3 being Function of the carrier of b1,the carrier of b2 st ( for b4, b5 being Element of b1 st b3 . b4 [= b3 . b5 holds
b4 [= b5 ) holds
b3 is one-to-one
proof end;

Lemma12: for b1, b2 being complete Lattice
for b3 being Function of the carrier of b1,the carrier of b2 st b3 is one-to-one & rng b3 = the carrier of b2 & ( for b4, b5 being Element of b1 holds
( b4 [= b5 iff b3 . b4 [= b3 . b5 ) ) holds
b3 is Homomorphism of b1,b2
proof end;

Lemma13: 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;

theorem Th14: :: CONLAT_2:14
for b1 being complete Lattice
for b2 being FormalContext holds
( ConceptLattice b2,b1 are_isomorphic iff ex b3 being Function of the Objects of b2,the carrier of b1ex b4 being Function of the Attributes of b2,the carrier of b1 st
( rng b3 is supremum-dense & rng b4 is infimum-dense & ( for b5 being Object of b2
for b6 being Attribute of b2 holds
( b5 is-connected-with b6 iff b3 . b5 [= b4 . b6 ) ) ) )
proof end;

definition
let c1 be Lattice;
func Context c1 -> non quasi-empty strict ContextStr equals :: CONLAT_2:def 6
ContextStr(# the carrier of a1,the carrier of a1,(LattRel a1) #);
coherence
ContextStr(# the carrier of c1,the carrier of c1,(LattRel c1) #) is non quasi-empty strict ContextStr
by CONLAT_1:def 2;
end;

:: deftheorem Def6 defines Context CONLAT_2:def 6 :
for b1 being Lattice holds Context b1 = ContextStr(# the carrier of b1,the carrier of b1,(LattRel b1) #);

theorem Th15: :: CONLAT_2:15
for b1 being complete Lattice holds ConceptLattice (Context b1),b1 are_isomorphic
proof end;

theorem Th16: :: CONLAT_2:16
for b1 being Lattice holds
( b1 is complete iff ex b2 being FormalContext st ConceptLattice b2,b1 are_isomorphic )
proof end;

registration
let c1 be complete Lattice;
cluster a1 .: -> complete ;
coherence
c1 .: is complete
proof end;
end;

definition
let c1 be FormalContext;
func c1 .: -> non quasi-empty strict ContextStr equals :: CONLAT_2:def 7
ContextStr(# the Attributes of a1,the Objects of a1,(the Information of a1 ~ ) #);
coherence
ContextStr(# the Attributes of c1,the Objects of c1,(the Information of c1 ~ ) #) is non quasi-empty strict ContextStr
by CONLAT_1:def 2;
end;

:: deftheorem Def7 defines .: CONLAT_2:def 7 :
for b1 being FormalContext holds b1 .: = ContextStr(# the Attributes of b1,the Objects of b1,(the Information of b1 ~ ) #);

theorem Th17: :: CONLAT_2:17
for b1 being strict FormalContext holds (b1 .: ) .: = b1 ;

theorem Th18: :: CONLAT_2:18
for b1 being FormalContext
for b2 being Subset of the Objects of b1 holds (ObjectDerivation b1) . b2 = (AttributeDerivation (b1 .: )) . b2
proof end;

theorem Th19: :: CONLAT_2:19
for b1 being FormalContext
for b2 being Subset of the Attributes of b1 holds (AttributeDerivation b1) . b2 = (ObjectDerivation (b1 .: )) . b2
proof end;

definition
let c1 be FormalContext;
let c2 be ConceptStr of c1;
func c2 .: -> strict ConceptStr of a1 .: means :Def8: :: CONLAT_2:def 8
( the Extent of a3 = the Intent of a2 & the Intent of a3 = the Extent of a2 );
existence
ex b1 being strict ConceptStr of c1 .: st
( the Extent of b1 = the Intent of c2 & the Intent of b1 = the Extent of c2 )
proof end;
uniqueness
for b1, b2 being strict ConceptStr of c1 .: st the Extent of b1 = the Intent of c2 & the Intent of b1 = the Extent of c2 & the Extent of b2 = the Intent of c2 & the Intent of b2 = the Extent of c2 holds
b1 = b2
;
end;

:: deftheorem Def8 defines .: CONLAT_2:def 8 :
for b1 being FormalContext
for b2 being ConceptStr of b1
for b3 being strict ConceptStr of b1 .: holds
( b3 = b2 .: iff ( the Extent of b3 = the Intent of b2 & the Intent of b3 = the Extent of b2 ) );

definition
let c1 be FormalContext;
let c2 be FormalConcept of c1;
redefine func .: as c2 .: -> strict FormalConcept of a1 .: ;
coherence
c2 .: is strict FormalConcept of c1 .:
proof end;
end;

theorem Th20: :: CONLAT_2:20
for b1 being strict FormalContext
for b2 being strict FormalConcept of b1 holds (b2 .: ) .: = b2
proof end;

Lemma19: for b1 being FormalContext
for b2 being Subset of the Objects of b1
for b3 being Subset of the Attributes of b1 st ConceptStr(# b2,b3 #) is FormalConcept of b1 holds
ConceptStr(# b2,b3 #) .: is FormalConcept of b1 .:
proof end;

definition
let c1 be FormalContext;
func DualHomomorphism c1 -> Homomorphism of (ConceptLattice a1) .: , ConceptLattice (a1 .: ) means :Def9: :: CONLAT_2:def 9
for b1 being strict FormalConcept of a1 holds a2 . b1 = b1 .: ;
existence
ex b1 being Homomorphism of (ConceptLattice c1) .: , ConceptLattice (c1 .: ) st
for b2 being strict FormalConcept of c1 holds b1 . b2 = b2 .:
proof end;
uniqueness
for b1, b2 being Homomorphism of (ConceptLattice c1) .: , ConceptLattice (c1 .: ) st ( for b3 being strict FormalConcept of c1 holds b1 . b3 = b3 .: ) & ( for b3 being strict FormalConcept of c1 holds b2 . b3 = b3 .: ) holds
b1 = b2
proof end;
end;

:: deftheorem Def9 defines DualHomomorphism CONLAT_2:def 9 :
for b1 being FormalContext
for b2 being Homomorphism of (ConceptLattice b1) .: , ConceptLattice (b1 .: ) holds
( b2 = DualHomomorphism b1 iff for b3 being strict FormalConcept of b1 holds b2 . b3 = b3 .: );

theorem Th21: :: CONLAT_2:21
for b1 being FormalContext holds DualHomomorphism b1 is isomorphism
proof end;

theorem Th22: :: CONLAT_2:22
for b1 being FormalContext holds ConceptLattice (b1 .: ),(ConceptLattice b1) .: are_isomorphic
proof end;