{'fraction_non_alphanumeric': 0.04616530156366344, 'fraction_numerical': 0.010052122114668651, 'mean_word_length': 3.6486876261897896, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 2, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 7, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
When is a Connection a Levi-Civita Connection?

We consider the more general question as to when a connection is a metric connection. There are two aspects to this investigation: first, the determination of the integrability conditions that ensure the existence of a local parallel metric in the neighbourhood of a given point and second, the characterization of the topological obstruction to a globally defined parallel metric.

By means of a derived flag it may be ascertained when a connection on a vector bundle possesses, locally, a non-trivial parallel section; in particular, for the bundle of symmetric, covariant two-tensors on a manifold this solves the problem as to when a connection is locally metric. For connections satisfying a certain regularity requirement, the existence of a global parallel metric may be formulated in the setting of the cohomology of the constant sheaf of sections in the general linear group.
When the general linear group associated to the connection is one-dimensional the obstruction may be defined in terms of de Rham cohomology. Lastly, the difference between analytic and smooth connections is examined: whereas analytic connections are regular, the case of smooth connections is shown to possess a pathology in that a locally metric connection need not be globally metric, even on a contractible manifold.

Introduction
A connection on a manifold is a type of differentiation that acts on vector fields, differential forms and tensor products of these objects.
Its importance lies in the fact that given a piecewise continuous curve connecting two points on the manifold, the connection defines a linear isomorphism between the respective tangent spaces at these points.
Another fundamental concept in the study of differential geometry is that of a metric, which provides a measure of distance on the manifold. It is well known that a metric uniquely determines a Levi-Civita connection: a symmetric connection for which the metric is parallel.
Not all connections are derived from a metric and so it is natural to ask, for a symmetric connection, if there exists a parallel metric, that is, whether the connection is a Levi-Civita connection. More generally, a connection on a manifold M, symmetric or not, is said to be metric if there exists a parallel metric defined on M. Henceforth all manifolds are assumed to be connected since the question of the existence of a parallel metric on a manifold reduces to the corresponding problem on its connected components.
One may also be concerned with the possibility of local parallel metrics on the manifold. Specifically, a connection ∇ on M is locally metric at x ∈ M if there exists a neighbourhood U of x and a metric defined on U, which is parallel with respect to the connection restricted to U. ∇ is locally metric if it is locally metric at each point x ∈ M.
The investigation into whether a connection is metric comprises two aspects: first, the determination of the integrability conditions that ensure the existence of a local parallel metric in the neighbourhood of a given point and second, the characterization of the topological obstruction to a globally defined parallel metric.
In the next section it is determined when a connection on an arbitrary vector bundle possesses, locally, a non-trivial parallel section. This is accomplished by means of calculating a derived flag of subsets of the bundle. If the terminal subset W admits, locally, the structure of a non-zero vector bundle then local non-trivial parallel sections exist. By considering the vector bundle of symmetric, covariant twotensors on a manifold the question as to whether the connection is locally metric is answered. Section 3 considers the problem of the existence of a global parallel metric when W is a vector bundle of rank one over M. If ∇ is a locally metric connection then the existence of a global parallel metric may be expressed in terms of de Rham cohomology.
In the two sections following, the connection is required to be regular in the sense that W is a rank n vector bundle. As such it is a flat vector bundle with respect to the connection. It is known that the group of isomorphism classes of flat line bundles over a manifold is isomorphic to the first cohomology group of the constant sheaf of sections in the multiplicative group of non-zero complex numbers (cf. [2], 2.2.11. Theorem (3), pg. 76). In Section 4, this is generalized to the classification of flat vector bundles of arbitrary rank. This leads to the study of the cohomology H 1 (M, G n ) of the constant sheaf of sections in the general linear group GL(n, ℜ). In Section 5, the ques-tion as to whether a connection is metric is answered for the case of regular connections.
In the final section, the difference between analytic and smooth connections is explored. Analytic connections are always regular and so admit the cohomological description developed in the previous two sections. In particular, an analytic locally metric connection on an analytic simply-connected manifold is metric. This is not the case with smooth connections in general. We close with an example of a smooth locally metric connection on the plane, which is not globally metric. Thus even with contractible spaces the local parallel metrics might not piece together to yield a global parallel metric.
Similar work has been investigated in [1] in the case of surfaces and [3] for four-dimensional manifolds.

When is a connection locally metric?
We first consider the more general question as to when a connection on a vector bundle admits, locally, a non-trivial parallel section.
Let π : W → M be a vector bundle and W ′ a subset of W with the following two properties: P2: For each w ∈ W ′ there exists an open neighbourhood U of π(w) in M and a smooth local section X : be a connection on W , where A n (W ) denotes the space of local sections where W/W ′ is the quotient of W and W ′ taken fibrewise and φ : Let V be any subset of W satisfying P1. Define S(V ) to be the subset of V consisting of all elements v for which there exists a smooth local section X : U ⊆ M → V ⊆ W such that v = X(π(v)). Then S(V ) satisfies both P1 and P2.
We seek to construct the maximal flat subset W , of W . W may be obtained as follows. Set This gives a sequence of subsets of W . Note that W (i) is not necessarily a vector bundle over M since the dimension of the fibres may vary from point to point. For In order to extract information from W we need some concept of regularity. Accordingly, we say that the connection ∇ is regular at  (ii) Suppose that ∇ is regular at x ∈ M. Then for every w ∈ W x there exists a local parallel section X : U ⊆ M → W with X(x) = w. Proof: (i) follows directly from the definition of W .
(ii) Suppose that ∇ is regular at x ∈ M and let w ∈ W x . By regularity, there exists a neighbourhood U 1 of x and a frame (X 1 , ..., X n ) of By choosing a possibly smaller neighbourhood U 2 ⊆ U 1 of x we can extend (X 1 , ..., X n ) to a frame X := (X 1 , ..., X n , ..., X N ) . Since W has zero second fun- where φ is an n × n matrix of 1-forms. The curvature form Ω = Ω i j of ∇ with respect to X is Since the curvature tensor R is identically zero, when restricted to Therefore, by the Frobenius Theorem, there exists an n × n matrix of functions A = A i j defined in a neighbourhood U ⊆ U 2 of x such that dA = −φ ∧ A and A(x) = I n×n , the n × n identity matrix (cf. [5], chp. 7, 2. Proposition 1., pg. 290). Let c j , 1 ≤ j ≤ n, be real scalars q.e.d. The Frobenius Theorem, upon which Theorem 1 is based, has both smooth and real analytic versions. Therefore Theorem 1 and Corollaries 2, 3 and 4 may be interpreted either in the smooth or analytic contexts. Henceforth, however, manifolds and connections shall be assumed to be smooth unless explicitly stated to be analytic.
Example 1 Consider the symmetric connection ∇ on the 2-sphere, M = S 2 , defined as follows: Γ θ φφ = −sinθcosθ, Γ φ θφ = Γ φ φθ = cotθ and all other Christoffel symbols are zero. Here θ and φ are the polar and azimuthal angles on S 2 , respectively. Let This gives W (0) = span(X 1 + (sin 2 θ)X 2 ). Non-zero local sections of . Since W is a rank one vector bundle over S 2 it follows that ∇ is a locally metric connection. of M for which there exists a local parallel metric h α on U α , for each α ∈ A. Then h α is a local section: h α : U α → W + . Since W + is a rank one fibre bundle, s restricted to U α , denoted s α , must be of the form s α = f α h α for some smooth, positive function f α on U α . This allows us to define the 1-form Φ α on U α by the covariant derivative We may now state when ∇ is a metric connection. Proof: =⇒ Suppose that ∇ is a metric connection on M. That is, there exists a parallel metric s, which must be a section s : M → W + .
⇐= Suppose that Φ is exact. We may write Φ = df for some function q.e.d.
Example 1 continued A section of W + is given by s := X 1 + (sin 2 θ)X 2 . This defines the 1-form Φ = 0 which is trivially exact.
Therefore the connection ∇ is, in fact, a Levi-Civita connection on S 2 ; it is the Levi-Civita connection of the metric induced by the standard embedding of S 2 into ℜ 3 .

Classification of flat vector bundles
We have seen (Corollary 2) that for a regular connection ∇ on M, . Recall that the coboundary operators for non-abelian cohomology δ i : Equivalent elements are said to be cohomologous and the set of elements cohomologous to a is denoted [a]. The set of equivalence classes defines the first cohomology seť in general, but a pointed set with distinguished element 1 = 1 n . The first cohomology set is defined to be the direct limit Therefore t is a 1-cocycle and thus defines an element τ : The element t ′ ∈ C 1 (U ′ , G n ) giving the change of basis over non-empty intersections Hencet ′ is cohomologous tot inȞ 1 (V, G n ) and so τ ′ = τ in H 1 (M, G n ). Therefore Θ is well-defined.
(ii) Let θ ∈ H 1 (M, G n ). θ is represented by a 1-cocycle t ∈ C 1 (U, G n ), for some cover U = {U α : α ∈ A} of M. The elements t αβ are the locally constant transition functions of an associated rank n real vector bundle π : E → M. On each π −1 (U α ) there is a canonical basis e αi , 1 ≤ i ≤ n, of vector fields on U α and on U αβ := U α ∩ U β these bases tranform according to e αi| U αβ = n j=1 (t αβ ) ij e βj| U αβ . Define a connection ∇ α on U α by ∇ α e αi = 0, for 1 ≤ i ≤ n. Since the t αβ are locally constant, ∇ α = ∇ β when restricted to U αβ . Therefore there exists a flat connection ∇ defined on E whose restriction to U α is ∇ α .
Note that triviality of the vector bundle E does not imply that Θ(ξ) = 1; E must satisfy the stronger requirement of possessing a parallel frame. This is illustrated in the following example. for 0 ≤ m ≤ n. This induces an embedding of sheaves ι : G m → G n .
which determines an element [ι(a)] ∈ H 1 (M, G n ). If two cocycles, H 1 (M, G n ). Therefore ι defines a mapι : .ι is not necessarily injective since cocycles that are not cohomologous in H 1 (M, G m ) may be cohomologous in We have a sequence of subsets Define the rank of an element σ ∈ H 1 (M, G n ) to be n − m, where m is the least non-negative integer for which σ ∈ H 1 m . For instance, rank 1 = n. This appellation will be justified below.
is given by t = ι(a) for some a ∈ C 1 (U, G n−m ). Therefore, restricted to U αβ , h αi| U αβ = h βi| U αβ for all 1 ≤ i ≤ m. It follows that there exist m independent global parallel sections s 1 , ..., s m whose restriction to U α is s i| Uα = h αi . This demonstrates the following lemma.
The theorem below relates the number of independent parallel metrics of a regular metric connection ∇ to the associated cohomology.
Theorem 14 If ∇ is a regular metric connection then rank W M = rank W S = rank τ .
Let W ∇ denote the trivial subbundle of W S generated by the h αi for 1 ≤ i ≤ m and α ∈ A.
Proposition 15 W ∇ is well-defined.

Proof:
Suppose that τ is represented by another element t ′ = ι(a ′ ), where

Proof:
Suppose ∇ is a metric connection. By Theorem 14, rank W S = m.
But W ∇ is a rank m subbundle of W S and so W ∇ = W S , which equals W M by Lemma 11.
We may now determine when a regular connection is a metric connection. q.e.d.
It is worthwhile comparing Theorem 17 and Corollary 4. W ∇ plays the analogous role, in the global context, to W x in the local problem.
In both cases, metricity of the connection is determined by the existence of a positive-definite bilinear form in the relevent space. There is a fundamental distinction, however: W x is obtained by algebraic solution to homogeneous linear systems, whereas W ∇ , on the other hand, must be found by integration of differential equations.
Example 3 Consider the symmetric connection ∇ on the punctured plane M = ℜ 2 − {(0, 0)}, given by Γ r θθ = −k 2 r, Γ θ rθ = Γ θ θr = 1 r and all other Christoffel symbols equal to zero. 0 < r < ∞ is the radial distance, 0 ≤ θ < 2π is the planar angle and k is a non-half-integer constant. ∇ is flat and so W = W (0) is a rank three vector bundle over M spanned by which is equivalent to a system of six partial differential equations in the three unknown functions f 1 , f 2 , and f 3 . These are readily integrated to yield three independent local parallel sections: for 1 ≤ i ≤ 3, where 0 < θ < 2π and π < θ ′ < 3π are coordinates on U 1 and U 2 , respectively. The transition between the h 1i and h 2j on The image of t in H 1 (M, G 3 ) defines the cohomology class associated to the connection: τ = [t] ∈ H 1 2 ⊆ H 1 (M, G 3 ).
An example of a flat non-metric connection on the torus may be found in [4], Example 4.2, pg. 211.

Analytic versus smooth connections
In this final section we consider the differences between smooth and analytic connections.
Proposition 18 Let ∇ be a regular, locally metric connection on a simply-connected manifold M. Then ∇ is a metric connection. Furthermore, there exist rank W independent parallel metrics on M. Proof: By Corollary 9, τ = 1 and so W ∇ = W S = W , which contains a positive-definite bilinear form since ∇ is a locally metric connection.
By Theorem 17, ∇ is metric and by Lemma 11, rank W M = rank W . q.e.d.
The regularity requirement is superfluous, however, for analytic connections.

Lemma 19
If ∇ is an analytic connection on an analytic manifold M then W is a vector bundle over M.
Proof: Consider two open sets U x and U y in U with non-empty intersection U x ∩ U y . Each h xi extends, by analytic continuation, to an analytic metric h ′ xi on U x ∪ U y . Since ∇ is analytic, so is ∇h ′ xi . Restricted to U x , ∇h ′ xi| Ux = 0 and hence, by analyticity, ∇h ′ xi = 0 on all of U x ∪ U y . Therefore h ′ xi| Uy are N x independent local parallel metrics on U y . This shows that N x ≤ N y by the maximal cardinality requirement. By symmetry N y ≤ N x and so N x = N y . Since M is assumed to be a connected manifold N x is independent of x and equals the dimension of the fibres of W over M. The fibre bundle structure of W is supplied by the transition functions between the local bases h xi . q.e.d.
Corollary 20 Let ∇ be an analytic locally metric connection on an analytic simply-connected manifold M. Then ∇ is a metric connection. Furthermore, there exist rank W independent parallel metrics on M.
Analyticity is essential in the above corollary; it is not true for smooth connections as the following example shows.
x < x 0 x 0 ≤ x ≤ x 1 x > x 1 and all other Christoffel symbols equal to zero. ∇ is a locally metric connection: for x < x 1 , the parallel metrics are c(dx 2 + f (x)dy 2 ), and for x > x 0 , the parallel metrics are c(dx 2 + h(x)dy 2 ), where c is an arbitrary positive constant. Since a = b, elements of these two sets cannot be joined together to give a global parallel metric. Therefore ∇ is not a metric connection on ℜ 2 .
Observe that W is not a fibre bundle as the dimension of the fibres of W varies over the manifold: on x ≤ x 0 , dim W x = 1, on x 0 < x < x 1 , dim W x = 3 and on x ≥ x 1 , dim W x = 1. This behaviour prevents the formulation of the global existence problem in terms of a sheaf cohomology of groups.