Sage: Ticket #14012: Two implementations of free group algebra
https://trac.sagemath.org/ticket/14012
<p>
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):
</p>
<div class="wiki-code"><div class="code"><pre>sage<span class="p">:</span> G<span class="o">.<</span>a<span class="p">,</span>b<span class="o">></span> <span class="o">=</span> FreeGroup<span class="p">()</span>
sage<span class="p">:</span> test <span class="o">=</span> <span class="p">(</span>a<span class="p">)</span><span class="o">.</span>fox_derivative<span class="p">(</span>a<span class="p">)</span>
sage<span class="p">:</span> f <span class="o">=</span> test<span class="o">.</span>parent<span class="p">()</span>
sage<span class="p">:</span> g <span class="o">=</span> GroupAlgebra<span class="p">(</span>G<span class="p">,</span> ZZ<span class="p">)</span>
sage<span class="p">:</span> <span class="k">print</span> f
Group algebra of Free Group on generators <span class="p">{</span>a<span class="p">,</span> b<span class="p">,</span> c<span class="p">,</span> d<span class="p">,</span> e<span class="p">}</span> over Integer Ring
sage<span class="p">:</span> <span class="k">print</span> g
Group algebra of group <span class="s2">"Free Group on generators {a, b, c, d, e}"</span> over base ring Integer Ring
sage<span class="p">:</span> <span class="k">print</span> f <span class="o">==</span> g
<span class="bp">False</span>
</pre></div></div><p>
--
</p>
<p>
Related discussion in <a class="ext-link" href="https://groups.google.com/d/topic/sage-combinat-devel/f_Und2NDyFE/discussion"><span class="icon"></span>combinat-devel</a>.
</p>
en-usSagehttps://trac.sagemath.org/chrome/site/logo_sagemath_trac.png
https://trac.sagemath.org/ticket/14012
Trac 1.2Volker BraunFri, 25 Jan 2013 17:47:10 GMTdescription changed
https://trac.sagemath.org/ticket/14012#comment:1
https://trac.sagemath.org/ticket/14012#comment:1
<ul>
<li><strong>description</strong>
modified (<a href="/ticket/14012?action=diff&version=1">diff</a>)
</li>
</ul>
TicketJeroen DemeyerTue, 13 Aug 2013 15:35:53 GMTmilestone changed
https://trac.sagemath.org/ticket/14012#comment:2
https://trac.sagemath.org/ticket/14012#comment:2
<ul>
<li><strong>milestone</strong>
changed from <em>sage-5.11</em> to <em>sage-5.12</em>
</li>
</ul>
TicketFor batch modificationsThu, 30 Jan 2014 21:20:52 GMTmilestone changed
https://trac.sagemath.org/ticket/14012#comment:3
https://trac.sagemath.org/ticket/14012#comment:3
<ul>
<li><strong>milestone</strong>
changed from <em>sage-6.1</em> to <em>sage-6.2</em>
</li>
</ul>
TicketTravis ScrimshawSat, 22 Feb 2014 21:15:46 GMTcc changed
https://trac.sagemath.org/ticket/14012#comment:4
https://trac.sagemath.org/ticket/14012#comment:4
<ul>
<li><strong>cc</strong>
<em>Travis Scrimshaw</em> added
</li>
</ul>
TicketFor batch modificationsTue, 06 May 2014 15:20:58 GMTmilestone changed
https://trac.sagemath.org/ticket/14012#comment:5
https://trac.sagemath.org/ticket/14012#comment:5
<ul>
<li><strong>milestone</strong>
changed from <em>sage-6.2</em> to <em>sage-6.3</em>
</li>
</ul>
TicketFor batch modificationsSun, 10 Aug 2014 16:51:03 GMTmilestone changed
https://trac.sagemath.org/ticket/14012#comment:6
https://trac.sagemath.org/ticket/14012#comment:6
<ul>
<li><strong>milestone</strong>
changed from <em>sage-6.3</em> to <em>sage-6.4</em>
</li>
</ul>
TicketJakob KroekerSat, 04 Mar 2017 03:18:18 GMT
https://trac.sagemath.org/ticket/14012#comment:7
https://trac.sagemath.org/ticket/14012#comment:7
<p>
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'?
</p>
TicketTravis ScrimshawSat, 04 Mar 2017 03:21:11 GMT
https://trac.sagemath.org/ticket/14012#comment:8
https://trac.sagemath.org/ticket/14012#comment:8
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/14012#comment:7" title="Comment 7">jakobkroeker</a>:
</p>
<blockquote class="citation">
<p>
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'?
</p>
</blockquote>
<p>
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.
</p>
TicketJakob KroekerSat, 04 Mar 2017 04:06:19 GMT
https://trac.sagemath.org/ticket/14012#comment:9
https://trac.sagemath.org/ticket/14012#comment:9
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/14012#comment:8" title="Comment 8">tscrim</a>:
</p>
<blockquote class="citation">
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/14012#comment:7" title="Comment 7">jakobkroeker</a>:
</p>
<blockquote class="citation">
<p>
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'?
</p>
</blockquote>
<p>
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.
</p>
</blockquote>
<p>
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)
</p>
TicketTravis ScrimshawSat, 04 Mar 2017 04:36:55 GMT
https://trac.sagemath.org/ticket/14012#comment:10
https://trac.sagemath.org/ticket/14012#comment:10
<p>
This has nothing to do with <em>comparisons</em>. Instead it has to do with what objects are <em>created</em>. The <em>same</em> object should be created by both approaches; probably getting rid of the <code>GroupAlgebra</code> class. See the sage-combinat-devel thread.
</p>
TicketJakob KroekerSat, 04 Mar 2017 22:14:14 GMT
https://trac.sagemath.org/ticket/14012#comment:11
https://trac.sagemath.org/ticket/14012#comment:11
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/14012#comment:10" title="Comment 10">tscrim</a>:
</p>
<blockquote class="citation">
<p>
This has nothing to do with <em>comparisons</em>. Instead it has to do with what objects are <em>created</em>. The <em>same</em> object should be created by both approaches; probably getting rid of the <code>GroupAlgebra</code> class. See the sage-combinat-devel thread.
</p>
</blockquote>
<p>
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.
</p>
<blockquote class="citation">
<p>
This has nothing to do with <em>comparisons</em>
</p>
</blockquote>
<p>
What are your arguments?
</p>
TicketJakob KroekerSat, 04 Mar 2017 23:04:42 GMT
https://trac.sagemath.org/ticket/14012#comment:12
https://trac.sagemath.org/ticket/14012#comment:12
<pre class="wiki">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
</pre><p>
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)?
</p>
TicketJohn PalmieriSat, 04 Mar 2017 23:25:58 GMT
https://trac.sagemath.org/ticket/14012#comment:13
https://trac.sagemath.org/ticket/14012#comment:13
<p>
I believe the point of the discussion on combinat-devel is that the second implementation (<code>GroupAlgebra(G, ZZ)</code>) should just be removed. So why waste time working on comparisons between two objects, one of which shouldn't continue to exist?
</p>
TicketJakob KroekerSun, 05 Mar 2017 03:36:25 GMT
https://trac.sagemath.org/ticket/14012#comment:14
https://trac.sagemath.org/ticket/14012#comment:14
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/14012#comment:13" title="Comment 13">jhpalmieri</a>:
</p>
<blockquote class="citation">
<p>
I believe the point of the discussion on combinat-devel is that the second implementation (<code>GroupAlgebra(G, ZZ)</code>) should just be removed. So why waste time working on comparisons between two objects, one of which shouldn't continue to exist?
</p>
</blockquote>
<p>
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
</p>
<ul><li>asking sage for f==g and expecting something mathematical is invalid and thus this ticket is (1)
</li></ul><p>
Or
</p>
<ul><li> the way how comparisons are done in sage are unfortunate.(2)
</li></ul><p>
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'
</p>
TicketTravis ScrimshawSun, 05 Mar 2017 07:31:11 GMT
https://trac.sagemath.org/ticket/14012#comment:15
https://trac.sagemath.org/ticket/14012#comment:15
<p>
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.
</p>
<p>
Also, we have already had quite a number of discussions about trinary logic and <code>==</code> versus "isomorphic". sage-devel has probably a dozen such threads.
</p>
Ticket