{'fraction_non_alphanumeric': 0.03278361484239926, 'fraction_numerical': 0.006583322250299242, 'mean_word_length': 4.556438204322927, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Homotopy probability theory on a Riemannian manifold and the Euler equation

Homotopy probability theory is a version of probability theory in which the vector space of random variables is replaced with a chain complex. A natural example extends ordinary probability theory on a finite volume Riemannian manifold M. In this example, initial conditions for fluid flow on M are identified with collections of homotopy random variables and solutions to the Euler equation are identified with homotopies between collections of homotopy random variables. Several ideas about using homotopy probability theory to study fluid flow are introduced.


Introduction
Homotopy probability theory is a version of probability theory in which the vector space of random variables is replaced with a chain complex. The ordinary probability theory on a Riemannian manifold, in which the random variables are measurable functions, sits within a larger homotopy probability theory in which collections of random variables may include differential forms. Collections of differential forms should satisfy certain conditions in order to have meaningful, homotopy invariant statistics. Collections of functions and forms that satisfy those conditions constitute collections of homotopy random variables. The conditions can be summarized by saying that the moment generating function of the collection is closed with respect to the adjoint of the de Rham differential. To define a moment generating function, parameters are chosen to keep track of the joint moments of the constituents of the collection. In this paper, particular parameter rings are considered and the collections of homotopy random variables are identified with initial conditions for fluid flows, such as an initial density. Solutions to fluid flow equations are identified with homotopies between collections of homotopy random variables parametrized by particular rings. In this regime the homotopy parameter plays the role of time. The particular choice of fluid flow equation that is applicable depends on the choice of parameter ring. In this paper, the mass equation and the Euler equation appear.
The homotopy probability framework provides some new ideas for studying fluid flow and a couple of these ideas are introduced in Section 6 after reviewing homotopy probability theory on a Riemannian manifold and explaining the connection with fluids. One idea is to study the homotopy invariant statistics afforded by homotopy probability theory which necessarily yield hierarchies of time-independent invariants of fluid flow. A second idea is to use a finite cochain model for a manifold giving rise to a homotopy probability space quasi-isomorphic to the smooth one relevant for fluid flow. In the combinatorial model, homotopies between combinatorial collections of homotopy random variables are solutions to finite dimensional ODEs and can naturally be transported to give homotopies between smooth collections of homotopy random variables. Not all homotopies between collections of homotopy random variables constitute solutions to fluid flow equations. This paper contains precise descriptions of the additional conditions that homotopies must satisfy in order to be solutions to the fluid equations. These conditions and their combinatorial versions could be studied to get insights into smooth fluids, or could be used to develop new computer models.
The authors are grateful to Jae-Suk Park, Dennis Sullivan, and Scott Wilson for many useful discussions.

Ordinary probability theory on a Riemannian manifold
Let M be a connected, closed, oriented n-dimensional Riemannian manifold and let dV be the associated volume form on M . Assume the metric is normalized so that M dV = 1. There is an ordinary probability space associated to M . The bounded measurable functions on M are the random variables and the expectation is defined by For simplicity, restrict the random variables to Ω 0 (M ), the smooth functions on M . Note that the expectation factors where the n-form ⋆(f ) is defined as f dV .
As a linear map to a one-dimensional vector space, the expectation E : Ω 0 (M ) → R can be understood by studying its kernel. Stokes' theorem implies that if f dV = dω for an (n − 1)-form ω then The converse also holds because H n (M ) is one dimensional, spanned by the cohomology class of dV . So understanding the kernel of the expectation amounts to understanding which functions f have the property that f dV is exact.
The map ⋆ is part of the so called "Hodge star" isomorphism ⋆ : Ω • (M ) → Ω n−• (M ). One can use the isomorphism ⋆ to transport the differential d to the codifferential δ = ± ⋆ −1 d⋆ (see Appendix A for details). Then, in the following diagram Now, extend the expectation to a map on all forms by setting E(α) = 0 for all k-forms α with k ≥ 1. Regard the real numbers as a chain complex concentrated in degree zero with zero differential. Then the situation can be encapsulated in the statement Expectation is a chain map (Ω • (M ), δ) E −→ (R, 0) which induces an isomorphism in cohomology. If one were only interested in expectations, this would be the final statement in this line of thinking. However, in probability theory, one is also interested in correlations among random variables. That is, the space of random variables is an algebra and so is the set of real numbers but expectation is not an algebra map. On the contrary, the failure of expectation to be an algebra map measures the extent to which random variables are statistically dependent. For example, the difference is a particular measure of correlation called the covariance of f and g. Note too that δ fails to be compatible with the algebra structure-the Hodge star operator does not respect the wedge product. Section 4 explains how to combine the ways that δ and E fail to respect the algebra structures to define a homotopy theory of statistical dependence. But first, some of the basic ideas and terminology of homotopy probability theory are reviewed.

Homotopy probability theory on a Riemannian manifold
Homotopy probability spaces, studied before in [Par11,DCPT15,PP13,DCT14,Par15], are now briefly recalled. There is a ground field (always R in this paper) which is viewed as a chain complex concentrated in degree zero with zero differential. Recall that a chain complex is pointed if it is equipped with a chain map 1 from the ground field, called the unit (so d1 = 0). Morphisms of pointed chain complexes are required to preserve the unit.
Definition 3.1. A homotopy pre-probability space is a tuple (V, 1, d, m) where (V, 1, d) is a pointed chain complex and (V, m) is a graded commutative associative algebra for which 1 is a unit for m. A morphism of homotopy pre-probability spaces is a morphism of pointed chain complexes.
Note that other than the unital condition, there is no assumed compatibility between the product and either the differential or a morphism of homotopy preprobability spaces. A homotopy pre-probability space should be thought of as a generalization of the space of random variables. In order to define expectations and correlations, one needs an expectation map and a space for the expectation values to live in.
Definition 3.2. Let k be a homotopy pre-probability space. A k-valued homotopy probability space is a homotopy pre-probability space C equipped with a morphism E of homotopy pre-probability spaces E : C → k, called expectation. A morphism of k-valued homotopy probability spaces is a morphism of homotopy pre-probability spaces that respects expectation.  There are multiple natural generalizations of the homotopy probability space associated to a Riemannian manifold described above.
3.1. Cohomology-valued homotopy probability space. One variation that is possible is to replace the real numbers with the cohomology of the manifold. Let 3.2. Noncompact manifolds. One may want to work with a pre-probability space associated to a noncompact Riemannian manifold. In this case, some attention must be paid to the type of forms that are used [AFW06]. The following data and properties are desirable for the main ideas and results in HPT to apply.
-Spaces W k of differential k-forms with a linear expectation map E defined on the functions W 0 -For unitality, the constant function 1 should be in W 0 and have expectation E(1) = 1. -A degree −1 differential δ with ker(E) = δ(W 1 ) -A degree zero algebra structure on the sum W = k W k For an oriented Riemannian manifold M , there may be numerous choices for the spaces of differential forms with the desired properties. If M has finite volume, uniformly bounded smooth differential forms are one choice. If one is indifferent about the resulting homotopy probability space being unital, compactly supported smooth forms would also work, whether M is finite volume or not. Particular circumstances, as in example 3.5 below where polynomial forms are defined, suggest other choices are possible. An idea expressed by Terence Tao in a blog post about algebraic probability theory [Tao10] involved functions whose L p norms are bounded for all p-these spaces can probably be extended to some sort of forms in order to do homotopy probability theory on a noncompact Riemannian manifold.
There are other considerations, not pursued here, for the important case of manifolds with boundary.
Example 3.5. The homotopy Gaussian, considered in other contexts as well [GJF12,PP13,DCT14], is an example of a homotopy probability space associated to a noncompact finite-volume Riemannian manifold. Consider the ordinary Gaussian measure dµ = (2π) −1/2 e −x 2 /2 dx on M = R and let W • (R) consist of differential forms of the form R[x] 1, η where η = (2π) −1 e −x 2 dx. For any function f ∈ W 0 (R), one computes that ⋆f = f dµ and ⋆ (f dµ) = f and finds δ : with the expectation map defined by E(f ) = f dµ is a unital homotopy probability space in which probability computations can be performed with simple algebra,. For example, the moments of f can be readily computed by knowing that E vanishes on δ exact forms. The first two examples of such so that E(x 2 ) = E(1) = 1. This example is explored in more detail in the references above.

Homotopy statistics
Gromov recently wrote [Gro15] The success of probability theory decisively, albeit often invisibly, depends on symmetries of the system the theory applies to.
The example of the homotopy Gaussian and more generally the example of forms on a finite volume Riemannian manifold illustrate a method to organize symmetries of an ordinary probability theory when those symmetries arise geometrically. The method is to generate a related homotopy probability space, and then use algebra to compute expectations. Computations performed in the related homotopy probability space should genuinely relate to the original ordinary probability space and so they should be homotopy invariant in an appropriate sense-homotopic expectation morphisms should yield the same result on random variables, and homotopic collections of random variables should have the same homotopy statistics. Therefore, unlike in ordinary probability theory in which every element of V is considered as a random variable, the notion of a random variable in a homotopy probability space is refined. The starting point for defining collections of homotopy random variables and their homotopy statistics is that an element X of V has a meaningful expectation if and only if dX = 0. Random variables could be defined as closed elements of a homotopy probability space if one were only interested in expectation values. However, this first guess of a definition of random variables is unsatisfactory from the point of view of other correlations and other statistics, such as covariance, because there is no compatibility assumed between d and the product. So, for example, dX = 0 and dY = 0 does not imply that d(XY ) = 0 and therefore the joint moment E(XY ) and the covariance E(XY ) − E(X)E(Y ) will be meaningless.
In [DCPT15,DCT14], collections of homotopy random variables were defined using the technology of L ∞ algebras and L ∞ morphisms. In this paper, collections of homotopy random variables are reformulated. The reformulation is potentially more accessible and more in line with the language of probability theory, but only makes sense in the presence of an exponential function. The exponential reformulation of homotopy random variables works perfectly well for homotopy probability theory on a Riemannian manifold since the infinite sums defining the exponential function all converge. In other settings there would be algebraic technicalities to address. One way (possibly overkill) to address the technicalities is to assume every ring in sight is a complete topological ring satisfying the so-called Arens or m-convexity condition [Are46]. Such issues are not germane here and so the reader is invited to interpret all the definitions in this section as applying only for the homotopy pre-probability space (Ω • (M ), 1, δ, ∧) associated to a Riemannian manifold M or to any setting in which the exponential function makes sense.
satisfies d (exp (sX)) = 0 if and only if d(X n ) = 0 for all n. That is, exp(sX) is closed if and only if all the moments of X are meaningful. If X has nonzero degree, then it is convenient to allow the formal parameter s to have a nonzero degree so that sX has degree 0. More generally, all the joint moments of members of a collection {X i } i∈Λ ⊂ V will be well defined if and only if their joint moment generating function is closed: since every finite joint moment of the {X i } appears as a single term in the expression exp i∈Λ s i X i with a unique formal parameter as a coefficient.
One potential problem is that quotients are often poorly behaved from a homotopical point of view. One solution is to replace such quotients with free resolutions, which requires moving from graded rings to differential graded rings. This is merely one aspect of the motivation behind using differential graded rings-neither the requisite homotopy theory nor any other motivating ideas are dwelled upon in this paper.
be a power series ring on a set S of graded variables equipped with a differential and let (V, 1, d, m) be a homotopy pre-probability space. A collection of homotopy random variables parametrized by R is a degree zero element X ∈ V ⊗ R satisfying δ (exp (X )) = 0 and the homotopy statistics of such a collection is defined to be E(exp(X )) ∈ R.
The δ in the expression δ(exp(X ) = 0 means the tensor product differential for the tensor product Ω

4.2.
Homotopies of collections of homotopy random variables. A parameter ring R can be extended using an algebraic model for the interval to R[[t, dt]]. By convention t has degree zero, dt has degree −1, d(t) = dt and d(dt) = 0.
Definition 4.2. Two collections X 0 and X 1 of homotopy random variables parametrized by a parameter ring R are homotopic if and only if there exists an R[[t, dt]]-collection X of homotopy random variables satisfying X | t=0,dt=0 = X 0 and X | t=1,dt=0 = X 1 . Such a collection X ∈ Ω • ⊗ R[[t, dt]] is called a homotopy between the collections X 0 and X 1 .
The following equivalent definition shows that as long as the exponentials make sense there is no issue with convergence.
This proof is naive, but the Lemma is true for conceptual reasons and in much more generality. The reference [DP15] provides an excellent overview.
The Fundamental Theorem of HPT. The statistics of homotopic collections of homotopy random variables parametrized by a ring R have the same cohomology class in R.
Proof. E is a chain map so has the same value on elements with the same cohomology class. Lemma 4.3 says that the joint moment generating functions of homotopic collections of homotopy random variables have the same cohomology class.

Homotopy random variables on a Riemannian manifold
The main idea of this paper is that solutions to fluid flow equations can be identified with homotopies of parametrized collections of homotopy random variables. The map is not a bijection and this section describes its image by giving explicit conditions and choices which imply that a homotopy of parameterized collections of homotopy random variables comes from a solution to the fluid flow equations. Each of the several parameter rings discussed has its own strengths and weaknesses, as can be seen below. It is an interesting puzzle to find better parameter rings with more strengths and fewer weaknesses. Various diffeo-geometric notions are used in this section for decomposing the equation δ exp s i ω i = 0. These notions, including several operators and their compatabilities, are reviewed in the appendix.

The mass equation.
To begin with, look at a single ordinary random variable, that is, a collection of homotopy random variables parametrized by the 1dimensional parameter ring R = R. Such a collection is a degree zero element f in Ω • (M ), that is, a function, satisfying δ exp(f ) = 0. This equation is vacuous for a function-all collections of ordinary random variables are collections of homotopy random variables. So a collection of homotopy random variables parametrized by R is a function. In the sequel, it will be convenient to use the shorthand notation ρ for exp(f ). Now look at a homotopy. A homotopy of random variables parametrized by R is a degree zero element f (t) + X(t)dt in the homotopy pre-probability space Ω • (M ) [[t, dt]]. Here f is a power series in t whose coefficients are functions on M and X is a power series in t whose coefficients are one-forms in M . The series f and X must satisfy the equation Because dt squares to zero, this exponential simplifies and we get δ(ρ + ρXdt) = 0 which polarizes into the two expressions The unlabeled equation is again vacuous. Equation (1a) is not.
In particular, f 1 (γ 1 ) = f 0 (γ 0 ) − 1 0 ∇· X(γ t , t)dt. The function f 1 is the transport of the function f 0 along the flow X minus the accrued divergence of X.

The vorticity equation.
For the remainder of the section, assume that M is dimension three. To generalize the following results to manifolds of dimension n, give ǫ degree 2 − n and define curl and cross product suitably (see Appendix A). The results are almost identical for dimensions n ≥ 5, but for n = 2 and n = 4 there are subtleties not explored here.
In order to involve collections of homotopy random variables that are not ordinary random variables, a parameter with negative degree needs to be introduced. Consider the parameter ring R[ǫ], where ǫ is a degree −1 variable. A generic collection of homotopy random variables parametrized by R[ǫ] is an element of the form f + V ǫ for f a function and V a one-form on M . Again, ǫ squares to zero and so exp(f + V ǫ) = ρ + ρV ǫ. Then the data must satisfy the condition (2) δ(ρV ) = 0, So the condition on V is that (ρV ) ♯ is a divergence free vector field. Next, look at a homotopy. A homotopy of R[ǫ]-collections has the form where f , X, V , and π are power series in t with coefficients functions, one-forms, one-forms, and two-forms in M , respectively. The exponential is only slightly more complicated than before: (the sign in the final term comes from commuting the odd elements V and dt) Then these data must satisfy the mass equation along with Equation (2) and the following: Remark. In fact, the lemma remains true if the kenetic constraint is replaced with the constraint that π be a δ-closed two-form. The kinetic constraint is chosen here because it feeds into the generalization in Lemma 5.3.

Remark.
In [Sul14], Sullivan analyzed the vorticity equations for a nonviscous fluid with unit density 1 and suggested that homotopy probability theory might be helpful in understanding a finite models of fluids. The authors were inspired by this suggestion to explore the link between HPT and fluids and found that there is a connection between HPT and smooth models for fluids as well-the connection described in this paper.
Proof. Let u(t) be a solution to the vorticity equations and define (f, X, V, π) as in the lemma. Then ρ = exp(f ) = 1 and π is δ-closed so that the equations that must be satisfied for this data to be the data of a homotopy are: The mass equation implies the first of these. The second is true by definition of V ; note also that −V = ω ♭ under the identifications. Finally, rewrite the right hand side of the vorticity equation, using the fact that both u and ω are divergence free: Then reinterpreting the vorticity equation in light of the identifications of X and V , this is as desired. This argument may be run just as easily in reverse.
Remark. There is a variation of this lemma using the same parameter ring without the constant and uniform density assumption. In this case, the relevant equation is not quite the vorticity equation, which is the curl of the Euler equation, but rather the curl of the Euler equation multiplied by the density. This seemingly innocuous change eliminates pressure terms from the resulting equation.
In this potential variant, some modifications would be necessary to the identification of the forms (f, X, V, π) involved in the collection of homotopy random variables in terms of the hydrodynamics variables (ρ, u) because Lemma 5.2 has already incorporated certain simplifications that are only possible due to the constant and uniform density assumption. This variant lemma and these modifications will not be stated explicitly here because the variant lemma is a corollary of Lemma 5.3 and the appropriate identifications can be seen there.
5.3. The Euler equation. Now consider the differential graded parameter ring R = R[ǫ, dǫ]. Here ǫ is again degree −1 and dǫ is degree −2. Continue to assume that the dimension of M is three.
A generic R-collection of homotopy random variables is an element of the form for f a function, V a one-form, σ a two-form, and Ψ a three-form on M . The exponential is ρ + ρV ǫ + ρσdǫ + ρ(V σ + Ψ)ǫdǫ (while dǫ does not square to zero, the two-form σ does). Then these data must satisfy the conditions of Equations (1a) and (2) along with the further equations (the coefficients, respectively, of dǫ, ǫdǫ, and (dǫ) 2 ): The equations (8) and (10) determine V and Ψ in terms of σ and f ; then Equation (2) follows from Equation (8) and Equation (9) follows from Equation (10), in both cases by applying δ. Then an R-collection of homotopy random variables is a pair (f, σ) with f an arbitrary function and σ an arbitrary 2-form.
The equations these variables satisfy are the mass equation (Equation (1a)) as well as Equations (2) and (3a) above along with (the t-dependent versions of) Equations (8)-(10) above and the following equations, the coefficients of dtǫdǫ and dtdǫ, respectively: However, several of these equations follow formally from one another.
Then after simplification, a homotopy between two R-collections of random variables is the data of a collection (f, X, σ, Φ) which satisfy the mass equation.
Remark. Because a homotopy between two R-collections of random variables must satisfy only the mass equation and has two free variables σ and Φ, it may seem strange to try to relate it to fluid flow. That is, by varying the interpretation of the free variables, this could encapsulate any collection of variables where some part satisfies the mass equation. However, the equation seems fairly well-suited to the momentum equation in that the variables are generally quantities of independent physical interest. Perhaps a more judicious choice of parameter ring (in particular, one which is not contractible) might yield a version of the equation which does not have this underdetermination. On the other hand, it is also possible that there is a further natural algebraic condition to put on the homotopy which imposes the other conditions in the following lemma.
Proof. The verification is an exercise, recorded here for convenience.
Suppose that (ρ, u, p) is a solution to the compressible Euler equations. It is straightforward to check that the choice for V satisfies the identity of Equations (8). To see that the choice for Ψ satisfies Equation (10), one verifies Finally, to see that the choice for π satisfies Equation (12a), one can first rewrite Equation (12a) by using the Batalin-Vilkovisky relation (see Appendix A) as follows.
Then the left hand side of Equation (12a) is equivalent to The termρ + δ(ρX) in this sum vanishes by Equation (1a). Then since ρ is a unit and ⋆ an isomorphism, it remains only to be seen that the equatioṅ X − ⋆(X ∧ ⋆dX) + 1 2 d ⋆ (X ∧ ⋆X) + dp ρ is equivalent to the Euler momentum equation. But the former is also which is the momentum equation up to the musical isomorphism. This argument can be run in reverse for a given homotopy satisfying the constraints above.

Applications of the HPT framework to fluid flow
The paper concludes with some speculative directions for future work.
6.1. Homotopy statistics. The homotopy probability theory framework provides some new ideas for studying fluid flow. One idea is to use the homotopy statistics afforded by homotopy probability theory which yield hierarchies of timeindependent numerical invariants. For any collection X of homotopy random variables parametrized by R, the expected value of the moment generating function E (exp(X )) ∈ R is the complete set of homotopy statistics of the collection X : if X = i s i X i , then the joint moment E X r1 i1 · · · X r k i k is determined by the coefficient of s r1 i1 · · · s r k i k in E (exp(X )) ∈ R. The fundamental theorem of homotopy probability theory implies that homotopic collections of homotopy random variables have statistics that differ by exact elements of the parameter ring. In particular, if R has no cohomology, then homotopic collections of homotopy random variables have exactly the same statistics.
More explicitly, suppose (ρ, u, p) is a solution to the compressible Euler equations on a compact Riemannian manifold M and H(t, dt) = f (t) + X(t)dt + · · · + Ψ(t)ǫdǫ is the corresponding homotopy of collections of homotopy random variables from Lemma 5.2. The Fundamental Theorem implies that the statistics of H(t 1 , 0) and H(t 2 , 0) have the same cohomology.
The statistics depend on the expectation map. In the R-valued homotopy probability space associated to M , the expectation map, and more generally any multilinear map built out of the expectation and the product on Ω • (M ), vanishes outside degree zero. Then the statistics of a parameterized collection of homotopy random variables only has access to the degree zero number This is the integral of the density over the manifold, which yields the mass of the fluid, a time independent quantity. However, the homotopy statistics with values in any pre-homotopy probability space with zero differential will produce time independent invariants of fluids. Perhaps investigating the statistics for other expectation maps valued in possibly other pre-probability spaces (such as the cohomology valued expectation) would assist with problem described by Arnold  6.2. Change of parameter ring. As indicated in Section 5, there is room for improvement in the choice of parameter ring. Ideally, a clever choice would eliminate some of the necessary constraints, incorporate other features like energy dynamics or viscosity, or provide a deeper conceptual understanding. One note is that while all the parameter rings considered here are differential graded algebras, one could also imagine choosing a parameter ring which is itself not a differential graded algebra but rather a homotopy pre-probability space (there is a tensor product of homotopy pre-probability spaces).
6.3. Finite models. Another way that homotopy probability may contribute to fluid flow is to produce new combinatorial models. Indeed, this idea was proposed in [Sul14] and was the idea that first motivated this paper. A finite cochain model for a Riemannian manifold M gives rise to a homotopy probability space quasiisomorphic to the smooth homotopy probability space associated to M . What might be called "the second fundamental theorem of HPT" is the fact that collections of homotopy random variables can be transported naturally along morphisms. Therefore, homotopies between collections of homotopy random variables in the finite cochain model, which are solutions to finite dimensional ordinary differential equations and so always exist, can be transported to a homotopy of collections of homotopy random variables in the smooth model. At this level of generality, such tranpsorted homotopies need not satisfy the constraints of the various lemmas of Section 5 and therefore need not satisfy any version of the Euler equation. However, one could study combinatorial versions of these constraints (like a combinatorial version of curl [Wil11,Sul14]). An understanding of how the combinatorial constraints relate to the smooth constraints under transport would yield the ingredients for both new finite models of fluid flow as well as a theoretical tool to use finite methods to study smooth fluid flow. Familiar operators from multivariable calculus correspond to familiar operators in differential geometry. All of the following can either be taken as definitions in the Riemannian context for arbitrary dimension n and degrees i and j or verified in a local coordinate chart with any standard definition in R 3 , where by choosing i = j = 1 throughout one restricts to the usual operators on and between functions and vector fields alone.
-The inner product on one-forms is defined as X ♭ , Y ♭ = g(X, Y ).
-This inner product is extended linearly over functions to i-forms. There is one further property that will be used which describes the compatibility between the codifferential δ and the wedge product on forms. Unlike the de Rham differential d, which is a derivation (that is, a first order differential operator), the codifferential is a second order differential operator. Then the equation it satisfies for arbitrary homogeneous forms α, β, and γ is as can be verified directly.