Mohamed-Bachir Belaid
email: belaid@lirmm.fr

Christian Bessiere
email: bessiere@lirmm.fr

Nadjib Lazaar
email: lazaar@lirmm.fr

Constraint Programming for Mining Borders of Frequent Itemsets

Frequent itemset mining is one of the most studied tasks in knowledge discovery. It is often reduced to mining the positive border of frequent itemsets, i.e. maximal frequent itemsets. Infrequent itemset mining, on the other hand, can be reduced to mining the negative border, i.e. minimal infrequent itemsets. We propose a generic framework based on constraint programming to mine both borders of frequent itemsets. One can easily decide which border to mine by setting a simple parameter. For this, we introduce two new global constraints, FREQUENTSUBS and INFREQUENTSUPERS, with complete polynomial propagators. We then consider the problem of mining borders with additional constraints. We prove that this problem is coNPhard, ruling out the hope for the existence of a single CSP solving this problem (unless coNP ⊆ NP).

Introduction

Data mining is the art of discovering knowledge from databases. It includes the discovering of frequent itemsets [START_REF] Agrawal | [END_REF][START_REF] Han | [END_REF], association rules [START_REF] Agrawal | [END_REF][START_REF] Liu | [END_REF], rare itemsets [START_REF] Szathmary | [END_REF]Adda et al., 2007], sequence patterns [START_REF] Agrawal | [END_REF], emerging patterns [START_REF] Dong | [END_REF], and many other tasks. For many data mining problems, the frequency represents an important metric. Given a frequency threshold s over a transaction dataset, frequent itemsets are those present in at least s transactions. Itemsets present in less than s transactions are called infrequent (or rare). The number of frequent/infrequent itemsets can be huge, making it hard even to print the result. Hence, we often reduce the problem of mining frequent or infrequent itemsets to the problem of mining the borders. The positive border is the set of frequent itemsets with only infrequent supersets, i.e. Maximal Frequent Itemsets (MFIs). The negative border is the set of infrequent itemsets with only frequent subsets, i.e. Minimal Infrequent Itemsets (MIIs). The subsets of the MFIs and the supersets of the MIIs represent the frequent and infrequent itemsets, respectively.

Several techniques have been introduced for mining MFIs [Burdick et al., 2001;[START_REF] Gouda | [END_REF][START_REF] Uno | [END_REF], or MIIs [START_REF] Szathmary | [END_REF][START_REF] Haglin | [END_REF][START_REF] Szathmary | [END_REF]. Despite an obvious duality between MFIs and MIIs, very few papers propose a single framework for mining both MFIs and MIIs. In [START_REF] Mannila | [END_REF][START_REF] Boros | [END_REF][START_REF] Nourine | [END_REF], inferring MFIs from the set of MIIs and vice versa (or also called the dualization) is reduced to computing the minimal transversals of a hypergraph [Berge, 1984]. In fact, MIIs correspond to the minimal transversals of the hypergraph constructed by the complements of the set of MFIs.

In a recent line of work, researchers have taken advantage of the flexibility of constraint programming to model various data mining problems [START_REF] Raedt | [END_REF][START_REF] Khiari | [END_REF][START_REF] Lazaar | [END_REF][START_REF] Schaus | [END_REF][START_REF] Bessiere | [END_REF]. In terms of CPU time, constraint programming-based methods have not yet competed with ad hoc algorithms. However, their flexibility allows the modeling of complex user queries without revising the solving process.

In this paper we propose a generic parameterized model allowing the user to decide which border to mine (i.e., MFIs or MIIs). For this model we need to define two new global constraints: (1) FREQUENTSUBS for mining itemsets having only frequent subsets, and (2) INFREQUENTSUPERS for mining itemsets having only infrequent supersets. We provide a polynomial domain consistency propagator for each of these two constraints. We then address the issue of mining borders in the presence of other constraints. As noticed in [START_REF] Bonchi | [END_REF], mining borders under additional constraints can lead to the loss of solutions. This can happen with maximal/minimal borders, but also with closed itemsets or generator itemsets. We prove that it is coNP-hard to find maximal/minimal itemsets among those satisfying a set of additional constraints. This implies that there does not exist any CSP representing the problem of finding maximal/minimal itemsets under additional constraints, unless coNP ⊆ NP. This is an a posteriori justification of the "multi-shot" approaches, such as the one presented in [Negrevergne et al., 2013].

The paper is organized as follows. Section 2 gives some background material. In Section 3 we give a generic model for mining MFIs or MIIs. We define the new global constraints FREQUENTSUBS and INFREQUENTSUPERS and we present their propagators. Section 4 analyzes the problem of mining constrained MFIs or MIIs. We present some empirical results in Section 5. Finally, we conclude in Section 6. Definition 2 (Minimal Infrequent Itemset (MII)) An itemset is an MII if it is infrequent and all its proper subsets are frequent.

transaction Items t 1 A B D E t 2 A C t 3 A B C E t 4 B C E t 5 A B C E
In [START_REF] Mannila | [END_REF] MFIs and MIIs are referred to as positive and negative border respectively. MFIs are closed and MIIs are a generator itemset. We define closed and generator itemsets.

Definition 3 (Closed itemset [START_REF] Pasquier | [END_REF]) An itemset P is closed if and only if there does not exist any itemset Q P such that f req(Q) = f req(P ).

Definition 4 (Generator [START_REF] Bastide | [END_REF]) A generator is an itemset P such that there does not exist any itemset Q P such that f req(Q) = f req(P ).

Example 2.1 With s = 3, the dataset in Table 1 has MFIs = {ABE, AC, BCE} and MIIs = {ABC, ACE, D}.

Constraint Programming (CP)

A CP model specifies a set of variables X = {x 1 , . . . , x n }, a set of domains dom = {dom(x 1 ), . . . , dom(x n )}, where dom(x i ) is the finite set of possible values for x i , and a set of constraints C on X. A constraint c j ∈ C is a relation that specifies the allowed combinations of values for its variables var(c j ). An assignment on a set Y ⊆ X of variables is a mapping from variables in Y to values, and a valid assignment is an assignment where all values belong to the domain of their variable. A solution is an assignment on X satisfying all constraints. Constraint programming is the art of writing problems as CP models and solving them by finding solutions. Constraint solvers typically use backtracking search to explore the search space of partial assignments. At each assignment, constraint propagation algorithms (aka, propagators) prune the search space by enforcing local consistency properties such as domain consistency.

A constraint c on var(c) is domain consistent (DC) if and only if, for every x i ∈ var(c) and every d j ∈ dom(x i ), there is a valid assignment satisfying c such that x i = d j . Global constraints are constraints defined by a relation on any number of variables. The constraint AllDifferent, specifying that all its variables must take different values is an example of global constraint (see [START_REF] Rossi | [END_REF]).

Example 2.2 Consider the following instance of a CP model.

X = {x 1 , x 2 , x 3 }, dom(x 1 ) = {0, 2}, dom(x 2 ) = {0, 2, 4}, dom(x 3 ) = {1, 2, 3, 4}, and C = {x 1 ≥ x 2 , x 1 + x 2 = x 3 }.
Value 4 for x 2 will be removed by DC because of constraint x 1 ≥ x 2 . Values 1 and 3 for x 3 will be removed by DC because of constraint x 1 + x 2 = x 3 . This CP model admits the two solutions (x 1 = 2, x 2 = 0, x 3 = 2) and (x 1 = 2, x 2 = 2, x 3 = 4).

A Generic CP Model for Mining Borders

We present a CP model, MODEL D,s,b , for mining MFIs or MIIs. MODEL D,s,b uses a vector x of n Boolean variables, where x i represents the presence of the item i in the itemset. We will use the following notations:

• x -1 (1) = {i ∈ I | dom(x i ) = {1}} • x -1 (0) = {i ∈ I | dom(x i ) = {0}} • x -1 ( * ) = {i ∈ I | i ∈ x -1 (1) ∪ x -1 (0)} MODEL D,s,b (x) =    FREQUENTSUBS D,s (x) (1) INFREQUENTSUPERS D,s (x) (2) b ⇐⇒ FREQUENT D,s (x) (3)
where Proof. We first prove that MFIs and MIIs always satisfy constraints ( 1) and ( 2). All supersets of an MFI are infrequent, thus satisfying (2). Because an MFI is frequent, all its proper subsets are frequent, thus satisfying (1). An MII has only frequent subsets, thus satisfying (1). Because an MII is infrequent, it has only infrequent supersets, thus satisfying (2). Hence, all MFIs and all MIIs satisfy constraints (1) and (2).

We now prove that a solution of MODEL D,s,b , can only be an MFI or an MII depending on the value of b. A solution of MODEL D,s,b can only be frequent (i.e., b = true) or infrequent (i.e., b = f alse). If it is frequent then it is an MFI (see Definition 1). Otherwise it is an MII (see Definition 2). Example 3.1 The lattice in Figure 1 displays the set of itemsets satisfying the constraints FREQUENTSUBS and INFREQUENTSUPERS on the dataset of Table 1 with s = 3.

The intersection between both sets is the set M F Is ∪ M IIs.

We can then use MODEL D,s,b to mine either MFIs or MIIs by simply setting b to true or false. We now define the global constraints FREQUENTSUBS and INFREQUENTSUPERS and we propose propagators.

The Global Constraint FREQUENTSUBS

We present the new global constraint FREQUENTSUBS used to mine itemsets that have only frequent subsets.

Definition 5 (FREQUENTSUBS) Let x be a vector of Boolean variables, s a support threshold and D a dataset. The global constraint FREQUENTSUBS D,s (x) holds if and only if ∀p ⊂ x -1 (1), f req(p) ≥ s.

Algorithm. The propagator for the global constraint FRE-QUENTSUBS is presented in Algorithm 1. Algorithm 1 takes as input the variables x and the support threshold s. Algorithm 1 starts by computing the cover of the itemset x -1 (1) and stores it in cover (line 4). Then, for each item j ∈ x -1 (1), Algorithm 1 computes the cover of the subset x -1 (1) \ {j}, and stores it in cov[j] (line 6). If x -1 (1) \ {j} is infrequent then x -1 (1) is not a solution and we return a failure (line 7). Algorithm 1 must then remove items i that cannot belong to a solution containing x -1 (1). To do that, we first test if the itemset x -1 (1) is infrequent (line 8). If so, we remove 1 from dom(x i ) for all i ∈ x -1 ( * ) (lines 9-10) because the itemset x -1 (1) ∪ {i} has an infrequent subset (x -1 (1)) for every i in x -1 ( * ). Otherwise, for every item i in x -1 ( * ) we test if the itemset x -1 (1) ∪ {i} is infrequent (line 12). If so, it could have infrequent subsets. Thus, for every item j in x -1 (1), we test if the size of the cover of x -1 (1) ∪ {i} \ {j} (i.e., cov[j] ∩ cover(i)) is less than s (line 14). If so, we remove i from the possible items, that is, we remove 1 from dom(x i ) and break the loop (line 15).

Theorem 2 The propagator in Algorithm 1 enforces domain consistency on the constraint FREQUENTSUBS.

Algorithm 1: Propagator for FREQUENTSUBS 1 In: s: support threshold; 2 InOut: x = {x 1 . . . x n }: Boolean item variables;

3 begin 4 cover ← cover(x -1 (1)); 5 foreach j ∈ x -1 (1) do 6 cov[j] ← cover(x -1 (1) \ {j}); 7 if |cov[j]| < s then return failure ; 8 if |cover| < s then 9 foreach i ∈ x -1 ( * ) do 10 dom(x i ) ← dom(x i ) \ {1}; 11 foreach i ∈ x -1 ( * ) do 12 if |cover ∩ cover(i)| < s then 13 foreach j ∈ x -1 (1) do 14 if |cov[j] ∩ cover(i)| < s then 15 dom(x i ) ← dom(x i ) \ {1}; break;
Proof. We first prove that if FREQUENTSUBS admits a solution, x -1 (1) is necessarily one of them. Suppose there is a solution and x -1 (1) is not one of them. This means that there exists a superset of x -1 (1) which has all its subsets frequent.

x -1 (1) is one of these subsets. Thus, all subsets of x -1 (1) are frequent and x -1 (1) is solution too, which contradicts the assumption. We now prove that Algorithm 1 returns failure if and only if FREQUENTSUBS does not admit any solution. We know that FREQUENTSUBS has no solution if and only if x -1 (1) is not solution. x -1 (1) is not solution if and only if it has an infrequent subset x -1 (1) \ {j} for some j in x -1 (1). In such a case the test in line 7 is true and failure is returned. If FREQUENTSUBS admits solutions, x -1 (1) is a support for x i = 0, for all i ∈ x -1 ( * ). As a result, Algorithm 1 does not need to check consistency of value 0 for any variable.

We now prove that Algorithm 1 prunes value 1 from dom(x i ) exactly when i cannot belong to a solution containing x -1 (1). Suppose value 1 of x i is pruned by Algorithm 1. This means that the test in line 8 (or line 14) was true, that is, there exists a subset of x -1 (1) ∪ {i} which is infrequent. Thus, by definition, x -1 (1) ∪ {i} does not belong to any solution. Suppose now that value 1 of x i is not pruned. From lines 8 and 14, we deduce that there does not exist any infrequent subset of x -1 (1) ∪ {i}. Thus x -1 (1) ∪ {i} is a solution and value 1 of x i is domain consistent.

Theorem 3 Given a transaction dataset D of n items and m transactions, Algorithm 1 has an O(n 2 × m) time complexity.

Proof. Computing the size of the cover of an itemset is in O(n × m). Line 5 is called at most n times, leading to a time complexity in O(n 2 × m). The time complexity of lines 8-10 is bounded above by n. The test at line 13 is done at most n 2 times. The cover x -1 (1) ∪ {i} \ {j} at line 13 is computed in O(m) thanks to the cov data structure. Thus, the time complexity of lines 9-14 is bounded above by n 2 × m. As a result, Algorithm 1 has an O(n 2 × m) time complexity.

Algorithm 2: Propagator for INFREQUENTSUPERS 1 In: s: support threshold; 2 InOut: x = {x 1 . . . x n }: Boolean item variables;

3 begin 4 cover ← cover(x -1 (1) ∪ x -1 ( * )); 5 if |cover| ≥ s then 6 foreach j ∈ x -1 (0) do 7 if |cover ∩ cover(j)| ≥ s then 8 return failure; 9 foreach i ∈ x -1 ( * ) do 10 cover2 ← cover(x -1 (1) ∪ x -1 ( * ) \ {i}); 11 if |cover2| ≥ s then 12 foreach j ∈ (x -1 (0) ∪ {i}) do 13 if |cover2 ∩ cover(j)| ≥ s then 14 dom(x i ) ← dom(x i ) \ {0}; break;

The Global Constraint INFREQUENTSUPERS

We present the new global constraint INFREQUENTSUPERS used to mine itemsets that have only infrequent supersets. Definition 6 (INFREQUENTSUPERS) Let x be a vector of Boolean variables, s a support threshold and D a dataset. The global constraint INFREQUENTSUPERS D,s (x) holds if and only if ∀p ⊃ x -1 (1), f req(p) < s.

Algorithm.

The propagator for the global constraint INFREQUENTSUPERS is presented in Algorithm 2. Algorithm 2 takes as input the variables x and the support threshold s. Algorithm 2 starts by computing cover, the cover of the largest possible itemset, x -1 (1) ∪ x -1 ( * ) (line 4). If such an itemset has a frequent superset (line 7) then no itemset containing x -1 (1) can be a solution and we return failure (line 8). Algorithm 2 must then remove value 0 from dom(x i ) if the absence of the item i can lead to an itemset that has a frequent superset. To do that, for every free item i (line 9), Algorithm 2 computes cover2, the cover of the largest itemset not containing the item i, i.e. x -1 (1) ∪ x -1 ( * ) \ {i} (line 10). If x -1 (1) ∪ x -1 ( * ) \ {i} is frequent (line 11), it could have a frequent superset. Thus, for every item j in x -1 (0) ∪ {i} we test whether the itemset x -1 (1) ∪ x -1 ( * ) \ {i} ∪ {j} is frequent (line 13). If so, we remove 0 from dom(x i ) and break the loop (line 14). Theorem 4 The propagator in Algorithm 2 enforces domain consistency on the constraint INFREQUENTSUPERS. Proof. We first prove that if INFREQUENTSUPERS admits a solution, x -1 (1) ∪ x -1 ( * ) is necessarily one of them. Suppose there is a solution and x -1 (1) ∪ x -1 ( * ) is not one of them. This means that there exists a subset of x -1 (1) ∪ x -1 ( * ) which has all its supersets infrequent. x -1 (1) ∪ x -1 ( * ) is one of these supersets. Thus, all supersets of x -1 (1) ∪ x -1 ( * ) are infrequent and x -1 (1) ∪ x -1 ( * ) is solution too, which contradicts the assumption. We now prove that Algorithm 2 returns failure if and only if INFREQUENT-SUPERS does not admit any solution. We know that if INFREQUENTSUPERS has solutions, x -1 (1) ∪ x -1 ( * ) is one of them. x -1 (1) ∪ x -1 ( * ) is not solution if and only if it has a frequent superset. In such a case the test in line 7 is true for some j in x -1 (0) and failure is returned. If INFREQUENT-SUPERS has solutions, x -1 (1) ∪ x -1 ( * ) is a support for x i = 1, for all i ∈ x -1 ( * ). As a result, Algorithm 2 does not need to check consistency of value 1 for any variable.

We now prove that Algorithm 2 prunes 0 from dom(x i ) exactly when i belongs to all solutions containing x -1 (1). If the test in line 13 is true this means that with x i = 0 we get itemsets having at least a frequent superset. Hence, 0 must be pruned from dom(x i ). Suppose now that the test in line 13 is false for all j. x -1 (1) ∪ x -1 ( * ) \ {i} has only infrequent supersets and x i = 0 is domain consistent. Theorem 5 Given a transaction dataset D of n items and m transactions, Algorithm 2 has an O(n 2 × m) time complexity. Proof. Computing the cover of x -1 (1) ∪ x -1 ( * ) in line 4 is in O(n × m). The loop in line 6 computes the cover of x -1 (1) ∪ x -1 ( * ) ∪ {j} in O(m) using the already computed cover of x -1 (1) ∪ x -1 ( * ) (i.e., cover). As a result the worst case time complexity of lines 4-8 is in O(n × m). Similarly, the time complexity of lines 10-14 is bounded above by n × m. Lines 10-14 are called at most n times, leading to a time complexity in O(n 2 × m).

It is worth noticing the duality between Algorithm 1 and Algorithm 2. Algorithm 1 removes value 1 from dom(x i ) if including the item i leads to an itemset having an infrequent subset. Algorithm 2 removes value 0 from dom(x i ) if excluding the item i necessarily leads to itemsets having a frequent superset. This duality is not totally obvious at a first glance because Algorithm 1 requires the cov data structure to have its good time complexity whereas Algorithm 2 does not need it. The reason is that Algorithm 1 computes the covers of subsets that we cannot derive from the cover of their supersets whereas Algorithm 2 computes covers of supersets that can be obtained by simple bitwise operation on their subsets.

On Constrained Borders

As pointed out in [START_REF] Bonchi | [END_REF], constraints can interfere with closedness (or maximality) when they are not monotone. Likewise, constraints can interfere with minimality when they are not anti-monotone. Hence, existing "one-shot" CP approaches can miss solutions because they look for maximal/minimal itemsets that in addition satisfy constraints (see [START_REF] Lazaar | [END_REF]), whereas we are usually interested in itemsets that are maximal (or minimal) among those satisfying the constraints. In this section we prove that deciding whether a frequent itemset is maximal or closed or minimal among those satisfying the constraints is coNPcomplete. This means that finding maximal/closed/minimal itemsets among those satisfying a set of constraints is coNPhard. It is a proof that it is not possible to solve this problem using a single CSP (unless coNP ⊆ NP). This validates "multi-shot" approaches [Negrevergne et al., 2013]. Theorem 6 Given a dataset D on a set of items I and a set C of user's constraints, deciding whether an itemset is maximal/closed among those satisfying C is coNP-complete.

Proof. Membership. Given an itemset P , a witness to its non maximality/closedness is an itemset P ⊃ P that is frequent, satisfies C, and in the case of closedness has the same frequency as P . Checking that P is frequent and checking that it has the same frequency as P is linear in |D|. Checking that P satisfies C requires the polynomial check of the C constraints. Hence, the "no" answer admits a polynomial certificate, and so deciding maximality or closedness is in coNP.

Completeness.

We reduce co3COL, which is coNPcomplete, to the problem of deciding whether an itemset is maximal/closed. We want to decide whether a connected graph G = (V, E) is non colorable with three colors. We build the dataset D on the set I = (a 1 , . . As in all CP models for itemset mining, there is a Boolean variable for each item. The standard semantics is that x p = 1 if and only if the item p is in the itemset returned as solution.

For each edge (i, j) ∈ E, a quaternary constraint c(x ai , x bi , x aj , x bj ) is put in the set C of user's constraints. The tuples allowed by c(x ai , x bi , x aj , x bj ) are (0000), ( 0110), ( 0111), ( 1001), ( 1011), ( 1101), ( 1110). The assignments (01), ( 10), and (11) for the pair of variables (x ai , x bi ) represent the three colors for vertex i. c(x ai , x bi , x aj , x bj ) accepts the tuple (0000) plus the six tuples representing the six combinations of different colors for the pair of vertices (i, j). Hence, by construction, the tuple (0, . . . , 0) is solution, and, as soon as a variable x ai or x bi is set to 1, it forces all neighbors in E of vertex i to take another color than the color represented by the assignment of (x ai , x bi ). As a result, deciding whether the itemset {c} is maximal/closed among the itemsets satisfying C is equivalent to deciding whether there does not exist any superset of {c} satisfying C, which is equivalent to deciding whether G is non 3-colorable.

Theorem 7 Given a dataset D on a set of items I and a set C of user's constraints, deciding whether an itemset is minimal/generator among those satisfying C is coNP-complete.

Proof. (Sketch.) Membership is direct adaptation of the proof of membership in Theorem 6: A witness of nonminimality/non-generator of an itemset P is a subset that is infrequent (or has the same frequency in case of generator) and satisfies C, which is polynomial to check. Completeness is the dual of the reduction in Theorem 6. We reduce co3COL to the problem of deciding whether an itemset is minimal/generator. We build the dataset D on the set I = (a 1 , . . . , a n , b 1 , . . . , b n ) of items with the three transactions (1, 0, . . . , 0), (0, . . . , 0, 1) and (1, . . . , 1). The frequency threshold s is set to |T |/2. For each edge in the graph, we use again a quaternary constraint but the tuple (0000) is replaced by the tuple (1111) and the three colors are represented by the assignments (00), (01), and (10) instead of (01), (10), and (11). By construction, the tuple (1, . . . , 1) is solution and deciding whether the itemset (a 1 , . . . , a n , b 1 , . . . , b n ) is minimal/generator among the itemsets satisfying C is equivalent to deciding whether there does not exist any subset of (a 1 , . . . , a n , b 1 , . . . , b n ) satisfying C, which is equivalent to deciding whether G is non 3-colorable.

Corollary 1 Given a dataset D on a set of items I and a set C of user's constraints, finding an itemset that is maximal/closed/minimal/generator among those satisfying C is coNP-hard.

Experiments

We made several experiments to compare our CP model MODEL D,s,b to the state of the art approaches.

Experimental Protocol

The implementation of MODEL D,s,b and its constraint propagators were carried out in the Oscar solver using Scala (bitbucket.org/oscarlib/oscar). The code is publicly available at gite.lirmm.fr/belaid/cp4borders. All experiments were conducted on an Intel core i7, 2.2Ghz with a RAM of 8Gb and a timeout of one hour. MODEL D,s,b is denoted by CP4MFI (resp. CP4MII) when b = 1, i.e. mining MFIs, (resp. b = 0, mining MIIs). We used the global constraint COVERSIZE to encode the constraint (3) in MODEL D,s,b . COVERSIZE D (x, p) holds if and only if p = |cover(x -1 (1))| [START_REF] Schaus | [END_REF]. We enforce frequency by simply adding the constraint p ≥ s and infrequency by adding p < s. The propagator of COVERSIZE enforces DC on the frequency, but it does not on the infrequency. We have assessed the quality of the COVERSIZE encoding of infrequency by comparing to a propagator that enforces DC on the infrequency. We observed that the number of additional nodes explored with the COVERSIZE encoding was marginal and the CPU time was better. We thus use the propagator of COVERSIZE in all our experiments. As an MFI is a closed itemset and an MII is a generator, we enhance propagation by adding, respectively, the global constraints COV-ERCLOSURE [START_REF] Schaus | [END_REF] and GENERATOR [Belaid et al., 2019]. After a few preliminary tests, we decided to use smallest item frequency first as variable ordering heuristic and largest value first as value ordering heuristic. We compared CP4MFI to the FPGROWTH [START_REF] Grahne | [END_REF] specialized algorithm for extracting MFIs (Borgelt's platform: borgelt.net/fpgrowth.html) and CP4MII to WALKY-G [START_REF] Szathmary | [END_REF] for mining MIIs (CORON platform: coron.loria.fr). We selected several real-sized datasets from the FIMI repository (fimi.ua.ac.be/data). A dataset is characterized by its name, the number of items |I|, the number of transactions |T | and its density ρ.

Mining Borders

Our first experiment compares CP4MFI to FPGROWTH and CP4MII to WALKY-G for mining MFIs and MIIs. For each approach and each selected instance, Table 2 reports the CPU time and the number of MFIs/MIIs. 1 An instance of a given dataset is characterized by its minimum support s (e.g., Zoo 50 denotes the instance of Zoo with s = 50).

A first observation is that the specialized algorithms FP-GROWTH and WALKY-G follow a completely different approach to extract MFIs and MIIs whereas our CP model can 1 This number is computed by releasing the timeout.

Mining Constrained Borders

In many practical applications, the user asks for itemsets satisfying some additional constraints. We performed experiments that show the strength of our CP approach in taking into account user's constraints. We look for MFIs of minimim size lb and MIIs of maximum size ub. These two queries can easily be expressed in our CP model by adding the cardinality constraints i∈I x i ≥ lb to CP4MFI, and i∈I x i ≤ ub to CP4MII. FPGROWTH includes a filtering step allowing us to specify the minimum size of extracted MFIs. However, WALKY-G does not provide such feature, and extracting MIIs under cardinality constraints is only possible via a post-processing step. decreased ub) and we report the CPU time, in seconds, according to the number of solutions.

The main observation on the performance of FPGROWTH for extracting constrained MFIs is that its CPU time is almost constant. For instance, extracting more than 5M or just 10 MFIs on Chess 160 requires almost the same CPU time. This is explained by the fact that the cardinality constraint in FPGROWTH has no pruning power. It is just used as a checker. On the contrary, when lb increases, CP4MFI removes more values thanks to constraint propagation, thus drastically reducing the search space. Take for instance Pumsb 17000. When lb = 22, CP4MFI extracts the 55K MFIs in more than 50 minutes whereas when lb increases to 30, CP4MFI returns the 21 remaining solutions in only 15 seconds. On instances with no solutions, such as Pumsb 17000 with lb = 35, CP4MFI proves the absence of solutions in one second whereas FPGROWTH spends 157.28 seconds.

For WALKY-G, no results are reported because it already has an OOM or TO state before reaching post-processing step.

The main observation that we can draw on the behavior of CP4MII is again the strong correlation between the increase of tightness of the cardinality constraint (that is, the decrease of ub) and the drop in CPU time needed to extract the constrained MIIs. The explanation for this good behavior of CP4MII is again the strength of constraint propagation to discard inconsistent values, thus reducing the search space. On Pumsb 17000, when ub decreases from 8 down to 1, CP4MII goes from 45 minutes down to 4.59 seconds to return the set of MIIs (1.3M MIIs for ub = 8 and 2K MIIs for ub = 1).

Conclusion

We have presented a CP model for mining MFIs and MIIs. We defined two new global constraints, namely FRE-QUENTSUBS and INFREQUENTSUPERS, with polynomial complete propagators. We have proved that the problem of MFIs or MIIs with constraints is co-NPhard, ruling out the hope for a single CSP solving this problem. Nevertheless, our CP model is sound when the additional constraints are monotone on MFIs or anti-monotone on MIIs. Experiments showed that the CP approach is competitive with state of the art techniques for mining MFIs or MIIs and even better for mining MFIs or MIIs with additional constraints.

  . , a n , b 1 , . . . , b n , c) of items, where n = |V |. The pair (a i , b i ) of items will represent the vertex i in V . D contains the single transaction (1, . . . , 1) and the frequency threshold s is set to |T |/2.

Table 1

 1 {1, . . . , m} a set of m transaction indices. An itemset P is a non-empty subset of I. D = {t 1 , . . . , t m } is the transactional dataset, where for all i ∈ T , t i is an itemset. The cover of an itemset P , denoted by cover(P ), is the set of transactions containing P . The frequency of an itemset P is the cardinality of its cover i.

	: Dataset
	2 Background
	2.1 Itemsets

Let I = {1, . . . , n} be a set of n item indices and T = e. f req(P ) = |cover(P )|. Let s be some given constant called a support threshold. The itemset P is frequent if f req(P ) ≥ s. P is infrequent (or rare) if f req(P ) < s. We now define the two main notions used in this paper.

Definition 1 (Maximal Frequent Itemset (MFI)) An itemset is an MFI if it is frequent and all its proper supersets are infrequent.

  The set of solutions to MODEL D,s,b corresponds to the set of MFIs if b = true, the set of MIIs otherwise.

	(1) is a global constraint that holds if and only if
	the itemset x -1 (1) has only frequent subsets w.r.t s, (2)
	is a global constraint that holds if and only if the item-
	set x -1 (1) has only infrequent supersets w.r.t s, and the
	Boolean parameter b reifies the global constraint FREQUENT
	(3). FREQUENT D,s holds if and only if x -1 (1) is frequent
	w.r.t s. We prove that MODEL D,s,b is a correct model for
	mining MFIs or MIIs.
	Theorem 1

  The powerset lattice of the dataset in Table1with borders of FREQUENTSUBS and INFREQUENTSUPERS (s = 3).

						{}				Itemsets with infrequent
										supersets border
			A	B		C	D	E		Itemsets with frequent subsets border
										MFI
	AB	AC	AD	AE	BC	BD	CD	BE	CE	DE
										MII
	ABC	ABD	ACD	ACE	ABE	ADE	BCD	BCE	BDE	CDE
			ABCD	ACDE	ABCE	ABDE	BCDE
						ABCDE
	Figure 1:

Table 2 :

 2 FPGROWTH vs CP4MFI for mining MFI and WALKY-G vs CP4MII for mining MIIs (time in seconds) mine a border or the other just by flipping a parameter. When mining MFIs, the main observation that we can draw from Table2is that, as expected, the specialized algorithm FP-GROWTH performs very well. However, CP4MFI is very competitive too, and even faster on one instance (Chess 160). As for MIIs, CP4MII outperforms WALKY-G in 14 instances out of 26. CP4MII reaches once the timeout of one hour. WALKY-G reaches the time out on two instances and an out of memory state on three instances. WALKY-G uses a hash structure for storing frequent generators. Maintaining this data structure can be very expensive, especially on dense datasets. For instance, on the very dense Chess 500, WALKY-G exhausts the 8Gb of memory to store the 50M frequent generators. On the moderately dense Connect 7000, WALKY-G needs to store more than 7.4M frequent generators to find the 165K MIIs in 163.25 seconds. On these two instances, CP4MII returns the whole set of MIIs in only 97.42 and 99.42 seconds, respectively. On sparse datasets, where we have few frequent generators, WALKY-G is very efficient. On the very sparse dataset T10, WALKY-G stores less than 50K frequent generators to extract the 698K MIIs of T10 50 in less than 5 seconds whereas CP4MII needs more than 7 minutes.

  Table 3 reports the results. We selected the instances having more than one million MFIs and/or MIIs in Table 2. For each selected instance, we increased lb (resp.

	Instance	Mining constrained MFIs lb FPGROWTH CP4MFI	#SOL	Mining constrained MIIs ub WALKY-G CP4MII	#SOL
		25	17.97	0.30	0	1	OOM	0.08		19
	Chess 500	24 21	17.60 16.60	0.72 1.65	2 2,091	3 5	OOM OOM	0.41 8.88		1,962 31,591
		17	17.86	10.58 171,567	7	OOM	16.58	224,172
		29	201.55	1.23	0	1	OOM	0.03		9
	Chess 160	28 26	224.31 226.77	1.73 3.51	10 1,527	3 4	OOM OOM	0.62 1.31		2,384 13,487
		23	219.82	16.08 132,814	6	OOM	17.44	186,653
		40	117.87	5.96	0	1	TO	0.15		20
	Connect 676	33 32	111.95 109.07	69.00 117.17	266 21,788	2 4	TO TO	2.53 22.81		1,612 33,742
		31	125.62	171.04 157,793	5	TO	119.42	144,007
		35	157.28	1.16	0	1	OOM	4.59		2,033
	Pumsb 17000	30 26	157.58 153.33	14.96 148.26	21 1,663	3 6	OOM OOM	11.94 254.58	5,721 166,178
		22	154.52 3019.25	55,018	8	OOM	2702.20 1,388,040
						TO= timeout	OOM= out of memory

Table 3 :

 3 FPGROWTH vs CP4MFI for mining constrained MFI and WALKY-G vs CP4MII for mining constrained MIIs (time in seconds)


Lounes

Family rights for naturalized EU citizens

Introduction

With Commission v. UK, 1 it has been said that the Court "has played politics and lost". [START_REF] O'brien | The ECJ sacrifices EU citizenship in vain: Commission v. United Kingdom[END_REF] Decided nine days before the UK referendum on EU Membership, it followed a set of cases -Dano, Alimanovic and Garcia Nieto [START_REF]Vestische Arbeit Jobcenter Kreis Recklinghausen v. Jovanna García-Nieto and Others[END_REF] -where the Court suddenly expressed great deference towards the EU legislature. As a result, part of its EU citizenship case law was dismantled and social rights for "inactive" EU citizens were limited. It may also be said that the Court has played politics in Lounes, released in the middle of Brexit talks. Answering a reference from a British Court, it decided that in some cases, EU citizens who acquire British citizenship can still rely on EU law to live with their third country national spouse in the UK. Notwithstanding that the situation of the case was not related to Brexit, the answer of the Court is of crucial importance for EU citizens living in the UK or British citizens living in another Member State.

The presence of emblematic cases such as Martínez Sala, Garcia Avello or Metock [START_REF]Case C-127/08, Blaise Baheten Metock and Others v. Minister for Justice, Equality and Law Reform[END_REF] could be read between the lines in Lounes. The case deals with family reunification for nationals residing in their State of nationality. In principle, EU citizens residing in their State of nationality cannot rely on EU law to obtain a derived right of residence for their family members. Nonetheless, the Court has long held that there are some exceptions to this rule. This is the case with situations having a "transnational element": when the citizen has exercised his freedom of movement and is returning to his Member State of nationality (Singh model) [START_REF]The Queen v. Immigration Appeal Tribunal and Surinder Singh, ex parte Secretary of State for Home Department[END_REF] or when the citizen is engaged in an economic activity in another Member State (Carpenter model). [START_REF]Secretary of State for the Home Department[END_REF] In other situations, very exceptionally, a derived right of residence has been recognized when its absence would force the citizen to leave the EU territory as a whole (Ruiz Zambrano model). [START_REF] Ruiz Zambrano V | Office national de l'emploi (ONEm)[END_REF] In this last series of cases, the right of residence is directly based on the status of EU citizen conferred by Article 20 TFEU and not on Article 21 TFEU, stating that "every citizen of the Union shall have the right to move and reside freely within the territory of the Member States".

The situation of dual nationals is less clear. In McCarthy8 the Court refused to apply Article 21 TFEU in the case of a dual national residing in her State of nationality who had never exercised her freedom of movement. 9 In Lounes, Ms Oramzabal, a Spanish national who acquired British citizenship, had exercised her freedom of movement and had kept her Spanish nationality. The question of whether she was in a different situation to Ms McCarthy because she had moved was discussed before the referring Court. Unsurprisingly, the ECJ decided that the acquisition of British citizenship by Ms Ormazabal does not imply that she is in "a purely domestic situation".

Nonetheless, this does not in itself justify a derived right of residence for her husband. In that respect, the ruling under examination is rather confusing. Numerous lines of reasoning are proposed but most of the time they are incomplete. They are superimposed and intertwined more than properly articulated. Lounes may be read as a further step in the development of EU citizenship. Indeed, it is the first time that the Court states so clearly that Article 21 TFEU entails a right to lead a normal family life. Moreover, the case arguably adds a new dimension to the naturalization of an EU citizen in her Member State of residence. Naturalization is seen as the prolongation of EU citizens' integration in the host Member State, which is itself seen as the prolongation of free movement rights. Only future interpretation will determine whether Lounes will become one of the milestones of the Court's citizenship case law.

Factual and legal background

Ms Ormazabal, a Spanish national, moved to the UK as a student in 1996. Since 2004, she has worked full-time for the Turkish Embassy in London. In 2009, after thirteen years of residence, she acquired British citizenship, while also retaining her Spanish nationality. She married Mr Lounes in 2014. The latter, a national of Algeria, entered the UK on a six-month visitor visa in 2010 and overstayed illegally.

After their wedding, he applied to the Secretary of State for the Home Department for an EEA residence card as the family member of his wife, pursuant to the Immigration (European Economic Area) Regulation 2006, the UK legislation transposing Directive 2004/38 (the "EEA Regulation 2006"). This brought him to the attention of the immigration authorities and he was soon served with a notice informing him that he was liable to removal on the grounds that he had overstayed in the UK in breach of immigration control, and with notice of a decision to remove him from the UK. In addition, the Secretary of State for the Home Department answered negatively to his application for an EEA residence card. It took the view that Ms Ormazabal was no longer regarded as an "EEA national" because she had acquired British nationality, even though she was still a Spanish national.

The term "EEA national" has been preferred to "EU citizen" in the EEA Regulation 2006 -reminding us that Directive 2004/38 is not reserved to EU citizens but is a text with EEA relevance, and wiping away the symbolic baggage of the term "citizen". The Regulation's Part 1, 2(1), defining who counts as an "EEA national", has been amended two times. Originally, it stated that for the Regulation, "EEA national" meant a national of an "EEA State", the UK being excluded, and Switzerland being included. Therefore, UK citizens also having the nationality of another EEA State or Switzerland counted as EEA nationals. Following the amendment of 16 October 2012, it read "'EEA' national" means a national of an EEA State who is not also a United Kingdom national". It has since been reamended: since 8 November 2012, the designation "United Kingdom national" has been replaced by "British citizen". The first change is presented in the Explanatory Note accompanying the amendment as reflecting the McCarthy judgment. 10 The second one is presented in the Explanatory Memorandum as correcting the previous one, because British citizens rather than UK nationals have the right of abode in the UK. 11 After the amendments came into force, his sponsor not being an EEA national within the meaning of the national regulation transposing Directive 2004/38, Mr Lounes could not benefit from its provisions. He was thus invited to consider an application to remain in the UK on other grounds (Immigration rules and Art. 8 ECHR). Mr Lounes brought a claim before the High Court of Justice of England and Wales, Queen's Bench Division (Administrative Court) against this decision. This court had doubts as to the compatibility with EU law of this amendment of the EEA Regulation, and of the decision that Mrs Ormazabal could no longer rely on her rights as a Union citizen conferred by Directive 2004/38. It enquired as to the scope ratione personae of the Directive: can an EU citizen, having exercised her right of free movement and having subsequently acquired the nationality of the host Member State while keeping her former nationality, still rely, for her own benefit or for the benefit of her spouse, upon the rights conferred by Directive 2004/38?

Opinion of Advocate General Bot

Advocate General Bot began his analysis with "a preliminary remark" aiming to ensure that the situation should not be taken as a purely domestic one. First, he affirmed that there is an "inextricable link" between the exercise of the right conferred on the citizen by Directive 2004/38, and her acquisition of British citizenship: the exercise of her rights of free movement and residence entitled her to a right of permanent residence pursuant to EU law on the basis of which she acquired British citizenship. 12 "[T]he connecting factor with EU law, and with the provision of Directive 2004/38, is obvious". 13 Then, alluding to Rottmann,14 he stated that "the situation of Union citizens who … are placed by reason of their naturalization in a situation liable to entail the loss of the rights conferred by Directive 2004/38, falls, because of its nature and its consequences, within the ambit of EU law". 15 Advocate General Bot then used the "retained power formula",16 this time referring directly to Rottmann, to assert that while the conditions for the acquisition and loss of nationality fall within the competence of the Member States, they should have due regard to EU law when exercising their competences.

Coming to the High Court's question, the Advocate General dealt with the existence of a right of residence for third country national (TCN) spouses, first on the basis of Directive 2004/38, then on the basis of Article 21 TFEU. Concerning the Directive, he concluded that a citizen could not rely upon it in her own State of nationality, as expected. First, he recalled that the provisions of Directive 2004/38 do not confer any autonomous right on TCN who are family members of a Union citizen. Then, appealing to the sacred trilogy of EU law interpretative techniques, he stated that a "literal, systematic and teleological interpretation of the Directive" excludes a person such as Ms Ormazabal, and so her spouse, from its scope of application ratione personae. Provisions of the Directive, as stated by Article 3(1), govern the situation of a citizen and their family members "who move to or reside in a Member State other than that of which they are a national". So, the exercise of her freedom of movement is not sufficient to allow a citizen to fall within the scope of application ratione personae of the Directive when she resides in one of her States of nationality, even if she has another EU nationality.

As Mr Lounes could not benefit from any rights based on Directive 2004/38, Advocate General Bot enquired if he could benefit from a derived right of residence on the basis of the Treaty. Recalling that Article 21(1) TFEU has been given "an extremely dynamic interpretation" by the Court, he used mainly O. and B.17 as "a framework for interpretation". In that case, specifying the Singh model, the Court decided that the provisions of Directive 2004/38 should apply by analogy to the spouse of a citizen returning to their Member State of nationality when they have genuinely resided in another Member State. As the Advocate General explained, derived rights in O. and B. are justified, as in Singh and Eind,18 because granting less favourable treatment than was applicable to the family in the host Member State would deter the citizen or the worker from leaving his State of nationality. 19 The reasoning is rather sinuous, but could be seen as a typical figure of EU freedom of movement law: the obstacle experienced upon return is taken into account as an obstacle to leaving the Member State of nationality. 20 This solution "seems to [Advocate General Bot] transposable" to the case at hand. Though "there has been no physical movement", "by choosing to be naturalized in the host Member State, Ms García Ormazábal expressed her wish to live in that State in the same way as she would be prompted to live in her Member State of origin, building strong, lasting ties with the host Member State and becoming permanently integrated in that State". 21 The Advocate General drew a parallel between the citizen who returns to his State of nationality and the citizen who makes the host State his State of nationality. He seemed to hold that the acquisition of British nationality by Ms Ormazabal should be treated as would her return to Spain. To develop the underlying logic of the Opinion, it could be said that in both cases an EU citizen is newly settling in his State of nationality; physically when he moves; metaphorically when he is naturalized.

Advocate General Bot then moved on to assert that the application by analogy of Directive 2004/38 "is even more necessary" because of the "inextricable link" between the exercise of the right conferred by the Directive and the naturalization. This link exists because the right of permanent residence permits her to meet the conditions to be naturalized, but also because the naturalization is seen as the "logical conclusion" of "her integration in the host State". To deprive her of her rights, especially her family rights, because "she has sought to become more deeply integrated in the host Member State, would annihilate the effectiveness of the rights which she derives from Article 21 (1) TFEU". 22 It would be, he insisted, "illogical and full of contradictions". 23 So, he held that an EU citizen who has been naturalized in the home State, "following and by reason" of her residence under Article 16 of the Directive, must be able to live with her spouse under the same conditions that applied before her naturalization or that she would face if she moved to another Member State.

Advocate General Bot insisted on the fact that, to obtain a derived right of residence for her spouse, the citizen must have created a family life during the period of residence of the citizen, pursuant to Article 16 of Directive 2004/38, and mentioned that this was the situation of Mr Lounes and Ms Ormazabal. 24 However, 20 For a proposal to abandon these intricacies by recognizing "a right to go back to one's own country", see Spaventa, "Family rights for circular migrants and frontier workers: O and B, and S and G", 52 CML Rev. (2015), 753-777, at 775. For a discussion of the different interpretations that could be given to Singh, see Tryfonidou, "Family reunification rights of (migrant) Union citizens: Towards a more liberal approach", 15 ELJ (2009), 634-653, at 639 et seq. 21 Opinion, para 83. 22 Ibid., para 86. 23 Ibid., para 87. 24 See para 90 of the Opinion: "the effectiveness of the rights conferred by Article 21(1) TFEU demands that Union citizens, such as Ms García Ormazábal, who have acquired the nationality of the host Member State following and by reason of residence under and in conformity with the conditions set out in Article 16 of the Directive, should be able to continue the family life they have until then led in that State with their spouse, a third-country national" (my emphasis). See also the proposed operative part: "in situations such as that at issue, in which Union citizens have acquired the nationality of the Member State in which they have genuinely resided pursuant to and in conformity with the conditions set out in Article 16 of Directive 2004/38 and have during that period nothing attests that they were in such a situation. On the contrary, the Advocate General himself stated that they began a relationship four years after the naturalization of Ms Ormazabal. 25 There is an important discrepancy between the factual situation and the abstract formula presented as typifying that situation.

The Judgment

The Court confirmed that an EU citizen residing in her State of nationality does not fall within the definition of a "beneficiary" within the meaning of Directive 2004/38, even if the citizen has another EU nationality and she has exercised her freedom of movement. Therefore, someone in the situation of Mr Lounes could not benefit from a derived right of residence on the basis of the Directive. On the interpretation of Article 21 of the TFEU, the Court concluded, like the Advocate General, that the conditions for granting a derived right of residence to someone in the situation of Mr Lounes must not be stricter than those provided for by Directive 2004/38. Nonetheless, both the justification of this solution and its delimitation contrast significantly with the Opinion.

Mentioning O. and B. and Chavez-Vilchez and Others, the Court stated that a TCN family member of an EU citizen may be accorded a right of residence based on Article 21(1), and that this right is not autonomous but derived from the rights enjoyed by the Union citizen. Such a right exists, "in principle, only when it is necessary in order to ensure that the Union citizen can exercise his freedom of movement effectively". 26 This focus on movement is surprising and was absent from the Opinion of the Advocate General. 27 Nevertheless, it may not be taken too seriously; we might simply be before a case of mechanical circulation of formulas. Indeed, this is not the first time that the Court uses the formula establishing a connection between the derived right to reside and free movement. 28 The Court has even used this formula to justify a derived right of residence in the absence of connection with freedom of movement. 29 Moreover, the Court immediately tempered this assertion by saying that "[t]he purpose and justification of a derived right of residence are therefore based on the fact that a refusal to allow such a right would be such as to interfere, in particular, with that freedom and with the exercise and the effectiveness of the rights which Article 21(1) TFEU affords the Union citizen concerned". 30 Indeed, the Court then stated that the right to lead a normal family life is among created a family life with a third-country national" (my emphasis). This is even clearer in the original French version, where the A.G. states that family life should be created "à cette occasion". the rights conferred by Article 21(1) TFEU. 31 More than freedom of movement, it is this right to lead a normal family life that appears central to the reasoning: "[a] national of one Member State who has moved to and resides in another Member State cannot be denied that right merely because he subsequently acquires the nationality of the second Member State in addition to his nationality of origin, otherwise the effectiveness of Article 21(1) TFEU would be undermined". 32 To support its statement, the Court resorts to two series of arguments. It first states that denying a citizen in the position of Ms Ormazabal her right to lead a normal family life "would amount to treating him in the same way as a citizen of the host Member State who has never left that State, disregarding the fact that the national concerned has exercised his freedom of movement by settling in the host Member State and that he has retained his nationality of origin". 33 Although it is not adverted to, the presence of Garcia Avello is very palpable. This argument is also supported by another formula, secretly but obviously taken from Micheletti, 34 according to which "[a] Member State cannot restrict the effects that follow from holding the nationality of another Member State". 35 This will be discussed later.

The core of the reasoning to establish that the effectiveness of the rights (note the change to the plural, taken from the Court) conferred by Article 21(1) has been undermined is to be found in the second line of arguments. Adopting the reasoning of the Advocate General, the argument holds to the construction of Article 21(1) TFEU as being intended "to promote the gradual integration of the Union citizen concerned in the society of the host Member State" 36 and to a reading of naturalization in the host State as proceeding from the will "to become more deeply integrated in the society of [the State of naturalization]". 37 Forgoing rights destined to promote integration because one sought to integrate deeply would be "contrary to the underlying logic of gradual integration that informs Article 21(1) TFEU". 38 Therefore, the effectiveness of the rights conferred on EU citizens by Article 21(1) TFEU implies that citizens in the situation of Ms Ormazabal are still able to enjoy the rights arising under that provision after they acquire the nationality of the host Member State, and in particular, that they "must be able to build a family life with their third-country-national spouse, by means of the grant of a derived right of residence to that spouse". 39 The Court concluded that conditions for granting that derived right of residence to a TCN, who is family member of a Union citizen having exercised his right of free movement by "settling in" a Member State other than that of which he is a national, should not be stricter than those provided for in Directive 2004/38. The Directive must apply by analogy.

In the operative part of the Judgment, the Court delimited the situation in which this solution prevails in the following way: the citizen "(i) has exercised his freedom of movement by moving to and residing in a Member State other than that of which he is a national, under Article 7(1) or Article 16(1) of that Directive, (ii) has then acquired the nationality of that Member State, while also retaining his nationality of origin, and (iii) several years later, has married a third-country national with whom he continues to reside in that Member State". 40 Differences with the Opinion of Advocate General Bot should be underlined. First, the Court, taking its definition of genuine residence from O. and B., decided that residence pursuant to Article 7(1) of the Directive is sufficient. Then, as noted earlier, the Advocate General required that family life has been developed when that citizen was residing under EU law, while the Court underlined that the wedding took place several years after the naturalization. Finally, the Court mentioned that the sponsor should have kept their first nationality in the operative part, unlike the Advocate General.

Comments

This annotation will discuss various questions: the affirmation of a right to lead a normal family life (5.1); the respective role of dual nationality and free movement (5.2); how naturalization is linked to the right to move and reside by the intermediation of integration (5.3); and how Directive 2004/38 is used to avoid its own limitations (5.4).

A right to lead a normal family life conferred by Article 21 TFEU

For her spouse to obtain a derived right of residence, Advocate General Bot requires the citizen to have created a family life during the period of residence pursuant to Article 16 of Directive 2004/38. As mentioned earlier, he also noted that this was the situation of Mr Lounes and Ms Ormazabal, although it was clearly not the case.

Had the Court adopted this formulation, it would have been difficult for the referring judge to determine if someone in the situation of Mr Lounes could benefit from a derived right of residence. It would have to choose between privileging the solution implied by the case and favoring its formulation. To take the opposition proposed by Komárek in a slightly different context, the referring court would have to choose between a "case-bound model" and a "legislative model" of reasoning. 41 What might be taken as a misprint in the Opinion can be seen rather as a revealing confusion: it underlines why it is difficult to both take O. and B. as a "framework for interpretation" and conclude that, in a situation such as the one of Ms Ormazabal, the spouse may obtain a derived right of residence under EU law. Indeed, in cases following the Singh model, it is of a crucial importance that the citizen has developed her family life before coming back to her State of nationality.

Otherwise, the justification based on the obstacle to movement appears difficult to maintain. Advocate General Bot makes an analogy between the acquisition of nationality and the return to the home State. Accepting this analogy, the logic underpinning O. and B. justifies requiring a family life during the residence of the citizen in the host Member State. 42 However, this reference to O. and B. appears of little relevance for an EU citizen who had developed a family life when she was already a British citizen. If in 2009 Ms Ormazabal had returned to Spain instead of acquiring British citizenship, and several years after her return developed a family life there with Mr Lounes, it is difficult to imagine that her husband could obtain a derived right of residence following O. and B. In O. and B., the Court recognized such a right for situations "where a Union citizen has created or strengthened a family life with a third-country national during genuine residence". 43 If the deterrent effect on movement is more assumed than established in most of the cases decided by the Court following Singh, it seems untenable to assume such an effect when family life starts after the return. 44 It would have been possible for the Advocate General to choose another interpretation of Singh according to which the granting of family rights does not need to be directly linked to the exercise of free movement. This would correspond to the "liberal approach" according to Tryfonidou, where "the mere proof of the existence of the requisite family link, together with the exercise of some kind of inter-state movement, suffices for the bestowal by the Treaty free movement of persons provisions of automatic family reunifications rights on third-country nationals and their Member State national family members". 45 Nevertheless, this interpretation does not fit with O. and B. which clearly interprets Singh and Eind as justified by the deterrent effect on leaving. Far from contesting this reading, Advocate General Bot explains that "[t]he ratio decidendi for this approach was that if the third-country national had no such right, the worker, a Union citizen, could be deterred from leaving the Member State of which he is a national". 46 The Court did not follow this reasoning based on the Singh model. It stated that the right to lead a normal family life is conferred by Article 21(1) TFEU, mentioning neither the Charter nor the ECHR. 47 One should note the originality of this statement; it strongly differs from O. and B. While the possibility of leading a family life when returning to the home State was crucial, the right to family life was significantly absent in the ruling. It also contrasts with Metock, even if the Court mentions this last case as a reference in paragraph 52 of Lounes. Although emblematic of the "liberal jurisprudence" of the Court, this case did not go as far as recognizing a self-standing right to lead a family life, but states that "if Union citizens were not allowed to lead a normal family life in the host Member State, the exercise of the freedoms they are guaranteed by the Treaty would be seriously obstructed". 48 Finally, it is also different to stating that a provision should be interpreted in the light of the fundamental right to respect for family life (like in Carpenter), 49 or to deciding that the right to respect for family life, as enshrined in Article 7 of the Charter or Article 8 of the ECHR, should be taken into account by the Member State (as in Dereci, Chavez-Vilchez and Others or Rendón Marín). 50 In the Singh model, at least under its interpretation in O. and B., family life is not really presented as a right, but as a factual situation impeding free movement rights. Recognizing, as the Court does, that a TCN should benefit from a derived right of residence even if he has married the citizen several years after the latter has acquired the nationality of the State of residence entails a different vision of family life. It is no longer sufficient to consider the effect on free movement of not being able to continue a family life developed in another Member State, even in a very wide interpretation of what counts as an obstacle to movement. The question is not whether Ms Ormazabal could continue to enjoy the family life she was enjoying under the protection of EU law, it is whether she would lose the right to develop such a family life. One important question that is not answered is how long she should keep such a right. The Court only states that this is possible in the case of a wedding taking place "several years" after the naturalization.

Dual nationality and/or the exercise of free movement rights?

The respective roles of dual nationality and freedom of movement in the Opinion and in the Judgment are difficult to fathom. Dual nationality is not really considered by the Advocate General: in reasoning inspired by O. and B., the change of status is important but not the conservation of the first one. On the contrary, dual nationality seems to play an important role in the justification given by the Court. It is mentioned in the operative part of the judgment. However, the reasoning of the Court is rather confusing and the relation between dual nationality and the exercise of free movement rights is far from clear. Dual nationality figures at two stages of the ruling: first to trigger EU law, then to establish that the effectiveness of the rights conferred by Article 21 (1) TFEU would be undermined.

Regarding the "connecting factor" that triggers the application of EU law, as already mentioned, the Advocate General refers to Rottmann. This reference is surprising. First, the situation in Lounes is rather different. What is to be lost is not the status of EU citizen, but the possibility of benefiting from rights deriving from this status in one Member State; and the cause of this loss is not the withdrawal of a Member State nationality but the acquisition of a second one. Second, what was at stake were not the conditions of acquisition or loss of a nationality, but the consequences attached to it by a specific piece of legislation. Third, appealing to the nature and the consequence of the situation to establish the connection with EU law might not be necessary. As the Advocate General notes, it was not contested that the citizen used her freedom of movement. Choosing to reason using Rottmann is significant. It may be seen as an answer to Pham, 51 where the UK Supreme Court directly contested Rottmann, and which was mentioned before the national court.

The ECJ's reasoning is completely different from that followed by the Advocate General. It has recourse neither to Rottmann nor to previous movement pursuant to EU law, but, referring to Freitag, it states in paragraph 50 that "there is a link with EU with regard to nationals of one Member State who are lawfully resident in the territory of another Member State of which they are also nationals". While Freitag has been decided recently, the Court appeals indirectly to highly emblematic rulings of citizenship case law. The first part of the formula comes directly from Martínez Sala. 52 The last words can be seen as the assertion, famously made in Garcia Avello, that the formula is not defeated by the fact that the citizen is also a national of the host Member State. 53 The extremely wide formula of paragraph 50 may allow a dual national to trigger EU law as soon as he resides somewhere legally in an EU State, even in one of his States of nationality. It recalls the sentence of Advocate General Jacobs that "it cannot be acceptable that one nationality should eclipse the other depending on where they happen to be". [START_REF] Jacobs | Case C-148/02[END_REF] To take the expression coined by Steve Peers, a dual national could be seen as "Schrodinger's EU citizen", 55 being at the same time a national of the State where he resides and a national of another Member State. In relation to the second quality, the Court decided that he may rely on the rights provided for by Article 21(1) TFEU, including the right to lead a normal family life. As in Garcia Avello, the Micheletti formula entails that the status of national of the host State does not interfere with the rights enjoyed by the citizen as the national of another State. [START_REF]A Member State cannot restrict the effects that follow from holding the nationality of another Member State[END_REF] It may be said that the Court is attaching the right to lead a normal family life to Article 21 TFEU, as it has attached the right not to suffer discrimination on grounds of nationality to Article 20 TFEU in Martínez Sala 57 . In Lounes, the Court did not mention any provision recognizing a right to family life, whereas it could have said that this right resulted from Article 7 of the Charter. Obviously, this could be criticized: the right to move and reside freely provided for by Article 21 TFEU is subject to the limitations and conditions laid down in the Treaties and by the measures adopted to give them effect, whereas the Charter applies only when Member States are implementing Union law. Nevertheless, one should remember that Martínez Sala was subject to the same kind of criticism: the right laid down in Article 18 TFEU is also limited to the scope of application of the Treaties and Article 20 TFEU states that the citizen "shall enjoy the rights and be subject to the duties provided for in the Treaties". [START_REF] Sala | Criticizing the circularity of the reasoning[END_REF] Nonetheless, the Court did not go as far as totally applying the logic followed for non-discrimination to family life. First, the right is not directly attached to the status of EU citizen but to the right to move and reside freely. Then, the Court also underlined that Ms Ormazabal has exercised her freedom to move and reside in a Member State other than her Member State of origin 59 . This would not be relevant following Garcia Avello logic, but this takes into account McCarthy, where the Court decided that Article 21 TFEU was not applicable to a dual national who had never exercised her right of free movement, except in the case of deprivation of the genuine enjoyment of the substance of the rights conferred by virtue of her status as a Union citizen (Ruiz Zambrano like situation) or in the case of impediment of the exercise of her right of free movement and residence within the territory of the Member States (Grunkin and Paul like situation).

As already noted, dual nationality is also present later in the ruling, when the Court asserts that refusing to grant a right to family life to Ms Ormazabal would be treating as similar a national who "has exercised his freedom of movement by settling in the host Member State" while "retain[ing] his nationality of origin" and "a citizen of the host Member State who has never left that State". 60 First, what is confusing is that the Court applies the Aristotelian conception of equality entailing that "different situations must not be treated in the same way", famously applied in Garcia Avello. 61 However, this conception of equality has been widely criticized and since then has not been used in citizenship case law. [START_REF]To my knowledge. For a critique, see Ackermann, annotation of Case C-148/02[END_REF] Then, a crucial difference is that the Court also takes into consideration the movement of Ms Ormazabal. At first sight, it even recalls D'Hoop: the Court is comparing citizens who have exercised their freedom of movement and citizens who have not. [START_REF] Iliopoulou | A new approach to discrimination against free movers?[END_REF] Nonetheless, the Court is no longer sanctioning discrimination against the movers. [START_REF] Hoop | Office national de l'emploi[END_REF] It is, on the contrary, sanctioning similar treatment of free movers and nationals where they are taken to be in different situations, thus justifying different treatment. In that part, the Court is comparing the situation of dual nationals who have moved, such as Ms Ormazabal, with British citizens who have never moved. It is difficult to assess the respective importance of movement and dual nationality in defining these two groups of British citizens which should be treated differently. Nevertheless, this part of the ruling justifies a reverse discrimination, allowing British free movers and/or dual nationals to be treated differently from settled British citizens.

Consequently, what dual nationality implies is far from clear. The Court uses some of its most famous and contested formulas in a new context and with important modifications, without referring to the original cases, let alone explaining why they could be used in the situation at hand. 65 This has important consequences in assessing the scope of the ruling. Considering the different situations resulting from the exercise of movement, dual nationality is not relevant, as in the reasoning proposed by the Advocate General. What is decisive is that a national of a Member State acquires the nationality of another Member State. One should recall that the Court has even recognized the right not to suffer discrimination on grounds of nationality for a naturalized citizen who did not keep his previous nationality -considering him an "honorary foreigner". 66 On the contrary, in a reasoning inspired by Garcia Avello, dual nationality could be important in triggering EU law when a citizen is living in one of his States of nationality. 67 In that case, even if one adopts McCarthy, a connection between movement and naturalization does not appear necessary. Dual nationals since birth or by wedding may be concerned by this solution, provided they have previously used their free movement rights. 68

Naturalization as "the logical conclusion" of the EU citizen's integration

The Court, adopting the reasoning of Advocate General Bot, presents Article 21 (1) as promoting the "gradual integration" of the Union citizen in the society of the host Member State. Integration is seen as the prolongation of the exercise of free movement by a citizen who decides to settle in another State and can do so pursuant EU law. Naturalization is presented as the "logical conclusion" of integration, in the terms of the Advocate General,69 or as a way to "become more deeply integrated in the society of that State", in the terms of the Court. 70 So, naturalization is conceived as the extension of integration, which is itself seen as the extension of the right to move and reside in another Member State conferred by Article 21(1). Following this rationale, to speak in free movement terms, it could be said that deterring naturalization impedes the effectiveness of Article 21(1). This is clear in paragraph 59 of the judgment. The Court notes that "Union citizens who have exercised their freedom of movement and acquired the nationality of the host Member State in addition to their nationality of origin would, in so far as their family life is concerned, be treated less favourably than Union citizens who have also exercised that freedom but who hold only their nationality of origin". 71 The Court is no longer comparing citizens who have physically moved and citizens who have not. It is comparing, among citizens who have moved, those who have acquired British citizenship and those who have not. Restricting the movement of status would be similar to restricting physical movement. The acquisition of another European nationality by an EU citizen should not be discouraged by the prospect of losing his rights to family life.

The relationship between integration and free movement in the ECJ case law could take different forms, which have changed over time, but which have arguably coexisted at the same time, in different cases or in different readings of the same cases. 72 The conception expressed in Lounes does not fit with a vision where integration is strictly instrumental to free movement, as in a case like S and G. 73 Integration and family life are conceived rather as the prolongation of movement. The Court is not trying to demonstrate that refusing a right to family life would deter the citizen from moving. It is defending the idea that movement in another society should not be detrimental to family life. Integration is seen as an objective if not as a right entailed by Article 21(1). 74 As the affirmation of a right to lead a normal family life already suggests, family life is protected in itself. The loss of the right to lead a normal family life is taken as impeding the effectiveness of Article 21(1), without any discussion of the effect of this loss on movement.

Considering naturalization, it seems at first glance that the Court is attaching great importance to nationality, traditionally suspect in the context of free movement. Looking closer, it is necessary to add that, though the Court considers naturalization, it has been reconstructed in EU terms and it has acquired a meaning specific to an EU perspective. Conceiving naturalization as the logical consequence of the EU citizen's integration, the Advocate General and the Court see the loss of rights stemming from EU citizenship as paradoxical and difficult to accept. On the contrary, before the national court, the Secretary of State for the Home Department defended a different conception of naturalization: "the acquisition of citizenship of a host Member State is a choice, to which advantages and disadvantages will attach". 75 In that national perspective, where nationality is a set of rights and duties, 71 Judgment, para 59. Nonetheless, what is considered as illogical from a national point of view is not only that some nationals are offered better treatment than other nationals, but the fact that, overall, nationals have less rights than EU citizens concerning family reunification. This is what is expressed in some Newspaper titles criticizing the ruling: "EU citizens don't have to face same tough rules as Britons when bringing non-EU family members to UK, ECJ rules". 77 The heart of the matter, as is often the case in reverse discrimination cases, is to explain why a Member State treats its own nationals less favourably than EU citizens. As Advocate General Sharpston notes, "by denying residence, that Member State might be at risk of de facto 'expelling' its own nationals, forcing them either to move to another Member State where EU law will guarantee that they can reside with their family members or perhaps to leave the European Union altogether. Such a measure sits oddly with the solidarity that is presumed to underlie the relationship between a Member State and its own nationals". 78 In Directive 2004/38, rights conferred on EU citizens depend in part on the passage of time, a new situation in EU law. 79 For the first three months, the right to reside in another Member State is free of conditions, following Article 6. Then, before permanent residence, the right to move and reside and the equality promised to EU citizens depends on the fulfilment of the conditions provided for in Article 7 (i.e., for citizens without a specific quality, having sufficient resources and a comprehensive sickness insurance). The status of permanent residence frees the citizen from these requirements and gives enhanced protection against expulsion. If it sets a "gold standard" 80 for EU citizens and their family members, Lounes could be read as recognizing that the possession of this status is not enough to be integrated as a national could be. The Court states that acquiring the nationality of a Member State demonstrates the intent of the citizen "to become permanently integrated in that State". 81 The link between nationality and integration could also be found in previous case law, when the Court took nationality as a sign of the integration of a national in his State of nationality. In the logic underpinning the ruling, the acquisition of nationality is stemming from the exercise of EU citizenship rights. From that perspective, nationality could be seen, beyond merely a national status, as another European status that an EU citizen could possess, going further than the status of permanent resident. We should recall that a classic observation about EU citizenship status is that, like a "federal citizenship", its horizontal dimension is predominant. "The full integration of a Frenchman in the Italian society leads more to the 'Italianization' of this person than to the construction of 'Europeans' from French and Italians". 83 This statement is taken seriously in Lounes: EU citizenship is presented as allowing the Spanish citizen to be Britishized, or, more exactly, to be Britishized while keeping a specific status that distinguishes her from settled British citizens. The acquisition of the nationality of the host State falls within the ambit of EU citizenship law.

This Europeanization is nonetheless limited. The Court does not recognize a right to be naturalized, neither does the Advocate General despite him referring to Rottmann. 84 It only allows naturalization not to have an adverse effect in the enjoyment of rights stemming from Article 21(1), especially the right to lead a normal family life in the host Member State. Moreover, one should not forget that even if the facts of the case do not take place in a Brexit context, the ruling of the Court does. Acquiring British nationality for an EU citizen or acquiring another European nationality for a British citizen takes on a different meaning: more than expressing the feeling of being more integrated, it expresses the necessity to be naturalized to safeguard the rights enjoyed as an EU citizen in the absence of a withdrawal agreement securing these rights. If the judgment does not directly tackle this question, its conclusion may allow EU citizens who feel the need to adopt another nationality to avoid losing some of the rights they enjoy as EU citizens.

This line of justification, common to the Opinion and to the judgment, does not really clarify the reach of the solution. As in the justification transposing O. and B., what is important is the acquisition of the new status -presented as the apex of the citizen's integration. From that perspective, it is difficult to affirm that dual nationality should be relevant. Even if the Court has recognized the possibility of being integrated in different European societies, renouncing one's nationality while acquiring the nationality of the host State could be hard to conceive as expressing a weaker desire to be integrated in the latter. Different from the reasoning transposing O. and B., it does not seem to be relevant that naturalization occurred before the development of family life.

Playing off the Directive against itself

Lounes certainly will not figure as an act of deference towards the European legislature. As in O. and B., the Court first states that Directive 2004/38 should not apply, but, later, that it should apply by analogy in virtue of the Treaty. This contrasts with the technique adopted in Singh, in the context of the freedom of establishment, where the Court justified its solution by mentioning the Treaty and the Directive in question "properly construed". 85 What is new and striking in Lounes is that the Directive plays a crucial role in the interpretation of the Treaty itself. The Court is elliptical: it only talks of "the underlying logic of gradual integration that informs Article 21(1) TFEU". 86 This logic of gradual integration, essentially to be found in Directive 2004/38, 87 is assigned to Article 21(1) by the Court in order to escape the limitations set down in the Directive (and mentioned in Art. 21(1)). In that sense, the Directive is played off against itself. This instrumentalization of the Directive could also be seen in the way the Court uses its conceptual apparatus to determine when Article 21(1) applies and what follows from this application. By using the categories of Directive, it escapes a case-bycase analysis, which could be found in other contexts. 88 First, the Court uses the categories of the Directive to determine which situation can lead to the recognition of a derived right of residence. In the operative part, it requires residence under Articles 7(1) or 16(1). This technique has already been used in O. and B. to assert a "genuine residence" on the part of the citizen in the host State before his return -residence under Article 6 is excluded, probably so as not to cover nationals who go abroad in order to bypass national law. 89 In Lounes, the justification for this limitation is less clear -the Court mentions the citizen who "has exercised his freedom of movement by settling in the host Member State". 90 Nevertheless, there is no discussion about the different forms of movement, contrary to O. and B. and to the Opinion of the Advocate General. This requirement has the consequence of excluding citizens who do not meet the conditions of the Directive or dual nationals who have not resided in the host State in application of EU law (for instance dual nationals since birth). In the rhetoric used by the Advocate General and the Court, it allows the assertion of the link between EU law and the situation: naturalization is constructed as the prolongation of the exercise of the rights recognized by the Directive.

Further, as in O. and B., what follows from the application of Article 21(1) is the application "by analogy" of Directive 2004/38. This permits the circumscription of the "right to lead a normal family life" found in Article 21 by the Court. So, this right has the same limitations: it concerns only family relations recognized by Articles 2 and 3 of the Directive. Beyond the critiques that could be addressed to 85 Case C-370/90, Singh, para 25. 86 Judgment, para 58. It nonetheless mentioned Recital 18 in the presentation of the legal context; ibid., para 3. 87 Recital 18 considers that the right to permanent residence aims to be "a genuine vehicle for integration into the society of the host Member State". Recital 24 explains that "the greater the degree of integration of Union citizens and their family members in the host Member State, the greater the degree of protection against expulsion should be". 88 To determine if the situation led to a restriction to Art. 21 TFEU, see e.g. Case C-60/00, Carpenter or Case C-457/12, S. and G. To assess the integration of the citizen, see e.g. Case C-359/13, Martens. 89 By doing so, the Court excludes situations that might have been included in a case-by-case consideration. It should be recalled that, unlike the Court, A.G. this limitation, the application, "mutadis mutandis", 91 of the Directive to situations to which it is not supposed to apply, leads to some difficulties. 92 The Latin locution used by the Advocate General implies that something needs to be changed in the application of the rule. This results from the fact that the Court did not go as far as only viewing the dual national residing in one of his States of nationality as a national of one Member State residing in the territory of another Member State. If it had done so, it would have been possible to apply directly Directive 2004/38 without using Article 21(1) and its conditions and limitations would apply for a national. The Secretary of State defended this approach in McCarthy: it refused to grant Ms McCarthy a residence permit because she did not meet the conditions required by the Directive 2004/38 and not because she was also a British citizen. 93 The Court did not follow this reasoning. In Eind, it already decided that the right of a national to go back and reside in his State of nationality cannot be refused or made conditional. 94 In McCarthy, it clearly stated that Directive 2004/38 could not apply directly to a dual national residing in one of his States of nationality as he "enjoys an unconditional right of residence due to the fact that he resides in the Member State of which he is a national". 95 So, contrary to what the Court is saying, the application by analogy does not necessarily equal the necessity that "the conditions for granting that derived right of residence must not be stricter than those provided for by Directive 2004/38". 96 The situation of someone like Ms Ormazabal can be more advantageous than that of a national of another Member State residing in the UK. Indeed, the latter would be subject to the conditions set down in the Directive whereas they do not apply to the naturalized citizen. True, this should be nuanced because the naturalized citizen should also have met these conditions in the past, as the Court required that they have been resident under Article 3 or 16 of the Directive. Nevertheless, it is no longer required of someone like Ms Ormazabal, whereas if she had not acquired British citizenship, she would still need to meet the conditions provided for by the Directive before acquiring a right to permanent residence.

Conclusion

The ruling under examination is far from clear. The difficulty is in part a classic one, and lies in the relationship between what is decided in a specific case -even a hypothetical case like in a preliminary reference -and the justification given for this decision. the characteristics of this situation are. Nonetheless, depending on the reading of the judgment adopted, one could consider dual nationality, the exercise of free movement rights, or the moment when family life begins as being decisive in reaching that solution. All this might be seen as technicalities reserved to EU lawyers, but is crucial to determining the scope of application of the solution given in Lounes.

The difficulty is connected to the fact that in Lounes the Court uses well-known formulas of its citizenship case law, decided to solve specific cases, and transposes them to a different context, without always mentioning the original cases, let alone explaining why they could be used in the situation at hand. This is no particularity of the Lounes case. In fact, the ECJ case law is replete with such instances of "decontextualization" and circulation of formulas. 97 The formulas coined by the Court to decide this case might circulate in the future as well. Thus, even though the situation of Ms Ormazabal and Mr Lounes was not at all related to Brexit, the judgment might prove crucial in the Brexit context, especially in the absence of a withdrawal agreement securing the rights of EU citizens.

Indeed, Lounes might be read as a signal that the Court will protect British citizens living in another Member State and willing to acquire another EU nationality, and EU citizens living in the UK and willing to acquire British citizenship. From this point of view, one might say that in Lounes, like in Commission v. UK98 mentioned in the introduction, the Court has played politics. Still, in contrast to that case, in Lounes the Court has not shown deference to avoid criticism. Through a daring interpretation of Article 21 TFEU, it protects an EU citizen against her own State. Lounes may rather be seen as an activist case and might even be used as an argument to limit the role of the Court after Brexit day, a question which will be part of the withdrawal agreement.

Beyond Brexit, the Court's justification and the formula it coined to decide Lounes may be used in the future to develop the status of EU citizen in different ways. The recognition of a right to lead a normal family life directly conferred by Article 21(1) TFEU may be used to develop the protection of EU citizens.

Further, Lounes in a way rearticulates the status of national of a Member State and the status of EU citizen. Being a Member State national is no longer only the condition for being an EU citizen. The status of national of a Member State is constructed as the logical conclusion of the EU citizen's integration in another Member State. At first this appears as a recognition of the limitation of the status of EU citizen: being treated as a national is not the same thing as being a national. In a gradual citizenship, nationality of the Member State of residence would be a higher status than that of permanent resident conferred by Directive 2004/38. However, another way to see things is to say that in Lounes, the status of national is, to some extent, Europeanized. Naturalization is seen as the prolongation of free movement and is subject to the Court's review. EU citizenship not only permits a

72

  One can think of the different readings of Case C-370/90, Singh or Case C-60/00, Carpenter. 73 Case C-457/12, S. v. Minister voor Immigratie, Integratie en Asiel and Minister voor Immigratie, Integratie en Asiel v. G, EU:C:2014:136. 74 See Azoulai, "La citoyenneté européenne, un statut d'intégration sociale" in Cohen-Jonathan, Constantinesco and Michel (Eds.), Chemins d'Europe: mélanges en l'honneur de Jean-Paul Jacqué (Dalloz, 2010), p. 19. 75 Lounes, R v. Secretary of State for the Home Department [2016] EWHC 436 (Admin), para 51. certain rights stemming from EU law.

  82 76 Concerning duties and EU citizenship, see e.g. the debate between Kochenov and Bellamy. Kochenov, "EU citizenship without duties", 20 ELJ (2014), 482-498; Bellamy, "A duty-free Europe? What's wrong with Kochenov's account of EU citizenship rights", 21 ELJ (2015), 558-565. 77 Crisp, "EU citizens don't have to face same tough rules as Britons when bringing non-EU family Opinion of A.G. Sharpston in Case C-456/12, O. and B., para 86. 79 Time is nonetheless mainly read in economic terms. See Mantu, "Concepts of time and European citizenship", 15 European Journal of Migration and Law (2013), 447-464. 80 Guild, Peers and Tomkin, The EU Citizenship Directive: A Commentary (OUP, 2014), p. 203. 81 The Court had already mentioned the choice of being permanently integrated in the host Member State in a different context, talking of the long-term residence status of Turkish citizens pursuant to the EC-Turkey Association Council Decision 1/80. Case C-329/97, Sezgin Ergat v. Stadt Ulm, EU:C:2000:133, para 43. 82 See e.g. Case C-359/13, B. Martens v. Minister van Onderwijs, Cultuur en Wetenschap, EU:C:2015:118, para 51.

	members	to	UK,	ECJ	rules",	The	Telegraph	(14	Nov.	2017)
	<www.telegraph.co.uk/news/2017/11/14/eu-citizens-dont-have-face-tough-rules-britons-bringing-
	non/>, accessed 8 Apr. 2018.

78

  Sharpston proposed a case-by-case assessment; see Opinion in Case C-456/12, O. and B., EU:C:2013:837, paras. 95-111. 90 Judgment, para 54 and operative part (my emphasis).

  It is made more acute in Lounes because different lines of reasoning are used to justify someone in the situation of Mr Lounes benefiting from a derived right of residence. In the operative part, the Court circumscribed very closely what 91 Opinion, para 84. 92 For a critique of this application of the Directive "to situations which do not fit", see Spaventa, op. cit. supra note 20, at 774 et seq. 93 Case C-434/09, McCarthy, para 17.

94

Case C-291/05, Eind, para 31.

95

Case C-434/09, McCarthy, para 34.

96

Judgment, para 61.

Case C-434/09, Shirley McCarthy v. Secretary of State for the Home Department, EU:C:2011:277.

Ms McCarthy did not reach the threshold that is required for Art. 20 TFEU to apply directly.

Explanatory note to SI 2012/1547. See Lounes, R v. Secretary of State for the Home Department [2016] EWHC 436 (Admin), para 25.

Explanatory memorandum to SI 2012/1547. See Lounes, R v. Secretary of State for the Home Department, para 26.

It was disputed that Ms Ormazabal has resided in the UK under Art. 16 of Directive 2004/38 before the national court. The UK Government accepted it later. See Judgment, para 38.

Opinion, para 36.

Case C-135/08 Janko Rottman v. Freistaat Bayern, EU:C:2010:104.

Ibid., para 39. Compare to para 42 of Rottmann : "the situation of a citizen of the Union … in a position capable of causing him to lose the status conferred by Article 17 EC and the rights attaching thereto falls, by reason of its nature and its consequences, within the ambit of European Union law".

Azoulai, "The 'retained powers' formula in the case law of the European Court of Justice: EU law as total law?", 4 European Journal of Legal Studies (2011), 192-219.

Case C-456/12, O. v. Minister voor Immigratie, Integratie en Asiel and Minister voor Immigratie, Integratie en Asiel v. B., EU:C:2014:135.

Case C-291/05, Minister voor Vreemdelingenzaken en Integratie v. R. N. G. Eind, EU:C:2007:771.

Opinion, para 77.

See e.g. Case C-40/11, Yoshikazu Iida v. Stadt Ulm, EU:C:2012:691, paras. 68-72.

These conditions can be found in the first sentence of the operative part, interpreting Directive 2004/38. Nevertheless, the second sentence, interpreting Art. 21 TFEU, should be read as following the first one, as is clear in the French version where they form only one paragraph.

Komárek, "Reasoning with previous decisions: Beyond the doctrine of precedent", 61 AJCL (2013), 149-173.

This is the reasoning followed by the A.G.; see para 90 of the Opinion and the operative part proposed by the A.G.

Case C-456/12, O. and B., operative part (my emphasis). The case of Mr B. led the Court to be extremely clear: to rely on Art. 21 TFEU, the TCN must have, "at least during part of his residence in the host Member State, the status of family member, within the meaning of Article 2(2) of Directive 2004/38" (para 63).

Speaking of a presumption in O. and B., see Spaventa, op. cit. supra note 20, at 770. Explaining that this reasoning could not hold as movement didn't have any impact on Mr Singh's right of residence in Singh, see Tryfonidou, op. cit. supra note 20, at 640.

Tryfonidou, op. cit. supra note 20, at 639.

Opinion, para 77.

This is an example of what has been criticized as "formulaic reasoning". See Šadl, "Case -caselaw -law: Ruiz Zambrano as an illustration of how the Court of Justice of the European Union constructs its legal arguments", 9 EuConst (2013), 205-229.

 66 Case C-419/92, Ingetraut Scholz v. Opera Universitaria di Cagliari and Cinzia Porcedda, EU:C:1994:62. The expression is taken from Somek, op. cit. supra note 57, pp. 216-

217. 67 This situation is different from that in which a dual national is not living in his State of nationality, where triggering EU law is less problematic. This was the situation of Mr Collins, who was a US and Irish national living in the UK. See Case C-138/02, Collins, EU:C:

2004:172.68 On this, see Peers, "Dual citizens and EU citizenship: Clarification from the ECJ" <eulawanalysis.blogspot.com/2017/11/dual-citizens-and-eu-citizenship.html>, accessed 6

 Apr. 2018. 69

Opinion, para 85.70 Judgment, para 58.

See Schönberger, "La citoyenneté Européenne en tant que citoyenneté fédérale", 1 Annuaire de l'Institut Michel Villey (2009), 255-274, at 273.

On this reference and the differences between the situation of Mr Rottmann and Ms Ormazabal, see supra (section 5.2.).

On this point, see Réveillère, Le juge et le travail des concepts juridiques: le cas de la citoyenneté de l'Union européenne (European University Institute, 2017), at 296 et seq.

Case C-308/14, Commission v. United Kingdom. *Aix-Marseille University. I thank Afroditi Marketou and the anonymous reviewers for their very helpful comments.