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
a6cfc283
Commit
a6cfc283
authored
4 years ago
by
Ralf Jung
Browse files
Options
Downloads
Plain Diff
Merge branch 'ralf/Qc_of_Z' into 'master'
make Qc_of_Z not a Coercion any more Closes
#102
See merge request
!258
parents
54252fbc
d1d19677
No related branches found
No related tags found
1 merge request
!258
make Qc_of_Z not a Coercion any more
Pipeline
#45875
failed
4 years ago
Stage: build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.md
+1
-0
1 addition, 0 deletions
CHANGELOG.md
theories/numbers.v
+5
-4
5 additions, 4 deletions
theories/numbers.v
with
6 additions
and
4 deletions
CHANGELOG.md
+
1
−
0
View file @
a6cfc283
...
...
@@ -17,6 +17,7 @@ API-breaking change is listed.
(previously, its definition was wrong, since it used
`∪`
instead of
`⊎`
).
+
Add lemmas for
`∈`
and
`∉`
specific for multisets, since the set lemmas no
longer work for multisets.
-
Make
`Qc_of_Z'`
not an implicit coercion (from
`Z`
to
`Qc`
) any more.
## std++ 1.5.0
...
...
This diff is collapsed.
Click to expand it.
theories/numbers.v
+
5
−
4
View file @
a6cfc283
...
...
@@ -560,6 +560,10 @@ Notation "(<)" := Qclt (only parsing) : Qc_scope.
Global
Hint
Extern
1
(_
≤
_)
=>
reflexivity
||
discriminate
:
core
.
Global
Arguments
Qred
:
simpl
never
.
Lemma
inject_Z_Qred
n
:
Qred
(
inject_Z
n
)
=
inject_Z
n
.
Proof
.
apply
Qred_identity
;
auto
using
Z
.
gcd_1_r
.
Qed
.
Definition
Qc_of_Z
(
n
:
Z
)
:
Qc
:=
Qcmake
_
(
inject_Z_Qred
n
)
.
Global
Instance
Qc_eq_dec
:
EqDecision
Qc
:=
Qc_eq_dec
.
Program
Instance
Qc_le_dec
:
RelDecision
Qcle
:=
λ
x
y
,
if
Qclt_le_dec
y
x
then
right
_
else
left
_
.
...
...
@@ -681,9 +685,6 @@ Proof.
by
rewrite
(
Qcmult_lt_mono_pos_r
_
_
x
),
Qcmult_0_l
,
Qcmult_inv_l
by
done
.
Qed
.
Lemma
inject_Z_Qred
n
:
Qred
(
inject_Z
n
)
=
inject_Z
n
.
Proof
.
apply
Qred_identity
;
auto
using
Z
.
gcd_1_r
.
Qed
.
Coercion
Qc_of_Z
(
n
:
Z
)
:
Qc
:=
Qcmake
_
(
inject_Z_Qred
n
)
.
Lemma
Z2Qc_inj_0
:
Qc_of_Z
0
=
0
.
Proof
.
by
apply
Qc_is_canon
.
Qed
.
Lemma
Z2Qc_inj_1
:
Qc_of_Z
1
=
1
.
...
...
@@ -764,7 +765,7 @@ Infix "*" := Qp_mul : Qp_scope.
Notation
"/ q"
:=
(
Qp_inv
q
)
:
Qp_scope
.
Infix
"/"
:=
Qp_div
:
Qp_scope
.
Program
Definition
pos_to_Qp
(
n
:
positive
)
:
Qp
:=
mk_Qp
(
Z
.
pos
n
)
_
.
Program
Definition
pos_to_Qp
(
n
:
positive
)
:
Qp
:=
mk_Qp
(
Qc_of_Z
$
Z
.
pos
n
)
_
.
Next
Obligation
.
intros
n
.
by
rewrite
<-
Z2Qc_inj_0
,
<-
Z2Qc_inj_lt
.
Qed
.
Global
Arguments
pos_to_Qp
:
simpl
never
.
...
...
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