Skip to content

feat(QuantumMechanics/Blackbody): extend Planck's law with wavelength form and radiation constants - #1720

Open
dwan-ith wants to merge 2 commits into
leanprover-community:masterfrom
dwan-ith:feat/blackbody-planck-wien
Open

dwan-ith wants to merge 2 commits into
leanprover-community:masterfrom
dwan-ith:feat/blackbody-planck-wien

Conversation

@dwan-ith

@dwan-ith dwan-ith commented Oct 2, 2026 •

Copy link
Copy Markdown

Formalizes the project idea "Planck's Theory of Blackbody Radiation" from physlib.io/project-ideas.

Extends the existing Physlib.QuantumMechanics.Blackbody.PlancksLaw

Planck's Law:

  • Parametrized spectral radiance per unit frequency (spectralRadianceFreq) and wavelength (spectralRadianceWave)
  • Correspondence theorem spectralRadianceWave_eq_freq: $B(\lambda, T) = (c/\lambda^2) B(\nu = c/\lambda, T)$
  • First and second radiation constants ($c_{1L} = 2hc^2$, $c_2 = hc/k_B$) with spectralRadianceWave_eq_constants
  • Positivity, absolute-zero vanishing, and boundary lemmas

(Note: Wien's displacement law has been done as a seperate PR).

…isplacement law

Formalizes the project idea 'Planck's Theory of Blackbody Radiation' from https://physlib.io/project-ideas.

Key additions:
- Frequency and wavelength forms of Planck's spectral radiance
- Positivity, absolute-zero limits, correspondence between forms
- First and second radiation constants
- Wien auxiliary function h(x) = x - n(1 - e^{-x})
- Existence and uniqueness of the positive Wien root (IVT + monotonicity)
- Named Wien constants x5 ≈ 4.9651 (wavelength) and x3 ≈ 2.8214 (frequency)
- Rigorous enclosures 4 < x5 < 5 and 2 < x3 < 3 (no sorry)
- Global maxima of spectral radiance curves (isMaxOn)
- Wien's displacement laws: λ₁T₁ = λ₂T₂ and ν₁/T₁ = ν₂/T₂
- Proof that wavelength and frequency peaks differ (wien_roots_differ)
@github-actions github-actions Bot added the large label Oct 2, 2026
@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Thank you for this pull-request (PR). If this is your first PR, welcome to the community!

Below is what will happen next. Please read carefully if you are not familiar with the process. You may open other PRs while this one is being reviewed, and can stack PRs on top of each other, so don't let these steps slow you down.

  1. Some automated checks will be run on your PR. You can see the results of these checks at the buttom of your PR page. If any of these checks fail, you will need to fix the issues before your PR can be merged. You can learn more about these here, including how to run them locally, which is sometimes quicker than relying on the GitHub Actions. If you have never had a PR merged before, you may have to wait for a reviewer to manually start these checks (this is for security).

  2. A reviewer will look at your PR and may ask you to make changes. This may happen a couple of days after you submit your PR, so you may need to be patient. But it should not be longer than that - if it is please bring it to the attention of the community on the Zulip. The level of review will depend on where your PR is submitted. If it is submitted to ./Physlib or ./QuantumInfo, the review will be more thorough than if it is submitted to ./PhyslibAlpha. You can find out more about what the review process is looking for in our review guidelines. If a reviewer adds an awaiting-author label to your PR, address the review comments, then please remove that label by adding a comment with -awaiting-author. This helps us keep track of reviews.

  3. The reviewer will either approve your PR, or request more changes (in which case we return to step 2). Once your PR is approved, it will be merged by a maintainer, this should happen shortly after approval, though you may get more comments at this stage.

Tip: The easiest way to get have a fast review is to submit a PR that is small and self-contained, and has clear documentation explaining why things are the way they are in your chages.

If you have any problems or questions, please reach out to the community on the Zulip.

@github-actions github-actions Bot added the t-quantum-mechanics Quantum mechanics label Oct 2, 2026
@jstoobysmith

Copy link
Copy Markdown
Member

Hi @dwan-ith Many thanks for this Pull-request (PR). I think this is a bit long. Maybe we could restrict this PR to just be the Planck's law file? This way we can iterate a lot quicker :).

@jstoobysmith

Copy link
Copy Markdown
Member

awaiting-author

@github-actions github-actions Bot added the awaiting-author A reviewer has asked the author a question or requested changes label Oct 2, 2026
@dwan-ith

dwan-ith commented Oct 2, 2026

Copy link
Copy Markdown
Author

Hi Joseph. Sure thing, I will do only Planck's law. The rest in another PR or how would you like it to be done?

@jstoobysmith

Copy link
Copy Markdown
Member

Yes please, if the rest could go in another PR that would be great.

@github-actions github-actions Bot added medium and removed large labels Oct 2, 2026
@dwan-ith dwan-ith changed the title feat(QuantumMechanics/Blackbody): formalize Planck's law and Wien's displacement law feat(QuantumMechanics/Blackbody): extend Planck's law with wavelength form and radiation constants Oct 2, 2026
@github-actions github-actions Bot removed the awaiting-author A reviewer has asked the author a question or requested changes label Oct 2, 2026

@jstoobysmith jstoobysmith left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of comments to start of with

@@ -1,13 +1,14 @@
/-
Copyright (c) 2026 Samyak Rai. All rights reserved.
Copyright (c) 2026 Samyak Rai, Dwanith C. Jayanth. All rights reserved.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Normally we restrict the copyright to only one name.

`B(ν, T) = 2 h ν³ / c² · 1 / (e ^ (h ν / (kB T)) - 1)`,

extended by zero outside the physical domain. -/
noncomputable def spectralRadianceFreq (h c kB ν T : ℝ) : ℝ :=

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't remake this definition since it is essentially equivalent to spectralRadiance.


@[expose] public section


Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here I think it might be worth making a structure

structure BlackBody with 
    T : Temperature 

and then using this as an input to all of the things bellow.

-/

/-- The first radiation constant `c₁L = 2 h c²`. -/
noncomputable def firstRadiationConstant (h c : ℝ) : ℝ := 2 * h * c ^ 2

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

c : SpeedOfLight. We also use the value of kB and h given via the imports. In theory we could define a set value of c aswell.

le_of_lt (spectralRadianceFreq_pos h c kB ν T hh hc hk hν hT)

/-- The spectral radiance per unit wavelength is non-negative on the physical domain. -/
lemma spectralRadianceWave_nonneg (h c kB lam T : ℝ) (hh : 0 < h) (hc : 0 < c)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Results like this should appear next to the corresponding definition.


/-- The first radiation constant equals `2 * h * c ^ 2`. -/
@[simp]
lemma firstRadiationConstant_eq (h c : ℝ) :

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I probably would not attribute this and the lemma below with @[simp].

@jstoobysmith

Copy link
Copy Markdown
Member

awaiting-author

@github-actions github-actions Bot added the awaiting-author A reviewer has asked the author a question or requested changes label Oct 2, 2026
@dwan-ith

dwan-ith commented Oct 2, 2026 •

Copy link
Copy Markdown
Author

sorry, this is my first PR. but sure, i'll make all the changes

@jstoobysmith

Copy link
Copy Markdown
Member

@dwan-ith responding to your email - no need to apologise! Totally normal for lots of comments on PRs (even experienced contributors get them :)).

@jstoobysmith

Copy link
Copy Markdown
Member

There are some design decisions which likely need to be addressed at some point, if this is of interest to you (not necessary for this PR). For example, do we need a type for frequency, and wavelength (we currently don't). Do we need a type for things like the planck's constant as we do with SpeedOfLight (currently we just have a given element). These two approaches don't appear to agree....

@dwan-ith

dwan-ith commented Oct 2, 2026

Copy link
Copy Markdown
Author

Thanks for pointing that out! I noticed them too. some were a bit confusing and probably need to be sorted out as you said. let me know if there's anything else that needs adjusting! :)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-author A reviewer has asked the author a question or requested changes medium t-quantum-mechanics Quantum mechanics

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants