Skip to content

Commit 1a2b92a

Browse files
committed
Remove comments from ModalCompanion/Basic
1 parent 983d421 commit 1a2b92a

1 file changed

Lines changed: 2 additions & 53 deletions

File tree

  • VeryWeakSubintuitionistic/ModalCompanion

VeryWeakSubintuitionistic/ModalCompanion/Basic.lean

Lines changed: 2 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ def corsi : Formula α → Modal.Formula α
1717
| A ⋎ B => (corsi A) ⋎ (corsi B)
1818
| A 🡒 B => □((corsi A) 🡒 (corsi B))
1919

20-
/-- Corsi translation is injective. -/
2120
lemma corsi_injective : Function.Injective (corsi : Formula α → _) := by
2221
intro A
2322
induction A with
@@ -36,35 +35,20 @@ lemma corsi_injective : Function.Injective (corsi : Formula α → _) := by
3635
cases B <;> simp_all [corsi]
3736
grind
3837

39-
/-! ## Lemma 6.8 (`prop_to_modal_FMT`) -/
4038

4139
section PropToModal
4240

4341
variable {κ : Type*} (M_P : FMTSemantics.Model κ α)
4442

45-
/-- Frame for the modal FMT model constructed from a propositional FMT model.
46-
47-
The paper says: define `R^M_B`
48-
* if `B = (Cᶜ 🡒 Dᶜ)` for some propositional `C, D`, by `xR^M_B y ⟺ xR^P_{C🡒D} y`;
49-
* otherwise `R^M_B` is the always-true relation.
50-
51-
In Lean's modal FMT semantics, `□A` is forced through the relation indexed by
52-
`□A` itself (not by `A`), so we read the paper's condition as: if
53-
`B = □(corsi C 🡒 corsi D)`, use `R^P_{C 🡒 D}`. We express this by a
54-
universal quantifier; injectivity of `corsi` guarantees the witness `(C, D)`
55-
is unique. -/
5643
def propToModalFrame : Modal.FMT.Frame κ α where
5744
Rel' B X Y := ∀ C D : Formula α,
5845
B = □((corsi C) 🡒 (corsi D)) → M_P.Rel' (C 🡒 D) X Y
5946
root' := M_P.root'
6047

61-
/-- The modal FMT model derived from a propositional FMT model. -/
6248
def propToModalModel : Modal.FMT.Model κ α where
6349
toFrame := propToModalFrame M_P
6450
Val a x := M_P.Val a x
6551

66-
/-- Lemma 6.8 (truth lemma). For every propositional formula `A` and every
67-
world `x`, `M^P, x ⊩ A` iff `M^M, x ⊩ corsi A`. -/
6852
theorem propToModal_truthlemma :
6953
∀ (A : Formula α) (x : (propToModalModel M_P).World),
7054
FMTSemantics.Forces (M := M_P) x A
@@ -75,9 +59,6 @@ theorem propToModal_truthlemma :
7559
| bot => intro x; rfl
7660
| and A B ihA ihB =>
7761
intro x
78-
-- `M^P, x ⊩ A ⋏ B ↔ M^P, x ⊩ A ∧ M^P, x ⊩ B` (propositional `⋏` is conjunction).
79-
-- `M^M, x ⊩ corsi A ⋏ corsi B = ∼(corsi A 🡒 ∼corsi B)`
80-
-- `= ¬(x ⊩ corsi A → ¬ x ⊩ corsi B)`. Classically equiv to `∧`.
8162
have hA := ihA x
8263
have hB := ihB x
8364
show (FMTSemantics.Forces (M := M_P) x A ∧ FMTSemantics.Forces (M := M_P) x B) ↔ _
@@ -86,9 +67,6 @@ theorem propToModal_truthlemma :
8667
tauto
8768
| or A B ihA ihB =>
8869
intro x
89-
-- `M^P, x ⊩ A ⋎ B ↔ M^P, x ⊩ A ∨ M^P, x ⊩ B`.
90-
-- `M^M, x ⊩ corsi A ⋎ corsi B = ∼corsi A 🡒 corsi B`
91-
-- `= ¬ x ⊩ corsi A → x ⊩ corsi B`. Classically equiv to `∨`.
9270
have hA := ihA x
9371
have hB := ihB x
9472
show (FMTSemantics.Forces (M := M_P) x A ∨ FMTSemantics.Forces (M := M_P) x B) ↔ _
@@ -97,18 +75,11 @@ theorem propToModal_truthlemma :
9775
tauto
9876
| imp A B ihA ihB =>
9977
intro x
100-
-- `M^P, x ⊩ A 🡒 B = ∀ y, x R^P_{A🡒B} y → (y ⊩ A → y ⊩ B)`.
101-
-- `M^M, x ⊩ corsi (A 🡒 B) = M^M, x ⊩ □(corsi A 🡒 corsi B)`
102-
-- `= ∀ y, x R^M_{□(corsi A 🡒 corsi B)} y → (y ⊩ corsi A → y ⊩ corsi B)`.
10378
constructor
10479
· intro h y hRM hAc
105-
-- `hRM : (propToModalModel M_P).Rel' (□(corsi A 🡒 corsi B)) x y`.
106-
-- Applying it with `C := A`, `D := B` yields `R^P_{A 🡒 B} x y`.
10780
have hRP : M_P.Rel' (A 🡒 B) x y := hRM A B rfl
10881
exact (ihB y).mp <| h y hRP <| (ihA y).mpr hAc
10982
· intro h y hRP hA
110-
-- Need `R^M_{□(corsi A 🡒 corsi B)} x y`. By corsi injectivity, the only
111-
-- witness in the universal quantifier is `(A, B)`, giving `R^P_{A 🡒 B}`.
11283
have hRM : (propToModalModel M_P).Rel' (□((corsi A) 🡒 (corsi B))) x y := by
11384
intro C D heq
11485
have h₁ : corsi A = corsi C ∧ corsi B = corsi D := by
@@ -122,46 +93,31 @@ theorem propToModal_truthlemma :
12293
end PropToModal
12394

