0

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))"
chris
  • 4,988
  • 20
  • 36
mrsteve
  • 4,082
  • 1
  • 26
  • 63

1 Answers1

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)
chris
  • 4,988
  • 20
  • 36
  • thank you very much. really! I did not explicitly state the lemma you have written in your reply. With it, my reduction step in the Isar proof works now. I thought some automatic proof heuristic would be enough for my reduction step and tried to just state "unfolding transpose_def" in my reduction step. thanks again! – mrsteve May 30 '13 at 14:20
  • `unfolding` really just rewrites the given equations from left-to-right. It can never conclude a proof. – Lars Noschinski Jun 07 '13 at 14:03