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
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
Environments
Terraform modules
Monitor
Incidents
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
Lasse Blaauwbroek
PROSA - Formally Proven Schedulability Analysis
Commits
27ef3be4
Commit
27ef3be4
authored
5 years ago
by
Sergey Bozhko
Browse files
Options
Downloads
Patches
Plain Diff
Add tactics for inequalities
parent
8f172d18
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/tactics.v
+32
-0
32 additions, 0 deletions
util/tactics.v
with
32 additions
and
0 deletions
util/tactics.v
+
32
−
0
View file @
27ef3be4
...
@@ -77,3 +77,35 @@ Ltac feed_n n H := match constr:(n) with
...
@@ -77,3 +77,35 @@ Ltac feed_n n H := match constr:(n) with
|
O
=>
idtac
|
O
=>
idtac
|
(
S
?m
)
=>
feed
H
;
[|
feed_n
m
H
]
|
(
S
?m
)
=>
feed
H
;
[|
feed_n
m
H
]
end
.
end
.
(* ************************************************************************** *)
(** * Handier movement of inequalities. *)
(* ************************************************************************** *)
Ltac
move_neq_down
H
:=
exfalso
;
(
move
:
H
;
rewrite
ltnNge
;
move
=>
/
negP
H
;
apply
:
H
;
clear
H
)
||
(
move
:
H
;
rewrite
leqNgt
;
move
=>
/
negP
H
;
apply
:
H
;
clear
H
)
.
Ltac
move_neq_up
H
:=
(
rewrite
ltnNge
;
apply
/
negP
;
intros
H
)
||
(
rewrite
leqNgt
;
apply
/
negP
;
intros
H
)
.
(** The following tactic converts inequality [t1 <= t2] into a constant
[k] such that [t2 = t1 + k] and substitutes all the occurrences of
[t2]. *)
Ltac
convert_two_instants_into_instant_and_duration
t1
t2
k
:=
match
goal
with
|
[
H
:
(
t1
<=
t2
)
=
true
|
-
_
]
=>
ltac
:(
assert
(
EX
:
exists
(
k
:
nat
),
t2
=
t1
+
k
);
[
exists
(
t2
-
t1
);
rewrite
subnKC
;
auto
|
];
destruct
EX
as
[
k
EQ
];
subst
t2
;
clear
H
)
|
[
H
:
(
t1
<
t2
)
=
true
|
-
_
]
=>
ltac
:(
assert
(
EX
:
exists
(
k
:
nat
),
t2
=
t1
+
k
);
[
exists
(
t2
-
t1
);
rewrite
subnKC
;
auto
using
ltnW
|
];
destruct
EX
as
[
k
EQ
];
subst
t2
;
clear
H
)
end
.
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