def
definition
total
show as:
view math explainer →
open explainer
Generate a durable explainer page for this declaration.
open lean source
IndisputableMonolith.NavierStokes.DiscreteVorticity on GitHub at line 32.
browse module
All declarations in this module, on Recognition.
explainer page
depends on
used by
-
applied -
energyConservationCert -
hamilton_equations_from_EL -
totalEnergy -
spaceTranslationFlow -
space_translation_invariance_implies_momentum_conservation -
timeTranslationFlow -
DoubleEntryAlgebra -
StellarConfig -
uncatalyzedBarrier -
H_SATTMRuntime -
sat_computation_time -
tm_simulation_bound -
CircuitDecides -
p_neq_np_conditional -
consistent -
completeStateFrom -
twoSystems_length -
cone_bound_export -
active_edges_per_tick -
gauss_bonnet_Q3 -
geometric_seed_factor_eq_11 -
passive_edges_at_D3 -
per_face_solid_angle_eq -
vertex_deficit_eq -
active_edges -
angular_contribution_per_dim -
balance_constraint_codim_1 -
balance_determines_lambda -
lambda_rec_is_forced -
num_octants -
Q3_vertices -
eleven_is_passive_edges -
SpacetimeRegion -
cosmological_constant_resolution -
cube_face_equicardinal -
rSCryptographicBoundCert -
switch_strictly_better_real -
extinctionCascadeCert -
totalRung_pos
formal source
29 omega : Fin siteCount → ℝ
30
31/-- Sum of a scalar field over the finite lattice window. -/
32def total {siteCount : ℕ} (f : Fin siteCount → ℝ) : ℝ :=
33 ∑ i : Fin siteCount, f i
34
35/-- RMS square of a scalar field. -/
36def rmsSq {siteCount : ℕ} (f : Fin siteCount → ℝ) : ℝ :=
37 total (fun i => (f i) ^ 2) / siteCount
38
39/-- RMS amplitude of a scalar field. -/
40def rms {siteCount : ℕ} (f : Fin siteCount → ℝ) : ℝ :=
41 Real.sqrt (rmsSq f)
42
43/-- Pointwise normalized amplitude relative to the RMS scale. -/
44def normalizedAmplitude {siteCount : ℕ} (f : Fin siteCount → ℝ) (i : Fin siteCount) : ℝ :=
45 |f i| / rms f
46
47/-- The total J-cost of a discrete vorticity field relative to its RMS scale. -/
48def totalJcost {siteCount : ℕ} (f : Fin siteCount → ℝ) : ℝ :=
49 total (fun i => Jcost (normalizedAmplitude f i))
50
51/-- Contribution fields appearing in the J-cost derivative identity. -/
52structure ContributionFields (siteCount : ℕ) where
53 transport : Fin siteCount → ℝ
54 viscous : Fin siteCount → ℝ
55 stretching : Fin siteCount → ℝ
56
57/-- Total contributions of the three pieces. -/
58def totalTransport {siteCount : ℕ} (c : ContributionFields siteCount) : ℝ :=
59 total c.transport
60
61def totalViscous {siteCount : ℕ} (c : ContributionFields siteCount) : ℝ :=
62 total c.viscous