Distance between states in a Kripke model #
In the article these are used for the correctness of cluster interpolants in Section 7.
Here we also use them to state and prove localLoadedDiamondList, a local version
of the loadedDiamondPaths lemma that is part of the Soundness proof in Section 6.
Walks #
Prepend a program step, omitting it when its endpoints coincide.
Equations
- PDL.Walk.cons' h p = if c : w = x then match x, c, h, p with | .(w), ⋯, h, p => p else PDL.Walk.cons h p c
Instances For
Sum natural-valued edge weights along a walk.
Equations
- (PDL.Walk.nil α).flength' x✝ = 0
- (PDL.Walk.cons h p wx).flength' x✝ = x✝ w x_2 + p.flength' x✝
Instances For
Sum possibly infinite edge weights along a walk.
Equations
- (PDL.Walk.nil α).flength x✝ = 0
- (PDL.Walk.cons h p wx).flength x✝ = x✝ w x_2 + p.flength x✝
Instances For
Concatenate two program walks with a shared endpoint.
Equations
- (PDL.Walk.nil α).append x✝ = x✝
- (PDL.Walk.cons h p wx).append x✝ = PDL.Walk.cons h (p.append x✝) wx
Instances For
The infimum of natural-weighted lengths of program walks.
Equations
- PDL.fdist' M α w v f = ⨅ (p : PDL.Walk M α w v), ↑(p.flength' f)
Instances For
Existence of a finite program walk between two worlds.
Equations
- PDL.Reachable M α w v = Nonempty (PDL.Walk M α w v)
Instances For
Unused
Distance #
The recursively weighted distance of a program between two worlds.
Equations
- PDL.distance M (PDL.Program.atom_prog a) w v = if PDL.relate M (PDL.Program.atom_prog a) w v then 1 else ⊤
- PDL.distance M (PDL.Program.test a) w v = if PDL.relate M (PDL.Program.test a) w v then 0 else ⊤
- PDL.distance M (α_2.union β) w v = min (PDL.distance M α_2 w v) (PDL.distance M β w v)
- PDL.distance M α_2.star w v = PDL.fdist' M α_2 w v fun (x1 x2 : W) => (PDL.distance M α_2 x1 x2).toNat
- PDL.distance M (α_2.sequence β) w v = ⨅ (x : W), PDL.distance M α_2 w x + PDL.distance M β x v
Instances For
The minimum total distance for a sequence of programs, allowing infinity.
Equations
- PDL.distanceList M w v [] = if w = v then 0 else ⊤
- PDL.distanceList M w v (α :: δ) = ⨅ (x : W), PDL.distance M α w x + PDL.distanceList M x v δ
Instances For
7.47 (a)
7.47 (b)
like 7.47 (a) but for lists
7.47 (c)
7.47 (f)
7.47 (g)
7.47 (h) In the article this uses loaded formulas, we just use normal boxes.
Summary definition of Lemma 7.47