X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Ftactics%2FnegationTactics.ml;h=c973d75f4706d20754266f4c8df2facd686b9ebe;hb=08a92d276c5477968b02f31097b6ed03185f34eb;hp=7ee79e534aa1907cea1beca63580b55a9dc42836;hpb=9efaf66294d18446b7cd960f9ed4203799073e62;p=helm.git diff --git a/helm/software/components/tactics/negationTactics.ml b/helm/software/components/tactics/negationTactics.ml index 7ee79e534..c973d75f4 100644 --- a/helm/software/components/tactics/negationTactics.ml +++ b/helm/software/components/tactics/negationTactics.ml @@ -33,13 +33,18 @@ let absurd_tac ~term = let module P = PrimitiveTactics in let _,metasenv,_,_ = proof in let _,context,ty = CicUtil.lookup_meta goal metasenv in + let absurd_URI = + match LibraryObjects.absurd_URI () with + Some uri -> uri + | None -> raise (ProofEngineTypes.Fail (lazy "You need to register the default \"absurd\" theorem first. Please use the \"default\" command")) + in let ty_term,_ = CicTypeChecker.type_of_aux' metasenv context term CicUniv.empty_ugraph in if (ty_term = (C.Sort C.Prop)) (* ma questo controllo serve?? *) then ProofEngineTypes.apply_tactic (P.apply_tac ~term:( - C.Appl [(C.Const (LibraryObjects.absurd_URI (), [] )) ; + C.Appl [(C.Const (absurd_URI, [] )) ; term ; ty]) ) status @@ -55,6 +60,11 @@ let contradiction_tac = let module U = UriManager in let module P = PrimitiveTactics in let module T = Tacticals in + let false_URI = + match LibraryObjects.false_URI () with + Some uri -> uri + | None -> raise (ProofEngineTypes.Fail (lazy "You need to register the default \"false\" definition first. Please use the \"default\" command")) + in try ProofEngineTypes.apply_tactic ( T.then_ @@ -62,8 +72,7 @@ let contradiction_tac = ~continuation:( T.then_ ~start: - (EliminationTactics.elim_type_tac - (C.MutInd (LibraryObjects.false_URI (), 0, []))) + (EliminationTactics.elim_type_tac (C.MutInd (false_URI, 0, []))) ~continuation: VariousTactics.assumption_tac)) status with