redlog.texi 110 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763
  1. \input texinfo
  2. @c ----------------------------------------------------------------------
  3. @c $Id: redlog.texi,v 1.18 2004/05/04 17:12:51 sturm Exp $
  4. @c ----------------------------------------------------------------------
  5. @c Copyright (c) 1995-2004 Andreas Dolzmann and Thomas Sturm
  6. @c ----------------------------------------------------------------------
  7. @c $Log: redlog.texi,v $
  8. @c Revision 1.18 2004/05/04 17:12:51 sturm
  9. @c Quick switch to 3.0 as good as possible.
  10. @c
  11. @c Revision 1.17 2003/10/12 12:35:31 sturm
  12. @c Some corrections in the doc of pasf.
  13. @c Some doc on ibalp.
  14. @c
  15. @c Revision 1.16 2003/03/19 13:33:47 lasaruk
  16. @c First version of PASF-documentation added.
  17. @c
  18. @c Revision 1.15 2003/03/10 18:50:27 seidl
  19. @c Cared for PASF context and added TODO Lasaruk at several places.
  20. @c Removed READ THIS FIRST hack. Now the following simple commands should
  21. @c generate the desired info, dvi and html output:
  22. @c makeinfo redlog.texi
  23. @c tex redlog.texi
  24. @c texi2html -split_chapter -menu -expandinfo redlog.texi
  25. @c For the online manual, index.html can link now to redlog.html instead
  26. @c of redlog_toc.html. Other desired output forms have still to be looked
  27. @c after.
  28. @c
  29. @c Revision 1.14 2002/08/29 08:12:04 dolzmann
  30. @c Added description of local quantifier elimination.
  31. @c
  32. @c Revision 1.13 2002/01/18 12:39:26 sturm
  33. @c Addded documentation for CAD.
  34. @c
  35. @c Revision 1.12 1999/04/13 22:17:30 sturm
  36. @c Added remark on updates on the WWW page.
  37. @c
  38. @c Revision 1.11 1999/04/13 12:27:14 sturm
  39. @c Removed a blank line within @itemize.
  40. @c
  41. @c Revision 1.10 1999/04/11 12:50:32 sturm
  42. @c Removed reference to program documentation for now.
  43. @c
  44. @c Revision 1.9 1999/04/11 12:23:58 sturm
  45. @c Overworked once more.
  46. @c Better index.
  47. @c Ispelled again.
  48. @c
  49. @c Revision 1.8 1999/04/07 17:05:39 sturm
  50. @c Overworked chapter "Quantifier Elimination and Variants".
  51. @c Ispelled.
  52. @c
  53. @c Revision 1.7 1999/04/05 12:49:12 sturm
  54. @c Finished overworking chapter "Simplification".
  55. @c Overworked chapter "Normal Forms".
  56. @c Completely dropped chapter "Miscellaneous".
  57. @c
  58. @c Revision 1.6 1999/04/01 11:31:06 sturm
  59. @c Overworked chapter "Simplification" and changed indeces.
  60. @c
  61. @c Revision 1.5 1999/03/22 16:48:07 sturm
  62. @c Overworked chapter "Format and Handling of Formulas". There is only "Other
  63. @c Stuff" left in chapter "Miscellaneous" now.
  64. @c
  65. @c Revision 1.4 1999/03/22 14:33:20 sturm
  66. @c Updated references.
  67. @c Overworked Introduction. New section "Loading and Context Selection".
  68. @c
  69. @c Revision 1.3 1998/04/09 11:14:38 sturm
  70. @c Added documentation for switch rlqeqsc.
  71. @c
  72. @c Revision 1.2 1997/10/02 09:36:57 sturm
  73. @c Updated reference to simplification paper.
  74. @c
  75. @c Revision 1.1 1997/08/18 17:22:50 sturm
  76. @c Renamed "rl.texi" to this file "redlog.texi."
  77. @c Changes due to renaming "rl.red" to "redlog.red."
  78. @c
  79. @c ----------------------------------------------------------------------
  80. @c Revision 1.20 1997/08/14 10:10:54 sturm
  81. @c Renamed rldecdeg to rldecdeg1.
  82. @c Added service rldecdeg.
  83. @c
  84. @c Revision 1.19 1996/10/23 12:03:05 sturm
  85. @c Added "exceptionlist" paramter to rlgqe and rlgqea. Several quantifier
  86. @c blocks are treated correctly now.
  87. @c
  88. @c Revision 1.18 1996/10/22 11:17:05 dolzmann
  89. @c Adapted the documentation of the procedures rlstruct, rlifstruct to
  90. @c the new interface.
  91. @c
  92. @c Revision 1.17 1996/10/20 15:57:46 sturm
  93. @c Added documentation for the switches rlnzden, rlposden, and rladdcond.
  94. @c Added documentation for the functions rlvarl, rlfvarl, and rlbvarl.
  95. @c
  96. @c Revision 1.16 1996/10/09 14:46:29 sturm
  97. @c Corrected @settitle.
  98. @c
  99. @c Revision 1.15 1996/10/09 11:41:04 sturm
  100. @c Some more minor changes.
  101. @c
  102. @c Revision 1.14 1996/10/08 17:41:58 sturm
  103. @c Overworked the whole thing more than once.
  104. @c
  105. @c Revision 1.13 1996/10/07 21:58:39 dolzmann
  106. @c Added data structure substitution_list.
  107. @c Added documentation for rlterml, rltermml, rlifacml, rltnf, rltnft,
  108. @c rlstruct, and rlifstruct.
  109. @c
  110. @c Revision 1.12 1996/10/07 18:39:08 reiske
  111. @c Revised and corrected documentation.
  112. @c Added documentation for rlqeipo, rlqews, and rlgentheo.
  113. @c Updated documentation for tableau and Groebner simplifier.
  114. @c Added documentation for data structure "cdl" and "elimination_answer".
  115. @c
  116. @c Revision 1.11 1996/09/26 13:05:17 dolzmann
  117. @c Minor changes in description of rltab.
  118. @c
  119. @c Revision 1.10 1996/09/26 12:14:27 sturm
  120. @c Corrected wrong citation label.
  121. @c
  122. @c Revision 1.9 1996/08/01 12:05:18 reiske
  123. @c Added documentation for rlifacl and rlapnf.
  124. @c
  125. @c Revision 1.8 1996/07/14 10:04:54 dolzmann
  126. @c Updated documentation of the Groebner simplifier.
  127. @c
  128. @c Revision 1.7 1996/06/13 10:03:45 sturm
  129. @c Added documentation for data structure "theory" and for procedures
  130. @c "sub" and "rlgqe".
  131. @c Moved "rlopt" into the Chapter on QE.
  132. @c
  133. @c Revision 1.6 1996/03/12 12:55:55 sturm
  134. @c Changed title to "Redlog User Manual."
  135. @c Many changes in introductory sections: Added functionality overview,
  136. @c "Getting Started", modified the "Bug Report" section, introduced the
  137. @c notion of a "context."
  138. @c Corrected example in the description of rlpnf.
  139. @c Many changes in QE documentation chapter.
  140. @c Added documentation for data structure "multiplicity list", switch
  141. @c rlqeheu, and functions rlmatrix, rlatl, and rlatml.
  142. @c Added a "Data Structure Index."
  143. @c Added new (bibliographic) reference.
  144. @c
  145. @c Revision 1.5 1996/03/04 14:50:26 dolzmann
  146. @c Added description of switches rlgserf, rlbnfsac.
  147. @c Removed description of switch rlbnfsb.
  148. @c
  149. @c Revision 1.4 1996/02/18 15:56:46 sturm
  150. @c Adapted the documentation of rlsiexpla to new default setting T.
  151. @c
  152. @c Revision 1.3 1996/02/18 15:16:48 sturm
  153. @c Added references.
  154. @c Added introductions to chapters on QE and optimization.
  155. @c Added concept index.
  156. @c Added description of input facilities.
  157. @c Modified description of switch rlqedfs.
  158. @c Added description of switches rlbnfsb, rlbnfsm, rlsifac, rlsimpl,
  159. @c rlsipw, rlsipo.
  160. @c
  161. @c Revision 1.2 1995/08/30 07:29:18 sturm
  162. @c Many changes. Version passed to R.O.S.E. with the rl demo.
  163. @c
  164. @c Revision 1.1 1995/07/17 14:33:33 sturm
  165. @c Initial check-in.
  166. @c
  167. @c ----------------------------------------------------------------------
  168. @setfilename redlog.info
  169. @settitle @sc{redlog} User Manual
  170. @c @setchapternewpage off
  171. @smallbook
  172. @defcodeindex rf
  173. @defcodeindex rv
  174. @defcodeindex rt
  175. @ifinfo
  176. This is the documentation of @sc{redlog}, a @sc{reduce} logic package.
  177. Copyright @copyright{} 1995-2004 by A. Dolzmann, A. Seidl, and T. Sturm.
  178. @end ifinfo
  179. @titlepage
  180. @title{Redlog User Manual}
  181. @subtitle A @sc{reduce} Logic Package
  182. @subtitle Edition 3.0, for @sc{redlog} Version 3.0 (@sc{reduce} 3.8)
  183. @subtitle 15 April 2004
  184. @author by A. Dolzmann, A. Seidl, and T. Sturm
  185. @page
  186. @vskip 0pt plus 1filll
  187. Copyright @copyright{} 1995-2004 by A. Dolzmann, A. Seidl, and
  188. T. Sturm.
  189. @end titlepage
  190. @ifnottex
  191. @node Top
  192. @top REDLOG
  193. @heading REDLOG
  194. @sc{redlog} is a @sc{reduce} package containing algorithms on
  195. first-order formulas. The current version is 3.0.
  196. @end ifnottex
  197. @heading Acknowledgments
  198. We acknowledge with pleasure the superb support by Herbert Melenk and
  199. Winfried Neun of the Konrad-Zuse-Zentrum fuer Informationstechnik
  200. Berlin, Germany, during this project. Furthermore, we wish to mention
  201. numerous valuable mathematical ideas contributed by Volker Weispfenning,
  202. University of Passau, Germany.
  203. @heading Redlog Home Page
  204. @cindex @sc{www}
  205. @cindex home page
  206. There is a @sc{redlog} home page maintained at
  207. @center @t{http://www.fmi.uni-passau.de/~redlog/}.
  208. It contains information on @sc{redlog}, online versions of publications,
  209. and a collection of examples that can be computed with @sc{redlog}. This
  210. site will also be used for providing update
  211. @cindex update
  212. versions of @sc{redlog}.
  213. @heading Support
  214. @cindex support
  215. For mathematical and technical support, contact
  216. @center @t{redlog@@fmi.uni-passau.de}.
  217. @heading Bug Reports and Comments
  218. @cindex bug report
  219. Send bug reports and comments to
  220. @center @t{redlog@@fmi.uni-passau.de}.
  221. Any hint or suggestion is welcome. In particular, we are interested in
  222. practical problems to the solution of which @sc{redlog} has contributed.
  223. @menu
  224. * Introduction:: What is @sc{redlog}?
  225. * Loading and Context Selection::
  226. * Format and Handling of Formulas:: How to work with formulas.
  227. * Simplification:: Standard, tableau, and Groebner.
  228. * Normal Forms:: CNF, DNF, NNF, and PNF.
  229. * Quantifier Elimination and Variants:: Elimination set methods.
  230. * References:: Further information on @sc{redlog}.
  231. * Functions::
  232. * Switches and Variables::
  233. * Data Structures::
  234. * Index::
  235. @end menu
  236. @node Introduction
  237. @chapter Introduction
  238. @sc{redlog} stands for @emph{@sc{reduce} logic system}. It provides an
  239. extension of the computer algebra system @sc{reduce} to a @emph{computer
  240. logic system} implementing symbolic algorithms on first-order formulas
  241. wrt.@: temporarily fixed first-order languages and theories.
  242. This document serves as a user guide describing the usage of @sc{redlog}
  243. from the algebraic mode of @sc{reduce}. For a detailed
  244. description of the system design see
  245. @ifinfo
  246. @ref{References,[DS97a]}.
  247. @end ifinfo
  248. @iftex
  249. [DS97a].
  250. @end iftex
  251. @c There is an additional program documentation included in the @sc{reduce}
  252. @c distribution.
  253. An overview on some of the application areas of @sc{redlog} is given in
  254. @ifinfo
  255. @ref{References,[DSW98]}.
  256. @end ifinfo
  257. @iftex
  258. [DSW98].
  259. @end iftex
  260. See also @ref{References} for articles on @sc{redlog}
  261. applications.
  262. @menu
  263. * Contexts::
  264. * Overview::
  265. * Conventions::
  266. @end menu
  267. @node Contexts
  268. @section Contexts
  269. @cindex real numbers
  270. @cindex complex numbers
  271. @cindex p-adic number
  272. @cindex real closed field
  273. @cindex ordered field
  274. @cindex real closed field
  275. @cindex discretely valued field
  276. @cindex algebraically closed field
  277. @cindex contexts available
  278. @cindex available contexts
  279. @cindex @sc{ofsf}
  280. @cindex @sc{acfsf}
  281. @cindex @sc{dvfsf}
  282. @sc{redlog} is designed for working with several @dfn{languages} and
  283. @dfn{theories} in the sense of first-order logic. Both a language and a
  284. theory make up a context. In addition, a context determines the internal
  285. representation of terms. There are the following contexts available:
  286. @table @sc
  287. @item ofsf
  288. @sc{of} stands for @emph{ordered fields}, which is a little imprecise.
  289. The quantifier elimination actually requires the more restricted class
  290. of @emph{real closed fields}, while most of the tool-like algorithms are
  291. generally correct for ordered fields. One usually has in mind real
  292. numbers with ordering when using @sc{ofsf}.
  293. @item dvfsf
  294. @emph{Discretely valued fields}. This is for computing with formulas
  295. over classes of p-adic valued extension fields of the rationals, usually
  296. the fields of p-adic numbers for some prime p.
  297. @item acfsf
  298. @emph{Algebraically closed fields} such as the complex numbers.
  299. @item pasf
  300. @emph{Presssburger Arithmetic}, i.e., the linear theory of integers
  301. with congruences modulo
  302. @tex
  303. $m$
  304. @end tex
  305. @ifinfo
  306. m
  307. @end ifinfo
  308. for
  309. @tex
  310. $m\geq2$
  311. @end tex
  312. @ifinfo
  313. m>=2
  314. @end ifinfo
  315. .
  316. @item ibalp
  317. @emph{Initial Boolean algebras}, basically quantified propositional logic.
  318. @item dcfsf
  319. @emph{Differentially closed fields} according to Robinson. There is no
  320. natural example. The quantifier elimination is an optimized version of
  321. the procedure by Seidenber (1956).
  322. @end table
  323. The trailing "@sc{-sf}" stands for @emph{standard form}, which is the
  324. representation chosen for the terms within the implementation.
  325. Accordingly, "@sc{-lp}" stands for @emph{Lisp prefix}.
  326. @xref{Context Selection}, for details on selecting @sc{redlog}
  327. contexts.
  328. @node Overview
  329. @section Overview
  330. @sc{redlog} origins from the implementation of quantifier elimination
  331. procedures. Successfully applying such methods to both academic and
  332. real-world problems, the authors have developed over the time a large
  333. set of formula-manipulating tools, many of which are meanwhile
  334. interesting in their own right:
  335. @itemize @bullet
  336. @item Numerous tools for comfortably inputing, decomposing, and
  337. analyzing formulas. This includes, for instance, the construction of
  338. systematic formulas via @code{for}-loops, and the extension of built-in
  339. commands such as @code{sub}
  340. @rfindex sub
  341. or @code{part}.
  342. @rfindex part
  343. @xref{Format and Handling of Formulas}.
  344. @item Several techniques for the @emph{simplification} of
  345. formulas. The simplifiers do not only operate on the boolean structure
  346. of the formulas but also discover algebraic relationships. For this
  347. purpose, we make use of advanced algebraic concepts such as Groebner
  348. basis computations. For the notion of simplification and a detailed
  349. description of the implemented techniques for the contexts @sc{ofsf}
  350. @cindex @sc{ofsf}
  351. and @sc{acfsf}
  352. @cindex @sc{acfsf}
  353. see
  354. @ifinfo
  355. @ref{References,[DS97]}.
  356. @end ifinfo
  357. @iftex
  358. [DS97].
  359. @end iftex
  360. For the @sc{dvfsf}
  361. @cindex @sc{dvfsf}
  362. context see
  363. @ifinfo
  364. @ref{References,[DS99]}.
  365. @end ifinfo
  366. @iftex
  367. [DS99].
  368. @end iftex
  369. @xref{Simplification}.
  370. @item Various @emph{normal form computations}. The
  371. @emph{@sc{cnf}/@sc{dnf}} computation includes both boolean and
  372. algebraic simplification strategies
  373. @ifinfo
  374. @ref{References,[DS97]}.
  375. @end ifinfo
  376. @iftex
  377. [DS97].
  378. @end iftex
  379. The @emph{prenex normal form} computation minimizes the number of
  380. quantifier changes. @xref{Normal Forms}.
  381. @item
  382. @cindex comprehensive Groebner Basis
  383. @cindex @sc{cgb}
  384. @emph{Quantifier elimination} computes quantifier-free
  385. equivalents for given first-order formulas.
  386. For @sc{ofsf} and
  387. @cindex @sc{ofsf}
  388. @sc{dvfsf}
  389. @cindex @sc{dvfsf}
  390. we use a technique based on elimination set ideas
  391. @ifinfo
  392. @ref{References,[Wei88]}.
  393. @end ifinfo
  394. @iftex
  395. [Wei88].
  396. @end iftex
  397. The @sc{ofsf}
  398. @cindex @sc{ofsf}
  399. implementation is restricted to at most quadratic occurrences of the
  400. quantified variables, but includes numerous heuristic strategies for
  401. coping with higher degrees. See
  402. @ifinfo
  403. @ref{References,[LW93]}, @ref{References,[Wei97]},
  404. @end ifinfo
  405. @iftex
  406. [LW93], [Wei97]
  407. @end iftex
  408. for details on the method.
  409. The @sc{dvfsf}
  410. @cindex @sc{dvfsf}
  411. implementation is restricted to formulas that are linear in the
  412. quantified variables. The method is described in detail in
  413. @ifinfo
  414. @ref{References,[Stu00]}.
  415. @end ifinfo
  416. @iftex
  417. [Stu00].
  418. @end iftex
  419. The @sc{acfsf}
  420. @cindex @sc{acfsf}
  421. quantifier elimination is based on @emph{comprehensive Groebner basis}
  422. computation. There are no degree restrictions for this context
  423. @ifinfo
  424. @ref{References,[Wei92]}.
  425. @end ifinfo
  426. @iftex
  427. [Wei92].
  428. @end iftex
  429. @xref{Quantifier Elimination}.
  430. @item
  431. @cindex geometric problem
  432. @cindex network analysis
  433. The contexts @sc{ofsf}
  434. @cindex @sc{ofsf}
  435. and @sc{acfsf}
  436. @cindex @sc{acfsf}
  437. allow a variant of quantifier
  438. elimination called @dfn{generic quantifier elimination}
  439. @ifinfo
  440. @ref{References,[DSW98]}.
  441. @end ifinfo
  442. @iftex
  443. [DSW98].
  444. @end iftex
  445. There are certain non-degeneracy assumptions made on the parameters,
  446. which considerably speeds up the elimination.
  447. For geometric theorem proving it has turned out that these assumptions
  448. correspond to reasonable geometric non-degeneracy conditions
  449. @ifinfo
  450. @ref{References,[DSW98]}.
  451. @end ifinfo
  452. @iftex
  453. [DSW98].
  454. @end iftex
  455. Generic quantifier elimination has turned out useful also for physical
  456. applications such as network analysis
  457. @ifinfo
  458. @ref{References,[Stu97]}.
  459. @end ifinfo
  460. @iftex
  461. [Stu97].
  462. @end iftex
  463. There is no generic quantifier elimination available for @sc{dvfsf}.
  464. @cindex @sc{dvfsf}
  465. @xref{Generic Quantifier Elimination}.
  466. @item The contexts @sc{ofsf}
  467. @cindex @sc{ofsf}
  468. and @sc{dvfsf}
  469. @cindex @sc{dvfsf}
  470. provide variants of (generic) quantifier elimination that additionally
  471. compute @dfn{answers}
  472. @cindex answer
  473. such as satisfying sample points for existentially
  474. quantified formulas. This has been referred to as the "extended
  475. quantifier elimination problem"
  476. @ifinfo
  477. @ref{References,[Wei97a]}.
  478. @end ifinfo
  479. @iftex
  480. [Wei97a].
  481. @end iftex
  482. @xref{Quantifier Elimination}.
  483. @item @sc{ofsf}
  484. @cindex @sc{ofsf}
  485. includes linear @emph{optimization} techniques based
  486. on quantifier elimination
  487. @ifinfo
  488. @ref{References,[Wei94a]}.
  489. @end ifinfo
  490. @iftex
  491. [Wei94a].
  492. @end iftex
  493. @xref{Linear Optimization}.
  494. @end itemize
  495. @node Conventions
  496. @section Conventions
  497. To avoid ambiguities with other packages, all @sc{redlog} functions and
  498. switches are prefixed by "@code{rl}". The remaining part of the name is
  499. explained by the first sentence of the documentation of the single
  500. functions and switches.
  501. Some of the numerous switches of @sc{redlog} have been introduced only
  502. for finding the right fine tuning of the functions, or for internal
  503. experiments. They should not be changed anymore, except for in very
  504. special situations. For an easier orientation the switches are divided
  505. into three categories for documentation:
  506. @table @dfn
  507. @item Switch
  508. @cindex switch
  509. This is an ordinary switch, which usually selects strategies appropriate
  510. for a particular input, or determines the required trade-off between
  511. computation-speed and quality of the result.
  512. @item Advanced Switch
  513. @cindex advanced Switch
  514. They are used like ordinary switches. You need, however, a good
  515. knowledge about the underlying algorithms for making use of it.
  516. @item Fix Switch
  517. @cindex fix Switch
  518. You do not want to change it.
  519. @end table
  520. @node Loading and Context Selection
  521. @chapter Loading and Context Selection
  522. @cindex starting @sc{redlog}
  523. @menu
  524. * Loading Redlog::
  525. * Context Selection::
  526. @end menu
  527. @node Loading Redlog
  528. @section Loading Redlog
  529. @cindex loading @sc{redlog}
  530. At the beginning of each session @sc{redlog} has to be loaded
  531. explicitly. This is done by inputing the command @code{load_package
  532. redlog;}
  533. @rfindex load_package
  534. from within a @sc{reduce} session.
  535. @node Context Selection
  536. @section Context Selection
  537. @cindex theory
  538. @cindex language
  539. @cindex relations
  540. @cindex predicates
  541. @cindex functions
  542. Fixing a context reflects the mathematical fact that first-order
  543. formulas are defined over fixed @dfn{languages} specifying, e.g., valid
  544. @dfn{function symbols} and @dfn{relation symbols} (@dfn{predicates}).
  545. After selecting a language, fixing a @dfn{theory} such as "the theory of
  546. ordered fields", allows to assign a semantics to the formulas. Both
  547. language and theory make up a @sc{redlog} context. In addition, a
  548. context determines the internal representation of terms.
  549. As first-order formulas are not defined unless the language is known,
  550. and meaningless unless the theory is known, it is impossible to enter a
  551. first-order formula into @sc{redlog} without specifying a context:
  552. @smallexample
  553. REDUCE 3.6, 15-Jul-95, patched to 30 Aug 98 ...
  554. 1: load_package redlog;
  555. 2: f := a=0 and b=0;
  556. ***** select a context
  557. @end smallexample
  558. @xref{Contexts}, for a summary of the available contexts @sc{ofsf},
  559. @cindex @sc{ofsf}
  560. @sc{dvfsf},
  561. @cindex @sc{dvfsf}
  562. and @sc{acfsf}.
  563. @cindex @sc{acfsf}
  564. A context can be selected by the @code{rlset} command:
  565. @deffn {Function} rlset [@var{context} [@var{arguments}...]]
  566. @deffnx {Function} rlset argument-list
  567. @cindex language selection
  568. @cindex context selection
  569. @rtindex dvf_class_specification
  570. Set current context. Valid choices for @var{context} are @sc{ofsf}
  571. @cindex @sc{ofsf}
  572. (ordered fields standard form), @sc{dvfsf}
  573. @cindex @sc{dvfsf}
  574. (discretely valued fields standard form), @sc{acfsf}
  575. @cindex @sc{acfsf}
  576. (algebraically closed fields standard form), @sc{pasf}
  577. @cindex @sc{pasf}
  578. (Presburger arithmetic standard form), @sc{ibalp}
  579. @cindex @sc{ibalp}
  580. (initial Boolean algebra Lisp prefix), and @sc{dcfsf}
  581. @cindex @sc{dcfsf}
  582. . With @sc{ofsf}, @sc{acfsf},
  583. @sc{pasf}, @sc{ibalp}, and @sc{dcfsf} there are no further arguments. With
  584. @sc{dvfsf} an optional @var{dvf_class_specification} can be passed,
  585. which defaults to @code{0}. @code{rlset} returns the old setting as a
  586. list that can be saved to be passed to @code{rlset} later. When called
  587. with no arguments (or the empty list), @code{rlset} returns the current
  588. setting.
  589. @end deffn
  590. @deftp {Data Structure} {dvf_class_specification}
  591. @cindex p-adic number
  592. @cindex p-adic valuation
  593. @cindex valuation (p-adic)
  594. @cindex valued field
  595. @cindex discretely valued field
  596. Zero, or a possibly negative prime
  597. @tex
  598. $q$.
  599. @end tex
  600. @ifinfo
  601. q.
  602. @end ifinfo
  603. For
  604. @tex
  605. $q=0$
  606. @end tex
  607. @ifinfo
  608. q=0
  609. @end ifinfo
  610. all computations are uniformly correct for
  611. all
  612. @tex
  613. $p$-adic
  614. @end tex
  615. @ifinfo
  616. p-adic
  617. @end ifinfo
  618. valuations. Both input and output then possibly involve a symbolic
  619. constant
  620. @tex
  621. "$p$",
  622. @end tex
  623. @ifinfo
  624. "p",
  625. @end ifinfo
  626. which is being reserved.
  627. For positive
  628. @tex
  629. $q$,
  630. @end tex
  631. @ifinfo
  632. q,
  633. @end ifinfo
  634. all computations take place wrt.@: the corresponding
  635. @tex
  636. $q$-adic
  637. @end tex
  638. @ifinfo
  639. q-adic
  640. @end ifinfo
  641. valuation.
  642. For negative
  643. @tex
  644. $q$,
  645. @end tex
  646. @ifinfo
  647. q,
  648. @end ifinfo
  649. the
  650. @tex
  651. "$-$"
  652. @end tex
  653. @ifinfo
  654. "-"
  655. @end ifinfo
  656. can be read as ``up
  657. to'', i.e., all computations are performed in such a way that they are
  658. correct for all
  659. @tex
  660. $p$-adic
  661. @end tex
  662. @ifinfo
  663. p-adic
  664. @end ifinfo
  665. valuations with
  666. @tex
  667. $p \leq |q|$.
  668. @end tex
  669. @ifinfo
  670. p <= q.
  671. @end ifinfo
  672. In this case, the knowledge of an upper bound for
  673. @tex
  674. $p$
  675. @end tex
  676. @ifinfo
  677. p
  678. @end ifinfo
  679. supports the
  680. quantifier elimination @code{rlqe}/@code{rlqea}
  681. @rfindex rlqe
  682. @rfindex rlqea
  683. @ifinfo
  684. @ref{References,[Stu00]}.
  685. @end ifinfo
  686. @iftex
  687. [Stu00].
  688. @end iftex
  689. @xref{Quantifier Elimination}.
  690. @end deftp
  691. The user will probably have a "favorite" context reflecting their
  692. particular field of interest.
  693. To save the explicit declaration of the
  694. context with each session, @sc{redlog} provides a global variable
  695. @code{rldeflang}, which contains a default context. This variable can be
  696. set already @emph{before} loading @file{redlog}. This is typically done
  697. within the @file{.reducerc} profile:
  698. @cindex @file{.reducerc} profile
  699. @example
  700. lisp (rldeflang!* := '(ofsf));
  701. @end example
  702. Notice that the Lisp list representation has to be used here.
  703. @defvr Fluid rldeflang!*
  704. @cindex language default
  705. @cindex default language
  706. @cindex context default
  707. @cindex default context
  708. Default language. This can be bound to a default context before loading
  709. @file{redlog}. More precisely, @code{rldeflang!*} contains the arguments
  710. of @code{rlset} as a Lisp list. If @code{rldeflang!*} is non-nil,
  711. @code{rlset}
  712. @rfindex rlset
  713. is automatically executed on @code{rldeflang!*} when
  714. loading @file{redlog}.
  715. @end defvr
  716. In addition, @sc{redlog} evaluates an environment variable
  717. @code{RLDEFLANG}. This allows to fix a default context within the shell
  718. already before starting @sc{reduce}. The syntax for setting environment
  719. variables depends on the shell. For instance, in the @sc{gnu} Bash or in
  720. the csh shell one would say @code{export RLDEFLANG=ofsf} or
  721. @code{setenv RLDEFLANG ofsf}, respectively.
  722. @defvr {Environment Variable} RLDEFLANG
  723. @cindex language default
  724. @cindex default language
  725. @cindex context default
  726. @cindex default context
  727. Default language. This may be bound to a context in the sense of the
  728. first argument of @code{rlset}.
  729. @rfindex rlset
  730. With @code{RLDEFLANG} set, any
  731. @code{rldeflang!*}
  732. @rvindex rldeflang!*
  733. binding is overloaded.
  734. @end defvr
  735. @node Format and Handling of Formulas
  736. @chapter Format and Handling of Formulas
  737. After loading @sc{redlog} and selecting a context (@pxref{Loading and
  738. Context Selection}), there are @emph{first-order formulas} available as
  739. an additional type of symbolic expressions. That is, formulas are now
  740. subject to symbolic manipulation in the same way as, say, polynomials or
  741. matrices in conventional systems. There is nothing changed in the
  742. behavior of the builtin facilities and of other packages.
  743. @menu
  744. * First-order Operators::
  745. * Closures::
  746. * OFSF Operators::
  747. * DVFSF Operators::
  748. * ACFSF Operators::
  749. * PASF Operators::
  750. * IBALP Operators::
  751. * DCFSF Operators::
  752. * Extended Built-in Commands::
  753. * Global Switches::
  754. * Basic Functions on Formulas::
  755. @end menu
  756. @node First-order Operators
  757. @section First-order Operators
  758. Though the operators @code{and}, @code{or}, and @code{not} are already
  759. sufficient for representing boolean formulas, @sc{redlog} provides a
  760. variety of other boolean operators for the convenient mnemonic input of
  761. boolean formulas.
  762. @deffn {Unary Operator} not
  763. @deffnx {n-ary Infix Operator} and
  764. @deffnx {n-ary Infix Operator} or
  765. @deffnx {Binary Infix Operator} impl
  766. @deffnx {Binary Infix Operator} repl
  767. @deffnx {Binary Infix Operator} equiv
  768. @cindex negation
  769. @cindex conjunction
  770. @cindex disjunction
  771. @cindex implication
  772. @cindex replication
  773. @cindex equivalence
  774. @cindex expression input
  775. @cindex input facilities
  776. @cindex boolean operator
  777. The infix operator precedence is from
  778. strongest to weakest: @code{and}, @code{or}, @code{impl}, @code{repl},
  779. @code{equiv}.
  780. @end deffn
  781. @xref{Extended Built-in Commands}, for the description of extended
  782. @code{for}-loop
  783. @rfindex for
  784. actions that allow to comfortably input large systematic
  785. conjunctions and disjunctions.
  786. @sc{reduce} expects the user to know about the precedence of @code{and}
  787. over @code{or}. In analogy to @code{+} and @code{*}, there are thus no
  788. parentheses output around conjunctions within disjunctions. The
  789. following switch causes such subformulas to be bracketed anyway.
  790. @xref{Conventions}, for the notion of a "fix switch".
  791. @defvr {Fix Switch} rlbrop
  792. @cindex bracket
  793. @cindex expression output
  794. Bracket all operators. By default this switch is on, which causes some
  795. private printing routines to be called for formulas: All subformulas are
  796. bracketed completely making the output more readable.
  797. @end defvr
  798. Besides the boolean operators introduced above, first-order logic
  799. includes the well-known @dfn{existential quantifiers} and @dfn{universal
  800. quantifiers}
  801. @tex
  802. "$\exists$" and "$\forall$".
  803. @end tex
  804. @ifinfo
  805. "@emph{exists}" and "@emph{forall}".
  806. @end ifinfo
  807. @deffn {Binary Operator} ex
  808. @deffnx {Binary Operator} all
  809. @cindex quantifier
  810. @cindex expression input
  811. @cindex input facilities
  812. These are the @dfn{quantifiers}. The first argument is the quantified
  813. variable, the second one is the matrix formula. Optionally, one can
  814. input a list of variables as first argument. This list is expanded into
  815. several nested quantifiers.
  816. @end deffn
  817. @xref{Closures}, for automatically quantifying all variables except for
  818. an exclusion list.
  819. For convenience, we also have boolean constants
  820. @cindex boolean constant
  821. for the truth values.
  822. @cindex truth value
  823. @defvar true
  824. @defvarx false
  825. @cindex truth value
  826. @cindex expression input
  827. @cindex input facilities
  828. These algebraic mode variables are reserved. They serve as @dfn{truth
  829. values}.
  830. @end defvar
  831. @node Closures
  832. @section Closures
  833. @cindex closure
  834. @defun rlall formula [@var{exceptionlist}]
  835. @cindex universal closure
  836. @cindex closure
  837. @cindex quantifier
  838. @cindex expression input
  839. @cindex input facilities
  840. Universal closure. @var{exceptionlist} is a list of variables empty by
  841. default. Returns @var{formula} with all free variables universally
  842. quantified, except for those in @var{exceptionlist}.
  843. @end defun
  844. @defun rlex formula [@var{exceptionlist}]
  845. @cindex existential closure
  846. @cindex closure
  847. @cindex quantifier
  848. @cindex expression input
  849. @cindex input facilities
  850. Existential closure. @var{exceptionlist} is a list of variables empty by
  851. default. Returns @var{formula} with all free variables existentially
  852. quantified, except for those in @var{exceptionlist}.
  853. @end defun
  854. @node OFSF Operators
  855. @section OFSF Operators
  856. @cindex ordered field
  857. The @sc{ofsf}
  858. @cindex @sc{ofsf}
  859. context implements @emph{ordered fields} over the language of
  860. @emph{ordered rings}. Proceeding this way is very common in model theory
  861. since one wishes to avoid functions which are only partially defined,
  862. such as division in the language of ordered fields. Note that the
  863. @sc{ofsf} quantifier elimination procedures
  864. @cindex quantifier elimination
  865. (@pxref{Quantifier Elimination and Variants}) for non-linear formulas
  866. actually operate over
  867. @cindex real closed field
  868. @emph{real closed fields}. See @ref{Contexts} and @ref{Context
  869. Selection} for details on contexts.
  870. @deffn {Binary Infix operator} equal
  871. @deffnx {Binary Infix operator} neq
  872. @deffnx {Binary Infix operator} leq
  873. @deffnx {Binary Infix operator} geq
  874. @deffnx {Binary Infix operator} lessp
  875. @deffnx {Binary Infix operator} greaterp
  876. @cindex equation
  877. @cindex inequality
  878. @cindex ordering
  879. @cindex expression input
  880. @cindex input facilities
  881. The above operators may also be written as @code{=}, @code{<>},
  882. @code{<=}, @code{>=}, @code{<}, and @code{>}, respectively. For @sc{ofsf}
  883. @cindex @sc{ofsf}
  884. there is specified that all right hand sides must be zero. Non-zero
  885. right hand sides in the input are hence subtracted immediately to the
  886. corresponding left hand sides. There is a facility to input
  887. @emph{chains}
  888. @cindex chains of binary relations
  889. of the above relations, which are also expanded immediately:
  890. @smallexample
  891. a<>b<c>d=f
  892. @result{} a-b <> 0 and b-c < 0 and c-d > 0 and d-f = 0
  893. @end smallexample
  894. Here, only adjacent terms are related to each other.
  895. @end deffn
  896. Though we use the language of ordered rings, the input of integer
  897. reciprocals is allowed and treated correctly interpreting them as
  898. constants for rational numbers.
  899. @cindex rational numbers
  900. There are two switches that allow to
  901. input arbitrary reciprocals, which are then resolved into proper
  902. formulas in various reasonable ways. The user is welcome to experiment
  903. with switches like the following, which are not marked as @emph{fix
  904. switches}. @xref{Conventions}, for the classification of @sc{redlog}
  905. switches.
  906. @defvr Switch rlnzden
  907. @defvrx Switch rlposden
  908. @cindex inverse
  909. @cindex reciprocal
  910. @cindex division
  911. @cindex denominator
  912. @cindex parametric denominator
  913. Non-zero/positive denominators. Both switches are off by default. If
  914. both @code{rlnzden} and @code{rlposden} are on, the latter is active.
  915. Activating one of them, allows the input of reciprocal terms. With
  916. @code{rlnzden} on, these terms are assumed to be non-zero, and resolved
  917. by multiplication. When occurring with ordering relations the
  918. reciprocals are resolved by multiplication with their square preserving
  919. the sign.
  920. @smallexample
  921. (a/b)+c=0 and (a/d)+c>0;
  922. 2
  923. @result{} a + b*c = 0 and a*d + c*d > 0
  924. @end smallexample
  925. Turning @code{rlposden} on, guarantees the reciprocals to be strictly
  926. positive which allows simple, i.e.@: non-square, multiplication also
  927. with ordering relations.
  928. @smallexample
  929. (a/b)+c=0 and (a/d)+c>0;
  930. @result{} a + b*c = 0 and a + c*d > 0
  931. @end smallexample
  932. @end defvr
  933. The non-zeroness or positivity assumptions made by using the above
  934. switches can be stored in a variable, and then later be passed as a
  935. @var{theory}
  936. @rtindex theory
  937. (@pxref{Standard Simplifier,theory}) to certain @sc{redlog} procedures.
  938. Optionally, the system can be forced to add them to the formula at the
  939. input stage:
  940. @defvr Switch rladdcond
  941. @cindex inverse
  942. @cindex reciprocal
  943. @cindex division
  944. Add condition. This is off by default. With @code{rladdcond} on,
  945. non-zeroness and positivity assumptions made due to the switches
  946. @code{rlnzden} and @code{rlposden}
  947. @rvindex rlnzden
  948. @rvindex rlposden
  949. are added to the formula at the input
  950. stage. With @code{rladdcond} and @code{rlposden} on we get for instance:
  951. @smallexample
  952. (a/b)+c=0 and (a/d)+c>0;
  953. @result{} (b <> 0 and a + b*c = 0) and (d > 0 and a + c*d > 0)
  954. @end smallexample
  955. @end defvr
  956. @node DVFSF Operators
  957. @section DVFSF Operators
  958. @cindex discretely valued field
  959. Discretely valued fields are implemented as a one-sorted language using
  960. the operators @code{|}, @code{||}, @code{~}, and @code{/~}, which encode
  961. @tex
  962. $\leq$, $<$, $=$, and $\neq$
  963. @end tex
  964. @ifinfo
  965. @code{<=}, @code{<}, @code{=}, and @code{<>}
  966. @end ifinfo
  967. in the value group, respectively. For details see
  968. @ifinfo
  969. @ref{References,[Wei88]}, @ref{References,[Stu00]}, or @ref{References,[DS99]}.
  970. @end ifinfo
  971. @iftex
  972. [Wei88], [Stu00], or [DS99].
  973. @end iftex
  974. @deffn {Binary Infix operator} equal
  975. @deffnx {Binary Infix operator} neq
  976. @deffnx {Binary Infix operator} div
  977. @deffnx {Binary Infix operator} sdiv
  978. @deffnx {Binary Infix operator} assoc
  979. @deffnx {Binary Infix operator} nassoc
  980. @cindex equation
  981. @cindex inequality
  982. @cindex divisibility
  983. @cindex strict divisibility
  984. @cindex weak divisibility
  985. @cindex expression input
  986. @cindex input facilities
  987. The above operators may also be written as @code{=}, @code{<>},
  988. @code{|}, @code{||}, @code{~}, and @code{/~}, respectively. Integer
  989. reciprocals in the input are resolved correctly. @sc{dvfsf}
  990. @cindex @sc{dvfsf}
  991. allows the input of @emph{chains}
  992. @cindex chains of binary relations
  993. in analogy to @sc{ofsf}.
  994. @cindex @sc{ofsf}
  995. @xref{OFSF Operators}, for details.
  996. @end deffn
  997. With the @sc{dvfsf}
  998. @cindex @sc{dvfsf}
  999. operators there is no treatment of parametric denominators available.
  1000. @cindex denominator
  1001. @cindex parametric denominator
  1002. @node ACFSF Operators
  1003. @section ACFSF Operators
  1004. @deffn {Binary Infix operator} equal
  1005. @deffnx {Binary Infix operator} neq
  1006. @cindex equation
  1007. @cindex inequality
  1008. @cindex expression input
  1009. @cindex input facilities
  1010. @cindex @sc{acfsf}
  1011. The above operators may also be written as @code{=}, @code{<>}. As for
  1012. @sc{ofsf},
  1013. @cindex @sc{ofsf}
  1014. it is specified that all right hand sides must be zero. In
  1015. analogy to @sc{ofsf}, @sc{acfsf} allows also the input of @emph{chains}
  1016. @cindex chains of binary relations
  1017. and an appropriate treatment of parametric denominators
  1018. @cindex denominator
  1019. @cindex parametric denominator
  1020. in the input.
  1021. @xref{OFSF Operators}, for details.
  1022. @end deffn
  1023. Note that the switch @code{rlposden}
  1024. @rvindex rlposden
  1025. (@pxref{OFSF Operators}) makes no
  1026. sense for algebraically closed fields.
  1027. @node PASF Operators
  1028. @section PASF Operators
  1029. @deffn {Binary Infix operator} equal
  1030. @deffnx {Binary Infix operator} neq
  1031. @deffnx {Binary Infix operator} leq
  1032. @deffnx {Binary Infix operator} geq
  1033. @deffnx {Binary Infix operator} lessp
  1034. @deffnx {Binary Infix operator} greaterp
  1035. @cindex equation
  1036. @cindex inequality
  1037. @cindex ordering
  1038. @cindex congruence
  1039. @cindex expression input
  1040. @cindex input facilities
  1041. The above operators may also be written as @code{=}, @code{<>},
  1042. @code{<=}, @code{>=}, @code{<}, and @code{>}, respectively.
  1043. @deffnx {Ternary Prefix operator} cong
  1044. @deffnx {Ternary Prefix operator} ncong
  1045. The operators cong and ncong represent congruences with nonparametric
  1046. modulus.
  1047. As for
  1048. @sc{ofsf},
  1049. @cindex @sc{ofsf}
  1050. it is specified that all right hand sides must be zero. In
  1051. analogy to @sc{ofsf}, @sc{pasf} allows also the input of @emph{chains}
  1052. @cindex chains of binary relations in the input.
  1053. @xref{OFSF Operators}, for details.
  1054. @end deffn
  1055. @node IBALP Operators
  1056. @section IBALP Operators
  1057. @deffn {Unary operator} bnot
  1058. @deffnx {n-ary Infix operator} band
  1059. @deffnx {n-ary Infix operator} bor
  1060. @deffnx {Binary Infix operator} bimpl
  1061. @deffnx {Binary Infix operator} brepl
  1062. @deffnx {Binary Infix operator} bequiv
  1063. @cindex Boolean not
  1064. @cindex Boolean and
  1065. @cindex Boolean or
  1066. @cindex Boolean implication
  1067. @cindex Boolean replication
  1068. @cindex Boolean equivalence
  1069. The operator @code{bnot} may also be written as @code{~}. The operators
  1070. @code{band} and @code{bor} may also be written as @code{&} and @code{|},
  1071. resp. The operators @code{bimpl}, @code{brepl}, and @code{bequiv} may be
  1072. written as @code{->}, @code{<-}, and @code{<->}, resp.
  1073. @end deffn
  1074. @deffn {Binary Infix operator} equal
  1075. @cindex equation
  1076. The operator @code{equal} may also be written as @code{=}.
  1077. @end deffn
  1078. @node DCFSF Operators
  1079. @section DCFSF Operators
  1080. @deffn {Binary Infix operator} d
  1081. @cindex derivation
  1082. The operator @code{d} denotes (higher) derivatives in the sense of
  1083. differential algebra. For instance, the differential equation
  1084. @ifinfo
  1085. @example
  1086. x'^2 + x = 0
  1087. @end example
  1088. @end ifinfo
  1089. @tex
  1090. $$x'^2+x=0$$
  1091. @end tex
  1092. is input as @code{x d 1 ** 2 + x = 0}. @code{d} binds stronger than all
  1093. other operators.
  1094. @end deffn
  1095. @deffn {Binary Infix operator} equal
  1096. @deffnx {Binary Infix operator} neq
  1097. @cindex equation
  1098. @cindex inequality
  1099. The operator @code{equal} may also be written as @code{=}. The operator
  1100. @code{neq} may also be written as @code{<>}.
  1101. @end deffn
  1102. @node Extended Built-in Commands
  1103. @section Extended Built-in Commands
  1104. Systematic conjunctions and disjunctions can be constructed in the
  1105. algebraic mode in analogy to, e.g., @code{for ... sum ...}:
  1106. @deffn {for loop action} mkand
  1107. @deffnx {for loop action} mkor
  1108. @findex for
  1109. @cindex conjunction
  1110. @cindex disjunction
  1111. @cindex for loop action
  1112. @cindex expression input
  1113. @cindex input facilities
  1114. Make and/or. Actions for the construction of large systematic
  1115. conjunctions/disjunctions via for loops.
  1116. @smallexample
  1117. for i:=1:3 mkand
  1118. for j:=1:3 mkor
  1119. if j<>i then mkid(x,i)+mkid(x,j)=0;
  1120. @result{} true and (false or false or x1 + x2 = 0
  1121. or x1 + x3 = 0)
  1122. and (false or x1 + x2 = 0 or false
  1123. or x2 + x3 = 0)
  1124. and (false or x1 + x3 = 0 or x2 + x3 = 0
  1125. or false)
  1126. @end smallexample
  1127. @end deffn
  1128. Here the truth values
  1129. @cindex truth value
  1130. come into existence due to the internal
  1131. implementation of @code{for}-loops. They are always neutral in their
  1132. context, and can be easily removed via simplification (@pxref{Standard
  1133. Simplifier,function rlsimpl}, @pxref{Global Switches,switch rlsimpl}).
  1134. The @sc{reduce} substitution command @code{sub}
  1135. @rfindex sub
  1136. can be applied to formulas using the usual syntax.
  1137. @deftp {Data Structure} {substitution_list}
  1138. @var{substitution_list} is a list of equations each with a kernel left
  1139. hand side.
  1140. @end deftp
  1141. @defun sub substitution_list formula
  1142. @cindex substitution
  1143. @rtindex substitution_list
  1144. Substitute. Returns the formula obtained from @var{formula}
  1145. by applying the substitutions given by @var{substitution_list}.
  1146. @smallexample
  1147. sub(a=x,ex(x,x-a<0 and all(x,x-b>0 or ex(a,a-b<0))));
  1148. @result{} ex x0 ( - x + x0 < 0 and all x0 (
  1149. - b + x0 > 0 or ex a (a - b < 0)))
  1150. @end smallexample
  1151. @code{sub} works in such a way that equivalent formulas remain
  1152. equivalent after substitution. In particular, quantifiers are treated
  1153. correctly.
  1154. @end defun
  1155. @defun part formula n1 [n2 [n3...]]
  1156. Extract a part. The @code{part} of @var{formula} is implemented
  1157. analogously to that for built-in types: in particular the 0th part is
  1158. the operator.
  1159. @end defun
  1160. @iftex
  1161. Compare @code{rlmatrix} (@pxref{Basic Functions on Formulas})
  1162. @end iftex
  1163. @ifinfo
  1164. @xref{Basic Functions on Formulas,rlmatrix},
  1165. @end ifinfo
  1166. @rfindex rlmatrix
  1167. for extracting the @emph{matrix part} of a formula, i.e., removing
  1168. @emph{all} initial quantifiers.
  1169. @defun length formula
  1170. @cindex length
  1171. Length of @var{formula}. This is the number of arguments to the
  1172. top-level operator. The length is of particular interest with the n-ary
  1173. operators @code{and}
  1174. @rfindex and
  1175. and @code{or}.
  1176. @rfindex or
  1177. Notice that @code{part(@var{formula},length(@var{formula}))}
  1178. @rfindex part
  1179. is the part of largest index.
  1180. @end defun
  1181. @node Global Switches
  1182. @section Global Switches
  1183. There are three global switches that do not belong to certain
  1184. procedures, but control the general behavior of @sc{redlog}.
  1185. @defvr Switch rlsimpl
  1186. @cindex automatic simplification
  1187. @cindex simplification
  1188. Simplify. By default this switch is off. With this switch on, the
  1189. function @code{rlsimpl}
  1190. @rfindex rlsimpl
  1191. is applied at the expression evaluation stage. @xref{Standard
  1192. Simplifier, rlsimpl}.
  1193. @end defvr
  1194. Automatically performing formula simplification at the evaluation stage
  1195. is very similar to the treatment of polynomials or rational functions,
  1196. which are converted to some normal form.
  1197. @cindex normal form
  1198. For formulas, however, the
  1199. simplified equivalent is by no means canonical.
  1200. @defvr {Switch} rlrealtime
  1201. @cindex real time
  1202. @cindex time
  1203. @cindex wall clock time
  1204. Real time. By default this switch is off. If on it protocols the wall
  1205. clock time needed for @sc{redlog} commands in seconds. In contrast to
  1206. the built-in @code{time}
  1207. @rvindex time
  1208. switch, the time is printed @emph{above} the
  1209. result.
  1210. @end defvr
  1211. @defvr {Advanced Switch} rlverbose
  1212. @cindex verbosity output
  1213. @cindex protocol
  1214. Verbose. By default this switch is off. It toggles verbosity output with
  1215. some @sc{redlog} procedures. The verbosity output itself is not
  1216. documented.
  1217. @end defvr
  1218. @node Basic Functions on Formulas
  1219. @section Basic Functions on Formulas
  1220. @defun rlatnum formula
  1221. @cindex count atomic formulas
  1222. @cindex number of atomic formulas
  1223. @cindex atomic formulas
  1224. Number of atomic formulas. Returns the number of atomic formulas
  1225. contained in @var{formula}. Mind that truth values
  1226. @cindex truth value
  1227. are not considered
  1228. atomic formulas.
  1229. @end defun
  1230. @deftp {Data Structure} {multiplicity_list}
  1231. A list of 2-element-lists containing an object and the number of its
  1232. occurrences. Names of functions returning @var{multiplicity_lists}
  1233. typically end on "ml".
  1234. @end deftp
  1235. @defun rlatl formula
  1236. @cindex atomic formula list
  1237. @cindex list of atomic formulas
  1238. @cindex set of atomic formulas
  1239. @cindex atomic formulas
  1240. List of atomic formulas. Returns the set of atomic formulas contained in
  1241. @var{formula} as a list.
  1242. @end defun
  1243. @defun rlatml formula
  1244. @cindex atomic formula multiplicity list
  1245. @cindex multiplicity list of atomic formulas
  1246. @cindex atomic formulas
  1247. @rtindex multiplicity_list
  1248. Multiplicity list of atomic formulas. Returns the atomic formulas
  1249. contained in @var{formula} in a @var{multiplicity_list}.
  1250. @end defun
  1251. @defun rlifacl formula
  1252. @cindex factors (irreducible)
  1253. @cindex irreducible factors
  1254. @cindex irreducible factors list
  1255. @cindex list of irreducible factors
  1256. @cindex set of irreducible factors
  1257. @cindex factorization
  1258. List of irreducible factors. Returns the set of all irreducible factors
  1259. of the nonzero terms occurring in @var{formula}.
  1260. @smallexample
  1261. rlifacl(x**2-1=0);
  1262. @result{} @{x + 1,x - 1@}
  1263. @end smallexample
  1264. @end defun
  1265. @defun rlifacml formula
  1266. @cindex factors (irreducible)
  1267. @cindex irreducible factors
  1268. @cindex irreducible factors multiplicity list
  1269. @cindex multiplicity list of irreducible factors
  1270. @cindex factorization
  1271. @rtindex multiplicity_list
  1272. Multiplicity list of irreducible factors. Returns the set of all
  1273. irreducible factors of the nonzero terms occurring in @var{formula} in a
  1274. @var{multiplicity_list}.
  1275. @end defun
  1276. @defun rlterml formula
  1277. @cindex term list
  1278. @cindex list of terms
  1279. List of terms. Returns the set of all nonzero terms occurring in
  1280. @var{formula}.
  1281. @end defun
  1282. @defun rltermml formula
  1283. @cindex term multiplicity list
  1284. @cindex multiplicity list of terms
  1285. @rtindex multiplicity_list
  1286. Multiplicity list of terms. Returns the set of all nonzero terms
  1287. occurring in @var{formula} in a @var{multiplicity_list}.
  1288. @end defun
  1289. @defun rlvarl formula
  1290. @cindex list(s) of variables
  1291. @cindex variable list(s)
  1292. @cindex set of variables
  1293. Variable lists. Returns both the list of variables occurring freely
  1294. @cindex free variables
  1295. and that of the variables occurring boundly
  1296. @cindex bound variables
  1297. in @var{formula} in a two-element list. Notice that the two member lists
  1298. are not necessarily disjoint.
  1299. @end defun
  1300. @defun rlfvarl formula
  1301. @cindex list(s) of variables
  1302. @cindex variable list(s)
  1303. @cindex free variables
  1304. Free variable list. Returns the variables occurring freely in
  1305. @var{formula} as a list.
  1306. @end defun
  1307. @defun rlbvarl formula
  1308. @cindex list(s) of variables
  1309. @cindex variable list(s)
  1310. @cindex bound variables
  1311. Bound variable list. Returns the variables occurring boundly in
  1312. @var{formula} as a list.
  1313. @end defun
  1314. @defun rlstruct formula [@var{kernel}]
  1315. @cindex formula structure
  1316. @cindex structure of formula
  1317. Structure of a formula. @var{kernel} is @code{v} by default. Returns a
  1318. list @code{@{f,sl@}}. @code{f} is constructed from @var{formula} by
  1319. replacing each occurrence of a term with a kernel constructed by
  1320. concatenating a number to @var{kernel}. The @var{substitution_list}
  1321. @rtindex substitution_list
  1322. @code{sl} contains all substitutions
  1323. @cindex substitution
  1324. to obtain @var{formula} from @code{f}.
  1325. @smallexample
  1326. rlstruct(x*y=0 and (x=0 or y>0),v);
  1327. @result{} @{v1 = 0 and (v2 = 0 or v3 > 0),
  1328. @{v1 = x*y,v2 = x,v3 = y@}@}
  1329. @end smallexample
  1330. @end defun
  1331. @defun rlifstruct formula [@var{kernel}]
  1332. @cindex factors (irreducible)
  1333. @cindex irreducible factors
  1334. @cindex formula structure
  1335. @cindex factorization
  1336. Irreducible factor structure of a formula. @var{kernel} is @code{v} by
  1337. default. Returns a list @code{@{f,sl@}}. @code{f} is constructed from
  1338. @var{formula} by replacing each occurrence of an irreducible factor with
  1339. a kernel constructed by adding a number to @var{kernel}. The returned
  1340. @var{substitution_list}
  1341. @rtindex substitution_list
  1342. @code{sl} contains all substitutions
  1343. @cindex substitution
  1344. to obtain @var{formula} from @code{f}.
  1345. @smallexample
  1346. rlstruct(x*y=0 and (x=0 or y>0),v);
  1347. @result{} @{v1*v2 = 0 and (v1 = 0 or v2 > 0),
  1348. @{v1 = x,v2 = y@}@}
  1349. @end smallexample
  1350. @end defun
  1351. @defun rlmatrix formula
  1352. @cindex matrix of a formula
  1353. @cindex remove quantifiers
  1354. Matrix computation. Drops all @emph{leading} quantifiers
  1355. @cindex quantifier
  1356. from @var{formula}.
  1357. @end defun
  1358. @node Simplification
  1359. @chapter Simplification
  1360. @cindex simplification
  1361. The goal of simplifying a first-order formula is to obtain an equivalent
  1362. formula over the same language that is somehow simpler. @sc{redlog}
  1363. knows three kinds of simplifiers that focus mainly on reducing the size
  1364. of the given formula: The standard simplifier, tableau simplifiers, and
  1365. Groebner simplifiers. The @sc{ofsf}
  1366. @cindex @sc{ofsf}
  1367. versions of these are described in
  1368. @iftex
  1369. [DS97].
  1370. @end iftex
  1371. @ifinfo
  1372. @ref{References,[DS97]}.
  1373. @end ifinfo
  1374. The @sc{acfsf}
  1375. @cindex @sc{acfsf}
  1376. versions are the same as the @sc{ofsf}
  1377. @cindex @sc{ofsf}
  1378. versions except for techniques that are particular to ordered fields
  1379. such as treatment of square sums in connection with ordering relations.
  1380. For @sc{dvfsf}
  1381. @cindex @sc{dvfsf}
  1382. there is no Groebner simplifier available. The parts of the standard
  1383. simplifier that are particular to valued fields are described in
  1384. @iftex
  1385. [DS99].
  1386. @end iftex
  1387. @ifinfo
  1388. @ref{References,[DS99]}.
  1389. @end ifinfo
  1390. The tableau simplification is straightforwardly derived from the
  1391. @emph{smart simplifications} described there.
  1392. @menu
  1393. * Standard Simplifier:: Fast and idempotent
  1394. * Tableau Simplifier:: Coping with often occurring terms
  1395. * Groebner Simplifier:: Detecting algebraic dependencies
  1396. @end menu
  1397. Besides reducing the size of formulas, it is a reasonable simplification
  1398. goal, to reduce the degree of the quantified variables. Our method of
  1399. decreasing the degree of quantified variables is described for @sc{ofsf}
  1400. @cindex @sc{ofsf}
  1401. in
  1402. @ifinfo
  1403. @ref{References,[DSW98]}.
  1404. @end ifinfo
  1405. @iftex
  1406. [DSW98].
  1407. @end iftex
  1408. A suitable variant is available also in @sc{acfsf}
  1409. @cindex @sc{acfsf}
  1410. but not in @sc{dvfsf}.
  1411. @cindex @sc{dvfsf}
  1412. @menu
  1413. * Degree Decreaser::
  1414. @end menu
  1415. @node Standard Simplifier
  1416. @section Standard Simplifier
  1417. The @dfn{Standard Simplifier} is a fast simplification algorithm that is
  1418. frequently called internally by other @sc{redlog} algorithms. It can be
  1419. applied automatically at the expression evaluation stage by turning on
  1420. the switch @code{rlsimpl}
  1421. @rvindex rlsimpl
  1422. (@pxref{Global Switches,switch rlsimpl}).
  1423. @deftp {Data Structure} theory
  1424. A list of atomic formulas assumed to hold.
  1425. @end deftp
  1426. @defun rlsimpl formula [@var{theory}]
  1427. @cindex simplification
  1428. @cindex standard simplifier
  1429. @rtindex theory
  1430. Simplify. @var{formula} is simplified recursively such that the result
  1431. is equivalent under the assumption that @var{theory} holds. Default for
  1432. @var{theory} is the empty theory @code{@{@}}. Theory inconsistency may
  1433. but need not be detected by @code{rlsimpl}. If @var{theory} is detected
  1434. to be inconsistent, a corresponding error is raised. Note that under an
  1435. inconsistent theory, @emph{any} formula is equivalent to the input,
  1436. i.e., the result is meaningless. @var{theory} should thus be chosen
  1437. carefully.
  1438. @end defun
  1439. @menu
  1440. * General Features of the Standard Simplifier::
  1441. * General Standard Simplifier Switches::
  1442. * OFSF-specific Simplifications::
  1443. * OFSF-specific Standard Simplifier Switches::
  1444. * ACFSF-specific Simplifications::
  1445. * ACFSF-specific Standard Simplifier Switches::
  1446. * DVFSF-specific Simplifications::
  1447. * DVFSF-specific Standard Simplifier Switches::
  1448. * PASF-specific Simplifications::
  1449. * PASF-specific Standard Simplifier Switches::
  1450. @end menu
  1451. @node General Features of the Standard Simplifier
  1452. @subsection General Features of the Standard Simplifier
  1453. The standard simplifier @code{rlsimpl} includes the following features
  1454. common to all contexts:
  1455. @itemize @bullet
  1456. @item
  1457. Replacement of atomic subformulas by simpler equivalents. These
  1458. equivalents are not necessarily atomic (switches @code{rlsiexpl},
  1459. @code{rlsiexpla},
  1460. @rvindex rlsiexpla
  1461. @rvindex rlsiexpl
  1462. @pxref{General Standard Simplifier Switches}). For
  1463. details on the simplification on the atomic formula level, see
  1464. @ref{OFSF-specific Simplifications}, @ref{ACFSF-specific
  1465. Simplifications}, and @ref{DVFSF-specific Simplifications}.
  1466. @item
  1467. Proper treatment of truth values.
  1468. @cindex truth value
  1469. @item
  1470. Flattening
  1471. @cindex flatten nested operators
  1472. @cindex involutive @code{not}
  1473. nested n-ary operator levels and resolving involutive
  1474. applications of @code{not}.
  1475. @rfindex not
  1476. @item
  1477. Dropping @code{not}
  1478. @rfindex not
  1479. operator with atomic formula arguments by changing
  1480. the relation of the atomic formula appropriately. The languages of all
  1481. contexts allow to do so.
  1482. @item
  1483. Changing @code{repl}
  1484. @rfindex repl
  1485. to @code{impl}.
  1486. @rfindex impl
  1487. @item
  1488. Producing a canonical ordering
  1489. @cindex canonical ordering
  1490. among the atomic formulas on a given
  1491. level (switch @code{rlsisort},
  1492. @rvindex rlsisort
  1493. @pxref{General Standard Simplifier
  1494. Switches}).
  1495. @item
  1496. Recognizing equal subformulas
  1497. @cindex equal subformulas
  1498. on a given level (switch @code{rlsichk},
  1499. @rvindex rlsichk
  1500. @pxref{General Standard Simplifier Switches}).
  1501. @item
  1502. Passing down information that is collected during recursion (switches
  1503. @code{rlsism},
  1504. @rvindex rlsism
  1505. @code{rlsiidem},
  1506. @rvindex rlsiidem
  1507. @pxref{General Standard Simplifier
  1508. Switches}). The technique of @dfn{implicit theories}
  1509. @cindex implicit theory
  1510. @cindex theory (implicit)
  1511. used for this is described in detail in
  1512. @iftex
  1513. [DS97]
  1514. @end iftex
  1515. @ifinfo
  1516. @ref{References,[DS97]},
  1517. @end ifinfo
  1518. for @sc{ofsf}/@sc{acfsf},
  1519. @cindex @sc{ofsf}
  1520. @cindex @sc{acfsf}
  1521. and in
  1522. @iftex
  1523. [DS99]
  1524. @end iftex
  1525. @ifinfo
  1526. @ref{References,[DS99]},
  1527. @end ifinfo
  1528. for @sc{dvfsf}.
  1529. @cindex @sc{dvfsf}
  1530. @item
  1531. Considering interaction of atomic formulas on the same level and
  1532. interaction with information inherited from higher levels (switch
  1533. @code{rlsism},
  1534. @rvindex rlsism
  1535. @pxref{General Standard Simplifier Switches}). The
  1536. @dfn{smart simplification}
  1537. @cindex smart simplification
  1538. techniques used for this are beyond the scope of this manual. They are
  1539. described in detail in
  1540. @iftex
  1541. [DS97]
  1542. @end iftex
  1543. @ifinfo
  1544. @ref{References,[DS97]},
  1545. @end ifinfo
  1546. for @sc{ofsf}/@sc{acfsf},
  1547. @cindex @sc{ofsf}
  1548. @cindex @sc{acfsf}
  1549. and in
  1550. @iftex
  1551. [DS99]
  1552. @end iftex
  1553. @ifinfo
  1554. @ref{References,[DS99]},
  1555. @end ifinfo
  1556. for @sc{dvfsf}.
  1557. @cindex @sc{dvfsf}
  1558. @end itemize
  1559. @node General Standard Simplifier Switches
  1560. @subsection General Standard Simplifier Switches
  1561. @defvr Switch rlsiexpla
  1562. @cindex explode terms
  1563. @cindex simplification
  1564. @cindex split atomic formula
  1565. @cindex additively split atomic formula
  1566. @cindex multiplicatively split atomic formula
  1567. Simplify explode always. By default this switch is on. It is relevant
  1568. with simplifications that allow to split one atomic formula into several
  1569. simpler ones. Consider, e.g., the following simplification toggled by
  1570. the switch @code{rlsipd}
  1571. @rvindex rlsipd
  1572. (@pxref{OFSF-specific Standard Simplifier Switches}). With
  1573. @code{rlsiexpla}
  1574. @rvindex rlsiexpla
  1575. on, we obtain:
  1576. @smallexample
  1577. f := (a - 1)**3 * (a + 1)**4 >=0;
  1578. 7 6 5 4 3 2
  1579. @result{} a + a - 3*a - 3*a + 3*a + 3*a - a - 1 >= 0
  1580. rlsimpl f;
  1581. @rfindex rlsimpl
  1582. @result{} a - 1 >= 0 or a + 1 = 0
  1583. @end smallexample
  1584. With @code{rlsiexpla} off, @code{f} will simplify as in the description
  1585. of the switch @code{rlsipd}. @code{rlsiexpla} is not used in the
  1586. @sc{dvfsf}
  1587. @cindex @sc{dvfsf}
  1588. context. The @sc{dvfsf} simplifier behaves like @code{rlsiexpla} on.
  1589. @end defvr
  1590. @defvr Switch rlsiexpl
  1591. @cindex simplification
  1592. @cindex explode terms
  1593. @cindex split atomic formula
  1594. @cindex additively split atomic formula
  1595. @cindex multiplicatively split atomic formula
  1596. Simplify explode. By default this switch is on. Its role is very similar
  1597. to that of @code{rlsiexpla},
  1598. @rvindex rlsiexpla
  1599. but it considers the operator the scope of
  1600. which the atomic formula occurs in: With @code{rlsiexpl} on
  1601. @smallexample
  1602. 7 6 5 4 3 2
  1603. a + a - 3*a - 3*a + 3*a + 3*a - a - 1 >= 0
  1604. @end smallexample
  1605. simplifies as in the description of the switch @code{rlsiexpla} whenever
  1606. it occurs in a disjunction, and it simplifies as in the description of
  1607. the switch @code{rlsipd}
  1608. @rvindex rlsipd
  1609. (@pxref{OFSF-specific Standard Simplifier Switches}) else.
  1610. @code{rlsiexpl} is not used in the @sc{dvfsf}
  1611. @cindex @sc{dvfsf}
  1612. context. The @sc{dvfsf} simplifier behaves like @code{rlsiexpla} on.
  1613. @end defvr
  1614. The user is not supposed to alter the settings of the following
  1615. @emph{fix switches} (@pxref{Conventions}):
  1616. @defvr {Fix Switch} rlsism
  1617. @cindex simplification
  1618. @cindex smart simplification
  1619. Simplify smart. By default this switch is on. See the description of the
  1620. function @code{rlsimpl}
  1621. @rfindex rlsimpl
  1622. (@pxref{Standard Simplifier}) for its effects.
  1623. @smallexample
  1624. rlsimpl(x>0 and x+1<0);
  1625. @result{} false
  1626. @end smallexample
  1627. @end defvr
  1628. @defvr {Fix Switch} rlsichk
  1629. @cindex simplification
  1630. @cindex multiple occurrences
  1631. @cindex equal subformulas
  1632. Simplify check. By default this switch is on enabling checking for equal
  1633. sibling subformulas:
  1634. @smallexample
  1635. rlsimpl((x>0 and x-1<0) or (x>0 and x-1<0));
  1636. @result{} (x>0 and x-1<0)
  1637. @rfindex rlsimpl
  1638. @end smallexample
  1639. @end defvr
  1640. @defvr {Fix Switch} rlsiidem
  1641. @cindex simplification
  1642. @cindex idempotent simplification
  1643. Simplify idempotent. By default this switch is on. It is relevant only
  1644. with switch @code{rlsism}
  1645. @rvindex rlsism
  1646. on. Its effect is that @code{rlsimpl}
  1647. @rfindex rlsimpl
  1648. (@pxref{Standard Simplifier}) is idempotent in the very most cases,
  1649. i.e., an application of @code{rlsimpl} to an already simplified formula
  1650. yields the formula itself.
  1651. @end defvr
  1652. @defvr {Fix Switch} rlsiso
  1653. @cindex simplification
  1654. @cindex sort atomic formulas
  1655. Simplify sort. By default this switch is on. It toggles the sorting of
  1656. the atomic formulas on the single levels.
  1657. @smallexample
  1658. rlsimpl((a=0 and b=0) or (b=0 and a=0));
  1659. @rfindex rlsimpl
  1660. @result{} a = 0 and b = 0
  1661. @end smallexample
  1662. @end defvr
  1663. @node OFSF-specific Simplifications
  1664. @subsection OFSF-specific Simplifications
  1665. @cindex simplification of atomic formulas
  1666. @cindex atomic formula simplification
  1667. In the @sc{ofsf}
  1668. @cindex @sc{ofsf}
  1669. context, the atomic formula simplification includes the
  1670. following:
  1671. @itemize @bullet
  1672. @item
  1673. Evaluation of variable-free atomic formulas to truth values.
  1674. @cindex evaluate atomic formulas
  1675. @cindex variable-free atomic formula
  1676. @cindex truth value
  1677. @item
  1678. Make the left hand sides primitive over the integers
  1679. @cindex primitive over the integers
  1680. with positive head coefficient.
  1681. @cindex positive head coefficient
  1682. @item
  1683. Evaluation of trivial square sums
  1684. @cindex trivial square sum
  1685. to truth values (switch
  1686. @code{rlsisqf},
  1687. @rvindex rlsisqf
  1688. @pxref{OFSF-specific Standard Simplifier Switches}).
  1689. Additive splitting of trivial square sums (switch @code{rlsitsqspl},
  1690. @rvindex rlsitsqspl
  1691. @pxref{OFSF-specific Standard Simplifier Switches}).
  1692. @item
  1693. In ordering inequalities,
  1694. @cindex ordering inequality
  1695. @cindex ordering constraint
  1696. perform parity decomposition
  1697. @cindex parity decomposition
  1698. (similar to squarefree decomposition) of terms (switch @code{rlsipd},
  1699. @rvindex rlsipd
  1700. @pxref{OFSF-specific Standard Simplifier Switches}) with the option to
  1701. split an atomic formula
  1702. @cindex split atomic formula
  1703. @cindex multiplicatively split atomic formula
  1704. multiplicatively into two simpler ones (switches
  1705. @code{rlsiexpl} and @code{rlsiexpla},
  1706. @rvindex rlsiexpl
  1707. @rvindex rlsiexpla
  1708. @pxref{General Standard Simplifier Switches}).
  1709. @item
  1710. In equations and non-ordering inequalities,
  1711. @cindex non-ordering inequalities
  1712. replace left hand sides by their squarefree parts
  1713. @cindex squarefree part
  1714. (switch @code{rlsiatdv},
  1715. @rvindex rlsiatdv
  1716. @pxref{OFSF-specific
  1717. Standard Simplifier Switches}). Optionally, perform factorization
  1718. @cindex factorization
  1719. of equations and inequalities (switch @code{rlsifac},
  1720. @rvindex rlsifac
  1721. @pxref{OFSF-specific
  1722. Standard Simplifier Switches}, switches @code{rlsiexpl} and
  1723. @code{rlsiexpla}, @pxref{General Standard Simplifier Switches}).
  1724. @end itemize
  1725. For further details on the simplification in ordered fields see the
  1726. article
  1727. @iftex
  1728. [DS97].
  1729. @end iftex
  1730. @ifinfo
  1731. @ref{References,[DS97]}.
  1732. @end ifinfo
  1733. @node OFSF-specific Standard Simplifier Switches
  1734. @subsection OFSF-specific Standard Simplifier Switches
  1735. @defvr Switch rlsipw
  1736. @cindex simplification
  1737. @cindex prefer weak orderings
  1738. @cindex weak orderings
  1739. Simplification prefer weak orderings. Prefers weak orderings in contrast
  1740. to strict orderings
  1741. @cindex strict orderings
  1742. with implicit theory
  1743. @cindex implicit theory
  1744. simplification. @code{rlsipw} is off by default, which leads to the
  1745. following behavior:
  1746. @smallexample
  1747. rlsimpl(a<>0 and (a>=0 or b=0));
  1748. @result{} a <> 0 and (a > 0 or b = 0)
  1749. @end smallexample
  1750. This meets the simplification goal of small satisfaction sets for the
  1751. atomic formulas. Turning on @code{rlsipw} will instead yield the
  1752. following:
  1753. @smallexample
  1754. rlsimpl(a<>0 and (a>0 or b=0));
  1755. @result{} a <> 0 and (a >= 0 or b = 0)
  1756. @end smallexample
  1757. @end defvr
  1758. Here we meet the simplification goal of convenient relations
  1759. @cindex convenient relations
  1760. when strict orderings are considered inconvenient.
  1761. @defvr Switch rlsipo
  1762. @cindex simplification
  1763. @cindex prefer orderings
  1764. Simplification prefer orderings. Prefers orderings in contrast to
  1765. inequalities with implicit theory
  1766. @cindex implicit theory
  1767. simplification. @code{rlsipo} is on by default, which leads to the
  1768. following behavior:
  1769. @smallexample
  1770. rlsimpl(a>=0 and (a<>0 or b=0));
  1771. @rfindex rlsimpl
  1772. @result{} a >= 0 and (a > 0 or b = 0)
  1773. @end smallexample
  1774. This meets the simplification goal of small satisfaction sets
  1775. @cindex small satisfaction sets
  1776. for the atomic formulas. Turning it on leads, e.g., to the following
  1777. behavior:
  1778. @smallexample
  1779. rlsimpl(a>=0 and (a>0 or b=0));
  1780. @rfindex rlsimpl
  1781. @result{} a >= 0 and (a <> 0 or b = 0)
  1782. @end smallexample
  1783. Here, we meet the simplification goal of convenient relations
  1784. @cindex convenient relations
  1785. when orderings are considered inconvenient.
  1786. @end defvr
  1787. @defvr Switch rlsiatadv
  1788. @cindex simplification of atomic formulas
  1789. @cindex atomic formula simplification
  1790. @cindex advanced atomic formula simplification
  1791. Simplify atomic formulas advanced. By default this switch is on. Enables
  1792. sophisticated atomic formula simplifications based on squarefree part
  1793. @cindex squarefree part
  1794. computations and recognition of trivial square sums.
  1795. @cindex trivial square sum
  1796. @smallexample
  1797. rlsimpl(a**2 + 2*a*b + b**2 <> 0);
  1798. @rfindex rlsimpl
  1799. @result{} a+b <> 0
  1800. rlsimpl(a**2 + b**2 + 1 > 0);
  1801. @result{} true
  1802. @end smallexample
  1803. Furthermore, splitting of trivial square sums
  1804. @cindex split trivial square sum
  1805. (switch @code{rlsitsqspl}),
  1806. @rvindex rlsitsqspl
  1807. parity decompositions
  1808. @cindex parity decomposition
  1809. (switch @code{rlsipd}),
  1810. @rvindex rlsipd
  1811. and factorization
  1812. @cindex factorization
  1813. of equations and inequalities (switch @code{rlsifac})
  1814. @rvindex rlsifac
  1815. are enabled.
  1816. @end defvr
  1817. @defvr Switch rlsitsqspl
  1818. @cindex trivial square sum
  1819. @cindex split trivial square sum
  1820. @cindex split atomic formula
  1821. @cindex additively split atomic formula
  1822. Simplify split trivial square sum. This is on by default. It is ignored
  1823. with @code{rlsiadv}
  1824. @rvindex rlsiadv
  1825. off. Trivial square sums are split additively
  1826. depending on @code{rlsiexpl} and @code{rlsiexpla}
  1827. @rvindex rlsiexpl
  1828. @rvindex rlsiexpla
  1829. (@pxref{General Standard Simplifier Switches}):
  1830. @smallexample
  1831. rlsimpl(a**2+b**2>0);
  1832. @rfindex rlsimpl
  1833. @result{} a <> 0 or b <> 0
  1834. @end smallexample
  1835. @end defvr
  1836. @defvr Switch rlsipd
  1837. @cindex simplification
  1838. @cindex parity decomposition
  1839. Simplify parity decomposition. By default this switch is on. It is
  1840. ignored with @code{rlsiatadv}
  1841. @rvindex rlsiatadv
  1842. off. @code{rlsipd} toggles the parity decomposition of terms occurring
  1843. with ordering relations.
  1844. @cindex ordering relations
  1845. @smallexample
  1846. f := (a - 1)**3 * (a + 1)**4 >= 0;
  1847. 7 6 5 4 3 2
  1848. @result{} a + a - 3*a - 3*a + 3*a + 3*a - a - 1 >= 0
  1849. rlsimpl f;
  1850. @rfindex rlsimpl
  1851. @group
  1852. 3 2
  1853. @result{} a + a - a - 1 >= 0
  1854. @end group
  1855. @end smallexample
  1856. The atomic formula is possibly split into two parts according to the
  1857. setting of the switches @code{rlsiexpl} and @code{rlsiexpla}
  1858. @rvindex rlsiexpl
  1859. @rvindex rlsiexpla
  1860. (@pxref{General Standard Simplifier Switches}).
  1861. @end defvr
  1862. @defvr Switch rlsifac
  1863. @cindex simplification
  1864. @cindex factorization
  1865. Simplify factorization. By default this switch is on. It is ignored with
  1866. @code{rlsiatadv}
  1867. @rvindex rlsiatadv
  1868. off. Splits
  1869. @cindex split atomic formula
  1870. @cindex multiplicatively split atomic formula
  1871. equations and inequalities via factorization of their left hand side
  1872. terms into a disjunction or a conjunction, respectively. This is done in
  1873. dependence on @code{rlsiexpl} and @code{rlsiexpla}
  1874. @rvindex rlsiexpl
  1875. @rvindex rlsiexpla
  1876. (@pxref{General Standard Simplifier Switches}).
  1877. @end defvr
  1878. @node ACFSF-specific Simplifications
  1879. @subsection ACFSF-specific Simplifications
  1880. @cindex simplification of atomic formulas
  1881. @cindex atomic formula simplification
  1882. In the @sc{acfsf}
  1883. @cindex @sc{acfsf}
  1884. case the atomic formula simplification includes the following:
  1885. @itemize @bullet
  1886. @item
  1887. Evaluation of variable-free atomic formulas to truth values.
  1888. @cindex evaluate atomic formulas
  1889. @cindex variable-free atomic formula
  1890. @cindex truth value
  1891. @item
  1892. Make the left hand sides primitive over the integers
  1893. @cindex primitive over the integers
  1894. with positive head coefficient.
  1895. @cindex positive head coefficient
  1896. @item
  1897. Replace left hand sides of atomic formulas by their squarefree parts
  1898. @cindex squarefree part
  1899. (switch @code{rlsiatdv},
  1900. @rvindex rlsiatdv
  1901. @pxref{OFSF-specific Standard Simplifier Switches}). Optionally, perform
  1902. factorization
  1903. @cindex factorization
  1904. of equations and inequalities (switch @code{rlsifac},
  1905. @rvindex rlsifac
  1906. @pxref{OFSF-specific
  1907. Standard Simplifier Switches}, switches @code{rlsiexpl}
  1908. @rvindex rlsiexpl
  1909. and @code{rlsiexpla},
  1910. @rvindex rlsiexpla
  1911. @pxref{General Standard Simplifier Switches}).
  1912. @end itemize
  1913. For details see the description of the simplification for ordered fields
  1914. in
  1915. @iftex
  1916. [DS97].
  1917. @end iftex
  1918. @ifinfo
  1919. @ref{References,[DS97]}.
  1920. @end ifinfo
  1921. This can be easily adapted to algebraically closed fields.
  1922. @node ACFSF-specific Standard Simplifier Switches
  1923. @subsection ACFSF-specific Standard Simplifier Switches
  1924. The switches @code{rlsiatadv}
  1925. @rvindex rlsiatadv
  1926. and @code{rlsifac}
  1927. @rvindex rlsifac
  1928. have the same effects as in the @sc{ofsf}
  1929. @cindex @sc{ofsf}
  1930. context (@pxref{OFSF-specific
  1931. Standard Simplifier Switches}).
  1932. @node DVFSF-specific Simplifications
  1933. @subsection DVFSF-specific Simplifications
  1934. @cindex simplification of atomic formulas
  1935. @cindex atomic formula simplification
  1936. In the @sc{dvfsf}
  1937. @cindex @sc{dvfsf}
  1938. case the atomic formula simplification includes the following:
  1939. @itemize @bullet
  1940. @item
  1941. Evaluation of variable-free atomic formulas to truth values
  1942. provided that p is known.
  1943. @cindex evaluate atomic formulas
  1944. @cindex variable-free atomic formula
  1945. @cindex truth value
  1946. @item
  1947. Equations and inequalities can be treated as in @sc{acfsf}
  1948. @cindex @sc{acfsf}
  1949. (@pxref{ACFSF-specific Simplifications}). Moreover powers of p
  1950. @cindex power of p
  1951. @cindex cancel powers of p
  1952. can be cancelled.
  1953. @item
  1954. With valuation relations,
  1955. @cindex valuation relation
  1956. the @sc{gcd}
  1957. @cindex @sc{gcd}
  1958. @cindex greatest common divisor
  1959. @cindex cancel @sc{gcd}
  1960. of both sides is cancelled and
  1961. added appropriately as an equation or inequality.
  1962. @item
  1963. Valuation relations
  1964. @cindex valuation relation
  1965. involving zero sides can be evaluated or at least
  1966. turned into equations or inequalities.
  1967. @item
  1968. For concrete p, integer coefficients with valuation relations can be
  1969. replaced by a power of p
  1970. @cindex power of p
  1971. on one side of the relation.
  1972. @item
  1973. For unspecified p, polynomials in p can often be replaced by one
  1974. monomial.
  1975. @item
  1976. For unspecified p, valuation relations containing a monomial in p on one
  1977. side, and an integer on the other side can be transformed into @code{z ~
  1978. 1} or @code{z /~ 1}, where @code{z} is an integer.
  1979. @end itemize
  1980. For details on simplification in p-adic fields see the article
  1981. @iftex
  1982. [DS99].
  1983. @end iftex
  1984. @ifinfo
  1985. @ref{References,[DS99]}.
  1986. @end ifinfo
  1987. Atomic formulas of the form @code{z ~ 1} or @code{z /~ 1}, where
  1988. @code{z} is an integer, can be split
  1989. @cindex split atomic formula
  1990. @cindex multiplicatively split atomic formula
  1991. into several ones via integer factorization.
  1992. @cindex integer factorization
  1993. @cindex factorization
  1994. This simplification is
  1995. often reasonable on final results. It explicitly discovers those primes
  1996. p for which the formula holds. There is a special function for this
  1997. simplification:
  1998. @defun rlexplats formula
  1999. @cindex explode atomic formulas
  2000. @cindex split atomic formula
  2001. @cindex multiplicatively split atomic formula
  2002. Explode atomic formulas. Factorize
  2003. @cindex integer factorization
  2004. @cindex factorization
  2005. atomic formulas of the form @code{z ~ 1} or @code{z /~ 1}, where
  2006. @code{z} is an integer. @code{rlexplats} obeys the switches
  2007. @code{rlsiexpla}
  2008. @rvindex rlsiexpla
  2009. and @code{rlsiexpl}
  2010. @rvindex rlsiexpl
  2011. (@pxref{General Standard Simplifier Switches}), but not @code{rlsifac}
  2012. @rvindex rlsifac
  2013. (@pxref{DVFSF-specific Standard Simplifier Switches}).
  2014. @end defun
  2015. @node DVFSF-specific Standard Simplifier Switches
  2016. @subsection DVFSF-specific Standard Simplifier Switches
  2017. The context @sc{dvfsf}
  2018. @cindex @sc{dvfsf}
  2019. knows no special simplifier switches, and ignores the general switches
  2020. @code{rlsiexpla}
  2021. @rvindex rlsiexpla
  2022. and @code{rlsiexpl}
  2023. @rvindex rlsiexpl
  2024. (@pxref{General Standard Simplifier Switches}). It behaves like
  2025. @code{rlsiexpla} on. The simplifier contains numerous sophisticated
  2026. simplifications for atomic formulas in the style of @code{rlsiatadv}
  2027. @rvindex rlsiatadv
  2028. on (@pxref{OFSF-specific Standard Simplifier Switches}).
  2029. @defvr Switch rlsifac
  2030. @cindex simplification
  2031. @cindex factorization
  2032. @cindex integer factorization
  2033. Simplify factorization. By default this switch is on. Toggles certain
  2034. simplifications that require @emph{integer} factorization.
  2035. @xref{DVFSF-specific Simplifications}, for details.
  2036. @end defvr
  2037. @node PASF-specific Simplifications
  2038. @subsection PASF-specific Simplifications
  2039. The main PASF-specific simplification feature is the content
  2040. elimination in atomic formulas.
  2041. @smallexample
  2042. f := 3 * x + 6 * y - 9 = 0
  2043. rlsimpl f;
  2044. @rfindex rlsimpl
  2045. @group
  2046. @result{} x + 2 * y - 3 = 0
  2047. @end group
  2048. f := 3 * x + 6 * y - 7 < 0
  2049. rlsimpl f;
  2050. @rfindex rlsimpl
  2051. @group
  2052. @result{} x + 2 * y - 2 <= 0
  2053. @end group
  2054. f := cong(3 * x + 6 * y - 3, 0, 9);
  2055. rlsimpl f;
  2056. @rfindex rlsimpl
  2057. @group
  2058. @result{} x + 2 * y - 1 =~ 0 (3)
  2059. @end group
  2060. @end smallexample
  2061. Futhermore evaluation of domain valued atomic formulas
  2062. is performed.
  2063. @smallexample
  2064. f := 3 = 0
  2065. rlsimpl f;
  2066. @rfindex rlsimpl
  2067. @group
  2068. @result{} false
  2069. @end group
  2070. f := cong(y+x+z,0,1);
  2071. rlsimpl f;
  2072. @rfindex rlsimpl
  2073. @group
  2074. @result{} true
  2075. @end group
  2076. @end smallexample
  2077. @node PASF-specific Standard Simplifier Switches
  2078. @subsection PASF-specific Standard Simplifier Switches
  2079. @defun rlpasfsimplify formula
  2080. Simplifies the output formula after the elimination of each quantifier. By
  2081. default this switch is on.
  2082. @end defun
  2083. @defun rlpasfexpand formula
  2084. Expands the output formula (with range predicates) after the
  2085. elimination of each quantifier. This switch is by default off
  2086. due to immense overhead of the range predicate expantion.
  2087. @end defun
  2088. @defun rlsiatadv formula
  2089. Turns the advanced PASF-speciefic simplification of atomic formulas
  2090. on. See @xref{PASF-specific Simplifications} for details.
  2091. @end defun
  2092. @node Tableau Simplifier
  2093. @section Tableau Simplifier
  2094. Although our standard simplifier (@pxref{Standard Simplifier}) already
  2095. combines information located on different boolean levels, it preserves
  2096. the basic boolean structure of the formula. The tableau methods, in
  2097. contrast, provide a technique for changing the boolean structure
  2098. @cindex change boolean structure
  2099. of a formula by constructing case distinctions.
  2100. @cindex case distinction
  2101. Compared to the standard simplifier they are much slower.
  2102. For details on tableau simplification see
  2103. @ifinfo
  2104. @ref{References,[DS97]}.
  2105. @end ifinfo
  2106. @iftex
  2107. [DS97].
  2108. @end iftex
  2109. @deftp {Data Structure} {cdl}
  2110. Case distinction list.
  2111. @cindex case distinction
  2112. This is a list of atomic formulas considered as a disjunction.
  2113. @end deftp
  2114. @defun rltab formula cdl
  2115. @cindex simplification
  2116. @cindex tableau
  2117. @rtindex cdl
  2118. Tableau method. The result is a tableau wrt.@: @var{cdl}, i.e., a
  2119. simplified equivalent of the disjunction over the specializations wrt.@:
  2120. all atomic formulas in @var{cdl}.
  2121. @smallexample
  2122. rltab((a = 0 and (b = 0 or (d = 0 and e = 0))) or
  2123. (a = 0 and c = 0),@{a=0,a<>0@});
  2124. @result{} (a = 0 and (b = 0 or c = 0 or (d = 0 and e = 0)))
  2125. @end smallexample
  2126. @end defun
  2127. @defun rlatab formula
  2128. @cindex simplification
  2129. @cindex tableau
  2130. @cindex automatic tableau
  2131. Automatic tableau method. Tableau steps wrt.@: a case distinction over
  2132. the signs of all terms occurring in @var{formula} are computed and the
  2133. best result, i.e., the result with the minimal number of atomic formulas
  2134. is returned.
  2135. @end defun
  2136. @defun rlitab formula
  2137. @cindex simplification
  2138. @cindex tableau
  2139. @cindex iterative tableau
  2140. Iterative automatic tableau method. @var{formula} is simplified by
  2141. iterative applications of @code{rlatab}.
  2142. @rfindex rlatab
  2143. The exact procedure depends on
  2144. the switch @code{rltabib}.
  2145. @rvindex rltabib
  2146. @end defun
  2147. @defvr Switch rltabib
  2148. @cindex simplification
  2149. @cindex tableau
  2150. @cindex branch-wise tableau iteration
  2151. Tableau iterate branch-wise. By default this switch is on. It controls
  2152. the procedure @code{rlitab}.
  2153. @rfindex rlitab
  2154. If @code{rltabib} is off, @code{rlatab}
  2155. @rfindex rlatab
  2156. is iteratively applied to the argument formula as long as shorter
  2157. results can be obtained. In case @code{rltabib} is on, the corresponding
  2158. next tableau step is not applied to the last tableau result but
  2159. independently to each single branch. The iteration stops when the
  2160. obtained formula is not smaller than the corresponding input.
  2161. @end defvr
  2162. @node Groebner Simplifier
  2163. @section Groebner Simplifier
  2164. @cindex Groebner simplifier
  2165. The Groebner simplifier is not available in the @sc{dvfsf}
  2166. @cindex @sc{dvfsf}
  2167. context. It considers order theoretical and algebraic simplification
  2168. @cindex algebraic simplification
  2169. rules between the atomic formulas of the input formula. Currently the
  2170. Groebner simplifier is not idempotent. The name is derived from the main
  2171. mathematical tool used for simplification: Computing Groebner bases
  2172. @cindex Groebner basis
  2173. of certain subsets of terms occurring in the atomic formulas.
  2174. For calling the Groebner simplifier there are the following functions:
  2175. @defun rlgsc formula [@var{theory}]
  2176. @defunx rlgsd formula [@var{theory}]
  2177. @defunx rlgsn formula [@var{theory}]
  2178. @rtindex theory
  2179. @cindex normal form
  2180. @cindex boolean normal form
  2181. @cindex simplification
  2182. @cindex Groebner simplifier
  2183. @cindex polynomial reduction
  2184. @cindex reduce polynomials
  2185. Groebner simplifier. @var{formula} is a quantifier-free formula. Default
  2186. for @var{theory} is the empty theory @code{@{@}}. The functions differ
  2187. in the boolean normal form that is computed at the beginning.
  2188. @code{rlgsc} computes a conjunctive normal form,
  2189. @cindex conjunctive normal form
  2190. @cindex @sc{cnf}
  2191. @code{rlgsd} computes a disjunctive normal form,
  2192. @cindex disjunctive normal form
  2193. @cindex @sc{dnf}
  2194. and @code{rlgsn} heuristically decides for either a conjunctive or a
  2195. disjunctive normal form depending on the structure of @var{formula}.
  2196. After computing the corresponding normal form, the formula is simplified
  2197. using Groebner simplification techniques. The returned formula is
  2198. equivalent to the input formula wrt.@: @var{theory}.
  2199. @smallexample
  2200. rlgsd(x=0 and ((y = 0 and x**2+2*y > 0) or
  2201. (z=0 and x**3+z >= 0)));
  2202. @result{} x = 0 and z = 0
  2203. @end smallexample
  2204. @smallexample
  2205. rlgsc(x neq 0 or ((y neq 0 or x**2+2*x*y <= 0) and
  2206. (z neq 0 or x**3+z < 0)));
  2207. @result{} x <> 0 or z <> 0
  2208. @end smallexample
  2209. @end defun
  2210. The heuristic used by @code{rlgsn}
  2211. @rfindex rlgsn
  2212. is intended to find the smaller boolean normal form
  2213. @cindex boolean normal form
  2214. among @sc{cnf} an @sc{dnf}. Note that, anyway, the simplification of the
  2215. smaller normal form can lead to a larger final result than that of the
  2216. larger one.
  2217. The Groebner simplifiers use the Groebner package of @sc{reduce} to
  2218. compute the various Groebner bases. By default, the @code{revgradlex}
  2219. term order is used, and no optimizations of the order between the
  2220. variables are applied. The other switches and variables of the Groebner
  2221. package are not controlled by the Groebner simplifier. They can be
  2222. adjusted by the user.
  2223. In contrast to the standard simplifier @code{rlsimpl}
  2224. @rfindex rlsimpl
  2225. (@pxref{Standard Simplifier}), the Groebner simplifiers can in general
  2226. produce formulas containing more atomic formulas than the input. This
  2227. cannot happen if the switches @code{rlgsprod},
  2228. @rvindex rlgsprod
  2229. @code{rlgsred},
  2230. @rvindex rlgsred
  2231. and @code{rlgssub}
  2232. @rvindex rlgssub
  2233. are off and the input formula is a simplified boolean normal form.
  2234. The functionality of the Groebner simplifiers @code{rlgsc},
  2235. @rfindex rlgsc
  2236. @code{rlgsd},
  2237. @rfindex rlgsd
  2238. and @code{rlgsn}
  2239. @rfindex rlgsn
  2240. is controlled by numerous switches. In
  2241. most cases the default settings lead to a good simplification.
  2242. @defvr Switch rlgsrad
  2243. @cindex radical membership test
  2244. @cindex ideal membership test
  2245. Groebner simplifier radical membership test. By default this switch is
  2246. on. If the switch is on the Groebner simplifier does not only use ideal
  2247. membership tests for simplification but also radical membership tests.
  2248. This leads to better simplifications but takes considerably more time.
  2249. @end defvr
  2250. @defvr Switch rlgssub
  2251. @cindex substitution
  2252. Groebner simplifier substitute. By default this switch is on. Certain
  2253. subsets of atomic formulas are substituted by equivalent ones. Both the
  2254. number of atomic formulas and the complexity of the terms
  2255. @cindex complexity of terms
  2256. may increase or decrease independently.
  2257. @end defvr
  2258. @defvr Switch rlgsbnf
  2259. @cindex boolean normal form
  2260. @cindex normal form
  2261. Groebner simplifier boolean normal form. By default this switch is on.
  2262. Then the simplification starts with a boolean normal form computation.
  2263. If the switch is off, the simplifiers expect a boolean normal form as
  2264. the argument @var{formula}.
  2265. @end defvr
  2266. @defvr Switch rlgsred
  2267. @cindex polynomial reduction
  2268. @cindex reduce polynomials
  2269. @cindex complexity of terms
  2270. Groebner simplifier reduce polynomials. By default this switch is on. It
  2271. controls the reduction of the terms wrt.@: the computed Groebner bases.
  2272. The number of atomic formulas is never increased. Mind that by reduction
  2273. the terms can become more complicated.
  2274. @end defvr
  2275. @defvr {Advanced Switch} rlgsvb
  2276. @cindex verbosity output
  2277. @cindex protocol
  2278. Groebner simplifier verbose. By default this switch is on. It toggles
  2279. verbosity output of the Groebner simplifier. Verbosity output is given
  2280. if and only if both @code{rlverbose}
  2281. @rvindex rlverbose
  2282. (@pxref{Global Switches}) and @code{rlgsvb} are on.
  2283. @end defvr
  2284. @defvr {Advanced Switch} rlgsprod
  2285. Groebner simplifier product. By default this switch is off. If this
  2286. switch is on then conjunctions of inequalities and disjunctions of
  2287. equations are contracted
  2288. @cindex unsplit atomic formulas
  2289. @cindex contract atomic formulas
  2290. multiplicatively to one atomic formula. This reduces the number of
  2291. atomic formulas but in most cases it raises the complexity of the terms.
  2292. Most simplifications recognized by considering products are detected
  2293. also with @code{rlgsprod} off.
  2294. @end defvr
  2295. @defvr {Advanced Switch} rlgserf
  2296. Groebner simplifier evaluate reduced form.
  2297. @cindex evaluate reduced form
  2298. By default this switch is on. It controls the evaluation of the atomic
  2299. formulas
  2300. @cindex evaluate atomic formulas
  2301. to truth values.
  2302. @cindex truth value
  2303. If this switch is on, the standard simplifier (@pxref{Standard
  2304. Simplifier})
  2305. @cindex standard simplifier
  2306. is used to evaluate atomic formulas. Otherwise atomic formulas are
  2307. evaluated only if their left hand side is a domain element.
  2308. @end defvr
  2309. @defvr {Advanced Switch} rlgsutord
  2310. @cindex term order
  2311. Groebner simplifier user defined term order. By default this switch is
  2312. off. Then all Groebner basis computations and reductions
  2313. @cindex polynomial reduction
  2314. @cindex reduce polynomials
  2315. are performed with respect to the @code{revgradlex}
  2316. @cindex @code{revgradlex}
  2317. term order. If this switch is on, the Groebner simplifier minds the term
  2318. order selected with the @code{torder}
  2319. @rfindex torder
  2320. statement. For passing a variable list to @code{torder}, note that
  2321. @code{rlgsradmemv!*}
  2322. @vrindex rlgsradmemv!*
  2323. is used as the tag variable for radical membership tests.
  2324. @cindex radical membership test
  2325. @end defvr
  2326. @defvr {Fluid} rlgsradmemv!*
  2327. @cindex radical membership test
  2328. Radical membership test variable. This fluid contains the tag variable
  2329. @cindex tag variable
  2330. used for the radical membership test with switch @code{rlgsrad}
  2331. @rvindex rlgsrad
  2332. on. It can be used to pass the variable explicitly to @code{torder}
  2333. @rfindex torder
  2334. with switch @code{rlgsutord}
  2335. @rvindex rlgsutord
  2336. on.
  2337. @end defvr
  2338. @node Degree Decreaser
  2339. @section Degree Decreaser
  2340. @cindex degree
  2341. @cindex degree restriction
  2342. The quantifier elimination procedures of @sc{redlog} (@pxref{Quantifier
  2343. Elimination}) obey certain degree restrictions on the bound variables.
  2344. For this reason, there are degree-decreasing simplifiers available,
  2345. which are automatically applied by the corresponding quantifier
  2346. elimination procedures. There is no degree decreaser for the @sc{dvfsf}
  2347. @cindex @sc{dvfsf}
  2348. context available.
  2349. @defun rldecdeg formula
  2350. Decrease degrees.
  2351. @cindex decrease degree
  2352. Returns a formula equivalent to @var{formula},
  2353. hopefully decreasing the degrees of the bound variables. In the
  2354. @sc{ofsf}
  2355. @cindex @sc{ofsf}
  2356. context there are in general some sign conditions
  2357. @cindex sign conditions
  2358. on the variables added, which slightly increases the number of contained
  2359. atomic formulas.
  2360. @smallexample
  2361. rldecdeg ex(@{b,x@},m*x**4711+b**8>0);
  2362. @result{} ex b (b >= 0 and ex x (b + m*x > 0))
  2363. @end smallexample
  2364. @end defun
  2365. @defun rldecdeg1 formula [@var{varlist}]
  2366. @cindex decrease degree
  2367. Decrease degrees subroutine. This provides a low-level entry point to
  2368. the degree decreaser. The variables to be decreased are not determined
  2369. by regarding quantifiers but are explicitly given by @var{varlist},
  2370. where the empty @var{varlist} selects @emph{all} free variables of
  2371. @code{f}. The return value is a list @code{@{f,l@}}. @code{f} is a
  2372. formula, and @code{l} is a list @code{@{...,@{v,d@},...@}}, where
  2373. @code{v} is from @var{varlist} and @code{d} is an integer. @code{f} has
  2374. been obtained from @var{formula} by substituting
  2375. @cindex substitution
  2376. @code{v} for @code{v**d}. The sign conditions necessary with the
  2377. @sc{ofsf}
  2378. @cindex @sc{ofsf}
  2379. context are not generated automatically, but have to be
  2380. constructed by hand for the variables @code{v} with even degree @code{d}
  2381. in @code{l}.
  2382. @smallexample
  2383. rldecdeg1(m*x**4711+b**8>0,@{b,x@});
  2384. @result{} @{b + m*x > 0,@{@{x,4711@},@{b,8@}@}@}
  2385. @end smallexample
  2386. @end defun
  2387. @node Normal Forms
  2388. @chapter Normal Forms
  2389. @menu
  2390. * Boolean Normal Forms:: CNF and DNF
  2391. * Miscellaneous Normal Forms:: Negation, prenex, anti-prenex
  2392. @end menu
  2393. @node Boolean Normal Forms
  2394. @section Boolean Normal Forms
  2395. For computing small boolean normal forms,
  2396. @cindex boolean normal form
  2397. see also the documentation of
  2398. the procedures @code{rlgsc}
  2399. @rfindex rlgsc
  2400. and @code{rlgsd}
  2401. @rfindex rlgsd
  2402. (@ref{Groebner Simplifier}).
  2403. @defun rlcnf formula
  2404. @cindex normal form
  2405. @cindex conjunctive normal form
  2406. @cindex @sc{cnf}
  2407. Conjunctive normal form. @var{formula} is a quantifier-free formula.
  2408. Returns a conjunctive normal form of @var{formula}.
  2409. @smallexample
  2410. rlcnf(a = 0 and b = 0 or b = 0 and c = 0);
  2411. @result{} (a = 0 or c = 0) and b = 0
  2412. @end smallexample
  2413. @end defun
  2414. @defun rldnf formula
  2415. @cindex normal form
  2416. @cindex disjunctive normal form
  2417. @cindex @sc{dnf}
  2418. Disjunctive normal form. @var{formula} is a quantifier-free formula.
  2419. Returns a disjunctive normal form of @var{formula}.
  2420. @smallexample
  2421. rldnf((a = 0 or b = 0) and (b = 0 or c = 0));
  2422. @result{} (a = 0 and c = 0) or b = 0
  2423. @end smallexample
  2424. @end defun
  2425. @defvr Switch rlbnfsm
  2426. @cindex boolean normal form
  2427. @cindex smart @sc{bnf} computation
  2428. @cindex simplifier recognized implication
  2429. Boolean normal form smart. By default this switch is off. If on,
  2430. @emph{simplifier recognized implication}
  2431. @cindex simplifier recognized implication
  2432. @ifinfo
  2433. (@pxref{References,[DS97]})
  2434. @end ifinfo
  2435. @iftex
  2436. [DS97]
  2437. @end iftex
  2438. is applied by @code{rlcnf}
  2439. @rfindex rlcnf
  2440. and @code{rldnf}.
  2441. @rfindex rldnf
  2442. This leads to smaller normal forms but is considerably time consuming.
  2443. @end defvr
  2444. @defvr {Fix Switch} rlbnfsac
  2445. @cindex boolean normal form
  2446. @cindex subsumption
  2447. @cindex cut
  2448. Boolean normal forms subsumption and cut. By default this switch is on.
  2449. With boolean normal form computation, subsumption and cut strategies are
  2450. applied by @code{rlcnf}
  2451. @rfindex rlcnf
  2452. and @code{rldnf}
  2453. @rfindex rldnf
  2454. to decrease the number of clauses.
  2455. @cindex decrease number of clauses
  2456. We give an example:
  2457. @smallexample
  2458. rldnf(x=0 and y<0 or x=0 and y>0 or x=0 and y<>0 and z=0);
  2459. @result{} (x = 0 and y <> 0)
  2460. @end smallexample
  2461. @end defvr
  2462. @node Miscellaneous Normal Forms
  2463. @section Miscellaneous Normal Forms
  2464. @defun rlnnf formula
  2465. @cindex normal form
  2466. @cindex negation normal form
  2467. @cindex @sc{nnf}
  2468. Negation normal form. Returns a @dfn{negation normal form} of
  2469. @var{formula}. This is an @code{and}-@code{or}-combination of atomic
  2470. formulas. Note that in all contexts, we use languages
  2471. @cindex language
  2472. such that all
  2473. negations can be encoded by relations (@pxref{Format and Handling of
  2474. Formulas}). We give an example:
  2475. @smallexample
  2476. rlnnf(a = 0 equiv b > 0);
  2477. @result{} (a = 0 and b > 0) or (a <> 0 and b <= 0)
  2478. @end smallexample
  2479. @code{rlnnf} accepts formulas containing quantifiers, but it does not
  2480. eliminate quantifiers.
  2481. @cindex quantifier
  2482. @end defun
  2483. @defun rlpnf formula
  2484. @cindex normal form
  2485. @cindex prenex normal form
  2486. @cindex @sc{pnf}
  2487. Prenex normal form. Returns a prenex normal form of @var{formula}. The
  2488. number of quantifier changes
  2489. @cindex quantifier changes
  2490. in the result is minimal among all prenex
  2491. normal forms that can be obtained from @var{formula} by only moving
  2492. quantifiers to the outside.
  2493. When @var{formula} contains two quantifiers with the same variable such
  2494. as in
  2495. @ifinfo
  2496. @example
  2497. ex x (x = 0) and ex x (x <> 0)
  2498. @end example
  2499. @end ifinfo
  2500. @tex
  2501. $$\exists x(x = 0) \land \exists x (x \neq 0)$$
  2502. @end tex
  2503. there occurs a name conflict. It is resolved according to the following
  2504. rules:
  2505. @cindex rename variables
  2506. @cindex variable renaming
  2507. @itemize @bullet
  2508. @item Every bound variable that stands in conflict with any other
  2509. variable is renamed.
  2510. @item Free variables are never renamed.
  2511. @end itemize
  2512. Hence @code{rlpnf} applied to the above example formula yields
  2513. @smallexample
  2514. rlpnf(ex(x,x=0) and ex(x,x<>0));
  2515. @result{} ex x0 ex x1 (x0 = 0 and x1 <> 0)
  2516. @end smallexample
  2517. @end defun
  2518. @defun rlapnf formula
  2519. @cindex anti-prenex normal form
  2520. @cindex move quantifiers inside
  2521. @cindex prenex normal form
  2522. Anti-prenex normal form. Returns a formula equivalent to @var{formula}
  2523. where all quantifiers are moved to the inside as far as possible.
  2524. @cindex quantifier
  2525. @cindex move quantifiers inside
  2526. @smallexample
  2527. rlapnf ex(x,all(y,x=0 or (y=0 and x=z)));
  2528. @result{} ex x (x = 0) or (all y (y = 0) and ex x (x - z = 0))
  2529. @end smallexample
  2530. @end defun
  2531. @defun rltnf formula terml
  2532. @cindex normal form
  2533. @cindex term normal form
  2534. Term normal form. @var{terml} is a list of terms. This combines @sc{dnf}
  2535. @cindex @sc{dnf}
  2536. @cindex disjunctive normal form
  2537. computation with tableau
  2538. @cindex tableau
  2539. ideas (@pxref{Tableau Simplifier}). A typical
  2540. choice for @var{terml} is @code{rlterml} @var{formula}.
  2541. @rfindex rlterml
  2542. If the switch @code{rltnft}
  2543. @rvindex rltnft
  2544. is off, then @code{rltnf(@var{formula},rlterml @var{formula})} returns a
  2545. @sc{dnf}.
  2546. @end defun
  2547. @defvr Switch rltnft
  2548. @cindex term normal form
  2549. Term normal form tree variant. By default this switch is on causing
  2550. @code{rltnf} to return a deeply nested formula.
  2551. @cindex deeply nested formula
  2552. @end defvr
  2553. @node Quantifier Elimination and Variants
  2554. @chapter Quantifier Elimination and Variants
  2555. @cindex comprehensive Groebner Basis
  2556. @cindex @sc{cgb}
  2557. @emph{Quantifier elimination} computes quantifier-free equivalents
  2558. @cindex quantifier-free equivalent
  2559. for given first-order formulas.
  2560. For @sc{ofsf}
  2561. @cindex @sc{ofsf}
  2562. there are two methods available:
  2563. @enumerate
  2564. @item
  2565. Virtual substitution
  2566. @cindex virtual substitution
  2567. based on elimination set
  2568. @cindex elimination set
  2569. ideas
  2570. @ifinfo
  2571. @ref{References,[Wei88]}.
  2572. @end ifinfo
  2573. @iftex
  2574. [Wei88].
  2575. @end iftex
  2576. This implementation is restricted to at most quadratic occurrences of the
  2577. quantified variables, but includes numerous heuristic strategies for
  2578. coping with higher degrees. See
  2579. @ifinfo
  2580. @ref{References,[LW93]}, @ref{References,[Wei97]},
  2581. @end ifinfo
  2582. @iftex
  2583. [LW93], [Wei97]
  2584. @end iftex
  2585. for details of the method.
  2586. @item
  2587. Partial cylindrical algebraic decomposition
  2588. @cindex cylindrical algebraic decomposition
  2589. @cindex partial cylindrical algebraic decomposition
  2590. (CAD)
  2591. @cindex CAD
  2592. introduced by Collins and Hong
  2593. @ifinfo
  2594. @ref{References,[CH91]}.
  2595. @end ifinfo
  2596. @iftex
  2597. [CH91].
  2598. @end iftex
  2599. There are no degree restrictions with CAD.
  2600. @end enumerate
  2601. For @sc{dvfsf}
  2602. @cindex @sc{dvfsf}
  2603. we use the virtual substitution method
  2604. @cindex virtual substitution
  2605. that is also available for
  2606. @sc{ofsf}.
  2607. @cindex @sc{ofsf}
  2608. Here, the implementation is restricted to linear occurrences of the
  2609. quantified variables. There are also heuristic strategies for coping
  2610. with higher degrees included. The method is described in detail in
  2611. @ifinfo
  2612. @ref{References,[Stu00]}.
  2613. @end ifinfo
  2614. @iftex
  2615. [Stu00].
  2616. @end iftex
  2617. The @sc{acfsf}
  2618. @cindex @sc{acfsf}
  2619. quantifier elimination is based on @emph{comprehensive
  2620. Groebner basis}
  2621. @cindex comprehensive Groebner basis
  2622. computation; there are no degree restrictions
  2623. @cindex degree restriction
  2624. for this context
  2625. @ifinfo
  2626. @ref{References,[Wei92]}.
  2627. @end ifinfo
  2628. @iftex
  2629. [Wei92].
  2630. @end iftex
  2631. @menu
  2632. * Quantifier Elimination::
  2633. * Generic Quantifier Elimination::
  2634. * Local Quantifier Elimination::
  2635. * Linear Optimization::
  2636. @end menu
  2637. @node Quantifier Elimination
  2638. @section Quantifier Elimination
  2639. @subsection Virtual Substitution
  2640. @defun rlqe formula [@var{theory}]
  2641. @rtindex theory
  2642. @cindex quantifier elimination
  2643. Quantifier elimination by virtual substitution. Returns a
  2644. quantifier-free equivalent
  2645. @cindex quantifier-free equivalent
  2646. of @var{formula} (wrt.@: @var{theory}). In the contexts @sc{ofsf}
  2647. @cindex @sc{ofsf}
  2648. and @sc{dvfsf},
  2649. @cindex @sc{dvfsf}
  2650. @var{formula} has to obey certain degree restrictions.
  2651. @cindex degree restriction
  2652. There are various techniques for decreasing the degree
  2653. @cindex decrease degree
  2654. of the input and of intermediate results built in. In case that not all
  2655. variables can be eliminated, the resulting formula is not
  2656. quantifier-free but still equivalent.
  2657. @end defun
  2658. For degree decreasing
  2659. @cindex decrease degree
  2660. heuristics see, e.g., @ref{Degree Decreaser}, or the switches
  2661. @code{rlqeqsc}/@code{rlqesqsc}.
  2662. @rvindex rlqeqsc
  2663. @rvindex rlqesqsc
  2664. @deftp {Data Structure} {elimination_answer}
  2665. A list of @dfn{condition--solution pairs},
  2666. @cindex condition--solution pairs
  2667. i.e., a list of pairs consisting of a quantifier-free formula and a set
  2668. of equations.
  2669. @end deftp
  2670. @defun rlqea formula [@var{theory}]
  2671. @rtindex theory
  2672. @cindex quantifier elimination
  2673. @cindex solution points
  2674. @cindex extended quantifier elimination
  2675. @cindex answer
  2676. @cindex sample solution
  2677. @rtindex elimination_answer
  2678. Quantifier elimination with answer. Returns an
  2679. @ifinfo
  2680. @var{elimination_answer}
  2681. @end ifinfo
  2682. @iftex
  2683. @var{elim@-i@-na@-tion_an@-swer}
  2684. @end iftex
  2685. obtained the following way: @var{formula} is wlog.@: prenex. All
  2686. quantifier blocks but the outermost one are eliminated. For this
  2687. outermost block, the constructive information obtained by the
  2688. elimination is saved:
  2689. @itemize @bullet
  2690. @item In case the considered block is existential, for each evaluation
  2691. of the free variables we know the following: Whenever a @dfn{condition}
  2692. holds, then @var{formula} is @code{true}
  2693. @rvindex true
  2694. under the given evaluation, and the
  2695. @dfn{solution}
  2696. @cindex solution
  2697. is @emph{one} possible evaluation for the outer block variables
  2698. satisfying the matrix.
  2699. @item The universally quantified case is dual: Whenever a @dfn{condition}
  2700. is false, then @var{formula} is @code{false},
  2701. @rvindex false
  2702. and the @dfn{solution} is @emph{one} possible counterexample.
  2703. @cindex counterexample
  2704. @end itemize
  2705. As an example we show how to find conditions and solutions for a system
  2706. of two linear constraints:
  2707. @smallexample
  2708. rlqea ex(x,x+b1>=0 and a2*x+b2<=0);
  2709. 2 - b2
  2710. @result{} @{@{a2 *b1 - a2*b2 >= 0 and a2 <> 0,@{x = -------@}@},
  2711. a2
  2712. @{a2 < 0 or (a2 = 0 and b2 <= 0),@{x = infinity1@}@}@}
  2713. @end smallexample
  2714. The answer can contain constants named @code{infinity}
  2715. @cindex @code{infinity}
  2716. or @code{epsilon},
  2717. @cindex @code{epsilon}
  2718. both indexed by a number: All @code{infinity}'s are positive and
  2719. infinite, and all @code{epsilon}'s are positive and infinitesimal wrt.@:
  2720. the considered field. Nothing is known about the ordering among the
  2721. @code{infinity}'s and @code{epsilon}'s though this can be relevant for
  2722. the points to be solutions. With the switch @code{rounded}
  2723. @rvindex rounded
  2724. on, the @code{epsilon}'s are evaluated to zero. @code{rlqea} is not
  2725. available in the context @sc{acfsf}.
  2726. @cindex @sc{acfsf}
  2727. @end defun
  2728. @defvr {Switch} rlqeqsc
  2729. @defvrx Switch rlqesqsc
  2730. @cindex quantifier elimination
  2731. @cindex quadratic special case
  2732. @cindex super quadratic special case
  2733. Quantifier elimination (super) quadratic special case. By default these
  2734. switches are off. They are relevant only in @sc{ofsf}.
  2735. @cindex @sc{ofsf}
  2736. If turned on, alternative elimination sets are used for certain special
  2737. cases by @code{rlqe}/@code{rlqea}
  2738. @rfindex rlqe
  2739. @rfindex rlqea
  2740. and @code{rlgqe}/@code{rlgqea}.
  2741. @rfindex rlgqe
  2742. @rfindex rlgqea
  2743. (@pxref{Generic Quantifier Elimination}). They will possibly avoid
  2744. violations of the degree restrictions,
  2745. @cindex degree restriction
  2746. but lead to larger results in general. Former versions of @sc{redlog}
  2747. without these switches behaved as if @code{rlqeqsc} was on and
  2748. @code{rlqesqsc} was off.
  2749. @end defvr
  2750. @defvr {Advanced Switch} rlqedfs
  2751. @cindex quantifier elimination
  2752. @cindex depth first search
  2753. @cindex breadth first search
  2754. Quantifier elimination depth first search. By default this switch is
  2755. off. It is also ignored in the @sc{acfsf}
  2756. @cindex @sc{acfsf}
  2757. context. It is ignored with the switch @code{rlqeheu}
  2758. @rvindex rlqeheu
  2759. on, which is the default for @sc{ofsf}.
  2760. @cindex @sc{ofsf}
  2761. Turning @code{rlqedfs} on makes @code{rlqe}/@code{rlqea}
  2762. @rfindex rlqe
  2763. @rfindex rlqea
  2764. and
  2765. @code{rlgqe}/@code{rlgqea}
  2766. @rfindex rlgqe
  2767. @rfindex rlgqea
  2768. (@pxref{Generic Quantifier Elimination}) work in a depth first search
  2769. manner instead of breadth first search. This saves space,
  2770. @cindex save space
  2771. and with decision problems,
  2772. @cindex decision problem
  2773. where variable-free atomic formulas can be evaluated
  2774. @cindex evaluate atomic formulas
  2775. to truth values,
  2776. @cindex truth value
  2777. it might save time.
  2778. @cindex save time
  2779. In general, it leads to larger results.
  2780. @end defvr
  2781. @defvr {Advanced Switch} rlqeheu
  2782. @cindex heuristic
  2783. @cindex search heuristic
  2784. @cindex quantifier elimination
  2785. @cindex depth first search
  2786. @cindex breadth first search
  2787. Quantifier elimination search heuristic. By default this switch is on in
  2788. @sc{ofsf}
  2789. @cindex @sc{ofsf}
  2790. and off in @sc{dvfsf}.
  2791. @cindex @sc{dvfsf}
  2792. It is ignored in @sc{acfsf}.
  2793. @cindex @sc{acfsf}
  2794. Turning @code{rlqeheu} on causes the switch @code{rlqedfs}
  2795. @rvindex rlqedfs
  2796. to be ignored. @code{rlqe}/@code{rlqea}
  2797. @rfindex rlqe
  2798. @rfindex rlqea
  2799. and @code{rlgqe}/@code{rlgqea}
  2800. @rfindex rlgqe
  2801. @rfindex rlgqea
  2802. (@pxref{Generic Quantifier Elimination}) will then decide between
  2803. breadth first search and depth first search for each quantifier block,
  2804. @cindex quantifier block
  2805. where @sc{dfs} is chosen when the problem is a decision problem.
  2806. @cindex decision problem
  2807. @end defvr
  2808. @defvr {Advanced Switch} rlqepnf
  2809. @cindex quantifier elimination
  2810. @cindex prenex normal form
  2811. Quantifier elimination compute prenex normal form. By default this
  2812. switch is on, which causes that @code{rlpnf}
  2813. @rfindex rlpnf
  2814. (@pxref{Miscellaneous Normal Forms}) is applied to @var{formula} before
  2815. starting the elimination process. If the argument formula to
  2816. @code{rlqe}/@code{rlqea}
  2817. @rfindex rlqe
  2818. @rfindex rlqea
  2819. or @code{rlgqe}/@code{rlgqea}
  2820. @rfindex rlgqe
  2821. @rfindex rlgqea
  2822. (@pxref{Generic Quantifier Elimination}) is already prenex, this switch
  2823. can be turned off. This may be useful with formulas containing
  2824. @code{equiv}
  2825. @rfindex equiv
  2826. since @code{rlpnf} applies @code{rlnnf},
  2827. @rfindex rlnnf
  2828. (@pxref{Miscellaneous Normal Forms}), and resolving equivalences can
  2829. double the size of a formula. @code{rlqepnf} is ignored in @sc{acfsf},
  2830. @cindex @sc{acfsf}
  2831. since @sc{nnf} is necessary for elimination there.
  2832. @end defvr
  2833. @defvr {Fix Switch} rlqesr
  2834. @cindex separate roots
  2835. Quantifier elimination separate roots. This is off by default. It is
  2836. relevant only in @sc{ofsf}
  2837. @cindex @sc{ofsf}
  2838. for @code{rlqe}/@code{rlgqe}
  2839. @rfindex rlqe
  2840. @rfindex rlqea
  2841. and for all but
  2842. the outermost quantifier block in @code{rlqea}/@code{rlgqea}.
  2843. @rfindex rlgqe
  2844. @rfindex rlgqea
  2845. For @code{rlqea} and @code{rlgqea} see @ref{Generic Quantifier
  2846. Elimination}. It affects the technique for substituting
  2847. @cindex substitution
  2848. the two solutions of a quadratic constraint
  2849. @cindex quadratic constraint
  2850. during elimination.
  2851. @end defvr
  2852. The following two functions @code{rlqeipo}
  2853. @rfindex rlqeipo
  2854. and @code{rlqews}
  2855. @rfindex rlqews
  2856. are experimental implementations. The idea there is to overcome the
  2857. obvious disadvantages of prenex normal forms with elimination set
  2858. methods. In most cases, however, the classical method @code{rlqe}
  2859. @rfindex rlqe
  2860. has turned out superior.
  2861. @defun rlqeipo formula [@var{theory}]
  2862. @rtindex theory
  2863. @cindex quantifier elimination
  2864. @cindex prenex normal form
  2865. @cindex anti-prenex normal form
  2866. Quantifier elimination by virtual substitution in position. Returns a
  2867. quantifier-free equivalent
  2868. @cindex quantifier-free equivalent
  2869. to @var{formula} by iteratively making @var{formula} anti-prenex
  2870. (@pxref{Miscellaneous Normal Forms}) and eliminating one quantifier.
  2871. @end defun
  2872. @defun rlqews formula [@var{theory}]
  2873. @rtindex theory
  2874. @cindex quantifier elimination
  2875. @cindex prenex normal form
  2876. @cindex anti-prenex normal form
  2877. Quantifier elimination by virtual substitution with selection.
  2878. @var{formula} has to be prenex, if the switch @code{rlqepnf}
  2879. @rvindex rlqepnf
  2880. is off. Returns a quantifier-free
  2881. equivalent
  2882. @cindex quantifier-free equivalent
  2883. to @var{formula} by iteratively selecting a quantifier from the
  2884. innermost block, moving it inside as far as possible, and then
  2885. eliminating it. @code{rlqews} is not available in @sc{acfsf}.
  2886. @cindex @sc{acfsf}
  2887. @end defun
  2888. @subsection Cylindrical Algebraic Decomposition
  2889. @cindex cylindrical algebraic decomposition
  2890. @defun rlcad formula
  2891. @cindex quantifier elimination
  2892. @cindex cylindrical algebraic decomposition
  2893. Cylindrical algebraic decomposition. Returns a quantifier-free
  2894. equivalent of @var{formula}. Works only in context OFSF. There are no
  2895. degree restrictions on @var{formula}.
  2896. @rvindex rlcad
  2897. @end defun
  2898. @defvr {Advanced Switch} rlcadfac
  2899. Factorisation.
  2900. This is on by default.
  2901. @rvindex rlcadfac
  2902. @end defvr
  2903. @defvr Switch rlcadbaseonly
  2904. Base phase only.
  2905. Turned off by default.
  2906. @rvindex rlcadbaseonly
  2907. @end defvr
  2908. @defvr Switch rlcadprojonly
  2909. Projection phase only.
  2910. Turned off by default.
  2911. @rvindex rlcadprojonly
  2912. @end defvr
  2913. @defvr Switch rlcadextonly
  2914. Extension phase only.
  2915. Turned off by default.
  2916. @rvindex rlcadextonly
  2917. @end defvr
  2918. @defvr Switch rlcadpartial
  2919. Partial CAD.
  2920. This is turned on by default.
  2921. @rvindex rlcadpartial
  2922. @end defvr
  2923. @defvr {Advanced Switch} rlcadfulldimonly
  2924. Full dimensional cells only. This is turned off by default. Only stacks
  2925. over full dimensional cells are built. Such cells have rational sample
  2926. points. To do this ist sound only in special cases as consistency
  2927. problems (existenially quantified, strict inequalities).
  2928. @rvindex rlcadfulldimonly
  2929. @end defvr
  2930. @defvr Switch rlcadtrimtree
  2931. Trim tree. This is turned on by default. Frees unused part of the
  2932. constructed partial CAD-tree, and hence saves space. However, afterwards
  2933. it is not possible anymore to find out how many cells were calculated
  2934. beyond free variable space.
  2935. @rvindex rlcadtrimtree
  2936. @end defvr
  2937. @defvr {Advanced Switch} rlcadrawformula
  2938. Raw formula. Turned off by default. If turned on, a variable-free DNF is
  2939. returned (if simple solution formula construction succeeds). Otherwise,
  2940. the raw result is simplified with @code{rldnf}.
  2941. @rvindex rlcadrawformula
  2942. @end defvr
  2943. @defvr {Advanced Switch} rlcadisoallroots
  2944. Isolate all roots. This is off by default. Turning this switch on allows
  2945. to find out, how much time is consumed more without incremental root
  2946. isolation.
  2947. @rvindex rlcadisoallroots
  2948. @end defvr
  2949. @defvr {Advanced Switch} rlcadrawformula
  2950. Raw formula. Turned off by default. If turned on, a variable-free DNF is
  2951. returned (if simple solution formula construction succeeds). Otherwise,
  2952. the raw result is simplified with @code{rldnf}.
  2953. @rvindex rlcadrawformula
  2954. @end defvr
  2955. @defvr {Advanced Switch} rlcadisoallroots
  2956. Isolate all roots. This is off by default. Turning this switch on allows
  2957. to find out, how much time is consumed more without incremental root
  2958. isolation.
  2959. @rvindex rlcadisoallroots
  2960. @end defvr
  2961. @defvr {Advanced Switch} rlcadaproj
  2962. @defvrx {Advanced Switch} rlcadaprojalways
  2963. Augmented projection (always). By default, @code{rlcadaproj} is turned
  2964. on and @code{rlcadaprojalways} is turned off. If @code{rlcadaproj} is
  2965. turned off, no augmented projection is performed. Otherwerwise, if
  2966. turned on, augmented projection is performed always (if
  2967. @code{rlcadaprojalways} is turned on) or just for the free variable
  2968. space (@code{rlcadaprojalways} turned off).
  2969. @rvindex rlcadaproj
  2970. @rvindex rlcadaprojalways
  2971. @end defvr
  2972. @defvr Switch rlcadhongproj
  2973. Hong projection.
  2974. This is on by default.
  2975. If turned on, Hong's improvement for the projection operator is used.
  2976. @rvindex rlcadhongproj
  2977. @end defvr
  2978. @defvr Switch rlcadverbose
  2979. Verbose.
  2980. This is off by default.
  2981. With @code{rladverbose} on, additional verbose information is displayed.
  2982. @rvindex rlcadverbose
  2983. @end defvr
  2984. @defvr Switch rlcaddebug
  2985. Debug.
  2986. This is turned off by default.
  2987. Performes a self-test at several places, if turned on.
  2988. @rvindex rlcaddebug
  2989. @end defvr
  2990. @defvr {Advanced Switch} rlanuexverbose
  2991. Verbose.
  2992. This is off by default.
  2993. With @code{ranuexverbose} on, additional verbose information is displayed.
  2994. Not of much importance any more.
  2995. @rvindex rlanuexverbose
  2996. @end defvr
  2997. @defvr {Advanced Switch} rlanuexdifferentroots
  2998. Different roots. Unused for the moment and maybe redundant soon.
  2999. @rvindex rlanuexdifferentroots
  3000. @end defvr
  3001. @defvr Switch rlanuexdebug
  3002. Debug. This is off by default.
  3003. Performes a self-test at several places, if turned on.
  3004. @rvindex rlanuexdebug
  3005. @end defvr
  3006. @defvr Switch rlanuexpsremseq
  3007. Pseudo remainder sequences.
  3008. This is turned off by default.
  3009. This switch decides, whether division or pseudo division is used for sturm chains.
  3010. @rvindex rlanuexpsremseq
  3011. @end defvr
  3012. @defvr {Advanced Switch} rlanuexgcdnormalize
  3013. GCD normalize. This is turned on by default. If turned on, the GCD is
  3014. normalized to 1, if it is a constant polynomial.
  3015. @rvindex rlanuexgcdnormalize
  3016. @end defvr
  3017. @defvr {Advanced Switch} rlanuexsgnopt
  3018. Sign optimization.
  3019. This is turned off by default.
  3020. If turned on, it is tried to determine the sign of a constant polynomial by calculating a containment.
  3021. @rvindex rlanuexsgnopt
  3022. @end defvr
  3023. @subsection Hermitian Quantifier Elimination
  3024. @cindex Hermitian quantifier elimination
  3025. @defun rlhqe formula
  3026. @cindex quantifier elimination
  3027. @cindex Hermitian quantifier elimination
  3028. Hermitian quantifier elimination. Returns a quantifier-free
  3029. equivalent of @var{formula}. Works only in context @sc{ofsf}. There are
  3030. no degree restrictions on @var{formula}.
  3031. @rvindex rlhqe
  3032. @end defun
  3033. @node Generic Quantifier Elimination
  3034. @section Generic Quantifier Elimination
  3035. The following variant of @code{rlqe}
  3036. @rfindex rlqe
  3037. (@pxref{Quantifier Elimination}) enlarges the theory by inequalities,
  3038. i.e., @code{<>}-atomic formulas, wherever this supports the quantifier
  3039. elimination process. For geometric problems,
  3040. @cindex geometric problem
  3041. it has turned out that in most cases the additional assumptions made are
  3042. actually geometric @emph{non-degeneracy conditions}.
  3043. @cindex non-degeneracy conditions
  3044. The method has been described in detail in
  3045. @ifinfo
  3046. @ref{References,[DSW98]}.
  3047. @end ifinfo
  3048. @iftex
  3049. [DSW98].
  3050. @end iftex
  3051. It has also turned out useful for physical problems
  3052. @cindex physical problems
  3053. such as network
  3054. @ifinfo
  3055. analysis, see @ref{References,[Stu97]}.
  3056. @end ifinfo
  3057. @iftex
  3058. analysis [Stu97].
  3059. @cindex network analysis
  3060. @end iftex
  3061. @defun rlgqe formula [@var{theory} [@var{exceptionlist}]]
  3062. @rtindex theory
  3063. @cindex geometric problem
  3064. @cindex generic quantifier elimination
  3065. Generic quantifier elimination. @code{rlgqe} is not available in
  3066. @sc{acfsf}
  3067. @cindex @sc{acfsf}
  3068. and @sc{dvfsf}.
  3069. @cindex @sc{dvfsf}
  3070. @var{exceptionlist} is a list of variables empty by default. Returns a
  3071. list @code{@{th,f@}} such that @code{th} is a superset of @var{theory}
  3072. adding only inequalities, and @code{f} is a quantifier-free formula
  3073. equivalent to @var{formula} assuming @code{th}. The added inequalities
  3074. contain neither bound variables nor variables from @var{exceptionlist}.
  3075. For restrictions and options, compare @code{rlqe} (@pxref{Quantifier
  3076. Elimination}).
  3077. @end defun
  3078. @defun rlgqea formula [@var{theory} [@var{exceptionlist}]]
  3079. @rtindex theory
  3080. @cindex geometric problem
  3081. @cindex generic quantifier elimination
  3082. @cindex answer
  3083. Generic quantifier elimination with answer. @code{rlgqea} is not
  3084. available in @sc{acfsf}
  3085. @cindex @sc{acfsf}
  3086. and @sc{dvfsf}.
  3087. @cindex @sc{dvfsf}
  3088. @var{exceptionlist} is a list of variables empty by default. Returns a
  3089. list consisting of an extended theory
  3090. @cindex theory
  3091. @cindex extend theory
  3092. and an @var{elimination_answer}.
  3093. @rtindex elimination_answer
  3094. Compare @code{rlqea}/@code{rlgqe}
  3095. (@pxref{Quantifier Elimination}).
  3096. @end defun
  3097. After applying generic quantifier elimination the user might feel that
  3098. the result is still too large while the theory is still quite weak. The
  3099. following function @code{rlgentheo}
  3100. @rfindex rlgentheo
  3101. simplifies a formula by making further assumptions.
  3102. @defun rlgentheo theory formula [@var{exceptionlist}]
  3103. @rtindex theory
  3104. @cindex simplification
  3105. @cindex generic quantifier elimination
  3106. @cindex generate theory
  3107. Generate theory. @code{rlgentheo} is not available in @sc{dvfsf}.
  3108. @cindex @sc{dvfsf}
  3109. @var{formula} is a quantifier-free formula; @var{exceptionlist} is a
  3110. list of variables empty by default. @code{rlgentheo} extends
  3111. @var{theory}
  3112. @cindex extend theory
  3113. with inequalities not containing any variables from @var{exceptionlist}
  3114. as long as the simplification result is better wrt.@: this extended
  3115. theory. Returns a list @code{@{}extended @var{theory}, simplified
  3116. @var{formula}@code{@}}.
  3117. @end defun
  3118. @defvr Switch rlqegenct
  3119. @cindex generate theory
  3120. @cindex complexity of terms
  3121. Quantifier elimination generate complex theory.
  3122. @cindex complex theory
  3123. This is on by default, which allows @code{rlgentheo}
  3124. @rfindex rlgentheo
  3125. to assume inequalities over non-monomial terms with the
  3126. generic quantifier elimination.
  3127. @end defvr
  3128. @defun rlgcad formula
  3129. @rtindex theory
  3130. @cindex generic cylindrical algebraic decomposition
  3131. Generic cylindrical algebraic decomposition. @code{rlgcad} is
  3132. available only for @sc{ofsf}.
  3133. Compare @code{rlcad} (@pxref{Quantifier
  3134. Elimination}) and @code{rlgqe} (@pxref{Generic Quantifier
  3135. Elimination}).
  3136. @end defun
  3137. @defun rlghqe formula
  3138. @rtindex theory
  3139. @cindex generic Hermitian quantifier elimination
  3140. Generic Hermitian quantifier elimination. @code{rlghqe} is
  3141. available only for @sc{ofsf}.
  3142. Compare @code{rlhqe} (@pxref{Quantifier
  3143. Elimination}) and @code{rlgqe} (@pxref{Generic Quantifier
  3144. Elimination}).
  3145. @end defun
  3146. @node Local Quantifier Elimination
  3147. @section Local Quantifier Elimination
  3148. In contrast to the generic quantifier elimination
  3149. @rfindex rlgqe
  3150. (@pxref{Generic Quantifier Elimination})
  3151. the following variant of @code{rlqe}
  3152. @rfindex rlqe
  3153. (@pxref{Quantifier Elimination}) enlarges the theory by arbitrary atomic formulas, wherever this supports the quantifier
  3154. elimination process. This is done in such a way that the theory holds
  3155. for the suggested point specified by the user.
  3156. The method has been described in detail in
  3157. @ifinfo
  3158. @ref{References,[DW00]}.
  3159. @end ifinfo
  3160. @iftex
  3161. [DW00].
  3162. @end iftex
  3163. @defun rllqe formula @var{theory} @var{suggestedpoint}
  3164. @rtindex theory
  3165. @cindex local quantifier elimination
  3166. Local quantifier elimination. @code{rllqe} is not available in
  3167. @sc{acfsf}
  3168. @cindex @sc{acfsf}
  3169. and @sc{dvfsf}.
  3170. @cindex @sc{dvfsf}
  3171. @var{suggestedpoint} is a list of equations @code{var=value} where
  3172. @code{var} is a free variable and @code{value} is a rational number.
  3173. Returns a list @code{@{th,f@}} such that @code{th} is a superset of
  3174. @var{theory}, and @code{f} is a quantifier-free formula equivalent to
  3175. @var{formula} assuming @code{th}. The added inequalities contains
  3176. exclusively variables occuring on the left hand sides of equiations in
  3177. @var{suggestedpoint}. For restrictions and options, compare @code{rlqe}
  3178. (@pxref{Quantifier Elimination}).
  3179. @end defun
  3180. @node Linear Optimization
  3181. @section Linear Optimization
  3182. In the context @sc{ofsf},
  3183. @cindex @sc{ofsf}
  3184. there is a linear optimization method implemented, which uses quantifier
  3185. elimination
  3186. @cindex quantifier elimination
  3187. (@pxref{Quantifier Elimination}) encoding the target function by an
  3188. additional constraint
  3189. @cindex constraint
  3190. including a dummy variable. This optimization
  3191. technique has been described in
  3192. @ifinfo
  3193. @ref{References,[Wei94a]}.
  3194. @end ifinfo
  3195. @iftex
  3196. [Wei94a].
  3197. @end iftex
  3198. @defun rlopt constraints target
  3199. @cindex optimization
  3200. @cindex linear optimization
  3201. Linear optimization. @code{rlopt} is available only in @sc{ofsf}.
  3202. @cindex @sc{ofsf}
  3203. @var{constraints} is a list of parameter-free atomic formulas built with
  3204. @code{=}, @code{<=}, or @code{>=}; @var{target} is a polynomial over the
  3205. rationals. @var{target} is minimized subject to @var{constraints}.
  3206. @cindex constraint
  3207. The result is either "@code{infeasible}"
  3208. @cindex @code{infeasible}
  3209. or a two-element list, the first entry of which is the optimal value,
  3210. and the second entry is a list of points---each one given as a
  3211. @var{substitution_list}---where @var{target}
  3212. @rtindex substitution_list
  3213. takes this value. The point
  3214. list does, however, not contain all such points. For unbound problems
  3215. the result is @w{@code{@{-infinity,@{@}@}}.}
  3216. @end defun
  3217. @defvr Switch rlopt1s
  3218. @cindex optimization
  3219. @cindex linear optimization
  3220. @cindex solution
  3221. Optimization one solution. This is off by default. @code{rlopt1s} is
  3222. relevant only for @sc{ofsf}.
  3223. @cindex @sc{ofsf}
  3224. If on, @code{rlopt}
  3225. @rfindex rlopt
  3226. returns at most one solution point.
  3227. @end defvr
  3228. @node References
  3229. @chapter References
  3230. Most of the references listed here are available on
  3231. @center @t{http://www.fmi.uni-passau.de/~redlog/}.
  3232. @table @asis
  3233. @item [CH91]
  3234. George E. Collins and Hoon Hong. Partial cylindrical algebraic decomposition
  3235. for quantifier elimination. @cite{Journal of Symbolic
  3236. Computation}, 12(3):299-328, September 1991.
  3237. @item [Dol99]
  3238. Andreas Dolzmann. Solving Geometric Problems with Real Quantifier
  3239. Elimination. Technical Report MIP-9903, FMI, Universitaet Passau,
  3240. D-94030 Passau, Germany, January 1999.
  3241. @item [DGS98]
  3242. Andreas Dolzmann, Oliver Gloor, and Thomas Sturm. Approaches to parallel
  3243. quantifier elimination. In Oliver Gloor, editor, @cite{Proceedings of
  3244. the 1998 International Symposium on Symbolic and Algebraic Computation
  3245. (ISSAC 98)}, pages 88-95, Rostock, Germany, August 1998. ACM, ACM Press,
  3246. New York.
  3247. @item [DS97]
  3248. Andreas Dolzmann and Thomas Sturm. Simplification of quantifier-free
  3249. formulae over ordered fields. @cite{Journal of Symbolic Computation},
  3250. 24(2):209-231, August 1997.
  3251. @item [DS97a]
  3252. Andreas Dolzmann and Thomas Sturm. Redlog: Computer algebra meets computer
  3253. logic. @cite{ACM SIGSAM Bulletin}, 31(2):2--9, June 1997.
  3254. @item [DS97b]
  3255. Andreas Dolzmann and Thomas Sturm. Guarded expressions in practice. In
  3256. Wolfgang W. Kuechlin, editor, @cite{Proceedings of the 1997
  3257. International Symposium on Symbolic and Algebraic Computation (ISSAC
  3258. 97)}, pages 376--383, New York, July 1997. ACM, ACM Press.
  3259. @item [DS99]
  3260. Andreas Dolzmann and Thomas Sturm. P-adic constraint solving.
  3261. Technical Report MIP-9901, FMI, Universitaet Passau, D-94030
  3262. Passau, Germany, January 1999. To appear in the proceedings of the ISSAC
  3263. 99.
  3264. @item [DSW98]
  3265. Andreas Dolzmann, Thomas Sturm, and Volker Weispfenning. A new approach
  3266. for automatic theorem proving in real geometry. @cite{Journal of
  3267. Automated Reasoning}, 21(3):357-380, December 1998.
  3268. @item [DSW98a]
  3269. Andreas Dolzmann, Thomas Sturm, and Volker Weispfenning. Real quantifier
  3270. elimination in practice. In B. H. Matzat, G.-M. Greuel, and G. Hiss,
  3271. editors, @cite{Algorithmic Algebra and Number Theory}, pages 221-248.
  3272. Springer, Berlin, 1998.
  3273. @item [DW00]
  3274. Andreas Dolzmann and Volker Weispfenning. Local Quantifier Elimination.
  3275. In Carlo Traverso, editor, @cite{Proceedings of the 2000 International
  3276. Symposium on Symbolic and Algebraic Computation (ISSAC 00)}, pages
  3277. 86-94, St Andrews, Scotland, August 2000. ACM, ACM Press, New York.
  3278. @item [LW93]
  3279. Ruediger Loos and Volker Weispfenning. Applying linear quantifier
  3280. elimination. @cite{The Computer Journal}, 36(5):450--462, 1993. Special
  3281. issue on computational quantifier elimination.
  3282. @item [Stu97]
  3283. Thomas Sturm. Reasoning over networks by symbolic methods. Technical
  3284. Report MIP-9719, FMI, Universitaet Passau, D-94030 Passau, Germany,
  3285. December 1997. To appear in AAECC.
  3286. @item [Stu00]
  3287. Thomas Sturm. Linear problems in valued fields. @cite{Journal of Symbolic
  3288. Computation}, 30(2):207-219, August 2000.
  3289. @item [SW97a]
  3290. Thomas Sturm and Volker Weispfenning. Rounding and blending of solids by
  3291. a real elimination method. In Achim Sydow, editor, @cite{Proceedings of
  3292. the 15th IMACS World Congress on Scientific Computation, Modelling, and
  3293. Applied Mathematics (IMACS 97)}, pages 727-732, Berlin, August 1997.
  3294. IMACS, Wissenschaft & Technik Verlag.
  3295. @item [SW98]
  3296. Thomas Sturm and Volker Weispfenning. Computational geometry problems in
  3297. Redlog. In Dongming Wang, editor, @cite{Automated Deduction in
  3298. Geometry}, volume 1360 of Lecture Notes in Artificial Intelligence
  3299. (Subseries of LNCS), pages 58-86, Springer-Verlag Berlin Heidelberg,
  3300. 1998.
  3301. @item [SW98a]
  3302. Thomas Sturm and Volker Weispfenning. An algebraic approach to
  3303. offsetting and blending of solids. Technical Report MIP-9804, FMI,
  3304. Universitaet Passau, D-94030 Passau, Germany, May 1998.
  3305. @item [Wei88]
  3306. Volker Weispfenning. The complexity of linear problems in fields.
  3307. @cite{Journal of Symbolic Computation}, 5(1):3--27, February, 1988.
  3308. @item [Wei92]
  3309. Volker Weispfenning. Comprehensive Groebner Bases.
  3310. @cite{Journal of Symbolic Computation}, 14:1--29, July, 1992.
  3311. @item [Wei94a]
  3312. Volker Weispfenning. Parametric linear and quadratic optimization by
  3313. elimination. Technical Report MIP-9404, FMI, Universitaet Passau,
  3314. D-94030 Passau, Germany, April 1994.
  3315. @item [Wei94b]
  3316. Volker Weispfenning. Quantifier elimination for real algebra---the cubic
  3317. case. In @cite{Proceedings of the International Symposium on Symbolic
  3318. and Algebraic Computation in Oxford}, pages 258--263, New York, July
  3319. 1994. ACM Press.
  3320. @item [Wei95]
  3321. Volker Weispfenning. Solving parametric polynomial equations and
  3322. inequalities by symbolic algorithms. In J. Fleischer et al., editors,
  3323. @cite{Computer Algebra in Science and Engineering}, pages 163-179, World
  3324. Scientific, Singapore, 1995.
  3325. @item [Wei97]
  3326. Volker Weispfenning. Quantifier elimination for real algebra---the
  3327. quadratic case and beyond. @cite{Applicable Algebra in Engineering
  3328. Communication and Computing}, 8(2):85-101, February 1997.
  3329. @item [Wei97a]
  3330. Volker Weispfenning. Simulation and optimization by quantifier
  3331. elimination. @cite{Journal of Symbolic Computation}, 24(2):189-208, August
  3332. 1997.
  3333. @end table
  3334. @node Functions
  3335. @unnumbered Functions
  3336. @menu
  3337. * Documentation of Functions::
  3338. * References to Functions::
  3339. @end menu
  3340. @node Documentation of Functions
  3341. @unnumberedsec Documentation of Functions
  3342. @printindex fn
  3343. @node References to Functions
  3344. @unnumberedsec References to Functions
  3345. @printindex rf
  3346. @node Switches and Variables
  3347. @unnumbered Switches and Variables
  3348. @menu
  3349. * Documentation of Switches and Variables::
  3350. * References to Switches and Variables::
  3351. @end menu
  3352. @node Documentation of Switches and Variables
  3353. @unnumberedsec Documentation of Switches and Variables
  3354. @printindex vr
  3355. @page
  3356. @node References to Switches and Variables
  3357. @unnumberedsec References to Switches and Variables
  3358. @printindex rv
  3359. @node Data Structures
  3360. @unnumbered Data Structures
  3361. @menu
  3362. * Documentation of Data Structures::
  3363. * References to Data Structures::
  3364. @end menu
  3365. @node Documentation of Data Structures
  3366. @unnumberedsec Documentation of Data Structures
  3367. @printindex tp
  3368. @node References to Data Structures
  3369. @unnumberedsec References to Data Structures
  3370. @printindex rt
  3371. @node Index
  3372. @unnumbered Index
  3373. @printindex cp
  3374. @shortcontents
  3375. @contents
  3376. @bye