# Iteration Fixed Point Exercises

This is the third of three sets of fixed point exercises. The first post in this sequence is [here](https://www.lesswrong.com/posts/mojJ6Hpri8rfzY78b/fixed-point-theorems), giving context.

Note: Questions 1-5 form a coherent sequence and questions 6-10 form a separate coherent sequence. You can jump between the sequences.

1. Let $(X,d)$ be a complete metric space. A function $f:X\rightarrow X$ is called a contraction if there exists a $q<1$ such that for all $x,y\in X$, $d(f(x),f(y))\leq q\cdot d(x,y)$. Show that if $f$ is a contraction, then for any $x$, the sequence $\{x_n=f^n(x_0)\}$ converges. Show further that it converges exponentially quickly (i.e. the distance between the $n$th term and the limit point is bounded above by $c\cdot a^n$ for some $a<1$)

2. (Banach contraction mapping theorem) Show that if $(X,d)$ is a complete metric space and $f$ is a contraction, then $f$ has a unique fixed point.

3. If we only require that $d(f(x),f(y))< d(x,y)$ for all $x\neq y$, then we say $f$ is a weak contraction. Find a complete metric space $(X,d)$ and a weak contraction $f:X\rightarrow X$ with no fixed points.

4. A function $f:\mathbb{R}^n\rightarrow \mathbb{R}$ is convex if $f(tx+(1-t)y)\leq tf(x)+(1-t)f(y)$, for all $t\in[0,1]$ and $x,y\in\mathbb{R}^n$. A function $f$ is strongly convex if you can subtract a positive parabaloid from it and it is still convex. (i.e. $f$ is strongly convex if $x\mapsto f(x)-\varepsilon||x||^2$ is convex for some $\varepsilon>0$.) Let $f$ be a strongly convex smooth function from $\mathbb{R}^n$ to $\mathbb{R}$, and suppose that the magnitude of the second derivative $\Vert \nabla^2 f \Vert$ is bounded. Show that there exists an $\varepsilon>0$ such that the function $g:\mathbb{R}^n\rightarrow \mathbb{R}^n$ given by $x\mapsto x-\varepsilon(\nabla f)(x)$ is a contraction. Conclude that gradient descent with a sufficiently small constant step size converges exponentially quickly on a strongly convex smooth function.

5. A finite stationary Markov chain is a finite set $S$ of states, along with probabilistic rule $A: S \rightarrow \Delta S$ for transitioning between the states, where $\Delta S$ represents the space of probability distributions on $S$. Note that the transition rule has no memory, and depends only on the previous state. If for any pair of states $s,t \in \Delta S$, the probability of passing from $s$ to $t$ in one step is positive, then the Markov chain $(S, A)$ is ergodic. Given an ergodic finite stationary Markov chain, use the Banach contraction mapping theorem to show that there is a unique distribution over states which is fixed under application of transition rule. Show that, starting from any state $s$, the limit distribution $\lim_{n \to \infty} A^n(s)$ exists and is equal to the stationary distribution.

6. A function $f$ from a partially ordered set to another partially ordered set is called monotonic if $x\leq y$ implies that $f(x)\leq f(y)$. Given a partially ordered set $(P,\leq)$ with finitely many elements, and a monotonic function from $P$ to itself, show that if $f(x)\geq x$ or $f(x)\leq x$, then $f^n(x)$ is a fixed point of $f$ for all $n>|P|$.

7. A complete lattice $(L,\leq)$ is a partially ordered set in which each subset of elements has a least upper bound and greatest lower bound. Under the same hypotheses as the previous exercise, extend the notion of $f^n(x)$ for natural numbers $n$ to $f^\alpha(x)$ for ordinals $\alpha$, and show that $f^\alpha(x)$ is a fixed point of $f$ for all $x\in X$ with $f(x)\leq x$ or $f(x)\geq x$ and all $|\alpha|>|L|$ ($|A|\leq|B|$ means there is an injection from $A$ to $B$, and $|A|>|B|$ means there is no such injection).

8. (Knaster-Tarski fixed point theorem) Show that the set of fixed points of a monotonic function on a complete lattice themselves form a complete lattice. (Note that since the empty set is always a subset, a complete lattice must be nonempty.)

9. Show that for any set $A$, $(\mathcal{P}(A),\subseteq)$ forms a complete lattice, and that any injective function from $A$ to $B$ defines a monotonic function from $(\mathcal{P}(A),\subseteq)$ to $(\mathcal{P}(B),\subseteq)$. Given injections $f:A\xrightarrow{} B$ and $g:B\xrightarrow{} A$, construct a subset $A^\prime$ of $A$ and a subset of $B^\prime$ of $B$ such that $B^\prime=f(A^\prime)$ and $A-A^\prime=g(B-B^\prime)$.

10. (Cantor–Schröder–Bernstein theorem) Given sets $A$ and $B$, show that if $|A|\leq |B|$ and $|A|\geq |B|$, then $|A|=|B|$. ($|A|\leq |B|$ means there is an injection from $A$ to $B$, and $|A|=|B|$ means there is a bijection)

***

_Please use the spoilers feature - the symbol '>' followed by '!' followed by space -in your comments to hide all solutions, partial solutions, and other discussions of the math. The comments will be moderated strictly to hide spoilers!_

_I recommend putting all the object level points in spoilers and including metadata outside of the spoilers, like so: "I think I've solved problem #5, here's my solution <spoilers>" or "I'd like help with problem #3, here's what I understand <spoilers>" so that people can choose what to read._

***

_Tomorrow's AI Alignment Forum Sequences post will be "Approval-directed agents: overview" by Paul Christiano in the sequence Iterated Amplification._

_The next post in this sequence will be released on Saturday 24th November, and will be 'Fixed Point Discussion'._