diff options
| author | mohring | 2002-01-31 13:07:40 +0000 |
|---|---|---|
| committer | mohring | 2002-01-31 13:07:40 +0000 |
| commit | d3ca56683d0977ed4cb7acc0d61c5d83ecc939c1 (patch) | |
| tree | afb628657007ff33cdc2db21e769da76fe6c3d19 | |
| parent | 4fef76aefe06938fc724e66c08ff51b501cf0dfa (diff) | |
changement generation de schema d'elimination, False_rec est primitif, Constructor tac
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@2447 85f007b7-540e-0410-9357-904b9bb8a0f7
| -rw-r--r-- | .depend | 106 | ||||
| -rw-r--r-- | kernel/indtypes.ml | 1 | ||||
| -rw-r--r-- | parsing/g_tactic.ml4 | 1 | ||||
| -rw-r--r-- | pretyping/indrec.ml | 48 | ||||
| -rw-r--r-- | tactics/tactics.ml | 19 | ||||
| -rw-r--r-- | tactics/tactics.mli | 1 | ||||
| -rwxr-xr-x | theories/Init/Specif.v | 42 |
7 files changed, 113 insertions, 105 deletions
@@ -25,6 +25,8 @@ kernel/typeops.cmi: kernel/environ.cmi kernel/names.cmi kernel/sign.cmi \ kernel/term.cmi kernel/univ.cmi kernel/univ.cmi: kernel/names.cmi lib/pp.cmi lib/pp.cmi: lib/pp_control.cmi +lib/system.cmi: lib/pp.cmi +lib/util.cmi: lib/pp.cmi library/declare.cmi: kernel/cooking.cmi kernel/declarations.cmi \ kernel/environ.cmi kernel/indtypes.cmi library/libobject.cmi \ library/library.cmi kernel/names.cmi library/nametab.cmi \ @@ -45,8 +47,6 @@ library/nameops.cmi: kernel/environ.cmi kernel/names.cmi lib/pp.cmi \ library/nametab.cmi: kernel/environ.cmi kernel/names.cmi lib/pp.cmi \ lib/util.cmi library/summary.cmi: kernel/names.cmi -lib/system.cmi: lib/pp.cmi -lib/util.cmi: lib/pp.cmi parsing/ast.cmi: parsing/coqast.cmi lib/dyn.cmi kernel/names.cmi \ parsing/pcoq.cmi lib/pp.cmi parsing/astterm.cmi: parsing/coqast.cmi kernel/environ.cmi pretyping/evd.cmi \ @@ -225,18 +225,18 @@ toplevel/recordobj.cmi: library/nametab.cmi toplevel/searchisos.cmi: library/libobject.cmi kernel/names.cmi \ kernel/term.cmi toplevel/toplevel.cmi: parsing/pcoq.cmi lib/pp.cmi +toplevel/vernac.cmi: parsing/coqast.cmi parsing/pcoq.cmi toplevel/vernacentries.cmi: kernel/environ.cmi pretyping/evd.cmi \ kernel/names.cmi kernel/term.cmi toplevel/vernacinterp.cmi toplevel/vernacinterp.cmi: parsing/coqast.cmi lib/dyn.cmi kernel/names.cmi \ library/nametab.cmi proofs/proof_type.cmi -toplevel/vernac.cmi: parsing/coqast.cmi parsing/pcoq.cmi contrib/correctness/past.cmi: parsing/coqast.cmi kernel/names.cmi \ contrib/correctness/ptype.cmi kernel/term.cmi +contrib/correctness/pcic.cmi: contrib/correctness/past.cmi \ + pretyping/rawterm.cmi contrib/correctness/pcicenv.cmi: kernel/names.cmi \ contrib/correctness/penv.cmi contrib/correctness/prename.cmi \ kernel/sign.cmi kernel/term.cmi -contrib/correctness/pcic.cmi: contrib/correctness/past.cmi \ - pretyping/rawterm.cmi contrib/correctness/pdb.cmi: kernel/names.cmi contrib/correctness/past.cmi \ contrib/correctness/ptype.cmi contrib/correctness/peffect.cmi: kernel/names.cmi lib/pp.cmi @@ -427,24 +427,32 @@ lib/edit.cmo: lib/bstack.cmi lib/pp.cmi lib/util.cmi lib/edit.cmi lib/edit.cmx: lib/bstack.cmx lib/pp.cmx lib/util.cmx lib/edit.cmi lib/explore.cmo: lib/explore.cmi lib/explore.cmx: lib/explore.cmi -lib/gmapl.cmo: lib/gmap.cmi lib/util.cmi lib/gmapl.cmi -lib/gmapl.cmx: lib/gmap.cmx lib/util.cmx lib/gmapl.cmi lib/gmap.cmo: lib/gmap.cmi lib/gmap.cmx: lib/gmap.cmi +lib/gmapl.cmo: lib/gmap.cmi lib/util.cmi lib/gmapl.cmi +lib/gmapl.cmx: lib/gmap.cmx lib/util.cmx lib/gmapl.cmi lib/gset.cmo: lib/gset.cmi lib/gset.cmx: lib/gset.cmi lib/hashcons.cmo: lib/hashcons.cmi lib/hashcons.cmx: lib/hashcons.cmi lib/options.cmo: lib/util.cmi lib/options.cmi lib/options.cmx: lib/util.cmx lib/options.cmi -lib/pp_control.cmo: lib/pp_control.cmi -lib/pp_control.cmx: lib/pp_control.cmi lib/pp.cmo: lib/pp_control.cmi lib/pp.cmi lib/pp.cmx: lib/pp_control.cmx lib/pp.cmi +lib/pp_control.cmo: lib/pp_control.cmi +lib/pp_control.cmx: lib/pp_control.cmi lib/predicate.cmo: lib/predicate.cmi lib/predicate.cmx: lib/predicate.cmi lib/profile.cmo: lib/profile.cmi lib/profile.cmx: lib/profile.cmi +lib/stamps.cmo: lib/stamps.cmi +lib/stamps.cmx: lib/stamps.cmi +lib/system.cmo: config/coq_config.cmi lib/pp.cmi lib/util.cmi lib/system.cmi +lib/system.cmx: config/coq_config.cmx lib/pp.cmx lib/util.cmx lib/system.cmi +lib/tlm.cmo: lib/gmap.cmi lib/gset.cmi lib/tlm.cmi +lib/tlm.cmx: lib/gmap.cmx lib/gset.cmx lib/tlm.cmi +lib/util.cmo: lib/pp.cmi lib/util.cmi +lib/util.cmx: lib/pp.cmx lib/util.cmi library/declare.cmo: kernel/declarations.cmi kernel/environ.cmi \ library/global.cmi library/impargs.cmi kernel/indtypes.cmi \ kernel/inductive.cmi library/lib.cmi library/libobject.cmi \ @@ -521,14 +529,6 @@ library/summary.cmo: lib/dyn.cmi kernel/names.cmi lib/pp.cmi lib/util.cmi \ library/summary.cmi library/summary.cmx: lib/dyn.cmx kernel/names.cmx lib/pp.cmx lib/util.cmx \ library/summary.cmi -lib/stamps.cmo: lib/stamps.cmi -lib/stamps.cmx: lib/stamps.cmi -lib/system.cmo: config/coq_config.cmi lib/pp.cmi lib/util.cmi lib/system.cmi -lib/system.cmx: config/coq_config.cmx lib/pp.cmx lib/util.cmx lib/system.cmi -lib/tlm.cmo: lib/gmap.cmi lib/gset.cmi lib/tlm.cmi -lib/tlm.cmx: lib/gmap.cmx lib/gset.cmx lib/tlm.cmi -lib/util.cmo: lib/pp.cmi lib/util.cmi -lib/util.cmx: lib/pp.cmx lib/util.cmi parsing/ast.cmo: parsing/coqast.cmi lib/dyn.cmi kernel/names.cmi \ parsing/pcoq.cmi lib/pp.cmi lib/util.cmi parsing/ast.cmi parsing/ast.cmx: parsing/coqast.cmx lib/dyn.cmx kernel/names.cmx \ @@ -1349,12 +1349,12 @@ tactics/wcclausenv.cmx: proofs/clenv.cmx kernel/environ.cmx \ proofs/proof_trees.cmx pretyping/reductionops.cmx kernel/sign.cmx \ proofs/tacmach.cmx kernel/term.cmx pretyping/termops.cmx lib/util.cmx \ tactics/wcclausenv.cmi -tools/coqdep_lexer.cmo: config/coq_config.cmi -tools/coqdep_lexer.cmx: config/coq_config.cmx -tools/coqdep.cmo: config/coq_config.cmi tools/coqdep_lexer.cmo -tools/coqdep.cmx: config/coq_config.cmx tools/coqdep_lexer.cmx tools/coq_vo2xml.cmo: config/coq_config.cmi toplevel/usage.cmi tools/coq_vo2xml.cmx: config/coq_config.cmx toplevel/usage.cmx +tools/coqdep.cmo: config/coq_config.cmi tools/coqdep_lexer.cmo +tools/coqdep.cmx: config/coq_config.cmx tools/coqdep_lexer.cmx +tools/coqdep_lexer.cmo: config/coq_config.cmi +tools/coqdep_lexer.cmx: config/coq_config.cmx tools/gallina.cmo: tools/gallina_lexer.cmo tools/gallina.cmx: tools/gallina_lexer.cmx toplevel/class.cmo: pretyping/classops.cmi kernel/declarations.cmi \ @@ -1535,6 +1535,16 @@ toplevel/toplevel.cmx: parsing/ast.cmx toplevel/errors.cmx library/lib.cmx \ toplevel/vernac.cmx toplevel/vernacinterp.cmx toplevel/toplevel.cmi toplevel/usage.cmo: config/coq_config.cmi toplevel/usage.cmi toplevel/usage.cmx: config/coq_config.cmx toplevel/usage.cmi +toplevel/vernac.cmo: parsing/ast.cmi parsing/coqast.cmi library/lib.cmi \ + library/library.cmi library/nameops.cmi kernel/names.cmi lib/options.cmi \ + parsing/pcoq.cmi lib/pp.cmi library/states.cmi lib/system.cmi \ + pretyping/termops.cmi lib/util.cmi toplevel/vernacinterp.cmi \ + toplevel/vernac.cmi +toplevel/vernac.cmx: parsing/ast.cmx parsing/coqast.cmx library/lib.cmx \ + library/library.cmx library/nameops.cmx kernel/names.cmx lib/options.cmx \ + parsing/pcoq.cmx lib/pp.cmx library/states.cmx lib/system.cmx \ + pretyping/termops.cmx lib/util.cmx toplevel/vernacinterp.cmx \ + toplevel/vernac.cmi toplevel/vernacentries.cmo: parsing/ast.cmi parsing/astterm.cmi \ toplevel/class.cmi pretyping/classops.cmi toplevel/command.cmi \ parsing/coqast.cmi kernel/declarations.cmi library/declare.cmi \ @@ -1579,28 +1589,6 @@ toplevel/vernacinterp.cmx: parsing/ast.cmx parsing/astterm.cmx \ kernel/names.cmx library/nametab.cmx lib/options.cmx lib/pp.cmx \ proofs/proof_type.cmx proofs/tacinterp.cmx lib/util.cmx \ toplevel/vernacinterp.cmi -toplevel/vernac.cmo: parsing/ast.cmi parsing/coqast.cmi library/lib.cmi \ - library/library.cmi library/nameops.cmi kernel/names.cmi lib/options.cmi \ - parsing/pcoq.cmi lib/pp.cmi library/states.cmi lib/system.cmi \ - pretyping/termops.cmi lib/util.cmi toplevel/vernacinterp.cmi \ - toplevel/vernac.cmi -toplevel/vernac.cmx: parsing/ast.cmx parsing/coqast.cmx library/lib.cmx \ - library/library.cmx library/nameops.cmx kernel/names.cmx lib/options.cmx \ - parsing/pcoq.cmx lib/pp.cmx library/states.cmx lib/system.cmx \ - pretyping/termops.cmx lib/util.cmx toplevel/vernacinterp.cmx \ - toplevel/vernac.cmi -contrib/correctness/pcicenv.cmo: library/global.cmi kernel/names.cmi \ - contrib/correctness/past.cmi contrib/correctness/penv.cmi \ - contrib/correctness/pmisc.cmi contrib/correctness/pmonad.cmi \ - contrib/correctness/prename.cmi contrib/correctness/ptype.cmi \ - contrib/correctness/putil.cmi kernel/sign.cmi kernel/term.cmi \ - kernel/univ.cmi contrib/correctness/pcicenv.cmi -contrib/correctness/pcicenv.cmx: library/global.cmx kernel/names.cmx \ - contrib/correctness/past.cmi contrib/correctness/penv.cmx \ - contrib/correctness/pmisc.cmx contrib/correctness/pmonad.cmx \ - contrib/correctness/prename.cmx contrib/correctness/ptype.cmi \ - contrib/correctness/putil.cmx kernel/sign.cmx kernel/term.cmx \ - kernel/univ.cmx contrib/correctness/pcicenv.cmi contrib/correctness/pcic.cmo: parsing/ast.cmi kernel/declarations.cmi \ library/declare.cmi pretyping/detyping.cmi kernel/indtypes.cmi \ kernel/names.cmi library/nametab.cmi contrib/correctness/past.cmi \ @@ -1613,6 +1601,18 @@ contrib/correctness/pcic.cmx: parsing/ast.cmx kernel/declarations.cmx \ contrib/correctness/pmisc.cmx pretyping/rawterm.cmx toplevel/record.cmx \ kernel/sign.cmx kernel/term.cmx pretyping/termops.cmx kernel/typeops.cmx \ lib/util.cmx contrib/correctness/pcic.cmi +contrib/correctness/pcicenv.cmo: library/global.cmi kernel/names.cmi \ + contrib/correctness/past.cmi contrib/correctness/penv.cmi \ + contrib/correctness/pmisc.cmi contrib/correctness/pmonad.cmi \ + contrib/correctness/prename.cmi contrib/correctness/ptype.cmi \ + contrib/correctness/putil.cmi kernel/sign.cmi kernel/term.cmi \ + kernel/univ.cmi contrib/correctness/pcicenv.cmi +contrib/correctness/pcicenv.cmx: library/global.cmx kernel/names.cmx \ + contrib/correctness/past.cmi contrib/correctness/penv.cmx \ + contrib/correctness/pmisc.cmx contrib/correctness/pmonad.cmx \ + contrib/correctness/prename.cmx contrib/correctness/ptype.cmi \ + contrib/correctness/putil.cmx kernel/sign.cmx kernel/term.cmx \ + kernel/univ.cmx contrib/correctness/pcicenv.cmi contrib/correctness/pdb.cmo: library/declare.cmi library/global.cmi \ kernel/names.cmi library/nametab.cmi contrib/correctness/past.cmi \ contrib/correctness/peffect.cmi contrib/correctness/penv.cmi \ @@ -2085,14 +2085,6 @@ contrib/interface/pbp.cmx: parsing/astterm.cmx parsing/coqlib.cmx \ kernel/reduction.cmx proofs/tacinterp.cmx proofs/tacmach.cmx \ tactics/tacticals.cmx tactics/tactics.cmx kernel/term.cmx \ pretyping/typing.cmx lib/util.cmx contrib/interface/pbp.cmi -contrib/interface/showproof_ct.cmo: contrib/interface/ascent.cmi \ - parsing/esyntax.cmi library/global.cmi toplevel/metasyntax.cmi lib/pp.cmi \ - parsing/printer.cmi contrib/interface/translate.cmi \ - contrib/interface/vtp.cmi contrib/interface/xlate.cmi -contrib/interface/showproof_ct.cmx: contrib/interface/ascent.cmi \ - parsing/esyntax.cmx library/global.cmx toplevel/metasyntax.cmx lib/pp.cmx \ - parsing/printer.cmx contrib/interface/translate.cmx \ - contrib/interface/vtp.cmx contrib/interface/xlate.cmx contrib/interface/showproof.cmo: parsing/ast.cmi parsing/astterm.cmi \ proofs/clenv.cmi parsing/coqast.cmi kernel/declarations.cmi \ kernel/environ.cmi pretyping/evd.cmi library/global.cmi \ @@ -2113,6 +2105,14 @@ contrib/interface/showproof.cmx: parsing/ast.cmx parsing/astterm.cmx \ kernel/term.cmx parsing/termast.cmx pretyping/termops.cmx \ contrib/interface/translate.cmx pretyping/typing.cmx lib/util.cmx \ toplevel/vernacinterp.cmx contrib/interface/showproof.cmi +contrib/interface/showproof_ct.cmo: contrib/interface/ascent.cmi \ + parsing/esyntax.cmi library/global.cmi toplevel/metasyntax.cmi lib/pp.cmi \ + parsing/printer.cmi contrib/interface/translate.cmi \ + contrib/interface/vtp.cmi contrib/interface/xlate.cmi +contrib/interface/showproof_ct.cmx: contrib/interface/ascent.cmi \ + parsing/esyntax.cmx library/global.cmx toplevel/metasyntax.cmx lib/pp.cmx \ + parsing/printer.cmx contrib/interface/translate.cmx \ + contrib/interface/vtp.cmx contrib/interface/xlate.cmx contrib/interface/translate.cmo: contrib/interface/ascent.cmi parsing/ast.cmi \ contrib/interface/ctast.cmo kernel/environ.cmi pretyping/evarutil.cmi \ pretyping/evd.cmi library/libobject.cmi library/library.cmi \ @@ -2209,6 +2209,8 @@ contrib/romega/refl_omega.cmx: parsing/ast.cmx tactics/auto.cmx \ parsing/printer.cmx proofs/proof_type.cmx kernel/reduction.cmx \ kernel/sign.cmx proofs/tacmach.cmx tactics/tacticals.cmx \ tactics/tactics.cmx kernel/term.cmx lib/util.cmx +contrib/xml/xml.cmo: contrib/xml/xml.cmi +contrib/xml/xml.cmx: contrib/xml/xml.cmi contrib/xml/xmlcommand.cmo: kernel/declarations.cmi library/declare.cmi \ kernel/environ.cmi pretyping/evd.cmi library/global.cmi library/lib.cmi \ library/libobject.cmi library/library.cmi library/nameops.cmi \ @@ -2229,8 +2231,6 @@ contrib/xml/xmlentries.cmo: lib/util.cmi toplevel/vernacinterp.cmi \ contrib/xml/xmlcommand.cmi contrib/xml/xmlentries.cmx: lib/util.cmx toplevel/vernacinterp.cmx \ contrib/xml/xmlcommand.cmx -contrib/xml/xml.cmo: contrib/xml/xml.cmi -contrib/xml/xml.cmx: contrib/xml/xml.cmi tactics/tauto.cmo: parsing/grammar.cma kernel/names.cmo parsing/ast.cmo parsing/g_tactic.cmo parsing/g_ltac.cmo parsing/g_constr.cmo contrib/correctness/psyntax.cmo: parsing/grammar.cma contrib/field/field.cmo: parsing/grammar.cma kernel/names.cmo parsing/ast.cmo parsing/g_tactic.cmo parsing/g_ltac.cmo parsing/g_constr.cmo diff --git a/kernel/indtypes.ml b/kernel/indtypes.ml index 4ab8d3cb53..2221fc111e 100644 --- a/kernel/indtypes.ml +++ b/kernel/indtypes.ml @@ -142,6 +142,7 @@ let is_unit constrsinfos = (* CP : relax this constraint which was related to extraction && is_logic_arity arinfos *) + | [] -> (* type without constructors *) true | _ -> false let rec infos_and_sort env t = diff --git a/parsing/g_tactic.ml4 b/parsing/g_tactic.ml4 index b58dc654dc..4d0a80bdd7 100644 --- a/parsing/g_tactic.ml4 +++ b/parsing/g_tactic.ml4 @@ -350,6 +350,7 @@ GEXTEND Gram | IDENT "Exists"; bl = binding_list -> <:ast< (Split $bl) >> | IDENT "Constructor"; nbl = numarg_binding_list -> <:ast<(Constructor ($LIST $nbl)) >> + | IDENT "Constructor" ; tc = tactic_expr -> <:ast<(Constructor (TACTIC $tc)) >> | IDENT "Constructor" -> <:ast<(Constructor) >> | IDENT "Reflexivity" -> <:ast< (Reflexivity) >> | IDENT "Symmetry" -> <:ast< (Symmetry) >> diff --git a/pretyping/indrec.ml b/pretyping/indrec.ml index 68739e40e2..d52c7f6431 100644 --- a/pretyping/indrec.ml +++ b/pretyping/indrec.ml @@ -392,6 +392,23 @@ let instanciate_indrec_scheme sort = in drec +(* Change the sort in the type of an inductive definition, builds the corresponding eta-expanded term *) +let instanciate_type_indrec_scheme sort npars term = + let rec drec np elim = + match kind_of_term elim with + | Prod (n,t,c) -> + if np = 0 then + let t' = change_sort_arity sort t + in mkProd (n, t', c), mkLambda (n, t', mkApp(term,Termops.rel_vect 0 (npars+1))) + else + let c',term' = drec (np-1) c in + mkProd (n, t, c'), mkLambda (n, t, term') + | LetIn (n,b,t,c) -> let c',term' = drec np c in + mkLetIn (n,b,t,c'), mkLetIn (n,b,t,term') + | _ -> anomaly "instanciate_type_indrec_scheme: wrong elimination type" + in + drec npars + (**********************************************************************) (* Interface to build complex Scheme *) @@ -469,8 +486,9 @@ let type_rec_branches recursive env sigma indt pj c = (*s Eliminations. *) -let eliminations = - [ (InProp,"_ind") ; (InSet,"_rec") ; (InType,"_rect") ] +let type_suff = "_rect" + +let non_type_eliminations = [ (InProp,"_ind") ; (InSet,"_rec")] let elimination_suffix = function | InProp -> "_ind" @@ -482,14 +500,14 @@ let make_elimination_ident id s = add_suffix id (elimination_suffix s) let declare_one_elimination ind = let (mib,mip) = Global.lookup_inductive ind in let mindstr = string_of_id mip.mind_typename in - let declare na c = - let _ = Declare.declare_constant (id_of_string na) + let declare na c t = + let sp = Declare.declare_constant (id_of_string na) (ConstantEntry { const_entry_body = c; - const_entry_type = None; + const_entry_type = t; const_entry_opaque = false }, NeverDischarge) in - Options.if_verbose ppnl (str na ++ str " is defined") + Options.if_verbose ppnl (str na ++ str " is defined"); sp in let env = Global.env () in let sigma = Evd.empty in @@ -497,11 +515,23 @@ let declare_one_elimination ind = let npars = mip.mind_nparams in let make_elim s = instanciate_indrec_scheme s npars elim_scheme in let kelim = mip.mind_kelim in - List.iter +(* in case the inductive has a type elimination, generates only one induction scheme, + the other ones share the same code with the apropriate type *) + if List.mem InType kelim then + let cte = declare (mindstr^type_suff) (make_elim (new_sort_in_family InType)) None + in let c = mkConst cte and t = constant_type (Global.env ()) cte + in List.iter + (fun (sort,suff) -> + let (t',c') = instanciate_type_indrec_scheme (new_sort_in_family sort) npars c t + in let _ = declare (mindstr^suff) c' (Some t') + in ()) + non_type_eliminations + else (* Impredicative or logical inductive definition *) + List.iter (fun (sort,suff) -> if List.mem sort kelim then - declare (mindstr^suff) (make_elim (new_sort_in_family sort))) - eliminations + let _ = declare (mindstr^suff) (make_elim (new_sort_in_family sort)) None in ()) + non_type_eliminations let declare_eliminations sp = let mib = Global.lookup_mind sp in diff --git a/tactics/tactics.ml b/tactics/tactics.ml index 5e72ed2dd8..ef430f9b64 100644 --- a/tactics/tactics.ml +++ b/tactics/tactics.ml @@ -995,12 +995,29 @@ let any_constructor gl = tclFIRST (List.map (fun i -> one_constructor i []) (interval 1 nconstr)) gl +(* Try to apply the constructor of the inductive definition followed by + a tactic t given as an argument. + Should be generalize in Constructor (Fun c : I -> tactic) + *) + +let tclConstrThen t gl = + let mind = fst (pf_reduce_to_quantified_ind gl (pf_concl gl)) + in let lconstr = + (snd (Global.lookup_inductive mind)).mind_consnames + in let nconstr = Array.length lconstr + in + if nconstr = 0 then error "The type has no constructors"; + tclFIRST (List.map (fun i -> (tclTHEN (one_constructor i []) t)) + (interval 1 nconstr)) gl + let dyn_constructor = function | [Integer i; Bindings binds] -> tactic_bind_list (one_constructor i) binds | [Integer i; Cbindings binds] -> (one_constructor i) binds + | [Tac (tac,_)] -> tclConstrThen tac | [] -> any_constructor | l -> bad_tactic_args "constructor" l - + + let left = (constructor_checking_bound (Some 2) 1) let simplest_left = left [] diff --git a/tactics/tactics.mli b/tactics/tactics.mli index 734895730c..2df23a30fb 100644 --- a/tactics/tactics.mli +++ b/tactics/tactics.mli @@ -231,6 +231,7 @@ val constructor_checking_bound : int option -> int -> constr substitution -> tactic val one_constructor : int -> constr substitution -> tactic val any_constructor : tactic +val tclConstrThen : tactic -> tactic val left : constr substitution -> tactic val simplest_left : tactic val right : constr substitution -> tactic diff --git a/theories/Init/Specif.v b/theories/Init/Specif.v index 389b532f36..2ec58c5606 100755 --- a/theories/Init/Specif.v +++ b/theories/Init/Specif.v @@ -161,37 +161,6 @@ Definition error := None. Syntactic Definition Error := (error ?). Syntactic Definition Value := (value ?). -(*******************************) -(* Self realizing propositions *) -(*******************************) - -(* [False -> C] can be proved for [C:Set] using informative - elimination for equality - - [Axiom False_rec : (P:Set)False->P.] - -*) - -Definition Q:=[P:Set][b:bool]if b then unit else P. - -Lemma False_rec : (P:Set)False->P. -Intros. -Change (Q P false). -Cut true=false. -Intro H1; Case H1. -Exact tt. -Contradiction. -Save. - -Lemma False_rect: (C:Type)False->C. -Proof. - Intros. - Cut Empty_set. - NewDestruct 1. - Elim H. -Qed. - - Definition except := False_rec. (* for compatibility with previous versions *) Syntactic Definition Except := (except ?). @@ -203,17 +172,6 @@ Proof. Apply (h2 h1). Qed. -(*i is now generated -Theorem and_rec : (A,B:Prop)(C:Set)(A->B->C)->(A/\B)->C. -Proof. - Intros A B C F AB; Apply F; Elim AB; Auto. -Qed. -i*) - -(*i is now a theorem -Axiom eq_rec : (A:Set)(a:A)(P:A->Set)(P a)->(b:A) a=b -> (P b). -i*) - Hints Resolve left right inleft inright : core v62. (*********************************) |
