Skip to content

Commit ee71d14

Browse files
liyishuaigmalecha
authored andcommitted
Remove P*
1 parent 110ca2e commit ee71d14

33 files changed

+34
-702
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,6 @@ deps.pdf
1818
.coqdeps.d
1919
.DS_Store
2020
html
21+
*.coq.d
22+
*.vok
23+
*.vos

_CoqProject

-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ theories/Core/Any.v
77
theories/Core/CmpDec.v
88
theories/Core/EquivDec.v
99
theories/Core/RelDec.v
10-
theories/Core/Type.v
1110

1211
theories/Structures/Applicative.v
1312
theories/Structures/BinOps.v
@@ -18,7 +17,6 @@ theories/Structures/EqDep.v
1817
theories/Structures/Foldable.v
1918
theories/Structures/FunctorLaws.v
2019
theories/Structures/Functor.v
21-
theories/Structures/Identity.v
2220
theories/Structures/Maps.v
2321
theories/Structures/MonadCont.v
2422
theories/Structures/MonadExc.v
@@ -33,7 +31,6 @@ theories/Structures/Monad.v
3331
theories/Structures/MonadWriter.v
3432
theories/Structures/MonadZero.v
3533
theories/Structures/Monoid.v
36-
theories/Structures/Proper.v
3734
theories/Structures/Reducible.v
3835
theories/Structures/Sets.v
3936
theories/Structures/Traversable.v
@@ -104,7 +101,6 @@ theories/Tactics/Injection.v
104101
theories/Tactics/MonadTac.v
105102
theories/Tactics/Parametric.v
106103
theories/Tactics/Reify.v
107-
theories/Tactics/TypeTac.v
108104

109105
theories/Data/Graph/BuildGraph.v
110106
theories/Data/Graph/GraphAdjList.v

examples/MonadReasoning.v

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
Require Import ExtLib.Core.Type.
21
Require Import ExtLib.Structures.Monad.
32
Require Import ExtLib.Structures.MonadLaws.
43
Require Import ExtLib.Data.PreFun.
@@ -57,4 +56,4 @@ Section with_m.
5756
Qed.
5857
5958
End with_m.
60-
*)
59+
*)

scratch/notation.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
Module | Notation | Definition | Level | Associativity
22
---|---|---|---|---
33
`FunNotation` | `begin e1 end` | `e1` | 0 |
4-
`FunctorNotation` | `f <$> x` | `pfmap f x` | 52 | left
4+
`FunctorNotation` | `f <$> x` | `fmap f x` | 52 | left
55
`ApplicativeNotation` | `f <*> x` | `ap f x` | 52 | left
66
`MonadPlusNotation` | `x <+> y` | `mplus x y` | 54 | left
7-
`MonadNotation` | `f =<< c` | `pbind c f` | 61 | right
7+
`MonadNotation` | `f =<< c` | `bind c f` | 61 | right
88
`MonadNotation` | `f >=> g` | `mcompose f g` | 61 | right
9-
`MonadNotation` | `x <- c1 ;; c2` | `pbind c1 (fun x => c2)` | 61 | right
10-
`MonadNotation` | `' pat <- c1 ;; c2` | `pbind c1 (fun x => match x with pat => c2)` | 61 | right
11-
`MonadNotation` | `c >>= f` | `pbind c f` | 62 | left
9+
`MonadNotation` | `x <- c1 ;; c2` | `bind c1 (fun x => c2)` | 61 | right
10+
`MonadNotation` | `' pat <- c1 ;; c2` | `bind c1 (fun x => match x with pat => c2)` | 61 | right
11+
`MonadNotation` | `c >>= f` | `bind c f` | 62 | left
1212
`MonadNotation` | `e1 ;; e2` | `_ <- e1 ;; e2` | 62 | left
13-
`FunNotation` | `f $ x` | `f x` | 99 | right
13+
`FunNotation` | `f $ x` | `f x` | 99 | right

theories/Core/Type.v

-139
This file was deleted.

theories/Data/Fun.v

-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
Require Import ExtLib.Core.Type.
21
Require Import ExtLib.Data.PreFun.
32
Require Import ExtLib.Structures.Functor.
43
Require Import ExtLib.Structures.Applicative.
@@ -8,11 +7,6 @@ Require Import ExtLib.Structures.Monoid.
87
Set Implicit Arguments.
98
Set Strict Implicit.
109

11-
Global Instance proper_id (T : Type) {tT : type T} : proper (fun x => x).
12-
Proof.
13-
repeat red; intros. apply H.
14-
Qed.
15-
1610

1711
Section functors.
1812
Variable A : Type.

theories/Data/HList.v

-50
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
Require Import Coq.Lists.List.
22
Require Import Relations RelationClasses.
3-
Require Import ExtLib.Core.Type.
43
Require Import ExtLib.Core.RelDec.
5-
Require Import ExtLib.Structures.Proper.
64
Require Import ExtLib.Data.SigT.
75
Require Import ExtLib.Data.Member.
86
Require Import ExtLib.Data.ListNth.
@@ -453,54 +451,6 @@ Section hlist.
453451
Qed.
454452

455453
Section type.
456-
Variable eqv : forall x, type (F x).
457-
458-
Global Instance type_hlist (ls : list iT): type (hlist ls) :=
459-
{ equal := @equiv_hlist (fun x => @equal _ (eqv x)) ls
460-
; proper :=
461-
(fix recur ls (h : hlist ls) : Prop :=
462-
match h with
463-
| Hnil => True
464-
| Hcons _ _ x y => proper x /\ recur _ y
465-
end) ls
466-
}.
467-
468-
Variable eqvOk : forall x, typeOk (eqv x).
469-
470-
Global Instance typeOk_hlist (ls : list iT): typeOk (type_hlist ls).
471-
Proof.
472-
constructor.
473-
{ induction ls; intros.
474-
{ rewrite (hlist_eta x) in *. rewrite (hlist_eta y) in *.
475-
clear. compute; auto. }
476-
{ rewrite (hlist_eta x) in *. rewrite (hlist_eta y) in *.
477-
simpl in H.
478-
inv_all. eapply IHls in H1.
479-
eapply only_proper in H0; eauto.
480-
simpl; tauto. } }
481-
{ intro. induction ls; simpl.
482-
{ rewrite (hlist_eta x); intros; constructor. }
483-
{ rewrite (hlist_eta x); intros; intuition; constructor.
484-
eapply preflexive; [ | eauto with typeclass_instances ].
485-
eauto with typeclass_instances.
486-
eapply IHls; eauto. } }
487-
{ red. induction 1.
488-
{ constructor. }
489-
{ constructor. symmetry. assumption. assumption. } }
490-
{ red. induction 1.
491-
{ auto. }
492-
{ intro H1.
493-
etransitivity; [ | eassumption ].
494-
constructor; eauto. } }
495-
Qed.
496-
497-
Global Instance proper_hlist_app l l' : proper (@hlist_app l l').
498-
Proof.
499-
do 6 red. induction 1; simpl; auto.
500-
{ intros. constructor; eauto.
501-
eapply IHequiv_hlist. exact H1. }
502-
Qed.
503-
504454
Lemma hlist_app_assoc : forall ls ls' ls''
505455
(a : hlist ls) (b : hlist ls') (c : hlist ls''),
506456
hlist_app (hlist_app a b) c =

theories/Data/List.v

-37
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
Require Import Coq.Lists.List.
22
Require Coq.Classes.EquivDec.
3-
Require Import ExtLib.Core.Type.
43
Require Import ExtLib.Core.RelDec.
54
Require Import ExtLib.Structures.Monoid.
65
Require Import ExtLib.Structures.Reducible.
@@ -12,42 +11,6 @@ Set Implicit Arguments.
1211
Set Strict Implicit.
1312
Set Universe Polymorphism.
1413

15-
Section type.
16-
Universe u.
17-
Variable T : Type@{u}.
18-
Context {type_T : type T}.
19-
20-
Inductive list_eq@{} : list T -> list T -> Prop :=
21-
| nil_eq : list_eq nil nil
22-
| cons_eq : forall x xs y ys, equal x y -> list_eq xs ys -> list_eq (x :: xs) (y :: ys).
23-
24-
Instance type_list@{} : type@{u} (list T) :=
25-
{ equal := list_eq
26-
; proper := Forall proper
27-
}.
28-
29-
Context {typeOk_T : typeOk type_T}.
30-
31-
Instance typeOk_list@{} : typeOk type_list.
32-
Proof.
33-
constructor.
34-
{ intros. induction H.
35-
{ intuition; constructor. }
36-
{ apply only_proper in H; auto. intuition; constructor; intuition. } }
37-
{ intro. induction x; intros.
38-
{ constructor. }
39-
{ inversion H; clear H; subst.
40-
constructor; auto.
41-
apply equiv_prefl; auto. apply IHx. apply H3. } }
42-
{ intro. induction 1; constructor; auto.
43-
apply equiv_sym; auto. }
44-
{ intro. do 3 intro. revert z. induction H.
45-
{ remember nil. destruct 1; try congruence. constructor. }
46-
{ remember (y :: ys). destruct 1; try congruence. inversion Heql; clear Heql; subst.
47-
constructor. eapply equiv_trans; eauto. eapply IHlist_eq. apply H2. } }
48-
Qed.
49-
End type.
50-
5114
Section EqDec.
5215
Universe u.
5316
Variable T : Type@{u}.

theories/Data/Map/FMapPositive.v

-16
Original file line numberDiff line numberDiff line change
@@ -282,21 +282,5 @@ Section fmap.
282282

283283
End fmap.
284284

285-
Require Import ExtLib.Core.Type.
286-
287-
Section type.
288-
Variable T : Type.
289-
Variable tT : type T.
290-
291-
Instance type_pmap : type (pmap T) :=
292-
type_from_equal
293-
(fun l r =>
294-
(forall k v,
295-
mapsto k v l -> exists v', mapsto k v' r /\ equal v v')
296-
/\ (forall k v,
297-
mapsto k v r -> exists v', mapsto k v' l /\ equal v v')).
298-
299-
End type.
300-
301285
Global Instance Functor_pmap : Functor pmap :=
302286
{ fmap := fmap_pmap }.

theories/Data/Member.v

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
(** [member] is the proof relevant version of [In] **)
22
Require Import Coq.Lists.List.
33
Require Import Relations RelationClasses.
4-
Require Import ExtLib.Core.Type.
54
Require Import ExtLib.Core.RelDec.
65
Require Import ExtLib.Data.SigT.
76
Require Import ExtLib.Data.ListNth.
87
Require Import ExtLib.Data.Option.
9-
Require Import ExtLib.Structures.Proper.
108
Require Import ExtLib.Tactics.Injection.
119
Require Import ExtLib.Tactics.EqDep.
1210

@@ -137,4 +135,4 @@ Section member.
137135
induction 1; simpl; auto.
138136
Qed.
139137

140-
End member.
138+
End member.

0 commit comments

Comments
 (0)