>> (A) we allow (*) ... and then mark such places such that if ever >> NNI and Integer don't share the same representation, these places >> can be found easily, or >> (B) forbid such (potentially) dangerous "pretend"s. >> >> I'm somewhat in favour of (A) (restricted to NNI <--> PI <--> INT). >> >> Ralf > > I agree with (A). The InnerSparseUnivariatePowerSeries is the > representation Domain for both Taylor and Laurent series, > so it accepts Integer (instead of NNI) as exponent. > > So it is safe to use 'prentend' to replace 'nniToI'. > You should make a patch for it.
The patch is attached. Question is what is a good form to recognize such places? Mentioning SubDomain is certainly a good idea, because it depends on it. But grepping for "pretend" alone is not the best to find the places where a "pretend" refers to an "Inner" domain. In fact, I will add a section "conventions" in order to state that "Inner" domains are not exported to the end-user, but rather only to library writers (of course the distinction between these two roles is not very strict). Waldek, your opinion? Ralf -- You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/fricas-devel. For more options, visit https://groups.google.com/d/optout.
From 5bbea056e2738b2d8ababf4607672488ea87eff6 Mon Sep 17 00:00:00 2001 From: Ralf Hemmecke <[email protected]> Date: Sun, 25 Mar 2018 15:58:09 +0200 Subject: introduce "pretend for an Inner domain representation --- src/algebra/sups.spad | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/algebra/sups.spad b/src/algebra/sups.spad index f2004059..72f99b75 100644 --- a/src/algebra/sups.spad +++ b/src/algebra/sups.spad @@ -1245,12 +1245,9 @@ SparseUnivariateTaylorSeries(Coef, var, cen) : Exports == Implementation where refer := ref((-1)@I::COM) makeSeries(refer, iSeries(st, 0, refer)) - nniToI : Stream Record(k : NNI, c : Coef) -> ST - nniToI st == delay - empty? st => empty() - term : Term := [(frst st).k, (frst st).c] - concat(term, nniToI rst st) - + -- We consider the Rep of InnerSparseUnivariatePowerSeries as + -- local knowledge and build on the fact that NNI=SubDomain(INT, #>=0) + nniToI x ==> (x @ Stream Record(k : NNI, c : Coef)) pretend ST series(st : Stream Record(k : NNI, c : Coef)) == series(nniToI st)$Rep --% Values -- 2.14.1
0x08BD097E.asc
Description: application/pgp-keys
