--- /tmp/rebuilderdcqyBnM/inputs/libcoq-stdlib_8.20.1+dfsg-1_riscv64.deb +++ /tmp/rebuilderdcqyBnM/out/libcoq-stdlib_8.20.1+dfsg-1_riscv64.deb ├── file list │ @@ -1,3 +1,3 @@ │ -rw-r--r-- 0 0 0 4 2025-02-15 14:19:14.000000 debian-binary │ --rw-r--r-- 0 0 0 63348 2025-02-15 14:19:14.000000 control.tar.xz │ --rw-r--r-- 0 0 0 23463556 2025-02-15 14:19:14.000000 data.tar.xz │ +-rw-r--r-- 0 0 0 63316 2025-02-15 14:19:14.000000 control.tar.xz │ +-rw-r--r-- 0 0 0 23463700 2025-02-15 14:19:14.000000 data.tar.xz ├── control.tar.xz │ ├── control.tar │ │ ├── ./control │ │ │ @@ -1,13 +1,13 @@ │ │ │ Package: libcoq-stdlib │ │ │ Source: coq │ │ │ Version: 8.20.1+dfsg-1 │ │ │ Architecture: riscv64 │ │ │ Maintainer: Debian OCaml Maintainers │ │ │ -Installed-Size: 146163 │ │ │ +Installed-Size: 146164 │ │ │ Recommends: coq │ │ │ Breaks: coq-doc (<= 8.0pl1.0-2), coq-libs (<< 8.2.pl1), coq-theories │ │ │ Replaces: coq-libs (<< 8.2.pl1), coq-theories │ │ │ Provides: coq-theories (= 8.20.1+dfsg-1), libcoq-stdlib-h7x67 │ │ │ Section: math │ │ │ Priority: optional │ │ │ Homepage: http://coq.inria.fr/ │ │ ├── ./md5sums │ │ │ ├── ./md5sums │ │ │ │┄ Files differ ├── data.tar.xz │ ├── data.tar │ │ ├── file list │ │ │ @@ -2419,55 +2419,55 @@ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2025-02-15 14:19:14.000000 ./usr/share/doc/coq-theories/html/ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/ │ │ │ -rw-r--r-- 0 root (0) root (0) 1904 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/README.md.gz │ │ │ -rw-r--r-- 0 root (0) root (0) 4580 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/changelog.Debian.gz │ │ │ -rw-r--r-- 0 root (0) root (0) 8307 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/copyright │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/ │ │ │ -rw-r--r-- 0 root (0) root (0) 3005 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Arith.Arith.html │ │ │ --rw-r--r-- 0 root (0) root (0) 107843 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Arith.Arith_base.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 107845 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Arith.Arith_base.html │ │ │ -rw-r--r-- 0 root (0) root (0) 55999 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Arith.Between.html │ │ │ -rw-r--r-- 0 root (0) root (0) 15676 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Arith.Bool_nat.html │ │ │ -rw-r--r-- 0 root (0) root (0) 22063 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Arith.Cantor.html │ │ │ -rw-r--r-- 0 root (0) root (0) 13934 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Arith.Compare.html │ │ │ -rw-r--r-- 0 root (0) root (0) 63890 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Arith.Compare_dec.html │ │ │ --rw-r--r-- 0 root (0) root (0) 13018 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Arith.EqNat.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 13019 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Arith.EqNat.html │ │ │ -rw-r--r-- 0 root (0) root (0) 13946 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Arith.Euclid.html │ │ │ -rw-r--r-- 0 root (0) root (0) 7289 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Arith.Factorial.html │ │ │ --rw-r--r-- 0 root (0) root (0) 359544 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Arith.PeanoNat.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 359550 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Arith.PeanoNat.html │ │ │ -rw-r--r-- 0 root (0) root (0) 8974 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Arith.Peano_dec.html │ │ │ -rw-r--r-- 0 root (0) root (0) 79061 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Arith.Wf_nat.html │ │ │ -rw-r--r-- 0 root (0) root (0) 40548 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Array.PArray.html │ │ │ --rw-r--r-- 0 root (0) root (0) 228715 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Bool.Bool.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 228730 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Bool.Bool.html │ │ │ -rw-r--r-- 0 root (0) root (0) 16144 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Bool.BoolEq.html │ │ │ --rw-r--r-- 0 root (0) root (0) 28684 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Bool.BoolOrder.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 28687 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Bool.BoolOrder.html │ │ │ -rw-r--r-- 0 root (0) root (0) 34692 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Bool.Bvector.html │ │ │ -rw-r--r-- 0 root (0) root (0) 10524 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Bool.DecBool.html │ │ │ -rw-r--r-- 0 root (0) root (0) 14176 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Bool.IfProp.html │ │ │ -rw-r--r-- 0 root (0) root (0) 22507 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Bool.Sumbool.html │ │ │ -rw-r--r-- 0 root (0) root (0) 9445 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Bool.Zerob.html │ │ │ --rw-r--r-- 0 root (0) root (0) 33295 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Classes.CEquivalence.html │ │ │ --rw-r--r-- 0 root (0) root (0) 153003 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Classes.CMorphisms.html │ │ │ --rw-r--r-- 0 root (0) root (0) 95254 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Classes.CRelationClasses.html │ │ │ --rw-r--r-- 0 root (0) root (0) 14694 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Classes.DecidableClass.html │ │ │ --rw-r--r-- 0 root (0) root (0) 41299 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Classes.EquivDec.html │ │ │ --rw-r--r-- 0 root (0) root (0) 33253 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Classes.Equivalence.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6904 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Classes.Init.html │ │ │ --rw-r--r-- 0 root (0) root (0) 161743 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Classes.Morphisms.html │ │ │ --rw-r--r-- 0 root (0) root (0) 26016 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Classes.Morphisms_Prop.html │ │ │ --rw-r--r-- 0 root (0) root (0) 15023 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Classes.Morphisms_Relations.html │ │ │ --rw-r--r-- 0 root (0) root (0) 129664 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Classes.RelationClasses.html │ │ │ --rw-r--r-- 0 root (0) root (0) 61886 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Classes.RelationPairs.html │ │ │ --rw-r--r-- 0 root (0) root (0) 27485 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Classes.SetoidClass.html │ │ │ --rw-r--r-- 0 root (0) root (0) 32902 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Classes.SetoidDec.html │ │ │ --rw-r--r-- 0 root (0) root (0) 33425 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Classes.SetoidTactics.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 33296 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Classes.CEquivalence.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 153005 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Classes.CMorphisms.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 95257 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Classes.CRelationClasses.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 14695 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Classes.DecidableClass.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 41300 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Classes.EquivDec.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 33254 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Classes.Equivalence.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6905 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Classes.Init.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 161745 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Classes.Morphisms.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 26017 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Classes.Morphisms_Prop.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 15024 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Classes.Morphisms_Relations.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 129667 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Classes.RelationClasses.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 61887 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Classes.RelationPairs.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 27486 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Classes.SetoidClass.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 32903 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Classes.SetoidDec.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 33426 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Classes.SetoidTactics.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3600 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Compat.AdmitAxiom.html │ │ │ -rw-r--r-- 0 root (0) root (0) 36191 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Compat.Coq818.html │ │ │ -rw-r--r-- 0 root (0) root (0) 2919 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Compat.Coq819.html │ │ │ -rw-r--r-- 0 root (0) root (0) 2701 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Compat.Coq820.html │ │ │ --rw-r--r-- 0 root (0) root (0) 638775 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.FSets.FMapAVL.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 638817 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.FSets.FMapAVL.html │ │ │ -rw-r--r-- 0 root (0) root (0) 491484 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.FSets.FMapFacts.html │ │ │ -rw-r--r-- 0 root (0) root (0) 249549 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.FSets.FMapFullAVL.html │ │ │ -rw-r--r-- 0 root (0) root (0) 134217 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.FSets.FMapInterface.html │ │ │ -rw-r--r-- 0 root (0) root (0) 312563 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.FSets.FMapList.html │ │ │ -rw-r--r-- 0 root (0) root (0) 272480 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.FSets.FMapPositive.html │ │ │ -rw-r--r-- 0 root (0) root (0) 273119 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.FSets.FMapWeakList.html │ │ │ -rw-r--r-- 0 root (0) root (0) 4419 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.FSets.FMaps.html │ │ │ @@ -2480,21 +2480,21 @@ │ │ │ -rw-r--r-- 0 root (0) root (0) 229591 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.FSets.FSetInterface.html │ │ │ -rw-r--r-- 0 root (0) root (0) 5845 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.FSets.FSetList.html │ │ │ -rw-r--r-- 0 root (0) root (0) 284090 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.FSets.FSetPositive.html │ │ │ -rw-r--r-- 0 root (0) root (0) 330840 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.FSets.FSetProperties.html │ │ │ -rw-r--r-- 0 root (0) root (0) 30502 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.FSets.FSetToFiniteSet.html │ │ │ -rw-r--r-- 0 root (0) root (0) 6058 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.FSets.FSetWeakList.html │ │ │ -rw-r--r-- 0 root (0) root (0) 5771 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.FSets.FSets.html │ │ │ --rw-r--r-- 0 root (0) root (0) 43972 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Floats.FloatAxioms.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 43971 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Floats.FloatAxioms.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3707 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Floats.FloatClass.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8314 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Floats.FloatLemmas.html │ │ │ --rw-r--r-- 0 root (0) root (0) 21337 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Floats.FloatOps.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8313 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Floats.FloatLemmas.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 21336 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Floats.FloatOps.html │ │ │ -rw-r--r-- 0 root (0) root (0) 5273 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Floats.Floats.html │ │ │ --rw-r--r-- 0 root (0) root (0) 29739 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Floats.PrimFloat.html │ │ │ --rw-r--r-- 0 root (0) root (0) 160758 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Floats.SpecFloat.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 29728 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Floats.PrimFloat.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 160754 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Floats.SpecFloat.html │ │ │ -rw-r--r-- 0 root (0) root (0) 709026 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Init.Byte.html │ │ │ -rw-r--r-- 0 root (0) root (0) 124431 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Init.Datatypes.html │ │ │ -rw-r--r-- 0 root (0) root (0) 67742 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Init.Decimal.html │ │ │ -rw-r--r-- 0 root (0) root (0) 83097 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Init.Hexadecimal.html │ │ │ -rw-r--r-- 0 root (0) root (0) 532725 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Init.Logic.html │ │ │ -rw-r--r-- 0 root (0) root (0) 2829 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Init.Ltac.html │ │ │ -rw-r--r-- 0 root (0) root (0) 124863 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Init.Nat.html │ │ │ @@ -2502,21 +2502,21 @@ │ │ │ -rw-r--r-- 0 root (0) root (0) 9933 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Init.Number.html │ │ │ -rw-r--r-- 0 root (0) root (0) 64638 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Init.Peano.html │ │ │ -rw-r--r-- 0 root (0) root (0) 12568 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Init.Prelude.html │ │ │ -rw-r--r-- 0 root (0) root (0) 588062 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Init.Specif.html │ │ │ -rw-r--r-- 0 root (0) root (0) 69736 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Init.Tactics.html │ │ │ -rw-r--r-- 0 root (0) root (0) 24852 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Init.Tauto.html │ │ │ -rw-r--r-- 0 root (0) root (0) 56558 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Init.Wf.html │ │ │ --rw-r--r-- 0 root (0) root (0) 1005691 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Lists.List.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 1005652 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Lists.List.html │ │ │ -rw-r--r-- 0 root (0) root (0) 23118 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Lists.ListDec.html │ │ │ -rw-r--r-- 0 root (0) root (0) 113626 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Lists.ListSet.html │ │ │ -rw-r--r-- 0 root (0) root (0) 15205 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Lists.ListTactics.html │ │ │ --rw-r--r-- 0 root (0) root (0) 236380 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Lists.SetoidList.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 236378 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Lists.SetoidList.html │ │ │ -rw-r--r-- 0 root (0) root (0) 44917 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Lists.SetoidPermutation.html │ │ │ --rw-r--r-- 0 root (0) root (0) 37550 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Lists.StreamMemo.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 37548 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Lists.StreamMemo.html │ │ │ -rw-r--r-- 0 root (0) root (0) 57012 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Lists.Streams.html │ │ │ -rw-r--r-- 0 root (0) root (0) 54223 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Logic.Adjointification.html │ │ │ -rw-r--r-- 0 root (0) root (0) 28317 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Logic.Berardi.html │ │ │ -rw-r--r-- 0 root (0) root (0) 238047 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Logic.ChoiceFacts.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3121 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Logic.Classical.html │ │ │ -rw-r--r-- 0 root (0) root (0) 13475 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Logic.ClassicalChoice.html │ │ │ -rw-r--r-- 0 root (0) root (0) 23909 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Logic.ClassicalDescription.html │ │ │ @@ -2548,34 +2548,34 @@ │ │ │ -rw-r--r-- 0 root (0) root (0) 7490 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Logic.PropFacts.html │ │ │ -rw-r--r-- 0 root (0) root (0) 7646 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Logic.RelationalChoice.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3397 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Logic.SetIsType.html │ │ │ -rw-r--r-- 0 root (0) root (0) 17187 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Logic.SetoidChoice.html │ │ │ -rw-r--r-- 0 root (0) root (0) 9458 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Logic.StrictProp.html │ │ │ -rw-r--r-- 0 root (0) root (0) 57550 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Logic.WKL.html │ │ │ -rw-r--r-- 0 root (0) root (0) 23285 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Logic.WeakFan.html │ │ │ --rw-r--r-- 0 root (0) root (0) 198582 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.MSets.MSetAVL.html │ │ │ --rw-r--r-- 0 root (0) root (0) 253506 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.MSets.MSetDecide.html │ │ │ --rw-r--r-- 0 root (0) root (0) 245421 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.MSets.MSetEqProperties.html │ │ │ --rw-r--r-- 0 root (0) root (0) 147620 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.MSets.MSetFacts.html │ │ │ --rw-r--r-- 0 root (0) root (0) 239860 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.MSets.MSetGenTree.html │ │ │ --rw-r--r-- 0 root (0) root (0) 345771 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.MSets.MSetInterface.html │ │ │ --rw-r--r-- 0 root (0) root (0) 203409 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.MSets.MSetList.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 198616 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.MSets.MSetAVL.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 253522 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.MSets.MSetDecide.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 245422 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.MSets.MSetEqProperties.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 147625 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.MSets.MSetFacts.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 239887 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.MSets.MSetGenTree.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 345778 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.MSets.MSetInterface.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 203414 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.MSets.MSetList.html │ │ │ -rw-r--r-- 0 root (0) root (0) 233427 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.MSets.MSetPositive.html │ │ │ --rw-r--r-- 0 root (0) root (0) 332281 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.MSets.MSetProperties.html │ │ │ --rw-r--r-- 0 root (0) root (0) 463865 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.MSets.MSetRBT.html │ │ │ --rw-r--r-- 0 root (0) root (0) 30363 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.MSets.MSetToFiniteSet.html │ │ │ --rw-r--r-- 0 root (0) root (0) 127905 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.MSets.MSetWeakList.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 332295 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.MSets.MSetProperties.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 463907 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.MSets.MSetRBT.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 30365 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.MSets.MSetToFiniteSet.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 127910 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.MSets.MSetWeakList.html │ │ │ -rw-r--r-- 0 root (0) root (0) 5306 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.MSets.MSets.html │ │ │ --rw-r--r-- 0 root (0) root (0) 281095 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.NArith.BinNat.html │ │ │ --rw-r--r-- 0 root (0) root (0) 99064 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.NArith.BinNatDef.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 281093 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.NArith.BinNat.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 99055 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.NArith.BinNatDef.html │ │ │ -rw-r--r-- 0 root (0) root (0) 7411 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.NArith.NArith.html │ │ │ -rw-r--r-- 0 root (0) root (0) 88281 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.NArith.Ndec.html │ │ │ -rw-r--r-- 0 root (0) root (0) 8571 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.NArith.Ndiv_def.html │ │ │ -rw-r--r-- 0 root (0) root (0) 6254 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.NArith.Ngcd_def.html │ │ │ --rw-r--r-- 0 root (0) root (0) 69143 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.NArith.Nnat.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 69141 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.NArith.Nnat.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3820 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.NArith.Nsqrt_def.html │ │ │ -rw-r--r-- 0 root (0) root (0) 11733 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Numbers.AltBinNotations.html │ │ │ -rw-r--r-- 0 root (0) root (0) 15561 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Numbers.BinNums.html │ │ │ -rw-r--r-- 0 root (0) root (0) 4226 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Numbers.Cyclic.Abstract.CarryType.html │ │ │ -rw-r--r-- 0 root (0) root (0) 210248 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Numbers.Cyclic.Abstract.CyclicAxioms.html │ │ │ -rw-r--r-- 0 root (0) root (0) 14968 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Numbers.Cyclic.Abstract.DoubleType.html │ │ │ -rw-r--r-- 0 root (0) root (0) 54727 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Numbers.Cyclic.Abstract.NZCyclic.html │ │ │ @@ -2587,15 +2587,15 @@ │ │ │ -rw-r--r-- 0 root (0) root (0) 151918 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Numbers.DecimalFacts.html │ │ │ -rw-r--r-- 0 root (0) root (0) 20858 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Numbers.DecimalN.html │ │ │ -rw-r--r-- 0 root (0) root (0) 60110 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Numbers.DecimalNat.html │ │ │ -rw-r--r-- 0 root (0) root (0) 78256 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Numbers.DecimalPos.html │ │ │ -rw-r--r-- 0 root (0) root (0) 52837 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Numbers.DecimalQ.html │ │ │ -rw-r--r-- 0 root (0) root (0) 16563 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Numbers.DecimalR.html │ │ │ -rw-r--r-- 0 root (0) root (0) 56969 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Numbers.DecimalString.html │ │ │ --rw-r--r-- 0 root (0) root (0) 17290 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Numbers.DecimalZ.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 17289 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Numbers.DecimalZ.html │ │ │ -rw-r--r-- 0 root (0) root (0) 164470 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Numbers.HexadecimalFacts.html │ │ │ -rw-r--r-- 0 root (0) root (0) 21324 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Numbers.HexadecimalN.html │ │ │ -rw-r--r-- 0 root (0) root (0) 72169 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Numbers.HexadecimalNat.html │ │ │ -rw-r--r-- 0 root (0) root (0) 94746 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Numbers.HexadecimalPos.html │ │ │ -rw-r--r-- 0 root (0) root (0) 54915 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Numbers.HexadecimalQ.html │ │ │ -rw-r--r-- 0 root (0) root (0) 17388 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Numbers.HexadecimalR.html │ │ │ -rw-r--r-- 0 root (0) root (0) 69145 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Numbers.HexadecimalString.html │ │ │ @@ -2766,17 +2766,17 @@ │ │ │ -rw-r--r-- 0 root (0) root (0) 17080 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Reals.Rtrigo_reg.html │ │ │ -rw-r--r-- 0 root (0) root (0) 100345 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Reals.Runcountable.html │ │ │ -rw-r--r-- 0 root (0) root (0) 107402 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Reals.SeqProp.html │ │ │ -rw-r--r-- 0 root (0) root (0) 24954 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Reals.SeqSeries.html │ │ │ -rw-r--r-- 0 root (0) root (0) 5315 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Reals.SplitAbsolu.html │ │ │ -rw-r--r-- 0 root (0) root (0) 4161 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Reals.SplitRmult.html │ │ │ -rw-r--r-- 0 root (0) root (0) 13873 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Reals.Sqrt_reg.html │ │ │ --rw-r--r-- 0 root (0) root (0) 75192 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Relations.Operators_Properties.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 75196 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Relations.Operators_Properties.html │ │ │ -rw-r--r-- 0 root (0) root (0) 25706 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Relations.Relation_Definitions.html │ │ │ --rw-r--r-- 0 root (0) root (0) 117584 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Relations.Relation_Operators.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 117603 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Relations.Relation_Operators.html │ │ │ -rw-r--r-- 0 root (0) root (0) 8076 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Relations.Relations.html │ │ │ -rw-r--r-- 0 root (0) root (0) 14365 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Setoids.Setoid.html │ │ │ -rw-r--r-- 0 root (0) root (0) 25778 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Sets.Classical_sets.html │ │ │ -rw-r--r-- 0 root (0) root (0) 38229 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Sets.Constructive_sets.html │ │ │ -rw-r--r-- 0 root (0) root (0) 44291 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Sets.Cpo.html │ │ │ -rw-r--r-- 0 root (0) root (0) 35551 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Sets.Ensembles.html │ │ │ -rw-r--r-- 0 root (0) root (0) 20995 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Sets.Finite_sets.html │ │ │ @@ -2793,31 +2793,31 @@ │ │ │ -rw-r--r-- 0 root (0) root (0) 19555 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Sets.Relations_1.html │ │ │ -rw-r--r-- 0 root (0) root (0) 23129 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Sets.Relations_1_facts.html │ │ │ -rw-r--r-- 0 root (0) root (0) 17551 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Sets.Relations_2.html │ │ │ -rw-r--r-- 0 root (0) root (0) 29642 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Sets.Relations_2_facts.html │ │ │ -rw-r--r-- 0 root (0) root (0) 16870 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Sets.Relations_3.html │ │ │ -rw-r--r-- 0 root (0) root (0) 14440 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Sets.Relations_3_facts.html │ │ │ -rw-r--r-- 0 root (0) root (0) 50873 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Sets.Uniset.html │ │ │ --rw-r--r-- 0 root (0) root (0) 72712 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Sorting.CPermutation.html │ │ │ --rw-r--r-- 0 root (0) root (0) 75081 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Sorting.Heap.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 72711 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Sorting.CPermutation.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 75071 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Sorting.Heap.html │ │ │ -rw-r--r-- 0 root (0) root (0) 46174 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Sorting.Mergesort.html │ │ │ -rw-r--r-- 0 root (0) root (0) 34335 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Sorting.PermutEq.html │ │ │ --rw-r--r-- 0 root (0) root (0) 111110 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Sorting.PermutSetoid.html │ │ │ --rw-r--r-- 0 root (0) root (0) 213703 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Sorting.Permutation.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 111106 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Sorting.PermutSetoid.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 213701 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Sorting.Permutation.html │ │ │ -rw-r--r-- 0 root (0) root (0) 40699 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Sorting.Sorted.html │ │ │ -rw-r--r-- 0 root (0) root (0) 2999 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Sorting.Sorting.html │ │ │ -rw-r--r-- 0 root (0) root (0) 72923 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Strings.Ascii.html │ │ │ -rw-r--r-- 0 root (0) root (0) 40714 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Strings.BinaryString.html │ │ │ -rw-r--r-- 0 root (0) root (0) 258395 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Strings.Byte.html │ │ │ -rw-r--r-- 0 root (0) root (0) 95295 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Strings.HexString.html │ │ │ -rw-r--r-- 0 root (0) root (0) 60524 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Strings.OctalString.html │ │ │ --rw-r--r-- 0 root (0) root (0) 123342 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Strings.PString.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 123335 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Strings.PString.html │ │ │ -rw-r--r-- 0 root (0) root (0) 15794 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Strings.PrimString.html │ │ │ --rw-r--r-- 0 root (0) root (0) 21323 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Strings.PrimStringAxioms.html │ │ │ --rw-r--r-- 0 root (0) root (0) 101920 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Strings.String.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 21321 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Strings.PrimStringAxioms.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 101914 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Strings.String.html │ │ │ -rw-r--r-- 0 root (0) root (0) 46321 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Structures.DecidableType.html │ │ │ -rw-r--r-- 0 root (0) root (0) 22654 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Structures.DecidableTypeEx.html │ │ │ -rw-r--r-- 0 root (0) root (0) 73326 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Structures.Equalities.html │ │ │ -rw-r--r-- 0 root (0) root (0) 81255 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Structures.EqualitiesFacts.html │ │ │ -rw-r--r-- 0 root (0) root (0) 220682 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Structures.GenericMinMax.html │ │ │ -rw-r--r-- 0 root (0) root (0) 183735 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Structures.OrderedType.html │ │ │ -rw-r--r-- 0 root (0) root (0) 31090 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Structures.OrderedTypeAlt.html │ │ │ @@ -2840,57 +2840,57 @@ │ │ │ -rw-r--r-- 0 root (0) root (0) 16357 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Wellfounded.Inverse_Image.html │ │ │ -rw-r--r-- 0 root (0) root (0) 36848 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Wellfounded.Lexicographic_Exponentiation.html │ │ │ -rw-r--r-- 0 root (0) root (0) 33731 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Wellfounded.Lexicographic_Product.html │ │ │ -rw-r--r-- 0 root (0) root (0) 9750 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Wellfounded.Transitive_Closure.html │ │ │ -rw-r--r-- 0 root (0) root (0) 14007 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Wellfounded.Union.html │ │ │ -rw-r--r-- 0 root (0) root (0) 16919 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Wellfounded.Well_Ordering.html │ │ │ -rw-r--r-- 0 root (0) root (0) 4392 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.Wellfounded.Wellfounded.html │ │ │ --rw-r--r-- 0 root (0) root (0) 457899 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.ZArith.BinInt.html │ │ │ --rw-r--r-- 0 root (0) root (0) 189069 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.ZArith.BinIntDef.html │ │ │ --rw-r--r-- 0 root (0) root (0) 176746 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.ZArith.Int.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 457859 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.ZArith.BinInt.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 189041 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.ZArith.BinIntDef.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 176742 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.ZArith.Int.html │ │ │ -rw-r--r-- 0 root (0) root (0) 52637 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.ZArith.Wf_Z.html │ │ │ -rw-r--r-- 0 root (0) root (0) 4978 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.ZArith.ZArith.html │ │ │ -rw-r--r-- 0 root (0) root (0) 7451 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.ZArith.ZArith_base.html │ │ │ --rw-r--r-- 0 root (0) root (0) 44092 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.ZArith.ZArith_dec.html │ │ │ --rw-r--r-- 0 root (0) root (0) 26769 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.ZArith.Zabs.html │ │ │ --rw-r--r-- 0 root (0) root (0) 77269 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.ZArith.Zbitwise.html │ │ │ --rw-r--r-- 0 root (0) root (0) 56082 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.ZArith.Zbool.html │ │ │ --rw-r--r-- 0 root (0) root (0) 58976 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.ZArith.Zcompare.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 44090 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.ZArith.ZArith_dec.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 26766 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.ZArith.Zabs.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 77265 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.ZArith.Zbitwise.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 56080 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.ZArith.Zbool.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 58968 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.ZArith.Zcompare.html │ │ │ -rw-r--r-- 0 root (0) root (0) 28671 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.ZArith.Zcomplements.html │ │ │ --rw-r--r-- 0 root (0) root (0) 225903 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.ZArith.Zdiv.html │ │ │ --rw-r--r-- 0 root (0) root (0) 14891 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.ZArith.Zeuclid.html │ │ │ --rw-r--r-- 0 root (0) root (0) 60512 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.ZArith.Zeven.html │ │ │ --rw-r--r-- 0 root (0) root (0) 38844 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.ZArith.Zgcd_alt.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9591 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.ZArith.Zhints.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 225894 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.ZArith.Zdiv.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 14890 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.ZArith.Zeuclid.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 60511 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.ZArith.Zeven.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 38843 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.ZArith.Zgcd_alt.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9588 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.ZArith.Zhints.html │ │ │ -rw-r--r-- 0 root (0) root (0) 14641 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.ZArith.Zmax.html │ │ │ -rw-r--r-- 0 root (0) root (0) 14380 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.ZArith.Zmin.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3187 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.ZArith.Zminmax.html │ │ │ -rw-r--r-- 0 root (0) root (0) 6421 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.ZArith.Zmisc.html │ │ │ --rw-r--r-- 0 root (0) root (0) 270646 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.ZArith.Znat.html │ │ │ --rw-r--r-- 0 root (0) root (0) 194873 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.ZArith.Znumtheory.html │ │ │ --rw-r--r-- 0 root (0) root (0) 163656 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.ZArith.Zorder.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 270643 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.ZArith.Znat.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 194868 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.ZArith.Znumtheory.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 163646 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.ZArith.Zorder.html │ │ │ -rw-r--r-- 0 root (0) root (0) 18204 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.ZArith.Zpow_alt.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6597 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.ZArith.Zpow_def.html │ │ │ --rw-r--r-- 0 root (0) root (0) 56496 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.ZArith.Zpow_facts.html │ │ │ --rw-r--r-- 0 root (0) root (0) 84262 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.ZArith.Zpower.html │ │ │ --rw-r--r-- 0 root (0) root (0) 129140 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.ZArith.Zquot.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6596 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.ZArith.Zpow_def.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 56494 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.ZArith.Zpow_facts.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 84259 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.ZArith.Zpower.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 129135 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.ZArith.Zquot.html │ │ │ -rw-r--r-- 0 root (0) root (0) 12888 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.ZArith.Zwf.html │ │ │ --rw-r--r-- 0 root (0) root (0) 23779 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.ZArith.auxiliary.html │ │ │ --rw-r--r-- 0 root (0) root (0) 132781 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.btauto.Algebra.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 23778 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.ZArith.auxiliary.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 132779 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.btauto.Algebra.html │ │ │ -rw-r--r-- 0 root (0) root (0) 2892 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.btauto.Btauto.html │ │ │ -rw-r--r-- 0 root (0) root (0) 61132 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.btauto.Reflect.html │ │ │ -rw-r--r-- 0 root (0) root (0) 2582 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.derive.Derive.html │ │ │ -rw-r--r-- 0 root (0) root (0) 5557 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.extraction.ExtrHaskellBasic.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4343 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.extraction.ExtrHaskellNatInt.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4354 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.extraction.ExtrHaskellNatInteger.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8869 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.extraction.ExtrHaskellNatNum.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10091 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.extraction.ExtrHaskellString.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5001 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.extraction.ExtrHaskellZInt.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4340 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.extraction.ExtrHaskellNatInt.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4351 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.extraction.ExtrHaskellNatInteger.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8864 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.extraction.ExtrHaskellNatNum.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10085 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.extraction.ExtrHaskellString.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4998 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.extraction.ExtrHaskellZInt.html │ │ │ -rw-r--r-- 0 root (0) root (0) 4886 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.extraction.ExtrHaskellZInteger.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6098 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.extraction.ExtrHaskellZNum.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6093 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.extraction.ExtrHaskellZNum.html │ │ │ -rw-r--r-- 0 root (0) root (0) 9860 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.extraction.ExtrOCamlFloats.html │ │ │ -rw-r--r-- 0 root (0) root (0) 9832 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.extraction.ExtrOCamlInt63.html │ │ │ -rw-r--r-- 0 root (0) root (0) 4484 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.extraction.ExtrOCamlPArray.html │ │ │ -rw-r--r-- 0 root (0) root (0) 6560 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.extraction.ExtrOCamlPString.html │ │ │ -rw-r--r-- 0 root (0) root (0) 6092 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.extraction.ExtrOcamlBasic.html │ │ │ -rw-r--r-- 0 root (0) root (0) 8544 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.extraction.ExtrOcamlChar.html │ │ │ -rw-r--r-- 0 root (0) root (0) 26596 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.extraction.ExtrOcamlIntConv.html │ │ │ @@ -2933,15 +2933,15 @@ │ │ │ -rw-r--r-- 0 root (0) root (0) 2793 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.micromega.ZifyPow.html │ │ │ -rw-r--r-- 0 root (0) root (0) 54530 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.micromega.ZifySint63.html │ │ │ -rw-r--r-- 0 root (0) root (0) 58570 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.micromega.ZifyUint63.html │ │ │ -rw-r--r-- 0 root (0) root (0) 35629 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.micromega.Ztac.html │ │ │ -rw-r--r-- 0 root (0) root (0) 13799 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.nsatz.Nsatz.html │ │ │ -rw-r--r-- 0 root (0) root (0) 119569 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.nsatz.NsatzTactic.html │ │ │ -rw-r--r-- 0 root (0) root (0) 130147 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.omega.OmegaLemmas.html │ │ │ --rw-r--r-- 0 root (0) root (0) 96699 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.omega.PreOmega.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 96698 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.omega.PreOmega.html │ │ │ -rw-r--r-- 0 root (0) root (0) 94253 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.rtauto.Bintree.html │ │ │ -rw-r--r-- 0 root (0) root (0) 92410 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.rtauto.Rtauto.html │ │ │ -rw-r--r-- 0 root (0) root (0) 16075 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.setoid_ring.Algebra_syntax.html │ │ │ -rw-r--r-- 0 root (0) root (0) 13558 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.setoid_ring.ArithRing.html │ │ │ -rw-r--r-- 0 root (0) root (0) 19422 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.setoid_ring.BinList.html │ │ │ -rw-r--r-- 0 root (0) root (0) 80466 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.setoid_ring.Cring.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3021 2025-02-15 14:19:14.000000 ./usr/share/doc/libcoq-stdlib/html/Coq.setoid_ring.Field.html │ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.Arith.Arith_base.html │ │ │ @@ -54,15 +54,15 @@ │ │ │ Require Export EqNat.
│ │ │ Require Export Wf_nat.
│ │ │ │ │ │
│ │ │ │ │ │ │ │ │
│ │ │ -

arith hint database

│ │ │ +

arith hint database

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ #[global]
│ │ │ Hint Resolve eq_nat_refl: arith.
│ │ │ @@ -76,15 +76,15 @@ │ │ │ #[global]
│ │ │ Hint Immediate in_int_Sp_q exists_le_S exists_S_le: arith.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

lt and le

│ │ │ +

lt and le

│ │ │ │ │ │
│ │ │
│ │ │ #[global]
│ │ │ Hint Resolve Nat.le_trans: arith. #[global]
│ │ │ Hint Immediate Nat.le_antisymm: arith. #[global]
│ │ │ Hint Resolve Nat.le_0_l Nat.nle_succ_0: arith. #[global]
│ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.Arith.EqNat.html │ │ │ @@ -52,15 +52,15 @@ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Equality on natural numbers │ │ │
│ │ │ │ │ │ -

Propositional equality

│ │ │ +

Propositional equality

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Fixpoint eq_nat n m : Prop :=
│ │ │   match n, m with
│ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.Arith.PeanoNat.html │ │ │ @@ -145,15 +145,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... │ │ │
│ │ │
│ │ │ @@ -163,15 +163,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.
│ │ │ │ │ │ @@ -205,15 +205,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.
│ │ │ │ │ │ @@ -237,27 +237,27 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

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 │ │ │
│ │ │ @@ -278,15 +278,15 @@ │ │ │
│ │ │ Lemma compare_succ n m : (S n ?= S m) = (n ?= m).
│ │ │ │ │ │
│ │ │ │ │ │ │ │ │
│ │ │ -

Minimum, maximum

│ │ │ +

Minimum, maximum

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma max_l : forall n m, m <= n -> max n m = n.
│ │ │ │ │ │ @@ -328,15 +328,15 @@ │ │ │ Lemma strong_induction_le (A : nat -> Prop) :
│ │ │   A 0 -> (forall n, (forall m, m <= n -> A m) -> A (S n)) -> forall n, A n.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Power

│ │ │ +

Power

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma pow_neg_r a b : b<0 -> a^b = 0.
│ │ │ │ │ │ @@ -346,27 +346,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.
│ │ │ @@ -402,15 +402,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
│ │ │ @@ -431,15 +431,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 ->
│ │ │ @@ -455,15 +455,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 ->
│ │ │ @@ -477,15 +477,15 @@ │ │ │
│ │ │ Lemma log2_nonpos n : n<=0 -> log2 n = 0.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties of iter

│ │ │ +

Properties of iter

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma iter_swap_gen A B (f:A -> B) (g:A -> A) (h:B -> B) :
│ │ │  (forall a, f (g a) = h (f a)) -> forall n a,
│ │ │ @@ -529,15 +529,15 @@ │ │ │     (forall x:A, Inv x -> Inv (f x)) ->
│ │ │     forall x:A, Inv x -> Inv (iter n f x).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Gcd

│ │ │ +

Gcd

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

Bitwise operations

│ │ │ +

Bitwise operations

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition double_S : forall n, double (S n) = S (S (double n))
│ │ │                     := fun n => add_succ_r (S n) n.
│ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.Bool.Bool.html │ │ │ @@ -86,27 +86,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.
│ │ │ #[global]
│ │ │ @@ -134,15 +134,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
│ │ │ @@ -176,15 +176,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
│ │ │ @@ -219,15 +219,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
│ │ │ @@ -238,30 +238,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.
│ │ │ │ │ │ @@ -295,15 +295,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.
│ │ │ @@ -423,15 +423,15 @@ │ │ │ #[global]
│ │ │ 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.
│ │ │ @@ -540,15 +540,15 @@ │ │ │ #[global]
│ │ │ Hint Resolve andb_comm andb_assoc: bool.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties mixing andb and orb

│ │ │ +

Properties mixing andb and orb

│ │ │ │ │ │
│ │ │ │ │ │ Distributivity │ │ │
│ │ │
│ │ │ │ │ │ @@ -590,15 +590,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties of implb

│ │ │ +

Properties of implb

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma implb_true_iff : forall b1 b2:bool, implb b1 b2 = true <-> (b1 = true -> b2 = true).
│ │ │ │ │ │ @@ -644,15 +644,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 │ │ │
│ │ │
│ │ │ │ │ │ @@ -806,15 +806,15 @@ │ │ │ #[global]
│ │ │ Hint Resolve trans_eq_bool : core.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Reflection of bool into Prop

│ │ │ +

Reflection of bool into Prop

│ │ │ │ │ │
│ │ │ │ │ │ Is_true and equality │ │ │
│ │ │
│ │ │ │ │ │ @@ -920,15 +920,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) │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Declare Scope lazy_bool_scope.
│ │ │ @@ -948,15 +948,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/libcoq-stdlib/html/Coq.Bool.BoolOrder.html │ │ │ @@ -62,15 +62,15 @@ │ │ │ Import BoolNotations.
│ │ │ Local Ltac Tauto.intuition_solver ::= auto with typeclass_instances relations.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Order le

│ │ │ +

Order le

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

Strict order lt

│ │ │ +

Strict order lt

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

Order structures

│ │ │ +

Order structures

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ #[global]
│ │ │ Instance le_preorder : PreOrder Bool.le.
│ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.Classes.CEquivalence.html │ │ │ @@ -45,15 +45,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/libcoq-stdlib/html/Coq.Classes.CMorphisms.html │ │ │ @@ -45,15 +45,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 │ │ │ │ │ │ @@ -74,15 +74,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/libcoq-stdlib/html/Coq.Classes.CRelationClasses.html │ │ │ @@ -45,15 +45,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. │ │ │ │ │ │
│ │ │ @@ -450,15 +450,15 @@ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ We can already dualize all these properties. │ │ │
│ │ │ │ │ │ -

Standard instances.

│ │ │ +

Standard instances.

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Ltac reduce_hyp H :=
│ │ │   match type of H with
│ │ │ @@ -603,15 +603,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/libcoq-stdlib/html/Coq.Classes.DecidableClass.html │ │ │ @@ -45,15 +45,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/libcoq-stdlib/html/Coq.Classes.EquivDec.html │ │ │ @@ -45,15 +45,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Decidable equivalences.

│ │ │ +

Decidable equivalences.

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Author: Matthieu Sozeau │ │ │ Institution: LRI, CNRS UMR 8623 - University Paris Sud │ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.Classes.Equivalence.html │ │ │ @@ -45,15 +45,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/libcoq-stdlib/html/Coq.Classes.Init.html │ │ │ @@ -45,15 +45,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/libcoq-stdlib/html/Coq.Classes.Morphisms.html │ │ │ @@ -45,15 +45,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 │ │ │ │ │ │ @@ -70,15 +70,15 @@ │ │ │ Generalizable Variables A eqA B C D R RA RB RC m f x y.
│ │ │ Local Obligation Tactic := try solve [ simpl_relation ].
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

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/libcoq-stdlib/html/Coq.Classes.Morphisms_Prop.html │ │ │ @@ -45,15 +45,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/libcoq-stdlib/html/Coq.Classes.Morphisms_Relations.html │ │ │ @@ -45,15 +45,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Morphism instances for relations.

│ │ │ +

Morphism instances for relations.

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Author: Matthieu Sozeau │ │ │ Institution: LRI, CNRS UMR 8623 - University Paris Sud │ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.Classes.RelationClasses.html │ │ │ @@ -103,8002 +103,8003 @@ │ │ │ 00000660: 226c 6962 7469 746c 6522 3e4c 6962 7261 "libtitle">Libra │ │ │ 00000670: 7279 2043 6f71 2e43 6c61 7373 6573 2e52 ry Coq.Classes.R │ │ │ 00000680: 656c 6174 696f 6e43 6c61 7373 6573 3c2f elationClasses..
..
.< │ │ │ 000006b0: 2f64 6976 3e0a 0a3c 6469 7620 636c 6173 /div>..
.

T │ │ │ -000006f0: 7970 6563 6c61 7373 2d62 6173 6564 2072 ypeclass-based r │ │ │ -00000700: 656c 6174 696f 6e73 2c20 7461 6374 6963 elations, tactic │ │ │ -00000710: 7320 616e 6420 7374 616e 6461 7264 2069 s and standard i │ │ │ -00000720: 6e73 7461 6e63 6573 3c2f 6831 3e0a 0a0a nstances

... │ │ │ -00000730: 3c64 6976 2063 6c61 7373 3d22 7061 7261
.. │ │ │ -00000750: 2020 2054 6869 7320 6973 2074 6865 2062 This is the b │ │ │ -00000760: 6173 6963 2074 6865 6f72 7920 6e65 6564 asic theory need │ │ │ -00000770: 6564 2074 6f20 666f 726d 616c 697a 6520 ed to formalize │ │ │ -00000780: 6d6f 7270 6869 736d 7320 616e 6420 7365 morphisms and se │ │ │ -00000790: 746f 6964 732e 0a0a 3c64 6976 2063 6c61 toids...
│ │ │ -000007b0: 3c2f 6469 763e 0a0a 2020 2041 7574 686f
.. Autho │ │ │ -000007c0: 723a 204d 6174 7468 6965 7520 536f 7a65 r: Matthieu Soze │ │ │ -000007d0: 6175 0a20 2020 496e 7374 6974 7574 696f au. Institutio │ │ │ -000007e0: 6e3a 204c 5249 2c20 434e 5253 2055 4d52 n: LRI, CNRS UMR │ │ │ -000007f0: 2038 3632 3320 2d20 556e 6976 6572 7369 8623 - Universi │ │ │ -00000800: 7479 2050 6172 6973 2053 7564 0a0a 3c2f ty Paris Sud...
..
.< │ │ │ -00000830: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -00000840: 7469 746c 653d 226b 6579 776f 7264 223e title="keyword"> │ │ │ -00000850: 5265 7175 6972 653c 2f73 7061 6e3e 203c Require < │ │ │ -00000860: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -00000870: 7469 746c 653d 226b 6579 776f 7264 223e title="keyword"> │ │ │ -00000880: 4578 706f 7274 3c2f 7370 616e 3e20 3c61 Export Co │ │ │ -000008e0: 712e 436c 6173 7365 732e 496e 6974 3c2f q.Classes.Init.
. │ │ │ -00000900: 3c73 7061 6e20 636c 6173 733d 2269 6422 Require │ │ │ -00000930: 3c73 7061 6e20 636c 6173 733d 2269 6422 Import < │ │ │ -00000960: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ -00000970: 6872 6566 3d22 436f 712e 5072 6f67 7261 href="Coq.Progra │ │ │ -00000980: 6d2e 4261 7369 6373 2e68 746d 6c23 223e m.Basics.html#"> │ │ │ -00000990: 3c73 7061 6e20 636c 6173 733d 2269 6422 Coq.Program.Bas │ │ │ -000009c0: 6963 733c 2f73 7061 6e3e 3c2f 613e 2e3c ics.< │ │ │ -000009d0: 6272 2f3e 0a3c 7370 616e 2063 6c61 7373 br/>.Require Import Coq.Progr │ │ │ -00000a90: 616d 2e54 6163 7469 6373 3c2f 7370 616e am.Tactics.
.Req │ │ │ -00000ad0: 7569 7265 3c2f 7370 616e 3e20 3c73 7061 uire
Imp │ │ │ -00000b00: 6f72 743c 2f73 7061 6e3e 203c 6120 636c ort
Coq │ │ │ -00000b70: 2e52 656c 6174 696f 6e73 2e52 656c 6174 .Relations.Relat │ │ │ -00000b80: 696f 6e5f 4465 6669 6e69 7469 6f6e 733c ion_Definitions< │ │ │ -00000b90: 2f73 7061 6e3e 3c2f 613e 2e3c 6272 2f3e /span>.
│ │ │ -00000ba0: 0a0a 3c62 722f 3e0a 3c73 7061 6e20 636c ..
.General │ │ │ -00000bd0: 697a 6162 6c65 2056 6172 6961 626c 6573 izable Variables │ │ │ -00000be0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c A B C D │ │ │ -00000c80: 3c73 7061 6e20 636c 6173 733d 2269 6422 R S T U │ │ │ -00000d10: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c l eqA eqB eqC eqD...
.
..
.We allow to │ │ │ -00000e10: 2075 6e66 6f6c 6420 7468 6520 3c73 7061 unfold the relation definit │ │ │ -00000e70: 696f 6e20 7768 696c 6520 646f 696e 6720 ion while doing │ │ │ -00000e80: 6d6f 7270 6869 736d 2073 6561 7263 682e morphism search. │ │ │ -00000e90: 200a 3c2f 6469 763e 0a3c 6469 7620 636c .
.
..
.Section Defs │ │ │ -00000f30: 3c2f 7370 616e 3e3c 2f61 3e2e 3c62 722f .
.  C │ │ │ -00000f70: 6f6e 7465 7874 3c2f 7370 616e 3e20 7b3c ontext
{< │ │ │ -00000f80: 6120 6964 3d22 4465 6673 2e41 2220 636c a id="Defs.A" cl │ │ │ -00000f90: 6173 733d 2269 6472 6566 2220 6872 6566 ass="idref" href │ │ │ -00000fa0: 3d22 2344 6566 732e 4122 3e3c 7370 616e ="#Defs.A">A : Typ │ │ │ -00001000: 653c 2f73 7061 6e3e 7d2e 3c62 722f 3e0a e}.
. │ │ │ -00001010: 0a3c 6272 2f3e 0a3c 2f64 6976 3e0a 0a3c .
.
..< │ │ │ -00001020: 6469 7620 636c 6173 733d 2264 6f63 223e div class="doc"> │ │ │ -00001030: 0a57 6520 7265 6269 6e64 2072 656c 6174 .We rebind relat │ │ │ -00001040: 696f 6e61 6c20 7072 6f70 6572 7469 6573 ional properties │ │ │ -00001050: 2069 6e20 7365 7061 7261 7465 2063 6c61 in separate cla │ │ │ -00001060: 7373 6573 2074 6f20 6265 2061 626c 6520 sses to be able │ │ │ -00001070: 746f 206f 7665 726c 6f61 6420 6561 6368 to overload each │ │ │ -00001080: 2070 726f 6f66 2e20 0a3c 2f64 6976 3e0a proof. .
. │ │ │ -00001090: 3c64 6976 2063 6c61 7373 3d22 636f 6465
..
.  │ │ │ -000010b0: 266e 6273 703b 3c73 7061 6e20 636c 6173  Class Reflexive (R │ │ │ -000011d0: 203a 203c 6120 636c 6173 733d 2269 6472 : │ │ │ -00001240: 7265 6c61 7469 6f6e 3c2f 7370 616e 3e3c relation< │ │ │ -00001250: 2f61 3e20 3c61 2063 6c61 7373 3d22 6964 /a> A) :=
.&nbs │ │ │ -000012d0: 703b 266e 6273 703b 266e 6273 703b 266e p;  &n │ │ │ -000012e0: 6273 703b 3c61 2069 643d 2272 6566 6c65 bsp;
ref │ │ │ -00001370: 6c65 7869 7669 7479 3c2f 7370 616e 3e3c lexivity< │ │ │ -00001380: 2f73 7061 6e3e 3c2f 613e 203a 203c 7370 /span> : fo │ │ │ -000013b0: 7261 6c6c 3c2f 7370 616e 3e20 3c61 2069 rall x : │ │ │ -00001410: 203c 6120 636c 6173 733d 2269 6472 6566 A, │ │ │ -00001480: 203c 6120 636c 6173 733d 2269 6472 6566 │ │ │ -000014e0: 523c 2f73 7061 6e3e 3c2f 613e 203c 6120 R x x │ │ │ -000015c0: 3c2f 613e 2e3c 6272 2f3e 0a0a 3c62 722f .
..
.  D │ │ │ -00001600: 6566 696e 6974 696f 6e3c 2f73 7061 6e3e efinition │ │ │ -00001610: 203c 6120 6964 3d22 636f 6d70 6c65 6d65 complem │ │ │ -00001670: 656e 743c 2f73 7061 6e3e 3c2f 613e 2028 ent ( │ │ │ -00001680: 3c61 2069 643d 2252 3a36 2220 636c 6173 R : relation A │ │ │ -000017c0: 3c2f 613e 2920 3a20 3c61 2063 6c61 7373 ) : relation A
:= fun< │ │ │ -000018e0: 2f73 7061 6e3e 203c 6120 6964 3d22 783a /span> x │ │ │ -00001960: 3c73 7061 6e20 636c 6173 733d 2269 6422 │ │ │ -00001980: 793c 2f73 7061 6e3e 3c2f 613e 203d 2667 y =&g │ │ │ -00001990: 743b 203c 6120 636c 6173 733d 2269 6472 t; │ │ │ -000019d0: 3c73 7061 6e20 636c 6173 733d 2269 6422 R < │ │ │ -00001a00: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ -00001a10: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ -00001a20: 732e 5265 6c61 7469 6f6e 436c 6173 7365 s.RelationClasse │ │ │ -00001a30: 732e 6874 6d6c 2378 3a37 223e 3c73 7061 s.html#x:7">x< │ │ │ -00001a60: 2f73 7061 6e3e 3c2f 613e 203c 6120 636c /span> y -& │ │ │ -00001b40: 6774 3b3c 2f73 7061 6e3e 3c2f 613e 203c gt; < │ │ │ -00001b50: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ -00001b60: 6872 6566 3d22 436f 712e 496e 6974 2e4c href="Coq.Init.L │ │ │ -00001b70: 6f67 6963 2e68 746d 6c23 4661 6c73 6522 ogic.html#False" │ │ │ -00001b80: 3e3c 7370 616e 2063 6c61 7373 3d22 6964 >False │ │ │ -00001bb0: 3c2f 613e 2e3c 6272 2f3e 0a0a 3c62 722f .
..
.
..
.Opaq │ │ │ -00001be0: 7565 2066 6f72 2070 726f 6f66 2d73 6561 ue for proof-sea │ │ │ -00001bf0: 7263 682e 200a 3c2f 6469 763e 0a3c 6469 rch. .
.. │ │ │ -00001c10: 266e 6273 703b 266e 6273 703b 3c73 7061   Typ │ │ │ -00001c40: 6563 6c61 7373 6573 204f 7061 7175 653c eclasses Opaque< │ │ │ -00001c50: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> complement.
..
.
..
.The │ │ │ -00001cb0: 7365 2061 7265 2063 6f6e 7665 7274 6962 se are convertib │ │ │ -00001cc0: 6c65 2e20 0a3c 2f64 6976 3e0a 3c64 6976 le. .
.
.& │ │ │ -00001ce0: 6e62 7370 3b26 6e62 7370 3b3c 7370 616e nbsp; Lemm │ │ │ -00001d10: 613c 2f73 7061 6e3e 203c 6120 6964 3d22 a comp │ │ │ -00001d80: 6c65 6d65 6e74 5f69 6e76 6572 7365 3c2f lement_inverse │ │ │ -00001dc0: 3c73 7061 6e20 636c 6173 733d 2269 6422 │ │ │ -00001de0: 523c 2f73 7061 6e3e 3c2f 613e 203a 203c R : < │ │ │ -00001df0: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ -00001e00: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ -00001e10: 732e 5265 6c61 7469 6f6e 436c 6173 7365 s.RelationClasse │ │ │ -00001e20: 732e 6874 6d6c 2363 6f6d 706c 656d 656e s.html#complemen │ │ │ -00001e30: 7422 3e3c 7370 616e 2063 6c61 7373 3d22 t">complemen │ │ │ -00001e60: 743c 2f73 7061 6e3e 3c2f 613e 2028 3c61 t (flip R) = │ │ │ -00001fc0: 3c61 2063 6c61 7373 3d22 6964 7265 6622 flip (complement R< │ │ │ -00002110: 2f61 3e29 2e3c 6272 2f3e 0a20 0a3c 6272 /a>).
. .
.  < │ │ │ -00002130: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -00002140: 7469 746c 653d 226b 6579 776f 7264 223e title="keyword"> │ │ │ -00002150: 436c 6173 733c 2f73 7061 6e3e 203c 6120 Class
│ │ │ -000021e0: 4972 7265 666c 6578 6976 653c 2f73 7061 Irreflexive (< │ │ │ -00002200: 6120 6964 3d22 523a 3130 2220 636c 6173 a id="R:10" clas │ │ │ -00002210: 733d 2269 6472 6566 2220 6872 6566 3d22 s="idref" href=" │ │ │ -00002220: 2352 3a31 3022 3e3c 7370 616e 2063 6c61 #R:10">R< │ │ │ -00002250: 2f61 3e20 3a20 3c61 2063 6c61 7373 3d22 /a> : < │ │ │ -000022a0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -000022b0: 7469 746c 653d 2264 6566 696e 6974 696f title="definitio │ │ │ -000022c0: 6e22 3e72 656c 6174 696f 6e3c 2f73 7061 n">relation A) :=
.& │ │ │ -00002350: 6e62 7370 3b26 6e62 7370 3b26 6e62 7370 nbsp;   │ │ │ -00002360: 3b26 6e62 7370 3b3c 6120 6964 3d22 6972 ; irreflexiv │ │ │ -00002400: 6974 793c 2f73 7061 6e3e 3c2f 7370 616e ity : Reflex │ │ │ -00002480: 6976 653c 2f73 7061 6e3e 3c2f 613e 2028 ive ( │ │ │ -00002490: 3c61 2063 6c61 7373 3d22 6964 7265 6622 compleme │ │ │ -00002500: 6e74 3c2f 7370 616e 3e3c 2f61 3e20 3c61 nt R< │ │ │ -00002570: 2f73 7061 6e3e 3c2f 613e 292e 3c62 722f /span>).
..
. & │ │ │ -00002590: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp;Class │ │ │ -00002620: 3c73 7061 6e20 6964 3d22 5379 6d6d 6574 │ │ │ -00002640: 5379 6d6d 6574 7269 633c 2f73 7061 6e3e Symmetric │ │ │ -00002650: 3c2f 7370 616e 3e3c 2f61 3e20 283c 6120 (R : relation │ │ │ -00002730: 3c2f 613e 203c 6120 636c 6173 733d 2269 A< │ │ │ -000027a0: 2f61 3e29 203a 3d3c 6272 2f3e 0a26 6e62 /a>) :=
.&nb │ │ │ -000027b0: 7370 3b26 6e62 7370 3b26 6e62 7370 3b26 sp;  & │ │ │ -000027c0: 6e62 7370 3b3c 6120 6964 3d22 7379 6d6d nbsp;
symmetry
│ │ │ -00002860: 3a20 3c73 7061 6e20 636c 6173 733d 2269 : forall │ │ │ -00002890: 207b 3c61 2069 643d 2278 3a31 3522 2063 {x < │ │ │ -00002910: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -00002920: 7469 746c 653d 2262 696e 6465 7222 3e79 title="binder">y │ │ │ -00002930: 3c2f 7370 616e 3e3c 2f61 3e7d 2c20 3c61 }, R< │ │ │ -000029a0: 2f73 7061 6e3e 3c2f 613e 203c 6120 636c /span> x y │ │ │ -00002a80: 3c2f 613e 203c 6120 636c 6173 733d 2269 -> │ │ │ -00002af0: 3b3c 2f73 7061 6e3e 3c2f 613e 203c 6120 ; R y x< │ │ │ -00002c40: 2f61 3e2e 3c62 722f 3e0a 0a3c 6272 2f3e /a>.
..
│ │ │ -00002c50: 0a26 6e62 7370 3b26 6e62 7370 3b3c 7370 .  Cl │ │ │ -00002c80: 6173 733c 2f73 7061 6e3e 203c 6120 6964 ass
< │ │ │ -00002cc0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -00002cd0: 7469 746c 653d 2269 6e64 7563 7469 7665 title="inductive │ │ │ -00002ce0: 2c20 7265 636f 7264 223e 3c73 7061 6e20 , record">Asymm │ │ │ -00002d10: 6574 7269 633c 2f73 7061 6e3e 3c2f 7370 etric (R : │ │ │ -00002d80: 3c61 2063 6c61 7373 3d22 6964 7265 6622 rel │ │ │ -00002df0: 6174 696f 6e3c 2f73 7061 6e3e 3c2f 613e ation │ │ │ -00002e00: 203c 6120 636c 6173 733d 2269 6472 6566 A) │ │ │ -00002e70: 203a 3d3c 6272 2f3e 0a26 6e62 7370 3b26 :=
. & │ │ │ -00002e80: 6e62 7370 3b26 6e62 7370 3b26 6e62 7370 nbsp;   │ │ │ -00002e90: 3b3c 6120 6964 3d22 6173 796d 6d65 7472 ;asymmetry
│ │ │ -00002f30: 3a20 3c73 7061 6e20 636c 6173 733d 2269 : forall │ │ │ -00002f60: 207b 3c61 2069 643d 2278 3a32 3022 2063 {x < │ │ │ -00002fe0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -00002ff0: 7469 746c 653d 2262 696e 6465 7222 3e79 title="binder">y │ │ │ -00003000: 3c2f 7370 616e 3e3c 2f61 3e7d 2c20 3c61 }, R< │ │ │ -00003070: 2f73 7061 6e3e 3c2f 613e 203c 6120 636c /span> x y │ │ │ -00003150: 3c2f 613e 203c 6120 636c 6173 733d 2269 -> │ │ │ -000031c0: 3b3c 2f73 7061 6e3e 3c2f 613e 203c 6120 ; R y x< │ │ │ -00003310: 2f61 3e20 3c61 2063 6c61 7373 3d22 6964 /a> -> │ │ │ -00003380: 3c2f 7370 616e 3e3c 2f61 3e20 3c61 2063 False.
..
.& │ │ │ -00003400: 6e62 7370 3b26 6e62 7370 3b3c 7370 616e nbsp; Clas │ │ │ -00003430: 733c 2f73 7061 6e3e 203c 6120 6964 3d22 s Transit │ │ │ -000034c0: 6976 653c 2f73 7061 6e3e 3c2f 7370 616e ive (< │ │ │ -00003500: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -00003510: 7469 746c 653d 2262 696e 6465 7222 3e52 title="binder">R │ │ │ -00003520: 3c2f 7370 616e 3e3c 2f61 3e20 3a20 3c61 : relat │ │ │ -000035a0: 696f 6e3c 2f73 7061 6e3e 3c2f 613e 203c ion < │ │ │ -000035b0: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ -000035c0: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ -000035d0: 732e 5265 6c61 7469 6f6e 436c 6173 7365 s.RelationClasse │ │ │ -000035e0: 732e 6874 6d6c 2344 6566 732e 4122 3e3c s.html#Defs.A">< │ │ │ -000035f0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -00003600: 7469 746c 653d 2276 6172 6961 626c 6522 title="variable" │ │ │ -00003610: 3e41 3c2f 7370 616e 3e3c 2f61 3e29 203a >A) : │ │ │ -00003620: 3d3c 6272 2f3e 0a26 6e62 7370 3b26 6e62 =
. &nb │ │ │ -00003630: 7370 3b26 6e62 7370 3b26 6e62 7370 3b3c sp;  < │ │ │ -00003640: 6120 6964 3d22 7472 616e 7369 7469 7669 a id="transitivi │ │ │ -00003650: 7479 2220 636c 6173 733d 2269 6472 6566 ty" class="idref │ │ │ -00003660: 2220 6872 6566 3d22 2374 7261 6e73 6974 " href="#transit │ │ │ -00003670: 6976 6974 7922 3e3c 7370 616e 2063 6c61 ivity">trans │ │ │ -000036d0: 6974 6976 6974 793c 2f73 7061 6e3e 3c2f itivity : for │ │ │ -00003710: 616c 6c3c 2f73 7061 6e3e 207b 3c61 2069 all {x │ │ │ -00003770: 203c 6120 6964 3d22 793a 3236 2220 636c y z< │ │ │ -00003810: 2f73 7061 6e3e 3c2f 613e 7d2c 203c 6120 /span>}, R x y< │ │ │ -00003960: 2f61 3e20 3c61 2063 6c61 7373 3d22 6964 /a> -> │ │ │ -000039d0: 3c2f 7370 616e 3e3c 2f61 3e20 3c61 2063 R y z ->< │ │ │ -00003b90: 2f73 7061 6e3e 3c2f 613e 203c 6120 636c /span> R x │ │ │ -00003c70: 3c2f 613e 203c 6120 636c 6173 733d 2269 z.
..
.< │ │ │ -00003cf0: 2f64 6976 3e0a 0a3c 6469 7620 636c 6173 /div>..
.Various │ │ │ -00003d10: 2063 6f6d 6269 6e61 7469 6f6e 7320 6f66 combinations of │ │ │ -00003d20: 2072 6566 6c65 7869 7669 7479 2c20 7379 reflexivity, sy │ │ │ -00003d30: 6d6d 6574 7279 2061 6e64 2074 7261 6e73 mmetry and trans │ │ │ -00003d40: 6974 6976 6974 792e 200a 3c64 6976 2063 itivity. .
.. A PreOrder is bot │ │ │ -00003dc0: 6820 5265 666c 6578 6976 6520 616e 6420 h Reflexive and │ │ │ -00003dd0: 5472 616e 7369 7469 7665 2e20 0a3c 2f64 Transitive. ....< │ │ │ -000043b0: 6469 7620 636c 6173 733d 2264 6f63 223e div class="doc"> │ │ │ -000043c0: 0a41 203c 7370 616e 2063 6c61 7373 3d22 .A StrictO │ │ │ -00004400: 7264 6572 3c2f 7370 616e 3e3c 2f73 7061 rder is both Irref │ │ │ -00004420: 6c65 7869 7665 2061 6e64 2054 7261 6e73 lexive and Trans │ │ │ -00004430: 6974 6976 652e 200a 3c2f 6469 763e 0a3c itive. .
.< │ │ │ -00004440: 6469 7620 636c 6173 733d 2263 6f64 6522 div class="code" │ │ │ -00004450: 3e0a 0a3c 6272 2f3e 0a26 6e62 7370 3b26 >..
. & │ │ │ -00004460: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp;Class
StrictO │ │ │ -000044f0: 7264 6572 3c2f 7370 616e 3e3c 2f61 3e20 rder │ │ │ -00004500: 283c 6120 6964 3d22 523a 3333 2220 636c (R : relation
A) : Prop │ │ │ -00004670: 3c2f 7370 616e 3e20 3a3d 207b 3c62 722f := {
.  &n │ │ │ -00004690: 6273 703b 266e 6273 703b 235b 3c73 7061 bsp; #[global< │ │ │ -000046c0: 2f73 7061 6e3e 5d20 3c61 2069 643d 2253 /span>] Strict │ │ │ -00004740: 4f72 6465 725f 4972 7265 666c 6578 6976 Order_Irreflexiv │ │ │ -00004750: 653c 2f73 7061 6e3e 3c2f 613e 203a 3a20 e :: │ │ │ -00004760: 3c61 2063 6c61 7373 3d22 6964 7265 6622 Irreflexive< │ │ │ -000047d0: 2f73 7061 6e3e 3c2f 613e 203c 6120 636c /span> R ;
.& │ │ │ -00004850: 6e62 7370 3b26 6e62 7370 3b26 6e62 7370 nbsp;   │ │ │ -00004860: 3b26 6e62 7370 3b23 5b3c 7370 616e 2063 ; #[global] StrictOrder │ │ │ -00004910: 5f54 7261 6e73 6974 6976 653c 2f73 7061 _Transitive
:: Tra │ │ │ -00004990: 6e73 6974 6976 653c 2f73 7061 6e3e 3c2f nsitive R │ │ │ -00004a10: 7d2e 3c62 722f 3e0a 0a3c 6272 2f3e 0a3c }.
..
.< │ │ │ -00004a20: 2f64 6976 3e0a 0a3c 6469 7620 636c 6173 /div>..
.By defi │ │ │ -00004a40: 6e69 7469 6f6e 2c20 6120 7374 7269 6374 nition, a strict │ │ │ -00004a50: 206f 7264 6572 2069 7320 616c 736f 2061 order is also a │ │ │ -00004a60: 7379 6d6d 6574 7269 6320 0a3c 2f64 6976 symmetric .
.
.   │ │ │ -00004a90: 3b3c 7370 616e 2063 6c61 7373 3d22 6964 ;Global Instanc │ │ │ -00004ac0: 653c 2f73 7061 6e3e 203c 6120 6964 3d22 e StrictOrd │ │ │ -00004b40: 6572 5f41 7379 6d6d 6574 7269 633c 2f73 er_Asymmetric `(StrictOrder R │ │ │ -00004c30: 2920 3a20 3c61 2063 6c61 7373 3d22 6964 ) : Asymmetri │ │ │ -00004ca0: 633c 2f73 7061 6e3e 3c2f 613e 203c 6120 c R.
. │ │ │ -00004d20: 200a 3c62 722f 3e0a 3c2f 6469 763e 0a0a .
.
.. │ │ │ -00004d30: 3c64 6976 2063 6c61 7373 3d22 646f 6322
.A partial equi │ │ │ -00004d50: 7661 6c65 6e63 6520 7265 6c61 7469 6f6e valence relation │ │ │ -00004d60: 2069 7320 5379 6d6d 6574 7269 6320 616e is Symmetric an │ │ │ -00004d70: 6420 5472 616e 7369 7469 7665 2e20 0a3c d Transitive. .< │ │ │ -00004d80: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
..
. │ │ │ -00004da0: 266e 6273 703b 266e 6273 703b 3c73 7061   Cla │ │ │ -00004dd0: 7373 3c2f 7370 616e 3e20 3c61 2069 643d ss │ │ │ -00004e00: 3c73 7061 6e20 636c 6173 733d 2269 6422 │ │ │ -00004e20: 5045 523c 2f73 7061 6e3e 3c2f 613e 2028 PER ( │ │ │ -00004e30: 3c61 2069 643d 2252 3a33 3922 2063 6c61 R │ │ │ -00004e80: 3c2f 613e 203a 203c 6120 636c 6173 733d : │ │ │ -00004ed0: 3c73 7061 6e20 636c 6173 733d 2269 6422 relation A) : Prop< │ │ │ -00004fa0: 2f73 7061 6e3e 203a 3d20 7b3c 6272 2f3e /span> := {
│ │ │ -00004fb0: 0a26 6e62 7370 3b26 6e62 7370 3b26 6e62 .  &nb │ │ │ -00004fc0: 7370 3b26 6e62 7370 3b23 5b3c 7370 616e sp; #[global] PER_Symmetr │ │ │ -00005060: 6963 3c2f 7370 616e 3e3c 2f61 3e20 3a3a ic :: │ │ │ -00005070: 203c 6120 636c 6173 733d 2269 6472 6566 Symmetric R │ │ │ -00005150: 3c2f 613e 207c 2033 203b 3c62 722f 3e0a | 3 ;
. │ │ │ -00005160: 266e 6273 703b 266e 6273 703b 266e 6273   &nbs │ │ │ -00005170: 703b 266e 6273 703b 235b 3c73 7061 6e20 p; #[global
] PER_Transi │ │ │ -00005210: 7469 7665 3c2f 7370 616e 3e3c 2f61 3e20 tive │ │ │ -00005220: 3a3a 203c 6120 636c 6173 733d 2269 6472 :: Transitive │ │ │ -00005290: 3c2f 7370 616e 3e3c 2f61 3e20 3c61 2063 R
| 3 }.< │ │ │ -00005310: 6272 2f3e 0a0a 3c62 722f 3e0a 3c2f 6469 br/>..
...
.Equivalenc │ │ │ -00005340: 6520 7265 6c61 7469 6f6e 732e 200a 3c2f e relations. ..
..
.& │ │ │ -00005370: 6e62 7370 3b26 6e62 7370 3b3c 7370 616e nbsp; Clas │ │ │ -000053a0: 733c 2f73 7061 6e3e 203c 6120 6964 3d22 s < │ │ │ -000053e0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -000053f0: 7469 746c 653d 2272 6563 6f72 6422 3e45 title="record">E │ │ │ -00005400: 7175 6976 616c 656e 6365 3c2f 7370 616e quivalence (< │ │ │ -00005440: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -00005450: 7469 746c 653d 2262 696e 6465 7222 3e52 title="binder">R │ │ │ -00005460: 3c2f 7370 616e 3e3c 2f61 3e20 3a20 3c61 : relat │ │ │ -000054e0: 696f 6e3c 2f73 7061 6e3e 3c2f 613e 203c ion < │ │ │ -000054f0: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ -00005500: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ -00005510: 732e 5265 6c61 7469 6f6e 436c 6173 7365 s.RelationClasse │ │ │ -00005520: 732e 6874 6d6c 2344 6566 732e 4122 3e3c s.html#Defs.A">< │ │ │ -00005530: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -00005540: 7469 746c 653d 2276 6172 6961 626c 6522 title="variable" │ │ │ -00005550: 3e41 3c2f 7370 616e 3e3c 2f61 3e29 203a >A) : │ │ │ -00005560: 203c 7370 616e 2063 6c61 7373 3d22 6964 Prop := │ │ │ -00005590: 207b 3c62 722f 3e0a 266e 6273 703b 266e {
. &n │ │ │ -000055a0: 6273 703b 266e 6273 703b 266e 6273 703b bsp;   │ │ │ -000055b0: 235b 3c73 7061 6e20 636c 6173 733d 2269 #[g │ │ │ -000055d0: 6c6f 6261 6c3c 2f73 7061 6e3e 5d20 3c61 lobal] Equi │ │ │ -00005650: 7661 6c65 6e63 655f 5265 666c 6578 6976 valence_Reflexiv │ │ │ -00005660: 653c 2f73 7061 6e3e 3c2f 613e 203a 3a20 e :: │ │ │ -00005670: 3c61 2063 6c61 7373 3d22 6964 7265 6622 Reflexive R< │ │ │ -00005750: 2f61 3e20 3b3c 6272 2f3e 0a26 6e62 7370 /a> ;
.  │ │ │ -00005760: 3b26 6e62 7370 3b26 6e62 7370 3b26 6e62 ;  &nb │ │ │ -00005770: 7370 3b23 5b3c 7370 616e 2063 6c61 7373 sp;#[global] │ │ │ -000057a0: 203c 6120 6964 3d22 4571 7569 7661 6c65
E │ │ │ -00005810: 7175 6976 616c 656e 6365 5f53 796d 6d65 quivalence_Symme │ │ │ -00005820: 7472 6963 3c2f 7370 616e 3e3c 2f61 3e20 tric │ │ │ -00005830: 3a3a 203c 6120 636c 6173 733d 2269 6472 :: Symmetric R ;
.&n │ │ │ -00005920: 6273 703b 266e 6273 703b 266e 6273 703b bsp;   │ │ │ -00005930: 266e 6273 703b 235b 3c73 7061 6e20 636c  #[global] │ │ │ -000059b0: 3c73 7061 6e20 636c 6173 733d 2269 6422 Equivalence_ │ │ │ -000059e0: 5472 616e 7369 7469 7665 3c2f 7370 616e Transitive :: Tran │ │ │ -00005a60: 7369 7469 7665 3c2f 7370 616e 3e3c 2f61 sitive │ │ │ -00005ab0: 3c73 7061 6e20 636c 6173 733d 2269 6422 R } │ │ │ -00005ae0: 2e3c 6272 2f3e 0a0a 3c62 722f 3e0a 3c2f .
..
...
.An Equiv │ │ │ -00005b10: 616c 656e 6365 2069 7320 6120 5045 5220 alence is a PER │ │ │ -00005b20: 706c 7573 2072 6566 6c65 7869 7669 7479 plus reflexivity │ │ │ -00005b30: 2e20 0a3c 2f64 6976 3e0a 3c64 6976 2063 . .
.
│ │ │ -00005ec0: 0a0a 3c64 6976 2063 6c61 7373 3d22 646f ..
.An Equivalen │ │ │ -00005ee0: 6365 2069 7320 6120 5072 654f 7264 6572 ce is a PreOrder │ │ │ -00005ef0: 2070 6c75 7320 7379 6d6d 6574 7279 2e20 plus symmetry. │ │ │ -00005f00: 0a3c 2f64 6976 3e0a 3c64 6976 2063 6c61 .
.
..
.  G │ │ │ -00005f50: 6c6f 6261 6c20 496e 7374 616e 6365 3c2f lobal Instance
│ │ │ -00005fd0: 4571 7569 7661 6c65 6e63 655f 5072 654f Equivalence_PreO │ │ │ -00005fe0: 7264 6572 3c2f 7370 616e 3e3c 2f61 3e20 rder │ │ │ -00005ff0: 7b3c 6120 6964 3d22 523a 3530 2220 636c {R} `(E:Equivalence R) : PreOrd │ │ │ -000061f0: 6572 3c2f 7370 616e 3e3c 2f61 3e20 3c61 er R< │ │ │ -00006260: 2f73 7061 6e3e 3c2f 613e 207c 2031 3020 /span> | 10 │ │ │ -00006270: 3a3d 3c62 722f 3e0a 266e 6273 703b 266e :=
. &n │ │ │ -00006280: 6273 703b 266e 6273 703b 266e 6273 703b bsp;   │ │ │ -00006290: 7b20 7d2e 3c62 722f 3e0a 0a3c 6272 2f3e { }.
..
│ │ │ -000062a0: 0a3c 2f64 6976 3e0a 0a3c 6469 7620 636c .
..
.We ca │ │ │ -000062c0: 6e20 6e6f 7720 6465 6669 6e65 2061 6e74 n now define ant │ │ │ -000062d0: 6973 796d 6d65 7472 7920 772e 722e 742e isymmetry w.r.t. │ │ │ -000062e0: 2061 6e20 6571 7569 7661 6c65 6e63 6520 an equivalence │ │ │ -000062f0: 7265 6c61 7469 6f6e 206f 6e20 7468 6520 relation on the │ │ │ -00006300: 6361 7272 6965 722e 200a 3c2f 6469 763e carrier. .
│ │ │ -00006310: 0a3c 6469 7620 636c 6173 733d 2263 6f64 .
..
.  │ │ │ -00006330: 3b26 6e62 7370 3b3c 7370 616e 2063 6c61 ; Class
< │ │ │ -000063a0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -000063b0: 7469 746c 653d 2269 6e64 7563 7469 7665 title="inductive │ │ │ -000063c0: 2c20 7265 636f 7264 223e 3c73 7061 6e20 , record">An │ │ │ -000063f0: 7469 7379 6d6d 6574 7269 633c 2f73 7061 tisymmetric eqA `{equ : Equi │ │ │ -00006530: 7661 6c65 6e63 653c 2f73 7061 6e3e 3c2f valence eqA< │ │ │ -000065b0: 2f61 3e7d 2028 3c61 2069 643d 2252 3a35 /a>} (R< │ │ │ -00006600: 2f73 7061 6e3e 3c2f 613e 203a 203c 6120 /span> : relati │ │ │ -00006680: 6f6e 3c2f 7370 616e 3e3c 2f61 3e20 3c61 on │ │ │ -000066f0: 413c 2f73 7061 6e3e 3c2f 613e 2920 3a3d A) := │ │ │ -00006700: 3c62 722f 3e0a 266e 6273 703b 266e 6273
. &nbs │ │ │ -00006710: 703b 266e 6273 703b 266e 6273 703b 3c61 p;  antisy │ │ │ -000067b0: 6d6d 6574 7279 3c2f 7370 616e 3e3c 2f73 mmetry
: fora │ │ │ -000067f0: 6c6c 3c2f 7370 616e 3e20 7b3c 6120 6964 ll {x │ │ │ -00006850: 3c61 2069 643d 2279 3a35 3722 2063 6c61 y │ │ │ -000068a0: 3c2f 613e 7d2c 203c 6120 636c 6173 733d }, R< │ │ │ -00006910: 2f61 3e20 3c61 2063 6c61 7373 3d22 6964 /a> x │ │ │ -00006980: 203c 6120 636c 6173 733d 2269 6472 6566 < │ │ │ -000069c0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -000069d0: 7469 746c 653d 2276 6172 6961 626c 6522 title="variable" │ │ │ -000069e0: 3e79 3c2f 7370 616e 3e3c 2f61 3e20 3c61 >y -> R y │ │ │ -00006b40: 3c61 2063 6c61 7373 3d22 6964 7265 6622 │ │ │ -00006ba0: 783c 2f73 7061 6e3e 3c2f 613e 203c 6120 x -> │ │ │ -00006c20: 3c2f 613e 203c 6120 636c 6173 733d 2269 eqA x y. │ │ │ -00006d70: 3c62 722f 3e0a 0a3c 6272 2f3e 0a26 6e62
..
.&nb │ │ │ -00006d80: 7370 3b26 6e62 7370 3b3c 7370 616e 2063 sp; Class< │ │ │ -00006db0: 2f73 7061 6e3e 203c 6120 6964 3d22 7375 /span> subrel │ │ │ -00006e40: 6174 696f 6e3c 2f73 7061 6e3e 3c2f 7370 ation (R R' : relation
A) : Prop │ │ │ -00007020: 3c2f 7370 616e 3e20 3a3d 3c62 722f 3e0a :=
. │ │ │ -00007030: 266e 6273 703b 266e 6273 703b 266e 6273   &nbs │ │ │ -00007040: 703b 266e 6273 703b 3c61 2069 643d 2269 p; is_sub │ │ │ -000070e0: 7265 6c61 7469 6f6e 3c2f 7370 616e 3e3c relation< │ │ │ -000070f0: 2f73 7061 6e3e 3c2f 613e 203a 203c 7370 /span> : fo │ │ │ -00007120: 7261 6c6c 3c2f 7370 616e 3e20 7b3c 6120 rall {x y}, R x y │ │ │ -00007320: 3c61 2063 6c61 7373 3d22 6964 7265 6622 -> R' x< │ │ │ -00007470: 2f61 3e20 3c61 2063 6c61 7373 3d22 6964 /a> y │ │ │ -000074e0: 2e3c 6272 2f3e 0a0a 3c62 722f 3e0a 3c2f .
..
...
.Any symm │ │ │ -00007510: 6574 7269 6320 7265 6c61 7469 6f6e 2069 etric relation i │ │ │ -00007520: 7320 6571 7561 6c20 746f 2069 7473 2069 s equal to its i │ │ │ -00007530: 6e76 6572 7365 2e20 0a3c 2f64 6976 3e0a nverse. .
. │ │ │ -00007540: 3c64 6976 2063 6c61 7373 3d22 636f 6465
..
.  │ │ │ -00007560: 266e 6273 703b 3c73 7061 6e20 636c 6173  Lemma sub │ │ │ -00007600: 7265 6c61 7469 6f6e 5f73 796d 6d65 7472 relation_symmetr │ │ │ -00007610: 6963 3c2f 7370 616e 3e3c 2f61 3e20 3c61 ic R `(Sym │ │ │ -000076c0: 6d65 7472 6963 3c2f 7370 616e 3e3c 2f61 metric R) : < │ │ │ -00007770: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -00007780: 7469 746c 653d 2263 6c61 7373 223e 7375 title="class">su │ │ │ -00007790: 6272 656c 6174 696f 6e3c 2f73 7061 6e3e brelation │ │ │ -000077a0: 3c2f 613e 2028 3c61 2063 6c61 7373 3d22 (f │ │ │ -00007800: 6c69 703c 2f73 7061 6e3e 3c2f 613e 203c lip < │ │ │ -00007810: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ -00007820: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ -00007830: 732e 5265 6c61 7469 6f6e 436c 6173 7365 s.RelationClasse │ │ │ -00007840: 732e 6874 6d6c 2352 3a36 3522 3e3c 7370 s.html#R:65">R │ │ │ -00007870: 3c2f 7370 616e 3e3c 2f61 3e29 203c 6120 ) R.
. │ │ │ -000078f0: 200a 3c62 722f 3e0a 266e 6273 703b 266e .
. &n │ │ │ -00007900: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;Section
flip.
...   │ │ │ -000079b0: 266e 6273 703b 266e 6273 703b 3c73 7061   Lem │ │ │ -000079e0: 6d61 3c2f 7370 616e 3e20 3c61 2069 643d ma flip_Reflex │ │ │ -00007a50: 6976 653c 2f73 7061 6e3e 3c2f 613e 2060 ive ` │ │ │ -00007a60: 7b3c 6120 6964 3d22 483a 3638 2220 636c {Reflexi │ │ │ -00007ab0: 7665 3c2f 7370 616e 3e3c 2f61 3e20 3c61 ve R │ │ │ -00007b30: 3c2f 613e 7d20 3a20 3c61 2063 6c61 7373 } : Reflex │ │ │ -00007ba0: 6976 653c 2f73 7061 6e3e 3c2f 613e 2028 ive ( │ │ │ -00007bb0: 3c61 2063 6c61 7373 3d22 6964 7265 6622 flip
R).
. .< │ │ │ -00007c90: 6272 2f3e 0a26 6e62 7370 3b26 6e62 7370 br/>.   │ │ │ -00007ca0: 3b26 6e62 7370 3b26 6e62 7370 3b3c 7370 ;  Pr │ │ │ -00007cd0: 6f67 7261 6d20 4465 6669 6e69 7469 6f6e ogram Definition │ │ │ -00007ce0: 3c2f 7370 616e 3e20 3c61 2069 643d 2266 flip │ │ │ -00007d50: 5f49 7272 6566 6c65 7869 7665 3c2f 7370 _Irreflexive `(Irreflexive
R) │ │ │ -00007e40: 203a 203c 6120 636c 6173 733d 2269 6472 : Irreflexi │ │ │ -00007eb0: 7665 3c2f 7370 616e 3e3c 2f61 3e20 283c ve (< │ │ │ -00007ec0: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ -00007ed0: 6872 6566 3d22 436f 712e 5072 6f67 7261 href="Coq.Progra │ │ │ -00007ee0: 6d2e 4261 7369 6373 2e68 746d 6c23 666c m.Basics.html#fl │ │ │ -00007ef0: 6970 223e 3c73 7061 6e20 636c 6173 733d ip">flip R │ │ │ -00007f90: 3c2f 613e 2920 3a3d 3c62 722f 3e0a 266e ) :=
.&n │ │ │ -00007fa0: 6273 703b 266e 6273 703b 266e 6273 703b bsp;   │ │ │ -00007fb0: 266e 6273 703b 266e 6273 703b 266e 6273   &nbs │ │ │ -00007fc0: 703b 3c61 2063 6c61 7373 3d22 6964 7265 p;irr │ │ │ -00008030: 6566 6c65 7869 7669 7479 3c2f 7370 616e eflexivity (R:=R< │ │ │ -000080d0: 2f73 7061 6e3e 3c2f 613e 292e 3c62 722f /span>).
..
. & │ │ │ -000080f0: 6e62 7370 3b26 6e62 7370 3b26 6e62 7370 nbsp;   │ │ │ -00008100: 3b3c 7370 616e 2063 6c61 7373 3d22 6964 ;Program Defini │ │ │ -00008130: 7469 6f6e 3c2f 7370 616e 3e20 3c61 2069 tion flip │ │ │ -000081a0: 5f53 796d 6d65 7472 6963 3c2f 7370 616e _Symmetric `( │ │ │ -000081e0: 3c73 7061 6e20 636c 6173 733d 2269 6422 │ │ │ -00008200: 5379 6d6d 6574 7269 633c 2f73 7061 6e3e Symmetric │ │ │ -00008210: 3c2f 613e 203c 6120 6964 3d22 523a 3731 R
│ │ │ -00008280: 3c2f 7370 616e 3e3c 2f61 3e29 203a 203c ) : < │ │ │ -00008290: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ -000082a0: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ -000082b0: 732e 5265 6c61 7469 6f6e 436c 6173 7365 s.RelationClasse │ │ │ -000082c0: 732e 6874 6d6c 2353 796d 6d65 7472 6963 s.html#Symmetric │ │ │ -000082d0: 223e 3c73 7061 6e20 636c 6173 733d 2269 ">Symmetric ( │ │ │ -00008360: 666c 6970 3c2f 7370 616e 3e3c 2f61 3e20 flip │ │ │ -00008370: 3c61 2063 6c61 7373 3d22 6964 7265 6622 │ │ │ -000083d0: 523c 2f73 7061 6e3e 3c2f 613e 2920 3a3d R) := │ │ │ -000083e0: 3c62 722f 3e0a 266e 6273 703b 266e 6273
. &nbs │ │ │ -000083f0: 703b 266e 6273 703b 266e 6273 703b 266e p;  &n │ │ │ -00008400: 6273 703b 266e 6273 703b 3c73 7061 6e20 bsp; fun x< │ │ │ -00008480: 2f73 7061 6e3e 3c2f 613e 203c 6120 6964 /span> y │ │ │ -000084e0: 3c61 2069 643d 2248 3a37 3522 2063 6c61 H │ │ │ -00008530: 3c2f 613e 203d 2667 743b 203c 6120 636c => symmetry │ │ │ -000085b0: 3c2f 613e 2028 3c73 7061 6e20 636c 6173 (R:=R) H.
..< │ │ │ -000086c0: 6272 2f3e 0a26 6e62 7370 3b26 6e62 7370 br/>.   │ │ │ -000086d0: 3b26 6e62 7370 3b26 6e62 7370 3b3c 7370 ;  Pr │ │ │ -00008700: 6f67 7261 6d20 4465 6669 6e69 7469 6f6e ogram Definition │ │ │ -00008710: 3c2f 7370 616e 3e20 3c61 2069 643d 2266 flip_A │ │ │ -00008780: 7379 6d6d 6574 7269 633c 2f73 7061 6e3e symmetric │ │ │ -00008790: 3c2f 613e 2060 283c 6120 6964 3d22 483a `(< │ │ │ -000087c0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -000087d0: 7469 746c 653d 2262 696e 6465 7222 3e41 title="binder">A │ │ │ -000087e0: 7379 6d6d 6574 7269 633c 2f73 7061 6e3e symmetric │ │ │ -000087f0: 3c2f 613e 203c 6120 6964 3d22 523a 3736 R │ │ │ -00008860: 3c2f 7370 616e 3e3c 2f61 3e29 203a 203c ) : < │ │ │ -00008870: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ -00008880: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ -00008890: 732e 5265 6c61 7469 6f6e 436c 6173 7365 s.RelationClasse │ │ │ -000088a0: 732e 6874 6d6c 2341 7379 6d6d 6574 7269 s.html#Asymmetri │ │ │ -000088b0: 6322 3e3c 7370 616e 2063 6c61 7373 3d22 c">Asymmetric (flip │ │ │ -00008990: 3c73 7061 6e20 636c 6173 733d 2269 6422 R) │ │ │ -000089c0: 3a3d 3c62 722f 3e0a 266e 6273 703b 266e :=
. &n │ │ │ -000089d0: 6273 703b 266e 6273 703b 266e 6273 703b bsp;   │ │ │ -000089e0: 266e 6273 703b 266e 6273 703b 3c73 7061   fun │ │ │ -00008a10: 3c2f 7370 616e 3e20 3c61 2069 643d 2278 │ │ │ -00008a40: 3c73 7061 6e20 636c 6173 733d 2269 6422 │ │ │ -00008a60: 783c 2f73 7061 6e3e 3c2f 613e 203c 6120 x y H H' = │ │ │ -00008b70: 2667 743b 203c 6120 636c 6173 733d 2269 > asym │ │ │ -00008be0: 6d65 7472 793c 2f73 7061 6e3e 3c2f 613e metry │ │ │ -00008bf0: 2028 3c73 7061 6e20 636c 6173 733d 2269 (R │ │ │ -00008c10: 3c2f 7370 616e 3e3a 3d3c 6120 636c 6173 :=R) H< │ │ │ -00008cf0: 2f61 3e20 3c61 2063 6c61 7373 3d22 6964 /a> H'.
..
. │ │ │ -00008d70: 266e 6273 703b 266e 6273 703b 266e 6273   &nbs │ │ │ -00008d80: 703b 266e 6273 703b 3c73 7061 6e20 636c p; Program │ │ │ -00008db0: 2044 6566 696e 6974 696f 6e3c 2f73 7061 Definition
flip_Transi │ │ │ -00008e30: 7469 7665 3c2f 7370 616e 3e3c 2f61 3e20 tive │ │ │ -00008e40: 6028 3c61 2069 643d 2248 3a38 3322 2063 `(Transi │ │ │ -00008e90: 7469 7665 3c2f 7370 616e 3e3c 2f61 3e20 tive │ │ │ -00008ea0: 3c61 2069 643d 2252 3a38 3222 2063 6c61 R) : Tra │ │ │ -00008f80: 6e73 6974 6976 653c 2f73 7061 6e3e 3c2f nsitive (fli │ │ │ -00008ff0: 703c 2f73 7061 6e3e 3c2f 613e 203c 6120 p R) :=
.  & │ │ │ -00009080: 6e62 7370 3b26 6e62 7370 3b26 6e62 7370 nbsp;   │ │ │ -00009090: 3b26 6e62 7370 3b3c 7370 616e 2063 6c61 ; fun x │ │ │ -00009140: 3c73 7061 6e20 636c 6173 733d 2269 6422 │ │ │ -00009160: 793c 2f73 7061 6e3e 3c2f 613e 203c 6120 y z H H' = │ │ │ -00009270: 2667 743b 203c 6120 636c 6173 733d 2269 > t │ │ │ -000092e0: 7261 6e73 6974 6976 6974 793c 2f73 7061 ransitivity (R:=< │ │ │ -00009320: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ -00009330: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ -00009340: 732e 5265 6c61 7469 6f6e 436c 6173 7365 s.RelationClasse │ │ │ -00009350: 732e 6874 6d6c 2352 3a38 3222 3e3c 7370 s.html#R:82">R │ │ │ -00009380: 3c2f 7370 616e 3e3c 2f61 3e29 203c 6120 ) H' │ │ │ -000093f0: 3c2f 7370 616e 3e3c 2f61 3e20 3c61 2063 H
.
.. │ │ │ -00009470: 3c62 722f 3e0a 266e 6273 703b 266e 6273
. &nbs │ │ │ -00009480: 703b 266e 6273 703b 266e 6273 703b 3c73 p;  P │ │ │ -000094b0: 726f 6772 616d 2044 6566 696e 6974 696f rogram Definitio │ │ │ -000094c0: 6e3c 2f73 7061 6e3e 203c 6120 6964 3d22 n flip_Antisymmet │ │ │ -00009540: 7269 633c 2f73 7061 6e3e 3c2f 613e 2060 ric ` │ │ │ -00009550: 283c 6120 6964 3d22 483a 3932 2220 636c (Antisym │ │ │ -000095a0: 6d65 7472 6963 3c2f 7370 616e 3e3c 2f61 metric eqA < │ │ │ -00009630: 6120 6964 3d22 523a 3931 2220 636c 6173 a id="R:91" clas │ │ │ -00009640: 733d 2269 6472 6566 2220 6872 6566 3d22 s="idref" href=" │ │ │ -00009650: 2352 3a39 3122 3e3c 7370 616e 2063 6c61 #R:91">R) :
.&n │ │ │ -000096b0: 6273 703b 266e 6273 703b 266e 6273 703b bsp;   │ │ │ -000096c0: 266e 6273 703b 266e 6273 703b 266e 6273   &nbs │ │ │ -000096d0: 703b 3c61 2063 6c61 7373 3d22 6964 7265 p;Antisymm │ │ │ -00009740: 6574 7269 633c 2f73 7061 6e3e 3c2f 613e etric │ │ │ -00009750: 203c 6120 636c 6173 733d 2269 6472 6566 eqA (flip │ │ │ -00009820: 3c2f 7370 616e 3e3c 2f61 3e20 3c61 2063 R
).
. │ │ │ -000098a0: 200a 3c62 722f 3e0a 3c2f 6469 763e 0a0a .
.
.. │ │ │ -000098b0: 3c64 6976 2063 6c61 7373 3d22 646f 6322
.Inversing the │ │ │ -000098d0: 6c61 7267 6572 2073 7472 7563 7475 7265 larger structure │ │ │ -000098e0: 7320 0a3c 2f64 6976 3e0a 3c64 6976 2063 s .
.
...   │ │ │ -00009910: 266e 6273 703b 266e 6273 703b 3c73 7061   Lem │ │ │ -00009940: 6d61 3c2f 7370 616e 3e20 3c61 2069 643d ma flip_PreOrder │ │ │ -000099b0: 3c2f 7370 616e 3e3c 2f61 3e20 6028 3c61 `(PreOrder R │ │ │ -00009a90: 2920 3a20 3c61 2063 6c61 7373 3d22 6964 ) : PreOrder (< │ │ │ -00009b40: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -00009b50: 7469 746c 653d 2264 6566 696e 6974 696f title="definitio │ │ │ -00009b60: 6e22 3e66 6c69 703c 2f73 7061 6e3e 3c2f n">flip R) │ │ │ -00009be0: 2e3c 6272 2f3e 0a20 0a3c 6272 2f3e 0a26 .
. .
.& │ │ │ -00009bf0: 6e62 7370 3b26 6e62 7370 3b26 6e62 7370 nbsp;   │ │ │ -00009c00: 3b26 6e62 7370 3b3c 7370 616e 2063 6c61 ; Lemma
flip_StrictO │ │ │ -00009ca0: 7264 6572 3c2f 7370 616e 3e3c 2f61 3e20 rder │ │ │ -00009cb0: 6028 3c61 2069 643d 2248 3a39 3622 2063 `(Strict │ │ │ -00009d00: 4f72 6465 723c 2f73 7061 6e3e 3c2f 613e Order │ │ │ -00009d10: 203c 6120 6964 3d22 523a 3935 2220 636c R) : │ │ │ -00009dd0: 3c73 7061 6e20 636c 6173 733d 2269 6422 S │ │ │ -00009df0: 7472 6963 744f 7264 6572 3c2f 7370 616e trictOrder ( │ │ │ -00009e60: 666c 6970 3c2f 7370 616e 3e3c 2f61 3e20 flip │ │ │ -00009e70: 3c61 2063 6c61 7373 3d22 6964 7265 6622 │ │ │ -00009ed0: 523c 2f73 7061 6e3e 3c2f 613e 292e 3c62 R).. .
.&nbs │ │ │ -00009ef0: 703b 266e 6273 703b 266e 6273 703b 266e p;  &n │ │ │ -00009f00: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;Lemma flip_PER │ │ │ -00009f90: 3c2f 613e 2060 283c 6120 6964 3d22 483a `(< │ │ │ -00009fc0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -00009fd0: 7469 746c 653d 2262 696e 6465 7222 3e50 title="binder">P │ │ │ -00009fe0: 4552 3c2f 7370 616e 3e3c 2f61 3e20 3c61 ER R │ │ │ -0000a060: 3c2f 613e 2920 3a20 3c61 2063 6c61 7373 ) : PER (fli │ │ │ -0000a130: 703c 2f73 7061 6e3e 3c2f 613e 203c 6120 p R).
│ │ │ -0000a1b0: 0a20 0a3c 6272 2f3e 0a26 6e62 7370 3b26 . .
. & │ │ │ -0000a1c0: 6e62 7370 3b26 6e62 7370 3b26 6e62 7370 nbsp;   │ │ │ -0000a1d0: 3b3c 7370 616e 2063 6c61 7373 3d22 6964 ;Lemma < │ │ │ -0000a200: 6120 6964 3d22 666c 6970 5f45 7175 6976 a id="flip_Equiv │ │ │ -0000a210: 616c 656e 6365 2220 636c 6173 733d 2269 alence" class="i │ │ │ -0000a220: 6472 6566 2220 6872 6566 3d22 2366 6c69 dref" href="#fli │ │ │ -0000a230: 705f 4571 7569 7661 6c65 6e63 6522 3e3c p_Equivalence">< │ │ │ -0000a240: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -0000a250: 7469 746c 653d 226c 656d 6d61 223e 666c title="lemma">fl │ │ │ -0000a260: 6970 5f45 7175 6976 616c 656e 6365 3c2f ip_Equivalence `(Equivalenc │ │ │ -0000a2d0: 653c 2f73 7061 6e3e 3c2f 613e 203c 6120 e R │ │ │ -0000a350: 3c2f 613e 2920 3a20 3c61 2063 6c61 7373 ) : Equi │ │ │ -0000a3c0: 7661 6c65 6e63 653c 2f73 7061 6e3e 3c2f valence (fli │ │ │ -0000a430: 703c 2f73 7061 6e3e 3c2f 613e 203c 6120 p R).
│ │ │ -0000a4b0: 0a20 0a3c 6272 2f3e 0a26 6e62 7370 3b26 . .
. & │ │ │ -0000a4c0: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp;End │ │ │ -0000a4f0: 203c 6120 636c 6173 733d 2269 6472 6566 flip │ │ │ -0000a560: 3c2f 613e 2e3c 6272 2f3e 0a0a 3c62 722f .
..
.  S │ │ │ -0000a5a0: 6563 7469 6f6e 3c2f 7370 616e 3e20 3c61 ection com │ │ │ -0000a610: 706c 656d 656e 743c 2f73 7061 6e3e 3c2f plement.
..
. │ │ │ -0000a630: 266e 6273 703b 266e 6273 703b 266e 6273   &nbs │ │ │ -0000a640: 703b 266e 6273 703b 3c73 7061 6e20 636c p; Definit │ │ │ -0000a670: 696f 6e3c 2f73 7061 6e3e 203c 6120 6964 ion
compl │ │ │ -0000a6f0: 656d 656e 745f 4972 7265 666c 6578 6976 ement_Irreflexiv │ │ │ -0000a700: 653c 2f73 7061 6e3e 3c2f 613e 2060 283c e `(< │ │ │ -0000a710: 6120 6964 3d22 483a 3130 3222 2063 6c61 a id="H:102" cla │ │ │ -0000a720: 7373 3d22 6964 7265 6622 2068 7265 663d ss="idref" href= │ │ │ -0000a730: 2223 483a 3130 3222 3e3c 7370 616e 2063 "#H:102">Reflexi │ │ │ -0000a760: 7665 3c2f 7370 616e 3e3c 2f61 3e20 3c61 ve R)
.&n │ │ │ -0000a7f0: 6273 703b 266e 6273 703b 266e 6273 703b bsp;   │ │ │ -0000a800: 266e 6273 703b 266e 6273 703b 266e 6273   &nbs │ │ │ -0000a810: 703b 3a20 3c61 2063 6c61 7373 3d22 6964 p;: Irreflex │ │ │ -0000a880: 6976 653c 2f73 7061 6e3e 3c2f 613e 2028 ive ( │ │ │ -0000a890: 3c61 2063 6c61 7373 3d22 6964 7265 6622 compleme │ │ │ -0000a900: 6e74 3c2f 7370 616e 3e3c 2f61 3e20 3c61 nt R │ │ │ -0000a970: 3c2f 7370 616e 3e3c 2f61 3e29 2e3c 6272 ).
. .
.  │ │ │ -0000a990: 3b26 6e62 7370 3b26 6e62 7370 3b26 6e62 ;  &nb │ │ │ -0000a9a0: 7370 3b3c 7370 616e 2063 6c61 7373 3d22 sp;Definition complement_Sym │ │ │ -0000aa50: 6d65 7472 6963 3c2f 7370 616e 3e3c 2f61 metric `(Sy │ │ │ -0000aab0: 6d6d 6574 7269 633c 2f73 7061 6e3e 3c2f mmetric R) : │ │ │ -0000ab40: 3c61 2063 6c61 7373 3d22 6964 7265 6622 Symmetric ( │ │ │ -0000ac20: 636f 6d70 6c65 6d65 6e74 3c2f 7370 616e complement R< │ │ │ -0000aca0: 2f61 3e29 2e3c 6272 2f3e 0a20 266e 6273 /a>).
. &nbs │ │ │ -0000acb0: 703b 266e 6273 703b 3c73 7061 6e20 636c p; End
co │ │ │ -0000ad50: 6d70 6c65 6d65 6e74 3c2f 7370 616e 3e3c mplement< │ │ │ -0000ad60: 2f61 3e2e 3c62 722f 3e0a 0a3c 6272 2f3e /a>.
..
│ │ │ -0000ad70: 0a3c 2f64 6976 3e0a 0a3c 6469 7620 636c .
..
.Rewri │ │ │ -0000ad90: 7465 2072 656c 6174 696f 6e20 6f6e 2061 te relation on a │ │ │ -0000ada0: 2067 6976 656e 2073 7570 706f 7274 3a20 given support: │ │ │ -0000adb0: 6465 636c 6172 6573 2061 2072 656c 6174 declares a relat │ │ │ -0000adc0: 696f 6e20 6173 2061 2072 6577 7269 7465 ion as a rewrite │ │ │ -0000add0: 0a20 2020 7265 6c61 7469 6f6e 2066 6f72 . relation for │ │ │ -0000ade0: 2075 7365 2062 7920 7468 6520 6765 6e65 use by the gene │ │ │ -0000adf0: 7261 6c69 7a65 6420 7265 7772 6974 696e ralized rewritin │ │ │ -0000ae00: 6720 7461 6374 6963 2e0a 2020 2049 7420 g tactic.. It │ │ │ -0000ae10: 6865 6c70 7320 6368 6f6f 7369 6e67 2069 helps choosing i │ │ │ -0000ae20: 6620 6120 7265 7772 6974 6520 7368 6f75 f a rewrite shou │ │ │ -0000ae30: 6c64 2062 6520 6861 6e64 6c65 640a 2020 ld be handled. │ │ │ -0000ae40: 2062 7920 7468 6520 6765 6e65 7261 6c69 by the generali │ │ │ -0000ae50: 7a65 6420 6f72 2074 6865 2072 6567 756c zed or the regul │ │ │ -0000ae60: 6172 2072 6577 7269 7469 6e67 2074 6163 ar rewriting tac │ │ │ -0000ae70: 7469 6320 7573 696e 6720 6c65 6962 6e69 tic using leibni │ │ │ -0000ae80: 7a20 6571 7561 6c69 7479 2e0a 2020 2055 z equality.. U │ │ │ -0000ae90: 7365 7273 2063 616e 2064 6563 6c61 7265 sers can declare │ │ │ -0000aea0: 2061 6e20 3c73 7061 6e20 636c 6173 733d an Rewrit │ │ │ -0000aee0: 6552 656c 6174 696f 6e3c 2f73 7061 6e3e eRelation │ │ │ -0000aef0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c A< │ │ │ -0000af30: 2f73 7061 6e3e 3c2f 7370 616e 3e20 3c73 /span> RA anywhere to │ │ │ -0000af90: 2064 6563 6c61 7265 2064 6566 6175 6c74 declare default │ │ │ -0000afa0: 0a20 2020 7265 6c61 7469 6f6e 7320 6f6e . relations on │ │ │ -0000afb0: 2061 2067 6976 656e 2074 7970 6520 6041 a given type `A │ │ │ -0000afc0: 602e 2054 6869 7320 6973 2061 6c73 6f20 `. This is also │ │ │ -0000afd0: 646f 6e65 2061 7574 6f6d 6174 6963 616c done automatical │ │ │ -0000afe0: 6c79 2062 790a 2020 2074 6865 203c 7370 ly by. the Declare R │ │ │ -0000b070: 656c 6174 696f 6e3c 2f73 7061 6e3e 3c2f elation < │ │ │ -0000b0a0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -0000b0b0: 7469 746c 653d 2276 6172 223e 413c 2f73 title="var">A RA commands. It │ │ │ -0000b120: 6861 7320 6e6f 206d 6f64 6520 6465 636c has no mode decl │ │ │ -0000b130: 6172 6174 696f 6e3a 0a20 2020 6974 2077 aration:. it w │ │ │ -0000b140: 696c 6c20 6173 7369 676e 2060 3f41 203a ill assign `?A : │ │ │ -0000b150: 3d20 5072 6f70 2c20 3f52 203a 3d20 6966 = Prop, ?R := if │ │ │ -0000b160: 6660 206f 6e20 616e 2065 6e74 6972 656c f` on an entirel │ │ │ -0000b170: 7920 756e 7370 6563 6966 6965 6420 7175 y unspecified qu │ │ │ -0000b180: 6572 790a 2020 2060 5265 7772 6974 6552 ery. `RewriteR │ │ │ -0000b190: 656c 6174 696f 6e20 3f41 203f 5260 2c20 elation ?A ?R`, │ │ │ -0000b1a0: 6f72 2061 6e79 2070 7265 6665 7265 6420 or any prefered │ │ │ -0000b1b0: 7265 7772 6974 6520 7265 6c61 7469 6f6e rewrite relation │ │ │ -0000b1c0: 206f 6620 7072 696f 7269 7479 2026 6c74 of priority < │ │ │ -0000b1d0: 3b20 322e 200a 3c2f 6469 763e 0a3c 6469 ; 2. .
.. │ │ │ -0000b1f0: 0a3c 6272 2f3e 0a26 6e62 7370 3b26 6e62 .
. &nb │ │ │ -0000b200: 7370 3b3c 7370 616e 2063 6c61 7373 3d22 sp;Class │ │ │ -0000b230: 203c 6120 6964 3d22 5265 7772 6974 6552
< │ │ │ -0000b270: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -0000b280: 7469 746c 653d 2272 6563 6f72 6422 3e52 title="record">R │ │ │ -0000b290: 6577 7269 7465 5265 6c61 7469 6f6e 3c2f ewriteRelation (RA │ │ │ -0000b300: 3c2f 613e 203a 203c 6120 636c 6173 733d : │ │ │ -0000b350: 3c73 7061 6e20 636c 6173 733d 2269 6422 relation A).
..< │ │ │ -0000b400: 6272 2f3e 0a3c 2f64 6976 3e0a 0a3c 6469 br/>.
...L │ │ │ -0000b420: 6569 626e 697a 2065 7175 616c 6974 792e eibniz equality. │ │ │ -0000b430: 200a 3c2f 6469 763e 0a3c 6469 7620 636c .
.
.&nbs │ │ │ -0000b450: 703b 266e 6273 703b 3c73 7061 6e20 636c p; Section │ │ │ -0000b480: 3c2f 7370 616e 3e20 3c61 2069 643d 2244 │ │ │ -0000b4c0: 3c73 7061 6e20 636c 6173 733d 2269 6422 Leibniz< │ │ │ -0000b4f0: 2f61 3e2e 3c62 722f 3e0a 266e 6273 703b /a>.
.  │ │ │ -0000b500: 266e 6273 703b 266e 6273 703b 266e 6273   &nbs │ │ │ -0000b510: 703b 3c73 7061 6e20 636c 6173 733d 2269 p;Global Instan │ │ │ -0000b540: 6365 3c2f 7370 616e 3e20 3c61 2069 643d ce
eq_Reflexive │ │ │ -0000b5b0: 3c2f 7370 616e 3e3c 2f61 3e20 3a20 3c61 : │ │ │ -0000b620: 5265 666c 6578 6976 653c 2f73 7061 6e3e Reflexive │ │ │ -0000b630: 3c2f 613e 2028 403c 6120 636c 6173 733d (@eq A) := @< │ │ │ -0000b740: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -0000b750: 7469 746c 653d 2263 6f6e 7374 7275 6374 title="construct │ │ │ -0000b760: 6f72 223e 6571 5f72 6566 6c3c 2f73 7061 or">eq_refl A.
.&nbs │ │ │ -0000b7f0: 703b 266e 6273 703b 266e 6273 703b 266e p;  &n │ │ │ -0000b800: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;Global Inst │ │ │ -0000b830: 616e 6365 3c2f 7370 616e 3e20 3c61 2069 ance eq_Symmetr │ │ │ -0000b8a0: 6963 3c2f 7370 616e 3e3c 2f61 3e20 3a20 ic : │ │ │ -0000b8b0: 3c61 2063 6c61 7373 3d22 6964 7265 6622 Symmetric (@eq
A) := @ │ │ │ -0000ba30: 3c73 7061 6e20 636c 6173 733d 2269 6422 e │ │ │ -0000ba50: 715f 7379 6d3c 2f73 7061 6e3e 3c2f 613e q_sym │ │ │ -0000ba60: 203c 6120 636c 6173 733d 2269 6472 6566 A. │ │ │ -0000bad0: 3c62 722f 3e0a 266e 6273 703b 266e 6273
. &nbs │ │ │ -0000bae0: 703b 266e 6273 703b 266e 6273 703b 3c73 p;  G │ │ │ -0000bb10: 6c6f 6261 6c20 496e 7374 616e 6365 3c2f lobal Instance │ │ │ -0000bb60: 3c73 7061 6e20 636c 6173 733d 2269 6422 eq_Transitive< │ │ │ -0000bb90: 2f73 7061 6e3e 3c2f 613e 203a 203c 6120 /span> : │ │ │ -0000bc00: 5472 616e 7369 7469 7665 3c2f 7370 616e Transitive (@eq A) := @ │ │ │ -0000bd40: 6571 5f74 7261 6e73 3c2f 7370 616e 3e3c eq_trans< │ │ │ -0000bd50: 2f61 3e20 3c61 2063 6c61 7373 3d22 6964 /a> A.
..
. │ │ │ -0000bdd0: 3c2f 6469 763e 0a0a 3c64 6976 2063 6c61
..
.Leibin │ │ │ -0000bdf0: 7a20 6571 7561 6c69 7479 203c 7370 616e z equality eq is an equivale │ │ │ -0000be50: 6e63 6520 7265 6c61 7469 6f6e 2e0a 2020 nce relation.. │ │ │ -0000be60: 2020 2020 2020 5468 6520 696e 7374 616e The instan │ │ │ -0000be70: 6365 2068 6173 206c 6f77 2070 7269 6f72 ce has low prior │ │ │ -0000be80: 6974 7920 6173 2069 7420 6973 2061 6c77 ity as it is alw │ │ │ -0000be90: 6179 7320 6170 706c 6963 6162 6c65 0a20 ays applicable. │ │ │ -0000bea0: 2020 2020 2020 2069 6620 6f6e 6c79 2074 if only t │ │ │ -0000beb0: 6865 2074 7970 6520 6973 2063 6f6e 7374 he type is const │ │ │ -0000bec0: 7261 696e 6564 2e20 0a3c 2f64 6976 3e0a rained. .
. │ │ │ -0000bed0: 3c64 6976 2063 6c61 7373 3d22 636f 6465
..
.Lei │ │ │ -0000c1f0: 626e 697a 2064 6973 6571 7561 6c69 7479 bniz disequality │ │ │ -0000c200: 2e20 0a3c 2f64 6976 3e0a 3c64 6976 2063 . .
.
.&nb │ │ │ -0000c220: 7370 3b26 6e62 7370 3b3c 7370 616e 2063 sp; Sectio │ │ │ -0000c250: 6e3c 2f73 7061 6e3e 203c 6120 6964 3d22 n LeibnizN │ │ │ -0000c2c0: 6f74 3c2f 7370 616e 3e3c 2f61 3e2e 3c62 ot..
..
.Di │ │ │ -0000c2f0: 7365 7175 616c 6974 7920 6973 2073 796d sequality is sym │ │ │ -0000c300: 6d65 7472 6963 2e20 0a3c 2f64 6976 3e0a metric. .
. │ │ │ -0000c310: 3c64 6976 2063 6c61 7373 3d22 636f 6465
.  & │ │ │ -0000c330: 6e62 7370 3b26 6e62 7370 3b3c 7370 616e nbsp; Glob │ │ │ -0000c360: 616c 2049 6e73 7461 6e63 653c 2f73 7061 al Instance n │ │ │ -0000c3d0: 6571 5f53 796d 6d65 7472 6963 3c2f 7370 eq_Symmetric : Symm │ │ │ -0000c450: 6574 7269 633c 2f73 7061 6e3e 3c2f 613e etric │ │ │ -0000c460: 2028 3c73 7061 6e20 636c 6173 733d 2269 (fun x │ │ │ -0000c4e0: 3c2f 613e 203c 6120 6964 3d22 793a 3130 < │ │ │ -0000c510: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -0000c520: 7469 746c 653d 2262 696e 6465 7222 3e79 title="binder">y │ │ │ -0000c530: 3c2f 7370 616e 3e3c 2f61 3e20 3a20 3c61 : │ │ │ -0000c5a0: 413c 2f73 7061 6e3e 3c2f 613e 203d 2667 A =&g │ │ │ -0000c5b0: 743b 203c 6120 636c 6173 733d 2269 6472 t; x │ │ │ -0000c620: 203c 6120 636c 6173 733d 2269 6472 6566 <& │ │ │ -0000c690: 6774 3b3c 2f73 7061 6e3e 3c2f 613e 203c gt; < │ │ │ -0000c6a0: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ -0000c6b0: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ -0000c6c0: 732e 5265 6c61 7469 6f6e 436c 6173 7365 s.RelationClasse │ │ │ -0000c6d0: 732e 6874 6d6c 2379 3a31 3038 223e 3c73 s.html#y:108"> │ │ │ -0000c700: 793c 2f73 7061 6e3e 3c2f 613e 2920 3a3d y) := │ │ │ -0000c710: 2028 403c 6120 636c 6173 733d 2269 6472 (@not_eq_ │ │ │ -0000c770: 7379 6d3c 2f73 7061 6e3e 3c2f 613e 203c sym < │ │ │ -0000c780: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ -0000c790: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ -0000c7a0: 732e 5265 6c61 7469 6f6e 436c 6173 7365 s.RelationClasse │ │ │ -0000c7b0: 732e 6874 6d6c 2344 6566 732e 4122 3e3c s.html#Defs.A">< │ │ │ -0000c7c0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -0000c7d0: 7469 746c 653d 2276 6172 6961 626c 6522 title="variable" │ │ │ -0000c7e0: 3e41 3c2f 7370 616e 3e3c 2f61 3e29 2e3c >A).< │ │ │ -0000c7f0: 6272 2f3e 0a26 6e62 7370 3b26 6e62 7370 br/>.   │ │ │ -0000c800: 3b3c 7370 616e 2063 6c61 7373 3d22 6964 ;End LeibnizNo │ │ │ -0000c8a0: 743c 2f73 7061 6e3e 3c2f 613e 2e3c 6272 t.
.End < │ │ │ -0000c8e0: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ -0000c8f0: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ -0000c900: 732e 5265 6c61 7469 6f6e 436c 6173 7365 s.RelationClasse │ │ │ -0000c910: 732e 6874 6d6c 2344 6566 7322 3e3c 7370 s.html#Defs">De │ │ │ -0000c940: 6673 3c2f 7370 616e 3e3c 2f61 3e2e 3c62 fs...
.
..
.Default rew │ │ │ -0000c980: 7269 7465 2072 656c 6174 696f 6e73 2068 rite relations h │ │ │ -0000c990: 616e 646c 6564 2062 7920 3c73 7061 6e20 andled by setoid_rewrit │ │ │ -0000c9e0: 653c 2f73 7061 6e3e 3c2f 7370 616e 3e20 e │ │ │ -0000c9f0: 6f6e 2050 726f 702e 200a 3c2f 6469 763e on Prop. .
│ │ │ -0000ca00: 0a3c 6469 7620 636c 6173 733d 2263 6f64 .
.#[global │ │ │ -0000ca40: 5d3c 6272 2f3e 0a3c 7370 616e 2063 6c61 ]
.Instance │ │ │ -0000ca70: 3c2f 7370 616e 3e20 3c61 2069 643d 2269 inverse_impl │ │ │ -0000cb00: 5f72 6577 7269 7465 5f72 656c 6174 696f _rewrite_relatio │ │ │ -0000cb10: 6e3c 2f73 7061 6e3e 3c2f 613e 203a 203c n : < │ │ │ -0000cb20: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ -0000cb30: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ -0000cb40: 732e 5265 6c61 7469 6f6e 436c 6173 7365 s.RelationClasse │ │ │ -0000cb50: 732e 6874 6d6c 2352 6577 7269 7465 5265 s.html#RewriteRe │ │ │ -0000cb60: 6c61 7469 6f6e 223e 3c73 7061 6e20 636c lation">RewriteRe │ │ │ -0000cb90: 6c61 7469 6f6e 3c2f 7370 616e 3e3c 2f61 lation (flip │ │ │ -0000cc00: 3c2f 7370 616e 3e3c 2f61 3e20 3c61 2063 impl │ │ │ -0000cc70: 3c2f 613e 2920 7c20 3320 3a3d 207b 7d2e ) | 3 := {}. │ │ │ -0000cc80: 3c62 722f 3e0a 235b 3c73 7061 6e20 636c
.#[global]
.Instan │ │ │ -0000cce0: 6365 3c2f 7370 616e 3e20 3c61 2069 643d ce impl_rewri │ │ │ -0000cd60: 7465 5f72 656c 6174 696f 6e3c 2f73 7061 te_relation : RewriteRelation │ │ │ -0000cdf0: 3c2f 7370 616e 3e3c 2f61 3e20 3c61 2063 impl │ │ │ -0000ce60: 3c2f 613e 207c 2033 203a 3d20 7b7d 2e3c | 3 := {}.< │ │ │ -0000ce70: 6272 2f3e 0a23 5b3c 7370 616e 2063 6c61 br/>.#[global]
.Instanc │ │ │ -0000ced0: 653c 2f73 7061 6e3e 203c 6120 6964 3d22 e iff_rewrite_r │ │ │ -0000cf50: 656c 6174 696f 6e3c 2f73 7061 6e3e 3c2f elation : Rew │ │ │ -0000cfd0: 7269 7465 5265 6c61 7469 6f6e 3c2f 7370 riteRelation iff< │ │ │ -0000d040: 2f73 7061 6e3e 3c2f 613e 207c 2032 203a /span> | 2 : │ │ │ -0000d050: 3d20 7b7d 2e3c 6272 2f3e 0a0a 3c62 722f = {}.
..
.
..
.Any │ │ │ -0000d080: 3c73 7061 6e20 636c 6173 733d 2269 6e6c Equivalenc │ │ │ -0000d0c0: 653c 2f73 7061 6e3e 3c2f 7370 616e 3e20 e │ │ │ -0000d0d0: 6465 636c 6172 6564 2069 6e20 7468 6520 declared in the │ │ │ -0000d0e0: 636f 6e74 6578 7420 6973 2061 7574 6f6d context is autom │ │ │ -0000d0f0: 6174 6963 616c 6c79 2063 6f6e 7369 6465 atically conside │ │ │ -0000d100: 7265 640a 2020 6120 7265 7772 6974 6520 red. a rewrite │ │ │ -0000d110: 7265 6c61 7469 6f6e 2e20 5468 6973 206f relation. This o │ │ │ -0000d120: 6e6c 7920 6170 706c 6965 7320 6966 2074 nly applies if t │ │ │ -0000d130: 6865 2072 656c 6174 696f 6e20 6973 2061 he relation is a │ │ │ -0000d140: 7420 6c65 6173 7420 7061 7274 6961 6c6c t least partiall │ │ │ -0000d150: 790a 2020 6465 6669 6e65 643a 2073 6574 y. defined: set │ │ │ -0000d160: 6f69 645f 7265 7772 6974 6520 776f 6e27 oid_rewrite won' │ │ │ -0000d170: 7420 7472 7920 746f 2069 6e66 6572 2061 t try to infer a │ │ │ -0000d180: 7262 6974 7261 7279 2075 7365 7220 7265 rbitrary user re │ │ │ -0000d190: 7772 6974 6520 7265 6c61 7469 6f6e 732e write relations. │ │ │ -0000d1a0: 200a 3c2f 6469 763e 0a3c 6469 7620 636c .
.
..
.Definition equivalence_re │ │ │ -0000d280: 7772 6974 655f 7265 6c61 7469 6f6e 3c2f write_relation `(eqa : │ │ │ -0000d340: 3c73 7061 6e20 636c 6173 733d 2269 6422 E │ │ │ -0000d360: 7175 6976 616c 656e 6365 3c2f 7370 616e quivalence │ │ │ -0000d3a0: 3c73 7061 6e20 636c 6173 733d 2269 6422 │ │ │ -0000d3c0: 413c 2f73 7061 6e3e 3c2f 613e 203c 6120 A eqA) : RewriteRela │ │ │ -0000d4a0: 7469 6f6e 3c2f 7370 616e 3e3c 2f61 3e20 tion │ │ │ -0000d4b0: 3c61 2063 6c61 7373 3d22 6964 7265 6622 eqA :=
.  │ │ │ -0000d530: 266e 6273 703b 3c61 2063 6c61 7373 3d22  Build_ │ │ │ -0000d5b0: 5265 7772 6974 6552 656c 6174 696f 6e3c RewriteRelation< │ │ │ -0000d5c0: 2f73 7061 6e3e 3c2f 613e 203c 7370 616e /span> _ │ │ │ -0000d5f0: 2e3c 6272 2f3e 0a0a 3c62 722f 3e0a 3c73 .
..
.L │ │ │ -0000d620: 7461 633c 2f73 7061 6e3e 203c 7370 616e tac
equiv_re │ │ │ -0000d650: 7772 6974 655f 7265 6c61 7469 6f6e 3c2f write_relation R :=.   │ │ │ -0000d6a0: 3c73 7061 6e20 636c 6173 733d 2269 6422 try │ │ │ -0000d6c0: 6966 3c2f 7370 616e 3e20 3c73 7061 6e20 if is_evar R the │ │ │ -0000d740: 6e3c 2f73 7061 6e3e 203c 7370 616e 2063 n fail
.  │ │ │ -0000d780: 266e 6273 703b 3c73 7061 6e20 636c 6173  else │ │ │ -0000d7d0: 636c 6173 735f 6170 706c 793c 2f73 7061 class_apply │ │ │ -0000d800: 6571 7569 7661 6c65 6e63 655f 7265 7772 equivalence_rewr │ │ │ -0000d810: 6974 655f 7265 6c61 7469 6f6e 3c2f 7370 ite_relation.
..
│ │ │ -0000d830: 0a23 5b3c 7370 616e 2063 6c61 7373 3d22 .#[ │ │ │ -0000d850: 676c 6f62 616c 3c2f 7370 616e 3e5d 3c62 global].Hint │ │ │ -0000d890: 203c 7370 616e 2063 6c61 7373 3d22 6964 Extern │ │ │ -0000d8c0: 3130 2028 403c 6120 636c 6173 733d 2269 10 (@Rew │ │ │ -0000d930: 7269 7465 5265 6c61 7469 6f6e 3c2f 7370 riteRelation ?A ? │ │ │ -0000d970: 3c73 7061 6e20 636c 6173 733d 2269 6422 R) => equiv_ │ │ │ -0000d9c0: 7265 7772 6974 655f 7265 6c61 7469 6f6e rewrite_relation │ │ │ -0000d9d0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c R : │ │ │ -0000da00: 3c73 7061 6e20 636c 6173 733d 2269 6422 typ │ │ │ -0000da20: 6563 6c61 7373 5f69 6e73 7461 6e63 6573 eclass_instances │ │ │ -0000da30: 3c2f 7370 616e 3e2e 3c62 722f 3e0a 0a3c .
..< │ │ │ -0000da40: 6272 2f3e 0a3c 2f64 6976 3e0a 0a3c 6469 br/>.
...H │ │ │ -0000da60: 696e 7473 2074 6f20 6472 6976 6520 7468 ints to drive th │ │ │ -0000da70: 6520 7479 7065 636c 6173 7320 7265 736f e typeclass reso │ │ │ -0000da80: 6c75 7469 6f6e 2061 766f 6964 696e 6720 lution avoiding │ │ │ -0000da90: 6c6f 6f70 730a 2064 7565 2074 6f20 7468 loops. due to th │ │ │ -0000daa0: 6520 7573 6520 6f66 2066 756c 6c20 756e e use of full un │ │ │ -0000dab0: 6966 6963 6174 696f 6e2e 200a 3c2f 6469 ification. ..
.#[global]
.Hint Extern
1 (Reflex │ │ │ -0000dbd0: 6976 653c 2f73 7061 6e3e 3c2f 613e 2028 ive ( │ │ │ -0000dbe0: 3c61 2063 6c61 7373 3d22 6964 7265 6622 compleme │ │ │ -0000dc50: 6e74 3c2f 7370 616e 3e3c 2f61 3e20 3c73 nt _)) => class_a │ │ │ -0000dcb0: 7070 6c79 3c2f 7370 616e 3e20 403c 6120 pply @irreflex │ │ │ -0000dd30: 6976 6974 793c 2f73 7061 6e3e 3c2f 613e ivity │ │ │ -0000dd40: 203a 203c 7370 616e 2063 6c61 7373 3d22 : │ │ │ -0000dd60: 7479 7065 636c 6173 735f 696e 7374 616e typeclass_instan │ │ │ -0000dd70: 6365 733c 2f73 7061 6e3e 2e3c 6272 2f3e ces.
│ │ │ -0000dd80: 0a23 5b3c 7370 616e 2063 6c61 7373 3d22 .#[ │ │ │ -0000dda0: 676c 6f62 616c 3c2f 7370 616e 3e5d 3c62 global].Hint │ │ │ -0000dde0: 203c 7370 616e 2063 6c61 7373 3d22 6964 Extern │ │ │ -0000de10: 3320 283c 6120 636c 6173 733d 2269 6472 3 (Symmetric (< │ │ │ -0000ded0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -0000dee0: 7469 746c 653d 2264 6566 696e 6974 696f title="definitio │ │ │ -0000def0: 6e22 3e63 6f6d 706c 656d 656e 743c 2f73 n">complement
_)) │ │ │ -0000df30: 203d 2667 743b 203c 7370 616e 2063 6c61 => class_apply< │ │ │ -0000df60: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> complement_S │ │ │ -0000df90: 796d 6d65 7472 6963 3c2f 7370 616e 3e20 ymmetric │ │ │ -0000dfa0: 3a20 3c73 7061 6e20 636c 6173 733d 2269 : t │ │ │ -0000dfc0: 7970 6563 6c61 7373 5f69 6e73 7461 6e63 ypeclass_instanc │ │ │ -0000dfd0: 6573 3c2f 7370 616e 3e2e 3c62 722f 3e0a es.
. │ │ │ -0000dfe0: 235b 3c73 7061 6e20 636c 6173 733d 2269 #[g │ │ │ -0000e000: 6c6f 6261 6c3c 2f73 7061 6e3e 5d3c 6272 lobal]
.Hint │ │ │ -0000e040: 3c73 7061 6e20 636c 6173 733d 2269 6422 Extern 3 │ │ │ -0000e070: 2028 3c61 2063 6c61 7373 3d22 6964 7265 (Irreflexiv │ │ │ -0000e0e0: 653c 2f73 7061 6e3e 3c2f 613e 2028 3c61 e (complement │ │ │ -0000e160: 3c2f 7370 616e 3e3c 2f61 3e20 3c73 7061 _
)) => class_app │ │ │ -0000e1c0: 6c79 3c2f 7370 616e 3e20 3c73 7061 6e20 ly complemen │ │ │ -0000e1f0: 745f 4972 7265 666c 6578 6976 653c 2f73 t_Irreflexive
: typeclass_in │ │ │ -0000e230: 7374 616e 6365 733c 2f73 7061 6e3e 2e3c stances.< │ │ │ -0000e240: 6272 2f3e 0a0a 3c62 722f 3e0a 235b 3c73 br/>..
.#[globa │ │ │ -0000e270: 6c3c 2f73 7061 6e3e 5d3c 6272 2f3e 0a3c l]
.< │ │ │ -0000e280: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -0000e290: 7469 746c 653d 226b 6579 776f 7264 223e title="keyword"> │ │ │ -0000e2a0: 4869 6e74 3c2f 7370 616e 3e20 3c73 7061 Hint Ext │ │ │ -0000e2d0: 6572 6e3c 2f73 7061 6e3e 2033 2028 3c61 ern 3 ( │ │ │ -0000e340: 5265 666c 6578 6976 653c 2f73 7061 6e3e Reflexive │ │ │ -0000e350: 3c2f 613e 2028 3c61 2063 6c61 7373 3d22 (f │ │ │ -0000e3b0: 6c69 703c 2f73 7061 6e3e 3c2f 613e 203c lip < │ │ │ -0000e3c0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -0000e3d0: 7469 746c 653d 2276 6172 223e 5f3c 2f73 title="var">_
)) => app │ │ │ -0000e410: 6c79 3c2f 7370 616e 3e20 3c61 2063 6c61 ly flip_Reflexive< │ │ │ -0000e490: 2f73 7061 6e3e 3c2f 613e 203a 203c 7370 /span> : typecl │ │ │ -0000e4c0: 6173 735f 696e 7374 616e 6365 733c 2f73 ass_instances
.
.#[global │ │ │ -0000e500: 3c2f 7370 616e 3e5d 3c62 722f 3e0a 3c73 ]
.H │ │ │ -0000e530: 696e 743c 2f73 7061 6e3e 203c 7370 616e int Exte │ │ │ -0000e560: 726e 3c2f 7370 616e 3e20 3320 283c 6120 rn 3 (Irreflexive
(flip _ │ │ │ -0000e670: 3c2f 7370 616e 3e29 2920 3d26 6774 3b20 )) => │ │ │ -0000e680: 3c73 7061 6e20 636c 6173 733d 2269 6422 cla │ │ │ -0000e6a0: 7373 5f61 7070 6c79 3c2f 7370 616e 3e20 ss_apply │ │ │ -0000e6b0: 3c73 7061 6e20 636c 6173 733d 2269 6422 fli │ │ │ -0000e6d0: 705f 4972 7265 666c 6578 6976 653c 2f73 p_Irreflexive : typeclass_in │ │ │ -0000e710: 7374 616e 6365 733c 2f73 7061 6e3e 2e3c stances.< │ │ │ -0000e720: 6272 2f3e 0a23 5b3c 7370 616e 2063 6c61 br/>.#[global]
.Hint
Extern 3 (Symmetr │ │ │ -0000e820: 6963 3c2f 7370 616e 3e3c 2f61 3e20 283c ic (< │ │ │ -0000e830: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ -0000e840: 6872 6566 3d22 436f 712e 5072 6f67 7261 href="Coq.Progra │ │ │ -0000e850: 6d2e 4261 7369 6373 2e68 746d 6c23 666c m.Basics.html#fl │ │ │ -0000e860: 6970 223e 3c73 7061 6e20 636c 6173 733d ip">flip _)) │ │ │ -0000e8c0: 3d26 6774 3b20 3c73 7061 6e20 636c 6173 => class_apply flip_Symmetri │ │ │ -0000e920: 633c 2f73 7061 6e3e 203a 203c 7370 616e c : typeclas │ │ │ -0000e950: 735f 696e 7374 616e 6365 733c 2f73 7061 s_instances.
.#[global]
.Hin │ │ │ -0000e9c0: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t
Extern │ │ │ -0000e9f0: 3c2f 7370 616e 3e20 3320 283c 6120 636c 3 (< │ │ │ -0000ea40: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -0000ea50: 7469 746c 653d 2263 6c61 7373 223e 4173 title="class">As │ │ │ -0000ea60: 796d 6d65 7472 6963 3c2f 7370 616e 3e3c ymmetric
< │ │ │ -0000ea70: 2f61 3e20 283c 6120 636c 6173 733d 2269 /a> (fl │ │ │ -0000ead0: 6970 3c2f 7370 616e 3e3c 2f61 3e20 3c73 ip _)) => class_a │ │ │ -0000eb30: 7070 6c79 3c2f 7370 616e 3e20 3c73 7061 pply
flip_As │ │ │ -0000eb60: 796d 6d65 7472 6963 3c2f 7370 616e 3e20 ymmetric
│ │ │ -0000eb70: 3a20 3c73 7061 6e20 636c 6173 733d 2269 : t │ │ │ -0000eb90: 7970 6563 6c61 7373 5f69 6e73 7461 6e63 ypeclass_instanc │ │ │ -0000eba0: 6573 3c2f 7370 616e 3e2e 3c62 722f 3e0a es.
. │ │ │ -0000ebb0: 235b 3c73 7061 6e20 636c 6173 733d 2269 #[g │ │ │ -0000ebd0: 6c6f 6261 6c3c 2f73 7061 6e3e 5d3c 6272 lobal]
.Hint │ │ │ -0000ec10: 3c73 7061 6e20 636c 6173 733d 2269 6422 Extern 3 │ │ │ -0000ec40: 2028 3c61 2063 6c61 7373 3d22 6964 7265 (Antisymm │ │ │ -0000ecb0: 6574 7269 633c 2f73 7061 6e3e 3c2f 613e etric │ │ │ -0000ecc0: 2028 3c61 2063 6c61 7373 3d22 6964 7265 (flip< │ │ │ -0000ed20: 2f73 7061 6e3e 3c2f 613e 203c 7370 616e /span> _ │ │ │ -0000ed50: 2929 203d 2667 743b 203c 7370 616e 2063 )) => class_appl │ │ │ -0000ed80: 793c 2f73 7061 6e3e 203c 7370 616e 2063 y flip_Antis │ │ │ -0000edb0: 796d 6d65 7472 6963 3c2f 7370 616e 3e20 ymmetric │ │ │ -0000edc0: 3a20 3c73 7061 6e20 636c 6173 733d 2269 : t │ │ │ -0000ede0: 7970 6563 6c61 7373 5f69 6e73 7461 6e63 ypeclass_instanc │ │ │ -0000edf0: 6573 3c2f 7370 616e 3e2e 3c62 722f 3e0a es.
. │ │ │ -0000ee00: 235b 3c73 7061 6e20 636c 6173 733d 2269 #[g │ │ │ -0000ee20: 6c6f 6261 6c3c 2f73 7061 6e3e 5d3c 6272 lobal]
.Hint │ │ │ -0000ee60: 3c73 7061 6e20 636c 6173 733d 2269 6422 Extern 3 │ │ │ -0000ee90: 2028 3c61 2063 6c61 7373 3d22 6964 7265 (Transitive< │ │ │ -0000ef00: 2f73 7061 6e3e 3c2f 613e 2028 3c61 2063 /span> (flip │ │ │ -0000ef70: 3c2f 613e 203c 7370 616e 2063 6c61 7373 _)) =&g │ │ │ -0000efa0: 743b 203c 7370 616e 2063 6c61 7373 3d22 t; │ │ │ -0000efc0: 636c 6173 735f 6170 706c 793c 2f73 7061 class_apply │ │ │ -0000eff0: 666c 6970 5f54 7261 6e73 6974 6976 653c flip_Transitive< │ │ │ -0000f000: 2f73 7061 6e3e 203a 203c 7370 616e 2063 /span> : typeclass_ │ │ │ -0000f030: 696e 7374 616e 6365 733c 2f73 7061 6e3e instances │ │ │ -0000f040: 2e3c 6272 2f3e 0a23 5b3c 7370 616e 2063 .
.#[global]
.Hint< │ │ │ -0000f0a0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> Extern 3 (Str │ │ │ -0000f140: 6963 744f 7264 6572 3c2f 7370 616e 3e3c ictOrder< │ │ │ -0000f150: 2f61 3e20 283c 6120 636c 6173 733d 2269 /a> (fl │ │ │ -0000f1b0: 6970 3c2f 7370 616e 3e3c 2f61 3e20 3c73 ip _)) => class_a │ │ │ -0000f210: 7070 6c79 3c2f 7370 616e 3e20 3c73 7061 pply flip_St │ │ │ -0000f240: 7269 6374 4f72 6465 723c 2f73 7061 6e3e rictOrder
│ │ │ -0000f250: 203a 203c 7370 616e 2063 6c61 7373 3d22 : │ │ │ -0000f270: 7479 7065 636c 6173 735f 696e 7374 616e typeclass_instan │ │ │ -0000f280: 6365 733c 2f73 7061 6e3e 2e3c 6272 2f3e ces.
│ │ │ -0000f290: 0a23 5b3c 7370 616e 2063 6c61 7373 3d22 .#[ │ │ │ -0000f2b0: 676c 6f62 616c 3c2f 7370 616e 3e5d 3c62 global].Hint │ │ │ -0000f2f0: 203c 7370 616e 2063 6c61 7373 3d22 6964 Extern │ │ │ -0000f320: 3320 283c 6120 636c 6173 733d 2269 6472 3 (PreOrder (flip
_ │ │ │ -0000f420: 3c2f 7370 616e 3e29 2920 3d26 6774 3b20 )) => │ │ │ -0000f430: 3c73 7061 6e20 636c 6173 733d 2269 6422 cla │ │ │ -0000f450: 7373 5f61 7070 6c79 3c2f 7370 616e 3e20 ss_apply │ │ │ -0000f460: 3c73 7061 6e20 636c 6173 733d 2269 6422 fli │ │ │ -0000f480: 705f 5072 654f 7264 6572 3c2f 7370 616e p_PreOrder : typeclass_insta │ │ │ -0000f4c0: 6e63 6573 3c2f 7370 616e 3e2e 3c62 722f nces.
..
.#[global]
.Hin │ │ │ -0000f530: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t
Extern │ │ │ -0000f560: 3c2f 7370 616e 3e20 3420 283c 6120 636c 4 ( │ │ │ -0000f5b0: 3c73 7061 6e20 636c 6173 733d 2269 6422 s │ │ │ -0000f5d0: 7562 7265 6c61 7469 6f6e 3c2f 7370 616e ubrelation ( │ │ │ -0000f640: 666c 6970 3c2f 7370 616e 3e3c 2f61 3e20 flip
│ │ │ -0000f650: 3c73 7061 6e20 636c 6173 733d 2269 6422 _) _) =& │ │ │ -0000f6a0: 6774 3b20 3c62 722f 3e0a 266e 6273 703b gt;
.  │ │ │ -0000f6b0: 266e 6273 703b 3c73 7061 6e20 636c 6173  class_apply @subrelation │ │ │ -0000f760: 5f73 796d 6d65 7472 6963 3c2f 7370 616e _symmetric : typeclass_i │ │ │ -0000f7a0: 6e73 7461 6e63 6573 3c2f 7370 616e 3e2e nstances. │ │ │ -0000f7b0: 3c62 722f 3e0a 0a3c 6272 2f3e 0a3c 7370
..
.Ar │ │ │ -0000f7e0: 6775 6d65 6e74 733c 2f73 7061 6e3e 203c guments
< │ │ │ -0000f7f0: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ -0000f800: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ -0000f810: 732e 5265 6c61 7469 6f6e 436c 6173 7365 s.RelationClasse │ │ │ -0000f820: 732e 6874 6d6c 2369 7272 6566 6c65 7869 s.html#irreflexi │ │ │ -0000f830: 7669 7479 223e 3c73 7061 6e20 636c 6173 vity">irrefl │ │ │ -0000f860: 6578 6976 6974 793c 2f73 7061 6e3e 3c2f exivity {A R │ │ │ -0000f8c0: 3c73 7061 6e20 636c 6173 733d 2269 6422 Irr │ │ │ -0000f8e0: 6566 6c65 7869 7665 3c2f 7370 616e 3e7d eflexive} │ │ │ -0000f8f0: 205b 3c73 7061 6e20 636c 6173 733d 2269 [x │ │ │ -0000f910: 3c2f 7370 616e 3e5d 203c 7370 616e 2063 ] _ : │ │ │ -0000f940: 203c 7370 616e 2063 6c61 7373 3d22 6964 rename.< │ │ │ -0000f970: 6272 2f3e 0a3c 7370 616e 2063 6c61 7373 br/>.Arguments< │ │ │ -0000f9a0: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> sym │ │ │ -0000fa10: 6d65 7472 793c 2f73 7061 6e3e 3c2f 613e metry │ │ │ -0000fa20: 207b 3c73 7061 6e20 636c 6173 733d 2269 {A │ │ │ -0000fa40: 3c2f 7370 616e 3e7d 207b 3c73 7061 6e20 } {R} │ │ │ -0000fa70: 207b 3c73 7061 6e20 636c 6173 733d 2269 {_ │ │ │ -0000fa90: 3c2f 7370 616e 3e7d 205b 3c73 7061 6e20 } [x] │ │ │ -0000fac0: 205b 3c73 7061 6e20 636c 6173 733d 2269 [y │ │ │ -0000fae0: 3c2f 7370 616e 3e5d 203c 7370 616e 2063 ] _.< │ │ │ -0000fb10: 6272 2f3e 0a3c 7370 616e 2063 6c61 7373 br/>.Arguments< │ │ │ -0000fb40: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> as │ │ │ -0000fbb0: 796d 6d65 7472 793c 2f73 7061 6e3e 3c2f ymmetry {A} {R} {_} [x] [y] _ │ │ │ -0000fcb0: 203c 7370 616e 2063 6c61 7373 3d22 6964 _< │ │ │ -0000fcd0: 2f73 7061 6e3e 2e3c 6272 2f3e 0a3c 7370 /span>.
.Ar │ │ │ -0000fd00: 6775 6d65 6e74 733c 2f73 7061 6e3e 203c guments
< │ │ │ -0000fd10: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ -0000fd20: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ -0000fd30: 732e 5265 6c61 7469 6f6e 436c 6173 7365 s.RelationClasse │ │ │ -0000fd40: 732e 6874 6d6c 2374 7261 6e73 6974 6976 s.html#transitiv │ │ │ -0000fd50: 6974 7922 3e3c 7370 616e 2063 6c61 7373 ity">transit │ │ │ -0000fd80: 6976 6974 793c 2f73 7061 6e3e 3c2f 613e ivity
│ │ │ -0000fd90: 207b 3c73 7061 6e20 636c 6173 733d 2269 {A │ │ │ -0000fdb0: 3c2f 7370 616e 3e7d 207b 3c73 7061 6e20 } {R} │ │ │ -0000fde0: 207b 3c73 7061 6e20 636c 6173 733d 2269 {_ │ │ │ -0000fe00: 3c2f 7370 616e 3e7d 205b 3c73 7061 6e20 } [x] │ │ │ -0000fe30: 205b 3c73 7061 6e20 636c 6173 733d 2269 [y │ │ │ -0000fe50: 3c2f 7370 616e 3e5d 205b 3c73 7061 6e20 ] [z] │ │ │ -0000fe80: 203c 7370 616e 2063 6c61 7373 3d22 6964 _< │ │ │ -0000fea0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> _.
.Arguments
Antis │ │ │ -0000ff70: 796d 6d65 7472 6963 3c2f 7370 616e 3e3c ymmetric
< │ │ │ -0000ff80: 2f61 3e20 3c73 7061 6e20 636c 6173 733d /a> A eqA { │ │ │ -0000fff0: 5f3c 2f73 7061 6e3e 7d20 3c73 7061 6e20 _} _. │ │ │ -00010020: 3c62 722f 3e0a 0a3c 6272 2f3e 0a23 5b3c
..
.#[< │ │ │ -00010030: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -00010040: 7469 746c 653d 2276 6172 223e 676c 6f62 title="var">glob │ │ │ -00010050: 616c 3c2f 7370 616e 3e5d 3c62 722f 3e0a al]
. │ │ │ -00010060: 3c73 7061 6e20 636c 6173 733d 2269 6422 Hint Re │ │ │ -000100b0: 736f 6c76 653c 2f73 7061 6e3e 203c 7370 solve irrefl │ │ │ -000100e0: 6578 6976 6974 793c 2f73 7061 6e3e 203a exivity : │ │ │ -000100f0: 203c 7370 616e 2063 6c61 7373 3d22 6964 or │ │ │ -00010110: 643c 2f73 7061 6e3e 2e3c 6272 2f3e 0a0a d.
.. │ │ │ -00010120: 3c62 722f 3e0a 3c73 7061 6e20 636c 6173
.Unset Imp │ │ │ -00010150: 6c69 6369 7420 4172 6775 6d65 6e74 733c licit Arguments< │ │ │ -00010160: 2f73 7061 6e3e 2e3c 6272 2f3e 0a0a 3c62 /span>.
...Ltac │ │ │ -000101a0: 203c 7370 616e 2063 6c61 7373 3d22 6964 so │ │ │ -000101c0: 6c76 655f 7265 6c61 7469 6f6e 3c2f 7370 lve_relation
:=
.&nbs │ │ │ -000101e0: 703b 266e 6273 703b 3c73 7061 6e20 636c p; match goal with< │ │ │ -00010270: 6272 2f3e 0a26 6e62 7370 3b26 6e62 7370 br/>.   │ │ │ -00010280: 3b7c 205b 207c 2d20 3f3c 7370 616e 2063 ;| [ |- ?R ? │ │ │ -000102b0: 3c73 7061 6e20 636c 6173 733d 2269 6422 x ?x ] = │ │ │ -00010300: 2667 743b 203c 7370 616e 2063 6c61 7373 > reflexivity │ │ │ -00010330: 3c2f 7370 616e 3e3c 6272 2f3e 0a26 6e62
.&nb │ │ │ -00010340: 7370 3b26 6e62 7370 3b7c 205b 203c 7370 sp; | [ H : ?R ?x ?y |- ?R ?y ?x
] => symmet │ │ │ -00010490: 7279 3c2f 7370 616e 3e20 3b20 3c73 7061 ry ; exac │ │ │ -000104c0: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t
H.   │ │ │ -00010500: 3c73 7061 6e20 636c 6173 733d 2269 6422 end.
..
.#[global]
.Hin │ │ │ -00010590: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t
Extern │ │ │ -000105c0: 3c2f 7370 616e 3e20 3420 3d26 6774 3b20 4 => │ │ │ -000105d0: 3c73 7061 6e20 636c 6173 733d 2269 6422 sol │ │ │ -000105f0: 7665 5f72 656c 6174 696f 6e3c 2f73 7061 ve_relation : relations.
..
. │ │ │ -00010640: 3c2f 6469 763e 0a0a 3c64 6976 2063 6c61
...< │ │ │ -000106f0: 6469 7620 636c 6173 733d 2263 6f64 6522 div class="code" │ │ │ -00010700: 3e0a 0a3c 6272 2f3e 0a3c 7370 616e 2063 >..
.Ltac reduce_hyp
H :=
.  < │ │ │ -000107a0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -000107b0: 7469 746c 653d 226b 6579 776f 7264 223e title="keyword"> │ │ │ -000107c0: 6d61 7463 683c 2f73 7061 6e3e 203c 7370 match ty │ │ │ -000107f0: 7065 3c2f 7370 616e 3e20 3c73 7061 6e20 pe of
H with │ │ │ -00010870: 3c2f 7370 616e 3e3c 6272 2f3e 0a26 6e62
.&nb │ │ │ -00010880: 7370 3b26 6e62 7370 3b26 6e62 7370 3b26 sp;  & │ │ │ -00010890: 6e62 7370 3b7c 203c 7370 616e 2063 6c61 nbsp;| context< │ │ │ -000108c0: 2f73 7061 6e3e 205b 203c 7370 616e 2063 /span> [ _ < │ │ │ -000108f0: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ -00010900: 6872 6566 3d22 436f 712e 496e 6974 2e4c href="Coq.Init.L │ │ │ -00010910: 6f67 6963 2e68 746d 6c23 3a3a 7479 7065 ogic.html#::type │ │ │ -00010920: 5f73 636f 7065 3a78 5f27 266c 743b 2d26 _scope:x_'<-& │ │ │ -00010930: 6774 3b27 5f78 223e 3c73 7061 6e20 636c gt;'_x"><-& │ │ │ -00010960: 6774 3b3c 2f73 7061 6e3e 3c2f 613e 203c gt; < │ │ │ -00010970: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -00010980: 7469 746c 653d 2276 6172 223e 5f3c 2f73 title="var">_
] => fai │ │ │ -000109c0: 6c3c 2f73 7061 6e3e 2031 3c62 722f 3e0a l 1
. │ │ │ -000109d0: 266e 6273 703b 266e 6273 703b 266e 6273   &nbs │ │ │ -000109e0: 703b 266e 6273 703b 7c20 3c73 7061 6e20 p; | _ │ │ │ -00010a10: 3d26 6774 3b20 3c73 7061 6e20 636c 6173 => red │ │ │ -00010a40: 203c 7370 616e 2063 6c61 7373 3d22 6964 in H │ │ │ -00010a90: 203b 203c 7370 616e 2063 6c61 7373 3d22 ; try reduc │ │ │ -00010ae0: 655f 6879 703c 2f73 7061 6e3e 203c 7370 e_hyp H
. &n │ │ │ -00010b20: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;end. │ │ │ -00010b50: 3c62 722f 3e0a 0a3c 6272 2f3e 0a3c 7370
..
.Lt │ │ │ -00010b80: 6163 3c2f 7370 616e 3e20 3c73 7061 6e20 ac reduce_go │ │ │ -00010bb0: 616c 3c2f 7370 616e 3e20 3a3d 3c62 722f al :=
.  m │ │ │ -00010bf0: 6174 6368 3c2f 7370 616e 3e20 3c73 7061 atch goa │ │ │ -00010c20: 6c3c 2f73 7061 6e3e 203c 7370 616e 2063 l with
.  │ │ │ -00010c60: 3b26 6e62 7370 3b26 6e62 7370 3b26 6e62 ;  &nb │ │ │ -00010c70: 7370 3b7c 205b 207c 2d20 3c73 7061 6e20 sp;| [ |- _ │ │ │ -00010ca0: 3c61 2063 6c61 7373 3d22 6964 7265 6622 <- │ │ │ -00010d10: 2667 743b 3c2f 7370 616e 3e3c 2f61 3e20 > │ │ │ -00010d20: 3c73 7061 6e20 636c 6173 733d 2269 6422 _ ] => fa │ │ │ -00010d70: 696c 3c2f 7370 616e 3e20 313c 6272 2f3e il 1
│ │ │ -00010d80: 0a26 6e62 7370 3b26 6e62 7370 3b26 6e62 .  &nb │ │ │ -00010d90: 7370 3b26 6e62 7370 3b7c 203c 7370 616e sp; | _ │ │ │ -00010dc0: 203d 2667 743b 203c 7370 616e 2063 6c61 => red ; intros ; try < │ │ │ -00010e50: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -00010e60: 7469 746c 653d 2276 6172 223e 7265 6475 title="var">redu │ │ │ -00010e70: 6365 5f67 6f61 6c3c 2f73 7061 6e3e 3c62 ce_goal
.   │ │ │ -00010e90: 3c73 7061 6e20 636c 6173 733d 2269 6422 end.
..
.Tactic │ │ │ -00010ef0: 204e 6f74 6174 696f 6e3c 2f73 7061 6e3e Notation │ │ │ -00010f00: 2022 7265 6475 6365 2220 2269 6e22 203c "reduce" "in" < │ │ │ -00010f10: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -00010f20: 7469 746c 653d 2276 6172 223e 6879 703c title="var">hyp< │ │ │ -00010f30: 2f73 7061 6e3e 283c 7370 616e 2063 6c61 /span>(Hid) │ │ │ -00010f60: 3a3d 203c 7370 616e 2063 6c61 7373 3d22 := │ │ │ -00010f80: 7265 6475 6365 5f68 7970 3c2f 7370 616e reduce_hyp H │ │ │ -00010fb0: 6964 3c2f 7370 616e 3e2e 3c62 722f 3e0a id.
. │ │ │ -00010fc0: 0a3c 6272 2f3e 0a3c 7370 616e 2063 6c61 .
.Ltac
reduce : │ │ │ -00011020: 3d20 3c73 7061 6e20 636c 6173 733d 2269 = r │ │ │ -00011040: 6564 7563 655f 676f 616c 3c2f 7370 616e educe_goal.
..
.< │ │ │ -00011060: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -00011070: 7469 746c 653d 226b 6579 776f 7264 223e title="keyword"> │ │ │ -00011080: 5461 6374 6963 204e 6f74 6174 696f 6e3c Tactic Notation< │ │ │ -00011090: 2f73 7061 6e3e 2022 6170 706c 7922 2022 /span> "apply" " │ │ │ -000110a0: 2a22 203c 7370 616e 2063 6c61 7373 3d22 *" constr(t │ │ │ -000110f0: 3c2f 7370 616e 3e29 203a 3d3c 6272 2f3e ) :=
│ │ │ -00011100: 0a26 6e62 7370 3b26 6e62 7370 3b3c 7370 .  fir │ │ │ -00011130: 7374 3c2f 7370 616e 3e20 5b20 3c73 7061 st [ refi │ │ │ -00011160: 6e65 3c2f 7370 616e 3e20 3c73 7061 6e20 ne t │ │ │ -00011190: 7c20 3c73 7061 6e20 636c 6173 733d 2269 | refine │ │ │ -000111c0: 283c 7370 616e 2063 6c61 7373 3d22 6964 (t< │ │ │ -000111e0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> _) | │ │ │ -00011210: 3c73 7061 6e20 636c 6173 733d 2269 6422 │ │ │ -00011230: 7265 6669 6e65 3c2f 7370 616e 3e20 283c refine (< │ │ │ -00011240: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -00011250: 7469 746c 653d 2276 6172 223e 743c 2f73 title="var">t
_ _ │ │ │ -000112b0: 2920 7c20 3c73 7061 6e20 636c 6173 733d ) | refine ( │ │ │ -00011300: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t _ < │ │ │ -00011330: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -00011340: 7469 746c 653d 2276 6172 223e 5f3c 2f73 title="var">_
_) | re │ │ │ -000113a0: 6669 6e65 3c2f 7370 616e 3e20 283c 7370 fine (t │ │ │ -000113f0: 5f3c 2f73 7061 6e3e 203c 7370 616e 2063 _ _ < │ │ │ -00011420: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -00011430: 7469 746c 653d 2276 6172 223e 5f3c 2f73 title="var">_ _) |
.  & │ │ │ -00011480: 6e62 7370 3b26 6e62 7370 3b3c 7370 616e nbsp; refin │ │ │ -000114b0: 653c 2f73 7061 6e3e 2028 3c73 7061 6e20 e (t │ │ │ -000114e0: 3c73 7061 6e20 636c 6173 733d 2269 6422 _ _ _ _ │ │ │ -00011570: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c _) | │ │ │ -000115a0: 203c 7370 616e 2063 6c61 7373 3d22 6964 refine ( │ │ │ -000115d0: 3c73 7061 6e20 636c 6173 733d 2269 6422 t _ _ _ │ │ │ -00011660: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c _ _
_) | ref │ │ │ -00011700: 696e 653c 2f73 7061 6e3e 2028 3c73 7061 ine (t _ │ │ │ -00011750: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c _ _ _ _ │ │ │ -000117f0: 3c73 7061 6e20 636c 6173 733d 2269 6422 _ _) ].< │ │ │ -00011840: 6272 2f3e 0a0a 3c62 722f 3e0a 3c73 7061 br/>..
.Lta │ │ │ -00011870: 633c 2f73 7061 6e3e 203c 7370 616e 2063 c
simpl_rela │ │ │ -000118a0: 7469 6f6e 3c2f 7370 616e 3e20 3a3d 3c62 tion :=.   │ │ │ -000118c0: 3c73 7061 6e20 636c 6173 733d 2269 6422 │ │ │ -000118e0: 756e 666f 6c64 3c2f 7370 616e 3e20 3c61 unfold flip, impl │ │ │ -000119c0: 2c20 3c61 2063 6c61 7373 3d22 6964 7265 , arro │ │ │ -00011a20: 773c 2f73 7061 6e3e 3c2f 613e 203b 203c w ; < │ │ │ -00011a30: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -00011a40: 7469 746c 653d 2274 6163 7469 6322 3e74 title="tactic">t │ │ │ -00011a50: 7279 3c2f 7370 616e 3e20 3c73 7061 6e20 ry reduce
; program_s │ │ │ -00011ab0: 696d 706c 3c2f 7370 616e 3e20 3b3c 6272 impl ;
.  & │ │ │ -00011ad0: 6e62 7370 3b26 6e62 7370 3b3c 7370 616e nbsp; try ( solve
[ dintuition auto with < │ │ │ -00011bc0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -00011bd0: 7469 746c 653d 2276 6172 223e 7265 6c61 title="var">rela │ │ │ -00011be0: 7469 6f6e 733c 2f73 7061 6e3e 205d 292e tions ]). │ │ │ -00011bf0: 3c62 722f 3e0a 0a3c 6272 2f3e 0a3c 7370
..
.Lo │ │ │ -00011c20: 6361 6c20 4f62 6c69 6761 7469 6f6e 3c2f cal Obligation Tactic
:= try solve │ │ │ -00011cc0: 5b20 3c73 7061 6e20 636c 6173 733d 2269 [ s │ │ │ -00011ce0: 696d 706c 5f72 656c 6174 696f 6e3c 2f73 impl_relation
].
...
..
.Lo │ │ │ -00011d20: 6769 6361 6c20 696d 706c 6963 6174 696f gical implicatio │ │ │ -00011d30: 6e2e 200a 3c2f 6469 763e 0a3c 6469 7620 n. .
.
..< │ │ │ -00011d50: 6272 2f3e 0a23 5b3c 7370 616e 2063 6c61 br/>.#[global]
.Program Instance
impl_Reflexiv │ │ │ -00011e50: 653c 2f73 7061 6e3e 3c2f 613e 203a 203c e : < │ │ │ -00011e60: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ -00011e70: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ -00011e80: 732e 5265 6c61 7469 6f6e 436c 6173 7365 s.RelationClasse │ │ │ -00011e90: 732e 6874 6d6c 2352 6566 6c65 7869 7665 s.html#Reflexive │ │ │ -00011ea0: 223e 3c73 7061 6e20 636c 6173 733d 2269 ">Reflexive i │ │ │ -00011f30: 6d70 6c3c 2f73 7061 6e3e 3c2f 613e 2e3c mpl.< │ │ │ -00011f40: 6272 2f3e 0a23 5b3c 7370 616e 2063 6c61 br/>.#[global]
.Program Instance
impl_Transi │ │ │ -00012040: 7469 7665 3c2f 7370 616e 3e3c 2f61 3e20 tive │ │ │ -00012050: 3a20 3c61 2063 6c61 7373 3d22 6964 7265 : Transitive< │ │ │ -000120c0: 2f73 7061 6e3e 3c2f 613e 203c 6120 636c /span> │ │ │ -00012100: 3c73 7061 6e20 636c 6173 733d 2269 6422 impl< │ │ │ -00012130: 2f61 3e2e 3c62 722f 3e0a 0a3c 6272 2f3e /a>.
..
│ │ │ -00012140: 0a3c 2f64 6976 3e0a 0a3c 6469 7620 636c .
..
.Logic │ │ │ -00012160: 616c 2065 7175 6976 616c 656e 6365 2e20 al equivalence. │ │ │ -00012170: 0a3c 2f64 6976 3e0a 3c64 6976 2063 6c61 .
.
..
.#[global]< │ │ │ -000121c0: 6272 2f3e 0a3c 7370 616e 2063 6c61 7373 br/>.Instance
│ │ │ -00012230: 3c73 7061 6e20 636c 6173 733d 2269 6422 iff_Reflexive< │ │ │ -00012260: 2f73 7061 6e3e 3c2f 613e 203a 203c 6120 /span> : │ │ │ -000122b0: 3c73 7061 6e20 636c 6173 733d 2269 6422 R │ │ │ -000122d0: 6566 6c65 7869 7665 3c2f 7370 616e 3e3c eflexive< │ │ │ -000122e0: 2f61 3e20 3c61 2063 6c61 7373 3d22 6964 /a> iff := < │ │ │ -00012380: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -00012390: 7469 746c 653d 226c 656d 6d61 223e 6966 title="lemma">if │ │ │ -000123a0: 665f 7265 666c 3c2f 7370 616e 3e3c 2f61 f_refl.
.#[global
]
.Inst │ │ │ -00012410: 616e 6365 3c2f 7370 616e 3e20 3c61 2069 ance iff_Symm │ │ │ -00012480: 6574 7269 633c 2f73 7061 6e3e 3c2f 613e etric │ │ │ -00012490: 203a 203c 6120 636c 6173 733d 2269 6472 : Symmetric if │ │ │ -00012560: 663c 2f73 7061 6e3e 3c2f 613e 203a 3d20 f := │ │ │ -00012570: 3c61 2063 6c61 7373 3d22 6964 7265 6622 iff_sym.
.#[globa │ │ │ -00012600: 6c3c 2f73 7061 6e3e 5d3c 6272 2f3e 0a3c l]
.< │ │ │ -00012610: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -00012620: 7469 746c 653d 226b 6579 776f 7264 223e title="keyword"> │ │ │ -00012630: 496e 7374 616e 6365 3c2f 7370 616e 3e20 Instance │ │ │ -00012640: 3c61 2069 643d 2269 6666 5f54 7261 6e73 if │ │ │ -000126a0: 665f 5472 616e 7369 7469 7665 3c2f 7370 f_Transitive : Tra │ │ │ -00012720: 6e73 6974 6976 653c 2f73 7061 6e3e 3c2f nsitive iff := < │ │ │ -000127d0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -000127e0: 7469 746c 653d 226c 656d 6d61 223e 6966 title="lemma">if │ │ │ -000127f0: 665f 7472 616e 733c 2f73 7061 6e3e 3c2f f_trans.
..
. │ │ │ -00012810: 3c2f 6469 763e 0a0a 3c64 6976 2063 6c61
..
.Logica │ │ │ -00012830: 6c20 6571 7569 7661 6c65 6e63 6520 3c73 l equivalence iff is an equi │ │ │ -00012890: 7661 6c65 6e63 6520 7265 6c61 7469 6f6e valence relation │ │ │ -000128a0: 2e20 0a3c 2f64 6976 3e0a 3c64 6976 2063 . .
.
...#[global │ │ │ -000128f0: 5d3c 6272 2f3e 0a3c 7370 616e 2063 6c61 ]
.Program Instance
iff_equivale │ │ │ -000129c0: 6e63 653c 2f73 7061 6e3e 3c2f 613e 203a nce : │ │ │ -000129d0: 203c 6120 636c 6173 733d 2269 6472 6566 Equivalence │ │ │ -00012a40: 3c2f 7370 616e 3e3c 2f61 3e20 3c61 2063 │ │ │ -00012aa0: 6966 663c 2f73 7061 6e3e 3c2f 613e 2e3c iff.< │ │ │ -00012ab0: 6272 2f3e 0a0a 3c62 722f 3e0a 3c2f 6469 br/>..
...
.We now dev │ │ │ -00012ae0: 656c 6f70 2061 2067 656e 6572 616c 697a elop a generaliz │ │ │ -00012af0: 6174 696f 6e20 6f66 2072 6573 756c 7473 ation of results │ │ │ -00012b00: 206f 6e20 7265 6c61 7469 6f6e 7320 666f on relations fo │ │ │ -00012b10: 7220 6172 6269 7472 6172 7920 7072 6564 r arbitrary pred │ │ │ -00012b20: 6963 6174 6573 2e0a 2020 2054 6865 2072 icates.. The r │ │ │ -00012b30: 6573 756c 7469 6e67 2074 6865 6f72 7920 esulting theory │ │ │ -00012b40: 6361 6e20 6265 2061 7070 6c69 6564 2074 can be applied t │ │ │ -00012b50: 6f20 686f 6d6f 6765 6e65 6f75 7320 6269 o homogeneous bi │ │ │ -00012b60: 6e61 7279 2072 656c 6174 696f 6e73 2062 nary relations b │ │ │ -00012b70: 7574 2061 6c73 6f20 746f 0a20 2020 6172 ut also to. ar │ │ │ -00012b80: 6269 7472 6172 7920 6e2d 6172 7920 7072 bitrary n-ary pr │ │ │ -00012b90: 6564 6963 6174 6573 2e20 0a3c 2f64 6976 edicates. .
.
..
.Loc │ │ │ -00012be0: 616c 204f 7065 6e3c 2f73 7061 6e3e 203c al Open < │ │ │ -00012bf0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -00012c00: 7469 746c 653d 226b 6579 776f 7264 223e title="keyword"> │ │ │ -00012c10: 5363 6f70 653c 2f73 7061 6e3e 203c 7370 Scope list_s │ │ │ -00012c40: 636f 7065 3c2f 7370 616e 3e2e 3c62 722f cope.
..
.
. │ │ │ -00012c60: 0a3c 6469 7620 636c 6173 733d 2264 6f63 .
.A compact rep │ │ │ -00012c80: 7265 7365 6e74 6174 696f 6e20 6f66 206e resentation of n │ │ │ -00012c90: 6f6e 2d64 6570 656e 6465 6e74 2061 7269 on-dependent ari │ │ │ -00012ca0: 7469 6573 2c20 7769 7468 2074 6865 2063 ties, with the c │ │ │ -00012cb0: 6f64 6f6d 6169 6e20 7369 6e67 6c65 642d odomain singled- │ │ │ -00012cc0: 6f75 742e 200a 3c2f 6469 763e 0a3c 6469 out. .
.. │ │ │ -00012ce0: 0a3c 6272 2f3e 0a3c 7370 616e 2063 6c61 .
.Inductiv │ │ │ -00012d10: 653c 2f73 7061 6e3e 203c 6120 6964 3d22 e Tlist │ │ │ -00012e00: 3c2f 7370 616e 3e3c 2f73 7061 6e3e 3c2f │ │ │ -00012e20: 203a 203c 7370 616e 2063 6c61 7373 3d22 : Type │ │ │ -00012e50: 3a3d 203c 6120 6964 3d22 546e 696c 2220 := │ │ │ -00012ea0: 546e 696c 3c2f 7370 616e 3e3c 2f61 3e20 Tnil │ │ │ -00012eb0: 3a20 3c61 2063 6c61 7373 3d22 6964 7265 : Tlist
| Tcons< │ │ │ -00012f80: 2f73 7061 6e3e 3c2f 613e 203a 203c 7370 /span> : Ty │ │ │ -00012fb0: 7065 3c2f 7370 616e 3e20 3c61 2063 6c61 pe < │ │ │ -00013000: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -00013010: 7469 746c 653d 226e 6f74 6174 696f 6e22 title="notation" │ │ │ -00013020: 3e2d 2667 743b 3c2f 7370 616e 3e3c 2f61 >-> Tlist
│ │ │ -00013110: 2d26 6774 3b3c 2f73 7061 6e3e 3c2f 613e -> │ │ │ -00013120: 203c 6120 636c 6173 733d 2269 6472 6566 Tlist.
.L │ │ │ -000131c0: 6f63 616c 2049 6e66 6978 3c2f 7370 616e ocal Infix " │ │ │ -00013230: 3c2f 7370 616e 3e3c 2f61 3e3a 3a22 203a ::" : │ │ │ -00013240: 3d20 3c61 2063 6c61 7373 3d22 6964 7265 = Tcons.
...Fixpoint
arrows (l : │ │ │ -000133b0: 203c 6120 636c 6173 733d 2269 6472 6566 │ │ │ -000133f0: 3c73 7061 6e20 636c 6173 733d 2269 6422 Tlist< │ │ │ -00013420: 2f61 3e29 2028 3c61 2069 643d 2272 3a31 /a>) ( │ │ │ -00013450: 3c73 7061 6e20 636c 6173 733d 2269 6422 │ │ │ -00013470: 723c 2f73 7061 6e3e 3c2f 613e 203a 203c r : < │ │ │ -00013480: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -00013490: 7469 746c 653d 226b 6579 776f 7264 223e title="keyword"> │ │ │ -000134a0: 5479 7065 3c2f 7370 616e 3e29 203a 203c Type) : < │ │ │ -000134b0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -000134c0: 7469 746c 653d 226b 6579 776f 7264 223e title="keyword"> │ │ │ -000134d0: 5479 7065 3c2f 7370 616e 3e20 3a3d 3c62 Type :=.   │ │ │ -000134f0: 3c73 7061 6e20 636c 6173 733d 2269 6422 match l │ │ │ -00013580: 3c2f 7370 616e 3e3c 2f61 3e20 3c73 7061 wit │ │ │ -000135b0: 683c 2f73 7061 6e3e 3c62 722f 3e0a 266e h
.&n │ │ │ -000135c0: 6273 703b 266e 6273 703b 266e 6273 703b bsp;   │ │ │ -000135d0: 266e 6273 703b 7c20 3c61 2063 6c61 7373  | Tnil< │ │ │ -00013640: 2f73 7061 6e3e 3c2f 613e 203d 2667 743b /span> => │ │ │ -00013650: 203c 6120 636c 6173 733d 2269 6472 6566 │ │ │ -00013690: 3c73 7061 6e20 636c 6173 733d 2269 6422 r.   │ │ │ -000136d0: 266e 6273 703b 266e 6273 703b 7c20 3c73   | A :: l' │ │ │ -000137a0: 3d26 6774 3b20 3c73 7061 6e20 636c 6173 => A ->< │ │ │ -00013840: 2f61 3e20 3c61 2063 6c61 7373 3d22 6964 /a> arro │ │ │ -000138b0: 7773 3c2f 7370 616e 3e3c 2f61 3e20 3c73 ws l' r
. &n │ │ │ -00013960: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;end. │ │ │ -00013990: 3c62 722f 3e0a 0a3c 6272 2f3e 0a3c 2f64
..
...
.We can de │ │ │ -000139c0: 6669 6e65 2061 6262 7265 7669 6174 696f fine abbreviatio │ │ │ -000139d0: 6e73 2066 6f72 206f 7065 7261 7469 6f6e ns for operation │ │ │ -000139e0: 2061 6e64 2072 656c 6174 696f 6e20 7479 and relation ty │ │ │ -000139f0: 7065 7320 6261 7365 6420 6f6e 203c 7370 pes based on arrows │ │ │ -00013a40: 3c2f 7370 616e 3e2e 200a 3c2f 6469 763e . .
│ │ │ -00013a50: 0a3c 6469 7620 636c 6173 733d 2263 6f64 .
..
.Defi │ │ │ -00013a90: 6e69 7469 6f6e 3c2f 7370 616e 3e20 3c61 nition
│ │ │ -00013b00: 756e 6172 795f 6f70 6572 6174 696f 6e3c unary_operation< │ │ │ -00013b10: 2f73 7061 6e3e 3c2f 613e 203c 6120 6964 /span> A := arrows< │ │ │ -00013be0: 2f73 7061 6e3e 3c2f 613e 2028 3c61 2063 /span> (A │ │ │ -00013cc0: 3a3a 3c2f 7370 616e 3e3c 2f61 3e3c 6120 :: │ │ │ -00013d30: 546e 696c 3c2f 7370 616e 3e3c 2f61 3e29 Tnil) │ │ │ -00013d40: 203c 6120 636c 6173 733d 2269 6472 6566 │ │ │ -00013d80: 3c73 7061 6e20 636c 6173 733d 2269 6422 A.< │ │ │ -00013db0: 6272 2f3e 0a3c 7370 616e 2063 6c61 7373 br/>.Definition │ │ │ -00013de0: 3c2f 7370 616e 3e20 3c61 2069 643d 2262 bina │ │ │ -00013e50: 7279 5f6f 7065 7261 7469 6f6e 3c2f 7370 ry_operation A : │ │ │ -00013ec0: 3d20 3c61 2063 6c61 7373 3d22 6964 7265 = arrows (A::< │ │ │ -00014010: 2f73 7061 6e3e 3c2f 613e 3c61 2063 6c61 /span>A:: │ │ │ -000140f0: 3c2f 7370 616e 3e3c 2f61 3e3c 6120 636c Tn │ │ │ -00014160: 696c 3c2f 7370 616e 3e3c 2f61 3e29 203c il) < │ │ │ -00014170: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ -00014180: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ -00014190: 732e 5265 6c61 7469 6f6e 436c 6173 7365 s.RelationClasse │ │ │ -000141a0: 732e 6874 6d6c 2341 3a31 3139 223e 3c73 s.html#A:119"> │ │ │ -000141d0: 413c 2f73 7061 6e3e 3c2f 613e 2e3c 6272 A.
.Definition tern │ │ │ -00014280: 6172 795f 6f70 6572 6174 696f 6e3c 2f73 ary_operation
A │ │ │ -000142f0: 3a3d 203c 6120 636c 6173 733d 2269 6472 := arrows
(A:: │ │ │ -00014440: 3c2f 7370 616e 3e3c 2f61 3e3c 6120 636c A
: │ │ │ -00014520: 3a3c 2f73 7061 6e3e 3c2f 613e 3c61 2063 :A │ │ │ -00014600: 3a3a 3c2f 7370 616e 3e3c 2f61 3e3c 6120 :: │ │ │ -00014670: 546e 696c 3c2f 7370 616e 3e3c 2f61 3e29 Tnil) │ │ │ -00014680: 203c 6120 636c 6173 733d 2269 6472 6566 │ │ │ -000146c0: 3c73 7061 6e20 636c 6173 733d 2269 6422 A.< │ │ │ -000146f0: 6272 2f3e 0a0a 3c62 722f 3e0a 3c2f 6469 br/>..
...
.We define │ │ │ -00014720: 6e2d 6172 7920 3c73 7061 6e20 636c 6173 n-ary < │ │ │ -00014740: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -00014750: 7469 746c 653d 2276 6172 223e 7072 6564 title="var">pred │ │ │ -00014760: 6963 6174 653c 2f73 7061 6e3e 3c2f 7370 icates as function │ │ │ -00014780: 7320 696e 746f 203c 7370 616e 2063 6c61 s into │ │ │ -000147a0: 3c73 7061 6e20 636c 6173 733d 2269 6422 Prop. .
.. │ │ │ -000147f0: 0a3c 6272 2f3e 0a3c 7370 616e 2063 6c61 .
.Notation │ │ │ -00014820: 3c2f 7370 616e 3e20 3c61 2069 643d 2270 │ │ │ -00014880: 7072 6564 6963 6174 653c 2f73 7061 6e3e predicate │ │ │ -00014890: 3c2f 613e 203c 7370 616e 2063 6c61 7373 l := (< │ │ │ -000148c0: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ -000148d0: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ -000148e0: 732e 5265 6c61 7469 6f6e 436c 6173 7365 s.RelationClasse │ │ │ -000148f0: 732e 6874 6d6c 2361 7272 6f77 7322 3e3c s.html#arrows">< │ │ │ -00014900: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -00014910: 7469 746c 653d 2264 6566 696e 6974 696f title="definitio │ │ │ -00014920: 6e22 3e61 7272 6f77 733c 2f73 7061 6e3e n">arrows │ │ │ -00014930: 3c2f 613e 203c 7370 616e 2063 6c61 7373 l Prop │ │ │ -00014980: 3c2f 7370 616e 3e29 2e3c 6272 2f3e 0a0a ).
.. │ │ │ -00014990: 3c62 722f 3e0a 3c2f 6469 763e 0a0a 3c64
.
... │ │ │ -000149b0: 556e 6172 7920 7072 6564 6963 6174 6573 Unary predicates │ │ │ -000149c0: 2c20 6f72 2073 6574 732e 200a 3c2f 6469 , or sets. .... │ │ │ -00014ce0: 3c64 6976 2063 6c61 7373 3d22 646f 6322
.Homogeneous bi │ │ │ -00014d00: 6e61 7279 2072 656c 6174 696f 6e73 2c20 nary relations, │ │ │ -00014d10: 6571 7569 7661 6c65 6e74 2074 6f20 3c73 equivalent to relation A │ │ │ -00014db0: 2e20 0a3c 2f64 6976 3e0a 3c64 6976 2063 . .
.
...Definition< │ │ │ -00014e00: 2f73 7061 6e3e 203c 6120 6964 3d22 6269 /span> binary_ │ │ │ -00014e70: 7265 6c61 7469 6f6e 3c2f 7370 616e 3e3c relation< │ │ │ -00014e80: 2f61 3e20 3c61 2069 643d 2241 3a31 3232 /a> A< │ │ │ -00014ed0: 2f73 7061 6e3e 3c2f 613e 203a 3d20 3c61 /span> := predicate │ │ │ -00014f50: 3c2f 7370 616e 3e3c 2f61 3e20 283c 6120 (A< │ │ │ -00014fc0: 2f73 7061 6e3e 3c2f 613e 3c61 2063 6c61 /span>< │ │ │ -00015010: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -00015020: 7469 746c 653d 226e 6f74 6174 696f 6e22 title="notation" │ │ │ -00015030: 3e3a 3a3c 2f73 7061 6e3e 3c2f 613e 3c61 >::A │ │ │ -000150a0: 3c2f 7370 616e 3e3c 2f61 3e3c 6120 636c │ │ │ -000150f0: 3c73 7061 6e20 636c 6173 733d 2269 6422 ::< │ │ │ -00015120: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ -00015130: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ -00015140: 732e 5265 6c61 7469 6f6e 436c 6173 7365 s.RelationClasse │ │ │ -00015150: 732e 6874 6d6c 2354 6e69 6c22 3e3c 7370 s.html#Tnil">Tnil).
..
. │ │ │ -000151a0: 3c2f 6469 763e 0a0a 3c64 6976 2063 6c61
..
.We can │ │ │ -000151c0: 2063 6c6f 7365 2061 2070 7265 6469 6361 close a predica │ │ │ -000151d0: 7465 2062 7920 756e 6976 6572 7361 6c20 te by universal │ │ │ -000151e0: 6f72 2065 7869 7374 656e 7469 616c 2071 or existential q │ │ │ -000151f0: 7561 6e74 6966 6963 6174 696f 6e2e 200a uantification. . │ │ │ -00015200: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
..
│ │ │ -00015220: 0a3c 7370 616e 2063 6c61 7373 3d22 6964 .Fixpoint │ │ │ -000152b0: 7072 6564 6963 6174 655f 616c 6c3c 2f73 predicate_all
(l │ │ │ -00015320: 203a 203c 6120 636c 6173 733d 2269 6472 : Tlist) : predicate l │ │ │ -00015480: 3c2f 613e 203c 6120 636c 6173 733d 2269 -> │ │ │ -000154f0: 3b3c 2f73 7061 6e3e 3c2f 613e 203c 7370 ; Pr │ │ │ -00015520: 6f70 3c2f 7370 616e 3e20 3a3d 3c62 722f op :=
.  m │ │ │ -00015560: 6174 6368 3c2f 7370 616e 3e20 3c61 2063 atch l with< │ │ │ -00015600: 2f73 7061 6e3e 3c62 722f 3e0a 266e 6273 /span>
.&nbs │ │ │ -00015610: 703b 266e 6273 703b 266e 6273 703b 266e p;  &n │ │ │ -00015620: 6273 703b 7c20 3c61 2063 6c61 7373 3d22 bsp;| Tnil
=> < │ │ │ -000156a0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -000156b0: 7469 746c 653d 226b 6579 776f 7264 223e title="keyword"> │ │ │ -000156c0: 6675 6e3c 2f73 7061 6e3e 203c 6120 6964 fun f => f
.  │ │ │ -000157a0: 3b26 6e62 7370 3b26 6e62 7370 3b26 6e62 ;  &nb │ │ │ -000157b0: 7370 3b7c 203c 7370 616e 2063 6c61 7373 sp;| A │ │ │ -00015820: 3c73 7061 6e20 636c 6173 733d 2269 6422 :: │ │ │ -00015850: 3c73 7061 6e20 636c 6173 733d 2269 6422 tl< │ │ │ -00015870: 2f73 7061 6e3e 203d 2667 743b 203c 7370 /span> => fu │ │ │ -000158a0: 6e3c 2f73 7061 6e3e 203c 6120 6964 3d22 n f │ │ │ -00015900: 3d26 6774 3b20 3c73 7061 6e20 636c 6173 => forall
< │ │ │ -00015960: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -00015970: 7469 746c 653d 2262 696e 6465 7222 3e78 title="binder">x │ │ │ -00015980: 3c2f 7370 616e 3e3c 2f61 3e20 3a20 3c73 : A, │ │ │ -00015a00: 3c73 7061 6e20 636c 6173 733d 2269 6422 predicate_al │ │ │ -00015a30: 6c3c 2f73 7061 6e3e 3c2f 613e 203c 7370 l tl (f x │ │ │ -00015b40: 293c 6272 2f3e 0a26 6e62 7370 3b26 6e62 )
. &nb │ │ │ -00015b50: 7370 3b3c 7370 616e 2063 6c61 7373 3d22 sp;end.< │ │ │ -00015b80: 6272 2f3e 0a0a 3c62 722f 3e0a 3c73 7061 br/>..
.Fix │ │ │ -00015bb0: 706f 696e 743c 2f73 7061 6e3e 203c 6120 point predicate_exist │ │ │ -00015c30: 733c 2f73 7061 6e3e 3c2f 613e 2028 3c61 s (l │ │ │ -00015c90: 3c2f 613e 203a 203c 6120 636c 6173 733d : Tlist) : │ │ │ -00015d50: 3c73 7061 6e20 636c 6173 733d 2269 6422 predicate< │ │ │ -00015d80: 2f73 7061 6e3e 3c2f 613e 203c 6120 636c /span> l
│ │ │ -00015e60: 2d26 6774 3b3c 2f73 7061 6e3e 3c2f 613e -> │ │ │ -00015e70: 203c 7370 616e 2063 6c61 7373 3d22 6964 Prop := │ │ │ -00015ea0: 3c62 722f 3e0a 266e 6273 703b 266e 6273
. &nbs │ │ │ -00015eb0: 703b 3c73 7061 6e20 636c 6173 733d 2269 p;match │ │ │ -00015ee0: 3c61 2063 6c61 7373 3d22 6964 7265 6622 < │ │ │ -00015f20: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -00015f30: 7469 746c 653d 2276 6172 6961 626c 6522 title="variable" │ │ │ -00015f40: 3e6c 3c2f 7370 616e 3e3c 2f61 3e20 3c73 >l w │ │ │ -00015f70: 6974 683c 2f73 7061 6e3e 3c62 722f 3e0a ith
. │ │ │ -00015f80: 266e 6273 703b 266e 6273 703b 266e 6273   &nbs │ │ │ -00015f90: 703b 266e 6273 703b 7c20 3c61 2063 6c61 p; | Tni │ │ │ -00016000: 6c3c 2f73 7061 6e3e 3c2f 613e 203d 2667 l =&g │ │ │ -00016010: 743b 203c 7370 616e 2063 6c61 7373 3d22 t; fun < │ │ │ -00016040: 6120 6964 3d22 663a 3133 3222 2063 6c61 a id="f:132" cla │ │ │ -00016050: 7373 3d22 6964 7265 6622 2068 7265 663d ss="idref" href= │ │ │ -00016060: 2223 663a 3133 3222 3e3c 7370 616e 2063 "#f:132">f => f
.& │ │ │ -00016110: 6e62 7370 3b26 6e62 7370 3b26 6e62 7370 nbsp;   │ │ │ -00016120: 3b26 6e62 7370 3b7c 203c 7370 616e 2063 ; | A < │ │ │ -00016150: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ -00016160: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ -00016170: 732e 5265 6c61 7469 6f6e 436c 6173 7365 s.RelationClasse │ │ │ -00016180: 732e 6874 6d6c 233a 3a3a 785f 273a 3a27 s.html#:::x_'::' │ │ │ -00016190: 5f78 223e 3c73 7061 6e20 636c 6173 733d _x">::< │ │ │ -000161c0: 2f61 3e20 3c73 7061 6e20 636c 6173 733d /a> tl => │ │ │ -000161f0: 203c 7370 616e 2063 6c61 7373 3d22 6964 fun f< │ │ │ -00016270: 2f61 3e20 3d26 6774 3b20 3c61 2063 6c61 /a> => exists< │ │ │ -000162f0: 2f73 7061 6e3e 3c2f 613e 203c 6120 6964 /span> x : A, │ │ │ -000163f0: 3c2f 613e 203c 6120 636c 6173 733d 2269 predicate │ │ │ -00016470: 5f65 7869 7374 733c 2f73 7061 6e3e 3c2f _exists │ │ │ -000164a0: 746c 3c2f 7370 616e 3e20 283c 6120 636c tl (f
x)
.&nb │ │ │ -00016590: 7370 3b26 6e62 7370 3b3c 7370 616e 2063 sp; end
.
..
.
..
.Poin │ │ │ -000165f0: 7477 6973 6520 6578 7465 6e73 696f 6e20 twise extension │ │ │ -00016600: 6f66 2061 2062 696e 6172 7920 6f70 6572 of a binary oper │ │ │ -00016610: 6174 696f 6e20 6f6e 203c 7370 616e 2063 ation on T │ │ │ -00016650: 3c2f 7370 616e 3e3c 2f73 7061 6e3e 2074 t │ │ │ -00016660: 6f20 6120 6269 6e61 7279 206f 7065 7261 o a binary opera │ │ │ -00016670: 7469 6f6e 0a20 2020 6f6e 2066 756e 6374 tion. on funct │ │ │ -00016680: 696f 6e73 2077 686f 7365 2063 6f64 6f6d ions whose codom │ │ │ -00016690: 6169 6e20 6973 203c 7370 616e 2063 6c61 ain is │ │ │ -000166b0: 3c73 7061 6e20 636c 6173 733d 2269 6422 T.. │ │ │ -000166e0: 2046 6f72 2061 6e20 6f70 6572 6174 6f72 For an operator │ │ │ -000166f0: 206f 6e20 3c73 7061 6e20 636c 6173 733d on Pr │ │ │ -00016730: 6f70 3c2f 7370 616e 3e3c 2f73 7061 6e3e op │ │ │ -00016740: 2074 6869 7320 6c69 6674 7320 7468 6520 this lifts the │ │ │ -00016750: 6f70 6572 6174 6f72 2074 6f20 6120 6269 operator to a bi │ │ │ -00016760: 6e61 7279 206f 7065 7261 7469 6f6e 2e20 nary operation. │ │ │ -00016770: 0a3c 2f64 6976 3e0a 3c64 6976 2063 6c61 .
.
..
.Fixpoint poi │ │ │ -00016830: 6e74 7769 7365 5f65 7874 656e 7369 6f6e ntwise_extension │ │ │ -00016840: 3c2f 7370 616e 3e3c 2f61 3e20 7b3c 6120 {T< │ │ │ -000168a0: 2f61 3e20 3a20 3c73 7061 6e20 636c 6173 /a> : Type} (op : │ │ │ -00016930: 203c 6120 636c 6173 733d 2269 6472 6566 b │ │ │ -000169a0: 696e 6172 795f 6f70 6572 6174 696f 6e3c inary_operation< │ │ │ -000169b0: 2f73 7061 6e3e 3c2f 613e 203c 6120 636c /span> T
)
.& │ │ │ -00016a30: 6e62 7370 3b26 6e62 7370 3b28 3c61 2069 nbsp; (l : Tlist) : binary_ │ │ │ -00016b80: 6f70 6572 6174 696f 6e3c 2f73 7061 6e3e operation │ │ │ -00016b90: 3c2f 613e 2028 3c61 2063 6c61 7373 3d22 (arrows │ │ │ -00016c00: 3c2f 7370 616e 3e3c 2f61 3e20 3c61 2063 l T) :=
│ │ │ -00016cf0: 0a26 6e62 7370 3b26 6e62 7370 3b3c 7370 .  ma │ │ │ -00016d20: 7463 683c 2f73 7061 6e3e 203c 6120 636c tch l
with
.  │ │ │ -00016dd0: 3b26 6e62 7370 3b26 6e62 7370 3b26 6e62 ;  &nb │ │ │ -00016de0: 7370 3b7c 203c 6120 636c 6173 733d 2269 sp;| Tnil => f │ │ │ -00016e80: 756e 3c2f 7370 616e 3e20 3c61 2069 643d un
R │ │ │ -00016ee0: 203c 6120 6964 3d22 5227 3a31 3431 2220 R'< │ │ │ -00016f30: 2f73 7061 6e3e 3c2f 613e 203d 2667 743b /span> => │ │ │ -00016f40: 203c 6120 636c 6173 733d 2269 6472 6566 op │ │ │ -00016fb0: 203c 6120 636c 6173 733d 2269 6472 6566 │ │ │ -00016ff0: 3c73 7061 6e20 636c 6173 733d 2269 6422 R < │ │ │ -00017020: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ -00017030: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ -00017040: 732e 5265 6c61 7469 6f6e 436c 6173 7365 s.RelationClasse │ │ │ -00017050: 732e 6874 6d6c 2352 273a 3134 3122 3e3c s.html#R':141">< │ │ │ -00017060: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -00017070: 7469 746c 653d 2276 6172 6961 626c 6522 title="variable" │ │ │ -00017080: 3e52 273c 2f73 7061 6e3e 3c2f 613e 3c62 >R'.   │ │ │ -000170a0: 266e 6273 703b 266e 6273 703b 7c20 3c73   | A :: tl │ │ │ -00017170: 3d26 6774 3b20 3c73 7061 6e20 636c 6173 => fun R R' =>
.&n │ │ │ -00017260: 6273 703b 266e 6273 703b 266e 6273 703b bsp;   │ │ │ -00017270: 266e 6273 703b 266e 6273 703b 266e 6273   &nbs │ │ │ -00017280: 703b 3c73 7061 6e20 636c 6173 733d 2269 p;fun
x │ │ │ -00017300: 3c2f 613e 203d 2667 743b 203c 6120 636c => │ │ │ -00017380: 706f 696e 7477 6973 655f 6578 7465 6e73 pointwise_extens │ │ │ -00017390: 696f 6e3c 2f73 7061 6e3e 3c2f 613e 203c ion < │ │ │ -000173a0: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ -000173b0: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ -000173c0: 732e 5265 6c61 7469 6f6e 436c 6173 7365 s.RelationClasse │ │ │ -000173d0: 732e 6874 6d6c 236f 703a 3133 3622 3e3c s.html#op:136">< │ │ │ -000173e0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -000173f0: 7469 746c 653d 2276 6172 6961 626c 6522 title="variable" │ │ │ -00017400: 3e6f 703c 2f73 7061 6e3e 3c2f 613e 203c >op < │ │ │ -00017410: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -00017420: 7469 746c 653d 2276 6172 223e 746c 3c2f title="var">tl (R │ │ │ -000174a0: 3c2f 613e 203c 6120 636c 6173 733d 2269 x) (R' │ │ │ -00017580: 3c2f 613e 203c 6120 636c 6173 733d 2269 x)
. & │ │ │ -00017600: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp;end │ │ │ -00017630: 2e3c 6272 2f3e 0a0a 3c62 722f 3e0a 3c2f .
..
...
.Pointwis │ │ │ -00017660: 6520 6c69 6674 696e 672c 2065 7175 6976 e lifting, equiv │ │ │ -00017670: 616c 656e 7420 746f 2064 6f69 6e67 203c alent to doing < │ │ │ -00017680: 7370 616e 2063 6c61 7373 3d22 696e 6c69 span class="inli │ │ │ -00017690: 6e65 636f 6465 223e 3c73 7061 6e20 636c necode">pointwise_e │ │ │ -000176c0: 7874 656e 7369 6f6e 3c2f 7370 616e 3e3c xtension< │ │ │ -000176d0: 2f73 7061 6e3e 2061 6e64 2063 6c6f 7369 /span> and closi │ │ │ -000176e0: 6e67 2075 7369 6e67 203c 7370 616e 2063 ng using p │ │ │ -00017720: 7265 6469 6361 7465 5f61 6c6c 3c2f 7370 redicate_all. ..
..
.F │ │ │ -00017780: 6978 706f 696e 743c 2f73 7061 6e3e 203c ixpoint < │ │ │ -00017790: 6120 6964 3d22 706f 696e 7477 6973 655f a id="pointwise_ │ │ │ -000177a0: 6c69 6674 696e 6722 2063 6c61 7373 3d22 lifting" class=" │ │ │ -000177b0: 6964 7265 6622 2068 7265 663d 2223 706f idref" href="#po │ │ │ -000177c0: 696e 7477 6973 655f 6c69 6674 696e 6722 intwise_lifting" │ │ │ -000177d0: 3e3c 7370 616e 2063 6c61 7373 3d22 6964 >pointwise_l │ │ │ -00017800: 6966 7469 6e67 3c2f 7370 616e 3e3c 2f61 ifting
(< │ │ │ -00017840: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -00017850: 7469 746c 653d 2262 696e 6465 7222 3e6f title="binder">o │ │ │ -00017860: 703c 2f73 7061 6e3e 3c2f 613e 203a 203c p : < │ │ │ -00017870: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ -00017880: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ -00017890: 732e 5265 6c61 7469 6f6e 436c 6173 7365 s.RelationClasse │ │ │ -000178a0: 732e 6874 6d6c 2362 696e 6172 795f 7265 s.html#binary_re │ │ │ -000178b0: 6c61 7469 6f6e 223e 3c73 7061 6e20 636c lation">bina │ │ │ -000178e0: 7279 5f72 656c 6174 696f 6e3c 2f73 7061 ry_relation Prop) (l : │ │ │ -00017980: 3c61 2063 6c61 7373 3d22 6964 7265 6622 < │ │ │ -000179c0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -000179d0: 7469 746c 653d 2269 6e64 7563 7469 7665 title="inductive │ │ │ -000179e0: 223e 546c 6973 743c 2f73 7061 6e3e 3c2f ">Tlist) : < │ │ │ -00017a40: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -00017a50: 7469 746c 653d 2264 6566 696e 6974 696f title="definitio │ │ │ -00017a60: 6e22 3e62 696e 6172 795f 7265 6c61 7469 n">binary_relati │ │ │ -00017a70: 6f6e 3c2f 7370 616e 3e3c 2f61 3e20 283c on (< │ │ │ -00017a80: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ -00017a90: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ -00017aa0: 732e 5265 6c61 7469 6f6e 436c 6173 7365 s.RelationClasse │ │ │ -00017ab0: 732e 6874 6d6c 2370 7265 6469 6361 7465 s.html#predicate │ │ │ -00017ac0: 223e 3c73 7061 6e20 636c 6173 733d 2269 ">predicat │ │ │ -00017af0: 653c 2f73 7061 6e3e 3c2f 613e 203c 6120 e l< │ │ │ -00017b60: 2f73 7061 6e3e 3c2f 613e 2920 3a3d 3c62 /span>) :=.   │ │ │ -00017b80: 3c73 7061 6e20 636c 6173 733d 2269 6422 match l │ │ │ -00017c10: 3c2f 7370 616e 3e3c 2f61 3e20 3c73 7061 wit │ │ │ -00017c40: 683c 2f73 7061 6e3e 3c62 722f 3e0a 266e h
.&n │ │ │ -00017c50: 6273 703b 266e 6273 703b 266e 6273 703b bsp;   │ │ │ -00017c60: 266e 6273 703b 7c20 3c61 2063 6c61 7373  | Tnil< │ │ │ -00017cd0: 2f73 7061 6e3e 3c2f 613e 203d 2667 743b /span> => │ │ │ -00017ce0: 203c 7370 616e 2063 6c61 7373 3d22 6964 fun R< │ │ │ -00017d60: 2f61 3e20 3c61 2069 643d 2252 273a 3135 /a> │ │ │ -00017d90: 3c73 7061 6e20 636c 6173 733d 2269 6422 │ │ │ -00017db0: 5227 3c2f 7370 616e 3e3c 2f61 3e20 3d26 R' =& │ │ │ -00017dc0: 6774 3b20 3c61 2063 6c61 7373 3d22 6964 gt; op< │ │ │ -00017e30: 2f61 3e20 3c61 2063 6c61 7373 3d22 6964 /a> R R'
. &nb │ │ │ -00017f20: 7370 3b26 6e62 7370 3b26 6e62 7370 3b7c sp;  | │ │ │ -00017f30: 203c 7370 616e 2063 6c61 7373 3d22 6964 A< │ │ │ -00017f50: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> :: │ │ │ -00017fc0: 3c2f 7370 616e 3e3c 2f61 3e20 3c73 7061 tl => fun
< │ │ │ -00018050: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -00018060: 7469 746c 653d 2262 696e 6465 7222 3e52 title="binder">R │ │ │ -00018070: 3c2f 7370 616e 3e3c 2f61 3e20 3c61 2069 R' =>
│ │ │ -000180e0: 0a26 6e62 7370 3b26 6e62 7370 3b26 6e62 .  &nb │ │ │ -000180f0: 7370 3b26 6e62 7370 3b26 6e62 7370 3b26 sp;  & │ │ │ -00018100: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp;forall x< │ │ │ -00018180: 2f73 7061 6e3e 3c2f 613e 2c20 3c61 2063 /span>, p │ │ │ -00018200: 6f69 6e74 7769 7365 5f6c 6966 7469 6e67 ointwise_lifting │ │ │ -00018210: 3c2f 7370 616e 3e3c 2f61 3e20 3c61 2063 op │ │ │ -00018280: 3c2f 7370 616e 3e3c 2f61 3e20 3c73 7061 tl (R x) │ │ │ -00018390: 2028 3c61 2063 6c61 7373 3d22 6964 7265 (R' x) │ │ │ -00018470: 3c62 722f 3e0a 266e 6273 703b 266e 6273
. &nbs │ │ │ -00018480: 703b 3c73 7061 6e20 636c 6173 733d 2269 p;end...
.
..
.The n-ary e │ │ │ -000184e0: 7175 6976 616c 656e 6365 2072 656c 6174 quivalence relat │ │ │ -000184f0: 696f 6e2c 2064 6566 696e 6564 2062 7920 ion, defined by │ │ │ -00018500: 6c69 6674 696e 6720 7468 6520 302d 6172 lifting the 0-ar │ │ │ -00018510: 7920 3c73 7061 6e20 636c 6173 733d 2269 y iff relati │ │ │ -00018560: 6f6e 2e20 0a3c 2f64 6976 3e0a 3c64 6976 on. .
.
.. │ │ │ -00018580: 3c62 722f 3e0a 3c73 7061 6e20 636c 6173
.Definitio │ │ │ -000185b0: 6e3c 2f73 7061 6e3e 203c 6120 6964 3d22 n predicate │ │ │ -00018630: 5f65 7175 6976 616c 656e 6365 3c2f 7370 _equivalence {l │ │ │ -000186a0: 3a20 3c61 2063 6c61 7373 3d22 6964 7265 : Tlist │ │ │ -00018710: 3c2f 613e 7d20 3a20 3c61 2063 6c61 7373 } : binary_rela │ │ │ -00018790: 7469 6f6e 3c2f 7370 616e 3e3c 2f61 3e20 tion │ │ │ -000187a0: 283c 6120 636c 6173 733d 2269 6472 6566 (predic │ │ │ -00018810: 6174 653c 2f73 7061 6e3e 3c2f 613e 203c ate < │ │ │ -00018820: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ -00018830: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ -00018840: 732e 5265 6c61 7469 6f6e 436c 6173 7365 s.RelationClasse │ │ │ -00018850: 732e 6874 6d6c 236c 3a31 3534 223e 3c73 s.html#l:154"> │ │ │ -00018880: 6c3c 2f73 7061 6e3e 3c2f 613e 2920 3a3d l) := │ │ │ -00018890: 3c62 722f 3e0a 266e 6273 703b 266e 6273
. &nbs │ │ │ -000188a0: 703b 3c61 2063 6c61 7373 3d22 6964 7265 p;pointwise_lifti │ │ │ -00018920: 6e67 3c2f 7370 616e 3e3c 2f61 3e20 3c61 ng iff │ │ │ -00018990: 203c 6120 636c 6173 733d 2269 6472 6566 │ │ │ -000189d0: 3c73 7061 6e20 636c 6173 733d 2269 6422 l.< │ │ │ -00018a00: 6272 2f3e 0a0a 3c62 722f 3e0a 3c2f 6469 br/>..
...
.The n-ary │ │ │ -00018a30: 696d 706c 6963 6174 696f 6e20 7265 6c61 implication rela │ │ │ -00018a40: 7469 6f6e 2c20 6465 6669 6e65 6420 6279 tion, defined by │ │ │ -00018a50: 206c 6966 7469 6e67 2074 6865 2030 2d61 lifting the 0-a │ │ │ -00018a60: 7279 203c 7370 616e 2063 6c61 7373 3d22 ry impl rela │ │ │ -00018ab0: 7469 6f6e 2e20 0a3c 2f64 6976 3e0a 3c64 tion. .
. │ │ │ -00018ad0: 0a0a 3c62 722f 3e0a 3c73 7061 6e20 636c ..
.Definit │ │ │ -00018b00: 696f 6e3c 2f73 7061 6e3e 203c 6120 6964 ion predica │ │ │ -00018b80: 7465 5f69 6d70 6c69 6361 7469 6f6e 3c2f te_implication {l : Tlist} :=
. │ │ │ -00018c70: 266e 6273 703b 266e 6273 703b 3c61 2063   point │ │ │ -00018cf0: 7769 7365 5f6c 6966 7469 6e67 3c2f 7370 wise_lifting impl │ │ │ -00018d70: 203c 6120 636c 6173 733d 2269 6472 6566 │ │ │ -00018db0: 3c73 7061 6e20 636c 6173 733d 2269 6422 l.< │ │ │ -00018de0: 6272 2f3e 0a0a 3c62 722f 3e0a 3c2f 6469 br/>..
...
.Notations │ │ │ -00018e10: 666f 7220 706f 696e 7477 6973 6520 6571 for pointwise eq │ │ │ -00018e20: 7569 7661 6c65 6e63 6520 616e 6420 696d uivalence and im │ │ │ -00018e30: 706c 6963 6174 696f 6e20 6f66 2070 7265 plication of pre │ │ │ -00018e40: 6469 6361 7465 732e 200a 3c2f 6469 763e dicates. .
│ │ │ -00018e50: 0a3c 6469 7620 636c 6173 733d 2263 6f64 .
..
.Decl │ │ │ -00018e90: 6172 6520 5363 6f70 653c 2f73 7061 6e3e are Scope │ │ │ -00018ea0: 203c 7370 616e 2063 6c61 7373 3d22 6964 pr │ │ │ -00018ec0: 6564 6963 6174 655f 7363 6f70 653c 2f73 edicate_scope
.
..
.Infix │ │ │ -00018f10: 3c61 2069 643d 2264 3266 6130 6530 3165 │ │ │ -00018f70: 3c73 7061 6e20 636c 6173 733d 2269 6422 "< │ │ │ -00018fa0: 2f61 3e26 6c74 3be2 8899 2667 743b 2220 /a><...>" │ │ │ -00018fb0: 3a3d 203c 6120 636c 6173 733d 2269 6472 := predicate_ │ │ │ -00019030: 6571 7569 7661 6c65 6e63 653c 2f73 7061 equivalence (at level │ │ │ -000190a0: 3935 2c20 3c73 7061 6e20 636c 6173 733d 95, no < │ │ │ -000190d0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -000190e0: 7469 746c 653d 226b 6579 776f 7264 223e title="keyword"> │ │ │ -000190f0: 6173 736f 6369 6174 6976 6974 793c 2f73 associativity
) : predicate_s │ │ │ -00019130: 636f 7065 3c2f 7370 616e 3e2e 3c62 722f cope.
.Infix │ │ │ -00019170: 3c61 2069 643d 2237 6362 3165 6534 3465 │ │ │ -000191d0: 3c73 7061 6e20 636c 6173 733d 2269 6422 "< │ │ │ -00019200: 2f61 3e2d e288 9926 6774 3b22 203a 3d20 /a>-...>" := │ │ │ -00019210: 3c61 2063 6c61 7373 3d22 6964 7265 6622 < │ │ │ -00019260: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -00019270: 7469 746c 653d 2264 6566 696e 6974 696f title="definitio │ │ │ -00019280: 6e22 3e70 7265 6469 6361 7465 5f69 6d70 n">predicate_imp │ │ │ -00019290: 6c69 6361 7469 6f6e 3c2f 7370 616e 3e3c lication< │ │ │ -000192a0: 2f61 3e20 283c 7370 616e 2063 6c61 7373 /a> (at < │ │ │ -000192d0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -000192e0: 7469 746c 653d 226b 6579 776f 7264 223e title="keyword"> │ │ │ -000192f0: 6c65 7665 6c3c 2f73 7061 6e3e 2037 302c level 70, │ │ │ -00019300: 203c 7370 616e 2063 6c61 7373 3d22 6964 right a │ │ │ -00019350: 7373 6f63 6961 7469 7669 7479 3c2f 7370 ssociativity) : predicate_sc │ │ │ -00019390: 6f70 653c 2f73 7061 6e3e 2e3c 6272 2f3e ope.
│ │ │ -000193a0: 0a0a 3c62 722f 3e0a 3c73 7061 6e20 636c ..
.Local O │ │ │ -000193d0: 7065 6e3c 2f73 7061 6e3e 203c 7370 616e pen Scop │ │ │ -00019400: 653c 2f73 7061 6e3e 203c 7370 616e 2063 e predicate_ │ │ │ -00019430: 7363 6f70 653c 2f73 7061 6e3e 2e3c 6272 scope.
..
.
│ │ │ -00019450: 0a0a 3c64 6976 2063 6c61 7373 3d22 646f ..
.The pointwis │ │ │ -00019470: 6520 6c69 6674 696e 6773 206f 6620 636f e liftings of co │ │ │ -00019480: 6e6a 756e 6374 696f 6e20 616e 6420 6469 njunction and di │ │ │ -00019490: 736a 756e 6374 696f 6e73 2e0a 2020 204e sjunctions.. N │ │ │ -000194a0: 6f74 6520 7468 6174 2074 6865 7365 2061 ote that these a │ │ │ -000194b0: 7265 203c 7370 616e 2063 6c61 7373 3d22 re binary_ │ │ │ -000194f0: 6f70 6572 6174 696f 6e3c 2f73 7061 6e3e operation │ │ │ -00019500: 3c2f 7370 616e 3e73 2c20 6275 696c 6469 s, buildi │ │ │ -00019510: 6e67 206e 6577 2072 656c 6174 696f 6e73 ng new relations │ │ │ -00019520: 206f 7574 206f 6620 6f6c 6420 6f6e 6573 out of old ones │ │ │ -00019530: 2e20 0a3c 2f64 6976 3e0a 3c64 6976 2063 . .
.
...Definition< │ │ │ -00019580: 2f73 7061 6e3e 203c 6120 6964 3d22 7072 /span> predicate │ │ │ -00019600: 5f69 6e74 6572 7365 6374 696f 6e3c 2f73 _intersection := poi │ │ │ -00019690: 6e74 7769 7365 5f65 7874 656e 7369 6f6e ntwise_extension │ │ │ -000196a0: 3c2f 7370 616e 3e3c 2f61 3e20 3c61 2063 a │ │ │ -00019700: 6e64 3c2f 7370 616e 3e3c 2f61 3e2e 3c62 nd..Definition< │ │ │ -00019740: 2f73 7061 6e3e 203c 6120 6964 3d22 7072 /span> predica │ │ │ -000197b0: 7465 5f75 6e69 6f6e 3c2f 7370 616e 3e3c te_union< │ │ │ -000197c0: 2f61 3e20 3a3d 203c 6120 636c 6173 733d /a> := pointwis │ │ │ -00019840: 655f 6578 7465 6e73 696f 6e3c 2f73 7061 e_extension or.
...Infix "/...\" := < │ │ │ -00019990: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ -000199a0: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ -000199b0: 732e 5265 6c61 7469 6f6e 436c 6173 7365 s.RelationClasse │ │ │ -000199c0: 732e 6874 6d6c 2370 7265 6469 6361 7465 s.html#predicate │ │ │ -000199d0: 5f69 6e74 6572 7365 6374 696f 6e22 3e3c _intersection">< │ │ │ -000199e0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -000199f0: 7469 746c 653d 2264 6566 696e 6974 696f title="definitio │ │ │ -00019a00: 6e22 3e70 7265 6469 6361 7465 5f69 6e74 n">predicate_int │ │ │ -00019a10: 6572 7365 6374 696f 6e3c 2f73 7061 6e3e ersection
│ │ │ -00019a20: 3c2f 613e 2028 3c73 7061 6e20 636c 6173 (at │ │ │ -00019a50: 3c73 7061 6e20 636c 6173 733d 2269 6422 level 80 │ │ │ -00019a80: 2c20 3c73 7061 6e20 636c 6173 733d 2269 , right < │ │ │ -00019ab0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -00019ac0: 7469 746c 653d 226b 6579 776f 7264 223e title="keyword"> │ │ │ -00019ad0: 6173 736f 6369 6174 6976 6974 793c 2f73 associativity
) : predicate_s │ │ │ -00019b10: 636f 7065 3c2f 7370 616e 3e2e 3c62 722f cope.
.Infix │ │ │ -00019b50: 3c61 2069 643d 2230 3033 3033 3966 3635 │ │ │ -00019bb0: 3c73 7061 6e20 636c 6173 733d 2269 6422 "< │ │ │ -00019be0: 2f61 3e5c e288 992f 2220 3a3d 203c 6120 /a>\.../" := predic │ │ │ -00019c60: 6174 655f 756e 696f 6e3c 2f73 7061 6e3e ate_union │ │ │ -00019c70: 3c2f 613e 2028 3c73 7061 6e20 636c 6173 (at │ │ │ -00019ca0: 3c73 7061 6e20 636c 6173 733d 2269 6422 level 85 │ │ │ -00019cd0: 2c20 3c73 7061 6e20 636c 6173 733d 2269 , right < │ │ │ -00019d00: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -00019d10: 7469 746c 653d 226b 6579 776f 7264 223e title="keyword"> │ │ │ -00019d20: 6173 736f 6369 6174 6976 6974 793c 2f73 associativity
) : predicate_s │ │ │ -00019d60: 636f 7065 3c2f 7370 616e 3e2e 3c62 722f cope.
..
.
. │ │ │ -00019d80: 0a3c 6469 7620 636c 6173 733d 2264 6f63 .
.The always True< │ │ │ -00019de0: 2f73 7061 6e3e 2061 6e64 2061 6c77 6179 /span> and alway │ │ │ -00019df0: 7320 3c73 7061 6e20 636c 6173 733d 2269 s False pred │ │ │ -00019e40: 6963 6174 6573 2e20 0a3c 2f64 6976 3e0a icates. .
. │ │ │ -00019e50: 3c64 6976 2063 6c61 7373 3d22 636f 6465
..
.Fixpo │ │ │ -00019e90: 696e 743c 2f73 7061 6e3e 203c 6120 6964 int true_ │ │ │ -00019f00: 7072 6564 6963 6174 653c 2f73 7061 6e3e predicate │ │ │ -00019f10: 3c2f 613e 207b 3c61 2069 643d 226c 3a31 { │ │ │ -00019f40: 3c73 7061 6e20 636c 6173 733d 2269 6422 │ │ │ -00019f60: 6c3c 2f73 7061 6e3e 3c2f 613e 203a 203c l : < │ │ │ -00019f70: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ -00019f80: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ -00019f90: 732e 5265 6c61 7469 6f6e 436c 6173 7365 s.RelationClasse │ │ │ -00019fa0: 732e 6874 6d6c 2354 6c69 7374 223e 3c73 s.html#Tlist">Tlist} : pr │ │ │ -0001a050: 6564 6963 6174 653c 2f73 7061 6e3e 3c2f edicate l │ │ │ -0001a0d0: 203a 3d3c 6272 2f3e 0a26 6e62 7370 3b26 :=
. & │ │ │ -0001a0e0: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp;match l │ │ │ -0001a180: 203c 7370 616e 2063 6c61 7373 3d22 6964 with
.  & │ │ │ -0001a1c0: 6e62 7370 3b26 6e62 7370 3b7c 203c 6120 nbsp; | │ │ │ -0001a230: 546e 696c 3c2f 7370 616e 3e3c 2f61 3e20 Tnil │ │ │ -0001a240: 3d26 6774 3b20 3c61 2063 6c61 7373 3d22 => True
.& │ │ │ -0001a2b0: 6e62 7370 3b26 6e62 7370 3b26 6e62 7370 nbsp;   │ │ │ -0001a2c0: 3b26 6e62 7370 3b7c 203c 7370 616e 2063 ; | A < │ │ │ -0001a2f0: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ -0001a300: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ -0001a310: 732e 5265 6c61 7469 6f6e 436c 6173 7365 s.RelationClasse │ │ │ -0001a320: 732e 6874 6d6c 233a 3a3a 785f 273a 3a27 s.html#:::x_'::' │ │ │ -0001a330: 5f78 223e 3c73 7061 6e20 636c 6173 733d _x">::< │ │ │ -0001a360: 2f61 3e20 3c73 7061 6e20 636c 6173 733d /a> tl => │ │ │ -0001a390: 203c 7370 616e 2063 6c61 7373 3d22 6964 fun _ => @true_p │ │ │ -0001a460: 7265 6469 6361 7465 3c2f 7370 616e 3e3c redicate< │ │ │ -0001a470: 2f61 3e20 3c73 7061 6e20 636c 6173 733d /a> tl
. │ │ │ -0001a4a0: 266e 6273 703b 266e 6273 703b 3c73 7061   end │ │ │ -0001a4d0: 3c2f 7370 616e 3e2e 3c62 722f 3e0a 0a3c
.
..< │ │ │ -0001a4e0: 6272 2f3e 0a3c 7370 616e 2063 6c61 7373 br/>.Fixpoint
false_pr │ │ │ -0001a580: 6564 6963 6174 653c 2f73 7061 6e3e 3c2f edicate {l< │ │ │ -0001a5e0: 2f73 7061 6e3e 3c2f 613e 203a 203c 6120 /span> : T │ │ │ -0001a650: 6c69 7374 3c2f 7370 616e 3e3c 2f61 3e7d list} │ │ │ -0001a660: 203a 203c 6120 636c 6173 733d 2269 6472 : pred │ │ │ -0001a6d0: 6963 6174 653c 2f73 7061 6e3e 3c2f 613e icate │ │ │ -0001a6e0: 203c 6120 636c 6173 733d 2269 6472 6566 │ │ │ -0001a720: 3c73 7061 6e20 636c 6173 733d 2269 6422 l : │ │ │ -0001a750: 3d3c 6272 2f3e 0a26 6e62 7370 3b26 6e62 =
. &nb │ │ │ -0001a760: 7370 3b3c 7370 616e 2063 6c61 7373 3d22 sp;match │ │ │ -0001a790: 203c 6120 636c 6173 733d 2269 6472 6566 │ │ │ -0001a7d0: 3c73 7061 6e20 636c 6173 733d 2269 6422 l < │ │ │ -0001a800: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -0001a810: 7469 746c 653d 226b 6579 776f 7264 223e title="keyword"> │ │ │ -0001a820: 7769 7468 3c2f 7370 616e 3e3c 6272 2f3e with
│ │ │ -0001a830: 0a26 6e62 7370 3b26 6e62 7370 3b26 6e62 .  &nb │ │ │ -0001a840: 7370 3b26 6e62 7370 3b7c 203c 6120 636c sp; | Tn │ │ │ -0001a8b0: 696c 3c2f 7370 616e 3e3c 2f61 3e20 3d26 il =& │ │ │ -0001a8c0: 6774 3b20 3c61 2063 6c61 7373 3d22 6964 gt; False
.& │ │ │ -0001a930: 6e62 7370 3b26 6e62 7370 3b26 6e62 7370 nbsp;   │ │ │ -0001a940: 3b26 6e62 7370 3b7c 203c 7370 616e 2063 ; | A < │ │ │ -0001a970: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ -0001a980: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ -0001a990: 732e 5265 6c61 7469 6f6e 436c 6173 7365 s.RelationClasse │ │ │ -0001a9a0: 732e 6874 6d6c 233a 3a3a 785f 273a 3a27 s.html#:::x_'::' │ │ │ -0001a9b0: 5f78 223e 3c73 7061 6e20 636c 6173 733d _x">::< │ │ │ -0001a9e0: 2f61 3e20 3c73 7061 6e20 636c 6173 733d /a> tl => │ │ │ -0001aa10: 203c 7370 616e 2063 6c61 7373 3d22 6964 fun _ => @false │ │ │ -0001aae0: 5f70 7265 6469 6361 7465 3c2f 7370 616e _predicate tl
.  e │ │ │ -0001ab50: 6e64 3c2f 7370 616e 3e2e 3c62 722f 3e0a nd.
. │ │ │ -0001ab60: 0a3c 6272 2f3e 0a3c 7370 616e 2063 6c61 .
.Notation │ │ │ -0001ab90: 3c2f 7370 616e 3e20 3c61 2069 643d 2261 " │ │ │ -0001ac20: 3c2f 7370 616e 3e3c 2f61 3ee2 8899 e28a ..... │ │ │ -0001ac30: a4e2 8899 2220 3a3d 203c 6120 636c 6173 ...." := true_predic │ │ │ -0001acb0: 6174 653c 2f73 7061 6e3e 3c2f 613e 203a ate : │ │ │ -0001acc0: 203c 7370 616e 2063 6c61 7373 3d22 6964 pr │ │ │ -0001ace0: 6564 6963 6174 655f 7363 6f70 653c 2f73 edicate_scope
.
.Nota │ │ │ -0001ad20: 7469 6f6e 3c2f 7370 616e 3e20 3c61 2069 tion &q │ │ │ -0001adb0: 756f 743b 3c2f 7370 616e 3e3c 2f61 3ee2 uot;. │ │ │ -0001adc0: 8899 e28a a5e2 8899 2220 3a3d 203c 6120 ........" := false_ │ │ │ -0001ae40: 7072 6564 6963 6174 653c 2f73 7061 6e3e predicate │ │ │ -0001ae50: 3c2f 613e 203a 203c 7370 616e 2063 6c61 : predicate_sc │ │ │ -0001ae80: 6f70 653c 2f73 7061 6e3e 2e3c 6272 2f3e ope.
│ │ │ -0001ae90: 0a0a 3c62 722f 3e0a 3c2f 6469 763e 0a0a ..
.
.. │ │ │ -0001aea0: 3c64 6976 2063 6c61 7373 3d22 646f 6322
.Predicate equi │ │ │ -0001aec0: 7661 6c65 6e63 6520 6973 2061 6e20 6571 valence is an eq │ │ │ -0001aed0: 7569 7661 6c65 6e63 652c 2061 6e64 2070 uivalence, and p │ │ │ -0001aee0: 7265 6469 6361 7465 2069 6d70 6c69 6361 redicate implica │ │ │ -0001aef0: 7469 6f6e 2064 6566 696e 6573 2061 2070 tion defines a p │ │ │ -0001af00: 7265 6f72 6465 722e 200a 3c2f 6469 763e reorder. .
│ │ │ -0001af10: 0a3c 6469 7620 636c 6173 733d 2263 6f64 .
..
.#[global │ │ │ -0001af50: 3c2f 7370 616e 3e5d 3c62 722f 3e0a 3c73 ]
.Progr │ │ │ -0001af80: 616d 3c2f 7370 616e 3e20 3c73 7061 6e20 am Insta │ │ │ -0001afb0: 6e63 653c 2f73 7061 6e3e 203c 6120 6964 nce p │ │ │ -0001b040: 7265 6469 6361 7465 5f65 7175 6976 616c redicate_equival │ │ │ -0001b050: 656e 6365 5f65 7175 6976 616c 656e 6365 ence_equivalence │ │ │ -0001b060: 3c2f 7370 616e 3e3c 2f61 3e20 7b3c 6120 {l< │ │ │ -0001b0c0: 2f61 3e7d 203a 3c62 722f 3e0a 266e 6273 /a>} :
.&nbs │ │ │ -0001b0d0: 703b 266e 6273 703b 3c61 2063 6c61 7373 p; 
Equi │ │ │ -0001b140: 7661 6c65 6e63 653c 2f73 7061 6e3e 3c2f valence (@predicat │ │ │ -0001b1d0: 655f 6571 7569 7661 6c65 6e63 653c 2f73 e_equivalence
l).
..< │ │ │ -0001b260: 6272 2f3e 0a0a 3c62 722f 3e0a 235b 3c73 br/>..
.#[globa │ │ │ -0001b290: 6c3c 2f73 7061 6e3e 5d3c 6272 2f3e 0a3c l]
.< │ │ │ -0001b2a0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -0001b2b0: 7469 746c 653d 2276 6172 223e 5072 6f67 title="var">Prog │ │ │ -0001b2c0: 7261 6d3c 2f73 7061 6e3e 203c 7370 616e ram Inst │ │ │ -0001b2f0: 616e 6365 3c2f 7370 616e 3e20 3c61 2069 ance predic │ │ │ -0001b380: 6174 655f 696d 706c 6963 6174 696f 6e5f ate_implication_ │ │ │ -0001b390: 7072 656f 7264 6572 3c2f 7370 616e 3e3c preorder< │ │ │ -0001b3a0: 2f61 3e20 7b3c 6120 6964 3d22 6c3a 3136 /a> {< │ │ │ -0001b3d0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -0001b3e0: 7469 746c 653d 2262 696e 6465 7222 3e6c title="binder">l │ │ │ -0001b3f0: 3c2f 7370 616e 3e3c 2f61 3e7d 203a 3c62 } :.   │ │ │ -0001b410: 3c61 2063 6c61 7373 3d22 6964 7265 6622 PreOrder │ │ │ -0001b480: 3c2f 613e 2028 403c 6120 636c 6173 733d (@predic │ │ │ -0001b500: 6174 655f 696d 706c 6963 6174 696f 6e3c ate_implication< │ │ │ -0001b510: 2f73 7061 6e3e 3c2f 613e 203c 6120 636c /span> l
).
. │ │ │ -0001b590: 0a3c 6272 2f3e 0a3c 2f64 6976 3e0a 0a3c .
.
..< │ │ │ -0001b5a0: 6469 7620 636c 6173 733d 2264 6f63 223e div class="doc"> │ │ │ -0001b5b0: 0a57 6520 6465 6669 6e65 2074 6865 2076 .We define the v │ │ │ -0001b5c0: 6172 696f 7573 206f 7065 7261 7469 6f6e arious operation │ │ │ -0001b5d0: 7320 7768 6963 6820 6465 6669 6e65 2074 s which define t │ │ │ -0001b5e0: 6865 2061 6c67 6562 7261 206f 6e20 6269 he algebra on bi │ │ │ -0001b5f0: 6e61 7279 2072 656c 6174 696f 6e73 2c0a nary relations,. │ │ │ -0001b600: 2020 2066 726f 6d20 7468 6520 6765 6e65 from the gene │ │ │ -0001b610: 7261 6c20 6f6e 6573 2e20 0a3c 2f64 6976 ral ones. .
.
..
.Sec │ │ │ -0001b660: 7469 6f6e 3c2f 7370 616e 3e20 3c61 2069 tion Binary< │ │ │ -0001b6c0: 2f73 7061 6e3e 3c2f 613e 2e3c 6272 2f3e /span>.
│ │ │ -0001b6d0: 0a26 6e62 7370 3b26 6e62 7370 3b3c 7370 .  Co │ │ │ -0001b700: 6e74 6578 743c 2f73 7061 6e3e 207b 3c61 ntext { │ │ │ -0001b760: 413c 2f73 7061 6e3e 3c2f 613e 203a 203c A : < │ │ │ -0001b770: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -0001b780: 7469 746c 653d 226b 6579 776f 7264 223e title="keyword"> │ │ │ -0001b790: 5479 7065 3c2f 7370 616e 3e7d 2e3c 6272 Type}.
..
.  │ │ │ -0001b7b0: 266e 6273 703b 3c73 7061 6e20 636c 6173  Definitio │ │ │ -0001b7e0: 6e3c 2f73 7061 6e3e 203c 6120 6964 3d22 n relation_eq │ │ │ -0001b860: 7569 7661 6c65 6e63 653c 2f73 7061 6e3e uivalence │ │ │ -0001b870: 3c2f 613e 203a 203c 6120 636c 6173 733d : │ │ │ -0001b8c0: 3c73 7061 6e20 636c 6173 733d 2269 6422 relation
(relation A< │ │ │ -0001b9e0: 2f73 7061 6e3e 3c2f 613e 2920 3a3d 3c62 /span>) :=.   │ │ │ -0001ba00: 266e 6273 703b 266e 6273 703b 403c 6120   @ │ │ │ -0001ba80: 7072 6564 6963 6174 655f 6571 7569 7661 predicate_equiva │ │ │ -0001ba90: 6c65 6e63 653c 2f73 7061 6e3e 3c2f 613e lence │ │ │ -0001baa0: 2028 3c73 7061 6e20 636c 6173 733d 2269 (_ │ │ │ -0001bac0: 3c2f 7370 616e 3e3c 6120 636c 6173 733d :: │ │ │ -0001bb30: 3c2f 7370 616e 3e3c 2f61 3e3c 7370 616e _ │ │ │ -0001bb60: 3c61 2063 6c61 7373 3d22 6964 7265 6622 :: │ │ │ -0001bbd0: 3c2f 613e 3c61 2063 6c61 7373 3d22 6964 Tnil
).
..< │ │ │ -0001bc50: 6272 2f3e 0a26 6e62 7370 3b26 6e62 7370 br/>.   │ │ │ -0001bc60: 3b3c 7370 616e 2063 6c61 7373 3d22 6964 ;Global Instanc │ │ │ -0001bc90: 653c 2f73 7061 6e3e 203c 6120 6964 3d22 e relation_eq │ │ │ -0001bd30: 7569 7661 6c65 6e63 655f 7265 7772 6974 uivalence_rewrit │ │ │ -0001bd40: 655f 7265 6c61 7469 6f6e 3c2f 7370 616e e_relation: │ │ │ -0001bda0: 3c73 7061 6e20 636c 6173 733d 2269 6422 R │ │ │ -0001bdc0: 6577 7269 7465 5265 6c61 7469 6f6e 3c2f ewriteRelation rela │ │ │ -0001be50: 7469 6f6e 5f65 7175 6976 616c 656e 6365 tion_equivalence │ │ │ -0001be60: 3c2f 7370 616e 3e3c 2f61 3e20 3a3d 207b := { │ │ │ -0001be70: 7d2e 3c62 722f 3e0a 0a3c 6272 2f3e 0a26 }.
..
.& │ │ │ -0001be80: 6e62 7370 3b26 6e62 7370 3b3c 7370 616e nbsp; Defi │ │ │ -0001beb0: 6e69 7469 6f6e 3c2f 7370 616e 3e20 3c61 nition relati │ │ │ -0001bf30: 6f6e 5f63 6f6e 6a75 6e63 7469 6f6e 3c2f on_conjunction (R : relation │ │ │ -0001c020: 3c2f 613e 203c 6120 636c 6173 733d 2269 A) (R' : relation │ │ │ -0001c170: 3c2f 613e 203c 6120 636c 6173 733d 2269 A) : relation A< │ │ │ -0001c2d0: 2f73 7061 6e3e 3c2f 613e 203a 3d3c 6272 /span> :=
.  & │ │ │ -0001c2f0: 6e62 7370 3b26 6e62 7370 3b40 3c61 2063 nbsp; @ │ │ │ -0001c370: 7072 6564 6963 6174 655f 696e 7465 7273 predicate_inters │ │ │ -0001c380: 6563 7469 6f6e 3c2f 7370 616e 3e3c 2f61 ection (A< │ │ │ -0001c400: 2f61 3e3c 6120 636c 6173 733d 2269 6472 /a>::A:: │ │ │ -0001c550: 3c2f 7370 616e 3e3c 2f61 3e3c 6120 636c Tn │ │ │ -0001c5c0: 696c 3c2f 7370 616e 3e3c 2f61 3e29 203c il) < │ │ │ -0001c5d0: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ -0001c5e0: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ -0001c5f0: 732e 5265 6c61 7469 6f6e 436c 6173 7365 s.RelationClasse │ │ │ -0001c600: 732e 6874 6d6c 2352 3a31 3635 223e 3c73 s.html#R:165"> │ │ │ -0001c630: 523c 2f73 7061 6e3e 3c2f 613e 203c 6120 R R │ │ │ -0001c6a0: 273c 2f73 7061 6e3e 3c2f 613e 2e3c 6272 '.
..
.  │ │ │ -0001c6c0: 266e 6273 703b 3c73 7061 6e20 636c 6173  Definitio │ │ │ -0001c6f0: 6e3c 2f73 7061 6e3e 203c 6120 6964 3d22 n relation_di │ │ │ -0001c770: 736a 756e 6374 696f 6e3c 2f73 7061 6e3e sjunction │ │ │ -0001c780: 3c2f 613e 2028 3c61 2069 643d 2252 3a31 ( │ │ │ -0001c7b0: 3c73 7061 6e20 636c 6173 733d 2269 6422 │ │ │ -0001c7d0: 523c 2f73 7061 6e3e 3c2f 613e 203a 203c R : < │ │ │ -0001c7e0: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ -0001c7f0: 6872 6566 3d22 436f 712e 5265 6c61 7469 href="Coq.Relati │ │ │ -0001c800: 6f6e 732e 5265 6c61 7469 6f6e 5f44 6566 ons.Relation_Def │ │ │ -0001c810: 696e 6974 696f 6e73 2e68 746d 6c23 7265 initions.html#re │ │ │ -0001c820: 6c61 7469 6f6e 223e 3c73 7061 6e20 636c lation">rela │ │ │ -0001c850: 7469 6f6e 3c2f 7370 616e 3e3c 2f61 3e20 tion │ │ │ -0001c860: 3c61 2063 6c61 7373 3d22 6964 7265 6622 A │ │ │ -0001c8d0: 2920 283c 6120 6964 3d22 5227 3a31 3638 ) (< │ │ │ -0001c900: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -0001c910: 7469 746c 653d 2262 696e 6465 7222 3e52 title="binder">R │ │ │ -0001c920: 273c 2f73 7061 6e3e 3c2f 613e 203a 203c ' : < │ │ │ -0001c930: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ -0001c940: 6872 6566 3d22 436f 712e 5265 6c61 7469 href="Coq.Relati │ │ │ -0001c950: 6f6e 732e 5265 6c61 7469 6f6e 5f44 6566 ons.Relation_Def │ │ │ -0001c960: 696e 6974 696f 6e73 2e68 746d 6c23 7265 initions.html#re │ │ │ -0001c970: 6c61 7469 6f6e 223e 3c73 7061 6e20 636c lation">rela │ │ │ -0001c9a0: 7469 6f6e 3c2f 7370 616e 3e3c 2f61 3e20 tion │ │ │ -0001c9b0: 3c61 2063 6c61 7373 3d22 6964 7265 6622 A │ │ │ -0001ca20: 2920 3a20 3c61 2063 6c61 7373 3d22 6964 ) : relation │ │ │ -0001caa0: 3c2f 613e 203c 6120 636c 6173 733d 2269 A :=
.&n │ │ │ -0001cb20: 6273 703b 266e 6273 703b 266e 6273 703b bsp;   │ │ │ -0001cb30: 266e 6273 703b 403c 6120 636c 6173 733d  @ │ │ │ -0001cb80: 3c73 7061 6e20 636c 6173 733d 2269 6422 predicate_un │ │ │ -0001cbb0: 696f 6e3c 2f73 7061 6e3e 3c2f 613e 2028 ion ( │ │ │ -0001cbc0: 3c61 2063 6c61 7373 3d22 6964 7265 6622 A │ │ │ -0001cc30: 3c61 2063 6c61 7373 3d22 6964 7265 6622 :: │ │ │ -0001cca0: 3c2f 613e 3c61 2063 6c61 7373 3d22 6964 A │ │ │ -0001cd10: 3c2f 613e 3c61 2063 6c61 7373 3d22 6964 ::
Tnil< │ │ │ -0001cdf0: 2f73 7061 6e3e 3c2f 613e 2920 3c61 2063 /span>) R R'.
. │ │ │ -0001cee0: 0a3c 6272 2f3e 0a3c 2f64 6976 3e0a 0a3c .
.
..< │ │ │ -0001cef0: 6469 7620 636c 6173 733d 2264 6f63 223e div class="doc"> │ │ │ -0001cf00: 0a52 656c 6174 696f 6e20 6571 7569 7661 .Relation equiva │ │ │ -0001cf10: 6c65 6e63 6520 6973 2061 6e20 6571 7569 lence is an equi │ │ │ -0001cf20: 7661 6c65 6e63 652c 2061 6e64 2073 7562 valence, and sub │ │ │ -0001cf30: 7265 6c61 7469 6f6e 2064 6566 696e 6573 relation defines │ │ │ -0001cf40: 2061 2070 6172 7469 616c 206f 7264 6572 a partial order │ │ │ -0001cf50: 2e20 0a3c 2f64 6976 3e0a 3c64 6976 2063 . .
.
...   │ │ │ -0001cf80: 3c73 7061 6e20 636c 6173 733d 2269 6422 Global Instance │ │ │ -0001cfb0: 3c2f 7370 616e 3e20 3c61 2069 643d 2272 relati │ │ │ -0001d040: 6f6e 5f65 7175 6976 616c 656e 6365 5f65 on_equivalence_e │ │ │ -0001d050: 7175 6976 616c 656e 6365 3c2f 7370 616e quivalence :
.&nb │ │ │ -0001d070: 7370 3b26 6e62 7370 3b26 6e62 7370 3b26 sp;  & │ │ │ -0001d080: 6e62 7370 3b3c 6120 636c 6173 733d 2269 nbsp;Equival │ │ │ -0001d0f0: 656e 6365 3c2f 7370 616e 3e3c 2f61 3e20 ence │ │ │ -0001d100: 3c61 2063 6c61 7373 3d22 6964 7265 6622 relation_equiv │ │ │ -0001d180: 616c 656e 6365 3c2f 7370 616e 3e3c 2f61 alence.
. .
. │ │ │ -0001d1a0: 266e 6273 703b 266e 6273 703b 3c73 7061   Glo │ │ │ -0001d1d0: 6261 6c20 496e 7374 616e 6365 3c2f 7370 bal Instance │ │ │ -0001d260: 7265 6c61 7469 6f6e 5f69 6d70 6c69 6361 relation_implica │ │ │ -0001d270: 7469 6f6e 5f70 7265 6f72 6465 723c 2f73 tion_preorder : PreO │ │ │ -0001d2f0: 7264 6572 3c2f 7370 616e 3e3c 2f61 3e20 rder │ │ │ -0001d300: 2840 3c61 2063 6c61 7373 3d22 6964 7265 (@subrelatio │ │ │ -0001d370: 6e3c 2f73 7061 6e3e 3c2f 613e 203c 6120 n < │ │ │ -0001d3c0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -0001d3d0: 7469 746c 653d 2276 6172 6961 626c 6522 title="variable" │ │ │ -0001d3e0: 3e41 3c2f 7370 616e 3e3c 2f61 3e29 2e3c >A).< │ │ │ -0001d3f0: 6272 2f3e 0a20 0a3c 6272 2f3e 0a3c 2f64 br/>. .
...
.

Par │ │ │ -0001d440: 7469 616c 204f 7264 6572 2e3c 2f68 333e tial Order.

│ │ │ -0001d450: 0a0a 2020 2041 2070 6172 7469 616c 206f .. A partial o │ │ │ -0001d460: 7264 6572 2069 7320 6120 7072 656f 7264 rder is a preord │ │ │ -0001d470: 6572 2077 6869 6368 2069 7320 6164 6469 er which is addi │ │ │ -0001d480: 7469 6f6e 616c 6c79 2061 6e74 6973 796d tionally antisym │ │ │ -0001d490: 6d65 7472 6963 2e0a 2020 2057 6520 6769 metric.. We gi │ │ │ -0001d4a0: 7665 2061 6e20 6571 7569 7661 6c65 6e74 ve an equivalent │ │ │ -0001d4b0: 2064 6566 696e 6974 696f 6e2c 2075 702d definition, up- │ │ │ -0001d4c0: 746f 2061 6e20 6571 7569 7661 6c65 6e63 to an equivalenc │ │ │ -0001d4d0: 6520 7265 6c61 7469 6f6e 0a20 2020 6f6e e relation. on │ │ │ -0001d4e0: 2074 6865 2063 6172 7269 6572 2e20 0a3c the carrier. .< │ │ │ -0001d4f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
..
. │ │ │ -0001d510: 266e 6273 703b 266e 6273 703b 3c73 7061   Cla │ │ │ -0001d540: 7373 3c2f 7370 616e 3e20 3c61 2069 643d ss │ │ │ -0001d5d0: 5061 7274 6961 6c4f 7264 6572 3c2f 7370 PartialOrder < │ │ │ -0001d5f0: 6120 6964 3d22 6571 413a 3136 3922 2063 a id="eqA:169" c │ │ │ -0001d600: 6c61 7373 3d22 6964 7265 6622 2068 7265 lass="idref" hre │ │ │ -0001d610: 663d 2223 6571 413a 3136 3922 3e3c 7370 f="#eqA:169">eqA │ │ │ -0001d640: 3c2f 7370 616e 3e3c 2f61 3e20 607b 3c61 `{equ< │ │ │ -0001d6a0: 2f73 7061 6e3e 3c2f 613e 203a 203c 6120 /span> : Equivalence A
eqA< │ │ │ -0001d800: 2f73 7061 6e3e 3c2f 613e 7d20 3c61 2069 /span>} R `{preo │ │ │ -0001d8c0: 3c2f 613e 203a 203c 6120 636c 6173 733d : PreOrder │ │ │ -0001d930: 3c2f 7370 616e 3e3c 2f61 3e20 3c61 2063 │ │ │ -0001d9a0: 413c 2f73 7061 6e3e 3c2f 613e 203c 6120 A R< │ │ │ -0001da10: 2f73 7061 6e3e 3c2f 613e 7d20 3a3d 3c62 /span>} :=.   │ │ │ -0001da30: 266e 6273 703b 266e 6273 703b 3c61 2069   < │ │ │ -0001dac0: 7370 616e 2069 643d 2270 6172 7469 616c span id="partial │ │ │ -0001dad0: 5f6f 7264 6572 5f65 7175 6976 616c 656e _order_equivalen │ │ │ -0001dae0: 6365 2220 636c 6173 733d 2269 6422 3e70 ce" class="id">p │ │ │ -0001daf0: 6172 7469 616c 5f6f 7264 6572 5f65 7175 artial_order_equ │ │ │ -0001db00: 6976 616c 656e 6365 3c2f 7370 616e 3e3c ivalence< │ │ │ -0001db10: 2f73 7061 6e3e 3c2f 613e 203a 203c 6120 /span> : r │ │ │ -0001db90: 656c 6174 696f 6e5f 6571 7569 7661 6c65 elation_equivale │ │ │ -0001dba0: 6e63 653c 2f73 7061 6e3e 3c2f 613e 203c nce < │ │ │ -0001dbb0: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ -0001dbc0: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ -0001dbd0: 732e 5265 6c61 7469 6f6e 436c 6173 7365 s.RelationClasse │ │ │ -0001dbe0: 732e 6874 6d6c 2365 7141 3a31 3639 223e s.html#eqA:169"> │ │ │ -0001dbf0: 3c73 7061 6e20 636c 6173 733d 2269 6422 eqA │ │ │ -0001dc20: 2028 3c61 2063 6c61 7373 3d22 6964 7265 ( │ │ │ -0001dc70: 3c73 7061 6e20 636c 6173 733d 2269 6422 relation_con │ │ │ -0001dca0: 6a75 6e63 7469 6f6e 3c2f 7370 616e 3e3c junction< │ │ │ -0001dcb0: 2f61 3e20 3c61 2063 6c61 7373 3d22 6964 /a> R (flip │ │ │ -0001dd80: 3c2f 7370 616e 3e3c 2f61 3e20 3c61 2063 R)).
..
.
. │ │ │ -0001de10: 0a3c 6469 7620 636c 6173 733d 2264 6f63 .
.The equivalen │ │ │ -0001de30: 6365 2070 726f 6f66 2069 7320 7375 6666 ce proof is suff │ │ │ -0001de40: 6963 6965 6e74 2066 6f72 2070 726f 7669 icient for provi │ │ │ -0001de50: 6e67 2074 6861 7420 3c73 7061 6e20 636c ng that R< │ │ │ -0001de90: 2f73 7061 6e3e 3c2f 7370 616e 3e20 6d75 /span> mu │ │ │ -0001dea0: 7374 2062 6520 610a 2020 206d 6f72 7068 st be a. morph │ │ │ -0001deb0: 6973 6d20 666f 7220 6571 7569 7661 6c65 ism for equivale │ │ │ -0001dec0: 6e63 6520 2873 6565 204d 6f72 7068 6973 nce (see Morphis │ │ │ -0001ded0: 6d73 292e 2020 4974 2069 7320 616c 736f ms). It is also │ │ │ -0001dee0: 2073 7566 6669 6369 656e 7420 746f 0a20 sufficient to. │ │ │ -0001def0: 2020 7368 6f77 2074 6861 7420 3c73 7061 show that R is antisymmetr │ │ │ -0001df50: 6963 2077 2e72 2e74 2e20 3c73 7061 6e20 ic w.r.t. │ │ │ -0001df90: 6571 413c 2f73 7061 6e3e 3c2f 7370 616e eqA .
.
...   │ │ │ -0001dfd0: 3c73 7061 6e20 636c 6173 733d 2269 6422 Global Instance │ │ │ -0001e000: 3c2f 7370 616e 3e20 3c61 2069 643d 2270 partial_orde │ │ │ -0001e080: 725f 616e 7469 7379 6d3c 2f73 7061 6e3e r_antisym │ │ │ -0001e090: 3c2f 613e 2060 283c 6120 6964 3d22 483a `(PartialOrder eqA R │ │ │ -0001e1e0: 3c2f 7370 616e 3e3c 2f73 7061 6e3e 3c2f ) : Anti │ │ │ -0001e260: 7379 6d6d 6574 7269 633c 2f73 7061 6e3e symmetric │ │ │ -0001e270: 3c2f 613e 203c 6120 636c 6173 733d 2269 A eqA R.
..
.  < │ │ │ -0001e3e0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -0001e3f0: 7469 746c 653d 226b 6579 776f 7264 223e title="keyword"> │ │ │ -0001e400: 4c65 6d6d 613c 2f73 7061 6e3e 203c 6120 Lemma PartialOrder │ │ │ -0001e480: 5f69 6e76 6572 7365 3c2f 7370 616e 3e3c _inverse< │ │ │ -0001e490: 2f61 3e20 6028 3c61 2069 643d 2248 3a31 /a> `( │ │ │ -0001e4c0: 3c73 7061 6e20 636c 6173 733d 2269 6422 │ │ │ -0001e4e0: 5061 7274 6961 6c4f 7264 6572 3c2f 7370 PartialOrder eqA R< │ │ │ -0001e5e0: 2f73 7061 6e3e 3c2f 7370 616e 3e3c 2f61 /span>) : Partia │ │ │ -0001e660: 6c4f 7264 6572 3c2f 7370 616e 3e3c 2f61 lOrder eqA< │ │ │ -0001e6e0: 2f61 3e20 283c 6120 636c 6173 733d 2269 /a> (fl │ │ │ -0001e740: 6970 3c2f 7370 616e 3e3c 2f61 3e20 3c61 ip R │ │ │ -0001e7b0: 3c2f 7370 616e 3e3c 2f61 3e29 2e3c 6272 ).
. End │ │ │ -0001e7f0: 3c61 2063 6c61 7373 3d22 6964 7265 6622 │ │ │ -0001e830: 3c73 7061 6e20 636c 6173 733d 2269 6422 Binary.
..
. │ │ │ -0001e870: 235b 3c73 7061 6e20 636c 6173 733d 2269 #[g │ │ │ -0001e890: 6c6f 6261 6c3c 2f73 7061 6e3e 5d3c 6272 lobal]
.Hint │ │ │ -0001e8d0: 3c73 7061 6e20 636c 6173 733d 2269 6422 Extern 3 │ │ │ -0001e900: 2028 3c61 2063 6c61 7373 3d22 6964 7265 (
PartialOr │ │ │ -0001e970: 6465 723c 2f73 7061 6e3e 3c2f 613e 2028 der ( │ │ │ -0001e980: 3c61 2063 6c61 7373 3d22 6964 7265 6622 flip
_)) │ │ │ -0001ea10: 203d 2667 743b 203c 7370 616e 2063 6c61 => class_apply< │ │ │ -0001ea40: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> PartialOrder │ │ │ -0001ea70: 5f69 6e76 6572 7365 3c2f 7370 616e 3e20 _inverse │ │ │ -0001ea80: 3a20 3c73 7061 6e20 636c 6173 733d 2269 : t │ │ │ -0001eaa0: 7970 6563 6c61 7373 5f69 6e73 7461 6e63 ypeclass_instanc │ │ │ -0001eab0: 6573 3c2f 7370 616e 3e2e 3c62 722f 3e0a es.
. │ │ │ -0001eac0: 0a3c 6272 2f3e 0a3c 2f64 6976 3e0a 0a3c .
.
..< │ │ │ -0001ead0: 6469 7620 636c 6173 733d 2264 6f63 223e div class="doc"> │ │ │ -0001eae0: 0a54 6865 2070 6172 7469 616c 206f 7264 .The partial ord │ │ │ -0001eaf0: 6572 2064 6566 696e 6564 2062 7920 7375 er defined by su │ │ │ -0001eb00: 6272 656c 6174 696f 6e20 616e 6420 7265 brelation and re │ │ │ -0001eb10: 6c61 7469 6f6e 2065 7175 6976 616c 656e lation equivalen │ │ │ -0001eb20: 6365 2e20 0a3c 2f64 6976 3e0a 3c64 6976 ce. .
.
.. │ │ │ -0001eb40: 3c62 722f 3e0a 235b 3c73 7061 6e20 636c
.#[global]
.Program
Instance subrel │ │ │ -0001ec50: 6174 696f 6e5f 7061 7274 6961 6c5f 6f72 ation_partial_or │ │ │ -0001ec60: 6465 723c 2f73 7061 6e3e 3c2f 613e 207b der { │ │ │ -0001ec70: 3c61 2069 643d 2241 3a31 3835 2220 636c A} :
.& │ │ │ -0001ecd0: 6e62 7370 3b26 6e62 7370 3b3c 6120 636c nbsp;  │ │ │ -0001ed40: 5061 7274 6961 6c4f 7264 6572 3c2f 7370 PartialOrder (@rela │ │ │ -0001edd0: 7469 6f6e 5f65 7175 6976 616c 656e 6365 tion_equivalence │ │ │ -0001ede0: 3c2f 7370 616e 3e3c 2f61 3e20 3c61 2063 A) │ │ │ -0001eea0: 3c73 7061 6e20 636c 6173 733d 2269 6422 s │ │ │ -0001eec0: 7562 7265 6c61 7469 6f6e 3c2f 7370 616e ubrelation.
..
..
.Globa │ │ │ -0001ef10: 6c20 5479 7065 636c 6173 7365 7320 4f70 l Typeclasses Op │ │ │ -0001ef20: 6171 7565 3c2f 7370 616e 3e20 3c73 7061 aque arrows< │ │ │ -0001ef50: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> predicate_im │ │ │ -0001ef80: 706c 6963 6174 696f 6e3c 2f73 7061 6e3e plication │ │ │ -0001ef90: 203c 7370 616e 2063 6c61 7373 3d22 6964 pr │ │ │ -0001efb0: 6564 6963 6174 655f 6571 7569 7661 6c65 edicate_equivale │ │ │ -0001efc0: 6e63 653c 2f73 7061 6e3e 3c62 722f 3e0a nce
. │ │ │ -0001efd0: 266e 6273 703b 266e 6273 703b 266e 6273   &nbs │ │ │ -0001efe0: 703b 266e 6273 703b 266e 6273 703b 266e p;  &n │ │ │ -0001eff0: 6273 703b 266e 6273 703b 266e 6273 703b bsp;   │ │ │ -0001f000: 266e 6273 703b 266e 6273 703b 266e 6273   &nbs │ │ │ -0001f010: 703b 266e 6273 703b 3c73 7061 6e20 636c p; relation_eq │ │ │ -0001f040: 7569 7661 6c65 6e63 653c 2f73 7061 6e3e uivalence │ │ │ -0001f050: 203c 7370 616e 2063 6c61 7373 3d22 6964 po │ │ │ -0001f070: 696e 7477 6973 655f 6c69 6674 696e 673c intwise_lifting< │ │ │ -0001f080: 2f73 7061 6e3e 2e3c 6272 2f3e 0a0a 3c62 /span>.
....
.Regi │ │ │ -0001f0c0: 7374 6572 3c2f 7370 616e 3e20 3c73 7061 ster relatio │ │ │ -0001f0f0: 6e3c 2f73 7061 6e3e 203c 7370 616e 2063 n
as rewrite.prop.re │ │ │ -0001f150: 6c61 7469 6f6e 3c2f 7370 616e 3e2e 3c62 lation..Register
subrelation
as │ │ │ -0001f1f0: 3c73 7061 6e20 636c 6173 733d 2269 6422 rew │ │ │ -0001f210: 7269 7465 2e70 726f 702e 7375 6272 656c rite.prop.subrel │ │ │ -0001f220: 6174 696f 6e3c 2f73 7061 6e3e 2e3c 6272 ation.
.Register Reflexive as rewrit │ │ │ -0001f2e0: 652e 7072 6f70 2e52 6566 6c65 7869 7665 e.prop.Reflexive │ │ │ -0001f2f0: 3c2f 7370 616e 3e2e 3c62 722f 3e0a 3c73 .
.R │ │ │ -0001f320: 6567 6973 7465 723c 2f73 7061 6e3e 203c egister < │ │ │ -0001f330: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -0001f340: 7469 746c 653d 2274 6163 7469 6322 3e72 title="tactic">r │ │ │ -0001f350: 6566 6c65 7869 7669 7479 3c2f 7370 616e eflexivity as rewrit │ │ │ -0001f3b0: 652e 7072 6f70 2e72 6566 6c65 7869 7669 e.prop.reflexivi │ │ │ -0001f3c0: 7479 3c2f 7370 616e 3e2e 3c62 722f 3e0a ty.
. │ │ │ -0001f3d0: 3c73 7061 6e20 636c 6173 733d 2269 6422 Register │ │ │ -0001f400: 203c 7370 616e 2063 6c61 7373 3d22 6964 Sy │ │ │ -0001f420: 6d6d 6574 7269 633c 2f73 7061 6e3e 203c mmetric < │ │ │ -0001f430: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ -0001f440: 7469 746c 653d 226b 6579 776f 7264 223e title="keyword"> │ │ │ -0001f450: 6173 3c2f 7370 616e 3e20 3c73 7061 6e20 as rewrite.p │ │ │ -0001f480: 726f 702e 5379 6d6d 6574 7269 633c 2f73 rop.Symmetric
.
.Regi │ │ │ -0001f4c0: 7374 6572 3c2f 7370 616e 3e20 3c73 7061 ster symm │ │ │ -0001f4f0: 6574 7279 3c2f 7370 616e 3e20 3c73 7061 etry as< │ │ │ -0001f520: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> rewrite.prop │ │ │ -0001f550: 2e73 796d 6d65 7472 793c 2f73 7061 6e3e .symmetry │ │ │ -0001f560: 2e3c 6272 2f3e 0a3c 7370 616e 2063 6c61 .
.Register │ │ │ -0001f590: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c Transitive< │ │ │ -0001f5c0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> as r │ │ │ -0001f610: 6577 7269 7465 2e70 726f 702e 5472 616e ewrite.prop.Tran │ │ │ -0001f620: 7369 7469 7665 3c2f 7370 616e 3e2e 3c62 sitive..Register transitivit │ │ │ -0001f690: 793c 2f73 7061 6e3e 203c 7370 616e 2063 y as rewrite.prop.tr │ │ │ -0001f6f0: 616e 7369 7469 7669 7479 3c2f 7370 616e ansitivity.
.
. │ │ │ -0001f710: 2020 203c 6469 7620 6964 3d22 7369 6465
. │ │ │ -0001f730: 2020 203c 6469 7620 6964 3d22 7369 6465
. .

Na │ │ │ -0001f780: 7669 6761 7469 6f6e 3c2f 6832 3e0a 2020 vigation

. │ │ │ -0001f790: 2020 2020 2020 2020 3c64 6976 2063 6c61
. │ │ │ -0001f7b0: 2020 2020 2020 2020 2020 3c75 6c20 636c
    . │ │ │ -0001f7d0: 2020 2020 2020 2020 2020 3c6c 6920 636c
  • Stand │ │ │ -0001f7f0: 6172 6420 4c69 6272 6172 790a 2020 2020 ard Library. │ │ │ -0001f800: 2020 2020 2020 2020 2020 2020 3c75 6c20 . │ │ │ -0001f8c0: 2020 2020 203c 2f6c 693e 0a20 2020 2020
  • . │ │ │ -0001f8d0: 2020 2020 2020 203c 2f75 6c3e 0a20 2020
. │ │ │ -0001f8e0: 2020 2020 2020 203c 2f64 6976 3e0a 2020
. │ │ │ -0001f8f0: 2020 2020 2020 3c2f 6469 763e 0a20 2020
. │ │ │ -0001f900: 2020 203c 2f64 6976 3e0a 2020 2020 3c2f
. ..
.. │ │ │ -0001f920: 2020 3c64 6976 2069 643d 2266 6f6f 7465
.
. │ │ │ -0001f950: 2020 2020 3c75 6c20 636c 6173 733d 226c
. │ │ │ -0001fa60: 3c2f 6469 763e 0a0a 3c2f 6469 763e 0a0a
..
.. │ │ │ -0001fa70: 3c2f 626f 6479 3e0a 3c2f 6874 6d6c 3e0a .. │ │ │ +000006d0: 6c61 6235 3139 223e 3c2f 613e 3c68 3120 lab519">

│ │ │ +000006f0: 5479 7065 636c 6173 732d 6261 7365 6420 Typeclass-based │ │ │ +00000700: 7265 6c61 7469 6f6e 732c 2074 6163 7469 relations, tacti │ │ │ +00000710: 6373 2061 6e64 2073 7461 6e64 6172 6420 cs and standard │ │ │ +00000720: 696e 7374 616e 6365 733c 2f68 313e 0a0a instances

.. │ │ │ +00000730: 0a3c 6469 7620 636c 6173 733d 2270 6172 .
. │ │ │ +00000750: 0a20 2020 5468 6973 2069 7320 7468 6520 . This is the │ │ │ +00000760: 6261 7369 6320 7468 656f 7279 206e 6565 basic theory nee │ │ │ +00000770: 6465 6420 746f 2066 6f72 6d61 6c69 7a65 ded to formalize │ │ │ +00000780: 206d 6f72 7068 6973 6d73 2061 6e64 2073 morphisms and s │ │ │ +00000790: 6574 6f69 6473 2e0a 0a3c 6469 7620 636c etoids...
│ │ │ +000007b0: 203c 2f64 6976 3e0a 0a20 2020 4175 7468
.. Auth │ │ │ +000007c0: 6f72 3a20 4d61 7474 6869 6575 2053 6f7a or: Matthieu Soz │ │ │ +000007d0: 6561 750a 2020 2049 6e73 7469 7475 7469 eau. Instituti │ │ │ +000007e0: 6f6e 3a20 4c52 492c 2043 4e52 5320 554d on: LRI, CNRS UM │ │ │ +000007f0: 5220 3836 3233 202d 2055 6e69 7665 7273 R 8623 - Univers │ │ │ +00000800: 6974 7920 5061 7269 7320 5375 640a 0a3c ity Paris Sud..< │ │ │ +00000810: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
..
. │ │ │ +00000830: 3c73 7061 6e20 636c 6173 733d 2269 6422 Require │ │ │ +00000860: 3c73 7061 6e20 636c 6173 733d 2269 6422 Export < │ │ │ +00000890: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ +000008a0: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ +000008b0: 732e 496e 6974 2e68 746d 6c23 223e 3c73 s.Init.html#">C │ │ │ +000008e0: 6f71 2e43 6c61 7373 6573 2e49 6e69 743c oq.Classes.Init< │ │ │ +000008f0: 2f73 7061 6e3e 3c2f 613e 2e3c 6272 2f3e /span>.
│ │ │ +00000900: 0a3c 7370 616e 2063 6c61 7373 3d22 6964 .Require │ │ │ +00000930: 203c 7370 616e 2063 6c61 7373 3d22 6964 Import │ │ │ +00000960: 3c61 2063 6c61 7373 3d22 6964 7265 6622 Coq.Program.Ba │ │ │ +000009c0: 7369 6373 3c2f 7370 616e 3e3c 2f61 3e2e sics. │ │ │ +000009d0: 3c62 722f 3e0a 3c73 7061 6e20 636c 6173
.Require Import
Coq.Prog │ │ │ +00000a90: 7261 6d2e 5461 6374 6963 733c 2f73 7061 ram.Tactics.
.Re │ │ │ +00000ad0: 7175 6972 653c 2f73 7061 6e3e 203c 7370 quire Im │ │ │ +00000b00: 706f 7274 3c2f 7370 616e 3e20 3c61 2063 port Co │ │ │ +00000b70: 712e 5265 6c61 7469 6f6e 732e 5265 6c61 q.Relations.Rela │ │ │ +00000b80: 7469 6f6e 5f44 6566 696e 6974 696f 6e73 tion_Definitions │ │ │ +00000b90: 3c2f 7370 616e 3e3c 2f61 3e2e 3c62 722f .
..
.Genera │ │ │ +00000bd0: 6c69 7a61 626c 6520 5661 7269 6162 6c65 lizable Variable │ │ │ +00000be0: 733c 2f73 7061 6e3e 203c 7370 616e 2063 s A < │ │ │ +00000c10: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +00000c20: 7469 746c 653d 2276 6172 223e 423c 2f73 title="var">B
C D │ │ │ +00000c80: 203c 7370 616e 2063 6c61 7373 3d22 6964 R< │ │ │ +00000ca0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> S T │ │ │ +00000d10: 553c 2f73 7061 6e3e 203c 7370 616e 2063 U l < │ │ │ +00000d40: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +00000d50: 7469 746c 653d 2276 6172 223e 6571 413c title="var">eqA< │ │ │ +00000d60: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> eqB < │ │ │ +00000d90: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +00000da0: 7469 746c 653d 2276 6172 223e 6571 433c title="var">eqC< │ │ │ +00000db0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> eqD.< │ │ │ +00000de0: 6272 2f3e 0a0a 3c62 722f 3e0a 3c2f 6469 br/>..
...
.We allow t │ │ │ +00000e10: 6f20 756e 666f 6c64 2074 6865 203c 7370 o unfold the relation defini │ │ │ +00000e70: 7469 6f6e 2077 6869 6c65 2064 6f69 6e67 tion while doing │ │ │ +00000e80: 206d 6f72 7068 6973 6d20 7365 6172 6368 morphism search │ │ │ +00000e90: 2e20 0a3c 2f64 6976 3e0a 3c64 6976 2063 . .
.
...Section Def │ │ │ +00000f30: 733c 2f73 7061 6e3e 3c2f 613e 2e3c 6272 s.
.  < │ │ │ +00000f50: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +00000f60: 7469 746c 653d 226b 6579 776f 7264 223e title="keyword"> │ │ │ +00000f70: 436f 6e74 6578 743c 2f73 7061 6e3e 207b Context { │ │ │ +00000f80: 3c61 2069 643d 2244 6566 732e 4122 2063 A< │ │ │ +00000fd0: 2f73 7061 6e3e 3c2f 613e 203a 203c 7370 /span> : Ty │ │ │ +00001000: 7065 3c2f 7370 616e 3e7d 2e3c 6272 2f3e pe}.
│ │ │ +00001010: 0a0a 3c62 722f 3e0a 3c2f 6469 763e 0a0a ..
.
.. │ │ │ +00001020: 3c64 6976 2063 6c61 7373 3d22 646f 6322
.We rebind rela │ │ │ +00001040: 7469 6f6e 616c 2070 726f 7065 7274 6965 tional propertie │ │ │ +00001050: 7320 696e 2073 6570 6172 6174 6520 636c s in separate cl │ │ │ +00001060: 6173 7365 7320 746f 2062 6520 6162 6c65 asses to be able │ │ │ +00001070: 2074 6f20 6f76 6572 6c6f 6164 2065 6163 to overload eac │ │ │ +00001080: 6820 7072 6f6f 662e 200a 3c2f 6469 763e h proof. .
│ │ │ +00001090: 0a3c 6469 7620 636c 6173 733d 2263 6f64 .
..
.  │ │ │ +000010b0: 3b26 6e62 7370 3b3c 7370 616e 2063 6c61 ; Class Reflexive (< │ │ │ +00001180: 6120 6964 3d22 523a 3222 2063 6c61 7373 a id="R:2" class │ │ │ +00001190: 3d22 6964 7265 6622 2068 7265 663d 2223 ="idref" href="# │ │ │ +000011a0: 523a 3222 3e3c 7370 616e 2063 6c61 7373 R:2">R : relation │ │ │ +00001250: 3c2f 613e 203c 6120 636c 6173 733d 2269 A< │ │ │ +000012c0: 2f61 3e29 203a 3d3c 6272 2f3e 0a26 6e62 /a>) :=
.&nb │ │ │ +000012d0: 7370 3b26 6e62 7370 3b26 6e62 7370 3b26 sp;  & │ │ │ +000012e0: 6e62 7370 3b3c 6120 6964 3d22 7265 666c nbsp;
re │ │ │ +00001370: 666c 6578 6976 6974 793c 2f73 7061 6e3e flexivity │ │ │ +00001380: 3c2f 7370 616e 3e3c 2f61 3e20 3a20 3c73 : f │ │ │ +000013b0: 6f72 616c 6c3c 2f73 7061 6e3e 203c 6120 orall x │ │ │ +00001410: 3a20 3c61 2063 6c61 7373 3d22 6964 7265 : A │ │ │ +00001480: 2c20 3c61 2063 6c61 7373 3d22 6964 7265 , < │ │ │ +000014c0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +000014d0: 7469 746c 653d 2276 6172 6961 626c 6522 title="variable" │ │ │ +000014e0: 3e52 3c2f 7370 616e 3e3c 2f61 3e20 3c61 >R x x.
..
.  < │ │ │ +000015e0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +000015f0: 7469 746c 653d 226b 6579 776f 7264 223e title="keyword"> │ │ │ +00001600: 4465 6669 6e69 7469 6f6e 3c2f 7370 616e Definition comple │ │ │ +00001670: 6d65 6e74 3c2f 7370 616e 3e3c 2f61 3e20 ment │ │ │ +00001680: 283c 6120 6964 3d22 523a 3622 2063 6c61 (R< │ │ │ +000016d0: 2f61 3e20 3a20 3c61 2063 6c61 7373 3d22 /a> : < │ │ │ +00001720: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +00001730: 7469 746c 653d 2264 6566 696e 6974 696f title="definitio │ │ │ +00001740: 6e22 3e72 656c 6174 696f 6e3c 2f73 7061 n">relation A) : relation A
:= fun │ │ │ +000018e0: 3c2f 7370 616e 3e20 3c61 2069 643d 2278 x< │ │ │ +00001930: 2f73 7061 6e3e 3c2f 613e 203c 6120 6964 /span> y =& │ │ │ +00001990: 6774 3b20 3c61 2063 6c61 7373 3d22 6964 gt; R │ │ │ +00001a00: 3c61 2063 6c61 7373 3d22 6964 7265 6622 x │ │ │ +00001a60: 3c2f 7370 616e 3e3c 2f61 3e20 3c61 2063 y - │ │ │ +00001b40: 2667 743b 3c2f 7370 616e 3e3c 2f61 3e20 > │ │ │ +00001b50: 3c61 2063 6c61 7373 3d22 6964 7265 6622 False.
..
.
..
.Opa │ │ │ +00001be0: 7175 6520 666f 7220 7072 6f6f 662d 7365 que for proof-se │ │ │ +00001bf0: 6172 6368 2e20 0a3c 2f64 6976 3e0a 3c64 arch. .
. │ │ │ +00001c10: 0a26 6e62 7370 3b26 6e62 7370 3b3c 7370 .  Ty │ │ │ +00001c40: 7065 636c 6173 7365 7320 4f70 6171 7565 peclasses Opaque │ │ │ +00001c50: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c
complement< │ │ │ +00001c80: 2f73 7061 6e3e 2e3c 6272 2f3e 0a0a 3c62 /span>.
...
..
.Th │ │ │ +00001cb0: 6573 6520 6172 6520 636f 6e76 6572 7469 ese are converti │ │ │ +00001cc0: 626c 652e 200a 3c2f 6469 763e 0a3c 6469 ble. .
.. │ │ │ +00001ce0: 266e 6273 703b 266e 6273 703b 3c73 7061   Lem │ │ │ +00001d10: 6d61 3c2f 7370 616e 3e20 3c61 2069 643d ma com │ │ │ +00001d80: 706c 656d 656e 745f 696e 7665 7273 653c plement_inverse< │ │ │ +00001d90: 2f73 7061 6e3e 3c2f 613e 203c 6120 6964 /span> R : │ │ │ +00001df0: 3c61 2063 6c61 7373 3d22 6964 7265 6622 compleme │ │ │ +00001e60: 6e74 3c2f 7370 616e 3e3c 2f61 3e20 283c nt (< │ │ │ +00001e70: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ +00001e80: 6872 6566 3d22 436f 712e 5072 6f67 7261 href="Coq.Progra │ │ │ +00001e90: 6d2e 4261 7369 6373 2e68 746d 6c23 666c m.Basics.html#fl │ │ │ +00001ea0: 6970 223e 3c73 7061 6e20 636c 6173 733d ip">flip R< │ │ │ +00001f40: 2f61 3e29 203c 6120 636c 6173 733d 2269 /a>) = │ │ │ +00001fc0: 203c 6120 636c 6173 733d 2269 6472 6566 flip (< │ │ │ +00002070: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +00002080: 7469 746c 653d 2264 6566 696e 6974 696f title="definitio │ │ │ +00002090: 6e22 3e63 6f6d 706c 656d 656e 743c 2f73 n">complement R │ │ │ +00002110: 3c2f 613e 292e 3c62 722f 3e0a 200a 3c62 ).
. ..   │ │ │ +00002130: 3c73 7061 6e20 636c 6173 733d 2269 6422 Class < │ │ │ +000021c0: 7370 616e 2069 643d 2249 7272 6566 6c65 span id="Irrefle │ │ │ +000021d0: 7869 7665 2220 636c 6173 733d 2269 6422 xive" class="id" │ │ │ +000021e0: 3e49 7272 6566 6c65 7869 7665 3c2f 7370 >Irreflexive ( │ │ │ +00002200: 3c61 2069 643d 2252 3a31 3022 2063 6c61 R │ │ │ +00002250: 3c2f 613e 203a 203c 6120 636c 6173 733d : │ │ │ +000022a0: 3c73 7061 6e20 636c 6173 733d 2269 6422 relation A
) :=
. │ │ │ +00002350: 266e 6273 703b 266e 6273 703b 266e 6273   &nbs │ │ │ +00002360: 703b 266e 6273 703b 3c61 2069 643d 2269 p; irreflexi │ │ │ +00002400: 7669 7479 3c2f 7370 616e 3e3c 2f73 7061 vity : Refle │ │ │ +00002480: 7869 7665 3c2f 7370 616e 3e3c 2f61 3e20 xive │ │ │ +00002490: 283c 6120 636c 6173 733d 2269 6472 6566 (complem │ │ │ +00002500: 656e 743c 2f73 7061 6e3e 3c2f 613e 203c ent < │ │ │ +00002510: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ +00002520: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ +00002530: 732e 5265 6c61 7469 6f6e 436c 6173 7365 s.RelationClasse │ │ │ +00002540: 732e 6874 6d6c 2352 3a31 3022 3e3c 7370 s.html#R:10">R │ │ │ +00002570: 3c2f 7370 616e 3e3c 2f61 3e29 2e3c 6272 ).
..
.  │ │ │ +00002590: 266e 6273 703b 3c73 7061 6e20 636c 6173  Class
Symmetric (R : relation A │ │ │ +000027a0: 3c2f 613e 2920 3a3d 3c62 722f 3e0a 266e ) :=
.&n │ │ │ +000027b0: 6273 703b 266e 6273 703b 266e 6273 703b bsp;   │ │ │ +000027c0: 266e 6273 703b 3c61 2069 643d 2273 796d  symmetry │ │ │ +00002860: 203a 203c 7370 616e 2063 6c61 7373 3d22 : forall {x │ │ │ +00002910: 3c73 7061 6e20 636c 6173 733d 2269 6422 │ │ │ +00002930: 793c 2f73 7061 6e3e 3c2f 613e 7d2c 203c y}, < │ │ │ +00002940: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ +00002950: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ +00002960: 732e 5265 6c61 7469 6f6e 436c 6173 7365 s.RelationClasse │ │ │ +00002970: 732e 6874 6d6c 2352 3a31 3322 3e3c 7370 s.html#R:13">R │ │ │ +000029a0: 3c2f 7370 616e 3e3c 2f61 3e20 3c61 2063 x
y -&g │ │ │ +00002af0: 743b 3c2f 7370 616e 3e3c 2f61 3e20 3c61 t; R< │ │ │ +00002b60: 2f73 7061 6e3e 3c2f 613e 203c 6120 636c /span> y x │ │ │ +00002c40: 3c2f 613e 2e3c 6272 2f3e 0a0a 3c62 722f .
..
.  C │ │ │ +00002c80: 6c61 7373 3c2f 7370 616e 3e20 3c61 2069 lass │ │ │ +00002cc0: 3c73 7061 6e20 636c 6173 733d 2269 6422 Asym │ │ │ +00002d10: 6d65 7472 6963 3c2f 7370 616e 3e3c 2f73 metric (R : │ │ │ +00002d80: 203c 6120 636c 6173 733d 2269 6472 6566 re │ │ │ +00002df0: 6c61 7469 6f6e 3c2f 7370 616e 3e3c 2f61 lation A │ │ │ +00002e70: 2920 3a3d 3c62 722f 3e0a 266e 6273 703b ) :=
.  │ │ │ +00002e80: 266e 6273 703b 266e 6273 703b 266e 6273   &nbs │ │ │ +00002e90: 703b 3c61 2069 643d 2261 7379 6d6d 6574 p;asymmetry │ │ │ +00002f30: 203a 203c 7370 616e 2063 6c61 7373 3d22 : forall {x │ │ │ +00002fe0: 3c73 7061 6e20 636c 6173 733d 2269 6422 │ │ │ +00003000: 793c 2f73 7061 6e3e 3c2f 613e 7d2c 203c y}, < │ │ │ +00003010: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ +00003020: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ +00003030: 732e 5265 6c61 7469 6f6e 436c 6173 7365 s.RelationClasse │ │ │ +00003040: 732e 6874 6d6c 2352 3a31 3822 3e3c 7370 s.html#R:18">R │ │ │ +00003070: 3c2f 7370 616e 3e3c 2f61 3e20 3c61 2063 x
y -&g │ │ │ +000031c0: 743b 3c2f 7370 616e 3e3c 2f61 3e20 3c61 t; R< │ │ │ +00003230: 2f73 7061 6e3e 3c2f 613e 203c 6120 636c /span> y x │ │ │ +00003310: 3c2f 613e 203c 6120 636c 6173 733d 2269 -> │ │ │ +00003380: 3b3c 2f73 7061 6e3e 3c2f 613e 203c 6120 ; < │ │ │ +000033c0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +000033d0: 7469 746c 653d 2269 6e64 7563 7469 7665 title="inductive │ │ │ +000033e0: 223e 4661 6c73 653c 2f73 7061 6e3e 3c2f ">False.
..
. │ │ │ +00003400: 266e 6273 703b 266e 6273 703b 3c73 7061   Cla │ │ │ +00003430: 7373 3c2f 7370 616e 3e20 3c61 2069 643d ss
Transi │ │ │ +000034c0: 7469 7665 3c2f 7370 616e 3e3c 2f73 7061 tive ( │ │ │ +00003500: 3c73 7061 6e20 636c 6173 733d 2269 6422 │ │ │ +00003520: 523c 2f73 7061 6e3e 3c2f 613e 203a 203c R : < │ │ │ +00003530: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ +00003540: 6872 6566 3d22 436f 712e 5265 6c61 7469 href="Coq.Relati │ │ │ +00003550: 6f6e 732e 5265 6c61 7469 6f6e 5f44 6566 ons.Relation_Def │ │ │ +00003560: 696e 6974 696f 6e73 2e68 746d 6c23 7265 initions.html#re │ │ │ +00003570: 6c61 7469 6f6e 223e 3c73 7061 6e20 636c lation">rela │ │ │ +000035a0: 7469 6f6e 3c2f 7370 616e 3e3c 2f61 3e20 tion │ │ │ +000035b0: 3c61 2063 6c61 7373 3d22 6964 7265 6622 │ │ │ +000035f0: 3c73 7061 6e20 636c 6173 733d 2269 6422 A) │ │ │ +00003620: 3a3d 3c62 722f 3e0a 266e 6273 703b 266e :=
. &n │ │ │ +00003630: 6273 703b 266e 6273 703b 266e 6273 703b bsp;   │ │ │ +00003640: 3c61 2069 643d 2274 7261 6e73 6974 6976 tran │ │ │ +000036d0: 7369 7469 7669 7479 3c2f 7370 616e 3e3c sitivity< │ │ │ +000036e0: 2f73 7061 6e3e 3c2f 613e 203a 203c 7370 /span> : fo │ │ │ +00003710: 7261 6c6c 3c2f 7370 616e 3e20 7b3c 6120 rall {x y < │ │ │ +000037f0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +00003800: 7469 746c 653d 2262 696e 6465 7222 3e7a title="binder">z │ │ │ +00003810: 3c2f 7370 616e 3e3c 2f61 3e7d 2c20 3c61 }, R< │ │ │ +00003880: 2f73 7061 6e3e 3c2f 613e 203c 6120 636c /span> x y │ │ │ +00003960: 3c2f 613e 203c 6120 636c 6173 733d 2269 -> │ │ │ +000039d0: 3b3c 2f73 7061 6e3e 3c2f 613e 203c 6120 ; R y z< │ │ │ +00003b20: 2f61 3e20 3c61 2063 6c61 7373 3d22 6964 /a> -> │ │ │ +00003b90: 3c2f 7370 616e 3e3c 2f61 3e20 3c61 2063 R
x z.
..
. │ │ │ +00003cf0: 3c2f 6469 763e 0a0a 3c64 6976 2063 6c61
..
.Variou │ │ │ +00003d10: 7320 636f 6d62 696e 6174 696f 6e73 206f s combinations o │ │ │ +00003d20: 6620 7265 666c 6578 6976 6974 792c 2073 f reflexivity, s │ │ │ +00003d30: 796d 6d65 7472 7920 616e 6420 7472 616e ymmetry and tran │ │ │ +00003d40: 7369 7469 7669 7479 2e20 0a3c 6469 7620 sitivity. .
.. A PreOrder is bo │ │ │ +00003dc0: 7468 2052 6566 6c65 7869 7665 2061 6e64 th Reflexive and │ │ │ +00003dd0: 2054 7261 6e73 6974 6976 652e 200a 3c2f Transitive. ..
..
.& │ │ │ +00003e00: 6e62 7370 3b26 6e62 7370 3b3c 7370 616e nbsp; Clas │ │ │ +00003e30: 733c 2f73 7061 6e3e 203c 6120 6964 3d22 s
PreOrde │ │ │ +00003e90: 723c 2f73 7061 6e3e 3c2f 613e 2028 3c61 r (R : relation A │ │ │ +00003fe0: 3c2f 613e 2920 3a20 3c73 7061 6e20 636c ) : Prop := {
.& │ │ │ +00004020: 6e62 7370 3b26 6e62 7370 3b26 6e62 7370 nbsp;   │ │ │ +00004030: 3b26 6e62 7370 3b23 5b3c 7370 616e 2063 ; #[global] Pre │ │ │ +000040d0: 4f72 6465 725f 5265 666c 6578 6976 653c Order_Reflexive< │ │ │ +000040e0: 2f73 7061 6e3e 3c2f 613e 203a 3a20 3c61 /span> :: │ │ │ +00004150: 5265 666c 6578 6976 653c 2f73 7061 6e3e Reflexive │ │ │ +00004160: 3c2f 613e 203c 6120 636c 6173 733d 2269 R | 2 ;
.&nb │ │ │ +000041e0: 7370 3b26 6e62 7370 3b26 6e62 7370 3b26 sp;  & │ │ │ +000041f0: 6e62 7370 3b23 5b3c 7370 616e 2063 6c61 nbsp;#[global] Pre │ │ │ +00004290: 4f72 6465 725f 5472 616e 7369 7469 7665 Order_Transitive │ │ │ +000042a0: 3c2f 7370 616e 3e3c 2f61 3e20 3a3a 203c :: < │ │ │ +000042b0: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ +000042c0: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ +000042d0: 732e 5265 6c61 7469 6f6e 436c 6173 7365 s.RelationClasse │ │ │ +000042e0: 732e 6874 6d6c 2354 7261 6e73 6974 6976 s.html#Transitiv │ │ │ +000042f0: 6522 3e3c 7370 616e 2063 6c61 7373 3d22 e">Transitive R │ │ │ +00004390: 3c2f 613e 207c 2032 207d 2e3c 6272 2f3e | 2 }.
│ │ │ +000043a0: 0a0a 3c62 722f 3e0a 3c2f 6469 763e 0a0a ..
.
.. │ │ │ +000043b0: 3c64 6976 2063 6c61 7373 3d22 646f 6322
.A Strict │ │ │ +00004400: 4f72 6465 723c 2f73 7061 6e3e 3c2f 7370 Order is both Irre │ │ │ +00004420: 666c 6578 6976 6520 616e 6420 5472 616e flexive and Tran │ │ │ +00004430: 7369 7469 7665 2e20 0a3c 2f64 6976 3e0a sitive. .
. │ │ │ +00004440: 3c64 6976 2063 6c61 7373 3d22 636f 6465
..
.  │ │ │ +00004460: 266e 6273 703b 3c73 7061 6e20 636c 6173  Class Strict │ │ │ +000044f0: 4f72 6465 723c 2f73 7061 6e3e 3c2f 613e Order │ │ │ +00004500: 2028 3c61 2069 643d 2252 3a33 3322 2063 (R : relation A
) : Pro │ │ │ +00004670: 703c 2f73 7061 6e3e 203a 3d20 7b3c 6272 p := {
.  & │ │ │ +00004690: 6e62 7370 3b26 6e62 7370 3b23 5b3c 7370 nbsp; #[global │ │ │ +000046c0: 3c2f 7370 616e 3e5d 203c 6120 6964 3d22 ] Stric │ │ │ +00004740: 744f 7264 6572 5f49 7272 6566 6c65 7869 tOrder_Irreflexi │ │ │ +00004750: 7665 3c2f 7370 616e 3e3c 2f61 3e20 3a3a ve :: │ │ │ +00004760: 203c 6120 636c 6173 733d 2269 6472 6566 Irreflexive │ │ │ +000047d0: 3c2f 7370 616e 3e3c 2f61 3e20 3c61 2063 R
;
. │ │ │ +00004850: 266e 6273 703b 266e 6273 703b 266e 6273   &nbs │ │ │ +00004860: 703b 266e 6273 703b 235b 3c73 7061 6e20 p; #[global] StrictOrde │ │ │ +00004910: 725f 5472 616e 7369 7469 7665 3c2f 7370 r_Transitive :: < │ │ │ +00004970: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +00004980: 7469 746c 653d 2263 6c61 7373 223e 5472 title="class">Tr │ │ │ +00004990: 616e 7369 7469 7665 3c2f 7370 616e 3e3c ansitive< │ │ │ +000049a0: 2f61 3e20 3c61 2063 6c61 7373 3d22 6964 /a> R │ │ │ +00004a10: 207d 2e3c 6272 2f3e 0a0a 3c62 722f 3e0a }.
..
. │ │ │ +00004a20: 3c2f 6469 763e 0a0a 3c64 6976 2063 6c61
..
.By def │ │ │ +00004a40: 696e 6974 696f 6e2c 2061 2073 7472 6963 inition, a stric │ │ │ +00004a50: 7420 6f72 6465 7220 6973 2061 6c73 6f20 t order is also │ │ │ +00004a60: 6173 796d 6d65 7472 6963 200a 3c2f 6469 asymmetric ... │ │ │ +00004d30: 0a3c 6469 7620 636c 6173 733d 2264 6f63 .
.A partial equ │ │ │ +00004d50: 6976 616c 656e 6365 2072 656c 6174 696f ivalence relatio │ │ │ +00004d60: 6e20 6973 2053 796d 6d65 7472 6963 2061 n is Symmetric a │ │ │ +00004d70: 6e64 2054 7261 6e73 6974 6976 652e 200a nd Transitive. . │ │ │ +00004d80: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
..
│ │ │ +00004da0: 0a26 6e62 7370 3b26 6e62 7370 3b3c 7370 .  Cl │ │ │ +00004dd0: 6173 733c 2f73 7061 6e3e 203c 6120 6964 ass PER │ │ │ +00004e30: 283c 6120 6964 3d22 523a 3339 2220 636c (R : relation A) : Prop │ │ │ +00004fa0: 3c2f 7370 616e 3e20 3a3d 207b 3c62 722f := {
.  &n │ │ │ +00004fc0: 6273 703b 266e 6273 703b 235b 3c73 7061 bsp; #[global< │ │ │ +00004ff0: 2f73 7061 6e3e 5d20 3c61 2069 643d 2250 /span>] PER_Symmet │ │ │ +00005060: 7269 633c 2f73 7061 6e3e 3c2f 613e 203a ric : │ │ │ +00005070: 3a20 3c61 2063 6c61 7373 3d22 6964 7265 : Symmetric R | 3 ;
│ │ │ +00005160: 0a26 6e62 7370 3b26 6e62 7370 3b26 6e62 .  &nb │ │ │ +00005170: 7370 3b26 6e62 7370 3b23 5b3c 7370 616e sp; #[global] PER_Trans │ │ │ +00005210: 6974 6976 653c 2f73 7061 6e3e 3c2f 613e itive │ │ │ +00005220: 203a 3a20 3c61 2063 6c61 7373 3d22 6964 :: Transitiv │ │ │ +00005290: 653c 2f73 7061 6e3e 3c2f 613e 203c 6120 e R | 3 }. │ │ │ +00005310: 3c62 722f 3e0a 0a3c 6272 2f3e 0a3c 2f64
..
...
.Equivalen │ │ │ +00005340: 6365 2072 656c 6174 696f 6e73 2e20 0a3c ce relations. .< │ │ │ +00005350: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
..
. │ │ │ +00005370: 266e 6273 703b 266e 6273 703b 3c73 7061   Cla │ │ │ +000053a0: 7373 3c2f 7370 616e 3e20 3c61 2069 643d ss │ │ │ +000053e0: 3c73 7061 6e20 636c 6173 733d 2269 6422 │ │ │ +00005400: 4571 7569 7661 6c65 6e63 653c 2f73 7061 Equivalence ( │ │ │ +00005440: 3c73 7061 6e20 636c 6173 733d 2269 6422 │ │ │ +00005460: 523c 2f73 7061 6e3e 3c2f 613e 203a 203c R : < │ │ │ +00005470: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ +00005480: 6872 6566 3d22 436f 712e 5265 6c61 7469 href="Coq.Relati │ │ │ +00005490: 6f6e 732e 5265 6c61 7469 6f6e 5f44 6566 ons.Relation_Def │ │ │ +000054a0: 696e 6974 696f 6e73 2e68 746d 6c23 7265 initions.html#re │ │ │ +000054b0: 6c61 7469 6f6e 223e 3c73 7061 6e20 636c lation">rela │ │ │ +000054e0: 7469 6f6e 3c2f 7370 616e 3e3c 2f61 3e20 tion │ │ │ +000054f0: 3c61 2063 6c61 7373 3d22 6964 7265 6622 │ │ │ +00005530: 3c73 7061 6e20 636c 6173 733d 2269 6422 A) │ │ │ +00005560: 3a20 3c73 7061 6e20 636c 6173 733d 2269 : Prop : │ │ │ +00005590: 3d20 7b3c 6272 2f3e 0a26 6e62 7370 3b26 = {
. & │ │ │ +000055a0: 6e62 7370 3b26 6e62 7370 3b26 6e62 7370 nbsp;   │ │ │ +000055b0: 3b23 5b3c 7370 616e 2063 6c61 7373 3d22 ;#[ │ │ │ +000055d0: 676c 6f62 616c 3c2f 7370 616e 3e5d 203c global] < │ │ │ +000055e0: 6120 6964 3d22 4571 7569 7661 6c65 6e63 a id="Equivalenc │ │ │ +000055f0: 655f 5265 666c 6578 6976 6522 2063 6c61 e_Reflexive" cla │ │ │ +00005600: 7373 3d22 6964 7265 6622 2068 7265 663d ss="idref" href= │ │ │ +00005610: 2223 4571 7569 7661 6c65 6e63 655f 5265 "#Equivalence_Re │ │ │ +00005620: 666c 6578 6976 6522 3e3c 7370 616e 2063 flexive">Equ │ │ │ +00005650: 6976 616c 656e 6365 5f52 6566 6c65 7869 ivalence_Reflexi │ │ │ +00005660: 7665 3c2f 7370 616e 3e3c 2f61 3e20 3a3a ve :: │ │ │ +00005670: 203c 6120 636c 6173 733d 2269 6472 6566 Reflexive R │ │ │ +00005750: 3c2f 613e 203b 3c62 722f 3e0a 266e 6273 ;
.&nbs │ │ │ +00005760: 703b 266e 6273 703b 266e 6273 703b 266e p;  &n │ │ │ +00005770: 6273 703b 235b 3c73 7061 6e20 636c 6173 bsp;#[global │ │ │ +000057a0: 5d20 3c61 2069 643d 2245 7175 6976 616c ] │ │ │ +00005810: 4571 7569 7661 6c65 6e63 655f 5379 6d6d Equivalence_Symm │ │ │ +00005820: 6574 7269 633c 2f73 7061 6e3e 3c2f 613e etric │ │ │ +00005830: 203a 3a20 3c61 2063 6c61 7373 3d22 6964 :: Symmetric< │ │ │ +000058a0: 2f73 7061 6e3e 3c2f 613e 203c 6120 636c /span> R ;
.& │ │ │ +00005920: 6e62 7370 3b26 6e62 7370 3b26 6e62 7370 nbsp;   │ │ │ +00005930: 3b26 6e62 7370 3b23 5b3c 7370 616e 2063 ; #[global] Equivalence │ │ │ +000059e0: 5f54 7261 6e73 6974 6976 653c 2f73 7061 _Transitive :: Tra │ │ │ +00005a60: 6e73 6974 6976 653c 2f73 7061 6e3e 3c2f nsitive R │ │ │ +00005ae0: 7d2e 3c62 722f 3e0a 0a3c 6272 2f3e 0a3c }.
..
.< │ │ │ +00005af0: 2f64 6976 3e0a 0a3c 6469 7620 636c 6173 /div>..
.An Equi │ │ │ +00005b10: 7661 6c65 6e63 6520 6973 2061 2050 4552 valence is a PER │ │ │ +00005b20: 2070 6c75 7320 7265 666c 6578 6976 6974 plus reflexivit │ │ │ +00005b30: 792e 200a 3c2f 6469 763e 0a3c 6469 7620 y. .
.
..< │ │ │ +00005b50: 6272 2f3e 0a26 6e62 7370 3b26 6e62 7370 br/>.   │ │ │ +00005b60: 3b3c 7370 616e 2063 6c61 7373 3d22 6964 ;Global Instanc │ │ │ +00005b90: 653c 2f73 7061 6e3e 203c 6120 6964 3d22 e Equival │ │ │ +00005c00: 656e 6365 5f50 4552 3c2f 7370 616e 3e3c ence_PER< │ │ │ +00005c10: 2f61 3e20 7b3c 6120 6964 3d22 523a 3438 /a> {R} `(E:Equivalenc │ │ │ +00005d30: 653c 2f73 7061 6e3e 3c2f 613e 203c 6120 e R) : PER R │ │ │ +00005e80: 3c2f 613e 207c 2031 3020 3a3d 3c62 722f | 10 :=
.  &n │ │ │ +00005ea0: 6273 703b 266e 6273 703b 7b20 7d2e 3c62 bsp; { }...
.
..
.An Equivale │ │ │ +00005ee0: 6e63 6520 6973 2061 2050 7265 4f72 6465 nce is a PreOrde │ │ │ +00005ef0: 7220 706c 7573 2073 796d 6d65 7472 792e r plus symmetry. │ │ │ +00005f00: 200a 3c2f 6469 763e 0a3c 6469 7620 636c .
.
..
.  < │ │ │ +00005f30: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +00005f40: 7469 746c 653d 226b 6579 776f 7264 223e title="keyword"> │ │ │ +00005f50: 476c 6f62 616c 2049 6e73 7461 6e63 653c Global Instance< │ │ │ +00005f60: 2f73 7061 6e3e 203c 6120 6964 3d22 4571 /span> < │ │ │ +00005fb0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +00005fc0: 7469 746c 653d 2269 6e73 7461 6e63 6522 title="instance" │ │ │ +00005fd0: 3e45 7175 6976 616c 656e 6365 5f50 7265 >Equivalence_Pre │ │ │ +00005fe0: 4f72 6465 723c 2f73 7061 6e3e 3c2f 613e Order │ │ │ +00005ff0: 207b 3c61 2069 643d 2252 3a35 3022 2063 {R} `(E:< │ │ │ +000060a0: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ +000060b0: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ +000060c0: 732e 5265 6c61 7469 6f6e 436c 6173 7365 s.RelationClasse │ │ │ +000060d0: 732e 6874 6d6c 2345 7175 6976 616c 656e s.html#Equivalen │ │ │ +000060e0: 6365 223e 3c73 7061 6e20 636c 6173 733d ce">Equivalence R) : PreOr │ │ │ +000061f0: 6465 723c 2f73 7061 6e3e 3c2f 613e 203c der < │ │ │ +00006200: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ +00006210: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ +00006220: 732e 5265 6c61 7469 6f6e 436c 6173 7365 s.RelationClasse │ │ │ +00006230: 732e 6874 6d6c 2352 3a35 3022 3e3c 7370 s.html#R:50">R │ │ │ +00006260: 3c2f 7370 616e 3e3c 2f61 3e20 7c20 3130 | 10 │ │ │ +00006270: 203a 3d3c 6272 2f3e 0a26 6e62 7370 3b26 :=
. & │ │ │ +00006280: 6e62 7370 3b26 6e62 7370 3b26 6e62 7370 nbsp;   │ │ │ +00006290: 3b7b 207d 2e3c 6272 2f3e 0a0a 3c62 722f ;{ }.
..
.
..
.We c │ │ │ +000062c0: 616e 206e 6f77 2064 6566 696e 6520 616e an now define an │ │ │ +000062d0: 7469 7379 6d6d 6574 7279 2077 2e72 2e74 tisymmetry w.r.t │ │ │ +000062e0: 2e20 616e 2065 7175 6976 616c 656e 6365 . an equivalence │ │ │ +000062f0: 2072 656c 6174 696f 6e20 6f6e 2074 6865 relation on the │ │ │ +00006300: 2063 6172 7269 6572 2e20 0a3c 2f64 6976 carrier. .
.
..
.&nbs │ │ │ +00006330: 703b 266e 6273 703b 3c73 7061 6e20 636c p; Class │ │ │ +000063a0: 3c73 7061 6e20 636c 6173 733d 2269 6422 A │ │ │ +000063f0: 6e74 6973 796d 6d65 7472 6963 3c2f 7370 ntisymmetric < │ │ │ +00006410: 6120 6964 3d22 6571 413a 3532 2220 636c a id="eqA:52" cl │ │ │ +00006420: 6173 733d 2269 6472 6566 2220 6872 6566 ass="idref" href │ │ │ +00006430: 3d22 2365 7141 3a35 3222 3e3c 7370 616e ="#eqA:52">eqA `{equ : Equ │ │ │ +00006530: 6976 616c 656e 6365 3c2f 7370 616e 3e3c ivalence< │ │ │ +00006540: 2f61 3e20 3c61 2063 6c61 7373 3d22 6964 /a> eqA │ │ │ +000065b0: 3c2f 613e 7d20 283c 6120 6964 3d22 523a } (< │ │ │ +000065e0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +000065f0: 7469 746c 653d 2262 696e 6465 7222 3e52 title="binder">R │ │ │ +00006600: 3c2f 7370 616e 3e3c 2f61 3e20 3a20 3c61 : relat │ │ │ +00006680: 696f 6e3c 2f73 7061 6e3e 3c2f 613e 203c ion < │ │ │ +00006690: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ +000066a0: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ +000066b0: 732e 5265 6c61 7469 6f6e 436c 6173 7365 s.RelationClasse │ │ │ +000066c0: 732e 6874 6d6c 2344 6566 732e 4122 3e3c s.html#Defs.A">< │ │ │ +000066d0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +000066e0: 7469 746c 653d 2276 6172 6961 626c 6522 title="variable" │ │ │ +000066f0: 3e41 3c2f 7370 616e 3e3c 2f61 3e29 203a >A) : │ │ │ +00006700: 3d3c 6272 2f3e 0a26 6e62 7370 3b26 6e62 =
. &nb │ │ │ +00006710: 7370 3b26 6e62 7370 3b26 6e62 7370 3b3c sp;  < │ │ │ +00006720: 6120 6964 3d22 616e 7469 7379 6d6d 6574 a id="antisymmet │ │ │ +00006730: 7279 2220 636c 6173 733d 2269 6472 6566 ry" class="idref │ │ │ +00006740: 2220 6872 6566 3d22 2361 6e74 6973 796d " href="#antisym │ │ │ +00006750: 6d65 7472 7922 3e3c 7370 616e 2063 6c61 metry">antis │ │ │ +000067b0: 796d 6d65 7472 793c 2f73 7061 6e3e 3c2f ymmetry : for │ │ │ +000067f0: 616c 6c3c 2f73 7061 6e3e 207b 3c61 2069 all {x │ │ │ +00006850: 203c 6120 6964 3d22 793a 3537 2220 636c y}, R │ │ │ +00006910: 3c2f 613e 203c 6120 636c 6173 733d 2269 x │ │ │ +000069c0: 3c73 7061 6e20 636c 6173 733d 2269 6422 y < │ │ │ +000069f0: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ +00006a00: 6872 6566 3d22 436f 712e 496e 6974 2e4c href="Coq.Init.L │ │ │ +00006a10: 6f67 6963 2e68 746d 6c23 3a3a 7479 7065 ogic.html#::type │ │ │ +00006a20: 5f73 636f 7065 3a78 5f27 2d26 6774 3b27 _scope:x_'->' │ │ │ +00006a30: 5f78 223e 3c73 7061 6e20 636c 6173 733d _x">-> R< │ │ │ +00006ad0: 2f61 3e20 3c61 2063 6c61 7373 3d22 6964 /a> y │ │ │ +00006b40: 203c 6120 636c 6173 733d 2269 6472 6566 < │ │ │ +00006b80: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +00006b90: 7469 746c 653d 2276 6172 6961 626c 6522 title="variable" │ │ │ +00006ba0: 3e78 3c2f 7370 616e 3e3c 2f61 3e20 3c61 >x -> eqA x< │ │ │ +00006d00: 2f61 3e20 3c61 2063 6c61 7373 3d22 6964 /a> y │ │ │ +00006d70: 2e3c 6272 2f3e 0a0a 3c62 722f 3e0a 266e .
..
.&n │ │ │ +00006d80: 6273 703b 266e 6273 703b 3c73 7061 6e20 bsp; Class │ │ │ +00006db0: 3c2f 7370 616e 3e20 3c61 2069 643d 2273 subre │ │ │ +00006e40: 6c61 7469 6f6e 3c2f 7370 616e 3e3c 2f73 lation (R < │ │ │ +00006eb0: 6120 6964 3d22 5227 3a36 3022 2063 6c61 a id="R':60" cla │ │ │ +00006ec0: 7373 3d22 6964 7265 6622 2068 7265 663d ss="idref" href= │ │ │ +00006ed0: 2223 5227 3a36 3022 3e3c 7370 616e 2063 "#R':60">R' : relation A
) : Pro │ │ │ +00007020: 703c 2f73 7061 6e3e 203a 3d3c 6272 2f3e p :=
│ │ │ +00007030: 0a26 6e62 7370 3b26 6e62 7370 3b26 6e62 .  &nb │ │ │ +00007040: 7370 3b26 6e62 7370 3b3c 6120 6964 3d22 sp; is_su │ │ │ +000070e0: 6272 656c 6174 696f 6e3c 2f73 7061 6e3e brelation │ │ │ +000070f0: 3c2f 7370 616e 3e3c 2f61 3e20 3a20 3c73 : f │ │ │ +00007120: 6f72 616c 6c3c 2f73 7061 6e3e 207b 3c61 orall {x y}, R
x< │ │ │ +000072b0: 2f61 3e20 3c61 2063 6c61 7373 3d22 6964 /a> y │ │ │ +00007320: 203c 6120 636c 6173 733d 2269 6472 6566 -> R' x │ │ │ +00007470: 3c2f 613e 203c 6120 636c 6173 733d 2269 y.
..
.< │ │ │ +000074f0: 2f64 6976 3e0a 0a3c 6469 7620 636c 6173 /div>..
.Any sym │ │ │ +00007510: 6d65 7472 6963 2072 656c 6174 696f 6e20 metric relation │ │ │ +00007520: 6973 2065 7175 616c 2074 6f20 6974 7320 is equal to its │ │ │ +00007530: 696e 7665 7273 652e 200a 3c2f 6469 763e inverse. .
│ │ │ +00007540: 0a3c 6469 7620 636c 6173 733d 2263 6f64 .
..
.  │ │ │ +00007560: 3b26 6e62 7370 3b3c 7370 616e 2063 6c61 ; Lemma
< │ │ │ +000075e0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +000075f0: 7469 746c 653d 226c 656d 6d61 223e 7375 title="lemma">su │ │ │ +00007600: 6272 656c 6174 696f 6e5f 7379 6d6d 6574 brelation_symmet │ │ │ +00007610: 7269 633c 2f73 7061 6e3e 3c2f 613e 203c ric < │ │ │ +00007620: 6120 6964 3d22 523a 3635 2220 636c 6173 a id="R:65" clas │ │ │ +00007630: 733d 2269 6472 6566 2220 6872 6566 3d22 s="idref" href=" │ │ │ +00007640: 2352 3a36 3522 3e3c 7370 616e 2063 6c61 #R:65">R< │ │ │ +00007670: 2f61 3e20 6028 3c61 2069 643d 2248 3a36 /a> `(Sy │ │ │ +000076c0: 6d6d 6574 7269 633c 2f73 7061 6e3e 3c2f mmetric R) : │ │ │ +00007770: 3c73 7061 6e20 636c 6173 733d 2269 6422 s │ │ │ +00007790: 7562 7265 6c61 7469 6f6e 3c2f 7370 616e ubrelation ( │ │ │ +00007800: 666c 6970 3c2f 7370 616e 3e3c 2f61 3e20 flip │ │ │ +00007810: 3c61 2063 6c61 7373 3d22 6964 7265 6622 │ │ │ +00007870: 523c 2f73 7061 6e3e 3c2f 613e 2920 3c61 R) R< │ │ │ +000078e0: 2f73 7061 6e3e 3c2f 613e 2e3c 6272 2f3e /span>.
│ │ │ +000078f0: 0a20 0a3c 6272 2f3e 0a26 6e62 7370 3b26 . .
. & │ │ │ +00007900: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp;Section
flip.
..< │ │ │ +000079a0: 6272 2f3e 0a26 6e62 7370 3b26 6e62 7370 br/>.   │ │ │ +000079b0: 3b26 6e62 7370 3b26 6e62 7370 3b3c 7370 ;  Le │ │ │ +000079e0: 6d6d 613c 2f73 7061 6e3e 203c 6120 6964 mma flip_Refle │ │ │ +00007a50: 7869 7665 3c2f 7370 616e 3e3c 2f61 3e20 xive │ │ │ +00007a60: 607b 3c61 2069 643d 2248 3a36 3822 2063 `{Reflex │ │ │ +00007ab0: 6976 653c 2f73 7061 6e3e 3c2f 613e 203c ive < │ │ │ +00007ac0: 6120 6964 3d22 523a 3637 2220 636c 6173 a id="R:67" clas │ │ │ +00007ad0: 733d 2269 6472 6566 2220 6872 6566 3d22 s="idref" href=" │ │ │ +00007ae0: 2352 3a36 3722 3e3c 7370 616e 2063 6c61 #R:67">R} : Refle │ │ │ +00007ba0: 7869 7665 3c2f 7370 616e 3e3c 2f61 3e20 xive │ │ │ +00007bb0: 283c 6120 636c 6173 733d 2269 6472 6566 (flip R).
. . │ │ │ +00007c90: 3c62 722f 3e0a 266e 6273 703b 266e 6273
. &nbs │ │ │ +00007ca0: 703b 266e 6273 703b 266e 6273 703b 3c73 p;  P │ │ │ +00007cd0: 726f 6772 616d 2044 6566 696e 6974 696f rogram Definitio │ │ │ +00007ce0: 6e3c 2f73 7061 6e3e 203c 6120 6964 3d22 n fli │ │ │ +00007d50: 705f 4972 7265 666c 6578 6976 653c 2f73 p_Irreflexive `(Irreflexive R │ │ │ +00007e40: 2920 3a20 3c61 2063 6c61 7373 3d22 6964 ) : Irreflex │ │ │ +00007eb0: 6976 653c 2f73 7061 6e3e 3c2f 613e 2028 ive ( │ │ │ +00007ec0: 3c61 2063 6c61 7373 3d22 6964 7265 6622 flip
R) :=
.& │ │ │ +00007fa0: 6e62 7370 3b26 6e62 7370 3b26 6e62 7370 nbsp;   │ │ │ +00007fb0: 3b26 6e62 7370 3b26 6e62 7370 3b26 6e62 ;  &nb │ │ │ +00007fc0: 7370 3b3c 6120 636c 6173 733d 2269 6472 sp;ir │ │ │ +00008030: 7265 666c 6578 6976 6974 793c 2f73 7061 reflexivity (R:=< │ │ │ +00008070: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ +00008080: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ +00008090: 732e 5265 6c61 7469 6f6e 436c 6173 7365 s.RelationClasse │ │ │ +000080a0: 732e 6874 6d6c 2352 3a36 3922 3e3c 7370 s.html#R:69">R │ │ │ +000080d0: 3c2f 7370 616e 3e3c 2f61 3e29 2e3c 6272 ).
..
.  │ │ │ +000080f0: 266e 6273 703b 266e 6273 703b 266e 6273   &nbs │ │ │ +00008100: 703b 3c73 7061 6e20 636c 6173 733d 2269 p;Program Defin │ │ │ +00008130: 6974 696f 6e3c 2f73 7061 6e3e 203c 6120 ition fli │ │ │ +000081a0: 705f 5379 6d6d 6574 7269 633c 2f73 7061 p_Symmetric `(Symmetric R) : │ │ │ +00008290: 3c61 2063 6c61 7373 3d22 6964 7265 6622 Symmetric (flip │ │ │ +00008370: 203c 6120 636c 6173 733d 2269 6472 6566 < │ │ │ +000083b0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +000083c0: 7469 746c 653d 2276 6172 6961 626c 6522 title="variable" │ │ │ +000083d0: 3e52 3c2f 7370 616e 3e3c 2f61 3e29 203a >R) : │ │ │ +000083e0: 3d3c 6272 2f3e 0a26 6e62 7370 3b26 6e62 =
. &nb │ │ │ +000083f0: 7370 3b26 6e62 7370 3b26 6e62 7370 3b26 sp;  & │ │ │ +00008400: 6e62 7370 3b26 6e62 7370 3b3c 7370 616e nbsp; fun< │ │ │ +00008430: 2f73 7061 6e3e 203c 6120 6964 3d22 783a /span> < │ │ │ +00008460: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +00008470: 7469 746c 653d 2262 696e 6465 7222 3e78 title="binder">x │ │ │ +00008480: 3c2f 7370 616e 3e3c 2f61 3e20 3c61 2069 y │ │ │ +000084e0: 203c 6120 6964 3d22 483a 3735 2220 636c H => symmetry (R:=R< │ │ │ +00008640: 2f73 7061 6e3e 3c2f 613e 2920 3c61 2063 /span>) H.
.. │ │ │ +000086c0: 3c62 722f 3e0a 266e 6273 703b 266e 6273
. &nbs │ │ │ +000086d0: 703b 266e 6273 703b 266e 6273 703b 3c73 p;  P │ │ │ +00008700: 726f 6772 616d 2044 6566 696e 6974 696f rogram Definitio │ │ │ +00008710: 6e3c 2f73 7061 6e3e 203c 6120 6964 3d22 n flip_ │ │ │ +00008780: 4173 796d 6d65 7472 6963 3c2f 7370 616e Asymmetric `( │ │ │ +000087c0: 3c73 7061 6e20 636c 6173 733d 2269 6422 │ │ │ +000087e0: 4173 796d 6d65 7472 6963 3c2f 7370 616e Asymmetric R) : │ │ │ +00008870: 3c61 2063 6c61 7373 3d22 6964 7265 6622 Asymmetric (< │ │ │ +00008920: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +00008930: 7469 746c 653d 2264 6566 696e 6974 696f title="definitio │ │ │ +00008940: 6e22 3e66 6c69 703c 2f73 7061 6e3e 3c2f n">flip R) │ │ │ +000089c0: 203a 3d3c 6272 2f3e 0a26 6e62 7370 3b26 :=
. & │ │ │ +000089d0: 6e62 7370 3b26 6e62 7370 3b26 6e62 7370 nbsp;   │ │ │ +000089e0: 3b26 6e62 7370 3b26 6e62 7370 3b3c 7370 ;  fu │ │ │ +00008a10: 6e3c 2f73 7061 6e3e 203c 6120 6964 3d22 n x y H H' │ │ │ +00008b70: 3d26 6774 3b20 3c61 2063 6c61 7373 3d22 => asy │ │ │ +00008be0: 6d6d 6574 7279 3c2f 7370 616e 3e3c 2f61 mmetry ( │ │ │ +00008c10: 523c 2f73 7061 6e3e 3a3d 3c61 2063 6c61 R:=R) H │ │ │ +00008cf0: 3c2f 613e 203c 6120 636c 6173 733d 2269 H'< │ │ │ +00008d60: 2f61 3e2e 3c62 722f 3e0a 0a3c 6272 2f3e /a>.
..
│ │ │ +00008d70: 0a26 6e62 7370 3b26 6e62 7370 3b26 6e62 .  &nb │ │ │ +00008d80: 7370 3b26 6e62 7370 3b3c 7370 616e 2063 sp; Progra │ │ │ +00008db0: 6d20 4465 6669 6e69 7469 6f6e 3c2f 7370 m Definition
flip_Trans │ │ │ +00008e30: 6974 6976 653c 2f73 7061 6e3e 3c2f 613e itive │ │ │ +00008e40: 2060 283c 6120 6964 3d22 483a 3833 2220 `(Trans │ │ │ +00008e90: 6974 6976 653c 2f73 7061 6e3e 3c2f 613e itive │ │ │ +00008ea0: 203c 6120 6964 3d22 523a 3832 2220 636c R) : < │ │ │ +00008f60: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +00008f70: 7469 746c 653d 2263 6c61 7373 223e 5472 title="class">Tr │ │ │ +00008f80: 616e 7369 7469 7665 3c2f 7370 616e 3e3c ansitive< │ │ │ +00008f90: 2f61 3e20 283c 6120 636c 6173 733d 2269 /a> (fl │ │ │ +00008ff0: 6970 3c2f 7370 616e 3e3c 2f61 3e20 3c61 ip R< │ │ │ +00009060: 2f73 7061 6e3e 3c2f 613e 2920 3a3d 3c62 /span>) :=.   │ │ │ +00009080: 266e 6273 703b 266e 6273 703b 266e 6273   &nbs │ │ │ +00009090: 703b 266e 6273 703b 3c73 7061 6e20 636c p; fun x y z H H' │ │ │ +00009270: 3d26 6774 3b20 3c61 2063 6c61 7373 3d22 => │ │ │ +000092e0: 7472 616e 7369 7469 7669 7479 3c2f 7370 transitivity (R:= │ │ │ +00009320: 3c61 2063 6c61 7373 3d22 6964 7265 6622 │ │ │ +00009380: 523c 2f73 7061 6e3e 3c2f 613e 2920 3c61 R) H │ │ │ +000093f0: 273c 2f73 7061 6e3e 3c2f 613e 203c 6120 ' H.
. │ │ │ +00009470: 0a3c 6272 2f3e 0a26 6e62 7370 3b26 6e62 .
. &nb │ │ │ +00009480: 7370 3b26 6e62 7370 3b26 6e62 7370 3b3c sp;  < │ │ │ +00009490: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +000094a0: 7469 746c 653d 226b 6579 776f 7264 223e title="keyword"> │ │ │ +000094b0: 5072 6f67 7261 6d20 4465 6669 6e69 7469 Program Definiti │ │ │ +000094c0: 6f6e 3c2f 7370 616e 3e20 3c61 2069 643d on flip_Antisymme │ │ │ +00009540: 7472 6963 3c2f 7370 616e 3e3c 2f61 3e20 tric │ │ │ +00009550: 6028 3c61 2069 643d 2248 3a39 3222 2063 `(Antisy │ │ │ +000095a0: 6d6d 6574 7269 633c 2f73 7061 6e3e 3c2f mmetric < │ │ │ +000095e0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +000095f0: 7469 746c 653d 2262 696e 6465 7222 3e3c title="binder">< │ │ │ +00009600: 7370 616e 2069 643d 2248 3a39 3222 2063 span id="H:92" c │ │ │ +00009610: 6c61 7373 3d22 6964 223e 6571 413c 2f73 lass="id">eqA │ │ │ +00009630: 3c61 2069 643d 2252 3a39 3122 2063 6c61 R) :
.& │ │ │ +000096b0: 6e62 7370 3b26 6e62 7370 3b26 6e62 7370 nbsp;   │ │ │ +000096c0: 3b26 6e62 7370 3b26 6e62 7370 3b26 6e62 ;  &nb │ │ │ +000096d0: 7370 3b3c 6120 636c 6173 733d 2269 6472 sp;Antisym │ │ │ +00009740: 6d65 7472 6963 3c2f 7370 616e 3e3c 2f61 metric eqA (fli │ │ │ +00009820: 703c 2f73 7061 6e3e 3c2f 613e 203c 6120 p R).
│ │ │ +000098a0: 0a20 0a3c 6272 2f3e 0a3c 2f64 6976 3e0a . .
.
. │ │ │ +000098b0: 0a3c 6469 7620 636c 6173 733d 2264 6f63 .
.Inversing the │ │ │ +000098d0: 206c 6172 6765 7220 7374 7275 6374 7572 larger structur │ │ │ +000098e0: 6573 200a 3c2f 6469 763e 0a3c 6469 7620 es .
.
..< │ │ │ +00009900: 6272 2f3e 0a26 6e62 7370 3b26 6e62 7370 br/>.   │ │ │ +00009910: 3b26 6e62 7370 3b26 6e62 7370 3b3c 7370 ;  Le │ │ │ +00009940: 6d6d 613c 2f73 7061 6e3e 203c 6120 6964 mma flip_PreOrde │ │ │ +000099b0: 723c 2f73 7061 6e3e 3c2f 613e 2060 283c r `(< │ │ │ +000099c0: 6120 6964 3d22 483a 3934 2220 636c 6173 a id="H:94" clas │ │ │ +000099d0: 733d 2269 6472 6566 2220 6872 6566 3d22 s="idref" href=" │ │ │ +000099e0: 2348 3a39 3422 3e3c 7370 616e 2063 6c61 #H:94">PreOrder< │ │ │ +00009a10: 2f73 7061 6e3e 3c2f 613e 203c 6120 6964 /span> R< │ │ │ +00009a80: 2f73 7061 6e3e 3c2f 7370 616e 3e3c 2f61 /span>) : PreOrder ( │ │ │ +00009b40: 3c73 7061 6e20 636c 6173 733d 2269 6422 flip< │ │ │ +00009b70: 2f61 3e20 3c61 2063 6c61 7373 3d22 6964 /a> R │ │ │ +00009be0: 292e 3c62 722f 3e0a 200a 3c62 722f 3e0a ).
. .
. │ │ │ +00009bf0: 266e 6273 703b 266e 6273 703b 266e 6273   &nbs │ │ │ +00009c00: 703b 266e 6273 703b 3c73 7061 6e20 636c p; Lemma flip_Strict │ │ │ +00009ca0: 4f72 6465 723c 2f73 7061 6e3e 3c2f 613e Order │ │ │ +00009cb0: 2060 283c 6120 6964 3d22 483a 3936 2220 `(Stric │ │ │ +00009d00: 744f 7264 6572 3c2f 7370 616e 3e3c 2f61 tOrder R
) : │ │ │ +00009df0: 5374 7269 6374 4f72 6465 723c 2f73 7061 StrictOrder (flip │ │ │ +00009e70: 203c 6120 636c 6173 733d 2269 6472 6566 < │ │ │ +00009eb0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +00009ec0: 7469 746c 653d 2276 6172 6961 626c 6522 title="variable" │ │ │ +00009ed0: 3e52 3c2f 7370 616e 3e3c 2f61 3e29 2e3c >R).< │ │ │ +00009ee0: 6272 2f3e 0a20 0a3c 6272 2f3e 0a26 6e62 br/>. .
.&nb │ │ │ +00009ef0: 7370 3b26 6e62 7370 3b26 6e62 7370 3b26 sp;  & │ │ │ +00009f00: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp;Lemma flip_PER `( │ │ │ +00009fc0: 3c73 7061 6e20 636c 6173 733d 2269 6422 │ │ │ +00009fe0: 5045 523c 2f73 7061 6e3e 3c2f 613e 203c PER < │ │ │ +00009ff0: 6120 6964 3d22 523a 3937 2220 636c 6173 a id="R:97" clas │ │ │ +0000a000: 733d 2269 6472 6566 2220 6872 6566 3d22 s="idref" href=" │ │ │ +0000a010: 2352 3a39 3722 3e3c 7370 616e 2063 6c61 #R:97">R) : PER< │ │ │ +0000a0d0: 2f61 3e20 283c 6120 636c 6173 733d 2269 /a> (fl │ │ │ +0000a130: 6970 3c2f 7370 616e 3e3c 2f61 3e20 3c61 ip R< │ │ │ +0000a1a0: 2f73 7061 6e3e 3c2f 613e 292e 3c62 722f /span>).
. .
.  │ │ │ +0000a1c0: 266e 6273 703b 266e 6273 703b 266e 6273   &nbs │ │ │ +0000a1d0: 703b 3c73 7061 6e20 636c 6173 733d 2269 p;Lemma │ │ │ +0000a200: 3c61 2069 643d 2266 6c69 705f 4571 7569 │ │ │ +0000a240: 3c73 7061 6e20 636c 6173 733d 2269 6422 f │ │ │ +0000a260: 6c69 705f 4571 7569 7661 6c65 6e63 653c lip_Equivalence< │ │ │ +0000a270: 2f73 7061 6e3e 3c2f 613e 2060 283c 6120 /span> `(Equivalen │ │ │ +0000a2d0: 6365 3c2f 7370 616e 3e3c 2f61 3e20 3c61 ce R) : Equ │ │ │ +0000a3c0: 6976 616c 656e 6365 3c2f 7370 616e 3e3c ivalence
< │ │ │ +0000a3d0: 2f61 3e20 283c 6120 636c 6173 733d 2269 /a> (fl │ │ │ +0000a430: 6970 3c2f 7370 616e 3e3c 2f61 3e20 3c61 ip R< │ │ │ +0000a4a0: 2f73 7061 6e3e 3c2f 613e 292e 3c62 722f /span>).
. .
.  │ │ │ +0000a4c0: 266e 6273 703b 3c73 7061 6e20 636c 6173  End flip.
..
.  < │ │ │ +0000a580: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +0000a590: 7469 746c 653d 226b 6579 776f 7264 223e title="keyword"> │ │ │ +0000a5a0: 5365 6374 696f 6e3c 2f73 7061 6e3e 203c Section < │ │ │ +0000a5b0: 6120 6964 3d22 4465 6673 2e63 6f6d 706c a id="Defs.compl │ │ │ +0000a5c0: 656d 656e 7422 2063 6c61 7373 3d22 6964 ement" class="id │ │ │ +0000a5d0: 7265 6622 2068 7265 663d 2223 4465 6673 ref" href="#Defs │ │ │ +0000a5e0: 2e63 6f6d 706c 656d 656e 7422 3e3c 7370 .complement">co │ │ │ +0000a610: 6d70 6c65 6d65 6e74 3c2f 7370 616e 3e3c mplement< │ │ │ +0000a620: 2f61 3e2e 3c62 722f 3e0a 0a3c 6272 2f3e /a>.
..
│ │ │ +0000a630: 0a26 6e62 7370 3b26 6e62 7370 3b26 6e62 .  &nb │ │ │ +0000a640: 7370 3b26 6e62 7370 3b3c 7370 616e 2063 sp; Defini │ │ │ +0000a670: 7469 6f6e 3c2f 7370 616e 3e20 3c61 2069 tion comp │ │ │ +0000a6f0: 6c65 6d65 6e74 5f49 7272 6566 6c65 7869 lement_Irreflexi │ │ │ +0000a700: 7665 3c2f 7370 616e 3e3c 2f61 3e20 6028 ve `( │ │ │ +0000a710: 3c61 2069 643d 2248 3a31 3032 2220 636c Reflex │ │ │ +0000a760: 6976 653c 2f73 7061 6e3e 3c2f 613e 203c ive < │ │ │ +0000a770: 6120 6964 3d22 523a 3130 3122 2063 6c61 a id="R:101" cla │ │ │ +0000a780: 7373 3d22 6964 7265 6622 2068 7265 663d ss="idref" href= │ │ │ +0000a790: 2223 523a 3130 3122 3e3c 7370 616e 2063 "#R:101">R
)
.& │ │ │ +0000a7f0: 6e62 7370 3b26 6e62 7370 3b26 6e62 7370 nbsp;   │ │ │ +0000a800: 3b26 6e62 7370 3b26 6e62 7370 3b26 6e62 ;  &nb │ │ │ +0000a810: 7370 3b3a 203c 6120 636c 6173 733d 2269 sp;: Irrefle │ │ │ +0000a880: 7869 7665 3c2f 7370 616e 3e3c 2f61 3e20 xive │ │ │ +0000a890: 283c 6120 636c 6173 733d 2269 6472 6566 (complem │ │ │ +0000a900: 656e 743c 2f73 7061 6e3e 3c2f 613e 203c ent < │ │ │ +0000a910: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ +0000a920: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ +0000a930: 732e 5265 6c61 7469 6f6e 436c 6173 7365 s.RelationClasse │ │ │ +0000a940: 732e 6874 6d6c 2352 3a31 3031 223e 3c73 s.html#R:101"> │ │ │ +0000a970: 523c 2f73 7061 6e3e 3c2f 613e 292e 3c62 R).. .
.&nbs │ │ │ +0000a990: 703b 266e 6273 703b 266e 6273 703b 266e p;  &n │ │ │ +0000a9a0: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;Definition< │ │ │ +0000a9d0: 2f73 7061 6e3e 203c 6120 6964 3d22 636f /span> < │ │ │ +0000aa20: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +0000aa30: 7469 746c 653d 2264 6566 696e 6974 696f title="definitio │ │ │ +0000aa40: 6e22 3e63 6f6d 706c 656d 656e 745f 5379 n">complement_Sy │ │ │ +0000aa50: 6d6d 6574 7269 633c 2f73 7061 6e3e 3c2f mmetric `(< │ │ │ +0000aa90: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +0000aaa0: 7469 746c 653d 2262 696e 6465 7222 3e53 title="binder">S │ │ │ +0000aab0: 796d 6d65 7472 6963 3c2f 7370 616e 3e3c ymmetric< │ │ │ +0000aac0: 2f61 3e20 3c61 2069 643d 2252 3a31 3033 /a> R) : │ │ │ +0000ab40: 203c 6120 636c 6173 733d 2269 6472 6566 Symmetric (complement R │ │ │ +0000aca0: 3c2f 613e 292e 3c62 722f 3e0a 2026 6e62 ).
. &nb │ │ │ +0000acb0: 7370 3b26 6e62 7370 3b3c 7370 616e 2063 sp; End
c │ │ │ +0000ad50: 6f6d 706c 656d 656e 743c 2f73 7061 6e3e omplement │ │ │ +0000ad60: 3c2f 613e 2e3c 6272 2f3e 0a0a 3c62 722f .
..
.
..
.Rewr │ │ │ +0000ad90: 6974 6520 7265 6c61 7469 6f6e 206f 6e20 ite relation on │ │ │ +0000ada0: 6120 6769 7665 6e20 7375 7070 6f72 743a a given support: │ │ │ +0000adb0: 2064 6563 6c61 7265 7320 6120 7265 6c61 declares a rela │ │ │ +0000adc0: 7469 6f6e 2061 7320 6120 7265 7772 6974 tion as a rewrit │ │ │ +0000add0: 650a 2020 2072 656c 6174 696f 6e20 666f e. relation fo │ │ │ +0000ade0: 7220 7573 6520 6279 2074 6865 2067 656e r use by the gen │ │ │ +0000adf0: 6572 616c 697a 6564 2072 6577 7269 7469 eralized rewriti │ │ │ +0000ae00: 6e67 2074 6163 7469 632e 0a20 2020 4974 ng tactic.. It │ │ │ +0000ae10: 2068 656c 7073 2063 686f 6f73 696e 6720 helps choosing │ │ │ +0000ae20: 6966 2061 2072 6577 7269 7465 2073 686f if a rewrite sho │ │ │ +0000ae30: 756c 6420 6265 2068 616e 646c 6564 0a20 uld be handled. │ │ │ +0000ae40: 2020 6279 2074 6865 2067 656e 6572 616c by the general │ │ │ +0000ae50: 697a 6564 206f 7220 7468 6520 7265 6775 ized or the regu │ │ │ +0000ae60: 6c61 7220 7265 7772 6974 696e 6720 7461 lar rewriting ta │ │ │ +0000ae70: 6374 6963 2075 7369 6e67 206c 6569 626e ctic using leibn │ │ │ +0000ae80: 697a 2065 7175 616c 6974 792e 0a20 2020 iz equality.. │ │ │ +0000ae90: 5573 6572 7320 6361 6e20 6465 636c 6172 Users can declar │ │ │ +0000aea0: 6520 616e 203c 7370 616e 2063 6c61 7373 e an Rewri │ │ │ +0000aee0: 7465 5265 6c61 7469 6f6e 3c2f 7370 616e teRelation A │ │ │ +0000af30: 3c2f 7370 616e 3e3c 2f73 7061 6e3e 203c < │ │ │ +0000af40: 7370 616e 2063 6c61 7373 3d22 696e 6c69 span class="inli │ │ │ +0000af50: 6e65 636f 6465 223e 3c73 7061 6e20 636c necode">RA anywhere t │ │ │ +0000af90: 6f20 6465 636c 6172 6520 6465 6661 756c o declare defaul │ │ │ +0000afa0: 740a 2020 2072 656c 6174 696f 6e73 206f t. relations o │ │ │ +0000afb0: 6e20 6120 6769 7665 6e20 7479 7065 2060 n a given type ` │ │ │ +0000afc0: 4160 2e20 5468 6973 2069 7320 616c 736f A`. This is also │ │ │ +0000afd0: 2064 6f6e 6520 6175 746f 6d61 7469 6361 done automatica │ │ │ +0000afe0: 6c6c 7920 6279 0a20 2020 7468 6520 3c73 lly by. the Declare │ │ │ +0000b070: 5265 6c61 7469 6f6e 3c2f 7370 616e 3e3c Relation< │ │ │ +0000b080: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> │ │ │ +0000b0a0: 3c73 7061 6e20 636c 6173 733d 2269 6422 A RA commands. It │ │ │ +0000b120: 2068 6173 206e 6f20 6d6f 6465 2064 6563 has no mode dec │ │ │ +0000b130: 6c61 7261 7469 6f6e 3a0a 2020 2069 7420 laration:. it │ │ │ +0000b140: 7769 6c6c 2061 7373 6967 6e20 603f 4120 will assign `?A │ │ │ +0000b150: 3a3d 2050 726f 702c 203f 5220 3a3d 2069 := Prop, ?R := i │ │ │ +0000b160: 6666 6020 6f6e 2061 6e20 656e 7469 7265 ff` on an entire │ │ │ +0000b170: 6c79 2075 6e73 7065 6369 6669 6564 2071 ly unspecified q │ │ │ +0000b180: 7565 7279 0a20 2020 6052 6577 7269 7465 uery. `Rewrite │ │ │ +0000b190: 5265 6c61 7469 6f6e 203f 4120 3f52 602c Relation ?A ?R`, │ │ │ +0000b1a0: 206f 7220 616e 7920 7072 6566 6572 6564 or any prefered │ │ │ +0000b1b0: 2072 6577 7269 7465 2072 656c 6174 696f rewrite relatio │ │ │ +0000b1c0: 6e20 6f66 2070 7269 6f72 6974 7920 266c n of priority &l │ │ │ +0000b1d0: 743b 2032 2e20 0a3c 2f64 6976 3e0a 3c64 t; 2. .
. │ │ │ +0000b1f0: 0a0a 3c62 722f 3e0a 266e 6273 703b 266e ..
. &n │ │ │ +0000b200: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;Class │ │ │ +0000b270: 3c73 7061 6e20 636c 6173 733d 2269 6422 │ │ │ +0000b290: 5265 7772 6974 6552 656c 6174 696f 6e3c RewriteRelation< │ │ │ +0000b2a0: 2f73 7061 6e3e 3c2f 613e 2028 3c61 2069 /span> (RA : relation
A).
.. │ │ │ +0000b400: 3c62 722f 3e0a 3c2f 6469 763e 0a0a 3c64
.
... │ │ │ +0000b420: 4c65 6962 6e69 7a20 6571 7561 6c69 7479 Leibniz equality │ │ │ +0000b430: 2e20 0a3c 2f64 6976 3e0a 3c64 6976 2063 . .
.
.&nb │ │ │ +0000b450: 7370 3b26 6e62 7370 3b3c 7370 616e 2063 sp; Sectio │ │ │ +0000b480: 6e3c 2f73 7061 6e3e 203c 6120 6964 3d22 n Leibniz │ │ │ +0000b4f0: 3c2f 613e 2e3c 6272 2f3e 0a26 6e62 7370 .
.  │ │ │ +0000b500: 3b26 6e62 7370 3b26 6e62 7370 3b26 6e62 ;  &nb │ │ │ +0000b510: 7370 3b3c 7370 616e 2063 6c61 7373 3d22 sp;Global Insta │ │ │ +0000b540: 6e63 653c 2f73 7061 6e3e 203c 6120 6964 nce eq_Reflexiv │ │ │ +0000b5b0: 653c 2f73 7061 6e3e 3c2f 613e 203a 203c e : < │ │ │ +0000b5c0: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ +0000b5d0: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ +0000b5e0: 732e 5265 6c61 7469 6f6e 436c 6173 7365 s.RelationClasse │ │ │ +0000b5f0: 732e 6874 6d6c 2352 6566 6c65 7869 7665 s.html#Reflexive │ │ │ +0000b600: 223e 3c73 7061 6e20 636c 6173 733d 2269 ">Reflexive (@eq A) := @ │ │ │ +0000b740: 3c73 7061 6e20 636c 6173 733d 2269 6422 eq_refl A.
.&nb │ │ │ +0000b7f0: 7370 3b26 6e62 7370 3b26 6e62 7370 3b26 sp;  & │ │ │ +0000b800: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp;Global Ins │ │ │ +0000b830: 7461 6e63 653c 2f73 7061 6e3e 203c 6120 tance eq_Symmet │ │ │ +0000b8a0: 7269 633c 2f73 7061 6e3e 3c2f 613e 203a ric : │ │ │ +0000b8b0: 203c 6120 636c 6173 733d 2269 6472 6566 Symmetric (@eq A
) := @ │ │ │ +0000ba50: 6571 5f73 796d 3c2f 7370 616e 3e3c 2f61 eq_sym A │ │ │ +0000bad0: 2e3c 6272 2f3e 0a26 6e62 7370 3b26 6e62 .
. &nb │ │ │ +0000bae0: 7370 3b26 6e62 7370 3b26 6e62 7370 3b3c sp;  < │ │ │ +0000baf0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +0000bb00: 7469 746c 653d 226b 6579 776f 7264 223e title="keyword"> │ │ │ +0000bb10: 476c 6f62 616c 2049 6e73 7461 6e63 653c Global Instance< │ │ │ +0000bb20: 2f73 7061 6e3e 203c 6120 6964 3d22 6571 /span> eq_Transitive │ │ │ +0000bb90: 3c2f 7370 616e 3e3c 2f61 3e20 3a20 3c61 : Transitive (@eq
A) := @eq_trans │ │ │ +0000bd50: 3c2f 613e 203c 6120 636c 6173 733d 2269 A< │ │ │ +0000bdc0: 2f61 3e2e 3c62 722f 3e0a 0a3c 6272 2f3e /a>.
..
│ │ │ +0000bdd0: 0a3c 2f64 6976 3e0a 0a3c 6469 7620 636c .
..
.Leibi │ │ │ +0000bdf0: 6e7a 2065 7175 616c 6974 7920 3c73 7061 nz equality eq is an equival │ │ │ +0000be50: 656e 6365 2072 656c 6174 696f 6e2e 0a20 ence relation.. │ │ │ +0000be60: 2020 2020 2020 2054 6865 2069 6e73 7461 The insta │ │ │ +0000be70: 6e63 6520 6861 7320 6c6f 7720 7072 696f nce has low prio │ │ │ +0000be80: 7269 7479 2061 7320 6974 2069 7320 616c rity as it is al │ │ │ +0000be90: 7761 7973 2061 7070 6c69 6361 626c 650a ways applicable. │ │ │ +0000bea0: 2020 2020 2020 2020 6966 206f 6e6c 7920 if only │ │ │ +0000beb0: 7468 6520 7479 7065 2069 7320 636f 6e73 the type is cons │ │ │ +0000bec0: 7472 6169 6e65 642e 200a 3c2f 6469 763e trained. .
│ │ │ +0000bed0: 0a3c 6469 7620 636c 6173 733d 2263 6f64 .
..
.Le │ │ │ +0000c1f0: 6962 6e69 7a20 6469 7365 7175 616c 6974 ibniz disequalit │ │ │ +0000c200: 792e 200a 3c2f 6469 763e 0a3c 6469 7620 y. .
.
.&n │ │ │ +0000c220: 6273 703b 266e 6273 703b 3c73 7061 6e20 bsp; Secti │ │ │ +0000c250: 6f6e 3c2f 7370 616e 3e20 3c61 2069 643d on Leibniz │ │ │ +0000c2c0: 4e6f 743c 2f73 7061 6e3e 3c2f 613e 2e3c Not.< │ │ │ +0000c2d0: 6272 2f3e 0a3c 2f64 6976 3e0a 0a3c 6469 br/>.
...D │ │ │ +0000c2f0: 6973 6571 7561 6c69 7479 2069 7320 7379 isequality is sy │ │ │ +0000c300: 6d6d 6574 7269 632e 200a 3c2f 6469 763e mmetric. .
│ │ │ +0000c310: 0a3c 6469 7620 636c 6173 733d 2263 6f64 .
.   │ │ │ +0000c330: 266e 6273 703b 266e 6273 703b 3c73 7061   Glo │ │ │ +0000c360: 6261 6c20 496e 7374 616e 6365 3c2f 7370 bal Instance │ │ │ +0000c3d0: 6e65 715f 5379 6d6d 6574 7269 633c 2f73 neq_Symmetric : Sym │ │ │ +0000c450: 6d65 7472 6963 3c2f 7370 616e 3e3c 2f61 metric (fun < │ │ │ +0000c490: 6120 6964 3d22 783a 3130 3722 2063 6c61 a id="x:107" cla │ │ │ +0000c4a0: 7373 3d22 6964 7265 6622 2068 7265 663d ss="idref" href= │ │ │ +0000c4b0: 2223 783a 3130 3722 3e3c 7370 616e 2063 "#x:107">x │ │ │ +0000c510: 3c73 7061 6e20 636c 6173 733d 2269 6422 │ │ │ +0000c530: 793c 2f73 7061 6e3e 3c2f 613e 203a 203c y : < │ │ │ +0000c540: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ +0000c550: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ +0000c560: 732e 5265 6c61 7469 6f6e 436c 6173 7365 s.RelationClasse │ │ │ +0000c570: 732e 6874 6d6c 2344 6566 732e 4122 3e3c s.html#Defs.A">< │ │ │ +0000c580: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +0000c590: 7469 746c 653d 2276 6172 6961 626c 6522 title="variable" │ │ │ +0000c5a0: 3e41 3c2f 7370 616e 3e3c 2f61 3e20 3d26 >A =& │ │ │ +0000c5b0: 6774 3b20 3c61 2063 6c61 7373 3d22 6964 gt; x < │ │ │ +0000c690: 2667 743b 3c2f 7370 616e 3e3c 2f61 3e20 > │ │ │ +0000c6a0: 3c61 2063 6c61 7373 3d22 6964 7265 6622 < │ │ │ +0000c6e0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +0000c6f0: 7469 746c 653d 2276 6172 6961 626c 6522 title="variable" │ │ │ +0000c700: 3e79 3c2f 7370 616e 3e3c 2f61 3e29 203a >y) : │ │ │ +0000c710: 3d20 2840 3c61 2063 6c61 7373 3d22 6964 = (@not_eq │ │ │ +0000c770: 5f73 796d 3c2f 7370 616e 3e3c 2f61 3e20 _sym │ │ │ +0000c780: 3c61 2063 6c61 7373 3d22 6964 7265 6622 │ │ │ +0000c7c0: 3c73 7061 6e20 636c 6173 733d 2269 6422 A). │ │ │ +0000c7f0: 3c62 722f 3e0a 266e 6273 703b 266e 6273
. &nbs │ │ │ +0000c800: 703b 3c73 7061 6e20 636c 6173 733d 2269 p;End LeibnizN │ │ │ +0000c8a0: 6f74 3c2f 7370 616e 3e3c 2f61 3e2e 3c62 ot..End │ │ │ +0000c8e0: 3c61 2063 6c61 7373 3d22 6964 7265 6622 D │ │ │ +0000c940: 6566 733c 2f73 7061 6e3e 3c2f 613e 2e3c efs.< │ │ │ +0000c950: 6272 2f3e 0a0a 3c62 722f 3e0a 3c2f 6469 br/>..
...
.Default re │ │ │ +0000c980: 7772 6974 6520 7265 6c61 7469 6f6e 7320 write relations │ │ │ +0000c990: 6861 6e64 6c65 6420 6279 203c 7370 616e handled by setoid_rewri │ │ │ +0000c9e0: 7465 3c2f 7370 616e 3e3c 2f73 7061 6e3e te │ │ │ +0000c9f0: 206f 6e20 5072 6f70 2e20 0a3c 2f64 6976 on Prop. .
.
..
.Any │ │ │ +0000d080: 203c 7370 616e 2063 6c61 7373 3d22 696e Equivalen │ │ │ +0000d0c0: 6365 3c2f 7370 616e 3e3c 2f73 7061 6e3e ce │ │ │ +0000d0d0: 2064 6563 6c61 7265 6420 696e 2074 6865 declared in the │ │ │ +0000d0e0: 2063 6f6e 7465 7874 2069 7320 6175 746f context is auto │ │ │ +0000d0f0: 6d61 7469 6361 6c6c 7920 636f 6e73 6964 matically consid │ │ │ +0000d100: 6572 6564 0a20 2061 2072 6577 7269 7465 ered. a rewrite │ │ │ +0000d110: 2072 656c 6174 696f 6e2e 2054 6869 7320 relation. This │ │ │ +0000d120: 6f6e 6c79 2061 7070 6c69 6573 2069 6620 only applies if │ │ │ +0000d130: 7468 6520 7265 6c61 7469 6f6e 2069 7320 the relation is │ │ │ +0000d140: 6174 206c 6561 7374 2070 6172 7469 616c at least partial │ │ │ +0000d150: 6c79 0a20 2064 6566 696e 6564 3a20 7365 ly. defined: se │ │ │ +0000d160: 746f 6964 5f72 6577 7269 7465 2077 6f6e toid_rewrite won │ │ │ +0000d170: 2774 2074 7279 2074 6f20 696e 6665 7220 't try to infer │ │ │ +0000d180: 6172 6269 7472 6172 7920 7573 6572 2072 arbitrary user r │ │ │ +0000d190: 6577 7269 7465 2072 656c 6174 696f 6e73 ewrite relations │ │ │ +0000d1a0: 2e20 0a3c 2f64 6976 3e0a 3c64 6976 2063 . .
.
...Definition< │ │ │ +0000d1f0: 2f73 7061 6e3e 203c 6120 6964 3d22 6571 /span> < │ │ │ +0000d250: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +0000d260: 7469 746c 653d 2264 6566 696e 6974 696f title="definitio │ │ │ +0000d270: 6e22 3e65 7175 6976 616c 656e 6365 5f72 n">equivalence_r │ │ │ +0000d280: 6577 7269 7465 5f72 656c 6174 696f 6e3c ewrite_relation< │ │ │ +0000d290: 2f73 7061 6e3e 3c2f 613e 2060 283c 6120 /span> `(eqa : │ │ │ +0000d360: 4571 7569 7661 6c65 6e63 653c 2f73 7061 Equivalence A eqA< │ │ │ +0000d420: 2f73 7061 6e3e 3c2f 613e 2920 3a20 3c61 /span>) : RewriteRel │ │ │ +0000d4a0: 6174 696f 6e3c 2f73 7061 6e3e 3c2f 613e ation │ │ │ +0000d4b0: 203c 6120 636c 6173 733d 2269 6472 6566 eqA :=
.  │ │ │ +0000d530: 3b26 6e62 7370 3b3c 6120 636c 6173 733d ; 
Build │ │ │ +0000d5b0: 5f52 6577 7269 7465 5265 6c61 7469 6f6e _RewriteRelation │ │ │ +0000d5c0: 3c2f 7370 616e 3e3c 2f61 3e20 3c73 7061 _
.
..
.< │ │ │ +0000d600: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +0000d610: 7469 746c 653d 226b 6579 776f 7264 223e title="keyword"> │ │ │ +0000d620: 4c74 6163 3c2f 7370 616e 3e20 3c73 7061 Ltac equiv_r │ │ │ +0000d650: 6577 7269 7465 5f72 656c 6174 696f 6e3c ewrite_relation< │ │ │ +0000d660: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> R :=< │ │ │ +0000d690: 6272 2f3e 0a26 6e62 7370 3b26 6e62 7370 br/>.   │ │ │ +0000d6a0: 3b3c 7370 616e 2063 6c61 7373 3d22 6964 ;tr │ │ │ +0000d6c0: 7969 663c 2f73 7061 6e3e 203c 7370 616e yif is_evar< │ │ │ +0000d6f0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> R th │ │ │ +0000d740: 656e 3c2f 7370 616e 3e20 3c73 7061 6e20 en fail
.  │ │ │ +0000d780: 3b26 6e62 7370 3b3c 7370 616e 2063 6c61 ; else class_apply equivalence_rew │ │ │ +0000d810: 7269 7465 5f72 656c 6174 696f 6e3c 2f73 rite_relation
.
..
.#[global]< │ │ │ +0000d860: 6272 2f3e 0a3c 7370 616e 2063 6c61 7373 br/>.Hint Extern │ │ │ +0000d8c0: 2031 3020 2840 3c61 2063 6c61 7373 3d22 10 (@< │ │ │ +0000d910: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +0000d920: 7469 746c 653d 2263 6c61 7373 223e 5265 title="class">Re │ │ │ +0000d930: 7772 6974 6552 656c 6174 696f 6e3c 2f73 writeRelation
?A │ │ │ +0000d970: 3f3c 7370 616e 2063 6c61 7373 3d22 6964 ?R< │ │ │ +0000d990: 2f73 7061 6e3e 2920 3d26 6774 3b20 3c73 /span>) => equiv │ │ │ +0000d9c0: 5f72 6577 7269 7465 5f72 656c 6174 696f _rewrite_relatio │ │ │ +0000d9d0: 6e3c 2f73 7061 6e3e 203c 7370 616e 2063 n R : │ │ │ +0000da00: 203c 7370 616e 2063 6c61 7373 3d22 6964 ty │ │ │ +0000da20: 7065 636c 6173 735f 696e 7374 616e 6365 peclass_instance │ │ │ +0000da30: 733c 2f73 7061 6e3e 2e3c 6272 2f3e 0a0a s.
.. │ │ │ +0000da40: 3c62 722f 3e0a 3c2f 6469 763e 0a0a 3c64
.
... │ │ │ +0000da60: 4869 6e74 7320 746f 2064 7269 7665 2074 Hints to drive t │ │ │ +0000da70: 6865 2074 7970 6563 6c61 7373 2072 6573 he typeclass res │ │ │ +0000da80: 6f6c 7574 696f 6e20 6176 6f69 6469 6e67 olution avoiding │ │ │ +0000da90: 206c 6f6f 7073 0a20 6475 6520 746f 2074 loops. due to t │ │ │ +0000daa0: 6865 2075 7365 206f 6620 6675 6c6c 2075 he use of full u │ │ │ +0000dab0: 6e69 6669 6361 7469 6f6e 2e20 0a3c 2f64 nification. ..
.#[global]
.Hint< │ │ │ +0000db30: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> Extern 1 (Refle │ │ │ +0000dbd0: 7869 7665 3c2f 7370 616e 3e3c 2f61 3e20 xive │ │ │ +0000dbe0: 283c 6120 636c 6173 733d 2269 6472 6566 (complem │ │ │ +0000dc50: 656e 743c 2f73 7061 6e3e 3c2f 613e 203c ent < │ │ │ +0000dc60: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +0000dc70: 7469 746c 653d 2276 6172 223e 5f3c 2f73 title="var">_
)) => class_ │ │ │ +0000dcb0: 6170 706c 793c 2f73 7061 6e3e 2040 3c61 apply @irrefle │ │ │ +0000dd30: 7869 7669 7479 3c2f 7370 616e 3e3c 2f61 xivity : typeclass_insta │ │ │ +0000dd70: 6e63 6573 3c2f 7370 616e 3e2e 3c62 722f nces.
.#[global]< │ │ │ +0000ddb0: 6272 2f3e 0a3c 7370 616e 2063 6c61 7373 br/>.Hint Extern │ │ │ +0000de10: 2033 2028 3c61 2063 6c61 7373 3d22 6964 3 (Symmetric< │ │ │ +0000de80: 2f73 7061 6e3e 3c2f 613e 2028 3c61 2063 /span> ( │ │ │ +0000ded0: 3c73 7061 6e20 636c 6173 733d 2269 6422 complement _) │ │ │ +0000df30: 2920 3d26 6774 3b20 3c73 7061 6e20 636c ) => class_apply │ │ │ +0000df60: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c complement_ │ │ │ +0000df90: 5379 6d6d 6574 7269 633c 2f73 7061 6e3e Symmetric │ │ │ +0000dfa0: 203a 203c 7370 616e 2063 6c61 7373 3d22 : │ │ │ +0000dfc0: 7479 7065 636c 6173 735f 696e 7374 616e typeclass_instan │ │ │ +0000dfd0: 6365 733c 2f73 7061 6e3e 2e3c 6272 2f3e ces.
│ │ │ +0000dfe0: 0a23 5b3c 7370 616e 2063 6c61 7373 3d22 .#[ │ │ │ +0000e000: 676c 6f62 616c 3c2f 7370 616e 3e5d 3c62 global].Hint │ │ │ +0000e040: 203c 7370 616e 2063 6c61 7373 3d22 6964 Extern │ │ │ +0000e070: 3320 283c 6120 636c 6173 733d 2269 6472 3 (Irreflexi │ │ │ +0000e0e0: 7665 3c2f 7370 616e 3e3c 2f61 3e20 283c ve (< │ │ │ +0000e0f0: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ +0000e100: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ +0000e110: 732e 5265 6c61 7469 6f6e 436c 6173 7365 s.RelationClasse │ │ │ +0000e120: 732e 6874 6d6c 2363 6f6d 706c 656d 656e s.html#complemen │ │ │ +0000e130: 7422 3e3c 7370 616e 2063 6c61 7373 3d22 t">complemen │ │ │ +0000e160: 743c 2f73 7061 6e3e 3c2f 613e 203c 7370 t _)) => class_ap │ │ │ +0000e1c0: 706c 793c 2f73 7061 6e3e 203c 7370 616e ply compleme │ │ │ +0000e1f0: 6e74 5f49 7272 6566 6c65 7869 7665 3c2f nt_Irreflexive : typeclass_i │ │ │ +0000e230: 6e73 7461 6e63 6573 3c2f 7370 616e 3e2e nstances. │ │ │ +0000e240: 3c62 722f 3e0a 0a3c 6272 2f3e 0a23 5b3c
..
.#[< │ │ │ +0000e250: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +0000e260: 7469 746c 653d 2276 6172 223e 676c 6f62 title="var">glob │ │ │ +0000e270: 616c 3c2f 7370 616e 3e5d 3c62 722f 3e0a al
]
. │ │ │ +0000e280: 3c73 7061 6e20 636c 6173 733d 2269 6422 Hint Ex │ │ │ +0000e2d0: 7465 726e 3c2f 7370 616e 3e20 3320 283c tern 3 (< │ │ │ +0000e2e0: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ +0000e2f0: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ +0000e300: 732e 5265 6c61 7469 6f6e 436c 6173 7365 s.RelationClasse │ │ │ +0000e310: 732e 6874 6d6c 2352 6566 6c65 7869 7665 s.html#Reflexive │ │ │ +0000e320: 223e 3c73 7061 6e20 636c 6173 733d 2269 ">Reflexive ( │ │ │ +0000e3b0: 666c 6970 3c2f 7370 616e 3e3c 2f61 3e20 flip │ │ │ +0000e3c0: 3c73 7061 6e20 636c 6173 733d 2269 6422 _)) => ap │ │ │ +0000e410: 706c 793c 2f73 7061 6e3e 203c 6120 636c ply flip_Reflexive │ │ │ +0000e490: 3c2f 7370 616e 3e3c 2f61 3e20 3a20 3c73 : typec │ │ │ +0000e4c0: 6c61 7373 5f69 6e73 7461 6e63 6573 3c2f lass_instances.
.#[globa │ │ │ +0000e500: 6c3c 2f73 7061 6e3e 5d3c 6272 2f3e 0a3c l]
.< │ │ │ +0000e510: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +0000e520: 7469 746c 653d 226b 6579 776f 7264 223e title="keyword"> │ │ │ +0000e530: 4869 6e74 3c2f 7370 616e 3e20 3c73 7061 Hint Ext │ │ │ +0000e560: 6572 6e3c 2f73 7061 6e3e 2033 2028 3c61 ern 3 (Irreflexive
(< │ │ │ +0000e620: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +0000e630: 7469 746c 653d 2264 6566 696e 6974 696f title="definitio │ │ │ +0000e640: 6e22 3e66 6c69 703c 2f73 7061 6e3e 3c2f n">flip │ │ │ +0000e670: 5f3c 2f73 7061 6e3e 2929 203d 2667 743b _)) => │ │ │ +0000e680: 203c 7370 616e 2063 6c61 7373 3d22 6964 cl │ │ │ +0000e6a0: 6173 735f 6170 706c 793c 2f73 7061 6e3e ass_apply │ │ │ +0000e6b0: 203c 7370 616e 2063 6c61 7373 3d22 6964 fl │ │ │ +0000e6d0: 6970 5f49 7272 6566 6c65 7869 7665 3c2f ip_Irreflexive : typeclass_i │ │ │ +0000e710: 6e73 7461 6e63 6573 3c2f 7370 616e 3e2e nstances. │ │ │ +0000e720: 3c62 722f 3e0a 235b 3c73 7061 6e20 636c
.#[global]
.Hint Extern
3 (Symmet │ │ │ +0000e820: 7269 633c 2f73 7061 6e3e 3c2f 613e 2028 ric ( │ │ │ +0000e830: 3c61 2063 6c61 7373 3d22 6964 7265 6622 flip
_)) │ │ │ +0000e8c0: 203d 2667 743b 203c 7370 616e 2063 6c61 => class_apply< │ │ │ +0000e8f0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> flip_Symmetr │ │ │ +0000e920: 6963 3c2f 7370 616e 3e20 3a20 3c73 7061 ic : typecla │ │ │ +0000e950: 7373 5f69 6e73 7461 6e63 6573 3c2f 7370 ss_instances
.
.#[global< │ │ │ +0000e990: 2f73 7061 6e3e 5d3c 6272 2f3e 0a3c 7370 /span>]
.Hi │ │ │ +0000e9c0: 6e74 3c2f 7370 616e 3e20 3c73 7061 6e20 nt Exter │ │ │ +0000e9f0: 6e3c 2f73 7061 6e3e 2033 2028 3c61 2063 n 3 ( │ │ │ +0000ea40: 3c73 7061 6e20 636c 6173 733d 2269 6422 A │ │ │ +0000ea60: 7379 6d6d 6574 7269 633c 2f73 7061 6e3e symmetric │ │ │ +0000ea70: 3c2f 613e 2028 3c61 2063 6c61 7373 3d22 (f │ │ │ +0000ead0: 6c69 703c 2f73 7061 6e3e 3c2f 613e 203c lip < │ │ │ +0000eae0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +0000eaf0: 7469 746c 653d 2276 6172 223e 5f3c 2f73 title="var">_
)) => class_ │ │ │ +0000eb30: 6170 706c 793c 2f73 7061 6e3e 203c 7370 apply flip_A │ │ │ +0000eb60: 7379 6d6d 6574 7269 633c 2f73 7061 6e3e symmetric │ │ │ +0000eb70: 203a 203c 7370 616e 2063 6c61 7373 3d22 : │ │ │ +0000eb90: 7479 7065 636c 6173 735f 696e 7374 616e typeclass_instan │ │ │ +0000eba0: 6365 733c 2f73 7061 6e3e 2e3c 6272 2f3e ces.
│ │ │ +0000ebb0: 0a23 5b3c 7370 616e 2063 6c61 7373 3d22 .#[ │ │ │ +0000ebd0: 676c 6f62 616c 3c2f 7370 616e 3e5d 3c62 global].Hint │ │ │ +0000ec10: 203c 7370 616e 2063 6c61 7373 3d22 6964 Extern │ │ │ +0000ec40: 3320 283c 6120 636c 6173 733d 2269 6472 3 (Antisym │ │ │ +0000ecb0: 6d65 7472 6963 3c2f 7370 616e 3e3c 2f61 metric (flip │ │ │ +0000ed20: 3c2f 7370 616e 3e3c 2f61 3e20 3c73 7061 _)) => class_app │ │ │ +0000ed80: 6c79 3c2f 7370 616e 3e20 3c73 7061 6e20 ly flip_Anti │ │ │ +0000edb0: 7379 6d6d 6574 7269 633c 2f73 7061 6e3e symmetric │ │ │ +0000edc0: 203a 203c 7370 616e 2063 6c61 7373 3d22 : │ │ │ +0000ede0: 7479 7065 636c 6173 735f 696e 7374 616e typeclass_instan │ │ │ +0000edf0: 6365 733c 2f73 7061 6e3e 2e3c 6272 2f3e ces.
│ │ │ +0000ee00: 0a23 5b3c 7370 616e 2063 6c61 7373 3d22 .#[ │ │ │ +0000ee20: 676c 6f62 616c 3c2f 7370 616e 3e5d 3c62 global].Hint │ │ │ +0000ee60: 203c 7370 616e 2063 6c61 7373 3d22 6964 Extern │ │ │ +0000ee90: 3320 283c 6120 636c 6173 733d 2269 6472 3 (Transitive │ │ │ +0000ef00: 3c2f 7370 616e 3e3c 2f61 3e20 283c 6120 (flip _)) =& │ │ │ +0000efa0: 6774 3b20 3c73 7061 6e20 636c 6173 733d gt; class_apply
flip_Transitive │ │ │ +0000f000: 3c2f 7370 616e 3e20 3a20 3c73 7061 6e20 : typeclass │ │ │ +0000f030: 5f69 6e73 7461 6e63 6573 3c2f 7370 616e _instances.
.#[global
]
.Hint │ │ │ +0000f0a0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c Extern< │ │ │ +0000f0d0: 2f73 7061 6e3e 2033 2028 3c61 2063 6c61 /span> 3 (< │ │ │ +0000f120: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +0000f130: 7469 746c 653d 2263 6c61 7373 223e 5374 title="class">St │ │ │ +0000f140: 7269 6374 4f72 6465 723c 2f73 7061 6e3e rictOrder │ │ │ +0000f150: 3c2f 613e 2028 3c61 2063 6c61 7373 3d22 (f │ │ │ +0000f1b0: 6c69 703c 2f73 7061 6e3e 3c2f 613e 203c lip < │ │ │ +0000f1c0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +0000f1d0: 7469 746c 653d 2276 6172 223e 5f3c 2f73 title="var">_
)) => class_ │ │ │ +0000f210: 6170 706c 793c 2f73 7061 6e3e 203c 7370 apply flip_S │ │ │ +0000f240: 7472 6963 744f 7264 6572 3c2f 7370 616e trictOrder : typeclass_insta │ │ │ +0000f280: 6e63 6573 3c2f 7370 616e 3e2e 3c62 722f nces.
.#[global]< │ │ │ +0000f2c0: 6272 2f3e 0a3c 7370 616e 2063 6c61 7373 br/>.Hint Extern │ │ │ +0000f320: 2033 2028 3c61 2063 6c61 7373 3d22 6964 3 (PreOrder (< │ │ │ +0000f3d0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +0000f3e0: 7469 746c 653d 2264 6566 696e 6974 696f title="definitio │ │ │ +0000f3f0: 6e22 3e66 6c69 703c 2f73 7061 6e3e 3c2f n">flip │ │ │ +0000f420: 5f3c 2f73 7061 6e3e 2929 203d 2667 743b _)) => │ │ │ +0000f430: 203c 7370 616e 2063 6c61 7373 3d22 6964 cl │ │ │ +0000f450: 6173 735f 6170 706c 793c 2f73 7061 6e3e ass_apply │ │ │ +0000f460: 203c 7370 616e 2063 6c61 7373 3d22 6964 fl │ │ │ +0000f480: 6970 5f50 7265 4f72 6465 723c 2f73 7061 ip_PreOrder : typeclass_inst │ │ │ +0000f4c0: 616e 6365 733c 2f73 7061 6e3e 2e3c 6272 ances.
..
.#[global< │ │ │ +0000f500: 2f73 7061 6e3e 5d3c 6272 2f3e 0a3c 7370 /span>]
.Hi │ │ │ +0000f530: 6e74 3c2f 7370 616e 3e20 3c73 7061 6e20 nt
Exter │ │ │ +0000f560: 6e3c 2f73 7061 6e3e 2034 2028 3c61 2063 n 4 (
│ │ │ +0000f5d0: 7375 6272 656c 6174 696f 6e3c 2f73 7061 subrelation (flip │ │ │ +0000f650: 203c 7370 616e 2063 6c61 7373 3d22 6964 _< │ │ │ +0000f670: 2f73 7061 6e3e 2920 3c73 7061 6e20 636c /span>) _) = │ │ │ +0000f6a0: 2667 743b 203c 6272 2f3e 0a26 6e62 7370 >
.  │ │ │ +0000f6b0: 3b26 6e62 7370 3b3c 7370 616e 2063 6c61 ; class_apply< │ │ │ +0000f6e0: 2f73 7061 6e3e 2040 3c61 2063 6c61 7373 /span> @subrelatio │ │ │ +0000f760: 6e5f 7379 6d6d 6574 7269 633c 2f73 7061 n_symmetric : typeclass_ │ │ │ +0000f7a0: 696e 7374 616e 6365 733c 2f73 7061 6e3e instances │ │ │ +0000f7b0: 2e3c 6272 2f3e 0a0a 3c62 722f 3e0a 3c73 .
..
.A │ │ │ +0000f7e0: 7267 756d 656e 7473 3c2f 7370 616e 3e20 rguments
│ │ │ +0000f7f0: 3c61 2063 6c61 7373 3d22 6964 7265 6622 irref │ │ │ +0000f860: 6c65 7869 7669 7479 3c2f 7370 616e 3e3c lexivity< │ │ │ +0000f870: 2f61 3e20 7b3c 7370 616e 2063 6c61 7373 /a> {A R │ │ │ +0000f8c0: 203c 7370 616e 2063 6c61 7373 3d22 6964 Ir │ │ │ +0000f8e0: 7265 666c 6578 6976 653c 2f73 7061 6e3e reflexive │ │ │ +0000f8f0: 7d20 5b3c 7370 616e 2063 6c61 7373 3d22 } [ │ │ │ +0000f910: 783c 2f73 7061 6e3e 5d20 3c73 7061 6e20 x] _ │ │ │ +0000f940: 3a20 3c73 7061 6e20 636c 6173 733d 2269 : rename. │ │ │ +0000f970: 3c62 722f 3e0a 3c73 7061 6e20 636c 6173
.Arguments │ │ │ +0000f9a0: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373
sy │ │ │ +0000fa10: 6d6d 6574 7279 3c2f 7370 616e 3e3c 2f61 mmetry { │ │ │ +0000fa40: 413c 2f73 7061 6e3e 7d20 7b3c 7370 616e A} {R │ │ │ +0000fa70: 7d20 7b3c 7370 616e 2063 6c61 7373 3d22 } { │ │ │ +0000fa90: 5f3c 2f73 7061 6e3e 7d20 5b3c 7370 616e _} [x │ │ │ +0000fac0: 5d20 5b3c 7370 616e 2063 6c61 7373 3d22 ] [ │ │ │ +0000fae0: 793c 2f73 7061 6e3e 5d20 3c73 7061 6e20 y] _. │ │ │ +0000fb10: 3c62 722f 3e0a 3c73 7061 6e20 636c 6173
.Arguments │ │ │ +0000fb40: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 a │ │ │ +0000fbb0: 7379 6d6d 6574 7279 3c2f 7370 616e 3e3c symmetry< │ │ │ +0000fbc0: 2f61 3e20 7b3c 7370 616e 2063 6c61 7373 /a> {A} {R} {_} [x] [y] _
_ │ │ │ +0000fcd0: 3c2f 7370 616e 3e2e 3c62 722f 3e0a 3c73 .
.A │ │ │ +0000fd00: 7267 756d 656e 7473 3c2f 7370 616e 3e20 rguments │ │ │ +0000fd10: 3c61 2063 6c61 7373 3d22 6964 7265 6622
transi │ │ │ +0000fd80: 7469 7669 7479 3c2f 7370 616e 3e3c 2f61 tivity { │ │ │ +0000fdb0: 413c 2f73 7061 6e3e 7d20 7b3c 7370 616e A} {R │ │ │ +0000fde0: 7d20 7b3c 7370 616e 2063 6c61 7373 3d22 } { │ │ │ +0000fe00: 5f3c 2f73 7061 6e3e 7d20 5b3c 7370 616e _} [x │ │ │ +0000fe30: 5d20 5b3c 7370 616e 2063 6c61 7373 3d22 ] [ │ │ │ +0000fe50: 793c 2f73 7061 6e3e 5d20 5b3c 7370 616e y] [z │ │ │ +0000fe80: 5d20 3c73 7061 6e20 636c 6173 733d 2269 ] _ │ │ │ +0000fea0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c _..Arguments Anti │ │ │ +0000ff70: 7379 6d6d 6574 7269 633c 2f73 7061 6e3e symmetric │ │ │ +0000ff80: 3c2f 613e 203c 7370 616e 2063 6c61 7373 A eqA {_} _ │ │ │ +00010020: 2e3c 6272 2f3e 0a0a 3c62 722f 3e0a 235b .
..
.#[ │ │ │ +00010030: 3c73 7061 6e20 636c 6173 733d 2269 6422 glo │ │ │ +00010050: 6261 6c3c 2f73 7061 6e3e 5d3c 6272 2f3e bal]
│ │ │ +00010060: 0a3c 7370 616e 2063 6c61 7373 3d22 6964 .Hint R │ │ │ +000100b0: 6573 6f6c 7665 3c2f 7370 616e 3e20 3c73 esolve
irref │ │ │ +000100e0: 6c65 7869 7669 7479 3c2f 7370 616e 3e20 lexivity │ │ │ +000100f0: 3a20 3c73 7061 6e20 636c 6173 733d 2269 : o │ │ │ +00010110: 7264 3c2f 7370 616e 3e2e 3c62 722f 3e0a rd.
. │ │ │ +00010120: 0a3c 6272 2f3e 0a3c 7370 616e 2063 6c61 .
.Unset Im │ │ │ +00010150: 706c 6963 6974 2041 7267 756d 656e 7473 plicit Arguments │ │ │ +00010160: 3c2f 7370 616e 3e2e 3c62 722f 3e0a 0a3c .
..< │ │ │ +00010170: 6272 2f3e 0a3c 7370 616e 2063 6c61 7373 br/>.Ltac s │ │ │ +000101c0: 6f6c 7665 5f72 656c 6174 696f 6e3c 2f73 olve_relation
:=
.&nb │ │ │ +000101e0: 7370 3b26 6e62 7370 3b3c 7370 616e 2063 sp; match< │ │ │ +00010210: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> goal
with │ │ │ +00010270: 3c62 722f 3e0a 266e 6273 703b 266e 6273
. &nbs │ │ │ +00010280: 703b 7c20 5b20 7c2d 203f 3c73 7061 6e20 p;| [ |- ?R │ │ │ +000102b0: 3f3c 7370 616e 2063 6c61 7373 3d22 6964 ?x< │ │ │ +000102d0: 2f73 7061 6e3e 203f 3c73 7061 6e20 636c /span> ?x ] │ │ │ +00010300: 3d26 6774 3b20 3c73 7061 6e20 636c 6173 => reflexivit │ │ │ +00010330: 793c 2f73 7061 6e3e 3c62 722f 3e0a 266e y
.&n │ │ │ +00010340: 6273 703b 266e 6273 703b 7c20 5b20 3c73 bsp; | [ H
: ?R ?x ?y |- ?< │ │ │ +000103f0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +00010400: 7469 746c 653d 2276 6172 223e 523c 2f73 title="var">R ?y ?x ] => symme │ │ │ +00010490: 7472 793c 2f73 7061 6e3e 203b 203c 7370 try ; exa │ │ │ +000104c0: 6374 3c2f 7370 616e 3e20 3c73 7061 6e20 ct H< │ │ │ +000104f0: 6272 2f3e 0a26 6e62 7370 3b26 6e62 7370 br/>.   │ │ │ +00010500: 3b3c 7370 616e 2063 6c61 7373 3d22 6964 ;end.
..
.#[global< │ │ │ +00010560: 2f73 7061 6e3e 5d3c 6272 2f3e 0a3c 7370 /span>]
.Hi │ │ │ +00010590: 6e74 3c2f 7370 616e 3e20 3c73 7061 6e20 nt Exter │ │ │ +000105c0: 6e3c 2f73 7061 6e3e 2034 203d 2667 743b n 4 => │ │ │ +000105d0: 203c 7370 616e 2063 6c61 7373 3d22 6964 so │ │ │ +000105f0: 6c76 655f 7265 6c61 7469 6f6e 3c2f 7370 lve_relation : relations
.
..
│ │ │ +00010640: 0a3c 2f64 6976 3e0a 0a3c 6469 7620 636c .
..
.We ca │ │ │ +00010660: 6e20 616c 7265 6164 7920 6475 616c 697a n already dualiz │ │ │ +00010670: 6520 616c 6c20 7468 6573 6520 7072 6f70 e all these prop │ │ │ +00010680: 6572 7469 6573 2e20 0a3c 6469 7620 636c erties. .
│ │ │ +000106a0: 203c 2f64 6976 3e0a 0a3c 6120 6964 3d22
..

│ │ │ +000106d0: 5374 616e 6461 7264 2069 6e73 7461 6e63 Standard instanc │ │ │ +000106e0: 6573 2e3c 2f68 313e 0a0a 3c2f 6469 763e es.

..
│ │ │ +000106f0: 0a3c 6469 7620 636c 6173 733d 2263 6f64 .
..
.Ltac │ │ │ +00010730: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c reduce_hyp< │ │ │ +00010760: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> H :=< │ │ │ +00010790: 6272 2f3e 0a26 6e62 7370 3b26 6e62 7370 br/>.   │ │ │ +000107a0: 3b3c 7370 616e 2063 6c61 7373 3d22 6964 ;match < │ │ │ +000107d0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +000107e0: 7469 746c 653d 226b 6579 776f 7264 223e title="keyword"> │ │ │ +000107f0: 7479 7065 3c2f 7370 616e 3e20 3c73 7061 type of< │ │ │ +00010820: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> H wi │ │ │ +00010870: 7468 3c2f 7370 616e 3e3c 6272 2f3e 0a26 th
.& │ │ │ +00010880: 6e62 7370 3b26 6e62 7370 3b26 6e62 7370 nbsp;   │ │ │ +00010890: 3b26 6e62 7370 3b7c 203c 7370 616e 2063 ; | contex │ │ │ +000108c0: 743c 2f73 7061 6e3e 205b 203c 7370 616e t [ _ │ │ │ +000108f0: 203c 6120 636c 6173 733d 2269 6472 6566 < │ │ │ +00010960: 2d26 6774 3b3c 2f73 7061 6e3e 3c2f 613e -> │ │ │ +00010970: 203c 7370 616e 2063 6c61 7373 3d22 6964 _< │ │ │ +00010990: 2f73 7061 6e3e 205d 203d 2667 743b 203c /span> ] => < │ │ │ +000109a0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +000109b0: 7469 746c 653d 2274 6163 7469 6322 3e66 title="tactic">f │ │ │ +000109c0: 6169 6c3c 2f73 7061 6e3e 2031 3c62 722f ail 1
.  &n │ │ │ +000109e0: 6273 703b 266e 6273 703b 7c20 3c73 7061 bsp; | _ => red in H
; try │ │ │ +00010ac0: 3c73 7061 6e20 636c 6173 733d 2269 6422 red │ │ │ +00010ae0: 7563 655f 6879 703c 2f73 7061 6e3e 203c uce_hyp < │ │ │ +00010af0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +00010b00: 7469 746c 653d 2276 6172 223e 483c 2f73 title="var">H

.  │ │ │ +00010b20: 266e 6273 703b 3c73 7061 6e20 636c 6173  end.
..
.< │ │ │ +00010b60: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +00010b70: 7469 746c 653d 226b 6579 776f 7264 223e title="keyword"> │ │ │ +00010b80: 4c74 6163 3c2f 7370 616e 3e20 3c73 7061 Ltac reduce_ │ │ │ +00010bb0: 676f 616c 3c2f 7370 616e 3e20 3a3d 3c62 goal :=.   │ │ │ +00010bd0: 3c73 7061 6e20 636c 6173 733d 2269 6422 match g │ │ │ +00010c20: 6f61 6c3c 2f73 7061 6e3e 203c 7370 616e oal with │ │ │ +00010c50: 3c2f 7370 616e 3e3c 6272 2f3e 0a26 6e62
.&nb │ │ │ +00010c60: 7370 3b26 6e62 7370 3b26 6e62 7370 3b26 sp;  & │ │ │ +00010c70: 6e62 7370 3b7c 205b 207c 2d20 3c73 7061 nbsp;| [ |- _ < │ │ │ +00010d10: 3b2d 2667 743b 3c2f 7370 616e 3e3c 2f61 ;-> _ │ │ │ +00010d40: 3c2f 7370 616e 3e20 5d20 3d26 6774 3b20 ] => │ │ │ +00010d50: 3c73 7061 6e20 636c 6173 733d 2269 6422 │ │ │ +00010d70: 6661 696c 3c2f 7370 616e 3e20 313c 6272 fail 1
.  & │ │ │ +00010d90: 6e62 7370 3b26 6e62 7370 3b7c 203c 7370 nbsp; | _
=> red ; intros ; try │ │ │ +00010e50: 203c 7370 616e 2063 6c61 7373 3d22 6964 re │ │ │ +00010e70: 6475 6365 5f67 6f61 6c3c 2f73 7061 6e3e duce_goal │ │ │ +00010e80: 3c62 722f 3e0a 266e 6273 703b 266e 6273
. &nbs │ │ │ +00010e90: 703b 3c73 7061 6e20 636c 6173 733d 2269 p;end...
.Tact │ │ │ +00010ef0: 6963 204e 6f74 6174 696f 6e3c 2f73 7061 ic Notation
"reduce" "in" │ │ │ +00010f10: 203c 7370 616e 2063 6c61 7373 3d22 6964 hy │ │ │ +00010f30: 703c 2f73 7061 6e3e 283c 7370 616e 2063 p(Hid │ │ │ +00010f60: 2920 3a3d 203c 7370 616e 2063 6c61 7373 ) := reduce_hyp Hid.
..
.Ltac reduce │ │ │ +00011020: 203a 3d20 3c73 7061 6e20 636c 6173 733d := reduce_goal.
..
│ │ │ +00011060: 0a3c 7370 616e 2063 6c61 7373 3d22 6964 .Tactic Notatio │ │ │ +00011090: 6e3c 2f73 7061 6e3e 2022 6170 706c 7922 n "apply" │ │ │ +000110a0: 2022 2a22 203c 7370 616e 2063 6c61 7373 "*" constr(t) :=
.  < │ │ │ +00011110: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +00011120: 7469 746c 653d 2274 6163 7469 6322 3e66 title="tactic">f │ │ │ +00011130: 6972 7374 3c2f 7370 616e 3e20 5b20 3c73 irst
[ re │ │ │ +00011160: 6669 6e65 3c2f 7370 616e 3e20 3c73 7061 fine
t
| refine ( │ │ │ +000111e0: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t _) │ │ │ +00011210: 7c20 3c73 7061 6e20 636c 6173 733d 2269 | refine │ │ │ +00011240: 283c 7370 616e 2063 6c61 7373 3d22 6964 (t< │ │ │ +00011260: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> _ _) | refine (t _ │ │ │ +00011330: 203c 7370 616e 2063 6c61 7373 3d22 6964 _< │ │ │ +00011350: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> _) | │ │ │ +00011380: 3c73 7061 6e20 636c 6173 733d 2269 6422 │ │ │ +000113a0: 7265 6669 6e65 3c2f 7370 616e 3e20 283c refine (< │ │ │ +000113b0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +000113c0: 7469 746c 653d 2276 6172 223e 743c 2f73 title="var">t _ _ │ │ │ +00011420: 203c 7370 616e 2063 6c61 7373 3d22 6964 _< │ │ │ +00011440: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> _) |< │ │ │ +00011470: 6272 2f3e 0a26 6e62 7370 3b26 6e62 7370 br/>.   │ │ │ +00011480: 3b26 6e62 7370 3b26 6e62 7370 3b3c 7370 ;  ref │ │ │ +000114b0: 696e 653c 2f73 7061 6e3e 2028 3c73 7061 ine (t
_ │ │ │ +00011500: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c _ _ _ _) │ │ │ +000115a0: 207c 203c 7370 616e 2063 6c61 7373 3d22 | refine │ │ │ +000115d0: 2028 3c73 7061 6e20 636c 6173 733d 2269 (t │ │ │ +000115f0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c _ _ _ _ │ │ │ +00011690: 3c73 7061 6e20 636c 6173 733d 2269 6422 _ _) | < │ │ │ +000116e0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +000116f0: 7469 746c 653d 2274 6163 7469 6322 3e72 title="tactic">r │ │ │ +00011700: 6566 696e 653c 2f73 7061 6e3e 2028 3c73 efine (t _ _ │ │ │ +00011780: 3c73 7061 6e20 636c 6173 733d 2269 6422 _ _ _ _ │ │ │ +00011810: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c _) ] │ │ │ +00011840: 2e3c 6272 2f3e 0a0a 3c62 722f 3e0a 3c73 .
..
.L │ │ │ +00011870: 7461 633c 2f73 7061 6e3e 203c 7370 616e tac simpl_re │ │ │ +000118a0: 6c61 7469 6f6e 3c2f 7370 616e 3e20 3a3d lation := │ │ │ +000118b0: 3c62 722f 3e0a 266e 6273 703b 266e 6273
. &nbs │ │ │ +000118c0: 703b 3c73 7061 6e20 636c 6173 733d 2269 p;unfold │ │ │ +000118f0: 3c61 2063 6c61 7373 3d22 6964 7265 6622 flip
, < │ │ │ +00011990: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +000119a0: 7469 746c 653d 2264 6566 696e 6974 696f title="definitio │ │ │ +000119b0: 6e22 3e69 6d70 6c3c 2f73 7061 6e3e 3c2f n">impl, ar │ │ │ +00011a20: 726f 773c 2f73 7061 6e3e 3c2f 613e 203b row ; │ │ │ +00011a30: 203c 7370 616e 2063 6c61 7373 3d22 6964 try reduce< │ │ │ +00011a80: 2f73 7061 6e3e 203b 203c 7370 616e 2063 /span> ; program │ │ │ +00011ab0: 5f73 696d 706c 3c2f 7370 616e 3e20 3b3c _simpl ;< │ │ │ +00011ac0: 6272 2f3e 0a26 6e62 7370 3b26 6e62 7370 br/>.   │ │ │ +00011ad0: 3b26 6e62 7370 3b26 6e62 7370 3b3c 7370 ;  try │ │ │ +00011b00: 3c2f 7370 616e 3e20 2820 3c73 7061 6e20 ( solve< │ │ │ +00011b30: 2f73 7061 6e3e 205b 203c 7370 616e 2063 /span> [ dintuition │ │ │ +00011b60: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c auto with │ │ │ +00011bc0: 203c 7370 616e 2063 6c61 7373 3d22 6964 re │ │ │ +00011be0: 6c61 7469 6f6e 733c 2f73 7061 6e3e 205d lations ] │ │ │ +00011bf0: 292e 3c62 722f 3e0a 0a3c 6272 2f3e 0a3c ).
..
.< │ │ │ +00011c00: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +00011c10: 7469 746c 653d 226b 6579 776f 7264 223e title="keyword"> │ │ │ +00011c20: 4c6f 6361 6c20 4f62 6c69 6761 7469 6f6e Local Obligation │ │ │ +00011c30: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c Tactic< │ │ │ +00011c60: 2f73 7061 6e3e 203a 3d20 3c73 7061 6e20 /span> := try
solve [ simpl_relation< │ │ │ +00011cf0: 2f73 7061 6e3e 205d 2e3c 6272 2f3e 0a0a /span> ].
.. │ │ │ +00011d00: 3c62 722f 3e0a 3c2f 6469 763e 0a0a 3c64
.
... │ │ │ +00011d20: 4c6f 6769 6361 6c20 696d 706c 6963 6174 Logical implicat │ │ │ +00011d30: 696f 6e2e 200a 3c2f 6469 763e 0a3c 6469 ion. .
.. │ │ │ +00011d50: 0a3c 6272 2f3e 0a23 5b3c 7370 616e 2063 .
.#[global]
.Program Instance< │ │ │ +00011de0: 2f73 7061 6e3e 203c 6120 6964 3d22 696d /span> impl_Reflex │ │ │ +00011e50: 6976 653c 2f73 7061 6e3e 3c2f 613e 203a ive : │ │ │ +00011e60: 203c 6120 636c 6173 733d 2269 6472 6566 Reflexive impl │ │ │ +00011f40: 2e3c 6272 2f3e 0a23 5b3c 7370 616e 2063 .
.#[global]
.Program Instance< │ │ │ +00011fd0: 2f73 7061 6e3e 203c 6120 6964 3d22 696d /span> impl_Tran │ │ │ +00012040: 7369 7469 7665 3c2f 7370 616e 3e3c 2f61 sitive : Transitiv │ │ │ +000120c0: 653c 2f73 7061 6e3e 3c2f 613e 203c 6120 e impl.
..
.
..
.Log │ │ │ +00012160: 6963 616c 2065 7175 6976 616c 656e 6365 ical equivalence │ │ │ +00012170: 2e20 0a3c 2f64 6976 3e0a 3c64 6976 2063 . .
.
...#[global │ │ │ +000121c0: 5d3c 6272 2f3e 0a3c 7370 616e 2063 6c61 ]
.Instance │ │ │ +000121f0: 3c2f 7370 616e 3e20 3c61 2069 643d 2269 iff_Reflexiv │ │ │ +00012260: 653c 2f73 7061 6e3e 3c2f 613e 203a 203c e : < │ │ │ +00012270: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ +00012280: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ +00012290: 732e 5265 6c61 7469 6f6e 436c 6173 7365 s.RelationClasse │ │ │ +000122a0: 732e 6874 6d6c 2352 6566 6c65 7869 7665 s.html#Reflexive │ │ │ +000122b0: 223e 3c73 7061 6e20 636c 6173 733d 2269 ">Reflexive iff
:= │ │ │ +000123a0: 6966 665f 7265 666c 3c2f 7370 616e 3e3c iff_refl< │ │ │ +000123b0: 2f61 3e2e 3c62 722f 3e0a 235b 3c73 7061 /a>.
.#[global< │ │ │ +000123e0: 2f73 7061 6e3e 5d3c 6272 2f3e 0a3c 7370 /span>]
.In │ │ │ +00012410: 7374 616e 6365 3c2f 7370 616e 3e20 3c61 stance
iff_Sy │ │ │ +00012480: 6d6d 6574 7269 633c 2f73 7061 6e3e 3c2f mmetric : Symmetric │ │ │ +00012500: 3c2f 7370 616e 3e3c 2f61 3e20 3c61 2063 │ │ │ +00012560: 6966 663c 2f73 7061 6e3e 3c2f 613e 203a iff : │ │ │ +00012570: 3d20 3c61 2063 6c61 7373 3d22 6964 7265 = iff_sym.
.#[ │ │ │ +000125e0: 3c73 7061 6e20 636c 6173 733d 2269 6422 glo │ │ │ +00012600: 6261 6c3c 2f73 7061 6e3e 5d3c 6272 2f3e bal]
│ │ │ +00012610: 0a3c 7370 616e 2063 6c61 7373 3d22 6964 .Instance │ │ │ +000126a0: 6966 665f 5472 616e 7369 7469 7665 3c2f iff_Transitive : │ │ │ +00012700: 3c73 7061 6e20 636c 6173 733d 2269 6422 T │ │ │ +00012720: 7261 6e73 6974 6976 653c 2f73 7061 6e3e ransitive │ │ │ +00012730: 3c2f 613e 203c 6120 636c 6173 733d 2269 iff := │ │ │ +000127f0: 6966 665f 7472 616e 733c 2f73 7061 6e3e iff_trans │ │ │ +00012800: 3c2f 613e 2e3c 6272 2f3e 0a0a 3c62 722f .
..
.
..
.Logi │ │ │ +00012830: 6361 6c20 6571 7569 7661 6c65 6e63 6520 cal equivalence │ │ │ +00012840: 3c73 7061 6e20 636c 6173 733d 2269 6e6c iff │ │ │ +00012880: 3c2f 7370 616e 3e20 6973 2061 6e20 6571 is an eq │ │ │ +00012890: 7569 7661 6c65 6e63 6520 7265 6c61 7469 uivalence relati │ │ │ +000128a0: 6f6e 2e20 0a3c 2f64 6976 3e0a 3c64 6976 on. .
.
.. │ │ │ +000128c0: 3c62 722f 3e0a 235b 3c73 7061 6e20 636c
.#[global]
.Program
Instance iff_equiva │ │ │ +000129c0: 6c65 6e63 653c 2f73 7061 6e3e 3c2f 613e lence │ │ │ +000129d0: 203a 203c 6120 636c 6173 733d 2269 6472 : Equivalen │ │ │ +00012a40: 6365 3c2f 7370 616e 3e3c 2f61 3e20 3c61 ce iff │ │ │ +00012ab0: 2e3c 6272 2f3e 0a0a 3c62 722f 3e0a 3c2f .
..
...
.We now d │ │ │ +00012ae0: 6576 656c 6f70 2061 2067 656e 6572 616c evelop a general │ │ │ +00012af0: 697a 6174 696f 6e20 6f66 2072 6573 756c ization of resul │ │ │ +00012b00: 7473 206f 6e20 7265 6c61 7469 6f6e 7320 ts on relations │ │ │ +00012b10: 666f 7220 6172 6269 7472 6172 7920 7072 for arbitrary pr │ │ │ +00012b20: 6564 6963 6174 6573 2e0a 2020 2054 6865 edicates.. The │ │ │ +00012b30: 2072 6573 756c 7469 6e67 2074 6865 6f72 resulting theor │ │ │ +00012b40: 7920 6361 6e20 6265 2061 7070 6c69 6564 y can be applied │ │ │ +00012b50: 2074 6f20 686f 6d6f 6765 6e65 6f75 7320 to homogeneous │ │ │ +00012b60: 6269 6e61 7279 2072 656c 6174 696f 6e73 binary relations │ │ │ +00012b70: 2062 7574 2061 6c73 6f20 746f 0a20 2020 but also to. │ │ │ +00012b80: 6172 6269 7472 6172 7920 6e2d 6172 7920 arbitrary n-ary │ │ │ +00012b90: 7072 6564 6963 6174 6573 2e20 0a3c 2f64 predicates. ..
..
.L │ │ │ +00012be0: 6f63 616c 204f 7065 6e3c 2f73 7061 6e3e ocal Open │ │ │ +00012bf0: 203c 7370 616e 2063 6c61 7373 3d22 6964 Scope < │ │ │ +00012c20: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +00012c30: 7469 746c 653d 2276 6172 223e 6c69 7374 title="var">list │ │ │ +00012c40: 5f73 636f 7065 3c2f 7370 616e 3e2e 3c62 _scope...
.
..
.A compact r │ │ │ +00012c80: 6570 7265 7365 6e74 6174 696f 6e20 6f66 epresentation of │ │ │ +00012c90: 206e 6f6e 2d64 6570 656e 6465 6e74 2061 non-dependent a │ │ │ +00012ca0: 7269 7469 6573 2c20 7769 7468 2074 6865 rities, with the │ │ │ +00012cb0: 2063 6f64 6f6d 6169 6e20 7369 6e67 6c65 codomain single │ │ │ +00012cc0: 642d 6f75 742e 200a 3c2f 6469 763e 0a3c d-out. .
.< │ │ │ +00012cd0: 6469 7620 636c 6173 733d 2263 6f64 6522 div class="code" │ │ │ +00012ce0: 3e0a 0a3c 6272 2f3e 0a3c 7370 616e 2063 >..
.Induct │ │ │ +00012d10: 6976 653c 2f73 7061 6e3e 203c 6120 6964 ive Tlist │ │ │ +00012e10: 3c2f 7370 616e 3e3c 2f73 7061 6e3e 3c2f : Type := Tnil : Tlist< │ │ │ +00012f20: 2f73 7061 6e3e 3c2f 613e 207c 203c 6120 /span> | Tcon │ │ │ +00012f80: 733c 2f73 7061 6e3e 3c2f 613e 203a 203c s : < │ │ │ +00012f90: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +00012fa0: 7469 746c 653d 226b 6579 776f 7264 223e title="keyword"> │ │ │ +00012fb0: 5479 7065 3c2f 7370 616e 3e20 3c61 2063 Type ->< │ │ │ +00013030: 2f61 3e20 3c61 2063 6c61 7373 3d22 6964 /a> Tlist< │ │ │ +000130a0: 2f73 7061 6e3e 3c2f 613e 203c 6120 636c /span> │ │ │ +000130f0: 3c73 7061 6e20 636c 6173 733d 2269 6422 -> Tlist.
. │ │ │ +000131a0: 3c73 7061 6e20 636c 6173 733d 2269 6422 Local Infix &quo │ │ │ +00013230: 743b 3c2f 7370 616e 3e3c 2f61 3e3a 3a22 t;::" │ │ │ +00013240: 203a 3d20 3c61 2063 6c61 7373 3d22 6964 := Tcons
.
.. │ │ │ +000132c0: 3c62 722f 3e0a 3c73 7061 6e20 636c 6173
.Fixpoint< │ │ │ +000132f0: 2f73 7061 6e3e 203c 6120 6964 3d22 6172 /span> arrows
(l │ │ │ +000133b0: 203a 203c 6120 636c 6173 733d 2269 6472 : Tlist) (r : │ │ │ +00013480: 203c 7370 616e 2063 6c61 7373 3d22 6964 Type) : │ │ │ +000134b0: 203c 7370 616e 2063 6c61 7373 3d22 6964 Type := │ │ │ +000134e0: 3c62 722f 3e0a 266e 6273 703b 266e 6273
. &nbs │ │ │ +000134f0: 703b 3c73 7061 6e20 636c 6173 733d 2269 p;match │ │ │ +00013520: 3c61 2063 6c61 7373 3d22 6964 7265 6622 < │ │ │ +00013560: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +00013570: 7469 746c 653d 2276 6172 6961 626c 6522 title="variable" │ │ │ +00013580: 3e6c 3c2f 7370 616e 3e3c 2f61 3e20 3c73 >l w │ │ │ +000135b0: 6974 683c 2f73 7061 6e3e 3c62 722f 3e0a ith
. │ │ │ +000135c0: 266e 6273 703b 266e 6273 703b 266e 6273   &nbs │ │ │ +000135d0: 703b 266e 6273 703b 7c20 3c61 2063 6c61 p; | Tni │ │ │ +00013640: 6c3c 2f73 7061 6e3e 3c2f 613e 203d 2667 l =&g │ │ │ +00013650: 743b 203c 6120 636c 6173 733d 2269 6472 t; r │ │ │ +000136c0: 3c62 722f 3e0a 266e 6273 703b 266e 6273
. &nbs │ │ │ +000136d0: 703b 266e 6273 703b 266e 6273 703b 7c20 p;  | │ │ │ +000136e0: 3c73 7061 6e20 636c 6173 733d 2269 6422 A ::< │ │ │ +00013770: 2f73 7061 6e3e 3c2f 613e 203c 7370 616e /span> l' => A -> ar │ │ │ +000138b0: 726f 7773 3c2f 7370 616e 3e3c 2f61 3e20 rows │ │ │ +000138c0: 3c73 7061 6e20 636c 6173 733d 2269 6422 l'< │ │ │ +000138e0: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> r │ │ │ +00013950: 3c2f 613e 3c62 722f 3e0a 266e 6273 703b
.  │ │ │ +00013960: 266e 6273 703b 3c73 7061 6e20 636c 6173  end.
..
.< │ │ │ +000139a0: 2f64 6976 3e0a 0a3c 6469 7620 636c 6173 /div>..
.We can │ │ │ +000139c0: 6465 6669 6e65 2061 6262 7265 7669 6174 define abbreviat │ │ │ +000139d0: 696f 6e73 2066 6f72 206f 7065 7261 7469 ions for operati │ │ │ +000139e0: 6f6e 2061 6e64 2072 656c 6174 696f 6e20 on and relation │ │ │ +000139f0: 7479 7065 7320 6261 7365 6420 6f6e 203c types based on < │ │ │ +00013a00: 7370 616e 2063 6c61 7373 3d22 696e 6c69 span class="inli │ │ │ +00013a10: 6e65 636f 6465 223e 3c73 7061 6e20 636c necode">arrows. ..
..
.De │ │ │ +00013a90: 6669 6e69 7469 6f6e 3c2f 7370 616e 3e20 finition │ │ │ +00013aa0: 3c61 2069 643d 2275 6e61 7279 5f6f 7065 unary_operatio │ │ │ +00013b10: 6e3c 2f73 7061 6e3e 3c2f 613e 203c 6120 n A< │ │ │ +00013b70: 2f61 3e20 3a3d 203c 6120 636c 6173 733d /a> := arrow │ │ │ +00013be0: 733c 2f73 7061 6e3e 3c2f 613e 2028 3c61 s (A │ │ │ +00013c50: 3c2f 7370 616e 3e3c 2f61 3e3c 6120 636c │ │ │ +00013ca0: 3c73 7061 6e20 636c 6173 733d 2269 6422 ::< │ │ │ +00013cd0: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ +00013ce0: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ +00013cf0: 732e 5265 6c61 7469 6f6e 436c 6173 7365 s.RelationClasse │ │ │ +00013d00: 732e 6874 6d6c 2354 6e69 6c22 3e3c 7370 s.html#Tnil">Tnil) A │ │ │ +00013db0: 2e3c 6272 2f3e 0a3c 7370 616e 2063 6c61 .
.Definiti │ │ │ +00013de0: 6f6e 3c2f 7370 616e 3e20 3c61 2069 643d on bi │ │ │ +00013e50: 6e61 7279 5f6f 7065 7261 7469 6f6e 3c2f nary_operation A │ │ │ +00013ec0: 203a 3d20 3c61 2063 6c61 7373 3d22 6964 := arrows (A
: │ │ │ +00014010: 3a3c 2f73 7061 6e3e 3c2f 613e 3c61 2063 :A │ │ │ +000140f0: 3a3a 3c2f 7370 616e 3e3c 2f61 3e3c 6120 :: │ │ │ +00014160: 546e 696c 3c2f 7370 616e 3e3c 2f61 3e29 Tnil) │ │ │ +00014170: 203c 6120 636c 6173 733d 2269 6472 6566 │ │ │ +000141b0: 3c73 7061 6e20 636c 6173 733d 2269 6422 A.< │ │ │ +000141e0: 6272 2f3e 0a3c 7370 616e 2063 6c61 7373 br/>.Definition │ │ │ +00014210: 3c2f 7370 616e 3e20 3c61 2069 643d 2274 te │ │ │ +00014280: 726e 6172 795f 6f70 6572 6174 696f 6e3c rnary_operation< │ │ │ +00014290: 2f73 7061 6e3e 3c2f 613e 203c 6120 6964 /span> A := arrows< │ │ │ +00014360: 2f73 7061 6e3e 3c2f 613e 2028 3c61 2063 /span> (A │ │ │ +00014440: 3a3a 3c2f 7370 616e 3e3c 2f61 3e3c 6120 ::A< │ │ │ +000144b0: 2f73 7061 6e3e 3c2f 613e 3c61 2063 6c61 /span>< │ │ │ +00014500: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +00014510: 7469 746c 653d 226e 6f74 6174 696f 6e22 title="notation" │ │ │ +00014520: 3e3a 3a3c 2f73 7061 6e3e 3c2f 613e 3c61 >::A │ │ │ +00014590: 3c2f 7370 616e 3e3c 2f61 3e3c 6120 636c │ │ │ +000145e0: 3c73 7061 6e20 636c 6173 733d 2269 6422 ::< │ │ │ +00014610: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ +00014620: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ +00014630: 732e 5265 6c61 7469 6f6e 436c 6173 7365 s.RelationClasse │ │ │ +00014640: 732e 6874 6d6c 2354 6e69 6c22 3e3c 7370 s.html#Tnil">Tnil) A │ │ │ +000146f0: 2e3c 6272 2f3e 0a0a 3c62 722f 3e0a 3c2f .
..
...
.We defin │ │ │ +00014720: 6520 6e2d 6172 7920 3c73 7061 6e20 636c e n-ary pr │ │ │ +00014760: 6564 6963 6174 653c 2f73 7061 6e3e 3c2f edicates as functi │ │ │ +00014780: 6f6e 7320 696e 746f 203c 7370 616e 2063 ons into Prop. .
.< │ │ │ +000147e0: 6469 7620 636c 6173 733d 2263 6f64 6522 div class="code" │ │ │ +000147f0: 3e0a 0a3c 6272 2f3e 0a3c 7370 616e 2063 >..
.Notati │ │ │ +00014820: 6f6e 3c2f 7370 616e 3e20 3c61 2069 643d on predicate l := │ │ │ +000148c0: 283c 6120 636c 6173 733d 2269 6472 6566 (arrows l Pr │ │ │ +00014980: 6f70 3c2f 7370 616e 3e29 2e3c 6272 2f3e op).
│ │ │ +00014990: 0a0a 3c62 722f 3e0a 3c2f 6469 763e 0a0a ..
.
.. │ │ │ +000149a0: 3c64 6976 2063 6c61 7373 3d22 646f 6322
.Unary predicat │ │ │ +000149c0: 6573 2c20 6f72 2073 6574 732e 200a 3c2f es, or sets. ..
..
.< │ │ │ +000149f0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +00014a00: 7469 746c 653d 226b 6579 776f 7264 223e title="keyword"> │ │ │ +00014a10: 4465 6669 6e69 7469 6f6e 3c2f 7370 616e Definition │ │ │ +00014a60: 3c73 7061 6e20 636c 6173 733d 2269 6422 unary_predic │ │ │ +00014a90: 6174 653c 2f73 7061 6e3e 3c2f 613e 203c ate < │ │ │ +00014aa0: 6120 6964 3d22 413a 3132 3122 2063 6c61 a id="A:121" cla │ │ │ +00014ab0: 7373 3d22 6964 7265 6622 2068 7265 663d ss="idref" href= │ │ │ +00014ac0: 2223 413a 3132 3122 3e3c 7370 616e 2063 "#A:121">A := predicate (A::Tnil │ │ │ +00014cc0: 3c2f 7370 616e 3e3c 2f61 3e29 2e3c 6272 ).
..
.
│ │ │ +00014ce0: 0a0a 3c64 6976 2063 6c61 7373 3d22 646f ..
.Homogeneous │ │ │ +00014d00: 6269 6e61 7279 2072 656c 6174 696f 6e73 binary relations │ │ │ +00014d10: 2c20 6571 7569 7661 6c65 6e74 2074 6f20 , equivalent to │ │ │ +00014d20: 3c73 7061 6e20 636c 6173 733d 2269 6e6c relation A. .
.
.. │ │ │ +00014dd0: 3c62 722f 3e0a 3c73 7061 6e20 636c 6173
.Definitio │ │ │ +00014e00: 6e3c 2f73 7061 6e3e 203c 6120 6964 3d22 n binar │ │ │ +00014e70: 795f 7265 6c61 7469 6f6e 3c2f 7370 616e y_relation │ │ │ +00014eb0: 3c73 7061 6e20 636c 6173 733d 2269 6422 │ │ │ +00014ed0: 413c 2f73 7061 6e3e 3c2f 613e 203a 3d20 A := │ │ │ +00014ee0: 3c61 2063 6c61 7373 3d22 6964 7265 6622 predica │ │ │ +00014f50: 7465 3c2f 7370 616e 3e3c 2f61 3e20 283c te (< │ │ │ +00014f60: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ +00014f70: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ +00014f80: 732e 5265 6c61 7469 6f6e 436c 6173 7365 s.RelationClasse │ │ │ +00014f90: 732e 6874 6d6c 2341 3a31 3232 223e 3c73 s.html#A:122"> │ │ │ +00014fc0: 413c 2f73 7061 6e3e 3c2f 613e 3c61 2063 A:: │ │ │ +00015040: 3c61 2063 6c61 7373 3d22 6964 7265 6622 < │ │ │ +00015080: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +00015090: 7469 746c 653d 2276 6172 6961 626c 6522 title="variable" │ │ │ +000150a0: 3e41 3c2f 7370 616e 3e3c 2f61 3e3c 6120 >A::< │ │ │ +00015160: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +00015170: 7469 746c 653d 2263 6f6e 7374 7275 6374 title="construct │ │ │ +00015180: 6f72 223e 546e 696c 3c2f 7370 616e 3e3c or">Tnil< │ │ │ +00015190: 2f61 3e29 2e3c 6272 2f3e 0a0a 3c62 722f /a>).
..
.
..
.We c │ │ │ +000151c0: 616e 2063 6c6f 7365 2061 2070 7265 6469 an close a predi │ │ │ +000151d0: 6361 7465 2062 7920 756e 6976 6572 7361 cate by universa │ │ │ +000151e0: 6c20 6f72 2065 7869 7374 656e 7469 616c l or existential │ │ │ +000151f0: 2071 7561 6e74 6966 6963 6174 696f 6e2e quantification. │ │ │ +00015200: 200a 3c2f 6469 763e 0a3c 6469 7620 636c .
.
..
.Fixpoint
predicate_all< │ │ │ +000152c0: 2f73 7061 6e3e 3c2f 613e 2028 3c61 2069 /span> (l : Tlist) : predicate l -& │ │ │ +000154f0: 6774 3b3c 2f73 7061 6e3e 3c2f 613e 203c gt; < │ │ │ +00015500: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +00015510: 7469 746c 653d 226b 6579 776f 7264 223e title="keyword"> │ │ │ +00015520: 5072 6f70 3c2f 7370 616e 3e20 3a3d 3c62 Prop :=.   │ │ │ +00015540: 3c73 7061 6e20 636c 6173 733d 2269 6422 match l │ │ │ +000155d0: 3c2f 7370 616e 3e3c 2f61 3e20 3c73 7061 wit │ │ │ +00015600: 683c 2f73 7061 6e3e 3c62 722f 3e0a 266e h
.&n │ │ │ +00015610: 6273 703b 266e 6273 703b 266e 6273 703b bsp;   │ │ │ +00015620: 266e 6273 703b 7c20 3c61 2063 6c61 7373  | Tnil< │ │ │ +00015690: 2f73 7061 6e3e 3c2f 613e 203d 2667 743b /span> => │ │ │ +000156a0: 203c 7370 616e 2063 6c61 7373 3d22 6964 fun f< │ │ │ +00015720: 2f61 3e20 3d26 6774 3b20 3c61 2063 6c61 /a> => f
.&nb │ │ │ +000157a0: 7370 3b26 6e62 7370 3b26 6e62 7370 3b26 sp;  & │ │ │ +000157b0: 6e62 7370 3b7c 203c 7370 616e 2063 6c61 nbsp;| A :: t │ │ │ +00015870: 6c3c 2f73 7061 6e3e 203d 2667 743b 203c l => < │ │ │ +00015880: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +00015890: 7469 746c 653d 226b 6579 776f 7264 223e title="keyword"> │ │ │ +000158a0: 6675 6e3c 2f73 7061 6e3e 203c 6120 6964 fun f => forall< │ │ │ +00015930: 2f73 7061 6e3e 203c 6120 6964 3d22 783a /span> x : │ │ │ +00015990: 3c73 7061 6e20 636c 6173 733d 2269 6422 A, predicate_ │ │ │ +00015a30: 616c 6c3c 2f73 7061 6e3e 3c2f 613e 203c all < │ │ │ +00015a40: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +00015a50: 7469 746c 653d 2276 6172 223e 746c 3c2f title="var">tl (f │ │ │ +00015ad0: 3c2f 613e 203c 6120 636c 6173 733d 2269 x)
. & │ │ │ +00015b50: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp;end │ │ │ +00015b80: 2e3c 6272 2f3e 0a0a 3c62 722f 3e0a 3c73 .
..
.F │ │ │ +00015bb0: 6978 706f 696e 743c 2f73 7061 6e3e 203c ixpoint
< │ │ │ +00015bc0: 6120 6964 3d22 7072 6564 6963 6174 655f a id="predicate_ │ │ │ +00015bd0: 6578 6973 7473 2220 636c 6173 733d 2269 exists" class="i │ │ │ +00015be0: 6472 6566 2220 6872 6566 3d22 2370 7265 dref" href="#pre │ │ │ +00015bf0: 6469 6361 7465 5f65 7869 7374 7322 3e3c dicate_exists">< │ │ │ +00015c00: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +00015c10: 7469 746c 653d 2264 6566 696e 6974 696f title="definitio │ │ │ +00015c20: 6e22 3e70 7265 6469 6361 7465 5f65 7869 n">predicate_exi │ │ │ +00015c30: 7374 733c 2f73 7061 6e3e 3c2f 613e 2028 sts
( │ │ │ +00015c40: 3c61 2069 643d 226c 3a31 3239 2220 636c l
: Tlist │ │ │ +00015d00: 3c2f 7370 616e 3e3c 2f61 3e29 203a 203c ) : < │ │ │ +00015d10: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ +00015d20: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ +00015d30: 732e 5265 6c61 7469 6f6e 436c 6173 7365 s.RelationClasse │ │ │ +00015d40: 732e 6874 6d6c 2370 7265 6469 6361 7465 s.html#predicate │ │ │ +00015d50: 223e 3c73 7061 6e20 636c 6173 733d 2269 ">predicat │ │ │ +00015d80: 653c 2f73 7061 6e3e 3c2f 613e 203c 6120 e l< │ │ │ +00015df0: 2f73 7061 6e3e 3c2f 613e 203c 6120 636c /span> │ │ │ +00015e40: 3c73 7061 6e20 636c 6173 733d 2269 6422 -> Prop │ │ │ +00015ea0: 3a3d 3c62 722f 3e0a 266e 6273 703b 266e :=
. &n │ │ │ +00015eb0: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;match
l │ │ │ +00015f50: 3c73 7061 6e20 636c 6173 733d 2269 6422 with
.  &n │ │ │ +00015f90: 6273 703b 266e 6273 703b 7c20 3c61 2063 bsp; | T │ │ │ +00016000: 6e69 6c3c 2f73 7061 6e3e 3c2f 613e 203d nil = │ │ │ +00016010: 2667 743b 203c 7370 616e 2063 6c61 7373 > fun │ │ │ +00016040: 203c 6120 6964 3d22 663a 3133 3222 2063 f => f │ │ │ +00016100: 3c2f 7370 616e 3e3c 2f61 3e3c 6272 2f3e
│ │ │ +00016110: 0a26 6e62 7370 3b26 6e62 7370 3b26 6e62 .  &nb │ │ │ +00016120: 7370 3b26 6e62 7370 3b7c 203c 7370 616e sp; | A │ │ │ +00016150: 203c 6120 636c 6173 733d 2269 6472 6566 :: tl =&g │ │ │ +000161f0: 743b 203c 7370 616e 2063 6c61 7373 3d22 t; fun < │ │ │ +00016220: 6120 6964 3d22 663a 3133 3322 2063 6c61 a id="f:133" cla │ │ │ +00016230: 7373 3d22 6964 7265 6622 2068 7265 663d ss="idref" href= │ │ │ +00016240: 2223 663a 3133 3322 3e3c 7370 616e 2063 "#f:133">f => exist │ │ │ +000162f0: 733c 2f73 7061 6e3e 3c2f 613e 203c 6120 s x< │ │ │ +00016350: 2f61 3e20 3a20 3c73 7061 6e20 636c 6173 /a> : A, predica │ │ │ +00016470: 7465 5f65 7869 7374 733c 2f73 7061 6e3e te_exists │ │ │ +00016480: 3c2f 613e 203c 7370 616e 2063 6c61 7373 tl (f< │ │ │ +00016510: 2f73 7061 6e3e 3c2f 613e 203c 6120 636c /span> x
)
.& │ │ │ +00016590: 6e62 7370 3b26 6e62 7370 3b3c 7370 616e nbsp; end< │ │ │ +000165c0: 2f73 7061 6e3e 2e3c 6272 2f3e 0a0a 3c62 /span>.
...
..
.Po │ │ │ +000165f0: 696e 7477 6973 6520 6578 7465 6e73 696f intwise extensio │ │ │ +00016600: 6e20 6f66 2061 2062 696e 6172 7920 6f70 n of a binary op │ │ │ +00016610: 6572 6174 696f 6e20 6f6e 203c 7370 616e eration on T │ │ │ +00016660: 2074 6f20 6120 6269 6e61 7279 206f 7065 to a binary ope │ │ │ +00016670: 7261 7469 6f6e 0a20 2020 6f6e 2066 756e ration. on fun │ │ │ +00016680: 6374 696f 6e73 2077 686f 7365 2063 6f64 ctions whose cod │ │ │ +00016690: 6f6d 6169 6e20 6973 203c 7370 616e 2063 omain is T │ │ │ +000166d0: 3c2f 7370 616e 3e3c 2f73 7061 6e3e 2e0a .. │ │ │ +000166e0: 2020 2046 6f72 2061 6e20 6f70 6572 6174 For an operat │ │ │ +000166f0: 6f72 206f 6e20 3c73 7061 6e20 636c 6173 or on < │ │ │ +00016710: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +00016720: 7469 746c 653d 226b 6579 776f 7264 223e title="keyword"> │ │ │ +00016730: 5072 6f70 3c2f 7370 616e 3e3c 2f73 7061 Prop this lifts th │ │ │ +00016750: 6520 6f70 6572 6174 6f72 2074 6f20 6120 e operator to a │ │ │ +00016760: 6269 6e61 7279 206f 7065 7261 7469 6f6e binary operation │ │ │ +00016770: 2e20 0a3c 2f64 6976 3e0a 3c64 6976 2063 . .
.
...Fixpoint p │ │ │ +00016830: 6f69 6e74 7769 7365 5f65 7874 656e 7369 ointwise_extensi │ │ │ +00016840: 6f6e 3c2f 7370 616e 3e3c 2f61 3e20 7b3c on {< │ │ │ +00016850: 6120 6964 3d22 543a 3133 3522 2063 6c61 a id="T:135" cla │ │ │ +00016860: 7373 3d22 6964 7265 6622 2068 7265 663d ss="idref" href= │ │ │ +00016870: 2223 543a 3133 3522 3e3c 7370 616e 2063 "#T:135">T : Type} (op │ │ │ +00016930: 203a 203c 6120 636c 6173 733d 2269 6472 : binary_operatio │ │ │ +000169b0: 6e3c 2f73 7061 6e3e 3c2f 613e 203c 6120 n T< │ │ │ +00016a20: 2f73 7061 6e3e 3c2f 613e 293c 6272 2f3e /span>)
│ │ │ +00016a30: 0a26 6e62 7370 3b26 6e62 7370 3b28 3c61 .  (l │ │ │ +00016a90: 3c2f 613e 203a 203c 6120 636c 6173 733d : Tlist) : binar │ │ │ +00016b80: 795f 6f70 6572 6174 696f 6e3c 2f73 7061 y_operation (arro │ │ │ +00016c00: 7773 3c2f 7370 616e 3e3c 2f61 3e20 3c61 ws l │ │ │ +00016c70: 3c2f 7370 616e 3e3c 2f61 3e20 3c61 2063 T) :=
.  < │ │ │ +00016d00: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +00016d10: 7469 746c 653d 226b 6579 776f 7264 223e title="keyword"> │ │ │ +00016d20: 6d61 7463 683c 2f73 7061 6e3e 203c 6120 match l< │ │ │ +00016d90: 2f73 7061 6e3e 3c2f 613e 203c 7370 616e /span> with │ │ │ +00016dc0: 3c2f 7370 616e 3e3c 6272 2f3e 0a26 6e62
.&nb │ │ │ +00016dd0: 7370 3b26 6e62 7370 3b26 6e62 7370 3b26 sp;  & │ │ │ +00016de0: 6e62 7370 3b7c 203c 6120 636c 6173 733d nbsp;| Tnil => │ │ │ +00016e60: 3c73 7061 6e20 636c 6173 733d 2269 6422 fun R < │ │ │ +00016f10: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +00016f20: 7469 746c 653d 2262 696e 6465 7222 3e52 title="binder">R │ │ │ +00016f30: 273c 2f73 7061 6e3e 3c2f 613e 203d 2667 ' =&g │ │ │ +00016f40: 743b 203c 6120 636c 6173 733d 2269 6472 t; op R │ │ │ +00017020: 203c 6120 636c 6173 733d 2269 6472 6566 R' │ │ │ +00017090: 3c62 722f 3e0a 266e 6273 703b 266e 6273
. &nbs │ │ │ +000170a0: 703b 266e 6273 703b 266e 6273 703b 7c20 p;  | │ │ │ +000170b0: 3c73 7061 6e20 636c 6173 733d 2269 6422 A ::< │ │ │ +00017140: 2f73 7061 6e3e 3c2f 613e 203c 7370 616e /span> tl => fun R< │ │ │ +000171f0: 2f73 7061 6e3e 3c2f 613e 203c 6120 6964 /span> R' │ │ │ +00017250: 3c2f 613e 203d 2667 743b 3c62 722f 3e0a =>
. │ │ │ +00017260: 266e 6273 703b 266e 6273 703b 266e 6273   &nbs │ │ │ +00017270: 703b 266e 6273 703b 266e 6273 703b 266e p;  &n │ │ │ +00017280: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;fun │ │ │ +000172b0: 3c61 2069 643d 2278 3a31 3434 2220 636c x => pointwise_exte │ │ │ +00017390: 6e73 696f 6e3c 2f73 7061 6e3e 3c2f 613e nsion
│ │ │ +000173a0: 203c 6120 636c 6173 733d 2269 6472 6566 op │ │ │ +00017410: 203c 7370 616e 2063 6c61 7373 3d22 6964 tl │ │ │ +00017430: 3c2f 7370 616e 3e20 283c 6120 636c 6173 (R x │ │ │ +00017510: 3c2f 613e 2920 283c 6120 636c 6173 733d ) (R' x │ │ │ +000175f0: 3c2f 613e 293c 6272 2f3e 0a26 6e62 7370 )
.  │ │ │ +00017600: 3b26 6e62 7370 3b3c 7370 616e 2063 6c61 ; end.
..
. │ │ │ +00017640: 3c2f 6469 763e 0a0a 3c64 6976 2063 6c61
..
.Pointw │ │ │ +00017660: 6973 6520 6c69 6674 696e 672c 2065 7175 ise lifting, equ │ │ │ +00017670: 6976 616c 656e 7420 746f 2064 6f69 6e67 ivalent to doing │ │ │ +00017680: 203c 7370 616e 2063 6c61 7373 3d22 696e pointwise │ │ │ +000176c0: 5f65 7874 656e 7369 6f6e 3c2f 7370 616e _extension and clo │ │ │ +000176e0: 7369 6e67 2075 7369 6e67 203c 7370 616e sing using predicate_all. .< │ │ │ +00017740: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
..
. │ │ │ +00017760: 3c73 7061 6e20 636c 6173 733d 2269 6422 Fixpoint │ │ │ +00017790: 203c 6120 6964 3d22 706f 696e 7477 6973 pointwise │ │ │ +00017800: 5f6c 6966 7469 6e67 3c2f 7370 616e 3e3c _lifting< │ │ │ +00017810: 2f61 3e20 283c 6120 6964 3d22 6f70 3a31 /a> (op : │ │ │ +00017870: 203c 6120 636c 6173 733d 2269 6472 6566 bi │ │ │ +000178e0: 6e61 7279 5f72 656c 6174 696f 6e3c 2f73 nary_relation
Prop) (l │ │ │ +00017980: 3a20 3c61 2063 6c61 7373 3d22 6964 7265 : Tlist │ │ │ +000179f0: 3c2f 613e 2920 3a20 3c61 2063 6c61 7373 ) : binary_rela │ │ │ +00017a70: 7469 6f6e 3c2f 7370 616e 3e3c 2f61 3e20 tion │ │ │ +00017a80: 283c 6120 636c 6173 733d 2269 6472 6566 (predic │ │ │ +00017af0: 6174 653c 2f73 7061 6e3e 3c2f 613e 203c ate < │ │ │ +00017b00: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ +00017b10: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ +00017b20: 732e 5265 6c61 7469 6f6e 436c 6173 7365 s.RelationClasse │ │ │ +00017b30: 732e 6874 6d6c 236c 3a31 3436 223e 3c73 s.html#l:146"> │ │ │ +00017b60: 6c3c 2f73 7061 6e3e 3c2f 613e 2920 3a3d l) := │ │ │ +00017b70: 3c62 722f 3e0a 266e 6273 703b 266e 6273
. &nbs │ │ │ +00017b80: 703b 3c73 7061 6e20 636c 6173 733d 2269 p;match │ │ │ +00017bb0: 3c61 2063 6c61 7373 3d22 6964 7265 6622 < │ │ │ +00017bf0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +00017c00: 7469 746c 653d 2276 6172 6961 626c 6522 title="variable" │ │ │ +00017c10: 3e6c 3c2f 7370 616e 3e3c 2f61 3e20 3c73 >l w │ │ │ +00017c40: 6974 683c 2f73 7061 6e3e 3c62 722f 3e0a ith
. │ │ │ +00017c50: 266e 6273 703b 266e 6273 703b 266e 6273   &nbs │ │ │ +00017c60: 703b 266e 6273 703b 7c20 3c61 2063 6c61 p; | Tni │ │ │ +00017cd0: 6c3c 2f73 7061 6e3e 3c2f 613e 203d 2667 l =&g │ │ │ +00017ce0: 743b 203c 7370 616e 2063 6c61 7373 3d22 t; fun < │ │ │ +00017d10: 6120 6964 3d22 523a 3134 3922 2063 6c61 a id="R:149" cla │ │ │ +00017d20: 7373 3d22 6964 7265 6622 2068 7265 663d ss="idref" href= │ │ │ +00017d30: 2223 523a 3134 3922 3e3c 7370 616e 2063 "#R:149">R R' │ │ │ +00017dc0: 3d26 6774 3b20 3c61 2063 6c61 7373 3d22 => op R< │ │ │ +00017ea0: 2f61 3e20 3c61 2063 6c61 7373 3d22 6964 /a> R'< │ │ │ +00017f10: 2f61 3e3c 6272 2f3e 0a26 6e62 7370 3b26 /a>
. & │ │ │ +00017f20: 6e62 7370 3b26 6e62 7370 3b26 6e62 7370 nbsp;   │ │ │ +00017f30: 3b7c 203c 7370 616e 2063 6c61 7373 3d22 ;| │ │ │ +00017f50: 413c 2f73 7061 6e3e 203c 6120 636c 6173 A
│ │ │ +00017fc0: 3a3a 3c2f 7370 616e 3e3c 2f61 3e20 3c73 :: tl => fun< │ │ │ +00018020: 2f73 7061 6e3e 203c 6120 6964 3d22 523a /span> R R' =>
.  & │ │ │ +000180f0: 6e62 7370 3b26 6e62 7370 3b26 6e62 7370 nbsp;   │ │ │ +00018100: 3b26 6e62 7370 3b3c 7370 616e 2063 6c61 ; forall │ │ │ +00018160: 3c73 7061 6e20 636c 6173 733d 2269 6422 │ │ │ +00018180: 783c 2f73 7061 6e3e 3c2f 613e 2c20 3c61 x, pointwise_lifti │ │ │ +00018210: 6e67 3c2f 7370 616e 3e3c 2f61 3e20 3c61 ng │ │ │ +00018280: 6f70 3c2f 7370 616e 3e3c 2f61 3e20 3c73 op
tl (R< │ │ │ +00018320: 2f61 3e20 3c61 2063 6c61 7373 3d22 6964 /a> x) (R'< │ │ │ +00018400: 2f61 3e20 3c61 2063 6c61 7373 3d22 6964 /a> x)
. &n │ │ │ +00018480: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;end. │ │ │ +000184b0: 3c62 722f 3e0a 0a3c 6272 2f3e 0a3c 2f64
..
...
.The n-ary │ │ │ +000184e0: 2065 7175 6976 616c 656e 6365 2072 656c equivalence rel │ │ │ +000184f0: 6174 696f 6e2c 2064 6566 696e 6564 2062 ation, defined b │ │ │ +00018500: 7920 6c69 6674 696e 6720 7468 6520 302d y lifting the 0- │ │ │ +00018510: 6172 7920 3c73 7061 6e20 636c 6173 733d ary iff rela │ │ │ +00018560: 7469 6f6e 2e20 0a3c 2f64 6976 3e0a 3c64 tion. .
. │ │ │ +00018580: 0a0a 3c62 722f 3e0a 3c73 7061 6e20 636c ..
.Definit │ │ │ +000185b0: 696f 6e3c 2f73 7061 6e3e 203c 6120 6964 ion predica │ │ │ +00018630: 7465 5f65 7175 6976 616c 656e 6365 3c2f te_equivalence {l : Tlist} : binary_re │ │ │ +00018790: 6c61 7469 6f6e 3c2f 7370 616e 3e3c 2f61 lation (pred │ │ │ +00018810: 6963 6174 653c 2f73 7061 6e3e 3c2f 613e icate │ │ │ +00018820: 203c 6120 636c 6173 733d 2269 6472 6566 │ │ │ +00018860: 3c73 7061 6e20 636c 6173 733d 2269 6422 l) │ │ │ +00018890: 3a3d 3c62 722f 3e0a 266e 6273 703b 266e :=
. &n │ │ │ +000188a0: 6273 703b 3c61 2063 6c61 7373 3d22 6964 bsp;< │ │ │ +000188f0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +00018900: 7469 746c 653d 2264 6566 696e 6974 696f title="definitio │ │ │ +00018910: 6e22 3e70 6f69 6e74 7769 7365 5f6c 6966 n">pointwise_lif │ │ │ +00018920: 7469 6e67 3c2f 7370 616e 3e3c 2f61 3e20 ting │ │ │ +00018930: 3c61 2063 6c61 7373 3d22 6964 7265 6622 │ │ │ +00018960: 3c73 7061 6e20 636c 6173 733d 2269 6422 iff l │ │ │ +00018a00: 2e3c 6272 2f3e 0a0a 3c62 722f 3e0a 3c2f .
..
...
.The n-ar │ │ │ +00018a30: 7920 696d 706c 6963 6174 696f 6e20 7265 y implication re │ │ │ +00018a40: 6c61 7469 6f6e 2c20 6465 6669 6e65 6420 lation, defined │ │ │ +00018a50: 6279 206c 6966 7469 6e67 2074 6865 2030 by lifting the 0 │ │ │ +00018a60: 2d61 7279 203c 7370 616e 2063 6c61 7373 -ary impl< │ │ │ +00018aa0: 2f73 7061 6e3e 3c2f 7370 616e 3e20 7265 /span> re │ │ │ +00018ab0: 6c61 7469 6f6e 2e20 0a3c 2f64 6976 3e0a lation. .
. │ │ │ +00018ac0: 3c64 6976 2063 6c61 7373 3d22 636f 6465
..
.Defin │ │ │ +00018b00: 6974 696f 6e3c 2f73 7061 6e3e 203c 6120 ition predi │ │ │ +00018b80: 6361 7465 5f69 6d70 6c69 6361 7469 6f6e cate_implication │ │ │ +00018b90: 3c2f 7370 616e 3e3c 2f61 3e20 7b3c 6120 {l< │ │ │ +00018bf0: 2f61 3e20 3a20 3c61 2063 6c61 7373 3d22 /a> : Tlist
} :=
.  poi │ │ │ +00018cf0: 6e74 7769 7365 5f6c 6966 7469 6e67 3c2f ntwise_lifting < │ │ │ +00018d40: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +00018d50: 7469 746c 653d 2264 6566 696e 6974 696f title="definitio │ │ │ +00018d60: 6e22 3e69 6d70 6c3c 2f73 7061 6e3e 3c2f n">impl l │ │ │ +00018de0: 2e3c 6272 2f3e 0a0a 3c62 722f 3e0a 3c2f .
..
...
.Notation │ │ │ +00018e10: 7320 666f 7220 706f 696e 7477 6973 6520 s for pointwise │ │ │ +00018e20: 6571 7569 7661 6c65 6e63 6520 616e 6420 equivalence and │ │ │ +00018e30: 696d 706c 6963 6174 696f 6e20 6f66 2070 implication of p │ │ │ +00018e40: 7265 6469 6361 7465 732e 200a 3c2f 6469 redicates. ..
..
.De │ │ │ +00018e90: 636c 6172 6520 5363 6f70 653c 2f73 7061 clare Scope │ │ │ +00018ec0: 7072 6564 6963 6174 655f 7363 6f70 653c predicate_scope< │ │ │ +00018ed0: 2f73 7061 6e3e 2e3c 6272 2f3e 0a0a 3c62 /span>.
...Infix "<...> │ │ │ +00018fb0: 2220 3a3d 203c 6120 636c 6173 733d 2269 " := predicat │ │ │ +00019030: 655f 6571 7569 7661 6c65 6e63 653c 2f73 e_equivalence
(at level 95, no │ │ │ +000190d0: 203c 7370 616e 2063 6c61 7373 3d22 6964 associativity< │ │ │ +00019100: 2f73 7061 6e3e 2920 3a20 3c73 7061 6e20 /span>) : predicate │ │ │ +00019130: 5f73 636f 7065 3c2f 7370 616e 3e2e 3c62 _scope..Infix "-...>" : │ │ │ +00019210: 3d20 3c61 2063 6c61 7373 3d22 6964 7265 = predicate_i │ │ │ +00019290: 6d70 6c69 6361 7469 6f6e 3c2f 7370 616e mplication (at │ │ │ +000192d0: 203c 7370 616e 2063 6c61 7373 3d22 6964 level 7 │ │ │ +00019300: 302c 203c 7370 616e 2063 6c61 7373 3d22 0, right │ │ │ +00019330: 3c73 7061 6e20 636c 6173 733d 2269 6422 associativity) : predicate_ │ │ │ +00019390: 7363 6f70 653c 2f73 7061 6e3e 2e3c 6272 scope.
..
.Local │ │ │ +000193d0: 204f 7065 6e3c 2f73 7061 6e3e 203c 7370 Open Sc │ │ │ +00019400: 6f70 653c 2f73 7061 6e3e 203c 7370 616e ope
predicat │ │ │ +00019430: 655f 7363 6f70 653c 2f73 7061 6e3e 2e3c e_scope.< │ │ │ +00019440: 6272 2f3e 0a0a 3c62 722f 3e0a 3c2f 6469 br/>..
...
.The pointw │ │ │ +00019470: 6973 6520 6c69 6674 696e 6773 206f 6620 ise liftings of │ │ │ +00019480: 636f 6e6a 756e 6374 696f 6e20 616e 6420 conjunction and │ │ │ +00019490: 6469 736a 756e 6374 696f 6e73 2e0a 2020 disjunctions.. │ │ │ +000194a0: 204e 6f74 6520 7468 6174 2074 6865 7365 Note that these │ │ │ +000194b0: 2061 7265 203c 7370 616e 2063 6c61 7373 are binar │ │ │ +000194f0: 795f 6f70 6572 6174 696f 6e3c 2f73 7061 y_operations, buil │ │ │ +00019510: 6469 6e67 206e 6577 2072 656c 6174 696f ding new relatio │ │ │ +00019520: 6e73 206f 7574 206f 6620 6f6c 6420 6f6e ns out of old on │ │ │ +00019530: 6573 2e20 0a3c 2f64 6976 3e0a 3c64 6976 es. .
.
.. │ │ │ +00019550: 3c62 722f 3e0a 3c73 7061 6e20 636c 6173
.Definitio │ │ │ +00019580: 6e3c 2f73 7061 6e3e 203c 6120 6964 3d22 n predica │ │ │ +00019600: 7465 5f69 6e74 6572 7365 6374 696f 6e3c te_intersection< │ │ │ +00019610: 2f73 7061 6e3e 3c2f 613e 203a 3d20 3c61 /span> := p │ │ │ +00019690: 6f69 6e74 7769 7365 5f65 7874 656e 7369 ointwise_extensi │ │ │ +000196a0: 6f6e 3c2f 7370 616e 3e3c 2f61 3e20 3c61 on and. │ │ │ +00019710: 3c62 722f 3e0a 3c73 7061 6e20 636c 6173
.Definitio │ │ │ +00019740: 6e3c 2f73 7061 6e3e 203c 6120 6964 3d22 n predi │ │ │ +000197b0: 6361 7465 5f75 6e69 6f6e 3c2f 7370 616e cate_union := pointw │ │ │ +00019840: 6973 655f 6578 7465 6e73 696f 6e3c 2f73 ise_extension
or
.
.. │ │ │ +000198c0: 3c62 722f 3e0a 3c73 7061 6e20 636c 6173
.Infix "/...\" := │ │ │ +00019990: 203c 6120 636c 6173 733d 2269 6472 6566 predicate_i │ │ │ +00019a10: 6e74 6572 7365 6374 696f 6e3c 2f73 7061 ntersection (at level │ │ │ +00019a80: 3830 2c20 3c73 7061 6e20 636c 6173 733d 80, right │ │ │ +00019ab0: 203c 7370 616e 2063 6c61 7373 3d22 6964 associativity< │ │ │ +00019ae0: 2f73 7061 6e3e 2920 3a20 3c73 7061 6e20 /span>) : predicate │ │ │ +00019b10: 5f73 636f 7065 3c2f 7370 616e 3e2e 3c62 _scope..Infix "\.../" := < │ │ │ +00019bf0: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ +00019c00: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ +00019c10: 732e 5265 6c61 7469 6f6e 436c 6173 7365 s.RelationClasse │ │ │ +00019c20: 732e 6874 6d6c 2370 7265 6469 6361 7465 s.html#predicate │ │ │ +00019c30: 5f75 6e69 6f6e 223e 3c73 7061 6e20 636c _union">pred │ │ │ +00019c60: 6963 6174 655f 756e 696f 6e3c 2f73 7061 icate_union (at level │ │ │ +00019cd0: 3835 2c20 3c73 7061 6e20 636c 6173 733d 85, right │ │ │ +00019d00: 203c 7370 616e 2063 6c61 7373 3d22 6964 associativity< │ │ │ +00019d30: 2f73 7061 6e3e 2920 3a20 3c73 7061 6e20 /span>) : predicate │ │ │ +00019d60: 5f73 636f 7065 3c2f 7370 616e 3e2e 3c62 _scope...
.
..
.The always │ │ │ +00019da0: 3c73 7061 6e20 636c 6173 733d 2269 6e6c True and alw │ │ │ +00019df0: 6179 7320 3c73 7061 6e20 636c 6173 733d ays False< │ │ │ +00019e30: 2f73 7061 6e3e 3c2f 7370 616e 3e20 7072 /span> pr │ │ │ +00019e40: 6564 6963 6174 6573 2e20 0a3c 2f64 6976 edicates. .
.
..
.Fix │ │ │ +00019e90: 706f 696e 743c 2f73 7061 6e3e 203c 6120 point tru │ │ │ +00019f00: 655f 7072 6564 6963 6174 653c 2f73 7061 e_predicate {l : │ │ │ +00019f70: 203c 6120 636c 6173 733d 2269 6472 6566 │ │ │ +00019fb0: 3c73 7061 6e20 636c 6173 733d 2269 6422 Tlist< │ │ │ +00019fe0: 2f61 3e7d 203a 203c 6120 636c 6173 733d /a>} : │ │ │ +0001a050: 7072 6564 6963 6174 653c 2f73 7061 6e3e predicate │ │ │ +0001a060: 3c2f 613e 203c 6120 636c 6173 733d 2269 l :=
.  │ │ │ +0001a0e0: 3b26 6e62 7370 3b3c 7370 616e 2063 6c61 ; match
l with< │ │ │ +0001a1b0: 6272 2f3e 0a26 6e62 7370 3b26 6e62 7370 br/>.   │ │ │ +0001a1c0: 3b26 6e62 7370 3b26 6e62 7370 3b7c 203c ;  | < │ │ │ +0001a1d0: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ +0001a1e0: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ +0001a1f0: 732e 5265 6c61 7469 6f6e 436c 6173 7365 s.RelationClasse │ │ │ +0001a200: 732e 6874 6d6c 2354 6e69 6c22 3e3c 7370 s.html#Tnil">Tnil => True │ │ │ +0001a2a0: 3c2f 7370 616e 3e3c 2f61 3e3c 6272 2f3e
│ │ │ +0001a2b0: 0a26 6e62 7370 3b26 6e62 7370 3b26 6e62 .  &nb │ │ │ +0001a2c0: 7370 3b26 6e62 7370 3b7c 203c 7370 616e sp; | A │ │ │ +0001a2f0: 203c 6120 636c 6173 733d 2269 6472 6566 :: tl =&g │ │ │ +0001a390: 743b 203c 7370 616e 2063 6c61 7373 3d22 t; fun < │ │ │ +0001a3c0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +0001a3d0: 7469 746c 653d 2276 6172 223e 5f3c 2f73 title="var">_
=> @true │ │ │ +0001a460: 5f70 7265 6469 6361 7465 3c2f 7370 616e _predicate tl
.  e │ │ │ +0001a4d0: 6e64 3c2f 7370 616e 3e2e 3c62 722f 3e0a nd.
. │ │ │ +0001a4e0: 0a3c 6272 2f3e 0a3c 7370 616e 2063 6c61 .
.Fixpoint │ │ │ +0001a510: 3c2f 7370 616e 3e20 3c61 2069 643d 2266 false_ │ │ │ +0001a580: 7072 6564 6963 6174 653c 2f73 7061 6e3e predicate │ │ │ +0001a590: 3c2f 613e 207b 3c61 2069 643d 226c 3a31 { │ │ │ +0001a5c0: 3c73 7061 6e20 636c 6173 733d 2269 6422 │ │ │ +0001a5e0: 6c3c 2f73 7061 6e3e 3c2f 613e 203a 203c l : < │ │ │ +0001a5f0: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ +0001a600: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ +0001a610: 732e 5265 6c61 7469 6f6e 436c 6173 7365 s.RelationClasse │ │ │ +0001a620: 732e 6874 6d6c 2354 6c69 7374 223e 3c73 s.html#Tlist">Tlist} : pr │ │ │ +0001a6d0: 6564 6963 6174 653c 2f73 7061 6e3e 3c2f edicate l │ │ │ +0001a750: 203a 3d3c 6272 2f3e 0a26 6e62 7370 3b26 :=
. & │ │ │ +0001a760: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp;match l │ │ │ +0001a800: 203c 7370 616e 2063 6c61 7373 3d22 6964 with
.  & │ │ │ +0001a840: 6e62 7370 3b26 6e62 7370 3b7c 203c 6120 nbsp; | │ │ │ +0001a8b0: 546e 696c 3c2f 7370 616e 3e3c 2f61 3e20 Tnil │ │ │ +0001a8c0: 3d26 6774 3b20 3c61 2063 6c61 7373 3d22 => False │ │ │ +0001a920: 3c2f 7370 616e 3e3c 2f61 3e3c 6272 2f3e
│ │ │ +0001a930: 0a26 6e62 7370 3b26 6e62 7370 3b26 6e62 .  &nb │ │ │ +0001a940: 7370 3b26 6e62 7370 3b7c 203c 7370 616e sp; | A │ │ │ +0001a970: 203c 6120 636c 6173 733d 2269 6472 6566 :: tl =&g │ │ │ +0001aa10: 743b 203c 7370 616e 2063 6c61 7373 3d22 t; fun < │ │ │ +0001aa40: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +0001aa50: 7469 746c 653d 2276 6172 223e 5f3c 2f73 title="var">_
=> @fal │ │ │ +0001aae0: 7365 5f70 7265 6469 6361 7465 3c2f 7370 se_predicate tl.   │ │ │ +0001ab30: 3c73 7061 6e20 636c 6173 733d 2269 6422 end.
..
.Notati │ │ │ +0001ab90: 6f6e 3c2f 7370 616e 3e20 3c61 2069 643d on &quo │ │ │ +0001ac20: 743b 3c2f 7370 616e 3e3c 2f61 3ee2 8899 t;... │ │ │ +0001ac30: e28a a4e2 8899 2220 3a3d 203c 6120 636c ......" := true_pred │ │ │ +0001acb0: 6963 6174 653c 2f73 7061 6e3e 3c2f 613e icate │ │ │ +0001acc0: 203a 203c 7370 616e 2063 6c61 7373 3d22 : │ │ │ +0001ace0: 7072 6564 6963 6174 655f 7363 6f70 653c predicate_scope< │ │ │ +0001acf0: 2f73 7061 6e3e 2e3c 6272 2f3e 0a3c 7370 /span>.
.No │ │ │ +0001ad20: 7461 7469 6f6e 3c2f 7370 616e 3e20 3c61 tation
│ │ │ +0001adb0: 2671 756f 743b 3c2f 7370 616e 3e3c 2f61 "........." := < │ │ │ +0001add0: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ +0001ade0: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ +0001adf0: 732e 5265 6c61 7469 6f6e 436c 6173 7365 s.RelationClasse │ │ │ +0001ae00: 732e 6874 6d6c 2366 616c 7365 5f70 7265 s.html#false_pre │ │ │ +0001ae10: 6469 6361 7465 223e 3c73 7061 6e20 636c dicate">fals │ │ │ +0001ae40: 655f 7072 6564 6963 6174 653c 2f73 7061 e_predicate : predicate_ │ │ │ +0001ae80: 7363 6f70 653c 2f73 7061 6e3e 2e3c 6272 scope.
..
.
│ │ │ +0001aea0: 0a0a 3c64 6976 2063 6c61 7373 3d22 646f ..
.Predicate eq │ │ │ +0001aec0: 7569 7661 6c65 6e63 6520 6973 2061 6e20 uivalence is an │ │ │ +0001aed0: 6571 7569 7661 6c65 6e63 652c 2061 6e64 equivalence, and │ │ │ +0001aee0: 2070 7265 6469 6361 7465 2069 6d70 6c69 predicate impli │ │ │ +0001aef0: 6361 7469 6f6e 2064 6566 696e 6573 2061 cation defines a │ │ │ +0001af00: 2070 7265 6f72 6465 722e 200a 3c2f 6469 preorder. ..
..
.#[< │ │ │ +0001af30: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +0001af40: 7469 746c 653d 2276 6172 223e 676c 6f62 title="var">glob │ │ │ +0001af50: 616c 3c2f 7370 616e 3e5d 3c62 722f 3e0a al]
. │ │ │ +0001af60: 3c73 7061 6e20 636c 6173 733d 2269 6422 Pro │ │ │ +0001af80: 6772 616d 3c2f 7370 616e 3e20 3c73 7061 gram Ins │ │ │ +0001afb0: 7461 6e63 653c 2f73 7061 6e3e 203c 6120 tance < │ │ │ +0001b020: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +0001b030: 7469 746c 653d 2269 6e73 7461 6e63 6522 title="instance" │ │ │ +0001b040: 3e70 7265 6469 6361 7465 5f65 7175 6976 >predicate_equiv │ │ │ +0001b050: 616c 656e 6365 5f65 7175 6976 616c 656e alence_equivalen │ │ │ +0001b060: 6365 3c2f 7370 616e 3e3c 2f61 3e20 7b3c ce {< │ │ │ +0001b070: 6120 6964 3d22 6c3a 3136 3222 2063 6c61 a id="l:162" cla │ │ │ +0001b080: 7373 3d22 6964 7265 6622 2068 7265 663d ss="idref" href= │ │ │ +0001b090: 2223 6c3a 3136 3222 3e3c 7370 616e 2063 "#l:162">l} :
.&n │ │ │ +0001b0d0: 6273 703b 266e 6273 703b 3c61 2063 6c61 bsp; < │ │ │ +0001b120: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +0001b130: 7469 746c 653d 2263 6c61 7373 223e 4571 title="class">Eq │ │ │ +0001b140: 7569 7661 6c65 6e63 653c 2f73 7061 6e3e uivalence │ │ │ +0001b150: 3c2f 613e 2028 403c 6120 636c 6173 733d (@predic │ │ │ +0001b1d0: 6174 655f 6571 7569 7661 6c65 6e63 653c ate_equivalence< │ │ │ +0001b1e0: 2f73 7061 6e3e 3c2f 613e 203c 6120 636c /span> l
).
. │ │ │ +0001b260: 0a3c 6272 2f3e 0a0a 3c62 722f 3e0a 235b .
..
.#[ │ │ │ +0001b270: 3c73 7061 6e20 636c 6173 733d 2269 6422 glo │ │ │ +0001b290: 6261 6c3c 2f73 7061 6e3e 5d3c 6272 2f3e bal]
│ │ │ +0001b2a0: 0a3c 7370 616e 2063 6c61 7373 3d22 6964 .Pr │ │ │ +0001b2c0: 6f67 7261 6d3c 2f73 7061 6e3e 203c 7370 ogram In │ │ │ +0001b2f0: 7374 616e 6365 3c2f 7370 616e 3e20 3c61 stance pred │ │ │ +0001b380: 6963 6174 655f 696d 706c 6963 6174 696f icate_implicatio │ │ │ +0001b390: 6e5f 7072 656f 7264 6572 3c2f 7370 616e n_preorder {l} : │ │ │ +0001b400: 3c62 722f 3e0a 266e 6273 703b 266e 6273
. &nbs │ │ │ +0001b410: 703b 3c61 2063 6c61 7373 3d22 6964 7265 p;PreOrder (@pred │ │ │ +0001b500: 6963 6174 655f 696d 706c 6963 6174 696f icate_implicatio │ │ │ +0001b510: 6e3c 2f73 7061 6e3e 3c2f 613e 203c 6120 n l< │ │ │ +0001b580: 2f73 7061 6e3e 3c2f 613e 292e 3c62 722f /span>).
..
.
. │ │ │ +0001b5a0: 0a3c 6469 7620 636c 6173 733d 2264 6f63 .
.We define the │ │ │ +0001b5c0: 2076 6172 696f 7573 206f 7065 7261 7469 various operati │ │ │ +0001b5d0: 6f6e 7320 7768 6963 6820 6465 6669 6e65 ons which define │ │ │ +0001b5e0: 2074 6865 2061 6c67 6562 7261 206f 6e20 the algebra on │ │ │ +0001b5f0: 6269 6e61 7279 2072 656c 6174 696f 6e73 binary relations │ │ │ +0001b600: 2c0a 2020 2066 726f 6d20 7468 6520 6765 ,. from the ge │ │ │ +0001b610: 6e65 7261 6c20 6f6e 6573 2e20 0a3c 2f64 neral ones. ..
..
.S │ │ │ +0001b660: 6563 7469 6f6e 3c2f 7370 616e 3e20 3c61 ection Binar │ │ │ +0001b6c0: 793c 2f73 7061 6e3e 3c2f 613e 2e3c 6272 y.
.  < │ │ │ +0001b6e0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +0001b6f0: 7469 746c 653d 226b 6579 776f 7264 223e title="keyword"> │ │ │ +0001b700: 436f 6e74 6578 743c 2f73 7061 6e3e 207b Context { │ │ │ +0001b710: 3c61 2069 643d 2242 696e 6172 792e 4122 │ │ │ +0001b740: 3c73 7061 6e20 636c 6173 733d 2269 6422 A : │ │ │ +0001b770: 203c 7370 616e 2063 6c61 7373 3d22 6964 Type}.< │ │ │ +0001b7a0: 6272 2f3e 0a0a 3c62 722f 3e0a 266e 6273 br/>..
.&nbs │ │ │ +0001b7b0: 703b 266e 6273 703b 3c73 7061 6e20 636c p; Definit │ │ │ +0001b7e0: 696f 6e3c 2f73 7061 6e3e 203c 6120 6964 ion relation_ │ │ │ +0001b860: 6571 7569 7661 6c65 6e63 653c 2f73 7061 equivalence : relation (relation │ │ │ +0001b970: 3c2f 7370 616e 3e3c 2f61 3e20 3c61 2063 │ │ │ +0001b9e0: 413c 2f73 7061 6e3e 3c2f 613e 2920 3a3d A) := │ │ │ +0001b9f0: 3c62 722f 3e0a 266e 6273 703b 266e 6273
. &nbs │ │ │ +0001ba00: 703b 266e 6273 703b 266e 6273 703b 403c p;  @< │ │ │ +0001ba10: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ +0001ba20: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ +0001ba30: 732e 5265 6c61 7469 6f6e 436c 6173 7365 s.RelationClasse │ │ │ +0001ba40: 732e 6874 6d6c 2370 7265 6469 6361 7465 s.html#predicate │ │ │ +0001ba50: 5f65 7175 6976 616c 656e 6365 223e 3c73 _equivalence">predicate_equi │ │ │ +0001ba90: 7661 6c65 6e63 653c 2f73 7061 6e3e 3c2f valence (_ │ │ │ +0001bb30: 3a3a 3c2f 7370 616e 3e3c 2f61 3e3c 7370 ::_::Tnil).
. │ │ │ +0001bc50: 0a3c 6272 2f3e 0a26 6e62 7370 3b26 6e62 .
. &nb │ │ │ +0001bc60: 7370 3b3c 7370 616e 2063 6c61 7373 3d22 sp;Global Insta │ │ │ +0001bc90: 6e63 653c 2f73 7061 6e3e 203c 6120 6964 nce relation_ │ │ │ +0001bd30: 6571 7569 7661 6c65 6e63 655f 7265 7772 equivalence_rewr │ │ │ +0001bd40: 6974 655f 7265 6c61 7469 6f6e 3c2f 7370 ite_relation: RewriteRelation │ │ │ +0001bdd0: 3c2f 7370 616e 3e3c 2f61 3e20 3c61 2063 re │ │ │ +0001be50: 6c61 7469 6f6e 5f65 7175 6976 616c 656e lation_equivalen │ │ │ +0001be60: 6365 3c2f 7370 616e 3e3c 2f61 3e20 3a3d ce := │ │ │ +0001be70: 207b 7d2e 3c62 722f 3e0a 0a3c 6272 2f3e {}.
..
│ │ │ +0001be80: 0a26 6e62 7370 3b26 6e62 7370 3b3c 7370 .  De │ │ │ +0001beb0: 6669 6e69 7469 6f6e 3c2f 7370 616e 3e20 finition │ │ │ +0001bec0: 3c61 2069 643d 2272 656c 6174 696f 6e5f rela │ │ │ +0001bf30: 7469 6f6e 5f63 6f6e 6a75 6e63 7469 6f6e tion_conjunction │ │ │ +0001bf40: 3c2f 7370 616e 3e3c 2f61 3e20 283c 6120 (R< │ │ │ +0001bfa0: 2f61 3e20 3a20 3c61 2063 6c61 7373 3d22 /a> : < │ │ │ +0001bff0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +0001c000: 7469 746c 653d 2264 6566 696e 6974 696f title="definitio │ │ │ +0001c010: 6e22 3e72 656c 6174 696f 6e3c 2f73 7061 n">relation A) (R'< │ │ │ +0001c0f0: 2f61 3e20 3a20 3c61 2063 6c61 7373 3d22 /a> : < │ │ │ +0001c140: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +0001c150: 7469 746c 653d 2264 6566 696e 6974 696f title="definitio │ │ │ +0001c160: 6e22 3e72 656c 6174 696f 6e3c 2f73 7061 n">relation A) : relation │ │ │ +0001c260: 3c2f 7370 616e 3e3c 2f61 3e20 3c61 2063 │ │ │ +0001c2d0: 413c 2f73 7061 6e3e 3c2f 613e 203a 3d3c A :=< │ │ │ +0001c2e0: 6272 2f3e 0a26 6e62 7370 3b26 6e62 7370 br/>.   │ │ │ +0001c2f0: 3b26 6e62 7370 3b26 6e62 7370 3b40 3c61 ;  @predicate_inte │ │ │ +0001c380: 7273 6563 7469 6f6e 3c2f 7370 616e 3e3c rsection< │ │ │ +0001c390: 2f61 3e20 283c 6120 636c 6173 733d 2269 /a> (A::A │ │ │ +0001c550: 3a3a 3c2f 7370 616e 3e3c 2f61 3e3c 6120 :: │ │ │ +0001c5c0: 546e 696c 3c2f 7370 616e 3e3c 2f61 3e29 Tnil) │ │ │ +0001c5d0: 203c 6120 636c 6173 733d 2269 6472 6566 │ │ │ +0001c610: 3c73 7061 6e20 636c 6173 733d 2269 6422 R < │ │ │ +0001c640: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ +0001c650: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ +0001c660: 732e 5265 6c61 7469 6f6e 436c 6173 7365 s.RelationClasse │ │ │ +0001c670: 732e 6874 6d6c 2352 273a 3136 3622 3e3c s.html#R':166">< │ │ │ +0001c680: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +0001c690: 7469 746c 653d 2276 6172 6961 626c 6522 title="variable" │ │ │ +0001c6a0: 3e52 273c 2f73 7061 6e3e 3c2f 613e 2e3c >R'.< │ │ │ +0001c6b0: 6272 2f3e 0a0a 3c62 722f 3e0a 266e 6273 br/>..
.&nbs │ │ │ +0001c6c0: 703b 266e 6273 703b 3c73 7061 6e20 636c p; Definit │ │ │ +0001c6f0: 696f 6e3c 2f73 7061 6e3e 203c 6120 6964 ion relation_ │ │ │ +0001c770: 6469 736a 756e 6374 696f 6e3c 2f73 7061 disjunction (R : │ │ │ +0001c7e0: 203c 6120 636c 6173 733d 2269 6472 6566 re │ │ │ +0001c850: 6c61 7469 6f6e 3c2f 7370 616e 3e3c 2f61 lation A) (R' : │ │ │ +0001c930: 203c 6120 636c 6173 733d 2269 6472 6566 re │ │ │ +0001c9a0: 6c61 7469 6f6e 3c2f 7370 616e 3e3c 2f61 lation A) : < │ │ │ +0001ca70: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +0001ca80: 7469 746c 653d 2264 6566 696e 6974 696f title="definitio │ │ │ +0001ca90: 6e22 3e72 656c 6174 696f 6e3c 2f73 7061 n">relation A :=
. │ │ │ +0001cb20: 266e 6273 703b 266e 6273 703b 266e 6273   &nbs │ │ │ +0001cb30: 703b 266e 6273 703b 403c 6120 636c 6173 p; @predicate_ │ │ │ +0001cbb0: 756e 696f 6e3c 2f73 7061 6e3e 3c2f 613e union │ │ │ +0001cbc0: 2028 3c61 2063 6c61 7373 3d22 6964 7265 (A::A::< │ │ │ +0001cd80: 2f73 7061 6e3e 3c2f 613e 3c61 2063 6c61 /span>Tni │ │ │ +0001cdf0: 6c3c 2f73 7061 6e3e 3c2f 613e 2920 3c61 l) R │ │ │ +0001ce60: 3c2f 7370 616e 3e3c 2f61 3e20 3c61 2063 R' │ │ │ +0001ced0: 3c2f 7370 616e 3e3c 2f61 3e2e 3c62 722f .
..
.
. │ │ │ +0001cef0: 0a3c 6469 7620 636c 6173 733d 2264 6f63 .
.Relation equi │ │ │ +0001cf10: 7661 6c65 6e63 6520 6973 2061 6e20 6571 valence is an eq │ │ │ +0001cf20: 7569 7661 6c65 6e63 652c 2061 6e64 2073 uivalence, and s │ │ │ +0001cf30: 7562 7265 6c61 7469 6f6e 2064 6566 696e ubrelation defin │ │ │ +0001cf40: 6573 2061 2070 6172 7469 616c 206f 7264 es a partial ord │ │ │ +0001cf50: 6572 2e20 0a3c 2f64 6976 3e0a 3c64 6976 er. .
.
.. │ │ │ +0001cf70: 3c62 722f 3e0a 266e 6273 703b 266e 6273
. &nbs │ │ │ +0001cf80: 703b 3c73 7061 6e20 636c 6173 733d 2269 p;Global Instan │ │ │ +0001cfb0: 6365 3c2f 7370 616e 3e20 3c61 2069 643d ce rela │ │ │ +0001d040: 7469 6f6e 5f65 7175 6976 616c 656e 6365 tion_equivalence │ │ │ +0001d050: 5f65 7175 6976 616c 656e 6365 3c2f 7370 _equivalence :
.& │ │ │ +0001d070: 6e62 7370 3b26 6e62 7370 3b26 6e62 7370 nbsp;   │ │ │ +0001d080: 3b26 6e62 7370 3b3c 6120 636c 6173 733d ; Equiv │ │ │ +0001d0f0: 616c 656e 6365 3c2f 7370 616e 3e3c 2f61 alence │ │ │ +0001d150: 3c73 7061 6e20 636c 6173 733d 2269 6422 relation_equ │ │ │ +0001d180: 6976 616c 656e 6365 3c2f 7370 616e 3e3c ivalence< │ │ │ +0001d190: 2f61 3e2e 3c62 722f 3e0a 200a 3c62 722f /a>.
. .
.  G │ │ │ +0001d1d0: 6c6f 6261 6c20 496e 7374 616e 6365 3c2f lobal Instance
│ │ │ +0001d240: 3c73 7061 6e20 636c 6173 733d 2269 6422 relation_impli │ │ │ +0001d270: 6361 7469 6f6e 5f70 7265 6f72 6465 723c cation_preorder< │ │ │ +0001d280: 2f73 7061 6e3e 3c2f 613e 203a 203c 6120 /span> : < │ │ │ +0001d2d0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +0001d2e0: 7469 746c 653d 2263 6c61 7373 223e 5072 title="class">Pr │ │ │ +0001d2f0: 654f 7264 6572 3c2f 7370 616e 3e3c 2f61 eOrder (@subrelat │ │ │ +0001d370: 696f 6e3c 2f73 7061 6e3e 3c2f 613e 203c ion < │ │ │ +0001d380: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ +0001d390: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ +0001d3a0: 732e 5265 6c61 7469 6f6e 436c 6173 7365 s.RelationClasse │ │ │ +0001d3b0: 732e 6874 6d6c 2342 696e 6172 792e 4122 s.html#Binary.A" │ │ │ +0001d3c0: 3e3c 7370 616e 2063 6c61 7373 3d22 6964 >A) │ │ │ +0001d3f0: 2e3c 6272 2f3e 0a20 0a3c 6272 2f3e 0a3c .
. .
.< │ │ │ +0001d400: 2f64 6976 3e0a 0a3c 6469 7620 636c 6173 /div>..
.

│ │ │ +0001d440: 5061 7274 6961 6c20 4f72 6465 722e 3c2f Partial Order... A partia │ │ │ +0001d460: 6c20 6f72 6465 7220 6973 2061 2070 7265 l order is a pre │ │ │ +0001d470: 6f72 6465 7220 7768 6963 6820 6973 2061 order which is a │ │ │ +0001d480: 6464 6974 696f 6e61 6c6c 7920 616e 7469 dditionally anti │ │ │ +0001d490: 7379 6d6d 6574 7269 632e 0a20 2020 5765 symmetric.. We │ │ │ +0001d4a0: 2067 6976 6520 616e 2065 7175 6976 616c give an equival │ │ │ +0001d4b0: 656e 7420 6465 6669 6e69 7469 6f6e 2c20 ent definition, │ │ │ +0001d4c0: 7570 2d74 6f20 616e 2065 7175 6976 616c up-to an equival │ │ │ +0001d4d0: 656e 6365 2072 656c 6174 696f 6e0a 2020 ence relation. │ │ │ +0001d4e0: 206f 6e20 7468 6520 6361 7272 6965 722e on the carrier. │ │ │ +0001d4f0: 200a 3c2f 6469 763e 0a3c 6469 7620 636c .

.
..
.  < │ │ │ +0001d520: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +0001d530: 7469 746c 653d 226b 6579 776f 7264 223e title="keyword"> │ │ │ +0001d540: 436c 6173 733c 2f73 7061 6e3e 203c 6120 Class │ │ │ +0001d5b0: 3c73 7061 6e20 6964 3d22 5061 7274 6961 PartialOrder< │ │ │ +0001d5e0: 2f73 7061 6e3e 3c2f 7370 616e 3e3c 2f61 /span> │ │ │ +0001d620: 3c73 7061 6e20 636c 6173 733d 2269 6422 │ │ │ +0001d640: 6571 413c 2f73 7061 6e3e 3c2f 613e 2060 eqA ` │ │ │ +0001d650: 7b3c 6120 6964 3d22 6571 753a 3137 3022 {< │ │ │ +0001d680: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +0001d690: 7469 746c 653d 2262 696e 6465 7222 3e65 title="binder">e │ │ │ +0001d6a0: 7175 3c2f 7370 616e 3e3c 2f61 3e20 3a20 qu : │ │ │ +0001d6b0: 3c61 2063 6c61 7373 3d22 6964 7265 6622 Equivalence< │ │ │ +0001d720: 2f73 7061 6e3e 3c2f 613e 203c 6120 636c /span> A │ │ │ +0001d790: 3c2f 7370 616e 3e3c 2f61 3e20 3c61 2063 e │ │ │ +0001d800: 7141 3c2f 7370 616e 3e3c 2f61 3e7d 203c qA} < │ │ │ +0001d810: 6120 6964 3d22 523a 3137 3122 2063 6c61 a id="R:171" cla │ │ │ +0001d820: 7373 3d22 6964 7265 6622 2068 7265 663d ss="idref" href= │ │ │ +0001d830: 2223 523a 3137 3122 3e3c 7370 616e 2063 "#R:171">R `{preo : PreOr │ │ │ +0001d930: 6465 723c 2f73 7061 6e3e 3c2f 613e 203c der < │ │ │ +0001d940: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ +0001d950: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ +0001d960: 732e 5265 6c61 7469 6f6e 436c 6173 7365 s.RelationClasse │ │ │ +0001d970: 732e 6874 6d6c 2342 696e 6172 792e 4122 s.html#Binary.A" │ │ │ +0001d980: 3e3c 7370 616e 2063 6c61 7373 3d22 6964 >A │ │ │ +0001d9b0: 3c61 2063 6c61 7373 3d22 6964 7265 6622 < │ │ │ +0001d9f0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +0001da00: 7469 746c 653d 2276 6172 6961 626c 6522 title="variable" │ │ │ +0001da10: 3e52 3c2f 7370 616e 3e3c 2f61 3e7d 203a >R} : │ │ │ +0001da20: 3d3c 6272 2f3e 0a26 6e62 7370 3b26 6e62 =
. &nb │ │ │ +0001da30: 7370 3b26 6e62 7370 3b26 6e62 7370 3b3c sp;  < │ │ │ +0001da40: 6120 6964 3d22 7061 7274 6961 6c5f 6f72 a id="partial_or │ │ │ +0001da50: 6465 725f 6571 7569 7661 6c65 6e63 6522 der_equivalence" │ │ │ +0001da60: 2063 6c61 7373 3d22 6964 7265 6622 2068 class="idref" h │ │ │ +0001da70: 7265 663d 2223 7061 7274 6961 6c5f 6f72 ref="#partial_or │ │ │ +0001da80: 6465 725f 6571 7569 7661 6c65 6e63 6522 der_equivalence" │ │ │ +0001da90: 3e3c 7370 616e 2063 6c61 7373 3d22 6964 >partial_order_ │ │ │ +0001db00: 6571 7569 7661 6c65 6e63 653c 2f73 7061 equivalence : │ │ │ +0001db20: 3c61 2063 6c61 7373 3d22 6964 7265 6622 relation_equiv │ │ │ +0001dba0: 616c 656e 6365 3c2f 7370 616e 3e3c 2f61 alence eqA< │ │ │ +0001dc20: 2f61 3e20 283c 6120 636c 6173 733d 2269 /a> (relation_ │ │ │ +0001dca0: 636f 6e6a 756e 6374 696f 6e3c 2f73 7061 conjunction R │ │ │ +0001dd20: 3c2f 613e 2028 3c61 2063 6c61 7373 3d22 (f │ │ │ +0001dd80: 6c69 703c 2f73 7061 6e3e 3c2f 613e 203c lip < │ │ │ +0001dd90: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ +0001dda0: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ +0001ddb0: 732e 5265 6c61 7469 6f6e 436c 6173 7365 s.RelationClasse │ │ │ +0001ddc0: 732e 6874 6d6c 2352 3a31 3731 223e 3c73 s.html#R:171"> │ │ │ +0001ddf0: 523c 2f73 7061 6e3e 3c2f 613e 2929 2e3c R)).< │ │ │ +0001de00: 6272 2f3e 0a0a 3c62 722f 3e0a 3c2f 6469 br/>..
...
.The equiva │ │ │ +0001de30: 6c65 6e63 6520 7072 6f6f 6620 6973 2073 lence proof is s │ │ │ +0001de40: 7566 6669 6369 656e 7420 666f 7220 7072 ufficient for pr │ │ │ +0001de50: 6f76 696e 6720 7468 6174 203c 7370 616e oving that R │ │ │ +0001dea0: 206d 7573 7420 6265 2061 0a20 2020 6d6f must be a. mo │ │ │ +0001deb0: 7270 6869 736d 2066 6f72 2065 7175 6976 rphism for equiv │ │ │ +0001dec0: 616c 656e 6365 2028 7365 6520 4d6f 7270 alence (see Morp │ │ │ +0001ded0: 6869 736d 7329 2e20 2049 7420 6973 2061 hisms). It is a │ │ │ +0001dee0: 6c73 6f20 7375 6666 6963 6965 6e74 2074 lso sufficient t │ │ │ +0001def0: 6f0a 2020 2073 686f 7720 7468 6174 203c o. show that < │ │ │ +0001df00: 7370 616e 2063 6c61 7373 3d22 696e 6c69 span class="inli │ │ │ +0001df10: 6e65 636f 6465 223e 3c73 7061 6e20 636c necode">R is antisymm │ │ │ +0001df50: 6574 7269 6320 772e 722e 742e 203c 7370 etric w.r.t. eqA .
.. │ │ │ +0001dfc0: 0a3c 6272 2f3e 0a26 6e62 7370 3b26 6e62 .
. &nb │ │ │ +0001dfd0: 7370 3b3c 7370 616e 2063 6c61 7373 3d22 sp;Global Insta │ │ │ +0001e000: 6e63 653c 2f73 7061 6e3e 203c 6120 6964 nce partial_o │ │ │ +0001e080: 7264 6572 5f61 6e74 6973 796d 3c2f 7370 rder_antisym `(PartialOrder │ │ │ +0001e0f0: 3c2f 7370 616e 3e3c 2f61 3e20 3c61 2069 eqA │ │ │ +0001e170: 3c2f 7370 616e 3e3c 2f61 3e20 3c61 2069 R) : │ │ │ +0001e240: 3c73 7061 6e20 636c 6173 733d 2269 6422 A │ │ │ +0001e260: 6e74 6973 796d 6d65 7472 6963 3c2f 7370 ntisymmetric A
eqA< │ │ │ +0001e350: 2f73 7061 6e3e 3c2f 613e 203c 6120 636c /span> R
.
.. │ │ │ +0001e3d0: 3c62 722f 3e0a 266e 6273 703b 266e 6273
. &nbs │ │ │ +0001e3e0: 703b 3c73 7061 6e20 636c 6173 733d 2269 p;Lemma │ │ │ +0001e410: 3c61 2069 643d 2250 6172 7469 616c 4f72 PartialOr │ │ │ +0001e480: 6465 725f 696e 7665 7273 653c 2f73 7061 der_inverse `(PartialOrder< │ │ │ +0001e4f0: 2f73 7061 6e3e 3c2f 613e 203c 6120 6964 /span> eqA< │ │ │ +0001e570: 2f73 7061 6e3e 3c2f 613e 203c 6120 6964 /span> R │ │ │ +0001e5f0: 3c2f 613e 2920 3a20 3c61 2063 6c61 7373 ) : Par │ │ │ +0001e660: 7469 616c 4f72 6465 723c 2f73 7061 6e3e tialOrder │ │ │ +0001e670: 3c2f 613e 203c 6120 636c 6173 733d 2269 eqA (flip │ │ │ +0001e750: 203c 6120 636c 6173 733d 2269 6472 6566 │ │ │ +0001e790: 3c73 7061 6e20 636c 6173 733d 2269 6422 R). │ │ │ +0001e7c0: 3c62 722f 3e0a 203c 7370 616e 2063 6c61
. End Binary.
..
.#[global] │ │ │ +0001e8a0: 3c62 722f 3e0a 3c73 7061 6e20 636c 6173
.Hint Extern 3 (Partia │ │ │ +0001e970: 6c4f 7264 6572 3c2f 7370 616e 3e3c 2f61 lOrder (flip │ │ │ +0001e9e0: 3c2f 7370 616e 3e3c 2f61 3e20 3c73 7061 _)) => class_app │ │ │ +0001ea40: 6c79 3c2f 7370 616e 3e20 3c73 7061 6e20 ly PartialOr │ │ │ +0001ea70: 6465 725f 696e 7665 7273 653c 2f73 7061 der_inverse : typeclass_inst │ │ │ +0001eab0: 616e 6365 733c 2f73 7061 6e3e 2e3c 6272 ances.
..
.
│ │ │ +0001ead0: 0a0a 3c64 6976 2063 6c61 7373 3d22 646f ..
.The partial │ │ │ +0001eaf0: 6f72 6465 7220 6465 6669 6e65 6420 6279 order defined by │ │ │ +0001eb00: 2073 7562 7265 6c61 7469 6f6e 2061 6e64 subrelation and │ │ │ +0001eb10: 2072 656c 6174 696f 6e20 6571 7569 7661 relation equiva │ │ │ +0001eb20: 6c65 6e63 652e 200a 3c2f 6469 763e 0a3c lence. .
.< │ │ │ +0001eb30: 6469 7620 636c 6173 733d 2263 6f64 6522 div class="code" │ │ │ +0001eb40: 3e0a 0a3c 6272 2f3e 0a23 5b3c 7370 616e >..
.#[global]
.Program │ │ │ +0001eba0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c
Instanc │ │ │ +0001ebd0: 653c 2f73 7061 6e3e 203c 6120 6964 3d22 e sub │ │ │ +0001ec50: 7265 6c61 7469 6f6e 5f70 6172 7469 616c relation_partial │ │ │ +0001ec60: 5f6f 7264 6572 3c2f 7370 616e 3e3c 2f61 _order {A} :
.  PartialOrder< │ │ │ +0001ed50: 2f73 7061 6e3e 3c2f 613e 2028 403c 6120 /span> (@r │ │ │ +0001edd0: 656c 6174 696f 6e5f 6571 7569 7661 6c65 elation_equivale │ │ │ +0001ede0: 6e63 653c 2f73 7061 6e3e 3c2f 613e 203c nce < │ │ │ +0001edf0: 6120 636c 6173 733d 2269 6472 6566 2220 a class="idref" │ │ │ +0001ee00: 6872 6566 3d22 436f 712e 436c 6173 7365 href="Coq.Classe │ │ │ +0001ee10: 732e 5265 6c61 7469 6f6e 436c 6173 7365 s.RelationClasse │ │ │ +0001ee20: 732e 6874 6d6c 2341 3a31 3835 223e 3c73 s.html#A:185"> │ │ │ +0001ee50: 413c 2f73 7061 6e3e 3c2f 613e 2920 3c61 A) subrelation.
.. │ │ │ +0001eee0: 3c62 722f 3e0a 0a3c 6272 2f3e 0a3c 7370
..
.Gl │ │ │ +0001ef10: 6f62 616c 2054 7970 6563 6c61 7373 6573 obal Typeclasses │ │ │ +0001ef20: 204f 7061 7175 653c 2f73 7061 6e3e 203c Opaque < │ │ │ +0001ef30: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +0001ef40: 7469 746c 653d 2276 6172 223e 6172 726f title="var">arro │ │ │ +0001ef50: 7773 3c2f 7370 616e 3e20 3c73 7061 6e20 ws predicate │ │ │ +0001ef80: 5f69 6d70 6c69 6361 7469 6f6e 3c2f 7370 _implication predicate_equiv │ │ │ +0001efc0: 616c 656e 6365 3c2f 7370 616e 3e3c 6272 alence
.  & │ │ │ +0001efe0: 6e62 7370 3b26 6e62 7370 3b26 6e62 7370 nbsp;   │ │ │ +0001eff0: 3b26 6e62 7370 3b26 6e62 7370 3b26 6e62 ;  &nb │ │ │ +0001f000: 7370 3b26 6e62 7370 3b26 6e62 7370 3b26 sp;  & │ │ │ +0001f010: 6e62 7370 3b26 6e62 7370 3b3c 7370 616e nbsp; relation │ │ │ +0001f040: 5f65 7175 6976 616c 656e 6365 3c2f 7370 _equivalence pointwise_lifti │ │ │ +0001f080: 6e67 3c2f 7370 616e 3e2e 3c62 722f 3e0a ng.
. │ │ │ +0001f090: 0a3c 6272 2f3e 0a0a 3c62 722f 3e0a 3c73 .
..
.R │ │ │ +0001f0c0: 6567 6973 7465 723c 2f73 7061 6e3e 203c egister
< │ │ │ +0001f0d0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +0001f0e0: 7469 746c 653d 2276 6172 223e 7265 6c61 title="var">rela │ │ │ +0001f0f0: 7469 6f6e 3c2f 7370 616e 3e20 3c73 7061 tion as< │ │ │ +0001f120: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> rewrite.prop │ │ │ +0001f150: 2e72 656c 6174 696f 6e3c 2f73 7061 6e3e .relation │ │ │ +0001f160: 2e3c 6272 2f3e 0a3c 7370 616e 2063 6c61 .
.Register │ │ │ +0001f190: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c subrelation │ │ │ +0001f1c0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c as
│ │ │ +0001f210: 7265 7772 6974 652e 7072 6f70 2e73 7562 rewrite.prop.sub │ │ │ +0001f220: 7265 6c61 7469 6f6e 3c2f 7370 616e 3e2e relation. │ │ │ +0001f230: 3c62 722f 3e0a 3c73 7061 6e20 636c 6173
.Register< │ │ │ +0001f260: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> Reflexive
as │ │ │ +0001f2c0: 3c73 7061 6e20 636c 6173 733d 2269 6422 rew │ │ │ +0001f2e0: 7269 7465 2e70 726f 702e 5265 666c 6578 rite.prop.Reflex │ │ │ +0001f2f0: 6976 653c 2f73 7061 6e3e 2e3c 6272 2f3e ive.
│ │ │ +0001f300: 0a3c 7370 616e 2063 6c61 7373 3d22 6964 .Register reflexivity
as │ │ │ +0001f390: 3c73 7061 6e20 636c 6173 733d 2269 6422 rew │ │ │ +0001f3b0: 7269 7465 2e70 726f 702e 7265 666c 6578 rite.prop.reflex │ │ │ +0001f3c0: 6976 6974 793c 2f73 7061 6e3e 2e3c 6272 ivity.
.Register Symmetric as rewrit │ │ │ +0001f480: 652e 7072 6f70 2e53 796d 6d65 7472 6963 e.prop.Symmetric │ │ │ +0001f490: 3c2f 7370 616e 3e2e 3c62 722f 3e0a 3c73 .
.R │ │ │ +0001f4c0: 6567 6973 7465 723c 2f73 7061 6e3e 203c egister < │ │ │ +0001f4d0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +0001f4e0: 7469 746c 653d 2274 6163 7469 6322 3e73 title="tactic">s │ │ │ +0001f4f0: 796d 6d65 7472 793c 2f73 7061 6e3e 203c ymmetry < │ │ │ +0001f500: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ +0001f510: 7469 746c 653d 226b 6579 776f 7264 223e title="keyword"> │ │ │ +0001f520: 6173 3c2f 7370 616e 3e20 3c73 7061 6e20 as rewrite.p │ │ │ +0001f550: 726f 702e 7379 6d6d 6574 7279 3c2f 7370 rop.symmetry.
.Regis │ │ │ +0001f590: 7465 723c 2f73 7061 6e3e 203c 7370 616e ter Transiti │ │ │ +0001f5c0: 7665 3c2f 7370 616e 3e20 3c73 7061 6e20 ve as
rewrite.prop.T │ │ │ +0001f620: 7261 6e73 6974 6976 653c 2f73 7061 6e3e ransitive │ │ │ +0001f630: 2e3c 6272 2f3e 0a3c 7370 616e 2063 6c61 .
.Register │ │ │ +0001f660: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c transiti │ │ │ +0001f690: 7669 7479 3c2f 7370 616e 3e20 3c73 7061 vity as< │ │ │ +0001f6c0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> rewrite.prop │ │ │ +0001f6f0: 2e74 7261 6e73 6974 6976 6974 793c 2f73 .transitivity
.
.
.
. │ │ │ +0001f730: 2020 2020 2020 3c64 6976 2069 643d 2273
. │ │ │ +0001f750: 203c 6469 7620 636c 6173 733d 2262 6c6f
. < │ │ │ +0001f770: 6832 2063 6c61 7373 3d22 7469 746c 6522 h2 class="title" │ │ │ +0001f780: 3e4e 6176 6967 6174 696f 6e3c 2f68 323e >Navigation │ │ │ +0001f790: 0a20 2020 2020 2020 2020 203c 6469 7620 .
│ │ │ +0001f7b0: 0a20 2020 2020 2020 2020 2020 203c 756c . . │ │ │ +0001f8c0: 2020 2020 2020 2020 3c2f 6c69 3e0a 2020 . │ │ │ +0001f8d0: 2020 2020 2020 2020 2020 3c2f 756c 3e0a . │ │ │ +0001f8e0: 2020 2020 2020 2020 2020 3c2f 6469 763e
│ │ │ +0001f8f0: 0a20 2020 2020 2020 203c 2f64 6976 3e0a .
. │ │ │ +0001f900: 2020 2020 2020 3c2f 6469 763e 0a20 2020
. │ │ │ +0001f910: 203c 2f64 6976 3e0a 0a20 203c 2f64 6976
..
..
. │ │ │ +0001fa60: 0a20 203c 2f64 6976 3e0a 0a3c 2f64 6976 .
..
.... │ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.Classes.RelationPairs.html │ │ │ @@ -45,15 +45,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Relations over pairs

│ │ │ +

Relations over pairs

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Require Import SetoidList.
│ │ │ Require Import Relations Morphisms.
│ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.Classes.SetoidClass.html │ │ │ @@ -45,15 +45,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/libcoq-stdlib/html/Coq.Classes.SetoidDec.html │ │ │ @@ -45,15 +45,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Decidable setoid equality theory.

│ │ │ +

Decidable setoid equality theory.

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Author: Matthieu Sozeau │ │ │ Institution: LRI, CNRS UMR 8623 - University Paris Sud │ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.Classes.SetoidTactics.html │ │ │ @@ -45,15 +45,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/libcoq-stdlib/html/Coq.FSets.FMapAVL.html │ │ │ @@ -47,15 +47,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

FMapAVL

│ │ │ +

FMapAVL

│ │ │ │ │ │
│ │ │ │ │ │ This module implements maps using AVL trees. │ │ │ It follows the implementation from Ocaml's standard library. │ │ │ │ │ │
│ │ │ @@ -84,15 +84,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 │ │ │
│ │ │ @@ -110,19 +110,19 @@ │ │ │ #[global]
│ │ │ Hint Transparent key : core.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Trees

│ │ │ +

Trees

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

Trees

│ │ │ +

Trees

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ The fifth field of Node is the height of the tree │ │ │
│ │ │
│ │ │ @@ -146,15 +146,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
│ │ │ @@ -169,39 +169,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. │ │ │
│ │ │
│ │ │ @@ -228,15 +228,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. │ │ │
│ │ │
│ │ │ @@ -291,15 +291,15 @@ │ │ │     else
│ │ │       create l x d r.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Insertion

│ │ │ +

Insertion

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Fixpoint add x d m :=
│ │ │   match m with
│ │ │ @@ -312,15 +312,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). │ │ │ @@ -337,15 +337,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. │ │ │ @@ -363,15 +363,15 @@ │ │ │     end
│ │ │ end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Deletion

│ │ │ +

Deletion

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

join

│ │ │ +

join

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Same as bal but does not assume anything regarding heights of l │ │ │ and r. │ │ │ │ │ │ @@ -412,15 +412,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 │ │ │ @@ -452,15 +452,15 @@ │ │ │      end
    │ │ │  end.
    │ │ │ │ │ │
    │ │ │
│ │ │ │ │ │
│ │ │ -

Concatenation

│ │ │ +

Concatenation

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Same as merge but does not assume anything about heights. │ │ │ │ │ │
│ │ │ @@ -476,15 +476,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 │ │ │
│ │ │
│ │ │ @@ -507,15 +507,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
│ │ │ @@ -523,27 +523,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
│ │ │ @@ -634,15 +634,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
│ │ │ @@ -659,15 +659,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' :=
│ │ │ @@ -680,15 +680,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'', │ │ │ @@ -736,15 +736,15 @@ │ │ │
│ │ │ End Map2_opt.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Map2

│ │ │ +

Map2

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ The map2 function of the Map interface can be implemented │ │ │ via map2_opt and map_option. │ │ │ │ │ │ @@ -766,28 +766,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,
│ │ │ @@ -809,15 +809,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) │ │ │
│ │ │
│ │ │ @@ -843,15 +843,15 @@ │ │ │
│ │ │ End Invariants.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Correctness proofs, isolated in a sub-module

│ │ │ +

Correctness proofs, isolated in a sub-module

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module Proofs.
│ │ │  Module MX := OrderedTypeFacts X.
│ │ │ @@ -871,15 +871,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.

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ #[global]
│ │ │ Hint Constructors tree MapsTo In bst : core.
│ │ │ @@ -982,15 +982,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. │ │ │
│ │ │
│ │ │ │ │ │ @@ -1086,15 +1086,15 @@ │ │ │ #[local]
│ │ │ 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.
│ │ │ │ │ │ @@ -1104,30 +1104,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.
│ │ │ │ │ │ @@ -1173,15 +1173,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 ->
│ │ │ @@ -1213,15 +1213,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.
│ │ │ @@ -1247,15 +1247,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) <->
│ │ │ @@ -1290,15 +1290,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).
│ │ │ @@ -1312,15 +1312,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).
│ │ │ @@ -1339,15 +1339,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.
│ │ │ @@ -1363,15 +1363,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).
│ │ │ @@ -1402,15 +1402,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.
│ │ │ @@ -1428,15 +1428,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)).
│ │ │ @@ -1482,15 +1482,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).
│ │ │ @@ -1510,15 +1510,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 │ │ │
│ │ │
│ │ │ @@ -1737,15 +1737,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/libcoq-stdlib/html/Coq.FSets.FMapFacts.html │ │ │ @@ -45,15 +45,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. │ │ │ │ │ │ @@ -72,15 +72,15 @@ │ │ │ #[global]
│ │ │ Hint Extern 1 (Equivalence _) => constructor; congruence : core.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Facts about weak maps

│ │ │ +

Facts about weak maps

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module WFacts_fun (E:DecidableType)(Import M:WSfun E).
│ │ │ │ │ │ @@ -99,15 +99,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.
│ │ │ @@ -256,15 +256,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.
│ │ │ │ │ │ @@ -395,15 +395,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. │ │ │
│ │ │
│ │ │ │ │ │ @@ -457,15 +457,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.
│ │ │ │ │ │ @@ -541,28 +541,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... │ │ │ │ │ │
│ │ │ @@ -614,30 +614,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).
│ │ │ @@ -666,15 +666,15 @@ │ │ │
│ │ │   Lemma of_list_3 : forall s, Equal (of_list (to_list s)) s.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Fold

│ │ │ +

Fold

│ │ │ │ │ │
│ │ │ │ │ │ Alternative specification via fold_right │ │ │
│ │ │
│ │ │ │ │ │ @@ -682,15 +682,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. │ │ │
│ │ │
│ │ │ @@ -795,15 +795,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. │ │ │
│ │ │
│ │ │ @@ -890,15 +890,15 @@ │ │ │
│ │ │   End Fold_More.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Cardinal

│ │ │ +

Cardinal

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │   Lemma cardinal_fold : forall m : t elt,
│ │ │    cardinal m = fold (fun _ _ => S) m 0.
│ │ │ @@ -936,15 +936,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').
│ │ │ @@ -954,15 +954,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 _).
│ │ │ @@ -1181,28 +1181,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/libcoq-stdlib/html/Coq.FSets.FMapFullAVL.html │ │ │ @@ -47,15 +47,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

FMapFullAVL

│ │ │ +

FMapFullAVL

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ This file contains some complements to FMapAVL. │ │ │ │ │ │
│ │ │ @@ -115,15 +115,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 │ │ │
│ │ │ @@ -139,15 +139,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.

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ #[local]
│ │ │ Hint Constructors avl : core.
│ │ │ @@ -177,15 +177,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 ->
│ │ │ @@ -205,27 +205,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 ->
│ │ │ @@ -257,15 +257,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.
│ │ │ @@ -275,15 +275,15 @@ │ │ │ #[local]
│ │ │ 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 /\
│ │ │ @@ -293,15 +293,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 ->
│ │ │ @@ -312,15 +312,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.
│ │ │ @@ -330,15 +330,15 @@ │ │ │ #[local]
│ │ │ 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) /\
│ │ │ @@ -449,15 +449,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 │ │ │ @@ -648,15 +648,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/libcoq-stdlib/html/Coq.FSets.FMapInterface.html │ │ │ @@ -45,15 +45,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Finite map library

│ │ │ +

Finite map library

│ │ │ │ │ │
│ │ │ │ │ │ This file proposes interfaces for finite maps │ │ │
│ │ │
│ │ │ │ │ │ @@ -131,15 +131,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: │ │ │
│ │ │ @@ -552,15 +552,15 @@ │ │ │
│ │ │ End WSfun.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Static signature for Weak Maps

│ │ │ +

Static signature for Weak Maps

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Similar to WSfun but expressed in a self-contained way. │ │ │
│ │ │
│ │ │ @@ -571,15 +571,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.
│ │ │ @@ -598,30 +598,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/libcoq-stdlib/html/Coq.FSets.FMapList.html │ │ │ @@ -45,15 +45,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. │ │ │
│ │ │ @@ -89,15 +89,15 @@ │ │ │ Notation Sort := (sort ltk).
│ │ │ Notation Inf := (lelistA (ltk)).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

empty

│ │ │ +

empty

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

is_empty

│ │ │ +

is_empty

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

mem

│ │ │ +

mem

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

find

│ │ │ +

find

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

add

│ │ │ +

add

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

remove

│ │ │ +

remove

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

elements

│ │ │ +

elements

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

fold

│ │ │ +

fold

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Fixpoint fold (A:Type)(f:key->elt->A->A)(m:t elt) (acc:A) {struct m} : A :=
│ │ │   match m with
│ │ │ @@ -312,15 +312,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

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

map and mapi

│ │ │ +

map and mapi

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

map2

│ │ │ +

map2

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Variable elt elt' elt'' : Type.
│ │ │ Variable f : option elt -> option elt' -> option elt''.
│ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.FSets.FMapPositive.html │ │ │ @@ -45,15 +45,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/libcoq-stdlib/html/Coq.FSets.FMapWeakList.html │ │ │ @@ -45,15 +45,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. │ │ │
│ │ │
│ │ │ @@ -87,15 +87,15 @@ │ │ │ Notation In := (In (elt:=elt)).
│ │ │ Notation NoDupA := (NoDupA eqk).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

empty

│ │ │ +

empty

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

is_empty

│ │ │ +

is_empty

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

mem

│ │ │ +

mem

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

find

│ │ │ +

find

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

add

│ │ │ +

add

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Fixpoint add (k : key) (x : elt) (s : t elt) {struct s} : t elt :=
│ │ │   match s with
│ │ │ @@ -225,15 +225,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

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

elements

│ │ │ +

elements

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

fold

│ │ │ +

fold

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Fixpoint fold (A:Type)(f:key->elt->A->A)(m:t elt) (acc : A) {struct m} : A :=
│ │ │   match m with
│ │ │ @@ -300,15 +300,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
│ │ │ @@ -361,15 +361,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/libcoq-stdlib/html/Coq.FSets.FSetAVL.html │ │ │ @@ -45,15 +45,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/libcoq-stdlib/html/Coq.FSets.FSetBridge.html │ │ │ @@ -45,15 +45,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Finite sets library

│ │ │ +

Finite sets library

│ │ │ │ │ │
│ │ │ │ │ │ This module implements bridges (as functors) from dependent │ │ │ to/from non-dependent set signature. │ │ │
│ │ │
│ │ │ @@ -62,15 +62,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.
│ │ │   Local Ltac Tauto.intuition_solver ::= auto with bool set.
│ │ │ @@ -240,15 +240,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/libcoq-stdlib/html/Coq.FSets.FSetCompat.html │ │ │ @@ -45,15 +45,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Compatibility functors between FSetInterface and MSetInterface.

│ │ │ +

Compatibility functors between FSetInterface and MSetInterface.

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Require Import FSetInterface FSetFacts MSetInterface MSetFacts.
│ │ │ Set Implicit Arguments.
│ │ │ @@ -61,15 +61,15 @@ │ │ │
│ │ │ Local Ltac Tauto.intuition_solver ::= auto with relations.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

From new Weak Sets to old ones

│ │ │ +

From new Weak Sets to old ones

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

From new Sets to new ones

│ │ │ +

From new Sets to new ones

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

From old Weak Sets to new ones.

│ │ │ +

From old Weak Sets to new ones.

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module Update_WSets
│ │ │  (E:Equalities.DecidableType)
│ │ │ @@ -425,15 +425,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/libcoq-stdlib/html/Coq.FSets.FSetDecide.html │ │ │ @@ -71,15 +71,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
│ │ │ @@ -177,41 +177,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 (
│ │ │ @@ -454,28 +454,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). │ │ │
│ │ │
│ │ │ @@ -584,15 +584,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. │ │ │ @@ -664,15 +664,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. │ │ │ │ │ │
│ │ │ @@ -690,15 +690,15 @@ │ │ │
│ │ │     Global 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,
│ │ │ @@ -725,15 +725,15 @@ │ │ │     #[global]
│ │ │     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. │ │ │
│ │ │ │ │ │ @@ -808,15 +808,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 │ │ │ @@ -857,15 +857,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. │ │ │ @@ -905,15 +905,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.) │ │ │
│ │ │ @@ -947,15 +947,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 :=
│ │ │ @@ -1061,15 +1061,15 @@ │ │ │       fsetdec_body
│ │ │     end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Examples

│ │ │ +

Examples

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │   Module FSetDecideTestCases.
│ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.FSets.FSetEqProperties.html │ │ │ @@ -45,15 +45,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/libcoq-stdlib/html/Coq.FSets.FSetFacts.html │ │ │ @@ -45,15 +45,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. │ │ │ @@ -81,15 +81,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.
│ │ │ @@ -175,15 +175,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.
│ │ │ @@ -239,15 +239,15 @@ │ │ │
│ │ │ End BoolSpec.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

E.eq and Equal are setoid equalities

│ │ │ +

E.eq and Equal are setoid equalities

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ #[global]
│ │ │ Instance E_ST : Equivalence E.eq.
│ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.FSets.FSetInterface.html │ │ │ @@ -45,15 +45,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 │ │ │ @@ -101,24 +101,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. │ │ │
│ │ │ @@ -615,15 +615,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. │ │ │
│ │ │ @@ -635,15 +635,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. │ │ │
│ │ │ @@ -762,15 +762,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. │ │ │
│ │ │ @@ -782,15 +782,15 @@ │ │ │   Include Sfun E.
│ │ │ End S.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Some subtyping tests

│ │ │ +

Some subtyping tests

│ │ │ │ │ │
│ │ │  WSfun ---> WS
│ │ │   |         |
│ │ │   |         |
│ │ │   V         V
│ │ │  Sfun  ---> S
│ │ │ @@ -799,15 +799,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/libcoq-stdlib/html/Coq.FSets.FSetList.html │ │ │ @@ -45,15 +45,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/libcoq-stdlib/html/Coq.FSets.FSetProperties.html │ │ │ @@ -45,15 +45,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, │ │ │ @@ -337,30 +337,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.
│ │ │ │ │ │ @@ -376,15 +376,15 @@ │ │ │
│ │ │   Lemma of_list_3 : forall s, of_list (to_list s) [=] s.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Fold

│ │ │ +

Fold

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │   Section Fold.
│ │ │ │ │ │ @@ -404,15 +404,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. │ │ │
│ │ │
│ │ │ @@ -510,15 +510,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: │ │ │ │ │ │ @@ -582,15 +582,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').
│ │ │ @@ -599,15 +599,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.
│ │ │ │ │ │ @@ -651,31 +651,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,
│ │ │ @@ -690,15 +690,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.
│ │ │ │ │ │ @@ -715,15 +715,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'.
│ │ │ │ │ │ @@ -734,15 +734,15 @@ │ │ │   #[global]
│ │ │   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/libcoq-stdlib/html/Coq.FSets.FSetToFiniteSet.html │ │ │ @@ -45,28 +45,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/libcoq-stdlib/html/Coq.FSets.FSetWeakList.html │ │ │ @@ -45,15 +45,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/libcoq-stdlib/html/Coq.Floats.FloatAxioms.html │ │ │ @@ -48,15 +48,15 @@ │ │ │
│ │ │ Require Import ZArith Uint63 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/libcoq-stdlib/html/Coq.Floats.FloatLemmas.html │ │ │ @@ -49,15 +49,15 @@ │ │ │ Require Import ZArith Uint63 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/libcoq-stdlib/html/Coq.Floats.FloatOps.html │ │ │ @@ -48,15 +48,15 @@ │ │ │
│ │ │ Require Import ZArith Uint63 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/libcoq-stdlib/html/Coq.Floats.PrimFloat.html │ │ │ @@ -48,24 +48,24 @@ │ │ │
│ │ │ Require Import PrimInt63 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.
│ │ │ │ │ │
│ │ │ Register float_comparison as kernel.ind_f_cmp.
│ │ │ @@ -73,15 +73,15 @@ │ │ │
│ │ │ Register float_class as kernel.ind_f_class.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

The main type

│ │ │ +

The main type

│ │ │ float: primitive type for Binary64 floating-point numbers. │ │ │
│ │ │
│ │ │ Primitive float := #float64_type.
│ │ │ Register float as num.float.type.
│ │ │ │ │ │
│ │ │ @@ -91,30 +91,30 @@ │ │ │ Definition printer (x : float_wrapper) : float := float_wrap x.
│ │ │ Definition parser (x : float) : float := x.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Syntax support

│ │ │ +

Syntax support

│ │ │ │ │ │
│ │ │
│ │ │ Module Import PrimFloatNotationsInternalA.
│ │ │ Declare Scope float_scope.
│ │ │ Delimit Scope float_scope with float.
│ │ │ Bind Scope float_scope with float.
│ │ │ End PrimFloatNotationsInternalA.
│ │ │ Number Notation float parser printer : float_scope.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Floating-point operators

│ │ │ +

Floating-point operators

│ │ │ │ │ │
│ │ │
│ │ │ Primitive classify := #float64_classify.
│ │ │ │ │ │
│ │ │ Primitive abs := #float64_abs.
│ │ │ @@ -181,15 +181,15 @@ │ │ │ Notation "x / y" := (div x y) : float_scope.
│ │ │ End PrimFloatNotationsInternalB.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Conversions

│ │ │ +

Conversions

│ │ │ │ │ │
│ │ │ │ │ │ of_uint63: convert a primitive unsigned integer into a float value. │ │ │ The value is rounded if need be. │ │ │
│ │ │
│ │ │ @@ -220,15 +220,15 @@ │ │ │
│ │ │ Primitive normfr_mantissa := #float64_normfr_mantissa.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Exponent manipulation functions

│ │ │ +

Exponent manipulation functions

│ │ │ frshiftexp: convert a float to fractional part in [0.5, 1.) │ │ │ and integer part. │ │ │
│ │ │
│ │ │ Primitive frshiftexp := #float64_frshiftexp.
│ │ │ │ │ │
│ │ │ @@ -240,15 +240,15 @@ │ │ │
│ │ │ Primitive ldshiftexp := #float64_ldshiftexp.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Predecesor/Successor functions

│ │ │ +

Predecesor/Successor functions

│ │ │ │ │ │
│ │ │ │ │ │ next_up: return the next float towards positive infinity. │ │ │
│ │ │
│ │ │ Primitive next_up := #float64_next_up.
│ │ │ @@ -262,15 +262,15 @@ │ │ │
│ │ │ Primitive next_down := #float64_next_down.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Special values (needed for pretty-printing)

│ │ │ +

Special values (needed for pretty-printing)

│ │ │ │ │ │
│ │ │
│ │ │ Definition infinity := Eval compute in div (of_uint63 1) (of_uint63 0).
│ │ │ Definition neg_infinity := Eval compute in opp infinity.
│ │ │ Definition nan := Eval compute in div (of_uint63 0) (of_uint63 0).
│ │ │ │ │ │ @@ -279,28 +279,28 @@ │ │ │ Register neg_infinity as num.float.neg_infinity.
│ │ │ Register nan as num.float.nan.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Other special values

│ │ │ +

Other special values

│ │ │ │ │ │
│ │ │
│ │ │ Definition one := Eval compute in (of_uint63 1).
│ │ │ Definition zero := Eval compute in (of_uint63 0).
│ │ │ Definition neg_zero := Eval compute in (-zero)%float.
│ │ │ Definition two := Eval compute in (of_uint63 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/libcoq-stdlib/html/Coq.Floats.SpecFloat.html │ │ │ @@ -48,24 +48,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. │ │ │
│ │ │
│ │ │ @@ -75,15 +75,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. │ │ │ │ │ │ @@ -238,15 +238,15 @@ │ │ │       end.
│ │ │   End Rounding.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Define operations

│ │ │ +

Define operations

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

Bytes

│ │ │ +

Bytes

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Require Import Coq.Init.Ltac.
│ │ │ Require Import Coq.Init.Datatypes.
│ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.Init.Datatypes.html │ │ │ @@ -53,15 +53,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 │ │ │
│ │ │
│ │ │ │ │ │ @@ -87,15 +87,15 @@ │ │ │ Register unit as core.unit.type.
│ │ │ Register tt as core.unit.tt.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

The boolean datatype

│ │ │ +

The boolean datatype

│ │ │ │ │ │
│ │ │ │ │ │ bool is the datatype of the boolean values true and false │ │ │
│ │ │
│ │ │ │ │ │ @@ -258,15 +258,15 @@ │ │ │ Register BoolSpecT as core.BoolSpec.BoolSpecT.
│ │ │ Register BoolSpecF as core.BoolSpec.BoolSpecF.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

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)) │ │ │ @@ -293,15 +293,15 @@ │ │ │ Register O as num.nat.O.
│ │ │ Register S as num.nat.S.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Container datatypes

│ │ │ +

Container datatypes

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ │ │ │
│ │ │ @@ -498,15 +498,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

The comparison datatype

│ │ │ +

The comparison datatype

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Inductive comparison : Set :=
│ │ │   | Eq : comparison
│ │ │ @@ -616,15 +616,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 │ │ │
│ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.Init.Decimal.html │ │ │ @@ -45,15 +45,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 Number Notation command. │ │ │ We represent numbers in base 10 as lists of decimal digits, │ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.Init.Hexadecimal.html │ │ │ @@ -45,15 +45,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 Number Notation command. │ │ │ We represent numbers in base 16 as lists of hexadecimal digits, │ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.Init.Logic.html │ │ │ @@ -158,16 +158,16 @@ │ │ │ 000009d0: 733d 2269 6422 2074 6974 6c65 3d22 7661 s="id" title="va │ │ │ 000009e0: 7222 3e42 3c2f 7370 616e 3e29 203a 203c r">B) : < │ │ │ 000009f0: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ 00000a00: 7469 746c 653d 2276 6172 223e 7479 7065 title="var">type │ │ │ 00000a10: 5f73 636f 7065 3c2f 7370 616e 3e2e 3c62 _scope...
.
..
.

.

Prop │ │ │ 00000a70: 6f73 6974 696f 6e61 6c20 636f 6e6e 6563 ositional connec │ │ │ 00000a80: 7469 7665 733c 2f68 313e 0a0a 3c64 6976 tives

..
.. ) │ │ │ 000115d0: 3c2f 613e 2e3c 6272 2f3e 0a0a 3c62 722f .
..
.
..
.< │ │ │ +00011600: 643d 226c 6162 3137 3322 3e3c 2f61 3e3c d="lab173">< │ │ │ 00011610: 6831 2063 6c61 7373 3d22 7365 6374 696f h1 class="sectio │ │ │ 00011620: 6e22 3e46 6972 7374 2d6f 7264 6572 2071 n">First-order q │ │ │ 00011630: 7561 6e74 6966 6965 7273 3c2f 6831 3e0a uantifiers. │ │ │ 00011640: 0a3c 6469 7620 636c 6173 733d 2270 6172 .
. │ │ │ 00011660: 0a20 3c73 7061 6e20 636c 6173 733d 2269 . univ │ │ │ 00019290: 6572 7361 6c5f 7175 616e 7469 6669 6361 ersal_quantifica │ │ │ 000192a0: 7469 6f6e 3c2f 7370 616e 3e3c 2f61 3e2e tion. │ │ │ 000192b0: 3c62 722f 3e0a 0a3c 6272 2f3e 0a3c 2f64
..
...
.

Eq │ │ │ 00019300: 7561 6c69 7479 3c2f 6831 3e0a 0a3c 6469 uality

..
.. ).
..< │ │ │ 000417d0: 6272 2f3e 0a3c 2f64 6976 3e0a 0a3c 6469 br/>.
...< │ │ │ -000417f0: 6120 6964 3d22 6c61 6232 3530 223e 3c2f a id="lab250">

Being inha │ │ │ 00041820: 6269 7465 643c 2f68 313e 0a0a 3c64 6976 bited

..
.. The │ │ │ 00041850: 2070 7265 6469 6361 7465 203c 7370 616e predicate Require Decimal Hexadecimal Number.
│ │ │ 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) │ │ │
│ │ │ @@ -67,15 +67,15 @@ │ │ │
│ │ │ Definition t := nat.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Constants

│ │ │ +

Constants

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Local Notation "0" := O.
│ │ │ Local Notation "1" := (S O).
│ │ │ @@ -86,15 +86,15 @@ │ │ │ Definition one := 1.
│ │ │ Definition two := 2.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Basic operations

│ │ │ +

Basic operations

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition succ := S.
│ │ │ │ │ │ @@ -155,15 +155,15 @@ │ │ │
│ │ │ Register sub as num.nat.sub.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Comparisons

│ │ │ +

Comparisons

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

Minimum, maximum

│ │ │ +

Minimum, maximum

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

Parity tests

│ │ │ +

Parity tests

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

Power

│ │ │ +

Power

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Fixpoint pow n m :=
│ │ │   match m with
│ │ │ @@ -264,15 +264,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
│ │ │ @@ -298,15 +298,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

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Local Notation ten := (S (S (S (S (S (S (S (S (S (S O)))))))))).
│ │ │ │ │ │ @@ -422,15 +422,15 @@ │ │ │
│ │ │ Definition to_num_int n := Number.IntDecimal (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 │ │ │ │ │ │ @@ -465,15 +465,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) │ │ │ │ │ │ @@ -487,27 +487,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... │ │ │ │ │ │ @@ -537,15 +537,15 @@ │ │ │
│ │ │ Definition sqrt n := sqrt_iter n 0 0 0.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Log2

│ │ │ +

Log2

│ │ │ │ │ │
│ │ │ │ │ │ This base-2 logarithm is linear and tail-recursive. │ │ │ │ │ │
│ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.Init.Number.html │ │ │ @@ -45,15 +45,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Decimal or Hexadecimal numbers

│ │ │ +

Decimal or Hexadecimal numbers

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Require Import Decimal Hexadecimal.
│ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.Init.Tactics.html │ │ │ @@ -51,15 +51,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 cut False. │ │ │
│ │ │
│ │ │ @@ -372,15 +372,15 @@ │ │ │ Tactic Notation "dependent" "destruction" ident(H) :=
│ │ │   fail "To use dependent destruction, 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/libcoq-stdlib/html/Coq.Init.Tauto.html │ │ │ @@ -45,15 +45,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

The tauto and intuition tactics

│ │ │ +

The tauto and intuition tactics

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Require Import Notations.
│ │ │ Require Import Ltac.
│ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.Init.Wf.html │ │ │ @@ -45,15 +45,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/libcoq-stdlib/html/Coq.Lists.List.html │ │ │ @@ -51,15 +51,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 │ │ │
│ │ │
│ │ │ @@ -143,15 +143,15 @@ │ │ │
│ │ │   Variable A : Type.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Generic facts

│ │ │ +

Generic facts

│ │ │ │ │ │
│ │ │ │ │ │ Discrimination │ │ │
│ │ │
│ │ │   Theorem nil_cons (x:A) (l:list A) : [] <> x :: l.
│ │ │ @@ -178,30 +178,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 (l : list A) (x : A) : hd_error (x::l) = Some x.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Facts about app

│ │ │ +

Facts about app

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

Facts about In

│ │ │ +

Facts about In

│ │ │ │ │ │
│ │ │ │ │ │ Characterization of In │ │ │
│ │ │
│ │ │ │ │ │ @@ -391,30 +391,30 @@ │ │ │
│ │ │ Local Ltac Tauto.intuition_solver ::= auto with 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
│ │ │ @@ -608,15 +608,15 @@ │ │ │   Lemma nth_error_nth_None (l : list A) (n : nat) (d : A) :
│ │ │     nth_error l n = None -> nth n l d = 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. │ │ │
│ │ │
│ │ │ @@ -663,15 +663,15 @@ │ │ │
│ │ │   Lemma removelast_last : forall l a, removelast (l ++ [a]) = l.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Remove

│ │ │ +

Remove

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │   Hypothesis eq_dec : forall x y : A, {x = y}+{x <> y}.
│ │ │ │ │ │ @@ -714,15 +714,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
│ │ │ @@ -777,30 +777,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
│ │ │ @@ -889,15 +889,15 @@ │ │ │
│ │ │   Lemma rev_alt : forall l, rev l = rev_append l [].
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Concatenation

│ │ │ +

Concatenation

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │   Fixpoint concat (l : list (list A)) : list A :=
│ │ │   match l with
│ │ │ @@ -918,15 +918,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}.
│ │ │ │ │ │ @@ -939,19 +939,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).
│ │ │ @@ -1031,15 +1031,15 @@ │ │ │
│ │ │ End Map.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Flat Map

│ │ │ +

Flat Map

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

Boolean operations over lists

│ │ │ +

Boolean operations over lists

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

Further filtering facts

│ │ │ +

Further filtering facts

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │   Section Filtering.
│ │ │     Variables (A : Type).
│ │ │ @@ -1456,15 +1456,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).
│ │ │ @@ -1586,19 +1586,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.
│ │ │ @@ -1634,15 +1634,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.
│ │ │ │ │ │ @@ -1724,15 +1724,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.
│ │ │ │ │ │ @@ -1903,15 +1903,15 @@ │ │ │       skipn n (map f l) = map f (skipn n l).
│ │ │ End CuttingMap.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Combining pairs of lists of possibly-different lengths

│ │ │ +

Combining pairs of lists of possibly-different lengths

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

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

│ │ │ +

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

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

Lists without redundancy

│ │ │ +

Lists without redundancy

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Section ReDun.
│ │ │ │ │ │ @@ -2131,15 +2131,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.
│ │ │ │ │ │ @@ -2195,15 +2195,15 @@ │ │ │
│ │ │ End NatSeq.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

List comparison

│ │ │ +

List comparison

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Section Compare.
│ │ │ │ │ │ @@ -2341,15 +2341,15 @@ │ │ │
│ │ │ Section Exists_Forall.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Existential and universal predicates over lists

│ │ │ +

Existential and universal predicates over lists

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │   Variable A:Type.
│ │ │ │ │ │ @@ -2857,15 +2857,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
│ │ │ @@ -2885,15 +2885,15 @@ │ │ │   | _ => idtac
│ │ │  end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Exporting hints and tactics

│ │ │ +

Exporting hints and tactics

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Global Hint Rewrite
│ │ │   rev_involutive
│ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.Lists.SetoidList.html │ │ │ @@ -49,15 +49,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/libcoq-stdlib/html/Coq.Lists.StreamMemo.html │ │ │ @@ -49,15 +49,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/libcoq-stdlib/html/Coq.Logic.ChoiceFacts.html │ │ │ @@ -46,15 +46,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. │ │ │ │ │ │
│ │ │ @@ -85,15 +85,15 @@ │ │ │
│ │ │ Set Implicit Arguments.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Definitions

│ │ │ +

Definitions

│ │ │ │ │ │
│ │ │ │ │ │ Choice, reification and description schemes │ │ │
│ │ │ │ │ │ We make them all polymorphic. Most of them have existentials as conclusion │ │ │ @@ -112,15 +112,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) │ │ │
│ │ │
│ │ │ @@ -342,15 +342,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 │ │ │
│ │ │
│ │ │ │ │ │ @@ -621,15 +621,15 @@ │ │ │ │ │ │
│ │ │ │ │ │ with no prerequisite on the non-emptiness of domains │ │ │ │ │ │
│ │ │ │ │ │ -

Table of contents

│ │ │ +

Table of contents

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │ @@ -678,15 +678,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 │ │ │ @@ -718,26 +718,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.
│ │ │ @@ -767,15 +767,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 │ │ │
│ │ │
│ │ │ │ │ │ @@ -842,15 +842,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 │ │ │
│ │ │
│ │ │ │ │ │ @@ -886,15 +886,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. │ │ │ @@ -919,19 +919,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 │ │ │
│ │ │
│ │ │ │ │ │ @@ -962,15 +962,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.
│ │ │ @@ -979,15 +979,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 │ │ │
│ │ │
│ │ │ │ │ │ @@ -1014,19 +1014,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)
│ │ │ @@ -1036,15 +1036,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)
│ │ │ @@ -1080,15 +1080,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 │ │ │ @@ -1124,15 +1124,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.
│ │ │ │ │ │ @@ -1144,27 +1144,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.
│ │ │ @@ -1177,15 +1177,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.
│ │ │ @@ -1194,15 +1194,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.
│ │ │ @@ -1227,15 +1227,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.
│ │ │ @@ -1263,27 +1263,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 │ │ │ @@ -1299,15 +1299,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 │ │ │ @@ -1323,15 +1323,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/libcoq-stdlib/html/Coq.Logic.ClassicalEpsilon.html │ │ │ @@ -129,15 +129,15 @@ │ │ │
│ │ │ Opaque epsilon.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Weaker lemmas (compatibility lemmas)

│ │ │ +

Weaker lemmas (compatibility lemmas)

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Theorem choice :
│ │ │   forall (A B : Type) (R : A->B->Prop),
│ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.Logic.ClassicalFacts.html │ │ │ @@ -110,15 +110,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) │ │ │ │ │ │ @@ -186,19 +186,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: │ │ │ │ │ │
│ │ │ │ │ │ @@ -243,15 +243,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.
│ │ │ @@ -340,15 +340,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. │ │ │ │ │ │ @@ -394,15 +394,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. │ │ │ │ │ │ @@ -566,15 +566,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 │ │ │ @@ -631,15 +631,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 │ │ │ │ │ │ @@ -653,15 +653,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. │ │ │ │ │ │ @@ -708,15 +708,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]. │ │ │ │ │ │
│ │ │ │ │ │ @@ -779,15 +779,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]. │ │ │ │ │ │ @@ -869,19 +869,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.
│ │ │ │ │ │ @@ -946,15 +946,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/libcoq-stdlib/html/Coq.Logic.Diaconescu.html │ │ │ @@ -104,15 +104,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.
│ │ │ │ │ │ @@ -200,15 +200,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 │ │ │
│ │ │
│ │ │ @@ -307,15 +307,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/libcoq-stdlib/html/Coq.Logic.EqdepFacts.html │ │ │ @@ -112,15 +112,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.
│ │ │ │ │ │ @@ -280,15 +280,15 @@ │ │ │ #[global]
│ │ │ 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.
│ │ │ │ │ │ @@ -506,15 +506,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/libcoq-stdlib/html/Coq.Logic.Eqdep_dec.html │ │ │ @@ -84,15 +84,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.
│ │ │ │ │ │ @@ -245,15 +245,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 │ │ │
│ │ │
│ │ │ │ │ │ @@ -369,15 +369,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/libcoq-stdlib/html/Coq.Logic.ExtensionalityFacts.html │ │ │ @@ -101,15 +101,15 @@ │ │ │
│ │ │ Set Implicit Arguments.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Definitions

│ │ │ +

Definitions

│ │ │ │ │ │
│ │ │ │ │ │ Being an inverse │ │ │
│ │ │
│ │ │ │ │ │ @@ -193,27 +193,27 @@ │ │ │ Local Notation BijectivityBijectiveComp := (forall A B C (f:A->B) g,
│ │ │   is_inverse f g -> is_inverse (A:=B->C) (action f) (action g)).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

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.
│ │ │ │ │ │ @@ -223,15 +223,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/libcoq-stdlib/html/Coq.Logic.FinFun.html │ │ │ @@ -45,15 +45,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/libcoq-stdlib/html/Coq.Logic.Hurkens.html │ │ │ @@ -172,15 +172,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 │ │ │ @@ -199,35 +199,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).
│ │ │ @@ -235,15 +235,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)).
│ │ │ @@ -252,54 +252,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.
│ │ │ @@ -309,28 +309,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.
│ │ │ @@ -351,15 +351,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.
│ │ │ @@ -436,15 +436,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 │ │ │ @@ -463,15 +463,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.
│ │ │
│ │ │ │ │ │ @@ -490,28 +490,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.
│ │ │ @@ -567,15 +567,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 │ │ │ @@ -586,15 +586,15 @@ │ │ │
│ │ │ Module NoRetractToModalProposition.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Monadic modality

│ │ │ +

Monadic modality

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Section Paradox.
│ │ │ │ │ │ @@ -609,15 +609,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 _ _.
│ │ │ @@ -639,15 +639,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. │ │ │
│ │ │
│ │ │ @@ -659,15 +659,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.
│ │ │ @@ -718,15 +718,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. │ │ │
│ │ │ @@ -735,15 +735,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 _ _.
│ │ │ @@ -751,15 +751,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. │ │ │
│ │ │
│ │ │ @@ -771,15 +771,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.
│ │ │ @@ -802,15 +802,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. │ │ │
│ │ │ @@ -819,15 +819,15 @@ │ │ │
│ │ │ Module NoRetractFromSmallPropositionToProp.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

The universe of propositions.

│ │ │ +

The universe of propositions.

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition NProp := { P:Prop | P -> P}.
│ │ │ Definition El : NProp -> Prop := @proj1_sig _ _.
│ │ │ @@ -835,15 +835,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.
│ │ │ @@ -851,15 +851,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.
│ │ │ @@ -882,15 +882,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. │ │ │
│ │ │
│ │ │ @@ -900,15 +900,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.
│ │ │ @@ -927,15 +927,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. │ │ │
│ │ │
│ │ │ @@ -952,29 +952,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.
│ │ │ @@ -1021,15 +1021,15 @@ │ │ │
│ │ │ End NoRetractFromTypeToProp.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

A<>Type

│ │ │ +

A<>Type

│ │ │ │ │ │
│ │ │ │ │ │ No Coq universe can be equal to one of its elements. │ │ │
│ │ │
│ │ │ │ │ │ @@ -1042,29 +1042,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. │ │ │
│ │ │ @@ -1146,15 +1146,15 @@ │ │ │
│ │ │ End TypeNeqSmallType.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Prop<>Type.

│ │ │ +

Prop<>Type.

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

Definitions

│ │ │ +

Definitions

│ │ │ │ │ │
│ │ │ │ │ │ Propositional extensionality │ │ │
│ │ │
│ │ │ │ │ │ @@ -177,19 +177,19 @@ │ │ │ Local Notation PropositionalFunctionalExtensionality :=
│ │ │   (forall (A:Type) (P Q : A -> Prop), (forall x, P x = Q x) -> P = Q).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

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.
│ │ │ │ │ │ @@ -204,27 +204,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/libcoq-stdlib/html/Coq.Logic.PropFacts.html │ │ │ @@ -45,15 +45,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/libcoq-stdlib/html/Coq.Logic.SetIsType.html │ │ │ @@ -45,15 +45,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/libcoq-stdlib/html/Coq.MSets.MSetAVL.html │ │ │ @@ -45,15 +45,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, │ │ │ │ │ │
│ │ │ @@ -87,29 +87,29 @@ │ │ │
│ │ │ 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.
│ │ │ Local Notation int := I.t.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

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. │ │ │
│ │ │ @@ -121,15 +121,15 @@ │ │ │
│ │ │ Definition t := tree.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Height of trees

│ │ │ +

Height of trees

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition height (s : t) : int :=
│ │ │   match s with
│ │ │ @@ -137,27 +137,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. │ │ │
│ │ │
│ │ │ @@ -212,15 +212,15 @@ │ │ │     else
│ │ │       create l x r.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Insertion

│ │ │ +

Insertion

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

Join

│ │ │ +

Join

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Same as bal but does not assume anything regarding heights │ │ │ of l and r. │ │ │ │ │ │ @@ -261,15 +261,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). │ │ │ @@ -285,15 +285,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. │ │ │ @@ -309,15 +309,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
│ │ │ @@ -329,15 +329,15 @@ │ │ │       end
│ │ │    end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Concatenation

│ │ │ +

Concatenation

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Same as merge but does not assume anything about heights. │ │ │ │ │ │
│ │ │ @@ -353,15 +353,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 │ │ │ @@ -393,15 +393,15 @@ │ │ │      end
    │ │ │  end.
    │ │ │ │ │ │
    │ │ │
│ │ │ │ │ │
│ │ │ -

Intersection

│ │ │ +

Intersection

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

Difference

│ │ │ +

Difference

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Fixpoint diff s1 s2 := match s1, s2 with
│ │ │  | Leaf, _ => Leaf
│ │ │ @@ -431,15 +431,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 │ │ │ @@ -462,15 +462,15 @@ │ │ │      join (union l1 l2') x1 (union r1 r2')
│ │ │  end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Filter

│ │ │ +

Filter

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Fixpoint filter (f:elt->bool) s := match s with
│ │ │   | Leaf => Leaf
│ │ │ @@ -480,15 +480,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
│ │ │ @@ -503,15 +503,15 @@ │ │ │
│ │ │ End Ops.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

MakeRaw

│ │ │ +

MakeRaw

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

Singleton set

│ │ │ +

Singleton set

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma singleton_spec : forall x y, InT y (singleton x) <-> X.eq y x.
│ │ │ │ │ │ @@ -618,15 +618,15 @@ │ │ │ #[global]
│ │ │ 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.
│ │ │ @@ -645,15 +645,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.
│ │ │ @@ -669,15 +669,15 @@ │ │ │
│ │ │ Local Open Scope Int_scope.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Join

│ │ │ +

Join

│ │ │ │ │ │
│ │ │ │ │ │ Function/Functional Scheme can't deal with internal fix. │ │ │ Let's do its job by hand: │ │ │
│ │ │
│ │ │ @@ -708,15 +708,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) <->
│ │ │ @@ -732,15 +732,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.
│ │ │ @@ -751,15 +751,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).
│ │ │ @@ -768,15 +768,15 @@ │ │ │ #[global]
│ │ │ 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.
│ │ │ @@ -787,15 +787,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).
│ │ │ @@ -819,15 +819,15 @@ │ │ │ #[global]
│ │ │ 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 >> |- _ =>
│ │ │ @@ -849,15 +849,15 @@ │ │ │ #[global]
│ │ │ 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).
│ │ │ @@ -870,15 +870,15 @@ │ │ │ #[global]
│ │ │ 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).
│ │ │ @@ -887,15 +887,15 @@ │ │ │ #[global]
│ │ │ 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 ->
│ │ │ @@ -909,15 +909,15 @@ │ │ │ #[global]
│ │ │ 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.
│ │ │ │ │ │ @@ -946,15 +946,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/libcoq-stdlib/html/Coq.MSets.MSetDecide.html │ │ │ @@ -71,15 +71,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
│ │ │ @@ -177,41 +177,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 (
│ │ │ @@ -454,28 +454,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). │ │ │
│ │ │
│ │ │ @@ -584,15 +584,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. │ │ │ @@ -664,15 +664,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. │ │ │ │ │ │
│ │ │ @@ -690,15 +690,15 @@ │ │ │
│ │ │     Global 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,
│ │ │ @@ -725,15 +725,15 @@ │ │ │     #[global]
│ │ │     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. │ │ │
│ │ │ │ │ │ @@ -808,15 +808,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 │ │ │ @@ -857,15 +857,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. │ │ │ @@ -905,15 +905,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.) │ │ │
│ │ │ @@ -947,15 +947,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 :=
│ │ │ @@ -1061,15 +1061,15 @@ │ │ │       fsetdec_body
│ │ │     end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Examples

│ │ │ +

Examples

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │   Module MSetDecideTestCases.
│ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.MSets.MSetEqProperties.html │ │ │ @@ -45,15 +45,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/libcoq-stdlib/html/Coq.MSets.MSetFacts.html │ │ │ @@ -45,15 +45,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. │ │ │ @@ -84,15 +84,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.
│ │ │ @@ -201,15 +201,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.
│ │ │ @@ -290,15 +290,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.
│ │ │ @@ -354,15 +354,15 @@ │ │ │
│ │ │ End BoolSpec.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Declarations of morphisms with respects to E.eq and Equal

│ │ │ +

Declarations of morphisms with respects to E.eq and Equal

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ #[global]
│ │ │ Instance In_m : Proper (E.eq==>Equal==>iff) In.
│ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.MSets.MSetGenTree.html │ │ │ @@ -45,15 +45,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 │ │ │ @@ -103,15 +103,15 @@ │ │ │  Parameter t : Set.
│ │ │ End InfoTyp.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Ops : the pure functions

│ │ │ +

Ops : the pure functions

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module Type Ops (X:OrderedType)(Info:InfoTyp).
│ │ │ │ │ │ @@ -125,15 +125,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.
│ │ │ │ │ │ @@ -144,15 +144,15 @@ │ │ │  | _ => false
│ │ │  end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Membership test

│ │ │ +

Membership test

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

Minimal, maximal, arbitrary elements

│ │ │ +

Minimal, maximal, arbitrary elements

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Fixpoint min_elt (t : tree) : option elt :=
│ │ │  match t with
│ │ │ @@ -197,15 +197,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
│ │ │ @@ -254,15 +254,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. │ │ │
│ │ │
│ │ │ @@ -279,15 +279,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 │ │ │ @@ -386,15 +386,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 │ │ │ @@ -445,27 +445,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)
│ │ │ @@ -475,15 +475,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'.
│ │ │ @@ -491,15 +491,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) │ │ │
│ │ │
│ │ │ @@ -569,27 +569,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.
│ │ │ @@ -688,15 +688,15 @@ │ │ │ #[global]
│ │ │ 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.
│ │ │ @@ -786,15 +786,15 @@ │ │ │    | _ => eauto with typeclass_instances
│ │ │  end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Empty set

│ │ │ +

Empty set

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma empty_spec : Empty empty.
│ │ │ │ │ │ @@ -802,39 +802,39 @@ │ │ │ #[global]
│ │ │ 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

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma min_elt_spec1 s x : min_elt s = Some x -> InT x s.
│ │ │ │ │ │ @@ -866,15 +866,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.
│ │ │ @@ -942,15 +942,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).
│ │ │ @@ -959,15 +959,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).
│ │ │ @@ -976,15 +976,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},
│ │ │ @@ -1001,15 +1001,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 │ │ │
│ │ │
│ │ │ │ │ │ @@ -1103,28 +1103,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/libcoq-stdlib/html/Coq.MSets.MSetInterface.html │ │ │ @@ -45,15 +45,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 │ │ │ @@ -314,15 +314,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. │ │ │
│ │ │ @@ -428,15 +428,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. │ │ │
│ │ │ @@ -448,15 +448,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. │ │ │
│ │ │ @@ -560,15 +560,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. │ │ │
│ │ │ @@ -583,15 +583,15 @@ │ │ │
│ │ │ Module Type S := Sets.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Some subtyping tests

│ │ │ +

Some subtyping tests

│ │ │ │ │ │
│ │ │  WSetsOn ---> WSets
│ │ │   |           |
│ │ │   |           |
│ │ │   V           V
│ │ │  SetsOn  ---> Sets
│ │ │ @@ -600,15 +600,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/libcoq-stdlib/html/Coq.MSets.MSetList.html │ │ │ @@ -45,15 +45,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Finite sets library

│ │ │ +

Finite sets library

│ │ │ │ │ │
│ │ │ │ │ │ This file proposes an implementation of the non-dependent │ │ │ interface MSetInterface.S using strictly ordered list. │ │ │
│ │ │
│ │ │ @@ -62,15 +62,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. │ │ │ @@ -90,15 +90,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
│ │ │ @@ -298,15 +298,15 @@ │ │ │
│ │ │   Include Ops X.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Proofs of set operation specifications.

│ │ │ +

Proofs of set operation specifications.

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │   Section ForNotations.
│ │ │ │ │ │ @@ -639,15 +639,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/libcoq-stdlib/html/Coq.MSets.MSetProperties.html │ │ │ @@ -45,15 +45,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, │ │ │ @@ -338,30 +338,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.
│ │ │ │ │ │ @@ -377,15 +377,15 @@ │ │ │
│ │ │   Lemma of_list_3 : forall s, of_list (to_list s) [=] s.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Fold

│ │ │ +

Fold

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │   Section Fold.
│ │ │ │ │ │ @@ -405,15 +405,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. │ │ │
│ │ │
│ │ │ @@ -511,15 +511,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: │ │ │ │ │ │ @@ -583,15 +583,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').
│ │ │ @@ -600,15 +600,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.
│ │ │ │ │ │ @@ -652,31 +652,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,
│ │ │ @@ -691,15 +691,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.
│ │ │ │ │ │ @@ -716,15 +716,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'.
│ │ │ │ │ │ @@ -736,15 +736,15 @@ │ │ │   #[global]
│ │ │   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/libcoq-stdlib/html/Coq.MSets.MSetRBT.html │ │ │ @@ -45,15 +45,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 │ │ │ │ │ │
│ │ │ @@ -149,27 +149,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. │ │ │
│ │ │ @@ -183,27 +183,27 @@ │ │ │ Local Notation Rd := (Node Red).
│ │ │ Local Notation Bk := (Node Black).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

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
│ │ │ @@ -218,15 +218,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. │ │ │
│ │ │
│ │ │ @@ -299,15 +299,15 @@ │ │ │    end
│ │ │  end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Insertion

│ │ │ +

Insertion

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

Deletion

│ │ │ +

Deletion

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Fixpoint append (l:tree) : tree -> tree :=
│ │ │  match l with
│ │ │ @@ -391,15 +391,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
│ │ │ @@ -421,15 +421,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 │ │ │
│ │ │ @@ -484,15 +484,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
│ │ │ @@ -522,15 +522,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. │ │ │
│ │ │
│ │ │ │ │ │ @@ -682,15 +682,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.
│ │ │ @@ -720,15 +720,15 @@ │ │ │ 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.
│ │ │ │ │ │ @@ -736,15 +736,15 @@ │ │ │ #[global]
│ │ │ Instance singleton_ok x : Ok (singleton x).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

makeBlack, MakeRed

│ │ │ +

makeBlack, MakeRed

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma makeBlack_spec s x : InT x (makeBlack s) <-> InT x s.
│ │ │ │ │ │ @@ -759,15 +759,15 @@ │ │ │ #[global]
│ │ │ 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.
│ │ │ @@ -884,15 +884,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.
│ │ │ @@ -930,15 +930,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.
│ │ │ @@ -963,15 +963,15 @@ │ │ │ #[global]
│ │ │ 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.
│ │ │ @@ -993,15 +993,15 @@ │ │ │
│ │ │ Global 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];
│ │ │ @@ -1046,15 +1046,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.
│ │ │ @@ -1077,15 +1077,15 @@ │ │ │ #[global]
│ │ │ 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') ->
│ │ │ @@ -1106,15 +1106,15 @@ │ │ │  | None => True
│ │ │  end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Treeify

│ │ │ +

Treeify

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

Filter

│ │ │ +

Filter

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Lemma filter_aux_elements s f acc :
│ │ │  filter_aux f s acc = List.filter f (elements s) ++ acc.
│ │ │ @@ -1184,15 +1184,15 @@ │ │ │ #[global]
│ │ │ 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 =
│ │ │ @@ -1220,15 +1220,15 @@ │ │ │ #[global]
│ │ │ 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.
│ │ │ @@ -1267,15 +1267,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).
│ │ │ @@ -1315,15 +1315,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).
│ │ │ @@ -1356,15 +1356,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).
│ │ │ @@ -1405,15 +1405,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. │ │ │ │ │ │ @@ -1428,15 +1428,15 @@ │ │ │ Local Notation Bk := (Node Black).
│ │ │ Import M.MX.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Red-Black invariants

│ │ │ +

Red-Black invariants

│ │ │ │ │ │
│ │ │ │ │ │ In a red-black tree : │ │ │
    │ │ │
  • a red node has no red children │ │ │ │ │ │ @@ -1499,15 +1499,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.
│ │ │ @@ -1534,15 +1534,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.
│ │ │ │ │ │ @@ -1560,27 +1560,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).
│ │ │ │ │ │ @@ -1588,15 +1588,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).
│ │ │ @@ -1625,15 +1625,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 │ │ │
│ │ │
│ │ │ @@ -1658,15 +1658,15 @@ │ │ │ #[global]
│ │ │ Instance add_rb x s : Rbt s -> Rbt (add x s).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Deletion

│ │ │ +

Deletion

│ │ │ │ │ │
│ │ │ │ │ │ A second approach here: statement with ... /\ ... │ │ │
│ │ │
│ │ │ │ │ │ @@ -1689,15 +1689,15 @@ │ │ │ #[global]
│ │ │ Instance remove_rb s x : Rbt s -> Rbt (remove x s).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Treeify

│ │ │ +

Treeify

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

Filtering

│ │ │ +

Filtering

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ #[global]
│ │ │ Instance filter_rb f s : Rbt (filter f s).
│ │ │ @@ -1757,15 +1757,15 @@ │ │ │ #[global]
│ │ │ Instance partition_rb2 f s : Rbt (snd (partition f s)).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Union, intersection, difference

│ │ │ +

Union, intersection, difference

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ #[global]
│ │ │ Instance fold_add_rb s1 s2 : Rbt s2 -> Rbt (fold add s1 s2).
│ │ │ @@ -1786,15 +1786,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/libcoq-stdlib/html/Coq.MSets.MSetToFiniteSet.html │ │ │ @@ -45,28 +45,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/libcoq-stdlib/html/Coq.MSets.MSetWeakList.html │ │ │ @@ -45,15 +45,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Finite sets library

│ │ │ +

Finite sets library

│ │ │ │ │ │
│ │ │ │ │ │ This file proposes an implementation of the non-dependent │ │ │ interface MSetWeakInterface.S using lists without redundancy. │ │ │
│ │ │
│ │ │ @@ -65,25 +65,25 @@ │ │ │
│ │ │ Local Ltac Tauto.intuition_solver ::= auto with typeclass_instances.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

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.
│ │ │ │ │ │ @@ -190,15 +190,15 @@ │ │ │
│ │ │ End Ops.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Proofs of set operation specifications.

│ │ │ +

Proofs of set operation specifications.

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module MakeRaw (X:DecidableType) <: WRawSets X.
│ │ │   Include Ops X.
│ │ │ @@ -422,15 +422,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/libcoq-stdlib/html/Coq.NArith.BinNat.html │ │ │ @@ -51,15 +51,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 │ │ │
│ │ │ │ │ │ @@ -891,15 +891,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 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/libcoq-stdlib/html/Coq.NArith.BinNatDef.html │ │ │ @@ -57,56 +57,56 @@ │ │ │ Local Notation "1" := (Npos 1).
│ │ │ Local Notation "2" := (Npos 2).
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

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
│ │ │ @@ -114,15 +114,15 @@ │ │ │   | pos p => pos p~1
│ │ │   end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Operation x -> 2*x

│ │ │ +

Operation x -> 2*x

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

Successor

│ │ │ +

Successor

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

Predecessor

│ │ │ +

Predecessor

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Definition pred n :=
│ │ │   match n with
│ │ │ @@ -162,15 +162,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
│ │ │ @@ -178,15 +178,15 @@ │ │ │    | pos p => Pos.succ p
│ │ │  end.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Addition

│ │ │ +

Addition

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

Conversions from N to nat

│ │ │ +

Conversions from N to nat

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

Conversions from nat to N

│ │ │ +

Conversions from nat to N

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Module Nat2N.
│ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.Numbers.AltBinNotations.html │ │ │ @@ -45,15 +45,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Alternative Binary Number Notations

│ │ │ +

Alternative Binary Number 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/libcoq-stdlib/html/Coq.Numbers.BinNums.html │ │ │ @@ -45,15 +45,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Binary Numerical Datatypes

│ │ │ +

Binary Numerical Datatypes

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

Signature and specification of bounded integers

│ │ │ +

Signature and specification of bounded integers

│ │ │ │ │ │
│ │ │ │ │ │ This file specifies d-bit integers as Z/nZ with n=2^d │ │ │
│ │ │
│ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.Numbers.Cyclic.Abstract.NZCyclic.html │ │ │ @@ -53,15 +53,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/libcoq-stdlib/html/Coq.Numbers.Cyclic.Int63.Cyclic63.html │ │ │ @@ -45,15 +45,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Uint63 numbers defines indeed a cyclic structure : Z/(2^63)Z

│ │ │ +

Uint63 numbers defines indeed a cyclic structure : Z/(2^63)Z

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

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

│ │ │ +

Uint63 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/libcoq-stdlib/html/Coq.Numbers.DecimalFacts.html │ │ │ @@ -45,15 +45,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

DecimalFacts : some facts about Decimal numbers

│ │ │ +

DecimalFacts : some facts about Decimal numbers

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Require Import Decimal Arith ZArith.
│ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.Numbers.DecimalN.html │ │ │ @@ -45,15 +45,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

DecimalN

│ │ │ +

DecimalN

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

DecimalNat

│ │ │ +

DecimalNat

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

DecimalPos

│ │ │ +

DecimalPos

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

DecimalQ

│ │ │ +

DecimalQ

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Proofs that conversions between decimal numbers and Q │ │ │ are bijections. │ │ │
│ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.Numbers.DecimalR.html │ │ │ @@ -45,15 +45,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

DecimalR

│ │ │ +

DecimalR

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Proofs that conversions between decimal numbers and R │ │ │ are bijections. │ │ │
│ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.Numbers.DecimalString.html │ │ │ @@ -48,15 +48,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/libcoq-stdlib/html/Coq.Numbers.DecimalZ.html │ │ │ @@ -45,15 +45,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

DecimalZ

│ │ │ +

DecimalZ

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

HexadecimalFacts : some facts about Hexadecimal numbers

│ │ │ +

HexadecimalFacts : some facts about Hexadecimal numbers

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Require Import Hexadecimal Arith ZArith.
│ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.Numbers.HexadecimalN.html │ │ │ @@ -45,15 +45,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

HexadecimalN

│ │ │ +

HexadecimalN

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

HexadecimalNat

│ │ │ +

HexadecimalNat

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

HexadecimalPos

│ │ │ +

HexadecimalPos

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

HexadecimalQ

│ │ │ +

HexadecimalQ

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Proofs that conversions between hexadecimal numbers and Q │ │ │ are bijections. │ │ │
│ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.Numbers.HexadecimalR.html │ │ │ @@ -45,15 +45,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

HexadecimalR

│ │ │ +

HexadecimalR

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Proofs that conversions between hexadecimal numbers and R │ │ │ are bijections. │ │ │
│ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.Numbers.HexadecimalString.html │ │ │ @@ -48,15 +48,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/libcoq-stdlib/html/Coq.Numbers.HexadecimalZ.html │ │ │ @@ -45,15 +45,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

HexadecimalZ

│ │ │ +

HexadecimalZ

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ Proofs that conversions between hexadecimal numbers and Z │ │ │ are bijections. │ │ │
│ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.Numbers.Integer.Abstract.ZBits.html │ │ │ @@ -469,15 +469,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/libcoq-stdlib/html/Coq.Numbers.Integer.Abstract.ZDivEucl.html │ │ │ @@ -51,15 +51,15 @@ │ │ │ From Coq.Numbers.Integer.Abstract Require Import ZAxioms ZMulOrder ZSgnAbs.
│ │ │ From Coq.Numbers.NatInt Require Import 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| │ │ │ │ │ │ @@ -242,15 +242,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.
│ │ │ │ │ │ @@ -278,15 +278,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. │ │ │
│ │ │
│ │ │ │ │ │ @@ -407,15 +407,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/libcoq-stdlib/html/Coq.Numbers.Integer.Abstract.ZDivFloor.html │ │ │ @@ -48,15 +48,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: │ │ │ @@ -280,15 +280,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.
│ │ │ │ │ │ @@ -316,15 +316,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. │ │ │
│ │ │
│ │ │ │ │ │ @@ -453,15 +453,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/libcoq-stdlib/html/Coq.Numbers.Integer.Abstract.ZDivTrunc.html │ │ │ @@ -48,15 +48,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: │ │ │ @@ -205,15 +205,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.
│ │ │ │ │ │ @@ -303,15 +303,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. │ │ │
│ │ │
│ │ │ │ │ │ @@ -438,15 +438,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/libcoq-stdlib/html/Coq.Numbers.Integer.Abstract.ZLcm.html │ │ │ @@ -48,15 +48,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/libcoq-stdlib/html/Coq.Numbers.Integer.Abstract.ZMaxMin.html │ │ │ @@ -48,15 +48,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/libcoq-stdlib/html/Coq.Numbers.Integer.Binary.ZBinary.html │ │ │ @@ -67,15 +67,15 @@ │ │ │  <: UsualDecidableTypeFull
│ │ │  := BinInt.Z.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

An order tactic for integers

│ │ │ +

An order tactic for integers

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Ltac z_order := Z.order.
│ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.Numbers.NaryFunctions.html │ │ │ @@ -53,15 +53,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/libcoq-stdlib/html/Coq.Numbers.NatInt.NZAdd.html │ │ │ @@ -45,15 +45,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Some properties of the addition for modules implementing NZBasicFunsSig'

│ │ │ +

Some properties of the addition for modules implementing NZBasicFunsSig'

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ This file defines the NZAddProp functor type. This functor type is meant │ │ │ to be Included in a module implementing NZBasicFunsSig'. │ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.Numbers.NatInt.NZAddOrder.html │ │ │ @@ -45,15 +45,15 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Properties of orders and addition for modules implementing NZOrdAxiomsSig'

│ │ │ +

Properties of orders and addition for modules implementing NZOrdAxiomsSig'

│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ This file defines the NZAddOrderProp functor type, meant to be Included │ │ │ in a module implementing NZOrdAxiomsSig' (see Coq.Numbers.NatInt.NZAxioms). │ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.Numbers.NatInt.NZAxioms.html │ │ │ @@ -48,15 +48,15 @@ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ Initial Author : Evgeny Makarov, INRIA, 2007 │ │ │
│ │ │ │ │ │ -

Axioms for a domain with zero, succ, pred.

│ │ │ +

Axioms for a domain with zero, succ, pred.

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ From Coq.Structures Require Export Equalities Orders.
│ │ │ │ │ │ @@ -141,15 +141,15 @@ │ │ │      forall x y : t, CompareSpec (eq x y) (lt x y) (lt y x) (compare x y).
│ │ │  End │ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ -

Axiomatization of a domain with zero, succ, pred and a bi-directional induction principle.

│ │ │ +

Axiomatization of a domain with zero, succ, pred and a bi-directional induction principle.

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │ @@ -223,15 +223,15 @@ │ │ │     A 0 -> (forall n, A n <-> A (S n)) -> forall n, A n.
│ │ │ End IsNZDomain.
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │ -

Axiomatization of some more constants

│ │ │ +

Axiomatization of some more constants

│ │ │ │ │ │
│ │ │ │ │ │ Simply denoting "1" for (S 0) and so on works ok when implementing │ │ │ by nat, but leaves some (N.succ N0) when implementing by N. │ │ │ │ │ │
│ │ │ @@ -280,15 +280,15 @@ │ │ │
  • three constants 0, 1 = S 0, 2 = S 1 │ │ │ │ │ │
  • │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ -

    Axiomatization of basic operations : + - *

    │ │ │ +

    Axiomatization of basic operations : + - *

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Module Type AddSubMul (Import T:Typ).
    │ │ │  Parameters Inline add sub mul : t -> t -> t.
    │ │ │ @@ -336,15 +336,15 @@ │ │ │ Module Type NZAxiomsSig := NZBasicFunsSig.
    │ │ │ Module Type NZAxiomsSig' := NZBasicFunsSig'.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Axiomatization of order

    │ │ │ +

    Axiomatization of order

    │ │ │ │ │ │
    │ │ │ │ │ │ The module type HasLt (resp. HasLe) is just a type equipped with │ │ │ a relation lt (resp. le) in Prop. │ │ │
    │ │ │
    │ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.Numbers.NatInt.NZBase.html │ │ │ @@ -45,15 +45,15 @@ │ │ │ │ │ │
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Basic lemmas about modules implementing NZDomainSig'

    │ │ │ +

    Basic lemmas about modules implementing NZDomainSig'

    │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ This file defines the functor type NZBaseProp which adds the following │ │ │ lemmas: │ │ │
      │ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.Numbers.NatInt.NZDiv.html │ │ │ @@ -186,15 +186,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.
    │ │ │ │ │ │ @@ -219,15 +219,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. │ │ │
    │ │ │
    │ │ │ │ │ │ @@ -331,15 +331,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/libcoq-stdlib/html/Coq.Numbers.NatInt.NZDomain.html │ │ │ @@ -74,15 +74,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. │ │ │
    │ │ │
    │ │ │ │ │ │ @@ -125,15 +125,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.
    │ │ │ │ │ │ @@ -249,15 +249,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/libcoq-stdlib/html/Coq.Numbers.NatInt.NZLog.html │ │ │ @@ -414,15 +414,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/libcoq-stdlib/html/Coq.Numbers.NatInt.NZMul.html │ │ │ @@ -45,15 +45,15 @@ │ │ │ │ │ │
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Some properties of the multiplication for modules implementing NZBasicFunsSig'

    │ │ │ +

    Some properties of the multiplication for modules implementing NZBasicFunsSig'

    │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ This file defines the NZMulProp functor type on top of NZAddProp. This │ │ │ functor type is meant to be Included in a module implementing NZBasicFunsSig'. │ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.Numbers.NatInt.NZMulOrder.html │ │ │ @@ -45,15 +45,15 @@ │ │ │ │ │ │
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Properties of orders and multiplication for modules implementing NZOrdAxiomsSig'

    │ │ │ +

    Properties of orders and multiplication for modules implementing NZOrdAxiomsSig'

    │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ This file defines the NZMulOrderProp functor type, meant to be Included │ │ │ in a module implementing NZOrdAxiomsSig' (see Coq.Numbers.NatInt.NZAxioms). │ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.Numbers.NatInt.NZOrder.html │ │ │ @@ -45,15 +45,15 @@ │ │ │ │ │ │
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Lemmas about orders for modules implementing NZOrdSig'

    │ │ │ +

    Lemmas about orders for modules implementing NZOrdSig'

    │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ This file defines the NZOrderProp functor type, meant to be Included in │ │ │ a module implementing the NZOrdSig' module type. │ │ │ │ │ │ @@ -101,19 +101,19 @@ │ │ │ Module Type NZOrderProp
    │ │ │  (Import NZ : NZOrdSig')(Import NZBase : NZBaseProp NZ).
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Basic facts about le, lt, eq and succ

    │ │ │ +

    Basic facts about le, lt, eq and succ

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

    Direct consequences of the specifications of lt and le

    │ │ │ +

    Direct consequences of the specifications of lt and le

    │ │ │ │ │ │
    │ │ │
    │ │ │ #[global]
    │ │ │ Instance le_wd : Proper (eq==>eq==>iff) le.
    │ │ │ │ │ │
    │ │ │ @@ -163,15 +163,15 @@ │ │ │
    │ │ │ Notation lt_eq_gt_cases := lt_trichotomy (only parsing).
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Asymmetry and transitivity.

    │ │ │ +

    Asymmetry and transitivity.

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Theorem lt_asymm : forall n m, n < m -> ~ m < n.
    │ │ │ │ │ │ @@ -184,15 +184,15 @@ │ │ │
    │ │ │ Theorem le_trans : forall n m p, n <= m -> m <= p -> n <= p.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Some type classes about order

    │ │ │ +

    Some type classes about order

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ #[global]
    │ │ │ Instance lt_strorder : StrictOrder lt.
    │ │ │ @@ -205,15 +205,15 @@ │ │ │ #[global]
    │ │ │ Instance le_partialorder : PartialOrder _ le.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Making the generic order tactic

    │ │ │ +

    Making the generic order tactic

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Definition lt_compat := lt_wd.
    │ │ │ Definition lt_total := lt_trichotomy.
    │ │ │ @@ -232,15 +232,15 @@ │ │ │ End Private_OrderTac.
    │ │ │ Ltac order := Private_OrderTac.Tac.order.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Some direct consequences of order

    │ │ │ +

    Some direct consequences of order

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Theorem lt_neq : forall n m, n < m -> n ~= m.
    │ │ │ │ │ │ @@ -277,15 +277,15 @@ │ │ │
    │ │ │ Theorem le_antisymm : forall n m, n <= m -> m <= n -> n == m.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    More properties of < and <= with respect to S and 0

    │ │ │ +

    More properties of < and <= with respect to S and 0

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Theorem le_succ_r : forall n m, n <= S m <-> n <= m \/ n == S m.
    │ │ │ │ │ │ @@ -333,15 +333,15 @@ │ │ │
    │ │ │ Theorem lt_1_l : forall n m, 0 < n -> n < m -> 1 < m.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    More Trichotomy, decidability and double negation elimination

    │ │ │ +

    More Trichotomy, decidability and double negation elimination

    │ │ │ │ │ │
    │ │ │ │ │ │ The following theorem is cleary redundant, but helps not to │ │ │ remember whether one has to say le_gt_cases or lt_ge_cases. │ │ │
    │ │ │
    │ │ │ @@ -444,15 +444,15 @@ │ │ │
    │ │ │ Lemma lt_succ_pred : forall z n, z < n -> S (P n) == n.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Order-based induction principles

    │ │ │ +

    Order-based induction principles

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Section WF.
    │ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.Numbers.NatInt.NZSqrt.html │ │ │ @@ -344,15 +344,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

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Local Notation "a ²" := (a*a) (at level 5, no associativity, format "a ²").
    │ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.Numbers.Natural.Abstract.NDiv.html │ │ │ @@ -154,15 +154,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.
    │ │ │ │ │ │ @@ -187,15 +187,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. │ │ │
    │ │ │
    │ │ │ │ │ │ @@ -285,15 +285,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/libcoq-stdlib/html/Coq.Numbers.Natural.Abstract.NLcm.html │ │ │ @@ -48,15 +48,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/libcoq-stdlib/html/Coq.Numbers.Natural.Abstract.NMaxMin.html │ │ │ @@ -48,15 +48,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/libcoq-stdlib/html/Coq.Numbers.Natural.Binary.NBinary.html │ │ │ @@ -55,15 +55,15 @@ │ │ │
    │ │ │ Local Open Scope N_scope.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    BinNat.N already implements NAxiomSig

    │ │ │ +

    BinNat.N already implements NAxiomSig

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Module N <: NAxiomsSig := N.
    │ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.PArith.BinPos.html │ │ │ @@ -53,15 +53,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 │ │ │ @@ -87,15 +87,15 @@ │ │ │  <: UsualDecidableTypeFull
    │ │ │  <: TotalOrder.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Definitions of operations, now in a separate file

    │ │ │ +

    Definitions of operations, now in a separate file

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

    Logical Predicates

    │ │ │ +

    Logical Predicates

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Definition eq := @Logic.eq positive.
    │ │ │ Definition eq_equiv := @eq_equivalence positive.
    │ │ │ @@ -141,50 +141,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).
    │ │ │ │ │ │ @@ -200,15 +200,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.
    │ │ │ │ │ │ @@ -221,107 +221,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.
    │ │ │ @@ -346,27 +346,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.
    │ │ │ │ │ │ @@ -378,27 +378,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) │ │ │
    │ │ │
    │ │ │ │ │ │ @@ -508,61 +508,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.
    │ │ │ @@ -571,57 +571,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.
    │ │ │ │ │ │ @@ -634,15 +634,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.
    │ │ │ │ │ │ @@ -652,30 +652,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 A B (f:A->B)(g:A->A)(h:B->B) :
    │ │ │  (forall a, f (g a) = h (f a)) -> forall p a,
    │ │ │ @@ -713,42 +713,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.
    │ │ │ @@ -787,15 +787,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.
    │ │ │ │ │ │ @@ -816,15 +816,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 │ │ │
    │ │ │
    │ │ │ │ │ │ @@ -1010,15 +1010,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. │ │ │ @@ -1043,15 +1043,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).
    │ │ │ @@ -1069,15 +1069,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.
    │ │ │ │ │ │ @@ -1087,15 +1087,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.
    │ │ │ │ │ │ @@ -1160,30 +1160,30 @@ │ │ │ #[global]
    │ │ │ 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.
    │ │ │ │ │ │ @@ -1205,30 +1205,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.
    │ │ │ │ │ │ @@ -1256,15 +1256,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.
    │ │ │ │ │ │ @@ -1274,15 +1274,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.
    │ │ │ @@ -1372,15 +1372,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.
    │ │ │ │ │ │ @@ -1390,15 +1390,15 @@ │ │ │
    │ │ │ Lemma size_le p : 2^(size p) <= p~0.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Properties of min and max

    │ │ │ +

    Properties of min and max

    │ │ │ │ │ │
    │ │ │ │ │ │ First, the specification │ │ │
    │ │ │
    │ │ │ │ │ │ @@ -1486,30 +1486,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).
    │ │ │ │ │ │ @@ -1519,15 +1519,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
    │ │ │ @@ -1545,15 +1545,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/libcoq-stdlib/html/Coq.PArith.BinPosDef.html │ │ │ @@ -45,15 +45,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 │ │ │ @@ -94,19 +94,19 @@ │ │ │
    │ │ │ Definition t := positive.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Operations over positive numbers

    │ │ │ +

    Operations over positive numbers

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

    Successor

    │ │ │ +

    Successor

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Fixpoint succ x :=
    │ │ │   match x with
    │ │ │ @@ -115,15 +115,15 @@ │ │ │     | 1 => 1~0
    │ │ │   end.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Addition

    │ │ │ +

    Addition

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Fixpoint add x y :=
    │ │ │   match x, y with
    │ │ │ @@ -154,15 +154,15 @@ │ │ │
    │ │ │ Infix "+" := add : positive_scope.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Operation x -> 2*x-1

    │ │ │ +

    Operation x -> 2*x-1

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Fixpoint pred_double x :=
    │ │ │   match x with
    │ │ │ @@ -171,15 +171,15 @@ │ │ │     | 1 => 1
    │ │ │   end.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Predecessor

    │ │ │ +

    Predecessor

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Definition pred x :=
    │ │ │   match x with
    │ │ │ @@ -188,15 +188,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
    │ │ │ @@ -205,30 +205,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
    │ │ │ @@ -237,15 +237,15 @@ │ │ │     | IsPos p => IsPos p~1
    │ │ │   end.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Operation x -> 2*x

    │ │ │ +

    Operation x -> 2*x

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Definition double_mask (x:mask) : mask :=
    │ │ │   match x with
    │ │ │ @@ -254,15 +254,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
    │ │ │ @@ -271,15 +271,15 @@ │ │ │     | 1 => IsNul
    │ │ │   end.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Predecessor with mask

    │ │ │ +

    Predecessor with mask

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Definition pred_mask (p : mask) : mask :=
    │ │ │   match p with
    │ │ │ @@ -289,15 +289,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
    │ │ │ @@ -322,15 +322,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
    │ │ │ @@ -341,15 +341,15 @@ │ │ │
    │ │ │ Infix "-" := sub : positive_scope.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Multiplication

    │ │ │ +

    Multiplication

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Fixpoint mul x y :=
    │ │ │   match x with
    │ │ │ @@ -361,15 +361,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
    │ │ │ @@ -378,30 +378,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
    │ │ │ @@ -410,15 +410,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
    │ │ │ @@ -443,15 +443,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
    │ │ │ @@ -476,15 +476,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
    │ │ │ @@ -519,15 +519,15 @@ │ │ │  | Gt => p
    │ │ │  end.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Boolean equality and comparisons

    │ │ │ +

    Boolean equality and comparisons

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Fixpoint eqb p q {struct q} :=
    │ │ │   match p, q with
    │ │ │ @@ -550,15 +550,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). │ │ │ @@ -596,15 +596,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.
    │ │ │ @@ -871,15 +871,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 :=
    │ │ │ @@ -891,15 +891,15 @@ │ │ │ │ │ │
    │ │ │ Definition to_nat (x:positive) : nat := iter_op plus x (S O).
    │ │ │ Arguments to_nat x: simpl never.
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    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. │ │ │
    │ │ │
    │ │ │ │ │ │ @@ -920,15 +920,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

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Local Notation ten := 1~0~1~0.
    │ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.PArith.POrderedType.html │ │ │ @@ -51,15 +51,15 @@ │ │ │
    │ │ │ Local Open Scope positive_scope.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    DecidableType structure for positive numbers

    │ │ │ +

    DecidableType structure for positive numbers

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Module Positive_as_DT <: UsualDecidableTypeFull := Pos.
    │ │ │ │ │ │ @@ -67,15 +67,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.
    │ │ │ │ │ │ @@ -83,15 +83,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/libcoq-stdlib/html/Coq.Program.Combinators.html │ │ │ @@ -43,15 +43,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/libcoq-stdlib/html/Coq.QArith.QArith_base.html │ │ │ @@ -51,15 +51,15 @@ │ │ │ Require Export ZArith.BinInt.
    │ │ │ 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. │ │ │
    │ │ │
    │ │ │ │ │ │ @@ -194,15 +194,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.
    │ │ │ │ │ │ @@ -286,15 +286,15 @@ │ │ │ #[global]
    │ │ │ 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: │ │ │
    │ │ │
    │ │ │ @@ -553,15 +553,15 @@ │ │ │
    │ │ │ Lemma Qmake_Qdiv a b : a#b==inject_Z a/inject_Z (Zpos b).
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Setoid compatibility results

    │ │ │ +

    Setoid compatibility results

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ #[global]
    │ │ │ Instance Qplus_comp : Proper (Qeq==>Qeq==>Qeq) Qplus.
    │ │ │ @@ -627,15 +627,15 @@ │ │ │
    │ │ │ Lemma Q_apart_0_1 : ~ 1 == 0.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Properties of Qadd

    │ │ │ +

    Properties of Qadd

    │ │ │ │ │ │
    │ │ │ │ │ │ Addition is associative: │ │ │
    │ │ │
    │ │ │ │ │ │ @@ -667,15 +667,15 @@ │ │ │
    │ │ │ Theorem Qplus_comm : forall x y, x+y == y+x.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Properties of Qopp

    │ │ │ +

    Properties of Qopp

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma Qopp_involutive : forall q, - -q == q.
    │ │ │ │ │ │ @@ -698,15 +698,15 @@ │ │ │ Lemma Qplus_inj_l (x y z: Q):
    │ │ │   z + x == z + y <-> x == y.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Properties of Qmult

    │ │ │ +

    Properties of Qmult

    │ │ │ │ │ │
    │ │ │ │ │ │ Multiplication is associative: │ │ │
    │ │ │
    │ │ │ │ │ │ @@ -780,15 +780,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.
    │ │ │ │ │ │ @@ -798,15 +798,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.
    │ │ │ │ │ │ @@ -850,19 +850,19 @@ │ │ │
    │ │ │ Lemma Qmult_inj_l (x y z: Q): ~ z == 0 -> (z * x == z * y <-> x == y).
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Reduction and construction of Q

    │ │ │ +

    Reduction and construction of Q

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

    Removal/introduction of common factor in both numerator and denominator.

    │ │ │ +

    Removal/introduction of common factor in both numerator and denominator.

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma Qreduce_l : forall (a : Z) (b z : positive),
    │ │ │   (Zpos z)*a # z*b == a#b.
    │ │ │ @@ -899,15 +899,15 @@ │ │ │ Lemma Qreduce_zero: forall (d : positive),
    │ │ │   (0#d == 0)%Q.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Construction of a new rational by multiplication with an integer or pure fraction

    │ │ │ +

    Construction of a new rational by multiplication with an integer or pure fraction

    │ │ │ │ │ │
    │ │ │ │ │ │ (or to be more precise multiplication with a rational of the form z/1 or 1/p) │ │ │
    │ │ │
    │ │ │ │ │ │ @@ -925,15 +925,15 @@ │ │ │
    │ │ │ Lemma Qmult_frac_r : forall (a:Z) (b c:positive), (a # (b * c)) == (a#b) * (1#c).
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Properties of order upon Q.

    │ │ │ +

    Properties of order upon Q.

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma Qle_refl x : x<=x.
    │ │ │ │ │ │ @@ -1039,15 +1039,15 @@ │ │ │ Hint Resolve Qle_not_lt Qlt_not_le Qnot_le_lt Qnot_lt_le
    │ │ │  Qlt_le_weak Qlt_not_eq Qle_antisym Qle_refl: qarith.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Some decidability results about orders.

    │ │ │ +

    Some decidability results about orders.

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma Q_dec : forall x y, {x<y} + {y<x} + {x==y}.
    │ │ │ │ │ │ @@ -1057,15 +1057,15 @@ │ │ │
    │ │ │ Lemma Qarchimedean : forall q : Q, { p : positive | q < Z.pos p # 1 }.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Compatibility of addition with order

    │ │ │ +

    Compatibility of addition with order

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma Qopp_le_compat : forall p q, p<=q -> -q <= -p.
    │ │ │ │ │ │ @@ -1110,15 +1110,15 @@ │ │ │ Lemma Qplus_lt_compat : forall x y z t : Q,
    │ │ │   x < y -> z < t -> x + z < y + t.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Compatibility of multiplication with order.

    │ │ │ +

    Compatibility of multiplication with order.

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma Qmult_le_compat_r : forall x y z, x <= y -> 0 <= z -> x*z <= y*z.
    │ │ │   Open Scope Z_scope.
    │ │ │ @@ -1169,15 +1169,15 @@ │ │ │
    │ │ │ Lemma Qmult_le_compat_nonneg: forall x y z t : Q, 0 <= x <= y -> 0 <= z <= t -> x * z <= y * t.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Compatibility of inversion and division with order

    │ │ │ +

    Compatibility of inversion and division with order

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma Qinv_le_0_compat : forall a, 0 <= a -> 0 <= /a.
    │ │ │ │ │ │ @@ -1220,15 +1220,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/libcoq-stdlib/html/Coq.QArith.QOrderedType.html │ │ │ @@ -51,15 +51,15 @@ │ │ │
    │ │ │ Local Open Scope Q_scope.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    DecidableType structure for rational numbers

    │ │ │ +

    DecidableType structure for rational numbers

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Module Q_as_DT <: DecidableTypeFull.
    │ │ │  Definition t := Q.
    │ │ │ @@ -89,15 +89,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.
    │ │ │ @@ -120,15 +120,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/libcoq-stdlib/html/Coq.QArith.Qcabs.html │ │ │ @@ -45,15 +45,15 @@ │ │ │ │ │ │
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    An absolute value for normalized rational numbers.

    │ │ │ +

    An absolute value for normalized rational numbers.

    │ │ │ │ │ │
    │ │ │ │ │ │ Contributed by Cédric Auger │ │ │
    │ │ │
    │ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.QArith.Qfield.html │ │ │ @@ -50,15 +50,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/libcoq-stdlib/html/Coq.QArith.Qminmax.html │ │ │ @@ -48,15 +48,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.
    │ │ │ │ │ │ @@ -97,15 +97,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/libcoq-stdlib/html/Coq.QArith.Qpower.html │ │ │ @@ -48,64 +48,64 @@ │ │ │
    │ │ │ Require Import Zpow_facts Qfield Qreduction.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Properties of Qpower_positive

    │ │ │ +

    Properties of Qpower_positive

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

    Values of Qpower_positive for specific arguments

    │ │ │ +

    Values of Qpower_positive for specific arguments

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma Qpower_positive_1 : forall n, Qpower_positive 1 n == 1.
    │ │ │ │ │ │
    │ │ │ Lemma Qpower_positive_0 : forall n, Qpower_positive 0 n == 0.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Relation of Qpower_positive to zero

    │ │ │ +

    Relation of Qpower_positive to zero

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma Qpower_not_0_positive : forall a n, ~a==0 -> ~Qpower_positive a n == 0.
    │ │ │ │ │ │
    │ │ │ Lemma Qpower_pos_positive : forall p n, 0 <= p -> 0 <= Qpower_positive p n.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Qpower_positive and multiplication, exponent subtraction

    │ │ │ +

    Qpower_positive and multiplication, exponent subtraction

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma Qmult_power_positive : forall a b n, Qpower_positive (a*b) n == (Qpower_positive a n)*(Qpower_positive b n).
    │ │ │ │ │ │
    │ │ │ Lemma Qpower_plus_positive : forall a n m, Qpower_positive a (n+m) == (Qpower_positive a n)*(Qpower_positive a m).
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Qpower_positive and inversion, division, exponent subtraction

    │ │ │ +

    Qpower_positive and inversion, division, exponent subtraction

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma Qinv_power_positive : forall a n, Qpower_positive (/a) n == /(Qpower_positive a n).
    │ │ │ │ │ │ @@ -114,28 +114,28 @@ │ │ │   (m < n)%positive ->
    │ │ │   Qpower_positive a (n-m)%positive == (Qpower_positive a n)/(Qpower_positive a m).
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Qpower and exponent multiplication

    │ │ │ +

    Qpower and exponent multiplication

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma Qpower_mult_positive : forall a n m,
    │ │ │   Qpower_positive a (n*m) == Qpower_positive (Qpower_positive a n) m.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Qpower_positive decomposition

    │ │ │ +

    Qpower_positive decomposition

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma Qpower_decomp_positive p x y :
    │ │ │   Qpower_positive (x#y) p = x ^ Zpos p # (y ^ p).
    │ │ │ @@ -143,19 +143,19 @@ │ │ │
    │ │ │ Notation Qpower_decomp := Qpower_decomp_positive (only parsing).
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Properties of Qpower

    │ │ │ +

    Properties of Qpower

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

    Values of Qpower for specific arguments

    │ │ │ +

    Values of Qpower for specific arguments

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma Qpower_0 : forall n, (n<>0)%Z -> 0^n == 0.
    │ │ │ │ │ │ @@ -170,15 +170,15 @@ │ │ │ Lemma Qpower_1_r: forall q:Q,
    │ │ │   q^1 == q.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Relation of Qpower to zero

    │ │ │ +

    Relation of Qpower to zero

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma Qpower_not_0: forall (a : Q) (z : Z),
    │ │ │   ~ a == 0 -> ~ Qpower a z == 0.
    │ │ │ @@ -192,15 +192,15 @@ │ │ │
    │ │ │ Lemma Qpower_0_lt: forall (a : Q) (z : Z), 0 < a -> 0 < Qpower a z.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Relation of Qpower to 1

    │ │ │ +

    Relation of Qpower to 1

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma Qpower_1_lt_pos:
    │ │ │   forall (q : Q) (n : positive), (1<q)%Q -> (1 < q ^ (Z.pos n))%Q.
    │ │ │ @@ -217,15 +217,15 @@ │ │ │ Lemma Qpower_1_le:
    │ │ │   forall (q : Q) (n : Z), (1<=q)%Q -> (0<=n)%Z -> (1 <= q ^ n)%Q.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Qpower and multiplication, exponent addition

    │ │ │ +

    Qpower and multiplication, exponent addition

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma Qmult_power : forall a b n, (a*b)^n == a^n*b^n.
    │ │ │ │ │ │ @@ -235,15 +235,15 @@ │ │ │
    │ │ │ Lemma Qpower_plus' : forall a n m, (n+m <> 0)%Z -> a^(n+m) == a^n*a^m.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Qpower and inversion, division, exponent subtraction

    │ │ │ +

    Qpower and inversion, division, exponent subtraction

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma Qinv_power : forall a n, (/a)^n == /a^n.
    │ │ │ │ │ │ @@ -268,27 +268,27 @@ │ │ │ Lemma Qpower_minus_neg: forall (a b : positive) (n m : Z),
    │ │ │   (Z.neg a#b) ^ (n - m) == (Z.neg a#b) ^ n * (Z.neg b#a) ^ m.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Qpower and exponent multiplication

    │ │ │ +

    Qpower and exponent multiplication

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma Qpower_mult : forall a n m, a^(n*m) == (a^n)^m.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Qpower decomposition

    │ │ │ +

    Qpower decomposition

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma Qpower_decomp_pos: forall (p : positive) (a : Z) (b : positive),
    │ │ │   (a # b) ^ (Z.pos p) == a ^ (Z.pos p) # (b ^ p)%positive.
    │ │ │ @@ -301,15 +301,15 @@ │ │ │ Lemma Qpower_decomp_neg_neg: forall (p a b: positive),
    │ │ │   (Z.neg a # b) ^ (Z.neg p) == (Z.neg b) ^ (Z.pos p) # (a ^ p)%positive.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Compatibility of Qpower with relational operators

    │ │ │ +

    Compatibility of Qpower with relational operators

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma Qpower_lt_compat_l:
    │ │ │   forall (q : Q) (n m : Z), (n < m)%Z -> (1<q)%Q -> (q ^ n < q ^ m)%Q.
    │ │ │ @@ -326,39 +326,39 @@ │ │ │ Lemma Qpower_le_compat_l_inv:
    │ │ │   forall (q : Q) (n m : Z), (q ^ n <= q ^ m)%Q -> (1<q)%Q -> (n <= m)%Z.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Qpower and inject_Z

    │ │ │ +

    Qpower and inject_Z

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma Zpower_Qpower : forall (a n:Z), (0<=n)%Z -> inject_Z (a^n) == (inject_Z a)^n.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Square

    │ │ │ +

    Square

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma Qsqr_nonneg : forall a, 0 <= a^2.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Power of 2 positive upper bound

    │ │ │ +

    Power of 2 positive upper bound

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma Qarchimedean_power2_pos : forall q : Q,
    │ │ │   {p : positive | (q < Z.pos (2^p) # 1)%Q}.
    │ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.Reals.AltSeries.html │ │ │ @@ -54,15 +54,15 @@ │ │ │ Require Import Lra.
    │ │ │ 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.
    │ │ │ │ │ │
    │ │ │ @@ -117,15 +117,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 ->
    │ │ │ @@ -139,15 +139,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/libcoq-stdlib/html/Coq.Reals.Cauchy.ConstructiveCauchyReals.html │ │ │ @@ -404,15 +404,15 @@ │ │ │   : CMorphisms.Proper
    │ │ │       (CMorphisms.respectful Qeq CRealEq) inject_Q.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Algebraic operations

    │ │ │ +

    Algebraic operations

    │ │ │ │ │ │
    │ │ │ │ │ │ We reduce the rational numbers to accelerate calculations. │ │ │
    │ │ │
    │ │ │ Definition CReal_plus_seq (x y : CReal) :=
    │ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.Reals.Cauchy.ConstructiveCauchyRealsMult.html │ │ │ @@ -5556,16 +5556,16 @@ │ │ │ 00015b30: 6976 6543 6175 6368 7952 6561 6c73 4d75 iveCauchyRealsMu │ │ │ 00015b40: 6c74 2e68 746d 6c23 783a 3130 3522 3e3c lt.html#x:105">< │ │ │ 00015b50: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ 00015b60: 7469 746c 653d 2276 6172 6961 626c 6522 title="variable" │ │ │ 00015b70: 3e78 3c2f 7370 616e 3e3c 2f61 3e2e 3c62 >x...
    .
    ..
    .

    .

    Fiel │ │ │ 00015bd0: 643c 2f68 313e 0a0a 3c2f 6469 763e 0a3c d

    ..
    .< │ │ │ 00015be0: 6469 7620 636c 6173 733d 2263 6f64 6522 div class="code" │ │ │ 00015bf0: 3e0a 0a3c 6272 2f3e 0a3c 7370 616e 2063 >..
    .Lemma< │ │ │ 00015c20: 2f73 7061 6e3e 203c 6120 6964 3d22 4352 /span> Require Import Lia.
    │ │ │ Require Import Lqa. Require Import PosExtra.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Power of 2 open and closed upper and lower bounds for q : Q

    │ │ │ +

    Power of 2 open and closed upper and lower bounds for q : Q

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Fixpoint Pos_log2floor_plus1 (p : positive) : positive :=
    │ │ │   match p with
    │ │ │ @@ -92,15 +92,15 @@ │ │ │   | 1%positive => true
    │ │ │   end.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Power of two closed upper bound q <= 2^z

    │ │ │ +

    Power of two closed upper bound q <= 2^z

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Definition Qbound_le_ZExp2 (q : Q) : Z :=
    │ │ │   match Qnum q with
    │ │ │ @@ -121,15 +121,15 @@ │ │ │ Lemma Qbound_leabs_ZExp2_spec : forall (q : Q),
    │ │ │   (Qabs q <= 2^(Qbound_leabs_ZExp2 q))%Q.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Power of two open upper bound q < 2^z and Qabs q < 2^z

    │ │ │ +

    Power of two open upper bound q < 2^z and Qabs q < 2^z

    │ │ │ │ │ │
    │ │ │ │ │ │ Compute a z such that q<2^z. │ │ │ z shall be close to as small as possible, but we need a compromise between │ │ │ the tighness of the bound and the computation speed and proof complexity. │ │ │ Looking just at the log2 of the numerator and denominator, this is a tight bound │ │ │ @@ -167,15 +167,15 @@ │ │ │ Lemma Qbound_ltabs_ZExp2_spec : forall (q : Q),
    │ │ │   (Qabs q < 2^(Qbound_ltabs_ZExp2 q))%Q.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Power of 2 open lower bounds for 2^z < q and 2^z < Qabs q

    │ │ │ +

    Power of 2 open lower bounds for 2^z < q and 2^z < Qabs q

    │ │ │ │ │ │
    │ │ │ │ │ │ Note: the -2 is required cause of the Qlt limit. │ │ │ In case q is a power of two, the lower and upper bound must be a factor of 4 apart │ │ │
    │ │ │
    │ │ │ @@ -198,15 +198,15 @@ │ │ │ Lemma Qlowbound_ltabs_ZExp2_spec : forall (q : Q) (Hqgt0 : ~ q == 0),
    │ │ │   (2^(Qlowbound_ltabs_ZExp2 q) < Qabs q)%Q.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Existential formulations of power of 2 lower and upper bounds

    │ │ │ +

    Existential formulations of power of 2 lower and upper bounds

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Definition QarchimedeanExp2_Z (q : Q)
    │ │ │   : {z : Z | (q < 2^z)%Q}
    │ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.Reals.ClassicalDedekindReals.html │ │ │ @@ -59,15 +59,15 @@ │ │ │ Require Import QExtra.
    │ │ │ Require CMorphisms.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Q Auxiliary Lemmas

    │ │ │ +

    Q Auxiliary Lemmas

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ │ │ │
    │ │ │ @@ -82,19 +82,19 @@ │ │ │ Local Lemma Qpower_2_neg_le_one : forall n : nat,
    │ │ │     (2 ^ (- Z.of_nat n) <= 1)%Q.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Dedekind cuts

    │ │ │ +

    Dedekind cuts

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

    Definition

    │ │ │ +

    Definition

    │ │ │ │ │ │
    │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ Classical Dedekind reals. With the 3 logical axioms funext, │ │ │ @@ -128,15 +128,15 @@ │ │ │      
    │ │ │      /\ (forall q:Q, f q = true -> ~(forall r:Q, Qle r q \/ f r = false)).
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Properties

    │ │ │ +

    Properties

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma isLowerCut_hprop : forall (f : Q -> bool),
    │ │ │     IsHProp (isLowerCut f).
    │ │ │ @@ -160,50 +160,50 @@ │ │ │     -> f r = false
    │ │ │     -> Qlt q r.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Classical Dedekind reals

    │ │ │ +

    Classical Dedekind reals

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

    Definition

    │ │ │ +

    Definition

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Definition DReal : Set
    │ │ │   := { f : Q -> bool | isLowerCut f }.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Induction principle

    │ │ │ +

    Induction principle

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Fixpoint DRealQlim_rec (f : Q -> bool) (low : isLowerCut f) (n p : nat) { struct p }
    │ │ │   : f (proj1_sig (lowerCutBelow f low) + (Z.of_nat p # Pos.of_nat (S n)))%Q = false
    │ │ │     -> { q : Q | f q = true /\ f (q + (1 # Pos.of_nat (S n)))%Q = false }.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Conversion to and from constructive Cauchy real CReal

    │ │ │ +

    Conversion to and from constructive Cauchy real CReal

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

    Conversion from CReal to DReal

    │ │ │ +

    Conversion from CReal to DReal

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma DRealAbstr_aux :
    │ │ │   forall x H,
    │ │ │ @@ -214,15 +214,15 @@ │ │ │
    │ │ │ Definition DRealAbstr : CReal -> DReal.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Conversion from DReal to CReal

    │ │ │ +

    Conversion from DReal to CReal

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Definition DRealQlim (x : DReal) (n : nat)
    │ │ │   : { q : Q | proj1_sig x q = true /\ proj1_sig x (q + (1# Pos.of_nat (S n)))%Q = false }.
    │ │ │ @@ -265,15 +265,15 @@ │ │ │   bound := CReal_of_DReal_bound x
    │ │ │ |}.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Order for DReal

    │ │ │ +

    Order for DReal

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Definition Rle (x y : DReal)
    │ │ │   := forall q:Q, proj1_sig x q = true -> proj1_sig y q = true.
    │ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.Reals.RIneq.html │ │ │ @@ -45,15 +45,15 @@ │ │ │ │ │ │
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Basic lemmas for the classical real numbers

    │ │ │ +

    Basic lemmas for the classical real numbers

    │ │ │ │ │ │
    │ │ │ │ │ │ This file provides several hundred basic lemmas about foundamental │ │ │ operations on R: │ │ │
      │ │ │
    • addition denoted by Rplus (notation: infix +), │ │ │ @@ -133,15 +133,15 @@ │ │ │ Local Open Scope Z_scope.
      │ │ │ Local Open Scope R_scope.
      │ │ │ │ │ │
      │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Relation between orders and equality

    │ │ │ +

    Relation between orders and equality

    │ │ │ │ │ │
    │ │ │ │ │ │ Reflexivity of the large orders │ │ │
    │ │ │
    │ │ │ │ │ │ @@ -223,31 +223,31 @@ │ │ │
    │ │ │ Lemma Rdichotomy : forall r1 r2, r1 <> r2 -> r1 < r2 \/ r1 > r2.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Strong decidable equality

    │ │ │ +

    Strong decidable equality

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma Req_dec_T : forall r1 r2:R, {r1 = r2} + {r1 <> r2}.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Relating <, >, <= and >=

    │ │ │ +

    Relating <, >, <= and >=

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

    Relating strict and large orders

    │ │ │ +

    Relating strict and large orders

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma Rlt_le : forall r1 r2, r1 < r2 -> r1 <= r2.
    │ │ │ #[global]
    │ │ │ @@ -344,15 +344,15 @@ │ │ │ #[global]
    │ │ │ Hint Immediate Req_ge_sym: real.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Asymmetry

    │ │ │ +

    Asymmetry

    │ │ │ │ │ │
    │ │ │ │ │ │ Remark: Rlt_asym is in Raxioms.v │ │ │
    │ │ │
    │ │ │ │ │ │ @@ -365,15 +365,15 @@ │ │ │
    │ │ │ #[export] Instance Rgt_Asymmetric : Asymmetric Rgt | 10 := Rgt_asym.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Antisymmetry

    │ │ │ +

    Antisymmetry

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma Rle_antisym : forall r1 r2, r1 <= r2 -> r2 <= r1 -> r1 = r2.
    │ │ │ #[global]
    │ │ │ @@ -394,15 +394,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.
    │ │ │ @@ -411,15 +411,15 @@ │ │ │ Lemma Rgt_eq_compat :
    │ │ │   forall r1 r2 r3 r4, r1 = r2 -> r2 > r4 -> r4 = r3 -> r1 > r3.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Transitivity

    │ │ │ +

    Transitivity

    │ │ │ │ │ │
    │ │ │ │ │ │ Remark: Rlt_trans is in Raxioms │ │ │
    │ │ │
    │ │ │ #[export] Instance Rlt_Transitive : Transitive Rlt | 10 := Rlt_trans.
    │ │ │ @@ -454,15 +454,15 @@ │ │ │
    │ │ │ Lemma Rgt_ge_trans : forall r1 r2 r3, r1 > r2 -> r2 >= r3 -> r1 > r3.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    (Classical) decidability with sumbool types

    │ │ │ +

    (Classical) decidability with sumbool types

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma Rlt_dec : forall r1 r2, {r1 < r2} + {~ r1 < r2}.
    │ │ │ │ │ │ @@ -505,15 +505,15 @@ │ │ │
    │ │ │ Lemma Rge_gt_or_eq_dec : forall r1 r2, r1 >= r2 -> {r1 > r2} + {r1 = r2}.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Same theorems with disjunctions instead of sumbools

    │ │ │ +

    Same theorems with disjunctions instead of sumbools

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma Private_sumbool_to_or {A B : Prop} : {A} + {B} -> A \/ B.
    │ │ │ │ │ │ @@ -559,15 +559,15 @@ │ │ │
    │ │ │ Lemma Rge_gt_or_eq : forall r1 r2, r1 >= r2 -> r1 > r2 \/ r1 = r2.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Addition

    │ │ │ +

    Addition

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma Rplus_eq_compat_l : forall r r1 r2, r1 = r2 -> r + r1 = r + r2.
    │ │ │ │ │ │ @@ -633,15 +633,15 @@ │ │ │
    │ │ │ Lemma Rplus_0_l_uniq : forall r r1, r1 + r = r -> r1 = 0.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Opposite

    │ │ │ +

    Opposite

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma Ropp_eq_compat : forall r1 r2, r1 = r2 -> - r1 = - r2.
    │ │ │ #[global]
    │ │ │ @@ -675,15 +675,15 @@ │ │ │ #[global]
    │ │ │ Hint Resolve Ropp_plus_distr: real.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Multiplication

    │ │ │ +

    Multiplication

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma Rmult_eq_compat_l : forall r r1 r2, r1 = r2 -> r * r1 = r * r2.
    │ │ │ │ │ │ @@ -791,15 +791,15 @@ │ │ │ Lemma Rmult_integral_contrapositive_currified :
    │ │ │   forall r1 r2, r1 <> 0 -> r2 <> 0 -> r1 * r2 <> 0.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Opposite and multiplication

    │ │ │ +

    Opposite and multiplication

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma Ropp_mult_distr_l : forall r1 r2, - (r1 * r2) = - r1 * r2.
    │ │ │ │ │ │ @@ -819,15 +819,15 @@ │ │ │
    │ │ │ Lemma Ropp_mult_distr_r_reverse : forall r1 r2, r1 * - r2 = - (r1 * r2).
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Subtraction

    │ │ │ +

    Subtraction

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma Rminus_def : forall r1 r2, r1 - r2 = r1 + - r2.
    │ │ │ │ │ │ @@ -931,15 +931,15 @@ │ │ │
    │ │ │ Lemma Rminus_plus_l_l : forall r r1 r2, (r + r1) - (r + r2) = r1 - r2.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Inverse

    │ │ │ +

    Inverse

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma Rinv_0 : / 0 = 0.
    │ │ │ │ │ │ @@ -985,15 +985,15 @@ │ │ │ #[global]
    │ │ │ Hint Resolve Rmult_inv_m_id_r Rmult_inv_r_id_l Rmult_inv_r_id_m: real.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Square function

    │ │ │ +

    Square function

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Definition Rsqr r : R := r * r.
    │ │ │ Notation "r ²" := (Rsqr r) (at level 1, format "r ²") : R_scope.
    │ │ │ @@ -1007,19 +1007,19 @@ │ │ │
    │ │ │ Lemma Rsqr_0_uniq : forall r, Rsqr r = 0 -> r = 0.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Order and addition

    │ │ │ +

    Order and addition

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

    Compatibility

    │ │ │ +

    Compatibility

    │ │ │ │ │ │
    │ │ │ │ │ │ Remark: Rplus_lt_compat_l is in Raxioms.v │ │ │
    │ │ │
    │ │ │ │ │ │ @@ -1112,15 +1112,15 @@ │ │ │ Lemma Rplus_eq_0 :
    │ │ │   forall r1 r2, 0 <= r1 -> 0 <= r2 -> r1 + r2 = 0 -> r1 = 0 /\ r2 = 0.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Cancellation

    │ │ │ +

    Cancellation

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma Rplus_lt_reg_l : forall r r1 r2, r + r1 < r + r2 -> r1 < r2.
    │ │ │ │ │ │ @@ -1164,15 +1164,15 @@ │ │ │ #[global]
    │ │ │ Hint Immediate Rplus_le_lt_0_neq_0: real.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Comparison of addition with left operand

    │ │ │ +

    Comparison of addition with left operand

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma Rplus_pos_gt : forall r1 r2, r2 > 0 -> r1 + r2 > r1.
    │ │ │ │ │ │ @@ -1185,15 +1185,15 @@ │ │ │
    │ │ │ Lemma Rplus_npos_le : forall r1 r2, r2 <= 0 -> r1 + r2 <= r1.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Sign of addition

    │ │ │ +

    Sign of addition

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma Rplus_pos_pos : forall r1 r2, r1 > 0 -> r2 > 0 -> r1 + r2 > 0.
    │ │ │ │ │ │ @@ -1218,19 +1218,19 @@ │ │ │
    │ │ │ Lemma Rplus_npos_neg : forall r1 r2, r1 <= 0 -> r2 < 0 -> r1 + r2 < 0.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Order and opposite

    │ │ │ +

    Order and opposite

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

    Contravariant compatibility

    │ │ │ +

    Contravariant compatibility

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma Ropp_gt_lt_contravar : forall r1 r2, r1 > r2 -> - r1 < - r2.
    │ │ │ #[global]
    │ │ │ @@ -1298,15 +1298,15 @@ │ │ │ #[global]
    │ │ │ Hint Resolve Ropp_0_ge_le_contravar: real.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Cancellation

    │ │ │ +

    Cancellation

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma Ropp_lt_cancel : forall r1 r2, - r2 < - r1 -> r1 < r2.
    │ │ │ #[global]
    │ │ │ @@ -1323,37 +1323,37 @@ │ │ │
    │ │ │ Lemma Ropp_ge_cancel : forall r1 r2, - r2 >= - r1 -> r1 >= r2.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Sign of opposite

    │ │ │ +

    Sign of opposite

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma Ropp_pos : forall r, r > 0 -> - r < 0.
    │ │ │ │ │ │
    │ │ │ Lemma Ropp_neg : forall r, r < 0 -> - r > 0.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Order and multiplication

    │ │ │ +

    Order and multiplication

    │ │ │ │ │ │
    │ │ │ │ │ │ Remark: Rmult_lt_compat_l is in Raxioms.v │ │ │
    │ │ │ │ │ │ -

    Covariant compatibility

    │ │ │ +

    Covariant compatibility

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma Rmult_lt_compat_r : forall r r1 r2, 0 < r -> r1 < r2 -> r1 * r < r2 * r.
    │ │ │ #[global]
    │ │ │ @@ -1416,15 +1416,15 @@ │ │ │   forall r1 r2 r3 r4,
    │ │ │     0 <= r1 -> 0 <= r3 -> r1 < r2 -> r3 < r4 -> r1 * r3 < r2 * r4.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Contravariant compatibility

    │ │ │ +

    Contravariant compatibility

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma Rmult_le_compat_neg_l :
    │ │ │   forall r r1 r2, r <= 0 -> r1 <= r2 -> r * r2 <= r * r1.
    │ │ │ @@ -1441,15 +1441,15 @@ │ │ │ Lemma Rmult_lt_gt_compat_neg_l :
    │ │ │   forall r r1 r2, r < 0 -> r1 < r2 -> r * r1 > r * r2.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Sign of multiplication

    │ │ │ +

    Sign of multiplication

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma Rmult_lt_0_compat : forall r1 r2, 0 < r1 -> 0 < r2 -> 0 < r1 * r2.
    │ │ │ │ │ │ @@ -1476,15 +1476,15 @@ │ │ │ Lemma Rmult_neg_cases :
    │ │ │   forall r1 r2, r1 * r2 < 0 -> (r1 > 0 /\ r2 < 0) \/ (r1 < 0 /\ r2 > 0).
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Order and square function

    │ │ │ +

    Order and square function

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma Rle_0_sqr : forall r, 0 <= Rsqr r.
    │ │ │ │ │ │ @@ -1497,15 +1497,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.
    │ │ │ #[global]
    │ │ │ @@ -1514,15 +1514,15 @@ │ │ │
    │ │ │ Lemma Rle_0_1 : 0 <= 1.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Sign of inverse

    │ │ │ +

    Sign of inverse

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma Rinv_0_lt_compat : forall r, 0 < r -> 0 < / r.
    │ │ │ #[global]
    │ │ │ @@ -1533,15 +1533,15 @@ │ │ │ #[global]
    │ │ │ Hint Resolve Rinv_lt_0_compat: real.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Cancellation in inequalities of products

    │ │ │ +

    Cancellation in inequalities of products

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma Rmult_lt_reg_l : forall r r1 r2, 0 < r -> r * r1 < r * r2 -> r1 < r2.
    │ │ │ │ │ │ @@ -1560,15 +1560,15 @@ │ │ │
    │ │ │ Lemma Rmult_le_reg_r : forall r r1 r2, 0 < r -> r1 * r <= r2 * r -> r1 <= r2.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Order and inverse

    │ │ │ +

    Order and inverse

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma Rinv_0_lt_contravar : forall r1 r2, 0 < r1 -> r1 < r2 -> / r2 < / r1.
    │ │ │ #[global]
    │ │ │ @@ -1591,30 +1591,30 @@ │ │ │ Lemma Rinv_le_contravar :
    │ │ │   forall x y, 0 < x -> x <= y -> / y <= / x.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Sign of inverse

    │ │ │ +

    Sign of inverse

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma Rinv_pos : forall r, r > 0 -> / r > 0.
    │ │ │ │ │ │
    │ │ │ Lemma Rinv_neg : forall r, r < 0 -> / r < 0.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Order and subtraction

    │ │ │ +

    Order and subtraction

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma Rlt_minus : forall r1 r2, r1 < r2 -> r1 - r2 < 0.
    │ │ │ #[global]
    │ │ │ @@ -1650,15 +1650,15 @@ │ │ │
    │ │ │ Lemma Rgt_minus_pos : forall r1 r2, 0 < r2 -> r1 > r1 - r2.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Division

    │ │ │ +

    Division

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma Rdiv_def : forall r1 r2, r1 / r2 = r1 * / r2.
    │ │ │ │ │ │ @@ -1750,15 +1750,15 @@ │ │ │
    │ │ │ Lemma Rdiv_opp_r : forall x y, x / - y = - (x / y).
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Sign of division

    │ │ │ +

    Sign of division

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma Rdiv_pos_pos : forall r1 r2, r1 > 0 -> r2 > 0 -> r1 / r2 > 0.
    │ │ │ │ │ │ @@ -1775,15 +1775,15 @@ │ │ │ Lemma Rdiv_pos_cases :
    │ │ │   forall r1 r2 : R, r1 / r2 > 0 -> r1 > 0 /\ r2 > 0 \/ r1 < 0 /\ r2 < 0.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Miscellaneous

    │ │ │ +

    Miscellaneous

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ │ │ │
    │ │ │ @@ -1829,15 +1829,15 @@ │ │ │   forall E : R -> Prop,
    │ │ │     bound E -> (exists x : R, E x) -> exists m : R, is_lub E m.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Injection from nat to R

    │ │ │ +

    Injection from nat to R

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma S_INR : forall n, INR (S n) = INR n + 1.
    │ │ │ │ │ │ @@ -1928,15 +1928,15 @@ │ │ │ #[global]
    │ │ │ Hint Resolve not_1_INR: real.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Injection from positive to R

    │ │ │ +

    Injection from positive to R

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma IPR_2_xH : IPR_2 xH = 2.
    │ │ │ │ │ │ @@ -2009,15 +2009,15 @@ │ │ │
    │ │ │ Lemma IPR_le : forall p q:positive, IPR p <= IPR q -> (p <= q)%positive.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    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.
    │ │ │ │ │ │
    │ │ │ Lemma INR_IZR_INZ : forall n:nat, INR n = IZR (Z.of_nat n).
    │ │ │ @@ -2146,15 +2146,15 @@ │ │ │ Add Field RField : Rfield
    │ │ │   (completeness Zeq_bool_IZR, morphism R_rm, constants [IZR_tac], power_tac R_power_theory [Rpow_tac]).
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Definitions of new types

    │ │ │ +

    Definitions of new types

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Record nonnegreal : Type := mknonnegreal
    │ │ │   {nonneg :> R; cond_nonneg : 0 <= nonneg}.
    │ │ │ @@ -2173,15 +2173,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.
    │ │ │ │ │ │ @@ -2189,15 +2189,15 @@ │ │ │ Definition posreal_one := mkposreal (1) (Rlt_0_1).
    │ │ │ Definition posreal_half := mkposreal (/ 2) pos_half_prf.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Compatibility

    │ │ │ +

    Compatibility

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Notation prod_neq_R0 := Rmult_integral_contrapositive_currified (only parsing).
    │ │ │ Notation minus_Rgt := Rminus_gt (only parsing).
    │ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.Reals.ROrderedType.html │ │ │ @@ -51,15 +51,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}.
    │ │ │ │ │ │ @@ -86,15 +86,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
    │ │ │ @@ -134,15 +134,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/libcoq-stdlib/html/Coq.Reals.R_Ifp.html │ │ │ @@ -58,15 +58,15 @@ │ │ │ Require Import ZArith Ztac.
    │ │ │ Local Open Scope R_scope.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Fractional part

    │ │ │ +

    Fractional part

    │ │ │ │ │ │
    │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ Definition Int_part (r:R) : Z := (up r - 1)%Z.
    │ │ │ @@ -93,15 +93,15 @@ │ │ │
    │ │ │ Lemma base_fp : forall r:R, frac_part r >= 0 /\ frac_part r < 1.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Properties

    │ │ │ +

    Properties

    │ │ │ │ │ │
    │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ Lemma base_Int_part :
    │ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.Reals.R_sqrt.html │ │ │ @@ -51,15 +51,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))
    │ │ │ @@ -192,15 +192,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/libcoq-stdlib/html/Coq.Reals.Ranalysis1.html │ │ │ @@ -53,15 +53,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.
    │ │ │ @@ -102,15 +102,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.
    │ │ │ @@ -123,15 +123,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.
    │ │ │ @@ -227,15 +227,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,
    │ │ │ @@ -267,15 +267,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}.
    │ │ │ │ │ │
    │ │ │ @@ -323,15 +323,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.
    │ │ │ │ │ │ @@ -354,15 +354,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.
    │ │ │ │ │ │
    │ │ │ @@ -372,19 +372,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.
    │ │ │ │ │ │ @@ -454,15 +454,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.
    │ │ │ │ │ │ @@ -520,15 +520,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.
    │ │ │ │ │ │ @@ -564,15 +564,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.
    │ │ │ │ │ │ @@ -634,15 +634,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.
    │ │ │ │ │ │ @@ -668,15 +668,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),
    │ │ │ @@ -696,15 +696,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/libcoq-stdlib/html/Coq.Reals.Ranalysis5.html │ │ │ @@ -59,15 +59,15 @@ │ │ │
    │ │ │ Local Ltac Tauto.intuition_solver ::= auto with rorders real.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Preliminaries lemmas

    │ │ │ +

    Preliminaries lemmas

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma f_incr_implies_g_incr_interv : forall f g:R->R, forall lb ub,
    │ │ │        lb < ub ->
    │ │ │ @@ -135,19 +135,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) ->
    │ │ │ @@ -167,15 +167,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),
    │ │ │ @@ -241,15 +241,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 (f g:R->R) (lb ub x:R)
    │ │ │       (Prf:derivable_pt f (g x)) (Prg:derivable_pt g x)
    │ │ │ @@ -317,15 +317,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/libcoq-stdlib/html/Coq.Reals.Ratan.html │ │ │ @@ -311,21 +311,21 @@ │ │ │ 00001360: 6173 733d 2269 6422 2074 6974 6c65 3d22 ass="id" title=" │ │ │ 00001370: 7661 7222 3e72 6561 6c3c 2f73 7061 6e3e var">real │ │ │ 00001380: 203c 7370 616e 2063 6c61 7373 3d22 6964 ar │ │ │ 000013a0: 6974 683c 2f73 7061 6e3e 2e3c 6272 2f3e ith.
    │ │ │ 000013b0: 0a0a 3c62 722f 3e0a 3c2f 6469 763e 0a0a ..
    .
    .. │ │ │ 000013c0: 3c64 6976 2063 6c61 7373 3d22 646f 6322
    ..

    Prelimi │ │ │ 00001400: 6e61 7269 6573 3c2f 6831 3e0a 0a3c 6469 naries

    ..
    .. │ │ │ +00001430: 6964 3d22 6c61 6232 3933 223e 3c2f 613e id="lab293"> │ │ │ 00001440: 3c68 3220 636c 6173 733d 2273 6563 7469

    Various gene │ │ │ 00001460: 7269 6320 6c65 6d6d 6173 2077 6869 6368 ric lemmas which │ │ │ 00001470: 2070 726f 6261 626c 7920 7368 6f75 6c64 probably should │ │ │ 00001480: 2067 6f20 736f 6d65 7768 6572 6520 656c go somewhere el │ │ │ 00001490: 7365 3c2f 6832 3e0a 0a3c 2f64 6976 3e0a se

    ..
    . │ │ │ 000014a0: 3c64 6976 2063 6c61 7373 3d22 636f 6465
    │ │ │ 000064f0: 5e3c 2f73 7061 6e3e 3c2f 613e 322e 3c62 ^2...
    .
    ..
    .

    .

    Prop │ │ │ 00006550: 6572 7469 6573 206f 6620 7461 6e67 656e erties of tangen │ │ │ 00006560: 743c 2f68 323e 0a0a 3c64 6976 2063 6c61 t

    ..
    │ │ │ 00006580: 3c2f 6469 763e 0a0a 3c61 2069 643d 226c
    ..

    D │ │ │ 000065b0: 6572 6976 6174 6976 6520 6f66 2074 616e erivative of tan │ │ │ 000065c0: 6765 6e74 3c2f 6833 3e0a 0a3c 2f64 6976 gent

    ..
    .
    ..
    .Lem │ │ │ @@ -1907,15 +1907,15 @@ │ │ │ 00007720: 6334 3833 3731 6430 3737 3037 223e 3c73 c48371d07707"> │ │ │ 00007750: 295e 3c2f 7370 616e 3e3c 2f61 3e32 2e3c )^2.< │ │ │ 00007760: 6272 2f3e 0a0a 3c62 722f 3e0a 3c2f 6469 br/>..
    ...
    .

    Pro │ │ │ 000077b0: 6f66 2074 6861 7420 7461 6e67 656e 7420 of that tangent │ │ │ 000077c0: 6973 2061 2062 696a 6563 7469 6f6e 3c2f is a bijection..

    .
    .. │ │ │ 000077f0: 3c62 722f 3e0a 0a3c 6272 2f3e 0a3c 7370
    ..
    . │ │ │ 0000cbf0: 7d3c 2f73 7061 6e3e 3c2f 613e 2e3c 6272 }.
    ..
    .
    │ │ │ 0000cc10: 0a0a 3c64 6976 2063 6c61 7373 3d22 646f ..
    .

    .

    Defin │ │ │ 0000cc50: 6974 696f 6e20 6f66 2061 7263 7461 6e67 ition of arctang │ │ │ 0000cc60: 656e 743c 2f68 313e 0a0a 3c64 6976 2063 ent

    ..
    ..

    Definition of a │ │ │ 0000ccc0: 7263 7461 6e67 656e 7420 6173 2074 6865 rctangent as the │ │ │ 0000ccd0: 2072 6563 6970 726f 6361 6c20 6675 6e63 reciprocal func │ │ │ 0000cce0: 7469 6f6e 206f 6620 7461 6e67 656e 7420 tion of tangent │ │ │ 0000ccf0: 616e 6420 7072 6f6f 6620 6f66 2074 6869 and proof of thi │ │ │ 0000cd00: 7320 7374 6174 7573 3c2f 6832 3e0a 0a3c s status

    ..< │ │ │ @@ -4682,16 +4682,16 @@ │ │ │ 00012490: 7373 3d22 6964 2220 7469 746c 653d 2276 ss="id" title="v │ │ │ 000124a0: 6172 6961 626c 6522 3e78 3c2f 7370 616e ariable">x)%R.
    ..
    .
    │ │ │ 000124f0: 0a0a 3c64 6976 2063 6c61 7373 3d22 646f ..
    .

    .

    Deriv │ │ │ 00012530: 6174 6976 6520 6f66 2061 7263 7461 6e67 ative of arctang │ │ │ 00012540: 656e 743c 2f68 323e 0a0a 3c2f 6469 763e ent

    ..
    │ │ │ 00012550: 0a3c 6469 7620 636c 6173 733d 2263 6f64 .
    ..
    .Lemm │ │ │ @@ -4890,15 +4890,15 @@ │ │ │ 00013190: 6331 6239 3534 3839 6430 6636 6533 6122 c1b95489d0f6e3a" │ │ │ 000131a0: 3e3c 7370 616e 2063 6c61 7373 3d22 6964 >)) │ │ │ 000131d0: 2e3c 6272 2f3e 0a0a 3c62 722f 3e0a 3c2f .
    ..
    ...
    .

    D │ │ │ 00013220: 6566 696e 6974 696f 6e20 6f66 2074 6865 efinition of the │ │ │ 00013230: 2061 7263 7461 6e67 656e 7420 6675 6e63 arctangent func │ │ │ 00013240: 7469 6f6e 2061 7320 7468 6520 7375 6d20 tion as the sum │ │ │ 00013250: 6f66 2074 6865 2061 7263 7461 6e20 706f of the arctan po │ │ │ 00013260: 7765 7220 7365 7269 6573 3c2f 6832 3e0a wer series

    . │ │ │ 00013270: 0a3c 2f64 6976 3e0a 3c64 6976 2063 6c61 .
    .
    x
    end
    .
    ..
    .
    ..
    .< │ │ │ +00017230: 643d 226c 6162 3330 3122 3e3c 2f61 3e3c d="lab301">< │ │ │ 00017240: 6832 2063 6c61 7373 3d22 7365 6374 696f h2 class="sectio │ │ │ 00017250: 6e22 3e50 726f 6f66 206f 6620 7468 6520 n">Proof of the │ │ │ 00017260: 6571 7569 7661 6c65 6e63 6520 6f66 2074 equivalence of t │ │ │ 00017270: 6865 2074 776f 2064 6566 696e 6974 696f he two definitio │ │ │ 00017280: 6e73 2062 6574 7765 656e 202d 3120 616e ns between -1 an │ │ │ 00017290: 6420 313c 2f68 323e 0a0a 3c2f 6469 763e d 1..
    │ │ │ 000172a0: 0a3c 6469 7620 636c 6173 733d 2263 6f64 .
    N).
    . │ │ │ 00023900: 0a3c 6272 2f3e 0a3c 2f64 6976 3e0a 0a3c .
    .
    ..< │ │ │ 00023910: 6469 7620 636c 6173 733d 2264 6f63 223e div class="doc"> │ │ │ -00023920: 0a3c 6120 6964 3d22 6c61 6238 3830 223e . │ │ │ +00023920: 0a3c 6120 6964 3d22 6c61 6233 3032 223e . │ │ │ 00023930: 3c2f 613e 3c68 3220 636c 6173 733d 2273

    Relation │ │ │ 00023950: 2062 6574 7765 656e 2061 7263 7461 6e67 between arctang │ │ │ 00023960: 656e 7420 616e 6420 7369 6e65 2061 6e64 ent and sine and │ │ │ 00023970: 2063 6f73 696e 653c 2f68 323e 0a0a 3c2f cosine

    ...
    ..
    .< │ │ │ @@ -9283,15 +9283,15 @@ │ │ │ 00024420: 6238 6133 6133 6335 3165 3536 3039 6135 b8a3a3c51e5609a5 │ │ │ 00024430: 3039 223e 3c73 7061 6e20 636c 6173 733d 09">..< │ │ │ 00024460: 2f61 3e29 2e3c 6272 2f3e 0a0a 3c62 722f /a>).
    ..
    .
    ..
    .< │ │ │ +00024490: 643d 226c 6162 3330 3322 3e3c 2f61 3e3c d="lab303">< │ │ │ 000244a0: 6831 2063 6c61 7373 3d22 7365 6374 696f h1 class="sectio │ │ │ 000244b0: 6e22 3e44 6566 696e 6974 696f 6e20 6f66 n">Definition of │ │ │ 000244c0: 2061 7263 7369 6e65 2062 6173 6564 206f arcsine based o │ │ │ 000244d0: 6e20 6172 6374 616e 6765 6e74 3c2f 6831 n arctangent..
    .. asin is defi │ │ │ @@ -9459,15 +9459,15 @@ │ │ │ 00024f20: 3664 6232 3762 3861 3361 3363 3531 6535 6db27b8a3a3c51e5 │ │ │ 00024f30: 3630 3961 3530 3922 3e3c 7370 616e 2063 609a509">..
    )).
    │ │ │ 00024f70: 0a0a 3c62 722f 3e0a 3c2f 6469 763e 0a0a ..
    .
    .. │ │ │ 00024f80: 3c64 6976 2063 6c61 7373 3d22 646f 6322
    ..

    Relatio │ │ │ 00024fc0: 6e20 6265 7477 6565 6e20 6172 6373 696e n between arcsin │ │ │ 00024fd0: 2061 6e64 2061 7263 7461 6e67 656e 743c and arctangent< │ │ │ 00024fe0: 2f68 323e 0a0a 3c2f 6469 763e 0a3c 6469 /h2>..

    .. │ │ │ 00025000: 0a3c 6272 2f3e 0a3c 7370 616e 2063 6c61 .
    ...< │ │ │ 00025760: 2f73 7061 6e3e 3c2f 613e 2929 2e3c 6272 /span>)).
    ..
    .
    │ │ │ 00025780: 0a0a 3c64 6976 2063 6c61 7373 3d22 646f ..
    .

    .

    arcsi │ │ │ 000257c0: 6e65 206f 6620 7370 6563 6966 6963 2076 ne of specific v │ │ │ 000257d0: 616c 7565 733c 2f68 323e 0a0a 3c2f 6469 alues

    ...
    ..
    .Le │ │ │ @@ -9779,16 +9779,16 @@ │ │ │ 00026320: 663d 2243 6f71 2e52 6561 6c73 2e52 6174 f="Coq.Reals.Rat │ │ │ 00026330: 616e 2e68 746d 6c23 783a 3333 3522 3e3c an.html#x:335">< │ │ │ 00026340: 7370 616e 2063 6c61 7373 3d22 6964 2220 span class="id" │ │ │ 00026350: 7469 746c 653d 2276 6172 6961 626c 6522 title="variable" │ │ │ 00026360: 3e78 3c2f 7370 616e 3e3c 2f61 3e2e 3c62 >x...
    .
    ..
    .

    .

    Boun │ │ │ 000263c0: 6473 206f 6620 6172 6373 696e 653c 2f68 ds of arcsine..

    .
    ..< │ │ │ 000263f0: 6272 2f3e 0a3c 7370 616e 2063 6c61 7373 br/>.Lemma/2.
    . │ │ │ 00027250: 0a3c 6272 2f3e 0a3c 2f64 6976 3e0a 0a3c .
    .
    ..< │ │ │ 00027260: 6469 7620 636c 6173 733d 2264 6f63 223e div class="doc"> │ │ │ -00027270: 0a3c 6120 6964 3d22 6c61 6238 3835 223e . │ │ │ +00027270: 0a3c 6120 6964 3d22 6c61 6233 3037 223e . │ │ │ 00027280: 3c2f 613e 3c68 3220 636c 6173 733d 2273

    arcsine │ │ │ 000272a0: 6973 2074 6865 206c 6566 7420 616e 6420 is the left and │ │ │ 000272b0: 7269 6768 7420 696e 7665 7273 6520 6f66 right inverse of │ │ │ 000272c0: 2073 696e 653c 2f68 323e 0a0a 3c2f 6469 sine

    ...
    ..
    .x. │ │ │ 00028000: 3c62 722f 3e0a 0a3c 6272 2f3e 0a3c 2f64
    ..
    ...
    .

    Re │ │ │ 00028050: 6c61 7469 6f6e 2062 6574 7765 656e 2061 lation between a │ │ │ 00028060: 7263 7369 6e2c 2063 6f73 696e 6520 616e rcsin, cosine an │ │ │ 00028070: 6420 7461 6e67 656e 743c 2f68 323e 0a0a d tangent

    .. │ │ │ 00028080: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    ..
    │ │ │ 000280a0: 0a3c 7370 616e 2063 6c61 7373 3d22 6964 . │ │ │ 00028e70: 3c73 7061 6e20 636c 6173 733d 2269 6422 ..) │ │ │ 00028ea0: 2e3c 6272 2f3e 0a0a 3c62 722f 3e0a 3c2f .
    ..
    ...
    .

    D │ │ │ 00028ef0: 6572 6976 6174 6976 6520 6f66 2061 7263 erivative of arc │ │ │ 00028f00: 7369 6e65 3c2f 6832 3e0a 0a3c 2f64 6976 sine

    ..
    .
    ..
    .Lem │ │ │ @@ -10693,15 +10693,15 @@ │ │ │ 00029c40: 3664 6232 3762 3861 3361 3363 3531 6535 6db27b8a3a3c51e5 │ │ │ 00029c50: 3630 3961 3530 3922 3e3c 7370 616e 2063 609a509">..).
    . │ │ │ 00029c90: 0a3c 6272 2f3e 0a3c 2f64 6976 3e0a 0a3c .
    .
    ..< │ │ │ 00029ca0: 6469 7620 636c 6173 733d 2264 6f63 223e div class="doc"> │ │ │ -00029cb0: 0a3c 6120 6964 3d22 6c61 6238 3838 223e . │ │ │ +00029cb0: 0a3c 6120 6964 3d22 6c61 6233 3130 223e . │ │ │ 00029cc0: 3c2f 613e 3c68 3120 636c 6173 733d 2273

    Definiti │ │ │ 00029ce0: 6f6e 206f 6620 6172 6363 6f73 696e 6520 on of arccosine │ │ │ 00029cf0: 6261 7365 6420 6f6e 2061 7263 7461 6e67 based on arctang │ │ │ 00029d00: 656e 743c 2f68 313e 0a0a 3c64 6976 2063 ent

    ..
    .. acos │ │ │ @@ -10847,15 +10847,15 @@ │ │ │ 0002a5e0: 3762 3861 3361 3363 3531 6535 3630 3961 7b8a3a3c51e5609a │ │ │ 0002a5f0: 3530 3922 3e3c 7370 616e 2063 6c61 7373 509">.. │ │ │ 0002a620: 3c2f 613e 2929 2e3c 6272 2f3e 0a0a 3c62 )).
    ...
    ..
    .

    Relation be │ │ │ 0002a680: 7477 6565 6e20 6172 6363 6f73 696e 652c tween arccosine, │ │ │ 0002a690: 2061 7263 7369 6e65 2061 6e64 2061 7263 arcsine and arc │ │ │ 0002a6a0: 7461 6e67 656e 743c 2f68 323e 0a0a 3c2f tangent

    ...
    ..
    .< │ │ │ @@ -11177,15 +11177,15 @@ │ │ │ 0002ba80: 436f 712e 5265 616c 732e 5261 7461 6e2e Coq.Reals.Ratan. │ │ │ 0002ba90: 6874 6d6c 2378 3a33 3438 223e 3c73 7061 html#x:348">x< │ │ │ 0002bac0: 2f73 7061 6e3e 3c2f 613e 2e3c 6272 2f3e /span>.
    │ │ │ 0002bad0: 0a0a 3c62 722f 3e0a 3c2f 6469 763e 0a0a ..
    .
    .. │ │ │ 0002bae0: 3c64 6976 2063 6c61 7373 3d22 646f 6322
    ..

    arccosi │ │ │ 0002bb20: 6e65 206f 6620 7370 6563 6966 6963 2076 ne of specific v │ │ │ 0002bb30: 616c 7565 733c 2f68 323e 0a0a 3c2f 6469 alues

    ...
    ..
    ./ │ │ │ 0002c730: 342e 3c62 722f 3e0a 0a3c 6272 2f3e 0a3c 4.
    ..
    .< │ │ │ 0002c740: 2f64 6976 3e0a 0a3c 6469 7620 636c 6173 /div>..
    .

    │ │ │ 0002c780: 426f 756e 6473 206f 6620 6172 6363 6f73 Bounds of arccos │ │ │ 0002c790: 696e 653c 2f68 323e 0a0a 3c2f 6469 763e ine

    ..
    │ │ │ 0002c7a0: 0a3c 6469 7620 636c 6173 733d 2263 6f64 .
    ..
    .Lemm │ │ │ @@ -11525,16 +11525,16 @@ │ │ │ 0002d040: 2243 6f71 2e52 6561 6c73 2e52 7472 6967 "Coq.Reals.Rtrig │ │ │ 0002d050: 6f31 2e68 746d 6c23 5049 223e 3c73 7061 o1.html#PI"> │ │ │ 0002d080: 5049 3c2f 7370 616e 3e3c 2f61 3e2e 3c62 PI...
    .
    ..
    .

    .

    arcc │ │ │ 0002d0e0: 6f73 696e 6520 6973 2074 6865 206c 6566 osine is the lef │ │ │ 0002d0f0: 7420 616e 6420 7269 6768 7420 696e 7665 t and right inve │ │ │ 0002d100: 7273 6520 6f66 2063 6f73 696e 653c 2f68 rse of cosine..

    .
    ..< │ │ │ 0002d130: 6272 2f3e 0a3c 7370 616e 2063 6c61 7373 br/>.x.
    .. │ │ │ 0002dc00: 3c62 722f 3e0a 3c2f 6469 763e 0a0a 3c64
    .
    ... │ │ │ -0002dc20: 3c61 2069 643d 226c 6162 3839 3322 3e3c < │ │ │ +0002dc20: 3c61 2069 643d 226c 6162 3331 3522 3e3c < │ │ │ 0002dc30: 2f61 3e3c 6832 2063 6c61 7373 3d22 7365 /a>

    Relation │ │ │ 0002dc50: 6265 7477 6565 6e20 6172 6363 6f73 696e between arccosin │ │ │ 0002dc60: 652c 2073 696e 6520 616e 6420 7461 6e67 e, sine and tang │ │ │ 0002dc70: 656e 743c 2f68 323e 0a0a 3c2f 6469 763e ent

    ..
    │ │ │ 0002dc80: 0a3c 6469 7620 636c 6173 733d 2263 6f64 .
    ..
    .x< │ │ │ 0002ea90: 2f73 7061 6e3e 3c2f 613e 2e3c 6272 2f3e /span>
    .
    │ │ │ 0002eaa0: 0a0a 3c62 722f 3e0a 3c2f 6469 763e 0a0a ..
    .
    .. │ │ │ 0002eab0: 3c64 6976 2063 6c61 7373 3d22 646f 6322
    ..

    Derivat │ │ │ 0002eaf0: 6976 6520 6f66 2061 7263 636f 7369 6e65 ive of arccosine │ │ │ 0002eb00: 3c2f 6832 3e0a 0a3c 2f64 6976 3e0a 3c64

    ..
    . │ │ │ 0002eb20: 0a0a 3c62 722f 3e0a 3c73 7061 6e20 636c ..
    .Require Export Rdefinitions.
    │ │ │ Local Open Scope R_scope.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Field operations

    │ │ │ +

    Field operations

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

    Addition

    │ │ │ +

    Addition

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Open Scope CReal_scope.
    │ │ │ │ │ │ @@ -137,15 +137,15 @@ │ │ │ #[global]
    │ │ │ Hint Resolve Rplus_0_l: real.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Multiplication

    │ │ │ +

    Multiplication

    │ │ │ │ │ │
    │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ Lemma Rmult_comm : forall r1 r2:R, r1 * r2 = r2 * r1.
    │ │ │ @@ -172,15 +172,15 @@ │ │ │ #[global]
    │ │ │ Hint Resolve R1_neq_R0: real.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Distributivity

    │ │ │ +

    Distributivity

    │ │ │ │ │ │
    │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ Lemma
    │ │ │ @@ -188,19 +188,19 @@ │ │ │ #[global]
    │ │ │ Hint Resolve Rmult_plus_distr_l: real.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Order

    │ │ │ +

    Order

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

    Lower

    │ │ │ +

    Lower

    │ │ │ │ │ │
    │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ Lemma Rlt_asym : forall r1 r2:R, r1 < r2 -> ~ r2 < r1.
    │ │ │ @@ -218,15 +218,15 @@ │ │ │ #[global]
    │ │ │ 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 :=
    │ │ │ @@ -237,15 +237,15 @@ │ │ │   end.
    │ │ │ Arguments INR n%_nat.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    R Archimedean

    │ │ │ +

    R Archimedean

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma Rrepr_INR : forall n : nat,
    │ │ │     CRealEq (Rrepr (INR n)) (inject_Z (Z.of_nat n)).
    │ │ │ @@ -265,15 +265,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/libcoq-stdlib/html/Coq.Reals.Rbasic_fun.html │ │ │ @@ -61,15 +61,15 @@ │ │ │
    │ │ │ Implicit Type r : R.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Rmin

    │ │ │ +

    Rmin

    │ │ │ │ │ │
    │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ Definition Rmin (x y:R) : R :=
    │ │ │ @@ -127,15 +127,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 :=
    │ │ │ @@ -199,15 +199,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/libcoq-stdlib/html/Coq.Reals.Rdefinitions.html │ │ │ @@ -174,15 +174,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
    │ │ │ @@ -262,15 +262,15 @@ │ │ │
    │ │ │ Definition Q2R (x : Q) : R := (IZR (Qnum x) * / IZR (QDen x))%R.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Number notation for constants

    │ │ │ +

    Number notation for constants

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Inductive IR :=
    │ │ │   | IRZ : IZ -> IR
    │ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.Reals.Rfunctions.html │ │ │ @@ -70,15 +70,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.
    │ │ │ @@ -87,15 +87,15 @@ │ │ │ Lemma simpl_fact :
    │ │ │   forall n:nat, / INR (fact (S n)) * / / INR (fact n) = / INR (S n).
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Power

    │ │ │ +

    Power

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Infix "^" := pow : R_scope.
    │ │ │ │ │ │ @@ -226,15 +226,15 @@ │ │ │
    │ │ │ Lemma Rsqr_pow2 : forall x, Rsqr x = x ^ 2.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    PowerRZ

    │ │ │ +

    PowerRZ

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Section PowerRZ.
    │ │ │ │ │ │ @@ -375,15 +375,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
    │ │ │ @@ -399,15 +399,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)
    │ │ │ @@ -427,15 +427,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 Rdist (x y:R) : R := Rabs (x - y).
    │ │ │ @@ -473,15 +473,15 @@ │ │ │ Notation R_dist_plus := Rdist_plus (only parsing).
    │ │ │ Notation R_dist_mult_l := Rdist_mult_l (only parsing).
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Infinite Sum

    │ │ │ +

    Infinite Sum

    │ │ │ │ │ │
    │ │ │
    │ │ │ Definition infinite_sum (s:nat -> R) (l:R) : Prop :=
    │ │ │   forall eps:R,
    │ │ │     eps > 0 ->
    │ │ │     exists N : nat,
    │ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.Reals.Rgeom.html │ │ │ @@ -53,15 +53,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)).
    │ │ │ @@ -87,15 +87,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.
    │ │ │ @@ -109,15 +109,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.
    │ │ │ @@ -143,15 +143,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/libcoq-stdlib/html/Coq.Reals.RiemannInt_SF.html │ │ │ @@ -58,15 +58,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).
    │ │ │ @@ -80,15 +80,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.
    │ │ │ @@ -120,15 +120,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}.
    │ │ │ │ │ │
    │ │ │ @@ -152,29 +152,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/libcoq-stdlib/html/Coq.Reals.Rlimit.html │ │ │ @@ -59,15 +59,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.
    │ │ │ @@ -97,15 +97,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 :=
    │ │ │ @@ -116,15 +116,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')
    │ │ │ @@ -135,15 +135,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 :=
    │ │ │ @@ -151,15 +151,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/libcoq-stdlib/html/Coq.Reals.Rlogic.html │ │ │ @@ -71,15 +71,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. │ │ │
    │ │ │
    │ │ │ @@ -97,15 +97,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 │ │ │ @@ -117,15 +117,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/libcoq-stdlib/html/Coq.Reals.Rminmax.html │ │ │ @@ -51,15 +51,15 @@ │ │ │
    │ │ │ Local Ltac Tauto.intuition_solver ::= auto with real.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Maximum and Minimum of two real numbers

    │ │ │ +

    Maximum and Minimum of two real numbers

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Local Open Scope R_scope.
    │ │ │ │ │ │ @@ -108,15 +108,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/libcoq-stdlib/html/Coq.Reals.Rpower.html │ │ │ @@ -72,15 +72,15 @@ │ │ │
    │ │ │ Lemma exp_le_3 : exp 1 <= 3.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Properties of Exp

    │ │ │ +

    Properties of Exp

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma exp_neq_0 : forall x:R, exp x <> 0.
    │ │ │ │ │ │ @@ -125,15 +125,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.
    │ │ │ │ │ │ @@ -165,27 +165,27 @@ │ │ │ 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 │ │ │ @@ -244,15 +244,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/libcoq-stdlib/html/Coq.Reals.Rseries.html │ │ │ @@ -54,15 +54,15 @@ │ │ │
    │ │ │ Implicit Type r : R.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Definition of sequence and properties

    │ │ │ +

    Definition of sequence and properties

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Section sequence.
    │ │ │ │ │ │ @@ -126,15 +126,15 @@ │ │ │
    │ │ │ End sequence.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Definition of Power Series and properties

    │ │ │ +

    Definition of Power Series and properties

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Section Isequence.
    │ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.Reals.Rtopology.html │ │ │ @@ -55,15 +55,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.
    │ │ │ @@ -303,15 +303,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),
    │ │ │ @@ -376,15 +376,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/libcoq-stdlib/html/Coq.Reals.Rtrigo1.html │ │ │ @@ -160,15 +160,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.
    │ │ │ │ │ │ @@ -254,15 +254,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.
    │ │ │ @@ -288,15 +288,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/libcoq-stdlib/html/Coq.Reals.Rtrigo_def.html │ │ │ @@ -50,15 +50,15 @@ │ │ │ Require Import Lra Lia.
    │ │ │ 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.
    │ │ │ │ │ │
    │ │ │ @@ -76,15 +76,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.
    │ │ │ │ │ │ @@ -150,15 +150,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/libcoq-stdlib/html/Coq.Reals.Rtrigo_facts.html │ │ │ @@ -57,15 +57,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.
    │ │ │ @@ -74,19 +74,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).
    │ │ │ @@ -111,15 +111,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).
    │ │ │ @@ -144,15 +144,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).
    │ │ │ @@ -161,15 +161,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/libcoq-stdlib/html/Coq.Relations.Operators_Properties.html │ │ │ @@ -45,16 +45,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.
    │ │ │ @@ -177,20 +177,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/libcoq-stdlib/html/Coq.Relations.Relation_Operators.html │ │ │ @@ -45,34 +45,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.
    │ │ │ @@ -120,15 +120,15 @@ │ │ │
    │ │ │ End Transitive_Closure.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Reflexive closure

    │ │ │ +

    Reflexive closure

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Section Reflexive_Closure.
    │ │ │   Variable A : Type.
    │ │ │ @@ -150,15 +150,15 @@ │ │ │
    │ │ │ End Reflexive_Closure.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Reflexive-transitive closure

    │ │ │ +

    Reflexive-transitive closure

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Section Reflexive_Transitive_Closure.
    │ │ │   Variable A : Type.
    │ │ │ @@ -210,15 +210,15 @@ │ │ │
    │ │ │ End Reflexive_Transitive_Closure.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Reflexive-symmetric-transitive closure

    │ │ │ +

    Reflexive-symmetric-transitive closure

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Section Reflexive_Symmetric_Transitive_Closure.
    │ │ │   Variable A : Type.
    │ │ │ @@ -272,15 +272,15 @@ │ │ │
    │ │ │ End Reflexive_Symmetric_Transitive_Closure.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Converse of a relation

    │ │ │ +

    Converse of a relation

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Section Converse.
    │ │ │   Variable A : Type.
    │ │ │ @@ -290,15 +290,15 @@ │ │ │   Definition transp (x y:A) := R y x.
    │ │ │ End Converse.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Union of relations

    │ │ │ +

    Union of relations

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Section Union.
    │ │ │   Variable A : Type.
    │ │ │ @@ -308,15 +308,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.
    │ │ │ @@ -332,15 +332,15 @@ │ │ │
    │ │ │ End Disjoint_Union.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Lexicographic order on dependent pairs

    │ │ │ +

    Lexicographic order on dependent pairs

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Section Lexicographic_Product.
    │ │ │ │ │ │ @@ -365,15 +365,15 @@ │ │ │
    │ │ │ End Lexicographic_Product.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Lexicographic order on pairs

    │ │ │ +

    Lexicographic order on pairs

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Section Simple_Lexicographic_Product.
    │ │ │ │ │ │ @@ -400,15 +400,15 @@ │ │ │
    │ │ │ End Simple_Lexicographic_Product.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Product of relations

    │ │ │ +

    Product of relations

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Section Symmetric_Product.
    │ │ │   Variable A : Type.
    │ │ │ @@ -426,15 +426,15 @@ │ │ │
    │ │ │ End Symmetric_Product.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Multiset of two relations

    │ │ │ +

    Multiset of two relations

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Section Swap.
    │ │ │   Variable A : Type.
    │ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.Sorting.CPermutation.html │ │ │ @@ -45,15 +45,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/libcoq-stdlib/html/Coq.Sorting.Heap.html │ │ │ @@ -70,19 +70,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.
    │ │ │ @@ -139,15 +139,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
    │ │ │ @@ -191,15 +191,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 :
    │ │ │ @@ -223,15 +223,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 │ │ │ @@ -259,19 +259,19 @@ │ │ │   #[deprecated(since="8.3", note="Use mergesort.v")]
    │ │ │   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 :
    │ │ │ @@ -285,15 +285,15 @@ │ │ │   #[deprecated(since="8.3", note="Use mergesort.v")]
    │ │ │   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 :
    │ │ │ @@ -305,15 +305,15 @@ │ │ │   #[deprecated(since="8.3", note="Use mergesort.v")]
    │ │ │   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 :
    │ │ │ @@ -326,15 +326,15 @@ │ │ │   #[deprecated(since="8.3", note="Use mergesort.v")]
    │ │ │   Lemma heap_to_list : forall T:Tree, is_heap T -> flat_spec T.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Specification of treesort

    │ │ │ +

    Specification of treesort

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │   #[deprecated(since="8.3", note="Use mergesort.v")]
    │ │ │   Theorem treesort :
    │ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.Sorting.PermutSetoid.html │ │ │ @@ -85,15 +85,15 @@ │ │ │
    │ │ │ Section Permut.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    From lists to multisets

    │ │ │ +

    From lists to multisets

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Variable A : Type.
    │ │ │ Variable eqA : relation A.
    │ │ │ @@ -124,15 +124,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).
    │ │ │ │ │ │ @@ -198,15 +198,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/libcoq-stdlib/html/Coq.Sorting.Permutation.html │ │ │ @@ -45,15 +45,15 @@ │ │ │ │ │ │
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    List permutations as a composition of adjacent transpositions

    │ │ │ +

    List permutations as a composition of adjacent transpositions

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ │ │ │
    │ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.Strings.PString.html │ │ │ @@ -124,15 +124,15 @@ │ │ │   to_Z (length s1) + to_Z (length s2) <= to_Z max_length ->
    │ │ │   to_list (cat s1 s2) = to_list s1 ++ to_list s2.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Properties of string length

    │ │ │ +

    Properties of string length

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma valid_length (s : string) :
    │ │ │   to_Z (length s) <= to_Z max_length.
    │ │ │ @@ -165,15 +165,15 @@ │ │ │   to_Z (length s1) + to_Z (length s2) <= to_Z max_length ->
    │ │ │   length (cat s1 s2) = (length s1 + length s2)%uint63.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Properties of string get

    │ │ │ +

    Properties of string get

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma get_char63_valid (s : string) (i : int) :
    │ │ │   char63_valid (get s i).
    │ │ │ @@ -208,15 +208,15 @@ │ │ │   to_Z i < to_Z max_length ->
    │ │ │   get (cat s1 s2) i = get s2 (i - length s1).
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Properties of string comparison

    │ │ │ +

    Properties of string comparison

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma char63_compare_refl (c1 c2 : char63) :
    │ │ │   char63_compare c1 c2 = Eq <-> c1 = c2.
    │ │ │ @@ -289,27 +289,27 @@ │ │ │       to_Z i < to_Z (length s2) /\
    │ │ │       char63_compare (get s1 i) (get s2 i) = Lt)).
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Properties of make

    │ │ │ +

    Properties of make

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma make_0 (c : char63) : make 0 c = ""%pstring.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Properties of cat

    │ │ │ +

    Properties of cat

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma length_0_empty (s : string) : length s = 0%uint63 -> s = ""%pstring.
    │ │ │ │ │ │ @@ -323,15 +323,15 @@ │ │ │ Lemma cat_assoc (s1 s2 s3 : string) :
    │ │ │   cat (cat s1 s2) s3 = cat s1 (cat s2 s3).
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Properties of sub

    │ │ │ +

    Properties of sub

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma sub_full (s : string) : sub s 0 (length s) = s.
    │ │ │ │ │ │ @@ -371,15 +371,15 @@ │ │ │   (to_Z (length s1) + to_Z (length s2) <= to_Z max_length)%Z ->
    │ │ │   to_list (cat s1 s2) = app (to_list s1) (to_list s2).
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Ordered type

    │ │ │ +

    Ordered type

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Require OrderedType.
    │ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.Strings.PrimStringAxioms.html │ │ │ @@ -52,15 +52,15 @@ │ │ │ Definition char63_valid (c : char63) :=
    │ │ │   (c land 255 = c)%uint63.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Conversion to / from lists

    │ │ │ +

    Conversion to / from lists

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Definition to_list (s : string) : list char63 :=
    │ │ │   List.map (fun i => get s (of_nat i)) (List.seq 0 (to_nat (length s))).
    │ │ │ @@ -87,15 +87,15 @@ │ │ │   forall (s : string),
    │ │ │     List.Forall char63_valid (to_list s).
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Axioms relating string operations with list operations

    │ │ │ +

    Axioms relating string operations with list operations

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Axiom length_spec :
    │ │ │   forall (s : string),
    │ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.Strings.String.html │ │ │ @@ -61,15 +61,15 @@ │ │ │ Require Import Coq.Strings.Byte.
    │ │ │ Import IfNotations.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Definition of strings

    │ │ │ +

    Definition of strings

    │ │ │ │ │ │
    │ │ │ │ │ │ Implementation of string as list of ascii characters │ │ │
    │ │ │
    │ │ │ │ │ │ @@ -132,15 +132,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.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Compare strings lexicographically

    │ │ │ +

    Compare strings lexicographically

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Fixpoint compare (s1 s2 : string) : comparison :=
    │ │ │   match s1, s2 with
    │ │ │ @@ -182,15 +182,15 @@ │ │ │ Infix "<?" := ltb : string_scope.
    │ │ │ Infix "<=?" := leb : string_scope.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Concatenation of strings

    │ │ │ +

    Concatenation of strings

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Reserved Notation "x ++ y" (right associativity, at level 60).
    │ │ │ │ │ │ @@ -273,15 +273,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 "" │ │ │
    │ │ │ @@ -322,15 +322,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. │ │ │
    │ │ │
    │ │ │ @@ -343,15 +343,15 @@ │ │ │   | cons x xs => x ++ sep ++ concat sep xs
    │ │ │   end.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Test functions

    │ │ │ +

    Test functions

    │ │ │ │ │ │
    │ │ │ │ │ │ Test if s1 is a prefix of s2 │ │ │
    │ │ │
    │ │ │ │ │ │ @@ -495,15 +495,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
    │ │ │ @@ -538,15 +538,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/libcoq-stdlib/html/Coq.Structures.DecidableType.html │ │ │ @@ -56,39 +56,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/libcoq-stdlib/html/Coq.Structures.DecidableTypeEx.html │ │ │ @@ -53,15 +53,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/libcoq-stdlib/html/Coq.Structures.Equalities.html │ │ │ @@ -65,29 +65,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.
    │ │ │ @@ -105,30 +105,30 @@ │ │ │
    │ │ │ 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).
    │ │ │ #[global]
    │ │ │   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.
    │ │ │ @@ -140,29 +140,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. │ │ │
    │ │ │
    │ │ │ @@ -249,15 +249,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.
    │ │ │ @@ -288,15 +288,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.
    │ │ │ @@ -386,15 +386,15 @@ │ │ │
    │ │ │ End BoolEqualityFacts.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    UsualDecidableType

    │ │ │ +

    UsualDecidableType

    │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ A particular case of DecidableType where the equality is │ │ │ the usual one of Coq. │ │ │
    │ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.Structures.EqualitiesFacts.html │ │ │ @@ -51,15 +51,15 @@ │ │ │
    │ │ │ Set Implicit Arguments.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Keys and datas used in the future MMaps

    │ │ │ +

    Keys and datas used in the future MMaps

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Module KeyDecidableType(D:DecidableType).
    │ │ │ │ │ │ @@ -223,15 +223,15 @@ │ │ │
    │ │ │ End KeyDecidableType.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    PairDecidableType

    │ │ │ +

    PairDecidableType

    │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ From two decidable types, we can build a new DecidableType │ │ │ over their cartesian product. │ │ │
    │ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.Structures.GenericMinMax.html │ │ │ @@ -48,19 +48,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.
    │ │ │ @@ -78,15 +78,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 :=
    │ │ │ @@ -119,15 +119,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.
    │ │ │ @@ -197,15 +197,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.
    │ │ │ │ │ │ @@ -224,15 +224,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.
    │ │ │ │ │ │ @@ -383,15 +383,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.
    │ │ │ │ │ │ @@ -465,15 +465,15 @@ │ │ │
    │ │ │ End MinMaxLogicalProperties.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Properties requiring a decidable order

    │ │ │ +

    Properties requiring a decidable order

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Module MinMaxDecProperties (Import O:OrderedTypeFull')(Import M:HasMinMax O).
    │ │ │ │ │ │ @@ -545,15 +545,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/libcoq-stdlib/html/Coq.Structures.OrderedType.html │ │ │ @@ -53,15 +53,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
    │ │ │ @@ -134,15 +134,15 @@ │ │ │
    │ │ │ End MOT_to_OT.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Ordered types properties

    │ │ │ +

    Ordered types properties

    │ │ │ │ │ │
    │ │ │ │ │ │ Additional properties that can be derived from signature │ │ │ OrderedType. │ │ │
    │ │ │
    │ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.Structures.OrderedTypeAlt.html │ │ │ @@ -46,15 +46,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/libcoq-stdlib/html/Coq.Structures.OrderedTypeEx.html │ │ │ @@ -52,15 +52,15 @@ │ │ │ Require Import Ascii String.
    │ │ │ Require Import NArith Ndec.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    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/libcoq-stdlib/html/Coq.Structures.Orders.html │ │ │ @@ -49,15 +49,15 @@ │ │ │ Require Export Relations Morphisms Setoid Equalities.
    │ │ │ Set Implicit Arguments.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Ordered types

    │ │ │ +

    Ordered types

    │ │ │ │ │ │
    │ │ │ │ │ │ First, signatures with only the order relations │ │ │
    │ │ │
    │ │ │ │ │ │ @@ -184,15 +184,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.
    │ │ │ @@ -216,15 +216,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.
    │ │ │ @@ -239,15 +239,15 @@ │ │ │ Module Type TotalOrder' := TotalOrder <+ EqLtLeNotation.
    │ │ │ Module Type UsualTotalOrder' := UsualTotalOrder <+ LtLeNotation.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Conversions

    │ │ │ +

    Conversions

    │ │ │ │ │ │
    │ │ │ │ │ │ From compare to eqb, and then eq_dec │ │ │
    │ │ │
    │ │ │ │ │ │ @@ -300,15 +300,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 │ │ │ │ │ │
    │ │ │ @@ -402,15 +402,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.
    │ │ │ │ │ │ @@ -433,15 +433,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/libcoq-stdlib/html/Coq.Structures.OrdersAlt.html │ │ │ @@ -51,32 +51,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.
    │ │ │ │ │ │ @@ -98,15 +98,15 @@ │ │ │
    │ │ │ End OrderedTypeAlt.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    From OrderedTypeOrig to OrderedType.

    │ │ │ +

    From OrderedTypeOrig to OrderedType.

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Module Update_OT (O:OrderedTypeOrig) <: OrderedType.
    │ │ │ │ │ │ @@ -137,15 +137,15 @@ │ │ │
    │ │ │ End Update_OT.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    From OrderedType to OrderedTypeOrig.

    │ │ │ +

    From OrderedType to OrderedTypeOrig.

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Module Backport_OT (O:OrderedType) <: OrderedTypeOrig.
    │ │ │ │ │ │ @@ -166,15 +166,15 @@ │ │ │
    │ │ │ End Backport_OT.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    From OrderedTypeAlt to OrderedType.

    │ │ │ +

    From OrderedTypeAlt to OrderedType.

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Module OT_from_Alt (Import O:OrderedTypeAlt) <: OrderedType.
    │ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.Structures.OrdersEx.html │ │ │ @@ -52,15 +52,15 @@ │ │ │  RelationPairs EqualitiesFacts.
    │ │ │ Require Import Ascii String.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Examples of Ordered Type structures.

    │ │ │ +

    Examples of Ordered Type structures.

    │ │ │ │ │ │
    │ │ │ │ │ │ Ordered Type for bool, nat, Positive, N, Z, ascii, string with the usual or lexicographic order. │ │ │
    │ │ │
    │ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.Structures.OrdersFacts.html │ │ │ @@ -52,15 +52,15 @@ │ │ │
    │ │ │ Set Implicit Arguments.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Properties of compare

    │ │ │ +

    Properties of compare

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Module Type CompareFacts (Import O:DecStrOrder').
    │ │ │ │ │ │ @@ -101,15 +101,15 @@ │ │ │
    │ │ │ End CompareFacts.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Properties of OrderedTypeFull

    │ │ │ +

    Properties of OrderedTypeFull

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Module OrderedTypeFullFacts (Import O:OrderedTypeFull').
    │ │ │ │ │ │ @@ -161,15 +161,15 @@ │ │ │
    │ │ │ End OrderedTypeFullFacts.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Properties of OrderedType

    │ │ │ +

    Properties of OrderedType

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Module OrderedTypeFacts (Import O: OrderedType').
    │ │ │ │ │ │ @@ -256,15 +256,15 @@ │ │ │
    │ │ │ End OrderedTypeFacts.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Tests of the order tactic

    │ │ │ +

    Tests of the order tactic

    │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ Is it at least capable of proving some basic properties ? │ │ │
    │ │ │
    │ │ │ @@ -294,15 +294,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). │ │ │ @@ -345,15 +345,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/libcoq-stdlib/html/Coq.Structures.OrdersLists.html │ │ │ @@ -51,15 +51,15 @@ │ │ │
    │ │ │ Set Implicit Arguments.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Specialization of results about lists modulo.

    │ │ │ +

    Specialization of results about lists modulo.

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Module OrderedTypeLists (O:OrderedType).
    │ │ │ │ │ │ @@ -106,15 +106,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/libcoq-stdlib/html/Coq.Structures.OrdersTac.html │ │ │ @@ -49,15 +49,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 │ │ │ @@ -88,15 +88,15 @@ │ │ │  end.
    │ │ │ Local Infix "+" := trans_ord.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    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.
    │ │ │ @@ -234,15 +234,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/libcoq-stdlib/html/Coq.Vectors.VectorDef.html │ │ │ @@ -5874,15 +5874,15 @@ │ │ │ 00016f10: 7265 6622 2068 7265 663d 2223 4954 4552 ref" href="#ITER │ │ │ 00016f20: 4154 4f52 5322 3e3c 7370 616e 2063 6c61 ATORS">ITERATOR │ │ │ 00016f50: 533c 2f73 7061 6e3e 3c2f 613e 2e3c 6272 S.
    .
    ..
    .

    Here are sp │ │ │ 00016fb0: 6563 6961 6c20 6e6f 6e20 6465 7065 6e64 ecial non depend │ │ │ 00016fc0: 656e 7420 7573 6566 756c 2069 6e73 7461 ent useful insta │ │ │ 00016fd0: 6e74 6961 7469 6f6e 206f 6620 696e 6475 ntiation of indu │ │ │ 00016fe0: 6374 696f 6e20 7363 6865 6d65 733c 2f68 ction schemes..
    VEC │ │ │ 00024430: 544f 524c 4953 543c 2f73 7061 6e3e 3c2f TORLIST.
    .
    . │ │ │ 00024450: 0a3c 6469 7620 636c 6173 733d 2264 6f63 .
    .

    .

    vecto │ │ │ 00024490: 7220 266c 743b 3d26 6774 3b20 6c69 7374 r <=> list │ │ │ 000244a0: 2066 756e 6374 696f 6e73 3c2f 6831 3e0a functions

    . │ │ │ 000244b0: 0a3c 2f64 6976 3e0a 3c64 6976 2063 6c61 .
    .
    ..
    . │ │ │ 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.
    │ │ │ @@ -132,15 +132,15 @@ │ │ │ Lemma In_nth A: forall n (v : t A n) p,
    │ │ │   In (nth v p) v.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Properties of replace

    │ │ │ +

    Properties of replace

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma nth_replace_eq A: forall n p (v : t A n) a,
    │ │ │   nth (replace v p a) p = a.
    │ │ │ @@ -178,30 +178,30 @@ │ │ │ Lemma replace_append_R A: forall n m (v : t A n) (w : t A m) p a,
    │ │ │   replace (v ++ w) (Fin.R n p) a = v ++ (replace w p a).
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Properties of const

    │ │ │ +

    Properties of const

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma const_nth A (a: A) n (p: Fin.t n): (const a n)[@ p] = a.
    │ │ │ │ │ │
    │ │ │ Lemma append_const A (a : A) n m : (const a n) ++ (const a m) = const a (n + m).
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Properties of map

    │ │ │ +

    Properties of map

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma map_id A: forall n (v : t A n),
    │ │ │   map (fun x => x) v = v.
    │ │ │ @@ -234,29 +234,29 @@ │ │ │ Lemma map2_ext A B C: forall (f g:A->B->C), (forall a b, f a b = g a b) ->
    │ │ │   forall n (v : t A n) (w : t B n), map2 f v w = map2 g v w.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    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 take

    │ │ │ +

    Properties of take

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma take_O : forall {A} {n} le (v:t A n), take 0 le v = [].
    │ │ │ │ │ │ @@ -270,15 +270,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).
    │ │ │ @@ -301,28 +301,28 @@ │ │ │ Lemma append_inj {A} : forall {n m : nat} (v v' : t A n) (w w' : t A m),
    │ │ │   v ++ w = v' ++ w' -> v = v' /\ w = w'.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Properties of In

    │ │ │ +

    Properties of In

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma In_cons_iff A: forall n a b (v : t A n),
    │ │ │   In a (b :: v) <-> (b = a \/ In a v).
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    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.
    │ │ │ @@ -364,15 +364,15 @@ │ │ │ Lemma Forall2_append A B: forall P n m (v : t A n) (v' : t B n) (w : t A m) (w' : t B m),
    │ │ │   Forall2 P v v' -> Forall2 P w w' -> Forall2 P (append v w) (append v' w').
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    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.
    │ │ │ @@ -403,15 +403,15 @@ │ │ │ Lemma Forall_shiftin A: forall (P : A -> Prop) a n (v : t A n),
    │ │ │   Forall P (shiftin a v) <-> (P a /\ Forall P v).
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Properties of rev

    │ │ │ +

    Properties of rev

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma rev_nil A: rev (nil A) = [].
    │ │ │ │ │ │ @@ -441,15 +441,15 @@ │ │ │ Lemma Forall_rev A: forall (P : A -> Prop) n (v : t A n),
    │ │ │   Forall P (rev v) <-> Forall P v.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Properties of to_list

    │ │ │ +

    Properties of to_list

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma to_list_of_list_opp {A} (l: list A): to_list (of_list l) = l.
    │ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.ZArith.BinInt.html │ │ │ @@ -51,15 +51,15 @@ │ │ │  OrdersFacts ZAxioms ZProperties DecidableClass.
    │ │ │ 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 │ │ │ @@ -86,15 +86,15 @@ │ │ │  <: UsualDecidableTypeFull
    │ │ │  <: TotalOrder.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Definitions of operations, now in a separate file

    │ │ │ +

    Definitions of operations, now in a separate file

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Include BinIntDef.Z.
    │ │ │ │ │ │ @@ -118,15 +118,15 @@ │ │ │ │ │ │
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Logic Predicates

    │ │ │ +

    Logic Predicates

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Definition eq := @Logic.eq Z.
    │ │ │ Definition eq_equiv := @eq_equivalence Z.
    │ │ │ @@ -168,27 +168,27 @@ │ │ │ Register gtb as num.Z.gtb.
    │ │ │ Register eqb as num.Z.eqb.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    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

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Local Obligation Tactic := simpl_relation.
    │ │ │ Program Definition succ_wd : Proper (eq==>eq) succ := _.
    │ │ │ @@ -205,15 +205,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) │ │ │
    │ │ │
    │ │ │ @@ -276,15 +276,15 @@ │ │ │
    │ │ │ Module Import Private_BootStrap.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Operations and constants

    │ │ │ +

    Operations and constants

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma add_0_r n : n + 0 = n.
    │ │ │ │ │ │ @@ -294,51 +294,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.
    │ │ │ @@ -352,39 +352,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.
    │ │ │ @@ -395,64 +395,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

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Local Arguments pos_sub : simpl nomatch.
    │ │ │ │ │ │ @@ -462,45 +462,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.
    │ │ │ │ │ │ @@ -584,15 +584,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.
    │ │ │ │ │ │ @@ -605,15 +605,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 ->
    │ │ │ @@ -646,30 +646,30 @@ │ │ │ Register le_decidable as num.Z.le_decidable.
    │ │ │ Register lt_decidable as num.Z.lt_decidable.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    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.
    │ │ │ │ │ │ @@ -679,15 +679,15 @@ │ │ │
    │ │ │ Lemma sgn_neg n : n < 0 -> sgn n = -1.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Specification of power

    │ │ │ +

    Specification of power

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma pow_0_r n : n^0 = 1.
    │ │ │ │ │ │ @@ -708,27 +708,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.
    │ │ │ @@ -743,15 +743,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)).
    │ │ │ │ │ │ @@ -772,15 +772,15 @@ │ │ │
    │ │ │ Lemma odd_spec n : odd n = true <-> Odd n.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Multiplication and Doubling

    │ │ │ +

    Multiplication and Doubling

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma double_spec n : double n = 2*n.
    │ │ │ │ │ │ @@ -790,15 +790,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.
    │ │ │ @@ -822,15 +822,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.
    │ │ │ │ │ │ @@ -855,15 +855,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.
    │ │ │ │ │ │ @@ -873,15 +873,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.
    │ │ │ │ │ │ @@ -914,15 +914,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.
    │ │ │ @@ -939,15 +939,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.
    │ │ │ │ │ │ @@ -1124,39 +1124,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/libcoq-stdlib/html/Coq.ZArith.BinIntDef.html │ │ │ @@ -57,15 +57,15 @@ │ │ │ Local Notation "1" := (Zpos 1).
    │ │ │ Local Notation "2" := (Zpos 2).
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Binary Integers, Definitions of Operations

    │ │ │ +

    Binary Integers, Definitions of Operations

    │ │ │ │ │ │
    │ │ │ │ │ │ Initial author: Pierre Crégut, CNET, Lannion, France │ │ │
    │ │ │
    │ │ │ │ │ │ @@ -75,42 +75,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
    │ │ │ @@ -135,15 +135,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
    │ │ │ @@ -158,15 +158,15 @@ │ │ │     | 1, 1 => Z0
    │ │ │   end%positive.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Addition

    │ │ │ +

    Addition

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Definition add x y :=
    │ │ │   match x, y with
    │ │ │ @@ -181,15 +181,15 @@ │ │ │
    │ │ │ Infix "+" := add : Z_scope.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Opposite

    │ │ │ +

    Opposite

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Definition opp x :=
    │ │ │   match x with
    │ │ │ @@ -201,54 +201,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
    │ │ │ @@ -263,15 +263,15 @@ │ │ │
    │ │ │ Infix "*" := mul : Z_scope.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Power function

    │ │ │ +

    Power function

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Definition pow_pos (z:Z) := Pos.iter (mul z) 1.
    │ │ │ │ │ │ @@ -286,15 +286,15 @@ │ │ │
    │ │ │ Infix "^" := pow : Z_scope.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Square

    │ │ │ +

    Square

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Definition square x :=
    │ │ │   match x with
    │ │ │ @@ -303,15 +303,15 @@ │ │ │     | neg p => pos (Pos.square p)
    │ │ │   end.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Comparison

    │ │ │ +

    Comparison

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Definition compare x y :=
    │ │ │   match x, y with
    │ │ │ @@ -329,15 +329,15 @@ │ │ │
    │ │ │ Infix "?=" := compare (at level 70, no associativity) : Z_scope.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Sign function

    │ │ │ +

    Sign function

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Definition sgn z :=
    │ │ │   match z with
    │ │ │ @@ -408,15 +408,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
    │ │ │ @@ -431,15 +431,15 @@ │ │ │     | Gt => m
    │ │ │   end.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Absolute value

    │ │ │ +

    Absolute value

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Definition abs z :=
    │ │ │   match z with
    │ │ │ @@ -448,15 +448,15 @@ │ │ │     | neg p => pos p
    │ │ │   end.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Conversions

    │ │ │ +

    Conversions

    │ │ │ │ │ │
    │ │ │ │ │ │ From Z to nat via absolute value │ │ │
    │ │ │
    │ │ │ │ │ │ @@ -623,15 +623,15 @@ │ │ │
    │ │ │ Definition to_num_hex_int n := Number.IntHexadecimal (to_hex_int n).
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Iteration of a function

    │ │ │ +

    Iteration of a function

    │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ By convention, iterating a negative number of times is identity. │ │ │ │ │ │
    │ │ │ @@ -644,30 +644,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. │ │ │ @@ -754,15 +754,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, │ │ │ @@ -815,15 +815,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
    │ │ │ @@ -842,15 +842,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. │ │ │
    │ │ │ @@ -888,15 +888,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
    │ │ │ @@ -905,15 +905,15 @@ │ │ │     | _ => 0
    │ │ │   end.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Square root

    │ │ │ +

    Square root

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Definition sqrtrem n :=
    │ │ │  match n with
    │ │ │ @@ -933,15 +933,15 @@ │ │ │   | _ => 0
    │ │ │  end.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Greatest Common Divisor

    │ │ │ +

    Greatest Common Divisor

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Definition gcd a b :=
    │ │ │   match a,b with
    │ │ │ @@ -976,15 +976,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/libcoq-stdlib/html/Coq.ZArith.Int.html │ │ │ @@ -45,15 +45,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). │ │ │ @@ -70,15 +70,15 @@ │ │ │
    │ │ │ Local Ltac Tauto.intuition_solver ::= auto with bool.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    A specification of integers

    │ │ │ +

    A specification of integers

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Module Type Int.
    │ │ │ │ │ │ @@ -206,15 +206,15 @@ │ │ │
    │ │ │ End Int.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Facts and tactics using Int

    │ │ │ +

    Facts and tactics using Int

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Module MoreInt (Import I:Int).
    │ │ │   Local Notation int := I.t.
    │ │ │ @@ -560,15 +560,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/libcoq-stdlib/html/Coq.ZArith.ZArith_dec.html │ │ │ @@ -70,15 +70,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}.
    │ │ │ │ │ │ @@ -112,15 +112,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/libcoq-stdlib/html/Coq.ZArith.Zabs.html │ │ │ @@ -70,15 +70,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).
    │ │ │ @@ -88,15 +88,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),
    │ │ │ @@ -113,15 +113,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/libcoq-stdlib/html/Coq.ZArith.Zbitwise.html │ │ │ @@ -148,21 +148,21 @@ │ │ │ Lemma lnot_sub x y : Z.lnot (x - y) = Z.lnot x + y.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Explicit formulas for carry bits during addition. Conceptually, the theory │ │ │ -

    here matches the bitblasting rules for integers. However, the vector of

    │ │ │ +

    here matches the bitblasting rules for integers. However, the vector of

    │ │ │ │ │ │ -

    carry bits is represented as a Z so it can be used in bitwise operations.

    │ │ │ +

    carry bits is represented as a Z so it can be used in bitwise operations.

    │ │ │ │ │ │ -

    The last three lemmas about addcarries are the main interface, but the

    │ │ │ +

    The last three lemmas about addcarries are the main interface, but the

    │ │ │ │ │ │ -

    generalization adccarries is provided as the same theory applies.

    │ │ │ +

    generalization adccarries is provided as the same theory applies.

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Definition adccarries (x y : Z) (c : bool) := (x + y + Z.b2z c) .^ (x .^ y).
    │ │ │ Definition addcarries (x y : Z) := (x + y) .^ (x .^ y).
    │ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.ZArith.Zbool.html │ │ │ @@ -56,15 +56,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).
    │ │ │ @@ -81,15 +81,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/libcoq-stdlib/html/Coq.ZArith.Zcompare.html │ │ │ @@ -64,30 +64,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.
    │ │ │ @@ -96,39 +96,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).
    │ │ │ │ │ │ @@ -142,27 +142,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).
    │ │ │ @@ -175,15 +175,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/libcoq-stdlib/html/Coq.ZArith.Zdiv.html │ │ │ @@ -45,15 +45,15 @@ │ │ │ │ │ │
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Euclidean Division

    │ │ │ +

    Euclidean Division

    │ │ │ │ │ │
    │ │ │ │ │ │ Initial Contribution by Claude Marché and Xavier Urbain │ │ │
    │ │ │
    │ │ │ │ │ │ @@ -85,15 +85,15 @@ │ │ │ #[deprecated(since="8.17",note="Use Coq.ZArith.BinInt.Z.mod_neg_bound instead")]
    │ │ │ 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 │ │ │
    │ │ │
    │ │ │ │ │ │ @@ -234,15 +234,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.
    │ │ │ │ │ │ @@ -290,15 +290,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

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ │ │ │
    │ │ │ @@ -448,15 +448,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.
    │ │ │ │ │ │ @@ -687,15 +687,15 @@ │ │ │
    │ │ │ Lemma Zeven_mod : forall a, Z.even a = Zeq_bool (a mod 2) 0.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Compatibility

    │ │ │ +

    Compatibility

    │ │ │ │ │ │
    │ │ │ │ │ │ Weaker results kept only for compatibility │ │ │
    │ │ │
    │ │ │ │ │ │ @@ -723,15 +723,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
    │ │ │ @@ -775,17 +775,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,
    │ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.ZArith.Zeuclid.html │ │ │ @@ -59,15 +59,15 @@ │ │ │
    │ │ │ 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/libcoq-stdlib/html/Coq.ZArith.Zeven.html │ │ │ @@ -172,15 +172,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/libcoq-stdlib/html/Coq.ZArith.Zgcd_alt.html │ │ │ @@ -45,15 +45,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/libcoq-stdlib/html/Coq.ZArith.Zhints.html │ │ │ @@ -98,29 +98,29 @@ │ │ │ Require Import Zmisc.
    │ │ │ Require Import Wf_Z.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Simplification lemmas

    │ │ │ +

    Simplification lemmas

    │ │ │ │ │ │
    │ │ │ │ │ │ No subgoal or smaller subgoals │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ #[global]
    │ │ │ 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
    │ │ │ @@ -167,15 +167,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/libcoq-stdlib/html/Coq.ZArith.Znat.html │ │ │ @@ -91,15 +91,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 ----
    │ │ │ @@ -144,15 +144,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.
    │ │ │ │ │ │ @@ -521,15 +521,15 @@ │ │ │
    │ │ │ End Zabs2N.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Conversions between Z and nat

    │ │ │ +

    Conversions between Z and nat

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Module Nat2Z.
    │ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.ZArith.Znumtheory.html │ │ │ @@ -241,15 +241,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.) │ │ │
    │ │ │ @@ -303,15 +303,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.

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ Lemma deprecated_Zis_gcd_for_euclid :
    │ │ │   forall a b d q:Z, Zis_gcd b (a - q * b) d -> Zis_gcd a b d.
    │ │ │ @@ -391,15 +391,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.
    │ │ │ @@ -427,15 +427,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.
    │ │ │ │ │ │ @@ -521,15 +521,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/libcoq-stdlib/html/Coq.ZArith.Zorder.html │ │ │ @@ -67,30 +67,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).
    │ │ │ @@ -108,15 +108,15 @@ │ │ │
    │ │ │ Theorem not_Zeq n m : n <> m -> n < m \/ m < n.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    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).
    │ │ │ @@ -148,15 +148,15 @@ │ │ │
    │ │ │ Lemma not_Zne n m : ~ Zne n m -> n = m.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Equivalence and order properties

    │ │ │ +

    Equivalence and order properties

    │ │ │ │ │ │
    │ │ │ │ │ │ Reflexivity │ │ │
    │ │ │
    │ │ │ │ │ │ @@ -272,19 +272,19 @@ │ │ │ #[global]
    │ │ │ 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 │ │ │
    │ │ │
    │ │ │ │ │ │ @@ -454,15 +454,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).
    │ │ │ @@ -524,15 +524,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.
    │ │ │ │ │ │ @@ -652,30 +652,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/libcoq-stdlib/html/Coq.ZArith.Zpow_def.html │ │ │ @@ -49,15 +49,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/libcoq-stdlib/html/Coq.ZArith.Zpow_facts.html │ │ │ @@ -128,15 +128,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.
    │ │ │ @@ -204,15 +204,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/libcoq-stdlib/html/Coq.ZArith.Zpower.html │ │ │ @@ -50,15 +50,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: │ │ │ @@ -150,15 +150,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 │ │ │
    │ │ │ @@ -279,15 +279,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/libcoq-stdlib/html/Coq.ZArith.Zquot.html │ │ │ @@ -149,15 +149,15 @@ │ │ │
    │ │ │ Lemma Z_rem_mult a b : Z.rem (a*b) b = 0.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Division and Opposite

    │ │ │ +

    Division and Opposite

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ │ │ │
    │ │ │ @@ -228,15 +228,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).
    │ │ │ @@ -261,15 +261,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

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ │ │ │
    │ │ │ @@ -359,15 +359,15 @@ │ │ │ Theorem Zquot_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

    │ │ │ │ │ │
    │ │ │ │ │ │ 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 │ │ │
    │ │ │ @@ -523,15 +523,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/libcoq-stdlib/html/Coq.ZArith.auxiliary.html │ │ │ @@ -64,15 +64,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/libcoq-stdlib/html/Coq.btauto.Algebra.html │ │ │ @@ -140,15 +140,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. │ │ │
    │ │ │
    │ │ │ @@ -213,15 +213,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.

    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ #[local]
    │ │ │ Hint Constructors valid : core.
    │ │ ├── ./usr/share/doc/libcoq-stdlib/html/Coq.extraction.ExtrHaskellNatInt.html │ │ │ @@ -58,19 +58,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/libcoq-stdlib/html/Coq.extraction.ExtrHaskellNatInteger.html │ │ │ @@ -58,19 +58,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/libcoq-stdlib/html/Coq.extraction.ExtrHaskellNatNum.html │ │ │ @@ -43,23 +43,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/libcoq-stdlib/html/Coq.extraction.ExtrHaskellString.html │ │ │ @@ -43,15 +43,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.
    │ │ │ @@ -64,24 +64,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/libcoq-stdlib/html/Coq.extraction.ExtrHaskellZInt.html │ │ │ @@ -58,19 +58,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/libcoq-stdlib/html/Coq.extraction.ExtrHaskellZNum.html │ │ │ @@ -43,23 +43,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/libcoq-stdlib/html/Coq.omega.PreOmega.html │ │ │ @@ -51,15 +51,15 @@ │ │ │
    │ │ │ Local Open Scope Z_scope.
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ -

    Z.div_mod_to_equations, Z.quot_rem_to_equations, Z.to_euclidean_division_equations:

    │ │ │ +

    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 tactics 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