DEFINABLE

. The motivation for this paper is to extend the known model the- oretic treatment of diﬀerential Galois theory to the case of linear diﬀerence equations (where the derivative is replaced by an automorphism.) The model theoretic diﬃculties in this case arise from the fact that the corresponding theory ACFA does not eliminate quantiﬁers. We therefore study groups of restricted automorphisms, preserving only part of the structure. We give conditions for such a group to be (inﬁnitely) deﬁnable, and when these conditions are satisﬁed we describe the deﬁnition of the group and the action explicitly. We then examine the special case when the theory in question is obtained by enriching a stable theory with a generic automorphism. Finally, we interpret the results in the case of ACFA, and explain the connection of our construction with the algebraic theory of Picard-Vessiot extensions. The only model theoretic background assumed is the notion of a deﬁnable set.


Introduction
A linear differential equation is an equation of the form Dx = Ax, where D is a (formal) derivation, A is a matrix over some base differential field, and x is a tuple of variables. To any such equation, it is possible to associate a certain extension of differential fields, the Picard-Vessiot extension, that contains a system of solutions to this equation. The Galois group of the equation is defined to be the automorphism group of this field. In [12], it is shown that when the base field is Q(t), with Dt = 1, this Galois group is always computable.
The fundamental observation for the results of that paper, is that there is a model theoretic interpretation of this Galois group. More precisely, there is a general definition of the notion of "the group of automorphisms of a definable set Q over another definable set C". When Q is internal to C (i.e., has a definable family of bijections into C; see section 2.1 for the definition), this group turns out to be the group of points of a type-definable group. This fact is also explained in [12], in appendix B.
To apply the general construction to linear differential equations, one considers the theory of differentially closed fields (DCF ), the model completion of the theory of differential fields (with constant symbols for the base field.) The equation Dx = Ax is then a interpreted as the definable set Q, while the set of constants Dx = 0 plays the role of C. The internality condition corresponds to the fact the Q is a finite dimensional vector space over C, and thus has a definable family of bijections with some power of C. To identify the model theoretic group with the (algebraic) Galois group, one may embed the Picard-Vessiot extension into a model of DCF , and then use the fact that DCF eliminates quantifiers.
The purpose of the present work is to describe in more detail the construction of the model theoretic group of automorphisms, and to generalise it in a way that will be suitable for dealing with difference equations. A linear difference equation is an equation of the form σ(x) = Ax, where σ is a formal automorphism, and A, as before, is a matrix over some base difference field (i.e., a field with a prescribed automorphism.) The algebraic theory of this case is described in [23]. It is analogous to the case of differential equations, but differs in some points. In particular, the Galois group is only constructed in the case that the subfield of constant elements of the base field is algebraically closed.
From the model theoretic point of view, there are two essential differences between this case and the case of differential equations: First, the theory of algebraically closed fields with an automorphism (ACF A), which is the analogue of DCF in this case, does not eliminate quantifiers. In particular, there are definable subsets of the set defined by the equation that are not algebraic (quantifier free definable), and the original construction would produce the group of automorphisms preserving all such definable sets, not only the quantifier free ones (see also example 10, proposition 31 and example 32). The algebraic Galois group, in contrast, preserves the algebraic structure only. Thus we need to construct a group of automorphisms that preserves only some definable sets.
The other distinction of this case is that, though the Galois group is constructed as the automorphism group of a certain Picard-Vessiot extension, this extension may have zero-divisors. Therefore, even when the quantifier free group is constructed, it is not clear that it coincides with the algebraic Galois group.
There are also intrinsic questions associated with the original constructions. Specifically, if the automorphism group is definable, we may consider its points in an arbitrary model, not just a saturated one. Our new description interprets every such group as a group of automorphisms. Additionally, the formulas defining the group are produced explicitly.
We now briefly summarise the contents that follow. In section 2 we give the definitions of automorphism groups and of internality, and describe conditions for the automorphism group G to be (type-) definable. In the case when these conditions are satisfied, we show this by presenting the definition of the group explicitly. We also compare this group with the original construction in [12]. We consider the dependence of the automorphism group on the internality datum, and show that it is essentially independent. Finally, we describe a definable family of groups, that act on the G-torsor used to construct G. The algebraic Galois group, considered in [23] and in section 4, is eventually identified with a member of the Zariski closure of this family.
In section 3 we approach closer to the example of ACF A, and consider theories obtained from a stable theory by adding a generic automorphism. The goal is to obtain a more precise description of the definition of the group, as given by equations over the base structure. In the case of ACF A (where the stable theory is ACF ), this means polynomial equations. It turns out that the existence of such a description follows essentially from the stability alone.
Finally, in section 4 we consider the case of ACF A itself. We describe the interpretation of the structure we obtained in previous sections for this case, as well as some more specific features that follow mainly from the Noetherian property in this case. We then explain the connection with the algebraic Galois group of [23], and also consider some examples.
For completeness, an appendix is included where the basic model-theoretic results used in the paper are briefly explained. This should hopefully make the paper accessible to readers with no model theoretic background.
Acknowledgement. This work is part of my PhD research, performed in the Hebrew university under the supervision of Ehud Hrushovski. I would like to thank him for his guidance, and in particular for suggesting this subject, which, among other things helped me to begin understanding stability theory.
I would also like to thank the referee for the careful reading and useful comments.
1.1. History. Definable automorphism groups first appeared in the context of strongly minimal theories, in works of Zil ′ ber (cf. [25]), where they are called binding groups. Poizat observed, in [19], that this construction can be used to give a model theoretic interpretation of differential Galois theory. This approach was taken further by Pillay,in [17] (and [18]), who extended the algebraic work of Kolchin. In the abstract setting, the results on the binding groups were extended by Hrushovski to the stable case in [11]. They were further extended to simple theories in various places, including [10] and [1]. The ultimate result, on which this work is based, appears in appendix B of [12], where the automorphism group is proved to exist with the sole assumption of internality. The main addition of the current work in this respect is the elementary and explicit description of this group, from which the extension to partial automorphisms is clear (as well as the fact that the binding group is an intersection of definable groups, even in the unstable case.) The interpretation of this theory in terms of definable groupoids appears in [13].
Theories of the form T σ appearing in section 3 were considered by Pillay and Chatzidakis in [4] (claim 28, for example, is proved there.) Elimination of imaginaries for such theories is characterised (in terms of T ) in [13].
The motivating example for a big part of this theory is differential Galois theory. As mentioned above, the model theoretic connection was observed by Poizat and further developed by Pillay (and by Hrushovski in [12].) The algebraic theory was known in special cases to 19th century mathematicians, and was systematically developed by Kolchin ([15]), and later by many authors, of which Singer and vander-Put ([24]) and Deligne ([7]) seems the most relevant to the model theoretic approach.
In the case of difference equations, the theory seems to be much less developed. The algebraic theory, as we treat it, is developed by Singer and van-der-Put in [23]. A slightly different approach is taken in [9] and in [8]. For the model theoretic context, the theory we use was developed by Hrushovski and Chatzidakis in [6]. The model theory of the Galois group was recently considered in [5].
1.2. Notation and conventions. We consider an arbitrary (not necessarily complete) theory T . By a definable set we mean a formula in the language of T , up to equivalence with respect to T (two formulas are equivalent if the define the same subset in any model of T ). In particular, definable sets are always over 0 unless explicitly mentioned otherwise.
If A is any subset of a model M , dcl(A) is the set of all elements in M of the form f (a), where a is a tuple of elements from A, and f is a T -definable function on a definable set containing a.Note that this set does not depend on the ambient model M , but only on its theory (in the language with constant symbols for A): dcl(A) computed in one model of this theory is in canonical bijection over A with dcl(A) computed in any other. Given a definable (or, more generally, ind-definable) set X, we denote by X(A) the set of points of X that belong to dcl(A).
We will use the notion of a definable family of (definable) sets. A family is simply a definable set φ(x, y) ⊆ X × Y where one of the variables, say x, is considered the parameter variable of the family. Thus, in this case we have a family of subsets of Y , varying with x. In many cases we will require the members of the family (the fibres) to be disjoint. A general family φ(x, y) can be converted to a disjoint one with the same parameter variable and isomorphic fibres via the formula ∀x, y, z(ψ(x, z, y) ⇐⇒ (x = z ∧ φ(x, y))) (which may require a quantifier).
In appendix A, we recall some other basic notions of model theory, namely elimination of imaginaries and stable embeddedness. One unusual aspect of our setting with respect to these notions is that we do not assume T to be complete. This requires some extra care with the definitions, but does not present real difficulties. This is also explained in the appendix.
We shall mildly use the notions of pro-definable and ind-definable sets. Some details on this can be found in [14]. For simplicity, one can always think about a pro-definable set as a partial type, and of an ind-definable set as a bounded increasing union of definable sets. For groups, we use the following terminology: Definition 1. An ω-group in a theory T is the intersection of a (language sized) chain of definable groups We note that in stable theories, any pro-definable group has this form (cf [16, Lemma 6.18]), but this is false in general.

