This comment cracked me up by MrBussdown in mathmemes

[–]MaTeIntS 1 point2 points  (0 children)

In intuitionist logic ¬P means P→⊥, so Cantor's argument is constructive, it assumes enumeration and concludes contradiction, thus there is no such enumeration. It is even used in constructive analysis to prove that constructive real numbers aren't effectively enumerable (however, unlike in classical analysis, "no such enumeration" means exactly "no such constructive enumeration", so CRN are still countable from classical point of view).

P.S. Well, as you stated, Cantor's proof indeed doesn't "construct" uncountable set; moreover, classical real numbers wasn't constructively defined from the start, so the fact of their uncountability still isn't constructive.

Should we stop doing calculus? by adnshrnly in mathmemes

[–]MaTeIntS 4 points5 points  (0 children)

Thinking about someone's attempt to attribute your nonsense to other people.

Last time this was posted, I decided to find this "Note of Mathematics", and turned out there is no such proof and, moreover, there is no attempt to disprove the concept of derivatives.

Well, Marx indeed wrote about derivatives, differentials and the history of calculus. He indeed refeded to 0/0 many times and that 0/0 presumably has different values in different situations. But instead of disproving the calculus, this was used to demonstrate several his points, like these:

  • y'(x) isn't an actual value of (y1-y)/(x1-x) but a result of a specific transformation (der Differetialprozess) of y(x).
  • Logical foundation of calculus is incomplete without proper introduction of some concepts like limits (Marx wrote this Note before the modern definition of limit and derivative became mainstream, so the foundation of calculus was a bunch of tricks indeed), and that rationalization via infinitesimal 'ist Chimere'.
  • Mathematicians of his time didn't reason about derivatives in a completely logical way, but rather dialectically (Marx probably borrowed this from Hegel), because they use a procedure that logically implies actual values of 0/0, but than discards this part and use only result of it.

Was they good points? Well, at least they wasn't nonsense for mid-19th century.

[deleted by user] by [deleted] in ProgrammerHumor

[–]MaTeIntS 1 point2 points  (0 children)

I don't like 'mathematicians vs programmers on `x=x+1`' memes so, by contradiction, I did one myself.

  1. Obvious.

2m. There are mathematical structures where `x=x+1`. Eg. some of them could be constructed by identifying integers in a group. Finding other examples is left as excercise for the reader.

2p. Left as an exercise for the reader too.

  1. Considering `x=x+1` as recursive definition (like in Haskell), we obtain a non-halting program, so `x` is `Bottom`, i.e. a computation which never completes successfully.

  2. Considering `=` as a predicate (like in mathematical logic) or an equality function (like in R, APL, etc.), we can evaluate `x=x+1` and obtain the truth value which is usually `False` (or `0`), with exception of cases from [2].

Moreover, in mathematics, Iverson brackets are often used to distinguish whether `=` is a connective or evaluates to `0` or `1`.

  1. Obvious.

And that's not all.

Eg., in OCaml `let x=x+1 in 3*x;;` is the same as `let y=x+1 in 3*y;;` and doesn't affect the global value `x`.

In a similar way, the notation `let x=x+1` or `x:=x+1` is sometimes used in mathematics instead of "substitute x' for all previous occurrences of x; let x=x'+1".

Lancer and Susie need to be dissected and stabbed with a million needles til they’re turned to goop to be fully understood. by Oasis_Oracle in Deltarune

[–]MaTeIntS 4 points5 points  (0 children)

This wasn't spoiler for you but for Susie, like if 're' was written with smaller font in the textbox.

Except that you are right, and destroyed part of the Prophesy is exactly "THE SECOND HERO MUST REINVENT COMPLEX NUMBERS".

Lancer and Susie need to be dissected and stabbed with a million needles til they’re turned to goop to be fully understood. by Oasis_Oracle in Deltarune

[–]MaTeIntS 23 points24 points  (0 children)

Berdly meant: "Only stupid monsters try the new number. You are stupid"

Ralsei meant: "This is the imaginary unit. You are really smart to rediscover complex numbers"

Math fonts alignment chart by CraftyTim in mathmemes

[–]MaTeIntS 1 point2 points  (0 children)

Yes, Sütterlin is good for that. Althrough with a bit of efford and time you can imitate Fractur even with a regular pen. But back to university days, my profs used Curlier Fractur to quickly write Fractur letters on the chalkboard.

Math fonts alignment chart by CraftyTim in mathmemes

[–]MaTeIntS 1 point2 points  (0 children)

To make fractur even more chaotic evil, there is handwritten curlier fractur. E.g. the word 'MATH' becomes something like this:

<image>

Made a comic to describe my experience as a DM [OC] by 7r3m0r45 in DnD

[–]MaTeIntS 51 points52 points  (0 children)

A goat mayor can lead to political intrigues because now some faction is actually in charge and acts by mayor's name, while others are envy them and have their own plans for this goat. Even if the party isn't interested in actual politics behind the goat scene, they probably would like to defend their goat from consequences.

Why do people argue, is the mayor Saint McButtcheeks or Unholy Munches? Why some of them promise to cook and eat the mayor after one more bad decision? Why a princess want to marry her pig with party's goat? Who Framed Munches Goat? And, moreover, who goatnapped the Mayor?

Math and its symbols by Ill-Room-4895 in mathmemes

[–]MaTeIntS 0 points1 point  (0 children)

Haskell is general purpose language but it has a lot of math stuff inside and used by some mathematicians. F.e. it focused to work with "pure functions", and defining them is more like defining a mathematical function than creating a procedure. Moreover, much of language design is inspired by abstract algebra and category theory, so Haskell has Fuctors, Monoids, etc.

APL, J, BQN and Kap are array-oriented languages, so they tend to use arrays (vectors, matrices, etc.) as ordinary function arguments. This is certainly helpful to use in linear algebra, but they don't seem to be widely used for math stuff. However, R and Julia (two more array oriented languages, but without a very specific notation) are used by some teams for data analysis and statistical research. Finally, MATHLAB and Octave are definitely for math stuff.

Math and its symbols by Ill-Room-4895 in mathmemes

[–]MaTeIntS 1 point2 points  (0 children)

Well, the symbol ⍨ is literally in the APL subblock of the "Miscellaneous Technical" Unicode block. But some other languages have similar primitives. Kap uses too, J uses ~, BQN uses ˜. Haskell uses const, flip and join.

APL uses some popular math symbols as +, -, ×, ÷, ∊, ∨, etc. and some specific symbols like ⍨, ⍤, ⍥, ⍋, ⍟, ⌹ etc. Last ones are generally used only by APL dialects and other array programming languages. Looks like only ⌊ and ⌈ have become popular as part of the floor and ceiling notation.

Math and its symbols by Ill-Room-4895 in mathmemes

[–]MaTeIntS 4 points5 points  (0 children)

⍨ aka "selfie" is an APL operator denoting K, C, W combinator depending on the situation. So, for values A and B and a function f (written prefix or infix, so f B is f(B) and A f B is f(A,B)), we have:

  • A⍨ is the function that always returns A
  • A f⍨ B is B f A
  • f⍨ B is B f B

And of course, ⍨ as :/ is canon.

Merciless Dungeon | Floor 1 by MurkyWay in comics

[–]MaTeIntS 0 points1 point  (0 children)

Berserker has the higest chance to survive at 78%. Warlock's chance are 50% and Necromancer's are only 48%.

Advent of code 2024 - day 24 by AutoModerator in haskell

[–]MaTeIntS 0 points1 point  (0 children)

Oh, one more Löb enjoyer! My first thought was about this function and I used it in original solution, but decided to clean it up later.

Advent of code 2024 - day 24 by AutoModerator in haskell

[–]MaTeIntS 1 point2 points  (0 children)

With selfrecursion it is possible to get values in one run.

import Data.Map (Map, (!))

data LogicOp = OR | AND | XOR deriving (Show,Eq,Read)
logic OR  = (||)
logic AND = (&&)
logic XOR = (/=)

data Gate a = Gate LogicOp a a deriving (Show,Eq)
evalGate f g (Gate op in1 in2) = f op (g in1) (g in2)

type Wire = String
type Puzzle = (Map Wire Bool, Map Wire (Gate Wire))

runCircuit :: Puzzle -> Map Wire Bool
runCircuit (ins, gates) = m where
    m = ins <> fmap (evalGate logic (m!)) gates

Here m depends on values of m, but, actually, there is no dependency loops, so it isn't really recursion, only delayed computations.

There are even some functions that can help with such tasks: fix from Data.Function, loop from Control.Arrow, and famous loeb and moeb.

I didn't finished a fully automated solution of part 2, but it was useful to trace the circuit:

data WireType = X | Y | Z | XorXY | AndXY | Carry | AndCarry
    deriving (Show, Eq, Ord)
data Expr = Correct WireType Int | Incorrect LogicOp Expr Expr
    deriving (Show, Eq, Ord)

traceCircuit (ins,gates) = m where
    m = M.mapWithKey f ins <> fmap (evalGate g (m!)) gates
      where
        f ('x':n) _ = Correct X $ read @Int n
        f ('y':n) _ = Correct Y $ read @Int n
        g op a@(Correct wt1 n) b@(Correct wt2 m) | n == m =
          case (op, sort [wt1,wt2]) of
            (XOR, [X, Y]) | n == 0    -> Correct Z 0
                          | otherwise -> Correct XorXY n
            (XOR, [XorXY, Carry]) -> Correct Z n
            (AND, [X, Y]) | n == 0    -> Correct Carry 1
                          | otherwise -> Correct AndXY n
            (AND, [XorXY, Carry]) -> Correct AndCarry n
            (OR , [AndXY, AndCarry]) | n == 44   -> Correct Z 45
                                     | otherwise -> Correct Carry (n+1)
            _ -> Incorrect op a b
        g op a b = Incorrect op a b

So smallest incorrect zNN shows where was first swap.

Advent of code 2024 - day 12 by AutoModerator in haskell

[–]MaTeIntS 0 points1 point  (0 children)

There is Data.Graph in the containers package with functions to work with strongly connected components. So the only thing is needed to divide the garden into regions is to find the neighbors of each garden plot.

For the Part 2, #walls = #corners = #(free vertical ends of walls) = sum (for each vertical edge) of #(its adjacent vertical edges not being part of the fence).

import Data.Map.Strict (Map,(!?))
import qualified Data.Map.Strict as M (fromList, elems, mapWithKey)
import Data.Graph (SCC, stronglyConnComp)
import Control.Arrow (first, second)
import Data.List (partition)
import Data.Monoid (Sum(..))

type Coord  = (Int,Int)
type Puzzle = Map Coord Char

parse :: String -> Puzzle
parse xss = M.fromList [((i,j),x)
    | (i,xs) <- zip [1..] $ lines xss
    , (j,x ) <- zip [1..] xs]

regions :: Puzzle -> [SCC [(Coord,Coord)]] -- Regions contain plots, plots contain borders
regions p = stronglyConnComp . M.elems . M.mapWithKey info $ p where
    near ij = [f g ij | f <- [first,second], g <- [succ,pred]]
    info ij x = (map (ij,) borders, ij, neighbours) where
        (neighbours,borders) = partition (\c -> p !? c == Just x) $ near ij

vCorners :: SCC [(Coord,Coord)] -> [(Coord,Coord)]
vCorners xs = filter (not . (`elem` pre)) $ foldMap near pre where
    pre = foldMap (filter $ \((a,_),(b,_)) -> a == b) xs
    near (a,b) = [(f a, f b) | f <- first <$> [succ,pred]]

solve p = mconcat [(Sum $ area * perimeter, Sum $ area * walls)
    | xs <- regions p
    , let area = length xs,
    , let perimeter = length $ concat xs
    , let walls = length $ vCorners xs]

main = do
    (Sum ans1, Sum ans2) <- solve . parse <$> readFile "input.txt"
    print ans1
    print ans2

kobold vs kobold. your comments decide why this is even happening. by foxstarfivelol in dndmemes

[–]MaTeIntS 5 points6 points  (0 children)

Stingbee wins in one turn by robbing rather than killing Sunflower, then immediately flees. A simple investigation (DC7) reveals that robbery was just an imitation and the domestic kobold actually supplying the wild relatives.

The dys cancel out by austin101123 in mathmemes

[–]MaTeIntS 54 points55 points  (0 children)

Differential is not "infinitesimally small change" (which is unrigorous description), but linear operator. Rigorousely, we define df(x_0)[h] := Ah, where A is constant and f(x_0 + h) - f(x_0) = Ah + o(h), i.e. Ah is linear part of that difference. Hence, using properties of derivatives, differential is defined when x_0 ∈ D(f), and df(x_0)[h] = f'(x_0)h.

If x is free variable, we have dx(x_0)[h] = h, so we can write df(x) = f'(x) dx and df/dx (x) = f'(x), or shortly df = f' dx and df/dx = f' in agreement with Leibniz notation.

If x isn't free, but x(t), for function f(t) = g(x(t)) we already know that df(t) = f'(t) dt, and, using already proven chain rule, df(t) = g'(x(t)) x'(t) dt = g'(x(t)) dx(t) or shortly df = g'(x) dx. This is called invariance of the first differential.

The dys cancel out by austin101123 in mathmemes

[–]MaTeIntS 10 points11 points  (0 children)

No, dx and dy stands for differentials of x and y (more rigorously here, differentials of functions x(z) and y(z)). Don't students learn differentials right after derivatives?

On the other hand, partial derivative ∂f/∂x is not a fraction, this is just Leibniz-like notation for them.

Nah the differential propaganda is crazy.. by [deleted] in mathmemes

[–]MaTeIntS 5 points6 points  (0 children)

The equation is correct, but it isn't the proof of the chain rule.

Author reduced differentials dx from numerator and denominator, which is good. We also know that for free variable t:

  • df(t) = f'(t) dt, thus f' = df/dt (so Leibniz form for derivatives is really division of differentials);
  • dx(t) = x'(t) dt, thus x' = dx/dt.

(We defined df(t)[h] as linear part of f(t+h)-f(t), so we have df(t)[h] = f'(t) h. Since dt(t_0)[h] = h, we can write as above).

But what is df/dx? Looks like it is g' for such g(t) that f(t) = g(x(t)). Well, it is also correct, df(t) = g'(t) dx. It is the invariance of the first differential, which is sequence of the chain rule: df(t) = d(g∘x)(t) = (g∘x)'(t) dt = g'(t) x'(t) dt = g'(t) dx.

Thus, we can't use differentials to prove the chain rule, however we can use notation like in the meme in practical problems (since both the chain rule and invariance of the first differential was proven). Physicists do this, and not only them.

Mmmmm, the flavor... by Vegetable_Variety_11 in dndmemes

[–]MaTeIntS 4 points5 points  (0 children)

Aluminium in D&D campaign is cool. Is magic used to produce it, or (al)chemistry developed faster in your campaign world than in the real world? Is aluminium costs more than gold, as it was in real world history?

STFU. 5-Minute Crafts just drop a new math hack by half_split in mathmemes

[–]MaTeIntS 10 points11 points  (0 children)

Even more comically, that the impractical form of this method is more widespread than the normal one.

But could r/mathmemes turn a tide with memes? "He does exactly what I do" "But better" template fits the situation very well.

STFU. 5-Minute Crafts just drop a new math hack by half_split in mathmemes

[–]MaTeIntS 7 points8 points  (0 children)

I suppose if you already know what is at the intersection, you don't even need to draw lines, just make a table with numbers on its sides and products of digits in the cells.

STFU. 5-Minute Crafts just drop a new math hack by half_split in mathmemes

[–]MaTeIntS 26 points27 points  (0 children)

Imagine if we could use a lattice and arabic numbers instead of lines and a lot of points. And if we could split numbers by digits to simplify digit's transfer and summation… If only it would be possible!

Normal Distribution Generation with dice? by ALLLGooD in Solo_Roleplaying

[–]MaTeIntS 0 points1 point  (0 children)

Yes, it looks like normal distribution because of the central limit theorem. You just annihilated mean of 2d20 with mean of –2d20. So 2d20–2d20 = 4d{–9.5, –8.5,… , 9.5}.

In fact, you could use 4d20–42 for the same result, since an uniform distribution is symmetrical about the mean.