aboutsummaryrefslogtreecommitdiff
path: root/theories/Structures
AgeCommit message (Collapse)Author
2021-03-19Merge PR #13730: Lint stdlib with -mangle-names #6coqbot-app[bot]
Reviewed-by: anton-trunov
2021-01-18Support locality attributes for Hint Rewrite (including export)Gaëtan Gilbert
We deprecate unspecified locality as was done for Hint. Close #13724
2021-01-08Modify Structures/OrderedType.v to compile with -mangle-namesJasper Hugunin
2021-01-08Modify Structures/DecidableType.v to compile with -mangle-namesJasper Hugunin
2020-11-16Explicitly annotate all hint declarations of the standard library.Pierre-Marie Pédrot
By default Coq stdlib warnings raise an error, so this is really required.
2020-10-05Adapting theories to unused pattern-matching variable warning.Hugo Herbelin
2020-08-25Modify Structures/GenericMinMax.v to compile with -mangle-namesJasper Hugunin
2020-08-25Modify Structures/OrdersFacts.v to compile with -mangle-namesJasper Hugunin
2020-08-25Modify Structures/OrdersTac.v to compile with -mangle-namesJasper Hugunin
2020-08-25Modify Structures/Orders.v to compile with -mangle-namesJasper Hugunin
2020-05-04add order properties about boolOlivier Laurent
2020-04-07Integrated changes proposed by @JasonGrossilya
2020-04-07proposed fix for the issue #12015 (String_as_OT)ilya
2020-03-23Fix levels of `<=?` and `<?` in the stdlibJason Gross
They were defined at level 70, no associativity in all but three places, where they were instead declared at level 35. Fixes #11890
2020-03-19firstorder: default tactic is “auto with core”Vincent Laporte
2020-03-18Update headers in the whole code base.Théo Zimmermann
Add headers to a few files which were missing them.
2019-10-31lia: depend only on ZArith_baseVincent Laporte
2019-10-22OrderedTypeEx: do not use “omega”Vincent Laporte
2019-10-04[Stdlib] OrderedType: do not pollute the “core” hint databaseVincent Laporte
2019-06-17Update ml-style headers to new year.Théo Zimmermann
2019-05-23Fixing typos - Part 3JPR
2019-05-01Add PairUsualDecidableTypeFullOliver Nash
A module allowing the user to build a UsualDecidableTypeFull from a pair of such, exactly analogous to the extant PairDecidableType and PairUsualDecidableType modules. Co-authored-by: Jean-Christophe Léchenet <eponier@via.ecp.fr>
2019-03-30Error when [foo.(bar)] is used with nonprojection [bar]Gaëtan Gilbert
(warn if bar is a nonprimitive projection)
2019-01-23Pass some files to strict focusing mode.Gaëtan Gilbert
ie default goal selector ! How to do this: - change the default value of default goal selector in goal_select.ml - eval the emacs code in this commit message - compile Coq and in each erroring file repeatedly run [C-c f] (my/maybe-fix-buller-error) then [C-c C-b] (proof-process-buffer) until there are no errors (NB the first [C-c f] has no effect). You need to watch for 2 cases: - overly deep proofs where the bullets need to go beyond the list in my/bullet-stack (6 layers is enough the vast majority of the time though). The system will give you an error and you need to finish the lemma manually. - weird indentation when a bullet starts in the middle of a line and doesn't end in that line. Just reindent as you like then go to the next error and continue. ~~~emacs-lisp (defconst my/bullet-stack (list "-" "+" "*" "--" "++" "**") "Which bullets should be used, in order.") (defvar-local my/bullet-count nil "The value in the car indicates how many goals remain in the bullet at (length-1), and so on recursively. nil means we haven't started bulleting the current proof.") (defvar-local my/last-seen-qed nil) (defun my/get-maybe-bullet-error () "Extract the number of focused goals from the ! selector error message." (when-let* ((rbuf (get-buffer "*response*")) (str (with-current-buffer "*response*" (buffer-string))) (_ (string-match (rx "Error: Expected a single focused goal but " (group (+ digit))) str)) (ngoals (string-to-number (match-string 1 str)))) ngoals)) (defun my/bullet-fix-indent () "Auto indent until the next Qed/Defined, and update my/last-seen-qed." ;; (insert (format "(* %s -> %s *)\n" my/prev-count my/bullet-count)) (when-let ((qed (save-excursion (search-forward-regexp (rx (or "Defined." "Qed.")) nil t)))) (set-marker my/last-seen-qed qed) (indent-region (- (point) 1) qed))) (defun my/nth-bullet (n) "Get nth bullet, erroring if n >= length my/bullet-stack" (or (nth n my/bullet-stack) (error "Too many bullets."))) (defun my/maybe-fix-bullet-error (&optional arg) "Main function for porting a file to strict focusing. Repeatedly process your file in proof general until you get a focusing error, then run this function. Once there are no more errors you're done. Indentation commonly looks bad in the middle of fixing a proof, but will be fixed unless you start a bullet in the middle of a line and don't finish it in that line. ie in 'tac1. - tac2.\n tac3.' tac3 will get indented to align with tac2, but if tac2 finished the bullet the next action will reindent. This is a stateful process. The state is automatically reset when you get to the next proof, but if you get an error or take manual action which breaks the algorithm's expectation you can call with prefix argument to reset." (interactive "P") (unless my/last-seen-qed (setq my/last-seen-qed (set-marker (make-marker) 0))) (when (or arg (> (point) my/last-seen-qed)) (setq my/bullet-count nil) (set-marker my/last-seen-qed 0)) (when-let ((ngoals (my/get-maybe-bullet-error))) (setq my/prev-count (format "%s %s" ngoals my/bullet-count)) (if (= ngoals 0) (progn (while (and my/bullet-count (= (car my/bullet-count) 0)) (pop my/bullet-count)) (insert (concat (my/nth-bullet (- (length my/bullet-count) 1)) " ")) (setq my/bullet-count (cons (- (car my/bullet-count) 1) (cdr my/bullet-count))) (my/bullet-fix-indent)) (setq my/bullet-count (cons (- ngoals 1) my/bullet-count)) (insert (concat (my/nth-bullet (- (length my/bullet-count) 1)) " ")) (my/bullet-fix-indent)))) (bind-key "C-c f" #'my/maybe-fix-bullet-error coq-mode-map) ~~~
2018-12-10Merge PR #7221: The usual order of strings.Hugo Herbelin
2018-11-28Merge PR #7153: Make OrderedTypeFullFacts a module functorGaëtan Gilbert
2018-11-22The usual order of strings.Yao Li
2018-11-14Deprecate hint declaration/removal with no specified databaseMaxime Dénès
Previously, hints added without a specified database where implicitly put in the "core" database, which was discouraged by the user manual (because of the lack of modularity of this approach).
2018-09-10Adapting standard library to the introduction of "Declare Scope".Hugo Herbelin
Removing in passing two Local which are no-ops in practice.
2018-08-22Fix typo of caracterisation -> c*h*aracterisationSiddharth Bhat
2018-04-02Make OrderedTypeFullFacts a module functorSimon Gregersen
2018-03-05Merge PR #6855: Update headers following #6543.Maxime Dénès
2018-03-02Turn warning for deprecated notations on.Théo Zimmermann
Fix new deprecation warnings in the standard library.
2018-02-27Update headers following #6543.Théo Zimmermann
2017-06-01drop vo.itarget files and compute the corresponding the corresponding values ↵Matej Kosik
automatically instead
2017-05-16Stop using auto with * in two proofs.Théo Zimmermann
auto with * is an overkill for people who do not care to understand what they really need. In these two cases, one lemma which was available in the typeclass_instances hint db.
2016-10-12Little addition to 6eede071 for consistency of style in OrdersFacts.v.Hugo Herbelin
2016-09-17Further "decide equality" tests on demand of Jason.Hugo Herbelin
2016-09-15Extending "contradiction" so that it recognizes statements such as "~x=x" or ↵Hugo Herbelin
~True. Found 1 incompatibility in tested contribs and 3 times the same pattern of incompatibility in the standard library. In all cases, it is an improvement in the form of the script. New behavior deactivated when version is <= 8.5.
2016-04-27Revert "Temporary hack to compensate missing comma while re-printing tactic"Hugo Herbelin
This reverts commit 3a2753bedf43a8c7306b1b3fc9cb37aafb78ad7a.
2016-04-27Temporary hack to compensate missing comma while re-printing tacticHugo Herbelin
"exists c1, c2".
2016-01-13MMaps: remove it from final 8.5 release, since this new library isn't mature ↵Pierre Letouzey
enough In particular, its interface might still change (in interaction with interested colleagues). So let's not give it too much visibility yet. Instead, I'll turn it as an opam packages for now.
2015-12-31Put implicits back as in 8.4.Matthieu Sozeau
2015-12-07Fix some typos.Guillaume Melquiond
2015-03-06MMapPositive: another implementation of MMapsPierre Letouzey
2015-03-05MMaps again : adding MMapList, an implementation by ordered listPierre Letouzey
2015-03-04Introducing MMaps, a modernized FMaps.Pierre Letouzey
NB: this is work-in-progress, there is currently only one provided implementation (MMapWeakList). In the same spirit as MSets w.r.t FSets, the main difference between MMaps and former FMaps is the use of a new version of OrderedType (see Orders.v instead of obsolete OrderedType.v). We also try to benefit more from recent notions such as Proper. For most function specifications, the style has changed : we now use equations over "find" instead of "MapsTo" predicates, whenever possible (cf. Maps in Compcert for a source of inspiration). Former specs are now derived in FMapFacts, so this is mostly a matter of taste. Two changes inspired by the current Maps of OCaml: - "elements" is now "bindings" - "map2" is now "merge" (and its function argument also receives a key). We now use a maximal implicit argument for "empty".
2014-08-25"allows to", like "allowing to", is improperJason Gross
It's possible that I should have removed more "allows", as many instances of "foo allows to bar" could have been replaced by "foo bars" (e.g., "[Qed] allows to check and save a complete proof term" could be "[Qed] checks and saves a complete proof term"), but not always (e.g., "the optional argument allows to ignore universe polymorphism" should not be "the optional argument ignores universe polymorphism" but "the optional argument allows the caller to instruct Coq to ignore universe polymorphism" or something similar).
2014-07-09Arith: full integration of the "Numbers" modular frameworkPierre Letouzey
- The earlier proof-of-concept file NPeano (which instantiates the "Numbers" framework for nat) becomes now the entry point in the Arith lib, and gets renamed PeanoNat. It still provides an inner module "Nat" which sums up everything about type nat (functions, predicates and properties of them). This inner module Nat is usable as soon as you Require Import Arith, or just Arith_base, or simply PeanoNat. - Definitions of operations over type nat are now grouped in a new file Init/Nat.v. This file is meant to be used without "Import", hence providing for instance Nat.add or Nat.sqrt as soon as coqtop starts (but no proofs about them). - The definitions that used to be in Init/Peano.v (pred, plus, minus, mult) are now compatibility notations (for Nat.pred, Nat.add, Nat.sub, Nat.mul where here Nat is Init/Nat.v). - This Coq.Init.Nat module (with only pure definitions) is Include'd in the aforementioned Coq.Arith.PeanoNat.Nat. You might see Init.Nat sometimes instead of just Nat (for instance when doing "Print plus"). Normally it should be ok to just ignore these "Init" since Init.Nat is included in the full PeanoNat.Nat. I'm investigating if it's possible to get rid of these "Init" prefixes. - Concerning predicates, orders le and lt are still defined in Init/Peano.v, with their notations "<=" and "<". Properties in PeanoNat.Nat directly refer to these predicates in Peano. For instantation reasons, PeanoNat.Nat also contains a Nat.le and Nat.lt (defined via "Definition le := Peano.le", we cannot yet include an Inductive to implement a Parameter), but these aliased predicates won't probably be very convenient to use. - Technical remark: I've split the previous property functor NProp in two parts (NBasicProp and NExtraProp), it helps a lot for building PeanoNat.Nat incrementally. Roughly speaking, we have the following schema: Module Nat. Include Coq.Init.Nat. (* definition of operations : add ... sqrt ... *) ... (** proofs of specifications for basic ops such as + * - *) Include NBasicProp. (** generic properties of these basic ops *) ... (** proofs of specifications for advanced ops (pow sqrt log2...) that may rely on proofs for + * - *) Include NExtraProp. (** all remaining properties *) End Nat. - All other files in directory Arith are now taking advantage of PeanoNat : they are now filled with compatibility notations (when earlier lemmas have exact counterpart in the Nat module) or lemmas with one-line proofs based on the Nat module. All hints for database "arith" remain declared in these old-style file (such as Plus.v, Lt.v, etc). All the old-style files are still Require'd (or not) by Arith.v, just as before. - Compatibility should be almost complete. For instance in the stdlib, the only adaptations were due to .ml code referring to some Coq constant name such as Coq.Init.Peano.pred, which doesn't live well with the new compatibility notations.
2014-06-01Making those proofs which depend on names generated for the argumentsHugo Herbelin
in Prop of constructors of inductive types independent of these names. Incidentally upgraded/simplified a couple of proofs, mainly in Reals. This prepares to the next commit about using names based on H for such hypotheses in Prop.