Adding to that... (2) -> Integer has with ( 0: () -> % ) Line 1: Integer has with ( 0: () -> % ) .................A.B Error A: Missing mate. Error B: syntax error at top level Error B: Possibly missing a ) 3 error(s) parsing
On 03/30/2018 09:10 PM, Prof. Dr. Johannes Grabmeier privat wrote: > Can one clarify the ideas, semantics behind the following behaviours? > > > FriCAS algebra code: > > AbelianMonoid() : Category == AbelianSemiGroup with > 0 : constant -> % > ..... > > becomes the following in the Interpreter: > > (87) -> )sh AbelianMonoid > AbelianMonoid is a category constructor > Abbreviation for AbelianMonoid is ABELMON > This constructor is exposed in this frame. > ------------------------------------------- Operations > ------------------------------------------- > > ?*? : (NonNegativeInteger, %) -> % ?*? : > (PositiveInteger, %) -> % > ?+? : (%, %) -> % ?=? : (%, %) -> Boolean > 0 : () -> % coerce : % -> OutputForm > > > The following code compiles > > if R has 0: () -> % then CoercibleFrom Bits > > while > > if R has 0: constant -> % then CoercibleFrom Bits > > does not compile > > > The compiled variant, however, cannot be used for R = Integer > as > > (87) -> Integer has AbelianMonoid > > (87) true > > > Type: Boolean > (88) -> Integer has 0: () -> % > > (88) false > > > Type: Boolean > (89) -> Integer has 0: constant -> % > > constant is not a valid type. > > > > In my opinion the behaviour is not what one expects, what has to be > changed, to get forseeable > behaviour? > > Remark: I remember that constant and () once distinguished between > constant values and constant functions, > but this seems to be no longer the case. > -- 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 fricas-devel+unsubscr...@googlegroups.com. To post to this group, send email to fricas-devel@googlegroups.com. Visit this group at https://groups.google.com/group/fricas-devel. For more options, visit https://groups.google.com/d/optout.