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
2381ee32
Commit
2381ee32
authored
3 years ago
by
Jonas Kastberg
Committed by
Robbert Krebbers
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add lemmas `elem_of_prefix` and `elem_of_suffix`
parent
2af35753
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!354
Add lemmas `elem_of_prefix` and `elem_of_suffix`
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
theories/list.v
+6
-0
6 additions, 0 deletions
theories/list.v
with
6 additions
and
0 deletions
theories/list.v
+
6
−
0
View file @
2381ee32
...
...
@@ -2053,6 +2053,12 @@ Lemma prefix_length l1 l2 : l1 `prefix_of` l2 → length l1 ≤ length l2.
Proof
.
intros
[?
->
]
.
rewrite
app_length
.
lia
.
Qed
.
Lemma
prefix_snoc_not
l
x
:
¬
l
++
[
x
]
`
prefix_of
`
l
.
Proof
.
intros
[??]
.
discriminate_list
.
Qed
.
Lemma
elem_of_prefix
l1
l2
x
:
x
∈
l1
→
l1
`
prefix_of
`
l2
→
x
∈
l2
.
Proof
.
intros
Hin
[
l'
->
]
.
apply
elem_of_app
.
by
left
.
Qed
.
Lemma
elem_of_suffix
l1
l2
x
:
x
∈
l1
→
l1
`
suffix_of
`
l2
→
x
∈
l2
.
Proof
.
intros
Hin
[
l'
->
]
.
apply
elem_of_app
.
by
right
.
Qed
.
(* [prefix] is not a total order, but [l1] and [l2] are always comparable if
they are both prefixes of some [l3]. *)
Lemma
prefix_weak_total
l1
l2
l3
:
...
...
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