brain
tamnd's digital brain — notes, problems, research
43815 notes
Memory is where a program keeps its data while it runs.
An error set is a group of possible error names.
Zig has blocks.
Functions often need to produce results.
A keyword is a word that has special meaning in Zig.
Most programming languages need a way to handle failure.
A while loop repeats while a condition is true.
Programs often need to repeat work.
Names are part of the program.
Function parameters are the inputs of a function.
Functions are reusable blocks of code.
An if statement is good for general conditions:
Comments are notes for humans who read the code.
A string is text.
Initialization means giving a value to something when it is created.
In Zig, undefined means “this value has not been initialized.”
Type inference means Zig can figure out a type from the value you write.
A boolean is a value that can be only one of two things:
Floating point numbers are numbers with fractional parts.
Integers are whole numbers.
Every value in a Zig program has a type.
Sooner or later, every Zig beginner meets the compiler.
You can write Zig code in any text editor.
So far, we have used single-file programs.
When beginners hear the word “compiler,” they often think of one job:
In the previous section, we used this command:
Now we will write and run a complete Zig program.
Before writing larger Zig programs, you need to understand an important fact:
Before we write more Zig code, we need the Zig compiler.
Zig exists because low-level programming is still important, but the old tools have painful tradeoffs.
Programs need to make choices.
A program stores values so it can use them later. In Zig, you store values with two main keywords:
Zig is a programming language for writing programs that are fast, clear, and close to the machine.
Zig is a programming language for writing fast, small, reliable programs.
Zig is a programming language for writing fast, small, reliable programs.
A set is a collection of objects called elements.
Modern number theory continues to evolve rapidly.
The Langlands program is one of the largest and most influential research programs in modern mathematics.
An elliptic curve over $\mathbb{Q}$ may be written in Weierstrass form
The Riemann zeta function is one of the central objects in mathematics.
Fermat's Last Theorem states that there are no positive integers
Number theory contains some of the oldest and deepest unsolved problems in mathematics.
Arithmetic statistics studies the distribution of arithmetic objects inside large families.
Prime numbers are deterministic objects, but many aspects of their distribution resemble random behavior.
The Riemann zeta function is defined for $\operatorname{Re}s>1$ by
Sieve methods are extremely effective for estimating how many integers avoid small prime factors. They have produced major results about:
The Twin Prime Conjecture states that infinitely many primes satisfy
A probabilistic algorithm uses random choices during its execution. In number theory, this is often a practical advantage rather than a weakness.
The Prime Number Theorem for arithmetic progressions states that for
The classical Langlands program relates:
Write the two integers as
One of the central problems of analytic number theory is understanding how primes distribute among residue classes.
A primality test determines whether an integer is prime.
Modular curves parameterize elliptic curves and connect modular forms with arithmetic geometry.
Fourier analysis decomposes functions into harmonic frequencies.
Classical sieve methods estimate how many integers survive congruence restrictions. The large sieve approaches these problems from a different direction.
One of the deepest ideas in algebraic number theory is that prime numbers possess hidden symmetry inside field extensions.
Let
Brun's sieve introduced the idea of estimating sifted sets through truncated inclusion-exclusion. However, Brun's method often produced bounds that were technically difficult...
A positive integer is called $y$-smooth if all of its prime factors are at most $y$.
The Riemann zeta function
Sieve methods are techniques for counting integers that remain after removing residue classes modulo primes.
In the ordinary integers, every nonzero integer factors uniquely into prime numbers.
Number theory often studies exact statements about individual integers. For example, one may ask whether a given integer is prime, squarefree, smooth, or representable as a...
The Langlands program predicts that many different arithmetic objects are connected by systematic transfers.
In additive number theory, ordinary asymptotic density is often too weak to control additive behavior.
Classical number theory studies arithmetic globally over fields such as
A zero-knowledge proof allows one party to convince another that a statement is true without revealing why it is true.
Galois groups encode the symmetries of algebraic equations and field extensions.
A central question in additive number theory asks whether every integer can be represented as a sum of elements from a fixed set.
The real numbers arise by completing the rational numbers using the ordinary absolute value. The $p$-adic numbers arise by completing the rational numbers using the $p$-adic...
Modern public-key cryptography relies heavily on two computational assumptions:
The Langlands program is one of the most ambitious and influential theories in modern mathematics.
Exponential sums are among the central tools of analytic number theory.
In ordinary analysis, the absolute value
Ordinary integers satisfy several remarkable properties simultaneously:
Study empirical properties of prime numbers through computation.
Lattice cryptography is a family of cryptographic systems based on the presumed hardness of computational problems on high-dimensional lattices.
Many problems in additive number theory ask whether an integer can be represented in the form
Classical modular form theory begins with analytic functions satisfying symmetry conditions.
Let $R$ be a commutative ring. An ideal $I\subseteq R$ is called principal if there exists an element $\alpha\in R$ such that
Waring's problem asks whether every sufficiently large positive integer can be written as a sum of a bounded number of fixed powers.
Pairing-based cryptography uses special maps defined on elliptic curve groups. A pairing is a function
Modular forms are functions on the upper half-plane satisfying symmetry conditions under the modular group
The discriminant is one of the most important invariants of a number field. It measures how the arithmetic of the field differs from ordinary rational arithmetic.
Goldbach-type problems ask whether integers can be represented as sums of primes. They are among the oldest and most famous problems in additive number theory.
Elliptic curve cryptography is a public-key cryptographic framework based on the arithmetic of elliptic curves over finite fields.
For centuries, elliptic curves and modular forms were studied as separate objects.
Let $K$ be a number field and let
In ordinary integers, every ideal is generated by a single element:
Additive number theory studies arithmetic structure through addition of integers and subsets of integers.
Secure communication requires two parties to share secret information. In classical symmetric cryptography, both parties must already possess the same secret key before...
An elliptic curve is simultaneously:
1. Prove that the sum of two even integers is even.
The classical Riemann Hypothesis concerns the zeros of the Riemann zeta function
In ordinary integers, every number factors uniquely into primes. In many rings of algebraic integers, this property fails.
One of the central properties of the ordinary integers is unique factorization.
Let $K$ be a number field of degree
Classical cryptography uses a shared secret key. Both sender and receiver must know the same secret information in advance.
The modular group acts on the upper half-plane by fractional linear transformations: