Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
rtproofs
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Felipe Cerqueira
rtproofs
Commits
e4012a4d
Commit
e4012a4d
authored
Apr 05, 2017
by
Felipe Cerqueira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add tactic for splitting conjunction
parent
b6c93d38
Changes
1
Hide whitespace changes
Inline
Sidebyside
Showing
1 changed file
with
36 additions
and
4 deletions
+36
4
util/tactics.v
util/tactics.v
+36
4
No files found.
util/tactics.v
View file @
e4012a4d
...
...
@@ 403,8 +403,16 @@ Ltac exploit x :=

refine
((
fun
x
y
=>
y
x
)
(
x
_
_
)
_
)

refine
((
fun
x
y
=>
y
x
)
(
x
_
)
_
).
(
*
Feed
tactic

exploit
with
multiple
arguments
.
(
taken
from
http
:
//comments.gmane.org/gmane.science.mathematics.logic.coq.club/7013) *)
(
*
This
tactic
feeds
the
precondition
of
an
implication
in
order
to
derive
the
conclusion
(
taken
from
http
:
//comments.gmane.org/gmane.science.mathematics.logic.coq.club/7013).
Usage:
feed
H
.
H:
P
>
Q
==
becomes
==>
H
:
P
____
Q
After
completing
this
proof
,
Q
becomes
a
hypothesis
in
the
context
.
*
)
Ltac
feed
H
:=
match
type
of
H
with

?
foo
>
_
=>
...
...
@@ 412,15 +420,39 @@ Ltac feed H :=
assert
foo
as
FOO
;
[

specialize
(
H
FOO
);
clear
FOO
]
end
.
(
*
Generalization
of
feed
for
multiple
hypotheses
.
feed_n
is
useful
for
accessing
conclusions
of
long
implications
.
Usage:
feed_n
3
H
.
H:
P1
>
P2
>
P3
>
Q
.
We
'
ll
be
asked
to
prove
P1
,
P2
and
P3
,
so
that
Q
can
be
inferred
.
*
)
Ltac
feed_n
n
H
:=
match
constr
:
(
n
)
with

O
=>
idtac

(
S
?
m
)
=>
feed
H
;
[

feed_n
m
H
]
end
.
end
.
(
*
**************************************************************************
*
)
(
**
*
New
tactics
for
ssreflect
*
)
(
*
**************************************************************************
*
)
(
*
Tactic
for
simplifying
a
sum
with
constant
term
.
Usage:
simpl_sum_const
in
H
.
H:
\
sum_
(
2
<=
x
<
4
)
5
>
0
==
becomes
==>
H
:
5
*
(
4

2
)
>
0
*
)
Ltac
simpl_sum_const
:=
rewrite
?
big_const_nat
?
big_const_ord
?
big_const_seq
iter_addn
?
muln1
?
mul1n
?
mul0n
?
muln0
?
addn0
?
add0n
.
\ No newline at end of file
?
muln0
?
addn0
?
add0n
.
(
*
Tactic
for
splitting
all
conjunctions
in
a
hypothesis
.
Usage:
split_conj
H
.
H:
A
/
\
(
B
/
\
C
)
==
becomes
==>
H1
:
A
H2:
B
H3:
C
*
)
Ltac
split_conj
X
:=
hnf
in
X
;
repeat
match
goal
with

H
:
?
p
/
\
?
q

_
=>
let
x
'
:=
H
in
let
y
'
:=
fresh
H
in
destruct
H
as
[
x
'
y
'
]
end
.
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment