import proveit
theory = proveit.Theory() # the theorem's theory
from proveit import n, t
from proveit.physics.quantum.QFT import invFT_is_unitary
from proveit.physics.quantum.QPE import (
_t, _t_in_natural_pos, _psi_t_ket_is_normalized_vec, _Psi_def)
%proving _Psi_ket_is_normalized_vec
_psi_t_ket_is_normalized_vec.instantiate({t:_t})
_Psi_def
invFT_is_unitary
invFT_is_unitary.instantiate({n:_t})
_Psi_def.rhs.compute_norm(replacements=[_Psi_def.derive_reversed()])
%qed