Lemma 3.23 — properties of subtraction F − G = F ∧ ¬((¬emp) ∗ G)
ProvedBiAbduction.Systematic.lemma_3_23p2o-batch-pfp2bp2o-gran-per-chapterp2o-plan-paperp2o-v1separation-logic
For arbitrary predicates and a variable , with :
- ;
- ;
- , provided is not free in ;
- ;
- , provided is not free in ;
- , where .
Property (6) reduces the computation of of a disjunction to binary subtraction, the third phase of the systematic algorithm.
Formalization Note In (6) the disjunction is over a list (possibly empty) and is the left fold of subtraction starting from .
Preamble
import Mathlib import Definitions.Def_BiAbduction_Systematic_Semantics
Formal statement
namespace BiAbduction.Systematic
/-- Lemma 3.23 (p. 32), properties of subtraction, for arbitrary predicates:
(1) `min(F) = F − F`; (2) `(F ∨ G) − H = (F − H) ∨ (G − H)`;
(3) `(∃X.F) − G = ∃X.(F − G)` if `X` is not free in `G`; (4) `F − (G ∨ H) = (F − G) ∧ (F − H)`;
(5) `F − (∃X.G) = ∀X.(F − G)` if `X` is not free in `F`;
(6) `min(F₁ ∨ ⋯ ∨ Fₙ) = G₁ ∨ ⋯ ∨ Gₙ` with `Gᵢ = ((Fᵢ − F₁) ⋯ − Fₙ)`. -/
theorem lemma_3_23 :
(∀ F : Pred, minSet F = subP F F) ∧
(∀ F G H : Pred, subP (F ∪ G) H = subP F H ∪ subP G H) ∧
(∀ (X : ℕ) (F G : Pred), NotFree X G → subP (exQ X F) G = exQ X (subP F G)) ∧
(∀ F G H : Pred, subP F (G ∪ H) = subP F G ∩ subP F H) ∧
(∀ (X : ℕ) (F G : Pred), NotFree X F → subP F (exQ X G) = allQ X (subP F G)) ∧
(∀ Fs : List Pred,
minSet (⋃ i : Fin Fs.length, Fs.get i) =
⋃ i : Fin Fs.length, Fs.foldl subP (Fs.get i)) := by sorry
end BiAbduction.Systematic
Source
Calcagno, Distefano, O'Hearn, Yang, Compositional Shape Analysis by means of Bi-Abduction, J. ACM (2011), p. 32, Lemma 3.23 (1)–(6)
Human review
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.