Skip to content

Commit 08ab519

Browse files
committed
Addressing review comments
1 parent ae8c673 commit 08ab519

File tree

1 file changed

+110
-77
lines changed

1 file changed

+110
-77
lines changed

docs/2022-04-07-Full-Corectness-All-Path-Reachability-Proofs.md renamed to docs/2022-04-07-Total-Corectness-All-Path-Reachability-Proofs.md

Lines changed: 110 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,82 @@
1-
Proving Full Correctness All-Path Reachability Claims
1+
Proving Total Corectness All-Path Reachability Claims
22
=====================================================
33

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.
75

86
_Prepared by Traian Șerbănuță, based on [proving All-Path Reachability
97
claims](2019-03-28-All-Path-Reachability-Proofs.md)_
108

119
Definitions
1210
-----------
1311

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+
1416
### All-path finally
1517

16-
Given a formula `φ`, let `♢φ` denote the formula “all-path finally” `φ`,
18+
Given a formula `φ`, let `AFφ` denote the formula “all-path finally” `φ`,
1719
defined by:
1820

1921
```
20-
♢φ := μX.φ ∨ (○X ∧ •⊤)
22+
AFφ := μX.φ ∨ (○X ∧ •⊤)
2123
```
2224

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:
2429

25-
Given this definition of all-path finally, a full correctness all-path
26-
reachability claim
2730
```
28-
∀x.φ(x) → ♢∃z.ψ(x,z)
31+
G(X) := φ ∨ (○X ∧ •⊤)
2932
```
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
3633

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.
4275

4376
Problem Description
4477
-------------------
4578

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)`,
4780
we are trying to prove all of them together, by well-founded induction on a
4881
given `measure` defined on the quantified variables `x`.
4982

@@ -68,7 +101,7 @@ claim group
68101
69102
. . .
70103
71-
claim φᵢ(x) → ∃zᵢ.ψᵢ(x,zᵢ) [using(claimᵢ₁, ..., claimᵢₖ)]
104+
claim φᵢ(x) → AF∃zᵢ.ψᵢ(x,zᵢ) [using(claimᵢ₁, ..., claimᵢₖ)]
72105
73106
. . .
74107
@@ -92,7 +125,7 @@ have already been proven. Assume also a given integer pattern `measure(x)`,
92125
over the same variables as the claims in the group.
93126

94127
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))`.
96129

97130
A well-founded induction principle allowing to prove `P` using `measure` would
98131
be of the form
@@ -113,19 +146,19 @@ hypothesis `forall x, 0 <= measure(x) < measure(x0) -> P(x)`, we need to prove
113146
By first-order manipulation we can transform the induction hypothesis for `P`
114147
into a set of induction hypotheses, one for each claim:
115148
```
116-
∀x. φᵢ(x) ∧ 0 ≤ measure(x) < measure(x₀) → ∃z.ψᵢ(x,z)
149+
∀x. φᵢ(x) ∧ 0 ≤ measure(x) < measure(x₀) → AF∃z.ψᵢ(x,z)
117150
```
118151

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)`
120153
for each claim.
121154

122155
Since we might be using the claims to advance the proof of the claim, to avoid
123156
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
125158
change from one step to the next.
126159

127160
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)`,
129162
where `φᵢ(x)` also contains the guard `0 ≤ measure(x) < measure(x₀)`.
130163

131164
### Background on unification and remainders of unification
@@ -182,20 +215,20 @@ First, let us eliminate the case when the conclusion holds now. We have
182215
the following sequence of equivalent claims:
183216

184217
```
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))
188221
```
189222

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
192225
using that `∃z.ψ(x₀, z)` appears in both lhs (as a conjunct) and rhs (as a
193226
disjunct).
194227

195228
This reduces the above to proving the following remainder claim:
196229

197230
```
198-
φ(x₀) ∧ ¬∃z.ψ(x₀, z) → ∃z.ψ(x₀,z)
231+
φ(x₀) ∧ ¬∃z.ψ(x₀, z) → AF∃z.ψ(x₀,z)
199232
```
200233

201234
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
206239
### Applying (extended) claims
207240

208241
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
211244
proven claim.
212245

213246
```
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))
219252
```
220253

221254
assuming that `⌈φ(x₀) ∧ φᵢ(x)⌉ ≡ (x = tᵢ(x₀)) ∧ pᵢ(x₀, x)` for each `i`,
222255
the above is equivalent with:
223256
```
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))
226259
```
227260

228261
This can be split into proving a goal for each extended claim,
229262
```
230-
φᵢ(tᵢ(x₀)) ∧ pᵢ(x₀, tᵢ(x₀)) → ∃z.ψ(x₀,z)
263+
φᵢ(tᵢ(x₀)) ∧ pᵢ(x₀, tᵢ(x₀)) → AF∃z.ψ(x₀,z)
231264
```
232265
and one for the remainder
233266
```
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))
235268
```
236269

237270
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
240273

241274
#### Using a claim to advance the corresponding goal
242275

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.
245278
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₀))`.
248281
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₀)))`.
250283

251284
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)`
253286
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)`
255288
as proving this goal would ensure that the above also holds.
256289

257290
#### Summary of applying extended claims
@@ -260,8 +293,8 @@ By applying the extended claims, we will replace the existing goal with a set
260293
consisting of a goal for each extended claim (some with the hypothesis equivalent
261294
with ``) and a remainder.
262295

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))`
265298
By abuse of notation, let `φ(x₀)` denote `φ(x₀) ∧ ¬p₁(x₀, t₁(x₀)) ∧ … ∧ ¬pₙ(x₀, tₙ(x₀)`
266299

267300
### Applying axioms
@@ -270,16 +303,16 @@ The remainder from the above step denotes the case in which the conclusion
270303
doesn't hold now, and neither of the extended claims can be applied.
271304

272305
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
275308
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₀) → •⊤)`
278311

279312
Therefore we need to check two things:
280313

281314
1. That `φ(x₀)` is not stuck
282-
1. That `φ(x₀) → ○∃z.ψ`
315+
1. That `φ(x₀) → ○AF∃z.ψ`
283316

284317
Assume `∀xᵢ.φᵢ(xᵢ) → •∃zᵢ.ψᵢ(xᵢ,zᵢ), 1 ≤ i ≤ n` are all the one-step axioms
285318
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 `
298331

299332
We want to prove that from the STEP rule and
300333
```
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))
302335
```
303336

304-
we can derive `φ(x₀) → ○∃z.ψ(x₀,z)`
337+
we can derive `φ(x₀) → ○AF∃z.ψ(x₀,z)`
305338

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
307340
```
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 }
309342
```
310343

311344
_Proof:_
@@ -317,17 +350,17 @@ Apply `(STEP)` on `φ(x₀)`, and we obtain that
317350

318351
We can replace our goal succesively with:
319352
```
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
323356
```
324357

325358
#### Summary of applying the claims
326359

327360
- 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
329362
```
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 }
331364
```
332365

333366
## Algorithms
@@ -349,14 +382,14 @@ never being applied and the proof looping (and branching) forever.
349382
__Input:__
350383

351384
- 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))`
353386
- decreasing `measure(x)`
354387

355388
__Output:__ Proved or Unproved
356389

357390
* 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)`
360393
* check that `φᵢ(x₀) → measure(x₀) >=Int 0`
361394
* Let `claimsᵢ ::= claims ∪ { claimᵢ₁, ..., claimᵢₖ }`
362395
* Let `Goals := { φᵢ(x₀) }`
@@ -385,7 +418,7 @@ is equivalent to `φ ∧ ¬pᵢ[tᵢ/xᵢ]`.
385418

386419
__Input:__: goal `φ` and set of tuples `{ (xᵢ,φᵢ,zᵢ,ψᵢ) : 1 ≤ i ≤ n }` representing either
387420

388-
* extended claims `{ ∀xᵢ.φᵢ → ∃zᵢ.ψᵢ : 1 ≤ i ≤ n }`, or
421+
* extended claims `{ ∀xᵢ.φᵢ → AF∃zᵢ.ψᵢ : 1 ≤ i ≤ n }`, or
389422
* axioms `{ ∀xᵢ.φᵢ → •∃zᵢ.ψᵢ : 1 ≤ i ≤ n }`
390423

391424
__Output:__ `(Goals, goalᵣₑₘ)`
@@ -394,19 +427,19 @@ __Output:__ `(Goals, goalᵣₑₘ)`
394427
* Let `Goals := { ∀z₁.(∃x₁.ψ₁ ∧ ⌈φ∧φ₁⌉), … , ∀zₙ.(∃xₙ.ψₙ ∧ ⌈φ∧φₙ⌉) }`
395428

396429
__Note__: `∀zᵢ.(∃xᵢ.ψᵢ ∧ ⌈φ∧φᵢ⌉)` is obtained from
397-
`(∃xᵢ.(∃zᵢ.ψᵢ) ∧ ⌈φ∧φᵢ⌉) → ∃z.ψ`
430+
`(∃xᵢ.(∃zᵢ.ψᵢ) ∧ ⌈φ∧φᵢ⌉) → AF∃z.ψ`
398431

399432
__Note__: If the unfication condition `⌈φ ∧ φᵢ⌉ = (xᵢ=tᵢ)∧ pᵢ`
400433
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.ψ`.
403436

404437
Similarly `goalᵣₑₘ := (φ ∧ ¬∃x₁.⌈φ∧φ₁⌉ ∧ … ∧ ¬∃xₙ.⌈φ∧φₙ⌉)`
405438
is equivalent to `(φ ∧ ⋀ⱼ ¬pⱼ[tⱼ/xⱼ])`
406439
where `j` ranges over the set `{ i : 1 ≤ i ≤ n, φ unifies with φᵢ }`.
407440

408441
__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
411444
remainder `¬∃x₁.⌈φ∧φ₁⌉ = ⊤` so the conjunct can be removed.
412445

0 commit comments

Comments
 (0)