Войти в систему

Home
    - Создать дневник
    - Написать в дневник
       - Подробный режим

LJ.Rossia.org
    - Новости сайта
    - Общие настройки
    - Sitemap
    - Оплата
    - ljr-fif

Редактировать...
    - Настройки
    - Список друзей
    - Дневник
    - Картинки
    - Пароль
    - Вид дневника

Сообщества

Настроить S2

Помощь
    - Забыли пароль?
    - FAQ
    - Тех. поддержка



Пишет nancygold ([info]nancygold)
@ 2024-06-19 15:43:00


Previous Entry  Add to memories!  Tell a Friend!  Next Entry
Настроение: contemplative
Музыка:Pilotpriest - Xanadu
Entry tags:computing

Mathematics Considered Harmful

The introduction course into mathematics starts with the so called first order
logic. It is similar to the CPU logic, but deals with natural language
statements and doesn't have any temporal components, introduced by CPU cycles.

These statements are joined by connectives.
For conveniences we will use `+`, `*`, `~` for `or`, `and` and `not`.
But there are additional connectives defined using these.
For example, the unidirectional implication:

  A + ~B          # A or not B

The macro form for that is `A -> B` (A implies B)
Math macros are like ARM assembler macros, not the Lisp macros,
although they do have the so called axiom schemas, which
are defined using ebonics like prose.
The entirety of math has that ghetto rap battle feel to it.

Lets use it to produce the formula for bidirectional implication:

  A -> B
  B -> A
  --------------------       # Expand these into components
  A + ~B
  B + ~A
  --------------------
  (A + ~B) * (B + ~A)        # Combine both expressions into one
  --------------------
  A*B + ~B*B + A*~A + ~B*~A  # Perform multiplication
  --------------------
  A*B + ~B*~A                # Eliminate the cancelled items
  --------------------
  A*B + ~(A+B)               # Move `~` out

The macro form for that is `A <-> B`


Lets check it by assuming A=1
  
  A <-> B           # Base theorem in a macro form
  ---------------
  A*B + ~(A+B)      # Expand the sugar
  ---------------
  1*B + ~(1+B)      # A=1
  ---------------
  B + ~(1)          # Constant elimination (* advances, + shortcircuits)
  ---------------
  B + 0             # ~1 = 0 (by definition)
  ---------------
  B                 # B=1 too!


These `->` and `<->` are a bit similar to the `if/else` and for loops in C/C++,
but, again, they have no temporal component, and therefore just simple boring,
connectives.

Note also that in computing we start with a single `&` operation, instead of
`*`, `+`, and `~`, defined in that above notation as

  ~(A * B)
  -----------
  A & B

That is called NAND (not and). And can be used to implement `*`, `+` and ~`,
even in the 1st order logic.

And that my friends is basically what the math is all about. In other words, low
level bit twiddling, but with a layer for pretentious snobbism.

Of course mathematicians also introduce the so called Set Theory, also called
second order logic. Which is a pseudo-philosphibcal paperwork, using bombastic
star-trek names like `the axiom of infinity` or `universal quantification`.
Mathematicians use these to produce a lot of nonsense statements, completely
detached from reality. Pure existentialist schzobabble.

So if you want to be a decent human being, stay away from math as you would stay
away from the OOP crowd and the Uncle Bob's religion. Math is even more useless
than an infinite set of unit tests.

Cheers!


(Добавить комментарий)


(Анонимно)
2024-06-19 16:31 (ссылка)
>Of course mathematicians also introduce the so called Set Theory, also called second order logic.

That's wrong. Second-order logic is a legitimate logical calculus, not something axiomatically defined within logic like ZFC.

>Math is even more useless than an infinite set of unit tests.

Nice trololo, mr dumbass.

(Ответить)


[info]aryk38
2024-06-19 17:50 (ссылка)
ууу. лекции второво курса.

(Ответить) (Ветвь дискуссии)


[info]aryk38
2024-06-19 17:50 (ссылка)
карты карно

(Ответить) (Уровень выше)


[info]nancygold
2024-06-19 18:52 (ссылка)
IIRC the sets and the quantifiers are introduced in school math, while the first order logic and axiom schemas are never introduced for some reason, unless you open some foundations of math book.

(Ответить) (Уровень выше)


(Анонимно)
2024-06-19 20:33 (ссылка)
Vse tak. Math is not even monadic and has side effects. The legacy naming conventions are horrible too. I'll take cobol over math any day

(Ответить)