Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
coq-stdpp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
David Swasey
coq-stdpp
Commits
08ce9e37
Commit
08ce9e37
authored
Apr 05, 2018
by
Robbert Krebbers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Notations `⊆@{A}` and `⊂@{A}`.
parent
10edecb6
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
21 additions
and
15 deletions
+21
-15
theories/base.v
theories/base.v
+7
-0
theories/coPset.v
theories/coPset.v
+1
-1
theories/collections.v
theories/collections.v
+3
-4
theories/fin_collections.v
theories/fin_collections.v
+1
-1
theories/fin_maps.v
theories/fin_maps.v
+4
-4
theories/gmultiset.v
theories/gmultiset.v
+3
-3
theories/list.v
theories/list.v
+1
-1
theories/mapset.v
theories/mapset.v
+1
-1
No files found.
theories/base.v
View file @
08ce9e37
...
@@ -812,6 +812,10 @@ Notation "X ⊈ Y" := (¬X ⊆ Y) (at level 70) : stdpp_scope.
...
@@ -812,6 +812,10 @@ Notation "X ⊈ Y" := (¬X ⊆ Y) (at level 70) : stdpp_scope.
Notation
"(⊈)"
:
=
(
λ
X
Y
,
X
⊈
Y
)
(
only
parsing
)
:
stdpp_scope
.
Notation
"(⊈)"
:
=
(
λ
X
Y
,
X
⊈
Y
)
(
only
parsing
)
:
stdpp_scope
.
Notation
"( X ⊈)"
:
=
(
λ
Y
,
X
⊈
Y
)
(
only
parsing
)
:
stdpp_scope
.
Notation
"( X ⊈)"
:
=
(
λ
Y
,
X
⊈
Y
)
(
only
parsing
)
:
stdpp_scope
.
Notation
"(⊈ X )"
:
=
(
λ
Y
,
Y
⊈
X
)
(
only
parsing
)
:
stdpp_scope
.
Notation
"(⊈ X )"
:
=
(
λ
Y
,
Y
⊈
X
)
(
only
parsing
)
:
stdpp_scope
.
Infix
"⊆@{ A }"
:
=
(@
subseteq
A
_
)
(
at
level
70
,
only
parsing
)
:
stdpp_scope
.
Notation
"(⊆@{ A } )"
:
=
(@
subseteq
A
_
)
(
only
parsing
)
:
stdpp_scope
.
Infix
"⊆*"
:
=
(
Forall2
(
⊆
))
(
at
level
70
)
:
stdpp_scope
.
Infix
"⊆*"
:
=
(
Forall2
(
⊆
))
(
at
level
70
)
:
stdpp_scope
.
Notation
"(⊆*)"
:
=
(
Forall2
(
⊆
))
(
only
parsing
)
:
stdpp_scope
.
Notation
"(⊆*)"
:
=
(
Forall2
(
⊆
))
(
only
parsing
)
:
stdpp_scope
.
Infix
"⊆**"
:
=
(
Forall2
(
⊆
*))
(
at
level
70
)
:
stdpp_scope
.
Infix
"⊆**"
:
=
(
Forall2
(
⊆
*))
(
at
level
70
)
:
stdpp_scope
.
...
@@ -833,6 +837,9 @@ Notation "(⊄)" := (λ X Y, X ⊄ Y) (only parsing) : stdpp_scope.
...
@@ -833,6 +837,9 @@ Notation "(⊄)" := (λ X Y, X ⊄ Y) (only parsing) : stdpp_scope.
Notation
"( X ⊄)"
:
=
(
λ
Y
,
X
⊄
Y
)
(
only
parsing
)
:
stdpp_scope
.
Notation
"( X ⊄)"
:
=
(
λ
Y
,
X
⊄
Y
)
(
only
parsing
)
:
stdpp_scope
.
Notation
"(⊄ X )"
:
=
(
λ
Y
,
Y
⊄
X
)
(
only
parsing
)
:
stdpp_scope
.
Notation
"(⊄ X )"
:
=
(
λ
Y
,
Y
⊄
X
)
(
only
parsing
)
:
stdpp_scope
.
Infix
"⊂@{ A }"
:
=
(
strict
(
⊆
@{
A
}))
(
at
level
70
,
only
parsing
)
:
stdpp_scope
.
Notation
"(⊂@{ A } )"
:
=
(
strict
(
⊆
@{
A
}))
(
only
parsing
)
:
stdpp_scope
.
Notation
"X ⊆ Y ⊆ Z"
:
=
(
X
⊆
Y
∧
Y
⊆
Z
)
(
at
level
70
,
Y
at
next
level
)
:
stdpp_scope
.
Notation
"X ⊆ Y ⊆ Z"
:
=
(
X
⊆
Y
∧
Y
⊆
Z
)
(
at
level
70
,
Y
at
next
level
)
:
stdpp_scope
.
Notation
"X ⊆ Y ⊂ Z"
:
=
(
X
⊆
Y
∧
Y
⊂
Z
)
(
at
level
70
,
Y
at
next
level
)
:
stdpp_scope
.
Notation
"X ⊆ Y ⊂ Z"
:
=
(
X
⊆
Y
∧
Y
⊂
Z
)
(
at
level
70
,
Y
at
next
level
)
:
stdpp_scope
.
Notation
"X ⊂ Y ⊆ Z"
:
=
(
X
⊂
Y
∧
Y
⊆
Z
)
(
at
level
70
,
Y
at
next
level
)
:
stdpp_scope
.
Notation
"X ⊂ Y ⊆ Z"
:
=
(
X
⊂
Y
∧
Y
⊆
Z
)
(
at
level
70
,
Y
at
next
level
)
:
stdpp_scope
.
...
...
theories/coPset.v
View file @
08ce9e37
...
@@ -199,7 +199,7 @@ Proof.
...
@@ -199,7 +199,7 @@ Proof.
refine
(
λ
X
Y
,
cast_if
(
decide
(
X
∩
Y
=
∅
)))
;
refine
(
λ
X
Y
,
cast_if
(
decide
(
X
∩
Y
=
∅
)))
;
abstract
(
by
rewrite
disjoint_intersection_L
).
abstract
(
by
rewrite
disjoint_intersection_L
).
Defined
.
Defined
.
Instance
mapset_subseteq_dec
:
RelDecision
(
@
subseteq
coPset
_
).
Instance
mapset_subseteq_dec
:
RelDecision
(
⊆
@{
coPset
}
).
Proof
.
Proof
.
refine
(
λ
X
Y
,
cast_if
(
decide
(
X
∪
Y
=
Y
)))
;
abstract
(
by
rewrite
subseteq_union_L
).
refine
(
λ
X
Y
,
cast_if
(
decide
(
X
∪
Y
=
Y
)))
;
abstract
(
by
rewrite
subseteq_union_L
).
Defined
.
Defined
.
...
...
theories/collections.v
View file @
08ce9e37
...
@@ -315,10 +315,10 @@ Section simple_collection.
...
@@ -315,10 +315,10 @@ Section simple_collection.
Proof
.
set_solver
.
Qed
.
Proof
.
set_solver
.
Qed
.
(** Subset relation *)
(** Subset relation *)
Global
Instance
collection_subseteq_antisymm
:
AntiSymm
(
≡
)
(
(
⊆
)
:
relation
C
).
Global
Instance
collection_subseteq_antisymm
:
AntiSymm
(
≡
)
(
⊆
@{
C
}
).
Proof
.
intros
??.
set_solver
.
Qed
.
Proof
.
intros
??.
set_solver
.
Qed
.
Global
Instance
collection_subseteq_preorder
:
PreOrder
(
(
⊆
)
:
relation
C
).
Global
Instance
collection_subseteq_preorder
:
PreOrder
(
⊆
@{
C
}
).
Proof
.
split
.
by
intros
??.
intros
???
;
set_solver
.
Qed
.
Proof
.
split
.
by
intros
??.
intros
???
;
set_solver
.
Qed
.
Lemma
subseteq_union
X
Y
:
X
⊆
Y
↔
X
∪
Y
≡
Y
.
Lemma
subseteq_union
X
Y
:
X
⊆
Y
↔
X
∪
Y
≡
Y
.
...
@@ -467,8 +467,7 @@ Section simple_collection.
...
@@ -467,8 +467,7 @@ Section simple_collection.
Proof
.
unfold_leibniz
.
apply
collection_equiv_spec
.
Qed
.
Proof
.
unfold_leibniz
.
apply
collection_equiv_spec
.
Qed
.
(** Subset relation *)
(** Subset relation *)
Global
Instance
collection_subseteq_partialorder
:
Global
Instance
collection_subseteq_partialorder
:
PartialOrder
(
⊆
@{
C
}).
PartialOrder
((
⊆
)
:
relation
C
).
Proof
.
split
.
apply
_
.
intros
??.
unfold_leibniz
.
apply
(
anti_symm
_
).
Qed
.
Proof
.
split
.
apply
_
.
intros
??.
unfold_leibniz
.
apply
(
anti_symm
_
).
Qed
.
Lemma
subseteq_union_L
X
Y
:
X
⊆
Y
↔
X
∪
Y
=
Y
.
Lemma
subseteq_union_L
X
Y
:
X
⊆
Y
↔
X
∪
Y
=
Y
.
...
...
theories/fin_collections.v
View file @
08ce9e37
...
@@ -149,7 +149,7 @@ Proof.
...
@@ -149,7 +149,7 @@ Proof.
Qed
.
Qed
.
(** * Induction principles *)
(** * Induction principles *)
Lemma
collection_wf
:
wf
(
strict
(@
subseteq
C
_
)
).
Lemma
collection_wf
:
wf
(
⊂
@{
C
}
).
Proof
.
apply
(
wf_projected
(<)
size
)
;
auto
using
subset_size
,
lt_wf
.
Qed
.
Proof
.
apply
(
wf_projected
(<)
size
)
;
auto
using
subset_size
,
lt_wf
.
Qed
.
Lemma
collection_ind
(
P
:
C
→
Prop
)
:
Lemma
collection_ind
(
P
:
C
→
Prop
)
:
Proper
((
≡
)
==>
iff
)
P
→
Proper
((
≡
)
==>
iff
)
P
→
...
...
theories/fin_maps.v
View file @
08ce9e37
...
@@ -224,7 +224,7 @@ Proof.
...
@@ -224,7 +224,7 @@ Proof.
destruct
(
m1
!!
i
),
(
m2
!!
i
),
(
m3
!!
i
)
;
simplify_eq
/=
;
destruct
(
m1
!!
i
),
(
m2
!!
i
),
(
m3
!!
i
)
;
simplify_eq
/=
;
done
||
etrans
;
eauto
.
done
||
etrans
;
eauto
.
Qed
.
Qed
.
Global
Instance
map_subseteq_po
:
PartialOrder
(
(
⊆
)
:
relation
(
M
A
)
).
Global
Instance
map_subseteq_po
:
PartialOrder
(
⊆
@{
M
A
}
).
Proof
.
Proof
.
split
;
[
apply
_
|].
split
;
[
apply
_
|].
intros
m1
m2
;
rewrite
!
map_subseteq_spec
.
intros
m1
m2
;
rewrite
!
map_subseteq_spec
.
...
@@ -965,7 +965,7 @@ Proof.
...
@@ -965,7 +965,7 @@ Proof.
destruct
(
insert_subset_inv
m
m2
i
x
)
as
(
m2'
&?&?&?)
;
auto
;
subst
.
destruct
(
insert_subset_inv
m
m2
i
x
)
as
(
m2'
&?&?&?)
;
auto
;
subst
.
rewrite
!
map_to_list_insert
;
simpl
;
auto
with
arith
.
rewrite
!
map_to_list_insert
;
simpl
;
auto
with
arith
.
Qed
.
Qed
.
Lemma
map_wf
{
A
}
:
wf
(
strict
(@
subseteq
(
M
A
)
_
)
).
Lemma
map_wf
{
A
}
:
wf
(
⊂
@{
M
A
}
).
Proof
.
Proof
.
apply
(
wf_projected
(<)
(
length
∘
map_to_list
)).
apply
(
wf_projected
(<)
(
length
∘
map_to_list
)).
-
by
apply
map_to_list_length
.
-
by
apply
map_to_list_length
.
...
@@ -1596,13 +1596,13 @@ Lemma map_union_cancel_l {A} (m1 m2 m3 : M A) :
...
@@ -1596,13 +1596,13 @@ Lemma map_union_cancel_l {A} (m1 m2 m3 : M A) :
m1
##
ₘ
m3
→
m2
##
ₘ
m3
→
m3
∪
m1
=
m3
∪
m2
→
m1
=
m2
.
m1
##
ₘ
m3
→
m2
##
ₘ
m3
→
m3
∪
m1
=
m3
∪
m2
→
m1
=
m2
.
Proof
.
Proof
.
intros
.
apply
(
anti_symm
(
⊆
))
;
apply
map_union_reflecting_l
with
m3
;
intros
.
apply
(
anti_symm
(
⊆
))
;
apply
map_union_reflecting_l
with
m3
;
auto
using
(
reflexive_eq
(
R
:
=
@
subseteq
(
M
A
)
_
)).
auto
using
(
reflexive_eq
(
R
:
=
(
⊆
@{
M
A
})
)).
Qed
.
Qed
.
Lemma
map_union_cancel_r
{
A
}
(
m1
m2
m3
:
M
A
)
:
Lemma
map_union_cancel_r
{
A
}
(
m1
m2
m3
:
M
A
)
:
m1
##
ₘ
m3
→
m2
##
ₘ
m3
→
m1
∪
m3
=
m2
∪
m3
→
m1
=
m2
.
m1
##
ₘ
m3
→
m2
##
ₘ
m3
→
m1
∪
m3
=
m2
∪
m3
→
m1
=
m2
.
Proof
.
Proof
.
intros
.
apply
(
anti_symm
(
⊆
))
;
apply
map_union_reflecting_r
with
m3
;
intros
.
apply
(
anti_symm
(
⊆
))
;
apply
map_union_reflecting_r
with
m3
;
auto
using
(
reflexive_eq
(
R
:
=
@
subseteq
(
M
A
)
_
)).
auto
using
(
reflexive_eq
(
R
:
=
(
⊆
@{
M
A
})
)).
Qed
.
Qed
.
Lemma
map_disjoint_union_l
{
A
}
(
m1
m2
m3
:
M
A
)
:
Lemma
map_disjoint_union_l
{
A
}
(
m1
m2
m3
:
M
A
)
:
m1
∪
m2
##
ₘ
m3
↔
m1
##
ₘ
m3
∧
m2
##
ₘ
m3
.
m1
∪
m2
##
ₘ
m3
↔
m1
##
ₘ
m3
∧
m2
##
ₘ
m3
.
...
...
theories/gmultiset.v
View file @
08ce9e37
...
@@ -231,7 +231,7 @@ Proof.
...
@@ -231,7 +231,7 @@ Proof.
Qed
.
Qed
.
(* Order stuff *)
(* Order stuff *)
Global
Instance
gmultiset_po
:
PartialOrder
(
@
subseteq
(
gmultiset
A
)
_
).
Global
Instance
gmultiset_po
:
PartialOrder
(
⊆
@{
gmultiset
A
}
).
Proof
.
Proof
.
split
;
[
split
|].
split
;
[
split
|].
-
by
intros
X
x
.
-
by
intros
X
x
.
...
@@ -246,7 +246,7 @@ Proof.
...
@@ -246,7 +246,7 @@ Proof.
apply
forall_proper
;
intros
x
.
unfold
multiplicity
.
apply
forall_proper
;
intros
x
.
unfold
multiplicity
.
destruct
(
gmultiset_car
X
!!
x
),
(
gmultiset_car
Y
!!
x
)
;
naive_solver
omega
.
destruct
(
gmultiset_car
X
!!
x
),
(
gmultiset_car
Y
!!
x
)
;
naive_solver
omega
.
Qed
.
Qed
.
Global
Instance
gmultiset_subseteq_dec
:
RelDecision
(
@
subseteq
(
gmultiset
A
)
_
).
Global
Instance
gmultiset_subseteq_dec
:
RelDecision
(
⊆
@{
gmultiset
A
}
).
Proof
.
Proof
.
refine
(
λ
X
Y
,
cast_if
(
decide
(
map_relation
(
≤
)
refine
(
λ
X
Y
,
cast_if
(
decide
(
map_relation
(
≤
)
(
λ
_
,
False
)
(
λ
_
,
True
)
(
gmultiset_car
X
)
(
gmultiset_car
Y
))))
;
(
λ
_
,
False
)
(
λ
_
,
True
)
(
gmultiset_car
X
)
(
gmultiset_car
Y
))))
;
...
@@ -342,7 +342,7 @@ Proof.
...
@@ -342,7 +342,7 @@ Proof.
Qed
.
Qed
.
(* Well-foundedness *)
(* Well-foundedness *)
Lemma
gmultiset_wf
:
wf
(
strict
(@
subseteq
(
gmultiset
A
)
_
)
).
Lemma
gmultiset_wf
:
wf
(
⊂
@{
gmultiset
A
}
).
Proof
.
Proof
.
apply
(
wf_projected
(<)
size
)
;
auto
using
gmultiset_subset_size
,
lt_wf
.
apply
(
wf_projected
(<)
size
)
;
auto
using
gmultiset_subset_size
,
lt_wf
.
Qed
.
Qed
.
...
...
theories/list.v
View file @
08ce9e37
...
@@ -2124,7 +2124,7 @@ Section submseteq_dec.
...
@@ -2124,7 +2124,7 @@ Section submseteq_dec.
End submseteq_dec.
End submseteq_dec.
(** ** Properties of [included] *)
(** ** Properties of [included] *)
Global Instance list_subseteq_po : PreOrder (
@subseteq (list A) _
).
Global Instance list_subseteq_po : PreOrder (
⊆@{list A}
).
Proof. split; firstorder. Qed.
Proof. split; firstorder. Qed.
Lemma list_subseteq_nil l : [] ⊆ l.
Lemma list_subseteq_nil l : [] ⊆ l.
Proof. intros x. by rewrite elem_of_nil. Qed.
Proof. intros x. by rewrite elem_of_nil. Qed.
...
...
theories/mapset.v
View file @
08ce9e37
...
@@ -85,7 +85,7 @@ Section deciders.
...
@@ -85,7 +85,7 @@ Section deciders.
refine
(
λ
X1
X2
,
cast_if
(
decide
(
X1
∩
X2
=
∅
)))
;
refine
(
λ
X1
X2
,
cast_if
(
decide
(
X1
∩
X2
=
∅
)))
;
abstract
(
by
rewrite
disjoint_intersection_L
).
abstract
(
by
rewrite
disjoint_intersection_L
).
Defined
.
Defined
.
Global
Instance
mapset_subseteq_dec
:
RelDecision
(
@
subseteq
(
mapset
M
)
_
).
Global
Instance
mapset_subseteq_dec
:
RelDecision
(
⊆
@{
mapset
M
}
).
Proof
.
Proof
.
refine
(
λ
X1
X2
,
cast_if
(
decide
(
X1
∪
X2
=
X2
)))
;
refine
(
λ
X1
X2
,
cast_if
(
decide
(
X1
∪
X2
=
X2
)))
;
abstract
(
by
rewrite
subseteq_union_L
).
abstract
(
by
rewrite
subseteq_union_L
).
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment