--- /tmp/coq-8.12.0-3+b3y50r6bsc/debian/coq-theories_8.12.0-3+b3_amd64.deb +++ coq-theories_8.12.0-3+b3_amd64.deb ├── file list │ @@ -1,3 +1,3 @@ │ -rw-r--r-- 0 0 0 4 2020-11-25 06:34:32.000000 debian-binary │ --rw-r--r-- 0 0 0 110116 2020-11-25 06:34:32.000000 control.tar.xz │ --rw-r--r-- 0 0 0 36391528 2020-11-25 06:34:32.000000 data.tar.xz │ +-rw-r--r-- 0 0 0 110148 2020-11-25 06:34:32.000000 control.tar.xz │ +-rw-r--r-- 0 0 0 36391724 2020-11-25 06:34:32.000000 data.tar.xz ├── control.tar.xz │ ├── control.tar │ │ ├── ./control │ │ │ @@ -1,13 +1,13 @@ │ │ │ Package: coq-theories │ │ │ Source: coq (8.12.0-3) │ │ │ Version: 8.12.0-3+b3 │ │ │ Architecture: amd64 │ │ │ Maintainer: Debian OCaml Maintainers │ │ │ -Installed-Size: 280422 │ │ │ +Installed-Size: 280421 │ │ │ Depends: coq-8.12.0+4.11.1 │ │ │ Recommends: coq (>= 8.0) │ │ │ Breaks: coq-doc (<= 8.0pl1.0-2), coq-libs (<< 8.2.pl1) │ │ │ Replaces: coq-libs (<< 8.2.pl1) │ │ │ Section: math │ │ │ Priority: optional │ │ │ Homepage: http://coq.inria.fr/ │ │ ├── ./md5sums │ │ │ ├── ./md5sums │ │ │ │┄ Files differ ├── data.tar.xz │ ├── data.tar │ │ ├── file list │ │ │ @@ -4683,52 +4683,52 @@ │ │ │ -rw-r--r-- 0 root (0) root (0) 900 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Arith.Arith.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3073 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Arith.Arith_base.html │ │ │ -rw-r--r-- 0 root (0) root (0) 53471 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Arith.Between.html │ │ │ -rw-r--r-- 0 root (0) root (0) 11541 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Arith.Bool_nat.html │ │ │ -rw-r--r-- 0 root (0) root (0) 12116 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Arith.Compare.html │ │ │ -rw-r--r-- 0 root (0) root (0) 60129 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Arith.Compare_dec.html │ │ │ -rw-r--r-- 0 root (0) root (0) 32326 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Arith.Div2.html │ │ │ --rw-r--r-- 0 root (0) root (0) 18889 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Arith.EqNat.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 18891 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Arith.EqNat.html │ │ │ -rw-r--r-- 0 root (0) root (0) 11655 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Arith.Euclid.html │ │ │ --rw-r--r-- 0 root (0) root (0) 50722 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Arith.Even.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 50726 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Arith.Even.html │ │ │ -rw-r--r-- 0 root (0) root (0) 5221 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Arith.Factorial.html │ │ │ --rw-r--r-- 0 root (0) root (0) 30420 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Arith.Gt.html │ │ │ --rw-r--r-- 0 root (0) root (0) 16275 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Arith.Le.html │ │ │ --rw-r--r-- 0 root (0) root (0) 27581 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Arith.Lt.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 30428 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Arith.Gt.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 16280 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Arith.Le.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 27590 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Arith.Lt.html │ │ │ -rw-r--r-- 0 root (0) root (0) 7767 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Arith.Max.html │ │ │ -rw-r--r-- 0 root (0) root (0) 7145 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Arith.Min.html │ │ │ --rw-r--r-- 0 root (0) root (0) 20950 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Arith.Minus.html │ │ │ --rw-r--r-- 0 root (0) root (0) 36344 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Arith.Mult.html │ │ │ --rw-r--r-- 0 root (0) root (0) 160402 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Arith.PeanoNat.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 20957 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Arith.Minus.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 36356 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Arith.Mult.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 160416 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Arith.PeanoNat.html │ │ │ -rw-r--r-- 0 root (0) root (0) 6878 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Arith.Peano_dec.html │ │ │ --rw-r--r-- 0 root (0) root (0) 44957 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Arith.Plus.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 44965 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Arith.Plus.html │ │ │ -rw-r--r-- 0 root (0) root (0) 76838 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Arith.Wf_nat.html │ │ │ --rw-r--r-- 0 root (0) root (0) 219452 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Bool.Bool.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 219467 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Bool.Bool.html │ │ │ -rw-r--r-- 0 root (0) root (0) 14031 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Bool.BoolEq.html │ │ │ --rw-r--r-- 0 root (0) root (0) 26003 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Bool.BoolOrder.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 26006 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Bool.BoolOrder.html │ │ │ -rw-r--r-- 0 root (0) root (0) 25127 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Bool.Bvector.html │ │ │ -rw-r--r-- 0 root (0) root (0) 8419 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Bool.DecBool.html │ │ │ -rw-r--r-- 0 root (0) root (0) 11887 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Bool.IfProp.html │ │ │ -rw-r--r-- 0 root (0) root (0) 19856 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Bool.Sumbool.html │ │ │ -rw-r--r-- 0 root (0) root (0) 7334 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Bool.Zerob.html │ │ │ --rw-r--r-- 0 root (0) root (0) 29033 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Classes.CEquivalence.html │ │ │ --rw-r--r-- 0 root (0) root (0) 134232 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Classes.CMorphisms.html │ │ │ --rw-r--r-- 0 root (0) root (0) 85354 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Classes.CRelationClasses.html │ │ │ --rw-r--r-- 0 root (0) root (0) 16939 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Classes.DecidableClass.html │ │ │ --rw-r--r-- 0 root (0) root (0) 37392 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Classes.EquivDec.html │ │ │ --rw-r--r-- 0 root (0) root (0) 28990 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Classes.Equivalence.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4573 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Classes.Init.html │ │ │ --rw-r--r-- 0 root (0) root (0) 131893 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Classes.Morphisms.html │ │ │ --rw-r--r-- 0 root (0) root (0) 22279 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Classes.Morphisms_Prop.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11786 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Classes.Morphisms_Relations.html │ │ │ --rw-r--r-- 0 root (0) root (0) 112892 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Classes.RelationClasses.html │ │ │ --rw-r--r-- 0 root (0) root (0) 34695 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Classes.RelationPairs.html │ │ │ --rw-r--r-- 0 root (0) root (0) 23782 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Classes.SetoidClass.html │ │ │ --rw-r--r-- 0 root (0) root (0) 29744 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Classes.SetoidDec.html │ │ │ --rw-r--r-- 0 root (0) root (0) 30353 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Classes.SetoidTactics.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 29032 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Classes.CEquivalence.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 134230 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Classes.CMorphisms.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 85351 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Classes.CRelationClasses.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 16938 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Classes.DecidableClass.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 37391 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Classes.EquivDec.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 28989 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Classes.Equivalence.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4572 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Classes.Init.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 131891 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Classes.Morphisms.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 22278 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Classes.Morphisms_Prop.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11785 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Classes.Morphisms_Relations.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 112889 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Classes.RelationClasses.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 34694 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Classes.RelationPairs.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 23781 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Classes.SetoidClass.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 29743 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Classes.SetoidDec.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 30352 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Classes.SetoidTactics.html │ │ │ -rw-r--r-- 0 root (0) root (0) 1495 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Compat.AdmitAxiom.html │ │ │ -rw-r--r-- 0 root (0) root (0) 814 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Compat.Coq810.html │ │ │ -rw-r--r-- 0 root (0) root (0) 814 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Compat.Coq811.html │ │ │ -rw-r--r-- 0 root (0) root (0) 596 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Compat.Coq812.html │ │ │ -rw-r--r-- 0 root (0) root (0) 632868 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.FSets.FMapAVL.html │ │ │ -rw-r--r-- 0 root (0) root (0) 481002 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.FSets.FMapFacts.html │ │ │ -rw-r--r-- 0 root (0) root (0) 246044 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.FSets.FMapFullAVL.html │ │ │ @@ -4746,37 +4746,37 @@ │ │ │ -rw-r--r-- 0 root (0) root (0) 226076 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.FSets.FSetInterface.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3740 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.FSets.FSetList.html │ │ │ -rw-r--r-- 0 root (0) root (0) 281877 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.FSets.FSetPositive.html │ │ │ -rw-r--r-- 0 root (0) root (0) 327338 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.FSets.FSetProperties.html │ │ │ -rw-r--r-- 0 root (0) root (0) 28052 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.FSets.FSetToFiniteSet.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3953 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.FSets.FSetWeakList.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3666 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.FSets.FSets.html │ │ │ --rw-r--r-- 0 root (0) root (0) 40128 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Floats.FloatAxioms.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 40127 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Floats.FloatAxioms.html │ │ │ -rw-r--r-- 0 root (0) root (0) 1602 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Floats.FloatClass.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6188 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Floats.FloatLemmas.html │ │ │ --rw-r--r-- 0 root (0) root (0) 18828 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Floats.FloatOps.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6187 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Floats.FloatLemmas.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 18827 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Floats.FloatOps.html │ │ │ -rw-r--r-- 0 root (0) root (0) 2861 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Floats.Floats.html │ │ │ --rw-r--r-- 0 root (0) root (0) 16991 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Floats.PrimFloat.html │ │ │ --rw-r--r-- 0 root (0) root (0) 158367 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Floats.SpecFloat.html │ │ │ --rw-r--r-- 0 root (0) root (0) 705277 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Init.Byte.html │ │ │ --rw-r--r-- 0 root (0) root (0) 100390 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Init.Datatypes.html │ │ │ --rw-r--r-- 0 root (0) root (0) 61041 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Init.Decimal.html │ │ │ --rw-r--r-- 0 root (0) root (0) 66354 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Init.Hexadecimal.html │ │ │ --rw-r--r-- 0 root (0) root (0) 317186 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Init.Logic.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 16980 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Floats.PrimFloat.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 158363 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Floats.SpecFloat.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 705276 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Init.Byte.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 100384 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Init.Datatypes.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 61040 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Init.Decimal.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 66353 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Init.Hexadecimal.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 317182 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Init.Logic.html │ │ │ -rw-r--r-- 0 root (0) root (0) 17715 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Init.Logic_Type.html │ │ │ -rw-r--r-- 0 root (0) root (0) 725 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Init.Ltac.html │ │ │ --rw-r--r-- 0 root (0) root (0) 117691 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Init.Nat.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 117677 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Init.Nat.html │ │ │ -rw-r--r-- 0 root (0) root (0) 19268 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Init.Notations.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5157 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Init.Numeral.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5156 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Init.Numeral.html │ │ │ -rw-r--r-- 0 root (0) root (0) 59668 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Init.Peano.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3633 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Init.Prelude.html │ │ │ -rw-r--r-- 0 root (0) root (0) 400577 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Init.Specif.html │ │ │ --rw-r--r-- 0 root (0) root (0) 66718 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Init.Tactics.html │ │ │ --rw-r--r-- 0 root (0) root (0) 22435 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Init.Tauto.html │ │ │ --rw-r--r-- 0 root (0) root (0) 53268 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Init.Wf.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 66716 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Init.Tactics.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 22434 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Init.Tauto.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 53267 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Init.Wf.html │ │ │ -rw-r--r-- 0 root (0) root (0) 764434 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Lists.List.html │ │ │ -rw-r--r-- 0 root (0) root (0) 15850 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Lists.ListDec.html │ │ │ -rw-r--r-- 0 root (0) root (0) 111334 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Lists.ListSet.html │ │ │ -rw-r--r-- 0 root (0) root (0) 13100 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Lists.ListTactics.html │ │ │ -rw-r--r-- 0 root (0) root (0) 231826 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Lists.SetoidList.html │ │ │ -rw-r--r-- 0 root (0) root (0) 42379 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Lists.SetoidPermutation.html │ │ │ -rw-r--r-- 0 root (0) root (0) 34996 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Lists.StreamMemo.html │ │ │ @@ -4814,62 +4814,62 @@ │ │ │ -rw-r--r-- 0 root (0) root (0) 5385 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Logic.PropFacts.html │ │ │ -rw-r--r-- 0 root (0) root (0) 5541 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Logic.RelationalChoice.html │ │ │ -rw-r--r-- 0 root (0) root (0) 1292 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Logic.SetIsType.html │ │ │ -rw-r--r-- 0 root (0) root (0) 16559 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Logic.SetoidChoice.html │ │ │ -rw-r--r-- 0 root (0) root (0) 9548 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Logic.StrictProp.html │ │ │ -rw-r--r-- 0 root (0) root (0) 55332 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Logic.WKL.html │ │ │ -rw-r--r-- 0 root (0) root (0) 20998 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Logic.WeakFan.html │ │ │ --rw-r--r-- 0 root (0) root (0) 195163 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.MSets.MSetAVL.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 195167 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.MSets.MSetAVL.html │ │ │ -rw-r--r-- 0 root (0) root (0) 250275 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.MSets.MSetDecide.html │ │ │ -rw-r--r-- 0 root (0) root (0) 242673 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.MSets.MSetEqProperties.html │ │ │ --rw-r--r-- 0 root (0) root (0) 143711 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.MSets.MSetFacts.html │ │ │ --rw-r--r-- 0 root (0) root (0) 237678 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.MSets.MSetGenTree.html │ │ │ --rw-r--r-- 0 root (0) root (0) 339027 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.MSets.MSetInterface.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 143716 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.MSets.MSetFacts.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 237705 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.MSets.MSetGenTree.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 339034 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.MSets.MSetInterface.html │ │ │ -rw-r--r-- 0 root (0) root (0) 199941 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.MSets.MSetList.html │ │ │ -rw-r--r-- 0 root (0) root (0) 228539 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.MSets.MSetPositive.html │ │ │ -rw-r--r-- 0 root (0) root (0) 328249 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.MSets.MSetProperties.html │ │ │ -rw-r--r-- 0 root (0) root (0) 453760 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.MSets.MSetRBT.html │ │ │ --rw-r--r-- 0 root (0) root (0) 27911 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.MSets.MSetToFiniteSet.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 27913 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.MSets.MSetToFiniteSet.html │ │ │ -rw-r--r-- 0 root (0) root (0) 124941 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.MSets.MSetWeakList.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3201 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.MSets.MSets.html │ │ │ --rw-r--r-- 0 root (0) root (0) 268898 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.NArith.BinNat.html │ │ │ --rw-r--r-- 0 root (0) root (0) 89403 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.NArith.BinNatDef.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 268896 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.NArith.BinNat.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 89394 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.NArith.BinNatDef.html │ │ │ -rw-r--r-- 0 root (0) root (0) 5508 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.NArith.NArith.html │ │ │ -rw-r--r-- 0 root (0) root (0) 85916 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.NArith.Ndec.html │ │ │ -rw-r--r-- 0 root (0) root (0) 151857 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.NArith.Ndigits.html │ │ │ -rw-r--r-- 0 root (0) root (0) 56204 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.NArith.Ndist.html │ │ │ -rw-r--r-- 0 root (0) root (0) 6466 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.NArith.Ndiv_def.html │ │ │ -rw-r--r-- 0 root (0) root (0) 4149 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.NArith.Ngcd_def.html │ │ │ --rw-r--r-- 0 root (0) root (0) 55174 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.NArith.Nnat.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 55172 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.NArith.Nnat.html │ │ │ -rw-r--r-- 0 root (0) root (0) 1715 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.NArith.Nsqrt_def.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8273 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.AltBinNotations.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7760 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.BinNums.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8272 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.AltBinNotations.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7759 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.BinNums.html │ │ │ -rw-r--r-- 0 root (0) root (0) 203949 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.Cyclic.Abstract.CyclicAxioms.html │ │ │ -rw-r--r-- 0 root (0) root (0) 12313 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.Cyclic.Abstract.DoubleType.html │ │ │ -rw-r--r-- 0 root (0) root (0) 48429 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.Cyclic.Abstract.NZCyclic.html │ │ │ -rw-r--r-- 0 root (0) root (0) 440412 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.Cyclic.Int31.Cyclic31.html │ │ │ -rw-r--r-- 0 root (0) root (0) 157612 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.Cyclic.Int31.Int31.html │ │ │ -rw-r--r-- 0 root (0) root (0) 28500 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.Cyclic.Int31.Ring31.html │ │ │ -rw-r--r-- 0 root (0) root (0) 73283 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.Cyclic.Int63.Cyclic63.html │ │ │ -rw-r--r-- 0 root (0) root (0) 437016 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.Cyclic.Int63.Int63.html │ │ │ -rw-r--r-- 0 root (0) root (0) 17075 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.Cyclic.Int63.Ring63.html │ │ │ -rw-r--r-- 0 root (0) root (0) 231739 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.Cyclic.ZModulo.ZModulo.html │ │ │ --rw-r--r-- 0 root (0) root (0) 86261 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.DecimalFacts.html │ │ │ --rw-r--r-- 0 root (0) root (0) 18750 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.DecimalN.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 86260 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.DecimalFacts.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 18749 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.DecimalN.html │ │ │ -rw-r--r-- 0 root (0) root (0) 57852 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.DecimalNat.html │ │ │ -rw-r--r-- 0 root (0) root (0) 75861 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.DecimalPos.html │ │ │ -rw-r--r-- 0 root (0) root (0) 32443 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.DecimalQ.html │ │ │ -rw-r--r-- 0 root (0) root (0) 54858 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.DecimalString.html │ │ │ -rw-r--r-- 0 root (0) root (0) 13444 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.DecimalZ.html │ │ │ -rw-r--r-- 0 root (0) root (0) 69370 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.HexadecimalFacts.html │ │ │ --rw-r--r-- 0 root (0) root (0) 19216 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.HexadecimalN.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 19215 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.HexadecimalN.html │ │ │ -rw-r--r-- 0 root (0) root (0) 69903 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.HexadecimalNat.html │ │ │ -rw-r--r-- 0 root (0) root (0) 92343 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.HexadecimalPos.html │ │ │ -rw-r--r-- 0 root (0) root (0) 23867 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.HexadecimalQ.html │ │ │ --rw-r--r-- 0 root (0) root (0) 67034 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.HexadecimalString.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 67033 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.HexadecimalString.html │ │ │ -rw-r--r-- 0 root (0) root (0) 18582 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.HexadecimalZ.html │ │ │ -rw-r--r-- 0 root (0) root (0) 81905 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.Integer.Abstract.ZAdd.html │ │ │ -rw-r--r-- 0 root (0) root (0) 87688 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.Integer.Abstract.ZAddOrder.html │ │ │ -rw-r--r-- 0 root (0) root (0) 50473 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.Integer.Abstract.ZAxioms.html │ │ │ -rw-r--r-- 0 root (0) root (0) 5462 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.Integer.Abstract.ZBase.html │ │ │ -rw-r--r-- 0 root (0) root (0) 403392 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.Integer.Abstract.ZBits.html │ │ │ -rw-r--r-- 0 root (0) root (0) 166501 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.Integer.Abstract.ZDivEucl.html │ │ │ @@ -4889,25 +4889,25 @@ │ │ │ -rw-r--r-- 0 root (0) root (0) 91590 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.Integer.NatPairs.ZNatPairs.html │ │ │ -rw-r--r-- 0 root (0) root (0) 62893 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.NaryFunctions.html │ │ │ -rw-r--r-- 0 root (0) root (0) 29187 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.NatInt.NZAdd.html │ │ │ -rw-r--r-- 0 root (0) root (0) 49778 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.NatInt.NZAddOrder.html │ │ │ -rw-r--r-- 0 root (0) root (0) 53089 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.NatInt.NZAxioms.html │ │ │ -rw-r--r-- 0 root (0) root (0) 16229 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.NatInt.NZBase.html │ │ │ -rw-r--r-- 0 root (0) root (0) 41701 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.NatInt.NZBits.html │ │ │ --rw-r--r-- 0 root (0) root (0) 143724 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.NatInt.NZDiv.html │ │ │ --rw-r--r-- 0 root (0) root (0) 76417 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.NatInt.NZDomain.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 143721 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.NatInt.NZDiv.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 76414 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.NatInt.NZDomain.html │ │ │ -rw-r--r-- 0 root (0) root (0) 83847 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.NatInt.NZGcd.html │ │ │ --rw-r--r-- 0 root (0) root (0) 133782 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.NatInt.NZLog.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 133781 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.NatInt.NZLog.html │ │ │ -rw-r--r-- 0 root (0) root (0) 26432 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.NatInt.NZMul.html │ │ │ -rw-r--r-- 0 root (0) root (0) 104400 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.NatInt.NZMulOrder.html │ │ │ -rw-r--r-- 0 root (0) root (0) 151522 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.NatInt.NZOrder.html │ │ │ -rw-r--r-- 0 root (0) root (0) 47649 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.NatInt.NZParity.html │ │ │ -rw-r--r-- 0 root (0) root (0) 78875 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.NatInt.NZPow.html │ │ │ -rw-r--r-- 0 root (0) root (0) 1426 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.NatInt.NZProperties.html │ │ │ --rw-r--r-- 0 root (0) root (0) 114421 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.NatInt.NZSqrt.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 114420 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.NatInt.NZSqrt.html │ │ │ -rw-r--r-- 0 root (0) root (0) 15242 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.Natural.Abstract.NAdd.html │ │ │ -rw-r--r-- 0 root (0) root (0) 8532 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.Natural.Abstract.NAddOrder.html │ │ │ -rw-r--r-- 0 root (0) root (0) 23491 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.Natural.Abstract.NAxioms.html │ │ │ -rw-r--r-- 0 root (0) root (0) 39662 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.Natural.Abstract.NBase.html │ │ │ -rw-r--r-- 0 root (0) root (0) 325188 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.Natural.Abstract.NBits.html │ │ │ -rw-r--r-- 0 root (0) root (0) 77358 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.Natural.Abstract.NDefOps.html │ │ │ -rw-r--r-- 0 root (0) root (0) 117911 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.Natural.Abstract.NDiv.html │ │ │ @@ -4923,36 +4923,36 @@ │ │ │ -rw-r--r-- 0 root (0) root (0) 7096 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.Natural.Abstract.NProperties.html │ │ │ -rw-r--r-- 0 root (0) root (0) 32498 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.Natural.Abstract.NSqrt.html │ │ │ -rw-r--r-- 0 root (0) root (0) 44871 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.Natural.Abstract.NStrongRec.html │ │ │ -rw-r--r-- 0 root (0) root (0) 71439 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.Natural.Abstract.NSub.html │ │ │ -rw-r--r-- 0 root (0) root (0) 2060 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.Natural.Binary.NBinary.html │ │ │ -rw-r--r-- 0 root (0) root (0) 30106 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.Natural.Peano.NPeano.html │ │ │ -rw-r--r-- 0 root (0) root (0) 1646 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Numbers.NumPrelude.html │ │ │ --rw-r--r-- 0 root (0) root (0) 514702 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.PArith.BinPos.html │ │ │ --rw-r--r-- 0 root (0) root (0) 232666 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.PArith.BinPosDef.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 514647 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.PArith.BinPos.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 232633 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.PArith.BinPosDef.html │ │ │ -rw-r--r-- 0 root (0) root (0) 1089 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.PArith.PArith.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4760 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.PArith.POrderedType.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4754 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.PArith.POrderedType.html │ │ │ -rw-r--r-- 0 root (0) root (0) 102076 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.PArith.Pnat.html │ │ │ -rw-r--r-- 0 root (0) root (0) 10042 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Program.Basics.html │ │ │ -rw-r--r-- 0 root (0) root (0) 12816 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Program.Combinators.html │ │ │ -rw-r--r-- 0 root (0) root (0) 102516 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Program.Equality.html │ │ │ -rw-r--r-- 0 root (0) root (0) 1974 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Program.Program.html │ │ │ -rw-r--r-- 0 root (0) root (0) 20328 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Program.Subset.html │ │ │ -rw-r--r-- 0 root (0) root (0) 1846 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Program.Syntax.html │ │ │ -rw-r--r-- 0 root (0) root (0) 53203 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Program.Tactics.html │ │ │ -rw-r--r-- 0 root (0) root (0) 7015 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Program.Utils.html │ │ │ -rw-r--r-- 0 root (0) root (0) 70282 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Program.Wf.html │ │ │ -rw-r--r-- 0 root (0) root (0) 1100 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.QArith.QArith.html │ │ │ --rw-r--r-- 0 root (0) root (0) 269279 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.QArith.QArith_base.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9304 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.QArith.QOrderedType.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 269268 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.QArith.QArith_base.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9301 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.QArith.QOrderedType.html │ │ │ -rw-r--r-- 0 root (0) root (0) 23417 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.QArith.Qabs.html │ │ │ --rw-r--r-- 0 root (0) root (0) 26636 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.QArith.Qcabs.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 26635 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.QArith.Qcabs.html │ │ │ -rw-r--r-- 0 root (0) root (0) 120548 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.QArith.Qcanon.html │ │ │ --rw-r--r-- 0 root (0) root (0) 25038 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.QArith.Qfield.html │ │ │ --rw-r--r-- 0 root (0) root (0) 13984 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.QArith.Qminmax.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 25037 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.QArith.Qfield.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 13982 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.QArith.Qminmax.html │ │ │ -rw-r--r-- 0 root (0) root (0) 40303 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.QArith.Qpower.html │ │ │ -rw-r--r-- 0 root (0) root (0) 23083 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.QArith.Qreals.html │ │ │ -rw-r--r-- 0 root (0) root (0) 24626 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.QArith.Qreduction.html │ │ │ -rw-r--r-- 0 root (0) root (0) 683 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.QArith.Qring.html │ │ │ -rw-r--r-- 0 root (0) root (0) 16932 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.QArith.Qround.html │ │ │ -rw-r--r-- 0 root (0) root (0) 40339 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.Abstract.ConstructiveAbs.html │ │ │ -rw-r--r-- 0 root (0) root (0) 84919 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.Abstract.ConstructiveLUB.html │ │ │ @@ -4979,67 +4979,67 @@ │ │ │ -rw-r--r-- 0 root (0) root (0) 29923 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.Exp_prop.html │ │ │ -rw-r--r-- 0 root (0) root (0) 1113 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.Integration.html │ │ │ -rw-r--r-- 0 root (0) root (0) 113607 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.MVT.html │ │ │ -rw-r--r-- 0 root (0) root (0) 19559 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.Machin.html │ │ │ -rw-r--r-- 0 root (0) root (0) 59283 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.NewtonInt.html │ │ │ -rw-r--r-- 0 root (0) root (0) 76984 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.PSeries_reg.html │ │ │ -rw-r--r-- 0 root (0) root (0) 87366 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.PartSum.html │ │ │ --rw-r--r-- 0 root (0) root (0) 485413 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.RIneq.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 485376 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.RIneq.html │ │ │ -rw-r--r-- 0 root (0) root (0) 118714 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.RList.html │ │ │ --rw-r--r-- 0 root (0) root (0) 19018 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.ROrderedType.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 19016 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.ROrderedType.html │ │ │ -rw-r--r-- 0 root (0) root (0) 37323 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.R_Ifp.html │ │ │ -rw-r--r-- 0 root (0) root (0) 74841 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.R_sqr.html │ │ │ --rw-r--r-- 0 root (0) root (0) 77178 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.R_sqrt.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 77176 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.R_sqrt.html │ │ │ -rw-r--r-- 0 root (0) root (0) 4564 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.Ranalysis.html │ │ │ -rw-r--r-- 0 root (0) root (0) 255423 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.Ranalysis1.html │ │ │ -rw-r--r-- 0 root (0) root (0) 98532 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.Ranalysis2.html │ │ │ -rw-r--r-- 0 root (0) root (0) 18396 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.Ranalysis3.html │ │ │ -rw-r--r-- 0 root (0) root (0) 50377 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.Ranalysis4.html │ │ │ --rw-r--r-- 0 root (0) root (0) 217665 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.Ranalysis5.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 217659 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.Ranalysis5.html │ │ │ -rw-r--r-- 0 root (0) root (0) 237752 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.Ranalysis_reg.html │ │ │ -rw-r--r-- 0 root (0) root (0) 192064 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.Ratan.html │ │ │ --rw-r--r-- 0 root (0) root (0) 57309 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.Raxioms.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 57300 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.Raxioms.html │ │ │ -rw-r--r-- 0 root (0) root (0) 1290 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.Rbase.html │ │ │ --rw-r--r-- 0 root (0) root (0) 101352 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.Rbasic_fun.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 101349 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.Rbasic_fun.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3640 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.Rcomplete.html │ │ │ --rw-r--r-- 0 root (0) root (0) 69648 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.Rdefinitions.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 69647 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.Rdefinitions.html │ │ │ -rw-r--r-- 0 root (0) root (0) 50278 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.Rderiv.html │ │ │ -rw-r--r-- 0 root (0) root (0) 2852 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.Reals.html │ │ │ --rw-r--r-- 0 root (0) root (0) 147764 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.Rfunctions.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 147757 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.Rfunctions.html │ │ │ -rw-r--r-- 0 root (0) root (0) 51429 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.Rgeom.html │ │ │ -rw-r--r-- 0 root (0) root (0) 251762 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.RiemannInt.html │ │ │ -rw-r--r-- 0 root (0) root (0) 209456 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.RiemannInt_SF.html │ │ │ --rw-r--r-- 0 root (0) root (0) 75359 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.Rlimit.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 75354 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.Rlimit.html │ │ │ -rw-r--r-- 0 root (0) root (0) 9531 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.Rlogic.html │ │ │ -rw-r--r-- 0 root (0) root (0) 29445 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.Rminmax.html │ │ │ -rw-r--r-- 0 root (0) root (0) 2463 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.Rpow_def.html │ │ │ -rw-r--r-- 0 root (0) root (0) 96991 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.Rpower.html │ │ │ -rw-r--r-- 0 root (0) root (0) 25005 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.Rprod.html │ │ │ -rw-r--r-- 0 root (0) root (0) 1025 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.Rregisternames.html │ │ │ --rw-r--r-- 0 root (0) root (0) 33682 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.Rseries.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 33680 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.Rseries.html │ │ │ -rw-r--r-- 0 root (0) root (0) 18776 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.Rsigma.html │ │ │ -rw-r--r-- 0 root (0) root (0) 70624 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.Rsqrt_def.html │ │ │ --rw-r--r-- 0 root (0) root (0) 170667 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.Rtopology.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 170664 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.Rtopology.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3954 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.Rtrigo.html │ │ │ -rw-r--r-- 0 root (0) root (0) 244659 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.Rtrigo1.html │ │ │ -rw-r--r-- 0 root (0) root (0) 16354 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.Rtrigo_alt.html │ │ │ -rw-r--r-- 0 root (0) root (0) 44628 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.Rtrigo_calc.html │ │ │ --rw-r--r-- 0 root (0) root (0) 41898 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.Rtrigo_def.html │ │ │ --rw-r--r-- 0 root (0) root (0) 35941 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.Rtrigo_facts.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 41895 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.Rtrigo_def.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 35935 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.Rtrigo_facts.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3347 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.Rtrigo_fun.html │ │ │ -rw-r--r-- 0 root (0) root (0) 14778 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.Rtrigo_reg.html │ │ │ -rw-r--r-- 0 root (0) root (0) 98348 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.Runcountable.html │ │ │ -rw-r--r-- 0 root (0) root (0) 103306 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.SeqProp.html │ │ │ -rw-r--r-- 0 root (0) root (0) 22846 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.SeqSeries.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3210 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.SplitAbsolu.html │ │ │ -rw-r--r-- 0 root (0) root (0) 2056 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.SplitRmult.html │ │ │ -rw-r--r-- 0 root (0) root (0) 11571 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Reals.Sqrt_reg.html │ │ │ --rw-r--r-- 0 root (0) root (0) 68154 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Relations.Operators_Properties.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 68150 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Relations.Operators_Properties.html │ │ │ -rw-r--r-- 0 root (0) root (0) 23284 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Relations.Relation_Definitions.html │ │ │ --rw-r--r-- 0 root (0) root (0) 101155 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Relations.Relation_Operators.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 101137 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Relations.Relation_Operators.html │ │ │ -rw-r--r-- 0 root (0) root (0) 5971 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Relations.Relations.html │ │ │ -rw-r--r-- 0 root (0) root (0) 11963 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Setoids.Setoid.html │ │ │ -rw-r--r-- 0 root (0) root (0) 23474 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Sets.Classical_sets.html │ │ │ -rw-r--r-- 0 root (0) root (0) 36030 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Sets.Constructive_sets.html │ │ │ -rw-r--r-- 0 root (0) root (0) 40548 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Sets.Cpo.html │ │ │ -rw-r--r-- 0 root (0) root (0) 32108 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Sets.Ensembles.html │ │ │ -rw-r--r-- 0 root (0) root (0) 18514 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Sets.Finite_sets.html │ │ │ @@ -5064,83 +5064,83 @@ │ │ │ -rw-r--r-- 0 root (0) root (0) 69024 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Sorting.Heap.html │ │ │ -rw-r--r-- 0 root (0) root (0) 41969 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Sorting.Mergesort.html │ │ │ -rw-r--r-- 0 root (0) root (0) 32325 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Sorting.PermutEq.html │ │ │ -rw-r--r-- 0 root (0) root (0) 107980 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Sorting.PermutSetoid.html │ │ │ -rw-r--r-- 0 root (0) root (0) 193890 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Sorting.Permutation.html │ │ │ -rw-r--r-- 0 root (0) root (0) 36568 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Sorting.Sorted.html │ │ │ -rw-r--r-- 0 root (0) root (0) 894 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Sorting.Sorting.html │ │ │ --rw-r--r-- 0 root (0) root (0) 57118 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Strings.Ascii.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 57115 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Strings.Ascii.html │ │ │ -rw-r--r-- 0 root (0) root (0) 38435 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Strings.BinaryString.html │ │ │ -rw-r--r-- 0 root (0) root (0) 256280 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Strings.Byte.html │ │ │ -rw-r--r-- 0 root (0) root (0) 18840 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Strings.ByteVector.html │ │ │ -rw-r--r-- 0 root (0) root (0) 92116 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Strings.HexString.html │ │ │ -rw-r--r-- 0 root (0) root (0) 58245 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Strings.OctalString.html │ │ │ --rw-r--r-- 0 root (0) root (0) 83110 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Strings.String.html │ │ │ --rw-r--r-- 0 root (0) root (0) 42848 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Structures.DecidableType.html │ │ │ --rw-r--r-- 0 root (0) root (0) 20546 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Structures.DecidableTypeEx.html │ │ │ --rw-r--r-- 0 root (0) root (0) 70800 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Structures.Equalities.html │ │ │ --rw-r--r-- 0 root (0) root (0) 77805 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Structures.EqualitiesFacts.html │ │ │ --rw-r--r-- 0 root (0) root (0) 218422 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Structures.GenericMinMax.html │ │ │ --rw-r--r-- 0 root (0) root (0) 176626 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Structures.OrderedType.html │ │ │ --rw-r--r-- 0 root (0) root (0) 28747 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Structures.OrderedTypeAlt.html │ │ │ --rw-r--r-- 0 root (0) root (0) 122111 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Structures.OrderedTypeEx.html │ │ │ --rw-r--r-- 0 root (0) root (0) 98058 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Structures.Orders.html │ │ │ --rw-r--r-- 0 root (0) root (0) 41780 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Structures.OrdersAlt.html │ │ │ --rw-r--r-- 0 root (0) root (0) 30061 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Structures.OrdersEx.html │ │ │ --rw-r--r-- 0 root (0) root (0) 149739 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Structures.OrdersFacts.html │ │ │ --rw-r--r-- 0 root (0) root (0) 47915 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Structures.OrdersLists.html │ │ │ --rw-r--r-- 0 root (0) root (0) 87954 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Structures.OrdersTac.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 83103 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Strings.String.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 42854 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Structures.DecidableType.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 20549 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Structures.DecidableTypeEx.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 70818 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Structures.Equalities.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 77809 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Structures.EqualitiesFacts.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 218440 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Structures.GenericMinMax.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 176630 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Structures.OrderedType.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 28749 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Structures.OrderedTypeAlt.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 122113 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Structures.OrderedTypeEx.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 98074 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Structures.Orders.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 41792 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Structures.OrdersAlt.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 30063 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Structures.OrdersEx.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 149757 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Structures.OrdersFacts.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 47919 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Structures.OrdersLists.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 87962 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Structures.OrdersTac.html │ │ │ -rw-r--r-- 0 root (0) root (0) 1870 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Unicode.Utf8.html │ │ │ -rw-r--r-- 0 root (0) root (0) 8011 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Unicode.Utf8_core.html │ │ │ -rw-r--r-- 0 root (0) root (0) 87599 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Vectors.Fin.html │ │ │ -rw-r--r-- 0 root (0) root (0) 1955 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Vectors.Vector.html │ │ │ --rw-r--r-- 0 root (0) root (0) 152101 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Vectors.VectorDef.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 152099 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Vectors.VectorDef.html │ │ │ -rw-r--r-- 0 root (0) root (0) 16410 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Vectors.VectorEq.html │ │ │ --rw-r--r-- 0 root (0) root (0) 103699 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Vectors.VectorSpec.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 103689 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Vectors.VectorSpec.html │ │ │ -rw-r--r-- 0 root (0) root (0) 8413 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Wellfounded.Disjoint_Union.html │ │ │ -rw-r--r-- 0 root (0) root (0) 5481 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Wellfounded.Inclusion.html │ │ │ -rw-r--r-- 0 root (0) root (0) 14203 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Wellfounded.Inverse_Image.html │ │ │ -rw-r--r-- 0 root (0) root (0) 34670 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Wellfounded.Lexicographic_Exponentiation.html │ │ │ -rw-r--r-- 0 root (0) root (0) 26135 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Wellfounded.Lexicographic_Product.html │ │ │ -rw-r--r-- 0 root (0) root (0) 7543 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Wellfounded.Transitive_Closure.html │ │ │ -rw-r--r-- 0 root (0) root (0) 11859 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Wellfounded.Union.html │ │ │ -rw-r--r-- 0 root (0) root (0) 12013 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Wellfounded.Well_Ordering.html │ │ │ -rw-r--r-- 0 root (0) root (0) 2287 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.Wellfounded.Wellfounded.html │ │ │ --rw-r--r-- 0 root (0) root (0) 436755 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.ZArith.BinInt.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 436795 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.ZArith.BinInt.html │ │ │ -rw-r--r-- 0 root (0) root (0) 171592 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.ZArith.BinIntDef.html │ │ │ --rw-r--r-- 0 root (0) root (0) 173047 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.ZArith.Int.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 173051 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.ZArith.Int.html │ │ │ -rw-r--r-- 0 root (0) root (0) 50544 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.ZArith.Wf_Z.html │ │ │ -rw-r--r-- 0 root (0) root (0) 2252 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.ZArith.ZArith.html │ │ │ -rw-r--r-- 0 root (0) root (0) 5255 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.ZArith.ZArith_base.html │ │ │ -rw-r--r-- 0 root (0) root (0) 41985 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.ZArith.ZArith_dec.html │ │ │ -rw-r--r-- 0 root (0) root (0) 24661 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.ZArith.Zabs.html │ │ │ --rw-r--r-- 0 root (0) root (0) 53975 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.ZArith.Zbool.html │ │ │ --rw-r--r-- 0 root (0) root (0) 57327 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.ZArith.Zcompare.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 53977 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.ZArith.Zbool.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 57335 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.ZArith.Zcompare.html │ │ │ -rw-r--r-- 0 root (0) root (0) 25464 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.ZArith.Zcomplements.html │ │ │ -rw-r--r-- 0 root (0) root (0) 53086 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.ZArith.Zdigits.html │ │ │ --rw-r--r-- 0 root (0) root (0) 223494 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.ZArith.Zdiv.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 223504 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.ZArith.Zdiv.html │ │ │ -rw-r--r-- 0 root (0) root (0) 11993 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.ZArith.Zeuclid.html │ │ │ --rw-r--r-- 0 root (0) root (0) 58201 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.ZArith.Zeven.html │ │ │ --rw-r--r-- 0 root (0) root (0) 36745 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.ZArith.Zgcd_alt.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7392 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.ZArith.Zhints.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 58202 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.ZArith.Zeven.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 36746 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.ZArith.Zgcd_alt.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7395 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.ZArith.Zhints.html │ │ │ -rw-r--r-- 0 root (0) root (0) 12536 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.ZArith.Zmax.html │ │ │ -rw-r--r-- 0 root (0) root (0) 12275 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.ZArith.Zmin.html │ │ │ -rw-r--r-- 0 root (0) root (0) 1082 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.ZArith.Zminmax.html │ │ │ -rw-r--r-- 0 root (0) root (0) 4316 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.ZArith.Zmisc.html │ │ │ --rw-r--r-- 0 root (0) root (0) 253811 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.ZArith.Znat.html │ │ │ --rw-r--r-- 0 root (0) root (0) 174647 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.ZArith.Znumtheory.html │ │ │ --rw-r--r-- 0 root (0) root (0) 161009 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.ZArith.Zorder.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 253814 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.ZArith.Znat.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 174652 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.ZArith.Znumtheory.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 161019 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.ZArith.Zorder.html │ │ │ -rw-r--r-- 0 root (0) root (0) 16099 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.ZArith.Zpow_alt.html │ │ │ -rw-r--r-- 0 root (0) root (0) 4491 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.ZArith.Zpow_def.html │ │ │ --rw-r--r-- 0 root (0) root (0) 54298 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.ZArith.Zpow_facts.html │ │ │ --rw-r--r-- 0 root (0) root (0) 81576 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.ZArith.Zpower.html │ │ │ --rw-r--r-- 0 root (0) root (0) 126934 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.ZArith.Zquot.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 54300 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.ZArith.Zpow_facts.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 81579 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.ZArith.Zpower.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 126937 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.ZArith.Zquot.html │ │ │ -rw-r--r-- 0 root (0) root (0) 10727 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.ZArith.Zwf.html │ │ │ -rw-r--r-- 0 root (0) root (0) 21680 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.ZArith.auxiliary.html │ │ │ --rw-r--r-- 0 root (0) root (0) 129369 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.btauto.Algebra.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 129367 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.btauto.Algebra.html │ │ │ -rw-r--r-- 0 root (0) root (0) 787 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.btauto.Btauto.html │ │ │ -rw-r--r-- 0 root (0) root (0) 56218 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.btauto.Reflect.html │ │ │ -rw-r--r-- 0 root (0) root (0) 477 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.derive.Derive.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3452 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.extraction.ExtrHaskellBasic.html │ │ │ -rw-r--r-- 0 root (0) root (0) 2235 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.extraction.ExtrHaskellNatInt.html │ │ │ -rw-r--r-- 0 root (0) root (0) 2246 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.extraction.ExtrHaskellNatInteger.html │ │ │ -rw-r--r-- 0 root (0) root (0) 6765 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.extraction.ExtrHaskellNatNum.html │ │ │ @@ -5192,15 +5192,15 @@ │ │ │ -rw-r--r-- 0 root (0) root (0) 32795 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.micromega.Ztac.html │ │ │ -rw-r--r-- 0 root (0) root (0) 14939 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.nsatz.Nsatz.html │ │ │ -rw-r--r-- 0 root (0) root (0) 113748 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.nsatz.NsatzTactic.html │ │ │ -rw-r--r-- 0 root (0) root (0) 1326 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.omega.Omega.html │ │ │ -rw-r--r-- 0 root (0) root (0) 128077 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.omega.OmegaLemmas.html │ │ │ -rw-r--r-- 0 root (0) root (0) 983 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.omega.OmegaPlugin.html │ │ │ -rw-r--r-- 0 root (0) root (0) 983 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.omega.OmegaTactic.html │ │ │ --rw-r--r-- 0 root (0) root (0) 193083 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.omega.PreOmega.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 193081 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.omega.PreOmega.html │ │ │ -rw-r--r-- 0 root (0) root (0) 83860 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.rtauto.Bintree.html │ │ │ -rw-r--r-- 0 root (0) root (0) 85771 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.rtauto.Rtauto.html │ │ │ -rw-r--r-- 0 root (0) root (0) 13078 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.setoid_ring.Algebra_syntax.html │ │ │ -rw-r--r-- 0 root (0) root (0) 11146 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.setoid_ring.ArithRing.html │ │ │ -rw-r--r-- 0 root (0) root (0) 17310 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.setoid_ring.BinList.html │ │ │ -rw-r--r-- 0 root (0) root (0) 78252 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.setoid_ring.Cring.html │ │ │ -rw-r--r-- 0 root (0) root (0) 916 2020-11-25 06:34:32.000000 ./usr/share/doc/coq-theories/html/Coq.setoid_ring.Field.html │ │ ├── ./usr/share/doc/coq-theories/html/Coq.Arith.EqNat.html │ │ │ @@ -22,15 +22,15 @@ │ │ │
│ │ │ │ │ │ │ │ │
│ │ │ Equality on natural numbers │ │ │
│ │ │ │ │ │ -

Propositional equality

│ │ │ +

Propositional equality

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Fixpoint eq_nat n m : Prop :=
│ │ │   match n, m with
│ │ │ @@ -71,15 +71,15 @@ │ │ │
│ │ │ Theorem eq_nat_decide : forall n m, {eq_nat n m} + {~ eq_nat n m}.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Boolean equality on nat.

│ │ │ +

Boolean equality on nat.

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ We reuse the one already defined in module Nat. │ │ │ In scope nat_scope, the notation "=?" can be used. │ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Arith.Even.html │ │ │ @@ -39,15 +39,15 @@ │ │ │
│ │ │ Implicit Types m n : nat.
│ │ │ │ │ │
│ │ │ │ │ │ │ │ │
│ │ │ -

Inductive definition of even and odd

│ │ │ +

Inductive definition of even and odd

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Inductive even : nat -> Prop :=
│ │ │   | even_O : even 0
│ │ │ @@ -59,15 +59,15 @@ │ │ │ Hint Constructors even: arith.
│ │ │ Hint Constructors odd: arith.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Equivalence with predicates Nat.Even and Nat.odd

│ │ │ +

Equivalence with predicates Nat.Even and Nat.odd

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma even_equiv : forall n, even n <-> Nat.Even n.
│ │ │ │ │ │ @@ -91,15 +91,15 @@ │ │ │
│ │ │ Lemma not_even_and_odd n : even n -> odd n -> False.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Facts about even & odd wrt. plus

│ │ │ +

Facts about even & odd wrt. plus

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Ltac parity2bool :=
│ │ │  rewrite ?even_equiv, ?odd_equiv, <- ?Nat.even_spec, <- ?Nat.odd_spec.
│ │ │ @@ -162,15 +162,15 @@ │ │ │
│ │ │ Lemma odd_plus_odd_inv_r n m : odd (n + m) -> even n -> odd m.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Facts about even and odd wrt. mult

│ │ │ +

Facts about even and odd wrt. mult

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma even_mult_aux n m :
│ │ │   (odd (n * m) <-> odd n /\ odd m) /\ (even (n * m) <-> even n \/ even m).
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Arith.Gt.html │ │ │ @@ -40,15 +40,15 @@ │ │ │ Require Import PeanoNat Le Lt Plus.
│ │ │ Local Open Scope nat_scope.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Order and successor

│ │ │ +

Order and successor

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Theorem gt_Sn_O n : S n > 0.
│ │ │ │ │ │ @@ -67,39 +67,39 @@ │ │ │
│ │ │ Lemma gt_pred n m : m > S n -> pred m > n.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Irreflexivity

│ │ │ +

Irreflexivity

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma gt_irrefl n : ~ n > n.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Asymmetry

│ │ │ +

Asymmetry

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma gt_asym n m : n > m -> ~ m > n.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Relating strict and large orders

│ │ │ +

Relating strict and large orders

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma le_not_gt n m : n <= m -> ~ n > m.
│ │ │ │ │ │ @@ -118,15 +118,15 @@ │ │ │
│ │ │ Lemma le_gt_S n m : n <= m -> S m > n.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Transitivity

│ │ │ +

Transitivity

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Theorem le_gt_trans n m p : m <= n -> m > p -> n > p.
│ │ │ │ │ │ @@ -139,42 +139,42 @@ │ │ │
│ │ │ Theorem gt_trans_S n m p : S n > m -> m > p -> n > p.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Comparison to 0

│ │ │ +

Comparison to 0

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Theorem gt_0_eq n : n > 0 \/ 0 = n.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Simplification and compatibility

│ │ │ +

Simplification and compatibility

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma plus_gt_reg_l n m p : p + n > p + m -> n > m.
│ │ │ │ │ │
│ │ │ Lemma plus_gt_compat_l n m p : n > m -> p + n > p + m.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Hints

│ │ │ +

Hints

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Hint Resolve gt_Sn_O gt_Sn_n gt_n_S : arith.
│ │ │ Hint Immediate gt_S_n gt_pred : arith.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Arith.Le.html │ │ │ @@ -45,15 +45,15 @@ │ │ │
│ │ │ Local Open Scope nat_scope.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

le is an order on nat

│ │ │ +

le is an order on nat

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Notation le_refl := Nat.le_refl (only parsing).
│ │ │ Notation le_trans := Nat.le_trans (only parsing).
│ │ │ @@ -63,29 +63,29 @@ │ │ │ Hint Resolve le_trans: arith.
│ │ │ Hint Immediate le_antisym: arith.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties of le w.r.t 0

│ │ │ +

Properties of le w.r.t 0

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Notation le_0_n := Nat.le_0_l (only parsing). Notation le_Sn_0 := Nat.nle_succ_0 (only parsing). │ │ │
│ │ │ Lemma le_n_0_eq n : n <= 0 -> 0 = n.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties of le w.r.t successor

│ │ │ +

Properties of le w.r.t successor

│ │ │ │ │ │
│ │ │ │ │ │ See also Nat.succ_le_mono. │ │ │
│ │ │
│ │ │ │ │ │ @@ -105,29 +105,29 @@ │ │ │ Hint Resolve le_n_S le_n_Sn le_Sn_n : arith.
│ │ │ Hint Immediate le_n_0_eq le_Sn_le le_S_n : arith.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties of le w.r.t predecessor

│ │ │ +

Properties of le w.r.t predecessor

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Notation le_pred_n := Nat.le_pred_l (only parsing). Notation le_pred := Nat.pred_le_mono (only parsing). │ │ │
│ │ │ Hint Resolve le_pred_n: arith.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

A different elimination principle for the order on natural numbers

│ │ │ +

A different elimination principle for the order on natural numbers

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma le_elim_rel :
│ │ │  forall P:nat -> nat -> Prop,
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Arith.Lt.html │ │ │ @@ -42,29 +42,29 @@ │ │ │
│ │ │ Local Open Scope nat_scope.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Irreflexivity

│ │ │ +

Irreflexivity

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Notation lt_irrefl := Nat.lt_irrefl (only parsing). │ │ │
│ │ │ Hint Resolve lt_irrefl: arith.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Relationship between le and lt

│ │ │ +

Relationship between le and lt

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Theorem lt_le_S n m : n < m -> S n <= m.
│ │ │ │ │ │ @@ -92,26 +92,26 @@ │ │ │
│ │ │ Hint Immediate le_not_lt lt_not_le: arith.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Asymmetry

│ │ │ +

Asymmetry

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Notation lt_asym := Nat.lt_asymm (only parsing). │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Order and 0

│ │ │ +

Order and 0

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Notation lt_0_Sn := Nat.lt_0_succ (only parsing). Notation lt_n_0 := Nat.nlt_0_r (only parsing). │ │ │
│ │ │ @@ -124,15 +124,15 @@ │ │ │ Hint Resolve lt_0_Sn lt_n_0 : arith.
│ │ │ Hint Immediate neq_0_lt lt_0_neq: arith.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Order and successor

│ │ │ +

Order and successor

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Notation lt_n_Sn := Nat.lt_succ_diag_r (only parsing). Notation lt_S := Nat.lt_lt_succ_r (only parsing). │ │ │
│ │ │ @@ -147,15 +147,15 @@ │ │ │ Hint Resolve lt_n_Sn lt_S lt_n_S : arith.
│ │ │ Hint Immediate lt_S_n : arith.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Predecessor

│ │ │ +

Predecessor

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma S_pred n m : m < n -> n = S (pred n).
│ │ │ │ │ │ @@ -172,15 +172,15 @@ │ │ │ Hint Immediate lt_pred: arith.
│ │ │ Hint Resolve lt_pred_n_n: arith.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Transitivity properties

│ │ │ +

Transitivity properties

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Notation lt_trans := Nat.lt_trans (only parsing).
│ │ │ Notation lt_le_trans := Nat.lt_le_trans (only parsing).
│ │ │ @@ -191,15 +191,15 @@ │ │ │
│ │ │ Hint Resolve lt_trans lt_le_trans le_lt_trans: arith.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Large = strict or equal

│ │ │ +

Large = strict or equal

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Notation le_lt_or_eq_iff := Nat.lt_eq_cases (only parsing).
│ │ │ │ │ │ @@ -212,15 +212,15 @@ │ │ │
│ │ │ Hint Immediate lt_le_weak: arith.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Dichotomy

│ │ │ +

Dichotomy

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Notation le_or_lt := Nat.le_gt_cases (only parsing). │ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Arith.Minus.html │ │ │ @@ -46,27 +46,27 @@ │ │ │
│ │ │ Local Open Scope nat_scope.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

0 is right neutral

│ │ │ +

0 is right neutral

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma minus_n_O n : n = n - 0.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Permutation with successor

│ │ │ +

Permutation with successor

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma minus_Sn_m n m : m <= n -> S (n - m) = S n - m.
│ │ │ │ │ │ @@ -75,15 +75,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Diagonal

│ │ │ +

Diagonal

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Notation minus_diag := Nat.sub_diag (only parsing). │ │ │
│ │ │ @@ -92,27 +92,27 @@ │ │ │
│ │ │ Notation minus_n_n := minus_diag_reverse.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Simplification

│ │ │ +

Simplification

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma minus_plus_simpl_l_reverse n m p : n - m = p + n - (p + m).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Relation with plus

│ │ │ +

Relation with plus

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma plus_minus n m p : n = m + p -> p = n - m.
│ │ │ │ │ │ @@ -125,15 +125,15 @@ │ │ │
│ │ │ Lemma le_plus_minus n m : n <= m -> m = n + (m - n).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Relation with order

│ │ │ +

Relation with order

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Notation minus_le_compat_r :=
│ │ │   Nat.sub_le_mono_r (only parsing). │ │ │ @@ -148,15 +148,15 @@ │ │ │
│ │ │ Theorem not_le_minus_0 n m : ~ m <= n -> n - m = 0.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Hints

│ │ │ +

Hints

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Hint Resolve minus_n_O: arith.
│ │ │ Hint Resolve minus_Sn_m: arith.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Arith.Mult.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties of multiplication.

│ │ │ +

Properties of multiplication.

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ This file is mostly OBSOLETE now, see module PeanoNat.Nat instead. │ │ │ │ │ │
│ │ │ @@ -46,58 +46,58 @@ │ │ │
│ │ │ Local Open Scope nat_scope.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

nat is a semi-ring

│ │ │ +

nat is a semi-ring

│ │ │ │ │ │
│ │ │ │ │ │ -

Zero property

│ │ │ +

Zero property

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Notation mult_0_l := Nat.mul_0_l (only parsing). Notation mult_0_r := Nat.mul_0_r (only parsing). │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

1 is neutral

│ │ │ +

1 is neutral

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Notation mult_1_l := Nat.mul_1_l (only parsing). Notation mult_1_r := Nat.mul_1_r (only parsing). │ │ │
│ │ │ Hint Resolve mult_1_l mult_1_r: arith.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Commutativity

│ │ │ +

Commutativity

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Notation mult_comm := Nat.mul_comm (only parsing). │ │ │
│ │ │ Hint Resolve mult_comm: arith.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Distributivity

│ │ │ +

Distributivity

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Notation mult_plus_distr_r :=
│ │ │   Nat.mul_add_distr_r (only parsing). │ │ │ @@ -115,15 +115,15 @@ │ │ │ Hint Resolve mult_minus_distr_r: arith.
│ │ │ Hint Resolve mult_minus_distr_l: arith.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Associativity

│ │ │ +

Associativity

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Notation mult_assoc := Nat.mul_assoc (only parsing). │ │ │
│ │ │ @@ -133,41 +133,41 @@ │ │ │ Hint Resolve mult_assoc_reverse: arith.
│ │ │ Hint Resolve mult_assoc: arith.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Inversion lemmas

│ │ │ +

Inversion lemmas

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma mult_is_O n m : n * m = 0 -> n = 0 \/ m = 0.
│ │ │ │ │ │
│ │ │ Lemma mult_is_one n m : n * m = 1 -> n = 1 /\ m = 1.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Multiplication and successor

│ │ │ +

Multiplication and successor

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Notation mult_succ_l := Nat.mul_succ_l (only parsing). Notation mult_succ_r := Nat.mul_succ_r (only parsing). │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Compatibility with orders

│ │ │ +

Compatibility with orders

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma mult_O_le n m : m = 0 \/ n <= m * n.
│ │ │ Hint Resolve mult_O_le: arith.
│ │ │ @@ -197,27 +197,27 @@ │ │ │
│ │ │ Lemma mult_S_le_reg_l n m p : S n * m <= S n * p -> m <= p.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

n|->2*n and n|->2n+1 have disjoint image

│ │ │ +

n|->2*n and n|->2n+1 have disjoint image

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Theorem odd_even_lem p q : 2 * p + 1 <> 2 * q.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Tail-recursive mult

│ │ │ +

Tail-recursive mult

│ │ │ │ │ │
│ │ │ │ │ │ tail_mult is an alternative definition for mult which is │ │ │ tail-recursive, whereas mult is not. This can be useful │ │ │ when extracting programs. │ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Arith.PeanoNat.html │ │ │ @@ -114,15 +114,15 @@ │ │ │     Aeq a a -> Proper (eq==>Aeq==>Aeq) f ->
│ │ │       forall n : nat, Aeq (recursion a f (S n)) (f n (recursion a f n)).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Remaining constants not defined in Coq.Init.Nat

│ │ │ +

Remaining constants not defined in Coq.Init.Nat

│ │ │ │ │ │
│ │ │ │ │ │ NB: Aliasing le is mandatory, since only a Definition can implement │ │ │ an interface Parameter... │ │ │
│ │ │
│ │ │ @@ -132,15 +132,15 @@ │ │ │ Definition le := Peano.le.
│ │ │ Definition lt := Peano.lt.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Basic specifications : pred add sub mul

│ │ │ +

Basic specifications : pred add sub mul

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma pred_succ n : pred (S n) = n.
│ │ │ │ │ │ @@ -174,15 +174,15 @@ │ │ │
│ │ │ Lemma lt_succ_r n m : n < S m <-> n <= m.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Boolean comparisons

│ │ │ +

Boolean comparisons

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma eqb_eq n m : eqb n m = true <-> n = m.
│ │ │ │ │ │ @@ -192,27 +192,27 @@ │ │ │
│ │ │ Lemma ltb_lt n m : (n <? m) = true <-> n < m.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Decidability of equality over nat.

│ │ │ +

Decidability of equality over nat.

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma eq_dec : forall n m : nat, {n = m} + {n <> m}.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Ternary comparison

│ │ │ +

Ternary comparison

│ │ │ │ │ │
│ │ │ │ │ │ With nat, it would be easier to prove first compare_spec, │ │ │ then the properties below. But then we wouldn't be able to │ │ │ benefit from functor BoolOrderFacts │ │ │
│ │ │ @@ -235,15 +235,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │ │ │ │ │ │ │
│ │ │ -

Minimum, maximum

│ │ │ +

Minimum, maximum

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma max_l : forall n m, m <= n -> max n m = n.
│ │ │ │ │ │ @@ -281,15 +281,15 @@ │ │ │
│ │ │ Include NBasicProp <+ UsualMinMaxLogicalProperties <+ UsualMinMaxDecProperties.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Power

│ │ │ +

Power

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma pow_neg_r a b : b<0 -> a^b = 0.
│ │ │ │ │ │ @@ -299,27 +299,27 @@ │ │ │
│ │ │ Lemma pow_succ_r a b : 0<=b -> a^(S b) = a * a^b.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Square

│ │ │ +

Square

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma square_spec n : square n = n * n.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Parity

│ │ │ +

Parity

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition Even n := exists m, n = 2*m.
│ │ │ Definition Odd n := exists m, n = 2*m+1.
│ │ │ @@ -349,15 +349,15 @@ │ │ │
│ │ │ Lemma odd_spec : forall n, odd n = true <-> Odd n.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Division

│ │ │ +

Division

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma divmod_spec : forall x y q u, u <= y ->
│ │ │  let (q',u') := divmod x y q u in
│ │ │ @@ -369,15 +369,15 @@ │ │ │
│ │ │ Lemma mod_bound_pos x y : 0<=x -> 0<y -> 0 <= x mod y < y.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Square root

│ │ │ +

Square root

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma sqrt_iter_spec : forall k p q r,
│ │ │  q = p+p -> r<=q ->
│ │ │ @@ -393,15 +393,15 @@ │ │ │
│ │ │ Lemma sqrt_neg a : a<0 -> sqrt a = 0.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Logarithm

│ │ │ +

Logarithm

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma log2_iter_spec : forall k p q r,
│ │ │  2^(S p) = q + S r -> r < 2^p ->
│ │ │ @@ -415,15 +415,15 @@ │ │ │
│ │ │ Lemma log2_nonpos n : n<=0 -> log2 n = 0.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Gcd

│ │ │ +

Gcd

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition divide x y := exists z, y=z*x.
│ │ │ Notation "( x | y )" := (divide x y) (at level 0) : nat_scope.
│ │ │ @@ -443,15 +443,15 @@ │ │ │
│ │ │ Lemma gcd_nonneg a b : 0<=gcd a b.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Bitwise operations

│ │ │ +

Bitwise operations

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma div2_double n : div2 (2*n) = n.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Arith.Plus.html │ │ │ @@ -46,15 +46,15 @@ │ │ │
│ │ │ Local Open Scope nat_scope.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Neutrality of 0, commutativity, associativity

│ │ │ +

Neutrality of 0, commutativity, associativity

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Notation plus_0_l := Nat.add_0_l (only parsing).
│ │ │ Notation plus_0_r := Nat.add_0_r (only parsing).
│ │ │ @@ -71,15 +71,15 @@ │ │ │
│ │ │ Lemma plus_assoc_reverse n m p : n + m + p = n + (m + p).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Simplification

│ │ │ +

Simplification

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma plus_reg_l n m p : p + n = p + m -> n = m.
│ │ │ │ │ │ @@ -89,15 +89,15 @@ │ │ │
│ │ │ Lemma plus_lt_reg_l n m p : p + n < p + m -> n < m.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Compatibility with order

│ │ │ +

Compatibility with order

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma plus_le_compat_l n m p : n <= m -> p + n <= p + m.
│ │ │ │ │ │ @@ -134,15 +134,15 @@ │ │ │
│ │ │ Theorem lt_plus_trans n m p : n < m -> n < m + p.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Inversion lemmas

│ │ │ +

Inversion lemmas

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma plus_is_O n m : n + m = 0 -> n = 0 /\ m = 0.
│ │ │ │ │ │ @@ -150,27 +150,27 @@ │ │ │ Definition plus_is_one m n :
│ │ │   m + n = 1 -> {m = 0 /\ n = 1} + {m = 1 /\ n = 0}.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Derived properties

│ │ │ +

Derived properties

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Notation plus_permute_2_in_4 := Nat.add_shuffle1 (only parsing).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Tail-recursive plus

│ │ │ +

Tail-recursive plus

│ │ │ │ │ │
│ │ │ │ │ │ tail_plus is an alternative definition for plus which is │ │ │ tail-recursive, whereas plus is not. This can be useful │ │ │ when extracting programs. │ │ │
│ │ │ @@ -186,15 +186,15 @@ │ │ │
│ │ │ Lemma plus_tail_plus : forall n m, n + m = tail_plus n m.
│ │ │ │ │ │
│ │ │ │ │ │ │ │ │
│ │ │ -

Discrimination

│ │ │ +

Discrimination

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma succ_plus_discr n m : n <> S (m+n).
│ │ │ │ │ │ @@ -207,15 +207,15 @@ │ │ │
│ │ │ Lemma n_SSSSn n : n <> S (S (S (S n))).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Compatibility Hints

│ │ │ +

Compatibility Hints

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Hint Immediate plus_comm : arith.
│ │ │ Hint Resolve plus_assoc plus_assoc_reverse : arith.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Bool.Bool.html │ │ │ @@ -50,27 +50,27 @@ │ │ │     | false => False
│ │ │   end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Decidability

│ │ │ +

Decidability

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma bool_dec : forall b1 b2 : bool, {b1 = b2} + {b1 <> b2}.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Discrimination

│ │ │ +

Discrimination

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma diff_true_false : true <> false.
│ │ │ Hint Resolve diff_true_false : bool.
│ │ │ @@ -95,15 +95,15 @@ │ │ │
│ │ │ Lemma not_false_iff_true : forall b, b <> false <-> b = true.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Order on booleans

│ │ │ +

Order on booleans

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ #[ local ] Definition le (b1 b2:bool) :=
│ │ │   match b1 with
│ │ │ @@ -141,15 +141,15 @@ │ │ │ Lemma compare_spec : forall b1 b2,
│ │ │   CompareSpec (b1 = b2) (lt b1 b2) (lt b2 b1) (compare b1 b2).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Equality

│ │ │ +

Equality

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition eqb (b1 b2:bool) : bool :=
│ │ │   match b1, b2 with
│ │ │ @@ -175,15 +175,15 @@ │ │ │
│ │ │ Lemma eqb_false_iff : forall a b:bool, eqb a b = false <-> a <> b.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

A synonym of if on bool

│ │ │ +

A synonym of if on bool

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition ifb (b1 b2 b3:bool) : bool :=
│ │ │   match b1 with
│ │ │ @@ -194,30 +194,30 @@ │ │ │
│ │ │ Open Scope bool_scope.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

De Morgan laws

│ │ │ +

De Morgan laws

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma negb_orb : forall b1 b2:bool, negb (b1 || b2) = negb b1 && negb b2.
│ │ │ │ │ │
│ │ │ Lemma negb_andb : forall b1 b2:bool, negb (b1 && b2) = negb b1 || negb b2.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties of negb

│ │ │ +

Properties of negb

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma negb_involutive : forall b:bool, negb (negb b) = b.
│ │ │ │ │ │ @@ -251,15 +251,15 @@ │ │ │
│ │ │ Lemma negb_false_iff : forall b, negb b = false <-> b = true.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties of orb

│ │ │ +

Properties of orb

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma orb_true_iff :
│ │ │   forall b1 b2, b1 || b2 = true <-> b1 = true \/ b2 = true.
│ │ │ @@ -372,15 +372,15 @@ │ │ │ Lemma orb_assoc : forall b1 b2 b3:bool, b1 || (b2 || b3) = b1 || b2 || b3.
│ │ │ Hint Resolve orb_comm orb_assoc: bool.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties of andb

│ │ │ +

Properties of andb

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma andb_true_iff :
│ │ │   forall b1 b2:bool, b1 && b2 = true <-> b1 = true /\ b2 = true.
│ │ │ @@ -486,15 +486,15 @@ │ │ │
│ │ │ Hint Resolve andb_comm andb_assoc: bool.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties mixing andb and orb

│ │ │ +

Properties mixing andb and orb

│ │ │ │ │ │
│ │ │ │ │ │ Distributivity │ │ │
│ │ │
│ │ │ │ │ │ @@ -536,15 +536,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties of implb

│ │ │ +

Properties of implb

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma implb_true_iff : forall b1 b2:bool, implb b1 b2 = true <-> (b1 = true -> b2 = true).
│ │ │ │ │ │ @@ -590,15 +590,15 @@ │ │ │
│ │ │ Lemma implb_orb_distrib_l : forall b1 b2 b3:bool, implb (b1 || b2) b3 = implb b1 b3 && implb b2 b3.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties of xorb

│ │ │ +

Properties of xorb

│ │ │ │ │ │
│ │ │ │ │ │ false is neutral for xorb │ │ │
│ │ │
│ │ │ │ │ │ @@ -740,15 +740,15 @@ │ │ │ Lemma trans_eq_bool : forall x y z:bool, x = y -> y = z -> x = z.
│ │ │ Hint Resolve trans_eq_bool : core.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Reflection of bool into Prop

│ │ │ +

Reflection of bool into Prop

│ │ │ │ │ │
│ │ │ │ │ │ Is_true and equality │ │ │
│ │ │
│ │ │ │ │ │ @@ -850,15 +850,15 @@ │ │ │  (if negb b then a else a') =
│ │ │  (if b then a' else a).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Alternative versions of andb and orb

│ │ │ +

Alternative versions of andb and orb

│ │ │ │ │ │ with lazy behavior (for vm_compute) │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ │ │ │ @@ -877,15 +877,15 @@ │ │ │
│ │ │ Lemma orb_lazy_alt : forall a b : bool, a || b = a ||| b.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Reflect: a specialized inductive type for

│ │ │ +

Reflect: a specialized inductive type for

│ │ │ │ │ │ relating propositions and booleans, │ │ │ as popularized by the Ssreflect library. │ │ │
│ │ │
│ │ │ │ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Bool.BoolOrder.html │ │ │ @@ -31,15 +31,15 @@ │ │ │ Require Import Orders.
│ │ │ Import BoolNotations.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Order le

│ │ │ +

Order le

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma le_refl : forall b, b <= b.
│ │ │ │ │ │ @@ -56,15 +56,15 @@ │ │ │
│ │ │ Instance le_compat : Proper (eq ==> eq ==> iff) Bool.le.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Strict order lt

│ │ │ +

Strict order lt

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma lt_irrefl : forall b, ~ b < b.
│ │ │ │ │ │ @@ -90,15 +90,15 @@ │ │ │
│ │ │ Lemma le_lteq : forall b1 b2, b1 <= b2 <-> b1 < b2 \/ b1 = b2.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Order structures

│ │ │ +

Order structures

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Instance le_preorder : PreOrder Bool.le.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Classes.CEquivalence.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Typeclass-based setoids. Definitions on Equivalence.

│ │ │ +

Typeclass-based setoids. Definitions on Equivalence.

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Author: Matthieu Sozeau │ │ │ Institution: LRI, CNRS UMR 8623 - University Paris Sud │ │ ├── ./usr/share/doc/coq-theories/html/Coq.Classes.CMorphisms.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Typeclass-based morphism definition and standard, minimal instances

│ │ │ +

Typeclass-based morphism definition and standard, minimal instances

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Author: Matthieu Sozeau │ │ │ Institution: LRI, CNRS UMR 8623 - University Paris Sud │ │ │ │ │ │ @@ -39,15 +39,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Morphisms.

│ │ │ +

Morphisms.

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ We now turn to the definition of Proper and declare standard instances. │ │ │ These will be used by the setoid_rewrite tactic later. │ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Classes.CRelationClasses.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Typeclass-based relations, tactics and standard instances

│ │ │ +

Typeclass-based relations, tactics and standard instances

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ This is the basic theory needed to formalize morphisms and setoids. │ │ │ │ │ │
│ │ │ @@ -407,15 +407,15 @@ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ We can already dualize all these properties. │ │ │
│ │ │ │ │ │ -

Standard instances.

│ │ │ +

Standard instances.

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Ltac reduce_hyp H :=
│ │ │   match type of H with
│ │ │ @@ -548,15 +548,15 @@ │ │ │
│ │ │   Global Instance relation_implication_preorder : PreOrder (@subrelation A).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Partial Order.

│ │ │ +

Partial Order.

│ │ │ │ │ │ A partial order is a preorder which is additionally antisymmetric. │ │ │ We give an equivalent definition, up-to an equivalence crelation │ │ │ on the carrier. │ │ │
│ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Classes.DecidableClass.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

A typeclass to ease the handling of decidable properties.

│ │ │ +

A typeclass to ease the handling of decidable properties.

│ │ │ │ │ │
│ │ │ │ │ │ A proposition is decidable whenever it is reflected by a boolean. │ │ │
│ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Classes.EquivDec.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Decidable equivalences.

│ │ │ +

Decidable equivalences.

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Author: Matthieu Sozeau │ │ │ Institution: LRI, CNRS UMR 8623 - University Paris Sud │ │ ├── ./usr/share/doc/coq-theories/html/Coq.Classes.Equivalence.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Typeclass-based setoids. Definitions on Equivalence.

│ │ │ +

Typeclass-based setoids. Definitions on Equivalence.

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Author: Matthieu Sozeau │ │ │ Institution: LRI, CNRS UMR 8623 - University Paris Sud │ │ ├── ./usr/share/doc/coq-theories/html/Coq.Classes.Init.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Initialization code for typeclasses, setting up the default tactic

│ │ │ +

Initialization code for typeclasses, setting up the default tactic

│ │ │ │ │ │ for instance search. │ │ │ │ │ │
│ │ │ │ │ │ Author: Matthieu Sozeau │ │ │ Institution: LRI, CNRS UMR 8623 - University Paris Sud │ │ ├── ./usr/share/doc/coq-theories/html/Coq.Classes.Morphisms.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Typeclass-based morphism definition and standard, minimal instances

│ │ │ +

Typeclass-based morphism definition and standard, minimal instances

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Author: Matthieu Sozeau │ │ │ Institution: LRI, CNRS UMR 8623 - University Paris Sud │ │ │ │ │ │ @@ -38,15 +38,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Morphisms.

│ │ │ +

Morphisms.

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ We now turn to the definition of Proper and declare standard instances. │ │ │ These will be used by the setoid_rewrite tactic later. │ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Classes.Morphisms_Prop.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Proper instances for propositional connectives.

│ │ │ +

Proper instances for propositional connectives.

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Author: Matthieu Sozeau │ │ │ Institution: LRI, CNRS UMR 8623 - University Paris Sud │ │ ├── ./usr/share/doc/coq-theories/html/Coq.Classes.Morphisms_Relations.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Morphism instances for relations.

│ │ │ +

Morphism instances for relations.

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Author: Matthieu Sozeau │ │ │ Institution: LRI, CNRS UMR 8623 - University Paris Sud │ │ ├── ./usr/share/doc/coq-theories/html/Coq.Classes.RelationClasses.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Typeclass-based relations, tactics and standard instances

│ │ │ +

Typeclass-based relations, tactics and standard instances

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ This is the basic theory needed to formalize morphisms and setoids. │ │ │ │ │ │
│ │ │ @@ -404,15 +404,15 @@ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ We can already dualize all these properties. │ │ │
│ │ │ │ │ │ -

Standard instances.

│ │ │ +

Standard instances.

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Ltac reduce_hyp H :=
│ │ │   match type of H with
│ │ │ @@ -761,15 +761,15 @@ │ │ │
│ │ │   Global Instance relation_implication_preorder : PreOrder (@subrelation A).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Partial Order.

│ │ │ +

Partial Order.

│ │ │ │ │ │ A partial order is a preorder which is additionally antisymmetric. │ │ │ We give an equivalent definition, up-to an equivalence relation │ │ │ on the carrier. │ │ │
│ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Classes.RelationPairs.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Relations over pairs

│ │ │ +

Relations over pairs

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Require Import SetoidList.
│ │ │ Require Import Relations Morphisms.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Classes.SetoidClass.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Typeclass-based setoids, tactics and standard instances.

│ │ │ +

Typeclass-based setoids, tactics and standard instances.

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Author: Matthieu Sozeau │ │ │ Institution: LRI, CNRS UMR 8623 - University Paris Sud │ │ ├── ./usr/share/doc/coq-theories/html/Coq.Classes.SetoidDec.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Decidable setoid equality theory.

│ │ │ +

Decidable setoid equality theory.

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Author: Matthieu Sozeau │ │ │ Institution: LRI, CNRS UMR 8623 - University Paris Sud │ │ ├── ./usr/share/doc/coq-theories/html/Coq.Classes.SetoidTactics.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Tactics for typeclass-based setoids.

│ │ │ +

Tactics for typeclass-based setoids.

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Author: Matthieu Sozeau │ │ │ Institution: LRI, CNRS UMR 8623 - University Paris Sud │ │ ├── ./usr/share/doc/coq-theories/html/Coq.FSets.FMapAVL.html │ │ │ @@ -17,15 +17,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

FMapAVL

│ │ │ +

FMapAVL

│ │ │ │ │ │
│ │ │ │ │ │ This module implements maps using AVL trees. │ │ │ It follows the implementation from Ocaml's standard library. │ │ │ │ │ │
│ │ │ @@ -53,15 +53,15 @@ │ │ │ Notation "s #1" := (fst s) (at level 9, format "s '#1'") : pair_scope.
│ │ │ Notation "s #2" := (snd s) (at level 9, format "s '#2'") : pair_scope.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

The Raw functor

│ │ │ +

The Raw functor

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Functor of pure functions + separate proofs of invariant │ │ │ preservation │ │ │
│ │ │ @@ -77,19 +77,19 @@ │ │ │ Definition key := X.t.
│ │ │ Hint Transparent key : core.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Trees

│ │ │ +

Trees

│ │ │ │ │ │
│ │ │ │ │ │ -

Trees

│ │ │ +

Trees

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ The fifth field of Node is the height of the tree │ │ │
│ │ │
│ │ │ @@ -112,15 +112,15 @@ │ │ │
│ │ │ Implicit Types m : t.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Basic functions on trees: height and cardinal

│ │ │ +

Basic functions on trees: height and cardinal

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition height (m : t) : int :=
│ │ │   match m with
│ │ │ @@ -135,39 +135,39 @@ │ │ │    | Node l _ _ r _ => S (cardinal l + cardinal r)
│ │ │   end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Empty Map

│ │ │ +

Empty Map

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition empty : t := Leaf.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Emptyness test

│ │ │ +

Emptyness test

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition is_empty m := match m with Leaf => true | _ => false end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Membership

│ │ │ +

Membership

│ │ │ │ │ │
│ │ │ │ │ │ The mem function is deciding membership. It exploits the bst property │ │ │ to achieve logarithmic complexity. │ │ │
│ │ │
│ │ │ @@ -194,15 +194,15 @@ │ │ │          end
│ │ │    end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Helper functions

│ │ │ +

Helper functions

│ │ │ │ │ │
│ │ │ │ │ │ create l x r creates a node, assuming l and r │ │ │ to be balanced and |height l - height r| <= 2. │ │ │
│ │ │
│ │ │ @@ -257,15 +257,15 @@ │ │ │     else
│ │ │       create l x d r.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Insertion

│ │ │ +

Insertion

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Fixpoint add x d m :=
│ │ │   match m with
│ │ │ @@ -278,15 +278,15 @@ │ │ │       end
│ │ │   end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Extraction of minimum binding

│ │ │ +

Extraction of minimum binding

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Morally, remove_min is to be applied to a non-empty tree │ │ │ t = Node l x e r h. Since we can't deal here with assert false │ │ │ for t=Leaf, we pre-unpack t (and forget about h). │ │ │ @@ -303,15 +303,15 @@ │ │ │        (bal l' x d r, m)
│ │ │   end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Merging two trees

│ │ │ +

Merging two trees

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ merge t1 t2 builds the union of t1 and t2 assuming all elements │ │ │ of t1 to be smaller than all elements of t2, and │ │ │ |height t1 - height t2| <= 2. │ │ │ @@ -329,15 +329,15 @@ │ │ │     end
│ │ │ end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Deletion

│ │ │ +

Deletion

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Fixpoint remove x m := match m with
│ │ │   | Leaf => Leaf
│ │ │ @@ -349,15 +349,15 @@ │ │ │       end
│ │ │    end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

join

│ │ │ +

join

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Same as bal but does not assume anything regarding heights of l │ │ │ and r. │ │ │ │ │ │ @@ -378,15 +378,15 @@ │ │ │           end
│ │ │   end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Splitting

│ │ │ +

Splitting

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ split x m returns a triple (l, o, r) where │ │ │
    │ │ │
  • l is the set of elements of m that are < x │ │ │ @@ -418,15 +418,15 @@ │ │ │      end
    │ │ │  end.
    │ │ │ │ │ │
    │ │ │
│ │ │ │ │ │
│ │ │ -

Concatenation

│ │ │ +

Concatenation

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Same as merge but does not assume anything about heights. │ │ │ │ │ │
│ │ │ @@ -442,15 +442,15 @@ │ │ │             join m1 xd#1 xd#2 m2'
│ │ │    end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Elements

│ │ │ +

Elements

│ │ │ │ │ │
│ │ │ │ │ │ elements_tree_aux acc t catenates the elements of t in infix │ │ │ order to the list acc │ │ │
│ │ │
│ │ │ @@ -473,15 +473,15 @@ │ │ │
│ │ │ Definition elements := elements_aux nil.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Fold

│ │ │ +

Fold

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Fixpoint fold (A : Type) (f : key -> elt -> A -> A) (m : t) : A -> A :=
│ │ │  fun a => match m with
│ │ │ @@ -489,27 +489,27 @@ │ │ │   | Node l x d r _ => fold f r (f x d (fold f l a))
│ │ │  end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Comparison

│ │ │ +

Comparison

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Variable cmp : elt->elt->bool.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Enumeration of the elements of a tree

│ │ │ +

Enumeration of the elements of a tree

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Inductive enumeration :=
│ │ │  | End : enumeration
│ │ │ @@ -598,15 +598,15 @@ │ │ │ Notation "t #o" := (t_opt t) (at level 9, format "t '#o'").
│ │ │ Notation "t #r" := (t_right t) (at level 9, format "t '#r'").
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Map

│ │ │ +

Map

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Fixpoint map (elt elt' : Type)(f : elt -> elt')(m : t elt) : t elt' :=
│ │ │   match m with
│ │ │ @@ -623,15 +623,15 @@ │ │ │    | Node l x d r h => Node (mapi f l) x (f x d) (mapi f r) h
│ │ │   end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Map with removal

│ │ │ +

Map with removal

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Fixpoint map_option (elt elt' : Type)(f : key -> elt -> option elt')(m : t elt)
│ │ │   : t elt' :=
│ │ │ @@ -644,15 +644,15 @@ │ │ │       end
│ │ │   end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Optimized map2

│ │ │ +

Optimized map2

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Suggestion by B. Gregoire: a map2 function with specialized │ │ │ arguments that allows bypassing some tree traversal. Instead of one │ │ │ f0 of type key -> option elt -> option elt' -> option elt'', │ │ │ @@ -700,15 +700,15 @@ │ │ │
│ │ │ End Map2_opt.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Map2

│ │ │ +

Map2

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ The map2 function of the Map interface can be implemented │ │ │ via map2_opt and map_option. │ │ │ │ │ │ @@ -730,28 +730,28 @@ │ │ │
│ │ │ End Map2.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Invariants

│ │ │ +

Invariants

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Section Invariants.
│ │ │ Variable elt : Type.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Occurrence in a tree

│ │ │ +

Occurrence in a tree

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Inductive MapsTo (x : key)(e : elt) : t elt -> Prop :=
│ │ │   | MapsRoot : forall l r h y,
│ │ │ @@ -773,15 +773,15 @@ │ │ │
│ │ │ Definition In0 k m := exists e:elt, MapsTo k e m.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Binary search trees

│ │ │ +

Binary search trees

│ │ │ │ │ │
│ │ │ │ │ │ lt_tree x s: all elements in s are smaller than x │ │ │ (resp. greater for gt_tree) │ │ │
│ │ │
│ │ │ @@ -807,15 +807,15 @@ │ │ │
│ │ │ End Invariants.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Correctness proofs, isolated in a sub-module

│ │ │ +

Correctness proofs, isolated in a sub-module

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module Proofs.
│ │ │  Module MX := OrderedTypeFacts X.
│ │ │ @@ -835,15 +835,15 @@ │ │ │ Functional Scheme map_option_ind := Induction for map_option Sort Prop.
│ │ │ Functional Scheme map2_opt_ind := Induction for map2_opt Sort Prop.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Automation and dedicated tactics.

│ │ │ +

Automation and dedicated tactics.

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Hint Constructors tree MapsTo In bst : core.
│ │ │ Hint Unfold lt_tree gt_tree : core.
│ │ │ @@ -943,15 +943,15 @@ │ │ │ Variable elt:Type.
│ │ │ Implicit Types m r : t elt.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Basic results about MapsTo, In, lt_tree, gt_tree, height

│ │ │ +

Basic results about MapsTo, In, lt_tree, gt_tree, height

│ │ │ │ │ │
│ │ │ │ │ │ Facts about MapsTo and In. │ │ │
│ │ │
│ │ │ │ │ │ @@ -1042,15 +1042,15 @@ │ │ │
│ │ │ Hint Resolve lt_tree_not_in lt_tree_trans gt_tree_not_in gt_tree_trans : core.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Empty map

│ │ │ +

Empty map

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition Empty m := forall (a:key)(e:elt) , ~ MapsTo a e m.
│ │ │ │ │ │ @@ -1060,30 +1060,30 @@ │ │ │
│ │ │ Lemma empty_1 : Empty (empty elt).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Emptyness test

│ │ │ +

Emptyness test

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma is_empty_1 : forall m, Empty m -> is_empty m = true.
│ │ │ │ │ │
│ │ │ Lemma is_empty_2 : forall m, is_empty m = true -> Empty m.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Membership

│ │ │ +

Membership

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma mem_1 : forall m x, bst m -> In x m -> mem x m = true.
│ │ │ │ │ │ @@ -1129,15 +1129,15 @@ │ │ │  find x m = find x m' ->
│ │ │  (In x m <-> In x m').
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Helper functions

│ │ │ +

Helper functions

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma create_bst :
│ │ │  forall l x e r, bst l -> bst r -> lt_tree x l -> gt_tree x r ->
│ │ │ @@ -1167,15 +1167,15 @@ │ │ │  bst l -> bst r -> lt_tree x l -> gt_tree x r ->
│ │ │  find y (bal l x e r) = find y (create l x e r).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Insertion

│ │ │ +

Insertion

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma add_in : forall m x y e,
│ │ │  In y (add x e m) <-> X.eq y x \/ In y m.
│ │ │ @@ -1200,15 +1200,15 @@ │ │ │  find y (add x e m) =
│ │ │   match X.compare y x with EQ _ => Some e | _ => find y m end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Extraction of minimum binding

│ │ │ +

Extraction of minimum binding

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma remove_min_in : forall l x e r h y,
│ │ │  In y (Node l x e r h) <->
│ │ │ @@ -1241,15 +1241,15 @@ │ │ │     | GT _ => find y (remove_min l x e r)#1
│ │ │    end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Merging two trees

│ │ │ +

Merging two trees

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma merge_in : forall m1 m2 y, bst m1 -> bst m2 ->
│ │ │  (In y (merge m1 m2) <-> In y m1 \/ In y m2).
│ │ │ @@ -1263,15 +1263,15 @@ │ │ │  (forall y1 y2 : key, In y1 m1 -> In y2 m2 -> X.lt y1 y2) ->
│ │ │  bst (merge m1 m2).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Deletion

│ │ │ +

Deletion

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma remove_in : forall m x y, bst m ->
│ │ │  (In y (remove x m) <-> ~ X.eq y x /\ In y m).
│ │ │ @@ -1290,15 +1290,15 @@ │ │ │ Lemma remove_3 : forall m x y e, bst m ->
│ │ │  MapsTo y e (remove x m) -> MapsTo y e m.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

join

│ │ │ +

join

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma join_in : forall l x d r y,
│ │ │  In y (join l x d r) <-> X.eq y x \/ In y l \/ In y r.
│ │ │ @@ -1313,15 +1313,15 @@ │ │ │  bst l -> bst r -> lt_tree x l -> gt_tree x r ->
│ │ │  find y (join l x d r) = find y (create l x d r).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

split

│ │ │ +

split

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma split_in_1 : forall m x, bst m -> forall y,
│ │ │  (In y (split x m)#l <-> In y m /\ X.lt y x).
│ │ │ @@ -1352,15 +1352,15 @@ │ │ │               | GT _ => find y (split x m)#r
│ │ │             end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Concatenation

│ │ │ +

Concatenation

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma concat_in : forall m1 m2 y,
│ │ │  In y (concat m1 m2) <-> In y m1 \/ In y m2.
│ │ │ @@ -1377,15 +1377,15 @@ │ │ │  find y (concat m1 m2) =
│ │ │   match find y m2 with Some d => Some d | None => find y m1 end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Elements

│ │ │ +

Elements

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Notation eqk := (PX.eqk (elt:= elt)).
│ │ │ Notation eqke := (PX.eqke (elt:= elt)).
│ │ │ @@ -1430,15 +1430,15 @@ │ │ │  elements t1 ++ (x,e) :: elements t2 ++ l =
│ │ │  elements (Node t1 x e t2 z) ++ l.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Fold

│ │ │ +

Fold

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition fold' (A : Type) (f : key -> elt -> A -> A)(s : t elt) :=
│ │ │   L.fold f (elements s).
│ │ │ @@ -1458,15 +1458,15 @@ │ │ │  forall (s:t elt)(Hs:bst s)(A : Type)(i:A)(f : key -> elt -> A -> A),
│ │ │  fold f s i = fold_left (fun a p => f p#1 p#2 a) (elements s) i.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Comparison

│ │ │ +

Comparison

│ │ │ │ │ │
│ │ │ │ │ │ flatten_e e returns the list of elements of the enumeration e │ │ │ i.e. the list of elements actually compared │ │ │
│ │ │
│ │ │ @@ -1683,15 +1683,15 @@ │ │ │ End Proofs.
│ │ │ End Raw.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Encapsulation

│ │ │ +

Encapsulation

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Now, in order to really provide a functor implementing S, we │ │ │ need to encapsulate everything into a type of balanced binary search trees. │ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.FSets.FMapFacts.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Finite maps library

│ │ │ +

Finite maps library

│ │ │ │ │ │
│ │ │ │ │ │ This functor derives additional facts from FMapInterface.S. These │ │ │ facts are mainly the specifications of FMapInterface.S written using │ │ │ different styles: equivalence and boolean equalities. │ │ │ │ │ │ @@ -38,15 +38,15 @@ │ │ │
│ │ │ Hint Extern 1 (Equivalence _) => constructor; congruence : core.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Facts about weak maps

│ │ │ +

Facts about weak maps

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module WFacts_fun (E:DecidableType)(Import M:WSfun E).
│ │ │ │ │ │ @@ -65,15 +65,15 @@ │ │ │ Lemma MapsTo_fun : forall (elt:Type) m x (e e':elt),
│ │ │   MapsTo x e m -> MapsTo x e' m -> e=e'.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Specifications written using equivalences

│ │ │ +

Specifications written using equivalences

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Section IffSpec.
│ │ │ Variable elt elt' elt'': Type.
│ │ │ @@ -222,15 +222,15 @@ │ │ │   rewrite map_mapsto_iff || rewrite map_in_iff ||
│ │ │   rewrite mapi_in_iff)).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Specifications written using boolean predicates

│ │ │ +

Specifications written using boolean predicates

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Section BoolSpec.
│ │ │ │ │ │ @@ -358,15 +358,15 @@ │ │ │ Lemma Equal_mapsto_iff : forall m1 m2 : t elt,
│ │ │  Equal m1 m2 <-> (forall k e, MapsTo k e m1 <-> MapsTo k e m2).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Relations between Equal, Equiv and Equivb.

│ │ │ +

Relations between Equal, Equiv and Equivb.

│ │ │ │ │ │
│ │ │ │ │ │ First, Equal is Equiv with Leibniz on elements. │ │ │
│ │ │
│ │ │ │ │ │ @@ -420,15 +420,15 @@ │ │ │
│ │ │ End Equalities.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Equal is a setoid equality.

│ │ │ +

Equal is a setoid equality.

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma Equal_refl : forall (elt:Type)(m : t elt), Equal m m.
│ │ │ │ │ │ @@ -503,28 +503,28 @@ │ │ │
│ │ │ End WFacts_fun.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Same facts for self-contained weak sets and for full maps

│ │ │ +

Same facts for self-contained weak sets and for full maps

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module WFacts (M:WS) := WFacts_fun M.E M.
│ │ │ Module Facts := WFacts.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Additional Properties for weak maps

│ │ │ +

Additional Properties for weak maps

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Results about fold, elements, induction principles... │ │ │ │ │ │
│ │ │ @@ -571,30 +571,30 @@ │ │ │   Lemma findA_rev : forall l k, NoDupA eqk l ->
│ │ │     findA (eqb k) l = findA (eqb k) (rev l).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Elements

│ │ │ +

Elements

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │   Lemma elements_Empty : forall m:t elt, Empty m <-> elements m = nil.
│ │ │ │ │ │
│ │ │   Lemma elements_empty : elements (@empty elt) = nil.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Conversions between maps and association lists.

│ │ │ +

Conversions between maps and association lists.

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │   Definition uncurry {U V W : Type} (f : U -> V -> W) : U*V -> W :=
│ │ │    fun p => f (fst p) (snd p).
│ │ │ @@ -623,15 +623,15 @@ │ │ │
│ │ │   Lemma of_list_3 : forall s, Equal (of_list (to_list s)) s.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Fold

│ │ │ +

Fold

│ │ │ │ │ │
│ │ │ │ │ │ Alternative specification via fold_right │ │ │
│ │ │
│ │ │ │ │ │ @@ -639,15 +639,15 @@ │ │ │   Lemma fold_spec_right m (A:Type)(i:A)(f : key -> elt -> A -> A) :
│ │ │     fold f m i = List.fold_right (uncurry f) i (rev (elements m)).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Induction principles about fold contributed by S. Lescuyer

│ │ │ +

Induction principles about fold contributed by S. Lescuyer

│ │ │ │ │ │
│ │ │ │ │ │ In the following lemma, the step hypothesis is deliberately restricted │ │ │ to the precise map m we are considering. │ │ │
│ │ │
│ │ │ @@ -752,15 +752,15 @@ │ │ │
│ │ │   Section Fold_More.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Additional properties of fold

│ │ │ +

Additional properties of fold

│ │ │ │ │ │
│ │ │ │ │ │ When a function f is compatible and allows transpositions, we can │ │ │ compute fold f in any order. │ │ │
│ │ │
│ │ │ @@ -846,15 +846,15 @@ │ │ │
│ │ │   End Fold_More.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Cardinal

│ │ │ +

Cardinal

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │   Lemma cardinal_fold : forall m : t elt,
│ │ │    cardinal m = fold (fun _ _ => S) m 0.
│ │ │ @@ -887,15 +887,15 @@ │ │ │   Lemma cardinal_inv_2b :
│ │ │    forall m, cardinal m <> 0 -> { p : key*elt | MapsTo (fst p) (snd p) m }.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Additional notions over maps

│ │ │ +

Additional notions over maps

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │   Definition Disjoint (m m' : t elt) :=
│ │ │    forall k, ~(In k m /\ In k m').
│ │ │ @@ -905,15 +905,15 @@ │ │ │     Disjoint m1 m2 /\
│ │ │     (forall k e, MapsTo k e m <-> MapsTo k e m1 \/ MapsTo k e m2).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Emulation of some functions lacking in the interface

│ │ │ +

Emulation of some functions lacking in the interface

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │   Definition filter (f : key -> elt -> bool)(m : t elt) :=
│ │ │    fold (fun k e m => if f k e then add k e m else m) m (empty _).
│ │ │ @@ -1132,28 +1132,28 @@ │ │ │
│ │ │ End WProperties_fun.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Same Properties for self-contained weak maps and for full maps

│ │ │ +

Same Properties for self-contained weak maps and for full maps

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module WProperties (M:WS) := WProperties_fun M.E M.
│ │ │ Module Properties := WProperties.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties specific to maps with ordered keys

│ │ │ +

Properties specific to maps with ordered keys

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module OrdProperties (M:S).
│ │ │  Module Import ME := OrderedTypeFacts M.E.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.FSets.FMapFullAVL.html │ │ │ @@ -17,15 +17,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

FMapFullAVL

│ │ │ +

FMapFullAVL

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ This file contains some complements to FMapAVL. │ │ │ │ │ │
│ │ │ @@ -85,15 +85,15 @@ │ │ │ Variable elt : Type.
│ │ │ Implicit Types m r : t elt.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

AVL trees

│ │ │ +

AVL trees

│ │ │ │ │ │
│ │ │ │ │ │ avl s : s is a properly balanced AVL tree, │ │ │ i.e. for any node the heights of the two children │ │ │ differ by at most 2 │ │ │
│ │ │ @@ -109,15 +109,15 @@ │ │ │       h = max (height l) (height r) + 1 ->
│ │ │       avl (Node l x e r h).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Automation and dedicated tactics about avl.

│ │ │ +

Automation and dedicated tactics about avl.

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Hint Constructors avl : core.
│ │ │ │ │ │ @@ -146,15 +146,15 @@ │ │ │      | _ => idtac
│ │ │   end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Basic results about avl, height

│ │ │ +

Basic results about avl, height

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma avl_node : forall x e l r, avl l -> avl r ->
│ │ │  -(2) <= height l - height r <= 2 ->
│ │ │ @@ -173,27 +173,27 @@ │ │ │ Lemma height_0 : forall l, avl l -> height l = 0 ->
│ │ │  l = Leaf _.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Empty map

│ │ │ +

Empty map

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma empty_avl : avl (empty elt).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Helper functions

│ │ │ +

Helper functions

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma create_avl :
│ │ │  forall l x e r, avl l -> avl r -> -(2) <= height l - height r <= 2 ->
│ │ │ @@ -225,15 +225,15 @@ │ │ │      omega_max
│ │ │   end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Insertion

│ │ │ +

Insertion

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma add_avl_1 : forall m x e, avl m ->
│ │ │  avl (add x e m) /\ 0 <= height (add x e m) - height m <= 1.
│ │ │ @@ -242,15 +242,15 @@ │ │ │ Lemma add_avl : forall m x e, avl m -> avl (add x e m).
│ │ │ Hint Resolve add_avl : core.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Extraction of minimum binding

│ │ │ +

Extraction of minimum binding

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma remove_min_avl_1 : forall l x e r h, avl (Node l x e r h) ->
│ │ │  avl (remove_min l x e r)#1 /\
│ │ │ @@ -260,15 +260,15 @@ │ │ │ Lemma remove_min_avl : forall l x e r h, avl (Node l x e r h) ->
│ │ │     avl (remove_min l x e r)#1.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Merging two trees

│ │ │ +

Merging two trees

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma merge_avl_1 : forall m1 m2, avl m1 -> avl m2 ->
│ │ │  -(2) <= height m1 - height m2 <= 2 ->
│ │ │ @@ -279,15 +279,15 @@ │ │ │ Lemma merge_avl : forall m1 m2, avl m1 -> avl m2 ->
│ │ │   -(2) <= height m1 - height m2 <= 2 -> avl (merge m1 m2).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Deletion

│ │ │ +

Deletion

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma remove_avl_1 : forall m x, avl m ->
│ │ │  avl (remove x m) /\ 0 <= height m - height (remove x m) <= 1.
│ │ │ @@ -296,15 +296,15 @@ │ │ │ Lemma remove_avl : forall m x, avl m -> avl (remove x m).
│ │ │ Hint Resolve remove_avl : core.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Join

│ │ │ +

Join

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma join_avl_1 : forall l x d r, avl l -> avl r ->
│ │ │  avl (join l x d r) /\
│ │ │ @@ -412,15 +412,15 @@ │ │ │ End Map2.
│ │ │ End AvlProofs.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Encapsulation

│ │ │ +

Encapsulation

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ We can implement S with balanced binary search trees. │ │ │ When compared to FMapAVL, we maintain here two invariants │ │ │ (bst and avl) instead of only bst, which is enough for fulfilling │ │ │ @@ -611,15 +611,15 @@ │ │ │   Definition elements (m:t) :=
│ │ │     LO.MapS.Build_slist (Raw.Proofs.elements_sort (is_bst m)).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

As comparison function, we propose here a non-structural

│ │ │ +

As comparison function, we propose here a non-structural

│ │ │ │ │ │ version faithful to the code of Ocaml's Map library, instead of │ │ │ the structural version of FMapAVL │ │ │
│ │ │
│ │ │ │ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.FSets.FMapInterface.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Finite map library

│ │ │ +

Finite map library

│ │ │ │ │ │
│ │ │ │ │ │ This file proposes interfaces for finite maps │ │ │
│ │ │
│ │ │ │ │ │ @@ -101,15 +101,15 @@ │ │ │
│ │ │ Definition Cmp (elt:Type)(cmp:elt->elt->bool) e1 e2 := cmp e1 e2 = true.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Weak signature for maps

│ │ │ +

Weak signature for maps

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ No requirements for an ordering on keys nor elements, only decidability │ │ │ of equality on keys. First, a functorial signature: │ │ │
│ │ │ @@ -519,15 +519,15 @@ │ │ │
│ │ │ End WSfun.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Static signature for Weak Maps

│ │ │ +

Static signature for Weak Maps

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Similar to WSfun but expressed in a self-contained way. │ │ │
│ │ │
│ │ │ @@ -538,15 +538,15 @@ │ │ │   Include WSfun E.
│ │ │ End WS.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Maps on ordered keys, functorial signature

│ │ │ +

Maps on ordered keys, functorial signature

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module Type Sfun (E : OrderedType).
│ │ │   Include WSfun E.
│ │ │ @@ -565,30 +565,30 @@ │ │ │   End elt.
│ │ │ End Sfun.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Maps on ordered keys, self-contained signature

│ │ │ +

Maps on ordered keys, self-contained signature

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module Type S.
│ │ │   Declare Module E : OrderedType.
│ │ │   Include Sfun E.
│ │ │ End S.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Maps with ordering both on keys and datas

│ │ │ +

Maps with ordering both on keys and datas

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module Type Sord.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.FSets.FMapList.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Finite map library

│ │ │ +

Finite map library

│ │ │ │ │ │
│ │ │ │ │ │ This file proposes an implementation of the non-dependent interface │ │ │ FMapInterface.S using lists of pairs ordered (increasing) with respect to │ │ │ left projection. │ │ │
│ │ │ @@ -59,15 +59,15 @@ │ │ │ Notation Sort := (sort ltk).
│ │ │ Notation Inf := (lelistA (ltk)).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

empty

│ │ │ +

empty

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition empty : t elt := nil.
│ │ │ │ │ │ @@ -81,15 +81,15 @@ │ │ │
│ │ │ Lemma empty_sorted : Sort empty.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

is_empty

│ │ │ +

is_empty

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition is_empty (l : t elt) : bool := if l then true else false.
│ │ │ │ │ │ @@ -99,15 +99,15 @@ │ │ │
│ │ │ Lemma is_empty_2 : forall m, is_empty m = true -> Empty m.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

mem

│ │ │ +

mem

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Function mem (k : key) (s : t elt) {struct s} : bool :=
│ │ │  match s with
│ │ │ @@ -126,15 +126,15 @@ │ │ │
│ │ │ Lemma mem_2 : forall m (Hm:Sort m) x, mem x m = true -> In x m.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

find

│ │ │ +

find

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Function find (k:key) (s: t elt) {struct s} : option elt :=
│ │ │  match s with
│ │ │ @@ -153,15 +153,15 @@ │ │ │
│ │ │ Lemma find_1 : forall m (Hm:Sort m) x e, MapsTo x e m -> find x m = Some e.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

add

│ │ │ +

add

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Function add (k : key) (x : elt) (s : t elt) {struct s} : t elt :=
│ │ │  match s with
│ │ │ @@ -193,15 +193,15 @@ │ │ │
│ │ │ Lemma add_sorted : forall m (Hm:Sort m) x e, Sort (add x e m).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

remove

│ │ │ +

remove

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Function remove (k : key) (s : t elt) {struct s} : t elt :=
│ │ │  match s with
│ │ │ @@ -233,15 +233,15 @@ │ │ │
│ │ │ Lemma remove_sorted : forall m (Hm:Sort m) x, Sort (remove x m).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

elements

│ │ │ +

elements

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition elements (m: t elt) := m.
│ │ │ │ │ │ @@ -259,15 +259,15 @@ │ │ │
│ │ │ Lemma elements_3w : forall m (Hm:Sort m), NoDupA eqk (elements m).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

fold

│ │ │ +

fold

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Function fold (A:Type)(f:key->elt->A->A)(m:t elt) (acc:A) {struct m} : A :=
│ │ │   match m with
│ │ │ @@ -279,15 +279,15 @@ │ │ │ Lemma fold_1 : forall m (A:Type)(i:A)(f:key->elt->A->A),
│ │ │   fold f m i = fold_left (fun a p => f (fst p) (snd p) a) (elements m) i.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

equal

│ │ │ +

equal

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Function equal (cmp:elt->elt->bool)(m m' : t elt) {struct m} : bool :=
│ │ │   match m, m' with
│ │ │ @@ -329,15 +329,15 @@ │ │ │
│ │ │ Variable elt':Type.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

map and mapi

│ │ │ +

map and mapi

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Fixpoint map (f:elt -> elt') (m:t elt) : t elt' :=
│ │ │   match m with
│ │ │ @@ -420,15 +420,15 @@ │ │ │ End Elt2.
│ │ │ Section Elt3.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

map2

│ │ │ +

map2

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Variable elt elt' elt'' : Type.
│ │ │ Variable f : option elt -> option elt' -> option elt''.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.FSets.FMapPositive.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

FMapPositive : an implementation of FMapInterface for positive keys.

│ │ │ +

FMapPositive : an implementation of FMapInterface for positive keys.

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Require Import Bool OrderedType ZArith OrderedType OrderedTypeEx FMapInterface.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.FSets.FMapWeakList.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Finite map library

│ │ │ +

Finite map library

│ │ │ │ │ │
│ │ │ │ │ │ This file proposes an implementation of the non-dependent interface │ │ │ FMapInterface.WS using lists of pairs, unordered but without redundancy. │ │ │
│ │ │
│ │ │ @@ -57,15 +57,15 @@ │ │ │ Notation In := (In (elt:=elt)).
│ │ │ Notation NoDupA := (NoDupA eqk).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

empty

│ │ │ +

empty

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition empty : t elt := nil.
│ │ │ │ │ │ @@ -81,15 +81,15 @@ │ │ │
│ │ │ Lemma empty_NoDup : NoDupA empty.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

is_empty

│ │ │ +

is_empty

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition is_empty (l : t elt) : bool := if l then true else false.
│ │ │ │ │ │ @@ -99,15 +99,15 @@ │ │ │
│ │ │ Lemma is_empty_2 : forall m, is_empty m = true -> Empty m.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

mem

│ │ │ +

mem

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Function mem (k : key) (s : t elt) {struct s} : bool :=
│ │ │   match s with
│ │ │ @@ -121,15 +121,15 @@ │ │ │
│ │ │ Lemma mem_2 : forall m (Hm:NoDupA m) x, mem x m = true -> In x m.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

find

│ │ │ +

find

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Function find (k:key) (s: t elt) {struct s} : option elt :=
│ │ │   match s with
│ │ │ @@ -150,15 +150,15 @@ │ │ │ Lemma find_eq : forall m (Hm:NoDupA m) x x',
│ │ │    X.eq x x' -> find x m = find x' m.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

add

│ │ │ +

add

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Function add (k : key) (x : elt) (s : t elt) {struct s} : t elt :=
│ │ │   match s with
│ │ │ @@ -194,15 +194,15 @@ │ │ │ Lemma add_not_eq : forall m (Hm:NoDupA m) x a e,
│ │ │   ~X.eq x a -> find x (add a e m) = find x m.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

remove

│ │ │ +

remove

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Function remove (k : key) (s : t elt) {struct s} : t elt :=
│ │ │   match s with
│ │ │ @@ -228,15 +228,15 @@ │ │ │
│ │ │ Lemma remove_NoDup : forall m (Hm:NoDupA m) x, NoDupA (remove x m).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

elements

│ │ │ +

elements

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition elements (m: t elt) := m.
│ │ │ │ │ │ @@ -249,15 +249,15 @@ │ │ │
│ │ │ Lemma elements_3w : forall m (Hm:NoDupA m), NoDupA (elements m).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

fold

│ │ │ +

fold

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Function fold (A:Type)(f:key->elt->A->A)(m:t elt) (acc : A) {struct m} : A :=
│ │ │   match m with
│ │ │ @@ -269,15 +269,15 @@ │ │ │ Lemma fold_1 : forall m (A:Type)(i:A)(f:key->elt->A->A),
│ │ │   fold f m i = fold_left (fun a p => f (fst p) (snd p) a) (elements m) i.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

equal

│ │ │ +

equal

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition check (cmp : elt -> elt -> bool)(k:key)(e:elt)(m': t elt) :=
│ │ │   match find k m' with
│ │ │ @@ -330,15 +330,15 @@ │ │ │
│ │ │ Variable elt':Type.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

map and mapi

│ │ │ +

map and mapi

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Fixpoint map (f:elt -> elt') (m:t elt) : t elt' :=
│ │ │   match m with
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.FSets.FSetAVL.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

FSetAVL : Implementation of FSetInterface via AVL trees

│ │ │ +

FSetAVL : Implementation of FSetInterface via AVL trees

│ │ │ │ │ │
│ │ │ │ │ │ This module implements finite sets using AVL trees. │ │ │ It follows the implementation from Ocaml's standard library, │ │ │ │ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.FSets.FSetBridge.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Finite sets library

│ │ │ +

Finite sets library

│ │ │ │ │ │
│ │ │ │ │ │ This module implements bridges (as functors) from dependent │ │ │ to/from non-dependent set signature. │ │ │
│ │ │
│ │ │ @@ -32,15 +32,15 @@ │ │ │ Require Export FSetInterface.
│ │ │ Set Implicit Arguments.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

From non-dependent signature S to dependent signature Sdep.

│ │ │ +

From non-dependent signature S to dependent signature Sdep.

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module DepOfNodep (Import M: S) <: Sdep with Module E := M.E.
│ │ │ │ │ │ @@ -208,15 +208,15 @@ │ │ │
│ │ │ End DepOfNodep.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

From dependent signature Sdep to non-dependent signature S.

│ │ │ +

From dependent signature Sdep to non-dependent signature S.

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module NodepOfDep (M: Sdep) <: S with Module E := M.E.
│ │ │   Import M.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.FSets.FSetCompat.html │ │ │ @@ -15,28 +15,28 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Compatibility functors between FSetInterface and MSetInterface.

│ │ │ +

Compatibility functors between FSetInterface and MSetInterface.

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Require Import FSetInterface FSetFacts MSetInterface MSetFacts.
│ │ │ Set Implicit Arguments.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

From new Weak Sets to old ones

│ │ │ +

From new Weak Sets to old ones

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module Backport_WSets
│ │ │  (E:DecidableType.DecidableType)
│ │ │ @@ -191,15 +191,15 @@ │ │ │
│ │ │ End Backport_WSets.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

From new Sets to new ones

│ │ │ +

From new Sets to new ones

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module Backport_Sets
│ │ │  (O:OrderedType.OrderedType)
│ │ │ @@ -249,15 +249,15 @@ │ │ │
│ │ │ End Backport_Sets.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

From old Weak Sets to new ones.

│ │ │ +

From old Weak Sets to new ones.

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module Update_WSets
│ │ │  (E:Equalities.DecidableType)
│ │ │ @@ -390,15 +390,15 @@ │ │ │
│ │ │ End Update_WSets.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

From old Sets to new ones.

│ │ │ +

From old Sets to new ones.

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module Update_Sets
│ │ │  (O:Orders.OrderedType)
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.FSets.FSetDecide.html │ │ │ @@ -41,15 +41,15 @@ │ │ │ Module WDecide_fun (E : DecidableType)(Import M : WSfun E).
│ │ │  Module F := FSetFacts.WFacts_fun E M.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Overview

│ │ │ +

Overview

│ │ │ │ │ │ This functor defines the tactic fsetdec, which will │ │ │ solve any valid goal of the form │ │ │
│ │ │      forall s1 ... sn,
│ │ │      forall x1 ... xm,
│ │ │      P1 -> ... -> Pk -> P
│ │ │ @@ -147,41 +147,41 @@
│ │ │  
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ -

Facts and Tactics for Propositional Logic

│ │ │ +

Facts and Tactics for Propositional Logic

│ │ │ │ │ │ These lemmas and tactics are in a module so that they do │ │ │ not affect the namespace if you import the enclosing │ │ │ module Decide. │ │ │
│ │ │
│ │ │   Module FSetLogicalFacts.
│ │ │     Export Decidable.
│ │ │     Export Setoid.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Lemmas and Tactics About Decidable Propositions

│ │ │ +

Lemmas and Tactics About Decidable Propositions

│ │ │ │ │ │
│ │ │ │ │ │ -

Propositional Equivalences Involving Negation

│ │ │ +

Propositional Equivalences Involving Negation

│ │ │ │ │ │ These are all written with the unfolded form of │ │ │ negation, since I am not sure if setoid rewriting will │ │ │ always perform conversion. │ │ │
│ │ │ │ │ │ -

Tactics for Negations

│ │ │ +

Tactics for Negations

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │     Tactic Notation "fold" "any" "not" :=
│ │ │       repeat (
│ │ │ @@ -424,28 +424,28 @@ │ │ │   End FSetLogicalFacts.
│ │ │   Import FSetLogicalFacts.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Auxiliary Tactics

│ │ │ +

Auxiliary Tactics

│ │ │ │ │ │ Again, these lemmas and tactics are in a module so that │ │ │ they do not affect the namespace if you import the │ │ │ enclosing module Decide. │ │ │
│ │ │
│ │ │   Module FSetDecideAuxiliary.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Generic Tactics

│ │ │ +

Generic Tactics

│ │ │ │ │ │ We begin by defining a few generic, useful tactics. │ │ │
│ │ │ │ │ │ remove logical hypothesis inter-dependencies (fix 2136). │ │ │
│ │ │
│ │ │ @@ -554,15 +554,15 @@ │ │ │         | H: _ |- _ => progress (decompose record H); clear H
│ │ │         end).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Discarding Irrelevant Hypotheses

│ │ │ +

Discarding Irrelevant Hypotheses

│ │ │ │ │ │ We will want to clear the context of any │ │ │ non-FSet-related hypotheses in order to increase the │ │ │ speed of the tactic. To do this, we will need to be │ │ │ able to decide which are relevant. We do this by making │ │ │ a simple inductive definition classifying the │ │ │ propositions of interest. │ │ │ @@ -633,15 +633,15 @@ │ │ │           else clear H
│ │ │         end).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Turning Set Operators into Propositional Connectives

│ │ │ +

Turning Set Operators into Propositional Connectives

│ │ │ │ │ │ The lemmas from FSetFacts will be used to break down │ │ │ set operations into propositional formulas built over │ │ │ the predicates In and E.eq applied only to │ │ │ variables. We are going to use them with autorewrite. │ │ │ │ │ │
│ │ │ @@ -659,15 +659,15 @@ │ │ │
│ │ │     Hint Rewrite eq_refl_iff : set_eq_simpl.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Decidability of FSet Propositions

│ │ │ +

Decidability of FSet Propositions

│ │ │ │ │ │
│ │ │ │ │ │ In is decidable. │ │ │
│ │ │
│ │ │     Lemma dec_In : forall x s,
│ │ │ @@ -693,15 +693,15 @@ │ │ │
│ │ │     Hint Resolve dec_In dec_eq : FSet_decidability.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Normalizing Propositions About Equality

│ │ │ +

Normalizing Propositions About Equality

│ │ │ │ │ │ We have to deal with the fact that E.eq may be │ │ │ convertible with Coq's equality. Thus, we will find the │ │ │ following tactics useful to replace one form with the │ │ │ other everywhere. │ │ │
│ │ │ │ │ │ @@ -776,15 +776,15 @@ │ │ │         end);
│ │ │       autorewrite with set_eq_simpl in *.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Considering Decidability of Base Propositions

│ │ │ +

Considering Decidability of Base Propositions

│ │ │ │ │ │ This tactic adds assertions about the decidability of │ │ │ E.eq and In to the context. This is necessary for │ │ │ the completeness of the fsetdec tactic. However, in │ │ │ order to minimize the cost of proof search, we should be │ │ │ careful to not add more than we need. Once negations │ │ │ have been pushed to the leaves of the propositions, we │ │ │ @@ -825,15 +825,15 @@ │ │ │         | _: ~ ?P, H : ?P \/ ~ ?P |- _ => clear H
│ │ │         end).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Handling Empty, Subset, and Equal

│ │ │ +

Handling Empty, Subset, and Equal

│ │ │ │ │ │ This tactic instantiates universally quantified │ │ │ hypotheses (which arise from the unfolding of Empty, │ │ │ Subset, and Equal) for each of the set element │ │ │ expressions that is involved in some membership or │ │ │ equality fact. Then it throws away those hypotheses, │ │ │ which should no longer be needed. │ │ │ @@ -873,15 +873,15 @@ │ │ │           clear H
│ │ │         end).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

The Core fsetdec Auxiliary Tactics

│ │ │ +

The Core fsetdec Auxiliary Tactics

│ │ │ │ │ │
│ │ │ │ │ │ Here is the crux of the proof search. Recursion through │ │ │ intuition! (This will terminate if I correctly │ │ │ understand the behavior of intuition.) │ │ │
│ │ │ @@ -915,15 +915,15 @@ │ │ │   End FSetDecideAuxiliary.
│ │ │   Import FSetDecideAuxiliary.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

The fsetdec Tactic

│ │ │ +

The fsetdec Tactic

│ │ │ │ │ │ Here is the top-level tactic (the only one intended for │ │ │ clients of this library). It's specification is given at │ │ │ the top of the file. │ │ │
│ │ │
│ │ │   Ltac fsetdec :=
│ │ │ @@ -1029,15 +1029,15 @@ │ │ │       fsetdec_body
│ │ │     end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Examples

│ │ │ +

Examples

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │   Module FSetDecideTestCases.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.FSets.FSetEqProperties.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Finite sets library

│ │ │ +

Finite sets library

│ │ │ │ │ │
│ │ │ │ │ │ This module proves many properties of finite sets that │ │ │ are consequences of the axiomatization in FsetInterface │ │ │ Contrary to the functor in FsetProperties it uses │ │ │ sets operations instead of predicates over sets, i.e. │ │ ├── ./usr/share/doc/coq-theories/html/Coq.FSets.FSetFacts.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Finite sets library

│ │ │ +

Finite sets library

│ │ │ │ │ │
│ │ │ │ │ │ This functor derives additional facts from FSetInterface.S. These │ │ │ facts are mainly the specifications of FSetInterface.S written using │ │ │ different styles: equivalence and boolean equalities. │ │ │ Moreover, we prove that E.Eq and Equal are setoid equalities. │ │ │ @@ -51,15 +51,15 @@ │ │ │ Notation eq_dec := E.eq_dec.
│ │ │ Definition eqb x y := if eq_dec x y then true else false.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Specifications written using equivalences

│ │ │ +

Specifications written using equivalences

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Section IffSpec.
│ │ │ Variable s s' s'' : t.
│ │ │ @@ -145,15 +145,15 @@ │ │ │   || rewrite union_iff || rewrite inter_iff || rewrite diff_iff
│ │ │   || rewrite empty_iff)).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Specifications written using boolean predicates

│ │ │ +

Specifications written using boolean predicates

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Section BoolSpec.
│ │ │ Variable s s' s'' : t.
│ │ │ @@ -209,15 +209,15 @@ │ │ │
│ │ │ End BoolSpec.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

E.eq and Equal are setoid equalities

│ │ │ +

E.eq and Equal are setoid equalities

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Instance E_ST : Equivalence E.eq.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.FSets.FSetInterface.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Finite set library

│ │ │ +

Finite set library

│ │ │ │ │ │
│ │ │ │ │ │ Set interfaces, inspired by the one of Ocaml. When compared with │ │ │ Ocaml, the main differences are: │ │ │
    │ │ │
  • the lack of iter function, useless since Coq is purely functional │ │ │ @@ -71,24 +71,24 @@ │ │ │ Require Export Bool OrderedType DecidableType.
    │ │ │ Set Implicit Arguments.
    │ │ │ │ │ │
    │ │ │
│ │ │ │ │ │
│ │ │ -

Non-dependent signatures

│ │ │ +

Non-dependent signatures

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ The following signatures presents sets as purely informative │ │ │ programs together with axioms │ │ │
│ │ │ │ │ │ -

Functorial signature for weak sets

│ │ │ +

Functorial signature for weak sets

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Weak sets are sets without ordering on base elements, only │ │ │ a decidable equality. │ │ │
│ │ │ @@ -582,15 +582,15 @@ │ │ │
│ │ │ End WSfun.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Static signature for weak sets

│ │ │ +

Static signature for weak sets

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Similar to the functorial signature SW, except that the │ │ │ module E of base elements is incorporated in the signature. │ │ │
│ │ │ @@ -602,15 +602,15 @@ │ │ │   Include WSfun E.
│ │ │ End WS.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Functorial signature for sets on ordered elements

│ │ │ +

Functorial signature for sets on ordered elements

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Based on WSfun, plus ordering on sets and min_elt and max_elt │ │ │ and some stronger specifications for other functions. │ │ │
│ │ │ @@ -727,15 +727,15 @@ │ │ │
│ │ │ End Sfun.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Static signature for sets on ordered elements

│ │ │ +

Static signature for sets on ordered elements

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Similar to the functorial signature Sfun, except that the │ │ │ module E of base elements is incorporated in the signature. │ │ │
│ │ │ @@ -747,15 +747,15 @@ │ │ │   Include Sfun E.
│ │ │ End S.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Some subtyping tests

│ │ │ +

Some subtyping tests

│ │ │ │ │ │
│ │ │  WSfun ---> WS
│ │ │   |         |
│ │ │   |         |
│ │ │   V         V
│ │ │  Sfun  ---> S
│ │ │ @@ -764,15 +764,15 @@
│ │ │  Module Sfun_WSfun (E:OrderedType)(M : Sfun E) <: WSfun E := M.
│ │ │  Module S_Sfun (M : S) <: Sfun M.E := M.
│ │ │  Module WS_WSfun (M : WS) <: WSfun M.E := M.
│ │ │  
│ │ │ │ │ │
│ │ │ │ │ │ -

Dependent signature

│ │ │ +

Dependent signature

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Signature Sdep presents ordered sets using dependent types │ │ │
│ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.FSets.FSetList.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Finite sets library

│ │ │ +

Finite sets library

│ │ │ │ │ │
│ │ │ │ │ │ This file proposes an implementation of the non-dependent │ │ │ interface FSetInterface.S using strictly ordered list. │ │ │
│ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.FSets.FSetProperties.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Finite sets library

│ │ │ +

Finite sets library

│ │ │ │ │ │
│ │ │ │ │ │ This functor derives additional properties from FSetInterface.S. │ │ │ Contrary to the functor in FSetEqProperties it uses │ │ │ predicates over sets instead of sets operations, i.e. │ │ │ In x s instead of mem x s=true, │ │ │ @@ -303,30 +303,30 @@ │ │ │     remove_diff_singleton diff_inter_empty diff_inter_all Add_add Add_remove
│ │ │     Equal_remove add_add : set.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties of elements

│ │ │ +

Properties of elements

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │   Lemma elements_Empty : forall s, Empty s <-> elements s = nil.
│ │ │ │ │ │
│ │ │   Lemma elements_empty : elements empty = nil.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Conversions between lists and sets

│ │ │ +

Conversions between lists and sets

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │   Definition of_list (l : list elt) := List.fold_right add empty l.
│ │ │ │ │ │ @@ -342,15 +342,15 @@ │ │ │
│ │ │   Lemma of_list_3 : forall s, of_list (to_list s) [=] s.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Fold

│ │ │ +

Fold

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │   Section Fold.
│ │ │ │ │ │ @@ -370,15 +370,15 @@ │ │ │   Notation NoDup := (NoDupA E.eq).
│ │ │   Notation InA := (InA E.eq).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Induction principles for fold (contributed by S. Lescuyer)

│ │ │ +

Induction principles for fold (contributed by S. Lescuyer)

│ │ │ │ │ │
│ │ │ │ │ │ In the following lemma, the step hypothesis is deliberately restricted │ │ │ to the precise set s we are considering. │ │ │
│ │ │
│ │ │ @@ -476,15 +476,15 @@ │ │ │
│ │ │   Lemma fold_identity : forall s, fold add s empty [=] s.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Alternative (weaker) specifications for fold

│ │ │ +

Alternative (weaker) specifications for fold

│ │ │ │ │ │
│ │ │ │ │ │ When FSets was first designed, the order in which Ocaml's Set.fold │ │ │ takes the set elements was unspecified. This specification reflects │ │ │ this fact: │ │ │ │ │ │ @@ -548,15 +548,15 @@ │ │ │   Lemma fold_commutes : forall i s x,
│ │ │    eqA (fold f s (f x i)) (f x (fold f s i)).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Fold is a morphism

│ │ │ +

Fold is a morphism

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │   Lemma fold_init : forall i i' s, eqA i i' ->
│ │ │    eqA (fold f s i) (fold f s i').
│ │ │ @@ -565,15 +565,15 @@ │ │ │   Lemma fold_equal :
│ │ │    forall i s s', s[=]s' -> eqA (fold f s i) (fold f s' i).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Fold and other set operators

│ │ │ +

Fold and other set operators

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │   Lemma fold_empty : forall i, fold f empty i = i.
│ │ │ │ │ │ @@ -617,31 +617,31 @@ │ │ │
│ │ │   End Fold.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Cardinal

│ │ │ +

Cardinal

│ │ │ │ │ │
│ │ │ │ │ │ -

Characterization of cardinal in terms of fold

│ │ │ +

Characterization of cardinal in terms of fold

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │   Lemma cardinal_fold : forall s, cardinal s = fold (fun _ => S) s 0.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Old specifications for cardinal.

│ │ │ +

Old specifications for cardinal.

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │   Lemma cardinal_0 :
│ │ │      forall s, exists l : list elt,
│ │ │ @@ -656,15 +656,15 @@ │ │ │   Lemma cardinal_2 :
│ │ │     forall s s' x, ~ In x s -> Add x s s' -> cardinal s' = S (cardinal s).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Cardinal and (non-)emptiness

│ │ │ +

Cardinal and (non-)emptiness

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │   Lemma cardinal_Empty : forall s, Empty s <-> cardinal s = 0.
│ │ │ │ │ │ @@ -680,15 +680,15 @@ │ │ │   Lemma cardinal_inv_2b :
│ │ │    forall s, cardinal s <> 0 -> { x : elt | In x s }.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Cardinal is a morphism

│ │ │ +

Cardinal is a morphism

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │   Lemma Equal_cardinal : forall s s', s[=]s' -> cardinal s = cardinal s'.
│ │ │ │ │ │ @@ -698,15 +698,15 @@ │ │ │
│ │ │   Hint Resolve Add_add Add_remove Equal_remove cardinal_inv_1 Equal_cardinal : fset.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Cardinal and set operators

│ │ │ +

Cardinal and set operators

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │   Lemma empty_cardinal : cardinal empty = 0.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.FSets.FSetToFiniteSet.html │ │ │ @@ -15,28 +15,28 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Finite sets library : conversion to old Finite_sets

│ │ │ +

Finite sets library : conversion to old Finite_sets

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Require Import Ensembles Finite_sets.
│ │ │ Require Import FSetInterface FSetProperties OrderedTypeEx DecidableTypeEx.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Going from FSets with usual Leibniz equality

│ │ │ +

Going from FSets with usual Leibniz equality

│ │ │ │ │ │ to the good old Ensembles and Finite_sets theory. │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module WS_to_Finite_set (U:UsualDecidableType)(M: WSfun U).
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.FSets.FSetWeakList.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Finite sets library

│ │ │ +

Finite sets library

│ │ │ │ │ │
│ │ │ │ │ │ This file proposes an implementation of the non-dependent │ │ │ interface FSetInterface.WS using lists without redundancy. │ │ │
│ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Floats.FloatAxioms.html │ │ │ @@ -18,15 +18,15 @@ │ │ │
│ │ │ Require Import ZArith Int63 SpecFloat PrimFloat FloatOps.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties of the primitive operators for the Binary64 format

│ │ │ +

Properties of the primitive operators for the Binary64 format

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Notation valid_binary := (valid_binary prec emax).
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Floats.FloatLemmas.html │ │ │ @@ -19,15 +19,15 @@ │ │ │ Require Import ZArith Int63 SpecFloat PrimFloat FloatOps FloatAxioms.
│ │ │ Require Import Psatz.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Support results involving frexp and ldexp

│ │ │ +

Support results involving frexp and ldexp

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma shift_value : shift = (2*emax + prec)%Z.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Floats.FloatOps.html │ │ │ @@ -18,15 +18,15 @@ │ │ │
│ │ │ Require Import ZArith Int63 SpecFloat PrimFloat.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Derived operations and mapping between primitive floats and spec_floats

│ │ │ +

Derived operations and mapping between primitive floats and spec_floats

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition prec := 53%Z.
│ │ │ Definition emax := 1024%Z.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Floats.PrimFloat.html │ │ │ @@ -18,59 +18,59 @@ │ │ │
│ │ │ Require Import Int63 FloatClass.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Definition of the interface for primitive floating-point arithmetic

│ │ │ +

Definition of the interface for primitive floating-point arithmetic

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ This interface provides processor operators for the Binary64 format of the │ │ │ IEEE 754-2008 standard. │ │ │
│ │ │ │ │ │ -

Type definition for the co-domain of compare

│ │ │ +

Type definition for the co-domain of compare

│ │ │ │ │ │
│ │ │
│ │ │ Variant float_comparison : Set := FEq | FLt | FGt | FNotComparable.
│ │ │ │ │ │
│ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

The main type

│ │ │ +

The main type

│ │ │ float: primitive type for Binary64 floating-point numbers. │ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Syntax support

│ │ │ +

Syntax support

│ │ │ │ │ │
│ │ │
│ │ │ Delimit Scope float_scope with float.
│ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Floating-point operators

│ │ │ +

Floating-point operators

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ │ │ │
│ │ │ @@ -102,15 +102,15 @@ │ │ │
│ │ │ Notation "x / y" := (div x y) : float_scope.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Conversions

│ │ │ +

Conversions

│ │ │ │ │ │
│ │ │ │ │ │ of_int63: convert a primitive integer into a float value. │ │ │ The value is rounded if need be. │ │ │
│ │ │
│ │ │ @@ -139,15 +139,15 @@ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Exponent manipulation functions

│ │ │ +

Exponent manipulation functions

│ │ │ frshiftexp: convert a float to fractional part in [0.5, 1.) │ │ │ and integer part. │ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ @@ -157,15 +157,15 @@ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Predecesor/Successor functions

│ │ │ +

Predecesor/Successor functions

│ │ │ │ │ │
│ │ │ │ │ │ next_up: return the next float towards positive infinity. │ │ │
│ │ │
│ │ │ │ │ │ @@ -177,42 +177,42 @@ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Special values (needed for pretty-printing)

│ │ │ +

Special values (needed for pretty-printing)

│ │ │ │ │ │
│ │ │
│ │ │ Definition infinity := Eval compute in div (of_int63 1) (of_int63 0).
│ │ │ Definition neg_infinity := Eval compute in opp infinity.
│ │ │ Definition nan := Eval compute in div (of_int63 0) (of_int63 0).
│ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Other special values

│ │ │ +

Other special values

│ │ │ │ │ │
│ │ │
│ │ │ Definition one := Eval compute in (of_int63 1).
│ │ │ Definition zero := Eval compute in (of_int63 0).
│ │ │ Definition neg_zero := Eval compute in (-zero)%float.
│ │ │ Definition two := Eval compute in (of_int63 2).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Predicates and helper functions

│ │ │ +

Predicates and helper functions

│ │ │ │ │ │
│ │ │
│ │ │ Definition is_nan f := negb (f == f)%float.
│ │ │ │ │ │
│ │ │ Definition is_zero f := (f == zero)%float. │ │ ├── ./usr/share/doc/coq-theories/html/Coq.Floats.SpecFloat.html │ │ │ @@ -18,24 +18,24 @@ │ │ │
│ │ │ Require Import ZArith FloatClass.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Specification of floating-point arithmetic

│ │ │ +

Specification of floating-point arithmetic

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ This specification is mostly borrowed from the IEEE754.Binary module │ │ │ of the Flocq library (see http://flocq.gforge.inria.fr/) │ │ │
│ │ │ │ │ │ -

Inductive specification of floating-point numbers

│ │ │ +

Inductive specification of floating-point numbers

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Similar to Flocq.IEEE754.Binary.full_float, but with no NaN payload. │ │ │
│ │ │
│ │ │ @@ -45,15 +45,15 @@ │ │ │   | S754_nan
│ │ │   | S754_finite (s : bool) (m : positive) (e : Z).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Parameterized definitions

│ │ │ +

Parameterized definitions

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ prec is the number of bits of the mantissa including the implicit one; │ │ │ emax is the exponent of the infinities. │ │ │ │ │ │ @@ -208,15 +208,15 @@ │ │ │       end.
│ │ │   End Rounding.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Define operations

│ │ │ +

Define operations

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │   Definition SFopp x :=
│ │ │     match x with
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Init.Byte.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Bytes

│ │ │ +

Bytes

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Require Import Coq.Init.Ltac.
│ │ │ Require Import Coq.Init.Datatypes.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Init.Datatypes.html │ │ │ @@ -23,15 +23,15 @@ │ │ │ Require Import Ltac.
│ │ │ Require Import Logic.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Datatypes with zero and one element

│ │ │ +

Datatypes with zero and one element

│ │ │ │ │ │
│ │ │ │ │ │ Empty_set is a datatype with no inhabitant │ │ │
│ │ │
│ │ │ │ │ │ @@ -54,15 +54,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

The boolean datatype

│ │ │ +

The boolean datatype

│ │ │ │ │ │
│ │ │ │ │ │ bool is the datatype of the boolean values true and false │ │ │
│ │ │
│ │ │ │ │ │ @@ -208,15 +208,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Peano natural numbers

│ │ │ +

Peano natural numbers

│ │ │ │ │ │
│ │ │ │ │ │ nat is the datatype of natural numbers built from O and successor S; │ │ │ note that the constructor name is the letter O. │ │ │ Numbers in nat can be denoted using a decimal notation; │ │ │ e.g. 3%nat abbreviates S (S (S O)) │ │ │ @@ -236,15 +236,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Container datatypes

│ │ │ +

Container datatypes

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ │ │ │
│ │ │ @@ -420,15 +420,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

The comparison datatype

│ │ │ +

The comparison datatype

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Inductive comparison : Set :=
│ │ │   | Eq : comparison
│ │ │ @@ -523,15 +523,15 @@ │ │ │ Lemma CompSpec2Type : forall A (eq lt:A->A->Prop) x y c,
│ │ │  CompSpec eq lt x y c -> CompSpecT eq lt x y c.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Misc Other Datatypes

│ │ │ +

Misc Other Datatypes

│ │ │ │ │ │
│ │ │ │ │ │ identity A a is the family of datatypes on A whose sole non-empty │ │ │ member is the singleton datatype identity A a a whose │ │ │ sole inhabitant is denoted identity_refl A a Beware: this inductive actually falls into Prop, as the sole │ │ │ constructor has no arguments and -indices-matter is not │ │ ├── ./usr/share/doc/coq-theories/html/Coq.Init.Decimal.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Decimal numbers

│ │ │ +

Decimal numbers

│ │ │ │ │ │
│ │ │ │ │ │ These numbers coded in base 10 will be used for parsing and printing │ │ │ other Coq numeral datatypes in an human-readable way. │ │ │ See the Numeral Notation command. │ │ │ We represent numbers in base 10 as lists of decimal digits, │ │ ├── ./usr/share/doc/coq-theories/html/Coq.Init.Hexadecimal.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Hexadecimal numbers

│ │ │ +

Hexadecimal numbers

│ │ │ │ │ │
│ │ │ │ │ │ These numbers coded in base 16 will be used for parsing and printing │ │ │ other Coq numeral datatypes in an human-readable way. │ │ │ See the Numeral Notation command. │ │ │ We represent numbers in base 16 as lists of hexadecimal digits, │ │ ├── ./usr/share/doc/coq-theories/html/Coq.Init.Logic.html │ │ │ @@ -25,15 +25,15 @@ │ │ │
│ │ │ Notation "A -> B" := (forall (_ : A), B) : type_scope.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Propositional connectives

│ │ │ +

Propositional connectives

│ │ │ │ │ │
│ │ │ │ │ │ True is the always true proposition │ │ │
│ │ │
│ │ │ │ │ │ @@ -266,15 +266,15 @@ │ │ │ Notation "'IF' c1 'then' c2 'else' c3" := (IF_then_else c1 c2 c3)
│ │ │   (at level 200, right associativity) : type_scope.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

First-order quantifiers

│ │ │ +

First-order quantifiers

│ │ │ │ │ │
│ │ │ │ │ │ ex P, or simply exists x, P x, or also exists x:A, P x, │ │ │ expresses the existence of an x of some type A in Set which │ │ │ satisfies the predicate P. This is existential quantification. │ │ │ │ │ │ @@ -373,15 +373,15 @@ │ │ │
│ │ │ End universal_quantification.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Equality

│ │ │ +

Equality

│ │ │ │ │ │
│ │ │ │ │ │ eq x y, or simply x=y expresses the equality of x and │ │ │ y. Both x and y must belong to the same type A. │ │ │ The definition is inductive and states the reflexivity of the equality. │ │ │ The others properties (symmetry, transitivity, replacement of │ │ │ @@ -768,15 +768,15 @@ │ │ │   (forall Q:A->Prop, (forall x, P x -> Q x) <-> (exists x, P x /\ Q x))
│ │ │   -> (exists! x, P x).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Being inhabited

│ │ │ +

Being inhabited

│ │ │ │ │ │
│ │ │ │ │ │ The predicate inhabited can be used in different contexts. If A is │ │ │ thought as a type, inhabited A states that A is inhabited. If A is │ │ │ thought as a computationally relevant proposition, then │ │ │ inhabited A weakens A so as to hide its computational meaning. │ │ ├── ./usr/share/doc/coq-theories/html/Coq.Init.Nat.html │ │ │ @@ -20,15 +20,15 @@ │ │ │ Require Decimal Hexadecimal Numeral.
│ │ │ Local Open Scope nat_scope.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Peano natural numbers, definitions of operations

│ │ │ +

Peano natural numbers, definitions of operations

│ │ │ │ │ │
│ │ │ │ │ │ This file is meant to be used as a whole module, │ │ │ without importing it, leading to qualified definitions │ │ │ (e.g. Nat.pred) │ │ │
│ │ │ @@ -37,15 +37,15 @@ │ │ │
│ │ │ Definition t := nat.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Constants

│ │ │ +

Constants

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ │ │ │
│ │ │ @@ -53,15 +53,15 @@ │ │ │ Definition one := 1.
│ │ │ Definition two := 2.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Basic operations

│ │ │ +

Basic operations

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition succ := S.
│ │ │ │ │ │ @@ -118,15 +118,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Comparisons

│ │ │ +

Comparisons

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Fixpoint eqb n m : bool :=
│ │ │   match n, m with
│ │ │ @@ -164,15 +164,15 @@ │ │ │
│ │ │ Infix "?=" := compare (at level 70) : nat_scope.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Minimum, maximum

│ │ │ +

Minimum, maximum

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Fixpoint max n m :=
│ │ │   match n, m with
│ │ │ @@ -189,15 +189,15 @@ │ │ │     | S n', S m' => S (min n' m')
│ │ │   end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Parity tests

│ │ │ +

Parity tests

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Fixpoint even n : bool :=
│ │ │   match n with
│ │ │ @@ -209,15 +209,15 @@ │ │ │
│ │ │ Definition odd n := negb (even n).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Power

│ │ │ +

Power

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Fixpoint pow n m :=
│ │ │   match m with
│ │ │ @@ -227,15 +227,15 @@ │ │ │
│ │ │ where "n ^ m" := (pow n m) : nat_scope.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Tail-recursive versions of add and mul

│ │ │ +

Tail-recursive versions of add and mul

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Fixpoint tail_add n m :=
│ │ │   match n with
│ │ │ @@ -261,15 +261,15 @@ │ │ │
│ │ │ Definition tail_mul n m := tail_addmul 0 n m.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Conversion with a decimal representation for printing/parsing

│ │ │ +

Conversion with a decimal representation for printing/parsing

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ │ │ │
│ │ │ @@ -383,15 +383,15 @@ │ │ │
│ │ │ Definition to_num_int n := Numeral.IntDec (to_int n).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Euclidean division

│ │ │ +

Euclidean division

│ │ │ │ │ │
│ │ │ │ │ │ This division is linear and tail-recursive. │ │ │ In divmod, y is the predecessor of the actual divisor, │ │ │ and u is y minus the real remainder │ │ │ │ │ │ @@ -426,15 +426,15 @@ │ │ │ Infix "/" := div : nat_scope.
│ │ │ Infix "mod" := modulo (at level 40, no associativity) : nat_scope.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Greatest common divisor

│ │ │ +

Greatest common divisor

│ │ │ │ │ │
│ │ │ │ │ │ We use Euclid algorithm, which is normally not structural, │ │ │ but Coq is now clever enough to accept this (behind modulo │ │ │ there is a subtraction, which now preserves being a subterm) │ │ │ │ │ │ @@ -448,27 +448,27 @@ │ │ │    | S a' => gcd (b mod (S a')) (S a')
│ │ │   end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Square

│ │ │ +

Square

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition square n := n * n.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Square root

│ │ │ +

Square root

│ │ │ │ │ │
│ │ │ │ │ │ The following square root function is linear (and tail-recursive). │ │ │ With Peano representation, we can't do better. For faster algorithm, │ │ │ see Psqrt/Zsqrt/Nsqrt... │ │ │ │ │ │ @@ -498,15 +498,15 @@ │ │ │
│ │ │ Definition sqrt n := sqrt_iter n 0 0 0.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Log2

│ │ │ +

Log2

│ │ │ │ │ │
│ │ │ │ │ │ This base-2 logarithm is linear and tail-recursive. │ │ │ │ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Init.Numeral.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Decimal or Hexadecimal numbers

│ │ │ +

Decimal or Hexadecimal numbers

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Require Import Decimal Hexadecimal.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Init.Tactics.html │ │ │ @@ -21,15 +21,15 @@ │ │ │ Require Import Logic.
│ │ │ Require Import Specif.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Useful tactics

│ │ │ +

Useful tactics

│ │ │ │ │ │
│ │ │ │ │ │ Ex falso quodlibet : a tactic for proving False instead of the current goal. │ │ │ This is just a nicer name for tactics such as elimtype False │ │ │ and other cut False. │ │ │
│ │ │ @@ -346,15 +346,15 @@ │ │ │ Tactic Notation "dependent" "induction" ident(H) :=
│ │ │   fail "To use dependent induction, first [Require Import Coq.Program.Equality.]".
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

inversion_sigma

│ │ │ +

inversion_sigma

│ │ │ The built-in inversion will frequently leave equalities of │ │ │ dependent pairs. When the first type in the pair is an hProp or │ │ │ otherwise simplifies, inversion_sigma is useful; it will replace │ │ │ the equality of pairs with a pair of equalities, one involving a │ │ │ term casted along the other. This might also prove useful for │ │ │ writing a version of inversion / dependent destruction which │ │ │ does not lose information, i.e., does not turn a goal which is │ │ ├── ./usr/share/doc/coq-theories/html/Coq.Init.Tauto.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

The tauto and intuition tactics

│ │ │ +

The tauto and intuition tactics

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Require Import Notations.
│ │ │ Require Import Ltac.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Init.Wf.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

This module proves the validity of

│ │ │ +

This module proves the validity of

│ │ │ │ │ │
    │ │ │
  • well-founded recursion (also known as course of values) │ │ │ │ │ │
  • │ │ │
  • well-founded induction │ │ ├── ./usr/share/doc/coq-theories/html/Coq.Lists.List.html │ │ │ @@ -22,15 +22,15 @@ │ │ │
    │ │ │ Set Implicit Arguments.
    │ │ │ │ │ │
    │ │ │
│ │ │ │ │ │
│ │ │ -

Basics: definition of polymorphic lists and some operations

│ │ │ +

Basics: definition of polymorphic lists and some operations

│ │ │ │ │ │
│ │ │ │ │ │ The definition of list is now in Init/Datatypes, │ │ │ as well as the definitions of length and app │ │ │
│ │ │
│ │ │ @@ -112,15 +112,15 @@ │ │ │
│ │ │   Variable A : Type.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Generic facts

│ │ │ +

Generic facts

│ │ │ │ │ │
│ │ │ │ │ │ Discrimination │ │ │
│ │ │
│ │ │   Theorem nil_cons : forall (x:A) (l:list A), [] <> x :: l.
│ │ │ @@ -147,30 +147,30 @@ │ │ │   Theorem length_zero_iff_nil (l : list A):
│ │ │     length l = 0 <-> l=[].
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Head and tail

│ │ │ +

Head and tail

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │   Theorem hd_error_nil : hd_error (@nil A) = None.
│ │ │ │ │ │
│ │ │   Theorem hd_error_cons : forall (l : list A) (x : A), hd_error (x::l) = Some x.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Facts about app

│ │ │ +

Facts about app

│ │ │ │ │ │
│ │ │ │ │ │ Discrimination │ │ │
│ │ │
│ │ │   Theorem app_cons_not_nil : forall (x y:list A) (a:A), [] <> x ++ a :: y.
│ │ │ @@ -255,15 +255,15 @@ │ │ │   Lemma app_inv_tail:
│ │ │     forall l l1 l2 : list A, l1 ++ l = l2 ++ l -> l1 = l2.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Facts about In

│ │ │ +

Facts about In

│ │ │ │ │ │
│ │ │ │ │ │ Characterization of In │ │ │
│ │ │
│ │ │ │ │ │ @@ -329,30 +329,30 @@ │ │ │ Hint Resolve app_eq_unit app_inj_tail: datatypes.
│ │ │ Hint Resolve in_eq in_cons in_inv in_nil in_app_or in_or_app: datatypes.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Operations on the elements of a list

│ │ │ +

Operations on the elements of a list

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Section Elts.
│ │ │ │ │ │
│ │ │   Variable A : Type.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Nth element of a list

│ │ │ +

Nth element of a list

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │   Fixpoint nth (n:nat) (l:list A) (default:A) {struct l} : A :=
│ │ │     match n, l with
│ │ │ @@ -494,15 +494,15 @@ │ │ │   Lemma nth_error_nth' : forall (l : list A) (n : nat) (d : A),
│ │ │     n < length l -> nth_error l n = Some (nth n l d).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Last element of a list

│ │ │ +

Last element of a list

│ │ │ │ │ │
│ │ │ │ │ │ last l d returns the last element of the list l, │ │ │ or the default value d if l is empty. │ │ │
│ │ │
│ │ │ @@ -549,15 +549,15 @@ │ │ │
│ │ │   Lemma removelast_last : forall l a, removelast (l ++ [a]) = l.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Remove

│ │ │ +

Remove

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │   Hypothesis eq_dec : forall x y : A, {x = y}+{x <> y}.
│ │ │ │ │ │ @@ -600,15 +600,15 @@ │ │ │
│ │ │   Lemma remove_length_lt : forall l x, In x l -> length (remove x l) < length l.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Counting occurrences of an element

│ │ │ +

Counting occurrences of an element

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │   Fixpoint count_occ (l : list A) (x : A) : nat :=
│ │ │     match l with
│ │ │ @@ -648,30 +648,30 @@ │ │ │
│ │ │ End Elts.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Manipulating whole lists

│ │ │ +

Manipulating whole lists

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Section ListOps.
│ │ │ │ │ │
│ │ │   Variable A : Type.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Reverse

│ │ │ +

Reverse

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │   Fixpoint rev (l:list A) : list A :=
│ │ │     match l with
│ │ │ @@ -758,15 +758,15 @@ │ │ │
│ │ │   End Reverse_Induction.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Concatenation

│ │ │ +

Concatenation

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │   Fixpoint concat (l : list (list A)) : list A :=
│ │ │   match l with
│ │ │ @@ -787,15 +787,15 @@ │ │ │   Lemma in_concat : forall l y,
│ │ │     In y (concat l) <-> exists x, In x l /\ In y x.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Decidable equality on lists

│ │ │ +

Decidable equality on lists

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │   Hypothesis eq_dec : forall (x y : A), {x = y}+{x <> y}.
│ │ │ │ │ │ @@ -805,19 +805,19 @@ │ │ │
│ │ │ End ListOps.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Applying functions to the elements of a list

│ │ │ +

Applying functions to the elements of a list

│ │ │ │ │ │
│ │ │ │ │ │ -

Map

│ │ │ +

Map

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Section Map.
│ │ │   Variables (A : Type) (B : Type).
│ │ │ @@ -1053,15 +1053,15 @@ │ │ │         (list_power t l')
│ │ │     end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Boolean operations over lists

│ │ │ +

Boolean operations over lists

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │   Section Bool.
│ │ │     Variable A : Type.
│ │ │ @@ -1211,15 +1211,15 @@ │ │ │
│ │ │   End Bool.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Further filtering facts

│ │ │ +

Further filtering facts

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │   Section Filtering.
│ │ │     Variables (A : Type).
│ │ │ @@ -1281,15 +1281,15 @@ │ │ │
│ │ │   End Filtering.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Operations on lists of pairs or lists of lists

│ │ │ +

Operations on lists of pairs or lists of lists

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │   Section ListPairs.
│ │ │     Variables (A : Type) (B : Type).
│ │ │ @@ -1411,19 +1411,19 @@ │ │ │
│ │ │   End ListPairs.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Miscellaneous operations on lists

│ │ │ +

Miscellaneous operations on lists

│ │ │ │ │ │
│ │ │ │ │ │ -

Length order of lists

│ │ │ +

Length order of lists

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Section length_order.
│ │ │   Variable A : Type.
│ │ │ @@ -1458,15 +1458,15 @@ │ │ │ Hint Resolve lel_refl lel_cons_cons lel_cons lel_nil lel_nil nil_cons:
│ │ │   datatypes.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Set inclusion on list

│ │ │ +

Set inclusion on list

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Section SetIncl.
│ │ │ │ │ │ @@ -1540,15 +1540,15 @@ │ │ │ Hint Resolve incl_refl incl_tl incl_tran incl_appl incl_appr incl_cons
│ │ │   incl_app incl_map: datatypes.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Cutting a list at some position

│ │ │ +

Cutting a list at some position

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Section Cutting.
│ │ │ │ │ │ @@ -1680,15 +1680,15 @@ │ │ │
│ │ │ End Cutting.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Combining pairs of lists of possibly-different lengths

│ │ │ +

Combining pairs of lists of possibly-different lengths

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Section Combining.
│ │ │     Variables (A B : Type).
│ │ │ @@ -1712,15 +1712,15 @@ │ │ │
│ │ │ End Combining.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Predicate for List addition/removal (no need for decidability)

│ │ │ +

Predicate for List addition/removal (no need for decidability)

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Section Add.
│ │ │ │ │ │ @@ -1756,15 +1756,15 @@ │ │ │
│ │ │ End Add.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Lists without redundancy

│ │ │ +

Lists without redundancy

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Section ReDun.
│ │ │ │ │ │ @@ -1893,15 +1893,15 @@ │ │ │
│ │ │ Lemma NoDup_map_inv A B (f:A->B) l : NoDup (map f l) -> NoDup l.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Sequence of natural numbers

│ │ │ +

Sequence of natural numbers

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Section NatSeq.
│ │ │ │ │ │ @@ -1955,15 +1955,15 @@ │ │ │
│ │ │ Section Exists_Forall.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Existential and universal predicates over lists

│ │ │ +

Existential and universal predicates over lists

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │   Variable A:Type.
│ │ │ │ │ │ @@ -2321,15 +2321,15 @@ │ │ │ Lemma list_max_lt : forall l n, l <> nil ->
│ │ │   list_max l < n <-> Forall (fun k => k < n) l.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Inversion of predicates over lists based on head symbol

│ │ │ +

Inversion of predicates over lists based on head symbol

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Ltac is_list_constr c :=
│ │ │  match c with
│ │ │ @@ -2349,15 +2349,15 @@ │ │ │   | _ => idtac
│ │ │  end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Exporting hints and tactics

│ │ │ +

Exporting hints and tactics

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Hint Rewrite
│ │ │   rev_involutive
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Lists.SetoidList.html │ │ │ @@ -19,15 +19,15 @@ │ │ │ Require Export List.
│ │ │ Require Export Sorted.
│ │ │ Require Export Setoid Basics Morphisms.
│ │ │ Set Implicit Arguments.
│ │ │
│ │ │ │ │ │
│ │ │ -

Logical relations over lists with respect to a setoid equality

│ │ │ +

Logical relations over lists with respect to a setoid equality

│ │ │ │ │ │ or ordering. │ │ │
│ │ │ │ │ │ This can be seen as a complement of predicate lelistA and sort │ │ │ found in Sorting. │ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Lists.StreamMemo.html │ │ │ @@ -19,15 +19,15 @@ │ │ │ Require Import Eqdep_dec.
│ │ │ Require Import Streams.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Memoization

│ │ │ +

Memoization

│ │ │ │ │ │
│ │ │ │ │ │ Successive outputs of a given function f are stored in │ │ │ a stream in order to avoid duplicated computations. │ │ │
│ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Logic.ChoiceFacts.html │ │ │ @@ -16,15 +16,15 @@ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Some facts and definitions concerning choice and description in │ │ │ - intuitionistic logic.

References:

│ │ │ + intuitionistic logic.

References:

│ │ │ │ │ │
│ │ │ │ │ │ [Bell] John L. Bell, Choice principles in intuitionistic set theory, │ │ │ unpublished. │ │ │ │ │ │
│ │ │ @@ -55,15 +55,15 @@ │ │ │
│ │ │ Set Implicit Arguments.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Definitions

│ │ │ +

Definitions

│ │ │ │ │ │
│ │ │ │ │ │ Choice, reification and description schemes │ │ │
│ │ │ │ │ │ We make them all polymorphic. Most of them have existentials as conclusion │ │ │ @@ -82,15 +82,15 @@ │ │ │
│ │ │ Variable P:A->Prop.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Constructive choice and description

│ │ │ +

Constructive choice and description

│ │ │ │ │ │
│ │ │ │ │ │ AC_rel = relational form of the (non extensional) axiom of choice │ │ │ (a "set-theoretic" axiom of choice) │ │ │
│ │ │
│ │ │ @@ -312,15 +312,15 @@ │ │ │   forall P:A->Prop,
│ │ │     (exists! x, P x) -> { x:A | P x }.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Weakly classical choice and description

│ │ │ +

Weakly classical choice and description

│ │ │ │ │ │
│ │ │ │ │ │ GAC_rel = guarded relational form of the (non extensional) axiom of choice │ │ │
│ │ │
│ │ │ │ │ │ @@ -579,15 +579,15 @@ │ │ │ │ │ │
│ │ │ │ │ │ with no prerequisite on the non-emptiness of domains │ │ │ │ │ │
│ │ │ │ │ │ -

Table of contents

│ │ │ +

Table of contents

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │ @@ -636,15 +636,15 @@ │ │ │ │ │ │
│ │ │ │ │ │ 9.2. AC_fun_setoid = AC_fun + Ext_pred_repr + PI │ │ │ │ │ │
│ │ │ │ │ │ -

AC_rel + AC! = AC_fun

│ │ │ +

AC_rel + AC! = AC_fun

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ We show that the functional formulation of the axiom of Choice │ │ │ (usual formulation in type theory) is equivalent to its relational │ │ │ formulation (only formulation of set theory) + functional relation │ │ │ @@ -676,26 +676,26 @@ │ │ │   forall A B : Type, FunctionalChoice_on A B <->
│ │ │     RelationalChoice_on A B /\ FunctionalRelReification_on A B.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Connection between the guarded, non guarded and omniscient choices

│ │ │ +

Connection between the guarded, non guarded and omniscient choices

│ │ │ │ │ │
│ │ │ │ │ │ We show that the guarded formulations of the axiom of choice │ │ │ are equivalent to their "omniscient" variant and comes from the non guarded │ │ │ formulation in presence either of the independence of general premises │ │ │ or subset types (themselves derivable from subtypes thanks to proof- │ │ │ irrelevance) │ │ │
│ │ │ │ │ │ -

AC_rel + PI -> GAC_rel and AC_rel + IGP -> GAC_rel and GAC_rel = OAC_rel

│ │ │ +

AC_rel + PI -> GAC_rel and AC_rel + IGP -> GAC_rel and GAC_rel = OAC_rel

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma rel_choice_and_proof_irrel_imp_guarded_rel_choice :
│ │ │   RelationalChoice -> ProofIrrelevance -> GuardedRelationalChoice.
│ │ │ @@ -725,15 +725,15 @@ │ │ │ Corollary guarded_iff_omniscient_rel_choice :
│ │ │   GuardedRelationalChoice <-> OmniscientRelationalChoice.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

AC_fun + IGP = GAC_fun = OAC_fun = AC_fun + Drinker

│ │ │ +

AC_fun + IGP = GAC_fun = OAC_fun = AC_fun + Drinker

│ │ │ │ │ │
│ │ │ │ │ │ AC_fun + IGP = GAC_fun │ │ │
│ │ │
│ │ │ │ │ │ @@ -800,15 +800,15 @@ │ │ │ Theorem guarded_iff_omniscient_fun_choice :
│ │ │   GuardedFunctionalChoice <-> OmniscientFunctionalChoice.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

D_iota -> ID_iota and D_epsilon <-> ID_epsilon + Drinker

│ │ │ +

D_iota -> ID_iota and D_epsilon <-> ID_epsilon + Drinker

│ │ │ │ │ │
│ │ │ │ │ │ D_iota -> ID_iota │ │ │
│ │ │
│ │ │ │ │ │ @@ -844,15 +844,15 @@ │ │ │   (EpsilonStatement ->
│ │ │    SmallDrinker'sParadox * ConstructiveIndefiniteDescription).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Derivability of choice for decidable relations with well-ordered codomain

│ │ │ +

Derivability of choice for decidable relations with well-ordered codomain

│ │ │ │ │ │
│ │ │ │ │ │ Countable codomains, such as nat, can be equipped with a │ │ │ well-order, which implies the existence of a least element on │ │ │ inhabited decidable subsets. As a consequence, the relational form of │ │ │ the axiom of choice is derivable on nat for decidable relations. │ │ │ @@ -877,19 +877,19 @@ │ │ │     forall R:A->nat->Prop,
│ │ │       (forall x y, decidable (R x y)) -> FunctionalChoice_on_rel R.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

AC_fun = AC_fun_dep = AC_trunc

│ │ │ +

AC_fun = AC_fun_dep = AC_trunc

│ │ │ │ │ │
│ │ │ │ │ │ -

Choice on dependent and non dependent function types are equivalent

│ │ │ +

Choice on dependent and non dependent function types are equivalent

│ │ │ │ │ │
│ │ │ │ │ │ The easy part │ │ │
│ │ │
│ │ │ │ │ │ @@ -920,15 +920,15 @@ │ │ │ Theorem non_dep_dep_functional_choice :
│ │ │   FunctionalChoice -> DependentFunctionalChoice.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Functional choice and truncation choice are equivalent

│ │ │ +

Functional choice and truncation choice are equivalent

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Theorem functional_choice_to_inhabited_forall_commute :
│ │ │   FunctionalChoice -> InhabitedForallCommute.
│ │ │ @@ -937,15 +937,15 @@ │ │ │ Theorem inhabited_forall_commute_to_functional_choice :
│ │ │   InhabitedForallCommute -> FunctionalChoice.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Reification of dependent and non dependent functional relation are equivalent

│ │ │ +

Reification of dependent and non dependent functional relation are equivalent

│ │ │ │ │ │
│ │ │ │ │ │ The easy part │ │ │
│ │ │
│ │ │ │ │ │ @@ -972,19 +972,19 @@ │ │ │ Corollary dep_iff_non_dep_functional_rel_reification :
│ │ │   FunctionalRelReification <-> DependentFunctionalRelReification.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Non contradiction of constructive descriptions wrt functional axioms of choice

│ │ │ +

Non contradiction of constructive descriptions wrt functional axioms of choice

│ │ │ │ │ │
│ │ │ │ │ │ -

Non contradiction of indefinite description

│ │ │ +

Non contradiction of indefinite description

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma relative_non_contradiction_of_indefinite_descr :
│ │ │   forall C:Prop, (ConstructiveIndefiniteDescription -> C)
│ │ │ @@ -994,15 +994,15 @@ │ │ │ Lemma constructive_indefinite_descr_fun_choice :
│ │ │   ConstructiveIndefiniteDescription -> FunctionalChoice.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Non contradiction of definite description

│ │ │ +

Non contradiction of definite description

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma relative_non_contradiction_of_definite_descr :
│ │ │   forall C:Prop, (ConstructiveDefiniteDescription -> C)
│ │ │ @@ -1038,15 +1038,15 @@ │ │ │ │ │ │ but expecting FunctionalChoice (resp. FunctionalRelReification) to │ │ │ be applied on the same Type universes on both sides of the first │ │ │ (resp. second) equivalence breaks the stratification of universes. │ │ │ │ │ │
│ │ │ │ │ │ -

Excluded-middle + definite description => computational excluded-middle

│ │ │ +

Excluded-middle + definite description => computational excluded-middle

│ │ │ │ │ │
│ │ │ │ │ │ The idea for the following proof comes from [ChicliPottierSimpson02] │ │ │
│ │ │ │ │ │ Classical logic and axiom of unique choice (i.e. functional │ │ │ @@ -1082,15 +1082,15 @@ │ │ │   (forall P:Prop, P \/ ~ P) ->
│ │ │   forall C:Prop, ((forall P:Prop, {P} + {~ P}) -> C) -> C.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Choice => Dependent choice => Countable choice

│ │ │ +

Choice => Dependent choice => Countable choice

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Require Import Arith.
│ │ │ │ │ │ @@ -1102,27 +1102,27 @@ │ │ │ Theorem functional_dependent_choice_imp_functional_countable_choice :
│ │ │    FunctionalDependentChoice -> FunctionalCountableChoice.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

About the axiom of choice over setoids

│ │ │ +

About the axiom of choice over setoids

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Require Import ClassicalFacts PropExtensionalityFacts.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Consequences of the choice of a representative in an equivalence class

│ │ │ +

Consequences of the choice of a representative in an equivalence class

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Theorem repr_fun_choice_imp_ext_prop_repr :
│ │ │   RepresentativeFunctionalChoice -> ExtensionalPropositionRepresentative.
│ │ │ @@ -1135,15 +1135,15 @@ │ │ │ Theorem repr_fun_choice_imp_ext_function_repr :
│ │ │   RepresentativeFunctionalChoice -> ExtensionalFunctionRepresentative.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

This is a variant of Diaconescu and Goodman-Myhill theorems

│ │ │ +

This is a variant of Diaconescu and Goodman-Myhill theorems

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Theorem repr_fun_choice_imp_excluded_middle :
│ │ │   RepresentativeFunctionalChoice -> ExcludedMiddle.
│ │ │ @@ -1152,15 +1152,15 @@ │ │ │ Theorem repr_fun_choice_imp_relational_choice :
│ │ │   RepresentativeFunctionalChoice -> RelationalChoice.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

AC_fun_setoid = AC_fun_setoid_gen = AC_fun_setoid_simple

│ │ │ +

AC_fun_setoid = AC_fun_setoid_gen = AC_fun_setoid_simple

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Theorem gen_setoid_fun_choice_imp_setoid_fun_choice :
│ │ │   forall A B, GeneralizedSetoidFunctionalChoice_on A B -> SetoidFunctionalChoice_on A B.
│ │ │ @@ -1185,15 +1185,15 @@ │ │ │ Corollary setoid_fun_choice_iff_simple_setoid_fun_choice :
│ │ │   forall A B, SetoidFunctionalChoice_on A B <-> SimpleSetoidFunctionalChoice_on A B.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

AC_fun_setoid = AC! + AC_fun_repr

│ │ │ +

AC_fun_setoid = AC! + AC_fun_repr

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Theorem setoid_fun_choice_imp_fun_choice :
│ │ │   forall A B, SetoidFunctionalChoice_on A B -> FunctionalChoice_on A B.
│ │ │ @@ -1221,27 +1221,27 @@ │ │ │ Note: What characterization to give of │ │ │ RepresentativeFunctionalChoice? A formulation of it as a functional │ │ │ relation would certainly be equivalent to the formulation of │ │ │ SetoidFunctionalChoice as a functional relation, but in their │ │ │ functional forms, SetoidFunctionalChoice seems strictly stronger │ │ │
│ │ │ │ │ │ -

AC_fun_setoid = AC_fun + Ext_fun_repr + EM

│ │ │ +

AC_fun_setoid = AC_fun + Ext_fun_repr + EM

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Import EqNotations.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

This is the main theorem in [Carlström04]

│ │ │ +

This is the main theorem in [Carlström04]

│ │ │ │ │ │
│ │ │ │ │ │ Note: all ingredients have a computational meaning when taken in │ │ │ separation. However, to compute with the functional choice, │ │ │ existential quantification has to be thought as a strong │ │ │ existential, which is incompatible with the computational content of │ │ │ @@ -1257,15 +1257,15 @@ │ │ │ Theorem setoid_functional_choice_first_characterization :
│ │ │   FunctionalChoice /\ ExtensionalFunctionRepresentative /\ ExcludedMiddle <-> SetoidFunctionalChoice.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

AC_fun_setoid = AC_fun + Ext_pred_repr + PI

│ │ │ +

AC_fun_setoid = AC_fun + Ext_pred_repr + PI

│ │ │ │ │ │
│ │ │ │ │ │ Note: all ingredients have a computational meaning when taken in │ │ │ separation. However, to compute with the functional choice, │ │ │ existential quantification has to be thought as a strong │ │ │ existential, which is incompatible with proof-irrelevance which │ │ │ @@ -1281,15 +1281,15 @@ │ │ │ Theorem setoid_functional_choice_second_characterization :
│ │ │   FunctionalChoice /\ ExtensionalPredicateRepresentative /\ ProofIrrelevance <-> SetoidFunctionalChoice.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Compatibility notations

│ │ │ +

Compatibility notations

│ │ │ │ │ │
│ │ │
│ │ │ Notation description_rel_choice_imp_funct_choice :=
│ │ │   functional_rel_reification_and_rel_choice_imp_fun_choice (only parsing).
│ │ │ │ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Logic.ClassicalEpsilon.html │ │ │ @@ -99,15 +99,15 @@ │ │ │
│ │ │ Opaque epsilon.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Weaker lemmas (compatibility lemmas)

│ │ │ +

Weaker lemmas (compatibility lemmas)

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Theorem choice :
│ │ │   forall (A B : Type) (R : A->B->Prop),
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Logic.ClassicalFacts.html │ │ │ @@ -80,15 +80,15 @@ │ │ │ │ │ │
│ │ │ │ │ │ 4.2 Classical logic = choice of representatives in a partition of bool │ │ │ │ │ │
│ │ │ │ │ │ -

Prop degeneracy = excluded-middle + prop extensionality

│ │ │ +

Prop degeneracy = excluded-middle + prop extensionality

│ │ │ │ │ │
│ │ │ │ │ │ i.e. (forall A, A=True \/ A=False) │ │ │ <-> │ │ │ (forall A, A\/~A) /\ (forall A B, (A<->B) -> A=B) │ │ │ │ │ │ @@ -156,19 +156,19 @@ │ │ │ Lemma provable_prop_ext :
│ │ │   prop_extensionality -> provable_prop_extensionality.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Classical logic and proof-irrelevance

│ │ │ +

Classical logic and proof-irrelevance

│ │ │ │ │ │
│ │ │ │ │ │ -

CC |- prop ext + A inhabited -> (A = A->A) -> A has fixpoint

│ │ │ +

CC |- prop ext + A inhabited -> (A = A->A) -> A has fixpoint

│ │ │ │ │ │
│ │ │ │ │ │ We successively show that: │ │ │ │ │ │
│ │ │ │ │ │ @@ -212,15 +212,15 @@ │ │ │ │ │ │
│ │ │ Remark: prop_extensionality can be replaced in lemma ext_prop_fixpoint │ │ │ by the weakest property provable_prop_extensionality. │ │ │ │ │ │
│ │ │ │ │ │ -

CC |- prop_ext /\ dep elim on bool -> proof-irrelevance

│ │ │ +

CC |- prop_ext /\ dep elim on bool -> proof-irrelevance

│ │ │ │ │ │
│ │ │ │ │ │ proof_irrelevance asserts equality of all proofs of a given formula │ │ │
│ │ │
│ │ │ Definition proof_irrelevance := forall (A:Prop) (a1 a2:A), a1 = a2.
│ │ │ @@ -309,15 +309,15 @@ │ │ │
│ │ │ Remark: prop_extensionality can be replaced in lemma │ │ │ ext_prop_dep_proof_irrel_gen by the weakest property │ │ │ provable_prop_extensionality. │ │ │ │ │ │
│ │ │ │ │ │ -

CIC |- prop. ext. -> proof-irrelevance

│ │ │ +

CIC |- prop. ext. -> proof-irrelevance

│ │ │ │ │ │
│ │ │ │ │ │ In the Calculus of Inductive Constructions, inductively defined booleans │ │ │ enjoy dependent case analysis, hence directly proof-irrelevance from │ │ │ propositional extensionality. │ │ │ │ │ │ @@ -363,15 +363,15 @@ │ │ │ │ │ │ [Berardi90] Stefano Berardi, "Type dependence and constructive │ │ │ mathematics", Ph. D. thesis, Dipartimento Matematica, Università di │ │ │ Torino, 1990. │ │ │ │ │ │
│ │ │ │ │ │ -

CC |- excluded-middle + dep elim on bool -> proof-irrelevance

│ │ │ +

CC |- excluded-middle + dep elim on bool -> proof-irrelevance

│ │ │ │ │ │
│ │ │ │ │ │ This is a proof in the pure Calculus of Construction that │ │ │ classical logic in Prop + dependent elimination of disjunction entails │ │ │ proof-irrelevance. │ │ │ │ │ │ @@ -533,15 +533,15 @@ │ │ │
│ │ │ End Proof_irrelevance_WEM_CC.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

CIC |- excluded-middle -> proof-irrelevance

│ │ │ +

CIC |- excluded-middle -> proof-irrelevance

│ │ │ │ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Since, dependent elimination is derivable in the Calculus of │ │ │ @@ -598,15 +598,15 @@ │ │ │ Remark: in the Set-impredicative CCI, Hurkens' paradox still holds with │ │ │ bool in Set and since ~true=false for true and false │ │ │ in bool from Set, we get the inconsistency of │ │ │ em : forall A:Prop, {A}+{~A} in the Set-impredicative CCI. │ │ │ │ │ │
│ │ │ │ │ │ -

Weak classical axioms

│ │ │ +

Weak classical axioms

│ │ │ │ │ │
│ │ │ │ │ │ We show the following increasing in the strength of axioms: │ │ │
    │ │ │
  • weak excluded-middle and classical De Morgan's law │ │ │ │ │ │ @@ -620,15 +620,15 @@ │ │ │
  • excluded-middle │ │ │ │ │ │
  • │ │ │
│ │ │ │ │ │
│ │ │ │ │ │ -

Weak excluded-middle

│ │ │ +

Weak excluded-middle

│ │ │ │ │ │
│ │ │ │ │ │ The weak classical logic based on ~~A \/ ~A is referred to with │ │ │ name KC in [ChagrovZakharyaschev97]. See [SorbiTerwijn11] for │ │ │ a short survey. │ │ │ │ │ │ @@ -675,15 +675,15 @@ │ │ │ Definition classical_de_morgan_law :=
│ │ │   forall A B:Prop, ~(A /\ B) -> ~A \/ ~B.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Gödel-Dummett axiom

│ │ │ +

Gödel-Dummett axiom

│ │ │ │ │ │
│ │ │ │ │ │ (A->B) \/ (B->A) is studied in [Dummett59] and is based on [Gödel33]. │ │ │ │ │ │
│ │ │ │ │ │ @@ -746,15 +746,15 @@ │ │ │ Lemma weak_excluded_middle_iff_classical_de_morgan_law :
│ │ │   weak_excluded_middle <-> classical_de_morgan_law.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Independence of general premises and drinker's paradox

│ │ │ +

Independence of general premises and drinker's paradox

│ │ │ │ │ │
│ │ │ │ │ │ Independence of general premises is the unconstrained, non │ │ │ constructive, version of the Independence of Premises as │ │ │ considered in [Troelstra73]. │ │ │ │ │ │ @@ -836,19 +836,19 @@ │ │ │ Lemma excluded_middle_independence_general_premises :
│ │ │   generalized_excluded_middle -> DrinkerParadox.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Axioms equivalent to classical logic

│ │ │ +

Axioms equivalent to classical logic

│ │ │ │ │ │
│ │ │ │ │ │ -

Principle of unrestricted minimization

│ │ │ +

Principle of unrestricted minimization

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Require Import Coq.Arith.PeanoNat.
│ │ │ │ │ │ @@ -913,15 +913,15 @@ │ │ │
│ │ │ End Example_of_undecidable_predicate_with_the_minimization_property.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Choice of representatives in a partition of bool

│ │ │ +

Choice of representatives in a partition of bool

│ │ │ │ │ │
│ │ │ │ │ │ This is similar to Bell's "weak extensional selection principle" in [Bell] │ │ │ │ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Logic.Diaconescu.html │ │ │ @@ -74,15 +74,15 @@ │ │ │
│ │ │ Require ClassicalFacts ChoiceFacts.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Pred. Ext. + Rel. Axiom of Choice -> Excluded-Middle

│ │ │ +

Pred. Ext. + Rel. Axiom of Choice -> Excluded-Middle

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Section PredExt_RelChoice_imp_EM.
│ │ │ │ │ │ @@ -170,15 +170,15 @@ │ │ │
│ │ │ End PredExt_RelChoice_imp_EM.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Proof-Irrel. + Rel. Axiom of Choice -> Excl.-Middle for Equality

│ │ │ +

Proof-Irrel. + Rel. Axiom of Choice -> Excl.-Middle for Equality

│ │ │ │ │ │
│ │ │ │ │ │ This is an adaptation of Diaconescu's theorem, exploiting the │ │ │ form of extensionality provided by proof-irrelevance │ │ │
│ │ │
│ │ │ @@ -277,15 +277,15 @@ │ │ │
│ │ │ End ProofIrrel_RelChoice_imp_EqEM.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Extensional Hilbert's epsilon description operator -> Excluded-Middle

│ │ │ +

Extensional Hilbert's epsilon description operator -> Excluded-Middle

│ │ │ │ │ │
│ │ │ │ │ │ Proof sketch from Bell [Bell93] (with thanks to P. Castéran) │ │ │
│ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Logic.EqdepFacts.html │ │ │ @@ -82,15 +82,15 @@ │ │ │ equalities assuming axiom eq_rect_eq │ │ │ │ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ -

Definition of dependent equality and equivalence with equality of dependent pairs

│ │ │ +

Definition of dependent equality and equivalence with equality of dependent pairs

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Import EqNotations.
│ │ │ │ │ │ @@ -244,15 +244,15 @@ │ │ │ Hint Resolve eq_dep_intro: core.
│ │ │ Hint Immediate eq_dep_sym: core.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Eq_rect_eq <-> Eq_dep_eq <-> UIP <-> UIP_refl <-> K

│ │ │ +

Eq_rect_eq <-> Eq_dep_eq <-> UIP <-> UIP_refl <-> K

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Section Equivalences.
│ │ │ │ │ │ @@ -470,15 +470,15 @@ │ │ │ Notation Inj_dep_pairT := Inj_dep_pair.
│ │ │ Notation eq_dep_eq__inj_pairT2 := eq_dep_eq__inj_pair2.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Definition of the functor that builds properties of dependent equalities assuming axiom eq_rect_eq

│ │ │ +

Definition of the functor that builds properties of dependent equalities assuming axiom eq_rect_eq

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module Type EqdepElimination.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Logic.Eqdep_dec.html │ │ │ @@ -54,15 +54,15 @@ │ │ │ from a proof of decidability of equality for a set in Set │ │ │ │ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ -

Streicher's K and injectivity of dependent pair hold on decidable types

│ │ │ +

Streicher's K and injectivity of dependent pair hold on decidable types

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Set Implicit Arguments.
│ │ │ │ │ │ @@ -219,15 +219,15 @@ │ │ │
│ │ │ Unset Implicit Arguments.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Definition of the functor that builds properties of dependent equalities on decidable sets in Type

│ │ │ +

Definition of the functor that builds properties of dependent equalities on decidable sets in Type

│ │ │ │ │ │
│ │ │ │ │ │ The signature of decidable sets in Type │ │ │
│ │ │
│ │ │ │ │ │ @@ -342,15 +342,15 @@ │ │ │
│ │ │ End DecidableEqDep.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Definition of the functor that builds properties of dependent equalities on decidable sets in Set

│ │ │ +

Definition of the functor that builds properties of dependent equalities on decidable sets in Set

│ │ │ │ │ │
│ │ │ │ │ │ The signature of decidable sets in Set │ │ │
│ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Logic.ExtensionalityFacts.html │ │ │ @@ -71,15 +71,15 @@ │ │ │
│ │ │ Set Implicit Arguments.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Definitions

│ │ │ +

Definitions

│ │ │ │ │ │
│ │ │ │ │ │ Being an inverse │ │ │
│ │ │
│ │ │ │ │ │ @@ -155,27 +155,27 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Functional extensionality <-> Equality of projections from diagonal

│ │ │ +

Functional extensionality <-> Equality of projections from diagonal

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Theorem FunctExt_iff_EqDeltaProjs : FunctionalExtensionality <-> EqDeltaProjs.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Functional extensionality <-> Unicity of bijection inverse

│ │ │ +

Functional extensionality <-> Unicity of bijection inverse

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma FunctExt_UniqInverse : FunctionalExtensionality -> UniqueInverse.
│ │ │ │ │ │ @@ -185,15 +185,15 @@ │ │ │
│ │ │ Theorem FunctExt_iff_UniqInverse : FunctionalExtensionality <-> UniqueInverse.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Functional extensionality <-> Bijectivity of bijective composition

│ │ │ +

Functional extensionality <-> Bijectivity of bijective composition

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma FunctExt_BijComp : FunctionalExtensionality -> BijectivityBijectiveComp.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Logic.FinFun.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Functions on finite domains

│ │ │ +

Functions on finite domains

│ │ │ │ │ │
│ │ │ │ │ │ Main result : for functions f:A->A with finite A, │ │ │ f injective <-> f bijective <-> f surjective. │ │ │
│ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Logic.Hurkens.html │ │ │ @@ -142,15 +142,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

A modular proof of Hurkens's paradox.

│ │ │ +

A modular proof of Hurkens's paradox.

│ │ │ │ │ │
│ │ │ │ │ │ It relies on an axiomatisation of a shallow embedding of system U- │ │ │ (i.e. types of U- are interpreted by types of Coq). The │ │ │ universes are encoded in a style, due to Martin-Löf, where they │ │ │ are given by a set of names and a family El:Name->Type which │ │ │ @@ -169,35 +169,35 @@ │ │ │
│ │ │ Section Paradox.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Axiomatisation of impredicative universes in a Martin-Löf style

│ │ │ +

Axiomatisation of impredicative universes in a Martin-Löf style

│ │ │ │ │ │
│ │ │ │ │ │ System U- has two impredicative universes. In the proof of the │ │ │ paradox they are slightly asymmetric (in particular the reduction │ │ │ rules of the small universe are not needed). Therefore, the │ │ │ axioms are duplicated allowing for a weaker requirement than the │ │ │ actual system U-. │ │ │
│ │ │ │ │ │ -

Large universe

│ │ │ +

Large universe

│ │ │ │ │ │
│ │ │
│ │ │ Variable U1 : Type.
│ │ │ Variable El1 : U1 -> Type.
│ │ │
│ │ │ │ │ │
│ │ │ -

Closure by small product

│ │ │ +

Closure by small product

│ │ │ │ │ │
│ │ │
│ │ │ Variable Forall1 : forall u:U1, (El1 u -> U1) -> U1.
│ │ │   Notation "'∀₁' x : A , B" := (Forall1 A (fun x => B)).
│ │ │   Notation "A '⟶₁' B" := (Forall1 A (fun _ => B)).
│ │ │ Variable lam1 : forall u B, (forall x:El1 u, El1 (B x)) -> El1 ( x:u, B x).
│ │ │ @@ -205,15 +205,15 @@ │ │ │ Variable app1 : forall u B (f:El1 (Forall1 u B)) (x:El1 u), El1 (B x).
│ │ │   Notation "f '·₁' x" := (app1 _ _ f x).
│ │ │ Variable beta1 : forall u B (f:forall x:El1 u, El1 (B x)) x,
│ │ │                    (λ₁ y, f y) · x = f x.
│ │ │
│ │ │ │ │ │
│ │ │ -

Closure by large products

│ │ │ +

Closure by large products

│ │ │ U1 only needs to quantify over itself. │ │ │
│ │ │
│ │ │ Variable ForallU1 : (U1->U1) -> U1.
│ │ │   Notation "'∀₂' A , F" := (ForallU1 (fun A => F)).
│ │ │ Variable lamU1 : forall F, (forall A:U1, El1 (F A)) -> El1 ( A, F A).
│ │ │   Notation "'λ₂' x , u" := (lamU1 _ (fun x => u)).
│ │ │ @@ -222,54 +222,54 @@ │ │ │ Variable betaU1 : forall F (f:forall A:U1, El1 (F A)) A,
│ │ │                     (λ₂ x, f x) · [ A ] = f A.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Small universe

│ │ │ +

Small universe

│ │ │ The small universe is an element of the large one. │ │ │
│ │ │
│ │ │ Variable u0 : U1.
│ │ │ Notation U0 := (El1 u0).
│ │ │ Variable El0 : U0 -> Type.
│ │ │
│ │ │ │ │ │
│ │ │ -

Closure by small product

│ │ │ +

Closure by small product

│ │ │ U0 does not need reduction rules │ │ │
│ │ │
│ │ │ Variable Forall0 : forall u:U0, (El0 u -> U0) -> U0.
│ │ │   Notation "'∀₀' x : A , B" := (Forall0 A (fun x => B)).
│ │ │   Notation "A '⟶₀' B" := (Forall0 A (fun _ => B)).
│ │ │ Variable lam0 : forall u B, (forall x:El0 u, El0 (B x)) -> El0 ( x:u, B x).
│ │ │   Notation "'λ₀' x , u" := (lam0 _ _ (fun x => u)).
│ │ │ Variable app0 : forall u B (f:El0 (Forall0 u B)) (x:El0 u), El0 (B x).
│ │ │   Notation "f '·₀' x" := (app0 _ _ f x).
│ │ │
│ │ │ │ │ │
│ │ │ -

Closure by large products

│ │ │ +

Closure by large products

│ │ │ │ │ │
│ │ │
│ │ │ Variable ForallU0 : forall u:U1, (El1 u->U0) -> U0.
│ │ │   Notation "'∀₀¹' A : U , F" := (ForallU0 U (fun A => F)).
│ │ │ Variable lamU0 : forall U F, (forall A:El1 U, El0 (F A)) -> El0 (₀¹ A:U, F A).
│ │ │   Notation "'λ₀¹' x , u" := (lamU0 _ _ (fun x => u)).
│ │ │ Variable appU0 : forall U F (f:El0(₀¹ A:U,F A)) (A:El1 U), El0 (F A).
│ │ │   Notation "f '·₀' [ A ]" := (appU0 _ _ f A).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Automating the rewrite rules of our encoding.

│ │ │ +

Automating the rewrite rules of our encoding.

│ │ │ │ │ │
│ │ │
│ │ │ Local Ltac simplify :=
│ │ │   
│ │ │   (repeat rewrite ?beta1, ?betaU1);
│ │ │   lazy beta.
│ │ │ @@ -279,28 +279,28 @@ │ │ │   (repeat rewrite ?beta1, ?betaU1 in h);
│ │ │   lazy beta in h.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Hurkens's paradox.

│ │ │ +

Hurkens's paradox.

│ │ │ │ │ │
│ │ │ │ │ │ An inhabitant of U0 standing for False. │ │ │
│ │ │
│ │ │ Variable F:U0.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Preliminary definitions

│ │ │ +

Preliminary definitions

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition V : U1 := A, ((A u0) A u0) A u0.
│ │ │ Definition U : U1 := V u0.
│ │ │ @@ -321,15 +321,15 @@ │ │ │   (₀¹ i:U₁u0, le i x i · (λ₁ v, (sb v) · [U] · le' · x)) F
│ │ │ .
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Proof

│ │ │ +

Proof

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma Omega : El0 (₀¹ i:U₁u0, induct i i · WF).
│ │ │ Proof.
│ │ │ @@ -406,15 +406,15 @@ │ │ │
│ │ │ End Generic.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Impredicative universes are not retracts.

│ │ │ +

Impredicative universes are not retracts.

│ │ │ │ │ │
│ │ │ │ │ │ There can be no retract to an impredicative Coq universe from a │ │ │ smaller type. In this version of the proof, the impredicativity of │ │ │ the universe is postulated with a pair of functions from the │ │ │ universe to its type and back which commute with dependent product │ │ │ @@ -433,15 +433,15 @@ │ │ │ Let U1:U2 := Type.
│ │ │ Variable U0:U1.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

U1 is impredicative

│ │ │ +

U1 is impredicative

│ │ │ │ │ │
│ │ │
│ │ │ Variable u22u1 : U2 -> U1.
│ │ │ Hypothesis u22u1_unit : forall (c:U2), c -> u22u1 c.
│ │ │
│ │ │ │ │ │ @@ -460,28 +460,28 @@ │ │ │ Hypothesis u22u1_coherent : forall (F:U1 -> U1) (f:forall x:U1, F x) (x:U1),
│ │ │                               u22u1_counit _ (u22u1_unit _ f) x = f x.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

U0 is a retract of U1

│ │ │ +

U0 is a retract of U1

│ │ │ │ │ │
│ │ │
│ │ │ Variable u02u1 : U0 -> U1.
│ │ │ Variable u12u0 : U1 -> U0.
│ │ │ Hypothesis u12u0_unit : forall (b:U1), b -> u02u1 (u12u0 b).
│ │ │ Hypothesis u12u0_counit : forall (b:U1), u02u1 (u12u0 b) -> b.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Paradox

│ │ │ +

Paradox

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Theorem paradox : forall F:U1, F.
│ │ │ Proof.
│ │ │ @@ -537,15 +537,15 @@ │ │ │
│ │ │ End NoRetractToImpredicativeUniverse.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Modal fragments of Prop are not retracts

│ │ │ +

Modal fragments of Prop are not retracts

│ │ │ │ │ │
│ │ │ │ │ │ In presence of a a monadic modality on Prop, we can define a │ │ │ subset of Prop of modal propositions which is also a complete │ │ │ Heyting algebra. These cannot be a retract of a modal │ │ │ proposition. This is a case where the universe in system U- are │ │ │ @@ -556,15 +556,15 @@ │ │ │
│ │ │ Module NoRetractToModalProposition.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Monadic modality

│ │ │ +

Monadic modality

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Section Paradox.
│ │ │ │ │ │ @@ -579,15 +579,15 @@ │ │ │   eapply incr in h; eauto.
│ │ │ Qed.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

The universe of modal propositions

│ │ │ +

The universe of modal propositions

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition MProp := { P:Prop | M P -> P }.
│ │ │ Definition El : MProp -> Prop := @proj1_sig _ _.
│ │ │ @@ -609,15 +609,15 @@ │ │ │     eauto using modal.
│ │ │ Defined.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Retract of the modal fragment of Prop in a small type

│ │ │ +

Retract of the modal fragment of Prop in a small type

│ │ │ │ │ │
│ │ │ │ │ │ The retract is axiomatized using logical equivalence as the │ │ │ equality on propositions. │ │ │
│ │ │
│ │ │ @@ -629,15 +629,15 @@ │ │ │ Hypothesis p2p1 : forall A:MProp, El (b2p (p2b A)) -> El A.
│ │ │ Hypothesis p2p2 : forall A:MProp, El A -> El (b2p (p2b A)).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Paradox

│ │ │ +

Paradox

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Theorem paradox : forall B:MProp, El B.
│ │ │ Proof.
│ │ │ @@ -688,15 +688,15 @@ │ │ │
│ │ │ End NoRetractToModalProposition.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

The negative fragment of Prop is not a retract

│ │ │ +

The negative fragment of Prop is not a retract

│ │ │ │ │ │
│ │ │ │ │ │ The existence in the pure Calculus of Constructions of a retract │ │ │ from the negative fragment of Prop into a negative proposition │ │ │ is inconsistent. This is an instance of the previous result. │ │ │
│ │ │ @@ -705,15 +705,15 @@ │ │ │
│ │ │ Module NoRetractToNegativeProp.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

The universe of negative propositions.

│ │ │ +

The universe of negative propositions.

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition NProp := { P:Prop | ~~P -> P }.
│ │ │ Definition El : NProp -> Prop := @proj1_sig _ _.
│ │ │ @@ -721,15 +721,15 @@ │ │ │
│ │ │ Section Paradox.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Retract of the negative fragment of Prop in a small type

│ │ │ +

Retract of the negative fragment of Prop in a small type

│ │ │ │ │ │
│ │ │ │ │ │ The retract is axiomatized using logical equivalence as the │ │ │ equality on propositions. │ │ │
│ │ │
│ │ │ @@ -741,15 +741,15 @@ │ │ │ Hypothesis p2p1 : forall A:NProp, El (b2p (p2b A)) -> El A.
│ │ │ Hypothesis p2p2 : forall A:NProp, El A -> El (b2p (p2b A)).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Paradox

│ │ │ +

Paradox

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Theorem paradox : forall B:NProp, El B.
│ │ │ Proof.
│ │ │ @@ -772,15 +772,15 @@ │ │ │
│ │ │ End NoRetractToNegativeProp.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Prop is not a retract

│ │ │ +

Prop is not a retract

│ │ │ │ │ │
│ │ │ │ │ │ The existence in the pure Calculus of Constructions of a retract │ │ │ from Prop into a small type of Prop is inconsistent. This is a │ │ │ special case of the previous result. │ │ │
│ │ │ @@ -789,15 +789,15 @@ │ │ │
│ │ │ Module NoRetractFromSmallPropositionToProp.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

The universe of propositions.

│ │ │ +

The universe of propositions.

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition NProp := { P:Prop | P -> P}.
│ │ │ Definition El : NProp -> Prop := @proj1_sig _ _.
│ │ │ @@ -805,15 +805,15 @@ │ │ │
│ │ │ Section MParadox.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Retract of Prop in a small type, using the identity modality.

│ │ │ +

Retract of Prop in a small type, using the identity modality.

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Variable bool : NProp.
│ │ │ Variable p2b : NProp -> El bool.
│ │ │ @@ -821,15 +821,15 @@ │ │ │ Hypothesis p2p1 : forall A:NProp, El (b2p (p2b A)) -> El A.
│ │ │ Hypothesis p2p2 : forall A:NProp, El A -> El (b2p (p2b A)).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Paradox

│ │ │ +

Paradox

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Theorem mparadox : forall B:NProp, El B.
│ │ │ Proof.
│ │ │ @@ -852,15 +852,15 @@ │ │ │
│ │ │ Section Paradox.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Retract of Prop in a small type

│ │ │ +

Retract of Prop in a small type

│ │ │ │ │ │
│ │ │ │ │ │ The retract is axiomatized using logical equivalence as the │ │ │ equality on propositions. │ │ │
│ │ │
│ │ │ @@ -870,15 +870,15 @@ │ │ │ Hypothesis p2p1 : forall A:Prop, b2p (p2b A) -> A.
│ │ │ Hypothesis p2p2 : forall A:Prop, A -> b2p (p2b A).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Paradox

│ │ │ +

Paradox

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Theorem paradox : forall B:Prop, B.
│ │ │ Proof.
│ │ │ @@ -897,15 +897,15 @@ │ │ │
│ │ │ End NoRetractFromSmallPropositionToProp.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Large universes are not retracts of Prop.

│ │ │ +

Large universes are not retracts of Prop.

│ │ │ │ │ │
│ │ │ │ │ │ The existence in the Calculus of Constructions with universes of a │ │ │ retract from some Type universe into Prop is inconsistent. │ │ │
│ │ │
│ │ │ @@ -922,29 +922,29 @@ │ │ │
│ │ │ Section Paradox.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Assumption of a retract from Type into Prop

│ │ │ +

Assumption of a retract from Type into Prop

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Variable down : Type1 -> Prop.
│ │ │ Variable up : Prop -> Type1.
│ │ │ Hypothesis up_down : forall (A:Type1), up (down A) = A :> Type1.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Paradox

│ │ │ +

Paradox

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Theorem paradox : forall P:Prop, P.
│ │ │ Proof.
│ │ │ @@ -991,15 +991,15 @@ │ │ │
│ │ │ End NoRetractFromTypeToProp.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

A<>Type

│ │ │ +

A<>Type

│ │ │ │ │ │
│ │ │ │ │ │ No Coq universe can be equal to one of its elements. │ │ │
│ │ │
│ │ │ │ │ │ @@ -1012,29 +1012,29 @@ │ │ │
│ │ │ Section Paradox.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Universe U is equal to one of its elements.

│ │ │ +

Universe U is equal to one of its elements.

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Let U := Type.
│ │ │ Variable A:U.
│ │ │ Hypothesis h : U=A.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Universe U is a retract of A

│ │ │ +

Universe U is a retract of A

│ │ │ │ │ │
│ │ │ │ │ │ The following context is actually sufficient for the paradox to │ │ │ hold. The hypothesis h:U=A is only used to define down, up │ │ │ and up_down. │ │ │
│ │ │ @@ -1116,15 +1116,15 @@ │ │ │
│ │ │ End TypeNeqSmallType.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Prop<>Type.

│ │ │ +

Prop<>Type.

│ │ │ │ │ │
│ │ │ │ │ │ Special case of TypeNeqSmallType. │ │ │
│ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Logic.PropExtensionalityFacts.html │ │ │ @@ -83,15 +83,15 @@ │ │ │
│ │ │ Set Implicit Arguments.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Definitions

│ │ │ +

Definitions

│ │ │ │ │ │
│ │ │ │ │ │ Propositional extensionality │ │ │
│ │ │
│ │ │ │ │ │ @@ -137,19 +137,19 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Propositional and predicate extensionality

│ │ │ +

Propositional and predicate extensionality

│ │ │ │ │ │
│ │ │ │ │ │ -

Predicate extensionality <-> Propositional extensionality + Propositional functional extensionality

│ │ │ +

Predicate extensionality <-> Propositional extensionality + Propositional functional extensionality

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma PredExt_imp_PropExt : PredicateExtensionality -> PropositionalExtensionality.
│ │ │ │ │ │ @@ -164,27 +164,27 @@ │ │ │ Theorem PropExt_and_PropFunExt_iff_PredExt :
│ │ │   PropositionalExtensionality /\ PropositionalFunctionalExtensionality <-> PredicateExtensionality.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Propositional extensionality and provable proposition extensionality

│ │ │ +

Propositional extensionality and provable proposition extensionality

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma PropExt_imp_ProvPropExt : PropositionalExtensionality -> ProvablePropositionExtensionality.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Propositional extensionality and refutable proposition extensionality

│ │ │ +

Propositional extensionality and refutable proposition extensionality

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma PropExt_imp_RefutPropExt : PropositionalExtensionality -> RefutablePropositionExtensionality.
│ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Logic.PropFacts.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Basic facts about Prop as a type

│ │ │ +

Basic facts about Prop as a type

│ │ │ │ │ │
│ │ │ │ │ │ An intuitionistic theorem from topos theory [LambekScott] │ │ │ │ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Logic.SetIsType.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

The Set universe seen as a synonym for Type

│ │ │ +

The Set universe seen as a synonym for Type

│ │ │ │ │ │
│ │ │ │ │ │ After loading this file, Set becomes just another name for Type. │ │ │ This allows easily performing a Set-to-Type migration, or at least │ │ │ test whether a development relies or not on specific features of │ │ │ Set: simply insert some Require Export of this file at starting │ │ ├── ./usr/share/doc/coq-theories/html/Coq.MSets.MSetAVL.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

MSetAVL : Implementation of MSetInterface via AVL trees

│ │ │ +

MSetAVL : Implementation of MSetInterface via AVL trees

│ │ │ │ │ │
│ │ │ │ │ │ This module implements finite sets using AVL trees. │ │ │ It follows the implementation from Ocaml's standard library, │ │ │ │ │ │
│ │ │ @@ -57,28 +57,28 @@ │ │ │
│ │ │ Set Implicit Arguments.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Ops : the pure functions

│ │ │ +

Ops : the pure functions

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module Ops (Import I:Int)(X:OrderedType) <: MSetInterface.Ops X.
│ │ │ Local Open Scope Int_scope.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Generic trees instantiated with integer height

│ │ │ +

Generic trees instantiated with integer height

│ │ │ │ │ │
│ │ │ │ │ │ We reuse a generic definition of trees where the information │ │ │ parameter is a Int.t. Functions like mem or fold are also │ │ │ provided by this generic functor. │ │ │
│ │ │ @@ -90,15 +90,15 @@ │ │ │
│ │ │ Definition t := tree.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Height of trees

│ │ │ +

Height of trees

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition height (s : t) : int :=
│ │ │   match s with
│ │ │ @@ -106,27 +106,27 @@ │ │ │   | Node h _ _ _ => h
│ │ │   end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Singleton set

│ │ │ +

Singleton set

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition singleton x := Node 1 Leaf x Leaf.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Helper functions

│ │ │ +

Helper functions

│ │ │ │ │ │
│ │ │ │ │ │ create l x r creates a node, assuming l and r │ │ │ to be balanced and |height l - height r| <= 2. │ │ │
│ │ │
│ │ │ @@ -181,15 +181,15 @@ │ │ │     else
│ │ │       create l x r.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Insertion

│ │ │ +

Insertion

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Fixpoint add x s := match s with
│ │ │    | Leaf => Node 1 Leaf x Leaf
│ │ │ @@ -201,15 +201,15 @@ │ │ │       end
│ │ │   end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Join

│ │ │ +

Join

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Same as bal but does not assume anything regarding heights │ │ │ of l and r. │ │ │ │ │ │ @@ -230,15 +230,15 @@ │ │ │           end
│ │ │   end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Extraction of minimum element

│ │ │ +

Extraction of minimum element

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Morally, remove_min is to be applied to a non-empty tree │ │ │ t = Node h l x r. Since we can't deal here with assert false │ │ │ for t=Leaf, we pre-unpack t (and forget about h). │ │ │ @@ -254,15 +254,15 @@ │ │ │        let (l',m) := remove_min ll lx lr in (bal l' x r, m)
│ │ │   end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Merging two trees

│ │ │ +

Merging two trees

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ merge t1 t2 builds the union of t1 and t2 assuming all elements │ │ │ of t1 to be smaller than all elements of t2, and │ │ │ |height t1 - height t2| <= 2. │ │ │ @@ -278,15 +278,15 @@ │ │ │         let (s2',m) := remove_min l2 x2 r2 in bal s1 m s2'
│ │ │ end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Deletion

│ │ │ +

Deletion

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Fixpoint remove x s := match s with
│ │ │   | Leaf => Leaf
│ │ │ @@ -298,15 +298,15 @@ │ │ │       end
│ │ │    end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Concatenation

│ │ │ +

Concatenation

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Same as merge but does not assume anything about heights. │ │ │ │ │ │
│ │ │ @@ -322,15 +322,15 @@ │ │ │             join s1 m s2'
│ │ │    end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Splitting

│ │ │ +

Splitting

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ split x s returns a triple (l, present, r) where │ │ │
    │ │ │
  • l is the set of elements of s that are < x │ │ │ @@ -362,15 +362,15 @@ │ │ │      end
    │ │ │  end.
    │ │ │ │ │ │
    │ │ │
│ │ │ │ │ │
│ │ │ -

Intersection

│ │ │ +

Intersection

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Fixpoint inter s1 s2 := match s1, s2 with
│ │ │     | Leaf, _ => Leaf
│ │ │ @@ -381,15 +381,15 @@ │ │ │             else concat (inter l1 l2') (inter r1 r2')
│ │ │     end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Difference

│ │ │ +

Difference

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Fixpoint diff s1 s2 := match s1, s2 with
│ │ │  | Leaf, _ => Leaf
│ │ │ @@ -400,15 +400,15 @@ │ │ │     else join (diff l1 l2') x1 (diff r1 r2')
│ │ │ end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Union

│ │ │ +

Union

│ │ │ │ │ │
│ │ │ │ │ │ In ocaml, heights of s1 and s2 are compared each time in order │ │ │ to recursively perform the split on the smaller set. │ │ │ Unfortunately, this leads to a non-structural algorithm. The │ │ │ following code is a simplification of the ocaml version: no │ │ │ @@ -431,15 +431,15 @@ │ │ │      join (union l1 l2') x1 (union r1 r2')
│ │ │  end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Filter

│ │ │ +

Filter

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Fixpoint filter (f:elt->bool) s := match s with
│ │ │   | Leaf => Leaf
│ │ │ @@ -449,15 +449,15 @@ │ │ │     if f x then join l' x r' else concat l' r'
│ │ │  end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Partition

│ │ │ +

Partition

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Fixpoint partition (f:elt->bool)(s : t) : t*t :=
│ │ │   match s with
│ │ │ @@ -472,15 +472,15 @@ │ │ │
│ │ │ End Ops.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

MakeRaw

│ │ │ +

MakeRaw

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Functor of pure functions + a posteriori proofs of invariant │ │ │ preservation │ │ │
│ │ │ @@ -570,30 +570,30 @@ │ │ │
│ │ │ Local Open Scope pair_scope.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Singleton set

│ │ │ +

Singleton set

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma singleton_spec : forall x y, InT y (singleton x) <-> X.eq y x.
│ │ │ │ │ │
│ │ │ Instance singleton_ok x : Ok (singleton x).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Helper functions

│ │ │ +

Helper functions

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma create_spec :
│ │ │  forall l x r y, InT y (create l x r) <-> X.eq y x \/ InT y l \/ InT y r.
│ │ │ @@ -610,15 +610,15 @@ │ │ │ Instance bal_ok l x r `(Ok l, Ok r, lt_tree x l, gt_tree x r) :
│ │ │  Ok (bal l x r).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Insertion

│ │ │ +

Insertion

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma add_spec' : forall s x y,
│ │ │  InT y (add x s) <-> X.eq y x \/ InT y s.
│ │ │ @@ -633,15 +633,15 @@ │ │ │
│ │ │ Local Open Scope Int_scope.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Join

│ │ │ +

Join

│ │ │ │ │ │
│ │ │ │ │ │ Function/Functional Scheme can't deal with internal fix. │ │ │ Let's do its job by hand: │ │ │
│ │ │
│ │ │ @@ -671,15 +671,15 @@ │ │ │ Instance join_ok : forall l x r `(Ok l, Ok r, lt_tree x l, gt_tree x r),
│ │ │  Ok (join l x r).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Extraction of minimum element

│ │ │ +

Extraction of minimum element

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma remove_min_spec : forall l x r y h,
│ │ │  InT y (Node h l x r) <->
│ │ │ @@ -694,15 +694,15 @@ │ │ │  gt_tree (remove_min l x r)#2 (remove_min l x r)#1.
│ │ │ Local Hint Resolve remove_min_gt_tree : core.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Merging two trees

│ │ │ +

Merging two trees

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma merge_spec : forall s1 s2 y,
│ │ │  InT y (merge s1 s2) <-> InT y s1 \/ InT y s2.
│ │ │ @@ -712,15 +712,15 @@ │ │ │  `(forall y1 y2 : elt, InT y1 s1 -> InT y2 s2 -> X.lt y1 y2),
│ │ │  Ok (merge s1 s2).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Deletion

│ │ │ +

Deletion

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma remove_spec : forall s x y `{Ok s},
│ │ │  (InT y (remove x s) <-> InT y s /\ ~ X.eq y x).
│ │ │ @@ -728,15 +728,15 @@ │ │ │
│ │ │ Instance remove_ok s x `(Ok s) : Ok (remove x s).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Concatenation

│ │ │ +

Concatenation

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma concat_spec : forall s1 s2 y,
│ │ │  InT y (concat s1 s2) <-> InT y s1 \/ InT y s2.
│ │ │ @@ -746,15 +746,15 @@ │ │ │  `(forall y1 y2 : elt, InT y1 s1 -> InT y2 s2 -> X.lt y1 y2),
│ │ │  Ok (concat s1 s2).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Splitting

│ │ │ +

Splitting

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma split_spec1 : forall s x y `{Ok s},
│ │ │  (InT y (split x s)#l <-> InT y s /\ X.lt y x).
│ │ │ @@ -776,15 +776,15 @@ │ │ │
│ │ │ Instance split_ok2 s x `(Ok s) : Ok (split x s)#r.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Intersection

│ │ │ +

Intersection

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Ltac destruct_split := match goal with
│ │ │  | H : split ?x ?s = << ?u, ?v, ?w >> |- _ =>
│ │ │ @@ -805,15 +805,15 @@ │ │ │
│ │ │ Instance inter_ok s1 s2 `(Ok s1, Ok s2) : Ok (inter s1 s2).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Difference

│ │ │ +

Difference

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma diff_spec_ok : forall s1 s2 `{Ok s1, Ok s2},
│ │ │  Ok (diff s1 s2) /\ (forall y, InT y (diff s1 s2) <-> InT y s1 /\ ~InT y s2).
│ │ │ @@ -825,15 +825,15 @@ │ │ │
│ │ │ Instance diff_ok s1 s2 `(Ok s1, Ok s2) : Ok (diff s1 s2).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Union

│ │ │ +

Union

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma union_spec : forall s1 s2 y `{Ok s1, Ok s2},
│ │ │  (InT y (union s1 s2) <-> InT y s1 \/ InT y s2).
│ │ │ @@ -841,15 +841,15 @@ │ │ │
│ │ │ Instance union_ok s1 s2 : forall `(Ok s1, Ok s2), Ok (union s1 s2).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Filter

│ │ │ +

Filter

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma filter_spec : forall s x f,
│ │ │  Proper (X.eq==>Logic.eq) f ->
│ │ │ @@ -862,15 +862,15 @@ │ │ │
│ │ │ Instance filter_ok s f `(H : Ok s) : Ok (filter f s).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Partition

│ │ │ +

Partition

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma partition_spec1' s f : (partition f s)#1 = filter f s.
│ │ │ │ │ │ @@ -897,15 +897,15 @@ │ │ │
│ │ │ End MakeRaw.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Encapsulation

│ │ │ +

Encapsulation

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Now, in order to really provide a functor implementing S, we │ │ │ need to encapsulate everything into a type of binary search trees. │ │ │ They also happen to be well-balanced, but this has no influence │ │ ├── ./usr/share/doc/coq-theories/html/Coq.MSets.MSetDecide.html │ │ │ @@ -41,15 +41,15 @@ │ │ │ Module WDecideOn (E : DecidableType)(Import M : WSetsOn E).
│ │ │  Module F := MSetFacts.WFactsOn E M.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Overview

│ │ │ +

Overview

│ │ │ │ │ │ This functor defines the tactic fsetdec, which will │ │ │ solve any valid goal of the form │ │ │
│ │ │      forall s1 ... sn,
│ │ │      forall x1 ... xm,
│ │ │      P1 -> ... -> Pk -> P
│ │ │ @@ -147,41 +147,41 @@
│ │ │  
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ -

Facts and Tactics for Propositional Logic

│ │ │ +

Facts and Tactics for Propositional Logic

│ │ │ │ │ │ These lemmas and tactics are in a module so that they do │ │ │ not affect the namespace if you import the enclosing │ │ │ module Decide. │ │ │
│ │ │
│ │ │   Module MSetLogicalFacts.
│ │ │     Export Decidable.
│ │ │     Export Setoid.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Lemmas and Tactics About Decidable Propositions

│ │ │ +

Lemmas and Tactics About Decidable Propositions

│ │ │ │ │ │
│ │ │ │ │ │ -

Propositional Equivalences Involving Negation

│ │ │ +

Propositional Equivalences Involving Negation

│ │ │ │ │ │ These are all written with the unfolded form of │ │ │ negation, since I am not sure if setoid rewriting will │ │ │ always perform conversion. │ │ │
│ │ │ │ │ │ -

Tactics for Negations

│ │ │ +

Tactics for Negations

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │     Tactic Notation "fold" "any" "not" :=
│ │ │       repeat (
│ │ │ @@ -424,28 +424,28 @@ │ │ │   End MSetLogicalFacts.
│ │ │   Import MSetLogicalFacts.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Auxiliary Tactics

│ │ │ +

Auxiliary Tactics

│ │ │ │ │ │ Again, these lemmas and tactics are in a module so that │ │ │ they do not affect the namespace if you import the │ │ │ enclosing module Decide. │ │ │
│ │ │
│ │ │   Module MSetDecideAuxiliary.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Generic Tactics

│ │ │ +

Generic Tactics

│ │ │ │ │ │ We begin by defining a few generic, useful tactics. │ │ │
│ │ │ │ │ │ remove logical hypothesis inter-dependencies (fix 2136). │ │ │
│ │ │
│ │ │ @@ -554,15 +554,15 @@ │ │ │         | H: _ |- _ => progress (decompose record H); clear H
│ │ │         end).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Discarding Irrelevant Hypotheses

│ │ │ +

Discarding Irrelevant Hypotheses

│ │ │ │ │ │ We will want to clear the context of any │ │ │ non-MSet-related hypotheses in order to increase the │ │ │ speed of the tactic. To do this, we will need to be │ │ │ able to decide which are relevant. We do this by making │ │ │ a simple inductive definition classifying the │ │ │ propositions of interest. │ │ │ @@ -633,15 +633,15 @@ │ │ │           else clear H
│ │ │         end).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Turning Set Operators into Propositional Connectives

│ │ │ +

Turning Set Operators into Propositional Connectives

│ │ │ │ │ │ The lemmas from MSetFacts will be used to break down │ │ │ set operations into propositional formulas built over │ │ │ the predicates In and E.eq applied only to │ │ │ variables. We are going to use them with autorewrite. │ │ │ │ │ │
│ │ │ @@ -659,15 +659,15 @@ │ │ │
│ │ │     Hint Rewrite eq_refl_iff : set_eq_simpl.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Decidability of MSet Propositions

│ │ │ +

Decidability of MSet Propositions

│ │ │ │ │ │
│ │ │ │ │ │ In is decidable. │ │ │
│ │ │
│ │ │     Lemma dec_In : forall x s,
│ │ │ @@ -693,15 +693,15 @@ │ │ │
│ │ │     Hint Resolve dec_In dec_eq : MSet_decidability.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Normalizing Propositions About Equality

│ │ │ +

Normalizing Propositions About Equality

│ │ │ │ │ │ We have to deal with the fact that E.eq may be │ │ │ convertible with Coq's equality. Thus, we will find the │ │ │ following tactics useful to replace one form with the │ │ │ other everywhere. │ │ │
│ │ │ │ │ │ @@ -776,15 +776,15 @@ │ │ │         end);
│ │ │       autorewrite with set_eq_simpl in *.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Considering Decidability of Base Propositions

│ │ │ +

Considering Decidability of Base Propositions

│ │ │ │ │ │ This tactic adds assertions about the decidability of │ │ │ E.eq and In to the context. This is necessary for │ │ │ the completeness of the fsetdec tactic. However, in │ │ │ order to minimize the cost of proof search, we should be │ │ │ careful to not add more than we need. Once negations │ │ │ have been pushed to the leaves of the propositions, we │ │ │ @@ -825,15 +825,15 @@ │ │ │         | _: ~ ?P, H : ?P \/ ~ ?P |- _ => clear H
│ │ │         end).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Handling Empty, Subset, and Equal

│ │ │ +

Handling Empty, Subset, and Equal

│ │ │ │ │ │ This tactic instantiates universally quantified │ │ │ hypotheses (which arise from the unfolding of Empty, │ │ │ Subset, and Equal) for each of the set element │ │ │ expressions that is involved in some membership or │ │ │ equality fact. Then it throws away those hypotheses, │ │ │ which should no longer be needed. │ │ │ @@ -873,15 +873,15 @@ │ │ │           clear H
│ │ │         end).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

The Core fsetdec Auxiliary Tactics

│ │ │ +

The Core fsetdec Auxiliary Tactics

│ │ │ │ │ │
│ │ │ │ │ │ Here is the crux of the proof search. Recursion through │ │ │ intuition! (This will terminate if I correctly │ │ │ understand the behavior of intuition.) │ │ │
│ │ │ @@ -915,15 +915,15 @@ │ │ │   End MSetDecideAuxiliary.
│ │ │   Import MSetDecideAuxiliary.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

The fsetdec Tactic

│ │ │ +

The fsetdec Tactic

│ │ │ │ │ │ Here is the top-level tactic (the only one intended for │ │ │ clients of this library). It's specification is given at │ │ │ the top of the file. │ │ │
│ │ │
│ │ │   Ltac fsetdec :=
│ │ │ @@ -1029,15 +1029,15 @@ │ │ │       fsetdec_body
│ │ │     end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Examples

│ │ │ +

Examples

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │   Module MSetDecideTestCases.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.MSets.MSetEqProperties.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Finite sets library

│ │ │ +

Finite sets library

│ │ │ │ │ │
│ │ │ │ │ │ This module proves many properties of finite sets that │ │ │ are consequences of the axiomatization in FsetInterface │ │ │ Contrary to the functor in FsetProperties it uses │ │ │ sets operations instead of predicates over sets, i.e. │ │ ├── ./usr/share/doc/coq-theories/html/Coq.MSets.MSetFacts.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Finite sets library

│ │ │ +

Finite sets library

│ │ │ │ │ │
│ │ │ │ │ │ This functor derives additional facts from MSetInterface.S. These │ │ │ facts are mainly the specifications of MSetInterface.S written using │ │ │ different styles: equivalence and boolean equalities. │ │ │ Moreover, we prove that E.Eq and Equal are setoid equalities. │ │ │ @@ -51,15 +51,15 @@ │ │ │ Notation eq_dec := E.eq_dec.
│ │ │ Definition eqb x y := if eq_dec x y then true else false.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Specifications written using implications :

│ │ │ +

Specifications written using implications :

│ │ │ │ │ │ this used to be the default interface. │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Section ImplSpec.
│ │ │ @@ -166,15 +166,15 @@ │ │ │     filter_1 filter_2 for_all_2 exists_2 elements_2
│ │ │     : set.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Specifications written using equivalences :

│ │ │ +

Specifications written using equivalences :

│ │ │ │ │ │ this is now provided by the default interface. │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Section IffSpec.
│ │ │ @@ -255,15 +255,15 @@ │ │ │   || rewrite union_iff || rewrite inter_iff || rewrite diff_iff
│ │ │   || rewrite empty_iff)).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Specifications written using boolean predicates

│ │ │ +

Specifications written using boolean predicates

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Section BoolSpec.
│ │ │ Variable s s' s'' : t.
│ │ │ @@ -319,15 +319,15 @@ │ │ │
│ │ │ End BoolSpec.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Declarations of morphisms with respects to E.eq and Equal

│ │ │ +

Declarations of morphisms with respects to E.eq and Equal

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Instance In_m : Proper (E.eq==>Equal==>iff) In.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.MSets.MSetGenTree.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

MSetGenTree : sets via generic trees

│ │ │ +

MSetGenTree : sets via generic trees

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ This module factorizes common parts in implementations │ │ │ of finite sets as AVL trees and as Red-Black trees. The nodes │ │ │ of the trees defined here include an generic information │ │ │ @@ -73,15 +73,15 @@ │ │ │  Parameter t : Set.
│ │ │ End InfoTyp.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Ops : the pure functions

│ │ │ +

Ops : the pure functions

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module Type Ops (X:OrderedType)(Info:InfoTyp).
│ │ │ │ │ │ @@ -94,15 +94,15 @@ │ │ │ | Leaf : tree
│ │ │ | Node : Info.t -> tree -> X.t -> tree -> tree.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

The empty set and emptyness test

│ │ │ +

The empty set and emptyness test

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition empty := Leaf.
│ │ │ │ │ │ @@ -113,15 +113,15 @@ │ │ │  | _ => false
│ │ │  end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Membership test

│ │ │ +

Membership test

│ │ │ │ │ │
│ │ │ │ │ │ The mem function is deciding membership. It exploits the │ │ │ binary search tree invariant to achieve logarithmic complexity. │ │ │
│ │ │
│ │ │ @@ -138,15 +138,15 @@ │ │ │    end
│ │ │  end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Minimal, maximal, arbitrary elements

│ │ │ +

Minimal, maximal, arbitrary elements

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Fixpoint min_elt (t : tree) : option elt :=
│ │ │  match t with
│ │ │ @@ -166,15 +166,15 @@ │ │ │
│ │ │ Definition choose := min_elt.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Iteration on elements

│ │ │ +

Iteration on elements

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Fixpoint fold {A: Type} (f: elt -> A -> A) (t: tree) (base: A) : A :=
│ │ │   match t with
│ │ │ @@ -223,15 +223,15 @@ │ │ │  | Node _ l _ r => S (min (mindepth l) (mindepth r))
│ │ │  end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Testing universal or existential properties.

│ │ │ +

Testing universal or existential properties.

│ │ │ │ │ │
│ │ │ │ │ │ We do not use the standard boolean operators of Coq, │ │ │ but lazy ones. │ │ │
│ │ │
│ │ │ @@ -248,15 +248,15 @@ │ │ │   | Node _ l x r => f x ||| exists_ f l ||| exists_ f r
│ │ │ end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Comparison of trees

│ │ │ +

Comparison of trees

│ │ │ │ │ │
│ │ │ │ │ │ The algorithm here has been suggested by Xavier Leroy, │ │ │ and transformed into c.p.s. by Benjamin Grégoire. │ │ │ The original ocaml code (with non-structural recursive calls) │ │ │ has also been formalized (thanks to Function+measure), see │ │ │ @@ -355,15 +355,15 @@ │ │ │ Definition equal s1 s2 :=
│ │ │  match compare s1 s2 with Eq => true | _ => false end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Subset test

│ │ │ +

Subset test

│ │ │ │ │ │
│ │ │ │ │ │ In ocaml, recursive calls are made on "half-trees" such as │ │ │ (Node _ l1 x1 Leaf) and (Node _ Leaf x1 r1). Instead of these │ │ │ non-structural calls, we propose here two specialized functions │ │ │ for these situations. This version should be almost as efficient │ │ │ @@ -414,27 +414,27 @@ │ │ │
│ │ │ End Ops.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Props : correctness proofs of these generic operations

│ │ │ +

Props : correctness proofs of these generic operations

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module Type Props (X:OrderedType)(Info:InfoTyp)(Import M:Ops X Info).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Occurrence in a tree

│ │ │ +

Occurrence in a tree

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Inductive InT (x : elt) : tree -> Prop :=
│ │ │   | IsRoot : forall c l r y, X.eq x y -> InT x (Node c l y r)
│ │ │ @@ -444,15 +444,15 @@ │ │ │
│ │ │ Definition In := InT.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Some shortcuts

│ │ │ +

Some shortcuts

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition Equal s s' := forall a : elt, InT a s <-> InT a s'.
│ │ │ Definition Subset s s' := forall a : elt, InT a s -> InT a s'.
│ │ │ @@ -460,15 +460,15 @@ │ │ │ Definition For_all (P : elt -> Prop) s := forall x, InT x s -> P x.
│ │ │ Definition Exists (P : elt -> Prop) s := exists x, InT x s /\ P x.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Binary search trees

│ │ │ +

Binary search trees

│ │ │ │ │ │
│ │ │ │ │ │ lt_tree x s: all elements in s are smaller than x │ │ │ (resp. greater for gt_tree) │ │ │
│ │ │
│ │ │ @@ -537,27 +537,27 @@ │ │ │   | Node _ l x r => isok l && isok r && ltb_tree x l && gtb_tree x r
│ │ │  end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Known facts about ordered types

│ │ │ +

Known facts about ordered types

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module Import MX := OrderedTypeFacts X.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Automation and dedicated tactics

│ │ │ +

Automation and dedicated tactics

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Scheme tree_ind := Induction for tree Sort Prop.
│ │ │ Scheme bst_ind := Induction for bst Sort Prop.
│ │ │ @@ -655,15 +655,15 @@ │ │ │
│ │ │ Instance isok_Ok s : isok s = true -> Ok s | 10.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Basic results about In

│ │ │ +

Basic results about In

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma In_1 :
│ │ │  forall s x y, X.eq x y -> InT x s -> InT y s.
│ │ │ @@ -750,54 +750,54 @@ │ │ │    | _ => eauto with typeclass_instances
│ │ │  end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Empty set

│ │ │ +

Empty set

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma empty_spec : Empty empty.
│ │ │ │ │ │
│ │ │ Instance empty_ok : Ok empty.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Emptyness test

│ │ │ +

Emptyness test

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma is_empty_spec : forall s, is_empty s = true <-> Empty s.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Membership

│ │ │ +

Membership

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma mem_spec : forall s x `{Ok s}, mem x s = true <-> InT x s.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Minimal and maximal elements

│ │ │ +

Minimal and maximal elements

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Functional Scheme min_elt_ind := Induction for min_elt Sort Prop.
│ │ │ Functional Scheme max_elt_ind := Induction for max_elt Sort Prop.
│ │ │ @@ -833,15 +833,15 @@ │ │ │   choose s = Some x -> choose s' = Some x' ->
│ │ │   Equal s s' -> X.eq x x'.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Elements

│ │ │ +

Elements

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma elements_spec1' : forall s acc x,
│ │ │  InA X.eq x (elements_aux acc s) <-> InT x s \/ InA X.eq x acc.
│ │ │ @@ -909,15 +909,15 @@ │ │ │
│ │ │ Lemma elements_sort_ok s : sort X.lt (elements s) -> Ok s.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

for_all and exists

│ │ │ +

for_all and exists

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma for_all_spec s f : Proper (X.eq==>eq) f ->
│ │ │  (for_all f s = true <-> For_all (fun x => f x = true) s).
│ │ │ @@ -926,15 +926,15 @@ │ │ │ Lemma exists_spec s f : Proper (X.eq==>eq) f ->
│ │ │  (exists_ f s = true <-> Exists (fun x => f x = true) s).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Fold

│ │ │ +

Fold

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma fold_spec' {A} (f : elt -> A -> A) (s : tree) (i : A) (acc : list elt) :
│ │ │  fold_left (flip f) (elements_aux acc s) i = fold_left (flip f) acc (fold f s i).
│ │ │ @@ -943,15 +943,15 @@ │ │ │ Lemma fold_spec (s:tree) {A} (i : A) (f : elt -> A -> A) :
│ │ │  fold f s i = fold_left (flip f) (elements s) i.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Subset

│ │ │ +

Subset

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma subsetl_spec : forall subset_l1 l1 x1 c1 s2
│ │ │  `{Ok (Node c1 l1 x1 Leaf), Ok s2},
│ │ │ @@ -968,15 +968,15 @@ │ │ │ Lemma subset_spec : forall s1 s2 `{Ok s1, Ok s2},
│ │ │  (subset s1 s2 = true <-> Subset s1 s2).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Comparison

│ │ │ +

Comparison

│ │ │ │ │ │
│ │ │ │ │ │ Relations eq and lt over trees │ │ │
│ │ │
│ │ │ │ │ │ @@ -1067,28 +1067,28 @@ │ │ │ Lemma compare_spec : forall s1 s2 `{Ok s1, Ok s2},
│ │ │  CompSpec eq lt s1 s2 (compare s1 s2).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Equality test

│ │ │ +

Equality test

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma equal_spec : forall s1 s2 `{Ok s1, Ok s2},
│ │ │  equal s1 s2 = true <-> eq s1 s2.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

A few results about mindepth and maxdepth

│ │ │ +

A few results about mindepth and maxdepth

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma mindepth_maxdepth s : mindepth s <= maxdepth s.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.MSets.MSetInterface.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Finite set library

│ │ │ +

Finite set library

│ │ │ │ │ │
│ │ │ │ │ │ Set interfaces, inspired by the one of Ocaml. When compared with │ │ │ Ocaml, the main differences are: │ │ │
    │ │ │
  • the lack of iter function, useless since Coq is purely functional │ │ │ @@ -284,15 +284,15 @@ │ │ │   Include HasWOps.
    │ │ │ End WOps.
    │ │ │ │ │ │
    │ │ │
│ │ │ │ │ │
│ │ │ -

Functorial signature for weak sets

│ │ │ +

Functorial signature for weak sets

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Weak sets are sets without ordering on base elements, only │ │ │ a decidable equality. │ │ │
│ │ │ @@ -397,15 +397,15 @@ │ │ │
│ │ │ End WSetsOn.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Static signature for weak sets

│ │ │ +

Static signature for weak sets

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Similar to the functorial signature WSetsOn, except that the │ │ │ module E of base elements is incorporated in the signature. │ │ │
│ │ │ @@ -417,15 +417,15 @@ │ │ │   Include WSetsOn E.
│ │ │ End WSets.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Functorial signature for sets on ordered elements

│ │ │ +

Functorial signature for sets on ordered elements

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Based on WSetsOn, plus ordering on sets and min_elt and max_elt │ │ │ and some stronger specifications for other functions. │ │ │
│ │ │ @@ -529,15 +529,15 @@ │ │ │
│ │ │ End SetsOn.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Static signature for sets on ordered elements

│ │ │ +

Static signature for sets on ordered elements

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Similar to the functorial signature SetsOn, except that the │ │ │ module E of base elements is incorporated in the signature. │ │ │
│ │ │ @@ -552,15 +552,15 @@ │ │ │
│ │ │ Module Type S := Sets.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Some subtyping tests

│ │ │ +

Some subtyping tests

│ │ │ │ │ │
│ │ │  WSetsOn ---> WSets
│ │ │   |           |
│ │ │   |           |
│ │ │   V           V
│ │ │  SetsOn  ---> Sets
│ │ │ @@ -569,15 +569,15 @@
│ │ │  Module Sfun_WSfun (E:OrderedType)(M : SetsOn E) <: WSetsOn E := M.
│ │ │  Module S_Sfun (M : Sets) <: SetsOn M.E := M.
│ │ │  Module WS_WSfun (M : WSets) <: WSetsOn M.E := M.
│ │ │  
│ │ │ │ │ │
│ │ │ │ │ │ -

Signatures for set representations with ill-formed values.

│ │ │ +

Signatures for set representations with ill-formed values.

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Motivation: │ │ │ │ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.MSets.MSetList.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Finite sets library

│ │ │ +

Finite sets library

│ │ │ │ │ │
│ │ │ │ │ │ This file proposes an implementation of the non-dependent │ │ │ interface MSetInterface.S using strictly ordered list. │ │ │
│ │ │
│ │ │ @@ -32,15 +32,15 @@ │ │ │ Require Export MSetInterface OrdersFacts OrdersLists.
│ │ │ Set Implicit Arguments.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Functions over lists

│ │ │ +

Functions over lists

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ First, we provide sets as lists which are not necessarily sorted. │ │ │ The specs are proved under the additional condition of being sorted. │ │ │ And the functions returning sets are proved to preserve this invariant. │ │ │ @@ -60,15 +60,15 @@ │ │ │
│ │ │   Definition is_empty (l : t) := if l then true else false.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

The set operations.

│ │ │ +

The set operations.

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │   Fixpoint mem x s :=
│ │ │     match s with
│ │ │ @@ -268,15 +268,15 @@ │ │ │
│ │ │   Include Ops X.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Proofs of set operation specifications.

│ │ │ +

Proofs of set operation specifications.

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │   Section ForNotations.
│ │ │ │ │ │ @@ -596,15 +596,15 @@ │ │ │
│ │ │ End MakeRaw.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Encapsulation

│ │ │ +

Encapsulation

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Now, in order to really provide a functor implementing S, we │ │ │ need to encapsulate everything into a type of strictly ordered lists. │ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.MSets.MSetProperties.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Finite sets library

│ │ │ +

Finite sets library

│ │ │ │ │ │
│ │ │ │ │ │ This functor derives additional properties from MSetInterface.S. │ │ │ Contrary to the functor in MSetEqProperties it uses │ │ │ predicates over sets instead of sets operations, i.e. │ │ │ In x s instead of mem x s=true, │ │ │ @@ -302,30 +302,30 @@ │ │ │     remove_diff_singleton diff_inter_empty diff_inter_all Add_add Add_remove
│ │ │     Equal_remove add_add : set.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties of elements

│ │ │ +

Properties of elements

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │   Lemma elements_Empty : forall s, Empty s <-> elements s = nil.
│ │ │ │ │ │
│ │ │   Lemma elements_empty : elements empty = nil.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Conversions between lists and sets

│ │ │ +

Conversions between lists and sets

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │   Definition of_list (l : list elt) := List.fold_right add empty l.
│ │ │ │ │ │ @@ -341,15 +341,15 @@ │ │ │
│ │ │   Lemma of_list_3 : forall s, of_list (to_list s) [=] s.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Fold

│ │ │ +

Fold

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │   Section Fold.
│ │ │ │ │ │ @@ -369,15 +369,15 @@ │ │ │   Lemma fold_spec_right (s:t)(A:Type)(i:A)(f : elt -> A -> A) :
│ │ │     fold f s i = List.fold_right f i (rev (elements s)).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Induction principles for fold (contributed by S. Lescuyer)

│ │ │ +

Induction principles for fold (contributed by S. Lescuyer)

│ │ │ │ │ │
│ │ │ │ │ │ In the following lemma, the step hypothesis is deliberately restricted │ │ │ to the precise set s we are considering. │ │ │
│ │ │
│ │ │ @@ -475,15 +475,15 @@ │ │ │
│ │ │   Lemma fold_identity : forall s, fold add s empty [=] s.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Alternative (weaker) specifications for fold

│ │ │ +

Alternative (weaker) specifications for fold

│ │ │ │ │ │
│ │ │ │ │ │ When MSets was first designed, the order in which Ocaml's Set.fold │ │ │ takes the set elements was unspecified. This specification reflects │ │ │ this fact: │ │ │ │ │ │ @@ -547,15 +547,15 @@ │ │ │   Lemma fold_commutes : forall i s x,
│ │ │    eqA (fold f s (f x i)) (f x (fold f s i)).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Fold is a morphism

│ │ │ +

Fold is a morphism

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │   Lemma fold_init : forall i i' s, eqA i i' ->
│ │ │    eqA (fold f s i) (fold f s i').
│ │ │ @@ -564,15 +564,15 @@ │ │ │   Lemma fold_equal :
│ │ │    forall i s s', s[=]s' -> eqA (fold f s i) (fold f s' i).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Fold and other set operators

│ │ │ +

Fold and other set operators

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │   Lemma fold_empty : forall i, fold f empty i = i.
│ │ │ │ │ │ @@ -616,31 +616,31 @@ │ │ │
│ │ │   End Fold.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Cardinal

│ │ │ +

Cardinal

│ │ │ │ │ │
│ │ │ │ │ │ -

Characterization of cardinal in terms of fold

│ │ │ +

Characterization of cardinal in terms of fold

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │   Lemma cardinal_fold : forall s, cardinal s = fold (fun _ => S) s 0.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Old specifications for cardinal.

│ │ │ +

Old specifications for cardinal.

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │   Lemma cardinal_0 :
│ │ │      forall s, exists l : list elt,
│ │ │ @@ -655,15 +655,15 @@ │ │ │   Lemma cardinal_2 :
│ │ │     forall s s' x, ~ In x s -> Add x s s' -> cardinal s' = S (cardinal s).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Cardinal and (non-)emptiness

│ │ │ +

Cardinal and (non-)emptiness

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │   Lemma cardinal_Empty : forall s, Empty s <-> cardinal s = 0.
│ │ │ │ │ │ @@ -679,15 +679,15 @@ │ │ │   Lemma cardinal_inv_2b :
│ │ │    forall s, cardinal s <> 0 -> { x : elt | In x s }.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Cardinal is a morphism

│ │ │ +

Cardinal is a morphism

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │   Lemma Equal_cardinal : forall s s', s[=]s' -> cardinal s = cardinal s'.
│ │ │ │ │ │ @@ -697,15 +697,15 @@ │ │ │
│ │ │   Hint Resolve Add_add Add_remove Equal_remove cardinal_inv_1 Equal_cardinal : core.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Cardinal and set operators

│ │ │ +

Cardinal and set operators

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │   Lemma empty_cardinal : cardinal empty = 0.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.MSets.MSetRBT.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

MSetRBT : Implementation of MSetInterface via Red-Black trees

│ │ │ +

MSetRBT : Implementation of MSetInterface via Red-Black trees

│ │ │ │ │ │
│ │ │ │ │ │ Initial author: Andrew W. Appel, 2011. │ │ │ Extra modifications by: Pierre Letouzey │ │ │ │ │ │
│ │ │ @@ -119,27 +119,27 @@ │ │ │  Definition t := color.
│ │ │ End Color.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Ops : the pure functions

│ │ │ +

Ops : the pure functions

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module Ops (X:Orders.OrderedType) <: MSetInterface.Ops X.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Generic trees instantiated with color

│ │ │ +

Generic trees instantiated with color

│ │ │ │ │ │
│ │ │ │ │ │ We reuse a generic definition of trees where the information │ │ │ parameter is a color. Functions like mem or fold are also │ │ │ provided by this generic functor. │ │ │
│ │ │ @@ -151,27 +151,27 @@ │ │ │
│ │ │ Definition t := tree.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Basic tree

│ │ │ +

Basic tree

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition singleton (k: elt) : tree := Bk Leaf k Leaf.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Changing root color

│ │ │ +

Changing root color

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition makeBlack t :=
│ │ │  match t with
│ │ │ @@ -186,15 +186,15 @@ │ │ │  | Node _ a x b => Rd a x b
│ │ │  end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Balancing

│ │ │ +

Balancing

│ │ │ │ │ │
│ │ │ │ │ │ We adapt when one side is not a true red-black tree. │ │ │ Both sides have the same black depth. │ │ │
│ │ │
│ │ │ @@ -267,15 +267,15 @@ │ │ │    end
│ │ │  end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Insertion

│ │ │ +

Insertion

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Fixpoint ins x s :=
│ │ │  match s with
│ │ │ @@ -299,15 +299,15 @@ │ │ │
│ │ │ Definition add x s := makeBlack (ins x s).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Deletion

│ │ │ +

Deletion

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Fixpoint append (l:tree) : tree -> tree :=
│ │ │  match l with
│ │ │ @@ -359,15 +359,15 @@ │ │ │
│ │ │ Definition remove x t := makeBlack (del x t).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Removing minimal element

│ │ │ +

Removing minimal element

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Fixpoint delmin l x r : (elt * tree) :=
│ │ │  match l with
│ │ │ @@ -389,15 +389,15 @@ │ │ │    Some (k, makeBlack t)
│ │ │  end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Tree-ification

│ │ │ +

Tree-ification

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ We rebuild a tree of size if pred then n-1 else n as soon │ │ │ as the list l has enough elements │ │ │
│ │ │ @@ -452,15 +452,15 @@ │ │ │ Definition treeify (l:list elt) :=
│ │ │  fst (treeify_aux true (plength l) l).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Filtering

│ │ │ +

Filtering

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Fixpoint filter_aux (f: elt -> bool) s acc :=
│ │ │  match s with
│ │ │ @@ -490,15 +490,15 @@ │ │ │   let (ok,ko) := partition_aux f s nil nil in
│ │ │   (treeify ok, treeify ko).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Union, intersection, difference

│ │ │ +

Union, intersection, difference

│ │ │ │ │ │
│ │ │ │ │ │ union of the elements of l1 and l2 into a third acc list. │ │ │
│ │ │
│ │ │ │ │ │ @@ -650,15 +650,15 @@ │ │ │
│ │ │ End Ops.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

MakeRaw : the pure functions and their specifications

│ │ │ +

MakeRaw : the pure functions and their specifications

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module Type MakeRaw (X:Orders.OrderedType) <: MSetInterface.RawSets X.
│ │ │ Include Ops X.
│ │ │ @@ -686,30 +686,30 @@ │ │ │ Local Hint Resolve lt_tree_not_in lt_tree_trans gt_tree_not_in gt_tree_trans : core.
│ │ │ Local Hint Resolve elements_spec2 : core.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Singleton set

│ │ │ +

Singleton set

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma singleton_spec x y : InT y (singleton x) <-> X.eq y x.
│ │ │ │ │ │
│ │ │ Instance singleton_ok x : Ok (singleton x).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

makeBlack, MakeRed

│ │ │ +

makeBlack, MakeRed

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma makeBlack_spec s x : InT x (makeBlack s) <-> InT x s.
│ │ │ │ │ │ @@ -722,15 +722,15 @@ │ │ │
│ │ │ Instance makeRed_ok s `{Ok s} : Ok (makeRed s).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Generic handling for red-matching and red-red-matching

│ │ │ +

Generic handling for red-matching and red-red-matching

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition isblack t :=
│ │ │  match t with Bk _ _ _ => True | _ => False end.
│ │ │ @@ -847,15 +847,15 @@ │ │ │   r
│ │ │   (rbalS l x r).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Balancing for insertion

│ │ │ +

Balancing for insertion

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma lbal_spec l x r y :
│ │ │    InT y (lbal l x r) <-> X.eq y x \/ InT y l \/ InT y r.
│ │ │ @@ -890,15 +890,15 @@ │ │ │ Ltac autorew := autorewrite with rb.
│ │ │ Tactic Notation "autorew" "in" ident(H) := autorewrite with rb in H.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Insertion

│ │ │ +

Insertion

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma ins_spec : forall s x y,
│ │ │  InT y (ins x s) <-> X.eq y x \/ InT y s.
│ │ │ @@ -921,15 +921,15 @@ │ │ │
│ │ │ Instance add_ok s x `{Ok s} : Ok (add x s).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Balancing for deletion

│ │ │ +

Balancing for deletion

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma lbalS_spec l x r y :
│ │ │   InT y (lbalS l x r) <-> X.eq y x \/ InT y l \/ InT y r.
│ │ │ @@ -949,15 +949,15 @@ │ │ │
│ │ │ Hint Rewrite lbalS_spec rbalS_spec : rb.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Append for deletion

│ │ │ +

Append for deletion

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Ltac append_tac l r :=
│ │ │  induction l as [| lc ll _ lx lr IHlr];
│ │ │ @@ -1002,15 +1002,15 @@ │ │ │ Lemma append_ok : forall x l r `{Ok l, Ok r},
│ │ │  lt_tree x l -> gt_tree x r -> Ok (append l r).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Deletion

│ │ │ +

Deletion

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma del_spec : forall s x y `{Ok s},
│ │ │  InT y (del x s) <-> InT y s /\ ~X.eq y x.
│ │ │ @@ -1031,15 +1031,15 @@ │ │ │
│ │ │ Instance remove_ok s x `{Ok s} : Ok (remove x s).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Removing the minimal element

│ │ │ +

Removing the minimal element

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma delmin_spec l y r c x s' `{O : Ok (Node c l y r)} :
│ │ │  delmin l y r = (x,s') ->
│ │ │ @@ -1060,15 +1060,15 @@ │ │ │  | None => True
│ │ │  end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Treeify

│ │ │ +

Treeify

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Notation ifpred p n := (if p then pred n else n%nat).
│ │ │ │ │ │ @@ -1112,15 +1112,15 @@ │ │ │
│ │ │ Lemma treeify_ok l : sort X.lt l -> Ok (treeify l).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Filter

│ │ │ +

Filter

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ #[deprecated(since="8.11",note="Lemma filter_app has been moved to module List.")]
│ │ │ Notation filter_app := List.filter_app.
│ │ │ @@ -1141,15 +1141,15 @@ │ │ │
│ │ │ Instance filter_ok s f `(Ok s) : Ok (filter f s).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Partition

│ │ │ +

Partition

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma partition_aux_spec s f acc1 acc2 :
│ │ │  partition_aux f s acc1 acc2 =
│ │ │ @@ -1175,15 +1175,15 @@ │ │ │
│ │ │ Instance partition_ok2 s f `(Ok s) : Ok (snd (partition f s)).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

An invariant for binary list functions with accumulator.

│ │ │ +

An invariant for binary list functions with accumulator.

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Ltac inA :=
│ │ │  rewrite ?InA_app_iff, ?InA_cons, ?InA_nil, ?InA_rev in *; auto_tc.
│ │ │ @@ -1222,15 +1222,15 @@ │ │ │ Lemma INV_rev l1 l2 acc :
│ │ │  INV l1 l2 acc -> Sorted X.lt (rev_append l1 acc).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

union

│ │ │ +

union

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma union_list_ok l1 l2 acc :
│ │ │  INV l1 l2 acc -> sort X.lt (union_list l1 l2 acc).
│ │ │ @@ -1267,15 +1267,15 @@ │ │ │ Lemma union_spec : forall s1 s2 y `{Ok s1, Ok s2},
│ │ │  (InT y (union s1 s2) <-> InT y s1 \/ InT y s2).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

inter

│ │ │ +

inter

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma inter_list_ok l1 l2 acc :
│ │ │  INV l1 l2 acc -> sort X.lt (inter_list l1 l2 acc).
│ │ │ @@ -1304,15 +1304,15 @@ │ │ │ Lemma inter_spec s1 s2 y `{Ok s1, Ok s2} :
│ │ │  InT y (inter s1 s2) <-> InT y s1 /\ InT y s2.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

difference

│ │ │ +

difference

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma diff_list_ok l1 l2 acc :
│ │ │  INV l1 l2 acc -> sort X.lt (diff_list l1 l2 acc).
│ │ │ @@ -1350,15 +1350,15 @@ │ │ │
│ │ │ End MakeRaw.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Balancing properties

│ │ │ +

Balancing properties

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ We now prove that all operations preserve a red-black invariant, │ │ │ and that trees have hence a logarithmic depth. │ │ │ │ │ │ @@ -1371,15 +1371,15 @@ │ │ │
│ │ │ Import M.MX.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Red-Black invariants

│ │ │ +

Red-Black invariants

│ │ │ │ │ │
│ │ │ │ │ │ In a red-black tree : │ │ │
    │ │ │
  • a red node has no red children │ │ │ │ │ │ @@ -1442,15 +1442,15 @@ │ │ │
    │ │ │ Class Rbt (t:tree) := RBT : exists d, rbt d t.
    │ │ │ │ │ │
    │ │ │
│ │ │ │ │ │
│ │ │ -

Basic tactics and results about red-black

│ │ │ +

Basic tactics and results about red-black

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Scheme rbt_ind := Induction for rbt Sort Prop.
│ │ │ Local Hint Constructors rbt rrt arbt : core.
│ │ │ @@ -1477,15 +1477,15 @@ │ │ │
│ │ │ Local Hint Resolve arb_nrr_rb arb_nr_rb : core.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

A Red-Black tree has indeed a logarithmic depth

│ │ │ +

A Red-Black tree has indeed a logarithmic depth

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition redcarac s := rcase (fun _ _ _ => 1) (fun _ => 0) s.
│ │ │ │ │ │ @@ -1503,27 +1503,27 @@ │ │ │ Lemma maxdepth_lowerbound s : s<>Leaf ->
│ │ │  Nat.log2 (cardinal s) < maxdepth s.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Singleton

│ │ │ +

Singleton

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma singleton_rb x : Rbt (singleton x).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

makeBlack and makeRed

│ │ │ +

makeBlack and makeRed

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma makeBlack_rb n t : arbt n t -> Rbt (makeBlack t).
│ │ │ │ │ │ @@ -1531,15 +1531,15 @@ │ │ │ Lemma makeRed_rr t n :
│ │ │  rbt (S n) t -> notred t -> rrt n (makeRed t).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Balancing

│ │ │ +

Balancing

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma lbal_rb n l k r :
│ │ │  arbt n l -> rbt n r -> rbt (S n) (lbal l k r).
│ │ │ @@ -1568,15 +1568,15 @@ │ │ │ Lemma rbalS_arb n l x r :
│ │ │  rbt (S n) l -> arbt n r -> arbt (S n) (rbalS l x r).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Insertion

│ │ │ +

Insertion

│ │ │ │ │ │
│ │ │ │ │ │ The next lemmas combine simultaneous results about rbt and arbt. │ │ │ A first solution here: statement with if ... then ... else │ │ │
│ │ │
│ │ │ @@ -1600,15 +1600,15 @@ │ │ │
│ │ │ Instance add_rb x s : Rbt s -> Rbt (add x s).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Deletion

│ │ │ +

Deletion

│ │ │ │ │ │
│ │ │ │ │ │ A second approach here: statement with ... /\ ... │ │ │
│ │ │
│ │ │ │ │ │ @@ -1630,15 +1630,15 @@ │ │ │ with del_rb s x n : rbt n s -> notblack s -> rbt n (del x s).
│ │ │ Instance remove_rb s x : Rbt s -> Rbt (remove x s).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Treeify

│ │ │ +

Treeify

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition treeify_rb_invariant size depth (f:treeify_t) :=
│ │ │  forall acc,
│ │ │ @@ -1676,15 +1676,15 @@ │ │ │
│ │ │ Instance treeify_rb l : Rbt (treeify l).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Filtering

│ │ │ +

Filtering

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Instance filter_rb f s : Rbt (filter f s).
│ │ │ │ │ │ @@ -1694,15 +1694,15 @@ │ │ │
│ │ │ Instance partition_rb2 f s : Rbt (snd (partition f s)).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Union, intersection, difference

│ │ │ +

Union, intersection, difference

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Instance fold_add_rb s1 s2 : Rbt s2 -> Rbt (fold add s1 s2).
│ │ │ │ │ │ @@ -1721,15 +1721,15 @@ │ │ │
│ │ │ End BalanceProps.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Final Encapsulation

│ │ │ +

Final Encapsulation

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Now, in order to really provide a functor implementing S, we │ │ │ need to encapsulate everything into a type of binary search trees. │ │ │ They also happen to be well-balanced, but this has no influence │ │ ├── ./usr/share/doc/coq-theories/html/Coq.MSets.MSetToFiniteSet.html │ │ │ @@ -15,28 +15,28 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Finite sets library : conversion to old Finite_sets

│ │ │ +

Finite sets library : conversion to old Finite_sets

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Require Import Ensembles Finite_sets.
│ │ │ Require Import MSetInterface MSetProperties OrdersEx.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Going from MSets with usual Leibniz equality

│ │ │ +

Going from MSets with usual Leibniz equality

│ │ │ │ │ │ to the good old Ensembles and Finite_sets theory. │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module WS_to_Finite_set (U:UsualDecidableType)(M: WSetsOn U).
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.MSets.MSetWeakList.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Finite sets library

│ │ │ +

Finite sets library

│ │ │ │ │ │
│ │ │ │ │ │ This file proposes an implementation of the non-dependent │ │ │ interface MSetWeakInterface.S using lists without redundancy. │ │ │
│ │ │
│ │ │ @@ -32,25 +32,25 @@ │ │ │ Require Import MSetInterface.
│ │ │ Set Implicit Arguments.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Functions over lists

│ │ │ +

Functions over lists

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ First, we provide sets as lists which are (morally) without redundancy. │ │ │ The specs are proved under the additional condition of no redundancy. │ │ │ And the functions returning sets are proved to preserve this invariant. │ │ │
│ │ │ │ │ │ -

The set operations.

│ │ │ +

The set operations.

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module Ops (X: DecidableType) <: WOps X.
│ │ │ │ │ │ @@ -157,15 +157,15 @@ │ │ │
│ │ │ End Ops.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Proofs of set operation specifications.

│ │ │ +

Proofs of set operation specifications.

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module MakeRaw (X:DecidableType) <: WRawSets X.
│ │ │   Include Ops X.
│ │ │ @@ -384,15 +384,15 @@ │ │ │
│ │ │ End MakeRaw.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Encapsulation

│ │ │ +

Encapsulation

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Now, in order to really provide a functor implementing S, we │ │ │ need to encapsulate everything into a type of lists without redundancy. │ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.NArith.BinNat.html │ │ │ @@ -21,15 +21,15 @@ │ │ │  Equalities OrdersFacts GenericMinMax Bool NAxioms NMaxMin NProperties.
│ │ │ Require BinNatDef.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Binary natural numbers, operations and properties

│ │ │ +

Binary natural numbers, operations and properties

│ │ │ │ │ │
│ │ │ │ │ │ The type N and its constructors N0 and Npos are now │ │ │ defined in BinNums.v │ │ │
│ │ │ │ │ │ @@ -844,15 +844,15 @@ │ │ │
│ │ │ Lemma pred_div2_up p : Pos.pred_N (Pos.div2_up p) = div2 (Pos.pred_N p).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties of iter

│ │ │ +

Properties of iter

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma iter_swap_gen : forall A B (f:A -> B) (g:A -> A) (h:B -> B),
│ │ │  (forall a, f (g a) = h (f a)) -> forall n a,
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.NArith.BinNatDef.html │ │ │ @@ -24,56 +24,56 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Binary natural numbers, definitions of operations

│ │ │ +

Binary natural numbers, definitions of operations

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module N.
│ │ │ │ │ │
│ │ │ Definition t := N.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Nicer name N.pos for constructor Npos

│ │ │ +

Nicer name N.pos for constructor Npos

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Notation pos := Npos.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Constants

│ │ │ +

Constants

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition zero := 0.
│ │ │ Definition one := 1.
│ │ │ Definition two := 2.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Operation x -> 2*x+1

│ │ │ +

Operation x -> 2*x+1

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition succ_double x :=
│ │ │   match x with
│ │ │ @@ -81,15 +81,15 @@ │ │ │   | pos p => pos p~1
│ │ │   end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Operation x -> 2*x

│ │ │ +

Operation x -> 2*x

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition double n :=
│ │ │   match n with
│ │ │ @@ -97,15 +97,15 @@ │ │ │   | pos p => pos p~0
│ │ │   end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Successor

│ │ │ +

Successor

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition succ n :=
│ │ │   match n with
│ │ │ @@ -113,15 +113,15 @@ │ │ │   | pos p => pos (Pos.succ p)
│ │ │   end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Predecessor

│ │ │ +

Predecessor

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition pred n :=
│ │ │   match n with
│ │ │ @@ -129,15 +129,15 @@ │ │ │   | pos p => Pos.pred_N p
│ │ │   end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

The successor of a N can be seen as a positive

│ │ │ +

The successor of a N can be seen as a positive

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition succ_pos (n : N) : positive :=
│ │ │  match n with
│ │ │ @@ -145,15 +145,15 @@ │ │ │    | pos p => Pos.succ p
│ │ │  end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Addition

│ │ │ +

Addition

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition add n m :=
│ │ │   match n, m with
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.NArith.Nnat.html │ │ │ @@ -18,15 +18,15 @@ │ │ │
│ │ │ Require Import BinPos BinNat PeanoNat Pnat.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Conversions from N to nat

│ │ │ +

Conversions from N to nat

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module N2Nat.
│ │ │ │ │ │ @@ -118,15 +118,15 @@ │ │ │  N2Nat.id
│ │ │  : Nnat.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Conversions from nat to N

│ │ │ +

Conversions from nat to N

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module Nat2N.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Numbers.AltBinNotations.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Alternative Binary Numeral Notations

│ │ │ +

Alternative Binary Numeral Notations

│ │ │ │ │ │
│ │ │ │ │ │ Faster but less safe parsers and printers of positive, N, Z. │ │ │
│ │ │ │ │ │ By default, literals in types positive, N, Z are parsed and │ │ ├── ./usr/share/doc/coq-theories/html/Coq.Numbers.BinNums.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Binary Numerical Datatypes

│ │ │ +

Binary Numerical Datatypes

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Set Implicit Arguments.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Numbers.Cyclic.Abstract.CyclicAxioms.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Signature and specification of a bounded integer structure

│ │ │ +

Signature and specification of a bounded integer structure

│ │ │ │ │ │
│ │ │ │ │ │ This file specifies how to represent Z/nZ when n=2^d, │ │ │ d being the number of digits of these bounded integers. │ │ │
│ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Numbers.Cyclic.Abstract.NZCyclic.html │ │ │ @@ -23,15 +23,15 @@ │ │ │ Require Import CyclicAxioms.
│ │ │ Require Import Lia.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

From CyclicType to NZAxiomsSig

│ │ │ +

From CyclicType to NZAxiomsSig

│ │ │ │ │ │
│ │ │ │ │ │ A Z/nZ representation given by a module type CyclicType │ │ │ implements NZAxiomsSig, e.g. the common properties between │ │ │ N and Z with no ordering. Notice that the n in Z/nZ is │ │ │ a power of 2. │ │ ├── ./usr/share/doc/coq-theories/html/Coq.Numbers.Cyclic.Int31.Cyclic31.html │ │ │ @@ -18,15 +18,15 @@ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ This library has been deprecated since Coq version 8.10. │ │ │
│ │ │ │ │ │ -

Int31 numbers defines indeed a cyclic structure : Z/(2^31)Z

│ │ │ +

Int31 numbers defines indeed a cyclic structure : Z/(2^31)Z

│ │ │ │ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Author: Arnaud Spiwack (+ Pierre Letouzey) │ │ │ @@ -54,15 +54,15 @@ │ │ │
│ │ │ Section Basics.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Basic results about iszero, shiftl, shiftr

│ │ │ +

Basic results about iszero, shiftl, shiftr

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │  Lemma iszero_eq0 : forall x, iszero x = true -> x=0.
│ │ │ │ │ │ @@ -85,15 +85,15 @@ │ │ │  Lemma twice_or_twice_plus_one : forall x,
│ │ │   x = twice (shiftr x) \/ x = twice_plus_one (shiftr x).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Iterated shift to the right

│ │ │ +

Iterated shift to the right

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │  Definition nshiftr x := nat_rect _ x (fun _ => shiftr).
│ │ │ │ │ │ @@ -115,15 +115,15 @@ │ │ │  Lemma nshiftr_above_size : forall k x, size<=k ->
│ │ │   nshiftr x k = 0.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Iterated shift to the left

│ │ │ +

Iterated shift to the left

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │  Definition nshiftl x := nat_rect _ x (fun _ => shiftl).
│ │ │ │ │ │ @@ -173,15 +173,15 @@ │ │ │  Lemma nshiftr_0_firstl : forall n x, n < size ->
│ │ │   nshiftr x n = 0 -> firstl x = D0.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Some induction principles over int31

│ │ │ +

Some induction principles over int31

│ │ │ │ │ │
│ │ │ │ │ │ Not used for the moment. Are they really useful ? │ │ │
│ │ │
│ │ │ │ │ │ @@ -198,15 +198,15 @@ │ │ │   (forall x, P x -> P (twice_plus_one x)) ->
│ │ │   forall x, P x.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Some generic results about recr

│ │ │ +

Some generic results about recr

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │  Section Recr.
│ │ │ │ │ │ @@ -273,15 +273,15 @@ │ │ │
│ │ │  End Recr.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Incrementation

│ │ │ +

Incrementation

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │  Section Incr.
│ │ │ │ │ │ @@ -342,15 +342,15 @@ │ │ │
│ │ │  End Incr.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Conversion to Z : the phi function

│ │ │ +

Conversion to Z : the phi function

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │  Section Phi.
│ │ │ │ │ │ @@ -433,15 +433,15 @@ │ │ │  Lemma phi_lowerbound :
│ │ │   forall x, firstl x = D1 -> (2^(Z.of_nat (pred size)) <= phi x)%Z.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Equivalence modulo 2^n

│ │ │ +

Equivalence modulo 2^n

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │  Section EqShiftL.
│ │ │ │ │ │ @@ -475,15 +475,15 @@ │ │ │  Lemma EqShiftL_twice : forall k x y,
│ │ │   EqShiftL k (twice x) (twice y) <-> EqShiftL (S k) x y.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

From int31 to list of digits.

│ │ │ +

From int31 to list of digits.

│ │ │ │ │ │
│ │ │ │ │ │ Lower (=rightmost) bits comes first. │ │ │
│ │ │
│ │ │ │ │ │ @@ -571,15 +571,15 @@ │ │ │
│ │ │  End EqShiftL.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

More equations about incr

│ │ │ +

More equations about incr

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │  Lemma incr_twice_plus_one :
│ │ │   forall x, incr (twice_plus_one x) = twice (incr x).
│ │ │ @@ -591,15 +591,15 @@ │ │ │  Lemma incr_inv : forall x y,
│ │ │   incr x = twice_plus_one y -> x = twice y.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Conversion from Z : the phi_inv function

│ │ │ +

Conversion from Z : the phi_inv function

│ │ │ │ │ │
│ │ │ │ │ │ First, recursive equations │ │ │
│ │ │
│ │ │ │ │ │ @@ -639,15 +639,15 @@ │ │ │
│ │ │ The other composition phi o phi_inv is harder to prove correct. │ │ │ In particular, an overflow can happen, so a modulo is needed. │ │ │ For the moment, we proceed via several steps, the first one │ │ │ being a detour to positive_to_in31. │ │ │
│ │ │ │ │ │ -

positive_to_int31

│ │ │ +

positive_to_int31

│ │ │ │ │ │
│ │ │ │ │ │ A variant of p2i with twice and twice_plus_one instead of │ │ │ 2*i and 2*i+1 │ │ │
│ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Numbers.Cyclic.Int31.Int31.html │ │ │ @@ -31,15 +31,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

31-bit integers

│ │ │ +

31-bit integers

│ │ │ │ │ │
│ │ │ │ │ │ This file contains basic definitions of a 31-bit integer │ │ │ arithmetic. In fact it is more general than that. The only reason │ │ │ for this use of 31 is the underlying mechanism for hardware-efficient │ │ │ computations by A. Spiwack. Apart from this, a switch to, say, │ │ │ @@ -92,15 +92,15 @@ │ │ │ Delimit Scope int31_scope with int31.
│ │ │ Local Open Scope int31_scope.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Constants

│ │ │ +

Constants

│ │ │ │ │ │
│ │ │ │ │ │ Zero is I31 D0 ... D0 │ │ │
│ │ │
│ │ │ Definition On : int31 := Eval compute in napply_cst _ _ D0 size I31.
│ │ │ @@ -132,15 +132,15 @@ │ │ │
│ │ │ Definition Twon : int31 := Eval compute in (napply_cst _ _ D0 (size-2) I31) D1 D0.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Bits manipulation

│ │ │ +

Bits manipulation

│ │ │ │ │ │
│ │ │ │ │ │ sneakr b x shifts x to the right by one bit. │ │ │ Rightmost digit is lost while leftmost digit becomes b. │ │ │ Pseudo-code is │ │ │ match x with (I31 d0 ... dN) => I31 b d0 ... d(N-1) end │ │ │ @@ -239,15 +239,15 @@ │ │ │ Definition base := Eval compute in
│ │ │  iter_nat size Z Z.double 1%Z.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Recursors

│ │ │ +

Recursors

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Fixpoint recl_aux (n:nat)(A:Type)(case0:A)(caserec:digits->int31->A->A)
│ │ │  (i:int31) : A :=
│ │ │ @@ -278,15 +278,15 @@ │ │ │ Definition recl := recl_aux size.
│ │ │ Definition recr := recr_aux size.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Conversions

│ │ │ +

Conversions

│ │ │ │ │ │
│ │ │ │ │ │ From int31 to Z, we simply iterates Z.double or Z.succ_double. │ │ │
│ │ │
│ │ │ │ │ │ @@ -401,15 +401,15 @@ │ │ │ Definition phi2 nh nl :=
│ │ │   ((phi nh)*base+(phi nl))%Z.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Addition

│ │ │ +

Addition

│ │ │ │ │ │
│ │ │ │ │ │ Addition modulo 2^31 │ │ │
│ │ │
│ │ │ │ │ │ @@ -453,15 +453,15 @@ │ │ │   | _ => C1 npmpone
│ │ │   end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Subtraction

│ │ │ +

Subtraction

│ │ │ │ │ │
│ │ │ │ │ │ Subtraction modulo 2^31 │ │ │
│ │ │
│ │ │ │ │ │ @@ -542,15 +542,15 @@ │ │ │ Definition mul31c (n m : int31) := phi_inv2 ((phi n)*(phi m)).
│ │ │ Notation "n '*c' m" := (mul31c n m) (at level 40, no associativity) : int31_scope.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Division

│ │ │ +

Division

│ │ │ │ │ │
│ │ │ │ │ │ Division of a double size word modulo 2^31 │ │ │
│ │ │
│ │ │ │ │ │ @@ -573,15 +573,15 @@ │ │ │   (phi_inv q, phi_inv r).
│ │ │ Notation "n / m" := (div31 n m) : int31_scope.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Unsigned comparison

│ │ │ +

Unsigned comparison

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition compare31 (n m : int31) := ((phi n)?=(phi m))%Z.
│ │ │ Notation "n ?= m" := (compare31 n m) (at level 70, no associativity) : int31_scope.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Numbers.Cyclic.Int31.Ring31.html │ │ │ @@ -18,15 +18,15 @@ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ This library has been deprecated since Coq version 8.10. │ │ │
│ │ │ │ │ │ -

Int31 numbers defines Z/(2^31)Z, and can hence be equipped

│ │ │ +

Int31 numbers defines Z/(2^31)Z, and can hence be equipped

│ │ │ │ │ │ with a ring structure and a ring tactic │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Require Import Lia Int31 Cyclic31 CyclicAxioms.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Numbers.Cyclic.Int63.Cyclic63.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Int63 numbers defines indeed a cyclic structure : Z/(2^31)Z

│ │ │ +

Int63 numbers defines indeed a cyclic structure : Z/(2^31)Z

│ │ │ │ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Author: Arnaud Spiwack (+ Pierre Letouzey) │ │ ├── ./usr/share/doc/coq-theories/html/Coq.Numbers.Cyclic.Int63.Ring63.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Int63 numbers defines Z/(2^63)Z, and can hence be equipped

│ │ │ +

Int63 numbers defines Z/(2^63)Z, and can hence be equipped

│ │ │ │ │ │ with a ring structure and a ring tactic │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Require Import Cyclic63 CyclicAxioms.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Numbers.Cyclic.ZModulo.ZModulo.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Type Z viewed modulo a particular constant corresponds to Z/nZ

│ │ │ +

Type Z viewed modulo a particular constant corresponds to Z/nZ

│ │ │ │ │ │ as defined abstractly in CyclicAxioms. │ │ │
│ │ │ │ │ │ Even if the construction provided here is not reused for building │ │ │ the efficient arbitrary precision numbers, it provides a simple │ │ │ implementation of CyclicAxioms, hence ensuring its coherence. │ │ ├── ./usr/share/doc/coq-theories/html/Coq.Numbers.DecimalFacts.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

DecimalFacts : some facts about Decimal numbers

│ │ │ +

DecimalFacts : some facts about Decimal numbers

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Require Import Decimal Arith.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Numbers.DecimalN.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

DecimalN

│ │ │ +

DecimalN

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Proofs that conversions between decimal numbers and N │ │ │ are bijections │ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Numbers.DecimalNat.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

DecimalNat

│ │ │ +

DecimalNat

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Proofs that conversions between decimal numbers and nat │ │ │ are bijections. │ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Numbers.DecimalPos.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

DecimalPos

│ │ │ +

DecimalPos

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Proofs that conversions between decimal numbers and positive │ │ │ are bijections. │ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Numbers.DecimalQ.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

DecimalQ

│ │ │ +

DecimalQ

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Proofs that conversions between decimal numbers and Q │ │ │ are bijections. │ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Numbers.DecimalString.html │ │ │ @@ -18,15 +18,15 @@ │ │ │
│ │ │ Require Import Decimal Ascii String.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Conversion between decimal numbers and Coq strings

│ │ │ +

Conversion between decimal numbers and Coq strings

│ │ │ │ │ │
│ │ │ │ │ │ Pretty straightforward, which is precisely the point of the │ │ │ Decimal.int datatype. The only catch is Decimal.Nil : we could │ │ │ choose to convert it as "" or as "0". In the first case, it is │ │ │ awkward to consider "" (or "-") as a number, while in the second case │ │ ├── ./usr/share/doc/coq-theories/html/Coq.Numbers.DecimalZ.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

DecimalZ

│ │ │ +

DecimalZ

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Proofs that conversions between decimal numbers and Z │ │ │ are bijections. │ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Numbers.HexadecimalFacts.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

HexadecimalFacts : some facts about Hexadecimal numbers

│ │ │ +

HexadecimalFacts : some facts about Hexadecimal numbers

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Require Import Hexadecimal Arith.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Numbers.HexadecimalN.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

HexadecimalN

│ │ │ +

HexadecimalN

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Proofs that conversions between hexadecimal numbers and N │ │ │ are bijections │ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Numbers.HexadecimalNat.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

HexadecimalNat

│ │ │ +

HexadecimalNat

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Proofs that conversions between hexadecimal numbers and nat │ │ │ are bijections. │ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Numbers.HexadecimalPos.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

HexadecimalPos

│ │ │ +

HexadecimalPos

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Proofs that conversions between hexadecimal numbers and positive │ │ │ are bijections. │ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Numbers.HexadecimalQ.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

HexadecimalQ

│ │ │ +

HexadecimalQ

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Proofs that conversions between hexadecimal numbers and Q │ │ │ are bijections. │ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Numbers.HexadecimalString.html │ │ │ @@ -18,15 +18,15 @@ │ │ │
│ │ │ Require Import Hexadecimal Ascii String.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Conversion between hexadecimal numbers and Coq strings

│ │ │ +

Conversion between hexadecimal numbers and Coq strings

│ │ │ │ │ │
│ │ │ │ │ │ Pretty straightforward, which is precisely the point of the │ │ │ Hexadecimal.int datatype. The only catch is Hexadecimal.Nil : we could │ │ │ choose to convert it as "" or as "0". In the first case, it is │ │ │ awkward to consider "" (or "-") as a number, while in the second case │ │ ├── ./usr/share/doc/coq-theories/html/Coq.Numbers.HexadecimalZ.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

HexadecimalZ

│ │ │ +

HexadecimalZ

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Proofs that conversions between hexadecimal numbers and Z │ │ │ are bijections. │ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Numbers.Integer.Abstract.ZBits.html │ │ │ @@ -430,15 +430,15 @@ │ │ │  ((exists n, forall m, 0<=m -> f m = n.[m]) <->
│ │ │   (exists k, forall m, k<=m -> f m = f k)).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties of shifts

│ │ │ +

Properties of shifts

│ │ │ │ │ │
│ │ │ │ │ │ First, a unified specification for shiftl : the shiftl_spec │ │ │ below (combined with testbit_neg_r) is equivalent to │ │ │ shiftl_spec_low and shiftl_spec_high. │ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Numbers.Integer.Abstract.ZDivEucl.html │ │ │ @@ -18,15 +18,15 @@ │ │ │
│ │ │ Require Import ZAxioms ZMulOrder ZSgnAbs NZDiv.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Euclidean Division for integers, Euclid convention

│ │ │ +

Euclidean Division for integers, Euclid convention

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ We use here the "usual" formulation of the Euclid Theorem │ │ │ forall a b, b<>0 -> exists r q, a = b*q+r /\ 0 <= r < |b| │ │ │ │ │ │ @@ -208,15 +208,15 @@ │ │ │
│ │ │ Theorem mod_small: forall a b, 0<=a<b -> a mod b == a.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Basic values of divisions and modulo.

│ │ │ +

Basic values of divisions and modulo.

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma div_0_l: forall a, a~=0 -> 0/a == 0.
│ │ │ │ │ │ @@ -244,15 +244,15 @@ │ │ │
│ │ │ Theorem div_unique_exact a b q: b~=0 -> a == b*q -> q == a/b.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Order results about mod and div

│ │ │ +

Order results about mod and div

│ │ │ │ │ │
│ │ │ │ │ │ A modulo cannot grow beyond its starting point. │ │ │
│ │ │
│ │ │ │ │ │ @@ -373,15 +373,15 @@ │ │ │
│ │ │ Lemma div_le_compat_l: forall p q r, 0<=p -> 0<q<=r -> p/r <= p/q.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Relations between usual operations and mod and div

│ │ │ +

Relations between usual operations and mod and div

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma mod_add : forall a b c, c~=0 ->
│ │ │  (a + b * c) mod c == a mod c.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Numbers.Integer.Abstract.ZDivFloor.html │ │ │ @@ -18,15 +18,15 @@ │ │ │
│ │ │ Require Import ZAxioms ZMulOrder ZSgnAbs NZDiv.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Euclidean Division for integers (Floor convention)

│ │ │ +

Euclidean Division for integers (Floor convention)

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ We use here the convention known as Floor, or Round-Toward-Bottom, │ │ │ where a/b is the closest integer below the exact fraction. │ │ │ It can be summarized by: │ │ │ @@ -250,15 +250,15 @@ │ │ │
│ │ │ Theorem mod_small: forall a b, 0<=a<b -> a mod b == a.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Basic values of divisions and modulo.

│ │ │ +

Basic values of divisions and modulo.

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma div_0_l: forall a, a~=0 -> 0/a == 0.
│ │ │ │ │ │ @@ -286,15 +286,15 @@ │ │ │
│ │ │ Theorem div_unique_exact a b q: b~=0 -> a == b*q -> q == a/b.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Order results about mod and div

│ │ │ +

Order results about mod and div

│ │ │ │ │ │
│ │ │ │ │ │ A modulo cannot grow beyond its starting point. │ │ │
│ │ │
│ │ │ │ │ │ @@ -423,15 +423,15 @@ │ │ │
│ │ │ Lemma div_le_compat_l: forall p q r, 0<=p -> 0<q<=r -> p/r <= p/q.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Relations between usual operations and mod and div

│ │ │ +

Relations between usual operations and mod and div

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma mod_add : forall a b c, c~=0 ->
│ │ │  (a + b * c) mod c == a mod c.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Numbers.Integer.Abstract.ZDivTrunc.html │ │ │ @@ -18,15 +18,15 @@ │ │ │
│ │ │ Require Import ZAxioms ZMulOrder ZSgnAbs NZDiv.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Euclidean Division for integers (Trunc convention)

│ │ │ +

Euclidean Division for integers (Trunc convention)

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ We use here the convention known as Trunc, or Round-Toward-Zero, │ │ │ where a/b is the integer with the largest absolute value to │ │ │ be between zero and the exact fraction. It can be summarized by: │ │ │ @@ -175,15 +175,15 @@ │ │ │
│ │ │ Theorem rem_small: forall a b, 0<=a<b -> a rem b == a.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Basic values of divisions and modulo.

│ │ │ +

Basic values of divisions and modulo.

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma quot_0_l: forall a, a~=0 -> 0÷a == 0.
│ │ │ │ │ │ @@ -273,15 +273,15 @@ │ │ │ Lemma rem_bound_abs :
│ │ │  forall a b, b~=0 -> abs (a rem b) < abs b.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Order results about rem and quot

│ │ │ +

Order results about rem and quot

│ │ │ │ │ │
│ │ │ │ │ │ A modulo cannot grow beyond its starting point. │ │ │
│ │ │
│ │ │ │ │ │ @@ -408,15 +408,15 @@ │ │ │
│ │ │ Lemma quot_le_compat_l: forall p q r, 0<=p -> 0<q<=r -> p÷r <= p÷q.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Relations between usual operations and rem and quot

│ │ │ +

Relations between usual operations and rem and quot

│ │ │ │ │ │
│ │ │ │ │ │ Unlike with other division conventions, some results here aren't │ │ │ always valid, and need to be restricted. For instance │ │ │ (a+b*c) rem c <> a rem c for a=9,b=-5,c=2 │ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Numbers.Integer.Abstract.ZLcm.html │ │ │ @@ -18,15 +18,15 @@ │ │ │
│ │ │ Require Import ZAxioms ZMulOrder ZSgnAbs ZGcd ZDivTrunc ZDivFloor.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Least Common Multiple

│ │ │ +

Least Common Multiple

│ │ │ │ │ │
│ │ │ │ │ │ Unlike other functions around, we will define lcm below instead of │ │ │ axiomatizing it. Indeed, there is no "prior art" about lcm in the │ │ │ standard library to be compliant with, and the generic definition │ │ │ of lcm via gcd is quite reasonable. │ │ ├── ./usr/share/doc/coq-theories/html/Coq.Numbers.Integer.Abstract.ZMaxMin.html │ │ │ @@ -18,15 +18,15 @@ │ │ │
│ │ │ Require Import ZAxioms ZMulOrder GenericMinMax.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties of minimum and maximum specific to integer numbers

│ │ │ +

Properties of minimum and maximum specific to integer numbers

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module Type ZMaxMinProp (Import Z : ZAxiomsMiniSig').
│ │ │ Include ZMulOrderProp Z.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Numbers.Integer.Binary.ZBinary.html │ │ │ @@ -35,15 +35,15 @@ │ │ │  <: UsualDecidableTypeFull
│ │ │  := BinInt.Z.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

An order tactic for integers

│ │ │ +

An order tactic for integers

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Ltac z_order := Z.order.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Numbers.NaryFunctions.html │ │ │ @@ -21,15 +21,15 @@ │ │ │
│ │ │ Require Import List.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Generic dependently-typed operators about n-ary functions

│ │ │ +

Generic dependently-typed operators about n-ary functions

│ │ │ │ │ │
│ │ │ │ │ │ The type of n-ary function: nfun A n B is │ │ │ A -> ... -> A -> B with n occurrences of A in this type. │ │ │
│ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Numbers.NatInt.NZDiv.html │ │ │ @@ -140,15 +140,15 @@ │ │ │
│ │ │ Theorem mod_small: forall a b, 0<=a<b -> a mod b == a.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Basic values of divisions and modulo.

│ │ │ +

Basic values of divisions and modulo.

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma div_0_l: forall a, 0<a -> 0/a == 0.
│ │ │ │ │ │ @@ -173,15 +173,15 @@ │ │ │
│ │ │ Lemma mod_mul : forall a b, 0<=a -> 0<b -> (a*b) mod b == 0.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Order results about mod and div

│ │ │ +

Order results about mod and div

│ │ │ │ │ │
│ │ │ │ │ │ A modulo cannot grow beyond its starting point. │ │ │
│ │ │
│ │ │ │ │ │ @@ -285,15 +285,15 @@ │ │ │ Lemma div_le_compat_l: forall p q r, 0<=p -> 0<q<=r ->
│ │ │     p/r <= p/q.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Relations between usual operations and mod and div

│ │ │ +

Relations between usual operations and mod and div

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma mod_add : forall a b c, 0<=a -> 0<=a+b*c -> 0<c ->
│ │ │  (a + b * c) mod c == a mod c.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Numbers.NatInt.NZDomain.html │ │ │ @@ -40,15 +40,15 @@ │ │ │ Module NZDomainProp (Import NZ:NZDomainSig').
│ │ │ Include NZBaseProp NZ.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Relationship between points thanks to succ and pred.

│ │ │ +

Relationship between points thanks to succ and pred.

│ │ │ │ │ │
│ │ │ │ │ │ For any two points, one is an iterated successor of the other. │ │ │
│ │ │
│ │ │ │ │ │ @@ -91,15 +91,15 @@ │ │ │ Lemma itersucc0_or_iterpred0 :
│ │ │  forall n, exists p:nat, n == (S^p) 0 \/ n == (P^p) 0.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Study of initial point w.r.t. succ (if any).

│ │ │ +

Study of initial point w.r.t. succ (if any).

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition initial n := forall m, n ~= S m.
│ │ │ │ │ │ @@ -215,15 +215,15 @@ │ │ │
│ │ │ │ │ │ IIa) if exists k<>O, 0 == S^k 0, then we have a cyclic structure Z/nZ │ │ │ IIb) otherwise, we have Z │ │ │ │ │ │
│ │ │ │ │ │ -

An alternative induction principle using S and P.

│ │ │ +

An alternative induction principle using S and P.

│ │ │ │ │ │
│ │ │ │ │ │ It is weaker than bi_induction. For instance it cannot prove that │ │ │ we can go from one point by many S or many P, but only by many │ │ │ S mixed with many P. Think of a model with two copies of N: │ │ ├── ./usr/share/doc/coq-theories/html/Coq.Numbers.NatInt.NZLog.html │ │ │ @@ -383,15 +383,15 @@ │ │ │  (Import E : NZPowProp A B D)
│ │ │  (Import F : NZLog2Prop A B C D E).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

log2_up : a binary logarithm that rounds up instead of down

│ │ │ +

log2_up : a binary logarithm that rounds up instead of down

│ │ │ │ │ │
│ │ │ │ │ │ For once, we define instead of axiomatizing, thanks to log2 │ │ │
│ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Numbers.NatInt.NZSqrt.html │ │ │ @@ -312,15 +312,15 @@ │ │ │  (Import C : NZMulOrderProp A)
│ │ │  (Import D : NZSqrtProp A B C).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

sqrt_up : a square root that rounds up instead of down

│ │ │ +

sqrt_up : a square root that rounds up instead of down

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ │ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Numbers.Natural.Abstract.NDiv.html │ │ │ @@ -124,15 +124,15 @@ │ │ │
│ │ │ Theorem mod_small: forall a b, a<b -> a mod b == a.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Basic values of divisions and modulo.

│ │ │ +

Basic values of divisions and modulo.

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma div_0_l: forall a, a~=0 -> 0/a == 0.
│ │ │ │ │ │ @@ -157,15 +157,15 @@ │ │ │
│ │ │ Lemma mod_mul : forall a b, b~=0 -> (a*b) mod b == 0.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Order results about mod and div

│ │ │ +

Order results about mod and div

│ │ │ │ │ │
│ │ │ │ │ │ A modulo cannot grow beyond its starting point. │ │ │
│ │ │
│ │ │ │ │ │ @@ -255,15 +255,15 @@ │ │ │
│ │ │ Lemma div_le_compat_l: forall p q r, 0<q<=r -> p/r <= p/q.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Relations between usual operations and mod and div

│ │ │ +

Relations between usual operations and mod and div

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma mod_add : forall a b c, c~=0 ->
│ │ │  (a + b * c) mod c == a mod c.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Numbers.Natural.Abstract.NLcm.html │ │ │ @@ -18,15 +18,15 @@ │ │ │
│ │ │ Require Import NAxioms NSub NDiv NGcd.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Least Common Multiple

│ │ │ +

Least Common Multiple

│ │ │ │ │ │
│ │ │ │ │ │ Unlike other functions around, we will define lcm below instead of │ │ │ axiomatizing it. Indeed, there is no "prior art" about lcm in the │ │ │ standard library to be compliant with, and the generic definition │ │ │ of lcm via gcd is quite reasonable. │ │ ├── ./usr/share/doc/coq-theories/html/Coq.Numbers.Natural.Abstract.NMaxMin.html │ │ │ @@ -18,15 +18,15 @@ │ │ │
│ │ │ Require Import NAxioms NSub GenericMinMax.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties of minimum and maximum specific to natural numbers

│ │ │ +

Properties of minimum and maximum specific to natural numbers

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module Type NMaxMinProp (Import N : NAxiomsMiniSig').
│ │ │ Include NSubProp N.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Numbers.Natural.Binary.NBinary.html │ │ │ @@ -23,15 +23,15 @@ │ │ │
│ │ │ Local Open Scope N_scope.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

BinNat.N already implements NAxiomSig

│ │ │ +

BinNat.N already implements NAxiomSig

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module N <: NAxiomsSig := N.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.PArith.BinPos.html │ │ │ @@ -23,15 +23,15 @@ │ │ │
│ │ │ Require Export BinPosDef.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Binary positive numbers, operations and properties

│ │ │ +

Binary positive numbers, operations and properties

│ │ │ │ │ │
│ │ │ │ │ │ Initial development by Pierre Crégut, CNET, Lannion, France │ │ │
│ │ │ │ │ │ The type positive and its constructors xI and xO and xH │ │ │ @@ -57,15 +57,15 @@ │ │ │  <: UsualDecidableTypeFull
│ │ │  <: TotalOrder.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Definitions of operations, now in a separate file

│ │ │ +

Definitions of operations, now in a separate file

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Include BinPosDef.Pos.
│ │ │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Logical Predicates

│ │ │ +

Logical Predicates

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition eq := @Logic.eq positive.
│ │ │ Definition eq_equiv := @eq_equivalence positive.
│ │ │ @@ -111,50 +111,50 @@ │ │ │ Notation "x < y < z" := (x < y /\ y < z) : positive_scope.
│ │ │ Notation "x < y <= z" := (x < y /\ y <= z) : positive_scope.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties of operations over positive numbers

│ │ │ +

Properties of operations over positive numbers

│ │ │ │ │ │
│ │ │ │ │ │ -

Decidability of equality on binary positive numbers

│ │ │ +

Decidability of equality on binary positive numbers

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma eq_dec : forall x y:positive, {x = y} + {x <> y}.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties of successor on binary positive numbers

│ │ │ +

Properties of successor on binary positive numbers

│ │ │ │ │ │
│ │ │ │ │ │ -

Specification of xI in term of succ and xO

│ │ │ +

Specification of xI in term of succ and xO

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma xI_succ_xO p : p~1 = succ p~0.
│ │ │ │ │ │
│ │ │ Lemma succ_discr p : p <> succ p.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Successor and double

│ │ │ +

Successor and double

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma pred_double_spec p : pred_double p = pred (p~0).
│ │ │ │ │ │ @@ -170,15 +170,15 @@ │ │ │
│ │ │ Lemma pred_double_xO_discr p : pred_double p <> p~0.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Successor and predecessor

│ │ │ +

Successor and predecessor

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma succ_not_1 p : succ p <> 1.
│ │ │ │ │ │ @@ -191,107 +191,107 @@ │ │ │
│ │ │ Lemma succ_pred p : p <> 1 -> succ (pred p) = p.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Injectivity of successor

│ │ │ +

Injectivity of successor

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma succ_inj p q : succ p = succ q -> p = q.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Predecessor to N

│ │ │ +

Predecessor to N

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma pred_N_succ p : pred_N (succ p) = Npos p.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties of addition on binary positive numbers

│ │ │ +

Properties of addition on binary positive numbers

│ │ │ │ │ │
│ │ │ │ │ │ -

Specification of succ in term of add

│ │ │ +

Specification of succ in term of add

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma add_1_r p : p + 1 = succ p.
│ │ │ │ │ │
│ │ │ Lemma add_1_l p : 1 + p = succ p.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Specification of add_carry

│ │ │ +

Specification of add_carry

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Theorem add_carry_spec p q : add_carry p q = succ (p + q).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Commutativity

│ │ │ +

Commutativity

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Theorem add_comm p q : p + q = q + p.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Permutation of add and succ

│ │ │ +

Permutation of add and succ

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Theorem add_succ_r p q : p + succ q = succ (p + q).
│ │ │ │ │ │
│ │ │ Theorem add_succ_l p q : succ p + q = succ (p + q).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

No neutral elements for addition

│ │ │ +

No neutral elements for addition

│ │ │ │ │ │
│ │ │
│ │ │ Lemma add_no_neutral p q : q + p <> p.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Simplification

│ │ │ +

Simplification

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma add_carry_add p q r s :
│ │ │   add_carry p r = add_carry q s -> p + r = q + s.
│ │ │ @@ -316,27 +316,27 @@ │ │ │ Lemma add_carry_reg_l p q r :
│ │ │   add_carry p q = add_carry p r -> q = r.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Addition is associative

│ │ │ +

Addition is associative

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Theorem add_assoc p q r : p + (q + r) = p + q + r.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Commutation of addition and double

│ │ │ +

Commutation of addition and double

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma add_xO p q : (p + q)~0 = p~0 + q~0.
│ │ │ │ │ │ @@ -348,27 +348,27 @@ │ │ │ Lemma add_xO_pred_double p q :
│ │ │   pred_double (p + q) = p~0 + pred_double q.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Miscellaneous

│ │ │ +

Miscellaneous

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma add_diag p : p + p = p~0.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Peano induction and recursion on binary positive positive numbers

│ │ │ +

Peano induction and recursion on binary positive positive numbers

│ │ │ │ │ │
│ │ │ │ │ │ The Peano-like recursor function for positive (due to Daniel Schepler) │ │ │
│ │ │
│ │ │ │ │ │ @@ -478,61 +478,61 @@ │ │ │ Lemma peano_equiv (P:positive->Type) (a:P 1) (f:forall p, P p -> P (succ p)) p :
│ │ │    PeanoView_iter P a f p (peanoView p) = peano_rect P a f p.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties of multiplication on binary positive numbers

│ │ │ +

Properties of multiplication on binary positive numbers

│ │ │ │ │ │
│ │ │ │ │ │ -

One is neutral for multiplication

│ │ │ +

One is neutral for multiplication

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma mul_1_l p : 1 * p = p.
│ │ │ │ │ │
│ │ │ Lemma mul_1_r p : p * 1 = p.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Right reduction properties for multiplication

│ │ │ +

Right reduction properties for multiplication

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma mul_xO_r p q : p * q~0 = (p * q)~0.
│ │ │ │ │ │
│ │ │ Lemma mul_xI_r p q : p * q~1 = p + (p * q)~0.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Commutativity of multiplication

│ │ │ +

Commutativity of multiplication

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Theorem mul_comm p q : p * q = q * p.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Distributivity of multiplication over addition

│ │ │ +

Distributivity of multiplication over addition

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Theorem mul_add_distr_l p q r :
│ │ │   p * (q + r) = p * q + p * r.
│ │ │ @@ -541,57 +541,57 @@ │ │ │ Theorem mul_add_distr_r p q r :
│ │ │   (p + q) * r = p * r + q * r.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Associativity of multiplication

│ │ │ +

Associativity of multiplication

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Theorem mul_assoc p q r : p * (q * r) = p * q * r.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Successor and multiplication

│ │ │ +

Successor and multiplication

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma mul_succ_l p q : (succ p) * q = q + p * q.
│ │ │ │ │ │
│ │ │ Lemma mul_succ_r p q : p * (succ q) = p + p * q.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Parity properties of multiplication

│ │ │ +

Parity properties of multiplication

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma mul_xI_mul_xO_discr p q r : p~1 * r <> q~0 * r.
│ │ │ │ │ │
│ │ │ Lemma mul_xO_discr p q : p~0 * q <> q.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Simplification properties of multiplication

│ │ │ +

Simplification properties of multiplication

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Theorem mul_reg_r p q r : p * r = q * r -> p = q.
│ │ │ │ │ │ @@ -604,15 +604,15 @@ │ │ │
│ │ │ Lemma mul_cancel_l p q r : r * p = r * q <-> p = q.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Inversion of multiplication

│ │ │ +

Inversion of multiplication

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma mul_eq_1_l p q : p * q = 1 -> p = 1.
│ │ │ │ │ │ @@ -622,30 +622,30 @@ │ │ │
│ │ │ Notation mul_eq_1 := mul_eq_1_l.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Square

│ │ │ +

Square

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma square_xO p : p~0 * p~0 = (p*p)~0~0.
│ │ │ │ │ │
│ │ │ Lemma square_xI p : p~1 * p~1 = (p*p+p)~0~1.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties of iter

│ │ │ +

Properties of iter

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma iter_swap_gen : forall A B (f:A->B)(g:A->A)(h:B->B),
│ │ │  (forall a, f (g a) = h (f a)) -> forall p a,
│ │ │ @@ -684,42 +684,42 @@ │ │ │     (forall x:A, Inv x -> Inv (f x)) ->
│ │ │     forall x:A, Inv x -> Inv (iter f x p).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties of power

│ │ │ +

Properties of power

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma pow_1_r p : p^1 = p.
│ │ │ │ │ │
│ │ │ Lemma pow_succ_r p q : p^(succ q) = p * p^q.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties of square

│ │ │ +

Properties of square

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma square_spec p : square p = p * p.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties of sub_mask

│ │ │ +

Properties of sub_mask

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma sub_mask_succ_r p q :
│ │ │   sub_mask p (succ q) = sub_mask_carry p q.
│ │ │ @@ -758,15 +758,15 @@ │ │ │
│ │ │ Lemma sub_mask_neg_iff p q : sub_mask p q = IsNeg <-> exists r, p + r = q.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties of boolean comparisons

│ │ │ +

Properties of boolean comparisons

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Theorem eqb_eq p q : (p =? q) = true <-> p=q.
│ │ │ │ │ │ @@ -787,15 +787,15 @@ │ │ │
│ │ │ Include BoolEqualityFacts.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties of comparison on binary positive numbers

│ │ │ +

Properties of comparison on binary positive numbers

│ │ │ │ │ │
│ │ │ │ │ │ First, we express compare_cont in term of compare │ │ │
│ │ │
│ │ │ │ │ │ @@ -981,15 +981,15 @@ │ │ │
│ │ │ Definition le_lteq := lt_eq_cases.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Facts about gt and ge

│ │ │ +

Facts about gt and ge

│ │ │ │ │ │
│ │ │ │ │ │ The predicates lt and le are now favored in the statements │ │ │ of theorems, the use of gt and ge is hence not recommended. │ │ │ We provide here the bare minimal results to related them with │ │ │ lt and le. │ │ │ @@ -1014,15 +1014,15 @@ │ │ │
│ │ │ Lemma le_ge p q : p <= q -> q >= p.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Comparison and the successor

│ │ │ +

Comparison and the successor

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma compare_succ_r p q :
│ │ │   switch_Eq Gt (p ?= succ q) = switch_Eq Lt (p ?= q).
│ │ │ @@ -1040,15 +1040,15 @@ │ │ │
│ │ │ Lemma compare_succ_succ p q : (succ p ?= succ q) = (p ?= q).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

1 is the least positive number

│ │ │ +

1 is the least positive number

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma le_1_l p : 1 <= p.
│ │ │ │ │ │ @@ -1058,15 +1058,15 @@ │ │ │
│ │ │ Lemma lt_1_succ p : 1 < succ p.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties of the order

│ │ │ +

Properties of the order

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma le_nlt p q : p <= q <-> ~ q < p.
│ │ │ │ │ │ @@ -1127,30 +1127,30 @@ │ │ │
│ │ │ Instance le_partorder : PartialOrder Logic.eq le.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Comparison and addition

│ │ │ +

Comparison and addition

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma add_compare_mono_l p q r : (p+q ?= p+r) = (q ?= r).
│ │ │ │ │ │
│ │ │ Lemma add_compare_mono_r p q r : (q+p ?= r+p) = (q ?= r).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Order and addition

│ │ │ +

Order and addition

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma lt_add_diag_r p q : p < p + q.
│ │ │ │ │ │ @@ -1172,30 +1172,30 @@ │ │ │
│ │ │ Lemma add_le_mono p q r s : p<=q -> r<=s -> p+r <= q+s.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Comparison and multiplication

│ │ │ +

Comparison and multiplication

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma mul_compare_mono_l p q r : (p*q ?= p*r) = (q ?= r).
│ │ │ │ │ │
│ │ │ Lemma mul_compare_mono_r p q r : (q*p ?= r*p) = (q ?= r).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Order and multiplication

│ │ │ +

Order and multiplication

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma mul_lt_mono_l p q r : q<r <-> p*q < p*r.
│ │ │ │ │ │ @@ -1223,15 +1223,15 @@ │ │ │
│ │ │ Lemma pow_gt_1 n p : 1<n -> 1<n^p.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties of subtraction on binary positive numbers

│ │ │ +

Properties of subtraction on binary positive numbers

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma sub_1_r p : sub p 1 = pred p.
│ │ │ │ │ │ @@ -1241,15 +1241,15 @@ │ │ │
│ │ │ Theorem sub_succ_r p q : p - (succ q) = pred (p - q).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties of subtraction without underflow

│ │ │ +

Properties of subtraction without underflow

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma sub_mask_pos' p q :
│ │ │   q < p -> exists r, sub_mask p q = IsPos r /\ q + r = p.
│ │ │ @@ -1339,15 +1339,15 @@ │ │ │
│ │ │ Lemma sub_diag p : p-p = 1.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Results concerning size and size_nat

│ │ │ +

Results concerning size and size_nat

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma size_nat_monotone p q : p<q -> (size_nat p <= size_nat q)%nat.
│ │ │ │ │ │ @@ -1357,15 +1357,15 @@ │ │ │
│ │ │ Lemma size_le p : 2^(size p) <= p~0.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties of min and max

│ │ │ +

Properties of min and max

│ │ │ │ │ │
│ │ │ │ │ │ First, the specification │ │ │
│ │ │
│ │ │ │ │ │ @@ -1453,30 +1453,30 @@ │ │ │
│ │ │ Lemma mul_min_distr_r n m p : min (n * p) (m * p) = min n m * p.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Results concerning iter_op

│ │ │ +

Results concerning iter_op

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma iter_op_succ : forall A (op:A->A->A),
│ │ │  (forall x y z, op x (op y z) = op (op x y) z) ->
│ │ │  forall p a,
│ │ │  iter_op op (succ p) a = op a (iter_op op p a).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Results about of_nat and of_succ_nat

│ │ │ +

Results about of_nat and of_succ_nat

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma of_nat_succ (n:nat) : of_succ_nat n = of_nat (S n).
│ │ │ │ │ │ @@ -1486,15 +1486,15 @@ │ │ │
│ │ │ Lemma succ_of_nat (n:nat) : n<>O -> succ (of_nat n) = of_succ_nat n.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Correctness proofs for the square root function

│ │ │ +

Correctness proofs for the square root function

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Inductive SqrtSpec : positive*mask -> positive -> Prop :=
│ │ │  | SqrtExact s x : x=s*s -> SqrtSpec (s,IsNul) x
│ │ │ @@ -1512,15 +1512,15 @@ │ │ │ Lemma sqrt_spec p :
│ │ │  let s := sqrt p in s*s <= p < (succ s)*(succ s).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Correctness proofs for the gcd function

│ │ │ +

Correctness proofs for the gcd function

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma divide_add_cancel_l p q r : (p | r) -> (p | q + r) -> (p | q).
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.PArith.BinPosDef.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Binary positive numbers, operations

│ │ │ +

Binary positive numbers, operations

│ │ │ │ │ │
│ │ │ │ │ │ Initial development by Pierre Crégut, CNET, Lannion, France │ │ │
│ │ │ │ │ │ The type positive and its constructors xI and xO and xH │ │ │ @@ -63,19 +63,19 @@ │ │ │
│ │ │ Definition t := positive.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Operations over positive numbers

│ │ │ +

Operations over positive numbers

│ │ │ │ │ │
│ │ │ │ │ │ -

Successor

│ │ │ +

Successor

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Fixpoint succ x :=
│ │ │   match x with
│ │ │ @@ -84,15 +84,15 @@ │ │ │     | 1 => 1~0
│ │ │   end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Addition

│ │ │ +

Addition

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Fixpoint add x y :=
│ │ │   match x, y with
│ │ │ @@ -123,15 +123,15 @@ │ │ │
│ │ │ Infix "+" := add : positive_scope.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Operation x -> 2*x-1

│ │ │ +

Operation x -> 2*x-1

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Fixpoint pred_double x :=
│ │ │   match x with
│ │ │ @@ -140,15 +140,15 @@ │ │ │     | 1 => 1
│ │ │   end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Predecessor

│ │ │ +

Predecessor

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition pred x :=
│ │ │   match x with
│ │ │ @@ -157,15 +157,15 @@ │ │ │     | 1 => 1
│ │ │   end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

The predecessor of a positive number can be seen as a N

│ │ │ +

The predecessor of a positive number can be seen as a N

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition pred_N x :=
│ │ │   match x with
│ │ │ @@ -174,30 +174,30 @@ │ │ │     | 1 => N0
│ │ │   end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

An auxiliary type for subtraction

│ │ │ +

An auxiliary type for subtraction

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Inductive mask : Set :=
│ │ │ | IsNul : mask
│ │ │ | IsPos : positive -> mask
│ │ │ | IsNeg : mask.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Operation x -> 2*x+1

│ │ │ +

Operation x -> 2*x+1

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition succ_double_mask (x:mask) : mask :=
│ │ │   match x with
│ │ │ @@ -206,15 +206,15 @@ │ │ │     | IsPos p => IsPos p~1
│ │ │   end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Operation x -> 2*x

│ │ │ +

Operation x -> 2*x

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition double_mask (x:mask) : mask :=
│ │ │   match x with
│ │ │ @@ -223,15 +223,15 @@ │ │ │     | IsPos p => IsPos p~0
│ │ │   end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Operation x -> 2*x-2

│ │ │ +

Operation x -> 2*x-2

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition double_pred_mask x : mask :=
│ │ │   match x with
│ │ │ @@ -240,15 +240,15 @@ │ │ │     | 1 => IsNul
│ │ │   end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Predecessor with mask

│ │ │ +

Predecessor with mask

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition pred_mask (p : mask) : mask :=
│ │ │   match p with
│ │ │ @@ -258,15 +258,15 @@ │ │ │     | IsNeg => IsNeg
│ │ │   end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Subtraction, result as a mask

│ │ │ +

Subtraction, result as a mask

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Fixpoint sub_mask (x y:positive) {struct y} : mask :=
│ │ │   match x, y with
│ │ │ @@ -291,15 +291,15 @@ │ │ │     | 1, _ => IsNeg
│ │ │   end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Subtraction, result as a positive, returning 1 if x<=y

│ │ │ +

Subtraction, result as a positive, returning 1 if x<=y

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition sub x y :=
│ │ │   match sub_mask x y with
│ │ │ @@ -310,15 +310,15 @@ │ │ │
│ │ │ Infix "-" := sub : positive_scope.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Multiplication

│ │ │ +

Multiplication

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Fixpoint mul x y :=
│ │ │   match x with
│ │ │ @@ -330,15 +330,15 @@ │ │ │
│ │ │ Infix "*" := mul : positive_scope.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Iteration over a positive number

│ │ │ +

Iteration over a positive number

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition iter {A} (f:A -> A) : A -> positive -> A :=
│ │ │   fix iter_fix x n := match n with
│ │ │ @@ -347,30 +347,30 @@ │ │ │     | xI n' => f (iter_fix (iter_fix x n') n')
│ │ │   end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Power

│ │ │ +

Power

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition pow (x:positive) := iter (mul x) 1.
│ │ │ │ │ │
│ │ │ Infix "^" := pow : positive_scope.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Square

│ │ │ +

Square

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Fixpoint square p :=
│ │ │   match p with
│ │ │ @@ -379,15 +379,15 @@ │ │ │     | 1 => 1
│ │ │   end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Division by 2 rounded below but for 1

│ │ │ +

Division by 2 rounded below but for 1

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition div2 p :=
│ │ │   match p with
│ │ │ @@ -412,15 +412,15 @@ │ │ │    | p~1 => succ p
│ │ │  end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Number of digits in a positive number

│ │ │ +

Number of digits in a positive number

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Fixpoint size_nat p : nat :=
│ │ │   match p with
│ │ │ @@ -445,15 +445,15 @@ │ │ │     | p~0 => succ (size p)
│ │ │   end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Comparison on binary positive numbers

│ │ │ +

Comparison on binary positive numbers

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Fixpoint compare_cont (r:comparison) (x y:positive) {struct y} : comparison :=
│ │ │   match x, y with
│ │ │ @@ -488,15 +488,15 @@ │ │ │  | Gt => p
│ │ │  end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Boolean equality and comparisons

│ │ │ +

Boolean equality and comparisons

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Fixpoint eqb p q {struct q} :=
│ │ │   match p, q with
│ │ │ @@ -519,15 +519,15 @@ │ │ │ Infix "<=?" := leb (at level 70, no associativity) : positive_scope.
│ │ │ Infix "<?" := ltb (at level 70, no associativity) : positive_scope.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

A Square Root function for positive numbers

│ │ │ +

A Square Root function for positive numbers

│ │ │ │ │ │
│ │ │ │ │ │ We proceed by blocks of two digits : if p is written qbb' │ │ │ then sqrt(p) will be sqrt(q)~0 or sqrt(q)~1. │ │ │ For deciding easily in which case we are, we store the remainder │ │ │ (as a mask, since it can be null). │ │ │ @@ -565,15 +565,15 @@ │ │ │
│ │ │ Definition sqrt p := fst (sqrtrem p).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Greatest Common Divisor

│ │ │ +

Greatest Common Divisor

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition divide p q := exists r, q = r*p.
│ │ │ Notation "( p | q )" := (divide p q) (at level 0) : positive_scope.
│ │ │ @@ -840,15 +840,15 @@ │ │ │     | p~1, Npos n => testbit p (pred_N n)
│ │ │   end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

From binary positive numbers to Peano natural numbers

│ │ │ +

From binary positive numbers to Peano natural numbers

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition iter_op {A}(op:A->A->A) :=
│ │ │   fix iter (p:positive)(a:A) : A :=
│ │ │ @@ -859,15 +859,15 @@ │ │ │   end.
│ │ │ │ │ │
│ │ │ Definition to_nat (x:positive) : nat := iter_op plus x (S O).
│ │ │
│ │ │ │ │ │
│ │ │ -

From Peano natural numbers to binary positive numbers

│ │ │ +

From Peano natural numbers to binary positive numbers

│ │ │ │ │ │
│ │ │ │ │ │ A version preserving positive numbers, and sending 0 to 1. │ │ │
│ │ │
│ │ │ │ │ │ @@ -888,15 +888,15 @@ │ │ │     | S x => succ (of_succ_nat x)
│ │ │   end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Conversion with a decimal representation for printing/parsing

│ │ │ +

Conversion with a decimal representation for printing/parsing

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ │ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.PArith.POrderedType.html │ │ │ @@ -21,15 +21,15 @@ │ │ │
│ │ │ Local Open Scope positive_scope.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

DecidableType structure for positive numbers

│ │ │ +

DecidableType structure for positive numbers

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module Positive_as_DT <: UsualDecidableTypeFull := Pos.
│ │ │ │ │ │ @@ -37,15 +37,15 @@ │ │ │
│ │ │ │ │ │
│ │ │ Note that the last module fulfills by subtyping many other │ │ │ interfaces, such as DecidableType or EqualityType. │ │ │
│ │ │ │ │ │ -

OrderedType structure for positive numbers

│ │ │ +

OrderedType structure for positive numbers

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module Positive_as_OT <: OrderedTypeFull := Pos.
│ │ │ │ │ │ @@ -53,15 +53,15 @@ │ │ │
│ │ │ │ │ │
│ │ │ Note that Positive_as_OT can also be seen as a UsualOrderedType │ │ │ and a OrderedType (and also as a DecidableType). │ │ │
│ │ │ │ │ │ -

An order tactic for positive numbers

│ │ │ +

An order tactic for positive numbers

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module PositiveOrder := OTF_to_OrderTac Positive_as_OT.
│ │ │ Ltac p_order := PositiveOrder.order.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Program.Combinators.html │ │ │ @@ -13,15 +13,15 @@ │ │ │ │ │ │

Library Coq.Program.Combinators

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Proofs about standard combinators, exports functional extensionality.

│ │ │ +

Proofs about standard combinators, exports functional extensionality.

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Author: Matthieu Sozeau │ │ │ Institution: LRI, CNRS UMR 8623 - University Paris Sud │ │ ├── ./usr/share/doc/coq-theories/html/Coq.QArith.QArith_base.html │ │ │ @@ -20,15 +20,15 @@ │ │ │ Require Export ZArithRing.
│ │ │ Require Export Morphisms Setoid Bool.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Definition of Q and basic properties

│ │ │ +

Definition of Q and basic properties

│ │ │ │ │ │
│ │ │ │ │ │ Rationals are pairs of Z and positive numbers. │ │ │
│ │ │
│ │ │ │ │ │ @@ -229,15 +229,15 @@ │ │ │
│ │ │ Lemma Qcompare_spec x y : CompareSpec (x==y) (x<y) (y<x) (x ?= y).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties of equality.

│ │ │ +

Properties of equality.

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Theorem Qeq_refl x : x == x.
│ │ │ │ │ │ @@ -317,15 +317,15 @@ │ │ │
│ │ │ Hint Resolve Qnot_eq_sym : qarith.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Addition, multiplication and opposite

│ │ │ +

Addition, multiplication and opposite

│ │ │ │ │ │
│ │ │ │ │ │ The addition, multiplication and opposite are defined │ │ │ in the straightforward way: │ │ │
│ │ │
│ │ │ @@ -375,15 +375,15 @@ │ │ │
│ │ │ Lemma Qmake_Qdiv a b : a#b==inject_Z a/inject_Z (Zpos b).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Setoid compatibility results

│ │ │ +

Setoid compatibility results

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Instance Qplus_comp : Proper (Qeq==>Qeq==>Qeq) Qplus.
│ │ │   Open Scope Z_scope.
│ │ │ @@ -438,15 +438,15 @@ │ │ │
│ │ │ Lemma Q_apart_0_1 : ~ 1 == 0.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties of Qadd

│ │ │ +

Properties of Qadd

│ │ │ │ │ │
│ │ │ │ │ │ Addition is associative: │ │ │
│ │ │
│ │ │ │ │ │ @@ -478,15 +478,15 @@ │ │ │
│ │ │ Theorem Qplus_comm : forall x y, x+y == y+x.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties of Qopp

│ │ │ +

Properties of Qopp

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma Qopp_involutive : forall q, - -q == q.
│ │ │ │ │ │ @@ -509,15 +509,15 @@ │ │ │ Lemma Qplus_inj_l (x y z: Q):
│ │ │   z + x == z + y <-> x == y.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties of Qmult

│ │ │ +

Properties of Qmult

│ │ │ │ │ │
│ │ │ │ │ │ Multiplication is associative: │ │ │
│ │ │
│ │ │ │ │ │ @@ -591,15 +591,15 @@ │ │ │
│ │ │ Theorem Qmult_integral_l : forall x y, ~ x == 0 -> x*y == 0 -> y == 0.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

inject_Z is a ring homomorphism:

│ │ │ +

inject_Z is a ring homomorphism:

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma inject_Z_plus (x y: Z): inject_Z (x + y) = inject_Z x + inject_Z y.
│ │ │ │ │ │ @@ -609,15 +609,15 @@ │ │ │
│ │ │ Lemma inject_Z_opp (x: Z): inject_Z (- x) = - inject_Z x.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Inverse and division.

│ │ │ +

Inverse and division.

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma Qinv_involutive : forall q, (/ / q) == q.
│ │ │ │ │ │ @@ -653,15 +653,15 @@ │ │ │
│ │ │ Lemma Qmult_inj_l (x y z: Q): ~ z == 0 -> (z * x == z * y <-> x == y).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties of order upon Q.

│ │ │ +

Properties of order upon Q.

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma Qle_refl x : x<=x.
│ │ │ │ │ │ @@ -877,15 +877,15 @@ │ │ │ Lemma Qinv_lt_contravar : forall a b : Q,
│ │ │     0 < a -> 0 < b -> (a < b <-> /b < /a).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Rational to the n-th power

│ │ │ +

Rational to the n-th power

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition Qpower_positive : Q -> positive -> Q :=
│ │ │  pow_pos Qmult.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.QArith.QOrderedType.html │ │ │ @@ -21,15 +21,15 @@ │ │ │
│ │ │ Local Open Scope Q_scope.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

DecidableType structure for rational numbers

│ │ │ +

DecidableType structure for rational numbers

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module Q_as_DT <: DecidableTypeFull.
│ │ │  Definition t := Q.
│ │ │ @@ -59,15 +59,15 @@ │ │ │
│ │ │ │ │ │
│ │ │ Note that the last module fulfills by subtyping many other │ │ │ interfaces, such as DecidableType or EqualityType. │ │ │
│ │ │ │ │ │ -

OrderedType structure for rational numbers

│ │ │ +

OrderedType structure for rational numbers

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module Q_as_OT <: OrderedTypeFull.
│ │ │  Include Q_as_DT.
│ │ │ @@ -88,15 +88,15 @@ │ │ │
│ │ │ End Q_as_OT.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

An order tactic for Q numbers

│ │ │ +

An order tactic for Q numbers

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module QOrder := OTF_to_OrderTac Q_as_OT.
│ │ │ Ltac q_order := QOrder.order.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.QArith.Qcabs.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

An absolute value for normalized rational numbers.

│ │ │ +

An absolute value for normalized rational numbers.

│ │ │ │ │ │
│ │ │ │ │ │ Contributed by Cédric Auger │ │ │
│ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.QArith.Qfield.html │ │ │ @@ -20,15 +20,15 @@ │ │ │ Require Export QArith_base.
│ │ │ Require Import NArithRing.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

field and ring tactics for rational numbers

│ │ │ +

field and ring tactics for rational numbers

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition Qsrt : ring_theory 0 1 Qplus Qmult Qminus Qopp Qeq.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.QArith.Qminmax.html │ │ │ @@ -18,15 +18,15 @@ │ │ │
│ │ │ Require Import QArith_base Orders QOrderedType GenericMinMax.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Maximum and Minimum of two rational numbers

│ │ │ +

Maximum and Minimum of two rational numbers

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Local Open Scope Q_scope.
│ │ │ │ │ │ @@ -67,15 +67,15 @@ │ │ │
│ │ │ Include MinMaxProperties Q_as_OT QHasMinMax.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties specific to the Q domain

│ │ │ +

Properties specific to the Q domain

│ │ │ │ │ │
│ │ │ │ │ │ Compatibilities (consequences of monotonicity) │ │ │
│ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Reals.AltSeries.html │ │ │ @@ -24,15 +24,15 @@ │ │ │ Require Import Max.
│ │ │ Local Open Scope R_scope.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Formalization of alternated series

│ │ │ +

Formalization of alternated series

│ │ │ │ │ │
│ │ │
│ │ │ Definition tg_alt (Un:nat -> R) (i:nat) : R := (-1) ^ i * Un i.
│ │ │ Definition positivity_seq (Un:nat -> R) : Prop := forall n:nat, 0 <= Un n.
│ │ │ │ │ │
│ │ │ @@ -87,15 +87,15 @@ │ │ │     Un_cv Un 0 ->
│ │ │     { l:R | Un_cv (fun N:nat => sum_f_R0 (tg_alt Un) N) l }.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Convergence of alternated series

│ │ │ +

Convergence of alternated series

│ │ │ │ │ │
│ │ │
│ │ │ Theorem alternated_series :
│ │ │   forall Un:nat -> R,
│ │ │     Un_decreasing Un ->
│ │ │     Un_cv Un 0 ->
│ │ │ @@ -109,15 +109,15 @@ │ │ │     Un_cv (fun N:nat => sum_f_R0 (tg_alt Un) N) l ->
│ │ │     sum_f_R0 (tg_alt Un) (S (2 * N)) <= l <= sum_f_R0 (tg_alt Un) (2 * N).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Application : construction of PI

│ │ │ +

Application : construction of PI

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition PI_tg (n:nat) := / INR (2 * n + 1).
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Reals.Cauchy.ConstructiveCauchyRealsMult.html │ │ │ @@ -205,15 +205,15 @@ │ │ │     Qlt (2#n) (Qabs (proj1_sig x n))
│ │ │     -> 0 # x.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Field

│ │ │ +

Field

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma CRealArchimedean
│ │ │   : forall x:CReal, { n:Z & x < inject_Q (n#1) < x+2 }.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Reals.RIneq.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Basic lemmas for the classical real numbers

│ │ │ +

Basic lemmas for the classical real numbers

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Require Import ConstructiveCauchyReals.
│ │ │ Require Import ConstructiveCauchyRealsMult.
│ │ │ @@ -41,15 +41,15 @@ │ │ │
│ │ │ Implicit Type r : R.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Relation between orders and equality

│ │ │ +

Relation between orders and equality

│ │ │ │ │ │
│ │ │ │ │ │ Reflexivity of the large order │ │ │
│ │ │
│ │ │ │ │ │ @@ -105,23 +105,23 @@ │ │ │
│ │ │ Lemma Rdichotomy : forall r1 r2, r1 <> r2 -> r1 < r2 \/ r1 > r2.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Relating <, >, <= and >=

│ │ │ +

Relating <, >, <= and >=

│ │ │ │ │ │
│ │ │ │ │ │ -

Order

│ │ │ +

Order

│ │ │ │ │ │
│ │ │ │ │ │ -

Relating strict and large orders

│ │ │ +

Relating strict and large orders

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma Rlt_le : forall r1 r2, r1 < r2 -> r1 <= r2.
│ │ │ Hint Resolve Rlt_le: real.
│ │ │ @@ -216,30 +216,30 @@ │ │ │ Lemma Req_ge_sym : forall r1 r2, r2 = r1 -> r1 >= r2.
│ │ │ Hint Immediate Req_ge_sym: real.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Asymmetry

│ │ │ +

Asymmetry

│ │ │ │ │ │
│ │ │ │ │ │ Remark: Rlt_asym is an axiom │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma Rgt_asym : forall r1 r2:R, r1 > r2 -> ~ r2 > r1.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Antisymmetry

│ │ │ +

Antisymmetry

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma Rle_antisym : forall r1 r2, r1 <= r2 -> r2 <= r1 -> r1 = r2.
│ │ │ Hint Resolve Rle_antisym: real.
│ │ │ @@ -253,15 +253,15 @@ │ │ │
│ │ │ Lemma Rge_ge_eq : forall r1 r2, r1 >= r2 /\ r2 >= r1 <-> r1 = r2.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Compatibility with equality

│ │ │ +

Compatibility with equality

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma Rlt_eq_compat :
│ │ │   forall r1 r2 r3 r4, r1 = r2 -> r2 < r4 -> r4 = r3 -> r1 < r3.
│ │ │ @@ -270,15 +270,15 @@ │ │ │ Lemma Rgt_eq_compat :
│ │ │   forall r1 r2 r3 r4, r1 = r2 -> r2 > r4 -> r4 = r3 -> r1 > r3.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Transitivity

│ │ │ +

Transitivity

│ │ │ │ │ │
│ │ │ │ │ │ Remark: Rlt_trans is an axiom │ │ │
│ │ │
│ │ │ │ │ │ @@ -303,15 +303,15 @@ │ │ │
│ │ │ Lemma Rgt_ge_trans : forall r1 r2 r3, r1 > r2 -> r2 >= r3 -> r1 > r3.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

(Classical) decidability

│ │ │ +

(Classical) decidability

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma Rlt_dec : forall r1 r2, {r1 < r2} + {~ r1 < r2}.
│ │ │ │ │ │ @@ -355,15 +355,15 @@ │ │ │ Lemma inser_trans_R :
│ │ │   forall r1 r2 r3 r4, r1 <= r2 < r3 -> {r1 <= r2 < r4} + {r4 <= r2 < r3}.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Addition

│ │ │ +

Addition

│ │ │ │ │ │
│ │ │ │ │ │ Remark: Rplus_0_l is an axiom │ │ │
│ │ │
│ │ │ │ │ │ @@ -422,15 +422,15 @@ │ │ │ Lemma Rplus_eq_R0 :
│ │ │   forall r1 r2, 0 <= r1 -> 0 <= r2 -> r1 + r2 = 0 -> r1 = 0 /\ r2 = 0.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Multiplication

│ │ │ +

Multiplication

│ │ │ │ │ │
│ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Lemma Rinv_r : forall r, r <> 0 -> r * / r = 1.
│ │ │ @@ -503,15 +503,15 @@ │ │ │ Lemma Rmult_plus_distr_r :
│ │ │   forall r1 r2 r3, (r1 + r2) * r3 = r1 * r3 + r2 * r3.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Square function

│ │ │ +

Square function

│ │ │ │ │ │
│ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Definition Rsqr r : R := r * r.
│ │ │ @@ -525,15 +525,15 @@ │ │ │
│ │ │ Lemma Rsqr_0_uniq : forall r, Rsqr r = 0 -> r = 0.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Opposite

│ │ │ +

Opposite

│ │ │ │ │ │
│ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Lemma Ropp_eq_compat : forall r1 r2, r1 = r2 -> - r1 = - r2.
│ │ │ @@ -559,15 +559,15 @@ │ │ │ Lemma Ropp_plus_distr : forall r1 r2, - (r1 + r2) = - r1 + - r2.
│ │ │ Hint Resolve Ropp_plus_distr: real.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Opposite and multiplication

│ │ │ +

Opposite and multiplication

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma Ropp_mult_distr_l : forall r1 r2, - (r1 * r2) = - r1 * r2.
│ │ │ │ │ │ @@ -585,15 +585,15 @@ │ │ │
│ │ │ Lemma Ropp_mult_distr_r_reverse : forall r1 r2, r1 * - r2 = - (r1 * r2).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Subtraction

│ │ │ +

Subtraction

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma Rminus_0_r : forall r, r - 0 = r.
│ │ │ Hint Resolve Rminus_0_r: real.
│ │ │ @@ -648,15 +648,15 @@ │ │ │ Lemma Rmult_minus_distr_r:
│ │ │   forall r1 r2 r3, (r2 - r3) * r1 = r2 * r1 - r3 * r1.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Inverse

│ │ │ +

Inverse

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma Rinv_1 : / 1 = 1.
│ │ │ Hint Resolve Rinv_1: real.
│ │ │ @@ -690,19 +690,19 @@ │ │ │ Lemma Rinv_mult_simpl :
│ │ │   forall r1 r2 r3, r1 <> 0 -> r1 * / r2 * (r3 * / r1) = r3 * / r2.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Order and addition

│ │ │ +

Order and addition

│ │ │ │ │ │
│ │ │ │ │ │ -

Compatibility

│ │ │ +

Compatibility

│ │ │ │ │ │
│ │ │ │ │ │ Remark: Rplus_lt_compat_l is an axiom │ │ │
│ │ │
│ │ │ │ │ │ @@ -787,15 +787,15 @@ │ │ │   forall a x b c y d:R,
│ │ │     a <= x -> x < b -> c < y -> y <= d -> a + c < x + y < b + d.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Cancellation

│ │ │ +

Cancellation

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma Rplus_lt_reg_l : forall r r1 r2, r + r1 < r + r2 -> r1 < r2.
│ │ │ │ │ │ @@ -828,19 +828,19 @@ │ │ │
│ │ │ Lemma Rplus_gt_reg_neg_r : forall r1 r2 r3, 0 >= r2 -> r1 + r2 > r3 -> r1 > r3.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Order and opposite

│ │ │ +

Order and opposite

│ │ │ │ │ │
│ │ │ │ │ │ -

Contravariant compatibility

│ │ │ +

Contravariant compatibility

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma Ropp_gt_lt_contravar : forall r1 r2, r1 > r2 -> - r1 < - r2.
│ │ │ Hint Resolve Ropp_gt_lt_contravar : core.
│ │ │ @@ -895,15 +895,15 @@ │ │ │ Lemma Ropp_0_ge_le_contravar : forall r, 0 >= r -> 0 <= - r.
│ │ │ Hint Resolve Ropp_0_ge_le_contravar: real.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Cancellation

│ │ │ +

Cancellation

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma Ropp_lt_cancel : forall r1 r2, - r2 < - r1 -> r1 < r2.
│ │ │ Hint Immediate Ropp_lt_cancel: real.
│ │ │ @@ -918,22 +918,22 @@ │ │ │
│ │ │ Lemma Ropp_ge_cancel : forall r1 r2, - r2 >= - r1 -> r1 >= r2.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Order and multiplication

│ │ │ +

Order and multiplication

│ │ │ │ │ │
│ │ │ │ │ │ Remark: Rmult_lt_compat_l is an axiom │ │ │
│ │ │ │ │ │ -

Covariant compatibility

│ │ │ +

Covariant compatibility

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma Rmult_lt_compat_r : forall r r1 r2, 0 < r -> r1 < r2 -> r1 * r < r2 * r.
│ │ │ Hint Resolve Rmult_lt_compat_r : core.
│ │ │ @@ -989,15 +989,15 @@ │ │ │
│ │ │ Lemma Rmult_gt_0_compat : forall r1 r2, r1 > 0 -> r2 > 0 -> r1 * r2 > 0.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Contravariant compatibility

│ │ │ +

Contravariant compatibility

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma Rmult_le_compat_neg_l :
│ │ │   forall r r1 r2, r <= 0 -> r1 <= r2 -> r * r2 <= r * r1.
│ │ │ @@ -1012,15 +1012,15 @@ │ │ │ Lemma Rmult_lt_gt_compat_neg_l :
│ │ │   forall r r1 r2, r < 0 -> r1 < r2 -> r * r1 > r * r2.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Cancellation

│ │ │ +

Cancellation

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma Rmult_lt_reg_l : forall r r1 r2, 0 < r -> r * r1 < r * r2 -> r1 < r2.
│ │ │ │ │ │ @@ -1036,15 +1036,15 @@ │ │ │
│ │ │ Lemma Rmult_le_reg_r : forall r r1 r2, 0 < r -> r1 * r <= r2 * r -> r1 <= r2.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Order and subtraction

│ │ │ +

Order and subtraction

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma Rlt_minus : forall r1 r2, r1 < r2 -> r1 - r2 < 0.
│ │ │ Hint Resolve Rlt_minus: real.
│ │ │ @@ -1080,15 +1080,15 @@ │ │ │ Lemma tech_Rplus : forall r (s:R), 0 <= r -> 0 < s -> r + s <> 0.
│ │ │ Hint Immediate tech_Rplus: real.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Order and square function

│ │ │ +

Order and square function

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma Rle_0_sqr : forall r, 0 <= Rsqr r.
│ │ │ │ │ │ @@ -1103,15 +1103,15 @@ │ │ │ Lemma Rplus_sqr_eq_0 :
│ │ │   forall r1 r2, Rsqr r1 + Rsqr r2 = 0 -> r1 = 0 /\ r2 = 0.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Zero is less than one

│ │ │ +

Zero is less than one

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma Rlt_0_1 : 0 < 1.
│ │ │ Hint Resolve Rlt_0_1: real.
│ │ │ @@ -1119,15 +1119,15 @@ │ │ │
│ │ │ Lemma Rle_0_1 : 0 <= 1.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Order and inverse

│ │ │ +

Order and inverse

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma Rinv_0_lt_compat : forall r, 0 < r -> 0 < / r.
│ │ │ Hint Resolve Rinv_0_lt_compat: real.
│ │ │ @@ -1143,15 +1143,15 @@ │ │ │ Lemma Rinv_1_lt_contravar : forall r1 r2, 1 <= r1 -> r1 < r2 -> / r2 < / r1.
│ │ │ Hint Resolve Rinv_1_lt_contravar: real.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Miscellaneous

│ │ │ +

Miscellaneous

│ │ │ │ │ │
│ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Lemma Rle_lt_0_plus_1 : forall r, 0 <= r -> 0 < r + 1.
│ │ │ @@ -1164,15 +1164,15 @@ │ │ │
│ │ │ Lemma tech_Rgt_minus : forall r1 r2, 0 < r2 -> r1 > r1 - r2.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Injection from N to R

│ │ │ +

Injection from N to R

│ │ │ │ │ │
│ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Lemma S_INR : forall n:nat, INR (S n) = INR n + 1.
│ │ │ @@ -1246,15 +1246,15 @@ │ │ │ Lemma not_1_INR : forall n:nat, n <> 1%nat -> INR n <> 1.
│ │ │ Hint Resolve not_1_INR: real.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Injection from Z to R

│ │ │ +

Injection from Z to R

│ │ │ │ │ │
│ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Lemma IZN : forall n:Z, (0 <= n)%Z -> exists m : nat, n = Z.of_nat m.
│ │ │ @@ -1390,15 +1390,15 @@ │ │ │ Add Field RField : Rfield
│ │ │   (completeness Zeq_bool_IZR, morphism R_rm, constants [IZR_tac], power_tac R_power_theory [Rpow_tac]).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Other rules about < and <=

│ │ │ +

Other rules about < and <=

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma Rmult_ge_0_gt_0_lt_compat :
│ │ │   forall r1 r2 r3 r4,
│ │ │ @@ -1425,15 +1425,15 @@ │ │ │
│ │ │ Lemma Req_EM_T : forall r1 r2:R, {r1 = r2} + {r1 <> r2}.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Definitions of new types

│ │ │ +

Definitions of new types

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Record nonnegreal : Type := mknonnegreal
│ │ │   {nonneg :> R; cond_nonneg : 0 <= nonneg}.
│ │ │ @@ -1452,15 +1452,15 @@ │ │ │ Record nonzeroreal : Type := mknonzeroreal
│ │ │   {nonzero :> R; cond_nonzero : nonzero <> 0}.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

A few common instances

│ │ │ +

A few common instances

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma pos_half_prf : 0 < /2.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Reals.ROrderedType.html │ │ │ @@ -21,15 +21,15 @@ │ │ │
│ │ │ Local Open Scope R_scope.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

DecidableType structure for real numbers

│ │ │ +

DecidableType structure for real numbers

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma Req_dec : forall r1 r2:R, {r1 = r2} + {r1 <> r2}.
│ │ │ │ │ │ @@ -56,15 +56,15 @@ │ │ │ interfaces, such as DecidableType or EqualityType. │ │ │
│ │ │ │ │ │ Note that R_as_DT can also be seen as a DecidableType │ │ │ and a DecidableTypeOrig. │ │ │
│ │ │ │ │ │ -

OrderedType structure for binary integers

│ │ │ +

OrderedType structure for binary integers

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition Rcompare x y :=
│ │ │  match total_order_T x y with
│ │ │ @@ -102,15 +102,15 @@ │ │ │
│ │ │ │ │ │
│ │ │ Note that R_as_OT can also be seen as a UsualOrderedType │ │ │ and a OrderedType (and also as a DecidableType). │ │ │
│ │ │ │ │ │ -

An order tactic for real numbers

│ │ │ +

An order tactic for real numbers

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module ROrder := OTF_to_OrderTac R_as_OT.
│ │ │ Ltac r_order := ROrder.order.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Reals.R_Ifp.html │ │ │ @@ -28,15 +28,15 @@ │ │ │ Require Import Ztac.
│ │ │ Local Open Scope R_scope.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Fractional part

│ │ │ +

Fractional part

│ │ │ │ │ │
│ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Definition Int_part (r:R) : Z := (up r - 1)%Z.
│ │ │ @@ -60,15 +60,15 @@ │ │ │
│ │ │ Lemma base_fp : forall r:R, frac_part r >= 0 /\ frac_part r < 1.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties

│ │ │ +

Properties

│ │ │ │ │ │
│ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Lemma base_Int_part :
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Reals.R_sqrt.html │ │ │ @@ -21,15 +21,15 @@ │ │ │ Require Import Rsqrt_def.
│ │ │ Local Open Scope R_scope.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Continuous extension of Rsqrt on R

│ │ │ +

Continuous extension of Rsqrt on R

│ │ │ │ │ │
│ │ │
│ │ │ Definition sqrt (x:R) : R :=
│ │ │   match Rcase_abs x with
│ │ │     | left _ => 0
│ │ │     | right a => Rsqrt (mknonnegreal x (Rge_le _ _ a))
│ │ │ @@ -155,15 +155,15 @@ │ │ │   forall a b c d:R,
│ │ │     a * c + b * d <= sqrt (Rsqr a + Rsqr b) * sqrt (Rsqr c + Rsqr d).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Resolution of a*X^2+b*X+c=0

│ │ │ +

Resolution of a*X^2+b*X+c=0

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition Delta (a:nonzeroreal) (b c:R) : R := Rsqr b - 4 * a * c.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Reals.Ranalysis1.html │ │ │ @@ -23,15 +23,15 @@ │ │ │ Local Open Scope R_scope.
│ │ │ Implicit Type f : R -> R.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Basic operations on functions

│ │ │ +

Basic operations on functions

│ │ │ │ │ │
│ │ │
│ │ │ Definition plus_fct f1 f2 (x:R) : R := f1 x + f2 x.
│ │ │ Definition opp_fct f (x:R) : R := - f x.
│ │ │ Definition mult_fct f1 f2 (x:R) : R := f1 x * f2 x.
│ │ │ Definition mult_real_fct (a:R) f (x:R) : R := a * f x.
│ │ │ @@ -59,15 +59,15 @@ │ │ │ Definition fct_cte (a x:R) : R := a.
│ │ │ Definition id (x:R) := x.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Variations of functions

│ │ │ +

Variations of functions

│ │ │ │ │ │
│ │ │
│ │ │ Definition increasing f : Prop := forall x y:R, x <= y -> f x <= f y.
│ │ │ Definition decreasing f : Prop := forall x y:R, x <= y -> f y <= f x.
│ │ │ Definition strict_increasing f : Prop := forall x y:R, x < y -> f x < f y.
│ │ │ Definition strict_decreasing f : Prop := forall x y:R, x < y -> f y < f x.
│ │ │ @@ -80,15 +80,15 @@ │ │ │ Definition constant_D_eq f (D:R -> Prop) (c:R) : Prop :=
│ │ │   forall x:R, D x -> f x = c.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Definition of continuity as a limit

│ │ │ +

Definition of continuity as a limit

│ │ │ │ │ │
│ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Definition continuity_pt f (x0:R) : Prop := continue_in f no_cond x0.
│ │ │ @@ -182,15 +182,15 @@ │ │ │ Lemma continuity_comp :
│ │ │   forall f1 f2, continuity f1 -> continuity f2 -> continuity (f2 o f1).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Derivative's definition using Landau's kernel

│ │ │ +

Derivative's definition using Landau's kernel

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition derivable_pt_lim f (x l:R) : Prop :=
│ │ │   forall eps:R,
│ │ │ @@ -216,15 +216,15 @@ │ │ │ Definition antiderivative f (g:R -> R) (a b:R) : Prop :=
│ │ │   (forall x:R,
│ │ │     a <= x <= b -> exists pr : derivable_pt g x, f x = derive_pt g x pr) /\
│ │ │   a <= b.
│ │ │
│ │ │ │ │ │
│ │ │ -

Class of differential functions

│ │ │ +

Class of differential functions

│ │ │ │ │ │
│ │ │
│ │ │ Record Differential : Type := mkDifferential
│ │ │   {d1 :> R -> R; cond_diff : derivable d1}.
│ │ │ │ │ │
│ │ │ @@ -272,15 +272,15 @@ │ │ │   forall f (x l:R) (pr:derivable_pt f x),
│ │ │     derive_pt f x pr = l -> derivable_pt_lim f x l.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Equivalence of this definition with the one using limit concept

│ │ │ +

Equivalence of this definition with the one using limit concept

│ │ │ │ │ │
│ │ │
│ │ │ Lemma derive_pt_D_in :
│ │ │   forall f (df:R -> R) (x:R) (pr:derivable_pt f x),
│ │ │     D_in f df no_cond x <-> derive_pt f x pr = df x.
│ │ │ │ │ │ @@ -303,15 +303,15 @@ │ │ │   (forall z, a < z < b -> f z = g z) ->
│ │ │   derivable_pt_lim f x l -> derivable_pt_lim g x l.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

derivability -> continuity

│ │ │ +

derivability -> continuity

│ │ │ │ │ │
│ │ │
│ │ │ Lemma derivable_derive :
│ │ │   forall f (x:R) (pr:derivable_pt f x), exists l : R, derive_pt f x pr = l.
│ │ │ │ │ │
│ │ │ @@ -321,19 +321,19 @@ │ │ │
│ │ │ Theorem derivable_continuous : forall f, derivable f -> continuity f.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Main rules

│ │ │ +

Main rules

│ │ │ │ │ │
│ │ │ │ │ │ -

Rules for derivable_pt_lim (value of the derivative at a point)

│ │ │ +

Rules for derivable_pt_lim (value of the derivative at a point)

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma derivable_pt_lim_id : forall x:R, derivable_pt_lim id x 1.
│ │ │ │ │ │ @@ -403,15 +403,15 @@ │ │ │
│ │ │ Lemma derivable_pt_lim_Rsqr : forall x:R, derivable_pt_lim Rsqr x (2 * x).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Rules for derivable_pt (derivability at a point)

│ │ │ +

Rules for derivable_pt (derivability at a point)

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma derivable_pt_id : forall x:R, derivable_pt id x.
│ │ │ │ │ │ @@ -469,15 +469,15 @@ │ │ │
│ │ │ Lemma derivable_pt_Rsqr : forall x:R, derivable_pt Rsqr x.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Rules for derivable (derivability on whole domain)

│ │ │ +

Rules for derivable (derivability on whole domain)

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma derivable_id : derivable id.
│ │ │ │ │ │ @@ -513,15 +513,15 @@ │ │ │
│ │ │ Lemma derivable_Rsqr : derivable Rsqr.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Rules for derive_pt (derivative function on whole domain)

│ │ │ +

Rules for derive_pt (derivative function on whole domain)

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma derive_pt_id : forall x:R, derive_pt id x (derivable_pt_id _) = 1.
│ │ │ │ │ │ @@ -583,15 +583,15 @@ │ │ │ Lemma derive_pt_Rsqr :
│ │ │   forall x:R, derive_pt Rsqr x (derivable_pt_Rsqr _) = 2 * x.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Definition and derivative of power function with natural number exponent

│ │ │ +

Definition and derivative of power function with natural number exponent

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition pow_fct (n:nat) (y:R) : R := y ^ n.
│ │ │ │ │ │ @@ -617,15 +617,15 @@ │ │ │   forall (n:nat) (x:R),
│ │ │     derive_pt (fun y:R => y ^ n) x (derivable_pt_pow n x) = INR n * x ^ pred n.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Irrelevance of derivability proof for derivative

│ │ │ +

Irrelevance of derivability proof for derivative

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma pr_nu :
│ │ │   forall f (x:R) (pr1 pr2:derivable_pt f x),
│ │ │ @@ -645,15 +645,15 @@ │ │ │   forall f (x1 x2:R) (pr1:derivable_pt f x1) (pr2:derivable_pt f x2),
│ │ │     x1 = x2 -> derive_pt f x1 pr1 = derive_pt f x2 pr2.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Local extremum's condition

│ │ │ +

Local extremum's condition

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Theorem deriv_maximum :
│ │ │   forall f (a b c:R) (pr:derivable_pt f c),
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Reals.Ranalysis5.html │ │ │ @@ -28,15 +28,15 @@ │ │ │ Require Import Lra.
│ │ │ Local Open Scope R_scope.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Preliminaries lemmas

│ │ │ +

Preliminaries lemmas

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma f_incr_implies_g_incr_interv : forall f g:R->R, forall lb ub,
│ │ │        lb < ub ->
│ │ │ @@ -104,19 +104,19 @@ │ │ │        (forall x, lb <= x <= ub -> continuity_pt f x) ->
│ │ │        {x | lb <= x <= ub /\ f x = y}.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

The derivative of a reciprocal function

│ │ │ +

The derivative of a reciprocal function

│ │ │ │ │ │
│ │ │ │ │ │ -

Continuity of the reciprocal function

│ │ │ +

Continuity of the reciprocal function

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma continuity_pt_recip_prelim : forall (f g:R->R) (lb ub : R) (Pr1:lb < ub),
│ │ │        (forall x y, lb <= x -> x < y -> y <= ub -> f x < f y) ->
│ │ │ @@ -136,15 +136,15 @@ │ │ │        f lb < b < f ub ->
│ │ │        continuity_pt g b.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Derivability of the reciprocal function

│ │ │ +

Derivability of the reciprocal function

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma derivable_pt_lim_recip_interv : forall (f g:R->R) (lb ub x:R)
│ │ │        (Prf:forall a : R, g lb <= a <= g ub -> derivable_pt f a) (Prg : continuity_pt g x),
│ │ │ @@ -209,15 +209,15 @@ │ │ │          <> 0 ->
│ │ │          derivable_pt g x.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Value of the derivative of the reciprocal function

│ │ │ +

Value of the derivative of the reciprocal function

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma derive_pt_recip_interv_prelim0 : forall (f g:R->R) (lb ub x:R)
│ │ │        (Prf:derivable_pt f (g x)) (Prg:derivable_pt g x),
│ │ │ @@ -285,15 +285,15 @@ │ │ │        1 / (derive_pt f (g x) (Prf (g x) (derive_pt_recip_interv_prelim1_1_decr f g lb ub x
│ │ │        lb_lt_ub x_encad f_decr g_wf f_eq_g))).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Existence of the derivative of a function which is the limit of a sequence of functions

│ │ │ +

Existence of the derivative of a function which is the limit of a sequence of functions

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ │ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Reals.Ratan.html │ │ │ @@ -34,19 +34,19 @@ │ │ │
│ │ │ Local Open Scope R_scope.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Preliminaries

│ │ │ +

Preliminaries

│ │ │ │ │ │
│ │ │ │ │ │ -

Various generic lemmas which probably should go somewhere else

│ │ │ +

Various generic lemmas which probably should go somewhere else

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma Boule_half_to_interval : forall x,
│ │ │   Boule (/2) posreal_half x -> 0 <= x <= 1.
│ │ │ @@ -86,19 +86,19 @@ │ │ │
│ │ │ Lemma pow2_abs : forall x, Rabs x^2 = x^2.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties of tangent

│ │ │ +

Properties of tangent

│ │ │ │ │ │
│ │ │ │ │ │ -

Derivative of tangent

│ │ │ +

Derivative of tangent

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma derivable_pt_tan : forall x, -PI/2 < x < PI/2 ->
│ │ │   derivable_pt tan x.
│ │ │ @@ -108,15 +108,15 @@ │ │ │  forall (Pr1: -PI/2 < x < PI/2),
│ │ │  derive_pt tan x (derivable_pt_tan x Pr1) = 1 + (tan x)^2.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Proof that tangent is a bijection

│ │ │ +

Proof that tangent is a bijection

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ │ │ │
│ │ │ @@ -158,19 +158,19 @@ │ │ │   tan lb < y < tan ub ->
│ │ │   {x | lb < x < ub /\ tan x = y}.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Definition of arctangent

│ │ │ +

Definition of arctangent

│ │ │ │ │ │
│ │ │ │ │ │ -

Definition of arctangent as the reciprocal function of tangent and proof of this status

│ │ │ +

Definition of arctangent as the reciprocal function of tangent and proof of this status

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma tan_1_gt_1 : tan 1 > 1.
│ │ │ │ │ │ @@ -232,15 +232,15 @@ │ │ │ Lemma atan_inv : forall x, (0 < x)%R ->
│ │ │   atan (/ x) = (PI / 2 - atan x)%R.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Derivative of arctangent

│ │ │ +

Derivative of arctangent

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma derive_pt_atan : forall x,
│ │ │   derive_pt atan x (derivable_pt_atan x) = 1 / (1 + x²).
│ │ │ @@ -249,15 +249,15 @@ │ │ │ Lemma derivable_pt_lim_atan : forall x,
│ │ │   derivable_pt_lim atan x (/ (1 + x^2)).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Definition of the arctangent function as the sum of the arctan power series

│ │ │ +

Definition of the arctangent function as the sum of the arctan power series

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ │ │ │
│ │ │ @@ -297,15 +297,15 @@ │ │ │  | right h => atan x
│ │ │  end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Proof of the equivalence of the two definitions between -1 and 1

│ │ │ +

Proof of the equivalence of the two definitions between -1 and 1

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma ps_atan0_0 : ps_atan 0 = 0.
│ │ │ │ │ │ @@ -436,15 +436,15 @@ │ │ │ Lemma PI_ineq : forall N : nat,
│ │ │   sum_f_R0 (tg_alt PI_tg) (S (2 * N)) <= PI/4 <= sum_f_R0 (tg_alt PI_tg) (2 * N).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Relation between arctangent and sine and cosine

│ │ │ +

Relation between arctangent and sine and cosine

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma sin_atan: forall x,
│ │ │   sin (atan x) = x / sqrt (1 + x²).
│ │ │ @@ -453,15 +453,15 @@ │ │ │ Lemma cos_atan: forall x,
│ │ │   cos (atan x) = 1 / sqrt(1 + x²).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Definition of arcsine based on arctangent

│ │ │ +

Definition of arcsine based on arctangent

│ │ │ │ │ │
│ │ │ │ │ │ asin is defined by cases so that it is defined in the full range from -1 .. 1 │ │ │
│ │ │
│ │ │ │ │ │ @@ -471,28 +471,28 @@ │ │ │   if Rle_dec 1 x then PI / 2 else
│ │ │   atan (x / sqrt (1 - x²)).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Relation between arcsin and arctangent

│ │ │ +

Relation between arcsin and arctangent

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma asin_atan : forall x, -1 < x < 1 ->
│ │ │   asin x = atan (x / sqrt (1 - x²)).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

arcsine of specific values

│ │ │ +

arcsine of specific values

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma asin_0 : asin 0 = 0.
│ │ │ │ │ │ @@ -506,15 +506,15 @@ │ │ │ Lemma asin_opp : forall x,
│ │ │   asin (- x) = - asin x.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Bounds of arcsine

│ │ │ +

Bounds of arcsine

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma asin_bound : forall x,
│ │ │   - (PI/2) <= asin x <= PI/2.
│ │ │ @@ -523,15 +523,15 @@ │ │ │ Lemma asin_bound_lt : forall x, -1 < x < 1 ->
│ │ │   - (PI/2) < asin x < PI/2.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

arcsine is the left and right inverse of sine

│ │ │ +

arcsine is the left and right inverse of sine

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma sin_asin : forall x, -1 <= x <= 1 ->
│ │ │   sin (asin x) = x.
│ │ │ @@ -540,15 +540,15 @@ │ │ │ Lemma asin_sin : forall x, -(PI/2) <= x <= PI/2 ->
│ │ │   asin (sin x) = x.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Relation between arcsin, cosine and tangent

│ │ │ +

Relation between arcsin, cosine and tangent

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma cos_asin : forall x, -1 <= x <= 1 ->
│ │ │   cos (asin x) = sqrt (1 - x²).
│ │ │ @@ -557,15 +557,15 @@ │ │ │ Lemma tan_asin : forall x, -1 <= x <= 1 ->
│ │ │   tan (asin x) = x / sqrt (1 - x²).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Derivative of arcsine

│ │ │ +

Derivative of arcsine

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma derivable_pt_asin : forall x, -1 < x < 1 ->
│ │ │   derivable_pt asin x.
│ │ │ @@ -574,15 +574,15 @@ │ │ │ Lemma derive_pt_asin : forall (x : R) (Hxrange : -1 < x < 1),
│ │ │    derive_pt asin x (derivable_pt_asin x Hxrange) = 1 / sqrt (1 - x²).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Definition of arccosine based on arctangent

│ │ │ +

Definition of arccosine based on arctangent

│ │ │ │ │ │
│ │ │ │ │ │ acos is defined by cases so that it is defined in the full range from -1 .. 1 │ │ │
│ │ │
│ │ │ │ │ │ @@ -592,15 +592,15 @@ │ │ │   if Rle_dec 1 x then 0 else
│ │ │   PI/2 - atan (x/sqrt(1 - x²)).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Relation between arccosine, arcsine and arctangent

│ │ │ +

Relation between arccosine, arcsine and arctangent

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma acos_atan : forall x, 0 < x ->
│ │ │   acos x = atan (sqrt (1 - x²) / x).
│ │ │ @@ -613,15 +613,15 @@ │ │ │ Lemma asin_acos : forall x, -1 <= x <= 1 ->
│ │ │   asin x = PI/2 - acos x.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

arccosine of specific values

│ │ │ +

arccosine of specific values

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma acos_0 : acos 0 = PI/2.
│ │ │ │ │ │ @@ -635,15 +635,15 @@ │ │ │
│ │ │ Lemma acos_inv_sqrt2 : acos (/sqrt 2) = PI/4.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Bounds of arccosine

│ │ │ +

Bounds of arccosine

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma acos_bound : forall x,
│ │ │   0 <= acos x <= PI.
│ │ │ @@ -652,15 +652,15 @@ │ │ │ Lemma acos_bound_lt : forall x, -1 < x < 1 ->
│ │ │   0 < acos x < PI.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

arccosine is the left and right inverse of cosine

│ │ │ +

arccosine is the left and right inverse of cosine

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma cos_acos : forall x, -1 <= x <= 1 ->
│ │ │   cos (acos x) = x.
│ │ │ @@ -669,15 +669,15 @@ │ │ │ Lemma acos_cos : forall x, 0 <= x <= PI ->
│ │ │   acos (cos x) = x.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Relation between arccosine, sine and tangent

│ │ │ +

Relation between arccosine, sine and tangent

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma sin_acos : forall x, -1 <= x <= 1 ->
│ │ │   sin (acos x) = sqrt (1 - x²).
│ │ │ @@ -686,15 +686,15 @@ │ │ │ Lemma tan_acos : forall x, -1 <= x <= 1 ->
│ │ │   tan (acos x) = sqrt (1 - x²) / x.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Derivative of arccosine

│ │ │ +

Derivative of arccosine

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma derivable_pt_acos : forall x, -1 < x < 1 ->
│ │ │   derivable_pt acos x.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Reals.Raxioms.html │ │ │ @@ -35,19 +35,19 @@ │ │ │ Require Export Rdefinitions.
│ │ │ Local Open Scope R_scope.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Field operations

│ │ │ +

Field operations

│ │ │ │ │ │
│ │ │ │ │ │ -

Addition

│ │ │ +

Addition

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Open Scope CReal_scope.
│ │ │ │ │ │ @@ -103,15 +103,15 @@ │ │ │ Lemma Rplus_0_l : forall r:R, 0 + r = r.
│ │ │ Hint Resolve Rplus_0_l: real.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Multiplication

│ │ │ +

Multiplication

│ │ │ │ │ │
│ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Lemma Rmult_comm : forall r1 r2:R, r1 * r2 = r2 * r1.
│ │ │ @@ -133,34 +133,34 @@ │ │ │ Lemma R1_neq_R0 : 1 <> 0.
│ │ │ Hint Resolve R1_neq_R0: real.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Distributivity

│ │ │ +

Distributivity

│ │ │ │ │ │
│ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Lemma
│ │ │   Rmult_plus_distr_l : forall r1 r2 r3:R, r1 * (r2 + r3) = r1 * r2 + r1 * r3.
│ │ │ Hint Resolve Rmult_plus_distr_l: real.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Order

│ │ │ +

Order

│ │ │ │ │ │
│ │ │ │ │ │ -

Lower

│ │ │ +

Lower

│ │ │ │ │ │
│ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Lemma Rlt_asym : forall r1 r2:R, r1 < r2 -> ~ r2 < r1.
│ │ │ @@ -177,15 +177,15 @@ │ │ │
│ │ │ Hint Resolve Rlt_asym Rplus_lt_compat_l Rmult_lt_compat_l: real.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Injection from N to R

│ │ │ +

Injection from N to R

│ │ │ │ │ │
│ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Fixpoint INR (n:nat) : R :=
│ │ │ @@ -195,15 +195,15 @@ │ │ │   | S n => INR n + 1
│ │ │   end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

R Archimedean

│ │ │ +

R Archimedean

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma Rrepr_INR : forall n : nat,
│ │ │     CRealEq (Rrepr (INR n)) (inject_Z (Z.of_nat n)).
│ │ │ @@ -223,15 +223,15 @@ │ │ │
│ │ │ Lemma archimed : forall r:R, IZR (up r) > r /\ IZR (up r) - r <= 1.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

R Complete

│ │ │ +

R Complete

│ │ │ │ │ │
│ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Definition is_upper_bound (E:R -> Prop) (m:R) := forall x:R, E x -> x <= m.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Reals.Rbasic_fun.html │ │ │ @@ -31,15 +31,15 @@ │ │ │
│ │ │ Implicit Type r : R.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Rmin

│ │ │ +

Rmin

│ │ │ │ │ │
│ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Definition Rmin (x y:R) : R :=
│ │ │ @@ -97,15 +97,15 @@ │ │ │
│ │ │ Lemma Rmin_glb_lt : forall x y z:R, z < x -> z < y -> z < Rmin x y.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Rmax

│ │ │ +

Rmax

│ │ │ │ │ │
│ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Definition Rmax (x y:R) : R :=
│ │ │ @@ -169,15 +169,15 @@ │ │ │
│ │ │ Lemma Rmax_neg : forall x y:R, x < 0 -> y < 0 -> Rmax x y < 0.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Rabsolu

│ │ │ +

Rabsolu

│ │ │ │ │ │
│ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Lemma Rcase_abs : forall r, {r < 0} + {r >= 0}.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Reals.Rdefinitions.html │ │ │ @@ -138,15 +138,15 @@ │ │ │ Notation "x < y < z" := (x < y /\ y < z) : R_scope.
│ │ │ Notation "x < y <= z" := (x < y /\ y <= z) : R_scope.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Injection from Z to R

│ │ │ +

Injection from Z to R

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Fixpoint IPR_2 (p:positive) : R :=
│ │ │   match p with
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Reals.Rfunctions.html │ │ │ @@ -40,15 +40,15 @@ │ │ │ Local Open Scope nat_scope.
│ │ │ Local Open Scope R_scope.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Lemmas about factorial

│ │ │ +

Lemmas about factorial

│ │ │ │ │ │
│ │ │
│ │ │ Lemma INR_fact_neq_0 : forall n:nat, INR (fact n) <> 0.
│ │ │ │ │ │
│ │ │ Lemma fact_simpl : forall n:nat, fact (S n) = (S n * fact n)%nat.
│ │ │ @@ -57,15 +57,15 @@ │ │ │ Lemma simpl_fact :
│ │ │   forall n:nat, / INR (fact (S n)) * / / INR (fact n) = / INR (S n).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Power

│ │ │ +

Power

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Infix "^" := pow : R_scope.
│ │ │ │ │ │ @@ -185,15 +185,15 @@ │ │ │
│ │ │ Lemma Rsqr_pow2 : forall x, Rsqr x = x ^ 2.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

PowerRZ

│ │ │ +

PowerRZ

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Section PowerRZ.
│ │ │ │ │ │ @@ -307,15 +307,15 @@ │ │ │
│ │ │ Definition decimal_exp (r:R) (z:Z) : R := (r * 10 ^Z z).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Sum of n first naturals

│ │ │ +

Sum of n first naturals

│ │ │ │ │ │
│ │ │
│ │ │ Fixpoint sum_nat_f_O (f:nat -> nat) (n:nat) : nat :=
│ │ │   match n with
│ │ │     | O => f 0%nat
│ │ │     | S n' => (sum_nat_f_O f n' + f (S n'))%nat
│ │ │ @@ -331,15 +331,15 @@ │ │ │
│ │ │ Definition sum_nat (s n:nat) : nat := sum_nat_f s n (fun x:nat => x).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Sum

│ │ │ +

Sum

│ │ │ │ │ │
│ │ │
│ │ │ Fixpoint sum_f_R0 (f:nat -> R) (N:nat) : R :=
│ │ │   match N with
│ │ │     | O => f 0%nat
│ │ │     | S i => sum_f_R0 f i + f (S i)
│ │ │ @@ -359,15 +359,15 @@ │ │ │   forall (x:nat -> R) (n:nat),
│ │ │     Rabs (sum_f_R0 x n) <= sum_f_R0 (fun i:nat => Rabs (x i)) n.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Distance in R

│ │ │ +

Distance in R

│ │ │ │ │ │
│ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Definition R_dist (x y:R) : R := Rabs (x - y).
│ │ │ @@ -395,15 +395,15 @@ │ │ │ Lemma R_dist_mult_l : forall a b c,
│ │ │   R_dist (a * b) (a * c) = Rabs a * R_dist b c.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Infinite Sum

│ │ │ +

Infinite Sum

│ │ │ │ │ │
│ │ │
│ │ │ Definition infinite_sum (s:nat -> R) (l:R) : Prop :=
│ │ │   forall eps:R,
│ │ │     eps > 0 ->
│ │ │     exists N : nat,
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Reals.Rgeom.html │ │ │ @@ -23,15 +23,15 @@ │ │ │ Require Import R_sqrt.
│ │ │ Local Open Scope R_scope.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Distance

│ │ │ +

Distance

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition dist_euc (x0 y0 x1 y1:R) : R :=
│ │ │   sqrt (Rsqr (x0 - x1) + Rsqr (y0 - y1)).
│ │ │ @@ -57,15 +57,15 @@ │ │ │   forall x0 y0 x1 y1 x2 y2:R,
│ │ │     dist_euc x0 y0 x1 y1 <= dist_euc x0 y0 x2 y2 + dist_euc x2 y2 x1 y1.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Translation

│ │ │ +

Translation

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition xt (x tx:R) : R := x + tx.
│ │ │ Definition yt (y ty:R) : R := y + ty.
│ │ │ @@ -79,15 +79,15 @@ │ │ │     Rsqr (x1 - x2) + Rsqr (y1 - y2) =
│ │ │     Rsqr (xt x1 tx - xt x2 tx) + Rsqr (yt y1 ty - yt y2 ty).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Rotation

│ │ │ +

Rotation

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition xr (x y theta:R) : R := x * cos theta + y * sin theta.
│ │ │ Definition yr (x y theta:R) : R := - x * sin theta + y * cos theta.
│ │ │ @@ -113,15 +113,15 @@ │ │ │     dist_euc (xr x1 y1 theta) (yr x1 y1 theta) (xr x2 y2 theta)
│ │ │     (yr x2 y2 theta).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Similarity

│ │ │ +

Similarity

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma isometric_rot_trans :
│ │ │   forall x1 y1 x2 y2 tx ty theta:R,
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Reals.RiemannInt_SF.html │ │ │ @@ -27,15 +27,15 @@ │ │ │
│ │ │ Set Implicit Arguments.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Each bounded subset of N has a maximal element

│ │ │ +

Each bounded subset of N has a maximal element

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition Nbound (I:nat -> Prop) : Prop :=
│ │ │   exists n : nat, (forall i:nat, I i -> (i <= n)%nat).
│ │ │ @@ -49,15 +49,15 @@ │ │ │     (exists n : nat, I n) ->
│ │ │     Nbound I -> { n:nat | I n /\ (forall i:nat, I i -> (i <= n)%nat) }.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Step functions

│ │ │ +

Step functions

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition open_interval (a b x:R) : Prop := a < x < b.
│ │ │ Definition co_interval (a b x:R) : Prop := a <= x < b.
│ │ │ @@ -89,15 +89,15 @@ │ │ │ Definition IsStepFun (f:R -> R) (a b:R) : Type :=
│ │ │   { l:list R & is_subdivision f a b l }.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Class of step functions

│ │ │ +

Class of step functions

│ │ │ │ │ │
│ │ │
│ │ │ Record StepFun (a b:R) : Type := mkStepFun
│ │ │   {fe :> R -> R; pre : IsStepFun fe a b}.
│ │ │ │ │ │
│ │ │ @@ -121,29 +121,29 @@ │ │ │       end
│ │ │   end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Integral of step functions

│ │ │ +

Integral of step functions

│ │ │ │ │ │
│ │ │
│ │ │ Definition RiemannInt_SF (a b:R) (f:StepFun a b) : R :=
│ │ │   match Rle_dec a b with
│ │ │     | left _ => Int_SF (subdivision_val f) (subdivision f)
│ │ │     | right _ => - Int_SF (subdivision_val f) (subdivision f)
│ │ │   end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties of step functions

│ │ │ +

Properties of step functions

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma StepFun_P1 :
│ │ │   forall (a b:R) (f:StepFun a b),
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Reals.Rlimit.html │ │ │ @@ -29,15 +29,15 @@ │ │ │ Require Import Lra.
│ │ │ Local Open Scope R_scope.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Calculus

│ │ │ +

Calculus

│ │ │ │ │ │
│ │ │
│ │ │ Lemma eps2_Rgt_R0 : forall eps:R, eps > 0 -> eps * / 2 > 0.
│ │ │ │ │ │
│ │ │ Lemma eps2 : forall eps:R, eps * / 2 + eps * / 2 = eps.
│ │ │ @@ -67,15 +67,15 @@ │ │ │ Lemma mul_factor_gt_f :
│ │ │   forall eps l l':R, eps > 0 -> Rmin 1 (eps * mul_factor l l') > 0.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Metric space

│ │ │ +

Metric space

│ │ │ │ │ │
│ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Record Metric_Space : Type :=
│ │ │ @@ -86,15 +86,15 @@ │ │ │     dist_refl : forall x y:Base, dist x y = 0 <-> x = y;
│ │ │     dist_tri : forall x y z:Base, dist x y <= dist x z + dist z y}.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Limit in Metric space

│ │ │ +

Limit in Metric space

│ │ │ │ │ │
│ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Definition limit_in (X X':Metric_Space) (f:Base X -> Base X')
│ │ │ @@ -105,15 +105,15 @@ │ │ │       alp > 0 /\
│ │ │       (forall x:Base X, D x /\ (dist X) x x0 < alp -> (dist X') (f x) l < eps).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

R is a metric space

│ │ │ +

R is a metric space

│ │ │ │ │ │
│ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Definition R_met : Metric_Space :=
│ │ │ @@ -121,15 +121,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Limit 1 arg

│ │ │ +

Limit 1 arg

│ │ │ │ │ │
│ │ │
│ │ │ Definition Dgf (Df Dg:R -> Prop) (f:R -> R) (x:R) := Df x /\ Dg (f x).
│ │ │ │ │ │
│ │ │ Definition limit1_in (f:R -> R) (D:R -> Prop) (l x0:R) : Prop :=
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Reals.Rlogic.html │ │ │ @@ -41,15 +41,15 @@ │ │ │
│ │ │ Require Import RIneq.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Decidability of arithmetical statements

│ │ │ +

Decidability of arithmetical statements

│ │ │ │ │ │
│ │ │ │ │ │ One can iterate this lemma and use classical logic to decide any │ │ │ statement in the arithmetical hierarchy. │ │ │
│ │ │
│ │ │ @@ -67,15 +67,15 @@ │ │ │
│ │ │ End Arithmetical_dec.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Derivability of the Archimedean axiom

│ │ │ +

Derivability of the Archimedean axiom

│ │ │ │ │ │
│ │ │ │ │ │ This is a standard proof (it has been taken from PlanetMath). It is │ │ │ formulated negatively so as to avoid the need for classical │ │ │ logic. Using a proof of {n | ~P n}+{forall n, P n}, we can in │ │ │ principle also derive up and its specification. The proof above │ │ │ @@ -87,15 +87,15 @@ │ │ │ Theorem not_not_archimedean :
│ │ │   forall r : R, ~ (forall n : nat, (INR n <= r)%R).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Decidability of negated formulas

│ │ │ +

Decidability of negated formulas

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma sig_not_dec : forall P : Prop, {not (not P)} + {not P}.
│ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Reals.Rminmax.html │ │ │ @@ -18,15 +18,15 @@ │ │ │
│ │ │ Require Import Orders Rbase Rbasic_fun ROrderedType GenericMinMax.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Maximum and Minimum of two real numbers

│ │ │ +

Maximum and Minimum of two real numbers

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Local Open Scope R_scope.
│ │ │ │ │ │ @@ -75,15 +75,15 @@ │ │ │
│ │ │ Include UsualMinMaxProperties R_as_OT RHasMinMax.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties specific to the R domain

│ │ │ +

Properties specific to the R domain

│ │ │ │ │ │
│ │ │ │ │ │ Compatibilities (consequences of monotonicity) │ │ │
│ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Reals.Rpower.html │ │ │ @@ -40,15 +40,15 @@ │ │ │
│ │ │ Lemma exp_le_3 : exp 1 <= 3.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties of Exp

│ │ │ +

Properties of Exp

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Theorem exp_increasing : forall x y:R, x < y -> exp x < exp y.
│ │ │ │ │ │ @@ -84,15 +84,15 @@ │ │ │
│ │ │ Theorem exp_Ropp : forall x:R, exp (- x) = / exp x.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties of Ln

│ │ │ +

Properties of Ln

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Theorem ln_increasing : forall x y:R, 0 < x -> x < y -> ln x < ln y.
│ │ │ │ │ │ @@ -118,29 +118,29 @@ │ │ │ Theorem ln_continue :
│ │ │   forall y:R, 0 < y -> continue_in ln (fun x:R => 0 < x) y.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Definition of Rpower

│ │ │ +

Definition of Rpower

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition Rpower (x y:R) := exp (y * ln x).
│ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties of Rpower

│ │ │ +

Properties of Rpower

│ │ │ │ │ │
│ │ │ │ │ │ Note: Rpower is prolongated to 1 on negative real numbers and │ │ │ it thus does not extend integer power. The next two lemmas, which │ │ │ hold for integer power, accidentally hold on negative real numbers │ │ │ as a side effect of the default value taken on negative real │ │ │ @@ -187,15 +187,15 @@ │ │ │
│ │ │ Theorem ln_lt_2 : / 2 < ln 2.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Differentiability of Ln and Rpower

│ │ │ +

Differentiability of Ln and Rpower

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Theorem limit1_ext :
│ │ │   forall (f g:R -> R) (D:R -> Prop) (l x:R),
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Reals.Rseries.html │ │ │ @@ -24,15 +24,15 @@ │ │ │
│ │ │ Implicit Type r : R.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Definition of sequence and properties

│ │ │ +

Definition of sequence and properties

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Section sequence.
│ │ │ │ │ │ @@ -96,15 +96,15 @@ │ │ │
│ │ │ End sequence.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Definition of Power Series and properties

│ │ │ +

Definition of Power Series and properties

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Section Isequence.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Reals.Rtopology.html │ │ │ @@ -25,15 +25,15 @@ │ │ │ Require Import Classical_Pred_Type.
│ │ │ Local Open Scope R_scope.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

General definitions and propositions

│ │ │ +

General definitions and propositions

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition included (D1 D2:R -> Prop) : Prop := forall x:R, D1 x -> D2 x.
│ │ │ Definition disc (x:R) (delta:posreal) (y:R) : Prop := Rabs (y - x) < delta.
│ │ │ @@ -273,15 +273,15 @@ │ │ │     (forall c:R, a <= c <= b -> continuity_pt f c) ->
│ │ │     exists mx : R, (forall c:R, a <= c <= b -> f mx <= f c) /\ a <= mx <= b.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Proof of Bolzano-Weierstrass theorem

│ │ │ +

Proof of Bolzano-Weierstrass theorem

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition ValAdh (un:nat -> R) (x:R) : Prop :=
│ │ │   forall (V:R -> Prop) (N:nat),
│ │ │ @@ -346,15 +346,15 @@ │ │ │   forall (un:nat -> R) (X:R -> Prop),
│ │ │     compact X -> (forall n:nat, X (un n)) -> exists l : R, ValAdh un l.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Proof of Heine's theorem

│ │ │ +

Proof of Heine's theorem

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition uniform_continuity (f:R -> R) (X:R -> Prop) : Prop :=
│ │ │   forall eps:posreal,
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Reals.Rtrigo1.html │ │ │ @@ -130,15 +130,15 @@ │ │ │     1 - tan x * tan y <> 0 ->
│ │ │     tan (x + y) = (tan x + tan y) / (1 - tan x * tan y).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Some properties of cos, sin and tan

│ │ │ +

Some properties of cos, sin and tan

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma sin_2a : forall x:R, sin (2 * x) = 2 * sin x * cos x.
│ │ │ │ │ │ @@ -224,15 +224,15 @@ │ │ │
│ │ │ Lemma cos_sin_0_var : forall x:R, cos x <> 0 \/ sin x <> 0.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Using series definitions of cos and sin

│ │ │ +

Using series definitions of cos and sin

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition sin_lb (a:R) : R := sin_approx a 3.
│ │ │ Definition sin_ub (a:R) : R := sin_approx a 4.
│ │ │ @@ -258,15 +258,15 @@ │ │ │
│ │ │ Lemma PI2_Rlt_PI : PI / 2 < PI.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Increasing and decreasing of cos and sin

│ │ │ +

Increasing and decreasing of cos and sin

│ │ │ │ │ │
│ │ │
│ │ │ Theorem sin_gt_0 : forall x:R, 0 < x -> x < PI -> 0 < sin x.
│ │ │ │ │ │
│ │ │ Theorem cos_gt_0 : forall x:R, - (PI / 2) < x -> x < PI / 2 -> 0 < cos x.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Reals.Rtrigo_def.html │ │ │ @@ -19,15 +19,15 @@ │ │ │ Require Import Rbase Rfunctions SeqSeries Rtrigo_fun Max.
│ │ │ Local Open Scope R_scope.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Definition of exponential

│ │ │ +

Definition of exponential

│ │ │ │ │ │
│ │ │
│ │ │ Definition exp_in (x l:R) : Prop :=
│ │ │   infinite_sum (fun i:nat => / INR (fact i) * x ^ i) l.
│ │ │ │ │ │
│ │ │ @@ -48,15 +48,15 @@ │ │ │
│ │ │ Lemma exp_0 : exp 0 = 1.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Definition of hyperbolic functions

│ │ │ +

Definition of hyperbolic functions

│ │ │ │ │ │
│ │ │
│ │ │ Definition cosh (x:R) : R := (exp x + exp (- x)) / 2.
│ │ │ Definition sinh (x:R) : R := (exp x - exp (- x)) / 2.
│ │ │ Definition tanh (x:R) : R := sinh x / cosh x.
│ │ │ │ │ │ @@ -122,15 +122,15 @@ │ │ │
│ │ │ Definition sin (x:R) : R := let (a,_) := exist_sin (Rsqr x) in x * a.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties

│ │ │ +

Properties

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma cos_sym : forall x:R, cos x = cos (- x).
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Reals.Rtrigo_facts.html │ │ │ @@ -27,15 +27,15 @@ │ │ │
│ │ │ Local Open Scope R_scope.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Bounds of expressions with trigonometric functions

│ │ │ +

Bounds of expressions with trigonometric functions

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma sin2_bound : forall x,
│ │ │   0 <= (sin x <= 1.
│ │ │ @@ -44,19 +44,19 @@ │ │ │ Lemma cos2_bound : forall x,
│ │ │   0 <= (cos x <= 1.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Express trigonometric functions with each other

│ │ │ +

Express trigonometric functions with each other

│ │ │ │ │ │
│ │ │ │ │ │ -

Express sin and cos with each other

│ │ │ +

Express sin and cos with each other

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma cos_sin : forall x, cos x >=0 ->
│ │ │   cos x = sqrt(1 - (sin x).
│ │ │ @@ -81,15 +81,15 @@ │ │ │ Lemma sin_cos_Rabs : forall x,
│ │ │   Rabs (sin x) = sqrt(1 - (cos x).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Express tan with sin and cos

│ │ │ +

Express tan with sin and cos

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma tan_sin : forall x, 0 <= cos x ->
│ │ │   tan x = sin x / sqrt (1 - (sin x).
│ │ │ @@ -114,15 +114,15 @@ │ │ │ Lemma tan_cos_opp : forall x, 0 >= sin x ->
│ │ │   tan x = - sqrt (1 - (cos x) / cos x.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Express sin and cos with tan

│ │ │ +

Express sin and cos with tan

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma sin_tan : forall x, 0 < cos x ->
│ │ │   sin x = tan x / sqrt (1 + (tan x).
│ │ │ @@ -131,15 +131,15 @@ │ │ │ Lemma cos_tan : forall x, 0 < cos x ->
│ │ │   cos x = 1 / sqrt (1 + (tan x).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Additional shift lemmas for sin, cos, tan

│ │ │ +

Additional shift lemmas for sin, cos, tan

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma sin_pi_minus : forall x,
│ │ │   sin (PI - x) = sin x.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Relations.Operators_Properties.html │ │ │ @@ -15,16 +15,16 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Some properties of the operators on relations

│ │ │ -

Initial version by Bruno Barras

│ │ │ +

Some properties of the operators on relations

│ │ │ +

Initial version by Bruno Barras

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Require Import Relation_Definitions.
│ │ │ Require Import Relation_Operators.
│ │ │ @@ -132,20 +132,20 @@ │ │ │
│ │ │   Section Equivalences.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Equivalences between the different definition of the reflexive,

│ │ │ +

Equivalences between the different definition of the reflexive,

│ │ │ │ │ │ symmetric, transitive closures │ │ │
│ │ │ │ │ │ -

Contributed by P. Castéran

│ │ │ +

Contributed by P. Castéran

│ │ │ │ │ │
│ │ │ │ │ │ Direct transitive closure vs left-step extension │ │ │
│ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Relations.Relation_Operators.html │ │ │ @@ -15,34 +15,34 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Some operators on relations

│ │ │ -

Initial authors: Bruno Barras, Cristina Cornes

│ │ │ -

│ │ │ -

Some of the initial definitions were taken from :

│ │ │ -

Constructing Recursion Operators in Type Theory

│ │ │ -

L. Paulson JSC (1986) 2, 325-355

│ │ │ -

│ │ │ -

Further extensions by Pierre Castéran

│ │ │ +

Some operators on relations

│ │ │ +

Initial authors: Bruno Barras, Cristina Cornes

│ │ │ +

│ │ │ +

Some of the initial definitions were taken from :

│ │ │ +

Constructing Recursion Operators in Type Theory

│ │ │ +

L. Paulson JSC (1986) 2, 325-355

│ │ │ +

│ │ │ +

Further extensions by Pierre Castéran

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Require Import Relation_Definitions.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Transitive closure

│ │ │ +

Transitive closure

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Section Transitive_Closure.
│ │ │   Variable A : Type.
│ │ │ @@ -90,15 +90,15 @@ │ │ │
│ │ │ End Transitive_Closure.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Reflexive closure

│ │ │ +

Reflexive closure

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Section Reflexive_Closure.
│ │ │   Variable A : Type.
│ │ │ @@ -120,15 +120,15 @@ │ │ │
│ │ │ End Reflexive_Closure.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Reflexive-transitive closure

│ │ │ +

Reflexive-transitive closure

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Section Reflexive_Transitive_Closure.
│ │ │   Variable A : Type.
│ │ │ @@ -180,15 +180,15 @@ │ │ │
│ │ │ End Reflexive_Transitive_Closure.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Reflexive-symmetric-transitive closure

│ │ │ +

Reflexive-symmetric-transitive closure

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Section Reflexive_Symmetric_Transitive_Closure.
│ │ │   Variable A : Type.
│ │ │ @@ -242,15 +242,15 @@ │ │ │
│ │ │ End Reflexive_Symmetric_Transitive_Closure.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Converse of a relation

│ │ │ +

Converse of a relation

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Section Converse.
│ │ │   Variable A : Type.
│ │ │ @@ -260,15 +260,15 @@ │ │ │   Definition transp (x y:A) := R y x.
│ │ │ End Converse.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Union of relations

│ │ │ +

Union of relations

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Section Union.
│ │ │   Variable A : Type.
│ │ │ @@ -278,15 +278,15 @@ │ │ │   Definition union (x y:A) := R1 x y \/ R2 x y.
│ │ │ End Union.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Disjoint union of relations

│ │ │ +

Disjoint union of relations

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Section Disjoint_Union.
│ │ │ Variables A B : Type.
│ │ │ @@ -302,15 +302,15 @@ │ │ │
│ │ │ End Disjoint_Union.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Lexicographic order on dependent pairs

│ │ │ +

Lexicographic order on dependent pairs

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Section Lexicographic_Product.
│ │ │ │ │ │ @@ -332,15 +332,15 @@ │ │ │
│ │ │ End Lexicographic_Product.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Product of relations

│ │ │ +

Product of relations

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Section Symmetric_Product.
│ │ │   Variable A : Type.
│ │ │ @@ -358,15 +358,15 @@ │ │ │
│ │ │ End Symmetric_Product.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Multiset of two relations

│ │ │ +

Multiset of two relations

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Section Swap.
│ │ │   Variable A : Type.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Sorting.CPermutation.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Circular Shifts (aka Cyclic Permutations)

│ │ │ +

Circular Shifts (aka Cyclic Permutations)

│ │ │ │ │ │
│ │ │ │ │ │ The main inductive CPermutation relates lists up to circular shifts of their elements. │ │ │ │ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Sorting.Heap.html │ │ │ @@ -36,19 +36,19 @@ │ │ │
│ │ │ Section defs.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Trees and heap trees

│ │ │ +

Trees and heap trees

│ │ │ │ │ │
│ │ │ │ │ │ -

Definition of trees over an ordered set

│ │ │ +

Definition of trees over an ordered set

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │   Variable A : Type.
│ │ │   Variable leA : relation A.
│ │ │ @@ -100,15 +100,15 @@ │ │ │   Lemma leA_Tree_Node :
│ │ │     forall (a b:A) (G D:Tree), leA a b -> leA_Tree a (Tree_Node b G D).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

The heap property

│ │ │ +

The heap property

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │   Inductive is_heap : Tree -> Prop :=
│ │ │     | nil_is_heap : is_heap Tree_Leaf
│ │ │ @@ -148,15 +148,15 @@ │ │ │   Lemma low_trans :
│ │ │     forall (T:Tree) (a b:A), leA a b -> leA_Tree b T -> leA_Tree a T.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Merging two sorted lists

│ │ │ +

Merging two sorted lists

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │    Inductive merge_lem (l1 l2:list A) : Type :=
│ │ │     merge_exist :
│ │ │ @@ -179,15 +179,15 @@ │ │ │     forall l1:list A, Sorted leA l1 ->
│ │ │     forall l2:list A, Sorted leA l2 -> merge_lem l1 l2.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

From trees to multisets

│ │ │ +

From trees to multisets

│ │ │ │ │ │
│ │ │ │ │ │ contents of a tree as a multiset │ │ │
│ │ │ │ │ │ Nota Bene : In what follows the definition of SingletonBag │ │ │ @@ -213,19 +213,19 @@ │ │ │
│ │ │   Definition equiv_Tree (t1 t2:Tree) := meq (contents t1) (contents t2).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

From lists to sorted lists

│ │ │ +

From lists to sorted lists

│ │ │ │ │ │
│ │ │ │ │ │ -

Specification of heap insertion

│ │ │ +

Specification of heap insertion

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │   Inductive insert_spec (a:A) (T:Tree) : Type :=
│ │ │     insert_exist :
│ │ │ @@ -238,15 +238,15 @@ │ │ │
│ │ │   Lemma insert : forall T:Tree, is_heap T -> forall a:A, insert_spec a T.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Building a heap from a list

│ │ │ +

Building a heap from a list

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │   Inductive build_heap (l:list A) : Type :=
│ │ │     heap_exist :
│ │ │ @@ -257,15 +257,15 @@ │ │ │
│ │ │   Lemma list_to_heap : forall l:list A, build_heap l.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Building the sorted list

│ │ │ +

Building the sorted list

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │   Inductive flat_spec (T:Tree) : Type :=
│ │ │     flat_exist :
│ │ │ @@ -277,15 +277,15 @@ │ │ │
│ │ │   Lemma heap_to_list : forall T:Tree, is_heap T -> flat_spec T.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Specification of treesort

│ │ │ +

Specification of treesort

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │   Theorem treesort :
│ │ │     forall l:list A,
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Sorting.PermutSetoid.html │ │ │ @@ -53,15 +53,15 @@ │ │ │
│ │ │ Section Permut.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

From lists to multisets

│ │ │ +

From lists to multisets

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Variable A : Type.
│ │ │ Variable eqA : relation A.
│ │ │ @@ -92,15 +92,15 @@ │ │ │   forall l m:list A,
│ │ │     meq (list_contents (l ++ m)) (munion (list_contents l) (list_contents m)).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

permutation: definition and basic properties

│ │ │ +

permutation: definition and basic properties

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition permutation (l m:list A) := meq (list_contents l) (list_contents m).
│ │ │ │ │ │ @@ -166,15 +166,15 @@ │ │ │ Lemma permut_rev :
│ │ │   forall l, permutation l (rev l).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Some inversion results.

│ │ │ +

Some inversion results.

│ │ │ │ │ │
│ │ │
│ │ │ Lemma permut_conv_inv :
│ │ │   forall e l1 l2, permutation (e :: l1) (e :: l2) -> permutation l1 l2.
│ │ │ │ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Sorting.Permutation.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

List permutations as a composition of adjacent transpositions

│ │ │ +

List permutations as a composition of adjacent transpositions

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ │ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Strings.Ascii.html │ │ │ @@ -27,15 +27,15 @@ │ │ │
│ │ │ Require Import Bool BinPos BinNat PeanoNat Nnat Coq.Strings.Byte.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Definition of ascii characters

│ │ │ +

Definition of ascii characters

│ │ │ │ │ │
│ │ │ │ │ │ Definition of ascii character as a 8 bits constructor │ │ │
│ │ │
│ │ │ │ │ │ @@ -103,15 +103,15 @@ │ │ │ Lemma eqb_neq x y : (x =? y)%char = false <-> x <> y.
│ │ │ Lemma eqb_compat: Morphisms.Proper (Morphisms.respectful eq (Morphisms.respectful eq eq)) eqb.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Conversion between natural numbers modulo 256 and ascii characters

│ │ │ +

Conversion between natural numbers modulo 256 and ascii characters

│ │ │ │ │ │
│ │ │ │ │ │ Auxiliary function that turns a positive into an ascii by │ │ │ looking at the last 8 bits, ie z mod 2^8 │ │ │
│ │ │
│ │ │ @@ -214,15 +214,15 @@ │ │ │ Theorem nat_ascii_bounded :
│ │ │   forall a : ascii, nat_of_ascii a < 256.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Concrete syntax

│ │ │ +

Concrete syntax

│ │ │ │ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Ascii characters can be represented in scope char_scope as follows: │ │ ├── ./usr/share/doc/coq-theories/html/Coq.Strings.String.html │ │ │ @@ -30,15 +30,15 @@ │ │ │ Require Import Bool.
│ │ │ Require Import Coq.Strings.Byte.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Definition of strings

│ │ │ +

Definition of strings

│ │ │ │ │ │
│ │ │ │ │ │ Implementation of string as list of ascii characters │ │ │
│ │ │
│ │ │ │ │ │ @@ -96,15 +96,15 @@ │ │ │ Lemma eqb_neq x y : (x =? y)%string = false <-> x <> y.
│ │ │ Lemma eqb_compat: Morphisms.Proper (Morphisms.respectful eq (Morphisms.respectful eq eq)) eqb.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Concatenation of strings

│ │ │ +

Concatenation of strings

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Reserved Notation "x ++ y" (right associativity, at level 60).
│ │ │ │ │ │ @@ -187,15 +187,15 @@ │ │ │  forall (s1 s2 : string) (n : nat),
│ │ │  get n s2 = get (n + length s1) (s1 ++ s2).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Substrings

│ │ │ +

Substrings

│ │ │ │ │ │
│ │ │ │ │ │ substring n m s returns the substring of s that starts │ │ │ at position n and of length m; │ │ │ if this does not make sense it returns "" │ │ │
│ │ │ @@ -236,15 +236,15 @@ │ │ │ Theorem substring_correct2 :
│ │ │  forall (s : string) (n m p : nat), m <= p -> get p (substring n m s) = None.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Concatenating lists of strings

│ │ │ +

Concatenating lists of strings

│ │ │ │ │ │
│ │ │ │ │ │ concat sep sl concatenates the list of strings sl, inserting │ │ │ the separator string sep between each. │ │ │
│ │ │
│ │ │ @@ -257,15 +257,15 @@ │ │ │   | cons x xs => x ++ sep ++ concat sep xs
│ │ │   end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Test functions

│ │ │ +

Test functions

│ │ │ │ │ │
│ │ │ │ │ │ Test if s1 is a prefix of s2 │ │ │
│ │ │
│ │ │ │ │ │ @@ -409,15 +409,15 @@ │ │ │   | None => O
│ │ │   end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Conversion to/from list ascii and list byte

│ │ │ +

Conversion to/from list ascii and list byte

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Fixpoint string_of_list_ascii (s : list ascii) : string
│ │ │   := match s with
│ │ │ @@ -452,15 +452,15 @@ │ │ │
│ │ │ Lemma list_byte_of_string_of_list_byte s : list_byte_of_string (string_of_list_byte s) = s.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Concrete syntax

│ │ │ +

Concrete syntax

│ │ │ │ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ The concrete syntax for strings in scope string_scope follows the │ │ ├── ./usr/share/doc/coq-theories/html/Coq.Structures.DecidableType.html │ │ │ @@ -26,39 +26,39 @@ │ │ │
│ │ │ │ │ │
│ │ │ NB: This file is here only for compatibility with earlier version of │ │ │ FSets and FMap. Please use Structures/Equalities.v directly now. │ │ │
│ │ │ │ │ │ -

Types with Equalities, and nothing more (for subtyping purpose)

│ │ │ +

Types with Equalities, and nothing more (for subtyping purpose)

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module Type EqualityType := Equalities.EqualityTypeOrig.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Types with decidable Equalities (but no ordering)

│ │ │ +

Types with decidable Equalities (but no ordering)

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module Type DecidableType := Equalities.DecidableTypeOrig.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Additional notions about keys and datas used in FMap

│ │ │ +

Additional notions about keys and datas used in FMap

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module KeyDecidableType(D:DecidableType).
│ │ │  Import D.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Structures.DecidableTypeEx.html │ │ │ @@ -23,15 +23,15 @@ │ │ │
│ │ │ │ │ │
│ │ │ NB: This file is here only for compatibility with earlier version of │ │ │ FSets and FMap. Please use Structures/Equalities.v directly now. │ │ │
│ │ │ │ │ │ -

Examples of Decidable Type structures.

│ │ │ +

Examples of Decidable Type structures.

│ │ │ │ │ │
│ │ │ │ │ │ A particular case of DecidableType where │ │ │ the equality is the usual one of Coq. │ │ │
│ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Structures.Equalities.html │ │ │ @@ -35,29 +35,29 @@ │ │ │ Module Type Nop.
│ │ │ End Nop.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Structure with just a base type t

│ │ │ +

Structure with just a base type t

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module Type Typ.
│ │ │   Parameter Inline(10) t : Type.
│ │ │ End Typ.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Structure with an equality relation eq

│ │ │ +

Structure with an equality relation eq

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module Type HasEq (Import T:Typ).
│ │ │   Parameter Inline(30) eq : t -> t -> Prop.
│ │ │ @@ -75,29 +75,29 @@ │ │ │
│ │ │ Module Type Eq' := Eq <+ EqNotation.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Specification of the equality via the Equivalence type class

│ │ │ +

Specification of the equality via the Equivalence type class

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module Type IsEq (Import E:Eq).
│ │ │   Declare Instance eq_equiv : Equivalence eq.
│ │ │ End IsEq.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Earlier specification of equality by three separate lemmas.

│ │ │ +

Earlier specification of equality by three separate lemmas.

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module Type IsEqOrig (Import E:Eq').
│ │ │   Axiom eq_refl : forall x : t, x==x.
│ │ │ @@ -107,29 +107,29 @@ │ │ │   Hint Resolve eq_refl eq_trans : core.
│ │ │ End IsEqOrig.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Types with decidable equality

│ │ │ +

Types with decidable equality

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module Type HasEqDec (Import E:Eq').
│ │ │   Parameter eq_dec : forall x y : t, { x==y } + { ~ x==y }.
│ │ │ End HasEqDec.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Boolean Equality

│ │ │ +

Boolean Equality

│ │ │ │ │ │
│ │ │ │ │ │ Having eq_dec is the same as having a boolean equality plus │ │ │ a correctness proof. │ │ │
│ │ │
│ │ │ @@ -216,15 +216,15 @@ │ │ │  BooleanDecidableType <+ EqNotation <+ EqbNotation.
│ │ │ Module Type DecidableTypeFull' := DecidableTypeFull <+ EqNotation.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Compatibility wrapper from/to the old version of

│ │ │ +

Compatibility wrapper from/to the old version of

│ │ │ │ │ │ EqualityType and DecidableType │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module BackportEq (E:Eq)(F:IsEq E) <: IsEqOrig E.
│ │ │ @@ -254,15 +254,15 @@ │ │ │ Module Update_DT (E:DecidableTypeOrig) <: DecidableTypeBoth
│ │ │  := E <+ UpdateEq.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Having eq_dec is equivalent to having eqb and its spec.

│ │ │ +

Having eq_dec is equivalent to having eqb and its spec.

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module HasEqDec2Bool (E:Eq)(F:HasEqDec E) <: HasEqBool E.
│ │ │  Definition eqb x y := if F.eq_dec x y then true else false.
│ │ │ @@ -351,15 +351,15 @@ │ │ │
│ │ │ End BoolEqualityFacts.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

UsualDecidableType

│ │ │ +

UsualDecidableType

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ A particular case of DecidableType where the equality is │ │ │ the usual one of Coq. │ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Structures.EqualitiesFacts.html │ │ │ @@ -21,15 +21,15 @@ │ │ │
│ │ │ Set Implicit Arguments.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Keys and datas used in the future MMaps

│ │ │ +

Keys and datas used in the future MMaps

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module KeyDecidableType(D:DecidableType).
│ │ │ │ │ │ @@ -180,15 +180,15 @@ │ │ │
│ │ │ End KeyDecidableType.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

PairDecidableType

│ │ │ +

PairDecidableType

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ From two decidable types, we can build a new DecidableType │ │ │ over their cartesian product. │ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Structures.GenericMinMax.html │ │ │ @@ -18,19 +18,19 @@ │ │ │
│ │ │ Require Import Orders OrdersTac OrdersFacts Setoid Morphisms Basics.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

A Generic construction of min and max

│ │ │ +

A Generic construction of min and max

│ │ │ │ │ │
│ │ │ │ │ │ -

First, an interface for types with max and/or min

│ │ │ +

First, an interface for types with max and/or min

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module Type HasMax (Import E:EqLe').
│ │ │  Parameter Inline max : t -> t -> t.
│ │ │ @@ -48,15 +48,15 @@ │ │ │
│ │ │ Module Type HasMinMax (E:EqLe) := HasMax E <+ HasMin E.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Any OrderedTypeFull can be equipped by max and min

│ │ │ +

Any OrderedTypeFull can be equipped by max and min

│ │ │ │ │ │ based on the compare function. │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition gmax {A} (cmp : A->A->comparison) x y :=
│ │ │ @@ -89,15 +89,15 @@ │ │ │
│ │ │ End GenericMinMax.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Consequences of the minimalist interface: facts about max and min.

│ │ │ +

Consequences of the minimalist interface: facts about max and min.

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module MinMaxLogicalProperties (Import O:TotalOrder')(Import M:HasMinMax O).
│ │ │  Module Import Private_Tac := !MakeOrderTac O O.
│ │ │ @@ -165,15 +165,15 @@ │ │ │  (Proper (le ==> le) f) ->
│ │ │  forall x y, max (f x) (f y) == f (max x y).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Semi-lattice algebraic properties of max

│ │ │ +

Semi-lattice algebraic properties of max

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma max_id n : max n n == n.
│ │ │ │ │ │ @@ -192,15 +192,15 @@ │ │ │   destruct (max_spec n m); intuition; order
│ │ │  end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Least-upper bound properties of max

│ │ │ +

Least-upper bound properties of max

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma le_max_l n m : n <= max n m.
│ │ │ │ │ │ @@ -350,15 +350,15 @@ │ │ │ Lemma min_le_compat n m p q : n <= m -> p <= q ->
│ │ │  min n p <= min m q.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Combined properties of min and max

│ │ │ +

Combined properties of min and max

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma min_max_absorption n m : max n (min n m) == n.
│ │ │ │ │ │ @@ -432,15 +432,15 @@ │ │ │
│ │ │ End MinMaxLogicalProperties.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties requiring a decidable order

│ │ │ +

Properties requiring a decidable order

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module MinMaxDecProperties (Import O:OrderedTypeFull')(Import M:HasMinMax O).
│ │ │ │ │ │ @@ -512,15 +512,15 @@ │ │ │  Notation min_max_antimonotone := min_max_antimono.
│ │ │ End MinMaxProperties.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

When the equality is Leibniz, we can skip a few Proper precondition.

│ │ │ +

When the equality is Leibniz, we can skip a few Proper precondition.

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module UsualMinMaxLogicalProperties
│ │ │  (Import O:UsualTotalOrder')(Import M:HasMinMax O).
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Structures.OrderedType.html │ │ │ @@ -23,15 +23,15 @@ │ │ │
│ │ │ │ │ │
│ │ │ NB: This file is here only for compatibility with earlier version of │ │ │ FSets and FMap. Please use Structures/Orders.v directly now. │ │ │
│ │ │ │ │ │ -

Ordered types

│ │ │ +

Ordered types

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Inductive Compare (X : Type) (lt eq : X -> X -> Prop) (x y : X) : Type :=
│ │ │   | LT : lt x y -> Compare lt eq x y
│ │ │ @@ -98,15 +98,15 @@ │ │ │
│ │ │ End MOT_to_OT.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Ordered types properties

│ │ │ +

Ordered types properties

│ │ │ │ │ │
│ │ │ │ │ │ Additional properties that can be derived from signature │ │ │ OrderedType. │ │ │
│ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Structures.OrderedTypeAlt.html │ │ │ @@ -16,15 +16,15 @@ │ │ │
│ │ │ Require Import OrderedType.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

An alternative (but equivalent) presentation for an Ordered Type

│ │ │ +

An alternative (but equivalent) presentation for an Ordered Type

│ │ │ │ │ │ inferface. │ │ │
│ │ │ │ │ │ NB: comparison, defined in Datatypes.v is Eq|Lt|Gt │ │ │ whereas compare, defined in OrderedType.v is EQ _ | LT _ | GT _ │ │ ├── ./usr/share/doc/coq-theories/html/Coq.Structures.OrderedTypeEx.html │ │ │ @@ -23,15 +23,15 @@ │ │ │ Require Import NArith Ndec.
│ │ │ Require Import Compare_dec.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Examples of Ordered Type structures.

│ │ │ +

Examples of Ordered Type structures.

│ │ │ │ │ │
│ │ │ │ │ │ First, a particular case of OrderedType where │ │ │ the equality is the usual one of Coq. │ │ │
│ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Structures.Orders.html │ │ │ @@ -19,15 +19,15 @@ │ │ │ Require Export Relations Morphisms Setoid Equalities.
│ │ │ Set Implicit Arguments.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Ordered types

│ │ │ +

Ordered types

│ │ │ │ │ │
│ │ │ │ │ │ First, signatures with only the order relations │ │ │
│ │ │
│ │ │ │ │ │ @@ -152,15 +152,15 @@ │ │ │ │ │ │
│ │ │ NB: in OrderedType, an eq_dec could be deduced from compare. │ │ │ But adding this redundant field allows seeing an OrderedType as a │ │ │ DecidableType. │ │ │
│ │ │ │ │ │ -

Versions with eq being the usual Leibniz equality of Coq

│ │ │ +

Versions with eq being the usual Leibniz equality of Coq

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module Type UsualStrOrder := UsualEqualityType <+ HasLt <+ IsStrOrder.
│ │ │ Module Type UsualDecStrOrder := UsualStrOrder <+ HasCompare.
│ │ │ @@ -184,15 +184,15 @@ │ │ │ Module Type UsualOrderedType' := UsualOrderedType <+ LtNotation.
│ │ │ Module Type UsualOrderedTypeFull' := UsualOrderedTypeFull <+ LtLeNotation.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Purely logical versions

│ │ │ +

Purely logical versions

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module Type LtIsTotal (Import E:EqLt').
│ │ │   Axiom lt_total : forall x y, x<y \/ x==y \/ y<x.
│ │ │ @@ -207,15 +207,15 @@ │ │ │ Module Type TotalOrder' := TotalOrder <+ EqLtLeNotation.
│ │ │ Module Type UsualTotalOrder' := UsualTotalOrder <+ LtLeNotation.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Conversions

│ │ │ +

Conversions

│ │ │ │ │ │
│ │ │ │ │ │ From compare to eqb, and then eq_dec │ │ │
│ │ │
│ │ │ │ │ │ @@ -268,15 +268,15 @@ │ │ │ Module OTF_to_TotalOrder (O:OrderedTypeFull) <: TotalOrder
│ │ │  := O <+ OTF_LtIsTotal.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Versions with boolean comparisons

│ │ │ +

Versions with boolean comparisons

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ This style is used in Mergesort │ │ │ │ │ │
│ │ │ @@ -368,15 +368,15 @@ │ │ │ Module Type OrderFunctions' (E:EqLtLe) :=
│ │ │   HasCompare E <+ CmpNotation E <+ HasBoolOrdFuns' E <+ BoolOrdSpecs E.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

From OrderedTypeFull to TotalTransitiveLeBool

│ │ │ +

From OrderedTypeFull to TotalTransitiveLeBool

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module OTF_to_TTLB (Import O : OrderedTypeFull') <: TotalTransitiveLeBool.
│ │ │ │ │ │ @@ -399,15 +399,15 @@ │ │ │
│ │ │ End OTF_to_TTLB.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

From TotalTransitiveLeBool to OrderedTypeFull

│ │ │ +

From TotalTransitiveLeBool to OrderedTypeFull

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ le is leb ... = true. │ │ │ eq is le /\ swap le. │ │ │ lt is le /\ ~swap le. │ │ ├── ./usr/share/doc/coq-theories/html/Coq.Structures.OrdersAlt.html │ │ │ @@ -21,32 +21,32 @@ │ │ │ Require Import OrderedType Orders.
│ │ │ Set Implicit Arguments.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Some alternative (but equivalent) presentations for an Ordered Type

│ │ │ +

Some alternative (but equivalent) presentations for an Ordered Type

│ │ │ │ │ │ inferface. │ │ │
│ │ │ │ │ │ -

The original interface

│ │ │ +

The original interface

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module Type OrderedTypeOrig := OrderedType.OrderedType.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

An interface based on compare

│ │ │ +

An interface based on compare

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module Type OrderedTypeAlt.
│ │ │ │ │ │ @@ -68,15 +68,15 @@ │ │ │
│ │ │ End OrderedTypeAlt.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

From OrderedTypeOrig to OrderedType.

│ │ │ +

From OrderedTypeOrig to OrderedType.

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module Update_OT (O:OrderedTypeOrig) <: OrderedType.
│ │ │ │ │ │ @@ -105,15 +105,15 @@ │ │ │
│ │ │ End Update_OT.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

From OrderedType to OrderedTypeOrig.

│ │ │ +

From OrderedType to OrderedTypeOrig.

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module Backport_OT (O:OrderedType) <: OrderedTypeOrig.
│ │ │ │ │ │ @@ -134,15 +134,15 @@ │ │ │
│ │ │ End Backport_OT.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

From OrderedTypeAlt to OrderedType.

│ │ │ +

From OrderedTypeAlt to OrderedType.

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module OT_from_Alt (Import O:OrderedTypeAlt) <: OrderedType.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Structures.OrdersEx.html │ │ │ @@ -21,15 +21,15 @@ │ │ │ Require Import Orders BoolOrder PeanoNat POrderedType BinNat BinInt
│ │ │  RelationPairs EqualitiesFacts.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Examples of Ordered Type structures.

│ │ │ +

Examples of Ordered Type structures.

│ │ │ │ │ │
│ │ │ │ │ │ Ordered Type for bool, nat, Positive, N, Z with the usual order. │ │ │
│ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Structures.OrdersFacts.html │ │ │ @@ -22,15 +22,15 @@ │ │ │
│ │ │ Set Implicit Arguments.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties of compare

│ │ │ +

Properties of compare

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module Type CompareFacts (Import O:DecStrOrder').
│ │ │ │ │ │ @@ -69,15 +69,15 @@ │ │ │
│ │ │ End CompareFacts.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties of OrderedTypeFull

│ │ │ +

Properties of OrderedTypeFull

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module OrderedTypeFullFacts (Import O:OrderedTypeFull').
│ │ │ │ │ │ @@ -125,15 +125,15 @@ │ │ │
│ │ │ End OrderedTypeFullFacts.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties of OrderedType

│ │ │ +

Properties of OrderedType

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module OrderedTypeFacts (Import O: OrderedType').
│ │ │ │ │ │ @@ -218,15 +218,15 @@ │ │ │
│ │ │ End OrderedTypeFacts.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Tests of the order tactic

│ │ │ +

Tests of the order tactic

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Is it at least capable of proving some basic properties ? │ │ │
│ │ │
│ │ │ @@ -256,15 +256,15 @@ │ │ │   Lemma eq_is_nlt_ngt x y : x==y <-> ~x<y /\ ~y<x.
│ │ │ End OrderedTypeTest.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Reversed OrderedTypeFull.

│ │ │ +

Reversed OrderedTypeFull.

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ we can switch the orientation of the order. This is used for │ │ │ example when deriving properties of min out of the ones of max │ │ │ (see GenericMinMax). │ │ │ @@ -304,15 +304,15 @@ │ │ │
│ │ │ Unset Implicit Arguments.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Order relations derived from a compare function.

│ │ │ +

Order relations derived from a compare function.

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ We factorize here some common properties for ZArith, NArith │ │ │ and co, where lt and le are defined in terms of compare. │ │ │ Note that we do not require anything here concerning compatibility │ │ ├── ./usr/share/doc/coq-theories/html/Coq.Structures.OrdersLists.html │ │ │ @@ -21,15 +21,15 @@ │ │ │
│ │ │ Set Implicit Arguments.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Specialization of results about lists modulo.

│ │ │ +

Specialization of results about lists modulo.

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module OrderedTypeLists (O:OrderedType).
│ │ │ │ │ │ @@ -70,15 +70,15 @@ │ │ │
│ │ │ End OrderedTypeLists.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Results about keys and data as manipulated in the future MMaps.

│ │ │ +

Results about keys and data as manipulated in the future MMaps.

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module KeyOrderedType(O:OrderedType).
│ │ │  Include KeyDecidableType(O). │ │ ├── ./usr/share/doc/coq-theories/html/Coq.Structures.OrdersTac.html │ │ │ @@ -19,15 +19,15 @@ │ │ │ Require Import Setoid Morphisms Basics Equalities Orders.
│ │ │ Set Implicit Arguments.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

The order tactic

│ │ │ +

The order tactic

│ │ │ │ │ │
│ │ │ │ │ │ This tactic is designed to solve systems of (in)equations │ │ │ involving eq, lt, le and ~eq on some type. This tactic is │ │ │ domain-agnostic; it will only use equivalence+order axioms, and │ │ │ not analyze elements of the domain. Hypothesis or goal of the form │ │ │ @@ -57,15 +57,15 @@ │ │ │  | _, _ => OLT
│ │ │  end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

The tactic requirements : a total order

│ │ │ +

The tactic requirements : a total order

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ We need : │ │ │
│ │ │ │ │ │
│ │ │ -

Properties that will be used by the order tactic

│ │ │ +

Properties that will be used by the order tactic

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module OrderFacts (Import O:EqLtLe)(P:IsTotalOrder O).
│ │ │ Include EqLtLeNotation O.
│ │ │ @@ -202,15 +202,15 @@ │ │ │
│ │ │ End OrderFacts.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

MakeOrderTac : The functor providing the order tactic.

│ │ │ +

MakeOrderTac : The functor providing the order tactic.

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module MakeOrderTac (Import O:EqLtLe)(P:IsTotalOrder O).
│ │ │ Include OrderFacts O P.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Vectors.VectorDef.html │ │ │ @@ -382,15 +382,15 @@ │ │ │ End BASES.
│ │ │ │ │ │
│ │ │ Section ITERATORS.
│ │ │
│ │ │ │ │ │
│ │ │ -

Here are special non dependent useful instantiation of induction schemes

│ │ │ +

Here are special non dependent useful instantiation of induction schemes

│ │ │ │ │ │
│ │ │ │ │ │ Uniform application on the arguments of the vector │ │ │
│ │ │
│ │ │ Definition map {A} {B} (f : A -> B) : forall {n} (v:t A n), t B n :=
│ │ │ @@ -503,15 +503,15 @@ │ │ │ End SCANNING.
│ │ │ │ │ │
│ │ │ Section VECTORLIST.
│ │ │
│ │ │ │ │ │
│ │ │ -

vector <=> list functions

│ │ │ +

vector <=> list functions

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Fixpoint of_list {A} (l : list A) : t A (length l) :=
│ │ │ match l as l' return t A (length l') with
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.Vectors.VectorSpec.html │ │ │ @@ -48,15 +48,15 @@ │ │ │
│ │ │ │ │ │
│ │ │ Lemmas are done for functions that use Fin.t but thanks to Peano_dec.le_unique, all │ │ │ is true for the one that use lt │ │ │
│ │ │ │ │ │ -

Properties of nth and nth_order

│ │ │ +

Properties of nth and nth_order

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma eq_nth_iff A n (v1 v2: t A n):
│ │ │   (forall p1 p2, p1 = p2 -> v1 [@ p1 ] = v2 [@ p2 ]) <-> v1 = v2.
│ │ │ @@ -77,15 +77,15 @@ │ │ │ Lemma nth_order_ext A: forall n k (v : t A n) (H1 H2 : k < n),
│ │ │   nth_order v H1 = nth_order v H2.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties of shiftin and shiftrepeat

│ │ │ +

Properties of shiftin and shiftrepeat

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma shiftin_nth A a n (v: t A n) k1 k2 (eq: k1 = k2):
│ │ │   nth (shiftin a v) (Fin.L_R 1 k1) = nth v k2.
│ │ │ @@ -100,15 +100,15 @@ │ │ │
│ │ │ Lemma shiftrepeat_last A: forall n (v: t A (S n)), last (shiftrepeat v) = last v.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties of replace

│ │ │ +

Properties of replace

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma nth_order_replace_eq A: forall n k (v : t A n) a (H1 : k < n) (H2 : k < n),
│ │ │   nth_order (replace v (Fin.of_nat_lt H2) a) H1 = a.
│ │ │ @@ -130,27 +130,27 @@ │ │ │ Lemma replace_replace_neq A: forall n p1 p2 (v : t A n) a b, p1 <> p2 ->
│ │ │   replace (replace v p1 a) p2 b = replace (replace v p2 b) p1 a.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties of const

│ │ │ +

Properties of const

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma const_nth A (a: A) n (p: Fin.t n): (const a n)[@ p] = a.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties of map

│ │ │ +

Properties of map

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma map_id A: forall n (v : t A n),
│ │ │   map (fun x => x) v = v.
│ │ │ @@ -175,41 +175,41 @@ │ │ │ Lemma nth_map2 {A B C} (f: A -> B -> C) {n} v w (p1 p2 p3: Fin.t n):
│ │ │   p1 = p2 -> p2 = p3 -> (map2 f v w) [@p1] = f (v[@p2]) (w[@p3]).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties of fold_left

│ │ │ +

Properties of fold_left

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma fold_left_right_assoc_eq {A B} {f: A -> B -> A}
│ │ │   (assoc: forall a b c, f (f a b) c = f (f a c) b)
│ │ │   {n} (v: t B n): forall a, fold_left f a v = fold_right (fun x y => f y x) v a.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties of to_list

│ │ │ +

Properties of to_list

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma to_list_of_list_opp {A} (l: list A): to_list (of_list l) = l.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties of take

│ │ │ +

Properties of take

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma take_O : forall {A} {n} le (v:t A n), take 0 le v = [].
│ │ │ │ │ │ @@ -223,15 +223,15 @@ │ │ │
│ │ │ Lemma take_prf_irr : forall {A} p {n} (v:t A n) le le', take p le v = take p le' v.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties of uncons and splitat

│ │ │ +

Properties of uncons and splitat

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma uncons_cons {A} : forall {n : nat} (a : A) (v : t A n),
│ │ │     uncons (a::v) = (a,v).
│ │ │ @@ -251,15 +251,15 @@ │ │ │     splitat n vw = (v, w) ->
│ │ │     vw = v ++ w.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties of Forall and Forall2

│ │ │ +

Properties of Forall and Forall2

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma Forall_impl A: forall (P Q : A -> Prop), (forall a, P a -> Q a) ->
│ │ │   forall n (v : t A n), Forall P v -> Forall Q v.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.ZArith.BinInt.html │ │ │ @@ -21,15 +21,15 @@ │ │ │  OrdersFacts ZAxioms ZProperties.
│ │ │ Require BinIntDef.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Binary Integers

│ │ │ +

Binary Integers

│ │ │ │ │ │
│ │ │ │ │ │ Initial author: Pierre Crégut, CNET, Lannion, France │ │ │
│ │ │ │ │ │ The type Z and its constructors Z0 and Zpos and Zneg │ │ │ @@ -56,15 +56,15 @@ │ │ │  <: UsualDecidableTypeFull
│ │ │  <: TotalOrder.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Definitions of operations, now in a separate file

│ │ │ +

Definitions of operations, now in a separate file

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Include BinIntDef.Z.
│ │ │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Logic Predicates

│ │ │ +

Logic Predicates

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition eq := @Logic.eq Z.
│ │ │ Definition eq_equiv := @eq_equivalence Z.
│ │ │ @@ -121,27 +121,27 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Decidability of equality.

│ │ │ +

Decidability of equality.

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition eq_dec (x y : Z) : {x = y} + {x <> y}.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Proofs of morphisms, obvious since eq is Leibniz

│ │ │ +

Proofs of morphisms, obvious since eq is Leibniz

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Program Definition succ_wd : Proper (eq==>eq) succ := _.
│ │ │ Program Definition pred_wd : Proper (eq==>eq) pred := _.
│ │ │ @@ -157,15 +157,15 @@ │ │ │ Program Definition pow_wd : Proper (eq==>eq==>eq) pow := _.
│ │ │ Program Definition testbit_wd : Proper (eq==>eq==>Logic.eq) testbit := _.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties of pos_sub

│ │ │ +

Properties of pos_sub

│ │ │ │ │ │
│ │ │ │ │ │ pos_sub can be written in term of positive comparison │ │ │ and subtraction (cf. earlier definition of addition of Z) │ │ │
│ │ │
│ │ │ @@ -228,15 +228,15 @@ │ │ │
│ │ │ Module Import Private_BootStrap.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Operations and constants

│ │ │ +

Operations and constants

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma add_0_r n : n + 0 = n.
│ │ │ │ │ │ @@ -246,51 +246,51 @@ │ │ │
│ │ │ Lemma mul_1_l n : 1 * n = n.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Addition is commutative

│ │ │ +

Addition is commutative

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma add_comm n m : n + m = m + n.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Opposite distributes over addition

│ │ │ +

Opposite distributes over addition

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma opp_add_distr n m : - (n + m) = - n + - m.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Opposite is injective

│ │ │ +

Opposite is injective

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma opp_inj n m : -n = -m -> n = m.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Addition is associative

│ │ │ +

Addition is associative

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma pos_sub_add p q r :
│ │ │   pos_sub (p + q) r = pos p + pos_sub q r.
│ │ │ @@ -303,39 +303,39 @@ │ │ │
│ │ │ Lemma add_assoc n m p : n + (m + p) = n + m + p.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Opposite is inverse for addition

│ │ │ +

Opposite is inverse for addition

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma add_opp_diag_r n : n + - n = 0.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Multiplication and Opposite

│ │ │ +

Multiplication and Opposite

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma mul_opp_r n m : n * - m = - (n * m).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Distributivity of multiplication over addition

│ │ │ +

Distributivity of multiplication over addition

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma mul_add_distr_pos (p:positive) n m :
│ │ │  (n + m) * pos p = n * pos p + m * pos p.
│ │ │ @@ -346,64 +346,64 @@ │ │ │
│ │ │ End Private_BootStrap.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Proofs of specifications

│ │ │ +

Proofs of specifications

│ │ │ │ │ │
│ │ │ │ │ │ -

Specification of constants

│ │ │ +

Specification of constants

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma one_succ : 1 = succ 0.
│ │ │ │ │ │
│ │ │ Lemma two_succ : 2 = succ 1.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Specification of addition

│ │ │ +

Specification of addition

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma add_0_l n : 0 + n = n.
│ │ │ │ │ │
│ │ │ Lemma add_succ_l n m : succ n + m = succ (n + m).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Specification of opposite

│ │ │ +

Specification of opposite

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma opp_0 : -0 = 0.
│ │ │ │ │ │
│ │ │ Lemma opp_succ n : -(succ n) = pred (-n).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Specification of successor and predecessor

│ │ │ +

Specification of successor and predecessor

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ │ │ │
│ │ │ @@ -412,45 +412,45 @@ │ │ │
│ │ │ Lemma pred_succ n : pred (succ n) = n.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Specification of subtraction

│ │ │ +

Specification of subtraction

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma sub_0_r n : n - 0 = n.
│ │ │ │ │ │
│ │ │ Lemma sub_succ_r n m : n - succ m = pred (n - m).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Specification of multiplication

│ │ │ +

Specification of multiplication

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma mul_0_l n : 0 * n = 0.
│ │ │ │ │ │
│ │ │ Lemma mul_succ_l n m : succ n * m = n * m + m.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Specification of comparisons and order

│ │ │ +

Specification of comparisons and order

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma eqb_eq n m : (n =? m) = true <-> n = m.
│ │ │ │ │ │ @@ -498,15 +498,15 @@ │ │ │
│ │ │ Lemma lt_succ_r n m : n < succ m <-> n<=m.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Specification of minimum and maximum

│ │ │ +

Specification of minimum and maximum

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma max_l n m : m<=n -> max n m = n.
│ │ │ │ │ │ @@ -519,15 +519,15 @@ │ │ │
│ │ │ Lemma min_r n m : m<=n -> min n m = m.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Induction principles based on successor / predecessor

│ │ │ +

Induction principles based on successor / predecessor

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma peano_ind (P : Z -> Prop) :
│ │ │   P 0 ->
│ │ │ @@ -557,30 +557,30 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Specification of absolute value

│ │ │ +

Specification of absolute value

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma abs_eq n : 0 <= n -> abs n = n.
│ │ │ │ │ │
│ │ │ Lemma abs_neq n : n <= 0 -> abs n = - n.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Specification of sign

│ │ │ +

Specification of sign

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma sgn_null n : n = 0 -> sgn n = 0.
│ │ │ │ │ │ @@ -590,15 +590,15 @@ │ │ │
│ │ │ Lemma sgn_neg n : n < 0 -> sgn n = -1.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Specification of power

│ │ │ +

Specification of power

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma pow_0_r n : n^0 = 1.
│ │ │ │ │ │ @@ -619,27 +619,27 @@ │ │ │
│ │ │ Lemma pow_pos_fold n p : pow_pos n p = n ^ (pos p).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Specification of square

│ │ │ +

Specification of square

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma square_spec n : square n = n * n.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Specification of square root

│ │ │ +

Specification of square root

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma sqrtrem_spec n : 0<=n ->
│ │ │  let (s,r) := sqrtrem n in n = s*s + r /\ 0 <= r <= 2*s.
│ │ │ @@ -654,15 +654,15 @@ │ │ │
│ │ │ Lemma sqrtrem_sqrt n : fst (sqrtrem n) = sqrt n.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Specification of logarithm

│ │ │ +

Specification of logarithm

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma log2_spec n : 0 < n -> 2^(log2 n) <= n < 2^(succ (log2 n)).
│ │ │ │ │ │ @@ -683,15 +683,15 @@ │ │ │
│ │ │ Lemma odd_spec n : odd n = true <-> Odd n.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Multiplication and Doubling

│ │ │ +

Multiplication and Doubling

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma double_spec n : double n = 2*n.
│ │ │ │ │ │ @@ -701,15 +701,15 @@ │ │ │
│ │ │ Lemma pred_double_spec n : pred_double n = 2*n - 1.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Correctness proofs for Trunc division

│ │ │ +

Correctness proofs for Trunc division

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma pos_div_eucl_eq a b : 0 < b ->
│ │ │   let (q, r) := pos_div_eucl a b in pos a = q * b + r.
│ │ │ @@ -733,15 +733,15 @@ │ │ │
│ │ │ Lemma mod_neg_bound a b : b < 0 -> b < a mod b <= 0.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Correctness proofs for Floor division

│ │ │ +

Correctness proofs for Floor division

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Theorem quotrem_eq a b : let (q,r) := quotrem a b in a = q * b + r.
│ │ │ │ │ │ @@ -766,15 +766,15 @@ │ │ │
│ │ │ Lemma rem_opp_r a b : b<>0 -> rem a (-b) = rem a b.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Extra properties about divide

│ │ │ +

Extra properties about divide

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma divide_Zpos p q : (pos p|pos q) <-> (p|q)%positive.
│ │ │ │ │ │ @@ -784,15 +784,15 @@ │ │ │
│ │ │ Lemma divide_Zpos_Zneg_l n p : (pos p|n) <-> (neg p|n).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Correctness proofs for gcd

│ │ │ +

Correctness proofs for gcd

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma ggcd_gcd a b : fst (ggcd a b) = gcd a b.
│ │ │ │ │ │ @@ -825,15 +825,15 @@ │ │ │ Theorem ggcd_opp a b :
│ │ │   ggcd (-a) b = (let '(g,(aa,bb)) := ggcd a b in (g,(-aa,bb))).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Extra properties about testbit

│ │ │ +

Extra properties about testbit

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma testbit_of_N a n :
│ │ │  testbit (of_N a) (of_N n) = N.testbit a n.
│ │ │ @@ -850,15 +850,15 @@ │ │ │ Lemma testbit_Zneg a n : 0<=n ->
│ │ │  testbit (neg a) n = negb (N.testbit (Pos.pred_N a) (to_N n)).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Proofs of specifications for bitwise operations

│ │ │ +

Proofs of specifications for bitwise operations

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma div2_spec a : div2 a = shiftr a 1.
│ │ │ │ │ │ @@ -1032,39 +1032,39 @@ │ │ │
│ │ │ Lemma add_diag n : n + n = 2 * n.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Comparison and opposite

│ │ │ +

Comparison and opposite

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma compare_opp n m : (- n ?= - m) = (m ?= n).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Comparison and addition

│ │ │ +

Comparison and addition

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma add_compare_mono_l n m p : (n + m ?= n + p) = (m ?= p).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

testbit in terms of comparison.

│ │ │ +

testbit in terms of comparison.

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma testbit_mod_pow2 a n i (H : 0 <= n)
│ │ │   : testbit (a mod 2 ^ n) i = ((i <? n) && testbit a i)%bool.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.ZArith.BinIntDef.html │ │ │ @@ -24,15 +24,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Binary Integers, Definitions of Operations

│ │ │ +

Binary Integers, Definitions of Operations

│ │ │ │ │ │
│ │ │ │ │ │ Initial author: Pierre Crégut, CNET, Lannion, France │ │ │
│ │ │
│ │ │ │ │ │ @@ -42,42 +42,42 @@ │ │ │
│ │ │ Definition t := Z.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Nicer names Z.pos and Z.neg for constructors

│ │ │ +

Nicer names Z.pos and Z.neg for constructors

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Notation pos := Zpos.
│ │ │ Notation neg := Zneg.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Constants

│ │ │ +

Constants

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition zero := 0.
│ │ │ Definition one := 1.
│ │ │ Definition two := 2.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Doubling and variants

│ │ │ +

Doubling and variants

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition double x :=
│ │ │   match x with
│ │ │ @@ -102,15 +102,15 @@ │ │ │     | pos p => pos (Pos.pred_double p)
│ │ │   end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Subtraction of positive into Z

│ │ │ +

Subtraction of positive into Z

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Fixpoint pos_sub (x y:positive) {struct y} : Z :=
│ │ │   match x, y with
│ │ │ @@ -125,15 +125,15 @@ │ │ │     | 1, 1 => Z0
│ │ │   end%positive.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Addition

│ │ │ +

Addition

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition add x y :=
│ │ │   match x, y with
│ │ │ @@ -148,15 +148,15 @@ │ │ │
│ │ │ Infix "+" := add : Z_scope.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Opposite

│ │ │ +

Opposite

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition opp x :=
│ │ │   match x with
│ │ │ @@ -168,54 +168,54 @@ │ │ │
│ │ │ Notation "- x" := (opp x) : Z_scope.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Successor

│ │ │ +

Successor

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition succ x := x + 1.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Predecessor

│ │ │ +

Predecessor

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition pred x := x + neg 1.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Subtraction

│ │ │ +

Subtraction

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition sub m n := m + -n.
│ │ │ │ │ │
│ │ │ Infix "-" := sub : Z_scope.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Multiplication

│ │ │ +

Multiplication

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition mul x y :=
│ │ │   match x, y with
│ │ │ @@ -230,15 +230,15 @@ │ │ │
│ │ │ Infix "*" := mul : Z_scope.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Power function

│ │ │ +

Power function

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition pow_pos (z:Z) := Pos.iter (mul z) 1.
│ │ │ │ │ │ @@ -253,15 +253,15 @@ │ │ │
│ │ │ Infix "^" := pow : Z_scope.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Square

│ │ │ +

Square

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition square x :=
│ │ │   match x with
│ │ │ @@ -270,15 +270,15 @@ │ │ │     | neg p => pos (Pos.square p)
│ │ │   end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Comparison

│ │ │ +

Comparison

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition compare x y :=
│ │ │   match x, y with
│ │ │ @@ -296,15 +296,15 @@ │ │ │
│ │ │ Infix "?=" := compare (at level 70, no associativity) : Z_scope.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Sign function

│ │ │ +

Sign function

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition sgn z :=
│ │ │   match z with
│ │ │ @@ -375,15 +375,15 @@ │ │ │ Infix ">=?" := geb (at level 70, no associativity) : Z_scope.
│ │ │ Infix ">?" := gtb (at level 70, no associativity) : Z_scope.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Minimum and maximum

│ │ │ +

Minimum and maximum

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition max n m :=
│ │ │   match n ?= m with
│ │ │ @@ -398,15 +398,15 @@ │ │ │     | Gt => m
│ │ │   end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Absolute value

│ │ │ +

Absolute value

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition abs z :=
│ │ │   match z with
│ │ │ @@ -415,15 +415,15 @@ │ │ │     | neg p => pos p
│ │ │   end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Conversions

│ │ │ +

Conversions

│ │ │ │ │ │
│ │ │ │ │ │ From Z to nat via absolute value │ │ │
│ │ │
│ │ │ │ │ │ @@ -587,15 +587,15 @@ │ │ │
│ │ │ Definition to_num_int n := Numeral.IntDec (to_int n).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Iteration of a function

│ │ │ +

Iteration of a function

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ By convention, iterating a negative number of times is identity. │ │ │ │ │ │
│ │ │ @@ -608,30 +608,30 @@ │ │ │     | _ => x
│ │ │   end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Euclidean divisions for binary integers

│ │ │ +

Euclidean divisions for binary integers

│ │ │ │ │ │
│ │ │ │ │ │ Concerning the many possible variants of integer divisions, │ │ │ see the headers of the generic files ZDivFloor, ZDivTrunc, │ │ │ ZDivEucl, and the article by R. Boute mentioned there. │ │ │ We provide here two flavours, Floor and Trunc, while │ │ │ the Euclid convention can be found in file Zeuclid.v │ │ │ For non-zero b, they all satisfy a = b*(a/b) + (a mod b) │ │ │ and |a mod b| < |b| , but the sign of the modulo will differ │ │ │ when a<0 and/or b<0. │ │ │ │ │ │
│ │ │ │ │ │ -

Floor division

│ │ │ +

Floor division

│ │ │ │ │ │
│ │ │ │ │ │ div_eucl provides a Truncated-Toward-Bottom (a.k.a Floor) │ │ │ Euclidean division. Its projections are named div (noted "/") │ │ │ and modulo (noted with an infix "mod"). │ │ │ These functions correspond to the `div` and `mod` of Haskell. │ │ │ @@ -716,15 +716,15 @@ │ │ │ Infix "/" := div : Z_scope.
│ │ │ Infix "mod" := modulo (at level 40, no associativity) : Z_scope.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Trunc Division

│ │ │ +

Trunc Division

│ │ │ │ │ │
│ │ │ │ │ │ quotrem provides a Truncated-Toward-Zero Euclidean division. │ │ │ Its projections are named quot (noted "÷") and rem. │ │ │ These functions correspond to the `quot` and `rem` of Haskell. │ │ │ This division convention is used in most programming languages, │ │ │ @@ -775,15 +775,15 @@ │ │ │ Infix "÷" := quot (at level 40, left associativity) : Z_scope.
│ │ │
│ │ │ │ │ │
│ │ │ No infix notation for rem, otherwise it becomes a keyword │ │ │
│ │ │ │ │ │ -

Parity functions

│ │ │ +

Parity functions

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition even z :=
│ │ │   match z with
│ │ │ @@ -802,15 +802,15 @@ │ │ │     | _ => true
│ │ │   end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Division by two

│ │ │ +

Division by two

│ │ │ │ │ │
│ │ │ │ │ │ div2 performs rounding toward bottom, it is hence a particular │ │ │ case of div, and for all relative number n we have: │ │ │ n = 2 * div2 n + if odd n then 1 else 0. │ │ │
│ │ │ @@ -848,15 +848,15 @@ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ NB: Z.quot2 used to be named Z.div2 in Coq <= 8.3 │ │ │
│ │ │ │ │ │ -

Base-2 logarithm

│ │ │ +

Base-2 logarithm

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition log2 z :=
│ │ │   match z with
│ │ │ @@ -865,15 +865,15 @@ │ │ │     | _ => 0
│ │ │   end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Square root

│ │ │ +

Square root

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition sqrtrem n :=
│ │ │  match n with
│ │ │ @@ -893,15 +893,15 @@ │ │ │   | _ => 0
│ │ │  end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Greatest Common Divisor

│ │ │ +

Greatest Common Divisor

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition gcd a b :=
│ │ │   match a,b with
│ │ │ @@ -936,15 +936,15 @@ │ │ │        let '(g,(aa,bb)) := Pos.ggcd a b in (pos g, (neg aa, neg bb))
│ │ │   end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Bitwise functions

│ │ │ +

Bitwise functions

│ │ │ │ │ │
│ │ │ │ │ │ When accessing the bits of negative numbers, all functions │ │ │ below will use the two's complement representation. For instance, │ │ │ -1 will correspond to an infinite stream of true bits. If this │ │ │ isn't what you're looking for, you can use abs first and then │ │ ├── ./usr/share/doc/coq-theories/html/Coq.ZArith.Int.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

An light axiomatization of integers (used in MSetAVL).

│ │ │ +

An light axiomatization of integers (used in MSetAVL).

│ │ │ │ │ │
│ │ │ │ │ │ We define a signature for an integer datatype based on Z. │ │ │ The goal is to allow a switch after extraction to ocaml's │ │ │ big_int or even int when finiteness isn't a problem │ │ │ (typically : when measuring the height of an AVL tree). │ │ │ @@ -36,15 +36,15 @@ │ │ │ Delimit Scope Int_scope with I.
│ │ │ Local Open Scope Int_scope.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

A specification of integers

│ │ │ +

A specification of integers

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module Type Int.
│ │ │ │ │ │ @@ -171,15 +171,15 @@ │ │ │
│ │ │ End Int.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Facts and tactics using Int

│ │ │ +

Facts and tactics using Int

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module MoreInt (Import I:Int).
│ │ │ │ │ │ @@ -524,15 +524,15 @@ │ │ │
│ │ │ End MoreInt.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

An implementation of Int

│ │ │ +

An implementation of Int

│ │ │ │ │ │
│ │ │ │ │ │ It's always nice to know that our Int interface is realizable :-) │ │ │
│ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.ZArith.ZArith_dec.html │ │ │ @@ -40,15 +40,15 @@ │ │ │
│ │ │   Variables x y : Z.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Decidability of order on binary integers

│ │ │ +

Decidability of order on binary integers

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │   Definition Z_lt_dec : {x < y} + {~ x < y}.
│ │ │ │ │ │ @@ -82,15 +82,15 @@ │ │ │
│ │ │ End decidability.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Cotransitivity of order on binary integers

│ │ │ +

Cotransitivity of order on binary integers

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma Zlt_cotrans : forall n m:Z, n < m -> forall p:Z, {n < p} + {p < m}.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.ZArith.Zabs.html │ │ │ @@ -40,15 +40,15 @@ │ │ │
│ │ │ Local Open Scope Z_scope.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties of absolute value

│ │ │ +

Properties of absolute value

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Notation Zabs_non_eq := Z.abs_neq (only parsing).
│ │ │ Notation Zabs_Zopp := Z.abs_opp (only parsing).
│ │ │ @@ -58,15 +58,15 @@ │ │ │ Notation Zabs_Zsgn := Z.abs_sgn (only parsing).
│ │ │ Notation Zabs_Zmult := Z.abs_mul (only parsing).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Proving a property of the absolute value by cases

│ │ │ +

Proving a property of the absolute value by cases

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma Zabs_ind :
│ │ │   forall (P:Z -> Prop) (n:Z),
│ │ │ @@ -83,15 +83,15 @@ │ │ │   0 <= x /\ Z.abs x = x \/
│ │ │   0 > x /\ Z.abs x = -x.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Some results about the sign function.

│ │ │ +

Some results about the sign function.

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Notation Zsgn_Zmult := Z.sgn_mul (only parsing).
│ │ │ Notation Zsgn_Zopp := Z.sgn_opp (only parsing).
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.ZArith.Zbool.html │ │ │ @@ -26,15 +26,15 @@ │ │ │
│ │ │ Local Open Scope Z_scope.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Boolean operations from decidability of order

│ │ │ +

Boolean operations from decidability of order

│ │ │ The decidability of equality and order relations over │ │ │ type Z gives some boolean functions with the adequate specification. │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition Z_lt_ge_bool (x y:Z) := bool_of_sumbool (Z_lt_ge_dec x y).
│ │ │ @@ -51,15 +51,15 @@ │ │ │
│ │ │ Definition Zeven_odd_bool (x:Z) := bool_of_sumbool (Zeven_odd_dec x).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Boolean comparisons of binary integers

│ │ │ +

Boolean comparisons of binary integers

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Notation Zle_bool := Z.leb (only parsing).
│ │ │ Notation Zge_bool := Z.geb (only parsing).
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.ZArith.Zcompare.html │ │ │ @@ -34,30 +34,30 @@ │ │ │
│ │ │ Local Open Scope Z_scope.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Comparison on integers

│ │ │ +

Comparison on integers

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma Zcompare_Gt_Lt_antisym : forall n m:Z, (n ?= m) = Gt <-> (m ?= n) = Lt.
│ │ │ │ │ │
│ │ │ Lemma Zcompare_antisym n m : CompOpp (n ?= m) = (m ?= n).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Transitivity of comparison

│ │ │ +

Transitivity of comparison

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma Zcompare_Lt_trans :
│ │ │   forall n m p:Z, (n ?= m) = Lt -> (m ?= p) = Lt -> (n ?= p) = Lt.
│ │ │ @@ -66,39 +66,39 @@ │ │ │ Lemma Zcompare_Gt_trans :
│ │ │   forall n m p:Z, (n ?= m) = Gt -> (m ?= p) = Gt -> (n ?= p) = Gt.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Comparison and opposite

│ │ │ +

Comparison and opposite

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma Zcompare_opp n m : (n ?= m) = (- m ?= - n).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Comparison first-order specification

│ │ │ +

Comparison first-order specification

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma Zcompare_Gt_spec n m : (n ?= m) = Gt -> exists h, n + - m = Zpos h.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Comparison and addition

│ │ │ +

Comparison and addition

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma Zcompare_plus_compat n m p : (p + n ?= p + m) = (n ?= m).
│ │ │ │ │ │ @@ -112,27 +112,27 @@ │ │ │
│ │ │ Lemma Zcompare_Gt_not_Lt n m : (n ?= m) = Gt <-> (n ?= m+1) <> Lt.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Successor and comparison

│ │ │ +

Successor and comparison

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma Zcompare_succ_compat n m : (Z.succ n ?= Z.succ m) = (n ?= m).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Multiplication and comparison

│ │ │ +

Multiplication and comparison

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma Zcompare_mult_compat :
│ │ │   forall (p:positive) (n m:Z), (Zpos p * n ?= Zpos p * m) = (n ?= m).
│ │ │ @@ -145,15 +145,15 @@ │ │ │ Lemma Zmult_compare_compat_r n m p :
│ │ │   p > 0 -> (n ?= m) = (n * p ?= m * p).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Relating x ?= y to =, <=, <, >= or >

│ │ │ +

Relating x ?= y to =, <=, <, >= or >

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma Zcompare_elim :
│ │ │   forall (c1 c2 c3:Prop) (n m:Z),
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.ZArith.Zdiv.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Euclidean Division

│ │ │ +

Euclidean Division

│ │ │ │ │ │
│ │ │ │ │ │ Initial Contribution by Claude Marché and Xavier Urbain │ │ │
│ │ │
│ │ │ │ │ │ @@ -51,15 +51,15 @@ │ │ │ Notation Zmod_pos_bound := Z.mod_pos_bound (only parsing).
│ │ │ Notation Zmod_neg_bound := Z.mod_neg_bound (only parsing).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Main division theorems

│ │ │ +

Main division theorems

│ │ │ │ │ │
│ │ │ │ │ │ NB: many things are stated twice for compatibility reasons │ │ │
│ │ │
│ │ │ │ │ │ @@ -198,15 +198,15 @@ │ │ │  forall a b q r, 0 <= r < b ->
│ │ │   a = b*q + r -> r = a mod b.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Basic values of divisions and modulo.

│ │ │ +

Basic values of divisions and modulo.

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma Zmod_0_l: forall a, 0 mod a = 0.
│ │ │ │ │ │ @@ -253,15 +253,15 @@ │ │ │
│ │ │ Lemma Z_div_mult_full : forall a b:Z, b <> 0 -> (a*b)/b = a.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Order results about Z.modulo and Z.div

│ │ │ +

Order results about Z.modulo and Z.div

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ │ │ │
│ │ │ @@ -401,15 +401,15 @@ │ │ │ Theorem Zdiv_sgn: forall a b,
│ │ │   0 <= Z.sgn (a/b) * Z.sgn a * Z.sgn b.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Relations between usual operations and Z.modulo and Z.div

│ │ │ +

Relations between usual operations and Z.modulo and Z.div

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma Z_mod_plus_full : forall a b c:Z, (a + b * c) mod c = a mod c.
│ │ │ │ │ │ @@ -640,15 +640,15 @@ │ │ │
│ │ │ Lemma Zeven_mod : forall a, Z.even a = Zeq_bool (a mod 2) 0.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Compatibility

│ │ │ +

Compatibility

│ │ │ │ │ │
│ │ │ │ │ │ Weaker results kept only for compatibility │ │ │
│ │ │
│ │ │ │ │ │ @@ -676,15 +676,15 @@ │ │ │
│ │ │ Lemma Z_mod_zero_opp : forall a b:Z, b > 0 -> a mod b = 0 -> (-a) mod b = 0.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

A direct way to compute Z.modulo

│ │ │ +

A direct way to compute Z.modulo

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Fixpoint Zmod_POS (a : positive) (b : Z) : Z :=
│ │ │   match a with
│ │ │ @@ -728,17 +728,17 @@ │ │ │ Theorem Zmod'_correct: forall a b, Zmod' a b = a mod b.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Another convention is possible for division by negative numbers: │ │ │ -

quotient is always the biggest integer smaller than or equal to a/b

│ │ │ +

quotient is always the biggest integer smaller than or equal to a/b

│ │ │ │ │ │ -

remainder is hence always positive or null.

│ │ │ +

remainder is hence always positive or null.

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Theorem Zdiv_eucl_extended :
│ │ │   forall b:Z,
│ │ │ @@ -748,15 +748,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Division and modulo in Z agree with same in nat:

│ │ │ +

Division and modulo in Z agree with same in nat:

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Require Import PeanoNat.
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.ZArith.Zeuclid.html │ │ │ @@ -19,15 +19,15 @@ │ │ │ Require Import Morphisms BinInt ZDivEucl.
│ │ │ Local Open Scope Z_scope.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Definitions of division for binary integers, Euclid convention.

│ │ │ +

Definitions of division for binary integers, Euclid convention.

│ │ │ │ │ │
│ │ │ │ │ │ In this convention, the remainder is always positive. │ │ │ For other conventions, see Z.div and Z.quot in file BinIntDef. │ │ │ To avoid collision with the other divisions, we place this one │ │ │ under a module. │ │ ├── ./usr/share/doc/coq-theories/html/Coq.ZArith.Zeven.html │ │ │ @@ -138,15 +138,15 @@ │ │ │ Notation Zodd_bool_succ := Z.odd_succ (only parsing).
│ │ │ Notation Zodd_bool_pred := Z.odd_pred (only parsing).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Definition of Z.quot2, Z.div2 and properties wrt Zeven

│ │ │ +

Definition of Z.quot2, Z.div2 and properties wrt Zeven

│ │ │ │ │ │ and Zodd │ │ │
│ │ │ │ │ │ Properties of Z.div2 │ │ │
│ │ │
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.ZArith.Zgcd_alt.html │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Zgcd_alt : an alternate version of Z.gcd, based on Euclid's algorithm

│ │ │ +

Zgcd_alt : an alternate version of Z.gcd, based on Euclid's algorithm

│ │ │ │ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Author: Pierre Letouzey │ │ ├── ./usr/share/doc/coq-theories/html/Coq.ZArith.Zhints.html │ │ │ @@ -68,28 +68,28 @@ │ │ │ Require Import Zmisc.
│ │ │ Require Import Wf_Z.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Simplification lemmas

│ │ │ +

Simplification lemmas

│ │ │ │ │ │
│ │ │ │ │ │ No subgoal or smaller subgoals │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Hint Resolve
│ │ │   
│ │ │ │ │ │
│ │ │ -

Reversible simplification lemmas (no loss of information)

│ │ │ +

Reversible simplification lemmas (no loss of information)

│ │ │ Should clearly be declared as hints │ │ │
│ │ │ │ │ │ Lemmas ending by eq │ │ │
│ │ │
│ │ │   Zsucc_eq_compat
│ │ │ @@ -136,15 +136,15 @@ │ │ │   Zplus_le_compat_l
│ │ │   Zplus_le_compat_r
│ │ │   Z.abs_nonneg
│ │ │
│ │ │   
│ │ │ │ │ │
│ │ │ -

Irreversible simplification lemmas

│ │ │ +

Irreversible simplification lemmas

│ │ │ Probably to be declared as hints, when no other simplification is possible │ │ │
│ │ │ │ │ │ Lemmas ending by eq │ │ │
│ │ │
│ │ │   Z_eq_mult
│ │ ├── ./usr/share/doc/coq-theories/html/Coq.ZArith.Znat.html │ │ │ @@ -61,15 +61,15 @@ │ │ │
  • module Zabs2Nat : from Z to nat (via the absolute value) │ │ │ │ │ │
  • │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ -

    Chains of conversions

    │ │ │ +

    Chains of conversions

    │ │ │ │ │ │
    │ │ │ │ │ │ When combining successive conversions, we have the following │ │ │ commutative diagram: │ │ │
    │ │ │        ---> Nat ----
    │ │ │ @@ -114,15 +114,15 @@
    │ │ │  
    │ │ │ Lemma Zabs_nat_N n : N.of_nat (Z.abs_nat n) = Z.abs_N n.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Conversions between Z and N

    │ │ │ +

    Conversions between Z and N

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Module N2Z.
    │ │ │ │ │ │ @@ -491,15 +491,15 @@ │ │ │
    │ │ │ End Zabs2N.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Conversions between Z and nat

    │ │ │ +

    Conversions between Z and nat

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Module Nat2Z.
    │ │ ├── ./usr/share/doc/coq-theories/html/Coq.ZArith.Znumtheory.html │ │ │ @@ -205,15 +205,15 @@ │ │ │ Lemma Zdivide_mod_minus a b c:
    │ │ │  0 <= c < b -> (b | a - c) -> a mod b = c.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Greatest common divisor (gcd).

    │ │ │ +

    Greatest common divisor (gcd).

    │ │ │ │ │ │
    │ │ │ │ │ │ There is no unicity of the gcd; hence we define the predicate │ │ │ Zis_gcd a b g expressing that g is a gcd of a and b. │ │ │ (We show later that the gcd is actually unique if we discard its sign.) │ │ │
    │ │ │ @@ -263,15 +263,15 @@ │ │ │ Theorem Zis_gcd_unique: forall a b c d : Z,
    │ │ │  Zis_gcd a b c -> Zis_gcd a b d -> c = d \/ c = (- d).
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Extended Euclid algorithm.

    │ │ │ +

    Extended Euclid algorithm.

    │ │ │ │ │ │
    │ │ │ │ │ │ Euclid's algorithm to compute the gcd mainly relies on │ │ │ the following property. │ │ │
    │ │ │
    │ │ │ @@ -355,15 +355,15 @@ │ │ │ Theorem Zis_gcd_uniqueness_apart_sign :
    │ │ │   forall a b d d':Z, Zis_gcd a b d -> Zis_gcd a b d' -> d = d' \/ d = - d'.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Bezout's coefficients

    │ │ │ +

    Bezout's coefficients

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Inductive Bezout (a b d:Z) : Prop :=
    │ │ │   Bezout_intro : forall u v:Z, u * a + v * b = d -> Bezout a b d.
    │ │ │ @@ -391,15 +391,15 @@ │ │ │ Lemma Zis_gcd_mult :
    │ │ │   forall a b c d:Z, Zis_gcd a b d -> Zis_gcd (c * a) (c * b) (c * d).
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Relative primality

    │ │ │ +

    Relative primality

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Definition rel_prime (a b:Z) : Prop := Zis_gcd a b 1.
    │ │ │ │ │ │ @@ -485,15 +485,15 @@ │ │ │
    │ │ │ Theorem Zrel_prime_neq_mod_0: forall a b, 1 < b -> rel_prime a b -> a mod b <> 0.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Primality

    │ │ │ +

    Primality

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Inductive prime (p:Z) : Prop :=
    │ │ │   prime_intro :
    │ │ ├── ./usr/share/doc/coq-theories/html/Coq.ZArith.Zorder.html │ │ │ @@ -37,30 +37,30 @@ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Properties of the order relations on binary integers │ │ │
    │ │ │ │ │ │ -

    Trichotomy

    │ │ │ +

    Trichotomy

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Theorem Ztrichotomy_inf n m : {n < m} + {n = m} + {n > m}.
    │ │ │ │ │ │
    │ │ │ Theorem Ztrichotomy n m : n < m \/ n = m \/ n > m.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Decidability of equality and order on Z

    │ │ │ +

    Decidability of equality and order on Z

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Notation dec_eq := Z.eq_decidable (only parsing).
    │ │ │ Notation dec_Zle := Z.le_decidable (only parsing).
    │ │ │ @@ -80,15 +80,15 @@ │ │ │ │ │ │
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Relating strict and large orders

    │ │ │ +

    Relating strict and large orders

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Notation Zgt_iff_lt := Z.gt_lt_iff (only parsing).
    │ │ │ Notation Zge_iff_le := Z.ge_le_iff (only parsing).
    │ │ │ @@ -122,15 +122,15 @@ │ │ │ │ │ │
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Equivalence and order properties

    │ │ │ +

    Equivalence and order properties

    │ │ │ │ │ │
    │ │ │ │ │ │ Reflexivity │ │ │
    │ │ │
    │ │ │ │ │ │ @@ -244,19 +244,19 @@ │ │ │
    │ │ │ Hint Resolve Z.le_trans: zarith.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Compatibility of order and operations on Z

    │ │ │ +

    Compatibility of order and operations on Z

    │ │ │ │ │ │
    │ │ │ │ │ │ -

    Successor

    │ │ │ +

    Successor

    │ │ │ │ │ │
    │ │ │ │ │ │ Compatibility of successor wrt to order │ │ │
    │ │ │
    │ │ │ │ │ │ @@ -422,15 +422,15 @@ │ │ │
    │ │ │ Lemma Zgt_succ_gt_or_eq n m : Z.succ n > m -> n > m \/ m = n.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Addition

    │ │ │ +

    Addition

    │ │ │ Compatibility of addition wrt to order │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Notation Zplus_lt_le_compat := Z.add_lt_le_mono (only parsing).
    │ │ │ Notation Zplus_le_lt_compat := Z.add_le_lt_mono (only parsing).
    │ │ │ @@ -492,15 +492,15 @@ │ │ │
    │ │ │ Lemma Zplus_gt_reg_r n m p : n + p > m + p -> n > m.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Multiplication

    │ │ │ +

    Multiplication

    │ │ │ Compatibility of multiplication by a positive wrt to order │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma Zmult_le_compat_r n m p : n <= m -> 0 <= p -> n * p <= m * p.
    │ │ │ │ │ │ @@ -620,30 +620,30 @@ │ │ │
    │ │ │ Lemma Zmult_gt_0_reg_l n m : n > 0 -> n * m > 0 -> m > 0.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Square

    │ │ │ +

    Square

    │ │ │ Simplification of square wrt order │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma Zlt_square_simpl n m : 0 <= n -> m * m < n * n -> m < n.
    │ │ │ │ │ │
    │ │ │ Lemma Zgt_square_simpl n m : n >= 0 -> n * n > m * m -> n > m.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Equivalence between inequalities

    │ │ │ +

    Equivalence between inequalities

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Notation Zle_plus_swap := Z.le_add_le_sub_r (only parsing).
    │ │ │ Notation Zlt_plus_swap := Z.lt_add_lt_sub_r (only parsing).
    │ │ ├── ./usr/share/doc/coq-theories/html/Coq.ZArith.Zpow_def.html │ │ │ @@ -19,15 +19,15 @@ │ │ │ Require Import BinInt Ring_theory.
    │ │ │ Local Open Scope Z_scope.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Power functions over Z

    │ │ │ +

    Power functions over Z

    │ │ │ │ │ │
    │ │ │ │ │ │ Nota : this file is mostly deprecated. The definition of Z.pow │ │ │ and its usual properties are now provided by module BinInt.Z. │ │ │
    │ │ │
    │ │ ├── ./usr/share/doc/coq-theories/html/Coq.ZArith.Zpow_facts.html │ │ │ @@ -97,15 +97,15 @@ │ │ │ Lemma Zpower2_Psize n p :
    │ │ │   Zpos p < 2^(Z.of_nat n) <-> (Pos.size_nat p <= n)%nat.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Z.pow and modulo

    │ │ │ +

    Z.pow and modulo

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Theorem Zpower_mod p q n :
    │ │ │   0 < n -> (p^q) mod n = ((p mod n)^q) mod n.
    │ │ │ @@ -173,15 +173,15 @@ │ │ │ Theorem Zdivide_power_2 x p n :
    │ │ │  0 <= n -> 0 <= x -> prime p -> (x | p^n) -> exists m, x = p^m.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Z.square: a direct definition of z^2

    │ │ │ +

    Z.square: a direct definition of z^2

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Notation Psquare_correct := Pos.square_spec (only parsing).
    │ │ │ Notation Zsquare_correct := Z.square_spec (only parsing).
    │ │ ├── ./usr/share/doc/coq-theories/html/Coq.ZArith.Zpower.html │ │ │ @@ -20,15 +20,15 @@ │ │ │ Require Export Zpow_def.
    │ │ │ Local Open Scope Z_scope.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Power functions over Z

    │ │ │ +

    Power functions over Z

    │ │ │ │ │ │
    │ │ │ │ │ │ Nota : this file is mostly deprecated. The definition of Z.pow │ │ │ and its usual properties are now provided by module BinInt.Z. │ │ │ Powers of 2 are also available there (see Z.shiftl and Z.shiftr). │ │ │ Only remain here: │ │ │ @@ -118,15 +118,15 @@ │ │ │
    │ │ │ Section Powers_of_2.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Powers of 2

    │ │ │ +

    Powers of 2

    │ │ │ │ │ │
    │ │ │ │ │ │ For the powers of two, that will be widely used, a more direct │ │ │ calculus is possible. shift n m computes 2^n * m, i.e. │ │ │ m shifted by n positions │ │ │
    │ │ │ @@ -245,15 +245,15 @@ │ │ │
    │ │ │ Section power_div_with_rest.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Division by a power of two.

    │ │ │ +

    Division by a power of two.

    │ │ │ │ │ │
    │ │ │ │ │ │ To x:Z and p:positive, q,r are associated such that │ │ │ x = 2^p.q + r and 0 <= r < 2^p │ │ │
    │ │ ├── ./usr/share/doc/coq-theories/html/Coq.ZArith.Zquot.html │ │ │ @@ -118,15 +118,15 @@ │ │ │
    │ │ │ Lemma Z_rem_mult a b : Z.rem (a*b) b = 0.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Division and Opposite

    │ │ │ +

    Division and Opposite

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ │ │ │
    │ │ │ @@ -197,15 +197,15 @@ │ │ │
    │ │ │ Theorem Zrem_lt_neg_neg a b : a<=0 -> b<0 -> b < Z.rem a b <= 0.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Unicity results

    │ │ │ +

    Unicity results

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Definition Remainder a b r :=
    │ │ │   (0 <= a /\ 0 <= r < Z.abs b) \/ (a <= 0 /\ -Z.abs b < r <= 0).
    │ │ │ @@ -230,15 +230,15 @@ │ │ │ Theorem Zrem_unique_full a b q r :
    │ │ │   Remainder a b r -> a = b*q + r -> r = Z.rem a b.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Order results about Zrem and Zquot

    │ │ │ +

    Order results about Zrem and Zquot

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ │ │ │
    │ │ │ @@ -328,15 +328,15 @@ │ │ │ Theorem Zquot_sgn: forall a b,
    │ │ │   0 <= Z.sgn (a÷b) * Z.sgn a * Z.sgn b.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Relations between usual operations and Zmod and Zdiv

    │ │ │ +

    Relations between usual operations and Zmod and Zdiv

    │ │ │ │ │ │
    │ │ │ │ │ │ First, a result that used to be always valid with Zdiv, │ │ │ but must be restricted here. │ │ │ For instance, now (9+(-5)*2) rem 2 = -1 <> 1 = 9 rem 2 │ │ │
    │ │ │ @@ -492,15 +492,15 @@ │ │ │
    │ │ │ Lemma Zodd_rem : forall a, Z.odd a = negb (Z.eqb (Z.rem a 2) 0).
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Interaction with "historic" Zdiv

    │ │ │ +

    Interaction with "historic" Zdiv

    │ │ │ │ │ │
    │ │ │ │ │ │ They agree at least on positive numbers: │ │ │
    │ │ │
    │ │ ├── ./usr/share/doc/coq-theories/html/Coq.ZArith.auxiliary.html │ │ │ @@ -34,15 +34,15 @@ │ │ │
    │ │ │ Local Open Scope Z_scope.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Moving terms from one side to the other of an inequality

    │ │ │ +

    Moving terms from one side to the other of an inequality

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Theorem Zne_left n m : Zne n m -> Zne (n + - m) 0.
    │ │ ├── ./usr/share/doc/coq-theories/html/Coq.btauto.Algebra.html │ │ │ @@ -108,15 +108,15 @@ │ │ │
    │ │ │ Section Definitions.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Global, inductive definitions.

    │ │ │ +

    Global, inductive definitions.

    │ │ │ │ │ │
    │ │ │ │ │ │ A Horner polynomial is either a constant, or a product P × (i + Q), where i │ │ │ is a variable. │ │ │
    │ │ │
    │ │ │ @@ -181,15 +181,15 @@ │ │ │ Program Instance Decidable_PosLe : forall p q, Decidable (Pos.le p q) :=
    │ │ │   { Decidable_witness := Pos.leb p q }.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    The core reflexive part.

    │ │ │ +

    The core reflexive part.

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Hint Constructors valid : core.
    │ │ ├── ./usr/share/doc/coq-theories/html/Coq.extraction.ExtrHaskellNatInt.html │ │ │ @@ -28,19 +28,19 @@ │ │ │ Require Import Arith.
    │ │ │ Require Import ExtrHaskellNatNum.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Disclaimer: trying to obtain efficient certified programs

    │ │ │ +

    Disclaimer: trying to obtain efficient certified programs

    │ │ │ │ │ │ -

    by extracting nat into Int is definitively *not* a good idea.

    │ │ │ +

    by extracting nat into Int is definitively *not* a good idea.

    │ │ │ │ │ │ -

    See comments in ExtrOcamlNatInt.v.

    │ │ │ +

    See comments in ExtrOcamlNatInt.v.

    │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Extract Inductive nat => "Prelude.Int" [ "0" "Prelude.succ" ]
    │ │ ├── ./usr/share/doc/coq-theories/html/Coq.extraction.ExtrHaskellNatInteger.html │ │ │ @@ -28,19 +28,19 @@ │ │ │ Require Import Arith.
    │ │ │ Require Import ExtrHaskellNatNum.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Disclaimer: trying to obtain efficient certified programs

    │ │ │ +

    Disclaimer: trying to obtain efficient certified programs

    │ │ │ │ │ │ -

    by extracting nat into Integer isn't necessarily a good idea.

    │ │ │ +

    by extracting nat into Integer isn't necessarily a good idea.

    │ │ │ │ │ │ -

    See comments in ExtrOcamlNatInt.v.

    │ │ │ +

    See comments in ExtrOcamlNatInt.v.

    │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Extract Inductive nat => "Prelude.Integer" [ "0" "Prelude.succ" ]
    │ │ ├── ./usr/share/doc/coq-theories/html/Coq.extraction.ExtrHaskellNatNum.html │ │ │ @@ -13,23 +13,23 @@ │ │ │ │ │ │

    Library Coq.extraction.ExtrHaskellNatNum

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Efficient (but uncertified) extraction of usual nat functions

    │ │ │ +

    Efficient (but uncertified) extraction of usual nat functions

    │ │ │ │ │ │ -

    into equivalent versions in Haskell's Prelude that are defined

    │ │ │ +

    into equivalent versions in Haskell's Prelude that are defined

    │ │ │ │ │ │ -

    for any Num typeclass instances. Useful in combination with

    │ │ │ +

    for any Num typeclass instances. Useful in combination with

    │ │ │ │ │ │ -

    Extract Inductive nat that maps nat onto a Haskell type that

    │ │ │ +

    Extract Inductive nat that maps nat onto a Haskell type that

    │ │ │ │ │ │ -

    implements Num.

    │ │ │ +

    implements Num.

    │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Require Coq.extraction.Extraction.
    │ │ ├── ./usr/share/doc/coq-theories/html/Coq.extraction.ExtrHaskellString.html │ │ │ @@ -13,15 +13,15 @@ │ │ │ │ │ │

    Library Coq.extraction.ExtrHaskellString

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Special handling of ascii and strings for extraction to Haskell.

    │ │ │ +

    Special handling of ascii and strings for extraction to Haskell.

    │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Require Coq.extraction.Extraction.
    │ │ │ @@ -34,24 +34,24 @@ │ │ │
    │ │ │ Require Export ExtrHaskellBasic.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    At the moment, Coq's extraction has no way to add extra import

    │ │ │ +

    At the moment, Coq's extraction has no way to add extra import

    │ │ │ │ │ │ -

    statements to the extracted Haskell code. You will have to

    │ │ │ +

    statements to the extracted Haskell code. You will have to

    │ │ │ │ │ │ -

    manually add:

    │ │ │ +

    manually add:

    │ │ │ │ │ │ * │ │ │ -

    import qualified Data.Bits

    │ │ │ +

    import qualified Data.Bits

    │ │ │ │ │ │ -

    import qualified Data.Char

    │ │ │ +

    import qualified Data.Char

    │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Extract Inductive ascii => "Prelude.Char"
    │ │ ├── ./usr/share/doc/coq-theories/html/Coq.extraction.ExtrHaskellZInt.html │ │ │ @@ -28,19 +28,19 @@ │ │ │ Require Import ZArith.
    │ │ │ Require Import ExtrHaskellZNum.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Disclaimer: trying to obtain efficient certified programs

    │ │ │ +

    Disclaimer: trying to obtain efficient certified programs

    │ │ │ │ │ │ -

    by extracting Z into Int is definitively *not* a good idea.

    │ │ │ +

    by extracting Z into Int is definitively *not* a good idea.

    │ │ │ │ │ │ -

    See comments in ExtrOcamlNatInt.v.

    │ │ │ +

    See comments in ExtrOcamlNatInt.v.

    │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Extract Inductive positive => "Prelude.Int" [
    │ │ ├── ./usr/share/doc/coq-theories/html/Coq.extraction.ExtrHaskellZNum.html │ │ │ @@ -13,23 +13,23 @@ │ │ │ │ │ │

    Library Coq.extraction.ExtrHaskellZNum

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Efficient (but uncertified) extraction of usual Z functions

    │ │ │ +

    Efficient (but uncertified) extraction of usual Z functions

    │ │ │ │ │ │ -

    into equivalent versions in Haskell's Prelude that are defined

    │ │ │ +

    into equivalent versions in Haskell's Prelude that are defined

    │ │ │ │ │ │ -

    for any Num typeclass instances. Useful in combination with

    │ │ │ +

    for any Num typeclass instances. Useful in combination with

    │ │ │ │ │ │ -

    Extract Inductive Z that maps Z onto a Haskell type that

    │ │ │ +

    Extract Inductive Z that maps Z onto a Haskell type that

    │ │ │ │ │ │ -

    implements Num.

    │ │ │ +

    implements Num.

    │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Require Coq.extraction.Extraction.
    │ │ ├── ./usr/share/doc/coq-theories/html/Coq.omega.PreOmega.html │ │ │ @@ -21,15 +21,15 @@ │ │ │
    │ │ │ Local Open Scope Z_scope.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Z.div_mod_to_equations, Z.quot_rem_to_equations, Z.to_euclidean_division_equations: the tactics for preprocessing Z.div and Z.modulo, Z.quot and Z.rem

    │ │ │ +

    Z.div_mod_to_equations, Z.quot_rem_to_equations, Z.to_euclidean_division_equations: the tactics for preprocessing Z.div and Z.modulo, Z.quot and Z.rem

    │ │ │ │ │ │
    │ │ │ │ │ │ These tactic use the complete specification of Z.div and │ │ │ Z.modulo (Z.quot and Z.rem, respectively) to remove these │ │ │ functions from the goal without losing information. The │ │ │ Z.euclidean_division_equations_cleanup tactic removes needless │ │ │ @@ -143,15 +143,15 @@ │ │ │ │ │ │
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    zify: the Z-ification tactic

    │ │ │ +

    zify: the Z-ification tactic

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ │ │ │