Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PROSA - Formally Proven Schedulability Analysis
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
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
RT-PROOFS
PROSA - Formally Proven Schedulability Analysis
Commits
bb76b8bd
Commit
bb76b8bd
authored
3 years ago
by
Pierre Roux
Committed by
Björn Brandenburg
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Prepare subdnD for MathComp PR
parent
b782b2d7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!212
various cleanups and simplifications in util
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
util/nat.v
+7
-10
7 additions, 10 deletions
util/nat.v
util/sum.v
+1
-1
1 addition, 1 deletion
util/sum.v
with
8 additions
and
11 deletions
util/nat.v
+
7
−
10
View file @
bb76b8bd
...
...
@@ -6,16 +6,13 @@ Require Export prosa.util.tactics.
(** Additional lemmas about natural numbers. *)
Section
NatLemmas
.
(** First, we show that, given [m1 >= m2] and [n1 >= n2], an
expression [(m1 + n1) - (m2 + n2)] can be transformed into
expression [(m1 - m2) + (n1 - n2)]. *)
Lemma
subnD
:
forall
m1
m2
n1
n2
,
m1
>=
m2
->
n1
>=
n2
->
(
m1
+
n1
)
-
(
m2
+
n2
)
=
(
m1
-
m2
)
+
(
n1
-
n2
)
.
Proof
.
by
ins
;
lia
.
Qed
.
(** First, we show that, given [m >= p] and [n >= q], an
expression [(m + n) - (p + q)] can be transformed into
expression [(m - p) + (n - q)]. *)
Lemma
subnACA
m
n
p
q
:
p
<=
m
->
q
<=
n
->
(
m
+
n
)
-
(
p
+
q
)
=
(
m
-
p
)
+
(
n
-
q
)
.
Proof
.
by
move
=>
plem
qlen
;
rewrite
subnDA
addnBAC
//
addnBA
//
subnAC
.
Qed
.
(** Next, we show that [m + p <= n] implies that [m <= n - p]. Note
that this lemma is similar to ssreflect's lemma [leq_subRL];
however, the current lemma has no precondition [n <= p], since it
...
...
This diff is collapsed.
Click to expand it.
util/sum.v
+
1
−
1
View file @
bb76b8bd
...
...
@@ -259,7 +259,7 @@ Section SumsOverSequences.
Proof
.
move
=>
LEQ
.
induction
r
;
first
by
rewrite
!
big_nil
subn0
.
rewrite
!
big_cons
subn
D
.
rewrite
!
big_cons
subn
ACA
.
-
apply
/
eqP
;
rewrite
eqn_add2l
;
apply
/
eqP
;
apply
IHl
.
by
intros
;
apply
LEQ
;
rewrite
in_cons
;
apply
/
orP
;
right
.
-
by
apply
LEQ
;
rewrite
in_cons
;
apply
/
orP
;
left
.
...
...
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