Giter Club home page Giter Club logo

lean-category-theory's Introduction

Archived, this repository is obsolete!

The entire contents have long ago become part of Mathlib.


Build Status

This repository develops the basics of category theory in Lean.

Some parts of this library have already been PR'd into mathlib, under category_theory, and hopefully more will come across soon.

Please note that our goal is not to produce a beautiful category theory library for Lean. Lean probably isn't ready for someone to try to write one! Instead, this is an experiment to discover how plausible it is that "working mathematicians" should be interested in the current state of interactive theorem proving. As such, we're trying to set a high bar for:

  • consistency with the way mathematicians think,
  • automation of everything so straightforward that a human mathematician wouldn't want to have to think about ("could an undergraduate do it?")
  • concise expression (e.g. no boilerplate or excessive redundancy)

We define

  • Category, functors, and natural transformations.
  • The category of functors between a pair of categories.
  • Isomorphisms, and equivalences of categories.

For now we only do a little of the usual development of "1-category theory", defining

  • Comma, slice, and coslice categories.
  • Limits ands colimits. Notably we haven't even mentioned adjunctions!

Instead our current primary interest is developing the theory of monoidal categories. (Note: for now all the material on monoidal categories is in https://github.com/semorrison/lean-monoidal-categories/.) We define

  • Cartesian products of categories, functors, and natural transformations.
  • A monoidal category, axiomatized as a category C, along with a functor C x C \to C, and an associator natural transformation satisfying the pentagon equation, which is an isomorphism.
  • A braided monoidal category, and a symmetric monoidal category.

As examples, we construct

  • The symmetric monoidal category of semigroups. (Note: the current implementation is extremely slow to compile!)
  • The symmetric monoidal category of types. (Note: also slow!)

Work in progress:

  • The Drinfeld centre of a monoidal category.
  • Internal objects (e.g. semigroups and monoids, and their modules) in monoidal categories.
  • Enriched categories.

As notational conventions, we denote

  • Categories by capital latin letters near the begining of the alphabet (C, D, E, and then A, B when needed),
  • Objects of categories by capital latin letters near the end of the alphabet,
  • Morphisms by lower case latin letters,
  • Functors by capital latin letters starting at F,
  • Natural transformations by greek letters.

lean-category-theory's People

Contributors

danielbarter avatar khoek avatar patrickmassot avatar rwbarton avatar sam-quinn avatar semorrison avatar timjb avatar xitian9 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lean-category-theory's Issues

Very basic question - how do I "install" it?

Hi,

I am new to both LEAN and Category theory... If you see my VS Code screenshot below, you see there are many warnings. Have I missed some basic configuration (say, setting paths to certain directories, etc) ?

Cheers,
Yasu, Tokyo

image

Error compiling "src/categories/universal/complete/functor_category_2.lean"

Compiling "visualiser" I get

/home/khoek/code/lean/lean-category-theory/src/categories/universal/complete/functor_category_2.lean:24:52: error: function expected at
  uncurry
term has type
  (?m_1 ↝ ?m_3 ↝ ?m_5) ↝ (?m_1 × ?m_3) ↝ ?m_5
Additional information:
/home/khoek/code/lean/lean-category-theory/src/categories/universal/complete/functor_category_2.lean:24:52: context: switched to simple application elaboration procedure because failed to use expected type to elaborate it, error message
  too many arguments
/home/khoek/code/lean/lean-category-theory/src/categories/universal/complete/functor_category_2.lean:24:111: error: function expected at
  curry
term has type
  ((?m_1 × ?m_2) ↝ ?m_5) ↝ ?m_1 ↝ ?m_2 ↝ ?m_5
Additional information:
/home/khoek/code/lean/lean-category-theory/src/categories/universal/complete/functor_category_2.lean:24:111: context: switched to simple application elaboration procedure because failed to use expected type to elaborate it, error message
  too many arguments

No idea if this was on purpose or not!

Where is the definition of 'category'?

I have looked everywhere in the files to find the definition of the record 'category', and I cannot find it. I am just interested in seeing how 'category' is defined in Lean at the moment.

I was surprised to see that import categories.category doesn't mean that there has to be a file called categories/category.lean that corresponds to that.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.