Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow passing a "parameter exception" to specialize and have it resolved? #178

Open
fingolfin opened this issue Sep 24, 2024 · 2 comments
Open
Labels
enhancement New feature or request

Comments

@fingolfin
Copy link
Member

fingolfin commented Sep 24, 2024

From the book example in PR #104: We have this list of exceptions:

julia> T = genchartab("SL3.n1");

julia> h = T[2] * T[2];

julia> r = scalar_product(T[6], h)
0
With exceptions:
  2*m1 - n1 ∈ (q - 1)ℤ
  m1 - 2*n1 ∈ (q - 1)ℤ
  m1 + n1 ∈ (q - 1)ℤ
  m1 ∈ (q - 1)ℤ
  m1 - n1 ∈ (q - 1)ℤ
  n1 ∈ (q - 1)ℤ

julia> T2 = setcongruence(T; remainder=0, modulus=2);

And then we do this:

Inspecting the list of exceptions for $\langle\chi_6,\chi_2^2\rangle$, the first
occurs when $q-1$ divides $m+n$. To study this case we specialize $m$ for
character type 6:

julia> (q, (a, b, m, n)) = params(T2);

julia> x = param(T2, "x");  # create an additional "free" variable

julia> s = specialize(T2[6], m, -n + (q-1)*x);  # force m = -n (mod q-1)

julia> scalar_product(s, T2(h))
1
With exceptions:
  3*n1 ∈ (q - 1)ℤ
  2*n1 ∈ (q - 1)ℤ

It would be fantastic if instead one could just write something like this:

julia> e = r.exceptions.exceptions[3]
(m1 + n1)//(q - 1)

julia> s = specialize(T2[6], e);  # force m + n ∈ (q - 1)ℤ

Well, ideally one also shouldn't have to write r.exceptions.exceptions[3], but rather something like exceptions(r)[3] or so. But that's besides the point, the more powerful automatic in specialize is what I am after.

To implement it, we can follow the example above: add a new variable with an hitherto unused name, multiply it with the denominator aka modulus. Then take the numerator, and try to "solve" it for one variable (here, I would again start simple: check if we can find a variable which occurs exactly once, as "itself", and then specialize that variable suitably.

@fingolfin fingolfin added the enhancement New feature or request label Sep 24, 2024
@SoongNoonien
Copy link
Member

I do like the idea but I still see some problems with this. We need to decide what m1, m2, n1, n2 and so on mean we specializing T2[6]. Also adding new variables currently breaks lincomb. This should be sorted out before we add variables in this way.

@fingolfin
Copy link
Member Author

Indeed, good point. The return value for scalar_product could include information about how the parameters for the left and right input character are mapped. I.e.: left: n => n1, m => m1, right: n => n2, m => m2.

But maybe this is the wrong way to think about it... Perhaps instead of thinking about specializing one character, it would be about specializing the scalar product.

So then it might be that we have a function which takes two character, and then computes all the scalar products: first the "generic one", but then also the value for each exception. That way we would be able to keep track of where each parameter comes from.

That then still leaves many questions as to how to assemble this for the whole table, but it's a start, maybe :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants