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
f6a91817
Commit
f6a91817
authored
4 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Test cases for `eunify`.
parent
ddfd5b06
No related branches found
No related tags found
1 merge request
!224
Add `eunify` tactic that lifts Coq's `unify` tactic to `open_constr`
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/eunify.ref
+13
-0
13 additions, 0 deletions
tests/eunify.ref
tests/eunify.v
+44
-0
44 additions, 0 deletions
tests/eunify.v
with
57 additions
and
0 deletions
tests/eunify.ref
0 → 100644
+
13
−
0
View file @
f6a91817
"eunify_test"
: string
The command has indeed failed with message:
No matching clauses for match.
((fix add (n m : nat) {struct n} : nat :=
match n with
| 0 => m
| S p => S (add p m)
end) x y)
"eunify_test_evars"
: string
The command has indeed failed with message:
No matching clauses for match.
This diff is collapsed.
Click to expand it.
tests/eunify.v
0 → 100644
+
44
−
0
View file @
f6a91817
From
stdpp
Require
Import
tactics
strings
.
Check
"eunify_test"
.
Lemma
eunify_test
:
∀
x
y
,
0
<
S
x
+
y
.
Proof
.
intros
x
y
.
(* Test that Ltac matching fails, otherwise this test is pointless *)
Fail
match
goal
with
|
|
-
0
<
S
_
=>
idtac
end
.
(* [eunify] succeeds *)
match
goal
with
|
|
-
0
<
?x
=>
eunify
x
(
S
_)
end
.
match
goal
with
|
|
-
0
<
?x
=>
let
y
:=
open_constr
:(_)
in
eunify
x
(
S
y
);
idtac
y
end
.
lia
.
Qed
.
Check
"eunify_test_evars"
.
Lemma
eunify_test_evars
:
∃
x
y
,
0
<
S
x
+
y
.
Proof
.
eexists
_,
_
.
(* Test that Ltac matching fails, otherwise this test is pointless *)
Fail
match
goal
with
|
|
-
0
<
S
_
=>
idtac
end
.
(* [eunify] succeeds even if the goal contains evars *)
match
goal
with
|
|
-
0
<
?x
=>
eunify
x
(
S
_)
end
.
(* Let's try to use [eunify] to instantiate the first evar *)
match
goal
with
|
|
-
0
<
?x
=>
eunify
x
(
1
+
_)
end
.
(* And the other evar *)
match
goal
with
|
|
-
0
<
?x
=>
eunify
x
2
end
.
lia
.
Qed
.
\ No newline at end of file
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