Closed rogeliam closed 1 year ago
Just a remark for @antonydellavecchia and the other developers
The functions save/load do not save correctly if the ground field was a cyclotomic field.
It is the 'same' field, but just printed differently. The special printing comes from a property stored in the attributes of the objects (aka set_attribute!/get_attribute
). While I do not think that consistent printing should be guaranteed, it raises the question about handling this additional data in general. Have there already been some ideas/decisions in this regard?
I don't think there has been any decisions made. I think some people have thought about it a bit? I guess the issue is that deciding to store attributes should be left to the user. Maybe there are some that should be stored regardless? maybe if an ideal is a groebner basis or not? From what I gather storing the field with a cyclotomic attribute or not doesn't have any effect on the type? so everything should work accordingly?
But ideally it would be nice to store this if the users wants. I guess we would try to offer an interface where the user can list the attributes that they would like to store.
@thofma I think this is a type-by-type discussion: we definitely want to serialize all "essential" data; if that means serializing some of the attribute, so be it. I see no fundamental problem in having logic of the kind if attribute X is present then serialize it
and matching while deserializing.
(Perhaps trickier is what to do about data that is cached for performance reasons; do we want to store that? probably not in general, but sometimes it might be useful? how would one specify that? or perhaps this shouldn't be done and restoring special cached information is about the code calling the serialization layer?)
It is tricky to have an interface where a user can choose the attributes to be stored. I think we made sure that attributes are not part of the API of objects. For example, how would a user know, that the information, that an ideal is prime (just an example) is an attribute, which could be serialized/deserialized. So I think an interface where specific attributes are specified will be hard. Or maybe I am missing something.
Here it is notable, that multiplication of T and TT does work, but multiplication of the entries does not work.
System (please complete the following information): Please paste the output of
Oscar.versioninfo(full=true)
below. If this does not work, please paste the output of Julia'sversioninfo()
and your Oscar version.