Skip to content

Instantly share code, notes, and snippets.

@diracdeltafunk
diracdeltafunk / HNY.rs
Last active January 1, 2024 22:10
Computes the number of conjugacy classes of 2023×2023 matrices with coefficients in the finite field 𝔽₂
use num_bigint::{BigUint, ToBigUint};
use num_traits::{One, Zero};
fn divisors(n: usize) -> Vec<usize> {
let mut divs = Vec::new();
for i in 1..n + 1 {
if n % i == 0 {
divs.push(i);
}
}
@diracdeltafunk
diracdeltafunk / conjugacy_business.g
Created June 3, 2021 05:51
Checks that the total number of h-fixed points is |C(h)| times the number of G-classes in the inverse image of {h}
CheckClaim := function (G, N) # Checks if the claim holds for a given normal subgroup N in a given finite group G
local f, H, A, ActionHonA, NumFixedPoints, C, NumConjClassesIntersecting, h;
# Print("\nChecking\nG = ", G, "\nN = ", N, "\n...\n");
f := NaturalHomomorphismByNormalSubgroup(G, N); # G → H ≅ G/N
H := Image(f); # ≅ G/N
# NOTE: H = img(f) does *not* consist of cosets, it has some other internal representation!
# This is why we need to hang on to the actual map f, to keep track of things.
A := Orbits(N, G, OnPoints); # N-conjugacy classes of G
ActionHonA := function (a, h) # The action of H = G/N on A
local h0, a0;
var l;
var s;
var k;
var i;
var faces = [";)", ":)", ":(", "¯\\_(ツ)_/¯", "( ͡° ͜ʖ ͡°)"];
function type(message) {
$('input.c-form-control.text-counter-input').val("♫ " + message + " ♫");
setTimeout(function() {$('input.c-form-control.text-counter-input').submit()}, 50);