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-coq
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Joshua Yanovski
iris-coq
Commits
22fac635
Commit
22fac635
authored
Dec 09, 2016
by
Ralf Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename _setoid suffix to _equiv; add variant of fmap_Some_setoid that can be usefully destructed
parent
2407263c
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
21 additions
and
17 deletions
+21
-17
algebra/auth.v
algebra/auth.v
+1
-1
algebra/cmra.v
algebra/cmra.v
+2
-2
algebra/gmap.v
algebra/gmap.v
+4
-4
algebra/list.v
algebra/list.v
+4
-4
algebra/ofe.v
algebra/ofe.v
+2
-2
prelude/fin_maps.v
prelude/fin_maps.v
+1
-1
prelude/list.v
prelude/list.v
+1
-1
prelude/option.v
prelude/option.v
+6
-2
No files found.
algebra/auth.v
View file @
22fac635
...
...
@@ -275,7 +275,7 @@ Lemma auth_map_ext {A B : ofeT} (f g : A → B) x :
(
∀
x
,
f
x
≡
g
x
)
→
auth_map
f
x
≡
auth_map
g
x
.
Proof
.
constructor
;
simpl
;
auto
.
apply
option_fmap_
setoid
_ext
=>
a
;
by
apply
excl_map_ext
.
apply
option_fmap_
equiv
_ext
=>
a
;
by
apply
excl_map_ext
.
Qed
.
Instance
auth_map_ne
{
A
B
:
ofeT
}
n
:
Proper
((
dist
n
==>
dist
n
)
==>
dist
n
==>
dist
n
)
(
@
auth_map
A
B
).
...
...
algebra/cmra.v
View file @
22fac635
...
...
@@ -1250,11 +1250,11 @@ Next Obligation.
Qed
.
Next
Obligation
.
intros
F
A
B
x
.
rewrite
/=
-{
2
}
(
option_fmap_id
x
).
apply
option_fmap_
setoid
_ext
=>
y
;
apply
rFunctor_id
.
apply
option_fmap_
equiv
_ext
=>
y
;
apply
rFunctor_id
.
Qed
.
Next
Obligation
.
intros
F
A1
A2
A3
B1
B2
B3
f
g
f
'
g
'
x
.
rewrite
/=
-
option_fmap_compose
.
apply
option_fmap_
setoid
_ext
=>
y
;
apply
rFunctor_compose
.
apply
option_fmap_
equiv
_ext
=>
y
;
apply
rFunctor_compose
.
Qed
.
Instance
optionURF_contractive
F
:
...
...
algebra/gmap.v
View file @
22fac635
...
...
@@ -475,11 +475,11 @@ Next Obligation.
Qed
.
Next
Obligation
.
intros
K
??
F
A
B
x
.
rewrite
/=
-{
2
}
(
map_fmap_id
x
).
apply
map_fmap_
setoid
_ext
=>
y
??
;
apply
cFunctor_id
.
apply
map_fmap_
equiv
_ext
=>
y
??
;
apply
cFunctor_id
.
Qed
.
Next
Obligation
.
intros
K
??
F
A1
A2
A3
B1
B2
B3
f
g
f
'
g
'
x
.
rewrite
/=
-
map_fmap_compose
.
apply
map_fmap_
setoid
_ext
=>
y
??
;
apply
cFunctor_compose
.
apply
map_fmap_
equiv
_ext
=>
y
??
;
apply
cFunctor_compose
.
Qed
.
Instance
gmapCF_contractive
K
`
{
Countable
K
}
F
:
cFunctorContractive
F
→
cFunctorContractive
(
gmapCF
K
F
).
...
...
@@ -496,11 +496,11 @@ Next Obligation.
Qed
.
Next
Obligation
.
intros
K
??
F
A
B
x
.
rewrite
/=
-{
2
}
(
map_fmap_id
x
).
apply
map_fmap_
setoid
_ext
=>
y
??
;
apply
rFunctor_id
.
apply
map_fmap_
equiv
_ext
=>
y
??
;
apply
rFunctor_id
.
Qed
.
Next
Obligation
.
intros
K
??
F
A1
A2
A3
B1
B2
B3
f
g
f
'
g
'
x
.
rewrite
/=
-
map_fmap_compose
.
apply
map_fmap_
setoid
_ext
=>
y
??
;
apply
rFunctor_compose
.
apply
map_fmap_
equiv
_ext
=>
y
??
;
apply
rFunctor_compose
.
Qed
.
Instance
gmapRF_contractive
K
`
{
Countable
K
}
F
:
rFunctorContractive
F
→
urFunctorContractive
(
gmapURF
K
F
).
...
...
algebra/list.v
View file @
22fac635
...
...
@@ -108,11 +108,11 @@ Next Obligation.
Qed
.
Next
Obligation
.
intros
F
A
B
x
.
rewrite
/=
-{
2
}
(
list_fmap_id
x
).
apply
list_fmap_
setoid
_ext
=>
y
.
apply
cFunctor_id
.
apply
list_fmap_
equiv
_ext
=>
y
.
apply
cFunctor_id
.
Qed
.
Next
Obligation
.
intros
F
A1
A2
A3
B1
B2
B3
f
g
f
'
g
'
x
.
rewrite
/=
-
list_fmap_compose
.
apply
list_fmap_
setoid
_ext
=>
y
;
apply
cFunctor_compose
.
apply
list_fmap_
equiv
_ext
=>
y
;
apply
cFunctor_compose
.
Qed
.
Instance
listCF_contractive
F
:
...
...
@@ -452,11 +452,11 @@ Next Obligation.
Qed
.
Next
Obligation
.
intros
F
A
B
x
.
rewrite
/=
-{
2
}
(
list_fmap_id
x
).
apply
list_fmap_
setoid
_ext
=>
y
.
apply
urFunctor_id
.
apply
list_fmap_
equiv
_ext
=>
y
.
apply
urFunctor_id
.
Qed
.
Next
Obligation
.
intros
F
A1
A2
A3
B1
B2
B3
f
g
f
'
g
'
x
.
rewrite
/=
-
list_fmap_compose
.
apply
list_fmap_
setoid
_ext
=>
y
;
apply
urFunctor_compose
.
apply
list_fmap_
equiv
_ext
=>
y
;
apply
urFunctor_compose
.
Qed
.
Instance
listURF_contractive
F
:
...
...
algebra/ofe.v
View file @
22fac635
...
...
@@ -820,11 +820,11 @@ Next Obligation.
Qed
.
Next
Obligation
.
intros
F
A
B
x
.
rewrite
/=
-{
2
}
(
option_fmap_id
x
).
apply
option_fmap_
setoid
_ext
=>
y
;
apply
cFunctor_id
.
apply
option_fmap_
equiv
_ext
=>
y
;
apply
cFunctor_id
.
Qed
.
Next
Obligation
.
intros
F
A1
A2
A3
B1
B2
B3
f
g
f
'
g
'
x
.
rewrite
/=
-
option_fmap_compose
.
apply
option_fmap_
setoid
_ext
=>
y
;
apply
cFunctor_compose
.
apply
option_fmap_
equiv
_ext
=>
y
;
apply
cFunctor_compose
.
Qed
.
Instance
optionCF_contractive
F
:
...
...
prelude/fin_maps.v
View file @
22fac635
...
...
@@ -556,7 +556,7 @@ Proof. apply map_eq; intros i; by rewrite lookup_fmap, option_fmap_id. Qed.
Lemma
map_fmap_compose
{
A
B
C
}
(
f
:
A
→
B
)
(
g
:
B
→
C
)
(
m
:
M
A
)
:
g
∘
f
<
$
>
m
=
g
<
$
>
f
<
$
>
m
.
Proof
.
apply
map_eq
;
intros
i
;
by
rewrite
!
lookup_fmap
,
option_fmap_compose
.
Qed
.
Lemma
map_fmap_
setoid
_ext
`
{
Equiv
A
,
Equiv
B
}
(
f1
f2
:
A
→
B
)
m
:
Lemma
map_fmap_
equiv
_ext
`
{
Equiv
A
,
Equiv
B
}
(
f1
f2
:
A
→
B
)
m
:
(
∀
i
x
,
m
!!
i
=
Some
x
→
f1
x
≡
f2
x
)
→
f1
<
$
>
m
≡
f2
<
$
>
m
.
Proof
.
intros
Hi
i
;
rewrite
!
lookup_fmap
.
...
...
prelude/list.v
View file @
22fac635
...
...
@@ -2802,7 +2802,7 @@ Section fmap.
Lemma list_fmap_ext (g : A → B) (l1 l2 : list A) :
(∀ x, f x = g x) → l1 = l2 → fmap f l1 = fmap g l2.
Proof. intros ? <-. induction l1; f_equal/=; auto. Qed.
Lemma list_fmap_
setoid
_ext `{Equiv B} (g : A → B) l :
Lemma list_fmap_
equiv
_ext `{Equiv B} (g : A → B) l :
(∀ x, f x ≡ g x) → f <$> l ≡ g <$> l.
Proof. induction l; constructor; auto. Qed.
...
...
prelude/option.v
View file @
22fac635
...
...
@@ -180,7 +180,7 @@ Proof. unfold is_Some; destruct mx; naive_solver. Qed.
Lemma
fmap_Some
{
A
B
}
(
f
:
A
→
B
)
mx
y
:
f
<
$
>
mx
=
Some
y
↔
∃
x
,
mx
=
Some
x
∧
y
=
f
x
.
Proof
.
destruct
mx
;
naive_solver
.
Qed
.
Lemma
fmap_Some_
setoid
{
A
B
}
`
{
Equiv
B
}
`
{!
Equivalence
((
≡
)
:
relation
B
)
}
Lemma
fmap_Some_
equiv
{
A
B
}
`
{
Equiv
B
}
`
{!
Equivalence
((
≡
)
:
relation
B
)
}
(
f
:
A
→
B
)
mx
y
:
f
<
$
>
mx
≡
Some
y
↔
∃
x
,
mx
=
Some
x
∧
y
≡
f
x
.
Proof
.
...
...
@@ -190,6 +190,10 @@ Proof.
-
intros
?%
symmetry
%
equiv_None
.
done
.
-
intros
(
?
&
?
&
?
).
done
.
Qed
.
Lemma
fmap_Some_equiv
'
{
A
B
}
`
{
Equiv
B
}
`
{!
Equivalence
((
≡
)
:
relation
B
)
}
(
f
:
A
→
B
)
mx
y
:
f
<
$
>
mx
≡
Some
y
→
∃
x
,
mx
=
Some
x
∧
y
≡
f
x
.
Proof
.
intros
.
apply
fmap_Some_equiv
.
done
.
Qed
.
Lemma
fmap_None
{
A
B
}
(
f
:
A
→
B
)
mx
:
f
<
$
>
mx
=
None
↔
mx
=
None
.
Proof
.
by
destruct
mx
.
Qed
.
Lemma
option_fmap_id
{
A
}
(
mx
:
option
A
)
:
id
<
$
>
mx
=
mx
.
...
...
@@ -200,7 +204,7 @@ Proof. by destruct mx. Qed.
Lemma
option_fmap_ext
{
A
B
}
(
f
g
:
A
→
B
)
mx
:
(
∀
x
,
f
x
=
g
x
)
→
f
<
$
>
mx
=
g
<
$
>
mx
.
Proof
.
intros
;
destruct
mx
;
f_equal
/=
;
auto
.
Qed
.
Lemma
option_fmap_
setoid
_ext
`
{
Equiv
A
,
Equiv
B
}
(
f
g
:
A
→
B
)
mx
:
Lemma
option_fmap_
equiv
_ext
`
{
Equiv
A
,
Equiv
B
}
(
f
g
:
A
→
B
)
mx
:
(
∀
x
,
f
x
≡
g
x
)
→
f
<
$
>
mx
≡
g
<
$
>
mx
.
Proof
.
destruct
mx
;
constructor
;
auto
.
Qed
.
Lemma
option_fmap_bind
{
A
B
C
}
(
f
:
A
→
B
)
(
g
:
B
→
option
C
)
mx
:
...
...
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