Skip to content
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

Improve ShowImpliedFilters #2224

Merged
merged 1 commit into from
Mar 2, 2018

Conversation

fingolfin
Copy link
Member

This improves ShowImpliedFilters to really show all automatic implications (which it often did not do before); and for the extra implication ("May imply with:"), only show the additional implications. Besides the example in the diff of this PR, here are some more.

Before this PR:

gap> ShowImpliedFilters(IsFFEMatrixGroup);


May imply with:
+IsFinitelyGeneratedGroup
+HasIsFinitelyGeneratedGroup
   IsListOrCollection
   IsCollection
   IsFinite
   HasIsFinite
   CanComputeSize
   IsDuplicateFree
   HasIsDuplicateFree
   IsExtAElement
   CategoryCollections(IsExtAElement)
   CategoryCollections(CategoryCollections(IsExtAElement))
   CategoryCollections(CategoryCollections(CategoryCollections(IsNearAdditiveElement)))
   CategoryCollections(CategoryCollections(CategoryCollections(IsNearAdditiveElementWithZero)))
   CategoryCollections(CategoryCollections(CategoryCollections(IsNearAdditiveElementWithInverse)))
   CategoryCollections(CategoryCollections(CategoryCollections(IsAdditiveElement)))
   IsExtLElement
   CategoryCollections(IsExtLElement)
   CategoryCollections(CategoryCollections(IsExtLElement))
   IsExtRElement
   CategoryCollections(IsExtRElement)
   CategoryCollections(CategoryCollections(IsExtRElement))
   CategoryCollections(IsMultiplicativeElement)
   CategoryCollections(CategoryCollections(CategoryCollections(IsMultiplicativeElement)))
   CategoryCollections(IsMultiplicativeElementWithOne)
   CategoryCollections(CategoryCollections(CategoryCollections(IsMultiplicativeElementWithOne)))
   CategoryCollections(IsMultiplicativeElementWithInverse)
   CategoryCollections(CategoryCollections(CategoryCollections(IsMultiplicativeElementWithInverse)))
   CategoryCollections(IsFiniteOrderElement)
   CategoryCollections(CategoryCollections(CategoryCollections(IsFFE)))
   IsGeneralizedDomain
   IsMagma
   IsMagmaWithOne
   IsMagmaWithInversesIfNonzero
   IsMagmaWithInverses
   IsAssociative
   HasIsAssociative
   HasMultiplicativeNeutralElement
   IsGeneratorsOfSemigroup
   HasIsGeneratorsOfSemigroup
   IsSimpleSemigroup
   HasIsSimpleSemigroup
   IsRegularSemigroup
   HasIsRegularSemigroup
   IsInverseSemigroup
   HasIsInverseSemigroup
   IsCompletelyRegularSemigroup
   HasIsCompletelyRegularSemigroup
   IsCompletelySimpleSemigroup
   HasIsCompletelySimpleSemigroup
   IsGroupAsSemigroup
   HasIsGroupAsSemigroup
   IsMonoidAsSemigroup
   HasIsMonoidAsSemigroup
   IsOrthodoxSemigroup
   HasIsOrthodoxSemigroup
   IsFinitelyGeneratedGroup
   HasIsFinitelyGeneratedGroup
   IsSubsetLocallyFiniteGroup
   HasIsSubsetLocallyFiniteGroup
   CanEasilyTestMembership
   CanComputeSizeAnySubgroup
   IsHandledByNiceMonomorphism
   HasIsHandledByNiceMonomorphism

With this PR:

gap> ShowImpliedFilters(IsFFEMatrixGroup);
Implies:
   IsListOrCollection
   IsCollection
   IsDuplicateFree
   HasIsDuplicateFree
   IsExtAElement
   CategoryCollections(IsExtAElement)
   CategoryCollections(CategoryCollections(IsExtAElement))
   CategoryCollections(CategoryCollections(CategoryCollections(IsNearAdditiveElement)))
   CategoryCollections(CategoryCollections(CategoryCollections(IsNearAdditiveElementWithZero)))
   CategoryCollections(CategoryCollections(CategoryCollections(IsNearAdditiveElementWithInverse)))
   CategoryCollections(CategoryCollections(CategoryCollections(IsAdditiveElement)))
   IsExtLElement
   CategoryCollections(IsExtLElement)
   CategoryCollections(CategoryCollections(IsExtLElement))
   IsExtRElement
   CategoryCollections(IsExtRElement)
   CategoryCollections(CategoryCollections(IsExtRElement))
   CategoryCollections(IsMultiplicativeElement)
   CategoryCollections(CategoryCollections(CategoryCollections(IsMultiplicativeElement)))
   CategoryCollections(IsMultiplicativeElementWithOne)
   CategoryCollections(CategoryCollections(CategoryCollections(IsMultiplicativeElementWithOne)))
   CategoryCollections(IsMultiplicativeElementWithInverse)
   CategoryCollections(CategoryCollections(CategoryCollections(IsMultiplicativeElementWithInverse)))
   CategoryCollections(CategoryCollections(CategoryCollections(IsFFE)))
   IsGeneralizedDomain
   IsMagma
   IsMagmaWithOne
   IsMagmaWithInversesIfNonzero
   IsMagmaWithInverses
   IsAssociative
   HasIsAssociative
   HasMultiplicativeNeutralElement
   IsGeneratorsOfSemigroup
   HasIsGeneratorsOfSemigroup
   IsSimpleSemigroup
   HasIsSimpleSemigroup
   IsRegularSemigroup
   HasIsRegularSemigroup
   IsInverseSemigroup
   HasIsInverseSemigroup
   IsCompletelyRegularSemigroup
   HasIsCompletelyRegularSemigroup
   IsGroupAsSemigroup
   HasIsGroupAsSemigroup
   IsMonoidAsSemigroup
   HasIsMonoidAsSemigroup
   IsOrthodoxSemigroup
   HasIsOrthodoxSemigroup


May imply with:
+IsFinitelyGeneratedGroup
+HasIsFinitelyGeneratedGroup
   IsFinite
   HasIsFinite
   CanComputeSize
   CategoryCollections(IsFiniteOrderElement)
   IsCompletelySimpleSemigroup
   HasIsCompletelySimpleSemigroup
   IsSubsetLocallyFiniteGroup
   HasIsSubsetLocallyFiniteGroup
   CanEasilyTestMembership
   CanComputeSizeAnySubgroup
   IsHandledByNiceMonomorphism
   HasIsHandledByNiceMonomorphism

A bigger one, on the master branch:

gap> ShowImpliedFilters(IsGroup and IsAbelian);
Implies:
   IsListOrCollection
   IsCollection
   IsDuplicateFree
   HasIsDuplicateFree
   IsExtLElement
   CategoryCollections(IsExtLElement)
   IsExtRElement
   CategoryCollections(IsExtRElement)
   CategoryCollections(IsMultiplicativeElement)
   CategoryCollections(IsMultiplicativeElementWithOne)
   CategoryCollections(IsMultiplicativeElementWithInverse)
   IsGeneralizedDomain
   IsMagma
   IsMagmaWithOne
   IsMagmaWithInversesIfNonzero
   IsMagmaWithInverses
   IsAssociative
   HasIsAssociative
   IsCommutative
   HasIsCommutative
   HasMultiplicativeNeutralElement
   IsGeneratorsOfSemigroup
   HasIsGeneratorsOfSemigroup
   IsSimpleSemigroup
   HasIsSimpleSemigroup
   IsRegularSemigroup
   HasIsRegularSemigroup
   IsInverseSemigroup
   HasIsInverseSemigroup
   IsCompletelyRegularSemigroup
   HasIsCompletelyRegularSemigroup
   IsGroupAsSemigroup
   HasIsGroupAsSemigroup
   IsMonoidAsSemigroup
   HasIsMonoidAsSemigroup
   IsOrthodoxSemigroup
   HasIsOrthodoxSemigroup
   IsNilpotentGroup
   HasIsNilpotentGroup
   IsSupersolvableGroup
   HasIsSupersolvableGroup
   IsSolvableGroup
   HasIsSolvableGroup


May imply with:
+CanEasilyComputePcgs
   IsListOrCollection
   IsCollection
   CanComputeSize
   IsDuplicateFree
   HasIsDuplicateFree
   IsExtLElement
   CategoryCollections(IsExtLElement)
   IsExtRElement
   CategoryCollections(IsExtRElement)
   CategoryCollections(IsMultiplicativeElement)
   CategoryCollections(IsMultiplicativeElementWithOne)
   CategoryCollections(IsMultiplicativeElementWithInverse)
   IsGeneralizedDomain
   IsMagma
   IsMagmaWithOne
   IsMagmaWithInversesIfNonzero
   IsMagmaWithInverses
   IsAssociative
   HasIsAssociative
   IsCommutative
   HasIsCommutative
   HasMultiplicativeNeutralElement
   IsGeneratorsOfSemigroup
   HasIsGeneratorsOfSemigroup
   IsSimpleSemigroup
   HasIsSimpleSemigroup
   IsRegularSemigroup
   HasIsRegularSemigroup
   IsInverseSemigroup
   HasIsInverseSemigroup
   IsCompletelyRegularSemigroup
   HasIsCompletelyRegularSemigroup
   IsGroupAsSemigroup
   HasIsGroupAsSemigroup
   IsMonoidAsSemigroup
   HasIsMonoidAsSemigroup
   IsOrthodoxSemigroup
   HasIsOrthodoxSemigroup
   CanEasilyComputeWithIndependentGensAbelianGroup
   CanComputeSizeAnySubgroup
   IsNilpotentGroup
   HasIsNilpotentGroup
   IsSupersolvableGroup
   HasIsSupersolvableGroup
   IsSolvableGroup
   HasIsSolvableGroup
   CanEasilyComputePcgs

