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
Gaëtan Gilbert
Iris
Commits
a1fcf5b3
"README.md" did not exist on "536b118c8c9ea435dc05ab6d383ceb61d9e475c4"
Commit
a1fcf5b3
authored
7 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Add a data type for possibly anonymous proof mode hypotheses.
parent
3dccde8a
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/proofmode/base.v
+34
-0
34 additions, 0 deletions
theories/proofmode/base.v
with
34 additions
and
0 deletions
theories/proofmode/base.v
+
34
−
0
View file @
a1fcf5b3
...
...
@@ -49,3 +49,37 @@ Qed.
Lemma
string_beq_reflect
s1
s2
:
reflect
(
s1
=
s2
)
(
string_beq
s1
s2
)
.
Proof
.
apply
iff_reflect
.
by
rewrite
string_beq_true
.
Qed
.
Module
Export
ident
.
Inductive
ident
:=
|
IAnon
:
positive
→
ident
|
INamed
:>
string
→
ident
.
End
ident
.
Instance
maybe_IAnon
:
Maybe
IAnon
:=
λ
i
,
match
i
with
IAnon
n
=>
Some
n
|
_
=>
None
end
.
Instance
maybe_INamed
:
Maybe
INamed
:=
λ
i
,
match
i
with
INamed
s
=>
Some
s
|
_
=>
None
end
.
Instance
beq_eq_dec
:
EqDecision
ident
.
Proof
.
solve_decision
.
Defined
.
Definition
positive_beq
:=
Eval
compute
in
Pos
.
eqb
.
Lemma
positive_beq_true
x
y
:
positive_beq
x
y
=
true
↔
x
=
y
.
Proof
.
apply
Pos
.
eqb_eq
.
Qed
.
Definition
ident_beq
(
i1
i2
:
ident
)
:
bool
:=
match
i1
,
i2
with
|
IAnon
n1
,
IAnon
n2
=>
positive_beq
n1
n2
|
INamed
s1
,
INamed
s2
=>
string_beq
s1
s2
|
_,
_
=>
false
end
.
Lemma
ident_beq_true
i1
i2
:
ident_beq
i1
i2
=
true
↔
i1
=
i2
.
Proof
.
destruct
i1
,
i2
;
rewrite
/=
?string_beq_true
?positive_beq_true
;
naive_solver
.
Qed
.
Lemma
ident_beq_reflect
i1
i2
:
reflect
(
i1
=
i2
)
(
ident_beq
i1
i2
)
.
Proof
.
apply
iff_reflect
.
by
rewrite
ident_beq_true
.
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