Good orbital integrals

This paper concerns a class of orbital integrals in Lie algebras over p-adic fields. The values of these orbital integrals at the unit element in the Hecke algebra count points on varieties over finite fields. The construction, which is based on motivic integration, works both in characteristic zero and in positive characteristic. As an application, the Fundamental Lemma for this class of integrals is lifted from positive characteristic to characteristic zero. The results are based on a formula for orbital integrals as distributions inflated from orbits in the quotient spaces of the Moy-Prasad filtrations of the Lie algebra. This formula is established by Fourier analysis on these quotient spaces.


Introduction
It has been clear to researchers for many years that orbital integrals on p-adic groups are geometrical objects. However, it has taken many years to make this observation precise. When the local field has positive characteristic, Kottwitz, Goresky, and MacPherson give a geometrical description of the orbital integrals of the unit element in the Hecke algebra [17].
Another approach to this problem is suggested by motivic integration. Motivic integration may be viewed as a geometrization of ordinary p-adic integration. This is the path followed by this paper.
One advantage of this approach is that it works equally well in all characteristics. This allows us to lift the beautiful recent work of Goresky, Kottwitz, Laumon, and MacPherson to characteristic zero -at least for the special class of semi-simple elements that we consider.
A limitation of motivic integration is that the domain of integration is restricted to a special algebra of sets, called definable sets (in the sense of first order logic). The main problem we face is that p-adic orbits are not definable sets. However, orbital integrals are locally constant functions. This allows us to replace each orbital integral by an average of orbital integrals over a neighborhood.
The key question is then whether orbital integrals are constant on definable sets. This turns out to be the case, at least for the class of orbital integrals that we study in this paper. In fact, the relation between definable Let F be a p-adic field with ring of integers O F , prime ideal p F and residue field F q . Throughout the paper, there will be certain mild restrictions on p, the characteristic of the residue field of F ; these conditions are met my assuming that p is 'sufficiently large'.
Let |x| = |x| F be the normalized absolute value on F . (We also use |C| for the cardinality of a set C. If ξ = (ξ 1 , . . . , ξ m ) is an m-tuple of variables, then we write |ξ| for the length m of the tuple. The context will make it clear which is intended.) Let G be the group of F -rational points on a connected reductive algebraic group G defined over F . Integration on G and its measurable subsets will always be taken with respect to the same Haar measure and the notation 'mes' will refer to that measure. Let g denote Lie algebra of G. Every integral over g and its measurable subsets will be taken with respect to the same Haar measure and the notation 'vol' will refer to that measure.
The Bruhat-Tits building for G will be denoted B(G); we refer the reader to [5] for the definition. A torus T ⊆ G defined over F is tamely ramified if the splitting field for T over F has ramification index prime to p. In this case, using results of [24], we choose an embedding of the Bruhat-Tits building B(T ) for the group T of F -rational points on T into the Bruhat-Tits building B(G) for G by way of a toral map; as we use only the image of this embedding, which does not depend on the choice just made, all results in this paper are independent of the choice. We will also view the building B(L) for the group of F -rational points on a Levi subgroup L ⊂ G defined over F as a simplicial subcomplex of B(G).
The reader is referred to [27] for the definition of the subgroups G x,r and G x,r + of G (resp. the lattices g x,r and g x,r + of g) where x is any point in B(G) and r is any non-negative real number (resp. any real number). We also write g r for the union of the spaces g x,r , as x ranges over all B(G).
Let C ∞ c (g) denote the convolution C-algebra of locally constant complexvalued functions on g with compact support. For any lattice L in g, we write C ∞ c (L) for the space of functions in C ∞ c (g) supported by L; if L ′ is a sublattice in L, then C ∞ c (L/L ′ ) will denote the vector space of elements of C ∞ c (g) supported by L which are constant on the L ′ -cosets in L.
For each x ∈ B(G), we let G x be the parahoric subgroup associated to x by [5] and letḠ x denote the quotient group G x /G x,0 + . We remark thatḠ x is the set of F q -points of a reductive linear algebraic group. For each real number r (and any x ∈ B(G)) letḡ x,r denote g x,r /g x,r + and let ρ x,r : g x,r →ḡ x,r be the projection map. We remark that the adjoint action of G on g restricts to an action of G x on g x,r which in turn induces an action ofḠ x onḡ x,r .
Let d x (X) denote the supremum of the set of all r ∈ R such that X ∈ g x,r . This defines a function d x : g → R ∪ {+∞} which we refer to as the depth function at x. The depth d(X) of X in g is the supremum of the d x (X) as x ranges over the building B(G). The depth of a non-zero non-nilpotent element is always a rational number. The depth of X is infinite exactly when X is nilpotent.
We will make extensive use of the notion of good elements in g, as introduced in [1, 2.2.4]. Accordingly, we review that definition here. First, let T ⊆ G be a tamely ramified torus defined over F and let E be a splitting field for T. Let T (E) denote the group of E-rational points on T and let t ⊗ E denote the Lie algebra of T(E). Note that t ⊗ E is a split Lie algebra since it coincides with the Lie algebra of the group of E-rational points on the connected reductive algebraic group T × Spec(F ) Spec(E), which is split over E by construction. For any Y ∈ t ⊗ E and any y ∈ B(T(E)) we define the depth of Y at y as above, and likewise define the depth of Y in t ⊗ E as above.
Definition 1.1. An element X of g is good if X is semi-simple, X is contained in a Cartan subalgebra t = Lie(T ) which is tamely ramified with splitting field E/F , and for every root α of g relative to t, either α(X) is zero or the E-normalized valuation of α(X) equals the depth of X in t ⊗ E. Remark 1.2. It should be noted that the parameterization of the filtrations in [1] differs by a scalar multiple from that of [27]. In Definition 1.1, we use the depth only on a split Lie algebra t ⊗ E; and here the two parameterizations of the filtrations coincide. In this paper, we use the parameterization defined in [27], so all results culled from [1] are translated accordingly.
The existence of good elements, assuming p sufficiently large, is established in [3].
1.2. The Fourier transform. This section fixes a Fourier transform F g on the p-adic Lie algebra and recalls some well-known elementary properties of F g . Throughout, x is an arbitrary element of B(G) and r is an arbitrary real number.
We fix a Killing form ·, · : g × g → F for g and a non-trivial additive character λ : F → C × with conductor O F (that is, λ is trivial on p F but not trivial on O F ). Let Λ (X, Y ) denote the image of X, Y under λ. Lemma 1.3. Let 1 Z+gx,r : g → C be the characteristic function of Z + g x,r . For any x ∈ B(G), r ∈ R and Z ∈ g, (1.3.1) ∀X ∈ g, g Λ (X, Y ) 1 Z+gx,r (Y ) dY = Λ (X, Z) vol(g x,r )1 g x,(−r) + (X).
For p sufficiently large (recall this assumption from section 1.1) it follows from the definition of the lattice g x,r and the fact that λ has conductor O F that the set of all X ∈ g for which Λ (X, Y ) = 1 for all Y ∈ g x,r is exactly g x,(−r) + (ref: [1, § 4]). Thus, when X is an element of g x,(−r) + we have Λ (X, Z) gx,r Λ (X, Y ) dY = Λ (X, Z) vol(g x,r ); on the other hand, if X is not contained in g x,(−r) + then the function Y → Λ (X, Y ) is non-trivial on the lattice g x,r , so Therefore, as claimed.
Proof. By hypothesis, f ∈ C ∞ c (g) (as defined in Section 1.1). Any element of C ∞ c (g) may be expressed as a finite linear combination of functions of the form 1 Z+gx,r . Thus, it is sufficient to prove the proposition when f = 1 Z+gx,r . From Lemma 1.3 we see that X → g Λ (X, Y ) 1 Z+gx,r dY is locally constant and compactly supported, and therefore an element of C ∞ c (g).
We refer to F g as the Fourier transform on g. When there is no ambiguity, we write f for F g f . Corollary 1.6. For any x ∈ B(G) and for any r, s ∈ R with s ≤ r, the Fourier transform induces an isomorphism of vector spaces is a finite linear combination of functions of the form 1 Z+g x,r + with d x (Z) = s. Let r ′ be the largest real number such that g x,r ′ = g x,r + . (Thus, r ′ is the first 'jump point' greater than r.) We have seen in the proof of Proposition 1.4 (cf: Equation 1.3.1) that Since g x,(−r ′ ) + = g x,−r , we have (F g 1 Z+g x,r + )(X) = Λ (X, Z) vol(g x,r + )1 g x,−r (X), To see that F g is an isomorphism, let f = 1 Z+g x,r + and use Equation 1.3.1 again to see that (F g (F g f ))(X) is a scalar multiple (independent of X) of f (−X). Since functions of this form give a basis for C ∞ c (g x,s /g x,r + ), the corollary is proved.
1.3. Support and mesh. Recall from Section 1.1 that we write g r for the union of the spaces g x,r , as x ranges over all B(G). Notice that r ≤ r ′ implies g r ⊇ g r ′ .
Definition 1.7. For any pair of real numbers s ≤ r let C ∞ c (g) s r denote the space of f ∈ C ∞ c (g) such that the support of f is contained in g s and the support of f is contained in g −r . We write C ∞ c (g) r for the union of the Proof. Suppose f = i∈I f i for some finite set I, where f i is contained in C ∞ c (g y i ,s /g y i ,r + ) for some y i ∈ B(G). Then, the support of f is contained in the union of the g y i ,s , which is contained in g s . Consider f = i∈I f i . Applying Corollary 1.6, it follows that f i is an element of C ∞ c (g y i ,−r /g y,(−s) + ). In particular, it follows that the support of f i is contained in g y i ,−r ⊂ g −r , so the support of f is contained in the union of the g y i ,−r , which is contained Since the support of f is compact, there is a finite set {y i | i ∈ I} such that the support of f is covered by {g y i ,−r | i ∈ I}. Let µ = i∈I µ i be a partition of unity for ∪ i∈I g y i ,−r ; thus, in particular, µ i ∈ C ∞ c (g y i ,−r ) for each i ∈ I, and if j = i then µ j and µ i are supported by disjoint sets. Let f i = f µ i and observe that , for some s i ∈ R. Using Corollary 1.6 again, it follows that f i is an element of C ∞ c (g y i ,s i /g y i ,r + ). Since the support of f (and therefore f i ) is contained in g s by hypothesis, we have s i ≤ s for each i ∈ I.
As an immediate consequence we have the following. Proposition 1.9. For all s ≤ r, C ∞ c (g) s r is a vector space and the Fourier transform F g induces an automorphism 1.4. Relative Fourier transform. This section considers a Fourier transform on the space of complex-valued functions onḡ x,r . The Fourier transform will then be related to the Fourier transform on the p-adic Lie algebra by inflation. Throughout this section, x is an arbitrary element of B(G) and r is an real number.
Define Λ x,r :ḡ x,r ×ḡ x,−r → C by where X is any representative for X and Y is any representative for Y. If X 1 and X 2 are elements of g x,r with X 1 − X 2 ∈ g x,r + and if Y 1 and Y 2 are elements of g x,−r with Y 1 − Y 2 ∈ g x,(−r) + , then Λ (X 1 , Y 1 ) equals Λ (X 2 , Y 2 ), as we have seen in the proof of Proposition 1.4. Thus, Λ x,r is well-defined. The function Λ x,r defines a perfect pairing betweenḡ x,r andḡ x,−r . Note also that Λ x,−r (Y, X ) = Λ x,r (X , Y).
We refer to F x,r as the finite Fourier transform for the pair (x, r). When there is no ambiguity, we writeφ for F x,r ϕ.
An elementary calculations shows that, for any ϕ ∈ C(ḡ x,r ), It is therefore common to define the finite Fourier transform by introducing the factor |ḡ x,r | −1/2 ; as this does not simplify our main result Theorem 1.26, we have not followed that convention here.
The map taking ϕ to ϕ x,r is commonly referred to as inflation from C(ḡ x,r ) to C ∞ c (g). Proposition 1.13. For any ϕ ∈ C(ḡ x,r ), Proof. We will show ϕ x,r (Y ) = vol(g x,r + )φ x,−r (Y ) for each Y ∈ g by considering two cases. First, suppose Y ∈ g x,−r . Then, Recall that We now pick a setg x,r of representatives forḡ x,r and write Combining this with Equation 1.13.2 we have where dZ r denotes the quotient measure on g x,r /g x,r + . Notice that this integrand does not depend on Z ′ and that g x,r + dZ ′ = vol(g x,r + ). Thus, This proves the proposition in the first case. Next, suppose Y ∈ g x,−r and notice that it follows thatφ x,−r (Y ) = 0. Let s = −d x (Y ) and note that s > r. As above, pick a set of representatives for g x,r /g x,s and, for each Z ∈ g x,r , write Z = Z r + Z s , where Z r is from that set of representatives and Z s ∈ g x,s . Then, Thus, Since ρ x,−s (Y ) = 0, the second integral is 0 and therefore ϕ x,r (Y ) = 0. This proves the proposition in the second case, and therefore finishes the proof of Proposition 1.13. Proposition 1.13 states that the Fourier transform commutes with inflation, up to a multiple.
1.5. Gauss integrals. This section introduces our main technique for the study of regular semi-simple orbital integrals. Definition 1.14. For any point x in the building for G, define i x : g×g → C by We refer to i x (X, Y ) as a Gauss integral. We will sometimes write i x,X for the function Y → i x (X, Y ).
We begin with three lemmas due to Jeffrey Adler. We write G X for the centralizer of X in G. Lemma 1.15. If X is a good regular element of g, and if x is in the building for G X in G, then where t ⊥ denotes the subspace of g perpendicular to t = Lie G X with respect to the killing form on g.
Lemma 1. 16. Suppose x is a point in the building for a maximal torus T in G. For each t > 0 there is a diffeomorphism e x,t : g x,t → G x,t such that if Z ∈ g x,t , then Proof. This homeomorphism is defined at the end of [ Lemma 1.17. Suppose that X is tamely ramified and that x is a point in the building for G X in G. Let r = d x (X). Then X + g x,r + contains no nilpotent elements.
Lemma 1.18. Let X be any good regular element of g, let G X be the centralizer of X in G and let x be an element of the building for G X in G. Set r = d x (X). Let ϕ be the normalized characteristic function of theḠ x -orbit of ρ x,r (X) inḡ x,r . Then where mes refers to the Haar measure appearing in the definition of i x . (See Definition 1.11 forφ and Definition 1.12 forφ x,−r ).
Proof. By Definition 1.14, Consider the terms Ad(h)X and Ad(k) −1 Y . When ǫ > 0 is sufficiently small, Lemma 1.16 asserts the existence of a diffeomorphism e x,ǫ = e x,0 + : g x,0 + → G x,0 + . Let Z be the unique element of g x,0 + such that e x,0 + (Z) = h. Then Ad(h)X is an element of the coset X + ad(Z)X + g x,r + . Let t denote the Lie algebra of G X . From [1, 1.9.3], we have where t ⊥ x,s = g x,s ∩ t ⊥ and t ⊥ x,s + = g x,s + ∩ t ⊥ . Together with Lemma 1.15, it follows that the coset ad(Z)X + g x,r + is contained in g x,r + . Thus, Notice also that where ZḠ x (X ) is the centralizer of X inḠ x . Recognize the sum above as a Fourier transform onḡ x,r , so Since |O(X )| −1 1 O(X ) is the function ϕ defined in the statement of the lemma, then we have This proves Lemma 1.18.
Lemma 1.19. Let X be any good regular element of g, let G X be the centralizer of X in G and let x be an element of the building for G X in G. Set r = d x (X). If Y ∈ g −r and Y ∈ g x,−r then i x,X (Y ) = 0.
Proof. Let s = d x (Y ) and t = −(r + s)/2. Notice that s < −r since Y ∈ g x,−r ; thus t > 0. Let G x,t be a set of representatives for the G x,t +cosets in G x . Then, Let t ′ be the smallest jump point for x greater than t. Since t is positive and t ′ > t we use Lemma 1.16 to define e x,t ′ : g x,t ′ → G x,t ′ , which we then use to pull-back the measure dg on G x,t + to a measure dZ on g x,t + . Thus, From Lemma 1.16, we conclude that Thus, for some W ∈ g x,2t ′ +s . Since 2t + s + r = 0 (by the definition of t) and since t ′ > t, it follows that 2t ′ + s + r > 0. Thus, Λ (X, W ) = 1 and For a contradiction, suppose now that i x,X (Y ) = 0. Fix Y 0 = Ad(g 0 )Y such that Now Z → Λ (ad(X)Y 0 , Z) defines an additive character on g x,t + , so the integral above is nonzero if and only if that character is trivial on g x,t + . We may therefore assume that Λ (ad(X)Y 0 , Z) = 1 for all Z ∈ g x,t + , and it follows that ad(X)Y 0 ∈ g x,−t . Equivalently, we conclude that To simplify notation, let t = Lie(G X ) and let t ⊥ denote subspace of g perpendicular to t with respect to the killing form.
We have not yet used the fact that Y ∈ g −r . By [2, 3.1.2, part 1], So, we write where Y ′′ 0 ∈ g x,−r and N ∈ g nil . Since s = d x (Y ) = d x (Y 0 ) and since s < −r, it follows that Y ′′ 0 ∈ g x,s + . Thus, Combine Equations 1.19.13 and 1.19.14 to see that However, by Lemma 1.17, the coset Y ′ 0 +g x,s + contains no nilpotent elements. This is the desired contradiction and proves Lemma 1.19. Proposition 1.20. Let X be any good regular element in g, let G X be the centralizer of X in G and let x be an element of the building for G X in G.
where ϕ is the normalized characteristic function of theḠ x -orbit of ρ x,r (X) inḡ x,r .
Proof. If Y is not an element of g x,−r thenφ x,−r (Y ) = 0. With this observation, Proposition 1.20 follows immediately from Lemmas 1.18 and 1.19.
1.6. Good, regular, elliptic orbital integrals. This section uses Gauss integrals to produce an integral formula for good, regular, elliptic orbital integrals.
Definition 1. 21. For any f ∈ C ∞ c (g) and X ∈ g, define We will refer to φ G (X, f ) as the orbital integral of f at X. Here, dg refers to the quotient measure on G X \G.
Proposition 1.22. Let X be a tamely ramified good regular elliptic element of g, let G X denote the centralizer of X in G and let x be an element of the building for G X in G. Set r = d x (X). Let ϕ ∈ C(ḡ x,r ) be the normalized characteristic function of theḠ x -orbit of ρ x,r (X) inḡ x,r , as in Proposition 1.20. Then Proof. Let A G be the split component of the center of G and let T denote G X . Notice that the function g → f (Ad(g) −1 X) factors from T \G to a function on the left coset of G/A G by T /A G . Equip A G with a measure such that the compact set T /A G has measure 1 with respect to the quotient measure. Then, Using Proposition 1.9 and Definition 1.7, letf be the unique element of Pass from integration on G/A G to integration on (G x \G/A G ) × G x ; to simplify notation, write d * x for the quotient measure on G x \G/A G . Then A change of variables gives Sincef is supported by a compact set, the last two integrals may be exchanged, giving Now we are in a position to make use of the results from Section 1.2; namely, since x is a point in the building for T in G, then by Proposition 1.20, Since the support off is contained in g −r , it follows that Using Proposition 1.13, we have Since f = f , we have shown that Recasting this result, observe that T /A G is represented by elements of G x , so where dg refers to the quotient measure on T \G suitable normalized. This proves Proposition 1.22.
. We now illustrate Proposition 1.22 and foreshadow ideas presented in Section 4. We fix a standard fundamental affine chamber in the building for G with polyvertices 0 and 1; the facets of this chamber will be denoted (0), (1) and (01) with suppose that is the case and set r = 0. Nowḡ x,r = sl(2, F q ) and this is equipped with the adjoint action ofḠ x = SL(2, F q ). Then thē whereā is the image of a under O F → F q . (Note thatā = 0.) In particular, as X varies in the set of depth 0 elements of this Cartan subalgebra, the value of φ g (X) is determined byā. Next, suppose Y is an element of the suppose that is the case and set s = 1 2 . Thenḡ y,s = A 2 (F q ) is equipped with the action ofḠ y = GL(1, F ) given by t ·(u, v) = (t 2 u, t −2 v). Although we do not pursue this point of view here, we remark that the characteristic function ofḠ y -orbit OḠ F y (ρ y,s (Y )) of ρ y,s (Y ) ∈ḡ y,s is the characteristic function of the Frobenius-stable Kummer local system (an ℓ-adic sheaf) corresponding to the trivial character of the component group of as Y varies in the set of depth 1 2 elements of this Cartan subalgebra, the value of φ g (Y ) is determined byb. The phenomena illustrated by these examples will be generalized considerably in Section 4.2 and Theorem 4.8.

1.7.
Descent. In this section we apply standard parabolic descent arguments to extend Proposition 1.22 to good, regular orbital integrals; the result is Theorem 1.26, which is the main result of Section 1, which will allow use to compare orbital integrals without evaluating them.
Here, K is a fixed maximal special parahoric subgroup of G.
Definition 1.24. Let L be a Levi subgroup of G and let l denote the Lie algebra for L. Let P be any parabolic subgroup of G with Levi component L. Let U be the unipotent radical of P and let u denote the Lie algebra for Remark 1.25. The order of integration above is unimportant, as all relevant integrands have compact support.
Theorem 1.26. Let X be a good regular element of g of depth r. Let L be a Levi subgroup of G containing G X as an elliptic Cartan subgroup. Let x denote the image of the building for G X in L. Let ϕ ∈ C(l x,r ) be the normalized characteristic function of theL x -orbit of the image of X under It is important to notice that ϕ x,r denotes a locally constant function on l supported by l x,r , since ϕ is an element of C(l x,r ).
From [21] we have where X ∈ l is elliptic. From the definition of the depth function (cf: Section 1.1) it follows that the depth r of X ∈ g equals the depth of X ∈ l relative to x ∈ B(L); thus, r = d x (X). We claim that f P ∈ C ∞ c (l) r . To see this, we must show that F l f P ∈ C ∞ c (l) is supported by l −r . From [21] we recall that the Fourier transform commutes with the operator f → f P ; more precisely, where φ G (X, ·) is restricted to spaces of functions which are relevant to the remainder of this paper.
Lemma 1.28. Let T , t and y T ∈ B(T ) be as in Definition 1.27. Then where s ranges over R and O ranges over allḠ y Torbits inḡ y T ,s . By restriction, this defines a partition of the set g e of tamely ramified regular elliptic elements in g.
Proof. t is filtered in s by t s = t∩ g y T ,s , so a partition of t is given by the sets t ∩ d −1 y T (s). This partition is refined according to the partition ofḡ y T ,s intō G y T -orbits. Since this is the partition above, Lemma 1.28 is proved.
0 denote the set of good regular elliptic elements in g 0 . The function is constant on the partition of g g,e 0 defined by restricting the partition of g e given in Lemma 1.28.
Proof. Let O be anḠ x -orbit inḡ x,r . For any X in t O , the function ϕ ∈ C(ḡ x,r ) appearing in Proposition 1.22 is the normalized characteristic function of O. This proves Proposition 1.29.
. Let X be a good regular element of g with non-negative depth r. Let L and x be as in Theorem 1.26. Write t for the Cartan subalgebra in g for G X , so X ∈ t x,r . If X ′ ∈ t x,r is regular and D g,l (X) = D g,l (X ′ ), then Proof. This follows from Theorem 1.26 and the following facts: f is an element of C ∞ c (g) r by Remark 1.10; the depth of X in l equals the depth of X in g, where l is the Lie algebra for L; X ′ is good; and for any parabolic P with Levi component L, f P is the characteristic function of l(O F ) which is an element of C ∞ c (l) 0 and therefore of C ∞ c (l) r .

Statement of Results
Proposition 1.29 and Corollary 1. 30 give explicit results about the local constancy of orbital integrals. The rest of this paper draws some implications from this formula in the special case that g is a classical Lie algebra and the function f is the characteristic function of the integral-valued points of g. We assume for the rest of the paper that f is that function.
In this special case, arithmetic motivic integration presents the orbital integrals as the number of points on varieties over finite fields. This presentation is independent of the underlying local field in a sense that we will make precise below.
From the field-independent description, we deduce that the fundamental lemma holds for a restricted set of elements for local fields in zero characteristic, if the corresponding statement is known in positive characteristic.

Notation.
Recall that F is a p-adic field with ring of integers O F , prime ideal p F , and residue field F q , with q = q F . LetF andF q be the algebraic closures of F and F q . Let ̟ = ̟ F be a uniformizer in F . We normalize the absolute value so that |̟ F | = q −1 . We extend the normalized absolute value to an absolute value onF . Let res : O F → F q be the residue map. We let ord :F → Q be the valuation, normalized so that We let ac : F int →F × q be the angular component function given by It depends on a choice of uniformizer ̟. For i ∈ Z, we let res i : F → F q be the map Definition 2.1. We say that a statement ψ F about local fields F holds when the residual characteristic is sufficiently large when there is a natural number M such that the statement holds whenever M is relatively prime to the characteristic of the residue field of F . That is, Recall from Section 1.1 that we restrict F so that its residual characteristic is sufficiently large (for the various statements that we make). This assumption is mentioned in many of the lemmas and theorems, but even when it is not explicitly mentioned, the assumption remains in effect. The natural number M will depend on the Lie algebra g under consideration and a parameter r ∈ Q. For each g and r, the constant M will be effectively computable.

Lie algebras considered.
Definition 2.2. Let (g, h) be one of the following pairs of Lie algebras.
We refer to these three cases as the odd orthogonal, symplectic, even orthogonal respectively. In each case, the Lie algebra h is a sum of two factors h 1 ⊕h 2 . We write (X, Y ) for an element in g⊕h, with Y = (Y 1 , Y 2 ) ∈ h 1 ⊕h 2 . Below, we will fix a concrete representation (the standard representation) of these algebras.
These pairs are considered in the paper [15]. In that paper, an additional family u(c), the Lie algebra of the unitary group, is considered. We make a few comments about the unitary case in Remark 7.8.
Remark 2.3. The origin of this list of Lie algebras is the following. Let G be a classical split adjoint group over F and let H be an elliptic endoscopic group of G. Then the Lie algebras g, h listed above are the Lie algebras of G and H. The list is not exhaustive. In particular, it only includes split cases. We refer to h as an endoscopic algebra.
For a given g, if the residual characteristic of F is sufficiently large, every Cartan subalgebra of g ⊕ h splits over a tamely ramified extension of F . We confine our attention to local fields F for which this is the case.
Each of the lie algebras under consideration comes with a natural representation. We identify elements of g with the matrices that represent them. We take the eigenvalues λ(X) of a semi-simple element with respect to this representation.
Definition 2.4. Let g be one of the semi-simple Lie algebras introduced in Definition 2.2. We say that an element X is restricted (of slope r ∈ Q) if it satisfies the following conditions.
(2) X is contained in a tamely ramified Cartan subalgebra t.
(5) The multiplicity of the eigenvalue λ = 0 is at most 1. Write g(r) for the set of restricted elements of slope r in the lie algebra g. When it becomes necessary to indicate the coefficient ring A of the matrices X, we write g(r, A) ⊂ g(A).
The first three conditions in the definition of restricted imply that every restricted element is good. On the set of regular elements in a Cartan subalgebra, the depth is equal to the slope up to a nonzero multiplicative factor that depends only on the Cartan subalgebra. Although it is possible to give a formula for this multiplicative factor, our proof does not rely on the value of this scalar. In the interest of simplicity, we do not give a formula.
In the symplectic and odd orthogonal algebras, the final two conditions follow from the first three, at least for fields of sufficiently large residual characteristic (which we assume). Finally, in the even orthogonal lie algebras, it is possible to satisfy the first three conditions without the last two conditions, because of a pair of eigenvalues ±λ(X) that have smaller absolute value than the rest. (For instance, a good element may have a pair of eigenvalues equal to zero.) Definition 2.5. We give an equivalence relation on the restricted elements of slope r. If the lie algebra is symplectic or odd orthogonal, we say that two restricted elements X and X ′ of slope r are equivalent if the eigenvalues λ i (X) of X and λ i (X ′ ) of X ′ can be indexed so that for all i. For the even orthogonal lie algebra, let J be the symmetric matrix that defines the algebra: We say that X and X ′ are equivalent if the Inequality 2.5.1 holds and if the additional condition where pfaff is the pfaffian 1 of a skew-symmetric matrix. If X is a restricted element of slope r, let [X] r be its equivalence class.
Theorem 2.6. Let g be one of the lie algebras given in Definition 2.2.
There exists M > 0 and an affine variety S g,r over Z[ 1 M ] that classifies the equivalence classes of restricted elements of slope r. The variety S g,r depends on g and r, but is independent of the local field in the following sense. For all local fields F whose residual characteristic is prime to M , we have a natural bijection between The varieties S g,r are described for each g and r in Section 4.2.
Proof. This will be proved later as Theorem 4.4.
2.3. Orbital Integrals. Langlands and Shelstad attach a κ-orbital integral to semi-simple elements in the endoscopic algebra whose image in g is regular. The κ-orbital integral of f (the characteristic function of g(O F )) is defined in terms of a transfer factor defined in [25]. We write the κ-orbital integral -including the transfer factor -on the Lie algebra, rather than the group. We use the canonical normalization of transfer factors from [18].
for the κ-orbital integral on g attached to Y over the characteristic function of g(O F ). It is a sum of orbital integrals in g, weighted by the Langlands-Shelstad transfer factor. We write the stable orbital integral of the char- . If Y is a regular semi-simple element of h, then Langlands and Shelstad have defined a corresponding element X ∈ g, which they call the image of Y . The image of Y , which will be made explicit in Section 4.6, is well-defined up to stable conjugacy.
Conjecture 2.7 (The fundamental lemma). For each of the pairs g, h in Definition 2.2, and every regular semi-simple element Y in h, such that the image of Y in g is restricted of slope r, there is an equality of orbital integrals The endoscopic lie algebras that we study are given as a sum Each restricted element Y in h is an ordered pair (Y 1 , Y 2 ) of two restricted elements of the same slope. By Theorem 2.6, the equivalence classes of restricted elements of slope r in h are parameterized by S h 1 ,r × S h 2 ,r . We write this product of parameter spaces as S h,r . If Y and Y ′ are equivalent and are restricted of slope r in h, then the image of Y in g is restricted of slope r if and only if the image of Y ′ has the same property. There is a subvariety S g,h,r of S h,r that parameterizes equivalence classes of elements Y whose image in g is restricted of slope r.
depends only on the equivalence class of Y .
Proof. This will be proved later as Theorem 4.8.
Consequently, we may speak of the κ-orbital integral of a parameter y ∈ S g,h,r (F q ) when the characteristic of F q is sufficiently large.
If U is a variety over any base variety S and x is a closed point of the base S with residue field k(x) = F q , then we let |U x (F q )| be the number of points of the fiber of U over x. The following is the main result of the paper. Theorem 2.9. For every (g, h) in Definition 2.2 and r ∈ Q with r ≥ 0, there are a natural number M , a finite indexing set I, varieties U i over S g,h,r indexed by i ∈ I, constants b i ∈ Q indexed by i ∈ I, and a polynomial p(x) of the form with the following property: For all finite fields of order relatively prime to M , we have The constant M , the indexing set I, the varieties U i , and the constants b i , and the polynomial p(x) are effectively computable.
Proof. This will be proved later. It is a consequence of the fact that the integrals in question can be described as volumes of a family of locally constant definable sets (Lemma 5.5, Lemma 5.7, Lemma 6.2) and that families of volumes of locally constant definable sets have a representation of this form (Theorem 7.1).
The theorem asserts that the κ-orbital integrals of restricted elements of slope r count points on varieties U i over finite fields. We emphasize that the varieties U i and constants b i are independent of the local field F and the residue field F q . These are universal varieties that calculate the κ-orbital integrals for all local fields with sufficiently large residual characteristic. Whenever it becomes necessary to indicate the dependence of the data I, U i , b i , and p on the underlying parameters (g, h) and r, we write  ∀y ∈ S g,h,r (F q ).
Remark 2.11. The varieties on the left are geometrizations of the κ-orbital integrals. Those on the right are the geometrizations of the stable orbital integrals. The stable orbital integrals on h of the characteristic function of the unit lattice g(O F ) are products Thus, we may apply the results of Theorem 2.9 twice, once for h 1 and once for h 2 to get a representation of the stable orbital integral on h as the number of F q -points on a formal linear combination of varieties. It is this combination that appears on the right-hand side of the corollary.) The representation of orbital integrals in Theorem 2.9 is independent of the field F . This observation leads to the following corollary.   [10]. We briefly recall its definition, and refer the reader to [10] and [11] for details. First of all, K 0 (Var k ) is the Grothendieck ring of varieties over a field k of characteristic zero. It is generated by symbols [V ], for every variety V over k. We omit the relations. Let L = [A 1 k ] be the class of the affine line. K mot 0 (Var k ) is a quotient of K 0 (Var k ) that is obtained by killing all L-torsion and by identifying [V ] and [W ] whenever [V ] and [W ] are nonsingular projective varieties that become equal in the category of Chow motives. The ring K mot 0 (Var k )[L −1 ] ⊗ Q is then defined by inverting L and tensoring with Q. We write K = K mot 0 (Var k )[L −1 ] ⊗ Q for a field k that will be made explicit below. We use [·] both for elements of the Grothendieck ring K 0 (Var k ) and for their images in K mot 0 (Var k )[L −1 ] ⊗ Q. Denef and Loeser also construct a completion of K mot 0 (Var k )[L −1 ] ⊗ Q. This completion is necessary in general, because integration is defined as a limit. In the special setting that we consider, this completion will not be necessary. We will work exclusively with the motivic volumes of weakly stable subassignments. 2 As the completion will not be needed, we skip the construction.
Let k be the field of rational functions on S g,h,r . The generic fiber of each variety U i gives a element [ It is natural to conjecture the following geometric form of the fundamental lemma. (Note that we have cross-multiplied by the denominators in Theorem 2.9, to avoid a localization of the ring K mot 0 (Var k )[L −1 ] ⊗ Q.) Conjecture 2.13 (Motivic fundamental lemma). For each (g, h) in Definition 2.2 and each r ∈ Q, we have the identity (in the ring K): 2.5. Relation to the geometric fundamental lemma.
Remark 2.14. Conjecture 2.13 is closely related to the geometric fundamental lemma described in [17] and [26]. However, it is not clear whether our conjecture should be a consequence of the geometric fundamental lemma as they formulate it. Their identity depends on p-adic parameters γ and is an identity built on varieties over the residue field F q . Our identity is a single universal identity (for each (g, h) and r) over the base field k, which is a finitely generated extension of the field of rational numbers.
Remark 2.15. The geometric approach to the fundamental lemma introduced by Goresky, Kottwitz, and MacPherson assumes a local field of positive characteristic. Laumon has produced a proof of the fundamental lemma 2 Weakly stable subassignments will be defined in Definition 7.4. There is an unfortunate clash in terminology between 'stable' in the sense of stable conjugacy (stable orbital integrals, and so forth) and in the sense of stable subassignments. The context will make it clear when stability is meant in the sense of weakly stable subassignments.
for unitary groups (under a purity hypothesis 3 ) over local fields of positive characteristic [26]. The unitary analogue of Corollary 2.12 (cf. Remark 7.8) extends Laumon's proof of the fundamental lemma to local fields of characteristic zero, at least for restricted elements.
Remark 2.16. In our geometric formulation of the fundamental lemma, there is some loss of information when we pass from the ring Q[S g,h,r ] to its field of fractions k. It should be viewed as asserting that the fundamental lemma holds generically. We are forced to pass to the field of fractions because the properties of the map [·] are based on the work of Gillet and Soulé, which requires a field k of characteristic zero.
Remark 2.17. Although we have effective procedures for finding equations for the data M , I, b i , U i , and p, it seems to be a difficult problem in general to determine whether elements of the ring K are equal. In particular, there is no known decision procedure to determine whether the identity of Conjecture 2.13 is valid for a given (g, h) and r.
The rest of this paper is devoted to the proofs of the results stated in this section.

Characteristic Polynomials
3.1. r-reduction. This section reviews some basic facts about polynomials and fields extensions. The proofs are elementary and are omitted.
Throughout the paper, we consider constants satisfying the relations: (3.0.1) r ∈ Q, g, ℓ, n, L, N ∈ Z; N ≥ 1; g ≥ 1; r ≥ 0; r = L/N ; g = gcd(L, N ); ℓ = L/g; n = N/g Let (3.0.2) P = λ N + α 1 λ N −1 + · · · + α n λ N −n + · · · + α ng be a polynomial with coefficients in F whose roots λ i in a fixed algebraic closureF satisfy for i = 1, . . . , N . When Condition 3.0.3 holds, we say that P has slope r. The coefficient α j is a symmetric polynomial in λ i , which is homogeneous of degree j. It follows from Condition 3.0.3 that the coefficients of a polynomial of slope r satisfy In particular, Let a j be the image of the integer α nj /̟ ℓj in F q .
We call R the r-reduction of P . Let t r be the map from {x ∈F | ord(x) = r} toF q given by Definition 3.3. We say that an integer inF is topologically unipotent if its residue class is 1.
Lemma 3.4. Let P have slope r. Assume p > n, where p is the characteristic of F q . Assume that P has N distinct roots λ 1 , . . . , λ N . Assume that |λ i − λ j | = q −r for all i = j. Then the map λ j → t r (λ j ) from roots of P to roots of R is an n to 1 mapping onto the set of roots of R.
Corollary 3.5. The roots of R are distinct.
We have a partial converse. Lemma 3.6. Let r, L, N , g, ℓ be as in Definition 3.0.1. Assume that p > n, where p is the characteristic of F q . Let (3.6.1) P = λ N + α 1 λ N −1 + · · · + α ng be any polynomial in F [x] such that |α j | ≤ q −rj . Define the r-reduction R ∈ F q [λ] by Condition 3.1.1. Assume that 0 is not a root of R and that R has distinct roots. Then P has slope r and its roots λ i satisfy |λ i − λ j | = q −r for all i = j.
Proof. The inequality |α j | ≤ q −rj is strict when n does not divide j, because the left-hand side of the inequality is an integral power of q. Let (3.6.2) P 1 = λ N + α n λ N −n + · · · + α ng be the polynomial obtained from P by setting the coefficients α i to zero when n does not divide i. Let and similarly forP 1 (λ). The coefficients ofP andP 1 are integers and the constant term is congruent to R(0) = 0. It follows that the roots of P (and P 1 ) have absolute value q −r . The resultant res(P ,P ′ ) is congruent modulo ̟ to the resultant res(P 1 ,P ′ 1 ). Thus, the identity |λ i − λ j | = q −r follows if the resultant forP 1 is a unit. ButP 1 has nonzero roots and it is of the forṁ R(x n ) whereṘ is a lift to F of R. Hence the resultant forP 1 is a unit iff the resultant res(R, R ′ ) is nonzero. This follows from the assumption that R has distinct roots.
LetṘ be a lift to F .
Assume that R is irreducible. Let F unr g be the unramified extension of degree g inF . The extension F unr g is a splitting field ofṘ over F . Letζ be a root ofṘ. Every root inF of the polynomial x n − ̟ ℓζ generates a totally ramified extension of degree n. In particular, the polynomial is irreducible. Consider the extension Letζ 1 , . . . ,ζ g be the roots ofṘ. The polynomial of degree N has coefficients in F . The polynomial is irreducible over F . The image of λ n /̟ ℓ in the field extension is a root ofṘ, which we use to identify F unr g with a subfield of this extension.
Corollary 3.11. Let R ∈ F q [λ] be an irreducible monic polynomial of degree g. Let P have r-reduction R. Assume that p is sufficiently large. The roots λ j of P in an algebraic closure satisfy Now drop the assumption that R is irreducible. For each irreducible factor R i of R of degree g i , the preceding construction gives an unramified extension F unr g i of F of degree g i and a totally ramified extension of F unr g i of degree n. By Lemma 3.10, these extensions of degree ng i are well-defined up to isomorphism. Each factor R i has an "r-lift" P i of degree ng i . (Each P i is a monic polynomial with r-reduction R i .) Let P be the product of the P i . Its r-reduction is R.
Start with a polynomial P ∈ F [λ] that has slope r and with r-reduction R. Since P i is irreducible if and only if R i is, the factors of P are of degree ng i and the factors correspond in a 1-1 fashion with the factors of R.

Even Polynomials.
In this subsection, assume that N is even and that P (−λ) = P (λ). That is, assume P (λ) = P (2) (λ 2 ) for some polynomial P (2) . The constants g, ℓ, n, . . . continue to be defined as in Definition 3.0.1. We show how to associate a quadratic extension of algebras F i /F # i to each irreducible factor of P (2) .
If n is also even then each pair (λ, −λ) of roots appear in the same fiber over the root t r (λ) of the r-reduction R. For each irreducible factor of R, there are totally ramified extension If on the other hand, n is odd, then each pair of roots (−λ, λ) is split between two fibers: 4 (3.11.4) t r (λ) = −t r (λ) = t r (−λ).
The r-reduction R is even. We write it as R(λ) = R (2) (λ 2 ). There are two types of irreducible factors of R: those that are even polynomials and those that are not. If R i is an irreducible factor that is an even polynomial, then its degree g i is even. A lift R i has splitting field F unr g i , with subfield F unr g i /2 . The (2r)-reduction of P i (λ)) can be identified with a totally ramified extension of F unr g i /2 of degree n. The quadratic extension is unramified. If n is odd and the irreducible factor R i is not an even polynomial, then there is a matching irreducible factor R j with R i (−λ) = R j (λ). The extension determined by R i in Lemma 3.8 is isomorphic to the extension determined by R j . We associate the algebra (3.11.7)

Conjugacy in Classical Lie Algebras
The assumption remains in force that the characteristic of the residue field is sufficiently large. (In particular, p > 2, p > n, and p satisfies the restrictions of [33].) 4.1. Groups under consideration. We consider symplectic and orthogonal groups.
In the symplectic case, we fix a nondegenerate skew form q V on a vector space V of even dimension N over F . We define Sp(q V ) to be the group preserving the form. Concretely, we assume that V = F N , with N even, and that q V is given by a skew symmetric matrix J on the standard basis We let sp(N ) be the corresponding lie algebra.
In the orthogonal case, we fix a nondegenerate symmetric form q V on a vector space V of dimension d over F . We let d = N for even orthogonal lie algebras and d = N +1 for odd orthogonal lie algebras, where N is even. We define so(d) to be the lie algebra associated with the form. To make things concrete, we take the vector spaces to be F d and the symmetric forms to be defined by a matrix J with respect to the standard basis, where J is the matrix given in [33] and used in [15]. We let so(d) be the corresponding lie algebra. Its elements are d × d matrices that satisfy (4.0.9) t XJ + JX = 0.

4.2.
The parameter space S g,r . Assume that the constants N , r, g, . . . are related as in Equation 3.0.1. Assume N is even. Define equivalence as in Definition 2.5. We define the r-reduction g [r] of a Lie algebra g in a case-by-case manner. It is defined in the following context. Let .0.9 we may take g to be defined over Z. The r-reduction is again a lie algebra over Z, defined as follows: (4.0.11) sp [r] (N ) = sp(g) n odd gl(g) n even.
The r-reductions are taken over Z, but we also consider them over Q, F q , and so forth.
Definition 4.1. In the symplectic and odd orthogonal cases, we take S g,r /Q be the affine variety of regular semi-simple conjugacy classes in g [r] ; that is, the adjoint quotient of the algebra g [r] . In the even orthogonal case when n is odd, we take the subvariety of the adjoint quotient of g [r] on which the determinant (in the standard representation of g) is nonzero. In the even orthogonal case when n are even, our construction is a bit more exotic. We take S g,r to be the affine variety of pairs (u, v) where u is a regular semi-simple conjugacy class in gl(g) with nonzero determinant, and v is an element of G m such that v 2 = − det(u).
Example 4.2. If g = sp(6) and r = 1/3, then n = 3, ℓ = 1, and g = 2. We have The set of regular elements are those with nonzero determinant: The conjugacy class (overQ) is determined by the determinant. The map X → det(X) induces an isomorphism S g,r ∼ = G m over Q.

