def ith_magical_component(omega, zvee, g): '''Given a form omega on AS cover, element g of group AS.group and normal basis element zmag, find the decomposition sum_g g(zmag) omega_g and return omega_g.''' AS = omega.curve p = AS.characteristic z_vee_fct = zvee.group_action(g).function new_form = as_form(AS, z_vee_fct*omega.form) return new_form.trace2()