The VikiD Truth

Knowledge base / Mathematics / Logic, sets & foundations

Abstract Algebra | ZF Axioms | Math on Computers | Computing

abstract

viKid Abstraction

What is Abstraction?

Abstraction is at the heart of both Mathematics and Computer Science.

In fact I believe both Mathematics and Computer Science are the embodiment of forms of Abstraction.

I will save you from technical definitions, you can find that with a cursory search or at the links at the bottom of the page.

What I want to discuss here is more philosophical and I think we can begin to look at the subject from,

points of view.

The plain idea

To abstract is to throw information away on purpose. You look at a pile of particular things, decide which details don’t matter for the question you are asking, and keep only the pattern that is left. The word itself comes from the Latin abs-trahere, “to drag away”. You drag away the irrelevant until only the relevant is standing there.

That sounds like a loss, and it is. But it is the most profitable loss in human thought. What you lose in detail you gain in reach: the pattern you kept now applies to every situation that shares it, including ones you have never seen.

Why it matters

Every time you use a word you are abstracting. “Dog” covers a chihuahua and a wolfhound, two animals that have almost nothing in common except the thing the word points at. Without abstraction we would need a separate name for every single object, and we could never learn anything that transfers from one case to the next.

From the four points of view above:

An everyday analogy: the London Tube map

Harry Beck’s 1931 Underground map is wrong about almost everything. Distances are distorted, the river is a tidy curve, stations that are a five-minute walk apart look far away. And yet it is one of the most useful pictures ever drawn, because Beck threw away geography and kept only connection: which station follows which, and where you change lines. For a passenger, that is all that matters. A perfectly accurate map would be worse for the job.

That is abstraction in one picture: a deliberate simplification that becomes more useful because it is less detailed.

Abstraction in Math

Mathematics is abstraction done in layers, each layer standing on the one below.

  1. Counting. Three apples, three stones, three days. Drag away the apples, stones and days and you are left with three: the first great abstraction, a number.
  2. Algebra. Notice that 2+3=3+22 + 3 = 3 + 2, and 7+10=10+77 + 10 = 10 + 7, and so on forever. Drag away the particular numbers and write a+b=b+aa + b = b + a. Now you are talking about all numbers at once.
  3. Structures. Notice that adding numbers, composing rotations, and shuffling cards all obey the same four rules: closure, associativity, an identity and inverses. Drag away what is being combined and you get a group. Now you are talking about all systems that behave like that.
  4. Categories. Notice that groups, sets, vector spaces and topological spaces all come with “structure-preserving maps” between them. Drag away what the objects are made of and keep only the arrows, and you get category theory, sometimes affectionately called “general abstract nonsense”.

A worked example

Take three facts:

Abstract them, and they are the same fact: there is an element that does nothing. Call it the identity ee, with e⋅a=ae \cdot a = a. Now prove one theorem about identities, for example that a group has only one identity:

e=e⋅e′=e′ e = e \cdot e' = e'

The first step uses that e′e' is an identity, the second that ee is. Two lines. And because we proved it in the abstract, it is now true for numbers, matrices, rotations, Rubik’s cubes and any system nobody has invented yet. One proof, infinitely many payoffs. That is the whole bargain of mathematical abstraction.

Abstraction in Computing

Computing is the same trick pointed at machines. A modern computer is billions of transistors switching on and off, and nobody could program it at that level. So we build a tower of abstractions:

graph BT
  A[Transistors and voltages] --> B[Logic gates: AND, OR, NOT]
  B --> C[Machine code and registers]
  C --> D[Assembly language]
  D --> E["High-level languages: C, Python, Lisp"]
  E --> F[Functions, objects, libraries]
  F --> G[Apps you actually use]

Each layer hides the one beneath it. When you write a function area(r) you stop caring how it computes and care only what it promises. That promise is called an interface, and it is the programmer’s version of the mathematician’s axiom: a short list of rules that everything above is allowed to rely on.

The link between the two worlds is deeper than a resemblance. The lambda calculus, Alonzo Church’s 1930s logic of functions, is literally both a piece of mathematics and the ancestor of Lisp and of functional languages. In typed functional programming the Curry–Howard correspondence says that a type is a proposition and a program is a proof. Mathematics and computing are two dialects of one language of abstraction.

Common misconceptions

How it connects

The truth revealed: abstraction is not running away from reality. It is choosing what to look at so that you can finally see it.

Last edited · 7 revisions

Tags: #Math