Godtone
Joined 17 December 2020
m →My Python 3 code: remove weird accidental redundant parameter |
m →My Python 3 code: add a function that deduces a minimal prime subgroup from a list of intervals (useful for finding temps of a certain rank based on comma lists) |
||
| Line 772: | Line 772: | ||
ivs |= set([ iv(i[1]*2,i[0]) for i in ivs ]) | ivs |= set([ iv(i[1]*2,i[0]) for i in ivs ]) | ||
return ivs | return ivs | ||
def subgroup(ivs): | |||
sg = [] | |||
for i in ivs: | |||
f = fact(i) | |||
for j in range(len(f)): | |||
if f[j] and prime_idx(j) not in sg: | |||
sg.append(prime_idx(j)) | |||
return sorted(sg) | |||
# if x is a monzo (which is assumed if type(x) not in [int,tuple]), assumed to be full prime limit (or check would be redundant) | # if x is a monzo (which is assumed if type(x) not in [int,tuple]), assumed to be full prime limit (or check would be redundant) | ||
def in_subgroup(x, sg): | def in_subgroup(x, sg): | ||