formal concept analysis - vub

94

Upload: others

Post on 14-Jun-2022

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Formal Concept Analysis - VUB

Faculteit Wetenschappen en Bio-ingenieurswetenschappenDepartement Wiskunde

Formal Concept Analysis

Proefschrift ingediend met het oog op het behalen van de graad van Master in de Wiskunde

Lieve Lambrechts

Promotor: Prof. Dr. Mark Sioen

2011-2012

Page 2: Formal Concept Analysis - VUB

Contents

Acknowledgements II

Introduction III

1 Preliminaries 1

1.1 Ordered Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.2 Lattices and Complete Lattices . . . . . . . . . . . . . . . . . . . . . . . . 71.3 Closure Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161.4 Galois Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

2 Concept Lattices 23

2.1 Contexts and their Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . 232.2 Concept Lattices: the Basic Theorem . . . . . . . . . . . . . . . . . . . . . 292.3 Clarifying and Reducing the context . . . . . . . . . . . . . . . . . . . . . . 33

3 Determination and Representation 44

3.1 All concepts of a context . . . . . . . . . . . . . . . . . . . . . . . . . . . 443.2 Concept Lattice Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . 513.3 Implications between Attributes . . . . . . . . . . . . . . . . . . . . . . . . 59

De�nitions and basic results . . . . . . . . . . . . . . . . . . . . . . . . . 59Closed sets of implications . . . . . . . . . . . . . . . . . . . . . . . . . 67Complete sets of implications . . . . . . . . . . . . . . . . . . . . . . . . 71The Stem Base . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74

Abstract 82

Bibliography 83

List of Notations 85

Index 86

I

Page 3: Formal Concept Analysis - VUB

Acknowledgements

First of all, I would like to thank my promotor, prof. dr. Mark Sioen, for everythingI learned from him this past year, for his words of wisdom and encouragement and forhis patience (for I am sure, I have tested it from time to time).

Also, I would like to thank prof. dr. Ann Nowé and prof. dr. Jan Danckaert for theirinput regarding applications of Formal Concept Analysis in Neural Networks and prof.dr. Luis Zárate and Sérgio Mariano Dias from the Applied Computational IntelligenceLaboratory at PUC Minas Brazil for their cooperation.

I would also like to express my gratitude to Kristien and Maud for their continuoussupport and give special thanks to Marlies and Lien, whose company made the writingprocess so much more enjoyable.

Last but not least, I would like to thank Lars for all of the reasons above. You neverstopped believing in me. Thank you.

II

Page 4: Formal Concept Analysis - VUB

Introduction

Formal Concept Analysis was born in Darmstadt, Germany, in the early 1980s from anattempt made by Rudolf Wille to restructure lattice theory. Wille was motivated byhis dissatisfaction with the current status of lattice theory and mathematics in general.In his paper Restructuring Lattice Theory [1], in which the theory of Formal ConceptAnalysis was initiated, he writes:

Lattice theory today re�ects the general status of current mathematics: thereis a rich production of theoretical concepts, results, and developments, manyof which are reached by elaborate mental gymnastics; on the other hand, theconnections of the theory to its surroundings are getting weaker: the re-sult is that the theory and even many of its parts become more isolated. . . restructuring lattice theory is understood as an attempt to unfold lattice-theoretical concepts, results and methods in a continuous relationship withtheir surroundings. One basic aim is to promote better communication be-tween lattice theorists and potential users of lattice theory.

