You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
begintryE.mkBound (Univ.Universe.Map.find (univout c) m)
566
575
withNot_found -> t end
567
-
|E.CDatacwhen isuinstance c ->
568
-
decr mi; E.mkBound !mi
569
576
|E.App(c,x,xs) ->
570
-
E.mkApp c (subst ~depth m mi x) (List.map (subst ~depth m mi) xs)
577
+
beginmatch is_global_or_pglobal ~depth t with
578
+
|PGlobal(Some gr, Some _) ->
579
+
let mi =Int.Map.cardinal !db2gr in
580
+
db2gr :=Int.Map.add mi gr !db2gr; in_elpi_pglobal gr (E.mkBound mi)
581
+
|_ ->
582
+
E.mkApp c (subst ~depth m x) (List.map (subst ~depth m) xs)
583
+
end
571
584
|E.Cons(x,xs) ->
572
-
E.mkCons (subst ~depth m mi x) (subst ~depth m mi xs)
585
+
E.mkCons (subst ~depth m x) (subst ~depth m xs)
573
586
|E.Lamx ->
574
-
E.mkLam (subst ~depth:(depth+1) m mi x)
587
+
E.mkLam (subst ~depth:(depth+1) m x)
575
588
|E.Builtin(c,xs) ->
576
-
E.mkBuiltin c (List.map (subst ~depth m mi) xs)
589
+
E.mkBuiltin c (List.map (subst ~depth m) xs)
577
590
|E.UnifVar_ -> CErrors.user_err Pp.(str"The clause begin accumulated contains unification variables, this is forbidden. You must quantify them out using 'pi'.")
578
591
|E.Const_|E.Nil|E.CData_ -> t
579
592
in
593
+
letmap2hypmaprest=
594
+
let hyps =
595
+
Int.Map.bindings map |>List.map @@fun (i,gr) ->
596
+
E.mkApp coq_env_globalc gr [in_elpi_pglobal gr (E.mkBound (origdepth+i))] in
597
+
E.mkAppGlobalL E.Constants.andc (hyps@rest) in
598
+
letrec add_premisesdepthtmap=
599
+
matchE.look ~depth t with
600
+
|E.App(c,hd,[pre]) when c ==E.Constants.rimplc ->
601
+
E.mkApp E.Constants.rimplc hd [map2hyp map [pre]]
602
+
|E.App(c,lam,[]) when c ==E.Constants.pic ->
603
+
beginmatchE.look ~depth lam with
604
+
|Lamt -> add_premises (depth+1) t map
605
+
|_ -> assertfalse
606
+
end
607
+
|_ -> E.mkApp E.Constants.rimplc t [map2hyp map []] in
580
608
let clause =
581
-
letrec bindd (map: int Univ.Universe.Map.t) (mapi: int ref) =function
609
+
letrec bindd (map: int Univ.Universe.Map.t) =function
0 commit comments