4.3.
Pfaffians. In the case of even orthogonal Lie algebras, the stable conjugacy class is not determined by the characteristic polynomial. Assume that P is the characteristic polynomial of a regular semi-simple element. Assume that P has slope r. We use the pfaffian to specify the map from the restricted stable conjugacy classes of slope r of so(N ) (over the p-adic field) to stable conjugacy classes of so(g) (over the finite field). The even orthogonal Lie algebra can be identified with N by N matrices satisfying where J is a symmetric matrix. Then JX is a skew symmetric matrix. Let pfaff(JX) be its pfaffian. (There is a general discussion of pfaffians in [14].) The stable conjugacy class is determined by the characteristic polynomial of X and by pfaff(JX). We claim that det(J) = −1. In fact, the explicit choice of J in [33] is a matrix with ±1 along the skew diagonal and zeroes elsewhere. Any symmetric matrix of this form has determinant −1 (recall that N is even). Let x be an element in the r-reduction so [r] (N ) with characteristic polynomial R and let X be an element in so(N ) with characteristic polynomial P . Assume that the r-reduction of P is R. Hence, Assume that n is odd. The r-reduction g [r] is an even orthogonal algebra so(g). In this case, let j be the symmetric matrix defining so(g). Assume it has the same explicit form as J. The matrix j has determinant −1 for the same reasons as J. The square of the pfaffian is the determinant. It follows from Equation 4.2.4 that (4.2.5) ac pfaff(JX) 2 = pfaff(jx) 2 .
If n is odd, then we take the matching conditions (X ↔ x) on stable conjugacy classes to be (4.2.6) ac pfaff(JX) = pfaff(jx).
Assume that n is even. In this case, the r-reduction g [r] is the algebra But the variety S g,r consists of pairs x = (u, v) = (u(x), v(x)) where u is a regular semi-simple conjugacy class in gl(g) with nonzero determinant and v 2 = − det(u). We have We take the matching condition to be (4.2.9) ac pfaff(JX) = v(x).

