X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=inline;f=components%2Ftactics%2Fparamodulation%2Findexing.ml;h=524c06eff409542d664256094fc6977bff31d507;hb=f340ae8d0be1c480c6a496a11157a6ccfb367c13;hp=dd2d0a422e1fee06df487e362a3966e9b4f57c19;hpb=0f8a03b999acc2a16cbbffd6b19ab0e2967587cc;p=helm.git diff --git a/components/tactics/paramodulation/indexing.ml b/components/tactics/paramodulation/indexing.ml index dd2d0a422..524c06eff 100644 --- a/components/tactics/paramodulation/indexing.ml +++ b/components/tactics/paramodulation/indexing.ml @@ -393,8 +393,9 @@ let subsumption_aux use_unification env table target = try let other = if pos = Utils.Left then r else l in let what' = Subst.apply_subst subst what in + let other' = Subst.apply_subst subst other in let subst', menv', ug' = - unif_fun metasenv m context what' other ugraph + unif_fun metasenv m context what' other' ugraph in (match Subst.merge_subst_if_possible subst subst' with | None -> ok what tl @@ -1015,7 +1016,7 @@ let fix_expansion goal posu (t, subst, menv, ug, eq_f) = (* ginve the old [goal], the side that has not changed [posu] and the * expansion builds a new goal *) -let build_newgoal context goal posu expansion = +let build_newgoal context goal posu rule expansion = let goalproof,_,_,_,_,_ = open_goal goal in let (t,subst,menv,ug,(eq_found,eq_URI)) = fix_expansion goal posu expansion in let pos, equality = eq_found in @@ -1029,7 +1030,7 @@ let build_newgoal context goal posu expansion = in let bo' = (*apply_subst subst*) t in let name = Cic.Name "x" in - let newgoalproofstep = (pos,id,subst,Cic.Lambda (name,ty,bo')) in + let newgoalproofstep = (rule,pos,id,subst,Cic.Lambda (name,ty,bo')) in bo, (newgoalproofstep::goalproof) in let newmetasenv = (* Inference.filter subst *) menv in @@ -1051,7 +1052,7 @@ let superposition_left (metasenv, context, ugraph) table goal = match c with Utils.Gt -> l,r,Utils.Right | _ -> r,l,Utils.Left in let expansions, _ = betaexpand_term menv context ugraph table 0 big in - List.map (build_newgoal context goal possmall) expansions + List.map (build_newgoal context goal possmall Equality.SuperpositionLeft) expansions ;; (** demodulation, when the target is a goal *) @@ -1063,7 +1064,9 @@ let rec demodulation_goal env table goal = let resright = demodulation_aux menv context ugraph table 0 right in match resright with | Some t -> - let newg = build_newgoal context goal Utils.Left t in + let newg = + build_newgoal context goal Utils.Left Equality.Demodulation t + in if goal_metaconvertibility_eq goal newg then false, goal else @@ -1073,7 +1076,7 @@ let rec demodulation_goal env table goal = let resleft = demodulation_aux menv context ugraph table 0 left in match resleft with | Some t -> - let newg = build_newgoal context goal Utils.Right t in + let newg = build_newgoal context goal Utils.Right Equality.Demodulation t in if goal_metaconvertibility_eq goal newg then do_right () else