Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Iris
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
Package Registry
Model registry
Operate
Terraform modules
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
William Mansky
Iris
Commits
5b7f3609
Commit
5b7f3609
authored
8 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Injectivity instances for prod/sum.
parent
12195779
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
prelude/base.v
+11
-1
11 additions, 1 deletion
prelude/base.v
with
11 additions
and
1 deletion
prelude/base.v
+
11
−
1
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 *)
...
...
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