[STATEMENT]
lemma (in strategic_space_2p) psi_two:
  shows "(U\<^sub>A \<Otimes> U\<^sub>B) * \<psi>\<^sub>1 = \<psi>\<^sub>2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) # map complex_of_real [- sin (\<theta>\<^sub>A / 2)], [complex_of_real (sin (\<theta>\<^sub>A / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2))]] \<Otimes> Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) # map complex_of_real [- sin (\<theta>\<^sub>B / 2)], [complex_of_real (sin (\<theta>\<^sub>B / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2))]]) * Tensor.mat_of_cols_list 4 [[complex_of_real (cos (\<gamma> / 2)), 0, 0, \<i> * complex_of_real (sin (\<gamma> / 2))]] = Tensor.mat_of_cols_list 4 [[exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (- sin (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (- sin (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2) * cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2))]]
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<And>i j. \<lbrakk>i < dim_row (Tensor.mat_of_cols_list 4 [[exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (- sin (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (- sin (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2) * cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2))]]); j < dim_col (Tensor.mat_of_cols_list 4 [[exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (- sin (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (- sin (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2) * cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2))]])\<rbrakk> \<Longrightarrow> ((Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) # map complex_of_real [- sin (\<theta>\<^sub>A / 2)], [complex_of_real (sin (\<theta>\<^sub>A / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2))]] \<Otimes> Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) # map complex_of_real [- sin (\<theta>\<^sub>B / 2)], [complex_of_real (sin (\<theta>\<^sub>B / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2))]]) * Tensor.mat_of_cols_list 4 [[complex_of_real (cos (\<gamma> / 2)), 0, 0, \<i> * complex_of_real (sin (\<gamma> / 2))]]) $$ (i, j) = Tensor.mat_of_cols_list 4 [[exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (- sin (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (- sin (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2) * cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2))]] $$ (i, j)
 2. dim_row ((Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) # map complex_of_real [- sin (\<theta>\<^sub>A / 2)], [complex_of_real (sin (\<theta>\<^sub>A / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2))]] \<Otimes> Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) # map complex_of_real [- sin (\<theta>\<^sub>B / 2)], [complex_of_real (sin (\<theta>\<^sub>B / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2))]]) * Tensor.mat_of_cols_list 4 [[complex_of_real (cos (\<gamma> / 2)), 0, 0, \<i> * complex_of_real (sin (\<gamma> / 2))]]) = dim_row (Tensor.mat_of_cols_list 4 [[exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (- sin (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (- sin (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2) * cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2))]])
 3. dim_col ((Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) # map complex_of_real [- sin (\<theta>\<^sub>A / 2)], [complex_of_real (sin (\<theta>\<^sub>A / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2))]] \<Otimes> Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) # map complex_of_real [- sin (\<theta>\<^sub>B / 2)], [complex_of_real (sin (\<theta>\<^sub>B / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2))]]) * Tensor.mat_of_cols_list 4 [[complex_of_real (cos (\<gamma> / 2)), 0, 0, \<i> * complex_of_real (sin (\<gamma> / 2))]]) = dim_col (Tensor.mat_of_cols_list 4 [[exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (- sin (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (- sin (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2) * cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2))]])
[PROOF STEP]
fix i j
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<And>i j. \<lbrakk>i < dim_row (Tensor.mat_of_cols_list 4 [[exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (- sin (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (- sin (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2) * cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2))]]); j < dim_col (Tensor.mat_of_cols_list 4 [[exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (- sin (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (- sin (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2) * cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2))]])\<rbrakk> \<Longrightarrow> ((Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) # map complex_of_real [- sin (\<theta>\<^sub>A / 2)], [complex_of_real (sin (\<theta>\<^sub>A / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2))]] \<Otimes> Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) # map complex_of_real [- sin (\<theta>\<^sub>B / 2)], [complex_of_real (sin (\<theta>\<^sub>B / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2))]]) * Tensor.mat_of_cols_list 4 [[complex_of_real (cos (\<gamma> / 2)), 0, 0, \<i> * complex_of_real (sin (\<gamma> / 2))]]) $$ (i, j) = Tensor.mat_of_cols_list 4 [[exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (- sin (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (- sin (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2) * cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2))]] $$ (i, j)
 2. dim_row ((Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) # map complex_of_real [- sin (\<theta>\<^sub>A / 2)], [complex_of_real (sin (\<theta>\<^sub>A / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2))]] \<Otimes> Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) # map complex_of_real [- sin (\<theta>\<^sub>B / 2)], [complex_of_real (sin (\<theta>\<^sub>B / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2))]]) * Tensor.mat_of_cols_list 4 [[complex_of_real (cos (\<gamma> / 2)), 0, 0, \<i> * complex_of_real (sin (\<gamma> / 2))]]) = dim_row (Tensor.mat_of_cols_list 4 [[exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (- sin (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (- sin (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2) * cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2))]])
 3. dim_col ((Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) # map complex_of_real [- sin (\<theta>\<^sub>A / 2)], [complex_of_real (sin (\<theta>\<^sub>A / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2))]] \<Otimes> Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) # map complex_of_real [- sin (\<theta>\<^sub>B / 2)], [complex_of_real (sin (\<theta>\<^sub>B / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2))]]) * Tensor.mat_of_cols_list 4 [[complex_of_real (cos (\<gamma> / 2)), 0, 0, \<i> * complex_of_real (sin (\<gamma> / 2))]]) = dim_col (Tensor.mat_of_cols_list 4 [[exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (- sin (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (- sin (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2) * cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2))]])
[PROOF STEP]
assume a0:"i < dim_row \<psi>\<^sub>2" and a1:"j < dim_col \<psi>\<^sub>2"
[PROOF STATE]
proof (state)
this:
i < dim_row (Tensor.mat_of_cols_list 4 [[exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (- sin (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (- sin (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2) * cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2))]])
j < dim_col (Tensor.mat_of_cols_list 4 [[exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (- sin (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (- sin (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2) * cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2))]])

goal (3 subgoals):
 1. \<And>i j. \<lbrakk>i < dim_row (Tensor.mat_of_cols_list 4 [[exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (- sin (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (- sin (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2) * cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2))]]); j < dim_col (Tensor.mat_of_cols_list 4 [[exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (- sin (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (- sin (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2) * cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2))]])\<rbrakk> \<Longrightarrow> ((Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) # map complex_of_real [- sin (\<theta>\<^sub>A / 2)], [complex_of_real (sin (\<theta>\<^sub>A / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2))]] \<Otimes> Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) # map complex_of_real [- sin (\<theta>\<^sub>B / 2)], [complex_of_real (sin (\<theta>\<^sub>B / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2))]]) * Tensor.mat_of_cols_list 4 [[complex_of_real (cos (\<gamma> / 2)), 0, 0, \<i> * complex_of_real (sin (\<gamma> / 2))]]) $$ (i, j) = Tensor.mat_of_cols_list 4 [[exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (- sin (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (- sin (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2) * cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2))]] $$ (i, j)
 2. dim_row ((Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) # map complex_of_real [- sin (\<theta>\<^sub>A / 2)], [complex_of_real (sin (\<theta>\<^sub>A / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2))]] \<Otimes> Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) # map complex_of_real [- sin (\<theta>\<^sub>B / 2)], [complex_of_real (sin (\<theta>\<^sub>B / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2))]]) * Tensor.mat_of_cols_list 4 [[complex_of_real (cos (\<gamma> / 2)), 0, 0, \<i> * complex_of_real (sin (\<gamma> / 2))]]) = dim_row (Tensor.mat_of_cols_list 4 [[exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (- sin (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (- sin (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2) * cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2))]])
 3. dim_col ((Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) # map complex_of_real [- sin (\<theta>\<^sub>A / 2)], [complex_of_real (sin (\<theta>\<^sub>A / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2))]] \<Otimes> Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) # map complex_of_real [- sin (\<theta>\<^sub>B / 2)], [complex_of_real (sin (\<theta>\<^sub>B / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2))]]) * Tensor.mat_of_cols_list 4 [[complex_of_real (cos (\<gamma> / 2)), 0, 0, \<i> * complex_of_real (sin (\<gamma> / 2))]]) = dim_col (Tensor.mat_of_cols_list 4 [[exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (- sin (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (- sin (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2) * cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2))]])
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
i < dim_row (Tensor.mat_of_cols_list 4 [[exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (- sin (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (- sin (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2) * cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2))]])
j < dim_col (Tensor.mat_of_cols_list 4 [[exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (- sin (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (- sin (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2) * cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2))]])
[PROOF STEP]
show "((U\<^sub>A \<Otimes> U\<^sub>B) * \<psi>\<^sub>1) $$ (i,j) = \<psi>\<^sub>2 $$ (i,j)"
[PROOF STATE]
proof (prove)
using this:
i < dim_row (Tensor.mat_of_cols_list 4 [[exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (- sin (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (- sin (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2) * cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2))]])
j < dim_col (Tensor.mat_of_cols_list 4 [[exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (- sin (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (- sin (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2) * cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2))]])

goal (1 subgoal):
 1. ((Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) # map complex_of_real [- sin (\<theta>\<^sub>A / 2)], [complex_of_real (sin (\<theta>\<^sub>A / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2))]] \<Otimes> Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) # map complex_of_real [- sin (\<theta>\<^sub>B / 2)], [complex_of_real (sin (\<theta>\<^sub>B / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2))]]) * Tensor.mat_of_cols_list 4 [[complex_of_real (cos (\<gamma> / 2)), 0, 0, \<i> * complex_of_real (sin (\<gamma> / 2))]]) $$ (i, j) = Tensor.mat_of_cols_list 4 [[exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (- sin (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (- sin (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2) * cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2))]] $$ (i, j)
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<lbrakk>i < dim_row (Tensor.mat_of_cols_list 4 [[exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (- sin (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (- sin (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2) * cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2))]]); j < dim_col (Tensor.mat_of_cols_list 4 [[exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (- sin (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (- sin (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2) * cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2))]])\<rbrakk> \<Longrightarrow> ((Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) # map complex_of_real [- sin (\<theta>\<^sub>A / 2)], [complex_of_real (sin (\<theta>\<^sub>A / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2))]] \<Otimes> Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) # map complex_of_real [- sin (\<theta>\<^sub>B / 2)], [complex_of_real (sin (\<theta>\<^sub>B / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2))]]) * Tensor.mat_of_cols_list 4 [[complex_of_real (cos (\<gamma> / 2)), 0, 0, \<i> * complex_of_real (sin (\<gamma> / 2))]]) $$ (i, j) = Tensor.mat_of_cols_list 4 [[exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (- sin (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (- sin (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2) * cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2))]] $$ (i, j)
[PROOF STEP]
have "i\<in>{0,1,2,3} \<and> j=0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. i \<in> {0, 1, 2, 3} \<and> j = 0
[PROOF STEP]
using a0 a1 mat_of_cols_list_def
[PROOF STATE]
proof (prove)
using this:
i < dim_row (Tensor.mat_of_cols_list 4 [[exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (- sin (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (- sin (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2) * cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2))]])
j < dim_col (Tensor.mat_of_cols_list 4 [[exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (- sin (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (- sin (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2) * cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2))]])
Tensor.mat_of_cols_list ?nr ?cs = Matrix.mat ?nr (length ?cs) (\<lambda>(i, j). ?cs ! j ! i)

goal (1 subgoal):
 1. i \<in> {0, 1, 2, 3} \<and> j = 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
i \<in> {0, 1, 2, 3} \<and> j = 0

goal (1 subgoal):
 1. \<lbrakk>i < dim_row (Tensor.mat_of_cols_list 4 [[exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (- sin (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (- sin (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2) * cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2))]]); j < dim_col (Tensor.mat_of_cols_list 4 [[exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (- sin (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (- sin (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2) * cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2))]])\<rbrakk> \<Longrightarrow> ((Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) # map complex_of_real [- sin (\<theta>\<^sub>A / 2)], [complex_of_real (sin (\<theta>\<^sub>A / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2))]] \<Otimes> Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) # map complex_of_real [- sin (\<theta>\<^sub>B / 2)], [complex_of_real (sin (\<theta>\<^sub>B / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2))]]) * Tensor.mat_of_cols_list 4 [[complex_of_real (cos (\<gamma> / 2)), 0, 0, \<i> * complex_of_real (sin (\<gamma> / 2))]]) $$ (i, j) = Tensor.mat_of_cols_list 4 [[exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (- sin (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (- sin (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2) * cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2))]] $$ (i, j)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
i \<in> {0, 1, 2, 3} \<and> j = 0

goal (1 subgoal):
 1. ((Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) # map complex_of_real [- sin (\<theta>\<^sub>A / 2)], [complex_of_real (sin (\<theta>\<^sub>A / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2))]] \<Otimes> Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) # map complex_of_real [- sin (\<theta>\<^sub>B / 2)], [complex_of_real (sin (\<theta>\<^sub>B / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2))]]) * Tensor.mat_of_cols_list 4 [[complex_of_real (cos (\<gamma> / 2)), 0, 0, \<i> * complex_of_real (sin (\<gamma> / 2))]]) $$ (i, j) = Tensor.mat_of_cols_list 4 [[exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (- sin (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (- sin (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2) * cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2))]] $$ (i, j)
[PROOF STEP]
using mat_of_cols_list_def U\<^sub>A_tensor_U\<^sub>B set_4
[PROOF STATE]
proof (prove)
using this:
i \<in> {0, 1, 2, 3} \<and> j = 0
Tensor.mat_of_cols_list ?nr ?cs = Matrix.mat ?nr (length ?cs) (\<lambda>(i, j). ?cs ! j ! i)
Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) # map complex_of_real [- sin (\<theta>\<^sub>A / 2)], [complex_of_real (sin (\<theta>\<^sub>A / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2))]] \<Otimes> Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) # map complex_of_real [- sin (\<theta>\<^sub>B / 2)], [complex_of_real (sin (\<theta>\<^sub>B / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2))]] = Tensor.mat_of_cols_list 4 [exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) # exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (- sin (\<theta>\<^sub>B / 2)) # complex_of_real (- sin (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) # map complex_of_real [- sin (\<theta>\<^sub>A / 2) * - sin (\<theta>\<^sub>B / 2)], [exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (sin (\<theta>\<^sub>B / 2)), exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)), complex_of_real (- sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2)), complex_of_real (- sin (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2))], [complex_of_real (sin (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)), complex_of_real (- sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (- sin (\<theta>\<^sub>B / 2))], [complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2)), complex_of_real (sin (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (sin (\<theta>\<^sub>B / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2))]]
{..<4} = {0, 1, 2, 3}

goal (1 subgoal):
 1. ((Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) # map complex_of_real [- sin (\<theta>\<^sub>A / 2)], [complex_of_real (sin (\<theta>\<^sub>A / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2))]] \<Otimes> Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) # map complex_of_real [- sin (\<theta>\<^sub>B / 2)], [complex_of_real (sin (\<theta>\<^sub>B / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2))]]) * Tensor.mat_of_cols_list 4 [[complex_of_real (cos (\<gamma> / 2)), 0, 0, \<i> * complex_of_real (sin (\<gamma> / 2))]]) $$ (i, j) = Tensor.mat_of_cols_list 4 [[exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (- sin (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (- sin (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2) * cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2))]] $$ (i, j)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
((Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) # map complex_of_real [- sin (\<theta>\<^sub>A / 2)], [complex_of_real (sin (\<theta>\<^sub>A / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2))]] \<Otimes> Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) # map complex_of_real [- sin (\<theta>\<^sub>B / 2)], [complex_of_real (sin (\<theta>\<^sub>B / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2))]]) * Tensor.mat_of_cols_list 4 [[complex_of_real (cos (\<gamma> / 2)), 0, 0, \<i> * complex_of_real (sin (\<gamma> / 2))]]) $$ (i, j) = Tensor.mat_of_cols_list 4 [[exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (- sin (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (- sin (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2) * cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2))]] $$ (i, j)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
((Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) # map complex_of_real [- sin (\<theta>\<^sub>A / 2)], [complex_of_real (sin (\<theta>\<^sub>A / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2))]] \<Otimes> Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) # map complex_of_real [- sin (\<theta>\<^sub>B / 2)], [complex_of_real (sin (\<theta>\<^sub>B / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2))]]) * Tensor.mat_of_cols_list 4 [[complex_of_real (cos (\<gamma> / 2)), 0, 0, \<i> * complex_of_real (sin (\<gamma> / 2))]]) $$ (i, j) = Tensor.mat_of_cols_list 4 [[exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (- sin (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (- sin (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2) * cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2))]] $$ (i, j)

goal (2 subgoals):
 1. dim_row ((Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) # map complex_of_real [- sin (\<theta>\<^sub>A / 2)], [complex_of_real (sin (\<theta>\<^sub>A / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2))]] \<Otimes> Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) # map complex_of_real [- sin (\<theta>\<^sub>B / 2)], [complex_of_real (sin (\<theta>\<^sub>B / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2))]]) * Tensor.mat_of_cols_list 4 [[complex_of_real (cos (\<gamma> / 2)), 0, 0, \<i> * complex_of_real (sin (\<gamma> / 2))]]) = dim_row (Tensor.mat_of_cols_list 4 [[exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (- sin (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (- sin (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2) * cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2))]])
 2. dim_col ((Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) # map complex_of_real [- sin (\<theta>\<^sub>A / 2)], [complex_of_real (sin (\<theta>\<^sub>A / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2))]] \<Otimes> Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) # map complex_of_real [- sin (\<theta>\<^sub>B / 2)], [complex_of_real (sin (\<theta>\<^sub>B / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2))]]) * Tensor.mat_of_cols_list 4 [[complex_of_real (cos (\<gamma> / 2)), 0, 0, \<i> * complex_of_real (sin (\<gamma> / 2))]]) = dim_col (Tensor.mat_of_cols_list 4 [[exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (- sin (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (- sin (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2) * cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2))]])
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. dim_row ((Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) # map complex_of_real [- sin (\<theta>\<^sub>A / 2)], [complex_of_real (sin (\<theta>\<^sub>A / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2))]] \<Otimes> Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) # map complex_of_real [- sin (\<theta>\<^sub>B / 2)], [complex_of_real (sin (\<theta>\<^sub>B / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2))]]) * Tensor.mat_of_cols_list 4 [[complex_of_real (cos (\<gamma> / 2)), 0, 0, \<i> * complex_of_real (sin (\<gamma> / 2))]]) = dim_row (Tensor.mat_of_cols_list 4 [[exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (- sin (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (- sin (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2) * cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2))]])
 2. dim_col ((Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) # map complex_of_real [- sin (\<theta>\<^sub>A / 2)], [complex_of_real (sin (\<theta>\<^sub>A / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2))]] \<Otimes> Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) # map complex_of_real [- sin (\<theta>\<^sub>B / 2)], [complex_of_real (sin (\<theta>\<^sub>B / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2))]]) * Tensor.mat_of_cols_list 4 [[complex_of_real (cos (\<gamma> / 2)), 0, 0, \<i> * complex_of_real (sin (\<gamma> / 2))]]) = dim_col (Tensor.mat_of_cols_list 4 [[exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (- sin (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (- sin (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2) * cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2))]])
[PROOF STEP]
show "dim_row ((U\<^sub>A \<Otimes> U\<^sub>B)*\<psi>\<^sub>1) = dim_row \<psi>\<^sub>2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dim_row ((Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) # map complex_of_real [- sin (\<theta>\<^sub>A / 2)], [complex_of_real (sin (\<theta>\<^sub>A / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2))]] \<Otimes> Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) # map complex_of_real [- sin (\<theta>\<^sub>B / 2)], [complex_of_real (sin (\<theta>\<^sub>B / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2))]]) * Tensor.mat_of_cols_list 4 [[complex_of_real (cos (\<gamma> / 2)), 0, 0, \<i> * complex_of_real (sin (\<gamma> / 2))]]) = dim_row (Tensor.mat_of_cols_list 4 [[exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (- sin (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (- sin (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2) * cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2))]])
[PROOF STEP]
using mat_of_cols_list_def
[PROOF STATE]
proof (prove)
using this:
Tensor.mat_of_cols_list ?nr ?cs = Matrix.mat ?nr (length ?cs) (\<lambda>(i, j). ?cs ! j ! i)

goal (1 subgoal):
 1. dim_row ((Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) # map complex_of_real [- sin (\<theta>\<^sub>A / 2)], [complex_of_real (sin (\<theta>\<^sub>A / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2))]] \<Otimes> Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) # map complex_of_real [- sin (\<theta>\<^sub>B / 2)], [complex_of_real (sin (\<theta>\<^sub>B / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2))]]) * Tensor.mat_of_cols_list 4 [[complex_of_real (cos (\<gamma> / 2)), 0, 0, \<i> * complex_of_real (sin (\<gamma> / 2))]]) = dim_row (Tensor.mat_of_cols_list 4 [[exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (- sin (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (- sin (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2) * cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2))]])
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
dim_row ((Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) # map complex_of_real [- sin (\<theta>\<^sub>A / 2)], [complex_of_real (sin (\<theta>\<^sub>A / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2))]] \<Otimes> Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) # map complex_of_real [- sin (\<theta>\<^sub>B / 2)], [complex_of_real (sin (\<theta>\<^sub>B / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2))]]) * Tensor.mat_of_cols_list 4 [[complex_of_real (cos (\<gamma> / 2)), 0, 0, \<i> * complex_of_real (sin (\<gamma> / 2))]]) = dim_row (Tensor.mat_of_cols_list 4 [[exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (- sin (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (- sin (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2) * cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2))]])

goal (1 subgoal):
 1. dim_col ((Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) # map complex_of_real [- sin (\<theta>\<^sub>A / 2)], [complex_of_real (sin (\<theta>\<^sub>A / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2))]] \<Otimes> Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) # map complex_of_real [- sin (\<theta>\<^sub>B / 2)], [complex_of_real (sin (\<theta>\<^sub>B / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2))]]) * Tensor.mat_of_cols_list 4 [[complex_of_real (cos (\<gamma> / 2)), 0, 0, \<i> * complex_of_real (sin (\<gamma> / 2))]]) = dim_col (Tensor.mat_of_cols_list 4 [[exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (- sin (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (- sin (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2) * cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2))]])
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. dim_col ((Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) # map complex_of_real [- sin (\<theta>\<^sub>A / 2)], [complex_of_real (sin (\<theta>\<^sub>A / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2))]] \<Otimes> Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) # map complex_of_real [- sin (\<theta>\<^sub>B / 2)], [complex_of_real (sin (\<theta>\<^sub>B / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2))]]) * Tensor.mat_of_cols_list 4 [[complex_of_real (cos (\<gamma> / 2)), 0, 0, \<i> * complex_of_real (sin (\<gamma> / 2))]]) = dim_col (Tensor.mat_of_cols_list 4 [[exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (- sin (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (- sin (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2) * cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2))]])
[PROOF STEP]
show "dim_col ((U\<^sub>A \<Otimes> U\<^sub>B)*\<psi>\<^sub>1) = dim_col \<psi>\<^sub>2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dim_col ((Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) # map complex_of_real [- sin (\<theta>\<^sub>A / 2)], [complex_of_real (sin (\<theta>\<^sub>A / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2))]] \<Otimes> Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) # map complex_of_real [- sin (\<theta>\<^sub>B / 2)], [complex_of_real (sin (\<theta>\<^sub>B / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2))]]) * Tensor.mat_of_cols_list 4 [[complex_of_real (cos (\<gamma> / 2)), 0, 0, \<i> * complex_of_real (sin (\<gamma> / 2))]]) = dim_col (Tensor.mat_of_cols_list 4 [[exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (- sin (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (- sin (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2) * cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2))]])
[PROOF STEP]
using mat_of_cols_list_def
[PROOF STATE]
proof (prove)
using this:
Tensor.mat_of_cols_list ?nr ?cs = Matrix.mat ?nr (length ?cs) (\<lambda>(i, j). ?cs ! j ! i)

goal (1 subgoal):
 1. dim_col ((Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) # map complex_of_real [- sin (\<theta>\<^sub>A / 2)], [complex_of_real (sin (\<theta>\<^sub>A / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2))]] \<Otimes> Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) # map complex_of_real [- sin (\<theta>\<^sub>B / 2)], [complex_of_real (sin (\<theta>\<^sub>B / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2))]]) * Tensor.mat_of_cols_list 4 [[complex_of_real (cos (\<gamma> / 2)), 0, 0, \<i> * complex_of_real (sin (\<gamma> / 2))]]) = dim_col (Tensor.mat_of_cols_list 4 [[exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (- sin (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (- sin (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2) * cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2))]])
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
dim_col ((Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) # map complex_of_real [- sin (\<theta>\<^sub>A / 2)], [complex_of_real (sin (\<theta>\<^sub>A / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2))]] \<Otimes> Tensor.mat_of_cols_list 2 [exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) # map complex_of_real [- sin (\<theta>\<^sub>B / 2)], [complex_of_real (sin (\<theta>\<^sub>B / 2)), exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2))]]) * Tensor.mat_of_cols_list 4 [[complex_of_real (cos (\<gamma> / 2)), 0, 0, \<i> * complex_of_real (sin (\<gamma> / 2))]]) = dim_col (Tensor.mat_of_cols_list 4 [[exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), exp (\<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (- sin (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + complex_of_real (sin (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (- sin (\<theta>\<^sub>A / 2)) * exp (\<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * complex_of_real (cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * complex_of_real (sin (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2)), complex_of_real (sin (\<theta>\<^sub>A / 2) * sin (\<theta>\<^sub>B / 2) * cos (\<gamma> / 2)) + exp (- \<i> * complex_of_real \<phi>\<^sub>A) * complex_of_real (cos (\<theta>\<^sub>A / 2)) * exp (- \<i> * complex_of_real \<phi>\<^sub>B) * complex_of_real (cos (\<theta>\<^sub>B / 2)) * \<i> * complex_of_real (sin (\<gamma> / 2))]])

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma join_split:
  assumes "0 < n"
  shows "join_time (split_time s n) n = s"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. join_time (split_time s n) n = s
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
0 < n

goal (1 subgoal):
 1. join_time (split_time s n) n = s
[PROOF STEP]
by (simp add: fun_eq_iff join_split_i)


[STATEMENT]
lemma p_intpow_closed:
  fixes n::int
  shows "(\<pp>[^]n) \<in> (carrier Q\<^sub>p)"
        "(\<pp>[^]n) \<in> (nonzero Q\<^sub>p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<pp> [^] n \<in> carrier Q\<^sub>p &&& \<pp> [^] n \<in> nonzero Q\<^sub>p
[PROOF STEP]
apply (simp add: Qp.nonzero_closed Qp_int_pow_nonzero p_nonzero)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<pp> [^] n \<in> nonzero Q\<^sub>p
[PROOF STEP]
by (simp add: Qp_int_pow_nonzero p_nonzero)


[STATEMENT]
lemma piecewise_C1_differentiable_on_cdiv [simp, derivative_intros]:
  fixes f :: "real \<Rightarrow> 'a::real_normed_field"
  assumes "f piecewise_C1_differentiable_on S"
  shows "(\<lambda>x. f x / c) piecewise_C1_differentiable_on S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. f x / c) piecewise_C1_differentiable_on S
[PROOF STEP]
by (simp add: divide_inverse piecewise_C1_differentiable_const piecewise_C1_differentiable_on_mult assms)


[STATEMENT]
lemma T_inorder2_Node:
  "T_inorder2 \<langle>l, x, r\<rangle> xs = T_inorder2 r xs + T_inorder2 l (x # inorder2 r xs) + 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. T_inorder2 \<langle>l, x, r\<rangle> xs = T_inorder2 r xs + T_inorder2 l (x # Root_Balanced_Tree.inorder2 r xs) + 1
[PROOF STEP]
by(simp add: T_inorder2_def inorder2_def tm_simps split: tm.split)