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

Adjoint of polynomials and complex numbers #116

Closed
ahumenberger opened this issue Aug 7, 2019 · 5 comments
Closed

Adjoint of polynomials and complex numbers #116

ahumenberger opened this issue Aug 7, 2019 · 5 comments

Comments

@ahumenberger
Copy link
Contributor

It seems that the implementation of adjoint is neglecting the fact that the unknowns of polynomials can be replaced by complex numbers.

LinearAlgebra.adjoint(t::AbstractTerm) = LinearAlgebra.adjoint(coefficient(t)) * monomial(t)

using DynamicPolynomials
@polyvar x
p = (2-im)*x
adj_p = adjoint(p)
adj_p(x => 2+im)

The above piece of code yields 3+4im but the result should actually be 5.

@saschatimme
Copy link
Collaborator

Conjugation is not an algebraic operation, so there is a priori no conjugation of variables.
For me the adjoint is a map between polynomial rings, acting only on the coefficients of the polynomial.
Therefore, I think the result is correct here.

@ahumenberger
Copy link
Contributor Author

Okay, I see your point. So the difference lies in viewing the polynomial as an element in the polynomial ring or as a function?

@chriscoey
Copy link
Collaborator

Coincidentally, I experienced this point of confusion yesterday when taking to Sascha. I think of them as functions too and I was hoping to add complex polynomial extensions to multivariatepolynomials and sumofsquares to enable modeling and solving complex sum-of-squares optimization problems (which involve real-valued/Hermitian complex polynomial functions). I will try to discuss with @blegat and @saschatimme in the next couple days.

How do you intend to use conjugation?

@ahumenberger
Copy link
Contributor Author

I'm not using it directly, I came across it while facing JuliaAlgebra/DynamicPolynomials.jl#49.
In the end, it does not matter for me as I'm not working with complex numbers but rationals. I was just curios/confused about the implementation of adjoint.

@saschatimme
Copy link
Collaborator

saschatimme commented Aug 7, 2019

Okay, I see your point. So the difference lies in viewing the polynomial as an element in the polynomial ring or as a function?

Yes exactly :)

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

No branches or pull requests

3 participants