+CategoryCollections(IsPerm)
   IsListOrCollection
   IsCollection
   IsFinite
   HasIsFinite
   CanEasilyCompareElements
   HasCanEasilyCompareElements
   CanEasilySortElements
   HasCanEasilySortElements
   CanComputeSize
   IsDuplicateFree
   HasIsDuplicateFree
   IsExtLElement
   CategoryCollections(IsExtLElement)
   IsExtRElement
   CategoryCollections(IsExtRElement)
   CategoryCollections(IsMultiplicativeElement)
   CategoryCollections(IsMultiplicativeElementWithOne)
   CategoryCollections(IsMultiplicativeElementWithInverse)
   CategoryCollections(IsAssociativeElement)
   CategoryCollections(IsFiniteOrderElement)
   IsGeneralizedDomain
   CategoryCollections(IsPerm)
   IsMagma
   IsMagmaWithOne
   IsMagmaWithInversesIfNonzero
   IsMagmaWithInverses
   IsGeneratorsOfMagmaWithInverses
   HasIsGeneratorsOfMagmaWithInverses
   IsAssociative
   HasIsAssociative
   IsCommutative
   HasIsCommutative
   HasMultiplicativeNeutralElement
   IsGeneratorsOfSemigroup
   HasIsGeneratorsOfSemigroup
   IsSimpleSemigroup
   HasIsSimpleSemigroup
   IsRegularSemigroup
   HasIsRegularSemigroup
   IsInverseSemigroup
   HasIsInverseSemigroup
   IsCompletelyRegularSemigroup
   HasIsCompletelyRegularSemigroup
   IsCompletelySimpleSemigroup
   HasIsCompletelySimpleSemigroup
   IsGroupAsSemigroup
   HasIsGroupAsSemigroup
   IsMonoidAsSemigroup
   HasIsMonoidAsSemigroup
   IsOrthodoxSemigroup
   HasIsOrthodoxSemigroup
   IsFinitelyGeneratedGroup
   HasIsFinitelyGeneratedGroup
   IsSubsetLocallyFiniteGroup
   HasIsSubsetLocallyFiniteGroup
   CanEasilyTestMembership
   CanEasilyComputeWithIndependentGensAbelianGroup
   CanComputeSizeAnySubgroup
   KnowsHowToDecompose
   HasKnowsHowToDecompose
   IsNilpotentGroup
   HasIsNilpotentGroup
   IsSupersolvableGroup
   HasIsSupersolvableGroup
   IsMonomialGroup
   HasIsMonomialGroup
   IsSolvableGroup
   HasIsSolvableGroup
   IsPolycyclicGroup
   HasIsPolycyclicGroup
   CanEasilyComputePcgs
   CanComputeFittingFree

With this PR, the 170 lines of output reduce to just 82 with arguably the same information content, but IMHO much easier to understand for a human:

gap> ShowImpliedFilters(IsGroup and IsAbelian);
Implies:
   IsListOrCollection
   IsCollection
   IsDuplicateFree
   HasIsDuplicateFree
   IsExtLElement
   CategoryCollections(IsExtLElement)
   IsExtRElement
   CategoryCollections(IsExtRElement)
   CategoryCollections(IsMultiplicativeElement)
   CategoryCollections(IsMultiplicativeElementWithOne)
   CategoryCollections(IsMultiplicativeElementWithInverse)
   IsGeneralizedDomain
   IsMagma
   IsMagmaWithOne
   IsMagmaWithInversesIfNonzero
   IsMagmaWithInverses
   IsAssociative
   HasIsAssociative
   IsCommutative
   HasIsCommutative
   HasMultiplicativeNeutralElement
   IsGeneratorsOfSemigroup
   HasIsGeneratorsOfSemigroup
   IsSimpleSemigroup
   HasIsSimpleSemigroup
   IsRegularSemigroup
   HasIsRegularSemigroup
   IsInverseSemigroup
   HasIsInverseSemigroup
   IsCompletelyRegularSemigroup
   HasIsCompletelyRegularSemigroup
   IsGroupAsSemigroup
   HasIsGroupAsSemigroup
   IsMonoidAsSemigroup
   HasIsMonoidAsSemigroup
   IsOrthodoxSemigroup
   HasIsOrthodoxSemigroup
   IsNilpotentGroup
   HasIsNilpotentGroup
   IsSupersolvableGroup
   HasIsSupersolvableGroup
   IsSolvableGroup
   HasIsSolvableGroup


