aboutsummaryrefslogtreecommitdiff
path: root/mathcomp/ssreflect/ssrnat.v
AgeCommit message (Collapse)Author
2021-01-16Drop support for Coq 8.10 and deprecate the `deprecate` notationKazuhiko Sakaguchi
- The `deprecate` notation and `iota_add` have been deprecated. All the uses of the `deprecate` notation have been replaced with the `deprecated` attribute. - Deprecation aliases in `ssrnat` and `ssrnum` introduced in MathComp 1.11+beta1 have been removed. - Remove `VDFILE` related hacks from `Makefile.common`.
2020-11-20Tuning simplifications using Arguments simpl nomatchCyril Cohen
2020-11-19add declare scopesReynald Affeldt
2020-11-11Deprecation of iota_add delayed, and not the one of iter_addCyril Cohen
2020-11-06Update mathcomp/ssreflect/ssrnat.vCyril Cohen
2020-11-05test switching Coq deprecation mechanizmCyril Cohen
2020-11-04Remove the `mc_1_9` compat moduleKazuhiko Sakaguchi
2020-10-30fix ssrnatCyril Cohen
2020-10-30Merge pull request #610 from pi8027/iter-lemmasCyril Cohen
Add new lemmas iterM and iterX in ssrnat
2020-10-29Switch from long suffixes to short suffixesKazuhiko Sakaguchi
2020-10-29Add new lemmas iterM and iterX in ssrnatKazuhiko Sakaguchi
2020-09-29ssrnat: add subnA, addnCB, addnCAC, addnAl lemmasAnton Trunov
2020-09-05Adding contra lemmas with ordersCyril Cohen
- Adding contra lemmas between `leq`, `ltn`, `Order.le` ("le"), `Order.lt` ("lt"), `b` ("T"), `~~ b` ("N"), `b = false` ("F"), and `~ P` ("not"). - Changelog for contra lemmas with orders Co-authored-by: Reynald Affeldt <reynald.affeldt@aist.go.jp>
2020-08-25Adding lemma `oddS`Cyril Cohen
2020-08-15Extra theorems about subn min and maxthery
2020-06-24fix the doc for ubnP in ssrnatthery
2020-05-16A few more revisionsKazuhiko Sakaguchi
2020-05-13Revise proofs in ssreflect/*.vKazuhiko Sakaguchi
This change reduces - use of numerical occurrence selectors (#436) and - use of non ssreflect tactics such as `auto`, and improves use of comparison predicates such as `posnP`, `leqP`, `ltnP`, `ltngtP`, and `eqVneq`.
2020-04-10adding depreciations in ssrnatCyril Cohen
2020-04-09Merge pull request #473 from affeldt-aist/long_short_suffixesaffeldt-aist
switching long suffixes to short suffixes
2020-04-09- switching long suffixes to short suffixesReynald Affeldt
+ `odd_add` -> `oddD` + `odd_sub` -> `oddB` + `take_addn` -> `takeD` + `rot_addn` -> `rotD` + `nseq_addn` -> `nseqD` fixes #359
2020-04-09Merge pull request #474 from llelf/doc-typosaffeldt-aist
Documentation typos
2020-04-09Update mathcomp/ssreflect/ssrnat.v Antonio Nikishaev
the->this Co-Authored-By: Yves Bertot <yves.bertot@inria.fr>
2020-04-08fix typos in documentation: textAntonio Nikishaev
2020-03-15Extend comparison predicates for nat with minn and maxnKazuhiko Sakaguchi
2019-12-11Fixes in naming, mixins, doc and canonical orderingCyril Cohen
- comparer -> compare (in order.v) - eq constructor of compare goes last - "x < y" is matched before "x > y" - "x <= y" is matched before "x >= y" - adding prod and lexi ordering on tuple - adding missing CS - edit CHANGELOG
2019-11-29Return of PR #226: adds relevant theorems when fcycle f (orbit f x) and the ↵Cyril Cohen
needed lemmas (#261) * adds relevant theorems when fcycle f (orbit f x) and the needed lemmas * Generalize f_step lemmas * Generalizations, shorter proofs, bugfixes, CHANGELOG - changelog, renamings and comments - renaming `homo_cycle` to `mem_fcycle` and other small renamings - name swap `mem_orbit` and `in_orbit` - simplifications - generalization following @pi8027's comment - Getting rid of many uniquness condition in `fingraph.v` - added cases to the equivalence `orbitPcycle` - added `cycle_catC`
2019-11-22New generalised induction idiom (#434)Georges Gonthier
Replaced the legacy generalised induction idiom with a more robust one that does not rely on the `{-2}` numerical occurrence selector, using either new helper lemmas `ubnP` and `ltnSE` or a specific `nat` induction principle `ltn_ind`. Added (non-strict in)equality induction helper lemmas Added `ubnP[lg]?eq` helper lemmas that abstract an integer expression along with some (in)equality, in preparation for some generalised induction. Note that while `ubnPleq` is very similar to `ubnP` (indeed `ubnP M` is basically `ubnPleq M.+1`), `ubnPgeq` is used to remember that the inductive value remains below the initial one. Used the change log to give notice to users to update the generalised induction idioms in their proofs to one of the new forms before Mathcomp 1.11.
2019-11-18fixing CHANGELOG and ltn_pred lemmasCyril Cohen
2019-11-18Documenting `L` and `R` in `CONTRIBUTING.md`Cyril Cohen
2019-11-18More arithmetic theoremsCyril Cohen
- Generalizing `ltn_subr` - Adding `ltn_subl` and `ltn_subr` - Changing conclusion of `ltn_predl` to `0 < n` instead of `n != 0`
2019-10-30Change the order of arguments in `ltngtP`Kazuhiko Sakaguchi
from `ltngtP m n : compare_nat m n (m <= n) (n <= m) (m < n) (n < m) (n == m) (m == n)` to `ltngtP m n : compare_nat m n (n == m) (m == n) (n <= m) (m <= n) (n < m) (m < n)`, to make it tries to match subterms with `m < n` first, `m <= n`, then `m == n`.
2019-10-25Removing duplicate lemma `addnKC` (= `addKn`)Cyril Cohen
2019-10-25More arithmetic theoremsCyril Cohen
In ssrnat: - some trivial results in ssrnat `addnKC`, `ltn_predl`, `ltn_predr`, `ltn_subr` and `predn_sub` - theorems about `n <=/< p +/- m` and `m +/- n <=/< p` `leq_psubRL`, `ltn_psubLR`, `leq_subRL`, `ltn_subLR`, `leq_subCl`, `leq_psubCr`, `leq_subCr`, `ltn_subCr`, `ltn_psubCl` and `ltn_subCl` In div: - theorems about the euclidean division of additions and subtraction, + without preconditions of divisibility: `edivnD`, `edivnB`, `divnD`, `divnB`, `modnD`, `modnB` + with divisibility of one argument: `divnDMl`, `divnMBl`, `divnBMl`, `divnBl` and `divnBr` + specialization of the former theorems for .+1 and .-1: `edivnS`, `divnS`, `modnS`, `edivn_pred`, `divn_pred` and `modn_pred`
2019-09-28maxn comment fix (#385)Antonio Nikishaev
2019-06-04Fixpoint theorems in finsetCyril Cohen
2019-05-08suppress use of `Arith` hintsSora Chen
2019-04-29Generalise use of `{pred T}` from coq/coq#9995Georges Gonthier
Use `{pred T}` systematically for generic _collective_ boolean predicate. Use `PredType` to construct `predType` instances. Instrument core `ssreflect` files to replicate these and other new features introduces by coq/coq#9555 (`nonPropType` interface, `simpl_rel` that simplifies with `inE`).
2019-04-26Cleaning Require and Require ImportsCyril Cohen
2018-12-19Generalizing homo-mono-morphism lemmas and extremum (#201)Cyril Cohen
2018-12-11Fix some new warnings emitted by Coq 8.10:Anton Trunov
``` Warning: Adding and removing hints in the core database implicitly is deprecated. Please specify a hint database. [implicit-core-hint-db,deprecated] ```
2018-12-04Document parameter names whenever possibleAnton Trunov
As suggested by @ggonthier [here](https://github.com/math-comp/math-comp/pull/249#pullrequestreview-177938295) > One of the design ideas for the `Arguments` command was that it would allow to centralise the documentation of the application of constants. In that spirit it would be in my opinion better to make as much use of this as possible, and to document the parameter names whenever possible, especially that of implicit parameters. and [here](https://github.com/math-comp/math-comp/pull/253#discussion_r237434163): > As a general rule, defined functional constants should have maximal prenex implicit arguments, as this facilitates their use as arguments to functionals, because this mimics the way function constants are treated in functional programming languages with Hindley-Milner type inference. Conversely, lemmas and theorems should have on-demand implicit arguments, possibly interspersed with explicit ones, as it's fairly common for other lemmas to have universally quantified premises; also, this makes it easier to specify such arguments with the apply: tactic. This policy may be amended for lemmas that are used as functional arguments, such as reflection or cancellation lemmas. Unfortunately there is currently no easy way to tell Coq to use different defaults for definitions and lemmas, so MathComp sticks to the on-demand default, as there are significantly more lemmas than definition, and use the Prenex Implicits to redress matters in bulk for definitions. However, this is not completely systematic, and is sometimes omitted for constants that are not used as functional arguments in the library, or inside the sections in which the definition occur, since such commands need to be repeated after the section is closed. Since Arguments commands should document the intended constant usage as best as possible, they should follow the implicits policy - even in cases such as this where the Prenex Implicits had been skipped.
2018-11-21Merge Arguments and Prenex ImplicitsAnton Trunov
See the discussion here: https://github.com/math-comp/math-comp/pull/242#discussion_r233778114
2018-11-15Tweak code related to canonical mixinsAnton Trunov
Remove some unused canonical mixins. Change simplification behavior of concrete comparison functions to allow for better simplification using unfolding and sebsequent folding back e.g. with `rewrite !eqE /= -!eqE`. A bit of cleanup for `Prenex Implicits` declarations. Document some explanations by G. Gonthier.
2018-09-04[warnings] -w "+compatibility-notation" cleanEnrico Tassi
2018-07-24Add addnBAC, addnBCA, and addnABC lemmas to ssrnatAnton Trunov
Proofs by Cyril Cohen
2018-07-12Replace all the CoInductives with VariantsKazuhiko Sakaguchi
2018-04-17Removing undocumented compatibility moduleCyril Cohen
I had put this for compatibility with mathcomp 1.6 when we were still using svn, but I am afraid it got under the radar. We should decide - if we revert the change of `ltngtP`, - if we document (and extend) the compatibility module - or if we just remove the module and keep the change to `ltngtP` I am personally in favour of the last
2018-04-12ssrnat: don't use `fix n` but rather `fix name n`Enrico Tassi
This was the proof does not depend on the lemma name.
2018-02-21Change Implicit Arguments to Arguments in ssreflectJasper Hugunin