Interpolation in local theory extensions
In this paper we study interpolation in local extensions of a base theory. We identify situations in which it is possible to obtain interpolants in a hierarchical manner, by using a prover and a procedure for generating interpolants in the base theor…
Authors: Viorica Sofronie-Stokkermans
Logical Methods in Computer Science V ol. 4 (4:1) 2008, pp. 1–31 www .lmcs-online.org Submitted Feb . 11, 2007 Published Oct. 17, 2008 INTERPOLA TION IN LOC AL THEOR Y EXTENSIO NS VIORICA SOFRONIE-STOKKERMAN S Max-Planc k-Institut f ¨ ur Informatik, Campus E1.4, Saarbr ¨ uck en , German y e-mail addr ess : sofronie@mpi-inf.mpg.de Abstra ct. In this pap er w e study in terpolation in lo cal extensions of a base theory . W e identif y situations in which it is p ossible to obtain interpolants in a hierarchica l manner, by using a prov er and a pro cedure fo r generating interpolants in the base theory as b lac k- b o xes. W e presen t s evera l examples of theory extensions in which interpolants can b e computed this wa y , a nd discuss app lications in veri fication, k no wledge representatio n, and mod u lar reasoning in com binations of local theories. 1. Introduction Man y problems in mathematics and computer science can b e reduced to proving satisfiabilit y of conjunctions of (ground ) literals mo d ulo a backg round theory . This theory can b e a standard th eory , the extension of a base theory w ith additional fun ctions, or a com bination of theories. It is therefore v ery imp ortan t to find efficien t method s for reasoning in standard as w ell as complex theories. How ev er, it is often equally i mp ortant to find local causes for inconsistency . In distrib uted databases, for instance, find ing lo cal causes of in consistency can help in lo cating errors. Similarly , in abstraction-based v erification, finding the cause of inconsistency in a counte rexample at th e concrete lev el helps to ru le ou t certain s p urious coun terexamples in the a bstraction. The problem w e address in this p ap er can b e describ ed as follo ws: Let T b e a theory and A and B b e sets of ground clauses in the signature of T , p ossibly with additional constan ts. Assume that A ∧ B is inconsisten t with resp ect to T . Can we fi nd a ground form ula I , co n taining on ly constan ts and function sym b ols common to A and B , su c h that I is a consequence of A w ith resp ect to T , and B ∧ I is inconsisten t mo d ulo T ? If so, I is a (Cr aig) interp olant of A and B , and can b e r egarded as a “lo cal” explanation for th e inconsistency of A ∧ B . In this p ap er w e study p ossibilities of obtaining groun d interp olan ts in theory exten- sions. W e iden tify situations in wh ic h it is p ossible to do this in a hierarc hical manner, b y using a p ro v er and a pro cedu re for generating in terp olan ts in the b ase theory as “b lack- b o xes”. 1998 ACM Subje ct Cl assific ation: F.4.1, I.2.3, D.2.4, F.3.1, I.2.4. Key wor ds and phr ases: Logic, Interpolation, Complex theories, V erification, Knowl edge represen tation. LOGICAL METHODS l IN COMPUTER SCIENCE DOI:10.216 8/LMCS-4 (4:1) 2008 c V . Sofronie- Stokkermans CC Crea tive Comm ons 2 V. SOFRONIE-STOKKERMANS W e consider a sp ecial typ e of extensions of a b ase theory – namely lo cal theory ex- tensions – w h ic h we studied in [15 ]. W e sho w ed that in this case hierarchica l reasoning is p ossible. i.e. pro of tasks in the extension can b e reduced to pro of t asks in th e b ase theory . Here we study p ossibilities of h ierarc h ical interp olan t generation in lo cal theory extensions. The ma in c on tributions of the pap er are summarized b elo w: • Firs t, we identify n ew examples of lo cal theory extensions. • S econd, w e presen t a metho d for generating in terp olan ts in lo cal extensions of a base theory . Th e me tho d is general, in the se nse that it c an b e applied to an ext ension T 1 of a t heory T 0 pro vided th at: (i) T 0 is conv ex; (ii) T 0 is P -in terp olating f or a sp ecified s et P of pr ed icates (cf. the definition in Sec- tion 5 .2); (iii) in T 0 ev er y inconsisten t conjun ction of ground clauses A ∧ B allo ws a groun d in ter- p olan t; (iv) the extension is defined by clauses o f a sp ecial form (t yp e (5. 1) in Section 5.2). The method is hier ar chic al : the problem of finding in terp olan ts in T 1 is reduced to th at of finding in terp olants in th e base theo ry T 0 . W e can use the prop erties of T 0 to con trol the form of in terp olan ts in the ext ension T 1 . • T hird, we identify examples of theory extensions with prop erties (i)–(iv). • F our th, we d iscuss app licatio n domains such as: mo du lar reasoning in combinations of lo cal theories (charac terization of the t yp e of information w hic h needs to be exc hanged), reasoning in distributed data bases, and v erification. The existence of ground in terp olan ts has b een studied in sev eral r ecen t pap ers, mainly motiv ated by abstraction-refinemen t based verificatio n [7, 8, 9, 19, 6]. In [8] McMillan present s a metho d for generating groun d interpolants from proofs in an extension of linear rational a rithmetic with uninte rpreted fun ction sym b ols. T he use of free function sym b ols is sometimes to o coarse (cf. the example in Section 2.2). Here, w e sho w that similar results also hold for other t yp es of e xtensions of a base theory , pro vided that the base theory h as some of the prop erties of linear rational arith m etic. Another metho d for generating inte rp olant s for com b inations of th eories ov er disjoin t signatures fr om Nelson-Opp en-st yle unsatisfiabilit y pro ofs w as prop osed b y Y orsh and Musuv athi in [19]. Although we imp ose similar conditions on T 0 , our metho d is orthogonal to theirs, as it can also handle com binations of theories o ver non-disjoint signatures. In [6] a different in terp olation prop ert y – stronger than the prop erty und er consideration in this pap er – is stud ied, n amely the existence of ground in terp olan ts for arbitr ary formulae – whic h is pro ve d to b e equiv alent to the theory having quan tifier elimination. This limits the app licabilit y of the r esults in [6] to situations in wh ic h the inv olv ed theories allo w quantifier elimination. If th e theory considered has qu an tifier elimination then we can use this for obtaining grou n d in terp olan ts for arb itrary formulae . The goal of our pap er is to iden tify th eories – p ossibly without quant ifier elimination – in whic h, n evertheless, g round interp olan ts for ground formulae exist. Structur e of the p ap er: W e start by p ro viding motiv ation for the study in Section 2. In Section 3 the basic notions needed in the pap er are in trod uced. S ection 4 con tains r esults on local theory extensions. In Section 5 lo cal extensions allo wing hierarc hical int erp ola- tion are iden tified, and b ased on this, in Sectio n 6 a pro cedure for c omputing in terp olan ts hierarc hically is give n. In Section 7 applications to mo dular r easoning in combinatio ns of INTERPOLA TION I N LOC A L THEOR Y EXTENSIONS 3 theories, reasoning in complex databases, and verificatio n are p resen ted. In S ection 8 we dra w conclusions, discuss the relationship with existing work, an d sket c h some plans for future w ork. F or the sak e of c larit y in presen tatio n, all the proofs that a re not d irectly re- lated to the main thread of the pap er can b e found in the app end ix. (These r esults concern illustrations of the fact that certain theory extensions are lo cal, or satisfy assum ptions that guaran tee th at interp olan ts can b e computed hierarchical ly .) 2. M otiv a tion In this section w e present t w o fi elds of applications in which it is imp ortant to efficientl y compute in terp olants: kno wledge represen tation and verificat ion. 2.1. Knowledge representation. Consider a simp le (and fault y) terminological d ata- base for c hemistry , consisting of t wo extensions of a common kernel Chem (basic c hem- istry): A Chem (inorganic (anorganic) c h emistry) and BioC hem (bio chemistry). Assume that Chem con tains a set C 0 = { process , reaction , substa nce , o rganic , ino rganic } of concepts and a set Γ 0 of co nstrain ts: Γ 0 = { o rganic ∧ inorg anic = ∅ , org anic ⊆ substance , i no rgani c ⊆ substance } . Let A Chem b e an extension of Chem with co ncepts C 1 = { cat - o xydation , o xydation } , a rˆ ole R 1 = { catalyzes } , t erminology T 1 and c onstrain ts Γ 1 : T 1 = { cat - o xyda tion = substance ∧ ∃ catalyzes ( o xydation ) } Γ 1 = { reaction ⊆ o xydation , cat - oxydation ⊆ inorganic , cat - o xydation 6 = ∅} . Let BioCh em b e an extension of Che m with the concept C 2 = { enzyme } , the r ˆ ole s R 2 = { p ro d u ces , cat a lyzes } , termin ology T 2 and c onstrain ts Γ 2 : T 2 = { reaction = p rocess ∧ ∃ produces ( substance ) , enzyme = o rganic ∧ ∃ catal y z es ( reaction ) } Γ 2 = { enzyme 6 = ∅ } . The c om b ination of Ch em , AChem and BioChem is inconsisten t (w e w r ongly a dded to Γ 1 the constraint reaction ⊆ o xydation in stead of oxydation ⊆ reaction ). This can b e pr o ved as follo ws: B y resu lts in [14] (p.156 and p .166) the combination of Chem , AChem and BioChem is inconsisten t i f an d only if Γ 0 ∧ ( T 1 ∧ Γ 1 ) ∧ ( T 2 ∧ Γ 2 ) | = T ⊥ (2.1) where T is the exte nsion S Lat ∧ S f ∈ R 1 ∪ R 2 Mon ( f ) of the theory of semilattices with smallest elemen t 0 and monotone fu nction symb ols corresp on d ing to ∃ r for eac h r ˆ ole r ∈ R 1 ∪ R 2 . Using, for instance, the hierarchica l calculus presented in [15] (see also Section 4), the con tr adiction can b e found in p olynomial time. In ord er to find the mistak e we lo ok for an explanation for the inconsistency in the co mmon language of AChem and BioChem . (Common to AChem and BioChem a re the concepts substance , org anic , ino rganic , reacti on and the rˆ ole catalyzes .) This can b e foun d by computing an in terp olan t for the conju n ction in (2.1 ) in the theory of semilattice s with monotone op erators. In this pap er we sho w ho w suc h in terp olant s can b e foun d in an efficie n t w a y . Th e metho d is illustrated on the example ab o v e in Sectio n 7.2. 4 V. SOFRONIE-STOKKERMANS 2.2. V erification. In [8 ], McMillan p rop osed a metho d for abstraction-based v erification in w h ic h int erp olation (e.g. f or linear arithmetic + free f u nctions) is used f or abstraction refinement. The idea is the follo wing: Starting from a concrete, precise description of a (p ossibly infi nite-state) system one can obtain a finite abstraction, by merging the states in to equiv alence classes. A transition exists b et w een t w o abstract states if there exists a transition in the concrete s y s tems b et w een representa tiv es in the corresp onding equiv alence classes. Literals describing the relationships b et ween the state v ariables at the concrete le v el are repr esen ted – at the abstr act lev el – by predicates on th e abstract states (equiv alence classes of concrete states). Classical metho ds (e.g. BDD-based metho ds) can b e used for c h ec king w hether th er e is a path in the abstract m o del from an initial state to an u n safe state. W e distinguish th e follo win g case s: (1) No unsafe state is reac h able from an initial state in the abstract mo del. Then, due to the w a y transitions are defin ed in the a bstraction, this is the case also at the co ncrete lev el. Hence, the concrete system is guaran teed to b e safe. (2) There exists a path in th e abstract mo del from an initial state to an un safe state. This path ma y or may not ha v e a corresp ondent at the concrete leve l. In ord er to c hec k this, w e analyse the coun terpart of the coun terexample in the concrete mo del. This can b e reduced to testing the satisfiabilit y of a set of constraint s: Init ( s 0 ) ∧ T r ( s 0 , s 1 ) ∧ · · · ∧ T r ( s n − 1 , s n ) ∧ ¬ Safe ( s n ) (2.1) If the set of constrain ts is satisfiable then an unsafe state is r eac hed from the initial stat e a lso in the co ncrete system. Thus, the c oncrete system is not safe. (2.2) If th e set of constrain ts is un satisfiable, then the coun terexample obtained due to the abstraction w as spur ious. This means th at the abstraction w as to o coarse. In o rder to refine it w e need to take in to accoun t n ew pr edicates o r relatio nships b et w een the existing p redicates. I n terp olan ts pro vide inf ormation ab out w h ic h new predicate s need to be used for refining the abstraction. W e illustr ate these ideas b elo w. Consider a w ater lev el con troller mo deled as follo ws: Changes in the wa ter lev el by inflo w/outflo w are r epresen ted as functions in , out , d ep end- ing on time t and wat er lev el L . Ala rm and o v erfl o w lev els L alarm L alarm L > L alarm t:= h(t) L:= in(out(L, g(t)−t), h(t)−t) L:= in(L, k(t)−t) t:= k(t) • If L ≥ L alarm then a v alv e is op ened un til time g ( t ), time c hanges to t ′ := h ( t ) and the water lev el to L ′ := in ( o ut ( L, g ( t ) − t ) , h ( t ) − t ). • If L < L alarm then t he v alve is close d; time c hanges to t ′ := k ( t ), and t he w ater lev el to L ′ := in ( L, k ( t ) − t ). W e imp ose restrictions K on h, g , k and o n in and o ut : ∀ t (0 ≤ δ t ≤ g ( t ) − t ≤ h ( t ) − t ≤ ∆ t ) ∀ t (0 ≤ k ( t ) − t ≤ ∆ t ) ∀ L, t ( L < L alarm ∧ 0 ≤ t ≤ ∆ t → in ( L, t ) < L overflo w ) ∀ L, t ( L < L overflo w ∧ t ≥ δ t → out ( L, t ) < L alarm ) . W e w ant to sho w that if initially L < L alarm then t he w ater leve l alw a ys remains b elo w L overflo w . INTERPOLA TION I N LOC A L THEOR Y EXTENSIONS 5 W e start with an abstraction in which the predicates are: p : L < L alarm r 1 : t ′ ≈ k ( t ) r 2 : t ′′ 1 ≈ g ( t ′ ) r 3 : t ′′ 2 ≈ h ( t ′ ) p 1 : L ′ ≈ in ( L, t ′ − t ) p 2 : L ′ ≥ L alarm p 3 : L ′′ ≈ in ( out ( L ′ , t ′′ 1 − t ′ ) , t ′′ 2 − t ′ ) q : ¬ L ′′ < L overflo w and n o other relations b et w een these p redicates are sp ecified. W e can, for instance, use finite m o del c hec king for the finite abstraction obtained this w ay . Note for instance that p ∧ p 1 ∧ p 2 ∧ p 3 ∧ r 1 ∧ r 2 ∧ r 3 ∧ q is sa tisfiable, i.e. in the abstract mo del there exists a path (of length 2) from the initial state to an unsafe state. W e analyze the corresp onding path in the concrete mo del to s ee if this coun terexample to safet y is sp urious, i.e. w e c heck whether there exist l , l ′ , l ′′ , t, t ′ , t ′′ 1 , t ′′ 2 ∈ R suc h that the co njunction: G = l L alarm ∧ e 1 2 ≈ t ′′ 1 − t ′ ∧ e 2 2 ≈ t ′′ 2 − t ′ ∧ (0 ≤ δ t ≤ t ′′ 1 − t ′ ≤ t ′′ 2 − t ′ ≤ ∆ t ) ∧ ¬ l ′′ < L overflo w ∧ ¬ c 1 2 < L alarm ∧ ¬ l ′ < L overflo w . The i n terp olan t f or A ′ 0 ∧ B ′ 0 is l ′ < L overflo w , whic h is also an inte rp olant for A ∧ B . 24 V. SOFRONIE-STOKKERMANS The abstraction d efined in Section 2.2 can then b e refin ed b y introd ucing another pr ed icate L ′ < L overflo w . 8. Conclus ions W e presen ted a metho d for obta ining simp le in terp olan ts in th eory extensions. W e iden tified situations in whic h it is possib le to do this in a hierarc hical manner, b y using a pro v er and a pro cedure for generat ing inte rp olant s in the base theory a s “blac k-b o xes”. This allo ws us to use the prop erties of T 0 (e.g. the form of inte rp olant s) to con trol the form of inte rp olan ts in the extension T 1 . W e discus s ed applications of in terp olatio n in verificatio n and knowledge represent ation. The metho d we present ed can b e applied to a class of th eories which is more general than that c onsidered in McMillan [8] (extension of linear rational arithmetic with u nin terpreted function symb ols). Our metho d is orthogonal to the metho d for generating inte rp olant s for com b inations of th eories ov er disjoin t signatures fr om Nelson-Opp en-st yle unsatisfiabilit y pro ofs p rop osed b y Y orsh and Mus u v athi in [19], as it allo ws us to consider com b inations of theo ries o v er non-disjoin t signatures. The h ierarc h ical interp olation method pr esented here w as in particular used for effi- cien tly computing interpolants in the sp ecial case of th e extension of linear arithmetic with free fu nction symbols in [11]; the algorithm w e used in that pap er ( on which an implemen- tation is based) differs a b it from t he one presen ted here in b eing tuned to the constrained based app roac h us ed in [11]. The implemen tation was integ rated in to the p redicate dis- co very pr o cedure of the soft ware v erification to ols Blas t [4] and ARMC [10]. First tests suggest that th e p erformance of our metho d is of th e same order of magnitude as the m eth- o ds w hic h construct in terp olan ts from pro ofs, and considerably faster on many examples. I n addition, our metho d can h andle systems which p ose problems to other in terp olation-based pro v ers: we can hand le problems cont aining b oth strict and nons tr ict inequalities, and it allo ws us to v erify examples that r equ ire predicates o v er up to fou r v ariables. Details ab out the implemen tation and b enc h marks for th e sp ecial case of linear arithmetic + fr ee function sym b ols are describ ed in [11]. Although the metho d we presented here is based on a hierarc hical reduction of pr o of tasks in a lo cal extension of a given theory T 0 to pro of tasks in T 0 , the resu lts presented in S ection 5 (in particular the separation tec h n ique describ ed in Prop osition 5.7) and in Section 6 also h old for non-purifi ed form ulae (i.e. they also hold if we do not p erform the step of in tro du cing new constan t n ames c f ( d ) for the ground terms f ( d ) whic h occur in the problem or dur ing the separatio n pro cess). Depend ing on the prop erties of T 0 , tec h niques for reasoning and in terp olan t generation in the extension of T 0 with free function sym b ols e.g. within state of the art SMT solv ers can then b e used. W e can, therefore, u se the results in Sect ions 5 and 6 to extend in a natural w a y existing metho ds for inte rp olan t computatio n whic h tak e adv antag e of state of the art SMT technolog y (cf. e.g. [3 ]) to the m ore complex t y p es o f theory extensions with sets of axioms of t yp e (5.1) we considered here. An imm ed iate application of our metho d is to v erification b y abstraction-refinement; there are other p otenti al applications (e.g. goal- directed o v erapp ro ximatio n for ac h ieving faster termination, or automatic inv ariant generation) wh ich w e would like to study . W e w ould a lso lik e to a nalyze in more detai l the app lications to reasoning in complex kno wledge bases. INTERPOLA TION I N LOC A L THEOR Y EXTENSIONS 25 Ac knowledgemen ts. I thank Andrey Rybalc henk o for interesti ng discussions. I thank the referees for h elpful c ommen ts. This w ork w as p artly sup p orted b y the German Researc h C ouncil (DF G) as part of the T ransregional Collaborativ e Researc h Cent er “Automat ic V erification and Analysis of Com- plex S ystems” ( SFB/TR 14 A V A CS). See www.av acs.org for more i nformation. Referen ces [1] F. Baader and S. Ghilardi. Connecting many-sorted theories. In R. Nieuw enhuis, editor, 20th Interna- tional Confer enc e on Automate d De duction (CADE-20), LNAI 3632 , pages 278–29 4. Springer, 2005. [2] P .D. Bacsic h. Amalgamation properties and interpolation theorem for equ ational theories. Algeb r a Uni- versalis , 5:45–55 , 1975. [3] A. Cimatti, A. Griggio, and R. Sebastiani. Efficient Interp olan t generation in satisfiabilit y mo dulo theories. In T ACAS’2008: T o ols and Algorithms for the Construction and Analysis of Syst ems, LNC S 4963 , pages 397–4 12, S pringer, 2008. [4] T. A. H enzinger, R. Jhala, R. Ma jumdar, and K. L. McMillan. Abstractions from pro ofs. In POPL’2004: Principles of Pr o gr amming L anguages , p ages 232–244. ACM Press, 2004. [5] B J´ onsson. Ex t ensions of relational struct u res. In J.W. Addison, L. H enkin, and A. T arski, editors, The The ory of Mo dels, Pr o c. of the 1963 Symp osium at Berkeley , pages 146–157, Amsterdam, 1965. North-Holland. [6] D. Kapur, R. Ma jumd ar, C. Zarba. I nterp olation for data structures. I n Pr o c. 14th ACM SIGSOFT International Symp osium on F oundations of Softwar e Engine ering , p ages 105–11 6, ACM 2006 . [7] K.L. McMillan. Interpolation and SA T-based model c h ec king. I n CA V’2003: Computer Aide d V erific a- tion, LNCS 2725 , pages 1–13. Springer, 2003. [8] K.L. McMill an. An interpolating th eorem pro ver . In T ACAS’2004: T o ols and Algorithms for the Con- struction and Analysis of Systems, LNCS 2988 , pages 16–30. Springer, 2004. [9] K.L. McMillan. Applications of Craig interpolants in mo del chec king. I n T ACAS’2005: T o ols and A l- gorithms for the C onstruct ion and Analysis of Systems, LNCS 3440 , pages 1–12. Springer, 2005. [10] A . P odelski and A. Rybalchenk o. ARMC: the logical choice for sof tw are model c hec king with abstraction refinement. In P ADL’2007: Pr actic al Asp e cts of De clar ative L anguages, LNCS 4354 , pages 245–259 , Springer, 2007. [11] A . Rybalchenko and V . S ofronie-Stokkermans. Constraints for in terp olation. Constraint solving for interpolation. In B. Co ok and A . P odelski, editors, Pr o c e e dings of the 8th International Confer enc e on V erific ation, Mo del Che cking and Abs tr act Interpr etation (VMCAI 2007), LNCS 4349 , p ages 346–362, Springer V erlag, 2007. [12] V . Sofronie-Stokkerma ns. On the univ ersal theory of v arieties o f distributive la ttices with operators: Some decidability and complexity results. In H. Ganzinger, editor, Pr o c e e di ngs of CADE-16, LNAI 1632 , pages 157–1 71, S pringer V erlag, 1999. [13] V . Sofronie-Stokkermans. Resolution-based decision procedures f or th e universal theory of some classes of distributive lattices with op erators. Journal of Symb olic Computation , 36(6):891 –924, 2003. [14] V . Sofronie-Stokkermans. Automated theorem proving b y resolution in non-classical logics. In 4th Int. Conf. Journe es de l’Informatique M essine: K now le dge Disc overy and Discr ete Math ematics (JIM-03) , pages 151–1 67, 2003. [15] V . Sofronie-Stokkermans. H ierarc hic reasoning in local theory exten sions. In R . Nieuw enhuis, edi- tor, 2 0th I nternational Confer enc e on A utomate d De duction (CADE-20) , LNAI 3632 , pages 219–234. Springer, 2005. [16] V . Sofronie-Stokkermans. H ierarchical and Modular Reasoning in Complex Theories: The Case of Local Theory Extensions. In B. Konev and F. W olter, editors, F r ontiers of Combining Systems, 6th International Symp osium, (F r oCoS 2007), LNC S 4720 , pages 47–71, Springer, 2007. [17] V . Sofronie-Stokkermans and C. Ih lemann. Automated reasoning in some l ocal extensions of ordered structures. Pr o c e e dings of I SMVL 2007 , IEEE Computer Society , 2007. [18] A . W ro ´ nski. On a form of eq uational interp olation prop erty . I n F oundations of l o gic and linguistics (Salzbur g, 1983) , pages 23–29, New Y ork, 198 5. Plenum. 26 V. SOFRONIE-STOKKERMANS [19] G. Y orsh a nd M. Musuva thi. A combination method for generating interpolants. In R. Nieu w enhuis, editor, 20th Inter national Confer enc e on Automate d De duction (CADE-20), LNAI 3632 , pages 353–368. Springer, 2005. Appendix A. Amal gama t ion and inte rpola tion There exist resu lts whic h relate ground in terp olation to amalg amation or t he injection transfer pr op ert y [5, 2, 18] and thus allo w us to rec ognize man y th eories with ground in terp olation. If Π = (Σ , Pred ) is a signature and A , B are Π- structures, w e sa y that: • a map h : A ֒ → B is a homom orphism if it p reserv es th e truth of p ositiv e literals, i.e. has the pr op ert y that if f A ( a 1 , . . . , a n ) = a th en f B ( h ( a 1 ) , . . . , h ( a n )) = h ( a ), and if P A ( a 1 , . . . , a n ) is true th en P B ( h ( a 1 ) , . . . , h ( a n )) i s true. • a map i : A ֒ → B is an emb e dding if it preserv es the truth of b oth p ositiv e and n egativ e literals, i.e. P A ( a 1 , . . . , a n ) is true (in A ) if and only if P B ( i ( a 1 ) , . . . , i ( a n )) is true (in B ) for an y pr edicate symbol, including equalit y . Th us, an em b edding is an in j ectiv e homomorphism whic h also p r eserv es the truth of negativ e literals. Definition A.1. Let Π = (Σ , Pred ) be a signature, and let M b e a c lass of Π-structures. (1) W e sa y that M has the amalgamation pr op erty (AP) if for any A , B 1 , B 2 ∈ M and an y em b eddings i 1 : A ֒ → B 1 and i 2 : A ֒ → B 2 there exists a stru cture C ∈ M and em b eddings j 1 : B 1 ֒ → C and j 2 : B 2 ֒ → C suc h that j 1 ◦ i 1 = j 2 ◦ i 2 . (2) M has the inje ction tr ansfer pr op erty (IT P ) if for an y A , B 1 , B 2 ∈ M , any em b edding i 1 : A ֒ → B 1 and any homomorphism f 2 : A → B 2 there exists a stru cture C ∈ M , a homomorphism f 1 : B 1 → C and an em b edding j 2 : B 2 ֒ → C such that f 1 ◦ i 1 = j 2 ◦ f 2 . Definition A.2. An equational theory T (in signature Π = (Σ , Pred ) where Pred = {≈} ) has th e e quational interp olation pr op erty if whenev er ^ i A i ( a, c ) ∧ ^ j B j ( c, b ) ∧ ¬ B ( c, b ) | = T ⊥ , where A i , B j and B are ground atoms, there exists a conjun ction I ( c ) of ground atoms con taining only the constant s c o ccurring b oth in V i A i ( a, c ) and V j B j ( c, b ) ∧ ¬ B ( c, b ), suc h that V i A i ( a, c ) | = T I ( c ) and I ( c ) ∧ V j B j ( c, b ) | = T B ( c, b ) Theorem A.3 ([5, 2, 18]) . L et T b e a universal the ory. Then: (1) T has gr ound interp olation if and only if Mo d ( T ) has (AP ) [2] . In addition, we c an guar ante e that if φ is p ositive then the interp olant of φ ∧ ψ is p ositive if and only if Mo d ( T ) has the inj e ction tr ansfer pr op e rty [2 ] . (2) If T is an e quational the ory, then T ha s the e q uational interp olation pr op erty if and only if Mo d ( T ) has the inje ction tr ansfer pr op erty [18] . Theorem A.3 can b e used to pro v e th at man y equational th eories ha v e ground in terp olation: Theorem A.4. The fol lowing the ories al low gr ound interp olation 7 : (1) The the ory of pur e e quality (without function symb ols). 7 In fact, the theorie s (1) and (4) allo w eq uational in terpolation. Similar results w ere also established for (2) in [11]. INTERPOLA TION I N LOC A L THEOR Y EXTENSIONS 27 (2) Line ar r ational and r e al arithmetic. (3) The the ory of p osets. (4) The the ories of (a) Bo ole an algebr as, (b) semilattic es, (c) distributive lattic es. Pro of. (1), (2), (3) are well- kno wn (for (2) w e refer for instance to [8] or [19]). F or proving (4) we use the fact that if a u n iv ersal theory h as a p ositiv e algebraic completion th en it has the injecti on transfer prop ert y [1]. All theories in (4) are e quational theories; b y results in [18], for equational th eories the injection tr ansfer p rop ert y is equiv alen t to the equational in terp olation prop ert y . With these remarks, (4)(a) follo ws f r om th e fact t hat an y Gaussian theory is its o w n p ositiv e algebraic completion [1], and (4)(b),(c ) from the fact that the theory of semilattices and th at of distributiv e lattice s ha v e a p ositive algebraic completion [1]. Similarly it can be p ro v ed that the equational cla sses of (ab elian) groups and la ttices ha ve ground interp olation. Appendix B. Proof of Theor em 4.6 Theorem 4.6 We c onsider the fol lowing b ase the ories T 0 : (1) P (p osets), (2) T O (total ly-or der e d sets), (3) SLat (semilattic es), (4) DLat (distributive lattic es), (5) Bo ol (Bo ole an algebr as). (6) the the ory R of r e als r esp. LI ( R ) (line ar arithmetic over R ), or th e the ory Q of r ationa ls r esp. LI ( Q ) (line ar arithmetic over Q ), or (a subthe ory of ) the the ory of inte gers (e.g. Pr esbur ger arithmetic). The fol lowing the ory extensions ar e lo c al: (a) Extensions of any the ory T 0 for which ≤ is r eflexive with fu nctions satisfying b ounde d- ness ( Bound t ( f )) or gu ar de d b ounde dness ( GBound t ( f )) c onditions ( Bound t ( f )) ∀ x 1 , . . . , x n ( f ( x 1 , . . . , x n ) ≤ t ( x 1 , . . . , x n )) ( GBound t ( f )) ∀ x 1 , . . . , x n ( φ ( x 1 , . . . , x n ) → f ( x 1 , . . . , x n ) ≤ t ( x 1 , . . . , x n )) , wher e t ( x 1 , . . . , x n ) is a term in the b ase si g natur e Π 0 and φ ( x 1 , . . . , x n ) a c onjunction of liter als in the signatur e Π 0 , whose variables ar e in { x 1 , . . . , x n } . (b) Extensions of any the ory T 0 in (1)–(6) with Mon ( f ) ∧ Bound t ( f ) , if t ( x 1 , . . . , x n ) is a term in the b ase signatur e Π 0 in the variables x 1 , . . . , x n such that for every mo del of T 0 the asso c i ate d fu nc tion i s monotone in the variables x 1 , . . . , x n . (c) Extensions of any the ory in (1)–(6) with functions satisfying Leq ( f , g ) ∧ Mon ( f ) . ( Leq ( f , g )) ∀ x 1 , . . . , x n ( V n i =1 x i ≤ y i → f ( x 1 , . . . , x n ) ≤ g ( y 1 , . . . , y n )) (d) Extensions of any tota l ly-or der e d the ory ab ove (i.e. (2 ) and (6)) with functions satisfying SGc ( f , g 1 , . . . , g n ) ∧ Mon ( f , g 1 , . . . , g n ) . ( SGc ( f , g 1 , . . . , g n )) ∀ x 1 , . . . , x n , x ( V n i =1 x i ≤ g i ( x ) → f ( x 1 , . . . , x n ) ≤ x ) (e) Extensions of any the ory in (1)–(3) with functions satisfying SGc ( f , g 1 ) ∧ Mon ( f , g 1 ) . Al l the extensions ab ove satisfy c onditio n ( Lo c f ) . 28 V. SOFRONIE-STOKKERMANS Pro of. In what follo ws we will denote by Π 0 the signature o f the base th eory T 0 , and with Σ 1 the extension fu n ctions, namely f f or cases (a) and (b), f , g for case (c), f , g 1 , . . . , g n for case (d) and f , g 1 for case (e). (a) Let ( P , f P ) b e a partial Π-structur e which wea kly satisfies Bound t ( f ), su c h that P ∈ Mo d ( T 0 ) and f P : P n → P is partial. Let A = ( P , f A ) b e a total Π-structure with the same supp ort as P , where: f A ( x 1 , . . . , x n ) = f P ( x 1 , . . . , x n ) if f P ( x 1 , . . . , x n ) defi n ed t ( x 1 , . . . , x n ) otherw ise . Then A satisfies B ound t ( f ). Let i : ( P , f P ) → ( A, f A ) b e the identit y . Obvio usly , i is a Π 0 -isomorphism; and if f P ( x 1 , . . . , x n ) is defined then i ( f P ( x 1 , . . . , x n )) = f P ( x 1 , . . . , x n ) = f A ( x 1 , . . . , x n ). Similar argumen ts also apply to GBound t ( f ). (b) Let ( P , f P ) be a partial Π-structure whic h w eakly satisfies Bound t ( f ) ∧ Mon , suc h that P ∈ M o d ( T 0 ) an d f P : P n → P is partial. In cases (1)–(3) let A = ( O I ( P ) , f ), where O I ( P ) is the family of al l order ideals of P , a nd f A ( U 1 , . . . , U n ) = ↓{ f P ( u 1 , . . . , u i ) | u i ∈ U i , f P ( u 1 , . . . , u n ) defined } . f A is cle arly monotone. L et z ∈ f A ( U 1 , . . . , U n ). T hen z ≤ f P ( u 1 , . . . , u n ) for some u i ∈ U i with f P ( u 1 , . . . , u n ) defin ed . As P | = w Bound t ( f ), f P ( u 1 , . . . , u n ) ≤ t ( u 1 , . . . , u n ). Therefore z ∈ t ( U 1 , . . . , U n ). The map i : ( P, f P ) → ( A, f A ) defined b y i ( p ) = ↓ p is a w eak em b ed ding. Since DLa t and B o ol are lo cally finite, results in [15] sh o w that in (4) and (5) it is sufficien t t o a ssume that P is finite. Let A = ( P , f A ), where f A ( x 1 , . . . , x n ) = _ { f P ( u 1 , . . . , u n ) | u i ≤ x i , f P ( u 1 , . . . , u n ) defined } . f A is clearly monotone. W e p ro v e that it also s atisfies the b ound edness condition, i.e. that for all x 1 , . . . , x n , f A ( x 1 , . . . x n ) ≤ t ( x 1 , . . . , x n ). By definition, f A ( x 1 , . . . , x n ) = W { f P ( u 1 , . . . , u n ) | u i ≤ x i , f P ( u 1 , . . . , u n ) defi n ed } . As P | = w Bound t ( f ) and t is mono- tone, we know that f P ( u 1 , . . . , u n ) ≤ t ( u 1 , . . . , u n ) ≤ t ( x 1 , . . . , x n ) for all u i ≤ x i with f P ( u 1 , . . . , u n ) defined. T herefore, f A ( x 1 , . . . , x n ) = _ { f P ( u 1 , . . . , u n ) | u i ≤ x i , f P ( u 1 , . . . , u n ) defi n ed } ≤ t ( x 1 , . . . , x n ) . That th e iden tit y i is a w eak em b edding can b e pro ve d a s b efore. (c) The pr o of is v ery similar to the pro of of (b). W e fi rst discu ss the case (1)– (3). Let ( P , f P , g P ) b e a weak partial m o del of T 1 . Let A = ( O I ( P ) , f A , g A ), where f A is defined as in (b ). W e define g ( U 1 , . . . , U n ) by g A ( U 1 , . . . , U n ) = ↓ g P ( x 1 , . . . , x n ) if U i = ↓ x i and g P ( x 1 , . . . , x n ) defined f A ( U 1 , . . . , U n ) otherwise . Assume that U 1 ⊆ V 1 , . . . , U n ⊆ V n , and let z ∈ f A ( U 1 , . . . , U n ). Then z ≤ f P ( u 1 , . . . , u n ) for some u i ∈ U i ⊆ V i with f P ( u 1 , . . . , u n ) defined. If V i = ↓ x i and g P ( x 1 , . . . , x n ) defined, then u i ≤ x i so, as P | = w Leq ( f , g ), we kno w that f P ( u 1 , . . . , u n ) ≤ g P ( x 1 , . . . , x n ). It th erefore follo ws that in this case z ∈ ↓ g P ( x 1 , . . . , x n ) = g A ( V 1 , . . . , V n ). Otherwise, g A ( V 1 , . . . , V n ) = f A ( V 1 , . . . , V n ), hence f A ( U 1 , . . . , U n ) ⊆ g A ( V 1 , . . . , V n ). INTERPOLA TION I N LOC A L THEOR Y EXTENSIONS 29 F or the cases (4) and (5) we again us e th e criterion in [15] and Theorem 4.5. Let ( P , f P , g P ) b e a w eak p artial mo del of T 1 . Let a 0 ∈ P b e such that a 0 ≥ f P ( p 1 , . . . , p n ) whenev er f P ( p 1 , . . . , p n ) is defined. W e define A = ( P , f A , g A ) as follo ws: g A ( x 1 , . . . , x n ) = ( ↓ g P ( x 1 , . . . , x n ) if g P ( x 1 , . . . , x n ) defined a 0 otherwise f A ( x 1 , . . . , x n ) = _ { f P ( u 1 , . . . , u n ) | u i ≤ x i , f P ( u 1 , . . . , u n ) defined } . f is ob viously monotone. In order to prov e that the second condition holds, w e analyze t wo cases. Assume fir st that g P ( y 1 , . . . , y n ) is u ndefined. Then g A ( y 1 , . . . , y n ) = a 0 ≥ f P ( u 1 , . . . , u n ) for all u i ≤ x i with f P ( u 1 , . . . , u n ) defin ed , thus, g A ( y 1 , . . . , y n ) = a 0 ≥ W { f P ( u 1 , . . . , u n ) | u i ≤ x i , f P ( u 1 , . . . , u n ) defined } = f A ( x 1 , . . . , x n ). If g P ( y 1 , . . . , y n ) is defined, then for all u i ≤ x i with f P ( u 1 , . . . , u n ) w e also ha ve u i ≤ y i , so f P ( u 1 , . . . , u n ) ≤ g P ( y 1 , . . . , y n ) = g A ( y 1 , . . . , y n ). Again, it follo ws that g A ( y 1 , . . . , y n ) ≤ f A ( x 1 , . . . , x n ). (d) Let T 0 b e the theory of total ly ordered sets. Assu me that ( P , f P , ( g i P )) is a totally ordered w eak partial mo del of SGc ( f , g 1 , . . . , g n ) ∧ Mon ( f , g 1 , . . . , g n ). Let A = ( O I ( X ) , f A , ( g i A )), where f A and g i A are extensions of f P , g i P defined as in the pro of o f (b). f A , g 1 A , . . . , g n A are ob viously mon otone. W e pr o ve that the condition S Gc ( f , g 1 , . . . , g n ) holds in A . Assume that U i ⊆ g i A ( V ) for i = 1 , . . . , n , a nd let x ∈ f A ( U 1 , . . . , U n ). Th en there exist u i ∈ U i = g i A ( V i ) such that f ( u 1 , . . . , u n ) is defined and x ≤ f ( u 1 , . . . , u n ). As u i ∈ g i A ( V ), there exist v i ∈ V suc h that g i P ( v i ) is defi n ed and u i ≤ g i P ( v i ). Let v = max ( v 1 , . . . , v n ). Then u i ≤ g i P ( v ). Hence f P ( u 1 , . . . , u n ) ≤ v ∈ V . Therefore, x ≤ f P ( u 1 , . . . , u n ) ∈ V so x ∈ V . Let i : P → A defi n ed b y i ( p ) = ↓ p . T o sho w that it is a weak emb ed ding w e only ha v e to sho w that if g P ( x 1 , . . . , x n ) is defi ned th en i ( g P ( x 1 , . . . , x n )) = ↓ g P ( x 1 , . . . , x n ) = g A ( ↓ x 1 , . . . , ↓ x n ). This is true b y the definition of g A . (e) Assu me that T 0 is the theory of semilattices. The construction in (d) can b e applied to this case without p roblems. The pro of is similar to that of (d) with th e d ifference that if n = 1 w e only hav e one elemen t v 1 so we do not need to compute a maxim um (which for n ≥ 2 ma y not exist if the o rder is not tot al). The pro of of the fact that th e remaining theories satisfy ( Lo c f ) is based on the criterion of finite lo calit y giv en in Th eorem 4.5. The constructions and th e pro ofs are similar to those in the pr o of of (b) resp . (c) for the cases (4) and (5). D ue to the fact that w e assumed that the defin ition d omain of the extension functions is fi nite W { f P ( u 1 , . . . , u n ) | u i ≤ x i , f P ( u 1 , . . . , u n ) defined } is a fin ite join, and th us exists (if f is no where defin ed it is sufficien t to define it as b eing ev erywher e equal to t in case (b) or to g A in case (c)). Th e fact that the definition domains are finite also ens ures that in the pr o of of (c) an elemen t a 0 (c h osen in the definition of g A ) with the d esired p rop erties a lw a ys exists. Appendix C. Proof of Theorem 5.4 Theorem 5.4. The fol lowing the ories have gr ound interp olation and ar e c onvex and P - interp olating with r esp e ct to the indic ate d set P of pr e dic ate symb ols: (1) The the ory of E Q of pur e e quality without function symb ols (for P = {≈} ). (2) The the ory Po Set of p osets (for P = {≈ , ≤} ). 30 V. SOFRONIE-STOKKERMANS (3) Line ar r ational arithmetic LI ( Q ) and line ar r e al arithmetic LI ( R ) (c onvex with r esp e c t to P = {≈} , str ongly P - interp olating for P = {≤} ). (4) The the ories B o ol of Bo ole an algebr as, SLat of se milattic es a nd DLat of distributive lattic es (str ongly P -interp olating for P = {≈ , ≤} ). Pro of. Note fi rst th at if a partially-ordered theory is interpolating for ≤ it is also for ≈ . Assume that A ∧ B | = T a ≈ b . Th en A ∧ B | = T a ≤ b a nd A ∧ B | = T b ≤ a , hence t here exist terms t 1 , t 2 con taining only common co nstan ts of A and B suc h that A ∧ B | = a ≤ t 1 ∧ t 1 ≤ b and A ∧ B | = b ≤ t 2 ∧ t 2 ≤ a . It fol lo ws that A ∧ B | = t 1 ≈ t 2 , A ∧ B | = a ≈ t 1 ∧ t 1 ≈ b . (1) and (2): con v exit y is ob vious; the pr op ert y of b eing P -inte rp olating can b e pro v ed by induction on the structure of proofs. (3) is kno wn (cf. e.g. [19]). A metho d for computing in terp olating terms for LI ( R ) and LI ( Q ) is presen ted in [11]. (4) This is a constructive pr o of based on ideas from [12, 13]. The results presented there sho w, as an easy particular case , that one can redu ce th e pr oblem o f c hec king the satisfia- bilit y of a conjun ction Γ of unit clauses with resp ect to one of the t heories ab o v e to c hecking the satisfiabilit y of a conju nction Ren Γ ∧ P Γ ∧ N Γ obtained by in trod ucing a p rop ositional v ariable P e for eac h subterm e occur r ing in Γ, a set of renaming r ules of the form P e 1 op e 2 ↔ P e 1 op P e 2 op binary Bo olean o p eration P ¬ e ↔ ¬ P e in th e case of Bo ol , and t ranslations of the positive resp. negat iv e part of Γ: P s ↔ P s ′ s ≈ s ′ ∈ Γ ¬ ( P s ↔ P s ′ ) s 6≈ s ′ ∈ Γ . (a) T he con v exit y of the theory of Bo olean algebras w ith r esp ect to ≈ follo w s from the f act that this is an equatio nal class; conv exit y with resp ect to ≤ follo ws fr om the fact that x ≤ y if and only if x ∧ y ≈ x . W e p ro v e th at th e theory of Bo olean algebras is ≤ -in terp olating, i.e. that if A and B are t wo conjun ctions of literals and A ∧ B | = Bool a ≤ b , where a is a constan t o ccurring in A and not in B and b a constan t o ccurring in B and not in A , then there exists a term con taining only common constant s in A a nd B su ch that A | = Bool a ≤ t and B | = Bool t ≤ b . W e can assume without loss of generalit y that A and B consist only of atoms (otherwise one m ov es the negativ e literals to the righ t and uses con vexit y). A ∧ B | = Bool a ≤ b if and only if the follo wing conjunction of literals in prop ositional lo gic is u nsatisfiable: ( Ren ( ∧ )) P e 1 ∧ e 2 ↔ P e 1 ∧ P e 2 ( Ren ( ∨ )) P e 1 ∨ e 2 ↔ P e 1 ∨ P e 2 ( Ren ( ¬ )) P ¬ e ↔ ¬ P e ( P ) P e 1 ↔ P e 2 e 1 ≈ e 2 ∈ A ( N ) P a for all e , e 1 , e 2 subterms i n A P g 1 ∧ g 2 ↔ P g 1 ∧ P g 2 P g 1 ∨ g 2 ↔ P g 1 ∨ P g 2 P ¬ g ↔ ¬ P g P g 1 ↔ P g 2 g 1 ≈ g 2 ∈ B ¬ P b for all g , g 1 , g 2 subterms i n B W e ob tain an unsatisfiable set o f clauses ( N A ∧ P a ) ∧ ( N B ∧ ¬ P b ) | = ⊥ . Prop ositional l ogic allo ws inte rp olation, so there exists an in terp olan t I = f ( P e 1 , . . . , P e n ), whic h is a Bo olean INTERPOLA TION I N LOC A L THEOR Y EXTENSIONS 31 com b ination (say in CNF) of the common pr op ositional v ariables occurr in g in N A and N B suc h that ( N A ∧ P a ) | = I a nd ( N B ∧ ¬ P b ) ∧ I | = ⊥ . But then A | = Bool a ≤ f ( e 1 , . . . , e n ) and B | = Bool f ( e 1 , . . . , e n ) ≤ b . (4)(b) The pro of is similar to th at of (4)( a) with the difference that in the renaming rules in the s tructure-preserving translation to clause form only th e conjunction rules apply , hence N A and N B are sets of n on-negativ e Horn clauses. W e can s atur ate N A ∪ P a under resolution with s election on the negativ e literals in linear time. The saturated set N ∗ A of clauses c on tains all unit clauses P e where e is subterm o f A with A | = SLat a ≤ e . Only unit p ositiv e clauses P e where e occur s in b oth A and B can en ter into resolution inferences w ith clauses i n N B ∪ ¬ P b and le ad to a co n tradiction. Th us we pr ov ed that ^ { P e | A | = SLat a ≤ e, e common s ubterm } ∧ N B ∧ ¬ P b | = ⊥ . This is equiv alen t to B | = SLat t ≤ b , where t = ^ { e | A | = SLat a ≤ e, e common subterm of A and B } . Ob viously , A | = SLat a ≤ t . (4)(c) The case of distributive lattices can b e treated similarly . Due to the fact that in this case the r enaming ru les for ∨ and ∧ are tak en into accoun t, the sets N A and N B are not Horn. W e adopt the same n egativ e selection strategy . When saturating N A ∪ P a a finite set of p ositiv e clauses is generated, namely of the form P e 1 ∨ · · · ∨ P e n where A | = DL a ≤ ( e 1 ∨ · · · ∨ e n ). W e consider a tota l ord ering on the prop ositional v ariables wh ere P e is larger than P g if e o ccurs in A and not in B and g o ccurs in b oth A and in B . Th en the only inferences whic h can lead to a con tradiction with N B ∪ ¬ P b are those b et w een the clauses in N ∗ A whic h only con tain co mmon prop ositional v ariables. Thus we pro v ed that ^ { _ P e i | A | = DL a ≤ _ e i , e i common te rms } ∧ N B ∧ ¬ P b | = ⊥ . This is equiv alen t to B | = DL t ≤ b , where t = V { W e i | A | = DL a ≤ W e i , where all e i are common subterms of A and B } . Obviously , A | = DL a ≤ t . This wor k is licen sed und er the Cr eative Commons Attribution -NoDer ivs License. T o view a copy of this license, v isit http://reative o mm on s. org /l i en se s/b y- nd /2 .0 / or send a letter to Creative Commons , 559 Nathan Abbott Wa y , Stanford, Ca lifornia 94305, USA.
Original Paper
Loading high-quality paper...
Comments & Academic Discussion
Loading comments...
Leave a Comment