Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
decdbdc
docs: QM operators & commutators (#973)
gloges Mar 5, 2026
3b16e1b
feat: Space deriv in terms of mfderiv (#974)
jstoobysmith Mar 6, 2026
d155ad0
chore: move to module system
zhikaip Mar 6, 2026
740742f
feat: AddTorsor instance on space (#972)
jstoobysmith Mar 7, 2026
ebae9e6
attempts at fixing
zhikaip Mar 7, 2026
fef9c54
Merge branch 'master' into module_system
zhikaip Mar 7, 2026
6de060f
new files
zhikaip Mar 7, 2026
0e6609a
typo
zhikaip Mar 7, 2026
5e102b5
feat: Unbounded operators from H1 to H2 (#978)
gloges Mar 7, 2026
3dbd22e
import all
zhikaip Mar 8, 2026
1ce13a2
more fixes
zhikaip Mar 8, 2026
bf34ee8
remaining fixes
zhikaip Mar 9, 2026
3f435aa
non-terminal simp
zhikaip Mar 9, 2026
7699560
add pseudo for native_decide
zhikaip Mar 9, 2026
5fd9a47
docs: Start review guidelines (#971)
jstoobysmith Mar 9, 2026
f1f615e
feat: Fix native_decide
jstoobysmith Mar 9, 2026
7aa6f84
refactor: Fix lists
jstoobysmith Mar 9, 2026
900f726
refactor: Lint
jstoobysmith Mar 9, 2026
a1d099c
Update ExtractEquiv.lean
jstoobysmith Mar 9, 2026
f092950
refactor: Address comments
jstoobysmith Mar 9, 2026
4379792
Merge pull request #977 from leanprover-community/module_system
zhikaip Mar 9, 2026
b558dae
feat: mfderiv for Space
jstoobysmith Mar 11, 2026
dccdb0e
refactor: Lint
jstoobysmith Mar 11, 2026
ebef7d6
refactor: Lint
jstoobysmith Mar 11, 2026
116184b
refactor: LInt
jstoobysmith Mar 11, 2026
1e60183
refactor: Golf
jstoobysmith Mar 11, 2026
d34d53a
refactor: Lint
jstoobysmith Mar 11, 2026
5a1a20f
refactor: Remove simp
jstoobysmith Mar 11, 2026
08c5f58
refactor: Lint
jstoobysmith Mar 11, 2026
3256e1b
feat: Unbounded operator poset (#982)
gloges Mar 12, 2026
23b65a3
feat: Kronecker delta api (#979)
gloges Mar 12, 2026
60cb2c5
Add workflow for add/remove tags with comments (#985)
morrison-daniel Mar 12, 2026
d54087c
feat: Small generalization
jstoobysmith Mar 12, 2026
4ba57c7
fix: build
jstoobysmith Mar 12, 2026
c1cdc44
refactor(QM): radius operator (#987)
gloges Mar 13, 2026
7fac4dd
feat: remove `unfold deriv` (#988)
jstoobysmith Mar 16, 2026
6a71a62
fix(Perm): correct `isFull_of_isFull` and `perm_uncontractedList` (#997)
pitmonticone Mar 17, 2026
3b36ebe
feat(QM): unbounded operator inequalities (#993)
gloges Mar 17, 2026
55cf337
feat(Commutation): prove `angularMomentumSqr_commutation_angularMomen…
pitmonticone Mar 18, 2026
b1bead7
feat: Add `gradSchwartz` (#995)
jstoobysmith Mar 18, 2026
f804baa
Update Basic.lean
jstoobysmith Mar 19, 2026
6168857
Merge pull request #983 from leanprover-community/mfderivSpace2
zhikaip Mar 19, 2026
0663504
feat: Update readme (#986)
jstoobysmith Mar 19, 2026
b189515
Merge branch '0503-positivetemperature' into master
ichxorya Mar 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .codespellignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ Breal
ket
rIn
FRO
Commun
82 changes: 82 additions & 0 deletions .github/workflows/labels_from_comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# This workflow allows any user to add or remove one of the labels in the array `labelArray`
# by commenting on the PR or issue.
# The script reacts to lines in the comment whose entire content is, up to whitespace,
# the label name, optionally preceded by `-`.
# For each label, the bot follows the instruction of the *last* line that matches the label.

name: Label PR based on Comment

on:
issue_comment:
types: [created]
pull_request_review:
types: [submitted]
pull_request_review_comment:
types: [created]

# Limit permissions for GITHUB_TOKEN for the entire workflow
permissions:
contents: read
pull-requests: write # Only allow PR comments/labels
# All other permissions are implicitly 'none'

jobs:
update-label:
env:
COMMENT: ${{ github.event.comment.body }}
runs-on: ubuntu-latest

steps:
- name: Add / remove label based on comment
run: |
labelArray=("awaiting-author" "blocked-by-mathlib-PR" "blocked-by-PR" "documentation" "easy" "help-wanted" "merge-conflict" "new-contributor" "please-adopt" "RFC" "WIP" "t-classical-mechanics" "t-condensed-matter" "t-cosmology" "t-electromagnetism" "t-mathematics" "t-meta" "t-optics" "t-particles" "t-quantum-field-theory" "t-quantum-mechanics" "t-relativity" "t-space-time" "t-statistical-mechanics" "t-string-theory" "t-thermodynamics" "t-units")

# we strip `\r` since line endings from GitHub contain this character
COMMENT="${COMMENT//$'\r'/}"

# trim leading/trailing whitespace and collapse "internal" whitespace
COMMENT="$(printf '%s' "${COMMENT}" | awk '{$1=$1};1')"

# for debugging, we print some information
printf '%s' "${COMMENT}" | hexdump -cC
printf 'Comment:"%s"\n' "${COMMENT}"

for i in "${!labelArray[@]}"; do
inComment=""
label="${labelArray[$i]}"
printf $'\nProcessing label \'%s\'\n' "${label}"
# extract the last line that, up to leading/trailing whitespace, matches the current label
inComment="$(printf '%s' "${COMMENT}" | grep "[-]\?${label}$" | tail -1)"
if [ -n "${inComment}" ]
then
printf $'Found \'%s\'\n' "${inComment}"
if [ "${inComment:0:1}" == "-" ]
then
printf $'Removing label \'%s\'\n' "${label}"
# we use curl rather than octokit/request-action so that the job won't fail
# (and send an annoying email) if the labels don't exist
curl --request DELETE \
--url "https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/labels/${label}" \
--header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}'
printf $'%s DELETE done\n' "${inComment}"

else
data="$(printf $'{"labels":["%s"]}' "${label}")"
printf $'Using data: %s\n' "${data}"
# we use curl rather than octokit/request-action so that the job won't fail
# (and send an annoying email) if the labels don't exist
curl --request POST \
--header 'Accept: application/vnd.github+json' \
--header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
--header 'X-GitHub-Api-Version: 2022-11-28' \
--url "https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/labels" \
--data "${data}"
printf $'%s POST done\n' "${inComment}"

fi

else
printf $'Label \'%s\' not found.\n' "${label}"
fi

done
813 changes: 408 additions & 405 deletions PhysLean.lean

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion PhysLean/ClassicalMechanics/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ Copyright (c) 2025 Joseph Tooby-Smith. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joseph Tooby-Smith
-/
module

/-!

# Classical mechanics

This file is currently a stub.
Please feel free to contribute!

-/
-/@[expose] public section
10 changes: 7 additions & 3 deletions PhysLean/ClassicalMechanics/DampedHarmonicOscillator/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ Copyright (c) 2025 Nicola Bernini. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Nicola Bernini
-/
import PhysLean.Meta.Informal.SemiFormal
import PhysLean.ClassicalMechanics.EulerLagrange
import PhysLean.ClassicalMechanics.HamiltonsEquations
module

public import PhysLean.Meta.Informal.SemiFormal
public import PhysLean.ClassicalMechanics.EulerLagrange
public import PhysLean.ClassicalMechanics.HamiltonsEquations
/-!

# The Damped Harmonic Oscillator
Expand Down Expand Up @@ -59,6 +61,8 @@ References for the damped harmonic oscillator include:

-/

@[expose] public section

namespace ClassicalMechanics
open Real
open ContDiff
Expand Down
6 changes: 5 additions & 1 deletion PhysLean/ClassicalMechanics/EulerLagrange.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ Copyright (c) 2025 Tomas Skrivan. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Tomas Skrivan, Joseph Tooby-Smith
-/
import PhysLean.Mathematics.VariationalCalculus.HasVarGradient
module

public import PhysLean.Mathematics.VariationalCalculus.HasVarGradient
/-!

# Euler-Lagrange equations
Expand All @@ -14,6 +16,8 @@ and prove the that the variational derivative of the action functional

-/

@[expose] public section

open MeasureTheory ContDiff InnerProductSpace Time

variable {X} [NormedAddCommGroup X] [InnerProductSpace ℝ X] [CompleteSpace X]
Expand Down
6 changes: 5 additions & 1 deletion PhysLean/ClassicalMechanics/HamiltonsEquations.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ Copyright (c) 2025 Tomas Skrivan. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Tomas Skrivan, Joseph Tooby-Smith
-/
import PhysLean.Mathematics.VariationalCalculus.HasVarGradient
module

public import PhysLean.Mathematics.VariationalCalculus.HasVarGradient
/-!

# Hamilton's equations
Expand All @@ -23,6 +25,8 @@ applied to `(p, q)`.

-/

@[expose] public section

open MeasureTheory ContDiff InnerProductSpace Time

namespace ClassicalMechanics
Expand Down
12 changes: 8 additions & 4 deletions PhysLean/ClassicalMechanics/HarmonicOscillator/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ Copyright (c) 2025 Joseph Tooby-Smith. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joseph Tooby-Smith, Lode Vermeulen
-/
import PhysLean.Meta.Informal.SemiFormal
import PhysLean.ClassicalMechanics.EulerLagrange
import PhysLean.ClassicalMechanics.HamiltonsEquations
import PhysLean.ClassicalMechanics.HarmonicOscillator.ConfigurationSpace
module

public import PhysLean.Meta.Informal.SemiFormal
public import PhysLean.ClassicalMechanics.EulerLagrange
public import PhysLean.ClassicalMechanics.HamiltonsEquations
public import PhysLean.ClassicalMechanics.HarmonicOscillator.ConfigurationSpace
/-!

# The Classical Harmonic Oscillator
Expand Down Expand Up @@ -81,6 +83,8 @@ References for the classical harmonic oscillator include:

-/

@[expose] public section

namespace ClassicalMechanics
open Real
open Space
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,19 @@ Copyright (c) 2026 Nicola Bernini. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Nicola Bernini
-/
import Mathlib.Geometry.Manifold.Diffeomorph
import PhysLean.SpaceAndTime.Time.Basic
module

public import Mathlib.Geometry.Manifold.Diffeomorph
public import PhysLean.SpaceAndTime.Time.Basic
/-!
# Configuration space of the harmonic oscillator

The configuration space is defined as a one-dimensional smooth manifold,
modeled on `ℝ`, with a chosen coordinate.
-/

@[expose] public section

namespace ClassicalMechanics

namespace HarmonicOscillator
Expand Down
10 changes: 7 additions & 3 deletions PhysLean/ClassicalMechanics/HarmonicOscillator/Solution.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ Copyright (c) 2025 Joseph Tooby-Smith. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joseph Tooby-Smith, Lode Vermeulen
-/
import Mathlib.Analysis.CStarAlgebra.Classes
import PhysLean.ClassicalMechanics.HarmonicOscillator.Basic
import PhysLean.Units.Basic
module

public import Mathlib.Analysis.CStarAlgebra.Classes
public import PhysLean.ClassicalMechanics.HarmonicOscillator.Basic
public import PhysLean.Units.Basic
/-!

# Solutions to the classical harmonic oscillator
Expand Down Expand Up @@ -53,6 +55,8 @@ References for the classical harmonic oscillator include:

-/

@[expose] public section

namespace ClassicalMechanics
open Real Time ContDiff

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ Copyright (c) 2025 Rein Zustand. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Rein Zustand
-/
import PhysLean.Mathematics.VariationalCalculus.HasVarGradient
module

public import PhysLean.Mathematics.VariationalCalculus.HasVarGradient
/-!

# Equivalent Lagrangians under Total Derivatives
Expand Down Expand Up @@ -51,6 +53,8 @@ This is because:

-/

@[expose] public section

namespace ClassicalMechanics

open InnerProductSpace
Expand Down
8 changes: 6 additions & 2 deletions PhysLean/ClassicalMechanics/Mass/MassUnit.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ Copyright (c) 2025 Joseph Tooby-Smith. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joseph Tooby-Smith
-/
import Mathlib.Geometry.Manifold.Diffeomorph
import PhysLean.SpaceAndTime.Time.Basic
module

public import Mathlib.Geometry.Manifold.Diffeomorph
public import PhysLean.SpaceAndTime.Time.Basic
/-!

# Units on Mass
Expand All @@ -24,6 +26,8 @@ existence of the mass unit of kilograms, and construct all other mass units from

-/

@[expose] public section

open NNReal

/-- The choices of translationally-invariant metrics on the mass-manifold.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ Copyright (c) 2025 Shlok Vaibhav Singh. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Shlok Vaibhav Singh
-/
import PhysLean.Meta.Informal.Basic
import PhysLean.Meta.Sorry
module

public import PhysLean.Meta.Informal.Basic
public import PhysLean.Meta.Sorry
/-!
# Coplanar Double Pendulum
### Tag: LnL_1.5.1
Expand Down Expand Up @@ -62,6 +64,8 @@ so that the Lagrangian becomes:
$$
-/

@[expose] public section

namespace ClassicalMechanics

namespace CoplanarDoublePendulum
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ Copyright (c) 2025 Shlok Vaibhav Singh. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Shlok Vaibhav Singh
-/
module

/-!
# Miscellaneous Pendulum Pivot Motions
### Tag: LnL_1.5.3
Expand Down Expand Up @@ -139,7 +141,7 @@ Ignoring the total time derivate term, the final lagrangian becomes:
$$
L = \tfrac{1}{2} m l^2\dot{\phi}^2 + m g l \cos\phi - m a l \gamma^2 \cos\phi\cos(\gamma t)
$$
-/
-/@[expose] public section

namespace ClassicalMechanics

Expand Down
6 changes: 5 additions & 1 deletion PhysLean/ClassicalMechanics/Pendulum/SlidingPendulum.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ Copyright (c) 2025 Shlok Vaibhav Singh. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Shlok Vaibhav Singh
-/
import PhysLean.Meta.Sorry
module

public import PhysLean.Meta.Sorry
/-!
# Sliding Pendulum
### Tag: LnL_1.5.2
Expand Down Expand Up @@ -55,6 +57,8 @@ $$

-/

@[expose] public section

namespace ClassicalMechanics

namespace SlidingPendulum
Expand Down
8 changes: 6 additions & 2 deletions PhysLean/ClassicalMechanics/RigidBody/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ Copyright (c) 2025 Joseph Tooby-Smith. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joseph Tooby-Smith
-/
import PhysLean.SpaceAndTime.Space.Derivatives.Curl
import Mathlib.Geometry.Manifold.Algebra.SmoothFunctions
module

public import PhysLean.SpaceAndTime.Space.Derivatives.Curl
public import Mathlib.Geometry.Manifold.Algebra.SmoothFunctions
/-!

# Rigid bodies
Expand All @@ -21,6 +23,8 @@ In this module we will define the basic properties of a rigid body, including
- Landau and Lifshitz, Mechanics, page 100, Section 32
-/

@[expose] public section

open Manifold

TODO "MEX5S" "The definition of a rigid body is currently defined via linear maps
Expand Down
6 changes: 5 additions & 1 deletion PhysLean/ClassicalMechanics/RigidBody/SolidSphere.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ Copyright (c) 2025 Joseph Tooby-Smith. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joseph Tooby-Smith
-/
import PhysLean.ClassicalMechanics.RigidBody.Basic
module

public import PhysLean.ClassicalMechanics.RigidBody.Basic
/-!

# The solid sphere as a rigid body
Expand All @@ -13,6 +15,8 @@ center of mass and inertia tensor.

-/

@[expose] public section

open Manifold
open MeasureTheory
namespace RigidBody
Expand Down
Loading
Loading