1
- Proving Full Correctness All-Path Reachability Claims
1
+ Proving Total Corectness All-Path Reachability Claims
2
2
=====================================================
3
3
4
- This document details Full Correctness All-Path Reachability without solving the
5
- most-general-unifier (MGU) problem.
6
- MGU will be detailed in a separate document.
4
+ This document details Total Corectness All-Path Reachability.
7
5
8
6
_ Prepared by Traian Șerbănuță, based on [ proving All-Path Reachability
9
7
claims] ( 2019-03-28-All-Path-Reachability-Proofs.md ) _
10
8
11
9
Definitions
12
10
-----------
13
11
12
+ In the following, by abuse of notation, we will identify a formula with the set
13
+ of configurations it denotes, thus equality between formulae would mean that
14
+ they are equisatisfiable (they denote the same set of configurations).
15
+
14
16
### All-path finally
15
17
16
- Given a formula ` φ ` , let ` ♢φ ` denote the formula “all-path finally” ` φ ` ,
18
+ Given a formula ` φ ` , let ` AFφ ` denote the formula “all-path finally” ` φ ` ,
17
19
defined by:
18
20
19
21
```
20
- ♢φ := μX.φ ∨ (○X ∧ •⊤)
22
+ AFφ := μX.φ ∨ (○X ∧ •⊤)
21
23
```
22
24
23
- one consequence of the above is that ` ♢φ ≡ φ ∨ (○♢φ ∧ •⊤) ` .
25
+ #### Semantics of ` AFφ `
26
+
27
+ By the definition above, ` AFφ ` is semantically defined as ` LFP(G) ` , the
28
+ least-fix-point of the following mapping:
24
29
25
- Given this definition of all-path finally, a full correctness all-path
26
- reachability claim
27
30
```
28
- ∀x.φ(x) → ♢∃z.ψ(x,z )
31
+ G(X) := φ ∨ (○X ∧ •⊤ )
29
32
```
30
- basically states that if ` φ(x) ` holds for a configuration ` γ ` , for some ` x ` ,
31
- then ` P(γ) ` holds, where ` P(G) ` is recursively defined on configurations as:
32
- * there exists ` z ` such that ` ψ(x,z) ` holds for ` G `
33
- * or
34
- * ` G ` is not stuck (` G → • T ` ) and
35
- * ` P(G') ` for all configurations ` G' ` in which ` G ` can transition
36
33
37
- __ Note:__
38
- Using the least fix-point (` μ ` ) instead of the greatest fix-point (` ν ` )
39
- restricts paths to finite ones. Therefore, the intepretation of a reachability
40
- claim guarantees full-correctness, as it requires that the conclusion is
41
- reached in a finite number of steps.
34
+ Note that ` G(X) ` can be interpreted as the union between the set of
35
+ configurations for which ` φ ` holds and those which are not stuck and whose all
36
+ possible transitions lead into ` X ` .
37
+
38
+ Since ` AFφ ` is a fixed-point of ` G ` , the identity ` G(AFφ) = AFφ ` holds, whence
39
+ ` AFφ = φ ∨ (○AFφ ∧ •⊤) ` .
40
+
41
+ Moreover, ` G ` is monotone (` X ` occurs in a positive position) and we can show
42
+ that the conditions of Kleene's fixed-point theorem are satisfied:
43
+ ` Gⁿ(⊥) ⊆ Gⁿ⁺¹(⊥) ` , because ` Gⁿ(⊥) ` denotes the set of configurations for which
44
+ on all paths, in at most ` n-1 ` steps, ` φ ` holds.
45
+
46
+ Let us argue the above by induction on ` n-1 ` .
47
+ - Base case: ` G(⊥) = φ ∨ (○⊥ ∧ •⊤) = φ ∨ (¬•¬⊥ ∧ •⊤) = φ ∨ (¬•⊤ ∧ •⊤) = φ ∨ ⊥ = φ ` ,
48
+ so ` G(⊥) ` is the set of configurations for which ` φ ` holds.
49
+ - Induction case: Assuming ` Gⁿ(⊥) ` denotes the set of configurations for which
50
+ on all paths, in at most ` n-1 ` steps, ` φ ` holds, ` Gⁿ⁺¹(⊥) = G(Gⁿ(⊥)) ` will be
51
+ the union between the set of configurations for which ` φ ` holds and those
52
+ which are not stuck and whose all possible transitions lead into the set of
53
+ configurations for which on all paths, in at most ` n-1 ` steps, ` φ ` holds, but
54
+ these are precisely the configurations for which on all paths, in at most ` n `
55
+ steps, ` φ ` holds.
56
+
57
+ From Kleene's theorem, ` AFφ = ⋁ₙGⁿ(⊥) ` , whence, a configuration is in ` AFφ ` iff
58
+ it is in ` Gⁿ(⊥) ` for some positive integer ` n ` . By the characterization of
59
+ ` Gⁿ(⊥) ` presented above, it follows that ` AFφ ` denotes the set of configurations
60
+ for which on all paths, in a finite number of steps, ` φ ` holds.
61
+
62
+ ### Total corectness all-path reachability claims
63
+
64
+ Given this definition of all-path finally, a total corectness all-path
65
+ reachability claim is of the form
66
+ ```
67
+ ∀x.φ(x) → AF∃z.ψ(x,z)
68
+ ```
69
+ and basically states that from any configuration ` γ ` satisfying ` φ(x) `
70
+ for some ` x ` , a configuration satisfying ` ψ(x,z) ` for some ` z ` will be reached
71
+ in a finite number of steps on any path.
72
+
73
+ Since the configuration is reached after a finite number of steps,
74
+ such reachability claims guarantee total corectness.
42
75
43
76
Problem Description
44
77
-------------------
45
78
46
- Given a set of reachability claims, of the form ` ∀x.φ(x) → ♢ ∃z.ψ(x,z) ` ,
79
+ Given a set of reachability claims, of the form ` ∀x.φ(x) → AF ∃z.ψ(x,z) ` ,
47
80
we are trying to prove all of them together, by well-founded induction on a
48
81
given ` measure ` defined on the quantified variables ` x ` .
49
82
@@ -68,7 +101,7 @@ claim group
68
101
69
102
. . .
70
103
71
- claim φᵢ(x) → ♢ ∃zᵢ.ψᵢ(x,zᵢ) [using(claimᵢ₁, ..., claimᵢₖ)]
104
+ claim φᵢ(x) → AF ∃zᵢ.ψᵢ(x,zᵢ) [using(claimᵢ₁, ..., claimᵢₖ)]
72
105
73
106
. . .
74
107
@@ -92,7 +125,7 @@ have already been proven. Assume also a given integer pattern `measure(x)`,
92
125
over the same variables as the claims in the group.
93
126
94
127
Since we're proving all claims together, we can gather them in a single goal,
95
- ` P(x) ::= (φ₁(x) → ♢ ∃z.ψ₁(x,z)) ∧ ... ∧ (φₙ(x) → ♢ ∃z.ψₙ(x,z)) ` .
128
+ ` P(x) ::= (φ₁(x) → AF ∃z.ψ₁(x,z)) ∧ ... ∧ (φₙ(x) → AF ∃z.ψₙ(x,z)) ` .
96
129
97
130
A well-founded induction principle allowing to prove ` P ` using ` measure ` would
98
131
be of the form
@@ -113,19 +146,19 @@ hypothesis `forall x, 0 <= measure(x) < measure(x0) -> P(x)`, we need to prove
113
146
By first-order manipulation we can transform the induction hypothesis for ` P `
114
147
into a set of induction hypotheses, one for each claim:
115
148
```
116
- ∀x. φᵢ(x) ∧ 0 ≤ measure(x) < measure(x₀) → ♢ ∃z.ψᵢ(x,z)
149
+ ∀x. φᵢ(x) ∧ 0 ≤ measure(x) < measure(x₀) → AF ∃z.ψᵢ(x,z)
117
150
```
118
151
119
- Similarly we can split the goal into a separate goal ` φᵢ(x₀) → ♢ ∃z.ψᵢ(x₀,z) `
152
+ Similarly we can split the goal into a separate goal ` φᵢ(x₀) → AF ∃z.ψᵢ(x₀,z) `
120
153
for each claim.
121
154
122
155
Since we might be using the claims to advance the proof of the claim, to avoid
123
156
confusion (and to reduce caring about indices) we will denote a goal with
124
- ` φ(x₀) → ♢ ∃z.ψ(x₀,z) ` in all subsequent steps, although the exact goal might
157
+ ` φ(x₀) → AF ∃z.ψ(x₀,z) ` in all subsequent steps, although the exact goal might
125
158
change from one step to the next.
126
159
127
160
Moreover, we will consider the induction hypotheses to be derived claims to
128
- be applied as circularities, and denote them as ` ∀x. φᵢ(x) → ♢ ∃z.ψᵢ(x,z) ` ,
161
+ be applied as circularities, and denote them as ` ∀x. φᵢ(x) → AF ∃z.ψᵢ(x,z) ` ,
129
162
where ` φᵢ(x) ` also contains the guard ` 0 ≤ measure(x) < measure(x₀) ` .
130
163
131
164
### Background on unification and remainders of unification
@@ -182,20 +215,20 @@ First, let us eliminate the case when the conclusion holds now. We have
182
215
the following sequence of equivalent claims:
183
216
184
217
```
185
- φ(x₀) → ♢ ∃z.ψ(x₀,z)
186
- (φ(x₀) ∧ ∃z.ψ(x₀, z)) ∨ (φ(x₀) ∧ ¬∃z.ψ(x₀, z)) → ♢ ∃z.ψ(x₀,z)
187
- (φ(x₀) ∧ ∃z.ψ(x₀, z) → ♢ ∃z.ψ(x₀,z)) ∧ (φ(x₀) ∧ ¬∃z.ψ(x₀, z) → ♢ ∃z.ψ(x₀,z))
218
+ φ(x₀) → AF ∃z.ψ(x₀,z)
219
+ (φ(x₀) ∧ ∃z.ψ(x₀, z)) ∨ (φ(x₀) ∧ ¬∃z.ψ(x₀, z)) → AF ∃z.ψ(x₀,z)
220
+ (φ(x₀) ∧ ∃z.ψ(x₀, z) → AF ∃z.ψ(x₀,z)) ∧ (φ(x₀) ∧ ¬∃z.ψ(x₀, z) → AF ∃z.ψ(x₀,z))
188
221
```
189
222
190
- The first conjunct, ` φ(x₀) ∧ ∃z.ψ(x₀, z) → ♢ ∃z.ψ(x₀,z) ` can be discharged by
191
- unrolling ` ♢ ∃z.ψ(x₀,z)` to ` ∃z.ψ(x₀,z) φ ∨ (○♢ ∃z.ψ(x₀,z) ∧ •⊤) ` , and then
223
+ The first conjunct, ` φ(x₀) ∧ ∃z.ψ(x₀, z) → AF ∃z.ψ(x₀,z) ` can be discharged by
224
+ unrolling ` AF ∃z.ψ(x₀,z)` to ` ∃z.ψ(x₀,z) φ ∨ (○AF ∃z.ψ(x₀,z) ∧ •⊤) ` , and then
192
225
using that ` ∃z.ψ(x₀, z) ` appears in both lhs (as a conjunct) and rhs (as a
193
226
disjunct).
194
227
195
228
This reduces the above to proving the following remainder claim:
196
229
197
230
```
198
- φ(x₀) ∧ ¬∃z.ψ(x₀, z) → ♢ ∃z.ψ(x₀,z)
231
+ φ(x₀) ∧ ¬∃z.ψ(x₀, z) → AF ∃z.ψ(x₀,z)
199
232
```
200
233
201
234
Note that ` φ(x₀) ∧ ¬∃z.ψ(x₀, z) ` is also an extended function-like pattern, as
@@ -206,32 +239,32 @@ If `φ(x₀)` is equivalent to `⊥`, then the implication holds and we are done
206
239
### Applying (extended) claims
207
240
208
241
Since both circularities (induction hypotheses) and already proven claims are of
209
- the form ` ∀x.φᵢ(x) → ♢ ∃z.ψᵢ(x,z) ` , we will refer to all as extended claims.
210
- Let ` ∀x.φᵢ(x) → ♢ ∃z.ψᵢ(x,z) ` denote the ith induction hypothesis or already
242
+ the form ` ∀x.φᵢ(x) → AF ∃z.ψᵢ(x,z) ` , we will refer to all as extended claims.
243
+ Let ` ∀x.φᵢ(x) → AF ∃z.ψᵢ(x,z) ` denote the ith induction hypothesis or already
211
244
proven claim.
212
245
213
246
```
214
- φ(x₀) → ♢ ∃z.ψ(x₀,z)
215
- φ(x₀) ∧ (∃x.φ₁(x) ∨ … ∨ ∃x.φₙ(x) ∨ (¬∃x.φ₁(x) ∧ … ∧ ¬∃x.φₙ(x))) → ♢ ∃z.ψ(x₀,z)
216
- (φ(x₀) ∧ ∃x.φ₁(x)) ∨ … ∨ (φ(x₀) ∧ ∃x.φₙ(x)) ∨ (φ(x₀) ∧ (¬∃x.φ₁(x) ∧ … ∧ ¬∃x.φₙ(x))) → ♢ ∃z.ψ(x₀,z)
217
- (φ(x₀) ∧ ∃x.φ₁(x) → ♢ ∃z.ψ(x₀,z)) ∧ … (φ(x₀) ∧ ∃x.φₙ(x) → ♢ ∃z.ψ(x₀,z))
218
- ∧ (φ(x₀) ∧ (¬∃x.φ₁(x) ∧ … ∧ ¬∃x.φₙ(x)) → ♢ ∃z.ψ(x₀,z))
247
+ φ(x₀) → AF ∃z.ψ(x₀,z)
248
+ φ(x₀) ∧ (∃x.φ₁(x) ∨ … ∨ ∃x.φₙ(x) ∨ (¬∃x.φ₁(x) ∧ … ∧ ¬∃x.φₙ(x))) → AF ∃z.ψ(x₀,z)
249
+ (φ(x₀) ∧ ∃x.φ₁(x)) ∨ … ∨ (φ(x₀) ∧ ∃x.φₙ(x)) ∨ (φ(x₀) ∧ (¬∃x.φ₁(x) ∧ … ∧ ¬∃x.φₙ(x))) → AF ∃z.ψ(x₀,z)
250
+ (φ(x₀) ∧ ∃x.φ₁(x) → AF ∃z.ψ(x₀,z)) ∧ … (φ(x₀) ∧ ∃x.φₙ(x) → AF ∃z.ψ(x₀,z))
251
+ ∧ (φ(x₀) ∧ (¬∃x.φ₁(x) ∧ … ∧ ¬∃x.φₙ(x)) → AF ∃z.ψ(x₀,z))
219
252
```
220
253
221
254
assuming that ` ⌈φ(x₀) ∧ φᵢ(x)⌉ ≡ (x = tᵢ(x₀)) ∧ pᵢ(x₀, x) ` for each ` i ` ,
222
255
the above is equivalent with:
223
256
```
224
- (φ₁(t₁(x₀)) ∧ p₁(x₀, t₁(x₀)) → ♢ ∃z.ψ(x₀,z)) ∧ … (φₙ(tₙ(x₀)) ∧ pₙ(x₀, tₙ(x₀)) → ♢ ∃z.ψ(x₀,z))
225
- ∧ (φ(x₀) ∧ ¬p₁(x₀, t₁(x₀)) ∧ … ∧ ¬pₙ(x₀, tₙ(x₀)) → ♢ ∃z.ψ(x₀,z))
257
+ (φ₁(t₁(x₀)) ∧ p₁(x₀, t₁(x₀)) → AF ∃z.ψ(x₀,z)) ∧ … (φₙ(tₙ(x₀)) ∧ pₙ(x₀, tₙ(x₀)) → AF ∃z.ψ(x₀,z))
258
+ ∧ (φ(x₀) ∧ ¬p₁(x₀, t₁(x₀)) ∧ … ∧ ¬pₙ(x₀, tₙ(x₀)) → AF ∃z.ψ(x₀,z))
226
259
```
227
260
228
261
This can be split into proving a goal for each extended claim,
229
262
```
230
- φᵢ(tᵢ(x₀)) ∧ pᵢ(x₀, tᵢ(x₀)) → ♢ ∃z.ψ(x₀,z)
263
+ φᵢ(tᵢ(x₀)) ∧ pᵢ(x₀, tᵢ(x₀)) → AF ∃z.ψ(x₀,z)
231
264
```
232
265
and one for the remainder
233
266
```
234
- φ(x₀) ∧ ¬p₁(x₀, t₁(x₀)) ∧ … ∧ ¬pₙ(x₀, tₙ(x₀) → ♢ ∃z.ψ(x₀,z))
267
+ φ(x₀) ∧ ¬p₁(x₀, t₁(x₀)) ∧ … ∧ ¬pₙ(x₀, tₙ(x₀) → AF ∃z.ψ(x₀,z))
235
268
```
236
269
237
270
Note that, in particular, part of the predicate of the remainder will include
@@ -240,18 +273,18 @@ the negation of the measure check for each induction hypothesis, of the form
240
273
241
274
#### Using a claim to advance the corresponding goal
242
275
243
- Assume ` φᵢ(tᵢ(x₀)) ∧ pᵢ(x₀, tᵢ(x₀)) → ♢ ∃z.ψ(x₀,z) ` goal to be proven
244
- and let ` ∀x. φᵢ(x) → ♢ ∃z.ψᵢ(x,z) ` be the corresponding extended claim.
276
+ Assume ` φᵢ(tᵢ(x₀)) ∧ pᵢ(x₀, tᵢ(x₀)) → AF ∃z.ψ(x₀,z) ` goal to be proven
277
+ and let ` ∀x. φᵢ(x) → AF ∃z.ψᵢ(x,z) ` be the corresponding extended claim.
245
278
By instatiating the claim with ` x := tᵢ(x₀) ` , we obtain
246
- ` φᵢ(tᵢ(x₀)) → ♢ ∃z.ψᵢ(tᵢ(x₀),z) ` ; then, by framing, we obtain
247
- ` φᵢ(tᵢ(x₀)) ∧ pᵢ(x₀, tᵢ(x₀)) → (♢ ∃z.ψᵢ(tᵢ(x₀),z)) ∧ pᵢ(x₀, tᵢ(x₀)) ` .
279
+ ` φᵢ(tᵢ(x₀)) → AF ∃z.ψᵢ(tᵢ(x₀),z) ` ; then, by framing, we obtain
280
+ ` φᵢ(tᵢ(x₀)) ∧ pᵢ(x₀, tᵢ(x₀)) → (AF ∃z.ψᵢ(tᵢ(x₀),z)) ∧ pᵢ(x₀, tᵢ(x₀)) ` .
248
281
Next, by predicate properties, we can obtain that
249
- ` φᵢ(tᵢ(x₀)) ∧ pᵢ(x₀, tᵢ(x₀)) → ♢ ∃z.(ψᵢ(tᵢ(x₀),z) ∧ pᵢ(x₀, tᵢ(x₀))) ` .
282
+ ` φᵢ(tᵢ(x₀)) ∧ pᵢ(x₀, tᵢ(x₀)) → AF ∃z.(ψᵢ(tᵢ(x₀),z) ∧ pᵢ(x₀, tᵢ(x₀))) ` .
250
283
251
284
We can use transitivity of ` → ` to replace the initial goal with
252
- ` ♢ ∃z.ψᵢ(tᵢ(x₀),z) ∧ pᵢ(x₀, tᵢ(x₀)) → ♢ ∃z.ψ(x₀,z)`
285
+ ` AF ∃z.ψᵢ(tᵢ(x₀),z) ∧ pᵢ(x₀, tᵢ(x₀)) → AF ∃z.ψ(x₀,z)`
253
286
This goal can soundly be replaced with
254
- ` ∀z.ψᵢ(tᵢ(x₀),z) ∧ pᵢ(x₀, tᵢ(x₀)) → ♢ ∃z.ψ(x₀,z) `
287
+ ` ∀z.ψᵢ(tᵢ(x₀),z) ∧ pᵢ(x₀, tᵢ(x₀)) → AF ∃z.ψ(x₀,z) `
255
288
as proving this goal would ensure that the above also holds.
256
289
257
290
#### Summary of applying extended claims
@@ -260,8 +293,8 @@ By applying the extended claims, we will replace the existing goal with a set
260
293
consisting of a goal for each extended claim (some with the hypothesis equivalent
261
294
with ` ⟂ ` ) and a remainder.
262
295
263
- - Goals associated to extended claims: ` ∀z.ψᵢ(tᵢ(x₀),z) ∧ pᵢ(x₀, tᵢ(x₀)) → ♢ ∃z.ψ(x₀,z) `
264
- - Goal associated to the remainder: ` φ(x₀) ∧ ¬p₁(x₀, t₁(x₀)) ∧ … ∧ ¬pₙ(x₀, tₙ(x₀) → ♢ ∃z.ψ(x₀,z)) `
296
+ - Goals associated to extended claims: ` ∀z.ψᵢ(tᵢ(x₀),z) ∧ pᵢ(x₀, tᵢ(x₀)) → AF ∃z.ψ(x₀,z) `
297
+ - Goal associated to the remainder: ` φ(x₀) ∧ ¬p₁(x₀, t₁(x₀)) ∧ … ∧ ¬pₙ(x₀, tₙ(x₀) → AF ∃z.ψ(x₀,z)) `
265
298
By abuse of notation, let ` φ(x₀) ` denote ` φ(x₀) ∧ ¬p₁(x₀, t₁(x₀)) ∧ … ∧ ¬pₙ(x₀, tₙ(x₀) `
266
299
267
300
### Applying axioms
@@ -270,16 +303,16 @@ The remainder from the above step denotes the case in which the conclusion
270
303
doesn't hold now, and neither of the extended claims can be applied.
271
304
272
305
We'll try therefore to apply one step from the semantics.
273
- Let ` φ(x₀) → ♢ ∃z.ψ(x₀,z)) ` be the remainder goal. We can unfold ` ♢ ` to obtain
274
- the equivalent ` φ(x₀) → ∃z.ψ(x₀,z) ∨ ((○♢ ∃z.ψ(x₀,z)) ∧ •⊤) ` . Since we know
306
+ Let ` φ(x₀) → AF ∃z.ψ(x₀,z)) ` be the remainder goal. We can unfold ` AF ` to obtain
307
+ the equivalent ` φ(x₀) → ∃z.ψ(x₀,z) ∨ ((○AF ∃z.ψ(x₀,z)) ∧ •⊤) ` . Since we know
275
308
that conclusion doesn't hold for ` φ(x₀) ` , we can replace the goal by
276
- ` φ(x₀) → (○♢ ∃z.ψ(x₀,z)) ∧ •⊤ ` , which is equivalent to
277
- ` (φ(x₀) → ○♢ ∃z.ψ(x₀, z)) ∧ (φ(x₀) → •⊤) `
309
+ ` φ(x₀) → (○AF ∃z.ψ(x₀,z)) ∧ •⊤ ` , which is equivalent to
310
+ ` (φ(x₀) → ○AF ∃z.ψ(x₀, z)) ∧ (φ(x₀) → •⊤) `
278
311
279
312
Therefore we need to check two things:
280
313
281
314
1 . That ` φ(x₀) ` is not stuck
282
- 1 . That ` φ(x₀) → ○♢ ∃z.ψ `
315
+ 1 . That ` φ(x₀) → ○AF ∃z.ψ `
283
316
284
317
Assume ` ∀xᵢ.φᵢ(xᵢ) → •∃zᵢ.ψᵢ(xᵢ,zᵢ), 1 ≤ i ≤ n ` are all the one-step axioms
285
318
in the definition, and ` P -> o ⋁ᵢ ∃xᵢ.⌈P ∧ φᵢ(xᵢ)⌉ ∧ ∃zᵢ.ψᵢ(xᵢ,zᵢ) `
@@ -298,14 +331,14 @@ to apply all axioms (i.e., the lhs of the last conjunct) is not equivalent to `
298
331
299
332
We want to prove that from the STEP rule and
300
333
```
301
- (∀z₁.∃x₁.ψ₁(x₁,z₁) ∧ ⌈φ(x₀) ∧ φ₁(x₁)⌉ → ♢ ∃z.ψ(x₀,z)) ∧ … ∧ (∀zₙ.∃xₙ.ψₙ(xₙ,zₙ) ∧ ⌈φ(x₀) ∧ φₙ(xₙ)⌉ → ♢ ∃z.ψ(x₀,z))
334
+ (∀z₁.∃x₁.ψ₁(x₁,z₁) ∧ ⌈φ(x₀) ∧ φ₁(x₁)⌉ → AF ∃z.ψ(x₀,z)) ∧ … ∧ (∀zₙ.∃xₙ.ψₙ(xₙ,zₙ) ∧ ⌈φ(x₀) ∧ φₙ(xₙ)⌉ → AF ∃z.ψ(x₀,z))
302
335
```
303
336
304
- we can derive ` φ(x₀) → ○♢ ∃z.ψ(x₀,z) `
337
+ we can derive ` φ(x₀) → ○AF ∃z.ψ(x₀,z) `
305
338
306
- This would allow us to replace the goal ` φ(x₀) → ○♢ ∃z.ψ(x₀,z) ` with the set of goals
339
+ This would allow us to replace the goal ` φ(x₀) → ○AF ∃z.ψ(x₀,z) ` with the set of goals
307
340
```
308
- { ∀zᵢ.ψᵢ(tᵢ(x₀),zᵢ) ∧ pᵢ(tᵢ(x₀)) → ♢ ∃z.ψ(x₀,z) : 1 ≤ i ≤ n }
341
+ { ∀zᵢ.ψᵢ(tᵢ(x₀),zᵢ) ∧ pᵢ(tᵢ(x₀)) → AF ∃z.ψ(x₀,z) : 1 ≤ i ≤ n }
309
342
```
310
343
311
344
_ Proof:_
@@ -317,17 +350,17 @@ Apply `(STEP)` on `φ(x₀)`, and we obtain that
317
350
318
351
We can replace our goal succesively with:
319
352
```
320
- o ⋁ᵢ ∃xᵢ.⌈φ(x₀) ∧ φᵢ(xᵢ)⌉ ∧ ∃zᵢ.ψᵢ(xᵢ,zᵢ) → ○♢ ∃z.ψ(x₀, z) // transitivity of →
321
- ⋁ᵢ ∃xᵢ.⌈φ(x₀) ∧ φᵢ(xᵢ)⌉ ∧ ∃zᵢ.ψᵢ(xᵢ,zᵢ) → ♢ ∃z.ψ(x₀, z) // framing on ○
322
- ∃xᵢ.⌈φ(x₀) ∧ φᵢ(xᵢ)⌉ ∧ ∃zᵢ.ψᵢ(xᵢ,zᵢ) → ♢ ∃z.ψ(x₀, z) for all i
353
+ o ⋁ᵢ ∃xᵢ.⌈φ(x₀) ∧ φᵢ(xᵢ)⌉ ∧ ∃zᵢ.ψᵢ(xᵢ,zᵢ) → ○AF ∃z.ψ(x₀, z) // transitivity of →
354
+ ⋁ᵢ ∃xᵢ.⌈φ(x₀) ∧ φᵢ(xᵢ)⌉ ∧ ∃zᵢ.ψᵢ(xᵢ,zᵢ) → AF ∃z.ψ(x₀, z) // framing on ○
355
+ ∃xᵢ.⌈φ(x₀) ∧ φᵢ(xᵢ)⌉ ∧ ∃zᵢ.ψᵢ(xᵢ,zᵢ) → AF ∃z.ψ(x₀, z) for all i
323
356
```
324
357
325
358
#### Summary of applying the claims
326
359
327
360
- Check that the remainder ` φ(x₀) ∧ ¬p₁(t₁(x₀)) ∧ … ∧ ¬pₙ(tₙ(x₀))) ` is equivalent to ` ⟂ `
328
- - Replace the goal ` φ(x₀) → ○♢ ∃z.ψ(x₀,z) ` by the set of goals
361
+ - Replace the goal ` φ(x₀) → ○AF ∃z.ψ(x₀,z) ` by the set of goals
329
362
```
330
- { ∀zᵢ.ψᵢ(tᵢ(x₀),zᵢ) ∧ pᵢ(tᵢ(x₀)) → ♢ ∃z.ψ(x₀,z) : 1 ≤ i ≤ n }
363
+ { ∀zᵢ.ψᵢ(tᵢ(x₀),zᵢ) ∧ pᵢ(tᵢ(x₀)) → AF ∃z.ψ(x₀,z) : 1 ≤ i ≤ n }
331
364
```
332
365
333
366
## Algorithms
@@ -349,14 +382,14 @@ never being applied and the proof looping (and branching) forever.
349
382
__ Input:__
350
383
351
384
- set of variables ` x `
352
- - claim group ` (φ₁(x) → ♢ ∃z.ψ₁(x,z)) ∧ ... ∧ (φₙ(x) → ♢ ∃z.ψₙ(x,z)) `
385
+ - claim group ` (φ₁(x) → AF ∃z.ψ₁(x,z)) ∧ ... ∧ (φₙ(x) → AF ∃z.ψₙ(x,z)) `
353
386
- decreasing ` measure(x) `
354
387
355
388
__ Output:__ Proved or Unproved
356
389
357
390
* Fix an instance ` x₀ ` for the variables ` x `
358
- * Let ` claims ::= { ∀ x . φᵢ(x) ∧ measure(x) <Int measure(x₀) → ♢ ∃z.ψᵢ(x,z) } `
359
- * For each claim ` φᵢ(x₀) → ♢ ∃z.ψᵢ(x₀,z) `
391
+ * Let ` claims ::= { ∀ x . φᵢ(x) ∧ measure(x) <Int measure(x₀) → AF ∃z.ψᵢ(x,z) } `
392
+ * For each claim ` φᵢ(x₀) → AF ∃z.ψᵢ(x₀,z) `
360
393
* check that ` φᵢ(x₀) → measure(x₀) >=Int 0 `
361
394
* Let ` claimsᵢ ::= claims ∪ { claimᵢ₁, ..., claimᵢₖ } `
362
395
* Let ` Goals := { φᵢ(x₀) } `
@@ -385,7 +418,7 @@ is equivalent to `φ ∧ ¬pᵢ[tᵢ/xᵢ]`.
385
418
386
419
__ Input:__ : goal ` φ ` and set of tuples ` { (xᵢ,φᵢ,zᵢ,ψᵢ) : 1 ≤ i ≤ n } ` representing either
387
420
388
- * extended claims ` { ∀xᵢ.φᵢ → ♢ ∃zᵢ.ψᵢ : 1 ≤ i ≤ n } ` , or
421
+ * extended claims ` { ∀xᵢ.φᵢ → AF ∃zᵢ.ψᵢ : 1 ≤ i ≤ n } ` , or
389
422
* axioms ` { ∀xᵢ.φᵢ → •∃zᵢ.ψᵢ : 1 ≤ i ≤ n } `
390
423
391
424
__ Output:__ ` (Goals, goalᵣₑₘ) `
@@ -394,19 +427,19 @@ __Output:__ `(Goals, goalᵣₑₘ)`
394
427
* Let ` Goals := { ∀z₁.(∃x₁.ψ₁ ∧ ⌈φ∧φ₁⌉), … , ∀zₙ.(∃xₙ.ψₙ ∧ ⌈φ∧φₙ⌉) } `
395
428
396
429
__ Note__ : ` ∀zᵢ.(∃xᵢ.ψᵢ ∧ ⌈φ∧φᵢ⌉) ` is obtained from
397
- ` (∃xᵢ.(∃zᵢ.ψᵢ) ∧ ⌈φ∧φᵢ⌉) → ♢ ∃z.ψ `
430
+ ` (∃xᵢ.(∃zᵢ.ψᵢ) ∧ ⌈φ∧φᵢ⌉) → AF ∃z.ψ `
398
431
399
432
__ Note__ : If the unfication condition ` ⌈φ ∧ φᵢ⌉ = (xᵢ=tᵢ)∧ pᵢ `
400
433
with ` tᵢ ` functional, ` pᵢ ` predicate, and ` tᵢ ` free of ` xi ` .
401
- Then the goal ` ∀zᵢ.(∃xᵢ.ψᵢ ∧ ⌈φ∧φᵢ⌉) → ♢ ∃z.ψ `
402
- is equivalent to ` ∀zᵢ.ψᵢ[tᵢ/xᵢ] ∧ pᵢ[tᵢ/xᵢ] → ♢ ∃z.ψ ` .
434
+ Then the goal ` ∀zᵢ.(∃xᵢ.ψᵢ ∧ ⌈φ∧φᵢ⌉) → AF ∃z.ψ `
435
+ is equivalent to ` ∀zᵢ.ψᵢ[tᵢ/xᵢ] ∧ pᵢ[tᵢ/xᵢ] → AF ∃z.ψ ` .
403
436
404
437
Similarly ` goalᵣₑₘ := (φ ∧ ¬∃x₁.⌈φ∧φ₁⌉ ∧ … ∧ ¬∃xₙ.⌈φ∧φₙ⌉) `
405
438
is equivalent to ` (φ ∧ ⋀ⱼ ¬pⱼ[tⱼ/xⱼ]) `
406
439
where ` j ` ranges over the set ` { i : 1 ≤ i ≤ n, φ unifies with φᵢ } ` .
407
440
408
441
__ Note__ : If ` φ ` does not unify with ` φᵢ ` , then ` ⌈φ∧φᵢ⌉ = ⊥ ` , hence
409
- the goal ` ∀x∪zᵢ.(∃xᵢ.ψᵢ ∧ ⌈φᵢʳᵉᵐ∧φᵢ⌉) → ♢ ∃z.ψ ` is equivalent to
410
- ` ∀x.⊥ → ♢ ∃z.ψ ` which can be discharged immediately. Also, in the
442
+ the goal ` ∀x∪zᵢ.(∃xᵢ.ψᵢ ∧ ⌈φᵢʳᵉᵐ∧φᵢ⌉) → AF ∃z.ψ ` is equivalent to
443
+ ` ∀x.⊥ → AF ∃z.ψ ` which can be discharged immediately. Also, in the
411
444
remainder ` ¬∃x₁.⌈φ∧φ₁⌉ = ⊤ ` so the conjunct can be removed.
412
445
0 commit comments