• No results found

Assertions: Forward Application

In the case of forward application, none of the conclusions of the inference has been instantiated, but at least for one premise p it holds that paiI(p) 6= ⊥. The expected

effect of the application of such an inference – at least when applied at top-level – is the derivation of a new fact, given by the conclusion of the inference, together with additional subgoals for the uninstantiated premises. While our inference mechanism will be much more general, it is our design goal to obtain the usual transformation described above when restricting the premise positions to top-level formulas in the antecedent of the sequent.

Similar to the case of backward application, the correctness of the transformation will be modeled by a sequence of resolution replacement rules, and as before, proof obliga- tions arise due to uninstantiated premises or because of the deep access to subformulas. One minor difference is the fact that we do not want a premise to be removed during the application. We therefore distinguish one special premise among the instantiated premises, called major premise, which takes over the role of the conclusion and which is copied by the application of the contraction rule. The remaining premises are called minor premises. Before considering the technical details of the transformation, let us illustrate the transformation by means of an example.

Example 6.5.1. We consider the inference

p1 : A⊂ B p2 : x∈ A

c : x∈ B Def-⊂ (6.89)

and the task

An application of the inference Def-subset with p1 instantiated with P(S) ⊂ P(T ) and

p2 instantiated with x∈ P(S) transforms the task in one step to

S ⊂ T ⇒ (x ∈ P(T ) ∧ P(S) ⊂ P(T )) , x ∈ P(S) ⊢ G (6.91) provided that p1 is the major premise. In the case that p2 is the major premise, the result

is

S ⊂ T ⇒ P(S) ⊂ P(T ), S ⊂ T ⇒ x ∈ P(T ), x ∈ P(S) ⊢ G (6.92) Note that because of the different insertion position, the condition S ⊂ T is copied. We focus on the first possibility and show the sequence resulting in the transformation in detail: α β A⊂ B+ β x∈ A+ x∈ B− α α β S ⊂ T+ P(S) ⊂ P(T )− x∈ P(S)− G+ ➀ α β A⊂ B+ β x∈ A+ x∈ B− α α β S ⊂ T+ α P(S) ⊂ P(T )− P(S) ⊂ P(T )− x∈ P(S)− G+ ➁ α β A ⊂ B+ β x∈ A+ x∈ B− α α β S ⊂ T+ α β x∈ P(S)+ x∈ P(T )− P(S) ⊂ P(T )− x∈ P(S)− G+ ➂ ζP(I(p1)) ζP(I(c))

First, the major premise is contracted, as indicated by ➀. In a second step (➁), the replacement rule induced by the major premise is applied. As shown above, all premise nodes of the inference – except the major premise – as well as all conclusions (dashed box) have been transferred to the task part of the free variable task tree. As in the case of backward application, this induces a mapping ζP that identifies a substructure of the re-

placed premise for each minor premise of the inference and all conclusions. This mapping is then used to apply all replacement rules induced by the minor premises, as indicated by ➂. For convenience, it is useful to denote the left copy of the major premise p (after the application of the contraction rule) by ζP(paiTI(p)).

1. Increase the multiplicity of all involved meta-variables of the inference. 2. Apply the contraction rule to the instantiated major premise, i.e., to paiT

I(p). Denote

the left copy by ζP(paiTI(p)).

3. Apply the resolution replacement rule induced by the major premise p of the infer- ence, i.e., the replacement rule between the nodes

I(p), ζP(paiTI(p)) (6.93)

where ζP(paiTI(p)) is replaced. This results in the transfer of all minor premises

p1, . . . , pnas well as the conclusions c1, . . . , cn of the inference to ζP(paiTI(p). Denote

them by

ζP(I(p1)), . . . , ζP(I(pn))3 and ζP(I(c)) (for the combined conclusions).

4. For each instantiated minor premise pi (1 ≤ i ≤ n) apply its induced resolution

replacement rule, i.e., the replacement rule between the nodes

paiTI(pi), ζP(I(pi)) (6.94)

where ζP(I(p′)) is replaced.

5. Weaken the formula to clean the task tree.

As in the backward case, we can take advantage of the structural properties of task trees and define the proof obligation of a single premise locally. The overall proof obliga- tions are then composed by the proof obligations of the minor premises.

Definition 6.5.2 (Forward Inference Conditions). Let I be an inference with premise labels p1, . . . , pn, T be a task, and paiTI be a forward partial argument instantiation with

respect to I and T . For each label l denoting a minor premise, the conditions of l are then defined as follows:

POBfw(l) =

  

Label(I(l))σ if paiTI(l) = POBP(paiTI(l), paiTI(p))σ else

(6.95) The overall conditions of the paiT

I are then given by n

^

i=1

POBfw(pi) (6.96)

Therefore, the positions paiT

I do not change.

Remark 6.5.3. (i) In Definition 6.5.2, the proof obligations of an instantiated minor premise l are defined with respect to the major premise p asPOBP(paiTI(l), paiTI(p)).

The arising conditions are exactly the same as POBP(paiTI(l), ζP(paiTI(p)), but the

former definition is more elegant as it avoids the use of ζP.

(ii) The application of the contraction rule to the task position corresponding to the major premise paiT

I(p) does not change the other positions, as task positions are

non-overlapping (see Definition 6.3.5).

3

As in the backward case, we use the notion p to denote “closure” of a premise, i.e., the premise together with its hypotheses, see Notation 6.2.8

To clarify the definition, we illustrate it by means of an example.

Example 6.5.4. In Example 6.5.1 with p1 as major premise, there is only one minor

premise, namely p2, which is also instantiated. Therefore, POBfw(p2) is given by the

proof obligations between the task position of p1, i.e., paiTI(p1) and paiTI(p2). The node

that governs both positions is the one indicated by the dashed box; let us call the node a. As there are no β formulas on the path from paiT

I(p2) to a, there are no proof obligations,

i.e., POBfw(p2) = true.

α β A⊂ B+ β x∈ A+ x∈ B− α α β S ⊂ T+ P(S) ⊂ P(T )− x∈ P(S)− G+

The overall effect of the forward application can now be defined as the replacement of the left copy of the major premise, i.e., ζP(paiTI(p)), by the overall proof obligation

(see Definition 6.5.2). The windows are adapted as follows: If the major premise does not denote a top-level formula, that is, it does not correspond to a substructure corresponding to a window, nothing needs to be changed: There is a parent node covered by a window, and the parent node will still be covered after the replacement. As the window structure was spanning before, it will be spanning after the replacement. In the other case, where the major premise denotes a top-level formula, the windows need to be adapted: The original window covering the major premise is removed, and two new windows are inserted, one corresponding to the new fact, and one corresponding to the copy of the replaced fact. Definition 6.5.5 (Forward Inference Rule Application). LetI be an inference with major premise p and minor premises p1, . . . , pn, T be a task of the task tree (S, f ), and paiTI be

a forward PAI with respect to I and T . Moreover, let c denote the node that is maximal with respect to ≺ and contains all conclusions. The effect of applying the PAI consists of replacing the task position corresponding to the major premise by a copy of it and the new fact including its induced proof obligations, i.e.,

S|paiT I(p)←(S

,f) (6.97)

where S′ is the substructure of the formula tree corresponding to the formula

α(β(

n

^

i=1

POBfw(pi), Label(I(c)), Label(paiTI(p)) (6.98)

and f′ is defined as follows: • If paiT

I(p) is an antecedent formula, i.e., there is an m ∈ dom(f) with f(m) =

paiT I(p), f′(n) :=        s1 if n = m s2 if n = m′ undefined otherwise (6.99) where s1 and s2 denote the immediate substructures of f (m).

• Otherwise f′(n) undefined for all n ∈ dom(f).

Example 6.5.6. The overall effect of a forward application of an inference has already been illustrated in Example 6.5.1. In the example, the node corresponding toP(S) ⊂ P(T ) is replaced by a new formula tree, which is composed of the following parts

• the proof obligations from p2, i.e., true.

• the conclusion of the inference, i.e., x ∈ P(T ) = Label(I(c)). • a copy of the major premise, i.e., P(S) ⊂ P(T ) = Label(paiT

I(p)).

The window structure is not changed, as there is no window pointing to the node P(S) ⊂ P(T ).

We show subsequently that the effect of the application of paiT

I can be modeled by a

sequence of resolution replacement rules. We proceed stepwise and characterize first the structure of the task tree after the application of the contraction rule and the replacement rule induced by the major premise.

Theorem 6.5.7. LetI be an inference with minor premises p1, . . . , pn and major premise

p. Moreover, let c denote the inference node that is maximal with respect to ≺ and contains all conclusions, T be a task and paiT

I be a forward PAI. After the application of

the contraction rule to paiT

I(p), the replacement rule induced by the major premise paiTI

is admissible. The overall replacement of both steps is paiTI(p) → α(β(

n

^

i=1

Label(I(pi)), Label(I(c))), Label(paiTI(p)))σ (6.100) Before giving the proof of this theorem, let us clarify the involved notation by means of an example.

Example 6.5.8. Let us again consider Example 6.5.1. After the application of the con- traction rule, we are in the situation depicted top right in the picture on page 102. Ap- plication of the replacement rule induced by the major premise results in the β-insertion of all nodes on the path to the root node that are maximal and β-related to A ⊂ B. In the example, this is the single node x ∈ A ⇒ x ∈ B. The theorem characterizes this proof obligation on a finer level, namely as conjunction of all minor premises (including their hypotheses), i.e., x∈ A for our example, and the conclusion x ∈ B in our example. Indeed, β(x ∈ A+, x∈ B) = x∈ A ⇒ x ∈ B.

Proof. Let Rc denote the node in the task tree corresponding to paiTI(p). According to

Definition 5.2.16, the contraction rule is applicable and results in the replacement of Rc

by

α(Label(Rc), Label(R′c))

Rc R′c

(6.101)

where R′

c is a copy of Rc. Due to condition (iii) of Definition 6.3.5, the task positions of the

minor premises are not affected. We subsequently work on Rcto perform the replacement.

The replacement rule induced by p is between the Rc andI(p). Note that I(p) has positive

polarity, while Rc inherits the polarity of paiTI(p), which is negative. Moreover, both nodes

σ. Therefore, the replacement rule is admissible. Let n1, . . . , nm denote the maximal

nodes from I(p) to the root node that are β-related to paiT

I(p). The application of the

PAI results in β-insertion of n1, . . . , nm. According to Theorem 6.2.5, the premises are

β-related to each other and β-related to all conclusions and all nodes covered. Therefore, β(n1, . . . , nm) = β(p1, . . . , pn, c). Consequently, Rc is replaced by

β(

n

^

i=1

Label(I(pi)), Label(c))∧ true

!

σ (6.102)

which, by the application of the simplification rule (see Definition 5.2.19) is simplified to β(

n

^

i=1

Label(I(pi)), Label(c))σ (6.103)

Consequently, the overall replacement is (6.100).

We now show that replacement rules induced by the minor premises are admissible and result in the proof state as specified in Definition 6.5.5. As a result, each instantiated minor premise is replaced by their induced proof obligations.

Example 6.5.9. Let us again consider Example 6.5.1. After the application of the con- traction rule and the replacement rule induced by the major premise, we are in the situation depicted at the bottom in the picture of page 102. Application of the induced replacement rule for p2 results in the replacement of x∈ P(S) by true.

Theorem 6.5.10. All induced premise resolution replacement rules are admissible. Ap- plication of all induced premise resolution replacement rules transforms (6.100) to the conditions of (6.98), i.e.,

α(β(

n

^

i=1

Label(I(pi)), Label(c)), Label(paiTI(p)))σ → α(β(

n

^

i=1

POBfw(pi), Label(c)), Label(paiTI(p)))σ

(6.104) Proof. The proof is done by induction over the number of instantiated minor premises |inst(P )|. It is sufficient to consider the replacement

n ^ i=1 Label(I(pi))→ ( n ^ i=1 POBfw(pi)) (6.105)

as all replacements occur within Label(I(pi)).

Base Case: If |inst(P )| = 0, then POBfw(pi) = Label(I(pi)) and (6.100) has already

the desired form.

Step Case: Let us now assume that |inst(P )| = n. Let p1, . . . , pn−1 denote the first

n− 1 minor premises. By induction hypothesis, we can assume that the first n − 1 replacement rules are admissible. Therefore, we have

n ^ i=1 Label(I(pi)) = n−1^ i=1 Label(I(pi))∧ pn (6.106) → ( n−1^ i=1 POBfw(pi))∧ pn (6.107)

pn induces a resolution replacement rule between ζP(I(pn)) and paiTI(pn). Both have

opposite polarity. Moreover, they are α-related due to Definition 6.3.5 and therefore connectable via the substitution σ. The conditions of the replacement rule are

POBP(ζP(I(pn)), paiTI(pn)). Therefore the application of the rule results in

(

n−1^ i=1

POBfw(pi))∧ POBP(ζP(I(pn)), paiTI(pn)) = n

^

i=1

POBfw(pi) (6.108)

What remains to be shown is that the resulting task proof state is consistent. Lemma 6.5.11. The modified task proof state is consistent.

Proof. We have to show that the modified task is still a sequent. There are two cases to consider, depending on whether the replaced conclusion formula is a sequent formula or not.

Case 1: If the replaced conclusion is not a sequent formula, the substructures do not change during the application. As the task proof state was consistent before the application of the rule, the sequential property does also hold after the replacement of the substructure.

Case 2: If the replaced conclusion is a sequent formula, f′ is constructed according to (6.99) respectively.

In both situations, the new windows are spanning for paiT

I(c). Therefore, the combination

of f ,f′ is spanning. Moreover, as all new windows are α-related to each other, the task

state is sequential.

Putting our observations together, we obtain the correctness result of the forward appli- cation.

Theorem 6.5.12 (Correctness of Forward Rule Application). Let I be an inference, T be a task and paiT

I be a forward PAI. Then the effect of paiTI can be modeled by a sequence

of Core inference rules. Moreover, the resulting proof state is consistent. Proof. By Theorem (6.5.7), Theorem (6.5.10), and Lemma (6.5.11)

Discussion: The transformation defined above contains an explicit choice point, namely the selection of the major premise (see Example 6.5.1), upon which the resulting proof state depends. The choice point emerges as soon as more than one premise of a given inference is instantiated, because the only condition the major premise has to satisfy is that the corresponding premise is instantiated in the PAI. Therefore, one may ask whether and to what extent the choice matters. To answer this, one must understand that the major premise specifies the position at which the new fact, including the condition upon which it depends, is inserted. It is important to note that the conditions themselves depend on this position and might be reduced in the case that several premises are matched within the same sequent formula. As an example, consider the following situation:

and imagine an inference that allows the derivation of the fact B given the facts A and Q. Selecting A as major premise results in the task

A,¬P ⇒ B ⊢ P ∧ (Q ⇒ R) (6.110)

whereas using Q as major premise results in

A⊢ P ∧ ((Q ∧ B) ⇒ R) (6.111)

Intuitively, in the second case the new fact is locally derived for the subgoal R, while in the former case it is derived for all available goals. As a consequence, the condition ¬P needs not to be introduced.

Despite the presence of situations as illustrated above, let us note that it is common in practice to restrict the candidates for premises to those subformulas which do not introduce proof obligations. In this case, the choice of the major premise does not matter.