{"id":19743242,"url":"https://github.com/light2802/theorem-prover","last_synced_at":"2025-09-05T07:34:35.117Z","repository":{"id":130708522,"uuid":"426372945","full_name":"light2802/Theorem-Prover","owner":"light2802","description":null,"archived":false,"fork":false,"pushed_at":"2021-11-09T20:18:26.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-03T21:30:09.255Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/light2802.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2021-11-09T20:16:03.000Z","updated_at":"2021-11-09T20:18:29.000Z","dependencies_parsed_at":"2023-06-01T11:30:59.758Z","dependency_job_id":null,"html_url":"https://github.com/light2802/Theorem-Prover","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/light2802/Theorem-Prover","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/light2802%2FTheorem-Prover","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/light2802%2FTheorem-Prover/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/light2802%2FTheorem-Prover/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/light2802%2FTheorem-Prover/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/light2802","download_url":"https://codeload.github.com/light2802/Theorem-Prover/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/light2802%2FTheorem-Prover/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273727550,"owners_count":25157132,"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","status":"online","status_checked_at":"2025-09-05T02:00:09.113Z","response_time":402,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-12T01:36:13.905Z","updated_at":"2025-09-05T07:34:35.070Z","avatar_url":"https://github.com/light2802.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"An automated theorem prover for first-order logic. For any provable formula, this program is guaranteed to find the proof (eventually). However, as a consequence of the negative answer to Hilbert's *Entscheidungsproblem*, there are some unprovable formulae that will cause this program to loop forever.\n\nSome notes:\n\n* The proof steps are shown as [sequents](http://en.wikipedia.org/wiki/Sequent).\n* The actual theorem prover is in `prover.py`. The command-line interface (including the parser) is in `main.py`. `language.py` contains boilerplate classes used to represent logical formulae.\n* The system will not accept a lemma unless it can be proven. An axiom is admitted without proof.\n* This is only a pedagogical tool. It is too slow to be used for anything practical.\n\nTo get started, run `main.py`:\n\n    $ ./main.py\n\n    Terms:\n\n      x               (variable)\n      f(term, ...)    (function)\n\n    Formulae:\n\n      P(term)        (predicate)\n      not P          (complement)\n      P or Q         (disjunction)\n      P and Q        (conjunction)\n      P implies Q    (implication)\n      forall x. P    (universal quantification)\n      exists x. P    (existential quantification)\n\n    Enter formulae at the prompt. The following commands are also available for manipulating axioms:\n\n      axioms              (list axioms)\n      lemmas              (list lemmas)\n      axiom \u003cformula\u003e     (add an axiom)\n      lemma \u003cformula\u003e     (prove and add a lemma)\n      remove \u003cformula\u003e    (remove an axiom or lemma)\n      reset               (remove all axioms and lemmas)\n\n    \u003e\n\nExample session:\n\n    \u003e P or not P\n    0. ⊢ (P ∨ ¬P)\n    1. ⊢ P, ¬P\n    2. P ⊢ P\n    Formula proven: (P ∨ ¬P).\n\n    \u003e P and not P\n    0. ⊢ (P ∧ ¬P)\n    1. ⊢ P\n    Formula unprovable: (P ∧ ¬P).\n\n    \u003e forall x. P(x) implies (Q(x) implies P(x))\n    0. ⊢ (∀x. (P(x) → (Q(x) → P(x))))\n    1. ⊢ (P(v1) → (Q(v1) → P(v1)))\n    2. P(v1) ⊢ (Q(v1) → P(v1))\n    3. Q(v1), P(v1) ⊢ P(v1)\n    Formula proven: (∀x. (P(x) → (Q(x) → P(x)))).\n\n    \u003e exists x. (P(x) implies forall y. P(y))\n    0. ⊢ (∃x. (P(x) → (∀y. P(y))))\n    1. ⊢ (P(t1) → (∀y. P(y))), (∃x. (P(x) → (∀y. P(y))))\n    2. P(t1) ⊢ (∀y. P(y)), (∃x. (P(x) → (∀y. P(y))))\n    3. P(t1) ⊢ (∀y. P(y)), (P(t2) → (∀y. P(y))), (∃x. (P(x) → (∀y. P(y))))\n    4. P(t1) ⊢ (P(t2) → (∀y. P(y))), (∃x. (P(x) → (∀y. P(y)))), P(v1)\n    5. P(t1), P(t2) ⊢ (∀y. P(y)), (∃x. (P(x) → (∀y. P(y)))), P(v1)\n    6. P(t1), P(t2) ⊢ (∀y. P(y)), (P(t3) → (∀y. P(y))), (∃x. (P(x) → (∀y. P(y)))), P(v1)\n    7. P(t1), P(t2) ⊢ (P(t3) → (∀y. P(y))), P(v2), (∃x. (P(x) → (∀y. P(y)))), P(v1)\n    8. P(t3), P(t1), P(t2) ⊢ (∀y. P(y)), P(v2), (∃x. (P(x) → (∀y. P(y)))), P(v1)\n      t3 = v1\n    Formula proven: (∃x. (P(x) → (∀y. P(y)))).\n\n    \u003e axiom forall x. Equals(x, x)\n    Axiom added: (∀x. Equals(x, x)).\n\n    \u003e axioms\n    (∀x. Equals(x, x))\n\n    \u003e lemma Equals(a, a)\n    0. (∀x. Equals(x, x)) ⊢ Equals(a, a)\n    1. Equals(t1, t1), (∀x. Equals(x, x)) ⊢ Equals(a, a)\n      t1 = a\n    Lemma proven: Equals(a, a).\n\n    \u003e lemmas\n    Equals(a, a)\n\n    \u003e remove forall x. Equals(x, x)\n    Axiom removed: (∀x. Equals(x, x)).\n    This lemma was proven using that axiom and was also removed:\n      Equals(a, a)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flight2802%2Ftheorem-prover","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flight2802%2Ftheorem-prover","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flight2802%2Ftheorem-prover/lists"}