sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.45k stars 480 forks source link

Two implementations of free group algebra #14012

Open vbraun opened 11 years ago

vbraun commented 11 years ago

There is also this inconsistency in the output of the following two functions. In language, they say the same thing, but they are not mathematically equal (according to the current implementation):

sage: G.<a,b> = FreeGroup()
sage: test = (a).fox_derivative(a)
sage: f = test.parent()
sage: g = GroupAlgebra(G, ZZ)
sage: print f
Group algebra of Free Group on generators {a, b, c, d, e} over Integer Ring
sage: print g
Group algebra of group "Free Group on generators {a, b, c, d, e}" over base ring Integer Ring
sage: print f == g
False

--

Related discussion in combinat-devel.

CC: @ppurka @tscrim

Component: group theory

Issue created by migration from https://trac.sagemath.org/ticket/14012

vbraun commented 11 years ago

Description changed:

--- 
+++ 
@@ -1,4 +1,4 @@
-3. There is also this inconsistency in the output of the following two functions. In language, they say the same thing, but they are not mathematically equal (according to the current implementation):
+There is also this inconsistency in the output of the following two functions. In language, they say the same thing, but they are not mathematically equal (according to the current implementation):

 ```python
 sage: G.<a,b> = FreeGroup()
ea1d0bf8-c27a-4548-8cb7-de0b1d02441a commented 7 years ago
comment:7

Not sure if the concept of (true,false) is sufficient here. I think there should be at least an additional 'cannot answer the question' and 'incomparable'?

tscrim commented 7 years ago
comment:8

Replying to @sagetrac-jakobkroeker:

Not sure if the concept of (true,false) is sufficient here. I think there should be at least an additional 'cannot answer the question' and 'incomparable'?

You don't understand the problem. They should be the same object because they are suppose to be the same group algebra since it comes from the same group.

ea1d0bf8-c27a-4548-8cb7-de0b1d02441a commented 7 years ago
comment:9

Replying to @tscrim:

Replying to @sagetrac-jakobkroeker:

Not sure if the concept of (true,false) is sufficient here. I think there should be at least an additional 'cannot answer the question' and 'incomparable'?

You don't understand the problem. They should be the same object because they are suppose to be the same group algebra since it comes from the same group.

Well, then please correct me. Is that true that we have two different representations 'f' and 'g' of the same mathematical object and sage does not know how to check their equivalence (or does this incorretly) and therefore just returns false in that case? And this sage behaviour is in my opinion inadequate and breaks everyhing (returning 'false' in case sage in fact cannot give an answer or does not know an answer). So from my point of view the comparing concept in sage is unfortunate (everything is comparable)

tscrim commented 7 years ago
comment:10

This has nothing to do with comparisons. Instead it has to do with what objects are created. The same object should be created by both approaches; probably getting rid of the GroupAlgebra class. See the sage-combinat-devel thread.

ea1d0bf8-c27a-4548-8cb7-de0b1d02441a commented 7 years ago
comment:11

Replying to @tscrim:

This has nothing to do with comparisons. Instead it has to do with what objects are created. The same object should be created by both approaches; probably getting rid of the GroupAlgebra class. See the sage-combinat-devel thread.

While I agree that one solution could be that the same object should be created by both approaches, I stronlgy disagree that the general issue has nothing to do with comparison.

This has nothing to do with comparisons

What are your arguments?

ea1d0bf8-c27a-4548-8cb7-de0b1d02441a commented 7 years ago
comment:12
sage: G.<a,b> = FreeGroup()
sage: test = (a).fox_derivative(a)
sage: f = test.parent()
sage: g = GroupAlgebra(G, ZZ)
sage: f<g 
True
sage: g<f
True
sage: f.parent()
<class 'sage.combinat.free_module.CombinatorialFreeModule_with_category'>
sage: g.parent()
<class 'sage.algebras.group_algebra.GroupAlgebra_with_category'>
sage: print f
Group algebra of Free Group on generators {a, b} over Integer Ring
sage: print g
Group algebra of group "Free Group on generators {a, b}" over base ring Integer Ring

We also get that 'f<g' and 'g<f'. Wonderfull. So here '<' is only a binary operator with no further meaning; same for '==' ? Question: Is it at all legit to ask (in sage) for '==' ' or '<' and expect something mathematical (e.g. equivalence or ordering) regardless of the object type? If not, what are the alternatives (to do some math)?

jhpalmieri commented 7 years ago
comment:13

I believe the point of the discussion on combinat-devel is that the second implementation (GroupAlgebra(G, ZZ)) should just be removed. So why waste time working on comparisons between two objects, one of which shouldn't continue to exist?

ea1d0bf8-c27a-4548-8cb7-de0b1d02441a commented 7 years ago
comment:14

Replying to @jhpalmieri:

I believe the point of the discussion on combinat-devel is that the second implementation (GroupAlgebra(G, ZZ)) should just be removed. So why waste time working on comparisons between two objects, one of which shouldn't continue to exist?

I do not want to fix the comparisons between the two group algebra objects above. I just want to point out that from my point of view either

if (1) holds, then I'm immediately questioning what would be the usual way to ask sage if 'f' is equal to 'g' mathematically for any mathematical objects 'f' and 'g', regardless whether sage can answer this question or not. And, I expect that sage would NOT return 'false' in case sage is not able to answer the question. 'false' already has a meaning which is NOT 'cannot answer the question'

tscrim commented 7 years ago
comment:15

If that's your question then make a new ticket. This one is specifically about the group algebras being different objects, hence fundamentally not about comparisons.

Also, we have already had quite a number of discussions about trinary logic and == versus "isomorphic". sage-devel has probably a dozen such threads.