-
-
-
-(* apply (ledx_ind( lambda x. lambda y, ...)) *)
-
-let (t1,metasenv,t3,t4) = proof2 in
-let goal2 = List.hd (List.tl gl1) in
-let (metano,context,_) = CicUtil.lookup_meta goal2 metasenv in
-
-let cut_param_ty_l = (cut_first nleft (cut_last param_ty_l)) in
-
-(* la lista dei soli parametri destri *)
-let l= cut_first (1+nleft) (term_to_list termty) in
-
-let lambda_t = foo_lambda nright cut_param_ty_l nright cut_param_ty_l l [] nright body uri_of_eq nleft termty isSetType ty_indty term in
-let t = foo_appl nleft (nright+consno) lambda_t eliminator_uri in
-
-debug_print (lazy ("Lambda_t: " ^ (CicPp.ppterm t)));
-prerr_endline ("Term: " ^ (CicPp.ppterm termty));
-prerr_endline ("Body: " ^ (CicPp.ppterm body));
-prerr_endline ("Right param: " ^ (CicPp.ppterm (Cic.Appl l)));
-
-
-
-
-
-
-let (ref_t,_,metasenv'',_) = CicRefine.type_of_aux' metasenv context t CicUniv.empty_ugraph in
-
-let proof2 = (t1,metasenv'',t3,t4) in
-
-let proof3,gl3 = PET.apply_tactic (P.apply_tac ref_t)
- (proof2, goal2) in
-
-let new_goals =
- ProofEngineHelpers.compare_metasenvs
- ~oldmetasenv:metasenv ~newmetasenv:metasenv''
- in
-
-let patched_new_goals =
- let (_,metasenv''',_,_) = proof3 in
- List.filter
- (function i -> List.exists (function (j,_,_) -> j=i) metasenv'''
- ) new_goals @ gl3
- in
-
-
-
-
-(*prerr_endline ("METASENV: " ^ CicMetaSubst.ppmetasenv metasenv []); DEBUG*)
-
-
-(proof3, patched_new_goals)
-
+ (* apply (ledx_ind( lambda x. lambda y, ...)) *)
+ let (t1,metasenv,t3,t4) = proof2 in
+ let goal2 = List.hd (List.tl gl1) in
+ let (metano,context,_) = CicUtil.lookup_meta goal2 metasenv in
+ let cut_param_ty_l = (cut_first nleft (cut_last param_ty_l)) in
+ (* la lista dei soli parametri destri *)
+ let l= cut_first (1+nleft) (term_to_list termty) in
+ let lambda_t = foo_lambda nright cut_param_ty_l nright cut_param_ty_l l []
+ nright body uri_of_eq nleft termty isSetType ty_indty term in
+ let t = foo_appl nleft (nright+consno) lambda_t eliminator_uri in
+ debug_print (lazy ("Lambda_t: " ^ (CicPp.ppterm t)));
+ debug_print (lazy ("Term: " ^ (CicPp.ppterm termty)));
+ debug_print (lazy ("Body: " ^ (CicPp.ppterm body)));
+ debug_print (lazy ("Right param: " ^ (CicPp.ppterm (Cic.Appl l))));
+
+ let (ref_t,_,metasenv'',_) = CicRefine.type_of_aux' metasenv context t
+ CicUniv.empty_ugraph
+ in
+ let proof2 = (t1,metasenv'',t3,t4) in
+ let proof3,gl3 = PET.apply_tactic (P.apply_tac ref_t) (proof2, goal2) in
+ let new_goals = ProofEngineHelpers.compare_metasenvs
+ ~oldmetasenv:metasenv ~newmetasenv:metasenv''
+ in
+ let patched_new_goals =
+ let (_,metasenv''',_,_) = proof3 in
+ List.filter (function i -> List.exists (function (j,_,_) -> j=i) metasenv''')
+ new_goals @ gl3
+ in
+ (*prerr_endline ("METASENV: " ^ CicMetaSubst.ppmetasenv metasenv []); DEBUG*)
+ (proof3, patched_new_goals)