12495

125-
/-! ## Lemma 6.9 (`modal_to_prop_FMT`) -/
126-
12796
section ModalToProp
12897

12998
variable {κ : Type*} (M_M : Modal.FMT.Model κ α)
13099

131-
/-- Carrier of the propositional model derived from a modal model:
132-
the original `κ` extended by a fresh root, encoded as `none`. -/
133100
abbrev ModalToPropWorld (κ : Type*) := Option κ
134101

135-
/-- The propositional accessibility from a modal model:
136-
* the root `none` reaches every world (this gives the rooted condition);
137-
* no world reaches the root;
138-
* between two non-root worlds, `R^P_{C 🡒 D}` agrees with
139-
`R^M_{□(corsi C 🡒 corsi D)}`;
140-
* for any non-implication index, two non-root worlds are always related. -/
141102
def modalToPropRel :
142103
Formula α → ModalToPropWorld κ → ModalToPropWorld κ → Prop
143104
| _, none, _ => True
144105
| _, some _, none => False
145106
| (C 🡒 D), some xK, some yK => M_M.Rel' (□((corsi C) 🡒 (corsi D))) xK yK
146107
| _, some _, some _ => True
147108

148-
/-- Frame for the propositional FMT model derived from a modal one. -/
149109
def modalToPropFrame : FMTSemantics.Frame (ModalToPropWorld κ) α where
150110
Rel' := modalToPropRel M_M
151111
root' := none
152112
root_rooted' := by intros; exact trivial
153113

154-
/-- Propositional FMT model derived from a modal one. -/
155114
def modalToPropModel : FMTSemantics.Model (ModalToPropWorld κ) α where
156115
toFrame := modalToPropFrame M_M
157116
Val a x :=
158117
match x with
159118
| none => True
160119
| some k => M_M.Val a k
161120

162-
/-- Lemma 6.9 (truth lemma). For every propositional formula `A` and every
163-
world `x : κ` of the original modal model (i.e. not the new root),
164-
`M^M, x ⊩ corsi A` iff `M^P, some x ⊩ A`. -/
165121
theorem modalToProp_truthlemma :
166122
∀ (A : Formula α) (x : κ),
167123
Modal.FMT.Forced (M := M_M) x (corsi A)
@@ -191,20 +147,15 @@ theorem modalToProp_truthlemma :
191147
| imp A B ihA ihB =>
192148
intro x
193149
constructor
194-
· -- `(⇒)`: `x ⊩ □(corsi A 🡒 corsi B)` in `M^M` → `some x ⊩ (A 🡒 B)` in `M^P`.
195-
intro h y hRP hAp
150+
· intro h y hRP hAp
196151
match y, hRP, hAp with
197152
| some yK, hRP, hAp =>
198-
-- `hRP : modalToPropRel M_M (A 🡒 B) (some x) (some yK)` reduces to
199-
-- `M_M.Rel' (□(corsi A 🡒 corsi B)) x yK`.
200153
have hRM : M_M.Rel' (□((corsi A) 🡒 (corsi B))) x yK := hRP
201154
have hAc : Modal.FMT.Forced (M := M_M) yK (corsi A) := (ihA yK).mpr hAp
202155
exact (ihB yK).mp (h yK hRM hAc)
203156
| none, hRP, _ =>
204-
-- `hRP : modalToPropRel M_M (A 🡒 B) (some x) none = False`.
205157
exact (hRP : False).elim
206-
· -- `(⇐)`: `some x ⊩ (A 🡒 B)` in `M^P` → `x ⊩ □(corsi A 🡒 corsi B)` in `M^M`.
207-
intro h y hRM hAc
158+
· intro h y hRM hAc
208159
have hRP : modalToPropRel M_M (A 🡒 B) (some x) (some y) := hRM
209160
have hAp : FMTSemantics.Forces (M := modalToPropModel M_M) (some y) A :=
210161
(ihA y).mp hAc
@@ -214,6 +165,4 @@ end ModalToProp
214165

215166
end ModalCompanion
216167

217-
218-
219168
end

0 commit comments

Comments
 (0)