On a local-global principle for quadratic twists of abelian varieties

Let $A$ and $A'$ be abelian varieties defined over a number field $k$ of dimension $g\geq 1$. For $g\leq 3$, we show that the following local-global principle holds: $A$ and $A'$ are quadratic twists of each other if and only if, for almost all primes $\mathfrak p$ of $k$ of good reduction for $A$ and $A'$, the reductions $A_{\mathfrak p}$ and $A'_{\mathfrak p}$ are quadratic twists of each other. This result is known when $g=1$, in which case it has appeared in works by Kings, Rajan, Ramakrishnan, and Serre. We provide an example that violates this local-global principle in dimension $g=4$.

1. Introduction 1.1.Main result.Let k be a number field and let A be an abelian variety defined over k of dimension g ≥ 1.We will denote by A ψ the twist of A corresponding to a given 1-cocycle ψ : G k → Aut(A Q ), where G k denotes the absolute Galois group of k.We will say that an abelian variety A ′ defined over k is a quadratic twist of A if it is isogenous over k to A χ for some (possibly trivial) quadratic character χ : G k → {±1} ⊆ Aut(A Q ).Let Σ k be the set of nonzero prime ideals of the ring of integers of k.For p ∈ Σ k , denote by k p the residue field of k at p, and if p is of good reduction for A, let A p be the reduction of A modulo p.Let f Ap be the the characteristic polynomial of Frobenius relative to k p acting on an ℓ-adic Tate module of A p for some prime ℓ coprime to p.If p is of good reduction for both A and A ′ , we will say that A and A ′ are locally quadratic twists at p if A p and A ′ p are quadratic twists, that is, if either . One easily sees that if A and A ′ are quadratic twists, then (1.1) A and A ′ are locally quadratic twists at almost all primes of Σ k .
Throughout the article, by "almost all primes of Σ k " we mean "all primes in a (Dirichlet) density 1 subset of Σ k ".Our main object of study will be the converse of the above implication.The following is our main result.
Theorem 1.1.Let A and A ′ be abelian varieties defined over k of dimension g ≤ 3. Suppose that (1.1) holds for A and A ′ .Then A and A ′ are quadratic twists.
We complement the above theorem by providing two abelian fourfolds defined over Q that are locally quadratic twists at all odd primes, but which are not quadratic twists.Let a p (A) denote the Frobenius trace of A at p.The above theorem is not true if one replaces condition (1.1) by the weaker condition that a p (A) and a p (A ′ ) coincide up to sign for almost all p in Σ k .Under this weaker hypothesis, it is easy to find counterexamples, and we give one in dimension g = 2.Both examples can be found in §6.
1.2.Previous results.Theorem 1.1 is known if g = 1 (at least if A does not have complex multiplication defined over k).There are different proofs of this fact in works of Serre [Ser72,p. 324], Kings [Kin98,, and Ramakrishnan [Ram00, Thm.B] (note that in these works the results are generally phrased in terms of Galois representations attached to modular forms).In the CM case, there is a closely related result by Wong [Won99,Cor. 1].
The dimension g = 1 case of Theorem 1.1 can also be retrieved from a general result on ℓ-adic representations due to Rajan [Raj98].More in general, as we will explain in §2, this result implies that if two abelian varieties A and A ′ satisfy (1.1), then A Q and A ′ Q are isogenous.Refining this conclusion to the statement of Theorem 1.1 is the goal of this article.
The above mentioned results are just a few instances of a vast literature on localglobal principles concerning abelian varieties over number fields.Our problem is closely related to a recent result of Khare and Larsen [KL20].They show that the base changes A Q and A ′ Q are isogenous if and only if for almost 1 all primes p in Σ k so are the base changes A p × k p and A ′ p × k p , where k p denotes an algebraic closure of k p .Our methods of proof and those of [KL20] are rather different (mainly due to the fact that ours is a question sensitive to base change).
In fact, we only prove the local-global principle investigated in this article for certain classes of abelian varietes.The fact that these classes end up encompassing those of dimension g ≤ 3 may be regarded as an "accident in low dimension".This is reminiscent of other local-global questions concerning abelian varieties over number fields.For example, Katz [Kat81] showed that if g ≤ 2 and for almost all p the cardinality of A p (k p ) is divisible by some prime number m, then there exists an abelian variety A ′ isogenous to A such that m divides the order of the torsion subgroup of A ′ (k); he also showed that this fails to be true if g ≥ 3.
1.3.Outline of the article.The methods employed to prove Theorem 1.1 all involve the study of the ℓ-adic representation ̺ A,ℓ attached to the abelian variety A. Let us briefly summarize them.We will say that a subset A of the set of abelian varieties defined over the number field k satisfies the local-global QT principle if any pair of abelian varieties in A that satisfy (1.1) are quadratic twists.
In §2, we record some background results.We start by deriving some consequences of Faltings isogeny theorem; this implies, for example, that if A and A ′ satisfy (1.1), then A and A ′ share the same endomorphism field K.We then show that the result by Rajan mentioned above implies that the local-global QT principle holds for those abelian varieties A such that End(A Q ) = Z.We conclude §2 by describing some connections with the theory of Sato-Tate groups.Our proof of Theorem 1.1 is independent of the Sato-Tate conjecture, but it does benefit from the classification of Sato-Tate groups of abelian varieties of dimension ≤ 3.
Suppose that A and A ′ satisfy (1.1).The main results of §3 are two variants of Rajan's theorem that build on [Ser81]: Theorem 3.1 applies when ̺ A,ℓ has an unrepeated strongly absolutely irreducible factor; Theorem 3.3 shows that, under a certain technical assumption, the base changes A K and A ′ K are quadratic twists.A common strategy in later sections consists on first applying Theorem 3.3, and 1 Actually in [KL20] it suffices to assume that a sufficiently large density of primes of Σ k has the required property.Obtaining an analogous refinement of Theorem 1.1 seems an interesting question, which we have not attempted to address in this article.
then using arguments specific to the situation of interest to descend the validity of the local-global QT principle from K to k.
In §4, we consider families of abelian varieties for which the methods described in the previous paragraph fail to apply.Those include abelian varieties that are geometrically isogenous to the power of an elliptic curve.In this case, the Tate module tensor decompositions obtained in [FG22] allow to translate our problem concerning ℓ-adic representations of degree 2g into one concerning Artin representations of degree g.This reduction by half in the degree of the representations turns out to be crucial.Indeed, the corresponding local-global principle for Artin representations is almost immediate when g is odd, and, while it can fail for even g, it does hold for g = 2.This can be seen by means of reinterpreting Ramakrishnan's theorem [Ram00, Thm.B] in the context of Artin representations.Hence, Ramakrishnan's theorem, originally conceived to treat the dimension g = 1 case of our problem, ends up playing an important role in its generalization in dimension g = 2.In §4.3, we show that produtcs of geometrically pairwise nonisogenous elliptic curves with complex multiplication satisfy the local-global QT principle.In this section, we use Hecke's equidistribution theorem [Hec20] at several points; this is natural and intuitive, but it would have sufficed to use instead results from [Ser81].
In §5, we complete the proof of Theorem 1.1.The proof takes into account the different possibilities for End(A Q ) ⊗ Q.Many cases were covered in previous sections.Other cases, as mentioned above, involve invoking Theorem 3.1 or Theorem 3.3, and then providing a few adhoc arguments.As an example of the latter, we mention the case in which A is isogenous to the product of an elliptic curve E and and abelian surface B such that Hom(E Q , B Q ) = 0.If E does not have CM, then Theorem 1.1 immediately follows from Theorem 3.1.However, if E has CM, Theorem 3.1 essentially only provides two quadratic characters χ and ψ such that A ′ ∼ E χ × B ψ .That one can take χ = ψ is the content of Proposition 5.6.1.4.Notation and terminology.Throughout the article, k is a number field, and A and A ′ are abelian varieties defined over k of dimension g ≥ 1.All algebraic extensions of k are assumed to be contained in a fixed algebraic closure Q of Q.If L/k is one such field extension, then we will write G L to denote the absolute Galois group Gal(Q/L), and A L to denote the base change A × k L. We denote by End 0 (A) the endomorphism algebra of A, and refer to End 0 (A Q ) as the geometric endomorphism algebra of A. However, due to a widely used convention, when we say that A has complex multiplication (CM), we in fact mean that A Q has CM.Whenever it becomes necessary to ask that the CM be defined over k, we will explicitly specify it.If E is a field and θ : G k → GL r (E) is a representation, then θ| L denotes the restriction of θ to G L , and θ ∨ denotes the contragredient representation of θ.We will say that θ is absolutely irreducible if θ ⊗ E is irreducible, where E denotes an algebraic closure of E. We will say that θ is strongly absolutely irreducible if θ| L is absolutely irreducible for every finite extension L/k.1.5.Acknowlegements.Thanks to Edgar Costa for his assistance in §6, to Xavier Guitart for discussions that led to this investigation, to Kiran Kedlaya for discussions around Lemma 2.9, and to Bjorn Poonen for explaining to me the proof of Lemma 4.13.I was financially supported by the Simons Foundation grant 550033, the Ramón y Cajal fellowship RYC-2019-027378-I, and the María de Maeztu Program CEX2020-001084-M.

Generalities
We will derive some properties that A and A ′ must satisfy in case (1.1) holds.First we record some elementary consequences of Faltings isogeny theorem [Fal83]; then we describe some implications of a theorem of Rajan; finally we explain the connection of our problem to the theory of Sato-Tate groups and derive some consequences of their classification for abelian surfaces.
2.1.Consequences of Faltings isogeny theorem.For a prime number ℓ, let V ℓ (A) denote the rational ℓ-adic Tate module of A. There is a continuous action of G k on V ℓ (A) which gives rise to an ℓ-adic representation ̺ A,ℓ : G k → Aut(V ℓ (A)).For p ∈ Σ k , denote by Fr p an arithmetic Frobenius element at p.By the work of Weil, if p is of good reduction for A and does not divide ℓ, then is a polynomial of degree 2g with integer coefficients which does not depend on the choice of ℓ.One easily verifies that ̺ Aχ,ℓ ≃ χ ⊗ ̺ A,ℓ for any quadratic character χ, and Faltings isogeny theorem then gives that A ′ is a quadratic twist of A by χ if and only if ̺ A ′ ,ℓ ≃ χ⊗̺ A,ℓ .Together with the fact that L p (A, T ) coincides with the reverse Weil polynomial T 2g f Ap (1/T ) of the reduction A p , this has the following consequence.
Lemma 2.1.If A and A ′ are quadratic twists, then they are locally quadratic twists at every prime p which is of good reduction for both.
Throughout this article we will denote by K/k the endomorphism field of A, that is, the minimal extension K/k such that End(A K ) ≃ End(A Q ).It is a finite and Galois extension.
Lemma 2.2.Suppose that (1.1) holds for A and A ′ .Then End 0 (A L ) and End 0 (A ′ L ) have the same dimension for every finite extension L/k.In particular, A and A ′ share the same endomorphism field.
Proof.The lemma follows from the isomorphism The central isomorphism follows from (1.1) and the Chebotarev density theorem.Lemma 2.4.Suppose that there exists a density 1 subset Σ ⊆ Σ k such that for every p ∈ Σ there exists ǫ p ∈ {±1} such that Tr(̺ ′ (Fr p )) = ǫ p • Tr(̺(Fr p )). Then for every finite extension F/k, the set SM(̺| F , ̺ ′ | F ) has a positive upper density.
Corollary 2.5 (Rajan).Suppose that the hypotheses of Theorem 2.3 hold, and that moreover ̺ is strongly absolutely irreducible.Then there exists a finite Galois extension L/k and a character χ : Proof.By Theorem 2.3 there exists a finite Galois extension L/k such that ̺| L ≃ ̺ ′ | L .Since ̺ is strongly absolutely irreducible, Schur's lemma shows that the space is 1-dimensional.Let χ denote the character of the action of Gal(L/k) on this space.Then Since χ ⊗ ̺ is irreducible and has the same dimension as ̺ ′ , we have ̺ ′ ≃ χ ⊗ ̺.
We will apply Theorem 2.3 when ̺ and ̺ ′ are the ℓ-adic representations attached to A and A ′ .The following is a consequence of Rajan's theorem.
Corollary 2.6.Suppose that (1.1) holds for A and A ′ .Then there exists a finite Galois extension L/k such that A L and A ′ L are isogenous.Proof.There exists a finite extension F/k such that the Zariski closures of ̺ A,ℓ (G F ) and ̺ A ′ ,ℓ (G F ) are connected.By Lemma 2.4, the representations ̺ A,ℓ | F and ̺ A ′ ,ℓ | F satisfy the hypotheses of Theorem 2.3.Hence, there exists a finite Galois extension and so A L and A ′ L are isogenous.
We now use the above corollaries to show that the local-global QT principle holds for abelian varieties with trivial geometric endomorphism ring.
Corollary 2.7.Suppose that End(A Q ) ≃ Z and that (1.1) holds for A and A ′ .Then A and A ′ are quadratic twists.

Proof. By Faltings isogeny theorem, for every finite extension L/k we have an isomorphism
End which implies that ̺ A,ℓ is strongly absolutely irreducible.By Corollary 2.5, there exists a finite Galois extension L/k and a character χ of Gal(L/k) such that ̺ A ′ ,ℓ ≃ χ ⊗ ̺ A,ℓ .Again by Faltings isogeny theorem, there is an isomorphism , where Q ℓ (χ) means Q ℓ equipped with the action of Gal(L/k) via χ.Hence Gal(L/k) acts on Hom(A L , A ′ L ) ≃ Z via χ, and thus χ must be quadratic.

2.3.
The connection with Sato-Tate groups.Throughout this section suppose that A and A ′ have dimension g ≤ 3. The Sato-Tate group of A, denoted ST(A), is a closed real Lie subgroup of USp(2g), only defined up to conjugacy.It captures important arithmetic information of A and it is conjectured to predict the limiting distribution of the Frobenius elements attached to A. See [BK15] for its definition in our context; see [Ser12] for a conditional definition in a more general context.Let us denote by ST(A) 0 the connected component of the identity in ST(A), and by π 0 (ST(A)) the group of components of ST(A).
For every p ∈ Σ k of good reduction for A, one defines a semisimple conjugacy class s p of ST(A) as in [FKRS12, Def.2.9].The Sato-Tate conjecture for A is the prediction that the sequence {s p } p , where the indexing set of primes is ordered by norm, is equidistributed with respect to the projection of the Haar measure of ST(A) on its set of conjugacy classes.The characteristic polynomial i a i T i ∈ R[T ] of an element of USp(2g) is monic and palindromic, and it is hence determined by the g-tuple a = (a 1 , . . ., a g ).If we denote by X g the set of g-tuples obtained in this way, then there is a bijection Conj(USp(2g)) ≃ X g .Let a p denote the image of s p under the map Conj(ST(A)) → Conj(USp(2g)) ≃ X g .
We will denote by µ the projection on X g , via the above map, of the Haar measure of ST(A).Define similarly s ′ p , a ′ p and µ ′ .Let π(x) denote the number of primes p in Σ k of good reduction for A such that Nm(p) ≤ x.The Sato-Tate conjecture implies that (2.1) for every C-valued continuous function f on X g .Lemma 2.9.Suppose that (1.1) holds for the abelian varieties A and A ′ of dimension g ≤ 3.If the Sato-Tate conjecture holds for A and A ′ , then the Sato-Tate groups of A and A ′ coincide.
Proof.Given a ∈ X g and a g-tupe of nonnegative integer numbers e = (e 1 , . . ., e g ), let us write a e to denote a e1 for every e.Let w(e) denote i ie i .Since −1 ∈ ST(A), we have that both members of (2.2) are 0 if w(e) is odd.Suppose from now one that w(e) is even.If A and A ′ are locally quadratic twists at p, then s ′ p = ±s p , and hence a ′ e p = a e p .Then (2.2) follows from (2.1).
Remark 2.10.Lemma 2.9 will not be used in the sequel.Since the Sato-Tate group of an abelian variety is invariant under quadratic twist, Lemma 2.9 can be recovered from Theorem 1.1 (without assuming the Sato-Tate conjecture).
2.4.Consequences of the classification of Sato-Tate groups.The next two results represent partial progress toward Theorem 1.1 and will be used to simplify some proofs in subsequent sections.We use the notations for Sato-Tate groups introduced in [FKRS12] and [FKS21b], and present in the data base [LMFDB].
Proposition 2.11.Suppose that (1.1) holds for the abelian surfaces A and A ′ , and: i Then A and A ′ are quadratic twists.
Proof.By comparing determinants of ̺ A,ℓ and ̺ A ′ ,ℓ we see that χ 4 = 1.It will suffice to prove that in fact χ 2 = 1.Suppose that the order of χ were 4. Let Σ ⊆ Σ k denote the density 1 set of primes p of good reduction for A and A ′ , of absolute residue degree 1, and such that A and A ′ are locally quadratic twists at p. Define z 2,0 as the upper density of the set of primes p ∈ Σ such that the coefficient b p of T 2 in L p (A, T ) is 0. For every p ∈ Σ such that χ(Fr p ) has order 4, condition ii) implies that b p is zero.In particular, we see that z 2,0 ≥ 1/2.It is proven in the course of [Saw16, Thm.3] that z 2,0 is the proportion of connected components C of the Sato-Tate group of A such that, for all γ ∈ C, the coefficient of T 2 in the characteristic polynomial of γ is 0. Interpreted as this proportion, the quantity z 2,0 can be read from [FKRS12, Table 8] (see columns 'c' and 'z 2 '; note that z 2,0 is the central term of z 2 ).By inspection of the table, one finds that C 4,1 and F ac are the only two Sato-Tate groups of abelian surfaces for which z 2,0 ≥ 1/2.
The next lemma accounts for cases uncovered by the previous proposition.For its proof it is convenient to introduce the following notion.For a finite Galois extension F/k, A will be said to have Frobenius traces concentrated in F if Tr(̺ A,ℓ (Fr p )) = 0 for every p ∈ Σ k of good reduction for A which does not split completely in F/k.Lemma 2.12.Let A and A ′ be abelian surfaces defined over k.Let K/k denote the endomorphism field of A. Suppose that: i) The Sato-Tate group of Then A and A ′ are quadratic twists.
Proof.Let E/k be the cyclic extension cut out by ψ.By hypothesis ii), we have that and hence A and A ′ are in fact isogenous.Suppose from now on that [E : E∩K] = 2.We may assume that ψ is quartic as otherwise there is nothing to show.Then Gal(EK/k) is a group of order 8 with two normal subgroups of order 2 yielding quotients isomorphic to C 4 .This uniquely determines the isomorphism class of Gal(EK/k), which must be C 2 × C 4 .In this case, one readily sees that there exists a quadratic subextension F/k of EK/k such that EK = F K. Let χ denote the nontrivial character of Gal(F/k).If follows that χ| K = ψ| K and hence ψ ⊗ ̺ A,ℓ ≃ χ ⊗ ̺ A,ℓ by the fact that A has Frobenius traces concentrated in K.

Variants of Rajan's theorem
In this section, relying on the results of [Ser81], we will prove variants of Corollary 2.5, which will later play a crucial role in the proof of Theorem 1.1.Resume the notations of §2.2.The following variant of Corollary 2.5 drops the condition that ̺ and ̺ ′ be strongly absolutely irreducible representations.
Theorem 3.1.Let ̺, ̺ ′ : G k → GL r (E λ ) be continuous, semisimple representations unramified outside a finite set S ⊆ Σ k .Suppose that there exists a density 1 subset Σ ⊆ Σ k such that for every p ∈ Σ there exists ǫ p ∈ {±1} such that Suppose moreover that , where ̺ 1 is strongly absolutely irreducible, the Zariski closure of its image is connected, and satisfies , and then the argument in the proof of Corollary 2.5 yields a character χ as otherwise we would obtain a relation among the traces of ̺ 1 , ̺ 2 , and ̺ ′ 2 that would contradict (3.2).Hence, the connectedness of G 1 implies that dim(W x1,x2 ∩ G 1 ) < dim(G 1 ).Let H be the (finite) union of the closed proper subvarieties W x1,x2 ∩ G 1 attached to choices of the x 1 , x 2 as above.Then, by [Ser81, Thm. 10, Thm.8] the density of the set of primes p ∈ Σ for which ̺ 1 (Fr p ) belongs to H is zero.We conclude that for every prime p in a subset of Σ, still of density 1, we have χ 1 (Fr p ) = ǫ p , which in particular implies that χ 1 is quadratic.Therefore, for every p in a density 1 subset of Σ k , we have Tr(̺ ′ (Fr p )) = χ 1 (Fr p ) • Tr(̺(Fr p )), and the theorem follows from the semisimplicity of ̺ and ̺ ′ .
We will typically apply Theorem 3.1 when ̺ and ̺ ′ are ̺ A,ℓ and ̺ A ′ ,ℓ , and A has dimension ≤ 3 and all endomorphisms defined over k (in this situation, the Zariski closure of ̺(G k ) is connected; see [FKRS12, Prop.2.17]).The following is the most basic application.
Corollary 3.2.Let A and A ′ be elliptic curves defined over k for which (1.1) holds.Then A and A ′ are quadratic twists.
Proof.As recalled in §1, the result is known if ̺ A,ℓ is irreducible.If A is an elliptic curve with CM defined over k, then ̺ A,ℓ satisfies the hypotheses of Theorem 3.1.
The following result asserts that the local-global QT principle holds over the endomorphism field under a mild technical hypothesis.
Theorem 3.3.Suppose that (1.1) holds for A and A ′ , and that, if K/k denotes the endomorphim field of A, then the Zariski closures of ̺ A,ℓ (G K ) and ̺ A ′ ,ℓ (G K ) are connected.Then there exists a quadratic character χ of G K such that A ′ K ∼ A K,χ and such that the field extension L/K cut out by χ satisfies that L/k is Galois.
Proof.Suppose that A K and A ′ K are not isogenous, as otherwise the result is clear.Since the Zariski closures of ̺ A,ℓ (G K ) and ̺ A,ℓ (G K ) are connected, we can choose a prime ℓ such that where the ̺ i (resp.̺ ′ i ) are strongly absolutely irreducible representations of G K pairwise nonisomorphic even after restriction to a finite extension of K.After reordering the ̺ i , Corollary 2.6 provides a finite extension There exists a density 1 subset Σ ⊆ Σ K such that for every p ∈ Σ there exists χ p ∈ {±1} such that Tr(̺ A ′ ,ℓ (Fr p )) = χ p • Tr(̺ A,ℓ (Fr p )).The argument in the proof of Corollary 2.5 shows that there exists a character Arguing as in the proof of Theorem 3.1, we see that is the quadratic extension cut out by χ 1 , then there is an isogeny from A L to A ′ L .Hence L/k is the minimal extension over which all homomorphisms from A Q to A ′ Q are defined, and so L/k is Galois.

