Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
Iris
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
116
Issues
116
List
Boards
Labels
Service Desk
Milestones
Merge Requests
23
Merge Requests
23
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Iris
Iris
Commits
5b7f3609
Commit
5b7f3609
authored
May 26, 2016
by
Robbert Krebbers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Injectivity instances for prod/sum.
parent
12195779
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
prelude/base.v
prelude/base.v
+11
-1
No files found.
prelude/base.v
View file @
5b7f3609
...
...
@@ -474,8 +474,11 @@ Section prod_relation.
Global
Instance
prod_relation_equiv
:
Equivalence
R1
→
Equivalence
R2
→
Equivalence
(
prod_relation
R1
R2
).
Proof
.
split
;
apply
_
.
Qed
.
Global
Instance
pair_proper'
:
Proper
(
R1
==>
R2
==>
prod_relation
R1
R2
)
pair
.
Proof
.
firstorder
eauto
.
Qed
.
Global
Instance
pair_inj'
:
Inj2
R1
R2
(
prod_relation
R1
R2
)
pair
.
Proof
.
inversion_clear
1
;
eauto
.
Qed
.
Global
Instance
fst_proper'
:
Proper
(
prod_relation
R1
R2
==>
R1
)
fst
.
Proof
.
firstorder
eauto
.
Qed
.
Global
Instance
snd_proper'
:
Proper
(
prod_relation
R1
R2
==>
R2
)
snd
.
...
...
@@ -484,7 +487,8 @@ End prod_relation.
Instance
prod_equiv
`
{
Equiv
A
,
Equiv
B
}
:
Equiv
(
A
*
B
)
:
=
prod_relation
(
≡
)
(
≡
).
Instance
pair_proper
`
{
Equiv
A
,
Equiv
B
}
:
Proper
((
≡
)
==>
(
≡
)
==>
(
≡
))
(@
pair
A
B
)
|
0
:
=
_
.
Proper
((
≡
)
==>
(
≡
)
==>
(
≡
))
(@
pair
A
B
)
:
=
_
.
Instance
pair_equiv_inj
`
{
Equiv
A
,
Equiv
B
}
:
Inj2
(
≡
)
(
≡
)
(
≡
)
(@
pair
A
B
)
:
=
_
.
Instance
fst_proper
`
{
Equiv
A
,
Equiv
B
}
:
Proper
((
≡
)
==>
(
≡
))
(@
fst
A
B
)
:
=
_
.
Instance
snd_proper
`
{
Equiv
A
,
Equiv
B
}
:
Proper
((
≡
)
==>
(
≡
))
(@
snd
A
B
)
:
=
_
.
Typeclasses
Opaque
prod_equiv
.
...
...
@@ -531,11 +535,17 @@ Section sum_relation.
Proof
.
constructor
;
auto
.
Qed
.
Global
Instance
inr_proper'
:
Proper
(
R2
==>
sum_relation
R1
R2
)
inr
.
Proof
.
constructor
;
auto
.
Qed
.
Global
Instance
inl_inj'
:
Inj
R1
(
sum_relation
R1
R2
)
inl
.
Proof
.
inversion_clear
1
;
auto
.
Qed
.
Global
Instance
inr_inj'
:
Inj
R2
(
sum_relation
R1
R2
)
inr
.
Proof
.
inversion_clear
1
;
auto
.
Qed
.
End
sum_relation
.
Instance
sum_equiv
`
{
Equiv
A
,
Equiv
B
}
:
Equiv
(
A
+
B
)
:
=
sum_relation
(
≡
)
(
≡
).
Instance
inl_proper
`
{
Equiv
A
,
Equiv
B
}
:
Proper
((
≡
)
==>
(
≡
))
(@
inl
A
B
)
:
=
_
.
Instance
inr_proper
`
{
Equiv
A
,
Equiv
B
}
:
Proper
((
≡
)
==>
(
≡
))
(@
inr
A
B
)
:
=
_
.
Instance
inl_equiv_inj
`
{
Equiv
A
,
Equiv
B
}
:
Inj
(
≡
)
(
≡
)
(@
inl
A
B
)
:
=
_
.
Instance
inr_equiv_inj
`
{
Equiv
A
,
Equiv
B
}
:
Inj
(
≡
)
(
≡
)
(@
inr
A
B
)
:
=
_
.
Typeclasses
Opaque
sum_equiv
.
(** ** Option *)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment