Skip to content

Commit d4e8e2f

Browse files
committed
logicDiaFreeExtrinsic_ssubset_logicExtrinsic
1 parent 2d41cb3 commit d4e8e2f

2 files changed

Lines changed: 69 additions & 3 deletions

File tree

NCML/Formula.lean

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ namespace BDFormula
4848

4949

5050
prefix:75 "#" => atom
51-
notation:80 "⊥" => falsum
51+
notation:max "⊥" => falsum
5252
infixr:69 " ⋏ " => and
5353
infixr:68 " ⋎ " => or
5454
infixr:60 " 🡒 " => imply
@@ -58,6 +58,9 @@ prefix:91 "◇" => dia
5858
abbrev iff (φ ψ : BDFormula) := φ 🡒 ψ ⋏ ψ 🡒 φ
5959
infixr:61 " 🡘 " => iff
6060

61+
abbrev neg (φ : BDFormula) := φ 🡒 ⊥
62+
prefix:85 "∼" => neg
63+
6164
@[grind]
6265
def boxFree : BDFormula → Prop
6366
| □_ => False

NCML/IML/Semantics.lean

Lines changed: 65 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,16 @@ def ExtrinsicForces {M : KripkeModel κ} (x₁ : M.World) : BDFormula → Prop
5959
| .dia φ => ∃ y₁, x₁ ⊏ y₁ ∧ M.ExtrinsicForces y₁ φ
6060
infixl:80 " ⊩ᵉ " => ExtrinsicForces
6161

62+
abbrev NotExtrinsicForces (x₁ : M.World) (φ) := ¬x₁ ⊩ᵉ φ
63+
infixl:80 " ⊮ᵉ " => NotExtrinsicForces
64+
65+
lemma notExtrinsicForces_imp : x₁ ⊮ᵉ (φ 🡒 ψ) ↔ ∃ x₂, x₁ ≼ x₂ ∧ x₂ ⊩ᵉ φ ∧ x₂ ⊮ᵉ ψ := by grind;
66+
67+
lemma extrinsicForces_neg : x₁ ⊩ᵉ ∼φ ↔ ∀ x₂, x₁ ≼ x₂ → x₂ ⊮ᵉ φ := by grind;
68+
lemma notExtrinsicForces_neg : x₁ ⊮ᵉ ∼φ ↔ ∃ x₂, x₁ ≼ x₂ ∧ x₂ ⊩ᵉ φ := by grind;
69+
70+
lemma notExtrinsticForces_box : x₁ ⊮ᵉ □φ ↔ ∃ y₁, x₁ ⊏ y₁ ∧ y₁ ⊮ᵉ φ := by grind;
71+
6272
@[grind]
6373
def IntrinsicForces {M : KripkeModel κ} (x₁ : M.World) : BDFormula → Prop
6474
| .atom a => M.val x₁ a
@@ -191,7 +201,7 @@ theorem logicIntrinsic_subset_logicExtrinsic : logicIntrinsic.{u} ⊆ logicExtri
191201
lemma axiomCDia_mem_logicExtrinsic : ◇(φ ⋎ ψ) 🡒 (◇φ ⋎ ◇ψ) ∈ logicExtrinsic := by
192202
rintro κ _ M _ _ x₁ x₂ Ix₁x₂ ⟨y₂, Mx₂y₂, (hy₂φ | hy₂ψ)⟩ <;> grind;
193203

194-
lemma axiomCDia_not_mem_logicIntrinsic : ◇(#0 ⋎ #1) 🡒 (◇(#0) ⋎ ◇(#1)) ∉ logicIntrinsic.{0} := by
204+
lemma axiomCDia_notMem_logicIntrinsic : ◇(#0 ⋎ #1) 🡒 (◇(#0) ⋎ ◇(#1)) ∉ logicIntrinsic.{0} := by
195205
simp only [logicIntrinsic, Set.mem_setOf_eq, not_forall, KripkeModel.IntrinsicValid];
196206
use (Fin 4), inferInstance;
197207
use {
@@ -212,7 +222,60 @@ theorem logicIntrinsic_ssubset_logicExtrinsic : logicIntrinsic.{0} ⊂ logicExtr
212222
. use (◇(#0 ⋎ #1) 🡒 (◇(#0) ⋎ ◇(#1)));
213223
constructor;
214224
. exact axiomCDia_mem_logicExtrinsic;
215-
. exact axiomCDia_not_mem_logicIntrinsic;
225+
. exact axiomCDia_notMem_logicIntrinsic;
226+
227+
228+
def logicDiaFreeExtrinsic := { φ : BDFormula | φ.diaFree ∧ (∀ κ : Type*, [Nonempty κ] → ∀ M : KripkeModel κ, [M.MRelLifting] → M ⊧ᵉ φ) }
229+
230+
open KripkeModel
231+
232+
lemma dnBoxBot_mem_logicExtrinsic : (∼∼□⊥ 🡒 □⊥) ∈ logicExtrinsic := by
233+
rintro κ _ M _ _ x₁ x₂ Ix₁x₂ h y₂ Mx₂y₂;
234+
obtain ⟨x₃, Ix₂x₃, hx₃⟩ := notExtrinsicForces_neg.mp $ extrinsicForces_neg.mp h x₂ (refl _);
235+
obtain ⟨y₃, Iy₂y₃, Mx₃y₃⟩ := M.mix_confluent Ix₂x₃ Mx₂y₂;
236+
have : y₃ ⊩ᵉ ⊥ := hx₃ _ Mx₃y₃;
237+
contradiction;
238+
239+
lemma dnBoxBot_notMem_logicDiaFreeExtrinsic : (∼∼□⊥ 🡒 □⊥) ∉ logicDiaFreeExtrinsic.{0} := by
240+
simp only [logicDiaFreeExtrinsic, Set.mem_setOf_eq, not_and, not_forall, KripkeModel.ExtrinsicValid];
241+
intro _;
242+
use (Fin 5), inferInstance;
243+
use {
244+
iRel x y := x = y ∨ (match x, y with | 0, 1 | 1, 2 | 0, 2 | 3, 4 => True | _, _ => False),
245+
iRel_preorder := { refl := by tauto, trans := by grind; }
246+
mRel x y := (x = 0 ∧ y = 3) ∨ (x = 1 ∧ y = 4)
247+
val _ _ := True
248+
val_persistent := by tauto
249+
};
250+
refine ⟨?_, 0, ?_⟩;
251+
. constructor;
252+
rintro x₁ x₂ y₂ Ix₁x₂ (⟨rfl, rfl⟩ | ⟨rfl, rfl⟩);
253+
. use 3; grind;
254+
. rcases Ix₁x₂ with (rfl | h);
255+
. use 4; grind;
256+
. use 3; grind;
257+
. apply notExtrinsicForces_imp.mpr;
258+
use 1;
259+
refine ⟨?_, ?_, ?_⟩;
260+
. tauto;
261+
. apply extrinsicForces_neg.mpr;
262+
intro x I1x;
263+
apply notExtrinsicForces_neg.mpr;
264+
use 2;
265+
grind;
266+
. apply notExtrinsticForces_box.mpr;
267+
use 4;
268+
tauto;
269+
270+
theorem logicDiaFreeExtrinsic_ssubset_logicExtrinsic : logicDiaFreeExtrinsic.{0} ⊂ logicExtrinsic.{0} := by
271+
apply Set.ssubset_iff_exists.mpr;
272+
constructor;
273+
. simp only [logicDiaFreeExtrinsic, logicExtrinsic, Set.setOf_subset_setOf];
274+
tauto;
275+
. use (∼∼□⊥ 🡒 □⊥);
276+
constructor;
277+
. exact dnBoxBot_mem_logicExtrinsic;
278+
. exact dnBoxBot_notMem_logicDiaFreeExtrinsic;
216279

217280
end NCML.IML
218281

0 commit comments

Comments
 (0)