import Euler.PhysicalChildParent import Euler.ParentPacketPhysicalCoefficients import Euler.PacketLiftedCoefficient import Euler.ExactLiftedJointDifferentiability /-! The child particle velocity matches the physical reconstruction of the actual common correction, including the source spatial scaling. -/ /-! ## From `Euler/PhysicalChildVelocity.lean` The text of `Euler/PhysicalChildVelocity.lean`, folded into this file, which was its only importer. -/ section /-! The constructed child particle velocity is the Eulerian pushforward of the actual graph velocity. The normalized packet formula follows from the literal lifted coefficient, with the physical scale explicit. -/ noncomputable section namespace EulerPhysicalGraphFlowBounds.Data open Set EulerLiftedGradientSpace EulerGraphInvariantFlow EulerSmoothBanachFlow EulerSmoothFlowGevrey variable {P T : ℝ} [Fact (0 < P)] (G : EulerPhysicalGraphFlowBounds.Data P T) (k : ℝ) (m : Vector3) (ell : ℝ) (hell : 0 < ell) (hgraph : ∀ t z, graphConstraint k m (G.A.field t z)=0) include hgraph hell in theorem physicalDisplacementCoefficient_position (t : Icc (0 : ℝ) T) (x : Vector3) : x+(G.physicalDisplacementCoefficient k m ell).field t x = (flowData T G.time_nonneg (physicalCoefficient k m T G.A ell)).forward t x := by rw [G.physicalDisplacementCoefficient_eq k m ell hell, G.displacementField_eq k m hgraph ell hell,displacement_eq] abel include hgraph hell in theorem physicalVelocityCoefficient_material (t : Icc (0 : ℝ) T) (x : Vector3) : (G.physicalVelocityCoefficient k m ell).field t x = (physicalCoefficient k m T G.A ell).field t ((flowData T G.time_nonneg (physicalCoefficient k m T G.A ell)).forward t x) := by rw [G.physicalVelocityCoefficient_eq k m ell hell,G.velocityField_eq k m hgraph ell hell] rfl end EulerPhysicalGraphFlowBounds.Data namespace EulerParentPacketFrames.Parent open Set EulerSmoothLimit EulerLiftedGradientSpace EulerGraphInvariantFlow EulerSmoothBanachFlow EulerMetricTransport variable (A : EulerParentPacketFrames.Parent) {P : ℝ} [Fact (0 < P)] (G : EulerPhysicalGraphFlowBounds.Data P A.T) (k : ℝ) (m : Vector3) (hgraph : ∀ t z, graphConstraint k m (G.A.field t z)=0) (nextEll : ℝ) (hnext : 0 < nextEll) (hnext1 : nextEll ≤ 1) def graphPushforwardVelocity (Y u : Icc (0 : ℝ) A.T → Space → Space) (t : Icc (0 : ℝ) A.T) (x : Space) : Space := u t x + (ContinuousLinearMap.id ℝ Space + fderiv ℝ (A.displacement.field t : Space → Space) (Y t x)) ((physicalCoefficient k m A.T G.A A.ell).field t (Y t x)) theorem child_position (t : Icc (0 : ℝ) A.T) (x : Space) : (A.child G k m hgraph nextEll hnext hnext1).position t x = A.position t ((flowData A.T G.time_nonneg (physicalCoefficient k m A.T G.A A.ell)).forward t x) := A.child_particleMap G k m hgraph nextEll hnext hnext1 t x theorem child_velocity_formula (t : Icc (0 : ℝ) A.T) (x : Space) : (A.child G k m hgraph nextEll hnext hnext1).velocity.field t x = let y := (flowData A.T G.time_nonneg (physicalCoefficient k m A.T G.A A.ell)).forward t x A.velocity.field t y + (ContinuousLinearMap.id ℝ Space + fderiv ℝ (A.displacement.field t : Space → Space) y) ((physicalCoefficient k m A.T G.A A.ell).field t y) := by change (EulerChildParticleTime.velocity A.displacement A.velocity (G.physicalDisplacementCoefficient k m A.ell) (G.physicalVelocityCoefficient k m A.ell)).field t x=_ rw [EulerChildParticleTime.velocity_apply, G.physicalDisplacementCoefficient_position k m A.ell A.ell_pos hgraph, G.physicalVelocityCoefficient_material k m A.ell A.ell_pos hgraph] simp only [_root_.add_apply,ContinuousLinearMap.id_apply] abel theorem child_velocity_pushforward (Y u : Icc (0 : ℝ) A.T → Space → Space) (hYX : ∀ t x, Y t (A.position t x)=x) (hvelocity : ∀ t x, A.velocity.field t x=u t (A.position t x)) (t : Icc (0 : ℝ) A.T) (x : Space) : (A.child G k m hgraph nextEll hnext hnext1).velocity.field t x = A.graphPushforwardVelocity G k m Y u t ((A.child G k m hgraph nextEll hnext hnext1).position t x) := by rw [A.child_velocity_formula G k m hgraph nextEll hnext hnext1,graphPushforwardVelocity, A.child_position G k m hgraph nextEll hnext hnext1,hYX] dsimp only rw [hvelocity] theorem graphPushforwardVelocity_packet (Y u : Icc (0 : ℝ) A.T → Space → Space) (κ : ℝ) (z : Icc (0 : ℝ) A.T → LiftTangent → Space) (hlift : ∀ t q, G.A.field t q=transportDirection κ m (z t q)) (t : Icc (0 : ℝ) A.T) (x : Space) : A.graphPushforwardVelocity G k m Y u t x = u t x + A.ell • (κ • A.frame.field t (A.ell⁻¹ • Y t x) (z t (graphLinear k m (A.ell⁻¹ • Y t x)))) := by rw [graphPushforwardVelocity,physicalCoefficient_apply,hlift] change u t x + (ContinuousLinearMap.id ℝ Space + fderiv ℝ (A.displacement.field t : Space → Space) (Y t x)) (A.ell • (κ • z t (graphLinear k m (A.ell⁻¹ • Y t x))))=_ rw [map_smul,map_smul,A.frame_apply] have hx : A.ell • (A.ell⁻¹ • Y t x)=Y t x := by rw [smul_smul,mul_inv_cancel₀ A.ell_pos.ne',one_smul] rw [hx] end EulerParentPacketFrames.Parent end end noncomputable section namespace EulerParentPacketFrames.Parent open Set InnerProductSpace EulerSmoothLimit EulerLiftedGradientSpace EulerGraphInvariantFlow EulerAllOrderCorrectionData EulerAllOrderDriftCorrection EulerGraphPressurePotential EulerMetricTransport EulerPacketPhysicalTransform variable (A : EulerParentPacketFrames.Parent) {P : ℝ} [Fact (0 < P)] {C : EulerAllOrderCorrectionData.Data P A.T} (B : EulerAllOrderDriftCorrection.Budget P A.T_pos C) def correctedPacketVelocity (k : ℝ) (Y u : Icc (0 : ℝ) A.T → Space → Space) (t : Icc (0 : ℝ) A.T) (x : Space) : Space := u t x + A.ell • (C.κ • A.frame.field t (A.ell⁻¹ • Y t x) ((B.correctedFieldTower P).pointField t (cylinderGraph P k C.direction (A.ell⁻¹ • Y t x)))) def packetInverse (Y : Icc (0 : ℝ) A.T → Space → Space) (q : ℝ × Space) : Space := A.ell⁻¹ • Y (projIcc 0 A.T A.T_pos.le q.1) (A.ell • q.2) theorem correctedPacketVelocity_eq_physical (k : ℝ) (Y u : Icc (0 : ℝ) A.T → Space → Space) (t : Icc (0 : ℝ) A.T) (x : Space) : A.correctedPacketVelocity B k Y u t x = u t x + A.ell • physicalVelocity C.κ k C.direction (fun q => A.frame.realField A.T A.T_pos.le q.1 q.2) ((B.correctedFieldTower P).rawField A.T_pos.le) (A.packetInverse Y) (t,A.ell⁻¹ • x) := by have hx : A.ell • (A.ell⁻¹ • x)=x := by rw [smul_smul,mul_inv_cancel₀ A.ell_pos.ne',one_smul] simp only [correctedPacketVelocity,EulerPacketPhysicalTransform.physicalVelocity, EulerPacketPhysicalTransform.inverseCoordinates,EulerPacketPhysicalTransform.graphVelocity, EulerPacketPhysicalTransform.spaceTimeGraph_apply,packetInverse,FieldTower.rawField,SmoothTimeField.realField_apply, projIcc_of_mem A.T_pos.le t.property,hx,cylinderGraph,coveringMap] variable {raw : EulerPacketProfileRecursion.VectorField} (V : EulerPacketCylinderField.Field P A.T raw) (hV : C.approximation=V.toFieldTower) (G : EulerPhysicalGraphFlowBounds.Data P A.T) (hG : G.A=B.liftedPacketCoefficient P V) include hV hG in theorem graphPushforwardVelocity_corrected (k : ℝ) (Y u : Icc (0 : ℝ) A.T → Space → Space) (t : Icc (0 : ℝ) A.T) (x : Space) : A.graphPushforwardVelocity G k C.direction Y u t x = A.correctedPacketVelocity B k Y u t x := by have h := A.graphPushforwardVelocity_packet G k C.direction Y u C.κ (fun s q => (B.correctedFieldTower P).pointField s (coveringMap P q)) (by intro s q rw [hG] exact B.liftedPacketCoefficient_eq_corrected P V hV s q) t x simpa only [correctedPacketVelocity,graphLinear_apply,cylinderGraph,coveringMap] using h include hV hG in theorem child_velocity_corrected (k : ℝ) (hgraph : ∀ t q, graphConstraint k C.direction (G.A.field t q)=0) (nextEll : ℝ) (hnext : 0 < nextEll) (hnext1 : nextEll ≤ 1) (Y u : Icc (0 : ℝ) A.T → Space → Space) (hYX : ∀ t x, Y t (A.position t x)=x) (hvelocity : ∀ t x, A.velocity.field t x=u t (A.position t x)) (t : Icc (0 : ℝ) A.T) (x : Space) : (A.child G k C.direction hgraph nextEll hnext hnext1).velocity.field t x = A.correctedPacketVelocity B k Y u t ((A.child G k C.direction hgraph nextEll hnext hnext1).position t x) := (A.child_velocity_pushforward G k C.direction hgraph nextEll hnext hnext1 Y u hYX hvelocity t x).trans (A.graphPushforwardVelocity_corrected B V hV G hG k Y u t _) end EulerParentPacketFrames.Parent