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
d73b801d
Commit
d73b801d
authored
8 years ago
by
Felipe Cerqueira
Browse files
Options
Downloads
Patches
Plain Diff
Implement simple version of k-min
parent
e0e0bc7e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
util/minmax.v
+31
-1
31 additions, 1 deletion
util/minmax.v
with
31 additions
and
1 deletion
util/minmax.v
+
31
−
1
View file @
d73b801d
...
...
@@ -570,4 +570,34 @@ Section ExtraLemmas.
}
Qed
.
End
ExtraLemmas
.
\ No newline at end of file
End
ExtraLemmas
.
Section
Kmin
.
Context
{
T1
T2
:
eqType
}
.
Variable
rel
:
T2
->
T2
->
bool
.
Variable
F
:
T1
->
T2
.
Fixpoint
seq_argmin_k
(
l
:
seq
T1
)
(
k
:
nat
)
:=
if
k
is
S
k'
then
if
(
seq_argmin
rel
F
l
)
is
Some
min_x
then
let
l_without_min
:=
rem
min_x
l
in
min_x
::
seq_argmin_k
l_without_min
k'
else
[::]
else
[::]
.
Lemma
seq_argmin_k_exists
:
forall
k
l
x
,
k
>
0
->
x
\
in
l
->
seq_argmin_k
l
k
!=
[::]
.
Proof
.
induction
k
;
first
by
done
.
move
=>
l
x
_
IN
/=.
destruct
(
seq_argmin
rel
F
l
)
as
[|]
eqn
:
MIN
;
first
by
done
.
suff
NOTNONE
:
seq_argmin
rel
F
l
!=
None
by
rewrite
MIN
in
NOTNONE
.
by
apply
seq_argmin_exists
with
(
x0
:=
x
)
.
Qed
.
End
Kmin
.
\ No newline at end of file
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