4.4.
The map to S g,r .
, where k is any field. Let m be the multiplicity of the root λ = 0 in f . We call the polynomial f /λ m the nonzero part of f .
If X is a regular semi-simple element in the symplectic lie algebra, the nonzero part of its characteristic polynomial is the same as the characteristic polynomial. For odd orthogonal lie algebras, the multiplicity is one, and for even orthogonal lie algebras the multiplicity is zero or two.
Let F be a p-adic field with residue field F q . We construct a map µ : g(r) → S g,r (F q ) when the residual characteristic is sufficiently large. Let X be a restricted element of slope r. Let P be the nonzero part of the characteristic polynomial. It has slope r. Let R be the r-reduction of P . The polynomial R is the nonzero part of the characteristic polynomial of an element in the reduced algebra g [r] . Its conjugacy class is an element of S g,r .
In the even orthogonal case, we add the additional condition Equation 4.2.6 or 4.2.9. We use the same notation µ : h(r) → S h,r (F q ) for the corresponding map for h.
A stable conjugate of a restricted element of slope r is again restricted of slope r. The map we have constructed depends only on the stable conjugacy class of X, so that we may speak of the image of a conjugacy class in S g,r (F q ). Two elements X and X ′ are equivalent (in the sense of Definition 2.5.1) iff their stable conjugates are equivalent. Thus, we may speak of equivalent stable conjugacy classes. If two stable conjugacy classes are equivalent, then they define the same polynomial R (and in the even orthogonal case, the same pfaffian) and hence their images in S g,r are the same.
Theorem 4.4. When the residual characteristic is sufficiently large, the map µ induces a bijection between equivalence classes of stable conjugacy classes of elements in g(r) and elements of S g,r (F q ).
Proof. We have already checked that µ induces a well-defined map from equivalence classes of stable conjugacy classes of elements in g(r) to S g,r (F q ).
To see that this is onto, take the nonzero part R of the characteristic polynomial of x ∈ S g,r (F q ). Lift it to an even polynomial P = P (2) (λ 2 ) =Ṙ (r) (λ) as in Section 3.2. Associate with it a direct sum ⊕ i∈I F i of algebras, as in Section 3.3. These algebras embed as a Cartan subalgebra of g according to the procedure given by Waldspurger [33]. The polynomial P determines an element X of this Cartan subalgebra such that the nonzero part of its characteristic polynomial is P . The element X belongs to g(r) and maps under µ to x. (In the even orthogonal case, this is compatible with pfaffians).
To see that the map is 1-1, we check that this lift from x up to X is welldefined up to stable conjugacy and equivalence. The characteristic polynomial (together with the pfaffian in the even orthogonal case) P determines the stable conjugacy class in these classical groups. Also, the different liftṡ R (r) give equivalent elements (Lemma 3.10). Thus the theorem is established.
Corollary 4.5. If X, X ′ ∈ g(r) have the same image in S g,r (F q ), then their centralizers G X and G X ′ are stably conjugate.
Proof. The reduction R determines the factorization of P X and P X ′ and hence the direct sum of algebras ⊕ i∈I F i appearing in the proof of Theorem 4.4. According to [33], this direct sum determines the stable conjugacy class of the Cartan subalgebra (except in the even orthogonal case, where the pfaffian must also be taken into account).

