This post tests various functionality.

Mathematics

Let’s start with some inline math eiπ+1=0e^{i\pi} + 1 = 0.

Here’s a display equation—the Cauchy-Schwarz inequality in a :

x,y2x,xy,y|\langle x, y \rangle|^2 \leq \langle x, x \rangle \cdot \langle y, y \rangle

The definition of the operator norm in a :

T=supx1Tx=supx0Txx\|T\| = \sup_{\|x\| \leq 1} \|Tx\| = \sup_{x \neq 0} \frac{\|Tx\|}{\|x\|}

Code Blocks

Python

import numpy as np
from scipy.linalg import norm

def gram_schmidt(vectors):
    """Orthonormalize a set of vectors using Gram-Schmidt."""
    basis = []
    for v in vectors:
        w = v - sum(np.dot(v, b) * b for b in basis)
        if norm(w) > 1e-10:
            basis.append(w / norm(w))
    return np.array(basis)

# Example: orthonormalize R^3 vectors
V = np.array([[1, 1, 0], [1, 0, 1], [0, 1, 1]], dtype=float)
Q = gram_schmidt(V)
print(Q @ Q.T)  # Should be approximately identity
/-- A vector space over a field K -/
class VectorSpace (K : Type*) (V : Type*) [Field K] extends AddCommGroup V, Module K V

/-- The dual space of a vector space -/
def DualSpace (K : Type*) (V : Type*) [Field K] [AddCommGroup V] [Module K V] :=
  V →ₗ[K] K

theorem dual_dual_iso (K : Type*) (V : Type*) [Field K] [AddCommGroup V] [Module K V]
    [FiniteDimensional K V] :
    FiniteDimensional.finrank K (DualSpace K (DualSpace K V)) = FiniteDimensional.finrank K V := by
  simp [DualSpace, LinearMap.finrank_linearMap]

Lorem Ipsum

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.

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.