Andrej Bauer

math.andrej.com · Personal blog · on HN since 2007

Andrej Bauer, a mathematician, writes about constructive mathematics, computability, type theory, and functional programming.

What HN saysHN commenters call him a great resource on computability and uncomputable sets, and note his blog uses GitHub issues for comments.
114HN people shared it
62linked it in comments
68stories submitted
1.6Kstory points
3 months agolast shared
2007people per year2026

Most-shared posts

  1. 1
    Seemingly impossible functional programs (2007)
    20 people · 376 points · first shared 2007 · 45 comments on HN
  2. 2
    The Programming Language Zoo
    16 people · 118 points · first shared 2009 · 3 comments on HN
  3. 3
    Hask is not a category
    8 people · 58 points · first shared 2016 · 74 comments on HN
  4. 4
    Five stages of accepting constructive mathematics
    7 people · 3 points · first shared 2017 · discussion on HN
  5. 5
    Proof of negation and proof by contradiction (2010)
    6 people · 40 points · first shared 2013 · 37 comments on HN
  6. 6
  7. 7
    Sometimes all functions are continuous (2006)
    5 people · 61 points · first shared 2014 · 43 comments on HN
  8. 8
  9. 9
    Intuitionistic mathematics for physics
    5 people · 42 points · first shared 2009 · 10 comments on HN
  10. 10
  11. 11
    Python’s lambda is broken
    4 people · 31 points · first shared 2009 · 35 comments on HN
  12. 12
    Programming with Algebraic Effects and Handlers
    4 people · 6 points · first shared 2012 · discussion on HN
  13. 13
    The Dawn of Formalized Mathematics
    3 people · 137 points · first shared 2021 · 58 comments on HN
  14. 14
    “Every proof assistant” online lecture
    3 people · 13 points · first shared 2020 · discussion on HN
  15. 15
    Become an Objectivist in Ten Easy Steps
    3 people · 3 points · first shared 2009 · discussion on HN

What HN people wrote when they linked it

black_knight · 2026-05-21
Sure. These toposes are well known, and proven to be consistent (relative to set theory). For instance Hyland’s effective topos, or Johnstone’s topological topos. The ideas are that these toposes either require everything to be computable, or continuous in some greater sense. There is also this blogpost by Amdrej Bauer, which can be seems as exploring how it is to be such such a topos: https://math.andrej.com/2006/03/27/sometimes-all-functions-are-continu…
hackandthink · 2022-10-24
Some people think: If you can't compute it, it does not exist. or If you can't compute it, I don't care. Computing and real numbers are a confusing subject. Edit: https://ncatlab.org/nlab/show/computable+physics There are nice discussions an Andrej Bauer's blog: https://math.andrej.com/. Can't find them right now. "type II computability" is the concept. Look at the table in: https://ncatlab.org/nlab/show/Type+Two+Theory+of+Effectivity
gowld · 2022-03-17
Andrej Bauer is a great resource twitter.com/andrejbauer/status/1212737159217762304 http://math.andrej.com/2008/02/06/representations-of-uncomputable-and-… > constructive mathematics does not assume that all reals are computable or constructive. It is agnostic about which reals there are. Basically, in a computer, the "set of all reals" is irrelevant, only the set of computable reals matters. (And you can represent many reals without infinite sequenecs, even some exotic ones. You don't need "infinite precision rational approximation", you just need enough precision to disambiguate from all other reals in your program.)
ogogmad · 2021-09-15
Computably countable is also a correct term. In line with this approach to computability theory: http://math.andrej.com/asset/data/synthetic-slides.pdf It shows that the unsolvability of the halting problem follows from: - The computable uncountability of N^N, which can be proved using an identical argument to the one Cantor used to prove the set-theoretic uncountability of N^N. - The computable countability of the partial maps from N to N. If the halting problem were solvable, then the second bullet point would contradict the first. So it's essentially a weird twist on set theory that uses constructive logic.
TheAsprngHacker · 2020-11-20
https://utteranc.es/ is a project that allows you to add comments to a page using GitHub issues. Andrej Bauer's blog also uses GitHub issues for comments: http://math.andrej.com/
xelxebar · 2020-04-13
Here's what looks like the original paper; it's a mere 3 pages long: https://arxiv.org/abs/2002.01653 It's a lot of prose with hand-wavy analogies. My takeaway is that the author seems to have become enamored with intuitionistic logic but seems to lack much concrete experience working with it. For anyone intrigued by constructive mathematics, there's a nice talk and paper by Andrej Bauer (nice coincidence) called "Five Stages of Accepting Constructive Mathematics." It's a nice mix of prose and rigor of varying levels: http://math.andrej.com/2016/10/10/five-stages-of-accepting-constructiv… The metamath[0] proof verifier also has a database of theorems on intuitionistic logic: http://us.metamath.org/ileuni/mmil.html It can be neat to compare proofs and theorems there with their counterparts in the classical logic database. [0]:http://us.metamath.org/
edflsafoiewq · 2020-01-11
You may like the whole list of constructive gems and stones then: http://math.andrej.com/category/gems-and-stones/ :) As a sampler, the following are all constructively false (ie. imply the law of excluded middle) * Every finite set can be enumerated without repetitions * A subset of a finite set is finite * The intersection of finite sets is finite
svat · 2020-01-11
More precisely, all well-defined computable functions are continuous. For another exposition of the same (or similar) results, see also Dan Piponi's post from 2008 "What does topology have to do with computability?" at http://blog.sigfpe.com/2008/01/what-does-topology-have-to-do-with.html Also, as a follow-up, you may be interested in Martin Escardo's 2007 post on the same blog: http://math.andrej.com/2007/09/28/seemingly-impossible-functional-prog…
vilhelm_s · 2017-02-12
So if you want a more general motivation for constructive mathematics, I recommend another paper by Andrej Bauer: Five stages of accepting constructive mathematics. http://math.andrej.com/2016/10/10/five-stages-of-accepting-constructiv…
zem · 2015-03-24
if you're interested in this sort of thing, the "language zoo" (a series of mini-languages demonstrating various design strategies) is great http://andrej.com/plzoo/
sitkack · 2015-03-13
While the result is probably correct, your argument is, odd. :) Hammers in nails with an orange, and this folks, is how Black and Decker makes better drills than Makita. The single reason that OCaml excels at compilers is due to pattern matching. It _removes_ all those explicit conditionals by making them implicit. http://andrej.com/plzoo/ Python has excellent affordances for writing compilers, they just have to be used. https://github.com/mrocklin/multipledispatch/ https://github.com/Suor/patterns
sanxiyn · 2015-01-05
I'd like to recommend The Programming Language Zoo by Andrej Bauer. It is a collection of programming language implementations, small and clear, written in OCaml. http://andrej.com/plzoo/
brandonbloom · 2014-07-18
It's worth looking at the Eff language, which is an OCaml variant. Much easier to understand, especially if you're monadically challenged. This paper is a great introduction to the idea of algebraic effects: http://math.andrej.com/2012/03/08/programming-with-algebraic-effects-a… Shameless plug, I gave a talk about this at the NYC "Papers We Love" meetup. Audio & slides can be found here: http://www.mixcloud.com/paperswelove/bbloom_3_17_2014_programming_with…
dmunoz · 2014-01-12
The linked course pages contains a good synopsis, but Robert Harper's own blog post "What’s the big deal with HoTT?" [0] gives a wider view about its motivation and history. Another two pages with worthwhile information on the HoTT book are [1] and [2]. [0] http://existentialtype.wordpress.com/2013/06/22/whats-the-big-deal-wit… [1] http://golem.ph.utexas.edu/category/2013/06/the_hott_book.html [2] http://math.andrej.com/2013/06/20/the-hott-book/
guynamedloren · 2013-10-16
I don't see Penflip as a replacement for Google Docs, but there are some cases where Docs breaks down - specifically when there are too many collaborators and when the content is too complex. Another interesting aspect is the need for multiple versions of the same core content - like a syllabus or textbook - with minor variations and modifications as needed. Something like this is unacheivable with Google Docs. For small groups working on a short research paper, Google Docs is great. But could you imagine a book being written with Google Docs, especially with multiple people? That'd be completely unmanageable. I love the HoTT book [1], because it's a great example of using GitHub to write a book with multiple contributors, and really illustrates the shortcomings with other technology [2]. [1] https://github.com/HoTT/book [2] http://math.andrej.com/2013/06/20/the-hott-book/
jules · 2013-03-11
I think stiff is correct here. You can derive the law of the excluded middle from proof by contradiction, obviously in classical logic but even in constructive logic.* See this blog post by Andrej Bauwer for an explanation: http://math.andrej.com/2010/03/29/proof-of-negation-and-proof-by-contr… * although there are logics in which this does not hold, but that's probably not what you are talking about here
ionfish · 2009-02-17
I can't remember where I originally found this link (I thought it was here, but a quick check of SearchYC didn't reveal it), but I found the following article on intuitionistic mathematics for physics pretty fascinating. While I know a certain amount about intuitionistic mathematics, I'd never really considered that people might actually use it. http://math.andrej.com/2008/08/13/intuitionistic-mathematics-for-physi…
leonidasrup · 2026-05-22
Five stages of accepting constructive mathematics by Andrej Bauer "On the odd day, a mathematician might wonder what constructive mathematics is all about. They may have heard arguments in favor of constructivism but are not at all convinced by them, and in any case they may care little about philosophy. A typical introductory text about constructivism spends a great deal of time explaining the principles and contains only trivial mathematics, while advanced constructive texts are impenetrable, like all unfamiliar mathematics. How then can a mathematician find out what constructive mathematics feels like? What new and relevant ideas does constructive mathematics have to offer, if any? I shall attempt to answer these questions" https://ww2.ams.org/journals/bull/2017-54-03/S0273-0979-2016-01556-4/S… https://math.andrej.com/2016/10/10/five-stages-of-accepting-constructi…
tphyahoo2 · 2025-08-05
Thanks for articulating this. https://math.andrej.com/2010/03/29/proof-of-negation-and-proof-by-cont… also "It’s fine to use a proof by contradiction to show something doesn’t exist. When the assumption that it does exist leads to a contradiction, then that shows it can’t exist. It’s not so fine to use a proof by contradiction to show something does exist. Here’s the situation. The assumption that it does not exist leads to a contradiction. What can you conclude from that? You would like say “therefore it exists”. But you haven’t got any idea what it is. You may know it’s out there somewhere, but you have no idea how to find it. It would be better to have a proof that tells you what it is. That’s a difference between what’s called “classical logic” and “intuitionistic logic”. In classical logic, proof by contradiction is perfectly accepted as a method of deductive logic. In intuitionistic logic, proof by contradiction is accepted to show something doesn’t exist, but is not accepted to show something does exist." David Joyce, https://www.quora.com/In-math-are-there-any-proofs-that-can-only-be-co…
amw-zero · 2021-09-26
Honestly, the entire part of the post before getting to categories is what I think is most useful for the broadest range of people. We often look at "logic" and "mathematics" as one thing, and even more than that, we look at them as absolutes - if something is mathematically proven, it is certainly a fact, no? Well, it turns out even here there are still shades of gray, and the difference between classical and intuitionistic logic is the perfect example. Not everyone even agrees on the foundation of what logic and math are. And, each has their own benefits and strengths (intuitionistic logic tends to go hand in hand with type theory as the basis for theorem provers / proof assistants for mostly practical reasons). Classical logic has always made the most sense to me, because accepting the law of excluded middle leads to a neater world of arguments to me. If you can't prove something, it is treated as false. Might be harsh, but that harshness yields simplicity. I have come to at least understand the intuitionistic perspective though, because of how prevalent it is in the verification space - I have been super into F* recently (https://www.fstar-lang.org/), and this comes from a line of logics and programming languages that owe their life to intuitionistic logic. I like Andrej Bauer's position of being a "mathematical relavist," where he says "we cannot ignore the many worlds of mathematics" (http://math.andrej.com/2012/10/03/am-i-a-constructive-mathematician/). Math and…
chas · 2021-07-30
This is likely what he is referring to: http://math.andrej.com/2007/09/28/seemingly-impossible-functional-prog… In particular, you can search compact infinite spaces by only considering a finite number of steps: "What is going on here is that computable functionals are continuous, which amounts to saying that finite amounts of the output depend only on finite amounts of the input. But the Cantor space is compact, and in analysis and topology there is a theorem that says that continuous functions defined on a compact space are uniformly continuous. In this context, this amounts to the existence of a single `n` such that for all inputs it is enough to look at depth `n` to get the answer (which in this case is always finite, because it is an integer). I’ll explain all this in another post. Here I will illustrate this by running the program in some examples." This is the follow-up post mentioned in the quote: http://math.andrej.com/2008/11/21/a-haskell-monad-for-infinite-search-…
siraben · 2021-06-26
As someone who studies both CS and pure math, it's quite interesting when I see posts that take a very operational reading of functors and monads, instead of its shorter and more precise categorical definition (as a mapping from one category to another that acts homomorphically over morphisms). That's not necessarily wrong, but it's an important thing to keep in mind when learning category theory through a programming context (e.g. Category Theory for Programmers by Milewski). When I tried to learn category theory in this way, past a certain point the abstractions felt too unnatural and arbitrary (e.g. lack of examples for adjunctions and free objects), whereas a good mathematical treatment of category theory would provide plenty of examples across different areas of mathematics such as algebra, topology and logic. I strongly agree with valenterry's comment[1] here, that post gives is an approximate definition of functors, even omitting the functor law. In particular, it is explaining what an endofunctor is (in the context of FP, you mostly deal with one category anyway). Furthermore, even in Haskell, there is no such thing as the category of Haskell types[0] (because of things like divergence and partiality). For the curious, I've recommended Program Design By Calculation[2] to a number of people to show how category theory can be used as a powerful tool to reason about programs in an FP context while not compromising on the mathematics (the target audience is…
eric_bullington · 2016-04-27
> I would like to see -- hint, I'm probably going to have to get my hands dirty! -- an implementation in either a dynamically typed language like Ruby/Python/Perl/PHP/Javascript/… or a non-functional language like C/C++/Obj-C/… I understand where you're coming from. I'm working on a mini-ML in Python as a learning exercise for myself and possibly as a tutorial for others; will open source it soon. As such, I've come across a few good resources: check out Robert Small's Hindley-Milner in Python[0], as well as alehander42's Hermetic language in Python[1]. I also just found out about Hask, an implementation of many Haskell language features in Python. Looking at the source code, it's well-commented and clear, so I suspect I'll learn a lot from it as well [2]. Finally, even though it's not in a dynamic or non-functional language like you request, I highly recommend Andrej Bauer's Programming Language Zoo[3], which contains very simple and easy-to-understand implementations of various type systems in OCaml. Very elucidating. 0. http://smallshire.org.uk/sufficientlysmall/2010/04/11/a-hindley-milner… 1. https://github.com/alehander42/hermetic 2. https://github.com/billpmurphy/hask 3. http://andrej.com/plzoo/ Edit: Oh, and one more resource that's been extremely helpful has been "Introduction to Functional Programming through Lambda Calculus" by Michaelson. Well worth the cost of the book.
IngoBlechschmid · 2015-07-11
You are right that for a particular formula p, the implication (~p ∨ p) ⇒ (¬¬p ⇔ p) is an intuitionistic tautology and that the reverse implication is not (in general). However the situation is different when you quantify over all formulas. If you have (¬¬p ⇔ p) for _any_ formula p, you also have (~q ∨ q) for any formula q (written with a different letter to not get lost in variable capturing issues). This is because, for any formula q, we have the intuitionistic tautology ~~(~q v q). (Proving this is a fun exercise. If you get stuck, see page 26 of https://github.com/iblech/talk-constructive-mathematics/raw/master/neg… or elsewhere on the Internet.) So, if you assume the principle of double negation for all formulas, then in particular you assume that, for any formula q, the implication ~~(~q v q) ⇒ (~q v q) holds. Since the antecedent is unconditionally valid, the consequent is as well. Thus you have the law of excluded middle for q. I highly recommend Andrej Bauer's blog for such matters. The post http://math.andrej.com/2008/08/13/intuitionistic-mathematics-for-physi… is a good starting point.
a-nikolaev · 2013-06-21
Btw, the blog author, Andrej Bauer, is an amazing guy. I was really fascinated by some of his older blog publications (and I was only scratching the surface): http://math.andrej.com/2007/09/28/seemingly-impossible-functional-prog… (by Martin Escardo, an article about a Haskell program doing exhaustive search over the “Cantor space” of infinite sequences) http://math.andrej.com/eff/ (Language Eff, a functional programming language based on algebraic effects and their handlers.) My understanding is that in this language all effects and evaluation order are explicit; effects and pure functions are easily and explicitly composable. Something like monads but more advanced. (My interpretation is probably wrong!) http://andrej.com/plzoo/ (The Programming Language Zoo). A number of mini languages which demonstrate various techniques in design and implementation of programming languages. (calculator, mini-ML, mini-Haskell, mini-Prolog, etc)
butokai · 2026-08-09
Andrej Bauer and others are working on a kind of similar infrastructure, and developing a dedicated query language: https://math.andrej.com/2026/07/11/making-ai-smarter-with-ai/
sesm · 2025-10-01
I think your reply overstates the importance of category theory in mathematics and doesn't give any hint on what it is about. IMO a better reply would be: category theory appeared to unify the concepts around using discrete objects to prove the properties of continous objects in topology, like fundamental groups, homology groups and homothopy groups. It is only practically useful for very advanced proofs like 2nd Weil Conjecture. Any usage of it in programming is only an analogy and is not mathematically rigorous (see https://math.andrej.com/2016/08/06/hask-is-not-a-category/)
tyilo · 2024-11-20
valyagolev · 2023-10-11
I know a Pons Asinorum that kinda was mind-blowing to me. It uses topology connection to define an unexpected function. "Infinite search in finite time" https://math.andrej.com/2007/09/28/seemingly-impossible-functional-pro… https://math.andrej.com/2008/11/21/a-haskell-monad-for-infinite-search…

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close