{"id":16334973,"url":"https://github.com/ncfavier/muri","last_synced_at":"2025-04-10T15:31:31.859Z","repository":{"id":66325174,"uuid":"301118393","full_name":"ncfavier/muri","owner":"ncfavier","description":"A theorem prover for intuitionistic propositional logic","archived":false,"fork":false,"pushed_at":"2025-01-22T18:58:02.000Z","size":31,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T23:18:06.331Z","etag":null,"topics":["curry-howard-isomorphism","intuitionistic-logic","theorem-prover"],"latest_commit_sha":null,"homepage":"","language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ncfavier.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-04T11:59:09.000Z","updated_at":"2025-02-03T17:34:22.000Z","dependencies_parsed_at":"2023-03-10T23:49:27.376Z","dependency_job_id":null,"html_url":"https://github.com/ncfavier/muri","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ncfavier%2Fmuri","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ncfavier%2Fmuri/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ncfavier%2Fmuri/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ncfavier%2Fmuri/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ncfavier","download_url":"https://codeload.github.com/ncfavier/muri/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248243452,"owners_count":21071054,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["curry-howard-isomorphism","intuitionistic-logic","theorem-prover"],"created_at":"2024-10-10T23:39:44.892Z","updated_at":"2025-04-10T15:31:31.842Z","avatar_url":"https://github.com/ncfavier.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `muri :: Type -\u003e Maybe Term`\n\nmuri takes a Haskell type, and generates a Haskell term with that type (or a more general one), if possible.\n\nEquivalently, under the [propositions-as-types correspondence](https://en.wikipedia.org/wiki/Curry%E2%80%93Howard_correspondence), muri is a theorem prover for intuitionistic propositional logic. It takes a proposition as input, and produces a proof of that proposition, if one exists.\n\nInput types are restricted to type variables, the unit type `()`, product types `(a, b)`, the empty type `Void`, sum types `Either a b` and function types `a -\u003e b`.\n\nOutput terms are built using lambda abstraction, function application, `let`, `absurd` and `case` expressions, the empty tuple `()`, pair construction and the `Left` and `Right` type constructors.\n\nmuri was inspired by Lennart Augustsson's [Djinn](https://github.com/augustss/djinn), and uses the LJT calculus from \"Contraction-Free Sequent Calculi for Intuitionistic Logic\" by Roy Dyckhoff to ensure termination.\n\n## Usage\n\n```sh\nmuri TYPE\n```\n\n## Examples\n\n```\n$ muri 'a -\u003e (b, c) -\u003e (b, (a, c))'\n\\a -\u003e \\(b, c) -\u003e (b, (a, c))\n```\n\n```\n$ muri '(a, b) -\u003e Either a b'\n\\(a, b) -\u003e Left a\n```\n\n```\n$ muri 'Either (a, c) (b, c) -\u003e (Either a b, c)'\n\\a -\u003e case a of { Left (b, c) -\u003e (Left b, c); Right (b, c) -\u003e (Right b, c) }\n```\n\n```\n$ muri '(Either (a -\u003e f) a -\u003e f) -\u003e f'\n\\a -\u003e a (Left (\\c -\u003e a (Right c)))\n```\n\n```\n$ muri '(a -\u003e b) -\u003e (Either (a -\u003e f) b -\u003e f) -\u003e f'\n\\a -\u003e \\b -\u003e b (Left (\\c -\u003e b (Right (a c))))\n```\n\n```\n$ muri '(Either (a -\u003e f) (b -\u003e f) -\u003e f) -\u003e ((a, b) -\u003e f) -\u003e f'\n\\a -\u003e \\b -\u003e a (Left (\\e -\u003e a (Right (\\f -\u003e b (e, f)))))\n```\n\n```\n$ muri '((a -\u003e b) -\u003e c) -\u003e ((a, b -\u003e c) -\u003e b) -\u003e c'\n\\a -\u003e \\b -\u003e a (\\f -\u003e b (f, \\e -\u003e a (\\_ -\u003e e)))\n```\n\n```\n$ muri '((((a -\u003e Void) -\u003e Void) -\u003e a) -\u003e a) -\u003e (a -\u003e Void) -\u003e Void'\n\\a -\u003e \\b -\u003e b (a (\\d -\u003e absurd (d b)))\n```\n\n```\n$ muri 'a -\u003e b'\nImpossible.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fncfavier%2Fmuri","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fncfavier%2Fmuri","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fncfavier%2Fmuri/lists"}