Formal concept analysis #
This file defines concept lattices. A concept of a relation r : α → β → Prop is a pair of sets
s : Set α and t : Set β such that s is the set of all a : α that are related to all elements
of t, and t is the set of all b : β that are related to all elements of s.
Ordering the concepts of a relation r by inclusion on the first component gives rise to a
concept lattice. Every concept lattice is complete and in fact every complete lattice arises as
the concept lattice of its ≤.
Implementation notes #
Concept lattices are usually defined from a context, that is the triple (α, β, r), but the type
of r determines α and β already, so we do not define contexts as a separate object.
References #
- [Davey, Priestley Introduction to Lattices and Order][davey_priestley]
- [Birkhoff, Garrett Lattice Theory][birkhoff1940]
Tags #
concept, formal concept analysis, intent, extent, object, attribute
Lower and upper polars #
The upper polar of s : Set α along a relation r : α → β → Prop is the set of all elements
which r relates to all elements of s.
Instances For
The lower polar of t : Set β along a relation r : α → β → Prop is the set of all elements
which r relates to all elements of t.
Instances For
The extentClosure of a set is the smallest extent containing it. See
IsExtent.lowerPolar_upperPolar_subset for this proof.
Instances For
The intentClosure of a set is the smallest intent containing it. See
IsIntent.upperPolar_lowerPolar_subset for this proof.
Instances For
Intent and extent #
A set is an extent when either of the following equivalent definitions holds:
- The
lowerPolarof itsupperPolaris itself. - The set is the
lowerPolarof some other set.
The latter is used as a definition, but one can rewrite using the former via IsExtent.eq.
Instances For
Alias of the forward direction of Order.isExtent_iff.
A set is an intent when either of the following equivalent definitions holds:
- The
upperPolarof itslowerPolaris itself. - The set is the
upperPolarof some other set.
The latter is used as a definition, but one can rewrite using the former via IsIntent.eq.
Instances For
Alias of the forward direction of Order.isIntent_iff.
Concepts #
The formal concepts of a relation. A concept of r : α → β → Prop is a pair of sets s, t
such that s is the set of all elements that are r-related to all of t and t is the set of
all elements that are r-related to all of s.
- extent : Set α
The extent of a concept.
- intent : Set β
The intent of a concept.
- upperPolar_extent : upperPolar r self.extent = self.intent
The intent consists of all elements related to all elements of the extent.
- lowerPolar_intent : lowerPolar r self.intent = self.extent
The extent consists of all elements related to all elements of the intent.
Instances For
See Concept.ext' for a version using the intent.
See Concept.ext for a version using the extent.
Define a concept from an extent, by setting the intent to its upper polar.
Instances For
Define a concept from an intent, by setting the extent to its lower polar.
Instances For
The concept generated from the upper polar of a set, i.e. the smallest concept containing the
set of objects s.
Instances For
The concept generated by a single object.
Instances For
The concept generated by a single attribute.
Instances For
Note that if r' is the ≤ relation, this theorem will often not be true!
Alias of Concept.extent_max.
Alias of Concept.intent_max.
Alias of Concept.extent_min.
Alias of Concept.intent_min.
One half of the fundamental theorem of concept lattices: every concept lattice is a complete lattice.
See DedekindCut.principalIso for the second half.
Swap the sets of a concept to make it a concept of the dual context.
Instances For
The dual of a concept lattice is isomorphic to the concept lattice of the dual context.