http://curve.coventry.ac.uk/open
Truth table invariant cylindrical algebraic
decomposition
Bradford, R. , Davenport, J. H. , England, M. , McCallum, S. and
Wilson, D.
Published PDF deposited in
Curve
February 2016
Original citation:
Bradford, R. , Davenport, J. H. , England, M. , McCallum, S. and Wilson, D. (2016) Truth table
invariant cylindrical algebraic decomposition . Journal of Symbolic Computation, volume 76 :
1-35
URL:
http://dx.doi.org/10.1016/j.jsc.2015.11.002
DOI: 10.1016/j.jsc.2015.11.002
ISSN: 0747-7171
Copyright © and Moral Rights are retained by the author(s) and/ or other copyright
owners. A copy can be downloaded for personal non-commercial research or study,
without prior permission or charge. This item cannot be reproduced or quoted extensively
from without first obtaining permission in writing from the copyright holder(s). The
content must not be changed in any way or sold commercially in any format or medium
without the formal permission of the copyright holders.
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
aaDepartmentofComputerScience,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:
Received21December2014 Accepted21October2015 Availableonline4November2015
MSC:
68W30 03C10
Keywords:
Cylindricalalgebraicdecomposition Equationalconstraint
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/).
✩ ThisworkwassupportedbyEPSRCgrantEP/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/©2015TheAuthors.PublishedbyElsevierLtd.ThisisanopenaccessarticleundertheCCBYlicense (http://creativecommons.org/licenses/by/4.0/).
1. Introduction
A
cylindrical algebraic decomposition (CAD)
isadecompositionofR
nintocellsarrangedcylindrically(meaningtheprojectionsofanypairofcellsareeitherequalordisjoint)eachofwhichis (semi-)alge-braic(describableusingpolynomialrelations).CADisakeytoolinrealalgebraicgeometry,offeringa methodforquantifiereliminationinrealclosedfields.Applicationsincludethederivationofoptimal numericalschemes(ErascuandHong,2014),parametricoptimisation(Fotiouetal.,2005),robot mo-tionplanning(SchwartzandSharir,1983),epidemicmodelling(Brownetal.,2006),theoremproving (Paulson,2012) andprogrammingwithcomplexfunctions(Davenportetal.,2012).
TraditionallyCADsareproduced
sign-invariant to
agivensetofpolynomials(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 truth table invariant 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. Background on CAD
A
Tarski
formula F(x
1,
. . . ,
xn)
isaBooleancombination(∧,
∨,
¬,
→
)ofstatementsaboutthesigns,(
=
0,
>
0,
<
0,buttherefore=
0,
≥
0,
≤
0 aswell),ofcertain polynomials fi(x
1,
. . . ,
xn)
withintegercoefficients.Suchstatementsmayinvolvetheuniversalorexistentialquantifiers(
∀,
∃
).Wedenoteby QFFaquantifier-free Tarski formula.
GivenaquantifiedTarskiformula
Qk+1xk+1
. . .
QnxnF(
x1, . . . ,
xn)
(1)(where Qi
∈ {∀,
∃}
and F is a QFF)thequantifier elimination problem is
toproduceψ(x
1,
. . . ,
xk)
,anequivalentQFFto(1).
Collins developedCADasatoolforquantifiereliminationover thereals.He proposedto decom-pose
R
n cylindricallysuch thateach cellwas sign-invariantforallpolynomials fi usedtodefine F .
Then
ψ
wouldbethedisjunctionofthedefining formulaeofthosecells ci inR
k suchthat (1)wastrueoverthewholeof
c
i,whichduetosign-invarianceisthesameassaying that(1)istrueatanyone
sample point of c
i.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 projection polynomials. Theseare used in the second phase, lifting, to build theCAD incrementally.FirstR
is decomposedinto cells which are points and intervalscorresponding to the real rootsof theunivariate polynomials. ThenR
2 isdecomposedbyrepeatingtheprocess overeachcellinR
usingthebivariatepolynomialsatasamplepoint.Overeachcellthereare
sections (where
apolynomialvanishes)andsectors (the
regions between)whichtogether formastack.
TakingtheunionofthesestacksgivestheCADofR
2.Thisis repeateduntilaCADofR
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 polynomialsare
delineable in
acellifeachisdelineableandthesectionsofdifferentpolynomialsin the cell are either identicalordisjoint. The projection operator usedmust be definedso that overeachcellofasign-invariantCADforprojectionpolynomialsin
r variables
(thewordover meaning
we 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(sowefirstprojectwithrespectto
x
n andcontinuetoreachunivariatepolynomialsin
x
1).Themain variable of
apolynomial(mvar)isthegreatestvariablepresentwithrespecttotheordering.
CADhasdoublyexponentialcomplexityinthenumberofvariables(BrownandDavenport,2007; DavenportandHeintz, 1988). Therenow existalgorithms withbettercomplexity forsomeCAD ap-plications(seeforexampleBasuetal.,1996)butCADimplementationsoftenremainthebestgeneral purposeapproach. There have beenmany developmentsto the theory since Collin’s treatment, in-cludingthefollowing:
•
Improvementstotheprojectionoperator(Hong,1990;McCallum,1988, 1998;Brown,2001; Han etal.,2014),reducingthenumberofprojectionpolynomialscomputed.•
Algorithmstoidentifytheadjacencyofcells ina CAD(Arnonetal., 1984b, 1988)andfollowing fromthistheideaofclustering(Arnon,1988) tominimisethelifting.•
PartialCAD,introduced byCollinsandHong (1991),wherethestructure ofF is usedtoliftless ofthedecompositionofR
k toR
n,ifitissufficienttodeduceψ
.•
The theory ofequational constraints (McCallum, 1999, 2001; Brownand McCallum, 2005) also aimingtodeduceψ
itself,thistimeusingmoreefficientprojections.•
Theuseofcertifiednumerics intheliftingphasetominimisetheamountofsymbolic computa-tionrequired(Strzebo ´nski,2006; Iwaneetal.,2009).•
New approaches which break with the normal projection and lifting model: local projection (Strzebo ´nski,2014),thebuildingofsingleCADcells(Brown,2013; Jovanovicandde Moura,2012) andCADviatriangular decomposition (Chen etal.,2009b). Thelatteris nowused fortheCAD commandbuilt into Maple,andworksby firstcreatinga cylindricaldecompositionof complex space.1.2. TTICAD
Brown (1998)defineda
truth-invariant CAD as
oneforwhichaformulahadinvarianttruthvalueon 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 decompositionD
isaTruth Table Invariant CAD fortheQFFs(TTICAD)iftheBooleanvalueofeach
φ
iisconstant(eithertrueorfalse)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 equational constraint(EC)of
φ
∗if f=
0 islogicallyimpliedbyφ
(thequantifier-freepartofφ
∗).Suchaconstraintmaybe eitherexplicit(anatomoftheformula)orotherwiseimplicit.InSections3and4wewilldescribehowTTICADscanbeproducedefficientlywhenthereareECs presentinthelistofformulae.Therearetworeasonstousethistheory.
(1) As
a tool to build a truth-invariant CAD efficiently: If
aparentformulaφ
∗ isbuiltfromtheformulae{φ
i}
thenanyTTICADfor{φ
i}
isalsotruth-invariantforφ
∗.WenotethatforsuchaformulaaTTICADmayneedtocontainmorecellsthanatruth-invariant CAD. Forexample,consideracell inatruth-invariantCADfor
φ
∗= φ1
∨ φ2
within whichφ
1 isalways true.If
φ
2 changedtruth value insucha cellthenit wouldneedtobe splitinordertoachieveaTTICAD,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) When
given a problem for which truth table invariance is required: That
is,aproblemforwhichthe listofformulaearenotderivedfromalargerparentformulaandthusatruth-invariantCADfor theirdisjunctionmaynotsuffice.For example,decomposing complexspace accordingto aset ofbranch cutsforthe purposeof algebraicsimplification(BradfordandDavenport,2002; Phisanbutetal.,2010).Heretheideaisto representeachbranchcutasasemi-algebraicsettogiveinputadmissibletoCAD(recentprogress onthishasbeendescribedbyEnglandetal.,2013).ThenaTTICADforthelistofformulaethese setsdefineprovidesthenecessarydecomposition.Example 33isfromthisclass.
1.3. Worked examples
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−
14f2
:= (
x−
4)
2+ (
y−
1)
2−
1 g2:= (
x−
4)(
y−
1)
−
14Supposewewishtofindtheregionsof
R
2 wherethefollowingformulaistrue::= (
f1=
0∧
g1<
0)
∨ (
f2=
0∧
g2<
0) .
(2)Both Qepcad (Brown,2003) and Maple 16(Chenetal.,2009b) produceasign-invariantCADforthe polynomialswith317cells.Thenbytestingthesamplepointfromeachregionwecansystematically identifywheretheformulaistrue.
AtfirstglanceitseemsthatthetheoryofECsisnotapplicableto
asneither f1
=
0 nor f2=
0is logically implied by
. However, while there is no explicit EC we can observe that f1f2
=
0 isan
implicit constraint
of.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. Contributions and plan of the paper
We reviewtheprojection operatorsofMcCallum (1998,1999)inSection2.Theformerproduces sign-invariantCADs1andthelatterCADstruth-invariantforaformulawithanEC.Thereviewis nec-essarysinceweusesomeofthistheorytoverifyournewalgorithm.Italsoallowsustocompareour
Fig. 1. ThepolynomialsfromtheworkedexamplesofSection1.3.Thesolidcurvesare f1andg1whilethedashedcurvesare
f2andg2.
newcontributiontotheseexistingapproaches.Forthispurposeweprovidenewcomplexityanalyses oftheseexistingtheoriesinSection2.3.
Sections3and4presentournewTTICADprojectionoperatorandverifiedalgorithm.Theyfollow Sections2and3ofourISSAC2013paper(Bradfordetal.,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 (Bradfordet 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-invariant CAD
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.
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 irreducible basis if the elements of A are of positive degree in themainvariable,irreducibleandpairwise relativelyprime.Let A be a setofpolynomialsandB an irreduciblebasisoftheprimitivepartof A. ThenP
(
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.) Let A be an irreducible basis inZ[
x]
and let S be a connected submanifold ofR
n−1. Suppose each element of P(
A)is order-invariant in S.Then each element of A either vanishes identically on S or is analytic delineable on S, (a slight variant on traditional delineability, see McCallum,1998). Further, the sections of A not identically vanishing are pairwise disjoint, and each element of A not identically vanishing is order-invariant in such sections.
Theorem 4 means that we can use P in place of Collins’ projection operator to produce sign-invariantCADssolongasnoneoftheprojectionpolynomialswithmainvariable
x
kvanishesonacelloftheCADof
R
k−1;aconditionthatcanbecheckedwhenlifting.Inputwiththispropertyisknownas 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: CAD invariant with respect to an equational constraint
ThemainresultunderlyingCADsimplificationinthepresenceofanECfollows.
Theorem5.
(See
McCallum,1999.) Let f(
x),
g(x)
be integral polynomials with positive degree in xn, let r(x1,
. . . ,
xn−1)
be their resultant, and suppose r=
0.Let S be a connected subset of
R
n−1such that f isdelineable on S and r is order-invariant in S.
Then g is sign-invariant in every section of f over S.
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 is delineableonS (noting that Theorem 4with n
=
3 and A= {
f}
provides sufficient conditions forthis). We ask whetherg is
sign-invariantinthesectionsof f over S. Theorem 5answersthisquestionaffirmatively: therealvarietyofg either
alignswithagivensectionof f exactly (asforthebottomsectionof f in Fig. 2),orhasnointersectionwithsuchasection(asforthetop).Thesituationatthemiddlesection of f cannot happen.Theorem 5 thus suggestsa reduction oftheprojection operator P relative to an EC f
=
0: take only P(
f)
together withtheresultantsof f with thenon-ECs.Let A be asetofpolynomials, E⊂
A containonlythepolynomialdefiningtheEC,F be
asquarefreebasisof A, andB be
thesubsetof F whichisasquare-freebasisforE.
TheoperatorFig. 2. Graphical representation ofTheorem 5.
waspresentedbyMcCallum (1999)alongwithanalgorithmtoproduceaCADtruth-invariantforthe ECandsign-invariantfortheotherpolynomialswhentheECwassatisfied.Itworkedbyapplyingfirst PE
(A)
andthenbuildingan order-invariantCADofR
n−1 using P . Wecallsuch CADsinvariant with
respect to an equational constraint. Note that aswithMcCallum (1999) thealgorithm only worksfor inputsatisfyinga well-orientednesscondition.Full detailsoftheverificationaregivenby McCallum (1999)andacomplexityanalysisisgiveninthenextsubsection.2.3. New complexity analyses
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 cell count. Wecomparethedominanttermsinacellcountboundforeachalgorithmstudied.Thisfocusavoids calculationswithlessrelevantparameters, identicalforallthealgorithms. Wenotethat allCAD ex-perimentationshowsastrongcorrelationbetweenthenumberofcellsproducedandthecomputation time.Ourkeyparametersarethenumberofvariables
n,
thenumberofpolynomialsm and
their maxi-mumdegreed (in
anyonevariable).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 4in
x and
degree3 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 andthusthe
(
1,
9)
-property.However,bypartitioningitintothreesetsofonepolynomialeach,italsohas the(
3,
4)
-property.Partitioninginto2setswillshowittohavethe(
2,
5)
,(
2,
7)
and(
2,
8)
-properties also.Thefollowingresultfollowsfromthedefinitions.Thiscontrastswiththefactsthattakingasquare-freebasismaynotreducethecombineddegree, butmaycauseexponentialblow-upinthenumberofpolynomials.
Proposition9.
Suppose a set has the (m,
d)-property. Then, by taking the union of groups of sets from the partition, it also has the m
, d
-property.Notethatinthecase
=
2 wehavem2=
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 is given by S= {
x2, y
4−
x, y4+
x}
which hasthe(
3,
4)
and
(
1,
8)
-properties.Proposition 9statesthat Smustalsohavethe
(
2,
8)
-property,whichcanbecheckedby partition-ingS
sothatx
2 isinasetofitsown.However,fromProposition 8wealsoknowthat Smusthavethe
(
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)1adres
(
f,
f)
(8)where
d is
thedegree of f , f itsderivative anda
d itsleading coefficient(alltakenwithrespecttothegivenmainvariable).
Lemma11.
Suppose A is a set of polynomials in n variables with the (m,
d)property. Then P(A)
has the(M,
2d2)
property with M=
(
m+
1)
2 2.
(9)Proof. Partition A as S1
∪ · · · ∪
Sm accordingtoits(m,
d)-property. LetB be asquare-freebasis forprim
(A)
, T1 thesetofelementsof B which dividesomeelementofS
1,andTi bethoseelementsof B which dividesomeelementofS
i butwhichhavenotalreadyoccurredinsomeT
j:
j <i.(1) Wefirstclaimthateachset
cont
(
Si)
∪
ldcf(
Ti)
∪
disc(
Ti)
∪
res(
Ti)
(10)for
i
=
1,
. . . ,
m has the(
1,
2d2)
property.Letc be
theproductoftheelementsofcont(S
i)
,Ti=
{
F1,
. . . , F
t}
forsomet
and F:=
c F1,
. . .
Ft. Then F divides the product of the elements of Siand so hasdegree atmost
d.
Thus res(F, F
)
musthave degree at most2d2 because it isthe determinant ofa(
2d−
1×
2d−
1)
matrix inwhich each element hasdegree atmost d. Thenby (8) and repeated applicationof (6) and (7) we see res
(F
, F
)
is a (non-trivial) power of c multipliedby tj=1ldcf
(
Fj)
tj=1disc(
Fj)
tj<kres(
Fj,
Fk)
2.
Sincethisincludesalltheelementsof(10)theclaimisproved.
(2) Wearestillmissingfrom
P
(A)
theres(
f, g)
where f∈
Ti, g
∈
Tjandi
=
j. Forfixedi, j consider
res
f∈Ti f,
g∈Tjg,whichby(6)istheproductofthemissingresultants.Thisistheresultant oftwo polynomialsofdegreeatmost
d and
hencewillhavedegree atmost2d2.Thus forfixed i, j the setofmissingresultantshasthe(
1,
2d2)
-property,andsotheunionofallsuchsets the1
2m(m
−
1),
2d2
-property.(3) Weare now missingfrom P
(A)
onlythe non-leadingcoefficientsof B. The polynomialsin the set Ti havedegree atmostd when multipliedtogether,andso,separately or together,haveatmost
d non-leading coefficients,
eachofwhichhasdegreeatmostd.
Hencethissetofnon-leading
coefficientshas the(
1,
d2)
property. This is thecase for i from 1 to m and thus together thenon-leadingcoefficientsof
B have
the(m,
d2)
-property.Wecan thenpairupthesesetstogetapartitionwiththe
(
m/2,
2d2)
-property(Proposition 9). Hence P(A)
canbepartitionedintom
+
m(
m−
1)
2+
m 2=
m(
m+
1)
2+
m
+
1 2=
(
m+
1)
2 2sets (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 set of polynomials with the
(m,
d) property where m >1,then
P(A)
has the(m
2,
2d2)-property.
Remark13.
(1) Notethatif
A has
the(
1,
d)-propertythenP
(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
(m
2d, 2d2)
-propertyinplaceofCorollary 12.Theextradependencyond was
avoidedbyanimprovedanalysisintheproofofLemma 11part(3).
Weconsiderthegrowthinprojectionpolynomialsandtheirdegreewhenusingtheoperator P in Table 1.Herethecolumnheadingsrefernottothenumberofpolynomialsandtheirdegree,buttothe numberofsetsandtheircombineddegreewhenapplyingDefinition 7.Westartwith
m polynomials
ofdegreed and
afteroneprojectionhaveasetwiththe(M,
2d2)
property,usingM from
Lemma 11.WethenuseCorollary 12tomodelthegrowthinsubsequentprojections,andasimpleinductionto fillinthetable.
ThesizeoftheCADproduceddependsonthenumberofrealrootsoftheprojectionpolynomials. Wecanhenceboundthenumberofrealrootsinasetofpolynomialswiththe
(m,
d)-propertywith md (in practicemanyofthemwillbestrictlycomplex).Wecan thereforeboundthenumberofreal rootsoftheunivariateprojectionpolynomialsbytheproductofthetwoentriesintherowofTable 1Table 1
ExpressiongrowthforCADprojectionwhere:afterthefirstprojectionwehavepolynomialswiththe(M,2d2)-propertyand
thereafterwemeasuregrowthusing
Corollary 12
.ThevalueofM couldbe(9)
,(13)
,(18)
,(24)
or(29)
dependingonwhich projectionschemeweareanalysing.Variables Number Degree Product
n m d md n−1 M 2d2 2Md2 n−2 M2 8d4 23M2d4 n−3 M4 128d8 27M4d8 . . . . . . . . . . . . n−r M2r−1 22r−1 d2r 22r−1 d2r M2r−1 . . . . . . . . . . . . 1 M2n−2 22n−1−1 d2n−1 22n−1−1 d2n−1 M2n−2 Product M2n−1−1 m 22n−1−n d2n−1 22n−n−1 d2n−1 M2n−1−1 m
for1variable.The numberofcells intheCADof
R
1 isboundedbytwice thisplus1.Similarly,thetotalnumberofcellsintheCADof
R
n isboundedbytheproductof2K+
1 whereK varies
through theProductcolumnofTable 1,i.e.by(
2Md+
1)
n−1 r=1 2 22r−1d2rM2r−1
+
1.
Omittingthe
+
1 willleaveuswiththedominanttermofthebound,whichcanbecalculated explic-itlyas22n−1d2n−1M2n−1−1m (11)
≤
22n−1d2n−112(
m+
1)
2 2n−1−1m
=
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.
Suppose A is a set of m polynomials in n variables each with maximum degree d, and that E
⊆
A contains a single polynomial. Then the reduced projection PE(
A)has the (M, 2d2)-property with
M
=
1 2(
3m+
1)
.
(13)Proof. Since E contains asinglepolynomialitssquarefreebasis
F has
the(
1,
d)-property.(1) Thecontents,leadingcoefficientsanddiscriminantsfromF form aset R1 withcombineddegree
2d2 (seeproofofLemma 11step1)andtheothercoefficientsaset R2 withcombineddegree
d
2(seeproofofLemma 11step3).
(2) The set of remaining contents R3
=
cont(A)
\
cont(E)
has the(m
−
1,
d)-property and thustrivially, the
(m
−
1,
d2)
-property. Then R2∪
R3 has the(m,
d2)
-property and thus also the m2
,
2d2-property(Proposition 9).
(3) Itremainstoconsiderthefinalsetofresultantsin(5).Followingtheapproachfromtheproofof Lemma 11step2,we concludethatforeachof
m
−
1 polynomialsin A\
E there contributesa setwiththe(
1,
2d2)
-property.Sotogethertheyformaset RHence PE
(A)
iscontainedinR
1∪ (
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)Since
P
E(A)
isasubsetofP
(
A)aCADinvariantwithrespecttoanECshouldcertainlybesimplerthanasign-invariantCADforthepolynomialsinvolved.Indeed,comparingthedifferentvaluesof M weseethat
1 2
(
m+
1)
2
>
12
(
3m+
1)
(
strictly so for m>
1).
Comparingthe dominanttermsinthecell countbounds,(14) and(12),weseethemaineffectisa decreaseinoneofthedoubleexponentsby1.
3. AprojectionoperatorforTTICAD
3.1. New projection operator
InMcCallum (1999)thecentralconceptisthereducedprojectionofasetofpolynomials
A relative
toasubset E (defining the EC).Thefull projectionoperatorisapplied to E and then supplemented bytheresultantsofpolynomialsinE with
thosein E\
A, sincethelattergrouponlyeffectthetruth oftheformulawhen theysharea rootwiththeformer.We extendthisideato define aprojection foralist ofsetsof polynomials(derivedfromalist offormulae),some ofwhich mayhavesubsets (derivedfromECs).ForsimplicityinMcCallum (1999)theconceptisfirstdefinedforthecasewhen
A is
anirreducible basis.Weemulatethisapproach,generalisingforothercasesbyconsideringcontentsandirreducible factorsofpositive degreewhen verifyingthealgorithm inSection4. SoletA
= {
Ai}
ti=1 bea listofirreduciblebases Ai andlet
E = {E
i}
ti=1bealistofsubsetsE
i⊆
Ai.PutA
=
ti=1AiandE
=
ti=1Ei.Notethat weusetheconventionofuppercaseRoman lettersforsetsofpolynomialsandcalligraphic lettersforlistsofthese.
Definition15.Withthenotationabovethe
reduced projection of A
with respect to E isPE
(
A
)
:=
ti=1PEi(
Ai)
∪
RES×(
E
)
(15)whereRES×
(E)
isthecrossresultantsetRES×
(
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.
Let S be a connected submanifold of
R
n−1. Suppose each element of PE
(A)
is order invariantin S. Then each f
∈
E either vanishes identically on S or is analytically delineable on S; the sections over S of the f∈
E which do not vanish identically are pairwise disjoint; and each element f∈
E which does not vanish identically is order-invariant in such sections.Moreover, for each i, in 1
≤
i≤
t every g∈
Ai\
Eiis sign-invariant in each section over S of every f∈
Ei which does not vanish identically.Proof. Thecrucialobservationforthefirstpartisthat
P
(E)
⊆
PE(
A)
.Toseethis,recallequation(15) andnotethatwecanwriteP
(
E)
=
iP(
Ei)
∪
RES×(
E
).
We canthereforeapply Theorem 4 totheset E and obtain thefirstthree conclusionsimmediately, leavingonlythefinalconclusiontoprove.
Let i be in the range1
≤
i≤
t, let g∈
Ai\
Ei and let f∈
Ei. Suppose that f does not vanishidenticallyon S. Nowresxn
(
f, g)
∈
PE(A)
,andsoisorder-invariant in S by hypothesis. Further,wealreadyconcludedthat f is delineable.ThereforebyTheorem 5, g is sign-invariantineachsectionof f over S.
2
Theorem 16isthekeytoolfortheverificationofourTTICADalgorithminSection4.Itallowsus to concludetheoutputiscorrectsolongasno f
∈
E vanishes identicallyonthelowerdimensional manifold, S. Apolynomial f in r variables thatvanishesidenticallyatapointα
∈ R
r−1issaidtobenullified at α.
The theory ofthis subsectionappears identical to the work in Bradfordet al. (2013a). The dif-ference isintheapplicationofthetheory inSection4.We supposethatthe inputisa listofQFFs,
{φ
i}
,witheach Ai definedfromthepolynomialsineachφ
i.InBradfordetal. (2013a)therewas anassumption(nolongermade)thateachoftheseformulaehadadesignatedEC fi
=
0 fromwhichthesubsets Ei are defined. Instead,we define Ei to bea basis for
{
fi}
ifthereis sucha designatedECanddefine Ei
=
Ai otherwise.Thatis,we needtotreatallthepolynomialsinQFFswithnoECwiththeimportanceusuallyreservedforECs.
3.2. Comparison with using a single implicit equational constraint
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.Theim-plicitECapproachwouldcorrespondtousingthereducedprojection PE
(
A)ofMcCallum (1999),with E= ∪
iEiandA= ∪
iAi.WemakethesimplifyingassumptionthatA is
anirreduciblebasis.Ingeneral PE(A)
willstillcontain fewerpolynomialsthan PE(A)
since PE(A)
contains allresultantsres(
f, g)
where f
∈
Ei,
g∈
Aj(andg
∈
/
E), whileP
E(A)
containsonlythosewithi
=
j (and g∈
/
Ei).Thuseveninsituationswheretheprevious theoryappliesthereisan advantageinusingthenewTTICAD the-ory.Thesesavingsarehighlightedbytheworkedexamplesinthenextsubsectionandthecomplexity analysislater.
3.3. Worked examples
InSection4wedefineanalgorithmforproducingTTICADs.Firstweillustratethesavingswithour workedexamplesfromSection1.3,whichsatisfythesimplifyingassumptionsfromSection3.1.
Westartbyconsidering
fromequation(2).Inthenotationabovewehave:
A1
:= {
f1,
g1},
E1:= {
f1};
A2
:= {
f2,
g2},
E2:= {
f2}.
Fig. 3. Thepolynomialsfrominequation
(2)
alongwiththerootsofPE(A)(solidlines),PE(A)(dashedlines)and P(A)(dottedlines).
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 withg
2).If we were to instead use a projection operator based on an implicitEC f1f2
=
0 then in thenotationabovewewouldconstructPE
(
A)fromA= {
f1, f
2,
g1, g
2}andE
= {
f1, f
2}.Thissetprovidesanextra4solutions(thedashedverticallines)whichalignwiththeintersectionsof f1 with g2 and
f2with
g
1.Finally,ifweweretoconsiderP
(A)
thenwegainafurther4solutions(thedottedverticallines) whichalign withthe intersectionsof g1 and g2 andtheasymptotes ofthe gi’s.In Fig. 4we
magnifyaregiontoshowexplicitlythatthepointofintersectionbetween f1 and
g
1 isidentifiedbyPE
(A)
,whiletheintersectionsof g2 withboth f1andg
1 areignored.The 1-dimensionalCADproduced using PE
(A)
has 25cells compared to 33when using PE(A)
and41whenusing
P
(A)
.However,itisimportanttonotethatthisreductionisamplifiedafterlifting (usingTheorem 16andAlgorithm 1).The2-dimensionalTTICADhas105cells andthesign-invariant CADhas317.Using Qepcad tobuildaCADinvariantwithrespecttotheimplicitECgivesus249cells.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},
andso
P
E1(A
1)
isasabovebutP
E2(A
2)
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 morepointsintheCADofR
1 havebeen identifiedfortheTTICADofthantheTTICADof
(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.
Algorithm 1: TTICADalgorithm.
Input : Alistofquantifier-freeformulae{φi}ti=1invariablesx1,. . . ,xn.EachφihasatmostonedesignatedEC fi=0. Output: Either• D:ACADofRn(describedbylistsI andS ofcellindicesandsamplepoints)whichistruthtable
invariantforthelistofinputformulae;or •FAIL:IfAisnotwell-orientedwithrespecttoE(Definition 18).
1 for i=1. . .t do
2 IfthereisnodesignatedECthensetEi:=AiandotherwisesetEi:= {fi};
3 ComputethefinestsquarefreebasisFiforprim(Ei);
4 SetF← ∪t i=1Fi;
5 if n=1 then
6 IsolatetherealrootsofthepolynomialsinF andthusformcellindicesandsamplepointsforaCADofR;
7 return I andS forD;
8 else
9 for i=1. . .t do
10 ExtractthesetAiofpolynomialsinφi;
11 ComputethesetCiofcontentsoftheelementsofAi;
12 ComputethesetBi,thefinestsquarefreebasisforprim(Ai);
13 SetC:= ∪t
i=1Ci,B:= (Bi)it=1andF:= (Fi)ti=1;
14 ConstructtheprojectionsetP:=C∪PF(B);
15 Attempttoconstructalower-dimensionalCAD:w,I,S:= CADW(n−1,P);
16 if w=false then
17 return FAIL (sincePisnotwelloriented);
18 I← ∅;S← ∅;
19 for eachcellc∈ Ddo
20 Lc← {};
21 for i=1,. . .t do
22 if anyf∈Eiisnullifiedonc then
23 if dim(c)>0 then
24 return FAIL (since{φi}ti=1isnotwelloriented);
25 else
26 Lc←Lc∪Bi;
27 else
28 Lc←Lc∪Fi;
29 Generateastackoverc usingLc:constructcellindicesandsamplepointsforthestackoverc ofthe
polynomialsinLc,addingthemtoI andS ;
30 return I andS forD;
4. Algorithm
4.1. Description and proof
We describe carefullyAlgorithm 1. Thiswill createa TTICAD of
R
n fora listof QFFs{φ
i}
ti=1 invariables x
=
x1≺
x2≺ · · · ≺
xn, where eachφ
i has at mostone designated EC fi=
0 of positivedegree(theremaybeothernon-designatedECs).
Itusesasubalgorithm
CADW
,whichwasvalidatedby McCallum (1998).TheinputofCADW
is:r,
apositiveintegerand A, asetofr-variate
integralpolynomials.The outputisabooleanw which
if trueisaccompanied byan order-invariant CADfor A (represented asa listofindices I and sample points S).Let Ai bethesetofall polynomialsoccurringin
φ
i.Ifφ
i hasadesignatedECthenput Ei= {
fi}
andifnotput
E
i=
Ai.LetA
andE
bethelistsoftheA
iandE
irespectively.Ouralgorithmeffectivelydefinesthereducedprojectionof
A
withrespecttoE
intermsofthespecialcaseofthisdefinition fromtheprevioussection.ThedefinitionamountstoHere
C is
thesetofcontentsofalltheelementsofallA
i;B
thelist{
Bi}
ti=1suchthatB
iisthefinest2squarefreebasisforthesetprim
(A
i)
ofprimitivepartsofelementsofA
i whichhavepositivedegree;and
F
is thelist{
Fi}
ti=1,such that Fi is thefinest squarefreebasis for prim(E
i)
.(Thereader maynotice 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 generalnotionofwell-orientednessfromMcCallum (1998).Thebooleanoutputof
CADW
isfalseiftheinput setwasnotwell-orientedinthissense.Definition17.A set A of n-variate polynomialsissaid tobe
well oriented if
whenever n >1,every f∈
prim(A)
is nullified by at most a finite number of points inR
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 delineating polynomial which is not nullifiedandcanbeusedinplacetoensurethedelineabilityoftheother.Theuseoftheseispartof theverifiedalgorithmCADW
(McCallum,1998) andtheyarestudiedindetailbyBrown (2005).Wenowdefineournewnotionofwell-orientednessforthelistsofsets
A
andE
.Definition18.Wesay that
A
iswell oriented with respect to
E
if,whenevern >
1,every polynomial f∈
E is nullifiedby atmosta finitenumberofpoints inR
n−1,and PF(
B)
is well-orientedinthe senseofDefinition 17.ItisclearthanAlgorithm 1terminates.Wenowprovethatitiscorrectusingthetheorydeveloped inSection3.
Theorem19.
The output of
Algorithm 1is as specified.Proof. We must show that when the input is well-oriented the output is a TTICAD, (each
φ
i hasconstanttruthvalueineachcellof
D
),and FAIL otherwise.Iftheinputwasunivariatethenitistriviallywell-oriented.ThealgorithmwillconstructaCAD
D
ofR
1 usingtherootsoftheirreduciblefactorsofthepolynomialsin E (steps 6to7).Ateach0-cellall the polynomialsin each
φ
i trivially haveconstant signs,and henceeveryφ
i hasconstant truthvalue. Ineach 1-cellno EC can change signand so every
φ
i hasconstant truth value false, unlesstherearenoECsinanyclause.InthiscasethealgorithmwouldhaveconstructedaCADusingallthe polynomials andhence oneach 1-cellno polynomialchanges signandsoeach clause hasconstant truthvalue.
From nowonsuppose
n >
1.IfP
=
C∪
PF(B)
isnotwell-orientedinthesense ofDefinition 17 thenCADW
returnsw
asfalse.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 toP
(by the correctness ofCADW
, as proved in McCallum, 1998). Letc, a submanifoldofR
n−1,be a cell ofD
andletα
be its samplepoint.
We supposefirstthatthedimensionof
c is
positive.Ifanypolynomial f∈
E vanishes identically 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 vanishes thennoelementofthebasis F vanishes identicallyonc either.
Hence,byTheorem 16,appliedwith
A
=
B
andE = F
,eachelementof F is delineableonc,
andthesections overc of
theelementsofF are pairwisedisjoint.Thusthesectionsandsectorsoverc of
theelements of F comprise astackover
c.
Furthermore,thelast conclusionofTheorem 16assures usthat,for each i, every element of Bi\
Fi is sign-invariantineach section over c of every element of Fi.Let1
≤
i≤
t. Weshallshowthateachφ
i hasconstanttruthvalueinboththesectionsandsectorsof.
If
φ
ihasadesignatedECthenlet fi denotetheconstraintpolynomial;otherwiselet fi denoteanarbitraryelementofAi.
Consider firsta section
σ
of. Now fi is aproduct ofits content cont
(
fi)
andsome elementsofthebasis Fi.Butcont
(
fi)
,anelementofP
,issign-invariant(indeedorder-invariant)inthewholecylinder
c
× R
andhence,inparticular, inσ
.Moreover all oftheelements of Fi are sign-invariantin
σ
,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σ
. Soconsiderfromnowonthecaseinwhich fi
=
0 isthedesignatedconstraintpolynomialofφ
i.If fiispositiveornegativein
σ
thenφ
ihasconstanttruthvaluefalse in σ
.Sosupposethat fi=
0throughout
σ
.Itfollowsthatσ
mustbeasectionofsomeelementofthebasis Fi.Letg
∈
Ai\
Eibeanon-constraintpolynomialinAi.Now,bythedefinitionof
B
i,wesee g can bewrittenasg
=
cont(
g)
hp11
· · ·
hpk
k
where
h
j∈
Bi, p
j∈ N
.Butcont(g)
,inP
,issign-invariant(indeedorder-invariant)inthewholecylin-der c
× R
, and hence in particular inσ
. Moreover each hj is sign-invariant inσ
, as was notedpreviously.Hence g is sign-invariantin
σ
.(Notethat inthecasewhere g does nothavemain vari-ablex
n theng
=
cont(g)
andtheconclusionstillholds.) Since g was anarbitraryelementof Ai\
Ei,itfollowsthat allpolynomialsin Ai are sign-invariantin
σ
,hencethatφ
i hasconstant truthvaluein
σ
.Nextconsider asector
σ
ofthestack,andnotice that atleastone such sector exists.As ob-servedabove,cont
(
fi)
issign-invariantinc,
and fidoesnotvanishidenticallyonc.
Hencecont(
fi)
isnon-zerothroughout
c.
Moreovereachelementofthebasis Fiisdelineableonc.
Hence fiisnullifiedbynopointof
c.
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
over
c.
Eachφ
itriviallyhasconstanttruthvalueineachsection(0-cell)ofthisstack,andthesamecanroutinelybe shownforeachsector(1-cell)ofthisstack.
2
4.2. TTICAD via the ResCAD set
When no f
∈
E is nullified there is an alternative implementation of TTICAD which would be simpletointroduceintoexistingCADimplementations.DefineR
(
{φ
i}) =
E∪
ti=1resxn
(
f,
g)
|
f∈
Ei,
g∈
Ai,
g∈
/
Ei tobetheResCAD set of
{φ
i}
.Theorem20.
Let A
= (
Ai)
ti=1be a list of irreducible bases Aiand let E = (Ei)
ti=1be a list of non-empty subsets Ei⊆
Ai. Then we haveP
(
R
(
{φ
i})) =
PE(
A
).
Theproofisstraightforwardandsoomittedhere.
Corollary21.
If no
f∈
E is nullified by a point inR
n−1then inputting R({φi
})
into any algorithm which pro-duces a sign-invariant CAD using McCallum’s projection operator P will result in the TTICAD for{φ
i}
produced by Algorithm 1.Corollary 21givesasimple waytocompute TTICADsusingexisting CADimplementationsbased onMcCallum’sapproach,suchas Qepcad.