4.5.
Stable Orbital Integrals. Now comes the key result. It allows us to parameterize stable orbital integrals by the elements of S g,r (F q ). According to Corollary 4.5, if X and X ′ have the same image in S g,r (F q ), then their centralizers are stably conjugate. Hence we may normalize the orbital integrals of X and X ′ by picking compatible measures on the centralizers of X and X ′ (that is, we assume that conjugation from G X to G X ′ preserves measures).
Theorem 4.6. Let X, X ′ ∈ g(r). Assume that µ(X) = µ(X ′ ) in S g,r (F q ). Assume that the measures on G X and G X ′ are compatible in the sense just described. Then the stable orbital integral of X is equal to the stable orbital integral of X ′ .
Proof. By Corollary 4.5, the Cartan subalgebras G X and G ′ X are stably conjugate. Replacing X ′ with a stable conjugate, we may assume that G X = G X ′ .
Waldspurger parameterizes semi-simple elements, up to conjugacy, by triples of data (I, (a i ), (c i )) (up to an equivalence relation) [33]. Let (I, (a i ), (c i )) and (I ′ , (a ′ i ), (c ′ i )) be the parameters attached to X and X ′ . Since G X = G X ′ , we may assume that I = I ′ , F ′ i = F i , and a i , a ′ i ∈ F i . Since X and X ′ give the same element µ(X) = µ(X ′ ) ∈ S g,r (F q ), there is a unique bijection ψ : I → I and isomorphisms ρ i : F i → F ψ(i) such that ρ i (a i ) and a ′ ψi have the same valuation and angular components for each i. Passing to equivalent data, we may assume that ψ and ρ i are identity maps. Passing to a stable conjugate of X ′ , we may assume that c ′ i = c i for all i ∈ I. After passing to this stable conjugate, we may assume that X ′ ∈ G X . In fact, G X is determined by the data (I, (a i ), (c i )) and G X ′ by the data (I, (a ′ i ), (c i )). According to the criteria in [33], we can take Y is the derivative of the characteristic polynomial of Y . However, X, X ′ ∈ g(r) with the same image in S g,r . Moreover, each pair (a i , a ′ i ) has the same angular component and valuation, . This implies that ǫ(a i , a ′ i ) is topologically unipotent in F # i and therefore a square whenever the residual characteristic is not 2 (which we assume). Thus we have X ′ ∈ G X .
We may diagonalize the two elements of G X simultaneously and compare the corresponding eigenvalues λ i . Since a i and a ′ i have the same valuation and angular components, there exist topologically unipotent elements u i such that Pick an element b in the building adapted to X as in Theorem 1.26. According to Adler and Roche [3, § 2], the Moy-Prasad filtration of a semisimple Lie algebra takes the following form on G X : Here r ′ = cr for some positive scalar c that translates between the depth r ′ and the slope r. In these equations, χ runs over all differentials of characters of the torus T with Lie algebra G X . In the concrete symplectic and orthogonal algebras cases we consider, we can take χ to run over all integer linear combinations of the nonzero eigenvalues λ(Y ) in the standard representation.
So |χ(Z)| < q −r . It follows that Z ∈ g b,r ′ + . We will show below in Equation 6.1.3 that the determinants D g,l (X) and D g,l (X ′ ) in Corollary 1.30 are equal. Thus, by that corollary, the orbital integrals of X and X ′ = X + Z are equal.
We can extend this result to stable orbital integrals as follows. If X corresponds to data (I, (a i ), (c i )); and X ′ corresponds to the data (I, (a ′ i ), (c i )). Write X c and X ′ c to make the dependence on the parameters c = (c i ) explicit. There is a bijection between the orbits in the stable conjugacy class of X and those in the stable conjugacy class of X ′ given by X c ↔ X ′ c . Equation 4.6.2 gives slope r for X c and X ′ c , which is independent of c. The argument given above for X and X ′ now applies for each c, to give that the orbital integrals of X c and X ′ c are equal. Summing over c, we find that the stable orbital integrals of X and X ′ are equal. 4.6. κ-orbital integrals. Let (g, h) be one of the pairs of Definition 2.2. Let r ∈ Q. The affine variety S h,r is a product S h1 ,r × S h2 ,r , corresponding to the factors h = h 1 ⊕ h 2 of h.
We have a map from stable conjugacy classes in h 1 ⊕h 2 to stable conjugacy classes in g that is defined as follows. Let Y = (Y 1 , Y 2 ) ∈ h 1 ⊕ h 2 . Let P 1 and P 2 be the nonzero parts of the characteristic polynomials of Y 1 and Y 2 . An image X of Y is an element whose characteristic polynomial has nonzero part P 1 P 2 . In the even orthogonal case, we also require that (where each occurrence of J is adapted to the appropriate size of matrix). X is said to be an image of Y . Let S g,h,r be the affine subvariety of S h,r whose points are µ(Y ) such that Y has a regular semi-simple image X ∈ g. The map µ restricts to a map from the subset of G-regular elements of h(r) to S g,h,r .
We have a morphism of varieties S g,h,r → S g,r that is defined as follows. If y = (y 1 , y 2 ) ∈ S g,h,r , then there are corresponding nonzero parts of characteristic polynomials R y 1 and R y 2 . The element y is mapped to x ∈ S g,r whose nonzero part of the characteristic polynomial is R y 1 R y 2 . In the even orthogonal case, we also add the condition that Definition 4.7. We say that X is an image of y ∈ S g,h,r (F q ) if µ(X) is the image of y in S g,r (F q ).
As in Section 4.5, we pick compatible measures on X and X ′ when G X is stably conjugate to G X ′ .
Theorem 4.8. For local fields of sufficiently large residual characteristic, the κ-orbital integral φ g,h (Y ) of Y ∈ h(r) depends only on µ(Y ) ∈ S g,h,r (F q ).
Proof. Consider Y and Y ′ that map to the same parameter y. The parameter y determines x ∈ S g,r (F q ). Two element X, X ′ ∈ g(r) mapping to x have stably conjugate centralizers G X and G X ′ . We assume that X is the image of Y and that X ′ is the image of Y ′ in g. Passing to a stable conjugate, we may assume (as in the proof of Theorem 4.6) that G X = G X ′ and that Waldspurger's parameters defining X and X ′ have the form (I, (a i ), (c i )) and (I, (u i a i ), (c i )) for some topologically unipotent elements u i ∈ F i . The constraints on the data actually force u i ∈ F # i . The element Y determines a partition of I into two subsets and the element Y ′ determines a partition into two subsets. This partition determines the κ. We claim that the partition is the same in both cases. In fact, the partition is determined by partitioning the even polynomial P (λ) = P (2) (λ 2 ) according to irreducible factors of P (2) (where P as usual is the nonzero part of the characteristic polynomial of X or X ′ ). The irreducible factors of P (2) are determined by the irreducible factors of its r-reduction R (2) (see Section 3.3), which is the same for both X and X ′ , since X and X ′ both map to x. Thus, the partition is the same in both cases.
We claim that for the chosen X, X ′ , we have ∆(X, Y ) = ∆(X ′ , Y ′ ), where ∆ is the Langlands-Shelstad transfer factor, as calculated by Waldspurger in [33,Ch.X]. (In fact, if we index X and X ′ by the data (c i ) and write X c , X ′ c , we have ∆(X c , Y ) = ∆(X ′ c , Y ′ ) for all parameters c = (c i ).) For this, it suffices to examine the explicit formula for the transfer factors that Waldspurger calculates. According to his calculations, the ratio ∆(X c , Y )/∆(X ′ c , Y ′ ) is given as product of characters of order 2 on the following elements of F # i : (4.8.1) P ′ X (a i )/P ′ X ′ (u i a i ), (where P ′ is the derivative of P ). We claim that these elements are topologically unipotent, so that the characters of order 2 all evaluate to 1 on these elements. In fact, each P ′ X (a i ) is a product of factors λ i (X) − a i and P ′ X (u i a i ) has the corresponding form λ i (X ′ ) − u i a i . It follows from the assumption that X and X ′ are restricted so that the quotient of these two factors is topologically unipotent. Hence the claim.
It follows as in the proof of Theorem 4.6, that the orbital integrals of X c and X ′ c are equal for each c = (c i ). Since the transfer factor is also the same for both X c and X ′ c , the κ-orbital integrals are equal. As a result of the theorem, henceforth we write φ g,h (y) for the κ-orbital integral of the unit element for any Y ∈ h(r) that maps to y ∈ S g,h,r (F q ).

