Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
stdpp
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Adam
stdpp
Commits
a9c8861d
Commit
a9c8861d
authored
3 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
solve_ndisj: handle goals containing _ ∖ _ ∖ _
parent
cbf06f7e
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CHANGELOG.md
+2
-1
2 additions, 1 deletion
CHANGELOG.md
tests/solve_ndisj.v
+4
-0
4 additions, 0 deletions
tests/solve_ndisj.v
theories/namespaces.v
+12
-7
12 additions, 7 deletions
theories/namespaces.v
with
18 additions
and
8 deletions
CHANGELOG.md
+
2
−
1
View file @
a9c8861d
...
@@ -112,7 +112,8 @@ API-breaking change is listed.
...
@@ -112,7 +112,8 @@ API-breaking change is listed.
-
Add
`mk_evar`
tactic to generate evars (intended as a more useful replacement
-
Add
`mk_evar`
tactic to generate evars (intended as a more useful replacement
for Coq's
`evar`
tactic).
for Coq's
`evar`
tactic).
-
Make
`solve_ndisj`
able to solve more goals of the form
`_ ⊆ ⊤ ∖ _`
,
-
Make
`solve_ndisj`
able to solve more goals of the form
`_ ⊆ ⊤ ∖ _`
,
`_ ∖ _ ## _`
,
`_ ## _ ∖ _`
, as well as
`_ ## ∅`
and
`∅ ## _`
.
`_ ∖ _ ## _`
,
`_ ## _ ∖ _`
, as well as
`_ ## ∅`
and
`∅ ## _`
,
and goals containing
`_ ∖ _ ∖ _`
.
-
Improvements to curry:
-
Improvements to curry:
+
Swap names of
`curry`
/
`uncurry`
,
`curry3`
/
`uncurry3`
,
`curry4`
/
`uncurry4`
,
+
Swap names of
`curry`
/
`uncurry`
,
`curry3`
/
`uncurry3`
,
`curry4`
/
`uncurry4`
,
`gmap_curry`
/
`gmap_uncurry`
, and
`hcurry`
/
`huncurry`
to be consistent with
`gmap_curry`
/
`gmap_uncurry`
, and
`hcurry`
/
`huncurry`
to be consistent with
...
...
This diff is collapsed.
Click to expand it.
tests/solve_ndisj.v
+
4
−
0
View file @
a9c8861d
...
@@ -43,3 +43,7 @@ Proof. solve_ndisj. Qed.
...
@@ -43,3 +43,7 @@ Proof. solve_ndisj. Qed.
Lemma
test9
N1
N2
:
Lemma
test9
N1
N2
:
⊤
∖
(
↑
N1
∪
↑
N2
)
⊆@
{
coPset
}
⊤
∖
↑
N1
.
@
"counter"
∖
↑
N1
.
@
"state"
∖
↑
N2
.
⊤
∖
(
↑
N1
∪
↑
N2
)
⊆@
{
coPset
}
⊤
∖
↑
N1
.
@
"counter"
∖
↑
N1
.
@
"state"
∖
↑
N2
.
Proof
.
solve_ndisj
.
Qed
.
Proof
.
solve_ndisj
.
Qed
.
Lemma
test10
N1
N2
E
:
↑
N1
∪
E
##
⊤
∖
↑
N1
∖
↑
N2
∖
E
.
Proof
.
solve_ndisj
.
Qed
.
This diff is collapsed.
Click to expand it.
theories/namespaces.v
+
12
−
7
View file @
a9c8861d
...
@@ -97,13 +97,7 @@ Global Hint Resolve nclose_subseteq' | 100 : ndisj.
...
@@ -97,13 +97,7 @@ Global Hint Resolve nclose_subseteq' | 100 : ndisj.
(** Rules for goals of the form [_ ## _] *)
(** Rules for goals of the form [_ ## _] *)
(** The base rule that we want to ultimately get down to. *)
(** The base rule that we want to ultimately get down to. *)
Global
Hint
Extern
0
(_
##
_)
=>
apply
ndot_ne_disjoint
;
congruence
:
ndisj
.
Global
Hint
Extern
0
(_
##
_)
=>
apply
ndot_ne_disjoint
;
congruence
:
ndisj
.
(** Fallback, loses lots of information but lets other rules make progress.
(** Trivial cases. *)
Tests show trying [disjoint_difference_l1] first gives better performance. *)
Local
Definition
coPset_disjoint_difference_l1
:=
disjoint_difference_l1
(
C
:=
coPset
)
.
Global
Hint
Resolve
coPset_disjoint_difference_l1
|
50
:
ndisj
.
Local
Definition
coPset_disjoint_difference_l2
:=
disjoint_difference_l2
(
C
:=
coPset
)
.
Global
Hint
Resolve
coPset_disjoint_difference_l2
|
100
:
ndisj
.
Global
Hint
Resolve
ndot_preserve_disjoint_l
ndot_preserve_disjoint_r
|
100
:
ndisj
.
Local
Definition
coPset_disjoint_empty_l
:=
disjoint_empty_l
(
C
:=
coPset
)
.
Local
Definition
coPset_disjoint_empty_l
:=
disjoint_empty_l
(
C
:=
coPset
)
.
Global
Hint
Resolve
coPset_disjoint_empty_l
:
ndisj
.
Global
Hint
Resolve
coPset_disjoint_empty_l
:
ndisj
.
Local
Definition
coPset_disjoint_empty_r
:=
disjoint_empty_r
(
C
:=
coPset
)
.
Local
Definition
coPset_disjoint_empty_r
:=
disjoint_empty_r
(
C
:=
coPset
)
.
...
@@ -115,6 +109,17 @@ Global Hint Extern 10 (_ ## (_ ∖ _)) =>
...
@@ -115,6 +109,17 @@ Global Hint Extern 10 (_ ## (_ ∖ _)) =>
|
|
-
(_
∖
_)
##
_
=>
fail
(* ∖ on both sides, leave it be *)
|
|
-
(_
∖
_)
##
_
=>
fail
(* ∖ on both sides, leave it be *)
|
|
-
_
=>
symmetry
|
|
-
_
=>
symmetry
end
:
ndisj
.
end
:
ndisj
.
(** Before we apply disjoint_difference, let's make sure we normalize the goal
to [_ ∖ (_ ∪ _)]. *)
Global
Hint
Extern
20
((
?X
∖
?Y
∖
?Z
)
##
_)
=>
rewrite
(
difference_difference_L
(
C
:=
coPset
)
X
Y
Z
)
:
ndisj
.
(** Fallback, loses lots of information but lets other rules make progress.
Tests show trying [disjoint_difference_l1] first gives better performance. *)
Local
Definition
coPset_disjoint_difference_l1
:=
disjoint_difference_l1
(
C
:=
coPset
)
.
Global
Hint
Resolve
coPset_disjoint_difference_l1
|
50
:
ndisj
.
Local
Definition
coPset_disjoint_difference_l2
:=
disjoint_difference_l2
(
C
:=
coPset
)
.
Global
Hint
Resolve
coPset_disjoint_difference_l2
|
100
:
ndisj
.
Global
Hint
Resolve
ndot_preserve_disjoint_l
ndot_preserve_disjoint_r
|
100
:
ndisj
.
Ltac
solve_ndisj
:=
Ltac
solve_ndisj
:=
repeat
match
goal
with
repeat
match
goal
with
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment