Benoît Bonnet
email: benoit.bonnet@imj-prg.fr

Hélène Frankowska
email: helene.frankowska@imj-prg.fr

Necessary Optimality Conditions for Optimal Control Problems in Wasserstein Spaces

Keywords: Mean-Field Optimal Control, Wasserstein Spaces, Pontryagin Maximum Principle, Differential Inclusions, Inner-Approximations of Optimal Trajectories MSC2020 Subject Classification : 30L99, 34K09, 49J53, 49K21, 49Q22, 58E25

In this article, we derive first-order necessary optimality conditions for a constrained optimal control problem formulated in the Wasserstein space of probability measures. To this end, we introduce a new notion of localised metric subdifferential for compactly supported probability measures, and investigate the intrinsic linearised Cauchy problems associated to non-local continuity equations. In particular, we show that when the velocity perturbations belong to the tangent cone to the convexification of the set of admissible velocities, the solutions of these linearised problems are tangent to the solution set of the corresponding continuity inclusion. We then make use of these novel concepts to provide a synthetic and geometric proof of the celebrated Pontryagin Maximum Principle for an optimal control problem with inequality final-point constraints. In addition, we propose sufficient conditions ensuring the normality of the maximum principle.

Introduction

In recent years, the mathematical analysis of collective behaviours in large systems of interacting agents has been the object of a growing attention from several mathematical communities. The corresponding class of so-called multi-agent systems appears in a wide number of applications, including e.g. the modelling of autonomous vehicle ensembles [START_REF] Bullo | Distributed Control of Robotic Networks[END_REF], swarms and flocking structures in the animal kingdom [START_REF] Cucker | On the Mathematics of Emergence[END_REF], opinion dynamics on networks [START_REF] Bellomo | On the Dynamics of Social Conflicts: Looking for the Black Swan[END_REF] and pedestrian flows [START_REF] Cristiani | Multiscale Modeling of Pedestrian Dynamics[END_REF]. While these structures are frequently represented first-handedly as large dynamical systems formulated in finite-dimensional spaces -e.g. by means of families of ordinary differential equations or time-dependent graphs -, such discrete formulations often give rise to intractable problems. Indeed, the main difficulty inherent to the study of multi-agent systems is their very large dimensionality, which causes severe challenges when trying to compute solutions using numerical methods or to describe agent-to-agent interactions in a meaningful way. These aspects are particularly relevant in control-theoretic settings, where a policy maker aims at synthesising a control law which is as generic and global as possible in order to stir a system towards a desired goal. This type of control problems arise very frequently in the applied fields which were previously mentioned, see e.g. [START_REF] Albi | Invisible Control of Self-Organizing Agents Leaving Unknown Environments[END_REF][START_REF] Albi | Boltzmann type Control of Opinion Consensus through Leaders[END_REF][START_REF] Piccoli | Control to Flocking of the Kinetic Cucker-Smale model[END_REF] and references therein.

In this context, the first step in order to circumvent these high-dimension related issues is to identify adequate infinite-dimensional approximations of the class of multi-agent systems at hand, usually in the form of a family of partial differential equations. One subsequently aims at synthesising a control law directly at the level of the PDE, and finally at returning to the original problem by using the "infinite-dimensional" control signal to stir the original finite-dimensional system (see e.g. the introduction of [START_REF] Bonnet | Intrinsic Lipschitz Regularity of Mean-Field Optimal Controls[END_REF] for ampler details on this general scheme). To this day, the best identified framework to conduct such a program is that of mean-field approximations. In this setting, the discrete agent trajectories are replaced by a curve of measures µ(•), whose time-evolution is described by means of a non-local continuity equation (see Section 2.3 below) of the form ∂ t µ(t) + div v(t, µ(t))µ(t) = 0.

(1)

These equations appear very naturally when performing infinite-dimensional approximations of deterministic particle systems driven by ODEs, and are usually studied in the space of probability measures endowed with the Wasserstein metrics of optimal transport (see Section 2.1 below). For a modern introduction to this topic, we point to [START_REF] Muntean | Macroscopic and Large Scale Phenomena: Coarse Graining, Mean Field Limits and Ergodicity[END_REF] as well as to the survey [START_REF] Choi | The Derivation of Swarming Models: Mean-Field Limit and Wasserstein Distances[END_REF].

In this article, we investigate necessary optimality conditions for the mean-field optimal control problems of Bolza type (P )

                 min u(•)∈U T 0 L(t, µ(t), u(t))dt + ϕ(µ(T )) s.t.        ∂ t µ(t) + div v(t, µ(t), u(t))µ(t) = 0, µ(0) = µ 0 , µ(T ) ∈ Q T .
The minimisation in problem (P ) is taken over the set of admissible open-loop controls U := {t ∈ [0, T ] → u(t) ∈ U s.t. u(•) is L 1 -measurable}, where (U, d U ) is a compact metric space and L 1 denotes the standard one-dimensional Lebesgue measure. The state µ(•) of the system is stirred by the controlled non-local velocity field v : [0, T ]×P c (R d )×U ×R d → R d , while µ 0 ∈ P c (R d ) denotes a fixed initial datum and Q T ⊂ P 2 (R d ) is a closed set which represents final-point constraints. As customary in the modelling of optimal control problems, the cost is split into a final cost ϕ : P c (R d ) → R and a distributed running cost L : [0, T ] × P c (R d ) × U → R. Observe that in (P ), the state variable µ(•) is modelled as a curve of compactly supported measures. This comes from the fact that the aforedescribed applications of multi-agent systems usually involve compactly supported initial data, and that classical stability estimates (see e.g. Theorem 2.11 below) ensure that curves of measure solving non-local continuity equations starting from compactly supported data remain compactly supported at all subsequent times.

Optimal control problems in Wasserstein spaces of the form (P ) have been extensively studied in the past few years, mostly in the absence of final-point or running constraints. The first contributions on this topic [START_REF] Fornasier | Mean-Field Optimal Control as Gamma-Limit of Finite Agent Controls[END_REF][START_REF] Fornasier | Mean-Field Sparse Optimal Control[END_REF][START_REF] Fornasier | Mean Field Optimal Control[END_REF] were concerned with the rigorous convergence of discrete multi-agent optimal controls towards their infinite-dimensional counterparts (see also the more recent contributions [START_REF] Cavagnari | Lagrangian, Eulerian and Kantorovich Formulations of Multi-Agent Optimal Control Problems: Equivalence and Gamma-Convergence[END_REF][START_REF] Fornasier | Mean-Field Optimal Control as Gamma-Limit of Finite Agent Controls[END_REF]), which provides a constructive way of recovering the existence of optimal trajectories. In parallel to these investigations, several attempts were made at deriving necessary optimality conditions for mean-field optimal control problems. The first result of this kind was proposed in [START_REF] Bongini | Mean Field Pontryagin Maximum Principle[END_REF], where the authors proved a generalisation of the celebrated Pontryagin Maximum Principle ("PMP" in the sequel) for a multi-scale version of (P ). Therein, a family of open-loop controls acts on a finitedimensional subset of leaders, which allows to recover a PMP in Wasserstein spaces by passing to the limit in the finite-dimensional maximum principles as the number of agents goes to infinity. The first general derivation of the PMP for problem (P ) was obtained by the first author in [START_REF] Bonnet | The Pontryagin Maximum Principle in the Wasserstein Space[END_REF], and is based on a careful adaptation of the strategy of needle-variations to the abstract geometric structure of Wasserstein spaces. This result was further extended in [START_REF] Bonnet | A Pontryagin Maximum Principle in Wasserstein Spaces for Constrained Optimal Control Problems[END_REF] to problems with general final-point and running state constraints. In the latter contribution, the proof strategy combines a finite-dimensional non-smooth multipliers rule and outer-approximations of optimal trajectories by countable families of curves generated using needle-variations. We also mention the earlier work [START_REF] Pogodaev | Optimal Control of Continuity Equations[END_REF] in which the author independently derived an alternative version of the maximum principle for a very particular instance of problem (P ). This result was subsequently extended in the recent paper [START_REF] Pogodaev | Impulsive Control of Nonlocal Transport Equation[END_REF], in which a full PMP in the spirit of [START_REF] Bonnet | The Pontryagin Maximum Principle in the Wasserstein Space[END_REF] is derived for unconstrained impulsive control problems, by means of discrete approximations combined with Ekeland's principle. We likewise point out that a completely different approach to Pontryagin optimality conditions for mean-field optimal control problems -formulated in terms of McKean-Vlasov dynamics and stochastic differential equations -was independently developed in [START_REF] Carmona | Forward-Backward Stochastic Differential Equations and Controlled McKean Vlasov Dynamics[END_REF] (see also the recent monograph [18, Vol.I Chapter 6]).

In this manuscript, we revisit the necessary optimality conditions for problem (P ) by proposing a geometric proof of the maximum principle (see Theorem 4.4 and Theorem 4.9 below). The latter is based on a general methodology which was first developed by the second author in [START_REF] Frankowska | The Maximum Principle for an Optimal Solution to a Differential Inclusion with End-Point Constraints[END_REF] for Mayer problems, and that can be summarised as follows. When the running cost L(•, •, •) is equal to zero, the generalised Fermat rule states that the directional derivatives of the final cost ϕ(•) taken at points of local minimum are non-negative when evaluated along directions that are tangent to the set of admissible trajectories. Usually, due to the non-linearity of the dynamics, it is not possible to exhaustively describe the set of all such tangents. However in order to derive the PMP, it is sufficient to identify subsets of tangent directions which are informative enough. As it can be expected from the classical theory of optimisation, the set of trajectories of the linearised control system satisfying linearised constraints are tangent to the set of all admissible trajectories, provided some additional constraint qualifications are satisfied. While classical linearisation methods for control systems usually involve derivatives of the dynamics with respect to both state and control, these latter only describe a small subset of tangent directions and lead to the so-called weak maximum principle. On the other hand, replacing the control system by a relaxed differential inclusion does not change the set of tangents to its trajectories, even though it drastically enlarges the dynamics itself (since the righthand side becomes the convex hull of the admissible velocities of the original control system). Then, linearisations of this "larger" set of dynamics obtained by taking adequate derivatives of the resulting set-valued velocity mapping allow to describe richer subsets of tangents. Note next that the Fermat rule also implies that the set of curves which are tangent to admissible trajectories has an empty intersection with the the set of all directions in which the cost is strictly decreasing. At this point, one can recover an explicit dual description of this fact in the form of an inequality by applying a separation theorem. The final step in this procedure is then to introduce a suitably chosen costate variable satisfying the adjoint dynamics, which is such that the maximisation condition of the PMP holds for almost-every time. Besides, it is well known that Bolza problems can be equivalently written in Mayer form -i.e. with L = 0 in (P ) -, which means that the approach we just described is also valid for optimal control problems with non-trivial running costs. When the final-point constraints are described by families of functional inequalities and the set of tangents to the latter has empty interior, it follows that the abnormal version of the PMP holds true, i.e. the adjoint state does not depend on the cost of the problem. On the other hand when the tangent set to the final-point constraints has non-empty interior and when the constraints are qualified in some sense, then the normal version of the PMP holds true, and the investigation of optimal curves is greatly simplified.

The approach that we described in the previous paragraph is general enough to continue with second-(and higher-) order optimality conditions, by taking second-order linearisations of control systems and constraints, as well as second-order derivatives of the costs, even in the presence of additional running state constraints. Another interesting feature of this strategy is that it allows to precisely discriminate between the normal and abnormal versions of the PMP, which is generically not true for proofs relying on outer-approximations of optimal trajectories. This general methodology has been successfully applied to optimal control problems formulated on very broad classes of dynamics, including e.g. classical ODEs in finite-dimensional spaces [START_REF] Frankowska | The Maximum Principle for an Optimal Solution to a Differential Inclusion with End-Point Constraints[END_REF], semi-linear evolution equations in general Banach spaces [START_REF] Frankowska | A Priori Estimates for Operational Differential Inclusions[END_REF][START_REF] Frankowska | Necessary Optimality Conditions for Infinite Dimensional State Constrained Control Problems[END_REF] and stochastic differential equations [START_REF] Frankowska | Stochastic Optimal Control Problems with Control and Initial-Final States Constraints[END_REF]. In addition to its holistic nature, this procedure also presents the advantage of being readily transposable to the study of secondorder necessary optimality conditions for optimal control problems, see e.g. [START_REF] Frankowska | First and Second Order Necessary Optimality Conditions for Controlled Stochastic Evolution Equations with Control and State Constraints[END_REF][START_REF] Frankowska | Second-Order Necessary Conditions for a Strong Local Minimum in a Control Problem with General Control Constraints[END_REF][START_REF] Frankowska | Strong Local Minimizers in Optimal Control Problems with State Constraints: Second Order Necessary Conditions[END_REF] and references therein. We point more specifically to the recent publication [START_REF] Frankowska | Distance Estimates to Feasible Controls for Systems with Final Point Constraints and Second Order Necessary Optimality Conditions[END_REF] on this topic, in which an optimal control problem involving final-point equality and inequality constraint was investigated using metric inverse mapping theorems on the space of controls.

However, in the context of mean-field optimal control problems written in the general form (P ), the implementation of the afore-described program is much more delicate. Indeed, the space of probability measures is at best a metric space when endowed with a Wasserstein metric, and a number of tools and concepts of set-valued and non-smooth analysis need to be carefully adapted to this setting in order to study necessary optimality conditions. Concerning differential-theoretic aspects, it has been hinted in the pioneering works [START_REF] Mccann | A Convexity Principle for Interacting Gases[END_REF][START_REF] Otto | The Geometry of Dissipative Equations : The Porous Medium Equation[END_REF] and further installed in [START_REF] Ambrosio | Gradient Flows in Metric Spaces and in the Space of Probability Measures[END_REF][START_REF] Villani | Optimal Transport : Old and New[END_REF] that the Wasserstein space (P 2 (R d ), W 2 ) can be endowed with a pseudo-Riemannian structure. More specifically, the latter provides an explicit characterisation of the exponential map and of the corresponding analytical tangent space Tan µ P 2 (R d ) (see Section 2.1 below), and a full theory of first-and second-order differential calculus has been developed in this framework, see [START_REF] Ambrosio | Gradient Flows in Metric Spaces and in the Space of Probability Measures[END_REF]Chapter 10] and [START_REF] Ambrosio | Construction of the Parallel Transport in the Wasserstein Space[END_REF][START_REF] Gangbo | On Differentiability in the Wasserstein Space and Well-Posedness for Hamilton-Jacobi Equations[END_REF]. Regarding differential inclusions, the authors of the present manuscript have recently proposed in [START_REF] Bonnet | Differential Inclusions in Wasserstein Spaces: The Cauchy-Lipschitz Framework[END_REF] a sound generalisation of these objects for continuity equations formulated in Wasserstein spaces, in keeping with the classical theory that is described e.g. in [START_REF] Aubin | Set-Valued Analysis[END_REF]Chapter 10]. In particular contrary to other attempts aiming at generalising differential inclusions in this context (see e.g. [START_REF] Cavagnari | Superposition Principle for Differential Inclusions[END_REF][START_REF] Jimenez | Optimal Control of Multiagent Systems in the Wasserstein Space[END_REF]), the notion of continuity inclusion introduced in [START_REF] Bonnet | Differential Inclusions in Wasserstein Spaces: The Cauchy-Lipschitz Framework[END_REF] ensures a one-to-one correspondence between the trajectories of control systems and the canonically associated set-valued dynamics (see Theorem 2.15 below).

The contributions of this manuscript can be summarised as follows. In Section 3.1, we start by proposing a new definition of localised subdifferentials and differentiability (see Definition 3.1 and Definition 3.3 below) for functionals defined over Wasserstein spaces, which are well-suited to the study of dynamical and variational problems involving compactly supported measures. In Proposition 3.5, we adapt to this new setting a result already known for absolutely continuous measures in the classical case (see e.g. [24, Chapter 1, Proposition 4.2]), which asserts that subdifferentials which belong to Tan µ P 2 (R d ) are in fact strong (see Definition 3.1 below). We subsequently derive the expression of the intrinsic linearised Cauchy problem associated to a non-local continuity equation in Proposition 3.10 of Section 3.2, and study in Theorem 3.12 the variational linearisation of continuity inclusions. Thereafter in Section 4.1, we apply these differential and set-theoretic concepts to prove a Pontryagin Maximum Principle for a Mayer version of problem (P ) -i.e. without running cost -in Theorem 4.4, where the set of end-point constraints Q T is defined by functional inequalities. We also point out that the proof of this result has been slightly improved compared to earlier implementations of this program e.g. in [START_REF] Frankowska | Necessary Optimality Conditions for Infinite Dimensional State Constrained Control Problems[END_REF][START_REF] Frankowska | Distance Estimates to Feasible Controls for Systems with Final Point Constraints and Second Order Necessary Optimality Conditions[END_REF], as the separation arguments are performed in adequate finite-dimensional spaces, which circumvents a lot of potential technicalities related to the separation of subsets of infinite-dimensional vector spaces. A full PMP for the corresponding Bolza problem is then recovered in Theorem 4.9 of Section 4.2 by means of a standard procedure that directly builds on the PMP for the Mayer problem.

Before moving on to the core of the manuscript, we would like to make some final remarks.

1. While our methodology would also allow to deal with end-point constraints involving functional equalities, the corresponding proof strategy relies on a different class of inner-approximations, combined with technical metric inverse mapping arguments in the spirit of [START_REF] Frankowska | Distance Estimates to Feasible Controls for Systems with Final Point Constraints and Second Order Necessary Optimality Conditions[END_REF]. For the sake of clarity, we shall present these results separately in a future publication.

2. Even though the constrained PMP derived in [START_REF] Bonnet | A Pontryagin Maximum Principle in Wasserstein Spaces for Constrained Optimal Control Problems[END_REF] incorporates state constraints and takes into account more general final-point constraints, its proof suffers from the drawbacks of being less geometrically meaningful and highly technical, while relying on outer-approximations. In this regard, the approach described in this manuscript is more synthetic, and should allow for the derivation of the maximum principle in the presence of general constraints (see e.g. [START_REF] Frankowska | Strong Local Minimizers in Optimal Control Problems with State Constraints: Second Order Necessary Conditions[END_REF][START_REF] Frankowska | Distance Estimates to Feasible Controls for Systems with Final Point Constraints and Second Order Necessary Optimality Conditions[END_REF]).

3. The study of mean-field control problems of the form (P ) is also sensible when the admissible controls u : [0, T ] × R d → R d have a closed-loop structure with respect to the space variable, see e.g. [START_REF] Bonnet | A Pontryagin Maximum Principle in Wasserstein Spaces for Constrained Optimal Control Problems[END_REF][START_REF] Bonnet | The Pontryagin Maximum Principle in the Wasserstein Space[END_REF][START_REF] Caponigro | Mean-Field Sparse Jurdjevic-Quinn Control[END_REF][START_REF] Piccoli | Control to Flocking of the Kinetic Cucker-Smale model[END_REF] and [START_REF] Carmona | Probabilistic Theory of Mean-Field Games with Applications[END_REF][START_REF] Lasry | Mean Field Games[END_REF] in connection with the theory of mean-field games. However in this case, derivatives with respect to the space variable of the closed-loop controls also appear in the linearised systems and in the adjoint dynamics of the PMP, which requires more regularity assumptions and leads to heavier expressions while using the same geometric ideas as in the open-loop case.

The structure of the article is the following. In Section 2, we expose a list of preliminary notions of optimal transport theory and set-valued analysis. In particular, we recall some of the recent results of [START_REF] Bonnet | Differential Inclusions in Wasserstein Spaces: The Cauchy-Lipschitz Framework[END_REF] about continuity inclusions. In Section 3, we present our new definition of localised subdifferentials along with the intrinsic and variational linearisations of the set-valued counterparts of continuity equations. In Section 4, we subsequently prove a PMP in Wasserstein spaces, first for a Mayer problem, and then for a Bolza problem. We finally present in Section 5 examples of functionals which are locally differentiable in the sense of Section 3, and provide the expressions of their gradients.

Preliminaries

In this section, we recall several notions pertaining to optimal transport theory, set-valued analysis and continuity inclusions in Wasserstein spaces, all of which will be needed to state and prove the main results of Section 3 and Section 4.

Analysis in measures spaces and optimal transport

We recollect here some preliminary tools of analysis in measure spaces and optimal transport theory, for which we refer the reader to the monographs [START_REF] Ambrosio | Functions of Bounded Variations and Free Discontinuity Problems[END_REF] and [START_REF] Ambrosio | Gradient Flows in Metric Spaces and in the Space of Probability Measures[END_REF][START_REF] Santambrogio | Optimal Transport for Applied Mathematicians[END_REF][START_REF] Villani | Optimal Transport : Old and New[END_REF] respectively.

Given two complete separable metric spaces (S , d S ) and (T , d T ), we denote by Ω the closure of a subset Ω ⊂ S and by ∂Ω its topological boundary. A mapping φ : S → T is said to be bounded if for some (and thus all) τ 0 ∈ T , it holds that sup s∈S d T (φ(s), τ 0 ) < +∞. We will use the notation C 0 (S , T ) (resp. C 0 b (S , T )) for the space of continuous (resp. continuous and bounded) functions from S into T , as well as AC([0, T ], S ) for the space of absolutely continuous curves from [0, T ] ⊂ R + into S . In the sequel, Lip(φ(•) ; Ω) stands for the Lipschitz constant of a map φ : S → T over Ω ⊂ S . Given a separable Banach space (X, • X ) and p ∈ [1, +∞), we denote by L p ([0, T ], X) the Banach space of p-integrable maps from [0, T ] ⊂ R + into X in the sense of Bochner (see e.g. [START_REF] Diestel | Vector Measures[END_REF]), where [0, T ] is endowed with the standard one-dimensional Lebesgue measure L 1 .

Let P(R d ) be the space of Borel probability measures defined over R d endowed with the narrow topology, that is the topology induced by the weak- * convergence of measures defined by

µ n ⇀ * n→+∞ µ if and only if R d φ(x)dµ n (x) -→ n→+∞ R d φ(x)dµ(x) for every φ ∈ C 0 b (R d , R). (2)
Given p ∈ [1, +∞), we define the momentum of order p of an element µ ∈ P(R d ) by

M p (µ) := R d |x| p dµ(x) 1/p
, as well as its support as the closed subset of R d supp(µ) := x ∈ R d s.t. µ(N x ) > 0 for every neighbourhood N x of x .

We will henceforth denote by P p (R d ) and P c (R d ) the subsets of Borel probability measures with finite momentum of order p and compact support respectively. In what follows, we will frequently use the R-fattening of the support of a measure µ ∈ P c (R d ), defined by

B µ (R) := x ∈ supp(µ) B(x, R), (3)
where B(x, R) ⊂ R d denotes the closed ball of center x ∈ R d with radius R > 0.

Definition 2.1 (Pushforward of a measure and transport plans). Given a Borel map f :

R d → R d and an element µ ∈ P(R d ), the pushforward f # µ ∈ P(R d ) of µ through f (•) is defined as f # µ(B) := µ(f -1 (B)),
for any Borel set B ⊂ R d . Given two elements µ, ν ∈ P(R d ), the set Γ(µ, ν) of transport plans between µ and ν is defined as the subset of all γ ∈ P(R 2d ) such that π 1 # γ = µ and π 2 # γ = ν, where the maps π 1 , π 2 : R d × R d → R d stand for the projection operations onto the first and second factors.

We recall below the definition and some of the known properties of the Wasserstein spaces of optimal transport theory (see e.g. [START_REF] Ambrosio | Gradient Flows in Metric Spaces and in the Space of Probability Measures[END_REF][START_REF] Santambrogio | Optimal Transport for Applied Mathematicians[END_REF][START_REF] Villani | Optimal Transport : Old and New[END_REF]). Definition 2.2 (Wasserstein spaces). Given p ∈ [1, +∞) and µ, ν ∈ P p (R d ), the Wasserstein distance of order p between µ and ν is defined by

W p (µ, ν) := min γ∈Γ(µ,ν) R 2d
|x -y| p dγ(x, y)

1/p
, and we denote by Γ o (µ, ν) the set of optimal transport plans for which this minimum is attained. The Wasserstein space of order p is then defined as the metric space (P p (R d ), W p ) of probability measures with finite momentum of order p endowed with the W p -distance.

It is a well-known fact in optimal transport theory that the sets Γ o (µ, ν) are non-empty for every p ∈ [1, +∞) and any µ, ν ∈ P p (R d ). This is a direct consequence of the narrow closedness of Γ(µ, ν), together with the coercivity of the map

γ ∈ P p (R 2d ) → R 2d |x -y| p dγ(x, y) ∈ R + .
Moreover, the space (P p (R d ), W p ) is a complete separable metric space, and the topology induced by the Wasserstein distance metrises the narrow topology (2) restricted to P p (R d ), in the sense that

W p (µ n , µ) -→ n→+∞ 0 if and only if      µ n ⇀ * n→+∞ µ, R d |x| p dµ n (x) -→ n→+∞ R d |x| p dµ(x),
for every sequence (µ n ) ⊂ P p (R d ) and µ ∈ P p (R d ). In the sequel, we will frequently consider the (non-complete) metric space (P c (R d ), W p ) of compactly supported measures, seen as a subset of the Wasserstein space (P p (R d ), W p ), where p ∈ [1, +∞) will depend on the context. In the particular case where p = 2, it is known that (P 2 (R d ), W 2 ) can also be endowed with a pseudo-Riemannian structure. Given an element µ ∈ P 2 (R d ), the analytical tangent space to P 2 (R d ) at µ is defined in this context as

Tan µ P 2 (R d ) := ∇ξ(•) s.t. ξ ∈ C ∞ c (R d ) L 2 (µ) .
We point the reader to [START_REF] Ambrosio | Gradient Flows in Metric Spaces and in the Space of Probability Measures[END_REF]Chapter 8] for a contextual introduction of this geometric object, as well as for a thorough analysis of its interplay with absolutely continuous curves of measures and continuity equations (see also Section 2.3 below).

We end this series of prerequisites by recalling a variant of the disintegration theorem in the context of optimal transport, for which we refer e.g. to [START_REF] Ambrosio | Gradient Flows in Metric Spaces and in the Space of Probability Measures[END_REF]Theorem 5.3.1].

Theorem 2.3 (Disintegration theorem).

Given two elements µ, ν ∈ P p (R d ) and γ ∈ Γ(µ, ν), there exists a µ-almost uniquely determined family of measures

{γ x } x∈R d ⊂ P p (R d ) called the disintegration of γ onto its first marginal π 1 # γ = µ, such that R 2d ξ(x, y)dγ(x, y) = R d R d ξ(x, y)dγ x (y)dµ(x),
for every map ξ ∈ L 1 (R 2d , R; γ).

Reciprocally given µ ∈ P c (R d ) and a µ-measurable family of measures {γ x } x∈R d ⊂ P c (R d ), we shall sometimes write γ := R d γ x dµ(x) to denote the unique element of P c (R 2d ) satisfying

R 2d ξ(x, y)dγ(x, y) = R d R d ξ(x, y)dγ x (y)dµ(x) for every ξ ∈ C 0 b (R 2d , R).

Elements of set-valued analysis

In this section, we recall several notions and classical results of set-valued and non-smooth analysis, for which we refer to the comprehensive monographs [START_REF] Aubin | Differential Inclusions[END_REF][START_REF] Aubin | Set-Valued Analysis[END_REF]. Let (S , d S ) be a complete separable metric space and (X, • X ) be a separable Banach space. We denote by B S (s, β) the closed ball of radius β > 0 centred at s ∈ S , and by B X the closed unit ball in X centred at 0. Given a subset B ⊂ X, we define its closed convex hull co (B) as the closure of co(B) :

= N i=1 α i b i s.t. N ≥ 1, b i ∈ B, α i ≥ 0 for i ∈ {1, . . . , N } and N i=1 α i = 1 ⊂ X,
F : S ⇒ X be a set-valued map. Then, F (•) is said to be ̟-measurable if F -1 (O) := s ∈ S s.t. F (s) ∩ O = ∅ ∈ Ω,
for any open set O ⊂ X.

Definition 2.5 (Lipschitz continuity of multifunctions). A set-valued map

F : S ⇒ X is Lipschitz regular around s ∈ D(F ) with constant L > 0 if there exists a neighbourhood N s ⊂ S of s such that F (s 1 ) ⊂ F (s 2 ) + L d S (s 1 , s 2 )B X ,
for any s 1 , s 2 ∈ N s .

We end this primer in set-valued analysis by recalling the definition of tangent cone to a closed convex subset of a Banach space, and provide one of its equivalent characterisations. Definition 2.6 (Tangent cone to a convex set). Let K ⊂ X be a closed convex set and x ∈ K. The tangent cone T K (x) to K at x is then defined by

T K (x) := λ>0 λ(K -x).
Moreover, the set T K (x) can be alternatively characterised as

T K (x) = w ∈ X s.t. dist X (x + ǫw; K) = o(ǫ) for any ǫ > 0 = w ∈ X s.t. for every ǫ n -→ n→+∞ 0 + , there exist w n -→ n→+∞ w such that x + ǫ n w n ∈ K for all n ≥ 1 . ( 4
)
as a consequence e.g. of [START_REF] Aubin | Set-Valued Analysis[END_REF]Proposition 4.2.1].

Continuity equations and inclusions in Wasserstein spaces

In this section, we recollect notions pertaining to continuity equations and continuity inclusions in the space of measures. Given a time horizon T > 0, a curve µ : [0, T ] → P(R d ) and a velocity-field

v : [0, T ] × R d → R d , we say that (µ(•), v(•)
) is a trajectory-velocity pair of the continuity equation

∂ t µ(t) + div v(t)µ(t) = 0, (5)
if the following distributional equality

T 0 R d ∂ t ξ(t, x) + ∇ x ξ(t, x), v(t, x) dµ(t)(x)dt = 0, holds for any test function ξ ∈ C ∞ c ((0, T ) × R d ).
In what follows, we will mainly consider continuity equations driven by Carathéodory velocity-fields, namely maps such that t ∈

[0, T ] → v(t, x) ∈ R d is L 1 -measurable for any x ∈ R d and x ∈ R d → v(t, x) ∈ R d is continuous for L 1 -almost every t ∈ [0, T ].
In the recent work [START_REF] Bonnet | Differential Inclusions in Wasserstein Spaces: The Cauchy-Lipschitz Framework[END_REF], we introduced a set-valued extension of ( 5), in the case where the velocityfield is non-local i.e. when it also depends on the whole measure µ(t) at all times t ∈ [0, T ]. Based on the identification of non-local velocity-fields

(t, µ, x) ∈ [0, T ] × P c (R d ) × R d → v(t, µ, x) ∈ R d , with vector-field valued maps (t, µ) ∈ [0, T ] × P c (R d ) → v(t, µ, •) ∈ C 0 (R d , R d ),
we proposed the following notion of differential inclusion for continuity equations.

Definition 2.7 (Continuity inclusions in measure spaces). Let

V : [0, T ] × P c (R d ) ⇒ C 0 (R d , R d ) be a set-valued map.
We say that a curve of measures µ(•) solves the continuity inclusion

∂ t µ(t) ∈ -div V (t, µ(t))µ(t) , ( 6
)
if there exists an L 1 -measurable selection t ∈ [0, T ] → v(t) ∈ V (t, µ(t)) such that the trajectory- selection pair (µ(•), v(•)) solves the continuity equation ∂ t µ(t) + div v(t)µ(t) = 0, (7)
in the sense of distributions.

In what follows, we introduce technical notions pertaining to compact restrictions of multifunctions with values in C 0 (R d , R d ), and proceed by stating our working assumptions. We will henceforth denote by

• 1 := • L 1 ([0,T ],R) the L 1 -norm of a real-valued functional defined over [0, T ].

Definition 2.8 (Restriction of multifunctions to balls). Given a set-valued map

V : [0, T ]×P c (R d ) ⇒ C 0 (R d , R d ) and R > 0, we define its compact restriction to K := B(0, R) by V K (t, µ) := v |K ∈ C 0 (K, R d ) s.t. v ∈ V (t, µ) , for all (t, µ) ∈ [0, T ] × P c (R d ). Here, v |K denotes the restriction to K of the map v ∈ C 0 (R d , R d ). Conversely, observe that any function v ∈ C 0 (K, R d ) can be extended to ṽ ∈ C 0 (R d , R d ) by defining ṽ(x) := v(π K (x)) for all x ∈ R d , where π K : R d → K denotes the projection onto K.
We also define the closed convex hull co

V (t, µ) of V (t, µ) ⊂ C 0 (R d , R d ) as co V (t, µ) := v ∈ C 0 (R d , R d ) s.t. v |K ∈ co V K (t, µ) for any K := B(0, R) with R > 0 , ( 8
)
where the closed convex hull co

V K (t, µ) is taken in the Banach space C 0 (K, R d ), • C 0 (K,R d ) .
Throughout the remainder of this section, we fix a time horizon T > 0 and a real p ∈ [1, +∞).

Hypotheses (DI).

For every R > 0, assume that the following holds with K := B(0, R).

(i) For any µ ∈ P c (R d ), the set-valued map t ∈ [0, T ] ⇒ V K (t, µ) is L 1 -measurable with closed non-empty images in C 0 (K, R d ).
(ii) There exists a map m(

•) ∈ L 1 ([0, T ], R + ) such that for L 1 -almost every t ∈ [0, T ], any µ ∈ P c (R d ), every v ∈ V (t, µ) and all x ∈ R d , it holds |v(x)| ≤ m(t) 1 + |x| + M 1 (µ) . (iii) There exists a map l K (•) ∈ L 1 ([0, T ], R + ) such that for L 1 -almost every t ∈ [0, T ], any µ ∈ P(K) and every v ∈ V (t, µ), it holds Lip v(•) ; K ≤ l K (t).
(iv) There exists a map

L K (•) ∈ L 1 ([0, T ], R + ) such that for L 1 -almost every t ∈ [0, T ] and any µ, ν ∈ P(K), it holds V K (t, ν) ⊂ V K (t, µ) + L K (t)W p (µ, ν)B C 0 (K,R d ) .
Remark 2.9 (Non-local continuity equations as a particular case of continuity inclusions). Suppose that the multifunction

V : [0, T ]×P c (R d ) ⇒ C 0 (R d , R d ) is single-valued for all (t, µ) ∈ [0, T ]×P c (R d ).
Then, solutions of (6) coincide with those of the non-local continuity equation

∂ t µ(t) + div v(t, µ(t))µ(t) = 0, ( 9
)
where v(t, µ, x) := V (t, µ)(x) for all (t, µ, x) ∈ [0, T ] × P c (R d ) × R d .
In the scenario described in Remark 2.9, hypotheses (DI) become a localised and time-dependent generalisation of that of [START_REF] Piccoli | Transport Equation with Nonlocal Velocity in Wasserstein Spaces : Convergence of Numerical Schemes[END_REF]Section 1] in the spirit of Carathéodory ODEs. We state these assumptions separately for the sake of clarity, as they will be frequently used in the sequel.

Hypotheses (CE).

For every R > 0, suppose that the following holds with K := B(0, R).

(i) The application t ∈ [0, T ] → v(t, µ, x) ∈ R d is L 1 -measurable for any (µ, x) ∈ P c (R d ) × R d .
Moreover, there exists a map m(

•) ∈ L 1 ([0, T ], R + ) such that |v(t, µ, x)| ≤ m(t) 1 + |x| + M 1 (µ) , for L 1 -almost every t ∈ [0, T ] and any (µ, x) ∈ P c (R d ) × R d . (ii) There exist two maps l K (•), L K (•) ∈ L 1 ([0, T ], R + ) such that for L 1 -almost every t ∈ [0, T ], any µ, ν ∈ P(K) and all x, y ∈ K, it holds v(t, µ, x) -v(t, µ, y) ≤ l K (t)|x -y| and v(t, µ, x) -v(t, ν, x) ≤ L K (t)W p (µ, ν).

Remark 2.10 (Local variant of hypotheses (CE)).

In the sequel, we say that a Carathéodory vector-

field w : [0, T ] × R d → R d which is independent from µ(•) satisfies hypotheses (CE) if it

is sub-linear and locally Lipschitz with respect to the space variable, with constants

m(•), l K (•) ∈ L 1 ([0, T ], R + ).
In what follows, we recall structural results for continuity inclusions in Wasserstein spaces which were derived in [START_REF] Bonnet | Differential Inclusions in Wasserstein Spaces: The Cauchy-Lipschitz Framework[END_REF]. From now on, we suppose that V :

[0, T ] × P c (R d ) ⇒ C 0 (R d , R d
) is a set-valued map satisfying hypotheses (DI), and consider P c (R d ) as a subset of the metric space (P p (R d ), W p ).

Theorem 2.11 (Existence and estimates on solutions of continuity inclusions). For every µ

0 ∈ P c (R d ), there exists a curve of measures µ(•) ∈ AC([0, T ], P c (R d )) solution of the continuity in- clusion (6) such that µ(0) = µ 0 . Moreover if µ 0 ∈ P(B(0, r)) for some r > 0, then there exist R r > 0 and m r (•) ∈ L 1 ([0, T ], R + ) depending only on the magnitudes of r, m(•) 1 such that supp(µ(t)) ⊂ B(0, R r ) and W p (µ(t), µ(s)) ≤ t s m r (τ )dτ, ( 10
)
for every solution µ(•) of ( 6) and all times 0 ≤ s ≤ t ≤ T .

In the following corollary, we state elementary consequences of Theorem 2.11 in the case where V (•, •) is single-valued. We present this result separately for the sake of clarity, as we shall frequently use this variant in the sequel. Its last statement follows e.g. from [START_REF] Ambrosio | Gradient Flows in Metric Spaces and in the Space of Probability Measures[END_REF]Chapter 8] and [START_REF] Piccoli | Transport Equation with Nonlocal Velocity in Wasserstein Spaces : Convergence of Numerical Schemes[END_REF].

Corollary 2.12 (Non-local continuity equations). In Theorem 2.11 suppose that

V : [0, T ]×P c (R d ) ⇒ C 0 (R d , R d ) is single-valued,
and let µ 0 ∈ P(B(0, r)) for some r > 0. Then the non-local velocity-field

v : [0, T ] × P c (R d ) × R d → R d defined for all (t, µ, x) ∈ [0, T ] × P c (R d ) × R d by v(t, µ, x) := V (t, µ)(x),
satisfies hypotheses (CE), and the non-local Cauchy problem (9) admits a unique solution µ(•) ∈ AC([0, T ], P c (R d )). Moreover, the curve µ(•) satisfies the estimates of [START_REF] Bonnet | A Pontryagin Maximum Principle in Wasserstein Spaces for Constrained Optimal Control Problems[END_REF] and can be represented as

µ(t) = Φ (0,t) [µ 0 ](•) # µ 0 , ( 11
)
for all times t ∈ [0, T ]. Here, (Φ (s,t) [µ(s)](•)) s,t∈[0,T ]
denotes the family of non-local flows defined by

Φ (s,t) [µ(s)](x) = x + t s v σ, µ(σ), Φ (s,σ) [µ(s)](x) dσ, ( 12
)
for all times s, t ∈ [0, T ] and any x ∈ R d .

We end this section by recalling three of the main results of [START_REF] Bonnet | Differential Inclusions in Wasserstein Spaces: The Cauchy-Lipschitz Framework[END_REF], which are generalisations to the setting of continuity inclusions in Wasserstein spaces of Filippov's estimates, the Relaxation theorem, and the one-to-one correspondence between control systems and continuity inclusions.

Theorem 2.13 (Filippov's theorem). Let ν(•) ∈ AC([0, T ], P(K ν )) be a solution of (5) generated by a Carathéodory velocity-field w : [0, T ]× R d → R d with K ν := B(0, R ν ) for some R ν > 0. Furthermore, suppose that the mismatch function η ν : [0, T ] → R + defined by η ν (t) := dist C 0 (Kν ,R d ) w |Kν (t); V Kν (t, ν(t)) ,
is Lebesgue integrable over [0, T ]. Then for any µ 0 ∈ P(B(0, r)) with r > 0, there exists a solution µ(•) ∈ AC([0, T ], P c (R d )) of the continuity inclusion [START_REF] Aubin | Differential Inclusions[END_REF] such that for all times t ∈ [0, T ], it holds

W p (µ(t), ν(t)) ≤ C p W p (µ 0 , ν(0)) + t 0 η ν (s)ds ,
where C p > 0 is a constant which depends only on the magnitudes of p, r, R ν , T and m(•) 1 . [START_REF] Bellomo | On the Dynamics of Social Conflicts: Looking for the Black Swan[END_REF]. Then for any δ > 0, there exists a solution

Theorem 2.14 (Relaxation theorem). Let µ

0 ∈ P c (R d ) and µ(•) ∈ AC([0, T ], P c (R d )) be a solution of the relaxed continuity inclusion    ∂ t µ(t) ∈ -div co V (t, µ(t))µ(t) , µ(0) = µ 0 , where co V (t, µ(t)) denotes the closed convex hull of V (t, µ(t)) ⊂ C 0 (R d , R d ) defined as in
µ δ (•) ∈ AC([0, T ], P c (R d )) of the continuity inclusion    ∂ t µ δ (t) ∈ -div V (t, µ δ (t))µ δ (t) , µ δ (0) = µ 0 , such that W p (µ(t), µ δ (t)) ≤ δ, for all times t ∈ [0, T ].
Theorem 2.15 (Correspondence between control systems and continuity inclusions). Let (U, d U ) be a compact metric space and v :

[0, T ] × P c (R d ) × U × R d → R d be a controlled non-local velocity- field such that (t, µ, x) → v(t, µ, u, x) ∈ R d satisfies hypotheses (CE) for every u ∈ U with constants m(•), l k (•), L K (•) ∈ L 1 ([0, T ], R + ) independent of u ∈ U , and also u ∈ U → v(t, µ, u, x) ∈ R d is continuous for L 1 -almost every t ∈ [0, T ] and any (µ, x) ∈ P c (R d ) × R d . Moreover, define the set-valued map V : [0, T ] × P c (R d ) ⇒ C 0 (R d , R d ) by V (t, µ) := v ∈ C 0 (R d , R d ) s.t. v(•) = v(t, µ, u, •) for some u ∈ U , for all (t, µ) ∈ [0, T ] × P c (R d ).
Then, V (•, •) satisfies hypotheses (DI), and a curve of measures µ(•) is a solution of the continuity inclusion [START_REF] Aubin | Differential Inclusions[END_REF] if and only if it solves the controlled non-local continuity equation

∂ t µ(t) + div v(t, µ(t), u(t))µ(t) = 0, for some L 1 -measurable selection t ∈ [0, T ] → u(t) ∈ U .
3 Differential calculus and linearised dynamics in P c (R d )

In this section, we investigate novel differential calculus tools for functionals and dynamical systems defined over P c (R d ) seen as a subset of (P 2 (R d ), W 2 ). In Section 3.1, we introduce a localised notion of P 2 (R d )-differentiability for compactly supported measures, and prove a new chain rule formula along arbitrary transport plans. In Section 3.2, we derive the general expression for the linearised Cauchy problem associated to a non-local continuity equation, and focus on the particular case in which the velocity perturbations are tangent to the set of admissible velocities of a continuity inclusion.

Localised theory of Wasserstein calculus

In this section, we study the properties of a new notion of localised subdifferential defined in the spirit of [START_REF] Ambrosio | Gradient Flows in Metric Spaces and in the Space of Probability Measures[END_REF][START_REF] Gangbo | On Differentiability in the Wasserstein Space and Well-Posedness for Hamilton-Jacobi Equations[END_REF] for extended real-valued functionals φ :

P 2 (R d ) → R ∪ {±∞} such that P c (R d ) ⊂ D(φ) := {µ ∈ P 2 (R d ) s.t. φ(µ) = ±∞}.
In the sequel, we will use the condensed notation φ : P c (R d ) → R to refer to any such functional.

Definition 3.1 (Localised sub and superdifferential). Let φ

: P c (R d ) → R and µ ∈ P c (R d ). We say that a map ξ ∈ L 2 (R d , R d ; µ) belongs to the localised subdifferential ∂ - loc φ(µ) of φ(•) at µ provided that φ(ν) -φ(µ) ≥ inf γ∈Γo(µ,ν) R 2d ξ(x), y -x dγ(x, y) + o R (W 2 (µ, ν)), ( 13
)
for every R > 0 and any ν ∈ P(B µ (R)), with B µ (R) being defined as in [START_REF] Ambrosio | Functions of Bounded Variations and Free Discontinuity Problems[END_REF]. Furthermore, we say that a map ξ

∈ L 2 (R d , R d ; µ) belongs to the strong localised subdifferential ∂ - S,loc φ(µ) if it satisfies φ(ν) -φ(µ) ≥ R 2d ξ(x), y -x dµ(x, y) + o R (W 2,µ (µ, ν)), ( 14
)
for every R > 0, any ν ∈ P(B µ (R)) and each µ ∈ Γ(µ, ν), where we introduced the notation

W 2,µ (µ, ν) = R 2d |x -y| 2 dµ(x, y) 1/2 . ( 15
)
Analogously, we say that ξ

∈ L 2 (R d , R d ; µ) belongs to the localised superdifferential ∂ + loc φ(µ) of φ(•) at µ if (-ξ) ∈ ∂ - loc (-φ)(µ)
, with a similar definition for strong localised superdifferentials.

Remark 3.2 (On the difference between ( 13) and ( 14)). In line with the theory of subdifferential calculus on manifolds, localised subdifferentials are defined via their action on optimal displacement directions. As illustrated first in [START_REF] Mccann | A Convexity Principle for Interacting Gases[END_REF] (see also [START_REF] Ambrosio | Gradient Flows in Metric Spaces and in the Space of Probability Measures[END_REF]Chapter 7]), such optimal directions are given by displacement interpolations of optimal plans, which leads to the geometric definition [START_REF] Bonnet | Intrinsic Lipschitz Regularity of Mean-Field Optimal Controls[END_REF].

On the other hand, defining localised subdifferentials via their action on any transport direction as in [START_REF] Bressan | Introduction to the Mathematical Theory of Control[END_REF] produces a class of subdgradients that is much smaller, and which does not enjoy several of the desirable features of classical subdifferentials (such as being weakly closed, see e.g. [START_REF] Ambrosio | Gradient Flows in Metric Spaces and in the Space of Probability Measures[END_REF]Remark 10.3.2]). Yet, strong subdifferentials are extremely useful in practice as they allow to differentiate functionals along directions that are not necessarily optimal. This property is of crucial interest in control theory, as the corresponding classes of admissible variations usually belong to this category.

By a direct adaptation of the proofs of [37, Section 3] with finite radii R > 0, it can be shown that ∂ - loc φ(µ) ∩ ∂ + loc φ(µ) contains at most one element, which also belongs to Tan µ P 2 (R d ). This motivates the following definition of local differentiability for functionals defined over P c (R d ).

Definition 3.3 (Locally differentiable functional). A functional φ

: P c (R d ) → R is locally differen- tiable at µ ∈ P c (R d ) if there exists a map ∇φ(µ) ∈ Tan µ P 2 (R d ) -called the Wasserstein gradient of φ(•) at µ -, such that ∂ - loc φ(µ) ∩ ∂ + loc φ(µ) = {∇φ(µ)}. Similarly, we shall say that φ(•) is locally differentiable over P c (R d ) if it is locally differentiable at every µ ∈ P c (R d ).
Remark 3.4 (Uniformity of the gradient). Observe that in Definition 3.3 above, we impose on the gradient ∇φ(µ) ∈ ∂ - loc φ(µ) ∩ ∂ + loc φ(µ) to be independent from R > 0. This is due to the fact that ∇φ(µ) is an element of Tan µ P 2 (R d ) -thus defined µ-almost everywhere over R d -, so that it should not depend on the fattening parameter of the support of ν ∈ P(B µ (R)). The latter is solely used to control the small-o of the W 2 -distance in [START_REF] Bonnet | Intrinsic Lipschitz Regularity of Mean-Field Optimal Controls[END_REF], as illustrated in Proposition 5.1 below.

We provide examples of locally differentiable functionals in Section 5. In the next proposition, we prove that localised subdifferentials which belong to the analytical tangent space Tan µ P 2 (R d ) are in fact strong localised subdifferentials. The proof of this result is inspired from that of [

c (R d ) → R and µ ∈ P c (R d ) be such that ∂ - loc φ(µ) = ∅. Then ∂ - loc φ(µ) ∩ Tan µ P 2 (R d ) ⊂ ∂ - S,loc φ(µ),
i.e. any localised subdifferential which belongs to the analytical tangent space Tan µ P 2 (R d ) is also a strong localised subdifferential.

Proof. By contradiction, suppose that there exists ξ ∈ ∂ - loc φ(µ) ∩ Tan µ P 2 (R d ) which is not a strong localised subdifferential. Then for some R > 0 and δ > 0, we can find a sequence of measures (µ n ) ⊂ P(B µ (R)) which converges towards µ in the W 2 -metric along with a sequence of plans (µ n ) ⊂ Γ(µ, µ n ) such that for any n ≥ 1 large enough, it holds

φ(µ n ) -φ(µ) - R 2d ξ(x), y -x dµ n (x, y) ≤ -δǫ n , ( 16
)
where ǫ n := W 2,µ n (µ, µ n ) is given by ( 15) and satisfies

ǫ n → 0 + as n → +∞. Choose γ n ∈ Γ o (µ, µ n )
for any n ≥ 1, and observe that since ξ ∈ ∂ - loc φ(µ), it holds for n ≥ 1 large enough

φ(µ n ) -φ(µ) - R 2d ξ(x), y -x dγ n (x, y) ≥ -δ 2 ǫ n , ( 17
)
where we used the fact that W 2 (µ, µ n ) ≤ W 2,µ n (µ, µ n ). By merging ( 16) and ( 17), we obtain

R 2d ξ(x), y-x ǫn d(γ n -µ n )(x, y) ≤ -δ 2 . ( 18
)
We now introduce the sequences of rescaled plans (γ n ) and (μ n ), defined for all n ≥ 1 by

γn := π 1 , π 2 -π 1 ǫn # γ n and μn := π 1 , π 2 -π 1 ǫn # µ n ,
so that (18) can be rewritten as

R 2d ξ(x), r d(γ n -μn )(x, r) ≤ -δ 2 . ( 19
)
We claim that both sequences (γ n ) and (μ n ) have uniformly bounded second order momentum. Indeed

sup n≥1 M 2 2 (γ n ) = sup n≥1 R 2d |r| 2 + |x| 2 dγ n (x, r) = sup n≥1 R 2d
x-y ǫn

2 + |x| 2 dγ n (x, y) ≤ 1 + M 2 2 (µ),
and the same estimate also holds for (μ n ). Whence, (γ n ) and (μ n ) are tight (see e.g. [5, Remark 5.1.5]), and thus narrowly compact by Prokhorov's theorem (see e.g. [START_REF] Ambrosio | Gradient Flows in Metric Spaces and in the Space of Probability Measures[END_REF]Theorem 5.1.3]). In the sequel, we denote by γ and μ two of their cluster points that can be reached along the same subsequence.

Our goal now is to pass to the limit as n → +∞ in [START_REF] Cavagnari | Lagrangian, Eulerian and Kantorovich Formulations of Multi-Agent Optimal Control Problems: Equivalence and Gamma-Convergence[END_REF].

Let (ξ k ) ⊂ C ∞ c (R d , R d ) be a sequence such that ξ k → ξ in L 2 (R d , R d ; µ) as k → +∞, and observe that R 2d ξ k (x), r dγ n (x, r) ≤ R 2d ξ(x), r dγ n (x, r) + R d |ξ(x) -ξ k (x)| 2 dµ(x) 1/2 R 2d |r| 2 dγ n (x, r) 1/2 ≤ R 2d ξ(x), r dγ n (x, r)+ ξ -ξ k L 2 (µ) , ( 20
)
where we used Cauchy-Schwarz's inequality and the definition of (γ n ). Similarly, one also has

R 2d ξ k (x), r d μn (x, r) ≥ R 2d ξ(x), r d μn (x, r)-ξ -ξ k L 2 (µ) (21)
for all n, k ≥ 1. Whence by plugging ( 20) and ( 21) into [START_REF] Cavagnari | Lagrangian, Eulerian and Kantorovich Formulations of Multi-Agent Optimal Control Problems: Equivalence and Gamma-Convergence[END_REF], one deduces for all n, k ≥ 1 large enough

R 2d ξ k (x), r d(γ n -μn )(x, r) ≤ -δ 4 , (22)
We now claim that given k ≥ 1, the map (x, r) ∈ R 2d → | ξ k (x), r | ∈ R + is uniformly integrable with respect to both (γ n ) and (μ n ). Indeed setting

C k := ξ k (•) C 0 (R d ,R d ) , it holds {(x,r) s.t. | ξ k (x),r |≥i} | ξ k (x), r |dγ n (x, r) ≤ C k {(x,r) s.t. |r|≥i/C k } |r|dγ n (x, r), ( 23
)
for every i ≥ 1, while on the other hand it can be checked by definition of (γ n ) that

i C k {(x,r) s.t. |r|≥i/C k } |r|dγ n (x, r) ≤ R 2d |r| 2 dγ n (x, r) ≤ 1, (24)
for any n, k, i ≥ 1. Merging ( 23) and ( 24), we therefore obtain

{(x,r) s.t. | ξ k (x),r |≥i} | ξ k (x), r |dγ n (x, r) ≤ C 2 k i -→ i→+∞ 0, so that the (x, r) ∈ R 2d → | ξ k (x), r | ∈ R + is uniformly integrable with respect to (γ n ) for all k ≥ 1.
By repeating the same arguments for (μ n ) and recalling that the latter map is continuous, we recover

R 2d ξ k (x), r d(γ n -μn )(x, r) -→ n→+∞ R 2d ξ k (x), r d(γ -μ)(x, r), ( 25
)
for all k ≥ 1 by applying the convergence results of [START_REF] Ambrosio | Gradient Flows in Metric Spaces and in the Space of Probability Measures[END_REF]Lemma 5.1.7]. Upon combining [START_REF] Cristiani | Multiscale Modeling of Pedestrian Dynamics[END_REF] and [START_REF] Diestel | Vector Measures[END_REF] while letting k → +∞, we can thus conclude

R 2d ξ(x), r d(γ -μ)(x, r) ≤ -δ 4 , ( 26
)
where we used the fact that π 1 # γ = π 1 # μ = µ as a consequence of classical stability results under narrow convergence for transport plans (see e.g. [5, Chapter 5]).

Let us now choose an arbitrary test function

ζ ∈ C ∞ c (R d ).
First, notice that there exists a constant C ζ > 0 such that the global estimates

ζ(y) -ζ(x) ≤ ∇ζ(x), y -x + C ζ |x -y| 2 , ζ(x) -ζ(y) ≤ ∇ζ(x), x -y + C ζ |x -y| 2 , ( 27
)
hold for any x, y ∈ R d . By using the first estimates of ( 27), we further obtain for any n ≥ 1

R 2d ζ(y)dγ n (x, y) ≤ R 2d ζ(x) + ∇ζ(x), y -x dγ n (x, y) + C ζ W 2 2 (µ, µ n ), (28)
where we used the fact that γ n ∈ Γ o (µ, µ n ), while the second estimate of ( 27) further yields

- R 2d ζ(y)dµ n (x, y) ≤ - R 2d ζ(x) + ∇ζ(x), y -x dµ n (x, y) + C ζ W 2 2,µ n (µ, µ n ), (29)
by the definition (15) of W 2,µ n (µ, µ n ). In addition, observe that since γ n , µ n ∈ Γ(µ, µ n ), one also has

R 2d ζ(x)d(γ n -µ n )(x, y) = 0 and R 2d ζ(y)d(γ n -µ n )(x, y) = 0, ( 30
)
for all n ≥ 1. Therefore, combining the estimates of ( 28) and (29) while using [START_REF] Frankowska | A Priori Estimates for Operational Differential Inclusions[END_REF] and recalling that

W 2 (µ, µ n ) ≤ W 2,µ n (µ, µ n ) = ǫ n , we obtain 0 ≤ R 2d ∇ζ(x), y -x d(γ n -µ n )(x, y) + 2C ζ ǫ 2 n .
By dividing both sides of the previous inequality by ǫ n > 0, considering again the sequences of rescaled plans (γ n ) and (μ n ) and letting n → +∞ along an adequate subsequence, we finally recover

0 ≤ R 2d ∇ζ(x), r d(γ -μ)(x, r), (31)
for any ζ ∈ C ∞ c (R d ). Since ξ ∈ Tan µ P 2 (R d ), there exists a sequence (ζ n ) ⊂ C ∞ c (R d ) such that ∇ζ n → ξ in L 2 (R d , R d ; µ) as n → +∞,
which leads to a contradiction between [START_REF] Fornasier | Mean-Field Optimal Control as Gamma-Limit of Finite Agent Controls[END_REF] and [START_REF] Frankowska | First and Second Order Necessary Optimality Conditions for Controlled Stochastic Evolution Equations with Control and State Constraints[END_REF].

By combining Definition 3.3 and Proposition 3.5, we obtain a general chain rule along arbitrary transport plans for locally differentiable functionals.

Proposition 3.6 (Chain rule along arbitrary transport plans). Let φ

: P c (R d ) → R, µ ∈ P c (R d )
and suppose that φ(•) is locally differentiable at µ. Then for every R > 0 and ν ∈ P(B µ (R)), it holds

φ(ν) = φ(µ) + R 2d ∇φ(µ)(x), y -x dµ(x, y) + o R (W 2,µ (µ, ν)), ( 32
)
for any µ ∈ Γ(µ, ν). Conversely, if there exists a map ∇φ(µ) ∈ Tan µ P 2 (R d ) such that for every R > 0 and ν ∈ P(B µ (R)) the first-order expansion (32) holds along any optimal plan µ ∈ Γ o (µ, ν), then φ(•) is locally differentiable at µ in the sense of Definition 3.3.

Proof. By Definition 3.3, we have that ∇φ(µ

) ∈ ∂ - loc φ(µ) ∩ ∂ + loc φ(µ) ∩ Tan µ P 2 (R d ).
Whence by Proposition 3.5, it further holds that ∇φ(µ) ∈ ∂ - S,loc φ(µ) ∩ ∂ + S,loc φ(µ), so that (32) is satisfied for every ν ∈ P(B µ (R)) and any µ ∈ Γ(µ, ν). Conversely, let ν ∈ P(B µ (R)) for some R > 0, and observe that for every optimal transport plan µ ∈ Γ o (µ, ν), it holds

R 2d ∇φ(µ)(x), y -x dµ(x, y) ≥ inf γ∈Γo(µ,ν) R 2d ∇φ(µ), y -x dγ(x, y), so that (32) directly yields that ∇φ(µ) ∈ ∂ - loc φ(µ) since W 2,µ (µ, ν) = W 2 (µ, ν) when µ ∈ Γ o (µ,
∞ (R d , R d ; µ)). Let φ : P c (R d ) → R, µ ∈ P c (R d ) and suppose that φ(•) is locally differentiable at µ. Then for every F ∈ L ∞ (R d , R d ; µ), it holds φ (Id + ǫF ) # µ = φ(µ) + ǫ R d ∇φ(µ)(x), F (x) dµ(x) + o R F (ǫ), for all ǫ ∈ [-1, 1], where R F := F L ∞ (µ) . Proof. Observe first that for every F ∈ L ∞ (R d , R d ; µ), the measures (Id+ǫF ) # µ have compact support in B R F (µ) for all ǫ ∈ [-1, 1]
. By applying Proposition 3.6 with the transport plan µ ǫ := (Id, Id+ǫF ) # µ, we therefore obtain

φ (Id + ǫF ) # µ = φ(µ) + R 2d ∇φ(µ)(x), y -x dµ ǫ (x, y) + o R F W 2,µ ǫ (µ, (Id + ǫF ) # µ) = φ(µ) + ǫ R d ∇φ(µ)(x), F (x) dµ(x) + o R F (ǫ),
where we used the fact that W 2,µ ǫ (µ, (Id + ǫF ) # µ) = ǫ F L 2 (µ) as a direct consequence of [START_REF] Bullo | Distributed Control of Robotic Networks[END_REF].

We end this section by adapting the notion of local differentiability to vector-valued maps.

Definition 3.8 (Local differentiability of vector-valued maps). For

m ≥ 1, a map φ : P c (R d ) → R m is said to be locally differentiable at µ ∈ P c (R d ) if its components {φ i (•)} 1≤i≤m are locally differentiable.
Remark 3.9 (Chainrule for vector-valued maps). When m = d and φ :

P c (R d ) → R d is locally differentiable at µ ∈ P c (R d ),

we can apply Proposition 3.6 componentwisely to obtain

φ(ν) = φ(µ) + R 2d D µ φ(µ)(x)(y -x)dµ(x, y) + o R (W 2,µ (µ, ν)), ( 33
)
for every ν ∈ P(B µ (R)) with R > 0, where D µ φ(µ)(•) := (∇φ i (µ)(•)) 1≤i≤d is the matrix-valued map which rows are the Wasserstein gradients of the components {φ i (•)} 1≤i≤d . Similarly, by applying componentwisely the statements of Corollary 3.7, it also holds

φ((Id + ǫF ) # µ) = φ(µ) + ǫ R d D µ φ(µ)(x)F (x)dµ(x) + o R F (ǫ), ( 34
)
for all ǫ ∈ [-1, 1] and any F ∈ L ∞ (R d , R d ; µ).

Linearisations of non-local continuity equations

In this section, we derive the expression of the canonical linearised Cauchy problem associated to a non-local continuity equation with smooth driving velocity-field. In what follows we fix p ∈ [1, +∞) and for any compact set K ⊂ R d , we shall consider P(K) as a subset of the metric space (P p (R d ), W p ).

We henceforth focus our attention on the Cauchy problem

∂ t µ(t) + div v(t, µ(t))µ(t) = 0, µ(0) = µ 0 ∈ P c (R d ), (35)
driven by a non-local velocity-field v : [0, T ] × P c (R d ) × R d → R d satisfying the following assumptions.

Hypotheses (H).

For every R > 0, assume that the following holds with K := B(0, R).

(i) The non-local velocity field

v : [0, T ] × P c (R d ) × R d → R d satisfies hypotheses (CE).
(ii) For L 1 -almost every t ∈ [0, T ] and any

µ ∈ P c (R d ), the map x ∈ R d → v(t, µ, x) ∈ R d is Fréchet differentiable, and the application (µ, x) ∈ P(K) × K → D x v(t, µ, x) ∈ R d×d is continuous. (iii) For L 1 -almost every t ∈ [0, T ] and any x ∈ R d , the map µ ∈ P c (R d ) → v(t, µ, x) ∈ R d is locally
differentiable in the sense of Definition 3.8, and the application (µ, x, y)

∈ P(K) × K × K → D µ v(t, µ, x)(y) ∈ R d×d is continuous.
In the following proposition, we derive a general first-order linearisation formula for solutions of [START_REF] Frankowska | Distance Estimates to Feasible Controls for Systems with Final Point Constraints and Second Order Necessary Optimality Conditions[END_REF]. Similar techniques were applied in [START_REF] Bonnet | A Pontryagin Maximum Principle in Wasserstein Spaces for Constrained Optimal Control Problems[END_REF][START_REF] Bonnet | The Pontryagin Maximum Principle in the Wasserstein Space[END_REF] in the particular case of perturbations induced by needle variations (see e.g. [START_REF] Pontryagin | The Mathematical Theory of Optimal Processes[END_REF]). Proposition 3.10 (Linearisation of non-local continuity equations). Let µ 0 ∈ P(B(0, r)) for some r > 0, v : [0, T ] × P c (R d ) × R d → R d be a non-local velocity-field satisfying hypotheses (H), and µ(•) ∈ AC([0, T ], P(K)) be the corresponding solution of [START_REF] Frankowska | Distance Estimates to Feasible Controls for Systems with Final Point Constraints and Second Order Necessary Optimality Conditions[END_REF] where K := B(0, R r ) is given by [START_REF] Bonnet | A Pontryagin Maximum Principle in Wasserstein Spaces for Constrained Optimal Control Problems[END_REF].

Let F 0 ∈ C 0 (R d , R d ), w : [0, T ]×R d →
R d be a Carathéodory vector-field satisfying (CE) and consider the perturbed Cauchy problems

   ∂ t µ ǫ (t) + div v(t, µ ǫ (t)) + ǫw(t) µ ǫ (t) = 0, µ ǫ (0) = (Id + ǫF 0 ) # µ 0 . ( 36
)
for ǫ ∈ [-1, 1].
Then, there exists a family of maps 36) can be expressed explicitly as

(G ǫ (•, •)) ⊂ C 0 ([0, T ] × K, R d ) such that for every ǫ ∈ [-1, 1], the solution µ ǫ (•) ∈ AC([0, T ], P c (R d )) of (
µ ǫ (t) = G ǫ (t, •) # µ(t), ( 37
)
for all times t ∈ [0, T ]. Moreover, the application ǫ ∈ [-1, 1] → G ǫ (t, •) ∈ C 0 (K, R d ) admits a Taylor expansion at ǫ = 0, of the form G ǫ (t, •) = Id + ǫF t, Φ (t,0) [µ(t)](•) + o t (ǫ), ( 38
)
where

sup t∈[0,T ] o t (ǫ) C 0 (K,R d ) = o(ǫ) and F ∈ C 0 ([0, T ] × K, R d ) is the unique solution of the lin- earised non-local Cauchy problem            ∂ t F (t, x) = D x v t, µ(t), Φ (0,t) [µ 0 ](x) F (t, x) + w t, Φ (0,t) [µ 0 ](x) + R d D µ v t, µ(t), Φ (0,t) [µ 0 ](x) Φ (0,t) [µ 0 ](y) F (t, y)dµ 0 (y), F (0, x) = F 0 (x). ( 39
)
Proof. First, remark that for any ǫ ∈ [-1, 1], the non-local velocity-field

v ǫ : [0, T ]×P c (R d )×R d → R d defined for any (t, µ, x) ∈ [0, T ] × P c (R d ) × R d by v ǫ (t, µ, x) := v(t, µ, x) + ǫw(t, x), (40)
satisfies hypotheses (CE). Whence, denoting µ 0 ǫ := (Id + ǫF 0 ) # µ 0 , there exists by Corollary 2.12 a unique curve of measures µ ǫ (•) solution of (36) which can be represented as

µ ǫ (t) = Φ ǫ (0,t) [µ 0 ǫ ](•) # µ 0 ǫ , (41)
where

(Φ ǫ (0,t) [µ 0 ǫ ](•)) t∈[0,T ] stands for the non-local flow generated by v ǫ : [0, T ] × P c (R d ) × R d → R d starting from µ 0
ǫ , defined as in [START_REF] Bonnet | The Pontryagin Maximum Principle in the Wasserstein Space[END_REF]. For the sake of readability, we shall use the condensed notations

Φ (s,t) (x) := Φ (s,t) [µ(s)](x) and Φ ǫ (s,t) (x) := Φ ǫ (s,t) [µ ǫ (s)](x),
throughout the remainder of the proof. Recalling that µ 0 ǫ = (Id + ǫF 0 ) # µ 0 and that the curve µ(•) also admits the flow representation [START_REF] Bonnet | Differential Inclusions in Wasserstein Spaces: The Cauchy-Lipschitz Framework[END_REF], the expression in (41) can be rewritten as

µ ǫ (t) = Φ ǫ (0,t) • Id + ǫF 0 • Φ (t,0) (•) # µ(t), (42)
for all times t ∈ [0, T ], where "•" is the standard composition operation between functions. Hence, [START_REF] Gangbo | On Differentiability in the Wasserstein Space and Well-Posedness for Hamilton-Jacobi Equations[END_REF] holds with the family of maps (G ǫ (•, •)) defined by

G ǫ : (t, x) ∈ [0, T ] × K → Φ ǫ (0,t) • Id + ǫF 0 • Φ (t,0) (x), (43)
for every ǫ ∈ [-1, 1]. Our goal now is to establish the first-order expansion of [START_REF] Jimenez | Optimal Control of Multiagent Systems in the Wasserstein Space[END_REF].

By adapting the argument of [12, Proposition 5] to the case of non-local velocity-fields satisfying the localised differentiability assumptions (H)-(ii) and (H)-(iii), it can be shown that the map

ǫ ∈ [-1, 1] → Φ ǫ (0,•) (•) ∈ C 0 ([0, T ] × K ′ , R d ),
is Fréchet differentiable at ǫ = 0, where

K ′ := B(0, R ′ r ) and R ′ r > 0 are such that (Id + ǫF 0 )(K) ⊂ K ′ for all ǫ ∈ [-1, 1]. Denoting by Ψ ∈ C 0 ([0, T ] × K ′ , R d )
∈ R d → Φ (0,t) (x) ∈ R d is Fréchet-differentiable with Φ (0,t) (x + ǫh) = Φ (0,t) (x) + ǫD x Φ (0,t) (x)h + o t,x,h (ǫ), (45)
for all times t ∈ [0, T ] and any x, h ∈ R d , where sup

(t,x,h)∈[0,T ]×K×B(0,r ′ ) |o t,x,h (ǫ)| = o r ′ (ǫ),
for every r ′ > 0. By merging ( 44) and ( 45), we obtain for all (t, x)

∈ [0, T ] × K that Φ ǫ (0,t) x + ǫF 0 (x) = Φ (0,t) (x) + ǫD x Φ (0,t) (x)F 0 (x) + ǫΨ(t, x) + o t,x (ǫ), (46)
where sup (t,x)∈[0,T ]×K |o t,x (ǫ)| = o(ǫ). We now define the map

F ∈ C 0 ([0, T ] × K, R d ) by F (t, x) := D x Φ (0,t) (x)F 0 (x) + Ψ(t, x), (47)
for any (t, x) ∈ [0, T ]× K. By merging [START_REF] Piccoli | Transport Equation with Nonlocal Velocity in Wasserstein Spaces : Convergence of Numerical Schemes[END_REF] and [START_REF] Pogodaev | Impulsive Control of Nonlocal Transport Equation[END_REF], we obtain that ǫ ∈

[-1, 1] → G ǫ (t, •) ∈ C 0 (K, R d )
satisfies for all times t ∈ [0, T ] the following Taylor expansion at ǫ = 0

G ǫ (t, •) = Id + ǫF t, Φ (t,0) (•) + o t (ǫ), (48)
where

sup t∈[0,T ] o t (ǫ) C 0 (K,R d ) = o(ǫ) for every ǫ ∈ [-1, 1].
We now prove that the map [START_REF] Pontryagin | The Mathematical Theory of Optimal Processes[END_REF] is the unique solution of the linearised Cauchy problem [START_REF] Lasry | Mean Field Games[END_REF]. First, recall that by classical results on differentials of flow maps (see e.g. [14, Theorem 2.3.2]), the application t ∈

F ∈ C 0 ([0, T ] × K, R d ) defined in
[0, T ] → D x Φ (0,t) (x)F 0 (x) ∈ R d is the unique solution of D x Φ (0,t) (x)F 0 (x) = F 0 (x) + t 0 D x v s, µ(s), Φ (0,s) (x) D x Φ (0,s) (x)F 0 (x) ds, (49)
for any x ∈ K. By [START_REF] Piccoli | Control to Flocking of the Kinetic Cucker-Smale model[END_REF], it further holds

v s, µ ǫ (s), Φ ǫ (0,s) (x) = v s, µ ǫ (s), Φ (0,s) (x) + ǫΨ(s, x) + o s,x (ǫ) = v s, µ ǫ (s), Φ (0,s) (x) + ǫD x v s, µ ǫ (s), Φ (0,s) (x) Ψ(s, x) + o s,x (ǫ) = v s, µ ǫ (s), Φ (0,s) (x) + ǫD x v s, µ(s), Φ (0,s) (x) Ψ(s, x) + o s,x (ǫ), (50)
for L 1 -almost every s ∈ [0, T ] and any (ǫ,

x) ∈ [-1, 1] × K ′ , with T 0 sup x∈K ′ |o s,x (ǫ)|ds = o(ǫ),
and where we also used that ν ∈ P(K ′ ) → D x v(s, ν, Φ (0,s) (x)) is continuous by (H)-(ii). Using (H)-(iii), we can in turn apply the vector-valued chain rule of Remark 3.9 together with ( 42), ( 43) and ( 48) to obtain

v s, µ ǫ (s), Φ (0,s) (x) = v s, Id + ǫF (s, Φ (s,0) (•)) + o s (ǫ) # µ(s), Φ (0,s) (x) = v s, µ(s), Φ (0,s) (x) + ǫ R d D µ v s, µ(s), Φ (0,s) (x) (y)F s, Φ (s,0) (y) dµ(s)(y) + o s (ǫ) = v s, µ(s), Φ (0,s) (x) + ǫ R d D µ v s, µ(s), Φ (0,s) (x) Φ (0,s) (y) F (s, y)dµ 0 (y) + o s (ǫ), (51)
for L 1 -almost every s ∈ [0, T ] and all y ∈ K ′ . Observe now that for every ǫ ∈ [-1, 1], the family of perturbed flows (Φ ǫ (0,t) (•)) t∈[0,T ] can be characterised as the unique solution of the Carathéodory ODE

Φ ǫ (0,t) (y) = y + t 0 v ǫ s, Φ ǫ (0,s) (•) # µ 0 ǫ , Φ ǫ (0,s) (y) ds = y + t 0 v s, µ ǫ (s), Φ ǫ (0,s) (y) + ǫw s, Φ ǫ (0,s) (y) ds, (52)
for any (t, y) ∈ [0, T ] × K ′ . Therefore by plugging ( 44), ( 50) and ( 51) into (52), we further obtain

Φ (0,t) (x) + ǫΨ(t, x) = x + t 0 v s, µ(s), Φ (0,s) (x) ds + ǫ t 0 D x v s, µ(s), Φ (0,s) (x) Ψ(s, x)ds + ǫ t 0 R d D µ v s, µ(s), Φ (0,s) (x) Φ (0,s) (y) F (s, y)dµ 0 (y)ds + ǫ t 0 w s, Φ (0,s) (x) ds + o t,x (ǫ),
for any (t, x) ∈ [0, T ]×K and all ǫ ∈ [-1, 1], where sup (t,x)∈[0,T ]×K |o t,x (ǫ)| = o(ǫ). By identifying terms and observing that the flow maps (Φ (0,t) (•)) t∈[0,T ] satisfy [START_REF] Bonnet | The Pontryagin Maximum Principle in the Wasserstein Space[END_REF], we recover the ODE characterisation

Ψ(t, x) = t 0 D x v s, µ(s), Φ (0,s) (x) Ψ(s, x) + w s, Φ (0,s) (x) ds + t 0 R d D µ v s, µ(s), Φ (0,s) (x) Φ (0,s) (y) F (s, y)dµ 0 (y)ds, (53)
for all (t, x) ∈ [0, T ] × K. Upon combining ( 49) and (53), we conclude that the map 47) solves [START_REF] Lasry | Mean Field Games[END_REF]. The uniqueness of solutions to this linearised problem can then be recovered under hypotheses (H) from Grönwall's Lemma.

F ∈ C 0 ([0, T ] × K, R d ) defined in (
In the following theorem, we show that when the velocity perturbation w : [0, T ] × R d → R d belongs to the tangent cone to the admissible velocities of a continuity inclusion of the form ( 6) with a convexified right-hand side, there exist solutions of the non-convexified inclusion whose distance to the measure defined in [START_REF] Gangbo | On Differentiability in the Wasserstein Space and Well-Posedness for Hamilton-Jacobi Equations[END_REF] is infinitesimally small compared to ǫ > 0.

Definition 3.11 (Tangent cones to convex hulls of C

0 (R d , R d )-valued multifunctions). Let V : [0, T ]× P c (R d ) ⇒ C 0 (R d , R d ) be a set-valued map and v ∈ co V (t, µ) for some t ∈ [0, T ] and µ ∈ P c (R d ),
where co V (t, µ) is given in the sense of [START_REF] Bellomo | On the Dynamics of Social Conflicts: Looking for the Black Swan[END_REF]. The tangent cone to co V (t, µ) at v is defined by

T co V (t,µ) (v) := w ∈ C 0 (R d , R d ) s.t. w |K ∈ T co V K (t,µ) (v |K ) for any K := B(0, R) with R > 0 , where T co V K (t,µ) (v |K ) is taken in the Banach space C 0 (K, R d ), • C 0 (K,R d ) .
Theorem 3.12 (Variational linearisation). Let µ 0 ∈ P(B(0, r)) for some r > 0 and V : [START_REF] Aubin | Differential Inclusions[END_REF], and suppose that for L 1almost every t ∈ [0, T ] the following representation

[0, T ] × P c (R d ) ⇒ C 0 (R d , R d )

be a set-valued map satisfying hypotheses (DI) with p ∈ [1, +∞). Moreover, let (µ(•), v(•)) be a trajectory-selection pair solution of the inclusion

v(t) := v(t, µ(t)) ∈ V (t, µ(t)), holds with v : [0, T ]×P c (R d )×R d → R d satisfying hypotheses (H) and v(t, ν) ∈ V (t, ν) for L 1 -almost every t ∈ [0, T ] and any ν ∈ P c (R d ). Let F 0 ∈ C 0 (R d , R d ), w : [0, T ] × R d → R d be
a Carathéodory vector-field satisfying hypotheses (CE) along with the pointwise inclusions

w(t) ∈ T co V (t,µ(t)) v(t, µ(t)) for L 1 -almost every t ∈ [0, T ], ( 54
)
and F : [0, T ] × R d → R d be the corresponding solution of the linearised Cauchy problem [START_REF] Lasry | Mean Field Games[END_REF].

Then for any ǫ ∈ [0, 1], there exists a solution μǫ (•) of the continuity inclusion

   ∂ t μǫ (t) ∈ -div V (t, μǫ (t))μ ǫ (t) , μǫ (0) = (Id + ǫF 0 ) # µ 0 , ( 55
)
such that sup t∈[0,T ] W p μǫ (t), G ǫ (t, •) # µ(t) = o(ǫ), ( 56
)
where the family of maps

(G ǫ (•, •)) ⊂ C 0 ([0, T ] × R d , R d ) is given as in Proposition 3.10.
Proof. In the sequel, we shall interchangeably use the notations v(t, µ(t)) and w(t) to denote the vector-fields defined on R d or their restrictions to some closed ball

K := B(0, R). First, remark that v : [0, T ]× P c (R d )× R d → R d satisfies hypotheses (CE)
as a direct consequence of (H)-(i). Hence, by Corollary 2.12, there exists R r > 0 such that supp(µ(t)) ⊂ K := B(0, R r ) for all times t ∈ [0, T ]. Furthermore observe that since w(•) satisfies (54), it holds by Definition 2.6 that

dist C 0 (K,R d ) v(t, µ(t)) + ǫw(t); co V K (t, µ(t)) = o t (ǫ), ( 57
)
for L 1 -almost every t ∈ [0, T ] and all ǫ ∈ [0, 1], where o t (ǫ)/ǫ → 0 as ǫ → 0 + . Moreover, one also has

dist C 0 (K,R d ) v(t, µ(t)) + ǫw(t); co V K (t, µ(t)) ≤ ǫ w(t) C 0 (K,R d ) , ( 58
)
because v(t, µ(t)) ∈ V (t, µ(t)), which implies in particular that the remainder defined in (57) divided by ǫ > 0 is integrably bounded. In addition, observe that the non-local velocity field

v ǫ : (t, µ, x) ∈ [0, T ] × P c (R d ) × R d → v(t, µ, x) + ǫw(t,
   ∂ t µ ǫ (t) + div v(t, µ ǫ (t)) + ǫw(t) µ ǫ (t) = 0, µ ǫ (0) = (Id + ǫF 0 ) # µ 0 , ( 59
)
and let

K ′ := B(0, R ′ r ) be a closed ball such that supp(µ ǫ (t)) ⊂ K ′ for any (t, ǫ) ∈ [0, T ] × [0, 1]
. By Theorem 2.13 applied to V (•, •) := {v(•, •)} together with Corollary 2.12, there exists C > 0 such that sup

t∈[0,T ] W p (µ(t), µ ǫ (t)) ≤ Cǫ, ( 60
)
for every ǫ ∈ [0, 1]. Since w(•) satisfies ( 57) and (58), we can apply [START_REF] Aubin | Set-Valued Analysis[END_REF]Theorem 8.1.3] to recover the existence of a family (w ǫ (•)) of L 1 -measurable maps such that

   w(t) -w ǫ (t) C 0 (K ′ ,R d ) -→ ǫ→0 + 0 and w ǫ (t) C 0 (K ′ ,R d ) ≤ 2 w(t) C 0 (K ′ ,R d ) + 1, v(t, µ(t)) + √ ǫw ǫ (t) ∈ co V K ′ (t, µ(t)), (61)
for L 1 -almost every t ∈ [0, T ] and all ǫ ∈ [0, 1]. By hypothesis (DI)-(iv) together with (60) and [START_REF] Aubin | Set-Valued Analysis[END_REF]Theorem 8.1.3], one can also find measurable selections

t ∈ [0, T ] → v ǫ (t) ∈ co V K ′ (t, µ ǫ (t)) such that v(t, µ(t)) + √ ǫw ǫ (t) -v ǫ (t) C 0 (K ′ ,R d ) ≤ L K ′ (t)W p (µ(t), µ ǫ (t)) ≤ L K ′ (t)Cǫ, (62)
for L 1 -almost every t ∈ [0, T ] and any ǫ ∈ [0, 1]. Moreover observing that the sets co

V K ′ (t, µ ǫ (t)) ⊂ C 0 (K ′ , R d ) are convex, it holds (1 - √ ǫ)v(t, µ ǫ (t)) + √ ǫv ǫ (t) ∈ co V K ′ (t, µ ǫ (t)),
which along with (62) further yields

(1 - √ ǫ)v(t, µ ǫ (t)) + √ ǫ v(t, µ(t)) + √ ǫw ǫ (t) ∈ co V K ′ (t, µ ǫ (t)) + L K ′ (t)Cǫ 3/2 B C 0 (K ′ ,R d ) , ( 63
) for L 1 -almost every t ∈ [0, T ] and any ǫ ∈ [0, 1]. Recalling that v : [0, T ] × P c (R d ) × R d → R d satisfies hypotheses (
CE), we again have by ( 60)

v(t, µ(t)) -v(t, µ ǫ (t)) C 0 (K ′ ,R d ) ≤ L K ′ (t)W p (µ(t), µ ǫ (t)) ≤ L K ′ (t)Cǫ, for L 1 -almost every t ∈ [0, T ].
Upon plugging this last estimate into (63), we obtain

v(t, µ ǫ (t)) + ǫw(t) = (1 - √ ǫ)v(t, µ ǫ (t)) + √ ǫ v(t, µ ǫ (t)) + √ ǫw ǫ (t) + ǫ w(t) -w ǫ (t) ∈ co V K ′ (t, µ ǫ (t)) + 2L K ′ (t)Cǫ 3/2 + ǫ w(t) -w ǫ (t) C 0 (K ′ ,R d ) B C 0 (K ′ ,R d ) .
This together with the properties (61) of the family of maps (w ǫ (•)) and the fact that

L K ′ (•) ∈ L 1 ([0, T ], R + )
imply that for every ǫ ∈ [0, 1], the mismatch function

η ǫ : t ∈ [0, T ] → dist C 0 (K ′ ,R d ) v(t, µ ǫ (t)) + ǫw(t); co V K ′ (t, µ ǫ (t)) , ( 64
)
is integrable and satisfies r(ǫ) := η ǫ (•) 1 = o(ǫ) for all ǫ ∈ [0, 1] by Lebesgue's dominated convergence theorem. Whence, we can apply Theorem 2.13 to obtain the existence of a curve μǫ (•) solution of

   ∂ t μǫ (t) ∈ -div co V (t, μǫ (t))μ ǫ (t) , μǫ (0) = (Id + ǫF 0 ) # µ 0 , ( 65
)
such that sup

t∈[0,T ] W p (μ ǫ (t), µ ǫ (t)) = o(ǫ), ( 66
)
for any ǫ ∈ [0, 1]. Moreover by Theorem 2.14 applied with δ := r(ǫ), we can choose the curve μǫ (•) satisfying (66) as a solution of (55) instead of (65). Finally, observe that by Proposition 3.10 one can express µ ǫ (t) for all t ∈ [0, T ] as

µ ǫ (t) = G ǫ (t, •) # µ(t), ( 67
)
where the family of maps [START_REF] Jimenez | Optimal Control of Multiagent Systems in the Wasserstein Space[END_REF]. This together with (66) yields

(G ǫ (•, •)) ⊂ C 0 ([0, T ] × K, R d ) satisfies
sup t∈[0,T ] W p (μ ǫ (t), G ǫ (t, •) # µ(t)) = o(ǫ),
which concludes the proof of Theorem 3.12.

Pontryagin Maximum Principle in Wasserstein spaces

In this section, we apply the differential-theoretic concepts studied in Section 3 to prove a Pontryagin Maximum Principle ("PMP" in the sequel) for optimal control problems in Wasserstein spaces with inequality final-point constraints. This result partially improves those of [START_REF] Bonnet | A Pontryagin Maximum Principle in Wasserstein Spaces for Constrained Optimal Control Problems[END_REF][START_REF] Bonnet | The Pontryagin Maximum Principle in the Wasserstein Space[END_REF] as the strategy is more concise and allows to discriminate between the normal and abnormal scenarios of the PMP.

To lighten the exposition, we will illustrate the full proof strategy on a Mayer problem in Section 4.1, and we will then prove the PMP for a Bolza problem in Section 4.2 by adapting a standard procedure which directly builds on the PMP for the Mayer problem.

The PMP for constrained Mayer problems in Wasserstein spaces

In this section, we focus our attention on the following constrained Mayer problem

(P MC )                  min u(•)∈U ϕ(µ(T )) s.t.          ∂ t µ(t) + div v(t, µ(t), u(t))µ(t) = 0, µ(0) = µ 0 , µ(T ) ∈ Q T ,
where ϕ : P c (R d ) → R is a given final cost. Here, we fix an initial datum µ 0 ∈ P c (R d ) and a controlled non-local velocity field v :

[0, T ] × P c (R d ) × U × R d → R d
U := u : [0, T ] → U s.t. u(•) is L 1 -measurable ,
where (U, d U ) is a compact metric space, and we suppose that the set of final-point constraints Q T is defined by a collection of functional inequalities of the form

Q T := µ ∈ P 2 (R d ) s.t. Ψ i (µ) ≤ 0 for all i ∈ {1, . . . , n} ,
where Ψ i : P c (R d ) → R for every index i ∈ {1, . . . , n}. From now on, we consider P c (R d ) as a subset of the metric space (P 1 (R d ), W 1 ).

Hypotheses (MCP).

For every R > 0, assume that the following holds with K := B(0, R).

(i) For every u ∈ U , the non-local velocity-field (t, µ, x) ∈ [0, T ] × P c (R d ) × R d → v(t, µ, u)(x) ∈ R d
satisfies hypotheses (H) with p = 1 and constants that are independent of u ∈ U . Moreover, the map

u ∈ U → v(t, µ, u)(x) ∈ R d is continuous for L 1 -almost every t ∈ [0, T ] and any (µ, x) ∈ P c (R d ) × R d .
(ii) The final cost ϕ(•) and the constraint functionals {Ψ i (•)} 1≤i≤n are Lipschitz continuous in the W 1 -metric over P(K) and locally differentiable over P c (R d ). Moreover, the maps

x ∈ R d → ∇ϕ(µ)(x) ∈ R d and x ∈ R d → ∇Ψ i (µ)(x) ∈ R d ,
are continuous for every i ∈ {1, . . . , n}.

As illustrated in [START_REF] Bonnet | Differential Inclusions in Wasserstein Spaces: The Cauchy-Lipschitz Framework[END_REF] and recalled in Theorem 2.15 above, the set of all trajectories µ(•) satisfying

∂ t µ(t) + div v(t, µ(t), u(t))µ(t) = 0 for some u(•) ∈ U , (68)
coincides exactly with the solution set of the continuity inclusion

∂ t µ(t) ∈ -div V (t, µ(t))µ(t) , (69)
when the set-valued map

V : [0, T ] × P c (R d ) ⇒ C 0 (R d , R d ) is defined by V (t, µ) := v ∈ C 0 (R d , R d ) s.t. v(•) = v(t, µ, u, •) for some u ∈ U , ( 70
) for all (t, µ) ∈ [0, T ] × P c (R d ).
ϕ(µ * (T )) ≤ ϕ(µ(T )),
for every other admissible pair Remark 4.3 (On the existence of optimal trajectory-control pairs). In [START_REF] Bonnet | Differential Inclusions in Wasserstein Spaces: The Cauchy-Lipschitz Framework[END_REF]Remark 4 and Theorem 7], an existence result is provided for a more general variant of problem (P MC ) in the presence of running and final-point constraints, under a set of hypotheses which are a natural adaptation of (MCP). The only additional requirement needed to obtain this existence result compared to necessary optimality conditions is the convexity of the sets of admissible velocities V (t, µ) ⊂ C 0 (R d , R d ), which is instrumental in showing that the solution set of the corresponding inclusion is compact in the topology of the uniform convergence (see [START_REF] Bonnet | Differential Inclusions in Wasserstein Spaces: The Cauchy-Lipschitz Framework[END_REF]Theorem 6]). We would like to stress that in [START_REF] Bonnet | Differential Inclusions in Wasserstein Spaces: The Cauchy-Lipschitz Framework[END_REF]Theorem 7], it is also assumed that u ∈ U → v(t, µ, u, x) is Lipschitz continuous. However, this hypothesis is only needed when the controls are closed-loop, and it follows from our proof therein that the usual continuity assumption is sufficient when the controls are open-loop, see [START_REF] Bonnet | Differential Inclusions in Wasserstein Spaces: The Cauchy-Lipschitz Framework[END_REF]Remark 5].

(µ(•), u(•)) which satisfies sup t∈[0,T ] W 1 (µ * (t), µ(t)) ≤ ǫ. Remark 4.2 (Strong local W p -minimisers). Observe that if µ, ν ∈ P(B(0, R)) for some R > 0, it holds that W 1 (µ, ν) ≤ W p (µ, ν) ≤ (2R) (p-1)/p W 1 (µ, ν)
Let r > 0 be such that µ 0 ∈ P(B(0, r)), and observe that under hypotheses (MCP) the non-local velocity-fields (t, µ, x) ,µ,u,x) satisfy hypotheses (CE) with constants which are uniform with respect to u ∈ U . Therefore by Theorem 2.11, there exists a radius R r > 0 depending only on the magnitudes of r, m(•) 1 such that every admissible pair (µ(•), u(•)) verifies supp(µ(t)) ⊂ K := B(0, R r ), for all times t ∈ [0, T ]. In the sequel, we will denote by (Φ u * (s,t) (•)) s,t∈[0,T ] the semigroup of non-local flows which represent the optimal curve µ * (•) via ( 11) and [START_REF] Bonnet | The Pontryagin Maximum Principle in the Wasserstein Space[END_REF].

∈ [0, T ] × P c (R d ) × R d → v(t
We are now ready to state and prove our main result, which is a PMP for (P MC ). In what follows, we denote by J 2d the symplectic matrix of R 2d , i.e.

J 2d = 0 Id -Id 0 ,
and by H : [0, T ] × P c (R 2d ) × U → R the Hamiltonian of the control problem, defined by

H(t, ν, u) = R 2d r, v(t, π 1 # ν, u, x) dν(x, r), (71)
for all (t, ν, u) ∈ [0, T ] × P c (R 2d ) × U . We also consider the set of active indices at µ * (T ), given by

I • (µ * (T )) := i ∈ {1, . . . , n} s.t. µ * (T ) ∈ ∂Q i T ,
where we introduced the sets

Q i T := µ ∈ P 2 (R d ) s.t. Ψ i (µ) ≤ 0 for every i ∈ {1, . . . , n}. Theorem 4.4 (Pontryagin Maximum Principle for (P MC )). Let (µ * (•), u * (•)) ∈ AC([0, T ], P c (R d ))
×U be a strong local minimiser for (P MC ), and suppose that hypotheses (MCP) hold.

Then, there exist

R ′ r > 0, non-trivial Lagrange multipliers (λ 0 , λ 1 , . . . , λ n ) ∈ {0, 1} × R n + and a curve of measures ν * (•) ∈ AC([0, T ], P(K ′ × K ′ )) with K ′ := B(0, R ′ r ) such that the following holds. (i) The curve ν * (•) solves the forward-backward Hamiltonian continuity equation                ∂ t ν * (t) + div J 2d ∇ ν H(t, ν * (t), u * (t))ν * (t) = 0, π 1 # ν * (t) = µ * (t)
for all times t ∈ [0, T ],

ν * (T ) = Id , -λ 0 ∇ϕ(µ * (T )) - n i=1 λ i ∇Ψ i (µ * (T )) # µ * (T ), (72)
where the Wasserstein gradient of the Hamiltonian is given explicitly by

∇ ν H(t, ν * (t), u * (t))(x, r) =    D x v t, µ * (t), u * (t), x ⊤ r + R 2d D µ v t, µ * (t), u * (t), y (x) ⊤ p dν * (t)(y, p) v t, µ * (t), u * (t), x    , ( 73
)
for L 1 -almost every t ∈ [0, T ] and any (x, r) ∈ R 2d .

(ii) The complementarity slackness conditions

λ i Ψ i (µ * (T )) = 0, (74)
hold for every index i ∈ {1, . . . , n}.

(iii) The Pontryagin maximisation condition

H(t, ν * (t), u * (t)) = max u∈U H(t, ν * (t), u), ( 75
)
holds for L 1 -almost every t ∈ [0, T ]. Moreover, if there exists a map t ∈ [0, T ] → w(t) ∈ T co V (t,µ * (t)) v(t, µ * (t), u * (t) satisfying hypotheses (CE) such that the corresponding solution F ∈ C 0 ([0, T ] × K, R d ) of (39) with F 0 = 0 satisfies ∇Ψ i (µ * (T )), F T, Φ u * (T,0) (•) L 2 (µ * (T )) < 0, for every i ∈ I • (µ * (T )), then the PMP is normal, i.e. λ 0 = 1.
We split the proof of Theorem 4.4 into four steps. In Step 1, we introduce suitable variational linearisations of the controlled non-local continuity equation inspired by Theorem 3.12. In Step 2, we focus on the situation in which the end-points of the trajectories of the linearised system do not satisfy the constraint qualification condition, which leads to the abnormal PMP, i.e. the case λ 0 = 0. In Step 3, we analyse the converse scenario and prove that it corresponds to the normal PMP, i.e. the case λ 0 = 1. Finally in Step 4, we build a state-costate curve ν * (•) solution of the Hamiltonian flow (72), along which the maximum principle (75) holds.

Step 1: Variational linearisations along (µ * (•), u * (•)). Observe that v(t, µ, u * (t)) ∈ co V (t, µ) for L 1 -almost every t ∈ [0, T ] and all µ ∈ P c (R d ), where the set-valued map

V : [0, T ] × P c (R d ) ⇒ C 0 (R d , R d
) is given by (70), and satisfies hypotheses (DI) as a consequence of (MCP)-(i). Let now

t ∈ [0, T ] → w(t) ∈ T co V (t,µ * (t)) v(t,
(•) + o t (ǫ) # µ * (t) = o(ǫ), (77)
for any ǫ > 0 and all times t ∈ [0, T ], where sup

t∈[0,T ] o t (ǫ) C 0 (K,R d ) = o(ǫ).
Here, the map

F ∈ C 0 ([0, T ] × K, R d )
is the unique solution of (39) with F 0 = 0 and w(•) satisfying ( 76) and (CE). From now on, we will denote by R L T ⊂ C 0 (R d , R d ) the reachable set at time T of (39) with F 0 = 0, where the non-local velocity-field

(t, x) ∈ [0, T ] × R d → v(t, µ(t), Φ (0,t) [µ 0 ](x)) ∈ R d ,
is replaced by the controlled non-local vector-field

(t, x) ∈ [0, T ] × R d → v(t, µ * (t), u * (t), Φ u * (0,t) (x)) ∈ R d , namely R L T := G T ∈ C 0 (R d , R d ) s.t. G T (•) = F T, Φ u * (T,0) (•)
where F (•, •) solves [START_REF] Lasry | Mean Field Games[END_REF] with F 0 = 0 and w(•) satisfying (76) and hypotheses (CE) .

Up to relabelling the functionals {Ψ i (•)} n i=1 , we can suppose without loss of generality that I • (µ * (T )) = {1, . . . , k} for some k ≤ n, whenever it is non-empty. In addition, observe that if ∇Ψ i (µ * (T )) = 0 for some i ∈ I • (µ * (T )), then the statements of the PMP are verified with λ i = 1, λ j = 0 for every j ∈ {0, . . . , n}\{i} and ν * (t) := µ * (t) × δ 0 for all times t ∈ [0, T ]. In this case, one has

H(t, ν * (t), u) ≡ 0, ∇ ν H(t, ν * (t), u * (t))(x, r) = 0 v(t, µ * (t), u * (t), x)
and ν * (T ) = µ * (T ) × δ 0 , for L 1 -almost every t ∈ [0, T ], all u ∈ U and ν * (t)-almost every (x, r) ∈ R d , and it can then be checked that the curve ν * (•) defined above trivially satisfies the statements of Theorem 4.4. Similarly if ∇ϕ(µ * (T )) = 0, we can set λ 0 = 1 and λ i = 0 for all i ∈ {1, . . . , n}, so that the PMP is again satisfied with ν * (t) = µ * (t) × δ 0 . Hence, there only remains to consider the case in which ∇ϕ(µ * (T )) = 0 and ∇Ψ i (µ * (T )) = 0 for all i ∈ I • (µ * (T )).

If I • (µ * (T )) = ∅, we introduce the non-empty subset of R k defined by

B T := ∇Ψ 1 (µ * (T )), G T L 2 (µ * (T )) , . . . , ∇Ψ k (µ * (T )), G T L 2 (µ * (T )) s.t. G T ∈ R L T , ( 78
)
which allows to discriminate between the two scenarios corresponding to the abnormal and normal versions of the maximum principle.

Step 2: Separation without constraint qualification. In this case, we suppose that

B T ∩ (R * -) k := B T ∩ (-∞, 0) k = ∅. Notice that B T is a convex subset of R k since R L T ⊂ C 0 (R d , R d ) is convex. Because (R * -) k is convex
λ i ∇Ψ i (µ * (T )), G T L 2 (µ * (T )) ≥ 0,
for every element G T ∈ R L T . This inequality can be in turn rewritten as

-P T , F T, Φ u * (T,0) (•) L 2 (µ * (T )) ≤ 0, (80)
for every solution F ∈ C 0 ([0, T ] × K, R d ) of ( 39) with F 0 = 0 and w(•) satisfying ( 76) and (CE), where the covector P T ∈ C 0 (K, R d ) is defined by

P T := k i=1 λ i ∇Ψ i (µ * (T )). ( 81
)
Step 3: Separation with constraint qualification. We now investigate the scenario in which

B T ∩ (R * -) k = ∅.
In this context, consider the set A T ⊂ R k+1 defined by

A T := ∇ϕ(µ * (T )), G T L 2 (µ * (T )) , ∇Ψ 1 (µ * (T )), G T L 2 (µ * (T )) , . . . , ∇Ψ k (µ * (T )), G T L 2 (µ * (T )) s.t. G T ∈ R L T .
In the following lemma, we prove that the set A T defined above is disjoint from (R * -) k+1 . Then, it necessarily holds that

A T ∩ (R * -) k+1 = ∅. ( 82
)
Proof. Suppose by contradiction that the intersection in (82) is non-empty. Then, there exists w(•) satisfying ( 76) and (CE) such that the solution F ∈ C 0 ([0, T ] × K, R d ) of ( 39) with F 0 = 0 verifies

∇ϕ(µ * (T )), F T, Φ u * (T,0) (•) L 2 (µ * (T )) < 0, (83)
and

∇Ψ i (µ * (T )), F T, Φ u * (T,0) (•) L 2 (µ * (T )) < 0, (84)
for every i ∈ {1, . . . , k}. By Step 1, there exists a compact set K ′ ⊂ R d such that for every ǫ > 0 sufficiently small, there exists a curve μǫ (•) ∈ AC([0, T ], P(K ′ )) solution of (69) which satisfies sup

t∈[0,T ] W 1 μǫ (t), Id + ǫF t, Φ u * (t,0) (•) + o t (ǫ) # µ * (t) = o(ǫ),
where sup t∈[0,T ] o t (ǫ) C 0 (K ′ ,R d ) = o(ǫ). Since the solution set of (69) coincides with that of (68), there exists ũǫ (•) ∈ U such that (μ ǫ (•), ũǫ (•)) is a trajectory-control pair for (68). Moreover by hypotheses (MCP)-(ii), the maps ϕ(•) and {Ψ i (•)} 1≤i≤n are locally differentiable in the sense of Definition 3.3. Therefore, it holds as a consequence of Corollary 3.7 together with (83) that

ϕ(μ ǫ (T )) = ϕ Id + ǫF T, Φ u * (T,0) (•) + o T (ǫ) # µ * (T ) + o(ǫ) = ϕ(µ * (T )) + ǫ ∇ϕ(µ * (T )), F T, Φ u * (T,0) (•) L 2 (µ * (T )) + o T (ǫ) < ϕ(µ * (T )), (85)
and analogously, by (84),

Ψ i (μ ǫ (T )) < Ψ i (µ * (T )), (86)
for every index i ∈ {1, . . . , k} and any ǫ > 0 small enough, where we also used that fact that the maps ϕ(•) and {Ψ i (•)} n i=1 are Lipschitz continuous over P(K ′ ) in the W 1 -metric. Combining (85) and (86) while observing that Ψ i (μ ǫ (T )) < 0 as well for i / ∈ I • (µ * (T )) and ǫ > 0 small enough, we have thus built an admissible pair (μ ǫ (•), ũǫ (•)) for (P MC ) that produces a cost strictly smaller than (µ * (•), u * (•)), and which satisfies sup t∈[0,T ] W 1 (µ * (t), μǫ (t)) ≤ Cǫ for some constant C > 0 independent of ǫ > 0. This contradicts our assumption that the pair (µ * (•), u * (•)) is a strong local minimiser for (P MC ).

As a consequence of Lemma 4.5, the intersection described in (82) is necessarily empty. Since both sets in the latter are convex, the separation theorem yields the existence of a non-trivial element p := (λ 0 , . . . , λ k ) ∈ R k+1 such that sup

d∈(R * -) k+1 p, d ≤ inf a∈A T p, a . ( 87
)
By repeating the same arguments as in Step 2 above, we again have that (λ 0 , . . . , λ k ) ∈ R k+1 + . In this case however, it necessarily holds that λ 0 = 0. Indeed if λ 0 = 0, then (87) becomes equivalent to B T ∩ (R * -) k = ∅ because (R * -) k is open, which contradicts our standing assumption. Hence up to renormalising all the multipliers by λ 0 > 0, we recover

∇ϕ(µ * (T )), G T L 2 (µ * (T )) + k i=1 λ i ∇Ψ i (µ * (T )), G T L 2 (µ * (T )) ≥ 0, for every G T ∈ R L
T . The latter expression can be equivalently rewritten as

-P T , F T, Φ u * (T,0) (•) L 2 (µ * (T )) ≤ 0,
where P T ∈ C 0 (K, R d ) is given in this context by

P T := ∇ϕ(µ * (T )) + k i=1 λ i ∇Ψ i (µ * (T )). ( 88
)
Observe now that if I • (µ * (T )) = ∅, we can repeat the same arguments to obtain

∇ϕ(µ * (T )), G T L 2 (µ * (T )) ≥ 0,
for any G T ∈ R L T , and set P T := ∇ϕ(µ * (T )).

Step 4: Proof of the PMP. Condensing the results of Step 2 and Step 3 and setting λ i = 0 for all i ∈ {k + 1, . . . , n}, we have built a covector P T ∈ C 0 (K, R d ) given explicitly by

P T = λ 0 ∇ϕ(µ * (T )) + n i=1 λ i ∇Ψ i (µ * (T )), (89)
for some (λ 0 , λ 1 , . . . , λ n ) ∈ {0, 1} × R n + not all equal to 0 and satisfying λ i Ψ i (µ * (T )) = 0 for every i ∈ {1, . . . , n}. Moreover, the covector P T is such that the family of end-point inequalities

R d -P T (x), F T, Φ u * (T,0) (x) dµ * (T )(x) ≤ 0, (90)
hold for any solution F ∈ C 0 ([0, T ] × K, R d ) of ( 39) with F 0 = 0 and w(•) satisfying ( 76) and (CE).

Our goal now is to build a curve ν * (•) solution of the forward-backward continuity equation

         ∂ t ν * (t) + div V(t, ν * (t))ν * (t) = 0, π 1 # ν * (t) = µ * (t) for all times t ∈ [0, T ], ν * (T ) = (Id, -P T ) # µ * (T ), (91)
where the non-local velocity field V :

[0, T ] × P c (R 2d ) × R 2d → R 2d is defined by V(t, ν, x, r) :=     v t, π 1 # ν, u * (t), x -D x v t, π 1 # ν, u * (t), x ⊤ r - R 2d D µ v t, π 1 # ν, u * (t), y (x) ⊤ p dν(y, p)     , (92)
for L 1 -almost every t ∈ [0, T ] and any (ν, x, r)

∈ P c (R 2d ) × R 2d .
Observe that V(•, •, •) does not satisfy hypotheses (CE), so that we cannot directly apply the existence result of Corollary 2.12 to assert that (91) admits solutions. The following lemma, originally established in [START_REF] Bonnet | The Pontryagin Maximum Principle in the Wasserstein Space[END_REF], provides an explicit disintegration construction of such solutions by exploiting the cascaded structure of the system (see also [START_REF] Bonnet | A Pontryagin Maximum Principle in Wasserstein Spaces for Constrained Optimal Control Problems[END_REF]).

             ∂ t Ψ x (T,t) (r) = -D x v t, µ * (t), u * (t), Φ u * (T,t) (x) ⊤ Ψ x (T,t) (r) - R 2d D µ v t, µ * (t), u * (t), Φ u * (T,t) (y) Φ u * (T,t) (x) ⊤ Ψ y (T,t) (p) d (Id, -P T ) # µ * (T ) (y, p), Ψ x (T,T ) (r) = r,
and define the curve of measures σ *

x (•) ∈ AC([0, T ], P c (R d )) as σ * x (t) := Ψ x (T,t) (•) # δ (-P T (x)) ,
for all times t ∈ [0, T ]. Then, the curve given by ν

* : t ∈ [0, T ] → Φ u * (T,t) • π 1 , π 2 # ν * T (t) with ν * T (t) := R d σ * x (t)dµ * (T )(x),
is a solution of (91). Moreover, there exist

R ′ r > 0 and m ′ r (•) ∈ L 1 ([0, T ], R + ) such that supp(ν * (t)) ⊂ K ′ × K ′ and W 1 (ν * (t), ν * (s)) ≤ t s m ′ r (τ )dτ, for all times 0 ≤ s ≤ t ≤ T , where K ′ := B(0, R ′ r ).
Proof. See [10, Lemma 3.7] and [START_REF] Bonnet | The Pontryagin Maximum Principle in the Wasserstein Space[END_REF]Lemma 6].

Applying to the Hamiltonian ν ∈ P c (R d ) → H(t, ν, u) ∈ R defined in (71) the results of Section 5, which provide analytical expressions for the gradients of smooth integral functionals, one can check V(t, ν * (t), x, r) = J 2d ∇ ν H(t, ν * (t), u * (t))(x, r), for L 1 -almost every t ∈ [0, T ] and any (x, r) ∈ R 2d . Since ν * (T ) = (Id, -P T ) # µ * (T ) by the construction detailed in Lemma 4.6 with P T being given by (89), the curve ν * (•) is a solution of (72). In the next lemma, we state an auxiliary result which will in turn yield the maximisation condition.

H : t ∈ [0, T ] → R 2d r, F t, Φ u * (t,0) (x) dν * (t)(x, r), ( 93
)
where

F ∈ C 0 ([0, T ] × K, R d ) is the corresponding solution of (39) with F 0 = 0. Then, H(•) ∈ AC([0, T ], R) and its pointwise derivative is given explicitly by d dt H(t) = R 2d r, w(t, x) dν * (t)(x, r), ( 94
) for L 1 -almost every t ∈ [0, T ].
Proof. The proof of this result is a matter of fairly long computations which mimic those already performed in [10, Lemma 3.9] and [START_REF] Bonnet | The Pontryagin Maximum Principle in the Wasserstein Space[END_REF]Lemma 7].

Observe that by the definition of ν * (•) given in Lemma 4.6 together with (90), one has

R 2d r, F T, Φ u * (T,0) (x) dν * (T )(x,
T 0 R 2d r, w(t, x) dν * (t)(x, r)dt = Ωm H(t, ν * (t), ũ(t)) -H(t, ν * (t), u * (t)) dt ≥ 1 m L 1 (Ω m ),
which violates (97). Thus, the set Ω := ∪ m≥1 Ω m ⊂ [0, T ] necessarily has zero measure, which by definition of the sets Ũm (t) for L 1 -almost every t ∈ [0, T ] yields the maximisation condition (75).

Remark 4.8 (On the choice of performing separations on A T and B T ). Usually, geometric proofs of the PMP and its second-order variants tend to involve separation arguments on sets of trajectories which are not transposable to the setting of Wasserstein spaces. Thus in Step 2 and Step 3, we chose to perform separation arguments directly on A T and B T , which are subsets of finite-dimensional euclidean spaces defined as the images of the reachable set R L T under the action of the gradients of the cost and constraint functionals. As illustrated before, this choice allows for a very simple and concise discrimination between the abnormal and normal scenarios of the PMP.

Adaptation of the PMP to constrained Bolza problems

In this section, we make use of the results of Section 4.1 to obtain an extension of Theorem 4.4 to the setting of general constrained Bolza problems of the form

(P BC )                    min u(•)∈U T 0 L(t, µ(t), u(t))dt + ϕ(µ(T )) s.t.          ∂ t µ(t) + div v(t, µ(t), u(t))µ(t) = 0, µ(0) = µ 0 , µ(T ) ∈ Q T ,
where L : [0, T ] × P c (R d ) × U → R is a given running cost which satisfies the following.

Hypotheses (L).

For every R > 0, assume that the following holds with K := B(0, R). In what follows, we show how the statements of Theorem 4.9 can be recovered by directly applying Theorem 4.4 to a suitable augmented Mayer problem. We shall henceforth denote by π 1 : R d+1 × R d+1 → R d+1 and π 2 : R d+1 × R d+1 → R d+1 the projection operators onto the first and second factor.

(i) The map t ∈ [0, T ] → L(t, µ, u) is L 1 -measurable for any (µ, u) ∈ P c (R d ) × U . Moreover, there exists k(•) ∈ L 1 ([0, T ], R + ) such that sup u∈U |L(t, δ 0 , u)| ≤ k(t) for L 1 -almost every t ∈ [0, T ]. (ii) The map u ∈ U → L(t, µ, u) is continuous for L 1 -almost every t ∈ [0, T ] and any µ ∈ P c (R d ). (iii) The map µ ∈ P c (R d ) → L(t,
Given an admissible pair (µ(•), u(•)) for (P BC ), let z(•) ∈ AC([0, T ], R) be the curve defined as + R 2d+2 D µ v t, µ * (t), u * (t), x ′ , z ′ (x, z) ⊤ (r ′ , q ′ ) dν * (t)(x ′ , z ′ , r ′ , q ′ ) v t, µ * (t), u * (t), Thus because ν * (•) solves (104) and owing to the decomposition (109) combined with the identity (111), it follows that ν * (•) is a solution of (72) driven by gradient of the Hamiltonian defined in (98). Moreover, the complementarity slackness and maximisation condition can be directly recovered by using the definition of Ψi (µ * (T )) in (105) for the former and plugging (110) into (106) for the latter.

x      =           D x v t,

Examples of locally differentiable functionals

In this auxiliary section, we provide two examples of extended real-valued functionals defined over P 2 (R d ) which are locally differentiable in the sense of Definition 3.3, and compute their gradients.

Proposition 5.1 (Locally differentiable integral functionals). Let V : R d → R be a continuously differentiable mapping. Then the functional

V : µ ∈ P c (R d ) → R d V (x)dµ(x) ∈ R, (112)
is locally differentiable in the sense of Definition 3.3, and its Wasserstein gradient is given by ∇V(µ)(x) = ∇V (x),

for every µ ∈ P c (R d ) and any x ∈ supp(µ).

Similarly, let L : R d × P c (R d ) → R be such that x ∈ R d → L(x, µ) is continuously differentiable for every µ ∈ P c (R d ) and µ ∈ P c (R d ) → ∇ x L(x, µ) is continuous for every x ∈ R d . Moreover, suppose that µ ∈ P c (R d ) → L(x, µ) is locally differentiable for every x ∈ R d and that (x, y) ∈ R d × supp(µ) → ∇ µ L(x, µ)(y) ∈ R d is continuous for every µ ∈ P c (R d ). Then, the map

L : µ ∈ P c (R d ) → R d L(x, µ)dµ(x), ( 113
)
is locally differentiable, and its Wasserstein gradient writes

∇L(µ)(x) = ∇ x L(x, µ) + R d ∇ µ L(z, µ)(x)dµ(z),
for any µ ∈ P c (R d ) and x ∈ supp(µ).

Proof. We first prove that the functional V(•) defined in ( 112

+ C R η 2 R 2d
|x -y| 2 dγ(x, y)

≤ ǫ 2 W 2 (µ, ν) + C R η 2 W 2 (µ, ν) 2 ,
for some constant C R > 0 depending only on supp(µ), R > 0 and V (•), and where we used Hölder's and Chebyshev's inequalities together with the fact that γ ∈ Γ o (µ, ν). Thus whenever W 2 (µ, ν) ≤

  24, Chapter 1, Proposition 4.2], where a similar property is established for classical subdifferentials and measures µ ∈ P 2 (R d ) which are absolutely continuous with respect to the standard Lebesgue measure L d . Proposition 3.5 (Tangent localised subdifferentials are strong). Let φ : P

  ν) and both R > 0 and ν ∈ P(B µ (R)) are arbitrary. Similarly, one can show that ∇φ(µ) ∈ ∂ + loc φ(µ). Hence, ∇φ(µ) ∈ ∂ - loc φ(µ) ∩ ∂ + loc φ(µ) ∩ Tan µ P 2 (R d ), and the functional φ(•) is locally differentiable at µ in the sense of Definition 3.3.

Corollary 3 . 7 (

 37 Chain rule along perturbations in L

  x), also satisfies hypotheses (CE) for every ǫ ∈ [0, 1] by construction. Denote by µ ǫ (•) ∈ AC([0, T ], P c (R d )) the unique solution of the perturbed Cauchy problem

  . The minimisation in (P MC ) is taken over the set of admissible open-loop controls

Definition 4 . 1 (

 41 Admissible pairs and strong local minimisers for (P MC )). We say that (µ(•), u(•)) is an admissible trajectory-control pair for(P MC ) if u(•) ∈ U and µ(•) ∈ AC([0, T ], P c (R d ))is a solution of the controlled non-local continuity equation (68) satisfying µ(0) = µ 0 and µ(T ) ∈ Q T . Moreover, an admissible pair (µ * (•), u * (•)) is a strong local minimiser for (P MC ) if there exists ǫ > 0 such that

  as well, there exists by the separation theorem a non-trivial element p ∈ R k such that sup d∈(R * -) k p, d ≤ inf b∈B T p, b . (79) Remark now that since (R * -) k is a cone, the separation inequality (79) necessarily implies sup d∈R k p, d ≤ 0, which yields that p := (λ 1 , . . . , λ k ) ∈ R k + . Similarly, one can check that B T is a cone upon remarking that R T L ⊂ C 0 (R d , R d ) is itself a cone. Thus, (79) also implies inf b∈B T p, b ≥ 0, which combined with the definition (78) of B T further yields k i=1

Lemma 4 . 5 (

 45 Incompatible intersection). Let (µ * (•), u * (•)) be a strong local minimiser for (P MC ).

Lemma 4 . 6 (

 46 Definition and existence of solutions to (91)). Let (µ * (•), u * (•)) be a strong local minimiser for (P MC ) and suppose that hypotheses (MCP) hold. For µ * (T )-almost every x ∈ R d , denote by (Ψ x (T,t) (•)) t∈[0,T ] the family of backward non-local flows, solutions of

Lemma 4 . 7 (

 47 Derivative of an auxiliary functional). Given w(•) satisfying (76) and (CE), define

  µ, u) is locally differentiable in the sense ofDefinition 3.3 and the applicationx ∈ R d → ∇ µ L(t, µ, u)(x) ∈ R d is continuous for L 1 -almost every t ∈ [0, T ] and any (µ, u) ∈ P c (R d ) × U . Moreover, there exists a map L K (•) ∈ L 1 ([0, T ], R + ) such that |L(t, µ, u) -L(t, ν, u)| ≤ L K (t)W 1 (µ, ν),for every µ, ν ∈ P(K) and any u ∈ U .In the present context, we say that an admissible pair (µ* (•), u * (•)) ∈ AC([0, T ], P c (R d )) × U is a strong local minimiser for (P BC ) if there exists ǫ > 0 such that T 0 L(t, µ * (t), u * (t))dt + ϕ(µ * (T )) ≤ T 0 L(t, µ(t), u(t))dt + ϕ(µ(T )),for every admissible pair (µ(•), u(•)) which satisfies sup t∈[0,T ] W 1 (µ * (t), µ(t)) ≤ ǫ.

Theorem 4 . 9 (Dfor L 1 -

 491 Pontryagin Maximum Principe for (P BC )). Let (µ * (•), u * (•)) ∈ AC([0, T ], P c (R d ))× U be a strong local minimiser for (P BC ), and suppose that hypotheses (MCP) and (L) hold.Then, the conclusions of Theorem 4.4 hold with the HamiltonianH λ 0 : [0, T ] × P c (R 2d ) × U → R associated to (P BC ), defined by H λ 0 (t, ν, u) := R 2d r, v(t, π 1 # ν, u, x) dν(x, r)λ 0 L(t, π 1 # ν, u), (98)for all (t, ν, u) ∈ [0, T ] × P c (R 2d ) × U , which Wasserstein gradient writes ∇ ν H λ 0 (t, ν * (t), u * (t))(x, r) x v t, µ * (t), u * (t), x ⊤ r + R 2d D µ v t, µ * (t), u * (t), y (x) ⊤ p dν * (t)(y, p) -λ 0 ∇ µ L(t, µ * (t), u * (t))(x)v t, µ * (t), u * (t), x almost every t ∈ [0, T ] and any (x, r) ∈ R 2d .

z(t) := t 0 L∂D

 0 (s, µ(s), u(s))ds, (100) and consider the corresponding augmented stateµ(t) := µ(t) × δ z(t) ,associated to (P BC ), both defined for all times t ∈ [0, T ]. Below given a measure µ ∈ P c (R d+1 ), we will set µ := (π 1 , . . . , π d ) # µ ∈ P c (R d ). It is then clear that if (µ * (•), u * (•))is a strong local minimiser for (P BC ), then choosing z * (•) as in (100) with (µ(•), u(•)) := (µ * (•), u * (•)) and defining µ * (t) := µ * (t) × δ z * (t) , the pair (µ * (•), u * (•)) is a strong local minimiser for the Mayer problem( PMC ) t µ(t) + div v(t, µ(t), u(t))µ(t) = 0, µ(0) = µ 0 × δ 0 , µ(T ) ∈ QT ,which along with (102) allows us to derive the following analytical expression for its gradient ∇ ν Ĥ(t, ν * (t), u * (t))(x, z, r, q) = (x,z) v t, µ * (t), u * (t), x, z ⊤ (r, q)

2d 1 0 1 0 1 0

 111 ) is locally differentiable. Let µ ∈ P c (R d ), R > 0 and ν ∈ P(B µ (R)). For every γ ∈ Γ o (µ, ν), it holdsV(ν) -V(µ) = R 2d V (y) -V (x) dγ(x, y) = R ∇V x + s(yx) , yx dsdγ(x, y), = R 2d ∇V (x), yx dγ(x, y) + 1 0 R 2d ∇V x + s(yx) -∇V (x), yx dγ(x, y)ds, = R 2d ∇V (x), yx dγ(x, y) + I R ,(114) where we used Fubini's theorem. Our goal is now to prove that I R = o R (W 2 (µ, ν)). Since we assumed that ∇V (•) is continuous, we can find for every ǫ > 0 another real η > 0 such that |∇V (x + z) -∇V (x)| ≤ ǫ 2 for any z ∈ B(0, η). Whence, we can split I into two terms and estimate them as|I R | ≤ |x-y|≤η | ∇V x + s(yx) -∇V (x), yx | dγ(x, y)ds + |x-y|>η | ∇V x + s(yx) -∇V (x), yx | dγ(x, y)ds ≤ ǫ 2 R 2d |x -y|dγ(x, y) + 2 sup z∈co Bµ(R) |∇V(z)| sup x,y∈Bµ(R) |x -y|γ (x, y) ∈ R 2d s.t. |x -y| > η ≤ ǫ 2 R 2d |x -y|dγ(x, y)

  and consider the distance function to B defined as x ∈ X → dist X (x ; B) := inf b∈B xb X . An application F : S ⇒ X is called a set-valued map -or a multifunction -from S into X if F (s) ⊂ X for any s ∈ S , and we denote by D(F ) := {s ∈ S s.t. F (s) = ∅} its effective domain. A set-valued map F (•) is said to have closed (resp. convex) images if the sets F (s) are closed (resp. convex) for any s ∈ D(F ). In the following definitions, we recall the concepts of measurability and Lipschitz regularity for set-valued maps.

	Definition 2.4 (Measurable multifunctions). Let (S , Ω, ̟) be a measure space defined over S and

  1/p for every p ∈ [1, +∞). Hence, an admissible pair is a strong local W p -minimiser if and only if it is a strong local W 1 -minimiser.

  being given as in (93). Remark now that since H(•) ∈ AC([0, T ], R) and F (0) = F 0 = 0 by construction, it further holds by Lemma 4.7

	H(T ) =	0	T	d dt H(t)dt =	0	T	R 2d	r, w(t, x) dν * (t)(x, r)dt,	(96)
	so that upon merging (95) and (96), we obtain
			0	T	R 2d	r, w(t, x) dν * (t)(x, r)dt ≤ 0,	(97)
	for any w(•) satisfying (76) and (CE).
	Let us consider for some given t ∈ [0, T ] and m ≥ 1 the closed subset of controls
	Ũm (t) := u ∈ U s.t. H(t, ν * (t), u) ≥ H(t, ν * (t), u * (t)) + 1 m ,
	and suppose that the associated L 1 -measurable subset Ω m ⊂ [0, T ], defined by
			Ω

r) ≤ 0, which can in turn be reformulated as H(T ) ≤ 0, (95) with H(•) m := t ∈ [0, T ] s.t. Ũm (t) = ∅ , has positive measure for some m ≥ 1. Then by Theorem [7, Theorem 8.2.9], we can find a measurable selection t ∈ [0, T ] → ũ(t) ∈ U such that ũ(t) ∈ Ũm (t) for L 1 -almost every t ∈ Ω m and ũ(t) = u * (t) otherwise. Observe next that the map defined by w(t) := v(t, µ * (t), ũ(t))v(t, µ * (t), u * (t)), for all times t ∈ [0, T ] satisfies (76) and hypotheses (CE). Moreover, it is such that

  µ * (t), u * (t), x ⊤ r + q∇ µ L(t, µ * (t), u * (t))(x) + R 2d D µ v t, µ * (t), u * (t), y (x) ⊤ p dν * (t)(y, p) 0 v t, µ * (t), u * (t), x L(t, µ * (t), u * (t)) (T ) = δ (-λ 0 ) ,and also that the right-hand side of the dynamics driving this extra covector variable is identically equal to 0 by plugging (108) into (104). Hence up to a permutation of the coordinates, it is possible to express the extended state-costate curve ν * (•) for all times t ∈ [0, T ] as ν * (t) = ν * (t) × δ (z * (t),-λ 0 ) ,

					
					
					
					
					 	.
					
					
					
					
					(108)
	It can now be verified straightforwardly as a consequence of (103) that
		π 2d+2 #	ν (109)
	where ν 	D 
					
					
					
					
					
					
					
					
					
			  	∇ ν H λ 0 (t, ν * (t), u * (t))(x, r) L(t, µ * (t), u * (t))	   .	(111)
				0

* * (•) ∈ AC([0, T ], P c (R 2d )). Plugging this last expression into (107) and (108) then yields

Ĥ(t, ν * (t), u * (t)) = H λ 0 (t, ν * (t), u * (t)),

(110)

and by repeating the same coordinate permutation, we recover the following expression for the gradient

∇ ν Ĥ(t, ν * (t), u * (t))(x, z, r, q) = x v t, µ * (t), u * (t), x ⊤ rλ 0 ∇ µ L(t, µ * (t), u * (t))(x) + R 2d D µ v t, µ * (t), u * (t), y (x) ⊤ p dν * (t)(y, p) v t, µ * (t), u * (t), x L(t, µ * (t), u * (t)) 0 ,

for L 1 -almost every t ∈ [0, T ] and any (x, z, r, q) ∈ supp(ν * (t)). By applying again the differentiation results of Proposition 5.1, it can finally be checked that

∇ ν H λ 0 (t, ν * (t), u * (t))(x, r) =    D x v t, µ * (t), u * (t), x ⊤ rλ 0 ∇ µ L(t, µ * (t), u * (t))(x) + R 2d D µ v t, µ * (t), u * (t), y (x) ⊤ p dν * (t)(y, p) v t, µ * (t), u * (t), x    ,

and the gradient of the augmented Hamiltonian can be rewritten as ∇ ν Ĥ(t, ν * (t), u * (t))(x, z, r, q) =

Acknowledgement. This material is based upon work supported by the Air Force Office of Scientific Research under award number FA9550-18-1-0254.

where we defined φ(µ) := ϕ µ + R d+1 z dµ(x, z) and v(t, µ, u, x, z) := v(t, µ, u, x) L(t, µ, u) , (101) for all (t, µ, u, x, z) ∈ [0, T ] × P c (R d+1 ) × U × R d+1 , along with QT := µ ∈ P 2 (R d+1 ) s.t. Ψi (µ) ≤ 0 for every i ∈ {1, . . . , n} ,

where Ψi (µ) := Ψ i (µ). By applying the results of Section 5, the first-order derivatives of the augmented dynamics, final cost and constraint maps can be written explicitly as

and

and any index i ∈ {1, . . . , n}. By Corollary 2.12, there exists R r > 0 such that supp(µ * (t)) ⊂ K := B(0, R r ) for all times t ∈ [0, T ] where r > 0 is such that µ 0 ∈ P(B(0, r)). Hence, observe that under hypotheses (L)-(iii) and up to redefining the running cost for L 1 -almost every t ∈ [0, T ] and any u ∈ U as

This together with the definitions of φ(•) and { Ψi (•)} 1≤i≤n implies that hypotheses (MCP) hold for ( PMC ). Thus by Theorem 4.4, there exist non-trivial multipliers (λ 0 , . . . , λ n ) ∈ {0, 1} × R n + and a curve of measures ν * (•) ∈ AC([0, T ], P c ((R d+1 ) 2 ) solution of the forward-backward Hamiltonian continuity equation

for all times t ∈ [0, T ],

such that the complementarity slackness condition

holds for every index i ∈ {1, . . . , n}, and the maximisation condition

is satisfied for L 1 -almost every t ∈ [0, T ]. Here, the augmented Hamiltonian Ĥ :

Observe now that by (101), the augmented Hamiltonian can be further expressed as 114) implies by Proposition 3.6 that V(•) is locally differentiable at µ.

Let us now consider the functional L(•) defined in (113). By adapting the same arguments as above, one has for every γ ∈ Γ o (µ, ν)

where we used the fact that

so that by plugging (116) into (115) and applying Fubini's Theorem, we can derive

Finally observe that ∇ x L(•, µ) ∈ Tan µ P 2 (R d ) by definition, and also

, by linearity of the integral and Fubini's Theorem. Therefore, the identity (117) implies together with Proposition 3.6 that L(•) is locally differentiable at µ.

Remark 5.2 (Global definition of Wasserstein gradient).

In general, the gradient ∇φ(µ) of a functional φ : P c (R d ) → R at µ ∈ P c (R d ) is an element of L 2 (R d , R d ; µ), and is thus well-defined on supp(µ). In the particular case where ∇φ(µ) is a continuous map -as in Proposition 5.1 above -, it is possible to extend it as a continuous function defined over the whole of R d and not only supp(µ).