John Fredsted

2233 Reputation

15 Badges

18 years, 136 days

MaplePrimes Activity

These are Posts that have been published by John Fredsted

I am fooling around a bit with dismantle and ToInert. In the light of the passage "For the exact internal representation, see dismantle," in the help page on ToInert, I am surprised to see that dismantle does not provide any information concerning the entries of a given matrix, as do ToInert:
expr := Matrix(2,2,(i,j) -> m||i||j):
RTABLE(11): 4 [1..2, 1..2]
   NAME(6): anything #[protected]
_Inert_MATRIX(_Inert_RANGE(_Inert_INTPOS(1), _Inert_INTPOS(2)), _Inert_RANGE(_Inert_INTPOS(1), _Inert_INTPOS(2)), _Inert_SET(_Inert_EXPSEQ(_Inert_EQUATION(_Inert_EXPSEQ(_Inert_INTPOS(1), _Inert_INTPOS(1)), _Inert_NAME("m11")), _Inert_EQUATION(_Inert_EXPSEQ(_Inert_INTPOS(1), _Inert_INTPOS(2)), _Inert_NAME("m12")), _Inert_EQUATION(_Inert_EXPSEQ(_Inert_INTPOS(2), _Inert_INTPOS(1)), _Inert_NAME("m21")), _Inert_EQUATION(_Inert_EXPSEQ(_Inert_INTPOS(2), _Inert_INTPOS(2)), _Inert_NAME("m22")))), _Inert_EQUATION(_Inert_NAME("datatype"), _Inert_NAME("anything", _Inert_ATTRIBUTE(_Inert_NAME("protected", _Inert_ATTRIBUTE(_Inert_NAME("protected")))))), _Inert_EQUATION(_Inert_NAME("storage"), _Inert_NAME("rectangular")), _Inert_EQUATION(_Inert_ASSIGNEDNAME("order", "PROC", _Inert_ATTRIBUTE(_Inert_NAME("protected", _Inert_ATTRIBUTE(_Inert_NAME("protected"))))), _Inert_NAME("Fortran_order")))
Is it possible to have the output of dismantle assigned to some variable, or written to some file? Please correct me if I am wrong, but it seems to me that it cannot be persuaded to return anything but NULL, a fact which completely surprises me, if indeed true, for what is the benefit of that?
My recent post You read my mind made me skim through the old thread Width and depth. That reminded me that MapleSoft has never responded to the post Matrix and Vector construction shortcuts by Mariner, in which he (as I would most certainly appreciate too) calls for some illumination from MapleSoft on the whole area discussed in that thread.
Consider the following four-dimensional matrix of four-dimensional matrices (they are the generators of the vector representation of the Lorentz group):
metric := Matrix(4,4,Vector([-1,1,1,1]),shape=diagonal):
generators := Matrix(4,4,
	(a,b) -> metric . Matrix(4,4,
	(c,d) -> metric[a,c]*metric[b,d] - metric[b,c]*metric[a,d])
The expression is antisymmetric in the indices a and b, i.e., the (outer) matrix is antisymmetric. So, to optimize my code (especially important, I suppose, when going to higher spacetime dimensions) I thought I would try adding the option shape=antisymmetric:

Inspired by my own post The art of linking, I here bring an expanded version (I hope that it does not appear too self-centred to do so): You can link to other parts of MaplePrimes, or to external webpages, using the HTML tag a with its associated attribute href. This tag and its attribute you may enter by pressing the link-image  (please disregard the black background), which is located above the area where you enter your text, the result being <a href="http://"> The part between the two "'s is where the address of your link, the socalled URL (Uniform Resource Locator) must be inserted. Below, four typical link situations are treated:

  • Linking to a thread: Taking as an example the thread in which the above post appears, you could write (for long URL's, as this one, use copy-paste to avoid typos) <a href="">The other thread</a> which would appear on the screen as The other thread.
  • Linking to a specific post: Each post in MaplePrimes has its own unique ID. It can be found by placing the mouse over the link email this comment of the post to which you want to link, and then reading of a five-digit number at the end of the line at the lower left of your screen (in Microsoft Internet Explorer). A link to that post is then created by appending to the URL of the thread itself the following code: #comment-....., where for ..... the five-digit ID has to be inserted. It was William Spaetzel who originally told me this. Taking as an example the above post, which has the unique ID 11566, you could write <a href="">The other post</a> which would appear on the screen as The other post.
  • Linking to or showing a picture: First of all you have to upload your picture using my files under Navigation. Having done so you can copy-paste the text in the column Download Link Code. This text contains both the HTML a and image tags. You can then choose to keep the full text, thereby having a clickable image (a link to the image), or you can manually strip away all a tags (remember the ends also) thereby having a non-clickable picture, as I have above.
  • Linking to an external web page: Taking Maplesoft as an example, you could write <a href="">Maplesoft</a> which would appear on the screen as Maplesoft. The part target='_new' has been automatically inserted by the MaplePrimes system (click on Input format, which is located below the input text area, to see the various input formats), and so it need/should not be entered manually.
3 4 5 6 7 8 9 Page 5 of 12