Remove use of special vars nn* and dn* in mtoinf.
[maxima.git] / tests / rtest_unicode_display.mac
blobf43100f6a7453524fdc888dc8fa7d35f1f0e4899
1 (kill (all), reset (linel), 0);
2 0;
4 /* tests adapted from tests/rtest3.mac */
6 declare_index_properties
7  (E, [postsubscript, postsuperscript, presuperscript, presubscript],
8   G, [postsubscript, postsuperscript, presuperscript, presubscript,
9       postsuperscript, presubscript]);
10 done;
12 block ([display2d_unicode: true], with_default_2d_display ([S: make_string_output_stream ()],
13   with_stdout (S, ?terpri (), print ((1 - G[a, b, c, d, w, x])/E[1, 1/2, 2/3, 17/29])),
14   get_output_stream_string (S)));
16        c b, w
17 1 -     G
18     d, x a
19 ───────────── 
20     2/3 1/2
21        E
22   17/29 1
25 (print_string_2d (e) := with_default_2d_display (printf (false, "~m", e)), 0);
28 block ([display2d_unicode: true], print_string_2d (lsum(1/f(g(x)/h(x)), x, LOOOOOOOOONG_EXPR)));
29 "____
30 ╲                         1
31  ⟩                     ───────
32 ╱                        g(x)
33 ‾‾‾‾                   f(────)
34 x in LOOOOOOOOONG_EXPR   h(x)
37 /* other examples which call DSUMPROD in test suite */
39 block ([display2d_unicode: true], print_string_2d ('sum(x^k / k,k,1,inf)));
40 "inf
41 ____   k
42 ╲     x
43  ⟩    ──
44 ╱     k
45 ‾‾‾‾
46 k = 1
49 block ([display2d_unicode: true], print_string_2d (subst (k = \*index, 'sum(x^k / k,k,1,inf))));
50 "inf
51 ____        *index
52 ╲          x
53  ⟩         ───────
54 ╱          *index
55 ‾‾‾‾
56 *index = 1
59 block ([display2d_unicode: true], print_string_2d ('sum(i!,i,1,4)));
60 " 4
61 ____
62
63  ⟩    i!
64
65 ‾‾‾‾
66 i = 1
69 block ([display2d_unicode: true], print_string_2d ('sum(g(i),i,0,n)));
70 " n
71 ____
72
73  ⟩    g(i)
74
75 ‾‾‾‾
76 i = 0
79 block ([display2d_unicode: true], print_string_2d ('sum(g(i),i,0,n) + 1));
80 " n
81 ____
82
83  ⟩    g(i) + 1
84
85 ‾‾‾‾
86 i = 0
89 block ([display2d_unicode: true], print_string_2d (foo: unsum(product(i^2,i,1,n),n)));
90 "  n - 1
91  ─┬───┬─
92   │   │  2
93 ( │   │ i ) (n - 1) (n + 1)
94   │   │
95   i = 1
98 block ([display2d_unicode: true], print_string_2d (nusum(foo,n,1,n)));
99 "   n
100 ─┬───┬─
101  │   │  2
102  │   │ i  - 1
103  │   │
104  i = 1
107 block ([display2d_unicode: true], print_string_2d (niceindices (powerseries(log(sin(x)/x),x,0))));
108 "inf
109 ____       i  2 i - 1            2 i
110 ╲     (- 1)  2        bern(2 i) x
111  ⟩    ──────────────────────────────
112 ╱                i (2 i)!
113 ‾‾‾‾
114 i = 1
117 block ([display2d_unicode: true], print_string_2d (product((x^i+1)^2.5,i,1,inf)/(x^2+1)));
118 "  inf
119 ─┬───┬─
120  │   │   i     2.5
121  │   │ (x  + 1)
122  │   │
123  i = 1
124  ─────────────────
125        2
126       x  + 1
129 /* additional DSUMPROD examples */
131 block ([display2d_unicode: true], print_string_2d ('lsum(1/(1+f(x)/2), kskdsksdkkdksdksd, w999393293923939losl)));
132 "____
133 ╲                                            1
134  ⟩                                        ────────
135 ╱                                         f(x)
136 ‾‾‾‾                                      ──── + 1
137 kskdsksdkkdksdksd in w999393293923939losl  2
140 block ([display2d_unicode: true], print_string_2d ('lsum(1/(1+f(x)/2), kskdsksdkkdksdksd, w999393293923939losl^2)));
141 "____
142 ╲                                             1
143  ⟩                                         ────────
144 ╱                                          f(x)
145 ‾‾‾‾                                       ──── + 1
146                                          2  2
147 kskdsksdkkdksdksd in w999393293923939losl
150 block ([display2d_unicode: true], print_string_2d ('lsum(1/(1+f(x)/2), kskdsksdkkdksdksd, w999393293923939losl^skdkskdsk)));
151 "____
152 ╲                                                     1
153  ⟩                                                 ────────
154 ╱                                                  f(x)
155 ‾‾‾‾                                               ──── + 1
156                                          skdkskdsk  2
157 kskdsksdkkdksdksd in w999393293923939losl
160 block ([display2d_unicode: true], print_string_2d (' ?rat(a, b)));
166 block ([display2d_unicode: true], print_string_2d (' "/"(a, b)));
172 block ([display2d_unicode: true], print_string_2d ('matrix([a, b, c])));
173 "┌         ┐
174 │ a  b  c │
175 └         ┘
178 block ([display2d_unicode: true], print_string_2d ('?mbox(a)));
179 "╔═╗
180 ║a║
181 ╚═╝
184 block ([display2d_unicode: true], print_string_2d ('?mlabox (a, b)));
185 "b═╗
186 ║a║
187 ╚═╝
190 /* tests adapted from tests/rtest9a.mac */
192 (verify_display_2d (expr, expected_output) :=
193   block ([S, output],
194     with_default_2d_display
195      (S : make_string_output_stream (),
196       with_stdout (S, print (expr)),
197       output : get_output_stream_string (S),
198       close (S),
199       if is (output = expected_output) then true else [expected_output, output])),
200  verify_display_1d (expr, expected_output) :=
201    block ([output : string (expr)], if is (output = expected_output) then true else [expected_output, output]),
202  0);
205 /* increase linel so next few test cases avoid Lisp error when run_testsuite(display_all = true)
206  * workaround for SF bug https://sourceforge.net/p/maxima/bugs/4234/
207  */
209 linel: 140;
210 140;
212 block ([powerdisp : false, display2d_unicode: true],
213   verify_display_2d ((x+1)/(x+2),
214 "x + 1
215 ───── 
216 x + 2
217 "));
218 true;
220 block ([powerdisp : true, display2d_unicode: true],
221   verify_display_2d ((x+1)/(x+2),
222 "1 + x
223 ───── 
224 2 + x
225 "));
226 true;
228 (reset (linel), 0);
231 (H : ( n2 * s^2 + n1 * s + n0 ) / ( d2 * s^2 + d1 * s + d0 ), 0);
234 block ([powerdisp : false, display2d_unicode: true], verify_display_2d (H,
235 "    2
236 n2 s  + n1 s + n0
237 ───────────────── 
238     2
239 d2 s  + d1 s + d0
240 "));
241 true;
243 block ([powerdisp : true, display2d_unicode: true], verify_display_2d (H,
244 "                2
245 n0 + n1 s + n2 s
246 ───────────────── 
247                 2
248 d0 + d1 s + d2 s
249 "));
250 true;
252 /* copied print_string_2d from rtest3.mac */
253 (print_string_2d (e) := with_default_2d_display (printf (false, "~m", e)), 0);
256 block ([display2d_unicode: true], print_string_2d (-a/b));
257 "  a
258 - ─
259   b
262 string (-a/b);
263 "-(a/b)";
265 block ([display2d_unicode: true], print_string_2d (-(a/b)));
266 "  a
267 - ─
268   b
271 string (-(a/b));
272 "-(a/b)";
274 block ([display2d_unicode: true], print_string_2d ((-a)/b));
275 "  a
276 - ─
277   b
280 block ([display2d_unicode: true], print_string_2d (-(a + b)/c));
281 "- b - a
282 ───────
283    c
286 string (-(a + b)/c);
287 "(-b-a)/c";
289 block ([display2d_unicode: true], print_string_2d ((-(a + b))/c));
290 "- b - a
291 ───────
292    c
295 string ((-(a + b))/c);
296 "(-b-a)/c";
298 block ([display2d_unicode: true], print_string_2d (-((a + b)/c)));
299 "  b + a
300 - ─────
301     c
304 /* tests adapted from share/stringproc/rtestprintf.mac */
306 block ([display2d_unicode: true],
307        with_default_2d_display(printf (false, "~m~%", 1/2)));
313 block ([display2d_unicode: true],
314        with_default_2d_display(block ([s: make_string_output_stream ()],
315                                       printf (s, "~m~%", 1/2),
316                                       get_output_stream_string (s))));
322 block ([display2d_unicode: true],
323        with_default_2d_display(printf (false, "~m, ~a, ~:m, ~@m, ~d~%", (1 + x)/(1 - x), (1 + x)/(1 - x), (1 + x)/(1 - x), (1 + x)/(1 - x), 1234)));
324 "x + 1                            x + 1
325 ─────, (x+1)/(1-x), (x+1)/(1-x), ─────, 1234
326 1 - x                            1 - x
329 block ([display2d_unicode: true],
330        with_default_2d_display(block ([s: make_string_output_stream ()],
331                                       printf (s, "~m, ~a, ~:m, ~@m, ~d~%", (1 + x)/(1 - x), (1 + x)/(1 - x), (1 + x)/(1 - x), (1 + x)/(1 - x), 1234),
332                                       get_output_stream_string (s))));
333 "x + 1                            x + 1
334 ─────, (x+1)/(1-x), (x+1)/(1-x), ─────, 1234
335 1 - x                            1 - x
338 block ([display2d_unicode: true],
339        with_default_2d_display(printf (false, "~~m ~~:m ~~~~@m ~m, ~a, ~:m, ~@m, ~d ~~z ~~~~z ~~~~~~y~%", (1 + x)/(1 - x), (1 + x)/(1 - x), (1 + x)/(1 - x), (1 + x)/(1 - x), 1234)));
340 "            x + 1                            x + 1
341 ~m ~:m ~~@m ─────, (x+1)/(1-x), (x+1)/(1-x), ─────, 1234 ~z ~~z ~~~y
342             1 - x                            1 - x
345 block ([display2d_unicode: true],
346        with_default_2d_display(block ([s: make_string_output_stream ()],
347                                       printf (s, "~~m ~~:m ~~~~@m ~m, ~a, ~:m, ~@m, ~d ~~z ~~~~z ~~~~~~y~%", (1 + x)/(1 - x), (1 + x)/(1 - x), (1 + x)/(1 - x), (1 + x)/(1 - x), 1234),
348                                       get_output_stream_string (s))));
349 "            x + 1                            x + 1
350 ~m ~:m ~~@m ─────, (x+1)/(1-x), (x+1)/(1-x), ─────, 1234 ~z ~~z ~~~y
351             1 - x                            1 - x
354 /* additional tests covering integrate, sum, lsum, product, diff, at, abs, matrix, box, labeled box, dpart, and ratio. */
356 (kill (all),
357  print_string_2d_unicode (e) := block ([display2d_unicode: true], with_default_2d_display (printf (false, "~m", e))),
358  0);
361 block ([simp: false], print_string_2d_unicode ([abs(1/2), abs(x[n]), abs(x^2)]));
362 " │1│        │ 2│
363 [│─│, │x │, │x │]
364  │2│  │ n│
367 (M: [matrix ([a]), matrix ([a, b], [c, d]), matrix ([a, b, c], [d, e, f], [g, h, i])],
368  print_string_2d_unicode (M));
369 "                  ┌         ┐
370         ┌      ┐  │ a  b  c │
371  ┌   ┐  │ a  b │  │         │
372 [│ a │, │      │, │ d  e  f │]
373  └   ┘  │ c  d │  │         │
374         └      ┘  │ g  h  i │
375                   └         ┘
378 print_string_2d_unicode (matrix (M));
379 "┌                              ┐
380 │                  ┌         ┐ │
381 │        ┌      ┐  │ a  b  c │ │
382 │ ┌   ┐  │ a  b │  │         │ │
383 │ │ a │  │      │  │ d  e  f │ │
384 │ └   ┘  │ c  d │  │         │ │
385 │        └      ┘  │ g  h  i │ │
386 │                  └         ┘ │
387 └                              ┘
390 print_string_2d_unicode (transpose (matrix (M)));
391 "┌             ┐
392 │    ┌   ┐    │
393 │    │ a │    │
394 │    └   ┘    │
395 │             │
396 │  ┌      ┐   │
397 │  │ a  b │   │
398 │  │      │   │
399 │  │ c  d │   │
400 │  └      ┘   │
401 │             │
402 │ ┌         ┐ │
403 │ │ a  b  c │ │
404 │ │         │ │
405 │ │ d  e  f │ │
406 │ │         │ │
407 │ │ g  h  i │ │
408 │ └         ┘ │
409 └             ┘
412 print_string_2d_unicode ('at(u, u='sum(x[k],k,1,n)));
413 " │    ____
414 u│    ╲
415  │u =  ⟩    x
416       ╱      k
417       ‾‾‾‾
418       k = 1
421 (e1a: 'integrate (f (u), u),
422  e1b: 'integrate (f (u), u, 0, 1),
423  e2: 'sum (g[k], k, 1, m),
424  e3: 'lsum (v[k]^2, k, L),
425  e4: 'product (N[i], i, 1, inf),
426  e5: 'diff (h (u[i], v[j], w[k]), u[i], 3, v[j], 2, w[k], 1),
427  e6a: 'at (u, u = 0),
428  e6b: 'at (1/(1 + 1/f(u, v)), [u = 0, v = 1]),
429  e7: abs (1/p[q[r[s[0]]]]^n),
430  e8a: matrix (makelist (y[i], i, 1, 10)),
431  e8b: transpose (e8a),
432  e8c: e8b . e8a,
433  e9a: box (u),
434  e9b: box (u[1]),
435  e9c: box (u^n),
436  e9d: box (1 - 1/u[1]^n),
437  e10a: box (u, foo),
438  e10b: box (u[1], bar),
439  e10c: box (u^n, baz),
440  e10d: box (1 - 1/u[1]^n, quux),
441  e11: dpart (x+y/z^2, 1, 2, 1),
442  e12: expand ((x[k] - y[l])^3 - 1) / (1234 - 456/(a[i] - b[j])^3),
443  0);
446 print_string_2d_unicode(e1a);
447 "⌠
449 ⎮ f(u) du
454 print_string_2d_unicode(e1b);
455 " 1
458 ⎮  f(u) du
464 print_string_2d_unicode(e2);
465 " m
466 ____
468  ⟩    g
469 ╱      k
470 ‾‾‾‾
471 k = 1
474 print_string_2d_unicode(e3);
475 "____
476 ╲       2
477  ⟩     v
478 ╱       k
479 ‾‾‾‾
480 k in L
483 print_string_2d_unicode(e4);
484 "  inf
485 ─┬───┬─
486  │   │
487  │   │ N
488  │   │  i
489  i = 1
492 print_string_2d_unicode(e5);
493 "     6
494     d
495 ─────────── (h(u , v , w ))
496   3   2         i   j   k
497 du  dv  dw
498   i   j   k
501 print_string_2d_unicode(e6b);
502 "           │
503      1     │
504 ───────────│
505    1       │
506 ─────── + 1│
507 f(u, v)    │
508            │(u = 0), (v = 1)
511 print_string_2d_unicode(e7);
512 "│  1  │
513 │─────│
514 │ n   │
515 │p    │
516 │ q   │
517 │  r  │
518 │   s │
519 │    0│
522 block ([linel: 80], print_string_2d_unicode(e8a));
523 "┌                                         ┐
524 │ y   y   y   y   y   y   y   y   y   y   │
525 │  1   2   3   4   5   6   7   8   9   10 │
526 └                                         ┘
529 block ([linel: 40], print_string_2d_unicode(e8a));
530 "         ┌    ┐         ┌    ┐
531  Col 1 = │ y  │ Col 2 = │ y  │
532          │  1 │         │  2 │
533          └    ┘         └    ┘
534          ┌    ┐         ┌    ┐
535  Col 3 = │ y  │ Col 4 = │ y  │
536          │  3 │         │  4 │
537          └    ┘         └    ┘
538          ┌    ┐         ┌    ┐
539  Col 5 = │ y  │ Col 6 = │ y  │
540          │  5 │         │  6 │
541          └    ┘         └    ┘
542          ┌    ┐         ┌    ┐
543  Col 7 = │ y  │ Col 8 = │ y  │
544          │  7 │         │  8 │
545          └    ┘         └    ┘
546          ┌    ┐          ┌     ┐
547  Col 9 = │ y  │ Col 10 = │ y   │
548          │  9 │          │  10 │
549          └    ┘          └     ┘
552 print_string_2d_unicode(e8b);
553 "┌     ┐
554 │ y   │
555 │  1  │
556 │     │
557 │ y   │
558 │  2  │
559 │     │
560 │ y   │
561 │  3  │
562 │     │
563 │ y   │
564 │  4  │
565 │     │
566 │ y   │
567 │  5  │
568 │     │
569 │ y   │
570 │  6  │
571 │     │
572 │ y   │
573 │  7  │
574 │     │
575 │ y   │
576 │  8  │
577 │     │
578 │ y   │
579 │  9  │
580 │     │
581 │ y   │
582 │  10 │
583 └     ┘
586 block ([linel: 120], print_string_2d_unicode(e8c));
587 "┌                                                                                ┐
588 │    2                                                                           │
589 │   y     y  y    y  y    y  y    y  y    y  y    y  y    y  y    y  y    y  y   │
590 │    1     1  2    1  3    1  4    1  5    1  6    1  7    1  8    1  9    1  10 │
591 │                                                                                │
592 │            2                                                                   │
593 │ y  y      y     y  y    y  y    y  y    y  y    y  y    y  y    y  y    y  y   │
594 │  1  2      2     2  3    2  4    2  5    2  6    2  7    2  8    2  9    2  10 │
595 │                                                                                │
596 │                    2                                                           │
597 │ y  y    y  y      y     y  y    y  y    y  y    y  y    y  y    y  y    y  y   │
598 │  1  3    2  3      3     3  4    3  5    3  6    3  7    3  8    3  9    3  10 │
599 │                                                                                │
600 │                            2                                                   │
601 │ y  y    y  y    y  y      y     y  y    y  y    y  y    y  y    y  y    y  y   │
602 │  1  4    2  4    3  4      4     4  5    4  6    4  7    4  8    4  9    4  10 │
603 │                                                                                │
604 │                                    2                                           │
605 │ y  y    y  y    y  y    y  y      y     y  y    y  y    y  y    y  y    y  y   │
606 │  1  5    2  5    3  5    4  5      5     5  6    5  7    5  8    5  9    5  10 │
607 │                                                                                │
608 │                                            2                                   │
609 │ y  y    y  y    y  y    y  y    y  y      y     y  y    y  y    y  y    y  y   │
610 │  1  6    2  6    3  6    4  6    5  6      6     6  7    6  8    6  9    6  10 │
611 │                                                                                │
612 │                                                    2                           │
613 │ y  y    y  y    y  y    y  y    y  y    y  y      y     y  y    y  y    y  y   │
614 │  1  7    2  7    3  7    4  7    5  7    6  7      7     7  8    7  9    7  10 │
615 │                                                                                │
616 │                                                            2                   │
617 │ y  y    y  y    y  y    y  y    y  y    y  y    y  y      y     y  y    y  y   │
618 │  1  8    2  8    3  8    4  8    5  8    6  8    7  8      8     8  9    8  10 │
619 │                                                                                │
620 │                                                                    2           │
621 │ y  y    y  y    y  y    y  y    y  y    y  y    y  y    y  y      y     y  y   │
622 │  1  9    2  9    3  9    4  9    5  9    6  9    7  9    8  9      9     9  10 │
623 │                                                                                │
624 │                                                                           2    │
625 │ y  y    y  y    y  y    y  y    y  y    y  y    y  y    y  y    y  y     y     │
626 │  1  10   2  10   3  10   4  10   5  10   6  10   7  10   8  10   9  10    10   │
627 └                                                                                ┘
630 block ([linel: 60], print_string_2d_unicode(e8c));
631 "         ┌        ┐         ┌        ┐         ┌        ┐
632          │    2   │         │ y  y   │         │ y  y   │
633          │   y    │         │  1  2  │         │  1  3  │
634          │    1   │         │        │         │        │
635          │        │         │    2   │         │ y  y   │
636          │ y  y   │         │   y    │         │  2  3  │
637          │  1  2  │         │    2   │         │        │
638          │        │         │        │         │    2   │
639          │ y  y   │         │ y  y   │         │   y    │
640          │  1  3  │         │  2  3  │         │    3   │
641          │        │         │        │         │        │
642          │ y  y   │         │ y  y   │         │ y  y   │
643          │  1  4  │         │  2  4  │         │  3  4  │
644          │        │         │        │         │        │
645          │ y  y   │         │ y  y   │         │ y  y   │
646  Col 1 = │  1  5  │ Col 2 = │  2  5  │ Col 3 = │  3  5  │
647          │        │         │        │         │        │
648          │ y  y   │         │ y  y   │         │ y  y   │
649          │  1  6  │         │  2  6  │         │  3  6  │
650          │        │         │        │         │        │
651          │ y  y   │         │ y  y   │         │ y  y   │
652          │  1  7  │         │  2  7  │         │  3  7  │
653          │        │         │        │         │        │
654          │ y  y   │         │ y  y   │         │ y  y   │
655          │  1  8  │         │  2  8  │         │  3  8  │
656          │        │         │        │         │        │
657          │ y  y   │         │ y  y   │         │ y  y   │
658          │  1  9  │         │  2  9  │         │  3  9  │
659          │        │         │        │         │        │
660          │ y  y   │         │ y  y   │         │ y  y   │
661          │  1  10 │         │  2  10 │         │  3  10 │
662          └        ┘         └        ┘         └        ┘
663          ┌        ┐         ┌        ┐         ┌        ┐
664          │ y  y   │         │ y  y   │         │ y  y   │
665          │  1  4  │         │  1  5  │         │  1  6  │
666          │        │         │        │         │        │
667          │ y  y   │         │ y  y   │         │ y  y   │
668          │  2  4  │         │  2  5  │         │  2  6  │
669          │        │         │        │         │        │
670          │ y  y   │         │ y  y   │         │ y  y   │
671          │  3  4  │         │  3  5  │         │  3  6  │
672          │        │         │        │         │        │
673          │    2   │         │ y  y   │         │ y  y   │
674          │   y    │         │  4  5  │         │  4  6  │
675          │    4   │         │        │         │        │
676          │        │         │    2   │         │ y  y   │
677          │ y  y   │         │   y    │         │  5  6  │
678  Col 4 = │  4  5  │ Col 5 = │    5   │ Col 6 = │        │
679          │        │         │        │         │    2   │
680          │ y  y   │         │ y  y   │         │   y    │
681          │  4  6  │         │  5  6  │         │    6   │
682          │        │         │        │         │        │
683          │ y  y   │         │ y  y   │         │ y  y   │
684          │  4  7  │         │  5  7  │         │  6  7  │
685          │        │         │        │         │        │
686          │ y  y   │         │ y  y   │         │ y  y   │
687          │  4  8  │         │  5  8  │         │  6  8  │
688          │        │         │        │         │        │
689          │ y  y   │         │ y  y   │         │ y  y   │
690          │  4  9  │         │  5  9  │         │  6  9  │
691          │        │         │        │         │        │
692          │ y  y   │         │ y  y   │         │ y  y   │
693          │  4  10 │         │  5  10 │         │  6  10 │
694          └        ┘         └        ┘         └        ┘
695          ┌        ┐         ┌        ┐         ┌        ┐
696          │ y  y   │         │ y  y   │         │ y  y   │
697          │  1  7  │         │  1  8  │         │  1  9  │
698          │        │         │        │         │        │
699          │ y  y   │         │ y  y   │         │ y  y   │
700          │  2  7  │         │  2  8  │         │  2  9  │
701          │        │         │        │         │        │
702          │ y  y   │         │ y  y   │         │ y  y   │
703          │  3  7  │         │  3  8  │         │  3  9  │
704          │        │         │        │         │        │
705          │ y  y   │         │ y  y   │         │ y  y   │
706          │  4  7  │         │  4  8  │         │  4  9  │
707          │        │         │        │         │        │
708          │ y  y   │         │ y  y   │         │ y  y   │
709          │  5  7  │         │  5  8  │         │  5  9  │
710  Col 7 = │        │ Col 8 = │        │ Col 9 = │        │
711          │ y  y   │         │ y  y   │         │ y  y   │
712          │  6  7  │         │  6  8  │         │  6  9  │
713          │        │         │        │         │        │
714          │    2   │         │ y  y   │         │ y  y   │
715          │   y    │         │  7  8  │         │  7  9  │
716          │    7   │         │        │         │        │
717          │        │         │    2   │         │ y  y   │
718          │ y  y   │         │   y    │         │  8  9  │
719          │  7  8  │         │    8   │         │        │
720          │        │         │        │         │    2   │
721          │ y  y   │         │ y  y   │         │   y    │
722          │  7  9  │         │  8  9  │         │    9   │
723          │        │         │        │         │        │
724          │ y  y   │         │ y  y   │         │ y  y   │
725          │  7  10 │         │  8  10 │         │  9  10 │
726          └        ┘         └        ┘         └        ┘
727           ┌        ┐
728           │ y  y   │
729           │  1  10 │
730           │        │
731           │ y  y   │
732           │  2  10 │
733           │        │
734           │ y  y   │
735           │  3  10 │
736           │        │
737           │ y  y   │
738           │  4  10 │
739           │        │
740           │ y  y   │
741           │  5  10 │
742  Col 10 = │        │
743           │ y  y   │
744           │  6  10 │
745           │        │
746           │ y  y   │
747           │  7  10 │
748           │        │
749           │ y  y   │
750           │  8  10 │
751           │        │
752           │ y  y   │
753           │  9  10 │
754           │        │
755           │   2    │
756           │  y     │
757           │   10   │
758           └        ┘
761 print_string_2d_unicode(e9a);
762 "╔═╗
763 ║u║
764 ╚═╝
767 print_string_2d_unicode(e9b);
768 "╔══╗
769 ║u ║
770 ║ 1║
771 ╚══╝
774 print_string_2d_unicode(e9c);
775 "╔══╗
776 ║ n║
777 ║u ║
778 ╚══╝
781 print_string_2d_unicode(e9d);
782 "╔══════╗
783 ║    1 ║
784 ║1 - ──║
785 ║     n║
786 ║    u ║
787 ║     1║
788 ╚══════╝
791 print_string_2d_unicode(e10a);
792 "foo
793 ║u║
794 ╚═╝
797 print_string_2d_unicode(e10b);
798 "bar╗
799 ║u ║
800 ║ 1║
801 ╚══╝
804 print_string_2d_unicode(e10c);
805 "baz╗
806 ║ n║
807 ║u ║
808 ╚══╝
811 print_string_2d_unicode(e10d);
812 "quux═══╗
813 ║    1 ║
814 ║1 - ──║
815 ║     n║
816 ║    u ║
817 ║     1║
818 ╚══════╝
821 print_string_2d_unicode(e11);
822 " y
823 ──── + x
824    2
825 ╔═╗
826 ║z║
827 ╚═╝
830 print_string_2d_unicode(e12);
831 "   3         2      2       3
832 - y  + 3 x  y  - 3 x  y  + x  - 1
833    l      k  l      k  l    k
834 ─────────────────────────────────
835                   456
836         1234 - ──────────
837                         3
838                (a  - b )
839                  i    j
842 (ee1:[e1a,e1b,e2,e3,e4],print_string_2d_unicode(ee1));
843 "             1           m                     inf
844  ⌠          ⌠           ____      ____       ─┬───┬─
845  ⎮          ⎮           ╲         ╲       2   │   │
846 [⎮ f(u) du, ⎮  f(u) du,  ⟩    g ,  ⟩     v ,  │   │ N ]
847  ⎮          ⎮           ╱      k  ╱       k   │   │  i
848  ⌡          ⌡           ‾‾‾‾      ‾‾‾‾        i = 1
849              0          k = 1     k in L
852 print_string_2d_unicode(matrix(ee1));
853 "┌                                                       ┐
854 │             1           m                     inf     │
855 │ ⌠          ⌠           ____      ____       ─┬───┬─   │
856 │ ⎮          ⎮           ╲         ╲       2   │   │    │
857 │ ⎮ f(u) du  ⎮  f(u) du   ⟩    g    ⟩     v    │   │ N  │
858 │ ⎮          ⎮           ╱      k  ╱       k   │   │  i │
859 │ ⌡          ⌡           ‾‾‾‾      ‾‾‾‾        i = 1    │
860 │             0          k = 1     k in L               │
861 └                                                       ┘
864 print_string_2d_unicode(transpose(matrix(ee1)));
865 "┌             ┐
866 │  ⌠          │
867 │  ⎮          │
868 │  ⎮ f(u) du  │
869 │  ⎮          │
870 │  ⌡          │
871 │             │
872 │   1         │
873 │  ⌠          │
874 │  ⎮          │
875 │  ⎮  f(u) du │
876 │  ⎮          │
877 │  ⌡          │
878 │   0         │
879 │             │
880 │    m        │
881 │   ____      │
882 │   ╲         │
883 │    ⟩    g   │
884 │   ╱      k  │
885 │   ‾‾‾‾      │
886 │   k = 1     │
887 │             │
888 │             │
889 │  ____       │
890 │  ╲       2  │
891 │   ⟩     v   │
892 │  ╱       k  │
893 │  ‾‾‾‾       │
894 │  k in L     │
895 │             │
896 │    inf      │
897 │  ─┬───┬─    │
898 │   │   │     │
899 │   │   │ N   │
900 │   │   │  i  │
901 │   i = 1     │
902 └             ┘
905 (ee2:[e5,e6b,e7,e8a,e8b],print_string_2d_unicode(ee2));
906 "      6                                  │
907      d                             1     │                  │  1  │
908 [─────────── (h(u , v , w )), ───────────│                , │─────│, 
909    3   2         i   j   k       1       │                  │ n   │
910  du  dv  dw                   ─────── + 1│                  │p    │
911    i   j   k                  f(u, v)    │                  │ q   │
912                                          │(u = 0), (v = 1)  │  r  │
913                                                             │   s │
914                                                             │    0│
915                                                                        ┌     ┐
916                                                                        │ y   │
917                                                                        │  1  │
918                                                                        │     │
919                                                                        │ y   │
920                                                                        │  2  │
921                                                                        │     │
922                                                                        │ y   │
923                                                                        │  3  │
924                                                                        │     │
925                                                                        │ y   │
926                                                                        │  4  │
927                                                                        │     │
928                                                                        │ y   │
929                           ┌                                         ┐  │  5  │
930                           │ y   y   y   y   y   y   y   y   y   y   │, │     │]
931                           │  1   2   3   4   5   6   7   8   9   10 │  │ y   │
932                           └                                         ┘  │  6  │
933                                                                        │     │
934                                                                        │ y   │
935                                                                        │  7  │
936                                                                        │     │
937                                                                        │ y   │
938                                                                        │  8  │
939                                                                        │     │
940                                                                        │ y   │
941                                                                        │  9  │
942                                                                        │     │
943                                                                        │ y   │
944                                                                        │  10 │
945                                                                        └     ┘
948 print_string_2d_unicode(matrix(ee2));
949 "         ┌                             ┐
950          │      6                      │
951          │     d                       │
952          │ ─────────── (h(u , v , w )) │
953  Col 1 = │   3   2         i   j   k   │
954          │ du  dv  dw                  │
955          │   i   j   k                 │
956          │                             │
957          │                             │
958          └                             ┘
959          ┌                              ┐         ┌         ┐
960          │            │                 │         │ │  1  │ │
961          │      1     │                 │         │ │─────│ │
962          │ ───────────│                 │         │ │ n   │ │
963  Col 2 = │    1       │                 │ Col 3 = │ │p    │ │
964          │ ─────── + 1│                 │         │ │ q   │ │
965          │ f(u, v)    │                 │         │ │  r  │ │
966          │            │(u = 0), (v = 1) │         │ │   s │ │
967          └                              ┘         │ │    0│ │
968                                                   └         ┘
969                                                                  ┌         ┐
970                                                                  │ ┌     ┐ │
971                                                                  │ │ y   │ │
972                                                                  │ │  1  │ │
973                                                                  │ │     │ │
974                                                                  │ │ y   │ │
975                                                                  │ │  2  │ │
976                                                                  │ │     │ │
977                                                                  │ │ y   │ │
978                                                                  │ │  3  │ │
979                                                                  │ │     │ │
980                                                                  │ │ y   │ │
981                                                                  │ │  4  │ │
982                                                                  │ │     │ │
983          ┌                                             ┐         │ │ y   │ │
984          │ ┌                                         ┐ │         │ │  5  │ │
985  Col 4 = │ │ y   y   y   y   y   y   y   y   y   y   │ │ Col 5 = │ │     │ │
986          │ │  1   2   3   4   5   6   7   8   9   10 │ │         │ │ y   │ │
987          │ └                                         ┘ │         │ │  6  │ │
988          └                                             ┘         │ │     │ │
989                                                                  │ │ y   │ │
990                                                                  │ │  7  │ │
991                                                                  │ │     │ │
992                                                                  │ │ y   │ │
993                                                                  │ │  8  │ │
994                                                                  │ │     │ │
995                                                                  │ │ y   │ │
996                                                                  │ │  9  │ │
997                                                                  │ │     │ │
998                                                                  │ │ y   │ │
999                                                                  │ │  10 │ │
1000                                                                  │ └     ┘ │
1001                                                                  └         ┘
1004 print_string_2d_unicode(transpose(matrix(ee2)));
1005 "┌                                             ┐
1006 │              6                              │
1007 │             d                               │
1008 │         ─────────── (h(u , v , w ))         │
1009 │           3   2         i   j   k           │
1010 │         du  dv  dw                          │
1011 │           i   j   k                         │
1012 │                                             │
1013 │                                             │
1014 │                                             │
1015 │                   │                         │
1016 │             1     │                         │
1017 │        ───────────│                         │
1018 │           1       │                         │
1019 │        ─────── + 1│                         │
1020 │        f(u, v)    │                         │
1021 │                   │(u = 0), (v = 1)         │
1022 │                                             │
1023 │                   │  1  │                   │
1024 │                   │─────│                   │
1025 │                   │ n   │                   │
1026 │                   │p    │                   │
1027 │                   │ q   │                   │
1028 │                   │  r  │                   │
1029 │                   │   s │                   │
1030 │                   │    0│                   │
1031 │                                             │
1032 │ ┌                                         ┐ │
1033 │ │ y   y   y   y   y   y   y   y   y   y   │ │
1034 │ │  1   2   3   4   5   6   7   8   9   10 │ │
1035 │ └                                         ┘ │
1036 │                                             │
1037 │                   ┌     ┐                   │
1038 │                   │ y   │                   │
1039 │                   │  1  │                   │
1040 │                   │     │                   │
1041 │                   │ y   │                   │
1042 │                   │  2  │                   │
1043 │                   │     │                   │
1044 │                   │ y   │                   │
1045 │                   │  3  │                   │
1046 │                   │     │                   │
1047 │                   │ y   │                   │
1048 │                   │  4  │                   │
1049 │                   │     │                   │
1050 │                   │ y   │                   │
1051 │                   │  5  │                   │
1052 │                   │     │                   │
1053 │                   │ y   │                   │
1054 │                   │  6  │                   │
1055 │                   │     │                   │
1056 │                   │ y   │                   │
1057 │                   │  7  │                   │
1058 │                   │     │                   │
1059 │                   │ y   │                   │
1060 │                   │  8  │                   │
1061 │                   │     │                   │
1062 │                   │ y   │                   │
1063 │                   │  9  │                   │
1064 │                   │     │                   │
1065 │                   │ y   │                   │
1066 │                   │  10 │                   │
1067 │                   └     ┘                   │
1068 └                                             ┘
1071 (ee3:[e8c,e9a,e9b,e9c,e9d],print_string_2d_unicode(ee3));
1072 "          2
1073 [matrix([y , y  y , y  y , y  y , y  y , y  y , y  y , y  y , y  y , y  y  ], 
1074           1   1  2   1  3   1  4   1  5   1  6   1  7   1  8   1  9   1  10
1075          2
1076 [y  y , y , y  y , y  y , y  y , y  y , y  y , y  y , y  y , y  y  ], 
1077   1  2   2   2  3   2  4   2  5   2  6   2  7   2  8   2  9   2  10
1078                 2
1079 [y  y , y  y , y , y  y , y  y , y  y , y  y , y  y , y  y , y  y  ], 
1080   1  3   2  3   3   3  4   3  5   3  6   3  7   3  8   3  9   3  10
1081                        2
1082 [y  y , y  y , y  y , y , y  y , y  y , y  y , y  y , y  y , y  y  ], 
1083   1  4   2  4   3  4   4   4  5   4  6   4  7   4  8   4  9   4  10
1084                               2
1085 [y  y , y  y , y  y , y  y , y , y  y , y  y , y  y , y  y , y  y  ], 
1086   1  5   2  5   3  5   4  5   5   5  6   5  7   5  8   5  9   5  10
1087                                      2
1088 [y  y , y  y , y  y , y  y , y  y , y , y  y , y  y , y  y , y  y  ], 
1089   1  6   2  6   3  6   4  6   5  6   6   6  7   6  8   6  9   6  10
1090                                             2
1091 [y  y , y  y , y  y , y  y , y  y , y  y , y , y  y , y  y , y  y  ], 
1092   1  7   2  7   3  7   4  7   5  7   6  7   7   7  8   7  9   7  10
1093                                                    2
1094 [y  y , y  y , y  y , y  y , y  y , y  y , y  y , y , y  y , y  y  ], 
1095   1  8   2  8   3  8   4  8   5  8   6  8   7  8   8   8  9   8  10
1096                                                           2
1097 [y  y , y  y , y  y , y  y , y  y , y  y , y  y , y  y , y , y  y  ], 
1098   1  9   2  9   3  9   4  9   5  9   6  9   7  9   8  9   9   9  10
1099 [y  y  , y  y  , y  y  , y  y  , y  y  , y  y  , y  y  , y  y  , y  y  , 
1100   1  10   2  10   3  10   4  10   5  10   6  10   7  10   8  10   9  10
1101                   ╔══╗  ╔══════╗
1102  2     ╔═╗  ╔══╗  ║ n║  ║    1 ║
1103 y  ]), ║u║, ║u ║, ║u ║, ║1 - ──║]
1104  10    ╚═╝  ║ 1║  ╚══╝  ║     n║
1105             ╚══╝        ║    u ║
1106                         ║     1║
1107                         ╚══════╝
1110 print_string_2d_unicode(matrix(ee3));
1111 "                 2
1112 matrix([matrix([y , y  y , y  y , y  y , y  y , y  y , y  y , y  y , y  y , 
1113                  1   1  2   1  3   1  4   1  5   1  6   1  7   1  8   1  9
1114                   2
1115 y  y  ], [y  y , y , y  y , y  y , y  y , y  y , y  y , y  y , y  y , y  y  ], 
1116  1  10     1  2   2   2  3   2  4   2  5   2  6   2  7   2  8   2  9   2  10
1117                 2
1118 [y  y , y  y , y , y  y , y  y , y  y , y  y , y  y , y  y , y  y  ], 
1119   1  3   2  3   3   3  4   3  5   3  6   3  7   3  8   3  9   3  10
1120                        2
1121 [y  y , y  y , y  y , y , y  y , y  y , y  y , y  y , y  y , y  y  ], 
1122   1  4   2  4   3  4   4   4  5   4  6   4  7   4  8   4  9   4  10
1123                               2
1124 [y  y , y  y , y  y , y  y , y , y  y , y  y , y  y , y  y , y  y  ], 
1125   1  5   2  5   3  5   4  5   5   5  6   5  7   5  8   5  9   5  10
1126                                      2
1127 [y  y , y  y , y  y , y  y , y  y , y , y  y , y  y , y  y , y  y  ], 
1128   1  6   2  6   3  6   4  6   5  6   6   6  7   6  8   6  9   6  10
1129                                             2
1130 [y  y , y  y , y  y , y  y , y  y , y  y , y , y  y , y  y , y  y  ], 
1131   1  7   2  7   3  7   4  7   5  7   6  7   7   7  8   7  9   7  10
1132                                                    2
1133 [y  y , y  y , y  y , y  y , y  y , y  y , y  y , y , y  y , y  y  ], 
1134   1  8   2  8   3  8   4  8   5  8   6  8   7  8   8   8  9   8  10
1135                                                           2
1136 [y  y , y  y , y  y , y  y , y  y , y  y , y  y , y  y , y , y  y  ], 
1137   1  9   2  9   3  9   4  9   5  9   6  9   7  9   8  9   9   9  10
1138 [y  y  , y  y  , y  y  , y  y  , y  y  , y  y  , y  y  , y  y  , y  y  , 
1139   1  10   2  10   3  10   4  10   5  10   6  10   7  10   8  10   9  10
1140                   ╔══╗  ╔══════╗
1141  2     ╔═╗  ╔══╗  ║ n║  ║    1 ║
1142 y  ]), ║u║, ║u ║, ║u ║, ║1 - ──║])
1143  10    ╚═╝  ║ 1║  ╚══╝  ║     n║
1144             ╚══╝        ║    u ║
1145                         ║     1║
1146                         ╚══════╝
1149 print_string_2d_unicode(transpose(matrix(ee3)));
1150 "                 2
1151 matrix([matrix([y , y  y , y  y , y  y , y  y , y  y , y  y , y  y , y  y , 
1152                  1   1  2   1  3   1  4   1  5   1  6   1  7   1  8   1  9
1153                   2
1154 y  y  ], [y  y , y , y  y , y  y , y  y , y  y , y  y , y  y , y  y , y  y  ], 
1155  1  10     1  2   2   2  3   2  4   2  5   2  6   2  7   2  8   2  9   2  10
1156                 2
1157 [y  y , y  y , y , y  y , y  y , y  y , y  y , y  y , y  y , y  y  ], 
1158   1  3   2  3   3   3  4   3  5   3  6   3  7   3  8   3  9   3  10
1159                        2
1160 [y  y , y  y , y  y , y , y  y , y  y , y  y , y  y , y  y , y  y  ], 
1161   1  4   2  4   3  4   4   4  5   4  6   4  7   4  8   4  9   4  10
1162                               2
1163 [y  y , y  y , y  y , y  y , y , y  y , y  y , y  y , y  y , y  y  ], 
1164   1  5   2  5   3  5   4  5   5   5  6   5  7   5  8   5  9   5  10
1165                                      2
1166 [y  y , y  y , y  y , y  y , y  y , y , y  y , y  y , y  y , y  y  ], 
1167   1  6   2  6   3  6   4  6   5  6   6   6  7   6  8   6  9   6  10
1168                                             2
1169 [y  y , y  y , y  y , y  y , y  y , y  y , y , y  y , y  y , y  y  ], 
1170   1  7   2  7   3  7   4  7   5  7   6  7   7   7  8   7  9   7  10
1171                                                    2
1172 [y  y , y  y , y  y , y  y , y  y , y  y , y  y , y , y  y , y  y  ], 
1173   1  8   2  8   3  8   4  8   5  8   6  8   7  8   8   8  9   8  10
1174                                                           2
1175 [y  y , y  y , y  y , y  y , y  y , y  y , y  y , y  y , y , y  y  ], 
1176   1  9   2  9   3  9   4  9   5  9   6  9   7  9   8  9   9   9  10
1177 [y  y  , y  y  , y  y  , y  y  , y  y  , y  y  , y  y  , y  y  , y  y  , 
1178   1  10   2  10   3  10   4  10   5  10   6  10   7  10   8  10   9  10
1179                         ╔══╗    ╔══════╗
1180  2       ╔═╗    ╔══╗    ║ n║    ║    1 ║
1181 y  ])], [║u║], [║u ║], [║u ║], [║1 - ──║])
1182  10      ╚═╝    ║ 1║    ╚══╝    ║     n║
1183                 ╚══╝            ║    u ║
1184                                 ║     1║
1185                                 ╚══════╝
1188 (ee4:[e10a,e10b,e10c,e10d,e11],print_string_2d_unicode(ee4));
1189 "            baz╗  quux═══╗
1190  foo  bar╗  ║ n║  ║    1 ║   y
1191 [║u║, ║u ║, ║u ║, ║1 - ──║, ──── + x]
1192  ╚═╝  ║ 1║  ╚══╝  ║     n║     2
1193       ╚══╝        ║    u ║  ╔═╗
1194                   ║     1║  ║z║
1195                   ╚══════╝  ╚═╝
1198 print_string_2d_unicode(matrix(ee4));
1199 "┌                                     ┐
1200 │            baz╗  quux═══╗           │
1201 │ foo  bar╗  ║ n║  ║    1 ║   y       │
1202 │ ║u║  ║u ║  ║u ║  ║1 - ──║  ──── + x │
1203 │ ╚═╝  ║ 1║  ╚══╝  ║     n║     2     │
1204 │      ╚══╝        ║    u ║  ╔═╗      │
1205 │                  ║     1║  ║z║      │
1206 │                  ╚══════╝  ╚═╝      │
1207 └                                     ┘
1210 print_string_2d_unicode(transpose(matrix(ee4)));
1211 "┌          ┐
1212 │   foo    │
1213 │   ║u║    │
1214 │   ╚═╝    │
1215 │          │
1216 │   bar╗   │
1217 │   ║u ║   │
1218 │   ║ 1║   │
1219 │   ╚══╝   │
1220 │          │
1221 │   baz╗   │
1222 │   ║ n║   │
1223 │   ║u ║   │
1224 │   ╚══╝   │
1225 │          │
1226 │ quux═══╗ │
1227 │ ║    1 ║ │
1228 │ ║1 - ──║ │
1229 │ ║     n║ │
1230 │ ║    u ║ │
1231 │ ║     1║ │
1232 │ ╚══════╝ │
1233 │          │
1234 │  y       │
1235 │ ──── + x │
1236 │    2     │
1237 │ ╔═╗      │
1238 │ ║z║      │
1239 │ ╚═╝      │
1240 └          ┘
1243 (ee5:[e12,FOO,BAR,BAZ,e6a],print_string_2d_unicode(ee5));
1244 "    3         2      2       3
1245  - y  + 3 x  y  - 3 x  y  + x  - 1
1246     l      k  l      k  l    k                      │
1247 [─────────────────────────────────, FOO, BAR, BAZ, u│     ]
1248                    456                              │u = 0
1249          1234 - ──────────
1250                          3
1251                 (a  - b )
1252                   i    j
1255 print_string_2d_unicode(matrix(ee5));
1256 "┌                                                           ┐
1257 │    3         2      2       3                             │
1258 │ - y  + 3 x  y  - 3 x  y  + x  - 1                         │
1259 │    l      k  l      k  l    k                      │      │
1260 │ ─────────────────────────────────  FOO  BAR  BAZ  u│      │
1261 │                   456                              │u = 0 │
1262 │         1234 - ──────────                                 │
1263 │                         3                                 │
1264 │                (a  - b )                                  │
1265 │                  i    j                                   │
1266 └                                                           ┘
1269 print_string_2d_unicode(transpose(matrix(ee5)));
1270 "┌                                   ┐
1271 │    3         2      2       3     │
1272 │ - y  + 3 x  y  - 3 x  y  + x  - 1 │
1273 │    l      k  l      k  l    k     │
1274 │ ───────────────────────────────── │
1275 │                   456             │
1276 │         1234 - ──────────         │
1277 │                         3         │
1278 │                (a  - b )          │
1279 │                  i    j           │
1280 │                                   │
1281 │                FOO                │
1282 │                                   │
1283 │                BAR                │
1284 │                                   │
1285 │                BAZ                │
1286 │                                   │
1287 │               │                   │
1288 │              u│                   │
1289 │               │u = 0              │
1290 └                                   ┘
1293 block ([linel: 140], print_string_2d_unicode (matrix (ee1, ee2, ee4, ee5)));
1294 "┌                                                                                                                                   ┐
1295 │                                              1                    m                                                       inf     │
1296 │             ⌠                               ⌠                    ____                       ____                        ─┬───┬─   │
1297 │             ⎮                               ⎮                    ╲                          ╲       2                    │   │    │
1298 │             ⎮ f(u) du                       ⎮  f(u) du            ⟩    g                     ⟩     v                     │   │ N  │
1299 │             ⎮                               ⎮                    ╱      k                   ╱       k                    │   │  i │
1300 │             ⌡                               ⌡                    ‾‾‾‾                       ‾‾‾‾                         i = 1    │
1301 │                                              0                   k = 1                      k in L                                │
1302 │                                                                                                                                   │
1303 │                                                                                                                         ┌     ┐   │
1304 │                                                                                                                         │ y   │   │
1305 │                                                                                                                         │  1  │   │
1306 │                                                                                                                         │     │   │
1307 │                                                                                                                         │ y   │   │
1308 │                                                                                                                         │  2  │   │
1309 │                                                                                                                         │     │   │
1310 │                                                                                                                         │ y   │   │
1311 │                                                                                                                         │  3  │   │
1312 │                                                                                                                         │     │   │
1313 │                                                                                                                         │ y   │   │
1314 │                                                                                                                         │  4  │   │
1315 │                                                                                                                         │     │   │
1316 │         6                                     │                                                                         │ y   │   │
1317 │        d                                1     │                  │  1  │   ┌                                         ┐  │  5  │   │
1318 │    ─────────── (h(u , v , w ))     ───────────│                  │─────│   │ y   y   y   y   y   y   y   y   y   y   │  │     │   │
1319 │      3   2         i   j   k          1       │                  │ n   │   │  1   2   3   4   5   6   7   8   9   10 │  │ y   │   │
1320 │    du  dv  dw                      ─────── + 1│                  │p    │   └                                         ┘  │  6  │   │
1321 │      i   j   k                     f(u, v)    │                  │ q   │                                                │     │   │
1322 │                                               │(u = 0), (v = 1)  │  r  │                                                │ y   │   │
1323 │                                                                  │   s │                                                │  7  │   │
1324 │                                                                  │    0│                                                │     │   │
1325 │                                                                                                                         │ y   │   │
1326 │                                                                                                                         │  8  │   │
1327 │                                                                                                                         │     │   │
1328 │                                                                                                                         │ y   │   │
1329 │                                                                                                                         │  9  │   │
1330 │                                                                                                                         │     │   │
1331 │                                                                                                                         │ y   │   │
1332 │                                                                                                                         │  10 │   │
1333 │                                                                                                                         └     ┘   │
1334 │                                                                                                                                   │
1335 │                                                                    baz╗                     quux═══╗                              │
1336 │                foo                             bar╗                ║ n║                     ║    1 ║                     y        │
1337 │                ║u║                             ║u ║                ║u ║                     ║1 - ──║                    ──── + x  │
1338 │                ╚═╝                             ║ 1║                ╚══╝                     ║     n║                       2      │
1339 │                                                ╚══╝                                         ║    u ║                    ╔═╗       │
1340 │                                                                                             ║     1║                    ║z║       │
1341 │                                                                                             ╚══════╝                    ╚═╝       │
1342 │                                                                                                                                   │
1343 │    3         2      2       3                                                                                                     │
1344 │ - y  + 3 x  y  - 3 x  y  + x  - 1                                                                                                 │
1345 │    l      k  l      k  l    k                                                                                            │        │
1346 │ ─────────────────────────────────              FOO                 BAR                         BAZ                      u│        │
1347 │                   456                                                                                                    │u = 0   │
1348 │         1234 - ──────────                                                                                                         │
1349 │                         3                                                                                                         │
1350 │                (a  - b )                                                                                                          │
1351 │                  i    j                                                                                                           │
1352 └                                                                                                                                   ┘