• No results found

Truth table invariant cylindrical algebraic decomposition

N/A
N/A
Protected

Academic year: 2021

Share "Truth table invariant cylindrical algebraic decomposition"

Copied!
35
0
0

Loading.... (view fulltext now)

Full text

(1)

Contents lists available atScienceDirect

Journal

of

Symbolic

Computation

www.elsevier.com/locate/jsc

Truth

table

invariant

cylindrical

algebraic

decomposition

Russell Bradford

a

,

James

H. Davenport

a

,

Matthew England

b

,

Scott McCallum

c

,

David Wilson

a

aDepartmentofComputerScience,UniversityofBath,Bath,BA27AY,UK

bSchoolofComputing,ElectronicsandMaths,FacultyofEngineering,EnvironmentandComputing,

Coventry University,Coventry,CV15FB,UK

cDepartmentofComputing,MacquarieUniversity,NSW2109,Australia

a

r

t

i

c

l

e

i

n

f

o

a

b

s

t

r

a

c

t

Articlehistory:

Received 21 December 2014 Accepted 21 October 2015 Available online 4 November 2015 MSC:

68W30 03C10 Keywords:

Cylindrical algebraic decomposition Equational constraint

Whenusingcylindricalalgebraicdecomposition(CAD) tosolve a problemwithrespecttoasetofpolynomials,it islikelynot the signsofthosepolynomialsthatareofparamountimportancebut ratherthetruthvaluesofcertainquantifierfreeformulaeinvolving them.This observation motivates ourarticle and definition ofa TruthTableInvariantCAD(TTICAD).

InISSAC2013thecurrentauthorspresentedanalgorithmthatcan efficiently and directlyconstructa TTICADfora listof formulae inwhicheachhasanequationalconstraint.Thiswasachievedby generalisingMcCallum’stheoryofreducedprojectionoperators.In thispaper wepresent an extended version ofour theorywhich canbeapplied toanarbitrarylistofformulae, achievingsavings ifatleastonehasanequationalconstraint.Wealsoexplainhow thetheory ofreduced projectionoperators canallow for further improvementstotheliftingphaseofCADalgorithms,eveninthe contextofasingleequationalconstraint.

Thealgorithmisimplementedfullyin Maple andwepresentboth promisingresultsfromexperimentationandacomplexityanalysis showingthebenefitsofourcontributions.

©2015TheAuthors.PublishedbyElsevierLtd.Thisisanopen accessarticleundertheCCBYlicense (http://creativecommons.org/licenses/by/4.0/).

This work was supported by EPSRC grant EP/J003247/1.

E-mailaddresses:[email protected](R. Bradford), [email protected](J.H. Davenport),

[email protected](M. England), [email protected](S. McCallum), [email protected] (D. Wilson).

http://dx.doi.org/10.1016/j.jsc.2015.11.002

0747-7171/©2015 The Authors. Published by Elsevier Ltd. This is an open access article under the CC BY license (http://creativecommons.org/licenses/by/4.0/).

(2)

1. Introduction

Acylindricalalgebraicdecomposition (CAD)isadecompositionof

R

nintocellsarrangedcylindrically

(meaningtheprojectionsofanypairofcellsareeitherequalordisjoint)eachofwhichis (semi-)alge-braic(describableusingpolynomialrelations).CADisakeytoolinrealalgebraicgeometry,offeringa methodforquantifiereliminationinrealclosedfields.Applicationsincludethederivationofoptimal numericalschemes(Erascu and Hong, 2014),parametricoptimisation(Fotiou et al., 2005),robot mo-tionplanning(Schwartz and Sharir, 1983),epidemicmodelling(Brown et al., 2006),theoremproving (Paulson, 2012) andprogrammingwithcomplexfunctions(Davenport et al., 2012).

TraditionallyCADsareproducedsign-invariant toagivensetofpolynomials(thesignsofthe poly-nomials do not vary within each cell). However, this gives farmore information than required for mostapplications.Usually amoreappropriate objectis atruth-invariant CAD(the truth ofalogical formuladoesnotvarywithincells).

In this paper we generalise to define truthtableinvariant CADs (the truth values of a list of quantifier-free formulaedo not varywithin cells) andgive an algorithm to compute thesedirectly. This canbe a toolto efficientlyproducea truth-invariantCADforaparent formula(builtfromthe input list),orindeedtherequiredobjectforsolving aprobleminvolvingtheinputlist.Examplesof both such usesare provided following the formal definition inSection 1.2. We continue the intro-duction with some background on CAD, before defining our object of studyandintroducing some examplestodemonstrateourideaswhichwewillreturntothroughoutthepaper.Wethenconclude theintroductionbyclarifyingthecontributionsandplanofthispaper.

1.1. BackgroundonCAD

ATarskiformula F

(

x1

,

. . . ,

xn)isaBooleancombination(

∧,

∨,

¬,

)ofstatementsaboutthesigns,

(

=

0

,

>

0

,

<

0,buttherefore

=

0

,

0

,

0 aswell),ofcertain polynomials fi(x1

,

. . . ,

xn)withinteger

coefficients.Suchstatementsmayinvolvetheuniversalorexistentialquantifiers(

∀,

).Wedenoteby QFFaquantifier-freeTarskiformula.

GivenaquantifiedTarskiformula

Qk+1xk+1

. . .

QnxnF

(

x1

, . . . ,

xn

)

(1)

(where Qi

∈ {∀,

∃}

and F isa QFF)thequantifiereliminationproblem istoproduce

ψ(

x1

,

. . . ,

xk

)

,an

equivalentQFFto(1).

Collins developedCADasatoolforquantifiereliminationover thereals.He proposedto decom-pose

R

n cylindricallysuch thateach cellwas sign-invariantforallpolynomials f

i usedtodefine F .

Then

ψ

wouldbethedisjunctionofthedefining formulaeofthosecells ci in

R

k suchthat (1)was

trueoverthewholeofci,whichduetosign-invarianceisthesameassaying that(1)istrueatany

onesamplepoint ofci.

A complete description of Collins’ original algorithm is given by Arnon et al. (1984a). The first phase,projection,appliesaprojectionoperatorrepeatedlytoasetofpolynomials,eachtimeproducing another setinone fewervariables. Togetherthesesets containthe projectionpolynomials. Theseare used in the second phase, lifting, to build theCAD incrementally.First

R

is decomposedinto cells which are points and intervalscorresponding to the real rootsof theunivariate polynomials. Then

R

2 isdecomposedbyrepeatingtheprocess overeachcellin

R

usingthebivariatepolynomialsata

samplepoint.Overeachcelltherearesections (whereapolynomialvanishes)andsectors (theregions between)whichtogether formastack.TakingtheunionofthesestacksgivestheCADof

R

2.Thisis repeateduntilaCADof

R

n isproduced.Ateachstagethecellsarerepresentedby(atleast)asample pointandanindex:alistofintegerscorrespondingtotheorderedrootsoftheprojectionpolynomials whichlocatesthecellintheCAD.

ToconcludethataCADproducedinthiswayissign-invariantweneeddelineability.Apolynomial is delineable in a cellif theportion ofits zero setin thecell consistsof disjointsections.A setof polynomialsaredelineable inacellifeachisdelineableandthesectionsofdifferentpolynomialsin the cell are either identicalordisjoint. The projection operator usedmust be definedso that over

(3)

eachcellofasign-invariantCADforprojectionpolynomialsinr variables(thewordover meaningwe arenowtalkingaboutan

(

r

+

1

)

-dimspace)thepolynomialsinr

+

1 variablesaredelineable.

The output of thisand subsequent CADalgorithms (including the one presented in thispaper) dependsheavily onthevariableordering.Weusually workwithpolynomialsin

Z[

x

]

= Z[

x1

,

. . . ,

xn

]

withthevariables,x,inascendingorder(sowefirstprojectwithrespecttoxn andcontinuetoreach

univariatepolynomialsinx1).Themainvariable ofapolynomial(mvar)isthegreatestvariablepresent

withrespecttotheordering.

CADhasdoublyexponentialcomplexityinthenumberofvariables(Brown and Davenport, 2007; Davenport and Heintz, 1988). Therenow existalgorithms withbettercomplexity forsomeCAD ap-plications(seeforexampleBasu et al., 1996)butCADimplementationsoftenremainthebestgeneral purposeapproach. There have beenmany developmentsto the theory since Collin’s treatment, in-cludingthefollowing:

Improvementstotheprojectionoperator(Hong, 1990;McCallum, 1988, 1998;Brown, 2001; Han et al., 2014),reducingthenumberofprojectionpolynomialscomputed.

Algorithmstoidentifytheadjacencyofcells ina CAD(Arnon et al., 1984b, 1988)andfollowing fromthistheideaofclustering(Arnon, 1988) tominimisethelifting.

PartialCAD,introduced byCollins and Hong (1991),wherethestructure ofF isusedtoliftless ofthedecompositionof

R

k to

R

n,ifitissufficienttodeduce

ψ

.

The theory ofequational constraints (McCallum, 1999, 2001; Brown and McCallum, 2005) also aimingtodeduce

ψ

itself,thistimeusingmoreefficientprojections.

Theuseofcertifiednumerics intheliftingphasetominimisetheamountofsymbolic computa-tionrequired(Strzebo ´nski, 2006; Iwane et al., 2009).

New approaches which break with the normal projection and lifting model: local projection (Strzebo ´nski, 2014),thebuildingofsingleCADcells(Brown, 2013; Jovanovic and de Moura, 2012) andCADviatriangular decomposition (Chen et al., 2009b). Thelatteris nowused fortheCAD commandbuilt into Maple,andworksby firstcreatinga cylindricaldecompositionof complex space.

1.2. TTICAD

Brown (1998)definedatruth-invariantCAD asoneforwhichaformulahadinvarianttruthvalueon each cell.Givena QFF,asign-invariant CADforthedefining polynomialsistrivially truth-invariant. Brown consideredthe refinement ofsign-invariant CADswhilst maintaining truth-invariance,while some ofthedevelopmentslisted above canbe viewedasmethods toproduce truth-invariantCADs directly.WedefineanewbutrelatedtypeofCAD,thetopicofthispaper.

Definition1.Let

i

}

ti=1 refer toa listofQFFs.Wesaya cylindricalalgebraic decomposition

D

isa TruthTableInvariant CADfortheQFFs(TTICAD)iftheBooleanvalueofeach

φi

isconstant(eithertrue orfalse)oneachcellof

D

.

Asign-invariantCADforallpolynomialsoccurringinalistofformulaewouldclearlybeaTTICAD forthelist.However,weaimtoproducesmallerTTICADsformanysuchlists.Wewillachievethisby utilisingthepresenceofequationalconstraints,atechniquefirstsuggestedbyCollins (1998)withkey theorydevelopedbyMcCallum (1999).

Definition2.Supposesomequantifiedformulaisgiven:

φ

= (

Qk+1xk+1

)

· · · (

Qnxn

)φ (

x

)

wherethe Qi are quantifiersand

φ

isquantifierfree. Anequation f

=

0 is an equationalconstraint

(EC)of

φ

∗if f

=

0 islogicallyimpliedby

φ

(thequantifier-freepartof

φ

∗).Suchaconstraintmaybe eitherexplicit(anatomoftheformula)orotherwiseimplicit.

(4)

InSections3and4wewilldescribehowTTICADscanbeproducedefficientlywhenthereareECs presentinthelistofformulae.Therearetworeasonstousethistheory.

(1) Asatooltobuildatruth-invariantCADefficiently: Ifaparentformula

φ

∗ isbuiltfromtheformulae

i

}

thenanyTTICADfor

i

}

isalsotruth-invariantfor

φ

∗.

WenotethatforsuchaformulaaTTICADmayneedtocontainmorecellsthanatruth-invariant CAD. Forexample,consideracell inatruth-invariantCADfor

φ

= φ

1

∨ φ

2 within which

φ

1 is

always true.If

φ

2 changedtruth value insucha cellthenit wouldneedtobe splitinorderto

achieveaTTICAD,butthisisunnecessaryforatruth-invariantCADof

φ

∗.

Nevertheless, we find that our TTICAD theory is often able to produce smaller truth-invariant CADsthan anyother availableapproach.We demonstratethesavings offeredvia worked exam-plesintroducedinthenextsubsection.

(2) Whengivenaproblemforwhichtruthtableinvarianceisrequired: That is,aproblemforwhichthe listofformulaearenotderivedfromalargerparentformulaandthusatruth-invariantCADfor theirdisjunctionmaynotsuffice.

For example,decomposing complexspace accordingto aset ofbranch cutsforthe purposeof algebraicsimplification(Bradford and Davenport, 2002; Phisanbut et al., 2010).Heretheideaisto representeachbranchcutasasemi-algebraicsettogiveinputadmissibletoCAD(recentprogress onthishasbeendescribedbyEngland et al., 2013).ThenaTTICADforthelistofformulaethese setsdefineprovidesthenecessarydecomposition.Example 33isfromthisclass.

1.3. Workedexamples

To demonstrate our ideas we will provide details for two worked examples. Assume we have the variable ordering x

y (meaning 1-dimensionalCADs are with respectto x) andconsider the followingpolynomials,graphedinFig. 1.

f1

:=

x2

+

y2

1 g1

:=

xy

14

f2

:= (

x

4)2

+ (

y

1)2

1 g2

:= (

x

4)(y

1)

14

Supposewewishtofindtheregionsof

R

2 wherethefollowingformulaistrue:



:= (

f1

=

0

g1

<

0)

∨ (

f2

=

0

g2

<

0) . (2)

Both Qepcad (Brown, 2003) and Maple 16(Chen et al., 2009b) produceasign-invariantCADforthe polynomialswith317cells.Thenbytestingthesamplepointfromeachregionwecansystematically identifywheretheformulaistrue.

AtfirstglanceitseemsthatthetheoryofECsisnotapplicableto



asneither f1

=

0 nor f2

=

0

is logically implied by



. However, while there is no explicit EC we can observe that f1f2

=

0 is

an implicit constraintof



.Using Qepcad withthisdeclared(animplementationofMcCallum, 1999) givesaCADwith249cells.Later,inSection3.3wedemonstratehowaTTICADwith105cellscanbe produced.

Wealsoconsidertherelatedproblemofidentifyingwhere



:= (

f1

=

0

g1

<

0)

∨ (

f2

>

0

g2

<

0) (3)

istrue.Asabove,wecoulduseasign-invariantCADwith317cells,butthistimethereisnoimplicit EC.InSection3.3weproduceaTTICADwith183cells.

1.4. Contributionsandplanofthepaper

We reviewtheprojection operatorsofMcCallum (1998, 1999)inSection2.Theformerproduces sign-invariantCADs1andthelatterCADstruth-invariantforaformulawithanEC.Thereviewis

nec-essarysinceweusesomeofthistheorytoverifyournewalgorithm.Italsoallowsustocompareour

(5)

Fig. 1. The

polynomials from the worked examples of Section

1.3. The solid curves are f1and g1while the dashed curves are

f2and g2.

newcontributiontotheseexistingapproaches.Forthispurposeweprovidenewcomplexityanalyses oftheseexistingtheoriesinSection2.3.

Sections3and4presentournewTTICADprojectionoperatorandverifiedalgorithm.Theyfollow Sections2and3ofourISSAC2013paper(Bradford et al., 2013a),butinsteadofrequiringallQFFsto haveanECthetheoryhereisapplicabletoallQFFs(producingsavingssolongasonehasanEC).The strengtheningofthetheory meansthataTTICADcannowbeproducedfor



inSection1.3aswell as



.This extension isimportantsince it means TTICADtheory nowapplied to caseswhere there can beno overall implicitECfora parent formula. Inthesecases theexisting theory ofECs isnot applicableandsothecomparativebenefitsofferedbyTTICADareevenhigher.

InSection5we discusshowthetheory ofreducedprojection operatorsalsoallowsfor improve-mentsintheliftingphase.Thisistruefortheexistingtheoryalsobutthediscovery wasonlymade duringthedevelopmentofTTICAD.InSection6wepresentacomplexity analysisofournew contri-butions fromSections3–5,demonstratingtheir benefitoverthe existingtheory fromSection2.We haveimplementedthenewideasina Maple package,discussedinSection7.Inparticular,Section7.3

summarises (Bradford et al., 2013b) on the choicesrequired when using TTICADand heuristicsto help. Experimental results forour implementation (extending those in our ISSAC 2013 paper) are giveninSection8,beforewefinishinSection9withconclusionsandfuturework.

Dataaccessstatement: Data directlysupporting this paper(code, Maple and Qepcad input)are openlyavailablefromhttp :/ /dx .doi .org /10 .15125 /BATH-00076.

2. ExistingCADprojectionoperators 2.1. Review:sign-invariantCAD

Throughoutthe paperwe let cont, prim,disc,coeff and ldcf denote thecontent, primitivepart, discriminant,coefficientsandleadingcoefficientofpolynomialsrespectively(ineachcasetakenwith respecttoagivenmainvariable).Similarly,weletres denote theresultant ofa pairofpolynomials. When applied to a set of polynomials we interpret theseas producing sets of polynomials, so for example

res(A

)

=



res(fi

,

fj

)

|

fi

A

,

fj

A

,

fj

=

fi



.

ThefirstimprovementstoCollinsoriginalprojectionoperatorweregivenbyMcCallum (1988)and

Hong (1990).TheywerebothsubsetsofCollinsoperator,meaningfewerprojectionpolynomials,fewer cells inthe CADsproduced andquickercomputation time. McCallum’sisactually a strict subset of Hong’s,however,itcannotbeguaranteedcorrect(incorrectnessisdetectedintheliftingprocess)for acertainclassof(statisticallyrare)inputpolynomials,whereHong’scan.

(6)

Additional improvements havebeen suggested by Brown (2001)and Lazard (1994).The former required changes to the lifting phase while the latterhad a flawedproof ofvalidity (withcurrent unpublishedworksuggestingitcanstillbesafelyusedinmanycases).Inthispaperwewillfocuson McCallum’soperators,notingthatthealternativescouldlikelybeextendedtoTTICADtheoriestooif desired.McCallum’stheoryisbasedaroundthefollowingcondition,whichimpliessign-invariance. Definition3. A CADis order-invariant with respect to a set of polynomialsif each polynomial has constantorderofvanishingwithineachcell.

Recall that a set A

⊂ Z[

x

]

is an irreduciblebasis if the elements of A are of positive degree in themainvariable,irreducibleandpairwise relativelyprime.Let A bea setofpolynomialsandB an irreduciblebasisoftheprimitivepartof A.Then

P

(

A

)

:=

cont(A

)

coeff(B

)

disc(B

)

res(B

)

(4)

defines the operator of McCallum (1988). We can assume some trivial simplifications such as the removalof constantsandexclusionof entriesidenticalto aprevious one (uptoconstant multiple). Themaintheoremunderlyingtheuseof P follows.

Theorem4.(See

McCallum,

1998.)LetA beanirreduciblebasisin

Z[

x

]

andletS beaconnectedsubmanifold of

R

n−1.SupposeeachelementofP

(

A

)

isorder-invariantinS.

TheneachelementofA eithervanishesidenticallyonS orisanalyticdelineableonS,(aslightvarianton traditionaldelineability,see

McCallum,

1998).Further,thesectionsofA notidenticallyvanishingarepairwise disjoint,andeachelementofA notidenticallyvanishingisorder-invariantinsuchsections.

Theorem 4 means that we can use P in place of Collins’ projection operator to produce sign-invariantCADssolongasnoneoftheprojectionpolynomialswithmainvariablexkvanishesonacell

oftheCADof

R

k−1;aconditionthatcanbecheckedwhenlifting.Inputwiththispropertyisknown

as well-oriented. Notethat although McCallum’s operator produces order-invariant CADs,a stronger property thansign-invariance,itisactuallymoreefficientthatthepre-existingsign-invariant opera-tors.WeexaminethecomplexityofCADusingthisoperatorinSection2.3.

2.2. Review:CADinvariantwithrespecttoanequationalconstraint

ThemainresultunderlyingCADsimplificationinthepresenceofanECfollows.

Theorem5.(See

McCallum,

1999.) Let f

(

x

),

g

(

x

)

beintegral polynomialswithpositivedegreein xn,let

r

(

x1

,

. . . ,

xn−1

)

betheirresultant,andsupposer

=

0.LetS beaconnectedsubsetof

R

n−1suchthat f is delineableonS andr isorder-invariantinS.

Theng is sign-invariantineverysectionoff overS.

Fig. 2givesagraphicalrepresentationofthequestionansweredbyTheorem 5.Hereweconsider polynomials f

(

x

,

y

,

z

)

and g

(

x

,

y

,

z

)

of positive degree in z whose resultant r is non-zero, and a connected subset S

⊂ R

2 inwhichr is order-invariant.We furthersuppose that f isdelineableon S (noting that Theorem 4with n

=

3 and A

= {

f

}

provides sufficient conditions forthis). We ask whetherg issign-invariantinthesectionsof f overS.Theorem 5answersthisquestionaffirmatively: therealvarietyofg eitheralignswithagivensectionof f exactly(asforthebottomsectionof f in

Fig. 2),orhasnointersectionwithsuchasection(asforthetop).Thesituationatthemiddlesection of f cannothappen.

Theorem 5 thus suggestsa reduction oftheprojection operator P relativeto an EC f

=

0: take only P

(

f

)

together withtheresultantsof f withthenon-ECs.Let A beasetofpolynomials, E

A containonlythepolynomialdefiningtheEC,F beasquarefreebasisof A,andB bethesubsetof F whichisasquare-freebasisforE.Theoperator

(7)

Fig. 2. Graphical representation ofTheorem 5.

waspresentedbyMcCallum (1999)alongwithanalgorithmtoproduceaCADtruth-invariantforthe ECandsign-invariantfortheotherpolynomialswhentheECwassatisfied.Itworkedbyapplyingfirst PE

(

A

)

andthenbuildingan order-invariantCADof

R

n−1 using P .Wecallsuch CADsinvariantwith

respecttoanequationalconstraint.Note that aswithMcCallum (1999) thealgorithm only worksfor inputsatisfyinga well-orientednesscondition.Full detailsoftheverificationaregivenby McCallum (1999)andacomplexityanalysisisgiveninthenextsubsection.

2.3. Newcomplexityanalyses

We provide complexity analyses of the algorithms fromMcCallum (1998, 1999) forcomparison withournewcontributionslater.Ananalysisforthelatterhasnotbeenpublishedbefore,whilethe analysisfor the former differs substantially from the one in McCallum (1985): instead offocusing on computation time, we examine the numberof cells in theCAD of

R

n produced: the cellcount. Wecomparethedominanttermsinacellcountboundforeachalgorithmstudied.Thisfocusavoids calculationswithlessrelevantparameters, identicalforallthealgorithms. Wenotethat allCAD ex-perimentationshowsastrongcorrelationbetweenthenumberofcellsproducedandthecomputation time.

Ourkeyparametersarethenumberofvariablesn,thenumberofpolynomialsm andtheir maxi-mumdegreed (inanyonevariable).Notethattheseareallrestrictedtopositiveintegervalues.We makemuchuseofthefollowingconcepts.

Definition6. Consider a set of polynomials pj. The combineddegree ofthe set is the maximum

degree (taken with respect to each variable) of the product of all the polynomials in the set: maxi



degxi



jpj



.

Soforexample,theset

{

x2

+

1

,

x2

+

y3

}

hascombineddegree 4 (sincetheproduct hasdegree 4

inx anddegree3 in y).

Definition7.(SeeMcCallum, 1985.)Asetofpolynomialshasthe

(m,

d)-property ifit canbe parti-tionedintom sets,suchthateachsethasmaximumcombineddegreed.

Soforexample,thesetofpolynomials

{

xy3

x

,

x4

xy

,

x4

y4

+

1

}

hascombineddegree9 and

thusthe

(

1

,

9

)

-property.However,bypartitioningitintothreesetsofonepolynomialeach,italsohas the

(

3

,

4

)

-property.Partitioninginto2setswillshowittohavethe

(

2

,

5

)

,

(

2

,

7

)

and

(

2

,

8

)

-properties also.Thefollowingresultfollowsfromthedefinitions.

(8)

Thiscontrastswiththefactsthattakingasquare-freebasismaynotreducethecombineddegree, butmaycauseexponentialblow-upinthenumberofpolynomials.

Proposition9.Supposeasethasthe

(

m

,

d

)

-property.Then,bytakingtheunionofgroupsof



setsfromthe partition,italsohasthe



m

, 

d

-property.

Notethatinthecase



=

2 wehave



m2

=

m+1 2

.

Example10. Let S

= {

x2y4

x3

,

x2y4

+

x3

}

be a set of polynomials. Then S has the

(

2

,

4

)

and

(

1

,

8

)

-properties. A squarefree basis of S isgiven by S

= {

x2

,

y4

x

,

y4

+

x

}

which hasthe

(

3

,

4

)

and

(

1

,

8

)

-properties.

Proposition 9statesthat Smustalsohavethe

(

2

,

8

)

-property,whichcanbecheckedby partition-ing Ssothatx2 isinasetofitsown.However,fromProposition 8wealsoknowthat Smusthave the

(

2

,

4

)

-property,whichisobtainedfromeitheroftheotherpartitionsintotwosets.

S demonstratesthestrengthofthe

(

m

,

d

)

-property.Thetrivialpartitionintosetsofone polyno-mial isequivalent tothesimpleapproachofjusttrackingthenumberofpolynomialsandmaximum degree.Inthisexamplesuchanapproachwouldleadusto3polynomialsofdegree4,contributinga possible12realroots.However,byusingmoresophisticatedpartitionswereplacethisby2sets,for eachofwhichtheproductofpolynomialentrieshasdegree4,andsoatmost8realrootscontributed. Thoughnotusedinthispaper,wenoteanadvantageofthe

(

m

,

d

)

-propertyoverthe

(

1

,

md

)

-prop-ertyisabetterboundonrootseparation:anytworootsrequireO

(

2d

)

subdivisionstoisolate,rather thanthe O

(

md

)

impliedbyconsideringtheproductofallpolynomials.

Wealsorecallthefollowingclassicidentitiesforpolynomials f

,

g

,

h:

res(f g

,

h

)

=

res(f

,

h

)

res(g

,

h

)

;

(6)

disc(f g

)

=

disc(f

)

disc(g

)

res(f

,

g

)

2

;

(7)

disc(f

)

= (−

1)12d(d−1)1

adres(f

,

f



)

(8)

whered isthedegree of f , f itsderivative andad itsleading coefficient(alltakenwithrespectto

thegivenmainvariable).

Lemma11.Suppose A isasetofpolynomialsinn variableswiththe

(

m

,

d

)

property.Then P

(

A

)

hasthe

(

M

,

2d2

)

propertywith M

=

(

m

+

1)2 2



.

(9)

Proof. Partition A as S1

∪ · · · ∪

Sm accordingtoits

(

m

,

d

)

-property. LetB be asquare-freebasis for

prim

(

A

)

, T1 thesetofelementsof B whichdividesomeelementofS1,andTi bethoseelementsof

B whichdividesomeelementofSi butwhichhavenotalreadyoccurredinsomeTj

:

j

<

i.

(1) Wefirstclaimthateachset

cont(Si

)

ldcf(Ti

)

disc(Ti

)

res(Ti

)

(10)

fori

=

1

,

. . . ,

m hasthe

(

1

,

2d2

)

property.Letc betheproductoftheelementsofcont

(

Si),Ti

=

{

F1

,

. . . ,

Ft} forsome

t

and F

:=

c F1

,

. . .

Ft. Then F dividesthe product of the elements of Si

and so hasdegree atmostd. Thus res

(

F

,

F

)

musthave degree at most2d2 because it isthe determinant ofa

(

2d

1

×

2d

1

)

matrix inwhich each element hasdegree atmost d. Then

(9)

by (8) and repeated applicationof (6) and (7) we see res

(

F

,

F

)

is a (non-trivial) power of c multipliedby



t

j=1ldcf(Fj

)



tj=1disc(Fj

)



tj<kres(Fj

,

Fk

)

2

.

Sincethisincludesalltheelementsof(10)theclaimisproved.

(2) WearestillmissingfromP

(

A

)

theres

(

f

,

g

)

where f

Ti,g

Tjandi

=

j.Forfixedi

,

j consider

res



fTi f

,



gTjg



,whichby(6)istheproductofthemissingresultants.Thisistheresultant oftwo polynomialsofdegreeatmostd andhencewillhavedegree atmost2d2.Thus forfixed i

,

j thesetofmissingresultantshasthe

(

1

,

2d2

)

-property,andsotheunionofallsuchsets the



1

2m

(

m

1

),

2d

2



-property.

(3) Weare now missingfrom P

(

A

)

onlythe non-leadingcoefficientsof B.The polynomialsin the set Ti havedegree atmostd whenmultipliedtogether,andso,separately or together,haveat

mostd non-leading coefficients,eachofwhichhasdegreeatmostd.Hencethissetofnon-leading coefficientshas the

(

1

,

d2

)

property. This is thecase for i from1 to m and thus together the

non-leadingcoefficientsofB havethe

(

m

,

d2

)

-property.Wecan thenpairupthesesetstogeta

partitionwiththe

(



m

/

2

,

2d2

)

-property(Proposition 9). Hence P

(

A

)

canbepartitionedinto

m

+

m

(

m

1) 2

+



m 2



=

m

(

m

+

1) 2

+

m

+

1 2



=

(

m

+

1)2 2



sets (where the final equality follows fromm

(

m

+

1

)

always beingeven) each withcombined de-gree 2d2.

2

This concerns a single projection, and we must apply it recursively to consider the full set of projectionpolynomials.Weakeningtheboundasinthefollowingallowsforaclosedformsolution. Corollary 12. If A is a setof polynomials with the

(

m

,

d

)

property where m

>

1,then P

(

A

)

has the

(

m2

,

2d2

)

-property. Remark13.

(1) NotethatifA hasthe

(

1

,

d

)

-propertythen P

(

A

)

hasthe

(

2

,

2d2

)

propertyandhencetheneedfor m

>

1 to applyCorollary 12.Asourpapercontinueswe presentnewtheory thatappliesto the firstprojectiononly.HenceforafairandaccuratecomplexitycomparisonwewilluseLemma 11

forthefirst projection andthenCorollary 12 forsubsequentones, (applicablesince evenifwe startwithm

=

1 polynomialforthefirstprojection,wecanassumem

2 thereafter).

(2) Theanalysis sofar resemblesSection 6.1of McCallum (1985).However, that thesisleads usto the

(

m2d

,

2d2

)

-propertyinplaceofCorollary 12.Theextradependencyond was avoidedbyan improvedanalysisintheproofofLemma 11part(3).

Weconsiderthegrowthinprojectionpolynomialsandtheirdegreewhenusingtheoperator P in

Table 1.Herethecolumnheadingsrefernottothenumberofpolynomialsandtheirdegree,buttothe numberofsetsandtheircombineddegreewhenapplyingDefinition 7.Westartwithm polynomials ofdegreed andafteroneprojectionhaveasetwiththe

(

M

,

2d2

)

property,usingM fromLemma 11.

WethenuseCorollary 12tomodelthegrowthinsubsequentprojections,andasimpleinductionto fillinthetable.

ThesizeoftheCADproduceddependsonthenumberofrealrootsoftheprojectionpolynomials. Wecanhenceboundthenumberofrealrootsinasetofpolynomialswiththe

(

m

,

d

)

-propertywith md (in practicemanyofthemwillbestrictlycomplex).Wecan thereforeboundthenumberofreal rootsoftheunivariateprojectionpolynomialsbytheproductofthetwoentriesintherowofTable 1

(10)

Table 1

Expression growth for CAD projection where: after the first projection we have polynomials with the (M,2d2)-property and

thereafter we measure growth using Corollary 12. The value of M could

be (9), (13), (18), (24)

or (29)depending on which projection scheme we are analysing.

Variables Number Degree Product

n m d md n−1 M 2d2 2Md2 n−2 M2 8d4 23M2d4 n−3 M4 128d8 27M4d8 . . . . . . . . . . . . nr M2r−1 22r1d2r 22r1d2r M2r−1 . . . . . . . . . . . . 1 M2n−2 22n−11 d2n−1 22n−11 d2n−1 M2n−2 Product M2n−11 m 22n1n d2n1 22nn1 d2n1 M2n−11 m

for1variable.The numberofcells intheCADof

R

1 isboundedbytwice thisplus1.Similarly,the

totalnumberofcellsintheCADof

R

n isboundedbytheproductof2K

+

1 where K variesthrough theProductcolumnofTable 1,i.e.by

(2Md

+

1) n



−1 r=1



2



22r−1d2rM2r−1



+

1



.

Omittingthe

+

1 willleaveuswiththedominanttermofthebound,whichcanbecalculated explic-itlyas

22n−1d2n−1M2n−1−1m (11)

22n−1d2n−1



12

(

m

+

1)2

2

n−11

m

=

22n−1d2n−1

(

m

+

1)2n−2m

,

(12)

where the inequality was introduced by omitting thefloor function in (9).This may be compared with the bound inTheorem 6.1.5 of McCallum (1985), withthe main differencesexplained by Re-mark 13(2).

WenowturnourfocustoCADinvariantwithrespecttoanEC.Recallthatweuseoperator PE(A

)

for the first projection only and P

(

A

)

thereafter. Hence we use Corollary 12 for the bulk of the analysis,andthenextlemmawhenconsideringthefirstprojection.

Lemma14.SupposeA isasetofm polynomialsinn variableseachwithmaximumdegreed,andthatE

A containsasinglepolynomial.ThenthereducedprojectionPE(A

)

hasthe

(

M

,

2d2

)

-propertywith

M

=

1 2

(3m

+

1)

.

(13)

Proof. Since E containsasinglepolynomialitssquarefreebasis F hasthe

(

1

,

d

)

-property.

(1) Thecontents,leadingcoefficientsanddiscriminantsfromF formaset R1 withcombineddegree

2d2 (seeproofofLemma 11step1)andtheothercoefficientsaset R2 withcombineddegreed2

(seeproofofLemma 11step3).

(2) The set of remaining contents R3

=

cont

(

A

)

\

cont

(

E

)

has the

(

m

1

,

d

)

-property and thus

trivially, the

(

m

1

,

d2

)

-property. Then R2

R3 has the

(

m

,

d2

)

-property and thus also the





m 2

,

2d2

-property(Proposition 9).

(3) Itremainstoconsiderthefinalsetofresultantsin(5).Followingtheapproachfromtheproofof

Lemma 11step2,we concludethatforeachofm

1 polynomialsin A

\

E therecontributesa setwiththe

(

1

,

2d2

)

-property.Sotogethertheyformaset R

(11)

Hence PE

(

A

)

iscontainedinR1

∪ (

R2

R3

)

R4 whichmaybepartitionedinto 1

+



m2

+ (

m

1)

=

1 2

(

m

+

1)

+

m

=

1 2

(3m

+

1)

setsofcombineddegree2d2.

2

WecanuseTable 1tomodelthegrowthinprojectionpolynomialsforthealgorithminMcCallum (1999) as well, since the only difference will be the numberof polynomialsproduced by thefirst projection,andthusthevalue ofM.Hence thedominanttermintheboundonthetotalnumberof cellsisgivenagainby(11),whichinthiscasebecomes(uponomittingthefloor)

22n−1d2n−1

(

12

(3m

+

1))2n−1−1m

=

22n−1d2n−1

(3m

+

1)2n−1−1m

.

(14)

SincePE(A

)

isasubsetofP

(

A

)

aCADinvariantwithrespecttoanECshouldcertainlybesimpler thanasign-invariantCADforthepolynomialsinvolved.Indeed,comparingthedifferentvaluesof M weseethat

1 2

(

m

+

1)

2

>

1

2

(3m

+

1)

(strictly so for m

>

1).

Comparingthe dominanttermsinthecell countbounds,(14) and(12),weseethemaineffectisa decreaseinoneofthedoubleexponentsby1.

