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
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
Adam
stdpp
Commits
905203e1
Verified
Commit
905203e1
authored
3 years ago
by
Paolo G. Giarrusso
Browse files
Options
Downloads
Patches
Plain Diff
countable.v: prove choose_proper
Noticed while working towards "Pragmatic quotients".
parent
2df65b35
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/countable.v
+20
-0
20 additions, 0 deletions
theories/countable.v
with
20 additions
and
0 deletions
theories/countable.v
+
20
−
0
View file @
905203e1
From
Coq
.
QArith
Require
Import
QArith_base
Qcanon
.
From
stdpp
Require
Export
list
numbers
list_numbers
fin
.
From
stdpp
Require
Import
well_founded
.
From
stdpp
Require
Import
options
.
Local
Open
Scope
positive
.
...
...
@@ -89,6 +90,25 @@ Section choice.
Definition
choice
(
HA
:
∃
x
,
P
x
)
:
{
x
|
P
x
}
:=
_
↾
choose_correct
HA
.
End
choice
.
Section
choice_proper
.
Context
`{
Countable
A
}
.
Context
(
P1
P2
:
A
→
Prop
)
`{
∀
x
,
Decision
(
P1
x
)}
`{
∀
x
,
Decision
(
P2
x
)}
.
Context
(
Heq
:
∀
x
,
P1
x
↔
P2
x
)
.
Lemma
choose_go_proper
{
i
}
(
acc1
acc2
:
Acc
(
choose_step
_)
i
)
:
choose_go
P1
acc1
=
choose_go
P2
acc2
.
Proof
using
Heq
.
induction
acc1
as
[
i
a1
IH
]
using
Acc_dep_ind
;
destruct
acc2
as
[
acc2
];
simpl
.
destruct
(
Some_dec
_)
as
[[
x
Hx
]|];
[|
done
]
.
do
2
case_decide
;
done
||
exfalso
;
naive_solver
.
Qed
.
Lemma
choose_proper
p1
p2
:
choose
P1
p1
=
choose
P2
p2
.
Proof
using
Heq
.
apply
choose_go_proper
.
Qed
.
End
choice_proper
.
Lemma
surj_cancel
`{
Countable
A
}
`{
EqDecision
B
}
(
f
:
A
→
B
)
`{
!
Surj
(
=
)
f
}
:
{
g
:
B
→
A
&
Cancel
(
=
)
f
g
}
.
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