Re: [Haskell-cafe] Monad laws in presence of bottoms

2012-02-22 Thread Miguel Mitrofanov
22.02.2012, 11:20, wren ng thornton w...@freegeek.org: On 2/22/12 1:45 AM, Miguel Mitrofanov wrote:  However, there is no free ordering on:    { (a0,b) | b- B } \cup { (a,b0) | a- A }  What? By definition, since, a0= a and b0= b, we have (a0, b0)= (a0, b) and (a0, b0)= (a0, b0), so,

Re: [Haskell-cafe] Monad laws in presence of bottoms

2012-02-22 Thread wren ng thornton
On 2/22/12 2:20 AM, wren ng thornton wrote: On 2/22/12 1:45 AM, Miguel Mitrofanov wrote: However, there is no free ordering on: { (a0,b) | b - B } \cup { (a,b0) | a - A } What? By definition, since, a0 = a and b0 = b, we have (a0, b0) = (a0,b) and (a0, b0) = (a0, b0), so, (a0, b0) is clearly

Re: [Haskell-cafe] Monad laws in presence of bottoms

2012-02-22 Thread wren ng thornton
On 2/22/12 2:37 AM, Dan Doel wrote: unless I'm still sketchy on what you mean by domain. I don't think it matters that we're only considering strict homomorphisms. I think part of the problem is that there are many different ideas of what exact properties a domain has. The one I'm most

Re: [Haskell-cafe] Monad laws in presence of bottoms

2012-02-22 Thread wren ng thornton
On 2/21/12 10:44 AM, wren ng thornton wrote: but domain products do not form domains! In order to get a product which does form a domain, we'd need to use the smash product[2] instead. Unfortunately we can't have our cake and eat it too Bah, I don't know why my wires were crossed yesterday.

Re: [Haskell-cafe] Monad laws in presence of bottoms

2012-02-21 Thread wren ng thornton
On 2/21/12 2:17 AM, Roman Cheplyaka wrote: * Sebastian Fischerfisc...@nii.ac.jp [2012-02-21 00:28:13+0100] On Mon, Feb 20, 2012 at 7:42 PM, Roman Cheplyakar...@ro-che.info wrote: Is there any other interpretation in which the Reader monad obeys the laws? If selective strictness (the seq

Re: [Haskell-cafe] Monad laws in presence of bottoms

2012-02-21 Thread MigMit
Ehm... why exactly don't domain products form domains? On 21 Feb 2012, at 19:44, wren ng thornton wrote: On 2/21/12 2:17 AM, Roman Cheplyaka wrote: * Sebastian Fischerfisc...@nii.ac.jp [2012-02-21 00:28:13+0100] On Mon, Feb 20, 2012 at 7:42 PM, Roman Cheplyakar...@ro-che.info wrote: Is

Re: [Haskell-cafe] Monad laws in presence of bottoms

2012-02-21 Thread Dan Doel
On Tue, Feb 21, 2012 at 10:44 AM, wren ng thornton w...@freegeek.org wrote: That's a similar sort of issue, just about whether undefined == (undefined,undefined) or not. If the equality holds then tuples would be domain products[1], but domain products do not form domains! ... [1] Also a

Re: [Haskell-cafe] Monad laws in presence of bottoms

2012-02-21 Thread wren ng thornton
On 2/21/12 11:27 AM, MigMit wrote: Ehm... why exactly don't domain products form domains? One important property of domains[1] is that they have a unique bottom element. Given domains A and B, let us denote the domain product as: (A,B) def= { (a,b) | a - A, b - B } Which will inherit

Re: [Haskell-cafe] Monad laws in presence of bottoms

2012-02-21 Thread wren ng thornton
On 2/21/12 11:54 AM, Dan Doel wrote: On Tue, Feb 21, 2012 at 10:44 AM, wren ng thorntonw...@freegeek.org wrote: That's a similar sort of issue, just about whether undefined == (undefined,undefined) or not. If the equality holds then tuples would be domain products[1], but domain products do

Re: [Haskell-cafe] Monad laws in presence of bottoms

2012-02-21 Thread Miguel Mitrofanov
22.02.2012, 09:30, wren ng thornton w...@freegeek.org: On 2/21/12 11:27 AM, MigMit wrote:  Ehm... why exactly don't domain products form domains? One important property of domains[1] is that they have a unique bottom element. Given domains A and B, let us denote the domain product as:    

Re: [Haskell-cafe] Monad laws in presence of bottoms

2012-02-21 Thread wren ng thornton
On 2/21/12 11:54 AM, Dan Doel wrote: You don't have to get rid of bottom entirely (I think). If you make matches against products irrefutable, then you're again in the situation of seq being the only thing able to distinguish between _|_ and (_|_, _|_), so we could keep the current

Re: [Haskell-cafe] Monad laws in presence of bottoms

2012-02-21 Thread wren ng thornton
On 2/22/12 1:45 AM, Miguel Mitrofanov wrote: However, there is no free ordering on: { (a0,b) | b- B } \cup { (a,b0) | a- A } What? By definition, since, a0= a and b0= b, we have (a0, b0)= (a0, b) and (a0, b0)= (a0, b0), so, (a0, b0) is clearly the bottom of A\times B. Sorry, the

Re: [Haskell-cafe] Monad laws in presence of bottoms

2012-02-21 Thread Dan Doel
On Wed, Feb 22, 2012 at 1:40 AM, wren ng thornton w...@freegeek.org wrote: It's a category-theoretic product, but not for the category of domains. Let Set be the category of sets and set-theoretic functions. And let pDCPO be the category of (pointed) domains and their homomorphisms. The

[Haskell-cafe] Monad laws in presence of bottoms

2012-02-20 Thread Roman Cheplyaka
I just realised that many common monads do not obey the monad laws when it comes to bottoms. E.g. for the Reader monad: undefined = return /= undefined return () = undefined /= undefined return () = const undefined /= undefined return undefined = \x - case x of () - return () /=

Re: [Haskell-cafe] Monad laws in presence of bottoms

2012-02-20 Thread Sebastian Fischer
On Mon, Feb 20, 2012 at 7:42 PM, Roman Cheplyaka r...@ro-che.info wrote: Is there any other interpretation in which the Reader monad obeys the laws? If selective strictness (the seq combinator) would exclude function types, the difference between undefined and \_ - undefined could not

Re: [Haskell-cafe] Monad laws in presence of bottoms

2012-02-20 Thread Roman Cheplyaka
* Sebastian Fischer fisc...@nii.ac.jp [2012-02-21 00:28:13+0100] On Mon, Feb 20, 2012 at 7:42 PM, Roman Cheplyaka r...@ro-che.info wrote: Is there any other interpretation in which the Reader monad obeys the laws? If selective strictness (the seq combinator) would exclude function