Imports
module public import PdlTestFree.NoInterpolation
@[expose] public sectionopen TestfreeNoItp

With a test there is an interpolant

If we allow test operators, then there is an interpolant for ⋀Γ₁ → ¬⋀Γ₂.

The formula [(p?;a)*](p → ⟨a⟩⊤) which uses a test. This formulas says that along every p-path, every p-state has a successor.

def testIP : Formula := ⌈∗((?'p) ;' a)⌉(p ↣ Formula.neg (⌈a⌉⊥))

The formula testIP is not test-free..

lemma not_testFree_withTest : ¬ testIP.testFree := ⊢ ¬testIP.testFree All goals completed! 🐙

Γ₁ implies testIP

Γ₁ ⊨ [(p?;a)*](p → ⟨a⟩⊤).

lemma gammaOne_withTest {W : Type} (M : KripkeModel W) (w : W) (h1 : ∀ φ ∈ gammaOne, evaluate M w φ) : evaluate M w testIP := W:TypeM:KripkeModel Ww:Wh1:∀ φ ∈ gammaOne, evaluate M w φ⊢ evaluate M w testIP W:TypeM:KripkeModel Ww:Wh1:∀ φ ∈ gammaOne, evaluate M w φhs:M.val w 2hbody:∀ (v : W), Relation.ReflTransGen (M.Rel 0) w v → M.val v 0 → M.val v 2 → (∃ u, M.Rel 0 v u) ∧ ∀ (u : W), M.Rel 0 v u → M.val u 2⊢ evaluate M w testIP W:TypeM:KripkeModel Ww:Wh1:∀ φ ∈ gammaOne, evaluate M w φhs:M.val w 2hbody:∀ (v : W), Relation.ReflTransGen (M.Rel 0) w v → M.val v 0 → M.val v 2 → (∃ u, M.Rel 0 v u) ∧ ∀ (u : W), M.Rel 0 v u → M.val u 2⊢ ∀ (v : W), Relation.ReflTransGen (fun x x_1 ↦ ∃ y, (x = y ∧ M.val x 0) ∧ M.Rel 0 y x_1) w v → M.val v 0 → ¬∀ (v_1 : W), M.Rel 0 v v_1 → False W:TypeM:KripkeModel Ww:Wh1:∀ φ ∈ gammaOne, evaluate M w φhs:M.val w 2hbody:∀ (v : W), Relation.ReflTransGen (M.Rel 0) w v → M.val v 0 → M.val v 2 → (∃ u, M.Rel 0 v u) ∧ ∀ (u : W), M.Rel 0 v u → M.val u 2v:Whv:Relation.ReflTransGen (fun x x_1 ↦ ∃ y, (x = y ∧ M.val x 0) ∧ M.Rel 0 y x_1) w v⊢ M.val v 0 → ¬∀ (v_1 : W), M.Rel 0 v v_1 → False -- every state reached along `(p?;a)*` from `w` is `a*`-reachable and satisfies `s` W:TypeM:KripkeModel Ww:Wh1:∀ φ ∈ gammaOne, evaluate M w φhs:M.val w 2hbody:∀ (v : W), Relation.ReflTransGen (M.Rel 0) w v → M.val v 0 → M.val v 2 → (∃ u, M.Rel 0 v u) ∧ ∀ (u : W), M.Rel 0 v u → M.val u 2v:Whv:Relation.ReflTransGen (fun x x_1 ↦ ∃ y, (x = y ∧ M.val x 0) ∧ M.Rel 0 y x_1) w vkey:Relation.ReflTransGen (M.Rel 0) w v ∧ M.val v 2⊢ M.val v 0 → ¬∀ (v_1 : W), M.Rel 0 v v_1 → False W:TypeM:KripkeModel Ww:Wh1:∀ φ ∈ gammaOne, evaluate M w φhs:M.val w 2hbody:∀ (v : W), Relation.ReflTransGen (M.Rel 0) w v → M.val v 0 → M.val v 2 → (∃ u, M.Rel 0 v u) ∧ ∀ (u : W), M.Rel 0 v u → M.val u 2v:Whv:Relation.ReflTransGen (fun x x_1 ↦ ∃ y, (x = y ∧ M.val x 0) ∧ M.Rel 0 y x_1) w vkey:Relation.ReflTransGen (M.Rel 0) w v ∧ M.val v 2hpv:M.val v 0hdead:∀ (v_1 : W), M.Rel 0 v v_1 → False⊢ False W:TypeM:KripkeModel Ww:Wh1:∀ φ ∈ gammaOne, evaluate M w φhs:M.val w 2hbody:∀ (v : W), Relation.ReflTransGen (M.Rel 0) w v → M.val v 0 → M.val v 2 → (∃ u, M.Rel 0 v u) ∧ ∀ (u : W), M.Rel 0 v u → M.val u 2v:Whv:Relation.ReflTransGen (fun x x_1 ↦ ∃ y, (x = y ∧ M.val x 0) ∧ M.Rel 0 y x_1) w vkey:Relation.ReflTransGen (M.Rel 0) w v ∧ M.val v 2hpv:M.val v 0hdead:∀ (v_1 : W), M.Rel 0 v v_1 → Falseu:Whu:M.Rel 0 v u⊢ False All goals completed! 🐙

Γ₂ implies the negation of testIP

Γ₂ ⊨ ¬[(p?;a)*](p → ⟨a⟩⊤).

lemma gammaTwo_not_withTest {W : Type} (M : KripkeModel W) (w : W) (h2 : ∀ φ ∈ gammaTwo, evaluate M w φ) : ¬ evaluate M w testIP := W:TypeM:KripkeModel Ww:Wh2:∀ φ ∈ gammaTwo, evaluate M w φ⊢ ¬evaluate M w testIP W:TypeM:KripkeModel Ww:Wh2:∀ φ ∈ gammaTwo, evaluate M w φhqp:∀ (v : W), Relation.ReflTransGen (M.Rel 0) w v → M.val v 1 → M.val v 0v:Whv:Relation.ReflTransGen (M.Rel 0) w vhqv:M.val v 1hdead:∀ (u : W), ¬M.Rel 0 v u⊢ ¬evaluate M w testIP W:TypeM:KripkeModel Ww:Wh2:∀ φ ∈ gammaTwo, evaluate M w φhqp:∀ (v : W), Relation.ReflTransGen (M.Rel 0) w v → M.val v 1 → M.val v 0v:Whv:Relation.ReflTransGen (M.Rel 0) w vhqv:M.val v 1hdead:∀ (u : W), ¬M.Rel 0 v u⊢ ∃ x, Relation.ReflTransGen (fun x x_1 ↦ ∃ y, (x = y ∧ M.val x 0) ∧ M.Rel 0 y x_1) w x ∧ M.val x 0 ∧ ∀ (x_1 : W), ¬M.Rel 0 x x_1 W:TypeM:KripkeModel Ww:Wh2:∀ φ ∈ gammaTwo, evaluate M w φhqp:∀ (v : W), Relation.ReflTransGen (M.Rel 0) w v → M.val v 1 → M.val v 0v:Whv:Relation.ReflTransGen (M.Rel 0) w vhqv:M.val v 1hdead:∀ (u : W), ¬M.Rel 0 v u⊢ Relation.ReflTransGen (fun x x_1 ↦ ∃ y, (x = y ∧ M.val x 0) ∧ M.Rel 0 y x_1) w v -- the path to `v` consists of `p`-states, hence is a `(p?;a)*`-path All goals completed! 🐙

testIP is an interpolant for Γ₁;Γ₂

[(p?;a)*](p → ⟨a⟩⊤) is an Interpolant for ⋀Γ₁ → ¬⋀Γ₂ (with a test).

theorem withTest_Interpolant : Interpolant (con gammaOne) (~ con gammaTwo) testIP := ⊢ Interpolant (con gammaOne) (~con gammaTwo) testIP ⊢ testIP.voc ⊆ (con gammaOne).voc ∩ (~con gammaTwo).voc⊢ tautology (~(con gammaOne ⋀ ~testIP))⊢ tautology (~(testIP ⋀ ~~con gammaTwo)) ⊢ testIP.voc ⊆ (con gammaOne).voc ∩ (~con gammaTwo).voc ⊢ testIP.voc ⊆ commonVoc All goals completed! 🐙 ⊢ tautology (~(con gammaOne ⋀ ~testIP)) W:TypeM:KripkeModel Ww:W⊢ evaluate M w (~(con gammaOne ⋀ ~testIP)) W:TypeM:KripkeModel Ww:W⊢ (∀ f ∈ gammaOne, evaluate M w f) → evaluate M w testIP All goals completed! 🐙 ⊢ tautology (~(testIP ⋀ ~~con gammaTwo)) W:TypeM:KripkeModel Ww:W⊢ evaluate M w (~(testIP ⋀ ~~con gammaTwo)) W:TypeM:KripkeModel Ww:W⊢ evaluate M w testIP → ¬∀ f ∈ gammaTwo, evaluate M w f All goals completed! 🐙