Skip to content

Commit

Permalink
Deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
semapheur committed May 7, 2024
1 parent 6968afc commit 8640137
Show file tree
Hide file tree
Showing 19 changed files with 1,184 additions and 1,038 deletions.
2 changes: 1 addition & 1 deletion content/notes/machine_learning/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Machine learning techniques can be divided into three categories:

# Probably approximately correct (PAC) learning framework

Let $X$ be the set of all possible examples, also referred to as the input space, and let $Y$ be the set of all possible labels or target values. A *concept* is a mapping $c:X\to Y$, while a concept class $C$ is a set of concepts that can be learnt. We assume that the examples are independently and identically distributed (i.i.d.) according to some fixed yet unknown distribution $D$.
Let $X$ be the set of all possible examples, also referred to as the input space, and let $Y$ be the set of all possible labels or target values. A *concept* is a mapping $c:X\to Y$, while a concept class $C$ is a set of concepts that can be learnt. We assume the examples are independently and identically distributed (i.i.d.) according to some fixed yet unknown distribution $D$.

The learning problem is formulated as follows. The learner considers a fixed set of possible concepts $H$, called a *hypothesis set*, which may not coincide with $C$. It receives a samle $S = (x_1,\dots,x_n)$ drawn i.i.d. according to $D$ as well as the labels $(c(x_1),\dots,c(x_n))$, which are based on a specific target concept $c \in C$ to learn. Its task is use the labeled sample $S$ to select a hypothesis $h_s \in H$ that has a small *generalization error* with respect to the concept $c$.

Expand Down
150 changes: 148 additions & 2 deletions content/notes/math/algebra.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ If every component $\alpha_A$ is invertible in $\mathcal{B}$, then $\alpha$ is c

## Universality
<MathBox title='Universal morphism' boxType='definition'>
Let $F:\mathcal{A}\to\mathcal{B}$ be a functor between categories $\mathcal{A}$ and $\mathcal{B}$ and suppose that $B\in\mathcal{B}$ is an object in $\mathcal{B}$. A *universal morphism* from $B$ to $F$ is a pair $(A, u: B\to F(A))$ of an object $A\in\mathcal{A}$ and a morphism $u\in\mathcal{D}(B,F(B))$ satisfying the *universal property*:
Let $F:\mathcal{A}\to\mathcal{B}$ be a functor between categories $\mathcal{A}$ and $\mathcal{B}$ and suppose $B\in\mathcal{B}$ is an object in $\mathcal{B}$. A *universal morphism* from $B$ to $F$ is a pair $(A, u: B\to F(A))$ of an object $A\in\mathcal{A}$ and a morphism $u\in\mathcal{D}(B,F(B))$ satisfying the *universal property*:
- for any pair $(A', f)$ with $A'\in\mathcal{A}$ and $f\in\mathcal{B}(B,F(A'))$, there is a unique morphism $h:A\to A'$ in $\mathcal{A}$ such that $f = F(h) \circ u$ according to following diagram.

<LatexFig width={50} src='/fig/universal_property.svg' alt=''
Expand Down Expand Up @@ -334,4 +334,150 @@ Let $\mathcal{I}$ be a subset of ring $R$. An additive subgroup of $R$ is called
A left ideal that is also a right ideal, is called a *(two-sided) ideal* of $R$. An ideal is *proper* if $\mathcal{I} \neq R$, and it is *non-trivial* if in addition $\mathcal{I}\neq 0$.
</MathBox>

<MathBox title='Proper and non-trivial ideal' boxType='definition'>
<MathBox title='Kernels of ring homomorphisms' boxType='definition'>
If $f:R\to S$ is a ring homomorphism, its kernel is defined as

$$
\ker(f) = \Set{r\in R | f(r) = 0}
$$
</MathBox>

<MathBox title='Kernels of ring homomorphisms are proper ideals' boxType='proposition'>
The kernel of a ring homomorphism $f:R\to S$ is a proper two-sided ideal.

<details>
<summary>Proof</summary>

Since a ring homomorphism is a group homomorphism, we already know that $f$ is injective if and only if $\ker(f) = \Set{0}$. Note that $\ker(f)$ is an additive subgroup of $R$. Take $a\in\ker(f)$ and $r\in R$, then

$$
\begin{align*}
f(ra) =& f(r)f(a) = 0 \\
f(ar) =& f(a)f(r) = 0
\end{align*}
$$

showing that $\ker(f)$ is a two-sided ideal since $ra, ar\in\ker(f)$. Moreover, $\ker(f)$ has to be proper, i.e. $\ker(f) \neq R$, since $f(1) = 1$ by definition.
</details>
</MathBox>

<MathBox title='' boxType='lemma'>
Suppose $f:R\to S$ is a ring homomorphism and the only two-sided ideals of $R$ are $\Set{0}$ and $R$. Then $f$ is injective.

<details>
<summary>Proof</summary>

Since $\ker(f)$ is a two-sided ideal of $R$, then either $\ker(f) = \Set{0}$ or $\ker(f) = R$. However, $\ker(f) \neq R$ since $f(1) = 1$ by defininition.
</details>
</MathBox>

It is worth noting the analogy between rings and their two-sided ideals on one hand, and groups and their normal subgroups on the other hand:
- Two-sided ideals are stable when the ring acts on them by multiplication, either on the right or on the left, and thus
$$
rar^{-1} \in\mathcal{I}, a\in\mathcal{I}, r\in R
$$
while normal subgroups are stable when the groups on them by conjugation
$$
ghg^{-1} \in H, h\in H, g\in G (H \leq G)
$$
- Groups with only trivial normal subgroups are called simple. Similarly, rings with only two sided ideals are called simple rings.
- The kernel of a group homomorphism is a normal subgroup, while the kernel of a ring homomorphism is an ideal.

## Quotient rings

Let $\mathcal{I}$ be a proper two-sided ideal of $R$. Since $\mathcal{I}$ is an additive subgroup of $R$ by definition, it makes sense to speak of cosets $r + \mathcal{I}$ of $I$ for $r\in R$. Furthermore, a ring has a structure of abelian group for addition, so $\mathcal{I}$ satisfies the definition of a normal subgroup. From group theory, we that it makes sense to speak of the quotient group

$$
R\setminus\mathcal{I} = \Set{r + \mathcal{I} | r\in R}
$$

which is abelian since $(R, +)$ is an abelian group. We now endow $R\setminus\mathcal{I}$ with a multiplication operation defined as

$$
(r + \mathcal{I})(r + \mathcal{I}) = rs + \mathcal{I}
$$

To see that it is well-defined, we check that it does not depend on the choice of the representative in each coset. Suppose

$$
\begin{align*}
r + \mathcal{I} =& r' + \mathcal{I} \\
s + \mathcal{I} =& s' + \mathcal{I}
\end{align*}
$$

so that $a = r' - r\in\mathcal{I}$ and $b = s' - s\in\mathcal{I}$. Then

$$
r's' = (a + r)(b + s) = ab + as + rb + rs
$$

Since $a, b\in\mathcal{I}$ and $\mathcal{I}$ is an ideal, it follows that $ab, as, rb\in\mathcal{I}$. Consequently, $r's' \in rs + \mathcal{I}$ and therefore multiplication does not depend on the choise of representatives.

Note that this is only true if $\mathcal{I}$ is a two-sided ideal, otherwise we could not have concluded that both $as$ and $rb$ are in $\mathcal{I}$.

<MathBox title='Quotient ring' boxType='definition'>
The set of cosets of the two-sided ideal $\mathcal{I}$ given by

$$
R\setminus\mathcal{I} = \Set{r + \mathcal{I} | r\in R}
$$

is a ring with identity $1_R + \mathcal{I}$ and zero element $0_R + \mathcal{I}$ called a *quotient ring*.
</MathBox>

<MathBox title='' boxType='proposition'>
Every proper two-sided ideal $\mathcal{I}$ is the kernel of a ring homomorphism.

<details>
<summary>Proof</summary>

Consider the canonical projection $\pi:R\to R\setminus\mathcal{I}$ defined by $r\mapsto\pi(r) = r + \mathcal{I}$. We already know that $\pi$ is a group homomorphism, and that its kernel is $\mathcal{I}$. We are only left to that $\pi$ is a ring homomorphism. Since $\mathcal{I}$ is a two-sided ideal, $R\setminus\mathcal{I}$ is a ring. Moreover, for $r, s\in R$

$$
\pi(rs) = rs + \mathcal{I} = (r + \mathcal{I})(s + \mathcal{I}) = \pi(r)\pi(s)
$$

Finally, $\pi(1_R) = 1_R + \mathcal{I}$ which is indeed the identity element of $R\setminus\mathcal{I}$.
</details>
</MathBox>

<MathBox title='Factor theorem for rings' boxType='theorem'>
Any ring homomorphism $f$ whose kernel $\ker(f)$ contains $\mathcal{I}$ can be factored through $R\setminus\mathcal{I}$. In other words, there is a unique ring homomorphism $\bar{f}:R\setminus\mathcal{I}\to S$ such that $\bar{f}\circ\pi = f$, where $\pi:R\to R\setminus\mathcal{I}$ is the canonical projection. Furthermore,
1. $\bar{f}$ is an epimorphism if and only if $f$ is
2. $\bar{f}$ is a monomorphism if and only if $\ker(f) = \mathcal{I}$
3. $\bar{f}$ is an isomorphism if and only if $f$ is an epimorphism and $\ker(f) = \mathcal{I}$

<details>
<summary>Proof</summary>

Let $a + \mathcal{I}\in R\setminus\mathcal{I}$ such that $\pi(a) = a + \mathcal{I}$ for $a\in R$, and define

$$
\bar{f}(a + \mathcal{I}) = f(a)
$$

We need check that $\bar{f}$ is well defined in the sense that it should not depend on the choice of the representative taken in the coset. Take another representative, say $b \in a + \mathcal{I}$. Since $a$ and $b$ are in the same coset, they satisfy $a - b \in \mathcal{I} \subset\ker(f)$. Because $a - b \in\ker(f)$, we have $f(a - b) = 0$ and thus $f(a) = f(b)$.

Now that $\bar{f}$ is well defined, it remains to verify that $\bar{f}$ inherits the property of the ring homomorphism from $f$. The rest of the proof works exactly the same as for groups.

</details>
</MathBox>

<MathBox title='First isomorphism theorem for rings' boxType='theorem'>
If $f:R\to S$ is a ring homomorphism with kernel $\ker(f)$, then the range of $f$ is isomorphic to $R\setminus K$:

$$
\operatorname(f) \cong R\setminus\ker(f)
$$

<details>
<summary>Proof</summary>

By the factor theorem $\bar{f}: R\setminus\ker(f)\to S$ is an isomorphism if and only if $f$ is an epimorphism, and clearly $f$ is an epimorphism on its image, which concludes the proof.
</details>
</MathBox>

## The Chinese remainer theorem

## Maximal and prime ideals
4 changes: 2 additions & 2 deletions content/notes/math/complex_analysis.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ $$
$$

<MathBox title='Proposition' boxType='proposition'>
Suppose that $f: \mathbb{C} \to \mathbb{C}$ is holomorphic. Then $\frac{\partial f}{\partial z} = f'(z)$ and $\frac{\partial f}{\partial \bar{z}} = 0$.
Suppose $f: \mathbb{C} \to \mathbb{C}$ is holomorphic. Then $\frac{\partial f}{\partial z} = f'(z)$ and $\frac{\partial f}{\partial \bar{z}} = 0$.

<details>
<summary>Proof</summary>
Expand Down Expand Up @@ -938,7 +938,7 @@ The theorem can be equivalently stated in terms of the function $h:= f - g$ with
The proposition (1) $\implies$ (2) is trivial.

**(1) $\implies$ (3)**
The proposition $(1) \implies (3)$ can be shown by contraposition. Assume that for each $c\in D$ there is a minimal $m$ with $h^{(n)}(c) \neq 0$ and
The proposition $(1) \implies (3)$ can be shown by contraposition. Assume for each $c\in D$ there is a minimal $m$ with $h^{(n)}(c) \neq 0$ and

$$
h(z) = \sum_{k=m}^\infty \frac{h^{(k)}(c)}{k!}(z - c)^k
Expand Down
12 changes: 6 additions & 6 deletions content/notes/math/dynamics.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ In both cases, the suspended evolutions are periodic. In the first case where $\
A Poincaré map can be thought of as an inverse of the suspension construction. Considering a dynamical system with time set $\R$, given by a differential equation $x' = f(x)$. Further assuming that in the state space $\mathcal{M}$ there is a submanifold $S \subset \mathcal{M}$ of codimension $1$ (meaning that $\dim \mathcal{M} = \dim S + 1$), with the following properties

1. For all $x \in S$ the vector $f(x)$ is transversal to $S$, ie. not tangent to $S$.
2. For any point $x \in S$ there exist real numbers $t_-(x) < 0 < t_+ (x)$ such that $\Phi(x, t_-) \in S$ and $\Phi(x, t_+) \in S$. We call $t_-(x)$ and $t_+(x)$ return times and subsequently we assume that both have been choosen with minimal absolute value. This means that, due to transversality (and the Implicit Function Theorem) both $t_-$ and $t_+$ are differentiable.
2. For any point $x \in S$ there exist real numbers $t_-(x) < 0 < t_+ (x)$ such that $\Phi(x, t_-) \in S$ and $\Phi(x, t_+) \in S$. We call $t_-(x)$ and $t_+(x)$ return times and subsequently we assume both have been choosen with minimal absolute value. This means that, due to transversality (and the Implicit Function Theorem) both $t_-$ and $t_+$ are differentiable.

In the above setting we define diffeomorphism

Expand Down Expand Up @@ -907,13 +907,13 @@ which is non-oscillating.

**Theorem:** If $p(t) \leq 0 \, \forall t \in I$, then all non-trivial solutions of $\ddot{z} + p(t)z = 0$ are non-oscillating on $I$. If $p(t) > 0 \, \forall t \in I$, then all non-trivial solutions are oscillating.

Let a solution $Z(t) \neq 0$ have at least two zeroes on $I$ and let $t_0$ and $t_1$ with $t_0 < t_1$ be two of them. Suppose $Z(t)$ has no zeroes in the interval $(t_0, t_1)$. Since $Z(t)$ is continuous, it has the same sign in $(t_0, t_1)$. Without loss of generality, we assume that $Z(t) > 0$ in $(t_0, t_1)$. Thus, $Z(t)$ has a maxiumum at some $c \in (t_0, t_1)$, and consequently $\ddot{Z}(t) < 0$ in some neighbourhood of $c$. However, if $p(t) \leq 0$, then it follows that $\ddot{Z}(t) \geq 0$ in the neighbourhood of $c$, which gives a contradiction. Therefore $Z(t)$ cannot have two or more zeroes on $I$, making it non-oscillating.
Let a solution $Z(t) \neq 0$ have at least two zeroes on $I$ and let $t_0$ and $t_1$ with $t_0 < t_1$ be two of them. Suppose $Z(t)$ has no zeroes in the interval $(t_0, t_1)$. Since $Z(t)$ is continuous, it has the same sign in $(t_0, t_1)$. Without loss of generality, we assume $Z(t) > 0$ in $(t_0, t_1)$. Thus, $Z(t)$ has a maxiumum at some $c \in (t_0, t_1)$, and consequently $\ddot{Z}(t) < 0$ in some neighbourhood of $c$. However, if $p(t) \leq 0$, then it follows that $\ddot{Z}(t) \geq 0$ in the neighbourhood of $c$, which gives a contradiction. Therefore $Z(t)$ cannot have two or more zeroes on $I$, making it non-oscillating.

### Separation of successive roots

**Sturm's separation theorem:** Let $t_0$ and $t_1$ be two successive zeroes of a of a nontrivial solution $x_1(t)$ and let $x_2(t)$ be another linearly independent solution of that equation. Then there exists exactly one zero $x_2(t)$ between $t_0$ and $t_1$, that is, the zeroes of two linearly independent solutions separate each other. It at least on solution has more than two zeroes on $I$, then all the solution are oscillating on $I$.

Without loss of generality, we assume that $t_0 < t_1$. Suppose that $x_2 (t)$ has no zeroes in the interval $(t_0, t_1)$. Since $x_1(t)$ and $x_2 (t)$ are linearly independent, and $x_1(t)$ has two zeroes $t_0$ and $t_1$ in $I$, then $x_2 (t)$ does not vanish at $t_0, t_1$. Then the Wronskian
Without loss of generality, we assume $t_0 < t_1$. Suppose $x_2 (t)$ has no zeroes in the interval $(t_0, t_1)$. Since $x_1(t)$ and $x_2 (t)$ are linearly independent, and $x_1(t)$ has two zeroes $t_0$ and $t_1$ in $I$, then $x_2 (t)$ does not vanish at $t_0, t_1$. Then the Wronskian

$$
W(x_1, x_2; t) = \begin{vmatrix} x_1(t) & x_2(t) \\ \dot{x}_1(t) & \dot{x}_2(t) \end{vmatrix} = x_1(t)\dot{x}_2(t) - x_2(t)\dot{x}_1(t)
Expand Down Expand Up @@ -1382,7 +1382,7 @@ $$

Newton's fixed point theorem states that a $r$ is a root of multiplicity $k > 0$ for $f$ if and only if $r$ is a fixed point of $N_f$. Such a fixed point is always attracting. This ensures that the Newton-Raphson method converges to any root of $f$.

Suppose that $f(r) = 0$, but $f'(r) \neq 0$ meaning that the root $r$ has multiplicity $1$ (simple root). Then we have $N_f (r) = r$ so that $r$ is a fixed point of $N$. Conversely, if $N(r) = 0$ we must also have $f(r) 0$.
Suppose $f(r) = 0$, but $f'(r) \neq 0$ meaning that the root $r$ has multiplicity $1$ (simple root). Then we have $N_f (r) = r$ so that $r$ is a fixed point of $N$. Conversely, if $N(r) = 0$ we must also have $f(r) 0$.

To see that $r$ is an attracting fixed point, we find the derivative $N_f$ using the quotient rule

Expand All @@ -1392,7 +1392,7 @@ $$

Evidently, $N'(r) = 0 < 1$ so that $r$ is a attracting point by definition.

If $f'(r) = 0$, suppose that $r$ has multiplicity $k > 1$. Thus we may write
If $f'(r) = 0$, suppose $r$ has multiplicity $k > 1$. Thus we may write

$$
f(x) = (x - r)^k G(x)
Expand Down Expand Up @@ -1991,7 +1991,7 @@ $$
$$

The Fourier series can be truncated to finite series by applying appropriate boundary condition, known as the Galerkin procedure. The temperature deviation function must vanish at the lower and upper boundary surfaces, i.e.
$T = 0$ for $z=0$ and $z=1$. For the streamfunction, we assume that the vertical velocity vanishes at the boundary surfaces. Additionally, we assume that we can neglect any shear forces at the boundaries. These forces are proportional to the gradient of the tangential velocity component. This condiction translates into having $\frac{\partial v_x}{\partial z} = 0$ at $z=0$ and $z=1$. These boundary conditions are satisfied by a single term expansion for $\psi$ and a two term expansion for $T$
$T = 0$ for $z=0$ and $z=1$. For the streamfunction, we assume the vertical velocity vanishes at the boundary surfaces. Additionally, we assume we can neglect any shear forces at the boundaries. These forces are proportional to the gradient of the tangential velocity component. This condiction translates into having $\frac{\partial v_x}{\partial z} = 0$ at $z=0$ and $z=1$. These boundary conditions are satisfied by a single term expansion for $\psi$ and a two term expansion for $T$

$$
\begin{align*}
Expand Down
Loading

0 comments on commit 8640137

Please sign in to comment.