Send Beginners mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://www.haskell.org/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."


Today's Topics:

   1. Re:  Category question (Ertugrul S?ylemez)
   2. Re:  Category question (Alessandro Pezzoni)
   3. Re:  problems with wxHaskell installation (Heinrich Apfelmus)
   4. Re:  Category question (Manfred Lotz)
   5. Re:  Category question (Brent Yorgey)
   6. Re:  Category question (Manfred Lotz)
   7. Re:  Category question (Rustom Mody)


----------------------------------------------------------------------

Message: 1
Date: Mon, 28 May 2012 13:09:23 +0200
From: Ertugrul S?ylemez <[email protected]>
Subject: Re: [Haskell-beginners] Category question
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset="us-ascii"

Manfred Lotz <[email protected]> wrote:

> My question: Because I cannot think of any counterexample for the last
> statement I would like to know if I just could omit this from the
> definition and formulate this as a small theorem.
>
> Or does there exist a counterexample where all conditions of a
> category hold but there exist two objects A, and B where we have idB
> . f <> f and/or f .idA <> f?

The successor function is a morphism from the set of natural numbers to
itself.  This is the "and" case of the "and/or".


Greets,
Ertugrul

-- 
nightmare = unsafePerformIO (getWrongWife >>= sex)
http://ertes.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20120528/e4fcaf09/attachment-0001.pgp>

------------------------------

Message: 2
Date: Mon, 28 May 2012 13:34:01 +0200
From: Alessandro Pezzoni <[email protected]>
Subject: Re: [Haskell-beginners] Category question
To: Manfred Lotz <[email protected]>
Cc: [email protected]
Message-ID:
        <CAJBH-xcU=nul_kdfcsb3irzuntqzhbiedyz4nkf5cthvu43...@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

On Mon, May 28, 2012 at 11:54:11AM +0200, Manfred Lotz wrote:
> In the definition of a (mathematical) category it is said (among other
> things), that for any object A there exists an identity morphism:
>
> idA: A -> A and if f: A -> B for two objects A, B then
>
>    idB . f = f and f . idA = f
>
> must hold.
>
> My question: Because I cannot think of any counterexample for the
> last statement I would like to know if I just could omit this
> from the definition and formulate this as a small theorem.
>
> Or does there exist a counterexample where all conditions of a category
> hold but there exist two objects A, and B where we have idB . f <> f
> and/or f .idA <> f?

When you ask that
  idB . f = f    and    f . idA = f
you are basically defining a left and a right identity, respectively.

If I get your question correctly, you are asking if you can drop the
axiom (requirement) of existence of an identity morphism for every
object and deduce it from the other axioms, i.e. that the composition of
morphisms is always well defined and that it is associative.

This is not possible, though. As a simple example, consider a category
with only one object, let's call it X, and a non identical morphism
f: X -> X which is such that
  f^n = f . ... . f
is not identical for every non-zero natural n.
For example you can consider X as a totally ordered infinite set, e.g.
the set of integers Z, and f the map that shifts every element by
one to the right, e.g.
  f(z) = z + 1 for every z in Z,
so that
  f^n(z) = z + n != z for every non-zero natural n.
If now you consider the "category" with only X as object and as set of
morphisms
  {f^n | n is a non-zero natural},
then the composition is always defined as
  f^n . f^m = f^(n+m)
and it is obviously associative. But in this example there is no identical
morphism, because f^n(z) != z for every non-zero natural n.

By the way, this example models a semigroup, like the set of natural
numbers N\{0} with the canonical sum.


Alessandro




------------------------------

Message: 3
Date: Mon, 28 May 2012 13:57:37 +0200
From: Heinrich Apfelmus <[email protected]>
Subject: Re: [Haskell-beginners] problems with wxHaskell installation
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8; format=flowed

