City, University of London Institutional Repository
Citation
:
Howe, J. M. (2001). Proof search in Lax Logic. Mathematical Structures in
Computer Science, 11(4), pp. 573-588. doi: 10.1017/S0960129501003334
This is the unspecified version of the paper.
This version of the publication may differ from the final published
version.
Permanent repository link: http://openaccess.city.ac.uk/1703/
Link to published version
:
http://dx.doi.org/10.1017/S0960129501003334
Copyright and reuse:
City Research Online aims to make research
outputs of City, University of London available to a wider audience.
Copyright and Moral Rights remain with the author(s) and/or copyright
holders. URLs from City Research Online may be freely distributed and
linked to.
City Research Online:
http://openaccess.city.ac.uk/
publications@city.ac.uk
Proof Searh in Lax Logi
JaobM.Howe
y
ComputingLaboratory, UniversityofKent
Reeived13June2000
AGentzensequentalulusfor LaxLogiispresented,theproofsinwhihnaturally
orrespondina1{1waytothenormalnaturaldedutionsforthelogi.Thepropositional
fragmentofthisalulusisusedasthebasisfor anotheralulus,onewhihusesa
historymehanisminordertogiveadeisionproedureforpropositional LaxLogi.
1. Introdution and Bakground
Proof searh an be used with either of twomeanings. It an either be used to mean
the searh for all proofs of a formula (proof enumeration), or to mean the searh for
a yes/no answer to a query (theorem proving). This paperdesribestwo new sequent
aluliforLaxLogi.OnealulusisforproofenumerationforquantiedLaxLogi,the
otheralulusis fortheorem provinginpropositionalLaxLogi.
Lax Logi is an intuitionisti modal logi rst introdued by Curry (Curry, 1952)
to illustrate ut-elimination in the presene of modalities. The logi was redisovered
by Mendler,who developed the logi in the ontext of hardware veriation to enable
abstrat veriation of iruits (Mendler, 1993). The logi has a single modality (Æ,
somehow)axiomatisedby
SÆS; ÆÆSÆS; (ST)(ÆSÆT)
The modality is unusual in having properties of both neessity and possibility. It an
be thought of asexpressing orretness up to a onstraint, abstrating awayfrom the
detail(hene the hoie of name, Lax Logi). A formula ÆP an be read as\forsome
onstraint,P holdsunder ".Theprooftheoryandsemantisof LaxLogi,inluding
Gentzen aluli, naturaldedutionaluliand Kripkesemantis, arefurther developed
in(Fairtlough andMendler,1997;FairtloughandWalton,1997;Bentonetal.,1998).
TheabilityofLaxLogitogiveanabstratexpressionofonstraintshasbeenutilised
bothinhardwareveriationandtogiveaprooftheoretisemantisforonstraintlogi
programminglanguages.Inhardwareveriation,thetimingonstraintsthatneedtobe
satisedin airuitanbeabstrated away asinstanesof themodalityand reasoned
aboutseparatelyfrom thelogialanalysis oftheiruit(Mendler,1993;Fairtlough and
Mendler,1994).Inonstraintlogiprogramming,LaxLogihasbeenusedtoextendthe
viewoflogiprogrammingasbakwardsproofsearhinonstrutivelogis(Milleretal.,
1991). Inessene, this approah takesnormal naturaldedution astheprooftheoreti
semantisforlogiprogramming.Constraintsanbeabstratedawayasmodalitiesand
the queryan be reasonedaboutlogially. The logi is used to give proofs of queries.
In turn, these proofs givethe onstraints to be satised. The onstraintsan then be
analysedseparately(Fairtloughet al.,1997;Walton,1998).
Natural dedution hasa pragmatidrawbak.In searhing bakwards fora proof of
a formula, it is notalwaysobvious whih rule to apply. For example, in Intuitionisti
Logiitisnotobviousfromtheonlusionthatrule(
"
)shouldbeapplied.Evenwhen
the rule has been xed, it is hard to determine the formulae in the premiss. Cut-free
Gentzen sequent alulus systems(Gentzen, 1969)are muh better from this point of
view.Whenaprinipalformulahasbeenhosen,therulesappliablearerestrited.The
appliationoflogialrulesis diretedbythesyntaxoftheprinipalformula.Strutural
rules an often be built into the sequent system. In suh a system, when a prinipal
formulahasbeenhosen,thenextruleappliation isexatlydetermined bythesyntax
ofthatformula.
Therearewellknowntranslations(Prawitz,1965)betweennormalnaturaldedutions
and sequent proofs. Therefore, one an searh for proofs in sequent alulus systems
and thentranslatethe resultingproofs to normalnaturaldedutions. Thedrawbak is
that manysequentproofstranslatetothesamenormalnaturaldedution.Hene when
oneis tryingto enumerate allproofsofaformula,thesameproof isfoundmanytimes.
Thisgivesonemotivationfor`permutation-free'sequentaluli(introduedin(Herbelin,
1995)forIntuitionistiLogi).Thesearesequentaluli(enablingsyntaxdiretedproof
searh)whoseproofsanbetranslatedina1{1waywiththenormalnaturaldedutions
forthelogi.Permutation-freealulihavetheadvantagesofasequentalulussystem,
whilstreetingthestrutureofnormalnaturaldedutions.Therstalulusdesribed
in this paper, PFLAX, is a proof enumeration alulus for rst-order quantied Lax
Logi.PFLAXisapermutation-freealulusforLaxLogi{thesequentproofsnaturally
orrespondina1{1waytothenormalnaturaldedutions.
Propositionallogisareusually deidableandthereforeitisdesirabletondeetive
deisionproeduresforsuhlogis.Here,bystudyingthenatureofnon-terminating
bak-wardssearhtoseewhereoneanstopthesearh,adeisionproedureforpropositional
LaxLogiisgiven;thistheoremprovingalulusisalledPFLAX
Hist
.Thealulususes
atehniquefordetetingloopsusingahistorymehanism,buildingonworkof
Heuerd-ingetal (Heuerdingetal.,1996;Heuerding,1998;Howe,1997).Itusesthepropositional
fragment of PFLAX asthe base alulus to whih a historymehanism is added,
giv-ingthedeisionproedure.Thetehniqueisgeneralandmaybeappliedto manyother
propositionallogis.WeknowofnootherdeisionproedureforpropositionalLaxLogi.
2. Natural Dedution
This setion gives the relevant material on natural dedution needed to develop the
permutation-freealulusforLaxLogi(theproofsinwhihorrespondina1{1wayto
;P`P (ax)
`>
(>I)
`?
`P
(?")
;P`Q
`P Q
( I
)
`PQ `P
`Q
( "
)
`P `Q
`P^Q
(^ I
)
`P^Q
`P
(^ "1
)
`P^Q
`Q
(^ "2
)
`P
`P_Q
(_ I
1 )
`Q
`P_Q
(_ I
2 )
`P_Q ;P `R ;Q`R
`R
(_ "
)
`P
`ÆP
(ÆI)
`ÆP ;P`ÆQ
`ÆQ
(Æ")
`P[u=x℄
`8xP
(8I)y
`8xP
`P[t=x℄
(8 "
)
`P[t=x℄
`9xP
(9I)
`9xP ;P[u=x℄`R
`R
(9")y
yunotfreein
Fig.1.SequentstylepresentationofnaturaldedutionforLaxLogi.
Normalnaturaldedutionsare theobjetsofinterest.The-redutionandommuting
onversionstepsof normalisationaregivenin(Bentonet al.,1998).Theextraasesfor
? "
and9
"
anbeadded,and aretobefoundin(Howe,1998;Howe,1999).
Denition1Anaturaldedutionissaidtobein;-normalformwhenno-redutions
andnoommuting onversionsareappliable.
WepresentarestritedversionofnaturaldedutionforLaxLogi.Inthisalulus,the
onlydedutionspossiblearein;-normalform.Thisalulushastwokindsof`sequent',
dierentiatedbytheironsequenerelations,and.Rulesareappliableonlywhen
thepremisses have theappropriate onsequenerelation. The onlusions havea xed
onsequenerelation.Thusvaliddedutionsareofarestritedform.Thisalulus,whih
weallNLAX,isgiven(withtheprooftermsgiveninthenextsetion)in Figure2.
Proposition 1Thealulus NLAXonlyallowsdedutionstowhihno-redutionsand
noommutingonversionsareappliable.Moreover,itallows all;-normaldedutions.
2.1. Term Assignment
We give a proof term system for NLAX. The term system is needed to prove the
re-sults givenin setion 4.In (Moggi,1989) Moggigavea-alulus, whihhe alled the
omputational -alulus. As is shown in (Benton et al., 1998), this alulusnaturally
mathesLaxLogi.Moreabouttheomputational-alulusandLaxLogi(therealled
omputationallogi)anbefoundin(Bentonetal.,1998).
Prooftermsforunrestrited naturaldedution forLaxLogianbe foundin(Howe,
1998; Moggi, 1989). We are interested in the `real' proofs for Lax Logi { the normal
[image:4.612.97.475.84.255.2];x:Pvar(x):P (ax)
A:P
an(A):P
(M)
:>
(>I)
A:?
efq(A):P
(? "
)
;x:PN:Q
x:N:P Q
(I)
A:PQ N:P
ap(A;N):Q
( "
)
N1:P N2:Q
pr(N
1
;N
2
):P^Q
(^ I
)
A:P^Q
fst(A):P
(^ "
1 )
A:P^Q
snd(A):Q
(^ "
2 )
N:P
i(N):P_Q
(_I 1
)
N:Q
j(N):P_Q
(_I 2
)
A:P_Q ;x1:PN1:R ;x2:QN2:R
wn(A;x
1 :N
1
;x
2 :N
2
):R
(_ "
)
N:P
smhi(N):ÆP
(ÆI)
A:ÆP ;x:PN:ÆQ
smhe(A;x:N):ÆQ
(Æ")
N:P[u=x℄
u:N:8xP
(8I)y
A:8xP
apn(A;t):P[t=x℄
(8 "
)
N:P[t=x℄
prq(t;N):9xP
(9 I
)
A:9xP ;y:P[u=x℄N:R
ee(A;u:y:N):R
(9 "
)y
yunotfreein
Fig.2.NLAXwithproofannotations.
ome in two syntatiategories,A and N. V is theategory of variables (proofs),U
istheategoryofvariables(individualsin formulae),andTtheategoryofterms.The
prooftermsaregivenwithanabstratsyntax,withthenotationhosentobesuggestive
oftheassoiatedproofrules.Hene smhi(N)forthetermassoiatedwiththesomehow
introdutionrule. Theextraonstrutoran(A)mathesthe(M)ruleofNLAX.
A::= var(V)jap(A;N)j fst(A)jsnd(A)japn(A;T)
N::= jefq(A)jan(A)jV:N jpr(N;N)ji(N)jj(N)jwn(A;V:N;V:N)
smhi(N)jsmhe(A;V:N)jU:N jprq(T;N)jee(A;U:V:N)
NLAXtogetherwithproofannotationsfornormaltermsanbeseeninFigure2.
3. SequentCalulus
Inthis setionwepresentanewGentzen sequent alulusforLaxLogi, PFLAX.The
proofsallowedbyPFLAXnaturallyorrespond ina1{1wayto normalnatural
dedu-tionsforLaxLogi {i.e.theproofsofNLAX. InFigure 3weremindthereaderof the
sequentalulus,extendingthosein(FairtloughandMendler,1997;Bentonet al.,1998)
toquantiers.
Wegiveanewsequentalulus,PFLAX(`permutation-free' LaxLogi).PFLAX
ex-tendsthepermutation-freealulusMJforIntuitionistiLogi(Herbelin,1995;Dykho
and Pinto, 1998; Dykho and Pinto, 1999) to a alulusfor Lax Logi. Like MJ this
alulushastwoformsof judgment, )R and
Q
[image:5.612.95.455.78.327.2];P )P (ax)
;P;P )R
;P)R
(C)
)>
(> R
)
;?)P
(? L
)
;P )Q
)PQ
( R
)
)P ;Q)R
;P Q)R
( L
)
)P )Q
)P^Q
(^R)
;P )R
;P^Q)R
(^L 1
)
;Q)R
;P^Q)R
(^L 2
)
)P
)P_Q
(_R 1
)
)Q
)P_Q
(_R 2
)
;P )R ;Q)R
;P_Q)R
(_L)
)P
)ÆP
(ÆR)
;P )ÆR
;ÆP)ÆR
(ÆL)
)P[u=x℄
)8xP
(8 R
)y
;P[t=x℄)R
;8xP )R
(8 L
)
)P[t=x℄
)9xP
(9 R
)
;P[u=x℄)R
;9xP )R
(9 L
)y
yunotfreein
Fig.3.SequentalulusforLaxLogi.
sequent in bakwards proof searh. The seond kindof sequent has aformula (on the
left) in aprivileged position alled thestoup,following(Girard, 1991). The formulain
thestoupisalwaysprinipalin theonlusionof aninferenerule. Thestoupisaform
offousing;proof searhis restritedsothat, wheneverpossible,theativeformulaeof
aninfereneare prinipal inthe premiss. Inbakwardsproof searh, leftrulesare only
appliableto stoupsequents.PFLAX(togetherwith theproof termsgiven in thenext
setion)isdisplayedinFigure 4.WegiveasimpleexampleofaderivationinPFLAX:
B;B;ÆB^(BA)
B
!B
(ax)
B;B;ÆB^(BA))B
(C)
B;B;ÆB^(BA)
A
!A
(ax)
B;B;ÆB^(BA)
BA
! A
( L
)
B;B;ÆB^(BA)
ÆB^(BA) ! A (^ L 2 )
B;B;ÆB^(BA))A
(C)
B;B;ÆB^(BA))ÆA
(Æ R
)
B;ÆB^(BA)
ÆB
!ÆA
(Æ L
)
B;ÆB^(BA)
ÆB^(BA)
! ÆA
(^ L1
)
B;ÆB^(BA))ÆA
(C)
3.1. Term Assignmentfor Sequent Calulus
WegiveatermassignmentsystemforPFLAX.Thetermsystemisasimpleextensionof
thatgivenin(Herbelin,1995;DykhoandPinto,1996;DykhoandPinto,1998).The
term alulushas two syntatiategories, M and Ms. V is the ategory of variables
[image:6.612.101.446.85.260.2]P
![℄:P
(ax)
;x:P
P
!Ms:R
;x:P )(x;Ms):R
(C)
):>
(>R)
?
!ae:?
(?L)
;x:P)M:Q
)x:M :P Q
(R)
)M :P
Q
!Ms:R
PQ
! (M::Ms):R
( L
)
)M
1
:P )M
2
:Q
)pair(M1;M2):P^Q
(^ R
)
P
!Ms:R
P^Q
!p(Ms):R
(^ L
1 )
Q
!Ms:R
P^Q
!q(Ms):R
(^ L
2 )
)M :P
)inl (M):P_Q
(_R 1
)
)M :Q
)inr(M):P_Q
(_R 2
)
;x
1
:P )M
1
:R ;x
2
:Q)M
2
:R
P_Q
!when(x
1 :M
1
;x
2 :M
2
):R
(_L)
)M :P
)smhr(M):ÆP
(Æ R
)
;x:P)M :ÆR
ÆP
!smhl (x:M):ÆR
(Æ L
)
)M:P[u=x℄
)u:M :8xP
(8 R
)y
P[t=x℄
! Ms:R
8xP
!apq(t;Ms):R
(8 L
)
)M :P[t=x℄
)pairq(t;M):9xP
(9R)
;y:P[u=x℄)M:R
9xP
!spl (u:y:M):R
(9 L
)y
yunotfreein
Fig.4.ThesequentalulusPFLAX,withproofannotations.
Inpartiular,[℄isusedfortheaxiomtermand(M ::Ms)forthetermassoiatedwith
impliationontheleft,givingalistofMtermssuggestiveoftheorderingofrulesinthe
alulus.
M::=j(V;Ms)jV:Mjpair(M;M)jinl(M)jinr(M)jsmhr(M)jU:Mjpairq(T;M)
Ms::=[℄jaej(M ::Ms)jp(Ms)jq(Ms)jwhen(V:M;V:M)
smhl(V:M)japq(T;Ms)jspl(U:V:M)
ThesetermsaneasilybetypedbyPFLAX,asseeninFigure 4.
4. Equivaleneof the Caluli
WeprovetheequivaleneofthetermaluliandthesoundnessandadequayofPFLAX.
These results provethedesired orrespondene.The proofs are extensions of those for
theMJalulusforIntuitionistiLogi(DykhoandPinto,1998),henemostdetailis
omitted.Westartbygivingpairsoffuntionsthatdenetranslationsbetweentheterm
assignmentsystems fornaturaldedution (NLAX) andsequentalulus(PFLAX),
[image:7.612.94.473.74.362.2]SequentCalulus ! NaturalDedution:
:M!N
0
:AMs!N
(x;Ms)=
0
(var(x);Ms)
0
(A;[ ℄)=an(A)
(x:M)=x:(M)
0
(A;(M ::Ms))=
0
(ap(A;(M));Ms)
(smhr(M))=smhi((M))
0
(A;smhl(x:Ms))=smhe(A;x:(M))
()=
0
(A;ae)=efq(A)
(pair(M 1 ;M 2 ))=pr((M 1 );(M 2 )) 0
(A;p(Ms))=
0
(fst(A);Ms)
(inl(M))=i((M))
0
(A;q(Ms))=
0
(snd(A);Ms)
(inr(M))=j((M))
0
(A;apq(t;Ms))=
0
(apn(A;t);Ms)
(u:M)=u:(M)
0
(A;spl(u:y:M))=ee(A;u:y:(M))
(pairq(t;M))=prq(t;(M))
Natural Dedution ! Sequent Calulus:
:N!M
0
:AMs!M
(an(A))= 0
(A;[℄)
0
(var(x);Ms)=(x;Ms)
(x:N)=x: (N)
0
(ap(A;N);Ms)=
0
(A;( (N)::Ms))
(smhe(A;x:N))=
0
(A;smhl(x: (N)))
0
(fst(A);Ms)=
0
(A;p(Ms))
(smhi(N))=smhr( (N))
0
(snd(A);Ms)=
0
(A;q(Ms))
()=
0
(apn(A;t);Ms)=
0
(A;apq(t;Ms))
(efq(A))= 0 (A;ae) (pr(N 1 ;N 2 ))=pair( (N 1
); (N
2 )) (i(N))=inl( (N)) (j(N))=inr( (N)) (wn(A;x 1 :N 1 ;x 2 :N 2 ))= 0 (A;when(x 1 : (N 1 );x 2 : (N 2 )))
(u:N)=u: (N)
(prq(t;N))=pairq(t; (N))
(ee(A;u:y:N))=
0
(A;spl(u:y: (N)))
We give two lemmas demonstrating the equivalene of the term aluli, that is, the
translationsfrom onesystemtotheotherare1{1.
Lemma1 i) ((M)) = M; ii) (
0
(A;Ms)) =
0
(A;Ms).
Proof. Bysimultaneous indution onthestrutureofM andMs.Forfull details see
(Howe,1999).
Lemma2 i)( (N)) = N; ii)(
0
(A;Ms)) =
0
(A;Ms).
Proof. Bysimultaneous indution on the struture of N and A. Forfull details see
(Howe,1999).
Thefollowingtwotheoremsstatesoundnessandadequay.Theyshowthatthe
Theorem1(Soundness) Thefollowing rulesare admissible:
)M :R
(M):R
i)
A:P
P
!Ms:R
0
(A;Ms):R
ii)
Proof. Bysimultaneous indution onthestrutureofM andMs.Forfull details see
(Howe,1999).
Theorem2(Adequay)Thefollowing rulesare admissible:
N:R
) (N):R
i)
A:P
P
!Ms:R
) 0
(A;Ms):R
ii)
Proof. Bysimultaneous indution on the struture of A and N. Forfull details see
(Howe,1999).
Sine the term systems are in 1{1orrespondene (lemma 1 and lemma 2) and the
translations preserve provability (theorem 1 and theorem 2), the 1{1 orrespondene
betweenPFLAXandNLAXhasbeenestablished.Thisisstatedinthefollowingtheorem.
Theorem3The normal natural dedutions of Lax Logi (the proofs of NLAX) are in
1{1orrespondene tothe proofsof PFLAX.
Animmediateorollaryoftheorem3isthatPFLAXissoundandompletewithrespet
to naturaldedutionfor LaxLogi. QuantiedLax Logiis demonstrated tobesound
and omplete with respet to ertain lassesof Kripkemodel-strutures in (Fairtlough
andWalton,1997).
4.1. CutElimination
Wenowbriey disuss ut forPFLAX. Inthe usual sequent alulus,ut may be
for-mulatedasfollows:
)P ;P )Q
)Q
(ut)
InPFLAX,thetwojudgmentformsleadtothefollowingfourutrules(asfor
Intuition-istiLogi in(Herbelin, 1995;Dykho andPinto,1998)):
Q
!P
P
!R
Q
!R
(ut 1
)
)P ;P
Q
!R
Q
!R
(ut 2
)
)P
P
!R
)R
(ut 3
)
)P ;P )R
)R
(ut 4
)
WeallPFLAXextendedwiththefourutrulesPFLAX
ut
.Weangiveredutionrules
for PFLAX
ut
and provethe weak ut elimination theorem for the logi. We an also
provestrongnormalisation forthe termsystemassoiatedwith thelogi, henestrong
Theorem4The rules(ut 1
);(ut
2
);(ut
3
);(ut
4
)areadmissible in PFLAX.
Theorem5The utredutionsystemfor PFLAXstronglynormalises.
5. DeidingLax Logi
It is usefuland interesting to haveadeisionproedure foranylogi. This setion
de-sribesadeisionproedurefor propositionalLaxLogi. Tothe best ofourknowledge,
nodeisionproedure forpropositionalLaxLogihasbeenpresentedbefore.
Thenewalulususesahistorymehanismtoensureterminationofbakwardsproof
searh.Historymehanismswereintroduedin(Heuerdingetal.,1996;Heuerding,1998).
Therenedhistorymehanismusedhereanbefoundin (Howe,1997;Howe,1998).
Another approah to deiding propositional logis is by the use of `ontration-free'
sequentaluli,suhastheoneforpropositionalIntuitionistiLogigivenin(Dykho,
1992; Hudelmaier, 1993). If suh a deision proedure for Lax Logi ould be found,
we would expet it to be faster than one involving a history mehanism. An
investi-gation of ontration-free alulifor Lax Logi an be found in (Avellone and Ferrari,
1996). Unfortunately, this investigation did not sueed in nding a ontration-free
alulus. We believe that a ontration-free alulus for Lax Logi annot be found,
as (for arbitrary n) examples an be onstruted whih require an entire formula in
a sequent to be ontrated n times in a proof. As an example, onsider the sequent
B(ÆAC)ÆA;ÆB;ÆAC)C,whereÆACneedstodupliatedinitsentirety
inorderto provethesequent.
5.1. DeidingPropositional LogisUsing HistoryMehanisms
Oneapproah to ndinga deisionproedure for apropositionallogi is to plae
on-ditionson thesequentalulusto ensureterminationof searh. Itis elegant tobeable
tobuild theontentof theseonditionsintothesequentalulusitself. Thisis howthe
alulusfortheorem provinginthissetionisdeveloped.
In order to ensuretermination of bakward proof searh, weneed to hek that the
same sequent (modulo number of ourrenes of idential formulae) does not appear
againonabranh,that is,proof searh doesnotloop.Avoidingloopsanalsoprevent
theunneessaryomputationarisingfromanitenumberofpassesthroughaloopina
suessfulderivation.Weneedamehanialwaytodetetsuhloops.Onewaytodothis
istoaddahistory toasequent.Thehistoryisthesetofallsequentstohaveourredso
faronabranhofaprooftree.Aftereahbakwardsinferenethenewsequent(without
itshistory)is hekedtosee whetheritis amemberofthis set.Ifit iswehavelooping
and baktrak. If not, the new history is the extension of the old history by the old
sequent(without thehistoryomponent), andwetryto provethenewsequent,andso
on.Unfortunately,this methodisspaeineÆientasitrequireslonglistsofsequentsto
be stored by the omputer,and all of this list hasto be heked at eah stage.When
Thebasisofthereduedhistoryistherealisation,asin(Heuerdingetal.,1996),that
oneneedonlystoregoalformulae(agoalformulaisthesuedentofasequent)inorder
toloop-hek.Inthealulidealt withinthis paper,oneaformulaisin theontextit
willbeintheontextofallsequentsaboveitintheprooftree.Wesaythat thealulus
has inreasing ontext. For two sequents to be the same they need to have the same
ontext (up to multiple ourrenesof formulae).Therefore wemayempty thehistory
everytimetheontextis (properly)extended.All weneedstoreinthehistoryaregoal
formulae.If we ometo a sequentwhose goalis already in thehistory, then it hasthe
samegoalandthesameontextasanothersequent{thereisaloop.
Therearetwoslightlydierentapproahesapturingthis.Thereisthestraightforward
extensionofthealulusdesribedin (Heuerdinget al.,1996),whih weallthe`Swiss
history';moreonthisloop-hekingmethodanbefoundin(Heuerding,1998).Thereis
alsorelatedworkonhistoriesforIntuitionistiLogiin(Gabbay,1991).Anotherapproah
involvesstoringslightlymoreformulaeinthehistory,butwhihforsomealulidetets
loops morequikly. This we desribe asthe `Sottish history'(Howe, 1997); it an,in
manyases, bemoreeÆientthan the Swiss method. In this paper wegive aalulus
forLaxLogi using theSottish historyaswebelievethis to be thebettermethod for
intuitionistilogis(Howe,1997).
Thegeneralityofthis approahisattrative.Thehistorymehanismanbeattahed
tomanyalulitogivedeisionproedures;appliationsanbefoundin(Howe,1998).
5.2. PFLAX
Hist
This setion desribes a history alulus for propositional Lax Logi. The alulus is
an extension of that for Intuitionisti Logi given in (Howe, 1997). The modality is
handled similarlyto disjuntion (disjuntionisnotoveredin (Heuerding et al.,1996),
andrequiresspeialtreatment).ItusesthealulusPFLAXasabaseonwhihtobuild
the alulusas this alulus has already reduedthe searh spae to a ertain extent.
PFLAXhastheinreasingontextrequiredfortheappliationofthehistorymehanism.
However,amoreusualformulationouldhavebeenusedinstead.PFLAX
Hist
anbeseen
in Figure 5.Observe thetworules for(
R
). These orrespond to thetwoases where
thenew formulais oris notin theontext.As notedabove, thisis veryimportantfor
historymehanisms.Notiethat thenumberofformulaein thehistoryisat mostequal
tothelengthof theformulawehekforprovability.
A sequent is mathed againsttheonlusions of rightrules until the goalformula is
eitherapropositionalvariable,falsum,disjuntionoraÆformulaThishasbeenensured
bytherestritionongoalformulaegiveninthealulus(notethattherulesfordisjuntion
ontherightandsomehowontherightareonlypossibleonbaktraking,orwithanempty
ontext). A formula from the ontext is then seleted using therule (C) and mathed
againsttheleft rules of thealulus.The Sottish aluluskeeps(as aset)a omplete
reord of goal formulae between ontext extensions. At eah of the plaes where the
historymight be extended, the new goal is heked against the history. If it is in the
P
!P;H
(ax)
;P
P
!D;H
;P )D;H
(C)
)>;H
(>R)
?
!D;H
(?L)
;P)Q;fQg
)P Q;H
( R1
) ifP2=
)Q;(Q;H )
)PQ;H
( R2
) ifP2 andQ2=H
;P )?;f?g
):P;H
(: R1
) ifP 2=
)?;(?;H )
):P;H
(: R2
) ifP 2 and?2=H
)P;(P;H)
Q
!D;H
PQ
! D:H
(L) ifP 2=H
)P;(P;H )
:P
!D;H
(: L
) ifP2=H
)P;(P;H) )Q;(Q;H)
)P^Q;H
(^ R
) ifP;Q2=H
P
!D;H
P^Q
!D;H
(^L 1
) Q
!D;H
P^Q
!D;H
(^L 2
)
)P;(P;H)
)P_Q;H
(_R 1
) ifP2=H
)Q;(Q;H )
)P_Q;H
(_R 2
) ifQ2=H
;P)D;fDg ;Q)D;fDg
P_Q
!D;H
(_ L
) ifP 2= andQ2=
)P;(P;H )
)ÆP;H
(ÆR) ifP2=H
;P )ÆR ;fÆR g
ÆP
!ÆR ;H
(ÆL) ifP2=
Diseitheranatom,?,disjuntionoraÆformula.Wherethehistoryhasbeenextended
wehaveparenthesised(P;H )for emphasis.
Fig.5.ThealulusPFLAX
Hist
(Sottish).
essary, theleft rules haveside onditions to ensure that the ontext is inreasing. For
the(
R
)rule(whihattemptstoextendtheontext)therearetwoasesorresponding
to whentheontextis andwhenit isnotextended. Somethingsimilar ishappeningin
the left rules. Take (_
L
) as anexample. In both premisses of the rule a formula may
be added to ontext. If both ontexts really are extended, then we ontinue building
theprooftree. If oneorbothontexts are notextended then thesequent,S, with the
non-extendedontext, will be thesameassomesequentat alesserheightin the proof
tree{there isaloop(whih wedesribeasatrivialloop).Thisiseasytosee:sinethe
ontextandthegoalofS arethesameasthat oftheonlusion,theremust bealower
sequent(theonlusionofaninstaneof(C))thesameasthepremissS.Asanexample
wegiveaderivationin PFLAX
Hist
ofthesequentintheexampleinsetion3:
B;ÆB^(BA)
B
!B
(ax)
B;ÆB^(BA))B
(C)
B;ÆB^(B A)
A
!A
(ax)
B;ÆB^(BA)
BA
! A
( L
)
B;ÆB^(BA)
ÆB^(BA)
! A
(^ L2
)
B;ÆB^(BA))A
(C)
(Æ R
[image:12.612.97.466.89.340.2]Note that thederivation of this sequent given in setion 3would be preventedby the
historymehanism,asitontainsaloop.
It is now demonstrated that PFLAX
Hist
is equivalent to PFLAX, in terms of
prov-ability. The equivaleneis provedvia anintermediate alulusPFLAX
D
. Thealulus
PFLAX D
is thealulusPFLAXwhere therule (C) isrestritedso that itis only
ap-pliablewhenthegoalformulaisanatom,adisjuntion,falsumorasomehowformula.
Proposition 2The alulus PFLAX is equivalent to the alulus PFLAX
D
. That is,
sequent )Gisprovable in PFLAXi )Gisprovable in PFLAX
D .
Thefollowinglemmaisneededintheproofoftheorem6.
Lemma3(Contration)The following rulesareadmissible in PFLAX
Hist :
;P;P )R ;H
;P )R ;H
(C 0
)
;P;P
Q
!R ;H
;P
Q
!R ;H
(C 00
)
Proof. Bysimultaneousindution ontheheightsofderivationsofpremisses.
Theequivaleneproof below, althoughlong,hasasimplestruture. An algorithmto
turnaPFLAXprooftreeinto aPFLAX
Hist
prooftree isdesribed indetail. Asimple
indutionargumentshowsthatthealgorithmterminates, provingtheresult.
Theorem6Thealuli PFLAXand PFLAX
Hist
areequivalent.Thatis,sequent )G
isprovable in PFLAXisequent )G;fGgisprovable in PFLAX
Hist .
Proof. FromProposition2weknowthatitisenoughtoshowthatPFLAX
D
is
equiv-alent to PFLAX
Hist
. It is trivialthat any sequent provablein PFLAX
Hist
is provable
in PFLAX
D
. (Useontration(C
0
)aboveinstanesof (
R2
)andthen simplydropthe
historypartofthesequent).Weprovetheonverse.
Take any proof tree forsequent )Gin PFLAX
D
. By denition this proof tree is
nite,with n>0nodes.Usingthis prooftree,weonstrut(from therootup) aproof
treeforthesequent )G;fGginPFLAX
Hist
.ThemajordierenebetweenPFLAX
D
andPFLAX
Hist
isthattheformerpermitsloops,whereasthelatterdoesnot.Essentially
wetakethePFLAX
D
prooftreeandgiveareipefor`snippingout'theloops:removing
thesequentsthat formtheloop.
Theonstrutionuses`hybridtrees'.AhybridtreeisafragmentofaPFLAX
Hist proof
tree with allbranhesthat do not have(ax), (>) or(?) leavesending with PFLAX
D
prooftrees.ThesePFLAX
D
prooftreeshaverootswhihanbeobtainedbybakwards
appliation of a PFLAX
D
rule to the top history sequent (ignoring its history). We
analyse eah ase of atopmost history sequent with non-historypremiss(es) resulting
from appliation of rule (R ) in the sequent tree. We write
0
when the set of
formulaein multisets and
0
arethe same(althoughthe numberofourrenesmay
bedierent).Wedenoteaseriesofzeroormoreinstanesofrule(R ) by(R )
{ The root of the PFLAX D
tree. We hange (non-history) sequent )G to history
sequent )G;fGg.
{ (R ) isoneof(ax), (C), i.e.arule whih inPFLAX
Hist
hasno sideonditions.The
premissishangedbyaddingtheappropriatehistory.Itbeomesthehistorysequent
obtainedbyapplying(bakwards)thePFLAX
Hist
ruletotheoriginalonlusion.For
example,ifthesituation weareanalysingis
;P
P
!D
;P )D;H
(C) thenitbeomes
;P
P
!D;H
;P)D;H
(C)
Wenowhaveanewhybridtree.
{ (R ) is (
R
). Ifthe ontext is extended, then add theappropriate history, allowing
the replaement of the instane of (
R
) in PFLAX
D
by an instane of (
R1
) in
PFLAX Hist
. If the ontext is not extended and the new goal is notin thehistory,
then again addthe appropriatehistory, allowingthe replaement ofthe instane of
( R
) in PFLAX
D
by aninstane of (
R 2
) with a(C
0
) in PFLAX
Hist
. If the new
goal isin the history, there is aloop,whih thehistorymehanismprevents.If the
historyonditionisnotmet,thenbelowtheonlusionthehybridtreehastheform:
;P )G
)P G;H
( R ) . . . . 0
)G;H
0
where G 2 H
0
, H
0
H and
0
. The historyis notreset at any point in this
fragment. This an easily be seen to ontain the loop whih is the reason for the
history onditionnot being met. It is transformed by removingall sequentsabove,
but notinluding,
0
)G;H
0
(alongwith anysubtrees aboveexised sequents) up
to ;P)G .Addingtheappropriatehistorytothissequentandusing(oneormore
instanesof)(C
0
)givesthenewhybridtree:
;P )G;H
0
0
)G;H
0 (C
0 )
{ (R ) is (
L
). If the historyondition is satised, then add the appropriatehistory,
allowingthereplaementofinstaneof (
L
)in PFLAX
D
byaninstane of(
L
)in
PFLAX Hist
. Ifthe historyondition isnot satised,then belowthe onlusionthe
hybridtreehastheform:
)P
Q
!R
PQ
! R ;H
( L ) . . . . 0
)P;H
0
where P 2 H
0
, H
0
H and
0
. The historyis not reset at any point in this
fragment. It is transformed by removingall the sequents above, but not inluding,
0
)P;H
0
(alongwith any subtrees aboveexisedsequents) upto )P. The
history to )P and using (zero ormore instanes of) (C 0
) gives the newhybrid
tree:
)P;H
0
0
)P;H
0 (C
0 )
{ (R ) is (Æ
R
). If the history ondition is satised, then add the appropriate history,
allowingthereplaementoftheinstane of(Æ
R
)in PFLAX
D
byaninstaneof(Æ
R )
inPFLAX
Hist
.Ifthehistoryonditionisnotsatised,thenbelowtheonlusionthe
hybridtreehasform:
)P
)ÆP;H
(Æ R
)
. . . . 0
)P;H
0
whereP 2H
0
,H
0
Hand
0
.Thehistoryisnotresetatanypointinthis
frag-ment.Itistransformedbyremovingallsequentsfrom,butnotinluding,
0
)P;H
0
(alongwithanysubtreesaboveexisedsequents)upto )P.Addingthe
appropri-atehistoryandusing(zeroormoreinstanesof)(C
0
)givesthenewhybridtree:
)P;H
0
0
)P;H
0 (C
0 )
{ (R ) is (Æ
L
). If the side ondition is satised, then add the appropriate history,
al-lowingthe replaementof theinstane of (Æ
L
) in PFLAX
D
by aninstane of (Æ
L )
in PFLAX
Hist
. If the side onditionis not satised, then below the onlusion the
hybridtreehasform:
;P )ÆR
ÆP
!ÆR ;H
(Æ L
)
. . . .
)ÆR ;H
where P 2 .Thisis transformedbyremovingallsequentsfrom,but notinluding,
)ÆR ;H(alongwithanysubtreesaboveexisedsequents)upto ;P)ÆR.Adding
theappropriatehistoryandusingasingleinstaneof(C
0
)givesthenewhybridtree:
;P )ÆR ;H
)ÆR ;H
(C 0
)
Sinethenumberofsequentswithoutahistoryinahybridtreeisniteandaseverystep
stritlydereasesthenumberofsequentswithoutahistory,this proessisterminating.
Theinstanesof(C
0
)maybeeliminatedfromtheonstrutedderivation.
Note that the PFLAXderivation given in setion 3is transformedby the algorithm
desribedintheprooftothederivationofthesamesequentinPFLAX
Hist
givenabove.
Wehaveshownthat PFLAX
Hist
issoundandomplete.Toprovethatitisadeision
proedure,weprovethatitisalsoterminating{bakwardsproofsearhinthealulus
endsinsuessorfailureafteranitenumberofsteps.
Proof. Weassoiatewitheverysequentaquintupleofnaturalnumbers.Withasequent
without astoup, )R ;H, we assoiate: W = (k n;k m;1;0;r). With a sequent
withastoup,
P
!R ;H,weassoiate:W =(k n;k m;0;s;r).Here,kisthenumber
ofelementsin theset ofsubformulaeof( ;R );nisthenumberofelementsintheset of
elementsof ;misthenumberofelementsinH ;risthesizeofgoalformulaRandsisthe
sizeofthestoupformulaP.(Notiethatalthough isamultiset,weountitselements
asaset). Thesequintuplesarelexiographiallyorderedfrom theleft.Byinspetionwe
seethat foreveryinfereneruleW forthepremissesislowerin thelexiographi order
thanW fortheonlusion.Henebakwardproofsearhisterminating.
Whenimplementingatheorem prover,knowledgeof theinvertibilityof theinferene
rulesanbeuseful. Thisinformationisgiveninthefollowingproposition.
Proposition 3Thefollowinginferenerulesof PFLAX
Hist
areinvertible:(
R1
),(
R2 ),
(: R
1
),(:
R2
),(
L
),(:
L
),(^
R
),(_
L
),(Æ
L
).Thefollowinginferenerulesof PFLAX
Hist
arenot invertible: (C), (^
L 1
),(^
L 2
), (_
R 1
), (_
R 2
), (Æ
R ).
6. Conlusion
This paper has presented two proof searh aluli for Lax Logi. The rst, PFLAX,
is a sequent alulus for rst-order quantied Lax Logi. The proofs allowed by this
alulusnaturallyorrespondina1{1waytothenormalnaturaldedutionsforrst-order
quantied LaxLogi. Thealulusis wellsuited forenumerating,withoutredundany,
allproofs in thelogi.This makesthe alulususefulin ontexts whereproof searh is
fornormalnaturaldedutions,suhasin(onstraint)logiprogramming.
The seond alulus, PFLAX
Hist
, builds on the propositional fragment of the rst
alulus to give a deision proedure for propositional Lax Logi. Propositional Lax
Logi has been used in hardware veriation and PFLAX
Hist
ould be of use in this
area.The alulus works by adding a historymehanism to the propositional alulus
to prevent looping. This tehnique is general and may be applied to a wide range of
sequentaluliforpropositionallogisto yielddeisionproedures.Webelievethat,to
date,PFLAX
Hist
istheonlyeetivedeisionproedureforpropositionalLaxLogi.
Aknowledgements IwouldliketothankRoyDykhoforhishelpfuladvieduringmany
usefulandinterestingdisussions.
Referenes
Avellone,A.andFerrari,M.(1996). AlmostDupliation-freeTableauCaluliforPropositional
LaxLogis. InTABLEAUX'96,volume1071ofLetureNotesinArtiialIntelligene,pages
48{64.Springer-Verlag.
Benton,P.N.,Bierman,G.M.,anddePaiva,V.(1998). ComputationalTypesfromaLogial
Perspetive. JournalofFuntionalProgramming,8(2):177{193.
Dykho, R. (1992). Contration-Free Sequent Caluli for Intuitionisti Logi. Journal of
SymboliLogi,57(3):795{807.
Dykho,R.andPinto,L.(1996).APermutation-freeSequentCalulusforIntuitionistiLogi.
TehnialReportCS/96/9,UniversityofStAndrews.
Dykho,R. andPinto,L.(1998). Cut-Eliminationand aPermutation-freeSequentCalulus
forIntuitionistiLogi. StudiaLogi,60:107{118.
Dykho,R. and Pinto, L. (1999). Permutability of Proofs in Intuitionisti Sequent Caluli.
TheoretialComputerSiene,212(1-2):141{155.
Fairtlough,M.andMendler,M.(1994). AnIntuitionistiModalLogiwithAppliationstothe
FormalVeriationofHardware. InComputerSieneLogi,pages354{68.Springer-Verlag.
Fairtlough,M.andMendler,M.(1997).PropositionalLaxLogi.InformationandComputation,
137(1):1{33.
Fairtlough,M.,Mendler,M.,andWalton,M.(1997). First-orderLaxLogiasaFrameworkfor
Constraint LogiProgramming. TehnialReportMIPS-9714,UniversityofPassau.
Fairtlough, M. and Walton, M. (1997). Quantied Lax Logi. Tehnial Report CS-97-11,
UniversityofSheÆeld.
Gabbay,D.(1991).AlgorithmiProofwithDiminishingResoures,part1.InComputerSiene
Logi1990,volume533ofLetureNotesinComputerSiene,pages156{173.Springer-Verlag.
Gentzen, G. (1969). The Colleted Papers of Gerhard Gentzen. North-Holland, Amsterdam.
EditedM.E.Szabo.
Girard,J.-Y.(1991). ANew Construtive Logi:Classial Logi. MathematialStrutures in
ComputerSiene,1:255{296.
Herbelin, H. (1995). A -alulus Struture Isomorphi to Gentzen-style Sequent Calulus
Struture.InPaholski,L.andTiuryn,J.,editors,ComputerSieneLogi1994,volume933
ofLeture NotesinComputerSiene,pages61{75.Springer-Verlag.
Heuerding,A. (1998). Sequent Caluli for Proof Searh in Some Modal Logis. PhD thesis,
UniversitatBern.
Heuerding,A.,Seyfried, M.,andZimmermann,H.(1996). EÆientLoop-ChekforBakward
Proof Searhin Some Non-lassial Propositional Logis. InTABLEAUX'96,volume 933,
pages61{75.Springer-Verlag.
Howe,J.M.(1997).TwoLoopDetetionMehanisms:aComparison.LetureNotesinArtiial
Intelligene,1227:188{200.
Howe, J. M. (1998). Proof Searh Issues in Some Non-Classial Logis. PhD thesis,
Uni-versity of St Andrews. Available as Tehnial Report CS/99/1 and eletronially from
http://www.s.uk.a.uk/peop le/s taff/ jmh1 .
Howe,J.M.(1999). ProofSearhinLaxLogi. TehnialReport14-99,UniversityofKent.
Hudelmaier,J.(1993). AnO(nlog n)-spaeDeisionProedureforIntuitionistiPropositional
Logi. JournalofLogiandComputation,3(1):63{75.
Mendler,M.(1993). AModalLogiforHandlingBehaviouralConstraintsinFormalHardware
Veriation. PhDthesis,UniversityofEdinburgh. ECS-LFCS-93-255.
Miller,D.,Nadathur,G.,Pfenning,F.,andSedrov,A.(1991).UniformProofsasaFoundation
forLogiProgramming. AnnalsofPureandAppliedLogi,51(1-2):125{157.
Moggi,E.(1989). ComputationalLambda-CalulusandMonads. InLogiinComputerSiene
'89,pages14{23.
Prawitz,D.(1965). NaturalDedution,volume3ofStokholmStudiesinPhilosophy. Almqvist
&Wiksell,Stokholm.
Walton, M. (1998). First-Order Lax Logi: A Framework for Abstration, Constraints and