• No results found

Extensions of the main theorem

In this section we will establish the extensions of Theorem 5.3 mentioned in the intro- duction.

5.4.1 Simulating an unbounded degree problem

To extend Lemma 5.31 from non-delta-matroids to non-terraced weight-functions, rather than reducing#CSP(F) to#CSP=2(F), we will reduce from a #CSP using functions of the formT⊗kF and T⊗k(F G).

Definition 5.33. For any weighted constraint languageF defineTF1 andTF2 by

TF1 ={T⊗kF |F is an arity k function inF for some k≥0}

TF2 ={T⊗k(F G)|F and Gare aritykfunctions in F for some k≥0}.

Lemma 5.34. Let F be a finite weighted constraint language. Let T ∈Q2×2.

1. If F contains some G: {0,1}3

Q≥0 such that for all x, y ∈ {0,1} we have

G(1,0, y) = 0 andG(x, x, y) =Tx,y, then #CSP(TF1)

2. If F contains some G: {0,1}4

Q≥0 such that for all x, y, y0 ∈ {0,1} we have

G(1,0, y, y0) = 0andG(x, x, y, y0) = EQ2(y, y0)Tx,y, then#CSP(TF2)≤AP #CSP=2(F).

Proof. (1.) The reduction is given an instance (V, C) of #CSP(TF1). We may assume

that every variable has non-zero degree. It will be convenient to label the functions and variables used by constraints as c = h(vc,1, . . . , vc,kc), T⊗kcFci for c ∈ C. We wish to

approximate ZV,C = X z∈{0,1}V Y c∈C (T⊗kcFc)(z(vc,1), . . . ,z(vc,kc)).

We will enumerate each use of each variable in the following way. DefineL={(v, d)| v ∈ V,1 ≤ d ≤ degC(v)} and R = {(c, j) | c ∈ C,1 ≤ j ≤ kc}. There is a bijection g : L → R where g(v, i) = (c, j) means that that i’th occurrence of v, according to a fixed enumeration ofC, is as thej’th variable in the constraintc. In other words, for all

c∈C, for all1≤i≤kc there exists 1≤j≤degC(vc,i) such thatg(vc,i, j) = (c, i).

Define (V0, C0) to be the instance of#CSP=2(F) where:

• the variable setV0 is the disjoint union ofL andR,

• there is one constrainth((v, d−1),(v, d), g(v, d)), Gifor each pair(v, d)∈L, where

(v,0)means (v,degC(v)), and also

• there is one constrainth((c,1), . . . ,(c, kc)), Fci for eachc∈C.

Thus ZV0,C0 = X x,y   Y v,d G(x(v, d−1),x(v, d),y(g(v, d)))   Y c Fc(y(c,1), . . . ,y(c, kc)) ! .

Here, and for the rest of the proof of case (1.), indices c, j, v, d range over c ∈ C

and 1 ≤ j ≤ kc and v ∈ V and 1 ≤ d ≤ degC(v). The variables x,y,z range over

x:L→ {0,1} andy:R → {0,1} andz:V → {0,1}. And x(v,0)means x(v,degC(v)). The reduction queries the #CSP=2(F) oracle on (V0, C0), passing through the error parameter, and returns the result. To show that the reduction is correct we will show thatZV,C =ZV0,C0. Define

ZTerms(z) =Y c (T⊗kcFc)(z(vc,1), . . . ,z(vc,kc)) YZTrans(y,z) =Y c,j Tz(vc,j),y(c,j) YTerms(y) =Y c Fc(y(c,1), . . . ,y(c, kc)) XEq(x) =Y v EQdeg C(v)(x(v,1),· · · ,x(v,degC(v))) XYTrans(x,y) =Y v,d Tx(v,d),y(g(v,d)) XYGTrans(x,y) =Y v,d G(x(v, d−1),x(v, d),y(g(v, d))) Note:

• For fixed z we have ZTerms(z) = P

yYZTrans(y,z)YTerms(y) by expanding the

definition of T⊗kcF c.

• Summing overxwith the factorXEq(x)is the same as summing overzand defining

xbyx(v, d) =z(v). Hence summing overxwith the factorXEq(x)XYTrans(x,y)

is the same as summing over zwith the factor YZTrans(y,z).

• Fix x and y. If XEq(x) = 1 then XYTrans(x,y) = XYGTrans(x,y) by defi- nition of G. And if XEq(x) is zero then so is XYGTrans(x,y), which implies

XEq(x)XYTrans(x,y) = XYGTrans(x,y) = 0.

Hence ZV,C= X z ZTerms(z) =X y,z YZTrans(y,z)YTerms(y) =X x,y

XEq(x)XYTrans(x,y)YTerms(y)

=X x,y

XYGTrans(x,y)YTerms(y)

=ZV0,C0

(2.) The reduction is given an instance (V, C) of #CSP(TF2). We may assume

that every variable has non-zero degree. It will be convenient to label the functions and variables used by constraints as c=h(vc,1, . . . , vc,kc), T⊗kc(Fc,1Fc,2)i for c∈C. We wish

to approximate ZV,C= X z∈{0,1}V Y c∈C (T⊗kc(Fc,1Fc,2))(z(vc,1), . . . ,z(vc,kc)).

Let L, R, g be defined as before. Define (V0, C0) to be the instance of #CSP=2(F)

where:

• the variable set is the disjoint union ofL and R× {1,2},

• there is one constraint h((v, d−1),(v, d),(g(v, d),1),(g(v, d),2)), Gi for each pair

(v, d)∈L, where(v,0)means (v,degC(v)), and also

• there is one constraint h(((c,1), b), . . . ,((c, kc), b)), Fc,bi for each c ∈ C and each b∈ {1,2}. Thus ZV0,C0 = X x,y   Y v,d G(x(v, d−1),x(v, d),y(g(v, d),1),y(g(v, d),2))   ·   Y c,b Fc,b(y((c,1), b), . . . ,y((c, kc), b))  .

Here and for the rest of the proof, indicesc, j, b, v, drange overc∈Cand 1≤j≤kc

and b ∈ {1,2} and v ∈ V and 1 ≤ d ≤ degC(v). The variables x,y,z range over

x:L→ {0,1} and y:R× {1,2} → {0,1}and z:V → {0,1}. As before, x(v,0)means

x(v,degC(v)).

The reduction queries the #CSP=2(F) oracle on (V0, C0), passing through the error parameter, and returns the result. To show that the reduction is correct we will show thatZV,C =ZV0,C0. Define ZTerms(z) =Y c (T⊗kc(Fc,1Fc,2))(z(vc,1), . . . ,z(vc,kc)) YZTrans(y,z) =Y c,j EQ2(y((c, j),1),y((c, j),2))Tz(vc,j),y((c,j),1) YTerms(y) =Y c,b Fc,b(y((c,1), b), . . . ,y((c, kc), b)) XEq(x) =Y v EQdeg

C(v)(x(v,1), . . . ,x(v,degC(v))) (as in case (1.))

XYTrans(x,y) =Y v,d EQ2(y(g(v, d),1),y(g(v, d),2))Tx(v,d),y(g(v,d),1) XYGTrans(x,y) =Y v,d G(x(v, d−1),x(v, d),y(g(v, d),1),y(g(v, d),2))

As in case (1.) we have ZTerms(z) = P

yYZTrans(y,z)YTerms(y) by expanding

the definition of T⊗kc(F

c,1Fc,2). The rest of the argument is identical to case (1.) and

we getZV,C =ZV0,C0.

5.4.2 Pinnings

As in the main theorem, we will use pinnings. The following lemma gives the necessary analogue of Lemma 5.25.

Lemma 5.35. Let F be a finite weighted constraint language. Let F0 be a copy of a pinning of a weight-function F ∈ F. Let (1,0),(0,1) ∈ W ⊆ Q≥0 ×Q≥0. Then

#CSPW=2(F ∪ {F0,PIN0,PIN1})≤AP#CSPW=2(F).

Proof. As in Lemma 5.25, it suffices to show that #CSPW=2(F ∪ {PIN0,PIN1}) ≤AP

#CSPW=2(F). The reduction is given an instance(V, C, w)of#CSPW=2(F ∪ {PIN0,PIN1})

and an error parameter ε. If h(v),PIN0i,h(v),PIN1i ∈ C for some v ∈ V then the

reduction can correctly output ZV,C,w = 0, so we will assume this does not occur. We will define an instance (V0, C0, w0) of #CSPW=2(F) such that ZV,C,w can be computed

easily fromZV0,C0,w0.

Let CF be the list of constraints in C that do not use PIN0 or PIN1. For each

d∈ {0,1,2}letVd={v|degCF(v) =d}. LetV

0 be the disjoint union ofV

2× {0,1} and

V1. For eachi∈ {0,1}definesi:V1∪V2 →V0 by

si(v) =    v if v∈V1, and (v, i) otherwise.

LetC0be the list with the two constraintsh(s0(v1), . . . , s0(vk)), Fiandh(s1(v1), . . . , s1(vk)), Fi

for each constrainth(v1, . . . , vk), Fi ∈C. Define w0:V0 →W by

w0(v) = (1,0) for v∈V1 whereh(v),PIN0i ∈C

w0(v) = (0,1) for v∈V1 whereh(v),PIN1i ∈C

w0(v, i) =w(v) for allv∈V2 and i∈ {0,1}.

For eachv∈V0∪V1 there is a unique p(v)∈ {0,1} such thath(v),PINp(v)i ∈C. Define

K0 =Qv∈V0w(v)p(v) and K1 = Q v∈V1w(v)p(v). Then ZV,C,w2 =K02 X x∈{0,1}V0 wtV1∪V2,CF,w|V1∪V2(x◦s0) wtV1∪V2,CF,w|V1∪V2(x◦s1) =K 2 0K12ZV0,C0,w0.

The reduction should call the oracle on (V0, C0, w0) with error parameter ε to obtain a value Z0 satisfying e−ε/2p

ZV0,C0,w0 ≤

Z0 eε/2p

ZV0,C0,w0 (with probability at least

3/4) then compute a rational Z00 such that e−ε/2√Z0 ≤ Z00 ≤ eε/2√Z0, then return

Since the constraint language is no longer restricted to relations, to show #BIS- and #SAT-hardness we will require some observations about weight-functions that are pinning-minimal subject to various conditions.

Lemma 5.36. Let F be a pinning-minimal weight-function subject to not being log- supermodular. Then supp(F)⊆ {0,x,x,1} for some x.

Proof. For allx,y such that F(x∧y)F(x∨y)< F(x)F(y), the pinning ofF by {i7→ xi | xi = yi} is not log-supermodular so y =x. Taking the contrapositive, for all y,z

such that z 6= y we have F(z ∧y)F(z ∨y) ≥ F(z)F(y). And there exists x with

F(0)F(1)< F(x)F(x). Let z∈ {0,/ 1,x,x}. Then

F(x∧z)F(x∨z)≥F(x)F(z) F(x∧z)F(x∨z)≥F(x)F(z) F(0)F(z)≥F(x∧z)F(x∧z) F(z)F(1)≥F(x∨z)F(x∨z)

In each case we have used the fact that the configurations on the right-hand-side are not complements, or, equivalently, the configurations on the left-hand-side are not0 and1.

Multiplying these four inequalities we get F(0)F(1)C≥F(x)F(x)C where

C=F(z)2F(x∧z)F(x∨z)F(x∧z)F(x∨z)≥F(x)F(x)F(z)4.

ButF(0)F(1)< F(x)F(x) soC= 0 and hence F(z) = 0.

Lemma 5.37. Let R be a pinning-minimal relation subject to not being closed under joins (so there exists x,y∈R such that x∨y∈/R). ThenR={0,x,x} or R={x,x}.

Proof. For all x,y ∈ R withx∨y∈/ R, the pinning of R by {i 7→ xi |xi = yi} is not closed under joins soy=x. Hence there exists xwithx,x∈R, and1∈/R. Also, taking contrapositives, if y,z∈R andy6=z theny∨z∈R.

Consider y∈R\ {x,x}. By the previous paragraph,x∨y∈R and x∨y∈R. But

(x∨y)∨(x∨y) = 1 ∈/ R, so x∨y is the complement of x∨y. Hence max(xi, yi) = 1−max(1−xi, yi) = min(xi,1−yi) for all variablesi, which implies y= 0.

Recall that F is IM-terraced if for all partial configurationsp such that the pinning

F(p,·)is identically zero, for alli, j∈dompsuch thatpi 6=pj, the pinningsF(p⊕ {i},·)

and F(p⊕ {j},·) are parallel.

Lemma 5.38. For every weight-function Gthat is pinning-minimal subject to not being IM-terraced, there is a copy F:{0,1}k

Q≥0 of G such that:

• there exists a configuration z of {3,4,· · · , k} and a non-singular matrix T ∈Q2×2

such that for all x, y3,· · · , yk∈ {0,1} we have

F(x, x, y3,· · · , yk) =    Tx,y3 if y=z or y=z 0 otherwise.

Proof. Consider an arbitrary weight-functionG:{0,1}V

Q≥0that is pinning-minimal

subject to not being IM-terraced. SinceGis not IM-terraced there exist p, i, j such that

pi = 1 and pj = 0 and G(p,·) is identically zero but G(p⊕ {i},·) and G(p⊕ {j},·)

are not parallel. Let p0 be the restriction of p to domp\ {1,2}. Then F0 = F(p0,·)

is also not IM-terraced: F0((p⊕ {i})|{i,j},·) = F(p⊕ {i},·) and F0((p⊕ {j})|{i,j},·) = F(p⊕ {j},·) are not parallel. Hence domp={i, j}by minimality of F.

Pick a bijectionπfromV to{1, . . . , k}sendingito 1andjto2. Then the copyF of

Gdefined by F(x) =G(x◦π) has the same properties withi= 1 and j= 2; letting00,

10 and 11 denote (0,0) and (1,0) and (1,1) considered as partial configurations living in {0,1}{1,2}, the pinning F(10,·) is identically zero but F(00,·) and F(11,·) are not parallel.

We will argue that (F(00,·), F(11,·))is pinning-minimal subject to not being paral- lel. We need to check that for any non-empty partial configuration y of {3,· · · , k} the pinnings F((00,y),·) and F((11,y),·) are parallel. F((10,y),·) is identically zero, and

10⊕ {1} = 00 and 10⊕ {2} = 11, and F(y,·) is IM-terraced by minimality of F, so

F((00,y),·)and F((11,y),·) are parallel.

By Lemma 5.28 there existsz∈ {0,1}{3,4,···,k}such thatsupp(F(00,·))∪supp(F(11,·)) =

{z,z}. Without loss of generality we may take z3 = 0. Set T00 = F(00,z) and

T01 = F(00,z) and T10 = F(11,z) and T11 = F(11,z). This T satisfies the required

expression for F. Furthermore the weight-functions F00 and F11 are not parallel, hence

neither are the vectors (T00, T01) and (T10, T11), and henceT is non-singular.

5.4.3 #BIS- and #SAT-hardness

We will need a few constructions to help reduce from a suitable unbounded-degree #CSP. We work in the setting of finite sets W as much as possible, to help the proof of Theo- rem 5.13.

To use Proposition 5.8 we need to insert arity 1weight-functions into the constraint language of a #CSP. Lemma 5.39 provides these, and Lemma 5.40 says that we can reduce one of the #CSPs considered in Proposition 5.8 to a read-twice #CSP with a non-IM-terraced weight-function. Lemma 5.42 applies this to reducing #BISand#SAT

to certain#CSPW=2 problems.

Lemma 5.39. Let B = 1 or B = 2 and let T ∈ Q2×02 be non-singular. Assume that either: T00> T10 and T01< T11, orT00< T10 andT01> T11. Let U(0), U(1)be positive

rationals and let F be any weight-function with |supp(F)|>1. Then U = [[ϕ]] for some

Proof. First we will write U in the form U(x) = U1(x). . . Uk(x) such that for each

1≤i≤k the ratioUi(0)/Ui(1) lies in the closed interval fromT00/T10to T01/T11where

one of these endpoints may be +∞ (so the interval is[T00/T10,+∞) when T11= 0, and

[T01/T11,+∞) whenT10= 0).

If U(0) ≤ U(1), let i ∈ {0,1} satisfy T0i < T1i. Let k ≥ 1 be the unique integer

with(T0i/T1i)k< U(0)/U(1)≤(T0i/T1i)k−1.Then let U1(x) =· · ·=Uk−1(x) =Txi and Uk(x) =U(x)/(Txi)k−1 for eachx∈ {0,1}. Note thatT0i/T1i < Uk(0)/Uk(1)≤1.

If U(0) > U(1), let i ∈ {0,1} satisfy T0i > T1i. Let k ≥ 1 be the unique integer

with(T0i/T1i)k−1 ≤U(0)/U(1)<(T0i/T1i)k.Then let U1(x) =· · ·=Uk−1(x) =Txi and Uk(x) =U(x)/(Txi)k−1 for eachx∈ {0,1}. Note that1≤Uk(0)/Uk(1)< T0i/T1i.

We have constructed U1, . . . , Uk. Now let x,x0 be distinct elements of supp(F). By

permuting variables if necessary we can assume that xn6=x0n wherenis the arity of F. Let F0(yn) = 1 X x1,...,xn−1,y1,...,yn−1=0 Tx1,y1. . . Txn−1,yn−1F(y) B for yn∈ {0,1}.

Sincexn6=x0n we have F0(0), F0(1)>0. DefineWi(0), Wi(1) by the following equation.

F0(0)Wi(0) F0(1)Wi(1) ! =T−1 Ui(0) Ui(1) ! = 1 detT T11 −T01 −T10 T00 ! Ui(0) Ui(1) ! .

If T00 > T10 then detT >0 and soWi(0), Wi(1) ≥0 because T01/T11 ≤Ui(0)/Ui(1)≤ T00/T10 (where the final inequality should be ignored when T10 = 0). IfT00> T10 then

detT <0and soWi(0), Wi(1)≥0 becauseT00/T10≤Ui(0)/Ui(1)≤T01/T11(where the

final inequality should be ignored when T11= 0).

For each1≤i≤kdefineFito be the simple weightingFi(x1, . . . , xn) =F(x1, . . . , xn)Wi(xn).

Then U(xn) = k Y i=1 Ui(xn) =    Qk i=1 P1 x1,...,xn−1=0(T ⊗nFi)(x) if B= 1 Qk i=1 P1 x1,...,xn−1=0(T ⊗n(F F i))(x) if B= 2.

This implicitly defines aN-formulaϕoverTFBwithU = [[ϕ]], whereF ={F, F

1, . . . , Fk}.

Lemma 5.40. Let F be a finite weighted constraint language containing a non-IM- terraced weight-function. There exists B ∈ {1,2} and a non-singular matrix T ∈ Q2≥×02

such that for all finite sets of arity 1 weight-functions S there is a finite setW ⊆Q≥0× Q≥0 such that

#CSP(TFBS)

Proof. We can always insert (0,1)and(1,0)into W, so by Lemma 5.35 we can assume thatF is closed under taking pinnings.2

Choose a weight-function F ∈ F that is pinning-minimal subject to not being IM-terraced. Permuting variables if necessary, F has the form given by Lemma 5.38. So F(1,0, y3, . . . , yk) = 0 for all y3, . . . , yk ∈ {0,1}, and there exists T ∈ Q2≥×02 and

z3, . . . , zk∈ {0,1} andB ≥1 such that for all x, y3, . . . , yk∈ {0,1} we have

F(x, x, y3, . . . , yk) =    Tx,y3 if y∈ {z,z} 0 otherwise. (5.3)

If k≥5there are 3≤i < j ≤kwithyi =yj. DefineF0:{0,1}k−2→Q≥0 by

F0(x1, x2, y3,· · · , yi−1, yi+1,· · · , yj−1, yj+1,· · · , yk) =

1

X

t=0

F(x1, x2, y3,· · · , yi−1, t, yi+1,· · ·, yj−1, t, yj+1,· · ·, yk)

Let y0 denote y with the i’th and j’th components deleted, and let z0 denote z with the i’th and j’th components deleted. Equation (5.3) holds with F,y,z replaced by

F0,y0,z0, which implies thatF0 is not IM-terraced. F0 is defined by a(= 2)-formula over

F, so by substitution (Lemma 5.21), #CSPW=2(F ∪ {F0})

AP #CSPW=2(F) whenever

(1,1)∈W ⊆Q≥0×Q≥0. Repeating this we can assumek≤4. Set B =k−2.

If B= 2 and z36=z4, defineF0 by F0(x1, x2, y3, y4) = 1 X t,y04=0 F(x1, x2, y3, y40)F(t, t, y40, y4)

ThenF0(1,0, y3, y4) = 0 for all y3, y4 ∈ {0,1}. Also, for allx, y3, y4∈ {0,1},

F0(x, x, y3, y4) =    P1 t=0F(t, t,1−y3, y3)Tx,y3 if y3=y4 0 otherwise.

By substitution (Lemma 5.21) we can use F0 instead of F. Therefore we can assume thatz is either (0)or (0,0).

Furthermore by taking a simple weighting of F and invoking Lemma 5.26, we can assume that there exist i, j ∈ {0,1} such that Ti0 > Ti1 and Tj0 < Tj1. Indeed let

U(0) =T01+T11andU(1) =T00+T10. ReplacingF by the simple weightingF0 defined

by

F0(x1, x2, y3, y4) =U(y3)F(x1, x2, y3, y4)

2This is not literally true, since our convention is that constraint languages consist of standard weight-

functions. The more precise statement is that we can assume that for every pinningF of a function in F, some copy ofF is inF.

has the effect of replacingTxy by U(y)Txy. If T00T11 > T01T10 thenU(0)T00> U(1)T01

and U(0)T10 < U(1)T11. Otherwise T00T11 < T10T01 so U(0)T00 < U(1)T01 and

U(0)T10> U(1)T11.

Let S0 be the set{U ∈ S | U(0), U(1) >0} ∪ {U0, U1} whereU0(0) = 2, U0(1) = 1

and U1(0) = 1, U1(1) = 2. By Lemma 5.39 there is a finite set G of simple weight-

ings of F (note |supp(F)| > 1) such that each U ∈ S0 can be expressed by a N- formula over{T⊗GB}. By substitution (Lemma 5.21), Lemma 5.34, and simple weighting

(Lemma 5.26), we have

#CSP(TFB∪S0)≤AP#CSP(TFB∪TGB)≤AP#CSP=2(F ∪ G)≤AP#CSPW=2(F)

for some finite set W. Using U0 andU1 as variable weights we have:

#CSP{(2a,2b)|a,b∈Z}(TFBS0)

AP#CSP(TFB∪S0)

ButPIN0 = (U1)h−maxwithh(1) =−1, and similarly PIN1 = (U0)h−max withh(1) = 1,

so by h-maximisation (Lemma 5.23) we have

#CSP(TFB∪S0∪ {PIN0,PIN1})≤AP #CSP{(2

a,2b)|a,b

Z}(TFBS0)

The weight-functions in S\S0 are just constant multiples ofPIN0 andPIN1 so we have

established that #CSP(TFBS)

AP#CSPW=2(F).

Lemma 5.41. Let F: {0,1}k

Q≥0 be indecomposable. F ∈ WNEQ if and only if

|supp(F)| ≤2.

(In [27], this property is used to define the complex-valued analogue E of WNEQ. But we have defined WNEQin a different way.)

Proof. If F ∈ WNEQ then F is a simple weighting of a NEQconj relation: there are numbers λ, U1(0), U1(1), . . . , Uk(0), Uk(1)∈Q≥0 and sets A, B⊆ {1, . . . , k} × {1, . . . , k}

such that F(x1, . . . , xk) =λ k Y i=1 Ui(xi) !  Y (i,j)∈A EQ2(xi, xj)     Y (i,j)∈B NEQ(xi, xj)   =λY P   Y i∈P Ui(xi) !  Y (i,j)∈A∩P2 EQ2(xi, xj)     Y (i,j)∈B∩P2 NEQ(xi, xj)    

where P runs over equivalence classes of the equivalence relation generated by i∼ j if

(i, j)∈A∪B. This expressesF as a tensor product. ButF is indecomposable, so there must only be one equivalence class. Consider two tuples x,y ∈supp(F). If i∼ j then either xi =xj and yi =yj, or xi 6=xj and yi 6=yj; in either casexi =yi if and only if xj =yj. Thus x4yis a union of equivalence classes. Since there is only one equivalence class, x=y or x=y. We have shown that |supp(F)| ≤2.

Conversely, if |supp(F)| ≤ 2 then either the arity of F is zero, in which case F

is certainly in WNEQ, or the support R of F is a subset of {y,z} for distinct vectors

y,z∈ {0,1}k. Picktwithy

t6=zt. Then for all x∈ {0,1}k we have

F(x) =U(xt)   Y i:yi=zi=0 PIN0(xi)     Y i:yi=zi=1 PIN1(xi)   ·   Y i:yi6=yt=zi NEQ(xt, xi)     Y i:yi=yt6=zi EQ2(xt, xi)   soF ∈WNEQ.

Lemma 5.42. Let F be a finite weighted constraint language. Assume that F contains a weight-function that is not in WNEQ and a weight-function that is not IM-terraced. There is a finite set W ⊆Q≥0×Q≥0 such that #BIS≤AP#CSPW=2(F) and if F 6⊆LSM

then #SAT≤AP#CSPW=2(F).

Proof. As in Lemma 5.40, we can assume F is closed under pinnings. Let B, T be as given by Lemma 5.40 applied to F. We first show that TFB has the same properties

asF for the purposes of Proposition 5.8: firstly thatTFB 6⊆WNEQ, and secondly that