Clifford Algebras Meet Tree Decompositions

We introduce the non-commutative subset convolution—a convolution of functions useful when working with determinant-based algorithms. In order to compute it efficiently, we take advantage of Clifford algebras, a generalization of quaternions used mainly in the quantum field theory. We apply this tool to speed up algorithms counting subgraphs parameterized by the treewidth of a graph. We present an \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$O^*((2^\omega + 1)^{tw})$$\end{document}O∗((2ω+1)tw)-time algorithm for counting Steiner trees and an \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$O^*((2^\omega + 2)^{tw})$$\end{document}O∗((2ω+2)tw)-time algorithm for counting Hamiltonian cycles, both of which improve the previously known upper bounds. These constitute also the best known running times of deterministic algorithms for decision versions of these problems and they match the best obtained running times for pathwidth parameterization under assumption \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\omega = 2$$\end{document}ω=2.


Introduction
The concept of treewidth has been introduced by Robertson and Seymour in their work on graph minors [13]. The treewidth of a graph is the smallest possible width of its tree decomposition, i.e., a tree-like representation of the graph. Its importance follows from the fact that many NP-hard graph problems become solvable on trees with a simple dynamical programming algorithm. A similar idea of pathwidth captures the width of a graph in case we would like to have a path decomposition. Formal definitions can be found in Sect. 2.2.
Having a tree decomposition of bounded width allows to design efficient algorithms using fixed-parameter tractability. An algorithm is called fixed-parameter tractable (FPT) if it works in time complexity f (k)n O (1) where k is a parameter describing hardness of the instance and f is a computable function. We also use notation O * ( f (k)) This work is partially supported by Foundation for Polish Science Grant HOMING PLUS/2012-6/2 and a project TOTAL that has received funding from the European Research Council (ERC) under the European Unions Horizon 2020 research and innovation programme (Grant Agreement No. 677651).
Our first observation is that the FSC technique can be regarded as an isomorphism theorem for some associative algebras. To put it briefly, a Fourier-like transform is being performed in the FSC to bring computations to a simpler algebra. Interestingly, this kind of transform is just a special case of the Artin-Wedderburn theorem [1], which seemingly is not widely reported in computer science articles. The theorem provides a classification of a large class of associative algebras, not necessarily commutative (more in "Appendix A"). We use this theory to introduce the Non-commutative Subset Convolution (NSC) and speed up multiplication operations in an algebra induced by the join operation in determinant-based dynamic programming on tree decomposition. An important building block is a fast Fourier-like transform for a closely related algebra [11]. We hope our work will encourage researchers to investigate further algorithmic applications of the Artin-Wedderburn theorem.

Our Results
We apply our algebraic technique to the determinant approach introduced by Bodlaender et al. [4]. For path decomposition, they gave an O * (5 pw )-time algorithm for counting Steiner trees and an O * (6 pw )-time algorithm for counting Hamiltonian cycles. The running times for tree decomposition were respectively O * (10 tw ) and O * (15 tw ). These gaps can be explained by the appearance of the join operation in tree decompositions which could not be handled efficiently so far.
By performing NSC in time complexity O * (2 ωn 2 ) we partially solve an open problem stated by the FPT community. 1 Our further results may be considered similar to those closing the gap between time complexities for pathwidth and treewidth parameterizations for Dominating Set by switching between representations of states in dynamic programming [14]. We improve the running times to O * ((2 ω + 1) tw ) for counting Steiner trees and O * ((2 ω + 2) tw ) for counting Hamiltonian cycles, where ω denotes the matrix multiplication exponent (currently it is established that ω < 2.373 [15]). These are not only the fastest known algorithms for counting these objects, but also the fastest known deterministic algorithms for the decision versions of these problems.
Observe that the running times for pathwidth and treewidth parameterizations match under the assumption ω = 2. Though we do not hope for settling the actual value of ω, this indicates there is no further space for significant improvement unless pure combinatorial algorithms (i.e., not based on matrix multiplication) are invented or the running time for pathwidth parameterization is improved.

Organization of the Paper
Section 3 provides a brief introduction to Clifford algebras. The bigger picture of the employed algebraic theory can be found in "Appendix A". In Sect. 4 we define the NSC and design efficient algorithms for variants of the NSC employing the algebraic tools. Sections 5 and 6 present how to apply the NSC in counting algorithms for Steiner Tree and Hamiltonian Cycle. They contain main ideas improving the running times, however in order to understand the algorithms completely one should start from Sect. 4 (Determinant approach) in [4]. The algorithm for Hamiltonian Cycle is definitely more complex and its details, formulated as two isomorphism theorems, are placed in "Appendix C".

