Download lean/OAI/MathematicalPhysics/NavierStokes/ShearFlows/Model.lean from roseking/openAI-math-dataset: direct link, hf CLI and curl.
- Browser
- Download file 11.8 kB
-
https://huggingface.co/datasets/roseking/openAI-math-dataset/resolve/main/lean/OAI/MathematicalPhysics/NavierStokes/ShearFlows/Model.lean
- Command line
-
hf download hf://datasets/roseking/openAI-math-dataset/lean/OAI/MathematicalPhysics/NavierStokes/ShearFlows/Model.lean
-
curl -L -o Model.lean https://huggingface.co/datasets/roseking/openAI-math-dataset/resolve/main/lean/OAI/MathematicalPhysics/NavierStokes/ShearFlows/Model.lean
11.8 kB
Lean 4 · 68
declarations statementsfull
theorem neZeroTwo : NeZero 2 := ⟨Nat.succ_ne_zero 1⟩ theorem neZeroThree : NeZero 3 := ⟨Nat.succ_ne_zero 2⟩ theorem neZeroFour : NeZero 4 := ⟨Nat.succ_ne_zero 3⟩ theorem neZeroEight : NeZero 8 := ⟨Nat.succ_ne_zero 7⟩ theorem twoAtLeastTwo : Nat.AtLeastTwo 2 := ⟨Nat.le_refl 2⟩ theorem fourAtLeastTwo : Nat.AtLeastTwo 4 := ⟨by decide⟩ theorem fiveAtLeastTwo : Nat.AtLeastTwo 5 := ⟨by decide⟩ theorem eightAtLeastTwo : Nat.AtLeastTwo 8 := ⟨by decide⟩ theorem sixteenAtLeastTwo : Nat.AtLeastTwo 16 := ⟨by decide⟩ theorem thirtyTwoAtLeastTwo : Nat.AtLeastTwo 32 := ⟨by decide⟩ theorem oneTwentyEightAtLeastTwo : Nat.AtLeastTwo 128 := ⟨by decide⟩ abbrev Plane := Fin 2 → ℝ abbrev Space := Fin 3 → ℝ abbrev SpaceTime := ℝ × Space abbrev Velocity := SpaceTime → Space abbrev Pressure := SpaceTime → ℝ structure RationalBox (n : ℕ) where body · 2 lines
lower : Fin n → ℚ
upper : Fin n → ℚdef encoding (n : ℕ) : RationalBox n ≃ ((Fin n → ℚ) × (Fin n → ℚ)) where body · 4 lines
toFun B := (B.lower, B.upper)
invFun B := ⟨B.1, B.2⟩
left_inv _ := rfl
right_inv _ := rflinstance (n : ℕ) : Primcodable (RationalBox n) := body · 1 line
Primcodable.ofEquiv _ (encoding n)def carrier {n : ℕ} (B : RationalBox n) : Set (Fin n → ℝ) := body · 1 line
{x | ∀ j, (B.lower j : ℝ) ≤ x j ∧ x j ≤ (B.upper j : ℝ)}def center {n : ℕ} (B : RationalBox n) : Fin n → ℝ := body · 1 line
fun j => ((B.lower j : ℝ) + (B.upper j : ℝ)) / 2def halfWidth {n : ℕ} (B : RationalBox n) (j : Fin n) : ℝ := body · 1 line
((B.upper j : ℝ) - (B.lower j : ℝ)) / 2def positive {n : ℕ} (B : RationalBox n) : Prop := body · 1 line
∀ j, B.lower j < B.upper jdef nonemptyBox {n : ℕ} (B : RationalBox n) : Prop := body · 1 line
∀ j, B.lower j ≤ B.upper jstructure Instruction where body · 3 lines
source : RationalBox 2
target : RationalBox 2
factor : ℚdef encoding : Instruction ≃ (RationalBox 2 × RationalBox 2 × ℚ) where body · 4 lines
toFun b := (b.source, b.target, b.factor)
invFun b := ⟨b.1, b.2.1, b.2.2⟩
left_inv _ := rfl
right_inv _ := rflinstance : Primcodable Instruction := Primcodable.ofEquiv _ encoding def affine (b : Instruction) (x : Plane) : Plane := body · 2 lines
![b.target.center 0 + (b.factor : ℝ) * (x 0 - b.source.center 0),
b.target.center 1 + (x 1 - b.source.center 1) / (b.factor : ℝ)]structure Input where body · 6 lines
period : ℚ
chart : RationalBox 3
h : ℚ
codingHeight : ℚ
centers : RationalBox 2
instructions : List Instructiondef encoding : Input ≃
(ℚ × RationalBox 3 × ℚ × ℚ × RationalBox 2 × List Instruction) where body · 4 lines
toFun d := (d.period, d.chart, d.h, d.codingHeight, d.centers, d.instructions)
invFun d := ⟨d.1, d.2.1, d.2.2.1, d.2.2.2.1, d.2.2.2.2.1, d.2.2.2.2.2⟩
left_inv _ := rfl
right_inv _ := rflinstance : Primcodable Input := Primcodable.ofEquiv _ encoding def inChart (d : Input) (x : Space) : Prop := body · 1 line
∀ j, (d.chart.lower j : ℝ) < x j ∧ x j < (d.chart.upper j : ℝ)def inPlanarChart (d : Input) (x : Plane) : Prop := body · 2 lines
∀ j, (d.chart.lower j.castSucc : ℝ) < x j ∧
x j < (d.chart.upper j.castSucc : ℝ)def PositivelySeparated (A B : Set Plane) : Prop := body · 1 line
∃ ε : ℝ, 0 < ε ∧ ∀ x ∈ A, ∀ y ∈ B, ε ≤ ‖x - y‖structure ValidInput (d : Input) : Prop where body · 26 lines
period_pos : 0 < d.period
chart_positive : d.chart.positive
chart_length : ∀ j, d.chart.upper j - d.chart.lower j < d.period
h_pos : 0 < d.h
centers_nonempty : d.centers.nonemptyBox
chartMargin : ∀ j : Fin 2,
(d.chart.lower j.castSucc : ℝ) < (d.centers.lower j : ℝ) - 2 * (d.h : ℝ) ∧
(d.centers.upper j : ℝ) + 2 * (d.h : ℝ) < (d.chart.upper j.castSucc : ℝ)
height_inside : (d.chart.lower 2 : ℝ) < (d.codingHeight : ℝ) ∧
(d.codingHeight : ℝ) < (d.chart.upper 2 : ℝ)
source_positive : ∀ b ∈ d.instructions, b.source.positive
target_positive : ∀ b ∈ d.instructions, b.target.positive
source_in_chart : ∀ b ∈ d.instructions, b.source.carrier ⊆ d.inPlanarChart
target_in_chart : ∀ b ∈ d.instructions, b.target.carrier ⊆ d.inPlanarChart
factor_pos : ∀ b ∈ d.instructions, 0 < b.factor
image_eq : ∀ b ∈ d.instructions, b.affine '' b.source.carrier = b.target.carrier
source_separation : ∀ i j : Fin d.instructions.length, i ≠ j →
PositivelySeparated (d.instructions[i].source.carrier)
(d.instructions[j].source.carrier)
target_separation : ∀ i j : Fin d.instructions.length, i ≠ j →
PositivelySeparated (d.instructions[i].target.carrier)
(d.instructions[j].target.carrier)
halfWidths : ∀ b ∈ d.instructions, ∀ j,
b.source.halfWidth j ≤ (d.h : ℝ) ∧ b.target.halfWidth j ≤ (d.h : ℝ)
source_centers : ∀ b ∈ d.instructions, b.source.center ∈ d.centers.carrier
target_centers : ∀ b ∈ d.instructions, b.target.center ∈ d.centers.carrierdef basis (j : Fin 3) : Space := Pi.single j 1 def horizontal (x : Space) : Plane := ![x 0, x 1] def atHeight (x : Plane) (z : ℝ) : Space := ![x 0, x 1, z] def latticeVector (L : ℝ) (n : Fin 3 → ℤ) : Space := fun j => L * (n j : ℝ) def SpatiallyPeriodic {E : Type*} (L : ℝ) (g : SpaceTime → E) : Prop := body · 1 line
∀ t x n, g (t, x + latticeVector L n) = g (t, x)def TimePeriodic {E : Type*} (g : SpaceTime → E) : Prop := body · 1 line
∀ t x, g (t + 1, x) = g (t, x)def fundamentalCube (L : ℝ) : Set Space := Icc 0 (fun _ => L) def derivative (U : Space → Space) (j : Fin 3) (x : Space) : Space := body · 1 line
fderiv ℝ U x (basis j)def divergence (U : Space → Space) (x : Space) : ℝ := body · 1 line
∑ j, derivative U j x jdef laplacian (U : Space → Space) (x : Space) : Space := body · 1 line
∑ j, fderiv ℝ (derivative U j) x (basis j)def advection (U : Space → Space) (x : Space) : Space := body · 1 line
fderiv ℝ U x (U x)def gradient (p : Space → ℝ) (x : Space) : Space := body · 1 line
fun j => fderiv ℝ p x (basis j)def HasZeroMean {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
(L : ℝ) (g : SpaceTime → E) : Prop := body · 1 line
∀ t, (∫ x in fundamentalCube L, g (t, x)) = 0def Solenoidal (V : Velocity) : Prop := body · 1 line
∀ t x, divergence (fun y => V (t, y)) x = 0def ZeroAdvection (V : Velocity) : Prop := body · 1 line
∀ t x, advection (fun y => V (t, y)) x = 0def timeDerivative (V : Velocity) (t : ℝ) (x : Space) : Space := body · 1 line
deriv (fun s => V (s, x)) tdef force (ν : ℝ) (V : Velocity) : Velocity := body · 1 line
fun y => timeDerivative V y.1 y.2 - ν • laplacian (fun x => V (y.1, x)) y.2def spaceTimeDirection (j : Fin 4) : SpaceTime := body · 1 line
Fin.cases (1, 0) (fun k => (0, basis k)) jdef mixedDerivative (V : Velocity) : List (Fin 4) → Velocity body · 2 lines
| [] => V
| j :: α => fun y => fderiv ℝ (mixedDerivative V α) y (spaceTimeDirection j)def BoundedMixedDerivatives (V : Velocity) : Prop := body · 1 line
∀ α, ∃ B : ℝ, 0 ≤ B ∧ ∀ y, ‖mixedDerivative V α y‖ ≤ Bdef rationalPoint (q : ℚ × (Fin 3 → ℚ)) : SpaceTime := body · 1 line
((q.1 : ℝ), fun j => (q.2 j : ℝ))def errorTolerance (n : ℕ) : ℝ := ((2 : ℝ) ^ n)⁻¹ def ComputableReal (r : ℝ) : Prop := body · 2 lines
∃ code : Nat.Partrec.Code, ∀ n : ℕ, ∃ q : ℚ,
Encodable.encode q ∈ code.eval n ∧ |r - (q : ℝ)| ≤ errorTolerance nstructure Schedule where body · 10 lines
start : Fin 7 → ℚ
finish : Fin 7 → ℚ
intervals : ∀ j, 0 < start j ∧ start j < finish j ∧ finish j < 1
ordered : ∀ i j, i < j → finish i < start j
progress : Fin 7 → ℝ → ℝ
smooth : ∀ j, ContDiff ℝ ∞ (progress j)
monotone : ∀ j, Monotone (progress j)
range : ∀ j t, progress j t ∈ Icc (0 : ℝ) 1
before : ∀ j t, t ≤ (start j : ℝ) → progress j t = 0
after : ∀ j t, (finish j : ℝ) ≤ t → progress j t = 1structure IsMaterialFlow (L : ℝ) (V : Velocity) (Φ : ℝ → Space → Space) : Prop where body · 6 lines
initial : ∀ a, Φ 0 a = a
ode : ∀ t a, HasDerivAt (fun s => Φ s a) (V (t, Φ t a)) t
equivariant : ∀ t a n,
Φ t (a + latticeVector L n) = Φ t a + latticeVector L n
unique : ∀ a (γ : ℝ → Space), γ 0 = a →
(∀ t, HasDerivAt γ (V (t, γ t)) t) → ∀ t, γ t = Φ t adef sourceTube (b : Instruction) (z δ : ℝ) : Set Space := body · 1 line
{x | ∃ y ∈ b.source.carrier, ‖horizontal x - y‖ < δ ∧ |x 2 - z| < δ}def scaledOffset (b : Instruction) (x : Plane) : Plane := body · 2 lines
![(b.factor : ℝ) * (x 0 - b.source.center 0),
(x 1 - b.source.center 1) / (b.factor : ℝ)]structure StageMotion (d : Input) (Φ : ℝ → Space → Space) (s : Schedule) : Prop where body · 16 lines
lift : ∀ b ∈ d.instructions, ∀ X ∈ b.source.carrier,
∀ t ∈ Icc (0 : ℝ) (s.finish 0 : ℝ),
horizontal (Φ t (atHeight X d.codingHeight)) = X
scaling : ∀ b ∈ d.instructions, ∀ X ∈ b.source.carrier,
∀ t ∈ Icc (s.start 1 : ℝ) (s.finish 4 : ℝ),
‖horizontal (Φ t (atHeight X d.codingHeight)) - b.source.center‖ ≤ 2 * (d.h : ℝ)
translation_offset : ∀ b ∈ d.instructions, ∀ X ∈ b.source.carrier,
‖scaledOffset b X‖ ≤ (d.h : ℝ)
translation : ∀ b ∈ d.instructions, ∀ X ∈ b.source.carrier,
∀ t ∈ Icc (s.start 5 : ℝ) (s.finish 5 : ℝ),
horizontal (Φ t (atHeight X d.codingHeight)) =
(1 - s.progress 5 t) • b.source.center +
s.progress 5 t • b.target.center + scaledOffset b X
lower : ∀ b ∈ d.instructions, ∀ X ∈ b.source.carrier,
∀ t ∈ Icc (s.start 6 : ℝ) 1,
horizontal (Φ t (atHeight X d.codingHeight)) = b.affine Xdef initialTimeDerivative (u : Velocity) (t : ℝ) (x : Space) : Space := body · 1 line
derivWithin (fun s => u (s, x)) (Ici 0) tdef timeCylinder (T : ℝ) : Set SpaceTime := Icc (0 : ℝ) T ×ˢ univ structure ClassicalRegularity (u : Velocity) (p : Pressure) : Prop where body · 15 lines
spatial_u : ∀ t, 0 ≤ t → ContDiff ℝ 2 (fun x => u (t, x))
temporal_u : ∀ t, 0 ≤ t → ∀ x,
DifferentiableWithinAt ℝ (fun s => u (s, x)) (Ici 0) t
spatial_p : ∀ t, 0 ≤ t → ContDiff ℝ 1 (fun x => p (t, x))
continuous_u : ∀ T, 0 ≤ T → ContinuousOn u (timeCylinder T)
continuous_du : ∀ T, 0 ≤ T → ContinuousOn
(fun y : SpaceTime => fderiv ℝ (fun x => u (y.1, x)) y.2) (timeCylinder T)
continuous_ddu : ∀ T, 0 ≤ T → ContinuousOn
(fun y : SpaceTime => fderiv ℝ (fderiv ℝ (fun x => u (y.1, x))) y.2)
(timeCylinder T)
continuous_ut : ∀ T, 0 ≤ T → ContinuousOn
(fun y : SpaceTime => initialTimeDerivative u y.1 y.2) (timeCylinder T)
continuous_p : ∀ T, 0 ≤ T → ContinuousOn p (timeCylinder T)
continuous_dp : ∀ T, 0 ≤ T → ContinuousOn
(fun y : SpaceTime => gradient (fun x => p (y.1, x)) y.2) (timeCylinder T)structure IsClassicalSolution (L ν : ℝ) (f u : Velocity) (p : Pressure) : Prop where body · 10 lines
regularity : ClassicalRegularity u p
periodic_u : ∀ t, 0 ≤ t → ∀ x n, u (t, x + latticeVector L n) = u (t, x)
periodic_p : ∀ t, 0 ≤ t → ∀ x n, p (t, x + latticeVector L n) = p (t, x)
pressure_mean : ∀ t, 0 ≤ t → (∫ x in fundamentalCube L, p (t, x)) = 0
initial : ∀ x, u (0, x) = 0
divergence_zero : ∀ t, 0 ≤ t → ∀ x, divergence (fun y => u (t, y)) x = 0
equation : ∀ t, 0 ≤ t → ∀ x,
initialTimeDerivative u t x + advection (fun y => u (t, y)) x =
-gradient (fun y => p (t, y)) x +
ν • laplacian (fun y => u (t, y)) x + f (t, x)def kineticEnergy (L : ℝ) (u : Velocity) (t : ℝ) : ℝ := body · 1 line
(1 / 2 : ℝ) * ∫ x in fundamentalCube L, ∑ j : Fin 3, (u (t, x) j) ^ 2Outline
- theorem
neZeroTwo11 - theorem
neZeroThree13 - theorem
neZeroFour15 - theorem
neZeroEight17 - theorem
twoAtLeastTwo19 - theorem
fourAtLeastTwo21 - theorem
fiveAtLeastTwo22 - theorem
eightAtLeastTwo24 - theorem
sixteenAtLeastTwo26 - theorem
thirtyTwoAtLeastTwo28 - theorem
oneTwentyEightAtLeastTwo30 - abbrev
Plane32 - abbrev
Space33 - abbrev
SpaceTime34 - abbrev
Velocity35 - abbrev
Pressure36 - structure
RationalBox38 - def
encoding44 - instance
50 - def
carrier53 - def
center56 - def
halfWidth59 - def
positive62 - def
nonemptyBox65 - structure
Instruction70 - def
encoding77 - instance
83 - def
affine85 - structure
Input91 - def
encoding101 - instance
108 - def
inChart110 - def
inPlanarChart113 - def
PositivelySeparated119 - structure
ValidInput122 - def
basis150 - def
horizontal152 - def
atHeight154 - def
latticeVector156 - def
SpatiallyPeriodic158 - def
TimePeriodic161 - def
fundamentalCube164 - def
derivative166 - def
divergence169 - def
laplacian172 - def
advection175 - def
gradient178 - def
HasZeroMean181 - def
Solenoidal185 - def
ZeroAdvection188 - def
timeDerivative191 - def
force194 - def
spaceTimeDirection197 - def
mixedDerivative200 - def
BoundedMixedDerivatives204 - def
rationalPoint207 - def
errorTolerance210 - def
ComputableReal212 - structure
Schedule216 - structure
IsMaterialFlow228 - def
sourceTube236 - def
scaledOffset239 - structure
StageMotion243 - def
initialTimeDerivative261 - def
timeCylinder264 - structure
ClassicalRegularity266 - structure
IsClassicalSolution283 - def
kineticEnergy295