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
a51ec6d3
Commit
a51ec6d3
authored
1 year ago
by
Sergey Bozhko
Browse files
Options
Downloads
Patches
Plain Diff
prove alt. version of intermediate point lemma
parent
44f3b130
No related branches found
No related tags found
1 merge request
!366
Prove RTA for RS FIFO
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
util/unit_growth.v
+38
-5
38 additions, 5 deletions
util/unit_growth.v
with
38 additions
and
5 deletions
util/unit_growth.v
+
38
−
5
View file @
a51ec6d3
...
@@ -17,17 +17,18 @@ Section Lemmas.
...
@@ -17,17 +17,18 @@ Section Lemmas.
intermediate value theorem for continuous functions. *)
intermediate value theorem for continuous functions. *)
Section
ExistsIntermediateValue
.
Section
ExistsIntermediateValue
.
(** Consider any interval [x1, x2]. *)
(** Consider any interval
<<
[x1, x2]
>>
. *)
Variable
x1
x2
:
nat
.
Variable
x1
x2
:
nat
.
Hypothesis
H_is_interval
:
x1
<=
x2
.
Hypothesis
H_is_interval
:
x1
<=
x2
.
(** Let [
t
] be any value such that [f x1 <= y < f x2]. *)
(** Let [
y
] be any value such that [f x1 <= y < f x2]. *)
Variable
y
:
nat
.
Variable
y
:
nat
.
Hypothesis
H_between
:
f
x1
<=
y
<
f
x2
.
Hypothesis
H_between
:
f
x1
<=
y
<
f
x2
.
(** Then, we prove that there exists an intermediate point [x_mid] such that [f x_mid = y]. *)
(** Then, we prove that there exists an intermediate point [x_mid] such that [f x_mid = y]. *)
Lemma
exists_intermediate_point
:
Lemma
exists_intermediate_point
:
exists
x_mid
,
x1
<=
x_mid
<
x2
/\
f
x_mid
=
y
.
exists
x_mid
,
x1
<=
x_mid
<
x2
/\
f
x_mid
=
y
.
Proof
.
Proof
.
rename
H_is_interval
into
INT
,
H_unit_growth_function
into
UNIT
,
H_between
into
BETWEEN
.
rename
H_is_interval
into
INT
,
H_unit_growth_function
into
UNIT
,
H_between
into
BETWEEN
.
move
:
x2
INT
BETWEEN
;
clear
x2
.
move
:
x2
INT
BETWEEN
;
clear
x2
.
...
@@ -36,7 +37,6 @@ Section Lemmas.
...
@@ -36,7 +37,6 @@ Section Lemmas.
f
x1
<=
y
<
f
(
x1
+
delta
)
->
f
x1
<=
y
<
f
(
x1
+
delta
)
->
exists
x_mid
,
x1
<=
x_mid
<
x1
+
delta
/\
f
x_mid
=
y
.
exists
x_mid
,
x1
<=
x_mid
<
x1
+
delta
/\
f
x_mid
=
y
.
{
move
=>
x2
LE
/
andP
[
GEy
LTy
]
.
{
move
=>
x2
LE
/
andP
[
GEy
LTy
]
.
(* apply DELTA. *)
specialize
(
DELTA
(
x2
-
x1
));
feed
DELTA
.
specialize
(
DELTA
(
x2
-
x1
));
feed
DELTA
.
{
by
apply
/
andP
;
split
;
last
by
rewrite
addnBA
//
addKn
.
}
{
by
apply
/
andP
;
split
;
last
by
rewrite
addnBA
//
addKn
.
}
by
rewrite
subnKC
in
DELTA
.
by
rewrite
subnKC
in
DELTA
.
...
@@ -63,12 +63,45 @@ Section Lemmas.
...
@@ -63,12 +63,45 @@ Section Lemmas.
exists
x_mid
;
split
;
last
by
done
.
exists
x_mid
;
split
;
last
by
done
.
apply
/
andP
;
split
;
first
by
done
.
apply
/
andP
;
split
;
first
by
done
.
by
apply
:
(
leq_trans
LT0
);
rewrite
addnS
.
by
apply
:
(
leq_trans
LT0
);
rewrite
addnS
.
}
}
}
}
Qed
.
Qed
.
End
ExistsIntermediateValue
.
End
ExistsIntermediateValue
.
(** Next, we prove the same lemma with slightly different boundary conditions. *)
Section
ExistsIntermediateValueLEQ
.
(** Consider any interval <<[x1, x2]>>. *)
Variable
x1
x2
:
nat
.
Hypothesis
H_is_interval
:
x1
<=
x2
.
(** Let [y] be any value such that [f x1 <= y <= f x2]. Note that
[y] is allowed to be equal to [f x2]. *)
Variable
y
:
nat
.
Hypothesis
H_between
:
f
x1
<=
y
<=
f
x2
.
(** Then, we prove that there exists an intermediate point [x_mid] such that [f x_mid = y]. *)
Corollary
exists_intermediate_point_leq
:
exists
x_mid
,
x1
<=
x_mid
<=
x2
/\
f
x_mid
=
y
.
Proof
.
move
:
(
H_between
)
=>
/
andP
[
H1
H2
]
.
move
:
H2
;
rewrite
leq_eqVlt
=>
/
orP
[
/
eqP
EQ
|
LT
]
.
{
exists
x2
;
split
.
-
by
apply
/
andP
;
split
=>
//.
-
by
done
.
}
{
edestruct
exists_intermediate_point
with
(
x1
:=
x1
)
(
x2
:=
x2
)
as
[
mid
[
NEQ
EQ
]]
=>
//.
{
by
apply
/
andP
;
split
;
[
apply
H1
|
apply
LT
]
.
}
exists
mid
;
split
;
last
by
done
.
move
:
NEQ
=>
/
andP
[
NEQ1
NEQ2
]
.
by
apply
/
andP
;
split
=>
//.
}
Qed
.
End
ExistsIntermediateValueLEQ
.
(** In this section, we, again, prove an analogue of the
(** In this section, we, again, prove an analogue of the
intermediate value theorem, but for predicates over natural
intermediate value theorem, but for predicates over natural
numbers. *)
numbers. *)
...
...
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