Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iris-coq
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
Operate
Environments
Monitor
Incidents
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
Amin Timany
iris-coq
Commits
37e76876
Commit
37e76876
authored
9 years ago
by
David Swasey
Browse files
Options
Downloads
Patches
Plain Diff
FPU for indexed product.
parent
08198ce4
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
lib/ModuRes/RAConstr.v
+37
-1
37 additions, 1 deletion
lib/ModuRes/RAConstr.v
with
37 additions
and
1 deletion
lib/ModuRes/RAConstr.v
+
37
−
1
View file @
37e76876
Require
Import
Ssreflect
.
ssreflect
Omega
.
Require
Import
CSetoid
Predom
RA
DecEnsemble
ModuRes
.
Relations
.
Require
Import
Coq
.
Logic
.
Eqdep_dec
.
Local
Open
Scope
ra_scope
.
Local
Open
Scope
predom_scope
.
...
...
@@ -746,7 +747,7 @@ End STS.
Section
IndexedProduct
.
(* I is the index type (domain), S the type of the components (codomain) *)
Context
{
I
:
Type
}
{
S
:
forall
(
i
:
I
),
Type
}
Context
{
I
:
Type
}
{
eq_dec
:
DecEq
I
}
{
S
:
forall
(
i
:
I
),
Type
}
{
tyS
:
forall
i
,
Setoid
(
S
i
)}
{
uS
:
forall
i
,
RA_unit
(
S
i
)}
{
opS
:
forall
i
,
RA_op
(
S
i
)}
...
...
@@ -781,6 +782,41 @@ Section IndexedProduct.
-
compute
;
intros
;
split
;
intros
;
by
move
/
(_
i
):
H0
;
rewrite
(
H
i
)
.
-
eapply
(
ra_op_valid
(
RA
:=
raS
i
));
now
eauto
.
Qed
.
Definition
ra_infprod_upd
(
f
:
ra_res_infprod
)
(
i
:
I
)
(
si
:
S
i
)
:
ra_res_infprod
:=
fun
i'
=>
if
eq_dec
i
i'
is
left
Heq
then
eq_rect
_
_
si
_
Heq
else
f
i'
.
Lemma
ra_infprod_upd_eq
f
i
si
:
ra_infprod_upd
f
i
si
i
=
si
.
Proof
.
rewrite
/
ra_infprod_upd
.
case
:
(
eq_dec
i
i
);
last
done
.
move
=>
Heq
.
symmetry
.
apply
:
eq_rect_eq_dec
.
exact
:
eq_dec
.
Qed
.
Lemma
ra_infprod_upd_neq
{
i
i'
}
(
Hneq
:
i
<>
i'
)
f
si
:
ra_infprod_upd
f
i
si
i'
=
f
i'
.
Proof
.
rewrite
/
ra_infprod_upd
.
by
case
:
(
eq_dec
i
i'
)
.
Qed
.
Lemma
ra_infprod_upd_valid
{
f
i
si
g
}
(
Hv
:
↓
f
·
g
)
(
Hvi
:
↓
si
·
g
i
)
:
↓
ra_infprod_upd
f
i
si
·
g
.
Proof
.
move
=>
i'
;
rewrite
/
ra_op
/
ra_op_infprod
;
case
:
(
eq_dec
i
i'
)
=>
[
Heq
|
Hneq
]
.
-
rewrite
-
Heq
ra_infprod_upd_eq
.
exact
:
Hvi
.
-
rewrite
(
ra_infprod_upd_neq
Hneq
)
.
exact
:
Hv
.
Qed
.
Lemma
ra_fpu_infprod
{
f
i
P
}
(
Hi
:
f
i
⇝∈
P
)
:
f
⇝∈
(
fun
f'
=>
exists
si
,
P
si
/\
f'
=
ra_infprod_upd
f
i
si
)
.
Proof
.
move
=>
g
Hv
;
move
/
(_
(
g
i
)
(
Hv
i
)):
Hi
=>
[
si
[
Pi
Hvi
]]
.
exists
(
ra_infprod_upd
f
i
si
)
.
split
;
first
by
exists
si
.
exact
:
ra_infprod_upd_valid
.
Qed
.
Lemma
ra_fps_infprod
{
f
i
si
}
(
Hi
:
f
i
⇝
si
)
:
f
⇝
ra_infprod_upd
f
i
si
.
Proof
.
move
=>
g
Hv
i'
;
move
/
(_
i'
):
Hv
.
rewrite
/
ra_op
/
ra_op_infprod
/=.
case
:
(
eq_dec
i
i'
)
=>
[
Heq
|
Hneq
]
.
-
rewrite
-
Heq
ra_infprod_upd_eq
.
exact
:
Hi
.
-
by
rewrite
(
ra_infprod_upd_neq
Hneq
)
.
Qed
.
End
IndexedProduct
.
Arguments
ra_res_infprod
:
default
implicits
.
...
...
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