https://github.com/finsberg/category-theory-python
Learning platform for category theory in python
https://github.com/finsberg/category-theory-python
category-theory functional-programming
Last synced: 3 months ago
JSON representation
Learning platform for category theory in python
- Host: GitHub
- URL: https://github.com/finsberg/category-theory-python
- Owner: finsberg
- License: mit
- Created: 2021-10-09T18:30:48.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2025-05-01T06:32:04.000Z (3 months ago)
- Last Synced: 2025-05-01T07:31:39.832Z (3 months ago)
- Topics: category-theory, functional-programming
- Language: Python
- Homepage: http://finsberg.github.io/category-theory-python/
- Size: 6.76 MB
- Stars: 16
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://results.pre-commit.ci/latest/github/finsberg/category-theory-python/main)
[](https://github.com/finsberg/category-theory-python/actions/workflows/main.yml)
[](https://github.com/finsberg/category-theory-python/actions/workflows/github-pages.yml)
[](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/finsberg/a7290de789564f03eb6b1ee122fce423/raw/category-theory-python-coverage.json)# Category Theory for python programmers
This is my attempt to implement some of the common structures from Category theory in python. Note that I am a beginner in Category theory and will use this repo as way to learn it.
Topics to be covered are
- [x] Monoids
- [ ] Functors (in progress)
- [ ] Applicative Functors (in progress)
- [ ] MonadsThis list might be more detailed in the future.
My assessment is manly based on the book called [Category Theory for Programmers](https://bartoszmilewski.com/2014/10/28/category-theory-for-programmers-the-preface/) by Bartosz Milewski and the podcast [LambdaCast](https://soundcloud.com/lambda-cast)
## Typing
I will also use this platform to investigate some of the more advanced features of python's typing system, and will therefore only support the latest version of python.
## Testing
I am definitely not capable of finding good test cases that can really test the corner cases of my implementation. Therefore I will try to use (and learn) property-based testing using [Hypothesis](https://hypothesis.readthedocs.io/en/latest/).
## Contributing
This repo is manly for me to learn about these concepts in Category theory. If anyone finds this useful that is great. If you spot any bugs or mistakes I have made I would be grateful if you could file an issue (or even better : first file an issue and then submit a PR).