Why Zariski topology?

Question: Why in algebraic geometry we usually consider the Zariski topology  on $\mathbb A^n_k$? Ultimately it seems a not very interesting topology, infact the open sets are very large and it doesn't satisfy the Hausdorff separation axiom. Ok the basis is very simple, but what are the advantages?
Comment: "it seems a not very interesting topology" aha, so basically anything one doesn't understand yet is not very interesting? The Zariski topology is very, very, very natural: You just want the zero-sets $\{f = 0\}$ to be closed, and evaluation has to take place in residue fields. Thus you arrive at $\{\mathfrak{p}: f \in \mathfrak{p}\}$ as basic closed subsets. The same is true *verbatim* for manifolds. Also, it is a misconception that non-hausdorff spaces are pathological. Some people try to make you believe this, without any evidence.
Comment: It seems to be the natural candidate. It allows spaces to be built from algebraic equations... and algebraic geometry is that subject, building geometries from algebra.
Comment: Dear Galoisfan, These answers are related: http://math.stackexchange.com/a/53931/221 and http://mathoverflow.net/questions/21502/what-is-the-zariski-topology-good-bad-for/21529#21529 Regards,
Comment: I think the fact that open sets are very large and easy to play with is precisely the point of the Zariski topology—in algebraic geometry there is no pressure to consider $ \mathbb{Q}(i) \in \mathbb{C} $ topologically.
Answer: To appreciate the Zariski topology it helps to have a fairly broad view about what a topological space is. Topological spaces in full generality are, confusingly, not very topological in the naive sense! As discussed in this math.SE question, I think it is better to think of point-set topology as being about semidecidable properties (which are the open sets). The familiar kind of topology induced by a metric is about the specific property of being close in a metric sense, but other kinds of topologies are about different kinds of properties.
The Zariski topology is about the property of non-vanishing of polynomials. The semidecidable properties here are the properties "this set of polynomials does not vanish here." Intuitively speaking the reason this is semidecidable is that you can compute the value of a polynomial at a point to finite precision and once you show that it is sufficiently different from zero it cannot be zero.
The fact that the Zariski topology isn't Hausdorff isn't a weird property of the Zariski topology; it tells you something important about how vanishing of polynomials behaves, namely that the behavior of a polynomial on a few points can tell you a lot about its behavior at seemingly far-away points. This is intrinsic to the nature of algebraic geometry and pretending that the Zariski topology doesn't exist won't make it go away.
Okay, so what can you actually do with it? Here are a couple of things:

If two polynomials agree on a Zariski-dense subset, then they agree identically. This is a surprisingly useful way to prove polynomial identities; for example, it can famously be used to prove the Cayley-Hamilton theorem.
Moving to the Zariski topology on schemes allows the use of generic points. I am not familiar with examples of this technique in use though.
Serre famously made use of the Zariski topology to introduce sheaf cohomology to algebraic geometry, which was (as I understand it) a crucial innovation.

To really appreciate the Zariski topology it helps to generalize it to arbitrary commutative rings. An important motivational example: if $X$ is a compact Hausdorff space and $C(X)$ is the ring of continuous functions $X \to \mathbb{R}$, then the maximal spectrum of $C(X)$ not only can be identified with $X$, but has the same topology! (This is an exercise in Atiyah-MacDonald.)
The rings one gets in this way are precisely the real subalgebras of complex commutative C*-algebras by the commutative Gelfand-Naimark theorem, and in fact you get a (contravariant) equivalence of categories. Moreover, by the Serre-Swan theorem, the category of real vector bundles on $X$ is naturally equivalent to the category of finitely-generated projective modules over $C(X)$.
It helps to think about this example like a physicist. Think of $X$ as the set of possible states of some physical system and the elements of $C(X)$ as observations one can make about the system; the value of a function at a point is the result of the observation in a fixed state. The Zariski topology here captures all semidecidable properties that you can decide using the observations in $C(X)$. For example, if one of the functions in $C(X)$ is called "temperature," there is a corresponding semidecidable property "the temperature of the system is between $0$ and $100$ degrees inclusive," which you can decide by computing the temperature to finite precision.
(What if $X$ is not compact? Then if you work with the ring $C_b(X)$ of bounded continuous functions on $X$, there are consistent sets of possible values of the observables which do not arise from an actual state of your system; they are points in the Stone-Čech compactification $\beta X$ instead.)
Here's another example that I like: let $B$ be a Boolean ring, which is a ring satisfying $b^2 = b$ for all $b \in B$. Then every element of $B$ can be identified with a subset of its maximal spectrum. This idea can be used to

prove Stone's representation theorem for Boolean algebras,
deduce the existence of ultrafilters from the existence of maximal ideals in rings, and
prove the compactness theorem in propositional logic (without proving the completeness theorem)!

For a discussion, see my blog post Boolean rings, ultrafilters, and Stone's representation theorem.
Comment: I think "between 0 and 100 degrees inclusive" should be "between 0 and 100 degrees exclusive".
Comment: I think that it's better to think of point-set topology as being about topological spaces *tout court*. That includes spaces with little additional structure every bit as much as it includes spaces with fancy structure. You're really talking not about how to think point-set topology, but rather how to think about to think of its applications.
Comment: @Qiaochu Yuan♦, your answers are always illuminating. You are younger than me and your preparation exceeds that of many professors that I have seen in my life. Congratulations
Answer: I would just like to mention a pleasant feature of the Zariski topology which is , to my knowledge, never addressed in  algebraic geometry books (counterexample anybody?)
The Zariski topology is never Hausdorff in positive dimension, but apart from that it is normal ($=T_4$)  in the affine case.
This means that for an affine variety (or an affine scheme) $X$, given two disjoint closed subsets $C,D\subset X$ there exists a regular function $f\in \mathcal O(X)$ with $f(c)=1$ for all $c\in C$ and $f(d)=0$ for all $d\in D$.
More astonishingly yet, you can even take arbitrary regular functions $g\in \mathcal O(C), h \in \mathcal O(D)$ and interpolate them to an $f\in \mathcal O(X)$ such that $f\mid C=g$ and $f\mid D=h$
This is due to the fact that in algebraic geometry you define the functions first,  the polynomials (or one of their quotient rings), and then you deduce from them a topology.
In classical topology (as in calculus or analysis) you define the topological space first (through a metric, say) and then you investigate the continuous functions on these spaces.
 And so it can happen (in contrast to algebraic geometry) that you don't have enough functions to separate disjoint closed subsets from each other.
Edit
In the same vein (equivalently, really) let me mention that affine algebraic varieties (or affine schemes ) satisfy the Urysohn property: every regular function on the closed  $C\subset X$ extends to a regular function on $X$.
In the language of schemes it is the absolute triviality that, for $C=V(I)$, the morphism   $\mathcal O(X)=A \to \mathcal O(C)=A/I$ is surjective!
And it is a triviality because it is built into the foundations of algebraic geometry: the Zariski topology is constructed out of the  functions (and Grothendieck's genius was to  force every element of any commutative  ring to be a function!).
Comment: Dear Georges: there seems to be a typo in your second paragraph: I think you meant to say "$f(d)=0$ for all $d \in D$". (What you wrote is correct, but perhaps less interesting.)
Comment: Dear @Asal, I have corrected my typo: thanks a lot for drawing my attention to it. That what I actually wrote was "perhaps less interesting"  must be the understatement of the day: congratulations for being so polite and amusing at the same time!
Comment: Dear Georges, you're welcome. I find that a little _litotes_ can be not ineffective in conveying a point gently. As for politeness, I take my lead from you!
Comment: Dear @Georges Is a continuous function with respect to the Zariski topology necessarily regular? If not, we cannot say this satisfies T4 axiom.
Comment: Dear @Hang: you are right! My remark only points to an analogy: regular functions on  a variety behave like continuous functions on a T4 space. But indeed, as you correctly remark, continuous functions neeedn't be regular.
Answer: I'd like to give my personal perspective which I believe is a more elementary version of Zhen Lin's. What I have been able to explain for myself is a) why the Zariski topology is natural to consider when talking about vanishing sets, b) how the Zariski topology on sets of prime ideals of a ring $R$ suggests that locally ringed spaces are good general objects for geometric considerations, c) why the Zariski topology on the set of all prime ideals $\DeclareMathOperator{\Spec}{Spec}\Spec R$, gives us affine schemes, and d) when it is ok to use the Zariski topology only on the set of maximal ideals $\DeclareMathOperator{\maxSpec}{maxSpec}\maxSpec R$ (so in particular why over an algebraically closed $\Bbbk$ we can think of $\mathbb A^n_\Bbbk$ as $n$-tuples $(a_1,\dots,a_n)$ of elements of $\Bbbk$ identified with the maximal ideals $\left<x_1-a_1,\dots,x_n-a_n\right>$ of $\Bbbk[x_1,\dots, x_n]$)

Vanishing Sets and the Zariski Topology
Imagine that we have a ring $R$ and a set (space) $X$, so that we think of $R$ as "functions" on $X$, in the sense that for every $x\in X$ there is a set $R_x$ of "values at X" such that we can think of $x$ as a (surjective) evaluation function $x\colon R\to R_x$ given by $f\to f(x)$. If we try to axiomatize the properties of the notion of "$f\in R$ vanishes at $x\in X"$, we arrive at:

$f\in R$ and $g\in R$ have the same value at at $x$, if and only if $(f-g)(x)$ vanishes at $x$;
If $f$ vanishes at $x$, then $(f\cdot g)(x)$ also vanishes.

These are enough to ensure that every $x\colon R\to R_x$ induces a ring structure on $R_x$ such that the set of functions $f$ vanishing at $x$ is precisely the ideal $\ker x\subset R$. Requiring that constant unit (i.e. $1$) does not vanish anywhere ensures that the ideals are proper, i.e. none of $R_x$ is the trivial zero ring.
It is not difficult to show that given a set of points in our space $S\subset X$, the set of functions in $R$ vanishing on $S$ is an ideal $I(S)$ of $R$, and in particular that it is the intersection of the ideals $\ker x$ associated to the points $x\in S$, i.e. $I(S)=\bigcap\{\ker x\colon x\in S\}$. Similarly, given any set of functions $J\subset R$, the vanishing set of points $V(J)=\{x\in X\colon f(x)=0(x)\forall f\in J\}$ can be described as the set of points $x$ whose associated ideal $\ker x$ contains  $J$, i.e. $V(J)=\{x\in X\colon J \subset \ker x\}$.
Since the idea of algebraic geometry is to establish geometric objects as zero-loci of functions, that is, as vanishing sets, we care about the following easy to check properties of the operator $V$:

$V(I)=V(\left<I\right>)$, so from now on we'll only considers ideals of $R$ as our sets of functions $I$, $J$, etc.
$V(0)=X$
$I\subset J$ implies $V(J)\subset V(I)$
$V(\sum_\lambda I_\lambda)=\bigcap_\lambda V(I_\lambda)$
$V(I)\cup V(J)\subset V(I\cap J)$

The last statement is NOT an equality in general. Indeed if $\ker x$ is not a prime ideal, then letting $fg\in\ker x$, but $f,g\not\in\ker x$, we get that $x\not\in V(f)\cup V(g)$, but $x\in V((f)\cap (g))$. This is bad, since it meas that the vanishing sets in this general context are not necessarily closed under finite unions, which makes it extremely difficult to effective decompose them into smaller pieces. Pretty much the only way to obtain an easily verifiable condition of the closure under finite unions is to require that all the associated ideals $\ker x$ are prime (so that $R_x$ are integral domains), in which case the vanishing sets $V(I)$ satisfy the axioms for closed sets of a topology, which I call the Zariski topology induced by $R$ on $X$.
Note that $X$ can be thought of as a mutliset of prime ideals of $R$.

Vanishing Sets and Locally Ringed Spaces
We want to do more: we want to study the sheaf of vanishing sets on $X$. Of course, this makes no sense as I've stated it since sheaves are defined relative to a topology (roughly if something is a local phenomenon, then it is a sheaf), and we have not specified a topology on $X$. Observe, however, that being a closed set in a topology is a local property in that topology, in the sense that if $S$ is locally closed relative to every open $U\subset X$, then $S$ is closed in $X$. It follows that under the Zariski topology on $X$ induced by $R$, vanishing sets are a sheaf.
But if vanishing sets are a sheaf, and each vanishing set is given by a ''function'' in $R$ on $X$, we better make ''functions'' on $X$ into a sheaf as well. There is essentially one reasonable way to do this, which is by restricting appropriately functions in $R$ to open subsets $U$.
First, a simplification. Since every vanishing set is generated as the intersection of hypersurfaces (vanishing sets of single ''functions'', since $I=\sum_\alpha (f_\alpha)$ we have that $V(I)=\bigcap_{\alpha}V(f_\alpha))$, it is completely useless to have ''functions'' $f\in R$ that do not vanish at any point $x$: they provide extra ideals which say nothing about the points of the space.
It is clear that we should demand that any $f$ that does not vanish anywhere should be a unit of $R$, and to achieve this we may replace $R$ with its localization $S^{-1}R$ at the multiplicative system $S=\{f\in R\colon f(x)\neq0\forall x\in X\}$ (the system is multiplicative since the $R_x$ are integral domains). This leaves the vanishing sets exactly the same, while giving us a slightly simpler ring to encode them (the fewer ideals, the better).
Having said this, suppose that we have an open set $U\subset X$. Whatever ring $R_U$ we associate to $U$, we want its vanishing sets to be closed sets of $U$. We should also have a restriction map $\DeclareMathOperator{\res}{res}\res_{X,U}\colon R\to R_U$ to tell us how to restrict ''functions'' on $X$ to ''functions'' on $U$. This map should be a ring homomorphism if we have any sense of decency (plus its inverse has to map the ideal of $R_U$ vanishing at $S\subset U$ to the ideal of $R$ vanishing at $S\subset X$). Furthermore, given the above convention, if $f\in R$ does not vanish on any points of $U$, then it should get sent to a unit. Hence, $R_U$ will necessarily admit a homomorphism from the localization $S^{-1}R$ where $S=\{f\in R\colon f(x)\neq0(x)\forall x\in U\}$. Thus, we can define what I call the ''structure presheaf'' $\mathscr F_X$ by $\mathscr F_X(U)=S^{-1}R$ for $S=\{f\in R\colon f(x)\neq0\forall x\in U\}$, and setting $\res_{U,V}$, the restriction map from functions on $U$ to functions on $V$, to be localization of $R_U$ at $S=\{f\in R_U\colon f(x)\neq0\forall x\in V\}$.
A key property of this presheaf is that its stalks are local rings and that they encode vanishing. In particular, since $f$ vanishes at a point $x$ if and only if $f\in\ker x$, then it is not hard to see that the stalk $\mathscr F_{X,x}$ at $x$ is the localization of $R=\mathscr F(X)$ at the prime ideal $\ker x$, and hence that $f$ vanishes at a point $x$ if and only if $x$ is a non-unit in the stalk $\mathscr F_{X,x}$. Consequently, the sheaffification $\mathscr O_X$ of $\mathscr F_X$ is precisely what I call the ''structure sheaf'' of $X$ (remember that $X$ is a multiset of prime ideals, not all prime ideals which is the usual context for the structure sheaf). This sheaf is quite elusive, but has the property that $(X,\mathscr O_X)$ is a locally ringed space (stalks are local rings), and that vanishing sets can be extracted from the stalks $\mathscr O_{X,x}$ by saying that $f\in\mathscr O_X(U)$ vanishes at a point $x$ if $f$ localizes to a non-unit at $\mathscr O_{X,x}$. Hence the study of vanishing sets becomes a special case of the study of locally ringed spaces!

Affine Schemes -- the most basic locally ringed spaces
Why is the structure sheaf $\mathscr O_X$ elusive (the one from above for $X$ a set with a ring $R$ of ''functions'' on it)? Because $\mathscr O_X(U)$ is not necessarily $\mathscr F_X(U)$, the localization of $R$ at the set of functions that vanish nowhere on $U$. In fact, the top ring $\mathscr O_X(X)$ itself is not necessarily $R=\mathscr F_X(X)$, which means that its actually really hard to compute $\mathscr O_X$. In particular, the path to affine schemes begins with trying to compute $\mathscr O_X$.
One easy explicit description of $\mathscr O_X$ comes from noticing that if we set for any $f\in R$ $X_f=X\setminus V_f$, then the $X_f$ are a basis of open sets for $X$ in the Zariski topology since $X_{fg}\subset X_f\cap X_g$ and $\bigcup_\alpha X_{f_\alpha}=X\setminus V(\sum(f_\alpha))$.
We know that $\mathscr F_X(X_f)=R_f$ where $R_f$ is the localization of $R$ at $R_f=S^{-1}R$ for $S=\{g\in R\colon g(x)\neq0\forall x\in V(f)\}$, or equivalently, at $S=\{f,f^2,\dots\}$. Hence, the structure sheaf $\mathscr O_X$ is fully determined by the $R_f$ according to the rule $\mathscr O_X(U)=\varprojlim_{X_f\subset U}R_f$. This is still really hard to compute unless a certain miracle occurs, which is the following: if $V(f)\subset V(J)$ implies $J\subset\DeclareMathOperator{\rad}{rad} f$, then the $X_f$ satisfy what Eisenbud and Harris call the $\mathscr B$-sheaf axioms, which imply that $\mathscr O_X(X_f)=\mathscr F_X(X_f)=R_f$.
Why doesn't $V(f)\subset V(J)$ always imply $J\subset\rad J$ always? Well, we certainly have $I(V(J))\subset I(V(f))$, and $J\subset I(V(J))=\bigcap\{\ker x\colon J\subset\ker x\}$, but $I(V(f))=\bigcap\{\ker x\colon f\subset\ker x\}$ which could be strictly bigger than $\rad f=\bigcap\{\mathfrak p\subset R\colon f\in\mathfrak p\}$ as not all prime ideals of $R$ are necessarily $\ker x$ for some $x\in X$. Requiring that every prime ideal $\mathfrak p\in\Spec R$ correspond to an $x\in X$, and removing the unnecessary duplicates (two points $x$ and $y$ are not distinguishable by vanishing sets if $\ker x=\ker y$), we obtain that $X=\Spec R$ is a simple sufficient condition for the structure sheaf $\mathscr O_X$ to be mostly computable (we would know that $\mathscr O_X(X_f)=R_f$).

\maxSpec
So far I have explained (to the best of my ability) why the Zariski topology on $\Spec R$ is natural, which does not answer the question posed if we think (as it is often done) of $\mathbb A^n_\Bbbk$ as the set of maximal ideals of $\maxSpec\Bbbk[x_1,\dots,x_n]$ rather than the set of prime ideals $\Spec \Bbbk[x_1,\dots,x_n]$, which is done quite frequently. The reason for doing this is the Jacobson property of rings, which a ring has if every prime ideal is the intersection of the maximal ideals containing it. It should be clear from the above that for such rings $R$ we also have that $V(f)\subset V(J)$ implies $J\subset\rad f$ since certainly the intersection of the prime ideals containing $f$ is the same as the intersection of the maximal ideals containing $f$ whenever $R$ is Jacobson. Hence, the structure sheaf for $X=\maxSpec(R)$ satisfies $\mathscr O_X(X_f)=R_f$ when $R$ is Jacobson.
So when is $R$ Jacobson? Well, as can be read in Eisenbud's Commutative Algebra with a View toward Algebraic Geometry, fields are certainly Jacobson, $\mathbb Z$ is Jacobson, and the most general version of the Nullstellensatz: if $R$ is a Jacobson ring then so is $R[x]$. So in particular, $\Bbbk[x_1,\dots,x_n]$ is Jacobson, which is why we can do algebraic geometry on $\mathbb A^n_\Bbbk$ using $\maxSpec$ instead of $\Spec$ (so that for $\Bbbk$ algebraically closed, for example, we can identify $\mathbb A^n_\Bbbk$ with $n$-tuples of points in $\Bbbk$).
Comment: This is a well thought-out, mature analysis: +1
Answer: Let's ask you this - can you suggest another reasonable topology? here, we just demand that $\{0\}$ will be a closed set and that polynomials are continuous. These two conditions are certainly reasonable to demand. Do you have any other idea for a topology which you will be able to define without any reference to a specific field?
Comment: This explanation is also [how Eisenbud and Harris explain the Zariski topology in *The Geometry of Schemes*](http://i.stack.imgur.com/89OBY.png).
Comment: This is a rhetorical question. Anyhow, as I said, the topology is forced on us once we take {0} to be closed and polyonmials to be continuous.
Comment: This is not really an answer but a comment.
Comment: Just for the sake of a counterexample, the discrete topology on any field will make the polynomials continuous; but it is true that the Zariski topology is the weakest topology in which the polynomials are continuous.
Comment: Questioning to the question is not an answer
Comment: "Do you have any other idea for a topology .....?"   Why should we even equip it with a topology, we're just studying roots of polynomials
Comment: @Galoisfan, to define the euclidean topology you must make a reference to a specific field. Given an abstract field which you know nothing about, you cannot define a topology like the euclidean topology.
Comment: For example in euclidean topology polynomials are continous and $\{0\}$ is closed.
Comment: @anonymous About this point you're right!
Comment: @Norbert: you can't *seriously* be questioning the Socratic Method... ? (And sorry for the late reply!)
Comment: @TheChaz2.0 If I am not mistaken, in the socratic method the questioner does not ask questions in such a way as to tip people's opinions in one way or another. The questioner does not directly ask the pupil for new information, but rather to consider the problems, advantages, or implications of the information that the pupil has already provided them by forcing them to consider it new scenarios. It is not rhetorical and asks them what they would actually do in a given situatuion.
Answer: Here is a somewhat sophisticated reason for using the Zariski topology, but perhaps it will be more convincing to someone with algebraic or logical leanings.
Suppose we are agreed that localising at prime ideals is a good thing to do when studying commutative rings – this shouldn't be too controversial, given the good properties that local rings and localisation have. Unfortunately, not every commutative ring is a local ring. Nonetheless, by a suitable "change of base", every commutative ring "becomes" a local ring!
To be precise, let $R$ be a commutative ring, and let $\mathcal{R}$ be the category of finitely-presented $R$-algebras. The Zariski topology (in the sense of a Grothendieck topology) on $\mathcal{R}^\textrm{op}$ has the following universal property: there is an equivalence of categories between the category of all local $R$-algebras and the category of all left exact Zariski-cocontinuous functors $\mathcal{R}^\textrm{op} \to \textbf{Set}$, where such a functor $F : \mathcal{R}^\textrm{op} \to \textbf{Set}$ corresponds to the local ring $F(R)$, and a local ring $A$ corresponds to the functor $\textbf{Alg}_R(-, A)$. Something similar is true when we replace $\textbf{Set}$ with any other locally small and cocomplete topos, so we say that the classifying topos for local $R$-algebras is the Grothendieck topos $\textbf{Sh}(\mathcal{R}^\textrm{op}, \textrm{Zar})$.
Now, by a Yoneda-style argument, there is a "universal" local $R$-algebra in $\textbf{Sh}(\mathcal{R}^\textrm{op}, \textrm{Zar})$, namely the functor $\mathscr{O} = \textbf{Alg}_R(R, -)$: informally, we might say that the ring $R$ "becomes" a local $R$-algebra in $\textbf{Sh}(\mathcal{R}^\textrm{op}, \textrm{Zar})$! But what does this have to do with schemes? Well, according to the Grothendieck school, we should think of a Grothendieck topos as "representing" a space of some kind; but by the very universal property of $\textbf{Sh}(\mathcal{R}^\textrm{op}, \textrm{Zar})$ as a classifying topos, there are as many points of $\textbf{Sh}(\mathcal{R}^\textrm{op}, \textrm{Zar})$ as there are local $R$-algebras – i.e. a proper class!
However, by a miracle I do not yet fully understand, the scheme $\operatorname{Spec} R$ can be extracted as follows: we take the full subcategory $\mathcal{B}$ of $\mathcal{R}^\textrm{op}$ spanned by the principal localisations of $R$ (i.e. those rings of the form $R [1/f]$), and take the induced topology on $\mathcal{B}$ to form the Grothendieck topos $\textbf{Sh}(\mathcal{B}, \textrm{Zar})$. There is then an essential geometric morphism
$$i_! \dashv i^* \dashv i_* : \textbf{Sh}(\mathcal{B}, \textrm{Zar}) \to \textbf{Sh}(\mathcal{R}^\textrm{op}, \textrm{Zar})$$
induced by the inclusion $\mathcal{B} \hookrightarrow \mathcal{R}^\textrm{op}$, and by the universal property of $\textbf{Sh}(\mathcal{R}^\textrm{op}, \textrm{Zar})$, the inverse image $i^* \mathscr{O}$ of the universal local $R$-algebra $\mathscr{O}$ is a local $R$-algebra in $\textbf{Sh}(\mathcal{B}, \textrm{Zar})$. Because $\mathcal{B}$ is a preorder category, $\textbf{Sh}(\mathcal{B}, \textrm{Zar})$ is a localic topos, and it can be shown that it is equivalent to the topos $\textbf{Sh}(\operatorname{Spec} R)$, and under this equivalence, $i^* \mathscr{O}$ is identified with the structure sheaf of $\operatorname{Spec} R$.

A similar argument can be used to justify the definition of the étale topology: in the étale topology for $\operatorname{Spec} R$, $R$ "becomes" a strictly henselian local ring. This is explained by Wraith in his 1979 paper, Generic Galois theory of local rings.
Answer: The following answer has a similar spirit to Zhen Lin's. Like his answer, it has a strong logical flavor; unlike his, no toposes appear (though they are lurking in the background).
That said, allow me a slight switch in terminology: Let's define $\operatorname{Spec} A$ not as the set of prime ideals of $A$, but as the set of filters in $A$. The axioms for a filter are precisely dual to the axioms of a prime ideal, so that a subset of $A$ is a prime ideal if and only if its complement is a filter. For instance, while prime ideals have the axiom "$x \in \mathfrak{p} \wedge y \in \mathfrak{p} \Rightarrow x+y \in \mathfrak{p}$", filters have the axiom "$x + y \in F \Rightarrow x \in F \vee y \in F$".
It happens that the axioms of a filter have a certain logical form; they form a so-called "geometric theory". For any geometric theory, there is an associated space of its models, which will be automatically endowed with a suitable topology. In the case of the geometric theory of filters, a model is precisely a filter, so the space of models coincides with the spectrum; and the automatically given topology is precisely the Zariski topology.
A very readable introduction to this point of view are notes by Steve Vickers ("Continuity and Geometric Logic").
Comment: @VoiletFlame please use `$\operatorname{Spec}$` to format $\operatorname{Spec}$ - this produces better spacing.
Comment: @KReiser Alright! But mine *was* better than the original formatting!
Comment: Thank you both :-)

Why Zariski topology?


wiring diagram for double gang box bathroom

Question: enter image description hereI have an existing double gang box in my bathroom that contains a gfci/switch combo and a single pole switch.  The switch on the gfci controls the exhaust fan and the single pole switch controls the light.  I want to rewire the box where the gfci/switch combo can be used to power the light with theb outlet having constant power and add a countdown timer to control the exhaust fan.  I have 12-3 coming in with the red wire being hot and 12-2 going out to the exhaust fan. If anyone can break down or walk me through the wiring diagram, I would be grateful.
Comment: Welcome to SE. You might want to rethink putting the light on the GFCI - if it trips you may suddenly be without lights at an inopportune moment. Also, I believe that NEC code requires that bathroom outlets are on GFCI - an expert will chime in on that.
Comment: With the power off, take a picture of all the wiring in the box showing connections to the devices and which wires go into which cables (do _not_ remove any wires from any devices!), then [edit] these into your question. It makes everyone's life easier.
Comment: These are the existing switches and wiring
Comment: new countdown timer
Answer: This is quite doable, without putting anything but the outlet, assuming that there is a completely separate connection to the integrated switch. As far as I can tell, most of these combo outlets have two wires coming out the back for the switch, as well as four terminals for the GFCI outlet; If your combo outlet/switch does not have that, then get a different one.
First, DO NOT USE the LOAD terminals on the GFCI!
Connect the incoming HOT (black) wire to all of the following: the GFCI hot LINE terminal, one wire to the integrated switch and the line terminal/wire of the timer. Use a wirenut or Wago-type connector to connect everything together; don't try to put multiple wires under the GFCI's terminal.
Connect the switched hot (black) to the light to the other wire from the integrated switch.
Connect the load terminal/wire from the timer to the switched hot (black) going to the fan.
Connect together all of: the incoming neutral, the neutral return from the light and the neutral return from the fan. If the timer has a neutral wire/terminal, connect that too. All of these wires should be white.
Connect together all grounds, including ground pigtails to the combo and the timer.
Because you didn't use the LOAD terminals on the GFCI, you won't have the problem of the lights going out if you pop the GFCI.
Comment: Thanks a million.  I appreciate it.
Comment: Note that the countdown timer + bath fan may have to go on the GFCI depending on its instructions and where it was installed


Showing legend/classified features in OpenLayers from qgis2web?

Question:
How can I show legend / classified features in my layer switcher legend in OpenLayers from qgis2web similar to how the Leaflet option exports it?
Openlayers shows legend items fine as a single style but if the layer has subclasses only the main layer name shows in the layer switcher legend.
Answer: Yes, I can confirm that it is the symbology with rules that is not exported correctly.
It is only a legend problem because the themes can be seen correctly on the map.
You can solve by manually editing the "title" in the layer you are interested in in the layer.js file
Esempio:
title: 'Pai Esondazioni agg 2016
\
     R1
\
     R2
\
     R3
\
     R4
'

Unfortunately you will have to create the png icons by hand and then recall them
Answer: In my legend, OpenLayers are visible:

Set up like this in QGIS:
Comment: Well thanks but not quite!  That is how my layers are set up in QGIS, the only difference is I have used "Rule Based" criteria instead of "Categorized".  Is it the "Rule Based" that OpenLayers doesn't like?  (See new image above.)


Better ways of vectorizing photos than Illustrator's Trace?

Question: Are there any better ways of vectorizing photos than Illustrator's Trace? I don't have one of them Wacom boards so I can't really do this by hand.
Answer: I just used http://vectormagic.com and it works really well. The downloaded Mac app Vector Magic v1.8 costs $295 (last modified August 2010) but the online version is $7 per month. Here is the result I got from tracing a 450px wide line art drawing. You do need to see this test image at full screen to appreciate the nice work vectormagic did on the curves.
Answer: You don't have to have a tablet to create paths with the pen tool. Thousands of users never touch a tablet, but still use Illustrator.
The best method for any vector art is to draw it yourself. It does take practice, but that is the best method by far. People spend years learning how to create vector art properly. It's simply not something any automated tracing tool can do with a click of a button. In most cases, tracing provides adequate results at best. In many cases, and for many user, "adequate" is just that for them and they are happy. If you want more refined artwork with better control over anything, you really have to create the paths yourself.
If you are using any automated tracing tool, you need to familiarize yourself with how it works. It may help to tweak values or sharpness of an image in a raster editing app, such as Photoshop, before trying to trace it. You may need to draw with pen rather than pencil if you are scanning artwork. You may need to adjust settings in the tracing tool to get the exact trace you are looking for.
There is no "magic" button anywhere which will make any tracing tool work for everyone in every circumstance. There are additional tools such as vectormagic.com. However, as with any tool and stated earlier, even that may not yield the result you want if you are unfamiliar with it.
Answer: Vector magic is awesome as far as one click tracing is concerned, far better than Illustrators image trace, but isn't perfect all the time. Especially if contrasts are low etc. A very cheap source I have found is a site/app called fiverr. It is not a one click solution but for $5 USD someone in Indonesia (that's the fellow I use) will completely redraw it for you in .eps.ai etc formats. I have used them many times. Its obviously a lot of work for five bucks so I leave a tip as well. Usually within 24 hours. I have nothing to do with this company but I am a multimedia designer who is not very comfortable in the vector world. Vector magic and Fiverr have saved my sanity many times. You get two free traces with Vector magic ( per email address ).
Comment: Who's the Indonesian one on fiverr? Thanks!
Answer: it's true that there's no magic, it doesn't exist any perfect tracer, but, for example,in  http://vectormagic.com/home , they have an online free auto tracer much better than Illustrator's one, at least for tracing black and white logos, that's a proven fact
Comment: Hi Juan, welcome to GD.SE and thanks for you answer. Could you please elaborate a bit? *Why* is this a better auto tracer than Illustrator's? As-is, your answer reads somewhat like unsourced advertising, and might attract downvotes for that. If you have any questions about the site, have a look at the [help] or ping one of us in [chat]  once your reputation reaches 20. Keep contributing and enjoy the site!
Answer: Surprisingly, I've found that the software that came with my Silhouette Vinyl Cutter has an incredible bitmap to vector translation.  I use Illustrator for work and wish I had the silhouette software installed on that PC just for that one purpose.
Answer: Different programs have different strengths. Depending on what you're working with you may want to choose a specific program better suited for your task. I will go step by step and compare Adobe Illustrator, Vector Magic, Graphic Tracer and Inkscape. I may add Corel Draw later, but based on what I've seen, it isn't better than the other options in any aspect.
Comparison
Importing image files
All applications support popular formats, so you'll always be able to load your image, however usability varies.

Adobe Illustrator ignores image size and always creates canvas of the last used size.
Vector Magic can randomly crash when trying to resize an image to the "recommended size".
Graphic Tracer is the worst of all, it doesn't support dropping a file on the application window. Frequently randomly closes on crash testing.
Inkscape is surprisingly the most user friendly. When asked to open a file, it just opens the file.

IS is the best, VM and AI are close (points deducted for minor issues), GT is mediocre.
Generating palette

Adobe Illustrator supports various modes of automatic palette generation, however giving it a specific palette is pure pain and requires creating a color library. This feature was designed for a very different purpose, so prepare to be asked for a name of every color you pick. All colors are considered opaque. If you want transparency, you'll have to manually delete background parts later.
Vector Magic supports somewhat similar palette generation options. Creating a palette manually requires many extra clicks unfortunately, but it's possible. If you want a custom palette, you can let the app create a palette automatically and apply little fixes. Not only transparency is fully supported, but you can have colors with different alpha values in your palette. VM specifically supports taking anti-aliasing into account when generating a palette.
Graphic Tracer has by far the most user-friendly palette creation and by far the worst palette utilization. It supports adding colors with a single click, supports gradients, but automatic palette generation isn't customizable. However, all usability issues are minor compared to two massive problems. First, alpha channel is ignored and white is always considered fully transparent. Second, it doesn't support close colors at all. If your image has black and dark gray in it, you better increase contrast before vectorization and fix colors later, because GT supports only very distinct colors.
Inkscape doesn't support palettes at all. Its support for colors is very limited in general, because it relies on an external app for tracing which supports only grayscale images.

VM is the clear winner here, AI is very close (points deducted only for the interface designed for aliens). GT is in a weird spot of being user-friendly, but doing a terrible job. IS is unusable.
Segmentation

Adobe Illustrator doesn't display this stage to a user at all, so there's little way to affect it. You can affect segmentation with the noise slider.
Vector Magic allows configuring complexity, min segment size, can take anti-aliasing into account and cluster similar colors. After automatic stage is finished, you can "zap" unneeded segments and edit pixels using pencil and paint bucket tools.
Graphic Tracer displays segments as a preview while working with the palette, however editing segments isn't supported. If you have close colors (see previous section), this is when you start noticing that they're ignored.
Inkscape doesn't display this stage at all. Maybe it exists somewhere in Potrace.

VM is the clear winner as the only app that supports this stage fully. Note that it's optional as you can always use a raster image editor and reduce colors manually yourself. Unless you're using GT, because it'll ignore close colors even then.
Generating vectors

Adobe Illustrator allows configuring complexity of lines and sharp corner detection. You can enable snapping curves to lines (produces more straight lines built from multiple curves) and overlapping (makes shapes overflow under other shapes a bit, which allows simplifying curves without immediately ruining the result). Anti-aliasing in the source image causes random "round pixels" to appear. You can reduce the effect, but you'll never get rid of it. Thin anti-alised lines will become a mess. Generated vectors use lots of redundant points, so if you care about complexity, make sure to simplify later.
Vector Magic allows configuring smoothness and number of nodes with sliders. You can enable detection of sharp corners and taking anti-alising into account. Anti-aliased images are handled really well, you can expect blurry 1-pixel-wide lines to resemble lines. Corner handling is mediocre. You can get decent results, but there will always be too many or too few detected corners. VM produces the cleanest lines by far. They use very few points, so simplification becomes unimportant. Shapes are always cut-out.
Graphic Tracer allows configuring detail/complexity, corner detection and proportion of straight lines with sliders. GT ignores close colors, so anti-aliasing can't cause any issues (one way to solve the problem is to ignore it). GT probably detects corners correctly the most often as all key aspects are controlled with precise sliders. Generated lines use many unnecessary points even in the least detailed mode, as the user is expected to simplify lines manually. GT tries to stack shapes, but it does duplicate underlying lines, just on the opposite side of the shape below.
Inkscape generates some sort of mess with colored splotches. With crazy amounts of points that will make IS itself crash. Very stylistic, but unusable.

VM and GT are the winners here. They both have advantages and disadvantages. AI is mediocre and can work fine in some cases. IS is literally unusable.
Optimizing curves

Adobe Illustrator doesn't generate the cleanest lines, but its stacking mode allows built-in curve simplification tool to work. It's very configurable and optimizes shapes well, however every shape may require different options. And be careful, it can cause holes if you simlify too hard. The best part of AI is surprisingly its usability. It displays the exact number of vertices at all stages from tracing to simplification.
Vector Magic doesn't have built-in simplification tools and its inability to stack shapes (despite this being an option during saving) makes using external simplification tools impossible. However, the algorithm generates lines so clean that simplification is often just unnecessary.
Graphic Tracer has all sort of tools for simplifying lines manually. You can fix corners, you can simplify curves, convert to arcs and everything else imaginable in a very user-friendly interface. Automatic simplification is also available. Note though that simplification doesn't in fact interact with vectorization, so you can get holes in your image.
Inkscape at this point is either laggy or has already crashed. In case it's still alive, simplification is impossible because there're no shapes, just thousands of random stacked splotches. And even if we want to use simplification alone, its only configurable parameter is "threshold" hidden somewhere deep in the options dialog.

IS is a failure, but every other app won for a different reason. GT has the best tools for manual simplification. VM produces lines so clean that it doesn't need simplification. And finally, AI has really solid general-purpose simplification tools which can work in tandem with other software.
Deep understanding of content

Adobe Illustrator — doesn't exist.
Vector Magic — doesn't exist.
Graphic Tracer has fantastic tools for detecting fonts in the vectorized text. Not only it supports huge databases and your own installed fonts, but it can handle all sorts of distortions and replace the vectorized letters with perfect letters from the font.
Inkscape — doesn't exist.

GT's killer feature is its font detection. If you need it, get GT.
Exporting vector files

Adobe Illustrator, being the industry standard, supports everything. Files it produces can be read by other apps, especially other Adobe apps, which is often what's needed.
Vector Magic kinda supports various formats, but note that most of its save options don't work and the files it produces may require resaving to be used by other apps. Notably, .AI files can be read by AI, but not other Adobe apps.
Graphic Tracer supports more formats than VM. What's more, it supports directly transfering data into many apps (they call it "ClikLink").
Inkscape is the closest competitor with AI in terms of supported formats. I haven't really tested how well they're supported though, for reasons mentioned in the previous sections.

AI is the winner, being the app that a lot of people use anyway, which means less need for finding correct file formats. GT is as close to having the best export options as it gets for an app that isn't AI. IS is probably close to AI, to be fair (the problem being is that it doesn't matter at this point). VM is mediocre, but still usable (you'll find what works for you, but it may be not the cleanest option).
Automatization

Adobe Illustrator supports recording macros, supports JavaScript scripts, supports COM interface, supports command line. It basically supports everything anyone would ever need for automatization.
Vector Magic supports batch processing and saving options (without the palette). No scripting, no command line. Batch processing requires only a few clicks if you have multiple configurations saved, but it's still manual clicks. Can probably be automated with AutoIt or something, if you're into that. Options are stored in the Registry (on Windows).
Graphic Tracer has no automatization of any sort. It really expects you to do every step manually, including simplification of every line. Writing an AutoIt script would be completely impractical.
Inkscape has command line and python extensions. Scripting like in AI is impossible, if I understand correctly. Tracing relies on external command line tool, Potrace, which can be called directly, but color support can't be interacted with, if I understand correctly.

AI is the clear winner. VM is far behind, but still has a solid functionality. GT and AI can't be automated.
Results
Depending on what you need, the best tool is probably Vector Magic or Graphic Tracer. There're also specialized tools for maps, for example, so don't forget to Google if you need something very specialized.
If you need general-purpose tracing that handles all sorts of craziness like anti-aliasing, alpha channel, blurriness and close colors, while producing relatively clean lines that require little manual work, then Vector Magic should be your choice.
If you need to trace images with very limited colors, detect fonts and reach absolute perfection in every vertex, then Graphic Tracer should be your choice.
If you don't care about quality and ready to write scripts to fix a mess, then Adobe Illustrator should be your choice.
If you hate autotracing and believe manual tracing is the only way to perfection, then Inkscape should be your choice.
Comment: The adobe creates a canvas size is misleading. Illustrator does not really work that way. A artboard is not a canvas as such, you can use it as a canvas or you can ignore that in export options
Comment: @joojaa I almost always need images of specific sizes with objects placed at specific positions, not randomly sized images cut at transparent pixels, so both AI's and PS's behaviors (in quick export to PNG) are very annoying to me. Both apps intentionally ignore information which is provided to them (image sizes). I understand that there're situations where this is desired, but I still think it's worth mentioning that AI behaves in a way which a first-time user doesn't expect. Tracing also means size can change. "Canvas" may be the wrong word here, but "artboard" sounded too app-specific.
Comment: im pretty sure you should ask a question of that.
Comment: @joojaa Pretty sure there's already a question about PS. Not sure about AI. Maybe I should ask a question indeed...
Comment: Never heard of photoshop changing image size arbitrarily. AI on the otherhand does not behave like a firt time user expects, but thats mostly down to vector graphics dont work like you expect.
Comment: @joojaa PS: https://graphicdesign.stackexchange.com/q/131769/29591
Comment: Well obviously both outcomes are useful but for different workflows. One has to remember that all software has as a result of years of business practice allways a bunch of non useful features built into it, because not all features are meant for you or successful. But the default is indeed the more common usecase due to the way designers generally work.


Very High Memory Usage When Baking Normal Map

Question: I am trying to bake a normal map (Currently trying to do 16384x16384, will downsize to 4096x4096 as compensation for no AA). The high poly object is ~750k poly while the low-poly is 1.2k. No matter the tile size and other optimisations in the performance tab, blender fills up 32GB of system memory + 32GB of swap in about a minute and crashes. I know the resolution is very high but this much memory seems abnormal. I'm using Blender 3.3.0 on Linux, baking with Cycles on CPU, any ideas?
Answer: Not really an answer, more an analysis that wouldn't fit a comment....
If I am not wrong:
Baking is done with all four RGBA channels of each 32 bits depth.
$$
16\,384\times16\,384=268\,435\,456\mathrm{\,pixels}\\
32\mathrm{\,bits}\times4\mathrm{\,channels}=128\mathrm{bits}=16\mathrm{\,bytes}\\
16\times268\,435\,456\approx4.29^{9}\approx4.29\mathrm{\,GB}
$$
Now, I don't know what amount of memory Blender needs for the baking itself, but surely it isn't much.
So... Maybe try the menu Help > Report a bug? If it's abnormal behavior, we can't do much about it here aside telling you to use lower resolutions.
Comment: I stumbled upon [this](https://developer.blender.org/T100626) bug report when researching, as a temporary workaround I added another 32GB of swap to see if it'd be enough to complete the bake, it's been going for a few hours (probably most of that time was swapping from memory to SSD) but so far, it seems like you'd need ~90GB of memory.
Comment: Oh yeah, nice catch! Since it's a confirmed high priority bug, and it also seems that they want if fixed for the next bugfixes of the 3.3 LTS versions, ai think we can hope it will be dealt with quickly.


Where did the various opinions about tzeis begin?

Question: As discussed here, here, here, and here, there are different opinions as to when one is allowed to break their fast and end Shabbos, ranging from 36 minutes (mine) to 42 minutes to 60 minutes to 72 minutes to different times for fasts and Shabbos/Yom Kippur/Yom Tov. Where did these different opinions start? I understand that all of them are different calculations for when three stars come out, but why do different communities calculate that differently?
Comment: A variety of factors may be debated regarding the calculation of zmanim including whether elevation is to be factored in, and whether the _zmanim_ are dependent on set amounts of time, or on the sun being a certain number of degrees below the horizon. One could also debate which point of the sun one measures from.
Comment: http://judaism.stackexchange.com/questions/31256/when-is-the-latest-time-you-can-daven-minchah-bedieved#comment159239_31256
Answer: On a Torah level (mideoraysa), the appearance of three medium stars defines the onset of night: Shema may be recited from then onward and motzei shabbos occurs then. The most widely accepted views for when this occurs range from when the sun in 6.2 to 6.55 degrees below the horizon (though a view common in the US and UK requires waiting until this sun is 7.08 degrees below the horizon). This is not a set number of minutes, but varies according to latitude and season, among other factors.
However, for Krias Shema, the Shulchan Aruch, following Rabbeinu Yonah, requires waiting until three small stars have emerged. As R. Eliezer Melamed writes in his Peninei Halacha:
"The time to recite the evening Keriat Shema is "when you lie down" – when people lie on their beds to sleep, which starts when it gets dark. The Chachamim established a sign for the beginning of this time, when three medium-sized stars can be seen in the sky. This is because large stars are also visible during the day or at bein hashemashot (twilight). However, when three medium-size stars (according to the naked eye) emerge after them, it is a sign that night has begun (HaZemanim BaHalachah chapters 49-50). This time is called tzeit hakochavim. To avoid error, and to prevent mistaking big stars for medium ones, the Rishonim write that one must wait until he sees three small stars appear in the sky (Talmidei Rabbeinu Yonah; Shulchan Aruch 235:1)."
This is slightly earlier than the requirement of "three small stars in one place" for motzei Shabbos. Myzmanim does not give a time for "three small stars" (it uses 8.5 degrees as the default time for motzei shabbos/"three small stars in one place"), but R. Moshe Sokoloff reports that the person behind Myzmanim agreed that this should be around 8 degrees and that mirrors the ruling in contemporary works such as R. Dovid Borztyn's Zmanim Kehilchasam. Others are comfortable with earlier times (either because they use an earlier time for three medium stars or because they believe there is less reason to wait for three small stars nowadays, when the potential for confusion has diminished due to our reliance on accurate clocks and calendars). As R. Eliezer Melamed writes, "However, so that people will not come to err, the Shulchan Aruch rules that they must wait until three small stars emerge, meaning, another few minutes. Some say that nowadays, since we use clocks, there is no need to wait. See HaZemanim BaHalachah 51, note 3."
Some who hold this view sanction reciting shema from as early as 6.2 degrees onwards, though 6.45 degrees is more common (i.e. the time given as "end of ordained fasts according to R' Tukaccinsky" on Myzmanim).
As far as motzei shabbos times are concerned (where we wait for "three small stars in one place"), Dr. William Gewirtz writes, " 8.5 degrees is the most common current measurement for hashekhah, the requisite level of darkness15 that equates to the conclusion of Shabbat according to the ge'onim" and " With a few exceptions, the opinions of a vast majority of posekim equate to a point less than or equal to 8.5 degrees, with almost all falling in a range from approximately 7.5 to 9.3 degrees. Note that using 7.5 to 9.3 degrees for the conclusion of Shabbat, as opposed to approximately 6 degrees, parallels the extension from three medium stars to three small (and adjacent) stars."
Comment: This touches on small/medium/clusters as theory but completely skips all the 3/4 mil times (and 3.25 mil times). And where do any of these degree numbers come from?? So much missing...
Comment: In practice, most poskim do not use 3/4 of a mil for ascertaining night time, in part because we generally do not see three medium stars 3/4 of a mil after sunset, even using the long shiur for a mil (and also due to some uncertainty as to when the 3/4 of a mil should start from, and how they should be adjusted). The degrees are either interpretations of shiurim given by other poskim or simply when various observers have reported seeing three medium/small stars.
Comment: Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/74103/discussion-between-joseph-and-double-aa).


Given a Borel measure $\mu$ on a compact metric space, is there a continuous map $T$ such that $T$ is $\mu$ ergodic?

Question: Given a continuous (surjective) map of a compact metric space, the Kryloff-Bogolioubuff argument shows that there is at least $T$ invariant measure and hence one or uncountably many measures for which $T$ is ergodic. Is every Borel measure ergodic (and invariant) for some continuous map?
Answer: Any constant map is continuous and the only invariant sets are $\emptyset$ and the whole space. Hence, any measure is ergodic with respect to a constant map.
But I suspect that you meant invariant ergodic measures. Nice question but that is a whole different matter and I am strictly answering your question.
However, note that ergodic theory doesn't start with invariant measures. For example, a measure is ergodic if and only if any function that is invariant almost everywhere is in fact constant almost everywhere. This does not require the measure to be invariant!
Just a little correction: Krylov-Bogolubov's theorem requires a compact metric space.
Comment: I don't know. Some years ago a co-author suggested your question (or perhaps without ergodicity but with invariance, it was long ago and I don't remember well). After a few discussions we went on to other things. I regret that as I recall we weren't able to add anything that I could transmit.
Comment: Thanks for the response. I did include compact metric space in the title and will edit for clarity. I did mean invariant measure!  Do you have any idea if it is true? Thanks for pointing this out to me.
Answer: An ergodic invariant measure associated to a periodic orbit is uniform over that orbit.  Therefore, a finitely supported measure that is not uniform over its support is not an ergodic invariant measure for any measurable transformation.
Update:
I suspect that the answer remains negative even if you assume the measure to be non-atomic, but I don't know a counter-example.  However, if you do not require the map to be continuous (but merely measurable), then the answer becomes positive: every non-atomic probability measure on a compact metric space is ergodic for some measurable transformation.
Namely, if $X$ is a complete separable metric space and $\mu$ is a non-atomic Borel probability measure on $X$, then the measure space $(X,\mu)$ is isomorphic mod $0$ to the unit interval with the Lebesgue measure.  Take any map on the unit interval for which the Lebesgue measure is ergodic (say an irrational rotation) and lift it to $X$.
Comment: I found essentially the same thing with a measure that's uniform over some portion of the unit interval and putting the rest of the mass on a single point. What if we require no point masses or even non-atomic?


Engines capable of surviving a highly destructive space battle

Question: Context: It is set 50 000 years from "now" in no-FTL interstellar setting. The idea is that active defences and armor of spacecrafts have obscenely advanced to the point that any projectile has to get on the collision course both quickly enough to not get obliterated on it's way and reach at least dozens of terajoules of kinetic energy to have a chance to get through.
This is the official reasoning for the dominant tactic being fleets of billion ton spacecrafts meeting in short 50+ km/s fly-bys and exchanging rapid close range fire of relativistic (1% - 10% of light speed) projectiles, while being protected by 30+ metres of armor of unspecified composition.
So, the question is what kind of engines and maneuvering thrusters could survive this? Even though rule-of-cool definitely plays an important role here, and the 50 000 years of technological advancement is very good at plugging most holes, I'm still trying to keep to real physics, or at least not stray away from it too much, which means I'm very hesitant to just handwave it with some sci-fi magic or technobabble.
Options like chemical, fission, fusion and definitely antimatter propulsion don't seem like things that would do well once someone starts shooting up their exhaust.
I have been thinking of Orion drive maneuvering thrusters, in this case it could just be a re-purposed coilgun for the nuclear shaped charge and a well shaped piece of what is already it's standard armor, but while a bit more durable, I don't really trust the reliability of this given that debris from "shot down" projectiles and fragmented armor will be flying all around the place and could destroy the nuke used for the drive or knock it off course.
Orion drive: https://en.wikipedia.org/wiki/Project_Orion_(nuclear_propulsion)

So the end goal is allowing these ships to reliably maneuver in the conditions described above, for example it has to at least survive an impact of a cloud of debris (up to 5 mm) moving at 10% of light speed (edited: previous requirement was surviving a solid 50 terajoule projectile) while turned on and moving the ship, and such debris impact should not keep it from continuing to do so. At the same time it must be based on known physics, nothing highly speculative.
(Also please be patient with any grammar issues, I'm not a native English speaker)
Comment: 50 thousand years is a long long time. powered flight is only 120 years old, I'd expect FTL by then or extinction
Comment: maybe I am having a "senior moment," but aren't the weapons as described essentially engines? A full broadside of weapons that each can accelerate something to 10%C at the aperture sounds like an engine.
Comment: @Vesper space rocks don't really seem better than the purpose-built missiles and projectiles which they can easily counter outside close range,  in this context an asteroid would be easy to avoid or pulverize. Not a bad point though, the ships themselves are already built to do close fly-bys, so ramming or using an armored kamikaze spacecraft would work if deemed to be cost-effective
Comment: Hi Kugelblitz, welcome to Worldbuilding! Another thing: you're asking *how* engines would survive, and also *what* engines could survive. I think this is still too broad (and VogonPoet's first comment is still valid).
Comment: Hi and welcome Kugelblitz, this is an interesting problem for your world. But do please review the site guidelines and try to narrow the scope of your question to a specific problem related to your designs, since the question posed is essentially asking for braistorming ideas. Answers here are just that: they are answers, not opinions or ideas. Brainstorming isn't allowed in questions. Please narrow it down to an answerable question. Note that it may be closed until that is done.
Comment: Thanks for the warning. Right now the post is already edited to specify the goal, if more specification is cenessary you can let me know.
Comment: Why either party does not use asteroids (manned if anti-utopia, unmanned if normal) on collision courses vs those monstrosities? Whacking a billion-ton device into another certainly produces enough energy to disable both.
Comment: An asteroid would be easy to avoid? Not if it has an ability to correct its course. Since your civ is able to operate power on terawatt scale at fingertips, setting up engines and locators on an asteroid should be a routinely performed task, also correcting its course should also be feasible, both to change course for collision and initially accelerating to orbital speeds. BTW just one of these hitting the planet of those rivals would cause enough harm to set them back into stone age if not deeper. HOW THE HECK both sides missed that opportunity?
Comment: Re destroying an asteroid from the distance - just take the bigger thing farther away from the enemy, accelerate it for longer, using planet flybys if required (the bigger the mass, the less acceleration would be available) and have the entire fleet fly alongside it, perhaps even hiding behind it from incoming relativistic rain instead of their own armor. Once at combat course, the asteroid is launched into their ranks while your ships scatter to avoid return fire and collision debris.
Comment: By the way, do your ships have a delta-V as a parameter, or just acceleration? In space, you have a limited amount of mass to acceerate with, thus fuel and engines limit produce delta-V limit. If acceleration, then how big, in m/s^2? Same for rotation. Also mind the tensile strength of available materials when determining max acceleration for *projectiles*, if they accelerate too fast they go RUD from their own inertia. Perhaps other weaponry like a terawatt power particle accelerator would do better, just overheat them FTGJ, making cooked humans in thick armor?
Comment: And finally, what about heat dissipation? With 30 meters of armor due to incoming fire you don't want radiators outside, and with TW power range you have GWs of thermal losses *inside each firing ship*, shedding off that much would require them to have star-hot surface.
Comment: @Vesper I appreciate the feedback, but keep the context in mind. Missiles and guided munition is stated to be easy to intercept, and this is basically that but welded to a loose ball of rock. The same would naturally be true for planetary defence, not to mention that scraping a planet's crust wouldn't be a death blow after 50 000 years of development.
Comment: Good point regarding overheating. So far the idea was to use supercooled hydrogen (possibly their fusion fuel) as coolant and then just spray it out. Wastefull but with short engagement times and good supply it might be a fine justification
Comment: Well, if the asteroid is intercepted, you need to both spend energy to break it apart AND spend energy to avoid the damage to your protected infrastructure caused by still-flying remnants. So, when an adversary launches a, let's play big, 1km wide stone at your central settlement, at speed of about 30 km/s, with engines capable of returning that thing to collision course, you have to first disable them, next disperse the asteroid, and then survive the shower of its remnants over your head. It would take lots if not orders more than taking down an armored ship to break and stop the asteroid.
Comment: @Vesper this all depends on the actual strength of the armor and capabilities of the active defence... but you're actually right. Even if the 50 000 year tech made them much easier to counter, a star system could have millenia to prepare and there isn't really a situation in which a planet worth of weaponized rock collections is useless. And along with the idea to use one as a shield it actually fits the setting pretty well.
Comment: @Kugelblitz The question has a simple fix but first what is the question? There are two: The title says "Protecting your engines," the body asks for designing an engine with certain parameters. Ask either about an engine, or engine shielding please. We can not allow both of these in a single post. You are certainly welcome to create a second question related to this one for further development of your world. Below I have helped rephrase your last paragraph to remove the "if you have ideas" and "Feedback" language which invites brainstorming. Consider replacing the final part as follows:
Comment: @Kugelblitz Last paragraph - without opinions: "I am looking for a solution that will allow ships to maneuver in the extreme conditions outlined above. The solution must be able to move the ship and withstand the impact of a 50 terajoule projectile. The solution must also be based on known physics and not be highly speculative." This will give better understanding of your engine problem, though the "engine protection" question should be moved elsewhere.
Comment: This sounds more objective and focussed. I removed my close vote. Good luck!
Answer: You have giant, heavy battleships doing very short flybys of each other at relativistic speeds with very short engagement times, evasion will be pretty much not a thing. So just cover up any exhausts or engines with movable armor plates before entering into close combat and become a flying brick.
Comment: To add, initiate a rollover maneuver while flying by, so that the engines are always directed away from the rival fleet. If possible of course, but if the fleets' ranks mix up, any collision might well obliterate both of them.
Answer: Reactionless drive is one option: "A reactionless drive is a hypothetical device producing motion without the exhaust of a propellant."
Because there is no need for exhaust, the drive can be positioned anywhere, and armored heavily from every side.
There is already one potential reactionless drive about to be tested.
Comment: Should be mentioned that reactionless drives are not proven to work and by a conventional understanding of physics they should not work.
Comment: @Vesper No, it is based on the idea of quantized inertia. It is said to defy laws of motion, but let's be realistic: conventional understanding of inertia is just as insufficient as our understanding of gravity. We are aware of the phenomenona, we know how to utilize them in conventional sense, but physics cannot actually explain it.
Comment: @NuclearHoagie While it possible that you are right, I myself cannot see any reason why operation would suffer from an armor. An important feature of a reactionless drive is that it can be completely enclosed, so why it would matter if it is enclosed inside thick armor? Re having an idea how it actually looks like, one is already peer reviewed: https://arc.aiaa.org/doi/10.2514/1.B36120
Comment: One drawback of reactionless drives is they instantly move you 1 tier down on the [Sliding Scale of Realism](https://tvtropes.org/pmwiki/pmwiki.php/Main/SlidingScaleOfRealisticVersusFantastic), as well as on the [Scale of Sci-Fi Hardness](https://tvtropes.org/pmwiki/pmwiki.php/SlidingScale/MohsScaleOfScienceFictionHardness) if you prefer that one. You can no longer be Star Trek (itself pretty soft), but you can still be Star Wars.
Comment: Is that link about an EM-Drive? That thing worked by having its outside wires interact with Earth's magnetic field.
Comment: @Vesper I somewhat agree, and I appreciate the doubt. However, it is worth mentioning that a billion-ton spaceship with a conventional drive needs immense amounts of fuel, which is also a problem in many ways (weight & volume, explosion hazard, need to refuel). And, if the situation is as described, exhaust is potentially such a problem that hindering your capability to move with a inferior way to produce thrust might not weight that much in the equation.
Comment: A fundamental problem with any sort of exhaust is that it creates such discontinuities in the armor, that the armor is actually _a lot_ weaker near the exhausts, where the ship is already most vulnerable - due to the exhaust. All methods to mitigate this problem make the ship clumsier, or even a sitting duck (if you cover the exhausts with armor in battle).
Comment: We have no idea what a functional reactionless drive actually looks like. I don't see why we can automatically conclude it can be placed anywhere and that it will still work just fine when encased in heavy armor, simply because it doesn't need an exhaust pipe.
Comment: Any reactionless drive is also a free energy machine, which is...problematic. And "quantized inertia" should not be mistaken for real physics. It has no actual theoretical or observational basis, and as far as it applies to reactionless drives, it was hastily mashed up technobabble to explain the EmDrive's thrust...something now unnecessary, the true explanation being incompetent measurements.
Comment: @ChristopherJamesHuff "Any reactionless drive is also a free energy machine" Where did you get this idea because AFAIK they are fundamentally different things? Do you have a source that would enlighten me.
Comment: @ChristopherJamesHuff I can't see any logic to your belief that a device that consumes energy to create momentum constitutes a perpetuum mobile.
Comment: Hmm a quantum of inertia? It should be very small, as even a photon has inertia. I doubt this could produce enough irregularities to alter movement of a billion-ton spaceship, unless the device weighs a lot more.
Comment: @MS the problem is that momentum is directly proportional to velocity while kinetic energy is proportional to the square of velocity. A reactionless drive will produce constant acceleration from constant power input, but constant acceleration means constantly *increasing* power output. All you need to do is put a reactionless drive to work turning a generator: at some rotation rate, power output will exceed power input.
Comment: @ChristopherJamesHuff "A reactionless drive will produce constant acceleration" Can you provide a source.
Comment: And usually examining the claimed mechanism easily reveals some more direct approach: if the EmDrive functioned as claimed, sticking one on the ground with the right end up would lead to gravitational acceleration constantly blue-shifting the radiation in the cavity, resulting in a net power output. There is nothing that makes conservation of momentum any less fundamental than conservation of energy, both are results of basic symmetries in physics.
Comment: That's what a reactionless drive *does*.
Comment: @ChristopherJamesHuff I would like to see a source that actually confirms that that is the case.
Comment: Fine. In comments to an answer on worldbuilding.stackexchange.com, user @JaniMiettinen defined a reactionless drive in passing as a "device that consumes energy to create momentum", and cited a paper on a purported drive with a conversion factor of 1.2 mN/kW. Are you done being willfully obtuse now?
Comment: @ChristopherJamesHuff The device creates momentum. That we can agree about. Where did you get the idea about blue shift? I am genuinely interested.
Answer: Tiny holes and long shafts - ion engines
The amount of time in the future gives some leniency. You can then opt for a certain form of ion or plasma engine, even if it might operate differently at such times.
The idea is simple. If you throw something away  from you, you'll get an equal thrust the other way. The harder you throw, the more energy is also used to propel you away.
Ion engines use this concept for 'efficient engines'. You simply throw miniscule particles as hard as you can in the opposite direction you want to go. Using methods that generate/contain more energy than chemical bonds you have ample energy in small packages, with a small resource to fire away. You can pair the insane power of nuclear (fusion) with a cloud of gas you can fire away. This setup allows for long shafts for the exhaust, with small openings in several directions for the direction. To make things more complicated but feasible on such large spaceships you can have (a) particle accelerator ring(s). In these rings the particles are accelerated, adding more and more energy, to eventually be released through the right exhaust tubes for thrust.
In current circumstances this wouldn't work. Any form of ion thruster is incredibly weak. They can accelerate spaceships over time to great speeds better than any other methods, but would be unfeasible for any maneuvering of battle spaceships. Not to mention that it is very hard to control particles exiting a particle accelerator ring at the right time. This heavily relies on the technological advances in your story, allowing enough thrust and accuracy to do so. As it isn't sure this would work, it will only loosely be based on something that is used in real life.
The result
Your exhausts are protected by being small and numerous, allowing for acceleration into any direction, redundancy of exhaust ports, as well as being closed when not firing at that time. Even if they are open, the exhaust tunnels are long enough that it's difficult to damage anything important, let alone the particle accelerator ring 'engine'. You could also argue that any debris that might block it can be burned away thanks to the particles in many cases, allowing the exhausts to unblock themselves during a battle if the damage isn't too great.
If I can paint a visual picture, instead of huge engine exhausts you can have sleek ships. Their hull seemingly one piece until it is required to move in the opposite direction. Many tiny holes open up, showing small flames of thrust. Not that ion engines would produce that effect, but the rule of cool allows it. From a distance it could give a certain colour to a part of the ship as it moves and manoeuvres, as well as give a plausible way to move in literally any direction or maneuver in any way.
Answer: Sometimes the simplest answer is the best. If you don't need to worry too much about mass, just have the main power plant buried deep in the body of the ship with a lot of redundant nozzles.
In battle shutter or otherwise shield your primary thruster (you're going to be maneuvering mostly) and using an array of smaller redundant thrusters. If they're damaged beyond repair? Jetsetton them
All that tubing also essentially acts as spaced armour. I'd even go as far as suggesting integrating the nozzles used into the armour as an outer layer away from the main ship, like slat armour or that can be replaced as entire units. Think those cubes in cubes machinists do to show off.
Answer: Well timed nukes
They use orion drives, dropping nukes behind them which will explode and push them in a particular direction. The nuke tube opens for a fraction of a second, releases the nuke, and closes, so enemies can't fire on them.
Answer: You leave them outside of the battlespace. By detaching them after you are up to speed, sending them in a parallel trajector to the combat-run. After traversing the battlesphere, the two reunite for the deacceleration and go-around push. If the combat capsule does not survive the engagement, the engine either returns to base or goes on a suicide mission.
The capsule has all the weapons, small "jump" thrusters and gyroscopes to change direction fast.
Comment: I don't think that is a clever solution. Once the combat cubes have no propulsion there is no reason to fight them. If the enemy just breaks contact and escorts them outside effective combat range the maneuver elements can't reattach and the combat cubes will eventually run out of supplies, drifting dead in space, for example.
Comment: Yes, but they are on a trajectory somewhere in the middle of nowhere flying nowhere. Unless the combat cubes are already brought onto a trajectory hitting important installations there is no need to engage them and you can just starve them out. Even if you have to fight the combat cubes, something small and fast with a few weapons can take out the maneuver elements and even if they manage to win the big engagement they will still starve.
Comment: Still better then to hang a part of the carrier to every fighter, that does them no good, but slow them down. And the carrier is the long time, longrange mobile one. It just bad in a dog fight.The carrier could even provide  longrange support fire which needs much energy.
Comment: ? Speed never decreases in space. So they remain at combat speed. And they have all the weapons needed. Add manouver thrusters, and you are set.
Comment: Mass makes you slow.. ditching mass before an engagement is very meaningfull. Acceleration  in a actual space combat time frame is meaning less. You can not change it meaningfull without pulping yourself. So yes.. you have lines that go through a volume. Spewing venom and eating poison. Longrange engines are useless ballast in a engagement with real physics.
Comment: They are useless during the engagement itself, but important for before and after. You are essentially arguing for a carrier doctrine, but in this version the carriers have to come pick up the fighters after the battle.
Comment: PS: In theory you could meet another engine, going into th e opposite direction, cable attach to it and do a  pretty radicual direction change... sort of a swing bye..
Answer: The drives are made mostly of magnetic field and are empty.
Your space ships are propelled by large magnetic confinement fusion drives. Their chambers and nozzles both are made of magnetic fields since no regular matter can contain nuclear fusion plasma anyways. In space there is no need to contain vacuum, so no hull is needed. Of course the drive needs fuel injection system, sensors and magnetic coils (however a significant portion of magnetic field is created by the plasma vortex itself). But those systems are:

mounted on a grid frame around the engine
relatively small and hard to hit while most incoming projectiles will simply fly trough the contained plasma into the space.
made redundant and replaceable.

The engines handwaved in a such way may even be considered the most durable part of the ship.
Answer: Throwing it out as an option not necessarily a recommendation. As far as RCS or directional thrust protection.....Don't...
Just assume anything outside of the armor and shielding is going to get fried.
Pitch roll and yaw can be induced with flywheels/gyroes, then just use your main thrust for any course correction.
Of course this is for battle conditions. Perhaps another configuration / method of maneuvering can be implemented while under normal operation.
Answer: Frame Challenge: Armor does not lead to bigger ships
There is a logical issue in your assumption that better armor leads to bigger ships.  In fact, better armor should lead to smaller ships because of the linear-cube law.  As you increase the size of a ship, the effectiveness of armor goes down very quickly.  Think of it like this.  Imaging you have a ship that is 10m long and has 1cm of armor; so, you decided to make a bigger ship with thicker armor.  To do this you need to make everything bigger.  Bigger engines to push the added weight, bigger power sources for your bigger engines, bigger crew spaces for the added maintenance needs... so when all is said in done, you scale the whole thing up and now it is 100m long with 10cm thick armor.
But here is the thing: in order to make your armor 10x as thick, you've increased the size, mass, and cost of your ship to be 1000x as much as the smaller ship.  This is because the science of armor penetration is all about focusing your energy into as small of a cross section as possible; so, when your 100m long ship gets hit by a shell that is only 10cm wide, only 2e-7% of your actual armor gets to do anything about trying to stop the shot whereas the 10m ship is contributing 2e-4% of its armor to block the same attack. This relationship of size to armor is why we still have armored tanks and attack helicopters, but not large armored naval ships.
Focus on active defense like shields and point-defense weapons
If a 10m ship has a shield that can block a 1e15J of total energy before draining it's power supply, then you must overcome 100% of the ship's shield before you can harm it.  So, if you scale this ship up to 100m, then you can block 1e18J before taking damage.  This creates a linear relationship between a ship's size/mass/cost and its defensibility.  Furthermore, by blocking all damage until the shield fails means that even a slightly smaller ship is at a big tactical disadvantage encouraging the constant development of larger and larger ships.
Likewise, if a 10m ship has enough interceptor missiles to shoot down 4 torpedoes, then a 100m ships can carry enough to shoot down 64 torpedoes using the same % of its allotted mass.
Active defense also means that there is no practical difference between getting targeted in the engine vs anywhere else on the ship because all hits are blocked until the defense fails.  Since it sounds like your setting already makes use of active defense, you should focus on these, because these will encourage bigger ships in a way that armor can not.
Soak hits using redundancy instead of armor
Maybe you don't want active defenses to be 100% effective.  Instead of making your ships armored, make them able to afford more hull hits. One advantage of a bigger ship is that it's much harder to design a weapon that can damage the whole thing; so, use that to your advantage. Instead of turning your ships into solid bricks of heavy armor with systems jammed in as tightly together as possible to make them all fit behind the armor, make them big, low density, and highly redundant so that when they do take a hit, the attacker over-pernitrates and only destroys a small portion of the ship, and any systems that are knocked out have 10 backups else where in the ship to keep it going.  So making it mesh like, spindly, or mostly hollow will increase the number of hits it can survive whereas armor increases how strong of a hit it takes, but will reduce the number of shots it will survive.

Your splash-back will be plasma and radiation, not debris
With the energy levels of impacts you are talking about, there will not be 5mm debris flying back at you.  Any debris that absorbed little enough energy to remain solid will not have enough momentum to reach you before you are well out of harms way.   Instead the only parts of tour target you need to be worried about are those that are turned into a cloud of plasma and radiation.  Because you are dealing with such long distances, the plasma and radiation with spread out a LOT by the time it reaches you making them barely more dense than conditions you could normally encounter in space.  It would be more like flying through a solar flare than what you think of as a debris field.
Comment: Good point about shields beying more effective, but the main premise is just confusing. For example battleships have grown to effectively carry better armor and firepower to punch through such armor, and stopped only after the nature of naval combat changed drastically with lighter anti-armor options and with aircraft, guided munition and submarines allowing hitting without getting hit. Context matters here, which is why I'm open to feedback on the context section of my post which is supposed to justify such close range armored combat.
Comment: Tanks carry armor to defeat lesser weapons systems, they don't fare too well against the weapons of their peers.  Ships no longer carry much armor because they're only facing the weapons of their peers and near misses aren't common enough to warrant armoring against them.
Comment: @LorenPechtel Yes, it takes a peer sized weapon to kill a tank, but it does not take a peer sized weapon to take out a ship.  A 20 ton fighter bomber can breach a 10,000 ton warship, but a 2 ton armored fighting vehicle generally can't pack the firepower to breach a 60 ton main battle tank despite being much closer in weight class to the tank than the bomber to a warship.
Comment: @Nosajimiki Ships are only facing weapons that can kill them even with armor.  Thus armor is just a hindrance.  Tanks face lots of weapons that can't kill them, armor is very useful.
Comment: @LorenPechtel Ships face smaller threats too: bombers, submarines, cruise missiles, etc.  Tanks have armor because armoring a tank usually works on smaller/cheaper threats.  Ships don't have armor because armor usually does not work on smaller/cheaper threats, and this difference has to do with the diminishing return on armor as you get bigger.
Comment: @Nosajimiki No--I'm saying ships face only ship-killer weapons and the bigger warhead has definitely beaten the heavier armor.  Tanks, however, operate in environments with a lot of lesser weapons they can armor against.
Comment: @LorenPechtel Ah, I see your point, but the issue of scale and armor is true as well.
Answer: This seems like a non issue, if your engines are electric.
To figure out how much electricity an engine uses to accelerate a spacecraft, you can use this formula
I = (m*a) / (V*E)
and the symbols represent the following:
I - current (amperes)
m - mass of ship (kg)
a - acceleration of ship
V - voltage of power  (i'm using 11kV as my example power)
E - efficiency of engines (as a percent, between 0 and 1)
plugging this in for a 1,000,000,000 ton ship @ 11.4 KV  and 1 m/s2 of acceleration and 100% efficient, we get an electrical current of 82.47MA,that's Mega-Amps.
using ampere's law, we can calculate the magnetic field using
B = uNI/L
B - Strength of magnetic field (tesla)
u - Permeability of free space
N - number of complete loops are made around the thrust axis
I - current (amps)
L - length of engine bay.
Plugging in a 500 meter long engine bay, and 1000 turns (depending on your setting you may need way more or way less), and assuming the bay is mostly empty space (permeability close to 1), this gives us 200 Tesla. this is about the strength of 130 MRI machines, or about 2 Helmholtz coils.
with a bit of engineering, one can reasonably push the magnetic field to the outside of the engines where the effect seen in the video (the loss of kenetic energy in conductive objects) will stop debris. of course, you can tweak all of these numbers to suit your needs. maybe 1 m/s2 isn't quick enough, or there are less coils in the engine bay, but the fact remains that magnetic fields are incredibly useful at stopping metallic debris such as meteors and certain projectiles.
The weakness of such a system is that the magnetic field is only active while the engines are on, and so for an engine to be off is for an engine to be unshielded.
Hopefully this is a good foundation to work off of in your writings!
Comment: I have downvoted this answer because the physics are false. Amperes equal ampere seconds per meter? Conservation of momentum, energy, and charge are really more of a suggestion?
Comment: The video demonstrates a very slow object compared to anything zipping around in space that is worth considering. Meteors will just disintegrate with the diamagnetic parts shredding anything in their path, likely similar to projectiles, they can even design the tip of the rod to detach if the middle part got caught.


Entry Search - Spinning Wheel of Death

Question: Noticed this particular issue with a site. I am currently using EE 2.7.3 and whenever I try doing a search under the "EDIT" section in the search field, I get a spinning wheel of death. Nothing happens.
Answer: This is a bug in 2.7.3, documented here. There's a fix in the bug report as well.

Entry Search - Spinning Wheel of Death


Feature length screenplay versus shorter formats

Question: Is there a logistical or practical reason why one should write a feature length screenplay (about 100 pages) rather than shorter screenplays (about 10-40 pages?) I'm considering this from the point of view of building experience, as well as from any advantage that either might bring.
Answer: Chicken or Egg
There is no 'correct' narrative length for stories.
However there are video markets that have ideal running times for shows based on many factors (technical, audience expectation, ticket sales), this is where the length comes from. The idea of 'feature-length' and 'short' screenplays comes from Hollywood distribution established over a century ago.
In the celluloid era, films were paced around film reels as units of quantity: newsies were 1-reel long, comedic shorts were often 2-reels (the actual running time varied based on thickness of the celluloid, image size of each frame, etc). Some prestige films lasted longer than 3 hours and toured with a roadshow.
With broadcast television. run times became very rigid to match their scheduled time slots, to allow for commercial breaks, and to remain competitive with other networks. In the brief history of YouTube, the ideal format length has changed arbitrarily on the whims of the content they promote through their algorithm.
Fitting the same story into long and a short formats can teach you certain skills, specifically how to fit a story to different formats, learning when to beef-up, consolidate, or remove characters, plot elements, and scenes.
It's important to remember that long after the original broadcast, TV shows and 2nd-run movies are cut shorter – any extra screenplay content is discarded after the film has been released. Meanwhile on DVD, films are re-cut to be longer, with extra content and deleted scenes added in – none of this is for the benefit of the story, this is 100% marketing and the constraints of time/data according to the distribution format.
Writing scripts is not creative writing
If you want a job writing for broadcast television, the standard use to be to write an episode of a popular sitcom – your screenplay would never be produced but it shows that you can write for existing characters and understand the production format – key skills you will need in the writing room.
I've heard since Netflix, the industry pitch has become to write your own crazy show – the crazier the better – proving you have the skill to pitch crazy ideas to Netflix, which will also never be produced…. I can't imagine this trend continuing forever since Netflix has financial swings and is currently criticized for scattershot productions which are often terrible and just as quickly cancelled.
Professional screenwriters will follow the money. It's extremely unlikely that the executive who 'greenlights' a show has ever read the screenplay, or has heard anything more than an 'elevator pitch' idea which sounds marketable. In that environment, shows are pitched as ideas and the scripts come later, written to fit the show.
Unless you have your own production company, you will not have any say over what content from your screenplay ends up on film. Scripts go through many iterations, and many writers on the way through production. A typical screenwriter will work on another author's screenplay to get that script production-ready.
Write what you want
If you are writing for your own pleasure there are no hard rules.
You will learn by applying your ideas to established formats with 'Save the Cat' pacing – the story won't necessarily be 'better' but casual audiences will recognize the familiar story beats that conform to their expectations which should make the screenplay more commercially accepted (at least by the standard set by blockbuster movies in the 1980s).
Many writers benefit from format constraints, it's a balance of their open-ended creative ideas and narrow established conventions of the market.
If you want a job writing screenplays there are MANY rules which are constantly drifting based on how the industry works at any given time. Having the skillset to adapt your ideas to different formats will be useful no matter what format is currently trendy.
Answer: I believe if you are going to sell something or compete in a contest, the most likely thing you can sell (these days) is the feature length script; 90 to 110 pages. With exceptions: The point is to create about 100 minutes of screen time, but one minute of action is described in fewer words than one minute of dialogue. In "The Quiet Place", there is exactly ONE line of dialogue; the rest is action, so the screenplay is just 67 pages long.
So if you have little dialogue, you can do shorter, if you have more, maybe longer, but not over 120, and every page after 110 decreases the odds of it getting past readers.
Comedy also tends to run shorter; shoot for 90 pages.
In general tend to the shorter side of the range instead of longer: Within reasonable limits, a director can stretch scene length, but it is harder to compress scene length without leaving something out or the action or dialogue feeling rushed or incomplete.
Going to 40 or 50 pages is in the "hour long" time slot, an episode of an ad-supported TV series (with commercials, there are 44 minutes of screen time. Without commercials, like HBO or Netflix, you need 60 minutes of screen time).
Here is a description of TV formatting:
https://www.studiobinder.com/blog/how-long-is-a-tv-show-script/
Typically we follow the one-minute-per-page average, that is a range a director can stretch or condense to meet time limitations. But again, stretching is easier than condensing.


Select Case on Radiobutton group is it possible?

Question: I have say 4 asp.net radiobuttons which are grouped, I want to find out which one is checked.
What seems natural to do is:
Select Case RadioButton.Checked = True
        Case myRadioButton1
        Case myRadioButton2
        Case myRadioButton3
        Case Else

End Select

I just get a 'reference to a non-shared member reference' error. It's a shame because it seems such a clean way to do this test.. Is it possible??
Answer: Select Case True

  Case RadioButton1.Checked

  Case RadioButton2.Checked

  Case RadioButton3.Checked

  Case Else

End Select

Comment: So simple can't believe I didn't think of it.. well played!
Answer: No. The Checked property of class RadioButton is non-shared, so you cannot get its value unless you have an instance. You can do this using an ElseIf chain, but the cleanest solution IMO is to use a RadioButtonList instead, which will allow you to add items dynamically and read the selected item in one call, just like with a DropdownList.
Comment: I need granular control over radiobutton placement. Radiobuttonlists are horrible.. They wrap the radiobutton in a  and apply classes to the span not the input..
Answer: You could use a RadioButtonList  instead.
You can only check for primitive data-types in select/case. With normal RadioButtons you could only check for a reference in the CheckedChanged Event when all CheckBoxes are handled there. For example:
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        AddHandler Me.RadioButton1.CheckedChanged, AddressOf CheckedChanged
        AddHandler Me.RadioButton2.CheckedChanged, AddressOf CheckedChanged
    End Sub

    Private Sub CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs)
       If sender Is Me.RadioButton1 Then

        ElseIf sender Is Me.RadioButton2 Then
            '........
        End If
    End Sub

But that was not your question anyway. Use a RadiobuttonList instead as i mentioned above or a If/else on checked-state because it is more natural.


Old Ceiling Junction Box Removal

Question: Hey I just bought an older co-op from the 50's. I want to put a ceiling fan in but ran into trouble.  I was trying to take down the existing box and it has a nipple in the middle with a flat head screw slot in the bottom.  I bought the usual box and anchor mechanism to put in but I have no idea how to get this box out.  Obviously I can't go in through the top due to the co-op situation.  Please help.  Maybe a YouTube video or something how to remove it. Thanks.
Comment: I CANT go through the top due to the co-op situation.
Comment: The existing box may be the type which is rated for a hefty chandelier or a ceiling fan up to some specified weight. I think that large center screw clamps the box onto a metal crossbar which spans two joists.  How heavy is this ceiling fan?
Comment: I believe @JimStewart is on to something.  In other words, maybe revise the question to ask how to mount to it rather than ask how to remove it?
Answer: Jim Stewart's comment is pretty much right on.
That is not a nipple it is what is called a "hickey" by the National Electrical Code. It serves to attach the box to a hanger bar or other spanning device.
It looks like you may have a pretty stout box already and may not need the fan box.
I usually look for a ceiling hugger style fan and toggle bolt it directly to the drywall/plaster. This eliminates the need for fan box.
Good luck!

Old Ceiling Junction Box Removal


Account owner not able to add Account Team

Question: I'm facing a issue where an Account Owner is not able to add Account Team Member.
He is able to see all the users but still after clicking Add Team Member button, option to select user is not visible.
Is there any permission needed to add Account Team Member?
Answer: Check these things:-

To add team members to an account:  Read on users AND Edit on accounts
Who can manage the account team members depends on the users' access. Account record owners and users above the owner in the role hierarchy can add, edit, and delete team members.
Your page layout of account team member determines which fields are visible and your access to the account determines which fields are editable.

Reference:- Account Team Fields and Add Account Team Members
Comment: It was page layout assignment issue, looks like for Account team member salesforce never assign default page layout
Comment: You can mark it as accepted if it has solved your problem.