fact: Fixpoint match_goal_pattern' (u : Unification) (p : goal_pattern) : mlist Hyp -> mlist Hyp -> tactic := fix go l1 l2 g := match p, l2 with | gbase P t, _ => with_goal_type' ( fun G => o <- M.unify_cumul P G u; match o with | mSome f => '(m: p, gs) <- t; let fp := reduce (RedOneStep [rl:RedBeta]) (f p) in M.ret (m: fp, gs) | mNone => raise DoesNotMatchGoal end ) (DoesNotMatchGoal) g | gbase_context x t, _ => with_goal_sort ( fun s G => T.abstract_from_sort_dep s x G (fun C => C *m mlist (goal gs_any)) (with_upcast t) (raise DoesNotMatchGoal) ) (DoesNotMatchGoal) g | @gtele C f, @ahyp A a d :m: l2' => oeqCA <- M.unify C A u; match oeqCA with | mSome eqCA => let a' := rcbv match Logic.meq_sym eqCA in _ =m= X return X with meq_refl => a end in mtry match_goal_pattern' u (f a') [m:] (mrev_append l1 l2') g with [#] DoesNotMatchGoal | =n> go (ahyp a d :m: l1) l2' g end | mNone => go (ahyp a d :m: l1) l2' g end | @gtele_evar C f, _ => e <- M.evar C; match_goal_pattern' u (f e) l1 l2 g | _, _ => M.raise DoesNotMatchGoal end%MC.
imports: Mtac2(Base Datatypes List Sorts tactics.Tactics) Strings.String Strings.String