lemma sum_le_2: "∧(f::nat==>complex). sum f {0..<2} = f 0 + f 1" by (simp add: numeral_2_eq_2)
lemma unitary_hadamard: "unitary hadamard" unfolding unitary_def apply (rule)
subgoal using carrier_matD[OF hadamard_dim] hadamard_def by auto apply (subst hermitian_hadamard[unfolded hermitian_def]) unfolding inverts_mat_def apply (rule eq_matI) unfolding hadamard_def apply (auto simp add: carrier_matD[OF hadamard_dim] scalar_prod_def) by (auto simp add: sum_le_2 csqrt_2_sq)
text‹The matrix
[0 0 .. 0 1
1 0 .. 0 0
0 1 .. 0 0
. . .. . .
0 0 .. 1 0]
implements i := i + 1 in the last variable. › definition mat_incr :: "nat ==> complex mat"where "mat_incr n = mat n n (λ(i,j). if i = 0 then (if j = n - 1 then 1 else 0) else (if i = j + 1 then 1 else 0))"
lemma mat_incr_dim: "mat_incr n ∈ carrier_mat n n" unfolding mat_incr_def by auto
lemma adjoint_mat_incr: "adjoint (mat_incr n) = mat n n (λ(i,j). if j = 0 then (if i = n - 1 then 1 else 0) else (if j = i + 1 then 1 else 0))" apply (rule eq_matI) unfolding mat_incr_def by (auto simp add: adjoint_eval)
lemma unitary_mat_incr: "unitary (mat_incr n)" unfolding unitary_def inverts_mat_def using carrier_matD[OF mat_incr_dim] mat_incr_mult_adjoint_mat_incr by auto
end
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.10 Sekunden
(vorverarbeitet am 2026-06-10)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.