feat(QuantumMechanics/Blackbody): Added Canonical Definition Planck's law - #1629
Conversation
Law Created Blackbody folder to further have place for Electromagnetic Radiation based definitions proofs. Currently only contains Spectral Radiance per unit Frequency and positivity of that value.
|
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.
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. |
nateabr
left a comment
There was a problem hiding this comment.
Looks good! Some comments to fix
| @[expose] public section | ||
|
|
||
|
|
||
| namespace Constants |
There was a problem hiding this comment.
spectralRadiance is not itself a physical constant, so putting it in Constants makes the API misleading. Could this be moved into a namespace such as Blackbody or another appropriate radiation namespace?
There was a problem hiding this comment.
Decided to name it Blackbody itself since the folder is also blackbody, other name possibly could have been EMR but that would intersect with EM based modules, so I just went with blackbody
|
|
||
| /-- For a given ν frequency, the spectral radiance of a blackbody is 0 at | ||
| absolute zero temperature. -/ | ||
| lemma spectralRadiance_absZero (c : SpeedOfLight) (ν : ℝ) : |
There was a problem hiding this comment.
If we look at the definiton of spectralRadiance at T = 0, kB * (T : ℝ) = 0, therefore the computation below is 0/0, which in lean, by convention, is 0. Ofcourse mathematically, this proof is not valid even though the code has compiled.
We could define the physical formula only on positive frequency and temperature, and extend it by zero otherwise:
noncomputable def spectralRadiance (c : SpeedOfLight) (ν : ℝ) (T : Temperature) : ℝ := if 0 < ν ∧ 0 < (T : ℝ) then 2 * h * ν ^ 3 / ((c : ℝ) ^ 2 * (Real.exp (h * ν / (kB * (T : ℝ))) - 1)) else 0
Then the absolute-zero lemma reflects an explicit choice in the API, rather than Lean’s division convention. A later PR could state and prove that this extension agrees with the limit as
There was a problem hiding this comment.
That makes alot more sense, I was wondering why I was getting no errors. Thank you
|
awaiting-author |
…te API, and changes in definition of Planck's Law
|
-awaiting-author |
|
Looks good to me, thanks |
|
Looks good to me! |
Description of Changes
New Directory at:
Physlib/QuantumMechanics/Blackbodyto store further blackbody radiation related definitions and proofs.New Files at:
Physlib/QuantumMechanics/Blackbody/PlancksLaw.leanAdded definitions and positive and zero values lemmas for Spectral Radiance due to Planck's LawModified File at:
Physlib.leanadded import for Planck's LawReviewer Guide
I have added frequency with Real number type right now but plan to make changes to that later when frequency is implemented. Also the conversion between frequency and wavelength can be added after that.