sage: S2 = Manifold(2, name='S2', latex_name=r'S^2', start_index=1)
sage: U = S2.open_subset(name='U', latex_name=r'S^2 \setminus \{\text{South pole}\}')
sage: V = S2.open_subset(name='V', latex_name=r'S^2 \setminus \{\text{North pole}\}')
sage: S2.declare_union(U,V)
sage: c_xy.<t,z> = U.chart()
sage: c_uv.<u,v> = V.chart()
sage: xy_to_uv = c_xy.transition_map(c_uv, (x/(x^2+y^2), y/(x^2+y^2)),
intersection_name='W', restrictions1= x^2+y^2!=0,
restrictions2= u^2+v^2!=0)
sage: uv_to_xy = xy_to_uv.inverse()
sage: e_tz = c_tz.frame()
sage: e_uv = c_uv.frame(); print(e_uv)
sage: omega = S2.diff_form(1, name='omega', latex_name=r'\omega')
sage: unnamed = S2.diff_form(1)
sage: omega[e_xy,:] = -x^2, y^2; show(omega.disp(e_tz))
sage: omega.add_comp_by_continuation(e_uv, V.intersection(U), c_uv)
sage: unnamed[e_xy,:] = -x^2, y^2; show(omega.disp(e_tz))
sage: unnamed.add_comp_by_continuation(e_uv, V.intersection(U), c_uv)
sage: unnamed.wedge(omega)
--------------------------------------------------------------------------- UnboundLocalError Traceback (most recent call last) <ipython-input-40-a6a98dadea76> in <module>() ----> 1 unnamed.wedge(omega) /opt/sagemath-8.6/local/lib/python2.7/site-packages/sage/manifolds/differentiable/diff_form.pyc in wedge(self, other) 520 vmodule = dom_resu.vector_field_module(dest_map=dest_map_resu) 521 resu_degree = self._tensor_rank + other._tensor_rank --> 522 resu = vmodule.alternating_form(resu_degree, name=resu_name, 523 latex_name=resu_latex_name) 524 for dom in self_r._restrictions: UnboundLocalError: local variable 'resu_name' referenced before assignment
Unfortunately, I'm not a professional in python, but I guess the problem could be solved by declaring resu_name and resu_latex_name in the wedge method of the manifolds/differentiable/tensorfield.py file as "None" in the very beginning. In fact, solving this is crucial for calculations with mixed differential forms and its matrices in order to compute the characteristic classes.
What is the next step? Create a ticket?
Also, I like to discuss my developement so far. But that might be better for another thread.
Or, maybe, a better approach would be a direct manipulation via resu._name and resu._latex_name.However, I'm not familiar with the procedure. Furthermore, is this mailing list right the place to discuss my written code?
Oh yes, the chart is wrongly defined. It should be:
sage: c_xy.<x,y> = U.chart()
obviously. I copied
it once, changed the variables, and copied it back changing the
variables again. Sorry.
What are appropriate settings for a ticket regarding this issue?
I'm a ticket virgin.
--
You received this message because you are subscribed to a topic in the Google Groups "sage-devel" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sage-devel/EfLYpAxl_jU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sage-devel+...@googlegroups.com.
To post to this group, send email to sage-...@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.