The first order language of rings and Pas's language
The first order language of rings is a formal language in the first order predicate calculus. The concepts of logic and model theory that we require in this paper can be found in Enderton [12] or Fried and Jarden, [13].
A language that is slightly more complicated language than the first order language of rings is Pas's language. It is a formalization of a fragment of the theory of Henselian fields. It is described in [29], with additional comments in Denef and Loeser's papers on motivic integration, particularly [9], and briefly in [19]. We briefly recall its most important characteristics. The language is three-sorted in the sense of [12]. That is, quantifiers range over three distinct objects that can be interpreted as a p-adic field F , its residue field F q , and the additive group of values Z (or more correctly, Z ∪ {+∞}). The arithmetic of Z is restricted to the additive theory. For the additive theory of Z, there is a procedure of quantifier elimination due to Presburger [30]. The language has function symbols ac and ord that are interpreted in a p-adic field as the angular component map and the valuation function, respectively.
We recall the notion of a virtual set from [15]. It is a syntactic extension of the first-order language. Let L be a first order language (usually the first order language of rings, Pas's language, or an extension of Pas's language obtained by adjoining constants). Let ψ be a formula in L. We write The construct {x | ψ(x)} is called a virtual set (in the language L). Here, x is allowed to be a multi-variable symbol: x = (x 1 , . . . , x n ), so that we have When we write x ∈ A, it is to be understood that x is a vector of variable symbols, and that the length of that vector is the number of free variables in the defining formula of A. Intersections, unions, complements and other standard operations on sets can be applied to virtual sets. For each of the split lie algebras considered in Definition 2.2, there is a virtual set (or virtual lie algebra) defined by (viewed as a conjunction of equations in the free variables x ij ).
is a virtual set in Pas's language.
Proof. Let P = λ N +α 1 λ N −1 +· · ·+α ng be the nonzero part of the characteristic polynomial of X. For each characteristic polynomial, the multiplicity of zero is known in terms of the lie algebra g. Let R = λ g + a 1 λ g−1 + · · · + a g be the r-reduction of P . By Definition 2.4, the restricted elements are those such that (1) P is the nonzero part of the characteristic polynomial of X.
(2) The r-reduction of P is R. 5.1. Local Constancy. Let ψ(x, ξ) be a formula in Pas's language, with free variables x = (x 1 , . . . , x n ) of the valued field sort and free variables ξ = (ξ 1 , . . . , ξ m ) of the residue field sort. We set |x| = n and |ξ| = m to avoid a notational conflict with Definition 3.0.1.
Given a formula ψ(x, ξ), let f ψ be the auxiliary formula When M ∈ N is substituted into f ψ , we obtain a sentence in Pas's language (with no free variables). By quantifier elimination of the variables of the valued field and value ring sort, we can find an equivalent sentence that contains only terms of the residue field sort. (This involves discarding finitely many primes as in [20].) The formula f ψ holds in all finite field of sufficiently large characteristic, if this equivalent sentence in the language of rings has a true interpretation in all finite fields of sufficiently large characteristic.
Lemma 5.4. Suppose there exists N , such that if for every F whose residue characteristic is prime to N , there is an M F (depending on F ) such that the sentence f F ψ (M F ) holds. Then ψ(x, ξ) is stable of some level M . Proof. Write . It asserts that m is the least level for which ψ is stable of level M . When F is such that there exists M F for which f F ψ (M F ) holds, then there is a unique m F for which f ′ ψ (m F ) holds. Let F be the class of all p-adic fields of sufficiently large residual characteristic. Let F N be the subset of these p-adic fields whose residue characteristic is at least N . By [20,Thm.2], there exists N such that the set of natural numbers {m F | F ∈ F N } is bounded. Let M be an upper bound. Then f F ψ (M ) holds for all p-adic fields of sufficiently large residual characteristic.
This lemma can be immediately applied to the situation at hand. For the classical groups we consider, the Langlands-Shelstad transfer factor ∆ is real valued. We let sign : R → {−1, 0, 1} be the usual sign function on the Reals. For each g, r ∈ Q, and ǫ ∈ {±1}, let ψ ǫ g,r , be the formula The expression y → x indicates that x is an image of y.
Lemma 5.5. The formula ψ ǫ g,r is expressible in Pas's language. Proof. The most difficult part of this claim is the assertion that sign ∆(X, Y ) = ǫ is given by a formula in Pas's language. The main result of [15] shows that this part of the formula is actually given in the first order language of rings. For the relation y ∈ S g,r we use free variables of the residue sort, constrained by the algebraic relations defining S g,r as a subvariety of affine space. For g(r), we use Lemma 5.1. The condition X ∈ g becomes vacuous. (The parameter X is taken to be a set of dim g variables ranging over F , under an identification of g with F dim g .) The result follows.
Definition 5.6. For y ∈ S g,h,r , let g(r) y be the elements X of g(r) such that X maps to the image of y in S g,r (F q ). We define h(r) y similarly. Let g(r) ǫ y be the subset of X ∈ g(r) y on which sign ∆(X, y) = ǫ. The formula ψ ǫ g,r (X, y) asserts that X ∈ g(r) ǫ y . Lemma 5.7. ψ ǫ g,r is locally constant of some level M . Proof. By Lemma 5.4, it is sufficient to show that the interpretation of ψ ǫ g,r (·, y), for each y ∈ S g,r (F q ) is locally constant as a function of X ∈ g(F ). The local constancy follows from the local constancy (in X) of sign ∆(X, y), which has already been established (essentially) in the proof of Theorem 4.8.
In fact, X corresponds to Waldspurger's parameters (I, (a i ), (c i )) and small perturbations of X leave I and the fields F i unchanged. Perturbing, a i → u i a i where u i is topologically unipotent leaves the transfer factor unchanged. By the explicit formula for the transfer factor in [33], we have sign ∆(X, y) = sign ∆(Ad g X, y), and by Harish-Chandra's submersion principle such conjugates of G X fill out a neighborhood of the regular element X in g. The result follows.

Measures
Each equivalence class of semi-simple orbits of slope r forms an open subset of the Lie algebra. As a result, we may use the Lie algebra form of the Weyl integration theorem to rewrite the orbital integral as an integral over an open subset of the Lie algebra (with the additive Haar measure). We can express the Lie algebra formulation of the fundamental lemma as an assertion about volumes of regions in g(O F ).
In the arguments that appear below, there are normalizations of measures coming from three sources. The first is the canonical normalization of measures occurring in the theory of motivic integration. It is related to the Serre-Oesterlé measure that arises in the integration theory of p-adic sets [31], [28]. The second source of normalizations of measures comes from the Weyl integration theorem. The final source of normalizations on measures comes from the fundamental lemma. This section shows that these various normalizations are compatible, in the sense that the fundamental lemma takes on an appealing form when the Weyl integration is used to express the fundamental lemma as a statement involving the Serre-Oesterlé measures on the Lie algebra.
6.1. Normalization of Haar measures. Let G be a reductive group with Lie algebra g. Assume that G and g are defined over O F . Normalize the additive Haar measure dX on g so that the lattice g(O F ) has volume 1. Let ̟ be a uniformizer of F . The volume of the lattice ̟g(O F ) is Assume that the residue field characteristic is sufficiently large. Then there is a diffeomorphism between the lattice ̟g(O F ) and a neighborhood V of the origin in G(O F ) [35] as in Lemma 1.16; see also [4]. Explicitly, that neighborhood is the set of elements in G(O F ) with trivial image in G(F q ). We normalize a Haar measure dg on G so that the diffeomorphism preserves the volume of ̟g(O F ) under the exponential map. Thus,

Serre-Oesterlé measures.
A general comparison theorem of Denef and Loeser [9], which will be discussed further below, gives p-adic orbital integrals as the trace of Frobenius on corresponding elements of the ring K.
The normalization of p-adic orbital integrals in their theorem is the canonical Serre-Oesterlé measure [9, Sec.8.2], [31], [28], [32]. Our application will be to the integration of certain open subsets of g(O F ). By construction, the Serre-Oesterlé measure on g(O F ) is the additive Haar measure, normalized so that the volume of g(O F ) is 1.
6.3. The measures in the fundamental lemma. Let G be unramified, and let K = G(O F ) be a maximal compact associated with a hyperspecial vertex. The assertion of the fundamental lemma requires a particular normalization of measures [18]. Let dg be a Haar measure on G (such as the measure given above), and let .
Descent implies that for γ ∈ T (O F ) a regular semi-simple absolutely semisimple element in a Cartan subgroup T , which is regular modulo ̟, we have [18, Lemma 13.2] .
The κ-orbital integral Φ κ T,G is computed with respect to the quotient measure dg/dt. The κ-orbital integral equals the stable orbital integral of the unit element on the endoscopic group if the corresponding normalizations are used.
6.4. Weyl integration formula. Let C(G) be a set of representatives for the conjugacy classes of Cartan subgroups of G. For each Cartan subgroup T , let t be its Lie algebra. Let A T be the split component of T . Assume that X ∈ g has Jordan decomposition (6.0.5) X = X s + X n , and let (6.0.6) D g (X) = det(ad X|g/g Xs ).
If T is spit, normalize measures on T to have volume 1 on the maximal compact subgroup of T . Normalize measures on a general Cartan T by vol(T /A T ) = 1. Let the measures dX and dg be compatibly normalized as in Section 6.1. By [36, page46], the Weyl integration formula can be written as follows.

6.5.
Application. An element y ∈ S g,h,r (F q ) determines a Cartan subalgebra G X , up to stable conjugacy. For any such Cartan subalgebra, we consider the volume There is a corresponding volume in h(r).
Lemma 6.1. For every y ∈ S g,h,r , there is a constant ω(y) such that for every X ∈ g(r) y and every Y ∈ h(r) y , we have Proof. We prove the statement for X ∈ g(r). The proof for Y ∈ h(r) is similar and is left to the reader. Fix a semi-simple element X ∈ G X that is an image of y. The element X has |W (G, G X )| conjugates in G X . The set G X ∩ g(r) y is a disjoint union of |W (G, G X )| subsets of G X indexed by the conjugates of X, consisting of elements Ω X ′ of G X ∩ g(r) closest to a given conjugate X ′ . (That is, take Voronoi cells with centers at the conjugates of X.) The volume of the set Ω X ′ depends only on the measure on the Cartan subalgebra G X . This volume is independent of the ambient group.
In particular, it is the same for G and H.
For the classical lie algebras in this paper, there is a rational number a(r) depending on r ∈ Q such that the nonzero values of the transfer factor on restricted elements of slope r have the form (6.1.2) ±q a(r) .
From Lemma 5.7, we know that the sign ± is given by a formula in the first order language of rings [15]. On g(r) we have Set δ G = dim g − rank g and δ H = dim h − rank h. By the proof of Theorem 4.8, the transfer factor at ∆(X, Y ) depends only on the image of y in S g,h,r (F q ). We write ∆(X, y) when Y → y. As above, let g(r) ǫ y be the subset of g(r) y consisting of all X such that the transfer factor at (X, y) is ǫ. Lemma 6.2. Let (g, h) be one of the pairs of Definition 2.2. Assume r ≥ 0.
The fundamental lemma holds for y ∈ S g,h,r (F q ) iff

Construction of Varieties
We would like to apply the theory of motivic integration, as developed in Denef and Loeser [9] to Equation 6.2.1 to conclude the main result of the paper (Theorem 2.9). Unfortunately, the results of [9] do not give the desired results when there is a parameterized family of integrals (in this case parameterized by y ∈ S g,h,r (F q )) rather than a single integral. The forthcoming work of Cluckers and Loeser promises to give a general theory of parameterized motivic integration [6]. However, until those results become available, we confine ourselves to the earlier papers of Denef and Loeser.
It is clear from an inspection of the proofs of [9] that the methods of that paper are not sufficient to show that general parameterized families of integrals are "motivic." However, if we weaken the conclusions of their theorems slightly, the proofs of that paper can be adapted to parameterized integrals.
Their paper must be adapted as follows. Wherever they speak of an element of the ring of motives K, we speak instead of a formal linear combination (with rational coefficients) of varieties U over S = S g,h,r . Whenever they take the trace of Frobenius on an element of K, we count points instead on the fiber U y over y ∈ S g,h,r (F q ). With these slight modifications, we can read through their proofs and check that the desired results go through. Note however, that they associate a canonically determined element of K to definable subassignments, but our representation as a linear combination of varieties is far from unique.
We give a few technical details in the paragraphs that follow about how specific arguments in their paper are to be adapted to the parameterized orbital integrals in this paper.
We make use of the following variant of one of the main results of [9].
be an affine variety. Assume that ψ projects to S in the sense that the following sentence in the first order language of rings holds for all finite fields of sufficiently large characteristic 5 (in particular (q, ℓ) = 1): Then there exist a natural number M (with ℓ|M ), a finite indexing set I, constants b i ∈ Q for i ∈ I, varieties U i over S, and a polynomial p(x) ∈ Q[x] of the form with the following property.
• For all p-adic fields F and all residue fields F q , such that (q, M ) = 1, and for all y ∈ S(F q ), we have where dx is the additive Haar measure on O n F normalized so that vol (O n F ) = 1. Corollary 7.2. Under the same hypotheses, for all p-adic fields F , all residue fields F q such that (q, M ) = 1, and for all y ∈ S(F q ), We supply a sketch of the proof of the theorem, with references to [9] for details. Our argument relies on many of the ideas and constructions from [9]. The rest of this paper follows that paper closely; and our argument should be read with that paper at hand. Before turning to the proof, we give several reductions. 7.1. Reduction to covers. First we note that there is no loss of generality in working with coordinate patches that cover a variety. In fact, if X /S is any variety with cover {U j } j∈I (with each U i → S), then This equation can be used to combine the results obtained on separate coordinate patches.

7.2.
Reduction to weakly stable subassignments. If ψ(x, ξ) is any formula, let ψ N (x, ξ) be the formula Assume that ψ is locally constant of some level N . Then ψ N is also locally constant of level N . If ψ satisfies Equation 7.1.1, then ψ N does too, because Moreover, for all p-adic fields F of sufficiently large residue characteristic, ξ). Thus, it is enough to prove Theorem 7.1 for ψ N rather than ψ. Let C be the category of fields of characteristic zero. For a fixed m, n, let h = h m,n : C → Set be given by Definition 7.4. A subassignment is definable if it is attached to a formula in this way. A definable subassignment (attached to ψ) is weakly stable of level N if for every field k of characteristic zero . This is well-defined: if a given subassignment is attached to both ψ and ψ ′ , it is weakly stable for ψ iff it is weakly stable for ψ ′ . For any ψ in Pas's language, the subassignment of ψ N is weakly stable of level N . Thus, we reduce to the case where ψ N determines a weakly stable subassignment. 7.3. Reduction to special formulas. Definition 7.5. ψ(x, ξ) is a special formula of bounded representation if it can be expressed as a boolean combination of formulas where each N i = 0 and θ is a formula in theory of rings in the variables and constants of the residue field sort.
It is easy to see that each special formula of bounded representation determines a weakly stable subassignment. (This follows from the fact that the functions ord(f (x)) and ac(f (x)) are locally constant in x when ord(f (x)) is a fixed, nonzero integer.) We have the following converse. Lemma 7.6. Every weakly stable subassignment is defined by a special formula of bounded representation.
Proof. Assume that the weakly stable subassignment is defined by a formula ψ(x, ξ). Apply quantifier elimination (following Pas and Presburger) to eliminate all quantifiers of the valued field sort and the value group sort in the formula ψ(x, ξ). In Presburger quantifier elimination, the additive language of the integers is augmented by function symbols for congruences modulo n for each n. Each formula can be written in disjunctive normal form. Each disjunct is a conjunct of three formulas one for the valued field sort, one for the value group sort, and one for the residue field sort. The conjunct for the valued field sort can be eliminated, for example, by replacing f (x) = 0 with ac(f (x)) = 0 (as an extra condition in the conjunct of residue field sort). What results is a so-called special formula; that is, a formula that can be expressed as a boolean combination of formulas (7.6.1) ord f 1 (x) ≥ ord f 2 (x) + a, ord f 1 (x) ≡ a mod b, θ(ξ, ac f 1 (x), . . . , ac f m ′ (x)) If we show that each f i that appears can be assumed to satisfy a bound ord(f i (x)) < N i for some N i = 0, then the lemma follows, by breaking each special formula into a disjunction of finitely many cases, according to the possible values of ord(f i ). This result is essentially identical to a lemma of Denef and Loeser [8, Lemma 2.8]. (Denef and Loeser assume that θ contains no free variables ξ. However, it is trivial to check that their proof goes through without modification in this slightly more general setting.) Not only can we reduce to special formulas of bounded representation, but we can also reduce to a single formula like Formula 7.5.1. (That is, no boolean combinations are required.) First of all, if B(ψ 1 , . . . , ψ k ) is a given boolean polynomial, then we obtain the same subassignment if we replace each ψ i (x, ξ) with ψ i (x, ξ) ∧ φ S (ξ), where φ S (ξ) is the formula that asserts that ξ ∈ S. Thus, there is no loss in generality in taking the boolean operations "relative to S". Consider conjunction. A conjunction of formulas of the form (Formula 7.5.1) is again of the same form. If we have a disjunction ψ 1 ∨ ψ 2 of this form, and if we can prove Theorem 7.1 for ψ 1 , ψ 2 , ψ 1 ∧ ψ 2 (with A 1 , A 2 , and A 12 as the right-hand side of Equation 7.1.3), then we have Theorem 7.1 for ψ 1 ∨ ψ 2 (with A 1 + A 2 − A 12 as the right-hand side of Equation 7.1.3). Finally, if we have the negation ¬ψ(x, ξ) (relative to S) of a special formula, we use to eliminate ¬ψ. Now we are ready to move to the proof of the representation theorem for formulas.
Proof. (Theorem 7.1). Let F = f i , the product extending over the functions f i appearing in the representation of ψ in Formula 7.5.1. As in [9, Proof 7.1.1,Proof 8.3.1], take an embedded resolution of F = 0. This resolution is independent of ξ. It is good in the sense of [7] when the residual characteristic is sufficiently large.
The function F comes from an expression in the first order theory of rings. We may thus interpret it as a polynomial in Q[x], and the embedded resolution as a resolution of F = 0 over Q. In each suitably chosen coordinate patch W in the resolution, F = 0 defines a divisor with normal crossings. If F is given in local coordinates as αu k 1 1 · · · u kn n , we let for I ⊂ {1, . . . , n} (7.6.2) On each coordinate patch W , for each I, we obtain a formula θ I in the first order language of rings as follows.
Pull back each f j to a function w j on the resolution. If w j is identically zero on E I , let w ′ j = 0; otherwise, let w ′ j = w j . Set (7.6.3) where θ is formula in the first order theory of rings defining the special formula of bounded representation. We construct a Galois stratification for the formula θ I as in [9]. (See [13] for a review of Galois stratifications.) The particular version of Galois stratification that we use is that of Lemma 7.7 below. The varieties U i are constructed from individual strata of the Galois stratifications of θ I , then summing over all strata for all I.
Let (C/A, Con) be a colored Galois cover with Galois group G that arises in the Galois stratification of some θ I . We assume that C and A are affine. By Artin induction, the central function of G given by (7.6.4) α(x) = 1 if x ∈ Con 0 otherwise. is a rational linear combination α = n H Ind G H 1 H of characters induced from trivial characters on cyclic subgroups H of G. The formal linear combination of varieties that corresponds to this colored Galois cover is (7.6.5) n H [C/H].
The morphism U i → S is the composite (7.6.6) The last morphism is projection onto the last |ξ| factors. Recall that A is a stratum in some E I , which is a constructible subset of a coordinate patch W in the resolution. We use the coordinate functions u i of the coordinate patch as the free variables in the formula. We may take S be given as a affine variety in A |ξ| . The image of U i in A |ξ| lies in S because of the assumption 7.1.1 in the statement of the theorem.
This expresses the number of solutions u ∈ F q |u| of the formula θ I for a given ξ as a linear combination of number of points on varieties, with varieties that are independent of the element ξ. This is the essential point of the proof. The rest of the argument is no different from that [9].
The following result, which was used in the proof of Theorem 7.1, is taken directly from Fried and Jarden.  Remark 7.8. We have accomplished our objective of showing that the orbital integrals of restricted elements in symplectic and orthogonal algebras count points on varieties over finite fields. There should be no significant difficulties in extending these results to non-split cases such as the unitary algebra g = u(c) and h = u(a) ⊕ u(b). The necessary analysis of the Langlands-Shelstad transfer factor has already been carried out in [15]. That paper describes how to extend Pas's language by a function symbol whose interpretation is conjugation with respect to a separable quadratic extension E/F . It describes how to expand formulas in the extended language into formulas in Pas's language. This trick can be used to treat algebras that split over a quadratic extension. In general, we will keep the notation from [22]. We assume the residue characterstic p of k is sufficiently large (for more precise condition, we refer to [22] [1.4]). Let Γ be a good semisimple element of depth r, and let G ′ = C G (Γ). Let O(Γ) be the set of G-orbits in g whose closures contain Γ. Denote the subspace x∈B(G,k) C c (g/g x,r + ) of C ∞ c (g) by D r + .
Recall the following theorem in [22][3.1.9]: Theorem 8.1. Let J (Γ + g ′ r + ) be the set of G-invariant distributions supported on G (Γ + g ′ r + ) and let J Γ be the span of orbital integrals associated to orbits in O(Γ). Then J (Γ + g ′ r + ) ≡ J Γ on D r + .