TITLE: If $p$ is a closed point then $X-p$ is not an affine scheme
QUESTION [2 upvotes]: Let $A$ be an integral, finitely-generated algebra over some field $k$, of dimension $\text{dim}(A)\geq2$ such that $A = \cap_Q A_Q$ where $Q$ runs over elements of $\text{Spec}A$ of height $1$. Let $X = \text{Spec}A$ and $p \in X$ be a closed point, i.e. a maximal ideal of $A$.

Show that the open set $X-p$ can't be an affine scheme.

I know of a solution which I don't quite understand. It goes like this:

Let $U = X-p$. If $U$ were affine, then the open immersion $U
\rightarrow X$, which isn't an isomorphism, wouldn't induce an
  isomorphism $\varphi:O_X(X) \rightarrow O_X(U)...$

Here I assume the antiequivalence of categories $\text{(opposite category of rings)}A^{opp} \rightarrow \text{Spec}A \text{ (category of affine schemes)}$
was used to go from $U \rightarrow X$ to $O_X(X)\rightarrow O_U(U) = O_X(U)$ between the associated rings, since we know that $O_{\text{Spec R}}(\text{Spec}R)=O(D(1))=R_1=R$ for any affine scheme over a ring $R$.
Since $U \rightarrow X$ does not have a reciprocal, neither does $\varphi$ which therefore isn't an isomorphism.

... But $\varphi$ is injective because $X$ is integral, and surjective
  because an element of $O_X(U)$ belongs to every $A_Q$ with $Q$ prime
  of height $1$ since $p$ is maximal of height $\geq 2$

Here I guess that $\varphi$ is just the restriction because inferring from inclusion properties one can conclude $\varphi$ follows the restriction axioms
If it really is the restriction, then it is common knowledge that since $X$ is integral, $\varphi$ is injective, as is the case of restrictions on an integral scheme.
Due to the dimension formula for finitely-generated $k$-algebras, I understand that $p$ has height $\geq2$. In particular, this means that $U$ contains all of the $Q$ prime ideals of height $1$. But I don't get how elements of $O_X(U)$ belong to $A_Q$. I can send them to $A_Q$ by considering the stalk at $Q$ but I don't see how it implies surjectivity. If the restriction is a set restriction from $A$ to some subring of $A$ then it is indeed surjective but I don't know what $\varphi$ does
Can somebody please explain about the surjectivity part? Why is $\varphi:\cap A_Q \rightarrow O_X(U)$ surjective?

REPLY [1 votes]: We want to show that $\mathcal O_X(U)\hookrightarrow A_Q,\,\forall Q$ prime of height $1$. We can show this by considering the elements of $\mathcal O_X(U)$ as follows.
The idea is to find an open cover of $U$ by standard opens of the form $D(f)$.
For every prime ideal $q\subseteq A$ not equal to $p$, choose some $f_q\in p\setminus p\cap q$ (here $p\not=p\cap q$ since $p\not\subseteq q$, so $p\setminus p\cap q\not=\emptyset$). Then $p\not\in D(f_q)$ and $q\in D(f_q)$ by definition.
So $U=\bigcup_{q\not=p}D(f_q)$, and by the sheaf property of $\mathcal O_X$, we can write $\mathcal O_X(U)$ as $$\{(a_q)_q\mid a_q\in \mathcal O_X(D(f_q))=A_{f_q},\, a_q=a_{q'}\text{ on }D(f_q)\cap D(f_{q'})\}.$$
Now we can embed $\mathcal O_X(U)$ in $A_Q$ for every $Q\in U$ by sending $(a_q)_q$ to $(a_q)_Q$, the image of $a_q$ in the stalk $A_Q$ for some $Q\in D(f_q)$. Note that if $Q\in D(f_q)\cap D(f_{q'})$, then $(a_q)_Q=(a_{q'})_Q$ by the description of $\mathcal O_X(U)$, so the map is well-defined.
And this is an injection: say $(a_q)_Q=0$ for some $Q\in U$. Then by definition of localization there is some $g\not\in Q$ such that $ga_q=0$. Since $A$ is an integral domain this implies that $a_q=0$. Now for any $q'$, we see $a_{q'}=a_q$ on $D(f_qf_{q'})$. So there is $n$ such that $(f_qf_{q'})^n(a_q-a_q')=0$. Since $a_q=0$, this shows that $a_{q'}=0,\,\forall q'\in U$.
Hence $\mathcal O_X(U)\hookrightarrow A_Q,\,\forall Q$ prime of height $1$.

Hope this helps.


TITLE: CNF formula for manipulating words
QUESTION [0 upvotes]: I am trying to create CNF formula for manipulation of a word.  word is a sequence of letters from a $\Sigma$ alphabet. A word is encoded by variables like $x_{i,a}$ which means that the letter $a$ is at position $i$.
So there is these two questions that I am interested in:

How to write a formula in CNF that expresses that the word does not contain any $b$ on it?
So far I have come up with thise but I am not sure if it is true:
$$\bigwedge_{i=1}^n \; (\bigvee_{b \in \Sigma}  \neg x_{i,b} )$$
How to write a formula (not necessarily in CNF) that expresses that the word has $abc$ on it in consecutive positions?
I have come up with this but again I am not sure:
$$\bigwedge_{i=1}^{n-2} \; ((x_{i,a} \rightarrow x_{i+1,b}) \rightarrow x_{i+2,c})$$
I would be appreciated if someone could help me.

REPLY [0 votes]: The first one is
$$\lnot \bigvee_{i=1}^n x_{i,b} = \bigwedge_{i=1}^n \lnot x_{i,b}$$
The second one is
$$\bigvee_{i=1}^{n-2} \left(x_{i,a} \land x_{i+1,b} \land x_{i+2,c}\right)$$


TITLE: A question about semigroup union
QUESTION [2 upvotes]: The semigroup of all order-preserving and decreasing transformations in full transformations semigroup $T_n$ is denoted $C_n$.
I consider the idempotent set $A=\{\begin{bmatrix}2\\1  \end{bmatrix},\begin{bmatrix}3\\2  \end{bmatrix},\cdots, \begin{bmatrix}n\\n-1  \end{bmatrix}\}$.
It is well known that $\langle A \rangle = C_n$.
I want to determine smallest $k$ suct that  $C_n=\bigcup\limits_{i=1}^{k} A^k$

REPLY [1 votes]: $\DeclareMathOperator\im{im}$For ease of notation, let me denote $a_i=\genfrac[]{0pt}{}{i+1}i$, so that $A=\{a_1,\dots,a_{n-1}\}$. I will write multiplication so that $(fg)(x)=f(g(x))$; reverse everything if you want the opposite convention.

Proposition: For any $f\in C_n$, the least $k$ such that $f$ can be written in the form
  $$f=a_{i_1}a_{i_2}\cdots a_{i_k}\tag1$$
  for some $i_1,\dots,i_k\in[n-1]$ is
  $$k=\sum_{y\in\im(f)}\bigl(\max(f^{-1}(y))-y\bigr).\tag2$$
  Moreover, for each $i\in[n-1]$, the minimal number of occurrences of $a_i$ in (1) is
  $$\bigl|\{y\in[n]:\exists x\in[n]\,(f(x)=y\le i<x)\}\bigr|.\tag3$$

Proof:
To prove the upper bound, let me fix $f\in C_n$ with image
$$\im(f)=\{y_1,\dots,y_l\},\qquad1=y_1<y_2<\dots<y_l\le n.$$
Putting $x_j=\max(f^{-1}(y_j))$, we have
$$1\le x_1<x_2<\dots<x_l=n,$$
and if we also define $x_0=0$, then for each $i\in[l]$:
$$f^{-1}(y_i)=[x_{i-1}+1,x_i].$$
In particular, $y_i\le x_{i-1}+1$. Now it remains to observe that
$$f=(a_{y_l}a_{y_l+1}\cdots a_{x_l-1})\cdots(a_{y_2}a_{y_2+1}\cdots a_{x_2-1})(a_{y_1}a_{y_1+1}\cdots a_{x_1-1}).$$
For the lower bound, assume $f$ is written as in (1), and let $i\in[n-1]$ and $x\in[n]$ be such that $f(x)\le i<x$. Then
$$x,a_{i_k}(x),(a_{i_{k-1}}a_{i_k})(x),\dots,(a_{i_1}a_{i_2}\cdots a_{i_k})(x)=f(x)$$
is a nonincreasing sequence which may decrease by at most $1$ at each step, hence there is a unique step where it goes from $i+1$ to $i$: that is, there is $j(x)\in[k]$ such that
$$(a_{i_{j(x)+1}}\cdots a_{i_k})(x)=i+1,\qquad (a_{i_{j(x)}}a_{i_{j(x)+1}}\cdots a_{i_k})(x)=i.$$
Clearly, we must have $i_{j(x)}=i$. Moreover, if $x'$ is such that $f(x')\le i<x'$, then
$$f(x)\ne f(x')\implies j(x)\ne j(x').\tag4$$
Indeed, if we had $j(x)=j(x')=j$, then
$$(a_{i_j}\cdots a_{i_k})(x)=(a_{i_j}\cdots a_{i_k})(x')=i,$$
hence
$$f(x)=(a_{i_1}\cdots a_{i_k})(x)=(a_{i_1}\cdots a_{i_{j-1}})(i)=(a_{i_1}\cdots a_{i_k})(x')=f(x').$$
Now, (4) implies that the number of occurrences of $a_i$ in (1) is at least (3). Summing over all $i$, we have
$$\begin{align*}
k&\ge\sum_i\bigl|\{y\le i:\exists x\in f^{-1}(y)\,(i<x)\}\bigr|\\
&=\bigl|\{(i,y):y\le i\land\exists x\in f^{-1}(y)\,(i<x)\}\bigr|\\
&=\sum_y\bigl|\{i:y\le i\land\exists x\in f^{-1}(y)\,(i<x)\}\bigr|\\
&=\sum_{y\in\im(f)}\bigl(\max(f^{-1}(y))-y\bigr),
\end{align*}$$
proving (2). QED
If $f\in C_n$ of image size $l$ is written as in the proof of the upper bound, (2) gives
$$k=\sum_{j=1}^l(x_j-y_j).$$
This expression is maximized (for a given $l$) when the $x_j$ are maximized, i.e., $x_j=n+j-l$, and $y_j$ are minimized, i.e., $y_j=j$. Thus,
$$k\le\sum_{j=1}^l(n+j-l-j)=l(n-l)\le\lfloor n/2\rfloor\lceil n/2\rceil=\lfloor n^2/4\rfloor.$$
This bound is attained for the function $f(x)=\max(1,x-\lfloor n/2\rfloor)$. Thus:

Corollary: The answer to the question is $k=\lfloor n^2/4\rfloor$.


TITLE: Predictable martingales are constant
QUESTION [3 upvotes]: Exercise:  Let $(X_n)_{n\in\mathbb{N}_0}$ be a predictable $\mathbb{F}$-martingale. Show that $X_n = X_0$
  almost surely for all $n \in \mathbb{N}_0$.

Solution: $(X_n)_{n\in\mathbb{N}_0}$ being predictable means that $X_n$ is $\mathcal{F}_{n-1}$-measurable so $\mathbf{E}[X_n|\mathcal{F}_{n-1}] = X_n$ a. s. But using the martingale property we see that $\mathbf{E}[X_n|\mathcal{F}_{n-1}] = X_{n-1}$ for all $n\in\mathbb{N}$. So we can conclude that $X_n = X_{n-1}$ for all $n\in\mathbb{N}$ and inductively that $X_n = X_0$ a. s. $\square$

Is this solution correct? Thank you!

REPLY [4 votes]: Suppose that $(X_{n})_{n\geq 0}$ is a predictable $(\mathcal{F}_{n})_{n\geq 0}$ martingale. We have to take advantage of each property :
First, since it is a martingale, we have:
\begin{equation}
\mathbb{E}[X_{n+1}|\mathcal{F}_{n}]=X_{n}
\end{equation}
and since it is predictable, we know that $X_{n+1}$ is $\mathcal{F}_{n}$ measurable, so
\begin{equation}
\mathbb{E}[X_{n+1}|\mathcal{F}_{n}]=X_{n+1}
\end{equation}
The above two results yield
\begin{equation}
X_{n}=X_{n+1}
\end{equation}
The proof is an immediate consequence