@@ -3743,43 +3743,6 @@ def __call__(self, *args, check=True):
3743
3743
3744
3744
ps = P ._laurent_poly_ring .realization_of ().p ()
3745
3745
coeff_stream = Stream_plethysm (self ._coeff_stream , g ._coeff_stream , ps )
3746
- g_p = Stream_map_coefficients (g ._coeff_stream , lambda c : c , ps )
3747
- try :
3748
- degree_one = [BR (x ) for x in BR .variable_names_recursive ()]
3749
- except AttributeError :
3750
- try :
3751
- degree_one = BR .gens ()
3752
- except NotImplementedError :
3753
- degree_one = []
3754
- def raise_c (n ):
3755
- return lambda c : c .subs (** {str (x ): x ** n for x in degree_one })
3756
- def scale_part (n ):
3757
- return lambda m : m .__class__ (m .parent (), [i * n for i in m ])
3758
- def pn_pleth (f , n ):
3759
- return f .map_support (scale_part (n ))
3760
- def stretched_coefficient (k , n ):
3761
- q , r = ZZ (n ).quo_rem (k )
3762
- if r :
3763
- return 0
3764
- c = g_p [q ]
3765
- if c :
3766
- return pn_pleth (c .map_coefficients (raise_c (k )), k )
3767
- return c
3768
- def g_coeff_stream (k ):
3769
- return Stream_function (lambda n : stretched_coefficient (k , n ),
3770
- R , P ._sparse , 0 )
3771
- from sage .misc .lazy_list import lazy_list
3772
- stretched = lazy_list (lambda k : g_coeff_stream (k ))
3773
- f_p = Stream_map_coefficients (self ._coeff_stream , lambda c : c , ps )
3774
- def coefficient (n ):
3775
- r = R (0 )
3776
- for i in range (n + 1 ):
3777
- r += ps ._apply_module_morphism (f_p [i ],
3778
- lambda part : ps .prod (sum (stretched [j ][h ] for h in range (n + 1 ))
3779
- for j in part ),
3780
- codomain = ps ).homogeneous_component (n )
3781
- return r
3782
- #coeff_stream = Stream_function(coefficient, P._internal_poly_ring.base_ring(), P._sparse, 0)
3783
3746
else :
3784
3747
raise NotImplementedError ("only implemented for arity 1" )
3785
3748
0 commit comments