M3 Shortcodes Stress Test

This page stress-tests all m3 shortcodes with nesting, markup, and edge cases.

Basic Shortcodes

Definition

Definition

A group is a set \(G\) together with a binary operation \(\cdot : G \times G \to G\) satisfying:

  1. Associativity: \((a \cdot b) \cdot c = a \cdot (b \cdot c)\)
  2. Identity: There exists \(e \in G\) such that \(e \cdot a = a \cdot e = a\)
  3. Inverses: For each \(a \in G\), there exists \(a^{-1}\) such that \(a \cdot a^{-1} = a^{-1} \cdot a = e\)

Theorem

Theorem

Lagrange’s Theorem: Let \(G\) be a finite group and \(H \leq G\) a subgroup. Then \(|H|\) divides \(|G|\).

Lemma

Lemma

If \(H \leq G\) and \(a, b \in G\), then either \(aH = bH\) or \(aH \cap bH = \emptyset\).

Corollary

Corollary

The order of any element in a finite group divides the order of the group.

Proposition

Proposition

Every group of prime order is cyclic.

Remark

Remark

The converse of Lagrange’s theorem is not true in general. For example, \(A_4\) has order 12 but no subgroup of order 6.

Example

Example

Consider \(\mathbb{Z}_6 = \{0, 1, 2, 3, 4, 5\}\) under addition modulo 6.

  • The subgroups are: \(\{0\}\), \(\{0, 3\}\), \(\{0, 2, 4\}\), and \(\mathbb{Z}_6\) itself.
  • Their orders (1, 2, 3, 6) all divide \(|\mathbb{Z}_6| = 6\).

Proof

Proof

Let \([G:H] = n\) be the index of \(H\) in \(G\). The cosets \(a_1H, a_2H, \ldots, a_nH\) partition \(G\), and each coset has \(|H|\) elements. Thus \(|G| = n \cdot |H|\), so \(|H| \mid |G|\). \(\square\)

Hint

Hint

Try using the orbit-stabilizer theorem and count carefully.

Sketch

Proof Sketch

The key insight is that cosets partition the group. Count elements in each coset.

Answer

Answer

The answer is \(\boxed{42}\).

Nested Problem-Solution Structure

Basic Nesting

Problem

Show that \(\mathcal{G} = \left\{ \begin{bmatrix} 1 & x & y \\ 0 & 1 & z \\ 0 & 0 & 1 \end{bmatrix} : x, y, z \in \mathbb{R} \right\}\) is a group under matrix multiplication.

Solution

Let \(A_1 = \begin{bmatrix} 1 & x_1 & y_1 \\ 0 & 1 & z_1 \\ 0 & 0 & 1 \end{bmatrix}\) and \(A_2 = \begin{bmatrix} 1 & x_2 & y_2 \\ 0 & 1 & z_2 \\ 0 & 0 & 1 \end{bmatrix}\in \mathcal{G}\).

Then \(A_1 A_2 =\begin{bmatrix} 1 & x_1+x_2 & y_1+x_1z_2+y_2 \\ 0 & 1 & z_1+z_2 \\ 0 & 0 & 1 \end{bmatrix}\in\mathcal{G}\), so we have closure.

Associativity follows from the associativity of standard matrix multiplication.

Letting \(x=y=z=0\), observe that the identity is in \(\mathcal{G}\).

Finally, if we take \(x_2 = -x_1\), \(z_2 = -z_1\), and \(y_2 = -y_1-x_1z_2\), then \(A_1A_2 = I_3\), and thus inverses are of the required form! Therefore, \(\mathcal{G}\) is a group.

Subproblem Nesting

Problem

Solve the following:

Find all \(x\) such that \(x^2 \equiv 1 \pmod{8}\).

Solution

Testing \(x = 0, 1, \ldots, 7\):

  • \(1^2 = 1 \equiv 1\)
  • \(3^2 = 9 \equiv 1\)
  • \(5^2 = 25 \equiv 1\)
  • \(7^2 = 49 \equiv 1\)

So \(x \in \{1, 3, 5, 7\}\).

Determine if \((\mathbb{Z}/8\mathbb{Z})^*\) is cyclic.

Hint

Count elements and check if there’s an element of order 4.

Answer

No, \((\mathbb{Z}/8\mathbb{Z})^* \cong \mathbb{Z}_2 \times \mathbb{Z}_2\) is not cyclic.

Deeply Nested Structures

Theorem

Fundamental Theorem of Finitely Generated Abelian Groups

Every finitely generated abelian group \(G\) is isomorphic to: \[G \cong \mathbb{Z}^r \oplus \mathbb{Z}_{n_1} \oplus \mathbb{Z}_{n_2} \oplus \cdots \oplus \mathbb{Z}_{n_k}\] where \(r \geq 0\) and \(n_1 | n_2 | \cdots | n_k\).

Proof

We prove this in several steps.

Lemma

Every subgroup of \(\mathbb{Z}^n\) is free of rank at most \(n\).

Using this lemma, we proceed by induction on the number of generators.

Remark

The numbers \(n_1, \ldots, n_k\) are called the invariant factors of \(G\). They are unique up to ordering.

The base case \(n=1\) is trivial. For the inductive step, consider the quotient…

\(\blacksquare\)

TikZ Integration Test

Problem

Draw a commutative diagram showing the factory pattern.

Solution

Here is the UML diagram:

This demonstrates the Factory Method pattern where:

  • Creator declares the factory method
  • ConcreteCreator implements it
  • Products are created through the factory method

Edge Cases

Empty Content

Special Characters

Example

Testing special chars: \(\alpha\), \(\beta\), \(\gamma\), \(\delta\), \(\epsilon\)

LaTeX environments:

\begin{align} e^{i\pi} + 1 &= 0 \\ \int_0^\infty e^{-x^2} dx &= \frac{\sqrt{\pi}}{2} \end{align}

Code-like content: inline code, verbatim

def factorial(n):
    return 1 if n <= 1 else n * factorial(n-1)

Long Content

Remark

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

This tests how the shortcode handles longer content that might wrap across multiple lines and paragraphs.

  • Item 1
  • Item 2
  • Item 3
Column 1Column 2Column 3
ABC
DEF

Multiple Counters Test

Theorem

First theorem.

Definition

First definition.

Theorem

Second theorem (should be numbered 2).

Lemma

First lemma.

Definition

Second definition (should be numbered 2).

Corollary

First corollary.

Example

First example.

Theorem

Third theorem (should be numbered 3).