-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP lib: add SetAsDomain #3460
WIP lib: add SetAsDomain #3460
Conversation
... GeneratorsOfDomain. TODO Add synonym
Now: declare synonym TODO - move new code into domain.gd and .gi - adjust installations to - update doc - also document this as a synonym? - add tests!!
069366b
to
50af123
Compare
Codecov Report
@@ Coverage Diff @@
## master #3460 +/- ##
==========================================
- Coverage 85.34% 85.33% -0.01%
==========================================
Files 699 699
Lines 346471 346505 +34
==========================================
+ Hits 295681 295699 +18
- Misses 50790 50806 +16
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something is wrong with this PR, with it it seems GAP cannot even start (looking at Travis logs here).
To be honest, I am not quite sure what the point of this is. In the end, all it seems to add is a print method, and only for domains who are defined on a GAP "set". But that does not seem to be very compelling to me. I can already do everything else in GAP right now, can't I?
gap> d:=Domain([1,2,3,1]);
<object>
gap> d!.GeneratorsOfDomain;
[ 1, 2, 3, 1 ]
gap> AsSet(d);
[ 1, 2, 3 ]
gap> 1 in d;
true
gap> 4 in d;
false
|
||
InstallMethod(\in, | ||
"for an IsSetAsDomain", | ||
[IsObject, IsSetAsDomain], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But IsSetAsDomain
is merely a synonym for IsDomain
; so now you really have installed a generic \in
method for arbitrary domains, which tries to use AsList
. That makes me a bit nervous, though I can't put my finger on it right now.
"for an IsSetAsDomain", | ||
[IsSetAsDomain], | ||
function( setAsDomain ) | ||
Print("SetAsDomain(", AsList(setAsDomain), ")"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't you need a different function for empty domains?
Oh sorry. This was a bit chaotic since I also had like 5 other PRs going on. I first thought I would introduce a new Category Here are my current thoughts on what I actually want to do:
which I find very ugly. At the very least I want users to be able to see for a map that I defined what its domain and range are. So I think there are basically two options
While I'm not sure whether there are people who would find |
TODO
Description
Currently there is no filter that specifies explicitly that a domain is created as a set with no operational structure. This PR introduces the filter
IsSetAsDomain
. The motivation is to be able to use e.g.SetAsDomain([1..n])
as a domain forMappingByFunction
:One thing that is not entirely clear to me yet: As
IsPermGroup
already impliesIsDomain
, should it also implyIsSetAsDomain
or not? I think it should. Methods for e.g.IsPermGroup
would then outrank methods forIsSetAsDomain
anyways.