https://cocoa.dima.unige.it/redmine/https://cocoa.dima.unige.it/redmine/redmine/favicon.ico?15088260392017-04-26T10:24:15ZCoCoA ProjectCoCoALib - Feature #1052: ReadExpr(P, string) and RingElem(P, string) in CoCoALibhttps://cocoa.dima.unige.it/redmine/issues/1052?journal_id=58732017-04-26T10:24:15ZAnna Maria Bigatti
<ul><li><strong>Subject</strong> changed from <i>ReadExpr(P, string) and RingElem(P, string)</i> to <i>ReadExpr(P, string) and RingElem(P, string) in CoCoALib</i></li></ul> CoCoALib - Feature #1052: ReadExpr(P, string) and RingElem(P, string) in CoCoALibhttps://cocoa.dima.unige.it/redmine/issues/1052?journal_id=58742017-04-26T10:24:36ZAnna Maria Bigatti
<ul><li><strong>Related to</strong> <i><a class="issue tracker-7 status-5 priority-4 priority-default closed" href="/redmine/issues/1051">Design #1051</a>: ReadExpr(P, string) and RingElem(P, string)</i> added</li></ul> CoCoALib - Feature #1052: ReadExpr(P, string) and RingElem(P, string) in CoCoALibhttps://cocoa.dima.unige.it/redmine/issues/1052?journal_id=58802017-04-26T11:52:56ZJohn Abbott
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>In Progress</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>10</i></li></ul><p>We should try to keep CoCoALib similar to CoCoA-5 (or make CoCoALib simpler if it is different from CoCoA-5).</p>
<p>If in CoCoA-5 we are happy to have <code>RingElem(P, str)</code> do what <code>ReadExpr(P, str)</code> currently does, then the same should apply to CoCoALib.</p>
<p>Right now I think it is a good idea, but I have not thought much about possible complications.</p>
<p>One potentially delicate situation is something like <code>RingElem(Zmod3, "3/6")</code>. This was already mentioned in comment 3 of issue <a class="issue tracker-1 status-5 priority-6 priority-high2 closed" title="Bug: ReadExpr: misreads 2/3^4 (Closed)" href="https://cocoa.dima.unige.it/redmine/issues/938">#938</a>, and comments 5 and 7 of issue <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: ReadExpr: decimal point (Closed)" href="https://cocoa.dima.unige.it/redmine/issues/909">#909</a>. In summary: the string is converted to an expression tree where the constants are integers, then the expression tree is interpreted... consequently <code>RingElem(Zmod3, "3/6")</code> will produce an error ("division by zero").</p>
<p>What should <code>RingElem(Zmod3, "0.5")</code> produce? Currently <code>ReadExpr(Zmod3, "0.5")</code> produces -1 because the decimal fraction is converted to a reduced rational (1/2 in this case) which is then mapped into <code>Zmod3</code>. While I do feel a bit uneasy about letting users map decimal fractions into finite fields, it is well-defined in CoCoA(Lib) because we have the convention that a decimal fraction is regarded as being exactly equal to the obvious rational number (<em>e.g.</em> "1.23" is the same as 123/100). So I see no good technical reason to forbid mapping decimal fractions into rings.</p> CoCoALib - Feature #1052: ReadExpr(P, string) and RingElem(P, string) in CoCoALibhttps://cocoa.dima.unige.it/redmine/issues/1052?journal_id=58832017-04-26T12:26:29ZAnna Maria Bigatti
<ul></ul><p>John Abbott wrote:</p>
<blockquote>
<p>If in CoCoA-5 we are happy to have <code>RingElem(P, str)</code> do what <code>ReadExpr(P, str)</code> currently does, then the same should apply to CoCoALib.</p>
<p>Right now I think it is a good idea, but I have not thought much about possible complications.</p>
</blockquote>
<p>If we do it now (and I see no objection, as I was the one stumbling in this problem!!) I would also change the examples using it.</p> CoCoALib - Feature #1052: ReadExpr(P, string) and RingElem(P, string) in CoCoALibhttps://cocoa.dima.unige.it/redmine/issues/1052?journal_id=59282017-04-27T09:42:11ZJohn Abbott
<ul><li><strong>Related to</strong> <i><a class="issue tracker-2 status-5 priority-4 priority-default closed" href="/redmine/issues/909">Feature #909</a>: ReadExpr: decimal point</i> added</li></ul> CoCoALib - Feature #1052: ReadExpr(P, string) and RingElem(P, string) in CoCoALibhttps://cocoa.dima.unige.it/redmine/issues/1052?journal_id=59482017-04-27T13:54:49ZAnna Maria Bigatti
<ul><li><strong>Tracker</strong> changed from <i>Design</i> to <i>Feature</i></li><li><strong>Assignee</strong> set to <i>Anna Maria Bigatti</i></li><li><strong>% Done</strong> changed from <i>10</i> to <i>90</i></li></ul><p>Done, documented, tested.<br />RingElem is better than ReadExpr because it highlights it is just for <strong>one</strong> RingElem.</p> CoCoALib - Feature #1052: ReadExpr(P, string) and RingElem(P, string) in CoCoALibhttps://cocoa.dima.unige.it/redmine/issues/1052?journal_id=59542017-04-27T15:35:23ZAnna Maria Bigatti
<ul></ul><p>updated all examples</p> CoCoALib - Feature #1052: ReadExpr(P, string) and RingElem(P, string) in CoCoALibhttps://cocoa.dima.unige.it/redmine/issues/1052?journal_id=64992017-11-08T13:37:00ZJohn Abbott
<ul><li><strong>Status</strong> changed from <i>In Progress</i> to <i>Feedback</i></li></ul><p>JAA has updated all tests.</p> CoCoALib - Feature #1052: ReadExpr(P, string) and RingElem(P, string) in CoCoALibhttps://cocoa.dima.unige.it/redmine/issues/1052?journal_id=65002017-11-08T13:38:04ZJohn Abbott
<ul></ul><p>Does this change make the file <code>RingElemInput</code> obsolete?<br />At least the function <strong><code>ReadExpr</code></strong> should be regarded as obsolescent, right?</p> CoCoALib - Feature #1052: ReadExpr(P, string) and RingElem(P, string) in CoCoALibhttps://cocoa.dima.unige.it/redmine/issues/1052?journal_id=65432017-11-10T11:34:19ZJohn Abbott
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>Closed</i></li><li><strong>% Done</strong> changed from <i>90</i> to <i>100</i></li></ul><p>Even though <code>ReadExpr(R, str)</code> and <code>RingElem(R, str)</code> do the same thing, we can probably leave them both in CoCoALib (at least for the time being).</p>
<p>I do not much like <code>ReadExprSemicolon</code>, but we can leave it for the time being. I think the terminating character should be an argument (not part of the fn name).</p>
<p>Closing.</p>