Preliminaries
We will start with notation conventions.
[α] equals 1 if condition α holds and 0 otherwise. 4. For permutation f of a linearly ordered set U

For A, B being subsets of a linearly ordered set
Let us note two simple properties of I .

Fast Subset Convolution
Let us consider a universe U of size n and functions f , g : 2 U −→ Z.

Definition 1
The Möbius transform of f is functionf defined aŝ Definition 2 Let f * g denote a subset convolution of f , g defined as Theorem 3 (Björklund et al. [2]) The Möbius transform, its inverse, and the subset convolution can be computed in time O * (2 n ).

Pathwidth and Treewidth
Definition 3 A tree (path) decomposition of a graph G is a tree T (path P) in which each node x is assigned a bag B x ⊆ V (G) such that 1. for every edge uv ∈ E(G) there is a bag B x containing u and v, 2. for every vertex v the set {x | v ∈ B x } forms a non-empty subtree (subpath) in the decomposition.
The width of the decomposition is defined as max x |B x | − 1 and the treewidth (pathwidth) of G is a minimum width over all possible tree (path) decompositions.
If a graph admits a tree decomposition of width t then it can be found in time n · 2 O(t 3 ) [3] and a decomposition of width at most 4t + 1 can be constructed in time poly(n) · 2 O(t) [10]. We will assume that a decomposition of the appropriate type and width is given as a part of the input.

Definition 4
A nice tree (path) decomposition is a decomposition with one special node r called the root and in which each bag is one of the following types: 1. Leaf bag a leaf x with B x = ∅, 2. Introduce vertex v bag a node x having one child y for which B x = B y {v}, 3. Forget vertex v bag a node x having one child y for which B y = B x {v}, 4. Introduce edge uv bag a node x having one child y for which u, v ∈ B x = B y , 5. Join bag (only in tree decomposition) a node x having two children y, z with condition B x = B y = B z .
We require that every edge from E(G) is introduced exactly once and B r is an empty bag. For each x we define V x and E x to be sets of respectively vertices and edges introduced in the subtree of the decomposition rooted at x.
Given a tree (path) decomposition we can find a nice decomposition of the same width in time n · tw O (1) [8,10] and we will work only with these. When analyzing running time of algorithms working on tree decompositions we will estimate the bag sizes from the above assuming |B x | = tw.

Problems Definitions
Steiner Tree Input: graph G, set of terminals K ⊆ V (G), integer k Decide: whether there is a subtree of G with at most k edges connecting all vertices from K Hamiltonian Cycle Input: graph G Decide: whether there is a cycle going through every vertex of G exactly once In the counting variants of problems we ask for a number of structures satisfying the given conditions. This setting is at least as hard as the decision variant.

Clifford Algebras
Some terms used in this section originate from the advanced algebra. For better understanding we suggest reading "Appendix A".

Definition 5
The Clifford algebra Cl p,q (R) is a 2 p+q -dimensional associative algebra over a ring R. It is generated by These are rules of multiplication of generators: 1. e is a neutral element of multiplication, 2.
All products (with respect to the ordering of elements) of 2 p+q sets of generators form a linear basis of Cl p,q (R) and e is treated as a product of an empty set. We provide a standard addition and we extend multiplication for all elements in an associative way.
We will be mostly interested in Cl n,0 (Z) 2 and its natural embedding into Cl n,0 (R). As q = 0, we can neglect condition 3 when analyzing these algebras. For where the meaning of I A,B is explained in (1). Since the Clifford algebra over R is semisimple, it is isomorphic to a product of matrix algebras by the Artin-Wedderburn theorem (see Theorem 11). However, it is more convenient to first embed Cl n,0 (R) in a different Clifford algebra that is isomorphic to a single matrix algebra. As a result, we obtain a monomorphism φ : Definition 10) where m = n 2 + O(1) and the following diagram commutes ( * stands for multiplication).
Thus, we can perform multiplication in the structure that is more convenient for us. For a, b ∈ Cl n,0 (Z) we can treat them as elements of Cl n,0 (R), find matrices φ(a) and φ(b), multiply them efficiently, and then invert the φ transform. The result always exists and belongs to Cl n,0 (Z) because Cl n,0 (Z) is closed under multiplication. The monomorphism φ : Cl n,0 (R) −→ M 2 m (R) can be performed and inverted (within the image) in O * (2 n ) time [11]. However, the algorithm in [11] is analyzed in the infinite precision model. For the sake of completeness, we revisit this construction and prove the following theorem in "Appendix B".

