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
Model registry
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
Iris
stdpp
Commits
b411834e
Commit
b411834e
authored
2 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Tweak some comments about `multiset_solver`.
parent
2d8ccea3
No related branches found
No related tags found
No related merge requests found
Pipeline
#78800
passed
2 years ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
stdpp/gmultiset.v
+7
-1
7 additions, 1 deletion
stdpp/gmultiset.v
with
7 additions
and
1 deletion
stdpp/gmultiset.v
+
7
−
1
View file @
b411834e
...
...
@@ -173,7 +173,10 @@ simplifies occurences of [multiplicity x {[ y ]}] as follows:
occur elsewhere in the hypotheses or goal.
- Finally, we make a case distinction between [x = y] or [x ≠ y]. This step is
done last so as to avoid needless exponential blow-ups.
*)
The tests [test_big_X] in [tests/multiset_solver.v] show the second step reduces
the running time significantly (from >10 seconds to <1 second). *)
Class
MultisetUnfold
`{
Countable
A
}
(
x
:
A
)
(
X
:
gmultiset
A
)
(
n
:
nat
)
:=
{
multiset_unfold
:
multiplicity
x
X
=
n
}
.
Global
Arguments
multiset_unfold
{_
_
_}
_
_
_
{_}
:
assert
.
...
...
@@ -282,6 +285,9 @@ Ltac multiset_instantiate :=
end
.
(** Step 4: simplify singletons *)
(** This lemma results in information loss if there are other occurences of
[y] in the goal. In the tactic [multiset_simplify_singletons] we use [clear y]
to ensure we do not use the lemma if it leads to information loss. *)
Local
Lemma
multiplicity_singleton_forget
`{
Countable
A
}
x
y
:
∃
n
,
multiplicity
(
A
:=
A
)
x
{[
+
y
+
]}
=
n
∧
n
≤
1
.
Proof
.
rewrite
multiplicity_singleton'
.
case_decide
;
eauto
with
lia
.
Qed
.
...
...
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