[Haskell-cafe] Re: Re[2]: Why monad tutorials don't work

2007-08-15 Thread Dominic Steinitz
Dan Piponi  gmail.com> writes:

> 
> On 8/15/07, Dan Weston  imageworks.com> wrote:
> > "You too could have invented Universal Algebra and Category Theory".
> > I nominate Dan Piponi to write it and eagerly await its release!
> 
> I've already started on it. Well, that's not the exact title and
> subject. And as an example I'll probably use the definition of tensor
> product that I linked to, not the even more compact and elegant one
> that you just gave.
> 
> I'm a strong believer that lots of (but not all) tricky looking
> mathematics is just fancy language for intuitions that people already
> have. I suspect that most computer scientists already have much of the
> intuition behind the idea of a universal property, and that it is in
> fact easier to grasp for a computer scientist than a mathematician.
> 
> 
> --
> Dan
> 

Some universal properties (initial algebras and final co-algebras) are covered
in Functional Programming with Bananas, Lenses, Envelopes and Barbed Wire (1991)
(http://citeseer.ist.psu.edu/meijer91functional.html). And of course there's
Wadler's Theorems for Free.

Dominic.



___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: Re[2]: Why monad tutorials don't work

2007-08-15 Thread Dipankar Ray


At this point I must mention that Tim Gowers has an excellent article on 
Tensor Products, entitled "How to lose your fear of tensor products":


http://www.dpmms.cam.ac.uk/~wtg10/tensors3.html

Tim Gowers is a pretty ok mathematician - worth taking tips from, I'd say 
;)


http://en.wikipedia.org/wiki/William_Timothy_Gowers

On Wed, 15 Aug 2007, Dan Piponi wrote:


On 8/15/07, Dan Weston <[EMAIL PROTECTED]> wrote:

"You too could have invented Universal Algebra and Category Theory".
I nominate Dan Piponi to write it and eagerly await its release!


I've already started on it. Well, that's not the exact title and
subject. And as an example I'll probably use the definition of tensor
product that I linked to, not the even more compact and elegant one
that you just gave.

I'm a strong believer that lots of (but not all) tricky looking
mathematics is just fancy language for intuitions that people already
have. I suspect that most computer scientists already have much of the
intuition behind the idea of a universal property, and that it is in
fact easier to grasp for a computer scientist than a mathematician.

:-)
--
Dan
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: Re[2]: Why monad tutorials don't work

2007-08-15 Thread Dan Piponi
On 8/15/07, Dan Weston <[EMAIL PROTECTED]> wrote:
> "You too could have invented Universal Algebra and Category Theory".
> I nominate Dan Piponi to write it and eagerly await its release!

I've already started on it. Well, that's not the exact title and
subject. And as an example I'll probably use the definition of tensor
product that I linked to, not the even more compact and elegant one
that you just gave.

I'm a strong believer that lots of (but not all) tricky looking
mathematics is just fancy language for intuitions that people already
have. I suspect that most computer scientists already have much of the
intuition behind the idea of a universal property, and that it is in
fact easier to grasp for a computer scientist than a mathematician.

:-)
--
Dan
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: Re[2]: Why monad tutorials don't work

2007-08-15 Thread Dan Weston

Dan Piponi wrote:

But I was mainly thinking about how the physicist's definition of
tensor needn't be accepted as an irreducible given, but is a
consequence of the definition of tensor product through its universal
property: http://planetmath.org/encyclopedia/TensorProduct.html

Having said that, I still completely agree with Michael that tensors
are a great analogy for monads because I found the concept of a
universal property tricky in the same way that I subsequently found
monads tricky. BTW I think the concept of a universal property is
probably the single most useful idea from category theory that can be
used in Haskell programming. I recommend it to everyone :-)


If only my Linear Algebra professor had just uttered the magic words:

"For all R-modules M, the functor (-) * M is left-adjoint to the functor 
Hom(M,-)"


I could have just skipped out on the entire semester. Why are teachers 
always so long-winded? The above is so much clearer!


That the above is "the single most useful idea from category theory that 
can be used in Haskell programming" is so obvious, it belongs in a 
tutorial titled "You too could have invented Universal Algebra and 
Category Theory".


I nominate Dan Piponi to write it and eagerly await its release!

Dan Weston

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: Re[2]: Why monad tutorials don't work

2007-08-15 Thread Dan Piponi
On 8/15/07, Andy Gimblett <[EMAIL PROTECTED]> wrote:
> I assumed he was just trying not to sing the "Spider Pig" song.

I've been banned from singing that around the house. And the cat version.

But I was mainly thinking about how the physicist's definition of
tensor needn't be accepted as an irreducible given, but is a
consequence of the definition of tensor product through its universal
property: http://planetmath.org/encyclopedia/TensorProduct.html

Having said that, I still completely agree with Michael that tensors
are a great analogy for monads because I found the concept of a
universal property tricky in the same way that I subsequently found
monads tricky. BTW I think the concept of a universal property is
probably the single most useful idea from category theory that can be
used in Haskell programming. I recommend it to everyone :-)
--
Dan
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Re: Re[2]: Why monad tutorials don't work

2007-08-15 Thread Andy Gimblett
On Wed, Aug 15, 2007 at 12:50:42PM +, Dominic Steinitz wrote:
> Miguel Mitrofanov  yandex.ru> writes:
> 
> > >>> Grrr...must...hold...my...tongue...
> > >> 
> > >> Dan, as a former student of a clone of that physics teacher, I am really
> > >> interested in what you will say when you fail to hold your tongue.
> > 
> > MV> I have to admit I was wondering the same thing myself.
> > 
> > So was I.
> > 
> I'm guessing that Dan means that thinking of tensors as things that transform 
> between co-ordinate systems in a certain way (e.g. via the Jacobian of the 
> transition maps) isn't a terribly good way of thinking about them. Vector 
> fields, co-vector fields and tensor fields are really co-ordinate independent 
> notions and the transformation laws (if I may call them that) are a 
> consequence of the way they transform under (smooth) maps. But perhaps this 
> is 
> better discussed on a differential geometry mailing list?

I assumed he was just trying not to sing the "Spider Pig" song.

( http://uk.youtube.com/watch?v=5XQ_GWKvDE0 )

;-)

-- 
Andy Gimblett
Computer Science Department
University of Wales Swansea
http://www.cs.swan.ac.uk/~csandy/
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Re: Re[2]: Why monad tutorials don't work

2007-08-15 Thread Dominic Steinitz
Miguel Mitrofanov  yandex.ru> writes:

> 
> >>> Grrr...must...hold...my...tongue...
> >> 
> >> Dan, as a former student of a clone of that physics teacher, I am really
> >> interested in what you will say when you fail to hold your tongue.
> >> 
> >>  -- Bill Wood
> >> 
> 
> MV> I have to admit I was wondering the same thing myself.
> 
> So was I.
> 
I'm guessing that Dan means that thinking of tensors as things that transform 
between co-ordinate systems in a certain way (e.g. via the Jacobian of the 
transition maps) isn't a terribly good way of thinking about them. Vector 
fields, co-vector fields and tensor fields are really co-ordinate independent 
notions and the transformation laws (if I may call them that) are a 
consequence of the way they transform under (smooth) maps. But perhaps this is 
better discussed on a differential geometry mailing list?

Dominic.



___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe