-
Notifications
You must be signed in to change notification settings - Fork 7
/
xPand.nb
20112 lines (19710 loc) · 860 KB
/
xPand.nb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Notebook[{
Cell[CellGroupData[{
Cell[TextData[{
" ",
StyleBox["xPand",
FontSize->36],
StyleBox[" (ing)",
FontSize->24],
" ",
StyleBox["P",
FontSize->24],
StyleBox["erturbations",
FontSize->24,
FontColor->GrayLevel[0]],
StyleBox[" A",
FontSize->24],
StyleBox["re",
FontSize->24,
FontColor->GrayLevel[0]],
StyleBox[" N",
FontSize->24],
StyleBox["ot",
FontSize->24,
FontColor->GrayLevel[0]],
StyleBox[" D",
FontSize->24],
StyleBox["ifficult",
FontSize->24,
FontColor->GrayLevel[0]],
StyleBox[" ",
FontSize->24],
StyleBox[" (I",
FontSize->16],
StyleBox["n",
FontSize->16,
FontColor->GrayLevel[0]],
StyleBox[" N",
FontSize->16],
StyleBox["ewtonian",
FontSize->16,
FontColor->GrayLevel[0]],
StyleBox[" G",
FontSize->16],
StyleBox["auge)",
FontSize->16,
FontColor->GrayLevel[0]],
" "
}], "Title",
InitializationCell->True,
FontSize->48],
Cell[CellGroupData[{
Cell["\<\
Authors
\
\>", "Subsection",
InitializationCell->True,
FontSize->18],
Cell["\<\
This package is designed for the theory of perturbations in relativistic \
cosmology.
It allows for the calculation of perturbations for all types of Bianchi \
(homogeneous) cosmologies, at any order and in several gauges.
Version 0.4.3 (9/9/2015)\
\>", "Text",
InitializationCell->True,
FontSize->14],
Cell[TextData[{
"\n It is developed by Cyril ",
Cell[BoxData[
FormBox[
SuperscriptBox["Pitrou", "1"], TraditionalForm]]],
", Xavier ",
Cell[BoxData[
FormBox[
SuperscriptBox["Roy", "2"], TraditionalForm]]],
" and Obinna ",
Cell[BoxData[
FormBox[
SuperscriptBox["Umeh", "2"], TraditionalForm]]],
".\n \t\n ",
Cell[BoxData[
FormBox[
SuperscriptBox["", "1"], TraditionalForm]]],
StyleBox["Institute of Astrophysics of Paris (IAP), France",
FontSize->13],
"\n",
StyleBox["Email: pitrou@iap.fr",
FontSize->13],
"\n",
StyleBox[ButtonBox["http://www2.iap.fr/users/pitrou/xpand.htm",
BaseStyle->"Hyperlink",
ButtonData->{
URL["http://www2.iap.fr/users/pitrou/xpand.htm"], None},
ButtonNote->"http://www2.iap.fr/users/pitrou/xpand.htm"],
FontSize->13],
"\n\n",
Cell[BoxData[
FormBox[
SuperscriptBox["", "2"], TraditionalForm]]],
StyleBox[" Department of Mathematics and Applied Mathematics, Cape Town \
University, Rondebosch 7701, South Africa",
FontSize->13],
"\n",
StyleBox["Emails: xavier.roy@uct.ac.za / obinnah.umeh@uct.ac.za",
FontSize->13],
"\n \t\n \t\nDetails of the general algorithm and methods for perturbations \
about any space-time background can be found on a dedicated ",
ButtonBox["publication",
BaseStyle->"Hyperlink",
ButtonData->{
URL["http://arxiv.org/abs/1302.6174"], None},
ButtonNote->"http://arxiv.org/abs/1302.6174"],
" or on the ",
ButtonBox["xPand webpage.",
BaseStyle->"Hyperlink",
ButtonData->{
URL["http://www2.iap.fr/users/pitrou/xpand.htm"], None},
ButtonNote->"http://www2.iap.fr/users/pitrou/xpand.htm"]
}], "Text",
InitializationCell->True,
FontSize->14],
Cell[TextData[{
"This algorithm is based on the xAct/xPert package developed by \nD. ",
Cell[BoxData[
FormBox["Brizuela", TraditionalForm]]],
" and Jos\[EAcute] M. Mart\[IAcute]n-Garc\[IAcute]a.",
StyleBox["\n ",
FontSize->13],
StyleBox[ButtonBox["http://www.xact.es",
BaseStyle->"Hyperlink",
ButtonData->{
URL["http://metric.iem.csic.es/Martin-Garcia/"], None}],
FontSize->13],
"\n\t\nIt is tested so far for xAct_1.0.5 and xPert_1.0.3, under Mathematica \
7.0, 8.0, 9.0 and 10.0."
}], "Text",
InitializationCell->True,
FontSize->14],
Cell[CellGroupData[{
Cell["Dates and versions", "Subsubsection"],
Cell[BoxData[
RowBox[{"Date", "[", "]"}]], "Input"],
Cell[BoxData[
RowBox[{
RowBox[{"xAct`xPand`$Version", "=",
RowBox[{"{",
RowBox[{"\"\<0.4.3\>\"", ",",
RowBox[{"{",
RowBox[{"2015", ",", "09", ",", "09"}], "}"}]}], "}"}]}],
";"}]], "Input",
InitializationCell->True],
Cell[BoxData[{
RowBox[{
RowBox[{"xAct`xPand`$xTensorVersionExpected", "=",
RowBox[{"{",
RowBox[{"\"\<1.1.2\>\"", ",",
RowBox[{"{",
RowBox[{"2015", ",", "8", ",", "3"}], "}"}]}], "}"}]}],
";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"xAct`xPand`$xPertVersionExpected", "=",
RowBox[{"{",
RowBox[{"\"\<1.0.5\>\"", ",",
RowBox[{"{",
RowBox[{"2014", ",", "9", ",", "28"}], "}"}]}], "}"}]}],
";"}]}], "Input",
InitializationCell->True],
Cell["", "Text"]
}, Open ]]
}, Open ]],
Cell[CellGroupData[{
Cell["1. Initialization", "Subsection",
InitializationCell->True,
FontColor->RGBColor[
0.20389105058365758`, 0.38530556191348136`, 0.9685969329365988]],
Cell[CellGroupData[{
Cell["1.1. GPL", "Subsubsection"],
Cell[BoxData[
RowBox[{
RowBox[{"(*", " ",
RowBox[{"xPand", ":", " ",
RowBox[{
RowBox[{
"Cosmological", " ", "perturbations", " ", "about", " ", "homogeneous",
" ", "space"}], "-", "times"}]}], " ", "*)"}], "\[IndentingNewLine]",
"\[IndentingNewLine]",
RowBox[{"(*", " ",
RowBox[{
RowBox[{
RowBox[{"Copyright", " ",
RowBox[{"(", "C", ")"}], " ", "2012"}], "-",
RowBox[{"2018", " ", "Cyril", " ", "Pitrou"}]}], ",", " ",
RowBox[{"Xavier", " ", "Roy", " ", "and", " ", "Obinna", " ", "Umeh"}]}],
" ", "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]",
RowBox[{"(*", " ",
RowBox[{
RowBox[{
RowBox[{
"This", " ", "program", " ", "is", " ", "free", " ", "software"}], ";",
" ",
RowBox[{"you", " ", "can", " ", "redistribute", " ", "it", " ",
RowBox[{"and", "/", "or"}], "\[IndentingNewLine]", " ", "modify", " ",
"it", " ", "under", " ", "the", " ", "terms", " ", "of", " ", "the",
" ", "GNU", " ", "General", " ", "Public", " ", "License", " ", "as",
"\[IndentingNewLine]", " ", "published", " ", "by", " ", "the", " ",
"Free", " ", "Software", " ", "Foundation"}], ";", " ",
RowBox[{
"either", " ", "version", " ", "2", " ", "of", "\[IndentingNewLine]",
" ", "the", " ", "License"}]}], ",",
RowBox[{"or", " ",
RowBox[{"(",
RowBox[{"at", " ", "your", " ", "option"}], ")"}], " ", "any", " ",
"later", " ",
RowBox[{
"version", ".", "\[IndentingNewLine]", "\[IndentingNewLine]", "This"}],
" ", "program", " ", "is", " ", "distributed", " ", "in", " ", "the",
" ", "hope", " ", "that", " ", "it", " ", "will", " ", "be", " ",
"useful"}], ",", "\[IndentingNewLine]", " ",
RowBox[{
RowBox[{"but", " ", "WITHOUT", " ", "ANY", " ", "WARRANTY"}], ";", " ",
RowBox[{
"without", " ", "even", " ", "the", " ", "implied", " ", "warranty", " ",
"of", "\[IndentingNewLine]", " ", "MERCHANTABILITY", " ", "or", " ",
"FITNESS", " ", "FOR", " ", "A", " ", "PARTICULAR", " ",
RowBox[{"PURPOSE", ".", " ", "See"}], " ", "the", " ", "GNU",
"\[IndentingNewLine]", " ", "General", " ", "Public", " ", "License",
" ", "for", " ", "more", " ",
RowBox[{
"details", ".", "\[IndentingNewLine]", "\[IndentingNewLine]", "You"}],
" ", "should", " ", "have", " ", "received", " ", "a", " ", "copy", " ",
"of", " ", "the", " ", "GNU", " ", "General", " ", "Public", " ",
"License", "\[IndentingNewLine]", " ", "along", " ", "with", " ",
"this", " ", "program"}], ";", " ",
RowBox[{"if", " ", "not"}]}], ",", " ",
RowBox[{
"write", " ", "to", " ", "the", " ", "Free", " ", "Software",
"\[IndentingNewLine]", " ", "Foundation"}], ",", " ",
RowBox[{"Inc", "."}], ",", " ",
RowBox[{
RowBox[{"59", " ", "Temple", " ", "Place"}], "-",
RowBox[{"Suite", " ", "330"}]}], ",", " ", "Boston", ",", " ",
RowBox[{
RowBox[{"MA", " ", "02111"}], "-", "1307"}], ",", "\[IndentingNewLine]",
" ",
RowBox[{"USA", "."}]}], " ", "\[IndentingNewLine]", "*)"}]}]], "Input",
InitializationCell->True],
Cell["", "Text"]
}, Open ]],
Cell[CellGroupData[{
Cell["1.2. Info package", "Subsubsection"],
Cell["\<\
(* :Title: xPand *)
(* :Author: Cyril Pitrou, Xavier Roy and Obinna Umeh *)
(* :Summary: Computer algebra for cosmological perturbations around \
homogenous space-times *)
(* :Brief Discussion:
- Background 3+1 splitting of space-time;
- Spatial sections are homogeneous (Friedmann-Lemaitre or Bianchi of all \
types) *)
(* :Context: xAct`xPand` *)
(* :Package Version: 0.4.3 *)
(* :Copyright: Cyril Pitrou, Xavier Roy and Obinna Umeh (2012-2016) *)
(* :History: see xPand.History *)
(* :Keywords: *)
(* :Source: xPand.nb *)
(* :Warning: *)
(* :Mathematica Version: 7.0 and later *)
(* :Limitations: *)\
\>", "Input",
PageWidth->PaperWidth,
CellMargins->{{60, -272}, {Inherited, Inherited}},
InitializationCell->True],
Cell["", "Text"]
}, Open ]],
Cell[CellGroupData[{
Cell["1.3. Begin package", "Subsubsection"],
Cell["\<\
Decide what is the last package being read:\
\>", "Text"],
Cell[BoxData[
RowBox[{
RowBox[{"If", "[",
RowBox[{
RowBox[{
RowBox[{"Unevaluated", "[", "xAct`xCore`Private`$LastPackage", "]"}], "===",
"xAct`xCore`Private`$LastPackage"}], ",",
RowBox[{"xAct`xCore`Private`$LastPackage", "=", "\"\<xAct`xPand`\>\""}]}],
"]"}], ";"}]], "Input",
InitializationCell->True],
Cell[CellGroupData[{
Cell[BoxData["xAct`xCore`Private`$LastPackage"], "Input"],
Cell[BoxData["\<\"xAct`xPand`\"\>"], "Output"]
}, Open ]],
Cell["\<\
Explicit (not hidden) import of other packages:\
\>", "Text"],
Cell[CellGroupData[{
Cell[BoxData[{
RowBox[{"Off", "[",
StyleBox[
RowBox[{"General", "::", "nostdvar"}], "MessageName"],
"]"}], "\[IndentingNewLine]",
RowBox[{"Off", "[",
StyleBox[
RowBox[{"General", "::", "nostdopt"}], "MessageName"],
"]"}], "\[IndentingNewLine]",
RowBox[{"BeginPackage", "[",
RowBox[{"\"\<xAct`xPand`\>\"", ",",
RowBox[{"{",
RowBox[{
"\"\<xAct`xPert`\>\"", ",", "\"\<xAct`xTensor`\>\"", ",",
"\"\<xAct`xPerm`\>\"", ",", "\"\<xAct`xCore`\>\"", ",",
"\"\<xAct`ExpressionManipulation`\>\""}], "}"}]}], "]"}]}], "Input",
InitializationCell->True],
Cell[CellGroupData[{
Cell[BoxData["\<\"------------------------------------------------------------\
\"\>"], "Print"],
Cell[BoxData[
InterpretationBox[
RowBox[{"\<\"Package xAct`xPerm` version \"\>",
"\[InvisibleSpace]", "\<\"1.2.0\"\>", "\[InvisibleSpace]", "\<\", \"\>",
"\[InvisibleSpace]",
RowBox[{"{",
RowBox[{"2013", ",", "1", ",", "27"}], "}"}]}],
SequenceForm["Package xAct`xPerm` version ", "1.2.0", ", ", {2013, 1, 27}],
Editable->False]], "Print"],
Cell[BoxData["\<\"CopyRight (C) 2003-2013, Jose M. Martin-Garcia, under the \
General Public License.\"\>"], "Print"],
Cell[BoxData["\<\"Connecting to external mac executable...\"\>"], "Print"],
Cell[BoxData["\<\"Connection established.\"\>"], "Print"],
Cell[BoxData["\<\"------------------------------------------------------------\
\"\>"], "Print"],
Cell[BoxData[
InterpretationBox[
RowBox[{"\<\"Package xAct`xTensor` version \"\>",
"\[InvisibleSpace]", "\<\"1.0.5\"\>", "\[InvisibleSpace]", "\<\", \"\>",
"\[InvisibleSpace]",
RowBox[{"{",
RowBox[{"2013", ",", "1", ",", "27"}], "}"}]}],
SequenceForm[
"Package xAct`xTensor` version ", "1.0.5", ", ", {2013, 1, 27}],
Editable->False]], "Print"],
Cell[BoxData["\<\"CopyRight (C) 2002-2013, Jose M. Martin-Garcia, under the \
General Public License.\"\>"], "Print"],
Cell[BoxData["\<\"------------------------------------------------------------\
\"\>"], "Print"],
Cell[BoxData[
InterpretationBox[
RowBox[{"\<\"Package xAct`xPert` version \"\>",
"\[InvisibleSpace]", "\<\"1.0.3\"\>", "\[InvisibleSpace]", "\<\", \"\>",
"\[InvisibleSpace]",
RowBox[{"{",
RowBox[{"2013", ",", "1", ",", "27"}], "}"}]}],
SequenceForm["Package xAct`xPert` version ", "1.0.3", ", ", {2013, 1, 27}],
Editable->False]], "Print"],
Cell[BoxData["\<\"CopyRight (C) 2005-2013, David Brizuela, Jose M. \
Martin-Garcia and Guillermo A. Mena Marugan, under the General Public \
License.\"\>"], "Print"],
Cell[BoxData[
InterpretationBox[
RowBox[{"\<\"** Variable \"\>", "\[InvisibleSpace]", "$PrePrint",
"\[InvisibleSpace]", "\<\" assigned value \"\>", "\[InvisibleSpace]",
"ScreenDollarIndices"}],
SequenceForm[
"** Variable ", $PrePrint, " assigned value ",
xAct`xTensor`ScreenDollarIndices],
Editable->False]], "Print"],
Cell[BoxData[
InterpretationBox[
RowBox[{"\<\"** Variable \"\>", "\[InvisibleSpace]", "$CovDFormat",
"\[InvisibleSpace]", "\<\" changed from \"\>",
"\[InvisibleSpace]", "\<\"Prefix\"\>", "\[InvisibleSpace]", "\<\" to \"\>",
"\[InvisibleSpace]", "\<\"Postfix\"\>"}],
SequenceForm[
"** Variable ", xAct`xTensor`$CovDFormat, " changed from ", "Prefix",
" to ", "Postfix"],
Editable->False]], "Print"],
Cell[BoxData[
InterpretationBox[
RowBox[{"\<\"** Option \"\>", "\[InvisibleSpace]", "AllowUpperDerivatives",
"\[InvisibleSpace]", "\<\" of \"\>", "\[InvisibleSpace]", "ContractMetric",
"\[InvisibleSpace]", "\<\" changed from \"\>", "\[InvisibleSpace]",
"False", "\[InvisibleSpace]", "\<\" to \"\>", "\[InvisibleSpace]", "True"}],
SequenceForm[
"** Option ", xAct`xTensor`AllowUpperDerivatives, " of ",
xAct`xTensor`ContractMetric, " changed from ", False, " to ", True],
Editable->False]], "Print"],
Cell[BoxData[
InterpretationBox[
RowBox[{"\<\"** Option \"\>", "\[InvisibleSpace]", "MetricOn",
"\[InvisibleSpace]", "\<\" of \"\>", "\[InvisibleSpace]", "MakeRule",
"\[InvisibleSpace]", "\<\" changed from \"\>", "\[InvisibleSpace]", "None",
"\[InvisibleSpace]", "\<\" to \"\>", "\[InvisibleSpace]", "All"}],
SequenceForm[
"** Option ", xAct`xTensor`MetricOn, " of ", xAct`xTensor`MakeRule,
" changed from ", None, " to ", All],
Editable->False]], "Print"],
Cell[BoxData[
InterpretationBox[
RowBox[{"\<\"** Option \"\>", "\[InvisibleSpace]", "ContractMetrics",
"\[InvisibleSpace]", "\<\" of \"\>", "\[InvisibleSpace]", "MakeRule",
"\[InvisibleSpace]", "\<\" changed from \"\>", "\[InvisibleSpace]",
"False", "\[InvisibleSpace]", "\<\" to \"\>", "\[InvisibleSpace]", "True"}],
SequenceForm[
"** Option ", xAct`xTensor`ContractMetrics, " of ", xAct`xTensor`MakeRule,
" changed from ", False, " to ", True],
Editable->False]], "Print"],
Cell[BoxData[
InterpretationBox[
RowBox[{"\<\"** \"\>", "\[InvisibleSpace]", "DefInertHead",
"\[InvisibleSpace]", "\<\": Defining \"\>",
"\[InvisibleSpace]", "\<\"inert head \"\>", "\[InvisibleSpace]",
"Perturbation", "\[InvisibleSpace]", "\<\". \"\>",
"\[InvisibleSpace]", "\<\"\"\>"}],
SequenceForm[
"** ", xAct`xTensor`DefInertHead, ": Defining ", "inert head ",
xAct`xPert`Perturbation, ". ", ""],
Editable->False]], "Print"]
}, Open ]],
Cell[BoxData["\<\"xAct`xPand`\"\>"], "Output"]
}, Open ]],
Cell[TextData[{
"\nCheck version of ",
StyleBox["xTensor",
FontSlant->"Italic"],
". We simply compare dates:"
}], "Text"],
Cell[BoxData[{
RowBox[{
RowBox[{"If", "[",
RowBox[{
RowBox[{"Not", "@",
RowBox[{"OrderedQ", "@",
RowBox[{"Map", "[",
RowBox[{"Last", ",",
RowBox[{"{",
RowBox[{"$xTensorVersionExpected", ",", "xAct`xTensor`$Version"}],
"}"}]}], "]"}]}]}], ",",
RowBox[{"Throw", "@",
RowBox[{"Message", "[",
RowBox[{
RowBox[{"General", "::", "versions"}], ",", "\"\<xTensor\>\"", ",",
"xAct`xTensor`$Version", ",", "$xTensorVersionExpected"}], "]"}]}]}],
"]"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]",
RowBox[{"If", "[",
RowBox[{
RowBox[{"Not", "@",
RowBox[{"OrderedQ", "@",
RowBox[{"Map", "[",
RowBox[{"Last", ",",
RowBox[{"{",
RowBox[{"$xPertVersionExpected", ",", "xAct`xPert`$Version"}],
"}"}]}], "]"}]}]}], ",",
RowBox[{"Throw", "@",
RowBox[{"Message", "[",
RowBox[{
RowBox[{"General", "::", "versions"}], ",", "\"\<xPert\>\"", ",",
"xAct`xPert`$Version", ",", "$xPertVersionExpected"}], "]"}]}]}],
"]"}]}], "Input",
InitializationCell->True],
Cell["\<\
Welcome message:\
\>", "Text"],
Cell[CellGroupData[{
Cell[BoxData[{
RowBox[{
RowBox[{"Print", "[", "xAct`xCore`Private`bars", "]"}],
";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"Print", "[",
RowBox[{"\"\<Package xAct`xPand` version \>\"", ",",
RowBox[{"$Version", "[",
RowBox[{"[", "1", "]"}], "]"}], ",", "\"\<, \>\"", ",",
RowBox[{"$Version", "[",
RowBox[{"[", "2", "]"}], "]"}]}], "]"}], ";"}], "\n",
RowBox[{
RowBox[{
"Print", "[",
"\"\<CopyRight (C) 2012-2018, Cyril Pitrou, Xavier Roy and Obinna Umeh \
under the General Public License.\>\"", "]"}], ";"}]}], "Input",
InitializationCell->True],
Cell[CellGroupData[{
Cell[BoxData["\<\"------------------------------------------------------------\
\"\>"], "Print"],
Cell[BoxData[
InterpretationBox[
RowBox[{"\<\"Package xAct`xPand` version \"\>",
"\[InvisibleSpace]", "\<\"0.4.0\"\>", "\[InvisibleSpace]", "\<\", \"\>",
"\[InvisibleSpace]",
RowBox[{"{",
RowBox[{"2013", ",", "2", ",", "8"}], "}"}]}],
SequenceForm["Package xAct`xPand` version ", "0.4.0", ", ", {2013, 2, 8}],
Editable->False]], "Print"],
Cell[BoxData["\<\"CopyRight (C) 2012-2013, Cyril Pitrou, Xavier Roy and \
Obinna Umeh under the General Public License.\"\>"], "Print"]
}, Open ]]
}, Open ]],
Cell["\<\
We specify the context xAct`xPand` to avoid overriding the Disclaimer of the \
other packages. However, we need to turn off the message General:shdw \
temporarily:\
\>", "Text"],
Cell[BoxData[{
RowBox[{"Off", "[",
RowBox[{"General", "::", "shdw"}], "]"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"xAct`xPand`Disclaimer", "[", "]"}], ":=",
RowBox[{
"Print", "[",
"\"\<These are points 11 and 12 of the General Public \
License:\\n\\nBECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO \
WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT \
WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES \
PROVIDE THE PROGRAM `AS IS\.b4 WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED \
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF \
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO \
THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM \
PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR \
CORRECTION.\\n\\nIN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO \
IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY \
AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR \
DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES \
ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT \
LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED \
BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER \
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE \
POSSIBILITY OF SUCH DAMAGES.\>\"", "]"}]}], "\[IndentingNewLine]",
RowBox[{"On", "[",
RowBox[{"General", "::", "shdw"}], "]"}]}], "Input",
InitializationCell->True],
Cell["\<\
If this is the last package show the GPL short disclaimer:\
\>", "Text"],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{
RowBox[{"If", "[",
RowBox[{
RowBox[{"xAct`xCore`Private`$LastPackage", "===", "\"\<xAct`xPand`\>\""}],
",", "\[IndentingNewLine]",
RowBox[{
RowBox[{"Unset", "[", "xAct`xCore`Private`$LastPackage", "]"}], ";",
"\[IndentingNewLine]",
RowBox[{"Print", "[", "xAct`xCore`Private`bars", "]"}], ";",
"\[IndentingNewLine]",
RowBox[{
"Print", "[",
"\"\<These packages come with ABSOLUTELY NO WARRANTY; for details type \
Disclaimer[]. This is free software, and you are welcome to redistribute it \
under certain conditions. See the General Public License for details.\>\"",
"]"}], ";", "\[IndentingNewLine]",
RowBox[{"Print", "[", "xAct`xCore`Private`bars", "]"}]}]}], "]"}],
";"}]], "Input",
InitializationCell->True],
Cell[CellGroupData[{
Cell[BoxData["\<\"------------------------------------------------------------\
\"\>"], "Print"],
Cell[BoxData["\<\"These packages come with ABSOLUTELY NO WARRANTY; for \
details type Disclaimer[]. This is free software, and you are welcome to \
redistribute it under certain conditions. See the General Public License for \
details.\"\>"], "Print"],
Cell[BoxData["\<\"------------------------------------------------------------\
\"\>"], "Print"]
}, Open ]]
}, Open ]],
Cell["\<\
Note that symbols in the Global` context cannot be accessed while building \
the package:\
\>", "Text"],
Cell[CellGroupData[{
Cell[BoxData["$ContextPath"], "Input"],
Cell[BoxData[
RowBox[{"{",
RowBox[{"\<\"xAct`xPand`\"\>", ",", "\<\"xAct`xPert`\"\>",
",", "\<\"xAct`xTensor`\"\>", ",", "\<\"xAct`xPerm`\"\>",
",", "\<\"xAct`xCore`\"\>", ",", "\<\"xAct`ExpressionManipulation`\"\>",
",", "\<\"System`\"\>"}], "}"}]], "Output"]
}, Open ]],
Cell[CellGroupData[{
Cell[BoxData["$Context"], "Input"],
Cell[BoxData["\<\"xAct`xPand`\"\>"], "Output"]
}, Open ]]
}, Open ]],
Cell[CellGroupData[{
Cell["1.4. Set up", "Subsubsection"],
Cell["\<\
Prefix format for derivatives:\
\>", "Text"],
Cell[BoxData[{
RowBox[{
RowBox[{"$CovDFormat", "=", "\"\<Prefix\>\""}],
";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"Message", "[",
RowBox[{
RowBox[{"General", "::", "nostdvar"}], ",", "\"\<$CovDFormat\>\"", ",",
"\"\<Prefix\>\""}], "]"}], ";"}]}], "Input",
InitializationCell->True],
Cell["\<\
We do not modify the option MathLink of CanonicalPerm:\
\>", "Text"],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{"Options", "[", "CanonicalPerm", "]"}]], "Input"],
Cell[BoxData[
RowBox[{"{",
RowBox[{
RowBox[{"MathLink", "\[RuleDelayed]", "$xpermQ"}], ",",
RowBox[{"TimeVerbose", "\[Rule]", "False"}], ",",
RowBox[{"xPermVerbose", "\[Rule]", "False"}], ",",
RowBox[{"OrderedBase", "\[Rule]", "True"}]}], "}"}]], "Output"]
}, Open ]],
Cell[CellGroupData[{
Cell[BoxData["$xpermQ"], "Input"],
Cell[BoxData["True"], "Output"]
}, Open ]],
Cell["", "Text"]
}, Closed]],
Cell[CellGroupData[{
Cell["1.5. Usage and error messages", "Subsubsection"],
Cell["\<\
Contents:
\tVersions
\tBooleans
\tError messages
\tFunctions
\tLists of fields
\tPredefined fields
\tReserved words and protected names
\tTypes of gauge
\tTypes of manifold\
\>", "Text"],
Cell["\<\
Versions:\
\>", "Text"],
Cell[BoxData[
RowBox[{
RowBox[{"(*",
RowBox[{"**", " ", "VERSIONS"}], " ", "***)"}], "\[IndentingNewLine]",
"\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{
RowBox[{"$Version", "::", "usage"}], "=",
"\"\<$Version is a global variable giving the version of the package \
xPand in use.\>\""}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{"$xTensorVersionExpected", "::", "usage"}], "=",
"\"\<$xTensorVersionExpected is a global variable giving the oldest \
possible version of the package xTensor which is required by the version of \
the package xPand in use.\>\""}], ";"}], "\[IndentingNewLine]",
"\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{"$xPertVersionExpected", "::", "usage"}], "=",
"\"\<$xPertVersionExpected is a global variable giving the oldest \
possible version of the package xPert which is required by the version of the \
package xPand in use.\>\""}], ";"}]}]}]], "Input",
InitializationCell->True],
Cell["\<\
Booleans:\
\>", "Text"],
Cell[BoxData[
RowBox[{
RowBox[{"(*",
RowBox[{"**", " ", "BOOLEANS"}], " ", "***)"}], "\[IndentingNewLine]",
"\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{
RowBox[{"BackgroundFieldMethod", "::", "usage"}], " ", "=", " ",
"\"\<BackgroundFieldMethod is a boolean option, set by default to \
'False'. If set to 'True', then only the first order of the metric \
perturbation is kept, and it therefore stands for the total metric \
perturbation. \n\nThis option should be placed at the begining of the \
notebook, right after loading the xPand package.\>\""}], ";"}],
"\[IndentingNewLine]",
RowBox[{"(*", " ",
RowBox[{
RowBox[{"Recently", " ",
RowBox[{"implemented", ".", " ", "Does"}], " ", "not", " ", "work", " ",
RowBox[{"correctly", ".", " ", "CP"}], " ", "needs", " ", "to", " ",
"fix", " ",
RowBox[{"that", ".", " ", "To"}], " ", "be", " ", "checked"}], "..."}],
" ", "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{"$CacheRules", "::", "usage"}], " ", "=", " ",
"\"\<If set to 'True', the rules are remembered. This is potentially \
dangerous, so default is 'False'.\>\""}], ";"}], "\[IndentingNewLine]",
RowBox[{"(*", " ",
RowBox[{"This", " ", "is", " ",
RowBox[{"obsolete", ".", " ", "This"}], " ", "will", " ", "have", " ",
"to", " ", "be", " ",
RowBox[{"erased", "."}]}], " ", "*)"}], "\[IndentingNewLine]",
"\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{"$ConformalTime", "::", "usage"}], " ", "=", " ",
"\"\<If set to 'True' (default value), then the prime ' stands for the \
Lie derivative along the vector 'n' normal to the spatial slices. If the time \
coordinate is taken to be the proper time of the Eulerian observers \
(identified by the normal vector), then the Lie derivative along 'n' \
corresponds to the partial time derivative with respect to the conformal \
time, namely: \!\(\*SubscriptBox[\(\[ScriptCapitalL]\), \(n\)]\) .. = \
\[PartialD]/\[PartialD]\[Eta] .. . \n\nThe second Label-Index (LI) of \
projected tensors represents the number of Lie derivatives along 'n' that are \
applied to them. It also corresponds to the number of partial derivatives \
with respect to conformal time. \n\nIn the cases for which we prefer to use \
the cosmic time, we can choose to employ the second LI not for the number of \
\!\(\*SubscriptBox[\(\[ScriptCapitalL]\), \(n\)]\), but rather for the number \
of 1/a \!\(\*SubscriptBox[\(\[ScriptCapitalL]\), \(n\)]\), where 'a' is the \
scale factor. This is done by setting '$ConformalTime' to 'False'. The label \
index then indicates a derivative with respect to cosmic time.\n\nThe output \
format of the second LI is a prime for a conformal time derivative, and a dot \
for a cosmic time derivative.\>\""}], ";"}], "\[IndentingNewLine]",
"\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{"$FirstOrderVectorPerturbations", "::", "usage"}], " ", "=",
" ", "\"\<Boolean option to decide if first order vector modes should be \
included. Default is 'True'.\>\""}], ";"}], "\[IndentingNewLine]",
"\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{"$FirstOrderTensorPerturbations", "::", "usage"}], " ", "=",
" ", "\"\<Boolean option to decide if first order tensor modes should be \
included. Default is 'True'.\>\""}], ";"}], "\[IndentingNewLine]",
"\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{"$OpenConstantsOfStructure", "::", "usage"}], " ", "=", " ",
"\"\<Boolean value to decide if the constants of structure should be \
parameterized as in Ellis & MacCallum (1969). If 'False', then the constants \
of structure are kept general. If 'True', then the parameterization is: \
\!\(\*SubscriptBox[SuperscriptBox[\(C\), \(i\)], \(\(jk\)\(\\\ \)\)]\)= \
\!\(\*SubscriptBox[\(\[Epsilon]\), \(jkl\)]\)\!\(\*SuperscriptBox[\(N\), \(li\
\)]\) + \!\(\*SubscriptBox[\(A\), \([j\)]\)\!\(\*SubscriptBox[SuperscriptBox[\
\(\[Delta]\), \(i\)], \(\(k\)\(]\)\)]\).\>\""}], ";"}], "\[IndentingNewLine]",
"\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{"$SortCovDAutomatic", "::", "usage"}], " ", "=", " ",
"\"\<Boolean value to decide whether or not xTensor should commute \
automatically the induced derivatives. Default is 'True' in order to optimize \
the canonicalization of expression. Note that some adhoc commutation \
relations defined in '$CommutecdRules' are also applied in order to enforce \
the transverse properties of vector and tensor fields, on the one hand, and \
the appearance of Laplacians, on the other hand.\>\""}], ";"}]}]}]], "Input",
InitializationCell->True],
Cell["\<\
Error messages:\
\>", "Text"],
Cell[BoxData[
RowBox[{
RowBox[{"(*",
RowBox[{
RowBox[{"**", " ", "ERROR"}], " ", "MESSAGES"}], " ", "***)"}],
"\[IndentingNewLine]", "\[IndentingNewLine]",
RowBox[{"(*",
RowBox[{"*", " ", "SetSlicing"}], " ", "**)"}], "\[IndentingNewLine]",
"\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{
RowBox[{"SetSlicing", "::", "dimension"}], " ", "=", " ",
"\"\<The dimension of the manifold is `1`; it is too small to perform a \
slicing.\>\""}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{"SetSlicing", "::", "invalidnormalvector"}], " ", "=", " ",
"\"\<The normal vector `1` used to perform the background slicing should \
have only one index, belonging to the VBundle of the manifold. To avoid \
issues, it is possible to not predefine the normal vector and let the \
function SetSlicing define it automatically.\>\""}], ";"}],
"\[IndentingNewLine]", "\[IndentingNewLine]",
RowBox[{"(*",
RowBox[{
RowBox[{"**", "**", "**", "**"}], "*", " ", "The", " ", "following", " ",
"error", " ", "message", " ", "is", " ", "not", " ", "yet", " ",
RowBox[{"used", "."}]}], " ", "**********)"}], "\[IndentingNewLine]",
"\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{"SetSlicing", "::", "ninds"}], " ", "=", " ",
"\"\<The number of indices is insufficient to define the (N-1)+1 \
splitting. Use at least `1` indices.\>\""}], ";"}], "\[IndentingNewLine]",
"\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{"SetSlicing", "::", "noambientmetric"}], " ", "=", " ",
"\"\<The ambient metric `1` was not previously defined as a metric. \
Define an ambient metric first, and then call SetSlicing.\>\""}], ";"}],
"\[IndentingNewLine]", "\[IndentingNewLine]",
RowBox[{"(*",
RowBox[{
RowBox[{"**", "**", "**", "**"}], "*", " ", "The", " ", "following", " ",
"error", " ", "message", " ", "does", " ", "not", " ", "seem", " ",
RowBox[{"correct", ".", " ", "It"}], " ", "should", " ", "be", " ",
RowBox[{"modified", "."}]}], " ", "**********)"}], "\[IndentingNewLine]",
"\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{"SetSlicing", "::", "signature"}], " ", "=", " ",
"\"\<The signature of the metric `1` should be -1 in order to perform a \
(N-1)+1 background splitting along a time-like vector. This comes from the \
fact that in the current version, the norm of the time-like vectors is fixed \
to -1.\>\""}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]",
RowBox[{"(*",
RowBox[{"*", " ", "DefProjectedTensor"}], " ", "**)"}],
"\[IndentingNewLine]", "\[IndentingNewLine]",
RowBox[{"(*",
RowBox[{
RowBox[{"**", "**", "**", "**"}], "*", " ", "The", " ", "following", " ",
"error", " ", "message", " ", "is", " ", "not", " ", "used", " ",
RowBox[{"anymore", "."}]}], " ", "**********)"}], "\[IndentingNewLine]",
"\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{"DefProjectedTensor", "::", "invalidindices"}], " ", "=", " ",
"\"\<No label-index needs to be given for the definition of projected \
tensors. They are automatically added by subroutines.\>\""}], ";"}],
"\[IndentingNewLine]", "\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{"DefProjectedTensor", "::", "notdownindices"}], " ", "=", " ",
"\"\<In order to be defined, the projected tensor `1` has to be written \
with down indices.\>\""}], ";"}], "\[IndentingNewLine]",
"\[IndentingNewLine]",
RowBox[{"(*",
RowBox[{"*", " ", "DefProjectedTensorProperties"}], " ", "**)"}],
"\[IndentingNewLine]", "\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{"DefProjectedTensorProperties", "::", "symmetrictensors"}], "=",
"\"\<The current version of DefProjectedTensorProperties can only add \
properties to tensors that are, at least, fully symmetric.\>\""}], ";"}],
"\[IndentingNewLine]", "\[IndentingNewLine]",
RowBox[{"(*",
RowBox[{"*", " ", "ExtractComponents"}], " ", "**)"}],
"\[IndentingNewLine]", "\n",
RowBox[{
RowBox[{
RowBox[{"ExtractComponents", "::", "invalidprojector"}], " ", "=", " ",
"\"\<One of the projectors in `1` is not valid. The possible projectors \
are: 'Time' or '*NameOfNormalVector*', and 'Space' or \
'*NameOfInducedMetric*'.\>\""}], ";"}], "\[IndentingNewLine]",
"\[IndentingNewLine]",
RowBox[{"(*",
RowBox[{"*", " ", "RulesSplitCovDsOfTensor"}], " ", "**)"}],
"\[IndentingNewLine]", "\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{"RulesSplitCovDsOfTensor", "::", "maxcovdnumber"}], " ", "=",
" ", "\"\<The number of CovDs was larger than `1`. The last (optional) \
argument of RulesSplitCovDsOfTensor needs to be set to a larger value in \
order to split correctly all covariant derivatives.\>\""}], ";"}],
"\[IndentingNewLine]", "\[IndentingNewLine]",
RowBox[{"(*",
RowBox[{"*", " ", "ToxPand"}], " ", "**)"}], "\[IndentingNewLine]",
"\[IndentingNewLine]",
RowBox[{"(*",
RowBox[{
RowBox[{
RowBox[{"**", "**", "**", "**"}], "*", " ", "The", " ", "following",
" ", "two", " ", "error", " ", "messages", " ", "are", " ", "not", " ",
"yet", " ",
RowBox[{"edited", ".", " ", "The"}], " ", "first", " ", "one", " ",
"is", " ", "not", " ", "referred", " ", "to"}], ",", " ",
RowBox[{
"and", " ", "the", " ", "utility", " ", "of", " ", "the", " ", "second",
" ", "one", " ", "has", " ", "to", " ", "be", " ",
RowBox[{"discussed", "."}]}]}], " ", "**********)"}],
"\[IndentingNewLine]", "\[IndentingNewLine]",
RowBox[{
RowBox[{