May imply with:
+CanEasilyComputePcgs
   CanComputeSize
   CanEasilyComputeWithIndependentGensAbelianGroup
   CanComputeSizeAnySubgroup

+CategoryCollections(IsPerm)
   IsFinite
   HasIsFinite
   CanEasilyCompareElements
   HasCanEasilyCompareElements
   CanEasilySortElements
   HasCanEasilySortElements
   CanComputeSize
   CategoryCollections(IsAssociativeElement)
   CategoryCollections(IsFiniteOrderElement)
   IsGeneratorsOfMagmaWithInverses
   HasIsGeneratorsOfMagmaWithInverses
   IsCompletelySimpleSemigroup
   HasIsCompletelySimpleSemigroup
   IsFinitelyGeneratedGroup
   HasIsFinitelyGeneratedGroup
   IsSubsetLocallyFiniteGroup
   HasIsSubsetLocallyFiniteGroup
   CanEasilyTestMembership
   CanEasilyComputeWithIndependentGensAbelianGroup
   CanComputeSizeAnySubgroup
   KnowsHowToDecompose
   HasKnowsHowToDecompose
   IsMonomialGroup
   HasIsMonomialGroup
   IsPolycyclicGroup
   HasIsPolycyclicGroup
   CanEasilyComputePcgs
   CanComputeFittingFree

@fingolfin fingolfin added the kind: enhancement Label for issues suggesting enhancements; and for pull requests implementing enhancements label Mar 1, 2018
Copy link
Contributor

@ThomasBreuer ThomasBreuer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change makes sense.

One could argue that also the implied property tester filters (HasSomething) could be omitted from the output if the corresponding properties are implied.

(Why is the implied filter IsNilpotentByFinite no longer shown? Its implication comes from the polycyclic package, which is loaded by default.)

@fingolfin
Copy link
Member Author

IsNilpotentByFinite is not shown here because I made the above lists with ./gap -A, to make them reproducible for others (I have changed the list of default packages in my GAP, so they might not be otherwise). Note that IsNilpotentByFinite still is shown in the manual example.

About hiding HasIsSomething when IsSomething is already present: I like this idea! But I won't do it in this PR, and I won't try to work on it in the foreseeable future. If you are interested in doing that, that'd be nice. If not, I can file an "enhancement" issue later on to remember this idea (or feel free to submit that issue yourself)/

@frankluebeck
Copy link
Member

frankluebeck commented Mar 2, 2018

This seems a sensible improvement. Also, removing those Has filters as proposed sounds useful for a better overview. (But I have never used this function because I disliked the too long output.)

@frankluebeck frankluebeck reopened this Mar 2, 2018
@frankluebeck frankluebeck merged commit 46d70c5 into gap-system:master Mar 2, 2018
@frankluebeck
Copy link
Member

Merged such that the proposed further changes can be built on this.

@fingolfin fingolfin deleted the mh/ShowImpliedFilters branch March 2, 2018 19:09
ThomasBreuer added a commit to ThomasBreuer/gap that referenced this pull request Mar 5, 2018
This is a follow-up to gap-system#2224.  As discussed there,
those property tester filters are omitted from the output
for which the property itself is already shown.
ThomasBreuer added a commit to ThomasBreuer/gap that referenced this pull request Mar 14, 2018
This is a follow-up to gap-system#2224.  As discussed there,
those property tester filters are omitted from the output
for which the property itself is already shown.
fingolfin pushed a commit that referenced this pull request Mar 20, 2018
This is a follow-up to #2224.  As discussed there,
those property tester filters are omitted from the output
for which the property itself is already shown.
@fingolfin fingolfin added the release notes: added PRs introducing changes that have since been mentioned in the release notes label Mar 28, 2018
ChrisJefferson pushed a commit to ChrisJefferson/gap that referenced this pull request Jun 14, 2018
This is a follow-up to gap-system#2224.  As discussed there,
those property tester filters are omitted from the output
for which the property itself is already shown.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: enhancement Label for issues suggesting enhancements; and for pull requests implementing enhancements release notes: added PRs introducing changes that have since been mentioned in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants