{"id":20687210,"url":"https://github.com/aztek/atp","last_synced_at":"2025-10-15T11:23:16.240Z","repository":{"id":62435575,"uuid":"188205497","full_name":"aztek/atp","owner":"aztek","description":"Haskell interface to automated theorem provers","archived":false,"fork":false,"pushed_at":"2022-02-10T11:37:08.000Z","size":360,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-22T15:09:15.269Z","etag":null,"topics":["atp","automated-theorem-provers","first-order-logic","formal-methods","haskell","logic","prover","theorem-proving","tptp"],"latest_commit_sha":null,"homepage":"https://hackage.haskell.org/package/atp","language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aztek.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-23T09:42:08.000Z","updated_at":"2025-02-14T16:45:08.000Z","dependencies_parsed_at":"2022-11-01T21:16:41.958Z","dependency_job_id":null,"html_url":"https://github.com/aztek/atp","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aztek%2Fatp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aztek%2Fatp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aztek%2Fatp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aztek%2Fatp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aztek","download_url":"https://codeload.github.com/aztek/atp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250264909,"owners_count":21402004,"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":["atp","automated-theorem-provers","first-order-logic","formal-methods","haskell","logic","prover","theorem-proving","tptp"],"created_at":"2024-11-16T22:56:26.630Z","updated_at":"2025-10-15T11:23:11.216Z","avatar_url":"https://github.com/aztek.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Haskell interface to automated theorem provers\n\n[![Hackage](https://img.shields.io/hackage/v/atp.svg?logo=haskell)](https://hackage.haskell.org/package/atp) [![Hackage CI](https://matrix.hackage.haskell.org/api/v2/packages/atp/badge)](https://matrix.hackage.haskell.org/#/package/atp) [![Build Status](https://travis-ci.org/aztek/atp.svg?branch=master)](https://travis-ci.org/aztek/atp)\n\nExpress theorems in first-order logic and automatically prove them using third-party reasoning tools.\n\n\u003e All humans are mortal.\n\u003e\n\u003e Socrates is a human.\n\u003e\n\u003e Therefore, Socrates is mortal.\n\n```haskell\nimport ATP\n\nhuman, mortal :: UnaryPredicate\nhuman = UnaryPredicate \"human\"\nmortal = UnaryPredicate \"mortal\"\n\nsocrates :: Constant\nsocrates = \"socrates\"\n\nhumansAreMortal, socratesIsHuman, socratesIsMortal :: Formula\nhumansAreMortal = forall $ \\x -\u003e human x ==\u003e mortal x\nsocratesIsHuman = human socrates\nsocratesIsMortal = mortal socrates\n\nsyllogism :: Theorem\nsyllogism = [humansAreMortal, socratesIsHuman] |- socratesIsMortal\n```\n\n(See [examples](https://github.com/aztek/atp/tree/master/examples) for more.)\n\n`pprint` pretty-prints theorems and proofs.\n\n```\nλ: pprint syllogism\nAxiom 1. ∀ x . (human(x) =\u003e mortal(x))\nAxiom 2. human(socrates)\nConjecture. mortal(socrates)\n```\n\n`prove` runs a third-party automated first-order theorem prover [E](https://wwwlehre.dhbw-stuttgart.de/~sschulz/E/E.html) to construct a proof of the syllogism.\n\n```\nλ: prove syllogism \u003e\u003e= pprint\nFound a proof by refutation.\n1. human(socrates) [axiom]\n2. ∀ x . (human(x) =\u003e mortal(x)) [axiom]\n3. mortal(socrates) [conjecture]\n4. ￢mortal(socrates) [negated conjecture 3]\n5. ∀ x . (￢human(x) ⋁ mortal(x)) [variable_rename 2]\n6. mortal(x) ⋁ ￢human(x) [split_conjunct 5]\n7. mortal(socrates) [paramodulation 6, 1]\n8. ⟘ [cn 4, 7]\n```\n\nThe proof returned by the theorem prover is a directed acyclic graph of logical inferences. Each logical inference is a step of the proof that derives a conclusion from zero or more premises using one of the predefined inference rules. The proof starts with negating the conjecture (step 4) and ends with a contradiction (step 8) and therefore is a proof by _refutation_.\n\n`proveUsing` runs a given theorem prover, currently supported are [E](https://wwwlehre.dhbw-stuttgart.de/~sschulz/E/E.html) and [Vampire](https://vprover.github.io/). `proveUsing vampire syllogism` runs Vampire that finds a proof that is very similar to the one above.\n\nSee [Hackage](https://hackage.haskell.org/package/atp/docs/ATP.html) for the Haddock documentation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faztek%2Fatp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faztek%2Fatp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faztek%2Fatp/lists"}