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

Remove adjoint method calling transpose #838

Merged
merged 2 commits into from
Dec 17, 2021

Conversation

fingolfin
Copy link
Member

@fingolfin fingolfin commented Apr 9, 2021

In Julia, adjoint is defined to be conjugate transposition. There are rings
(e.g. finite fields of even degree over their base fields) that admit a
canonical involution and where the notion of conjugate transposition is
used as well, and standard in the literature.

As such, I think it is misleading and potentially dangerous to simply map
adjoint to transpose.

One drawback of removing it is that the notation a' won't work anymore for
transposing a matrix.

See also thofma/Hecke.jl#234 and the discussion there, resp. Nemocas/Nemo.jl#1162 and thofma/Hecke.jl#383

This is probably a breaking change, so shouldn't be merged lightly.

@fingolfin
Copy link
Member Author

@wbhart @thofma so, can this be merged (I just rebased it to fix a conflict)? Or if not, what's the hold up? I'll be happy to work on it, if I knew what it is? E.g. are there any downstream package like Hecke that we'd expect to be broken by this?

@fingolfin
Copy link
Member Author

Actually should probably first fix Hecke and any other of our packages to replace x' by transpose(x). Working on it now

@wbhart
Copy link
Contributor

wbhart commented Aug 18, 2021

Also the tests fail.

@fingolfin
Copy link
Member Author

Yeah, they failed because after I made this PR, some uses of the x' syntax were introduced. I hope I got them all now, but as I can't run the tests locally ...

@wbhart
Copy link
Contributor

wbhart commented Aug 18, 2021

In this particular case, could you perhaps call the branches in the other repos with the same name as this one so we can see the CI pass across all the packages. What I also find useful is to put a link to this PR in the description of all the others. This just helps alert whoever merges them to consider the PR's together. That approach seems to be working ok for @thofma and me so far and seems to be relatively little effort.

(You are probably already aware of all this already. But it can't hurt to mention it once.)

@fingolfin
Copy link
Member Author

Absolutely -- these two PRs simply predate that bit of tooling. Unfortunately, I think I'll have to close and replace one of the two PRs for that. I'll go with the one on Hecke, as I have to update it anyway.

@codecov
Copy link

codecov bot commented Aug 18, 2021

Codecov Report

Merging #838 (5728a33) into master (b4bc16e) will increase coverage by 3.65%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #838      +/-   ##
==========================================
+ Coverage   82.39%   86.04%   +3.65%     
==========================================
  Files          86       93       +7     
  Lines       20462    28295    +7833     
==========================================
+ Hits        16860    24347    +7487     
- Misses       3602     3948     +346     
Impacted Files Coverage Δ
src/AbstractAlgebra.jl 43.84% <ø> (+2.33%) ⬆️
src/Rings.jl 64.13% <ø> (+5.97%) ⬆️
src/Matrix.jl 94.91% <100.00%> (+3.45%) ⬆️
src/generic/DirectSum.jl 92.36% <100.00%> (-0.01%) ⬇️
src/LaurentPoly.jl 50.00% <0.00%> (-10.00%) ⬇️
src/generic/NCPoly.jl 62.76% <0.00%> (-3.44%) ⬇️
src/algorithms/FinField.jl 90.69% <0.00%> (-1.99%) ⬇️
src/generic/ModuleHomomorphism.jl 71.15% <0.00%> (-1.77%) ⬇️
src/generic/RelSeries.jl 93.43% <0.00%> (-1.60%) ⬇️
src/generic/YoungTabs.jl 96.34% <0.00%> (-0.94%) ⬇️
... and 67 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b4bc16e...5728a33. Read the comment docs.

@fingolfin
Copy link
Member Author

I've now opened matching PRs in Nemo and Hecke: Nemocas/Nemo.jl#1162 and thofma/Hecke.jl#383

Assuming everything works, we may want to first apply all those changes replacing x' by transpose(x), and perform the actual removal of the adjoint methods later...

@wbhart
Copy link
Contributor

wbhart commented Aug 19, 2021

I'm not too bothered either way, but as you see fit.

The former unfortunately stands for `adjoint`, i.e., conjugate transpose.

This patch does *not* remove our `adjoint` methods, even though they are
arguably wrong. But too much other code relies on them to do this carelessly.
In Julia, adjoint is defined to be conjugate transposition. There are rings
(e.g. finite fields of even degree over their base fields) that admit a
canonical involution and where the notion of conjugate transposition is
used as well, and standard in the literature.

As such, I think it is misleading and potentially dangerous to simply map
`adjoint` to `transpose`.

One drawback of removing it is that the notation `a'` won't work anymore for
transposing a matrix.
@thofma
Copy link
Member

thofma commented Aug 25, 2021

Somehow the downstream tests are failing.

@thofma thofma closed this Dec 16, 2021
@thofma thofma reopened this Dec 16, 2021
@thofma
Copy link
Member

thofma commented Dec 17, 2021

I am just gonna mark this breaking and merge soon together with the other breaking PR.

@thofma thofma merged commit 46804a0 into Nemocas:master Dec 17, 2021
@fingolfin fingolfin deleted the mh/remove-adjoint branch December 20, 2021 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants