Get 20M+ Full-Text Papers For Less Than $1.50/day. Start a 14-Day Trial for You or Your Team.

Learn More →

Compatibility of state constraints and dynamics for multiagent control systems

Compatibility of state constraints and dynamics for multiagent control systems J. Evol. Equ. 21 (2021), 4491–4537 © 2021 The Author(s) Journal of Evolution 1424-3199/21/044491-47, published online June 14, 2021 Equations https://doi.org/10.1007/s00028-021-00724-z Compatibility of state constraints and dynamics for multiagent control systems Giulia Cavagnari , Antonio Marigonda and Marc Quincampoix Abstract. This study concerns the problem of compatibility of state constraints with a multiagent control system. Such a system deals with a number of agents so large that only a statistical description is available. For this reason, the state variable is described by a probability measure on R representing the density of the agents and evolving according to the so-called continuity equation which is an equation stated in the Wasserstein space of probability measures. The aim of the paper is to provide a necessary and sufficient condition for a given constraint (a closed subset of the Wasserstein space) to be compatible with the controlled continuity equation. This new condition is characterized in a viscosity sense as follows: the distance function to the constraint set is a viscosity supersolution of a suitable Hamilton–Jacobi–Bellman equation stated on the Wasserstein space. As a byproduct and key ingredient of our approach, we obtain a new comparison theorem for evolutionary Hamilton–Jacobi equations in the Wasserstein space. 1. Introduction In classical control theory, a single agent controls a dynamics (here represented by a differential inclusion) x˙ (t ) ∈ F (x (t )), x (0) = x , (1.1) d d d where F : R ⇒ R is a set valued map, associating with each x ∈ R the subset F (x ) of R of the admissible velocities from x.A multiagent system involves a large number of agents having all a dynamics of the form (1.1). In this model, the number of agents is so large that at each time only a statistical (macroscopic) description of the state is available. We thus describe the configuration of the system at time t by a Borel μ (A) d d measure μ on R , where for every Borel set A ⊆ R the quotient represents μ (R ) the fraction of the total amount of agents that are present in A at the time t. Since the total amount of agents is supposed to be fixed in time, μ (R ) is constant, and thus, d d we choose to normalize the measure μ assuming μ (R ) = 1, i.e., μ ∈ P(R ),the t t t set of Borel probability measures on R . Hence, the evolution of the controlled multi-agent system can be represented by the following two-scale dynamics Mathematics Subject Classification: 49J15, 49J52, 49L25, 49K27, 49K21, 49Q20, 34A60, 93C15 Keywords: Optimal control, Optimal transport, Hamilton–Jacobi–Bellman equation, Multi-agent. 4492 G. Cavagnari et al. J. Evol. Equ. • Microscopic dynamics: each agent’s position at time t is given by x (t ), which evolves according to the dynamical system x˙ (t ) ∈ F (μ , x (t )), for a.e. t > 0 , (1.2) where F is a set-valued map. It is worth pointing out that each agent’s dynamics is nonlocal since it depends also on the instantaneous configuration μ of the crowd of agents at time t, described by a probability measure on R . • Macroscopic dynamics: the configuration of the crowd of agents at time t is given by a time-depending measure μ ∈ P(R ) whose evolution satisfies the following continuity equation (to be understood in the sense of distributions) ∂ μ + div(v μ ) = 0, t > 0, (1.3) t t t t coupled with the control constraint v (x ) ∈ F (μ , x ) for μ -a.e. x ∈ R and for a.e. t ≥ 0. (1.4) t t t which represents the possible (Eulerian) velocity v (x ) chosen by an external planner for an agent at time t and at the position x. The investigation of (deterministic) optimal control problems in the space of mea- sures is attracting an increasing interest by the mathematical community in the last years, due to the potential applications in the study of complex systems, or multi-agent systems (see, e.g., [16,18,19]). Indeed, in the framework of mean field approxima- tion of multi agent system, starting from a control problem for a large number of the (discrete) agents, the problem is recasted in the framework of probability measures (see the recent [15] or the preprint [12]for -convergence results for optimal control problems with nonlocal dynamics). This procedure reduces the dimensionality and the number of equations, possibly leading to a simpler and treatable problem from the point of view of numerics. The reader can find a comprehensive overview of the literature about such formulations and applications, together with some insights on research perspective, in the recent survey [1], and references therein. We refer to [7] for further results on mean field control problems. The problem we address in this paper is the compatibility of the above dynamical d d system (1.3)–(1.4) with a given closed constraint K ⊆ P (R ). Here, P (R ) is 2 2 the set of Borel probability measures with finite second moment; this set is equipped with the 2-Wasserstein distance (see Sect. 2). This compatibility property could be understood in two ways • K is viable for the dynamics F if and only if for any μ ∈ K there exists a solution t → μ of the controlled continuity Eqs. (1.3)–(1.4) with μ = μ such t 0 that μ ∈ K for all t ≥ 0; • K is invariant for the dynamics F if and only if for any μ ∈ K and for any solution t → μ of the controlled continuity Eqs. (1.3)–(1.4) with μ = μ we t 0 have μ ∈ K for all t ≥ 0. t Vol. 21 (2021) Compatibility of state constraints 4493 Inspired by a characterization of the viability property via supersolution of Hamilton– Jacobi–Bellman equations, which was first obtained in [9] in the framework of sto- chastic control, we develop an approach for the present multiagent control problem with deterministic dynamics (1.3)–(1.4). The main result of our paper (Theorems 6.6 and 6.7) can be roughly summarized as follows Theorem 1.1. Let K ⊆ P (R ) be a closed set and d the associated distance function. Assume that the set valued map F is L-Lipschitz. • K is viable iff the function μ → d (μ) is a viscosity supersolution of viab (L + 2)u(μ) + H (μ, D u(μ)) = 0, d 2 d d where, for all μ ∈ P (R ),p ∈ L (R ; R ), viab H (μ, p) := −d (μ) − inf v(x ), p(x ) dμ(x ). 2 d v(·)∈L (R ) v(x )∈F (μ,x )μ− a.e. x • K is invariant iff the function μ → d (μ) is a viscosity supersolution of inv (L + 2)u(μ) + H (μ, D u(μ)) = 0, d 2 d d where, for all μ ∈ P (R ),p ∈ L (R ; R ), inv H (μ, p) := −d (μ) − sup v(x ), p(x ) dμ(x ). 2 d v(·)∈L (R ) v(x )∈F (μ,x)μ−a.e. x For a completely different approach to the viability problem, we refer to [5], where the author provides a characterization of the viability property for a closed set K ⊆ P (T ) by mean of a condition involving a suitable notion of tangent cone to K in d d the Wasserstein space P (T ), where T denotes the d-dimensional torus. The paper is organized as follows: in Sect. 2, we fix the notations and provide some background results; Sect. 3 is devoted to the properties of the set of solutions of the controlled continuity Eqs. (1.3)–(1.4); Sect. 4 establishes the link between the viability/invariance problem with the value function of a suitable control problem in Wasserstein space; Sect. 5 introduces the viscosity solutions of Hamilton–Jacobi– Bellman equations in the Wasserstein space, together with a uniqueness result; in Sect. 6, we apply the results of Sect. 5 to the problem outlined in Sect. 4 deriving our main characterization of viability/invariance. Finally, in Sect. 7 we provide an example illustrating the main results. Some proofs of technical results are postponed to “Appendix.” 4494 G. Cavagnari et al. J. Evol. Equ. 2. Notations Throughout the paper, we will use the following notation and we address to [2]as a relevant resource for preliminaries on measure theory. B(x , r ) the open ball of radius r of a metric space (X, d ), i.e., B(x , r ) := {y ∈ X : d (y, x)< r }; K the closure of a subset K of a topological space X; d (·) the distance function from a subset K of a metric space (X, d), i.e., d (x ) := inf{d(x , y) : y ∈ K }; C (X ; Y ) the set of continuous bounded functions from a Banach space X to Y , endowed with f = sup | f (x )| (if Y = R, Y will be x ∈X omitted); 0 0 C (X ; Y ) the set of compactly supported functions of C (X ; Y ), with the c b topology induced by C (X ; Y ); BUC (X ; R) the space of bounded real-valued uniformly continuous functions defined on X the set of continuous curves from a real interval I to R ; the set of continuous curves from [0, T ] to R ; d d e the evaluation operator e : R ×  → R defined by e (x,γ ) = t t I t γ(t ) for all t ∈ I ; P(X ) the set of Borel probability measures on a Banach space X, en- ∗ 0 dowed with the weak topology induced from C (X ); d d d d M (R ; R ) the set of vector-valued Borel measures on R with values in R , ∗ 0 d d endowed with the weak topology induced from C (R ; R ); d d |ν| the total variation of a measure ν ∈ M (R ; R ); the absolutely continuity relation between measures defined on the same σ -algebra; m (μ) the second moment of a probability measure μ ∈ P(X ); r μ the push-forward of the measure μ by the Borel map r; μ ⊗ π the product measure of μ ∈ P(X ) with the Borel family of mea- sures {π } ⊆ P(Y ) (see Theorem 2.1); x x ∈X pr the i-th projection map pr (x ,..., x ) = x ; 1 N i i i (μ, ν) the set of admissible transport plans from μ to ν; (μ, ν) the set of optimal transport plans from μ to ν; W (μ, ν) the 2-Wasserstein distance between μ and ν; P (X ) the subset of the elements P(X ) with finite second moment, en- dowed with the 2-Wasserstein distance; the Radon–Nikodym derivative of the measure ν w.r.t. the measure μ; Lip( f ) the Lipschitz constant of a function f ; + + ( f ) the positive part of a real valued function f , i.e., ( f ) = max{0, f }. Vol. 21 (2021) Compatibility of state constraints 4495 Given Banach spaces X, Y , we denote by P(X ) the set of Borel probability measures on X endowed with the weak topology induced by the duality with the Banach space C (X ) of the real-valued continuous bounded functions on X with the uniform convergence norm. The second moment of μ ∈ P(X ) is defined by m (μ) = x dμ(x ), and we set P (X ) ={μ ∈ P(X ) : m (μ) < +∞}.For 2 2 2 any Borel map r : X → Y and μ ∈ P(X ), we define the push forward measure −1 r μ ∈ P(Y ) by setting r μ(B) = μ(r (B)) for any Borel set B of Y . In other words, ϕ(y) d[r μ](y) = ϕ(r (x )) dμ(x ), Y X for any bounded Borel measurable function ϕ : Y → R. We denote by M (X ; Y ) the set of Y -valued Borel measures defined on X. The total variation measure of ν ∈ M (X ; Y ) is defined for every Borel set B ⊆ X as |ν|(B) := sup ν(B ) , i Y {B } i i ∈N where the sup ranges on countable Borel partitions of B. We now recall the definitions of transport plans and Wasserstein distance (cf. for instance Chapter 6 in [2]). Let X be a complete separable Banach space, μ ,μ ∈ 1 2 P(X ).The setof admissible transport plans between μ and μ is 1 2 (μ ,μ ) ={π ∈ P(X × X ) : pr π = μ , i = 1, 2}, 1 2 i d d d where for i = 1, 2, pr : R × R → R is a projection pr (x , x ) = x .The 1 2 i i i Wasserstein distance between μ and μ is 1 2 2 2 W (μ ,μ ) = inf |x − x | dπ (x , x ). 1 2 1 2 1 2 π ∈ (μ ,μ ) 1 2 X ×X If μ ,μ ∈ P (X ), then the above infimum is actually a minimum, and the set of 1 2 2 minima is denoted by 2 p (μ ,μ ) := π ∈ (μ ,μ ) : W (μ ,μ ) = |x − x | dπ (x , x ) . o 1 2 1 2 1 2 1 2 1 2 X ×X Recall that P (X ) endowed with the W -Wasserstein distance is a complete separable 2 2 metric space. The following result is Theorem 5.3.1 in [2]. Theorem 2.1. (Disintegration) Let X, X be complete separable metric spaces. Given a measure μ ∈ P(X) and a Borel map r : X → X, there exists a Borel family of probability measures {μ } ⊆ P(X), uniquely defined for r μ-a.e. x ∈ X, such x x ∈X −1 that μ (X\r (x )) = 0 for r μ-a.e. x ∈ X, and for any Borel map ϕ : X →[0, +∞] we have ϕ(z) dμ(z) = ϕ(z) dμ (z) d(r μ)(x ). −1 X X r (x ) 4496 G. Cavagnari et al. J. Evol. Equ. −1 We will write μ = (r μ) ⊗ μ .If X = X × Y and r (x ) ⊆{x}× Y for all x ∈ X, we can identify each measure μ ∈ P(X × Y ) with a measure on Y . 3. Admissible trajectories The goal of this section is to give a precise definition of the macroscopic dynamics (1.3 , 1.4) and to study its trajectories. To maintain the flow of the paper, the proofs of the results of this section are postponed to “Appendix A.” Definition 3.1. (Admissible trajectories)Let I =[a, b] be a closed real interval, d d d d d d μ ={μ } ⊆ P (R ), ν ={ν } ⊆ M (R ; R ), F : P (R ) × R ⇒ R be a t t ∈I 2 t t ∈I 2 set-valued map. We say that μ is an admissible trajectory driven by ν defined on I with underlying dynamics F if •|ν | μ for a.e. t ∈ I ; t t • v (x ) := (x ) ∈ F (μ , x ) for a.e. t ∈ I and μ -a.e. x ∈ R ; t t t • ∂ μ + div ν = 0 in the sense of distributions in [a, b]× R . t t t Given μ ∈ P (R ), we define the set of admissible trajectories as d d A (μ) := μ ={μ } :∃ ν ={ν } ⊆ M (R ; R ) s.t. μ is an admissible traj. I t t ∈I t t ∈I driven by ν, defined on I with underlying dynamics F and μ = μ . We make the following assumptions on the set-valued map F: d d d ( F ) F : P (R ) × R ⇒ R is continuous with convex, compact and nonempty 1 2 d d images, where on P (R ) × R we consider the metric d d d ((μ , x ), (μ , x )) = W (μ ,μ ) +|x − x |. 1 1 2 2 2 1 2 1 2 P (R )×R ( F ) there exists L > 0, a compact metric space U and a continuous map f : d d d P (R ) × R × U → R satisfying | f (μ , x , u) − f (μ , x , u)|≤ L(W (μ ,μ ) +|x − x |), 1 1 2 2 2 1 2 1 2 d d for all μ ∈ P (R ), x ∈ R , i = 1, 2, u ∈ U, such that the set-valued map F i 2 i can be represented as F (μ, x ) = { f (μ, x , u) : u ∈ U } . As pointed out also in Remark 2 of [16], from the Lipschitz continuity of the set- valued map F coming from assumption ( F ), we easily get F (μ, x ) ⊆ F (ν, y) + L(W (μ, ν) +|x − y|)B(0, 1), 2 Vol. 21 (2021) Compatibility of state constraints 4497 d d d d for all μ, ν ∈ P (R ) and x , y ∈ R . From which, for all μ ∈ P (R ) and x ∈ R , 2 2 we have 1/2 F (μ, x ) ⊆ C (1 + m (μ)) (1 +|x |)B(0, 1), (3.1) where C := max{1, L max{|y|: y ∈ F (δ , 0)}}. (n) d (n) Definition 3.2. Let {μ } ⊆ AC([a, b]; P (R )). We say that {μ } uni- n∈N 2 n∈N (n) formly W -converges to μ, μ ⇒ μ,ifwehave (n) sup W (μ ,μ ) → 0. 2 t t ∈[a,b] We recall the following result taken from [16]. Lemma 3.3. (Grönwall-like estimate (Prop. 2 in [16])) Assume ( F ) − ( F ). Let 1 2 μ ,θ ∈ P (R ), and μ ={μ } ∈ A (μ ) an admissible trajectory. Then, 0 0 2 t t ∈[a,b] [a,b] 0 there exists an admissible trajectory θ ={θ } ∈ A (θ ), such that for all t t ∈[a,b] [a,b] 0 t ∈[a, b] we have L(b−a) L(b−a)+(b−a)e W (μ ,θ ) ≤ e · W (μ ,θ ), 2 t t 2 0 0 where L is as in ( F ). Proposition 3.4. Assume ( F ) − ( F ). Let μ ={μ } be an admissible trajec- 1 2 t t ∈[a,b] tory, with 0 ≤ a < b < +∞. Then, there exists η ∈ P(R ×  ) such that [a,b] e η = μ for all t ∈[a, b], and for η-a.e. (x,γ ) t t γ( ˙ t ) ∈ F (μ ,γ (t )), for a.e. t ∈[a, b], γ(a) = x . Moreover, for any η as above and for all t, s ∈[a, b] with s < t, we have (1) for η-a.e. (x,γ ) ∈ R ×  , [a,b] e − e t s (x,γ ) ∈ F (μ ,γ (s)) + t − s + W (μ ,μ ) +|(e − e )(x,γ )| dτ · B(0, 1); 2 τ s τ s t − s 1/2 L(t −s) (2) e − e 2 ≤ e (t − s)(K + 2Lm (μ )) + L W (μ ,μ ) dτ =: t s s 2 τ s h(t, s); e − e t s 1/2 (3) lim + = K + 2Lm (μ ), t →s s t − s where L = Lip(F ) and K = max{|y|: y ∈ F (δ , 0)}. d d In particular, there exists a Borel map w : R ×  → R , with w(x,γ ) ∈ [a,b] F (μ ,γ (s)) for η-a.e. (x,γ ) ∈ R ×  , such that s [a,b] e − e L t s − w ≤ [W (μ ,μ ) + h(τ, s)] dτ. 2 τ s t − s t − s η 4498 G. Cavagnari et al. J. Evol. Equ. Proposition 3.5. (Compactness of A (μ)] Assume ( F ) − ( F ) and let 0 ≤ a < [a,b) 1 2 b < +∞ and μ ∈ P (R ). Then, the set of admissible trajectories A (μ ) is 0 2 [a,b] 0 nonempty and compact w.r.t. uniform W -convergence (see Definition 3.2). 4. Viability problem and the value function Throughout the paper, let K ⊆ P (R ) be closed w.r.t. the metric W .Weare 2 2 interested in the definitions of compatibility of our dynamics w.r.t. the state constraint given by K (cf. introduction of the present paper). Notice that, since concatenation of admissible trajectories is an admissible trajectory (see the note before Prop. 3 in [16]), if K is viable (resp. invariant) in [t , T ] then it ˆ ˆ is viable (resp. invariant) in [0, T ] for any T > T . As we will investigate in Sect. 5, the viability and invariance properties of a closed set K ⊆ P (R ) are closely related to the following optimal control problems, with fixed time-horizon T > 0. d d Definition 4.1. (Value functions)Given K ⊆ P (R ) closed, μ ∈ P (R ) and 2 2 t ∈[0, T ] ,weset viab d (1) V :[0, T ]× P (R ) →[0, +∞) as follows viab V (t ,μ) := inf d (μ ) dt, (4.1) 0 K t μ∈A (μ) [t ,T ] 0 0 where d : P (R ) →[0, +∞), d (μ) := inf W (μ, σ ). K 2 K 2 σ ∈K viab We say that μ ∈ A (μ) is an optimal trajectory for V starting from μ at [t ,T ] time t if it achieves the minimum in (4.1). inv d (2) V :[0, T ]× P (R ) →[0, +∞) as follows inv V (t ,μ) := sup d (μ ) dt. (4.2) 0 K t μ∈A (μ) t [t ,T ] inv We say that μ ∈ A (μ) is an optimal trajectory for V starting from μ at [t ,T ] time t if it achieves the maximum in (4.2). The main interest in the above value functions lies in the fact that they give a characterization of the viability/invariance as explained in Proposition 4.3.Wefirst state a regularity result of the above value functions and the existence of optimal trajectories. Proposition 4.2. Assume ( F ) − ( F ). Given μ ∈ P (R ),t ∈[0, T ], there exist an 1 2 2 0 viab optimal trajectory μ ∈ A (μ) for V and an optimal trajectory μ ∈ A (μ) [t ,T ] [t ,T ] 0 0 inv for V . Vol. 21 (2021) Compatibility of state constraints 4499 viab 1 2 Proof. We prove the existence of an optimal trajectory for V .Takeany μ ,μ ∈ P (R ). By passing to the infimum over σ ∈ K on the triangular inequality 1 1 2 2 W (μ ,σ ) ≤ W (μ ,μ ) + W (μ ,σ ), 2 2 2 1 1 2 2 1 2 we have d (μ ) ≤ W (μ ,μ ) + d (μ ). Reversing the roles of μ and μ , we get K K the 1-Lipschitz continuity of d . Hence, by Fatou’s Lemma, we get the l.s.c. of the cost functional, i.e., T T (n) d (μ ) dt ≤ lim inf d (μ ) dt, K K t n→+∞ t t 0 0 (n) d for any sequence {μ } ⊆ AC([t , T ]; P (R )) uniformly W -converging to μ. n∈N 0 2 2 Combining this with the W -compactness property of Proposition 3.5, we get the desired result. inv (n) We prove the existence of an optimal trajectory for V .Wefix {μ } ⊂ n∈N A (μ) and σ ˆ ∈ K . For any t ∈[t , T ], by triangular inequality and recalling that [t ,T ] 0 1/2 by definition we have the equivalence m (ρ) = W (ρ , δ ), we get the following 2 0 uniform bound (n) (n) (n) d (μ ) ≤ W (μ , σ) ˆ ≤ W (μ ,δ ) + W (δ , σ) ˆ 2 2 0 2 0 K t t t 1/2 (n) 1/2 1/2 1/2 = m (μ ) + m (σ) ˆ ≤ C (1 + m (μ)) + m (σ) ˆ , 2 2 2 2 for some constant C > 0 coming from estimate (A.2) proved in “Appendix A”. Thus, viab as for the proof of the existence of a minimizer for V , we can apply Fatou’s Lemma to get the u.s.c. of the cost functional and conclude. We state here a first characterization of viability/invariance in terms of the optimal control problems introduced in Definition 4.1. Proposition 4.3. Assume ( F ) − ( F ). Let K ⊆ P (R ) be closed in the W - 1 2 2 2 topology, t ∈[0, T ]. Then, viab (1) K is viable for F if and only if V (t ,μ ) = 0 for all μ ∈ K ; 0 0 0 inv (2) K is invariant for F if and only if V (t ,μ ) = 0 for all μ ∈ K . 0 0 0 Proof. We just prove (1), since the proof of (2) is similar. One implication follows viab directly by definition, so we prove the other direction assuming V (t ,μ ) = 0for 0 0 all μ ∈ K . By Proposition 4.2, for all μ ∈ K , there exists an optimal trajectory 0 0 μ ¯ ∈ A (μ ) such that [t ,T ] 0 viab 0 = V (t ,μ ) = d (μ ¯ ) dt. 0 0 K t This implies that d (μ ¯ ) = 0 for a.e. t ∈[t , T ]. By continuity of μ ¯ and by closedness K t 0 of K w.r.t. W -topology, we obtain the viability property for K . As usual, the value function satisfies a Dynamic Programming Principle. 4500 G. Cavagnari et al. J. Evol. Equ. viab d Lemma 4.4. (DPP) The function V :[0, T ]× P (R ) →[0, +∞) satisfies viab viab V (t ,μ) = inf d (μ ) ds + V (t,μ ) : t ∈[t , T ], μ ∈ A (μ) . 0 K s t 0 [t ,T ] (4.3) Furthermore, for any μ ∈ A (μ),the map [t ,T ] viab t → g (t ) := d (μ ) ds + V (t,μ ) μ K s t is nondecreasing in [t , T ], and it is constant if and only if μ is an optimal trajectory. viab Proof. We prove one inequality (≥). By definition of V (t ,μ), for any ε> 0 there exists μ ∈ A (μ) s.t. [t ,T ] t T t viab ε ε ε viab ε V (t ,μ) + ε ≥ d (μ ) ds + d (μ ) ds ≥ d (μ ) ds + V (t,μ ), K s K s K s t t t t 0 0 ε ε for any t ∈[t , T ], since the truncated trajectory μ ˆ := μ belongs to A (μ ). 0 [t,T ] |[t,T ] We conclude by passing to the infimum on μ ∈ A (μ) and t ∈[t , T ] on the [t ,T ] 0 right-hand side and then letting ε → 0 . Concerning the other inequality, fix any μ ∈ A (μ) and t ∈[t , T ]. By defini- [t ,T ] 0 viab ε viab tion of V (t,μ ), for all ε> 0 there exists μ ∈ A (μ ) s.t. V (t,μ ) + ε ≥ t [t,T ] t t d (μ ) ds. Now, defining μ , if s ∈[t , t ], s 0 μ ˆ := μ , if s ∈[t, T ], we see that μ ˆ ∈ A (μ). Thus, [t ,T ] T t T t viab ε viab V (t ,μ) ≤ d (μ ˆ ) ds = d (μ ) ds + d (μ ) ds ≤ d (μ ) ds + V (t,μ ) + ε. 0 K s K s K K s t t t t t 0 0 0 By passing to the inf on μ ∈ A (μ), and then letting ε → 0 , we conclude. [t ,T ] The proof of the second part of the statement is standard and follows straightfor- wardly from (4.3) (see for instance Prop. 3 in [16]). We come now to the formulation of a Dynamic Programming Principle for the value inv function V whose proof is omitted since it is similar to that of Lemma 4.4. inv d Lemma 4.5. (DPP) The function V :[0, T ]× P (R ) →[0, +∞) satisfies inv inv V (t ,μ) = sup d (μ ) ds + V (t,μ ) : t ∈[t , T ], μ ∈ A (μ) . 0 s t 0 [t ,T ] K 0 (4.4) Vol. 21 (2021) Compatibility of state constraints 4501 Furthermore, for any μ ∈ A (μ),the map [t ,T ] inv t → j (t ) := d (μ ) ds + V (t,μ ) μ K s t is nonincreasing in [t , T ], and it is constant if and only if μ is an optimal trajectory. As in the classical case, the infinitesimal version of the Dynamic Programming Prin- ciple gives rise to a Hamilton–Jacobi–Bellman equation. The next section is devoted to such a Hamilton–Jacobi equation. viab inv Proposition 4.6. Assume ( F ) − ( F ). The value functions V (t,μ) and V (t,μ) 1 2 are uniformly continuous in t ∈[0, T ] and Lipschitz continuous in μ ∈ P (R ) w.r.t. the W -metric. viab inv Proof. We prove the statement for V , since the proof for V is analogous. Fix 1 2 d t ∈[0, T ] and take any μ ,μ ∈ P (R ). By Proposition 4.2, there exists an 0 2 2 2 1 optimal trajectory μ ¯ ∈ A (μ ) starting from μ . Thus, for any admissible μ ∈ [t ,T ] A (μ ),wehave [t ,T ] T   T viab 1 viab 2 1 2 1 2 V (t ,μ ) − V (t ,μ ) ≤ d (μ ) − d (μ ¯ ) dt ≤ W (μ , μ ¯ ) dt. 0 0 K K 2 t t t t t t 0 0 1 1 We can now choose μ ∈ A (μ ) such that the Grönwall-like inequality of Lemma [t ,T ] 3.3 holds, thus getting L(T −t ) viab 1 viab 2 L(T −t )+(T −t )e 1 2 0 0 V (t ,μ ) − V (t ,μ ) ≤ (T − t )e · W (μ ,μ ). 0 0 0 2 (4.5) viab We now prove the uniform continuity in time of V .Let 0 ≤ t ≤ t ≤ T , 1 2 μ ∈ P (R ) and μ ∈ A (μ) an optimal trajectory. Then by the second part of the 2 [t ,T ] viab statement of Lemma 4.4, noticing that in particular g (t ) = V (t ,μ),wehave μ 1 1 viab viab viab V (t ,μ) − V (t ,μ) = d (μ ) dt + V (t ,μ ) − V (t ,μ) 1 2 K t 2 |t =t 2 LT LT +Te ≤ d (μ ) dt + Te W (μ ,μ). K t 2 |t =t By continuity of d (·) and of t → μ we have the convergence to zero of the right- hand-side as t → t . Reversing the roles of t and t we conclude. 2 1 1 2 5. Hamilton Jacobi Bellman equation As reported in p. 352 in [11] and at the beginning of Sec. 6.1 in [10], we recall the following crucial fact. Throughout the paper, let (, B, P) be a sufficiently “rich” probability space, i.e.,  is a complete, separable metric space, B is the Borel σ -algebra 4502 G. Cavagnari et al. J. Evol. Equ. on , and P is an atomless Borel probability measure. We use the notation L () = 2 d d 2 L (; R ). Then, given any μ ,μ ∈ P (R ), there exist X , X ∈ L () such 1 2 2 1 2 P P that μ = X P, i = 1, 2, and W (μ ,μ ) = X − X 2 . i i 2 1 2 1 2 Definition 5.1. (1) Given a function u :[0, T ]× P (R ) → R, we define its lift 2 2 U :[0, T ]× L () → R by setting U (t, X ) = u(t, X P) for all X ∈ L (). P P (2) Let H = H (μ, p) be a Hamiltonian function mapping μ ∈ P (R ), p ∈ 2 d 2 2 L (R ) into R. We say that the Hamiltonian function H : L ()× L () → R μ P P 2 2 d is a lift of H ,if H (X, p◦X ) = H (X P, p), for all X ∈ L (), p ∈ L (R ). P X P Definition 5.2. (Viscosity solution)Let H and H be as in Definition 5.1(2). Given λ ≥ 0, we consider a first-order HJB equation of the form − ∂ u(t,μ) + λu(t,μ) + H (μ, D u(t,μ)) = 0, (5.1) t μ and its lifted form − ∂ U (t, X ) + λU (t, X ) + H (X, DU (t, X )) = 0. (5.2) We say that u :[0, T ]× P (R ) → R is a viscosity subsolution (resp. supersolution) of (5.1)in [0, T ) × P (R ) if and only if its lift is a viscosity subsolution (resp. 2 2 supersolution) of (5.2)in [0, T ) × L (). We recall that U :[0, T ]× L () → R P P is a 1 2 • viscosity subsolution of (5.2) if for any test function φ ∈ C ([0, T ]× L ()) such that U − φ has a local maximum at (t , X ) ∈[0, T ) × L () it holds 0 0 −∂ φ(t , X ) + λU (t , X ) + H (X , Dφ(t , X )) ≤ 0; t 0 0 0 0 0 0 0 1 2 • viscosity supersolution of (5.2) if for any test function φ ∈ C ([0, T ]× L ()) such that U − φ has a local minimum at (t , X ) ∈[0, T ) × L () it holds 0 0 −∂ φ(t , X ) + λU (t , X ) + H (X , Dφ(t , X )) ≥ 0; t 0 0 0 0 0 0 0 • viscosity solution of (5.2) if it is both a supersolution and a subsolution. Remark 5.3. Assume u :[0, T ]× P (R ) → R is constant in time, i.e., with slight abuse of notation we can identify u(t,μ) = u(μ) for any (t,μ) ∈[0, T ]× P (R ), with u : P (R ) → R. Then, (5.1) and (5.2) become, respectively λu(μ) + H (μ, D u(μ)) = 0,λU (X ) + H (X, DU (X )) = 0, (5.3) where U : L () → R is the lift of u. Moreover, the test functions in Definition 5.2 can be taken independent of t, i.e., 1 2 • U is a viscosity subsolution of (5.3) if for any test function φ ∈ C (L ()) such that U − φ has a local maximum at X ∈ L () it holds λU (X ) + 0 0 H (X , Dφ(X )) ≤ 0; 0 0 1 2 • U is a viscosity supersolution of (5.3) if for any test function φ ∈ C (L ()) such that U − φ has a local minimum at X ∈ L () it holds λU (X ) + 0 0 H (X , Dφ(X )) ≥ 0. 0 0 Vol. 21 (2021) Compatibility of state constraints 4503 • U is a viscosity solution of (5.3) if it is both a supersolution and a subsolution. Theorem 5.4. (Comparison principle) Assume that there exists L , C > 0 such that the 2 2 Hamiltonian function H : L () × L () → R satisfies the following assumption: P P 2 2 ( H ) for any X, Y ∈ L (), any a, b , b > 0 and C , C ∈ L (), 1 2 1 2 P P H (Y, a(X − Y ) − b Y − C ) − H (X, a(X − Y ) + b X + C ) 1 1 2 2 ≤ X − Y + 2aL X − Y + 1/2 + C (1 + m (Y P)) (1 + Y 2 )( C 2 + b Y 2 )+ 1 1 2 L L L P P P 1/2 + C (1 + m (X P)) (1 + X 2 )( C 2 + b X 2 ). 2 2 2 L L L P P P Let λ ≥ 0. Then, if u , u ∈ UC ([0, T ]× P (R )) are a subsolution and a superso- 1 2 2 lution of (5.1), respectively, we have sup (u − u ) ≤ sup (u − u ) . (5.4) 1 2 1 2 d d [0,T ]×P (R ) {T }×P (R ) 2 2 Proof. The proof follows the line of the corresponding classical finite-dimensional argument (see, e.g., Theorem II.2.12 p. 107) in [6]. In the following, we define G := 2 2 2 2 R × L () and, for any (t, X ) ∈ G,weset (t, X ) := |t | + X . We denote P G A := [0, T ]× L () ⊂ G, that is a complete metric space with distance induced by the norm · of G. Let U , U : A → R be, respectively, the lift functionals for u and u as in 1 2 1 2 Definition 5.1(1). We define the functional  : A → R by setting (t, X ) − (s, Y ) (t, X, s, Y ) :=U (t, X ) − U (s, Y ) − + 1 2 2ε 2 m/2 2 m/2 − β (1 + X ) + (1 + Y ) + η(t + s), 2 2 L L P P where ε, β, m,η > 0 are positive constants which will be chosen later. Notice that d 2 since u ∈ UC ([0, T ]× P (R )), i = 1, 2, we have U ∈ UC ([0, T ]× L ()). i 2 i Indeed, for all X, Y ∈ L (), t, s ∈[0, T ], |U (t, X ) − U (s, Y )|=|u (t, X P) − u (s, Y P)|≤ ω |t − s| + W (X P, Y P) i i i i i 2 ≤ ω ( (t, X ) − (s, Y ) ) , where ω (·) is the modulus of continuity of u and where we used the fact that u i W (X P, Y P) ≤ X − Y 2 . Set + + A := sup (u − u ) = sup (U − U ) . 1 2 1 2 d 2 {T }×P (R ) {T }×L For R > 0, i = 1, 2, set (R ) := sup{|U (t, X ) − U (s, Y )|: (t, X ) − (s, Y ) ≤ R }; i i i G 4504 G. Cavagnari et al. J. Evol. Equ. by uniform continuity we have (R ) sup < +∞. (5.5) 1 + R R ≥0 Thus, U (t, X ) − U (s, Y ) = U (t, X ) − U (T , X ) + U (T , X ) − U (T , X ) 1 2 1 1 1 2 + U (T , X ) − U (s, Y ) 2 2 ≤  (T − t ) + A +  ( (T , X ) − (s, Y ) ) 1 2 G for all (t, X, s, Y ) ∈ A .By(5.5), there exists C > 0 such that |U (t, X ) − U (s, Y )|≤ C (1 + X − Y 2 ), for all (t, X, s, Y ) ∈ A . (5.6) 1 2 The proof proceeds by contradiction: assume that there exist (t , μ) ˜ ∈[0, T]× ˜ ˜ P (R ) and δ> 0 such that u (t , μ) ˜ − u (t , μ) ˜ = A + δ. In particular, for any 2 1 2 ˜ ˜ ˜ ˜ X ∈ L () such that X P =˜ μ, it holds U (t˜, X ) − U (t˜, X ) = A + δ. 1 2 Select β, η > 0 such that 2 m/2 ˜ ˜ ˜ ˜ ˜ ˜ A + ≤ A + δ − 2β(1 + X ) + 2ηt = (t , X , t , X ) ≤ sup . 2 P 2 0 2 Noting that  ∈ C (A ), by taking ε< and recalling (5.6), we have 2C lim (t, X, s, Y ) =−∞, X →+∞ Y →+∞ for any t, s ∈[0, T ]. Therefore, there exists R > 0 such that sup (t, X, s, Y ) = sup (t, X, s, Y ). 2 2 ([0,T ]×B (0,R)) Thus, by Stegall’s Variational Principle (see, e.g., Theorem 6.3.5 in [8]) for any fixed ξ> 0, there exists a linear and continuous functional  : G → R with  <ξ and such that  −  attains a strong maximum in ([0, T ]× B (0, R)) . Moreover, on ([0, T ]× B (0, R)) ,wehave 2 2 (t, X, s, Y ) − (t, X, s, Y ) ≥ (t, X, s, Y ) − 2ξ T + R , and so 2 2 sup  ≤ 2ξ T + R + sup ( − ). (5.7) ([0,T ]×B (0,R)) P Vol. 21 (2021) Compatibility of state constraints 4505 ¯ ¯ Let (t , X , s¯, Y ) ∈ ([0, T]× B 2 (0, R)) be a maximizer of  −  on ([0, T]× 2 δ 2 2 B 2 (0, R)) , obtained by choosing ξ> 0 s.t. 2ξ T + R ≤ . In particular, we get L 8 δ δ 2 2 ¯ ¯ ¯ ¯ ¯ ¯ A + ≤ sup  ≤ 2ξ T + R + ( − )(t , X , s¯, Y ) ≤ + ( − )(t , X , s¯, Y ) 2 2 8 δ δ 2 2 ¯ ¯ ¯ ¯ ¯ ¯ ≤ + (t , X , s¯, Y ) + 2ξ T + R ≤ + (t , X , s¯, Y ), 8 4 and so ¯ ¯ (t , X , s¯, Y ) ≥ A + , (5.8) leading to 2 m/2 2 m/2 ¯ ¯ β (1 + X ) + (1 + Y ) ≤ sup U − inf U − A − + η(t +¯s). 2 2 1 2 L L P P 4 By choosing 0 <η < 1, we get for all ε> 0, m ∈ (0, 1] 2 m/2 2 m/2 ¯ ¯ β((1 + X ) + (1 + Y ) ) ≤ sup U − inf U − A − + 2T =: d > 0. 1 2 2 2 L L P P 4 (5.9) By Riesz’ representation theorem, there exist unique (λ ,λ ,λ ,λ ) ∈ G such that 1 2 3 4 (t, X, s, Y ) = λ t +λ , X  + λ s +λ , Y  . 2 2 1 2 3 4 L L P P From (5.7), we have 2 2 ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ (t , X , t , X ) + (s¯, Y , s¯, Y ) ≤ 2 ( − )(t , X , s¯, Y ) + 4ξ T + R ¯ ¯ 2 2 ≤ 2(t¯, X , s¯, Y ) + 8ξ T + R , and so ¯ ¯ ¯ ¯ ¯ ¯ U (t , X ) − U (t , X ) + U (s¯, Y ) − U (s¯, Y )+ 1 2 1 2 2 m/2 2 m/2 ¯ ¯ − 2β (1 + X ) + (1 + Y ) + 2η(t¯ +¯s) 2 2 L L P P ¯ ¯ (t , X ) − (s¯, Y ) G 2 m/2 2 m/2 ¯ ¯ ¯ ¯ ≤ 2U (t , X ) − 2U (s¯, Y ) − − 2β (1 + X ) + (1 + Y ) + 1 2 2 2 L L ε P P 2 2 + 2η(t +¯s) + 8ξ T + R , which leads to ¯ ¯ (t , X ) − (s¯, Y ) ¯ ¯ ¯ ¯ ¯ ¯ ≤ U (t , X ) − U (s¯, Y ) + U (t , X ) − U (s¯, Y ) 1 1 2 2 2 2 +8ξ T + R . (5.10) 4506 G. Cavagnari et al. J. Evol. Equ. Take 0 <ξ <ε < 1. From the previous inequality, the boundedness of U , U in 1 2 [0, T ]× B (0, R) gives √ √ 2 2 ¯ ¯ (t , X ) − (s¯, Y ) ≤ B ε + 8ε T + R ≤ B ε, (5.11) for suitable constants B , B > 0 independent on ε. By uniform continuity of U , i = 1, 2, and by plugging the previous relation in (5.10), we can build a modulus of continuity ω(·) such that ¯ ¯ (t , X ) − (s¯, Y ) √ √ 2 2 ≤ ω(ε) := ω (B ε) + ω (B ε) + 8ε T + R .(5.12) u u 1 2 ¯ ¯ We show that neither t nor s¯ can be equal to T . Indeed, in t = T , ¯ ¯ ¯ ¯ ¯ ¯ (T , X , s¯, Y ) ≤ U (T , X ) − U (T , X ) + U (T , X ) − U (s¯, Y ) + η(T +¯s) 1 2 2 2 ≤ A + ω (B ε) + 2ηT , by definition of A. We thus get a contradiction with (5.8) by choosing ε and η small enough s.t. ω (B ε) + 2ηT < . The same reasoning applies for proving s¯ < T . We define the C (A) test functions (t, X ) − (s¯, Y ) φ(t, X ) := U (s¯, Y ) + + 2ε 2 m/2 2 m/2 + β (1 + X ) + (1 + Y ) − η(t +¯s)+ 2 2 L L P P + (t, X, s¯, Y ), (t , X ) − (s, Y ) ψ(s, Y ) := U (t , X ) − + 2ε 2 m/2 2 m/2 − β (1 + X ) + (1 + Y ) + η(t + s)+ 2 2 L L P P − (t , X , s, Y ). Notice that (U − φ)(t, X ) = ( − )(t, X, s¯, Y ), hence, U − φ attains its maximum 1 1 ¯ ¯ at (t , X ) ∈[0, T ) × B 2 (0, R) and, similarly, U − ψ attains its minimum at (s¯, Y ) ∈ [0, T ) × B 2 (0, R).Wehave ¯ ¯ t −¯s t −¯s ¯ ¯ ∂ φ(t , X ) = − η + λ,∂ ψ(s¯, Y ) = + η − λ , t 1 t 3 ε ε ¯ ¯ X − Y m−2 ¯ ¯ ¯ ¯ 2 Dφ(t , X ) = + mβ(1 + X ) X + λ , 2 2 ε P ¯ ¯ X − Y m−2 ¯ ¯ ¯ Dψ(s¯, Y ) = − mβ(1 + Y ) Y − λ . 2 4 ε P Since t , s¯ ∈[0, T ), by definition of viscosity sub/supersolution, we have ¯ ¯ ¯ ¯ ¯ ¯ ¯ − ∂ φ(t , X ) + λU (t , X ) + H (X , Dφ(t , X )) ≤ 0 ≤ t 1 ¯ ¯ ¯ ¯ ≤−∂ ψ(s¯, Y ) + λU (s¯, Y ) + H (Y , Dψ(s¯, Y )). t 2 Vol. 21 (2021) Compatibility of state constraints 4507 Now, by (5.8), we have ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ U (t , X ) − U (s¯, Y ) ≥ (t , X , s¯, Y ) − η(t +¯s) ≥ (t , X , s¯, Y ) − 2T η 1 2 ≥ A + − 2T η, and we can choose η sufficiently small so that A + − 2T η ≥ 0. Then, we get ¯ ¯ 2η ≤ 2η + λ(U (t , X ) − U (s¯, Y )) 1 2 ¯ ¯ ¯ ¯ ≤ λ + λ + H (Y , Dψ(s¯, Y )) − H (X , Dφ(t , X )). 1 3 We can now invoke assumption ( H ) with 1 m−2 a = , b = mβ(1 + Y ) , C = λ , 1 2 1 4 m−2 ¯ 2 b = mβ(1 + X ) , C = λ , 2 2 2 2 recalling that λ ,λ ≤ ε and λ 2 , λ 2 ≤ ε by the bound on the dual norm of 1 3 2 4 L L P P the operator . We get ¯ ¯ X −Y 1/2 ¯ ¯ ¯ ¯ 2η ≤ 2ε + X − Y 2 + 2L + λ 2 C (1 + m (Y P)) (1 + Y 2 )+ L ε L 2 L P P P m−2 1/2 ¯ ¯ ¯ ¯ +C (1 + m (Y P)) (1 + Y ) mβ(1 + Y ) Y + 2 2 2 L L P P 1/2 ¯ ¯ + λ C (1 + m (X P)) (1 + X )+ 2 2 L L P P m−2 1/2 ¯ ¯ ¯ ¯ +C (1 + m (X P)) (1 + X 2 ) mβ(1 + X ) X 2 . 2 L L P P ¯ ¯ By (5.11), (5.12) and recalling that X , Y ∈ B (0, R),wehave 2η ≤ 2ε + B ε + 2L ω(ε)+ m−2 m−2 2 2 ¯ ¯ 2 2 + 2ε D(1 + R) + D mβ (1 + Y ) + (1 + X ) ) , R 2 2 L L P P 1/2 where we defined D := D (1 + R) R, where D := max{C (1 + m (Y P)), C (1 + 1/2 m (X P))} > 0. Finally, by (5.9) we get 2η ≤ 2ε + B ε + 2L ω(ε) + 2ε D(1 + R) + D md ≤ Ko(1) + η, where for the last passage we choose m ≤ , and o(1) is a function of ε going to 0 D d + + as ε → 0 . This leads to a contradiction as ε → 0 . Remark 5.5. As highlighted also in Remark 3.8 p. 154 of [6], if λ = 0in (5.1), we can drop the symbol of the positive part in (5.4) and conclude that sup (u − u ) ≤ sup (u − u ). 1 2 1 2 d d [0,T ]×P (R ) {T }×P (R ) 2 2 4508 G. Cavagnari et al. J. Evol. Equ. 6. Viscosity characterization of viability and invariance We now provide the main results of the paper: Theorems 6.6 and 6.7. As pointed out viab also in Remark 4.2 in [18], by Theorem 8.2.11 in [4], the Hamiltonian H defined in Theorem 1.1 satisfies viab H (μ, p) =−d (μ) − inf v, p(x ) dμ(x ). (6.1) d v∈F (μ,x ) Definition 6.1. (Lifted Hamiltonian for viability) We define the lifted Hamiltonian in 2 viab L () associated with H P F viab H (X, Q) := −d (X P) − inf v ◦ X (ω), Q(ω) dP(ω), 2 d v(·)∈L (R ) X P v(x )∈F (X P,x ) for X P−a.e. x 2 viab viab for all X, Q ∈ L (). Note that H is a lift of H according to Definition 5.1. P F F By disintegrating P = (X P) ⊗ P (see Theorem 2.1), we have viab H (X, Q) =−d (X P) − inf v ◦ X (ω), Q(ω) dP (ω)dX P(x ) K x 2 d d −1 v∈L (R ) R X (x ) X P v(x )∈F (X P,x ) for X P−a.e. x =−d (X P) − inf v(x ), Q(ω)dP (ω) dX P(x ) K x 2 d d −1 v∈L (R ) R X (x ) X P v(x )∈F (X P,x ) for X P−a.e. x =−d (X P) − inf v, Q(ω)dP (ω) dX P(x ) K x (6.2) d v∈F (X P,x ) −1 R X (x ) =−d (X P) − inf v, Q(ω) dP (ω)dX P(x ) K x d −1 v∈F (X P,X (ω)) R X (x ) =−d (X P) − inf v, Q(ω) dP(ω) v∈F (X P,X (ω)) =−d (X P) − inf v(ω), Q(ω) dP(ω), v∈L () v(·)∈F (X P,X (·)) where in the last equality we used Theorem 8.2.11 in [4] (or Theorem 6.31 in [14]). Definition 6.2. (Lifted Hamiltonian for invariance) Related with the invariance prob- inv 2 lem and associated with H , we define the following lifted Hamiltonian in L () F P inv H (X, Q) := −d (X P) − sup v ◦ X (ω), Q(ω) dP(ω), 2 d v∈L (R ) X P v(x )∈F (X P,x ) for X P−a.e. x 2 inv inv for all X, Q ∈ L (). Notice that H is a lift of H according to Definition 5.1. P F F Moreover, the equivalences (6.1) and (6.2) hold also in this case replacing, respectively, viab viab inv inv H , H with H , H , and inf with sup. F F F F Vol. 21 (2021) Compatibility of state constraints 4509 viab Lemma 6.3. Assume ( F ) − ( F ). Then, both the Hamiltonian functions H and 1 2 inv H satisfy assumption ( H ) with L and C, respectively, as in ( F ) and (3.1). viab inv Proof. We prove here the assertion for H since the assertion for H can be proved F F 2 2 in the same way. Fix any X, Y ∈ L , a, b , b > 0 and C , C ∈ L , and denote 1 2 1 2 P P μ := X P, μ := Y P.Wehave 1 2 viab viab H (Y, a(X − Y ) − b Y − C ) − H (X, a(X − Y ) + b X + C ) = 1 1 2 2 F F − d (μ ) − inf {av, X (ω) − Y (ω)− b v, Y (ω)−v, C (ω)} dP K 2 1 1 (6.3) v∈F (μ ,Y (ω)) + d (μ ) + inf {aw, X (ω) − Y (ω)+ b w, X (ω)+w, C (ω)} dP. K 1 2 2 w∈F (μ ,X (ω)) d d Let p ∈ R . For any x , y ∈ R , define δ := L(W (μ ,μ ) +|x − y|).Given x ,y 2 1 2 any ε> 0, there exists z ∈ F (μ , x ) + δ B(0, 1) such that ε,p 1 x ,y inf v, p≥ inf z, p≥z , p− ε, ε,p v∈F (μ ,y) z∈F (μ ,x )+δ B(0,1) 1 x ,y where the first inequality comes from Lipschitz continuity of the set-valued map F. In particular, we can write z =ˆ w + δ w , with w ˆ ∈ F (μ , x ) and ε,p ε,p x ,y ε,p ε,p 1 w ∈ B(0, 1), thus getting ε,p inf v, p≥wˆ , p+ δ w , p− ε ε,p x ,y ε,p v∈F (μ ,y) ≥ inf w, p− δ | p|− ε. x ,y w∈F (μ ,x ) Hence, we have inf w, p− inf v, p≤ L(W (μ ,μ ) +|x − y|) | p|. (6.4) 2 1 2 w∈F (μ ,x ) v∈F (μ ,y) 1 2 Thus, for any x , y, c , c ∈ R and by choosing p = x − y, it holds 1 2 inf {aw, x − y+ b w, x+w, c } + 2 2 w∈F (μ ,x ) − inf {av, x − y− b v, y−v, c } 1 1 v∈F (μ ,y) { } ≤ a inf w, x − y+ sup b w, x+w, c  + 2 2 w∈F (μ ,x ) w∈F (μ ,x ) − a inf v, x − y+ sup {b v, y+v, c } 1 1 v∈F (μ ,y) v∈F (μ ,y) ≤ aL(W (μ ,μ ) +|x − y|) |x − y|+ 2 1 2 + sup {b w, x+w, c } + sup {b v, y+v, c } 2 2 1 1 w∈F (μ ,x ) v∈F (μ ,y) 1 2 ≤ aL(W (μ ,μ ) +|x − y|) |x − y|+ 2 1 2 + b sup w, x+ sup w, c + b sup v, y+ sup v, c 2 2 1 1 w∈F (μ ,x ) w∈F (μ ,x ) v∈F (μ ,y) v∈F (μ ,y) 1 1 2 2 ≤ aL(W (μ ,μ ) +|x − y|) |x − y|+ 2 1 2 + b |x | sup |w|+|c | sup |w|+ b |y| sup |v|+|c | sup |v|, 2 2 1 1 w∈F (μ ,x ) w∈F (μ ,x ) v∈F (μ ,y) v∈F (μ ,y) 1 1 2 2 4510 G. Cavagnari et al. J. Evol. Equ. where we used the Cauchy–Schwarz’s inequality. Integrating with respect to the mea- sure (X, Y, C , C )P on the variables (x , y, c , c ) and by (3.1), we get 1 2 1 2 inf {aw, X (ω) − Y (ω)+ b w, X (ω)+w, C (ω)} dP+ 2 2 w∈F (μ ,X (ω)) − inf {av, X (ω) − Y (ω)− b v, Y (ω)−v, C (ω)} dP 1 1 v∈F (μ ,Y (ω)) 1/2 ≤ 2aL X − Y + b C (1 + m (μ )) (1 + X 2 ) X 2 + 2 1 2 L L P P 1/2 + b C (1 + m (μ )) (1 + Y 2 ) Y 2 + 1 2 L L P P 1/2 1/2 + C C (1 + m (μ )) (1 + X ) + C C (1 + m (μ )) (1 + Y ) 2 2 2 2 2 1 1 2 L 2 L L 2 L P P P P recalling that W (X P, Y P) ≤ X − Y 2 . We conclude from (6.3), thanks to the Lipschitz continuity of d (·). Remark 6.4. Assume ( F ) − ( F ).Let μ ∈ P (R ) be fixed. Then, the set of contin- 1 2 2 2 d uous selections of F (μ, ·) is dense in L (R ) in the set of Borel selections of F (μ, ·). Indeed, let v(·) be a Borel selection of F (μ, ·). By Lusin’s Theorem, for any ε> 0 d d d there exists a compact K ⊆ R and a continuous map w : R → R such that ε ε v = w on K and μ(R \ K )<ε. By Corollary 9.1.3 in [4], we can extend w ε ε ε ε|K to a continuous selection v of F (μ, ·). Moreover, we have v − v ≤ 2 χ |F (μ, ·)| . 2 d 2 L R \K L μ μ 1/2 Since |F (μ, x )|≤|F (δ , 0)|+ Lm (μ) + L|x |, we have that 1/2 1/2 v − v 2 ≤ 2 |F (δ , 0)|+ 2Lm (μ) χ d ≤ ε |F (δ , 0)|+ 2Lm (μ) , ε 0 0 L R \K 2 ε 2 μ 2 and the right hand side tends to 0 as ε → 0 . viab inv Now, we deduce that the value functions V and V satisfy the following Hamilton–Jacobi equations. Proposition 6.5. Assume ( F ) − ( F ). Then, 1 2 viab (1) V is a viscosity solution of viab − ∂ u(t,μ) + H (μ, D u(t,μ)) = 0; (6.5) t μ inv (2) V is a viscosity solution of inv − ∂ u(t,μ) + H (μ, D u(t,μ)) = 0. (6.6) t μ 2 d viab Proof. We prove (1).Let U :[0, T ]× L (; R ) → R be the lift of V according to Definition 5.1. Claim 1. U is a viscosity supersolution of −∂ U (t, X ) + H (X, DU (t, X ) = 0. t F Vol. 21 (2021) Compatibility of state constraints 4511 2 d 1 Proof of Claim 1. Let φ :[0, T ]× L (; R ) → R be a C map such that U − φ attains its minimum at (s, X ), and define μ = X P.Let μ ={μ } be an optimal t t ∈[s,T ] trajectory defined on [s, T ] with μ = μ, its existence being assured by Proposition 4.2, and let η ∈ P(R ×  ) such that e η = μ for all t ∈[s, T ].Fix ε> 0 and [s,T ] t t ε 2 choose a family {Y } ⊆ L () of random variables satisfying the properties of t ∈[s,T ] Corollary A.3 related to μ. Then, by the Dynamic Programming Principle in Lemma 4.4 and optimality of μ, t t ε ε ε 0 =U (t, Y ) − U (s, Y ) + d (μ ) dτ = U (t, Y ) − U (s, X ) + d (μ ) dτ τ τ t s K t K s s ≥φ(t, Y ) − φ(s, X ) + d (μ ) dτ, t K ε ε where the equality U (s, Y ) = U (s, X ) holds since Y P = X P = μ and since U, s s as a lift, is law dependent. Therefore, there exists a continuous increasing function :[0, +∞[→ [0, +∞[ with (k)/k → 0as k → 0 such that we have 0 ≥φ(t, Y ) − φ(s, X ) + d (μ ) dτ t K ≥∂ φ(s, X )(t − s) +Dφ(s, X ), Y − X  2 + d (μ ) dτ + t τ t K ε ε Y − Y t s −  |t − s| 1 + + ε t − s 2 ε ε ≥∂ φ(s, X )(t − s) +Dφ(s, X ), Y − Y  2 + d (μ ) dτ − ε Dφ(s, X ) 2 t K τ t s L L P P e − e t s −  |t − s| 1 + + ε . t − s Dividing by t − s > 0, by Corollary A.3(3), we have 0 ≥∂ φ(s, X ) + inf Dφ(s, X ), v dP(ω) + d (μ ) dτ + t τ v∈F (X P,X (ω)) t − s ε 1 e − e t s − Dφ(s, X ) 2 −  |t − s| 1 + + ε + t − s t − s t − s 2 − ((  t ) + Lε) Dφ(s, X ) . By letting ε → 0 , we obtain 0 ≥∂ φ(s, X ) + inf Dφ(s, X ), v dP(ω) + d (μ ) dτ + t K τ v∈F (X P,X (ω)) t − s 1 e − e t s −  |t − s| 1 + − (  t ) · Dφ(s, X ) . t − s t − s η 4512 G. Cavagnari et al. J. Evol. Equ. e − e t s Recalling the boundedness of coming from Proposition 3.4, by letting t − s t → s ,wehave 0 ≥∂ φ(s, X ) + inf Dφ(s, X ), v dP(ω) + d (μ ), t K s v∈F (X P,X (ω)) viab i.e., −∂ φ(s, X ) + H (X, Dφ(s, X )) ≥ 0, where, as already discussed, we have viab H (X, Q) =−d (X P) − inf Q(ω), v dP(ω). v∈F (X P,X (ω)) viab Thus, U is a viscosity supersolution of −∂ U (t, X ) + H (X, DU (t, X )) = 0. viab Claim 2. U is a viscosity subsolution of −∂ U (t, X ) + H (X, DU (t, X ) = 0. 2 d 1 Proof of Claim 2. Let φ :[0, T ]× L (; R ) → R be a C map such that U − φ 2 d attains its maximum at (s, X ) and define μ = X P.Fix ε> 0, and let v ∈ L (R ) be such that v (x ) ∈ F (μ, x ) for μ-a.e. x ∈ R and Dφ(s, X )(ω), v ◦ X (ω) dP(ω) ≤ inf Dφ(s, X )(ω), v ◦ X (ω) dP(ω) + . 2 d v∈L (R ) X P v(·)∈F (X P,·) By Remark 6.4, we can suppose that v ∈ C , and by Lemma A.4 there exists an ε ε ε ε admissible trajectory μ ={μ } defined on [s, T ] with μ = μ, and η ∈ t ∈[s,T ] t s d ε ε P(R ×  ) such that e η = μ for all t ∈[s, T ] and [s,T ] t e − e t s lim − v ◦ e = 0. ε s t →s t − s 2 0 d By density, we can find v ˆ ∈ C (R ) such that v −ˆ v 2 ≤ ε. ε ε ε d ε Denote by V :  → R ×  a Borel map satisfying η = V P. Recalling ε [s,T ] ε ε ε Lemma A.2, since for all ε> 0we have μ = μ = e η = (e ◦ V )P = X P,we s s ε can find a sequence of measure-preserving Borel maps {r (·)} such that n∈N P ω ∈  :|X (ω) − e ◦ V ◦ r (ω)|≤ = 1, s ε ε,n ε,n ε ε and we set Y = e ◦ V ◦ r for all t ∈[s, T ]. In particular, Y P = μ for all t ε t n t t t ∈[s, T ]. We then have ε,n ε,n Y − Y e − e s t s t ε,n lim − v ◦ Y = lim − v ◦ e = 0. ε ε s + + t − s 2 t − s 2 t →s t →s L L Recalling the choice of v ˆ ,wehavealso ε,n ε,n v ◦ X −ˆ v ◦ X 2 = v ◦ Y −ˆ v ◦ Y 2 = v −ˆ v 2 ≤ ε. ε ε ε ε ε ε s s L L L P P Vol. 21 (2021) Compatibility of state constraints 4513 ε,n ε,n 1 h Since, by Lemma A.2, Y − X 2 ≤ , we can find a subsequence {Y } s s h∈N L n ε,n such that for P-a.e. ω ∈  it holds lim Y (ω) = X (ω). Therefore, h→+∞ s ε,n 2 lim |ˆ v ◦ Y (ω) −ˆ v ◦ X (ω)| dP(ω) = 0, (6.7) ε ε h→+∞ where we used the Dominated Convergence Theorem to pass to the limit under the integral sign, exploiting the global boundedness of v ˆ . From the Dynamic Programming Principle, for all t ∈[s, T ] we have ε,n ε,n ε 0 ≤ U (t, Y ) − U (s, Y ) + d (μ ) dτ t s τ t t ε,n ε,n h ε h ε = U (t, Y ) − U (s, X ) + d (μ ) dτ ≤ φ(t, Y ) − φ(s, X ) + d (μ ) dτ. t K t K τ τ s s Therefore, there exists a continuous increasing function  :[0, +∞[→ [0, +∞[ with (k)/k → 0as k → 0 such that we have ε,n h ε 0 ≤ φ(t, Y ) − φ(s, X ) + d (μ ) dτ t τ ε,n ε ≤ ∂ φ(s, X )(t − s) +Dφ(s, X ), Y − X  2 + d (μ ) dτ + t K t L τ ε,n ε,n h h Y − Y 1 t s +  |t − s| 1 + + t − s 2 n ε,n h ε,n ε ≤ ∂ φ(s, X )(t − s) +Dφ(s, X ), Y − Y  2 + d (μ ) dτ + Dφ(s, X ) 2 t K t s L τ L P P s h ⎛ ⎛ ⎞ ⎞ e − e 1 t s ⎝ ⎝ ⎠ ⎠ +  |t − s| 1 + + . t − s 2 n Dividing by t − s > 0, and recalling the choice of v ,wehave ε,n ε,n h h t Y − Y 1 t ε 0 ≤∂ φ(s, X ) +Dφ(s, X ),  2 + d (μ ) dτ + t K t − s t − s ⎛ ⎛ ⎞ ⎞ 1 1 1 e − e 1 t s ⎝ ⎝ ⎠ ⎠ + · Dφ(s, X ) 2 +  |t − s| 1 + + n t − s t − s t − s 2 n h h ≤∂ φ(s, X ) +Dφ(s, X ), v ◦ X  2 + t ε ε,n + Dφ(s, X ) 2 v ◦ X −ˆ v ◦ X 2 + vˆ ◦ X −ˆ v ◦ Y 2 + ε ε ε ε L L s L P P P ε,n ε,n h h Y − Y ε,n ε,n t ε,n h h h + vˆ ◦ Y − v ◦ Y 2 + − v ◦ Y + ε ε ε s s L s t − s 2 1 1 1 + d (μ ) dτ + · Dφ(s, X ) 2 + t − s n t − s ⎛ ⎛ ⎞ ⎞ 1 e − e 1 t s ⎝ ⎝ ⎠ ⎠ +  |t − s| 1 + + t − s t − s 2 n η 4514 G. Cavagnari et al. J. Evol. Equ. ≤∂ φ(s, X ) + inf Dφ(s, X )(ω), v ◦ X (ω) dP(ω) + + 2 d v∈L (R ) X P v(·)∈F (X P,·) ⎛ ⎞ e − e t s ε,n ⎝ ⎠ + Dφ(s, X ) 2ε + vˆ ◦ X −ˆ v ◦ Y + − v ◦ e + 2 2 ε ε ε s L s L P P t − s 2 1 1 1 1 e − e 1 t s + d (μ ) dτ + · Dφ(s, X ) 2 +  |t − s|(1 + 2 ) + . L L t − s n t − s t − s t − s η n h h By letting h →+∞ and thanks to (6.7), we have 0 ≤∂ φ(s, X ) + inf Dφ(s, X )(ω), v ◦ X (ω) dP(ω) + + 2 d v∈L (R ) X P v(·)∈F (X P,·) ⎛ ⎞ e − e t s ⎝ ⎠ + Dφ(s, X ) 2ε + − v ◦ e + ε s t − s 2 ⎛ ⎛ ⎞ ⎞ 1 1 e − e t s ⎝ ⎝ ⎠ ⎠ + d (μ ) dτ +  |t − s| 1 + . t − s t − s t − s 2 e − e t s By letting t → s and recalling the boundedness of coming from t − s 2 Proposition 3.4,wehave 0 ≤ ∂ φ(s, X ) + inf Dφ(s, X )(ω), v ◦ X (ω) dP(ω) + + 2ε Dφ(s, X ) + d (μ). t K 2 d P v∈L (R ) X P v(·)∈F (X P,·) Finally, letting ε → 0 yields 0 ≤∂ φ(s, X ) + inf Dφ(s, X )(ω), v ◦ X (ω) dP(ω) + d (μ ), t K s 2 d v∈L (R ) X P v(·)∈F (X P,·) viab i.e., in view of Definition 6.1, −∂ φ(s, X ) + H (X, Dφ(s, X )) ≤ 0. The proof of item (2) is omitted since it is a straightforward adaption of the previous argument just provided for item (1). We specify that, in this case, the proofs of the assertions regarding subsolutions and supersolutions are reversed, minimum has to be replaced by maximum and vice versa, the inequality signs are reversed and the signs of the terms involving ρ and ε need to be changed accordingly. We finish the section with our main results: a viscosity characterization of viability (Theorem 6.6) and invariance (Theorem 6.7). Theorem 6.6. (Characterization of viability) Assume ( F ) − ( F ) and let L = Lip(F ) 1 2 viab d and H as in Definition 6.1. Consider a W -closed subset K ⊆ P (R ). The fol- 2 2 lowing are equivalent: Vol. 21 (2021) Compatibility of state constraints 4515 (1) the function z :[0, T]× P (R ) → R, defined by z(t,μ) := d (μ),isa 2 K viscosity supersolution of viab d (L + 2)u(t,μ) + H (μ, D u(t,μ)) = 0, in [0, T ]× P (R ); (6.8) μ 2 (2) there exists T > 0 such that the function w :[0, T ]× P (R ) → R, defined by −(L+1)(t −T ) e − 1 w(t,μ) := d (μ), (6.9) L + 1 is a viscosity supersolution of viab d − ∂ u(t,μ) + H (μ, D u(t,μ)) = 0, in [0, T ]× P (R ); (6.10) t μ 2 (3) K is viable for the dynamics F. Proof. For any T > 0, consider the decreasing function α :[0, T]→ R defined as −(L+1)(t −T ) e − 1 α(t ) = . (6.11) L + 1 We denote by W (t, X ) := w(t, X P) the lift of w(·) according to Definition 5.1(1). Proof of (1 ⇒ 2).Let d be a supersolution to (6.8) (cf. Remark 5.3). Fix t ∈ 2 2 1 [0, T ), μ and X ∈ L ().Let  :[0, T ]× L () → R be a C test function such P P that W −  has a local minimum at (t, X ). We want to prove that viab −∂ (t, X ) + H (X, D(t, X )) ≥ 0. Since s → α(s)d (Y P) = W (s, Y ) is regular for any Y ∈ L (), then by the minimality we should have ∂ (t, X ) = ∂ W (t, X ), i.e. ∂ (t, X ) =˙ α(t )d (X P). s s s K Hence, for all (s, Y ) ∈[0, T ]× L () in a small enough neighborhood I of (t, X ), t,X (s, Y ) = α(s)ϕ(Y ) + g(s, Y ), 1 2 with ϕ ∈ C (L ()) s.t. ϕ(X ) = d (X P), (6.12) 1 2 g ∈ C ([0, T ]× L ()) s.t. ∂ g(t, X ) = 0, and ϕ, g such that W (s, Y ) − (s, Y ) ≥ W (t, X ) − (t, X ), (6.13) by local minimality of (t, X ). By definition of W and (6.13), we get α(s)[d (Y P) − ϕ(Y )]≥ g(s, Y ) − g(t, X ), K 4516 G. Cavagnari et al. J. Evol. Equ. for any (s, Y ) ∈ I . In particular, by choosing s = t, we obtain t,X d (Y P) ≥ ϕ(Y ) + [g(t, Y ) − g(t, X )], α(t ) with equality holding when Y = X. Thus, denoting with  : L () → R the function given by (Y ) := ϕ(Y ) + [g(t, Y ) − g(t, X )], α(t ) 1 2 we notice that  ∈ C (L ()) and that the map Y → d (Y P) −  (Y ) attains t t a local minimum in X. Thus, recalling also Remark 5.3, we can employ  as a test function for d to get viab (L + 2)d (X P) + H (X, D (X )) ≥ 0. (6.14) K t Notice that by (6.12), ∂ (t, X ) =˙ α(t )d (X P) =−[(L + 1)α(t ) + 1]d (X P), K K (6.15) D(t, X ) = α(t )Dϕ(X ) + Dg(t, X ) = α(t )D (X ). viab Recalling the definition of the lifted Hamiltonian H ,by(6.14) we obtain viab 0 ≤ (L + 2)d (X P) + H X, D(t, X ) α(t ) = (L + 2)d (X P) − d (X P) − inf v(ω), D(t, X )(ω) dP(ω). K K α(t ) v∈L () v(·)∈F (X P,X (·)) Multiplying by α(t ), we finally get viab [(L + 1)α(t ) + 1]d (X P) + H (X, D(t, X )) ≥ 0, thus viab −∂ (t, X ) + H (X, D(t, X )) ≥ 0, which concludes that w is a supersolution of (6.10). Proof of (2 ⇒ 3).Let T > 0 and assume that w(t,μ) = α(t )d (μ) is a viscosity viab supersolution of (6.10). We recall that H , given in Definition 6.1, satisfies the assumptions of Theorem 5.4 as proved in Lemma 6.3. In particular, if we denote by viab U (t, X ) := V (t, X P) the lift of the value function of Definition 4.1,wehave W (T , X ) = U (T , X ) = 0, for every X ∈ L (). viab Therefore, since both w and V are uniformly continuous (see Proposition 4.6), by Theorem 5.4 and Proposition 6.5,wehave U (t, X ) ≤ W (t, X ) for all (t, X ) ∈ Vol. 21 (2021) Compatibility of state constraints 4517 2 2 [0, T ]× L (). Thus, for all μ ∈ K and all X ∈ L () with X P = μ we obtain P P viab V (t,μ) = U (t, X ) = W (t, X ) = 0 for all t ∈[0, T ]. By Proposition 4.3,we conclude that there exists an admissible trajectory starting from μ and defined on [0, T ], which is entirely contained in K .So K is viable. Proof of (3 ⇒ 1). Assume that K is viable. Set d (Y ) := d (Y P) for all K K 2 1 2 2 Y ∈ L (), i.e., d is the lift of d .Let φ ∈ C (L ()) and X ∈ L () be such K K P P P that d − φ has a local minimum at X, and set μ = X P ∈ P (R ). ε ε ε For any ε> 0 and T > 0, there exist μ ¯ ∈ K , and μ ¯ ∈ A (μ ¯ ) satisfying [0,T ] ε ε W (μ, μ ¯ ) ≤ d (μ) + ε and μ ¯ ⊆ K . By Grönwall’s inequality (Lemma 3.3), there ε ε d ε ε exists μ ∈ A (μ), η ∈ P(R ×  ) such that μ = e η , and [0,T ] [0,T ] t Lt Lt ε ε ε Lt +te ε Lt +te d (μ ) ≤ W (μ , μ ¯ ) ≤ e · W (μ, μ ¯ ) ≤ e · (d (μ) + ε), K 2 2 K t t t for all t ∈[0, T ]. According to Corollary A.3 applied to μ ,set ε ε (  t ) := W (μ ,μ ) + e − e 2 dτ, 2 τ 0 τ 0 L ε 2 ε ε there exists a family {Y } ⊆ L () satisfying Y P = μ for all t ∈[0, T ] and t ∈[0,T ] t P t t ε ε Y − Y p,  2 ≥ inf p(ω), v dP(ω) − ((  t ) + Lε) p 2 L L P P t v∈F (X P,X (ω)) viab =− d (X P) − H (X, p) − ((  t ) + Lε) p 2 K F 2 ε for any p ∈ L () (recall that μ = μ = X P = Y P). According to the choice of P 0 X,wehave ε ε ε ˆ ˆ d (μ ) − d (μ) d (Y ) − d (X ) φ(Y ) − φ(X ) K K K K t t t = ≥ . (6.16) t t t We estimate the first term as follows Lt ε ε ε ε Lt +te d (μ ) − d (μ) W (μ , μ ¯ ) − W (μ, μ ¯ ) ε e − 1 ε K K 2 2 t t t ε ≤ + ≤ · W (μ, μ ¯ ) + t t t t t Lt Lt +te e − 1 ε ≤ · (d (X P) + ε) + . t t 4518 G. Cavagnari et al. J. Evol. Equ. Concerning the right hand side of (6.16), we have that there exists a continuous increasing map  :[0, +∞) →[0, +∞) with (r )/r → 0as r → 0 such that ε ε ( Y − X 2 + t ) φ(Y ) − φ(X ) Y − X t t t P ≥Dφ(X ),  − t t t ε ε X − Y 2 Y − Y 0 L t 0 P ≥Dφ(X ),  2 − Dφ(X ) 2 · + L L P P t t ε ε ε − ( Y − Y 2 + Y − X 2 + t ) t 0 L 0 L P P ε ε ( e − e 2 + t + ε) t 0 Y − Y ε ε t η ≥Dφ(X ),  2 − Dφ(X ) 2 − L L P P t t t viab ≥−d (X P) − H (X, Dφ(X )) − (  t ) + Lε + Dφ(X ) 2 + e −e t 0 t 2 + 1 + ε t L − , where in the third inequality we employed the definition of Y provided in the proof of ε d Corollary A.3, i.e., Y = e ◦ W for any t ∈[0, T ],for some W :  → R × t ε ε [0,T ] e −e t 0 s.t. W P = η . Recalling now the uniform boundedness in ε of 2 coming t L + + from Proposition 3.4(3), by letting ε → 0 and t → 0 , and by setting φ(Y ) − φ(X ) := lim inf lim inf , + + t →0 ε→0 t we have viab −d (X P) − H (X, Dφ(X )) ≤  ≤(L + 1) · d (X P). K K viab This leads to (L +2)d (X P)+H (X, Dφ(X )) ≥ 0, i.e., d (μ) is a supersolution K K of (6.8). Theorem 6.7. (Characterization of invariance) Assume ( F ) − ( F ) and let L = 1 2 inv d Lip(F ) and H as in Definition 6.2. Consider a W -closed subset K ⊆ P (R ). 2 2 The following is equivalent: (1) the function z :[0, T]× P (R ) → R, defined by z(t,μ) := d (μ),isa 2 K viscosity supersolution of inv d (L + 2)u(t,μ) + H (μ, D u(t,μ)) = 0 in [0, T ]× P (R ); (6.17) μ 2 (2) there exists T > 0 such that the function w :[0, T ]× P (R ) → R, defined by (6.9), is a viscosity supersolution of inv d − ∂ u(t,μ) + H (μ, D u(t,μ)) = 0 in [0, T ]× P (R ); (6.18) t μ 2 (3) K is invariant for the dynamics F. Vol. 21 (2021) Compatibility of state constraints 4519 Proof. For any T > 0, consider the decreasing function α :[0, T]→ R defined as in (6.11). We denote by W (t, X ) := w(t, X P) the lift of w(·) defined in (6.9) according to Definition 5.1(1). Proof of (1 ⇒ 2). This part of the proof is the same as the one developed in Theorem inv viab 6.6 with H in place of H . F F viab inv Proof of (2 ⇒ 3). Same as in Theorem 6.6, with V replaced by V . Proof of (3 ⇒ 1). Assume that K is invariant. Set d (Y ) = d (Y P) for all K K 2 2 2 Y ∈ L (), i.e., d is the lift of d .Let φ ∈ C (L ()) and X ∈ L () be such K K P P P that d − φ has a local minimum at X, and set μ = X P ∈ P (R ). K 2 2 d d Fix ε> 0, and let v ∈ L (R ) be such that v (x ) ∈ F (μ, x ) for μ-a.e. x ∈ R ε ε and Dφ(X )(ω), v ◦ X (ω) dP(ω) ≥ sup Dφ(X )(ω), v ◦ X (ω) dP(ω) − . 2 d v∈L (R ) X P v(·)∈F (X P,·) By Remark 6.4, we can suppose that v ∈ C , and by Lemma A.4 there exists an ε ε ε ε admissible trajectory μ ={μ } defined on [0, T ] with μ = μ, and η ∈ t ∈[0,T ] t s d ε ε P(R ×  ) such that e η = μ for all t ∈[0, T ] and [0,T ] t e − e t 0 lim − v ◦ e = 0. ε 0 t 2 t →0 0 d By density, we can find v ˆ ∈ C (R ) such that v −ˆ v 2 ≤ ε. ε ε ε d ε Denote by V :  → R ×  a Borel map satisfying η = V P. Recalling ε [0,T ] ε Lemma A.2, since for all ε> 0we have μ = μ = e η = (e ◦ V )P = X P,we 0 0 ε can find a sequence of measure-preserving Borel maps {r (·)} such that n∈N P ω ∈  :|X (ω) − e ◦ V ◦ r (ω)|≤ = 1, 0 ε ε,n ε,n ε ε and we set Y = e ◦ V ◦ r for all t ∈[0, T ]. In particular, Y P = μ for all t ε t t n t t ∈[0, T ]. We then have ε,n ε,n Y − Y e − e t 0 t ε,n lim − v ◦ Y = lim − v ◦ e = 0. ε ε 0 + + t →0 t 2 t →0 t 2 L L Recalling the choice of v ˆ ,wehavealso ε,n ε,n v ◦ X −ˆ v ◦ X 2 = v ◦ Y −ˆ v ◦ Y 2 = v −ˆ v 2 ≤ ε. ε ε ε ε ε ε L 0 0 L L P P ε,n ε,n 1 h Since, by Lemma A.2, Y − X 2 ≤ , we can find a subsequence {Y } h∈N 0 L n 0 ε,n such that for P-a.e. ω ∈  it holds lim Y (ω) = X (ω). Therefore, h→+∞ ε,n h 2 lim |ˆ v ◦ Y (ω) −ˆ v ◦ X (ω)| dP(ω) = 0, (6.19) ε ε h→+∞ 4520 G. Cavagnari et al. J. Evol. Equ. where we used the Dominated Convergence Theorem to pass to the limit under the integral sign, exploiting the global boundedness of v ˆ . n n h h Now, let μ ¯ ∈ K such that W (μ, μ ¯ ) ≤ d (μ)+ . By Grönwall’s inequality 2 K ε ε,n n h h (Lemma 3.3), given μ as before there exist μ ¯ ∈ A (μ ¯ ) such that [0,T ] Lt Lt 1 ε ε ε,n Lt +te n Lt +te d (μ ) ≤ W (μ , μ ¯ ) ≤ e · W (μ, μ ¯ ) ≤ e · d (μ) + , 2 2 K t t t K ε,n for all t ∈[0, T ], where we used the fact that μ ¯ ⊆ K by invariance of the set K ε,n and since μ ¯ =¯ μ ∈ K . According to the choice of X,wehave ε,n ε,n ε h h ˆ ˆ d (μ ) − d (μ) d (Y ) − d (X ) φ(Y ) − φ(X ) K t K K t K t = ≥ . (6.20) t t t We estimate the first term as follows ε,n ε ε h n d (μ ) − d (μ) W (μ , μ ¯ ) − W (μ, μ ¯ ) 1 1 K K 2 2 t t t ≤ + · t t n t Lt Lt Lt +te Lt +te e − 1 1 1 e − 1 1 1 1 ≤ · W (μ, μ ¯ ) + · ≤ · d (X μ) + + · . 2 K t n t t n n t h h h (6.21) Concerning the right hand side of (6.20), we have that there exists a continuous increasing map  :[0, +∞) →[0, +∞) with (r )/r → 0as r → 0 such that ε,n ε,n ε,n h h ( Y − X + t ) φ(Y ) − φ(X ) Y − X t L t t P ≥Dφ(X ),  − t t t ε,n ε,n ε,n h h X − Y 2 Y − Y 0 L 0 P ≥Dφ(X ),  2 − Dφ(X ) 2 · + L L P P t t ε,n ε,n ε,n h h h − ( Y − Y 2 + Y − X 2 + t ) 0 L 0 L P P ε,n ε,n h h Y − Y 1 1 t 0 ≥Dφ(X ),  − · Dφ(X ) + 2 2 L L P P t n t e − e 2 + t + t 0 − . t Vol. 21 (2021) Compatibility of state constraints 4521 Recalling the choice of v ,wehave ε,n φ(Y ) − φ(X ) ≥Dφ(X ), v ◦ X  2 + ε,n − Dφ(X ) 2 v ◦ X −ˆ v ◦ X 2 + vˆ ◦ X −ˆ v ◦ Y 2 + ε ε ε ε L L 0 L P P P ε,n ε,n h h Y − Y ε,n ε,n t ε,n h h 0 h + vˆ ◦ Y − v ◦ Y 2 + − v ◦ Y + ε ε ε 0 0 L 0 t 2 1 1 1 e − e 1 t 0 − · Dφ(X ) 2 −  t 1 + + n t t t 2 n h h ≥ sup Dφ(X )(ω), v ◦ X (ω) dP(ω) − + 2 d v∈L (R ) X P v(·)∈F (X P,·) e − e t 0 ε,n − Dφ(X ) 2 2ε + vˆ ◦ X −ˆ v ◦ Y 2 + − v ◦ e + ε ε ε 0 L 0 L P P t 2 1 1 1 e − e 1 t 0 − · Dφ(X ) −  t 1 + + . n t t t 2 n h h e −e t 0 Recalling now the uniform boundedness in ε of 2 coming from Proposition t ε + + 3.4(3), by letting h →+∞, t → 0 and ε → 0 , and by setting ε,n φ(Y ) − φ(X ) := lim inf lim inf lim inf , + + ε→0 t →0 h→+∞ t we have, thanks also to (6.19), inv ≥ sup Dφ(X )(ω), v ◦ X (ω) dP(ω) =−d (X P) − H (X, Dφ(X )). K F 2 d v∈L (R ) X P v(·)∈F (X P,·) (6.22) Thus, by passing to the limit also in (6.21) and combining that estimate with (6.22), we get inv −d (X P) − H (X, Dφ(X )) ≤  ≤ (L + 1) · d (X P). K K inv This leads to (L +2)d (X P)+ H (X, Dφ(X )) ≥ 0, i.e., d (μ) is a supersolution K K of (6.17) (cf. Remark 5.3). 7. An example d d Given μ ∈ P (R ), x ∈ R , u ∈ R,let U =[1/2, 3/2], U =[−3/2, 3/2] and d d d define the functions f, g : P (R ) × R × R → R as 1/2 −|x | f (μ, x , u) := u arctan(1 − m (μ))e x , g(μ, x , u) :=πux . 2 4522 G. Cavagnari et al. J. Evol. Equ. d d d Define the set-valued maps F, G : P (R ) × R ⇒ R as F (μ, x ) := { f (μ, x , u) : u ∈ U } , G(μ, x ) := g(μ, x , u) : u ∈ U , and the closed set K := {μ ∈ P (R ) : m (μ) ≤ 1}={X P : X 2 ≤ 1}. 2 2 L () Notice that F, G satisfy the assumptions ( F ) − ( F ) and G(μ, x ) ⊇ F (μ, x ).In 1 2 particular, −|X (ω)| F (X P, X (ω)) = λ arctan(1 − X )e X (ω) : λ ∈[1/2, 3/2] . We have 1/2 m (μ) − 1, if μ/ ∈ K , d (μ) = 0, if μ ∈ K . 1/2 Indeed, to prove that d (μ) ≤ m (μ) − 1 for all μ/ ∈ K ,takea W -geodesic K 2 1/2 {ξ } 1/2 with constant speed joining δ to μ/ ∈ K .Wehavem (ξ ) = t 0 1 t ∈[0,m (μ)] W (δ ,ξ ) = 1, and W (μ, δ ) = W (μ, ξ ) + 1. So ξ ∈ K and d (μ) ≤ 2 0 1 2 0 2 1 1 1/2 m (μ) − 1. Conversely, fix ε> 0 and let μ ∈ K be such that d (μ) ≥ W (μ, μ ) − ε. Then, recalling that W (μ ,δ ) ≤ 1, we have 2 ε 2 ε 0 1/2 d (μ) + 1 ≥ W (μ, μ ) + W (μ ,δ ) − ε ≥ W (μ, δ ) − ε = m (μ) − ε. 2 ε 2 ε 0 2 0 By letting ε → 0 , we have the desired inequality. The lift of d (·) is the convex function U : L () → R defined as X 2 − 1, if X 2 ≥ 1, L L ˆ P P U (X ) = 0, otherwise. 1 2 The function U (·) is C in the open set D := {X ∈ L : X 2 = 1}.Thus,if P L 1 2 ψ ∈ C (L ()) is such that U − ψ attains a local minimum at X ∈ D then 0, if X 2 < 1, Dψ(X ) = DU (X ) = ⎪ , if X 2 > 1. ⎩ L 1 2 2 Let ψ ∈ C (L ) such that U −ψ attains a local minimum at X ∈ L with X 2 = 1. P P L By Propositions 1.2 and 1.5 in [17], we have that 2 2 ˆ ˆ ˆ Dψ(X ) ∈ ∂U (X ) := ξ ∈ L () : U (Y ) − U (X ) ≥ξ, Y − X  2 , ∀ Y ∈ L . P L P P Vol. 21 (2021) Compatibility of state constraints 4523 ˆ ˆ Conversely, given ξ ∈ ∂U (X ),set ψ(Y ) = U (X ) +ξ, Y − X  2 . Then, ψ ∈ C , U − ψ has a minimum at X, and Dψ(X ) = ξ. We want to prove that if X 2 = 1, then ∂U (X ) ={λX : λ ∈[0, 1]}. We prove ⊇.Given X, Y ∈ L with X = 1, and λ ∈[0, 1], it holds ˆ ˆ Y 2 − 1 = U (Y ) − U (X ), if Y 2 ≥ 1, L L P P λX, Y − X  2 ≤ λ( Y 2 − 1) ≤ L L P P ⎩ ˆ ˆ 0 = U (Y ) − U (X ), if Y < 1. ˆ ˆ Thus, in any case λX, Y − X  ≤ U (Y ) − U (X ), proving ⊇. Conversely, we prove ⊆.Let X ∈ L (), X 2 = 1, so U (X ) = 0. Assume that P L ˆ ˆ ˆ ξ = λX + λZ ∈ ∂U (X ), with Z 2 = 1, Z , X  2 = 0 and λ, λ ∈ R. We want to L L P P prove that λ ∈[0, 1] and λ = 0. Indeed, for all Y ∈ L () it holds ˆ ˆ ˆ ˆ U (Y ) − U (X ) ≥ξ, Y − X  2 =λX +λZ , Y − X  2 = λY, Z+ λ(Y, X  2 − 1). L L L P P P 2 2 By taking Y = aX + bZ,wehave U (Y ) = max{0, |a| +|b| − 1}, and so 2 2 max{0, |a| +|b| − 1}≥ bλ + λ(a − 1). • Choosing (a, b) = (2, 0) leads to λ ≤ 1. Choosing (a, b) = (1/2, 0) leads to λ ≥ 0. Therefore, 0 ≤ λ ≤ 1. 1 + b − 1 • Choose a = 1. Then for all b > 0, we have ≥ λ, and by passing to 1 + b − 1 ˆ ˆ the limit as b → 0 we have 0 ≥ λ. For all b < 0, we have ≤ λ, ˆ ˆ and by passing to the limit as b → 0 we have 0 ≤ λ. Therefore, λ = 0. We prove now that K is invariant for the dynamics F. Thanks to Theorem 6.7,we 1 2 have to prove that for every ψ ∈ C (L ) such that U − ψ attains a local minimum at X ∈ L it holds inv (L + 2)d (X P) + H (X, Dψ(X )) ≥ 0. We distinguish two cases • when X < 1, we have d (X P) = 0 and Dψ(X ) = 0, which implies inv H (X, Dψ(X )) = 0, so the equation is trivially satisfied. • when X 2 ≥ 1, we have d (X P) = X 2 − 1 and Dψ(X ) = λ , L L P P X 2 with λ = 1if X 2 > 1, and λ ∈[0, 1] otherwise, which implies 1 2 inv −|X (ω)| 2 H (X, Dψ(X )) =1 − X 2 − λ arctan(1 − X 2 )e |X (ω)| dP(ω) F L L P P ≥1 − X 2 , P 4524 G. Cavagnari et al. J. Evol. Equ. So, also in this case, we have inv (L + 2)d (X P) + H (X, Dψ(X )) ≥ (L + 2)( X − 1) + 1 − X ≥ 0, 2 2 L L P P from which we get the invariance, and thus the viability, of the set K for the dynamics F. Since all the admissible trajectories for F are also admissible for G,wehavethat K is viable for G. We prove now that K is not invariant for G. Indeed, take X ∈ L () 1 2 with X 2 = 1. Then, we can consider ψ ∈ C (L ()) s.t. ψ(Y ) = Y 2 in a L L P P neighborhood V of X.Given Y ∈ V,wehave U (Y ) − ψ(Y ) =−1if Y 2 ≥ 1 and ˆ ˆ U (Y ) − ψ(Y ) =− Y 2 ≥−1if Y 2 < 1. In particular, U (X ) − ψ(X ) =−1, L L P P so U − ψ attains in V a minimum at X, and Dψ(X ) = X. Set inv H (Y, Dψ(Y )) =−d (Y P) − sup v(ω), Dψ(Y )(ω) dP(ω), v∈L () v(·)∈G(Y P,Y (·)) we obtain (recalling that X 2 = 1) 3 3 inv H (X, Dψ(X )) =− π X, X  dP(ω) =− π. 2 2 Thus, inv (L + 2)d (X P) + H (X, Dψ(X )) =− π< 0, and therefore U (·) is not a supersolution of the invariance equation. On the other hand, set (see Definition 6.1) viab H (Y, Q) =−d (Y P) − inf v(ω), Q(ω) dP(ω). v∈L () v(·)∈G(Y P,Y (·)) For every v ∈ L () with v(·) ∈ F (Y P, Y (·)) ⊆ G(Y P, Y (·)), it holds viab H (Y, Q) ≥−d (Y P) − v(ω), Q(ω) dP(ω), and by taking the supremum in the right-hand side over the set {v ∈ L () : v(·) ∈ F (Y P, Y (·))}, we obtain viab inv H (Y, Q) ≥ H (Y, Q), G F 1 2 and therefore for every ψ ∈ C (L ) such that U − ψ attains a local minimum at X ∈ L it holds viab inv (L + 2)d (X P) + H (X, Dψ(X )) ≥ (L + 2)d (X P) + H (X, Dψ(X )) ≥ 0. K K G F Thus, K is viable for G, as already noticed. Vol. 21 (2021) Compatibility of state constraints 4525 Acknowledgements G.C. thanks LMBA, Univ Brest, where this research started. G.C. is also indebted to the University of Pavia where this research has been partially carried out, in particular G.C. has been supported by Cariplo Foundation and Regione Lombardia via project Varia- tional Evolution Problems and Optimal Transport, and by MIUR PRIN 2015 project Calculus of Variations, together with FAR funds of the Department of Mathematics of the University of Pavia. G.C. thanks also the support of the INdAM-GNAMPA Project 2019 Optimal transport for dynamics with interaction (“Trasporto ottimo per dinamiche con interazione”). M.Q. benefited from the support of the FMJH Program Gaspard Monge in optimization and operation research (PGMO 2016-1570H) and of the Air Force Office of Scientific Research under Award Number FA9550-18-1-0254. Funding Open access funding provided by Politecnico di Milano within the CRUI- CARE Agreement. Open Access. This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/ by/4.0/. Publisher’s Note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. Appendix A: Essential technical results Here, we report the proofs of the preliminary results presented in Sect. 3 as well as other technical results which have been significantly used in order to prove the main propositions and theorems of the present paper. In our opinion, these results could also be interesting by themselves. A.1: Proof of Proposition 3.4 Let μ ={μ } be an admissible trajectory defined in [a, b]. According to t t ∈[a,b] the superposition principle (Theorem 8.2.1 in [2] or Theorem 1 in [16]), there exists η ∈ P(R ×  ) such that μ = e η for all t ∈[a, b] and, for η-a.e. (x,γ ), [a,b] t t γ( ˙ t ) ∈ F (μ ,γ (t )), γ(a) = x. t 4526 G. Cavagnari et al. J. Evol. Equ. Set |F (μ , x )|= max{|y|: y ∈ F (μ , x )}.For η-a.e. (x,γ ) ∈ R ×  ,we s s [a,b] have t t |γ(t ) − γ(s)|≤ |˙ γ(τ)| dτ ≤ |F (μ ,γ (s))|+ LW (μ ,μ ) + L|γ(τ) − γ(s)| dτ s 2 τ s s s t t 1/2 ≤ (t − s)(K + Lm (μ ) + L|γ(s)|) + L W (μ ,μ ) dτ + L |γ(τ) − γ(s)| dτ. s τ s s s Grönwall’s inequality yields |(e − e )(x,γ )|=|γ(t ) − γ(s)|≤ g(t, s, |γ(s)|), t s where 1/2 L(t −s) g(t, s, r ) := e (t − s)(K + Lm (μ ) + Lr ) + L W (μ ,μ ) dτ . s 2 τ s 1/2 By taking the L -norm, e − e ≤ g(t, s, m (μ )), and so t s s η L 1/2 e − e g(t, s, m (μ )) t s ≤ . t − s t − s 1/2 By continuity, the right-hand side tends to K + 2Lm (μ ) as t → s , and so e − e t s t → is uniformly bounded in L in a right neighborhood of s. t − s d d Let p ∈ R , t ∈]s, b].For η-a.e. (x,γ ) ∈ R ×  , reasoning as in the first part [a,b] of the proof of Lemma 6.3,wehave t t e − e 1 1 t s p, (x,γ )= p, γ( ˙ τ) dτ ≤ sup p,v dτ t − s t − s t − s s s v∈F (μ ,γ (τ )) ≤ sup p,v+| p|· W (μ ,μ ) +|γ(τ) − γ(s)| dτ. 2 τ s t − s v∈F (μ ,γ (s)) s Therefore, e − e t s (x,γ ) ∈ F (μ ,γ (s)) t − s + W (μ ,μ ) +|(e − e )(x,γ )| dτ · B(0, 1). 2 τ s τ s t − s By Filippov’s theorem (Theorem 8.2.10 in [4]), there exists a Borel map w : R × d d → R , satisfying w(x,γ ) ∈ F (μ ,γ (s)) for η-a.e. (x,γ ) ∈ R ×  such [a,b] s [a,b] that e − e L t s (x,γ ) − w(x,γ ) ≤ W (μ ,μ ) +|(e − e )(x,γ )| dτ. 2 τ s τ s t − s t − s Thus, e − e L t s 1/2 − w ≤ W (μ ,μ ) + g(τ, s, m (μ )) dτ. 2 τ s s t − s t − s η Vol. 21 (2021) Compatibility of state constraints 4527 7.1. A.2: Proof of Proposition 3.5 For a proof of the nonemptiness of the set A (μ), we refer the reader to Theorem [a,b] 1in[16], where the authors perform a fixed point argument. (n) Let {μ } ⊆ A (μ ). By Proposition 3.4(2), for any n ∈ N there exists n∈N [a,b] 0 (n) (n) d (n) η ∈ P(R ×  ) such that e η = μ for all t ∈[a, b]. Moreover, for [a,b] t s ∈[a, b] with s < t,wehave 1/2 L(t −s) (n) e − e ≤e (t − s)(K + 2Lm (μ ))+ t s L s (n) (n) (n) +L W (μ ,μ ) dτ =: h(t, s). τ s (n) (n) Notice that W (μ ,μ ) ≤ e − e 2 . Indeed, it suffices to consider the admis- 2 s t s (n) (n) (n) (n) sible plan σ := (e , e )η ∈ (μ ,μ ). Thus, t s s (n) (n) W (μ ,μ ) ≤ h(t, s), t s and Grönwall’s inequality yields L(t −s) (n) 1/2 (n) L(t −s)(1+e ) (n) W (μ ,μ ) ≤ e (t − s)(K + 2Lm (μ )). (A.1) t s s By taking s = a, there exists C > 0 such that (n) 1/2 W (μ ,μ ) ≤ C (1 + m (μ )) for any t ∈[a, b], 2 0 0 (n) and since m (μ )< +∞, then we obtain uniform boundedness of {μ } . 2 0 n∈N 1/2 Moreover, by the triangle inequality and by recalling that m (μ) = W (μ, δ ) by 2 0 definition, we get for any s ∈[a, b] 1/2 1/2 1/2 (n) (n) m (μ ) ≤ W (μ ,μ ) + m (μ ) ≤ (1 + C )(1 + m (μ )). (A.2) 2 0 0 0 2 s s 2 2 Thus, combining the previous estimate with (A.1), there exists K > 0 such that (n) (n) W (μ ,μ ) ≤ K (t − s), 2 t (n) and hence μ are continuous for any n ∈ N, with uniformly bounded Lipschitz con- stants. By the Ascoli–Arzelà Theorem, we conclude that, up to an unrelabeled sub- sequence, there exists μ ={μ } ∈ AC([a, b]; P (R )) such that sup W t t ∈[a,b] 2 2 t ∈[a,b] (n) (μ ,μ ) → 0as n →+∞. We now prove the admissibility of μ. Notice that, by (3.1) and (A.2), we have 1/2 (n) sup |x|+|γ(a)|+ γ˙ dη (x,γ ) ≤ C m (μ ) + C , L ([a,b]) 0 n∈N R × [a,b] (A.3) 4528 G. Cavagnari et al. J. Evol. Equ. for some constants C , C > 0. Moreover, the map |x|+|γ(a)|+ γ˙ ∞ , if γ ∈ Lip([a, b]), L ([a,b]) (x,γ ) → +∞, otherwise, has compact sublevels in R ×  . Thus, by Remark 5.1.5 in [2], there exists [a,b] d (n) η ∈ P(R ×  ) such that η narrowly converges to η, up to (unrelabeled) [a,b] subsequences. By Proposition 5.1.8 in [2], for any (x,γ ) ∈ supp η there exists (n) d {(x ,γ )} ⊆ supp η s.t. x → x, γ ⇒ γ ∈ C ([a, b]; R ). n n n∈N n n Claim: if (x,γ ) ∈ supp η, then γ is a Lipschitz continuous solution of γ( ˙ t ) ∈ F (μ ,γ (t )), for a.e. t ∈[a, b], (A.4) γ(a) = x . (n) Indeed, let N := N ⊆[a, b], where n∈N (n) (n) N := {s ∈[a, b]: γ˙ (s) or γ˙ (s) ∈ F (μ ,γ (s))}. n n n (n) Notice that for any n ∈ N, N is a negligible set w.r.t. the Lebesgue’s measure, hence (n) so is N.Take t ∈[a, b]\ N . By Proposition 3.4, we have that γ˙ (t ) ∈ F (μ ,γ (t )), n n and by assumption ( F ), for any ε> 0 there exists n ¯ s.t. for any n ≥¯n (n) γ˙ (t ) ∈ F (μ ,γ (t )) ⊆ F (μ ,γ (t )) + εB(0, R). n n t In particular, by continuity of t → F (μ ,γ (t )) in [a, b] we have that {˙ γ (t )} is t n n∈N uniformly bounded for a.e. t ∈[a, b]. Hence, γ are continuous for any n ∈ N, with uniformly bounded Lipschitz constants, and {γ } is uniformly bounded. By the n n∈N Ascoli–Arzelà Theorem, we get that γ is a Lipschitz curve. We now prove that γ solves (A.4). Take any v ∈ R , and denote by σ (v) := sup v, z the support function of A ⊆ R at v. For any a ≤ s < t ≤ b,wehave z∈A t t γ (t ) − γ (s) 1 1 n n v, = v, γ˙ (τ ) dτ ≤ σ (n) (v) dτ F (μ ,γ (τ )) t − s t − s t − s τ s s (n) ≤ σ (v) + L|v| W (μ ,μ ) +|γ (τ ) − γ(τ)| dτ, F (μ ,γ (τ )) 2 τ τ n t − s where we used the Lipschitz continuity of F coming from ( F ). By uniform in time convergence, passing to the limit as n →+∞,wehave γ(t ) − γ(s) 1 v, ≤ σ (v) dτ F (μ ,γ (τ )) t − s t − s & ' ≤ σ (v) + L|v| W (μ ,μ ) +|γ(τ) − γ(s)| dτ. F (μ ,γ (s)) 2 τ s t − s Thus, for a.e. s, passing to the limit as t → s, we get v, γ( ˙ s)≤ σ (v) for F (μ ,γ (s)) any v ∈ R , whence γ( ˙ s) ∈ F (μ ,γ (s)) as claimed. s Vol. 21 (2021) Compatibility of state constraints 4529 Observe that, by continuity of e and uniqueness of the narrow limit, we have that (n) (n) μ = e η narrowly converges to μ = e η for any t ∈[a, b], up to subsequences t t t (see Lemma 5.2.1 in [2]). The rest of the proof is an adaptation of the proof of Theorem 1in[13]. In order to conclude the admissibility of μ, we notice that t → μ is a Lipschitz continuous map, indeed 2 2 W (μ ,μ ) ≤ |x − y| d(e , e )η t s t s d d R ×R 2 2 = |γ(t ) − γ(s)| dη(x,γ ) ≤ C |t − s| , [a,b] by Lipschitz continuity of γ in the support of η. According to Theorem 3.5 in [3], the 1 d map t → μ is differentiable almost everywhere in [a, b], and for all ϕ ∈ C (R ) d d ϕ(x ) dμ (x ) = ϕ(γ (t )) dη(x,γ ) = d d dt dt R R ∇ϕ(γ (t )) ·˙ γ(t ) dη(x,γ ) = ∇ϕ(y) γ( ˙ t ) dη (x,γ ) dμ (y), t,y t −1 d d R × R e (y) [a,b] where {η } ⊆ P(R ×  ) is the disintegration of η w.r.t. the evaluation t,y [a,b] y∈R operator e , i.e., η = μ ⊗ η . Finally, notice that the vector field t t t,y v (y) := γ( ˙ t ) dη (x,γ ) t t,y −1 e (y) is well-defined for a.e. t ∈[a, b] and μ -a.e. y ∈ R , moreover, by convexity of F (μ , y), we can use Jensen’s inequality to get that v (y) ∈ F (μ , y) for a.e. t and t t t μ -a.e. y. Hence the conclusion. 7.2. A.3: Technical results Corollary A.1. Assume ( F ) − ( F ). Let μ ={μ } be an admissible trajectory, 1 2 t t ∈[a,b] with 0 ≤ a < b < +∞. Then, there exists a family of random variables {X } ⊆ t t ∈[a,b] L () such that X P = μ for all t ∈[a, b], and t t X − X L t s (ω) ∈ F (X P, X (ω)) + [W (μ ,μ ) +|X (ω) − X (ω)|] dτ · B(0, 1), s s 2 τ s τ s t − s t − s 1/2 L(t −s) X − X 2 ≤ e (t − s)(K + 2Lm (μ )) + L W (μ ,μ ) dτ , t s s 2 τ s L 2 for all t, s ∈[a, b], with s < t. In particular, for every p(·) ∈ L () we have X − X t s lim infp,  ≥ inf p(ω), v dP(ω), (A.5) + P v∈F (X P,X (ω)) t →s t − s s s X − X t s lim supp,  2 ≤ sup p(ω), v dP(ω). (A.6) + t − s t →s  v∈F (X P,X (ω)) s s 4530 G. Cavagnari et al. J. Evol. Equ. Proof. Let μ ={μ } be an admissible trajectory defined in [a, b], and η ∈ t t ∈[a,b] P(R ×  ) be as in Proposition 3.4, with μ = e η for t ∈[a, b]. In particular, [a,b] t t see, e.g., Lemma 5.29 in [11], there exists a Borel map V :  → R × [a,b] such that η = V P, and thus μ = X P for all t ∈[a, b], where X = e ◦ V . t t t t Evaluating the estimates obtained in Proposition 3.4 for (x,γ ) = V (ω), and recalling that X = e ◦ V , X = e ◦ V , we obtain t t s s X − X t s (ω) ∈ F (X P, X (ω))+ s s t − s + [W (μ ,μ ) +|X (ω) − X (ω)|] dτ · B(0, 1), 2 τ s τ s t − s 1/2 L(t −s) X − X 2 ≤ e (t − s)(K + 2Lm (μ )) + L W (μ ,μ ) dτ . t s s 2 τ s L 2 Thus, for every p(·) ∈ L (),wehave X − X X − X t s t s p,  2 = p(ω), (ω) dP(ω) t − s t − s ≥ inf p(ω), v dP(ω)+ v∈F (X P,X (ω)) s s − | p(ω)| [W (μ ,μ ) +|X (ω) − X (ω)|] dτ dP(ω) (A.7) 2 τ s τ s t − s ≥ inf p(ω), v dP(ω)+ v∈F (X P,X (ω)) s s − p · W (μ ,μ ) + X − X dτ. 2 2 2 τ s τ s L L P P t − s By taking the liminf as t → s , and using the estimate on X − X 2 , we obtain τ s X − X t s lim infp,  ≥ inf p(ω), v dP(ω). + P t − s v∈F (X P,X (ω)) t →s s s In the same way, we prove the inequality for the limsup. We recall the following well-known result, used to prove Corollary A.3. Lemma A.2. (Lemma 5.23 p. 379 in [11]) Let P be an atomless Borel probability 2 d measure on ,X, Y ∈ L (; R ) two random variables with the same law, i.e., −1 X P = Y P. Then for any ε> 0, there exist two Borel measurable maps r, r : →  such that −1 −1 • r and r are measure-preserving, i.e., r P = r P = P; −1 −1 • P({ω ∈  : r ◦ r (ω) = r ◦ r (ω) = ω}) = 1; • P({ω ∈  :|X (ω) − Y ◦ r (ω)|≤ ε}) = 1. In particular, we have X − Y ◦ r 2 ≤ ε. P Vol. 21 (2021) Compatibility of state constraints 4531 Corollary A.3. Assume ( F ) − ( F ). Let μ ={μ } be an admissible trajectory, 1 2 t t ∈[a,b] 2 d and X ∈ L () such that X P = μ . Let η ∈ P(R ×  ) such that μ = e η a [a,b] t t for any t ∈[a, b]. Then, for every ε> 0 there exists a family of random variables {Y } ⊆ L () such that t t ∈[a,b] (1) Y P = μ for all t ∈[a, b]; t t (2) Y − X ≤ ε, and so it holds Y − X ≤ Y − Y + ε; 2 2 2 a t t a L L L P P P (3) for every t ∈[a, b] and for every p(·) ∈ L () we have Y − Y t a p,  2 ≥ inf p(ω), v dP(ω) − ((  t ) + Lε) p 2 , L L P P t − a v∈F (X P,X (ω)) (A.8) Y − Y t a p,  ≤ sup p(ω), v dP(ω) + ((  t ) + Lε) p , 2 2 L L P P t − a v∈F (X P,X (ω)) where (  t ) := W (μ ,μ ) + e − e 2 dτ. 2 τ a τ a t − a Proof. Fix ε> 0. Let η ∈ P(R ×  ) represent μ, i.e., μ = e η. Since P [a,b] t t is an atomless Borel probability measure on a Polish space, as already noticed, there exists a Borel map V :  → R ×  such that η = V P. Set X = e ◦ V for [a,b] t t all t ∈[a, b]. Notice that for every measure-preserving map r :  → ,wehave η = (V ◦ r )P, since r P = P. Moreover, (X ◦ r )P = X P = μ for all t ∈[a, b]. t t t By Proposition 3.4,for η-a.e. (x,γ ) ∈ R ×  it holds [a,b] e − e t a (x,γ ) ∈ F (μ , e (x,γ )) + (t, x,γ ) · B(0, 1). a a t − a where (t, x,γ ) := W (μ ,μ ) +|(e − e )(x,γ )| dτ, 2 τ a τ a t − a + + and so (t, x,γ ) → 0 as t → a . Evaluating at (x,γ ) = V ◦ r (ω), and recalling that X = e ◦ V , we obtain t t X − X t a ◦ r (ω) ∈ F (μ , X ◦ r (ω)) + (t, V ◦ r (ω))B(0, 1) a a t − a ⊆ F (μ , X (ω)) + [(t, V ◦ r (ω)) +L|X (ω) − X ◦ r (ω)|] · B(0, 1). Since X P = X P = μ , by Lemma A.2 for any ε> 0 we can choose a measure- a a preserving map r = r such that |X (ω) − X ◦ r (ω)|≤ ε for P-a.e. ω ∈ .Sowe ε a have X − X t a ◦ r (ω) ∈ F (X P, X (ω)) + ( (t, V ◦ r (ω)) + Lε) · B(0, 1). ε ε t − a 4532 G. Cavagnari et al. J. Evol. Equ. Let Y = X ◦ r for all t ∈[a, b]. Then, as seen in the proof of Corollary A.1,we t t ε have Y − Y t a p,  2 ≥ inf v, p(ω) dP(ω) − ( (t, V ◦ r (·)) 2 + Lε) p 2 , L L L t − a P v∈F (X P,X (ω)) P P Y − Y t a p,  ≤ sup v, p(ω) dP(ω) + ( (t, V ◦ r (·)) + Lε) p , 2 2 2 L L L P P P t − a v∈F (X P,X (ω)) for every p ∈ L (). Notice that (1) Y P = X ◦ r P = X P = μ since r P = P; t t ε t t ε (2) we have Y − X 2 ≤ Y − Y 2 + Y − X 2 ≤ Y − Y 2 + ε; t t a a t a L L L L P P P P (3) it holds (t, V ◦ r (·)) 2 ≤ (  t ) = W (μ ,μ ) + e − e 2 dτ. 2 τ a τ a t − a From here follows the conclusion. Lemma A.4. Assume ( F ) − ( F ). Let μ ∈ P (R ),a ≥ 0 be fixed, and consider a 1 2 2 continuous selection v(·) of F (μ, ·). Then, there exist T > a and η ˆ ∈ P(R ×  ) [a,T ] ˆ ˆ ˆ such that, if we set θ = e η ˆ for all t ∈[a, T ] and θ ={θ } , t t t t ∈[a,T ] ˆ ˆ a. θ is an admissible trajectory with θ = μ defined on [a, T ]; d 1 b. for η ˆ-a.e. (x,γ ) ∈ R ×  we have γ ∈ C ([a, T ]) with γ( ˙ a) = v(x ), and [a,T ] γ( ˙ t ) ∈ F (θ ,γ (t )), for a.e. t ∈[a, T ], γ(a) = x ; e − e t a 2 + c. → v ◦ e in L as t → a . η ˆ t − a Proof. Without loss of generality, we set a = 0. According to Theorem 9.7.2 in [4], d d d there exists a continuous map f : P (R ) × R × B(0, 1) → R and a constant c d d independent on F such that for all (θ , x ) ∈ P (R ) × R it holds • F (θ , x ) ={ f (θ , x , u) : u ∈ B(0, 1)}. • for every u ∈ B(0, 1),the map (θ , x ) → f (θ , x , u) is Lipschitz continuous with Lipschitz constant less than c · Lip(F ), •| f (θ , x , u) − f (θ , x,v)|≤ c ·|F (θ , x )|·|u − v|. d d In particular, for all (θ , x ) ∈ P (R ) × R we have 1/2 | f (θ , x , u) − f (θ , x,v)|≤ c · K + Lip(F ) · m (θ ) +|x | ·|u − v|. Let 1/2 cLT cLT L = Lip(F ), K =|F (δ , 0)|, L > 2 2cL(1 + cLT e )m (μ) + cLT K e + K , 2 Vol. 21 (2021) Compatibility of state constraints 4533 and let T > 0 that will be fixed later. Given (x , u) ∈ R × B(0, 1) and a Lipschitz curve θ ={θ } ⊆ P (R ) with θ = μ and Lip(θ)< L , denote by γ (·) t t ∈[0,T ] 2 0 θ ,x ,u the unique solution of γ( ˙ t ) = f (θ ,γ (t ), u), γ (0) = x . For any (μ, ˆ q, r ) ∈ P (R ) × R × R define cL L 1/2 C (μ, ˆ q, r ) := r + cLrm (μ) ˆ + cLrq + rK , 1/2 cLr C (μ, ˆ q, r ) :=K + L L r + m (μ) ˆ + q + e C (μ, ˆ q, r ) , 2 1 & ' cLr C (μ, ˆ q, r ) :=e 1 + crC (μ, ˆ q, r ) . 3 2 For all 0 ≤ s ≤ t ≤ T , y ∈ R ,wehave | f (θ , y, u)| dτ ≤ t t ≤ | f (θ , y, u) − f (θ , y, u)| dτ + | f (θ , y, u) − f (δ , 0, u)| dτ + (t − s)| f (δ , 0, u)| dτ τ s s 0 0 s s 1/2 ≤cL W (θ ,θ ) dτ + cL(t − s)m (θ ) + cL(t − s)|y|+ (t − s)K ≤ C (θ , |y|, t − s), 2 τ s s 1 s where we used Lipschitz-in-time continuity of θ. Since |γ (t ) − γ (s)|≤ | f (θ ,γ (τ ), u) − f (θ ,γ (s), u)| dτ + θ ,x ,u θ ,x ,u τ θ ,x ,u τ θ ,x ,u t t + | f (θ ,γ (s), u)| dτ ≤ cL |γ (τ ) − γ (s)| dτ + C (θ , |γ (s)|, t − s), τ θ ,x ,u θ ,x ,u θ ,x ,u 1 s θ ,x ,u s s by Grönwall’s inequality, cL(t −s) |γ (t ) − γ (s)|≤ e C (θ , |γ (s)|, t − s). θ ,x ,u θ ,x ,u 1 s θ ,x ,u Choosing s = 0, for all t ∈[0, T ],wehave cLT |γ (t )|≤|x|+ e C (μ, |x |, T ). (A.9) θ ,x ,u 1 This implies also & ' |F (θ ,γ (t ))|≤ K + L W (θ ,δ ) +|γ (t )| t θ ,x ,u 2 t 0 θ ,x ,u 1/2 ≤ K + L(W (θ ,μ) + m (μ) +|γ (t )|) ≤ C (μ, |x |, T ). 2 t 2 θ ,x ,u 2 4534 G. Cavagnari et al. J. Evol. Equ. Notice that the map (x , u) → (x,γ ) is locally Lipschitz continuous. Indeed, θ ,x ,u |γ (t ) − γ (t )|≤ θ ,x ,u θ ,x ,v 1 2 ≤|x − x |+ | f (θ ,γ (τ ), u) − f (θ ,γ (τ ), v)| dτ 1 2 τ θ ,x ,u τ θ ,x ,v 1 2 ≤|x − x |+ | f (θ ,γ (τ ), u) − f (θ ,γ (τ ), v)| dτ + 1 2 τ θ ,x ,u τ θ ,x ,u 1 1 + | f (θ ,γ (τ ), v) − f (θ ,γ (τ ), v)| dτ τ θ ,x ,u τ θ ,x ,v 1 2 ≤|x − x |+ c |F (θ ,γ (τ ))| dτ ·|u − v|+ 1 2 τ θ ,x ,u + cL |γ (τ ) − γ (τ )| dτ θ ,x ,u θ ,x ,v 1 2 ≤|x − x |+ ctC (μ, |x |, T ) ·|u − v|+ cL |γ (τ ) − γ (τ )| dτ. 1 2 2 1 θ ,x ,u θ ,x ,v 1 2 By Grönwall’s inequality, for all t ∈[0, T ] we have cLT |γ (t ) − γ (t )|≤e (1 + cT C (μ, |x |, T ))(|x − x |+|u − v|) θ ,x ,u θ ,x ,v 2 1 1 2 1 2 =C (μ, |x |, T ) (|x − x |+|u − v|) . 3 1 1 2 This provides the Lipschitz continuity on all bounded subsets of R × B(0, 1) by the continuity of C (μ, ·, T ). By Filippov’s Theorem (see Theorem 8.2.10 in [4]), there exists a Borel map u : d d R → B(0, 1) such that v(x ) = f (μ, x , u(x )) for all x ∈ R .The map x → γ θ ,x ,u(x ) is a composition of Borel maps, so it is Borel, and we define η = μ ⊗ δ .We θ ,x ,u(x ) have by construction that • e η = μ; θ d 1 • for η -a.e. (x,γ ) ∈ R ×  we have γ ∈ C ([0, T ]) with γ(0) = x and γ( ˙ 0) = v(x ). We want to show now that t → e η is Lipschitz continuous with constant less than L . Indeed, given 0 ≤ s ≤ t ≤ T we have 1/2 θ θ 2 θ W (e η , e η ) ≤ e − e = |γ(t ) − γ(s)| dη (x,γ ) 2 t s t s θ d R × 1/2 cLT 2 θ ≤ e |C (θ , |γ(s)|, t − s)| dη (x,γ ) 1 s R × 1/2 cL L 1/2 2 2 θ ≤ (t − s) + cL(t − s)m (θ ) + cL(t − s) |γ(s)| dη (x,γ ) + (t − s)K . 2 d R × Notice that 1/2 1/2 m (θ ) = W (θ ,δ ) ≤ W (θ ,θ ) + W (θ ,δ ) ≤ L T + m (μ). s 2 s 0 2 s 0 2 0 0 2 2 Vol. 21 (2021) Compatibility of state constraints 4535 Moreover, by (A.9), we have 1/2 1/2 1/2 2 θ cLT 2 θ |γ(s)| dη (x,γ ) ≤ m (μ) + e |C (μ, |x |, T )| dη (x,γ ) d d R × R × T T cL L 1/2 1/2 cLT 2 ≤ m (μ) + e T + 2cLT m (μ) + TK 2 2 cL L cL L 1/2 2 cLT cLT cLT 2 cLT ≤ T e + (1 + 2cLT e ) m (μ) + TKe =: T e + B(μ, T ). 2 2 Thus, θ θ W (e η , e η ) 2 t s cL L cL L 1/2 2 cLT ≤|t − s| T + cL(L T + m (μ)) + cL( T e + B(μ, T )) + K 2 2 2 2 3 c L 1/2 2 cLT cLT cLT ≤|t − s| L ( cLT + T e ) + 2cL(1 + cLT e )m (μ) + cLT K e + K 2 2 =: S(μ, L , T ) |t − s|. (A.10) In particular, since we choose 1/2 cLT cLT > 2cL(1 + cLT e )m (μ) + cLT K e + K , there is T > 0 such that S(μ, L , T)< L , and so t → e η is Lipschitz continuous with constant less than L . (n) (n) Define by recurrence a sequence of curves {θ ={θ } } and of measures t t ∈[0,T ] n∈N (0) (n) (n) {η } by setting θ = μ for all t ∈[0, T ]. Supposing that we have defined θ , n∈N (n+1) (n) (n+1) (n) then we define η = μ ⊗ δ and θ by setting θ = e η . Notice γ t (n) t θ ,x ,u(x ) (n) (n) that, by construction, for all n ∈ N, θ = μ and θ is a Lipschitz continuous curve (n) with Lip(θ )< L ,by(A.10). Since we have the same estimate as in (A.3), then there exists η ∈ P(R ×  ) and (n ) (n ) k k a subsequence η such that η narrowly converges toward η. As already observed, (n ) we also have that θ is a family of uniformly bounded and continuous curves, with uniformly bounded Lipschitz constants. Thus, it has a subsequence which is uniformly convergent to a Lipschitz curve θ ={θ } . We now follow the same reasoning as t t ∈[0,T ] (n) in the last part of the proof of Proposition 3.5 with μ and μ replaced, respectively, (n ) by θ and θ .For η-a.e. (x,γ ), we get that γ( ˙ t ) ∈ F (θ ,γ (t )) for a.e. t ∈[0, T ], γ(0) = x, γ ∈ C ([0, T ]) and γ( ˙ 0) = v(x ). Thus, θ is an admissible trajectory and e − e t 0 + d (x,γ ) → v(x ),as t → 0 ,for η-a.e. (x,γ ) ∈ R ×  . We also notice that v(x ) = v ◦e (x,γ ) for η-a.e. (x,γ ) ∈ R ×  . Finally, recalling the estimates on the 0 T admissible trajectories provided in Proposition 3.4, by the Dominated Convergence Theorem we have that the convergence is actually in L . η 4536 G. Cavagnari et al. J. Evol. Equ. REFERENCES [1] G. Albi, N. Bellomo, L. Fermo, S.-Y. Ha, J. Kim, L. Pareschi, D. Poyato, and J. Soler, Vehicular traffic, crowds, and swarms: From kinetic theory and multiscale methods to applications and research perspectives, Mathematical Models and Methods in Applied Sciences 29 (2019), no. 10, 1901–2005, https://doi.org/10.1142/S0218202519500374. [2] Luigi Ambrosio, Nicola Gigli, and Giuseppe Savaré, Gradient flows in metric spaces and in the space of probability measures, 2nd ed., Lectures in Mathematics ETH Zürich, Birkhäuser Verlag, Basel, 2008. [3] Luigi Ambrosio and Bernd Kirchheim, Rectifiable sets in metric and Banach spaces, Math. Ann. 318 (2000), no. 3, 527–555, https://doi.org/10.1007/s002080000122. [4] Jean-Pierre Aubin and Hélène Frankowska, Set-valued analysis, Modern Birkhäuser Classics, Birkhäuser Boston Inc., Boston, MA, 2009. Reprint of the 1990 edition. [5] Yurii Averboukh, Viability theorem for deterministic mean field type control systems, Set-Valued Var. Anal. 26 (2018), no. 4, 993–1008. [6] Martino Bardi and Italo Capuzzo-Dolcetta, Optimal control and viscosity solutions of Hamilton- Jacobi-Bellman equations, Systems & Control: Foundations & Applications, Birkhäuser Boston Inc., Boston, MA, 1997. With appendices by Maurizio Falcone and Pierpaolo Soravia. [7] Alain Bensoussan, Jens Frehse, and Phillip Yam, Mean field games and mean field type control theory, SpringerBriefs in Mathematics, Springer, New York, 2013. [8] Jonathan M. Borwein and Qiji J. Zhu, Techniques of variational analysis, CMS Books in Mathe- matics/Ouvrages de Mathématiques de la SMC, vol. 20, Springer-Verlag, New York, 2005. [9] Rainer Buckdahn, Shige Peng, Marc Quincampoix, and Catherine Rainer, Existence of stochastic control under state constraints, C. R. Acad. Sci. Paris Sér. I Math. 327 (1998), no. 1, 17–22. [10] Pierre Cardaliaguet, Notes on Mean Field Games, 2013. From P.-L. Lions’ lectures at College de France, link to the notes. [11] René Carmona and François Delarue, Probabilistic Theory of Mean Field Games with Applications, vol I, Probability Theory and Stochastic Modeling, vol. 84, Springer International Publishing, 2018. [12] G. Cavagnari, S. Lisini, C. Orrieri, and G. Savaré, Lagrangian, Eulerian and Kantorovich formu- lations of multi-agent optimal control problems: equivalence and Gamma-convergence, Preprint: arXiv:2011.07117 [math.OC]. [13] Giulia Cavagnari, Antonio Marigonda, and Benedetto Piccoli, Superposition principle for differ- ential inclusions, Large-scale scientific computing, Lecture Notes in Comput. Sci., vol. 10665, Springer, Cham, 2018, pp. 201–209. [14] Francis Clarke, Functional analysis, calculus of variations and optimal control, Graduate Texts in Mathematics, vol. 264, Springer, London, 2013. [15] M. Fornasier, S. Lisini, C. Orrieri, and G. Savaré, Mean-field optimal control as gammalimit of finite agent controls, European J. Appl. Math. 30 (2019), no. 6, 1153–1186, https://doi.org/10. 1017/s0956792519000044. [16] Chloé Jimenez, Antonio Marigonda, and Marc Quincampoix, Optimal Control of Multiagent Sys- tems in the Wasserstein Space, Calculus of Variations and Partial Differential Equations 59 (2020), https://doi.org/10.1007/s00526-020-1718-6. [17] Alexander Kruger, On Fréchet Subdifferentials, Journal of Mathematical Sciences 116 (2003), no. 3, 3325-3358, https://doi.org/10.1023/A:1023673105317. [18] Antonio Marigonda and Marc Quincampoix, Mayer control problem with probabilistic uncertainty on initial positions, J. Differential Equations 264 (2018), no. 5, 3212–3252. [19] Nikolay Pogodaev, Optimal control of continuity equations, NoDEA Nonlinear Differential Equa- tions Appl. 23 (2016), no. 2, Art. 21, 24, https://doi.org/10.1007/s00030-016-0357-2. Vol. 21 (2021) Compatibility of state constraints 4537 Giulia Cavagnari Dipartimento di Matematica “F. Brioschi” Politecnico di Milano Piazza Leonardo da Vinci 32 20133 Milan Italy E-mail: giulia.cavagnari@polimi.it Antonio Marigonda Department of Computer Science University of Verona Strada Le Grazie 15 37134 Verona Italy E-mail: antonio.marigonda@univr.it Marc Quincampoix Laboratoire de Mathématiques de Bretagne Atlantique, UMR CNRS 6205 Univ Brest 6, Avenue Victor Le Gorgeu 29200 Brest France E-mail: marc.quincampoix@univ-brest.fr Accepted: 26 May 2021 http://www.deepdyve.com/assets/images/DeepDyve-Logo-lg.png Journal of Evolution Equations Springer Journals

