-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Separate out tactics into a new file, add some lemmas
- Loading branch information
Showing
2 changed files
with
33 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
Ltac decomp := | ||
repeat match goal with | ||
| [ H : _ /\ _ |- _ ] => destruct H | ||
| [ H : exists _, _ |- _ ] => destruct H | ||
end. | ||
|
||
Ltac inverts n := | ||
match n with | ||
| S ?n' => match goal with | ||
| [ H : _ |- _ ] => try (inversion H; subst; inverts n') | ||
| _ => idtac | ||
end | ||
| _ => idtac | ||
end. | ||
|
||
Ltac split_rec n := | ||
match n with | ||
| S ?n' => match goal with | ||
|[ |- exists _, _ ] => eexists; split_rec n' | ||
|[ |- _ /\ _] => split; split_rec n' | ||
| _ => idtac | ||
end | ||
| 0 => idtac | ||
end. | ||
|
||
Ltac subst_some := | ||
repeat match goal with | ||
| [ G : ?x = Some ?y, | ||
H : ?x = Some ?z |- _ ] => rewrite G in H | ||
| [ H : Some ?x = Some ?y |- _ ] => inversion H; subst; clear H | ||
end. |