GEOMETRIC AND PROBABILISTIC RESULTS FOR THE OBSERVABILITY OF THE WAVE EQUATION

. — Given any measurable subset ! of a closed Riemannian manifold and given any T > 0 , we deﬁne ` T ( ! ) 2 [0 , 1] as the smallest average time over [0 ,T ] spent by all geodesic rays in ! . Our ﬁrst main result, which is of geometric nature, states that, under regularity assumptions, 1 / 2 is the maximal possible discrepancy of ` T when taking the closure. Our second main result is of probabilistic nature: considering a regular checkerboard on the ﬂat two-dimensional torus made of n 2 square white cells, constructing random subsets ! n " by darkening cells randomly with a probability " , we prove that the random law ` T ( ! n " ) converges in probability to " as n ! + 1 . We discuss the consequences in terms of observability of the wave equation


Introduction and main results
Let (M, g) be a closed connected Riemannian manifold.We denote by Γ the set of geodesic rays, that is, the set of projections onto M of Riemannian geodesic curves in the co-sphere bundle S * M .Given any T > 0 and any Lebesgue measurable subset ω of M , we define (1) T (ω) = inf Here, χ ω is the characteristic function of ω, defined by χ ω (x) = 1 if x ∈ ω and χ ω (x) = 0 if x ∈ M ω.The real number T (ω) ∈ [0, 1] is the smallest average time over [0, T ] spent by all geodesic rays in ω.This quantity appears naturally when studying observability properties for the wave equation on M with ω as an observation subset.
In this article we establish two properties of the functional T , one is geometric and the other is probabilistic.Let us describe them in few words.
The first geometric property is on the maximal discrepancy of T when taking the closure.We may have T (ω) < T (ω) whenever there exist rays grazing ω and the discrepancy between both quantities may be equal to 1 for some subsets ω.We prove that, if the metric g is C 2 and if ω satisfies a slight regularity assumption, then T (ω) T (ω) + 1 .We also show that our assumptions are essentially sharp; in particular, surprisingly the result is wrong if the metric g is not C 2 .As a consequence, if ω is regular enough and if T (ω) > 1/2 then the Geometric Control Condition is satisfied and thus the wave equation is observable on ω in time T .
The second property is of probabilistic nature.We take M = T 2 , the flat twodimensional torus, and we consider a regular grid on it, a regular checkerboard made of n 2 square white cells.We construct random subsets ω n ε by darkening each cell in this grid with a probability ε.We prove that the random law T (ω n ε ) converges in probability to ε as n → +∞.As a consequence, if n is large enough then the Geometric Control Condition is satisfied almost surely and thus the wave equation is observable on ω n ε in time T .

Observability and Geometric Control Condition. -The condition
T (ω) > 0 means that all geodesic rays, propagating in M , meet ω within time T .This condition, usually called Geometric Control Condition (in short, GCC), is related to observability properties for the wave equation where g is the Laplace-Beltrami operator on M for the metric g.More precisely, denoting by dx g the canonical Riemannian volume, we define the observability constant C T (ω) 0 as the largest possible nonnegative constant C such that the inequality is satisfied for any solution y of (2), that is, When C T (ω) > 0, the wave equation ( 2) is said to be observable on ω in time T , and when C T (ω) = 0 we say that observability does not hold for (ω, T ).
The converse is not true: GCC is not a necessary condition for observability.It is shown in [8] that, if M = S 2 (the unit sphere in R 3 endowed with the restriction of the Euclidean structure), if ω is the open Northern hemisphere, then T (ω) = 0 for every T > 0, and however one has C T (ω) > 0 for every T > π.The latter fact is established by an explicit computation exploiting symmetries of solutions.This failure of the functional T to capture the observability property is due, here, to the existence of a very particular geodesic ray which is grazing the open set ω, namely, the equator.In this example, considering the closure ω of ω, it is interesting to observe that T (ω) = 0 for every T π (take a geodesic ray contained in the closed Southern hemisphere) and T (ω) > 0 for every T > π, with T (ω) = 1  2 when T 2π.The latter equality is in contrast with T (ω) = 0: there is thus a discrepancy 1/2 in the value of T for T 2π when taking the closure of ω.In this specific case, this discrepancy is caused by the equator, which is a geodesic ray grazing the open subset ω.
Our first main result below shows that 1/2 is actually the maximal possible discrepancy.

1.1.
A geometric result on the maximal discrepancy of T .-In general, one can always find subsets ω for which the difference T (ω) − T (ω) is arbitrary close to 1. Surprisingly, under slight regularity assumptions, this maximal discrepancy is 1/2 only.
Theorem 1. -Let T > 0 be arbitrary and let ω be a measurable subset of M .We make the following assumptions:
We give more details and a number of comments on this theorem in Section 2. At the opposite, as an obvious remark, if there is no geodesic ray grazing ω then T (ω) = T (ω).Here and throughout the paper, we say that a geodesic ray γ is grazing ω if T 0 χ ∂ω (γ(t)) dt > 0, where ∂ω = ω ω.In more general, the existence of grazing rays adds a serious difficulty to the analysis of observability (see [1]).It is noticeable that, if one replaces the characteristic function χ ω of ω by a continuous function a, in the integral at the left-hand side of (3) (i.e., T 0 M a(x)|y(t, x)| 2 dx g dt) as well as in the definition (1) of the functional T , this difficulty disappears and the condition T (a) > 0 becomes a necessary and sufficient condition for observability of (2) on ω in time T (see [4]).
J.É.P. -M., 2022, tome 9 By the way, for completeness, we provide in the appendix some semi-continuity properties of the functional T , which may be of interest for other purposes.
The issue of the observability on a general measurable subset ω ⊂ M has remained widely open for a long time.Recent advances have been made, which we can summarize as follows.It has been established in [7] that observability on a measurable subset ω in time T is satisfied if and only if α T (ω) > 0. The quantity α T (ω), defined in [7] as the limit of high-frequency observability constants, is however not easy to compute and we have, in general, the inequality T (ω) α T (ω) T (ω).In particular, the condition T (ω) > 0 becomes a necessary and sufficient condition for observability as soon as there are no geodesic rays grazing ω.It has also been shown in [7] that lim T →+∞ C T (ω)/T is the minimum of two quantities, one of them being T (ω) and the other being of a spectral nature.
We have the following corollary of Theorem 1, using the fact that, since ω is open, the condition T (ω) > 0 implies observability for (ω, T ), and thus C T (ω) C T (ω) > 0.
Note that Corollary 1 does not apply to the (limit) case where M = S 2 and ω is the open Northern hemisphere.It does neither apply to the case where M is the two-dimensional torus and ω is a half-covering open checkerboard on it, as in [3,5] (see next section).Indeed, in these two cases, we have T (ω) = 0 for every T > 0 but C T (ω) > 0 (i.e., we have observability) for T large enough.This is due to the fact that trapped rays are the weak limit of Gaussian beams that oscillate on both sides of the limit ray, spreading on one side and on the other a sufficient amount of energy so that indeed observability holds true.In full generality, having information on the way that semi-classical measures, supported on a grazing ray, can be approached by high-frequency wave packets such as Gaussian beams, is a difficult question.In the case of the sphere, symmetry arguments give the answer (see [8]).In the case of the torus, a much more involved analysis is required, based on second microlocalization arguments (see [3,5]).
Anyway, Corollary 1 can as well be applied for instance to any kind of checkerboard domain ω on the two-dimensional torus, as soon as the measure of ω is large enough so that T (ω) > 1/2.
Since the case of checkerboards (in dimension two) is interesting and challenging, following a question by Nicolas Burq, in the next section we investigate the case of random checkerboards on the flat torus and we establish our second main result.

A probabilistic result for random checkerboards on the flat torus
In this section, we take M = T 2 = R 2 /Z 2 (flat torus) which is identified to the square [0, 1] 2 , class of equivalence of R 2 under the identifications (x, y) ∼ (x + 1, y) ∼ (x, y + 1), inheriting of the Euclidean metric.Given any subset A of M , we denote by |A| the (two-dimensional) Lebesgue measure of A. We consider a regular grid G n = (c n ij ) 1 i,j n in the square, like a checkerboard, made of n × n closed squares: Defining c i j in the same way for all (i , j ) ∈ Z 2 , we identify the square c i j to the square c n ij of the above grid with (i, j) ∈ {1, . . ., n} 2 such that i = i mod n and j = j mod n.
Construction of random checkerboards.-Let ε ∈ [0, 1] be arbitrary.Considering that all squares in the grid are initially white, we construct a random checkerboard by randomly darkening some squares in the checkerboard as follows: for every (i, j) ∈ {1, . . ., n} 2 , we darken the square c n ij of the grid with a probability ε.All choices are assumed to be mutually independent.In other words, we make a selection of squares (that are paint in black) in the grid by considering n 2 independent Bernoulli random variables denoted (X n ij ) 1 i,j n , each of them with parameter ε.The total number of black squares follows therefore the binomial law B(n 2 , ε).
We denote by ω n ε the resulting closed subset of [0, 1] 2 that is the union of all (closed) black squares (see Figure 1).Given any fixed T > 0 and ε ∈ (0, 1], our objective is to understand how well the random set ω n ε is able to capture all geodesic rays propagating in M [0, 1] 2 , in finite time T .In other words, we want to study the random variable T (ω n ε ).Of course, the random variable |ω n ε | follows the law (1/n 2 )B(n 2 , ε) and thus its expectation is equal to ε, and so, when ε is small, ω n ε covers only a small area in [0, 1] 2 .And yet, our second main result below shows that, for n large, almost all such random sets meet all geodesic rays within time T .Theorem 2. -Given any T > 0 and any ε ∈ [0, 1], the random variable T (ω n ε ) converges in probability to ε as n → +∞, i.e., Theorem 2 is proved in Section 3. As mentioned above, this issue has emerged following a question by Nicolas Burq.In [3,5], the authors also consider checkerboard domains, as above, but not in a random framework.As a consequence of their analysis, given any T > 0, any ε ∈ [0, 1] and any n ∈ N * fixed, if all geodesic rays of length T , either meet the interior of ω n ε (i.e., the interior of some black square), or follow for some positive time one of the sides of a black square on the left and for some positive time one of the sides of a black square (possibly the same) on the right, then C T (ω n ε ) > 0, i.e., the wave equation on the torus M = T 2 is observable on ω n ε in time T .Let T > 0 and let ε ∈ (0, 1] be arbitrary.According to Theorem 2, for n large enough, almost every subset ω n ε (constructed randomly as above) is such that T (ω n ε ) > 0. This implies that every geodesic ray, that is neither horizontal nor vertical, meets the interior of ω n ε within time T , and that every horizontal or vertical geodesic ray meets the closed subset ω n ε within time T (for some positive time, not less than T (ω n ε )).In the latter case, moreover, by construction of the random set ω n ε , the probability that vertical grazing rays follow for some positive time one of the sides of a black square on the left and for some positive time one of the sides of a black square on the right, converges to 1 as n → +∞.
All in all, combining Theorem 2, the result of [3,5] and the above reasoning, we have the following consequence in terms of observability of the wave equation.
Corollary 2. -Given any T > 0 and ε ∈ (0, 1], may they be arbitrarily small, the probability that the wave equation on the torus M = T 2 be observable on ω n ε in time T tends to 1 as n → +∞. In other words, observability in (any) finite time is almost surely true for large n, despite the fact that the measure of ω n ε may be very small!Note that, for ε > 1/2, almost sure observability follows from Corollary 1 (indeed, the random sets constructed above are piecewise C 1 and thus Theorem 1 can be applied).But the result is more striking when |ω n ε | is small.Note also Theorem 2 provides an answer to an issue raised in [6], which we formulate in terms of an optimal shape design problem in the next corollary.
where the supremum is taken over all possible measurable subsets ω of M = T 2 having a Lipschitz boundary.
Corollary 3 is proved in Section 3.4.
J.É.P. -M., 2022, tome 9 We finish this section by a comment on possible generalizations of Theorem 2. Some of the steps of its proof remain valid for any closed Riemannian manifold, like the fact that it suffices to prove the theorem for T small and thus, we expect that, to some extent, the result is purely local.However, in some other steps we instrumentally use the fact that we are dealing with a regular checkerboard in the square.Extending the result to general manifolds, even in dimension two, is an open issue.
Acknowledgments.-The authors are indebted to the referees for their very careful reading and comments, and for having pointed out a mistake in a proof in a first version.

Additional comments and proof of Theorem 1
2.1.Comments on Theorem 1. -Theorem 1 states that, given any T > 0 and any measurable subset ω of M , we have under the two following sufficient assumptions: (i) the metric g is C Remark 1. -Assumption (ii) may be weakened as follows: • If M is of dimension 2, it suffices to assume that ω is piecewise C 1 .More precisely, we assume that ω is a C 1 stratified submanifold of M (in the sense of Whitney).
• In any dimension, the following much more general assumption is sufficient: given any grazing ray γ, for almost every t ∈ [0, T ] such that γ(t) ∈ ∂ω, the subdifferential at γ(t) of ∂ω∩γ(•) ⊥ is a singleton.This is the case under the (much stronger) assumption that ω be geodesically convex.
Comments.-It is interesting to note that the assumptions made in Theorem 1 are essentially sharp.Remarks are in order.
• The inequality (4) gives a quantitative measure of the discrepancy that can happen for T when we take the closure of a measurable subset ω or, conversely, when we take the interior (this is the sense of Corollary 1).The inequality is sharp, as shown by the example already discussed above: take M = S 2 and ω the open Northern hemisphere; then T (ω) = 0 for every T > 0 and 2π (ω) = 1/2 for T = 2π.Hence, here, ( 4) is an equality.
• As a variant, take ω which is the union of the open Northern hemisphere and of a Southern spherical cap, i.e., a portion of the open Southern hemisphere limited by a given latitude −ε < 0. Then we have as well T (ω) = 0 for every T > 0 and 2π (ω) = 1/2 for T = 2π.
• Note that, taking ε = 0 in the previous example (i.e., ω is the unit sphere M = S 2 minus the equator), we have T (ω) = 0 and T (ω) = 1 for every T > 0 and thus (4) fails.But here, ω is not an embedded C 1 submanifold of M with boundary: J.É.P. -M., 2022, tome 9 Assumption (ii) (which implies local separation between ω and M ω) is not satisfied.More generally, the result does not apply to any subset ω that is M minus a countable number of rays.This is as well the case when one considers any subset ω that is dense and of empty interior (one has T (ω) = 0 and T (ω) = 1 for every T > 0).This shows that the discrepancy 1/2 is only valid under some regularity assumptions on ω.
• The result fails in general if ∂ω is piecewise C 1 only, on a manifold M is of dimension n 3.Here is a counterexample.
Let γ be a geodesic ray.If T > 0 is small enough, it has no conjugate point.In a local chart, we have γ(t) = (t, 0, . . ., 0) (see the proof of Theorem 1).Now, using this local chart we define a subset ω of M as follows: the section of ∂ω with the vertical hyperplane γ(•) ⊥ is locally equal to this entire hyperplane minus a cone of vertex γ(t) with small angle 2πε > 0, less than π/4 for instance (see Figure 2).
Locally around γ(t), ∂ω ∩ γ(t) ⊥ is the complement of the hatched area.Now, we assume that, as t > 0 increases, these sections rotate with such a speed that, along [0, T ], the entire vertical hyperplane is scanned by the section with ω.If the speed of rotation is exactly T /2π then it can be proved that T (ω) = 0 and This example shows that Assumption (ii), or its generalization given in Remark 1, cannot be weakened too much.The idea here is to consider a subset ω such that the section of ∂ω with the vertical hyperplane γ(•) ⊥ has locally the shape of the hypograph of an absolute value, which is rotating along γ(•).
Similar examples can as well be designed with checkerboard-shaped domains ω, thus underlining that in [3,5] it was important to consider checkerboards in dimension 2.
J.É.P. -M., 2022, tome 9 • Surprisingly, the result is wrong if the metric g is not C 2 .A counterexample is the following.
Let M be a pill-shaped two-dimensional manifold given by the union of a cylinder of finite length, at the extremities of which we glue two hemispheres (domain also obtained by rotating a 2D stadium in R 3 around its longest symmetry axis; or, take the unit sphere in R 3 , cut it at the equator, separate the two hemispheres and glue them with, in between, a cylinder of arbitrary length), and endow it with the induced Euclidean metric (see Figure 3).Then the metric is not C 2 at the gluing circles.Now, take ω defined as the union of the open cylinder with two open spherical caps (i.e., the union of the two hemispheres of which we remove latitudes between 0 and some ε > 0).Then T (ω) = 0 for every T > 0, because ω does not contain the rays consisting of the circles at the extremities of the cylinder.In contrast, T (ω) may be arbitrarily close to 1 as T is large enough and ε is small enough, and thus (4) fails.This is because any ray of M spending a time π in M ω spends then much time over the cylinder.This shows that Assumption (i) is sharp.In the above example, the metric is only The example above is rather counter-intuitive.The assumption of a C 2 metric implies in some sense a global result on geodesic rays.
Our proof, given in Section 2.2 hereafter, uses only elementary arguments of Riemannian geometry.It essentially relies on Lemma 2, in which we establish that, given a grazing ray (i.e., a ray propagating in ∂ω), thanks to our assumption on ω, we can always construct neighbor rays, one of which being inside ω and the other being outside of ω for all times.

2.2.
Proof of Theorem 1. -Without loss of generality, we take ω ⊂ M open.We will use several well known facts of Riemannian geometry, for which we refer to [2].
for any k.In all cases, we have obtained the inequality for every t ∈ [0, T ].By the Fatou lemma, we infer that The lemma follows.
If the ray γ given by Lemma 1 is not grazing ω, i.e., if ω) and hence T (ω) = T (ω).So in this case there is nothing to prove.
Lemma 2. -There exists a continuous path of points s → x s ∈ M , passing through x 0 at s = 0, such that, setting γ s (t) = π • ϕ t (x s , ξ 0 ), we have Proof.-To prove this fact, we assume that, in a local chart, γ(t) = (t, 0, . . ., 0).This is true at least in a neighborhood of x 0 = γ(0) = 0, and this holds true along γ(•) as long as there is no conjugate point.We also assume that, in this chart, any other geodesic ray starting at (0, x 0 2 , . . ., x 0 n ) in a neighborhood of γ(0) = (0, . . ., 0), with codirection ξ 0 , is given by (t, x 0 2 , . . ., x 0 d ) (projection onto M of the extremal field).Here, we have set d = dim M .This classical construction of the so-called extremal field can actually be done on any subinterval of [0, T ] along which there is no conjugate point.Note that the set of conjugate times along [0, T ] is of Lebesgue measure zero. (1) Let us search an appropriate (d − 1)-tuple (x 0 2 , . . ., x 0 d ) ∈ R d−1 {0} such that the family of points x s = (0, sx 0 2 , . . ., sx 0 d ), s ∈ (−1, 1), gives (5).Note that the geodesic ray starting at (x s , ξ 0 ) is γ s By assumption, in a neighborhood U of any point of N , the set N ∩U is a codimensionone hypersurface of M , written as It suffices to prove that, for almost every time t at which γ 0 (t) = γ(t) ∈ N and γ(t) ∈ T γ(t) N , the points γ s (t) and γ −s (t) are on different sides with respect to the (locally) separating manifold N for s small enough.This is obvious when γ is transverse to N .We set is important, we assume that v(t) ∈ P d−2 (R), the projective space.We claim that: With this result, setting V = (x 0 2 , . . ., x 0 d ), the points x s defined above give the lemma.Let us now prove the claim.We define 0 for every t ∈ Ω, where we have endowed P d−2 (R) with the Hausdorff measure H n−2 .Therefore, by the Fubini theorem, 0 = and thus Ω χ A (t, V ) dt = 0 for almost every V ∈ P d−2 (R).Fixing such a V , it follows that χ A (t, V ) = 0 for almost every t ∈ Ω, and the claim is proved.
In view of proving Remark 1, note that the argument above still works in dimension 2 with ω piecewise C 1 (but not in dimension greater than or equal to 3: see the counterexample given in Section 1).In more general, in any dimension, the argument above still works if ω is such that, for almost every time t, the subdifferential at γ(t) of ∂ω ∩ γ(•) ⊥ is a singleton.equation, such times must be isolated, for otherwise the Jacobi field would vanish at the second order and thus would be identically zero.
At this step, we have embedded the ray γ given by Lemma 1 into a family of rays γ s which enjoy a kind of transversality property with respect to N = ∂ω.Let us consider the partition into three disjoint measurable sets, with Since γ s (•) converges uniformly to γ(•) as s → 0 and since ω and M ω are open, we have: By the Lebesgue dominated convergence theorem, we infer that Now, on the one part, by the first step we have 1 On the other part, since A 1 and A 3 are disjoint we have 1 Since T (ω) )dt for every s by definition, we infer that 2 T (ω) T (ω) + 1. Theorem 1 is proved.

Proof of Theorem 2
Theorem 2 states that, given any T > 0 and any ε ∈ [0, 1], the random variable T (ω n ε ) converges in probability to ε as n → +∞, i.e., lim This section is organized as follows.We make a preliminary remark in Section 3.1.In Section 3.2, we give the successive steps of the proof, involving intermediate lemmas that are proved.One of the main ingredients of the proof of Theorem 2 is a large deviation property which is established in Section 3.3.In Section 3.4, we also provide a proof of Corollary 3. Given any ω that is a union of closed squares from the grid G n with n fixed, the mapping Γ γ → m T γ (ω) is continuous at every γ ∈ Γ that is neither horizontal nor vertical, or, that is horizontal or vertical but meets no corner (by definition, a corner is a point (i/n, j/n) in [0, 1] 2 , for some (i, j) ∈ {0, . . ., n} 2 ).
Proof.-Let γ ∈ Γ and let (γ k ) k∈N be a sequence of Γ converging to γ.Let us prove that Let us prove the second part of the lemma.Let γ ∈ Γ that is neither horizontal nor vertical, or, that is horizontal or vertical but meets no corner.Let (γ k ) k∈N be a sequence of geodesic rays converging to γ ∈ Γ. Writing where τ (i, j) = 1 if c n ij ⊂ ω and τ (i, j) = 0 otherwise, and noting that we have to prove that m T γ k (c n ij ) converges to m T γ (c n ij ) as k → +∞.This follows from the dominated convergence theorem and from the fact that (χ c n ij (γ k )) k∈N converges almost everywhere to χ c n ij (γ).The latter claim can be shown by distinguishing between two cases: if γ(t) ∈ cn ij then for k large enough we have The same conclusion remains true if γ(t) / ∈ c n ij .Since the set of t such that γ(t) ∈ ∂c n ij is finite (this follows from the assumptions on γ), the lemma follows.
Note that γ → m T γ may fail to be continuous at some γ ∈ Γ that is horizontal or vertical and meets a corner.For such geodesic rays γ, we will see that it is relevant to define the following quantity.Given any γ ∈ Γ, we set m T γ (ω) = m T γ (ω) if γ is neither horizontal nor vertical, or is horizontal or vertical but meets no corner.When γ is horizontal or vertical and meets a corner, we set where the infimum is taken over the set of sequences of geodesic rays (γ k ) k∈N converging to γ such that, for every k ∈ N, γ k ([0, T ]) is obtained by rotating γ([0, T ]) around a corner of the grid through which γ passes.Of course, we have T (ω) m T γ (ω) m T γ (ω) and thus Note that γ → m T γ (ω) may also fail to be continuous.We will see that this quantity m T γ (ω) is important to obtain the inequality (25) in the proof of Lemma 5, item (b), and in order to treat the case of horizontal or vertical rays in the proof of Lemma 6.

3.2.
Proof of Theorem 2. -For every (i, j) ∈ {1, . . ., n} 2 , let X n ij be the random variable equal to 1 whenever c n ij ⊂ ω n ε and 0 otherwise.Recall that, assuming that all square cells of the grid are initially white, when ranging over the grid, for each cell we randomly darken the cell with a probability ε (Bernoulli law) and in this case we set X n ij = 1; otherwise we let X n ij = 0.By construction, the random laws (X n ij ) 1 i,j n are independent and identically distributed (i.i.d.), of expectation ε and of variance ε(1 − ε).
Given any fixed geodesic ray γ ∈ Γ, we denote by t n ij (γ) the time spent by γ in the square cell c n ij .We have and we also note that In particular, the random variable m T γ (ω n ε ) is a weighted sum of independent Bernoulli laws, and thus its expectation is where we have used (9) and the fact that 0 t n ij (γ)/T 1.To prove Theorem 2, we have to prove that, given any T > 0 and any ε ∈ [0, 1], for every δ > 0 we have J.É.P. -M., 2022, tome 9 Proof of (i).-Using ( 6) and ( 10), we have Applying the Bienaymé-Tchebychev inequality to the random variable m T γ (ω n ε ), we have and thus, using (11) and ( 12), ( 14) Finally, (i) follows from ( 13) and ( 14).
Proof of (ii).-Establishing (ii) is much more difficult.We proceed in several steps, by proving the following successive lemmas that are in order.
Thanks to Lemma 4 (proved below), we now assume that 0 < T < 1.This has the following pleasant consequence: any geodesic ray γ ∈ Γ crosses a given cell c ij at most one time over [0, T ], i.e., {t ∈ [0, T ] | γ(t) ∈ c ij } is connected.This will make easier the computation of crossing times, in the proofs of the forthcoming lemmas.
Let us introduce some notations.Let Γ 0 , Γ 1 and Γ 2 be the sets of geodesic rays of M = T 2 meeting respectively zero, at least one and at least two corners of the grid G n (by definition, a corner is a point (i/n, j/n) in [0, 1] 2 , for some (i, j) ∈ {0, . . ., n} 2 ).Note that Γ 2 ⊂ Γ 1 .
Given any ω ⊂ M that is the union of disjoint closed square cells of G n , we have We also define Of course, we have Lemma 5. -There exists C > 0 such that, for every n ∈ N * , for every subset ω of [0, 1] 2 that is a union of square cells of the grid G n , we have: Finally, (ii) follows from the above lemmas, that are proved hereafter.Let us prove that (15) Given any ρ > 0, let γ be a geodesic ray such that Setting γ k (•) = γ(kT + •) for every k ∈ {0, . . ., m − 1}, we have Letting ρ tend to 0, we obtain (15).Since 0 < T < 1, (ii) is true for this final time T , i.e., Therefore, using (15), we obtain (ii) for the final time T .

Proof of Lemma 5
Proof of item (a).-Let γ ∈ Γ be such that ( 16) If γ ∈ Γ 1 then we are done.Hence, in what follows we assume that γ ∈ Γ 0 , i.e., that γ meets no corner of the grid.Without loss of generality, we can assume that the ray γ is neither horizontal nor vertical.Indeed, if γ is horizontal or vertical, since γ meets no corner, it follows from Lemma 3 that m T γ is continuous at γ. Hence, it is possible to rotate slightly γ so that γ is neither horizontal nor vertical and still satisfies (16).
Let n ∈ R 2 be a unit vector orthogonal to γ (0).For every s ∈ R, we denote by T sn the translation of vector sn and we define the translated geodesic ray γ s = T sn • γ (which is neither horizontal nor vertical).By continuity, γ s meets the same square cells as γ if |s| is small enough.Let I(γ) denote the subset of all pairs (i, j) ∈ {1, . . ., n} 2 such that γ crosses the cell squares c n ij .For |s| small enough, we have where t n ij (γ s ) is the time spent by γ s in c n ij .Denoting by I (γ) the set of (i, j) ∈ I(γ) such that γ(0), γ(T ) / ∈ cn ij (note that #I(γ) − 2 #I (γ) #I(γ) and that these conditions do not depend on s for |s| small enough, hence I (γ s ) = I (γ)), an easy J.É.P. -M., 2022, tome 9 geometric argument shows that, for (i, j) ∈ I (γ), the function s → t n ij (γ s ) is affine and nonconstant with respect to s.Hence, is also an affine function of s.Replacing s by −s if necessary, we infer the existence of a threshold s 0 > 0 such that γ s ∈ Γ 0 for s ∈ [0, s 0 ) and γ s0 ∈ Γ 1 , and the mapping s → M γs (ω) is continuous and nonincreasing on [0, s 0 ] (continuity is because, for every s, γ s is neither vertical nor horizontal since it is a translation of γ).Since T Γ 1 (ω) m T γs 0 (ω).Besides, we have, for every s ∈ [0, s 0 ], Hence, in particular, using that (by Lemma 3) Since the mapping s → M γs (ω) is nonincreasing on [0, s 0 ] and γ 0 = γ, we have M γs 0 (ω) M γ (ω) and thus, using (19), (21) M γs 0 (ω) m T γ (ω).We finally infer from ( 16), ( 18), ( 20) and (21) that The conclusion follows.
If γ ∈ Γ 2 then we are done.Hence, in what follows we assume that γ C n for some C > 0 not depending on γ and n.Indeed, then, it follows from ( 22) and ( 23) that C + 1 n and the item is proved.
Note that the rotation R θ can be applied to γ until the geodesic ray γ θ meets a new corner.It is then easy to see that for some C > 0 neither depending on n nor on γ.
According to (26), we have with for θ ∈ J.Moreover, we have √ 2/nT and #I (γ) 2n, the latter inequality following from the obvious observation that, when γ leaves a square c n ij , then the next square that γ enters must be of the form c i j with i = i + 1 or j = j + 1.
From now on, we let n tend to +∞.In particular, θ 0 depends on n.Let us prove that A similar argument will show that f (θ + ) − min J f C/n.These two estimates imply (24) and hence complete the proof of the item b.It thus remains to prove (30).By the mean value theorem, there exists θ ∈ (0, |θ − |) such that J.É.P. -M., 2022, tome 9 Since 0 θ |θ − |, using that | sin(θ 0 ) cos(θ 0 − θ)| 1, we get from (27) that Now, by the mean value theorem, Using (29), there exists C > 0 neither depending on γ nor on n such that . This implies that Following the same reasoning, we prove that Actually, this last estimate is much easier since | cos(θ 0 )| C cos(θ 0 + θ − ).This leads to (30).

3.2.3.
Proof of Lemma 6. -Let (i 1 , j 1 ), (i 2 , j 2 ) ∈ {1, . . ., n} 2 be such that the two square cells c i1j1 and c i2j2 of G n are distinct and let x 1 and x 2 be two distinct corners of the grid G n .Any geodesic ray such that will be denoted by γ ci 1 j 1 ,ci 2 j 2 ,x1,x2 .The set of all geodesic rays γ ci 1 j 1 ,ci 2 j 2 ,x1,x2 is denoted by Γ ci 1 j 1 ,ci 2 j 2 ,x1,x2 .Given any T ∈ (0, 1), this set is nonempty as soon as n is large enough.In order to obtain a finite set, we make the following observation.Considering a ray γ ci 1 j 1 ,ci 2 j 2 ,x1,x2 , any other ray γ passing through x 1 and x 2 and such that γ(0) ∈ c i1j1 and γ(T ) ∈ c i2j2 is obtained from γ ci 1 j 1 ,ci 2 j 2 ,x1,x2 by a time translation.This creates an equivalence relation and we define Γ as the quotient of Γ by this equivalence relation.Any element γ of Γ is uniquely determined by a choice of distinct pairs (i 1 , j 1 ), (i 2 , j 2 ) ∈ {1, . . ., n} 2 and of distinct x 1 , x 2 ∈ G n .Therefore, by construction, we have ) can be expressed by (10) and, using (9) and applying the large deviation result established in Proposition 1 in Section 3.3, we get where m is the number of square cells having a nontrivial intersection with γ([0, T ]).Indeed, m n because T < 1 and thus, by (9), If γ is horizontal or vertical, the argument is more complicated.We consider m T γ (ω n ε ) defined by ( 8) in Section 3.1.Obviously, we have where L is the set of all possible limits (closure points) of m T γ k (ω n ε ) as k → +∞ over all sequences (γ k ) k∈N of geodesic rays converging to γ such that, for every k ∈ N, γ k is obtained by rotating γ around a corner of the grid through which γ passes, with angle ±1/k.There are at most n/T + 1 corners belonging to γ([0, T ]) and thus 2( n/T + 1) possible limits of m T γ k (ω n ε ) by considering positive and negative rotations.Hence #L 2 n/T + 2.
We claim that any m ∞ ∈ L can be expressed by ( 10) so that we can still apply Proposition 1. Indeed, assume for instance that γ k is obtained from γ by a rotation of angle 1/k around a corner c of the grid through which γ passes.Then, it is easy to see that where t n ij ( γ) is the time spent by γ in c n ij if γ k crosses c n ij (it does not depend on k for k large enough) and 0 otherwise.More precisely, by Proposition 1, we have Hence, using that #L 2 n/T +2 and modifying the constant C ε,δ , we obtain In all cases, let us estimate m, the number of square cells met by γ.Since the diagonal length of each square cell c n ij is √ 2/n, the length of γ([0, T ]) (which is equal to T because the speed of the geodesic is 1) is bounded above by m √ 2/n.Therefore m nT / √ 2. We have therefore proved that, for every geodesic ray γ ∈ Γ (horizontal or vertical or not), ( 31) Assuming that n is large enough, there exist distinct pairs (i 1 , j 1 ), (i 2 , j 2 ) ∈ {1, . . ., n} 2 and two distinct corners x 1 , x 2 in G n such that γ(0) ∈ c i1j1 , γ(T ) ∈ c i2j2 and x 1 , x 2 ∈ γ([0, T ]).Since γ and γ ci 1 j 1 ,ci 2 j 2 ,x1,x2 are in the same equivalence class, and since the diagonal length of a square cell of G n is √ 2/n, we have We infer that J.É.P. -M., 2022, tome 9 Therefore, recalling that m T γ (ω n ε ) m T γ (ω n ε ) (see (8)), there exists C > 0 (not depending on n) such that, if n is large enough, then Cn 9 e −2nT 2 δ 2 /9(T +1) because # Γ = O(n 8 ).The conclusion follows.and it suffices to prove that because the estimate on P (−Y m −ε + δ) is obtained similarly.Let s > 0 to be chosen later.By the Markov inequality, we have Using and the independence of the Bernoulli variables X i (whose expectation is ε), we infer that Proof of Lemma 7. -Let (a 1 , . . ., a m ) ∈ Σ m be a point at which the continuous function F reaches its maximum over the compact set Σ m .Let (j, k) ∈ {1, . . ., m} 2 be such that j = k.We define the function α on R by α(u) = F (a 1 , . . ., a j + u, . . ., a k − u, . . ., a m ).
Setting I j,k = [max(−a j , a k − c/m), min(a k , c/m − a j )], for every u ∈ I j,k (i.e., 0 a j + u c/m and 0 a k − u c/m, we have (a 1 , . . ., a j + u, . . ., a k − u, . . ., a m ) ∈ Σ m .Note that 0 ∈ I j,k and that, since (a 1 , . . ., a m ) is a maximizer of F , we have α(u) α(0) for every u ∈ I j,k .We have two possible cases: (i) a j = 0 or a j = c/m or a k = 0 or a k = c/m; (ii) 0 < a j < c/m and 0 < a m < c/m.
In the case (ii), we must have α (0) = 0, and since, by computing this derivative, we have it follows that a j = a k .
Since the pair (j, k) of distinct integers was arbitrary, we conclude that there exists λ ∈ (0, c/m) such that a j ∈ {0, λ, c/m} for every j ∈ {1, . . ., m}.Let J be the set of indices such that a j = λ for every j ∈ J. Denote by F J the restriction of F to the set of all (λ 1 , . . ., λ m ) ∈ Σ m such that λ i = a i for every i / ∈ J. Observing that F J is the product of separate variables positive strictly convex functions, its Hessian d 2 F J (a 1 , . . ., a m ) must be positive definite.But, by maximality of (a 1 , . . ., a m ) and since m i=1 a i = 1, d 2 F J (a 1 , . . ., a m ) has at most one positive eigenvalue.Therefore J contains at most one element.
Note that f (a) 4 for every a ∈ (0, 1).Integrating two times this inequality and using that f (ε) = f (ε) = 0, we get f (a) 2δ 2 and therefore The lemma is proved.
J.É.P. -M., 2022, tome 9 Appendix.Some properties of the functional T Recall that, given any T > 0 and any Lebesgue measurable subset ω of M , denoting by χ ω the characteristic function of ω, we have defined The functional T can be extended by replacing χ ω by any measurable function a on M .It can even be extended further: any geodesic ray γ ∈ Γ is the projection onto M of a geodesic curve on S * M , that is, γ(t) = π • ϕ t (z) for some z ∈ S * M .Here, we denote by (ϕ t ) t∈R the Riemannian geodesic flow, where, for every t ∈ R, ϕ t is a symplectomorphism on (T * M, ω) which preserves S * M .Now, given any bounded measurable function a on (S * M, µ L ) and given any T > 0, we define where a T (z) = 1 T T 0 a•ϕ t (z) dt and where the unit cotangent bundle S * M is endowed with the Liouville measure µ L .Note that T (a) = T (a • ϕ t ), i.e., T is invariant under the geodesic flow.
It can also be noted that for a fixed the function T → T T (a) is superadditive.Of course, we recover the initial definition of T by pushforward to M under the canonical projection π : S * M → M : given any bounded measurable function f on (M, dx g ), we have that we simply denote by T (f ).When f = χ ω , we recover T (ω).
Remark 3. -Setting a t = a • ϕ t , and assuming that a ∈ C ∞ (S * M ) is the principal symbol of a pseudo-differential operator A ∈ Ψ 0 (M ) (of order 0), that is, a = σ P (A), we have, by the Egorov theorem (see [10]), where σ P (•) is the principal symbol.Accordingly, we have a T = σ P (A T ) with We provide hereafter a microlocal interpretation of the functionals T and we give a relationship with the wave observability constant.

Microlocal interpretation of T and of the wave observability
Note that R f T = 1, i.e., equivalently, f T (0) = 1.We denote by X the Hamiltonian vector field on S * M of the geodesic flow (we have e tX = ϕ t for every t ∈ R), and we define the selfadjoint operator S = X/i.Using that a•e tX = (e tX ) * a = e tL X a = e itS a, we get Besides, setting A = Op(a) (where Op is a quantization), we have where P λ is the projection onto the eigenspace corresponding to the eigenvalue λ of √ , i.e., √ = λ∈Spec( √ ) λP λ .Restricting to half-waves, the wave observability constant is therefore given (see [7]) by Note that, for every y = λ P λ y = λ y λ φ λ ∈ L 2 (M ), where φ λ is an eigenfunction of norm 1 associated with λ, for every smooth function a on M (i.e., A is the operator of multiplication by a), we have and we thus recover the expression of C T (a) by series expansion (see [7]).
Note also that, as said before, the principal symbol of A f T = A T (a) is Semi-continuity properties of T .-Note the obvious fact that if a and b are functions such that a b and for which the following quantities make sense, then T (a) T (b).In other words, the functional T is nondecreasing.If moreover χ ω h k then lim sup k→+∞ T (h k ) T (ω) T (h k ) and the result follows.
Note that, in the above proof, we use the fact that h k (x) → χ ω (x) for every x.Almost everywhere convergence (in the Lebesgue sense) would not be enough.
Remark 4. -We denote by d the geodesic distance on (M, g).It is interesting to note that, given any subset ω of M : • ω is open if and only if there exists a sequence of continuous functions h k on M satisfying 0 h k h k+1 χ ω for every k ∈ N * and converging pointwise to χ ω .
• ω is closed if and only if there exists a sequence of continuous functions h k on M satisfying 0 χ ω h k+1 h k 1 for every k ∈ N * and converging pointwise to χ ω .
Indeed, if ω is closed, then one can take h k (x) = max(0, 1 − k d(x, ω)).Conversely, since h k (x) = 1 for every x ∈ ω, by continuity of h k it follows that h k (x) = 1 for every x ∈ ω, and thus χ ω h k 1.Now take x ∈ ω ω.We have h k (x) = 1 and h k (x) → χ ω (x), hence χ ω (x) = 1 and therefore x ∈ ω.Hence ω is closed.Indeed, either γ(t) / ∈ ω and then χ ω (γ(t)) = 0 and the inequality is obviously satisfied, or γ(t) ∈ ω and then, using that ω is open, for k large enough we have γ k (t) ∈ U , where U ⊂ ω is a compact neighborhood of γ(t).Since h k is monotonically nondecreasing and χ ω is continuous on U , it follows from the Dini theorem that h k converges uniformly to χ ω on U , and then we infer that h k (γ k (t)) → 1 = χ ω (γ(t)).The claim is proved.Now, we infer from the Fatou lemma that and the equality follows.

Figure 3 .
Figure 3. M is pill-shaped and ω is the complement of the hatched area.

Figure 4 .
Figure 4. Particular geodesics issued from O and meeting the square with bold boundary.

σ
P (A f T ) = σ P (A T (a)) = a f T = R f T (t)a • e tX dt = f T (S)aand thusT (a) = inf σ P (A T (a)).

Lemma 10 .
-Let ω be an open subset of M and let T > 0 be arbitrary.For every sequence of continuous functions h k on M converging pointwise to χ ω , satisfying moreover 0 h k h k+1 χ ω for every k ∈ N * , we haveT (ω) = lim k→+∞ T (h k ) = sup k∈N * T (h k ).Proof.-Since h k χ ω , we have T (h k ) T (ω).By continuity of h k and by compactness of geodesics, there exists a geodesic ray γ k such thatT (h k ) = 1 T T 0 h k (γ k (t)) dt.Again by compactness of geodesics, up to some subsequence γ k converges to a ray γ in C 0 ([0, T ], M ).We claim that lim inf k→+∞ h k (γ k (t)) χ ω (γ(t))∀t ∈ [0, T ].