Skip to content

Commit 5e0cfc7

Browse files
committed
Use Sum for ModalToPropWorld instead of Option
1 parent 1a2b92a commit 5e0cfc7

1 file changed

Lines changed: 18 additions & 18 deletions

File tree

  • VeryWeakSubintuitionistic/ModalCompanion

VeryWeakSubintuitionistic/ModalCompanion/Basic.lean

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -97,31 +97,31 @@ section ModalToProp
9797

9898
variable {κ : Type*} (M_M : Modal.FMT.Model κ α)
9999

100-
abbrev ModalToPropWorld (κ : Type*) := Option κ
100+
abbrev ModalToPropWorld (κ : Type*) := κ ⊕ Unit
101101

102102
def modalToPropRel :
103103
Formula α → ModalToPropWorld κ → ModalToPropWorld κ → Prop
104-
| _, none, _ => True
105-
| _, some _, none => False
106-
| (C 🡒 D), some xK, some yK => M_M.Rel' (□((corsi C) 🡒 (corsi D))) xK yK
107-
| _, some _, some _ => True
104+
| _, .inr (), _ => True
105+
| _, .inl _, .inr () => False
106+
| (C 🡒 D), .inl xK, .inl yK => M_M.Rel' (□((corsi C) 🡒 (corsi D))) xK yK
107+
| _, .inl _, .inl _ => True
108108

109109
def modalToPropFrame : FMTSemantics.Frame (ModalToPropWorld κ) α where
110110
Rel' := modalToPropRel M_M
111-
root' := none
111+
root' := .inr ()
112112
root_rooted' := by intros; exact trivial
113113

114114
def modalToPropModel : FMTSemantics.Model (ModalToPropWorld κ) α where
115115
toFrame := modalToPropFrame M_M
116116
Val a x :=
117117
match x with
118-
| none => True
119-
| some k => M_M.Val a k
118+
| .inr () => True
119+
| .inl k => M_M.Val a k
120120

121121
theorem modalToProp_truthlemma :
122122
∀ (A : Formula α) (x : κ),
123123
Modal.FMT.Forced (M := M_M) x (corsi A)
124-
↔ FMTSemantics.Forces (M := modalToPropModel M_M) (some x) A := by
124+
↔ FMTSemantics.Forces (M := modalToPropModel M_M) (.inl x) A := by
125125
intro A
126126
induction A with
127127
| atom a => intro x; rfl
@@ -132,34 +132,34 @@ theorem modalToProp_truthlemma :
132132
have hB := ihB x
133133
show ¬ (Modal.FMT.Forced (M := M_M) x (corsi A)
134134
→ ¬ Modal.FMT.Forced (M := M_M) x (corsi B)) ↔ _
135-
show _ ↔ (FMTSemantics.Forces (M := modalToPropModel M_M) (some x) A
136-
∧ FMTSemantics.Forces (M := modalToPropModel M_M) (some x) B)
135+
show _ ↔ (FMTSemantics.Forces (M := modalToPropModel M_M) (.inl x) A
136+
∧ FMTSemantics.Forces (M := modalToPropModel M_M) (.inl x) B)
137137
tauto
138138
| or A B ihA ihB =>
139139
intro x
140140
have hA := ihA x
141141
have hB := ihB x
142142
show (¬ Modal.FMT.Forced (M := M_M) x (corsi A)
143143
→ Modal.FMT.Forced (M := M_M) x (corsi B)) ↔ _
144-
show _ ↔ (FMTSemantics.Forces (M := modalToPropModel M_M) (some x) A
145-
∨ FMTSemantics.Forces (M := modalToPropModel M_M) (some x) B)
144+
show _ ↔ (FMTSemantics.Forces (M := modalToPropModel M_M) (.inl x) A
145+
∨ FMTSemantics.Forces (M := modalToPropModel M_M) (.inl x) B)
146146
tauto
147147
| imp A B ihA ihB =>
148148
intro x
149149
constructor
150150
· intro h y hRP hAp
151151
match y, hRP, hAp with
152-
| some yK, hRP, hAp =>
152+
| .inl yK, hRP, hAp =>
153153
have hRM : M_M.Rel' (□((corsi A) 🡒 (corsi B))) x yK := hRP
154154
have hAc : Modal.FMT.Forced (M := M_M) yK (corsi A) := (ihA yK).mpr hAp
155155
exact (ihB yK).mp (h yK hRM hAc)
156-
| none, hRP, _ =>
156+
| .inr (), hRP, _ =>
157157
exact (hRP : False).elim
158158
· intro h y hRM hAc
159-
have hRP : modalToPropRel M_M (A 🡒 B) (some x) (some y) := hRM
160-
have hAp : FMTSemantics.Forces (M := modalToPropModel M_M) (some y) A :=
159+
have hRP : modalToPropRel M_M (A 🡒 B) (.inl x) (.inl y) := hRM
160+
have hAp : FMTSemantics.Forces (M := modalToPropModel M_M) (.inl y) A :=
161161
(ihA y).mp hAc
162-
exact (ihB y).mpr (h (some y) hRP hAp)
162+
exact (ihB y).mpr (h (.inl y) hRP hAp)
163163

164164
end ModalToProp
165165

0 commit comments

Comments
 (0)