fact: Definition repeat (t : tactic) : tactic := fix0 _ (fun rec '(Metavar _ _ g) => r <- filter_goals =<< try t (Metavar _ _ g); match r with | [m:(m: _,g')] => mmatch AnyMetavar _ _ g with | g' => M.ret [m:(m: tt,AnyMetavar _ _ g)] | _ => open_and_apply rec g' end | [m:] => M.ret r | l => gs <- M.map (fun '(m: _ , g) =>open_and_apply rec g) l; let res := dreduce (@mconcat, mapp) (mconcat gs) in M.ret res end).
imports: Strings.String ssrmatching.ssrmatching Mtac2(Logic Datatypes List Utils Logic Sorts MTeleMatch) Strings.String NArith.BinNat NArith.BinNatDef