Skip to content

Commit

Permalink
Merge pull request #19 from math-comp/mathcomp-1.9.0
Browse files Browse the repository at this point in the history
Mathcomp 1.9.0
  • Loading branch information
CohenCyril authored May 29, 2019
2 parents c634b74 + 8ced91c commit da5b7e8
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ env:
- DOCKERIMAGE="mathcomp/mathcomp:1.8.0-coq-8.7"
- DOCKERIMAGE="mathcomp/mathcomp:1.8.0-coq-8.8"
- DOCKERIMAGE="mathcomp/mathcomp:1.8.0-coq-8.9"
- DOCKERIMAGE="mathcomp/mathcomp:1.9.0-coq-8.7"
- DOCKERIMAGE="mathcomp/mathcomp:1.9.0-coq-8.8"
- DOCKERIMAGE="mathcomp/mathcomp:1.9.0-coq-8.9"
- DOCKERIMAGE="mathcomp/mathcomp:1.9.0-coq-8.10"

install: |
# Prepare the COQ container
Expand Down
3 changes: 2 additions & 1 deletion opam
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ license: "CeCILL-B"
build: [ make "-j" "%{jobs}%" ]
install: [ make "install" ]
depends: [
"coq-mathcomp-field" { (>= "1.8.0" & < "1.9.0") }
"coq" { (>= "8.7" & < "8.11~") }
"coq-mathcomp-field" { (>= "1.8.0" & < "1.10.0~") }
"coq-mathcomp-bigenough" {(>= "1.0.0" & < "1.1.0~")}
]

Expand Down
52 changes: 52 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{withEmacs ? false,
nixpkgs ? (fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/650a295621b27c4ebe0fa64a63fd25323e64deb3.tar.gz";
sha256 = "0rxjkfiq53ibz0rzggvnp341b6kgzgfr9x6q07m2my7ijlirs2da";
}),
coq-version ? "8.9",
mc ? "1.8.0",
print-env ? false
}:
let
config.packageOverrides = pkgs:
with pkgs; rec {
coqPackages =
let coqPackages = (with pkgs; {
"8.7" = coqPackages_8_7;
"8.8" = coqPackages_8_8;
"8.9" = coqPackages_8_9;
"8.10" = coqPackages_8_10;
}."${coq-version}");
in
coqPackages.overrideScope' (self: super: {
mathcompPkgs = if builtins.isString mc then (super.mathcompGen mc)
else super.mathcomp.mathcompGen (o: {
version = "dev";
name = "coq${self.coq.coq-version}-mathcomp-custom";
src = mc;
});
mathcomp = self.mathcompPkgs.all;
mathcomp-ssreflect = self.mathcompPkgs.ssreflect;
mathcomp-field = self.mathcompPkgs.field;
});
coq = coqPackages.coq;
};
in
with import nixpkgs {inherit config;};
let
pgEmacs = emacsWithPackages (epkgs:
with epkgs.melpaStablePackages; [proof-general]);
in
stdenv.mkDerivation rec {
name = "env";
env = buildEnv { name = name; paths = buildInputs; };
buildInputs = [ coq ] ++ (with coqPackages; [mathcomp-field mathcomp-bigenough])
++ lib.optional withEmacs pgEmacs;
shellHook = ''
nixEnv (){
echo "Here is your work environement:"
for x in $buildInputs; do printf " "; echo $x | cut -d "-" -f "2-"; done
echo "you can pass option '--argstr coq-version \"x.y\"' to nix-shell to change coq versions"
}
'' + lib.optionalString print-env "nixEnv";
}
2 changes: 1 addition & 1 deletion theories/mxtens.v
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Lemma mxtens_indexK m n : cancel (@mxtens_index m n) (@mxtens_unindex m n).
Proof.
case: m=> [[[] //]|m]; case: n=> [[_ [] //]|n].
move=> [i j]; congr (_, _); apply: val_inj=> /=.
by rewrite divnMDl // divn_small.
by rewrite divnMDl // divn_small ?addn0.
by rewrite modnMDl // modn_small.
Qed.

Expand Down

0 comments on commit da5b7e8

Please sign in to comment.