Re: Question
- To: mathgroup at smc.vnet.net
- Subject: [mg74892] Re: Question
- From: dh <dh at metrohm.ch>
- Date: Tue, 10 Apr 2007 05:17:25 -0400 (EDT)
- References: <ev51pb$ai7$1@smc.vnet.net>
Hi Peter, you are right , there is something very surprising concerning "Part". I beg you to mention this to Wolfram, e.g. to Daniel Lichtblau. Consider the following expression that has one level less than yours, but will do to make the point: expr = a[ b1[c11[d111, d112, d113], c12[d121, d122, d123], c13[d131, d132, d133]], b2[c21[d211, d212, d213], c22[d221, d222, d223], c23[d231, d232, d233]], b3[c31[d311, d312, d313], c32[d321, d322, d323], c33[d331, d332, d333]] ] Now expr[[1,1,1]] gives d111 what is expected. expr[[1,1,{1,2}]] does not give {d111,d112}, but c11[d111,d112]. Therefore, as soon as we use more than one index on the same level, the head of the level above is applied. I wonder if this is a bug or intention, I just can't imagine an application for this. Further, expr[[2,1,{1,2}]] gives: c21[d111,d112] and expr[[{1,2},1,{1,2}]] does the apply "trick" once again: a[c11[d111,d112],c21[d111,d112]] Hope this will help, Daniel > Hello Daniel, > thanks. It is quite a decision to apply the head to a list when talking about parts. > I would expect just a list of parts. > Still I am not able to predict what happens to: > Lambda0[[{1, 2, 3}, 1, {1, 2, 3}, 1]] > which gives: Lambda0[Lambda2[1, 1, 1], Lambda2[2, 2, 2], Lambda2[3, 3, 3]] > What confuses me is: > Lambda0[[{1, 2, 3}, 1, {1, 2, 3}]] > which gives: Lambda0[Lambda2[Lambda3[1, 1, 1], Lambda3[1, 1, 2], Lambda3[1, 1, 3]], Lambda2[Lambda3[2, 1, 1], > Lambda3[2, 1, 2], Lambda3[2, 1, 3]], Lambda2[Lambda3[3, 1, 1], Lambda3[3, 1, 2], Lambda3[3, 1, 3]]] > So, I do not understand anything about these manipulations. > Can anyone explain these results? In one way or another I am wrongly focussed. > with frienldy greetings, > Peter van Summeren >
- Follow-Ups:
- Re: Re: Question
- From: Andrzej Kozlowski <akoz@mimuw.edu.pl>
- Re: Re: Question