coq.scm 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2018-2021 Julien Lepiller <julien@lepiller.eu>
  3. ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
  4. ;;; Copyright © 2019 Dan Frumin <dfrumin@cs.ru.nl>
  5. ;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
  6. ;;; Copyright © 2020 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
  7. ;;; Copyright © 2020 raingloom <raingloom@riseup.net>
  8. ;;; Copyright © 2020 Robin Green <greenrd@greenrd.org>
  9. ;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
  10. ;;;
  11. ;;; This file is part of GNU Guix.
  12. ;;;
  13. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  14. ;;; under the terms of the GNU General Public License as published by
  15. ;;; the Free Software Foundation; either version 3 of the License, or (at
  16. ;;; your option) any later version.
  17. ;;;
  18. ;;; GNU Guix is distributed in the hope that it will be useful, but
  19. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  20. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  21. ;;; GNU General Public License for more details.
  22. ;;;
  23. ;;; You should have received a copy of the GNU General Public License
  24. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  25. (define-module (gnu packages coq)
  26. #:use-module (gnu packages)
  27. #:use-module (gnu packages autotools)
  28. #:use-module (gnu packages base)
  29. #:use-module (gnu packages bison)
  30. #:use-module (gnu packages boost)
  31. #:use-module (gnu packages emacs)
  32. #:use-module (gnu packages flex)
  33. #:use-module (gnu packages gawk)
  34. #:use-module (gnu packages multiprecision)
  35. #:use-module (gnu packages ocaml)
  36. #:use-module (gnu packages perl)
  37. #:use-module (gnu packages python)
  38. #:use-module (gnu packages rsync)
  39. #:use-module (gnu packages texinfo)
  40. #:use-module (guix build-system dune)
  41. #:use-module (guix build-system gnu)
  42. #:use-module (guix build-system ocaml)
  43. #:use-module (guix download)
  44. #:use-module (guix git-download)
  45. #:use-module ((guix licenses) #:prefix license:)
  46. #:use-module (guix packages)
  47. #:use-module (guix utils)
  48. #:use-module ((srfi srfi-1) #:hide (zip)))
  49. (define-public coq
  50. (package
  51. (name "coq")
  52. (version "8.13.2")
  53. (source
  54. (origin
  55. (method git-fetch)
  56. (uri (git-reference
  57. (url "https://github.com/coq/coq")
  58. (commit (string-append "V" version))))
  59. (file-name (git-file-name name version))
  60. (sha256
  61. (base32
  62. "15r0cm3p9dlsxbg0lf05njjp1xi1y74vxvq6drxjykax67x95l8a"))))
  63. (native-search-paths
  64. (list (search-path-specification
  65. (variable "COQPATH")
  66. (files (list "lib/coq/user-contrib")))
  67. (search-path-specification
  68. (variable "COQLIB")
  69. (files (list "lib/ocaml/site-lib/coq"))
  70. (separator #f))))
  71. (build-system dune-build-system)
  72. (inputs
  73. `(("gmp" ,gmp)
  74. ("ocaml-zarith" ,ocaml-zarith)))
  75. (native-inputs
  76. `(("which" ,which)))
  77. (arguments
  78. `(#:package "coq"
  79. #:test-target "test-suite"))
  80. (home-page "https://coq.inria.fr")
  81. (synopsis "Proof assistant for higher-order logic")
  82. (description
  83. "Coq is a proof assistant for higher-order logic, which allows the
  84. development of computer programs consistent with their formal specification.
  85. It is developed using Objective Caml and Camlp5.")
  86. ;; The source code is distributed under lgpl2.1.
  87. ;; Some of the documentation is distributed under opl1.0+.
  88. (license (list license:lgpl2.1 license:opl1.0+))))
  89. (define-public coq-ide-server
  90. (package
  91. (inherit coq)
  92. (name "coq-ide-server")
  93. (arguments
  94. `(#:tests? #f
  95. #:package "coqide-server"))
  96. (inputs
  97. `(("coq" ,coq)
  98. ("gmp" ,gmp)
  99. ("ocaml-zarith" ,ocaml-zarith)))))
  100. (define-public coq-ide
  101. (package
  102. (inherit coq)
  103. (name "coq-ide")
  104. (arguments
  105. `(#:tests? #f
  106. #:package "coqide"))
  107. (propagated-inputs
  108. `(("coq" ,coq)
  109. ("coq-ide-server" ,coq-ide-server)))
  110. (inputs
  111. `(("lablgtk3" ,lablgtk3)))))
  112. (define-public proof-general
  113. ;; The latest release is from 2016 and there has been more than 450 commits
  114. ;; since then.
  115. ;; Commit from 2021-06-07.
  116. (let ((commit "bc86736abb728ec0d28abc90ef0adae21d29a66a")
  117. (revision "0"))
  118. (package
  119. (name "proof-general")
  120. (version (git-version "4.4" revision commit))
  121. (source (origin
  122. (method git-fetch)
  123. (uri (git-reference
  124. (url "https://github.com/ProofGeneral/PG")
  125. (commit commit)))
  126. (file-name (git-file-name name version))
  127. (sha256
  128. (base32
  129. "00cga3n9nj2xa3ivb0fdkkdx3k11fp4879y188738631yd1x2lsa"))))
  130. (build-system gnu-build-system)
  131. (native-inputs
  132. `(("which" ,which)
  133. ("emacs" ,emacs-minimal)
  134. ("texinfo" ,texinfo)))
  135. (inputs
  136. `(("host-emacs" ,emacs)
  137. ("perl" ,perl)
  138. ("coq" ,coq)))
  139. (arguments
  140. `(#:tests? #f ; no check target
  141. #:make-flags (list (string-append "PREFIX=" %output)
  142. (string-append "DEST_PREFIX=" %output)
  143. (string-append "ELISP_START=" %output
  144. "/share/emacs/site-lisp/ProofGeneral"))
  145. #:modules ((guix build gnu-build-system)
  146. (guix build utils)
  147. (guix build emacs-utils))
  148. #:imported-modules (,@%gnu-build-system-modules
  149. (guix build emacs-utils))
  150. #:phases
  151. (modify-phases %standard-phases
  152. (delete 'configure)
  153. (add-after 'unpack 'disable-byte-compile-error-on-warn
  154. (lambda _
  155. (substitute* "Makefile"
  156. (("\\(setq byte-compile-error-on-warn t\\)")
  157. "(setq byte-compile-error-on-warn nil)"))))
  158. (add-after 'unpack 'patch-hardcoded-paths
  159. (lambda* (#:key inputs outputs #:allow-other-keys)
  160. (let ((out (assoc-ref outputs "out"))
  161. (coq (assoc-ref inputs "coq"))
  162. (emacs (assoc-ref inputs "host-emacs")))
  163. (substitute* "Makefile"
  164. (("/sbin/install-info") "install-info")))))
  165. (add-after 'unpack 'clean
  166. (lambda _
  167. ;; Delete the pre-compiled elc files for Emacs 23.
  168. (invoke "make" "clean")))
  169. (add-after 'install 'install-doc
  170. (lambda* (#:key make-flags #:allow-other-keys)
  171. ;; XXX FIXME avoid building/installing pdf files,
  172. ;; due to unresolved errors building them.
  173. (substitute* "Makefile"
  174. ((" [^ ]*\\.pdf") ""))
  175. (apply invoke "make" "install-doc" make-flags))))))
  176. (home-page "https://proofgeneral.github.io/")
  177. (synopsis "Generic front-end for proof assistants based on Emacs")
  178. (description
  179. "Proof General is a major mode to turn Emacs into an interactive proof
  180. assistant to write formal mathematical proofs using a variety of theorem
  181. provers.")
  182. (license license:gpl2+))))
  183. (define-public coq-flocq
  184. (package
  185. (name "coq-flocq")
  186. (version "3.3.1")
  187. (source
  188. (origin
  189. (method git-fetch)
  190. (uri (git-reference
  191. (url "https://gitlab.inria.fr/flocq/flocq.git")
  192. (commit (string-append "flocq-" version))))
  193. (file-name (git-file-name name version))
  194. (sha256
  195. (base32
  196. "01gdykva0lcw6y3dm8j0djxayb87szfg9vn0mxd6z3pks644misl"))))
  197. (build-system gnu-build-system)
  198. (native-inputs
  199. `(("autoconf" ,autoconf)
  200. ("automake" ,automake)
  201. ("ocaml" ,ocaml)
  202. ("which" ,which)
  203. ("coq" ,coq)))
  204. (arguments
  205. `(#:configure-flags
  206. (list (string-append "--libdir=" (assoc-ref %outputs "out")
  207. "/lib/coq/user-contrib/Flocq"))
  208. #:phases
  209. (modify-phases %standard-phases
  210. (add-after 'unpack 'remove-failing-examples
  211. (lambda _
  212. (substitute* "Remakefile.in"
  213. ;; Fails on a union error.
  214. (("Double_rounding_odd_radix.v") ""))
  215. #t))
  216. (add-before 'configure 'fix-remake
  217. (lambda _
  218. (substitute* "remake.cpp"
  219. (("/bin/sh") (which "sh")))
  220. #t))
  221. (replace 'build
  222. (lambda _
  223. (invoke "./remake")))
  224. (replace 'check
  225. (lambda _
  226. (invoke "./remake" "check")))
  227. ;; TODO: requires coq-gappa and coq-interval.
  228. ;(invoke "./remake" "check-more")
  229. (replace 'install
  230. (lambda _
  231. (invoke "./remake" "install"))))))
  232. (home-page "https://flocq.gforge.inria.fr/")
  233. (synopsis "Floating-point formalization for the Coq system")
  234. (description "Flocq (Floats for Coq) is a floating-point formalization for
  235. the Coq system. It provides a comprehensive library of theorems on a multi-radix
  236. multi-precision arithmetic. It also supports efficient numerical computations
  237. inside Coq.")
  238. (license license:lgpl3+)))
  239. (define-public coq-gappa
  240. (package
  241. (name "coq-gappa")
  242. (version "1.4.6")
  243. (source
  244. (origin
  245. (method git-fetch)
  246. (uri (git-reference
  247. (url "https://gitlab.inria.fr/gappa/coq.git")
  248. (commit (string-append "gappalib-coq-" version))))
  249. (file-name (git-file-name name version))
  250. (sha256
  251. (base32
  252. "0492i0ksrz6dnc1d57jzsbmdlb9fp9hrh9ib5v8j0yqxpyi0x8f4"))))
  253. (build-system gnu-build-system)
  254. (native-inputs
  255. `(("autoconf" ,autoconf)
  256. ("automake" ,automake)
  257. ("ocaml" ,ocaml)
  258. ("which" ,which)
  259. ("coq" ,coq)
  260. ("camlp5" ,camlp5)
  261. ("bison" ,bison)
  262. ("flex" ,flex)))
  263. (inputs
  264. `(("gmp" ,gmp)
  265. ("mpfr" ,mpfr)
  266. ("ocaml-zarith" ,ocaml-zarith)
  267. ("boost" ,boost)))
  268. (propagated-inputs
  269. `(("coq-flocq" ,coq-flocq)))
  270. (arguments
  271. `(#:configure-flags
  272. (list (string-append "COQUSERCONTRIB=" (assoc-ref %outputs "out")
  273. "/lib/coq/user-contrib"))
  274. #:phases
  275. (modify-phases %standard-phases
  276. (add-before 'configure 'fix-remake
  277. (lambda _
  278. (substitute* "remake.cpp"
  279. (("/bin/sh") (which "sh")))
  280. #t))
  281. (replace 'build
  282. (lambda _ (invoke "./remake")))
  283. ;; FIXME: Figure out why failures occur, and re-enable check phase.
  284. (delete 'check)
  285. ;; (replace 'check
  286. ;; (lambda _ (invoke "./remake" "check")))
  287. (replace 'install
  288. (lambda _ (invoke "./remake" "install"))))))
  289. (home-page "https://gappa.gforge.inria.fr/")
  290. (synopsis "Verify and formally prove properties on numerical programs")
  291. (description "Gappa is a tool intended to help verifying and formally proving
  292. properties on numerical programs dealing with floating-point or fixed-point
  293. arithmetic. It has been used to write robust floating-point filters for CGAL
  294. and it is used to certify elementary functions in CRlibm. While Gappa is
  295. intended to be used directly, it can also act as a backend prover for the Why3
  296. software verification plateform or as an automatic tactic for the Coq proof
  297. assistant.")
  298. (license (list license:gpl2+ license:cecill))));either gpl2+ or cecill
  299. (define-public coq-mathcomp
  300. (package
  301. (name "coq-mathcomp")
  302. (version "1.12.0")
  303. (source
  304. (origin
  305. (method git-fetch)
  306. (uri (git-reference
  307. (url "https://github.com/math-comp/math-comp")
  308. (commit (string-append "mathcomp-" version))))
  309. (file-name (git-file-name name version))
  310. (sha256
  311. (base32 "12cgrmzlcjnp9kv9zxsk34fgf0qfa35jdb23cbf13kmg8dyfi3h5"))))
  312. (build-system gnu-build-system)
  313. (native-inputs
  314. `(("ocaml" ,ocaml)
  315. ("which" ,which)
  316. ("coq" ,coq)))
  317. (arguments
  318. `(#:tests? #f ; No tests.
  319. #:phases
  320. (modify-phases %standard-phases
  321. (delete 'configure)
  322. (add-before 'build 'chdir
  323. (lambda _ (chdir "mathcomp") #t))
  324. (replace 'install
  325. (lambda* (#:key outputs #:allow-other-keys)
  326. (invoke "make" "-f" "Makefile.coq"
  327. (string-append "COQLIB=" (assoc-ref outputs "out")
  328. "/lib/coq/")
  329. "install"))))))
  330. (home-page "https://math-comp.github.io/")
  331. (synopsis "Mathematical Components for Coq")
  332. (description "Mathematical Components for Coq has its origins in the formal
  333. proof of the Four Colour Theorem. Since then it has grown to cover many areas
  334. of mathematics and has been used for large scale projects like the formal proof
  335. of the Odd Order Theorem.
  336. The library is written using the Ssreflect proof language that is an integral
  337. part of the distribution.")
  338. (license license:cecill-b)))
  339. (define-public coq-coquelicot
  340. (package
  341. (name "coq-coquelicot")
  342. (version "3.1.0")
  343. (source
  344. (origin
  345. (method git-fetch)
  346. (uri (git-reference
  347. (url "https://gitlab.inria.fr/coquelicot/coquelicot.git")
  348. (commit (string-append "coquelicot-" version))))
  349. (file-name (git-file-name name version))
  350. (sha256
  351. (base32
  352. "0mz3pxan1237fr5fi79c66y7b9z7bmi0sc45kwrmkczsjm5462jm"))))
  353. (build-system gnu-build-system)
  354. (native-inputs
  355. `(("autoconf" ,autoconf)
  356. ("automake" ,automake)
  357. ("ocaml" ,ocaml)
  358. ("which" ,which)
  359. ("coq" ,coq)))
  360. (propagated-inputs
  361. `(("mathcomp" ,coq-mathcomp)))
  362. (arguments
  363. `(#:configure-flags
  364. (list (string-append "--libdir=" (assoc-ref %outputs "out")
  365. "/lib/coq/user-contrib/Coquelicot"))
  366. #:phases
  367. (modify-phases %standard-phases
  368. (add-before 'configure 'fix-remake
  369. (lambda _
  370. (substitute* "remake.cpp"
  371. (("/bin/sh") (which "sh")))
  372. #t))
  373. (replace 'build
  374. (lambda _ (invoke "./remake")))
  375. (replace 'check
  376. (lambda _ (invoke "./remake" "check")))
  377. (replace 'install
  378. (lambda _ (invoke "./remake" "install"))))))
  379. (home-page "http://coquelicot.saclay.inria.fr")
  380. (synopsis "Coq library for Reals")
  381. (description "Coquelicot is an easier way of writing formulas and theorem
  382. statements, achieved by relying on total functions in place of dependent types
  383. for limits, derivatives, integrals, power series, and so on. To help with the
  384. proof process, the library comes with a comprehensive set of theorems that cover
  385. not only these notions, but also some extensions such as parametric integrals,
  386. two-dimensional differentiability, asymptotic behaviors. It also offers some
  387. automations for performing differentiability proofs. Moreover, Coquelicot is a
  388. conservative extension of Coq's standard library and provides correspondence
  389. theorems between the two libraries.")
  390. (license license:lgpl3+)))
  391. (define-public coq-bignums
  392. (package
  393. (name "coq-bignums")
  394. (version "8.13.0")
  395. (source (origin
  396. (method git-fetch)
  397. (uri (git-reference
  398. (url "https://github.com/coq/bignums")
  399. (commit (string-append "V" version))))
  400. (file-name (git-file-name name version))
  401. (sha256
  402. (base32
  403. "1n66i7hd9222b2ks606mak7m4f0dgy02xgygjskmmav6h7g2sx7y"))))
  404. (build-system gnu-build-system)
  405. (native-inputs
  406. `(("ocaml" ,ocaml)
  407. ("coq" ,coq)))
  408. (inputs
  409. `(("camlp5" ,camlp5)
  410. ("ocaml-zarith" ,ocaml-zarith)))
  411. (arguments
  412. `(#:tests? #f ; No test target.
  413. #:make-flags
  414. (list (string-append "COQLIBINSTALL=" (assoc-ref %outputs "out")
  415. "/lib/coq/user-contrib"))
  416. #:phases
  417. (modify-phases %standard-phases
  418. (delete 'configure))))
  419. (home-page "https://github.com/coq/bignums")
  420. (synopsis "Coq library for arbitrary large numbers")
  421. (description "Bignums is a coq library of arbitrary large numbers. It
  422. provides BigN, BigZ, BigQ that used to be part of Coq standard library.")
  423. (license license:lgpl2.1+)))
  424. (define-public coq-interval
  425. (package
  426. (name "coq-interval")
  427. (version "4.3.0")
  428. (source
  429. (origin
  430. (method git-fetch)
  431. (uri (git-reference
  432. (url "https://gitlab.inria.fr/coqinterval/interval.git")
  433. (commit (string-append "interval-" version))))
  434. (file-name (git-file-name name version))
  435. (sha256
  436. (base32
  437. "1jqvd17czhliscf40idhnxgrha620039ilrdyfahn71dg2jmzqnm"))))
  438. (build-system gnu-build-system)
  439. (native-inputs
  440. `(("autoconf" ,autoconf)
  441. ("automake" ,automake)
  442. ("ocaml" ,ocaml)
  443. ("which" ,which)
  444. ("coq" ,coq)))
  445. (propagated-inputs
  446. `(("flocq" ,coq-flocq)
  447. ("bignums" ,coq-bignums)
  448. ("coquelicot" ,coq-coquelicot)
  449. ("mathcomp" ,coq-mathcomp)
  450. ("ocaml-zarith" ,ocaml-zarith)))
  451. (arguments
  452. `(#:configure-flags
  453. (list (string-append "COQUSERCONTRIB=" (assoc-ref %outputs "out")
  454. "/lib/coq/user-contrib"))
  455. #:phases
  456. (modify-phases %standard-phases
  457. (add-before 'configure 'fix-remake
  458. (lambda _
  459. (substitute* "remake.cpp"
  460. (("/bin/sh") (which "sh")))
  461. #t))
  462. (replace 'build
  463. (lambda _ (invoke "./remake")))
  464. (replace 'check
  465. (lambda _ (invoke "./remake" "check")))
  466. (replace 'install
  467. (lambda _ (invoke "./remake" "install"))))))
  468. (home-page "http://coq-interval.gforge.inria.fr/")
  469. (synopsis "Coq tactics to simplify inequality proofs")
  470. (description "Interval provides vernacular files containing tactics for
  471. simplifying the proofs of inequalities on expressions of real numbers for the
  472. Coq proof assistant.")
  473. (license license:cecill-c)))
  474. (define-public coq-autosubst
  475. ;; Latest commit on that branch, where work on supporting coq 8.6 and
  476. ;; more recent versions of coq happen.
  477. (let ((branch "coq86-devel")
  478. (commit "fa6ef30664511ffa659cbcf3c962715cbee03572"))
  479. (package
  480. (name "coq-autosubst")
  481. (version (git-version "1" branch commit))
  482. (source (origin
  483. (method git-fetch)
  484. (uri (git-reference
  485. (url "git://github.com/uds-psl/autosubst")
  486. (commit commit)))
  487. (file-name (git-file-name name version))
  488. (sha256
  489. (base32 "1cl0bp96bk6lplbl7n5c703vd3gvbs5mvf2qrf8q333kkqd7jqq4"))))
  490. (build-system gnu-build-system)
  491. (arguments
  492. `(#:tests? #f
  493. #:phases
  494. (modify-phases %standard-phases
  495. (delete 'configure)
  496. (replace 'install
  497. (lambda* (#:key outputs #:allow-other-keys)
  498. (setenv "COQLIB" (string-append (assoc-ref outputs "out") "/lib/coq/"))
  499. (invoke "make"
  500. (string-append "COQLIB=" (assoc-ref outputs "out")
  501. "/lib/coq/")
  502. "install"))))))
  503. (native-inputs
  504. `(("coq" ,coq)))
  505. (home-page "https://www.ps.uni-saarland.de/autosubst/")
  506. (synopsis "Coq library for parallel de Bruijn substitutions")
  507. (description "Formalizing syntactic theories with variable binders is
  508. not easy. Autosubst is a library for the Coq proof assistant to
  509. automate this process. Given an inductive definition of syntactic objects in
  510. de Bruijn representation augmented with binding annotations, Autosubst
  511. synthesizes the parallel substitution operation and automatically proves the
  512. basic lemmas about substitutions. This library contains an automation
  513. tactic that solves equations involving terms and substitutions. This makes the
  514. usage of substitution lemmas unnecessary. The tactic is based on our current
  515. work on a decision procedure for the equational theory of an extension of the
  516. sigma-calculus by Abadi et al. The library is completely written in Coq and
  517. uses Ltac to synthesize the substitution operation.")
  518. (license license:bsd-3))))
  519. (define-public coq-equations
  520. (package
  521. (name "coq-equations")
  522. (version "1.2.4")
  523. (source (origin
  524. (method git-fetch)
  525. (uri (git-reference
  526. (url "https://github.com/mattam82/Coq-Equations")
  527. (commit (string-append "v" version "-8.13"))))
  528. (file-name (git-file-name name version))
  529. (sha256
  530. (base32
  531. "0i014lshsdflzw6h0qxra9d2f0q82vffxv2f29awbb9ad0p4rq4q"))))
  532. (build-system gnu-build-system)
  533. (native-inputs
  534. `(("ocaml" ,ocaml)
  535. ("coq" ,coq)
  536. ("camlp5" ,camlp5)))
  537. (inputs
  538. `(("ocaml-zarith" ,ocaml-zarith)))
  539. (arguments
  540. `(#:test-target "test-suite"
  541. #:phases
  542. (modify-phases %standard-phases
  543. (replace 'configure
  544. (lambda* (#:key outputs #:allow-other-keys)
  545. (invoke "sh" "./configure.sh")))
  546. (replace 'install
  547. (lambda* (#:key outputs #:allow-other-keys)
  548. (invoke "make"
  549. (string-append "COQLIB=" (assoc-ref outputs "out")
  550. "/lib/coq/")
  551. "install"))))))
  552. (home-page "https://mattam82.github.io/Coq-Equations/")
  553. (synopsis "Function definition plugin for Coq")
  554. (description "Equations provides a notation for writing programs
  555. by dependent pattern-matching and (well-founded) recursion in Coq. It
  556. compiles everything down to eliminators for inductive types, equality
  557. and accessibility, providing a definitional extension to the Coq
  558. kernel.")
  559. (license license:lgpl2.1)))
  560. (define-public coq-stdpp
  561. (package
  562. (name "coq-stdpp")
  563. (version "1.5.0")
  564. (synopsis "Alternative Coq standard library std++")
  565. (source (origin
  566. (method git-fetch)
  567. (uri (git-reference
  568. (url "https://gitlab.mpi-sws.org/iris/stdpp.git")
  569. (commit (string-append "coq-stdpp-" version))))
  570. (file-name (git-file-name name version))
  571. (sha256
  572. (base32
  573. "1ym0fy620imah89p8b6rii8clx2vmnwcrbwxl3630h24k42092nf"))))
  574. (build-system gnu-build-system)
  575. (inputs
  576. `(("coq" ,coq)))
  577. (arguments
  578. `(#:tests? #f ; Tests are executed during build phase.
  579. #:phases
  580. (modify-phases %standard-phases
  581. (delete 'configure)
  582. (replace 'install
  583. (lambda* (#:key outputs #:allow-other-keys)
  584. (invoke "make"
  585. (string-append "COQLIB=" (assoc-ref outputs "out")
  586. "/lib/coq/")
  587. "install"))))))
  588. (description "This project contains an extended \"Standard Library\" for
  589. Coq called coq-std++. The key features are:
  590. @itemize
  591. @item Great number of definitions and lemmas for common data structures such
  592. as lists, finite maps, finite sets, and finite multisets.
  593. @item Type classes for common notations (like ∅, ∪, and Haskell-style monad
  594. notations) so that these can be overloaded for different data structures.
  595. @item It uses type classes to keep track of common properties of types, like
  596. it having decidable equality or being countable or finite.
  597. @item Most data structures are represented in canonical ways so that Leibniz
  598. equality can be used as much as possible (for example, for maps we have m1 =
  599. m2 iff ∀ i, m1 !! i = m2 !! i). On top of that, the library provides setoid
  600. instances for most types and operations.
  601. @item Various tactics for common tasks, like an ssreflect inspired done tactic
  602. for finishing trivial goals, a simple breadth-first solver naive_solver, an
  603. equality simplifier simplify_eq, a solver solve_proper for proving
  604. compatibility of functions with respect to relations, and a solver set_solver
  605. for goals involving set operations.
  606. @item The library is dependency- and axiom-free.
  607. @end itemize")
  608. (home-page "https://gitlab.mpi-sws.org/iris/stdpp")
  609. (license license:bsd-3)))