@@ -69,24 +69,49 @@ Tactic Notation "pcofix" ident(CIH) := pcofix CIH with r.
6969(** ** [pclearbot] simplifies all hypotheses of the form [upaco{n} gf bot{n}] to [paco{n} gf bot{n}].
7070 *)
7171
72+ Definition pclearbot_orL (P Q: Prop) := P.
73+ Definition pclearbot_orR (P Q: Prop) := Q.
74+
75+ Ltac pclearbotH H :=
76+ generalize _paco_mark_cons;
77+ let NH := fresh H in
78+ revert_until H;
79+ repeat red in H;
80+ match goal with [Hcrr: context f [or] |- _] =>
81+ match Hcrr with H =>
82+ first[(
83+ let P := context f [pclearbot_orL] in
84+ assert (NH: P) by (repeat intro; edestruct H ; [eassumption|repeat (match goal with [X: _ \/ _ |- _] => destruct X end ); contradiction]);
85+ clear H; rename NH into H; unfold pclearbot_orL in H
86+ ) | (
87+ let P := context f [pclearbot_orR] in
88+ assert (NH: P) by (repeat intro; edestruct H ; [repeat (match goal with [X: _ \/ _ |- _] => destruct X end ); contradiction|eassumption]);
89+ clear H; rename NH into H; unfold pclearbot_orR in H
90+ )]
91+ end
92+ end ;
93+ intros; paco_revert_hyp _paco_mark.
94+
7295Ltac pclearbot :=
73- repeat match goal with
74- | [H: context [bot0] |- _] => destruct H as [H|H]; [|inversion H]
75- | [H: context [bot1] |- _] => destruct H as [H|H]; [|inversion H]
76- | [H: context [bot2] |- _] => destruct H as [H|H]; [|inversion H]
77- | [H: context [bot3] |- _] => destruct H as [H|H]; [|inversion H]
78- | [H: context [bot4] |- _] => destruct H as [H|H]; [|inversion H]
79- | [H: context [bot5] |- _] => destruct H as [H|H]; [|inversion H]
80- | [H: context [bot6] |- _] => destruct H as [H|H]; [|inversion H]
81- | [H: context [bot7] |- _] => destruct H as [H|H]; [|inversion H]
82- | [H: context [bot8] |- _] => destruct H as [H|H]; [|inversion H]
83- | [H: context [bot9] |- _] => destruct H as [H|H]; [|inversion H]
84- | [H: context [bot10] |- _] => destruct H as [H|H]; [|inversion H]
85- | [H: context [bot11] |- _] => destruct H as [H|H]; [|inversion H]
86- | [H: context [bot12] |- _] => destruct H as [H|H]; [|inversion H]
87- | [H: context [bot13] |- _] => destruct H as [H|H]; [|inversion H]
88- | [H: context [bot14] |- _] => destruct H as [H|H]; [|inversion H]
89- end .
96+ repeat (
97+ match goal with
98+ | [H: context [bot0] |- _] => pclearbotH H
99+ | [H: context [bot1] |- _] => pclearbotH H
100+ | [H: context [bot2] |- _] => pclearbotH H
101+ | [H: context [bot3] |- _] => pclearbotH H
102+ | [H: context [bot4] |- _] => pclearbotH H
103+ | [H: context [bot5] |- _] => pclearbotH H
104+ | [H: context [bot6] |- _] => pclearbotH H
105+ | [H: context [bot7] |- _] => pclearbotH H
106+ | [H: context [bot8] |- _] => pclearbotH H
107+ | [H: context [bot9] |- _] => pclearbotH H
108+ | [H: context [bot10] |- _] => pclearbotH H
109+ | [H: context [bot11] |- _] => pclearbotH H
110+ | [H: context [bot12] |- _] => pclearbotH H
111+ | [H: context [bot13] |- _] => pclearbotH H
112+ | [H: context [bot14] |- _] => pclearbotH H
113+ end ).
114+
90115
91116(** ** [pdestruct H] and [pinversion H]
92117 *)
0 commit comments