diff --git a/gap/structure.gi b/gap/structure.gi index 0d1e5c0..4f3b8d7 100644 --- a/gap/structure.gi +++ b/gap/structure.gi @@ -33,13 +33,17 @@ end); InstallGlobalFunction(CloneOfTypeByGenerators, function(cat, fam, gens, genAttrib, tableCstr) - local M; + local M, elf; if not(IsEmpty(gens) or IsIdenticalObj(FamilyObj(gens), fam)) then Error(" and family of do not match"); fi; M := Objectify(NewType( fam, cat and IsAttributeStoringRep), rec()); Setter(genAttrib)(M, AsList(gens)); SetConstructorFromTable(M, tableCstr); + elf := ElementsFamily(fam); + # Since there doesn't seem to be a way to make the IsFinite method based + # on the family being finite into an immediate method: + if HasIsFinite(elf) and IsFinite(elf) then SetIsFinite(M, true); fi; return M; end);