A library of mechanised undecidability proofs in the Coq proof assistant.
Rocq Prover
143
1,486 commits
updated Jun 24, 2026
The Coq Library of Undecidability Proofs contains mechanised reductions to establish undecidability results in Coq.
The undecidability proofs are based on a synthetic approach to undecidability.
A problem P is considered undecidable if its decidability in Coq implies the enumerability of the complement of halting problem for Turing machines (SBTM_HALT in TM/SBTM.v).
Since the Turing machine halting is enumerable (SBTM_HALT_enum in TM/SBTM_enum.v), enumerability of its complement would classically imply its decidability.
As in the traditional literature, undecidability of a problem P in the library is often established by constructing a many-one reduction from an undecidable problem to P.
For more information on the structure of the library, the synthetic approach, and included problems see Publications below, our Wiki, look at the slides or the recording of the talk on the Coq Library of Undecidability proofs at CoqPL '20.
The library is a collaborative effort, growing constantly and we invite everybody to contribute undecidability proofs!
The problems in the library can mostly be categorized into seed problems, advanced problems, and target problems.
Seed problems are simple to state and thus make for good starting points of undecidability proofs, often leading to easier reductions to other problems.
Advanced problems do not work well as seeds, but they highlight the potential of our library as a framework for mechanically checking pen&paper proofs of potentially hard undecidability results. Some advanced problems are proven decidable to contrast negative results.
Target problems are very expressive and thus work well as targets for reduction, with the aim of closing loops in the reduction graph to establish the inter-reducibility of problems.
SBTM_HALT in TM/SBTM.v)PCP in PCP/PCP.v)MM2_HALTING in MinskyMachines/MM2.v)FRACTRAN_REG_HALTING in FRACTRAN/FRACTRAN.v)x = 1, x = y + z or x = y · z (H10C_SAT in DiophantineConstraints/H10C.v)x = 1 + y + z · z (H10UC_SAT in DiophantineConstraints/H10C.v)CM1_HALT in CounterMachines/CM1.v)FMsetC_SAT in SetConstraints/FMsetC.v)SSTS01 in StringRewriting/SSTS.v)HaltL in L/L.v)HaltMTM in TM/TM.v)HaltTM 1 in TM/TM.v)HaltSBTM in TM/SBTM.v)PCTM_HALT in TM/PCTM.v)BSM_HALTING in StackMachines/BSM.v)MM_HALTING and MMA_HALTING n in MinskyMachines/MM.v)MUREC_HALTING in MuRec/recalg.v)wCBNclosed in LambdaCalculus/Lambda.v)An equivalence proof that most of the mentioned models of computation compute the same n-ary functional relations over natural numbers is available in Models_Equivalent.v.
FOL*_prv_intu, FOL_prv_intu, FOL_prv_class in FOL/FOL.v), including a formulation for the minimal binary signature (FOL/binFOL.v)FOL*_valid, FOL_valid_intu in FOL/FOL.v)FOL*_satis, FOL_satis_intu in FOL/FOL.v)FSAT in FOL/FSAT.v based on TRAKHTENBROT/red_utils.v)FOL/ZF.v) and without (FOL/minZF.v and FOL/binZF.v) function symbols for set operationsFOL/PA.v)EILL_PROVABILITY in ILL/EILL.v)ILL_PROVABILITY in ILL/ILL.v)CLL_cf_PROVABILITY in ILL/CLL.v)IMSELL_cf_PROVABILITY3 in ILL/IMSELL.v)BI_SEQ_PROVABLE) and
of provability in its Hilbert calculus (BI_HILBERT_PROVABLE), to be found in BI/BI.v; see also the undecidability of BIHSC_PRV in HilbertCalculi/HSC.v)HSC_AX in HilbertCalculi/HSC.v)SLSAT in SeparationLogic/SL.v and MSLSAT in SeparationLogic/MSL.v)SOL/PA2.v)SOL/SOL.v)CFI in CFG/CFG.v)CFP in CFG/CFG.v)ndMM2_ACCEPT in MinskyMachines/ndMM2.v)ACM2_ACCEPT in MinskyMachines/ACM2.v), see also the undecidability of BISR and TSR in StringRewriting/SR.v)PCSnf in StringRewriting/PCSnf.v)H10 in H10/H10.v)x = 1, x = y + z, x = X · y (LPolyNC_SAT in PolynomialConstraints/LPolyNC.v)CM1_HALT in CounterMachines/CM1.v)FMsetC_SAT in SetConstraints/FMsetC.v)SMNdl_UB in StackMachines/SMN.v)SemiU in SemiUnification/SemiU.v)KrivineM_HALT in LambdaCalculus/Krivine.v)SNclosed in LambdaCalculus/Lambda.v)SysF_INH in SystemF/SysF.v), System F Typability (SysF_TYP in SystemF/SysF.v), System F Type Checking (SysF_TC in SystemF/SysF.v)CD_INH in IntersectionTypes/CD.v), Intersection Type Typability (CD_TYP in IntersectionTypes/CD.v), Intersection Type Type Checking (CD_TC in IntersectionTypes/CD.v)HOMbeta in LambdaCalculus/HOMatching.v)MPM2_HALT in MinskyMachines/Deciders/MPM2_HALT_dec.v)MM2_HALTING in MinskyMachines/MM2.v.MM2_REV_HALT in MinskyMachines/MM2.v)MM2_UMORTAL in MinskyMachines/MM2.v)MM2_UBOUNDED in MinskyMachines/MM2.v)HaltL in L/L.v)FOL/FOL.v)If you can use opam 2 on your system, you can follow the instructions here.
You can use opam to install the current state of this branch as follows.
We recommend creating a fresh opam switch:
opam switch create coq-library-undecidability --packages=ocaml-variants.4.14.2+options,ocaml-option-flambda
eval $(opam env)
Then the following commands install the library:
opam repo add coq-released https://coq.inria.fr/opam/released
opam update
opam pin add coq-library-undecidability.dev+9.2 "https://github.com/uds-psl/coq-library-undecidability.git#rocq-9.2"
You need Rocq 9.2 built on OCAML >= 4.09.1 (but we recommend and test OCaml version 4.14.2+flambda) and the Template-Coq part of the MetaCoq package for Coq. If you are using opam 2 you can use the following commands to install the dependencies on a new switch:
opam switch create coq-library-undecidability --packages=ocaml-variants.4.14.2+options,ocaml-option-flambda
eval $(opam env)
opam repo add rocq-released https://rocq-prover.org/opam/released
opam update
opam install . --deps-only
make all builds the librarymake TM/TM.vo compiles only the file theories/TM/TM.v and its dependenciesmake html generates clickable coqdoc .html in the website subdirectorymake clean removes all build files in theories and .html files in the website directoryThe library is compatible with Coq's compiled interfaces (vos) for quick infrastructural access.
make vos builds compiled interfaces for the librarymake vok checks correctness of the libraryBe careful that this branch only compiles under Rocq 9.2. If you want to use a different Coq version you have to change to a different branch.
Due to compatibility issues, not every branch contains exactly the same problems.
We recommend to use the newest branch if possible.
A Coq Library of Undecidable Problems. Yannick Forster, Dominique Larchey-Wendling, Andrej Dudenhefner, Edith Heiter, Dominik Kirst, Fabian Kunze, Gert Smolka, Simon Spies, Dominik Wehr, Maximilian Wuttke. CoqPL '20. https://popl20.sigplan.org/details/CoqPL-2020-papers/5/A-Coq-Library-of-Undecidable-Problems
Computability in Constructive Type Theory. Yannick Forster. PhD thesis. https://dx.doi.org/10.22028/D291-35758
MinskyMachines/Deciders. https://drops.dagstuhl.de/opus/volltexte/2022/16297/SemiUnification. https://drops.dagstuhl.de/opus/volltexte/2022/15738/SOL. https://www.ps.uni-saarland.de/extras/cpp22-sol/TM/L. https://drops.dagstuhl.de/opus/volltexte/2021/13914/ILL/IMSELL.v. Also documents
the undecidability proof for 2-counters Minsky machines MinskyMachines/MM2.v via FRACTRAN. https://github.com/uds-psl/coq-library-undecidability/releases/tag/FSCD-2021/SystemF. https://ieeexplore.ieee.org/document/9470520TRAKTHENBROT. https://www.ps.uni-saarland.de/extras/fol-trakh/SemiUnification. https://www.ps.uni-saarland.de/Publications/documents/Dudenhefner_2020_Semi-unification.pdfHilbertCalculi. https://types2020.di.unito.it/abstracts/BookOfAbstractsTYPES2020.pdf#page=94HOU. https://www.ps.uni-saarland.de/Publications/details/SpiesForster:2019:UndecidabilityHOU.htmlTM. https://github.com/uds-psl/tm-verification-framework/H10. https://uds-psl.github.io/H10L. https://github.com/uds-psl/certifying-extraction-with-time-boundsILL. http://uds-psl.github.io/ill-undecidability/FOL. https://www.ps.uni-saarland.de/extras/fol-undecL/AbstractMachines. https://www.ps.uni-saarland.de/extras/cbvlcm2/ILL. https://www.ps.uni-saarland.de/~forster/downloads/LOLA-2018-coq-library-undecidability.pdfPCP. https://ps.uni-saarland.de/extras/PCPL. https://www.ps.uni-saarland.de/extras/L-computability/Fork the project on GitHub, add a new subdirectory for your project and your files, then file a pull request. We have guidelines for the directory structure of projects.
Parts of the Coq Library of Undecidability Proofs reuse generic code initially developed as a library for the lecture "Introduction to Computational Logics" at Saarland University, which was written by a subset of the above contributors, Sigurd Schneider, and Jan Christian Menz.
Minsky, Marvin Lee. Computation. Englewood Cliffs: Prentice-Hall, 1967. ↩
Rocq Prover
99.7%
A library of mechanised undecidability proofs in the Coq proof assistant.
Rocq Prover
143
1,486 commits
updated Jun 24, 2026
The Coq Library of Undecidability Proofs contains mechanised reductions to establish undecidability results in Coq.
The undecidability proofs are based on a synthetic approach to undecidability.
A problem P is considered undecidable if its decidability in Coq implies the enumerability of the complement of halting problem for Turing machines (SBTM_HALT in TM/SBTM.v).
Since the Turing machine halting is enumerable (SBTM_HALT_enum in TM/SBTM_enum.v), enumerability of its complement would classically imply its decidability.
As in the traditional literature, undecidability of a problem P in the library is often established by constructing a many-one reduction from an undecidable problem to P.
For more information on the structure of the library, the synthetic approach, and included problems see Publications below, our Wiki, look at the slides or the recording of the talk on the Coq Library of Undecidability proofs at CoqPL '20.
The library is a collaborative effort, growing constantly and we invite everybody to contribute undecidability proofs!
The problems in the library can mostly be categorized into seed problems, advanced problems, and target problems.
Seed problems are simple to state and thus make for good starting points of undecidability proofs, often leading to easier reductions to other problems.
Advanced problems do not work well as seeds, but they highlight the potential of our library as a framework for mechanically checking pen&paper proofs of potentially hard undecidability results. Some advanced problems are proven decidable to contrast negative results.
Target problems are very expressive and thus work well as targets for reduction, with the aim of closing loops in the reduction graph to establish the inter-reducibility of problems.
SBTM_HALT in TM/SBTM.v)PCP in PCP/PCP.v)MM2_HALTING in MinskyMachines/MM2.v)FRACTRAN_REG_HALTING in FRACTRAN/FRACTRAN.v)x = 1, x = y + z or x = y · z (H10C_SAT in DiophantineConstraints/H10C.v)x = 1 + y + z · z (H10UC_SAT in DiophantineConstraints/H10C.v)CM1_HALT in CounterMachines/CM1.v)FMsetC_SAT in SetConstraints/FMsetC.v)SSTS01 in StringRewriting/SSTS.v)HaltL in L/L.v)HaltMTM in TM/TM.v)HaltTM 1 in TM/TM.v)HaltSBTM in TM/SBTM.v)PCTM_HALT in TM/PCTM.v)BSM_HALTING in StackMachines/BSM.v)MM_HALTING and MMA_HALTING n in MinskyMachines/MM.v)MUREC_HALTING in MuRec/recalg.v)wCBNclosed in LambdaCalculus/Lambda.v)An equivalence proof that most of the mentioned models of computation compute the same n-ary functional relations over natural numbers is available in Models_Equivalent.v.
FOL*_prv_intu, FOL_prv_intu, FOL_prv_class in FOL/FOL.v), including a formulation for the minimal binary signature (FOL/binFOL.v)FOL*_valid, FOL_valid_intu in FOL/FOL.v)FOL*_satis, FOL_satis_intu in FOL/FOL.v)FSAT in FOL/FSAT.v based on TRAKHTENBROT/red_utils.v)FOL/ZF.v) and without (FOL/minZF.v and FOL/binZF.v) function symbols for set operationsFOL/PA.v)EILL_PROVABILITY in ILL/EILL.v)ILL_PROVABILITY in ILL/ILL.v)CLL_cf_PROVABILITY in ILL/CLL.v)IMSELL_cf_PROVABILITY3 in ILL/IMSELL.v)BI_SEQ_PROVABLE) and
of provability in its Hilbert calculus (BI_HILBERT_PROVABLE), to be found in BI/BI.v; see also the undecidability of BIHSC_PRV in HilbertCalculi/HSC.v)HSC_AX in HilbertCalculi/HSC.v)SLSAT in SeparationLogic/SL.v and MSLSAT in SeparationLogic/MSL.v)SOL/PA2.v)SOL/SOL.v)CFI in CFG/CFG.v)CFP in CFG/CFG.v)ndMM2_ACCEPT in MinskyMachines/ndMM2.v)ACM2_ACCEPT in MinskyMachines/ACM2.v), see also the undecidability of BISR and TSR in StringRewriting/SR.v)PCSnf in StringRewriting/PCSnf.v)H10 in H10/H10.v)x = 1, x = y + z, x = X · y (LPolyNC_SAT in PolynomialConstraints/LPolyNC.v)CM1_HALT in CounterMachines/CM1.v)FMsetC_SAT in SetConstraints/FMsetC.v)SMNdl_UB in StackMachines/SMN.v)SemiU in SemiUnification/SemiU.v)KrivineM_HALT in LambdaCalculus/Krivine.v)SNclosed in LambdaCalculus/Lambda.v)SysF_INH in SystemF/SysF.v), System F Typability (SysF_TYP in SystemF/SysF.v), System F Type Checking (SysF_TC in SystemF/SysF.v)CD_INH in IntersectionTypes/CD.v), Intersection Type Typability (CD_TYP in IntersectionTypes/CD.v), Intersection Type Type Checking (CD_TC in IntersectionTypes/CD.v)HOMbeta in LambdaCalculus/HOMatching.v)MPM2_HALT in MinskyMachines/Deciders/MPM2_HALT_dec.v)MM2_HALTING in MinskyMachines/MM2.v.MM2_REV_HALT in MinskyMachines/MM2.v)MM2_UMORTAL in MinskyMachines/MM2.v)MM2_UBOUNDED in MinskyMachines/MM2.v)HaltL in L/L.v)FOL/FOL.v)If you can use opam 2 on your system, you can follow the instructions here.
You can use opam to install the current state of this branch as follows.
We recommend creating a fresh opam switch:
opam switch create coq-library-undecidability --packages=ocaml-variants.4.14.2+options,ocaml-option-flambda
eval $(opam env)
Then the following commands install the library:
opam repo add coq-released https://coq.inria.fr/opam/released
opam update
opam pin add coq-library-undecidability.dev+9.2 "https://github.com/uds-psl/coq-library-undecidability.git#rocq-9.2"
You need Rocq 9.2 built on OCAML >= 4.09.1 (but we recommend and test OCaml version 4.14.2+flambda) and the Template-Coq part of the MetaCoq package for Coq. If you are using opam 2 you can use the following commands to install the dependencies on a new switch:
opam switch create coq-library-undecidability --packages=ocaml-variants.4.14.2+options,ocaml-option-flambda
eval $(opam env)
opam repo add rocq-released https://rocq-prover.org/opam/released
opam update
opam install . --deps-only
make all builds the librarymake TM/TM.vo compiles only the file theories/TM/TM.v and its dependenciesmake html generates clickable coqdoc .html in the website subdirectorymake clean removes all build files in theories and .html files in the website directoryThe library is compatible with Coq's compiled interfaces (vos) for quick infrastructural access.
make vos builds compiled interfaces for the librarymake vok checks correctness of the libraryBe careful that this branch only compiles under Rocq 9.2. If you want to use a different Coq version you have to change to a different branch.
Due to compatibility issues, not every branch contains exactly the same problems.
We recommend to use the newest branch if possible.
A Coq Library of Undecidable Problems. Yannick Forster, Dominique Larchey-Wendling, Andrej Dudenhefner, Edith Heiter, Dominik Kirst, Fabian Kunze, Gert Smolka, Simon Spies, Dominik Wehr, Maximilian Wuttke. CoqPL '20. https://popl20.sigplan.org/details/CoqPL-2020-papers/5/A-Coq-Library-of-Undecidable-Problems
Computability in Constructive Type Theory. Yannick Forster. PhD thesis. https://dx.doi.org/10.22028/D291-35758
MinskyMachines/Deciders. https://drops.dagstuhl.de/opus/volltexte/2022/16297/SemiUnification. https://drops.dagstuhl.de/opus/volltexte/2022/15738/SOL. https://www.ps.uni-saarland.de/extras/cpp22-sol/TM/L. https://drops.dagstuhl.de/opus/volltexte/2021/13914/ILL/IMSELL.v. Also documents
the undecidability proof for 2-counters Minsky machines MinskyMachines/MM2.v via FRACTRAN. https://github.com/uds-psl/coq-library-undecidability/releases/tag/FSCD-2021/SystemF. https://ieeexplore.ieee.org/document/9470520TRAKTHENBROT. https://www.ps.uni-saarland.de/extras/fol-trakh/SemiUnification. https://www.ps.uni-saarland.de/Publications/documents/Dudenhefner_2020_Semi-unification.pdfHilbertCalculi. https://types2020.di.unito.it/abstracts/BookOfAbstractsTYPES2020.pdf#page=94HOU. https://www.ps.uni-saarland.de/Publications/details/SpiesForster:2019:UndecidabilityHOU.htmlTM. https://github.com/uds-psl/tm-verification-framework/H10. https://uds-psl.github.io/H10L. https://github.com/uds-psl/certifying-extraction-with-time-boundsILL. http://uds-psl.github.io/ill-undecidability/FOL. https://www.ps.uni-saarland.de/extras/fol-undecL/AbstractMachines. https://www.ps.uni-saarland.de/extras/cbvlcm2/ILL. https://www.ps.uni-saarland.de/~forster/downloads/LOLA-2018-coq-library-undecidability.pdfPCP. https://ps.uni-saarland.de/extras/PCPL. https://www.ps.uni-saarland.de/extras/L-computability/Fork the project on GitHub, add a new subdirectory for your project and your files, then file a pull request. We have guidelines for the directory structure of projects.
Parts of the Coq Library of Undecidability Proofs reuse generic code initially developed as a library for the lecture "Introduction to Computational Logics" at Saarland University, which was written by a subset of the above contributors, Sigurd Schneider, and Jan Christian Menz.
Minsky, Marvin Lee. Computation. Englewood Cliffs: Prentice-Hall, 1967. ↩
Rocq Prover
99.7%