Miguel Negrao wrote:
> I had wxHaskell working but since I installed the gtk2hs, which updated some 
> packages I?m having some trouble. I?ve installed wxWidgets  and wxHaskell 
> again following the instructions in it?s webpage.  When I compile a simple 
> wxHaskell program* I get this error:
> 
> dyld: Symbol not found: _wxTheAssertHandler
>   Referenced from: 
> /Users/miguelnegrao/Library/Haskell/ghc-7.0.4/lib/wxc-0.90.0.3/lib/libwxc.dylib
>   Expected in: /usr/local/lib/libwx_baseu-2.9.3.0.0.dylib
>  in 
> /Users/miguelnegrao/Library/Haskell/ghc-7.0.4/lib/wxc-0.90.0.3/lib/libwxc.dylib
> Trace/BPT trap: 5
> 
> How can I fix this ?
> 
> thank you,
> Miguel Negr?o
> 
> I?m on OSX 10.7.3 
> haskell platform with ghc 7.0.4
> brew info wxmac
> wxmac 2.8.12
> http://www.wxwidgets.org
> /usr/local/Cellar/wxmac/2.9.3.1 (764 files, 26M) *
>   Installed with: --devel
> https://github.com/mxcl/homebrew/commits/master/Library/Formula/wxmac.rb
> cabal info wx
> * wx               (library)
>     Synopsis:      wxHaskell
>     Versions available: 0.11.1.0, 0.11.1.2, 0.12.1.4, 0.12.1.5, 0.12.1.6,
>                         0.13.2, 0.13.2.1, 0.90, 0.90.0.1 (and 10 others)
>     Versions installed: 0.13.1, 0.90

I don't really know what's going on, but there seem to be two potential 
issues:

* Your wx package has version 0.90 while your wxc package has version 
0.90.0.3. I recommend to use the latest patch level releases of all 
three: wx, wxcore and wxc.

* Your wxWidgets (wxmax) version is reported both as 2.8.12 and 2.9.3.1



Best regards,
Heinrich Apfelmus

--
http://apfelmus.nfshost.com




------------------------------

Message: 4
Date: Mon, 28 May 2012 14:08:14 +0200
From: Manfred Lotz <[email protected]>
Subject: Re: [Haskell-beginners] Category question
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=US-ASCII

On Mon, 28 May 2012 13:34:01 +0200
Alessandro Pezzoni <[email protected]> wrote:

> On Mon, May 28, 2012 at 11:54:11AM +0200, Manfred Lotz wrote:
> > In the definition of a (mathematical) category it is said (among
> > other things), that for any object A there exists an identity
> > morphism:
> >
> > idA: A -> A and if f: A -> B for two objects A, B then
> >
> >    idB . f = f and f . idA = f
> >
> > must hold.
> >
> > My question: Because I cannot think of any counterexample for the
> > last statement I would like to know if I just could omit this
> > from the definition and formulate this as a small theorem.
> >
> > Or does there exist a counterexample where all conditions of a
> > category hold but there exist two objects A, and B where we have
> > idB . f <> f and/or f .idA <> f?
> 
> When you ask that
>   idB . f = f    and    f . idA = f
> you are basically defining a left and a right identity, respectively.
> 
> If I get your question correctly, you are asking if you can drop the
> axiom (requirement) of existence of an identity morphism for every
> object and deduce it from the other axioms, i.e. that the composition
> of morphisms is always well defined and that it is associative.
> 

No, I do not want to drop the requirement of existence of an identity
morphism. I only want to drop the axion that idB .f = f and f . idA = f
do hold because IMHO this follows readily from the definition of what
an identity morphism is all about.


Or in other words: I do not understand why all definitions of a
category say that for all objects an identity morphism has to exist and
then they say that those id morphism have to hold above conditions
instead of saying that those conditions follows directly from the
definition of id. 


-- 
Manfred











> This is not possible, though. As a simple example, consider a category
> with only one object, let's call it X, and a non identical morphism
> f: X -> X which is such that
>   f^n = f . ... . f
> is not identical for every non-zero natural n.
> For example you can consider X as a totally ordered infinite set, e.g.
> the set of integers Z, and f the map that shifts every element by
> one to the right, e.g.
>   f(z) = z + 1 for every z in Z,
> so that
>   f^n(z) = z + n != z for every non-zero natural n.
> If now you consider the "category" with only X as object and as set of
> morphisms
>   {f^n | n is a non-zero natural},
> then the composition is always defined as
>   f^n . f^m = f^(n+m)
> and it is obviously associative. But in this example there is no
> identical morphism, because f^n(z) != z for every non-zero natural n.
> 
> By the way, this example models a semigroup, like the set of natural
> numbers N\{0} with the canonical sum.
> 
> 
> Alessandro
> 
> 



-- 
Manfred





------------------------------

Message: 5
Date: Mon, 28 May 2012 10:04:33 -0400
From: Brent Yorgey <[email protected]>
Subject: Re: [Haskell-beginners] Category question
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii

On Mon, May 28, 2012 at 02:08:14PM +0200, Manfred Lotz wrote:
> On Mon, 28 May 2012 13:34:01 +0200
> Alessandro Pezzoni <[email protected]> wrote:
> 
> > On Mon, May 28, 2012 at 11:54:11AM +0200, Manfred Lotz wrote:
> > > In the definition of a (mathematical) category it is said (among
> > > other things), that for any object A there exists an identity
> > > morphism:
> > >
> > > idA: A -> A and if f: A -> B for two objects A, B then
> > >
> > >    idB . f = f and f . idA = f
> > >
> > > must hold.
> > >
> > > My question: Because I cannot think of any counterexample for the
> > > last statement I would like to know if I just could omit this
> > > from the definition and formulate this as a small theorem.
> > >
> > > Or does there exist a counterexample where all conditions of a
> > > category hold but there exist two objects A, and B where we have
> > > idB . f <> f and/or f .idA <> f?
> > 
> > When you ask that
> >   idB . f = f    and    f . idA = f
> > you are basically defining a left and a right identity, respectively.
> > 
> > If I get your question correctly, you are asking if you can drop the
> > axiom (requirement) of existence of an identity morphism for every
> > object and deduce it from the other axioms, i.e. that the composition
> > of morphisms is always well defined and that it is associative.
> > 
> 
> No, I do not want to drop the requirement of existence of an identity
> morphism. I only want to drop the axion that idB .f = f and f . idA = f
> do hold because IMHO this follows readily from the definition of what
> an identity morphism is all about.

"Follows readily from the definition of what an identity morphism is
all about" -- and what exactly is that defintion?

In fact, the definition is precisely that

  idB . f = f and f . idA = f

This is not an "extra" requirement on identity morphisms.  It is
simply the definition.

-Brent



------------------------------

Message: 6
Date: Mon, 28 May 2012 16:14:40 +0200
From: Manfred Lotz <[email protected]>
Subject: Re: [Haskell-beginners] Category question
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=US-ASCII

On Mon, 28 May 2012 10:04:33 -0400
Brent Yorgey <[email protected]> wrote:

> On Mon, May 28, 2012 at 02:08:14PM +0200, Manfred Lotz wrote:
> > On Mon, 28 May 2012 13:34:01 +0200
> > Alessandro Pezzoni <[email protected]> wrote:
> > 
> > > On Mon, May 28, 2012 at 11:54:11AM +0200, Manfred Lotz wrote:
> > > > In the definition of a (mathematical) category it is said (among
> > > > other things), that for any object A there exists an identity
> > > > morphism:
> > > >
> > > > idA: A -> A and if f: A -> B for two objects A, B then
> > > >
> > > >    idB . f = f and f . idA = f
> > > >
> > > > must hold.
> > > >
> > > > My question: Because I cannot think of any counterexample for
> > > > the last statement I would like to know if I just could omit
> > > > this from the definition and formulate this as a small theorem.
> > > >
> > > > Or does there exist a counterexample where all conditions of a
> > > > category hold but there exist two objects A, and B where we have
> > > > idB . f <> f and/or f .idA <> f?
> > > 
> > > When you ask that
> > >   idB . f = f    and    f . idA = f
> > > you are basically defining a left and a right identity,
> > > respectively.
> > > 
> > > If I get your question correctly, you are asking if you can drop
> > > the axiom (requirement) of existence of an identity morphism for
> > > every object and deduce it from the other axioms, i.e. that the
> > > composition of morphisms is always well defined and that it is
> > > associative.
> > > 
> > 
> > No, I do not want to drop the requirement of existence of an
> > identity morphism. I only want to drop the axion that idB .f = f
> > and f . idA = f do hold because IMHO this follows readily from the
> > definition of what an identity morphism is all about.
> 
> "Follows readily from the definition of what an identity morphism is
> all about" -- and what exactly is that defintion?
> 