3. AprojectionoperatorforTTICAD 3.1. Newprojectionoperator

InMcCallum (1999)thecentralconceptisthereducedprojectionofasetofpolynomialsA relative toasubset E (definingthe EC).Thefull projectionoperatorisapplied to E andthen supplemented bytheresultantsofpolynomialsinE withthosein E

\

A,sincethelattergrouponlyeffectthetruth oftheformulawhen theysharea rootwiththeformer.We extendthisideato define aprojection foralist ofsetsof polynomials(derivedfromalist offormulae),some ofwhich mayhavesubsets (derivedfromECs).

ForsimplicityinMcCallum (1999)theconceptisfirstdefinedforthecasewhenA isanirreducible basis.Weemulatethisapproach,generalisingforothercasesbyconsideringcontentsandirreducible factorsofpositive degreewhen verifyingthealgorithm inSection4. Solet

A

= {

Ai

}

ti=1 bea listof

irreduciblebases Ai andlet

E = {

Ei

}

it=1bealistofsubsetsEi

Ai.Put A

=



ti=1AiandE

=



ti=1Ei.

Notethat weusetheconventionofuppercaseRoman lettersforsetsofpolynomialsandcalligraphic lettersforlistsofthese.

Definition15.Withthenotationabovethereducedprojectionof

A

withrespectto

E

is

PE

(

A

)

:=



ti=1PEi

(

Ai

)

RES×

(

E

)

(15)

whereRES×

(E)

isthecrossresultantset

RES×

(

E

)

= {

resxn

(

f

, ˆ

f

)

| ∃

i

,

j such that f

Ei

, ˆ

f

Ej

,

i

<

j

,

f

= ˆ

f

}

(16)

and PE

(

A

)

=

P

(

E

)



resxn

(

f

,

g

)

|

f

E

,

g

A

,

g

/

E



,

P

(

A

)

= {

coeffs(f

),

disc(f

),

resxn

(

f

,

g

)

|

f

,

g

A

,

f

=

g

}.

Theorem16.LetS beaconnectedsubmanifoldof

R

n−1.SupposeeachelementofP

E

(A)

isorderinvariant inS.Theneach f

E eithervanishesidenticallyonS orisanalyticallydelineableonS;thesectionsoverS of thef

E whichdonotvanishidenticallyarepairwisedisjoint;andeachelementf

E whichdoesnotvanish identicallyisorder-invariantinsuchsections.

Moreover,foreachi,in1

i

t everyg

Ai

\

Eiissign-invariantineachsectionoverS ofevery f

Ei

(12)

Proof. ThecrucialobservationforthefirstpartisthatP

(

E

)

PE

(

A)

.Toseethis,recallequation(15)

andnotethatwecanwrite

P

(

E

)

=



iP

(

Ei

)

RES×

(

E

).

We canthereforeapply Theorem 4 totheset E andobtain thefirstthree conclusionsimmediately, leavingonlythefinalconclusiontoprove.

Let i be in the range1

i

t, let g

Ai

\

Ei and let f

Ei. Suppose that f does not vanish

identicallyon S.Nowresxn

(

f

,

g

)

PE

(A)

,andsoisorder-invariant in S byhypothesis. Further,we

alreadyconcludedthat f isdelineable.ThereforebyTheorem 5, g issign-invariantineachsectionof f overS.

2

Theorem 16isthekeytoolfortheverificationofourTTICADalgorithminSection4.Itallowsus to concludetheoutputiscorrectsolongasno f

E vanishesidenticallyonthelowerdimensional manifold, S.Apolynomial f inr variables thatvanishesidenticallyatapoint

α

∈ R

r−1issaidtobe nullified at

α

.

The theory ofthis subsectionappears identical to the work in Bradford et al. (2013a). The dif-ference isintheapplicationofthetheory inSection4.We supposethatthe inputisa listofQFFs,

i

}

,witheach Ai definedfromthepolynomialsineach

φi

.InBradford et al. (2013a)therewas an

assumption(nolongermade)thateachoftheseformulaehadadesignatedEC fi

=

0 fromwhichthe

subsets Ei are defined. Instead,we define Ei to bea basis for

{

fi

}

ifthereis sucha designatedEC

anddefine Ei

=

Ai otherwise.Thatis,we needtotreatallthepolynomialsinQFFswithnoECwith

theimportanceusuallyreservedforECs.

3.2. Comparisonwithusingasingleimplicitequationalconstraint

It isclearthat ingeneralthe reducedprojection PE

(

A)

willlead tofewer projection polynomi-als than usingthe full projection P . However, a comparisonwiththe existing theory ofequational constraintsrequiresalittlemorecare.

First,wenotethattheTTICADtheoryisapplicabletoasequenceofformulaewhilethetheoryof

McCallum (1999)isapplicableonlytoasingleformula.HenceifthetruthvalueofeachQFFisneeded thenTTICADistheonlyoption;atruth-invariantCADforaparentformulawillnotnecessarilysuffice. Second wenote thateven ifthesequencedoforma parentformulathen thismusthavean overall ECtouseMcCallum (1999)whiletheTTICADtheoryisapplicableevenifthisisnotthecase.

Letusconsider thesituationwhereboth theoriesare applicable, i.e.we havea sequenceof for-mulae (formingaparentformula)forwhicheach hasanECandthustheparentformulaanimplicit EC (theirproduct). Inthe contextof Section1.2thiscorresponds to using



ifi astheEC.The

im-plicitECapproachwouldcorrespondtousingthereducedprojection PE(A

)

ofMcCallum (1999),with E

= ∪

iEiandA

= ∪

iAi.Wemakethesimplifyingassumptionthat A isanirreduciblebasis.Ingeneral

PE

(A)

willstillcontain fewerpolynomialsthan PE(A

)

since PE

(

A

)

contains allresultantsres

(

f

,

g

)

where f

Ei,g

Aj(andg

/

E),whilePE

(A)

containsonlythosewithi

=

j (andg

/

Ei).Thuseven

insituationswheretheprevious theoryappliesthereisan advantageinusingthenewTTICAD the-ory.Thesesavingsarehighlightedbytheworkedexamplesinthenextsubsectionandthecomplexity analysislater.

3.3. Workedexamples

InSection4wedefineanalgorithmforproducingTTICADs.Firstweillustratethesavingswithour workedexamplesfromSection1.3,whichsatisfythesimplifyingassumptionsfromSection3.1.

Westartbyconsidering



fromequation(2).Inthenotationabovewehave:

A1

:= {

f1

,

g1}, E1

:= {

f1}; A2

:= {

f2

,

g2}, E2

:= {

f2}.

(13)

Fig. 3. The

polynomials from

in equation (2)along with the roots of PE(A)(solid lines), PE(A)(dashed lines) and P(A) (dotted lines).

Fig. 4. Magnified region ofFig. 3.

PE1

(

A1

)

=



x2

1,x4

x2

+

161



,

PE2

(

A2

)

=



x2

8x

+

15,x4

16x3

+

95x2

248x

+

384116



,

andthecross-resultantset

Res×

(

E

)

= {

resy

(

f1

,

f2

)

} = {

68x2

272x

+

285

}.

PE

(

A)

is then the union ofthese three sets. InFig. 3 we plot the polynomials(solid curves) and identifythe12realsolutionsof PE

(

A)

(solidverticallines).Wecanseethesolutionsalignwiththe asymptotesofthe fi’sandtheimportantintersections(thoseof f1 withg1and f2 withg2).

