Skip to content

Commit 4379792

Browse files
authored
Merge pull request #977 from leanprover-community/module_system
chore: move to module system
2 parents 5fd9a47 + f092950 commit 4379792

408 files changed

Lines changed: 2882 additions & 1248 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

PhysLean.lean

Lines changed: 408 additions & 406 deletions
Large diffs are not rendered by default.

PhysLean/ClassicalMechanics/Basic.lean

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@ Copyright (c) 2025 Joseph Tooby-Smith. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Joseph Tooby-Smith
55
-/
6+
module
7+
68
/-!
79
810
# Classical mechanics
911
1012
This file is currently a stub.
1113
Please feel free to contribute!
1214
13-
-/
15+
-/@[expose] public section

PhysLean/ClassicalMechanics/DampedHarmonicOscillator/Basic.lean

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@ Copyright (c) 2025 Nicola Bernini. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Nicola Bernini
55
-/
6-
import PhysLean.Meta.Informal.SemiFormal
7-
import PhysLean.ClassicalMechanics.EulerLagrange
8-
import PhysLean.ClassicalMechanics.HamiltonsEquations
6+
module
7+
8+
public import PhysLean.Meta.Informal.SemiFormal
9+
public import PhysLean.ClassicalMechanics.EulerLagrange
10+
public import PhysLean.ClassicalMechanics.HamiltonsEquations
911
/-!
1012
1113
# The Damped Harmonic Oscillator
@@ -59,6 +61,8 @@ References for the damped harmonic oscillator include:
5961
6062
-/
6163

64+
@[expose] public section
65+
6266
namespace ClassicalMechanics
6367
open Real
6468
open ContDiff

PhysLean/ClassicalMechanics/EulerLagrange.lean

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ Copyright (c) 2025 Tomas Skrivan. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Tomas Skrivan, Joseph Tooby-Smith
55
-/
6-
import PhysLean.Mathematics.VariationalCalculus.HasVarGradient
6+
module
7+
8+
public import PhysLean.Mathematics.VariationalCalculus.HasVarGradient
79
/-!
810
911
# Euler-Lagrange equations
@@ -14,6 +16,8 @@ and prove the that the variational derivative of the action functional
1416
1517
-/
1618

19+
@[expose] public section
20+
1721
open MeasureTheory ContDiff InnerProductSpace Time
1822

1923
variable {X} [NormedAddCommGroup X] [InnerProductSpace ℝ X] [CompleteSpace X]

PhysLean/ClassicalMechanics/HamiltonsEquations.lean

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ Copyright (c) 2025 Tomas Skrivan. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Tomas Skrivan, Joseph Tooby-Smith
55
-/
6-
import PhysLean.Mathematics.VariationalCalculus.HasVarGradient
6+
module
7+
8+
public import PhysLean.Mathematics.VariationalCalculus.HasVarGradient
79
/-!
810
911
# Hamilton's equations
@@ -23,6 +25,8 @@ applied to `(p, q)`.
2325
2426
-/
2527

28+
@[expose] public section
29+
2630
open MeasureTheory ContDiff InnerProductSpace Time
2731

2832
namespace ClassicalMechanics

PhysLean/ClassicalMechanics/HarmonicOscillator/Basic.lean

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@ Copyright (c) 2025 Joseph Tooby-Smith. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Joseph Tooby-Smith, Lode Vermeulen
55
-/
6-
import PhysLean.Meta.Informal.SemiFormal
7-
import PhysLean.ClassicalMechanics.EulerLagrange
8-
import PhysLean.ClassicalMechanics.HamiltonsEquations
9-
import PhysLean.ClassicalMechanics.HarmonicOscillator.ConfigurationSpace
6+
module
7+
8+
public import PhysLean.Meta.Informal.SemiFormal
9+
public import PhysLean.ClassicalMechanics.EulerLagrange
10+
public import PhysLean.ClassicalMechanics.HamiltonsEquations
11+
public import PhysLean.ClassicalMechanics.HarmonicOscillator.ConfigurationSpace
1012
/-!
1113
1214
# The Classical Harmonic Oscillator
@@ -81,6 +83,8 @@ References for the classical harmonic oscillator include:
8183
8284
-/
8385

86+
@[expose] public section
87+
8488
namespace ClassicalMechanics
8589
open Real
8690
open Space

PhysLean/ClassicalMechanics/HarmonicOscillator/ConfigurationSpace.lean

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,19 @@ Copyright (c) 2026 Nicola Bernini. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Nicola Bernini
55
-/
6-
import Mathlib.Geometry.Manifold.Diffeomorph
7-
import PhysLean.SpaceAndTime.Time.Basic
6+
module
7+
8+
public import Mathlib.Geometry.Manifold.Diffeomorph
9+
public import PhysLean.SpaceAndTime.Time.Basic
810
/-!
911
# Configuration space of the harmonic oscillator
1012
1113
The configuration space is defined as a one-dimensional smooth manifold,
1214
modeled on `ℝ`, with a chosen coordinate.
1315
-/
1416

17+
@[expose] public section
18+
1519
namespace ClassicalMechanics
1620

1721
namespace HarmonicOscillator

PhysLean/ClassicalMechanics/HarmonicOscillator/Solution.lean

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@ Copyright (c) 2025 Joseph Tooby-Smith. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Joseph Tooby-Smith, Lode Vermeulen
55
-/
6-
import Mathlib.Analysis.CStarAlgebra.Classes
7-
import PhysLean.ClassicalMechanics.HarmonicOscillator.Basic
8-
import PhysLean.Units.Basic
6+
module
7+
8+
public import Mathlib.Analysis.CStarAlgebra.Classes
9+
public import PhysLean.ClassicalMechanics.HarmonicOscillator.Basic
10+
public import PhysLean.Units.Basic
911
/-!
1012
1113
# Solutions to the classical harmonic oscillator
@@ -53,6 +55,8 @@ References for the classical harmonic oscillator include:
5355
5456
-/
5557

58+
@[expose] public section
59+
5660
namespace ClassicalMechanics
5761
open Real Time ContDiff
5862

PhysLean/ClassicalMechanics/Lagrangian/TotalDerivativeEquivalence.lean

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ Copyright (c) 2025 Rein Zustand. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Rein Zustand
55
-/
6-
import PhysLean.Mathematics.VariationalCalculus.HasVarGradient
6+
module
7+
8+
public import PhysLean.Mathematics.VariationalCalculus.HasVarGradient
79
/-!
810
911
# Equivalent Lagrangians under Total Derivatives
@@ -51,6 +53,8 @@ This is because:
5153
5254
-/
5355

56+
@[expose] public section
57+
5458
namespace ClassicalMechanics
5559

5660
open InnerProductSpace

PhysLean/ClassicalMechanics/Mass/MassUnit.lean

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ Copyright (c) 2025 Joseph Tooby-Smith. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Joseph Tooby-Smith
55
-/
6-
import Mathlib.Geometry.Manifold.Diffeomorph
7-
import PhysLean.SpaceAndTime.Time.Basic
6+
module
7+
8+
public import Mathlib.Geometry.Manifold.Diffeomorph
9+
public import PhysLean.SpaceAndTime.Time.Basic
810
/-!
911
1012
# Units on Mass
@@ -24,6 +26,8 @@ existence of the mass unit of kilograms, and construct all other mass units from
2426
2527
-/
2628

29+
@[expose] public section
30+
2731
open NNReal
2832

2933
/-- The choices of translationally-invariant metrics on the mass-manifold.

0 commit comments

Comments
 (0)