aboutsummaryrefslogtreecommitdiff
path: root/theories/Program
AgeCommit message (Collapse)Author
2021-03-30Remove the :> type castJim Fehrle
2021-03-19Merge PR #13730: Lint stdlib with -mangle-names #6coqbot-app[bot]
Reviewed-by: anton-trunov
2021-01-26Merge PR #13758: Remove the Hide Obligations flag (deprecated in 8.12)coqbot-app[bot]
Reviewed-by: SkySkimmer Reviewed-by: Zimmi48
2021-01-25Remove the Hide Obligations flagJim Fehrle
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 Program/Subset.v to compile with -mangle-namesJasper Hugunin
2020-12-15Modify Program/Wf.v to compile with -mangle-namesJasper Hugunin
2020-11-22Adapting standard library, doc and test suite to ident->name renaming.Hugo Herbelin
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-11-13Fix proof of Coq.Program.Wf.Fix_F_inv to be axiom-freeLi-yao Xia
2020-05-25Fix #12406: fix Coq type error in dependent induction's LtacPaolo G. Giarrusso
2020-04-30do not re-export ListNotations from ProgramAntonio Nikishaev
2020-03-18Update headers in the whole code base.Théo Zimmermann
Add headers to a few files which were missing them.
2019-12-23Merge PR #10760: Make rapply handle all numbers of underscoresPierre-Marie Pédrot
Ack-by: Zimmi48 Reviewed-by: ppedrot
2019-11-26Remove `rapply` tactic notation in favor of just the tacticJason Gross
This increases backwards compatibility. If desired, we can add a tactic notation to simplify the spec of `rapply` in the future if we want.
2019-11-26Make rapply handle all numbers of underscoresJason Gross
Also add a tactic notation so that it takes in uconstrs by default. Also add some basic tests for `rapply`. Also document rapply in the manual
2019-11-26Remove some trailing whitespace in theories/Program/Tactics.vJason Gross
2019-11-26Fix #11039: proof of False with template poly and nonlinear universesGaëtan Gilbert
Using the parameter universes in the constructor causes implicit equality constraints, so those universes may not be template polymorphic. A couple types in the stdlib were erroneously marked template, which is now detected. Removing the marking doesn't actually change behaviour though. Also fixes #10504.
2019-06-17Update ml-style headers to new year.Théo Zimmermann
2019-05-23Fixing typos - Part 3JPR
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-19Put #[universes(template)] on all auto template spots in stdlibGaëtan Gilbert
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-10-10[coqlib] Rebindable Coqlib namespace.Emilio Jesus Gallego Arias
We refactor the `Coqlib` API to locate objects over a namespace `module.object.property`. This introduces the vernacular command `Register g as n` to expose the Coq constant `g` under the name `n` (through the `register_ref` function). The constant can then be dynamically located using the `lib_ref` function. Co-authored-by: Emilio Jesús Gallego Arias <e+git@x80.org> Co-authored-by: Maxime Dénès <mail@maximedenes.fr> Co-authored-by: Vincent Laporte <Vincent.Laporte@fondation-inria.fr>
2018-09-11Merge PR #7135: Introducing an explicit `Declare Scope` commandEmilio Jesus Gallego Arias
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-09-06Bound proof-search in default program obligation tactic.Matthieu Sozeau
This issue was first reported on equations where a definition seemingly took all memory until Coq crashed. https://github.com/mattam82/Coq-Equations/issues/69
2018-02-27Update headers following #6543.Théo Zimmermann
2017-12-09Remove most uses of function extensionality in Program.CombinatorsJasper Hugunin
2017-08-21Ensuring all .v files end with a newline to make "sed -i" work better on them.Hugo Herbelin
2017-07-04Bump year in headers.Pierre-Marie Pédrot
2017-06-14Prelude : no more autoload of plugins extraction and recdefPierre Letouzey
The user now has to manually load them, respectively via: Require Extraction Require Import FunInd The "Import" in the case of FunInd is to ensure that the tactics functional induction and functional inversion are indeed in scope. Note that the Recdef.v file is still there as well (it contains complements used when doing Function with measures), and it also triggers a load of FunInd.v. This change is correctly documented in the refman, and the test-suite has been adapted.
2017-06-01drop vo.itarget files and compute the corresponding the corresponding values ↵Matej Kosik
automatically instead
2016-08-19Merge remote-tracking branch 'origin/pr/246' into v8.6Matthieu Sozeau
2016-07-18Fix bug #4923: Warning: appcontext is deprecated.Pierre-Marie Pédrot
2016-07-08Program: Move ProofIrrelevance to Subset.vMatthieu Sozeau
2016-06-18Giving a more natural semantics to injection by default.Hugo Herbelin
There were three versions of injection: 1. "injection term" without "as" clause: was leaving hypotheses on the goal in reverse order 2. "injection term as ipat", first version: was introduction hypotheses using ipat in reverse order without checking that the number of ipat was the size of the injection (activated with "Unset Injection L2R Pattern Order") 3. "injection term as ipat", second version: was introduction hypotheses using ipat in left-to-right order checking that the number of ipat was the size of the injection and clearing the injecting term by default if an hypothesis (activated with "Set Injection L2R Pattern Order", default one from 8.5) There is now: 4. "injection term" without "as" clause, new version: introducing the components of the injection in the context in left-to-right order using default intro-patterns "?" and clearing the injecting term by default if an hypothesis (activated with "Set Structural Injection") The new versions 3. and 4. are the "expected" ones in the sense that they have the following good properties: - introduction in the context is in the natural left-to-right order - "injection" behaves the same with and without "as", always introducing the hypotheses in the goal what corresponds to the natural expectation as the changes I made in the proof scripts for adaptation confirm - clear the "injection" hypothesis when an hypothesis which is the natural expectation as the changes I made in the proof scripts for adaptation confirm The compatibility can be preserved by "Unset Structural Injection" or by calling "simple injection". The flag is currently off.
2016-03-04Making parentheses mandatory in tactic scopes.Pierre-Marie Pédrot
2016-01-21Merge branch 'v8.5'Pierre-Marie Pédrot
2016-01-20Update copyright headers.Maxime Dénès
2015-12-08Merge branch 'v8.5'Pierre-Marie Pédrot
2015-12-07Fix some typos.Guillaume Melquiond
2015-12-05Experimenting removing strong normalization of the mid-statement in tactic cut.Hugo Herbelin
2015-10-07Remove the "exists" overrides from Program. (Fix bug #4360)Guillaume Melquiond
2015-06-12The "on_last_hyp" tactic now behaves as it should.Cyprien Mangin
2015-02-26Revert "Fixing bug #4035 (support for dependent destruction within ltac code)."Maxime Dénès
This reverts commit 4e6c9891140932f452bb5ac8960d597b0b5fde1d, which was breaking compatibility because one could no longer use names of foralls in the goal without introducting them. Probably not good style, but it did break many existing developments including CompCert. Closes #4093 but reopens #4035.
2015-02-23Fix some typos in comments.Guillaume Melquiond
2015-02-16Fixing bug #4035 (support for dependent destruction within ltac code).Hugo Herbelin
2015-02-14dependent destruction: Fix (part of) bug #3961, by fixing dependent *Matthieu Sozeau
generalizing * which was broken since 8.4.
2015-01-15Correct restriction of vm_compute when handling universe polymorphicMatthieu Sozeau
definitions. Instead of failing with an anomaly when trying to do conversion or computation with the vm's, consider polymorphic constants as being opaque and keep instances around. This way the code is still correct but (obviously) incomplete for polymorphic definitions and we avoid introducing an anomaly. The patch does nothing clever, it only keeps around instances with constants/inductives and compile constant bodies only for non-polymorphic definitions.