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
1b4ded4d
Commit
1b4ded4d
authored
8 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Prove fixpointK stuff without unfolding the definition of fixpoint.
Also, give names to hypotheses that we refer to.
parent
49fa33d4
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
theories/algebra/ofe.v
+15
-14
15 additions, 14 deletions
theories/algebra/ofe.v
with
15 additions
and
14 deletions
theories/algebra/ofe.v
+
15
−
14
View file @
1b4ded4d
...
...
@@ -267,34 +267,35 @@ Definition fixpointK `{Cofe A, Inhabited A} k (f : A → A)
Section
fixpointK
.
Local
Set
Default
Proof
Using
"Type*"
.
Context
`{
Cofe
A
,
Inhabited
A
}
(
f
:
A
→
A
)
k
`{
!
Contractive
(
Nat
.
iter
k
f
)}
.
Context
`{
Cofe
A
,
Inhabited
A
}
(
f
:
A
→
A
)
(
k
:
nat
)
.
Context
`{
f_contractive
:
!
Contractive
(
Nat
.
iter
k
f
)}
.
(* TODO: Can we get rid of this assumption, derive it from contractivity? *)
Context
`{
!∀
n
,
Proper
(
dist
n
==>
dist
n
)
f
}
.
Context
`{
f_ne
:
!∀
n
,
Proper
(
dist
n
==>
dist
n
)
f
}
.
Let
f_proper
:
Proper
((
≡
)
==>
(
≡
))
f
:=
ne_proper
f
.
Existing
Instance
f_proper
.
Lemma
fixpointK_unfold
:
fixpointK
k
f
≡
f
(
fixpointK
k
f
)
.
Proof
.
apply
equiv_dist
=>
n
.
rewrite
/
fixpointK
fixpoint_eq
/
fixpoint_def
(
conv_compl
n
(
fixpoint_chain
_))
//.
induction
n
as
[|
n
IH
];
simpl
.
-
rewrite
-
Nat_iter_S
Nat_iter_S_r
.
eapply
contractive_0
;
first
done
.
-
rewrite
-
[
f
_]
Nat_iter_S
Nat_iter_S_r
.
eapply
contractive_S
;
first
done
.
eauto
.
symmetry
.
rewrite
/
fixpointK
.
apply
fixpoint_unique
.
by
rewrite
-
Nat_iter_S_r
Nat_iter_S
-
fixpoint_unfold
.
Qed
.
Lemma
fixpointK_unique
(
x
:
A
)
:
x
≡
f
x
→
x
≡
fixpointK
k
f
.
Proof
.
intros
Hf
.
apply
fixpoint_unique
,
equiv_dist
=>
n
.
(* Forward reasoning is so annoying... *)
assert
(
x
≡
{
n
}
≡
f
x
)
by
by
apply
equiv_dist
.
clear
Contractive0
.
induction
k
;
first
done
.
by
rewrite
{
1
}
Hf
{
1
}
IHn0
.
intros
Hf
.
apply
fixpoint_unique
.
clear
f_contractive
.
induction
k
as
[|
k'
IH
]=>
//=.
by
rewrite
-
IH
.
Qed
.
Section
fixpointK_ne
.
Context
(
g
:
A
→
A
)
`{
!
Contractive
(
Nat
.
iter
k
g
),
!∀
n
,
Proper
(
dist
n
==>
dist
n
)
g
}
.
Context
(
g
:
A
→
A
)
`{
g_contractive
:
!
Contractive
(
Nat
.
iter
k
g
)}
.
Context
{
g_ne
:
∀
n
,
Proper
(
dist
n
==>
dist
n
)
g
}
.
Lemma
fixpointK_ne
n
:
(
∀
z
,
f
z
≡
{
n
}
≡
g
z
)
→
fixpointK
k
f
≡
{
n
}
≡
fixpointK
k
g
.
Proof
.
rewrite
/
fixpointK
=>
Hne
/=.
apply
fixpoint_ne
=>?
/=.
clear
Contractive0
Contractive1
.
induction
k
;
first
by
auto
.
simpl
.
rewrite
IHn0
.
apply
Hne
.
rewrite
/
fixpointK
=>
Hfg
/=.
apply
fixpoint_ne
=>
z
.
clear
f_contractive
g_contractive
.
induction
k
as
[|
k'
IH
]=>
//=.
by
rewrite
IH
Hfg
.
Qed
.
Lemma
fixpointK_proper
:
(
∀
z
,
f
z
≡
g
z
)
→
fixpointK
k
f
≡
fixpointK
k
g
.
...
...
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