Products of elliptic curves
In this section we consider abelian varieties which are Q-isogenous to products of elliptic curves.In §4.2 we examine the case of Q-isogenous factors.In this situation, Theorem 3.1 fails to apply, but the local-global QT principle will follow by combining the Tate module tensor decompositions obtained in [FG22] with a theorem of Ramakrishnan that we recall in §4.1.Finally, in §4.3 we consider the case of a product of pairwise geometrically nonisogenous elliptic curves with CM. 4.1.Ramakrishnan's theorem.Let L/k be a finite Galois extension, V a Qvector space, and θ : Gal(L/k) → GL(V ) an Artin representation.Let denote the adjoint representation of θ.It satifies ad θ ≃ θ ⊗ θ ∨ .Note that if ad 0 θ denotes the restriction of ad θ on the subspace of trace 0 elements of End(V ), then ad θ ≃ 1 ⊕ ad 0 θ , where 1 denotes the trivial representation.The next theorem of Ramakrishnan [Ram00, Thm.B] shows that, in the 2dimensional case, θ can be recovered from ad 0 θ up to twist by a character (beware that Ramakrishnan's original theorem applies to general ℓ-adic representations; we will only apply it to Artin representations).
Proof.It follows from Schur Lemma that θ is irreducible if and only if 1 is not an irreducible constituent of ad 0 θ .Hence, θ ′ is irreducible if and only if θ is irreducible.See [Ram00, Thm.B] for the proof in the case that both θ and θ ′ are irreducible.If both θ and θ ′ are reducible, the proof is an elementary exercise left to the reader.
Remark 4.2.If θ, θ ′ : G k → GL 3 (Q) are Artin representations such that ad 0 θ ≃ ad 0 θ ′ , it is not necessarily true that there exists a character χ such that θ ′ ≃ χ ⊗ θ.To construct an example of this, let L/k be a degree 24 Galois extension with Galois group D 4 × C 3 , let ν denote a non-selfdual degree 2 irreducible representation of Gal(L/k), and let ω denote the determinant of ν.One easily verifies that θ = 1 ⊕ ν and θ ′ = ω ⊕ ν provide the desired example.
We will be concerned with the following consequence of the above theorem.
Remark 4.4.The above corollary fails to hold for general even values of g.Let L/k denote a biquadratic extension.Let ϕ and ψ denote two distinct nontrivial characters of Gal(L/k).It is easy to verify that the degree 6 Artin representations verify (4.1), while there is no character χ of Gal(L/k) such that θ ′ ≃ χ ⊗ θ.

4.2.
Tate module tensor decompositions.In this section, we consider some families of geometrically isotypic abelian varieties, that is, abelian varieties that are Q-isogenous to the power of an (absolutely) simple one.We will rely on the description of the Tate module of one such variety given in [FG22, Thm.1.1].We next restate that theorem in our particular cases of interest.Fix a complex conjugation σ in G Q .Let ̺ be an ℓ-adic representation of G k unramified outside a finite set S ⊆ Σ k .We will denote by ̺ σ the ℓ-adic representation defined by ̺ σ (s) := ̺(σsσ −1 ) for every s ∈ G k .Given a number field F , we will say that ̺ is F -rational if det(1 − ̺(Fr p )T ) ∈ F [T ] for every p ∈ Σ k − S. If θ is an Artin representation with coefficients in F , we will denote by θ the representation with coefficients in σ(F ) defined by θ(s) := σ(θ(s)).

Theorem 4.5 ([FG22]
). Suppose that A Q is isogenous to the power of either: a) an elliptic curve without CM; or b) an abelian surface with quaternionic multiplication (QM); or c) an elliptic curve with CM by a quadratic imaginary field M .
Then there exists a number field F such that for every prime ℓ totally split in where θ : G kM → GL g (F ) is an Artin representation and χ, χ : Remark 4.6.There is a particular situation of case i) of the above theorem in which the representations θ, ̺ admit especially explicit descriptions.Suppose that there exists an elliptic curve B without CM and defined over k such that A Q and B g Q are isogenous (by [FG18, Thm.2.21], this happens for example whenever g is odd).Then we may take F = Q, ̺ = ̺ B,ℓ , and θ = Hom 0 (B g Q , A Q ), in which case the theorem follows from [Fit12, Thm.3.1].
The above theorem is a crucial input for Theorems 4.9 and 4.11, whose proofs will also need the following auxiliary lemma on the abundance of ordinary primes.Let p be a prime of Σ k of good reduction for A lying over the rational prime p.We say that p is ordinary if the central coefficient of L p (A, T ) is not divisible by p, equivalently, if g of the roots of L p (A, T ) have p-adic valuation 0; we say that p is supersingular if all the roots of L p (A, T ) are of the form ζ Nm(p) −1/2 , where ζ is a root of unity and Nm(p) is the absolute norm of p.
Lemma 4.7.Suppose that A Q is isogenous to the power of an elliptic curve B. If B has CM, say by a quadratic imaginary field M , suppose that k = kM .Then the set of primes of ordinary reduction for A has density 1.
Proof.We claim that a prime p of Σ k of good reduction for A is either ordinary or supersingular.Indeed, let q denote Nm(p), let α p be a root of L p (A, T ), and let v : Q × p → Q denote the p-adic valuation normalized so that v(q) is 1.By hypothesis, there exists a finite Galois extension K/k such that A K is isogenous to the power of an elliptic curve over K.If f ≥ 1 denotes the residue degree of p in K/k, then A p × Fq F q f is isogenous to the power of an elliptic curve over F q f , and hence the valuation v(α f p ) is either 0,f , or f /2.In the first two cases, p is ordinary, and in the latter case p is supersingular.We need to show that the set S of supersingular primes has density 0. If B does not have CM, let θ and ̺ be as in part i) of Theorem 4.5.If p ∈ S, then Tr(̺(Fr(p))) is divisible by √ q and hence is limited to finitely many possibilities.By [Ser81], this implies that S has density 0. If B has CM, let χ be as in part ii) of Theorem 4.5.If p ∈ S, then χ(Fr p ) = ζ √ q, where ζ is a root of unity whose order is bounded in terms of g.By [Ser81] or [Hec20], and under the assumption k = kM , this implies that S has density 0.
Remark 4.8.When g is odd and B has no CM, the above lemma admits an even simpler proof.In this case, by Remark 4.6, there is an elliptic curve B defined over k and an Artin representation θ such that ̺ A,ℓ ≃ θ ⊗ ̺ B,ℓ .Thus a prime of good reduction of A is ordinary for A if and only if it is ordinary for B. That the set of primes ordinary for B has density 1 is well known.Theorem 4.9.Suppose that (1.1) holds for A and A ′ , and that: i) The dimension g of A is either odd or equal to 2.
ii) A Q is either an abelian surface with QM or isogenous to the power of an elliptic curve without CM.Then A and A ′ are quadratic twists.
Proof.By Corollary 2.6 there is a finite Galois extension L/k such that A L and A ′ L are isogenous.Hence A ′ also satisfies hypothesis ii).After possibly enlarging L/k, by Theorem 4.5, there are a number field F , Artin representations θ, θ ′ of Gal(L/k) realizable over F , and where ℓ is a prime totally split in F .Since ̺| L ≃ ̺ ′ | L and ̺ is strongly absolutely irreducible, there is a character χ of Gal(L/k) such that ̺ ′ ≃ χ ⊗ ̺.If p ∈ Σ k is a prime of good reduction for A, let α p and β p be the eigenvalues of ̺(Fr p ).By [Saw16, Thm.3] and Lemma 4.7, there exists a density 1 subset Σ ⊆ Σ k of primes of good reduction for A and A ′ such that for every p ∈ Σ the quotient α p /β p is not a root of unity, and for some ǫ p ∈ {±1}.Hence for every p ∈ Σ we have Since Σ has density 1, for every s ∈ Gal(L/k) there must be ǫ s ∈ {±1} such that Since i) holds, by Corollary 4.3, there exists a quadratic character Remark 4.10.We note that the theorem above is not true for general even values of g.Let E be an elliptic curve defined over k without CM.Let A and A ′ be the 6-dimensional abelian varieties E ⊗ θ and E ⊗ θ ′ , where θ and θ ′ are the Artin representations defined in Remark 4.4.Then A and A ′ are locally quadratic twists at almost all primes of Σ k .However, if there were a quadratic character ε of G k such that ̺ A ′ ,ℓ ≃ ε ⊗ ̺ A,ℓ , then, arguing as in the proof of the above theorem, we would obtain that θ ′ is isomorphic to ε ⊗ θ, which contradicts Remark 4.4.
Theorem 4.11.Suppose that (1.1) holds for A and A ′ , and that: i) The dimension g of A is either odd or equal to 2.
ii) A Q is isogenous to the power of an elliptic curve with CM.Then A and A ′ are quadratic twists.
Proof.Let M denote the quadratic imaginary field associated with the elliptic factor of A. Suppose first that M is contained in k.By arguing as in the proof of Theorem 4.9, using Theorem 4.5 we can find a finite Galois extension L/k, a number field F , Artin representations θ, θ ′ : Gal(L/k) → GL g (F ), and continuous where ℓ is a prime totally split in F .After reordering χ and χ if necessary, we may assume that χ| L ≃ χ ′ | L .Therefore there exists a character ψ of Gal(L/k) such that χ ′ ≃ ψχ.By Lemma 4.7 there exists a density 1 subset Σ ⊆ Σ k of primes of good reduction for A and A ′ such that for every p ∈ Σ the quotient χ(Fr p )/χ(Fr p ) is not a root of unity, and for some ǫ p ∈ {±1}.Hence for every p ∈ Σ we have Since Σ has density 1, for every s ∈ Gal(L/k) there must be Suppose now that M is not contained in k.Arguing as in the previous case, we see that there are a continuous character χ : G kM → Q × ℓ , a quadratic character ϕ of Gal(L/kM ), and an Artin representation θ of Gal(L/kM ) such that The third of the above isomorphisms follows from where we have used (4.3).Suppose that g is odd.Taking determinants of ϕ σ ⊗θ σ ≃ ϕ ⊗ θ σ , we get (ϕ σ ) g = ϕ g , that is, ϕ σ and ϕ coincide as characters of Gal(L/kM ).Hence ϕ extends to a character φ of Gal(L/k), and Taking determinants of the above isomorphism, we see that φ2g = 1.Since trivially we also have φ4 = 1, the fact that g is odd implies that φ is quadratic.If g = 2, then apply Lemma 4.12 below taking N = kM .
The next lemma is applied in the proof of the above theorem in the case g = 2.
We state and prove it also in the case g = 3 for future reference.Lemma 4.12.Suppose that (1.1) holds for A and A ′ , and that: i) A and A ′ have dimension ≤ 3.
ii) There exist a quadratic extension N/k contained in the endomorphism field K/k and a quadratic character χ : iii) A has Frobenius traces concentrated in N .Then A and A ′ are quadratic twists.
Proof.Let E/N denote the field extension cut out by χ.Let E Gal /k denote the Galois closure of E/k.Since E/k contains the quadratic subextension N/k, the possibilities for Gal(E Gal /k) are C 2 × C 2 , C 4 , or D 4 .In the first two cases, the character χ extends to a character χ of Gal(E Gal /k) such that χ4 = 1.By iii), we have that ̺ A ′ ,ℓ ≃ χ ⊗ ̺ A,ℓ .If g = 3, then χ6 = 1, and hence χ must be quadratic.If g = 2, the lemma follows from Proposition 2.11 and Lemma 2.12 (note that χ| K is indeed quadratic).Suppose finally that Gal(E Gal /k) ≃ D 4 .Then there exists a biquadratic extension F/k such that F N = E Gal .Therefore, there exists a (quadratic) character ψ of Gal(F/k) such that ψ| N = χ| N .By iii), we have that ̺ A ′ ,ℓ ≃ ψ ⊗ ̺ A,ℓ , which completes the proof of the lemma.4.3.Products of pairwise geometrically nonisogenous elliptic curves.In this section we prove that the local-global QT principle holds for products of pairwise geometrically nonisogenous elliptic curves.We resume the notations from the previous section.The following lemma will be used in this and later sections.Lemma 4.13.Let A be an abelian variety defined over k.Suppose that A Q is isogenous to the product B × C of abelian varieties B, C defined over Q such that Proof.Choose an isogeny ϕ : B × C → A Q .Let B ′ denote the abelian subvariety of A Q generated by ϕ(B) and its Galois conjugates ϕ(B) s for s ∈ G k .Define C ′ analogously.Note that B ′ and C ′ are defined over k.By (4.5), we have Hom(B ′ , C ′ ) = 0, and hence the addition map ψ : Hence A and B ′ × C ′ have the same dimension, and thus ψ is an isogeny.
By the above lemma and Theorem 3.1, the local-global QT principle holds for products of pairwise geometrically nonisogenous elliptic curves one of whose factors does not have CM.From now on, we focus on the case that all factors have CM.
Lemma 4.14.Suppose that A is isogenous to the product of g elliptic curves E i with CM, say by M i , and pairwise not Q-isogenous.Then there is a subset Σ ⊆ Σ k of density 1 consisting of primes of absolute residue degree 1 and of good reduction for A such that for every p ∈ Σ, of norm p, we have where the reciprocal roots α i ∈ Q satisfy: i) If p splits in M i , then α i ∈ M i − Q and α i / √ p is not a root of unity.
ii) If p is inert in M i , then α i = √ −p and α i ∈ M j for any j.
Proof.If p splits in kM i , consider the decomposition ̺ Ei,ℓ | kM ≃ χ ⊕ χ from Theorem 4.5 noting that χ is an M i -rational Hecke character in this case; if p is inert in kM i , then use the description of ̺ Ei as the induction of χ from kM i down to k.
We spare the details to the reader.
Proposition 4.15.Suppose that (1.1) holds for A and A ′ , and that A Q is isogenous to the product of g nonisogenous elliptic curves with CM.Then A and A ′ are quadratic twists.
Proof.By Corollary 2.6 and Lemma 4.13, there exist elliptic curves E i , E ′ i defined over k such that E i,Q and E ′ i,Q are isogenous, and A ∼ i E i and A ′ ∼ i E ′ i .Suppose first that g = 2. Lemma 4.13 also implies that if M i denotes the CM field of E i , then the endomorphism field K of A is kM 1 M 2 .From the description of L p (A, T ) from Lemma 4.14, we see that E i and E ′ i satisfy (1.1).Then, by Corollary 3.2, there are quadratic characters , where we have used that χ i ⊗ ̺ Ei,ℓ ≃ ̺ Ei,ℓ .
Suppose now that g ≥ 3.By hypothesis, there exists a density 1 subset Σ ⊆ Σ k such that for every p ∈ Σ there exists From the description of L p (A, T ) from Lemma 4.14, by shrinking Σ if necessary, we may assume that L p (A ′ i , T ) = L p (A i , ǫ p T ) for every p ∈ Σ.By the g = 2 case, there exists a quadratic character • Tr(̺ Ai,ℓ (Fr p )) for every p ∈ Σ.Moreover, by Hecke's equidistribution theorem, there is a density 1 subset Σ ′ ⊆ Σ such that for every p ∈ Σ ′ , we have Tr(̺ Ai,ℓ (Fr p )) = 0 unless p is both inert in M 1 and M i .Let Σ i ⊆ Σ ′ be the subset of those p which are split in M 1 or split in M i .Note that Σ 2 ∩ Σ i has density equal to 5/8.From (4.7), for every p ∈ Σ 2 ∩ Σ i , we have ϕ i (Fr p ) = ǫ p = ϕ 2 (Fr p ).Since ϕ i and ϕ 2 are quadratic and coincide on a set of Frobenius elements of density > 1/2, they must coincide.

Proof of the main theorem
The absolute type of an abelian variety A the isomorphism class of the Ralgebra End(A Q ) ⊗ Z R. We borrow from [FKRS12, §4.1] the labels A, . . ., F for the absolute type of an abelian surface.See [FKS21a, §3.2.1] or [FKS21b, §3.5] for the description of the absolute types A, . . ., N of an abelian threefold.Note that if (1.1) holds for A and A ′ , then they have the same absolute type by Corollary 2.6.Recall that they also have the same endomorphism field by Lemma 2.2.To complete the proof of Theorem 1.1 we will distinguish the cases g = 2 and g = 3. Before, we recall a construction that will be used in several proofs (in fact, it has already appeared implicitly via Theorem 4.5).We refer to [Rib76, Chap.II] for further details.
Remark 5.1.Let B be an abelian variety defined over k of dimension g, and let M be a number field.Suppose that there is a Q-algebra embedding M ֒→ End 0 (B).Choose a prime ℓ totally split in M , so that the [M where Q ℓ is being regarded as an M ⊗Q ℓ -module via λ i .It has dimension 2g/[M : Q] as a vector space over Q ℓ .We let G k act naturally on V ℓ (B) and trivially on Q ℓ .With this action, there is an isomorphism V ℓ (B) ≃ i V λi (B).
5.1.Abelian surfaces.Throughout this section assume g = 2. Theorem 1.1 follows from Theorem 3.1 or Corollary 2.7 if the absolute type of A and A ′ is A, from Theorem 3.1 if it is C, from Theorem 4.9 if it is E, and from Theorem 4.11 if it is F. We will complete the proof of Theorem 1.1 in the remaining cases.
Corollary 5.7.Let B and B ′ be abelian surfaces defined over k, and E and E ′ be elliptic curves defined over k with CM.If Hom(E Q , B Q ) = 0 and (1.1) holds for A := E × B and A ′ := E ′ × B ′ , then A and A ′ are quadratic twists.
Proof.By Theorem 3.1, there exists a quadratic character ϕ of G kM such that In particular, for every prime p ∈ Σ k split in kM , except for a density 0 set, E and E ′ (resp.B and B ′ ) are locally quadratic twists at p. Similarly, for every p ∈ Σ k inert in kM , except for a density 0 set, the facts that L p (E, T ) = 1 + Nm(p)T 2 and that A and A ′ are locally quadratic twists at p imply that E and E ′ (resp.B and B ′ ) are locally quadratic twists at p. Hence, by Corollary 3.2 and the case g = 2 of Theorem 1.1, there exist quadratic characters χ, ψ of G k such that E ′ ∼ E χ and B ′ ∼ B ψ , and then the corollary follows from Proposition 5.6.
Corollary 5.8.If A has absolute type F, J, or L, then Theorem 1.1 holds.
Proof.It suffices to note that by Lemma 4.13 we can apply Corollary 5.7.5.2.1.Absolute type B. In this case End 0 (A Q ) is a quadratic imaginary field.If K = k, then Theorem 1.1 follows from Theorem 3.1.Otherwise, K/k is quadratic and A and A ′ have Sato-Tate group N (U(3)).Then, for a prime ℓ totally split in M , we have that V ℓ (A) ≃ Ind k K (V λ (A)), where λ is an embedding of M into Q ℓ .Theorem 1.1 then follows from the case K = k and Lemma 4.12.5.2.2.Absolute type E. We will need the following lemma.
Lemma 5.9.Suppose that (1.1) holds for A and A ′ , and that: i) The endomorphism field K/k of A is a degree 3 cyclic extension.ii) A has Frobenius traces concentrated in K.
Then A and A ′ are quadratic twists.Proof.By Theorem 3.3, there is a quadratic character χ of G K such that A ′ K ∼ A K,χ cutting out an extension L/K such that L/k is Galois.If L = K, the lemma is clear.Otherwise Gal(L/k) ≃ S 3 of C 6 .In any case, there is a quadratic extension F/k such that L = F K. Let ψ be the nontrivial quadratic character of F/k, so that ψ| K = χ.By ii), we have ̺ A,ℓ ⊗ ψ = ̺ A,ℓ ⊗ χ, and the lemma follows.
Let us return to the case that A has absolute type E. We can choose a prime ℓ such that ̺ A,ℓ | K ≃ ̺ 1 ⊕ ̺ 2 ⊕ ̺ 3 , where the ̺ i : G K → GL 2 (Q ℓ ) are strongly absolutely irreducible pairwise nonisomorphic representations.If ̺ A,ℓ is reducible, then one of the ̺ i descends to G k and the Zariski closure of its image is connected.Theorem 1.1 then follows from Theorem 3.1.Suppose that ̺ A,ℓ is irreducible.Then, K/k has degree 3 or 6, depending on whether the Sato-Tate group of A is E s or E s,t .In the first case, Theorem 1.1 follows from Lemma 5.9.In the second case, let N/k be the quadratic subextension of K/k.By the previous case, A N and A ′ N are quadratic twists, and then Theorem 1.1 follows from Lemma 4.12.5.2.3.Absolute type H.We may assume that A is absolutely simple and that End 0 (A Q ) is a sextic CM field M , as otherwise Theorem 1.1 follows from Corollary 5.7.From [FKS21b, §4.3], we see that one of the following cases occurs: i) K = k and End 0 (A) ≃ M .ii) K/k is quadratic and End 0 (A) is a real cubic field.iii) K/k is cyclic of order 3 and End 0 (A) is an imaginary quadratic field.iv) K/k is cyclic of order 6 and End 0 (A) ≃ Q.
Let ℓ be a prime totally split in M .If we set n = 6/[K : k] = [End 0 (A) : Q], then V ℓ (A) admits a decomposition analogous to (5.2), and hence A has Frobenius traces concentrated in K.In case i), Theorem 1.1 follows from Theorem 3.1.In case ii) (resp.iii), iv)), it follows from case i) and Lemma 4.12 (resp.case i) and Lemma 5.9, case iii) and Lemma 4.12).

Examples
In this final section, we provide two examples.Let A be an abelian variety defined over the number field k, and let ℓ be a prime.For a prime p of Σ k coprime to ℓ, we let a p (A) denote Tr(̺ A,ℓ (Fr p )).
6.1.First example.We will exhibit two abelian surfaces A and A ′ defined over Q which, despite not being quadratic twists, satisfy a p (A) = ±a p (A ′ ) for all rational odd primes p.Let C and C ′ denote the genus 2 curves defined over Q given by y 2 = x 5 − x and y 2 = x 5 + 4x .
Let A and A ′ denote the Jacobians of C and C ′ .Note that C and C ′ have good reduction outside 2 and thus so do A and A ′ .
Proposition 6.1.For every odd prime p, we have a p (A) = ±a p (A ′ ).Nonetheless, A and A ′ are not quadratic twists.
Proof.By computing L 3 (A, T ) and L 3 (A ′ , T ), one sees that A 3 and A ′ 3 are not quadratic twists, and hence neither are A and A ′ .Let p be an odd prime.We will rely on the results of [FS14] in order to show that a p (A) = ±a p (A ′ ).Accordingly to [FS14, Table 5], define K = Q( √ 2, i), L = K(2 1/4 ), and L ′ = K( 2 + √ 2).Let r (resp.s, s ′ ) denote the residue degree of p in K (resp.L, L ′ ).Since L ∩ L ′ = K and Gal(L/Q) ≃ C 2 × C 4 and Gal(L/Q) ≃ D 4 , we have three cases: i) if r = 1, then s, s ′ = 1 or 2; if r = 2, then s, s ′ = 2 or 4; if r = 4, then s = s ′ = 4. Then [FS14, Prop.4.9], implies that a p (A) = a p (A ′ ) = 0 in cases ii) and iii), and that a p (A) = ±a p (A ′ ) in case i).6.2.Second example.We will exhibit two abelian fourfolds A and A ′ defined over Q which, despite not being quadratic twists, are locally quadratic twists at all rational odd primes.This example was obtained by means of a computer exploration of the family of curves y 2 = x 9 + ax, with a ∈ Q, carried by Edgar Costa, to whom I express my deepest gratitude.Let C and C ′ denote the genus 4 curves defined over Q and given by the affine models y 2 = x 9 + x and y 2 = x 9 + 16x .
Let A and A ′ denote the Jacobians of C and C ′ .Note that C and C ′ have good reduction outside 2 and thus so do A and A ′ .Proposition 6.2.For every odd prime p, the reductions A p and A ′ p are quadratic twists.Nonetheless, A and A ′ are not.
Proof.Let L/Q denote the minimal extension over which all homomorphisms from A Q to A ′ Q are defined.By [Sil92, Thm.4.2], the extension L/Q is finite, Galois, and unramified outside 2. We first show that A and A ′ are not quadratic twists.Suppose the contrary, that is, that there exists a quadratic character χ : G Q → {±1} such that A ′ ∼ A χ .Note that χ necessarily factors through an at most quadratic subextension N/Q of L/Q.Hence, N/Q is unramified outside 2, which means that
The relations between elementary symmetric polynomials and power sums show that (6.2) implies that #C(F p i ) = #C ′ (F p i ) = p i + 1 for i = 1, . . ., 3. But (6.1) immediately implies that #C(F p 4 ) = #C ′ (F p 4 ).Thus L p (A, T ) = L p (A ′ , T ), and A p and A ′ p are isogenous.
Lemma 6.3.Let A denote the Jacobian of a curve defined by an affine model y 2 = x 9 + cx for c ∈ Q × .For every prime p ≡ 3, 5 (mod 8) of good reduction for A, there exists an integer s such that the L-polynomial of A at p is of the form L p (A, T ) = 1 + sT 4 + p 4 T 8 .
Theorem 2.3(Rajan).Let F/k be a finite extension such that the Zariski closures of ̺(G F ) and ̺ ′ (G F ) are connected.If the upper density of SM(̺| F , ̺ ′ | F ) is positive, then there exists a finite Galois extensionL/k containing F/k such that ̺| L ≃ ̺ ′ | L .Rajan's theorem relates to the local-global QT principle by means of next lemma.