( being recursive means that there’s an algorithm which similarly takes as input but outputs whether .)

]]>

**Proof outline** Assume isn’t complete. Then there’s a sentence such that , meaning are satisfiable, meaning both have infinite models (since has no finite models), so by [172] we can find models of cardinality which respectively satisfy these theories. But since disagree on , they are not elementarily equivalent and hence not isomorphic, contradicting the assumption that is -categorical. Thus must be complete.

]]>

This result — a variation of the Löwenheim–Skolem theorem — implies that theories with infinite models can’t have unique models up to isomorphism.

]]>

.

]]>

For instance, an example in C (a language prone to this problem) taken from Wikipedia:

{ char *dp = NULL; /* ... */ { char c; dp = &c; } /* c falls out of scope */ /* dp is now a dangling pointer */ }

If a dangling pointer is attempted to be dereferenced, unpredictable (incorrect/garbage) behavior can result.

]]>

**Proof **Let be finite and suppose . Then is satisfiable, so is finitely satisfiable and by the compactness theorem .

]]>

In certain circumstances, memory leakage may not cause big problems or might even be asymptomatic, like in programs with a little memory leakage which never actually run for long enough periods of time that memory usage becomes a problem. However, in worse cases memory leakage can lead to the complete failure of a program.

A couple types of programs at high risk for memory leakage are those in embedded systems (which can run continuously for years at a time, giving even small leaks the potential for being problematic) and those where memory is allocated extremely frequently for one-time tasks (such as rendering in a video or game).

While many languages like Java have built-in garbage collection which automatically cleans up unused or unaccessible memory, other languages like C and C++ require the programmer to be on top of making sure these leaks don’t happen in the first place. However, there are memory management libraries and memory debugging tools written to help with these languages. It should also be noted that automatic garbage collection comes with a performance overhead, so whether it’s desirable varies depending on the situation.

]]>

Assuming the axioms of Zermelo-Fraenkel set theory, Zorn’s lemma is equivalent to the axiom of choice and the well-ordering theorem, respectively.

]]>

When are *finite* structures, however, the two conditions are equivalent. That is,

.

]]>

Let be a first-order language and be a finitely satisfiable -theory.

We can construct a language and a finitely-satisfiable -theory such that any -theory extending has the witness property. The way we do this is by first adding a constant symbol to for each -formula with a single free variable, calling the result . For each such we also add to the -sentence

,

calling the resulting -theory . We then keep doing this indefinitely and call the unions of all such languages and theories and , respectively, with the result that is finitely satisfiable and any extension thereof has the witness property.

We then extend to a finitely-satisfiable and *maximal* -theory which by the above will also have the witness property. The way we do this is by adding either or to for each -sentence (exactly one of which will keep the theory finitely satisfiable).

Now that we have an extended theory (within an extended language) which is finitely satisfiable, maximal, and has the witness property, we show there is a model of it, which will obviously also be a model of our original theory .

We define the universe of to be the set of constant symbols of modulo , where is the relation such that

.

We also define

,

,

where is a function symbol and is a relation symbol of .

We then proceed to show by induction on terms and formulas that

for all sentences . This shows that is a model of , and thus is a model of , which is what we wanted.

]]>