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
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
Glen Mével
stdpp
Commits
2e1b8a41
Commit
2e1b8a41
authored
10 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Misc lemmas on option.
parent
fe9771cc
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/option.v
+4
-0
4 additions, 0 deletions
theories/option.v
with
4 additions
and
0 deletions
theories/option.v
+
4
−
0
View file @
2e1b8a41
...
...
@@ -32,6 +32,10 @@ Definition from_option {A} (a : A) (x : option A) : A :=
data type. This theorem is useful to prove that two options are the same. *)
Lemma
option_eq
{
A
}
(
x
y
:
option
A
)
:
x
=
y
↔
∀
a
,
x
=
Some
a
↔
y
=
Some
a
.
Proof
.
split
;
[
by
intros
;
by
subst
|]
.
destruct
x
,
y
;
naive_solver
.
Qed
.
Lemma
option_eq_1
{
A
}
(
x
y
:
option
A
)
a
:
x
=
y
→
x
=
Some
a
→
y
=
Some
a
.
Proof
.
congruence
.
Qed
.
Lemma
option_eq_1_alt
{
A
}
(
x
y
:
option
A
)
a
:
x
=
y
→
y
=
Some
a
→
x
=
Some
a
.
Proof
.
congruence
.
Qed
.
Definition
is_Some
{
A
}
(
x
:
option
A
)
:=
∃
y
,
x
=
Some
y
.
Lemma
mk_is_Some
{
A
}
(
x
:
option
A
)
y
:
x
=
Some
y
→
is_Some
x
.
...
...
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