~mwshinn/+junk/notes3

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
Title: Unit test for math

What is this?
-------------

If this compiles, and if the math contained in it looks reasonable, we
know that we probably didn't screw up the grammar.  This should be
checked after any changes to the grammar.

Tests
-----

| Expression | Expected |
|------------+----------|
| $x$ | ${{x}}$ |
| $x+3$ | ${{x+3}}$ |
| $3x$ | ${{3x}}$ |
| $sin(x)$ | ${{\text{sin}(x)}}$ |
| $sin(3x)$ | ${{\text{sin}(3x)}}$ |
| $sin(x,y)$ | ${{\text{sin}(x,y)}}$ |
| $sin(x)^2$ | ${{\text{sin}(x)^2}}$ |
| $sin(x,y)^2$ | ${{\text{sin}(x,y)^2}}$ |
| $2^sin(x)$ | ${{2^{\text{sin}(x)}}}$ |
| $2^sin(x,y)$ | ${{2^{\text{sin}(x,y)}}}$ |
| $2^E(X)$ | ${{2^{E(X)}}}$ |
| $2^E(X,Y|Z,W)$ | ${{2^{E(X,Y|Z,W)}}}$ |
| ${x+3}$ | ${{x+3}}$ |
| $2^{x+3}$ | ${{2^{x+3}}}$ |
| $mat[1, 2; 3, 4]$ | ${{\begin{bmatrix}1&2\\3&4\end{bmatrix}}}$ |
| $mat[1,2;3,4]$ | ${{\begin{bmatrix}1&2\\3&4\end{bmatrix}}}$ |
| $mat[1, 2; 3, 4]^-1$ | ${{\begin{bmatrix}1&2\\3&4\end{bmatrix}^{-1}}}$ |
| $mat[sin(x), sin(x,y); 3, 4]$ | ${{\begin{bmatrix}\text{sin}(x)&\text{sin}(x,y)\\3&4\end{bmatrix}}}$ |
| $ | ${{\alpha}}$ |
| ^2$ | ${{\alpha^2}}$ |
| $2^α$ | ${{2^\alpha}}$ |
| $2^-1$ | ${{2^{-1}}}$ |
| $2^-α$ | ${{2^{-\alpha}}}$ |
| $yx^x$ | ${{yx^x}}$ |
| $2^{xy}$ | ${{2^{xy}}}$ |
| $2^"text"$ | ${{2^\text{text}}}$ |
| $2^x y$ | ${{2^x y}}$ |
| $3^mat[1, 2; 3, 4]$ | ${{3^{\begin{bmatrix}1&2\\3&4\end{bmatrix}}}}$ |
| $+*×/ > < << >> =±≤≥$ | $+*×/ > < << >> =±≤≥$ |
| $÷·∘≠≠≈⊃⊂⊇⊆∖≡∧∨∈∋∩∪:⊄∘$ | $÷·∘≠≠≈⊃⊂⊇⊆∖≡∧∨∈∋∩∪:⊄∘$ |
| $%!  ∫∫ ∫∫∫ →←⤳⇒⇐⇔ℵ¬$ | $%!  ∫∫ ∫∫∫ →←⤳⇒⇐⇔ℵ¬$ |
| $∀∃∄∞∂ℝℕℂℤℚ𝔽ø∅∑∏↑♯♭♮∇~$ | $∀∃∄∞∂ℝℕℂℤℚ𝔽ø∅∑∏↑♯♭♮∇~$ |
| $ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩ$ | $ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩ$ |
| $αβγδεζηθικλμνξοπρσςτυφɸχψωℓ$ | $αβγδεζηθικλμνξοπρσςτυφɸχψωℓ$ |
| $|x|$ | ${{|x|}}$ |
| $|x+3|$ | ${{|x+3|}}$ |
| $||x+3||$ | ${{\|x+3\|}}$ |
| $x̂$ | ${{\hat{x}}}$ |
| $||x⃗||$ | ${{\|\vec{x}\|}}$ |
| $E(X|Y)$ | ${{E(X|Y)}}$ |
| $E(X |Y)$ | ${{E(X |Y)}}$ |
| $E(X,Y|Z,W)$ | ${{E(X,Y|Z,W)}}$ |
| $E(X, Y | Z, W)$ | ${{E(X, Y | Z, W)}}$ |
| $x,y$ | ${{x,y \in \mathbb{R}}}$ |
| $x^{\ensuremath{xyz}}$ | ${{x^{\ensuremath{xyz}}}}$ |
| $√3$ | ${{\sqrt{3}}}$ |
| $√(x+3)$ | ${{\sqrt{(x+3)}}}$ |
| $√{x+3}$ | ${{\sqrt{x+3}}}$ |
| $2^2$ | ${{2^{\sqrt{2}}}}$ |
| ${ x : x,x0 }$ | ${{\{ x : x\in\mathbb{N},x\ne0 \}}}$ |
| ${ (x,y) | x,y,x0 }$ | ${{\{ (x,y) | x,y\in\mathbb{N},x\ne0 \}}}$ |
| $∑_{i=0}^10 x_i$ | ${{\sum_{i=0}^{10} x_i}}$ |
| $\frac{3x+2α}{22^22+\epsilon}$ | ${{\frac{3x+2\alpha}{22^{22}+\epsilon}}}$ |
| $\frac{1}{1+\frac{1}{1+\frac{1}{1+...}}}$ | ${{\frac{1}{1+\frac{1}{1+\frac{1}{1+\ldots}}}}}$ |
| $x^*$ | ${{x^*}}$ |
| $x_+$ | ${{x_+}}$ |
| $x_-$ | ${{x_-}}$ |
| $H(X,Y;Z)$ | ${{H(X,Y;Z)}}$ |
| $f(x)$ | ${{f(x)}}$ |
| $x = \begin{cases} x&x>0 \\ 0&x0 \end{cases}$ | ${{x = \begin{cases} x&x>0 \\ 0&x\le 0 \end{cases}}}$ |
| $x^f(x)$ | ${{x^{f(x)}}}$ |
| $.3+1.404^3.12$ | ${{.3+1.404^{3.12}}}$ |
| $df_1/dt = t^2$ | ${{\text{d}f_1/\text{d}t = t^2}}$ |
| $x[1,3)$ | ${{x\in[1,3)}}$ |
| $x[a+β,7]$ | ${{x\in[a+\beta,7]}}$ |
| $x(3,7]$ | ${{x\in(\sqrt{3},\sqrt{7}]}}$ |
| $f'(V)$ | ${{f'(V)}}$ |
| $f''(V)$ | ${{f''(V)}}$ |
| $f'''(V)$ | ${{f'''(V)}}$ |
| $xy^xy$ | ${{xy^{xy}}}$ |
| $wx_xy^yz$ | ${{wx^{yz}_{xy}}}$ |
| $xy^2$ | ${{xy^{xy}}}$ |
| $2^xy$ | ${{xy^{xy}}}$ |
| $xy^xy_3$ | ${{xy^{yx}_{y}}}$ |
| $sin^2(x)$ | ${{\text{sin}^2(x)}}$ |
| $sin^-1(x)$ | ${{\text{sin}^{-1}(x)}}$ |

# What still doesn't work


| Expression | Expected |
|------------+----------|
| $sin^xy(x)$ | ${{\text{sin}^{xy}(x)}}$ |
| $sin_2^n(x)$ | ${{sin_2^n(x)}}$ |
| $f_n(x)$ | ${{f_n(x)}}$ |