Skip to main content

Fast Fourier transforms for symmetric groups over prime finite fields

Project description

fft-symmetric-py

FFT (fast Fourier transform) of the symmetric group over finite fields in Python.

This package implements the semisimple case: for S_n over F_p, the constructor enforces p > n. Fourier blocks use Young's seminormal representations and the subgroup chain

S_1 <= S_2 <= ... <= S_n

Input coefficients are ordered by lexicographic permutation image order.

from fft_symmetric import SymmetricFFT

fft = SymmetricFFT(4, 101)
values = [1] * fft.input_len

transform = fft.fft(values)
recovered = fft.ifft(transform)
assert recovered == values

product = fft.multiply(values, values)
assert len(product) == fft.input_len

for shape, block in transform.blocks.items():
    print(shape, block.rows, block.cols)

The package also exposes naive_dft and naive_multiply as small-rank correctness or timing baselines.

Run tests with:

PYTHONPATH=src python3 -m unittest discover -s tests

Run the opt-in timing-sensitive multiplication test with:

PYTHONPATH=src FFT_SYMMETRIC_RUN_TIMING=1 python3 -m unittest \
    tests.test_core.CoreTests.test_multiplication_is_faster_than_naive

Run the timing example with:

PYTHONPATH=src python3 -m examples.timing

Set FFT_SYMMETRIC_TIMING_MAX_N=7 or higher if you want a longer run.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fft_symmetric-0.1.0.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fft_symmetric-0.1.0-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file fft_symmetric-0.1.0.tar.gz.

File metadata

  • Download URL: fft_symmetric-0.1.0.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for fft_symmetric-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e1374eccf428a4b200e67a31d20bf9602f33de8bdc03ab13b45eb686a9da3566
MD5 a634d0e5f0dab19a1594597197a1d5ce
BLAKE2b-256 62ef99b73407db4b3b38212589f2668c4a28e8b0a7e51fb363e643abad7633ce

See more details on using hashes here.

File details

Details for the file fft_symmetric-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: fft_symmetric-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for fft_symmetric-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 14b3c7fcf8617f0599ccea63a5796feaede6d4861030fe1a6ca57990c6661220
MD5 41b74b7a66f212c696eb936c041a91a1
BLAKE2b-256 1ad74296b5350a122790bb2303be73bd1cf6958ec86fa64788074347a06eb097

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page