3
$\begingroup$

I have a problem with using Assumption. The question arises when I try generating matrix with rolling code:

vect = {α, 1 - α, 0, 0, d, -Id };
prod0 = {vect};
prod1 = Transpose[prod0];
Assumptions -> {α > 0, α ∈ Integers, d > 0, d ∈ Integers};
matrix = prod1.Conjugate[prod0];

but the result is:

enter image description here

$\endgroup$

marked as duplicate by Daniel Lichtblau, m_goldberg, gwr, Young, MarcoB Aug 21 '16 at 3:24

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

4
$\begingroup$

Here's another.

vect = {α, 1 - α, 0, 0, d, -I d};
prod0 = {vect};
prod1 = Transpose[prod0];
matrix = prod1.Conjugate[prod0];

Refine[matrix, Assumptions -> {α > 0, α ∈ Integers, d > 0, d ∈ Integers}]
 {{α^2, (1 - α) α, 0, 0, d α, I d α}, 
  {(1 - α) α, (1 - α)^2, 0, 0, d (1 - α), I d (1 - α)}, 
  {0, 0, 0, 0, 0, 0}, 
  {0, 0, 0,0, 0, 0}, 
  {d α, d (1 - α), 0, 0, d^2, I d^2}, 
  {-I d α, -I d (1 - α), 0, 0, -I d^2, d^2}}

Note that I wrote I d and not Id as you did in your question. Also, note that an option such as

 Assumptions -> {α > 0, α ∈ Integers, d > 0, d ∈ Integers}

can not be asserted globally at top level, but must be given as an option to those functions which are programmed to accept that option.

$\endgroup$
4
$\begingroup$

here's one way:

vect = {α, 1 - α, 0, 0, d, -I d};
prod0 = {vect};
prod1 = Transpose[prod0];
assum = {α > 0, α ∈ Integers, d > 0, d ∈ Integers};
matrix = FullSimplify[prod1.Conjugate[prod0], assum]
$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.