├── .dir-locals.el ├── .gitignore ├── CHANGES ├── COMPATIBILITY ├── COPYRIGHT ├── CREDITS ├── INSTALL ├── INSTALL.doc ├── INSTALL.ide ├── INSTALL.macosx ├── LICENSE ├── Makefile ├── Makefile.build ├── Makefile.common ├── Makefile.doc ├── README ├── README.doc ├── README.win ├── TODO ├── _tags ├── build ├── checker ├── .depend ├── Makefile ├── check.ml ├── check.mllib ├── check_stat.ml ├── check_stat.mli ├── checker.ml ├── closure.ml ├── closure.mli ├── declarations.ml ├── declarations.mli ├── environ.ml ├── environ.mli ├── include ├── indtypes.ml ├── indtypes.mli ├── inductive.ml ├── inductive.mli ├── main.ml ├── mod_checking.ml ├── mod_checking.mli ├── modops.ml ├── modops.mli ├── reduction.ml ├── reduction.mli ├── safe_typing.ml ├── safe_typing.mli ├── subtyping.ml ├── subtyping.mli ├── term.ml ├── term.mli ├── type_errors.ml ├── type_errors.mli ├── typeops.ml ├── typeops.mli └── validate.ml ├── config ├── Makefile.template └── coq_config.mli ├── configure ├── coq-win32.itarget ├── coq.itarget ├── dev ├── Makefile.oug ├── README ├── TODO ├── base_db ├── base_include ├── db ├── db_printers.ml ├── doc │ ├── about-hints │ ├── build-system.dev.txt │ ├── build-system.txt │ ├── changes.txt │ ├── cic.dtd │ ├── debugging.txt │ ├── extensions.txt │ ├── minicoq.tex │ ├── naming-conventions.tex │ ├── newsyntax.tex │ ├── notes-on-conversion │ ├── patch.ocaml-3.10.drop.rectypes │ ├── perf-analysis │ ├── style.txt │ ├── translate.txt │ ├── unification.txt │ ├── universes.txt │ └── versions-history.tex ├── header ├── include ├── ocamldebug-coq.template ├── ocamldoc │ ├── docintro │ └── html │ │ └── style.css ├── ocamlopt_shared_os5fix.sh ├── printers.mllib ├── set_raw_db ├── tools │ ├── Makefile.common │ ├── Makefile.devel │ ├── Makefile.dir │ ├── Makefile.subdir │ ├── change-header │ └── objects.el ├── top_printers.ml ├── v8-syntax │ ├── check-grammar │ ├── memo-v8.tex │ └── syntax-v8.tex └── vm_printers.ml ├── doc ├── LICENSE ├── Makefile.rt ├── RecTutorial │ ├── RecTutorial.tex │ ├── RecTutorial.v │ ├── coqartmacros.tex │ ├── manbiblio.bib │ ├── morebib.bib │ └── recmacros.tex ├── common │ ├── macros.tex │ ├── styles │ │ └── html │ │ │ ├── coqremote │ │ │ ├── cover.html │ │ │ ├── hevea.css │ │ │ └── styles.hva │ │ │ └── simple │ │ │ ├── cover.html │ │ │ ├── hevea.css │ │ │ ├── style.css │ │ │ └── styles.hva │ └── title.tex ├── faq │ ├── FAQ.tex │ ├── axioms.eps │ ├── axioms.fig │ ├── axioms.png │ ├── fk.bib │ ├── hevea.sty │ └── interval_discr.v ├── refman │ ├── AddRefMan-pre.tex │ ├── Cases.tex │ ├── Classes.tex │ ├── Coercion.tex │ ├── Extraction.tex │ ├── Helm.tex │ ├── Micromega.tex │ ├── Natural.tex │ ├── Nsatz.tex │ ├── Omega.tex │ ├── Polynom.tex │ ├── Program.tex │ ├── RefMan-add.tex │ ├── RefMan-cic.tex │ ├── RefMan-coi.tex │ ├── RefMan-com.tex │ ├── RefMan-decl.tex │ ├── RefMan-ext.tex │ ├── RefMan-gal.tex │ ├── RefMan-ide.tex │ ├── RefMan-ind.tex │ ├── RefMan-int.tex │ ├── RefMan-lib.tex │ ├── RefMan-ltac.tex │ ├── RefMan-mod.tex │ ├── RefMan-modr.tex │ ├── RefMan-oth.tex │ ├── RefMan-pre.tex │ ├── RefMan-pro.tex │ ├── RefMan-syn.tex │ ├── RefMan-tac.tex │ ├── RefMan-tacex.tex │ ├── RefMan-tus.tex │ ├── RefMan-uti.tex │ ├── Reference-Manual.tex │ ├── Setoid.tex │ ├── biblio.bib │ ├── coqdoc.tex │ ├── coqide-queries.eps │ ├── coqide-queries.png │ ├── coqide.eps │ ├── coqide.png │ ├── headers.hva │ ├── headers.sty │ ├── hevea.sty │ ├── index.html │ └── menu.html ├── rt │ ├── RefMan-cover.tex │ └── Tutorial-cover.tex ├── stdlib │ ├── Library.tex │ ├── hidden-files │ ├── index-list.html.template │ ├── index-trailer.html │ ├── make-library-files │ └── make-library-index ├── tools │ ├── Translator.tex │ ├── latex_filter │ └── show_latex_messages └── tutorial │ └── Tutorial.tex ├── ide ├── FAQ ├── config_lexer.mll ├── coq.ico ├── coq.ml ├── coq.mli ├── coq.png ├── coq2.ico ├── coq_commands.ml ├── coq_icon.rc ├── coq_lex.mll ├── coqide-gtk2rc ├── coqide.ml ├── coqide.mli ├── coqide_main.ml4 ├── coqide_ui.ml ├── gtk_parsing.ml ├── ide.mllib ├── ide_mac_stubs.c ├── ide_win32_stubs.c ├── ideproof.ml ├── ideutils.ml ├── ideutils.mli ├── mac_default_accel_map ├── minilib.ml ├── minilib.mli ├── preferences.ml ├── preferences.mli ├── project_file.ml4 ├── tags.ml ├── tags.mli ├── undo.ml ├── undo_lablgtk_ge212.mli ├── undo_lablgtk_ge26.mli ├── undo_lablgtk_lt26.mli ├── utf8_convert.mll ├── utils │ ├── config_file.ml │ ├── config_file.mli │ ├── configwin.ml │ ├── configwin.mli │ ├── configwin_ihm.ml │ ├── configwin_keys.ml │ ├── configwin_messages.ml │ ├── configwin_types.ml │ ├── editable_cells.ml │ ├── okey.ml │ └── okey.mli ├── wg_Command.ml ├── wg_Command.mli ├── wg_Find.ml ├── wg_Find.mli ├── wg_Notebook.ml └── wg_Notebook.mli ├── install.sh ├── interp ├── constrextern.ml ├── constrextern.mli ├── constrintern.ml ├── constrintern.mli ├── coqlib.ml ├── coqlib.mli ├── doc.tex ├── dumpglob.ml ├── dumpglob.mli ├── genarg.ml ├── genarg.mli ├── implicit_quantifiers.ml ├── implicit_quantifiers.mli ├── interp.mllib ├── modintern.ml ├── modintern.mli ├── notation.ml ├── notation.mli ├── ppextend.ml ├── ppextend.mli ├── reserve.ml ├── reserve.mli ├── smartlocate.ml ├── smartlocate.mli ├── syntax_def.ml ├── syntax_def.mli ├── topconstr.ml └── topconstr.mli ├── kernel ├── byterun │ ├── coq_fix_code.c │ ├── coq_fix_code.h │ ├── coq_gc.h │ ├── coq_instruct.h │ ├── coq_interp.c │ ├── coq_interp.h │ ├── coq_memory.c │ ├── coq_memory.h │ ├── coq_uint63_native.h │ ├── coq_values.c │ ├── coq_values.h │ ├── int64_emul.h │ ├── int64_native.h │ └── libcoqrun.clib ├── cbytecodes.ml ├── cbytecodes.mli ├── cbytegen.ml ├── cbytegen.mli ├── cemitcodes.ml ├── cemitcodes.mli ├── clambda.ml ├── closure.ml ├── closure.mli ├── conv_oracle.ml ├── conv_oracle.mli ├── cooking.ml ├── cooking.mli ├── csymtable.ml ├── csymtable.mli ├── declarations.ml ├── declarations.mli ├── doc.tex ├── entries.ml ├── entries.mli ├── environ.ml ├── environ.mli ├── esubst.ml ├── esubst.mli ├── indtypes.ml ├── indtypes.mli ├── inductive.ml ├── inductive.mli ├── kernel.mllib ├── make-opcodes ├── mod_subst.ml ├── mod_subst.mli ├── mod_typing.ml ├── mod_typing.mli ├── modops.ml ├── modops.mli ├── names.ml ├── names.mli ├── native.ml ├── native.mli ├── nativecode.ml ├── nativecode.mli ├── nativeconv.ml ├── nativeconv.mli ├── nativelambda.ml ├── nativelambda.mli ├── nativelib.ml ├── nativelib.mli ├── nativelibrary.ml ├── nativelibrary.mli ├── nativevalues.ml ├── nativevalues.mli ├── parray.ml ├── parray.mli ├── pre_env.ml ├── pre_env.mli ├── reduction.ml ├── reduction.mli ├── safe_typing.ml ├── safe_typing.mli ├── sign.ml ├── sign.mli ├── subtyping.ml ├── subtyping.mli ├── term.ml ├── term.mli ├── term_typing.ml ├── term_typing.mli ├── type_errors.ml ├── type_errors.mli ├── typeops.ml ├── typeops.mli ├── uint63.mli ├── uint63_amd64.ml ├── uint63_x86.ml ├── univ.ml ├── univ.mli ├── vconv.ml ├── vconv.mli ├── vm.ml └── vm.mli ├── lib ├── bigint.ml ├── bigint.mli ├── cUnix.ml ├── cUnix.mli ├── clib.mllib ├── compat.ml4 ├── dnet.ml ├── dnet.mli ├── doc.tex ├── dyn.ml ├── dyn.mli ├── envars.ml ├── envars.mli ├── errors.ml ├── errors.mli ├── explore.ml ├── explore.mli ├── flags.ml ├── flags.mli ├── fmap.ml ├── fmap.mli ├── fset.ml ├── fset.mli ├── gmap.ml ├── gmap.mli ├── gmapl.ml ├── gmapl.mli ├── hashcons.ml ├── hashcons.mli ├── hashtbl_alt.ml ├── hashtbl_alt.mli ├── heap.ml ├── heap.mli ├── interface.mli ├── lib.mllib ├── option.ml ├── option.mli ├── pp.ml4 ├── pp.mli ├── pp_control.ml ├── pp_control.mli ├── predicate.ml ├── predicate.mli ├── profile.ml ├── profile.mli ├── rtree.ml ├── rtree.mli ├── segmenttree.ml ├── segmenttree.mli ├── serialize.ml ├── serialize.mli ├── store.ml ├── store.mli ├── system.ml ├── system.mli ├── tries.ml ├── tries.mli ├── unicodetable.ml ├── unionfind.ml ├── unionfind.mli ├── util.ml ├── util.mli ├── xml_lexer.mli ├── xml_lexer.mll ├── xml_parser.ml ├── xml_parser.mli ├── xml_utils.ml └── xml_utils.mli ├── library ├── assumptions.ml ├── assumptions.mli ├── decl_kinds.ml ├── decl_kinds.mli ├── declare.ml ├── declare.mli ├── declaremods.ml ├── declaremods.mli ├── decls.ml ├── decls.mli ├── dischargedhypsmap.ml ├── dischargedhypsmap.mli ├── doc.tex ├── global.ml ├── global.mli ├── goptions.ml ├── goptions.mli ├── heads.ml ├── heads.mli ├── impargs.ml ├── impargs.mli ├── lib.ml ├── lib.mli ├── libnames.ml ├── libnames.mli ├── libobject.ml ├── libobject.mli ├── library.ml ├── library.mli ├── library.mllib ├── nameops.ml ├── nameops.mli ├── nametab.ml ├── nametab.mli ├── states.ml ├── states.mli ├── summary.ml └── summary.mli ├── man ├── coq-interface.1 ├── coq-parser.1 ├── coq-tex.1 ├── coq_makefile.1 ├── coqc.1 ├── coqchk.1 ├── coqdep.1 ├── coqdoc.1 ├── coqide.1 ├── coqmktop.1 ├── coqtop.1 ├── coqtop.byte.1 ├── coqtop.opt.1 ├── coqwc.1 └── gallina.1 ├── myocamlbuild.ml ├── parsing ├── argextend.ml4 ├── doc.tex ├── egrammar.ml ├── egrammar.mli ├── extend.ml ├── extend.mli ├── extrawit.ml ├── extrawit.mli ├── g_constr.ml4 ├── g_ltac.ml4 ├── g_prim.ml4 ├── g_proofs.ml4 ├── g_tactic.ml4 ├── g_vernac.ml4 ├── g_xml.ml4 ├── grammar.mllib ├── highparsing.mllib ├── lexer.ml4 ├── lexer.mli ├── parsing.mllib ├── pcoq.ml4 ├── pcoq.mli ├── ppconstr.ml ├── ppconstr.mli ├── pptactic.ml ├── pptactic.mli ├── ppvernac.ml ├── ppvernac.mli ├── prettyp.ml ├── prettyp.mli ├── printer.ml ├── printer.mli ├── printmod.ml ├── printmod.mli ├── q_constr.ml4 ├── q_coqast.ml4 ├── q_util.ml4 ├── q_util.mli ├── tacextend.ml4 ├── tactic_printer.ml ├── tactic_printer.mli ├── tok.ml ├── tok.mli └── vernacextend.ml4 ├── plugins ├── btauto │ ├── Algebra.v │ ├── Btauto.v │ ├── Reflect.v │ ├── btauto_plugin.mllib │ ├── g_btauto.ml4 │ ├── refl_btauto.ml │ └── vo.itarget ├── cc │ ├── README │ ├── cc_plugin.mllib │ ├── ccalgo.ml │ ├── ccalgo.mli │ ├── ccproof.ml │ ├── ccproof.mli │ ├── cctac.ml │ ├── cctac.mli │ └── g_congruence.ml4 ├── decl_mode │ ├── decl_expr.mli │ ├── decl_interp.ml │ ├── decl_interp.mli │ ├── decl_mode.ml │ ├── decl_mode.mli │ ├── decl_mode_plugin.mllib │ ├── decl_proof_instr.ml │ ├── decl_proof_instr.mli │ ├── g_decl_mode.ml4 │ ├── ppdecl_proof.ml │ └── ppdecl_proof.mli ├── extraction │ ├── CHANGES │ ├── ExtrOcamlBasic.v │ ├── ExtrOcamlBigIntConv.v │ ├── ExtrOcamlIntConv.v │ ├── ExtrOcamlNatBigInt.v │ ├── ExtrOcamlNatInt.v │ ├── ExtrOcamlString.v │ ├── ExtrOcamlZBigInt.v │ ├── ExtrOcamlZInt.v │ ├── README │ ├── big.ml │ ├── common.ml │ ├── common.mli │ ├── extract_env.ml │ ├── extract_env.mli │ ├── extraction.ml │ ├── extraction.mli │ ├── extraction_plugin.mllib │ ├── g_extraction.ml4 │ ├── haskell.ml │ ├── haskell.mli │ ├── miniml.mli │ ├── mlutil.ml │ ├── mlutil.mli │ ├── modutil.ml │ ├── modutil.mli │ ├── ocaml.ml │ ├── ocaml.mli │ ├── scheme.ml │ ├── scheme.mli │ ├── table.ml │ ├── table.mli │ └── vo.itarget ├── field │ ├── LegacyField.v │ ├── LegacyField_Compl.v │ ├── LegacyField_Tactic.v │ ├── LegacyField_Theory.v │ ├── field.ml4 │ ├── field_plugin.mllib │ └── vo.itarget ├── firstorder │ ├── formula.ml │ ├── formula.mli │ ├── g_ground.ml4 │ ├── ground.ml │ ├── ground.mli │ ├── ground_plugin.mllib │ ├── instances.ml │ ├── instances.mli │ ├── rules.ml │ ├── rules.mli │ ├── sequent.ml │ ├── sequent.mli │ ├── unify.ml │ └── unify.mli ├── fourier │ ├── Fourier.v │ ├── Fourier_util.v │ ├── fourier.ml │ ├── fourierR.ml │ ├── fourier_plugin.mllib │ ├── g_fourier.ml4 │ └── vo.itarget ├── funind │ ├── Recdef.v │ ├── functional_principles_proofs.ml │ ├── functional_principles_proofs.mli │ ├── functional_principles_types.ml │ ├── functional_principles_types.mli │ ├── g_indfun.ml4 │ ├── glob_term_to_relation.ml │ ├── glob_term_to_relation.mli │ ├── glob_termops.ml │ ├── glob_termops.mli │ ├── indfun.ml │ ├── indfun.mli │ ├── indfun_common.ml │ ├── indfun_common.mli │ ├── invfun.ml │ ├── merge.ml │ ├── recdef.ml │ ├── recdef.mli │ ├── recdef_plugin.mllib │ └── vo.itarget ├── micromega │ ├── CheckerMaker.v │ ├── Env.v │ ├── EnvRing.v │ ├── LICENSE.sos │ ├── MExtraction.v │ ├── OrderedRing.v │ ├── Psatz.v │ ├── QMicromega.v │ ├── RMicromega.v │ ├── Refl.v │ ├── RingMicromega.v │ ├── Tauto.v │ ├── VarMap.v │ ├── ZCoeff.v │ ├── ZMicromega.v │ ├── certificate.ml │ ├── coq_micromega.ml │ ├── csdpcert.ml │ ├── g_micromega.ml4 │ ├── mfourier.ml │ ├── micromega.ml │ ├── micromega.mli │ ├── micromega_plugin.mllib │ ├── mutils.ml │ ├── persistent_cache.ml │ ├── polynomial.ml │ ├── sos.ml │ ├── sos.mli │ ├── sos_lib.ml │ ├── sos_types.ml │ └── vo.itarget ├── nsatz │ ├── Nsatz.v │ ├── ideal.ml │ ├── nsatz.ml4 │ ├── nsatz_plugin.mllib │ ├── polynom.ml │ ├── polynom.mli │ ├── utile.ml │ ├── utile.mli │ └── vo.itarget ├── omega │ ├── Omega.v │ ├── OmegaLemmas.v │ ├── OmegaPlugin.v │ ├── PreOmega.v │ ├── coq_omega.ml │ ├── g_omega.ml4 │ ├── omega.ml │ ├── omega_plugin.mllib │ └── vo.itarget ├── plugins.itarget ├── pluginsbyte.itarget ├── pluginsdyn.itarget ├── pluginsopt.itarget ├── pluginsvo.itarget ├── quote │ ├── Quote.v │ ├── g_quote.ml4 │ ├── quote.ml │ ├── quote_plugin.mllib │ └── vo.itarget ├── ring │ ├── LegacyArithRing.v │ ├── LegacyNArithRing.v │ ├── LegacyRing.v │ ├── LegacyRing_theory.v │ ├── LegacyZArithRing.v │ ├── Ring_abstract.v │ ├── Ring_normalize.v │ ├── Setoid_ring.v │ ├── Setoid_ring_normalize.v │ ├── Setoid_ring_theory.v │ ├── g_ring.ml4 │ ├── ring.ml │ ├── ring_plugin.mllib │ └── vo.itarget ├── romega │ ├── README │ ├── ROmega.v │ ├── ReflOmegaCore.v │ ├── const_omega.ml │ ├── const_omega.mli │ ├── g_romega.ml4 │ ├── refl_omega.ml │ ├── romega_plugin.mllib │ └── vo.itarget ├── rtauto │ ├── Bintree.v │ ├── Rtauto.v │ ├── g_rtauto.ml4 │ ├── proof_search.ml │ ├── proof_search.mli │ ├── refl_tauto.ml │ ├── refl_tauto.mli │ ├── rtauto_plugin.mllib │ └── vo.itarget ├── setoid_ring │ ├── Algebra_syntax.v │ ├── ArithRing.v │ ├── BinList.v │ ├── Cring.v │ ├── Field.v │ ├── Field_tac.v │ ├── Field_theory.v │ ├── InitialRing.v │ ├── Integral_domain.v │ ├── NArithRing.v │ ├── Ncring.v │ ├── Ncring_initial.v │ ├── Ncring_polynom.v │ ├── Ncring_tac.v │ ├── RealField.v │ ├── Ring.v │ ├── Ring_base.v │ ├── Ring_equiv.v │ ├── Ring_polynom.v │ ├── Ring_tac.v │ ├── Ring_theory.v │ ├── Rings_Q.v │ ├── Rings_R.v │ ├── Rings_Z.v │ ├── ZArithRing.v │ ├── newring.ml4 │ ├── newring_plugin.mllib │ └── vo.itarget ├── syntax │ ├── ascii_syntax.ml │ ├── ascii_syntax_plugin.mllib │ ├── nat_syntax.ml │ ├── nat_syntax_plugin.mllib │ ├── numbers_syntax.ml │ ├── numbers_syntax_plugin.mllib │ ├── r_syntax.ml │ ├── r_syntax_plugin.mllib │ ├── string_syntax.ml │ ├── string_syntax_plugin.mllib │ ├── z_syntax.ml │ └── z_syntax_plugin.mllib └── xml │ ├── COPYRIGHT │ ├── README │ ├── acic.ml │ ├── acic2Xml.ml4 │ ├── cic.dtd │ ├── cic2Xml.ml │ ├── cic2acic.ml │ ├── doubleTypeInference.ml │ ├── doubleTypeInference.mli │ ├── dumptree.ml4 │ ├── proof2aproof.ml │ ├── proofTree2Xml.ml4 │ ├── theoryobject.dtd │ ├── unshare.ml │ ├── unshare.mli │ ├── xml.ml4 │ ├── xml.mli │ ├── xml_plugin.mllib │ ├── xmlcommand.ml │ ├── xmlcommand.mli │ └── xmlentries.ml4 ├── pretyping ├── arguments_renaming.ml ├── arguments_renaming.mli ├── cases.ml ├── cases.mli ├── cbv.ml ├── cbv.mli ├── classops.ml ├── classops.mli ├── coercion.ml ├── coercion.mli ├── detyping.ml ├── detyping.mli ├── doc.tex ├── evarconv.ml ├── evarconv.mli ├── evarutil.ml ├── evarutil.mli ├── evd.ml ├── evd.mli ├── glob_term.ml ├── glob_term.mli ├── indrec.ml ├── indrec.mli ├── inductiveops.ml ├── inductiveops.mli ├── matching.ml ├── matching.mli ├── namegen.ml ├── namegen.mli ├── nativenorm.ml ├── nativenorm.mli ├── pattern.ml ├── pattern.mli ├── pretype_errors.ml ├── pretype_errors.mli ├── pretyping.ml ├── pretyping.mli ├── pretyping.mllib ├── program.ml ├── recordops.ml ├── recordops.mli ├── reductionops.ml ├── reductionops.mli ├── retyping.ml ├── retyping.mli ├── tacred.ml ├── tacred.mli ├── term_dnet.ml ├── term_dnet.mli ├── termops.ml ├── termops.mli ├── typeclasses.ml ├── typeclasses.mli ├── typeclasses_errors.ml ├── typeclasses_errors.mli ├── typing.ml ├── typing.mli ├── unification.ml ├── unification.mli ├── vnorm.ml └── vnorm.mli ├── proofs ├── clenv.ml ├── clenv.mli ├── clenvtac.ml ├── clenvtac.mli ├── doc.tex ├── evar_refiner.ml ├── evar_refiner.mli ├── goal.ml ├── goal.mli ├── logic.ml ├── logic.mli ├── pfedit.ml ├── pfedit.mli ├── proof.ml ├── proof.mli ├── proof_global.ml ├── proof_global.mli ├── proof_type.ml ├── proof_type.mli ├── proofs.mllib ├── proofview.ml ├── proofview.mli ├── redexpr.ml ├── redexpr.mli ├── refiner.ml ├── refiner.mli ├── tacexpr.ml ├── tacmach.ml ├── tacmach.mli ├── tactic_debug.ml └── tactic_debug.mli ├── scripts ├── coqc.ml └── coqmktop.ml ├── states └── MakeInitial.v ├── tactics ├── auto.ml ├── auto.mli ├── autorewrite.ml ├── autorewrite.mli ├── btermdn.ml ├── btermdn.mli ├── class_tactics.ml4 ├── contradiction.ml ├── contradiction.mli ├── dn.ml ├── dn.mli ├── doc.tex ├── eauto.ml4 ├── eauto.mli ├── elim.ml ├── elim.mli ├── elimschemes.ml ├── elimschemes.mli ├── eqdecide.ml4 ├── eqschemes.ml ├── eqschemes.mli ├── equality.ml ├── equality.mli ├── evar_tactics.ml ├── evar_tactics.mli ├── extraargs.ml4 ├── extraargs.mli ├── extratactics.ml4 ├── extratactics.mli ├── hiddentac.ml ├── hiddentac.mli ├── hightactics.mllib ├── hipattern.ml4 ├── hipattern.mli ├── inv.ml ├── inv.mli ├── leminv.ml ├── leminv.mli ├── nbtermdn.ml ├── nbtermdn.mli ├── refine.ml ├── refine.mli ├── rewrite.ml4 ├── tacinterp.ml ├── tacinterp.mli ├── tactic_option.ml ├── tactic_option.mli ├── tacticals.ml ├── tacticals.mli ├── tactics.ml ├── tactics.mli ├── tactics.mllib ├── tauto.ml4 ├── termdn.ml └── termdn.mli ├── test-suite ├── Makefile ├── arithmetic │ ├── add.v │ ├── addc.v │ ├── addcarryc.v │ ├── addmuldiv.v │ ├── compare.v │ ├── div.v │ ├── diveucl.v │ ├── diveucl_21.v │ ├── eqb.v │ ├── eqb_correct.v │ ├── foldi_cont.v │ ├── foldi_down_cont.v │ ├── head0.v │ ├── isint.v │ ├── land.v │ ├── leb.v │ ├── lor.v │ ├── lsl.v │ ├── lsr.v │ ├── ltb.v │ ├── lxor.v │ ├── mod.v │ ├── mul.v │ ├── mulc.v │ ├── print_int.v │ ├── sub.v │ ├── subc.v │ ├── subcarryc.v │ └── tail0.v ├── bench │ ├── lists-100.v │ └── lists_100.v ├── bugs │ ├── closed │ │ ├── 1519.v │ │ ├── 1780.v │ │ ├── 1787.v │ │ ├── 2105.v │ │ ├── 2319.v │ │ ├── shouldfail │ │ │ ├── 1703.v │ │ │ ├── 1898.v │ │ │ ├── 1915.v │ │ │ ├── 2006.v │ │ │ ├── 2251.v │ │ │ ├── 2406.v │ │ │ └── 2586.v │ │ └── shouldsucceed │ │ │ ├── 1041.v │ │ │ ├── 1100.v │ │ │ ├── 121.v │ │ │ ├── 1243.v │ │ │ ├── 1302.v │ │ │ ├── 1322.v │ │ │ ├── 1411.v │ │ │ ├── 1414.v │ │ │ ├── 1416.v │ │ │ ├── 1419.v │ │ │ ├── 1425.v │ │ │ ├── 1446.v │ │ │ ├── 1448.v │ │ │ ├── 1477.v │ │ │ ├── 1483.v │ │ │ ├── 1507.v │ │ │ ├── 1519.v │ │ │ ├── 1568.v │ │ │ ├── 1576.v │ │ │ ├── 1582.v │ │ │ ├── 1604.v │ │ │ ├── 1614.v │ │ │ ├── 1618.v │ │ │ ├── 1634.v │ │ │ ├── 1643.v │ │ │ ├── 1680.v │ │ │ ├── 1683.v │ │ │ ├── 1696.v │ │ │ ├── 1704.v │ │ │ ├── 1711.v │ │ │ ├── 1718.v │ │ │ ├── 1738.v │ │ │ ├── 1740.v │ │ │ ├── 1754.v │ │ │ ├── 1773.v │ │ │ ├── 1774.v │ │ │ ├── 1775.v │ │ │ ├── 1776.v │ │ │ ├── 1779.v │ │ │ ├── 1784.v │ │ │ ├── 1791.v │ │ │ ├── 1834.v │ │ │ ├── 1844.v │ │ │ ├── 1865.v │ │ │ ├── 1891.v │ │ │ ├── 1900.v │ │ │ ├── 1901.v │ │ │ ├── 1905.v │ │ │ ├── 1907.v │ │ │ ├── 1912.v │ │ │ ├── 1918.v │ │ │ ├── 1925.v │ │ │ ├── 1931.v │ │ │ ├── 1935.v │ │ │ ├── 1939.v │ │ │ ├── 1944.v │ │ │ ├── 1951.v │ │ │ ├── 1962.v │ │ │ ├── 1963.v │ │ │ ├── 1977.v │ │ │ ├── 1981.v │ │ │ ├── 2001.v │ │ │ ├── 2017.v │ │ │ ├── 2021.v │ │ │ ├── 2027.v │ │ │ ├── 2083.v │ │ │ ├── 2089.v │ │ │ ├── 2095.v │ │ │ ├── 2108.v │ │ │ ├── 2117.v │ │ │ ├── 2123.v │ │ │ ├── 2127.v │ │ │ ├── 2135.v │ │ │ ├── 2136.v │ │ │ ├── 2137.v │ │ │ ├── 2139.v │ │ │ ├── 2141.v │ │ │ ├── 2145.v │ │ │ ├── 2181.v │ │ │ ├── 2193.v │ │ │ ├── 2231.v │ │ │ ├── 2244.v │ │ │ ├── 2255.v │ │ │ ├── 2262.v │ │ │ ├── 2281.v │ │ │ ├── 2295.v │ │ │ ├── 2299.v │ │ │ ├── 2300.v │ │ │ ├── 2303.v │ │ │ ├── 2304.v │ │ │ ├── 2307.v │ │ │ ├── 2320.v │ │ │ ├── 2342.v │ │ │ ├── 2347.v │ │ │ ├── 2350.v │ │ │ ├── 2353.v │ │ │ ├── 2360.v │ │ │ ├── 2362.v │ │ │ ├── 2375.v │ │ │ ├── 2378.v │ │ │ ├── 2388.v │ │ │ ├── 2393.v │ │ │ ├── 2404.v │ │ │ ├── 2456.v │ │ │ ├── 2464.v │ │ │ ├── 2467.v │ │ │ ├── 2473.v │ │ │ ├── 2603.v │ │ │ ├── 2608.v │ │ │ ├── 2613.v │ │ │ ├── 2615.v │ │ │ ├── 2616.v │ │ │ ├── 2640.v │ │ │ ├── 2667.v │ │ │ ├── 2670.v │ │ │ ├── 2680.v │ │ │ ├── 2729.v │ │ │ ├── 2732.v │ │ │ ├── 2733.v │ │ │ ├── 335.v │ │ │ ├── 348.v │ │ │ ├── 38.v │ │ │ ├── 545.v │ │ │ ├── 808_2411.v │ │ │ ├── 846.v │ │ │ └── 931.v │ └── opened │ │ ├── 1773.v │ │ └── shouldnotfail │ │ ├── 1338.v-disabled │ │ ├── 1501.v │ │ ├── 1596.v │ │ ├── 1671.v │ │ ├── 1811.v │ │ ├── 2310.v │ │ └── 743.v ├── check ├── complexity │ ├── Notations.v │ ├── evar_instance.v │ ├── guard.v │ ├── injection.v │ ├── lettuple.v │ ├── patternmatching.v │ ├── pretyping.v │ ├── ring.v │ ├── ring2.v │ ├── setoid_rewrite.v │ └── unification.v ├── coqdoc │ └── links.v ├── csdp.cache ├── failure │ ├── Case1.v │ ├── Case10.v │ ├── Case11.v │ ├── Case12.v │ ├── Case13.v │ ├── Case14.v │ ├── Case15.v │ ├── Case16.v │ ├── Case2.v │ ├── Case3.v │ ├── Case4.v │ ├── Case5.v │ ├── Case6.v │ ├── Case7.v │ ├── Case8.v │ ├── Case9.v │ ├── ClearBody.v │ ├── ImportedCoercion.v │ ├── Notations.v │ ├── Reordering.v │ ├── Sections.v │ ├── Tauto.v │ ├── Uminus.v │ ├── autorewritein.v │ ├── cases.v │ ├── check.v │ ├── circular_subtyping1.v │ ├── circular_subtyping2.v │ ├── clash_cons.v │ ├── clashes.v │ ├── coqbugs0266.v │ ├── evar1.v │ ├── evarclear1.v │ ├── evarclear2.v │ ├── evarlemma.v │ ├── fixpoint1.v │ ├── fixpoint2.v │ ├── fixpoint3.v │ ├── fixpoint4.v │ ├── guard.v │ ├── illtype1.v │ ├── inductive1.v │ ├── inductive2.v │ ├── inductive3.v │ ├── inductive4.v │ ├── ltac1.v │ ├── ltac2.v │ ├── ltac4.v │ ├── pattern.v │ ├── positivity.v │ ├── proofirrelevance.v │ ├── prop-set-proof-irrelevance.v │ ├── redef.v │ ├── rewrite_in_goal.v │ ├── rewrite_in_hyp.v │ ├── rewrite_in_hyp2.v │ ├── search.v │ ├── subtyping.v │ ├── subtyping2.v │ ├── univ_include.v │ ├── universes-buraliforti-redef.v │ ├── universes-buraliforti.v │ ├── universes-sections1.v │ ├── universes-sections2.v │ ├── universes.v │ └── universes3.v ├── ide │ ├── undo.v │ ├── undo001.fake │ ├── undo002.fake │ ├── undo003.fake │ ├── undo004.fake │ ├── undo005.fake │ ├── undo006.fake │ ├── undo007.fake │ ├── undo008.fake │ ├── undo009.fake │ ├── undo010.fake │ ├── undo011.fake │ ├── undo012.fake │ ├── undo013.fake │ ├── undo014.fake │ ├── undo015.fake │ ├── undo016.fake │ ├── undo017.fake │ ├── undo018.fake │ └── undo019.fake ├── ideal-features │ ├── Apply.v │ ├── Case4.v │ ├── Case9.v │ ├── complexity │ │ └── evars_subst.v │ ├── eapply_evar.v │ ├── evars_subst.v │ ├── implicit_binders.v │ └── universes.v ├── interactive │ ├── Back.v │ └── Evar.v ├── kernel │ └── inds.mv ├── micromega │ ├── bertot.v │ ├── example.v │ ├── heap3_vcgen_25.v │ ├── qexample.v │ ├── rexample.v │ ├── square.v │ └── zomicron.v ├── misc │ ├── berardi_test.v │ ├── deps │ │ ├── client │ │ │ ├── bar.v │ │ │ └── foo.v │ │ ├── deps.out │ │ └── lib │ │ │ └── foo.v │ └── universes │ │ └── universes.v ├── modules │ ├── Demo.v │ ├── Nat.v │ ├── PO.v │ ├── Przyklad.v │ ├── Tescik.v │ ├── errors.v │ ├── fun_objects.v │ ├── grammar.v │ ├── ind.v │ ├── injection_discriminate_inversion.v │ ├── mod_decl.v │ ├── modeq.v │ ├── modul.v │ ├── nested_mod_types.v │ ├── obj.v │ ├── objects.v │ ├── objects2.v │ ├── pliczek.v │ ├── plik.v │ ├── pseudo_circular_with.v │ ├── resolver.v │ ├── sig.v │ ├── sub_objects.v │ └── subtyping.v ├── output │ ├── Arguments.out │ ├── Arguments.v │ ├── ArgumentsScope.out │ ├── ArgumentsScope.v │ ├── Arguments_renaming.out │ ├── Arguments_renaming.v │ ├── Cases.out │ ├── Cases.v │ ├── Coercions.out │ ├── Coercions.v │ ├── Errors.out │ ├── Errors.v │ ├── Existentials.out │ ├── Existentials.v │ ├── Extraction_matchs_2413.out │ ├── Extraction_matchs_2413.v │ ├── Fixpoint.out │ ├── Fixpoint.v │ ├── Implicit.out │ ├── Implicit.v │ ├── InitSyntax.out │ ├── InitSyntax.v │ ├── Intuition.out │ ├── Intuition.v │ ├── Match_subterm.out │ ├── Match_subterm.v │ ├── Nametab.out │ ├── Nametab.v │ ├── Naming.out │ ├── Naming.v │ ├── Notations.out │ ├── Notations.v │ ├── Notations2.out │ ├── Notations2.v │ ├── NumbersSyntax.out │ ├── NumbersSyntax.v │ ├── PrintAssumptions.out │ ├── PrintAssumptions.v │ ├── PrintInfos.out │ ├── PrintInfos.v │ ├── Quote.out │ ├── Quote.v │ ├── RealSyntax.out │ ├── RealSyntax.v │ ├── Record.out │ ├── Record.v │ ├── Search.out │ ├── Search.v │ ├── SearchPattern.out │ ├── SearchPattern.v │ ├── SearchRewrite.out │ ├── SearchRewrite.v │ ├── Sum.out │ ├── Sum.v │ ├── Tactics.out │ ├── Tactics.v │ ├── TranspModtype.out │ ├── TranspModtype.v │ ├── ZSyntax.out │ ├── ZSyntax.v │ ├── inference.out │ ├── inference.v │ ├── names.out │ ├── names.v │ ├── reduction.out │ ├── reduction.v │ ├── rewrite-2172.out │ ├── rewrite-2172.v │ ├── set.out │ ├── set.v │ ├── simpl.out │ └── simpl.v ├── prerequisite │ ├── make_local.v │ └── make_notation.v ├── success │ ├── Abstract.v │ ├── AdvancedCanonicalStructure.v │ ├── AdvancedTypeClasses.v │ ├── CanonicalStructure.v │ ├── Case1.v │ ├── Case10.v │ ├── Case11.v │ ├── Case12.v │ ├── Case13.v │ ├── Case14.v │ ├── Case15.v │ ├── Case16.v │ ├── Case17.v │ ├── Case18.v │ ├── Case19.v │ ├── Case2.v │ ├── Case3.v │ ├── Case5.v │ ├── Case6.v │ ├── Case7.v │ ├── Case8.v │ ├── Case9.v │ ├── CaseAlias.v │ ├── Cases-bug1834.v │ ├── Cases.v │ ├── CasesDep.v │ ├── Check.v │ ├── Conjecture.v │ ├── DHyp.v │ ├── Decompose.v │ ├── DiscrR.v │ ├── Discriminate.v │ ├── Field.v │ ├── Fixpoint.v │ ├── Fourier.v │ ├── Funind.v │ ├── Generalization.v │ ├── Generalize.v │ ├── Hints.v │ ├── ImplicitArguments.v │ ├── ImplicitTactic.v │ ├── Import.v │ ├── Inductive.v │ ├── Injection.v │ ├── Inversion.v │ ├── LegacyField.v │ ├── LetIn.v │ ├── LetPat.v │ ├── MatchFail.v │ ├── Mod_ltac.v │ ├── Mod_params.v │ ├── Mod_strengthen.v │ ├── Mod_type.v │ ├── NatRing.v │ ├── Notations.v │ ├── Nsatz.v │ ├── Omega.v │ ├── Omega0.v │ ├── Omega2.v │ ├── OmegaPre.v │ ├── PCase.v │ ├── PPFix.v │ ├── Print.v │ ├── PrintSortedUniverses.v │ ├── ProgramWf.v │ ├── Projection.v │ ├── ROmega.v │ ├── ROmega0.v │ ├── ROmega2.v │ ├── ROmegaPre.v │ ├── RecTutorial.v │ ├── Record.v │ ├── Reg.v │ ├── Remark.v │ ├── Rename.v │ ├── Reordering.v │ ├── Require.v │ ├── Scheme.v │ ├── Scopes.v │ ├── Section.v │ ├── Simplify_eq.v │ ├── Tauto.v │ ├── TestRefine.v │ ├── Try.v │ ├── Typeclasses.v │ ├── apply.v │ ├── auto.v │ ├── autointros.v │ ├── autorewrite.v │ ├── bullet.v │ ├── cc.v │ ├── change.v │ ├── clear.v │ ├── coercions.v │ ├── conv_pbs.v │ ├── coqbugs0181.v │ ├── decl_mode.v │ ├── dependentind.v │ ├── destruct.v │ ├── eauto.v │ ├── eqdecide.v │ ├── eta.v │ ├── evars.v │ ├── extraction.v │ ├── fix.v │ ├── guard.v │ ├── hyps_inclusion.v │ ├── if.v │ ├── implicit.v │ ├── import_lib.v │ ├── import_mod.v │ ├── inds_type_sec.v │ ├── induct.v │ ├── instantiate.v │ ├── intros.v │ ├── ltac.v │ ├── mutual_ind.v │ ├── options.v │ ├── params_ind.v │ ├── parsing.v │ ├── pattern.v │ ├── polymorphism.v │ ├── proof_using.v │ ├── refine.v │ ├── remember.v │ ├── replace.v │ ├── rewrite.v │ ├── rewrite_in.v │ ├── rewrite_iterated.v │ ├── searchabout.v │ ├── set.v │ ├── setoid_ring_module.v │ ├── setoid_test.v │ ├── setoid_test2.v │ ├── setoid_test_function_space.v │ ├── simpl.v │ ├── simpl_tuning.v │ ├── specialize.v │ ├── telescope_canonical.v │ ├── unfold.v │ ├── unicode_utf8.v │ ├── unification.v │ ├── univers.v │ └── universes-coercion.v └── typeclasses │ ├── NewSetoid.v │ ├── clrewrite.v │ └── unification_delta.v ├── theories ├── Arith │ ├── Arith.v │ ├── Arith_base.v │ ├── Between.v │ ├── Bool_nat.v │ ├── Compare.v │ ├── Compare_dec.v │ ├── Div2.v │ ├── EqNat.v │ ├── Euclid.v │ ├── Even.v │ ├── Factorial.v │ ├── Gt.v │ ├── Le.v │ ├── Lt.v │ ├── Max.v │ ├── Min.v │ ├── Minus.v │ ├── Mult.v │ ├── Peano_dec.v │ ├── Plus.v │ ├── Wf_nat.v │ ├── intro.tex │ └── vo.itarget ├── Array │ ├── ExtractNative.v │ ├── PArray.v │ ├── extrNative.ml │ ├── extrNative.mli │ └── vo.itarget ├── Bool │ ├── Bool.v │ ├── BoolEq.v │ ├── Bvector.v │ ├── DecBool.v │ ├── IfProp.v │ ├── Sumbool.v │ ├── Zerob.v │ ├── intro.tex │ └── vo.itarget ├── Classes │ ├── DecidableClass.v │ ├── EquivDec.v │ ├── Equivalence.v │ ├── Init.v │ ├── Morphisms.v │ ├── Morphisms_Prop.v │ ├── Morphisms_Relations.v │ ├── RelationClasses.v │ ├── RelationPairs.v │ ├── SetoidClass.v │ ├── SetoidDec.v │ ├── SetoidTactics.v │ └── vo.itarget ├── FSets │ ├── FMapAVL.v │ ├── FMapFacts.v │ ├── FMapFullAVL.v │ ├── FMapInterface.v │ ├── FMapList.v │ ├── FMapPositive.v │ ├── FMapWeakList.v │ ├── FMaps.v │ ├── FSetAVL.v │ ├── FSetBridge.v │ ├── FSetCompat.v │ ├── FSetDecide.v │ ├── FSetEqProperties.v │ ├── FSetFacts.v │ ├── FSetInterface.v │ ├── FSetList.v │ ├── FSetPositive.v │ ├── FSetProperties.v │ ├── FSetToFiniteSet.v │ ├── FSetWeakList.v │ ├── FSets.v │ └── vo.itarget ├── Init │ ├── Datatypes.v │ ├── Logic.v │ ├── Logic_Type.v │ ├── Notations.v │ ├── Peano.v │ ├── Prelude.v │ ├── Specif.v │ ├── Tactics.v │ ├── Wf.v │ └── vo.itarget ├── Lists │ ├── List.v │ ├── ListSet.v │ ├── ListTactics.v │ ├── SetoidList.v │ ├── StreamMemo.v │ ├── Streams.v │ ├── intro.tex │ └── vo.itarget ├── Logic │ ├── Berardi.v │ ├── ChoiceFacts.v │ ├── Classical.v │ ├── ClassicalChoice.v │ ├── ClassicalDescription.v │ ├── ClassicalEpsilon.v │ ├── ClassicalFacts.v │ ├── ClassicalUniqueChoice.v │ ├── Classical_Pred_Set.v │ ├── Classical_Pred_Type.v │ ├── Classical_Prop.v │ ├── Classical_Type.v │ ├── ConstructiveEpsilon.v │ ├── Decidable.v │ ├── Description.v │ ├── Diaconescu.v │ ├── Epsilon.v │ ├── Eqdep.v │ ├── EqdepFacts.v │ ├── Eqdep_dec.v │ ├── ExtensionalityFacts.v │ ├── FunctionalExtensionality.v │ ├── Hurkens.v │ ├── IndefiniteDescription.v │ ├── JMeq.v │ ├── ProofIrrelevance.v │ ├── ProofIrrelevanceFacts.v │ ├── RelationalChoice.v │ ├── SetIsType.v │ ├── intro.tex │ └── vo.itarget ├── MSets │ ├── MSetAVL.v │ ├── MSetDecide.v │ ├── MSetEqProperties.v │ ├── MSetFacts.v │ ├── MSetGenTree.v │ ├── MSetInterface.v │ ├── MSetList.v │ ├── MSetPositive.v │ ├── MSetProperties.v │ ├── MSetRBT.v │ ├── MSetToFiniteSet.v │ ├── MSetWeakList.v │ ├── MSets.v │ └── vo.itarget ├── NArith │ ├── BinNat.v │ ├── BinNatDef.v │ ├── NArith.v │ ├── Ndec.v │ ├── Ndigits.v │ ├── Ndist.v │ ├── Ndiv_def.v │ ├── Ngcd_def.v │ ├── Nnat.v │ ├── Nsqrt_def.v │ ├── intro.tex │ └── vo.itarget ├── Numbers │ ├── BigNumPrelude.v │ ├── BinNums.v │ ├── Cyclic │ │ ├── Abstract │ │ │ ├── CyclicAxioms.v │ │ │ └── NZCyclic.v │ │ ├── DoubleCyclic │ │ │ ├── DoubleAdd.v │ │ │ ├── DoubleBase.v │ │ │ ├── DoubleCyclic.v │ │ │ ├── DoubleDiv.v │ │ │ ├── DoubleDivn1.v │ │ │ ├── DoubleLift.v │ │ │ ├── DoubleMul.v │ │ │ ├── DoubleSqrt.v │ │ │ ├── DoubleSub.v │ │ │ └── DoubleType.v │ │ ├── Int63 │ │ │ ├── Cyclic63.v │ │ │ ├── Int63.v │ │ │ ├── Int63Axioms.v │ │ │ ├── Int63Native.v │ │ │ ├── Int63Op.v │ │ │ ├── Int63Properties.v │ │ │ └── Ring63.v │ │ └── ZModulo │ │ │ └── ZModulo.v │ ├── Integer │ │ ├── Abstract │ │ │ ├── ZAdd.v │ │ │ ├── ZAddOrder.v │ │ │ ├── ZAxioms.v │ │ │ ├── ZBase.v │ │ │ ├── ZBits.v │ │ │ ├── ZDivEucl.v │ │ │ ├── ZDivFloor.v │ │ │ ├── ZDivTrunc.v │ │ │ ├── ZGcd.v │ │ │ ├── ZLcm.v │ │ │ ├── ZLt.v │ │ │ ├── ZMaxMin.v │ │ │ ├── ZMul.v │ │ │ ├── ZMulOrder.v │ │ │ ├── ZParity.v │ │ │ ├── ZPow.v │ │ │ ├── ZProperties.v │ │ │ └── ZSgnAbs.v │ │ ├── BigZ │ │ │ ├── BigZ.v │ │ │ └── ZMake.v │ │ ├── Binary │ │ │ └── ZBinary.v │ │ ├── NatPairs │ │ │ └── ZNatPairs.v │ │ └── SpecViaZ │ │ │ ├── ZSig.v │ │ │ └── ZSigZAxioms.v │ ├── NaryFunctions.v │ ├── NatInt │ │ ├── NZAdd.v │ │ ├── NZAddOrder.v │ │ ├── NZAxioms.v │ │ ├── NZBase.v │ │ ├── NZBits.v │ │ ├── NZDiv.v │ │ ├── NZDomain.v │ │ ├── NZGcd.v │ │ ├── NZLog.v │ │ ├── NZMul.v │ │ ├── NZMulOrder.v │ │ ├── NZOrder.v │ │ ├── NZParity.v │ │ ├── NZPow.v │ │ ├── NZProperties.v │ │ └── NZSqrt.v │ ├── Natural │ │ ├── Abstract │ │ │ ├── NAdd.v │ │ │ ├── NAddOrder.v │ │ │ ├── NAxioms.v │ │ │ ├── NBase.v │ │ │ ├── NBits.v │ │ │ ├── NDefOps.v │ │ │ ├── NDiv.v │ │ │ ├── NGcd.v │ │ │ ├── NIso.v │ │ │ ├── NLcm.v │ │ │ ├── NLog.v │ │ │ ├── NMaxMin.v │ │ │ ├── NMulOrder.v │ │ │ ├── NOrder.v │ │ │ ├── NParity.v │ │ │ ├── NPow.v │ │ │ ├── NProperties.v │ │ │ ├── NSqrt.v │ │ │ ├── NStrongRec.v │ │ │ └── NSub.v │ │ ├── BigN │ │ │ ├── BigN.v │ │ │ ├── NMake.v │ │ │ ├── NMake_gen.ml │ │ │ └── Nbasic.v │ │ ├── Binary │ │ │ └── NBinary.v │ │ ├── Peano │ │ │ └── NPeano.v │ │ └── SpecViaZ │ │ │ ├── NSig.v │ │ │ └── NSigNAxioms.v │ ├── NumPrelude.v │ ├── Rational │ │ ├── BigQ │ │ │ ├── BigQ.v │ │ │ └── QMake.v │ │ └── SpecViaQ │ │ │ └── QSig.v │ └── vo.itarget ├── PArith │ ├── BinPos.v │ ├── BinPosDef.v │ ├── PArith.v │ ├── POrderedType.v │ ├── Pnat.v │ ├── intro.tex │ └── vo.itarget ├── Program │ ├── Basics.v │ ├── Combinators.v │ ├── Equality.v │ ├── Program.v │ ├── Subset.v │ ├── Syntax.v │ ├── Tactics.v │ ├── Utils.v │ ├── Wf.v │ └── vo.itarget ├── QArith │ ├── QArith.v │ ├── QArith_base.v │ ├── QOrderedType.v │ ├── Qabs.v │ ├── Qcanon.v │ ├── Qfield.v │ ├── Qminmax.v │ ├── Qpower.v │ ├── Qreals.v │ ├── Qreduction.v │ ├── Qring.v │ ├── Qround.v │ └── vo.itarget ├── Reals │ ├── Alembert.v │ ├── AltSeries.v │ ├── ArithProp.v │ ├── Binomial.v │ ├── Cauchy_prod.v │ ├── Cos_plus.v │ ├── Cos_rel.v │ ├── DiscrR.v │ ├── Exp_prop.v │ ├── Integration.v │ ├── LegacyRfield.v │ ├── MVT.v │ ├── NewtonInt.v │ ├── PSeries_reg.v │ ├── PartSum.v │ ├── RIneq.v │ ├── RList.v │ ├── ROrderedType.v │ ├── R_Ifp.v │ ├── R_sqr.v │ ├── R_sqrt.v │ ├── Ranalysis.v │ ├── Ranalysis1.v │ ├── Ranalysis2.v │ ├── Ranalysis3.v │ ├── Ranalysis4.v │ ├── Raxioms.v │ ├── Rbase.v │ ├── Rbasic_fun.v │ ├── Rcomplete.v │ ├── Rdefinitions.v │ ├── Rderiv.v │ ├── Reals.v │ ├── Rfunctions.v │ ├── Rgeom.v │ ├── RiemannInt.v │ ├── RiemannInt_SF.v │ ├── Rlimit.v │ ├── Rlogic.v │ ├── Rminmax.v │ ├── Rpow_def.v │ ├── Rpower.v │ ├── Rprod.v │ ├── Rseries.v │ ├── Rsigma.v │ ├── Rsqrt_def.v │ ├── Rtopology.v │ ├── Rtrigo.v │ ├── Rtrigo_alt.v │ ├── Rtrigo_calc.v │ ├── Rtrigo_def.v │ ├── Rtrigo_fun.v │ ├── Rtrigo_reg.v │ ├── SeqProp.v │ ├── SeqSeries.v │ ├── SplitAbsolu.v │ ├── SplitRmult.v │ ├── Sqrt_reg.v │ ├── intro.tex │ └── vo.itarget ├── Relations │ ├── Operators_Properties.v │ ├── Relation_Definitions.v │ ├── Relation_Operators.v │ ├── Relations.v │ ├── intro.tex │ └── vo.itarget ├── Setoids │ ├── Setoid.v │ ├── intro.tex │ └── vo.itarget ├── Sets │ ├── Classical_sets.v │ ├── Constructive_sets.v │ ├── Cpo.v │ ├── Ensembles.v │ ├── Finite_sets.v │ ├── Finite_sets_facts.v │ ├── Image.v │ ├── Infinite_sets.v │ ├── Integers.v │ ├── Multiset.v │ ├── Partial_Order.v │ ├── Permut.v │ ├── Powerset.v │ ├── Powerset_Classical_facts.v │ ├── Powerset_facts.v │ ├── Relations_1.v │ ├── Relations_1_facts.v │ ├── Relations_2.v │ ├── Relations_2_facts.v │ ├── Relations_3.v │ ├── Relations_3_facts.v │ ├── Uniset.v │ ├── intro.tex │ └── vo.itarget ├── Sorting │ ├── Heap.v │ ├── Mergesort.v │ ├── PermutEq.v │ ├── PermutSetoid.v │ ├── Permutation.v │ ├── Sorted.v │ ├── Sorting.v │ ├── intro.tex │ └── vo.itarget ├── Strings │ ├── Ascii.v │ ├── String.v │ └── vo.itarget ├── Structures │ ├── DecidableType.v │ ├── DecidableTypeEx.v │ ├── Equalities.v │ ├── EqualitiesFacts.v │ ├── GenericMinMax.v │ ├── OrderedType.v │ ├── OrderedTypeAlt.v │ ├── OrderedTypeEx.v │ ├── Orders.v │ ├── OrdersAlt.v │ ├── OrdersEx.v │ ├── OrdersFacts.v │ ├── OrdersLists.v │ ├── OrdersTac.v │ └── vo.itarget ├── Unicode │ ├── Utf8.v │ ├── Utf8_core.v │ └── vo.itarget ├── Vectors │ ├── Fin.v │ ├── Vector.v │ ├── VectorDef.v │ ├── VectorSpec.v │ └── vo.itarget ├── Wellfounded │ ├── Disjoint_Union.v │ ├── Inclusion.v │ ├── Inverse_Image.v │ ├── Lexicographic_Exponentiation.v │ ├── Lexicographic_Product.v │ ├── Transitive_Closure.v │ ├── Union.v │ ├── Well_Ordering.v │ ├── Wellfounded.v │ ├── intro.tex │ └── vo.itarget ├── ZArith │ ├── BinInt.v │ ├── BinIntDef.v │ ├── Int.v │ ├── Wf_Z.v │ ├── ZArith.v │ ├── ZArith_base.v │ ├── ZArith_dec.v │ ├── Zabs.v │ ├── Zbool.v │ ├── Zcompare.v │ ├── Zcomplements.v │ ├── Zdigits.v │ ├── Zdiv.v │ ├── Zeuclid.v │ ├── Zeven.v │ ├── Zgcd_alt.v │ ├── Zhints.v │ ├── Zlogarithm.v │ ├── Zmax.v │ ├── Zmin.v │ ├── Zminmax.v │ ├── Zmisc.v │ ├── Znat.v │ ├── Znumtheory.v │ ├── Zorder.v │ ├── Zpow_alt.v │ ├── Zpow_def.v │ ├── Zpow_facts.v │ ├── Zpower.v │ ├── Zquot.v │ ├── Zsqrt_compat.v │ ├── Zwf.v │ ├── auxiliary.v │ ├── intro.tex │ └── vo.itarget └── theories.itarget ├── tools ├── README.coq-tex ├── README.emacs ├── beautify-archive ├── check-translate ├── compat5.ml ├── compat5.mlp ├── compat5b.ml ├── compat5b.mlp ├── coq-db.el ├── coq-font-lock.el ├── coq-inferior.el ├── coq-sl.sty ├── coq-syntax.el ├── coq.el ├── coq_makefile.ml ├── coq_tex.ml4 ├── coqdep.ml ├── coqdep_boot.ml ├── coqdep_common.ml ├── coqdep_common.mli ├── coqdep_lexer.mli ├── coqdep_lexer.mll ├── coqdoc │ ├── alpha.ml │ ├── alpha.mli │ ├── cdglobals.ml │ ├── coqdoc.css │ ├── coqdoc.sty │ ├── cpretty.mli │ ├── cpretty.mll │ ├── index.ml │ ├── index.mli │ ├── main.ml │ ├── output.ml │ ├── output.mli │ ├── style.css │ ├── tokens.ml │ └── tokens.mli ├── coqwc.mll ├── fake_ide.ml ├── gallina.ml ├── gallina_lexer.mll └── mkwinapp.ml └── toplevel ├── auto_ind_decl.ml ├── auto_ind_decl.mli ├── autoinstance.ml ├── autoinstance.mli ├── backtrack.ml ├── backtrack.mli ├── cerrors.ml ├── cerrors.mli ├── class.ml ├── class.mli ├── classes.ml ├── classes.mli ├── command.ml ├── command.mli ├── coqinit.ml ├── coqinit.mli ├── coqtop.ml ├── coqtop.mli ├── discharge.ml ├── discharge.mli ├── doc.tex ├── g_obligations.ml4 ├── himsg.ml ├── himsg.mli ├── ide_slave.ml ├── ide_slave.mli ├── ind_tables.ml ├── ind_tables.mli ├── indschemes.ml ├── indschemes.mli ├── lemmas.ml ├── lemmas.mli ├── libtypes.ml ├── libtypes.mli ├── metasyntax.ml ├── metasyntax.mli ├── mltop.ml4 ├── mltop.mli ├── obligations.ml ├── obligations.mli ├── record.ml ├── record.mli ├── search.ml ├── search.mli ├── toplevel.ml ├── toplevel.mli ├── toplevel.mllib ├── usage.ml ├── usage.mli ├── vernac.ml ├── vernac.mli ├── vernacentries.ml ├── vernacentries.mli ├── vernacexpr.ml ├── vernacinterp.ml ├── vernacinterp.mli ├── whelp.ml4 └── whelp.mli /.dir-locals.el: -------------------------------------------------------------------------------- 1 | ((tuareg-mode . ((eval . (setq default-directory (locate-dominating-file 2 | buffer-file-name 3 | ".dir-locals.el") 4 | tags-file-name (concat default-directory 5 | "TAGS") 6 | camldebug-command-name (concat 7 | default-directory "dev/ocamldebug-coq") 8 | ))))) 9 | -------------------------------------------------------------------------------- /COMPATIBILITY: -------------------------------------------------------------------------------- 1 | Potential sources of incompatibilities between Coq V8.3 and V8.4 2 | ---------------------------------------------------------------- 3 | 4 | (see also file CHANGES) 5 | 6 | TO BE DONE 7 | -------------------------------------------------------------------------------- /CREDITS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/CREDITS -------------------------------------------------------------------------------- /TODO: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/TODO -------------------------------------------------------------------------------- /checker/check.mllib: -------------------------------------------------------------------------------- 1 | Coq_config 2 | Pp_control 3 | Compat 4 | Flags 5 | Pp 6 | Segmenttree 7 | Unicodetable 8 | Errors 9 | Util 10 | Option 11 | Hashcons 12 | CUnix 13 | System 14 | Envars 15 | Predicate 16 | Rtree 17 | Names 18 | Univ 19 | Esubst 20 | Validate 21 | Term 22 | Declarations 23 | Environ 24 | Closure 25 | Reduction 26 | Type_errors 27 | Modops 28 | Inductive 29 | Typeops 30 | Indtypes 31 | Subtyping 32 | Mod_checking 33 | Safe_typing 34 | Check 35 | Check_stat 36 | Checker 37 | -------------------------------------------------------------------------------- /checker/main.ml: -------------------------------------------------------------------------------- 1 | 2 | let _ = Checker.start () 3 | -------------------------------------------------------------------------------- /checker/mod_checking.mli: -------------------------------------------------------------------------------- 1 | (************************************************************************) 2 | (* v * The Coq Proof Assistant / The Coq Development Team *) 3 | (* Names.module_path -> Declarations.module_body -> unit 10 | -------------------------------------------------------------------------------- /coq-win32.itarget: -------------------------------------------------------------------------------- 1 | binariesopt 2 | plugins/pluginsdyn.otarget 3 | -------------------------------------------------------------------------------- /coq.itarget: -------------------------------------------------------------------------------- 1 | # NB: for the moment we start with bytecode compilation 2 | # for early error detection in .ml 3 | binariesbyte 4 | plugins/pluginsbyte.otarget 5 | binariesopt 6 | plugins/pluginsopt.otarget 7 | theories/theories.otarget 8 | plugins/pluginsvo.otarget 9 | -------------------------------------------------------------------------------- /dev/TODO: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/dev/TODO -------------------------------------------------------------------------------- /dev/base_db: -------------------------------------------------------------------------------- 1 | load_printer "gramlib.cma" 2 | load_printer "top_printers.cmo" 3 | install_printer Top_printers.prid 4 | install_printer Top_printers.prsp 5 | install_printer Top_printers.print_pure_constr 6 | 7 | -------------------------------------------------------------------------------- /dev/doc/changes.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/dev/doc/changes.txt -------------------------------------------------------------------------------- /dev/doc/extensions.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/dev/doc/extensions.txt -------------------------------------------------------------------------------- /dev/doc/naming-conventions.tex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/dev/doc/naming-conventions.tex -------------------------------------------------------------------------------- /dev/doc/newsyntax.tex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/dev/doc/newsyntax.tex -------------------------------------------------------------------------------- /dev/doc/style.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/dev/doc/style.txt -------------------------------------------------------------------------------- /dev/doc/versions-history.tex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/dev/doc/versions-history.tex -------------------------------------------------------------------------------- /dev/header: -------------------------------------------------------------------------------- 1 | (************************************************************************) 2 | (* v * The Coq Proof Assistant / The Coq Development Team *) 3 | (* 2 | 3 | 4 | 5 | The Coq Proof Assistant Reference Manual 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /doc/rt/RefMan-cover.tex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/doc/rt/RefMan-cover.tex -------------------------------------------------------------------------------- /doc/rt/Tutorial-cover.tex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/doc/rt/Tutorial-cover.tex -------------------------------------------------------------------------------- /doc/stdlib/hidden-files: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /doc/stdlib/index-trailer.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /doc/stdlib/make-library-files: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/doc/stdlib/make-library-files -------------------------------------------------------------------------------- /doc/tools/show_latex_messages: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ "$1" = "-no-overfull" ]; then 4 | cat $2 | ../tools/latex_filter `cat $2 | wc -l` no 5 | else 6 | cat $1 | ../tools/latex_filter `cat $1 | wc -l` yes 7 | fi 8 | 9 | -------------------------------------------------------------------------------- /doc/tutorial/Tutorial.tex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/doc/tutorial/Tutorial.tex -------------------------------------------------------------------------------- /ide/coq.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/ide/coq.ico -------------------------------------------------------------------------------- /ide/coq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/ide/coq.png -------------------------------------------------------------------------------- /ide/coq2.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/ide/coq2.ico -------------------------------------------------------------------------------- /ide/coq_icon.rc: -------------------------------------------------------------------------------- 1 | large ICON ide/coq.ico 2 | -------------------------------------------------------------------------------- /ide/ide.mllib: -------------------------------------------------------------------------------- 1 | Minilib 2 | Okey 3 | Config_file 4 | Configwin_keys 5 | Configwin_types 6 | Configwin_messages 7 | Configwin_ihm 8 | Configwin 9 | Editable_cells 10 | Config_parser 11 | Tags 12 | Wg_Notebook 13 | Wg_Find 14 | Config_lexer 15 | Utf8_convert 16 | Preferences 17 | Project_file 18 | Ideutils 19 | Ideproof 20 | Coq_lex 21 | Gtk_parsing 22 | Undo 23 | Coq 24 | Coq_commands 25 | Wg_Command 26 | Coqide_ui 27 | Coqide 28 | -------------------------------------------------------------------------------- /ide/utils/config_file.ml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/ide/utils/config_file.ml -------------------------------------------------------------------------------- /install.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | dest="$1" 4 | shift 5 | 6 | for f; do 7 | bn=`basename $f` 8 | dn=`dirname $f` 9 | install -d "$dest/$dn" 10 | install -m 644 $f "$dest/$dn/$bn" 11 | done 12 | -------------------------------------------------------------------------------- /interp/doc.tex: -------------------------------------------------------------------------------- 1 | 2 | \newpage 3 | \section*{The interpretation of Coq front abstract syntax of terms} 4 | 5 | \ocwsection \label{interp} 6 | This chapter describes the translation from \Coq\ context-dependent 7 | front abstract syntax of terms (\verb=front=) to and from the 8 | context-free, untyped, globalized form of constructions (\verb=glob_constr=). 9 | 10 | The modules translating back and forth the front abstract syntax are 11 | organized as follows. 12 | 13 | \bigskip 14 | \begin{center}\epsfig{file=interp.dep.ps}\end{center} 15 | -------------------------------------------------------------------------------- /interp/interp.mllib: -------------------------------------------------------------------------------- 1 | Tok 2 | Lexer 3 | Topconstr 4 | Ppextend 5 | Notation 6 | Dumpglob 7 | Genarg 8 | Syntax_def 9 | Smartlocate 10 | Reserve 11 | Impargs 12 | Implicit_quantifiers 13 | Constrintern 14 | Modintern 15 | Constrextern 16 | Coqlib 17 | Discharge 18 | Declare 19 | -------------------------------------------------------------------------------- /kernel/byterun/coq_interp.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/kernel/byterun/coq_interp.c -------------------------------------------------------------------------------- /kernel/byterun/libcoqrun.clib: -------------------------------------------------------------------------------- 1 | coq_fix_code.o 2 | coq_memory.o 3 | coq_values.o 4 | coq_interp.o 5 | -------------------------------------------------------------------------------- /kernel/cbytegen.mli: -------------------------------------------------------------------------------- 1 | open Names 2 | open Cbytecodes 3 | open Cemitcodes 4 | open Term 5 | open Declarations 6 | open Pre_env 7 | 8 | 9 | val compile : env -> constr -> bytecodes * bytecodes * fv 10 | (** init, fun, fv *) 11 | 12 | val compile_constant_body : env -> constr_substituted constant_def -> body_code 13 | 14 | (** Shortcut of the previous function used during module strengthening *) 15 | 16 | val compile_alias : constant -> body_code 17 | -------------------------------------------------------------------------------- /kernel/doc.tex: -------------------------------------------------------------------------------- 1 | 2 | \newpage 3 | \section*{The Coq kernel} 4 | 5 | \ocwsection \label{kernel} 6 | This chapter describes the \Coq\ kernel, which is a type checker for the \CCI. 7 | The modules of the kernel are organized as follows. 8 | 9 | \bigskip 10 | \begin{center}\epsfig{file=kernel.dep.ps,width=\linewidth}\end{center} 11 | 12 | -------------------------------------------------------------------------------- /kernel/kernel.mllib: -------------------------------------------------------------------------------- 1 | Names 2 | Uint63 3 | Parray 4 | Native 5 | Univ 6 | Esubst 7 | Term 8 | Mod_subst 9 | Sign 10 | Cbytecodes 11 | Copcodes 12 | Cemitcodes 13 | Nativevalues 14 | Declarations 15 | Pre_env 16 | Clambda 17 | Cbytegen 18 | Nativelambda 19 | Nativecode 20 | Nativelib 21 | Environ 22 | Conv_oracle 23 | Closure 24 | Reduction 25 | Nativeconv 26 | Type_errors 27 | Entries 28 | Modops 29 | Inductive 30 | Typeops 31 | Indtypes 32 | Cooking 33 | Term_typing 34 | Subtyping 35 | Mod_typing 36 | Nativelibrary 37 | Safe_typing 38 | 39 | Vm 40 | Csymtable 41 | Vconv 42 | -------------------------------------------------------------------------------- /kernel/make-opcodes: -------------------------------------------------------------------------------- 1 | $1=="enum" {n=0; next; } 2 | {for (i = 1; i <= NF; i++) {printf("let op%s = %d\n", $i, n++);}} 3 | -------------------------------------------------------------------------------- /kernel/parray.mli: -------------------------------------------------------------------------------- 1 | val trunc_size : Uint63.t -> int 2 | type 'a t 3 | val length : 'a t -> Uint63.t 4 | val get : 'a t -> Uint63.t -> 'a 5 | val set : 'a t -> Uint63.t -> 'a -> 'a t 6 | val default : 'a t -> 'a 7 | val make : Uint63.t -> 'a -> 'a t 8 | val init : Uint63.t -> (int -> 'a) -> 'a -> 'a t 9 | val copy : 'a t -> 'a t 10 | val reroot : 'a t -> 'a t 11 | 12 | val map : ('a -> 'b) -> 'a t -> 'b t 13 | 14 | (* /!\ Unsafe function *) 15 | val of_array : 'a array -> 'a t 16 | 17 | -------------------------------------------------------------------------------- /kernel/term.ml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/kernel/term.ml -------------------------------------------------------------------------------- /lib/clib.mllib: -------------------------------------------------------------------------------- 1 | Coq_config 2 | Segmenttree 3 | Unicodetable 4 | Util 5 | Serialize 6 | Flags 7 | CUnix 8 | Envars 9 | -------------------------------------------------------------------------------- /lib/doc.tex: -------------------------------------------------------------------------------- 1 | 2 | \newpage 3 | \section*{Utility libraries} 4 | 5 | \ocwsection \label{lib} 6 | This chapter describes the various utility libraries used in the code 7 | of \Coq. 8 | -------------------------------------------------------------------------------- /lib/explore.ml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/lib/explore.ml -------------------------------------------------------------------------------- /lib/fmap.mli: -------------------------------------------------------------------------------- 1 | 2 | module Make : functor (X : Map.OrderedType) -> 3 | sig 4 | type key = X.t 5 | type 'a t 6 | 7 | val empty : 'a t 8 | val is_empty : 'a t -> bool 9 | val add : key -> 'a -> 'a t -> 'a t 10 | val find : key -> 'a t -> 'a 11 | val remove : key -> 'a t -> 'a t 12 | val mem : key -> 'a t -> bool 13 | val iter : (key -> 'a -> unit) -> 'a t -> unit 14 | val map : ('a -> 'b) -> 'a t -> 'b t 15 | val fold : (key -> 'a -> 'c -> 'c) -> 'a t -> 'c -> 'c 16 | 17 | (** Additions with respect to ocaml standard library. *) 18 | 19 | val dom : 'a t -> key list 20 | val rng : 'a t -> 'a list 21 | val to_list : 'a t -> (key * 'a) list 22 | end 23 | 24 | -------------------------------------------------------------------------------- /lib/gmap.ml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/lib/gmap.ml -------------------------------------------------------------------------------- /lib/lib.mllib: -------------------------------------------------------------------------------- 1 | Xml_lexer 2 | Xml_parser 3 | Xml_utils 4 | Pp_control 5 | Compat 6 | Pp 7 | Errors 8 | Bigint 9 | Hashcons 10 | Dyn 11 | System 12 | Gmap 13 | Fset 14 | Fmap 15 | Tries 16 | Gmapl 17 | Profile 18 | Explore 19 | Predicate 20 | Rtree 21 | Heap 22 | Option 23 | Dnet 24 | Store 25 | Unionfind 26 | Hashtbl_alt 27 | -------------------------------------------------------------------------------- /lib/pp.ml4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/lib/pp.ml4 -------------------------------------------------------------------------------- /library/doc.tex: -------------------------------------------------------------------------------- 1 | 2 | \newpage 3 | \section*{The Coq library} 4 | 5 | \ocwsection \label{library} 6 | This chapter describes the \Coq\ library, which is made of two parts: 7 | \begin{itemize} 8 | \item a general mechanism to keep a trace of all operations and of 9 | the state of the system, with backtrack capabilities; 10 | \item a global environment for the CCI, with functions to export and 11 | import compiled modules. 12 | \end{itemize} 13 | The modules of the library are organized as follows. 14 | 15 | \bigskip 16 | \begin{center}\epsfig{file=library.dep.ps}\end{center} 17 | -------------------------------------------------------------------------------- /library/library.mllib: -------------------------------------------------------------------------------- 1 | Nameops 2 | Libnames 3 | Libobject 4 | Summary 5 | Nametab 6 | Global 7 | Lib 8 | Declaremods 9 | Library 10 | States 11 | Decl_kinds 12 | Dischargedhypsmap 13 | Goptions 14 | Decls 15 | Heads 16 | Assumptions -------------------------------------------------------------------------------- /library/nametab.ml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/library/nametab.ml -------------------------------------------------------------------------------- /man/coq-parser.1: -------------------------------------------------------------------------------- 1 | .TH COQ 1 "April 25, 2001" 2 | 3 | .SH NAME 4 | coq\-parser \- Coq parser 5 | 6 | 7 | .SH SYNOPSIS 8 | .B coq\-parser 9 | [ 10 | .B options 11 | ] 12 | 13 | .SH DESCRIPTION 14 | 15 | .B parser 16 | is a program reading Coq proof developments and outputing them in the 17 | structured format given in the INRIA technical report RT154. This 18 | program is not for the casual user. 19 | 20 | .SH SEE ALSO 21 | 22 | .BR coq\-interface (1), 23 | .BR coqc (1), 24 | .BR coqtop (1), 25 | .BR coqdep (1). 26 | .br 27 | .I 28 | The Coq Reference Manual. 29 | .I 30 | The Coq web site: http://coq.inria.fr 31 | -------------------------------------------------------------------------------- /man/coq_makefile.1: -------------------------------------------------------------------------------- 1 | .TH COQ 1 "April 25, 2001" 2 | 3 | .SH NAME 4 | coq_makefile \- The Coq Proof Assistant makefile generator 5 | 6 | 7 | .SH SYNOPSIS 8 | .B coq_makefile 9 | [ 10 | .B arguments 11 | ] 12 | 13 | .SH DESCRIPTION 14 | 15 | .B coq_makefile 16 | is a makefile generator for Coq proof developments. 17 | 18 | .SH OPTIONS 19 | 20 | .TP 21 | .BI \-h 22 | Will give you a description of the whole list of options of coq_makefile. 23 | 24 | .SH SEE ALSO 25 | 26 | .BR coqtop (1), 27 | .BR coqtc (1), 28 | .BR coqdep (1). 29 | .br 30 | .I 31 | The Coq Reference Manual. 32 | .I 33 | The Coq web site: http://coq.inria.fr 34 | -------------------------------------------------------------------------------- /man/coqtop.byte.1: -------------------------------------------------------------------------------- 1 | .TH COQ 1 "April 25, 2001" 2 | 3 | .SH NAME 4 | coqtop.byte \- The bytecode Coq toplevel 5 | 6 | 7 | .SH SYNOPSIS 8 | .B coqtop.byte 9 | [ 10 | .B options 11 | ] 12 | [ 13 | .I file 14 | ] 15 | 16 | .SH DESCRIPTION 17 | 18 | .B coqopt.byte 19 | is the bytecode version of Coq. It should not be called directly, but 20 | only by 21 | .B coqtop 22 | and 23 | .B coqc 24 | 25 | .SH SEE ALSO 26 | 27 | .BR coqtop (1), 28 | .BR coqc (1). 29 | .br 30 | .I 31 | The Coq Reference Manual. 32 | .I 33 | The Coq web site: http://coq.inria.fr 34 | 35 | 36 | -------------------------------------------------------------------------------- /man/coqtop.opt.1: -------------------------------------------------------------------------------- 1 | .TH COQ 1 "April 25, 2001" 2 | 3 | .SH NAME 4 | coqtop.opt \- The native-code Coq toplevel 5 | 6 | 7 | .SH SYNOPSIS 8 | .B coqopt.opt 9 | [ 10 | .B options 11 | ] 12 | [ 13 | .I file 14 | ] 15 | 16 | .SH DESCRIPTION 17 | 18 | .B coqopt.opt 19 | is the native-code version of Coq. It should not be called directly, but 20 | only by 21 | .B coqtop 22 | and 23 | .B coqc 24 | 25 | .SH SEE ALSO 26 | 27 | .BR coqtop (1), 28 | .BR coqc (1). 29 | .br 30 | .I 31 | The Coq Reference Manual. 32 | .I 33 | The Coq web site: http://coq.inria.fr 34 | 35 | 36 | -------------------------------------------------------------------------------- /parsing/doc.tex: -------------------------------------------------------------------------------- 1 | 2 | \newpage 3 | \section*{The Coq parsers and printers} 4 | 5 | \ocwsection \label{parsing} 6 | This chapter describes the implementation of the \Coq\ parsers and printers. 7 | 8 | \bigskip 9 | \begin{center}\epsfig{file=parsing.dep.ps}\end{center} 10 | -------------------------------------------------------------------------------- /parsing/g_vernac.ml4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/parsing/g_vernac.ml4 -------------------------------------------------------------------------------- /parsing/highparsing.mllib: -------------------------------------------------------------------------------- 1 | G_constr 2 | G_vernac 3 | G_prim 4 | G_proofs 5 | G_tactic 6 | G_ltac 7 | -------------------------------------------------------------------------------- /parsing/parsing.mllib: -------------------------------------------------------------------------------- 1 | Extend 2 | Extrawit 3 | Pcoq 4 | Egrammar 5 | G_xml 6 | Ppconstr 7 | Printer 8 | Pptactic 9 | Tactic_printer 10 | Printmod 11 | Prettyp 12 | -------------------------------------------------------------------------------- /plugins/btauto/Btauto.v: -------------------------------------------------------------------------------- 1 | Require Import Algebra Reflect. 2 | 3 | Declare ML Module "btauto_plugin". 4 | -------------------------------------------------------------------------------- /plugins/btauto/btauto_plugin.mllib: -------------------------------------------------------------------------------- 1 | Refl_btauto 2 | G_btauto 3 | Btauto_plugin_mod 4 | -------------------------------------------------------------------------------- /plugins/btauto/vo.itarget: -------------------------------------------------------------------------------- 1 | Algebra.vo 2 | Reflect.vo 3 | Btauto.vo 4 | -------------------------------------------------------------------------------- /plugins/cc/README: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/plugins/cc/README -------------------------------------------------------------------------------- /plugins/cc/cc_plugin.mllib: -------------------------------------------------------------------------------- 1 | Ccalgo 2 | Ccproof 3 | Cctac 4 | G_congruence 5 | Cc_plugin_mod 6 | -------------------------------------------------------------------------------- /plugins/decl_mode/decl_mode_plugin.mllib: -------------------------------------------------------------------------------- 1 | Decl_mode 2 | Decl_interp 3 | Decl_proof_instr 4 | Ppdecl_proof 5 | G_decl_mode 6 | Decl_mode_plugin_mod 7 | -------------------------------------------------------------------------------- /plugins/decl_mode/ppdecl_proof.mli: -------------------------------------------------------------------------------- 1 | 2 | val pr_proof_instr : Environ.env -> Decl_expr.proof_instr -> Pp.std_ppcmds 3 | -------------------------------------------------------------------------------- /plugins/extraction/README: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/plugins/extraction/README -------------------------------------------------------------------------------- /plugins/extraction/extraction_plugin.mllib: -------------------------------------------------------------------------------- 1 | Table 2 | Mlutil 3 | Modutil 4 | Extraction 5 | Common 6 | Ocaml 7 | Haskell 8 | Scheme 9 | Extract_env 10 | G_extraction 11 | Extraction_plugin_mod 12 | -------------------------------------------------------------------------------- /plugins/extraction/haskell.mli: -------------------------------------------------------------------------------- 1 | (************************************************************************) 2 | (* v * The Coq Proof Assistant / The Coq Development Team *) 3 | (* (* The list of function name *) 12 | (Names.name*Glob_term.glob_constr*bool) list list -> (* The list of function args *) 13 | Topconstr.constr_expr list -> (* The list of function returned type *) 14 | Glob_term.glob_constr list -> (* the list of body *) 15 | unit 16 | 17 | -------------------------------------------------------------------------------- /plugins/funind/indfun.mli: -------------------------------------------------------------------------------- 1 | open Errors 2 | open Util 3 | open Names 4 | open Term 5 | open Pp 6 | open Indfun_common 7 | open Libnames 8 | open Glob_term 9 | open Declarations 10 | 11 | val do_generate_principle : 12 | bool -> 13 | (Vernacexpr.fixpoint_expr * Vernacexpr.decl_notation list) list -> 14 | unit 15 | 16 | 17 | val functional_induction : 18 | bool -> 19 | Term.constr -> 20 | (Term.constr * Term.constr Glob_term.bindings) option -> 21 | Genarg.intro_pattern_expr Pp.located option -> 22 | Proof_type.goal Tacmach.sigma -> Proof_type.goal list Evd.sigma 23 | 24 | 25 | val make_graph : Libnames.global_reference -> unit 26 | -------------------------------------------------------------------------------- /plugins/funind/merge.ml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/plugins/funind/merge.ml -------------------------------------------------------------------------------- /plugins/funind/recdef_plugin.mllib: -------------------------------------------------------------------------------- 1 | Indfun_common 2 | Glob_termops 3 | Recdef 4 | Glob_term_to_relation 5 | Functional_principles_proofs 6 | Functional_principles_types 7 | Invfun 8 | Indfun 9 | Merge 10 | G_indfun 11 | Recdef_plugin_mod 12 | -------------------------------------------------------------------------------- /plugins/funind/vo.itarget: -------------------------------------------------------------------------------- 1 | Recdef.vo 2 | -------------------------------------------------------------------------------- /plugins/micromega/micromega_plugin.mllib: -------------------------------------------------------------------------------- 1 | Sos_types 2 | Mutils 3 | Micromega 4 | Polynomial 5 | Mfourier 6 | Certificate 7 | Persistent_cache 8 | Coq_micromega 9 | G_micromega 10 | Micromega_plugin_mod 11 | -------------------------------------------------------------------------------- /plugins/micromega/sos.ml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/plugins/micromega/sos.ml -------------------------------------------------------------------------------- /plugins/micromega/sos_lib.ml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/plugins/micromega/sos_lib.ml -------------------------------------------------------------------------------- /plugins/micromega/vo.itarget: -------------------------------------------------------------------------------- 1 | CheckerMaker.vo 2 | EnvRing.vo 3 | Env.vo 4 | OrderedRing.vo 5 | Psatz.vo 6 | QMicromega.vo 7 | Refl.vo 8 | RingMicromega.vo 9 | RMicromega.vo 10 | Tauto.vo 11 | VarMap.vo 12 | ZCoeff.vo 13 | ZMicromega.vo 14 | -------------------------------------------------------------------------------- /plugins/nsatz/nsatz_plugin.mllib: -------------------------------------------------------------------------------- 1 | Utile 2 | Polynom 3 | Ideal 4 | Nsatz 5 | Nsatz_plugin_mod 6 | -------------------------------------------------------------------------------- /plugins/nsatz/polynom.ml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/plugins/nsatz/polynom.ml -------------------------------------------------------------------------------- /plugins/nsatz/vo.itarget: -------------------------------------------------------------------------------- 1 | Nsatz.vo 2 | -------------------------------------------------------------------------------- /plugins/omega/OmegaPlugin.v: -------------------------------------------------------------------------------- 1 | (************************************************************************) 2 | (* v * The Coq Proof Assistant / The Coq Development Team *) 3 | (* 0%Z. 9 | omega. 10 | Qed. 11 | 12 | Instance Zdi : (Integral_domain (Rcr:=Zcri)). 13 | constructor. 14 | exact Zmult_integral. exact Z_one_zero. Defined. 15 | -------------------------------------------------------------------------------- /plugins/setoid_ring/newring_plugin.mllib: -------------------------------------------------------------------------------- 1 | Newring 2 | Newring_plugin_mod 3 | -------------------------------------------------------------------------------- /plugins/setoid_ring/vo.itarget: -------------------------------------------------------------------------------- 1 | ArithRing.vo 2 | BinList.vo 3 | Field_tac.vo 4 | Field_theory.vo 5 | Field.vo 6 | InitialRing.vo 7 | NArithRing.vo 8 | RealField.vo 9 | Ring_base.vo 10 | Ring_equiv.vo 11 | Ring_polynom.vo 12 | Ring_tac.vo 13 | Ring_theory.vo 14 | Ring.vo 15 | ZArithRing.vo 16 | Algebra_syntax.vo 17 | Cring.vo 18 | Ncring.vo 19 | Ncring_polynom.vo 20 | Ncring_initial.vo 21 | Ncring_tac.vo 22 | Rings_Z.vo 23 | Rings_R.vo 24 | Rings_Q.vo 25 | Integral_domain.vo -------------------------------------------------------------------------------- /plugins/syntax/ascii_syntax_plugin.mllib: -------------------------------------------------------------------------------- 1 | Ascii_syntax 2 | Ascii_syntax_plugin_mod 3 | -------------------------------------------------------------------------------- /plugins/syntax/nat_syntax_plugin.mllib: -------------------------------------------------------------------------------- 1 | Nat_syntax 2 | Nat_syntax_plugin_mod 3 | -------------------------------------------------------------------------------- /plugins/syntax/numbers_syntax_plugin.mllib: -------------------------------------------------------------------------------- 1 | Numbers_syntax 2 | Numbers_syntax_plugin_mod 3 | -------------------------------------------------------------------------------- /plugins/syntax/r_syntax_plugin.mllib: -------------------------------------------------------------------------------- 1 | R_syntax 2 | R_syntax_plugin_mod 3 | -------------------------------------------------------------------------------- /plugins/syntax/string_syntax_plugin.mllib: -------------------------------------------------------------------------------- 1 | String_syntax 2 | String_syntax_plugin_mod 3 | -------------------------------------------------------------------------------- /plugins/syntax/z_syntax_plugin.mllib: -------------------------------------------------------------------------------- 1 | Z_syntax 2 | Z_syntax_plugin_mod 3 | -------------------------------------------------------------------------------- /plugins/xml/xml_plugin.mllib: -------------------------------------------------------------------------------- 1 | Unshare 2 | Xml 3 | Acic 4 | DoubleTypeInference 5 | Cic2acic 6 | Acic2Xml 7 | Proof2aproof 8 | Xmlcommand 9 | ProofTree2Xml 10 | Xmlentries 11 | Cic2Xml 12 | Dumptree 13 | Xml_plugin_mod 14 | -------------------------------------------------------------------------------- /pretyping/cbv.ml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/pretyping/cbv.ml -------------------------------------------------------------------------------- /pretyping/classops.ml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/pretyping/classops.ml -------------------------------------------------------------------------------- /pretyping/coercion.ml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/pretyping/coercion.ml -------------------------------------------------------------------------------- /pretyping/detyping.ml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/pretyping/detyping.ml -------------------------------------------------------------------------------- /pretyping/doc.tex: -------------------------------------------------------------------------------- 1 | 2 | \newpage 3 | \section*{Pre-typing} 4 | 5 | \ocwsection \label{pretyping} 6 | 7 | \bigskip 8 | \begin{center}\epsfig{file=pretyping.dep.ps,width=\linewidth}\end{center} 9 | 10 | 11 | %%% Local Variables: 12 | %%% mode: latex 13 | %%% TeX-master: t 14 | %%% End: 15 | -------------------------------------------------------------------------------- /pretyping/indrec.ml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/pretyping/indrec.ml -------------------------------------------------------------------------------- /pretyping/namegen.ml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/pretyping/namegen.ml -------------------------------------------------------------------------------- /pretyping/nativenorm.mli: -------------------------------------------------------------------------------- 1 | open Names 2 | open Term 3 | open Environ 4 | open Reduction 5 | 6 | val native_norm : env -> constr -> types -> constr 7 | (* val native_norm : reduction_function *) 8 | -------------------------------------------------------------------------------- /pretyping/pattern.ml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/pretyping/pattern.ml -------------------------------------------------------------------------------- /pretyping/pretyping.ml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/pretyping/pretyping.ml -------------------------------------------------------------------------------- /pretyping/pretyping.mllib: -------------------------------------------------------------------------------- 1 | Termops 2 | Evd 3 | Reductionops 4 | Vnorm 5 | Namegen 6 | Inductiveops 7 | Nativenorm 8 | Retyping 9 | Cbv 10 | Pretype_errors 11 | Evarutil 12 | Term_dnet 13 | Recordops 14 | Evarconv 15 | Arguments_renaming 16 | Typing 17 | Glob_term 18 | Pattern 19 | Matching 20 | Tacred 21 | Typeclasses_errors 22 | Typeclasses 23 | Classops 24 | Program 25 | Coercion 26 | Unification 27 | Detyping 28 | Indrec 29 | Cases 30 | Pretyping 31 | 32 | -------------------------------------------------------------------------------- /pretyping/recordops.ml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/pretyping/recordops.ml -------------------------------------------------------------------------------- /pretyping/retyping.ml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/pretyping/retyping.ml -------------------------------------------------------------------------------- /pretyping/termops.ml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/pretyping/termops.ml -------------------------------------------------------------------------------- /proofs/doc.tex: -------------------------------------------------------------------------------- 1 | 2 | \newpage 3 | \section*{The Proof Engine} 4 | 5 | \ocwsection \label{proofs} 6 | This chapter describes the \Coq\ proof engine, which is also called 7 | the ``refiner'', since it provides a way to build terms by successive 8 | refining steps. Those steps are either primitive rules or higher-level 9 | tactics. 10 | The modules of the proof engine are organized as follows. 11 | 12 | \bigskip 13 | \begin{center}\epsfig{file=proofs.dep.ps,width=\linewidth}\end{center} 14 | 15 | -------------------------------------------------------------------------------- /proofs/proofs.mllib: -------------------------------------------------------------------------------- 1 | Goal 2 | Evar_refiner 3 | Proofview 4 | Proof 5 | Proof_global 6 | Tacexpr 7 | Proof_type 8 | Redexpr 9 | Logic 10 | Refiner 11 | Tacmach 12 | Pfedit 13 | Tactic_debug 14 | Clenv 15 | Clenvtac 16 | -------------------------------------------------------------------------------- /scripts/coqc.ml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/scripts/coqc.ml -------------------------------------------------------------------------------- /states/MakeInitial.v: -------------------------------------------------------------------------------- 1 | (************************************************************************) 2 | (* v * The Coq Proof Assistant / The Coq Development Team *) 3 | (* constr -> tactic 9 | val lemInvIn_gen : quantified_hypothesis -> constr -> identifier list -> tactic 10 | 11 | val lemInv_clause : 12 | quantified_hypothesis -> constr -> identifier list -> tactic 13 | 14 | val inversion_lemma_from_goal : 15 | int -> identifier -> identifier located -> sorts -> bool -> 16 | (identifier -> tactic) -> unit 17 | val add_inversion_lemma_exn : 18 | identifier -> constr_expr -> glob_sort -> bool -> (identifier -> tactic) -> 19 | unit 20 | -------------------------------------------------------------------------------- /tactics/refine.ml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/tactics/refine.ml -------------------------------------------------------------------------------- /tactics/refine.mli: -------------------------------------------------------------------------------- 1 | (************************************************************************) 2 | (* v * The Coq Proof Assistant / The Coq Development Team *) 3 | (* tactic 12 | -------------------------------------------------------------------------------- /tactics/tactics.mllib: -------------------------------------------------------------------------------- 1 | Dn 2 | Termdn 3 | Btermdn 4 | Nbtermdn 5 | Tacticals 6 | Hipattern 7 | Ind_tables 8 | Eqschemes 9 | Elimschemes 10 | Tactics 11 | Hiddentac 12 | Elim 13 | Auto 14 | Equality 15 | Contradiction 16 | Inv 17 | Leminv 18 | Tacinterp 19 | Evar_tactics 20 | Autorewrite 21 | Tactic_option 22 | -------------------------------------------------------------------------------- /test-suite/arithmetic/add.v: -------------------------------------------------------------------------------- 1 | Require Import Int63. 2 | 3 | Set Implicit Arguments. 4 | 5 | Open Scope int63_scope. 6 | 7 | Check (eq_refl : 2 + 3 = 5). 8 | Check (eq_refl 5 <: 2 + 3 = 5). 9 | Check (eq_refl 5 <<: 2 + 3 = 5). 10 | Definition compute1 := Eval compute in 2 + 3. 11 | Check (eq_refl compute1 : 5 = 5). 12 | 13 | Check (eq_refl : 9223372036854775807 + 1 = 0). 14 | Check (eq_refl 0 <: 9223372036854775807 + 1 = 0). 15 | Check (eq_refl 0 <<: 9223372036854775807 + 1 = 0). 16 | Definition compute2 := Eval compute in 9223372036854775807 + 1. 17 | Check (eq_refl compute2 : 0 = 0). -------------------------------------------------------------------------------- /test-suite/arithmetic/addc.v: -------------------------------------------------------------------------------- 1 | Require Import Int63. 2 | 3 | Set Implicit Arguments. 4 | 5 | Open Scope int63_scope. 6 | 7 | Check (eq_refl : 2 +c 3 = C0 5). 8 | Check (eq_refl (C0 5) <: 2 +c 3 = C0 5). 9 | Check (eq_refl (C0 5) <<: 2 +c 3 = C0 5). 10 | Definition compute1 := Eval compute in 2 +c 3. 11 | Check (eq_refl compute1 : C0 5 = C0 5). 12 | 13 | Check (eq_refl : 9223372036854775807 +c 2 = C1 1). 14 | Check (eq_refl (C1 1) <: 9223372036854775807 +c 2 = C1 1). 15 | Check (eq_refl (C1 1) <<: 9223372036854775807 +c 2 = C1 1). 16 | Definition compute2 := Eval compute in 9223372036854775807 +c 2. 17 | Check (eq_refl compute2 : C1 1 = C1 1). -------------------------------------------------------------------------------- /test-suite/arithmetic/addmuldiv.v: -------------------------------------------------------------------------------- 1 | Require Import Int63. 2 | 3 | Set Implicit Arguments. 4 | 5 | Open Scope int63_scope. 6 | 7 | Check (eq_refl : addmuldiv 32 3 5629499534213120 = 12887523328). 8 | Check (eq_refl 12887523328 <: addmuldiv 32 3 5629499534213120 = 12887523328). 9 | Check (eq_refl 12887523328 <<: addmuldiv 32 3 5629499534213120 = 12887523328). 10 | 11 | Definition compute2 := Eval compute in addmuldiv 32 3 5629499534213120. 12 | Check (eq_refl compute2 : 12887523328 = 12887523328). -------------------------------------------------------------------------------- /test-suite/arithmetic/div.v: -------------------------------------------------------------------------------- 1 | Require Import Int63. 2 | 3 | Set Implicit Arguments. 4 | 5 | Open Scope int63_scope. 6 | 7 | Check (eq_refl : 6 / 3 = 2). 8 | Check (eq_refl 2 <: 6 / 3 = 2). 9 | Check (eq_refl 2 <<: 6 / 3 = 2). 10 | Definition compute1 := Eval compute in 6 / 3. 11 | Check (eq_refl compute1 : 2 = 2). 12 | 13 | Check (eq_refl : 3 / 2 = 1). 14 | Check (eq_refl 1 <: 3 / 2 = 1). 15 | Check (eq_refl 1 <<: 3 / 2 = 1). 16 | Definition compute2 := Eval compute in 3 / 2. 17 | Check (eq_refl compute2 : 1 = 1). -------------------------------------------------------------------------------- /test-suite/arithmetic/diveucl.v: -------------------------------------------------------------------------------- 1 | Require Import Int63. 2 | 3 | Set Implicit Arguments. 4 | 5 | Open Scope int63_scope. 6 | 7 | Check (eq_refl : diveucl 6 3 = (2,0)). 8 | Check (eq_refl (2,0) <: diveucl 6 3 = (2,0)). 9 | Check (eq_refl (2,0) <<: diveucl 6 3 = (2,0)). 10 | Definition compute1 := Eval compute in diveucl 6 3. 11 | Check (eq_refl compute1 : (2,0) = (2,0)). 12 | 13 | Check (eq_refl : diveucl 5 3 = (1,2)). 14 | Check (eq_refl (1,2) <: diveucl 5 3 = (1,2)). 15 | Check (eq_refl (1,2) <<: diveucl 5 3 = (1,2)). 16 | Definition compute2 := Eval compute in diveucl 5 3. 17 | Check (eq_refl compute2 : (1,2) = (1,2)). -------------------------------------------------------------------------------- /test-suite/arithmetic/eqb.v: -------------------------------------------------------------------------------- 1 | Require Import Int63. 2 | 3 | Set Implicit Arguments. 4 | 5 | Open Scope int63_scope. 6 | 7 | Check (eq_refl : 1 == 1 = true). 8 | Check (eq_refl true <: 1 == 1 = true). 9 | Check (eq_refl true <<: 1 == 1 = true). 10 | Definition compute1 := Eval compute in 1 == 1. 11 | Check (eq_refl compute1 : true = true). 12 | 13 | Check (eq_refl : 9223372036854775807 == 0 = false). 14 | Check (eq_refl false <: 9223372036854775807 == 0 = false). 15 | Check (eq_refl false <<: 9223372036854775807 == 0 = false). 16 | Definition compute2 := Eval compute in 9223372036854775807 == 0. 17 | Check (eq_refl compute2 : false = false). -------------------------------------------------------------------------------- /test-suite/arithmetic/eqb_correct.v: -------------------------------------------------------------------------------- 1 | Require Import Int63. 2 | 3 | Set Implicit Arguments. 4 | 5 | Open Scope int63_scope. 6 | 7 | Check (eq_refl : eqb_correct 1 1 eq_refl = eq_refl). 8 | Check (eq_refl (eq_refl 1) <: eqb_correct 1 1 eq_refl = eq_refl). 9 | Check (eq_refl (eq_refl 1) <<: eqb_correct 1 1 eq_refl = eq_refl). 10 | Definition compute1 := Eval compute in eqb_correct 1 1 eq_refl. 11 | Check (eq_refl compute1 : eq_refl = eq_refl). -------------------------------------------------------------------------------- /test-suite/arithmetic/mod.v: -------------------------------------------------------------------------------- 1 | Require Import Int63. 2 | 3 | Set Implicit Arguments. 4 | 5 | Open Scope int63_scope. 6 | 7 | Check (eq_refl : 6 \% 3 = 0). 8 | Check (eq_refl 0 <: 6 \% 3 = 0). 9 | Check (eq_refl 0 <<: 6 \% 3 = 0). 10 | Definition compute1 := Eval compute in 6 \% 3. 11 | Check (eq_refl compute1 : 0 = 0). 12 | 13 | Check (eq_refl : 5 \% 3 = 2). 14 | Check (eq_refl 2 <: 5 \% 3 = 2). 15 | Check (eq_refl 2 <<: 5 \% 3 = 2). 16 | Definition compute2 := Eval compute in 5 \% 3. 17 | Check (eq_refl compute2 : 2 = 2). -------------------------------------------------------------------------------- /test-suite/arithmetic/sub.v: -------------------------------------------------------------------------------- 1 | Require Import Int63. 2 | 3 | Set Implicit Arguments. 4 | 5 | Open Scope int63_scope. 6 | 7 | Check (eq_refl : 3 - 2 = 1). 8 | Check (eq_refl 1 <: 3 - 2 = 1). 9 | Check (eq_refl 1 <<: 3 - 2 = 1). 10 | Definition compute1 := Eval compute in 3 - 2. 11 | Check (eq_refl compute1 : 1 = 1). 12 | 13 | Check (eq_refl : 0 - 1 = 9223372036854775807). 14 | Check (eq_refl 9223372036854775807 <: 0 - 1 = 9223372036854775807). 15 | Check (eq_refl 9223372036854775807 <<: 0 - 1 = 9223372036854775807). 16 | Definition compute2 := Eval compute in 0 - 1. 17 | Check (eq_refl compute2 : 9223372036854775807 = 9223372036854775807). -------------------------------------------------------------------------------- /test-suite/bugs/closed/1519.v: -------------------------------------------------------------------------------- 1 | Section S. 2 | 3 | Variable A:Prop. 4 | Variable W:A. 5 | 6 | Remark T: A -> A. 7 | intro Z. 8 | rename W into Z_. 9 | rename Z into W. 10 | rename Z_ into Z. 11 | exact Z. 12 | Qed. 13 | 14 | (* bug : 15 | Error: 16 | Unbound reference: In environment 17 | A : Prop 18 | W : A 19 | Z : A 20 | The reference 2 is free 21 | *) 22 | 23 | End S. 24 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/1780.v: -------------------------------------------------------------------------------- 1 | 2 | Definition bug := Eval vm_compute in eq_rect. 3 | (* bug: 4 | Error: Illegal application (Type Error): 5 | The term "eq" of type "forall A : Type, A -> A -> Prop" 6 | cannot be applied to the terms 7 | "x" : "A" 8 | "P" : "A -> Type" 9 | "x0" : "A" 10 | The 1st term has type "A" which should be coercible to 11 | "Type". 12 | *) 13 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/1787.v: -------------------------------------------------------------------------------- 1 | Parameter P : nat -> nat -> Prop. 2 | Parameter Q : nat -> nat -> Prop. 3 | Axiom A : forall x x' x'', P x x' -> Q x'' x' -> P x x''. 4 | 5 | Goal (P 1 3) -> (Q 1 3) -> (P 1 1). 6 | intros H H'. 7 | refine ((fun H1 : P 1 _ => let H2 := (_:Q 1 _) in A _ _ _ H1 H2) _). 8 | clear. 9 | Admitted. 10 | 11 | 12 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/2105.v: -------------------------------------------------------------------------------- 1 | 2 | Definition id (T:Type) := Eval vm_compute in T. 3 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/2319.v: -------------------------------------------------------------------------------- 1 | Section S. 2 | 3 | CoInductive A (X: Type) := mkA: A X -> A X. 4 | Variable T : Type. 5 | 6 | (* This used to loop (bug #2319) *) 7 | Timeout 5 Eval vm_compute in cofix s : A T := mkA T s. 8 | 9 | CoFixpoint s : A T := mkA T s 10 | with t : A unit := mkA unit (mkA unit t). 11 | Timeout 5 Eval vm_compute in s. 12 | 13 | End S. -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldfail/1703.v: -------------------------------------------------------------------------------- 1 | (* Check correct binding of intros until used in Ltac *) 2 | 3 | Ltac intros_until n := intros until n. 4 | 5 | Goal forall i j m n : nat, i = 0 /\ j = 0 /\ m = 0 /\ n = 0. 6 | intro i. 7 | intros until i. 8 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldfail/1898.v: -------------------------------------------------------------------------------- 1 | (* folding should not allow circular dependencies *) 2 | 3 | Lemma bug_fold_unfold : True. 4 | set (h := 1). 5 | fold h in h. 6 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldfail/1915.v: -------------------------------------------------------------------------------- 1 | 2 | Require Import Setoid. 3 | 4 | Goal forall x, impl True (x = 0) -> x = 0 -> False. 5 | intros x H E. 6 | rewrite H in E. -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldfail/2251.v: -------------------------------------------------------------------------------- 1 | (* Check that rewrite does not apply to single evars *) 2 | 3 | Lemma evar_rewrite : (forall a : nat, a = 0 -> True) -> True. 4 | intros; eapply H. (* goal is ?30 = nil *) 5 | rewrite plus_n_Sm. 6 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldfail/2406.v: -------------------------------------------------------------------------------- 1 | (* Check correct handling of unsupported notations *) 2 | Notation "'’'" := (fun x => x) (at level 20). 3 | Definition crash_the_rooster f := ’. 4 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldfail/2586.v: -------------------------------------------------------------------------------- 1 | Require Import Setoid SetoidClass Program. 2 | 3 | Goal forall `(Setoid nat) x y, x == y -> S x == S y. 4 | intros. 5 | clsubst H0. -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/1041.v: -------------------------------------------------------------------------------- 1 | Goal Prop. 2 | 3 | pose (P:=(fun x y :Prop => y)). 4 | evar (Q: (forall X Y,P X Y -> Prop)) . 5 | 6 | instantiate (1:= fun _ => _ ) in (Value of Q). 7 | instantiate (1:= fun _ => _ ) in (Value of Q). 8 | instantiate (1:= fun _ => _ ) in (Value of Q). 9 | 10 | instantiate (1:=H) in (Value of Q). 11 | 12 | Admitted. 13 | 14 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/1100.v: -------------------------------------------------------------------------------- 1 | Require Import Setoid. 2 | 3 | Parameter P : nat -> Prop. 4 | Parameter Q : nat -> Prop. 5 | Parameter PQ : forall n, P n <-> Q n. 6 | 7 | Lemma PQ2 : forall n, P n -> Q n. 8 | intros. 9 | rewrite PQ in H. 10 | trivial. 11 | Qed. 12 | 13 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/121.v: -------------------------------------------------------------------------------- 1 | Require Import Setoid. 2 | 3 | Section Setoid_Bug. 4 | 5 | Variable X:Type -> Type. 6 | Variable Xeq : forall A, (X A) -> (X A) -> Prop. 7 | Hypothesis Xst : forall A, Equivalence (Xeq A). 8 | 9 | Variable map : forall A B, (A -> B) -> X A -> X B. 10 | 11 | Implicit Arguments map [A B]. 12 | 13 | Goal forall A B (a b:X (B -> A)) (c:X A) (f:A -> B -> A), Xeq _ a b -> Xeq _ b (map f c) -> Xeq _ a (map f c). 14 | intros A B a b c f Hab Hbc. 15 | rewrite Hab. 16 | assumption. 17 | Qed. 18 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/1243.v: -------------------------------------------------------------------------------- 1 | Require Import ZArith. 2 | Require Import Arith. 3 | Open Scope Z_scope. 4 | 5 | Theorem r_ex : (forall x y:nat, x + y = x + y)%nat. 6 | Admitted. 7 | 8 | Theorem r_ex' : forall x y:nat, (x + y = x + y)%nat. 9 | Admitted. 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/1302.v: -------------------------------------------------------------------------------- 1 | Module Type T. 2 | 3 | Parameter A : Type. 4 | 5 | Inductive L : Type := 6 | | L0 : L (* without this constructor, it works right *) 7 | | L1 : A -> L. 8 | 9 | End T. 10 | 11 | Axiom Tp : Type. 12 | 13 | Module TT : T. 14 | 15 | Definition A : Type := Tp. 16 | 17 | Inductive L : Type := 18 | | L0 : L 19 | | L1 : A -> L. 20 | 21 | End TT. 22 | 23 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/1419.v: -------------------------------------------------------------------------------- 1 | Goal True. 2 | set(a := 0). 3 | set(b := a). 4 | unfold a in b. 5 | clear a. 6 | Eval vm_compute in b. 7 | trivial. 8 | Qed. 9 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/1425.v: -------------------------------------------------------------------------------- 1 | Require Import Setoid. 2 | 3 | Parameter recursion : forall A : Set, A -> (nat -> A -> A) -> nat -> A. 4 | 5 | Axiom recursion_S : 6 | forall (A : Set) (EA : relation A) (a : A) (f : nat -> A -> A) (n : nat), 7 | EA (recursion A a f (S n)) (f n (recursion A a f n)). 8 | 9 | Goal forall n : nat, recursion nat 0 (fun _ _ => 1) (S n) = 1. 10 | intro n. 11 | rewrite recursion_S. 12 | reflexivity. 13 | Qed. 14 | 15 | Goal forall n : nat, recursion nat 0 (fun _ _ => 1) (S n) = 1. 16 | intro n. 17 | setoid_rewrite recursion_S. 18 | reflexivity. 19 | Qed. -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/1446.v: -------------------------------------------------------------------------------- 1 | Lemma not_true_eq_false : forall (b:bool), b <> true -> b = false. 2 | Proof. 3 | destruct b;intros;trivial. 4 | elim H. 5 | exact (refl_equal true). 6 | Qed. 7 | 8 | Section BUG. 9 | 10 | Variable b : bool. 11 | Hypothesis H : b <> true. 12 | Hypothesis H0 : b = true. 13 | Hypothesis H1 : b <> true. 14 | 15 | Goal False. 16 | rewrite (not_true_eq_false _ H) in * |-. 17 | contradiction. 18 | Qed. 19 | 20 | End BUG. 21 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/1477.v: -------------------------------------------------------------------------------- 1 | Inductive I : Set := 2 | | A : nat -> nat -> I 3 | | B : nat -> nat -> I. 4 | 5 | Definition foo1 (x:I) : nat := 6 | match x with 7 | | A a b | B a b => S b 8 | end. 9 | 10 | Definition foo2 (x:I) : nat := 11 | match x with 12 | | A _ b | B b _ => S b 13 | end. 14 | 15 | Definition foo (x:I) : nat := 16 | match x with 17 | | A a b | B b a => S b 18 | end. 19 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/1483.v: -------------------------------------------------------------------------------- 1 | Require Import BinPos. 2 | 3 | Definition P := (fun x : positive => x = xH). 4 | 5 | Goal forall (p q : positive), P q -> q = p -> P p. 6 | intros; congruence. 7 | Qed. 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/1519.v: -------------------------------------------------------------------------------- 1 | Section S. 2 | 3 | Variable A:Prop. 4 | Variable W:A. 5 | 6 | Remark T: A -> A. 7 | intro Z. 8 | rename W into Z_. 9 | rename Z into W. 10 | rename Z_ into Z. 11 | exact Z. 12 | Qed. 13 | 14 | End S. 15 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/1568.v: -------------------------------------------------------------------------------- 1 | CoInductive A: Set := 2 | mk_A: B -> A 3 | with B: Set := 4 | mk_B: A -> B. 5 | 6 | CoFixpoint a:A := mk_A b 7 | with b:B := mk_B a. 8 | 9 | Goal b = match a with mk_A a1 => a1 end. 10 | simpl. reflexivity. 11 | Qed. 12 | 13 | 14 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/1582.v: -------------------------------------------------------------------------------- 1 | Require Import Peano_dec. 2 | 3 | Definition fact_F : 4 | forall (n:nat), 5 | (forall m, m nat) -> 6 | nat. 7 | refine 8 | (fun n fact_rec => 9 | if eq_nat_dec n 0 then 10 | 1 11 | else 12 | let fn := fact_rec (n-1) _ in 13 | n * fn). 14 | Admitted. 15 | 16 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/1604.v: -------------------------------------------------------------------------------- 1 | Require Import Setoid. 2 | 3 | Parameter F : nat -> nat. 4 | Axiom F_id : forall n : nat, n = F n. 5 | Goal forall n : nat, F n = n. 6 | intro n. setoid_rewrite F_id at 3. reflexivity. 7 | Qed. 8 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/1614.v: -------------------------------------------------------------------------------- 1 | Require Import Ring. 2 | Require Import ArithRing. 3 | 4 | Fixpoint eq_nat_bool (x y : nat) {struct x} : bool := 5 | match x, y with 6 | | 0, 0 => true 7 | | S x', S y' => eq_nat_bool x' y' 8 | | _, _ => false 9 | end. 10 | 11 | Theorem eq_nat_bool_implies_eq : forall x y, eq_nat_bool x y = true -> x = y. 12 | Proof. 13 | induction x; destruct y; simpl; intro H; try (reflexivity || inversion H). 14 | apply IHx in H; rewrite H; reflexivity. 15 | Qed. 16 | 17 | Add Ring MyNatSRing : natSRth (decidable eq_nat_bool_implies_eq). 18 | 19 | Goal 0 = 0. 20 | ring. 21 | Qed. 22 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/1618.v: -------------------------------------------------------------------------------- 1 | Inductive A: Set := 2 | | A1: nat -> A. 3 | 4 | Definition A_size (a: A) : nat := 5 | match a with 6 | | A1 n => 0 7 | end. 8 | 9 | Require Import Recdef. 10 | 11 | Function n3 (P: A -> Prop) (f: forall n, P (A1 n)) (a: A) {struct a} : P a := 12 | match a return (P a) with 13 | | A1 n => f n 14 | end. 15 | 16 | 17 | Function n1 (P: A -> Prop) (f: forall n, P (A1 n)) (a: A) {measure A_size a} : 18 | P 19 | a := 20 | match a return (P a) with 21 | | A1 n => f n 22 | end. 23 | 24 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/1643.v: -------------------------------------------------------------------------------- 1 | (* Check some aspects of that the algorithm used to possibly reuse a 2 | global name in the recursive calls (coinductive case) *) 3 | 4 | CoInductive Str : Set := Cons (h:nat) (t:Str). 5 | 6 | Definition decomp_func (s:Str) := 7 | match s with 8 | | Cons h t => Cons h t 9 | end. 10 | 11 | Theorem decomp s: s = decomp_func s. 12 | Proof. 13 | case s; simpl; reflexivity. 14 | Qed. 15 | 16 | Definition zeros := (cofix z : Str := Cons 0 z). 17 | Lemma zeros_rw : zeros = Cons 0 zeros. 18 | rewrite (decomp zeros). 19 | simpl. 20 | Admitted. 21 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/1680.v: -------------------------------------------------------------------------------- 1 | Ltac int1 := let h := fresh in intro h. 2 | 3 | Goal nat -> nat -> True. 4 | let h' := fresh in (let h := fresh in intro h); intro h'. 5 | Restart. let h' := fresh in int1; intro h'. 6 | trivial. 7 | Qed. 8 | 9 | 10 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/1696.v: -------------------------------------------------------------------------------- 1 | Require Import Setoid. 2 | 3 | Inductive mynat := z : mynat | s : mynat -> mynat. 4 | 5 | Parameter E : mynat -> mynat -> Prop. 6 | Axiom E_equiv : equiv mynat E. 7 | 8 | Add Relation mynat E 9 | reflexivity proved by (proj1 E_equiv) 10 | symmetry proved by (proj2 (proj2 E_equiv)) 11 | transitivity proved by (proj1 (proj2 E_equiv)) 12 | as E_rel. 13 | 14 | Notation "x == y" := (E x y) (at level 70). 15 | 16 | Goal z == s z -> s z == z. intros H. setoid_rewrite H at 2. reflexivity. Qed. 17 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/1704.v: -------------------------------------------------------------------------------- 1 | 2 | Require Import Setoid. 3 | Parameter E : nat -> nat -> Prop. 4 | Axiom E_equiv : equiv nat E. 5 | Add Relation nat E 6 | reflexivity proved by (proj1 E_equiv) 7 | symmetry proved by (proj2 (proj2 E_equiv)) 8 | transitivity proved by (proj1 (proj2 E_equiv)) 9 | as E_rel. 10 | Notation "x == y" := (E x y) (at level 70, no associativity). 11 | Axiom r : False -> 0 == 1. 12 | Goal 0 == 0. 13 | Proof. 14 | rewrite r. 15 | reflexivity. 16 | admit. 17 | Qed. 18 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/1718.v: -------------------------------------------------------------------------------- 1 | (* lazy delta unfolding used to miss delta on rels and vars (fixed in 10172) *) 2 | 3 | Check 4 | let g := fun _ => 0 in 5 | fix f (n : nat) := 6 | match n with 7 | | 0 => g f 8 | | S n' => 0 9 | end. 10 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/1740.v: -------------------------------------------------------------------------------- 1 | (* Check that expansion of alias in pattern-matching compilation is no 2 | longer dependent of whether the pattern-matching problem occurs in a 3 | typed context or at toplevel (solved from revision 10883) *) 4 | 5 | Definition f := 6 | fun n m : nat => 7 | match n, m with 8 | | O, _ => O 9 | | n, O => n 10 | | _, _ => O 11 | end. 12 | 13 | Goal f = 14 | fun n m : nat => 15 | match n, m with 16 | | O, _ => O 17 | | n, O => n 18 | | _, _ => O 19 | end. 20 | unfold f. 21 | reflexivity. 22 | Qed. 23 | 24 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/1773.v: -------------------------------------------------------------------------------- 1 | (* An occur-check test was done too early *) 2 | 3 | Goal forall B C : nat -> nat -> Prop, forall k, 4 | (exists A, (forall k', C A k' -> B A k') -> B A k). 5 | Proof. 6 | intros B C k. 7 | econstructor. 8 | intros X. 9 | apply X. (* used to fail here *) 10 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/1774.v: -------------------------------------------------------------------------------- 1 | Axiom pl : (nat -> Prop) -> (nat -> Prop) -> (nat -> Prop). 2 | Axiom plImp : forall k P Q, 3 | pl P Q k -> forall (P':nat -> Prop), 4 | (forall k', P k' -> P' k') -> forall (Q':nat -> Prop), 5 | (forall k', Q k' -> Q' k') -> 6 | pl P' Q' k. 7 | 8 | Definition nexists (P:nat -> nat -> Prop) : nat -> Prop := 9 | fun k' => exists k, P k k'. 10 | 11 | Goal forall k (A:nat -> nat -> Prop) (B:nat -> Prop), 12 | pl (nexists A) B k. 13 | intros. 14 | eapply plImp. 15 | 2:intros m' M'; econstructor; apply M'. 16 | 2:intros m' M'; apply M'. 17 | simpl. 18 | Admitted. 19 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/1865.v: -------------------------------------------------------------------------------- 1 | (* Check that tactics (here dependent inversion) do not generate 2 | conversion problems T <= U with sup's of universes in U *) 3 | 4 | (* Submitted by David Nowak *) 5 | 6 | Inductive list (A:Set) : nat -> Set := 7 | | nil : list A O 8 | | cons : forall n, A -> list A n -> list A (S n). 9 | 10 | Definition f (n:nat) : Type := 11 | match n with 12 | | O => bool 13 | | _ => unit 14 | end. 15 | 16 | Goal forall A n, list A n -> f n. 17 | intros A n. 18 | dependent inversion n. 19 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/1891.v: -------------------------------------------------------------------------------- 1 | (* Check evar-evar unification *) 2 | Inductive T (A: Set): Set := mkT: unit -> T A. 3 | 4 | Definition f (A: Set) (l: T A): unit := tt. 5 | 6 | Implicit Arguments f [A]. 7 | 8 | Lemma L (x: T unit): (unit -> T unit) -> unit. 9 | Proof. 10 | refine (match x return _ with mkT n => fun g => f (g _) end). 11 | trivial. 12 | Qed. 13 | 14 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/1900.v: -------------------------------------------------------------------------------- 1 | Parameter A : Type . 2 | 3 | Definition eq_A := @eq A. 4 | 5 | Goal forall x, eq_A x x. 6 | intros. 7 | reflexivity. 8 | Qed. -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/1901.v: -------------------------------------------------------------------------------- 1 | Require Import Relations. 2 | 3 | Record Poset{A:Type}(Le : relation A) : Type := 4 | Build_Poset 5 | { 6 | Le_refl : forall x : A, Le x x; 7 | Le_trans : forall x y z : A, Le x y -> Le y z -> Le x z; 8 | Le_antisym : forall x y : A, Le x y -> Le y x -> x = y }. 9 | 10 | Definition nat_Poset : Poset Peano.le. 11 | Admitted. -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/1905.v: -------------------------------------------------------------------------------- 1 | 2 | Require Import Setoid Program. 3 | 4 | Axiom t : Set. 5 | Axiom In : nat -> t -> Prop. 6 | Axiom InE : forall (x : nat) (s:t), impl (In x s) True. 7 | 8 | Goal forall a s, 9 | In a s -> False. 10 | Proof. 11 | intros a s Ia. 12 | rewrite InE in Ia. 13 | Admitted. -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/1907.v: -------------------------------------------------------------------------------- 1 | (* An example of type inference *) 2 | 3 | Axiom A : Type. 4 | Definition f (x y : A) := x. 5 | Axiom g : forall x y : A, f x y = y -> Prop. 6 | Axiom x : A. 7 | Check (g x _ (refl_equal x)). 8 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/1912.v: -------------------------------------------------------------------------------- 1 | Require Import ZArith. 2 | 3 | Goal forall x, Z.succ (Z.pred x) = x. 4 | intros x. 5 | omega. 6 | Qed. 7 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/1935.v: -------------------------------------------------------------------------------- 1 | Definition f (n:nat) := n = n. 2 | 3 | Lemma f_refl : forall n , f n. 4 | intros. reflexivity. 5 | Qed. 6 | 7 | Definition f' (x:nat) (n:nat) := n = n. 8 | 9 | Lemma f_refl' : forall n , f' n n. 10 | Proof. 11 | intros. reflexivity. 12 | Qed. 13 | 14 | Require Import ZArith. 15 | 16 | Definition f'' (a:bool) := if a then eq (A:= Z) else Zlt. 17 | 18 | Lemma f_refl'' : forall n , f'' true n n. 19 | Proof. 20 | intro. reflexivity. 21 | Qed. 22 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/1939.v: -------------------------------------------------------------------------------- 1 | Require Import Setoid Program.Basics. 2 | 3 | Parameter P : nat -> Prop. 4 | Parameter R : nat -> nat -> Prop. 5 | 6 | Add Parametric Morphism : P 7 | with signature R ++> impl as PM1. 8 | Admitted. 9 | 10 | Add Parametric Morphism : P 11 | with signature R --> impl as PM2. 12 | Admitted. 13 | 14 | Goal forall x y, R x y -> P y -> P x. 15 | Proof. 16 | intros x y H1 H2. 17 | rewrite H1. 18 | auto. 19 | Qed. -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/1944.v: -------------------------------------------------------------------------------- 1 | (* Test some uses of ? in introduction patterns *) 2 | 3 | Inductive J : nat -> Prop := 4 | | K : forall p, J p -> (True /\ True) -> J (S p). 5 | 6 | Lemma bug : forall n, J n -> J (S n). 7 | Proof. 8 | intros ? H. 9 | induction H as [? ? [? ?]]. 10 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/1977.v: -------------------------------------------------------------------------------- 1 | Inductive T {A} : Prop := c : A -> T. 2 | Goal (@T nat). 3 | apply c. exact 0. 4 | Qed. 5 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/1981.v: -------------------------------------------------------------------------------- 1 | Implicit Arguments ex_intro [A]. 2 | 3 | Goal exists n : nat, True. 4 | eapply ex_intro. exact 0. exact I. 5 | Qed. 6 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/2001.v: -------------------------------------------------------------------------------- 1 | (* Automatic computing of guard in "Theorem with"; check that guard is not 2 | computed when the user explicitly indicated it *) 3 | 4 | Unset Automatic Introduction. 5 | 6 | Inductive T : Set := 7 | | v : T. 8 | 9 | Definition f (s:nat) (t:T) : nat. 10 | fix 2. 11 | intros s t. 12 | refine 13 | match t with 14 | | v => s 15 | end. 16 | Defined. 17 | 18 | Lemma test : 19 | forall s, f s v = s. 20 | Proof. 21 | reflexivity. 22 | Qed. 23 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/2017.v: -------------------------------------------------------------------------------- 1 | (* Some check of Miller's pattern inference - used to fail in 8.2 due 2 | first to the presence of aliases, secondly due to the absence of 3 | restriction of the potential interesting variables to the subset of 4 | variables effectively occurring in the term to instantiate *) 5 | 6 | Set Implicit Arguments. 7 | 8 | Variable choose : forall(P : bool -> Prop)(H : exists x, P x), bool. 9 | 10 | Variable H : exists x : bool, True. 11 | 12 | Definition coef := 13 | match Some true with 14 | Some _ => @choose _ H |_ => true 15 | end . 16 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/2027.v: -------------------------------------------------------------------------------- 1 | 2 | Parameter T : Type -> Type. 3 | Parameter f : forall {A}, T A -> T A. 4 | Parameter P : forall {A}, T A -> Prop. 5 | Axiom f_id : forall {A} (l : T A), f l = l. 6 | 7 | Goal forall A (p : T A), P p. 8 | Proof. 9 | intros. 10 | rewrite <- f_id. 11 | Admitted. -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/2095.v: -------------------------------------------------------------------------------- 1 | (* Classes and sections *) 2 | 3 | Section OPT. 4 | Variable A: Type. 5 | 6 | Inductive MyOption: Type := 7 | | MyNone: MyOption 8 | | MySome: A -> MyOption. 9 | 10 | Class Opt: Type := { 11 | f_opt: A -> MyOption 12 | }. 13 | End OPT. 14 | 15 | Definition f_nat (n: nat): MyOption nat := MySome _ n. 16 | 17 | Instance Nat_Opt: Opt nat := { 18 | f_opt := f_nat 19 | }. 20 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/2108.v: -------------------------------------------------------------------------------- 1 | (* Declare Module in Module Type *) 2 | Module Type A. 3 | Record t : Set := { something : unit }. 4 | End A. 5 | 6 | 7 | Module Type B. 8 | Declare Module BA : A. 9 | End B. 10 | 11 | 12 | Module Type C. 13 | Declare Module CA : A. 14 | Declare Module CB : B with Module BA := CA. 15 | End C. 16 | 17 | 18 | Module Type D. 19 | Declare Module DA : A. 20 | (* Next line gives: "Anomaly: uncaught exception Not_found. Please report." *) 21 | Declare Module DC : C with Module CA := DA. 22 | End D. 23 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/2123.v: -------------------------------------------------------------------------------- 1 | (* About the detection of non-dependent metas by the refine tactic *) 2 | 3 | (* The following is a simplification of bug #2123 *) 4 | 5 | Parameter fset : nat -> Set. 6 | Parameter widen : forall (n : nat) (s : fset n), { x : fset (S n) | s=s }. 7 | Goal forall i, fset (S i). 8 | intro. 9 | refine (proj1_sig (widen i _)). 10 | 11 | 12 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/2127.v: -------------------------------------------------------------------------------- 1 | (* Check that "apply refl_equal" is not exported as an interactive 2 | tactic but as a statically globalized one *) 3 | 4 | (* (this is a simplification of the original bug report) *) 5 | 6 | Module A. 7 | Hint Rewrite sym_equal using apply refl_equal : foo. 8 | End A. 9 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/2135.v: -------------------------------------------------------------------------------- 1 | (* Check that metas are whd-normalized before trying 2nd-order unification *) 2 | Lemma test : 3 | forall (D:Type) (T : forall C, option C) (Q:forall D, option D -> Prop), 4 | (forall (A : Type) (P : forall B:Type, option B -> Prop), P A (T A)) 5 | -> Q D (T D). 6 | Proof. 7 | intros D T Q H. 8 | pattern (T D). apply H. 9 | Qed. 10 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/2141.v: -------------------------------------------------------------------------------- 1 | Require Import FSetList. 2 | Require Import OrderedTypeEx. 3 | 4 | Module NatSet := FSetList.Make (Nat_as_OT). 5 | Recursive Extraction NatSet.fold. 6 | 7 | Module FSetHide (X : FSetInterface.S). 8 | Include X. 9 | End FSetHide. 10 | 11 | Module NatSet' := FSetHide NatSet. 12 | Recursive Extraction NatSet'.fold. 13 | 14 | (* Extraction "test2141.ml" NatSet'.fold. *) -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/2145.v: -------------------------------------------------------------------------------- 1 | (* Test robustness of Groebner tactic in presence of disequalities *) 2 | 3 | Require Export Reals. 4 | Require Export Nsatz. 5 | 6 | Open Scope R_scope. 7 | 8 | Lemma essai : 9 | forall yb xb m1 m2 xa ya, 10 | xa <> xb -> 11 | yb - 2 * m2 * xb = ya - m2 * xa -> 12 | yb - m1 * xb = ya - m1 * xa -> 13 | yb - ya = (2 * xb - xa) * m2 -> 14 | yb - ya = (xb - xa) * m1. 15 | Proof. 16 | intros. 17 | (* clear H. groebner used not to work when H was not cleared *) 18 | nsatz. 19 | Qed. 20 | 21 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/2181.v: -------------------------------------------------------------------------------- 1 | Class C. 2 | Parameter P: C -> Prop. 3 | Fail Record R: Type := { _: C; u: P _ }. 4 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/2231.v: -------------------------------------------------------------------------------- 1 | Inductive unit2 : Type := U : unit -> unit2. 2 | Inductive dummy (u: unit2) : unit -> Type := 3 | V: dummy u (let (tt) := u in tt). 4 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/2244.v: -------------------------------------------------------------------------------- 1 | (* 1st-order unification did not work when in competition with pattern unif. *) 2 | 3 | Set Implicit Arguments. 4 | Lemma test : forall 5 | (A : Type) 6 | (B : Type) 7 | (f : A -> B) 8 | (S : B -> Prop) 9 | (EV : forall y (f':A->B), (forall x', S (f' x')) -> S (f y)) 10 | (HS : forall x', S (f x')) 11 | (x : A), 12 | S (f x). 13 | Proof. 14 | intros. eapply EV. intros. 15 | (* worked in v8.2 but not in v8.3beta, fixed in r12898 *) 16 | apply HS. 17 | 18 | (* still not compatible with 8.2 because an evar can be solved in 19 | two different ways and is left open *) 20 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/2262.v: -------------------------------------------------------------------------------- 1 | 2 | 3 | Generalizable Variables A. 4 | Class Test A := { test : A }. 5 | 6 | Lemma mylemma : forall `{Test A}, test = test. 7 | Admitted. (* works fine *) 8 | 9 | Definition mylemma' := forall `{Test A}, test = test. 10 | About mylemma'. 11 | 12 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/2295.v: -------------------------------------------------------------------------------- 1 | (* Check if omission of "as" in return clause works w/ section variables too *) 2 | 3 | Section sec. 4 | 5 | Variable b: bool. 6 | 7 | Definition d' := 8 | (match b return b = true \/ b = false with 9 | | true => or_introl _ (refl_equal true) 10 | | false => or_intror _ (refl_equal false) 11 | end). 12 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/2299.v: -------------------------------------------------------------------------------- 1 | (* Check that destruct refreshes universes in what it generalizes *) 2 | 3 | Section test. 4 | 5 | Variable A: Type. 6 | 7 | Inductive T: unit -> Type := C: A -> unit -> T tt. 8 | 9 | Let unused := T tt. 10 | 11 | Goal T tt -> False. 12 | intro X. 13 | destruct X. 14 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/2300.v: -------------------------------------------------------------------------------- 1 | (* Check some behavior of Ltac pattern-matching wrt universe levels *) 2 | 3 | Section contents. 4 | 5 | Variables (A: Type) (B: (unit -> Type) -> Type). 6 | 7 | Inductive C := c: A -> unit -> C. 8 | 9 | Let unused2 (x: unit) := C. 10 | 11 | Goal True. 12 | intuition. 13 | Qed. 14 | 15 | End contents. 16 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/2303.v: -------------------------------------------------------------------------------- 1 | Class A := a: unit. 2 | Class B (x: unit). 3 | Axiom H: forall x: A, @B x -> x = x -> unit. 4 | Definition Field (z: A) (m: @B z) x := (@H _ _ x) = z. 5 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/2304.v: -------------------------------------------------------------------------------- 1 | (* This used to fail with an anomaly NotASort at some time *) 2 | Class A (O: Type): Type := a: O -> Type. 3 | Fail Goal forall (x: a tt), @a x = @a x. 4 | 5 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/2307.v: -------------------------------------------------------------------------------- 1 | Inductive V: nat -> Type := VS n: V (S n). 2 | Definition f (e: V 1): nat := match e with VS 0 => 3 end. 3 | 4 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/2320.v: -------------------------------------------------------------------------------- 1 | (* Managing metavariables in the return clause of a match *) 2 | 3 | (* This was working in 8.1 but is failing in 8.2 and 8.3. It works in 4 | trunk thanks to the new proof engine. It could probably made to work in 5 | 8.2 and 8.3 if a return predicate of the form "dummy 0" instead of 6 | (or in addition to) a sophisticated predicate of the form 7 | "as x in dummy y return match y with 0 => ?P | _ => ID end" *) 8 | 9 | Inductive dummy : nat -> Prop := constr : dummy 0. 10 | 11 | Lemma failure : forall (x : dummy 0), x = constr. 12 | Proof. 13 | intros x. 14 | refine (match x with constr => _ end). 15 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/2342.v: -------------------------------------------------------------------------------- 1 | (* Checking that the type inference algoithme does not commit to an 2 | equality over sorts when only a subtyping constraint is around *) 3 | 4 | Parameter A : Set. 5 | Parameter B : A -> Set. 6 | Parameter F : Set -> Prop. 7 | Check (F (forall x, B x)). 8 | 9 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/2347.v: -------------------------------------------------------------------------------- 1 | Require Import EquivDec List. 2 | Generalizable All Variables. 3 | 4 | Program Definition list_eqdec `(eqa : EqDec A eq) : EqDec (list A) eq := 5 | (fun (x y : list A) => _). 6 | Admit Obligations of list_eqdec. 7 | 8 | Program Definition list_eqdec' `(eqa : EqDec A eq) : EqDec (list A) eq := 9 | (fun _ : nat => (fun (x y : list A) => _)) 0. 10 | Admit Obligations of list_eqdec'. 11 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/2350.v: -------------------------------------------------------------------------------- 1 | (* Check that the fix tactic, when called from refine, reduces enough 2 | to see the products *) 3 | 4 | Definition foo := forall n:nat, n=n. 5 | Definition bar : foo. 6 | refine (fix aux (n:nat) := _). 7 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/2353.v: -------------------------------------------------------------------------------- 1 | (* Are recursively non-uniform params correctly treated? *) 2 | Inductive list (A:nat -> Type) n := cons : A n -> list A (S n) -> list A n. 3 | Inductive term n := app (l : list term n). 4 | Definition term_list := 5 | fix term_size n (t : term n) (acc : nat) {struct t} : nat := 6 | match t with 7 | | app l => 8 | (fix term_list_size n (l : list term n) (acc : nat) {struct l} : nat := 9 | match l with 10 | | cons t q => term_list_size (S n) q (term_size n t acc) 11 | end) n l (S acc) 12 | end. 13 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/2360.v: -------------------------------------------------------------------------------- 1 | (* This failed in V8.3 because descend_in_conjunctions built ill-typed terms *) 2 | Definition interp (etyp : nat -> Type) (p: nat) := etyp p. 3 | 4 | Record Value (etyp : nat -> Type) := Mk { 5 | typ : nat; 6 | value : interp etyp typ 7 | }. 8 | 9 | Definition some_value (etyp : nat -> Type) : (Value etyp). 10 | Proof. 11 | intros. 12 | Fail apply Mk. (* Check that it does not raise an anomaly *) 13 | 14 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/2375.v: -------------------------------------------------------------------------------- 1 | (* In the following code, the (superfluous) lemma [lem] is responsible 2 | for the failure of congruence. *) 3 | 4 | Definition f : nat -> Prop := fun x => True. 5 | 6 | Lemma lem : forall x, (True -> True) = ( True -> f x). 7 | Proof. 8 | intros. reflexivity. 9 | Qed. 10 | 11 | Goal forall (x:nat), x = x. 12 | Proof. 13 | intros. 14 | assert (lem := lem). 15 | (*clear ax.*) 16 | congruence. 17 | Qed. 18 | 19 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/2388.v: -------------------------------------------------------------------------------- 1 | (* Error message was not printed in the correct environment *) 2 | 3 | Fail Parameters (A:Prop) (a:A A). 4 | 5 | (* This is a variant (reported as part of bug #2347) *) 6 | 7 | Require Import EquivDec. 8 | Fail Program Instance bool_eq_eqdec : EqDec bool eq := 9 | {equiv_dec x y := (fix aux (x y : bool) {struct x}:= aux _ y) x y}. 10 | 11 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/2393.v: -------------------------------------------------------------------------------- 1 | Require Import Program. 2 | 3 | Inductive T := MkT. 4 | 5 | Definition sizeOf (t : T) : nat 6 | := match t with 7 | | MkT => 1 8 | end. 9 | Variable vect : nat -> Type. 10 | Program Fixpoint idType (t : T) (n := sizeOf t) (b : vect n) {measure n} : T 11 | := match t with 12 | | MkT => MkT 13 | end. 14 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/2613.v: -------------------------------------------------------------------------------- 1 | (* Check that eq_sym is still pointing to Logic.eq_sym after use of Function *) 2 | 3 | Require Import ZArith. 4 | Require Recdef. 5 | 6 | Axiom nat_eq_dec: forall x y : nat, {x=y}+{x<>y}. 7 | 8 | Locate eq_sym. (* Constant Coq.Init.Logic.eq_sym *) 9 | 10 | Function loop (n: nat) {measure (fun x => x) n} : bool := 11 | if nat_eq_dec n 0 then false else loop (pred n). 12 | Proof. 13 | admit. 14 | Defined. 15 | 16 | Check eq_sym eq_refl : 0=0. 17 | 18 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/2616.v: -------------------------------------------------------------------------------- 1 | (* Testing ill-typed rewrite which used to succeed in 8.3 *) 2 | Goal 3 | forall (N : nat -> Prop) (g : nat -> sig N) (IN : forall a : sig N, a = g 0), 4 | N 0 -> False. 5 | Proof. 6 | intros. 7 | Fail rewrite IN in H. 8 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/2640.v: -------------------------------------------------------------------------------- 1 | (* Testing consistency of globalization and interpretation in some 2 | extreme cases *) 3 | 4 | Section sect. 5 | 6 | (* Simplification of the initial example *) 7 | Hypothesis Other: True. 8 | 9 | Lemma C2 : True. 10 | proof. 11 | Fail have True using Other. 12 | Abort. 13 | 14 | (* Variant of the same problem *) 15 | Lemma C2 : True. 16 | Fail clear; Other. 17 | Abort. 18 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/2667.v: -------------------------------------------------------------------------------- 1 | (* Check that extra arguments to Arguments Scope do not disturb use of *) 2 | (* scopes in constructors *) 3 | 4 | Inductive stmt : Type := Sskip: stmt | Scall : nat -> stmt. 5 | Bind Scope Cminor with stmt. 6 | 7 | (* extra argument is ok because of possible coercion to funclass *) 8 | Arguments Scope Scall [_ Cminor ]. 9 | 10 | (* extra argument is ok because of possible coercion to funclass *) 11 | Fixpoint f (c: stmt) : Prop := match c with Scall _ => False | _ => False end. 12 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/2680.v: -------------------------------------------------------------------------------- 1 | (* Tauto bug initially due to wrong test for binary connective *) 2 | 3 | Parameter A B : Type. 4 | 5 | Axiom P : A -> B -> Prop. 6 | 7 | Inductive IP (a : A) (b: B) : Prop := 8 | | IP_def : P a b -> IP a b. 9 | 10 | 11 | Goal forall (a : A) (b : B), IP a b -> ~ IP a b -> False. 12 | Proof. 13 | intros. 14 | tauto. 15 | Qed. 16 | 17 | 18 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/2732.v: -------------------------------------------------------------------------------- 1 | (* Check correct behavior of add_primitive_tactic in TACEXTEND *) 2 | 3 | (* Added also the case of eauto and congruence *) 4 | 5 | Ltac thus H := solve [H]. 6 | 7 | Lemma test: forall n : nat, n <= n. 8 | Proof. 9 | intro. 10 | thus firstorder. 11 | Undo. 12 | thus eauto. 13 | Qed. 14 | 15 | Lemma test2: false = true -> False. 16 | Proof. 17 | intro. 18 | thus congruence. 19 | Qed. 20 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/335.v: -------------------------------------------------------------------------------- 1 | (* Compatibility of Require with backtracking at interactive module end *) 2 | 3 | Module A. 4 | Require List. 5 | End A. 6 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/348.v: -------------------------------------------------------------------------------- 1 | Module Type S. 2 | Parameter empty: Set. 3 | End S. 4 | 5 | Module D (M:S). 6 | Import M. 7 | Definition empty:=nat. 8 | End D. 9 | 10 | Module D' (M:S). 11 | Import M. 12 | Definition empty:Set. exact nat. Save. 13 | End D'. 14 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/38.v: -------------------------------------------------------------------------------- 1 | Require Import Setoid. 2 | 3 | Variable A : Set. 4 | 5 | Inductive liste : Set := 6 | | vide : liste 7 | | c : A -> liste -> liste. 8 | 9 | Inductive e : A -> liste -> Prop := 10 | | ec : forall (x : A) (l : liste), e x (c x l) 11 | | ee : forall (x y : A) (l : liste), e x l -> e x (c y l). 12 | 13 | Definition same := fun (l m : liste) => forall (x : A), e x l <-> e x m. 14 | 15 | Definition same_refl (x:liste) : (same x x). 16 | unfold same; split; intros; trivial. 17 | Save. 18 | 19 | Goal forall (x:liste), (same x x). 20 | intro. 21 | apply (same_refl x). 22 | Qed. 23 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/545.v: -------------------------------------------------------------------------------- 1 | Require Export Reals. 2 | 3 | Parameter toto : nat -> nat -> nat. 4 | 5 | Notation " e # f " := (toto e f) (at level 30, f at level 0). 6 | -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/808_2411.v: -------------------------------------------------------------------------------- 1 | Section test. 2 | Variable n:nat. 3 | Lemma foo: 0 <= n. 4 | Proof. 5 | (* declaring an Axiom during a proof makes it immediatly 6 | usable, juste as a full Definition. *) 7 | Axiom bar : n = 1. 8 | rewrite bar. 9 | now apply le_S. 10 | Qed. 11 | 12 | Lemma foo' : 0 <= n. 13 | Proof. 14 | (* Declaring an Hypothesis during a proof is ok, 15 | but this hypothesis won't be usable by the current proof(s), 16 | only by later ones. *) 17 | Hypothesis bar' : n = 1. 18 | Fail rewrite bar'. 19 | Abort. 20 | 21 | Lemma foo'' : 0 <= n. 22 | Proof. 23 | rewrite bar'. 24 | now apply le_S. 25 | Qed. 26 | 27 | End test. -------------------------------------------------------------------------------- /test-suite/bugs/closed/shouldsucceed/931.v: -------------------------------------------------------------------------------- 1 | Parameter P : forall n : nat, n=n -> Prop. 2 | 3 | Goal Prop. 4 | refine (P _ _). 5 | instantiate (1:=0). 6 | trivial. 7 | Qed. 8 | -------------------------------------------------------------------------------- /test-suite/bugs/opened/1773.v: -------------------------------------------------------------------------------- 1 | Goal forall B C : nat -> nat -> Prop, forall k, C 0 k -> 2 | (exists A, (forall k', C A k' -> B A k') -> B A k). 3 | Proof. 4 | intros B C k H. 5 | econstructor. 6 | intros X. 7 | apply X. 8 | apply H. 9 | Qed. 10 | 11 | -------------------------------------------------------------------------------- /test-suite/bugs/opened/shouldnotfail/1338.v-disabled: -------------------------------------------------------------------------------- 1 | Require Import Omega. 2 | 3 | Goal forall x, 0 <= x -> x <= 20 -> 4 | x <> 0 5 | -> x <> 1 -> x <> 2 -> x <> 3 -> x <>4 -> x <> 5 -> x <> 6 -> x <> 7 -> x <> 8 6 | -> x <> 9 -> x <> 10 7 | -> x <> 11 -> x <> 12 -> x <> 13 -> x <> 14 -> x <> 15 -> x <> 16 -> x <> 17 8 | -> x <> 18 -> x <> 19 -> x <> 20 -> False. 9 | Proof. 10 | intros. 11 | omega. 12 | Qed. 13 | -------------------------------------------------------------------------------- /test-suite/bugs/opened/shouldnotfail/1671.v: -------------------------------------------------------------------------------- 1 | (* Exemple soumis par Pierre Corbineau (bug #1671) *) 2 | 3 | CoInductive hdlist : unit -> Type := 4 | | cons : hdlist tt -> hdlist tt. 5 | 6 | Variable P : forall bo, hdlist bo -> Prop. 7 | Variable all : forall bo l, P bo l. 8 | 9 | Definition F (l:hdlist tt) : P tt l := 10 | match l in hdlist u return P u l with 11 | | cons (cons l') => all tt _ 12 | end. 13 | -------------------------------------------------------------------------------- /test-suite/bugs/opened/shouldnotfail/1811.v: -------------------------------------------------------------------------------- 1 | Require Export Bool. 2 | 3 | Lemma neg2xor : forall b, xorb true b = negb b. 4 | Proof. auto. Qed. 5 | 6 | Goal forall b1 b2, (negb b1 = b2) -> xorb true b1 = b2. 7 | Proof. 8 | intros b1 b2. 9 | rewrite neg2xor. -------------------------------------------------------------------------------- /test-suite/bugs/opened/shouldnotfail/743.v: -------------------------------------------------------------------------------- 1 | Require Import Omega. 2 | 3 | Lemma foo : forall n m : Z, (n >= 0)%Z -> (n * m >= 0)%Z -> (n <= n + n * m)%Z. 4 | Proof. 5 | intros. omega. 6 | Qed. 7 | 8 | Lemma foo' : forall n m : nat, n <= n + n * m. 9 | Proof. 10 | intros. omega. 11 | Qed. 12 | 13 | -------------------------------------------------------------------------------- /test-suite/check: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | MAKE="${MAKE:=make}" 4 | 5 | if [ "$1" = -byte ]; then 6 | export BEST=byte 7 | fi 8 | 9 | ${MAKE} clean > /dev/null 2>&1 10 | ${MAKE} all > /dev/null 2>&1 11 | cat summary.log 12 | -------------------------------------------------------------------------------- /test-suite/complexity/Notations.v: -------------------------------------------------------------------------------- 1 | (* Last line should not loop, even in the presence of eta-expansion in the *) 2 | (* printing mechanism *) 3 | (* Expected time < 1.00s *) 4 | 5 | Notation "'bind' x <- y ; z" :=(y (fun x => z)) (at level 99, x at 6 | level 0, y at level 0,format "'[hv' 'bind' x <- y ; '/' z ']'"). 7 | 8 | Definition f (g : (nat -> nat) -> nat) := g (fun x => 0). 9 | 10 | Time Check (fun g => f g). 11 | -------------------------------------------------------------------------------- /test-suite/complexity/ring.v: -------------------------------------------------------------------------------- 1 | (* This example, checks the efficiency of the abstract machine used by ring *) 2 | (* Expected time < 1.00s *) 3 | 4 | Require Import ZArith. 5 | Open Scope Z_scope. 6 | Goal forall a, a+a+a+a+a+a+a+a+a+a+a+a+a = a*13. 7 | Timeout 5 Time intro; ring. 8 | -------------------------------------------------------------------------------- /test-suite/complexity/setoid_rewrite.v: -------------------------------------------------------------------------------- 1 | (* Check bug #1176 *) 2 | (* Expected time < 0.50s *) 3 | 4 | Require Import Setoid. 5 | 6 | Variable f : nat -> Prop. 7 | 8 | Goal forall U:Prop, f 100 <-> U. 9 | intros U. 10 | Timeout 5 Time setoid_replace U with False. 11 | -------------------------------------------------------------------------------- /test-suite/csdp.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/test-suite/csdp.cache -------------------------------------------------------------------------------- /test-suite/failure/Case1.v: -------------------------------------------------------------------------------- 1 | Type match 0 with 2 | | x => 0 3 | | O => 1 4 | end. 5 | -------------------------------------------------------------------------------- /test-suite/failure/Case10.v: -------------------------------------------------------------------------------- 1 | Type (fun x : nat => match x return nat with 2 | | S x as b => S b 3 | end). 4 | -------------------------------------------------------------------------------- /test-suite/failure/Case11.v: -------------------------------------------------------------------------------- 1 | Type (fun x : nat => match x return nat with 2 | | S x as b => S b x 3 | end). 4 | -------------------------------------------------------------------------------- /test-suite/failure/Case12.v: -------------------------------------------------------------------------------- 1 | 2 | Type 3 | (fun x : nat => 4 | match x return nat with 5 | | S x as b => match x with 6 | | x => x 7 | end 8 | end). 9 | -------------------------------------------------------------------------------- /test-suite/failure/Case13.v: -------------------------------------------------------------------------------- 1 | Type 2 | (fun x : nat => 3 | match x return nat with 4 | | S x as b => match x with 5 | | x => S b x 6 | end 7 | end). 8 | -------------------------------------------------------------------------------- /test-suite/failure/Case14.v: -------------------------------------------------------------------------------- 1 | Inductive List (A : Set) : Set := 2 | | Nil : List A 3 | | Cons : A -> List A -> List A. 4 | 5 | Definition NIL := Nil nat. 6 | Type match Nil nat return (List nat) with 7 | | NIL => NIL 8 | | _ => NIL 9 | end. 10 | -------------------------------------------------------------------------------- /test-suite/failure/Case15.v: -------------------------------------------------------------------------------- 1 | (* Non exhaustive pattern-matching *) 2 | 3 | Check 4 | (fun x => 5 | match x, x with 6 | | O, S (S y) => true 7 | | O, S x => false 8 | | S y, O => true 9 | end). 10 | -------------------------------------------------------------------------------- /test-suite/failure/Case16.v: -------------------------------------------------------------------------------- 1 | (* Check for redundant clauses *) 2 | 3 | Check 4 | (fun x => 5 | match x, x with 6 | | O, S (S y) => true 7 | | S _, S (S y) => true 8 | | _, S (S x) => false 9 | | S y, O => true 10 | | _, _ => true 11 | end). 12 | -------------------------------------------------------------------------------- /test-suite/failure/Case2.v: -------------------------------------------------------------------------------- 1 | Inductive IFExpr : Set := 2 | | Var : nat -> IFExpr 3 | | Tr : IFExpr 4 | | Fa : IFExpr 5 | | IfE : IFExpr -> IFExpr -> IFExpr -> IFExpr. 6 | 7 | Type 8 | (fun F : IFExpr => 9 | match F return Prop with 10 | | IfE (Var _) H I => True 11 | | IfE _ _ _ => False 12 | | _ => True 13 | end). 14 | -------------------------------------------------------------------------------- /test-suite/failure/Case3.v: -------------------------------------------------------------------------------- 1 | Inductive List (A : Set) : Set := 2 | | Nil : List A 3 | | Cons : A -> List A -> List A. 4 | 5 | Type 6 | (fun l : List nat => 7 | match l return nat with 8 | | Nil nat => 0 9 | | Cons a l => S a 10 | end). 11 | -------------------------------------------------------------------------------- /test-suite/failure/Case4.v: -------------------------------------------------------------------------------- 1 | 2 | Definition Berry (x y z : bool) := 3 | match x, y, z with 4 | | true, false, _ => 0 5 | | false, _, true => 1 6 | | _, true, false => 2 7 | end. 8 | -------------------------------------------------------------------------------- /test-suite/failure/Case5.v: -------------------------------------------------------------------------------- 1 | Inductive MS : Set := 2 | | X : MS -> MS 3 | | Y : MS -> MS. 4 | 5 | Type (fun p : MS => match p return nat with 6 | | X x => 0 7 | end). 8 | -------------------------------------------------------------------------------- /test-suite/failure/Case6.v: -------------------------------------------------------------------------------- 1 | Inductive List (A : Set) : Set := 2 | | Nil : List A 3 | | Cons : A -> List A -> List A. 4 | 5 | Type (match Nil nat return List nat with 6 | | NIL => NIL 7 | | (CONS _ _) => NIL 8 | end). 9 | -------------------------------------------------------------------------------- /test-suite/failure/Case7.v: -------------------------------------------------------------------------------- 1 | Inductive listn : nat -> Set := 2 | | niln : listn 0 3 | | consn : forall n : nat, nat -> listn n -> listn (S n). 4 | 5 | Definition length1 (n : nat) (l : listn n) := 6 | match l with 7 | | consn n _ (consn m _ _) => S (S m) 8 | | consn n _ _ => 1 9 | | _ => 0 10 | end. 11 | 12 | Type 13 | (fun (n : nat) (l : listn n) => 14 | match n return nat with 15 | | O => 0 16 | | S n => match l return nat with 17 | | niln => 1 18 | | l' => length1 (S n) l' 19 | end 20 | end). 21 | -------------------------------------------------------------------------------- /test-suite/failure/Case8.v: -------------------------------------------------------------------------------- 1 | Inductive List (A : Set) : Set := 2 | | Nil : List A 3 | | Cons : A -> List A -> List A. 4 | 5 | Type match Nil nat return nat with 6 | | b => b 7 | | Cons _ _ _ as d => d 8 | end. 9 | -------------------------------------------------------------------------------- /test-suite/failure/Case9.v: -------------------------------------------------------------------------------- 1 | Parameter compare : forall n m : nat, {n < m} + {n = m} + {n > m}. 2 | Type 3 | match compare 0 0 return nat with 4 | 5 | (* k 0 6 | (* k=i *) | left _ _ _ => 0 7 | (* k>i *) | right _ _ _ => 0 8 | end. 9 | -------------------------------------------------------------------------------- /test-suite/failure/ClearBody.v: -------------------------------------------------------------------------------- 1 | (* ClearBody must check that removing the body of definition does not 2 | invalidate the well-typabilility of the visible goal *) 3 | 4 | Goal True. 5 | set (n := 0) in *. 6 | set (I := refl_equal 0) in *. 7 | change (n = 0) in (type of I). 8 | clearbody n. 9 | -------------------------------------------------------------------------------- /test-suite/failure/ImportedCoercion.v: -------------------------------------------------------------------------------- 1 | (* Test visibility of coercions *) 2 | 3 | Require Import make_local. 4 | 5 | (* Local coercion must not be used *) 6 | 7 | Check (0 = true). 8 | -------------------------------------------------------------------------------- /test-suite/failure/Notations.v: -------------------------------------------------------------------------------- 1 | (* Submitted by Roland Zumkeller *) 2 | 3 | Notation "! A" := (forall i:nat, A) (at level 60). 4 | 5 | (* Should fail: no dynamic capture *) 6 | Check ! (i=i). 7 | 8 | -------------------------------------------------------------------------------- /test-suite/failure/Reordering.v: -------------------------------------------------------------------------------- 1 | (* Testing that hypothesis order (following a conversion/folding) is checked *) 2 | 3 | Goal forall (A:Set) (x:A) (A':=A), True. 4 | intros. 5 | change ((fun (_:A') => Set) x) in (type of A). 6 | -------------------------------------------------------------------------------- /test-suite/failure/Sections.v: -------------------------------------------------------------------------------- 1 | Module A. 2 | Section B. 3 | End A. 4 | End A. 5 | -------------------------------------------------------------------------------- /test-suite/failure/autorewritein.v: -------------------------------------------------------------------------------- 1 | Variable Ack : nat -> nat -> nat. 2 | 3 | Axiom Ack0 : forall m : nat, Ack 0 m = S m. 4 | Axiom Ack1 : forall n : nat, Ack (S n) 0 = Ack n 1. 5 | Axiom Ack2 : forall n m : nat, Ack (S n) (S m) = Ack n (Ack (S n) m). 6 | 7 | Hint Rewrite Ack0 Ack1 Ack2 : base0. 8 | 9 | Lemma ResAck2 : forall H:(Ack 2 2 = 7 -> False), H=H -> False. 10 | Proof. 11 | intros. 12 | autorewrite with base0 in * using try (apply H1;reflexivity). 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /test-suite/failure/cases.v: -------------------------------------------------------------------------------- 1 | (* Non exhaustive pattern-matching *) 2 | 3 | Check 4 | (fun x => 5 | match x, x with 6 | | O, S (S y) => true 7 | | O, S x => false 8 | | S y, O => true 9 | end). 10 | -------------------------------------------------------------------------------- /test-suite/failure/check.v: -------------------------------------------------------------------------------- 1 | Implicit Arguments eq [A]. 2 | 3 | Check (bool = true). 4 | -------------------------------------------------------------------------------- /test-suite/failure/circular_subtyping1.v: -------------------------------------------------------------------------------- 1 | (* subtyping verification in presence of pseudo-circularity*) 2 | Module Type S. End S. 3 | Module Type T. Declare Module M:S. End T. 4 | 5 | Module N:S. End N. 6 | Module NN <: T. Module M:=N. End NN. 7 | Module P <: T with Module M:=NN := NN. 8 | -------------------------------------------------------------------------------- /test-suite/failure/circular_subtyping2.v: -------------------------------------------------------------------------------- 1 | (*subtyping verification in presence of pseudo-circularity at functor application *) 2 | Module Type S. End S. 3 | Module Type T. Declare Module M:S. End T. 4 | Module N:S. End N. 5 | 6 | Module F (X:S) (Y:T with Module M:=X). End F. 7 | 8 | Module G := F N N. -------------------------------------------------------------------------------- /test-suite/failure/clashes.v: -------------------------------------------------------------------------------- 1 | (* Submitted by David Nowak *) 2 | 3 | (* Simpler to forbid the definition of n as a global than to write it 4 | S.n to keep n accessible... *) 5 | 6 | Section S. 7 | Variable n : nat. 8 | Inductive P : Set := 9 | n : P. 10 | -------------------------------------------------------------------------------- /test-suite/failure/coqbugs0266.v: -------------------------------------------------------------------------------- 1 | (* It is forbidden to erase a variable (or a local def) that is used in 2 | the current goal. *) 3 | Section S. 4 | Let a := 0. 5 | Definition b := a. 6 | Goal b = b. 7 | clear a. 8 | -------------------------------------------------------------------------------- /test-suite/failure/evar1.v: -------------------------------------------------------------------------------- 1 | (* This used to succeed by producing an ill-typed term in v8.2 *) 2 | 3 | Lemma u: forall A : Prop, (exist _ A A) = (exist _ A A). 4 | -------------------------------------------------------------------------------- /test-suite/failure/evarclear1.v: -------------------------------------------------------------------------------- 1 | Set Printing Existential Instances. 2 | Set Printing All. 3 | Goal forall y, let z := S y in exists x, x = 0. 4 | intros. 5 | eexists. 6 | unfold z. 7 | clear y z. 8 | (* should fail because the evar should no longer be allowed to depend on z *) 9 | instantiate (1:=z). 10 | 11 | -------------------------------------------------------------------------------- /test-suite/failure/evarclear2.v: -------------------------------------------------------------------------------- 1 | Set Printing Existential Instances. 2 | Set Printing All. 3 | Goal let y:=0 in exists x:y=y, x = x. 4 | intros. 5 | eexists. 6 | rename y into z. 7 | unfold z at 1 2. 8 | (* should fail because the evar type depends on z *) 9 | clear z. 10 | -------------------------------------------------------------------------------- /test-suite/failure/evarlemma.v: -------------------------------------------------------------------------------- 1 | (* Check success of inference of evars in the context of lemmas *) 2 | 3 | Lemma foo x : True. 4 | -------------------------------------------------------------------------------- /test-suite/failure/fixpoint2.v: -------------------------------------------------------------------------------- 1 | (* Check Guard in proofs *) 2 | 3 | Goal nat->nat. 4 | fix f 1. 5 | intro n; apply f; assumption. 6 | Guarded. 7 | -------------------------------------------------------------------------------- /test-suite/failure/fixpoint3.v: -------------------------------------------------------------------------------- 1 | (* Check that arguments of impredicative types are not considered 2 | subterms for the guard condition (an example by Thierry Coquand) *) 3 | 4 | Inductive I : Prop := 5 | | C: (forall P:Prop, P->P) -> I. 6 | 7 | Definition i0 := C (fun _ x => x). 8 | 9 | Definition Paradox : False := 10 | (fix ni i : False := 11 | match i with 12 | | C f => ni (f _ i) 13 | end) i0. 14 | -------------------------------------------------------------------------------- /test-suite/failure/fixpoint4.v: -------------------------------------------------------------------------------- 1 | (* Check that arguments of impredicative types are not considered 2 | subterms even through commutative cuts on functional arguments 3 | (example prepared by Bruno) *) 4 | 5 | Inductive IMP : Prop := 6 | CIMP : (forall A:Prop, A->A) -> IMP 7 | | LIMP : (nat->IMP)->IMP. 8 | 9 | Definition i0 := (LIMP (fun _ => CIMP (fun _ x => x))). 10 | 11 | Definition Paradox : False := 12 | (fix F y o {struct o} : False := 13 | match y with 14 | | tt => fun f => 15 | match f 0 with 16 | | CIMP h => F y (h _ o) 17 | | _ => F y (f 0) 18 | end 19 | end match o with LIMP f => f | _ => fun _ => o end) tt i0. 20 | -------------------------------------------------------------------------------- /test-suite/failure/illtype1.v: -------------------------------------------------------------------------------- 1 | (************************************************************************) 2 | (* v * The Coq Proof Assistant / The Coq Development Team *) 3 | (* B -> prod A B. 4 | Check (fun (A:Type) (B:Prop) => (prod A B : Prop)). 5 | -------------------------------------------------------------------------------- /test-suite/failure/inductive2.v: -------------------------------------------------------------------------------- 1 | (* A check that sort-polymorphic product is not set too low *) 2 | 3 | Inductive prod (A B:Type) : Type := pair : A -> B -> prod A B. 4 | Check (fun (A:Prop) (B:Type) => (prod A B : Prop)). 5 | -------------------------------------------------------------------------------- /test-suite/failure/inductive3.v: -------------------------------------------------------------------------------- 1 | (* Check that the nested inductive types positivity check avoids recursively 2 | non uniform parameters (at least if these parameters break positivity) *) 3 | 4 | Inductive t (A:Type) : Type := c : t (A -> A) -> t A. 5 | Inductive u : Type := d : u | e : t u -> u. 6 | -------------------------------------------------------------------------------- /test-suite/failure/inductive4.v: -------------------------------------------------------------------------------- 1 | (* This used to succeed in versions 8.1 to 8.3 *) 2 | 3 | Require Import Logic. 4 | Require Hurkens. 5 | Definition Ti := Type. 6 | Inductive prod (X Y:Ti) := pair : X -> Y -> prod X Y. 7 | Definition B : Prop := let F := prod True in F Prop. (* Aie! *) 8 | Definition p2b (P:Prop) : B := pair True Prop I P. 9 | Definition b2p (b:B) : Prop := match b with pair _ P => P end. 10 | Lemma L1 : forall A : Prop, b2p (p2b A) -> A. 11 | Proof (fun A x => x). 12 | Lemma L2 : forall A : Prop, A -> b2p (p2b A). 13 | Proof (fun A x => x). 14 | Check Hurkens.paradox B p2b b2p L1 L2. 15 | 16 | -------------------------------------------------------------------------------- /test-suite/failure/ltac1.v: -------------------------------------------------------------------------------- 1 | (* Check all variables are different in a Context *) 2 | Ltac X := match goal with 3 | | x:_,x:_ |- _ => apply x 4 | end. 5 | Goal True -> True -> True. 6 | intros. 7 | X. 8 | -------------------------------------------------------------------------------- /test-suite/failure/ltac2.v: -------------------------------------------------------------------------------- 1 | (* Check that Match arguments are forbidden *) 2 | Ltac E x := apply x. 3 | Goal True -> True. 4 | E ltac:(match goal with 5 | | |- _ => intro H 6 | end). 7 | -------------------------------------------------------------------------------- /test-suite/failure/ltac4.v: -------------------------------------------------------------------------------- 1 | (* Check static globalisation of tactic names *) 2 | (* Proposed by Benjamin (mars 2002) *) 3 | Goal forall n : nat, n = n. 4 | induction n; try REflexivity. 5 | 6 | -------------------------------------------------------------------------------- /test-suite/failure/pattern.v: -------------------------------------------------------------------------------- 1 | (* Check that untypable beta-expansion are trapped *) 2 | 3 | Variable A : nat -> Type. 4 | Variable n : nat. 5 | Variable P : forall m : nat, m = n -> Prop. 6 | 7 | Goal forall p : n = n, P n p. 8 | intro. 9 | pattern n, p in |- *. 10 | -------------------------------------------------------------------------------- /test-suite/failure/positivity.v: -------------------------------------------------------------------------------- 1 | (************************************************************************) 2 | (* v * The Coq Proof Assistant / The Coq Development Team *) 3 | (* nat) -> t. 10 | -------------------------------------------------------------------------------- /test-suite/failure/proofirrelevance.v: -------------------------------------------------------------------------------- 1 | (* This was working in version 8.1beta (bug in the Sort-polymorphism 2 | of inductive types), but this is inconsistent with classical logic 3 | in Prop *) 4 | 5 | Inductive bool_in_prop : Type := hide : bool -> bool_in_prop 6 | with bool : Type := true : bool | false : bool. 7 | 8 | Lemma not_proof_irrelevance : ~ forall (P:Prop) (p p':P), p=p'. 9 | intro H; pose proof (H bool_in_prop (hide true) (hide false)); discriminate. 10 | Qed. 11 | 12 | -------------------------------------------------------------------------------- /test-suite/failure/prop-set-proof-irrelevance.v: -------------------------------------------------------------------------------- 1 | Require Import ProofIrrelevance. 2 | 3 | Lemma proof_irrelevance_set : forall (P : Set) (p1 p2 : P), p1 = p2. 4 | exact proof_irrelevance. 5 | Qed. 6 | 7 | Lemma paradox : False. 8 | assert (H : 0 <> 1) by discriminate. 9 | apply H. 10 | Fail apply proof_irrelevance. (* inlined version is rejected *) 11 | apply proof_irrelevance_set. 12 | Qed. 13 | -------------------------------------------------------------------------------- /test-suite/failure/redef.v: -------------------------------------------------------------------------------- 1 | (************************************************************************) 2 | (* v * The Coq Proof Assistant / The Coq Development Team *) 3 | (* Prop) (x:T1) , f x -> Type. 2 | intros until x. 3 | rewrite H in x. 4 | -------------------------------------------------------------------------------- /test-suite/failure/rewrite_in_hyp.v: -------------------------------------------------------------------------------- 1 | Goal forall (T1 T2 : Type) (f:T1 -> Prop) (x:T1) (H:T1=T2), f x -> 0=1. 2 | intros T1 T2 f x H fx. 3 | rewrite H in x. 4 | -------------------------------------------------------------------------------- /test-suite/failure/rewrite_in_hyp2.v: -------------------------------------------------------------------------------- 1 | (* Until revision 10221, rewriting in hypotheses of the form 2 | "(fun x => phi(x)) t" with "t" not rewritable used to behave as a 3 | beta-normalization tactic instead of raising the expected message 4 | "nothing to rewrite" *) 5 | 6 | Goal forall b, S b = O -> (fun a => 0 = (S a)) b -> True. 7 | intros b H H0. 8 | rewrite H in H0. 9 | -------------------------------------------------------------------------------- /test-suite/failure/search.v: -------------------------------------------------------------------------------- 1 | (************************************************************************) 2 | (* v * The Coq Proof Assistant / The Coq Development Team *) 3 | (* Prop) -> L. 10 | 11 | End T. 12 | 13 | Module TT : T. 14 | 15 | Parameter A : Type. 16 | 17 | Inductive L : Type := 18 | | L0 19 | | L1 : (A -> Prop) -> L. 20 | 21 | End TT. 22 | -------------------------------------------------------------------------------- /test-suite/failure/universes-sections1.v: -------------------------------------------------------------------------------- 1 | (* Check that constraints on definitions are preserved by discharging *) 2 | 3 | Section A. 4 | Definition Type2 := Type. 5 | Definition Type1 : Type2 := Type. 6 | End A. 7 | 8 | Definition Inconsistency : Type1 := Type2. 9 | -------------------------------------------------------------------------------- /test-suite/failure/universes-sections2.v: -------------------------------------------------------------------------------- 1 | (* Check that constraints on locals are preserved by discharging *) 2 | 3 | Definition Type2 := Type. 4 | 5 | Section A. 6 | Let Type1 : Type2 := Type. 7 | Definition Type1' := Type1. 8 | End A. 9 | 10 | Definition Inconsistency : Type1' := Type2. 11 | -------------------------------------------------------------------------------- /test-suite/failure/universes.v: -------------------------------------------------------------------------------- 1 | Definition Type2 := Type. 2 | Definition Type1 : Type2 := Type. 3 | Definition Inconsistency : Type1 := Type2. 4 | -------------------------------------------------------------------------------- /test-suite/ide/undo001.fake: -------------------------------------------------------------------------------- 1 | # Script simulating a dialog between coqide and coqtop -ideslave 2 | # Run it via fake_ide 3 | # 4 | # Simple backtrack by 1 between two global definitions 5 | # 6 | INTERP Definition foo := 0. 7 | INTERP Definition bar := 1. 8 | REWIND 1 9 | INTERPRAW Check foo. 10 | INTERPRAW Fail Check bar. 11 | -------------------------------------------------------------------------------- /test-suite/ide/undo002.fake: -------------------------------------------------------------------------------- 1 | # Script simulating a dialog between coqide and coqtop -ideslave 2 | # Run it via fake_ide 3 | # 4 | # Simple backtrack by 2 before two global definitions 5 | # 6 | INTERP Definition foo := 0. 7 | INTERP Definition bar := 1. 8 | REWIND 2 9 | INTERPRAW Fail Check foo. 10 | INTERPRAW Fail Check bar. 11 | -------------------------------------------------------------------------------- /test-suite/ide/undo003.fake: -------------------------------------------------------------------------------- 1 | # Script simulating a dialog between coqide and coqtop -ideslave 2 | # Run it via fake_ide 3 | # 4 | # Simple backtrack by 0 should be a no-op 5 | # 6 | INTERP Definition foo := 0. 7 | REWIND 0 8 | INTERPRAW Check foo. 9 | -------------------------------------------------------------------------------- /test-suite/ide/undo004.fake: -------------------------------------------------------------------------------- 1 | # Script simulating a dialog between coqide and coqtop -ideslave 2 | # Run it via fake_ide 3 | # 4 | # Undoing arbitrary commands, as first step 5 | # 6 | INTERP Theorem a : O=O. 7 | INTERP Ltac f x := x. 8 | REWIND 1 9 | # 10 | INTERP Ltac f x := x. 11 | # <\replay> 12 | INTERP assert True by trivial. 13 | INTERP trivial. 14 | INTERP Qed. 15 | -------------------------------------------------------------------------------- /test-suite/ide/undo005.fake: -------------------------------------------------------------------------------- 1 | # Script simulating a dialog between coqide and coqtop -ideslave 2 | # Run it via fake_ide 3 | # 4 | # Undoing arbitrary commands, as non-first step 5 | # 6 | INTERP Theorem b : O=O. 7 | INTERP assert True by trivial. 8 | INTERP Ltac g x := x. 9 | # 10 | REWIND 1 11 | # <\replay> 12 | INTERP Ltac g x := x. 13 | INTERP assert True by trivial. 14 | INTERP trivial. 15 | INTERP Qed. 16 | -------------------------------------------------------------------------------- /test-suite/ide/undo006.fake: -------------------------------------------------------------------------------- 1 | # Script simulating a dialog between coqide and coqtop -ideslave 2 | # Run it via fake_ide 3 | # 4 | # Undoing declarations, as first step 5 | # Was bugged in 8.1 6 | # 7 | INTERP Theorem c : O=O. 8 | INTERP Inductive T : Type := I. 9 | REWIND 1 10 | # 11 | INTERP Inductive T : Type := I. 12 | # <\replay> 13 | INTERP trivial. 14 | INTERP Qed. 15 | -------------------------------------------------------------------------------- /test-suite/ide/undo007.fake: -------------------------------------------------------------------------------- 1 | # Script simulating a dialog between coqide and coqtop -ideslave 2 | # Run it via fake_ide 3 | # 4 | # Undoing declarations, as first step 5 | # new in 8.2 6 | # 7 | INTERP Theorem d : O=O. 8 | INTERP Definition e := O. 9 | INTERP Definition f := O. 10 | REWIND 1 11 | # 12 | INTERP Definition f := O. 13 | # <\replay> 14 | INTERP assert True by trivial. 15 | INTERP trivial. 16 | INTERP Qed. 17 | INTERPRAW Check e. 18 | -------------------------------------------------------------------------------- /test-suite/ide/undo008.fake: -------------------------------------------------------------------------------- 1 | # Script simulating a dialog between coqide and coqtop -ideslave 2 | # Run it via fake_ide 3 | # 4 | # Undoing declarations, as non-first step 5 | # new in 8.2 6 | # 7 | INTERP Theorem h : O=O. 8 | INTERP assert True by trivial. 9 | INTERP Definition i := O. 10 | INTERP Definition j := O. 11 | REWIND 1 12 | # 13 | INTERP Definition j := O. 14 | # <\replay> 15 | INTERP assert True by trivial. 16 | INTERP trivial. 17 | INTERP Qed. 18 | INTERPRAW Check i. 19 | -------------------------------------------------------------------------------- /test-suite/ide/undo009.fake: -------------------------------------------------------------------------------- 1 | # Script simulating a dialog between coqide and coqtop -ideslave 2 | # Run it via fake_ide 3 | # 4 | # Undoing declarations, interleaved with proof steps 5 | # new in 8.2 *) 6 | # 7 | INTERP Theorem k : O=O. 8 | INTERP assert True by trivial. 9 | INTERP Definition l := O. 10 | INTERP assert True by trivial. 11 | INTERP Definition m := O. 12 | REWIND 3 13 | # 14 | INTERP Definition l := O. 15 | INTERP assert True by trivial. 16 | INTERP Definition m := O. 17 | # <\replay> 18 | INTERP assert True by trivial. 19 | INTERP trivial. 20 | INTERP Qed. 21 | -------------------------------------------------------------------------------- /test-suite/ide/undo017.fake: -------------------------------------------------------------------------------- 1 | # Script simulating a dialog between coqide and coqtop -ideslave 2 | # Run it via fake_ide 3 | # 4 | # bug #2569 : Undoing inside modules 5 | # 6 | INTERP Module M. 7 | INTERP Definition x := 0. 8 | INTERP End M. 9 | REWIND 1 10 | # 11 | INTERP End M. 12 | # 13 | INTERPRAW Check M.x. 14 | -------------------------------------------------------------------------------- /test-suite/ide/undo018.fake: -------------------------------------------------------------------------------- 1 | # Script simulating a dialog between coqide and coqtop -ideslave 2 | # Run it via fake_ide 3 | # 4 | # bug #2569 : Undoing inside section 5 | # 6 | INTERP Section M. 7 | INTERP Definition x := 0. 8 | INTERP End M. 9 | REWIND 1 10 | # 11 | INTERP End M. 12 | # 13 | INTERPRAW Check x. 14 | -------------------------------------------------------------------------------- /test-suite/ide/undo019.fake: -------------------------------------------------------------------------------- 1 | # Script simulating a dialog between coqide and coqtop -ideslave 2 | # Run it via fake_ide 3 | # 4 | # bug #2569 : Undoing a focused subproof 5 | # 6 | INTERP Goal True. 7 | INTERP { 8 | INTERP exact I. 9 | INTERP } 10 | REWIND 1 11 | # 12 | INTERP } 13 | # 14 | INTERP Qed. 15 | -------------------------------------------------------------------------------- /test-suite/ideal-features/Case9.v: -------------------------------------------------------------------------------- 1 | (* Exemple soumis par Pierre Corbineau (bug #1671) *) 2 | 3 | CoInductive hdlist : unit -> Type := 4 | | cons : hdlist tt -> hdlist tt. 5 | 6 | Variable P : forall bo, hdlist bo -> Prop. 7 | Variable all : forall bo l, P bo l. 8 | 9 | Definition F (l:hdlist tt) : P tt l := 10 | match l in hdlist u return P u l with 11 | | cons (cons l') => all tt _ 12 | end. 13 | -------------------------------------------------------------------------------- /test-suite/ideal-features/eapply_evar.v: -------------------------------------------------------------------------------- 1 | (* Test propagation of evars from subgoal to brother subgoals *) 2 | 3 | (* This does not work (oct 2008) because "match goal" sees "?evar = O" 4 | and not "O = O" *) 5 | 6 | Lemma eapply_evar : O=O -> 0=O. 7 | intro H; eapply trans_equal; 8 | [apply H | match goal with |- ?x = ?x => reflexivity end]. 9 | Qed. 10 | -------------------------------------------------------------------------------- /test-suite/interactive/Back.v: -------------------------------------------------------------------------------- 1 | (* Check that reset remains synchronised with the compilation unit cache *) 2 | (* See bug #1030 *) 3 | 4 | Section multiset_defs. 5 | Require Import Plus. 6 | End multiset_defs. 7 | Unset Implicit Arguments. 8 | Back 1. 9 | -------------------------------------------------------------------------------- /test-suite/interactive/Evar.v: -------------------------------------------------------------------------------- 1 | (* Check that no toplevel "unresolved evar" flees through Declare 2 | Implicit Tactic support (bug #1229) *) 3 | 4 | Goal True. 5 | (* should raise an error, not an anomaly *) 6 | set (x := _). 7 | -------------------------------------------------------------------------------- /test-suite/kernel/inds.mv: -------------------------------------------------------------------------------- 1 | Inductive [] nat : Set := O : nat | S : nat->nat. 2 | Check Construct nat 0 1. 3 | Check Construct nat 0 2. 4 | -------------------------------------------------------------------------------- /test-suite/micromega/example.v: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/test-suite/micromega/example.v -------------------------------------------------------------------------------- /test-suite/misc/deps/client/bar.v: -------------------------------------------------------------------------------- 1 | (* We assume the file compiled with -R ../lib lib -R . client *) 2 | (* foo alone should refer to client.foo because -R . client comes last *) 3 | 4 | Require Import foo. 5 | Goal a = 1. 6 | reflexivity. 7 | Qed. 8 | Require Import lib.foo. 9 | Goal a = 0. 10 | reflexivity. 11 | Qed. 12 | -------------------------------------------------------------------------------- /test-suite/misc/deps/client/foo.v: -------------------------------------------------------------------------------- 1 | Definition a := 1. 2 | -------------------------------------------------------------------------------- /test-suite/misc/deps/deps.out: -------------------------------------------------------------------------------- 1 | misc/deps/client/bar.vo misc/deps/client/bar.glob misc/deps/client/bar.v.beautified: misc/deps/client/bar.v misc/deps/client/foo.vo misc/deps/lib/foo.vo 2 | -------------------------------------------------------------------------------- /test-suite/misc/deps/lib/foo.v: -------------------------------------------------------------------------------- 1 | Definition a := 0. 2 | -------------------------------------------------------------------------------- /test-suite/misc/universes/universes.v: -------------------------------------------------------------------------------- 1 | Require all_stdlib. 2 | Print Sorted Universes "universes.txt". 3 | -------------------------------------------------------------------------------- /test-suite/modules/Nat.v: -------------------------------------------------------------------------------- 1 | Definition T := nat. 2 | 3 | Definition le := le. 4 | 5 | Hint Unfold le. 6 | 7 | Lemma le_refl : forall n : nat, le n n. 8 | auto. 9 | Qed. 10 | 11 | Require Import Le. 12 | 13 | Lemma le_trans : forall n m k : nat, le n m -> le m k -> le n k. 14 | eauto with arith. 15 | Qed. 16 | 17 | Lemma le_antis : forall n m : nat, le n m -> le m n -> n = m. 18 | eauto with arith. 19 | Qed. -------------------------------------------------------------------------------- /test-suite/modules/fun_objects.v: -------------------------------------------------------------------------------- 1 | Set Implicit Arguments. 2 | Unset Strict Implicit. 3 | 4 | Module Type SIG. 5 | Parameter id : forall A : Set, A -> A. 6 | End SIG. 7 | 8 | Module M (X: SIG). 9 | Definition idid := X.id X.id. 10 | Definition id := idid X.id. 11 | End M. 12 | 13 | Module N := M. 14 | 15 | Module Nat. 16 | Definition T := nat. 17 | Definition x := 0. 18 | Definition id (A : Set) (x : A) := x. 19 | End Nat. 20 | 21 | Module Z := N Nat. 22 | 23 | Check (Z.idid 0). 24 | 25 | Module P (Y: SIG) := N. 26 | 27 | Module Y := P Nat Z. 28 | 29 | Check (Y.id 0). 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /test-suite/modules/grammar.v: -------------------------------------------------------------------------------- 1 | Module N. 2 | Definition f := plus. 3 | (* : Syntax is discontinued *) 4 | Check (f 0 0). 5 | End N. 6 | Check (N.f 0 0). 7 | Import N. 8 | Check (f 0 0). 9 | Check (f 0 0). 10 | Module M := N. 11 | Check (f 0 0). 12 | Check (f 0 0). 13 | Import M. 14 | Check (f 0 0). 15 | Check (N.f 0 0). -------------------------------------------------------------------------------- /test-suite/modules/modeq.v: -------------------------------------------------------------------------------- 1 | Module M. 2 | Definition T := nat. 3 | Definition x : T := 0. 4 | End M. 5 | 6 | Module Type SIG. 7 | Module M := Top.M. 8 | Module Type SIG. 9 | Parameter T : Set. 10 | End SIG. 11 | Declare Module N: SIG. 12 | End SIG. 13 | 14 | Module Z. 15 | Module M := Top.M. 16 | Module Type SIG. 17 | Parameter T : Set. 18 | End SIG. 19 | Module N := M. 20 | End Z. 21 | 22 | Module A : SIG := Z. -------------------------------------------------------------------------------- /test-suite/modules/modul.v: -------------------------------------------------------------------------------- 1 | Module M. 2 | Parameter rel : nat -> nat -> Prop. 3 | 4 | Axiom w : forall n : nat, rel 0 (S n). 5 | 6 | Hint Resolve w. 7 | 8 | (* : Grammar is replaced by Notation *) 9 | 10 | Print Hint *. 11 | 12 | Lemma w1 : rel 0 1. 13 | auto. 14 | Qed. 15 | 16 | End M. 17 | 18 | Locate Module M. 19 | 20 | (*Lemma w1 : (M.rel O (S O)). 21 | Auto. 22 | *) 23 | 24 | Import M. 25 | 26 | Lemma w1 : rel 0 1. 27 | auto. 28 | Qed. 29 | 30 | Check (rel 0 0). 31 | Locate rel. 32 | 33 | Locate Module M. 34 | 35 | Module N := Top.M. 36 | -------------------------------------------------------------------------------- /test-suite/modules/nested_mod_types.v: -------------------------------------------------------------------------------- 1 | Module Type T. 2 | Module Type U. 3 | Module Type V. 4 | Variable b : nat. 5 | End V. 6 | Variable a : nat. 7 | End U. 8 | Declare Module u : U. 9 | Declare Module v : u.V. 10 | End T. 11 | 12 | Module F (t:T). 13 | End F. 14 | 15 | Module M:T. 16 | Module Type U. 17 | Module Type V. 18 | Variable b : nat. 19 | End V. 20 | Variable a : nat. 21 | End U. 22 | Declare Module u : U. 23 | Declare Module v : u.V. 24 | End M. 25 | 26 | Module FM := F M. 27 | -------------------------------------------------------------------------------- /test-suite/modules/obj.v: -------------------------------------------------------------------------------- 1 | Set Implicit Arguments. 2 | Unset Strict Implicit. 3 | 4 | Module M. 5 | Definition a (s : Set) := s. 6 | Print a. 7 | End M. 8 | 9 | Print M.a. 10 | 11 | Module K. 12 | Definition app (A B : Set) (f : A -> B) (x : A) := f x. 13 | Module N. 14 | Definition apap (A B : Set) := app (app (A:=A) (B:=B)). 15 | Print app. 16 | Print apap. 17 | End N. 18 | Print N.apap. 19 | End K. 20 | 21 | Print K.app. 22 | Print K.N.apap. 23 | 24 | Module W := K.N. 25 | 26 | Print W.apap. 27 | -------------------------------------------------------------------------------- /test-suite/modules/objects.v: -------------------------------------------------------------------------------- 1 | Module Type SET. 2 | Axiom T : Set. 3 | Axiom x : T. 4 | End SET. 5 | 6 | Set Implicit Arguments. 7 | Unset Strict Implicit. 8 | 9 | Module M (X: SET). 10 | Definition T := nat. 11 | Definition x := 0. 12 | Definition f (A : Set) (x : A) := X.x. 13 | End M. 14 | 15 | Module N := M. 16 | 17 | Module Nat. 18 | Definition T := nat. 19 | Definition x := 0. 20 | End Nat. 21 | 22 | Module Z := N Nat. 23 | 24 | Check (Z.f 0). 25 | 26 | Module P (Y: SET) := N. 27 | 28 | Module Y := P Z Nat. 29 | 30 | Check (Y.f 0). 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /test-suite/modules/objects2.v: -------------------------------------------------------------------------------- 1 | (* Check that non logical object loading is done after registration of 2 | the logical objects in the environment 3 | *) 4 | 5 | (* Bug #1118 (simplified version), submitted by Evelyne Contejean 6 | (used to failed in pre-V8.1 trunk because of a call to lookup_mind 7 | for structure objects) 8 | *) 9 | 10 | Module Type S. Record t : Set := { a : nat; b : nat }. End S. 11 | Module Make (X:S). Module Y:=X. End Make. 12 | -------------------------------------------------------------------------------- /test-suite/modules/pliczek.v: -------------------------------------------------------------------------------- 1 | Require Export plik. 2 | 3 | Definition tutu (X : Set) := toto X. -------------------------------------------------------------------------------- /test-suite/modules/plik.v: -------------------------------------------------------------------------------- 1 | Definition toto (x : Set) := x. 2 | 3 | (* : Grammar is replaced by Notation *) -------------------------------------------------------------------------------- /test-suite/modules/pseudo_circular_with.v: -------------------------------------------------------------------------------- 1 | Module Type S. End S. 2 | Module Type T. Declare Module M:S. End T. 3 | Module N:S. End N. 4 | 5 | Module NN:T. Module M:=N. End NN. 6 | Module Type U := T with Module M:=NN. -------------------------------------------------------------------------------- /test-suite/modules/resolver.v: -------------------------------------------------------------------------------- 1 | Module Type TA. 2 | Parameter t : Set. 3 | End TA. 4 | 5 | Module Type TB. 6 | Declare Module A: TA. 7 | End TB. 8 | 9 | Module Type TC. 10 | Declare Module B : TB. 11 | End TC. 12 | 13 | Module Type TD. 14 | 15 | Declare Module B: TB . 16 | Declare Module C: TC 17 | with Module B := B . 18 | End TD. 19 | 20 | Module Type TE. 21 | Declare Module D : TD. 22 | End TE. 23 | 24 | Module Type TF. 25 | Declare Module E: TE. 26 | End TF. 27 | 28 | Module G (D: TD). 29 | Module B' := D.C.B. 30 | End G. 31 | 32 | Module H (F: TF). 33 | Module I := G(F.E.D). 34 | End H. 35 | 36 | Declare Module F: TF. 37 | Module K := H(F). 38 | -------------------------------------------------------------------------------- /test-suite/modules/sig.v: -------------------------------------------------------------------------------- 1 | Module M. 2 | Module Type SIG. 3 | Parameter T : Set. 4 | Parameter x : T. 5 | End SIG. 6 | Module N : SIG. 7 | Definition T := nat. 8 | Definition x := 0. 9 | End N. 10 | End M. 11 | 12 | Module N := M. 13 | 14 | Module Type SPRYT. 15 | Module N. 16 | Definition T := M.N.T. 17 | Parameter x : T. 18 | End N. 19 | End SPRYT. 20 | 21 | Module K : SPRYT := N. 22 | Module K' : SPRYT := M. 23 | 24 | Module Type SIG. 25 | Definition T : Set := M.N.T. 26 | Parameter x : T. 27 | End SIG. 28 | 29 | Module J : SIG := M.N. -------------------------------------------------------------------------------- /test-suite/output/Coercions.out: -------------------------------------------------------------------------------- 1 | P x 2 | : Prop 3 | R x x 4 | : Prop 5 | fun (x : foo) (n : nat) => x n 6 | : foo -> nat -> nat 7 | "1" 0 8 | : PAIR 9 | -------------------------------------------------------------------------------- /test-suite/output/Errors.out: -------------------------------------------------------------------------------- 1 | The command has indeed failed with message: 2 | => Error: The field t is missing in Top.M. 3 | -------------------------------------------------------------------------------- /test-suite/output/Errors.v: -------------------------------------------------------------------------------- 1 | (* Test error messages *) 2 | 3 | (* Test non-regression of bug fixed in r13486 (bad printer for module names) *) 4 | 5 | Module Type S. 6 | Parameter t:Type. 7 | End S. 8 | Module M : S. 9 | Fail End M. 10 | -------------------------------------------------------------------------------- /test-suite/output/Existentials.out: -------------------------------------------------------------------------------- 1 | Existential 1 = ?10 : [q : nat n : nat m : nat |- n = ?9] 2 | Existential 2 = ?9 : [n : nat m : nat |- nat] 3 | Existential 3 = ?7 : [p : nat q := S p : nat n : nat m : nat |- ?9 = m] 4 | -------------------------------------------------------------------------------- /test-suite/output/Existentials.v: -------------------------------------------------------------------------------- 1 | (* Test propagation of clear/clearbody in existential variables *) 2 | 3 | Section Test. 4 | 5 | Variable p:nat. 6 | Let q := S p. 7 | 8 | Goal forall n m:nat, n = m. 9 | intros. 10 | eapply eq_trans. 11 | clearbody q. 12 | clear p. (* Error ... *) 13 | 14 | Show Existentials. 15 | -------------------------------------------------------------------------------- /test-suite/output/Fixpoint.out: -------------------------------------------------------------------------------- 1 | fix F (A B : Set) (f : A -> B) (l : list A) {struct l} : 2 | list B := match l with 3 | | nil => nil 4 | | a :: l0 => f a :: F A B f l0 5 | end 6 | : forall A B : Set, (A -> B) -> list A -> list B 7 | let fix f (m : nat) : nat := match m with 8 | | 0 => 0 9 | | S m' => f m' 10 | end in f 0 11 | : nat 12 | Ltac f id1 id2 := fix id1 2 with (id2 (n:_) (H:odd n) {struct H} : n >= 1) 13 | -------------------------------------------------------------------------------- /test-suite/output/Implicit.out: -------------------------------------------------------------------------------- 1 | compose (C:=nat) S 2 | : (nat -> nat) -> nat -> nat 3 | ex_intro (P:=fun _ : nat => True) (x:=0) I 4 | : ex (fun _ : nat => True) 5 | d2 = fun x : nat => d1 (y:=x) 6 | : forall x x0 : nat, x0 = x -> x0 = x 7 | 8 | Arguments x, x0 are implicit 9 | Argument scopes are [nat_scope nat_scope _] 10 | map id (1 :: nil) 11 | : list nat 12 | map id' (1 :: nil) 13 | : list nat 14 | map (id'' (A:=nat)) (1 :: nil) 15 | : list nat 16 | -------------------------------------------------------------------------------- /test-suite/output/InitSyntax.out: -------------------------------------------------------------------------------- 1 | Inductive sig2 (A : Type) (P Q : A -> Prop) : Type := 2 | exist2 : forall x : A, P x -> Q x -> {x | P x & Q x} 3 | 4 | For sig2: Argument A is implicit 5 | For exist2: Argument A is implicit 6 | For sig2: Argument scopes are [type_scope type_scope type_scope] 7 | For exist2: Argument scopes are [type_scope _ _ _ _ _] 8 | exists x : nat, x = x 9 | : Prop 10 | fun b : bool => if b then b else b 11 | : bool -> bool 12 | -------------------------------------------------------------------------------- /test-suite/output/InitSyntax.v: -------------------------------------------------------------------------------- 1 | (* Soumis par Pierre *) 2 | Print sig2. 3 | Check (exists x : nat, x = x). 4 | Check (fun b : bool => if b then b else b). 5 | -------------------------------------------------------------------------------- /test-suite/output/Intuition.out: -------------------------------------------------------------------------------- 1 | 1 subgoal 2 | 3 | m : Z 4 | n : Z 5 | H : (m >= n)%Z 6 | ============================ 7 | (m >= m)%Z 8 | -------------------------------------------------------------------------------- /test-suite/output/Intuition.v: -------------------------------------------------------------------------------- 1 | Require Import ZArith_base. 2 | Goal forall m n : Z, (m >= n)%Z -> (m >= m)%Z /\ (m >= n)%Z. 3 | intros; intuition. 4 | Show. 5 | Abort. 6 | -------------------------------------------------------------------------------- /test-suite/output/Match_subterm.out: -------------------------------------------------------------------------------- 1 | (0 = 1) 2 | eq 3 | nat 4 | 0 5 | 1 6 | S 7 | 0 8 | 2 9 | -------------------------------------------------------------------------------- /test-suite/output/Match_subterm.v: -------------------------------------------------------------------------------- 1 | Goal 0 = 1. 2 | match goal with 3 | | |- context [?v] => 4 | idtac v ; fail 5 | | _ => idtac 2 6 | end. 7 | -------------------------------------------------------------------------------- /test-suite/output/PrintAssumptions.out: -------------------------------------------------------------------------------- 1 | Axioms: 2 | foo : nat 3 | Axioms: 4 | foo : nat 5 | Axioms: 6 | extensionality : forall (P Q : Type) (f g : P -> Q), 7 | (forall x : P, f x = g x) -> f = g 8 | Axioms: 9 | extensionality : forall (P Q : Type) (f g : P -> Q), 10 | (forall x : P, f x = g x) -> f = g 11 | Axioms: 12 | extensionality : forall (P Q : Type) (f g : P -> Q), 13 | (forall x : P, f x = g x) -> f = g 14 | Axioms: 15 | extensionality : forall (P Q : Type) (f g : P -> Q), 16 | (forall x : P, f x = g x) -> f = g 17 | Closed under the global context 18 | Closed under the global context 19 | -------------------------------------------------------------------------------- /test-suite/output/RealSyntax.out: -------------------------------------------------------------------------------- 1 | 32%R 2 | : R 3 | (-31)%R 4 | : R 5 | -------------------------------------------------------------------------------- /test-suite/output/RealSyntax.v: -------------------------------------------------------------------------------- 1 | Require Import Reals. 2 | Check 32%R. 3 | Check (-31)%R. 4 | -------------------------------------------------------------------------------- /test-suite/output/Record.out: -------------------------------------------------------------------------------- 1 | {| field := 5 |} 2 | : test 3 | {| field := 5 |} 4 | : test 5 | {| field_r := 5 |} 6 | : test_r 7 | build_c 5 8 | : test_c 9 | build 5 10 | : test 11 | build 5 12 | : test 13 | {| field_r := 5 |} 14 | : test_r 15 | build_c 5 16 | : test_c 17 | -------------------------------------------------------------------------------- /test-suite/output/Record.v: -------------------------------------------------------------------------------- 1 | Record test := build { field : nat }. 2 | Record test_r := build_r { field_r : nat }. 3 | Record test_c := build_c { field_c : nat }. 4 | 5 | Add Printing Constructor test_c. 6 | Add Printing Record test_r. 7 | 8 | Set Printing Records. 9 | 10 | Check build 5. 11 | Check {| field := 5 |}. 12 | 13 | Check build_r 5. 14 | Check build_c 5. 15 | 16 | Unset Printing Records. 17 | 18 | Check build 5. 19 | Check {| field := 5 |}. 20 | Check build_r 5. 21 | Check build_c 5. 22 | -------------------------------------------------------------------------------- /test-suite/output/Search.v: -------------------------------------------------------------------------------- 1 | (* Some tests of the Search command *) 2 | 3 | Search le. (* app nodes *) 4 | Search bool. (* no apps *) 5 | Search (@eq nat). (* complex pattern *) 6 | -------------------------------------------------------------------------------- /test-suite/output/SearchPattern.v: -------------------------------------------------------------------------------- 1 | (* Some tests of the SearchPattern command *) 2 | 3 | (* Simple, random tests *) 4 | SearchPattern bool. 5 | SearchPattern nat. 6 | SearchPattern le. 7 | 8 | (* With some hypothesis *) 9 | SearchPattern (nat -> nat). 10 | SearchPattern (?n * ?m + ?n = ?n * S ?m). 11 | 12 | (* Non-linearity *) 13 | SearchPattern (_ ?X ?X). 14 | 15 | (* Non-linearity with hypothesis *) 16 | SearchPattern (forall (x:?A) (y:?B), _ ?A ?B). 17 | 18 | (* No delta-reduction *) 19 | SearchPattern (Exc _). 20 | -------------------------------------------------------------------------------- /test-suite/output/SearchRewrite.out: -------------------------------------------------------------------------------- 1 | plus_n_O: forall n : nat, n = n + 0 2 | plus_O_n: forall n : nat, 0 + n = n 3 | -------------------------------------------------------------------------------- /test-suite/output/SearchRewrite.v: -------------------------------------------------------------------------------- 1 | (* Some tests of the SearchRewrite command *) 2 | 3 | SearchRewrite (_+0). (* left *) 4 | SearchRewrite (0+_). (* right *) 5 | -------------------------------------------------------------------------------- /test-suite/output/Sum.out: -------------------------------------------------------------------------------- 1 | nat + nat + {True} 2 | : Set 3 | {True} + {True} + {True} 4 | : Set 5 | nat + {True} + {True} 6 | : Set 7 | -------------------------------------------------------------------------------- /test-suite/output/Sum.v: -------------------------------------------------------------------------------- 1 | Check (nat + nat + {True}). 2 | Check ({True} + {True} + {True}). 3 | Check (nat + {True} + {True}). 4 | -------------------------------------------------------------------------------- /test-suite/output/Tactics.out: -------------------------------------------------------------------------------- 1 | Ltac f H := split; [ a H | e H ] 2 | Ltac g := match goal with 3 | | |- context [if ?X then _ else _] => case X 4 | end 5 | -------------------------------------------------------------------------------- /test-suite/output/Tactics.v: -------------------------------------------------------------------------------- 1 | (* Test printing of Tactic Notation *) 2 | 3 | Tactic Notation "a" constr(x) := apply x. 4 | Tactic Notation "e" constr(x) := exact x. 5 | 6 | Ltac f H := split; [a H|e H]. 7 | Print Ltac f. 8 | 9 | (* Test printing of match context *) 10 | (* Used to fail after translator removal (see bug #1070) *) 11 | 12 | Ltac g := match goal with |- context [if ?X then _ else _ ] => case X end. 13 | Print Ltac g. 14 | -------------------------------------------------------------------------------- /test-suite/output/TranspModtype.out: -------------------------------------------------------------------------------- 1 | TrM.A = M.A 2 | : Set 3 | OpM.A = M.A 4 | : Set 5 | TrM.B = M.B 6 | : Set 7 | *** [ OpM.B : Set ] 8 | -------------------------------------------------------------------------------- /test-suite/output/TranspModtype.v: -------------------------------------------------------------------------------- 1 | Module Type SIG. 2 | Axiom A : Set. 3 | Axiom B : Set. 4 | End SIG. 5 | 6 | Module M : SIG. 7 | Definition A := nat. 8 | Definition B := nat. 9 | End M. 10 | 11 | Module N <: SIG := M. 12 | 13 | Module TranspId (X: SIG) <: SIG with Definition A := X.A := X. 14 | Module OpaqueId (X: SIG) : SIG with Definition A := X.A := X. 15 | 16 | Module TrM := TranspId M. 17 | Module OpM := OpaqueId M. 18 | 19 | Print TrM.A. 20 | Print OpM.A. 21 | Print TrM.B. 22 | Print OpM.B. 23 | -------------------------------------------------------------------------------- /test-suite/output/ZSyntax.v: -------------------------------------------------------------------------------- 1 | Require Import ZArith. 2 | Check 32%Z. 3 | Check (fun f : nat -> Z => (f 0%nat + 0)%Z). 4 | Check (fun x : positive => Zpos (xO x)). 5 | Check (fun x : positive => (Zpos x + 1)%Z). 6 | Check (fun x : positive => Zpos x). 7 | Check (fun x : positive => Zneg (xO x)). 8 | Check (fun x : positive => (Zpos (xO x) + 0)%Z). 9 | Check (fun x : positive => (- Zpos (xO x))%Z). 10 | Check (fun x : positive => (- Zpos (xO x) + 0)%Z). 11 | Check (Z.of_nat 0 + 1)%Z. 12 | Check (0 + Z.of_nat (0 + 0))%Z. 13 | Check (Z.of_nat 0 = 0%Z). 14 | 15 | (* Submitted by Pierre Casteran *) 16 | Require Import Arith. 17 | Check (0 + Z.of_nat 11)%Z. 18 | -------------------------------------------------------------------------------- /test-suite/output/inference.out: -------------------------------------------------------------------------------- 1 | P = 2 | fun e : option L => match e with 3 | | Some cl => Some cl 4 | | None => None 5 | end 6 | : option L -> option L 7 | -------------------------------------------------------------------------------- /test-suite/output/inference.v: -------------------------------------------------------------------------------- 1 | (* Check that types are not uselessly unfolded *) 2 | 3 | (* Check here that P returns something of type "option L" and not 4 | "option (list nat)" *) 5 | 6 | Definition L := list nat. 7 | 8 | Definition P (e:option L) := 9 | match e with 10 | | None => None 11 | | Some cl => Some cl 12 | end. 13 | 14 | Print P. 15 | -------------------------------------------------------------------------------- /test-suite/output/names.out: -------------------------------------------------------------------------------- 1 | The command has indeed failed with message: 2 | => Error: In environment 3 | y : nat 4 | The term "a y" has type "{y0 : nat | y = y0}" 5 | while it is expected to have type "{x : nat | x = y}". 6 | -------------------------------------------------------------------------------- /test-suite/output/names.v: -------------------------------------------------------------------------------- 1 | (* Test no clash names occur *) 2 | (* see bug #2723 *) 3 | 4 | Parameter a : forall x, {y:nat|x=y}. 5 | Fail Definition b y : {x:nat|x=y} := a y. 6 | -------------------------------------------------------------------------------- /test-suite/output/reduction.out: -------------------------------------------------------------------------------- 1 | = a 2 | : nat 3 | = n + 0 4 | : nat 5 | -------------------------------------------------------------------------------- /test-suite/output/reduction.v: -------------------------------------------------------------------------------- 1 | (* Test the behaviour of hnf and simpl introduced in revision *) 2 | 3 | Variable n:nat. 4 | Definition a:=0. 5 | 6 | Eval simpl in (fix plus (n m : nat) {struct n} : nat := 7 | match n with 8 | | 0 => m 9 | | S p => S (p + m) 10 | end) a a. 11 | 12 | Eval hnf in match (plus (S n) O) with S n => n | _ => O end. 13 | 14 | -------------------------------------------------------------------------------- /test-suite/output/rewrite-2172.out: -------------------------------------------------------------------------------- 1 | The command has indeed failed with message: 2 | => Error: Unable to find an instance for the variable E. 3 | -------------------------------------------------------------------------------- /test-suite/output/set.out: -------------------------------------------------------------------------------- 1 | 1 subgoal 2 | 3 | y1 := 0 : nat 4 | x := 0 + 0 : nat 5 | ============================ 6 | x = x 7 | 1 subgoal 8 | 9 | y1 := 0 : nat 10 | y2 := 0 : nat 11 | x := y2 + 0 : nat 12 | ============================ 13 | x = x 14 | 1 subgoal 15 | 16 | y1 := 0 : nat 17 | y2 := 0 : nat 18 | y3 := 0 : nat 19 | x := y2 + y3 : nat 20 | ============================ 21 | x = x 22 | -------------------------------------------------------------------------------- /test-suite/output/set.v: -------------------------------------------------------------------------------- 1 | Goal let x:=O+O in x=x. 2 | intro. 3 | set (y1:=O) in (type of x). 4 | Show. 5 | set (y2:=O) in (value of x) at 1. 6 | Show. 7 | set (y3:=O) in (value of x). 8 | Show. 9 | trivial. 10 | Qed. 11 | -------------------------------------------------------------------------------- /test-suite/output/simpl.out: -------------------------------------------------------------------------------- 1 | 1 subgoal 2 | 3 | x : nat 4 | ============================ 5 | x = S x 6 | 1 subgoal 7 | 8 | x : nat 9 | ============================ 10 | 0 + x = S x 11 | 1 subgoal 12 | 13 | x : nat 14 | ============================ 15 | x = 1 + x 16 | -------------------------------------------------------------------------------- /test-suite/output/simpl.v: -------------------------------------------------------------------------------- 1 | (* Simpl with patterns *) 2 | 3 | Goal forall x, 0+x = 1+x. 4 | intro x. 5 | simpl (_ + x). 6 | Show. 7 | Undo. 8 | simpl (_ + x) at 2. 9 | Show. 10 | Undo. 11 | simpl (0 + _). 12 | Show. 13 | Undo. 14 | -------------------------------------------------------------------------------- /test-suite/prerequisite/make_local.v: -------------------------------------------------------------------------------- 1 | (* Used in Import.v to test the locality flag *) 2 | 3 | Definition f (A:Type) (a:A) := a. 4 | 5 | Local Arguments Scope f [type_scope type_scope]. 6 | Local Implicit Arguments f [A]. 7 | 8 | (* Used in ImportedCoercion.v to test the locality flag *) 9 | 10 | Local Coercion g (b:bool) := if b then 0 else 1. 11 | -------------------------------------------------------------------------------- /test-suite/prerequisite/make_notation.v: -------------------------------------------------------------------------------- 1 | (* Used in Notation.v to test import of notations from files in sections *) 2 | 3 | Notation "'Z'" := O (at level 9). 4 | Notation plus := plus. 5 | Notation succ := S. 6 | Notation mult := mult (only parsing). 7 | Notation less := le (only parsing). 8 | 9 | (* Test bug 2168: ending section of some name was removing objects of the 10 | same name *) 11 | 12 | Notation add2 n:=(S n). 13 | Section add2. 14 | End add2. 15 | 16 | -------------------------------------------------------------------------------- /test-suite/success/Abstract.v: -------------------------------------------------------------------------------- 1 | 2 | (* Cf coqbugs #546 *) 3 | 4 | Require Import Omega. 5 | 6 | Section S. 7 | 8 | Variables n m : nat. 9 | Variable H : n Set := 12 | | Dummy0 : Dummy 0 13 | | Dummy2 : Dummy 2 14 | | DummyApp : forall i j, Dummy i -> Dummy j -> Dummy (i+j). 15 | 16 | Definition Bug : Dummy (2*n). 17 | Proof. 18 | induction n. 19 | simpl ; apply Dummy0. 20 | replace (2 * S n0) with (2*n0 + 2) ; auto with arith. 21 | apply DummyApp. 22 | 2:exact Dummy2. 23 | apply IHn0 ; abstract omega. 24 | Defined. 25 | 26 | End S. 27 | 28 | -------------------------------------------------------------------------------- /test-suite/success/Case1.v: -------------------------------------------------------------------------------- 1 | (* Testing eta-expansion of elimination predicate *) 2 | 3 | Section NATIND2. 4 | Variable P : nat -> Type. 5 | Variable H0 : P 0. 6 | Variable H1 : P 1. 7 | Variable H2 : forall n : nat, P n -> P (S (S n)). 8 | Fixpoint nat_ind2 (n : nat) : P n := 9 | match n as x return (P x) with 10 | | O => H0 11 | | S O => H1 12 | | S (S n) => H2 n (nat_ind2 n) 13 | end. 14 | End NATIND2. 15 | 16 | -------------------------------------------------------------------------------- /test-suite/success/Case11.v: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/test-suite/success/Case11.v -------------------------------------------------------------------------------- /test-suite/success/Case14.v: -------------------------------------------------------------------------------- 1 | (* Test of inference of elimination predicate for "if" *) 2 | (* submitted by Robert R Schneck *) 3 | 4 | Axiom bad : false = true. 5 | 6 | Definition try1 : False := 7 | match bad in (_ = b) return (if b then False else True) with 8 | | refl_equal => I 9 | end. 10 | 11 | Definition try2 : False := 12 | match bad in (_ = b) return ((if b then False else True):Prop) with 13 | | refl_equal => I 14 | end. 15 | 16 | Definition try3 : False := 17 | match 18 | bad in (_ = b) return ((fun b' : bool => if b' then False else True) b) 19 | with 20 | | refl_equal => I 21 | end. 22 | -------------------------------------------------------------------------------- /test-suite/success/Case16.v: -------------------------------------------------------------------------------- 1 | (**********************************************************************) 2 | (* Test dependencies in constructors *) 3 | (**********************************************************************) 4 | 5 | Check 6 | (fun x : {b : bool | if b then True else False} => 7 | match x return (let (b, _) := x in if b then True else False) with 8 | | exist true y => y 9 | | exist false z => z 10 | end). 11 | -------------------------------------------------------------------------------- /test-suite/success/Case18.v: -------------------------------------------------------------------------------- 1 | (* Check or-patterns *) 2 | 3 | Definition g x := 4 | match x with ((((1 as x),_) | (_,x)), (_,(2 as y))|(y,_)) => (x,y) end. 5 | 6 | Check (refl_equal _ : g ((1,2),(3,4)) = (1,3)). 7 | 8 | Check (refl_equal _ : g ((1,4),(3,2)) = (1,2)). 9 | 10 | Fixpoint max (n m:nat) {struct m} : nat := 11 | match n, m with 12 | | S n', S m' => S (max n' m') 13 | | 0, p | p, 0 => p 14 | end. 15 | 16 | (* Check bug #1477 *) 17 | 18 | Inductive I : Set := 19 | | A : nat -> nat -> I 20 | | B : nat -> nat -> I. 21 | 22 | Definition foo (x:I) : nat := 23 | match x with 24 | | A a b | B b a => S b 25 | end. 26 | 27 | -------------------------------------------------------------------------------- /test-suite/success/Case19.v: -------------------------------------------------------------------------------- 1 | (* This used to fail in Coq version 8.1 beta due to a non variable 2 | universe (issued by the inductive sort-polymorphism) being sent by 3 | pretyping to the kernel (bug #1182) *) 4 | 5 | Variable T : Type. 6 | Variable x : nat*nat. 7 | 8 | Check let (_, _) := x in sigT (fun _ : T => nat). 9 | -------------------------------------------------------------------------------- /test-suite/success/Case2.v: -------------------------------------------------------------------------------- 1 | (* ============================================== *) 2 | (* To test compilation of dependent case *) 3 | (* Nested patterns *) 4 | (* ============================================== *) 5 | 6 | Type 7 | match 0 as n return (n = n) with 8 | | O => refl_equal 0 9 | | m => refl_equal m 10 | end. 11 | 12 | 13 | -------------------------------------------------------------------------------- /test-suite/success/Case5.v: -------------------------------------------------------------------------------- 1 | 2 | Parameter ff : forall n m : nat, n <> m -> S n <> S m. 3 | Parameter discr_r : forall n : nat, 0 <> S n. 4 | Parameter discr_l : forall n : nat, S n <> 0. 5 | 6 | 7 | Type 8 | (fun n : nat => 9 | match n return (n = 0 \/ n <> 0) with 10 | | O => or_introl (0 <> 0) (refl_equal 0) 11 | | S O => or_intror (1 = 0) (discr_l 0) 12 | | S (S x) => or_intror (S (S x) = 0) (discr_l (S x)) 13 | end). 14 | -------------------------------------------------------------------------------- /test-suite/success/Case6.v: -------------------------------------------------------------------------------- 1 | Parameter ff : forall n m : nat, n <> m -> S n <> S m. 2 | Parameter discr_r : forall n : nat, 0 <> S n. 3 | Parameter discr_l : forall n : nat, S n <> 0. 4 | 5 | Fixpoint eqdec (n m : nat) {struct n} : n = m \/ n <> m := 6 | match n, m return (n = m \/ n <> m) with 7 | | O, O => or_introl (0 <> 0) (refl_equal 0) 8 | | O, S x => or_intror (0 = S x) (discr_r x) 9 | | S x, O => or_intror _ (discr_l x) 10 | | S x as N, S y as M => 11 | match eqdec x y return (N = M \/ N <> M) with 12 | | or_introl h => or_introl (N <> M) (f_equal S h) 13 | | or_intror h => or_intror (N = M) (ff x y h) 14 | end 15 | end. 16 | -------------------------------------------------------------------------------- /test-suite/success/Case7.v: -------------------------------------------------------------------------------- 1 | Inductive List (A : Set) : Set := 2 | | Nil : List A 3 | | Cons : A -> List A -> List A. 4 | 5 | Inductive Empty (A : Set) : List A -> Prop := 6 | intro_Empty : Empty A (Nil A). 7 | 8 | Parameter 9 | inv_Empty : forall (A : Set) (a : A) (x : List A), ~ Empty A (Cons A a x). 10 | 11 | 12 | Type 13 | (fun (A : Set) (l : List A) => 14 | match l return (Empty A l \/ ~ Empty A l) with 15 | | Nil => or_introl (~ Empty A (Nil A)) (intro_Empty A) 16 | | Cons a y as b => or_intror (Empty A b) (inv_Empty A a y) 17 | end). 18 | -------------------------------------------------------------------------------- /test-suite/success/Case8.v: -------------------------------------------------------------------------------- 1 | (* Check dependencies in the matching predicate (was failing in V8.0pl1) *) 2 | 3 | Inductive t : forall x : 0 = 0, x = x -> Prop := 4 | c : forall x : 0 = 0, t x (refl_equal x). 5 | 6 | Definition a (x : t _ (refl_equal (refl_equal 0))) := 7 | match x return match x with 8 | | c y => Prop 9 | end with 10 | | c y => y = y 11 | end. 12 | -------------------------------------------------------------------------------- /test-suite/success/Cases-bug1834.v: -------------------------------------------------------------------------------- 1 | (* Bug in the computation of generalization *) 2 | 3 | (* The following bug, elaborated by Bruno Barras, is solved from r11083 *) 4 | 5 | Parameter P : unit -> Prop. 6 | Definition T := sig P. 7 | Parameter Q : T -> Prop. 8 | Definition U := sig Q. 9 | Parameter a : U. 10 | Check (match a with exist (exist tt e2) e3 => e3=e3 end). 11 | 12 | (* There is still a form submitted by Pierre Corbineau (#1834) which fails *) 13 | 14 | -------------------------------------------------------------------------------- /test-suite/success/Conjecture.v: -------------------------------------------------------------------------------- 1 | (* Check keywords Conjecture and Admitted are recognized *) 2 | 3 | Conjecture c : forall n : nat, n = 0. 4 | 5 | Check c. 6 | 7 | Theorem d : forall n : nat, n = 0. 8 | Proof. 9 | induction n. 10 | reflexivity. 11 | assert (H : False). 12 | 2: destruct H. 13 | Admitted. 14 | -------------------------------------------------------------------------------- /test-suite/success/DHyp.v: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /test-suite/success/Decompose.v: -------------------------------------------------------------------------------- 1 | (* This was a Decompose bug reported by Randy Pollack (29 Mar 2000) *) 2 | 3 | Goal 4 | 0 = 0 /\ (forall x : nat, x = x -> x = x /\ (forall y : nat, y = y -> y = y)) -> 5 | True. 6 | intro H. 7 | decompose [and] H. (* Was failing *) 8 | 9 | Abort. 10 | -------------------------------------------------------------------------------- /test-suite/success/DiscrR.v: -------------------------------------------------------------------------------- 1 | Require Import Reals. 2 | Require Import DiscrR. 3 | 4 | Lemma ex0 : 1%R <> 0%R. 5 | Proof. 6 | discrR. 7 | Qed. 8 | 9 | Lemma ex1 : 0%R <> 2%R. 10 | Proof. 11 | discrR. 12 | Qed. 13 | Lemma ex2 : 4%R <> 3%R. 14 | Proof. 15 | discrR. 16 | Qed. 17 | 18 | Lemma ex3 : 3%R <> 5%R. 19 | Proof. 20 | discrR. 21 | Qed. 22 | 23 | Lemma ex4 : (-1)%R <> 0%R. 24 | Proof. 25 | discrR. 26 | Qed. 27 | 28 | Lemma ex5 : (-2)%R <> (-3)%R. 29 | Proof. 30 | discrR. 31 | Qed. 32 | 33 | Lemma ex6 : 8%R <> (-3)%R. 34 | Proof. 35 | discrR. 36 | Qed. 37 | 38 | Lemma ex7 : (-8)%R <> 3%R. 39 | Proof. 40 | discrR. 41 | Qed. 42 | -------------------------------------------------------------------------------- /test-suite/success/Fourier.v: -------------------------------------------------------------------------------- 1 | Require Import Rfunctions. 2 | Require Import Fourier. 3 | 4 | Lemma l1 : forall x y z : R, Rabs (x - z) <= Rabs (x - y) + Rabs (y - z). 5 | intros; split_Rabs; fourier. 6 | Qed. 7 | 8 | Lemma l2 : 9 | forall x y : R, x < Rabs y -> y < 1 -> x >= 0 -> - y <= 1 -> Rabs x <= 1. 10 | intros. 11 | split_Rabs; fourier. 12 | Qed. 13 | -------------------------------------------------------------------------------- /test-suite/success/Generalization.v: -------------------------------------------------------------------------------- 1 | Generalizable All Variables. 2 | 3 | Check `(a = 0). 4 | Check `(a = 0)%type. 5 | Definition relation A := A -> A -> Prop. 6 | Definition equivalence `(R : relation A) := True. 7 | Check (`(@equivalence A R)). 8 | 9 | Definition a_eq_b : `( a = 0 /\ a = b /\ b > c \/ d = e /\ d = 1). 10 | Admitted. 11 | Print a_eq_b. 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /test-suite/success/Generalize.v: -------------------------------------------------------------------------------- 1 | (* Check Generalize Dependent *) 2 | 3 | Lemma l1 : 4 | let a := 0 in let b := a in forall (c : b = b) (d : True -> b = b), d = d. 5 | intros. 6 | generalize dependent a. 7 | intros a b c d. 8 | Abort. 9 | -------------------------------------------------------------------------------- /test-suite/success/ImplicitArguments.v: -------------------------------------------------------------------------------- 1 | Inductive vector {A : Type} : nat -> Type := 2 | | vnil : vector 0 3 | | vcons : A -> forall {n'}, vector n' -> vector (S n'). 4 | 5 | Implicit Arguments vector []. 6 | 7 | Require Import Coq.Program.Program. 8 | 9 | Program Definition head {A : Type} {n : nat} (v : vector A (S n)) : vector A n := 10 | match v with 11 | | vnil => ! 12 | | vcons a n' v' => v' 13 | end. 14 | 15 | Fixpoint app {A : Type} {n m : nat} (v : vector A n) (w : vector A m) : vector A (n + m) := 16 | match v in vector _ n return vector A (n + m) with 17 | | vnil => w 18 | | vcons a n' v' => vcons a (app v' w) 19 | end. 20 | -------------------------------------------------------------------------------- /test-suite/success/ImplicitTactic.v: -------------------------------------------------------------------------------- 1 | (* A Wiedijk-Cruz-Filipe style tactic for solving implicit arguments *) 2 | 3 | (* Declare a term expression with a hole *) 4 | Parameter quo : nat -> forall n:nat, n<>0 -> nat. 5 | Notation "x / y" := (quo x y _) : nat_scope. 6 | 7 | (* Declare the tactic for resolving implicit arguments still 8 | unresolved after type-checking; it must complete the subgoal to 9 | succeed *) 10 | Declare Implicit Tactic assumption. 11 | 12 | Goal forall n d, d<>0 -> { q:nat & { r:nat | d * q + r = n }}. 13 | intros. 14 | (* Here, assumption is used to solve the implicit argument of quo *) 15 | exists (n / d). 16 | 17 | -------------------------------------------------------------------------------- /test-suite/success/Import.v: -------------------------------------------------------------------------------- 1 | (* Test visibility of imported objects *) 2 | 3 | Require Import make_local. 4 | 5 | (* Check local implicit arguments are not imported *) 6 | 7 | Check (f nat 0). 8 | 9 | (* Check local arguments scopes are not imported *) 10 | 11 | Check (f nat (0*0)). 12 | -------------------------------------------------------------------------------- /test-suite/success/LetIn.v: -------------------------------------------------------------------------------- 1 | (* Simple let-in's *) 2 | Definition l1 := let P := 0 in P. 3 | Definition l2 := let P := nat in P. 4 | Definition l3 := let P := True in P. 5 | Definition l4 := let P := Prop in P. 6 | Definition l5 := let P := Type in P. 7 | 8 | (* Check casting of let-in *) 9 | Definition l6 := let P := 0:nat in P. 10 | Definition l7 := let P := True:Prop in P. 11 | Definition l8 := let P := True:Type in P. 12 | -------------------------------------------------------------------------------- /test-suite/success/MatchFail.v: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/test-suite/success/MatchFail.v -------------------------------------------------------------------------------- /test-suite/success/Mod_ltac.v: -------------------------------------------------------------------------------- 1 | (* Submitted by Houda Anoun *) 2 | 3 | Module toto. 4 | Ltac titi := auto. 5 | End toto. 6 | 7 | Module ti. 8 | Import toto. 9 | Ltac equal := match goal with 10 | | |- (?X1 = ?X1) => titi 11 | | |- _ => idtac 12 | end. 13 | 14 | End ti. 15 | 16 | Import ti. 17 | Definition simple : forall a : nat, a = a. 18 | intro. 19 | equal. 20 | Qed. 21 | -------------------------------------------------------------------------------- /test-suite/success/Mod_type.v: -------------------------------------------------------------------------------- 1 | (* Check bug #1025 submitted by Pierre-Luc Carmel Biron *) 2 | 3 | Module Type FOO. 4 | Parameter A : Type. 5 | End FOO. 6 | 7 | Module Type BAR. 8 | Declare Module Foo : FOO. 9 | End BAR. 10 | 11 | Module Bar : BAR. 12 | 13 | Module Fu : FOO. 14 | Definition A := Prop. 15 | End Fu. 16 | 17 | Module Foo := Fu. 18 | 19 | End Bar. 20 | -------------------------------------------------------------------------------- /test-suite/success/NatRing.v: -------------------------------------------------------------------------------- 1 | Require Import ArithRing. 2 | 3 | Lemma l1 : 2 = 1 + 1. 4 | ring. 5 | Qed. 6 | 7 | Lemma l2 : forall x : nat, S (S x) = 1 + S x. 8 | intro. 9 | ring. 10 | Qed. 11 | -------------------------------------------------------------------------------- /test-suite/success/PPFix.v: -------------------------------------------------------------------------------- 1 | 2 | (* To test PP of fixpoints *) 3 | Require Import Arith. 4 | Check fix a(n: nat): n<5 -> nat := 5 | match n return n<5 -> nat with 6 | | 0 => fun _ => 0 7 | | S n => fun h => S (a n (lt_S_n _ _ (lt_S _ _ h))) 8 | end. 9 | 10 | -------------------------------------------------------------------------------- /test-suite/success/Print.v: -------------------------------------------------------------------------------- 1 | Print Tables. 2 | Print ML Path. 3 | Print ML Modules. 4 | Print LoadPath. 5 | Print Graph. 6 | Print Coercions. 7 | Print Classes. 8 | Print nat. 9 | Print Term O. 10 | Print All. 11 | Print Grammar constr. 12 | Inspect 10. 13 | 14 | Section A. 15 | Coercion f (x : nat) : Prop := True. 16 | Print Coercion Paths nat Sortclass. 17 | 18 | Print Section A. 19 | 20 | -------------------------------------------------------------------------------- /test-suite/success/PrintSortedUniverses.v: -------------------------------------------------------------------------------- 1 | Require Reals. 2 | Print Sorted Universes. 3 | -------------------------------------------------------------------------------- /test-suite/success/Remark.v: -------------------------------------------------------------------------------- 1 | (* Test obsolete, Remark est maintenant global 2 | Section A. 3 | Section B. 4 | Section C. 5 | Remark t : True. Proof I. 6 | End C. 7 | Locate C.t. 8 | End B. 9 | Locate B.C.t. 10 | End A. 11 | Locate A.B.C.t. 12 | *) 13 | -------------------------------------------------------------------------------- /test-suite/success/Rename.v: -------------------------------------------------------------------------------- 1 | Goal forall n : nat, n = 0 -> n = 0. 2 | intros. 3 | rename n into p. 4 | induction p; auto. 5 | Qed. 6 | 7 | (* Submitted by Iris Loeb (#842) *) 8 | 9 | Section rename. 10 | 11 | Variable A:Prop. 12 | 13 | Lemma Tauto: A->A. 14 | rename A into B. 15 | tauto. 16 | Qed. 17 | 18 | End rename. 19 | -------------------------------------------------------------------------------- /test-suite/success/Reordering.v: -------------------------------------------------------------------------------- 1 | (* Testing the reordering of hypothesis required by pattern, fold and change. *) 2 | Goal forall (A:Set) (x:A) (A':=A), True. 3 | intros. 4 | fold A' in x. (* suceeds: x is moved after A' *) 5 | Undo. 6 | pattern A' in x. 7 | Undo. 8 | change A' in x. 9 | Abort. 10 | 11 | (* p and m should be moved before H *) 12 | Goal forall n:nat, n=n -> forall m:nat, let p := (m,n) in True. 13 | intros. 14 | change n with (snd p) in H. 15 | Abort. 16 | -------------------------------------------------------------------------------- /test-suite/success/Require.v: -------------------------------------------------------------------------------- 1 | Require Import Coq.Arith.Plus. 2 | Require Coq.Arith.Minus. 3 | Locate Library Coq.Arith.Minus. 4 | -------------------------------------------------------------------------------- /test-suite/success/Scheme.v: -------------------------------------------------------------------------------- 1 | (* This failed in 8.3pl2 *) 2 | 3 | Scheme Induction for eq Sort Prop. 4 | Check eq_ind_dep. 5 | -------------------------------------------------------------------------------- /test-suite/success/Scopes.v: -------------------------------------------------------------------------------- 1 | (* Check exportation of Argument Scopes even without import of modules *) 2 | 3 | Require Import ZArith. 4 | 5 | Module A. 6 | Definition opp := Zopp. 7 | End A. 8 | Check (A.opp 3). 9 | 10 | (* Test extra scopes to be used in the presence of coercions *) 11 | 12 | Record B := { f :> Z -> Z }. 13 | Variable a:B. 14 | Arguments Scope a [Z_scope]. 15 | Check a 0. 16 | -------------------------------------------------------------------------------- /test-suite/success/Section.v: -------------------------------------------------------------------------------- 1 | (* Test bug 2168: ending section of some name was removing objects of the 2 | same name *) 3 | 4 | Require Import make_notation. 5 | 6 | Check add2 3. 7 | -------------------------------------------------------------------------------- /test-suite/success/Simplify_eq.v: -------------------------------------------------------------------------------- 1 | (* Check the behaviour of Simplify_eq *) 2 | 3 | (* Check that Simplify_eq tries Intro until *) 4 | 5 | Lemma l1 : 0 = 1 -> False. 6 | simplify_eq 1. 7 | Qed. 8 | 9 | Lemma l2 : forall (x : nat) (H : S x = S (S x)), H = H -> False. 10 | simplify_eq H. 11 | intros. 12 | apply (n_Sn x H0). 13 | Qed. 14 | -------------------------------------------------------------------------------- /test-suite/success/TestRefine.v: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/test-suite/success/TestRefine.v -------------------------------------------------------------------------------- /test-suite/success/Try.v: -------------------------------------------------------------------------------- 1 | (* To shorten interactive scripts, it is better that Try catches 2 | non-existent names in Unfold [cf bug #263] *) 3 | 4 | Lemma lem1 : True. 5 | try unfold i_dont_exist in |- *. 6 | trivial. 7 | Qed. 8 | 9 | -------------------------------------------------------------------------------- /test-suite/success/autointros.v: -------------------------------------------------------------------------------- 1 | Set Automatic Introduction. 2 | 3 | Inductive even : nat -> Prop := 4 | | even_0 : even 0 5 | | even_odd : forall n, odd n -> even (S n) 6 | with odd : nat -> Prop := 7 | | odd_1 : odd 1 8 | | odd_even : forall n, even n -> odd (S n). 9 | 10 | Lemma foo {n : nat} (E : even n) : even (S (S n)) 11 | with bar {n : nat} (O : odd n) : odd (S (S n)). 12 | Proof. destruct E. constructor. constructor. apply even_odd. apply (bar _ H). 13 | destruct O. repeat constructor. apply odd_even. apply (foo _ H). 14 | Defined. 15 | 16 | -------------------------------------------------------------------------------- /test-suite/success/bullet.v: -------------------------------------------------------------------------------- 1 | Goal True /\ True. 2 | split. 3 | - exact I. 4 | - exact I. 5 | Qed. 6 | -------------------------------------------------------------------------------- /test-suite/success/clear.v: -------------------------------------------------------------------------------- 1 | Goal forall x:nat, (forall x, x=0 -> True)->True. 2 | intros; eapply H. 3 | instantiate (1:=(fun y => _) (S x)). 4 | simpl. 5 | clear x. trivial. 6 | Qed. 7 | 8 | Goal forall y z, (forall x:nat, x=y -> True) -> y=z -> True. 9 | intros; eapply H. 10 | rename z into z'. 11 | clear H0. 12 | clear z'. 13 | reflexivity. 14 | Qed. 15 | 16 | -------------------------------------------------------------------------------- /test-suite/success/coqbugs0181.v: -------------------------------------------------------------------------------- 1 | 2 | (* test the strength of pretyping unification *) 3 | 4 | Require Import List. 5 | Definition listn A n := {l : list A | length l = n}. 6 | Definition make_ln A n (l : list A) (h : (fun l => length l = n) l) := 7 | exist _ l h. 8 | -------------------------------------------------------------------------------- /test-suite/success/evars.v: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/test-suite/success/evars.v -------------------------------------------------------------------------------- /test-suite/success/guard.v: -------------------------------------------------------------------------------- 1 | (* Specific tests about guard condition *) 2 | 3 | (* f must unfold to x, not F (de Bruijn mix-up!) *) 4 | Check let x (f:nat->nat) k := f k in 5 | fun (y z:nat->nat) => 6 | let f:=x in (* f := Rel 3 *) 7 | fix F (n:nat) : nat := 8 | match n with 9 | | 0 => 0 10 | | S k => f F k (* here Rel 3 = F ! *) 11 | end. 12 | -------------------------------------------------------------------------------- /test-suite/success/if.v: -------------------------------------------------------------------------------- 1 | (* The synthesis of the elimination predicate may fail if algebric *) 2 | (* universes are not cautiously treated *) 3 | 4 | Check (fun b : bool => if b then Type else nat). 5 | 6 | (* Check correct use of if-then-else predicate annotation (cf bug 690) *) 7 | 8 | Check fun b : bool => 9 | if b as b0 return (if b0 then b0 = true else b0 = false) 10 | then refl_equal true 11 | else refl_equal false. 12 | 13 | -------------------------------------------------------------------------------- /test-suite/success/implicit.v: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/test-suite/success/implicit.v -------------------------------------------------------------------------------- /test-suite/success/inds_type_sec.v: -------------------------------------------------------------------------------- 1 | (************************************************************************) 2 | (* v * The Coq Proof Assistant / The Coq Development Team *) 3 | (* T U. 11 | End S. 12 | -------------------------------------------------------------------------------- /test-suite/success/instantiate.v: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/test-suite/success/instantiate.v -------------------------------------------------------------------------------- /test-suite/success/intros.v: -------------------------------------------------------------------------------- 1 | (* Thinning introduction hypothesis must be done after all introductions *) 2 | (* Submitted by Guillaume Melquiond (bug #1000) *) 3 | 4 | Goal forall A, A -> True. 5 | intros _ _. 6 | 7 | 8 | -------------------------------------------------------------------------------- /test-suite/success/ltac.v: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/test-suite/success/ltac.v -------------------------------------------------------------------------------- /test-suite/success/params_ind.v: -------------------------------------------------------------------------------- 1 | Inductive list (A : Set) : Set := 2 | | nil : list A 3 | | cons : A -> list (A -> A) -> list A. 4 | 5 | -------------------------------------------------------------------------------- /test-suite/success/parsing.v: -------------------------------------------------------------------------------- 1 | Section A. 2 | Notation "*" := O (at level 8). 3 | Notation "**" := O (at level 99). 4 | Notation "***" := O (at level 9). 5 | End A. 6 | Notation "*" := O (at level 8). 7 | Notation "**" := O (at level 99). 8 | Notation "***" := O (at level 9). 9 | -------------------------------------------------------------------------------- /test-suite/success/polymorphism.v: -------------------------------------------------------------------------------- 1 | (* Some tests of sort-polymorphisme *) 2 | Section S. 3 | Variable A:Type. 4 | (* 5 | Definition f (B:Type) := (A * B)%type. 6 | *) 7 | Inductive I (B:Type) : Type := prod : A->B->I B. 8 | End S. 9 | (* 10 | Check f nat nat : Set. 11 | *) 12 | Check I nat nat : Set. -------------------------------------------------------------------------------- /test-suite/success/refine.v: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/test-suite/success/refine.v -------------------------------------------------------------------------------- /test-suite/success/remember.v: -------------------------------------------------------------------------------- 1 | (* Testing remember and co *) 2 | 3 | Lemma A : forall (P: forall X, X -> Prop), P nat 0 -> P nat 0. 4 | intros. 5 | Fail remember nat as X. 6 | Fail remember nat as X in H. (* This line used to succeed in 8.3 *) 7 | Fail remember nat as X in |- *. 8 | Abort. 9 | -------------------------------------------------------------------------------- /test-suite/success/rewrite_in.v: -------------------------------------------------------------------------------- 1 | Require Import Setoid. 2 | 3 | Goal forall (P Q : Prop) (f:P->Prop) (p:P), (P<->Q) -> f p -> True. 4 | intros P Q f p H. 5 | rewrite H in p || trivial. 6 | Qed. 7 | 8 | 9 | -------------------------------------------------------------------------------- /test-suite/success/set.v: -------------------------------------------------------------------------------- 1 | Goal forall n, n+n=0->0=n+n. 2 | intros. 3 | 4 | (* This used to fail in 8.0pl1 *) 5 | set n in * |-. 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /test-suite/typeclasses/NewSetoid.v: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/test-suite/typeclasses/NewSetoid.v -------------------------------------------------------------------------------- /theories/Arith/Arith.v: -------------------------------------------------------------------------------- 1 | (************************************************************************) 2 | (* v * The Coq Proof Assistant / The Coq Development Team *) 3 | (*