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
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
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
Jan
stdpp
Commits
383118f5
Commit
383118f5
authored
3 years ago
by
Jan
Browse files
Options
Downloads
Patches
Plain Diff
added sum_list_with_in
parent
f65bf936
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
theories/list_numbers.v
+8
-0
8 additions, 0 deletions
theories/list_numbers.v
with
8 additions
and
0 deletions
theories/list_numbers.v
+
8
−
0
View file @
383118f5
...
@@ -200,6 +200,14 @@ Section sum_list.
...
@@ -200,6 +200,14 @@ Section sum_list.
Proof
.
Proof
.
induction
l
;
simpl
;
rewrite
?reverse_cons
,
?sum_list_with_app
;
simpl
;
lia
.
induction
l
;
simpl
;
rewrite
?reverse_cons
,
?sum_list_with_app
;
simpl
;
lia
.
Qed
.
Qed
.
Lemma
sum_list_with_in
x
(
f
:
A
->
nat
)
l
:
x
∈
l
->
f
x
≤
sum_list_with
f
l
.
Proof
.
intros
.
induction
l
.
-
contradict
H
.
apply
not_elem_of_nil
.
-
cbn
.
rewrite
elem_of_cons
in
H
.
destruct
H
as
[
H
|
H
]
.
+
simplify_eq
.
lia
.
+
specialize
(
IHl
H
)
.
lia
.
Qed
.
Lemma
join_reshape
szs
l
:
Lemma
join_reshape
szs
l
:
sum_list
szs
=
length
l
→
mjoin
(
reshape
szs
l
)
=
l
.
sum_list
szs
=
length
l
→
mjoin
(
reshape
szs
l
)
=
l
.
Proof
.
Proof
.
...
...
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