Hmmm...

sage: assumptions()
[]
sage: (z-4*conjugate(z)).simplify()
-3*z
sage: assume(z,"complex")
sage: (z-4*conjugate(z)).simplify()
z - 4*conjugate(z)

Explicitly telling "var(z,"complex") has the same effect... This seems 
directly inherited from Maxima :

(%i29) ratsimp(z-4*conjugate(z));

(%o29) z-4*conjugate(z)
(%i30) ratsimp(x-4*conjugate(x));

(%o30) -3*x

BTW : a two-liner to solve the original problem :

sage: var("a,b", domain="real")
(a, b)
sage: [{z:s.get(a)+I*s.get(b)} for s in solve([E.operator()(*map(foo, 
E.operands(
....: ))).subs([real_part(z)==a,imag_part(z)==b]) for foo 
in[real_part,imag_part]
....: ],[a,b],solution_dict=True)]
[{z: 3/5*I - 1/3}]

which checks. It works, but it's a bit clumsy.

Maxima is not better :

(%i26) facts();

(%o26) [kind(z,complex)]
(%i27) E:z-4*conjugate(z)=1+3*%i;

(%o27) z-4*conjugate(z) = 3*%i+1
(%i28) solve(E,z);

(%o28) [z = 4*conjugate(z)+3*%i+1]

Nor is SymPy :

>>> z=symbols("z", complex=True)
>>> solve(Eq(z - 4*z.conjugate(),1 + 3*I), z)
[]

Nor is Fricas :

sage: fricas.solve(E,z)
[]

This seems to be an area where we can progress...

--
Emmanuel Charpentier

Le mardi 28 novembre 2017 13:23:41 UTC+1, Eric Gourgoulhon a écrit :
>
> This is probably related to the following:
>
> sage: var('z')
> z
> sage: (z - 4*z.conjugate()).simplify()
> -3*z
>
> which is a bug, given that the documentation of var says:
>
> By default, var returns a complex variable
>
> Eric. 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to