(************************************************************************) (* v * The Coq Proof Assistant / The Coq Development Team *) (* cut (a=a'); [cg|r] | |- ?f ?a ?b = ?f' ?a' ?b' => cut (b=b');[cut (a=a');[cg|r]|r] | |- ?f ?a ?b ?c = ?f' ?a' ?b' ?c'=> cut (c=c');[cut (b=b');[cut (a=a');[cg|r]|r]|r] | |- ?f ?a ?b ?c ?d= ?f' ?a' ?b' ?c' ?d'=> cut (d=d');[cut (c=c');[cut (b=b');[cut (a=a');[cg|r]|r]|r]|r] | |- ?f ?a ?b ?c ?d ?e= ?f' ?a' ?b' ?c' ?d' ?e'=> cut (e=e');[cut (d=d');[cut (c=c');[cut (b=b');[cut (a=a');[cg|r]|r]|r]|r]|r] | _ => idtac end. (* Rewriting in all hypothesis several times everywhere *) Tactic Notation "rewrite_all" constr(eq) := repeat rewrite eq in *. Tactic Notation "rewrite_all" "<-" constr(eq) := repeat rewrite <- eq in *. (* Keeping a copy of an expression *) Ltac remembertac x a := let x := fresh x in let H := fresh "Heq" x in (set (x:=a) in *; assert (H: x=a) by reflexivity; clearbody x). Tactic Notation "remember" constr(c) "as" ident(x) := remembertac x c.