Combinatorial QFT on graphs: first quantization formalism

We study a combinatorial model of the quantum scalar field with polynomial potential on a graph. In the first quantization formalism, the value of a Feynman graph is given by a sum over maps from the Feynman graph to the spacetime graph (mapping edges to paths). This picture interacts naturally with Atiyah-Segal-like cutting-gluing of spacetime graphs. In particular, one has combinatorial counterparts of the known gluing formulae for Green's functions and (zeta-regularized) determinants of Laplacians.

In this paper we study a combinatorial model of the quantum massive scalar field with polynomial potential on a spacetime given a by a graph X. Our motivation to do so was the study of the first quantization formalism, that we recall in Section 1.1 below, and in particular its interplay with locality, i.e. cutting and gluing of the spacetime manifold. At the origin is the Feynman-Kac formula (4) for the Green's function of the kinetic operator. In case the spacetime is a graph, this formula has a combinatorial analog given by summing over paths with certain weights (see Section 5). These path sums interact very naturally with cutting and gluing, in a mathematically rigorous way, see Theorem 3.8 and its proof from path sum formulae 5.5.
A second motivation to study this model was the notion of (extended) functorial QFTs with source a Riemannian cobordism. Few examples of functorial QFTs out of Riemannian cobordism categories exist, for instance [15], [16], [21]. In this paper, we define a graph cobordism category and show that the combinatorial model defines a functor to the category of Hilbert spaces (Section 2.1). We also propose an extended cobordism (partial) ncategory of graphs and a functor to a target n-category of commutative algebras defined by the combinatorial QFT we are studying (Section 2.2).
Finally, one can use this discrete toy model to approximate the continuum theory, which in this paper we do only in easy one-dimensional examples (see Section 3.4). We think that the results derived in this paper will be helpful to study the interplay between renormalization and locality in higher dimensions (the two-dimensional case was discussed in detail in [16]).
1.1. Motivation: first quantization formalism. We outline the idea of the first quantization picture in QFT in the example of the interacting scalar field. 1 Consider the scalar field theory on a Riemannian n-manifold M perturbed by a polynomial potential p(ϕ) = k≥3 p k k! ϕ k , defined by the action functional (1) S(ϕ) = M 1 2 ϕ(∆ + m 2 )ϕ + p(ϕ) d n x.
Here ϕ ∈ C ∞ (M ) is the field, ∆ is the Laplacian determined by the metric, m > 0 is the mass parameter and d n x denotes the metric volume element. The partition function is formally given by a (mathematically ill-defined) functional integral understood perturbatively as a sum over Feynman graphs Γ, 2 Here det ζ is the functional determinant in zeta function regularization. The weight Φ Γ of a Feynman graph is the product of Green's functions G(x, y) of the kinetic operator ∆ + m 2 associated with the edges of Γ, integrated over ways to position vertices of Γ at points of M (times the vertex factors, a symmetry factor and a loop-counting factor): ). 1 We refer the reader to the inspiring exposition of this idea in [10,Section 3.2]. 2 In this discussion we will ignore the issue of divergencies and renormalization.
Here V, E are the set of vertices and the set of edges of Γ, respectively. Next, one can understand the kinetic operator ∆+m 2 = : H as a quantum Hamiltonian of an auxiliary quantum mechanical system with Hilbert space L 2 (M ). Then, one can write the Green's function G(x, y) as the evolution operator of this auxiliary system integrated over the time of evolution: Replacing the evolution operator (a.k.a. heat kernel) with its Feynman-Kac path integral representation, one has (4) G(x, y) = Dγ e −S 1q (γ) .
Here Γ t 1 ,...,t |E| is the graph Γ seen as a metric graph with t e the length of edge e. The outer integral is over metrics on Γ, the inner (path) integral is over maps γ γ γ of Γ to M , sending vertices to points of M and edges to paths connecting those points; S 1q (γ γ γ) is understood as a sum of expressions in the r.h.s. of (5) over edges of Γ. We refer to the formula (6), representing the weight of a Feynman graph via an integral over maps Γ → M (or, equivalently, as a partition function 3 The action (5) can be obtained from the short-time asymptotics (Seeley-DeWitt expansion) of the heat kernel κ(x, y; t) = ⟨x|e −t H |y⟩ ∼ (1 + b2(x, y)t + b4(x, y)t 2 +· · · ), with b 2k smooth functions on M ×M (in particular, on the diagonal), with b2(x, x) = −m 2 + 1 6 R(x); d(x, y) is the geodesic distance on M , see e.g. [26]. One then has κ(x, y; t) = lim N →∞ M ×(N −1) d n xN−1 · · · d n x1κ(xN = x, xN−1; δt) · · · κ(x2, x1; δt)κ(x1, x0 = y; δt) = lim one recognizes the path integral of (4) written as a limit of finite-dimensional integrals (cf. [12]). We denoted δt = t/N . of an auxiliary 1d sigma model on the graph Γ with target M ), as the "first quantization formula." 4 Remark 1.1. It is known that 1 6 R appears in the quantum Hamiltonian of the quantum mechanical system of a free particle on a closed Riemannian manifold M , see for example [1,27]. Here, the difference is that 1 6 R is introduced in the classical action (5) so that ∆ + m 2 is the quantum Hamiltonian.
Remark 1.2. One can absorb the determinant factor in the r.h.s. of (2) into the sum over graphs, if we extend the set of graphs Γ to allow them to have circle connected components (with no vertices), with the rule where the integral in t is understood in zeta-regularized sense; S 1 t = R/tZ is the circle of perimeter t.
Here Map(I, M ) x,y is the space of paths γ : I → M from x to y; the exponent in the integrand is (9)S 1q (γ, ξ) = I 1 4 (ξ −1 ⊗ γ * g)(dγ, dγ) + m 2 − 1 6 R(γ) dvol ξ with dvol ξ the Riemannian volume form of I induced by ξ. Note that the action (9) is invariant under diffeomorphisms of I. One can gauge-fix this symmetry by requiring that the metric ξ is constant on I, then one is left with integration over the length t of I w.r.t. the constant metric; this reduces the formula (8) back to (4). In (8), the Green's function of the original theory on M is understood in terms of a 1d sigma-model on I with target M coupled to 1d gravity. For a Feynman graph, similarly to (6), one has -the partition function of 1d sigma model on the Feynman graph Γ coupled to 1d gravity on Γ;S 1q (γ γ γ, ξ ξ ξ) is understood as a sum of terms (9) over the edges of Γ. 5 1.1.2. Heuristics on locality in the first quantization formalism. Suppose that we have a decomposition M = M 1 ∪ Y M 2 of M into two Riemannian manifolds M i , with common boundary Y . Then locality of quantum field theory -or, a fictional "Fubini theorem" for the (also fictional) functional integral -suggests a gluing formula (11) Z M = " where Z M i is a functional of C ∞ (Y ), again formally given by a functional integral understood as a sum over Feynman graphs, 6 where we are putting Dirichlet boundary conditions on the kinetic operator.
Feynman graphs now have bulk and boundary vertices, where boundary vertices are required to be univalent. The set of edges then decomposes as where G M i ,Y denotes the Green's function of the operator with Dirichlet boundary conditions, E Y,M i (x, y) = ∂ ny G(x, y) is the normal derivative of the Green's function at a boundary point y ∈ Y , and DN Y,M i is the Dirichletto-Neumann operator associated to the kinetic operator (see Section 3.4 for details). Let us sketch an interpretation of the gluing formula for the Green's function from the standpoint of the first quantization formalism. Let x ∈ M 1 , y ∈ M 2 and consider a path γ : [0, t] → M with γ(0) = x and γ(t) = y. Then quotient by Diff(Γ) as first a quotient by the connected component of the identity map Diff0(Γ) and then a quotient by the mapping class group π0Diff(Γ) = Aut(Γ).
One can interpret the 1/t factor in the r.h.s. of (7) in a similar fashion: Diff(S 1 ) splits as Diff(S 1 , pt) × S 1 -diffeomorphisms preserving a marked point on S 1 , plus an extra factor S 1 corresponding to rigid rotations (moving the marked point). It is that extra S 1 factor that leads to the factor 1/t = 1/vol(S 1 ) in the integration measure over t. The factor 1/2 in (7) comes by the previous mechanism from the mapping class group Z2 of S 1 (orientation preserving/reversing diffeomorphisms up to isotopy). 6 Again, for the purpose of this motivational section we are not discussing the problem of divergencies and renormalization. For n = dim M = 2, a precise definition of all involved objects and a proof of the gluing formula (11) can be found in [16].
the decomposition M = M 1 ∪ Y M 2 induces a decomposition γ = γ 1 * γ 2 * γ 3 as follows (" * " means concatenation of paths). Let t 0 = 0, This gives a decomposition where we have introduced the notation P M (x, y) for the set of all paths from x to y (of arbitrary length) and P ′ M i (x, u) for the set of all paths starting at x ∈ M i and ending at u ∈ Y and not intersecting Y in between. See Figure  1.
Paths of a specific length t will be denoted P t M (x, y), or (P ′ M ) t (x, u). Assuming a Fubini theorem for the path measure Dγ, additivity of the action suggests that we could rewrite (4) as Comparing with the gluing formula for the Green's function 7 with κ Y,M = (DN Y,M 1 + DN Y,M 2 ) −1 the inverse of the "total" Dirichletto-Neumann operator, suggests the following path integral formulae for the extension operator and κ: The results of our paper 8 actually suggest also the following path integral formula for the Dirichlet-to-Neumann operator: Dγ e −S 1q (γ) .
∈ Y for all 0 < τ < t. Assuming these formulae, we have again a "first quantization formula" for weights of Feynman graphs with boundary vertices Here notation is as in (6), the only additional condition is that γ γ γ respects the type of edges in Γ, that is, for all QFT on a graph. A guide to the paper. In this paper we study a toy ("combinatorial" or "lattice") version of the scalar field theory (1), where the spacetime manifold M is replaced by a graph X, the scalar field ϕ is a function on the vertices of X and the Laplacian in the kinetic operator is replaced by the graph Laplacian ∆ X . I.e., the model is defined by the action where V X is the set of vertices of X and p is the interaction potential (a polynomial of ϕ), as before. This model has the following properties.
(i) The "functional integral" over the space of fields is a finite-dimensional convergent integral (Section 2). (ii) The functional integral can be expanded in Feynman graphs, giving an asymptotic expansion of the nonperturbative partition function in powers of ℏ (Section 4). (iii) Partition functions are compatible with unions of graphs over a subgraph ("gluing") -we see this as a graph counterpart of Atiyah-Segal functorial picture of QFT, with compatibility w.r.t. cutting-gluing nmanifolds along closed (n − 1)-submanifolds. This functorial property of the graph QFT can be proven 8 Another reason to guess that formula is the fact that the integral kernel of the Dirichlet-to-Neumann operator is given by a symmetric normal derivative of the Green's function DNY,M i (u, v) = −∂n u ∂n v GM i ,Y (in a regularized sense -see [16,Remark 3.4]), and formula (16) for the first normal derivative of the Green's function.
(a) directly from the functional integral perspective (by a Fubini theorem argument) -Section 2.1, or (b) at the level of Feynman graphs (Section 4.2). The proof of functoriality at the level of Feynman graphs relies on the "gluing formulae" describing the behavior of Green's functions and determinants w.r.t. gluing of spacetime graphs (Section 3.3). These formulae are a combinatorial analog of known gluing formulae for Green's functions and zeta-regularized functional determinants on manifolds (Section 3.4). (iv) The graph QFT admits a higher-categorical extension which allows cutting-gluing along higher-codimension "corners" 9 (Section 2.2), in the spirit of Baez-Dolan-Lurie extended TQFTs. (v) The Green's function on a graph X can be written as a sum over paths (Section 5, in particular Table 4), giving an analog of the formula (4); similarly, the determinant can be written as a sum over closed paths, giving an analog of (7). This leads to a "first-quantization" representation of Feynman graphs, as a sum over maps Γ → X, sending vertices of Γ to vertices of X and sending edges of Γ to paths on X (connecting the images of the incident vertices) -Section 6. This yields a graph counterpart of the continuum first quantization formula (6). (vi) There are path sum formulae for the combinatorial extension (or "Poisson") operators and Dirichlet-to-Neumann operators (Section 5.4, see in particular Table 5), analogous to the path integral formulae (16) and (18). (vii) First quantization perspective gives a visual interpretation of the gluing formula for Green's functions and determinants on a graph X = X ′ ∪ Y X ′′ in terms of cutting the path into portions spent in X ′ or in X ′′ (Section 5.5), and likewise an interpretation of the cutting-gluing of Feynman graphs (Section 6.3).
Remark 1.3. A free (Gaussian) version of the combinatorial model we are studying in this paper was studied in [23]. Our twist on it is the deformation by a polynomial potential, the path-sum (first quantization) formalism, and the gluing formula for propagators (the BFK-like gluing formula for determinants was studied in [23]).
1.3. Acknowledgements. We thank Olga Chekeres, Andrey Losev and Donald R. Youmans for inspiring discussions on the first quantization approach in QFT. I.C., P.M. and K.W. would like to thank the Galileo Galilei Institute, where part of the work was completed, for hospitality. 9 "Corners" in the graph setting are understoodà laČech complex, as multiple overlaps of "bulk" graphs.

Notation Description
The propagator or Green's function of the kinetic operator K X , integral kernel (matrix) of The extension operator (also known as Poisson operator): extends a field ϕ Y into bulk X as a solution of Dirichlet problem DN Y,X Dirichlet-to-Neumann operator S X Action functional on the space of fields on X S 1q The set of h-paths in X joining u to v P Γ

X
The set of edge-to-path maps from Γ to X Π Γ X The set of edge-to-h-path maps from Γ to X deg(γ) The number of jumps in an h-pathγ l(γ) The length of a path (or h-path) γ h(γ) The number of hesitations of an h-pathγ s(γ) Weight of an h-path,

Scalar field theory on a graph
Let X be a finite graph. Consider the toy field theory on X where fields are real-valued functions ϕ(v) on the set of vertices V X , i.e., the space of fields is the space of 0-cochains on X seen as a 1-dimensional CW complex, We define the action functional as Here: • d : C 0 (X) → C 1 (X) is the cellular coboundary operator (we assume that 0 cells carry + orientation and 1-cells carry some orientationthe model does not depend on this choice). • (, ) : Sym 2 C k (X) → R for k = 0, 1 is the standard metric, in which the cell basis is orthonormal. • ⟨, ⟩ is the canonical pairing of chains and cochains; µ is the 0-chain given by the sum of all vertices with coefficient 1. 10 • m > 0 is the fixed "mass" parameter.
• p(ϕ) is a fixed polynomial ("potential"), More generally, p(ϕ) can be a real analytic function. We will assume that m 2 2 ϕ 2 + p(ϕ) has a unique absolute minimum at ϕ = 0 and that it grows sufficiently fast 11 at ϕ → ±∞, so that the integral (23) converges measure-theoretically.
is the dual (transpose) map to the coboundary operator (in the construction of the dual, one identifies chains and cochains using the standard metric). The matrix elements of ∆ X in the cell basis, for X a simple graph (i.e. without double edges and short loops), are We will be interested in the partition function is the "functional integral measure" on the space of fields F X (in this case, just the Lebesgue measure on a finite-dimensional space); ℏ > 0 is the parameter of quantization -the "Planck constant." 12 The integral in the 10 The 0-chain µ is an analog of the volume form on the spacetime manifold in our model.
If we want to consider the field theory on X as a lattice approximation of a continuum field theory, we would need to scale the metric (, ) and the 0-chain µ appropriately with the mesh size. Additionally, one would need to add mesh-dependent counterterms to the action in order to have finite limits for the partition function and correlators. 11 Namely, we want the integral R dϕ e − 1 ℏ ( m 2 2 ϕ 2 +p(ϕ)) to converge for any ℏ > 0. 12 Or one can think of ℏ as "temperature" if one thinks of (23) as a partition function of statistical mechanics with S the energy of a state ϕ. r.h.s. of (23) is absolutely convergent. One can also consider correlation functions (24) ⟨ϕ Remark 2.1. We stress that in this section we consider the nonperturbative partition functions/correlators and ℏ is to be understood as an actual positive number, unlike in the setting of perturbation theory (Section 4) where ℏ becomes a formal parameter. Remark 2.2. In this paper we use the Euclidean QFT convention for our (toy) functional integrals, with the integrand e − 1 ℏ S instead of e i ℏ S , in order to have a better measure-theoretic convergence situation. The first convention leads to absolutely convergent integrals whereas the second leads to conditionally convergent oscillatory integrals. Here in the source category GraphCob is as follows: • The objects are graphs Y .
• A morphism from Y in to Y out is a graph X which contains Y in and Y out as disjoint subgraphs. We will write Y in X − → Y out and refer to Y in , Y out as "ends" (or "boundaries") of X, or we will say that X is a "graph cobordism" between Y in and Y out .
• The composition is given by unions of graphs with out-end of one cobordism identified with the in-end of the subsequent one: The monoidal structure is given by disjoint unions of graphs. All graphs are assumed to be finite. As defined, GraphCob does not have unit morphisms (as usual for spacetime categories in non-topological QFTs); by abuse of language, we still call it a category.
The target category Hilb has as its objects Hilbert spaces H over C; 14 the morphisms are Hilbert-Schmidt operators; the composition is composition of operators. The monoidal structure is given by tensor products (of Hilbert spaces and of operators).
The functor (25) is constructed as follows. For an end-graph Y ∈ Ob(GraphCob), the associated vector space is (27) H Y = L 2 (C 0 (Y )) 13 This terminology is taken from [22]. 14 Alternatively (since we do not put i in the exponent in the functional integral), one can consider Hilbert spaces over R.
-the space of complex-valued square-integrable functions on the vector space with the integral kernel (29) Here is the space of fields on X subject to boundary conditions ϕ in , ϕ out imposed on the ends, i.e., it is the fiber of the evaluationat-the-ends map stands for the "conditional functional measure" on fields subject to boundary conditions. We will also call the expression (29) the partition function on the graph X "relative" to the ends Y in , Y out , or just the partition function relative to the "boundary" subgraph Y = Y in ⊔Y out , if the distinction between "in" and "out" is irrelevant. In the latter case we will use the notation Z X,Y (ϕ Y ), with ϕ Y = (ϕ in , ϕ out ). Proof. The main point to check is that composition is mapped to composition. It follows from Fubini theorem, locality of the integration measure (that it is a product over vertices of local measures) and additivity of the action: in the notations of (26). Indeed, it suffices to prove -again, we are considering the gluing of graph cobordisms as in (26). The l.h.s. is which proves (31). Here we understood that ϕ is a field on the glued cobordism X restricting to ϕ ′ , ϕ ′′ on X ′ , X ′′ , respectively. Compatibility with disjoint unions is obvious by construction. □ Remark 2.4. One can interpret the correlator (24) as the partition function of X seen as a cobordism {v 1 , . . . , v n } X − → ∅ applied to the state ϕ(v 1 ) ⊗ · · · ⊗ ϕ(v n ) ∈ H {v 1 ,...,vn} .
Remark 2.5. The combinatorial model we are presenting is intended to be an analog (toy model) of the continuum QFT, according to the dictionary of Table 2. combinatorial QFT continuum QFT graph X closed spacetime n-manifold M ; (23) functional integral on a closed manifold; graph cobordism Y in X − → Y out n-manifold M with in/out-boundaries being closed (n − 1)-manifolds γ in , γ out ; gluing/cutting of graph cobordisms gluing/cutting of smooth n-cobordisms; matrix element (29) functional integral with boundary conditions ϕ in , ϕ out . Table 2. Comparison between toy model and continuum QFT.
When we want to emphasize that a graph X is not considered as a cobordism (or equivalently X is seen as a cobordism ∅ X − → ∅), we will call X a "closed" graph (by analogy with closed manifolds).

2.2.
Aside: "QFT with corners" (or "extended QFT") picture. Fix any n ≥ 1. We will describe a (tautological) extension of the functorial picture above for our graph model as an n-extended QFT (with gluing/cutting along "corners" of codimension up to n), in the spirit of Baez-Dolan-Lurie program [2], [18] of extended topological quantum field theories. 15 One has a functor of symmetric monoidal n-categories We proceed to describe its ingredients.
2.2.1. Source n-category. The source n-category GraphCob n is as follows.
• Objects (a.k.a. 0-morphisms) are graphs X [0] (the index in brackets is to emphasize that this is a graph at categorical level 0).
is a graph X [1] together with graph embeddings of Y satisfying the following "maximal disjointness" assumption: in the resulting diagram of graph embeddings is the union of images of A  in GraphCob 2 : Figure 2. An example of a 2-morphism in GraphCob 2 .
The monoidal structure in GraphCob n is given by disjoint unions at each level, and the composition is given by unions (pushouts) X Remark 2.7. In GraphCob n we only consider "vertical" compositions of kmorphisms, i.e., one can only glue two level k graphs over a level k −1 graph, not over any graph at level k ′ < k (otherwise, the composition would fail the maximal disjointness assumption). One might call this structure a "partial" n-category 16 (but by abuse of language we suppress "partial"). On a related point, as in Section 2.1, there are no unit k-morphisms.

2.2.2.
Target n-category. The target n-category T n is as follows.
• Objects are commutative unital algebras over C ("CUAs") . This map is not required to be an algebra morphism. The monoidal structure is given by tensor product at all levels. The composition of n-morphisms is the composition of linear maps. The composition of k-morphisms for k < n is given by the balanced tensor product of algebras over a subalgebra,
) is mapped to the commutative unital algebra of functions on 0-cochains on the graph with algebra maps from functions on 0-cochains of Y Here i * 1,2 is the restriction of a 0-cochain (field) from , and (i * 1,2 ) * is the pullback by this restriction map.
out ) defined by a variant of (28), (29) allowing the in-and out-boundaries to intersect: Here we suppressed the superscripts [· · · ] for X, Y to lighten the notation. 16 Or a "Pickwickian n-category." (Cf. "He had used the word in its Pickwickian sense. . . He had merely considered him a humbug in a Pickwickian point of view." Ch. Dickens, Pickwick Papers.) It is a straightforward check (by repeating the argument of Proposition 2.3) that formula (34) is compatible with gluing (vertical composition) of n-morphisms in GraphCob n , see Figure 3. In this language, if we relabel our graphs by categorical co-level, X {k} : = X [n−k] , we should think of graphs X {0} as "bulk," graphs X {1} as "boundaries," graphs X {2} as "codimension 2 corners," etc. Remark 2.9. We also remark that one can consider a different (simpler) version of the source category -iterated cospans of graphs w.r.t. graph inclusions, without any disjointness conditions. While this n-category is simpler to define and admits non-vertical compositions, it has less resemblance to the extended cobordism category, as here the intersection of strata of codimensions k and l can have codimension less than k + l.
Remark 2.10. Note that the most interesting part of the theory is concentrated in the top component of the functor (partition functions Z) -e.g., the interaction potential p(ϕ) only affects it, not the spaces of states H [k] . This is why we emphasize (cf. footnote 15) that there is no analog of the cobordism hypothesis in our model: one cannot recover the entire functor (in particular, the top component) from its bottom component.
This situation is similar to another example of an extended geometric (non-topological) QFT -the 2D Yang-Mills theory. In this case, the area form affects the QFT 2-functor only at the top-dimension stratum (and thus "obstructs" the cobordism hypothesis), cf. [14].
Remark 2.11. The case n = 1 of the formalism of this section is slightly (inconsequentially) different from the non-extended functorial picture of Section 2.1, with target category T 1 instead of Hilb, with boundaries mapped to algebras of smooth functions on boundary values of fields rather than Hilbert spaces of L 2 functions of boundary values of fields.
In the extended setting, we cannot use L 2 functions for two reasons: (a) they don't form an algebra and (b) the pullback (33) of a function of field values on codim=2 corner vertices to a codim=1 boundary is generally not square integrable. (i.e. our QFT functor applied to the inclusion of a corner graph into the boundary graph does not land in the L 2 space).

Gaussian theory
3.1. Gaussian theory on a closed graph. Consider the free case of the model (21), with the interaction p(ϕ) set to zero. The action is quadratic where the kinetic operator is it is a positive self-adjoint operator on F X . Let us denote its inverse -the "Green's function" or "propagator;" we will denote matrix elements of G X in the basis of vertices by The partition function (23) for a closed graph X is the Gaussian integral The correlator (24) is given by Wick's lemma, as a moment of the Gaussian measure: The kinetic operator is Its determinant is: and the inverse is (38) Example 3.2. Consider the line graph of length N : The kinetic operator is the tridiagonal matrix The matrix elements of its inverse are: 17 (39) where β is related to m by The determinant is: The kinetic operator is: . 17 One finds this by solving the finite difference equation −G(i+1, j)+(2+m 2 )G(i, j)− G(i−1, j) = δij, using the ansatz G(i, j) = A+e βi +A−e −βi for i ≤ j and G(i, j) = B+e βi + B−e −βi for i ≥ j, with A±, B± some coefficients depending on j. One imposes singlevaluedness ("continuity") at i = j and "Neumann boundary conditions" G(0, j) = G(1, j), G(N, j) = G(N + 1, j), which -together with the original equation at i = j -determines uniquely the solution. One can obtain the determinant from the propagator using the (We are only writing the nonzero entries.) Its inverse is given by Here β is as in (40). The determinant is: For instance, for N = 3 we obtain

3.2.
Gaussian theory relative to the boundary. Consider the Gaussian theory on a graph X with "boundary subgraph" Y ⊂ X.
3.2.1. Dirichlet problem. Consider the following "Dirichlet problem." For a fixed field configuration on the boundary ϕ Y ∈ F Y , we are looking for a field configuration on X, ϕ ∈ F X such that Equivalently, we are minimizing the action (35) on the fiber F ϕ Y X of the evaluation-on-Y map F X → F Y over ϕ Y . The solution exists and is unique due to convexity and nonnegativity of S X .
Let us write the inverse of K X as a 2 × 2 block matrix according to partition of vertices of X into (1) not belonging to Y ("bulk vertices") or (2) belonging to Y ("boundary vertices"): Note that this matrix is symmetric, so A and D are symmetric and C = B T . Then, we can write the solution of the Dirichlet problem as follows: (47) implies Therefore, ξ = D −1 ϕ Y and the solution of the Dirichlet problem is

3.2.2.
Dirichlet-to-Neumann operator. Note also that the evaluation of the action S X on the solution of the Dirichlet problem is The map sending ϕ Y to the corresponding ξ (i.e. the kinetic operator evaluated on the solution of the Dirichlet problem) is a combinatorial analog of the Dirichlet-to-Neumann operator. 18 We will call the operator 19 Recall (see e.g. [16]) that in the continuum setting, the action of the free massive scalar field on a manifold with boundary, evaluated on a classical solution with Dirichlet boundary condition ϕ ∂ is ∂X Comparing with (50) reinforces the idea that is reasonable to call D −1 the Dirichlet-to-Neumann operator.
We will denote the operator BD −1 appearing in (49) by -the "extension" operator (extending ϕ Y into the bulk of X as a solution of the Dirichlet problem). 20

Partition function and correlators (relative to a boundary subgraph).
Let us introduce a notation for the blocks of the matrix K X corresponding to splitting of the vertices of X into bulk and boundary vertices, similarly to (48): The partition function relative to Y (cf. (29)) is again given by a Gaussian integral The normalized correlators (depending on the boundary field ϕ Y ) are as follows. 18 Recall that in the continuum setting, for X a manifold with boundary, the Dirichletto-Neumann operator DN : C ∞ (∂X) → C ∞ (∂X) maps a smooth function ϕ ∂ to the normal derivative ∂nϕ(x) on ∂X of the solution ϕ of the Helmholtz equation (∆ + m 2 )ϕ = 0 subject to Dirichlet boundary condition ϕ| ∂ = ϕ ∂ . 19 We put the subscripts in DNY,X to emphasize that we are extending ϕY into X as a solution of (47). When we will discuss gluing, the same Y can be a subgraph of two different graphs X ′ , X ′′ ; then it is important into which graph we are extending ϕY . 20 In [23], this operator is called the Poisson operator.
stands for an object on X relative to Y . 22 On the other hand, the subscript Y, X (as in DN Y,X , E Y,X ) refers to an object related to extending a field on Y to a classical solution in the "bulk" X.

Examples.
Example 3.5. Consider the graph X shown in Figure 7 below, relative the subgraph Y consisting solely of the vertex 2. The full kinetic operator is The inverse of the full kinetic operator is The DN operator is the inverse of the bottom right block: DN Y,X = m 2 (2+m 2 ) 1+m 2 and the extension operator (51) is E Y,X = 1 1+m 2 . 21 When specifying that a vertex v is in VX \ VY we will use a shorthand and write v ∈ X \ Y . 22 I.e. we think of (X, Y ) as a pair of 1-dimensional CW complexes, where "pair" has the same meaning as in, e.g., the long exact sequence in cohomology of a pair.
In particular, the relative partition function is Example 3.6. Consider the line graph of length N relative to the subgraph consisting of the right endpoint Y = {N } ( Figure 8). Figure 8. A line graph relative to one endpoint.
The relative propagator is with β as in (40). The DN operator is the inverse of the N − N block (element) of the absolute propagator (39): .

The extension operator is
Example 3.7. Consider again the line graph, but now relative to both left and right endpoints, see Figure 9 below. Then we have: 3.3. Gluing in Gaussian theory. Gluing of propagators and determinants.
3.3.1. Cutting a closed graph. Consider a closed graph X = X ′ ∪ Y X ′′ obtained from graphs X ′ , X ′′ by gluing along a common subgraph X ′ ⊃ Y ⊂ X ′′ .
The propagator on X is expressed in terms the data (propagators, DN operators, extension operators) on X ′ , X ′′ relative to Y as follows.
• For both vertices v 1 , v 2 ∈ X ′ : For both vertices in X ′′ , the formula is similar. Here the total DN operator is and similarly for v 1 ∈ X ′′ , v 2 ∈ X ′ . (b) The determinant of K X is expressed in terms of the data on X ′ , X ′′ relative to Y as follows: We will give three proofs of these gluing formulae: (1) From Fubini theorem for the "functional integral" (QFT/second quantization approach). (2) From inverting a 2 × 2 block matrix via Schur complement and Schur's determinant formula. (3) From path counting (first quantization approach) -later, in Section 5.5.
3.3.2. Proof 1 ("functional integral approach"). First, consider the partition function on X relative to Y : Comparing the r.h.s. with (53) as functions of ℏ, we obtain the formula (63) for the total DN operator and the relation for determinants The partition function on X can be obtained by integrating (66) over the field on the "gluing interface" Y : Comparing the r.h.s. with (36), we obtain the gluing formula for determinants (65). Next, we prove the gluing formula for propagators thinking of them as 2-point correlation functions. We denote by ≪ · · · ≫ correlators not normalized by the partition function. Consider the case v 1 , v 2 ∈ X ′ . We have This proves the gluing formula (62).
Finally, consider the case v 1 ∈ X ′ , v 2 ∈ X ′′ . By a similar computation we find This proves (64).
3.3.3. Proof 2 (Schur complement approach). Let us introduce the notations for the extension of the propagator on X relative to Y by zero to vertices of Y and the extension of the extension operator by identity to vertices of Y (the blocks correspond to vertices of X \Y and vertices of Y , respectively). 23 Using these notations, gluing formulae (62), (64) for the propagator can be jointly expressed as Here we are suppressing the subscript Y, X for E and DN; notations for the blocks are as in (48), (52). So, the only part to check is that the 1-1 block above is A. It is a consequence of the inversion formula for 2 × 2 block matrices, which in particular asserts that the 1-1 block A of the matrix K X inverse to G X is the inverse of the Schur complement of the 2-2 block in G X , i.e., This finishes the proof of the gluing formula for propagators (68). Schur's formula for a determinant of a block 2 × 2 matrix applied to (48) yields and thus In the last equality we used that K X,Y is block-diagonal, with blocks corresponding to X ′ \ Y and X ′′ \ Y . This proves the gluing formula for determinants. 23 Note that one can further refine the block decompositions (67) according to parti-

Examples.
Example 3.9. Consider the gluing of two line graphs of length 2, X ′ , X ′′ over a common vertex Y into a line graph X of length 3 as pictured in Figure  10 below. Figure 10. Gluing two line graphs into a longer line graph.
The data of the constituent graphs X ′ , X ′′ relative to Y was computed in Example 3.5. We assemble the data on the glued graph X using the gluing formulae of Theorem 3.8. We have For the propagator we have, e.g., which agrees with the 1-1 entry and 1-3 entry in (38) respectively.
For the gluing of determinants, we have which agrees with (37).
Example 3.10. Consider the circle graph X with N vertices presented as a gluing by the two endpoints of two line graphs X ′ , X ′′ of lengths N ′ , N ′′ respectively, with N = N ′ + N ′′ − 2, see Figure 11 below. Y X ′ X ′′ Figure 11. Gluing a circle from two intervals.
One can then use the gluing formulae of Theorem 3.8 to recover the propagator and the determinant on the circle graph (cf. Example 3.3) from the data for line graphs relative to the endpoints (cf. Example 3.7). E.g. for the determinant, we have Here the 2 × 2 matrices DN Y,X ′ , DN Y,X ′′ are given by (59), with N replaced by N ′ , N ′′ , respectively.
3.3.5. General cutting/gluing of cobordisms. Consider the gluing of graph cobordisms (26), Let us introduce the following shorthand notations One has the following straightforward generalization of Theorem 3.8 to the case of possibly nonempty Y 1 , Y 3 .
Theorem 3.11. The data of the Gaussian theory on the glued cobordism Y 1 X − → Y 3 can be computed from the data of the constituent cobordisms Y 1 The blocks correspond to vertices of Y 1 and Y 3 . The interface DN operator here is (b) Extension operator E 13,X : Here horizontally, the blocks correspond to vertices of and similarly for v 1 ∈ X ′′ , v 2 ∈ X ′ .
3.3.6. Self-gluing and trace formula. As another generalization of Theorem 3.8, one can consider the case of a graph X relative to a subgraph Y that admits a decomposition Y = Y 1 ⊔Y 2 where Y 1 and Y 2 are isomorphic graphs. Then, specifying a graph isomorphism f : Y 1 → Y 2 , we can glue Y 1 to Y 2 using f to form a new graphX with a distinguished subgraphỸ . 24 We havẽ Y ∼ = Y 1 ∼ = Y 2 if and only if there are no edges between Y 1 and Y 2 . See Figure  12. Figure 12. An example of self-gluing.
Then one has the following relation between the Dirichlet-to-Neumann operators of Y relative to X andỸ relative toX: 24 In the setting of theorem 3.8, we have X = X ′ ⊔ X ′′ , and there are no edges between X ′ and X ′′ . In the following discussion we will suppress f but remark that in principle the glued graphsX andỸ do depend on f . Equivalently, where the first term contains contributions to the action from vertices in X \ Y and edges with at least one vertex in X \ Y , while the last term contains just contributions from edges between Y 1 and Y 2 . Evaluating on the subspace of fields F (ϕ,ϕ) X that agree on Y 1 and Y 2 , we get On the other hand, we have . Noticing that the relative operators agree K X,Y = KX ,Ỹ , and using (53), we obtain (75). To see (76), notice that the difference (75) we obtain (76). □ Corollary 3.13. We have the following trace formula Integrating over ϕ, we obtain the result. □ Example 3.14 (Gluing a circle graph from a line graph). For the line graph L 3 relative to both endpoints, In this case we have K Y 1 = K Y 2 = m 2 and 1 1 m 2 + 3 m 2 + 2 25 Below we are identifying using f to identify V (Y1) and V (Y2), and then also ϕ and which implies Here m 2 = K Y 1 . On the other hand,X = C 2 is a circle graph withỸ a point, and we have therefore the corresponding Dirichlet-to-Neumann operator is as predicted by Proposition 3.12. The relative determinant K Y,X is m 2 + 2 so that the trace formula becomes Similarly, for the line graph of length N relative to both endpoints, the Dirichlet-to-Neumann operator is given by (59) and we have .
On the other hand, the Dirichlet-to-Neumann operator ofX = C N −1 relative to a single vertex is Then one can check that Remark 3.15. There is of course also common generalization of Theorem 3.11 and Proposition 3.12, where we have several boundary components and are allowed sew any two isomorphic components together, we leave this statement to the imagination of the reader.

3.4.
Comparison to continuum formulation. In this subsection, we compare of results of subsections 3.2 and 3.3 to the continuum counterparts for a free scalar theory on a Riemannian manifold. For details on the latter, we refer to [16].
Consider the free scalar theory on a closed Riemannian manifold M defined by the action where ϕ ∈ C ∞ (M ) is the scalar field, m > 0 is the mass, * is the Hodge star associated with the metric, dvol is the metric volume form and ∆ is the metric Laplacian.
can be written as Here: • dvol ∂ is the Riemannian volume form on ∂M (w.r.t. the induced metric from the bulk).
is the Green's function for the operator ∆ + m 2 with Dirichlet boundary condition. • ∂ n stands for the normal derivative at the boundary. In particular, for x ∈ M , y ∈ ∂M , where y t , t ≥ 0 is a curve in M starting at y 0 = y with initial velocity being the inward unit normal to the boundary. Then on a manifold with boundary one has the partition function Here in the determinant in the r.h.s., ∆ + m 2 is understood as acting on smooth functions on M vanishing on ∂M (which we indicate by the subscript D for "Dirichlet boundary condition"); DN : C ∞ (∂M ) → C ∞ (∂M ) is the Dirichlet-to-Neumann operator (see footnote 18). The integral kernel of the DN operator is −∂ n x ∂ n y G D (x, y). The integral in the exponential in the last line of (80) contains a nonintegrable singularity on the diagonal and has to be appropriately regularized, cf. Remark 3.4 in [16].
Correlators on a manifold with boundary are: • One-point correlator: • Centered two-point correlator: where δϕ(x) : = ϕ(x) − ⟨ϕ(x)⟩ ϕ ∂ . • k-point centered correlators are given by Wick's lemma. When more detailed notations of the manifolds involved is needed, instead of G D we will write G M,∂M (and similarly for det ζ D ) and instead of DN we will write DN ∂M,M .
Continuing the dictionary of Remark 2.5 to free scalar theory on graphs vs. Riemannian manifolds, we have the following. Scalar theory on a graph X Scalar theory on a Riemannian manifold M relative to subgraph Y with boundary ∂M Table 3. Comparing the toy model and continuum theory, continued.
Here in the right column we are writing the integral kernels of operators instead of operators themselves.

3.4.1.
Gluing formulae for Green's functions and determinants. Assume that M is a closed Riemannian manifold cut be a closed codimension 1 submanifold γ into two pieces, M ′ and M ′′ . Then one can recover the Green's function for the operator ∆ + m 2 on M from Green's functions on M ′ and M ′′ , both with Dirichlet condition on γ, as follows. 26 • For x, y ∈ M ′ , one has (81) Here κ(w, z) is the integral kernel of the inverse of the total (or "interface") DN operator For x, y ∈ M ′′ , one has a similar formula to (81).
In the case dim M = 2, the zeta-regularized determinants satisfy a remarkable Mayer-Vietoris type gluing formula due to Burghelea-Friedlander-Kappeler [3], . This formula also holds for higher even dimensions provided that the metric near the cut γ is of warped product type (this is a result of Lee [17]). In odd dimensions, under a similar assumption, the formula is known to hold up to a multiplicative constant known explicitly in terms of the metric on the cut.
Note that formulae (81), (83) have the exact same structure as formulae (62), (64) for gluing of graph propagators. 27 Likewise, the gluing formulae for determinants in the continuum setting (84) and in graph setting (65) have the same structure.
One can also allow the manifold M to have extra boundary components disjoint from the cut, i.e., to consider M as a composition of two cobordisms One then has the corresponding gluing formulae which have the same structure as the formulae of Theorem 3.11. In particular, one has a gluing formula for continuum DN operators (see [21]) similar to the formula (69) in the graph setting .
3.4.2. Example: continuum limit of line and circle graphs. The action of the continuum theory on an interval [0, L] evaluated on a smooth field ϕ ∈ C ∞ ([0, L]) can be seen as a limit of Riemann sums where in the r.h.s. we denoted ϵ N = L/N . The r.h.s. can be seen as the action of the graph theory on a line graph with N = L/ϵ vertices, where the mass is scaled as m → ϵm and then the kinetic operator is scaled as K → ϵ −1 K (and thus the propagator scales as G → ϵG), where we consider the limit ϵ → 0 (we are approximating the interval by a portion of a 1d lattice and taking the lattice spacing to zero). Applying the scaling above to the formulae of Example 3.7, we obtain the following for the propagator (58): where we denoted x = iϵ, y = jϵ -we think of i, j as scaling with ϵ so that x, y remain fixed. For comparison, the zeta-regularized determinant on the interval is It differs from the graph result by a scaling factor ϵ N and an extra factor 2 which exhibits a discrepancy between the two regularizations of the functional determinant -lattice vs. zeta regularization.
Remark 3.16. One can similarly consider the continuum limit for the line graph of Example 3.2, without Dirichlet condition at the endpoints. Its continuum counterpart is the theory on an interval [0, L] with Neumann boundary conditions at the endpoints, cf. footnote 17. Likewise, in the continuum limit for line graphs relative to one endpoint (Example 3.6), one recovers the continuum theory with Dirichlet condition at one endpoint and Neumann condition at the other. For example, the zeta-determinant for Neumann condition at both ends is det ζ N −N (∆ + m 2 ) = 2m sinh mL. For Dirichlet condition at one end and Neumann at the other, one has det ζ D−N (∆+m 2 ) = 2 cosh mL. These formulae are related to the continuum limit of the discrete counterparts ((41) for Neumann-Neumann and (57) for Neumann-Dirichlet boundary conditions) in the same way as in the Dirichlet-Dirichlet case (by scaling with ϵ N and an extra factor of 2).
In the same vein, we can consider a circle of length L as a limit of circle graphs (Example 3.3) with spacing ϵ. Then in the scaling limit, from (42) we have where the r.h.s. coincides with the continuum Green's function on a circle. For the determinant (43), we have For comparison, the corresponding zeta-regularized functional determinant is det ζ (∆ + m 2 ) = 4 sinh 2 mL 2 , which coincides with the r.h.s. of (85) up to the scaling factor ϵ N .

Interacting theory via Feynman diagrams
Consider scalar field theory on a closed graph X defined by the action (21) -the perturbation of the Gaussian theory by an interaction potential p(ϕ): .
The partition function (23) can be computed by perturbation theory -the Laplace method for the ℏ → 0 asymptotics of the integral, with corrections given by Feynman diagrams (see e.g. [11]): Here: • ≪ · · · ≫ 0 stands for the non-normalized correlator in the Gaussian theory. • The sum in the r.h.s. is over finite (not necessarily connected) graphs Γ (Feynman graphs) with vertices of valence ≥ 3; χ(Γ) ≤ 0 is the Euler characteristic of a graph; |Aut(Γ)| -the order of the automorphism group of the graph. • The weight of the Feynman graph is 29 where p k are the coefficients of the potential (22); G X is the Green's function of the Gaussian theory. The sum over f here -the sum over |V Γ |-tuples of vertices of the spacetime graph X -is a graph QFT analog of the configuration space integral formula for the weight of a Feynman graph (cf. e.g. [16]). The expression in the r.h.s. of (86) is a power series in nonnegative powers in ℏ, with finitely many graphs contributing at each order. 30 We denote the r.h.s. of (86) by Z pert X -the perturbative partition function. It is an asymptotic expansion of the measure-theoretic integral in the l.h.s. of (86) -the nonperturbative partition function. 4.1. Version relative to a boundary subgraph. Let X be graph and Y ⊂ X a "boundary" subgraph. We have the following relative version of the perturbative expansion (86): . 29 We are using sans-serif font to distinguish vertices of the Feynman graph u, v from the vertices of the spacetime graph u, v. 30 This is due to the restriction that valencies in Γ are ≥ 3, which is in turn due to the assumption that p(ϕ) contains only terms of degree ≥ 3.
Here the sum is over Feynman graphs Γ with vertices split into two subsets -"bulk" vertices V bulk Γ and "boundary" vertices V ∂ Γ -with bulk vertices of valence ≥ 3 and univalent boundary vertices. In graphs Γ we are not allowing edges connecting two boundary vertices (while bulk-bulk and bulk-boundary edges are allowed). The weight of a Feynman graph is a polynomial in the boundary field ϕ Y : The sum over f here can be seen as a sum over tuples of bulk and boundary vertices in X. Similarly to (87), it is a graph QFT analog of a configuration space integral formula for the Feynman diagrams in the interacting scalar field theory on manifolds with boundary (cf. [16]), where one is integrating over configurations of n bulk points and m boundary points on the spacetime manifold. We will denote the r.h.s. of (88) by Z pert X,Y (ϕ Y ). Example 4.1. Figure 13 is an example of a map f contributing to the Feynman weight (89): f (a) Figure 13. A Feynman graph with boundary vertices and a map contributing to its Feynman weight.
The full Feynman weight of the graph on the left is: Remark 4.2. (i) By the standard argument, due to multiplicativity of Feynman weights w.r.t. disjoint unions of Feynman graphs, the sum over graphs Γ in (86), (88) can be written as the exponential of the sum over connected Feynman graphs, Γ · · · = e Γ connected ··· . (ii) One can rewrite the r.h.s. of (88) without the DN operator in the exponent in the prefactor, but instead allowing graphs Γ with boundaryboundary edges. The latter contribute extra factors −DN Y,X (u ∂ , v ∂ ) in the Feynman weight (89). (iii) Unlike the case of closed X, the sum over Γ in the r.h.s. of (88) generally contributes infinitely many terms to each nonnegative order in ℏ (for instance, in the order O(ℏ 0 ), one has 1-loop graphs formed by trees connected to a cycle). However, there are finitely many graphs contributing to a given order in ℏ, in any fixed polynomial degree in ϕ Y . Moreover, one can introduce a rescaled boundary field η Y so that Then (88) expressed as a function of η Y is a power series in nonnegative half-integer powers of ℏ, with finitely many graphs contributing at each order. 31

4.2.
Cutting/gluing of perturbative partition functions via cutting/gluing of Feynman diagrams. As in Section 3.3.1, consider a closed graph X = X ′ ∪ Y X ′′ obtained from graphs X ′ , X ′′ by gluing along a common subgraph X ′ ⊃ Y ⊂ X ′′ (but now we consider the interacting scalar QFT).
As we know from Proposition 2.3, the nonperturbative partition functions satisfy the gluing formula Replacing both sides with their expansions (asymptotic series) in ℏ, we have the gluing formula for the perturbative partition functions This latter formula admits an independent proof in the language of Feynman graphs which we will sketch here (adapting the argument of [16]). Consider "decorations" of Feynman graphs Γ for the theory on X by the following data: • Each vertex v of Γ is decorated by one of three symbols • Each edge e = (u, v) of Γ is decorated by either u or c ("uncut" or "cut"), corresponding to the splitting of the Green's function on X in Theorem 3.8: . 31 The power of ℏ accompanying a graph is ℏ |E Γ |−|V bulk Γ |− 1 2 |V ∂ Γ | , i.e., one can think that with this normalization of the boundary field, boundary vertices contribute 1/2 instead of 1 to the Euler characteristic of a Feynman graph.
We also note that the rescaling (90) is rather natural, as the expected magnitude of fluctuations of ϕY around zero is O( √ ℏ).
Here: -If u, v are both decorated with X ′ , the "uncut" term is G u X : = G X ′ ,Y . Similarly, if u, v are both decorated with X ′′ , G u X : = G X ′′ ,Y . For all other decorations of u, v, G u X : = 0. Because of this, we will impose a selection rule: u-decoration is only allowed for X ′ − X ′ or X ′′ − X ′′ edges.
-The "cut" term is where α, β are the decorations of u, v (and we understand E Y,Y as identity operator).
Let Dec(Γ) denote the set of all possible decorations of a Feynman graph Γ. Theorem 3.8 implies that for any Feynman graph Γ its weight splits into the contributions of its possible decorations: where in the summand on the r.h.s., we have restrictions on images of vertices of Γ as prescribed by the decoration, and we only select either cut or uncut piece of each Green's function.
Thus, the l.h.s. of (91) can be written as where on the right we are summing over all Feynman graphs with all possible decorations. The r.h.s. of (91) is: is the non-normalized Gaussian average w.r.t. the total DN operator; ⟨· · · ⟩ Y is the corresponding normalized average.
The correspondence between (92) and (93) is as follows. Consider a decorated graph Γ dec and form out of it subgraphs Γ ′ , Γ ′′ in the following way. Let us cut every cut edge in Γ (except Y − Y edges) into two, introducing two new boundary vertices. Then we collapse every edge between a newly formed vertex and a Y -vertex. Γ ′ is the subgraph of Γ formed by vertices decorated by X ′ and uncut edges between them, and those among the newly formed boundary vertices which are connected to an X ′ -vertex by an edge; Γ ′′ is formed similarly.
Then the contribution of Γ dec to (92) is equal to the contribution of a particular Wick pairing for the term in (93) corresponding to the induced pair of graphs Γ ′ , Γ ′′ , and picking a term in the Taylor expansion of e − 1 corresponding to Y -vertices in Γ dec . The sum over all decorated Feynman graphs in (92) recovers the sum over all pairs Γ ′ , Γ ′′ and all Wick contractions in (93). This shows Feynman-graph-wise the equality of (92) and (93). One can also check that the combinatorial factors work out similarly to the argument in [16, Lemma 6.10].
Example 4.3. Figure 14 is an example of a decorated Feynman graph on X (on the left; vertex decorations X ′ , Y, X ′′ are according to the labels in the bottom) and the corresponding contribution to (93) on the right. Dashed edges on the right denote the Wick pairing for ⟨· · · ⟩ Y and are decorated with DN −1 Y,X . Circle vertices are the boundary vertices of graphs Γ ′ , Γ ′′ or equivalently the vertices formed by cutting the c-edges of Γ dec .

Path sum formulae for the propagator and determinant
(Gaussian theory in the first quantization formalism)

5.1.
Quantum mechanics on a graph. Following the logic of Section 1.1, we now want to understand the kinetic operator ∆ X + m 2 of the second quantized theory as the Hamiltonian of an auxiliary quantum mechanical system -a quantum particle on the graph X. 32 The space of states H X for graph quantum mechanics on X is C V , i.e. the space of C-valued functions on V . The graph Schrödinger equation 33 on X is This model of quantum mechanics on a graph -as a model for the interplay between the operator and path integral formalisms -was considered in [19,20], see also [5]. 33 Here we are talking about the Wick-rotated Schrödinger equation (i.e. describing quantum evolution in imaginary time), or equivalently the heat equation.
where |ψ(t, v)⟩ is a (time-dependent) state, i.e. a vector in C V . The explicit solutions to (94) are given by One can explicitly solve equation (95) by summing over certain paths on X, see equations (102), (100), (118) below, in a way reminiscent of Feynman's path integral. 34 This graph quantum mechanics is the first step of our first quantization approach to QFT on a graph.

5.2.
Path sum formulae on closed graphs.

Paths and h-paths in graphs.
We start with some terminology. A path γ from a vertex u to a vertex v of a graph X is a sequence where v i are vertices of X and e i is an edge between v i and v i+1 . 35 We denote V (γ) the ordered collection (v 0 , v 1 , . . . , v k ) of vertices of γ. We call l(γ) = k the length of the path, and denote P k X (u, v) the set of paths in X of length k from a vertex u to a vertex v. We denote by P X (u, v) = ∪ ∞ k=0 P k X (u, v) the set of paths of any length from u to v. We also denote by P k X = ∪ u,v∈X P k X (u, v), and P X = ∪ ∞ k=0 P k X the sets of paths between any two vertices of X. Below we will also need a variant of this notion that we call hesitant paths. Namely, a hesitant path (or "h-path") from a vertex u to a vertex v is a sequenceγ = (u = v 0 , e 0 , v 1 , . . . , e k−1 , v k = v), but now we allow the possibility that v i+1 = v i , in which case e i is allowed to be any edge starting at v i = v i+1 . In this case we say thatγ hesitates at step i. If v i+1 ̸ = v i , then we say thatγ jumps at step i. As before, we say that such a path has length l(γ) = k, and we introduce the notion of the degree of a h-path as 36 i.e. the degree is the number of jumps of a h-path. We denote by the number of hesitations ofγ. Obviously l(γ) = deg(γ) + h(γ). We denote the set of h-paths from u to v by Π X (u, v), and the set of length k hesitant paths by Π k X (u, v). There is an obvious concatenation operation Observe that for every h-pathγ there is a usual ("non-hesitant") path γ of length l(γ) = deg(γ) given by simply forgetting repeated vertices, giving a map P : Π(u, v) ↠ P (u, v). See Figure 15. A (hesitant) path is called closed if v k = v 0 , i.e. the first and last vertex agree. The cyclic group C k acts on closed paths of length k by shifting the vertices and edges. We call the orbits of this group action cycles (i.e. closed paths without a preferred start-or end-point), and denote them by Γ X for equivalence classes of h-paths, and C X for equivalence classes of regular paths. A cycle [γ] is called primitive if its representatives have trivial stabilizer under this group action. Equivalently, this means that there is no k > 1 andγ ′ such thatγ =γ ′ * γ ′ * . . . * γ ′ k times , i.e. the cycle is traversed exactly once. In general, the order of the stabilizer ofγ is precisely the number of traverses. We will denote this number by t(γ). Obviously, it is well-defined on cycles.

5.2.2.
h-path formulae for heat kernel, propagator and determinant. It is a simple observation that where A X denotes the adjacency matrix of the graph X, |v⟩ denotes the state which is 1 at v and vanishes elsewhere, and ⟨u|A|v⟩ = A uv denotes the (u, v)-matrix element of the operator A (in the bra-ket notation for the quantum mechanics on X). We consider the heat operator which is the propagator of the quantum mechanics on the graph X (95). Suppose that X is regular, i.e. all vertices have the same valence n. Then ∆ X = n · I − A X and (98) implies that the heat kernel ⟨u|e −t∆ X |v⟩ is given by One can think of the r.h.s. as a discrete analog of the Feynman path integral formula where one is integrating over all paths (see [19]). For a general graph, one can derive a formula for the heat kernel in terms of h-paths, by using the formula ∆ = d T d. Namely, one has (see [9]) This implies the following formula for the heat kernel: Here we have used that l(γ) + deg(γ) = h(γ) mod 2. Then we have the following h-path sum formula for the Green's function: Lemma 5.2. The Green's function G X is given by (103) Proof. By expanding m 2 G X = (m −2 K X ) −1 = (1 + m −2 ∆ X ) −1 in powers of m −2 using the geometric series, 37 we obtain which proves (103). Alternatively, one can prove (103) by integrating the heat kernel e −tK X = e −tm 2 e −t∆ X for K X over the time parameter t and using the Gamma function identity In equation (103), we see two slightly different ways of interpreting the path sum formula. In the middle we see that when expanding in powers of m 2 , the coefficient of m −2(k+1) is given by a signed count of h-path of length k, and that the sign is determined by the number of hesitations. On the right hand side we interpret the propagator as a weighted sum over all h-paths, in accordance with the first quantization picture.
We have the following formula for the determinant of the kinetic operator (normalized by 1/m 2 ) in terms of closed h-paths or h-cycles: Lemma 5.3. The determinant of K X /m 2 is given by which implies (105). □ Note that in the expression in the middle of (105), we are summing over h-paths of length at least 1 with a fixed starting point. To obtain the right hand side, we sum over orbits of the group action of C k on closed paths of length k, the size of the orbit ofγ is exactly l(γ)/t(γ).
Remark 5.4. Both h-paths and paths form monoids w.r.t. concatenation, with P a monoid homomorphism. A map s from a monoid to R or C is called multiplicative if it is a homomorphism of monoids, i.e.
Notice that in the path sum expression for the propagator (103), we are summing over h-pathsγ with the weight Below it will be important that this weight is in fact multiplicative, which is obvious from the definition.
Remark 5.5. Using multiplicativity of s, we can resum over iterates of primitive cycles to rewrite the right hand side of (105): 38 Again, this power series converges absolutely for m 2 > λmax(∆X ).

5.2.3.
Resumming h-paths. Path sum formulae for propagator and determinant. Summing over the fibers of the map P : Π X (u, v) ↠ P X (u, v), we can rewrite (104) as a path sum formula as follows: Proof. For a path γ ∈ P k X (u, v), the fiber P −1 (γ) consists of h-pathsγ which hesitate an arbitrary number j i of times at every vertex v i in V (γ). For each vertex v i , there are val(v i ) j i possibilities for a path to hesitate j i times at v i . The length of such a h-path is l(γ) = k + j 0 + . . . + j k and its degree is deg(γ) = k, hence we can rewrite equation (104) as .

□
Corollary 5.7. The Green's function of the kinetic operator has the expression In particular, if X is regular of degree n, then (110) To derive a path sum formula for the determinant, we use a slightly different idea, that also provides an alternative proof of the resummed formula for the propagator. Consider the operator Λ which acts on C 0 (X) diagonally in the vertex basis and sends |v⟩ → (m 2 + val(v))|v⟩, that is, in the basis of C 0 (X) corresponding to an enumeration v 1 , . . . , v N of the vertices of X. Then, consider the "normalized" kinetic operator with A X the adjacency matrix of the graph. Then, we have the simple generalization of the observation that matrix elements of the k-th power of the adjacency matrix A X count paths of length k (see (98)), namely, matrix elements of (Λ −1 A X ) k Λ −1 count paths weighted with .
Then, we immediately obtain which is (109).
For the determinant, we have the following statement: Proposition 5.8. The determinant of the normalized kinetic operator has the expansions where for a closed path γ ∈ P k X (v, v), w ′ (γ) = w(γ) · (m 2 + val(v). 39 Proof. To see (114), we simply observe To see the second formula (115), one sums over orbits of the cyclic group action on closed paths. □ In particular, for regular graphs we obtain a formula also derived in [9]: . If X is a regular graph, then Another corollary is the following first quantization formula for the partition function: Theorem 5.10 (First quantization formula for Gaussian theory on closed graphs). The partition function of the Gaussian theory on a closed graph 39 Note that this is well-defined on a cycle, we are simply taking the product over all vertices in the path but without repeating the one corresponding to start-and endpoint.
can be expressed by I.e., the logarithm of the partition function is given, up to the "normalization" term − v∈X log(m 2 + val(v)), by summing over all cycles of length at least 1, dividing by automorphisms coming from orientation reversing and multiple traversals.
from where the theorem follows by Proposition 5.8. □ Remark 5.11. Notice that the weight w(γ) of the resummed formula (109) is not multiplicative: if γ 1 ∈ P X (u, v) and since on the left hand side the vertex v appears twice.
Object h-path sum path sum Table 4. Summary of path sum formulae, closed case.
Remark 5.12. The sum over k in (113), (114) is absolutely convergent for any m 2 > 0. The reason is that the matrix a = Λ −1 A X has spectral radius smaller than 1 for m 2 > 0. This in turn follows from Perron-Frobenius theorem: Since a is a nonnegative matrix, its spectral radius ρ(a) is equal to its largest eigenvalue (also known as Perron-Frobenius eigenvalue), which in turn is bounded by the maximum of the row sums of a. 40 The sum of entries on the v-th row of a is val(v) In particular, resummation from h-path-sum formula to a path-sum formula extends the absolute convergence region from m 2 > λ max (∆ X ) to m 2 > 0. Here ||x||∞ = maxi |xi| denotes the maximum norm of a vector x.

5.2.4.
Aside: path sum formulae for the heat kernel and the propagator -"1d gravity" version. There is the following generalization of the path sum formula (100) for the heat kernel for a not necessarily regular graph X.
where the t-dependent weight for a path γ of length k is given by an integral over a standard k-simplex of size t: where we denoted v 0 , . . . , v k the vertices along the path.
Proof. To prove this result, note that the Green's function G X as a function of m 2 is the Laplace transform L of the heat kernel e −t∆ X as a function of t. Thus, one can recover the heat kernel as the inverse Laplace transform L −1 of G X . Applying L −1 to (109) termwise, we obtain (118), (119) (note that the product of functions As a function of t, the weight (119) is a certain polynomial in t and e −t with rational coefficients (depending on the sequence of valences val(v i )). If all valences along γ are the same (e.g. if X is regular), then the integral over the simplex evaluates to W (γ; t) = t k k! e −t·val -same as the weight of a path in (100).
Note also that integrating (119) (multiplied by e −m 2 t ) in t, we obtain an integral expression for the weight (112) of a path in the path sum formula for the Green's function: Here unlike (119) the integral is over R k+1 + , not over a k-simplex. Observe that the resulting formula for the Green's function bears close resemblance to the first quantization formula (8), where the proper times t 0 , . . . , t k should be though of as parametrizing the worldline metric field ξ (and the path γ is the field of the "1d sigma model"). 41 We imagine the particle moving on X along γ, spending time t i at the i-th vertex 41 More explicitly, one can think of the worldline as a standard interval [0, 1] subdivided into k sub-intervals by points p0 = 0 < p1 < · · · < p k−1 < p k = 1 (we think of pi as moments when the particle jumps to the next vertex). Then one can think of {ti} as moduli of metrics ξ on [0, 1] modulo diffeomorphisms of [0, 1] relative to (fixed at) the points p0, p1, . . . , p k . and making instantaneous jumps between the vertices, with the "action functional" The first one comes with a + sign, since it has no hesitations, the other 4 paths hesitate once either at 1 or 2 and come with a minus sign, the overall count is therefore −3. Counting paths beyond that is already quite hard. Looking at the Greens' function, we have Since the circle graph is regular, we can count paths from u to v by expanding in the parameter α −1 = 1 m 2 +2 . Here we observe that For brevity, here we just denote a path by its ordered collection of vertices, which determines the edges that are traversed.
which counts h-paths from vertex 1 to itself: a single paths of length 0, 2 length 1 paths which hesitate once at 1, two length 2 paths with 0 hesitations and 4 length 2 paths with 2 hesitations, and so on. In terms of α = m 2 + 2, we get where we recognize the path counts from 1 to itself: A unique path (1) of length 0, no paths of length 1, two paths (121),(131) of length 2, 2 paths (1231),(1321) of length 3, and so on.
and we can see that rational numbers appear, because we are either counting paths with 1 l(γ) , or cycles with 1 t(γ) . Let us verify the cycle count for the first two powers of m 2 . Indeed, there is a total of 6 cycles of length 1 that hesitate once, of the form (1, (12), 1), and similar. At length 2, there are 3 closed cycles that do no hesitate, of the form (1, (12), 2, (12), 1). Then, there are three cycles that hesitate twice and are of the form (1, (12), 1, (31), 1) (they visit both edges starting at a vertex). Moreover, at every vertex we have the cycles of the form (1, (12), 1, (12), 1). There are a total of 6 such cycles, however, they come with a factor of 1/2 because those are traversed twice! Overall we obtain 3 + 3 + 1 2 · 6 = 9 cycles (they all come with the same + sign). Finally, we can count cycles in X by expanding the logarithm of the determinant in powers of α: For instance, we have and indeed we can observe there are no h-paths from 1 to 3 of length 0 and 1, and there is a unique path γ of length 2. At length 3, there are 4 different h-paths whose underlying path is γ and who hesitate exactly once, there are a total of 1 + 2 + 1 possibilities to do so. At the next order, there are a total of 11 possibilities for γ to hesitate twice, and two new paths of length 4 appear, explaining the coefficient 13. The path sum (109) becomes Here the numerator 1 corresponds to the single path of length 2, (123); the numerator 2 corresponds to the two paths of length 4, (12123), (12323). In fact, there are exactly 2 l−1 paths 1 → 3 of length 2l for each l ≥ 1, and along these paths the 1-valent vertices (endpoints) alternate with the 2-valent (middle) vertex, resulting in For the determinant det K X = m 2 (m 2 + 1)(m 2 + 3), we can give the hesitant cycles expansion Here the first 4 is given by the four hesitant cycles of length 1. At length 2, we have the 4 iterates of length 1 hesitant cycles, contributing 2, a new hesitant cycle that hesitates twice at 2 (in different directions), and 2 regular cycles of length 2, for a total of 4 · 1 2 + 1 + 2 = 5. For the path sum we have which means there are 2 k /k cycles (counted with 1/t(γ)) of length 2k. For instance, there are 2 cycles of length 2, namely (121) and (232). There is a unique primitive length 4 cycle, namely (12321), and the two non-primitive cycles (12121),(23232), which contribute k = 1 2 , so we obtain 1 + 2 1 2 = 2. There are 2 primitive length 6 cycles, namely (1232321) and (1212321), and the two non-primitive cycles (1212121), (2323232), contributing 1 3 each, for a total of 2 + 2 3 = 8 3 . At length 8 there are 3 new primitive cycles, the iterate of the length 4 cycle and the iterates of the 2 length 2 cycles for a total of 3 + 1 2 + 2 · 1 4 = 4 = 2 4 /4.

Relative versions.
In this section we will study path-sum formulae for a graph X relative to a boundary subgraph Y . We will then give a path-sum proof of the gluing formula (Theorem 3.8) in the case of a closed graph presented as a gluing of subgraphs over Y . The extension to gluing of cobordisms is straightforward but notationally tedious.

5.4.1.
h-path formulae for Dirichlet propagator, extension operator, Dirichletto-Neumann operator. In this section we consider the path sum versions of the objects introduced in Section 3.2. Remember that, for a graph X and a subgraph Y , we have the notations (48): and (52): We are interested in the following objects: • The propagator with Dirichlet boundary conditions on Y , G X,Y = K −1 X,Y (cf. Section 3.2.3). • The determinant of the kinetic operator K X,Y with Dirichlet boundary on Y (cf. Section 3.2.3).
Propagator with Dirichlet boundary conditions. For u, v two vertices of X \ Y , let us denote by Π X,Y (u, v) the set of h-paths from u to v that contain no vertices in Y (but they may contain edges between X \ Y and Y ), and Π k X,Y (u, v) the subset of such paths that have length k. Then we have the formula ( [9]) In exactly the same manner as in the previous subsection, we can then prove and therefore Determinant of relative kinetic operator. In the same fashion, we obtain the formula where we have introduced the notation C ≥1 X,Y for cycles corresponding to closed h-paths in X \ Y that may use edges between X \ Y and Y .
Dirichlet-to-Neumann operator. Notice also that as a submatrix of K −1 X , we have the following path sums for D (here u, v ∈ Y ): For u, v ∈ Y , we introduce the notation Π ′′ X,Y (u, v) to be those h-paths from u to v containing exactly two vertices in Y , i.e. the start-and endpoints. We define the operator D ′ : C 0 (Y ) → C 0 (Y ) given by summing over such paths (see Figure 17a) h-paths contributing to ⟨u|(D ′ ) k |v⟩.
Notice that ⟨u|(D ′ ) k |v⟩ is given by summing over paths which cross the interface Y exactly k − 1 times between the start-and the end-point (see Figure 17b). Since the summand is multiplicative, we can therefore rewrite D as Therefore the Dirichlet-to-Neumann operator is given by the formula Extension operator. Finally, we give a path sum formula for the extension operator. To do so we introduce the notation Π ′ X,Y (u, v) for h-paths that start at a vertex u ∈ X \ Y , end at a vertex v ∈ Y , and contain only a single vertex on Y , i.e. the end-point.
Lemma 5.14. The extension operator can be expressed as Proof. We will prove that composing with D we obtain B. Indeed, denote the right hand side of equation (132) byB. Then, using the h-path sum expression for D (128) we obtaiñ Using multiplicativity, we can rewrite this as s(γ 1 * γ 2 ). Now the argument finishes by observing that any h-pathγ from a vertex u in X \ Y to a vertex w in Y can be decomposed as follows. Let v ∈ Y be the first vertex of Y that appears inγ and denoteγ 1 the part of the path before v, andγ 2 the rest. Thenγ =γ 1 * γ 2 andγ 1 ∈ Π ′ X (u, v). This decomposition is the inverse of the composition map which is therefore a bijection. In particular, we can rewrite the expression above as We conclude thatB = BD −1 . □ (a) A h-path in Π(u, w) contributing to ⟨u|B|w⟩.
contributing to ⟨v|D|w⟩. Figure 18. Paths contributing to B (left) can be decomposed into paths contributing to E Y,X (middle) and paths contributing to D (right), proving that B = E Y,X D.

5.4.2.
Resumming h-paths. In the relative case, for any path γ we use the notation where for a vertex v ∈ X \Y , we put the subscript X on val X (v) to emphasize we are considering its valence in X, i.e. we are counting all edges in X incident to v regardless if they end on Y or not. Then we have the following path sum formulae for the relative objects: Proposition 5.15. The propagator with Dirichlet boundary condition can be expressed as Here the sum is over paths involving only vertices in X \ Y . 43 Similarly, for the extension operator we have where P ′ X,Y (u, v) denotes paths in X \ Y from u to v with exactly one vertex (i.e. the endpoint) in Y . Finally, the operator D ′ appearing in the Dirichletto-Neumann operator can be written as where P ′′ X,Y (u, v) denotes paths in X with exactly two (i.e. start-and endpoint) vertices in Y . In particular, the Dirichlet-to-Neumann operator is 43 Notice that if instead we were using the path weight w X\Y (γ), we would obtain the Green's function G X\Y of the closed graph X \ Y , not the relative Green's function GX,Y .
Proof. Equation (134) is proved with a straightforward generalization of the arguments in the previous section. For equation (135), notice that because of the final jump there is an additional factor of m −2 . For the Dirichletto-Neumann operator, we have the initial and final jumps contributing a factor of −m −2 . In the case u = v, the contribution of the h-paths which simply hesitate once at v have to be taken into account separately and result in the first term in (136). Finally, (137) follows from (136) and DN Y,X = m 2 (I − D ′ ). □ We also have a similar statement for the determinant. For this, we introduce the normalized relative kinetic operator where Λ X,Y is the diagonal matrix whose entries are m 2 + val X (v). For a closed path γ ∈ P X\Y (v, v), we introduce the notation Proposition 5. 16. The determinant of the normalized relative kinetic operator is Proof. Again, simply notice that Then, the argument is the same as in the proof of Proposition 5.8 above. □ In the relative case, we are counting paths in X\Y , but weighted according to the valence of vertices in X. This motivates the following definition.
Definition 5.17. We say that pair (X, Y ) of a graph X and a subgraph Y is quasi-regular of degree n if all vertices v ∈ X \ Y have the same valence n in X, i.e. val X (v) = n, ∀v ∈ V (X \ Y ).
If X is regular, the pair (X, Y ) is quasi-regular for any subgraph Y ⊂ X. An important class of examples are the line graphs X of example 3.5 with Y both boundary vertices, or more generally rectangular graphs or their higher-dimensional counterparts with Y given by the collection of boundary vertices. See Figure 19.
X Y Figure 19. A quasi-regular graph pair (X, Y ) with n = 4.
For quasi-regular graphs, the path sums of Proposition 5.15 simplify to power series in (m 2 + n) −1 , with n the degree of (X, Y ): Corollary 5.18. Suppose (X, Y ) is quasi-regular, then we have the following power series expansions for the relative propagator, extension operator, Dirichlet-to-Neumann operator and determinant: Figure 20. The 2-vertex line graph.
Again, we can collect our findings in the following first quantization formula for the partition function: Theorem 5.19. The logarithm of the partition function of the Gaussian theory relative to a subgraph Y is In (143) we are summing over all connected Feynman diagrams with no bulk vertices: boundary-boundary edges in the last term of the second line of the r.h.s. at order ℏ 0 (together with the diagonal terms and 1 2 (A Y ) uv , they sum up to DN Y,X − 1 2 K Y ) and "1-loop graphs" (cycles) on the third line at order ℏ 1 .

Examples.
Example 5.20. Consider the graph X in Figure 20, with Y the subgraph consisting of the single vertex on the right. Then, the set Π X,Y consists exclusively of iterates of the path which hesitates once along the single edge at 1,γ = (1, (12), 1). Therefore, we obtain Alternatively, we can obtain this from the path sum formula (134) by noticing there is a single (constant) path from 1 to 1 in X\Y . For the determinant, we obtain h-paths in Π ′′ X,Y (2, 2) are either (2, (12), 2) or of the form (2, (12), 1, (12), 1, . . . , 1, (12), 2) -i.e. jump from 2 to 1, hesitate k times and jump back -and therefore the operator D ′ is given by Alternatively, one can just notice there is a unique path in P ′′ X,Y (2, 2), namely (212), and use formula (137). Therefore the Dirchlet-to-Neumann operator is Finally, h-paths in Π ′ X,Y (1, 2) are only those that hesitate k times at 1 before eventually jumping to 2, and therefore the extension operator is alternatively, this follows directly from formula (135), because P ′ X,Y (1, 2) = {(12)}.
in agreement with (58). As for the determinant, notice there is a unique cycle of length 2, all other cycles are iterates of this one, therefore, the logarithm of the normalized determinant is given by and the determinant is then det K X,Y = (m 2 + 1)(m 2 + 3), in agreement with (61).
For an example of the extension operator, notice that (p ′ ) k X,Y (2, 1) is 1 for odd k and 0 for even k, and therefore and similarly (p ′ ) k X,Y (3, 1) = 1 for k ≥ 2 even and 0 for odd k, and therefore in agreement with (60). Finally, we can compute the matrix elements of the Dirichlet-to-Neumann operator: we have (p ′′ ) k (1, 1) = 1 for even k ≥ 2 and it vanishes for odd k, therefore .
Object h-path sum path sum Table 5. Summary of path sum formulae, relative case.

5.5.
Gluing formulae from path sums. In this section we prove Theorem 3.8 from the path sum formulae presented in this chapter. The main observation in this proof is a decomposition of h-paths in X with respect to a subgraph Y .
Lemma 5.22. Let u, v ∈ X, then we have a bijection where Π X,Y (u, v) denotes h-paths in X that contain no vertices in Y (but they may contain edges between X \ Y and Y ) and Π ′ X,Y (u, w), for either u or w in Y , denote h-paths containing exactly one vertex in Y , namely the initial or final one. 44 Proof. One may decompose Π X (u, v) into paths containing no vertex in Y and those containing at least one vertex in Y . The former are precisely Π X,Y (u, v). Ifγ is an element of the latter, let w 1 be the first vertex inγ in Y and w 2 the last vertex inγ in Y . Splittingγ at w 1 and w 2 gives the map from left to right. The inverse map is given by composition of h-paths. See also Figure 21 □ 44 It is possible to have u = w ∈ Y , in which case there Π ′ X (w, w) contains only the 1-element path. Figure 21. h-paths from u to v fall in two categories. Those not containing vertices in Y (e.g.γ 1 ) are paths in Π X,Y (u, v), while those intersecting Y (e.g.γ 2 ) can be decomposed in paths inγ , v) (red) and a pathγ (2) 2 ∈ Π X (w 1 , w 2 ), where w 1 , w 2 are the first and last vertices inγ 2 contained in Y .
For the gluing formula for the determinant, we will also require the following observation on counting of closed paths.
Proof. For a cycleγ ∈ Γ ≥1,(k) X,Y , denote w 1 , . . . w k the intersection points with Y andγ (i) the segment ofγ between w i+1 and w i (here we set w k+1 = w 1 ). See Figure 22. Then obviouslyγ is the concatenation of theγ (i) , so concatenation is surjective. On the other hand a k-tuple of paths concatenates to the same closed path if and only if they are related to each other by a cyclic shift (this corresponds to a cyclic shift of the labeling of the intersection points). They are precisely k/t(γ) such shifts. □ Recall that D ′ is the operator given by summing the weight s(γ) = (m −2 ) l(γ) (−1) h(γ) over paths starting and ending on Y without intersecting Y in between (Eq. (129).) Corollary 5.24. We have that Proof. The statement follows by summing the weight s(γ) over the l.h.s. and r.h.s. of (145) in Lemma 5.23, using multiplicativity of s(γ) in the l.h.s. and with multiplicity k/t(γ) in the r.h.s. (corresponding to the count of preimages of the map (145)). □ Figure 22. Cycles in X either do not intersect Y (likeγ 1 ) and such that intersect Y k times (in the case ofγ 2 , k = 4. Such paths can be decomposed into k h-pathsγ (i) in Π ′′ X,Y (w i , w i+1 ) in k different ways, corresponding to cyclic shift of the labels of w i 's.
h-path sum proof of Theorem 3.8. We first prove the gluing formula Applying the decomposition of Π X (u, v) (144), and using multiplicativity of the weight s(γ) = (m −2 ) l(γ) (−1) h(γ) , we get The first term is G X,Y by equation (126). In the second term, we recognize the path sum expressions (132) for the extension operator and (128) for the operator D, which is the inverse of the total Dirichlet-to-Neumann operator. This completes the proof of the gluing formula for the propagator. Next, we prove the gluing formula for the determinant Dividing both sides by m 2N , where N is the number of vertices in X, this is equivalent to Taking negative logarithms and using log det = tr log, this is equivalent to where we have used that DN Y,X = m 2 (I − D ′ ). We claim that equation (148) can be proven by summing over paths. Indeed, the left hand side is given by summing over closed h-paths in X. We decompose them into paths which do not intersect Y , and those that do. From the former we obtain − log det K X,Y /m 2 by equation (127). Decompose the latter set into paths that intersect Y exactly k times, previously denoted C ≥1,(k) X,Y . By Corollary 5.23, when summing over those paths we obtain precisely tr(D ′ ) k /k. Summing over k we obtain tr k≥1 (D ′ ) k /k = −tr log(I − D ′ ), which proves the gluing formula for the determinant. □ Path sum proof of Theorem 3.8. In the proof above we used the h-path expansions, but of course one could have equally well used the formulae in terms of paths. To prove the gluing formula for the Green's function in terms of path counts, notice that a path crossing Y can again be decomposed into a path from X to Y , then a path from Y to Y and another path from Y to X. The weight w(γ) = v∈V (γ) (m 2 + val(v)) −1 is distributed by among those three paths by taking the vertices on Y to the Y − Y path: In this way, when summing over all paths from the Y − Y paths we obtain precisely the operator D = DN −1 Y,X (this is a submatrix of G X and hence the weights of paths include start and end vertices) while from the other parts we obtain the extension operator E Y,X (where weights of paths do not include the vertex on Y ).
Next, we consider the gluing formula for the determinant, Dividing both sides by this is equivalent to Taking logarithms and using the formulae (114) and (138) for logarithms of determinants of kinetic operators, we get where on the right hand side we are summing over cycles in X that intersect Y . We therefore want to show that the sum on the r.h.s of (149) equals Notice that tr(Λ −1 Y D ′′ ) k is given by summing over closed paths γ that intersect Y exactly k times, with the weight w ′ (γ): the factor (m 2 + val(v)) −1 in w ′ (γ) for vertices not on Y comes from D ′′ (recall that w X,Y (γ) does not contain factors for vertices on Y ), and from Λ −1 Y , for v ∈ Y . By a combinatorial argument analogous to Lemma 5.23, every cycle appears in this way exactly k t(γ) times. Therefore the sum on the r.h.s. of (149) equals the sum on the r.h.s of equation (150), which finishes the proof. □

Interacting theory: first quantization formalism
In this section, we extend the path sum formulae to the interacting theory. In this language, weights of Feynman graphs are given by summing over all possible maps from a Feynman graph to a spacetime graph where edges are mapped to paths. We also analyze the gluing formula in terms of path sums. 6.1. Closed graphs. We first consider the case of closed graphs. 6.1.1. Edge-to-path maps. Let Γ and X be graphs. Recall that by P X we denote the set of all paths in X, and by Π X the set of h-paths in X. Definition 6.1. An edge-to-path map F = (F V , F P ) from Γ to X is a pair of maps F V : V Γ → V X and F P : E(Γ) → P X such that for every edge e = (u, v) in Γ we have The set of edge-to-path maps is denoted P Γ X . Equivalently, an edge-to-path map is a lift of a map F V : Similarly, we define an edge-to-h-path map as a lift of a map F V : The set of such maps is denoted Π Γ X . Alternatively, an edge-to-path map can be thought of as labeling of Γ where we label vertices in Γ by vertices of X and edges in Γ by paths in X.

Feynman weights.
Suppose that Γ is a Feynman graph appearing in the perturbative partition function on a closed graph, with weight given by (87). By the results of the previous section, we have the following first quantization formula, a combinatorial analog of the first quantization formula (6): Proposition 6.2. The weight of the Feynman graph Γ has the path sum expression where in (151) we are summing over all edge-to-path maps from Γ to X, and in (152) we are summing over all edge-to-h-path maps. Figure 23 contains an example of an edge-to-path map from Γ the Θ-graph to a grid X. Figure 23. An example of an edge-to-path map.
We then have the following expression of the perturbative partition function: Corollary 6.3. The perturbative partition function of X is given in terms of edge-to-paths maps as We can reformulate this as the following "first quantization formula." Corollary 6.4. The logarithm of the perturbative partition function has the expression (154) log Z pert Here Γ conn stands for connected Feynman graphs.
We remark that in the second line of (154), one can interpret the first term as coming from an analog of edge-to-path maps for the circle, divided by automorphisms of such maps (the factor of 2 comes from orientation reversal). In this sense, the second line can be interpreted as the partition function of a 1d sigma model with target X. The term in the third line should be interpreted as a normalizing constant. 6.2. Relative version. Now we let X be a graph and Y a subgraph, and consider the interacting theory on X relative to Y . Recall that in the relative case, Feynman graphs Γ have vertices split into bulk and boundary vertices, with Feynman weight given by (89). Bulk vertices have valence at least 3, while boundary vertices are univalent. Again, we do not want to allow boundary-boundary edges. Edge-to-path maps now additionally have to respect the type of edge: bulk-bulk edges are mapped to paths in P X\Y and bulk-boundary edges are mapped to paths in P ′ X,Y . We collect this in following technical definition: Let X be a graph and Y ⊂ X be a subgraph. Then a relative edgeto-path map (resp. relative edge-to-h-path map) is a pair F = (F V , F P ) (resp. F = (F V , F Π )) where F V : V (Γ) → V (X) and F P : E(Γ) → P X (resp. • F E (resp. F Π ) is a lift of F V i.e. for all edges e = (u, v) ∈ E(Γ) we have F P (e) ∈ P X (F V (u), F V (v)) (resp. F Π (e) ∈ Π X (F V (u), F V (v))), • F P (resp. F Π ) respects the edge decompositions, i.e. F P (E bulk−bulk Γ ) ⊂ P X\Y , F P (E bulk−bdry Γ ) ⊂ P ′ X,Y , and similarly for F Π . The set of relative edge-to-(h-)path maps is denoted P Γ X,Y (resp. Π Γ X,Y ). Figure 24 contains an example of a relative edge-to-path map from Γ a Feynman graph with boundary vertices to a grid X relative to a subgraph Y .
X Y Figure 24. An example of a relative edge-to-path map.
We can now express the weight of a Feynman graph with boundary vertices as a sum over relative edge-to-path maps -the combinatorial analog of the first quantization formula (19): Proposition 6.6. Suppose that Γ is a Feynman graph with boundary vertices and ϕ ∈ C 0 (Y ). Then, the Feynman weight Φ Γ,(X,Y ) (ϕ Y ) can be expressed by summing over relative edge-to-path maps as In terms of h-paths, the expression is Proof. In (155) we are using the path sum formulae (134), (135)Similarly, to see (156) we are using the relative h-path sums (126), (132) and notice that every bulk-bulk Green's function comes with an additional power of m −2 . □ We immediately obtain the following formula for the partition function: Figure 25. Inferring a decoration of Γ from cutting an edgeto-path map Γ → X ′ ∪ Y X ′′ .
Recall that from a decorated graph, we can form two new graphs X ′ and X ′′ with boundary vertices. Given and edge-to-path map F and its induced decoration of Γ, we can define two new relative edge-to-path maps (F ′ V , F ′ P ) and (F ′′ V , F ′′ P ) for the new graphs X ′ and X ′′ as follows. The map F ′ V is simply the restriction of F V to vertices colored X ′ . For edges labeled u, F ′ P (e) = F P (e). For a bulk-boundary edge in X ′ , F ′ P (e) is the segment of the path F P (ẽ) of the corresponding edgeẽ in Γ (that was necessarily labeled c) up to (and including) the first vertex in Y . The construction of (F ′′ V , F ′′ P ) is similar, as is the extension to edge-to-hesitant-path maps. The definition of Γ ′ , Γ ′′ ensures that (F ′ V , F ′ P ) and (F ′′ V , F ′′ P ) are well-defined relative edgeto-path maps. For example, from the edge-to-path map in Figure 25, one obtains the two edge-to-path maps in Figure 26. Figure 26. Relative edge-to-path maps (F ′ V , F ′ P ) from Γ ′ to (X ′ , Y ) and (F ′′ V , F ′′ P ) fron Γ ′′ to (X ′′ , Y ) arising from the cutting of the Feynman graph Γ dec in Figure 25.
Notice that in the process of creating the cut edge-to-path-maps we are forgetting about the parts of the paths between the first and the last crossing of Y , as well as the vertices labelled with Y . This information is encoded in the Dirichlet-to-Neumann operator and the interacting term S int Y respectively. Integrating the product of a pair of relative edge-to-path maps appearing in the product Z pert X ′ ,Y (ϕ Y )Z pert X ′′ ,Y (ϕ Y ) over ϕ Y , two things happen: • An arbitrary number of vertices on Y is created (due to the factor of e − 1 ℏ S int Y (ϕ Y )). • All vertices on Y (the new boundary vertices and those coming from the relative edge-to-path maps) are connected by the inverse D of total Dirichlet-to-Neumann operators.
In this way, we obtain all edge-to-path maps that give rise to this pair of relative edge-to-path maps. This provides a sketch of an alternative proof of the gluing formula for perturbative partition functions using the first quantization formalism, i.e. path sums.

Conclusion and outlook
In this paper we analyzed a combinatorial toy model for massive scalar QFT, where the spacetime manifold is a graph. We focused on incarnations of locality -the behaviour under cutting and gluing -and the interplay with the first quantization formalism. In particular, we showed that the convergent functional integrals naturally define a functor with source a graph cobordism category and target the category of Hilbert spaces, and we proposed an extended version with values in commutative unital algebras. We discussed the perturbative theory -the ℏ → 0 limit -and its behaviour under cutting and gluing. Finally, we analyzed the theory in the first quantization formalism, where all objects have expressions in terms of sums over paths (or h-paths) in the spacetime graph. We showed that cutting and gluing interacts naturally with those path sums. Below we outline several promising directions for future research.
• Continuum limit, renormalization, extended QFTs. In this paper we discussed the behaviour of the theory in the continuum limit for line graphs only. However, our toy model is in principle dimension agnostic and makes sense on lattice graphs of any dimension, and one can take a similar continuum limit there. However, in the interacting theory in dimension d ≥ 2, one has to take into account the issue of divergencies and renormalization. 46 It will be interesting to see how this problem manifests itself in the continuum limit of a higherdimensional lattice graph, and whether this approach will be helpful in defining a renormalized massive scalar QFT with cutting and gluing. Furthermore, the extended QFT proposed in this paper could provide an insight in defining an extension of such a functorial QFT to higher codimensions. 47 Another interesting question in the continuum limit is to recover the first quantization path measure (in particular, the action functionals (5), (9)) from a limit of our weight system on paths on a dense lattice graph.
• Massless limit. Another interesting problem is the study of the limit m → 0. In this limit, the kinetic operator becomes degenerate if no boundary conditions are imposed, and extra work is needed to make sense of theory. 48 This will be particularly interesting in the case of two-dimensional lattice graphs, where the massless limit of the continuum theory is a conformal field theory (in the free case, p(ϕ) = 0), thus the massless limit of our toy model is a discrete model for this CFT. We also remark that while the h-path formulae do not interact well with the m → 0 limit, since they are expansions in m −2 , for path sums the weight of a path at m = 0 is i.e. the weight of the path is the probability of a random walk on the graph where at every vertex, the walk can continue along all adjacent edges with probability 1/val(v). • Gauge theories on cell complexes. Finally, it will be interesting to study in a similar fashion (including first quantization formalism) gauge theories (e.g. p-form electrodynamics, Yang-Mills or AKSZ 46 In d = 2, the only divergent subgraphs are short loops, but already those interact nontrivially with cutting and gluing -see [16]. 47 One approach to constructing a QFT with corners involves geometric quantization of the BV-BFV phase spaces attached to corners, [6,14], see also [24]. 48 In this case it is natural to formulate the perturbative quantum answers in terms of effective actions of the zero-mode of the field ϕ; it might be natural here to employ the BV-BFV formalism [7] combining effective actions with cutting-gluing. theories) on a cell complex, with gauge fields (and ghosts, higher ghosts and antifields) becoming cellular cochains. 49