Skip to content

Commit 5ba5bbe

Browse files
committed
Update example notebook
1 parent 01ec9d6 commit 5ba5bbe

File tree

2 files changed

+216
-8
lines changed

2 files changed

+216
-8
lines changed

CMakeLists.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,14 @@ else()
5959
message(STATUS "Install directory set to ${CMAKE_INSTALL_PREFIX}")
6060
endif()
6161

62-
install(
63-
CODE
64-
"
65-
if (EXISTS \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/man/man1/cadabra2.1\")
66-
message(FATAL_ERROR \"\nThe location of the Cadabra manual has changed since the last installation. Please remove the old files with 'make deduplicate'.\n\")
67-
endif()
68-
"
69-
)
62+
# install(
63+
# CODE
64+
# "
65+
# if (EXISTS \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/man/man1/cadabra2.1\")
66+
# message(FATAL_ERROR \"\nThe location of the Cadabra manual has changed since the last installation. Please remove the old files with 'make deduplicate'.\n\")
67+
# endif()
68+
# "
69+
# )
7070

7171
# Turn Mathematica support on/off.
7272
option(ENABLE_MATHEMATICA "Enable Mathematica support" ON)

examples/automatic_multiterm.cnb

Lines changed: 208 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,208 @@
1+
{
2+
"cell_id": 3391536610896426838,
3+
"cells": [
4+
{
5+
"cell_id": 9970128145502107243,
6+
"cell_origin": "client",
7+
"cell_type": "latex",
8+
"cells": [
9+
{
10+
"cell_id": 16204355368752002978,
11+
"cell_origin": "client",
12+
"cell_type": "latex_view",
13+
"source": "This notebook illustrates how the automatic multi-term simplification algorithm \\algo{meld} can\nbe used in a \\verb|post_process| function to simplify expressions immediately."
14+
}
15+
],
16+
"hidden": true,
17+
"source": "This notebook illustrates how the automatic multi-term simplification algorithm \\algo{meld} can\nbe used in a \\verb|post_process| function to simplify expressions immediately."
18+
},
19+
{
20+
"cell_id": 16589852709921553693,
21+
"cell_origin": "client",
22+
"cell_type": "input",
23+
"source": "def post_process(ex):\n meld(ex)\n collect_terms(ex)"
24+
},
25+
{
26+
"cell_id": 1137909878511905740,
27+
"cell_origin": "client",
28+
"cell_type": "input",
29+
"cells": [
30+
{
31+
"cell_id": 3984991681506874828,
32+
"cell_origin": "server",
33+
"cell_type": "latex_view",
34+
"source": "\\begin{dmath*}{}\\text{Property TableauSymmetry attached to~}R_{a b c d}.\\end{dmath*}"
35+
}
36+
],
37+
"source": "R_{a b c d}::RiemannTensor;"
38+
},
39+
{
40+
"cell_id": 10442559150589961051,
41+
"cell_origin": "client",
42+
"cell_type": "input",
43+
"cells": [
44+
{
45+
"cell_id": 16272566471204925814,
46+
"cell_origin": "server",
47+
"cell_type": "latex_view",
48+
"cells": [
49+
{
50+
"cell_id": 1708705026185000243,
51+
"cell_origin": "server",
52+
"cell_type": "input_form",
53+
"source": "R_{a b c d} + R_{b c a d} + R_{c a b d}"
54+
}
55+
],
56+
"source": "\\begin{dmath*}{}R_{a b c d}+R_{b c a d}+R_{c a b d}\\end{dmath*}"
57+
}
58+
],
59+
"source": "ex:=R_{a b c d} + R_{b c a d} + R_{c a b d};"
60+
},
61+
{
62+
"cell_id": 17665426107502293019,
63+
"cell_origin": "client",
64+
"cell_type": "input",
65+
"cells": [
66+
{
67+
"cell_id": 4864102099047927703,
68+
"cell_origin": "server",
69+
"cell_type": "latex_view",
70+
"source": "\\begin{dmath*}{}\\text{Property AntiSymmetric attached to~}A^{a b c}.\\end{dmath*}"
71+
}
72+
],
73+
"source": "A^{a b c}::AntiSymmetric;"
74+
},
75+
{
76+
"cell_id": 11231869119195730671,
77+
"cell_origin": "client",
78+
"cell_type": "input",
79+
"cells": [
80+
{
81+
"cell_id": 775906003630772013,
82+
"cell_origin": "server",
83+
"cell_type": "latex_view",
84+
"source": "\\begin{dmath*}{}\\text{Property Symmetric attached to~}S_{a b c}.\\end{dmath*}"
85+
}
86+
],
87+
"source": "S_{a b c}::Symmetric;"
88+
},
89+
{
90+
"cell_id": 15440997254477550604,
91+
"cell_origin": "client",
92+
"cell_type": "input",
93+
"cells": [
94+
{
95+
"cell_id": 228473189702070848,
96+
"cell_origin": "server",
97+
"cell_type": "latex_view",
98+
"cells": [
99+
{
100+
"cell_id": 9500934661811827513,
101+
"cell_origin": "server",
102+
"cell_type": "input_form",
103+
"source": "R_{a b c d} A^{a b c}"
104+
}
105+
],
106+
"source": "\\begin{dmath*}{}R_{a b c d} A^{a b c}\\end{dmath*}"
107+
}
108+
],
109+
"source": "ex:=R_{a b c d} A^{a b c};"
110+
},
111+
{
112+
"cell_id": 6001193804290926265,
113+
"cell_origin": "client",
114+
"cell_type": "input",
115+
"cells": [
116+
{
117+
"cell_id": 16452054599630373227,
118+
"cell_origin": "server",
119+
"cell_type": "latex_view",
120+
"cells": [
121+
{
122+
"cell_id": 17144787782815941213,
123+
"cell_origin": "server",
124+
"cell_type": "input_form",
125+
"source": "(A^{a b c} + A^{c a b}) S_{a b c}"
126+
}
127+
],
128+
"source": "\\begin{dmath*}{}\\left(A^{a b c}+A^{c a b}\\right) S_{a b c}\\end{dmath*}"
129+
}
130+
],
131+
"source": "ex:= (A^{a b c} + A^{c a b}) S_{a b c};"
132+
},
133+
{
134+
"cell_id": 14929753163657422384,
135+
"cell_origin": "client",
136+
"cell_type": "input",
137+
"cells": [
138+
{
139+
"cell_id": 1137671033037866650,
140+
"cell_origin": "server",
141+
"cell_type": "latex_view",
142+
"cells": [
143+
{
144+
"cell_id": 1039654011058708309,
145+
"cell_origin": "server",
146+
"cell_type": "input_form",
147+
"source": "2A^{a b c} S_{a b c}"
148+
}
149+
],
150+
"source": "\\begin{dmath*}{}2A^{a b c} S_{a b c}\\end{dmath*}"
151+
}
152+
],
153+
"source": "meld(ex, repeat=True);"
154+
},
155+
{
156+
"cell_id": 10182337157813236277,
157+
"cell_origin": "client",
158+
"cell_type": "input",
159+
"cells": [
160+
{
161+
"cell_id": 16001156654425651111,
162+
"cell_origin": "server",
163+
"cell_type": "latex_view",
164+
"cells": [
165+
{
166+
"cell_id": 15399389374269644662,
167+
"cell_origin": "server",
168+
"cell_type": "input_form",
169+
"source": "(a-b) A^{a b c}"
170+
}
171+
],
172+
"source": "\\begin{dmath*}{}\\left(a-b\\right) A^{a b c}\\end{dmath*}"
173+
}
174+
],
175+
"source": "ex:= a A^{a b c} + b A^{b a c};"
176+
},
177+
{
178+
"cell_id": 2655562479605535632,
179+
"cell_origin": "client",
180+
"cell_type": "input",
181+
"cells": [
182+
{
183+
"cell_id": 3165433391968790005,
184+
"cell_origin": "server",
185+
"cell_type": "latex_view",
186+
"cells": [
187+
{
188+
"cell_id": 14527276633063001349,
189+
"cell_origin": "server",
190+
"cell_type": "input_form",
191+
"source": " 3/2 R_{a b c d} R_{a b c d}"
192+
}
193+
],
194+
"source": "\\begin{dmath*}{}\\frac{3}{2}R_{a b c d} R_{a b c d}\\end{dmath*}"
195+
}
196+
],
197+
"source": "ex:=R_{a b c d} R_{a b c d} + R_{a b c d} R_{a c b d};"
198+
},
199+
{
200+
"cell_id": 12588425984072827898,
201+
"cell_origin": "client",
202+
"cell_type": "input",
203+
"source": ""
204+
}
205+
],
206+
"description": "Cadabra JSON notebook format",
207+
"version": 1.0
208+
}

0 commit comments

Comments
 (0)