A comparison of the real and non-archimedean Monge-Amp\`ere operator

Let $X$ be a proper algebraic variety over a non-archimedean, non-trivially valued field. We show that the non-archimedean Monge-Amp\`ere measure of a metric arising from a convex function on an open face of some skeleton of $X^{\text{an}}$ is equal to the real Monge-Amp\`ere measure of that function up to multiplication by a constant. As a consequence we obtain a regularity result for solutions of the non-archimedean Monge-Amp\`ere problem on curves.


Introduction
The non-archimedean analogue of the Calabi conjecture is still an open problem in non-archimedean geometry. In the complex case it states that for a complex compact n-dimensional manifold M with a Kähler form ω and f ∈ C ∞ (M ), f > 0 such that M f ω n = M ω n there exists a unique up to constant ϕ ∈ C ∞ (M ) such that ω+dd c ϕ > 0 and (ω + dd c ϕ) n = f ω n . This was solved by Calabi (uniqueness, [Cal57]) and Yau (existence, [Yau78]). A strategy to attack the non-archimedean Monge-Ampère equation was proposed by Kontsevich and Tschinkel in unpublished though influential notes dated around 2001. In the non-archimedean setting, we fix a non-archimedean, non-trivially valued field K and a smooth projective variety X over K of dimension n with a line bundle L on X and consider the corresponding K-analytic space X an with the line bundle L an in the sense of Berkovich. To any continuous semipositive metric · on L an one can associate a positive Radon measure c 1 (L, · ) n on X an , called the Monge-Ampère measure, which was introduced by Chambert-Loir in [Cha06]. In a non-archimedean This work was partially supported by the collaborative research center 'SFB 1085: Higher Invariants' funded by the Deutsche Forschungsgemeinschaft.
analogue of the Calabi conjecture one asks for a solution of c 1 (L, · ) n = µ for a positive Radon measure µ on X an of mass L n when L is ample. The uniqueness up to addition of a constant of such a solution was proved by Yuan and Zhang in [YZ16]. The existence was proved by Liu in [Liu11] for the case of a totally degenerate abelian variety X under some regularity assumptions on the measure by reducing to the complex case. The best known existence result is due to Boucksom, Favre and Jonsson [BFJ15,Theorem A]. They prove existence of a solution to the non-archimedean Monge-Ampère equation if K is discretely valued of residue characteristic zero and µ is supported on the dual complex of some SNC model of X. Note that they assumed also an algebraicity condition which was later removed by Burgos Gil, Gubler, Jell, Künnemann and Martin [BGJ + , Theorem D]. As such a dual complex consists of faces which look like simplices in R n it would be tempting to observe a connection of the non-archimedean Monge-Ampère operator with the real one. This is the aim of the paper at hand. In particular we will prove the following result (a precise definition of the occurring measures is given in section 4.): Theorem 1.1. Let X be an n-dimensional proper algebraic variety over K, L = (L, · ) a formally metrized line bundle on X an and τ an open face of dimension n of a skeleton corresponding to a strictly semistable formal model X of X an on which L has a formal model L. Let ϕ be a continuous function on X an such that · e −ϕ is a semipositive metric. Suppose that ϕ factorizes through the retraction p X onto the skeleton. Then c 1 (L, · e −ϕ ) n = [K(S) :K] · n! · MA ϕ τ on p −1 X (τ ) where MA denotes the real Monge-Ampère operator on τ which is considered to be a measure on p −1 X (τ ) by pushforward via the inclusion and S denotes the point in the special fibre of X which is the image of τ under the reduction map.
The paper is organized as follows: In Section 2 we give an overview over basic concepts in formal geometry. We recall the definition of a strongly nondegenerate strictly polystable formal scheme and its associated skeleton introduced in [Ber99] and explain the stratum face correspondence developed in [Gub10]. At the end of the section we construct a Cartier divisor from a piecewise affine linear function on the skeleton and prove an important lemma dealing with the degree with respect to this divisor in the case of an affine linear function.
In Section 3 we collect basic definitions and facts on metrized line bundles. Following [GM19] we introduce piecewise linear, algebraic and formal metrics and the notion of semipositivity for them. We also recall some useful properties and the situations in which the definitions coincide.
In Section 4 we recall the definitions of the real and non-archimedean Monge-Ampère measure but we define the latter locally on open subsets of the analytification of a separated scheme of finite type over the field K. In order to do so, we prove a local convergence result. This will allow us to formulate Theorem 1.1 in a more general setting where everything is defined locally, see Corollary 5.7.
Section 5 is subject to the proof of Theorem 1.1. In fact in Corollary 5.7, we prove a local generalization of this result. It will follow from Lemma 4.8 and Corollary B.4 that Corollary 5.7 implies Theorem 1.1. We will also generalize the local result in Corollary 5.10 to strongly nondegenerate polystable formal models of X an i.e. we will prove: Theorem 1.2. Let X be an n-dimensional proper algebraic variety over K and X a strongly nondegenerate polystable formal model of X an over K • with associated skeleton ∆. Let τ be an n-dimensional open face of ∆ with associated point S in the special fibre of X. Let h be a convex function on τ and denote by O h•p X the trivial line bundle on the strictly K-analytic space p −1 X (τ ) endowed with the metric given by 1 = e −h•p X . Then c 1 O h•p X n = [K(S) :K] · n! · MA(h) on p −1 X (τ ). The proof is inspired by the proof of [Gub10,Theorem 5.18]. In order to reduce to the toric situation, a key ingredient will be Lemma 2.13, showing that affine linear functions on a closed face of a skeleton induce numerically trivial vertical Cartier divisors on a suitable part of the corresponding formal model.
Finally, in Section 6, we apply Theorem 1.1 to obtain two regularity results for solutions to the non-archimedean Calabi-Yau problem. For example we will prove in Proposition 6.4: Proposition 1.3. Let X be a smooth projective curve, µ a positive Borel meausre on X an and ϕ a solution to the Monge-Ampère equation c 1 (L, · e −ϕ ) = µ. Let τ be an open face of a skeleton associated to a strictly semistable formal model of X an on which (L, · ) has a formal model. Suppose that µ is supported on that skeleton and is given on τ by f · dx where dx denotes the Lebesgue measure on τ . If f ∈ C k (τ ) then we have ϕ τ ∈ C k+2 (τ ).
Here C k (τ ) is the space of k times continuously differentiable functions on τ . Theorem 1.3 follows from Theorem 1.1 and regularity of the real Monge-Ampère equation. Terminology. In the following, K denotes a complete, non-archimedean, non-trivially valued field and K • its corresponding valuation ring with maximal ideal K •• . All schemes are assumed to be locally of finite type. Acknowledgements. I thank Walter Gubler for his constant advice and many helpful discussions. I am also grateful to Sébastien Boucksom for helpful discussions and to Antoine Ducros for suggesting a generalization of [CD, Lemme 6.5.1]. Furthermore I would like to thank Klaus Künnemann and Antoine Chambert-Loir for helpful comments, Thomas Fenzl for answering my questions about skeletons and Florent Martin and Walter Gubler for the permission to use their unpublished notes on convexity of psh-functions.

Skeletons, formal models and divisors
In this section we first define formal schemes and their generic and special fibres. For details we refer to [Bos14,II.7,II.8.3]. Then we recall the concept of skeletons associated to strongly nondegenerate strictly polystable formal schemes introduced by Berkovich in [Ber99]. To a subdivision of the skeleton, one can associate a formal analytic structure as in [Gub10,Proposition 5.5]. We generalize the subsequent results of [Gub10,§5] concerning the stratum face correspondence by dropping the condition of algebraically closedness of the base field. Finally we explain how a piecewise affine linear function on the skeleton induces a Cartier divisor on the formal scheme corresponding to a suitable subdivision of the skeleton.
Definition 2.1. Let Y be a reduced scheme of locally finite type over a field κ. Set Y (0) := Y and let Y (i+1) be the complement of the set of normal points in Y (i) . The irreducible components of Y (i) \ Y (i+1) are called strata of Y . There is a partial ordering on the set of strata given by Definition 2.2. A topological ring A is called adic if there is an ideal a ⊆ A such that the ideals (a n ) n∈N form a neighbourhood basis for 0. We call a a defining ideal. Let A be an adic, complete, separated ring with finitely generated defining ideal a. The affine formal scheme of A is the locally topologically ringed space Spf(A) = (X, O X ) where X and O X are defined as follows: X is the set of all open prime ideals of A. As a prime ideal is open if and only if it contains a, we may identify X with Spec(A/a) ⊆ Spec(A) and we endow X with the topology induced by the Zariski topology on Spec(A). Moreover we define A formal scheme is a locally topologically ringed space (X, O X ) such that for each x ∈ X there is an open neighbourhood U of x with U, O X U isomorphic to an affine formal scheme. Now let a be a defining ideal of Let X = Spf(A) be an admissible formal affine K • -scheme. The analytic generic fibre of X is defined as X an := M(A ⊗ K • K), where M(·) denotes the Berkovich spectrum (cf. [Ber90, 1.2]). The special fibre of X is given byX : For an admissible formal K • -scheme X one obtains the generic and the special fibre by a gluing process. There is a canonical surjective reduction map red : X an →X, see [GRW17,§2.13]. For tuples n = (n 0 , ..., n p ) ∈ N p+1 >0 and a = (a 0 , ..., a p ) ∈ (K •• ) p+1 we define X(n, a) := X(n 0 , a 0 ) × K • ... × K • X(n p , a p ) and for m ∈ N we set X(m) := X(m, 1). A strictly polystable formal scheme over K • is an admissible formal scheme X over K • which can be covered by formal open sets U with étale morphisms where n, a and m may depend on U. We say that X is strongly nondegenerate strictly polystable if all a i can be chosen nonzero.
To a strongly nondegenerate strictly polystable formal scheme X over K • Berkovich introduced in [Ber99] a canonical polytopal subset S(X) of X an called the skeleton. It is a closed subset of X an which is locally given by canonical polysimplices and can be described as follows. Let ψ : U → X(n, a, m) be an étale morphism as above. The generic fibre of the right hand side is given as X(n, a, m) . The elements of A can be expressed as µ a µ T µ with a µ ∈ K T ± 0 , ..., T ± m and a µ = 0 if there is an i ∈ {0, ..., p} such that µ i,k ≥ 1 for all k ∈ {0, ..., n i }. Now to an element t in the polysim- we associate a seminorm on A by sending a power series as above to max µ {|a µ | exp(−t · µ)}. This gives an embedding of the polysimplex into M (A) whose image is denoted by ∆. The skeleton S(U) of U is defined to be (ψ an ) −1 (∆). One can show that ψ an induces a homeomorphism from (ψ an ) −1 (∆) to ∆ if U has a unique minimal stratum which maps to the minimal stratum of X(n, a, m). The skeleton S(X) of X is the union of all S(U) and is independent of all choices.
To a stratum S of X one can associate a canonical polysimplex ∆ S in the skeleton such that the interiors of the ∆ T form a disjoint cover of S(X) where T ranges over all strata ofX. In order to do so, we choose a refinement of the cover of X as described in the Proposition below and choose U such that S is its distinguished stratum. We then define ∆ S := S(U).
An admissible formal scheme X is called strongly nondegenerate polystable if there exists a strongly nondegenerate strictly polystable formal scheme X ′ and a surjective étale morphism X ′ → X. The skeleton of X is defined to be the image of the skeleton of X ′ under the map X ′an → X an .
One can endow the skeleton with a piecewise linear structure, see [Ber04,§6]. We will define piecewise affine linear functions on the skeleton of a strongly nondegenerate strictly polystable formal scheme in Definition 2.10. There is a canonical continuous retraction map p X : X an → S(X) which restricts to the identity on S(X). For details see [Ber99,§4], [Ber04,§4] or [Gub10,5.3].
We have the following stratum face correspondence due to Berkovich: Proposition 2.4. Let X be a strongly nondegenerate polystable formal scheme with skeleton ∆. There is a bijective correspondence between the open faces of ∆ and the strata ofX given by is the stratum ofŨ ′ which is equal toŨ ′ ∩S for the distinguished stratum S associated to U ′ , iv) every stratum ofX is the distinguished stratum of a suitable U ′ .
Proof. The very same arguments as in [Gub10, Proposition 5.2] apply to our situation.
From now on let X be a strongly nondegenerate strictly polystable formal scheme over K • and denote by Γ the value group of K. For the basic notions of convex geometry we refer to [Gub13, Appendix A]. We will work with Γ-rational polytopal subdivisions D of S(X), i.e. D is a family of Γ-rational polytopes contained in a canonical polysimplex such that for every stratum S ofX the set ∆ ∈ D ∆ ⊆ ∆ S is a polytopal decomposition of ∆ S . Here a polytopal decomposition means a finite family of polytopes covering ∆ S which is closed under taking faces and such that the intersection of two polytopes in the family is a face of both and a Γ-rational polytope means a polytope which is defined by inequalities of the form mx + c ≥ 0 with m ∈ Z r , c ∈ Γ.
Construction 2.6. Let D be such a subdivision. We will construct a canonical formal scheme X ′′ over K • associated to D together with a morphism ι : X ′′ → X which induces the identity on the generic fibre such that there is a one to one correspondence between the open faces of D and the strata ofX ′′ . First of all we choose a covering of X as in Proposition 2.5. Let U be a member of this covering with an étale morphism ψ : U → X(n, a, m) and let S be the distinguished stratum of U. For ∆ ∈ D ∩ ∆ S we set A ′ := µ a µ T µ ∈ K((T 00 , ..., T p,np )) ∀ u∈∆ : lim v(a µ ) + u · µ = ∞ and A := A ′ /(T 00 ...T 0,n 0 − a 0 , ..., T p0 ...T p,np − a p ) and define and U ∆ := Spf A ∆ . If ∆ 1 , ∆ 2 ∈ D∩∆ S then ∆ 1 ∩∆ 2 is a face of both and by transferring the arguments in [Gub13, Proposition 6.12] to the analytic situation, we obtain that the canonical morphisms U ∆ 1 ∩∆ 2 → U ∆ i are open immersions. Hence we can glue the U ∆ along this data to obtain a formal scheme which we denote by X(n, a) ′ together with a morphism ι ′ : X(n, a) ′ → X(n, a). Let ψ ′ : U ′′ → X(n, a) ′ × X(m) be the base change of ψ with respect to ι ′ × Id. The construction of U ′′ does not depend on the choice of ψ up to isomorphism: Let ρ : U → X(n, a, m) be another étale morphism. Then up to reordering the coordinates, ρ * x i = u i ψ * x i for some u i ∈ O(U) × . Then we have canonical K • -algebra isomorphisms: which yield an isomorphism of the U ′′ constructed with ψ respectively ρ.
We glue the U ′′ to obtain our formal scheme X ′′ . Although X ′′ might not be admissible, we can define its generic fibre and reduction map in the usual way as the algebras A ∆ ⊗ K • K are strictly K-affinoid (see [Gub13,Proposition 6.17]). Then ι induces the identity on the generic fibres and we set p X ′′ := p X . Note that X ′′ is admissible if the vertices of the polytopes in D are Γ-rational, in particular the base change of X ′′ to the valuation ring of the completion of an algebraic closure of K is admissible, see [Gub13, Proposition 6.7].
Remark 2.7. If D is trivial i.e. ∆ ∈ D only if ∆ = ∆ S for some stratum S ofX then it is an immediate consequence from the construction that X ′′ = X.
We will frequently use the following generalization of [Gub10, Proposition 5.7] which is a stratum face correspondence for the X ′′ constructed above.
Proposition 2.8. Let X be a strongly nondegenerate strictly polystable formal scheme with skeleton ∆ and D a subdivision of ∆ with associated formal structure X ′′ . Then there is a bijective correspondence between the open faces of D and the strata ofX ′′ given by . Furthermore, in the second equality, R can be replaced by any nonempty subset of R.
Proof. We follow the proof of [Gub10, Proposition 5.7] but in order to establish the result for an arbitrary non-archimedean field K (not necessarily algebraically closed), we use [Gub13, Proposition 6.22] instead of [Gub07,Proposition 4.4]. Let τ be an open face of D. We prove first that R := red(p −1 X ′′ (τ )) is a stratum ofX ′′ . There is a unique stratum S ofX such that τ is contained in the interior of ∆ S . Let U be a formal open subset of X such that S is the distinguished stratum of U (Proposition 2.5). As strata are compatible with localization we may assume X = U. Let ψ ′ 1 : X ′′ → X(n, a) ′ be the base change of the composition of the étale map ψ : X → X(n, a, m) with the projection on the first factor X(n, a). By [Gub13, Proposition 6.22] the first part of the proposition holds for X(n, a) ′ . Let T be the stratum of X(n, a) ′ corresponding to τ , i.e. τ = p X(n,a) ′ (red −1 (T )) (2.1) and T = red(p −1 X(n,a) ′ (τ )).
where p X(n,a) ′ : X(n, a) ′an → ∆ S is the retraction map. We prove R =ψ ′−1 1 (T ). First we observe that red((ψ ′ an 1 ) −1 (p −1 X(n,a) ′ (τ ))) =ψ ′−1 1 (red(p −1 X(n,a) ′ (τ ))). The inclusion ⊆ is clear because red •ψ ′ an 1 =ψ ′ 1 • red. The other inclusion follows from this fact and an application of [Gub13, Proposition 6.22]. For details we refer to the proof of [Gub10, Proposition 5.7]. We conclude To see that R is indeed a stratum it is enough to show that R is irreducible. But this follows from where the latter is irreducible by [Gro65, Corollaire 4.5.8 (i)]. As the open faces of D cover ∆, every stratum ofX ′′ is obtained this way. It remains to prove that we can recover τ from R. First note that p X ′′ ((ψ ′ an 1 ) −1 (red −1 (T ))) = p X(n,a) ′ (red −1 (T )). The inclusion ⊆ is clear because p X ′′ = p X(n,a) ′ • ψ ′ an 1 . For the other inclusion, let x ∈ p X(n,a) ′ (red −1 (T )) = τ . As the sets red −1 (T ′ ) with T ′ varying over the strata of X(n, a) ′ cover X(n, a) ′ an and using [Gub13, Proposition 6.22] and the fact the p X(n,a) ′ restricts to the identity on ∆ we deduce x ∈ red −1 (T ). Hence x is an element of the left hand side which proves the equality claimed in the display. Now the rest is an easy calculation: Finally we want to show that R may be replaced by a nonempty subset Y of R. Clearly, the arguments in [Gub10, Proposition 5.7] generalize to the polystable situation, so we presume the claim for K algebraically closed and show how to drop this assumption. Let C K be the completion of an algebraic closure of K. We denote by π : X ′′ C K → X ′′ the base change of X ′′ to C • K . Let R ′ be the union of the strata ofX ′′ C K lying over R. Then π induces a surjection p X ′′ ). Clearly p X ′′ (red −1 (Y )) ⊆ p X ′′ (red −1 (R)) and hence it is enough to show that the restriction of π to p X ′′ C K (red −1 (Y ′ )) factors through p X ′′ (red −1 (Y )). We have the following commutative diagram: ). This proves the claim. (a) dim(τ ) = codim(R,X ′′ ).
• ψ an ∆ ′ (see Definition 2.3 for the notation and setting).
Proposition 2.11. Let X ′ be a strongly nondegenerate strictly polystable formal scheme over K • with associated skeleton S(X ′ ) and h a piecewise affine linear function on S(X ′ ). Let D be a Γ-rational polytopal subdivision of S(X ′ ) suitable for h as in Definition 2.10 and ι : X ′′ → X ′ be the canonical formal scheme over X ′ associated to D (see Construction 2.6). Then h induces a canonical Cartier divisor D on X ′′ which is trivial on the generic fibre. If X ′′ is admissible, then D has the property that Proof. As in Construction 2.6, we cover X ′ by étale maps ψ : U → X(n, a, m) = X(n, a)× X(m) and for each U and ∆ ∈ D with ∆ ⊆ U an we obtain the affine formal scheme U ∆ . We write ψ ′ : U ′′ ∆ → U ∆ for the base change with respect to ψ and obtain a cover of X ′′ . On ∆ ∈ D, h is given by mx Then D is indeed a Cartier Divisor on X ′′ as for U 1 , U 2 , ∆ 1 , ∆ 2 as above and U : Remark 2.12. Note that we can ensure that X ′′ is admissible and hence a formal model by performing base change to the completion of an algebraic closure of K (see Construction 2.6) which will be enough for our purposes.
Proof. Note that we do not assumeτ ∈ D. But by passing to the formal open subscheme of X ′ consisting of the formal open subsets U with S(U) =τ , we may assume ∆ =τ and then the polytopal subdivision D ′ consisting the polytopeτ and its faces is suitable for h. The corresponding formal scheme is X ′ . Let D ′ be the Cartier divisor on X ′ induced by h as in Proposition 2.11. Notice that by construction we have D = ι * D ′ . Now ι is proper by [Tem00, Corollary 4.4] (the result requires X ′′ to be admissible but by [Gro65, Proposition 2.7.1] it is enough to check properness after base change to the completion of an algebraic closure of K, after which X ′′ is always admissible, see Construction 2.6). Hence the projection formula yields deg(D.
, where the latter is the stratum inX ′ corresponding to τ and hence a point. Therefore D ′ .ι * Y = 0.

Metrics
In this section we introduce metrics on line bundles on strictly K-analytic spaces. This includes piecewise linear, algebraic and formal metrics. We will see that under certain conditions they are all the same. The main reference is [GM19].
Definition 3.1. Let X be a strictly K-analytic space and L a line bundle on X, i.e. a locally free sheaf of rank 1 on the G-topology. A continuous metric · on L is a function which asserts to any admissible open subset U ⊆ X and any section s ∈ Γ(U, L) a continuous (with respect to the Berkovich topology) function s(·) : U → R ≥0 such that: Given a formal model (X, L) of (X, L) one can define an associated so called formal metric · L on L in the following way: If s is a local frame of L on a formal open subset U ⊆ X we define f s(·) L = |f (·)| on U an for any f ∈ Γ(U an , O an X ). As this is independent of the choice of s and X an is covered by such sets, this gives a well-defined metric on L.
Remark 3.2. We will work with paracompact (i.e. Hausdorff and every open cover has a locally finite refinement) strictly K-analytic spaces. As discussed in [GM19, 2.2] the category of these spaces is equivalent to the category of quasiseparated rigid analytic varieties over K with a strictly K-affinoid G-covering of finite type ( [Ber93, 1.6]). This allows us to apply Raynaud's theorem ( [Bos14,Theorem 8.4.3]) which shows that formal K • -models of paracompact strictly K-analytic spaces exist and that the set of isomorphism classes of formal K • -models is directed. Definition 3.4. Let X be a proper scheme over K and L a line bundle on X. An algebraic K • -model of X is a proper flat scheme X over K • with a fixed isomorphism from the generic fibre X η to X. An algebraic K • -model of (X, L) is a pair (X , L ) where X is an algebraic K • -model of X and L is a line bundle on X with a fixed isomorphism from L X to L. An algebraic K • -model of (X, L) gives rise to a formal K • -model of (X an , L an ) by formal completion. Hence by the above, an algebraic model of (X, L) induces a formal metric on L an . We call such metrics algebraic metrics.
Proposition 3.5. Let X be a proper scheme over K and L a line bundle on X. Then a formal metric on L an is the same as an algebraic metric.
Definition 3.6. Let X be a strictly K-analytic space and L a line bundle on X. A metric · on L is called piecewise linear if there is a G-covering (V i ) i∈I and frames s i of L over V i for every i ∈ I such that s i (·) = 1 on V i .  Proof. This is proved in [GM19, Proposition 3.11] under the additional assumption that X is separable, which was necessary in order to be able to use [CD, Lemme 6.5.1].
Replacing this with Corollary A.4, the same proof applies to the more general case. Proposition 3.11. Let X be a proper scheme over K and L a line bundle on X. Let · 1 , · 2 be two piecewise linear metrics on L an which are semipositive in x ∈ X an . Then · := min( · 1 , · 2 ) is semipositive in x.
Proof. [GM19, Proposition 3.12]. Definition 3.12. Let X be a strictly K-analytic space and L a line bundle on X.

Measures
We recall the real Monge-Ampère operator which associates to a convex function a positive Borel measure. Then we introduce the Chambert-Loir measure on the generic fibres of admissible formal schemes and on paracompact strictly K-analytic spaces. Chambert-Loir introduced these measures in [Cha06] on the analytification X an of a proper variety X over K under the assumption that K has a countable dense subfield and associates to a family of semipositive metrized line bundles a positive Radon measure. This was later extended by Gubler to the case of an algebraically closed base field in [Gub07]. Using the local approach to metrics from section 3, it is now possible to define Monge-Ampère measures locally. Note that there is also a local approach by Chambert-Loir and Ducros in [CD] which associates a measure to a metric which is locally psh-approximable. However it is not known whether a semipositive metric is locally psh-approximable. In this section we assume that the non-archimedean complete base field K is algebraically closed which is no restriction as one can always reduce to this case by base change (see Remark 4.16). Definition 4.1. Let Ω ⊆ R n be bounded, open and convex and denote by λ the standard Lebesgue measure on R n and by ·, · the standard scalar product on R n . Let h be a convex function on Ω and x 0 ∈ Ω. We define the gradient image of x 0 under h to be and for E ⊆ Ω ∇h(E) := Note that if E is a Borel set, the same is true for ∇h(E).

Monge-Ampère measure for line bundles on admissible formal schemes
Let X be an admissible formal scheme over K • of dimension n + 1 with generic fibre X. Our goal is to introduce a Monge-Ampère measure on X for formal line bundles L 1 , ..., L n on X. We assume first that X is irreducible and reduced and that the special fibre of X is reduced. Then the non-archimedean Monge-Ampère measure on X with respect to these metrized line bundles is defined as If X has irreducible and reduced generic fibre but no longer reduced special fibre, there is a canonical admissible formal model X ′ of X with reduced special fibre together with a finite morphism ι : X ′ → X which restricts to the identity on X which can be constructed as follows (cf. [Gub98, Definition 3.10]). Choose a cover (U i = Spf(A i )) i∈I of X by affine formal subschemes. Define Hence by standard arguments we can glue the Spf(A • i ) to obtain X ′ and the canonical morphisms In the general case, let X = j m j X j be the decomposition of the generic fibre into prime cycles. By [Gub98, Proposition 3.3] the closure X j of X j in X is an admissible formal scheme with irreducible and reduced generic fibre X j . We define as a measure on X.
Remark 4.4. There is a close connection of the Monge-Ampère measure with the intersection product on formal schemes as defined in [Gub98]: Assume that X has irreducible, reduced and boundaryless generic fibre and reduced special fibre. In addition to L 1 , ..., L n let L 0 be a formal line bundle on X which is trivial on the generic fibre and set f := − log 1 where · is the formal metric induced by L 0 . Suppose that f has compact support and let D := div (1)  Proposition 4.5. The measure defined above has the following properties: i) c 1 (L 1 )∧...∧c 1 (L n ) is a discrete measure (i.e. of the form x∈S λ x δ x with S ⊆ X a closed discrete subset, λ x ∈ R and δ x the Dirac-measure at x) whose support is contained in the relative interior of X over K (in the sense of [Ber93,1.5]). ii) c 1 (L 1 ) ∧ ... ∧ c 1 (L n ) is multilinear and symmetric in L 1 , ..., L n . iii) Let ϕ : X ′ → X be a proper morphism of admissible formal schemes over K • with irreducible and reduced generic fibres of dimension n such that the induced morphism on the generic fibres is surjective. Then for formal line bundles L 1 , ..., L n on X we have Proof. ii) follows from symmetry and multilinearity of the intersection product ( [Ful98, Proposition 2.5]). For iii) we reduce first to the case where X ′ and X have reduced special fibre. Let Y ′ respectively Y be the canonical formal models with reduced special fibre as in 4.3. This construction is functorial and we obtain a commutative diagram Assuming that we know the claim for reduced special fibres we obtain So from now on assume that X ′ and X have reduced special fibre. Let Y be an irreducible component ofX with corresponding Shilov point ζ Y . Let ζ 1 , ..., ζ r be the preimages of ζ Y under ϕ an with corresponding irreducible components Y 1 , ..., Y r ofX ′ . If Y is proper then clearly all the Y i are proper. If on the other hand one of the Y i is proper then Y is proper by [GW10,Proposition 12.59]. In this case we can use the projection formula to calculate: As already mentioned in Definition 4.2, ϕ an is finite outside a lower dimensional analytic subset. Hence we may apply equation (3) in the proof of [Gub98, Proposition 4.5] to see that the last term in the display equals deg( On the other hand, if Y is an irreducible component ofX ′ whose image is not an irreducible component ofX then its degree with respect to the line bundles ϕ * L 1 , ..., ϕ * L n is 0 by the projection formula, as the image is of lower dimension. This proves iii). For i) let X an = j m j X j be the decomposition into prime cycles. It is then enough to prove the claim for each X j and by definition of the measure we may hence assume that X has irreducible and reduced generic fibre and reduced special fibre. Let S be the set of all ζ Y where Y is a proper irreducible component ofX with deg L 1 ,...,Ln (Y ) = 0. Then S is discrete as red −1 (Y ) is an open neighbourhood of ζ Y which does not contain any other points of S. Furthermore X is the union of all red −1 (Y ) where Y runs over all irreducible components ofX and as all of these sets contain at most one point of S and by paracompactness of X, every x / ∈ S has an open neighbourhood which does not intersect S and hence S is closed. By definition c 1 (L 1 )∧ ...∧ c 1 (L n ) is of the desired form and its support is contained in the relative interior of X over K by Corollary A.4. Lemma 4.6. Let X be an admissible formal scheme over K • of dimension n + 1 with boundaryless generic fibre X an and L 0 , ..., L n line bundles on X an endowed with formal metrics corresponding to the models L 0 , ..., L n on X. Suppose that L 0 = L 1 = O X an , denote by · 0 and · 1 the metrics on L 0 respectively L 1 and set f 0 := − log 1 0 , f 1 := − log 1 1 . Suppose that f 0 and f 1 have compact support. Then Proof. Let X an = j m j X j be the decomposition into prime cycles. It is enough to prove the claim for the closures X j of X j in X. We may hence assume that X an is irreducible and reduced. Furthermore by passing to a dominating model as in 4.3, we may assume that the special fibreX of X is reduced. As X an has no boundary, every irreducible component ofX is proper by Corollary A.4 and hence using commutativity of the intersection product ( [Gub98, Theorem 5.9]) we obtain Definition 4.7. Let X be an n-dimensional paracompact strictly K-analytic space and L 1 , ..., L n formally metrized line bundles on X. Let X be a formal model of X on which there exist formal models L 1 , ..., L n of L 1 , ..., L n . The existence of such a formal model follows from Remark 3.2. We then define Note that this definition is independent of the choice of X and L 1 , ..., L n by the projection formula. If the metrics on L 1 , ..., L n are semipositive then c 1 (L 1 )∧...∧c 1 (L n ) is a positive measure.
Lemma 4.8. Let W 2 be a paracompact strictly K-analytic space of dimension n and W 1 ⊆ W 2 a paracompact strictly K-analytic subdomain of W 2 . Then for formally Proof. Let W 2 = j m j X j be the decomposition of W 2 into prime cycles and for each j let (X ij ) i∈I j be the irreducible components of W 1 with X ij ⊆ X j ∩ W 1 . Then W 1 = j,i m j X ij is the decomposition of W 1 into prime cycles. Furthermore, the intersection of any two irreducible components of W 1 does not contain a Shilov point as it is of lower dimension and hence does not meet the support of the measures of interest. By linearity in the irreducible components we may therefore assume that W 1 and W 2 are irreducible and reduced. Let X 2 be a formal model of W 2 with reduced special fibre on which there exist formal models of L 1 , ..., L n . Let X 1 be a formal model of W 1 which exists by paracompactness of W 1 , see Remark 3.2. After possibly blowing up, the inclusion As both measures are discrete it is enough to show that they have the same mass at x. Let Int(W i ) denote the relative interior of W i over K in the sense of [Ber93, 1.5]. If x ∈ Int(W 2 ) then x ∈ Int(W 1 ) by [Ber93, Proposition 1.5.5 (ii)]. Conversely if x ∈ Int(W 1 ) then there exists an affinoid neighbourhood V of x in W 1 such that x is in the relative interior of V over K. But V is also a neighbourhood of x in W 2 as x ∈ • W 1 and therefore x ∈ Int(W 2 ). Hence x ∈ Int(W 1 ) if and only if x ∈ Int(W 2 ). If this is not the case then by definition of the measures and Corollary A.4, both of them are zero at x. So assume that x ∈ Int(W 1 ). Choose a locally finite cover (U i ) i∈I of X 1 by open affine formal subschemes and let U be the union of all U i which contain red(x). Then U is an open and quasi-compact formal subscheme of X 1 . Analogously choose a cover (V i ) i∈J of X 2 by open affine formal subschemes. As ι(U) is quasi-compact, there is a finite subcover of it. Let V be the union of the sets in this subcover and add all V i with red(x) ∈ V i . Then also V is an open and quasi-compact formal subscheme of X 2 and ι induces a morphism U → V. By [BL93, Corollary 5.4] there is an admissible formal blowing up V ′ → V such that the induced morphism U ′ → V ′ is an open immersion. Let Y be an irreducible component ofX 2 with corresponding divisorial point ζ Y = x. Then Y ⊆Ṽ by definition and hence we may calculate the mass of c 1 (L 1 ) ∧ ... ∧ c 1 (L n ) at x using V. By Proposition 4.5 iii) we may also use V ′ . So let Y ′ be the irreducible component ofṼ ′ corresponding to x. Since red(x) ∈Ũ ′ we see that Y ∩Ũ ′ is an irreducible component ofŨ ′ . Additionally, by Corollary A.4, Y ′ and Y ′ ∩Ũ ′ are proper and hence Y ′ = Y ′ ∩Ũ ′ and it is an irreducible component ofŨ ′ . It's image inŨ is a proper irreducible component ofŨ and hence also an irreducible component ofX 1 . By the same argumentation as above we may use U ′ instead of X 1 to calculate the mass of    So let 0 ≤ m < n and assume that the claim holds for m + 1. For j ∈ {m + 1, ..., n} we can write · i j ,k = · i j ,1 ⊗ · ′ j,k for a sequence of piecewise Q-linear metrics is a Cauchy sequence with respect to the weak topology on the space of Borel-measures on V . Thus we have to show that for all continuous functions f on X with compact support in V : Let W be a compact strictly K-analytic domain with supp(f ) ⊆ • W and W ⊆ V . By [GM19, Proposition 2.7] we may extend the metrics from W to X an and hence assume that they are defined on the whole space. Hence by Chow's lemma and the projection formula we may assume that X is projective. Then by [Gub03, Proposition 10.5] any formal model of X is dominated by a projective model. Any formal line bundle on this model becomes semipositive after tensoring with O(n) for n big enough by using Serre's theorem ( [Har77, Theorem II.5.17]) on the special fibre. As a consequence one can write any formal metric on any line bundle on X as a quotient of two semipositive formal metrics (on possibly different line bundles). We will see below, that µ m,k (Z) is bounded with respect to k for every compact subset Z ⊆ V . Hence, as the set of piecewise Q-linear metrics is dense in the space of continuous metrics on O X an with respect to uniform convergence (Proposition 3.13), we may assume that f = − log 1 for a formal metric · on O X an . Then we can write · = · + / · − for two semipositive formal metrics · + , · − on some line bundles L + respectively L − on X an . In fact L + = L − but we will use the notation L + and L − to distinguish between the two metrics. Write O f X for the line bundle O X an V endowed with the metric 1 = e −f and to shorten notation µ m := c 1 (L i 1 ,1 )∧...∧c 1 (L im,1 ) which is a purely formal notation. Furthermore without loss of generality assume i 1 = 1, ..., i m = m. We have Since the support of f is contained in V and by Lemma 4.8 these last integrals depend only on the restrictions of the metrics to V . Hence we may instead consider them as integrals over X an which allows us to use Lemma 4.6 as X an has no boundary ( [Ber90, Theorem 3.4.1]). In combination with an index shift, the last term amounts to As any point in X an \ supp(f ) has a strictly K-analytic neighbourhood on which f vanishes, the support of µ m ∧ ..
.. is contained in supp(f ) by Lemma 4.8. So the last display equals Here the last term converges to zero as sup x∈supp(f ) log 1 ′ i,k (x)/ 1 ′ i,k ′ (x) tends to zero by uniform convergence of · ′ i,k and compactness of supp(f ) and µ m ∧c 1 L m+1,k ∧ ... ∧ c 1 L i−1,k ∧ c 1 L s ∧ c 1 L i+1,k ′ ∧ ... ∧ c 1 L n,k ′ are positive measures on V which converge by the induction hypothesis weakly to a positive Radon measure which implies that their mass of supp(f ) is bounded with respect to k, k ′ . To go into more detail, let g be a continuous non-negative function on V with compact support such that g(x) > 1 for all x ∈ supp(f ). The existence of such a function follows for example from a partition of unity argument ( [Flo03, 1.5.1]) applied to the open cover {V \ supp(f ), V } of the closure V of V (note that V is compact as X is proper over K). Then where the last term converges for k, k ′ → ∞ and is hence bounded with respect to k, k ′ . We now define a positive linear functional on the space of continuous functions with compact support in V by By the Riesz Representation Theorem ( [Rud87, Theorem 2.14]) this corresponds to a positive Radon measure µ on V and we have µ m,k → µ weakly for k → ∞. It remains to show that µ m,k (Z) is bounded with respect to k for every compact subset Z ⊆ V . So let Z ⊆ V be compact and f a continuous non-negative function on V with compact support such that f (x) > 1 for all x ∈ Z. As above the existence of such a function follows from a partition of unity argument ( [Flo03, 1.5.1]) applied to the open cover {V \ Z, V } of the closure V of V . Again we may assume that f is a model function, i.e. of the from − log · for a piecewise Q-linear metric · on O X an (we can even assume that · is a formal metric) and we use the same notation as above.
To be more precise, let ǫ > 0 such that f (x) > 1 + ǫ for all x ∈ Z. First extend f to X an by zero and then define a new functionf byf (x) = f (x) − ǫ/2. By Proposition 3.13 we may approximatef by a model function φ such that |φ(x) −f (x)| < ǫ/2 for all x ∈ X an . Then by [GM19, Proposition 2.12 (d)], max{0, φ} is a model function on X an with compact support in V which is greater than one at Z. We have Again using Lemma 4.6 and the same argumentation as above for the second summand this amounts to By the induction hypothesis all measures appearing in this last term converge for k → ∞.
Hence the measure of supp(f ) is bounded with respect to k. Furthermore sup x∈V f (x) < ∞ as f has compact support in V and sup x∈supp(f ) log 1 ′ m+1,k (x) is bounded with respect to k by uniform convergence of · ′ m+1,k k∈N and compactness of supp(f ). We conclude that the last term is bounded with respect to k. This proves the induction step. The claim is then the case m = 0.
Remark 4.14. In the situation of Proposition 4.13, the limit depends only on the metrics · i but not on the sequences ( · i,k ) k∈N . Namely, if ( · ′ i,k ) k∈N are other sequences converging uniformly to · i then the sequences ( · ′′ i,k ) k∈N defined by , k odd converge uniformly to · i . As ( · i,k ) k∈N and ( · ′ i,k ) k∈N are subsequences of · ′′ i,k the limit of the measures is the same. We denote the measure corresponding to the metrics · i by c 1 (L 1 ) ∧ ... ∧ c 1 (L n ). weakly to a Radon measure on V denoted by c 1 (L 1 ⊗(M 1 , · 1 ))∧...∧c 1 (L n ⊗(M n , · n )) (as above this measure does not depend on the choice of the · i,k ).
Proof. As in the proof of Proposition 4.13, we may assume that X is projective and write the metrics of the L i as a quotient of two semipositive metrics. Using multilinearity, this is now a direct consequence of Proposition 4.13.
Remark 4.16. To extend the theory to the case where K is not algebraically closed, choose an algebraic closure of K and denote its completion by C K . Then we define the Monge-Ampère measure as the push-forward of the previously defined Monge-Ampère measure on the base change to C K . We explain it here in the situation of Definition 4.11. Let V be a strictly K-analytic Hausdorff space of dimension n, L 1 , ..., L n potentially semipositive piecewise linear metrized line bundles on V (i.e. metrized line bundles on V which become semipositive piecewise linear metrized line bundles after base change to C K ) and π : V C K → V the base change. We can then define a measure on V C K with respect to the pull-backs of the line bundles L 1 , ..., L n by Definition 4.11 and push the resulting measure forward to V via π. To make this well defined we show that π is a proper map of topological spaces. So let C ⊆ V be compact. Then we can cover C by finitely many affinoid subdomains U 1 , ..., U r . Then π −1 (C) = π −1 ( C ∩ U i ) = π −1 (C ∩ U i ) and it is enough to show that π −1 (C ∩ U i ) is compact for any i so we may assume that V is affinoid. But then π is a continuous map between compact Hausdorff spaces and hence proper which yields the claim. We denote this measure again by c 1 (L 1 ) ∧ ... ∧ c 1 (L n ). One can check that all the results of this section remain true in this more general situation.
Definition 4.17. Let K be a complete, non-archimedean, non-trivially valued field, V a strictly K-analytic space and L a line bundle on V . A continuous metric · on L is called locally semipositive if for any x ∈ V there is an open neighbourhood U of x such that · U is a uniform limit of semipositive piecewise Q-linear metrics on L U . It is called locally potentially semipositive if its base change to the completion of an algebraic closure of K is locally semipositive. If V is an open subset of X an for a separated scheme X of finite type over K then using the Remarks 4.14 and 4.16 we define the Monge-Ampère measure c 1 (L 1 )∧...∧c 1 (L n ) for locally potentially semipositive metrized line bundles L 1 , ..., L n on V .
Remark 4.18. The measures defined in this section are invariant under base change. In the spirit of Remark 4.16 this allows to define them in the trivially valued case for line bundles which become semipositive after base change to a non-trivially valued field. Such metrics and their measures are important for example in [BJ].

Comparison of the real and non-archimedean Monge-Ampère operator
In this section we want to compare the two measures introduced in the last section. In order to make sense of this, we start with a convex function h on a closed face of some skeleton. Then one can associate to it a metric on the trivial line bundle which will turn out to be semipositive in the interior of the closed face. Thus we can associate to h two measures, namely the real Monge-Ampère measure and the Chambert-Loir measure, sometimes also called the non-archimedean Monge-Ampère measure. In Corollary 5.7 we will see that they are equal up to scaling. In the following K denotes a non-archimedean non-trivially valued field.
Remark 5.1. Let X be a strongly nondegenerate strictly polystable formal scheme over K • of dimension n + 1 with associated skeleton ∆. Consider an n-dimensional closed faceτ of ∆ with interior τ and the formal open subscheme X ′ of X consisting of all formal open subsets U with S(U) =τ . Let h be a piecewise affine linear convex function (see Definition 2.10) onτ and D a subdivision ofτ such that h ∆ ′ is affine linear for all ∆ ′ ∈ D. Let ι : X ′′ → X ′ be the corresponding formal scheme (cf. Construction 2.6). We have seen in Proposition 2.11 that h induces a Cartier divisor D on X ′′ . We set O(h • p X ′ ) := O(D) where p X ′ : X ′an → τ is the restriction of the contraction p X : X an → ∆. For a line bundle L on a formal scheme, we will denote by c 1 (L) the first Chern class of the special fibre of L.
Theorem 5.2. In the situation of Remark 5.1 let u ∈ τ be a vertex of D with corresponding irreducible component Y ⊆X ′′ as in Corollary 2.9 (f). Let S be the closed point in the special fibre of X corresponding to τ . Then Proof. Note that S is a closed point ofX ′ and hence proper overK. Therefore also Y is proper overK since it is a closed subset ofι −1 (S) and ι is proper by [Tem00,Corollary 4.4]. Let D be the Cartier divisor on X ′′ induced by h as in Proposition 2.11 such that We show by induction that for all 0 ≤ l ≤ n there is a strata cycle Y l of dimension n − l whose components are contained in Y such that deg(D n .Y ) = deg(D n−l .Y l ). The case l = 0 is clear by taking Y 0 := Y . Now let l < n and Y l be as claimed. Let Y ′ be a stratum of Y l , such that Y ′ is associated to an ldimensional open face τ ′ of D, i.e. Y ′ = red X ′′ (p −1 X ′′ (τ ′ )) with u ∈ τ ′ by the stratum face correspondence (Proposition 2.8). Using τ ′ ⊆ τ ⊆ R n , there is an affine linear function a : R n → R such that h τ ′ = a τ ′ . Then h − a τ defines a Cartier divisor D Y ′ on X ′′ by Proposition 2.11 which is numerically equivalent to D on Y by Lemma 2.13 and which is trivial on where the sum ranges over a finite number of n − l-dimensional strata ofX ′′ contained in Y . Then we can calculate: is a strata cycle as claimed. We use this for l = n to see that deg(D n .Y ) = deg(Y n ) for a strata cycle Y n of dimension 0 contained in Y . Its components are strata points S i of X ′′ which are mapped by ι to the point S corresponding to τ . Now let U ′ ⊆ X ′ be a formal open subset with an étale morphism ψ : U ′ → X(n, a) such that S is the distinguished stratum of U ′ (cf. Proposition 2.5) and define U ′′ := ι −1 (U ′ ). Note that there is no factor X(m) because τ is of maximal dimension. As the strata occurring in the intersection process correspond to open faces of D with vertex u, their intersection with U ′′ is nonempty. Hence we may calculate the multiplicities of Y n locally on U ′′ . The stratification ofŨ ′′ is obtained by the preimages of the strata ofX(n, a) ′ (see proof of Proposition 2.8) with respect to the base change ψ ′ : U ′′ → X(n, a) ′ of ψ (cf. Construction 2.6). Let Y u =ψ ′ (Ũ ′′ ∩ Y ) be the irreducible component inX(n, a) ′ corresponding to u and D u the Cartier divisor on X(n, a) ′ whose pullback gives the Cartier divisor D associated to h on U ′′ (cf. proof of Proposition 2.11). By applying the modifications of D in the induction step also to D u we obtain a strata cycle Y t n = m j P j ofX(n, a) ′ whose pullback is Y n (as the intersection product is compatible with flat pullback by [Ful98, Proposition 2.3(d)]) and which has the same degree as D n u .Y u using Lemma 2.13. Now let val : (G n m ) an K → R n , q → (− log q(x 01 ), ..., − log q(x 0n 0 ), ..., − log q(x p1 ), ..., − log q(x pnp )) and Σ := w ∈ R n ≥0 w i1 + ... + w in i ≤ v(a i ), 0 ≤ i ≤ p . As we have an isomorphism X(n, a) an→ val −1 (Σ) and using [Gub13, Corollary 6.15], we find that Y u is a toric variety with fan given by the cones generated by ∆ ′ − u for ∆ ′ ∈ D with vertex u (in fact we identify τ with Σ by forgetting about the coordinate with index 0 for each i). D u Yu is given up to multiplication by a constant by the divisor D ′ u on Y u associated to the linear function h ′ := h(· + u) − h(u). By [Ful93,3.4,5.3] we have where ∀z ∈ R n = ∇h ′ (0) and λ denotes the standard Lebesgue measure. For the last term we get . With ι ′ denoting the morphism X(n, a) ′ → X(n, a) we conclude Using [Ful98, Proposition 1.7] this equals As ψ −1 ({0}) = S is reduced since ψ is smooth, this amounts to . This yields the equality we wanted to prove. Remark 5.4. In the situation of Theorem 5.2 we denote by O h•p X ′ the trivial line bundle on X ′an together with the metric which is given by 1 = e −h•p X ′ . After base change to the completion of an algebraic closure C K of K this becomes a formally metrized line bundle by Proposition 2.11. So similarly as in Remark 4.16 we can define its nonarchimedean Monge-Ampère measure by base change to C K .
Corollary 5.5. We have is understood to be a measure on X ′an by pushforward with the inclusion τ ֒→ X ′an .
Proof. We already know by Theorem 5.2 that the equation holds on the set of vertices. Furthermore it is clear from the definition, that c 1 O h•p X ′ n is supported on the vertices of D. What remains to show is that this also holds for MA(h).
Let U := τ \ u ∈ τ u is a vertex of D . We want to show MA(h)(U ) = 0. Let ∆ 1 , ..., ∆ r be the open faces of D of dimension at least one. For every j ∈ {1, ..., r} there is a v j ∈ R n \ {0} such that for all y ∈ ∆ j there exists ǫ ∈ R + such that y ± ǫv j ∈ ∆ j .
for some m j ∈ Z n and α j ∈ K × and we define h lin j := m j x. Now let y ∈ U . Then there is an i such that y ∈ ∆ i . For p ∈ ∇h(y) and ǫ as above it follows and p lies in a hypersurface which depends on i but not on y. Hence y∈U ∇h(y) is contained in the union of r hypersurfaces. Therefore In the following we consider a proper algebraic variety X over K of dimension n. given by 1 = e −h•p X is a semipositive piecewise Q-linear metric.
Proof. Let y ∈ p −1 X (τ ) and x := p X (y) ∈ τ . There is an open neighbourhood U of x in τ such that we can write h U = max i=1,...,s h i U for suitable rational affine linear functions h i on τ . After passing to some multiple, each h i induces a formal metric on X ′an by Proposition 2.11 where X ′ is defined as in Remark 5.1. Therefore the h i induce piecewise Q-linear metrics on O X an Hence in the neighbourhood p −1 X (U ) of y, the metric induced by h is given as the minimum of the metrics corresponding to the h i , which are semipositive at y by Lemma 2.13. Indeed let (X ′′ i , L i ) be a formal model of the trivial bundle associated to h i as obtained by Proposition 2.11. Then by [GK19, Proposition 6.5] (the proof of the implication we need does neither use that K is algebraically closed nor that the generic fibre is algebraic) it is enough to show that ) but by Lemma 2.13 we even have equality. Now we extend the metrics induced by the h i from a compact strictly K-analytic neighbourhood of y to X an by [GM19, Proposition 2.7] and then it follows from Proposition 3.11 that || · || is semipositive at y.
Corollary 5.7. Let X be a strongly nondegenerate strictly polystable formal model of X an over K • with associated skeleton ∆. Let τ be an n-dimensional open face of ∆ and h a convex function on τ . Denote by O h•p X the trivial bundle on p −1 X (τ ) endowed with the metric given by 1 = e −h•p X . Then the latter is locally a semipositive metric (Definition 4.17) and It will follow from Corollary 5.10 that this is independent of the choices. Proposition 5.9. Let K be algebraically closed, X a strongly nondegenerate polystable formal model of X an over K • with associated skeleton ∆, τ an n-dimensional open face of ∆ and h a rational piecewise affine linear convex function on τ . Then the metric on O X an By Corollary 5.5 we have It is easily seen that in Proposition 4.13 we can replace uniform convergence by locally uniform convergence. The claim follows from this fact and continuity of the real Monge-Ampère operator.

Applications to regularity
In this section we use the connection of the non-archimedean Monge-Ampère operator to the real one to transfer two known regularity results for the solutions of the real Monge-Ampère equation to the non-archimedean case. Again K denotes a non-archimedean non-trivially valued field. Definition 6.1. Let Ω ⊆ R n be an open subset and k ∈ N. We write C k (Ω) for the space of real valued, k times continuously differentiable functions on Ω. Furthermore we denote by L 1 loc (Ω) the space of locally integrable functions on Ω i.e. functions f : Ω → R such that the restriction of f to any compact subset of Ω is integrable. Let f, g ∈ L 1 loc (Ω) and β ∈ N n . We say that g is the β-th weak derivative of f if for any test function ϕ ∈ C ∞ (Ω) with compact support we have where dx denotes the Lebesgue measure on R n . We denote by W k,1 loc (Ω) the space of locally integrable functions on Ω whose weak derivatives exist up to order k. Proposition 6.2. Let X be an n-dimensional proper variety over K and L a line bundle with a fixed formal metric. Let µ be a positive Borel measure on X an and ϕ a continuous function on X an such that the metric on L ⊗ O ϕ is semipositive and solving the equation Let τ be an n-dimensional open face of some skeleton ∆ associated to a strongly nondegenerate strictly polystable formal model X of X an . Suppose that X is algebraic, L has a model on X and λ · dx ≤ µ ≤ Λ · dx on τ for some λ, Λ > 0 where dx denotes the Lebesgue measure on τ . Assume that ϕ = ϕ • p X . Then ϕ ∈ W 2,1 loc (τ ). Proof. By Corollary B.4 ϕ is convex on every closed face of ∆. Note that the metric on L is trivial on p −1 X (τ ). Hence we can apply Corollary 5.7 to get If τ is an open face of the skeleton ∆ of a strictly semistable algebraic model X of X an on which L has an algebraic model, µ is supported on ∆ and µ = f · dx on τ for some positive function f ∈ C k (τ ) where dx denotes the Lebesgue measure on τ then ϕ ∈ C k+2 (τ ).
Proof. By [GJKM19, Proposition 1.2] we have ϕ = ϕ • p X . As in the previous result ϕ is convex on τ and on τ . But a solution to the archimedean Monge-Ampère problem is given by a second antiderivative of f and the solution is unique up to addition of a linear function. Hence ϕ ∈ C k+2 (τ ) and deg(S) · ϕ ′′ = f .

Appendix A. Reduction of germs
In this appendix we will explain the reduction of germs due to Michael Temkin (see [Tem00] and [Tem04]). At the end we will use this theory to prove a generalization of [CD, Lemme 6.5.1] proposed by Antoine Ducros which drops a separatedness assumption.
i) The category of punctual strictly K-analytic spaces is the following: The objects are pairs (X, x) where X is a strictly K-analytic space and x ∈ X is a point. A morphism ϕ : (X, x) → (Y, y) is a morphism ϕ : X → Y of strictly K-analytic spaces such that ϕ(x) = y.
ii) The category (K-Germs) of germs of a strictly K-analytic space at a point is defined to be the localization of the category of punctual strictly K-analytic spaces by the system of morphisms ϕ : (X, x) → (Y, y) which identify X with an open neighbourhood of y in Y . The germ induced by the punctual strictly K-analytic space (X, x) is denoted by X x . iii) A germ X x is said to be good if x has a strictly K-affinoid neighbourhood in X. A morphism of germs ϕ : X x → Y y is said to be separated resp. closed if it is induced by a separated resp. boundaryless morphism X ′ → Y for an open neighbourhood X ′ of x in X (recall that a morphism ϕ : X → Y of K-analytic spaces is called boundaryless if X = Int(X/Y ), where the relative interior Int(X/Y ) is defined to be the set of all x ∈ X such that for any affinoid Definition A.2. Let k be a field and let L be a field extension of k.
i) The Zariski-Riemann space P L/k is the set of valuation rings in L which contain k and whose quotient field is L endowed with the coarsest topology such that all sets of the form P L/k {f } := R ∈ P L/k f ∈ R with f ∈ L are open. ii) The category (bir k ) is the following: The objects are triples (X, L, φ) where X is a connected quasi-compact and quasi-separated topological space, L is a field extension of k and φ : X → P L/k is a local homeomorphism. A morphism (X, L, φ) → (Y, M, ψ) is a pair (h, i) where h : X → Y is a continuous map and i : M → L is a morphism of field extensions of k such that ψ In [Tem00, §2] Temkin introduced a reduction functor red from (K-Germs) to (birK) sending a germ X x to its reductionX x . It can be described as follows (see [Tem04,§4]): If X x is a good germ, we can assume X = M (A) for a strictly K-affinoid algebra A. Then the character χ x : A → H (x) induces a morphismχ x :Ã → H (x). Theñ  Indeed if R ∈ P H (x)/K is a valuation ring withχ x (Ã i ) ⊆ R thenÃ i /p ⊆ R ∩K(V ). Let m R be the maximal ideal of R then p ′ := m R ∩Ã i /p defines a point in Spec(Ã i /p) whose local ring is (Ã i /p) p ′ and we have (Ã i /p) p ′ ⊆ R. Then R ∩K(V ) admits the center p ′ on Y i ∩ V as claimed. Conversely if R ∩K(V ) admits a center on Y i ∩ V then there exists p ′ ∈ Spec(Ã i /p) such that (Ã i /p) p ′ ⊆ R ∩K(V ) and hence obviouslyχ x (Ã i ) ⊆ R.

Second step:
The mapX x → P H (x)/K is surjective if and only if any valuation oñ K(V )/K admits at least one center on V .
LetX x → P H (x)/K be surjective and v a valuation onK(V )/K. Then v extends to a valuationṽ on H (x). Let R be the valuation ring ofṽ. Then R ∈ P H (x)/K and hence R has a preimage R ′ ∈X x . Then there exists i ∈ I such that R ′ ∈Ṽ i x hence the image of R ′ in PK (V )/K admits a center on Y i ∩ V by the first step. But this image is R ∩K(V ) by construction which is the valuation ring of v. Hence v admits a center on V . Conversely suppose that any valuation onK(V )/K admits a center on V and let R ∈ P H (x)/K then the image of R in PK (V )/K induces a valuation onK(V )/K which admits a center z on V . Let i ∈ I such that z ∈ Y i then R ∈Ṽ i x and the induced element inX x is a preimage of R. To see this we describe V i x ∩ V j x . In order to do so we cover Y i ∩ Y j by open affine subsets Y k i,j . Their preimages under red yield a cover of V i x ∩ V j x by good germs. As above their reductions can be described as the preimage of the set of valuation rings inK(V ) which admit a center on Y k i,j ∩ V . The reduction of V i x ∩ V j x is then obtained by glueing these spaces. Now suppose that any valuation onK(V )/K admits at most one center and let R 1 , R 2 ∈X x which map to the same valuation ring R ∈ P H (x)/K . There exists i, j such that R 1 ∈Ṽ i x , R 2 ∈Ṽ j x . As we have seen in the first step, R 1 ∩K(V ) and R 2 ∩K(V ) admit centers y 1 ∈ Spec(Ã i ) ∩ V respectively y 2 ∈ Spec(Ã j ) ∩ V . Then both are a center of R ∩K(V ). Hence y 1 = y 2 ∈ Y i ∩ Y j by our assumption. Therefore by Hence in the glueing process, R 1 and R 2 are identified with each other. Conversely suppose that there is a valuation onK(V )/K which admits two centers y 1 , y 2 ∈ V . Let y 1 ∈ Y i and y 2 ∈ Y j . Choose an extension of the valuation to H (x) and let R denote its valuation ring. Then R induces an element R 1 ∈Ṽ i x as well as an element R 2 ∈Ṽ j x . Then R 1 and R 2 map to the same element R in P H (x)/K but they are not identified in the glueing process as Y i ∩ V and Y j ∩ V are separated and hence R 1 and R 2 admit at most one center in Spec(Ã i ) ∩ V respectively Spec(Ã j ) ∩ V which means in particular that they do not admit a center in Y i ∩ Y j ∩ V . HenceX x → P H (x)/K is not injective. This proves the third step.
Recall that V is proper if and only if every valuation onK(V )/K admits a unique center on V ( [Har77, Ch. II, Ex. 4.5]). Hence the claim follows from the second and third step. Together we get ϕ(tx + (1 − t)y) > max {ϕ(x), ϕ(y)} . But this violates our previous observation that |f (tx + (1 − t)y)| ≤ max {|f (x)|, |f (y)|}. This finishes the proof. Definition B.2. Let X be an algebraic scheme over K • , a a vertical coherent fractional ideal sheaf on X (i.e. a is a coherent subsheaf of the sheaf of total quotient rings K X such that after multiplying with some element of K • \ {0} it becomes a vertical ideal sheaf) and red : X an →X the reduction map. We define the function log |a| : X an → R by log |a|(x) := sup log |f (x)| f ∈ a red(x) . The supremum is actually a maximum as for a set of generators f 1 , ..., f r of a red(x) we have sup log |f (x)| f ∈ a red(x) = max log |f i (x)| 1 ≤ i ≤ r . Lemma B.3. Let X be a proper scheme over K and L a line bundle on X with an algebraic metric · L . Let · be a piecewise Q-linear metric on O X an such that · L ⊗ · is a semipositive piecewise Q-linear metric. Let X be an algebraic model of X such that L has a model L on X and set ϕ := − log 1 . Then there is a sequence (a n ) n∈N of vertical coherent fractional ideals on X and a sequence (d n ) n∈N of positive integers such that 1 dn log |a n | converges uniformly to ϕ. Proof. We may assume that · is a piecewise linear metric. Let X ′ be an algebraic model of X on which (O X an , · ) has an algebraic model M . The section 1 of O X extends to a meromorphic section s of M and then M = O(D) for the vertical Cartier divisor D = div(s) on X ′ . By [GW10,Theorem 13.98] we may assume that X ′ is a vertical blowup of X . Denote by π the canonical map X ′ → X . We show first that D is π-nef, i.e. deg(D · C) ≥ 0 for any closed curve C ⊆X ′ which is contracted by π. So let x ∈X be a closed point and C ⊆ π −1 (x) a curve. Then by the semipositivity assumption deg((O(D) + π * L ) · C) ≥ 0. But since π * (π * L · C) = L · π * (C) = 0 we have deg(π * L · C) = 0 and hence deg(D · C) ≥ 0. Now let A be a π-ample vertical Cartier divisor on X ′ , e.g. A = −E for the exceptional divisor E of the blowup (this is π-ample by [GW10, Proposition 13.96]). Then D + A is π-ample by the relative version of Kleiman's criterion ( [Deb01, Remark 7.41]). Furthermore, since O X ′ (D) and O X ′ (A) are coherent vertical fractional ideal sheaves, also a := π * O X ′ (m(D + A)) is a coherent vertical fractional ideal sheaf on X for any m ∈ N >0 by [Ull95, Theorem 5.3]. By the characterization of π-ampleness in [Gro61, Proposition 4.6.8] there exists some m ∈ N >0 such that π * a → O X ′ (m(D + A)) is surjective. This implies log |a| = log |π * a| = log |O X ′ (m(D + A))| = m · (ϕ − log 1 O X ′ (A) ) and hence 1 m log |a| = ϕ − log 1 O X ′ (A) . Since we can replace A by ǫA for arbitrary small ǫ ∈ Q >0 this concludes the proof.
Corollary B.4. In the situation of Lemma B.3 suppose that the formal completion X of X is strongly nondegenerate strictly polystable and denote by ∆ the associated skeleton. Then ϕ is convex on every face of ∆ and satisfies ϕ ≤ ϕ • p X .
Proof. By Lemma B.3 we may approximate ϕ by functions of the form 1 dm log |a m | for some vertical coherent fractional ideals a m on X . On the generic fibre of a building block U, the function log |a m | is given as the maximum of the functions log |f | where f runs through a finite set of generators of a m U . Since the properties we are looking for are stable under taking the maximum, these functions have them by Lemma B.1. But they are also stable under uniform limits so we are done.