-
Notifications
You must be signed in to change notification settings - Fork 0
/
CLL.v
340 lines (236 loc) · 15.7 KB
/
CLL.v
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
(**************************************************************)
(* Copyright Dominique Larchey-Wendling [*] *)
(* *)
(* [*] Affiliation LORIA -- CNRS *)
(**************************************************************)
(* This file is distributed under the terms of the *)
(* CeCILL v2 FREE SOFTWARE LICENSE AGREEMENT *)
(**************************************************************)
Require Import List Permutation Arith.
From Undecidability.ILL Require Import ILL.
Set Implicit Arguments.
Local Infix "~p" := (@Permutation _) (at level 70).
Inductive cll_connective := cll_with | cll_plus | cll_limp | cll_times | cll_par.
Inductive cll_constant := cll_1 | cll_0 | cll_bot | cll_top.
Inductive cll_modality := cll_bang | cll_qmrk | cll_neg.
Notation cll_vars := nat.
Inductive cll_form : Set :=
| cll_var : cll_vars -> cll_form
| cll_cst : cll_constant -> cll_form
| cll_una : cll_modality -> cll_form -> cll_form
| cll_bin : cll_connective -> cll_form -> cll_form -> cll_form.
(* Symbols for cut&paste ⟙ ⟘ 𝟙 ﹠ ⊗ ⊕ ⊸ ! ‼ ‽ ⁇ ∅ ⊢ *)
(* These notations replace the ILL notations *)
(* Variables *)
Notation "'£' x" := (cll_var x) (at level 1).
(* Constants *)
Notation "⟙" := (cll_cst cll_top).
Notation "⟘" := (cll_cst cll_bot).
Notation "𝟙" := (cll_cst cll_1).
Notation "𝟘" := (cll_cst cll_0).
(* Unary connectives: linear negation and modalities *)
(* ? cannot be used because it is reserved by Coq so we use ‽ instead *)
Notation "'⊖' x" := (cll_una cll_neg x) (at level 50, format "⊖ x").
Notation "'!' x" := (cll_una cll_bang x) (at level 52).
Notation "'‽' x" := (cll_una cll_qmrk x) (at level 52).
(* Binary connectives *)
Infix "&" := (cll_bin cll_with) (at level 50).
Infix "⅋" := (cll_bin cll_par) (at level 50).
Infix "⊗" := (cll_bin cll_times) (at level 50).
Infix "⊕" := (cll_bin cll_plus) (at level 50).
Infix "⊸" := (cll_bin cll_limp) (at level 51, right associativity).
(* Modalities iterated over lists *)
Notation "‼ x" := (map (cll_una cll_bang) x) (at level 60).
Notation "⁇ x" := (map (cll_una cll_qmrk) x) (at level 60).
(* The empty list *)
Notation "∅" := nil.
Local Reserved Notation "Γ ⊢ Δ" (at level 70, no associativity).
Section S_cll_restr_without_cut.
(* CLL rules restricted to the (!,&,-o) fragment without cut *)
Inductive S_cll_restr : list cll_form -> list cll_form -> Prop :=
| in_cll1_ax : forall A, A::∅ ⊢ A::∅
| in_cll1_perm : forall Γ Δ Γ' Δ', Γ ~p Γ' -> Δ ~p Δ' -> Γ ⊢ Δ
(*-----------------------------*)
-> Γ' ⊢ Δ'
| in_cll1_limp_l : forall Γ Δ Γ' Δ' A B, Γ ⊢ A::Δ -> B::Γ' ⊢ Δ'
(*-----------------------------*)
-> A ⊸ B::Γ++Γ' ⊢ Δ++Δ'
| in_cll1_limp_r : forall Γ Δ A B, A::Γ ⊢ B::Δ
(*-----------------------------*)
-> Γ ⊢ A ⊸ B::Δ
| in_cll1_with_l1 : forall Γ Δ A B, A::Γ ⊢ Δ
(*-----------------------------*)
-> A&B::Γ ⊢ Δ
| in_cll1_with_l2 : forall Γ Δ A B, B::Γ ⊢ Δ
(*-----------------------------*)
-> A&B::Γ ⊢ Δ
| in_cll1_with_r : forall Γ Δ A B, Γ ⊢ A::Δ -> Γ ⊢ B::Δ
(*-----------------------------*)
-> Γ ⊢ A&B::Δ
| in_cll1_bang_l : forall Γ A Δ, A::Γ ⊢ Δ
(*-----------------------------*)
-> !A::Γ ⊢ Δ
| in_cll1_bang_r : forall Γ A, ‼Γ ⊢ A::nil (* since ? is absent, only ??Δ = nil works *)
(*-----------------------------*)
-> ‼Γ ⊢ !A::nil
| in_cll1_weak_l : forall Γ A Δ, Γ ⊢ Δ
(*-----------------------------*)
-> !A::Γ ⊢ Δ
| in_cll1_cntr_l : forall Γ A Δ, !A::!A::Γ ⊢ Δ
(*-----------------------------*)
-> !A::Γ ⊢ Δ
where "l ⊢ m" := (S_cll_restr l m).
End S_cll_restr_without_cut.
Section S_cll_without_cut_on_ill_syntax.
(* CLL rules restricted to the (𝟘,?,⅋) free fragment without cut
which shares the same formula language as ILL, but of course
not the same rules *)
Inductive S_cll_2 : list cll_form -> list cll_form -> Prop :=
| in_cll2_ax : forall A, A::∅ ⊢ A::∅
| in_cll2_perm : forall Γ Δ Γ' Δ', Γ ~p Γ' -> Δ ~p Δ' -> Γ ⊢ Δ
(*-----------------------------*)
-> Γ' ⊢ Δ'
| in_cll2_limp_l : forall Γ Δ Γ' Δ' A B, Γ ⊢ A::Δ -> B::Γ' ⊢ Δ'
(*-----------------------------*)
-> A ⊸ B::Γ++Γ' ⊢ Δ++Δ'
| in_cll2_limp_r : forall Γ Δ A B, A::Γ ⊢ B::Δ
(*-----------------------------*)
-> Γ ⊢ A ⊸ B::Δ
| in_cll2_with_l1 : forall Γ Δ A B, A::Γ ⊢ Δ
(*-----------------------------*)
-> A&B::Γ ⊢ Δ
| in_cll2_with_l2 : forall Γ Δ A B, B::Γ ⊢ Δ
(*-----------------------------*)
-> A&B::Γ ⊢ Δ
| in_cll2_with_r : forall Γ Δ A B, Γ ⊢ A::Δ -> Γ ⊢ B::Δ
(*-----------------------------*)
-> Γ ⊢ A&B::Δ
| in_cll2_times_l : forall Γ A B Δ, A::B::Γ ⊢ Δ
(*-----------------------------*)
-> A⊗B::Γ ⊢ Δ
| in_cll2_times_r : forall Γ Δ Γ' Δ' A B, Γ ⊢ A::Δ -> Γ' ⊢ B::Δ'
(*-----------------------------*)
-> Γ++Γ' ⊢ A⊗B::Δ++Δ'
| in_cll2_plus_l : forall Γ A B Δ, A::Γ ⊢ Δ -> B::Γ ⊢ Δ
(*-----------------------------*)
-> A⊕B::Γ ⊢ Δ
| in_cll2_plus_r1 : forall Γ A B Δ, Γ ⊢ A::Δ
(*-----------------------------*)
-> Γ ⊢ A⊕B::Δ
| in_cll2_plus_r2 : forall Γ A B Δ, Γ ⊢ B::Δ
(*-----------------------------*)
-> Γ ⊢ A⊕B::Δ
| in_cll2_bot_l : forall Γ Δ, ⟘::Γ ⊢ Δ
| in_cll2_top_r : forall Γ Δ, Γ ⊢ ⟙::Δ
| in_cll2_unit_l : forall Γ Δ, Γ ⊢ Δ
(*-----------------------------*)
-> 𝟙::Γ ⊢ Δ
| in_cll2_unit_r : ∅ ⊢ 𝟙::∅
| in_cll2_bang_l : forall Γ A Δ, A::Γ ⊢ Δ
(*-----------------------------*)
-> !A::Γ ⊢ Δ
| in_cll2_bang_r : forall Γ A, ‼Γ ⊢ A::nil (* since ? is absent, only ??Δ = nil works *)
(*-----------------------------*)
-> ‼Γ ⊢ !A::nil
| in_cll2_weak_l : forall Γ A Δ, Γ ⊢ Δ
(*-----------------------------*)
-> !A::Γ ⊢ Δ
| in_cll2_cntr_l : forall Γ A Δ, !A::!A::Γ ⊢ Δ
(*-----------------------------*)
-> !A::Γ ⊢ Δ
where "l ⊢ m" := (S_cll_2 l m).
End S_cll_without_cut_on_ill_syntax.
Section cut_free_cll.
(* All the rules of Cut-free CLL *)
Reserved Notation "Γ ⊢ Δ" (at level 70, no associativity).
Inductive S_cll : list cll_form -> list cll_form -> Prop :=
| in_cll_ax : forall A, A::∅ ⊢ A::∅
(*
| in_cll_cut : forall Γ Δ Γ' Δ' A, Γ ⊢ A::Δ -> A::Γ' ⊢ Δ'
(*-----------------------------*)
-> Γ++Γ' ⊢ Δ++Δ'
*)
| in_cll_perm : forall Γ Δ Γ' Δ', Γ ~p Γ' -> Δ ~p Δ' -> Γ ⊢ Δ
(*-----------------------------*)
-> Γ' ⊢ Δ'
| in_cll_neg_l : forall Γ Δ A, Γ ⊢ A::Δ
(*-----------------------------*)
-> ⊖A::Γ ⊢ Δ
| in_cll_neg_r : forall Γ Δ A, A::Γ ⊢ Δ
(*-----------------------------*)
-> Γ ⊢ ⊖A::Δ
| in_cll_limp_l : forall Γ Δ Γ' Δ' A B, Γ ⊢ A::Δ -> B::Γ' ⊢ Δ'
(*-----------------------------*)
-> A ⊸ B::Γ++Γ' ⊢ Δ++Δ'
| in_cll_limp_r : forall Γ Δ A B, A::Γ ⊢ B::Δ
(*-----------------------------*)
-> Γ ⊢ A ⊸ B::Δ
| in_cll_with_l1 : forall Γ Δ A B, A::Γ ⊢ Δ
(*-----------------------------*)
-> A&B::Γ ⊢ Δ
| in_cll_with_l2 : forall Γ Δ A B, B::Γ ⊢ Δ
(*-----------------------------*)
-> A&B::Γ ⊢ Δ
| in_cll_with_r : forall Γ Δ A B, Γ ⊢ A::Δ -> Γ ⊢ B::Δ
(*-----------------------------*)
-> Γ ⊢ A&B::Δ
| in_cll_times_l : forall Γ A B Δ, A::B::Γ ⊢ Δ
(*-----------------------------*)
-> A⊗B::Γ ⊢ Δ
| in_cll_times_r : forall Γ Δ Γ' Δ' A B, Γ ⊢ A::Δ -> Γ' ⊢ B::Δ'
(*-----------------------------*)
-> Γ++Γ' ⊢ A⊗B::Δ++Δ'
| in_cll_par_l : forall Γ Δ Γ' Δ' A B, A::Γ ⊢ Δ -> B::Γ' ⊢ Δ'
(*-----------------------------*)
-> A⅋B::Γ++Γ' ⊢ Δ++Δ'
| in_cll_par_r : forall Γ A B Δ, Γ ⊢ A::B::Δ
(*-----------------------------*)
-> Γ ⊢ A⅋B::Δ
| in_cll_plus_l : forall Γ A B Δ, A::Γ ⊢ Δ -> B::Γ ⊢ Δ
(*-----------------------------*)
-> A⊕B::Γ ⊢ Δ
| in_cll_plus_r1 : forall Γ A B Δ, Γ ⊢ A::Δ
(*-----------------------------*)
-> Γ ⊢ A⊕B::Δ
| in_cll_plus_r2 : forall Γ A B Δ, Γ ⊢ B::Δ
(*-----------------------------*)
-> Γ ⊢ A⊕B::Δ
| in_cll_bot_l : forall Γ Δ, ⟘::Γ ⊢ Δ
| in_cll_top_r : forall Γ Δ, Γ ⊢ ⟙::Δ
| in_cll_unit_l : forall Γ Δ, Γ ⊢ Δ
(*-----------------------------*)
-> 𝟙::Γ ⊢ Δ
| in_cll_unit_r : ∅ ⊢ 𝟙::∅
| in_cll_zero_l : (*-----------------------------*)
(* *) 𝟘::∅ ⊢ ∅
| in_cll_zero_r : forall Γ Δ, Γ ⊢ Δ
(*-----------------------------*)
-> Γ ⊢ 𝟘::Δ
| in_cll_bang_l : forall Γ A Δ, A::Γ ⊢ Δ
(*-----------------------------*)
-> !A::Γ ⊢ Δ
| in_cll_bang_r : forall Γ A Δ, ‼Γ ⊢ A::⁇Δ
(*-----------------------------*)
-> ‼Γ ⊢ !A::⁇Δ
| in_cll_qmrk_l : forall Γ A Δ, A::‼Γ ⊢ ⁇Δ
(*-----------------------------*)
-> ‽A::‼Γ ⊢ ⁇Δ
| in_cll_qmrk_r : forall Γ A Δ, Γ ⊢ A::Δ
(*-----------------------------*)
-> Γ ⊢ ‽A::Δ
| in_cll_weak_l : forall Γ A Δ, Γ ⊢ Δ
(*-----------------------------*)
-> !A::Γ ⊢ Δ
| in_cll_weak_r : forall Γ A Δ, Γ ⊢ Δ
(*-----------------------------*)
-> Γ ⊢ ‽A::Δ
| in_cll_cntr_l : forall Γ A Δ, !A::!A::Γ ⊢ Δ
(*-----------------------------*)
-> !A::Γ ⊢ Δ
| in_cll_cntr_r : forall Γ A Δ, Γ ⊢ ‽A::‽A::Δ
(*-----------------------------*)
-> Γ ⊢ ‽A::Δ
where "Γ ⊢ Δ" := (S_cll Γ Δ).
End cut_free_cll.
Definition rCLL_cf_PROVABILITY (S : _*_) := let (Γ,Δ) := S in S_cll_restr Γ Δ.
Definition CLL_cf_PROVABILITY (S : _*_) := let (Γ,Δ) := S in S_cll Γ Δ.