1) it appears that in some cases Mathematica treats all symbols not
demonstrably equal to a complex number as a noncomplex number, in which
case if I could coerce it to complex by something like
makeComplex[x_] := Complex[x]
(which doesn't work) I might have a chance; or
2) in other cases that k -> Conjugate[k], which would be OK if I could
get it to print out as k* or overbar k.
What follows are a couple things I've already tried:
Conjugate[a_] := a* /; SymbolQ[a];
Format[Conjugate[x_]] :=x* /; SymbolQ[x]
In summary: I want to declare a symbol, say k, as having Head Symbol or
Complex and then to print out (display) the Conjugate of k in the form
of either k* or overbar k. (I use version 3.)
Thanks.
Hi Patrick,
There is a package called "Utilities`Notation`". I am not sure, whether
it is already included in Mathematica 3.0 (look at the Help Browser -> AddOns ->
Extra Utilities) or must be downloaded.
The documentation can be found at:
http://documents.wolfram.com/v4/GettingStarted/NotationMaker/None.html
You should to be able to create the notation you are looking for with
this package.
Hope that helps.
Regards,
Harald
--
Harald Giese
Email: gi...@dkrz.de
> NEUE TELEFON-NUMMER | NEW PHONE-NUMBER <
Phone: +49 (0)40 42838 5796; Fax: +49 (0)40 5605724
Institut fuer Meereskunde der Universitaet Hamburg
(Institute of Oceanography of the University of Hamburg)
Troplowitzstrasse 7, D-22529 Hamburg
The definition
ToBoxes[Conjugate[x_],form_:TraditionalForm]:=SuperscriptBox[ToBoxes[x],"*"]
will print the complex conjugate in the form you like.
Since Mathematica knows no types for symbols it has no information
about you assumption that some variables are complexes. In Mathematica 4
you can specify that Element[z,Complexes] for Simplify and
FullSimplify[]
but not more.
Regards
Jens
Patrick Reany wrote:
>
> I'm trying to mix complex conjugation on demonstrably complex numbers,
> like a + b I (which works fine), with conjugation on symbols, such as
> taking k -> k* ,which doesn't work because
>
> 1) it appears that in some cases Mathematica treats all symbols not
> demonstrably equal to a complex number as a noncomplex number, in which> case if I could coerce it to complex by something like
> > makeComplex[x_] := Complex[x]
> > (which doesn't work) I might have a chance; or
> > 2) in other cases that k -> Conjugate[k], which would be OK if I could
> get it to print out as k* or overbar k.
> > What follows are a couple things I've already tried:
> > Conjugate[a_] := a* /; SymbolQ[a];
> Format[Conjugate[x_]] :=x* /; SymbolQ[x]
>
> In summary: I want to declare a symbol, say k, as having Head Symbol or
> Complex and then to print out (display) the Conjugate of k in the form
> of either k* or overbar k. (I use version 3.)
>
> Thanks.