PolyMath icon indicating copy to clipboard operation
PolyMath copied to clipboard

Rename ``PMComplex >> conjugated`` to ``complexConjugate``

Open olekscode opened this issue 4 years ago • 5 comments

Because numbers can also be conjugate in a different sense: 5 + 5 sqrt is conjugate to 5 - 5 sqrt. https://math.stackexchange.com/questions/3397053/whats-the-correct-definition-of-conjugate-and-do-we-identify-them

Also, this message should be implemented by Number

5 complexConjugate.  "5"
(5 + 3i) complexConjugate. "5 - 3i"

And testing:

5 isComplexConjugateOf: 5. "true"
(5 + 3i) isComplexConjugateOf: (5 - 3i). "true"

olekscode avatar Feb 23 '21 10:02 olekscode

Screenshot 2022-04-10 at 21 50 50 Screenshot 2022-04-10 at 21 50 34

hemalvarambhia avatar Apr 10 '22 20:04 hemalvarambhia

I am noticing now that the Complex Number Test Class has a large number of methods. A refactor might split this up, and there are a number of ways to do that (I'll provide a list in a moment...).

hemalvarambhia avatar Apr 11 '22 08:04 hemalvarambhia

Because quaternions also have a conjugate operation, will you need yet another quaternionConjugate selector?

I referred to Wikipedia, and the word used there is conjugation:

Conjugation of quaternions is analogous to conjugation of complex numbers and to transposition (also known as reversal) of elements of Clifford algebras. To define it, let {\displaystyle q=a+b,\mathbf {i} +c,\mathbf {j} +d,\mathbf {k} } be a quaternion. The conjugate of q is the quaternion {\displaystyle q^{*}=a-b,\mathbf {i} -c,\mathbf {j} -d,\mathbf {k} }. It is denoted by q∗, qt, {\displaystyle {\tilde {q}}}, or q.[7] Conjugation is an involution, meaning that it is its own inverse, so conjugating an element twice returns the original element. The conjugate of a product of two quaternions is the product of the conjugates in the reverse order. That is, if p and q are quaternions, then (pq)∗ = q∗p∗, not p∗q∗.

The conjugation of a quaternion, in stark contrast to the complex setting, can be expressed with multiplication and addition of quaternions:

{\displaystyle q^{*}=-{\frac {1}{2}}(q+,\mathbf {i} ,q,\mathbf {i} +,\mathbf {j} ,q,\mathbf {j} +,\mathbf {k} ,q,\mathbf {k} )~.}

hemalvarambhia avatar Apr 23 '22 18:04 hemalvarambhia

Are we discovering that conjugate may have meanings in different contexts? I.e. bounded contexts.

hemalvarambhia avatar Apr 23 '22 18:04 hemalvarambhia