Skip to content

Commit 9f6559e

Browse files
committed
Extra documentation for the first-order case
1 parent e97a3ed commit 9f6559e

11 files changed

+504
-500
lines changed

FOLL/LL/Completeness.v

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ Require Import Coq.Program.Equality.
1919

2020
Set Implicit Arguments.
2121

22+
(* *** Invertibility lemmas
23+
This module proves that the application of positive rules can be exchanged
24+
*)
2225
Module InvLemmas (DT : Eqset_dec_pol).
2326
Module Export SR := SRule DT.
2427

@@ -37,7 +40,7 @@ Module InvLemmas (DT : Eqset_dec_pol).
3740

3841

3942
(* =============================================== *)
40-
(* INVERTIBILITY OF COPY *)
43+
(** Invertibility of Copy *)
4144
(* =============================================== *)
4245
Module InvCopy.
4346

@@ -269,7 +272,7 @@ Module InvLemmas (DT : Eqset_dec_pol).
269272
End InvCopy.
270273

271274
(* =============================================== *)
272-
(* INVERTIBILITY OF EXISTS *)
275+
(** Invertibility of Exists *)
273276
(* =============================================== *)
274277
Module InvExists.
275278
Definition RUp (n:nat) := forall B L M FX t,
@@ -581,7 +584,7 @@ Module InvLemmas (DT : Eqset_dec_pol).
581584
End InvExists.
582585

583586
(* =============================================== *)
584-
(* INVERTIBILITY OF OPLUS *)
587+
(** Invertibility of OPlus *)
585588
(* =============================================== *)
586589
Module InvOPlus.
587590

@@ -945,7 +948,7 @@ Module InvLemmas (DT : Eqset_dec_pol).
945948
End InvOPlus.
946949

947950
(* =============================================== *)
948-
(* INVERTIBILITY OF TENSOR *)
951+
(** Invertibility of Tensor *)
949952
(* =============================================== *)
950953
Module InvTensor.
951954

@@ -1473,7 +1476,7 @@ Module InvLemmas (DT : Eqset_dec_pol).
14731476

14741477

14751478
(* =============================================== *)
1476-
(* PROOF OF COMPLETENESS *)
1479+
(** Completeness Theorem *)
14771480
(* =============================================== *)
14781481
Module Completeness.
14791482

FOLL/LL/Examples/Example2.v renamed to FOLL/LL/Examples/Example.v

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
Add LoadPath "../../".
12
Require Import Coq.Relations.Relations.
23
Require Import Coq.Arith.EqNat.
34
Require Import Coq.Classes.Morphisms.
@@ -9,10 +10,9 @@ Require Import Coq.Logic.FunctionalExtensionality.
910

1011

1112
Require Export Permutation.
12-
Require Export SequentCalculi.
13-
Require Export StructuralRules.
14-
Require Export Multisets.
15-
Require Export StrongInduction.
13+
Require Export LL.SequentCalculi.
14+
Require Export LL.StructuralRules.
15+
Require Export LL.Multisets.
1616

1717

1818

FOLL/LL/Examples/Example3.v

Lines changed: 0 additions & 26 deletions
This file was deleted.

FOLL/LL/Examples/LJLL.v

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ https://github.com/brunofx86/LL *)
33

44
(** ** LJ into LL
55
We specify the system LJ for intuitionistic propositional logic. We encode that system as a Linear Logic theory and we prove the adequacy of that encoding. For that, we use the techniques described here #<a href="http://www.sciencedirect.com/science/article/pii/S0304397512010894">[Miller and Pimentel 13]# and the formalization of the focused system for Linear Logic.
6-
*)
6+
*)
77

88
Require Import Coq.Relations.Relations.
99
Require Import Coq.Arith.EqNat.
@@ -431,7 +431,7 @@ Section InversionTerm.
431431
rewrite AtomNeg in H.
432432
LexpSubst.
433433
LexpSubst.
434-
434+
435435
eapply InvDjTerm;eauto.
436436
Qed.
437437

@@ -833,9 +833,9 @@ Proof with InvTac.
833833
apply multisetEncode in H1.
834834
rewrite H1.
835835
eapply tri_dec2 with
836-
(B':= [BLEFT; INIT; CRIGHT; DRIGHT1; DRIGHT2; DLEFT; IRIGHT; ILEFT]) (F:= CLEFT)...
836+
(B':= [BLEFT; INIT; CRIGHT; DRIGHT1; DRIGHT2; DLEFT; IRIGHT; ILEFT]) (F:= CLEFT)...
837837
solve_permutation.
838-
eapply tri_ex with (t:= encodeTerm G).
838+
eapply tri_ex with (t:= encodeTerm G).
839839
eapply tri_ex with (t:= encodeTerm G') ...
840840
eapply tri_tensor with (N:= [encodeFL (PL.conj G G')])
841841
(M:= (A1 rg (encodeTerm F)) ⁺ :: encodeList (L'));eauto;conv ...
@@ -1028,7 +1028,7 @@ Proof with InvTac.
10281028
apply AtomsTheoryFalse in H3.
10291029
contradiction.
10301030
inversion H0;subst ...
1031-
(* cannot be a release .. then H2 is inconsistent*)
1031+
(* cannot be a release .. then H2 is inconsistent*)
10321032
Qed.
10331033

10341034
Lemma LeftRightAtom : forall F t, encodeFR F = (A1 rg t) ⁺ -> encodeFL F = (A1 lf t) ⁺.
@@ -1647,12 +1647,12 @@ Proof with InvTac.
16471647
split;auto.
16481648
split;auto.
16491649
assert(HM:encodeFR F :: encodeFL G :: encodeList L' =mul=
1650-
(encodeFR F :: encodeList L') ++ [encodeFL G] ).
1650+
(encodeFR F :: encodeList L') ++ [encodeFL G] ).
16511651
solve_permutation.
16521652
rewrite HM; assumption.
16531653

16541654
assert(HM:encodeFR F :: encodeFL G' :: encodeList L' =mul=
1655-
(encodeFR F :: encodeList L') ++ [encodeFL G'] ). (* !! solve_per should work here *)
1655+
(encodeFR F :: encodeList L') ++ [encodeFL G'] ). (* !! solve_per should work here *)
16561656
solve_permutation.
16571657
rewrite HM; assumption.
16581658

@@ -1842,7 +1842,7 @@ Proof with InvTac.
18421842
split;auto.
18431843

18441844
assert(HS: encodeFR G' :: encodeFL G :: encodeList L =mul=
1845-
(encodeList L ++ [encodeFL G]) ++ [encodeFR G']).
1845+
(encodeList L ++ [encodeFL G]) ++ [encodeFR G']).
18461846
solve_permutation.
18471847
rewrite HS ...
18481848

@@ -1884,22 +1884,22 @@ Proof with InvTac.
18841884
F0 = CRIGHT \/ F0 = CLEFT \/
18851885
F0 = DRIGHT1 \/ F0 = DRIGHT2 \/
18861886
F0 = DLEFT \/ F0 = IRIGHT \/ F0 = ILEFT).
1887-
unfold Theory in H3.
1888-
assert (In F0 [BLEFT; INIT; CRIGHT; CLEFT; DRIGHT1; DRIGHT2; DLEFT; IRIGHT; ILEFT]).
1889-
apply In_to_in.
1890-
rewrite H3; auto.
1891-
destruct H1; eauto.
1892-
destruct H1; eauto.
1893-
destruct H1; eauto.
1894-
destruct H1; eauto.
1895-
destruct H1. do 4 right. left. eauto.
1896-
destruct H1. do 5 right. left. eauto.
1897-
destruct H1. do 6 right. left. eauto.
1898-
destruct H1. do 7 right. left. eauto.
1899-
destruct H1. do 8 right. eauto.
1900-
inversion H1.
1901-
1902-
(* !! by multiset resoning and the definition of Theory*)
1887+
unfold Theory in H3.
1888+
assert (In F0 [BLEFT; INIT; CRIGHT; CLEFT; DRIGHT1; DRIGHT2; DLEFT; IRIGHT; ILEFT]).
1889+
apply In_to_in.
1890+
rewrite H3; auto.
1891+
destruct H1; eauto.
1892+
destruct H1; eauto.
1893+
destruct H1; eauto.
1894+
destruct H1; eauto.
1895+
destruct H1. do 4 right. left. eauto.
1896+
destruct H1. do 5 right. left. eauto.
1897+
destruct H1. do 6 right. left. eauto.
1898+
destruct H1. do 7 right. left. eauto.
1899+
destruct H1. do 8 right. eauto.
1900+
inversion H1.
1901+
1902+
(* !! by multiset resoning and the definition of Theory*)
19031903
destruct H1 as [HF1 | [HF1 | [HF1 | [HF1 | [HF1 | [HF1 | [HF1 | [HF1 |HF1]]]]]]]];subst.
19041904
+++ (* case BLeft *)
19051905
apply AdequacyTri1 in H4.
@@ -2017,14 +2017,14 @@ Proof with InvTac.
20172017
destruct H4; subst.
20182018
destruct H4; subst.
20192019
apply H with (m:=n1) in H4;
2020-
[|repeat apply Nat.le_le_succ_r; auto].
2020+
[|repeat apply Nat.le_le_succ_r; auto].
20212021
destruct H4 as [n1' H4].
20222022
assert(HS : encodeFR F :: encodeFL G2 :: encodeList L' =
20232023
encodeFR F :: encodeList (G2 :: L')) by reflexivity.
20242024
rewrite HS in H5;clear HS.
20252025

20262026
apply H with (m:=n2) in H5;
2027-
[|repeat apply Nat.le_le_succ_r; auto].
2027+
[|repeat apply Nat.le_le_succ_r; auto].
20282028

20292029
destruct H5 as [n2' H5].
20302030

FOLL/LL/Multisets.v

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This module is an adaptation of the standard library of Multisets in Coq #<a hre
66
and the implementation of multisets in CoLoR (http://color.inria.fr/)
77
88
9-
*)
9+
*)
1010
Require Export Permutation.
1111
Require Export Coq.Relations.Relations.
1212
Require Export Coq.Classes.Morphisms.
@@ -1048,7 +1048,7 @@ Module Type MultisetList (EQ : Eqset_dec).
10481048
transitivity proved by meq_trans as eq_ms.
10491049

10501050

1051-
(** Compatibilidade de Multiset com Permutation *)
1051+
(** Compatibility of Multiset and Permutation *)
10521052
(* Lemma meq_nil : [] =mul= [].
10531053
Proof. solve_meq. Qed.
10541054
*)
@@ -1317,7 +1317,7 @@ Proof. solve_meq. Qed.
13171317
Qed.
13181318

13191319

1320-
(** Propriedades sobre diff *)
1320+
(** Properties about diff *)
13211321

13221322
Lemma nil_rem: forall M, [] / M = [].
13231323
Proof. induction M; intros; auto. Qed.

0 commit comments

Comments
 (0)