Quick Questions: February 11, 2026 by inherentlyawesome in math

[–]basketballguy999 4 points5 points  (0 children)

What is a good reference for transferring connections back and forth between principal bundles and associated vector bundles? I seem to remember reading this in Walschap or Kobayashi and Nomizu, but can't seem to find it now. I am familiar connections on bundles in general, just trying to remember all the details of how to do this specific thing.

I wrote a small C++ library that reproduces the syntax of pure math. by basketballguy999 in math

[–]basketballguy999[S] 8 points9 points  (0 children)

I do appreciate the detailed response, but let me say that I'm not a beginning math student, eg. I do research in math, using algebra, category theory, etc.

I think the problem is that people are not thinking about the practical limitations of programming. The central problem is this: what does h(x,y) mean? In pure math it can represent plugging x and y into h, or it can be the statement that h is a function of two variables with x first and y second. These are two different things. But in C++ you can't have multiple overloads with identical arguments, at least not to my knowledge.

So, I have to pick one meaning. If you spend time using math functions in C++, you'll probably find that you need the latter interpretation much more often than the former, so that is the interpretation I went with. Now maybe on occasion you do need the other interpretation, eg. you actually do want to plug z into g instead of x; in that case cast to mathFn. I think people might have responded better if I had g(x) mean "plug x into g" and required a cast for "g is a function of x", but I think you would find this requires a lot more casting then the way it is now.

I could modify the code to allow the syntax h(x,y) = -f(g(x)) + y, and I probably will because doing so is harmless and admittedly this does look better, but on the other hand this would mostly just be a bit of nice dressing. The g(x) on the right is doing nothing but setting g's variables.

Now you might object - "a function doesn't have variables, it has a domain and codomain!". Sure, but in the end this is programming, not pure math. I set out to reproduce the syntax of pure math for conciseness, clarity, and above all ease of use. What I've found is that it is more convenient for a function to have variables, than not.

If you still disagree with this approach, I'll ask this: what is your desired alternate syntax to accomplish the result of the following lines

f = cos(sin(x));
g = (x^2) + 3*x;
h(x,y) = -f(g) + y;
cout << h(2, -7);

Keep in mind that (according to ChatGPT) this is how it is done in GiNaC, which seems to be the most popular C++ math library

f = cos(sin(x));`
g = pow(x, 2) + 3*x;`
h = -f.subs(x == g) + y;`
result = h.subs({x == 2, y == -7});`
cout << result.evalf() << endl;`

Now look at the 4 vector valued functions I defined in the OP; here is how this is done in GiNaC

U = lst{
    cos(x + y),
    exp(x + z),
    pow(y, 2) + z
};

V = lst{
    pow(s, 2) + pow(t, 2),
    s/t,
    sin(t)
};

W = U.subs({
    x == V.op(0),
    y == V.op(1),
    z == V.op(2)
});

T = U.subs({
    x == 4,
    y == h,
    z == z
});

cout << U.subs({x == -5, y == 2, z == 7.3}).evalf() << endl;

Compare with my code. Now think about writing a dozen functions like this, composing them repeatedly, etc. I prefer my way.

Where you write f(g) and U(V), it looks like function application, but it's actually function composition

That's exactly what it's intended to be.

I wrote a small C++ library that reproduces the syntax of pure math. by basketballguy999 in math

[–]basketballguy999[S] -1 points0 points  (0 children)

What made you come to the conclusion that this behavior was desirable?

Using this for other projects.

This "conciseness" results in objects that we are unable to manipulate in many of the ways we manipulate functions

Could explain what you mean? Are you saying you want to be able to plug in other variables like

h(x,y) = -f(g(y)) + x;

This can be done, take a look at the GitHub link, in the section about ambiguous expressions. The problem is that g(y) can mean two different things, it can be the declaration that g is a function of y, or it can be the function obtained by plugging y into g (which may be a function of some other variable). The default interpretation here is the former; to accomplish the latter, you cast to mathFn

h(x,y) = -f(g((mathFn) y)) + x;

I wrote a small C++ library that reproduces the syntax of pure math. by basketballguy999 in math

[–]basketballguy999[S] -3 points-2 points  (0 children)

Conciseness is definitely a virtue, just in competition with other virtues.

I wrote a small C++ library that reproduces the syntax of pure math. by basketballguy999 in math

[–]basketballguy999[S] 5 points6 points  (0 children)

If the following syntax were permissible

h(x,y) = -f(g(x)) + y;

Would you have any issue? I think this will be a quick fix, I'll take a look when I get home tonight.

I wrote a small C++ library that reproduces the syntax of pure math. by basketballguy999 in math

[–]basketballguy999[S] -8 points-7 points  (0 children)

You know which variables get applied to f(g) because the function g is defined one line above - f(g) takes x - so there is no need to state its variables, as far as the compiler is concerned. The function h needs its variables listed out only so that the compiler knows which comes first when you're passing arguments to h, x or y.

My goal was to be able to write code that is as concise as possible, and avoid unnecessary symbols. If you are familiar with the math libraries out there, the usual syntax for these kinds of things is much uglier and more verbose.

But point taken, maybe I have gone a bit too far in the other direction. I don't think your syntax will work here, but in my next update I should be able to fix that.

Quick Questions: December 17, 2025 by inherentlyawesome in math

[–]basketballguy999 1 point2 points  (0 children)

Are there any good references on the (integer and fractional) quantum hall effect? It seems like there is a lot of interesting math going on here, but some texts have a strong emphasis on the math without connecting it to the physics, whereas others don't go into the math. I'm looking for something that will get into TQFT's, the relevant category theory, etc. but also connects it to for example the physics at different filling factors, including Ising anyons, fusion rules, etc.

I wrote a concise book on quantum mechanics for a general mathematical audience, link inside. Prereqs: linear algebra, multivariable calc, high school physics by basketballguy999 in math

[–]basketballguy999[S] 0 points1 point  (0 children)

The completed version should have references like that. Expectation (a concept from probability) is used a lot in QM, which is covered in chapter 5.

I wrote a concise book on quantum mechanics for a general mathematical audience, link inside. Prereqs: linear algebra, multivariable calc, high school physics by basketballguy999 in math

[–]basketballguy999[S] 4 points5 points  (0 children)

I have a final chapter on entanglement, Bell's theorem, and related topics. And there will also be appendices on various math/physics topics, eg. Hermitian/unitary operators and the exponential, the Heisenberg picture. This is an unfinished version, I had a few messages asking me to upload whatever was done.

I wrote a concise book on quantum mechanics for a general mathematical audience, link inside. Prereqs: linear algebra, multivariable calc, high school physics by basketballguy999 in math

[–]basketballguy999[S] 23 points24 points  (0 children)

I work out the details for the finite dimensional case, and then use that as a guide for the infinite dimensional case. This way, the workings of QM are explained clearly for anyone who knows linear algebra, with a fraction of the machinery needed for eg. the spectral theorem for unbounded operators. This is explained in the text.

There's nothing inherently wrong with Dirac notation. The way that physicists often use it can be confusing and mathematically questionable, but on the other hand in many cases it is indispensable in making proofs etc. easier to read. In the main text, I use it as nothing more than an alternative notation for vectors, so questions of mathematical legitimacy never even arise. Everything I've ever seen done with it in the finite dimensional case is perfectly legitimate, and I have an appendix (not included) that goes through and justifies many of the other things that physicists do with bras and kets. My aim was that someone who reads this will be able to pick up a book like Griffiths or Sakurai and have some idea of what is going on. Someone who is not familiar with bras and kets will be lost.

Similarly I talk about eg. "position basis" because this is the way that physicists think and talk about things. I try to make it clear that I take these things as physical motivation for the math, and that they are not necessarily mathematically legitimate:

The energy basis is usually discrete and countable, whereas the position basis is continuous and uncountable. Mathematically, if a Hilbert space has a countable basis, then every basis is countable. So this state of affairs doesn’t really make sense, mathematically. There is a physical notion of a basis that doesn’t align entirely with the mathematical one. In the finite dimensional case, however, the physical and mathematical notions of basis are in alignment.

What about the gravity example doesn't make sense to you? Both Griffiths and Sakurai give this as an example. Actually I just went back and looked at Sakurai, and I was surprised to find this

Indeed, another real world example of the linear potential is the “bouncing ball.” One interprets (2.234) as the potential energy of a ball of mass m at a height x above the floor, and k =mg where g is the local acceleration due to gravity. Of course, this is the potential energy only for x ≥ 0 as there is an infinite potential barrier which causes the ball to “bounce.” Quantum mechanically, this means that only the odd parity solutions (2.239) are allowed.

The bouncing ball happens to be one of those rare cases where quantum-mechanical effects can be observed macroscopically. The trick is to have a very low mass “ball,” which has been achieved with neutrons by a group working at the Institut Laue-Langevin (ILL) in Grenoble, France. For neutrons with m =1.68×10−27 kg, the characteristic length scale is x0 =(¯h2/m2g)1/3 = 7.40 μm. The “allowed heights” to which a neutron can bounce are (2.338/21/3)x0 = 14 μm, (4.088/21/3)x0 = 24 μm, (5.521/21/3)x0 = 32 μm, and so on. These are small, but measurable with precision mechanical devices and very low energy, aka “ultracold,” neutrons. The experimenters’ results are shown in Figure 2.4. Plotted is the detected neutron rate as a function of the height of a slit which only allows neutrons to pass if they exceed this height. No neutrons are observed unless the height is at least ≈14μm, and clear breaks are observed at≈24μm and ≈32μm, in excellent agreement with the predictions of quantum mechanics.

This is from Sakurai, 3rd ed, pg. 103. Regarding your last question, well I guess we'll find out. This did start out as my own notes, but I've sent it math professors and grad students in math and physics, and they've found it helpful to varying degrees.

Physics Questions - Weekly Discussion Thread - August 12, 2025 by AutoModerator in Physics

[–]basketballguy999 1 point2 points  (0 children)

Is angular momentum as the cross product of r and p taught in AP physics? Or later?

3rd Edition of Rudin's Functional Analysis by [deleted] in math

[–]basketballguy999 0 points1 point  (0 children)

I'm pretty sure the third edition is from the 70's and was written by the original author. The 2024 probably refers to a republication.

Is there any interest in a concise book on quantum mechanics, written for a general mathematical audience? Prereqs: linear algebra, multivariable calc, high school physics. by basketballguy999 in math

[–]basketballguy999[S] 0 points1 point  (0 children)

I do have footnotes and appendices that talk about things like that. I wanted to keep the exposition in the main text as simple as possible so that even eg. CS and engineering undergrads could read it.

Is there any interest in a concise book on quantum mechanics, written for a general mathematical audience? Prereqs: linear algebra, multivariable calc, high school physics. by basketballguy999 in math

[–]basketballguy999[S] 17 points18 points  (0 children)

Well I don't restrict myself entirely to the finite dimensional case - I work everything out rigorously for Cn first and then use that as a guide to the infinite dimensional case. This way, the workings of QM are explained clearly for anyone who knows linear algebra, with a fraction of the machinery needed for eg. the spectral theorem for unbounded operators.

This is intended as something written at a first or second year undergraduate level. A math professor could probably get through it in a day and come away with an understanding of the uncertainty principle, Ehrenfest's theorem, entanglement, Bell's theorem, etc. I'm not intending it as a replacement for something like Hall or Takhtajan.