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
7ae77142
Commit
7ae77142
authored
4 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Plain Diff
Merge branch 'qp-lemmas' into 'master'
Add Qp lemmas See merge request
iris/stdpp!187
parents
f806b9b0
028eb93c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.md
+9
-0
9 additions, 0 deletions
CHANGELOG.md
theories/numbers.v
+14
-11
14 additions, 11 deletions
theories/numbers.v
with
23 additions
and
11 deletions
CHANGELOG.md
+
9
−
0
View file @
7ae77142
...
@@ -7,6 +7,15 @@ API-breaking change is listed.
...
@@ -7,6 +7,15 @@ API-breaking change is listed.
and
`dom_map_filter_subseteq`
→
`dom_filter_subseteq`
for consistency's sake.
and
`dom_map_filter_subseteq`
→
`dom_filter_subseteq`
for consistency's sake.
-
Add
`max`
and
`min`
operations for
`Qp`
.
-
Add
`max`
and
`min`
operations for
`Qp`
.
-
Add additional lemmas for
`Qp`
.
-
Add additional lemmas for
`Qp`
.
-
Remove the lemma
`Qp_not_plus_q_ge_1`
in favor of
`Qp_not_plus_ge`
.
The following
`sed`
script should perform most of the renaming
(on macOS, replace
`sed`
by
`gsed`
, installed via e.g.
`brew install gnu-sed`
):
```
sed -i '
s/\bQp_not_plus_q_ge_1\b/Qp_not_plus_ge/g
' $(find theories -name "*.v")
```
## std++ 1.4.0 (released 2020-07-15)
## std++ 1.4.0 (released 2020-07-15)
...
...
This diff is collapsed.
Click to expand it.
theories/numbers.v
+
14
−
11
View file @
7ae77142
...
@@ -831,11 +831,11 @@ Proof.
...
@@ -831,11 +831,11 @@ Proof.
+
by
rewrite
Qp_div_2
.
+
by
rewrite
Qp_div_2
.
Qed
.
Qed
.
Lemma
Qp_not_plus_
q_ge_1
(
q
:
Qp
):
¬
(
(
1
+
q
)
%
Qp
≤
1
%
Qp
)
%
Qc
.
Lemma
Qp_not_plus_
ge
(
q
p
:
Qp
)
:
¬
(
q
+
p
)
%
Qp
≤
q
.
Proof
.
Proof
.
intros
Hle
.
rewrite
<-
(
Qcplus_0_r
q
)
.
apply
(
Qcplus_le_mono_l
q
0
1
)
in
Hle
.
intros
Hle
%
(
Qcplus_le_mono_l
p
0
q
)
%
Qcle_ngt
.
apply
Qcle_ngt
in
Hle
.
apply
Hle
,
Qp_prf
.
apply
Hle
,
Qp_prf
.
Qed
.
Qed
.
Lemma
Qp_ge_0
(
q
:
Qp
):
(
0
≤
q
)
%
Qc
.
Lemma
Qp_ge_0
(
q
:
Qp
):
(
0
≤
q
)
%
Qc
.
...
@@ -856,6 +856,9 @@ Proof.
...
@@ -856,6 +856,9 @@ Proof.
|
by
apply
Qcplus_le_mono_r
]
.
|
by
apply
Qcplus_le_mono_r
]
.
Qed
.
Qed
.
Lemma
Qp_plus_id_free
q
p
:
q
+
p
=
q
→
False
.
Proof
.
intro
Heq
.
apply
(
Qp_not_plus_ge
q
p
)
.
by
rewrite
Heq
.
Qed
.
Lemma
Qp_plus_weak_r
(
q
p
o
:
Qp
)
:
q
+
p
≤
o
→
q
≤
o
.
Lemma
Qp_plus_weak_r
(
q
p
o
:
Qp
)
:
q
+
p
≤
o
→
q
≤
o
.
Proof
.
intros
Le
.
eapply
Qcle_trans
;
[
apply
Qp_le_plus_l
|
apply
Le
]
.
Qed
.
Proof
.
intros
Le
.
eapply
Qcle_trans
;
[
apply
Qp_le_plus_l
|
apply
Le
]
.
Qed
.
...
@@ -878,14 +881,14 @@ Qed.
...
@@ -878,14 +881,14 @@ Qed.
Lemma
Qp_max_spec_le
(
q
p
:
Qp
)
:
(
q
≤
p
∧
q
`
max
`
p
=
p
)
∨
(
p
≤
q
∧
q
`
max
`
p
=
q
)
.
Lemma
Qp_max_spec_le
(
q
p
:
Qp
)
:
(
q
≤
p
∧
q
`
max
`
p
=
p
)
∨
(
p
≤
q
∧
q
`
max
`
p
=
q
)
.
Proof
.
destruct
(
Qp_max_spec
q
p
)
as
[[?
%
Qclt_le_weak
?]|];
[
left
|
right
];
done
.
Qed
.
Proof
.
destruct
(
Qp_max_spec
q
p
)
as
[[?
%
Qclt_le_weak
?]|];
[
left
|
right
];
done
.
Qed
.
Instance
Q
c
_max_assoc
:
Assoc
(
=
)
Qp_max
.
Instance
Q
p
_max_assoc
:
Assoc
(
=
)
Qp_max
.
Proof
.
Proof
.
intros
q
p
o
.
unfold
Qp_max
.
destruct
(
decide
(
q
≤
p
)),
(
decide
(
p
≤
o
));
intros
q
p
o
.
unfold
Qp_max
.
destruct
(
decide
(
q
≤
p
)),
(
decide
(
p
≤
o
));
eauto
using
decide_True
,
Qcle_trans
.
eauto
using
decide_True
,
Qcle_trans
.
rewrite
decide_False
by
done
.
rewrite
decide_False
by
done
.
by
rewrite
decide_False
by
(
eapply
Qclt_not_le
,
Qclt_trans
;
by
apply
Qclt_nge
)
.
by
rewrite
decide_False
by
(
eapply
Qclt_not_le
,
Qclt_trans
;
by
apply
Qclt_nge
)
.
Qed
.
Qed
.
Instance
Q
c
_max_comm
:
Comm
(
=
)
Qp_max
.
Instance
Q
p
_max_comm
:
Comm
(
=
)
Qp_max
.
Proof
.
Proof
.
intros
q
p
.
apply
Qp_eq
.
intros
q
p
.
apply
Qp_eq
.
destruct
(
Qp_max_spec_le
q
p
)
as
[[?
->
]|[?
->
]],
(
Qp_max_spec_le
p
q
)
as
[[?
->
]|[?
->
]];
destruct
(
Qp_max_spec_le
q
p
)
as
[[?
->
]|[?
->
]],
(
Qp_max_spec_le
p
q
)
as
[[?
->
]|[?
->
]];
...
@@ -895,11 +898,11 @@ Qed.
...
@@ -895,11 +898,11 @@ Qed.
Lemma
Qp_max_id
q
:
q
`
max
`
q
=
q
.
Lemma
Qp_max_id
q
:
q
`
max
`
q
=
q
.
Proof
.
by
destruct
(
Qp_max_spec
q
q
)
as
[[_
->
]|[_
->
]]
.
Qed
.
Proof
.
by
destruct
(
Qp_max_spec
q
q
)
as
[[_
->
]|[_
->
]]
.
Qed
.
Lemma
Q
c
_le_max_l
(
q
p
:
Qp
)
:
q
≤
q
`
max
`
p
.
Lemma
Q
p
_le_max_l
(
q
p
:
Qp
)
:
q
≤
q
`
max
`
p
.
Proof
.
unfold
Qp_max
.
by
destruct
(
decide
(
q
≤
p
))
.
Qed
.
Proof
.
unfold
Qp_max
.
by
destruct
(
decide
(
q
≤
p
))
.
Qed
.
Lemma
Q
c
_le_max_r
(
q
p
:
Qp
)
:
p
≤
q
`
max
`
p
.
Lemma
Q
p
_le_max_r
(
q
p
:
Qp
)
:
p
≤
q
`
max
`
p
.
Proof
.
rewrite
(
comm
_
q
)
.
apply
Q
c
_le_max_l
.
Qed
.
Proof
.
rewrite
(
comm
_
q
)
.
apply
Q
p
_le_max_l
.
Qed
.
Lemma
Qp_max_plus
(
q
p
:
Qp
)
:
q
`
max
`
p
≤
q
+
p
.
Lemma
Qp_max_plus
(
q
p
:
Qp
)
:
q
`
max
`
p
≤
q
+
p
.
Proof
.
Proof
.
...
@@ -926,14 +929,14 @@ Qed.
...
@@ -926,14 +929,14 @@ Qed.
Lemma
Qp_min_spec_le
(
q
p
:
Qp
)
:
(
q
≤
p
∧
q
`
min
`
p
=
q
)
∨
(
p
≤
q
∧
q
`
min
`
p
=
p
)
.
Lemma
Qp_min_spec_le
(
q
p
:
Qp
)
:
(
q
≤
p
∧
q
`
min
`
p
=
q
)
∨
(
p
≤
q
∧
q
`
min
`
p
=
p
)
.
Proof
.
destruct
(
Qp_min_spec
q
p
)
as
[[?
%
Qclt_le_weak
?]|];
[
left
|
right
];
done
.
Qed
.
Proof
.
destruct
(
Qp_min_spec
q
p
)
as
[[?
%
Qclt_le_weak
?]|];
[
left
|
right
];
done
.
Qed
.
Instance
Q
c
_min_assoc
:
Assoc
(
=
)
Qp_min
.
Instance
Q
p
_min_assoc
:
Assoc
(
=
)
Qp_min
.
Proof
.
Proof
.
intros
q
p
o
.
unfold
Qp_min
.
intros
q
p
o
.
unfold
Qp_min
.
destruct
(
decide
(
q
≤
p
)),
(
decide
(
p
≤
o
));
eauto
using
decide_False
.
destruct
(
decide
(
q
≤
p
)),
(
decide
(
p
≤
o
));
eauto
using
decide_False
.
-
rewrite
decide_True
by
done
.
by
rewrite
decide_True
by
(
eapply
Qcle_trans
;
done
)
.
-
rewrite
decide_True
by
done
.
by
rewrite
decide_True
by
(
eapply
Qcle_trans
;
done
)
.
-
by
rewrite
(
decide_False
_
_)
by
(
eapply
Qclt_not_le
,
Qclt_trans
;
by
apply
Qclt_nge
)
.
-
by
rewrite
(
decide_False
_
_)
by
(
eapply
Qclt_not_le
,
Qclt_trans
;
by
apply
Qclt_nge
)
.
Qed
.
Qed
.
Instance
Q
c
_min_comm
:
Comm
(
=
)
Qp_min
.
Instance
Q
p
_min_comm
:
Comm
(
=
)
Qp_min
.
Proof
.
Proof
.
intros
q
p
.
apply
Qp_eq
.
intros
q
p
.
apply
Qp_eq
.
destruct
(
Qp_min_spec_le
q
p
)
as
[[?
->
]|[?
->
]],
(
Qp_min_spec_le
p
q
)
as
[[?
->
]|[?
->
]];
destruct
(
Qp_min_spec_le
q
p
)
as
[[?
->
]|[?
->
]],
(
Qp_min_spec_le
p
q
)
as
[[?
->
]|[?
->
]];
...
...
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