Internality and definable Galois groups
In this section, we deal with the basic notion of a set Q being internal to C. This roughly means that Q has a definable family of bijections with C. We shall see that having this situation is almost equivalent to automorphism groups of Q over C being ω-groups .
A basic example is as follows: Let Q be a vector space of dimension n over a field, and let C the n-th Cartesian power of the field. The family of vector space bijections between Q and C can be identified with the set X of (ordered) vector space bases of Q. In this identification, an element x of X maps a vector in Q to the coefficients of its presentation in that basis. This set X, as well as the family of maps from Q to C are definable from the vector space structure. Any element of the group of linear automorphisms GL(Q) of Q can be obtained as a composition of one bijection of this type, with the inverse of another. Automorphism groups preserving any additional structure will be definable sub-groups (or ω-groups) of this group.
In general, given arbitrary sets Q and C, and a set X of injective maps from Q to C, consider the set F of bijections of Q to itself of the form f −1 • g, with f, g ∈ X (for which the composition is defined.) Composing such a bijection t ∈ F with an element h ∈ X gives a new function h • t from Q to C. If, for some t, this new function is again in X for any h ∈ X, we say that t preserves X. The set of elements of F preserving X in this manner forms a group G. This group acts on Q by evaluation and on X by composition, and turns out to be the group of automorphisms of the evaluation map from Q × X to C. When all of the above structure arises as the sets of points of definable sets, Q is said to be internal to C, and the above construction is carried out definably in subsection 2.1. As in the case of vector spaces, any additional (definable) structure is the preserved by a definable subgroup of this group.
Internality is defined in definition 2. Automorphisms and groups of them are defined in section 2.2. The final result is stated as theorem 19. Throughout the section, unless mentioned otherwise, we work with arbitrary models of an arbitrary theory T , which is not necessarily complete, but which eliminates imaginaries (possibly by passing to T eq . 2.1. Internality. We are interested in the following situation: (1) Q is said to be (X, f )-internal (or simply internal ) to C if X is a definable set and f : Q × X → {C} eq is a definable map, such that, for any x ∈ X, the map f x : Q → {C} eq defined as f x (q) = f (q, x) is injective, and for x = y, f x and f y are distinct.
(2) If Q is (X, f )-internal to C, and M is a model, we denote by the group of pairs (τ Q , τ X ), where τ Q : Q(M ) → Q(M ) and τ X : X(M ) → X(M ) are bijections, and for any (q, x) ∈ Q × X. This group will be called the internality group.
(3) Assume that for any model M , we are given a group G(M ) acting faithfully on Q(M ) (G is not assumed to be functorial in M .) Q is internal to C relatively to G if Q is (X, f )-internal to C for some X, f such that, for any model M , any g ∈ G(M ) extends to an element of Aut (X,f ) (Q/C)(M ). In this case, the pair (X, f ) is called an internality datum for G.

Remark 3.
(1) An element of G(M ) is thought of as an automorphisms of Q(M ). The condition of internality relatively to G says that any such automorphism can be extended to an automorphism of the internality structure. Our goal is to find conditions that G is an ω-group (in particular, the data is only interesting when the isomorphism class of G(M ) depends only on the isomorphism class of M .) Note that in this part of the definition, (X, f ) is not part of the data, and G does not depend on them. (2) Given a family (X, f ) as in the definition of internality, except that the f x are not distinct, we may obtain an internality datum from it via elimination of imaginaries, with the same functions (from Q to C) appearing as fibres. (3) If Q is C internal relatively to G, then the same is true for any G 1 ≤ G (i.e., G 1 (M ) is a subgroup of G(M ), for any M .) In other words, if Q is (X, f )internal to C, then Q is C internal relatively to any G ≤ Aut (X,f ) (Q/C).
(4) Internality can be defined in the same way when C is ind-definable, rather than just definable. However, it amounts to saying the same thing for some definable subset of C in this case, and therefore for simplicity we don't do it. (5) As can be seen from the definition (and below), it is harmless to replace C by C ′ if {C} eq = {C ′ } eq , and, in fact, by any C ′ such that {C ′ } eq ⊆ {C} eq and contains sorts for all definable sets in question. We shall assume, below, that the values of f lie, in fact, in C.
Note that the definition does not require that individual members of the automorphisms group are definable (over any parameters.) However, this is in fact the case, as follows from proposition 5 below.
In the following parts we will consider some auxiliary definable sets that appear as a result of internality. The reader may find it convenient to refer to the summary of notation in 2.4.
2.1.1. The set of images. Let Q be (X, f ) internal to C. Different elements of X may map Q to distinct subsets of C. The family of all these subsets is parametrised by a definable (in T eq ) set D. We apply to this family the process described in 1.2, namely, we replace C by C × D (denoting this new set by C again), so that the family of image sets is given as fibres of a projection to D. The internality datum is modified accordingly. We have a natural map π : X ։ D, sending each element of x ∈ X to the image of Q under x. The automorphism group of the internality structure preserves this map: For any τ ∈ Aut (X,f ) (Q/C)(M ), π(τ (x)) = π(x) (indeed, f (τ (q), τ (x)) = f (q, x), so f x and f τ (x) have the same image.) Thus, the internality datum can be described as follows: We are given a family of maps f : Q × X → C, another set D, and maps from X and from C to D (whose fibres over a point d ∈ D will be denoted X d and C d ), such that the combined map (f, p 2 ) : Q × X → C × D X (where p 2 is the second projection) is a bijection. From now on the internality datum will be assumed to be in this form. The map C × D X → Q obtained from the inverse of the above map will be denoted by g. As mentioned above, if this data witnesses internality relatively to G, the action is naturally induced on C × D X, and we have g(c, h(x)) = h(g(c, x)) for any h ∈ G. If all elements of X map Q to the same set, D is one point, and we have a family of bijections between Q and C. For our purposes, there is no substantial difference between this case and a general D. At the other extreme, if all the image sets are different, then in the new description Q × X has a definable bijection with C. In particular, G is trivial, and if C is stably embedded, then Q is a subset of {C} eq .

Remark 4.
In appendix B of [12], internality is defined in terms of g rather than f , and g is not required to be injective. In other words, according to that definition, Q is internal to C if there is a definable map g : C × D X → Q with each g x surjective.
The kernel of g is then an equivalence relation on C, and dividing by it, we get a new set in {C} eq , where the induced map is bijective, on the fibres. We thus get back to our situation. Since any group of automorphism considered (either here or in [12]) acts trivially on {C} eq , this process does not affect the automorphism group.
Equivalently, instead of dividing by the kernel of g, we may work with the original datum, but modify D to be the family of domains of g, together with the equivalence relation given by the kernel of g. Given (x, y) ∈F , the maps f x and f y have the same image in C, so the composition f y −1 • f x is defined. Thus each point ofF induces a bijection of Q on itself. We let F be the canonical family forF (i.e., the quotient ofF obtained by identifying pairs that induce the same map), so that F is a family of bijections of Q on itself. Similarly, any two elements x, y ∈ X give rise to a bijection f y • f x −1 from C π(x) to C π(y) . We denote the canonical family for this family by H: There are two definable maps π d and π i from H to D, for the domain and image of the element: We denote the fibres of these maps over x ∈ D by H x and H x , respectively. Note that if C is stably embedded, then H, being a family of maps between subsets of C, has a canonical injective map into {C} eq . Given an element h in H d (for some d ∈ D), we may compose it with a function f x , where x ∈ X d to obtain a new function h • f x from Q to C. We denote the definable set of all functions acquired in this way by X: where E is again the relation of defining the same map. Note that we have a canonical map from D to H corresponding to the identity map on each fibre C a , hence we have a definable injective map from X to X, and we consider X to be a subset of X via this map. We denote by µ : H × D X → X the quotient map. Note that H, µ and X can all be defined in the same way in the situation of remark 4, if we properly modify D, as explained there.
2.1.3. Definability of the group. Following 2.1.1 and 2.1.2, the internality datum consists of definable sets Q, X, C and D, definable maps π : X → D and C → D onto D, and a definable map f : Q × X → C over D, such that the combined map (f, p 2 ) : Q × X → C × D X (with p 2 the second projection) is bijective. We view elements x of X as bijections f x from Q to C π(x) , and we assume that distinct elements of X given distinct maps. We have the auxiliary definable sets F of bijections from Q to Q, and H of bijections between fibres of C over D, both obtained by composing two elements of X, and an extra set X containing X of bijections from Q to fibres in C, obtained by composing elements of H with elements of X, with composition map µ : H × D X → X.
Given x, y ∈ X(M ), we write x ∼ y if there exists an automorphism τ ∈ Aut (X,f ) (Q/C)(M ) such that τ (x) = y. We note that such τ is unique. To see this, it is enough to show that if τ (x) = x then τ is the identity. However, for any q ∈ Q, f (q, x) = f (τ (q), τ (x)) = f (τ (q), x) Since each f x is injective, this shows that τ (q) = q, so τ is the identity on Q. This means that for any y ∈ X, f y and f τ (y) are the same map on Q. By the definition of internality, this implies that τ (y) = y, so that τ is the identity on X as well.
there is a definable group action G 0 × Q → Q such that for any model M , G(M ) = G 0 (M ), with the given action. The definition of the group and the action is given explicitly in terms of the internality datum. c. In particular, if Q is C-internal relatively to G, then the G action on Q is, in the same sense, a sub-action of a definable group action.
Proof. a. A basic observation is that µ and f commute: For any q ∈ Q, h ∈ H and x ∈ X, if µ(h, x) ∈ X, then we have where we denote by h(−) the action of H on C. This is simply the definition of µ.
We now claim that the required formula is µ(h, x) ∈ X, i.e., x ∼ y if and only if f z • g w • f x ∈ X ⇐⇒ f z • g w • f y ∈ X for all z, w ∈ X for which the composition makes sense (where a function "belongs" to X if it has the form f t for some t ∈ X).
In fact, if both x and µ(h, x) belong to X, and τ is an automorphism of the internality structure, then τ (µ(h, x)) = µ(h, τ (x)): to show this, it is enough to show that they coincide as maps from Q to C. But Therefore, if x ∼ y, then they define the same subset.
Conversely, assume that x and y define the same subset of H. Let τ be the map on Q given by g y • f x . To show that this map extends to an automorphism of the internality structure, we need to show that given any z ∈ X, the map f z • g x • f y from Q to C coincides with f w for some (unique) w ∈ X. Let h ∈ H be the element corresponding to f z • g x . Then we need to show that µ(h, y) ∈ X. But µ(h, x) = z ∈ X, so by assumption µ(h, y) belongs to X as well. b. As described above, the group is obtained as the subset of F corresponding to the pairs (x, y) ∈F such that x ∼ y, i.e., pairs that satisfy And the action on Q is the restriction of the corresponding action of F (as a set of bijection of Q with itself).
c. By definition, G is a subgroup of the automorphism group of an internality datum for it.
Thus, if we want to show that the groups G(M ) are the groups of points of an ω-group, we already have a natural map into a definable group, and we only need to determine whether the image is a bounded intersection of some of its definable subgroups. The answer to this question is given in 2.2.
Example 6. The sets Q, X and C need not be distinct. For example, if T is the theory of groups, we may take Q = X = C to be the universe G, and f : Q×X → C to be the group multiplication. In this case, the automorphisms group is G itself, and an element g ∈ G acts on Q = G by q → qg −1 and on X = G by x → gx.
We recall the following definition.
Definition 7. Let G be a (pro-)definable group. A (pro-)definable group action m : G × X → X is called a G-torsor if X has a point in some model, and the combined map (p 2 , m) : G × X → X × X (where p 2 is the projection on the second factor) is an isomorphism The claim of proposition 5 can thus be stated as follows: The action of G on X is, by definition, free. An orbit of this action is given by a definable (over parameters) subset of X. Any such orbit is thus a G-torsor. If C is stably embedded, the family of all such orbits is in {C} eq . 2.1.4. An explicit definition. Let us write down the explicit first order definition of the internality group. Following through the proof we see that it is (in the free variable u): where Π is the projection fromF to F . Alternatively, we may pass to the canonical family F first. To do this, recall that F is a family of bijections from Q to itself, and let X be the canonical family of bijections from Q into C obtained by composing elements of F and X. Let ν : F × X → X be the composition map, and, as forX, we identify X with the subset ν(id, X) of X. More generally, we identify elements of X and of X that define the same function from Q to C. After this identification, if h ∈ H, u ∈ F and x ∈ X are elements with the property that µ(h, x), ν(u, x) ∈ X, then ν(u, µ(h, x)) = µ(h, ν(u, x)), since they µ and ν correspond to composition on different sides. We also note that given any u ∈ F , the inverse of u (as a function on Q) is also represented by an element of F , denoted u −1 .
Claim 8. The internality group given by the subset of elements u ∈ F satisfying the formula Proof. Assume that u = Π(x, y) satisfies formula (2). Given z ∈ X, let h ∈ H be the element corresponding to f z • f x −1 . Then µ(h, x) = z and µ(h, y) = ν(u, z). Hence, by formula (2), ν(u, z) ∈ X. The proof for the inverse is symmetric.
We would like also to rewrite this last formula explicitly in terms of the original data. Thus, instead of u ∈ F , we describe its pre-image in X × X in terms of the function f (which need not be given via a function symbol, but as a ternary relation.) Expanding the definition we get (in the free variables (z, w) ∈ X × X): where the formula φ(x, y, z, w), representing the condition This equation is valid also when f has the form in remark 4. In these terms, the action of G on Q is given (via X×X) by (z, w)(p) = q, where z, w ∈ X and p, q ∈ Q satisfy (6) ∃c ∈ C(f (q, w, c) ∧ f (p, z, c)) and the action on X is given by (z, w)(x) = y, where x, y, z, w ∈ X satisfy φ of equation (5). We stress that these definitions are valid in any model. Thus, the above formulae describe the group of automorphisms over C of the datum f : Q × X → C where Q, X and C are arbitrary sets, and f is an arbitrary function satisfying the axioms of internality.
2.1.5. A minimal example. The following example deals with a minimal situation. The language contains three sorts, Q, X and C, and two function symbols, f : Q × X → C and g : C × X → Q. The theory T says that the maps (f, p 2 ) : Q × X → C × X and (g, p 2 ) : C × X → Q × X are bijective and inverse to each other (as before, p 2 is the projection to the second component.) This is a universal theory, and the theories considered below extend T . For each of them we will consider the following possibilities for G: G 0 (M ) is the group of all bijections of Q(M ) preserving the quantifier free subsets of all Q n definable with parameters from C(M ). The group G 0 can be described immediately: Q has no quantifier free structure at all over any set of parameters contained in C. Therefore, G 0 (M ) is simply the set of bijections of Q(M ) onto itself as a set.
(1) Let T 1 be the theory saying that for any two elements (q, c) ∈ Q × C, there is a unique element of X mapping q to c. Clearly, most elements of G 0 (M ) can not be extended to X. Let τ ∈ G 1 (M ), and let q 0 ∈ Q(M ) be any point. Extend τ to X(M ) by setting f (q 0 , τ (x)) = f (τ −1 (q 0 ), x). To show that this is an automorphism, we need to show that the same holds for any other point q ∈ Q(M ). By the axioms, any element c ∈ C(M ) gives rise to a definable bijection between Q and X (namely g(c, −).) Given two such elements, we get a bijection of Q to itself, definable over these two elements. In particular, this bijection commutes with τ . Considering this bijection for the two elements x(q) and x(q 0 ) we get the result. Thus, this is an internality datum for G 1 . Also, since the whole structure consists of the maps f and g, we see that G 1 and G 2 coincide.
One may also consider the theories T n , which say that for any pairwise distinct q 1 , . . . , q n ∈ Q and c 1 , . . . , c n ∈ C there is a unique x ∈ X mapping q i to c i . The same description as for T 1 holds there. In fact, any model of T n gives rise to a model of T 1 with the same groups by considering the subsets of Q n and C n consisting of tuples with pairwise distinct coordinates.
(2) Let M 0 be the model of T where Q 0 and C 0 are infinite sets of the same cardinality, and X 0 the set of all bijections from all coincide, since the action of the group G 0 (M 0 ) of all bijection of Q(M 0 ) to itself extends uniquely to an action on X(M 0 ) (by composition), so that and G 0 (M 0 ) = G 2 (M 0 ), and G 1 is between the two groups.
In particular, since G 2 (M 0 ) acts transitively on the set of pairwise distinct n-tuples (for any n), the C(M ) definable subsets of Q are quantifier free, for any model M of T ∞ . Therefore, G 0 and G 1 coincide completely for this theory.
However, not every model is of the same form as M 0 : by the omitting types theorem, we may find a model . This shows that the condition that automorphisms should be extendible to X is non-trivial, even when there is quantifier elimination for subsets of Q. There are some more remarks about this situation in section 2.2.
2.1.6. Ind-definable internal sets. We conclude this sub-section with a remark (which will not be used anywhere) about the case when Q is ind-definable (See, e.g., [14] for the notion. An example is an infinite union of definable sets; an example of a pro-definable set is a partial type). In this case the statement of proposition 5 is false, and most of the structure defined here can no longer be defined (there are no canonical families of ind-definable sets.) However, if we require the definable group to agree with the (slightly modified) group of automorphisms for saturated enough models, and use the horrible formula (5), we obtain a description.
So we assume now that Q = Ind i (Q i ) and C = Ind i (C i ) are ind-definable sets, that can be presented via systems Q i and C i of size less than a cardinal κ. X is still a definable set, and we are given an ind-definable map f : Q × X → C, which amounts to giving a system of definable maps f i : Q i × X → C j (for every i for some j.) However, the requirement that the f x are distinct is no longer first order. We therefore modify the definition of Aut (X,f ) (Q/C)(M ) to be the set of pairs (τ Q , τ X ), where τ Q , as before, is a (set) automorphism of Q(M ), but τ X is a bijection of X(M ), where X(M ) is the set of maps from Q(M ) to C(M ) represented by elements of X(M ) (we could have taken the same path when defining internality in the first order case, but the existence of T eq allows us to use the simpler form.) We assume that the maps in the system Q i are injective. It follows that the injectivity of each fibre f x is a first order property (we could avoid this assumption by further modifying the definition of the automorphisms group into something unrecognisable, but for simplicity we leave it as it is. ) We note that the properties described in the formulas (5) and (6) still define the group and the actions, but they are no longer first order. Rewriting them in a way that the quantifiers become first order, we get instead of φ there: At this point it is convenient to split the double implication ( ⇐⇒ ) into its two components (with which the universal quantifiers on q and c commute.) After doing this and rearranging terms, we get that a typical term in the projective system above is the intersection of the two expressions: The universal quantifiers always commute with projective systems, but they commute with the inductive ones only for κ-saturated models. For such models we thus get an intersection of a pro-definable set with an ind-definable one (all subsets of X 4 ), which can be viewed as a pro-ind-definable. Plugging this into the formula (7), we get again a pro-ind-definable formula (which is the formula for the action of the automorphisms group on X.) Finally, the κ-saturation allows us again to move the quantifiers on x and y in formula (4) inside, resulting in a pro-ind-definable definition for the set of pairs of elements of X representing automorphisms. The automorphisms group is now obtained by dividing by a projective system of equivalence relations, so the final answer is that the automorphisms group coincides, for κ-saturated models, with a pro-ind-definable group (this is not very surprisingwe knew in advance that any individual automorphism is definable, so the group is at least a subset of the pro-ind-definable set Hom(Q, Q) of all definable maps from Q to Q.) As an example, consider the theory, in the language of internality (2.1.5), of the model where C and X are the rational numbers, and Q is the ind-definable set of "finite" rational numbers, the union of intervals (−n, n), and f is given by the restriction of addition. Then the formula (7) defines the set of pairs (z, w) of elements of X whose distance is finite, and the group is the ind-definable group of finite numbers. This example shows, in particular, that although each f i gives rise to an internality datum on Q i , the resulting groups have nothing in common with the group of the whole system.
On the other hand, if the system f has the property that for any j there is an i such that if f (q, x) = c for some x ∈ X and c ∈ C j , then q ∈ Q i , then the group is pro-definable. If, furthermore, the restriction of f to C i is just f i , then the resulting group is an ω-group, whose system is given by the groups corresponding to the f i .

Partial automorphisms.
We are going to be concerned with a class of definable sets, ∆, and restate some of the definitions relative to this class. ∆ sets can be thought to be quantifier free, in the sense that they need not be closed under applying quantifiers (and also because this class is a central example.) However, no actual properties of quantifier free sets will be used. The collection ∆ will be assumed to be closed under boolean combinations, but only to make the formulation simpler.
such that for any Cartesian product Y of elements of S, the induced map preserves all ∆ subsets of Y .
We note that equality is not required to be in ∆, so, as in example 6, a definable set may appear more than once in the list X i , with different f i .
We denote the group of all such automorphisms by Aut ∆ (S)(M ). When T ⊆ S, we have a natural restriction map from Aut ∆ (S)(M ) to the group Aut ∆ (T )(M ), and we will be interested in the kernel Aut ∆ (S/T )(M ) of this map (i.e., the automorphisms of S that preserve T pointwise.) Thus, if the set S consists of all the sorts, and ∆ contains all quantifier free sets, then this is what is usually called Aut(M ): The group of all automorphisms of M . In contrast, we are interested in automorphisms of some of the sorts, and with respect to part of the structure.
The following examples show that in general, an automorphism of one sort does not extend to other sorts, even if it preserves all of the quantifier free structure.
Example 10. Let T be the theory of groups (in the natural language) with an extra predicate X for a subgroup of index 2. Consider the group M = Z × 2Z, and let S contain only the sub-group X(M ) = 2Z × 2Z. Then the function that swaps the coordinates is an automorphism of the quantifier free structure on X (which is just the group structure), but not of the full structure, since it does not preserve the set ∃x(y = x + x).
Example 11. Let T be a theory saying that a sort k is an algebraically closed field, and U is another sort, such that U × U is a finite dimensional vector space over k, and the function that swaps the coordinates of U × U is a linear transformation. If ∆ consists of just the linear structure (in particular, it does not contain the projections to U ), then the swap of coordinates is an automorphism of U × U (in the sense defined above), that does not extend to an automorphism of U (if U has more than one element.) Additional examples are provided by the theories in 2.1.5, as well as the example of ACF A, studied in more details in section 4.

2.2.1.
Relation with the full automorphisms group. If ∆ is the set of all definable sets, X is stably embedded and M is saturated, then any automorphism f of X(M ) can be extended to M : Indeed, first we may assume that T eliminates imaginaries, since f extends uniquely to X eq . Next, assume we managed to extend f to some small subset A⊆M , and we want to extend it further to a. Let p = tp(a/ X(M)∪A ). Then f (p) is consistent, and as explained in A.2, determined by its restriction to a small subset of X(M ) and A. By saturation it is realised in M by some b, and we may set f (a) = b.
In particular, under the above assumptions, acts transitively on the realisations in M of any type over X(M ), and the definable closure dcl(X(M )) is equal to M G , the set of fixed points of the G action on M . This is another instance of the similarity between stably embedded sets and small sets (The converse of this fact is also true: if X is a definable set such that any automorphism of X lifts to an automorphism of M , then X is stably embedded. Cf. [6, appendix].) In this context, it is fruitful to reconsider the example in 2.1.5: For T 1 , the graph of an element x ∈ X as a function from Q to C is definable using parameters from Q and C (namely, an arbitrary point on that graph.) In fact, Q ∪ C is stably embedded in this theory. Therefore, G 1 and G 2 coincide. On the other hand, in T ∞ the graph of an element of X is not definable using parameters from Q and C, and G 1 is bigger than G 2 . A saturated model is indeed not of the form where X is the set of all bijections from Q to C (since the set of such bijections for a model M has cardinality strictly bigger than the cardinality of Q(M ); hence given x 0 ∈ X(M ), its type p(x) over Q(M ) ∪ C(M ), which describes the bijection completely, would be of cardinality smaller than the cardinality of M , so the type p(x) ∪ {x = x 0 } would have to be realised in M , and this is a contradiction.)

2.2.2.
Definability of the automorphisms group. A ∆-type over a set A is the restriction of a usual type over A to formulas in ∆.
We may now answer the question raised in section 2.1: Which subgroups of the internality automorphism group are ω-groups? The following is an analogue of proposition 5.
Proposition 12. a. Let Q be (X, f )-internal to an (ind-)definable set C, ∆ a set of formulas in the sorts Q, X and C, with f ∈ ∆, and let G = Aut ∆ (Q, X/C). Then there is a set of formulas ∆ * with one X variable and no Q variables, such that the G orbit of . It thus follows that G is an ω-group. b. Let Q be a definable set, C an (ind-)definable set, ∆ a collection of formulas, such that Q is internal to C relatively to G = Aut ∆ (Q/C). Then G is an ω-group.
In the proof we shall use the internality datum, and the derived functions g and µ, to convert formulas (11) φ(q 1 , . . . , q n , x 1 , . . . , x l , e) with variables q ∈ Q, x ∈ X and e ∈ C into formulas in one X variable x and tuples d ∈ C and h ∈ H, as well as the original e. Given a formula as above, φ * is the subset of Proof of 12. Note that given an internality datum (X, f ) and an action of G on X, saying that f belongs to ∆ is equivalent to saying that (X, f ) is an internality datum for G. Therefore, the second part is a corollary of the first. Let ∆ 1 = ∆ ∪ {X} (X is the formula x ∈ X). Any formula φ in ∆ 1 is of the form (11), and we set ∆ * = {φ * φ ∈ ∆ 1 }, where φ * is as in (12). Note that, in particular, X * ∈ ∆ * is the formula µ(h, x) ∈ X, which is the formula φ promised by proposition 5.
We need to show that given (z, y) ∈F , z and y have the same ∆ * -type if and only if they are in the same orbit of G. Since X ∈ ∆ 1 , they are in the same orbit of the internality group. Let τ be the element in that group taking z to y. Let φ(q, x, . . . ) ∈ ∆. We claim, similarly to proposition 5, that τ preserves φ if and only if φ * (y, c) and φ * (z, c) are the same set (where c contains everything except the variable in X.) The proof is also similar: Let q ∈ Q(M ), x ∈ X(M ) be tuples of elements, let d 1 be the elements of H obtained by the compositions f xi • g z , and let Since τ is an automorphism of the internality structure, we also have c 1 = f (τ (q), y) and d 1 is also the element corresponding to f τ (x) • g y . On the other hand, by the definition of g we have g(c 1 , z) = q and g(c 1 , y) = τ (q). Likewise, we have µ(d 1 , z) = x and µ(d 1 , y) = τ (x). Thus, if z and y define the same φ * subset, then τ preserves φ. The converse is also true, since by definition, every element of C π(z) is the image of some q ∈ Q under the action of z, and for every x ∈ X we may take Similarly to the situation of pure internality (2.1.4), the definition of the group is explicit in terms of ∆ and the internality datum. Let Π be the projection from F to F . Then the definition of the automorphisms group is given explicitly (in the free variable u) as is, as before, the set of ∆ formulas composed with g and µ, as given by equation 12. In particular, this is a universal formula relatively to the formulas in ∆ * , the maps π : X → D, Π :F → F , and the maps from C to D. Note also, that we may use an existential quantifier, instead of a universal one: This is because the property of having the same ∆ type over C is constant on fibres of Π, so that one pair has it if and only if any pair in the fibre has it.
Alternatively, as in 2.1.4, we may first pass to the quotient, and describe the group via its action on X. We thus get: where ν is the function from 2.1.4, and whose restriction to G ⊆ F is just the action of G on X.
We note that, in addition to the quantifiers appearing explicitly in the definition, quantifiers can appear in these formulas resulting from the transformation of formulas from ∆ to ∆ * , even if the formulas in ∆ are quantifier free.
In section 3 we obtain, for a particular class of examples, a more explicit description, in terms of "rational function" from X to C.
Remark 13. As in the case of pure internality, this result can be restated by saying that the type provided is a torsor over G. In fact, it is an ω-torsor, in the sense that it is the intersection of G i -torsors, for the groups G i preserving finite subsets of ∆, whose intersection is G.

2.2.3.
Relation with the classical group. We would like to compare the group just constructed with the classical result on the binding group. We shall use the setting of appendix B of [12]. There, one works with a fixed saturated model M of a theory with quantifier elimination and EI, and one considers the group G(M ) = Aut(M/C(M ))/Aut(M/Q(M ), C(M )). It is shown there that for a saturated model M , this group is the group of M points of an ω-definable group (Q is not assumed to be stably embedded.) Note that in general, when M is not saturated,Ĝ(M ) need not correspond to the M -points of this ω-definable groups (in fact, for some modelsĜ(M ) may be trivial.) What is the connection between this group and the group G defined here, when ∆ is the set of all formulas?
If C is stably embedded, these are the same groups. Indeed,Ĝ is obviously contained in G, but as noticed before,Ĝ acts transitively on the type of an element x ∈ X over C, which we just saw to be a G-torsor. In particular, any automorphism of the full structure on Q and X fixing C can be extended to the whole (saturated) model. This is not, in general, true for automorphisms not fixing C -the triple Q, X, C need not be stably embedded.
For general C, let C SE (the stably embedded hull of C), be the collection of definable sets Y (in the whole theory) such that Y (M ) is fixed pointwise by Aut(M/C(M )) (this does not actually depend on M ). Obviously, the automorphisms groupĜ does not change when we replace C by C SE (this is not true for G.) However, C SE is stably embedded: given a canonical family of subsets of C SE , any automorphism fixing C SE pointwise must fix the parameter of the family as well, so this parameter belongs to a set in C SE .
Therefore, in any caseĜ coincides with a group of the form considered here.

2.2.4.
Deriving internality data from ∆. In the example at the beginning of this section, where Q is a finite-dimensional vector space over the field C, the internality datum, i.e., the set of bases X, and the linear combinations function f are derived from the linear structure ∆ that we would like to preserve. However, with our definitions this need not be the case in general. In other words, assuming that Q is (X, f )-internal to C, and given a set of formulas ∆, it need not a-priori be the case that (X, f ) is an internality datum for G = Aut ∆ (Q/C). Let L ∆ be the language with the sorts Q, C, and whose basic relations are all definable subsets of C and all sets in ∆. Let T ∆ be the theory T restricted to L ∆ . Clearly, any definable set in T ∆ eq can be identified with a definable set in {Q, C} eq . If X and f correspond in this way to definable sets in T ∆ eq , then they form an internality datum for G, since G is the full automorphism group of T ∆ eq . Conversely, we have: Assume that in T there exists an internality datum for G = Aut ∆ (Q/C), and that C is stably embedded in T ∆ . Then there exists such a datum for G in T ∆ eq .
Proof. Let M be a model of T , and M ∆ its restriction to T ∆ . Then G(M ) is the full automorphism group of M ∆ over C(M ∆ ). Since there is an internality datum for G, G is an ω-group (in T .) Therefore, the cardinality of G(M ) is at most that of M and M ∆ . The result now follows from proposition 15 below.
Proposition 15. Let T be a theory, C a definable set stably embedded in T . If there is a saturated model M of T such that G(M ) = Aut(M/C(M )) has at most the cardinality of M , then the universe is internal to C.
Proof. If there is a tuple a ∈ M , such that any automorphism fixing C(M ) and a is the identity, then, since C is stably embedded and M is saturated, dcl(a∪C(M )) = M . Therefore, a defines a surjection from a power of C onto M (more precisely, any element of M is in the image of some a definable map from C. By compactness, a finite number of these maps suffices, and this finite number can be combined into one surjective map on a quotient of the union of their domains, a set in {C} eq .) We assume there is no such tuple, and will show that the cardinality of the group is bigger than the cardinality κ of M . By saturation, it follows that for any subset A of M of cardinality less than κ, and any automorphism f over C one may find a different automorphism over C, which agrees with f on A. This allows us to build a binary tree of height κ, with different branches corresponding to different automorphisms over C. The number of such branches is 2 κ , so we get a contradiction.
Considering the example of 2.1.5 again, we see that indeed in T 1 , X is a quotient of Q × C, whereas in T ∞ (where C is not stably embedded), X might have larger cardinality than Q and C in some models, hence can not belong to T ∆ .

2.2.5.
A partial converse. Proposition 12 has the following partial converse: Proposition 16. Let Q be internal to C, and let G be an ω-group acting faithfully on Q. Then Q is (X, f )-internal to C, where the internality datum is compatible with the action of G, and there is an ind-definable setC containing C, and a set ∆ of definable subsets of (Cartesian products of ) Q, X,C, such that G = Aut ∆ (Q, X/C) Proof. Let G be the intersection of a decreasing chain of definable groups G i . We first claim that the action of G on Q is the restriction of an action on Q of some G 0 . In fact, by compactness, the action is the restriction of some function f : G 0 × Q → Q. For any i ≥ 0, let Q i be the set defined by ∀g, h ∈ G i (f (g, f (h, q)) = f (gh, q)). Then the union of all Q i is Q, a definable set. The same is true of some finite union, hence f is an action when restricted to some G i , which from now on is denoted G 0 .
We may now construct (X, f ). Let (X 1 , f 1 ) be the given internality datum, let X 2 = X 1 ×G 0 , and let f 2 : Q×X 2 → C be given by f 2 (q, x, g) = f 1 (gq, x). With the action of G 0 on X 2 given by h(x, g) = (x, gh −1 ), we obtain, by taking the canonical family, internality datum (X, f ) compatible with G 0 . Since G is contained in G 0 this is also an internality datum for G (and any other G i .) Let P i = X/G i , the (definable) set of orbits of the G i action on X, and let π i : X → P i be the quotient map. We setC = {C, P i }. We let ∆ be the collection of definable subsets of Cartesian products of Q,X andC preserved (setwise) by G. Note that the maps π i are included in ∆.
Let G = Aut ∆ (Q, X/C), and we will show that G = G. We already know that G is an ω-group, and G is contained in G (in a way compatible with the action.) By definition, G fixes the G orbits on X. However, the action of G on X is free, so G = G.
2.3. The opposite groupoid. Let Q be a definable set, (X, f )-internal to C. We assume the internality datum to be given as in the beginning of 2.1.3. In particular, we have a definable map π : C → D whose fibres are image sets of elements of X (regarded as maps on Q), and another definable set H whose elements can be considered as bijective maps between the mentioned fibres: Our purpose in this section is to describe the structure of H. It turns out that H is a definable groupoid , acting definably on X. In particular, we get a family of groups acting on X, and the action turns out to be free. These groups do not act by automorphisms (and in general do not act on Q at all), but any point of X gives rise to a (non-canonical) isomorphism of any of these groups with the automorphisms group G of the internality structure. In particular, there is only one isomorphism class of these groups, which is determined by any of them. Given a collection of definable sets ∆, these statements go through for G ∆ and an ω-groupoid H ∆ . The advantage of considering H and not G is that H belongs to C SE .

Definable sets of types.
Recall that the composition of elements of X and H, viewed as functions from Q to C and from C to C, is denoted by µ : H × D X → X, where X is a set containing X. Consider the definable set defined by µ(h, x) ∈ X. We view it as a family of subsets of H parametrised by X, and consider the canonical family d :H → E and the natural map t : X → E obtained from it. Note that E is in C SE , and, by the proof of proposition 5, the fibres of the map t are the orbits of the action of the definable automorphisms group G on X. So E is the set of such orbits, and may be regarded as the definable set of types of elements of X over H, with respect to the formula µ(h, x) ∈ X. The map t then associates to each element its type.
As with C and D, we replace H byH, and thus we get an action µ : H× E X → X. For e ∈ E, we denote by H e and X e the fibres over e.
If h ∈ H e and x ∈ X e , let f = t(µ(h, x)). We claim that for any other y ∈ X e , t(µ(h, y)) = f as well. In fact, there is an element g ∈ G such that y = g(x), hence, since G acts by automorphisms of the internality structure, µ(h, y) = µ(h, g(x)) = g(µ(h, x)) holds as well, so µ(h, x) and µ(h, y) are in the same orbit. Thus any h ∈ H e maps X e bijectively to some X f . Let c : H → E be the map assigning to each h ∈ H e the above element f . Let H e f be the set of elements h such that d(h) = e and c(h) = f .
If ∆ is any collection of definable sets, the construction is analogous. E = E ∆ is again defined to be the set of orbits of the action of G ∆ on X, where G ∆ is the automorphism group associated with ∆, as described above. The main difference with the case of pure internality is that G ∆ is an ω-group, rather than a definable group, so E ∆ is a pro-definable set, and each H e f is an ω-definable set. The following is just a restatement of the above construction: Proposition 17. Let ∆ be a set of formulas containing f and the formula x ∈ X. For any a ∈ X e , b ∈ X f there is a unique h ∈ H f e with µ(h, a) = b. Given any g ∈ G ∆ , g(b) = µ(h, g(a)).
Proof. h is simply the element corresponding to f b • f a −1 . Indeed, we have by definition that µ(h, a) = b, so in particular h ∈ H f e . The fact that h commutes with G ∆ follows, as before, from the fact that the action of both is given by composition of functions, on different sides. This also implies uniqueness, since G ∆ acts transitively on each X h .

2.3.2.
A description in terms of definable groupoids. Recall, from [13], that a definable groupoid is a collection of definable sets satisfying the axioms of a groupoid, namely, a category all of whose morphisms are isomorphisms. Explicitly, we have: (1) Two definable sets Ob (objects) and Mor (morphisms.) (2) Two definable maps dom, cod : Mor → Ob, the domain and the co-domain (range) of a morphism, giving rise to a combined map Mor → Ob × Ob.
The fibre over the objects x, y ∈ Ob is denoted Mor(x, y). (3) A definable composition map m : Mor × Ob Mor → Mor, where the fibre product is with respect to dom in the first factor, and with respect to cod in the second one. This map is over Ob × Ob, with the obvious maps. (4) A definable map id : Ob → Mor, the identity morphism for any object, over Ob × Ob (with the diagonal map from Ob.) All this data satisfies the usual axioms of a category, as well as the axiom stating that every element of Mor has an inverse with respect to m (so that all morphisms are isomorphisms.) Analogously to the case of groups, we may define an ω-groupoid to be a prodefinable set that has a defining system consisting of definable groupoids and functors.
Furthermore, given a definable groupoid G, a G-torsor is a definable surjective family F → Ob and a definable action µ : Mor × Ob F → F , such that (i.e., the action is compatible with composition and identity maps), and such that the map y y r r r r r r r r r r Ob × Ob is an isomorphism. When G is an ω-groupoid, a G-torsor is a system of torsors over the groupoids involved in defining G.
If G is an ω-group acting on a definable set F over a map F → E, such that each fibre F e is a G-torsor, then G × E can be viewed as an ω-groupoid G (with both dom and cod the projections), and F is then a G torsor.
Back to our construction, in this terminology we have an ω-groupoid with morphisms set H and objects set E, and X → E is a torsor over it. The action of G ∆ on X preserves this map and acts on each fibre as a torsor, and so gives rise to another groupoid with X as a torsor. The two torsor structures commute. However, the groupoid H is connected (i.e., for any e, f ∈ E, H f e is non-empty.) In particular, for any element e ∈ E, H e e is an ω-group (defined over e), and any element x ∈ X e gives rise to an isomorphism between the groups G and H e e (sending the element g ∈ G to the element in H representing the map f x • f g(x) −1 .) This map is not canonical, though: the map determined by a different element y is obtained from the first one by conjugation with f y • f x −1 . The H-torsor structure of X allows us to interpret each element of H as a partial definable function from X to itself. Conversely, let h be a partial function from X to itself, definable in T ∆ over C SE , and let x ∈ X e be a point where h is defined, y = h(x). Then h coincides on X e with f y • f x −1 . In fact, h commutes with the action of G ∆ on X, and X e is a G-torsor, so h is defined on the whole X e , and is determined by its value on any one point, for instance x, where it has the same value as f y • f x −1 . Thus for any e, f ∈ H, H f e is naturally interpreted as the set of T ∆ definable functions from X e to X f defined over C SE , and the groupoid structure is just composition of functions (which turn out, in particular, to be bijections.) 2.4. Summary. We conclude the section with a summary of the notation and results that appeared so far.
Notation 18. Let Q be (X, f ) internal to C, ∆ a collection of definable sets.
• D is the set of image sets of Q under elements of X. Without loss of generality we assume that the subsets of C corresponding to distinct elements of D are disjoint. The family of inverses to the family f is denoted by g : C × D X → Q. • F is the set of bijections from Q to itself, obtained by composing two elements of X with the same image. G = G ∆ is the group of automorphisms of Q (and X), preserving ∆ and the internality datum. In particular, G ∅ is the group of automorphisms of the internality datum, and G ∆ ⊆ G ∅ . F need not be a group in general, but G ∅ ⊆ F , compatibly with the action on Q. The action of G ∅ on X is by composition of functions from Q to C. • E = E ∅ is the set of orbits of the action of G ∅ on X. We denote by t the map from X to E. Thus we have a "forgetful" map from E to D. H is the set of partial maps from C to itself, obtained by composing two elements of X. If h ∈ H is obtained as f y • f x −1 , composition with h maps bijectively the G ∅ orbit of x to that of y. Thus, by modifying H, we get maps from H to E, for the domain and image of an element of H. The composition map is denoted by µ : H × E X → X. The composition of the map from H to E × E with the map to D gives the domain and range of elements of H as maps on C.
H = H ∆ and E ∆ are the analogous constructions for the group G ∆ . Thus E ∆ is the (pro-definable) set of orbits of G on X, and H is the opposite groupoid to G.
The main results are summarised in the following theorem.

Theorem 19.
(1) Let Q be (X, f )-internal to C (a) For any collection ∆ of definable sets, there is an ω-group G ∆ , and a definable action of G ∆ on Q and X, whose points in a model M are identified via this action with the group of automorphisms of Q, X preserving all ∆ sets and the internality structure (and fixing all other sorts involved in ∆.) This group is the intersection of the definable groups G ∆0 for finite subsets ∆ 0 of ∆. (b) If G is an ω-group acting faithfully on Q, then it is of the form mentioned above (perhaps for different X and f ) (2) If Q is internal to C, ∆ a collection of definable subsets of Q, C, G = G ∆ the group as in 1a, and C is stably embedded, then G does not depend on the internality datum. (3) If Q and C are definable sets, C is stably embedded, and for some saturated model M , the automorphism group G of Q(M ) over C(M ) has the same cardinality as M , then Q is internal to C (and the internality structure is automatically preserved by G), and G is, therefore, an ω-group.
(b) proposition 16. (2) This follows from proposition 14, since in this case the internality datum is constructed from Q and C using ∆. (3) This is proposition 15.

Stable theories with a generic automorphism
We consider a theory T σ , whose models are models of a given theory T = T eq endowed with an automorphism σ, which is generic, in a sense defined below. We will consider internality datum in T σ , where the set C will be the set of fixed points of σ. Our goal, which we achieve under some additional assumptions, will be to describe, in terms of T , the automorphism group preserving all the T structure. More precisely, we will describe ∆-types in X in terms of T definable invariant functions on X. Our main application is the case where T is the theory ACF of algebraically closed fields, which is dealt with in section 4.
3.1. The theory T σ . Let T be an arbitrary theory that eliminate quantifiers. Let B be a definably closed subset of a model of T , and let σ 0 be an automorphism of B (i.e., a bijection of B with itself, preserving all the quantifier free relations.) We denote by B 0 the subset of B consisting of elements fixed by σ 0 . We will consider only models of T that contain B 0 , so we assume that B 0 is contained in dcl(0) (if B 0 is non-empty, it follows that T is complete.) Let M be any model of T containing B, σ an automorphism of M extending σ 0 , and A ⊆ M a definably closed subset of M , closed under σ and containing B. We call such a pair (A, σ) a σ-structure. The theory of T with a generic automorphism is defined to be a theory T σ in the language L σ = L ∪ σ ∪ B (where σ is a unary function symbol) with the properties that: • T σ contains the universal theory of T , and says that σ is a map from the universe to itself that is a homomorphism of the T structure (i.e., preserves all sets definable in T . In particular, it is injective.) • Every σ-structure can be embedded in a model of T σ . This means that for any σ-structure (A, σ) there is a model N of T σ and a function f : A → N over B, such that f • σ = σ N • f , and for any tuple a ∈ A, any formula over B satisfied by a in a model of T containing A is also satisfied by f (a) in N (this does not depend on the model of T used, since T is model complete.) • T σ itself is model complete. In other words, T σ is the model companion (cf [21]) of the theory of T with an arbitrary automorphism. T σ need not exist, in general, but if it exists, it is unique. The existence and properties of such theories were studied in [4]. It follows from the second condition (with a the empty tuple) that T coincides with T σ restricted to L, that any model of T σ is a model of T together with an automorphism, and that any definable set of T can be identified with a definable set of T σ .
We may now state our assumptions (which will be valid till the end of the section): Assumption 20. We are given a theory T in a language L, which is assumed to eliminate quantifiers, and to have EI. We fix a structure B, and an automorphism σ 0 of B as above. We assume: (1) T σ , the theory of T with a generic automorphism as described above, exists. This theory will play the role of the general theory T in section 2.
We denote by T 0 σ the theory obtained from T σ by restricting the constant symbols to B 0 .

(4) Assumptions about the internality:
C is the set σ(x) = x of fixed points of σ. Q is a T σ definable set, internal to C. We further assume that this internality is witnessed by a T σ definable set X that is given within a T definable setX by the formula σ(x) = A(x), where A is a T B definable map.
Moreover, we assume that the maps π : X → D, g : C × D X → Q and µ : H × E X → X are given by terms (function symbols) in T σ . (5) ∆ is the collection of quantifier free sets in T σ .

Remark 21.
(1) The EI assumption for T σ is discussed in [13]. It is shown there that this condition can be translated to a condition on T , namely, that in T there are no nontrivial definable groupoids with finite Hom sets. There is also a description of a procedure for adding sorts to T to achieve this condition, similar to the way this is done to obtain EI. (2) All our use of stability is concentrated in two results, claim 28 and claim 29.
The background from stability theory required for these results is explained in appendix A.3. (3) It follows from the fact that π, g and µ are given by terms (item 4 of assumption 20) that composition with them does not increase the number of quantifiers. In particular, it follows that the collection ∆ * mentioned in 2.2.2 (and in the proof of proposition 12) is the set of quantifier free sets. It is this condition that we actually use.
We conclude immediately from EI in T 0 σ that C is stably embedded: Lemma 22. Assume 20. Then C is stably embedded (in T σ ) Proof. Let φ(c, x, b) be a family of subsets of C parametrised by x, with b ∈ B and φ in T 0 σ . By EI, there is a T 0 σ canonical family ψ(c, z) and function h such that φ(c, x, y) ⇐⇒ ψ(c, h(x, y)). These sets are preserved by σ, and since σ fixes C pointwise, it fixes the canonical parameter, so the image of h is contained in C. Now, ψ and h(−, b) give a canonical family for the original set.
3.1.1. The definability of σ(x). We make a few comments on the seemingly strong condition that for x ∈ X, σ(x) is definable (in T B ) over x. We first note that it is enough to require that for some x ∈ X, σ(x) is definable over x, since we may restrict to the subset given by such a definition.
By taking "prolongations", we may replace this condition by the condition that σ n (x) is definable over x, σ(x), . . . , σ n−1 (x) for some n. This is because X can then be replaced by the subset given by σ(x i ) = x i+1 . This set is definably isomorphic to X, and therefore all assumptions are preserved. It satisfies the requirement that σ(x) is definable over x, and since C is stably embedded, the automorphism group does not depend on the internality datum. We next show that this condition does in fact hold under each of two assumptions. The first is a further assumption about the shape of the internality datum. We recall that in general we have (using the notation as in 20) a definable group action m : G ∅ × X → X with a definable quotient map π E : X → E, where E is contained in C n . We also have an action µ : H × E X → X of the groupoid H on X, and the two actions commute. In general, this structure is defined over B. The assumption of the next proposition is essentially that there is an extension to a similar structure over B 0 . More precisely, we have: Proposition 23. Let G ∅ be the definable automorphism group of the internality datum, let E be the set of orbits of the action m : G ∅ × X → X of G ∅ on X, and let π E : X → E be the quotient map (so x ∼ y if and only if π E (x) = π E (y)). Assume that there is a T σ definable action m 1 : G 1 × X 1 → X 1 , such that (1) G ∅ ≤ G 1 , X ⊆ X 1 and m 1 extends m (2) The quotient π 1 : X 1 → E 1 of this action extends π E (i.e., if m 1 (g, x) = y where x, y ∈ X, then g ∈ G ∅ ). (3) µ extends to a map µ 1 : H × E1 X 1 → X 1 , and for all g ∈ G 1 and (h, x) ∈ H × E1 X 1 . (4) X 1 , π 1 and µ 1 are defined over B 0 (5) m 1 is the restriction of a definable set in T B . Then for x ∈ X, σ(x) is definable over x.
Proof. We first note that we may assume that E 1 ⊆ C k for some k. This is because we know this for E, and we may replace E 1 with E 1 ∩ C k , and X 1 with its inverse image.
Now let x ∈ X be any element. Then x ∈ X 1 , and since X 1 is over B 0 , also σ(x) ∈ X 1 . Also, since π 1 is over B 0 , and since E 1 is in the constants, we get π 1 (σ(x)) = σ(π 1 (x)) = π 1 (x). Therefore, there is a unique A x ∈ G 1 such that Claim 24. A x does not depend on x Proof. Let y ∈ X be any other element, and let h ∈ H be the element corresponding to f y • f x −1 . Then µ 1 (h, x) = y. Applying σ to this equation (and using the assumption that µ 1 is over B 0 ), we get σ(y) = σ(µ 1 (h, x)) = µ 1 (h, σ(x)). Hence Let A be the constant value of all A x . A is thus defined over 0, and for all x ∈ X we have σ(x) = m 1 (A, x).
The second variant is an assumption on T . A sub-structure A of a model M of T is finitely generated over another subset B if A ⊆ dcl(a, B) for a finite tuple a ∈ A.
Proposition 25. Assume that T satisfies the condition that for any structure B, every sub-structure of a structure that is finitely generated over B is itself finitely generated. Then for some n, Proof. Let B 1 be the σ-structure generated by an element b ∈ X (so this is the T -structure generated by σ i (b), for integer i.) If a ∈ X is some other element, let h ∈ H be the element taking b to a. Then the σ-structure A 1 generated by a over B 1 is contained in the T -structure generated by h over B 1 (since σ is the identity on h, and B 1 is closed under σ.) Hence, by assumption, A 1 is finitely generated over B 1 as a T structure. In particular, for some m, σ m (a) is T definable over σ i (a) for i < m, and B 0 . However, b was an arbitrary element, so it may be taken to be independent (in the sense of stability) from a. It follows (see claim 45) that σ n (a) is T definable from the σ i (a), i < m. Applying σ enough times to the definition, we may also get i ≥ 0.
We note that the assumption on finitely generated structures is true when T is ω-stable. In fact, let D be a sub-structure of the structure generated by some tuple c. It is enough to show that there is no infinite strictly increasing chain of sub-structures of D. However, the function assigning to each sub-structure D 0 the Morley rank and degree of c over D 0 is strictly decreasing, since for d ∈ D \ D 0 , d ∈ dcl(c) \ D 0 , hence the Morley rank and degree of d over c is strictly smaller than the same over D 0 , so the result follows by symmetry.

Invariant functions.
Given a T B definable relation h(x), we denote by h σ the relation h(σ −1 (x)), so that, for any model M , h σ (M ) = σ(h(M )) (note that this is again T B definable.) In particular, if h is a T B definable function on X (that is, a T B definable relation whose restriction to X is a function), then h σ is the function on σ(X) obtained by conjugation with σ: h σ = σ • h • σ −1 . For such a function h we also denote by h A the function on X given by composition with the T B definable function A above: Under the above assumptions, we shall prove: Proposition 26. Assuming 20, let M be any σ-structure, a, b ∈ X(M ). Then the relation is given by the set of formulas h(a) = h(b), where h is a T B definable invariant function. In particular, it is ∆-definable (i.e., defined by an intersection of quantifier free formulas in T , possibly infinite in number).
Together with the explicit description in 2.2.2, this implies the following description of the automorphism group, which is the main result of this section: Corollary 27. Assume 20. The group G = Aut ∆ (Q/C) is given by the intersection of formulas of the form where h is a T B definable invariant function.
Proof. By proposition 12 and the remarks following it, the group is given by the intersection of formulas saying that x and gx have the same ∆ * type over C(M ) ∪ H(M ) ∪ D(M ), where x ∈ M . We first note that D, H and E are canonical families of subsets of C, and therefore are subsets of C themselves, since C is stably embedded.
Thus we are reduced to equality of types over C(M ). As mentioned in remark 21.3, ∆ is preserved by composition with the functions g and µ appearing in the description of ∆ * . Hence the corollary follows from proposition 26.
We use the terms algebraic closure and definable closure to mean these concepts with respect to T , whereas we say σ-algebraic closure, σ-definable closure for the same concepts in T σ . Similarly we write acl, dcl in T and acl σ , dcl σ in T σ .
The proof of proposition 26 depends on two general claims, given below. Both involve types in infinitely many variables. These are simply maximal consistent sets of formulas in these variables (over a given set.) We call such types infinitary for short. Any subset B of a model has a type over any other set A, just like in the finite case, which we denote as usual by tp(B/ A ) (the variables of this type will be indexed by the elements of B; thus a statement of the form tp(B/ A ) = tp(C/ A ) implies we are given a bijection between B and C.) A realisation is also defined in the same way as for types of finite tuples.
Claim 28. Let T be a stable theory, let T σ be its associated theory with a generic automorphism, and let A be an algebraically closed σ-structure. Then A is σalgebraically closed. Note that if C is the set of M points of a definable set, then it is automatically preserved by any automorphism, and Ea (in a saturated model) is simply dcl(a). In this case, the condition thus says that C is stably embedded, so the claim implies that any definable set in a stable theory is stably embedded. If C is not definable, this equivalence can be viewed as the definition of being stably embedded (and this claim says that any definably closed subset in a model of a stable theory is stably embedded) Claim 28 is a generalisation of the same result for ACF A, as appears in [6]. It was also proven in [4]. The second essentially appears in [16,Ch. 7,remark 1.16]. Both of these claims are consequences of stability, and are explained in appendix A.3. Meanwhile, we use them to deduce proposition 26: Proof of proposition 26. LetM be a model of T σ , extending M . The collection of T -definable functions into C will remain the same inM . Also, since M is definably closed, the values of any T B definable invariant function h on a and b lies in C(M ). Therefore, we may assume that M is a model of T σ . We write tp(A/ B ) for the type in the sense of T .
Let a 1 and a 2 be elements of X(M ), such that for any T B definable invariant function h, h(a 1 ) = h(a 2 ). We would like to show that tp(a i / C(M) ) are equal in T B . However, since B may contain elements not fixed by σ, it is more convenient to consider these elements as additional parameters. Therefore, we set B i = dcl(B ∪ a i ). The map that is the identity on B and takes a 1 to a 2 extends canonically to a bijection from B 1 to B 2 , and in the sense of this map, we shall prove that tp(B 1 / C(M) ) = tp(B 2 / C(M) ). This will be done by proving the same for an increasing sequence of subsets of C(M ), until we arrive at the assumptions of 29. We note that since σ(a i ) = A(a i ), and B is preserved by σ, so is each B i .
We first note that the assumptions on a i , together with elimination of imaginaries imply that tp(B 1 / 0 ) = tp(B 2 / 0 ) (recall that 0, the definable closure of the empty set in T , does not include any non-fixed parameters): The canonical parameter of any definable set lies in C, and the function taking an element of the set to this parameter is invariant and B definable, hence a 1 and a 2 agree on this set.
By definition, B i = dcl(B ∪ a i ) is the image of all B-definable functions on a i . If h is a T B definable function and σ(h(a i )) = h(a i ), we may pass to a globally invariant function t on X (as in the beginning of 3.2) by defining t(x) to be h(x) if h(x) = h A (x), and a constant fixed element outside this set. We will have h(a i ) = t(a i ). Hence C(B i ) is the image of all invariant T B definable functions on a i . Therefore, the assumption on a i implies that C(B 1 ) = C(B 2 ). We denote this set by D. Further, the same assumption means that tp(B 1 / D ) = tp(B 2 / D ): If φ(a 1 , b, d) holds for some b ∈ B, d ∈ D, then d = h(a 1 ) = h(a 2 ) for some invariant h, and so φ(a 1 , b, h(a 1 )) is a B-definable formula that holds of a 1 , b, hence also of (a 2 , b) by the previous step. We next show that the same holds when C(B i ) is replaced by C(acl(B i )).
Indeed, for any c ∈ C, tp(c/ Bi ) (hence its set of realisations) is preserved by σ, since σ(c) = c and B i is a σ-structure. In particular, if c is algebraic over B 1 , the finite set Y of conjugates of c over B 1 is fixed by σ. Since T has EI, this set is coded by an element y ∈ C, definable over B 1 . By assumption, it is definable over B 2 , and B 1 , B 2 have the same type over y. Hence c is algebraic over B 2 , and B 1 , B 2 have the same type over c: if c satisfies some formula over B 1 , so do all its conjugates over B 1 , hence all its conjugates over B 2 . Since E = C(acl(B 1 )) is the set of such c, the same is true for this set.
As we just showed, E = C(acl(B 2 )) and tp(B 1 / E ) = tp(B 2 / E ). We now use again the fact that each B i is a σ-structure, and deduce from claim 28 that acl can be replaced by acl σ , so that E = C(acl σ (B i )).
Finally, we note that the condition tp ∆ (a 1 / C ) = tp ∆ (a 2 / C ) does not depend on the model M . Therefore, we may assume that M is saturated. Under this assumption, the set E Bi that appears in claim 29 is contained in dcl σ (B i ), and so the set C Bi there is contained in E. Since we just proved that tp(B 1 / E ) = tp(B 2 / E ), and C B1 ∪ C B2 ⊆ E, applying claim 29 we get the result.
Remark 47 ties the description of the images of invariant functions with canonical bases.
Remark 30. As can be seen from the proof, internality is not used in this proposition, but only the assumption that σ(a) is definable (in T B ) over a.

3.2.1.
Comparison with the classical group. We now apply these results again, in order to compare the group G of automorphisms of the quantifier free structure, to the usual model theoretic automorphism group. Let G 0 = Aut(Q/C) be the subgroup of G preserving all C-definable subsets of Q. It turns out that G 0 is pretty close to G: Proposition 31. Assume 20, and let G = Aut ∆ (Q/C) be the quantifier free automorphism group, and G 0 be the subgroup of full automorphisms. Then the quotient G/G 0 is pro-finite.
Proof. Let Y be a C definable subset of X (possibly with quantifiers.) We will show that its orbit (as a set) under G is finite. This will be enough, since G 0 is the stabiliser, inside G, of such subsets.
Let Z ⊆ X be an orbit of G. For any point z ∈ Z, we get from the internality datum a subset Y z = {f z • f y −1 |y ∈ Y } of H. Since C is stably embedded, the canonical parameter c z for this set lies in C. Thus we get a σ-definable function from Z to C, sending z to c z . By claim 28, c z is algebraic (in the sense of T ) over the σ-structure generated by z, and therefore over z (since σ(z) is T -definable over z). In other words, we have a T definable function t from Z to finite subsets of C, such that c z ∈ t(z). But since Z is an orbit of G, t is constant on Z. Thus there is a finite subset W , such that c z ∈ W for all z, so the number of sets Y z is finite. Finally, we note that by fixing an element z 0 of Z, the sets Y z are identified with the orbit of Y under G: any g ∈ G can be written as f z0 −1 • f yg for a unique

The case of ACF A
In this section we study the example of the situation in 20 where T is the theory of algebraically closed fields. The resulting theory T σ is called the theory of algebraically closed fields with an automorphism (ACF A), and was studied in [6]. In particular, it is proved there that ACF A eliminates imaginaries. The base set B is, in this case, a field with an automorphism, which we shall also denote by k. An interesting example is when k = Q(t), and σ(t) = t + 1.

4.1.
Internality in ACF A. We proceed to describe explicitly the internality datum and the associated structure in the example we consider (linear difference equations over k). We use the notation as in 2.4.
The set C, given by the equation σ(x) = x is a pseudo-finite field, called the fixed field. The set Q, in our example, is given by an equation σ(q) = Aq, where q is a (column) tuple of variables (of length n), and A is an invertible matrix over B. Such an equation is called a linear difference equation. The set Q has a definable vector space structure over C, of dimension n. Therefore, it is internal to C, with the internality datum consisting of the set of vector space bases X, where f : Q × X → C n assigns to any vector q and basis x the coefficients of the representation of q in the said basis. We think of the elements of X as matrices, whose columns are the basis elements (hence solution to the equation.) In these terms, f is given by f (q, x) = x −1 q.
Thus, the image of any element x ∈ X (viewed as a map from Q to C n via f ) is the whole C n , so the set D consists of one point. The inverse map g : C n × X → Q is given by g(a, x) = xa. The set X coincides with the subset of GL n given by σ(x) = Ax. The set H is the set {y −1 x x, y ∈ X}, or equivalently, the subset of GL n given by σ(x) = x, and so, in other words, is identified with GL n (C). The action µ : H × X → X is given by µ(h, x) = xh −1 , so the set E = E ∅ also consists of one point. Finally, the group G ∅ of automorphisms of the internality datum coincides with the set F , defined in section 2.1 as {yx −1 x, y ∈ X}. It is the subgroup of GL n given by σ(x) = AxA −1 .
It follows from this description that all assumptions of 20 are satisfied. The fact that ∆ is the set of quantifier free sets means that we are interested in the group G of automorphisms of Q preserving all polynomial relations. Since ACF A does not have quantifier elimination, this is different, in general, from the usual model theoretic group G 0 that preserves all definable relations: Example 32. Assume B = Q, and let Q be given by σ(x) = 4x. It is easy to see that any non-zero solution to this equation is transcendental over C (in general, in dimension 1 the only equations over the fixed field that can have algebraic solutions are those with A a root of unity. This can be seen by considering the minimal polynomial of a solution, and also follows from proposition 36, below.) Therefore, the quantifier free automorphism group is the multiplicative group of C. In particular, there is only one quantifier free type of non-zero elements of Q over C. On the other hand, a square root of such a non-zero element may satisfy either the equation σ(x) = 2x or σ(x) = −2x (and the other one satisfies the same equation), so this unique quantifier free type splits into at least two full types.
Note, however, that according to proposition 31, G 0 is a pro-finite index subgroup of G.
We next note that X is "Zariski dense" in the setX of bases of K n , i.e., if p is any polynomial onX (over any base set) such that σ(x) = Ax =⇒ p(x) = 0, then p is identically 0. This follows from the axioms of ACF A. The main axiom of ACF A states (cf. [6]): Axiom 33. Let U be an irreducible variety (over the model K), and let V ⊆ U × σ(U ) be an irreducible sub-variety, projecting dominantly to each factor. Then for any proper closed subset W of V , there is a point x ∈ U (K) with (x, σ(x)) ∈ V \ W .
Applying this axiom with U = σ(U ) =X, V the variety given by Y = AX and W the closed subset given by p(X) = 0 (and using the fact thatX itself is dense in the n 2 dimensional affine space), we get the result.
It follows that the generic type over B (in the sense of ACF ) is consistent with X. Hence, for the definition of the group we may concentrate on types that extend this generic type. This allows us to describe the automorphism group G: Corollary 34. The group G of automorphisms of the equation σ(q) = Aq preserving all polynomial identities, is the subgroup of GL n,B given by the equation σ(g) = AgA −1 , and all the equations with h = p r a rational function onX over B, satisfying (globally) h = h σ • A, where h σ is the function obtained from h by applying σ to the coefficients.
In particular, it is the intersection of the definable group given by σ(g) = AgA −1 and an algebraic groupG defined over B.
Proof. Any such rational function h restricts to an actual function around any point satisfying r(x) = 0. This function has values in C for elements in X. If g ∈ G is any automorphism, then r(x) = 0 implies r(gx) = 0, and therefore h(x) = h(gx) for any element in x ∈ X with r(x) = 0. Since the condition is a polynomial equation, it is satisfied for any other x as well. Thus any automorphism satisfies these equations.
Conversely, let g be any element satisfying the above formulas. To show that it is an automorphism, it is enough to show for one element x ∈ X that x and gx satisfy the same quantifier free type over C. Let x be an element of X generic (in the sense of ACF ) over g (i.e., x does not lie in any g definable sub-variety.) Then both x and gx are generic over 0, and in particular r(x) = 0 and r(gx) = 0. Any invariant definable function (as in corollary 27) coincides on the generic type with an invariant rational function. Hence, x and gx agree on all invariant functions, so by proposition 26, they have the same type.
The last statement follows since any ω-definable group in an ω-stable theory (like ACF ) is, in fact, definable (cf. [3]), and any definable group in ACF is algebraic (cf. [20].) Remark 35. We thus have the following description of the set of types: there is an open subset U ofX (given by the functions r above), and an algebraic map F into some affine space L. The space of types of elements of X ∩ U is the image of X ∩ U under this map, and the image lies in L(C).
On the other hand, sinceX is a torsor over GL n,B , andG is an algebraic subgroup of GL n,B , the quotientX/G is an algebraic variety V (over B.) Since the groupG is, in general, not preserved by σ, σ is not defined on this quotient. However, if we define φ as A −1 • σ onX and by φ(g) = A −1 σ(g)A on GL n , we an automorphism of the group action of GL n onX that preserves the groupG. Therefore, it does induce an automorphism of V . The sets X and G are precisely the sets of fixed points of φ, and therefore the set of types X/G embeds via the quotient map into the set of fixed points of φ on V .
Hence, if we take the open set U above to be closed under theG action, we get a map from the image of U in V to L, which is a bijection on the level of the sets of types. However, we do not know whether this map can be taken to be an isomorphism, and whether it can be extended to the whole quotient space V .
In the case that the base field B consists only of fixed elements (i.e., C(B) = B), we may give a more explicit description of the situation. In this case σ is, itself, an automorphism, and therefore the corresponding element A of GL n belongs to G. In general, we claim: Proposition 36. Let G A be the intersection of all algebraic subgroups of GL n defined over C(B) and containing A, and let U be the definable subgroup of GL n given by σ(x) = AxA −1 . Then G ⊆ G A ∩ U . If B = C(B), the groups are equal.
As will be evident from 4.2, this is similar to Proposition 1.21 in [23].
Proof. Let G 0 = G A ∩ U . Since G 0 ⊆ U , G 0 acts on X. Let S 0 = X/G 0 and S =X/G A . Since G A is defined over the fixed field, σ is well defined on S. Since U is precisely the subgroup of GL n preserving X, S 0 embeds into S. The image of S 0 in S is fixed pointwise by σ, since A ∈ G A . Hence elements with the same (quantifier free) type over C are in the same G A orbit. Since these types are G-torsors, G ⊆ G 0 .
If B = C(B), then A ∈ G, so in particular it belongs to the algebraic groupG associated with G. Since this group is also defined over B = C(B), we get that G A ⊆G.
Remark 37. If E is a connected algebraic subgroup of GL n containing A, we may also find a solution to the equation in E (whenX and GL n are identified as algebraic varieties.) This again follows from axiom 33: The projections from the subset of E × E given by y = Ax to each of the components is an isomorphism. 4.1.1. The opposite groupoid. The situation with the opposite group (studied in section 2.3) is slightly more complicated. According to proposition 26, there is a stratification ofX, such that the situation described in remark 35 holds, maybe with different data on each stratum. To simplify notation, we will now assume that the whole ofX is one stratum. We thus have an algebraic map F , with E ∆ = F (X).
Given a value e in this set E ∆ , we obtain a (quantifier free) type p e of an element of X(M ), over C(M ) (which is the orbit associated with this value), and a subgroup H e , whose action (given by (x, g) → xg −1 ) is transitive on the realisations of p e (recall that, in the language of groupoids, e is an object, H e is the group of automorphisms of e, and p e is the set of isomorphisms between e and the special object corresponding to the equation. The action is given by composition).
Proposition 38. The group H e is given explicitly by the formulas σ(g) = g and the algebraic subgroupH e of GL n defined by (15) ∀x(F (x) = e ⇐⇒ F (xg −1 ) = e) Proof. By definition, H e is the subgroup of GL n (C) given by Hence, the only thing that should be verified is that "∀x ∈ X" can be replaced by "∀x". Let Z be the irreducible algebraic set given by the equation F (x) = e, viewed over the subfield L of M generated by k and C(M ). Then X ∩ Z is dense in Z, since, by the definition of F (e is the canonical base of p e ), the ACF type of any element of X ∩ Z over L is the generic type of Z. Hence if (X ∩ Z)g = X ∩ Z then Zg = Z.
In general, there is no reason for these subgroups H e to coincide (see example 42.) However, as explained in section 2.3, they are all conjugate over C, together with the torsors p e on which they act. We would like to obtain some information about the conjugacy classes. SinceH e is the Zariski closure of H e (over C), we get that theH e are conjugate as well.
We have three notions of conjugacy between the elements of the familyH e : conjugacy over C, conjugacy over acl(C) ("absolute"), and conjugacy over C(k). We will discuss only the first two. Given any definable family of subgroups, conjugacy of two elements over C is a definable property, so it makes sense to ask in which field a conjugacy class lies (the absolute conjugacy class lies in some pro-definable set).
The conjugacy class over C belongs to dcl σ (k), since it is canonically associated with the equation, and to C, since it is defined in terms of subgroups of C (we now consider the group alone, without the torsor.) The absolute conjugacy class is coarser, and therefore belongs to the same set. We now make the following observation: Claim 39. For any difference sub-field k of a model M of ACF A, k is linearly disjoint from C(M ) over C(k). In particular, Proof. We need to show that any subset of C(M ) linearly dependent over k is linearly dependent over C(k). Let c i a i = 0 be a minimal linear dependence, where c i ∈ C(M ) and a i ∈ k. Applying σ, we get c i σ(a i ) = 0. The minimality implies that there is a ∈ k such that σ(a i ) = aa i for all i. It follows that σ( ai aj ) = ai aj for all i, j. Dividing the dependence by a 1 we thus get a linear dependence over C(k).
The "in particular" part is now deduced as follows: We saw that Hence it is enough to prove that C(acl(k)) = C(acl(C(k))) This follows from the fact that C(acl(k)) is linearly disjoint from k over C(k).
In particular, if the fixed field of the base is algebraically closed, this fixed field will contain a point in the familyẼ ∆ (the Zariski closure of E ∆ ), which will therefore define a group over the base field that lies in the same (absolute) conjugacy class as any H e (note that in this case, by the above claim, the conjugacy class will belong to the base field.) 4.2. The algebraic theory. Our aim now is to describe the relation between our results and the algebraic Galois theory of linear difference equations. This theory is described in [23] (and more recently, in [5].) For the sake of clarity, we shall repeat part of the exposition there.
As before, we have a fixed base field k, with a fixed automorphism σ on it. A difference algebra over k is a k-algebra B, together with a ring automorphism of B whose restriction to k is σ −1 . The inverse of ϕ will be denoted σ. A map of difference algebras is a map of usual k algebras that commutes with σ. The set of difference algebra maps from A to B will be denoted by Hom σ k (A, B). A difference ideal is an ideal I of B such that σ(I) ⊆ I. If B is Noetherian (which it is, in any situation we consider), this implies that σ(I) = I. The kernel of a map of difference algebras is a difference ideal, and the quotient of a difference algebra by a difference ideal is again a difference algebra.
Given a linear difference equation σ(x) = Ax, where, as before, x is a tuple of variables, and A is a matrix over k (which will be fixed from now on), we associate with it a difference algebra R as follows: as a ring, R = k[X, det(X) −1 ], where X is a matrix of variables (of the same size as A), and det(X) is the determinant polynomial in these variables (in other words, R is the coordinate ring over k of the variety of invertible matrices.) The action of σ on R is determined by the action on the generators, where it acts as σ(X) = AX. If B is any difference algebra (always over k), the set Hom σ k (R, B) may be identified with the set of invertible matrices x over B that satisfy σ(x) = Ax. In particular, if M is a model of ACF A k , we have X(M ) = Hom σ k (R, M ). For any element x ∈ X(M ), we will denote by φ x : R → M the corresponding map. The kernel of such a map is a difference ideal. This ideal clearly depends only on the quantifier free type of x over k, and in turn determines this type (together with the difference equation.) More generally, Let L be any subfield of C(M ) extending C(k), and let R L = L ⊗ C(k) R (note that k L = L ⊗ C(k) k is again a field, since, by claim 39, k and L are linearly disjoint over C(k); it is the subfield of M generated by k and L. Therefore R L is the analogue of R for the base field k L .) As before, any element x ∈ X(M ) determines a map φ L x : R L → M and an ideal I L x in R L that corresponds to the (quantifier free) type of x over L.
Recall also that with any such element x we have associated the canonical base of its type over C(M ), which is a certain subfield L x of C(M ) (since it is definably closed.) This is, in fact, the field generated by the values on p of the invariant functions. The connection between these objects is given by the following proposition.  In particular, if L contains the canonical base of p, then I L is a maximal difference ideal.
Proof. (2) Assume that I is not maximal, and let J ⊃ I be a difference ideal extending I. Since I comes from a solution that lies in the field M , it is a prime ideal. Therefore, the dimension of J is strictly smaller than the dimension of I. We may also assume that J is radical, since the radical of a difference ideal is also a difference ideal. We show that in fact, we may assume that J is prime. Let J 1 , . . . , J n be the prime decomposition of the ideal generated by J in R acl(C(M)) , as a usual ideal (so that J = J i .) This decomposition happens, in fact, over some finite field extension of C(M ), and in particular, over the fixed field of some σ m . Then σ m acts on this set of ideals, and for some larger m, σ m fixes each of them. We now replace (M, σ) by (M, σ 1 ), where σ 1 = σ m . In this new model, the fixed field C 1 in the new structure is an algebraic (finite) extension of the original fixed field. The solution x of the original equation is also a solution of the implied equation for σ 1 . The associated ideal I 1 extending I is again a prime difference ideal (for the difference algebra obtained from the new equation.) So is each of the ideals J i extending I 1 . Since the base field extension is algebraic, the dimensions of I and I 1 are the same, and similarly for J i . In particular, each J i is a proper extension of I 1 . Replacing J with J i , this shows that we may assume that J is prime.
Since J is a prime difference ideal, R C(M) /J is a σ-structure (i.e., a difference algebra which is an integral domain.) Therefore, it can be embedded (over C(M )) in M . If q is the quantifier free type of the image X under this embedding, the associated ideal is J. Now let x be a solution of p, y a solution of q, h = x −1 y. Then h defines an automorphism of R C(M) taking I to J. The image of J under this map will be strictly contained in J. This process gives an infinite increasing chain of ideals, contradicting the fact that R C(M) is Noetherian.
Note that if L satisfies the above condition, then R L /I L x is a simple difference ring whose fixed field L is the fixed field of k L . This is similar to Lemma 1.8 in [23].
Let p be a fixed type over C(M ), L its canonical base, I the associated ideal in R L and S L = R L /I. Thus, the set p(M ) of realisations of p in M is identified with Hom σ kL (S L , M ). Therefore, Hom σ kL (S L ⊗ kL R L , M ) = p(M ) × X(M ) Recall from section 2.1, that given an element x ∈ p(M ), and another element y ∈ X(M ), we may form the element h = x −1 y, which conversely determines, together with x, the element y. In other words, any element x ∈ X(M ) gives a definable bijection between X and H (which in our case is just GL n (C).) This is reflected by the fact (equation 1.2 in [23]) that S L ⊗ kL R L is isomorphic to S ⊗ L T , where T = L[Y, det(Y ) −1 ] represents H (i.e., H(M ) = Hom σ L (T, M ).) Finally, dividing by the ideal generated by I in S L ⊗ kL R L , we get the ring S L ⊗ kL S L , that represents the set p(M ) × p(M ) of pairs of realisations of p in M . The definable bijections mentioned above restrict to definable bijections between p and the group H p we obtained. Since the group H p is algebraic and defined over k L , it is represented by some quotient W L of T . The bijection mentioned above corresponds to the equation S L ⊗ kL S L = S L ⊗ L W L , equation 1.3 in [23]. When C(k) is algebraically closed, these algebras are, as explained earlier, isomorphic (as usual algebras) to algebras S ⊗ C(k) L and W ⊗ C(k) L, where S and W are defined over k. This recovers (up to isomorphism) the algebras constructed in [23].
Note that in contrast with the algebraic approach, there need not be a torsor of solutions defined over the base field k. This corresponds to the cases when the definable set E ∆ of all torsors (the image of X under the meromorphic invariant function F ), contains no point of k. This can happen even if C(k) is algebraically closed, since E ∆ is not (in general) constructible. In this case, we still obtain a group and a torsor over it by taking a point in some constructible set containing E ∆ . This torsor is isomorphic (over an extension field) to the torsors we obtained, and is isomorphic to the torsors obtained in [23]. However, both are isomorphisms of algebraic varieties, and the points of this torsor do not solve the equation.

Some examples.
Example 41. Consider the equation σ(x) = −x. Then X is the same set, with 0 removed. For any x ∈ X, x 2 lies in C, and so x 2 is an invariant function. If k contains a solution d of the equation, then x/d is also an invariant function, and so the group is trivial.
We now assume that this is not the case. Then we may take F (x) = x 2 , and E ∆ = F (X) is then the set of fixed elements whose square root is not fixed. Any of the torsors we defined is of the form x 2 = e with e ∈ E ∆ . The canonical base for this torsor is the field extension of C(k) obtained by adding e. If C(k) has no extensions of order 2 (in particular, if C(k) is algebraically closed), then E ∆ has no k points, and so none of these torsors is defined over k. The torsors considered in [23] are of the form x 2 = d where is a non-zero element of C(k). If d is not in E ∆ , this set is isomorphic algebraically (over C(k)(e)) to the set x 2 = e, but the σ structure is not the same.
Example 42. Let A be of the form We may take a matrix of solutions to lie in the set x y 0 z , where x satisfies σ(x) = −x. In other words, the set of triangular matrices is consistent with the set of solutions. However, if we would like to emulate the construction of the automorphisms group G using global invariant functions (as above), restricting to this set would be counter-productive: the set of upper triangular matrices is a proper closed subgroup, and indeed, the function x 2 is an invariant function on this set, but not on the whole set of solutions.
Instead, let Y = x y z w be an arbitrary solution. Apply the determinant, we see that and similarly Hence the function F given by is an invariant function fromX onto the subsetẼ of A 3 \ (0, 0, 0) given by s 2 = rt, and from the whole set of solutions toẼ(C).
φ(x 2 , y)) is an equivalence relation on X, and a canonical family for φ as above is the quotient of X by E φ . Thus, a theory has EI if and only if any equivalence relation has a quotient.
We say that a collection of definable sets {X i } has EI if the theory of these sets with the induced structure (i.e., the theory whose sorts are the X i and whose basic relations are all the definable subsets of products of the X i in the original theory) eliminates imaginaries.
This notion depends on the language. In a context where the language can be changed, EI can always be assumed. To show this, we modify the language as follows: • For any family φ(x, y) ⊆ X × Y parametrised by X, we introduce a new sort X φ and a new function symbol π φ : X → X φ . • For any such family φ, let ψ(z, y) ⊆ X φ × Y be given by the formula We extend the theory by the requirement that (X φ , ψ, π φ ) is a canonical family for φ. The theory obtained in this way (when applying the procedure for all sorts) eliminates imaginaries (it might seem that the process needs to be iterated; however, any family in the new theory corresponds to a family in the original one, and is therefore accounted for.) This theory is denoted T eq . The procedure does not change the category of models (and elementary maps), up to natural equivalence. In particular, a type over parameters in T can also be viewed as a type in T eq . However, for a given language and theory, it is an interesting question whether the theory in that language admits EI.
Given a collection of definable sets X i , we denote by {X i } eq the collection of all canonical families for all families with parameter variables in Cartesian products of the X i (possibly by adding sorts, as described above.) A definable map from a definable set Y to {X i } eq is a definable map into (a finite union of) any of these families (in other words, it is a definable set in {X i , Y } eq that happens to be a function on Y .) A.2. stable embeddedness. The notion and properties of stable embeddedness are discussed in the appendix of [6]. A definable set X is called stably embedded if for any definable family of subsets of X n there is a family definable with parameter variable in X and with the same fibres. If X also has EI, this means that for any definable family of subsets of X (with parameter not necessarily in X), there is a canonical family with parameter variable in X. For example, if X is an algebraically closed field with no other induced structure (but in a theory containing other sets), this means that any family of distinct constructible sets is itself constructible.
When X has EI, the assumption that X is stably embedded can also be stated as follows: for a ∈ M , where M is some model, the subset φ(a, x) of X(M ) is determined by the value f φ (a) ∈ X(M ) of some definable function f φ at a. This description implies that tp(a/ X(M) ) is determined by its restriction to the values on a of all such functions f φ for all φ. This is a small set, contained in dcl(a). In particular, it does not depend on M (this description does not depend essentially on the EI assumption, since, as mentioned above, we may pass to the type over {X} eq in a unique way.) For this reason, stably embedded sets enjoy some of the good properties of small sets.
We conclude these two parts of the appendix with a remark about these notions applied to incomplete theories. Though both imaginaries and stable embeddedness are defined syntactically, the standard approach in model theory is to work in a model. However, once a model is chosen, one is dealing with two theories, the original (incomplete) theory, and the theory of the model. In the following proposition we the interpretation of several notion in terms of T , with the corresponding interpretation in an extension.
Proposition 44. Let T 1 be a theory extending T (in the same language), and let M be a model of T 1 . Any definable set X of T determines a definable set in T 1 , also denoted by X.
(2) If X is stably embedded in T , then it is stably embedded in (1) If φ(x, y) ⊆ X × X defines an equivalence relation in T 1 , the formula E φ (x, y) given by ∀z(φ(x, z) ⇐⇒ φ(y, z)) ("φ has the same fibre over x and y") gives a definable equivalence relation in T , whose quotient is the same as the quotient of X by φ in T 1 .
(2) is obvious (3) Let b ∈ dcl T1 (A). Then f (a) = b, with a ∈ X(A) for some T 1 definable set X and function f : X → Y . These can be represented by some definable setsX andỸ and a definable relation φ(x, y) ⊆X×Ỹ in T . If (Z, ψ(z, y), π) is a canonical family for φ, then ψ determines a bijective function in T 1 (and hence in M ). Thus, b is inter-definable with π(a), which is in dcl T (a). (4) is also obvious.
In particular, the last two parts imply that we may use the usual methods of automorphisms to (essentially) determine the definable closure.
A.3. Stability. In this appendix we give a short overview of the notions from stability used in the paper. In particular, we give the proofs of claim 28 and claim 29. The facts below appear in many texts on stability, for example [3].
Let T be a complete and model complete theory with EI. Till the end of this section the word set means a definably closed subset of some model of T . For any set A and any A-definable set X, we denote by D A (X) the boolean algebra of A-definable subsets of X, and by S A (X) the space of types over A that belong to X (if A = dcl(∅), we omit it.) T is called stable if for any algebraically closed set A, any type p(x) ∈ S A (X) is A-definable. This means that for any definable set Y , there is a map d p : D(X × Y ) → D A (Y ) such that for any set B ⊇ A, the set of formulas is consistent. Note that in this case, by completeness and model completeness of T , p| B is a complete type over B. The collection of maps d p is called a definition scheme. It is a fact that if T is stable, such a definition scheme d p is unique.
We now assume that T is stable. The definition scheme extends uniquely to a definition scheme d p : D A (X × Y ) → D A (Y ) (by changing Y .) Each such map d p Let p and q be the types of M 1 and M 2 in T (over A), and let F = B 1 ∪ B 2 be a realisation of d * p (q) (we label the variables of this type by the elements of F .) The original automorphisms σ 1 , σ 2 of the M i give rise to a bijective map σ from F to itself. We claim that σ is an elementary map. To show this we need to show that the assignment of σ(b) to a variable x b of σ(d * p (q)) satisfies this type. However, we just showed that σ(d * p (q)) = d * σ(p) (σ(q)), and σ(p) is the same type as p with the variable x σ(b) renamed to x b (and similarly for q.) Therefore, σ(d * p (q)) is also d * p (q) with the same renaming of variables, so the assignment satisfies this type by the definition of F . Therefore F is a σ-structure, and by the definition of T σ there is a model M of T σ containing F . The definition of F gives rise to an embedding of M 1 and M 2 in M , and since T σ is model complete, this embedding is elementary. Therefore we proved: Any two models over A, M 1 and M 2 , of T σ can be elementarily embedded over A into a third model M , such that for any tuples x ∈ M 1 and y ∈ M 2 , with T A types p and q, the T A type of the pair (x, y) in M is d * p (q). Now let M be any model of T σ and a 0 ∈ M an element in acl σ (A). We denote by a the tuple of conjugates of a 0 . Let N be a model as above, for M 1 = M 2 = M . Thus M has two elementary embeddings into N , f 1 and f 2 , with b i = f i (a) such that tp(b 1 , b 2 / A ) = d * tp(b 1 / A ) (tp(b 2 / A )). However, since the embedding is elementary, b 1 and b 2 are both the set of solutions of some σ-algebraic formula. Therefore, tp(b 1 , b 2 / A ) contains the formulas π i (b 1 ) = π j (b 2 ) (where π i are projections). By claim 45, for any i, π i (b 1 ) ∈ A, so a ∈ A as well.
We now aim to prove claim 29. We first note that the condition tp(A/ C ) = tp(B/ C ) consists of a collection of condition on types of finite sub-tuples. Furthermore, for any tuple a, E a ⊆ E A (in the notation of claim 29.) Therefore, the whole statements reduces to the case when A and B are finite tuples a and b.
We explain the result in the case when C is algebraically closed. In this case, let p(x) = tp(a/ C ), q(x) = tp(b/ C ) and C a , C b as in the claim. We first claim that for any 0-definable set φ(x, y), d p φ is defined over C a . Indeed, let τ be an automorphism fixing a and C (as a set.) Then τ (p) = p and so (d p φ) τ = d τ −1 (p) φ = d p φ. This shows that d p φ is over E a and it is over C by definition. Now let r = p ↾ D = q ↾ D , where D = dcl(C a ∪ C b ). The extension of r to acl(D) is the same in p and in q: if d ∈ acl(D) and d 1 is a conjugate over D, then d p φ(d) ⇐⇒ d p φ(d 1 ) for any definable set φ, since d p φ is defined over D. Thus d p φ has a well defined truth value on the set d of conjugates of d, and the same is true of d q φ. Since d is in D, this truth value is actually the same for p and q.
This shows that we may assume D to be algebraically closed. But now d p and d q are both definition schemes for the type r, so by uniqueness d p = d q , and therefore p = q.
The crucial point in the above argument is that C a contains (the parameters for) all the defining formulas d p φ. The definable closure of all these formulas is called the canonical base of p, denoted C b(p). In this terms, the previous paragraph proves the following proposition in the case that C is algebraically closed: Proposition 46. Let T be a stable theory with EI. There is a mapping assigning to any type p over a (definably closed) set C, a subset C b(p) ⊆ C such that the following holds: (1) For any automorphism τ (of a saturated model M ⊇ C), C b(τ (p)) = τ (C b(p)) (2) For any automorphism τ fixing C (as a set), τ fixes p if and only if τ fixes C b(p) pointwise. Furthermore, C b(p) is the set of elements fixed by all such automorphisms. (3) (Existence) If D ⊇ C and acl(C b(p)) ∩ D ⊆ C, then there is a type p 1 over D extending p with C b(p 1 ) = C b(p) (note that if C is algebraically closed, any D satisfies the condition.) (4) (Uniqueness) For any set A ⊆ C containing C b(p), p is unique among extensions q of p ↾ A to C with C b(q) ⊆ A. If D is any set such that D∩acl(C b(p)) = C b(p), we denote by p| D the restriction to D of the (unique) extension of p to C ∪ D.
A similar result appears in [2]. As for algebraically closed C, this result implies claim 29.
Proof. The case when C is algebraically closed was explained above. The general statement is proved by reducing to this case.
Let q be an extension of p to acl(C), and for any b ∈ C b(q) ⊆ acl(C) let b be the set of conjugates of b over C. We set C b(p) = B def = {b b ∈ C b(q)}. Since C is definably closed, B⊆C.
(1) This is obvious from the definition and the algebraically closed case.
(2) Let τ be an automorphism of M fixing p. Then q 1 = τ (q) also extends p. Therefore, there is an automorphism σ of M fixing C pointwise and taking q 1 to q. Hence σ(τ (q)) = q, so by the algebraically closed case, σ • τ fixes C b(q) pointwise. Since σ fixes C it takes elements of acl(C) to their conjugates, hence so does τ . Therefore τ fixes C b(p), as required. The furthermore part follows by the same argument. Conversely, if τ fixes C b(p) pointwise, it takes C b(q) to a conjugate over C. Let σ be an automorphism fixing C pointwise, such that σ•τ fixes C b(q) pointwise. If τ preserves C as a set, it also preserves acl(C). Therefore, by the algebraically closed case, σ • τ fixes q. This shows that τ takes any extension of p to acl(C) to another such extension. Since p is the restriction to C of the intersection of all such extensions, τ fixes p.
(3) Let D be as in the assumption. Using existence for the algebraically closed case, we find q 1 over acl(D) extending q, and set p 1 = q 1 ↾ D . Then any element of C b(p 1 ), being a finite set of elements algebraic over C b(p), is itself algebraic over C b(p). Since it is also in D, by the assumption on D we have C b(p 1 ) ⊆ C. Hence C b(p 1 ) = C b(p). (4) Assume that p 1 is another extension of p ↾ A to C such that C b(p 1 ) ⊆ A.
Let q 1 be an extension of p 1 to acl(C), and let r and r 1 be the restrictions of q and q 1 to acl(A). Since r and r 1 have the same restriction to A, there is an automorphism τ over A taking r to r 1 . However, by existence and uniqueness in the algebraically closed case, C b(r) = C b(q), so τ takes C b(r) to a conjugate over C.
Therefore, as above, we may find an automorphism σ over C, such that σ•τ fixes C b(r). Since both automorphisms fix A pointwise, they fix acl(A) as a set, and so σ takes r 1 to r. Since σ fixes C, it takes q 1 to a type over acl(C) whose restriction to acl(A) is r. By the algebraically closed case, σ(q 1 ) = q. Since σ fixes C this means that p 1 = p.
Remark 47. We summarise the relations between the various sets we considered. Assume in claim 29 that the model M is saturated. We claim that C A is the canonical base of p A = tp(A/ C ). Indeed, let τ be an automorphism of M fixing A pointwise and C as a set. Then p A is fixed by τ . By the second property above, τ fixes C b(p A ) pointwise. This shows that C b(p A ) ⊆ C A . Conversely, let x ∈ C A , and let τ be an automorphism fixing C as a set and fixing p A . Since τ fixes p A , A and τ (A) have the same type over C. Let σ be an automorphism over C taking τ (A) to A. Then σ • τ fixes A pointwise and C as a set. Hence σ(τ (x)) = x. Since x ∈ C and σ fixes C, this implies that τ (x) = x. Again by the second property, this shows that x ∈ C b(p A ).
Hence, if the conditions of claim 29 hold (and M is saturated), C A = C B , and both are equal to the canonical base of the type. Considering proposition 26 again, we see that this set also coincides (under the conditions of the proposition) with C(B i ), where B i = dcl(B ∪ a i ).