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
25964e6d
Commit
25964e6d
authored
2 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Cancellation lemmas for multiplication on `nat`.
parent
b411834e
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!450
Cancellation for multiplication on `nat`.
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
stdpp/numbers.v
+9
-0
9 additions, 0 deletions
stdpp/numbers.v
with
9 additions
and
0 deletions
stdpp/numbers.v
+
9
−
0
View file @
25964e6d
...
...
@@ -105,6 +105,15 @@ Module Nat.
Lemma
le_add_sub
n
m
:
n
≤
m
→
m
=
n
+
(
m
-
n
)
.
Proof
.
lia
.
Qed
.
(** Cancellation for multiplication. Coq's stdlib has these lemmas for [Z],
but those for [nat] are missing. We use the naming scheme of Coq's stdlib. *)
Lemma
mul_reg_l
n
m
p
:
p
≠
0
→
p
*
n
=
p
*
m
→
n
=
m
.
Proof
.
pose
proof
(
Z
.
mul_reg_l
(
Z
.
of_nat
n
)
(
Z
.
of_nat
m
)
(
Z
.
of_nat
p
))
.
lia
.
Qed
.
Lemma
mul_reg_r
n
m
p
:
p
≠
0
→
n
*
p
=
m
*
p
→
n
=
m
.
Proof
.
rewrite
<-!
(
Nat
.
mul_comm
p
)
.
apply
mul_reg_l
.
Qed
.
Lemma
lt_succ_succ
n
:
n
<
S
(
S
n
)
.
Proof
.
auto
with
arith
.
Qed
.
Lemma
mul_split_l
n
x1
x2
y1
y2
:
...
...
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