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
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
Jan
stdpp
Commits
45b64e21
Commit
45b64e21
authored
4 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Make `multiset_solver` stronger by also considering `multiplicity` in hyps.
parent
f4269240
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/multiset_solver.v
+2
-0
2 additions, 0 deletions
tests/multiset_solver.v
theories/gmultiset.v
+7
-2
7 additions, 2 deletions
theories/gmultiset.v
with
9 additions
and
2 deletions
tests/multiset_solver.v
+
2
−
0
View file @
45b64e21
...
@@ -15,4 +15,6 @@ Section test.
...
@@ -15,4 +15,6 @@ Section test.
{[
z
]}
⊎
X
=
{[
y
]}
⊎
Y
→
{[
z
]}
⊎
X
=
{[
y
]}
⊎
Y
→
{[
x
]}
⊎
({[
z
]}
⊎
X
)
=
{[
y
]}
⊎
({[
x
]}
⊎
Y
)
.
{[
x
]}
⊎
({[
z
]}
⊎
X
)
=
{[
y
]}
⊎
({[
x
]}
⊎
Y
)
.
Proof
.
multiset_solver
.
Qed
.
Proof
.
multiset_solver
.
Qed
.
Lemma
test5
X
x
:
X
⊎
∅
=
{[
x
]}
→
X
⊎
∅
≠@
{
gmultiset
A
}
∅.
Proof
.
multiset_solver
.
Qed
.
End
test
.
End
test
.
This diff is collapsed.
Click to expand it.
theories/gmultiset.v
+
7
−
2
View file @
45b64e21
...
@@ -163,8 +163,9 @@ singleton [{[ y ]}] since the singleton receives special treatment in step (3).
...
@@ -163,8 +163,9 @@ singleton [{[ y ]}] since the singleton receives special treatment in step (3).
Step (3) is achieved using the tactic [multiset_instantiate], which instantiates
Step (3) is achieved using the tactic [multiset_instantiate], which instantiates
universally quantified hypotheses [H : ∀ x : A, P x] in two ways:
universally quantified hypotheses [H : ∀ x : A, P x] in two ways:
- If [P] contains a multiset singleton [{[ y ]}] it creates the hypothesis [H y].
- If [P] contains a multiset singleton [{[ y ]}] it adds the hypothesis [H y].
- If the goal contains [multiplicity y X] it creates the hypothesis [H y].
- If the goal or some hypothesis contains [multiplicity y X] it adds the
hypothesis [H y].
*)
*)
Class
MultisetUnfold
`{
Countable
A
}
(
x
:
A
)
(
X
:
gmultiset
A
)
(
n
:
nat
)
:=
Class
MultisetUnfold
`{
Countable
A
}
(
x
:
A
)
(
X
:
gmultiset
A
)
(
n
:
nat
)
:=
{
multiset_unfold
:
multiplicity
x
X
=
n
}
.
{
multiset_unfold
:
multiplicity
x
X
=
n
}
.
...
@@ -233,6 +234,10 @@ Ltac multiset_instantiate :=
...
@@ -233,6 +234,10 @@ Ltac multiset_instantiate :=
already exists. *)
already exists. *)
unify
y
e'
;
unless
(
P
y
)
by
assumption
;
pose
proof
(
H
y
)
unify
y
e'
;
unless
(
P
y
)
by
assumption
;
pose
proof
(
H
y
)
end
end
|
H
:
(
∀
x
:
?A
,
@
?P
x
),
_
:
context
[
multiplicity
?y
_]
|
-
_
=>
(* Use [unless] to avoid creating a new hypothesis [H y : P y] if [P y]
already exists. *)
unless
(
P
y
)
by
assumption
;
pose
proof
(
H
y
)
|
H
:
(
∀
x
:
?A
,
@
?P
x
)
|
-
context
[
multiplicity
?y
_]
=>
|
H
:
(
∀
x
:
?A
,
@
?P
x
)
|
-
context
[
multiplicity
?y
_]
=>
(* Use [unless] to avoid creating a new hypothesis [H y : P y] if [P y]
(* Use [unless] to avoid creating a new hypothesis [H y : P y] if [P y]
already exists. *)
already exists. *)
...
...
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