Proving TheoremsBy Using Abstraction Interactively
Roberto Sebastiani,Adolfo Villa orita,Fausto Giunchiglia
1994-01-01
Abstract:ion f belonging to such a set, for any ground theorem ', exists in 2 a proof 2 of the abstracted theorem f('); moreover exists (at least) one way to \map back" (at least one of the possible) 2 to 1 which gives rise to an outline of the ground proof. can be subsequently re ned. It is important to observe that in interactive abstract theorem proving there is no need to interact only with human beings. Thus, in order to achieve automatic theorem proving in limited domains, an interactive abstract theorem prover, like ABSFOL, could be interfaced with external control programs based on euristic strategies [Kno91, BGW91]. Moreover, such system can be provided with an internal ML-like metalanguage for writing programs which implements control strategies, called tactics [GT94]. Automated theorem proving can then be implemented by writing complex tactics. 3 The map colouring problem As an example of interactive abstract theorem proving, in this paper we will consider the very well-known problem of colouring the various regions of a planar map using only four di erent colours. In Figure 1 we nd a very simple example taken from [McC90]. According to McCarthy, we can formalize the problem in terms of theorem proving as follows. We need a set of variables (like Albania, Andorra, Austria, : : : or r1,r2, : : : ) each representing a region of the given map, a binary predicate n() \next", representing the frontier constraints (e.g. n(Austria,Italy)), and a set of the four individual constants y; b; g; r (yellow, blue, green, red). Then we de ne an axiom \colours", written as a conjunction of colouring constraints like n(y,b) (\a yellow-coloured state can border a blue-coloured one"). Using ABSFOL, the problem can be initialized as follows: 4 NONAME:: NAMECONTEXT gmap; GMAP:: DECLARE INDCONST y b g r; GMAP:: DECLARE INDVAR r1 r2 r3 r4 r5 r6; GMAP:: DECLARE PREDCONST n 2; GMAP:: AXIOM colours : n(y,b) and n(y,g) and n(y,r) and n(b,y) and n(b,g) and n(b,r) and n(g,y) and n(g,b) and n(g,r) and n(r,y) and n(r,b) and n(r,g); The goal is given by the conjuction of all and only the frontier constraints of the map: exists r1 ... r6. ( n(r1,r2) and n(r1,r3) and ... and n(r5,r6) ) 4In ABSFOL, Teletype font is used to write the input and output of ABSFOL. UPPERCASE TELETYPE is used for key-words. \<string>::" is the ABSFOL prompt: the string before \:: " is the name of the current context, that is the theory we are working in. NAMECONTEXT names the current context. DECLARE adds new symbols to the current context. AXIOM adds an axiom to the current context. Both the input and the output have been slightly edited to make them more readable. 4 Ground Problem Abstract Problem Abstract Solution Ground Ground Solution ii) abstract iv) map back v) refine iii) abstract prove 3 6 1 2 3 6 1 5 4 5 4 blue blue blue yellow yellow