Theorem 4
The multiplication in Cl n,0 (Z), with coefficients having poly(n) number of bits, can be performed in time O * (2 ωn 2 ).
In order to unify the notation we will represent each element of Cl n,0 (Z) , that We introduce S convolution as an equivalence of multiplication in Cl n,0 (Z) . The equation (2) can be now rewritten in a more compact form

Non-commutative Subset Convolution
We consider a linearly ordered universe U of size n and functions f , g : 2 U −→ Z.

Theorem 5 NSC on an n-element universe can be performed in time O
Alternatively, we can write where f i (X ) = f (X ) |X | = i and likewise for g. The S convolution, introduced in (4), is equivalent to multiplication in Cl n,0 (R) . This means we reduced NSC to O(n 2 ) multiplications in Cl n,0 (R) which could be performed in time O * (2 ωn 2 ) according to Theorem 4.

Remark 1
The technique of grouping the sizes of sets with polynomial burden in the running time will turn useful in further proofs. We will call it size-grouping.
In our applications we will need to compute a slightly more complex convolution.
Theorem 6 NSC2 on an n-element universe can be performed in time O * (2 ωn ).
Proof Let us introduce a new universe U = U X ∪ U Y of size 2n consisting of two copies of U with an order so each element of U Y is greater than any element of U X . To underline that X ⊆ U X , Y ⊆ U Y we will use notation when summing subsets of U X and U Y . In order to reduce NSC2 to NSC on the universe U we need to replace factor I X 1 , The latter term can be expressed as ,X 2 depends only on the sizes of Y 1 and X 2 . To summarize, To deal with factor (−1) |Y 1 ||X 2 | we have to split the convolution into 4 parts for different parities of Now we can reduce NSC2 to 4 simpler convolutions.
We have shown that computing NSC2 is as easy as NSC on a universe of size twice the original universe size. Using Theorem 5 directly gives us the desired complexity.

Counting Steiner Trees
We will revisit the theorem stated in the aforementioned work. Both algorithms use dynamic programming over tree or path decompositions. We consider vertices in a particular decomposition-based order and fix vertex v 1 ∈ K , where K is the set of terminals. Let A = (a v,e ) v∈V ,e∈E be the incidence matrix, i.e., for e = uv, u < v we have a u,e = 1, a v,e = −1, and a w,e = 0 for any other vertex Y ) forms a tree and 0 otherwise. The main idea of the algorithm is to express the number of Steiner trees for terminal set K with exactly i edges as We consider partial sums representing summands belonging to the subtree of a decomposition node x. We exploit the permutation formula for determinant and introduce functions s 1 , s 2 to control the image of permutations (there are two permutations in each summand since we expand a square of determinant) within the bag B x . We also introduce function s Y indicating which vertices belong to Y ∩ B x . For node x of the decomposition we define function A x with arguments 0 ,e a f 2 (e),e (5) Then the number of Steiner trees with exactly i edges becomes A r (i +1, ∅, ∅, ∅) [4]. As observed therein, condition s Y (v) = 0 implies that either s 1 This means there are at most n · 5 tw triples for which A x returns a nonzero value.
For a node x of type introduce vertex, introduce edge, or forget vertex, with a child y, the function A x can be computed from A y in linear time with respect to the number of non-trivial states. This observation leads to a proof of Theorem 7 for path decompositions. The only thing that is more difficult for tree decompositions is that they include also join nodes having two children each. Here is the recursive formula 3 for A x for a join node x with children y, z.
The next lemma, however not stated explicitly in the discussed work, follows from the proof of Theorem 7 (Theorem 4.4 in [4]). (6) with running time f (tw). Then the number of Steiner trees of size i in a graph G can be counted in O * (max( f (tw), 5 tw )) time if a tree decomposition of width tw is given.

Lemma 1 Assume there is an algorithm computing all nonzero values of A x given by
We will change notation for our convenience. Each function s i will be matched with set s −1 i (1). Let us replace functions A x , A y , A z with h i , f i , g i having first argument fixed and operating on triples of sets. In this setting, the convolution can we written as Observe that size-grouping allows us to neglect the restrictions for i, i y , i z . Hence, we can work with a simpler formula The only triples (s Y (v), s 1 (v), s 2 (v)) allowed for each vertex v are (0, 0, 0), (1, 0, 0), (1, 0, 1), (1, 1, 0), (1, 1, 1). In terms of set notation we can say that if

Lemma 2 For fixed A all values h(A, B, C) can be computed in time O * (2 ω|A| ).
Proof We want to compute what can be done in time O * (2 ω|A| ) according to Theorem 6.
Proof We use size-grouping to reduce the problem to computing (8). Then we iterate through all possible sets A and take advantage of Lemma 2. The total number of operations (modulo polynomial factor) is bounded by Keeping in mind that (6) and (7) are equivalent and combining Lemmas 1 and 3, we obtain the following result.

Theorem 8 The number of Steiner trees of size i in a graph G can be computed in
time if a tree decomposition of width tw is given.

Counting Hamiltonian Cycles
Likewise in the previous section, we will start with a previously known theorem.

Theorem 9 (Bodlaender et al. [4]) There exist algorithms that given a graph G count the number of Hamiltonian cycles in O * (6 pw ) time if a path decomposition of width pw is given, and in O * (15 tw ) time if a tree decomposition of width tw is given.
We again consider vertices in a particular decomposition-based order and fix an arbitrary vertex v 1 . For a subset S ⊆ E let A S be the submatrix of the incidence matrix A (see previous section) with rows from V \ {v 1 } and columns from S. We express the number of Hamiltonian cycles as We again consider partial sums representing summands belonging to the subtree of a decomposition node x and introduce functions s 1 , s 2 to keep track of permutations' images within the bag B x . The function s deg controls the degree of a vertex within B X . The notation is analogous to (5). For each node x of the decomposition function A x is defined with arguments s 1 , ,e a f 2 (e),e (9) The number of Hamiltonian cycles can be then expressed as A r (∅, ∅, ∅)/n. As observed in [4] we can restrict ourselves only to some subspace of states. When s deg (v) = 0 then all non-zero summands in (9) satisfy s 1 (v) = s 2 (v) = 0. When s deg (v) = 2 then we can neglect all summands except for those satisfying s 1 This time there are at most 6 tw triples for which A x returns a nonzero value. We again argue that introduce vertex, introduce edge, and forget vertex nodes can be handled the same way as for the path decomposition and the only bottleneck is formed by join nodes. We present a formula for A x if x is a join node with children y, z.
Analogously to the algorithm for Steiner Tree, we formulate our claim as a lemma following from the proof of Theorem 9 (Theorem 4.3 in [4]).

Lemma 4 Assume there is an algorithm computing all nonzero values of A x given by (10) with running time f (tw). Then the number of Hamiltonian cycles in a graph G can be counted in O * (max( f (tw), 6 tw )) time if a tree decomposition of width tw is given.
The only allowed triples of (1, 0, 1), (1, 1, 0), (1, 1, 1), (2, 1, 1).  Therefore we can treat function s deg as a binary one. We unify the notation by representing functions s i with the corresponding sets s −1 i (1). We replace functions A x , A y , A z with their counterparts h, f , g operating on triples of sets. For example,

Lemma 5 Assume the Eq. (10) holds. Then it remains true after the following translation of the set of allowed triples s deg
In this setting, the convolution looks as follows.

h(A, B, C) =
Performing convolution (11) within the space of allowed triples involves more sophisticated techniques than those in Sect. 5. Therefore the proof of the following lemma is postponed to "Appendix C".
This result, together with Lemmas 4 and 5, leads to the main theorem of this section.

Conclusions
We have presented the Non-commutative Subset Convolution, a new algebraic tool in algorithmics based on the theory of Clifford algebras. This allowed us to construct faster deterministic algorithms for Steiner Tree, Feedback Vertex Set, and Hamiltonian Cycle, parameterized by the treewidth. As the determinant-based approach applies to all problems solvable by the Cut & Count technique [4,8], the NSC can improve running times for a larger class of problems.
The first open question is whether the gap between time complexities for the decision and counting versions of these problems could be closed. Or maybe one can prove this gap inevitable under a well-established assumption, e.g., SETH?
The second question is if it is possible to prove a generic theorem so the lemmas like 3 or 6 would follow from it easily. It might be possible to characterize convolution algebras that are semisimple and algorithmically construct isomorphisms with their canonical forms described by the Artin-Wedderburn theorem.
The last question is what other applications of Clifford algebras and Artin-Wedderburn theorem can be found in algorithmics.
Monomorphisms of algebras turn out extremely useful when multiplication in algebra B is simpler than multiplication in A, because we can compute ab as φ −1 φ(a)φ(b) . This observation is used in Theorem 4 and Lemmas 6, 7. For a better intuition, we depict the various ways of performing multiplication on diagrams (3,14). The next definition is necessary to exclude some cases of obscure algebras.

Definition 12 An algebra
The theorem below has been stated in full generality for algebras over arbitrary rings but we will formulate its simpler version for fields.

Theorem 11 (Artin-Wedderburn [1]) Every finite-dimensional associative semisimple algebra A over a field K is isomorphic to a product of matrix algebras
where K i are fields containing K .
The related isomorphism is called a generalized Fourier transform (GFT) for A. If we are able to perform GFT efficiently then we can reduce computations in A to matrix multiplication. For some classes of algebras, e.g., abelian group algebras, there are known algorithms for GFT with running time O(n log n) where n = dim A [12].
If the field K is algebraically closed (e.g., C) then all K i = K and m i=1 n 2 i equals the dimension of A. If the algebra A is commutative then all n i = 1 and A is isomorphic to a product of fields. This is actually the case in the Fast Subset Convolution [2], where the isomorphism is given by the Möbius transform.

B Proof of Theorem 4
Proof The transformation φ can be computed and inverted (within the image) in time O * (2 n ) assuming infinite precision and O(1) time for any arithmetic operation [11]. In order to compute φ accurately in the RAM model, we need to look inside the paper [11]. The formulas therein are based on the work of Cnops [5].
Transformation φ can be represented as φ = γ • υ where υ is a monomorphic embedding into another Clifford algebra and γ is an isomorphism with the matrix algebra. We modify the commutative isomorphism diagram (3) to illustrate these mappings in more detail.
We begin with embedding υ : Cl n,0 (R) −→ Cl m,m (R) where m = n 2 + O(1) (see Definition 4.4 in [11]). Transformation υ is just a translation of basis so no arithmetic operations are involved.
For the sake of disambiguation, we indicate the domain of the function γ with a lower index: γ k : Cl k,k (R) −→ M 2 k (R). In the k-th step, we construct a matrix representation of y ∈ Cl k,k (R). Let y + , y − denote the projections of y onto subspaces spanned by products of respectively even and odd number of generators. 4 Of course, y = y + + y − and γ k (y) = γ k (y + ) + γ k (y − ), since the mapping is linear. Such an element y can be represented as y = a +bx − +cx + +dx − x + for x + , x − being the generators with indices 1,k (we have x 2 + = e, x 2 − = −e) and a, b, c, d ∈ Cl k−1,k−1 (R). Now we can apply the recursive formula from Theorem 5.2 in [11]: where γ k−1 (M) stands for a block matrix with γ k−1 applied to each element of M. We see that computing γ k (y + ), γ k (y − ) can be reduced to computing 4 analogous pairs for k − 1 and combining them using addition and subtraction. Hence, the coefficients of the obtained matrix will also be integers with poly(n) number of bits and the total number of arithmetic operations is O(m4 m ) = O(n2 n ).
The inverse transform γ −1 is also computed in m steps and we continue using lower index to indicate the domain alike for the forward transform. Let Y ∈ M 2 k (Z) and Then from Theorem 7.1 in [11] we know that whereŷ = y + − y − and the rest of notation is as above. We can reduce computing γ −1 k to 4 queries from (k − 1)-th step so the total number of arithmetic operations is O(m4 m ) = O(n2 n ). This time the coefficients at each step are given as sums of elements from the previous step divided by 2. We do not need to prove that they remain integer at all steps because we can postpone the division until the last step. As long as γ −1 (Y ) is a product of two elements from Cl m,m (Z), it is guaranteed that the numbers in the last step are integers and our variables are divisible by 2 m . What is more, if we know that γ −1 (Y ) ∈ υ(Cl n,0 (Z)) then we can revert the υ transform and obtain φ −1 (Y ).
We have proven that we can switch representation between Cl n,0 (Z) and

C Proof of Lemma 6
This section reduces the algorithm for Hamiltonian Cycle to two isomorphism theorems and we suggest reading "Appendix A" first. Our goal is to compute values of h for the allowed triples assuming that non-zero values of f , g also occur only for the allowed triples.
Taking advantage of the size-grouping technique (see Observation 1) we can replace condition A 1 A 2 = A with A 1 ∪ A 2 = A and focus on the following convolution.
Let Ham be a subspace of 2 U × 2 U × 2 U −→ Z given by functions admitting only the allowed triples (see Lemma 5), i.e., f ∈ Ham ∧ f (A, B, C) = 0 implies A ∩ (B C) = C\B. Observe that Ham is closed under the operation so it can be regarded as a 6 tw -dimensional algebra. Let H D be an algebra over space 2 U \D × 2 D × 2 D −→ Z with multiplication given by the operator defined as To estimate the total number of operations consider all choices of F. The partition into F = B 1 C 1 can be done in 2 |F| ways, the set H can be chosen in 2 |U \F| ways, and for such triple we have to perform the γ B 1 ,C 1 ,H transform (or its inverse) what involves O * (2 |U \F| ) operations. Hence, the total running time (modulo polynomial factors) is

Proof of Lemma 8
Applying the size-grouping (see Remark 1) allows us to neglect factor (−1) |E 1 |(|B 2 |+|C 2 |) and replace condition Therefore it suffices to perform the convolution on H D (the same as in (13)). F, B, C).
Transform μ and its inverse can be computed using Möbius transform (see Theorem 3) in time O * (2 |U \D| ) for all E and a fixed pair of sets B, C. We perform it for all 4 |D| such pairs.
It turns out that μ is an isomorphism between (H D , ) and a product of all algebras given by images of μ E for E ⊆ U \D (see Definitions 9, 10) with multiplication given by NSC2, i.e., (μ E f ) 2 (μ E g) = μ E ( f g). We can again switch the representation of the algebra, multiply the elements on all coordinates given by E, and then revert the isomorphism. The computations below show that μ is a homomorphism of algebras and we know already that μ is reversible. ( To perform multiplication of μ(a) and μ(b), where a, b ∈ H D , we have to perform NSC2 (O * (2 ω|D| ) time complexity, see Theorem 6) for each E ⊆ U \D, what results in desired running time.

Proof of Lemma 9
We need to show that for each B, C ⊆ D, D ∩ E = ∅ it is (τ D ( f g))(E, B, C) = ((τ D f ) (τ D g))(E, B, C). Let us start with unrolling the formula for τ D ( f g). Keeping in mind that B ∩ E = C ∩ E = ∅ we can see that On the other hand, we have We want to argue that all non-zero summands of (16) satisfy E 1 = F 1 , E 2 = F 2 . Indeed, let us assume v ∈ F 1 \E 1 . As v ∈ E so v / ∈ D ⊇ A, B, C and [v ∈ [v ∈ C 2 ∪ F 2 ] = (0, 0, 1) and g(A 2 , B 2 ∪ E 2 , C 2 ∪ F 1 ) = 0. The same arguments can be used if v ∈ E 2 F 2 . Now we just need to prove that for E 1 = F 1 , E 2 = F 2 the I factors in (16) and (17) are equivalent. We apply Observation 2 to I B 1 ∪E 1 ,B 2 ∪E 2 I C 1 ∪E 1 ,C 2 ∪E 2 . We can omit factor I 2 E 1 ,E 2 = 1 as well as I B 1 ,B 2 I C 1 ,C 2 appearing also in (17). What is left to prove is that I B 1 ,E 2 I E 1 ,B 2 I B,E = I B 1 ,E 1 I B 2 ,E 2 (−1) |E 1 ||B 2 | , I C 1 ,E 2 I E 1 ,C 2 I C,E = I C 1 ,E 1 I C 2 ,E 2 (−1) |E 1 ||C 2 | .
According to Observation 1 we can replace I E 1 ,B 2 (−1) |E 1 ||B 2 | with I B 2 ,E 1 what reduces the formula in the first row to Observation 2 for B = B 1 B 2 , E = E 1 E 2 . Applying analogous transformation to the second row finishes the proof.