Isabelle: transpose a matrix that includes a constant factor

元气小坏坏 提交于 2019-12-08 10:04:34

问题


In my Isabelle theory I have a matrix with a constant factor:

... 
k :: 'n and c :: 'a
(χ i j. if j = k then c * (A $ i $ j) else A $ i $ j)

I can calculate the transposed matrix:

(transpose (χ i j. if j = k then c * (A $ i $ j) else A $ i $ j))

In my eyes the latter should be equivalent to

(χ i j. if i = k then c * (A $ j $ i) else A $ j $ i))

by the definition of transpose. But this is not true. What is my error here?

By the way, the definition of transposed is:

definition transpose where 
  "(transpose::'a^'n^'m ⇒ 'a^'m^'n) A = (χ i j. ((A$j)$i))"

回答1:


I'm not sure what you mean by: But this is not true. What you expected is true and can be proven in Isabelle as follows:

lemma "transpose (χ i j. if j = k then c * (A $ i $ j) else A $ i $ j) =
  (χ i j. if i = k then c * (A $ j $ i) else A $ j $ i)"
  by (simp add: transpose_def)


来源:https://stackoverflow.com/questions/16827937/isabelle-transpose-a-matrix-that-includes-a-constant-factor

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!