{"id":19595926,"url":"https://github.com/innovativeinventor/hack-python-types","last_synced_at":"2025-07-12T21:34:13.630Z","repository":{"id":135191631,"uuid":"443181720","full_name":"InnovativeInventor/hack-python-types","owner":"InnovativeInventor","description":"Abusing Python’s type-checker (mypy) to construct a propositional, constructive logic proof checker via the Curry-Howard correspondence and the BHK interpretation of intuitionistic logic. (see blog post)","archived":false,"fork":false,"pushed_at":"2021-12-30T20:53:19.000Z","size":1,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-26T14:45:24.293Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://max.fan/posts/hacking-python-types/","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/InnovativeInventor.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-12-30T20:48:22.000Z","updated_at":"2024-12-20T20:58:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"2ccd1c08-ab29-4a7e-83a3-7d5f0ac2bceb","html_url":"https://github.com/InnovativeInventor/hack-python-types","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/InnovativeInventor/hack-python-types","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InnovativeInventor%2Fhack-python-types","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InnovativeInventor%2Fhack-python-types/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InnovativeInventor%2Fhack-python-types/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InnovativeInventor%2Fhack-python-types/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/InnovativeInventor","download_url":"https://codeload.github.com/InnovativeInventor/hack-python-types/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InnovativeInventor%2Fhack-python-types/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265059408,"owners_count":23705217,"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":[],"created_at":"2024-11-11T08:49:30.560Z","updated_at":"2025-07-12T21:34:13.574Z","avatar_url":"https://github.com/InnovativeInventor.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## hack-python-types\nThis repo contains the code and fully type-checkable proofs for various natural deduction inference rules in Python's type system.\nIt is intended to accompany [my blog post on the hacking Python's type system](https://max.fan/posts/hacking-python-types/).\n\nYou can see the corresponding proofs at [`/natural_deduction.py`](/natural_deduction.py).\n\nTo type-check the proofs yourself, run:\n```\nmypy .\n```\n\nSee [https://max.fan/posts/hacking-python-types/](https://max.fan/posts/hacking-python-types/) for more.\n\n## Contents\nThis repo proves the following natural deduction rules in Python's type system:\n- modus ponens\n- contrapositive\n- modus tollens\n- transitive implication (if A implies B and B implies C, then A implies C)\n- conjunction introduction\n- conjunction elimination\n- disjunction introduction\n\nAdditionally, type definitions/stubs are given for:\n- modus tollendo ponens (admitted as axiom -- not proven yet)\n- constructive dilemma (admitted as axiom -- not proven yet)\n\nFeedback is welcome.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finnovativeinventor%2Fhack-python-types","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finnovativeinventor%2Fhack-python-types","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finnovativeinventor%2Fhack-python-types/lists"}