Skip to content

Commit f2336a2

Browse files
committed
Omit tester filters from ShowImpliedFilters output
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.
1 parent f5c015f commit f2336a2

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

lib/methwhy.g

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -273,34 +273,31 @@ end);
273273
## <Description>
274274
## Displays information about the filters that may be
275275
## implied by <A>filter</A>. They are given by their names.
276-
## <C>ShowImpliedFilters</C> first displays the names of all filters
276+
## <Ref Func="ShowImpliedFilters"/> first displays the names of all filters
277277
## that are unconditionally implied by <A>filter</A>. It then displays
278278
## implications that require further filters to be present (indicating
279279
## by <C>+</C> the required further filters).
280280
## <Example><![CDATA[
281281
## gap> ShowImpliedFilters(IsNilpotentGroup);
282282
## Implies:
283283
## IsSupersolvableGroup
284-
## HasIsSupersolvableGroup
285284
## IsSolvableGroup
286-
## HasIsSolvableGroup
287285
## IsNilpotentByFinite
288-
## HasIsNilpotentByFinite
289286
##
290287
##
291288
## May imply with:
292289
## +IsFinitelyGeneratedGroup
293-
## +HasIsFinitelyGeneratedGroup
294290
## IsPolycyclicGroup
295-
## HasIsPolycyclicGroup
296291
##
297292
## ]]></Example>
298293
## </Description>
299294
## </ManSection>
300295
## <#/GAPDoc>
301296
##
302297
BIND_GLOBAL("ShowImpliedFilters",function(filter)
303-
local flags, implied, f, extra_implications, implication, name, diff_reqs, diff_impls;
298+
local flags, implied, f, extra_implications, implication, name, diff_reqs,
299+
diff_impls, reduced;
300+
304301
flags:=FLAGS_FILTER(filter);
305302
implied := WITH_IMPS_FLAGS(flags);
306303
atomic readonly IMPLICATIONS_SIMPLE do
@@ -322,20 +319,24 @@ local flags, implied, f, extra_implications, implication, name, diff_reqs, diff_
322319
implied := SUB_FLAGS(implied, flags);
323320
fi;
324321

322+
reduced:= trues -> Filtered( trues,
323+
i -> not ( INFO_FILTERS[i] in FNUM_TPRS
324+
and FLAG1_FILTER( FILTERS[i] ) in trues ) );
325+
325326
if SIZE_FLAGS(implied) > 0 then
326327
Print("Implies:\n");
327-
for name in NamesFilter(implied) do
328+
for name in NamesFilter( reduced( TRUES_FLAGS( implied ) ) ) do
328329
Print(" ",name,"\n");
329330
od;
330331
fi;
331332

332333
if Length(extra_implications) > 0 then
333334
Print("\n\nMay imply with:\n");
334335
for implication in extra_implications do
335-
for name in NamesFilter(implication[1]) do
336+
for name in NamesFilter( reduced( TRUES_FLAGS( implication[1] ) ) ) do
336337
Print("+",name,"\n");
337338
od;
338-
for name in NamesFilter(implication[2]) do
339+
for name in NamesFilter( reduced( TRUES_FLAGS( implication[2] ) ) ) do
339340
Print(" ",name,"\n");
340341
od;
341342
Print("\n");
@@ -393,7 +394,7 @@ BIND_GLOBAL("PageSource", function ( fun, nr... )
393394
f := Filename(List(GAPInfo.RootPaths, Directory), f);
394395
fi;
395396
if f = fail and fun in OPERATIONS then
396-
# for operations we show the location(s) of their operation
397+
# for operations we show the location(s) of their declararion
397398
locs := GET_DECLARATION_LOCATIONS(fun);
398399
if n > Length(locs) then
399400
Print("Operation ", NameFunction(fun), " has only ",

0 commit comments

Comments
 (0)