Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
stdpp
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
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
Iris
stdpp
Commits
df472e0d
Commit
df472e0d
authored
8 months ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Replace some uses of `map_fold_weak_ind` with `map_fold_ind`.
parent
37a77700
No related branches found
No related tags found
1 merge request
!566
Stronger induction principle for `map_fold`.
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/fin_maps.v
+10
-13
10 additions, 13 deletions
tests/fin_maps.v
with
10 additions
and
13 deletions
tests/fin_maps.v
+
10
−
13
View file @
df472e0d
...
@@ -378,12 +378,11 @@ Proof.
...
@@ -378,12 +378,11 @@ Proof.
intros
Hnode
t
.
intros
Hnode
t
.
remember
(
gtest_size
t
)
as
n
eqn
:
Hn
.
revert
t
Hn
.
remember
(
gtest_size
t
)
as
n
eqn
:
Hn
.
revert
t
Hn
.
induction
(
lt_wf
n
)
as
[
n
_
IH
];
intros
[
ts
]
->
;
simpl
in
*.
induction
(
lt_wf
n
)
as
[
n
_
IH
];
intros
[
ts
]
->
;
simpl
in
*.
apply
Hnode
.
revert
ts
IH
.
apply
Hnode
.
induction
ts
as
[|
k
t
m
?
Hfold
IHm
]
using
map_fold_ind
.
apply
(
map_fold_weak_ind
(
λ
r
ts
,
(
∀
n'
,
n'
<
S
r
→
_)
→
map_Forall
(
λ
_,
P
)
ts
))
.
-
apply
map_Forall_empty
.
-
intros
IH
.
apply
map_Forall_empty
.
-
apply
map_Forall_insert
;
[
done
|]
.
split
.
-
intros
k
t
m
r
?
IHm
IHt
.
apply
map_Forall_insert
;
[
done
|]
.
split
.
+
eapply
IH
;
[|
done
]
.
rewrite
Hfold
.
lia
.
+
eapply
IHt
;
[|
done
];
lia
.
+
eapply
IHm
.
intros
;
eapply
IH
;
[|
done
]
.
rewrite
Hfold
.
lia
.
+
eapply
IHm
.
intros
;
eapply
IHt
;[|
done
];
lia
.
Qed
.
Qed
.
(** We show that [gtest K] is countable itself. This means that we can use
(** We show that [gtest K] is countable itself. This means that we can use
...
@@ -415,13 +414,11 @@ Global Program Instance gtest_countable `{Countable K} : Countable (gtest K) :=
...
@@ -415,13 +414,11 @@ Global Program Instance gtest_countable `{Countable K} : Countable (gtest K) :=
inj_countable'
enc
dec
_
.
inj_countable'
enc
dec
_
.
Next
Obligation
.
Next
Obligation
.
intros
K
??
enc
dec_list
dec
t
.
intros
K
??
enc
dec_list
dec
t
.
induction
(
Nat
.
lt_wf_0_projected
gtest_size
t
)
as
[[
ts
]
_
IH
]
.
induction
(
Nat
.
lt_wf_0_projected
gtest_size
t
)
as
[[
ts
]
_
IH
]
.
f_equal
/=.
simpl
in
*
;
f_equal
.
induction
ts
as
[|
i
t
ts
?
Hfold
IHts
]
using
map_fold_ind
;
[
done
|]
.
revert
ts
IH
.
rewrite
Hfold
.
f_equal
/=.
apply
(
map_fold_weak_ind
(
λ
r
ts
,
_
→
dec_list
dec
r
=
ts
));
[
done
|]
.
-
eapply
IH
.
rewrite
map_fold_insert_L
by
auto
with
lia
.
lia
.
intros
i
t
ts
r
?
IHts
IHt
;
simpl
.
f_equal
.
-
apply
IHts
;
intros
t'
?
.
eapply
IH
.
-
eapply
IHt
.
rewrite
map_fold_insert_L
by
auto
with
lia
.
lia
.
-
apply
IHts
;
intros
t'
?
.
eapply
IHt
.
rewrite
map_fold_insert_L
by
auto
with
lia
.
lia
.
rewrite
map_fold_insert_L
by
auto
with
lia
.
lia
.
Qed
.
Qed
.
...
...
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