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
6aac4455
Commit
6aac4455
authored
11 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Prove decidability of quantification over finite types.
parent
be8dfddb
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/finite.v
+21
-0
21 additions, 0 deletions
theories/finite.v
with
21 additions
and
0 deletions
theories/finite.v
+
21
−
0
View file @
6aac4455
...
...
@@ -129,6 +129,27 @@ Lemma bijective_card `{Finite A} `{Finite B} (f : A → B)
`{
!
Injective
(
=
)
(
=
)
f
}
`{
!
Surjective
(
=
)
f
}
:
card
A
=
card
B
.
Proof
.
apply
finite_bijective
.
eauto
.
Qed
.
(** Decidability of quantification over finite types *)
Section
forall_exists
.
Context
`{
Finite
A
}
(
P
:
A
→
Prop
)
`{
∀
x
,
Decision
(
P
x
)}
.
Lemma
Forall_finite
:
Forall
P
(
enum
A
)
↔
(
∀
x
,
P
x
)
.
Proof
.
rewrite
Forall_forall
.
intuition
auto
using
elem_of_enum
.
Qed
.
Lemma
Exists_finite
:
Exists
P
(
enum
A
)
↔
(
∃
x
,
P
x
)
.
Proof
.
rewrite
Exists_exists
.
naive_solver
eauto
using
elem_of_enum
.
Qed
.
Global
Instance
forall_dec
:
Decision
(
∀
x
,
P
x
)
.
Proof
.
refine
(
cast_if
(
decide
(
Forall
P
(
enum
A
))));
abstract
by
rewrite
<-
Forall_finite
.
Defined
.
Global
Instance
exists_dec
:
Decision
(
∃
x
,
P
x
)
.
Proof
.
refine
(
cast_if
(
decide
(
Exists
P
(
enum
A
))));
abstract
by
rewrite
<-
Exists_finite
.
Defined
.
End
forall_exists
.
(** Instances *)
Section
enc_finite
.
Context
`{
∀
x
y
:
A
,
Decision
(
x
=
y
)}
.
...
...
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