If we were to instead use a projection operator based on an implicitEC f1f2

=

0 then in the

notationabovewewouldconstructPE(A

)

fromA

= {

f1

,

f2

,

g1

,

g2

}

andE

= {

f1

,

f2

}

.Thissetprovides

anextra4solutions(thedashedverticallines)whichalignwiththeintersectionsof f1 with g2 and f2withg1.Finally,ifweweretoconsiderP

(

A

)

thenwegainafurther4solutions(thedottedvertical

lines) whichalign withthe intersectionsof g1 and g2 andtheasymptotes ofthe gi’s.In Fig. 4we

magnifyaregiontoshowexplicitlythatthepointofintersectionbetween f1 andg1 isidentifiedby PE

(A)

,whiletheintersectionsof g2 withboth f1andg1 areignored.

The 1-dimensionalCADproduced using PE

(A)

has 25cells compared to 33when using PE

(

A

)

and41whenusingP

(

A

)

.However,itisimportanttonotethatthisreductionisamplifiedafterlifting (usingTheorem 16andAlgorithm 1).The2-dimensionalTTICADhas105cells andthesign-invariant CADhas317.Using Qepcad tobuildaCADinvariantwithrespecttotheimplicitECgivesus249cells.

(14)

Fig. 5. The polynomials fromin equation(3)along with the roots of PE(A).

Fig. 6. Magnified region ofFig. 5.

Nextweconsiderdeterminingthetruthof



fromequation(3).Thistime

A1

:= {

f1

,

g1}, E1

:= {

f1}, A2

:= {

f2

,

g2}, E2

:= {

f2

,

g2},

andsoPE1

(

A1

)

isasabovebutPE2

(

A2

)

containsanextrapolynomialx

4 (thecoefficientofy in g2). Thecross-resultantsetRES×

(E)

alsocontainsanextrapolynomial,

resy

(

f1

,

g2

)

=

x4

8x3

+

16x2

+

12x

3116

.

These two extra polynomialsprovidethree extra realroots andhencethe 1-dimensionalCAD pro-ducedusing PE

(

A)

thistimehas31cells.

In Fig. 5 we againgraphthe fourcurvesthistime withsolid vertical lineshighlighting the real solutions of PE

(

A)

.BycomparingwithFig. 3weseethat morepointsintheCADof

R

1 havebeen identifiedfortheTTICADof



thantheTTICADof



(15insteadof12)butthatthereisstillasaving over the sign-invariant CAD(which had20,the five extrasolutions indicated by dotted lines). The lackofanECinthesecond clausehasmeant thattheasymptoteof g2 anditsintersectionswith f1

havebeenidentified.However, notethat theintersectionsof g1 with f2 and g2 andhavenot been. Fig. 6magnifiesaregionofFig. 5.ComparewithFig. 4toseethedashedlinehasbecomesolid,while thedottedlineremainsunidentifiedbytheTTICAD.

Notethat weare unabletouseMcCallum (1999) tostudy



asthereisnopolynomial equation logicallyimplied(eitherexplicitlyorimplicitly)bythisformula.Hencetherearenodashedlinesand the choiceisbetweenthe sign-invariantCADwith317 cellsorthe TTICAD,whichforthisexample has183cells.

(15)

Algorithm 1: TTICADalgorithm.

Input : A

list of quantifier-free formulae

{φi}ti=1in variables x1,. . . ,xn. Each φihas at most one designated EC fi=0.

Output: Either• D: A CAD of Rn(described by lists I andS of

cell indices and sample points) which is truth table

invariant for the list of input formulae; or •FAIL:

If

Ais not well-oriented with respect to E(Definition 18).

1 for i=1 . . .t do

2 If there is no designated EC then set Ei:=Aiand otherwise set Ei:= {fi};

3 Compute the finest squarefree basis Fifor prim(Ei);

4 Set F← ∪t i=1Fi; 5 if n=1 then

6 Isolate the real roots of the polynomials in F and

thus form cell indices and sample points for a CAD of

R;

7 return I andS forD;

8 else

9 for i=1 . . .t do

10 Extract the set Aiof polynomials in φi;

11 Compute the set Ciof contents of the elements of Ai;

12 Compute the set Bi, the finest squarefree basis for prim(Ai);

13 Set C:= ∪t

i=1Ci, B:= (Bi)ti=1and F:= (Fi)ti=1; 14 Construct the projection set P:=CPF(B);

15 Attempt to construct a lower-dimensional CAD: w,I,S:= CADW(n−1,P);

16 if w=false then

17 return FAIL (sincePis not well oriented) ; 18 I← ∅; S← ∅;

19 for eachcellc∈ Ddo

20 Lc← {};

21 for i=1,. . .t do

22 if anyfEiisnullifiedonc then

23 if dim(c)>0 then

24 return FAIL (since{φi}ti=1is not well oriented) ;

25 else

26 LcLcBi;

27 else

28 LcLcFi;

29 Generate a stack over c usingLc: construct cell indices and sample points for the stack over c of

the

polynomials in Lc, adding them to I andS ;

30 return I andS forD;

4. Algorithm

4.1. Descriptionandproof

We describe carefullyAlgorithm 1. Thiswill createa TTICAD of

R

n fora listof QFFs

i

}

ti=1 in

variables x

=

x1

x2

≺ · · · ≺

xn, where each

φi

has at mostone designated EC fi

=

0 of positive

degree(theremaybeothernon-designatedECs).

Itusesasubalgorithm

CADW

,whichwasvalidatedby McCallum (1998).Theinputof

CADW

is:r, apositiveintegerand A,asetofr-variateintegralpolynomials.The outputisabooleanw whichif trueisaccompanied byan order-invariant CADfor A (representedasa listofindices I andsample points S).

Let Ai bethesetofall polynomialsoccurringin

φi

.If

φi

hasadesignatedECthenput Ei

= {

fi

}

andifnotputEi

=

Ai.Let

A

and

E

bethelistsoftheAiandEirespectively.Ouralgorithmeffectively

definesthereducedprojectionof

A

withrespectto

E

intermsofthespecialcaseofthisdefinition fromtheprevioussection.Thedefinitionamountsto

(16)

HereC isthesetofcontentsofalltheelementsofall Ai;

B

thelist

{

Bi

}

ti=1suchthatBiisthefinest2

squarefreebasisforthesetprim

(

Ai)ofprimitivepartsofelementsofAi whichhavepositivedegree;

and

F

is thelist

{

Fi

}

ti=1,such that Fi is thefinest squarefreebasis for prim

(

Ei).(Thereader may

notice thatthisnotation andthe definitionof PE

(

A)

hereisanalogoustothework inSection5 of

McCallum, 1999.)

We shallprovethat,providedtheinputsatisfiesthecondition ofwell-orientedness givenin Def-inition 18, theoutput ofAlgorithm 1 is indeeda TTICADfor

i

}

. Wefirst recall themore general

notionofwell-orientednessfromMcCallum (1998).Thebooleanoutputof

CADW

isfalseiftheinput setwasnotwell-orientedinthissense.

Definition17.A set A of n-variate polynomialsissaid tobe welloriented ifwhenever n

>

1,every f

prim

(

A

)

is nullified by at most a finite number of points in

R

n−1, and (recursively) P

(

A

)

is well-oriented.

Thisconditionisrequiredfor