Wille's approach is inspired by the origin of lattices from the nineteenth-century at-tempts to formalize logic, where the study of hierarchies played a central role. Tradi-tional philosophy considers a concept to be determined by its `extent' and its `intent' :the extent consist of all objects belonging to the concept, while the intent contains allattributes shared by those objects. There exists a natural hierarchy between concepts,for example, the concept `human being' is a subconcept of the concept `being' since everyhuman being is also a being (i.e. the extent of `human being' is a subset of the extentof `being') and every attribute shared by all beings is also shared by all human beingsin particular (i.e. the intent of `being' is contained in the intent of `human being').Since listing all objects and attributes belonging to a concept is almost never possible,a context with a �xed set of objects and a �xed set of attributes needs to be speci�ed.Formalizing these contexts and concepts then gives rise to concept lattices, which Willeuses as the basis of his approach. He then shows how certain lattice-theoretical resultscan be obtained within the framework of formal contexts and formal concepts.

Over the past thirty years, the framework for contexts and concept hierarchies has beendevelopped into its own research domain. Although the resulting theory of Formal Con-cept Analysis was initially set up as an attempt to restructure lattice theory, the primarygoal of FCA today is to analyse data sets in terms of the properties of its members. Con-cept lattices are used to unfold given data, making their conceptual structure visible in

III

Page 5: Formal Concept Analysis - VUB

order to �nd patterns, regularities, exceptions etc. The Darmstadt research group alonehas already participated in more than a hundred application cooperation projects invarious di�erent disciplines, such as medicine, psychology, linguistics, politics, machinelearning, computer science and many more. It is their belief that the potential of FormalConcept Analysis as a branch of applied mathematics is just beginning to show.

Motivated by this strong link to applications, the main goal of my dissertation is to layout the mathematical foundations of Formal Concept Analysis needed for the reader toeasily access the extensive literature on FCA applications. I will discuss some applica-tions of FCA in the domain of neural networks. The main reference used throughout thisdissertation�and deserving seperate mention�is the textbook Formal Concept Analy-sis: Mathematical Foundations [2] by Bernhard Ganter and Rudolf Wille.

Since Formal Concept Analysis is based on the mathematical theory of lattices, anintroduction to this subject is provided in the �rst chapter. Davey and Priestley'silluminating book Introduction to Lattices and Order [4], which introduced me to latticetheory, served as a main reference for the preliminaries in addition to Ganter and Wille'stextbook.

The second chapter introduces the formal notions of `context' and `concept' as wellas the concept order which formalizes the conceptual hierarchy. Equipped with thisconcept order, the set of all concepts of a context is shown to be a complete lattice.Such a complete concept lattice then unfolds the hierarchy of the concepts. Moreover, itis shown that every complete lattice can be regarded as a concept lattice. These resultsare known as the basic theorem of Formal Concept Analysis. Furthermore, this chaptercontains di�erent methods of simplifying a context without changing its concept lattice.Ganter and Wille's Formal Concept Analysis: Mathematical Foundations [2], providedthe technical results of this chapter, while more intuition on the matter was obtainedfrom Davey and Priestley's Introduction to Lattices and Order [4] and from Concept DataAnalysis: Theory and Applications [8] by Claudio Carpineto and Giovanni Romano.

The focus of the third and �nal chapter is determining and representing concept lattices.The �rst section describes some algorithms for calculating all the concepts of a given con-text. The mathematical results were obtained from Davey and Priestley's Introductionto Lattices and Order [4] and Ganter and Wille's Formal Concept Analysis: Mathemat-ical Foundations [2], while pseudocodes and technical aspects of the algorithms werefound in Formal Concept Analysis: Methods and Applications in Computer Science, atechnical report by Bernhard Ganter and Gerd Stumme [5].

Concept lattices can be visualized through Hasse diagrams based on the concept hier-archy. This is one of the reasons FCA is such a powerful data analysis technique. Thesecond section of the third chapter discusses some issues regarding the manual construc-tion of concept lattice diagrams. Automatic generation of `well-drawn' diagrams formsa �eld of research on its own. It will not be discussed here. Main references for thissection are Davey and Priestley's Introduction to Lattices and Order [4], Ganter andWille's Formal Concept Analysis: Mathematical Foundations [2], Ganter and Stumme's

IV

Page 6: Formal Concept Analysis - VUB

technical report [5] and Carpineto and Romano's Concept Data Analysis: Theory andApplications [8].

The last section discusses implications in contexts. Implications provide a very naturalway of conveying relations between properties and will therefore be studied extensively.It will be shown that the concept lattice can be obtained from the set of all implicationsof the context. Hence, the implications contain all the information stored in the con-text. The aim then is to �nd implicational bases, i.e. minimal sets of implications fromwhich all other implications can be semantically inferred. For �nite contexts, a specialimplicational base is introduced, called the stem base. It is special in the sense that noother implicational base can contain fewer implications. This was shown by Guigues andDuquenne in Familles minimales d'implications informatives resultant d'un tableau dedonnées binaires [14]. An algorithm for computing the stem base is provided, based onGanter and Stumme's Formal Concept Analysis: Methods and Applications in ComputerScience [5]. Another topic treated in this section is syntactic inference of implications.The results on this subject are borrowed from the domain of relational databases. Inparticular, some syntactic inference rules stated by William Ward Armstrong in De-pendency Structures of Data Base Relationships [11] are discussed. David Maier's bookThe Theory of Relational Databases [12] also served as a reference on this subject.

V

Page 7: Formal Concept Analysis - VUB

Chapter 1

Preliminaries

Formal Concept Analysis is based on mathematical order theory, in particular on thetheory of complete lattices. The �rst two sections of this chapter provide an introduc-tion to these subjects, limited to the de�nitions and results needed to set up the FCAframework. For a more complete (and very instructive) introduction, we refer the readerto Davey and Priestley's `Lattices and Order' [4]. We recommend Garrett Birkho�'sclassic `Lattice Theory' [6] and George Grätzer's `General Lattice Theory' [7] for a moreencyclopedic exposition of lattice theory.

The latter two sections of this chapter contain results on closure operators, closuresystems and Galois connections. One could just as easily set up the FCA frameworkwithout any a priori knowledge of these subjects, but since we encounter examples ofclosure operators and Galois connections among the basic notions of Formal ConceptAnalysis, we choose to formally introduce them in the preliminaries for the sake ofcompleteness.

1.1 Ordered Sets

1.1.1 De�nition. Let P be a set. An order (or partial order) on P is a binaryrelation ≤ on P satisfying the following conditions for all x, y, z ∈ P :

re�exivity: x ≤ x,

antisymmetry: x ≤ y and y ≤ x imply x = y,

transitivity: x ≤ y and y ≤ z imply x ≤ z.

A set P equipped with an order relation ≤ is said to be an ordered set (or partiallyordered set). Some authors use the shorthand poset. Where it is necessary to specifythe order relation, we write (P,≤). Otherwise, we simply write P .

1.1.2 De�nition. A strict order < on a set P is a binary relation on P satisfying thefollowing conditions for all a, b, c ∈ P :

irre�exivity: ¬(a < a),

1

Page 8: Formal Concept Analysis - VUB

1. Preliminaries

transivity: a < b and b < c imply a < c.

As usual we shall write a ≮ b instead of ¬(a < b) and a � b instead of ¬(a ≤ b).

1.1.3 Remark. A partial order ≤ on a set P gives rise to a strict order < on P :

x < y ⇐⇒ x ≤ y and x 6= y.

Henceforth we will, without explicit mention, adopt this notational convention withrespect to all partial orders: �<� will denote the strict order associated with the partialorder ≤. In particular, ⊂ will denote the strict inclusion order.

1.1.4 De�nitions. A partial order on a set P is total (or linear) if, for all x, y ∈ P ,either x ≤ y or y ≤ x (that is, if any two elements of P are comparable). A totallyordered set is also called a chain. An ordered set P where x ≤ y only if x = y is anantichain. A strict order on a set P is called total if, for all x, y ∈ P with x 6= y, eitherx < y or y < x.

1.1.5 The covering relation. Let P be an ordered set and let x, y ∈ P . We say that xis covered by y (or y covers x) and write x ≺ y if x < y and if there is no element zof P ful�lling x < z < y. Observe that, if P is �nite, x < y if and only if there existsa �nite sequence of covering relations x = x0 ≺ x1 ≺ x2 ≺ · · · ≺ xn = y. Thus, in the�nite case, the order relation determines the covering relation and vice versa.

One of the most useful features of �nite ordered sets is that they can be visually repre-sented.

1.1.6 Hasse diagrams. Every �nite ordered set P can be represented by a Hassediagram. The elements of P are depicted by small circles in the plane. A line segmentconnects the circles corresponding to a covering pair x ≺ y, where the circle representingy is placed `higher' in the plane than the circle representing x. The order relation cannow be read o� the diagram as follows: x < y if and only if the circle representing y canbe reached by an ascending path from the circle representing x. Figure 1.1 shows someexamples of Hasse diagrams.

Figure 1.1: Left: Hasse diagram of the powerset of a two-element set. Middle: Hassediagram of a chain with four elements. Right: Hasse diagram of an antichain with threeelements.

Of course, a �nite ordered set can have many di�erent Hasse diagrams. For example,�gure 1.2 shows two di�erent Hasse diagrams of the same ordered set. A well-drawn

2

Page 9: Formal Concept Analysis - VUB

1. Preliminaries

Hasse diagram can be a real asset in understanding an ordered set. The rule of thumbis to draw the Hasse diagram with as much parallelograms as possible, to strive forsymmetry and to minimize edge-crossings.

Figure 1.2: Two Hasse diagrams representing the same ordered set.

Since Hasse diagrams can also be used to de�ne �nite ordered sets, we need to be ableto recognize when two di�erent Hasse diagrams represent the same ordered set. To thisend, we introduce the notion of order isomorphism.

1.1.7 De�nitions. A map ϕ : P → Q between two ordered sets (P,≤) and (Q,≤) iscalled order-preserving if

x ≤ y ⇒ ϕ(x) ≤ ϕ(y)

for all x, y ∈ P . If alsox ≤ y ⇐ ϕ(x) ≤ ϕ(y)

for all x, y ∈ P , ϕ is called an order-embedding. We say that P and Q are (order-)isomorphic, and write P ∼= Q if there exists a map ϕ from P onto Q such that

x ≤ y ⇐⇒ ϕ(x) ≤ ϕ(y)

for all x, y ∈ P . Then ϕ is called an order isomorphism.

An order-embedding is necessarily injective: using re�exivity and antisymmetry of ≤ inP and Q we �nd

ϕ(x) = ϕ(y) ⇐⇒ ϕ(x) ≤ ϕ(y) and ϕ(y) ≤ ϕ(x)

⇐⇒ x ≤ y and y ≤ x

⇐⇒ x = y.

Consequently, order isomorphisms are bijective. As a result, every order isomorphismϕ has a well-de�ned inverse ϕ−1. It can easily be seen that ϕ−1 is also an order isomor-phism.

1.1.8 Remark. A bijective order-preserving map is not necessarily an order isomor-phism, as shown by �gure 1.3.

1.1.9 Lemma. Let P and Q be �nite ordered sets and let ϕ : P → Q be a bijective map.Then the following are equivalent:

3

Page 10: Formal Concept Analysis - VUB

1. Preliminaries

Figure 1.3: A bijective and order-preserving map, but not an order isomorphism.

(i) ϕ is an order isomorphism,

(ii) x < y in P if and only if ϕ(x) < ϕ(y) in Q,

(iii) x ≺ y in P if and only if ϕ(x) ≺ ϕ(y) in Q.

Proof. The equivalence of (i) and (ii) follows immediately from the de�nitions.

Assume (ii) holds and take x ≺ y in P . Then x < y and therefore ϕ(x) < ϕ(y) in Q.Suppose there exists w ∈ Q satisfying ϕ(x) < w < ϕ(y). Since ϕ is onto, there existsan element u ∈ P such that w = ϕ(u). Then by (ii), x < u < y, in contradiction withx ≺ y. Consequently, ϕ(x) ≺ ϕ(y). The reverse implication can be shown in the sameway. Hence (iii) holds.

Now assume (iii) and let x < y in P . Since P is �nite, there are elements x1, . . . , xn ∈ Psuch that x = x0 ≺ x1 ≺ · · · ≺ xn = y. By (iii),

ϕ(x) = ϕ(x0) ≺ ϕ(x1) ≺ · · · ≺ ϕ(xn) = ϕ(y).

Hence, ϕ(x) < ϕ(y). The reverse implication is proved similarly, using the fact that ϕis onto. Consequently, (ii) holds.

1.1.10 Proposition. Two �nite ordered sets P and Q are order-isomorphic if and onlyif they can be drawn with identical diagrams.

Proof. Assume there exists an order isomorphism ϕ : P → Q. Recall that a diagram isdetermined by the covering relation. Implication (i) ⇒ (iii) of lemma 1.1.9 then yieldsthat P and Q can be represented with the same diagram. Conversely, assume P andQ can both be represented by the same diagram D. Then there exists bijective maps fand g from P and Q respectively onto the points of D. The map g−1 ◦ f is bijective andsatis�es condition (iii) in lemma 1.1.9, so P ∼= Q.

For any ordered set P , we can form a new ordered set: its dual.

1.1.11 De�nitions. The inverse relation ≥ of an order relation ≤ is also an orderrelation. It is called the dual order of ≤. Given an ordered set P , we can form a newordered set P ∂, the dual of P , equipped with the dual order. Two ordered sets P andQ are called dually isomorphic when P ∼= Q∂.

4

Page 11: Formal Concept Analysis - VUB

1. Preliminaries

We are now able to de�ne order-reversing maps.

1.1.12 De�nition. Amap ϕ : P → Q between two ordered sets is called order-reversingif ϕ de�nes an order-preserving map between P and Q∂. Formally, ϕ : (P,≤)→ (Q,≤)is order-reversing if x ≤ y ⇒ ϕ(x) ≥ ϕ(y) for all x, y ∈ P .

Note that each statement about an ordered set P corresponds to a statement about P ∂.For example, x covers y in P while x is covered by y in P ∂.

1.1.13 De�nition. Let Φ be a statement about ordered sets. The dual statement Φ∂

is obtained by replacing each occurence of ≤ by ≥ and vice versa.

Theorems about ordered sets often consist of two statements dual to each other. Theduality principle below allows us to reduce the work needed to prove them by half.

1.1.14 The Duality Principle. If Φ is a statement about ordered sets which is true inall ordered sets, then the dual statement Φ∂ is also true in all ordered sets.

Associated with any ordered set are two important families of sets: downsets and upsets.

1.1.15 De�nitions. Let (P,≤) be an ordered set and let Q ⊆ P .

• Q is a downset (or alternatively a decreasing set or order ideal) if, wheneverx ∈ Q, y ∈ P and y ≤ x, we have y ∈ Q.

• Dually, Q is an upset (or alternatively a increasing set or order �lter) if,whenever x ∈ Q, y ∈ P and y ≥ x, we have y ∈ Q.

• The set of all downsets of P is denoted by O(P ). It is itself an ordered set underthe inclusion order.

• Given an arbitrary subset Q of P and x ∈ P , we de�ne

↓Q := {y ∈ P | ∃x ∈ Q : y ≤ x} and ↓x := {y ∈ P | y ≤ x},

↑Q := {y ∈ P | ∃x ∈ Q : y ≥ x} and ↑x := {y ∈ P | y ≥ x}.

These are read `down Q', etc.

It is easily seen that ↓Q is a downset. Moreover, it is the smallest downset containing Q.Indeed, a downset D containing Q must contain every x ∈ ↓Q since for such x thereexists a z in Q, hence in D, with x ≤ z. Clearly, Q is a downset if and only if Q =↓Q.Dually, ↑Q is the smallest upset containing Q and Q is an upset if and only if Q =↑Q.Downsets of the form ↓x and upsets of the form ↑x are called principal.

The following lemma provides a link between the order relation and the downsets of anordered set.

1.1.16 Lemma. Let (P,≤) be an ordered set and x, y ∈ P . Then the following areequivalent:

(i) x ≤ y

5

Page 12: Formal Concept Analysis - VUB

1. Preliminaries

(ii) ↓x ⊆ ↓y

(iii) ∀Q ∈ O(P ) : y ∈ Q⇒ x ∈ QProof. (i) ⇒ (ii) For an element z of ↓x it holds that z ≤ x and consequently z ≤ y,showing that z ∈ ↓y.(ii) ⇒ (iii) Let Q be a downset of P containing y. Then ↓ y ⊆ Q and also ↓x ⊆ Qby (ii). Since x ∈ ↓x, we now have x ∈ Q.(iii) ⇒ (i) x ∈ ↓y by (iii). Therefore, x ≤ y.

Downsets and upsets are clearly related by duality: Q is a downset of P if and only ifQ is an upset of P ∂. Moreover, they are related by complementation.

1.1.17 Proposition. Let (O(P ),⊆) be the ordered set of downsets of an ordered set P .Then

O(P ∂) ∼= O(P )∂

with the complementation map as the order isomorphism.

Proof. We start by showing that Q is a downset of P ∂ if and only if P\Q is a downsetof P . Consider a downset Q of P ∂ or equivalently, an upset Q of P . Let x ∈ P\Qand y ∈ P with y ≤ x. Suppose y ∈ Q. Then x ∈ Q since Q is an upset. This is incontradiction with x ∈ P\Q and therefore y ∈ P\Q. The reverse implication can beshown in an analogous way. Furthermore, note that the equivalence

A ⊆ B ⇐⇒ P\A ⊇ P\B

holds for all subsets A,B ⊆ P . The complementation map thus provides a bijectiveorder-embedding between O(P ∂) and O(P )∂, �nishing our proof.

We already described one way to construct a new ordered set from an existing one: viaduality. Products are another very natural construction method.

1.1.18 De�nition. The (direct) product of two ordered sets (P,≤) and (Q,≤) is de-�ned to be the Cartesian product P ×Q equipped with the coordinatewise order de�nedby

(x1, x2) ≤ (y1, y2) in P ×Q ⇐⇒ x1 ≤ y1 in P and x2 ≤ y2 in Q.

This de�nition can be extended to any number of factors: if I is an index set and(Pi,≤), i ∈ I are ordered sets, then

×i∈I

(Pi,≤) :=

(×i∈I

Pi,≤

)with the order on×i∈I Pi de�ned by

(xi)i∈I ≤ (yi)i∈I ⇐⇒ xi ≤ yi for all i ∈ I.

Informally, a product P × Q is drawn by replacing each point of a diagram of P by acopy of a diagram of Q (or vice versa). An example of a direct product is shown in�gure 1.4.

6

Page 13: Formal Concept Analysis - VUB

1. Preliminaries

Figure 1.4: An example of a product of two ordered sets.

1.2 Lattices and Complete Lattices

1.2.1 De�nitions. Let (P,≤) be an ordered set and let S be a subset of P . An elementx ∈ P is an upper bound of S if s ≤ x for all s ∈ S. A lower bound is de�neddually. If there is a smallest element in the set of all upper bounds of S, it is calledthe supremum or least upper bound of S and is denoted by

∨S. Similarly, if there

exists a greatest element in the set of all lower bounds of S, it is called the in�mum orgreatest lower bound of S and is denoted by

∧S. If S = {x, y}, we also write x ∨ y

in stead of∨S and x ∧ y instead of

∧S. Supremum and in�mum are also frequently

called join and meet respectively.

1.2.2 De�nitions. Let L be an ordered set.

• If x ∨ y and x ∧ y exist for all x, y ∈ L, then L is called a lattice.

• If∨S and

∧S exist for all S ⊆ L, then L is called a complete lattice.

1.2.3 De�nitions. Let L be a complete lattice. A subset X of L which is closed undersuprema, i.e. for which

∨T ∈ X for all subsets T ⊆ X, is called a

∨-subsemilattice

of L. Similarly, a subsetX of L which is closed under in�ma is called a∧-subsemilattice

of L.

1.2.4 Remarks.

• A complete lattice V has a largest element∨V and a smallest element

∧V .

Complete lattices are therefore never empty.

• Let V be a complete lattice. The set of upper bounds of the empty set is V itself.Hence,

∨∅ =

∧V . The set of lower bounds of the empty set also equals V and

thus,∧∅ =

∨V .

Note that a lattice L can also be regarded as a non-empty set endowed with two binaryoperations: join and meet. Formally, these operations on L are given by

∨ : L× L→ L : (x, y) 7→ sup{x, y}

and∧ : L× L→ L : (x, y) 7→ inf{x, y}.

7

Page 14: Formal Concept Analysis - VUB

1. Preliminaries

We are able to reconstruct the order relation on L from the lattice operations ∨ and ∧by the following lemma.

1.2.5 The connecting lemma. Let L be a lattice and let a, b ∈ L. The following areequivalent:

(i) a ≤ b

(ii) a ∨ b = b

(iii) a ∧ b = a

Proof. Assume (i). The set of upper bounds of {a, b} clearly equals ↑b by transitivityof ≤. Hence, a ∨ b = min(↑ b) = b, showing (ii). Similarly, (i) implies (iii). Nowassume (ii). Then b is an upper bound of {a, b}, in particular b ≥ a. Thus (i) holds.Similarly, (iii) implies (i).

Figure 1.5: Left: Hasse diagram of a complete lattice with 12 elements. Right: Hassediagram of an ordered set that is not a lattice.

1.2.6 Examples.

• One can easily verify that the ordered set represented by the Hasse diagram on theleft of �gure 1.5 is a lattice. Moreover, this lattice is complete. In fact, we shalldemonstrate in corollary 1.2.9 that every non-empty �nite lattice is complete.

• The right Hasse diagram in �gure 1.5 represents an ordered set that is not a lattice.For example, the set of upperbounds of {a, b} is non-empty, but does not have asmallest element.

• Consider the set L = {{0}, {1}, {0, 1, 2}, {0, 1, 3}}, ordered by inclusion. Sinceboth {0, 1, 2} * {0, 1, 3} and {0, 1, 2} + {0, 1, 3}, the set {{0, 1, 2}, {0, 1, 3}} ofupper bounds of {{0}, {1}} does not contain a smallest element, i.e. {0} ∨ {1}does not exist. Thus, the ordered set L is not a lattice.

8

Page 15: Formal Concept Analysis - VUB

1. Preliminaries

• The set N of natural numbers with the usual order is a lattice in which join andmeet are given by n∨m = max{n,m} and n∧m = min{n,m} respectively. Thislattice is not complete. Consider for example the subset 2N + 1 of odd naturalnumbers. Clearly,

∨(2N+ 1) does not exist.

• Chains are lattices. Chains are complete lattices if and only if they are �nite.

• For any setX, the ordered set (P(X),⊆) is a complete lattice, called the powersetlattice of X, in which∨

i∈I

Ai =⋃i∈I

Ai and∧i∈I

Ai =⋂i∈I

Ai

for all families (Ai)i∈I in P(X). We verify the assertion about the meets. Since⋂i∈I Ai ⊆ Aj for all j ∈ I, it follows that

⋂i∈I Ai is a lower bound of {Ai | i ∈ I}.

Also, if B ∈ P(X) is a lower bound of {Ai | i ∈ I}, then B ⊆ Ai for all i ∈ I.Hence, B ⊆

⋂i∈I Ai showing that

⋂i∈I Ai is indeed the greatest lower bound of

{Ai | i ∈ I}.

• Let P be an ordered set. It is straightforward to show that the ordered set O(P )of downsets is a complete lattice with the join operator given by set union andthe meet operator given by set intersection. O(P ) is called the downset latticeof P .

The next lemma sums up some useful properties regarding suprema and in�ma.

1.2.7 Lemma. Let (P,≤) be an ordered set. Let S ⊆ P such that∨S and

∧S exist

in P .

(i) s ≤∨S and s ≥

∧S for all s ∈ S.

(ii) Let x ∈ P ; then x ≤∧S if and only if x ≤ s for all s ∈ S.

(iii) Let x ∈ P ; then x ≥∨S if and only if x ≥ s for all s ∈ S.

Proof.

(i) Follows directly from the de�nitions of∨

and∧.

(ii) If x ≤∧S, then by (i) and the transitivity of ≤, x ≤ s for all s ∈ S. Suppose

conversely that x ≤ s holds for all s ∈ S. Then x is a lower bound of S and hence,x ≤

∧S.

(iii) Analogous to (ii).

The following lemma shows that join and meet behave well with respect to set union.As a consequence, the join and meet operations are associative.

9

Page 16: Formal Concept Analysis - VUB

1. Preliminaries

1.2.8 Lemma. Let L be a lattice and let S and T be subsets of L such that∨S,∨T,∧S

and∧T exist in L. Then ∨(

S ∪ T)

=(∨

S)∨(∨

T)

and ∧(S ∪ T

)=(∧

S)∧(∧

T).

Proof. This proof is a straightforward application of the previous lemma. Clearly,∨(S ∪ T

)≥ s for all s ∈ S and

∨(S ∪ T

)≥ t for all t ∈ T

by part (i) of the previous lemma. Then,∨(

S ∪ T)≥∨S and

∨(S ∪ T

)≥∨T by

part (iii) and therefore, ∨(S ∪ T

)≥(∨

S)∨(∨

T).

On the other hand, (∨S)∨(∨

T)≥∨

S ≥ s for all s ∈ S

and also (∨S)∨(∨

T)≥∨

T ≥ t for all t ∈ T

yielding (∨S)∨(∨

T)≥ x for all x ∈ S ∪ T.

Using part (iii) of the previous lemma, we �nd(∨S)∨(∨

T)≥∨(

S ∪ T).

1.2.9 Corollary. Every non-empty �nite lattice is complete.

Proof. Let L be a non-empty �nite lattice and let X be a non-empty subset of L.The existence of

∨X and

∧X can be shown through an induction on the number of

elements of X, based on previous lemma. Since L is non-empty and since∨∅ =

∧L

and∧∅ =

∨L, the join and meet of the empty set also exist.

In order to show that an in�nite lattice is complete, we only have to demonstrate thatthe meet of every subset exists, as shown by the following lemma.

1.2.10 Proposition. An ordered set P in which the in�mum exists for every subset isa complete lattice.

Proof. Let X be a subset of P . We need to prove that the supremum of X exists. Byassumption, the set S of all upper bounds of X has an in�mum s. Clearly, x ≤ t for allx ∈ X and t ∈ S. Therefore, x ≤ s for all x ∈ X. This shows that s ∈ S. Since alsos =

∧S, s is the smallest element of S, i.e. the least upper bound of X. Equivalently,

s =∨X.

10

Page 17: Formal Concept Analysis - VUB

1. Preliminaries

Conveniently, the duality principle formulated in 1.1.14 can be extended to lattices.This allows us to reduce some proofs and statements about lattices by half.

1.2.11 The Duality Principle for Lattices. The de�nitions of a lattice and a completelattice are self-dual: if V is a (complete) lattice, then so is V ∂. Therefore, the dualityprinciple for ordered sets also applies to lattices. We obtain the dual statement of astatement Φ about lattices by replacing the symbols ≤,∨,∧,

∨and

∧by ≥,∧,∨,

∧and∨

respectively.

The following de�nitions are illustrated with some examples in �gure 1.6.

1.2.12 De�nitions.

• Amap ψ : L→M between two lattices L andM is called supremum-preservingor join-preserving, if ψ(x ∨ y) = ψ(x) ∨ ψ(y) for all x, y ∈ L. Similarly, ψ iscalled in�mum-preserving or meet-preserving if ψ(x ∧ y) = ψ(x) ∧ ψ(y) forall x, y ∈ L. When ψ is both join- and meet-preserving, ψ is called a latticehomomorphism. A bijective homomorphism is called a lattice isomorphism.

• A map ϕ : V → W between two complete lattices V and W is called supremum-preserving or join-preserving, if

ϕ(∨

X)

=∨

ϕ(X)

for every subset X of V . Similarly, ϕ is called in�mum-preserving or meet-preserving if

ϕ(∧

X)

=∧

ϕ(X)

for every subset X of V . If ϕ is both meet- and join-preserving, then ϕ is calleda complete (lattice) homomorphism. A bijective complete homomorphism iscalled a complete (lattice) isomorphism.

The proofs of the following results can be signi�cantly shortened by using the dualityprinciple for lattices.

1.2.13 Lemma. Every join-preserving map between two lattices is order-preserving.Every meet-preserving map between two lattices is order-preserving.

Proof. Let ϕ : L → M be a join-preserving map between two lattices L and M . Theconnecting lemma yields

x ≤ y =⇒ x ∨ y = y =⇒ ϕ(x) ∨ ϕ(y) = ϕ(x ∨ y) = ϕ(y) =⇒ ϕ(x) ≤ ϕ(y)

for all x, y ∈ L. The statement for meet-preserving maps can be obtained dually.

1.2.14 Theorem. Let ϕ : V → W be a map between two complete lattices V and W .The map ϕ is a complete lattice isomorphism if and only if it is an order isomorphism.

11

Page 18: Formal Concept Analysis - VUB

1. Preliminaries

Figure 1.6: Top: an order-preserving map that is neither join-preserving, nor meet-preserving. Bottom left: a join-preserving map that is not meet-preserving. Bottomright: a meet-preserving map that is not join-preserving.

Proof. Assume that ϕ is an order isomorphism. We need to prove that

ϕ(∨

X)

=∨

ϕ(X) and ϕ(∧

X)

=∧

ϕ(X)

for all X ⊆ V . We show the statement for the joins. Since∨X ≥ x for all x ∈ X,

ϕ (∨X) ≥ ϕ(x) holds for all x ∈ X. Recalling lemma 1.2.7, this yields

ϕ(∨

X)≥∨

ϕ(X).

Also, since the inverse of an order isomorphism is also an order isomorphism, we have

∀x ∈ X : ϕ(x) ≤∨

ϕ(X) =⇒ ∀x ∈ X : x ≤ ϕ−1(∨

ϕ(X))

=⇒∨

X ≤ ϕ−1(∨

ϕ(X))

=⇒ ϕ(∨

X)≤∨

ϕ(X).

Therefore, ϕ is join-preserving. It can be shown dually that ϕ is meet-preserving. Thus,ϕ is a complete isomorphism.

Conversely, a complete isomorphism ϕ is in particular a lattice isomorphism. The con-necting lemma then yields

x ≤ y ⇐⇒ x∨y = y ⇐⇒ ϕ(x∨y) = ϕ(y) ⇐⇒ ϕ(x)∨ϕ(y) = ϕ(y) ⇐⇒ ϕ(x) ≤ ϕ(y),

for all x, y ∈ V . Thus, ϕ is an order isomorphism.

12

Page 19: Formal Concept Analysis - VUB

1. Preliminaries

1.2.15 Corollary. Let ψ : L → K be a map between two lattices L and K. The map ψis a lattice isomorphism if and only if it is an order isomorphism.

Proof. In order to show that a lattice isomorphism ψ is an order isomorphism, wecan simply copy the second part of the foregoing proof. The reverse implication is animmediate consequence of the previous theorem.

The following de�nitions and results are needed to formulate and prove the basic theoremfor concept lattices (see section 2.2).

1.2.16 De�nitions. Let V be a complete lattice.

• For an element v of V we de�ne

v∗ :=∨{x ∈ V | x < v}

andv∗ :=

∧{x ∈ V | v < x}.

We call v∨-irreducible if v 6= v∗, i.e. if v cannot be represented as the supremum

of strictly smaller elements. Dually, we call v∧-irreducible if v 6= v∗. As

expected, we call v∨-reducible if v = v∗ and

∧-reducible if v = v∗.

• The set of all∨-irreducible elements of V is denoted by J (V ) and the set of all∧

-irreducible elements of V is denoted by M(V ).

• A subset X of V is called join-dense in V if every element of V can be representedas the supremum of a subset of X. Formally, X ⊆ V is join-dense in V if

∀v ∈ V, ∃T ⊆ X : v =∨

T.

Meet-dense subsets are de�ned dually.

Clearly, a join-dense subset of a complete lattice must contains all∨-irreducible ele-

ments. Analogously, a meet-dense subset must contain all∧-irreducible elements.

1.2.17 Examples.

• In a powerset lattice, the∨-irreducible elements are exactly the singletons.

• Every element x of R is both∨- and

∧-reducible:

x = sup ]−∞, x[ and x = inf ]x,+∞[ .

• In a �nite chain C, every element except∧C, is

∨-irreducible. In fact,

∧C =

∨∅.

1.2.18 Proposition. Let V be a complete lattice and let v ∈ V . Then, v is∨-reducible

if and only if there exists a subset X of V such that v /∈ X and

v =∨

X.

Dually, v is∧-reducible if and only if there exists a set X ⊆ V such that v /∈ X and

v =∧

X.

13

Page 20: Formal Concept Analysis - VUB

1. Preliminaries

Proof. Let X ⊆ V with v /∈ X and v =∨X. Then clearly, v > x for all x ∈ X and

therefore,

v =∨{x ∈ V | x ∈ X} ≤

∨{x ∈ V | x < v} ≤ v.

This implies that v =∨{x ∈ V | x < v} = v∗ i.e. that v is

∨-reducible. The reverse

implication follows immediately from the de�nition of∨-reducible elements.

1.2.19 Proposition. Let X be a subset of a complete lattice V and let v ∈ V . If X isjoin-dense in V , then

v =∨{x ∈ X | x ≤ v}.

Dually, if X is meet-dense in V , then

v =∧{x ∈ X | v ≤ x}.

Proof. Let v ∈ V and assume that X is join-dense in V . Hence, there exists a subsetT of X such that v =

∨T . First, note that v ≥ t for all t ∈ T . Therefore,

v =∨

T =∨{t ∈ T | t ≤ v}.

Using lemma 1.2.8, we �nd∨{x ∈ X | x ≤ v} =

(∨{x ∈ X\T | x ≤ v}

)∨(∨{t ∈ T | t ≤ v}

)=

(∨{x ∈ X\T | x ≤ v}

)∨ v.

Obviously, v ≥ x for all x in {x ∈ X\T | x ≤ v} and therefore

v ≥∨{x ∈ X\T | x ≤ v}.

The connecting lemma now yields∨{x ∈ X | x ≤ v} =

(∨{x ∈ X\T | x ≤ v}

)∨ v = v.

1.2.20 Remark. Let X be a join-dense subset of a complete lattice V . Each elementv of V can be represented as the supremum of a subset T of X, v =

∨T . Also,

according to the previous proposition, v =∨{x ∈ X | x ≤ v}. However, the sets T and

{x ∈ X | x ≤ v} are not necessarily equal. Consider for example the lattice representedby the Hasse diagram in �gure 1.7. It is easily seen that the set {x, y, z, o} is join-densein this lattice. Clearly, v =

∨{x, y, z, o}, but v can also be written as the join of a strict

subset of {x, y, z, o}, for example, v = x∨ y. An analogous remark can be made for themeet-dense subsets of V .

The following proposition provides us with a simple way of recognizing the irreducibleelements in the Hasse diagrams of �nite lattices.

1.2.21 Proposition. An element of a �nite lattice L is∨-irreducible if and only if it

covers exactly one element and∧-irreducible if and only if it is covered by exactly one

element.

14

Page 21: Formal Concept Analysis - VUB

1. Preliminaries

Figure 1.7: Hasse diagram of a lattice in which the element v is∨-reducible and the

set {x, y, z, o} is join-dense.

Proof. We �rst prove the following equivalence: l is a∨-irreducible element of L ⇔

l∗ ≺ l. By de�nition, l is∨-irreducible if and only if l 6= l∗. The latter is equivalent with

l∗ < l since l∗ ≤ l. Moreover, l∗ < l ⇔ l∗ ≺ l. Indeed, by de�nition of l∗, there cannotexist an element k ∈ L such that l∗ < k < l.

Next, let l be a∨-irreducible element of L and assume that m ≺ l with m 6= l∗. Then

m < l and hence m < l∗. This yields m < l∗ < l, which is in contradiction with m ≺ l.Consequently, l∗ is the only element covered by l.

Conversely, assume that m is the unique element covered by l. Then, m is an upperbound of {x ∈ L | x < l}. Hence, m ≥ l∗. Since m < l this implies that l∗ < l. Thus, lis∨-irreducible.

1.2.22 Example. Consider the Hasse diagram in �gure 1.8. The circles with shaded tophalves represent the

∧-irreducible elements of the lattice, while the circles with shaded

bottom halves represent the∨-irreducible elements.

Figure 1.8: Hasse diagram of a complete lattice with six∨-irreducible elements and

six∧-irreducible elements.

1.2.23 Proposition. In a �nite lattice L, the set J (L) is join-dense andM(L) is meet-dense.

15

Page 22: Formal Concept Analysis - VUB

1. Preliminaries

Proof. An element x of L is either∨-irreducible (in which case x ∈ J (L)), or

∨-reducible.

In the latter case, x is the supremum of strictly smaller elements. Again, every strictlysmaller element is either

∨-irreducible, or the supremum of strictly smaller elements.

Because of the �niteness of L, this process must end, and by lemma 1.2.8, x can thusbe represented as the supremum of

∨-irreducible elements.

1.3 Closure Systems

1.3.1 De�nition. A closure system1 C on a set G is a set of subsets of G whichcontains G and is closed under intersections. Formally, C ⊆ P(G) is a closure systemon G if G ∈ C and if

D ⊆ C ⇒⋂D ∈ C.

1.3.2 Remark. For the case D = ∅, the intersection⋂∅ contains all elements. This

needs to be de�ned unambiguously. If we work with the subsets of a certain set G, theintersection of the empty set will be de�ned with respect to this set:⋂

∅ := G.

1.3.3 Examples.

• Evidently, the powerset of a set G is a closure system on G.

• For many mathematical structures, the system of substructures is a closure sys-tem. For example, the system of all subspaces of a vector space V , the set of allsubgroups of a group G, the set of all closed sets of a topological space (X, T ),etc. are closure systems.

• In graph theory, the subtrees of a tree form a closure system. Recall that any twovertices in a tree are connected by a unique simple path. A set of vertices inducesa subtree if and only if it contains for any two of its vertices also all vertices on thepath between these two. Now consider a selection of subtrees S of a tree (V,E)and let W be the set of vertices common to all subtrees in S. If W is empty, itgenerates the empty graph which is de�nitely a subtree of (V,E). Otherwise, letv, w be two vertices in W . The path between v and w belongs to every subtree of(V,E) containing v and w, hence to every tree in S. Therefore, W is the vertexset of a subtree of (V,E).

• The set O(P ) of downsets of an ordered set P is a closure system on P . It istrivially seen that P itself is a downset. Let {Di | i ∈ I} be a non-empty set ofdownsets of P . If

⋂i∈I Di is empty, it is de�nitely a downset. If

⋂i∈I Di is not

empty, take x ∈⋂i∈I Di. Whenever y ∈ P with y ≤ x, we have y ∈ Di for all

i ∈ I, thus proving that the intersection of downsets is a downset. Dually, the setof all upsets of P is a closure system on P .

1[4] uses the term `topped ∩-structure'.

16

Page 23: Formal Concept Analysis - VUB

1. Preliminaries

1.3.4 De�nition. A closure operator ϕ on G is a map ϕ : P(G)→ P(G) assigning aclosure ϕ(X) ⊆ G to each subset X ⊆ G under the following conditions:

monotony: X ⊆ Y ⇒ ϕ(X) ⊆ ϕ(Y ),

extensity: X ⊆ ϕ(X),

idempotency: ϕ(ϕ(X)) = ϕ(X).

A subsetX of G is closed under a closure operator ϕ when it is equal to its closure ϕ(X).

Closure systems and closure operators are closely related, as shown by the followingtheorem:

1.3.5 Theorem. If C is a closure system on G then

ϕC(X) :=⋂{A ∈ C | X ⊆ A}

de�nes a closure operator on G. Conversely, the set

Cϕ := {ϕ(X) | X ⊆ G}

of all closed sets under a closure operator ϕ is always a closure system. Moreover,

ϕCϕ = ϕ and CϕC = C.

Proof.

• Let C be a closure system on a set G. We show that the operator ϕC satis�es theconditions of a closure operator. For X ⊆ Y it follows that

{A ∈ C | X ⊆ A} ⊇ {A ∈ C | Y ⊆ A}.

Since set intersection is an order-reversing map (with respect to the inclusionorder) from P(C) to C, this implies

ϕC(X) =⋂{A ∈ C | X ⊆ A} ⊆

⋂{A ∈ C | Y ⊆ A} = ϕC(Y ),

showing monotony. Extensity is trivial. Let X be a subset of G. By monotony ofϕC we have ϕC(X) ⊆ ϕC(A) = A for every A ∈ C containing X. Thus,

{A ∈ C | X ⊆ A} ⊆ {A ∈ C | ϕC(X) ⊆ A}.

The reverse inclusion follows immediately from the extensity of ϕC. Hence,

ϕC(X) =⋂{A ∈ C | X ⊆ A} =

⋂{A ∈ C | ϕC(X) ⊆ A} = ϕC(ϕC(X))

which shows idempotency.

17

Page 24: Formal Concept Analysis - VUB

1. Preliminaries

• Let ϕ be a closure operator on G. Clearly, ϕ(G) ⊆ G and also G ⊆ ϕ(G) byextensity of ϕ. Therefore, G = ϕ(G) and consequently, G ∈ Cϕ. Let D be anon-empty subset of Cϕ. Note that every set D ∈ D can be written as ϕ(Y ) fora certain subset Y of G. Relying on the monotony and idempotency of ϕ it thenfollows that

ϕ(⋂D)⊆ ϕ(D) = ϕ(ϕ(Y )) = ϕ(Y ) = D

for all D ∈ D. Hence, ϕ(⋂D)⊆⋂D. Moreover,

⋂D ⊆ ϕ

(⋂D)because of

extensity and therefore,⋂D ∈ Cϕ.

• If X ∈ C thenX =

⋂{A ∈ C | X ⊆ A} = ϕC(X).

Consequently, X ∈ CϕC . Conversely, every X ∈ CϕC can be written as ϕC(Y ) forsome Y ⊆ G. But, ϕC(Y ) equals

⋂{A ∈ C | Y ⊆ A} and thus belongs to C since

C is closed under intersections.

• In order to show that ϕCϕ = ϕ we �rst prove the following claim:

∀A ∈ Cϕ : X ⊆ A ⇐⇒ ϕ(X) ⊆ A.

One implication immediately follows from the extensity of ϕ. The other implica-tion again uses the fact that every A ∈ Cϕ can be written as ϕ(Y ) for some subsetY of G. In this case, X ⊆ A implies

ϕ(X) ⊆ ϕ(A) = ϕ(ϕ(Y )) = ϕ(Y ) = A.

Using this claim, we may now conclude for all X ⊆ G that

ϕCϕ(X) =⋂{A ∈ Cϕ | X ⊆ A} =

⋂{A ∈ Cϕ | ϕ(X) ⊆ A} = ϕ(X)

since ϕ(X) ∈ Cϕ.

Since every closure system C can be understood as the set of all closed sets of a closureoperator, the elements of C are called closed sets as well.

1.3.6 Proposition. If C is a closure system on G, then (C,⊆) is a complete lattice with∧D =

⋂D and

∨D = ϕC

(⋃D)for all D ⊆ C. Conversely, every complete lattice is

isomorphic to the lattice of a closure system.

Proof. It is obvious that⋂D is the in�mum of D if D is not empty. Otherwise,⋂

D =⋂∅ = G which clearly is the in�mum of the empty set of subsets of G. Recall

from proposition 1.2.10 that the supremum of a set now arises as the in�mum of allupper bounds of this set. Thus,∨

D =∧{A ∈ C | A upper bound of D}

=∧{

A ∈ C∣∣∣ ⋃D ⊆ A

}=

⋂{A ∈ C

∣∣∣ ⋃D ⊆ A}

= ϕC

(⋃D).

18

Page 25: Formal Concept Analysis - VUB

1. Preliminaries

Note that the argumentation for the supremum also holds for D = ∅.

If L is a complete lattice, then the system {↓x | x ∈ L} is closed under intersectionssince ⋂

y∈H

↓y =y(∧H

)for all H ⊆ L. Also, L =

y(∨L) hence {↓x | x ∈ L} is a closure system. The map

x 7→ ↓x then constitutes an order isomorphism between (L,≤) and({↓x | x ∈ L},⊆

)by lemma 1.1.16.

1.3.7 Examples. For every example in 1.3.3 we give the corresponding closure operator.

• Let G be a set. The closure operator on G which corresponds with the closuresystem P(G) is the identity map on P(G).

• Let SubV be the closure system of subspaces of a vector space V and SubG theclosure system of subgroups of a group G. The associated closure operators mapa subset X to the subspace, respectively subgroup, generated by X.

• Let (X, T ) be a topological space and let C be the associated closure system ofclosed sets. The corresponding closure operator maps a set A ⊆ X to the usualtopological closure of A.

• Let (V,E) be a tree with vertex set V . The closure operator ϕ corresponding withthe closure system of subtrees maps each subset X of V to the vertex set of thesmallest subtree containing X.

• Let O(P ) be the closure system of downsets of an ordered set P . The associatedclosure operator maps a subset X of P to the smallest downset containing X,i.e. ↓X.

These examples illustrate why closure operators are so frequently met: their axiomsdescribe the natural properties of a generating process.

1.4 Galois Connections

1.4.1 De�nition. Let ϕ : P → Q and ψ : Q → P be maps between two ordered sets(P,≤) and (Q,≤). The pair of maps (ϕ, ψ) is called a Galois connection between Pand Q if the following conditions hold for all p, p1, p2 ∈ P and q, q1, q2 ∈ Q:

(i) p1 ≤ p2 ⇒ ϕ(p1) ≥ ϕ(p2)

(ii) q1 ≤ q2 ⇒ ψ(q1) ≥ ψ(q2)

(iii) p ≤ ψ(ϕ(p)) and q ≤ ϕ(ψ(q))

The two maps are called dually adjoint to each other.

See �gure 1.9 for an example.

19

Page 26: Formal Concept Analysis - VUB

1. Preliminaries

Figure 1.9: An example of a Galois connection

1.4.2 Proposition. A pair (ϕ, ψ) of maps is a Galois connection if and only if

p ≤ ψ(q) ⇐⇒ q ≤ ϕ(p)

for all p ∈ P and q ∈ Q.

Proof. Let (ϕ, ψ) be a Galois connection. Assume that p ≤ ψ(q). Condition (i) yieldsϕ(p) ≥ ϕ(ψ(q)), which gives ϕ(p) ≥ q by (iii). The other implication follows similarly.

Suppose the equivalence p ≤ ψ(q) ⇔ q ≤ ϕ(p) holds for all p ∈ P and q ∈ Q. Forϕ(p) ≤ ϕ(p) it yields p ≤ ψ(ϕ(p)). The same argument can be applied to ψ(q) ≤ ψ(q),hence (iii). From p1 ≤ p2 we may now deduce that p1 ≤ ψ(ϕ(p2)). The equivalence thenyields ϕ(p2) ≤ ϕ(p1), proving (i). An analogous argument shows (ii).

1.4.3 Proposition. Let (ϕ, ψ) be a Galois connection. Then

ϕ = ϕ ◦ ψ ◦ ϕ and ψ = ψ ◦ ϕ ◦ ψ.

Proof. We will show that ϕ(p) = ϕ(ψ(ϕ(p))) for all p in the domain of ϕ. We obtainϕ(p) ≤ ϕ(ψ(ϕ(p))) by condition (iii). On the other hand, we have p ≤ ψ(ϕ(p)) whichimplies ϕ(p) ≥ ϕ(ψ(ϕ(p))) by (i). A similar proof shows the second statement.

1.4.4 Proposition. A mapϕ : (V,≤)→ (W,≤)

between complete lattices has a dual adjoint if and only if

ϕ

(∨i∈I

xi

)=∧i∈I

ϕ(xi)

holds for all families (xi)i∈I in V .

20

Page 27: Formal Concept Analysis - VUB

1. Preliminaries

Proof. If ψ is dually adjoint to ϕ, then by proposition 1.4.2

y ≤∧i∈I

ϕ(xi) ⇐⇒ y ≤ ϕ(xi) for all i ∈ I

⇐⇒ xi ≤ ψ(y) for all i ∈ I⇐⇒

∨i∈I

xi ≤ ψ(y)

⇐⇒ y ≤ ϕ

(∨i∈I

xi

),

ensuring that∧i∈I ϕ(xi) = ϕ

(∨i∈I xi

).

If, conversely, ϕ(∨

i∈I xi)

=∧i∈I ϕ(xi) holds for all families (xi)i∈I in V , then

x1 ≤ x2 ⇐⇒ x2 = x1 ∨ x2

=⇒ ϕ(x2) = ϕ(x1 ∨ x2) = ϕ(x1) ∧ ϕ(x2)

⇐⇒ ϕ(x1) ≥ ϕ(x2)

which shows (i) from de�nition 1.4.1. We obtain condition (ii) by de�ning ψ : W → Vby

ψ(y) :=∨{x ∈ V | y ≤ ϕ(x)}.

For z ∈ V , condition (i) yields

ψ(ϕ(z)) =∨{x ∈ V | ϕ(z) ≤ ϕ(x)} ≥

∨{x ∈ V | z ≥ x} = z.

Also, for y ∈ W we have

ϕ(ψ(y)) = ϕ(∨{x ∈ V | y ≤ ϕ(x)}

)=∧{ϕ(x) | y ≤ ϕ(x)} ≥ y,

proving condition (iii). Hence (ϕ, ψ) is a Galois connection.

We are particularly interested in the special case of a Galois connection between twopowerset lattices. The link with closure operators is emphasized by the following propo-sition.

1.4.5 Proposition. Let M and N be two sets and consider a Galois connection (ϕ, ψ)between (P(M),⊆) and (P(N),⊆). The map ψ ◦ ϕ is a closure operator on M andthe map ϕ ◦ ψ is a closure operator on N . In addition, the maps ϕ and ψ de�ne dualisomorphisms between the corresponding closure systems.

Proof. Extensity follows immediately from condition (iii) of de�nition 1.4.1. Monotonyfollows from the combination of conditions (i) and (ii). Proposition 1.4.3 yields idem-potency:

(ψ ◦ ϕ) ◦ (ψ ◦ ϕ) = (ψ ◦ ϕ ◦ ψ) ◦ ϕ = ψ ◦ ϕ

21

Page 28: Formal Concept Analysis - VUB

1. Preliminaries

and analogously (ϕ ◦ ψ) ◦ (ϕ ◦ ψ) = ϕ ◦ (ψ ◦ ϕ ◦ ψ) = ϕ ◦ ψ. Hence, ψ ◦ ϕ and ϕ ◦ ψare closure operators on M and N respectively. Proposition 1.4.3 also shows that theclosure system Cψ◦ϕ on M consists of the sets ψ(B) with B ⊆ N . Indeed we have

Cψ◦ϕ = {ψ(ϕ(A)) | A ⊆M}⊇ {ψ(ϕ(ψ(B))) | B ⊆ N}= {ψ(B) | B ⊆ N}.

The reverse inclusion trivially holds. It can be shown with the same argumentation that

Cϕ◦ψ = {ϕ(A) | A ⊆M}.

Hence, the maps

ϕ : Cψ◦ϕ → Cϕ◦ψ : ψ(ϕ(A)) 7→ ϕ(ψ(ϕ(A))) = ϕ(A)

andψ : Cϕ◦ψ → Cψ◦ϕ : ϕ(ψ(B)) 7→ ψ(ϕ(ψ(B))) = ψ(B)

are well-de�ned. Moreover, they are inverses of each other as seen by proposition 1.4.3and they are order-reversing by conditions (i) and (ii) of de�nition 1.4.1.

22

Page 29: Formal Concept Analysis - VUB

Chapter 2

Concept Lattices

The foundations of the Formal Concept Analysis framework are layed out in the �rsttwo sections of this chapter. In the �rst section, we formalize the notions `context'and `concept' and give a mathematical voice to the inherent hierarchy of concepts. Aswe know, ordered sets provide a natural setting for analyzing hierarchies. In fact, theconcepts of a context will have the structure of a complete lattice. This result is part ofthe basic theorem of FCA, which we discuss in the second section. The third and �nalsection of this chapter introduces di�erent ways to simplify a context without changingthe structure of the concept lattice.

2.1 Contexts and their Concepts

In natural language, we understand a concept to be an abstract idea, a building block ofhuman thought. It can be described by the objects belonging to it or by its determiningfeatures. Consider for example the information in �gure 2.1, regarding the food in myrefrigerator. In this context, the concept `citrus fruit' embodies the objects `lemon' and

leathery peel sweet sour juicy contains seeds made from milk sandwich �llingbanana × × ×

goat cheese × ×ice cream × ×kiwifruit × × ×

lemon × × × ×orange × × × ×

strawberry × × ×yoghurt ×

Figure 2.1: Example of a context.

`orange', sharing the properties `leathery peal', `juicy' and `contains seeds'. The moregeneral concept `fruit' consists of the objects `banana', `kiwifruit', `lemon', `orange' and`strawberry', having only the property `contains seeds' in common. We now wish toabstract this example, introducing the mathematical notions of context and concept.

23

Page 30: Formal Concept Analysis - VUB

2. Concept Lattices

2.1.1 De�nitions. A context is a triple (G,M, I) where G and M are sets and I is arelation betweenG andM . The elements ofG andM are called objects and attributesrespectively.1 The relation I is referred to as the incidence relation of the context. Asusual, instead of writing (g,m) ∈ I we write gIm in order to express that an object g isin relation I with an attribute m. We say that the object g has the attribute m. Toindicate that (g,m) /∈ I we write g��Im.

A small �nite context can easily be represented by means of a cross table, i.e. arectangular table enlisting all the objects of the context as row headers and the attributesas column headers. A cross in row g and column m indicates that object g has attributem.

m...

g · · · ×

Note that our basic framework consists of merely three basic ingredients: two sets and abinary relation between them. This should give the reader a �rst hint to the enormousvariety of applications of the Formal Concept Analysis formalism.

2.1.2 Example. The compulsory courses of the Bachelor of Mathematics curriculum2

and their sequentiality provide us with a less obvious example of a context: the coursesconsitute both the object and attribute sets with `is recommended prior knowledge for'being the incidence relation between them. We obtain the cross table in �gure 2.1 wherea cross in row g and column m indicates that course g is recommended prior knowledgefor course m. Note that this incidence relation is a strict order relation.

2.1.3 De�nitions. Consider a context (G,M, I) . For a set of objects A ⊆ G we de�ne

A′ = {m ∈M | gIm for all g ∈ A},

the set of attributes common to all the objects in A. For a set of attributes B ⊆M wede�ne

B′ = {g ∈ G | gIm for all m ∈ B},so B′ is the set of objects possessing all of the attributes in B. The maps A 7→ A′ andB 7→ B′ are called the derivation operators.3 A concept of the context (G,M, I) isa pair (A,B) where A ⊆ G,B ⊆ M and it holds that A′ = B and B′ = A. We callA the extent and B the intent of the concept. The set of all concepts of the context(G,M, I) is denoted as B(G, M, I).4 We write Bext(G, M, I) for the set of all extentsof the context and Bint(G, M, I) for the set of all intents of the context.

A set of objects A ⊆ G is the extent of some concept if and only if A′′ = A in whichcase (A,A′) is the unique concept of which A is the extent. Correspondingly, a set of

1The letters G and M come from the German terms Gegenstände and Merkmale respectively.2According to the curriculum at Vrije Universiteit Brussel (2012-2013).3Other references also use the term `polars'.4The choice of letter stems from the German word Begri�.

24

Page 31: Formal Concept Analysis - VUB

2. Concept Lattices

A�neandProjectiveGeometry

AlgebraI

AlgebraII

AlgebraicGeometry

AnalysisandanIntroductiontoMathematicalSoftware10333a

AnalysisandanIntroductiontoMathematicalSoftware10333b

AnalysisII

ComplexAnalysis

Di�erentialGeometry

DiscreteMathematics

FunctionalAnalysis

GaloisTheory

IntroductionStatistics

LinearAlgebra

MathematicalStatistics

MeasureTheory

NumericalMathematics

NumericalSolutionsofODE's

OrdinaryDi�erentialEquations(ODE's)

ProbabilityTheory

RealNumbersandSetTheory

SeminaronCurrentScienceandSociety

SupplementstoLinearAlgebra

TopologyI

A�neandProjectiveGeometry

Algebra

I××

×Algebra

II×

×AlgebraicGeometry

AnalysisandanIntroductionto

Mathem

aticalSoftware

10333a

××××

××

×××××××

×AnalysisandanIntroductionto

Mathem

aticalSoftware

10333b

×××

××

××

×××

×AnalysisII

××

×××

×××

×ComplexAnalysis

Di�erentialGeometry

DiscreteMathem

atics

×××

×FunctionalAnalysis

GaloisTheory

IntroductionStatistics

×LinearAlgebra

××××

××××

×××

××××××

××

Mathem

aticalStatistics

Measure

Theory

NumericalMathem

atics

×NumericalSolutionsofODE's

Ordinary

Di�erentialEquations(O

DE's)

×ProbabilityTheory

××

RealNumbersandSet

Theory

××

××

××

×××

×Sem

inaronCurrentScience

andSociety

Supplements

toLinearAlgebra

×××

××

TopologyI

Figure

2.2:

Sequentialityof

thecompulsorycourses

oftheBachelor

ofMathem

aticscurriculum

(2012-2013))

atVrije

UniversiteitBrussel.`Bachelor

Pap

erSciences'not

included.

25

Page 32: Formal Concept Analysis - VUB

2. Concept Lattices

attributes B ⊆ M is the intent of some concept if and only if B′′ = B. In this case,(B′, B) is the unique concept of which B is the intent. Explicitly, we have

Bext(G,M, I) = {A ⊆ G | A′′ = A}

andBint(G,M, I) = {B ⊆M | B′′ = B}.

Note that there is no order on G or M in the de�nition of B(G,M, I). Consequently,permuting rows or columns of the cross table does not change the context it represents.When searching formal concepts we intuitively look for maximal `rectangles' in thecross table, i.e. rectangles full of crosses after an appropriate rearrangement of rows andcolumns.

2.1.4 Example. Consider the context given by the cross table in �gure 2.1. A simpleprocedure for �nding a concept consists of the following steps: choose an object, say`Algebra II', and �nd the set B of all attributes which it posesses. In this case, Bcontains all the courses for which Algebra II is considered prior knowledge. Then,

B = {Algebraic Geometry, Galois Theory}.

Next, let A be the set of all objects having all the attributes in B, or in this case, theset of all courses that are recommended as prior knowledge for all the courses in B. Weobtain

A = {Algebra I, Algebra II, Linear Algebra, Supplements to Linear Algebra}.

It can easily be veri�ed that (A,B) is a concept. Obviously, this procedure can begeneralized to start with sets of objects or sets of attributes instead of one single object.

2.1.5 The ordering of concepts. Assume that (A1, B1) and (A2, B2) are concepts of acontext. We write (A1, B1) ≤ (A2, B2) if A1 ⊆ A2. (A1, B1) is then called a subconceptof (A2, B2) while (A2, B2) is called a superconcept of (A1, B1). It is easily seen thatA1 ⊆ A2 implies A′1 ⊇ A′2. Indeed, if m ∈ A′2 then gIm for all g ∈ A2, hence for allg ∈ A1. Consequently, m ∈ A′1. The reverse implication is valid too since A′′1 = A1 andA′′2 = A2. We therefore �nd:

(A1, B1) ≤ (A2, B2) ⇐⇒ A1 ⊆ A2 ⇐⇒ B1 ⊇ B2.

The relation ≤ de�nes a partial order on B(G,M, I). We shall refer to it as the conceptorder. Furthermore, we will prove in theorem 2.2.1 that (B(G,M, I),≤) is a completelattice. It is known as the concept lattice of the context (G,M, I).

2.1.6 Examples.

• In the introductory example at the beginning of this chapter, the concept `citrusfruit' is a subconcept of the concept `fruit' for the context in �gure 2.1.

26

Page 33: Formal Concept Analysis - VUB

2. Concept Lattices

• It is easily seen that({Algebra I, Linear Algebra, Supplements to Linear Algebra},

{Algebra II, Algebraic Geometry, Galois Theory})

is a subconcept of the concept (A,B) from example 2.1.4.

Each concept (A,B) is uniquely determined by either its extent or its intent. Also, theconcept order ≤ corresponds to the inclusion order on the extents or equivalently to thereverse inclusion order on the intents. Therefore,

ext : (A,B) 7→ A

constitutes an order isomorphism between B(G,M, I) and Bext(G,M, I) while

int : (A,B) 7→ B

gives one between B(G,M, I) and B∂int(G,M, I). Moreover, an order isomorphism be-

tween Bext(G,M, I) and B∂int(G,M, I) is set up by the derivation operators, resulting in

the following commutative diagram:

Bext(G,M, I) B∂int(G,M, I)

B(G,M, I)

ext int

The next lemma formulates some basic properties of the derivation operators.

2.1.7 Lemma. Consider a context (G,M, I) where A,A1 and A2 are sets of objects andB,B1 and B2 are sets of attributes. Then,

1a. A1 ⊆ A2 ⇒ A′1 ⊇ A′2 1b. B1 ⊆ B2 ⇒ B′1 ⊇ B′22a. A ⊆ A′′ 2b. B ⊆ B′′

3a. A′ = A′′′ 3b. B′ = B′′′

4. A ⊆ B′ ⇐⇒ A′ ⊇ B ⇐⇒ A×B ⊆ I.

Proof. We show the assertions in the �rst column. The other assertions are obtainedanalogously.

1a. Let A1 ⊆ A2. If m ∈ A′2, then gIm for all g ∈ A2 and, in particular, for all g ∈ A1.Consequently, m ∈ A′1.

2a. If g ∈ A, then gIm for all m ∈ A′ which implies g ∈ A′′.

3a. From 2a we have A ⊆ A′′. Together with 1a this yields A′ ⊇ A′′′. The reverseinclusion follows immediately from 2a.

27

Page 34: Formal Concept Analysis - VUB

2. Concept Lattices

4. This immediately follows from the de�nition of the derivation operators.

This lemma shows that the derivation operators establish a Galois connection between(P(G),⊆) and (P(M),⊆). The following proposition is now an immediate consequenceof proposition 1.4.4.

2.1.8 Proposition. For all j in an index set J , let Aj be a set of objects. Then(⋃j∈J

Aj

)′=⋂j∈J

A′j.

The same statement holds for sets of attributes.

We conclude this section with an important corollary. Several algorithms to deter-mine the set of all concepts of some context are based on this corollary, including theNextClosure algorithm in 3.1.8.

2.1.9 Corollary. The set of all extents of a context is a closure system. The set of allintents of a context is also a closure system.

Proof. We shall formulate the proof for the �rst statement.5 Let (Aj)j∈J be a non-emptyfamily of extents. Then A′′j = Aj for each j ∈ J . Based on the previous proposition andon the third part of lemma 2.1.7, we �nd(⋂

j∈J

Aj

)′′=

(⋂j∈J

A′′j

)′′=

(⋃j∈J

A′j

)′′′=

(⋃j∈J

A′j

)′=⋂j∈J

A′′j =⋂j∈J

Aj.

This shows that the intersection of any non-empty family of extents is again an extent.Also, G ⊆ G′′ by the second part of lemma 2.1.7 and thus G = G′′ which �nishes theproof.

Attentive readers may have noticed that this corollary also follows immediately fromproposition 1.4.5, which states that

X 7→ X ′′

de�nes a closure operator on G and M respectively. It is then easily seen by themonotony of closure operators that A′′ is the smallest extent containing a set of ob-jects A. Also, B′′ is the smallest intent containing a set of attributes B.

2.1.10 Remark. The union of extents (or intents) generally does not result in an extent(or intent). We illustrate this claim with an example. Consider the context given bythe cross table in �gure 2.1. The reader can easily verify that

A1 = {Analysis and an Introduction to Mathematical Software 10333a, Linear Algebra}

5Simply replacing every instance of the word `extent' by `intent' provides proof for the secondstatement.

28

Page 35: Formal Concept Analysis - VUB

2. Concept Lattices

andA2 = {Linear Algebra, Supplements to Linear Algebra}

are extents of this context. The union of A1 and A2 is not an extent of this contextsince

(A1 ∪ A2)′′ = {Analysis and an Introduction to Mathematical Software 10333a,

Linear Algebra, Supplements to Linear Algebra}′

= {Analysis and an Introduction to Mathematical Software 10333a,

Analysis and an Introduction to Mathematical Software 10333b,

Linear Algebra, Supplements to Linear Algebra}

showing that (A1 ∪ A2)′′ di�ers from A1 ∪ A2. With the same argument, we can

demonstrate that the union of the intents {Algebraic Geometry, Galois Theory} and{Di�erential Geometry} is not an intent.

2.2 Concept Lattices: the Basic Theorem

The basic theorem embodies a few fundamental results on concept lattices, to be pre-sented in this section. As promised, we start by proving that concept lattices are com-plete lattices.

2.2.1 Theorem. Let (G,M, I) be a context. Then (B(G,M, I),≤) is a complete latticein which join and meet are given by 6

∨j∈J

(Aj, Bj) =

((⋃j∈J

Aj

)′′,⋂j∈J

Bj

)

and ∧j∈J

(Aj, Bj) =

(⋂j∈J

Aj,(⋃j∈J

Bj

)′′)respectively.

Proof. We will explain the formula for the in�mum. The formula for the supremumcan be explained correspondingly. First, note that Aj = B′j for each j ∈ J . Usingproposition 2.1.8 we may then transform(⋂

j∈J

Aj,(⋃j∈J

Bj

)′′)6 Since Bext(G, M, I) and B∂

int(G, M, I) are closure systems which, as lattices, are isomorphic toB(G, M, I) and since order isomorphisms are complete by theorem 1.2.14, this result also follows fromproposition 1.3.6.

29

Page 36: Formal Concept Analysis - VUB

2. Concept Lattices

into ((⋃j∈J

Bj

)′,(⋃j∈J

Bj

)′′)which is clearly a concept. Since

⋂j∈J Aj ⊆ Ai for all i ∈ J ,(⋂j∈J

Aj,(⋃j∈J

Bj

)′′)

is a lower bound of {(Aj, Bj) | j ∈ J}. Also, if some concept x is a lower bound of{(Aj, Bj) | j ∈ J}, the extent of x must be contained in every Aj and thus in

⋂j∈J Aj,

�nishing the proof.

Next, we introduce mappings relating a context to its concept lattice. These maps arethe essential ingredient of the last part of the basic theorem.

2.2.2 Relating a context to its concept lattice. Let (G,M, I) be a context withassociated concept lattice B(G,M, I). We can relate G to B(G,M, I) through a mapγ : G→ B(G,M, I) de�ned by

γ(g) := ({g}′′, {g}′).

Note that this map is well-de�ned by the third part of lemma 2.1.7. Hence, γ associateseach object g with an object concept γ(g). Analogously, the map µ : M → B(G,M, I)de�ned by

µ(m) := ({m}′, {m}′′)

relates M to B(G,M, I) by associating each attribute set m with an attribute con-cept µ(m). From here on we shall omit the brackets and write g′ instead of {g}′ andm′ instead of {m}′. The incidence relation I can be translated in terms of the conceptorder: an object g has an attribute m if and only if the object concept (g′′, g′) is a sub-concept of the attribute concept (m′,m′′). The proof of this equivalence is incorporatedin the following theorem.

2.2.3 Theorem. Let (G,M, I) be a context with associated (complete) concept latticeB(G,M, I) and let γ and µ be the maps de�ned in 2.2.2. Then, γ(G) is join-densein B(G,M, I) and µ(M) is meet-dense in B(G,M, I). Also, gIm is equivalent toγ(g) ≤ µ(m) for all g ∈ G and all m ∈M .

Proof. Let (A,B) ∈ B(G,M, I). According to proposition 2.1.8 we have

B = A′ =( ⋃g∈A

{g})′

=⋂g∈A

g′

and

A = B′ =( ⋂g∈A

g′)′

=( ⋂g∈A

g′′′)′

=( ⋃g∈A

g′′)′′.

30

Page 37: Formal Concept Analysis - VUB

2. Concept Lattices

Recalling the formula for the join of concepts from theorem 2.2.1, we now �nd

(A,B) =

(( ⋃g∈A

g′′)′′,⋂g∈A

g′

)=∨g∈A

(g′′, g′) =∨g∈A

γ(g) =∨

γ(A).

Consequently, γ(G) is join-dense in B(G,M, I). Similarly we �nd

(A,B) =∧

µ(B)

which proves that µ(M) is meet-dense in B(G,M, I). Next, consider an object g in Gand an attribute m in M . Then, using part one of lemma 2.1.7, we �nd

gIm =⇒ m ∈ g′

=⇒ g′′ ⊆ m′

=⇒ γ(g) ≤ µ(m).

Conversely,

γ(g) ≤ µ(m) =⇒ g′′ ⊆ m′

=⇒ m′′ ⊆ g′′′

=⇒ m ∈ g′

=⇒ gIm.

Again, the second implication is provided by the �rst part of lemma 2.1.7. The thirdimplication uses both the second and the third part of this lemma.

Every concept (A,B) thus arises as the join of all its sub-object-concepts, and as themeet of its super-attribute-concepts. In symbols,

(A,B) =∨g∈A

γ(g) =∧m∈B

µ(m).

As we know, every concept lattice is complete. We now conclude this section by showingthat every complete lattice is in turn isomorphic to some concept lattice.

2.2.4 Theorem. Let L be a complete lattice and let G and M be sets. Assume that thereexist mappings γ : G→ L and µ : M → L such that γ(G) is join-dense in L and µ(M)is meet-dense in L. If we de�ne I ⊆ G×M by gIm⇔ γ(g) ≤ µ(m), for all g ∈ G andm ∈M , then L is isomorphic to B(G,M, I). In particular, L ∼= B(L,L,≤).

Proof. We will set up a complete isomorphism between L and B(G,M, I) by de�ninga pair of mutually inverse order-preserving maps.7 First, we de�ne ϕ : B(G,M, I)→ Lby

ϕ((A,B)) :=∨

γ(A).

7It is su�cient to set up an order isomorphism by theorem 1.2.14.

31

Page 38: Formal Concept Analysis - VUB

2. Concept Lattices

Assume that (A1, B1) is a subconcept of a concept (A2, B2). Then A1 ⊆ A2 and con-sequently γ(A1) ⊆ γ(A2). Any upper bound of γ(A2) is therefore an upper bound ofγ(A1). In particular,

∨γ(A2) is an upper bound of γ(A1). Hence

∨γ(A1) ≤

∨γ(A2),

showing that the map ϕ is order-preserving.

Next, let x ∈ L and de�neAx := {g ∈ G | γ(g) ≤ x}

andBx := {m ∈M | x ≤ µ(m)}.

Since γ(G) is join-dense in L, we have 8

x =∨{γ(g) | g ∈ G, γ(g) ≤ x} =

∨γ(Ax).

Therefore,

m ∈ A′x ⇐⇒ gIm, ∀g ∈ Ax⇐⇒ γ(g) ≤ µ(m), ∀g ∈ Ax⇐⇒ x =

∨γ(Ax) ≤ µ(m)

⇐⇒ m ∈ Bx.

Thus A′x = Bx. Correspondingly we �nd B′x = Ax based on the fact that µ(M) is meet-dense in L. We now de�ne ψ : L→ B(G,M, I) by mapping every x in L to the concept(Ax, Bx). The map ψ is order-preserving since x ≤ y implies Ax ⊆ Ay. Moreover,

ϕ(ψ(x)) = ϕ((Ax, Bx)) =∨

γ(Ax) = x

and on the other hand,

ψ(ϕ(A,B)) = ψ(∨

γ(A))

=(AW

γ(A), BWγ(A)

).

We claim that the latter concept equals (A,B). Since it holds for every g ∈ A thatγ(g) ≤

∨γ(A), we have A ⊆ AW

γ(A) . Also, since µ(m) is an upper bound of γ(A) forevery m ∈ A′, we �nd

g ∈ AWγ(A) =⇒ γ(g) ≤

∨γ(A)

=⇒ γ(g) ≤ µ(m), ∀m ∈ A′

=⇒ gIm, ∀m ∈ A′

=⇒ g ∈ A′′ = A

showing the reverse inclusion. Now AWγ(A) = A and BW

γ(A) =(AW

γ(A)

)′= A′ = B

which completes the proof of our claim.

Finally, if we choose G = M = L and take the identity map on L for both γ and µ, theconditions of the theorem are satis�ed. Since I then equals ≤, it follows immediatelythat L ∼= B(L,L,≤).

8See proposition 1.2.19.

32

Page 39: Formal Concept Analysis - VUB

2. Concept Lattices

2.2.5 Example. Let (L,≤) be a non-empty �nite lattice. Then, by corollary 1.2.9, Lis complete and, by proposition 1.2.23, the subset J (L) of

∨-irreducible elements and

M(L) of∧-irreducible elements are respectively join-dense and meet-dense in L. The

identity maps on L restricted to J (L) andM(L) respectively, satisfy the conditions oftheorem 2.2.4, yielding

L ∼= B(J (L),M(L),≤).

The isomorphism ψ is given by

x 7→({g ∈ J (L) | g ≤ x}, {m ∈M(L) | x ≤ m}

)=(↓x ∩ J (L), ↑x ∩M(L)

)for elements x of L.

2.3 Clarifying and Reducing the context

In this section, we will discuss two context manipulations that simplify the formal con-text without changing the structure of the concept lattice. Such a simpli�ed contextleads to an isomorphic lattice and thus produces a diagram identical to the original(except for the labeling).

A very elementary operation is clari�cation, which identi�es objects with the sameintents and attributes with the same extents.

2.3.1 De�nition. A context (G,M, I) is called clari�ed, if for all objects g, h ∈ G withg′ = h′, it must hold that g = h and correspondingly, m′ = n′ implies m = n for allattributes m,n ∈M .

We can clarify a context simply by replacing all objects with the same intent by onesingle object, the name of which is precisely the list of names of these objects, and dothe same for the attributes with identical extents.

Another operation on the context that has no in�uence on the structure of the conceptlattice is reduction. This technique seeks to omit attributes that are equivalent tocombinations of other attributes. By convention, reduction is performed on a clari�edcontext.

2.3.2 De�nition. An attribute m is called reducible if there is a set X ⊆ M of at-tributes not containing m for which m′ = X ′. As usual, an attribute is called irre-ducible if it is not reducible. Reducible and irreducible objects are de�ned analogously.

Note that full rows and full columns are always reducible: an object g with g′ = M isreducible since the intent of the empty object set also equals M . A similar argumentholds for full columns.

Deleting a reducible attribute m from a context does not imply a loss of information:we can easily reconstruct the original context since m′ = X ′ signi�es that an object ghas the attribute m if and only if it has all the attributes from X. Moreover, it does

33

Page 40: Formal Concept Analysis - VUB

2. Concept Lattices

not change the number of concepts or the structure of the concept lattice, as we shallprove in theorem 2.3.4. In order to prove this theorem, we �rst formulate the followinglemma:

2.3.3 Lemma. Let m be a reducible attribute of (G,M, I) with m /∈ X ⊆ M andm′ = X ′. The attribute concept µ(m) then arises as the in�mum of the attribute conceptsµ(x), x ∈ X. Conversely, if µ(m) =

∧x∈X µ(x) for some subset X ⊆M not containing

m, then m is a reducible attribute. Similarly, if g is a reducible object of (G,M, I) i.e.if g′ = H ′ with g /∈ H ⊆ G, then γ(g) arises as the supremum of the object conceptsγ(h), h ∈ H. Conversely, if γ(g) =

∨h∈H γ(h) for some subset H ⊆ G not containing

g, then g is a reducible object.

Proof. We provide the proof for the attributes. Letm be a reducible attribute for whichm /∈ X ⊆M and m′ = X ′. Recalling among others proposition 2.1.8 and theorem 2.2.1,we have

µ(m) = (m′,m′′) = (X ′, X ′′) =

(⋂x∈X

x′,( ⋂x∈X

x′)′)

=

(⋂x∈X

x′,( ⋃x∈X

x′′)′′)

=∧x∈X

µ(x).

Conversely, if µ(m) =∧x∈X µ(x) for X ⊆ M , then ext(µ(m)) = ext

(∧x∈X µ(x)

)or

equivalently,

m′ =⋂x∈X

x′ =

( ⋃x∈X

{x}

)′= X ′.

This implies that m is a reducible attribute if m /∈ X.

2.3.4 Theorem.

• Let m be a reducible attribute of (G,M, I). Then,

B(G,M, I) ∼= B(G,M\{m}, I ∩ (G× (M\{m}))).

• Let g be a reducible object of (G,M, I). Then,

B(G,M, I) ∼= B(G\{g},M, I ∩ ((G\{g})×M)).

Proof. Let X be a set of attributes such that m /∈ X and m′ = X ′. According to theprevious lemma, we have

µ(m) =∧x∈X

µ(x).

Relying on the fact that µ(M) is meet-dense in B(G,M, I), it is now clear fromlemma 1.2.8 that µ(M\{m}) remains meet-dense in B(G,M, I). Indeed, a concept

34

Page 41: Formal Concept Analysis - VUB

2. Concept Lattices

(A,B) containing m in the intent can be written as follows

(A,B) =∧b∈B

µ(b)

=

∧b∈B\{m}

µ(b)

∧ µ(m)

=

∧b∈B\{m}

µ(b)

∧(∧x∈X

µ(x)

)=

∧x∈(B\{m})∪X

µ(x).

Theorem 2.2.4 now asserts

B(G,M, I) ∼= B(G,M\{m}, I ∩ (G× (M\{m}))).

The second part of the theorem can be shown similarly.

The following proposition shows that there exists a natural correspondence between thereducible attributes and the

∧-reducible attribute concepts of a clari�ed context. A

similar correspondence exists between the reducible objects and the∨-reducible object

concepts of a clari�ed context.

2.3.5 Proposition. Let (G,M, I) be a clari�ed context. An attribute m is reducible ifand only if µ(m) is a

∧-reducible concept of (G,M, I). Correspondingly, an object g is

reducible if and only if γ(g) is a∨-reducible concept of (G,M, I).

Proof. By lemma 2.3.3, an attribute m is reducible if and only if there exists a setX ⊆M not containing m such that µ(m) =

∧µ(X). In this case, m′ 6= x′ holds for all

x ∈ X since (G,M, I) is clari�ed. Hence, µ(m) 6= µ(x) for all x ∈ X. It then followsfrom proposition 1.2.18 thatm is a reducible attribute if and only if µ(m) is

∧-reducible.

The statement for the objects can be shown analogously.

The de�nition of a reduced context is based on this characterization.

2.3.6 De�nition. A clari�ed context (G,M, I) is called row reduced if every objectconcept is

∨-irreducible, and column reduced if every attribute concept is

∧-irreducible.

A context which is both row and column reduced, is reduced.

2.3.7 Example. Consider the context ([0, 1], [0, 1],≤). Every object x of this context isreducible since

x′ = {m ∈ [0, 1] | x ≤ m} = [0, x[ ′.

Also, every attribute y is reducible since y′ = ]y, 1]′.

It is easy to �nd in�nite contexts in which all attributes and all objects are reducible,as shown by previous example. Therefore, simultaneously omitting all reducible objectsand attributes generally does not leave the conceptual structure unchanged. This is not

35

Page 42: Formal Concept Analysis - VUB

2. Concept Lattices

a problem, however, when dealing with �nite concept lattices as we shall demonstratebelow.

2.3.8 De�nition. Two contexts (G1,M1, I1) and (G2,M2, I2) are called isomorphic ifthere are bijective mappings α : G1 → G2 and β : M1 →M2 with

gI1m ⇐⇒ α(g)I2β(m)

for all g ∈ G1,m ∈M1.

2.3.9 Proposition. Isomorphic contexts yield isomorphic concept lattices.

Proof. Let (G1,M1, I1) and (G2,M2, I2) be isomorphic contexts. Then, there are bijec-tive maps α : G1 → G2 and β : M1 →M2 such that

gI1m ⇐⇒ α(g)I2β(m)

for all g ∈ G1,m ∈M1. It can easily be seen that γ(α(G1)) is join-dense in B(G2,M2, I2).Also, µ(β(M1)) is meet-dense in B(G2,M2, I2). Furthermore,

gI1m ⇐⇒ α(g)I2β(m) ⇐⇒ γ(α(g)) ≤ µ(β(m)).

Theorem 2.2.4 then yields

B(G1,M1, I1) ∼= B(G2,M2, I2).

2.3.10 Proposition. For every �nite lattice L, there is�up to isomorphism�a uniquereduced context such that its concept lattice is isomorphic to L, namely (J (L),M(L),≤).This context is called the standard context of L.

Proof. We already demonstrated in example 2.2.5 that

L ∼= B(J (L),M(L),≤).

The objects of the context (J (L),M(L),≤) are precisely the∨-irreducible elements

of L, hence the associated object concepts are∨-irreducible. Similarly, the attribute

concepts are∧-irreducible, showing that the context (J (L),M(L),≤) is indeed reduced.

Let (G,M, I) be a another reduced context such that L ∼= B(G,M, I). The completeisomorphism ψ : B(G,M, I) → L maps

∨-irreducible object concepts to

∨-irreducible

elements of L, hence ψ maps into J (L). Conversely, every x ∈ J (L) is mapped by ψ−1

to a∨-irreducible element of B(G,M, I), hence to an object concept. Therefore, ψ

∣∣γ(G)

is a bijective map from the object concepts of (G,M, I) to J (L). Since (G,M, I) isclari�ed, the map γ : G → γ(G) : g 7→ (g′′, g′) is a bijective mapping from G onto theobject concepts. As a result, the map

ψ∣∣γ(G)◦ γ : G→ J (L)

36

Page 43: Formal Concept Analysis - VUB

2. Concept Lattices

is bijective. In the same way, we can obtain a bijective map

ψ∣∣µ(M)◦ µ : M →M(L).

These maps constitute a context isomorphism between (G,M, I) and (J (L),M(L),≤)since

gIm ⇐⇒ γ(g) ≤ µ(m) ⇐⇒ ψ(γ(g)) ≤ ψ(µ(m)).

2.3.11 Theorem. If (G,M, I) is a clari�ed context with �nite concept lattice B(G,M, I),then

B(Girr,Mirr, I ∩ (Girr ×Mirr)) ∼= B(G,M, I)

where Girr denotes the set of all irreducible objects and Mirr denotes the set of all irre-ducible attributes.

Proof. First, note that J (B(G,M, I)) only contains object concepts whileM(B(G,M, I))only contains attribute concepts. Then, the maps

γ : Girr → J (B(G,M, I)) : g 7→ (g′′, g′)

andµ : Mirr →M(B(G,M, I)) : m 7→ (m′,m′′)

are well-de�ned bijections by proposition 2.3.5. Moreover, γ(Girr) = J (B(G,M, I))which shows that γ(Girr) is join-dense in B(G,M, I). Analogously, µ(Mirr) is meet-dense in B(G,M, I). Furthermore, gIm ⇔ γ(g) ≤ µ(m) for all g ∈ Girr, m ∈ Mirr.Thus, theorem 2.2.4 yields

B(G,M, I) ∼= B(Girr,Mirr, I ∩ (Girr ×Mirr))

with the order isomorphism given by

ψ : B(G,M, I)→ B(Girr,Mirr, I ∩ (Girr ×Mirr)) :

(A,B) 7→ ({g ∈ Girr | γ(g) ≤ (A,B)}, {m ∈Mirr | (A,B) ≤ µ(m)}) = (Girr∩A,Mirr∩B)

since γ(g) ≤ (A,B)⇔ g′′ ⊆ A⇔ g ∈ A and (A,B) ≤ µ(m)⇔ B ≥ m′′ ⇔ m ∈ B.

Every �nite context can now be brought into a reduced form without changing thestructure of the concept lattice, and the latter is unique. First, we clarify the context bymerging objects with the same intents and attributes with the same extents. Then wedelete all objects, the intent of which arises as the intersection of other object intents, andcorrespondingly all attributes, the extent of which is the intersection of other attributeextents.

2.3.12 Example. The context given by the �rst cross table in �gure 2.3 can clearly beclari�ed by merging attributes b and c. Also, 2′ = {1, 3}′ thus object 2 is reducible.The third cross table shows the reduced context.

37

Page 44: Formal Concept Analysis - VUB

2. Concept Lattices

a b c d e1 × × ×2 × ×3 × × ×4 × ×

a b & c d e1 × ×2 ×3 × ×4 × ×

a b & c d e1 × ×3 × ×4 × ×

Figure 2.3: From left to right: a context, the clari�ed context and the reduced context.

The concepts of the original context can easily be reconstructed from those of the re-duced context, provided one kept a record of the reduction process. Denote, for a �niteclari�ed context (G,M, I), the set of irreducible objects as Girr and the set of irre-ducible attributes as Mirr. We have seen in theorem 2.3.11 that the reduced context(Girr,Mirr, I ∩ (Girr ×Mirr)) gives rise to a concept lattice isomorphic to B(G,M, I),where a concept (A,B) of (G,M, I) corresponds to a concept (A∩Girr, B ∩Mirr) of thereduced context. For every object g ∈ G and every extent A of (G,M, I), we have

g ∈ A ⇐⇒ g′′ ⊆ A ⇐⇒ g′′ ∩Girr ⊆ A ∩Girr.

A similar statement holds for the attributes. If we write down the elements of the setg′′ ∩ Girr for every reducible object g as well as those of m′′ ∩Mirr for every reducibleattribute m, we can easily obtain the concepts of (G,M, I) from those of the reducedcontext (Girr,Mirr, I ∩ (Girr ×Mirr)).

There is another way to carry out the reduction of a context, by means of the arrowrelations.

2.3.13 De�nition. The arrow relations of a context (G,M, I) are de�ned as follows:for objects g, h ∈ G and attributes m,n ∈M , let

g ↙ m ⇐⇒{g��Im andg′ ⊂ h′ implies hIm;

g ↗ m ⇐⇒{g��Im andm′ ⊂ n′ implies gIn;

g↗↙ m ⇐⇒ g ↙ m and g ↗ m.

Thus, g ↙ m if and only if g′ is maximal among all object intents which do not containm.

2.3.14 Proposition. g ↙ m if and only if g does not have the attribute m, but m belongsto the intent of every proper subconcept of γ(g).

Proof. Assume that g ↙ m. Clearly, m /∈ g′. Let (A,B) be a proper subconceptof γ(g), i.e. g′ ⊂ B. Recall that we can write (A,B) =

∨a∈A γ(a) and thus B =

⋂a∈A a

′.Consequently, g′ ⊂ a′ for all a ∈ A. Hence, m ∈ a′ for all a ∈ A and thereforem ∈ B. Conversely, assume that g��Im and that m belongs to the intent of every propersubconcept of γ(g). In particular, m is contained in the intent of every object conceptγ(h) such that γ(h) < γ(g). In other words, m ∈ h′ for all h ∈ H with h′ ⊃ g′.

38

Page 45: Formal Concept Analysis - VUB

2. Concept Lattices

Similarly, g ↗ m if and only if m′ is maximal among all attribute extents which donot contain g, or in other words: g does not have the attribute m but g belongs to theextent of every proper superconcept of µ(m).

The next proposition expresses the signi�cance of the arrow relations for the reductionof a context.

2.3.15 Proposition. The following statements hold for every context:

(i) γ(g) is∨-irreducible ⇐⇒ ∃m ∈M : g ↙ m

(ii) µ(m) is∧-irreducible ⇐⇒ ∃g ∈ G : g ↗ m

Proof. We show (i). Write

γ(g)∗ =∨{x ∈ B(G,M, I) | x < γ(g)}

as in de�nition 1.2.16. The object concept γ(g) is∨-irreducible if and only if γ(g)∗ < γ(g).

This is equivalent with the fact that the intent of γ(g) is a proper subset of the intentof γ(g)∗, i.e.

g′ ⊂⋂{int(x) | x ∈ B(G,M, I), x < γ(g)}

which is the case if and only if there exists an attribute m such that m /∈ g′ andm ∈ int(x) for all proper subconcepts x of γ(g). The latter is equivalent with g ↙ m forsome m ∈M by proposition 2.3.14.

2.3.16 Corollary. The following equivalences hold in every context:

g ↙ m ⇐⇒ γ(g) ∧ µ(m) = γ(g)∗ 6= γ(g)

g ↗ m ⇐⇒ γ(g) ∨ µ(m) = γ(g)∗ 6= γ(g)

Proof. We provide the proof for the �rst equivalence. If g ↙ m holds, then clearlyγ(g)∗ 6= γ(g) by the previous proposition. Consequently, γ(g)∗ < γ(g). Also, sincem ∈ int(x) for all proper subconcepts x of γ(g) and therefore

m′′ ⊆⋂{int(x) | x ∈ B(G,M, I), x < γ(g)},

it follows that γ(g)∗ ≤ µ(m). Hence γ(g)∗ is a lower bound of γ(g) and µ(m). Moreover,we will demonstrate that it is in fact the in�mum. Let (A,B) be a lower bound ofγ(g) and µ(m). Then necessarily m′′ ⊆ B and thus m ∈ B. However, m /∈ g′ whichimplies that (A,B) < γ(g). Therefore, (A,B) ≤ γ(g)∗.

Suppose conversely thatγ(g) ∧ µ(m) = γ(g)∗ 6= γ(g).

Since γ(g)∗ ≤ µ(m) is equivalent to

m′′ ⊆⋂{int(x) | x ∈ B(G,M, I), x < γ(g)},

39

Page 46: Formal Concept Analysis - VUB

2. Concept Lattices

we know that m must belong to the intent of every proper subconcept of γ(g). Recallingproposition 2.3.14, we may conclude that g ↙ m if we can show that g��Im. SupposegIm. This implies γ(g) ≤ µ(m) which is equivalent to γ(g) ∧ µ(m) = γ(g) by theconnecting lemma. Contradiction.

An even stronger result than proposition 2.3.15 holds for �nite contexts.

2.3.17 Proposition. The following statements hold for every �nite context:

(i) γ(g) is∨-irreducible ⇐⇒ ∃m ∈M : g↗↙ m

(ii) µ(m) is∧-irreducible ⇐⇒ ∃g ∈ G : g↗↙ m

Proof. Again, we prove (i). Proposition 2.3.15 immediately provides one implication.Conversely, let γ(g) be

∨-irreducible. The context considered is �nite, hence we can

choose m′ maximal with respect to g ↙ m, i.e. m′ ⊂ n′ implies g ↙\ n. For thisattribute m, we will show that g ↗ m (hence g ↗↙ m). Clearly, g��Im since g ↙ m. Ifm′ ⊂ n′, then g ↙\ n yields g ∈ n′ or ¬(g′ ⊂ h′ ⇒ n ∈ h′). The latter statement is false.Indeed,

g′ ⊂ h′ =⇒ m ∈ h′

=⇒ h′′ ⊆ m′ ⊂ n′

=⇒ n ∈ n′′ ⊆ h′′′ = h′.

We may therefore conclude that m′ ⊂ n′ implies g ∈ n′ and thus g ↗ m.

In order to reduce a �nite clari�ed context, we therefore �rst enter the arrow relationsin the cross table and then delete all rows and columns not containing a double arrow.

2.3.18 Example. Figure 2.4 shows the arrow relations for the clari�ed context given in�gure 2.3. Deleting the second row gives us the reduced context, in accordance with theresult in example 2.3.12.

a b & c d e1 × × ↗↙ ↗↙2 ↗ × ↗3 ↗↙ × × ↙4 × ↗↙ ↙ ×

a b & c d e1 × × ↗↙ ↗↙3 ↗↙ × × ↙4 × ↗↙ ↙ ×

Figure 2.4: A clari�ed context with arrow relations and the reduced context.

The condition of �niteness in propositions 2.3.10 and 2.3.17 can be weakened:

2.3.19 De�nitions.• A context (G,M, I) is called doubly founded if, for every object g and at-tribute m with g��Im, there is an object h and an attribute n such that

g ↗ n and m′ ⊆ n′

as well ash↙ m and g′ ⊆ h′.

40

Page 47: Formal Concept Analysis - VUB

2. Concept Lattices

• A complete lattice (L,≤) is called doubly founded if, for any two elements x < yof L, there are elements s, t ∈ L such that s is minimal with respect to s ≤ y ands � x while t is maximal with respect to t ≥ x and t � y.

2.3.20 Examples.

• (N,N,≤) is a doubly founded context. Let g ∈ N be an object and m ∈ N anattribute such that g � m (hence g > m). Note that the attribute extents areprecisely the principal downsets of N. Let n := g − 1. Recalling lemma 1.1.16,m ≤ n implies m′ ⊆ n′. Also, g ↗ n since clearly g � n and furthermoren′ ⊂ t′ ⇒ n < t⇒ g ≤ t. In a similar way, we can show that h := m + 1 satis�esh↙ m and g′ ⊆ h′.

• The powerset lattice (P(N),⊆) is doubly founded. Let A and B be two subsetsof N with B ⊂ A. Choose an element a of A\B. Then, {a} ⊆ A and {a} * B.Clearly, {a} is minimal with respect to these properties. The set N\{a} obviouslysatis�es B ⊆ N\{a} as well as A * N\{a} and is maximal with respect to theseproperties.

It is easily seen by lemma 2.3.3 and proposition 2.3.15 that the attribute n and theobject h in de�nition 2.3.19 must be irreducible. Similarly, the lattice elements s and tfrom this de�nition must be

∨-irreducible and

∧-irreducible respectively. Doubly found-

edness therefore implies the existence of `many' irreducible elements.

2.3.21 Proposition. A context which does neither contain in�nite chains g1, g2, . . . ofobjects with g′1 ⊂ g′2 ⊂ . . . nor in�nite chainsm1,m2, . . . of attributes withm

′1 ⊂ m′2 ⊂ . . .

is doubly founded.

Proof. Let g ∈ G,m ∈ M with g��Im. If gi ��Im for gi ∈ G, either gi ↙ m or gi ↙\ m.In the latter case, there exists an object gi+1 ∈ G such that g′i ⊂ g′i+1 and m /∈ g′i+1,implying gi+1 ��I m. Again, either gi+1 ↙ m or gi+1 ↙\ m. Starting this process withg1 := g, we eventually �nd an object gk for which gk ↙ m and g′ ⊆ g′k. Otherwise,we would obtain a strictly ascending chain of object intents g′ = g′1 ⊂ g′2 ⊂ g′3 ⊂ . . .which is impossible by assumption. With a similar process�forced to end since strictlyascending chains of attribute extents cannot occur�we �nd an attribute ml ∈ M forwhich g ↗ ml and m

′ ⊆ m′l.

2.3.22 Corollary. Every �nite context is doubly founded.

2.3.23 Proposition. Each concept of a doubly founded context is the join of∨-irreducible

concepts and the meet of∧-irreducible concepts.

Proof. Let (A,B) be a concept and de�ne

(C,D) :=∨{

γ(x)∣∣∣ x ∈ A, γ(x) is

∨-irreducible

}.

Clearly, (C,D) ≤ (A,B). Assume that (C,D) 6= (A,B), i.e. there exists an attributem ∈ D with m /∈ B = A′. For such an attribute m, there exist an object g ∈ A with

41

Page 48: Formal Concept Analysis - VUB

2. Concept Lattices

g��Im. Due to the double foundedness of the context, there exists an object h ∈ G withh ↙ m and g′ ⊆ h′. As a result of h ↙ m, γ(h) is

∨-irreducible. Also, h ∈ A since

g′ ⊆ h′ yields h′′ ⊆ g′′ ⊆ A. Therefore, γ(h) ≤ (C,D) which implies that h ∈ C = D′.Thus, hId for all d ∈ D, in particular, hIm which contradicts h↙ m. In a similar way,we can show that (A,B) =

∧{µ(x) | x ∈ B, µ(x) is

∧-irreducible} .

As a corollary of this proposition we can show that the result in proposition 2.3.10 alsoholds for concept lattices of doubly founded contexts. More precisely,

2.3.24 Corollary. Let (G,M, I) be a doubly founded context and L := B(G,M, I) itsconcept lattice. There is�up to isomorphism�a unique reduced context such that itsconcept lattice is isomorphic to L, namely (J (L),M(L),≤).

Proof. By previous proposition, the maps

γ : J (L)→ L : x 7→ x

andµ : M(L)→ L : x 7→ x

satisfy the conditions in theorem 2.2.4. Hence, L ∼= B(J (L),M(L),≤). The rest of theproof is analogous to the proof of proposition 2.3.10.

2.3.25 Proposition. If (G,M, I) is doubly founded and g ∈ G,m ∈M , then the follow-ing statements hold:

(i) g ↙ m =⇒ ∃n ∈M : g↗↙ n

(ii) g ↗ m =⇒ ∃h ∈ G : h↗↙ m

Proof. If g ↙ m then g��Im. The double foundedness of the context now yields theexistence of an n ∈ M with m′ ⊆ n′ and g ↗ n. Clearly, g��In. Also, if g′ ⊂ h′ thenh ∈ m′ as a result of g ↙ m and therefore h ∈ n′. So, g ↙ n in addition to g ↗ n,hence g↗↙ n.

Consequently, the results of proposition 2.3.17 for �nite contexts also hold more generallyfor doubly founded contexts. Explicitly,

2.3.26 Corollary. The following statements hold for every doubly founded context:

(i) γ(g) is∨-irreducible ⇐⇒ ∃m ∈M : g↗↙ m

(ii) µ(m) is∧-irreducible ⇐⇒ ∃g ∈ G : g↗↙ m

Proof. This is an immediate consequence of propositions 2.3.25 and 2.3.15.

2.3.27 Theorem. If B(G,M, I) is doubly founded, so is (G,M, I). If a complete lat-tice L is not doubly founded, neither is the context (L,L,≤).

42

Page 49: Formal Concept Analysis - VUB

2. Concept Lattices

Proof. Let B(G,M, I) be doubly founded and g ∈ G,m ∈M with g��Im, i.e. γ(g) � µ(m).Then µ(m) < µ(m)∨γ(g). The double foundedness of B(G,M, I) requires the existenceof a concept x which is maximal with respect to x ≥ µ(m) and x � µ(m) ∨ γ(g). Onaccount of maximality, x must be

∧-irreducible. Hence, x = µ(n) for an attribute n.

From µ(n) = x ≥ µ(m), we now obtain m′ ⊆ n′. Also, µ(n) = x � γ(g) which impliesg��In. If n′ ⊂ l′ for some l ∈M , then x = µ(n) < µ(l) and thus, µ(l) ≥ µ(m)∨γ(g) whichyields gIl. Hence, g ↗ n holds. The other condition is obtained dually.

Let (L,L,≤) be a doubly founded context and x < y in L. Then certainly y � x, i.e.y��Ix in (L,L,≤). Consequently, there exists an object s ∈ L with s ↙ x and y′ ⊆ s′.Hence, s � x. Note that the object intents of (L,L,≤) are precisely the principal �ltersof L and thereby s ≤ y. Also, s is minimal with respect to s � x and s ≤ y: if t < sthen s′ ⊂ t′ and thus t ≤ x by s ↙ x. The second condition can again be shown bymeans of a dual argument.

Thus, a complete lattice L is doubly founded if and only if every context (G,M, I) withL ∼= B(G,M, I) is doubly founded. One should note, however, that the concept latticeof a doubly founded context does not necessarily have to be doubly founded, as shownby the following example.

2.3.28 Example. We already indicated in example 2.3.20 that (N,N,≤) is a doublyfounded context. However, the concept lattice B(N,N,≤) is not doubly founded.Choose an element n ∈ N . The reader can easily verify that (↓ n, ↑ n) and (N,∅)are concepts of (N,N,≤) for which (↓n, ↑n) < (N,∅). Let (S, T ) be a concept such that(S, T ) ≥ (↓n, ↑n) as well as (S, T ) � (N,∅). Consequently, T is not empty, and due tothe wellorder of N, minT exists. Then,

S = T ′ = {g ∈ N | g ≤ t, ∀t ∈ T} =↓minT

and thusT = S ′ =↑minT.

Clearly,(↓(minT + 1), ↑(minT + 1)

)is a proper superconcept of (S, T ) for which(

↓(minT + 1), ↑(minT + 1))≥ (↓n, ↑n)

and (↓(minT + 1), ↑(minT + 1)

)� (N,∅)

also hold.

43

Page 50: Formal Concept Analysis - VUB

Chapter 3

Determination and Representation

Finding the concept lattice of a given context, is our �rst priority. There exist manyalgorithms for calculating all the concepts, not few of which are based on the two basicalgorithms discussed in the �rst section. The second section deals with the visualizationof concept lattices through Hasse diagrams, a key feature of Formal Concept Analysis.We introduce an economic labeling of the concept lattice diagram and obtain a veryhelpful result which allows us to verify if a manually obtained diagram is correct. Thedrawing of concept lattice diagrams becomes increasingly di�cult with the size of thecontext. Nested line diagrams, also introduced in the second section, provide a way ofbypassing this problem.

The third section discusses implications between sets of attributes. We search for im-plicational bases, i.e. minimal sets of implications from which all the other implicationsof the context can be inferred. The `stem base' will prove to be such an implicationalbase for contexts with a �nite attribute set. It has the additional property that no otherimplicational base can contain fewer implications. An algorithm for computing the stembase is provided.

3.1 All concepts of a context

A straightforward yet elaborate way to determine all the concepts of a context (G,M, I)would be to simply calculate (A′′, A′) for every set of objects A, or (B′, B′′) for everyset of attributes B. We propose a more practicable method based on proposition 2.1.8and corollary 2.1.9. For (A,B) ∈ B(G,M, I) we have

A = B′ =

(⋃m∈B

{m}

)′=⋂m∈B

m′

and

B = A′ =

(⋃g∈A

{g}

)′=⋂g∈A

g′.

Hence, we can obtain all the extents of a context by calculating all the attribute ex-tents m′ and forming all possible intersections (this includes the intersection of zero

44

Page 51: Formal Concept Analysis - VUB

3. Determination and Representation

attribute extents, which equals G). Likewise, the intents can be found by calculatingthe object intents and intersecting them.

3.1.1 Mathematical examples.

• Let P be an ordered set and consider the context (P, P,�). For a set of objects Awe have

A′ = {m ∈ P | g � m,∀g ∈ A} = P\{m ∈ P | ∃g ∈ A : g ≥ m} = P\ ↓A.

Correspondingly we �nd for a set of attributes B that

B′ = P\ ↑B.

Therefore,A′′ = (P\ ↓A)′ = P\ ↑(P\ ↓A) = ↓A

since P\ ↓A is an upset (recall the proof of proposition 1.1.17). We conclude that(A,B) is a concept of (P, P,�) if and only if A is a downset of (P,≤) and B equalsthe complement of A. Clearly, B(P, P,�) ∼= O(P ).

• Let P be an ordered set and consider the context (P, P,≤). A pair (A,B) ofsubsets of P is a concept of (P, P,≤) if and only if

B = A′ = {m ∈ P | g ≤ m,∀g ∈ A}

andA = B′ = {g ∈ P | g ≤ m,∀m ∈ B}.

In other words, a concept (A,B) is a pair of subsets of P where A is the set oflowerbounds of B and B is the set of upperbounds of A. Such pairs are calledcuts.

• Let L be a complete lattice and consider the context (L,L,≤). For an objectg ∈ L we have g′ = {m ∈ L | g ≤ m} = ↑ g. The object intents are thereforeprecisely the principal �lters. We already know that upsets of an ordered set forma closure system (see example 1.3.3). Moreover, we can prove that an intersectionof principal upsets is principal in a complete lattice L. Let A be a set of objects,then ⋂

g∈A

↑g = {m ∈ L | m ≥ g,∀g ∈ A}

={m ∈ L | m ≥

∨A}

=x∨A.

It is then clear by the previous example that

B(L,L,≤) = {(↓x, ↑x) | x ∈ L}.

45

Page 52: Formal Concept Analysis - VUB

3. Determination and Representation

A bijective map between L and B(L,L,≤) is given by x 7→ (↓x, ↑x). This map isan order isomorphism by lemma 1.1.16 and its dual. Theorem 1.2.14 then yieldsL ∼= B(L,L,≤), i.e. L and B(L,L,≤) are isomphic as complete lattices. Thisresult was already predicted by theorem 2.2.4. Recall that we put γ = µ = IdL.The isomorphism ψ : L → B(L,L,≤) then maps an element x of L to a conceptwith extent

Ax = {m ∈ L | m ≤ x} =↓x

and intentBx = {g ∈ L | x ≤ g} =↑x

in accordance with our result.

In applications however, contexts are often given by cross tables. The following proce-dure, based on the intersection method at the beginning of this section, can be used todraw up a list of all extents of such a context (G,M, I).

Step 1: Add the extent G to an a priori empty list L.

Step 2: Find a maximal attribute extent, say m′.

• If m′ is not already in L, add m′ to L. Then, calculate A∩m′ for all extentsA in L and add A ∩m′ to L if it was not already in L.

• Remove column m from the cross table.

Step 3: Repeat Step 2 until all columns have been removed from the cross table.

Step 4: Bext(G,M, I) = L.

A similar procedure can be formulated for generating all the intents. In order to �ndall the concepts, we only need to apply this procedure once: if we found the extentsthrough this procedure, the corresponding intents can be found directly from the crosstable and vice versa.

3.1.2 Example. Consider the context K given by the following cross table:

s t u v wA × ×B × ×C × × ×D × × × ×

Our goal is to determine all the concepts of this context. We calculate the extents withthe foregoing procedure:

Step 1: L = {{A,B,C,D}}

Steps 2 and 3:

46

Page 53: Formal Concept Analysis - VUB

3. Determination and Representation

• t′ = {A,C,D} is a maximal extent. Adding this extent to L, we obtain

L = {{A,B,C,D}, {A,C,D}}.

Column t is then removed from the cross table.

• Also, v′ is a maximal extent. Adding v′ = {B,C,D} and {A,C,D} ∩ {B,C,D}to L, we obtain

L = {{A,B,C,D}, {A,C,D}, {B,C,D}, {C,D}}.

Column v is then removed from the cross table.

• Then, w′ = {C,D} is a maximal extent already contained in L. Removecolumn w from the cross table.

• u′ = {A,D} is a maximal extent. We add {A,D} and {B,C,D}∩ {A,D} toL and obtain

L = {{A,B,C,D}, {A,C,D}, {B,C,D}, {C,D}, {A,D}, {D}}.

Column u is removed from the cross table.

• Finally, s′ = {B} and {A,C,D} ∩ {B} = ∅ are added to L which yields

L = {{A,B,C,D}, {A,C,D}, {B,C,D}, {C,D}, {A,D}, {D}, {B},∅}.

Step 4:

Bext(K) = {{A,B,C,D}, {A,C,D}, {B,C,D}, {C,D}, {A,D}, {D}, {B},∅}.

When we calculate the corresponding intents directly from the cross table, we obtain

B(K) ={({A,B,C,D},∅

),({A,C,D}, {t}

),({B,C,D}, {v}

),({C,D}, {t, v, w}

),(

{A,D}, {t, u}),({D}, {t, u, v, w}

),({B}, {s, v}

),(∅, {s, t, u, v, w}

)}.

The procedure described above is far from ideal for larger contexts since at each stepevery calculated extent needs to be checked against all the previously calculated onesin order to guarantee that a non-redundant list of extents is drawn up. In fact, in theworst case scenario, we need to perform n − 1 checks for the nth calculated extent of

(G,M, I), resulting in a total number of (2|M|−1)·2|M|

2=(2|M | − 1

)· 2|M |−1 checks. We

now describe an algorithm that will allow us to determine all the extents (or intents) ofa �nite context without needing any checks. It has the additional advantage that it caneasily be programmed.1

Let ϕ be a closure operator on a �nite set G. The AllClosures algorithm, basedon the NextClosure algorithm, will generate all closed subsets ϕ(X) of G in lecticorder. In order to de�ne this lectic order on P(G), we �rst need to equip the base setG with a total order ≤. If G has n elements, then (G,≤) is clearly order-isomorphic to{1, 2, . . . , n} endowed with the natural order. We then identify the elements of G withtheir corresponding natural numbers.

1See �gure 3.1 and �gure 3.2.

47

Page 54: Formal Concept Analysis - VUB

3. Determination and Representation

3.1.3 De�nition. A subset A ⊆ G is lectically smaller than a subset B 6= A if thesmallest element which distinguishes A and B belongs to B. Formally,

A < B ⇔ ∃i ∈ B\A : A ∩ {1, 2, . . . , i− 1} = B ∩ {1, 2, . . . , i− 1}.

More precisely, we de�ne for A,B ⊆ G and i ∈ G,

A <i B ⇔ i ∈ B\A and A ∩ {1, 2, . . . , i− 1} = B ∩ {1, 2, . . . , i− 1}.

Clearly, A < B ⇔ A <i B for some i ∈ G.

3.1.4 Proposition. The relation < de�ned above is a strict total order on P(G). It iscalled the lectic order.

Proof. Let A,B and C be subsets of G. Clearly, @i ∈ G : i ∈ A and i /∈ A, showingirre�exivity. Now, suppose A <i B and B <j C. Obviously, i 6= j. Then,

A∩{

1, 2, . . . ,min{i, j}−1}

= B∩{

1, 2, . . . ,min{i, j}−1}

= C∩{

1, 2, . . . ,min{i, j}−1}.

When i < j we have i ∈ C since i ∈ B. Also, i /∈ A. When on the other hand j < i, itholds that j ∈ C and j /∈ A since j /∈ B. Therefore,

A <min{i,j} C,

showing the transitivity of <. Next, let A,B ⊆ G with A 6= B and de�ne

n := min((A\B) ∪ (B\A)

).

Then, A <n B if n ∈ B\A and B <n A if n ∈ A\B.

3.1.5 De�nition. Let ϕ be a closure operator on G. For A ⊆ G and i ∈ G we de�ne

A⊕ i := ϕ((A ∩ {1, 2, . . . , i− 1}

)∪ {i}

).

3.1.6 Lemma. Let ϕ be a closure operator on G and let A,B,C ∈ P(G) and i, j ∈ G.Then the following statements hold:

(i) A <i B and A <j C with i < j ⇒ C <i B

(ii) i /∈ A⇒ A < A⊕ i

(iii) A <i B and B closed ⇒ A⊕ i ⊆ B ⇒ A⊕ i ≤ B

(iv) A <i B and B closed ⇒ A <i A⊕ i

Proof. (i) If A <i B and A <j C with i < j then

C ∩ {1, 2, . . . , i− 1} = A ∩ {1, 2, . . . , i− 1} = B ∩ {1, 2, . . . , i− 1}.

Since i /∈ A and i < j, it holds that i /∈ C. Also, i ∈ B. Consequently, C <i B.

48

Page 55: Formal Concept Analysis - VUB

3. Determination and Representation

(ii) If (A ∩ {1, 2, . . . , i− 1}) ∪ {i} is closed, then

(A⊕ i) ∩ {1, 2, . . . , i− 1} = A ∩ {1, 2, . . . , i− 1}

and clearly i ∈ A⊕ i while i /∈ A by assumption.If on the other hand (A ∩ {1, 2, . . . , i− 1}) ∪ {i} is not closed, write k for thesmallest element of G which was added to (A ∩ {1, 2, . . . , i− 1})∪{i} when takingits closure. Formally,

k = min {a ∈ G | a ∈ A⊕ i, a /∈ (A ∩ {1, 2, . . . , i− 1}) ∪ {i}} .

When k > i it still holds that

(A⊕ i) ∩ {1, 2, . . . , i− 1} = A ∩ {1, 2, . . . , i− 1}

with i ∈ A⊕ i and i /∈ A. When, on the other hand, k < i we have

(A⊕ i) ∩ {1, 2, . . . , k − 1} = A ∩ {1, 2, . . . , k − 1}.

Clearly, k ∈ A ⊕ i. Also, k /∈ (A ∩ {1, 2, . . . , i− 1}) ∪ {i} from which it followsthat k /∈ A.

(iii) Let A <i B and B closed. We have

(A ∩ {1, 2, . . . , i− 1}) ∪ {i} = (B ∩ {1, 2, . . . , i− 1}) ∪ {i} ⊆ B.

Using the monotony of the closure operator and the fact that B is closed, we �nd

A⊕ i ⊆ B.

This in turn clearly implies that A⊕ i ≤ B.

(iv) Let A <i B and B closed. Then A ⊕ i ≤ B by (iii). Also, A <k A ⊕ i for somek ∈ G by (ii). If A ⊕ i = B, there is nothing to prove. Assume A ⊕ i <j B forsome j ∈ G. The transitivity of the lectic order then yields

A <min{k,j} B.

Therefore, i must equal min{k, j}. But i 6= j since j /∈ A ⊕ i and i ∈ A ⊕ i. Weconclude that i must be equal to k.

3.1.7 Theorem. The smallest closed set larger than a given set A ⊂ G with respect tothe lectic order is

A⊕ i,

with i being the largest element of G satisfying A <i A⊕ i.

49

Page 56: Formal Concept Analysis - VUB

3. Determination and Representation

Proof. Let A+ be the smallest closed set after A with respect to the lectic order. Wemay write A <i A

+ for some i ∈ G and thus A <i A ⊕ i by (iv) of lemma 3.1.6. Frompart (iii) of this lemma we obtain A⊕i ≤ A+ and thus A⊕i = A+. We have yet to provethat i is the largest element with A <i A⊕ i. Suppose A <j A⊕ j with j 6= i. If i < jthen i /∈ A ⊕ j since i /∈ A. Part (ii) of lemma 3.1.6 then yields A ⊕ j <i A ⊕ i = A+

which is in contradiction with the de�nition of A+. Consequently, j < i.

We are now ready to describe the algorithm that will generate all closed subsets ϕ(X)of G for some closure operator ϕ on a �nite set G. The closed subsets will be generatedin lectic order, guaranteeing that every closed set is generated exactly once.

3.1.8 The NextClosure algorithm. For a given set A ⊂ G we �nd the lecticallynext closed set by checking all elements i of G\A, starting from the largest one anddescending down until for the �rst time A <i A⊕ i. By theorem 3.1.7, A⊕ i is the nextclosed set we have been looking for.

Figure 3.1 shows pseudocode for the NextClosure algorithm. Note that codelines 2,5, 10 and 16 use the total order with which G needed to be a priori endowed.

Algorithm NextClosure

input: A closure operator ϕ on a �nite set G and a set A ⊆ G.output: A is replaced by the lectically next closed set.

1: begin

2: i := successor(max(G))3: success := false;

4: repeat

5: i := predecessor(i);6: if i /∈ A then

7: begin

8: A := A ∪ {i};9: B := ϕ(A);10: if x > i for all x ∈ B\A then

11: begin

12: A := B;13: success := true;

14: end;

15: end;

16: until success or i = min(G);17: end.

Figure 3.1: Pseudocode for the NextClosure algorithm.

3.1.9 The AllClosures algorithm. Let ϕ be a closure operator on G. The lecticallysmallest closed set is ϕ(∅). This is easily seen by the monotony of the closure operator.

50

Page 57: Formal Concept Analysis - VUB

3. Determination and Representation

Iteratively applying the NextClosure algorithm on ϕ(∅) obtains all the closed setsin lectic order. This process ends with the lectically largest closed set G. Pseudocodefor this algorithm is given in �gure 3.2.

Algorithm AllClosures

input: A closure operator ϕ on a �nite set G.output: All closures in lectic order.

1: begin

2: A := ϕ(∅);3: repeat

4: output A;5: NextClosure(ϕ,G,A);6: until not success ;

7: end.

Figure 3.2: Pseudocode for the AllClosures algorithm.

We can apply this algorithm with the closure operator X 7→ X ′′ on the object orattribute set of a context in order to obtain all extents or all intents in lectic order.

3.2 Concept Lattice Diagrams

Writing down B(G,M, I) explicitly provides us little or no insight in the conceptualhierarchy. Visualising concept lattices with Hasse diagrams however, does. Each circlein such a lattice diagram represents a concept. One could opt to write down the entireextent and intent of each concept near the corresponding circle of the diagram. Thisseems overkill. As an alternative, we introduce a more economic labeling based on thefollowing proposition.

3.2.1 Proposition. Let (A,B) be a concept of a context (G,M, I). Then,

g ∈ A ⇐⇒ γ(g) ≤ (A,B)

andm ∈ B ⇐⇒ µ(m) ≥ (A,B).

Proof. The equivalence for the objects can be obtained quite easily:

g ∈ A ⇐⇒ g′′ ⊆ A′′ = A ⇐⇒ γ(g) = (g′′, g′) ≤ (A,B).

In a similar way, one obtains the equivalence for the attributes.

Henceforth, we shall employ a reduced labeling for the concepts in a concept latticediagram:

51

Page 58: Formal Concept Analysis - VUB

3. Determination and Representation

3.2.2 De�nition. Reduced labeling labels a concept lattice diagram of a context(G,M, I) by the elements of G and the elements of M such that

• a circle is labeled by an object g ∈ G if and only if it represents the objectconcept γ(g),

• a circle is labeled by an attribute m ∈M if and only if it represents the attributeconcept µ(m).

Object labels are written beneath the respective circles, attribute labels above.

Without much e�ort, we can retrieve the extent and intent of each concept from aconcept diagram with reduced labeling. According to previous proposition, the extentof a concept can be found by noting down the object labels of all the circles that can bereached by a path descending down from the concepts circle (including its own objectlabel, if it has one). Similarly, the intent of a concept can be found by noting downthe attribute labels of all the circles that can be reached by a path ascending from theconcepts circle (including its own attribute label, if it has one).

3.2.3 Example. The Hasse diagram in �gure 3.3 represents the concept lattice of thecontext in example 3.1.2. The reader is encouraged to read o� the extent and intent ofeach concept in �gure 3.3 and verify the results with example 3.1.2.

Figure 3.3: Concept lattice of the context in example 3.1.2.

Say, for a given context (G,M, I), we have found the concepts and drawn the latticediagram. It is useful to have a tool at our disposal with which we can ensure that theobtained Hasse diagram is indeed a correctly labeled diagram of B(G,M, I).

3.2.4 Theorem. Let (G,M, I) be a context and D a �nite Hasse diagram, labeled bythe objects from G and the attributes from M . For g ∈ G, let γ̃(g) denote the elementof the diagram labeled with g. Similarly, for m ∈ M , µ̃(m) denotes the element of thediagram labeled with m. The diagram D is a correctly labeled diagram of B(G,M, I) ifand only if the following conditions hold:

(i) The Hasse diagram D is a lattice diagram.

(ii) Every∨-irreducible element of D is labeled by some object.

52

Page 59: Formal Concept Analysis - VUB

3. Determination and Representation

(iii) Every∧-irreducible element of D is labeled by some attribute.

(iv) For all objects g ∈ G and for all attributes m ∈ M it holds that gIm if and onlyif γ̃(g) ≤ µ̃(m).

Proof. Suppose D is a correctly labeled Hasse diagram of B(G,M, I). Then, D isde�nitely a lattice diagram since B(G,M, I) is a complete lattice. Recall from theorem2.2.3 that γ(G) is join-dense in B(G,M, I). Hence, a

∨-irreducible concept must be an

object concept. The corresponding element of the diagram is therefore labeled with anobject. In a similar way, condition (iii) can be obtained. Next, let g ∈ G and m ∈ M .Then, by proposition 3.2.1,

gIm ⇐⇒ g ∈ m′ = ext(µ(m)) ⇐⇒ γ(g) ≤ µ(m) ⇐⇒ γ̃(g) ≤ µ̃(m).

Conversely, suppose conditions (i) through (iv) hold. The given Hasse diagram D rep-resents a �nite (hence complete) lattice L according to (i). If we can demonstrate thatL ∼= B(G,M, I), then proposition 1.1.10 yields that both lattices can be represented bythe same diagram, i.e. the Hasse diagram D represents B(G,M, I). First, let α : L→ Dbe the order isomorphism from the elements of the lattice L onto the elements of thelattice diagram. Then, de�ne the following maps:

ϕ : G→ L : g 7→ α−1 (γ̃(g))

andψ : M → L : m 7→ α−1 (µ̃(m)) .

Note that ϕ(G) is the set of elements of L represented in the diagram by an elementwith an object label. By (ii), every

∨-irreducible element of D is labeled by an object.

Hence, J (L) ⊆ ϕ(G). Since J (L) is join-dense in L by proposition 1.2.23, so is ϕ(G).An analogous argument shows that ψ(M) is meet-dense in L. By condition (iv) and thefact that α is an order isomorphism, we have

gIm ⇐⇒ γ̃(g) ≤ µ̃(m) in D ⇐⇒ α−1(γ̃(g)) ≤ α−1(µ̃(m)) in L.

Theorem 2.2.4 now yields L ∼= B(G,M, I) with the complete isomorphism given by

f : L→ B(G,M, I) : x 7→ (Ax, Bx)

withAx = {g ∈ G | ϕ(g) ≤ x} = {g ∈ G | α−1(γ̃(g)) ≤ x}

andBx = {m ∈M | x ≤ ψ(m)} = {m ∈M | x ≤ α−1(µ̃(m))}.

Thus, D is a Hasse diagram of B(G,M, I). We now only need to verify that the labelingof D by the elements of G and M is indeed the correct reduced labeling. For all g ∈ G,we have

f(α−1(γ̃(g))) =({h ∈ G

∣∣∣α−1(γ̃(h)) ≤ α−1(γ̃(g))},{m ∈M

∣∣∣α−1(γ̃(g)) ≤ α−1(µ̃(m))}).

53

Page 60: Formal Concept Analysis - VUB

3. Determination and Representation

Also, by condition (iv), we have

{m ∈M | α−1(γ̃(g)) ≤ α−1(µ̃(m))} = {m ∈M | γ̃(g) ≤ µ̃(m)}= {m ∈M | gIm}= g′

which implies thatf(α−1(γ̃(g))) = (g′′, g′) = γ(g).

In other words, an object concept γ(g) corresponds with the element α−1(γ̃(g)) of L,which is represented in the diagram D by γ̃(g), i.e. by the element of D labeled by g.In a similar way, we can argue the correct labeling of the attribute concepts.

Once we have found all the concepts of a given context (G,M, I) and have drawnthe lattice, we can con�rm that our diagram and its labeling are correct by verifyingconditions (i) through (iv) of the previous theorem. Proposition 1.2.21 helps us torecognize the

∨-irreducible and the

∧-irreducible elements: the elements of the diagram

covering exactly one element are precisely the∨-irreducible elements, those covered by

exactly one element are the∧-irreducible elements of the diagram.

The foregoing theorem also allows us to recover the context from a given (correctlylabeled) diagram. The object set G consists precisely of the labels placed below theircorresponding circles while the labels placed above their corresponding circles make upthe attribute set M . The incidence relation I can be found based on condition (iv) ofprevious theorem: gIm if and only if there exists an ascending path in the diagram fromthe circle labeled with g to the circle labeled with m.

Figure 3.4: Left: a lattice diagram that is not a correctly labeled concept latticediagram. Right: a concept lattice diagram with correct reduced labeling.

3.2.5 Example. The lattices shown in �gure 3.42 are labeled with object labels A,B,C,D,E, F,G and attribute labels 1, 2, 3, 4, 5, 6, 7. The lattice diagram on the left does not

2These diagrams are taken from exercise 3.3 and �gure 3.4 from [4].

54

Page 61: Formal Concept Analysis - VUB

3. Determination and Representation

represent a concept lattice since the element labeled with D is∧-irreducible element

lacking an attribute label. The diagram on the right however, satis�es conditions (i)through (iv) of theorem 3.2.4 and is therefore a correctly labeled concept lattice diagram.In fact, it represents the concept lattice of the context given in �gure 3.5.

1 2 3 4 5 6 7A × × × × ×B × × × × × ×C × × ×D × × × ×E × × × ×F × ×G × ×

Figure 3.5: Context generating the concept lattice on the right side of �gure 3.4.

Nested line diagrams originate from partitions of the set of attributes. They provideus with a practicable method for manually determining a concept lattice diagram. Thefollowing theorem lays out the groundwork.

3.2.6 Theorem. Let (G,M, I) be a context and let M = M1 ∪M2. The map

ϕ : B(G,M, I) → B(G,M1, I ∩ (G×M1))×B(G,M2, I ∩ (G×M2))

(A,B) 7→((

(B ∩M1)′, B ∩M1

),(

(B ∩M2)′, B ∩M2

))is a join-preserving order-embedding. The component maps

ϕi : B(G,M, I) → B(G,Mi, I ∩ (G×Mi))

(A,B) 7→(

(B ∩Mi)′, B ∩Mi

)are surjective.

Proof. We �rst show that the map ϕ is well-de�ned. If (A,B) is a concept of (G,M, I),then B ∩ Mi is the set of all attributes common to the objects of A in the context(G,Mi, I ∩ (G×Mi)). Thus, B ∩Mi is an intent of this context. Next, let (A,B) and(C,D) be concepts of B(G,M, I) such that (A,B) 6= (C,D). If B ∩M1 = D ∩M1 andB ∩M2 = D ∩M2, we �nd

B = B ∩M= B ∩ (M1 ∪M2)

= (B ∩M1) ∪ (B ∩M2)

= (D ∩M1) ∪ (D ∩M2)

= . . .

= D

55

Page 62: Formal Concept Analysis - VUB

3. Determination and Representation

which is in contradiction with (A,B) 6= (C,D). Consequently, B ∩M1 6= D ∩M1 orB ∩ M2 6= D ∩ M2 which implies that ϕ

((A,B)

)6= ϕ

((C,D)

). Thus, the map ϕ is

injective. Moreover, ϕ is join-preserving:

ϕ

(∨i∈I

(Ai, Bi)

)= ϕ

((⋂i∈I

Bi

)′,⋂i∈I

Bi

)

=

((((⋂i∈I

Bi

)∩M1

)′,(⋂i∈I

Bi

)∩M1

),

(((⋂i∈I

Bi

)∩M2

)′,(⋂i∈I

Bi

)∩M2

))

=

(((⋂i∈I

(Bi ∩M1))′,⋂i∈I

(Bi ∩M1)

),

((⋂i∈I

(Bi ∩M2))′,⋂i∈I

(Bi ∩M2)

))

=∨i∈I

(((Bi ∩M1)

′, Bi ∩M1

),(

(Bi ∩M2)′, Bi ∩M2

))=∨i∈I

ϕ(Ai, Bi)

for all families (Ai, Bi)i∈I in B(G,M, I). We now prove a small claim, which yields thatϕ is an order-embedding: a join-preserving injective map is an order-embedding. Aneasy veri�cation based on the connecting lemma shows the validity of this claim: letf : L→ K be a join-preserving injective map between two lattices, then

x ≤ y ⇐⇒ x∨y = y ⇐⇒ f(x∨y) = f(y) ⇐⇒ f(x)∨f(y) = f(y) ⇐⇒ f(x) ≤ f(y)

for all x, y ∈ L. It remains to be shown that the component maps are surjective.Let C be an intent of (G,Mi, I ∩ (G ×Mi)). For the remainder of this proof, denotethe derivation operators with respect to this context by ι. Deriving C with respect to(G,M, I) yields an intent C ′′ of (G,M, I). Then,

ϕi ((C′, C ′′)) =

((C ′′ ∩Mi)

ι, C ′′ ∩Mi

).

We would like to obtain that C ′′ ∩Mi = C. Let m be an attribute of C ′′ ∩Mi. Notethat C ′ = Cι since C ⊆ Mi. Then, m ∈ C ′′ implies gIm for all objects g in Cι. Also,m ∈ Mi so therefore m ∈ Cιι = C. The other inclusion is trivial. We thus concludethat the component maps ϕi are surjective.

In order to draw a nested line diagram for a given context (G,M, I), we follow four basicsteps:

1. Split up the attribute set3: M = M1∪M2. This union does not have to be disjoint.

2. Find the concept lattices B(G,M1, I ∩ (G×M1)) and B(G,M2, I ∩ (G×M2)) andlabel them with the names of the objects and attributes, as usual.

3For reasons of simplicity, we introduce the technique of nested line diagrams with an attribute setbeing split into two parts, inducing one level of nesting. Generalization to more levels of nesting isstraightforward.

56

Page 63: Formal Concept Analysis - VUB

3. Determination and Representation

3. Place a copy of B(G,M1, I ∩ (G×M1)) in each node of B(G,M2, I ∩ (G×M2))or vice versa.

4. Shade the circles of the inner diagrams corresponding to elements of B(G,M, I).

The last step requires further explanation. Theorem 3.2.6 yields that B(G,M, I) isembedded in the direct product of B(G,M1, I ∩ (G×M1)) and B(G,M2, I ∩ (G×M2))as a

∨-semilattice. Either we �nd all the object intents directly from the context

(G,M, I), enter them into the diagram of the product according to the map ϕ and closeunder suprema, or, if a list of concepts of (G,M, I) was already available, we simplyenter the concepts into the product diagram according to their intents.

Figure 3.6: Concept lattice diagram of the refrigerator context given by �gure 2.1.

3.2.7 Example. Figure 3.6 shows the usual concept lattice diagram of the refrigeratorcontext given by the cross table in �gure 2.1. Figure 3.7 shows the nested line diagram ofthis context with the following (random4) partition of the attribute set: M = {containsseeds, sweet, juicy} ∪ {leathery peel, sour, made from milk, sandwich �lling}. Theproduct lattice diagram serves as an auxiliary structure in which the shaded elementsrepresent the concepts of the refrigerator context. Each line segment between outernodes has to be interpreted as a bundle of parallel line segments connecting respectivepairs of inner nodes.

4Usually, it is recommended that the attribute set is split in a way such that the subsets bearmeaning. Such informative subsets are not always easy to �nd. Many-valued contexts however, lendthemselves in a very natural way to nesting (see [2] and [9]).

57

Page 64: Formal Concept Analysis - VUB

3. Determination and Representation

Figure 3.7: Nested line diagram of the refrigerator context given by �gure 2.1.

58

Page 65: Formal Concept Analysis - VUB

3. Determination and Representation

A nested line diagram can be a helpful tool when confronted with a complex visualiza-tion. It allows us to switch to a visualization consisting of multiple, more comprehensiblecompontents. For example, it can be a daunting task trying to form the concept latticediagram of a large context, let alone, trying to keep the result readable. However, split-ting the attribute set in su�ciently small subsets and employing nested line diagramssimpli�es the task. Indeed, the size of each subdiagram cannot exceed the number ofpossible combinations of attribute values in the corresponding subcontext, regardless ofthe number of objects.

3.3 Implications between Attributes

It is very natural to investigate the implications between certain sets of attributes in acontext. For example, it would be interesting for a doctor to know if a patient presentinga group of symptomes, will necessarily also present certain other symptomes. In thissection, we will formally introduce implications in contexts and look for minimal sets ofimplications which contain all the information in the context.

We will also demonstrate that the concept lattice can be inferred from the attributelogic i.e. the rules between certain sets of attributes. This is particularly convenientwhen we examine contexts with a large object set versus a relatively small attributeset. Instead of having to laboriously write down all the objects, we can simply infer theconcept lattice from the rules between sets of attributes.

De�nitions and basic results

3.3.1 De�nition. An implication between attributes is an ordered pair of subsetsof an attribute set M . We denote an implication (A,B) in M by A → B. When B isa singleton, e.g. B = {m}, we omit the parentheses and write A→ m.

We are interested in whether or not a given implication holds in a context.

3.3.2 De�nitions. Let M be the attribute set of some context.

• A subset T ⊆M respects an implication A→ B if A * T or B ⊆ T .

• If T ⊆M respects an implication A→ B, T is called a model of A→ B.

• A subset T ⊆M respects a set L of implications if T respects every implicationin L.

• If T ⊆M respects a set L of implications, T is called a model of L.

• An implication A→ B holds in a set T of subsets of M if every T ∈ T respectsA→ B.

• An implication A → B holds in a context (G,M, I) if it holds in the set ofobject intents. In this case, we say that A → B is an implication of thecontext (G,M, I) or, equivalently, that A is a premise of B.

59

Page 66: Formal Concept Analysis - VUB

3. Determination and Representation

• The set of all implications of a context (G,M, I) is denoted by imp(G,M, I).

3.3.3 Proposition. An implication A→ B holds in (G,M, I) if and only if B ⊆ A′′. Itthen automatically holds in Bint(G,M, I) as well.

Proof. Let A → B be an implication of the context (G,M, I). We need to show thatB ⊆ A′′. According to proposition 2.1.8, we have

A′′ = (A′)′ =

(⋃g∈A′{g}

)′=⋂g∈A′

g′

and therefore, A ⊆ g′ for all g ∈ A′. Also, A → B holds in (G,M, I), i.e. A * g′ orB ⊆ g′ for all objects g ∈ G. In particular, this implies for all objects g ∈ A′ thatB ⊆ g′. Consequently,

B ⊆⋂g∈A′

g′ = A′′.

Conversely, assume that B ⊆ A′′. We need to show for all objects g ∈ G that A * g′ orB ⊆ g′. Let g be some object. If A * g′, there is nothing left to prove. If, on the otherhand, A ⊆ g′, then A′′ ⊆ g′′′ = g′ according to lemma 2.1.7. By assumption, this yieldsB ⊆ g′.

Suppose A → B holds in (G,M, I). Then B ⊆ A′′ by the �rst part of this proof.For every intent C of (G,M, I), we have either A * C or A ⊆ C. The latter yieldsA′′ ⊆ C ′′ = C by lemma 2.1.7 and therefore B ⊆ C. We conclude that A→ B holds inBint(G,M, I).

The condition B ⊆ A′′ from previous proposition is equivalent with A′ ⊆ B′ by lemma2.1.7. Hence, A → B holds in a context if and only if every object having all theattributes in A must also have all the attributes in B, which is in accordance with ourfamiliar notion of a valid implication.

3.3.4 Example. Consider again the refrigerator context given by the cross table in�gure 2.1. In this context,

{sandwich �lling} → {made from milk} holds since

{sandwich �lling}′′ = {goat cheese}′

= {made from milk, sandwich �lling}⊃ {made from milk},

{leathery peel, juicy} → {contains seeds} holds since

{leathery peel, juicy}′′ = {lemon, orange}′

= {leathery peel, juicy, contains seeds}⊃ {contains seeds},

60

Page 67: Formal Concept Analysis - VUB

3. Determination and Representation

{sour, juicy} → {leathery peel, contains seeds} holds since

{sour, juicy}′′ = {lemon}′

= {leathery peel, sour, juicy, contains seeds}⊃ {leathery peel, contains seeds},

whereas

{juicy} → {sweet} does not hold since

{juicy}′′ = {kiwifruit, lemon, orange, strawberry}′

= {juicy, contains seeds}+ {sweet}.

How can we read o� implications from the concept lattice? As it turns out by thefollowing lemma, we only have to describe the procedure for implications of the formA→ m.

3.3.5 Lemma. A → B holds in (G,M, I) if and only if A → m holds in (G,M, I) foreach m ∈ B.

Proof. By proposition 3.3.3, we have

A→ B holds in (G,M, I) ⇐⇒ B ⊆ A′′

⇐⇒ ∀m ∈ B : {m} ⊆ A′′

⇐⇒ ∀m ∈ B : A→ m holds in (G,M, I).

3.3.6 Proposition. A → m holds in (G,M, I) if and only if (m′,m′′) ≥ (A′, A′′) orequivalently,

µ(m) ≥∧{µ(a) | a ∈ A} .

Proof. By proposition 3.3.3 and lemma 2.1.7, A→ m holds in (G,M, I) if and only ifA′ ⊆ m′. The latter is in turn equivalent with (A′, A′′) ≤ (m′,m′′) = µ(m). Furthermore,since A′ =

⋂a∈A a

′ by proposition 2.1.8, we have

(A′, A′′) ≤ µ(m) ⇐⇒∧a∈A

µ(a) =

( ⋂a∈A

a′,( ⋂a∈A

a′)′)≤ µ(m).

This means that A→ B holds in a context, if, for each m ∈ B, there exists a descendingpath in the concept lattice diagram from the concept labeled by m to the in�mum ofthe concepts labeled by an element of A.

It is sometimes useful for the determination of the implications of a context to switch tothe complementary context , in particular if the complementary context has considerablyfewer concepts than the original one.

61

Page 68: Formal Concept Analysis - VUB

3. Determination and Representation

3.3.7 Proposition. A→ m holds in the context (G,M, I) if and only if in the comple-mentary context (G,M, (G ×M)\I), every object with the attribute m has at least oneattribute n from A.

Proof. Let A → M be an implication in M . It follows from proposition 3.3.3 thatA→ m holds in (G,M, I) if and only if m ∈ A′′. Furthermore, we have

m ∈ A′′ ⇐⇒ A′ ⊆ m′

⇐⇒⋂a∈A

a′ ⊆ m′

⇐⇒ G \ m′ ⊆⋃a∈A

G \ a′

where the latter equivalence is provided by De Morgan's law for set complementation.Now, note that an object g belongs to G \ m′ if and only if g has the attribute m inthe complementary context (G,M, (G×M)\I). Thus, A→ m holds in (G,M, I) if andonly if for every object g having the attribute m in (G,M, (G×M)\I), there exists anattribute a ∈ A such that object g has attribute a in (G,M, (G×M)\I).

The following proposition will show us how we can obtain the concept lattice from theset of implications that hold in the context. To this end, we introduce the symbol H(L)to denote the set of all models of a set L of implications in M . Formally,

H(L) := {X ⊆M | X respects L} .

3.3.8 Proposition. If imp(G,M, I) denotes the set of all implications of a context(G,M, I), then

H(imp(G,M, I)) = Bint(G,M, I).

Proof. Recalling proposition 3.3.3, we have Bint(G,M, I) ⊆ H(imp(G,M, I)). Further-more, we will show that every X ∈ H(imp(G,M, I)) is an intent of (G,M, I). LetX ∈ H(imp(G,M, I)). Note that it is su�cient to show that X ′′ ⊆ X. Proposition 3.3.3easily yields that the implication X → X ′′ holds in (G,M, I), i.e. X → X ′′ belongsto imp(G,M, I). Therefore, X respects X → X ′′. Consequently, X * X or X ′′ ⊆ X,which implies X ′′ ⊆ X and �nishes the proof.

Thus, given the set imp(G,M, I) of all implications of a context, we are able to composethe concept lattice if we can calculate H(imp(G,M, I)). An algorithm, based on the nextproposition, will do just that.

3.3.9 Proposition. If L is a set of implications in M , then H(L) is a closure systemon M .

Proof. Obviously, M ∈ H(L) since B ⊆ M for all implications A → B in M . Let(Xi)i∈I ⊆ H(L). We need to prove that

⋂i∈I Xi respects every implication in L. Let

A→ B be some implication in L. For all i ∈ I, Xi respects A→ B. Hence, A * Xi orB ⊆ Xi for all i ∈ I. We proceed with the proof by considering two exhaustive cases:

62

Page 69: Formal Concept Analysis - VUB

3. Determination and Representation

• If B ⊆ Xi for all i ∈ I, then B ⊆⋂i∈I Xi which shows that

⋂i∈I Xi respects

A→ B.

• If, on the other hand, B * Xj for some j ∈ I, then necessarily A * Xj. Hence,A *

⋂i∈I Xi which shows that

⋂i∈I Xi respects A→ B.

Consequently, H(L) is a closure system on M .

We now describe an algorithm which generates, for a given set L of impliations and for asubset X ⊆M , the smallest model of L which contains X. First, we de�ne for X ⊆M ,

ϕL(X) := X ∪⋃{B | A→ B ∈ L, A ⊆ X}.

We would like to iterate the operator ϕL on X until we obtain a �xed point. Since Mcan be in�nite, we may need to iterate ad in�nitum.5 Formally, we write

• ϕ0L(X) := X,

• ϕα+1L (X) := ϕL(ϕαL(X)) for all ordinals α,

• ϕβL(X) :=⋃α<β ϕ

αL(X) for all limit ordinals β.

3.3.10 Lemma. P (α) : β < α⇒ ϕβL(X) ⊆ ϕαL(X) holds for all ordinals α.

Proof. This can easily be shown by trans�nite induction. P (0) trivially holds since inthis case, there is nothing to prove. Also, note that P (α) automatically holds for limitordinals α 6= 0. Finally, assume that P (α) holds for some ordinal α. Then,

η < α + 1 =⇒ η ≤ α =⇒ ϕηL(X) ⊆ ϕαL(X) ⊆ ϕα+1L (X)

i.e. P (α + 1) holds.

If moreoverP̃ (α) : β < α⇒ ϕβL(X) ⊂ ϕαL(X)

holds for all ordinals, thenf : α 7→ ϕαL(X)

de�nes an injective map from ORD := {α | α ordinal} to P(M). Hence, there exists abijection between ORD and f(ORD). The latter is a set by the axiom of comprehension.Therefore, ORD must also be a set by the replacement axiom. This is in contradictionwith the Burali-Forti paradox which states that ORD is a proper class (i.e. a classwhich is not a set).6

Consequently, there are ordinals α and β such that α < β and

ϕαL(X) = ϕβL(X).

5See [10] for more information on the following results.6In order to formally discuss classes, we need the Von Neumann-Bernays-Gödel set theory.

63

Page 70: Formal Concept Analysis - VUB

3. Determination and Representation

Also, ϕαL(X) ⊆ ϕα+1L (X) ⊆ ϕβL(X) by lemma 3.3.10. Therefore, there exists an ordinal

α such thatϕα+1L (X) = ϕαL(X).

Due to the fact that the class of ordinals ORD is well-ordered, we are able to de�ne

αX := min{α ∈ ORD | ϕα+1L (X) = ϕαL(X)}.

ThenL(X) := ϕαX

L (X)

de�nes the �rst �xed point of the iteration. The next proposition then shows that L(X)is the smallest model of L which contains X.

3.3.11 Proposition. Let L be a set of implications in M . The closure operator associ-ated with the closure system H(L) is given by X 7→ L(X).

Proof. Extensity is clearly satis�ed since, by lemma 3.3.10, we have

X = ϕ0L(X) ⊆ ϕαX

L (X) = L(X).

Next, we show thatP (α) : X ⊆ Y ⇒ ϕαL(X) ⊆ ϕαL(Y )

holds for all ordinals α by trans�nite induction. First, note that P (0) trivially holds.Secondly, assume that P (α) holds. If X ⊆ Y then,

ϕα+1L (X) = ϕαL(X) ∪

⋃{B | A→ B ∈ L, A ⊆ ϕαL(X)}

⊆ ϕαL(Y ) ∪⋃{B | A→ B ∈ L, A ⊆ ϕαL(Y )}

= ϕα+1L (Y ).

Thirdly, let β 6= 0 be a limit ordinal and assume that P (α) holds for all ordinals α < β.If X ⊆ Y then, ϕαL(X) ⊆ ϕαL(Y ) for all ordinals α < β which immediately yields

ϕβL(X) =⋃α<β

ϕαL(X) ⊆⋃α<β

ϕαL(Y ) = ϕβL(Y ).

This concludes the proof of the property P (α) for all ordinals α.

Since X ⊆ Y implies X ⊆ L(Y ) by extensity and since ϕL(L(Y )) = L(Y ), we then �nd

L(X) = ϕαXL (X) ⊆ ϕαX

L (L(Y )) = L(Y )

which shows the monotony of X 7→ L(X). Moreover, the operator X 7→ L(X) satis�esidempotency:

L(L(X)) = L(X)

since ϕL(L(X)) = L(X) by de�nition of L(X). Therefore, X 7→ L(X) is a closureoperator on M . In fact, it is the closure operator associated with H(L) since

Y ∈ H(L) ⇐⇒ Y respects L ⇐⇒ L(Y ) = Y ⇐⇒ Y ∈ {L(X) | X ⊆M}.

64

Page 71: Formal Concept Analysis - VUB

3. Determination and Representation

Figure 3.8 shows pseudocode for the L-closure algorithm. It of course, supposes a�nite attribute set M . The code is pretty much self-explanatory, except perhaps for afew lines which could use some clari�cation.

2-7: For all x ∈ M , avoid [x] will contain the numbers of the implications A → Bfrom L for which x /∈ A.

14: The number of an implication A→ B from L belongs to usable_imps if and onlyif for all x ∈ M\newclosure , x /∈ A. Thus, usable_imps contains the numbersof the implications A→ B for which A ⊆ newclosure .

15: use_now_imps removes the numbers of the implications which were already usedin the previous run of the while loop to obtain newclosure .

Algorithm L-closure.input: A list L := [L[1], . . . ,L[n]] of implications inM and a set X ⊆M .output: L(X)

1: begin

2: for all x ∈M do

3: begin

4: avoid [x] := {1, . . . , n};5: for i := 1 to n with A→ B := L[i] do6: if x ∈ A then avoid [x] := avoid [x]\{i};7: end;

8: used_imps := ∅;9: old_closure := ∅;10: new_closure := X;

11: while new_closure 6= old_closure do

12: begin

13: T := M \ new_closure ;

14: usable_imps :=⋂x∈T avoid [x];

15: use_now_imps := usable_imps \ used_imps ;

16: used_imps := usable_imps ;

17: old_closure := new_closure ;

18: for all i ∈ use_now_imps with A→ B := L[i] do19: new_closure := new_closure

⋃B;

20: end;

21: L(X) := new_closure ;

22: end.

Figure 3.8: Pseudocode for the L-closure algorithm.

If L is the set of all implications of a context (G,M, I) with a �nite attribute set, we

65

Page 72: Formal Concept Analysis - VUB

3. Determination and Representation

can calculate Bint(G,M, I) = H(L) by applying the AllClosures algorithm describedin �gure 3.2 with the closure operator X 7→ L(X).

Conversely, it is possible to construct a context for a given set of implications L suchthat the intents of this context are precisely the sets respecting L.

3.3.12 Proposition. For a given set of implications L in M , the intents of the context

(H(L),M,3)

are precisely the sets respecting L.

Proof. Let L be a set of implications in M and consider the context (H(L),M,3). ForX ⊆M , we have

X ′ = {Y ∈ H(L) | Y 3 m,∀m ∈ X} = {Y ∈ H(L) | Y ⊇ X}

and thus

X ′′ = {m ∈M | Y 3 m,∀Y ∈ X ′}= {m ∈M | Y 3 m,∀Y ∈ H(L) with Y ⊇ X}=

⋂{Y ∈ H(L) | X ⊆ Y }.

Since H(L) is a closure system, the latter belongs to H(L). Now,

X = X ′′ ⇐⇒ X =⋂{Y ∈ H(L) | X ⊆ Y } ⇐⇒ X ∈ H(L)

yielding Bint(H(L),M,3) = H(L).

Moreover, this context has the property that, in addition to L, all implications whichfollow semantically from L also hold in this context.

3.3.13 De�nition. An implication A→ B in M follows (semantically) from a set Lof implications inM if every subset ofM respecting L also respects A→ B. If it is clearto which attribute set is being referred, we write L � A → B to denote that A → Bfollows semantically from L.

Clearly, an implication A→ B follows semantically from a set of implications L if andonly if H(L) = H(L ∪ {A→ B}).

3.3.14 Proposition. Let L be a set of implications in M . All implications which followfrom L (including L itself) hold in (H(L),M,3). Moreover, every implication that holdsin (H(L),M,3), follows semantically from L.

Proof. To show that L holds in (H(L),M,3), we need to show that every object intentof this context respects L. Let X ∈ H(L) be some object. Then,

X ′ = {m ∈M | X 3 m} = X.

So, every object intent belongs to H(L) and therefore respects L. Next, let A→ B be animplication which follows from L, i.e., H(L) ⊆ H({A→ B}). We already demonstrated

66

Page 73: Formal Concept Analysis - VUB

3. Determination and Representation

that every object intent belongs to H(L) and therefore also to H({A→ B}). This showsthat A→ B holds in (H(L),M,3).

Conversely, let A→ B be an implication which holds in (H(L),M,3). Then, by propo-sitions 3.3.3 and 3.3.12, A→ B holds in

Bint(H(L),M,3) = H(L).

Therefore, each set T ⊆ M which respects L also respects A → B, or, in other words,A→ B follows from L.

Closed sets of implications

Closed sets of implications are de�ned semantically:

3.3.15 De�nition. A set L of implications is closed if every implication followingfrom L is already contained in L.

A syntactic characterization for closed sets of implications is provided by theorem 3.3.16.It was �rst formulated in 1974 by William W. Armstrong (see [11]) as a set of inferencerules used to derive all functional dependencies in a relational database. An elaborateand comprehensive account of the subject can be found in David Maier's book [12] onthe theory of relational databases.

3.3.16 Theorem. Let L be a set of implications in an attribute set M . If L is closed,then the following properties are satis�ed: 7

re�exivity: ∀X ⊆M : X → X ∈ L,

augmentation: ∀X, Y, Z ⊆M : If X → Y ∈ L, then X ∪ Z → Y ∈ L,

pseudo-transitivity: ∀W,X, Y, Z ⊆M : If X → Y ∈ L and Y ∪Z → W ∈ L, thenX ∪ Z → W ∈ L.

If M is �nite and if the properties of re�exivity, augmentation and pseudo-transitivityare satis�ed, then L is closed.

Proof. Let L be a closed set of implications in an attribute set M and let T ⊆M be amodel of L. It can easily be seen that every subset of M (and T in particular) respectseach implication of the form X → X. Hence, L � X → X for all subsets X ⊆M whichyields re�exivity since L is closed. Next, assume that X → Y is an implication of Land let Z ⊆ M . If X ∪ Z ⊆ T , then surely X ⊆ T . Hence, Y ⊆ T since T is a modelof X → Y . Consequently, L � X ∪ Z → Y if X → Y ∈ L. Thus, augmentation holdssince L is closed. Finally, if both X → Y and Y ∪ Z → W are implications in L andif X ∪ Z ⊆ T , then Y ⊆ T since X ⊆ T . Also, Z ⊆ T and therefore Y ∪ Z ⊆ T whichimplies W ⊆ T . This proves that L � X ∪Z → W if X → Y ∈ L and Y ∪Z → W ∈ L.Since L is closed, pseudo-transitivity holds.

7The inference rules re�exivity, augmentation and pseudo-transitivity are known as Armstrong's

axioms of dependency in a relational database.

67

Page 74: Formal Concept Analysis - VUB

3. Determination and Representation

Conversely, assume that M is �nite and that re�exivity, augmentation and pseudo-transitivity are satis�ed. Let X → Y be an implication which does not belong to L.We will show that L 2 X → Y , i.e. that L is closed, by constructing a model of L thatdoes not respect X → Y . First, we prove two additional properties, which follow fromre�exivity, augmentation and pseudo-transitivity:

additivity: ∀X, Y, Z ⊆M : If X → Y ∈ L and X → Z ∈ L, then X → Y ∪ Z ∈ L.By re�exivity, Y ∪Z → Y ∪Z ∈ L. If X → Y ∈ L, then pseudo-transitivity yieldsX∪Z → Y ∪Z ∈ L. If alsoX → Z ∈ L, another application of pseudo-transitivityyields X → Y ∪ Z ∈ L.

projectivity : ∀X, Y, Z ⊆M : If X → Y ∪ Z ∈ L, then X → Y ∈ L.By re�exivity, Y → Y ∈ L and by augmentation, Y ∪ Z → Y ∈ L. Clearly, ifX → Y ∪ Z ∈ L then pseudo-transitivity yields X → Y ∈ L.

Let T be the union of all sets Z ⊆M such that X → Z ∈ L, i.e.

T :=⋃{Z ⊆M | X → Z ∈ L}.

Since M is �nite, X → T ∈ L by additivity. If Y ⊆ T , then projectivity would yieldX → Y ∈ L: a contradiction. Therefore, Y * T . Also, X → X ∈ L by re�exivity.Hence, X ⊆ T whereas Y * T which shows that T does not respect X → Y .

Furthermore, let A → B be some implication in L. T trivially respects A → B ifA * T . Thus, assume that A ⊆ T . Since A → A ∈ L by re�exivity, augmentationyields T → A ∈ L. It then follows from pseudo-transitivity that T → B ∈ L. Sincealso X → T ∈ L, another application of pseudo-transitivity yields X → B ∈ L. Then,B ⊆ T by de�nition of T , which shows that T respects A→ B.

If M is in�nite, a set of implications in M which satis�es the properties of re�exivity,augmentation and pseudo-transitivity is not necessarily closed, as shown by the followingexample.

3.3.17 Example. Let L be the set of implications in R de�ned by

L := {Y → X ∪ E | E ⊆ R, E �nite, X ⊆ Y ⊆ R}.

It is easy to see that L satis�es re�exivity. Also, if Y → X ∪ E ∈ L with E a�nite subset of R and X ⊆ Y ⊆ R, then Y ∪ Z → X ∪ E ∈ L for all Z ⊆ Rsince clearly X ⊆ Y ⊆ Y ∪ Z ⊆ R. Hence, augmentation is satis�ed. Furthermore, letY → X1 ∪ E1 ∈ L with E1 a �nite subset of R and X1 ⊆ Y ⊆ R and let X1 ∪E1 ∪Z →X2∪E2 ∈ L with E2 a �nite subset of R and X2 ⊆ X1∪E1∪Z ⊆ R. We will show that

Y ∪ Z → X2 ∪ E2 ∈ L,

i.e. that pseudo-transitivity is satis�ed. First, we rewrite X2 ∪ E2 as follows:

X2 ∪ E2 = (X2\E1) ∪ ((E1 ∩X2) ∪ E2).

68

Page 75: Formal Concept Analysis - VUB

3. Determination and Representation

Obviously, (E1 ∩ X2) ∪ E2 is �nite. Also, X2\E1 ⊆ X1 ∪ Z since X2 ⊆ X1 ∪ E1 ∪ Z.Moreover, X1 ⊆ Y yields X2\E1 ⊆ Y ∪ Z. Consequently,

Y ∪ Z → X2 ∪ E2 = Y ∪ Z → (X2\E1) ∪ ((E1 ∩X2) ∪ E2) ∈ L.

Thus, L satis�es pseudo-transitivity in addition to re�exivity and augmentation. Onthe other hand, L is not closed. We will prove this by showing that

L � {0} → R

while {0} → R /∈ L. Let T ⊆ R be a model of L. Then, T must respect all implicationsin L and in particular, all implications of the form ∅→ {x} with x ∈ R. Since ∅ ⊆ Tis trivially satis�ed, this implies that {x} ⊆ T for all x ∈ R. Thus, T = R, i.e. the onlymodel of L is R. Note that R respects {0} → R which yields

L � {0} → R.

Also, {0} → R /∈ L since R cannot be written as the union of a subset of {0} and a�nite subset of R.

The set of all implications of a context provides a canonical example of a closed set ofimplications.

3.3.18 Proposition. The set imp(G,M, I) of all implications of a context (G,M, I) isclosed.

Proof. Let (G,M, I) be a context and let A→ B be an implication inM which followsfrom imp(G,M, I). Then, by proposition 3.3.8, we have

H(imp(G,M, I) ∪ {A→ B}) = H(imp(G,M, I)) = Bint(G,M, I).

Hence, every object intent respects A→ B, or equivalently, A→ B holds in (G,M, I).This shows that A→ B ∈ imp(G,M, I) and therefore that imp(G,M, I) is closed.

In preparation of the next result, we de�ne an operator ϕA which we will iteratively applyon a set L of implications in a �nite attribute setM until we obtain a set of implicationswhich contains L and satis�es Armstrong's axioms of re�exivity, augmentation andpseudo-transitivity:

ϕA(L) := L ∪⋃{X → X | X ⊆M} ∪

⋃{X ∪ Z → Y | X → Y ∈ L, Z ⊆M}

∪⋃{X ∪ Z → W | X → Y ∈ L, Y ∪ Z → W ∈ L}.

Again, we writeϕ0A(L) := L

andϕn+1A (L) := ϕA

(ϕnA(L)

)for all n ∈ N.

69

Page 76: Formal Concept Analysis - VUB

3. Determination and Representation

3.3.19 Proposition. Let L be a set of implications in a �nite attribute set M and letX → Y be an implication in M . Then, the following equivalence holds:

L � X → Y ⇐⇒ ∃n ∈ N : X → Y ∈ ϕnA(L).

Proof. Let X → Y ∈ ϕnA(L) for some n ∈ N. First, note that

ϕA(imp(G,M, I)) = imp(G,M, I)

by theorem 3.3.16 and proposition 3.3.18. Secondly, recall from proposition 3.3.14 that

L ⊆ imp(H(L),M,3).

Since ϕA satis�es monotony (this can easily be seen), this yields

ϕnA(L) ⊆ ϕnA(imp(H(L),M,3)

)= imp(H(L),M,3)

for all n ∈ N. Hence, L � X → Y by proposition 3.3.14.

Conversely, note that there exists a number n ∈ N such that ϕn+1A (L) = ϕnA(L) due to

the �niteness of M . Denote the smallest number for which this condition is satis�edby m. Then, ϕmA(L) is closed by theorem 3.3.16. Hence, every implication that followssemantically from ϕmA(L) must belong to ϕmA(L). Now, let X → Y be an implicationthat follows semantically from L, i.e. L � X → Y . Since L ⊆ ϕmA(L), this implies

ϕmA(L) � X → Y.

Thus, X → Y ∈ ϕmA(L).

This proposition states that an implication follows from other implications of a contextwith a �nite attribute set if and only if it can be derived from these implications bysuccessive applications of Armstrong's syntactic inference rules. This shows that, if Mis �nite, semantic and syntactic inference coincide.

If one wishes to prove that an implicationX → Y follows from a set L of implications, heor she could attempt to derive X → Y from L by successive applications of Armstrong'sinference rules. This is perhaps not the best strategy. The next proposition provides anfairly easy method to check whether or not L � X → Y .

3.3.20 Proposition. An implication X → Y follows from a set L of implications if andonly if Y ⊆ L(X), where X 7→ L(X) is the closure operator described in proposition3.3.11.

Proof. Assume that Y * L(X). Clearly however, X ⊆ L(X). Therefore, L(X) doesnot respect X → Y whereas L(X) does respect L. Thus,

L 2 X → Y.

Conversely, note that every model of L which contains X, must contain ϕL(X) andthus, by induction8, must contain L(X). So, if Y ⊆ L(X), then every model of L whichcontains X necessarily contains Y . This shows that

L � X → Y.8This induction is possibly trans�nite.

70

Page 77: Formal Concept Analysis - VUB

3. Determination and Representation

Complete sets of implications

We are now interested in leaving out the implications from imp(G,M, I) which can beinferred from other ones, that is, in �nding a complete set of implications.

3.3.21 De�nition. A set K of implications of a context (G,M, I) is complete if everyimplication of (G,M, I) follows from K.

The following propositions states that, in order to prove that a set K of implications iscomplete, one has to show that every model of K is an intent.

3.3.22 Proposition. A set K of implications of a context (G,M, I) is complete if andonly if

H(K) ⊆ Bint(G,M, I).

Proof. K is a complete set of implications if and only if every implication A → B of(G,M, I) follows semantically from K. In other words, if and only if every model of Kis a model of imp(G,M, I). The latter is equivalent with

H(K) ⊆ H(imp(G,M, I)).

Recall now from proposition 3.3.8 that H(imp(G,M, I)) = Bint(G,M, I). This �nishesthe proof.

3.3.23 Corollary. The set of all implications of a context is complete.

Proof. This follows immediately from propositions 3.3.8 and 3.3.22.

In order to �nd a complete set of implications, we can systematically leave out theimplications that hold in any context. For example, A → B holds whenever B ⊆ A.Moreover, we can remove the implications that trivially follow from others. For example,if C ⊆ B, then A→ B � A→ C. Also,

{Aj → Bj | j ∈ J} �⋃j∈J

Aj →⋃j∈J

Bj.

We demonstrate the latter. Let T ⊆ M be a set respecting {Aj → Bj | j ∈ J}, that is,Aj * T or Bj ⊆ T for each j ∈ J . Either, there exists an index j such that Aj * T ,in which case

⋃j∈J Aj * T , or, Aj ⊆ T for all j ∈ J , yielding

⋃j∈J Bj ⊆ T . Clearly,

T respects⋃j∈J Aj →

⋃j∈J Bj.

Eventually, after eliminating all such implications from imp(G,M, I), certain implica-tions with a proper premise remain.

3.3.24 De�nition. For a set of attributes A ⊆M in a context (G,M, I), we de�ne

A• := A′′ \

(A ∪

⋃n∈A

(A\{n})′′).

71

Page 78: Formal Concept Analysis - VUB

3. Determination and Representation

In other words, A• denotes the set of attributes contained in A′′ but not in A or in theclosure of any proper subset of A. We call A a proper premise if A• 6= ∅, i.e. if

A′′ 6= A ∪⋃n∈A

(A\{n})′′.

In particular, ∅ is a proper premise if ∅′′ 6= ∅.

3.3.25 Lemma. Let (G,M, I) be a context. If T is a �nite subset of M , then

T ′′ = T ∪⋃{A• | A is a proper premise with A ⊆ T}.

Proof. If T = T ′′, the assertion is trivial. Assume on the other hand that T ⊂ T ′′. Letm be some attribute in T ′′\T and choose a subset A ⊆ T which is minimal with respectto the property m ∈ A′′. Then, m /∈ (A\{n})′′ for all attributes n ∈ A. Also, m /∈ Asince m /∈ T . Therefore, m ∈ A•, which proves that A is a proper premise and yields

T ′′ ⊆ T ∪⋃{A• | A is a proper premise with A ⊆ T}.

The other inclusion follows trivially from the fact that T ⊆ T ′′ and A• ⊆ A′′ ⊆ T ′′ forevery subset A ⊆ T .

3.3.26 Theorem. The set of implications

{A→ A• | A proper premise}

of a context with a �nite attribute set is complete.

Proof. Recall that, in order to show that A := {A → A• | A proper premise} iscomplete, we need to show that every model T ⊆ M of A is an intent. Let T be asubset of the �nite attribute set M . If T respects every implication of the form A→ A•

with A a proper premise, then for subsets A of T , it follows that A• ⊆ T . Hence, theforegoing lemma yields

T ′′ = T ∪⋃{A• | A is a proper premise with A ⊆ T} = T,

which shows that T is an intent.

3.3.27 De�nition. In a context (G,M, I), an attribute set P is called a proper premiseof an attribute m if P is a proper premise and m ∈ P •. In this case, P → m holds in(G,M, I) since m ∈ P ′′.

The following proposition allows us to determine the proper premises of a doubly foundedcontext by means of the arrow relation ↙, de�ned in 2.3.13.

3.3.28 Proposition. Let (G,M, I) be a doubly founded context with P ⊆M and m ∈M .Then,

72

Page 79: Formal Concept Analysis - VUB

3. Determination and Representation

(i) P is a premise of m if and only if

(M\g′) ∩ P 6= ∅

holds for all g ∈ G with g ↙ m.

(ii) P is a proper premise of m if and only if m /∈ P and P is minimal with respect tothe property that

(M\g′) ∩ P 6= ∅

holds for all g ∈ G with g ↙ m.

Proof. Let (G,M, I) be a doubly founded context. Note that the following equivalencesa priori hold in any context, for every set of attributes P and every attribute m:

m /∈ P ′′ ⇐⇒ P ′ * m′ ⇐⇒ ∃h ∈ P ′ : h��Im.

Moreover, for all objects g and sets of attributes P , we have

P ⊆ g′ ⇐⇒ (M\g′) ∩ P = ∅.

(i) Suppose that P is not a premise of m, i.e. P → m does not hold (G,M, I). Byproposition 3.3.3, we have m /∈ P ′′. Then, by the foregoing equivalences, thereexists an object h ∈ P ′ such that h��Im. Since (G,M, I) is doubly founded, there isan object g ∈ G such that g ↙ m and h′ ⊆ g′. Also, P ⊆ P ′′ ⊆ h′ by lemma 2.1.7,which yields P ⊆ g′. Hence, (M\g′) ∩ P = ∅.

Conversely, suppose that there exists an object g ∈ G such that g ↙ m and

(M\g′) ∩ P = ∅.

Clearly, P ⊆ g′ which yields P ′′ ⊆ g′ by lemma 2.1.7. Also, m /∈ g′ since g ↙ m.Thus, m /∈ P ′′. Consequently, it follows from proposition 3.3.3 that P → m doesnot hold in (G,M, I), or, in other words, P is not a premise of m.

(ii) Let P be a proper premise of an attribute m. Then, m ∈ P • which implies m /∈ Pand m ∈ P ′′. Proposition 3.3.3 now yields that P is a premise of m, and thus bypart (i),

(M\g′) ∩ P 6= ∅

for all g ∈ G with g ↙ m. Moreover, P is minimal with this property. Indeed, letS be a proper subset of P , i.e.

∃n ∈ P : S ⊆ P\{n}.

Then, lemma 2.1.7 yields S ′′ ⊆ (P\{n})′′ and since m ∈ P • we have m /∈ S ′′. Itnow follows from the equivalences at the beginning of the proof that there existsan object h ∈ S ′ such that h��Im. Since (G,M, I) is doubly founded, there is anobject g ∈ G such that g ↙ m and h′ ⊆ g′. Note that S ⊆ S ′′ ⊆ h′, hence S ⊆ g′.Thus, (M\g′) ∩ S = ∅.

73

Page 80: Formal Concept Analysis - VUB

3. Determination and Representation

Conversely, suppose that m /∈ P and P is minimal with respect to the propertythat

(M\g′) ∩ P 6= ∅

for all g ∈ G with g ↙ m. We will show that m ∈ P •, from which it immediatelyfollows that P is a proper premise of m. By assumption, m /∈ P . Also, P is apremise of m by part (i) and therefore m ∈ P ′′. Since (G,M, I) is doubly founded,there exists an object g ∈ G such that g ↙ m and thus

(M\g′) ∩ P 6= ∅.

Therefore, P is not empty. Let n be an attribute in P . Then P\{n} is aproper subset of P . Hence, there exists an object g ∈ G such that g ↙ m and(M\g′) ∩ (P\{n}) = ∅ which yields m /∈ g′ and P\{n} ⊆ g′ respectively. Thelatter is equivalent with (P\{n})′′ ⊆ g′. Thus, m /∈ (P\{n})′′. We conclude thatm ∈ P •.

According to this proposition, we obtain the proper premises by determining for everyattribute m the attribute sets P which are minimal with respect to the property that

(M\g′) ∩ P 6= ∅

holds for all g ∈ G with g ↙ m.

The Stem Base

The complete set of implications introduced in theorem 3.3.26 is in general still redun-dant.

3.3.29 De�nition. A set L of implications of a context is called non-redundant ifnone of the implications follow from the others.

3.3.30 De�nition. A non-redundant and complete set of implications of a context iscalled an implicational base9 .

Guigues and Duquenne [14] have shown that there is a natural implicational base forevery context with a �nite attribute set. During the remainder of this section, we willassume the attribute set M to be �nite. This allows us to recursively10 de�ne pseudo-intents, the basic ingredient of this important result.

3.3.31 De�nition. A set of attributes P ⊆M is called a pseudo-intent11 of (G,M, I) ifand only if P 6= P ′′ and Q′′ ⊆ P holds for every pseudo-intent Q ⊂ P .

9Observe the analogy with the de�nition of a basis of a vector space V as a linearly independentsubset of V that generates V .

10Recursive with respect to set inclusion.11Compare this de�nition with the following recursive de�nition of primes: A natural number is

prime if and only if it is greater than 1 and not divisible by any smaller prime.

74

Page 81: Formal Concept Analysis - VUB

3. Determination and Representation

3.3.32 Theorem. The set of implications

L := {P → P ′′ | P pseudo-intent}

is non-redundant and complete, i.e. it is an implicational base.

Proof. The condition in proposition 3.3.3 is trivially satistied for all implications in L.Hence, L ⊆ imp(G,M, I). In order to show that L is complete, we have to show thatevery model T ⊆M of L is an intent. Assume that T 6= T ′′. For every pseudo-intent Qwhich is a strict subset of T , it holds that Q′′ ⊆ T since T respects L. Hence, T itselfis a pseudo-intent. Therefore, the implication T → T ′′ belongs to L. Yet, T does notrespect T → T ′′ since T ′′ * T . Contradition.

In order to show that L is non-redundant, we consider an arbitrary pseudo-intent P andshow that L\{P → P ′′} 2 P → P ′′. It is easy to see that P respects every implicationQ→ Q′′ in L\{P → P ′′}: Q ⊂ P implies Q′′ ⊆ P by de�nition of the pseudo-intent P .On the other hand, P does not respect P → P ′′ since P ′′ * P .

This implicational base is called the Duquenne-Guigues-Basis or simply the stembase of the attribute implications. Usually, the implications are stated in the form

P → P ′′\P

rather than P → P ′′.

In order to �nd the stem base, we need to somehow generate all the pseudo-intents. Adirect utilization of the recursive de�nition in 3.3.31 is theoretically possible since M is�nite. We will develop a more convenient method which will generate the pseudo-intentsin lectic order.

3.3.33 De�nition. A set of attributes Q is called a quasi-intent if Q is a pseudo-intentor an intent.

3.3.34 Proposition. Q is a quasi-intent if and only if Q satis�es the following condition:

If P is a pseudo-intent such that P ⊂ Q, then P ′′ ⊆ Q.

Proof. Let Q be a quasi-intent and let P be a pseudo-intent such that P ⊂ Q. If Q isan intent, then

P ′′ ⊆ Q′′ = Q.

If Q is a pseudo-intent, then the condition is trivially satis�ed. Conversely, assume thatthe condition is satis�ed. If Q 6= Q′′, then Q is a pseudo-intent. If Q = Q′′, Q is anintent. Either way, Q proves to be a quasi-intent.

3.3.35 Proposition. If P and Q are quasi-intents with P * Q and Q * P , then P ∩Qis an intent.

75

Page 82: Formal Concept Analysis - VUB

3. Determination and Representation

Proof. Let L be the stem base of some context (G,M, I) and let T → T ′′ be animplication in L. Each intent P respects T → T ′′ since T ⊆ P implies T ′′ ⊆ P ′′ = P .Every pseudo-intent Q (with the exception of T itself) also respects T → T ′′: T ⊂ Qimplies T ′′ ⊆ Q since both T and Q are pseudo-intents. The fact that T does notrespect T → T ′′ is an immediate consequence of the de�nition of a pseudo-intent. Now,let P and Q be quasi-intents with P * Q and Q * P . We will show that P ∩ Q is anintent. It can easily be seen that the intersection of two sets respecting a certain set ofimplications J , also respects J . Ergo, P ∩ Q respects every implication in L, exceptperhaps P → P ′′ or Q → Q′′. Furthermore, P * P ∩ Q and Q * P ∩ Q which showsthat P ∩ Q does respect P → P ′′ and Q → Q′′. Thus, P ∩ Q respects L. Recall thatthe stem base L is complete, therefore, H(L) ⊆ Bint(G,M, I). This shows that P ∩Q isan intent.

3.3.36 Corollary. The set of all quasi-intents of a context is a closure system on theattribute set.

Proof. The attribute set M itself is a (quasi-)intent: both M ′′ ⊆ M and M ⊆ M ′′

hold. Let P and Q be quasi-intents. If P ⊆ Q or Q ⊆ P , then P ∩ Q obviously is aquasi-intent. If, on the other hand, P * Q and Q * P , then P ∩ Q is an intent (andthus a quasi-intent) by the previous proposition.

The closure operator generating the closure system of quasi-intents can be formulatedby means of the condition in proposition 3.3.34. Let L be the stem base. For X ⊆ M ,we de�ne

ϕ•(X) := X ∪⋃{P ′′ | P → P ′′ ∈ L, P ⊂ X}.

Also, we writeϕ0•(X) := X

andϕn+1• (X) := ϕ•

(ϕn• (X)

)for all n ∈ N. The operator ϕ• is iteratively applied on X until we obtain a set ϕn• (X)such that

ϕn+1• (X) = ϕn• (X).

De�ne this set by L•(X). It is the smallest quasi-intent containing X, as shown by thefollowing proposition.

3.3.37 Proposition. The closure operator associated with the closure system of quasi-intents is given by X → L•(X).

Proof. First, we show that X 7→ L•(X) is well-de�ned. Let X ⊆M . If

ϕn+1• (X) 6= ϕn• (X)

for all n ∈ N, then

X = ϕ0•(X) ⊂ ϕ1

•(X) ⊂ . . . ⊂ ϕn• (X) ⊂ ϕn+1• (X) ⊂ . . . ,

76

Page 83: Formal Concept Analysis - VUB

3. Determination and Representation

is a strictly ascending chain in P(M). Since M is �nite, this is not possible. Secondly,note that L•(X) contains X by construction of ϕ•. Therefore, the operator X 7→ L•(X)satis�es extensity. Also, for X ⊆ Y ⊆M , we have ϕ•(X) ⊆ ϕ•(Y ) and hence,

ϕn• (X) ⊆ ϕn• (Y )

for all n ∈ N. Let nX ∈ N be the smallest number which satis�es

ϕn+1• (X) = ϕn• (X)

and de�ne nY correspondingly. Then,

L•(X) = ϕnX• (X) ⊆ ϕmax{nX ,nY }

• (X) ⊆ ϕmax{nX ,nY }• (Y ) = ϕnY

• (Y ) = L•(Y )

which shows that monotony is satis�ed. Idempotency is also satis�ed:

L•(L•(X)) = L•(X)

since ϕ•(L•(X)) = L•(X) by de�nition of L•(X). Thus, X → L•(X) is a closureoperator on M . Moreover, it is the closure operator associated with the closure systemof quasi-intents. Indeed, for Q ⊆M we have,

Q quasi-intent ⇐⇒ P ′′ ⊆ Q for all pseudo-intents P for which P ⊂ Q

⇐⇒ P ′′ ⊆ Q for all P → P ′′ ∈ L with P ⊂ Q

⇐⇒ L•(Q) = Q

where L denotes the stem base. This shows that

{L•(X) | X ⊆M} = {Q ⊆M | Q quasi-intent}

and �nishes the proof.

To calculate the stem base L, we will use the NextClosure algorithm (see 3.1.8) withthe closure operator X 7→ L•(X) to generate the quasi-intents in lectic order and wewill record only those that are not intents. Note that we use the stem base in orderto generate the stem base. This might seem odd, but it works nevertheless due tothe recursive de�nition of the stem base. More precisely, to calculate a quasi-intentL•(X), we only need pseudo-intents which are contained in L•(X) and are thereforelectically smaller. Since the quasi-intents are calculated in lectic order, we have at anystep su�cient information to compute the next quasi-intent.

Figure 3.9 shows pseudocode for the L•-closure algorithm with an a priori unspeci�edset of implications L. Note that it is identical to the code for the L-closure algorithmgiven in �gure 3.8, with the exception of the de�nition of usable_imps in line 14: thenumber of an implication A→ B of L is contained in usable_imps if and only if

∀x ∈M\new_closure : x /∈ A and ∃x ∈ new_closure : x /∈ A

77

Page 84: Formal Concept Analysis - VUB

3. Determination and Representation

Algorithm L•-closureinput: A list L := [L[1], . . . ,L[n]] of implications inM and a set X ⊆M .output: L•(X)

1: begin

2: for all x ∈M do

3: begin

4: avoid [x] := {1, . . . , n};5: for i := 1 to n with A→ B := L[i] do6: if x ∈ A then avoid [x] := avoid [x]\{i};7: end;

8: used_imps := ∅;9: old_closure := ∅;10: new_closure := X;

11: while new_closure 6= old_closure do

12: begin

13: T := M \ new_closure ;

14: usable_imps :=⋂x∈T avoid [x] ∩

⋃x∈new_closure avoid [x];

15: use_now_imps := usable_imps \ used_imps ;

16: used_imps := usable_imps ;

17: old_closure := new_closure ;

18: for all i ∈ use_now_imps with A→ B := L[i] do19: new_closure := new_closure

⋃B;

20: end;

21: L•(X) := new_closure ;

22: end.

Figure 3.9: Pseudocode for the L•-closure algorithm.

which, in turn, is equivalent with

A ⊆ new_closure and new_closure * A.

In other words, usable_imps contains the numbers of the implications A→ B of L forwhich A is a proper subset of new_closure .

The algorithm in �gure 3.10 uses the L•-closure algorithm to compute the stem base L.It uses a dynamic list for L. Whenever a pseudo-intent P is found, the implicationP → P ′′ is added to L.

Note that this algorithm computes not only the pseudo-intents, but also the intents. Thenumber of intents can be exponential in the number of pseudo-intents. For example,consider a series of contexts Kn = (Gn,Mn, In) where Mn = {1, . . . , n} and where theobject intents are given by the subsets ofMn with precisely n−2 elements. Let (A,B) be

78

Page 85: Formal Concept Analysis - VUB

3. Determination and Representation

Algorithm StemBase

input: The closure operator X 7→ X ′′ on a �nite attribute setM , as givenby a context (G,M, I).

output: The stem base L.

1: begin

2: L := ∅;3: A := ∅;4: while A 6= M do

5: begin

6: if A 6= A′′ then L := L ∪ {A→ A′′};7: A := NextClosure(X 7→ L•(X),M,A);8: end;

9: end.

Figure 3.10: Pseudocode for the StemBase algorithm.

a concept of Kn. If A = ∅, the intent B equals Mn. If on the other hand, A 6= ∅, thenB arises as the intersection of object intents since (A,B) =

∨a∈A γ(a). Therefore, the

intents of Kn are Mn itself and the subsets of Mn with n− 2 elements or less. It is theneasy to see that subsets of Mn with exactly n− 1 elements are the pseudo-intents. Thecontext Kn thus has only

(nn−1

)= n pseudo-intents while it has 2n− n− 1 intents. This

example demonstrates that computing the pseudo-intents with the algorithm describedabove makes quite an une�cient detour through the land of intents.

The question naturally arises whether there exists a more e�cient algorithm for comput-ing the pseudo-intents. We refer the interested reader to Distel's paper [15]. It statesseveral complexity results concerning pseudo-intents. In particular, it is shown thatthere cannot be an algorithm for computing pseudo-intents in lectic order with a goodtheoretical complexity.

The Grail algorithm12, another algorithm which calculates the stem base (but makesthe same detour via the intents), is incorporated in the ConExp13 software. We usedthis software to calculate the stem base for the refrigerator context.

3.3.38 Example. The stem base L for the refrigerator context given by the cross tablein �gure 2.1 consists of the following implications14:

1. {leathery peel} → {contains seeds}

2. {sour} → {leathery peel, juicy, contains seeds}

12See [16].13ConExp, short for Concept Explorer, implements the basic functionalities needed for the study

and research of Formal Concept Analysis. It is freely available at http://conexp.sourceforge.net/.14The implications are stated in the form P → P ′′\P .

79

Page 86: Formal Concept Analysis - VUB

3. Determination and Representation

3. {juicy} → {contains seeds}

4. {sandwich �lling} → {made from milk}

5. {sweet, made from milk, sandwich �lling} → {leathery peel, sour, juicy, containsseeds}

6. {leathery peel, sweet, sour, juicy, contains seeds} → {made from milk, sandwich�lling}

7. {contains seeds, made from milk} → {leathery peel, sweet, sour, juicy, sandwich�lling}

We already found implication 4 of the stem base in example 3.3.4. The other implicationsthat we found in this example do not belong to the stem base L. However, they mostfollow from L since L is complete. We demonstrate that this is indeed the case. First,we show

L � {sour, juicy} → {leathery peel, contains seeds}.

Let T be a model of L. If {sour, juicy} ⊆ T then {leathery peel, contains seeds} ⊆ Tsince T respects the second implication of the stem base. We now show

L � {leathery peel, juicy} → {contains seeds}

in a di�erent way. Note that the context has a �nite attribute set. Hence, we recallfrom proposition 3.3.19 that an implication follows from L if it can be derived from Lby successive applications of Armstrong's inference rules. This is clearly the case since{leathery peel, juicy} → {contains seeds} can be inferred from implication 1 (or fromimplication 3) by augmentation.

The stem base is not the only implicational base, but it plays a special role. Corollary3.3.41 will illustrate that no implicational base can consist of fewer implications.

3.3.39 Proposition. Let K be a complete set of implications. For all pseudo-intents P ,there exists an implication A→ B in K which P does not respect and for which A′′ = P ′′.

Proof. Recall that for a complete set K of implications of (G,M, I),

H(K) ⊆ Bint(G,M, I)

holds. Since a pseudo-intent P is not an intent by de�nition, there must be an implica-tion A→ B in K which P does not respect, i.e. A ⊆ P and B * P . From proposition3.3.3 and the de�nition of a complete set of implications, it is clear that B ⊆ A′′. Hence,A′′ * P . Then, A′′ ∩ P cannot be an intent. Indeed, if A′′ ∩ P was an intent, it wouldhave to respect A→ B, yielding A * A′′ ∩ P or B ⊆ P . Since A ⊆ P and B * P , thisstatement is false. Proposition 3.3.35 now yields that A′′ ⊆ P or P ⊆ A′′ must hold.We already know that A′′ ⊆ P does not hold, therefore, P ⊆ A′′. Together with thefact that A ⊆ P , this �nally yields A′′ = P ′′.

80

Page 87: Formal Concept Analysis - VUB

3. Determination and Representation

3.3.40 Proposition. Let K be a complete set of implications and let P denote the setof all pseudo-intents. The map f : P → K which maps every pseudo-intent P to animplication AP → BP from K such that P does not respect AP → BP and A′′P = P ′′ isa well-de�ned injective map.

Proof. f is a well-de�ned map by proposition 3.3.39 and the axiom of choice. Assumethat f is not injective, i.e. that there are pseudo-intents P and Q such that P 6= Q andf(P ) = f(Q). Then,

P ′′ = A′′P = A′′Q = Q′′.

If P ⊂ Q, then Q′′ = P ′′ ⊆ Q which implies that Q′′ = Q, a contradiction with the factthat Q is a pseudo-intent. Hence, P ��⊂ Q and analogously, Q ��⊂ P . Since P 6= Q alsoholds, we have P * Q and Q * P . It then follows from proposition 3.3.35 that P ∩ Qis an intent. Furthermore, P does not respect AP → BP or equivalently,

AP ⊆ P and BP * P.

Also, since f(P ) = f(Q), it holds that Q does not respect AP → BP which yields

AP ⊆ Q and BP * Q.

Consequently, AP ⊆ P ∩Q. Since P ∩Q is an intent, it must respect every implicationfrom K and AP → BP in particular. This yields BP ⊆ P ∩Q ⊆ P , a contradiction withthe fact that P does not respect AP → BP .

3.3.41 Corollary. Let K be a complete set of implications and let L be the stem base.Then,

|L| ≤ |K|.

Proof. Clearly, there is a bijection between the stem base L and the set of all pseudo-intents. Also, there exists an injective map from the set of all pseudo-intents into K byproposition 3.3.40.

81

Page 88: Formal Concept Analysis - VUB

Abstract

Formele Concept Analyse (FCA) is een wiskundige theorie gebaseerd op tralietheorie.Hoewel Rudolf Wille de theorie in de jaren 80 ontwikkelde met een geheel andere opzet,wordt FCA momenteel voornamelijk gebruikt als data-analyse techniek. Zo heeft Wille'sonderzoeksgroep te Darmstadt de voorbije dertig jaar aan meer dan honderd projectenmeegewerkt in verschillende domeinen, waaronder geneeskunde, psychologie, electronicaen informatica, om er maar enkele te noemen.

Deze thesis belicht verscheidene aspecten van de wiskundige fundamenten van FormeleConcept Analyse en heeft, naast het voorzien van een gedetailleerde uiteenzetting, tevensals doel voldoende intuïtie mee te geven. De onderwerpen die we bespreken, werdensteeds geselecteerd met de toepassingen van FCA in het achterhoofd.

De wiskundige formalisering van `concepten' en hun `conceptuele hiërarchie' vormthet uitgangspunt van FCA. Deze conceptuele hiërarchie wordt op natuurlijke wijzebeschreven door middel van een partiële orde. Uitgerust met deze conceptuele ordedraagt de verzameling van alle concepten de structuur van een volledige tralie. Omge-keerd wordt bewezen dat elke volledige tralie isomorf is met een concept tralie.

Aangezien concept tralies worden gebruikt om de conceptuele hiërarchie in datasetsbloot te leggen, worden methodes besproken waarmee grote datasets signi�cant vereen-voudigd kunnen worden, zodanig dat de resulterende concept tralie alsnog isomorf ismet de oorspronkelijke. Bovendien worden enkele algoritmes voor het bepalen van alleconcepten geformuleerd, waaronder het bekende NextClosure algoritme, dat de con-cepten bepaalt in lexicogra�sche volgorde. Inzicht in de hiërarchie van de conceptenverkrijgt men pas echt wanneer men de concept tralie visueel voorstelt door middel vaneen Hasse diagram. Wanneer datasets te groot worden, en hun Hasse diagrammen teingewikkeld, kunnen geneste diagrammen een oplossing bieden.

Als laatste worden implicaties tussen attributen uitvoerig besproken. Er wordt on-der meer getoond hoe de concept tralie van een context gevonden kan worden uit deverzameling van alle implicaties van die context. Vervolgens wordt er gezocht naareen zogenaamde implicatiebasis: een minimale verzameling implicaties waaruit alle an-dere implicaties van de context volgen. In het eindige geval wordt een speciale impli-catiebasis besproken: de stem basis. Deze speelt een speciale rol aangezien elke andereimplicatiebasis minstens evenveel implicaties bevat als de stem basis. Een algoritme,gebaseerd op het eerder vermelde NextClosure algoritme, zal de stem basis bereke-nen.

82

Page 89: Formal Concept Analysis - VUB

Bibliography

[1] Wille, R., Restructuring Lattice Theory: An Approach based on Hierarchies of Con-cepts, reprint in: Proceedings of the 7th International Conference on Formal Con-cept Analysis (ICFCA 2009), Springer-Verlag Berlin/Heidelberg, 2009, pp. 314�339

[2] Ganter, B. & Wille, R., Formal Concept Analysis: Mathematical Foundations,Springer-Verlag Berlin/Heidelberg/New York, 1999

[3] Ganter, B. & Wille, R., Applied Lattice Theory: Formal Concept Analysis in Gen-eral Lattice Theory, Grätzer, G. (Ed.), second edition, Birkhäuser Verlag, 2003

[4] Davey, B.A. & Priestley, H.A., Introduction to Lattices and Order, second edition,Cambridge University Press, 2002

[5] Ganter, B. & Stumme, G., Formal Concept Analysis: Methods and Applications inComputer Science, TU Dresden, Germany, Tech. Rep., 2003

[6] Birkho�, G., Lattice Theory, third edition, American Mathematical Society Collo-quium Publications, Volume 25, 1995

[7] Grätzer, G., General Lattice Theory, second edition, Birkhäuser Verlag, 2003

[8] Carpineto, C. & Romano, G., Concept Data Analysis: Theory and Applications,John Wiley & Sons, Ltd, 2004

[9] Gugisch, R., Many-Valued Context Analysis using Descriptions, In Delugach, H.S.& Stumme, G. (Eds.), Proceedings of ICCS 2001, Volume 2120 of Lecture Notes inComputer Science, Springer-Verlag Berlin/Heidelberg, 2001, pp. 157�168

[10] Colebunders, E., Grondslagen van de Wiskunde, Lecture notes, Vrije UniversiteitBrussel, 2010�2011

[11] Armstrong, W.W., Dependency Structures of Data Base Relationships, ProceedingsIFIP Congress '74, Stockholm, Sweden, Rosenfeld, J.L. (Ed.), North-Holland, 1974,pp. 580�583

[12] Maier, D., The Theory of Relational Databases, Computer Science Press, 1983

[13] Gyssens, M., Database Dependencies, Hasselt University and Transnational Uni-versity of Limburg, 2009

83

Page 90: Formal Concept Analysis - VUB

BIBLIOGRAPHY

[14] Guigues, J.L. & Duquenne, V., Familles minimales d'implications informatives re-sultant d'un tableau de données binaires, Mathématiques et Sciences Humaines,tôme 95, 1986, pp. 5�18

[15] Distel, F., Hardness of Enumerating Pseudo-Intents in the Lectic Order, Proceed-ings of the 8th international conference on Formal Concept Analysis (ICFCA 2010),Springer-Verlag Berlin/Heidelberg, 2010, pp. 124�137

[16] Yevtushenko, S.A., System of data analysis �Concept Explorer�, Proceedings ofthe 7th national conference on Arti�cial Intelligence KII-2000, Russia, 2000,pp. 127�134

[17] Yevtushenko, S.A., On Algorithms for the Construction of Line Diagrams of Con-cept Lattices and the Set of All Concepts, presentation for Intellectics group, Darm-stadt, August 2001

[18] Margolis, E. & Laurence, S., Concepts, The Stanford Encyclopedia of Philosophy(Fall 2011 edition), Zalta, E.N. (Ed.),http://plato.stanford.edu/archives/fall2011/entries/concepts/

84

Page 91: Formal Concept Analysis - VUB

List of Notations

A <i B, 48A⊕ i, 48A→ B, 59A→ m, 59A′, B′, 24A•, 71Girr, 37Mirr, 37ORD, 63P ∂, 4Φ∂, 5∨S,∧S, 7

∼=, 3↓Q, 5↓x, 5γ(g), 30imp(G,M, I), 60, 69, 71J (L), 13, 15L(X), 64L•(X), 76M(L), 13, 15

O(P ), 5�6, 9, 16, 19Bext(G,M, I), 24�26Bint(G,M, I), 24�26B(G,M, I), 24, 26H(L), 62µ(m), 30ext, 27int, 27≺, 2⊂, 2↙,↗,↗↙, 38↑Q, 5↑x, 5�, 66ϕ•(X), 76ϕA(L), 69ϕL(X), 63v∗, 13v∗, 13gIm, g��Im, 24(G,M, I), 24

85

Page 92: Formal Concept Analysis - VUB

Index

∨-irreducible,

∧-irreducible, 13, 33∨

-reducible,∧-reducible, 13∨

-semilattice,∧-semilattice, 7

L-closure algorithm, 65L•-closure algorithm, 77AllClosures algorithm, 50Grail algorithm, 79NextClosure algorithm, 50StemBase algorithm, 78

additivity, 68antichain, 2antisymmetry, 1Armstrong's axioms, 67arrow relations, 38attribute, 24attribute concept, 30augmentation, 67

chain, 2clari�cation, 33closed

set, 17, 18set of implications, 67

closure, 17closure operator, 17, 28, 64, 76closure system, 16, 28, 62, 76column reduced, 35comparable, 2complete

homomorphism, 11lattice, 7, 18, 26, 29set of implications, 71, 72, 75

concept, 24attribute concept, 30

lattice, 26, 29object concept, 30order, 26

Connecting lemma, 8context, 24

clari�ed, 33complementary, 61doubly founded, 40isomorphism, 36reduced, 35

covering relation, 2cross table, 24cut, 45

decreasing set, see downsetderivation operators, 24, 27doubly founded

context, 40lattice, 41

downset, 5�6, 16, 19lattice, 9

dualorder, 4statement, 5

Duality Principlefor lattices, 11for ordered sets, 5

duallyadjoint, 19isomorphic, 4

Duquenne-Guigues-Basis, see stem base

extent, 24extent (of a concept), 28

�lter, see upset

86

Page 93: Formal Concept Analysis - VUB

INDEX

follows (semantically), 66

Galois connection, 19, 28

Hasse diagram, 2holds

in a context, 59in a set, 59

homomorphismcomplete, 11lattice, 11

ideal, see downsetimplication, 59

of a context, 59implicational base, 74, 75, 80�81incidence relation, 24, 30increasing set, see upsetin�mum, 7in�mum-preserving, 11intent, 24intent (of a concept), 28irreducible

attribute, 33object, 33

irre�exivity, 1isomorphism

complete, 11lattice, 11order, 13

join, 7join-dense, 13, 15, 30�33join-preserving, 11

lattice, 7complete, 7, 18, 26, 29complete isomorphism, 11doubly founded, 41downset lattice, 9homomorphism, 11isomorphism, 11, 13powerset lattice, 9

lectic order, 48lectically smaller, 48lower bound, 7

meet, 7meet-dense, 13, 15, 30�33meet-preserving, 11model, 59

nested line diagram, 55non-redundant, 74

object, 24object concept, 30order, 1

concept, 26dual, 4�lter, see upsetideal, see downsetisomorphism, 3, 13lectic, 48linear, see total orderpartial, 1strict, 1total, 2

order-embedding, 3order-preserving map, 3order-reversing map, 5ordered set

partially, 1totally, see chain

polars, 24poset, see partially ordered setpowerset lattice, 9premise

premise of, 59proper premise, 72proper premise of, 72

principal, 5product, 6projectivity, 68pseudo-intent, 74pseudo-transitivity, 67

quasi-intent, 75

reducedcontext, 35labeling, 51�52

87

Page 94: Formal Concept Analysis - VUB

INDEX

reducibleattribute, 33object, 33

reduction, 33re�exivity, 1, 67respects

a set of implications, 59an implication, 59

row reduced, 35

standard context, 36

stem base, 75, 77, 80�81subconcept, 26superconcept, 26supremum, 7supremum-preserving, 11

topped ∩-structure, see closure systemtransitivity, 1

upper bound, 7upset, 5�6

88