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
84a6c156
Commit
84a6c156
authored
3 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
f_equiv: slightly better support for function relations
parent
e5b77dc5
No related branches found
Branches containing commit
No related tags found
1 merge request
!326
f_equiv: slightly better support for function relations
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/proper.v
+12
-0
12 additions, 0 deletions
tests/proper.v
theories/tactics.v
+4
-4
4 additions, 4 deletions
theories/tactics.v
with
16 additions
and
4 deletions
tests/proper.v
+
12
−
0
View file @
84a6c156
...
...
@@ -21,6 +21,18 @@ Section tests.
baz
(
bar
(
f
0
))
(
f
2
)
.
Goal
Proper
(
pointwise_relation
nat
(
≡
)
==>
(
≡
))
test3
.
Proof
.
solve_proper
.
Qed
.
(* We mirror [discrete_fun] from Iris to have an equivalence on a function
space. *)
Definition
discrete_fun
{
A
}
(
B
:
A
→
Type
)
`{
!∀
x
,
Equiv
(
B
x
)}
:=
∀
x
:
A
,
B
x
.
Local
Instance
discrete_fun_equiv
{
A
}
{
B
:
A
→
Type
}
`{
!∀
x
,
Equiv
(
B
x
)}
:
Equiv
(
discrete_fun
B
)
:=
λ
f
g
,
∀
x
,
f
x
≡
g
x
.
Notation
"A -d> B"
:=
(
@
discrete_fun
A
(
λ
_,
B
)
_)
(
at
level
99
,
B
at
level
200
,
right
associativity
)
.
Definition
test4
x
(
f
:
A
-
d
>
A
)
:=
f
x
.
Goal
∀
x
,
Proper
((
≡
)
==>
(
≡
))
(
test4
x
)
.
Proof
.
solve_proper
.
Qed
.
End
tests
.
Global
Instance
from_option_proper_test1
`{
Equiv
A
}
{
B
}
(
R
:
relation
B
)
(
f
:
A
→
B
)
:
...
...
This diff is collapsed.
Click to expand it.
theories/tactics.v
+
4
−
4
View file @
84a6c156
...
...
@@ -406,12 +406,12 @@ Ltac f_equiv :=
|
|
-
?R
(
?f
_
_
_
_)
_
=>
simple
apply
(_
:
Proper
(_
==>
_
==>
_
==>
_
==>
R
)
f
)
|
|
-
?R
(
?f
_
_
_
_
_)
_
=>
simple
apply
(_
:
Proper
(_
==>
_
==>
_
==>
_
==>
_
==>
R
)
f
)
(* In case the function symbol differs, but the arguments are the same,
maybe we have a
pointwise_rela
tion in our context. *)
maybe we have a
relation about those func
tion
s
in our context. *)
(* TODO: If only some of the arguments are the same, we could also
query for
"pointwise_
relation
"'
s. But that leads to a combinatorial
query for
such
relations. But that leads to a combinatorial
explosion about which arguments are and which are not the same. *)
|
H
:
pointwise_relation
_
?R
?f
?g
|
-
?R
(
?f
?x
)
(
?g
?x
)
=>
simple
apply
H
|
H
:
pointwise_relation
_
(
pointwise_relation
_
?R
)
?f
?g
|
-
?R
(
?f
?x
?y
)
(
?g
?x
?y
)
=>
simple
apply
H
|
H
:
_
?f
?g
|
-
?R
(
?f
?x
)
(
?g
?x
)
=>
solve
[
simple
apply
H
]
|
H
:
_
?f
?g
|
-
?R
(
?f
?x
?y
)
(
?g
?x
?y
)
=>
solve
[
simple
apply
H
]
end
;
try
simple
apply
reflexivity
.
Tactic
Notation
"f_equiv"
"/="
:=
csimpl
in
*
;
f_equiv
.
...
...
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