CADW

sincethevalidityofthisalgorithmreliesonTheorem 4which holdsonlywhenpolynomialsdonotvanishidentically.Theconditionsallowsfora finitenumberof thesenullificationssincethisindicates aproblemonazerocell,thatisasinglepoint.Insuchcases it is possible to replacethe nullified polynomial by a so called delineatingpolynomial whichis not nullifiedandcanbeusedinplacetoensurethedelineabilityoftheother.Theuseoftheseispartof theverifiedalgorithm

CADW

(McCallum, 1998) andtheyarestudiedindetailbyBrown (2005).

Wenowdefineournewnotionofwell-orientednessforthelistsofsets

A

and

E

.

Definition18.Wesay that

A

iswellorientedwithrespectto

E

if,whenevern

>

1,every polynomial f

E isnullifiedby atmosta finitenumberofpoints in

R

n−1,and PF

(

B)

is well-orientedinthe senseofDefinition 17.

ItisclearthanAlgorithm 1terminates.Wenowprovethatitiscorrectusingthetheorydeveloped inSection3.

Theorem19.Theoutputof

Algorithm 1

isasspecified.

Proof. We must show that when the input is well-oriented the output is a TTICAD, (each

φi

has constanttruthvalueineachcellof

D

),and FAIL otherwise.

Iftheinputwasunivariatethenitistriviallywell-oriented.ThealgorithmwillconstructaCAD

D

of

R

1 usingtherootsoftheirreduciblefactorsofthepolynomialsin E (steps6to7).Ateach0-cell

all the polynomialsin each

φi

trivially haveconstant signs,and henceevery

φi

hasconstant truth value. Ineach 1-cellno EC can change signand so every

φi

hasconstant truth value false,unless therearenoECsinanyclause.InthiscasethealgorithmwouldhaveconstructedaCADusingallthe polynomials andhence oneach 1-cellno polynomialchanges signandsoeach clause hasconstant truthvalue.

From nowonsupposen

>

1.If

P

=

C

PF

(B)

isnotwell-orientedinthesense ofDefinition 17

then

CADW

returnswasfalse.InthiscasetheinputisnotwellorientedinthesenseofDefinition 18

and Algorithm 1 correctly returns FAIL in step 17. Otherwise, we have w

=

true with I and S specifying a CAD,

D

, which is order-invariant withrespect to

P

(by the correctness of

CADW

, as proved in McCallum, 1998). Letc, a submanifoldof

R

n−1,be a cell of

D

 andlet

α

be its sample point.

We supposefirstthatthedimensionofc ispositive.Ifanypolynomial f

E vanishesidentically on c then the input is not well orientedin thesense ofDefinition 18 andthe algorithm correctly returns FAIL atstep24.Otherwise,weknowthattheinputlistwascertainlywell-oriented.Sinceno polynomial f

E vanishesthennoelementofthebasis F vanishesidenticallyonc either.Hence,by

(17)

Theorem 16,appliedwith

A

=

B

and

E = F

,eachelementof F isdelineableonc,andthesections overc oftheelementsofF arepairwisedisjoint.Thusthesectionsandsectorsoverc oftheelements of F compriseastack



overc.Furthermore,thelast conclusionofTheorem 16assures usthat,for each i,every element of Bi

\

Fi is sign-invariantineach section over c ofevery element of Fi.Let

1

i

t.Weshallshowthateach

φi

hasconstanttruthvalueinboththesectionsandsectorsof



. If

φi

hasadesignatedECthenlet fi denotetheconstraintpolynomial;otherwiselet fi denotean

arbitraryelementofAi.

Consider firsta section

σ

of



. Now fi is aproduct ofits content cont

(

fi)andsome elements

ofthebasis Fi.Butcont

(

fi),anelementof

P

,issign-invariant(indeedorder-invariant)inthewhole

cylinderc

× R

andhence,inparticular, in

σ

.Moreover all oftheelements of Fi are sign-invariant

in

σ

,as was noted previously. Therefore fi issign-invariant in

σ

. If

φi

has no constraint (andso

fi denotesan arbitraryelement of Ai) then thisimpliesthat

φi

hasconstant truth value in

σ

. So

considerfromnowonthecaseinwhich fi

=

0 isthedesignatedconstraintpolynomialof

φi

.

If fiispositiveornegativein

σ

then

φi

hasconstanttruthvaluefalse in

σ

.Sosupposethat fi

=

0

throughout

σ

.Itfollowsthat

σ

mustbeasectionofsomeelementofthebasis Fi.Letg

Ai

\

Eibe

anon-constraintpolynomialinAi.Now,bythedefinitionofBi,wesee g canbewrittenas g

=

cont(g

)

hp1

1

· · ·

h pk k

wherehj

Bi,pj

∈ N

.Butcont

(

g

)

,in

P

,issign-invariant(indeedorder-invariant)inthewhole

cylin-der c

× R

, and hence in particular in

σ

. Moreover each hj is sign-invariant in

σ

, as was noted

previously.Hence g issign-invariantin

σ

.(Notethat inthecasewhere g doesnothavemain vari-ablexn then g

=

cont

(

g

)

andtheconclusionstillholds.) Since g wasanarbitraryelementof Ai

\

Ei,

itfollowsthat allpolynomialsin Ai are sign-invariantin

σ

,hencethat

φi

hasconstant truthvalue

in

σ

.

Nextconsider asector

σ

ofthestack



,andnotice that atleastone such sector exists.As ob-servedabove,cont

(

fi)issign-invariantinc,and fidoesnotvanishidenticallyonc.Hencecont

(

fi)is

non-zerothroughoutc.Moreovereachelementofthebasis Fiisdelineableonc.Hence fiisnullified

bynopointofc.Itfollowsfromthisthatthealgorithmdoesnotreturn FAIL duringtheliftingphase. Itfollowsalsothat fi

=

0 throughout

σ

.Hence

φi

hasconstanttruthvaluefalse in

σ

.

It remains to consider the casein which the dimension ofc is 0. In thiscasethe roots of the polynomialsinthe liftingset Lc constructed by thealgorithm determinea stack



overc. Each

φi

triviallyhasconstanttruthvalueineachsection(0-cell)ofthisstack,andthesamecanroutinelybe shownforeachsector(1-cell)ofthisstack.

2

4.2. TTICADviatheResCADset

When no f

E is nullified there is an alternative implementation of TTICAD which would be simpletointroduceintoexistingCADimplementations.Define

R

(

i

}) =

E



ti=1



resxn

(

f

,

g

)

|

f

Ei

,

g

Ai

,

g

/

Ei



tobetheResCADset of

i

}

.

Theorem20.Let

A

= (

Ai)ti=1bealistofirreduciblebases Aiandlet

E = (

Ei)ti=1bealistofnon-empty

subsetsEi

Ai.Thenwehave P

(

R

(

i

})) =

PE

(

A

).

Theproofisstraightforwardandsoomittedhere.

Corollary21.Ifno f

E isnullifiedbyapointin

R

n−1theninputting

R({φi

})

intoanyalgorithmwhich pro-ducesasign-invariantCADusingMcCallum’sprojectionoperatorP willresultintheTTICADfor

i

}

produced

by

Algorithm 1

.

Corollary 21givesasimple waytocompute TTICADsusingexisting CADimplementationsbased onMcCallum’sapproach,suchas Qepcad.

References

Related documents