Skip to content
Snippets Groups Projects
Commit 1e9a5ae9 authored by Armaël Guéneau's avatar Armaël Guéneau
Browse files

Have destruct_and take care of [True] and destruct_or of [False]

The opposite was true before to this commit.
parent 07c0cb06
No related branches found
No related tags found
1 merge request!117Add destruct_or tactics to (possibly repeatedly) split disjunctions in an assumption
...@@ -112,7 +112,7 @@ Tactic Notation "split_and" "!" := hnf; split_and; split_and?. ...@@ -112,7 +112,7 @@ Tactic Notation "split_and" "!" := hnf; split_and; split_and?.
Ltac destruct_and_go H := Ltac destruct_and_go H :=
try lazymatch type of H with try lazymatch type of H with
| False => destruct H | True => clear H
| _ _ => | _ _ =>
let H1 := fresh in let H1 := fresh in
let H2 := fresh in let H2 := fresh in
...@@ -148,7 +148,7 @@ Tactic Notation "destruct_and" "!" := ...@@ -148,7 +148,7 @@ Tactic Notation "destruct_and" "!" :=
*) *)
Tactic Notation "destruct_or" "?" ident(H) := Tactic Notation "destruct_or" "?" ident(H) :=
repeat match type of H with repeat match type of H with
| True => clear H | False => destruct H
| _ _ => destruct H as [H|H] | _ _ => destruct H as [H|H]
| Is_true (bool_decide _) => apply (bool_decide_unpack _) in H | Is_true (bool_decide _) => apply (bool_decide_unpack _) in H
| Is_true (_ || _) => apply orb_True in H; destruct H as [H|H] | Is_true (_ || _) => apply orb_True in H; destruct H as [H|H]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment