Highest value prep document is probably Shivi’s Final Slides.

Countability

Remember to show that the function is TOTALLY-DEFINED and WELL-DEFINED for the proof to be valid!

Countable: Use different sets

To prove is countable we can also show an injection from where is any countable set:

  • union
  • direct product
  • finite bitstring of a countable set, as these are all countable.

Countable: Injection delimiter

We can use a character like or # which is not in to use as a delimiter when concatenating. This resolves issues like "" and "" mapping to the same natural number when concatenated in a function .

Countable: Prefix to fix leading 0s

We can add a to the start of our injection’s output to prevent leading s from being an issue.

Uncountable: By injection from

See exercise Sheet 6.6.3.

We define an injection from the uncountable set to . Let , where as:

  • , or
  • , it is thus clear that the image is thus a subset of as the conditions of are satisfied.

is injective as for and in distinct, let be the first position at which they differ. Then . Let and . By construction, thus and thus injective.

At the end show that if it was countable, we’d have a contradiction with . Thus it’s uncountable.

Uncountable: By Diagonalisation

See exercise Sheet 6.6.1.

Sets, Relations and Partial Orders

Lattices

is not a lattice, as do not have a unique greatest lower bound, as both and lower bound them, but are not comparable themselves, i.e. there’s no least/greatest.

Number Theory

Ideals, etc…

When assuming there is a minimum positive element in a subset of , then we have to show that a positive element exists.

Modulo Exercises

Modular reduction

We can reduce by if , i.e. and are coprime.

Errors:

  • Note that we can’t simply reduce by .
  • Give the answer as a positive number, i.e. wrap around the modulo. as the remainder function is defined for positive remaineders.

Case Distinction

Try a table if the mod is not too large. Ex: ?

We can argue here. Since is prime, and not . and thus all are divisible by 3 and therefore not prime.

Formal Answer from Exams: First see that for is composite:

  • Now we consider all primes modulo : either and thus it is divisible by and thus not prime or and thus it is divisible by and thus not prime. The case for does not occur as else would be divisible by and thus not prime. We conclude that is not prime for prime.

GCD of two absurd numbers

We can reduce a number in a gcd modulo the second number by Lemma 4.2 ().

Example: Compute the .

  1. We can use the fact that and reduce . Then by Lemma 4.2 .
  2. We can also factor everything into primes, using and thus . The rest is not divisible by anymore since .

GCD Possible Values

Don’t forget to give as a possible solution.

Set of Solutions to a congruence system

We can use normal techniques to solve the system of equations. Remember to give the solutions in the required form at the end: , ex: .

If the two equations are colinear, we just have to solve one of them (state that they are colinear though) Example.

CRT Solving

TODO: Exact steps

A CRT system has a unique solution if and only if the all are coprime.

If that is not the case, we have to check if we can decompose equations into smaller ones: \begin{align*} x \equiv_{10} 3 \\ x \equiv_{2} 1 \\ x \equiv_3 2 \end{align*} has a solution even though and are coprime as we can decompose   into  and  which matches the other equation. Thus the solution is still unique.

Algebra Exercises

Prove Subgroup

We need to show: 0. (Subset)

  1. Closure
  2. Neutral element
  3. Inverses are in Subgroup

Number of Subgroups of

The formula here is .

For this gives and which leads to the following: and which gives . Answer

Number of Subgroups of

Isomorphic to , and that group has divisors thus subgroups.

Order of element in direct product

group and s.t. . What is the order of ?

We have and , thus . In the same way .

Therefore . Indeed . https://exams.vis.ethz.ch/exams/j3t8gtp0.pdf?answer=it57ztn6rqzypeaa

Maximum order of direct product

for see.

Generators of

To find a generator of , we list all elements first Note that the order is . As the subgroup order divides the group order, all subgroups have order . Therefore we need to find an element such that and .

Inverses in a (group)

The neutral element in such a group is (it’s multiplicative). Inverse of : .

Example Inverse of in We want to solve ( as there’s no degree polynomials in this group). . We have in this group (calculate to simplify here), thus is our final equation. We solve these two component equations:

  • (we want )
  • (for the at the end)

and thus (if it’s not clear here, for example , we take the modular inverse of ) thus .

Find zero-divisors of

Note that this only makes sense in without otherwise there wouldn’t be any! We have to list all multiples of the divisors of , so in the case of its divisors are thus the multiples are .

not in the multiplicative group

Because has no inverse, for any multiplicative group , etc… !

Generators of Subgroups of

Isomorphic to which has subgroups. The groups are . Note that they are generated respectively by We use the canonical isomorphism to get the generators of subgroups.

  • Which are all the generators.

Find all which aren’t units

In we have thus all that don’t have a factor are units. Thus non-units are , and all multiples: and

Disprove Isomorphism

Disprove that and are isomorphic. has elements but is not cyclic! is cyclic, thus there cannot be an isomorphism.

Logic Exercises

Find CNF and DNF formulas

Note that CNF and DNF are not mutually eclusive.

Circle all such that

Watch out for tautologies as is always true! models even though they share nothing as is a tautology.

Resolution Calculus Proofs

The statement is equivalent to is unsatisfiable (Lemma 6.3). … Using the resolution calculus we have shown that thus is unsatisfiable. Therefore, (Lemma 6.3).

Proof Systems

Prove that: ” complete complete

We use an indirect proof. Assume that are incomplete. Then there exist and (otherwise vacuously complete). Thus we have and . Thus but forall \phi_3((s_1, s_2),(p_1, p_2)) = 0\Pi_3$ incomplete.

Semantics Proofs

We can transform:

  • for all into for all (according to Leo)

General Formula

Let be a suitable interpretation for both (LHS) and (RHS) such that it is a model for (LHS).

Perform the changes here until we get Thus the statement holds and .

Note that the transformations that one is allowed to do generally follow those that are noted in Lemma 6.7. They can’t be justified in natural language, as they just make sense (by Leo in Discmath Chat).

Note that if we are asked to prove a literal statement from Lemma 6.7, we obviously can’t just use it directly. Like here in the exercise sheet for :

The following step (swap) had to be justified: \begin{align} \iff & \mathcal{A}_{[x \to u][y \to v]}(F) = 1 \text{ for some } u \in U^{\mathcal{A}} \text{ and some } v \in U^{\mathcal{A}} \tag{3} \\ \iff & \mathcal{A}_{[y \to v][x \to u]}(F) = 1 \text{ for some } v \in U^{\mathcal{A}} \text{ and some } u \in U^{\mathcal{A}} \tag{4} \end{align} was justified using

  • ,
  • ,
  • and on all other variable symbols we have .

Semantics of quantifiers

When substituting a bound variable after applying the semantics, of a quantifier, we don’t swap the variable for the bound one: and not !

Prenex form

Prenex parentheses

Remember that quantifiers bind harder than operators!! Thus for the prenex form we need parentheses all around.

Proper syntax of substitution by function

See ansWwer.

Example: . As is suitable for both sides, defines a function , denoted .

Then we can say \begin{align*} A_{[z \rightarrow u]}(P(z)) = 1 && \text{ for all } u \in U^{\mathcal{A}} \\ \mathcal{A}_{[z \rightarrow f^\mathcal{A}(u)]}(P(z)) = 1 && \text{ for all } u \in U^\mathcal{A} \\ \mathcal{A}_{[z \rightarrow u]}(P(f(z))) = 1 && \text{ for all } u \in U^\mathcal{A} \end{align*} Justifications:

  1. for . And as for all , this doesn’t change anything.
  2. means we can simply replace by .

Proper syntax of free bound by

See answer.

We can quantify a free variable with an existential quantifier using the following justification.

  • as (this is the definition of interpretation).
  • as (substitution)
  • for some (as ).
  • (semantics of )

Universal Instantiation

See FS19

When a universal quantifier disappears on the right side of the formula, we use the rule for universal instantiation which states: We can then just remove the forall and replace the variable by another.

Interpretation for or formulas

If we need to find an interpretation for a formula that looks like this or , then we need to find a formula that replaces or ! This is written as or and not as or !