aboutsummaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
Diffstat (limited to 'etc')
-rw-r--r--etc/ChangeLog50
-rw-r--r--etc/INSTALL.md26
-rwxr-xr-xetc/utils/import_coqfinitgroup.zsh24
-rwxr-xr-xetc/utils/packager101
-rwxr-xr-xetc/utils/ssrcoqdep32
-rwxr-xr-xetc/win-installer.nsi2
6 files changed, 123 insertions, 112 deletions
diff --git a/etc/ChangeLog b/etc/ChangeLog
index e33edb4..12d6ef4 100644
--- a/etc/ChangeLog
+++ b/etc/ChangeLog
@@ -1,15 +1,49 @@
-25/08/2016 - refactoring of algC and complex in ssrnum - development version
+07/09/2016 - compatibility with Coq 8.7 and several small fixes -
+ version 1.6.2 and upcomming version 1.7
+ * Compatibility with Coq 8.7
+ * Lost compatibility with Coq 8.4
+
+07/09/2016 - compatibility with Coq 8.7 and several small fixes -
+ upcomming version 1.7
+ * New Theorems:
+ dec_factor_theorem, abstract_context,
+ mul_bin_down, mul_bin_left
+
+ * Renamings or replacements:
+ mul_Sm_binm -> mul_bin_diag
+ divn1 -> divz1 (in intdiv)
+
+ * Generalized or extended:
+ ltngtP, contra_eq, contra_neq, odd_opp
+
+ * Plugin:
+ ssrpattern: compose nicely with Tactic Notation
+
+25/08/2016 - refactoring of algC and complex in ssrnum -
+ upcomming version 1.7
* ssrnum's interface numClosedFieldType factors some theory from
both complex and algC. Because of that Re, Im, 'i, conjC, n.-root
and sqrtC are not specialized to algC anymore. In case of
ambiguity, they should be instanciated with algC using typing
- constraints. Moreoever some lemmas from the theory like conjCK
- have an extra nonmaximal implicit argument (C :
- numClosedFieldType) which could break some proofs. Additionally,
- ad-hoc constructions from complex.v like -*+ or complex.Re are now
- deprecated and one should rely solely on the ssrnum interface. The
- next revision might definietly hide those constructions under a
- module.
+ constraints. Moreoever all the lemmas from ssrnum that used to
+ be in algC (like conjCK), now take an extra nonmaximal implicit
+ argument (C : numClosedFieldType) which could break some proofs.
+ Additionally, ad-hoc constructions from complex.v like -*+ or
+ complex.Re are now deprecated and one should rely solely on the
+ ssrnum interface. The next revision might definietly hide those
+ constructions under a module.
+
+ * Structures that change:
+ numClosedFieldType
+
+ * Renamed and generalized definitions:
+ rootC -> nthroot
+ algRe -> Re
+ algIm -> Im
+ algCi -> imaginaryC
+
+ * Renamed and generalized theorems:
+ Every theorem from ssrnum that used to be in algC
24/11/2015 - major reorganization of the archive - version 1.6
* Files split into subdirectories: ssreflect, algebra, fingroup,
diff --git a/etc/INSTALL.md b/etc/INSTALL.md
index b293831..4bc3a95 100644
--- a/etc/INSTALL.md
+++ b/etc/INSTALL.md
@@ -10,7 +10,7 @@ compiling it from sources.
## REQUIREMENTS
-Coq version 8.4pl6 or 8.5 (at the time of writing, beta3)
+Coq version 8.5 to 8.7.0
## BUILDING
@@ -76,27 +76,3 @@ file.
Coq sources have a .v extension. Opening any .v file should
automatically launch ProofGeneral.
-
-## TRANSITION FROM 1.5 to 1.6
-
-The change of logical/physical paths implied by the reorganization of the
-library causes an incompatibility for users of previous version of the
-Mathematical Components library. For instance the command line
-
- Require Ssreflect.ssreflect.
-
-does not work anymore. We propose a replacement schema for such
-command lines that is compatible with both versions 8.4 and 8.5 of
-Coq, namely replacing the previous line with:
-
- Require Import mathcomp.ssreflect.ssreflect.
-
- From mathcomp Require Import ssrfun ssrbool ...
-
-The first line loads the ssreflect plugin using its full path.
-Then all other files are loaded from the mathcomp name space.
-The component part (like ssreflect or algebra) is omitted. All theory files in
-the library follow this schema.
-Note that the From directive has effect only in Coq 8.5. Coq 8.4 ignores it
-and searches for files in all known paths: hence beware of the
-possible name collisions.
diff --git a/etc/utils/import_coqfinitgroup.zsh b/etc/utils/import_coqfinitgroup.zsh
deleted file mode 100755
index bf2a0b4..0000000
--- a/etc/utils/import_coqfinitgroup.zsh
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/zsh
-
-COQFINITGROUP=$1
-
-for f in $COQFINITGROUP/theories/*.v
- do nf=$(find . -name $(basename $f))
- echo "copy $f to $nf"
- cp $f $nf
-done
-for f in $COQFINITGROUP/ssreflect/test/*.v
- do nf=$(find . -name $(basename $f))
- echo "copy $f to $nf"
- cp $f $nf
-done
-sed "s/Require Import ssrmatching\./Require Import mathcomp.ssreflect.ssrmatching./" -i */*.v
-sed "s/Require ssreflect\./Require mathcomp.ssreflect.ssreflect./" -i */*.v
-sed "s/Require Import ssreflect/Require Import mathcomp.ssreflect.ssreflect.\nRequire Import/" -i */*.v
-sed "s/Require Import/From mathcomp Require Import/" -i */*.v
-sed "s/From mathcomp Require Import mathcomp/Require Import mathcomp/" -i */*.v
-sed "s/From mathcomp Require Import BinNat/Require Import BinNat/" -i */*.v
-sed "s/From mathcomp Require Import Arith/Require Import Arith/" -i */*.v
-sed "s/From mathcomp Require Import Bool/Require Import Bool/" -i */*.v
-sed "s/From mathcomp Require Import\.//" -i */*.v
-sed "s/From mathcomp Require Import/From mathcomp\nRequire Import/" -i */*.v
diff --git a/etc/utils/packager b/etc/utils/packager
index 1821ab6..d0c4b17 100755
--- a/etc/utils/packager
+++ b/etc/utils/packager
@@ -1,28 +1,87 @@
#!/bin/bash
-
set -e
set -x
-for pkg in ssreflect fingroup algebra field solvable character real_closed odd_order
-do
-pkgdir="$(git root)/opam/extra-dev/packages/coq-mathcomp-$pkg/coq-mathcomp-$pkg.dev"
-mkdir -p $pkgdir
-cp $(git root)/mathcomp/$pkg/opam $pkgdir/opam
-cp $(git root)/mathcomp/$pkg/descr $pkgdir/descr
-sed -r "/^(build|install)/s?make?make \"-C\" \"mathcomp/$pkg\"?" -i $pkgdir/opam
-echo "git: \"https://github.com/math-comp/math-comp.git\"" > $pkgdir/url
-done
+if [ -z $1 ] || [ $1 == "--help" ] || [ $1 == "-h" ]
+then cat <<EOF
+usage : packager VERSION [BRANCH] [TAG]"
+- VERSION is the version number of the package to create, we expect
+ there is a tag named mathcomp-\$VERSION which archive we can
+ download from github
+- BRANCH is the name of a branch where we can find accurate local opam
+ files. Actually, this may only matter for the Coq version dependencies
+ located in the ssreflect package. Default value is "mathcomp-\$VERSION"
+- TAG is the name of the tag used to build the archive, this is
+ particularily useful for generating the package for the odd order
+ theorem if we want to keep it separate from the rest of mathcomp
+ e.g. "packager 1.6.1 mathcomp-odd-order.1.6.1 mathcomp-odd-order.1.6.1"
+ Default value is "mathcomp-\$VERSION"
+EOF
+ exit 0
+else
+VERSION=$1
+fi
+
+if [ -z $2 ]
+then BRANCH="mathcomp-$VERSION"
+else BRANCH=$2
+fi
+# verify whether $BRANCH exists
+git rev-parse --verify $BRANCH
-for pkg in ssreflect fingroup algebra field solvable character
-do
-pkgdir="$(git root)/opam/released/packages/coq-mathcomp-$pkg/coq-mathcomp-$pkg.1.6"
-mkdir -p $pkgdir
-cp $(git root)/mathcomp/$pkg/opam $pkgdir/opam
-cp $(git root)/mathcomp/$pkg/descr $pkgdir/descr
-sed -r "/^version/s?dev?1.6?" -i $pkgdir/opam
-sed -r "/^depends.*coq-mathcomp.*/s?dev?1.6?" -i $pkgdir/opam
-sed -r "/^(build|install)/s?make?make \"-C\" \"mathcomp/$pkg\"?" -i $pkgdir/opam
-echo "http: \"http://github.com/math-comp/math-comp/archive/mathcomp-1.6.tar.gz\"" > $pkgdir/url
-echo "checksum: \"038ba80c0d6b430428726ae4d00affcf\"" >> $pkgdir/url
+if [ -z $3 ]
+then TAG="mathcomp-$VERSION"
+else TAG=$3
+fi
+# verify whether $TAG exists
+git rev-parse --verify $TAG
+ARCHIVEURL="http://github.com/math-comp/math-comp/archive/$TAG.tar.gz"
+
+# we build the url file content and the list of packages, and where to put them
+if [ $VERSION == "dev" ]
+then
+# variables useful for package construction
+ URLLINE="git: \"https://github.com/math-comp/math-comp.git\""
+ PKGS=$(sed -r "s/.*mathcomp\.([^\.]*)*.*/\1/" $(git root)/mathcomp/all/all.v \
+ | paste -sd " " -)
+ PKGPREFIX="$(git root)/opam/extra-dev/packages"
+else
+ ARCHIVE=$(mktemp)
+ git archive --format=tgz --output=$ARCHIVE \
+ --prefix=math-comp-$TAG/ $TAG # reproduce github archive
+ SUM=$(md5sum $ARCHIVE | cut -d " " -f 1)
+ EXTRACTED=$(mktemp -d)
+ tar -C $EXTRACTED -zxvf $ARCHIVE
+# variables useful for package construction
+ URLLINE="http: \"$ARCHIVEURL\""
+ CHECKSUMLINE="checksum: \"$SUM\""
+ PKGS=$(ls -fs -d -1 $EXTRACTED/*/mathcomp/*/ \
+ | sed -r "s?.*mathcomp/([^/]+)/?\1?" \
+ | paste -sd " " -)
+ PKGPREFIX="$(git root)/opam/released/packages"
+fi
+
+# for each package, we pick the corresponding opam and descr file and
+# rewrite them to adapt them to single package construction and
+# version numbers
+for pkg in $PKGS
+do pkgdir="$PKGPREFIX/coq-mathcomp-$pkg/coq-mathcomp-$pkg.$VERSION"
+ mkdir -p $pkgdir
+ if [ $VERSION == "dev" ]
+ then cp $(git root)/mathcomp/$pkg/opam $pkgdir/opam
+ cp $(git root)/mathcomp/$pkg/descr $pkgdir/descr
+ else git show "$BRANCH:mathcomp/$pkg/opam" > $pkgdir/opam
+ git show "$BRANCH:mathcomp/$pkg/descr" > $pkgdir/descr
+ sed -r "/^version/s?dev?$VERSION?" -i $pkgdir/opam
+ sed -r "/^depends.*coq-mathcomp.*/s?dev?$VERSION?" -i $pkgdir/opam
+ fi
+ sed -r "/^(build|install)/s?make?make \"-C\" \"mathcomp/$pkg\"?" -i $pkgdir/opam
+ echo $URLLINE > $pkgdir/url
+ if [ $VERSION != "dev" ]
+ then echo $CHECKSUMLINE >> $pkgdir/url
+ fi
done
+
+# finally test the existence of the archive
+wget --spider $ARCHIVEURL
diff --git a/etc/utils/ssrcoqdep b/etc/utils/ssrcoqdep
deleted file mode 100755
index 20e1281..0000000
--- a/etc/utils/ssrcoqdep
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/bash
-
-args="$@"
-echo "calling coqdep on $args" 1>&2
-
-mkdir bkpcoqdep
-
-while [[ $# > 0 ]]
-do
-key="$1"
-
-case $key in
- *.v)
- mkdir -p $(dirname bkpcoqdep/$key)
- cp $key bkpcoqdep/$key
- sed "s/^From.*//" bkpcoqdep/$key > $key
- ;;
- *)
- ;;
-esac
-shift
-done
-
-COQBIN="$(dirname $(which coqtop))/"
-$COQBIN/coqdep $args
-
-for f in $(find bkpcoqdep -name "*.v")
-do
-mv $f ${f##bkpcoqdep/}
-done
-
-rm -rf bkpcoqdep
diff --git a/etc/win-installer.nsi b/etc/win-installer.nsi
index 7b08705..b90dd6b 100755
--- a/etc/win-installer.nsi
+++ b/etc/win-installer.nsi
@@ -61,8 +61,6 @@ Section "Ssreflect and MathComp" Sec
File /r ${SRC}\*.vo
File /r ${SRC}\*.v
File /r ${SRC}\*.glob
- File /r ${SRC}\*.cmxs
- File /r ${SRC}\*.cmi
CreateDirectory "$SMPROGRAMS\Coq"