juan_gandhi: (Default)
Suddenly got hypnotized by this book, out of probably the next century. 
juan_gandhi: (Default)

John De Goes is Programming Without Type Classes



Type classes have become a cornerstone of statically-typed functional programming, powering abstractions like monoid and monad. Yet, type classes often have generalized names, which don’t reflect their purpose in specific domains; and they incur higher learning costs, especially when emulated in languages without them.

In this presentation, John De Goes discusses the pros and cons of using type classes, and presents a systematic method for building powerful functional components that do not require type classes. Attendees will learn how to preserve the benefits of principled, algebraic functional programming, without forcing type classes on coworkers or users.
juan_gandhi: (Default)
Here

https://gumroad.com/l/lcbk02

Chapter 1. Functions

  • General Ideas
  • Main Definitions
  • Special Classes of Functions
  • Binary Relations
  • Binary Operations

 

Chapter 2. Abstractions of Algebra

  • Monoids
  • Semigroups
  • Magmas

Chapter 3. Partial Orders, Graphs, and DAGs

Chapter 4. Boolean Logic

  • The Language of First-Order Logic
  • Valid and Sound Arguments
  • Proofs
  • Normal Forms

Chapter 5. Non-Boolean Logic

  • The Meaning of Non-Booleanness
  • Proof in Intuitionistic Logic

Chapter 6. Quantifiers

  • Universal Quantifier
  • Existential Quantifier
  • Connectives and Quantifiers in Boolean Logic
  • Connectives and Quantifiers in Intuitionistic Logic

Chapter 7. Models and Theories

  • Algebraic and Geometric Theories
  • Models

Chapter 8. Category: Multi-Tiered Monoid

Chapter 9. Working with Categories

  • Arrows in a Category
  • Initial and Terminal Objects

Chapter 10. Manipulating Objects in a Category

  • Product, Sum
  • Equalizer, Coequalizer
  • Pullback, Pushout

Chapter 11. Relations Between Categories

  • Functors
  • Building New Categories
  • Product of Two Categories
  • Sum of Two Categories
  • Contravariant Functor
  • Variance in Programming Languages

Chapter 12. Relations Between Functors

  • Natural Transformations
  • Adjoint Functors
  • Limits

Chapter 13. Cartesian Closed Categories

  • Basic Ideas
  • Examples
  • Definition: Bicartesian Closed Category

Chapter 14. Monads

  • Main Ideas
  • Every Adjunction Gives a Monad

Chapter 15. Monads: Algebras and Kleisli

  • Category of Algebras
  • Free Algebras as Functors
  • Forgetting and Freedom
  • Kleisli Category
 
juan_gandhi: (Default)

 The search of a "universal foundation" of math is actually the search of a universal model for all possible math theories.

Now the idea looks totally weird. It's been 90 years now since Gödel showed something to the world. And still...

There's no universal foundation! A foundation is just another theory.

juan_gandhi: (Default)
 Geometric Model Theory - hard reading, manifolds, algebraic geometry
Model Theory and Category Theory - high level, but easy reading

Solving the mystery behind Abstract Algorithm’s magical optimizations - here the author implements, in lambda, algorithms with unusually fast performance. Explanations follow (links inside)


A link to the author's github project





juan_gandhi: (Default)
Pocket Set Theory 

PST also verifies the:

The well-foundedness of all sets is neither provable nor disprovable in PST.

 
juan_gandhi: (Default)
Like, here, on mathoverflow .

Leinster wrote in 2012: "rethinking".

People went crazy.

And it seems like nobody fucking knows there's a difference between a theory and a model.
That's how Chaitin was stating that there are "mathematical truths" that are true but don't follow from axioms.

For god's sake, it's been 90 years since Gödel explained it all. And? Anybody asked, how come ZFC is not based on ZFC? (sigh)
juan_gandhi: (Default)
John Baez writes in his tweets (go ahead and look up, or, better, subscribe to his amazing tweets).

Do you know what "continuum hypothesis" is? It's about whether there is an intermediate size set between a countable (ℵ0), for example, natural numbers, and 2^countable (ℵ1). It's been proven over 50 years ago that neither the existence nor the non-existence follows from the axioms of Zermelo-Fraenkel. So, when mathematicians say that they base their absolutely strict and correct theorems on set theory (I don't believe them), we can always ask - which one?

Now the things got more serious.

Suppose you are a serious "machine learning data scientist", and you want to base your tea-leaves guesses on a solid math. That is, figure out the theory behind taking billions of pictures of cats and dogs and detecting cats on them (my former colleagues was focusing on figuring out whether he has a cat or a mouse, and figured that if the fur is uniform gray, the "algorithm" says it's a mouse. Do you have a Russian Blue?)

So, what we do, while "detecting", is a kind of data compression. It's closer to something like mapping, 2^N -> N.

Now, surprise. The feasibility of this operation, in general settings, is equivalent to having a finite number of intermediate sizes between ℵ0 and ℵ1.

Details are here: https://www.nature.com/articles/s42256-018-0002-3

Learnability can be undecidable

"The mathematical foundations of machine learning play a key role in the development of the field. They improve our understanding and provide tools for designing new learning paradigms. The advantages of mathematics, however, sometimes come with a cost. Gödel and Cohen showed, in a nutshell, that not everything is provable. Here we show that machine learning shares this fate. We describe simple scenarios where learnability cannot be proved nor refuted using the standard axioms of mathematics. Our proof is based on the fact the continuum hypothesis cannot be proved nor refuted. We show that, in some cases, a solution to the ‘estimating the maximum’ problem is equivalent to the continuum hypothesis. The main idea is to prove an equivalence between learnability and compression."
juan_gandhi: (Default)
Just take a look at their bullshit: https://mathoverflow.net/questions/171809/building-a-product-of-two-categories  

OTOH, Andreas Blass was rather good at bashing CT, like.

Update. https://mathoverflow.net/questions/319622/sets-are-a-popular-construction-in-programming-languages-is-there-a-solid-theor?noredirect=1#comment796756_319622 - меня попрекают отсутствием веры в математику! Вера в математику, Карл! Тут что-то такое кроется, о чем я не догадывался. Хоть я и работаю иезуитом.
juan_gandhi: (Default)
https://en.wikipedia.org/wiki/Chaitin%27s_constant 

A probability, no digit of which can be calculated.
juan_gandhi: (Default)
 package math.cat

import scala.reflect.ClassTag

trait NonEnumerableSet[T] extends Set[T] {
private def notEnumerable =
throw new UnsupportedOperationException("This set is not enumerable")

override def isEmpty: Boolean = notEnumerable

def iterator: Iterator[T] = notEnumerable

override def toArray[S >: T : ClassTag]: Array[S] = notEnumerable

override def +(elem: T): Set[T] = notEnumerable

override def -(elem: T): Set[T] = notEnumerable

}
juan_gandhi: (Default)
So, undirected graph is a groupoid... I mean, a groupoid of paths.

Cool! 

heap

Oct. 26th, 2018 10:37 pm
juan_gandhi: (Default)
 A heap 

(H,t) is a nonempty set H equipped with a ternary operation t : H \times H \times H\to H satisfying the relations

t(b,b,c) = c = t(c,b,b)
t(a,b,t(c,d,e)) = t(t(a,b,c),d,e)

More generally, a ternary operation in some variety of algebras satisfying the first pair of equations is called a Mal'cev operation. A Mal’cev operation is called associative if it also satisfies the latter equation (i.e. it makes its domain into a heap).

 

heap to monoid is like affine space to linear space
juan_gandhi: (Default)
on SO

TLDR:  there's no way you can define in set theory a function that does not return a result. (Actually you can, but then the whole sets axiomatics should be overhauled.)
juan_gandhi: (Default)
"Curry’s use of combinators was connected very closely to his philosophy of mathematics: for him, a formal system was not a description of some pre-existing objects, but simply a structure built by induction from some primitives using certain rules, and he did not demand that a semantics for such a system be a total function."

src 
juan_gandhi: (Default)
So, this guy: Pierre Wantzel, had solved the problem of trisection, in 1837, before Galois. His solution, though, did not attract any attention at all, until 50 years later, when it was casually republished. Only probably 50 or more years later people understood the algebraic importance of it.

So there.

DKM

Mar. 6th, 2017 12:46 pm
juan_gandhi: (Default)
Dunning-Kruger with Math.

Just occurred to me. Reducing facts of real life to math entities is a kind of Dunning-Kruger disease. You can't get the complexity and all the aspects, but math you know, so kaboom - a monad! a linear space! a probability! a derivative! an integral!

Sad.

Same with logic, by the way.

Profile

juan_gandhi: (Default)
Juan-Carlos Gandhi

August 2025

S M T W T F S
      12
3456789
10 11 12 13141516
171819 20212223
2425 2627282930
31      

Syndicate

RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Aug. 28th, 2025 05:38 pm
Powered by Dreamwidth Studios