For me id: A -> A could be defined by: A morphism id: A -> A is
called identity morphism iff for all x of A we have  id(x) = x.

IMHO, from this the following follows readily.


> In fact, the definition is precisely that
> 
>   idB . f = f and f . idA = f
> 
> This is not an "extra" requirement on identity morphisms.  It is
> simply the definition.
> 

I agree that I could define id by these two statements.

My point is that in the books about category theory those two statements
are stated as axioms, and id is (in many books) just self understood or
defined as I have defined it above.

If in a book about category the author would say that for each object A
there must exist a morphism id: A -> A (called identity morphism) which
is defined by idB . f = f and f . idA = f then this would be clearer
(and better, IMHO).

-- 
Manfred










-- 
Manfred





------------------------------

Message: 7
Date: Mon, 28 May 2012 21:41:32 +0530
From: Rustom Mody <[email protected]>
Subject: Re: [Haskell-beginners] Category question
To: Manfred Lotz <[email protected]>
Cc: [email protected]
Message-ID:
        <caj+teoezl9gyinq8dphwdb19fsdqvx2vbqhgcve1n83w3js...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

On Mon, May 28, 2012 at 7:44 PM, Manfred Lotz <[email protected]> wrote:

> On Mon, 28 May 2012 10:04:33 -0400
> Brent Yorgey <[email protected]> wrote:
>
> > On Mon, May 28, 2012 at 02:08:14PM +0200, Manfred Lotz wrote:
> > > On Mon, 28 May 2012 13:34:01 +0200
> > > Alessandro Pezzoni <[email protected]> wrote:
> > >
> > > > On Mon, May 28, 2012 at 11:54:11AM +0200, Manfred Lotz wrote:
> > > > > In the definition of a (mathematical) category it is said (among
> > > > > other things), that for any object A there exists an identity
> > > > > morphism:
> > > > >
> > > > > idA: A -> A and if f: A -> B for two objects A, B then
> > > > >
> > > > >    idB . f = f and f . idA = f
> > > > >
> > > > > must hold.
> > > > >
> > > > > My question: Because I cannot think of any counterexample for
> > > > > the last statement I would like to know if I just could omit
> > > > > this from the definition and formulate this as a small theorem.
> > > > >
> > > > > Or does there exist a counterexample where all conditions of a
> > > > > category hold but there exist two objects A, and B where we have
> > > > > idB . f <> f and/or f .idA <> f?
> > > >
> > > > When you ask that
> > > >   idB . f = f    and    f . idA = f
> > > > you are basically defining a left and a right identity,
> > > > respectively.
> > > >
> > > > If I get your question correctly, you are asking if you can drop
> > > > the axiom (requirement) of existence of an identity morphism for
> > > > every object and deduce it from the other axioms, i.e. that the
> > > > composition of morphisms is always well defined and that it is
> > > > associative.
> > > >
> > >
> > > No, I do not want to drop the requirement of existence of an
> > > identity morphism. I only want to drop the axion that idB .f = f
> > > and f . idA = f do hold because IMHO this follows readily from the
> > > definition of what an identity morphism is all about.
> >
> > "Follows readily from the definition of what an identity morphism is
> > all about" -- and what exactly is that defintion?
> >
>
> For me id: A -> A could be defined by: A morphism id: A -> A is
> called identity morphism iff for all x of A we have  id(x) = x.
>

Well one of the main themes of category theory is to not have that as a
necessary definition. Of course many interesting categories will work as
you expect.
But some extreme ones dont eg.

Monoid as a category
http://planetmath.org/?method=l2h&id=8111&op=getobj&from=objects

Poset as a category
http://en.wikipedia.org/wiki/Partially_ordered_set#In_category_theory

A more haskell oriented answer will (I guess) talk about the virtues of
point-free style...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20120528/142f166d/attachment.htm>

------------------------------

_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners


End of Beginners Digest, Vol 47, Issue 24
*****************************************

Reply via email to