Re: [fricas-devel] [PATCH] fix 'children' in List, Stream and Tree

2018-11-16 Thread oldk1331
My updated patch is here: https://github.com/oldk1331/fricas/commit/0bf5c58d3cf72fd6429313c62e5c28bf1312451f.patch Following similar logic, "nodes" and "leaves" should give error when argument is empty; but "leaf?", "child?", "node?" should not give error, they should return true when the relatio

Re: [fricas-devel] Noncommutative factorization

2018-11-16 Thread Bill Page
Waldek, On Sat, Nov 10, 2018 at 12:02 PM you wrote: > > One update to what I wrote before. In > > J. P. Bell, A. Heinle, and V. Levandovskyy, > On Noncommutative Finite Factorization Domains, > Trans. Amer. Math. Soc. 369 (2017), 2675-2695 > > there is proof of finite number of factorizations. >

Re: [fricas-devel] [PATCH] fix 'children' in List, Stream and Tree

2018-11-16 Thread Waldek Hebisch
oldk1331 wrote: > > On Fri, Nov 16, 2018 at 10:07 PM Waldek Hebisch > wrote: > > > > That is the point: normal case is that we check before using > > 'children' and error in 'childern' is to catch bugs > > (missing check). That is why I ask if you have use > > case when we want call without chec

Re: [fricas-devel] [PATCH] fix 'children' in List, Stream and Tree

2018-11-16 Thread oldk1331
On Fri, Nov 16, 2018 at 10:07 PM Waldek Hebisch wrote: > > That is the point: normal case is that we check before using > 'children' and error in 'childern' is to catch bugs > (missing check). That is why I ask if you have use > case when we want call without check and empty return is > OK. That

Re: [fricas-devel] [PATCH] fix 'children' in List, Stream and Tree

2018-11-16 Thread Waldek Hebisch
Ralf Hemmecke wrote: > > What I find definitely bad is to give the burden of checking to both the > function and the caller, by letting the specification be unclear about > special cases. > > http://fricas.github.io/api/GcdDomain.html#l-gcd-domain-gcd > > gcd(x, y) returns the greatest common

Re: [fricas-devel] [PATCH] fix 'children' in List, Stream and Tree

2018-11-16 Thread Waldek Hebisch
oldk1331 wrote: > I have a few reasons: > > 1. I prefer to have fewer "error" in library, it's hard > to handle error in SPAD, and it makes function not "total" > (it doesn't return a value for certain inputs), that's a > bad property. > > 2. If we have error for "children", then what about "leaf