File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -579,20 +579,23 @@ let get_proof_data : compiler -> sig_state -> p_command -> cmd_output =
579579 (* Create the proof state. *)
580580 let pdata_state =
581581 let proof_goals = add_goals_of_problem p [] in
582- if p_sym_def then
583- (* Add a new focused goal and refine on it. *)
584- let m = LibMeta. fresh p a 0 in
585- let g = Goal. of_meta m in
586- let ps = {proof_name = p_sym_nam; proof_term = Some m;
587- proof_goals = g :: proof_goals } in
588- match pt, t with
589- | Some pt , Some t ->
590- let gt = match g with Typ gt -> gt | _ -> assert false in
591- Tactic. tac_refine ~check: false pt.pos ps gt proof_goals p t.elt
592- | _ , _ -> Tactic. tac_solve pos ps
593- else
594- let ps = {proof_name = p_sym_nam; proof_term = None ; proof_goals} in
595- Tactic. tac_solve pos ps
582+ let ps =
583+ if p_sym_def then
584+ (* Add a new focused goal for the definition. *)
585+ let m = LibMeta. fresh p a 0 in
586+ let proof_goals =
587+ match t with
588+ | Some t ->
589+ (* Refine the focused goal with the given term. *)
590+ LibMeta. set p m (bind_mvar [||] t.elt);
591+ proof_goals
592+ | _ -> Goal. of_meta m :: proof_goals
593+ in
594+ {proof_name = p_sym_nam; proof_term = Some m; proof_goals}
595+ else
596+ {proof_name = p_sym_nam; proof_term = None ; proof_goals}
597+ in
598+ Tactic. tac_solve pos ps
596599 in
597600 if p_sym_prf = None && not (finished pdata_state) then wrn pos
598601 " Some metavariables could not be solved: a proof must be given" ;
You can’t perform that action at this time.
0 commit comments