Compatibility of state constraints and dynamics for multiagent control systems

Loading next page...
 
/lp/springer-journals/compatibility-of-state-constraints-and-dynamics-for-multiagent-control-s8MebOu6kq
Publisher
Springer Journals
Copyright
Copyright © The Author(s) 2021
ISSN
1424-3199
eISSN
1424-3202
DOI
10.1007/s00028-021-00724-z
Publisher site
See Article on Publisher Site

Abstract

J. Evol. Equ. 21 (2021), 4491–4537 © 2021 The Author(s) Journal of Evolution 1424-3199/21/044491-47, published online June 14, 2021 Equations https://doi.org/10.1007/s00028-021-00724-z Compatibility of state constraints and dynamics for multiagent control systems Giulia Cavagnari , Antonio Marigonda and Marc Quincampoix Abstract. This study concerns the problem of compatibility of state constraints with a multiagent control system. Such a system deals with a number of agents so large that only a statistical description is available. For this reason, the state variable is described by a probability measure on R representing the density of the agents and evolving according to the so-called continuity equation which is an equation stated in the Wasserstein space of probability measures. The aim of the paper is to provide a necessary and sufficient condition for a given constraint (a closed subset of the Wasserstein space) to be compatible with the controlled continuity equation. This new condition is characterized in a viscosity sense as follows: the distance function to the constraint set is a viscosity supersolution of a suitable Hamilton–Jacobi–Bellman equation stated on the Wasserstein space. As a byproduct and key ingredient of our approach, we obtain a new comparison theorem for evolutionary Hamilton–Jacobi equations in the Wasserstein space. 1. Introduction In classical control theory, a single agent controls a dynamics (here represented by a differential inclusion) x˙ (t ) ∈ F (x (t )), x (0) = x , (1.1) d d d where F : R ⇒ R is a set valued map, associating with each x ∈ R the subset F (x ) of R of the admissible velocities from x.A multiagent system involves a large number of agents having all a dynamics of the form (1.1). In this model, the number of agents is so large that at each time only a statistical (macroscopic) description of the state is available. We thus describe the configuration of the system at time t by a Borel μ (A) d d measure μ on R , where for every Borel set A ⊆ R the quotient represents μ (R ) the fraction of the total amount of agents that are present in A at the time t. Since the total amount of agents is supposed to be fixed in time, μ (R ) is constant, and thus, d d we choose to normalize the measure μ assuming μ (R ) = 1, i.e., μ ∈ P(R ),the t t t set of Borel probability measures on R . Hence, the evolution of the controlled multi-agent system can be represented by the following two-scale dynamics Mathematics Subject Classification: 49J15, 49J52, 49L25, 49K27, 49K21, 49Q20, 34A60, 93C15 Keywords: Optimal control, Optimal transport, Hamilton–Jacobi–Bellman equation, Multi-agent. 4492 G. Cavagnari et al. J. Evol. Equ. • Microscopic dynamics: each agent’s position at time t is given by x (t ), which evolves according to the dynamical system x˙ (t ) ∈ F (μ , x (t )), for a.e. t > 0 , (1.2) where F is a set-valued map. It is worth pointing out that each agent’s dynamics is nonlocal since it depends also on the instantaneous configuration μ of the crowd of agents at time t, described by a probability measure on R . • Macroscopic dynamics: the configuration of the crowd of agents at time t is given by a time-depending measure μ ∈ P(R ) whose evolution satisfies the following continuity equation (to be understood in the sense of distributions) ∂ μ + div(v μ ) = 0, t > 0, (1.3) t t t t coupled with the control constraint v (x ) ∈ F (μ , x ) for μ -a.e. x ∈ R and for a.e. t ≥ 0. (1.4) t t t which represents the possible (Eulerian) velocity v (x ) chosen by an external planner for an agent at time t and at the position x. The investigation of (deterministic) optimal control problems in the space of mea- sures is attracting an increasing interest by the mathematical community in the last years, due to the potential applications in the study of complex systems, or multi-agent systems (see, e.g., [16,18,19]). Indeed, in the framework of mean field approxima- tion of multi agent system, starting from a control problem for a large number of the (discrete) agents, the problem is recasted in the framework of probability measures (see the recent [15] or the preprint [12]for -convergence results for optimal control problems with nonlocal dynamics). This procedure reduces the dimensionality and the number of equations, possibly leading to a simpler and treatable problem from the point of view of numerics. The reader can find a comprehensive overview of the literature about such formulations and applications, together with some insights on research perspective, in the recent survey [1], and references therein. We refer to [7] for further results on mean field control problems. The problem we address in this paper is the compatibility of the above dynamical d d system (1.3)–(1.4) with a given closed constraint K ⊆ P (R ). Here, P (R ) is 2 2 the set of Borel probability measures with finite second moment; this set is equipped with the 2-Wasserstein distance (see Sect. 2). This compatibility property could be understood in two ways • K is viable for the dynamics F if and only if for any μ ∈ K there exists a solution t → μ of the controlled continuity Eqs. (1.3)–(1.4) with μ = μ such t 0 that μ ∈ K for all t ≥ 0; • K is invariant for the dynamics F if and only if for any μ ∈ K and for any solution t → μ of the controlled continuity Eqs. (1.3)–(1.4) with μ = μ we t 0 have μ ∈ K for all t ≥ 0. t Vol. 21 (2021) Compatibility of state constraints 4493 Inspired by a characterization of the viability property via supersolution of Hamilton– Jacobi–Bellman equations, which was first obtained in [9] in the framework of sto- chastic control, we develop an approach for the present multiagent control problem with deterministic dynamics (1.3)–(1.4). The main result of our paper (Theorems 6.6 and 6.7) can be roughly summarized as follows Theorem 1.1. Let K ⊆ P (R ) be a closed set and d the associated distance function. Assume that the set valued map F is L-Lipschitz. • K is viable iff the function μ → d (μ) is a viscosity supersolution of viab (L + 2)u(μ) + H (μ, D u(μ)) = 0, d 2 d d where, for all μ ∈ P (R ),p ∈ L (R ; R ), viab H (μ, p) := −d (μ) − inf v(x ), p(x ) dμ(x ). 2 d v(·)∈L (R ) v(x )∈F (μ,x )μ− a.e. x • K is invariant iff the function μ → d (μ) is a viscosity supersolution of inv (L + 2)u(μ) + H (μ, D u(μ)) = 0, d 2 d d where, for all μ ∈ P (R ),p ∈ L (R ; R ), inv H (μ, p) := −d (μ) − sup v(x ), p(x ) dμ(x ). 2 d v(·)∈L (R ) v(x )∈F (μ,x)μ−a.e. x For a completely different approach to the viability problem, we refer to [5], where the author provides a characterization of the viability property for a closed set K ⊆ P (T ) by mean of a condition involving a suitable notion of tangent cone to K in d d the Wasserstein space P (T ), where T denotes the d-dimensional torus. The paper is organized as follows: in Sect. 2, we fix the notations and provide some background results; Sect. 3 is devoted to the properties of the set of solutions of the controlled continuity Eqs. (1.3)–(1.4); Sect. 4 establishes the link between the viability/invariance problem with the value function of a suitable control problem in Wasserstein space; Sect. 5 introduces the viscosity solutions of Hamilton–Jacobi– Bellman equations in the Wasserstein space, together with a uniqueness result; in Sect. 6, we apply the results of Sect. 5 to the problem outlined in Sect. 4 deriving our main characterization of viability/invariance. Finally, in Sect. 7 we provide an example illustrating the main results. Some proofs of technical results are postponed to “Appendix.” 4494 G. Cavagnari et al. J. Evol. Equ. 2. Notations Throughout the paper, we will use the following notation and we address to [2]as a relevant resource for preliminaries on measure theory. B(x , r ) the open ball of radius r of a metric space (X, d ), i.e., B(x , r ) := {y ∈ X : d (y, x)< r }; K the closure of a subset K of a topological space X; d (·) the distance function from a subset K of a metric space (X, d), i.e., d (x ) := inf{d(x , y) : y ∈ K }; C (X ; Y ) the set of continuous bounded functions from a Banach space X to Y , endowed with f = sup | f (x )| (if Y = R, Y will be x ∈X omitted); 0 0 C (X ; Y ) the set of compactly supported functions of C (X ; Y ), with the c b topology induced by C (X ; Y ); BUC (X ; R) the space of bounded real-valued uniformly continuous functions defined on X the set of continuous curves from a real interval I to R ; the set of continuous curves from [0, T ] to R ; d d e the evaluation operator e : R ×  → R defined by e (x,γ ) = t t I t γ(t ) for all t ∈ I ; P(X ) the set of Borel probability measures on a Banach space X, en- ∗ 0 dowed with the weak topology induced from C (X ); d d d d M (R ; R ) the set of vector-valued Borel measures on R with values in R , ∗ 0 d d endowed with the weak topology induced from C (R ; R ); d d |ν| the total variation of a measure ν ∈ M (R ; R ); the absolutely continuity relation between measures defined on the same σ -algebra; m (μ) the second moment of a probability measure μ ∈ P(X ); r μ the push-forward of the measure μ by the Borel map r; μ ⊗ π the product measure of μ ∈ P(X ) with the Borel family of mea- sures {π } ⊆ P(Y ) (see Theorem 2.1); x x ∈X pr the i-th projection map pr (x ,..., x ) = x ; 1 N i i i (μ, ν) the set of admissible transport plans from μ to ν; (μ, ν) the set of optimal transport plans from μ to ν; W (μ, ν) the 2-Wasserstein distance between μ and ν; P (X ) the subset of the elements P(X ) with finite second moment, en- dowed with the 2-Wasserstein distance; the Radon–Nikodym derivative of the measure ν w.r.t. the measure μ; Lip( f ) the Lipschitz constant of a function f ; + + ( f ) the positive part of a real valued function f , i.e., ( f ) = max{0, f }. Vol. 21 (2021) Compatibility of state constraints 4495 Given Banach spaces X, Y , we denote by P(X ) the set of Borel probability measures on X endowed with the weak topology induced by the duality with the Banach space C (X ) of the real-valued continuous bounded functions on X with the uniform convergence norm. The second moment of μ ∈ P(X ) is defined by m (μ) = x dμ(x ), and we set P (X ) ={μ ∈ P(X ) : m (μ) < +∞}.For 2 2 2 any Borel map r : X → Y and μ ∈ P(X ), we define the push forward measure −1 r μ ∈ P(Y ) by setting r μ(B) = μ(r (B)) for any Borel set B of Y . In other words, ϕ(y) d[r μ](y) = ϕ(r (x )) dμ(x ), Y X for any bounded Borel measurable function ϕ : Y → R. We denote by M (X ; Y ) the set of Y -valued Borel measures defined on X. The total variation measure of ν ∈ M (X ; Y ) is defined for every Borel set B ⊆ X as |ν|(B) := sup ν(B ) , i Y {B } i i ∈N where the sup ranges on countable Borel partitions of B. We now recall the definitions of transport plans and Wasserstein distance (cf. for instance Chapter 6 in [2]). Let X be a complete separable Banach space, μ ,μ ∈ 1 2 P(X ).The setof admissible transport plans between μ and μ is 1 2 (μ ,μ ) ={π ∈ P(X × X ) : pr π = μ , i = 1, 2}, 1 2 i d d d where for i = 1, 2, pr : R × R → R is a projection pr (x , x ) = x .The 1 2 i i i Wasserstein distance between μ and μ is 1 2 2 2 W (μ ,μ ) = inf |x − x | dπ (x , x ). 1 2 1 2 1 2 π ∈ (μ ,μ ) 1 2 X ×X If μ ,μ ∈ P (X ), then the above infimum is actually a minimum, and the set of 1 2 2 minima is denoted by 2 p (μ ,μ ) := π ∈ (μ ,μ ) : W (μ ,μ ) = |x − x | dπ (x , x ) . o 1 2 1 2 1 2 1 2 1 2 X ×X Recall that P (X ) endowed with the W -Wasserstein distance is a complete separable 2 2 metric space. The following result is Theorem 5.3.1 in [2]. Theorem 2.1. (Disintegration) Let X, X be complete separable metric spaces. Given a measure μ ∈ P(X) and a Borel map r : X → X, there exists a Borel family of probability measures {μ } ⊆ P(X), uniquely defined for r μ-a.e. x ∈ X, such x x ∈X −1 that μ (X\r (x )) = 0 for r μ-a.e. x ∈ X, and for any Borel map ϕ : X →[0, +∞] we have ϕ(z) dμ(z) = ϕ(z) dμ (z) d(r μ)(x ). −1 X X r (x ) 4496 G. Cavagnari et al. J. Evol. Equ. −1 We will write μ = (r μ) ⊗ μ .If X = X × Y and r (x ) ⊆{x}× Y for all x ∈ X, we can identify each measure μ ∈ P(X × Y ) with a measure on Y . 3. Admissible trajectories The goal of this section is to give a precise definition of the macroscopic dynamics (1.3 , 1.4) and to study its trajectories. To maintain the flow of the paper, the proofs of the results of this section are postponed to “Appendix A.” Definition 3.1. (Admissible trajectories)Let I =[a, b] be a closed real interval, d d d d d d μ ={μ } ⊆ P (R ), ν ={ν } ⊆ M (R ; R ), F : P (R ) × R ⇒ R be a t t ∈I 2 t t ∈I 2 set-valued map. We say that μ is an admissible trajectory driven by ν defined on I with underlying dynamics F if •|ν | μ for a.e. t ∈ I ; t t • v (x ) := (x ) ∈ F (μ , x ) for a.e. t ∈ I and μ -a.e. x ∈ R ; t t t • ∂ μ + div ν = 0 in the sense of distributions in [a, b]× R . t t t Given μ ∈ P (R ), we define the set of admissible trajectories as d d A (μ) := μ ={μ } :∃ ν ={ν } ⊆ M (R ; R ) s.t. μ is an admissible traj. I t t ∈I t t ∈I driven by ν, defined on I with underlying dynamics F and μ = μ . We make the following assumptions on the set-valued map F: d d d ( F ) F : P (R ) × R ⇒ R is continuous with convex, compact and nonempty 1 2 d d images, where on P (R ) × R we consider the metric d d d ((μ , x ), (μ , x )) = W (μ ,μ ) +|x − x |. 1 1 2 2 2 1 2 1 2 P (R )×R ( F ) there exists L > 0, a compact metric space U and a continuous map f : d d d P (R ) × R × U → R satisfying | f (μ , x , u) − f (μ , x , u)|≤ L(W (μ ,μ ) +|x − x |), 1 1 2 2 2 1 2 1 2 d d for all μ ∈ P (R ), x ∈ R , i = 1, 2, u ∈ U, such that the set-valued map F i 2 i can be represented as F (μ, x ) = { f (μ, x , u) : u ∈ U } . As pointed out also in Remark 2 of [16], from the Lipschitz continuity of the set- valued map F coming from assumption ( F ), we easily get F (μ, x ) ⊆ F (ν, y) + L(W (μ, ν) +|x − y|)B(0, 1), 2 Vol. 21 (2021) Compatibility of state constraints 4497 d d d d for all μ, ν ∈ P (R ) and x , y ∈ R . From which, for all μ ∈ P (R ) and x ∈ R , 2 2 we have 1/2 F (μ, x ) ⊆ C (1 + m (μ)) (1 +|x |)B(0, 1), (3.1) where C := max{1, L max{|y|: y ∈ F (δ , 0)}}. (n) d (n) Definition 3.2. Let {μ } ⊆ AC([a, b]; P (R )). We say that {μ } uni- n∈N 2 n∈N (n) formly W -converges to μ, μ ⇒ μ,ifwehave (n) sup W (μ ,μ ) → 0. 2 t t ∈[a,b] We recall the following result taken from [16]. Lemma 3.3. (Grönwall-like estimate (Prop. 2 in [16])) Assume ( F ) − ( F ). Let 1 2 μ ,θ ∈ P (R ), and μ ={μ } ∈ A (μ ) an admissible trajectory. Then, 0 0 2 t t ∈[a,b] [a,b] 0 there exists an admissible trajectory θ ={θ } ∈ A (θ ), such that for all t t ∈[a,b] [a,b] 0 t ∈[a, b] we have L(b−a) L(b−a)+(b−a)e W (μ ,θ ) ≤ e · W (μ ,θ ), 2 t t 2 0 0 where L is as in ( F ). Proposition 3.4. Assume ( F ) − ( F ). Let μ ={μ } be an admissible trajec- 1 2 t t ∈[a,b] tory, with 0 ≤ a < b < +∞. Then, there exists η ∈ P(R ×  ) such that [a,b] e η = μ for all t ∈[a, b], and for η-a.e. (x,γ ) t t γ( ˙ t ) ∈ F (μ ,γ (t )), for a.e. t ∈[a, b], γ(a) = x . Moreover, for any η as above and for all t, s ∈[a, b] with s < t, we have (1) for η-a.e. (x,γ ) ∈ R ×  , [a,b] e − e t s (x,γ ) ∈ F (μ ,γ (s)) + t − s + W (μ ,μ ) +|(e − e )(x,γ )| dτ · B(0, 1); 2 τ s τ s t − s 1/2 L(t −s) (2) e − e 2 ≤ e (t − s)(K + 2Lm (μ )) + L W (μ ,μ ) dτ =: t s s 2 τ s h(t, s); e − e t s 1/2 (3) lim + = K + 2Lm (μ ), t →s s t − s where L = Lip(F ) and K = max{|y|: y ∈ F (δ , 0)}. d d In particular, there exists a Borel map w : R ×  → R , with w(x,γ ) ∈ [a,b] F (μ ,γ (s)) for η-a.e. (x,γ ) ∈ R ×  , such that s [a,b] e − e L t s − w ≤ [W (μ ,μ ) + h(τ, s)] dτ. 2 τ s t − s t − s η 4498 G. Cavagnari et al. J. Evol. Equ. Proposition 3.5. (Compactness of A (μ)] Assume ( F ) − ( F ) and let 0 ≤ a < [a,b) 1 2 b < +∞ and μ ∈ P (R ). Then, the set of admissible trajectories A (μ ) is 0 2 [a,b] 0 nonempty and compact w.r.t. uniform W -convergence (see Definition 3.2). 4. Viability problem and the value function Throughout the paper, let K ⊆ P (R ) be closed w.r.t. the metric W .Weare 2 2 interested in the definitions of compatibility of our dynamics w.r.t. the state constraint given by K (cf. introduction of the present paper). Notice that, since concatenation of admissible trajectories is an admissible trajectory (see the note before Prop. 3 in [16]), if K is viable (resp. invariant) in [t , T ] then it ˆ ˆ is viable (resp. invariant) in [0, T ] for any T > T . As we will investigate in Sect. 5, the viability and invariance properties of a closed set K ⊆ P (R ) are closely related to the following optimal control problems, with fixed time-horizon T > 0. d d Definition 4.1. (Value functions)Given K ⊆ P (R ) closed, μ ∈ P (R ) and 2 2 t ∈[0, T ] ,weset viab d (1) V :[0, T ]× P (R ) →[0, +∞) as follows viab V (t ,μ) := inf d (μ ) dt, (4.1) 0 K t μ∈A (μ) [t ,T ] 0 0 where d : P (R ) →[0, +∞), d (μ) := inf W (μ, σ ). K 2 K 2 σ ∈K viab We say that μ ∈ A (μ) is an optimal trajectory for V starting from μ at [t ,T ] time t if it achieves the minimum in (4.1). inv d (2) V :[0, T ]× P (R ) →[0, +∞) as follows inv V (t ,μ) := sup d (μ ) dt. (4.2) 0 K t μ∈A (μ) t [t ,T ] inv We say that μ ∈ A (μ) is an optimal trajectory for V starting from μ at [t ,T ] time t if it achieves the maximum in (4.2). The main interest in the above value functions lies in the fact that they give a characterization of the viability/invariance as explained in Proposition 4.3.Wefirst state a regularity result of the above value functions and the existence of optimal trajectories. Proposition 4.2. Assume ( F ) − ( F ). Given μ ∈ P (R ),t ∈[0, T ], there exist an 1 2 2 0 viab optimal trajectory μ ∈ A (μ) for V and an optimal trajectory μ ∈ A (μ) [t ,T ] [t ,T ] 0 0 inv for V . Vol. 21 (2021) Compatibility of state constraints 4499 viab 1 2 Proof. We prove the existence of an optimal trajectory for V .Takeany μ ,μ ∈ P (R ). By passing to the infimum over σ ∈ K on the triangular inequality 1 1 2 2 W (μ ,σ ) ≤ W (μ ,μ ) + W (μ ,σ ), 2 2 2 1 1 2 2 1 2 we have d (μ ) ≤ W (μ ,μ ) + d (μ ). Reversing the roles of μ and μ , we get K K the 1-Lipschitz continuity of d . Hence, by Fatou’s Lemma, we get the l.s.c. of the cost functional, i.e., T T (n) d (μ ) dt ≤ lim inf d (μ ) dt, K K t n→+∞ t t 0 0 (n) d for any sequence {μ } ⊆ AC([t , T ]; P (R )) uniformly W -converging to μ. n∈N 0 2 2 Combining this with the W -compactness property of Proposition 3.5, we get the desired result. inv (n) We prove the existence of an optimal trajectory for V .Wefix {μ } ⊂ n∈N A (μ) and σ ˆ ∈ K . For any t ∈[t , T ], by triangular inequality and recalling that [t ,T ] 0 1/2 by definition we have the equivalence m (ρ) = W (ρ , δ ), we get the following 2 0 uniform bound (n) (n) (n) d (μ ) ≤ W (μ , σ) ˆ ≤ W (μ ,δ ) + W (δ , σ) ˆ 2 2 0 2 0 K t t t 1/2 (n) 1/2 1/2 1/2 = m (μ ) + m (σ) ˆ ≤ C (1 + m (μ)) + m (σ) ˆ , 2 2 2 2 for some constant C > 0 coming from estimate (A.2) proved in “Appendix A”. Thus, viab as for the proof of the existence of a minimizer for V , we can apply Fatou’s Lemma to get the u.s.c. of the cost functional and conclude. We state here a first characterization of viability/invariance in terms of the optimal control problems introduced in Definition 4.1. Proposition 4.3. Assume ( F ) − ( F ). Let K ⊆ P (R ) be closed in the W - 1 2 2 2 topology, t ∈[0, T ]. Then, viab (1) K is viable for F if and only if V (t ,μ ) = 0 for all μ ∈ K ; 0 0 0 inv (2) K is invariant for F if and only if V (t ,μ ) = 0 for all μ ∈ K . 0 0 0 Proof. We just prove (1), since the proof of (2) is similar. One implication follows viab directly by definition, so we prove the other direction assuming V (t ,μ ) = 0for 0 0 all μ ∈ K . By Proposition 4.2, for all μ ∈ K , there exists an optimal trajectory 0 0 μ ¯ ∈ A (μ ) such that [t ,T ] 0 viab 0 = V (t ,μ ) = d (μ ¯ ) dt. 0 0 K t This implies that d (μ ¯ ) = 0 for a.e. t ∈[t , T ]. By continuity of μ ¯ and by closedness K t 0 of K w.r.t. W -topology, we obtain the viability property for K . As usual, the value function satisfies a Dynamic Programming Principle. 4500 G. Cavagnari et al. J. Evol. Equ. viab d Lemma 4.4. (DPP) The function V :[0, T ]× P (R ) →[0, +∞) satisfies viab viab V (t ,μ) = inf d (μ ) ds + V (t,μ ) : t ∈[t , T ], μ ∈ A (μ) . 0 K s t 0 [t ,T ] (4.3) Furthermore, for any μ ∈ A (μ),the map [t ,T ] viab t → g (t ) := d (μ ) ds + V (t,μ ) μ K s t is nondecreasing in [t , T ], and it is constant if and only if μ is an optimal trajectory. viab Proof. We prove one inequality (≥). By definition of V (t ,μ), for any ε> 0 there exists μ ∈ A (μ) s.t. [t ,T ] t T t viab ε ε ε viab ε V (t ,μ) + ε ≥ d (μ ) ds + d (μ ) ds ≥ d (μ ) ds + V (t,μ ), K s K s K s t t t t 0 0 ε ε for any t ∈[t , T ], since the truncated trajectory μ ˆ := μ belongs to A (μ ). 0 [t,T ] |[t,T ] We conclude by passing to the infimum on μ ∈ A (μ) and t ∈[t , T ] on the [t ,T ] 0 right-hand side and then letting ε → 0 . Concerning the other inequality, fix any μ ∈ A (μ) and t ∈[t , T ]. By defini- [t ,T ] 0 viab ε viab tion of V (t,μ ), for all ε> 0 there exists μ ∈ A (μ ) s.t. V (t,μ ) + ε ≥ t [t,T ] t t d (μ ) ds. Now, defining μ , if s ∈[t , t ], s 0 μ ˆ := μ , if s ∈[t, T ], we see that μ ˆ ∈ A (μ). Thus, [t ,T ] T t T t viab ε viab V (t ,μ) ≤ d (μ ˆ ) ds = d (μ ) ds + d (μ ) ds ≤ d (μ ) ds + V (t,μ ) + ε. 0 K s K s K K s t t t t t 0 0 0 By passing to the inf on μ ∈ A (μ), and then letting ε → 0 , we conclude. [t ,T ] The proof of the second part of the statement is standard and follows straightfor- wardly from (4.3) (see for instance Prop. 3 in [16]). We come now to the formulation of a Dynamic Programming Principle for the value inv function V whose proof is omitted since it is similar to that of Lemma 4.4. inv d Lemma 4.5. (DPP) The function V :[0, T ]× P (R ) →[0, +∞) satisfies inv inv V (t ,μ) = sup d (μ ) ds + V (t,μ ) : t ∈[t , T ], μ ∈ A (μ) . 0 s t 0 [t ,T ] K 0 (4.4) Vol. 21 (2021) Compatibility of state constraints 4501 Furthermore, for any μ ∈ A (μ),the map [t ,T ] inv t → j (t ) := d (μ ) ds + V (t,μ ) μ K s t is nonincreasing in [t , T ], and it is constant if and only if μ is an optimal trajectory. As in the classical case, the infinitesimal version of the Dynamic Programming Prin- ciple gives rise to a Hamilton–Jacobi–Bellman equation. The next section is devoted to such a Hamilton–Jacobi equation. viab inv Proposition 4.6. Assume ( F ) − ( F ). The value functions V (t,μ) and V (t,μ) 1 2 are uniformly continuous in t ∈[0, T ] and Lipschitz continuous in μ ∈ P (R ) w.r.t. the W -metric. viab inv Proof. We prove the statement for V , since the proof for V is analogous. Fix 1 2 d t ∈[0, T ] and take any μ ,μ ∈ P (R ). By Proposition 4.2, there exists an 0 2 2 2 1 optimal trajectory μ ¯ ∈ A (μ ) starting from μ . Thus, for any admissible μ ∈ [t ,T ] A (μ ),wehave [t ,T ] T   T viab 1 viab 2 1 2 1 2 V (t ,μ ) − V (t ,μ ) ≤ d (μ ) − d (μ ¯ ) dt ≤ W (μ , μ ¯ ) dt. 0 0 K K 2 t t t t t t 0 0 1 1 We can now choose μ ∈ A (μ ) such that the Grönwall-like inequality of Lemma [t ,T ] 3.3 holds, thus getting L(T −t ) viab 1 viab 2 L(T −t )+(T −t )e 1 2 0 0 V (t ,μ ) − V (t ,μ ) ≤ (T − t )e · W (μ ,μ ). 0 0 0 2 (4.5) viab We now prove the uniform continuity in time of V .Let 0 ≤ t ≤ t ≤ T , 1 2 μ ∈ P (R ) and μ ∈ A (μ) an optimal trajectory. Then by the second part of the 2 [t ,T ] viab statement of Lemma 4.4, noticing that in particular g (t ) = V (t ,μ),wehave μ 1 1 viab viab viab V (t ,μ) − V (t ,μ) = d (μ ) dt + V (t ,μ ) − V (t ,μ) 1 2 K t 2 |t =t 2 LT LT +Te ≤ d (μ ) dt + Te W (μ ,μ). K t 2 |t =t By continuity of d (·) and of t → μ we have the convergence to zero of the right- hand-side as t → t . Reversing the roles of t and t we conclude. 2 1 1 2 5. Hamilton Jacobi Bellman equation As reported in p. 352 in [11] and at the beginning of Sec. 6.1 in [10], we recall the following crucial fact. Throughout the paper, let (, B, P) be a sufficiently “rich” probability space, i.e.,  is a complete, separable metric space, B is the Borel σ -algebra 4502 G. Cavagnari et al. J. Evol. Equ. on , and P is an atomless Borel probability measure. We use the notation L () = 2 d d 2 L (; R ). Then, given any μ ,μ ∈ P (R ), there exist X , X ∈ L () such 1 2 2 1 2 P P that μ = X P, i = 1, 2, and W (μ ,μ ) = X − X 2 . i i 2 1 2 1 2 Definition 5.1. (1) Given a function u :[0, T ]× P (R ) → R, we define its lift 2 2 U :[0, T ]× L () → R by setting U (t, X ) = u(t, X P) for all X ∈ L (). P P (2) Let H = H (μ, p) be a Hamiltonian function mapping μ ∈ P (R ), p ∈ 2 d 2 2 L (R ) into R. We say that the Hamiltonian function H : L ()× L () → R μ P P 2 2 d is a lift of H ,if H (X, p◦X ) = H (X P, p), for all X ∈ L (), p ∈ L (R ). P X P Definition 5.2. (Viscosity solution)Let H and H be as in Definition 5.1(2). Given λ ≥ 0, we consider a first-order HJB equation of the form − ∂ u(t,μ) + λu(t,μ) + H (μ, D u(t,μ)) = 0, (5.1) t μ and its lifted form − ∂ U (t, X ) + λU (t, X ) + H (X, DU (t, X )) = 0. (5.2) We say that u :[0, T ]× P (R ) → R is a viscosity subsolution (resp. supersolution) of (5.1)in [0, T ) × P (R ) if and only if its lift is a viscosity subsolution (resp. 2 2 supersolution) of (5.2)in [0, T ) × L (). We recall that U :[0, T ]× L () → R P P is a 1 2 • viscosity subsolution of (5.2) if for any test function φ ∈ C ([0, T ]× L ()) such that U − φ has a local maximum at (t , X ) ∈[0, T ) × L () it holds 0 0 −∂ φ(t , X ) + λU (t , X ) + H (X , Dφ(t , X )) ≤ 0; t 0 0 0 0 0 0 0 1 2 • viscosity supersolution of (5.2) if for any test function φ ∈ C ([0, T ]× L ()) such that U − φ has a local minimum at (t , X ) ∈[0, T ) × L () it holds 0 0 −∂ φ(t , X ) + λU (t , X ) + H (X , Dφ(t , X )) ≥ 0; t 0 0 0 0 0 0 0 • viscosity solution of (5.2) if it is both a supersolution and a subsolution. Remark 5.3. Assume u :[0, T ]× P (R ) → R is constant in time, i.e., with slight abuse of notation we can identify u(t,μ) = u(μ) for any (t,μ) ∈[0, T ]× P (R ), with u : P (R ) → R. Then, (5.1) and (5.2) become, respectively λu(μ) + H (μ, D u(μ)) = 0,λU (X ) + H (X, DU (X )) = 0, (5.3) where U : L () → R is the lift of u. Moreover, the test functions in Definition 5.2 can be taken independent of t, i.e., 1 2 • U is a viscosity subsolution of (5.3) if for any test function φ ∈ C (L ()) such that U − φ has a local maximum at X ∈ L () it holds λU (X ) + 0 0 H (X , Dφ(X )) ≤ 0; 0 0 1 2 • U is a viscosity supersolution of (5.3) if for any test function φ ∈ C (L ()) such that U − φ has a local minimum at X ∈ L () it holds λU (X ) + 0 0 H (X , Dφ(X )) ≥ 0. 0 0 Vol. 21 (2021) Compatibility of state constraints 4503 • U is a viscosity solution of (5.3) if it is both a supersolution and a subsolution. Theorem 5.4. (Comparison principle) Assume that there exists L , C > 0 such that the 2 2 Hamiltonian function H : L () × L () → R satisfies the following assumption: P P 2 2 ( H ) for any X, Y ∈ L (), any a, b , b > 0 and C , C ∈ L (), 1 2 1 2 P P H (Y, a(X − Y ) − b Y − C ) − H (X, a(X − Y ) + b X + C ) 1 1 2 2 ≤ X − Y + 2aL X − Y + 1/2 + C (1 + m (Y P)) (1 + Y 2 )( C 2 + b Y 2 )+ 1 1 2 L L L P P P 1/2 + C (1 + m (X P)) (1 + X 2 )( C 2 + b X 2 ). 2 2 2 L L L P P P Let λ ≥ 0. Then, if u , u ∈ UC ([0, T ]× P (R )) are a subsolution and a superso- 1 2 2 lution of (5.1), respectively, we have sup (u − u ) ≤ sup (u − u ) . (5.4) 1 2 1 2 d d [0,T ]×P (R ) {T }×P (R ) 2 2 Proof. The proof follows the line of the corresponding classical finite-dimensional argument (see, e.g., Theorem II.2.12 p. 107) in [6]. In the following, we define G := 2 2 2 2 R × L () and, for any (t, X ) ∈ G,weset (t, X ) := |t | + X . We denote P G A := [0, T ]× L () ⊂ G, that is a complete metric space with distance induced by the norm · of G. Let U , U : A → R be, respectively, the lift functionals for u and u as in 1 2 1 2 Definition 5.1(1). We define the functional  : A → R by setting (t, X ) − (s, Y ) (t, X, s, Y ) :=U (t, X ) − U (s, Y ) − + 1 2 2ε 2 m/2 2 m/2 − β (1 + X ) + (1 + Y ) + η(t + s), 2 2 L L P P where ε, β, m,η > 0 are positive constants which will be chosen later. Notice that d 2 since u ∈ UC ([0, T ]× P (R )), i = 1, 2, we have U ∈ UC ([0, T ]× L ()). i 2 i Indeed, for all X, Y ∈ L (), t, s ∈[0, T ], |U (t, X ) − U (s, Y )|=|u (t, X P) − u (s, Y P)|≤ ω |t − s| + W (X P, Y P) i i i i i 2 ≤ ω ( (t, X ) − (s, Y ) ) , where ω (·) is the modulus of continuity of u and where we used the fact that u i W (X P, Y P) ≤ X − Y 2 . Set + + A := sup (u − u ) = sup (U − U ) . 1 2 1 2 d 2 {T }×P (R ) {T }×L For R > 0, i = 1, 2, set (R ) := sup{|U (t, X ) − U (s, Y )|: (t, X ) − (s, Y ) ≤ R }; i i i G 4504 G. Cavagnari et al. J. Evol. Equ. by uniform continuity we have (R ) sup < +∞. (5.5) 1 + R R ≥0 Thus, U (t, X ) − U (s, Y ) = U (t, X ) − U (T , X ) + U (T , X ) − U (T , X ) 1 2 1 1 1 2 + U (T , X ) − U (s, Y ) 2 2 ≤  (T − t ) + A +  ( (T , X ) − (s, Y ) ) 1 2 G for all (t, X, s, Y ) ∈ A .By(5.5), there exists C > 0 such that |U (t, X ) − U (s, Y )|≤ C (1 + X − Y 2 ), for all (t, X, s, Y ) ∈ A . (5.6) 1 2 The proof proceeds by contradiction: assume that there exist (t , μ) ˜ ∈[0, T]× ˜ ˜ P (R ) and δ> 0 such that u (t , μ) ˜ − u (t , μ) ˜ = A + δ. In particular, for any 2 1 2 ˜ ˜ ˜ ˜ X ∈ L () such that X P =˜ μ, it holds U (t˜, X ) − U (t˜, X ) = A + δ. 1 2 Select β, η > 0 such that 2 m/2 ˜ ˜ ˜ ˜ ˜ ˜ A + ≤ A + δ − 2β(1 + X ) + 2ηt = (t , X , t , X ) ≤ sup . 2 P 2 0 2 Noting that  ∈ C (A ), by taking ε< and recalling (5.6), we have 2C lim (t, X, s, Y ) =−∞, X →+∞ Y →+∞ for any t, s ∈[0, T ]. Therefore, there exists R > 0 such that sup (t, X, s, Y ) = sup (t, X, s, Y ). 2 2 ([0,T ]×B (0,R)) Thus, by Stegall’s Variational Principle (see, e.g., Theorem 6.3.5 in [8]) for any fixed ξ> 0, there exists a linear and continuous functional  : G → R with  <ξ and such that  −  attains a strong maximum in ([0, T ]× B (0, R)) . Moreover, on ([0, T ]× B (0, R)) ,wehave 2 2 (t, X, s, Y ) − (t, X, s, Y ) ≥ (t, X, s, Y ) − 2ξ T + R , and so 2 2 sup  ≤ 2ξ T + R + sup ( − ). (5.7) ([0,T ]×B (0,R)) P Vol. 21 (2021) Compatibility of state constraints 4505 ¯ ¯ Let (t , X , s¯, Y ) ∈ ([0, T]× B 2 (0, R)) be a maximizer of  −  on ([0, T]× 2 δ 2 2 B 2 (0, R)) , obtained by choosing ξ> 0 s.t. 2ξ T + R ≤ . In particular, we get L 8 δ δ 2 2 ¯ ¯ ¯ ¯ ¯ ¯ A + ≤ sup  ≤ 2ξ T + R + ( − )(t , X , s¯, Y ) ≤ + ( − )(t , X , s¯, Y ) 2 2 8 δ δ 2 2 ¯ ¯ ¯ ¯ ¯ ¯ ≤ + (t , X , s¯, Y ) + 2ξ T + R ≤ + (t , X , s¯, Y ), 8 4 and so ¯ ¯ (t , X , s¯, Y ) ≥ A + , (5.8) leading to 2 m/2 2 m/2 ¯ ¯ β (1 + X ) + (1 + Y ) ≤ sup U − inf U − A − + η(t +¯s). 2 2 1 2 L L P P 4 By choosing 0 <η < 1, we get for all ε> 0, m ∈ (0, 1] 2 m/2 2 m/2 ¯ ¯ β((1 + X ) + (1 + Y ) ) ≤ sup U − inf U − A − + 2T =: d > 0. 1 2 2 2 L L P P 4 (5.9) By Riesz’ representation theorem, there exist unique (λ ,λ ,λ ,λ ) ∈ G such that 1 2 3 4 (t, X, s, Y ) = λ t +λ , X  + λ s +λ , Y  . 2 2 1 2 3 4 L L P P From (5.7), we have 2 2 ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ (t , X , t , X ) + (s¯, Y , s¯, Y ) ≤ 2 ( − )(t , X , s¯, Y ) + 4ξ T + R ¯ ¯ 2 2 ≤ 2(t¯, X , s¯, Y ) + 8ξ T + R , and so ¯ ¯ ¯ ¯ ¯ ¯ U (t , X ) − U (t , X ) + U (s¯, Y ) − U (s¯, Y )+ 1 2 1 2 2 m/2 2 m/2 ¯ ¯ − 2β (1 + X ) + (1 + Y ) + 2η(t¯ +¯s) 2 2 L L P P ¯ ¯ (t , X ) − (s¯, Y ) G 2 m/2 2 m/2 ¯ ¯ ¯ ¯ ≤ 2U (t , X ) − 2U (s¯, Y ) − − 2β (1 + X ) + (1 + Y ) + 1 2 2 2 L L ε P P 2 2 + 2η(t +¯s) + 8ξ T + R , which leads to ¯ ¯ (t , X ) − (s¯, Y ) ¯ ¯ ¯ ¯ ¯ ¯ ≤ U (t , X ) − U (s¯, Y ) + U (t , X ) − U (s¯, Y ) 1 1 2 2 2 2 +8ξ T + R . (5.10) 4506 G. Cavagnari et al. J. Evol. Equ. Take 0 <ξ <ε < 1. From the previous inequality, the boundedness of U , U in 1 2 [0, T ]× B (0, R) gives √ √ 2 2 ¯ ¯ (t , X ) − (s¯, Y ) ≤ B ε + 8ε T + R ≤ B ε, (5.11) for suitable constants B , B > 0 independent on ε. By uniform continuity of U , i = 1, 2, and by plugging the previous relation in (5.10), we can build a modulus of continuity ω(·) such that ¯ ¯ (t , X ) − (s¯, Y ) √ √ 2 2 ≤ ω(ε) := ω (B ε) + ω (B ε) + 8ε T + R .(5.12) u u 1 2 ¯ ¯ We show that neither t nor s¯ can be equal to T . Indeed, in t = T , ¯ ¯ ¯ ¯ ¯ ¯ (T , X , s¯, Y ) ≤ U (T , X ) − U (T , X ) + U (T , X ) − U (s¯, Y ) + η(T +¯s) 1 2 2 2 ≤ A + ω (B ε) + 2ηT , by definition of A. We thus get a contradiction with (5.8) by choosing ε and η small enough s.t. ω (B ε) + 2ηT < . The same reasoning applies for proving s¯ < T . We define the C (A) test functions (t, X ) − (s¯, Y ) φ(t, X ) := U (s¯, Y ) + + 2ε 2 m/2 2 m/2 + β (1 + X ) + (1 + Y ) − η(t +¯s)+ 2 2 L L P P + (t, X, s¯, Y ), (t , X ) − (s, Y ) ψ(s, Y ) := U (t , X ) − + 2ε 2 m/2 2 m/2 − β (1 + X ) + (1 + Y ) + η(t + s)+ 2 2 L L P P − (t , X , s, Y ). Notice that (U − φ)(t, X ) = ( − )(t, X, s¯, Y ), hence, U − φ attains its maximum 1 1 ¯ ¯ at (t , X ) ∈[0, T ) × B 2 (0, R) and, similarly, U − ψ attains its minimum at (s¯, Y ) ∈ [0, T ) × B 2 (0, R).Wehave ¯ ¯ t −¯s t −¯s ¯ ¯ ∂ φ(t , X ) = − η + λ,∂ ψ(s¯, Y ) = + η − λ , t 1 t 3 ε ε ¯ ¯ X − Y m−2 ¯ ¯ ¯ ¯ 2 Dφ(t , X ) = + mβ(1 + X ) X + λ , 2 2 ε P ¯ ¯ X − Y m−2 ¯ ¯ ¯ Dψ(s¯, Y ) = − mβ(1 + Y ) Y − λ . 2 4 ε P Since t , s¯ ∈[0, T ), by definition of viscosity sub/supersolution, we have ¯ ¯ ¯ ¯ ¯ ¯ ¯ − ∂ φ(t , X ) + λU (t , X ) + H (X , Dφ(t , X )) ≤ 0 ≤ t 1 ¯ ¯ ¯ ¯ ≤−∂ ψ(s¯, Y ) + λU (s¯, Y ) + H (Y , Dψ(s¯, Y )). t 2 Vol. 21 (2021) Compatibility of state constraints 4507 Now, by (5.8), we have ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ U (t , X ) − U (s¯, Y ) ≥ (t , X , s¯, Y ) − η(t +¯s) ≥ (t , X , s¯, Y ) − 2T η 1 2 ≥ A + − 2T η, and we can choose η sufficiently small so that A + − 2T η ≥ 0. Then, we get ¯ ¯ 2η ≤ 2η + λ(U (t , X ) − U (s¯, Y )) 1 2 ¯ ¯ ¯ ¯ ≤ λ + λ + H (Y , Dψ(s¯, Y )) − H (X , Dφ(t , X )). 1 3 We can now invoke assumption ( H ) with 1 m−2 a = , b = mβ(1 + Y ) , C = λ , 1 2 1 4 m−2 ¯ 2 b = mβ(1 + X ) , C = λ , 2 2 2 2 recalling that λ ,λ ≤ ε and λ 2 , λ 2 ≤ ε by the bound on the dual norm of 1 3 2 4 L L P P the operator . We get ¯ ¯ X −Y 1/2 ¯ ¯ ¯ ¯ 2η ≤ 2ε + X − Y 2 + 2L + λ 2 C (1 + m (Y P)) (1 + Y 2 )+ L ε L 2 L P P P m−2 1/2 ¯ ¯ ¯ ¯ +C (1 + m (Y P)) (1 + Y ) mβ(1 + Y ) Y + 2 2 2 L L P P 1/2 ¯ ¯ + λ C (1 + m (X P)) (1 + X )+ 2 2 L L P P m−2 1/2 ¯ ¯ ¯ ¯ +C (1 + m (X P)) (1 + X 2 ) mβ(1 + X ) X 2 . 2 L L P P ¯ ¯ By (5.11), (5.12) and recalling that X , Y ∈ B (0, R),wehave 2η ≤ 2ε + B ε + 2L ω(ε)+ m−2 m−2 2 2 ¯ ¯ 2 2 + 2ε D(1 + R) + D mβ (1 + Y ) + (1 + X ) ) , R 2 2 L L P P 1/2 where we defined D := D (1 + R) R, where D := max{C (1 + m (Y P)), C (1 + 1/2 m (X P))} > 0. Finally, by (5.9) we get 2η ≤ 2ε + B ε + 2L ω(ε) + 2ε D(1 + R) + D md ≤ Ko(1) + η, where for the last passage we choose m ≤ , and o(1) is a function of ε going to 0 D d + + as ε → 0 . This leads to a contradiction as ε → 0 . Remark 5.5. As highlighted also in Remark 3.8 p. 154 of [6], if λ = 0in (5.1), we can drop the symbol of the positive part in (5.4) and conclude that sup (u − u ) ≤ sup (u − u ). 1 2 1 2 d d [0,T ]×P (R ) {T }×P (R ) 2 2 4508 G. Cavagnari et al. J. Evol. Equ. 6. Viscosity characterization of viability and invariance We now provide the main results of the paper: Theorems 6.6 and 6.7. As pointed out viab also in Remark 4.2 in [18], by Theorem 8.2.11 in [4], the Hamiltonian H defined in Theorem 1.1 satisfies viab H (μ, p) =−d (μ) − inf v, p(x ) dμ(x ). (6.1) d v∈F (μ,x ) Definition 6.1. (Lifted Hamiltonian for viability) We define the lifted Hamiltonian in 2 viab L () associated with H P F viab H (X, Q) := −d (X P) − inf v ◦ X (ω), Q(ω) dP(ω), 2 d v(·)∈L (R ) X P v(x )∈F (X P,x ) for X P−a.e. x 2 viab viab for all X, Q ∈ L (). Note that H is a lift of H according to Definition 5.1. P F F By disintegrating P = (X P) ⊗ P (see Theorem 2.1), we have viab H (X, Q) =−d (X P) − inf v ◦ X (ω), Q(ω) dP (ω)dX P(x ) K x 2 d d −1 v∈L (R ) R X (x ) X P v(x )∈F (X P,x ) for X P−a.e. x =−d (X P) − inf v(x ), Q(ω)dP (ω) dX P(x ) K x 2 d d −1 v∈L (R ) R X (x ) X P v(x )∈F (X P,x ) for X P−a.e. x =−d (X P) − inf v, Q(ω)dP (ω) dX P(x ) K x (6.2) d v∈F (X P,x ) −1 R X (x ) =−d (X P) − inf v, Q(ω) dP (ω)dX P(x ) K x d −1 v∈F (X P,X (ω)) R X (x ) =−d (X P) − inf v, Q(ω) dP(ω) v∈F (X P,X (ω)) =−d (X P) − inf v(ω), Q(ω) dP(ω), v∈L () v(·)∈F (X P,X (·)) where in the last equality we used Theorem 8.2.11 in [4] (or Theorem 6.31 in [14]). Definition 6.2. (Lifted Hamiltonian for invariance) Related with the invariance prob- inv 2 lem and associated with H , we define the following lifted Hamiltonian in L () F P inv H (X, Q) := −d (X P) − sup v ◦ X (ω), Q(ω) dP(ω), 2 d v∈L (R ) X P v(x )∈F (X P,x ) for X P−a.e. x 2 inv inv for all X, Q ∈ L (). Notice that H is a lift of H according to Definition 5.1. P F F Moreover, the equivalences (6.1) and (6.2) hold also in this case replacing, respectively, viab viab inv inv H , H with H , H , and inf with sup. F F F F Vol. 21 (2021) Compatibility of state constraints 4509 viab Lemma 6.3. Assume ( F ) − ( F ). Then, both the Hamiltonian functions H and 1 2 inv H satisfy assumption ( H ) with L and C, respectively, as in ( F ) and (3.1). viab inv Proof. We prove here the assertion for H since the assertion for H can be proved F F 2 2 in the same way. Fix any X, Y ∈ L , a, b , b > 0 and C , C ∈ L , and denote 1 2 1 2 P P μ := X P, μ := Y P.Wehave 1 2 viab viab H (Y, a(X − Y ) − b Y − C ) − H (X, a(X − Y ) + b X + C ) = 1 1 2 2 F F − d (μ ) − inf {av, X (ω) − Y (ω)− b v, Y (ω)−v, C (ω)} dP K 2 1 1 (6.3) v∈F (μ ,Y (ω)) + d (μ ) + inf {aw, X (ω) − Y (ω)+ b w, X (ω)+w, C (ω)} dP. K 1 2 2 w∈F (μ ,X (ω)) d d Let p ∈ R . For any x , y ∈ R , define δ := L(W (μ ,μ ) +|x − y|).Given x ,y 2 1 2 any ε> 0, there exists z ∈ F (μ , x ) + δ B(0, 1) such that ε,p 1 x ,y inf v, p≥ inf z, p≥z , p− ε, ε,p v∈F (μ ,y) z∈F (μ ,x )+δ B(0,1) 1 x ,y where the first inequality comes from Lipschitz continuity of the set-valued map F. In particular, we can write z =ˆ w + δ w , with w ˆ ∈ F (μ , x ) and ε,p ε,p x ,y ε,p ε,p 1 w ∈ B(0, 1), thus getting ε,p inf v, p≥wˆ , p+ δ w , p− ε ε,p x ,y ε,p v∈F (μ ,y) ≥ inf w, p− δ | p|− ε. x ,y w∈F (μ ,x ) Hence, we have inf w, p− inf v, p≤ L(W (μ ,μ ) +|x − y|) | p|. (6.4) 2 1 2 w∈F (μ ,x ) v∈F (μ ,y) 1 2 Thus, for any x , y, c , c ∈ R and by choosing p = x − y, it holds 1 2 inf {aw, x − y+ b w, x+w, c } + 2 2 w∈F (μ ,x ) − inf {av, x − y− b v, y−v, c } 1 1 v∈F (μ ,y) { } ≤ a inf w, x − y+ sup b w, x+w, c  + 2 2 w∈F (μ ,x ) w∈F (μ ,x ) − a inf v, x − y+ sup {b v, y+v, c } 1 1 v∈F (μ ,y) v∈F (μ ,y) ≤ aL(W (μ ,μ ) +|x − y|) |x − y|+ 2 1 2 + sup {b w, x+w, c } + sup {b v, y+v, c } 2 2 1 1 w∈F (μ ,x ) v∈F (μ ,y) 1 2 ≤ aL(W (μ ,μ ) +|x − y|) |x − y|+ 2 1 2 + b sup w, x+ sup w, c + b sup v, y+ sup v, c 2 2 1 1 w∈F (μ ,x ) w∈F (μ ,x ) v∈F (μ ,y) v∈F (μ ,y) 1 1 2 2 ≤ aL(W (μ ,μ ) +|x − y|) |x − y|+ 2 1 2 + b |x | sup |w|+|c | sup |w|+ b |y| sup |v|+|c | sup |v|, 2 2 1 1 w∈F (μ ,x ) w∈F (μ ,x ) v∈F (μ ,y) v∈F (μ ,y) 1 1 2 2 4510 G. Cavagnari et al. J. Evol. Equ. where we used the Cauchy–Schwarz’s inequality. Integrating with respect to the mea- sure (X, Y, C , C )P on the variables (x , y, c , c ) and by (3.1), we get 1 2 1 2 inf {aw, X (ω) − Y (ω)+ b w, X (ω)+w, C (ω)} dP+ 2 2 w∈F (μ ,X (ω)) − inf {av, X (ω) − Y (ω)− b v, Y (ω)−v, C (ω)} dP 1 1 v∈F (μ ,Y (ω)) 1/2 ≤ 2aL X − Y + b C (1 + m (μ )) (1 + X 2 ) X 2 + 2 1 2 L L P P 1/2 + b C (1 + m (μ )) (1 + Y 2 ) Y 2 + 1 2 L L P P 1/2 1/2 + C C (1 + m (μ )) (1 + X ) + C C (1 + m (μ )) (1 + Y ) 2 2 2 2 2 1 1 2 L 2 L L 2 L P P P P recalling that W (X P, Y P) ≤ X − Y 2 . We conclude from (6.3), thanks to the Lipschitz continuity of d (·). Remark 6.4. Assume ( F ) − ( F ).Let μ ∈ P (R ) be fixed. Then, the set of contin- 1 2 2 2 d uous selections of F (μ, ·) is dense in L (R ) in the set of Borel selections of F (μ, ·). Indeed, let v(·) be a Borel selection of F (μ, ·). By Lusin’s Theorem, for any ε> 0 d d d there exists a compact K ⊆ R and a continuous map w : R → R such that ε ε v = w on K and μ(R \ K )<ε. By Corollary 9.1.3 in [4], we can extend w ε ε ε ε|K to a continuous selection v of F (μ, ·). Moreover, we have v − v ≤ 2 χ |F (μ, ·)| . 2 d 2 L R \K L μ μ 1/2 Since |F (μ, x )|≤|F (δ , 0)|+ Lm (μ) + L|x |, we have that 1/2 1/2 v − v 2 ≤ 2 |F (δ , 0)|+ 2Lm (μ) χ d ≤ ε |F (δ , 0)|+ 2Lm (μ) , ε 0 0 L R \K 2 ε 2 μ 2 and the right hand side tends to 0 as ε → 0 . viab inv Now, we deduce that the value functions V and V satisfy the following Hamilton–Jacobi equations. Proposition 6.5. Assume ( F ) − ( F ). Then, 1 2 viab (1) V is a viscosity solution of viab − ∂ u(t,μ) + H (μ, D u(t,μ)) = 0; (6.5) t μ inv (2) V is a viscosity solution of inv − ∂ u(t,μ) + H (μ, D u(t,μ)) = 0. (6.6) t μ 2 d viab Proof. We prove (1).Let U :[0, T ]× L (; R ) → R be the lift of V according to Definition 5.1. Claim 1. U is a viscosity supersolution of −∂ U (t, X ) + H (X, DU (t, X ) = 0. t F Vol. 21 (2021) Compatibility of state constraints 4511 2 d 1 Proof of Claim 1. Let φ :[0, T ]× L (; R ) → R be a C map such that U − φ attains its minimum at (s, X ), and define μ = X P.Let μ ={μ } be an optimal t t ∈[s,T ] trajectory defined on [s, T ] with μ = μ, its existence being assured by Proposition 4.2, and let η ∈ P(R ×  ) such that e η = μ for all t ∈[s, T ].Fix ε> 0 and [s,T ] t t ε 2 choose a family {Y } ⊆ L () of random variables satisfying the properties of t ∈[s,T ] Corollary A.3 related to μ. Then, by the Dynamic Programming Principle in Lemma 4.4 and optimality of μ, t t ε ε ε 0 =U (t, Y ) − U (s, Y ) + d (μ ) dτ = U (t, Y ) − U (s, X ) + d (μ ) dτ τ τ t s K t K s s ≥φ(t, Y ) − φ(s, X ) + d (μ ) dτ, t K ε ε where the equality U (s, Y ) = U (s, X ) holds since Y P = X P = μ and since U, s s as a lift, is law dependent. Therefore, there exists a continuous increasing function :[0, +∞[→ [0, +∞[ with (k)/k → 0as k → 0 such that we have 0 ≥φ(t, Y ) − φ(s, X ) + d (μ ) dτ t K ≥∂ φ(s, X )(t − s) +Dφ(s, X ), Y − X  2 + d (μ ) dτ + t τ t K ε ε Y − Y t s −  |t − s| 1 + + ε t − s 2 ε ε ≥∂ φ(s, X )(t − s) +Dφ(s, X ), Y − Y  2 + d (μ ) dτ − ε Dφ(s, X ) 2 t K τ t s L L P P e − e t s −  |t − s| 1 + + ε . t − s Dividing by t − s > 0, by Corollary A.3(3), we have 0 ≥∂ φ(s, X ) + inf Dφ(s, X ), v dP(ω) + d (μ ) dτ + t τ v∈F (X P,X (ω)) t − s ε 1 e − e t s − Dφ(s, X ) 2 −  |t − s| 1 + + ε + t − s t − s t − s 2 − ((  t ) + Lε) Dφ(s, X ) . By letting ε → 0 , we obtain 0 ≥∂ φ(s, X ) + inf Dφ(s, X ), v dP(ω) + d (μ ) dτ + t K τ v∈F (X P,X (ω)) t − s 1 e − e t s −  |t − s| 1 + − (  t ) · Dφ(s, X ) . t − s t − s η 4512 G. Cavagnari et al. J. Evol. Equ. e − e t s Recalling the boundedness of coming from Proposition 3.4, by letting t − s t → s ,wehave 0 ≥∂ φ(s, X ) + inf Dφ(s, X ), v dP(ω) + d (μ ), t K s v∈F (X P,X (ω)) viab i.e., −∂ φ(s, X ) + H (X, Dφ(s, X )) ≥ 0, where, as already discussed, we have viab H (X, Q) =−d (X P) − inf Q(ω), v dP(ω). v∈F (X P,X (ω)) viab Thus, U is a viscosity supersolution of −∂ U (t, X ) + H (X, DU (t, X )) = 0. viab Claim 2. U is a viscosity subsolution of −∂ U (t, X ) + H (X, DU (t, X ) = 0. 2 d 1 Proof of Claim 2. Let φ :[0, T ]× L (; R ) → R be a C map such that U − φ 2 d attains its maximum at (s, X ) and define μ = X P.Fix ε> 0, and let v ∈ L (R ) be such that v (x ) ∈ F (μ, x ) for μ-a.e. x ∈ R and Dφ(s, X )(ω), v ◦ X (ω) dP(ω) ≤ inf Dφ(s, X )(ω), v ◦ X (ω) dP(ω) + . 2 d v∈L (R ) X P v(·)∈F (X P,·) By Remark 6.4, we can suppose that v ∈ C , and by Lemma A.4 there exists an ε ε ε ε admissible trajectory μ ={μ } defined on [s, T ] with μ = μ, and η ∈ t ∈[s,T ] t s d ε ε P(R ×  ) such that e η = μ for all t ∈[s, T ] and [s,T ] t e − e t s lim − v ◦ e = 0. ε s t →s t − s 2 0 d By density, we can find v ˆ ∈ C (R ) such that v −ˆ v 2 ≤ ε. ε ε ε d ε Denote by V :  → R ×  a Borel map satisfying η = V P. Recalling ε [s,T ] ε ε ε Lemma A.2, since for all ε> 0we have μ = μ = e η = (e ◦ V )P = X P,we s s ε can find a sequence of measure-preserving Borel maps {r (·)} such that n∈N P ω ∈  :|X (ω) − e ◦ V ◦ r (ω)|≤ = 1, s ε ε,n ε,n ε ε and we set Y = e ◦ V ◦ r for all t ∈[s, T ]. In particular, Y P = μ for all t ε t n t t t ∈[s, T ]. We then have ε,n ε,n Y − Y e − e s t s t ε,n lim − v ◦ Y = lim − v ◦ e = 0. ε ε s + + t − s 2 t − s 2 t →s t →s L L Recalling the choice of v ˆ ,wehavealso ε,n ε,n v ◦ X −ˆ v ◦ X 2 = v ◦ Y −ˆ v ◦ Y 2 = v −ˆ v 2 ≤ ε. ε ε ε ε ε ε s s L L L P P Vol. 21 (2021) Compatibility of state constraints 4513 ε,n ε,n 1 h Since, by Lemma A.2, Y − X 2 ≤ , we can find a subsequence {Y } s s h∈N L n ε,n such that for P-a.e. ω ∈  it holds lim Y (ω) = X (ω). Therefore, h→+∞ s ε,n 2 lim |ˆ v ◦ Y (ω) −ˆ v ◦ X (ω)| dP(ω) = 0, (6.7) ε ε h→+∞ where we used the Dominated Convergence Theorem to pass to the limit under the integral sign, exploiting the global boundedness of v ˆ . From the Dynamic Programming Principle, for all t ∈[s, T ] we have ε,n ε,n ε 0 ≤ U (t, Y ) − U (s, Y ) + d (μ ) dτ t s τ t t ε,n ε,n h ε h ε = U (t, Y ) − U (s, X ) + d (μ ) dτ ≤ φ(t, Y ) − φ(s, X ) + d (μ ) dτ. t K t K τ τ s s Therefore, there exists a continuous increasing function  :[0, +∞[→ [0, +∞[ with (k)/k → 0as k → 0 such that we have ε,n h ε 0 ≤ φ(t, Y ) − φ(s, X ) + d (μ ) dτ t τ ε,n ε ≤ ∂ φ(s, X )(t − s) +Dφ(s, X ), Y − X  2 + d (μ ) dτ + t K t L τ ε,n ε,n h h Y − Y 1 t s +  |t − s| 1 + + t − s 2 n ε,n h ε,n ε ≤ ∂ φ(s, X )(t − s) +Dφ(s, X ), Y − Y  2 + d (μ ) dτ + Dφ(s, X ) 2 t K t s L τ L P P s h ⎛ ⎛ ⎞ ⎞ e − e 1 t s ⎝ ⎝ ⎠ ⎠ +  |t − s| 1 + + . t − s 2 n Dividing by t − s > 0, and recalling the choice of v ,wehave ε,n ε,n h h t Y − Y 1 t ε 0 ≤∂ φ(s, X ) +Dφ(s, X ),  2 + d (μ ) dτ + t K t − s t − s ⎛ ⎛ ⎞ ⎞ 1 1 1 e − e 1 t s ⎝ ⎝ ⎠ ⎠ + · Dφ(s, X ) 2 +  |t − s| 1 + + n t − s t − s t − s 2 n h h ≤∂ φ(s, X ) +Dφ(s, X ), v ◦ X  2 + t ε ε,n + Dφ(s, X ) 2 v ◦ X −ˆ v ◦ X 2 + vˆ ◦ X −ˆ v ◦ Y 2 + ε ε ε ε L L s L P P P ε,n ε,n h h Y − Y ε,n ε,n t ε,n h h h + vˆ ◦ Y − v ◦ Y 2 + − v ◦ Y + ε ε ε s s L s t − s 2 1 1 1 + d (μ ) dτ + · Dφ(s, X ) 2 + t − s n t − s ⎛ ⎛ ⎞ ⎞ 1 e − e 1 t s ⎝ ⎝ ⎠ ⎠ +  |t − s| 1 + + t − s t − s 2 n η 4514 G. Cavagnari et al. J. Evol. Equ. ≤∂ φ(s, X ) + inf Dφ(s, X )(ω), v ◦ X (ω) dP(ω) + + 2 d v∈L (R ) X P v(·)∈F (X P,·) ⎛ ⎞ e − e t s ε,n ⎝ ⎠ + Dφ(s, X ) 2ε + vˆ ◦ X −ˆ v ◦ Y + − v ◦ e + 2 2 ε ε ε s L s L P P t − s 2 1 1 1 1 e − e 1 t s + d (μ ) dτ + · Dφ(s, X ) 2 +  |t − s|(1 + 2 ) + . L L t − s n t − s t − s t − s η n h h By letting h →+∞ and thanks to (6.7), we have 0 ≤∂ φ(s, X ) + inf Dφ(s, X )(ω), v ◦ X (ω) dP(ω) + + 2 d v∈L (R ) X P v(·)∈F (X P,·) ⎛ ⎞ e − e t s ⎝ ⎠ + Dφ(s, X ) 2ε + − v ◦ e + ε s t − s 2 ⎛ ⎛ ⎞ ⎞ 1 1 e − e t s ⎝ ⎝ ⎠ ⎠ + d (μ ) dτ +  |t − s| 1 + . t − s t − s t − s 2 e − e t s By letting t → s and recalling the boundedness of coming from t − s 2 Proposition 3.4,wehave 0 ≤ ∂ φ(s, X ) + inf Dφ(s, X )(ω), v ◦ X (ω) dP(ω) + + 2ε Dφ(s, X ) + d (μ). t K 2 d P v∈L (R ) X P v(·)∈F (X P,·) Finally, letting ε → 0 yields 0 ≤∂ φ(s, X ) + inf Dφ(s, X )(ω), v ◦ X (ω) dP(ω) + d (μ ), t K s 2 d v∈L (R ) X P v(·)∈F (X P,·) viab i.e., in view of Definition 6.1, −∂ φ(s, X ) + H (X, Dφ(s, X )) ≤ 0. The proof of item (2) is omitted since it is a straightforward adaption of the previous argument just provided for item (1). We specify that, in this case, the proofs of the assertions regarding subsolutions and supersolutions are reversed, minimum has to be replaced by maximum and vice versa, the inequality signs are reversed and the signs of the terms involving ρ and ε need to be changed accordingly. We finish the section with our main results: a viscosity characterization of viability (Theorem 6.6) and invariance (Theorem 6.7). Theorem 6.6. (Characterization of viability) Assume ( F ) − ( F ) and let L = Lip(F ) 1 2 viab d and H as in Definition 6.1. Consider a W -closed subset K ⊆ P (R ). The fol- 2 2 lowing are equivalent: Vol. 21 (2021) Compatibility of state constraints 4515 (1) the function z :[0, T]× P (R ) → R, defined by z(t,μ) := d (μ),isa 2 K viscosity supersolution of viab d (L + 2)u(t,μ) + H (μ, D u(t,μ)) = 0, in [0, T ]× P (R ); (6.8) μ 2 (2) there exists T > 0 such that the function w :[0, T ]× P (R ) → R, defined by −(L+1)(t −T ) e − 1 w(t,μ) := d (μ), (6.9) L + 1 is a viscosity supersolution of viab d − ∂ u(t,μ) + H (μ, D u(t,μ)) = 0, in [0, T ]× P (R ); (6.10) t μ 2 (3) K is viable for the dynamics F. Proof. For any T > 0, consider the decreasing function α :[0, T]→ R defined as −(L+1)(t −T ) e − 1 α(t ) = . (6.11) L + 1 We denote by W (t, X ) := w(t, X P) the lift of w(·) according to Definition 5.1(1). Proof of (1 ⇒ 2).Let d be a supersolution to (6.8) (cf. Remark 5.3). Fix t ∈ 2 2 1 [0, T ), μ and X ∈ L ().Let  :[0, T ]× L () → R be a C test function such P P that W −  has a local minimum at (t, X ). We want to prove that viab −∂ (t, X ) + H (X, D(t, X )) ≥ 0. Since s → α(s)d (Y P) = W (s, Y ) is regular for any Y ∈ L (), then by the minimality we should have ∂ (t, X ) = ∂ W (t, X ), i.e. ∂ (t, X ) =˙ α(t )d (X P). s s s K Hence, for all (s, Y ) ∈[0, T ]× L () in a small enough neighborhood I of (t, X ), t,X (s, Y ) = α(s)ϕ(Y ) + g(s, Y ), 1 2 with ϕ ∈ C (L ()) s.t. ϕ(X ) = d (X P), (6.12) 1 2 g ∈ C ([0, T ]× L ()) s.t. ∂ g(t, X ) = 0, and ϕ, g such that W (s, Y ) − (s, Y ) ≥ W (t, X ) − (t, X ), (6.13) by local minimality of (t, X ). By definition of W and (6.13), we get α(s)[d (Y P) − ϕ(Y )]≥ g(s, Y ) − g(t, X ), K 4516 G. Cavagnari et al. J. Evol. Equ. for any (s, Y ) ∈ I . In particular, by choosing s = t, we obtain t,X d (Y P) ≥ ϕ(Y ) + [g(t, Y ) − g(t, X )], α(t ) with equality holding when Y = X. Thus, denoting with  : L () → R the function given by (Y ) := ϕ(Y ) + [g(t, Y ) − g(t, X )], α(t ) 1 2 we notice that  ∈ C (L ()) and that the map Y → d (Y P) −  (Y ) attains t t a local minimum in X. Thus, recalling also Remark 5.3, we can employ  as a test function for d to get viab (L + 2)d (X P) + H (X, D (X )) ≥ 0. (6.14) K t Notice that by (6.12), ∂ (t, X ) =˙ α(t )d (X P) =−[(L + 1)α(t ) + 1]d (X P), K K (6.15) D(t, X ) = α(t )Dϕ(X ) + Dg(t, X ) = α(t )D (X ). viab Recalling the definition of the lifted Hamiltonian H ,by(6.14) we obtain viab 0 ≤ (L + 2)d (X P) + H X, D(t, X ) α(t ) = (L + 2)d (X P) − d (X P) − inf v(ω), D(t, X )(ω) dP(ω). K K α(t ) v∈L () v(·)∈F (X P,X (·)) Multiplying by α(t ), we finally get viab [(L + 1)α(t ) + 1]d (X P) + H (X, D(t, X )) ≥ 0, thus viab −∂ (t, X ) + H (X, D(t, X )) ≥ 0, which concludes that w is a supersolution of (6.10). Proof of (2 ⇒ 3).Let T > 0 and assume that w(t,μ) = α(t )d (μ) is a viscosity viab supersolution of (6.10). We recall that H , given in Definition 6.1, satisfies the assumptions of Theorem 5.4 as proved in Lemma 6.3. In particular, if we denote by viab U (t, X ) := V (t, X P) the lift of the value function of Definition 4.1,wehave W (T , X ) = U (T , X ) = 0, for every X ∈ L (). viab Therefore, since both w and V are uniformly continuous (see Proposition 4.6), by Theorem 5.4 and Proposition 6.5,wehave U (t, X ) ≤ W (t, X ) for all (t, X ) ∈ Vol. 21 (2021) Compatibility of state constraints 4517 2 2 [0, T ]× L (). Thus, for all μ ∈ K and all X ∈ L () with X P = μ we obtain P P viab V (t,μ) = U (t, X ) = W (t, X ) = 0 for all t ∈[0, T ]. By Proposition 4.3,we conclude that there exists an admissible trajectory starting from μ and defined on [0, T ], which is entirely contained in K .So K is viable. Proof of (3 ⇒ 1). Assume that K is viable. Set d (Y ) := d (Y P) for all K K 2 1 2 2 Y ∈ L (), i.e., d is the lift of d .Let φ ∈ C (L ()) and X ∈ L () be such K K P P P that d − φ has a local minimum at X, and set μ = X P ∈ P (R ). ε ε ε For any ε> 0 and T > 0, there exist μ ¯ ∈ K , and μ ¯ ∈ A (μ ¯ ) satisfying [0,T ] ε ε W (μ, μ ¯ ) ≤ d (μ) + ε and μ ¯ ⊆ K . By Grönwall’s inequality (Lemma 3.3), there ε ε d ε ε exists μ ∈ A (μ), η ∈ P(R ×  ) such that μ = e η , and [0,T ] [0,T ] t Lt Lt ε ε ε Lt +te ε Lt +te d (μ ) ≤ W (μ , μ ¯ ) ≤ e · W (μ, μ ¯ ) ≤ e · (d (μ) + ε), K 2 2 K t t t for all t ∈[0, T ]. According to Corollary A.3 applied to μ ,set ε ε (  t ) := W (μ ,μ ) + e − e 2 dτ, 2 τ 0 τ 0 L ε 2 ε ε there exists a family {Y } ⊆ L () satisfying Y P = μ for all t ∈[0, T ] and t ∈[0,T ] t P t t ε ε Y − Y p,  2 ≥ inf p(ω), v dP(ω) − ((  t ) + Lε) p 2 L L P P t v∈F (X P,X (ω)) viab =− d (X P) − H (X, p) − ((  t ) + Lε) p 2 K F 2 ε for any p ∈ L () (recall that μ = μ = X P = Y P). According to the choice of P 0 X,wehave ε ε ε ˆ ˆ d (μ ) − d (μ) d (Y ) − d (X ) φ(Y ) − φ(X ) K K K K t t t = ≥ . (6.16) t t t We estimate the first term as follows Lt ε ε ε ε Lt +te d (μ ) − d (μ) W (μ , μ ¯ ) − W (μ, μ ¯ ) ε e − 1 ε K K 2 2 t t t ε ≤ + ≤ · W (μ, μ ¯ ) + t t t t t Lt Lt +te e − 1 ε ≤ · (d (X P) + ε) + . t t 4518 G. Cavagnari et al. J. Evol. Equ. Concerning the right hand side of (6.16), we have that there exists a continuous increasing map  :[0, +∞) →[0, +∞) with (r )/r → 0as r → 0 such that ε ε ( Y − X 2 + t ) φ(Y ) − φ(X ) Y − X t t t P ≥Dφ(X ),  − t t t ε ε X − Y 2 Y − Y 0 L t 0 P ≥Dφ(X ),  2 − Dφ(X ) 2 · + L L P P t t ε ε ε − ( Y − Y 2 + Y − X 2 + t ) t 0 L 0 L P P ε ε ( e − e 2 + t + ε) t 0 Y − Y ε ε t η ≥Dφ(X ),  2 − Dφ(X ) 2 − L L P P t t t viab ≥−d (X P) − H (X, Dφ(X )) − (  t ) + Lε + Dφ(X ) 2 + e −e t 0 t 2 + 1 + ε t L − , where in the third inequality we employed the definition of Y provided in the proof of ε d Corollary A.3, i.e., Y = e ◦ W for any t ∈[0, T ],for some W :  → R × t ε ε [0,T ] e −e t 0 s.t. W P = η . Recalling now the uniform boundedness in ε of 2 coming t L + + from Proposition 3.4(3), by letting ε → 0 and t → 0 , and by setting φ(Y ) − φ(X ) := lim inf lim inf , + + t →0 ε→0 t we have viab −d (X P) − H (X, Dφ(X )) ≤  ≤(L + 1) · d (X P). K K viab This leads to (L +2)d (X P)+H (X, Dφ(X )) ≥ 0, i.e., d (μ) is a supersolution K K of (6.8). Theorem 6.7. (Characterization of invariance) Assume ( F ) − ( F ) and let L = 1 2 inv d Lip(F ) and H as in Definition 6.2. Consider a W -closed subset K ⊆ P (R ). 2 2 The following is equivalent: (1) the function z :[0, T]× P (R ) → R, defined by z(t,μ) := d (μ),isa 2 K viscosity supersolution of inv d (L + 2)u(t,μ) + H (μ, D u(t,μ)) = 0 in [0, T ]× P (R ); (6.17) μ 2 (2) there exists T > 0 such that the function w :[0, T ]× P (R ) → R, defined by (6.9), is a viscosity supersolution of inv d − ∂ u(t,μ) + H (μ, D u(t,μ)) = 0 in [0, T ]× P (R ); (6.18) t μ 2 (3) K is invariant for the dynamics F. Vol. 21 (2021) Compatibility of state constraints 4519 Proof. For any T > 0, consider the decreasing function α :[0, T]→ R defined as in (6.11). We denote by W (t, X ) := w(t, X P) the lift of w(·) defined in (6.9) according to Definition 5.1(1). Proof of (1 ⇒ 2). This part of the proof is the same as the one developed in Theorem inv viab 6.6 with H in place of H . F F viab inv Proof of (2 ⇒ 3). Same as in Theorem 6.6, with V replaced by V . Proof of (3 ⇒ 1). Assume that K is invariant. Set d (Y ) = d (Y P) for all K K 2 2 2 Y ∈ L (), i.e., d is the lift of d .Let φ ∈ C (L ()) and X ∈ L () be such K K P P P that d − φ has a local minimum at X, and set μ = X P ∈ P (R ). K 2 2 d d Fix ε> 0, and let v ∈ L (R ) be such that v (x ) ∈ F (μ, x ) for μ-a.e. x ∈ R ε ε and Dφ(X )(ω), v ◦ X (ω) dP(ω) ≥ sup Dφ(X )(ω), v ◦ X (ω) dP(ω) − . 2 d v∈L (R ) X P v(·)∈F (X P,·) By Remark 6.4, we can suppose that v ∈ C , and by Lemma A.4 there exists an ε ε ε ε admissible trajectory μ ={μ } defined on [0, T ] with μ = μ, and η ∈ t ∈[0,T ] t s d ε ε P(R ×  ) such that e η = μ for all t ∈[0, T ] and [0,T ] t e − e t 0 lim − v ◦ e = 0. ε 0 t 2 t →0 0 d By density, we can find v ˆ ∈ C (R ) such that v −ˆ v 2 ≤ ε. ε ε ε d ε Denote by V :  → R ×  a Borel map satisfying η = V P. Recalling ε [0,T ] ε Lemma A.2, since for all ε> 0we have μ = μ = e η = (e ◦ V )P = X P,we 0 0 ε can find a sequence of measure-preserving Borel maps {r (·)} such that n∈N P ω ∈  :|X (ω) − e ◦ V ◦ r (ω)|≤ = 1, 0 ε ε,n ε,n ε ε and we set Y = e ◦ V ◦ r for all t ∈[0, T ]. In particular, Y P = μ for all t ε t t n t t ∈[0, T ]. We then have ε,n ε,n Y − Y e − e t 0 t ε,n lim − v ◦ Y = lim − v ◦ e = 0. ε ε 0 + + t →0 t 2 t →0 t 2 L L Recalling the choice of v ˆ ,wehavealso ε,n ε,n v ◦ X −ˆ v ◦ X 2 = v ◦ Y −ˆ v ◦ Y 2 = v −ˆ v 2 ≤ ε. ε ε ε ε ε ε L 0 0 L L P P ε,n ε,n 1 h Since, by Lemma A.2, Y − X 2 ≤ , we can find a subsequence {Y } h∈N 0 L n 0 ε,n such that for P-a.e. ω ∈  it holds lim Y (ω) = X (ω). Therefore, h→+∞ ε,n h 2 lim |ˆ v ◦ Y (ω) −ˆ v ◦ X (ω)| dP(ω) = 0, (6.19) ε ε h→+∞ 4520 G. Cavagnari et al. J. Evol. Equ. where we used the Dominated Convergence Theorem to pass to the limit under the integral sign, exploiting the global boundedness of v ˆ . n n h h Now, let μ ¯ ∈ K such that W (μ, μ ¯ ) ≤ d (μ)+ . By Grönwall’s inequality 2 K ε ε,n n h h (Lemma 3.3), given μ as before there exist μ ¯ ∈ A (μ ¯ ) such that [0,T ] Lt Lt 1 ε ε ε,n Lt +te n Lt +te d (μ ) ≤ W (μ , μ ¯ ) ≤ e · W (μ, μ ¯ ) ≤ e · d (μ) + , 2 2 K t t t K ε,n for all t ∈[0, T ], where we used the fact that μ ¯ ⊆ K by invariance of the set K ε,n and since μ ¯ =¯ μ ∈ K . According to the choice of X,wehave ε,n ε,n ε h h ˆ ˆ d (μ ) − d (μ) d (Y ) − d (X ) φ(Y ) − φ(X ) K t K K t K t = ≥ . (6.20) t t t We estimate the first term as follows ε,n ε ε h n d (μ ) − d (μ) W (μ , μ ¯ ) − W (μ, μ ¯ ) 1 1 K K 2 2 t t t ≤ + · t t n t Lt Lt Lt +te Lt +te e − 1 1 1 e − 1 1 1 1 ≤ · W (μ, μ ¯ ) + · ≤ · d (X μ) + + · . 2 K t n t t n n t h h h (6.21) Concerning the right hand side of (6.20), we have that there exists a continuous increasing map  :[0, +∞) →[0, +∞) with (r )/r → 0as r → 0 such that ε,n ε,n ε,n h h ( Y − X + t ) φ(Y ) − φ(X ) Y − X t L t t P ≥Dφ(X ),  − t t t ε,n ε,n ε,n h h X − Y 2 Y − Y 0 L 0 P ≥Dφ(X ),  2 − Dφ(X ) 2 · + L L P P t t ε,n ε,n ε,n h h h − ( Y − Y 2 + Y − X 2 + t ) 0 L 0 L P P ε,n ε,n h h Y − Y 1 1 t 0 ≥Dφ(X ),  − · Dφ(X ) + 2 2 L L P P t n t e − e 2 + t + t 0 − . t Vol. 21 (2021) Compatibility of state constraints 4521 Recalling the choice of v ,wehave ε,n φ(Y ) − φ(X ) ≥Dφ(X ), v ◦ X  2 + ε,n − Dφ(X ) 2 v ◦ X −ˆ v ◦ X 2 + vˆ ◦ X −ˆ v ◦ Y 2 + ε ε ε ε L L 0 L P P P ε,n ε,n h h Y − Y ε,n ε,n t ε,n h h 0 h + vˆ ◦ Y − v ◦ Y 2 + − v ◦ Y + ε ε ε 0 0 L 0 t 2 1 1 1 e − e 1 t 0 − · Dφ(X ) 2 −  t 1 + + n t t t 2 n h h ≥ sup Dφ(X )(ω), v ◦ X (ω) dP(ω) − + 2 d v∈L (R ) X P v(·)∈F (X P,·) e − e t 0 ε,n − Dφ(X ) 2 2ε + vˆ ◦ X −ˆ v ◦ Y 2 + − v ◦ e + ε ε ε 0 L 0 L P P t 2 1 1 1 e − e 1 t 0 − · Dφ(X ) −  t 1 + + . n t t t 2 n h h e −e t 0 Recalling now the uniform boundedness in ε of 2 coming from Proposition t ε + + 3.4(3), by letting h →+∞, t → 0 and ε → 0 , and by setting ε,n φ(Y ) − φ(X ) := lim inf lim inf lim inf , + + ε→0 t →0 h→+∞ t we have, thanks also to (6.19), inv ≥ sup Dφ(X )(ω), v ◦ X (ω) dP(ω) =−d (X P) − H (X, Dφ(X )). K F 2 d v∈L (R ) X P v(·)∈F (X P,·) (6.22) Thus, by passing to the limit also in (6.21) and combining that estimate with (6.22), we get inv −d (X P) − H (X, Dφ(X )) ≤  ≤ (L + 1) · d (X P). K K inv This leads to (L +2)d (X P)+ H (X, Dφ(X )) ≥ 0, i.e., d (μ) is a supersolution K K of (6.17) (cf. Remark 5.3). 7. An example d d Given μ ∈ P (R ), x ∈ R , u ∈ R,let U =[1/2, 3/2], U =[−3/2, 3/2] and d d d define the functions f, g : P (R ) × R × R → R as 1/2 −|x | f (μ, x , u) := u arctan(1 − m (μ))e x , g(μ, x , u) :=πux . 2 4522 G. Cavagnari et al. J. Evol. Equ. d d d Define the set-valued maps F, G : P (R ) × R ⇒ R as F (μ, x ) := { f (μ, x , u) : u ∈ U } , G(μ, x ) := g(μ, x , u) : u ∈ U , and the closed set K := {μ ∈ P (R ) : m (μ) ≤ 1}={X P : X 2 ≤ 1}. 2 2 L () Notice that F, G satisfy the assumptions ( F ) − ( F ) and G(μ, x ) ⊇ F (μ, x ).In 1 2 particular, −|X (ω)| F (X P, X (ω)) = λ arctan(1 − X )e X (ω) : λ ∈[1/2, 3/2] . We have 1/2 m (μ) − 1, if μ/ ∈ K , d (μ) = 0, if μ ∈ K . 1/2 Indeed, to prove that d (μ) ≤ m (μ) − 1 for all μ/ ∈ K ,takea W -geodesic K 2 1/2 {ξ } 1/2 with constant speed joining δ to μ/ ∈ K .Wehavem (ξ ) = t 0 1 t ∈[0,m (μ)] W (δ ,ξ ) = 1, and W (μ, δ ) = W (μ, ξ ) + 1. So ξ ∈ K and d (μ) ≤ 2 0 1 2 0 2 1 1 1/2 m (μ) − 1. Conversely, fix ε> 0 and let μ ∈ K be such that d (μ) ≥ W (μ, μ ) − ε. Then, recalling that W (μ ,δ ) ≤ 1, we have 2 ε 2 ε 0 1/2 d (μ) + 1 ≥ W (μ, μ ) + W (μ ,δ ) − ε ≥ W (μ, δ ) − ε = m (μ) − ε. 2 ε 2 ε 0 2 0 By letting ε → 0 , we have the desired inequality. The lift of d (·) is the convex function U : L () → R defined as X 2 − 1, if X 2 ≥ 1, L L ˆ P P U (X ) = 0, otherwise. 1 2 The function U (·) is C in the open set D := {X ∈ L : X 2 = 1}.Thus,if P L 1 2 ψ ∈ C (L ()) is such that U − ψ attains a local minimum at X ∈ D then 0, if X 2 < 1, Dψ(X ) = DU (X ) = ⎪ , if X 2 > 1. ⎩ L 1 2 2 Let ψ ∈ C (L ) such that U −ψ attains a local minimum at X ∈ L with X 2 = 1. P P L By Propositions 1.2 and 1.5 in [17], we have that 2 2 ˆ ˆ ˆ Dψ(X ) ∈ ∂U (X ) := ξ ∈ L () : U (Y ) − U (X ) ≥ξ, Y − X  2 , ∀ Y ∈ L . P L P P Vol. 21 (2021) Compatibility of state constraints 4523 ˆ ˆ Conversely, given ξ ∈ ∂U (X ),set ψ(Y ) = U (X ) +ξ, Y − X  2 . Then, ψ ∈ C , U − ψ has a minimum at X, and Dψ(X ) = ξ. We want to prove that if X 2 = 1, then ∂U (X ) ={λX : λ ∈[0, 1]}. We prove ⊇.Given X, Y ∈ L with X = 1, and λ ∈[0, 1], it holds ˆ ˆ Y 2 − 1 = U (Y ) − U (X ), if Y 2 ≥ 1, L L P P λX, Y − X  2 ≤ λ( Y 2 − 1) ≤ L L P P ⎩ ˆ ˆ 0 = U (Y ) − U (X ), if Y < 1. ˆ ˆ Thus, in any case λX, Y − X  ≤ U (Y ) − U (X ), proving ⊇. Conversely, we prove ⊆.Let X ∈ L (), X 2 = 1, so U (X ) = 0. Assume that P L ˆ ˆ ˆ ξ = λX + λZ ∈ ∂U (X ), with Z 2 = 1, Z , X  2 = 0 and λ, λ ∈ R. We want to L L P P prove that λ ∈[0, 1] and λ = 0. Indeed, for all Y ∈ L () it holds ˆ ˆ ˆ ˆ U (Y ) − U (X ) ≥ξ, Y − X  2 =λX +λZ , Y − X  2 = λY, Z+ λ(Y, X  2 − 1). L L L P P P 2 2 By taking Y = aX + bZ,wehave U (Y ) = max{0, |a| +|b| − 1}, and so 2 2 max{0, |a| +|b| − 1}≥ bλ + λ(a − 1). • Choosing (a, b) = (2, 0) leads to λ ≤ 1. Choosing (a, b) = (1/2, 0) leads to λ ≥ 0. Therefore, 0 ≤ λ ≤ 1. 1 + b − 1 • Choose a = 1. Then for all b > 0, we have ≥ λ, and by passing to 1 + b − 1 ˆ ˆ the limit as b → 0 we have 0 ≥ λ. For all b < 0, we have ≤ λ, ˆ ˆ and by passing to the limit as b → 0 we have 0 ≤ λ. Therefore, λ = 0. We prove now that K is invariant for the dynamics F. Thanks to Theorem 6.7,we 1 2 have to prove that for every ψ ∈ C (L ) such that U − ψ attains a local minimum at X ∈ L it holds inv (L + 2)d (X P) + H (X, Dψ(X )) ≥ 0. We distinguish two cases • when X < 1, we have d (X P) = 0 and Dψ(X ) = 0, which implies inv H (X, Dψ(X )) = 0, so the equation is trivially satisfied. • when X 2 ≥ 1, we have d (X P) = X 2 − 1 and Dψ(X ) = λ , L L P P X 2 with λ = 1if X 2 > 1, and λ ∈[0, 1] otherwise, which implies 1 2 inv −|X (ω)| 2 H (X, Dψ(X )) =1 − X 2 − λ arctan(1 − X 2 )e |X (ω)| dP(ω) F L L P P ≥1 − X 2 , P 4524 G. Cavagnari et al. J. Evol. Equ. So, also in this case, we have inv (L + 2)d (X P) + H (X, Dψ(X )) ≥ (L + 2)( X − 1) + 1 − X ≥ 0, 2 2 L L P P from which we get the invariance, and thus the viability, of the set K for the dynamics F. Since all the admissible trajectories for F are also admissible for G,wehavethat K is viable for G. We prove now that K is not invariant for G. Indeed, take X ∈ L () 1 2 with X 2 = 1. Then, we can consider ψ ∈ C (L ()) s.t. ψ(Y ) = Y 2 in a L L P P neighborhood V of X.Given Y ∈ V,wehave U (Y ) − ψ(Y ) =−1if Y 2 ≥ 1 and ˆ ˆ U (Y ) − ψ(Y ) =− Y 2 ≥−1if Y 2 < 1. In particular, U (X ) − ψ(X ) =−1, L L P P so U − ψ attains in V a minimum at X, and Dψ(X ) = X. Set inv H (Y, Dψ(Y )) =−d (Y P) − sup v(ω), Dψ(Y )(ω) dP(ω), v∈L () v(·)∈G(Y P,Y (·)) we obtain (recalling that X 2 = 1) 3 3 inv H (X, Dψ(X )) =− π X, X  dP(ω) =− π. 2 2 Thus, inv (L + 2)d (X P) + H (X, Dψ(X )) =− π< 0, and therefore U (·) is not a supersolution of the invariance equation. On the other hand, set (see Definition 6.1) viab H (Y, Q) =−d (Y P) − inf v(ω), Q(ω) dP(ω). v∈L () v(·)∈G(Y P,Y (·)) For every v ∈ L () with v(·) ∈ F (Y P, Y (·)) ⊆ G(Y P, Y (·)), it holds viab H (Y, Q) ≥−d (Y P) − v(ω), Q(ω) dP(ω), and by taking the supremum in the right-hand side over the set {v ∈ L () : v(·) ∈ F (Y P, Y (·))}, we obtain viab inv H (Y, Q) ≥ H (Y, Q), G F 1 2 and therefore for every ψ ∈ C (L ) such that U − ψ attains a local minimum at X ∈ L it holds viab inv (L + 2)d (X P) + H (X, Dψ(X )) ≥ (L + 2)d (X P) + H (X, Dψ(X )) ≥ 0. K K G F Thus, K is viable for G, as already noticed. Vol. 21 (2021) Compatibility of state constraints 4525 Acknowledgements G.C. thanks LMBA, Univ Brest, where this research started. G.C. is also indebted to the University of Pavia where this research has been partially carried out, in particular G.C. has been supported by Cariplo Foundation and Regione Lombardia via project Varia- tional Evolution Problems and Optimal Transport, and by MIUR PRIN 2015 project Calculus of Variations, together with FAR funds of the Department of Mathematics of the University of Pavia. G.C. thanks also the support of the INdAM-GNAMPA Project 2019 Optimal transport for dynamics with interaction (“Trasporto ottimo per dinamiche con interazione”). M.Q. benefited from the support of the FMJH Program Gaspard Monge in optimization and operation research (PGMO 2016-1570H) and of the Air Force Office of Scientific Research under Award Number FA9550-18-1-0254. Funding Open access funding provided by Politecnico di Milano within the CRUI- CARE Agreement. Open Access. This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/ by/4.0/. Publisher’s Note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. Appendix A: Essential technical results Here, we report the proofs of the preliminary results presented in Sect. 3 as well as other technical results which have been significantly used in order to prove the main propositions and theorems of the present paper. In our opinion, these results could also be interesting by themselves. A.1: Proof of Proposition 3.4 Let μ ={μ } be an admissible trajectory defined in [a, b]. According to t t ∈[a,b] the superposition principle (Theorem 8.2.1 in [2] or Theorem 1 in [16]), there exists η ∈ P(R ×  ) such that μ = e η for all t ∈[a, b] and, for η-a.e. (x,γ ), [a,b] t t γ( ˙ t ) ∈ F (μ ,γ (t )), γ(a) = x. t 4526 G. Cavagnari et al. J. Evol. Equ. Set |F (μ , x )|= max{|y|: y ∈ F (μ , x )}.For η-a.e. (x,γ ) ∈ R ×  ,we s s [a,b] have t t |γ(t ) − γ(s)|≤ |˙ γ(τ)| dτ ≤ |F (μ ,γ (s))|+ LW (μ ,μ ) + L|γ(τ) − γ(s)| dτ s 2 τ s s s t t 1/2 ≤ (t − s)(K + Lm (μ ) + L|γ(s)|) + L W (μ ,μ ) dτ + L |γ(τ) − γ(s)| dτ. s τ s s s Grönwall’s inequality yields |(e − e )(x,γ )|=|γ(t ) − γ(s)|≤ g(t, s, |γ(s)|), t s where 1/2 L(t −s) g(t, s, r ) := e (t − s)(K + Lm (μ ) + Lr ) + L W (μ ,μ ) dτ . s 2 τ s 1/2 By taking the L -norm, e − e ≤ g(t, s, m (μ )), and so t s s η L 1/2 e − e g(t, s, m (μ )) t s ≤ . t − s t − s 1/2 By continuity, the right-hand side tends to K + 2Lm (μ ) as t → s , and so e − e t s t → is uniformly bounded in L in a right neighborhood of s. t − s d d Let p ∈ R , t ∈]s, b].For η-a.e. (x,γ ) ∈ R ×  , reasoning as in the first part [a,b] of the proof of Lemma 6.3,wehave t t e − e 1 1 t s p, (x,γ )= p, γ( ˙ τ) dτ ≤ sup p,v dτ t − s t − s t − s s s v∈F (μ ,γ (τ )) ≤ sup p,v+| p|· W (μ ,μ ) +|γ(τ) − γ(s)| dτ. 2 τ s t − s v∈F (μ ,γ (s)) s Therefore, e − e t s (x,γ ) ∈ F (μ ,γ (s)) t − s + W (μ ,μ ) +|(e − e )(x,γ )| dτ · B(0, 1). 2 τ s τ s t − s By Filippov’s theorem (Theorem 8.2.10 in [4]), there exists a Borel map w : R × d d → R , satisfying w(x,γ ) ∈ F (μ ,γ (s)) for η-a.e. (x,γ ) ∈ R ×  such [a,b] s [a,b] that e − e L t s (x,γ ) − w(x,γ ) ≤ W (μ ,μ ) +|(e − e )(x,γ )| dτ. 2 τ s τ s t − s t − s Thus, e − e L t s 1/2 − w ≤ W (μ ,μ ) + g(τ, s, m (μ )) dτ. 2 τ s s t − s t − s η Vol. 21 (2021) Compatibility of state constraints 4527 7.1. A.2: Proof of Proposition 3.5 For a proof of the nonemptiness of the set A (μ), we refer the reader to Theorem [a,b] 1in[16], where the authors perform a fixed point argument. (n) Let {μ } ⊆ A (μ ). By Proposition 3.4(2), for any n ∈ N there exists n∈N [a,b] 0 (n) (n) d (n) η ∈ P(R ×  ) such that e η = μ for all t ∈[a, b]. Moreover, for [a,b] t s ∈[a, b] with s < t,wehave 1/2 L(t −s) (n) e − e ≤e (t − s)(K + 2Lm (μ ))+ t s L s (n) (n) (n) +L W (μ ,μ ) dτ =: h(t, s). τ s (n) (n) Notice that W (μ ,μ ) ≤ e − e 2 . Indeed, it suffices to consider the admis- 2 s t s (n) (n) (n) (n) sible plan σ := (e , e )η ∈ (μ ,μ ). Thus, t s s (n) (n) W (μ ,μ ) ≤ h(t, s), t s and Grönwall’s inequality yields L(t −s) (n) 1/2 (n) L(t −s)(1+e ) (n) W (μ ,μ ) ≤ e (t − s)(K + 2Lm (μ )). (A.1) t s s By taking s = a, there exists C > 0 such that (n) 1/2 W (μ ,μ ) ≤ C (1 + m (μ )) for any t ∈[a, b], 2 0 0 (n) and since m (μ )< +∞, then we obtain uniform boundedness of {μ } . 2 0 n∈N 1/2 Moreover, by the triangle inequality and by recalling that m (μ) = W (μ, δ ) by 2 0 definition, we get for any s ∈[a, b] 1/2 1/2 1/2 (n) (n) m (μ ) ≤ W (μ ,μ ) + m (μ ) ≤ (1 + C )(1 + m (μ )). (A.2) 2 0 0 0 2 s s 2 2 Thus, combining the previous estimate with (A.1), there exists K > 0 such that (n) (n) W (μ ,μ ) ≤ K (t − s), 2 t (n) and hence μ are continuous for any n ∈ N, with uniformly bounded Lipschitz con- stants. By the Ascoli–Arzelà Theorem, we conclude that, up to an unrelabeled sub- sequence, there exists μ ={μ } ∈ AC([a, b]; P (R )) such that sup W t t ∈[a,b] 2 2 t ∈[a,b] (n) (μ ,μ ) → 0as n →+∞. We now prove the admissibility of μ. Notice that, by (3.1) and (A.2), we have 1/2 (n) sup |x|+|γ(a)|+ γ˙ dη (x,γ ) ≤ C m (μ ) + C , L ([a,b]) 0 n∈N R × [a,b] (A.3) 4528 G. Cavagnari et al. J. Evol. Equ. for some constants C , C > 0. Moreover, the map |x|+|γ(a)|+ γ˙ ∞ , if γ ∈ Lip([a, b]), L ([a,b]) (x,γ ) → +∞, otherwise, has compact sublevels in R ×  . Thus, by Remark 5.1.5 in [2], there exists [a,b] d (n) η ∈ P(R ×  ) such that η narrowly converges to η, up to (unrelabeled) [a,b] subsequences. By Proposition 5.1.8 in [2], for any (x,γ ) ∈ supp η there exists (n) d {(x ,γ )} ⊆ supp η s.t. x → x, γ ⇒ γ ∈ C ([a, b]; R ). n n n∈N n n Claim: if (x,γ ) ∈ supp η, then γ is a Lipschitz continuous solution of γ( ˙ t ) ∈ F (μ ,γ (t )), for a.e. t ∈[a, b], (A.4) γ(a) = x . (n) Indeed, let N := N ⊆[a, b], where n∈N (n) (n) N := {s ∈[a, b]: γ˙ (s) or γ˙ (s) ∈ F (μ ,γ (s))}. n n n (n) Notice that for any n ∈ N, N is a negligible set w.r.t. the Lebesgue’s measure, hence (n) so is N.Take t ∈[a, b]\ N . By Proposition 3.4, we have that γ˙ (t ) ∈ F (μ ,γ (t )), n n and by assumption ( F ), for any ε> 0 there exists n ¯ s.t. for any n ≥¯n (n) γ˙ (t ) ∈ F (μ ,γ (t )) ⊆ F (μ ,γ (t )) + εB(0, R). n n t In particular, by continuity of t → F (μ ,γ (t )) in [a, b] we have that {˙ γ (t )} is t n n∈N uniformly bounded for a.e. t ∈[a, b]. Hence, γ are continuous for any n ∈ N, with uniformly bounded Lipschitz constants, and {γ } is uniformly bounded. By the n n∈N Ascoli–Arzelà Theorem, we get that γ is a Lipschitz curve. We now prove that γ solves (A.4). Take any v ∈ R , and denote by σ (v) := sup v, z the support function of A ⊆ R at v. For any a ≤ s < t ≤ b,wehave z∈A t t γ (t ) − γ (s) 1 1 n n v, = v, γ˙ (τ ) dτ ≤ σ (n) (v) dτ F (μ ,γ (τ )) t − s t − s t − s τ s s (n) ≤ σ (v) + L|v| W (μ ,μ ) +|γ (τ ) − γ(τ)| dτ, F (μ ,γ (τ )) 2 τ τ n t − s where we used the Lipschitz continuity of F coming from ( F ). By uniform in time convergence, passing to the limit as n →+∞,wehave γ(t ) − γ(s) 1 v, ≤ σ (v) dτ F (μ ,γ (τ )) t − s t − s & ' ≤ σ (v) + L|v| W (μ ,μ ) +|γ(τ) − γ(s)| dτ. F (μ ,γ (s)) 2 τ s t − s Thus, for a.e. s, passing to the limit as t → s, we get v, γ( ˙ s)≤ σ (v) for F (μ ,γ (s)) any v ∈ R , whence γ( ˙ s) ∈ F (μ ,γ (s)) as claimed. s Vol. 21 (2021) Compatibility of state constraints 4529 Observe that, by continuity of e and uniqueness of the narrow limit, we have that (n) (n) μ = e η narrowly converges to μ = e η for any t ∈[a, b], up to subsequences t t t (see Lemma 5.2.1 in [2]). The rest of the proof is an adaptation of the proof of Theorem 1in[13]. In order to conclude the admissibility of μ, we notice that t → μ is a Lipschitz continuous map, indeed 2 2 W (μ ,μ ) ≤ |x − y| d(e , e )η t s t s d d R ×R 2 2 = |γ(t ) − γ(s)| dη(x,γ ) ≤ C |t − s| , [a,b] by Lipschitz continuity of γ in the support of η. According to Theorem 3.5 in [3], the 1 d map t → μ is differentiable almost everywhere in [a, b], and for all ϕ ∈ C (R ) d d ϕ(x ) dμ (x ) = ϕ(γ (t )) dη(x,γ ) = d d dt dt R R ∇ϕ(γ (t )) ·˙ γ(t ) dη(x,γ ) = ∇ϕ(y) γ( ˙ t ) dη (x,γ ) dμ (y), t,y t −1 d d R × R e (y) [a,b] where {η } ⊆ P(R ×  ) is the disintegration of η w.r.t. the evaluation t,y [a,b] y∈R operator e , i.e., η = μ ⊗ η . Finally, notice that the vector field t t t,y v (y) := γ( ˙ t ) dη (x,γ ) t t,y −1 e (y) is well-defined for a.e. t ∈[a, b] and μ -a.e. y ∈ R , moreover, by convexity of F (μ , y), we can use Jensen’s inequality to get that v (y) ∈ F (μ , y) for a.e. t and t t t μ -a.e. y. Hence the conclusion. 7.2. A.3: Technical results Corollary A.1. Assume ( F ) − ( F ). Let μ ={μ } be an admissible trajectory, 1 2 t t ∈[a,b] with 0 ≤ a < b < +∞. Then, there exists a family of random variables {X } ⊆ t t ∈[a,b] L () such that X P = μ for all t ∈[a, b], and t t X − X L t s (ω) ∈ F (X P, X (ω)) + [W (μ ,μ ) +|X (ω) − X (ω)|] dτ · B(0, 1), s s 2 τ s τ s t − s t − s 1/2 L(t −s) X − X 2 ≤ e (t − s)(K + 2Lm (μ )) + L W (μ ,μ ) dτ , t s s 2 τ s L 2 for all t, s ∈[a, b], with s < t. In particular, for every p(·) ∈ L () we have X − X t s lim infp,  ≥ inf p(ω), v dP(ω), (A.5) + P v∈F (X P,X (ω)) t →s t − s s s X − X t s lim supp,  2 ≤ sup p(ω), v dP(ω). (A.6) + t − s t →s  v∈F (X P,X (ω)) s s 4530 G. Cavagnari et al. J. Evol. Equ. Proof. Let μ ={μ } be an admissible trajectory defined in [a, b], and η ∈ t t ∈[a,b] P(R ×  ) be as in Proposition 3.4, with μ = e η for t ∈[a, b]. In particular, [a,b] t t see, e.g., Lemma 5.29 in [11], there exists a Borel map V :  → R × [a,b] such that η = V P, and thus μ = X P for all t ∈[a, b], where X = e ◦ V . t t t t Evaluating the estimates obtained in Proposition 3.4 for (x,γ ) = V (ω), and recalling that X = e ◦ V , X = e ◦ V , we obtain t t s s X − X t s (ω) ∈ F (X P, X (ω))+ s s t − s + [W (μ ,μ ) +|X (ω) − X (ω)|] dτ · B(0, 1), 2 τ s τ s t − s 1/2 L(t −s) X − X 2 ≤ e (t − s)(K + 2Lm (μ )) + L W (μ ,μ ) dτ . t s s 2 τ s L 2 Thus, for every p(·) ∈ L (),wehave X − X X − X t s t s p,  2 = p(ω), (ω) dP(ω) t − s t − s ≥ inf p(ω), v dP(ω)+ v∈F (X P,X (ω)) s s − | p(ω)| [W (μ ,μ ) +|X (ω) − X (ω)|] dτ dP(ω) (A.7) 2 τ s τ s t − s ≥ inf p(ω), v dP(ω)+ v∈F (X P,X (ω)) s s − p · W (μ ,μ ) + X − X dτ. 2 2 2 τ s τ s L L P P t − s By taking the liminf as t → s , and using the estimate on X − X 2 , we obtain τ s X − X t s lim infp,  ≥ inf p(ω), v dP(ω). + P t − s v∈F (X P,X (ω)) t →s s s In the same way, we prove the inequality for the limsup. We recall the following well-known result, used to prove Corollary A.3. Lemma A.2. (Lemma 5.23 p. 379 in [11]) Let P be an atomless Borel probability 2 d measure on ,X, Y ∈ L (; R ) two random variables with the same law, i.e., −1 X P = Y P. Then for any ε> 0, there exist two Borel measurable maps r, r : →  such that −1 −1 • r and r are measure-preserving, i.e., r P = r P = P; −1 −1 • P({ω ∈  : r ◦ r (ω) = r ◦ r (ω) = ω}) = 1; • P({ω ∈  :|X (ω) − Y ◦ r (ω)|≤ ε}) = 1. In particular, we have X − Y ◦ r 2 ≤ ε. P Vol. 21 (2021) Compatibility of state constraints 4531 Corollary A.3. Assume ( F ) − ( F ). Let μ ={μ } be an admissible trajectory, 1 2 t t ∈[a,b] 2 d and X ∈ L () such that X P = μ . Let η ∈ P(R ×  ) such that μ = e η a [a,b] t t for any t ∈[a, b]. Then, for every ε> 0 there exists a family of random variables {Y } ⊆ L () such that t t ∈[a,b] (1) Y P = μ for all t ∈[a, b]; t t (2) Y − X ≤ ε, and so it holds Y − X ≤ Y − Y + ε; 2 2 2 a t t a L L L P P P (3) for every t ∈[a, b] and for every p(·) ∈ L () we have Y − Y t a p,  2 ≥ inf p(ω), v dP(ω) − ((  t ) + Lε) p 2 , L L P P t − a v∈F (X P,X (ω)) (A.8) Y − Y t a p,  ≤ sup p(ω), v dP(ω) + ((  t ) + Lε) p , 2 2 L L P P t − a v∈F (X P,X (ω)) where (  t ) := W (μ ,μ ) + e − e 2 dτ. 2 τ a τ a t − a Proof. Fix ε> 0. Let η ∈ P(R ×  ) represent μ, i.e., μ = e η. Since P [a,b] t t is an atomless Borel probability measure on a Polish space, as already noticed, there exists a Borel map V :  → R ×  such that η = V P. Set X = e ◦ V for [a,b] t t all t ∈[a, b]. Notice that for every measure-preserving map r :  → ,wehave η = (V ◦ r )P, since r P = P. Moreover, (X ◦ r )P = X P = μ for all t ∈[a, b]. t t t By Proposition 3.4,for η-a.e. (x,γ ) ∈ R ×  it holds [a,b] e − e t a (x,γ ) ∈ F (μ , e (x,γ )) + (t, x,γ ) · B(0, 1). a a t − a where (t, x,γ ) := W (μ ,μ ) +|(e − e )(x,γ )| dτ, 2 τ a τ a t − a + + and so (t, x,γ ) → 0 as t → a . Evaluating at (x,γ ) = V ◦ r (ω), and recalling that X = e ◦ V , we obtain t t X − X t a ◦ r (ω) ∈ F (μ , X ◦ r (ω)) + (t, V ◦ r (ω))B(0, 1) a a t − a ⊆ F (μ , X (ω)) + [(t, V ◦ r (ω)) +L|X (ω) − X ◦ r (ω)|] · B(0, 1). Since X P = X P = μ , by Lemma A.2 for any ε> 0 we can choose a measure- a a preserving map r = r such that |X (ω) − X ◦ r (ω)|≤ ε for P-a.e. ω ∈ .Sowe ε a have X − X t a ◦ r (ω) ∈ F (X P, X (ω)) + ( (t, V ◦ r (ω)) + Lε) · B(0, 1). ε ε t − a 4532 G. Cavagnari et al. J. Evol. Equ. Let Y = X ◦ r for all t ∈[a, b]. Then, as seen in the proof of Corollary A.1,we t t ε have Y − Y t a p,  2 ≥ inf v, p(ω) dP(ω) − ( (t, V ◦ r (·)) 2 + Lε) p 2 , L L L t − a P v∈F (X P,X (ω)) P P Y − Y t a p,  ≤ sup v, p(ω) dP(ω) + ( (t, V ◦ r (·)) + Lε) p , 2 2 2 L L L P P P t − a v∈F (X P,X (ω)) for every p ∈ L (). Notice that (1) Y P = X ◦ r P = X P = μ since r P = P; t t ε t t ε (2) we have Y − X 2 ≤ Y − Y 2 + Y − X 2 ≤ Y − Y 2 + ε; t t a a t a L L L L P P P P (3) it holds (t, V ◦ r (·)) 2 ≤ (  t ) = W (μ ,μ ) + e − e 2 dτ. 2 τ a τ a t − a From here follows the conclusion. Lemma A.4. Assume ( F ) − ( F ). Let μ ∈ P (R ),a ≥ 0 be fixed, and consider a 1 2 2 continuous selection v(·) of F (μ, ·). Then, there exist T > a and η ˆ ∈ P(R ×  ) [a,T ] ˆ ˆ ˆ such that, if we set θ = e η ˆ for all t ∈[a, T ] and θ ={θ } , t t t t ∈[a,T ] ˆ ˆ a. θ is an admissible trajectory with θ = μ defined on [a, T ]; d 1 b. for η ˆ-a.e. (x,γ ) ∈ R ×  we have γ ∈ C ([a, T ]) with γ( ˙ a) = v(x ), and [a,T ] γ( ˙ t ) ∈ F (θ ,γ (t )), for a.e. t ∈[a, T ], γ(a) = x ; e − e t a 2 + c. → v ◦ e in L as t → a . η ˆ t − a Proof. Without loss of generality, we set a = 0. According to Theorem 9.7.2 in [4], d d d there exists a continuous map f : P (R ) × R × B(0, 1) → R and a constant c d d independent on F such that for all (θ , x ) ∈ P (R ) × R it holds • F (θ , x ) ={ f (θ , x , u) : u ∈ B(0, 1)}. • for every u ∈ B(0, 1),the map (θ , x ) → f (θ , x , u) is Lipschitz continuous with Lipschitz constant less than c · Lip(F ), •| f (θ , x , u) − f (θ , x,v)|≤ c ·|F (θ , x )|·|u − v|. d d In particular, for all (θ , x ) ∈ P (R ) × R we have 1/2 | f (θ , x , u) − f (θ , x,v)|≤ c · K + Lip(F ) · m (θ ) +|x | ·|u − v|. Let 1/2 cLT cLT L = Lip(F ), K =|F (δ , 0)|, L > 2 2cL(1 + cLT e )m (μ) + cLT K e + K , 2 Vol. 21 (2021) Compatibility of state constraints 4533 and let T > 0 that will be fixed later. Given (x , u) ∈ R × B(0, 1) and a Lipschitz curve θ ={θ } ⊆ P (R ) with θ = μ and Lip(θ)< L , denote by γ (·) t t ∈[0,T ] 2 0 θ ,x ,u the unique solution of γ( ˙ t ) = f (θ ,γ (t ), u), γ (0) = x . For any (μ, ˆ q, r ) ∈ P (R ) × R × R define cL L 1/2 C (μ, ˆ q, r ) := r + cLrm (μ) ˆ + cLrq + rK , 1/2 cLr C (μ, ˆ q, r ) :=K + L L r + m (μ) ˆ + q + e C (μ, ˆ q, r ) , 2 1 & ' cLr C (μ, ˆ q, r ) :=e 1 + crC (μ, ˆ q, r ) . 3 2 For all 0 ≤ s ≤ t ≤ T , y ∈ R ,wehave | f (θ , y, u)| dτ ≤ t t ≤ | f (θ , y, u) − f (θ , y, u)| dτ + | f (θ , y, u) − f (δ , 0, u)| dτ + (t − s)| f (δ , 0, u)| dτ τ s s 0 0 s s 1/2 ≤cL W (θ ,θ ) dτ + cL(t − s)m (θ ) + cL(t − s)|y|+ (t − s)K ≤ C (θ , |y|, t − s), 2 τ s s 1 s where we used Lipschitz-in-time continuity of θ. Since |γ (t ) − γ (s)|≤ | f (θ ,γ (τ ), u) − f (θ ,γ (s), u)| dτ + θ ,x ,u θ ,x ,u τ θ ,x ,u τ θ ,x ,u t t + | f (θ ,γ (s), u)| dτ ≤ cL |γ (τ ) − γ (s)| dτ + C (θ , |γ (s)|, t − s), τ θ ,x ,u θ ,x ,u θ ,x ,u 1 s θ ,x ,u s s by Grönwall’s inequality, cL(t −s) |γ (t ) − γ (s)|≤ e C (θ , |γ (s)|, t − s). θ ,x ,u θ ,x ,u 1 s θ ,x ,u Choosing s = 0, for all t ∈[0, T ],wehave cLT |γ (t )|≤|x|+ e C (μ, |x |, T ). (A.9) θ ,x ,u 1 This implies also & ' |F (θ ,γ (t ))|≤ K + L W (θ ,δ ) +|γ (t )| t θ ,x ,u 2 t 0 θ ,x ,u 1/2 ≤ K + L(W (θ ,μ) + m (μ) +|γ (t )|) ≤ C (μ, |x |, T ). 2 t 2 θ ,x ,u 2 4534 G. Cavagnari et al. J. Evol. Equ. Notice that the map (x , u) → (x,γ ) is locally Lipschitz continuous. Indeed, θ ,x ,u |γ (t ) − γ (t )|≤ θ ,x ,u θ ,x ,v 1 2 ≤|x − x |+ | f (θ ,γ (τ ), u) − f (θ ,γ (τ ), v)| dτ 1 2 τ θ ,x ,u τ θ ,x ,v 1 2 ≤|x − x |+ | f (θ ,γ (τ ), u) − f (θ ,γ (τ ), v)| dτ + 1 2 τ θ ,x ,u τ θ ,x ,u 1 1 + | f (θ ,γ (τ ), v) − f (θ ,γ (τ ), v)| dτ τ θ ,x ,u τ θ ,x ,v 1 2 ≤|x − x |+ c |F (θ ,γ (τ ))| dτ ·|u − v|+ 1 2 τ θ ,x ,u + cL |γ (τ ) − γ (τ )| dτ θ ,x ,u θ ,x ,v 1 2 ≤|x − x |+ ctC (μ, |x |, T ) ·|u − v|+ cL |γ (τ ) − γ (τ )| dτ. 1 2 2 1 θ ,x ,u θ ,x ,v 1 2 By Grönwall’s inequality, for all t ∈[0, T ] we have cLT |γ (t ) − γ (t )|≤e (1 + cT C (μ, |x |, T ))(|x − x |+|u − v|) θ ,x ,u θ ,x ,v 2 1 1 2 1 2 =C (μ, |x |, T ) (|x − x |+|u − v|) . 3 1 1 2 This provides the Lipschitz continuity on all bounded subsets of R × B(0, 1) by the continuity of C (μ, ·, T ). By Filippov’s Theorem (see Theorem 8.2.10 in [4]), there exists a Borel map u : d d R → B(0, 1) such that v(x ) = f (μ, x , u(x )) for all x ∈ R .The map x → γ θ ,x ,u(x ) is a composition of Borel maps, so it is Borel, and we define η = μ ⊗ δ .We θ ,x ,u(x ) have by construction that • e η = μ; θ d 1 • for η -a.e. (x,γ ) ∈ R ×  we have γ ∈ C ([0, T ]) with γ(0) = x and γ( ˙ 0) = v(x ). We want to show now that t → e η is Lipschitz continuous with constant less than L . Indeed, given 0 ≤ s ≤ t ≤ T we have 1/2 θ θ 2 θ W (e η , e η ) ≤ e − e = |γ(t ) − γ(s)| dη (x,γ ) 2 t s t s θ d R × 1/2 cLT 2 θ ≤ e |C (θ , |γ(s)|, t − s)| dη (x,γ ) 1 s R × 1/2 cL L 1/2 2 2 θ ≤ (t − s) + cL(t − s)m (θ ) + cL(t − s) |γ(s)| dη (x,γ ) + (t − s)K . 2 d R × Notice that 1/2 1/2 m (θ ) = W (θ ,δ ) ≤ W (θ ,θ ) + W (θ ,δ ) ≤ L T + m (μ). s 2 s 0 2 s 0 2 0 0 2 2 Vol. 21 (2021) Compatibility of state constraints 4535 Moreover, by (A.9), we have 1/2 1/2 1/2 2 θ cLT 2 θ |γ(s)| dη (x,γ ) ≤ m (μ) + e |C (μ, |x |, T )| dη (x,γ ) d d R × R × T T cL L 1/2 1/2 cLT 2 ≤ m (μ) + e T + 2cLT m (μ) + TK 2 2 cL L cL L 1/2 2 cLT cLT cLT 2 cLT ≤ T e + (1 + 2cLT e ) m (μ) + TKe =: T e + B(μ, T ). 2 2 Thus, θ θ W (e η , e η ) 2 t s cL L cL L 1/2 2 cLT ≤|t − s| T + cL(L T + m (μ)) + cL( T e + B(μ, T )) + K 2 2 2 2 3 c L 1/2 2 cLT cLT cLT ≤|t − s| L ( cLT + T e ) + 2cL(1 + cLT e )m (μ) + cLT K e + K 2 2 =: S(μ, L , T ) |t − s|. (A.10) In particular, since we choose 1/2 cLT cLT > 2cL(1 + cLT e )m (μ) + cLT K e + K , there is T > 0 such that S(μ, L , T)< L , and so t → e η is Lipschitz continuous with constant less than L . (n) (n) Define by recurrence a sequence of curves {θ ={θ } } and of measures t t ∈[0,T ] n∈N (0) (n) (n) {η } by setting θ = μ for all t ∈[0, T ]. Supposing that we have defined θ , n∈N (n+1) (n) (n+1) (n) then we define η = μ ⊗ δ and θ by setting θ = e η . Notice γ t (n) t θ ,x ,u(x ) (n) (n) that, by construction, for all n ∈ N, θ = μ and θ is a Lipschitz continuous curve (n) with Lip(θ )< L ,by(A.10). Since we have the same estimate as in (A.3), then there exists η ∈ P(R ×  ) and (n ) (n ) k k a subsequence η such that η narrowly converges toward η. As already observed, (n ) we also have that θ is a family of uniformly bounded and continuous curves, with uniformly bounded Lipschitz constants. Thus, it has a subsequence which is uniformly convergent to a Lipschitz curve θ ={θ } . We now follow the same reasoning as t t ∈[0,T ] (n) in the last part of the proof of Proposition 3.5 with μ and μ replaced, respectively, (n ) by θ and θ .For η-a.e. (x,γ ), we get that γ( ˙ t ) ∈ F (θ ,γ (t )) for a.e. t ∈[0, T ], γ(0) = x, γ ∈ C ([0, T ]) and γ( ˙ 0) = v(x ). Thus, θ is an admissible trajectory and e − e t 0 + d (x,γ ) → v(x ),as t → 0 ,for η-a.e. (x,γ ) ∈ R ×  . We also notice that v(x ) = v ◦e (x,γ ) for η-a.e. (x,γ ) ∈ R ×  . Finally, recalling the estimates on the 0 T admissible trajectories provided in Proposition 3.4, by the Dominated Convergence Theorem we have that the convergence is actually in L . η 4536 G. Cavagnari et al. J. Evol. Equ. REFERENCES [1] G. Albi, N. Bellomo, L. Fermo, S.-Y. Ha, J. Kim, L. Pareschi, D. Poyato, and J. Soler, Vehicular traffic, crowds, and swarms: From kinetic theory and multiscale methods to applications and research perspectives, Mathematical Models and Methods in Applied Sciences 29 (2019), no. 10, 1901–2005, https://doi.org/10.1142/S0218202519500374. [2] Luigi Ambrosio, Nicola Gigli, and Giuseppe Savaré, Gradient flows in metric spaces and in the space of probability measures, 2nd ed., Lectures in Mathematics ETH Zürich, Birkhäuser Verlag, Basel, 2008. [3] Luigi Ambrosio and Bernd Kirchheim, Rectifiable sets in metric and Banach spaces, Math. Ann. 318 (2000), no. 3, 527–555, https://doi.org/10.1007/s002080000122. [4] Jean-Pierre Aubin and Hélène Frankowska, Set-valued analysis, Modern Birkhäuser Classics, Birkhäuser Boston Inc., Boston, MA, 2009. Reprint of the 1990 edition. [5] Yurii Averboukh, Viability theorem for deterministic mean field type control systems, Set-Valued Var. Anal. 26 (2018), no. 4, 993–1008. [6] Martino Bardi and Italo Capuzzo-Dolcetta, Optimal control and viscosity solutions of Hamilton- Jacobi-Bellman equations, Systems & Control: Foundations & Applications, Birkhäuser Boston Inc., Boston, MA, 1997. With appendices by Maurizio Falcone and Pierpaolo Soravia. [7] Alain Bensoussan, Jens Frehse, and Phillip Yam, Mean field games and mean field type control theory, SpringerBriefs in Mathematics, Springer, New York, 2013. [8] Jonathan M. Borwein and Qiji J. Zhu, Techniques of variational analysis, CMS Books in Mathe- matics/Ouvrages de Mathématiques de la SMC, vol. 20, Springer-Verlag, New York, 2005. [9] Rainer Buckdahn, Shige Peng, Marc Quincampoix, and Catherine Rainer, Existence of stochastic control under state constraints, C. R. Acad. Sci. Paris Sér. I Math. 327 (1998), no. 1, 17–22. [10] Pierre Cardaliaguet, Notes on Mean Field Games, 2013. From P.-L. Lions’ lectures at College de France, link to the notes. [11] René Carmona and François Delarue, Probabilistic Theory of Mean Field Games with Applications, vol I, Probability Theory and Stochastic Modeling, vol. 84, Springer International Publishing, 2018. [12] G. Cavagnari, S. Lisini, C. Orrieri, and G. Savaré, Lagrangian, Eulerian and Kantorovich formu- lations of multi-agent optimal control problems: equivalence and Gamma-convergence, Preprint: arXiv:2011.07117 [math.OC]. [13] Giulia Cavagnari, Antonio Marigonda, and Benedetto Piccoli, Superposition principle for differ- ential inclusions, Large-scale scientific computing, Lecture Notes in Comput. Sci., vol. 10665, Springer, Cham, 2018, pp. 201–209. [14] Francis Clarke, Functional analysis, calculus of variations and optimal control, Graduate Texts in Mathematics, vol. 264, Springer, London, 2013. [15] M. Fornasier, S. Lisini, C. Orrieri, and G. Savaré, Mean-field optimal control as gammalimit of finite agent controls, European J. Appl. Math. 30 (2019), no. 6, 1153–1186, https://doi.org/10. 1017/s0956792519000044. [16] Chloé Jimenez, Antonio Marigonda, and Marc Quincampoix, Optimal Control of Multiagent Sys- tems in the Wasserstein Space, Calculus of Variations and Partial Differential Equations 59 (2020), https://doi.org/10.1007/s00526-020-1718-6. [17] Alexander Kruger, On Fréchet Subdifferentials, Journal of Mathematical Sciences 116 (2003), no. 3, 3325-3358, https://doi.org/10.1023/A:1023673105317. [18] Antonio Marigonda and Marc Quincampoix, Mayer control problem with probabilistic uncertainty on initial positions, J. Differential Equations 264 (2018), no. 5, 3212–3252. [19] Nikolay Pogodaev, Optimal control of continuity equations, NoDEA Nonlinear Differential Equa- tions Appl. 23 (2016), no. 2, Art. 21, 24, https://doi.org/10.1007/s00030-016-0357-2. Vol. 21 (2021) Compatibility of state constraints 4537 Giulia Cavagnari Dipartimento di Matematica “F. Brioschi” Politecnico di Milano Piazza Leonardo da Vinci 32 20133 Milan Italy E-mail: giulia.cavagnari@polimi.it Antonio Marigonda Department of Computer Science University of Verona Strada Le Grazie 15 37134 Verona Italy E-mail: antonio.marigonda@univr.it Marc Quincampoix Laboratoire de Mathématiques de Bretagne Atlantique, UMR CNRS 6205 Univ Brest 6, Avenue Victor Le Gorgeu 29200 Brest France E-mail: marc.quincampoix@univ-brest.fr Accepted: 26 May 2021

Journal

Journal of Evolution EquationsSpringer Journals

Published: Dec 1, 2021

Keywords: Optimal control; Optimal transport; Hamilton–Jacobi–Bellman equation; Multi-agent; 49J15; 49J52; 49L25; 49K27; 49K21; 49Q20; 34A60; 93C15

References