import Euler.PacketInductionStage import Euler.BaseFirstPacketChoice import Euler.BaseFirstPacketScales import Euler.PacketSourceScaleSequence /-! The first stage of the actual induction is constructed from the literal compact base solution and the first same-Q packet choice. -/ /-! ## From `Euler/BaseLiteralFirstPacket.lean` The text of `Euler/BaseLiteralFirstPacket.lean`, folded into this file, which was its only importer. -/ section /-! The literal base scale constructs the first actual smooth Euler packet state and its localized source bounds. -/ noncomputable section namespace EulerBaseDatum.FirstScaleGuards open Real EulerParentPacketFrames EulerPacketBaseGuardScales EulerPacketSourceScaleSequence EulerPacketSourceScaleChoice EulerPacketFirstLowBounds variable {J D : ℕ} {X : ℝ} (H : FirstScaleGuards J D X) include H theorem x_pos : 0 < X := zero_lt_one.trans_le H.x_one theorem tilt_bound : |X^(-2 : ℝ)| ≤ 1 := by rw [abs_of_nonneg (rpow_nonneg H.x_pos.le _)] exact rpow_le_one_of_one_le_of_nonpos H.x_one (by norm_num) theorem core_pos : 0 < baseRadius X := baseRadius_pos H.x_pos theorem core_one : baseRadius X ≤ 1 := H.radius_small.trans (by norm_num) theorem time_pos (hJ : 1 ≤ J) : 0 < baseHorizon J X := baseHorizon_pos J hJ H.x_pos theorem spike_pos : 0 < X^(-1010 : ℝ) := rpow_pos_of_pos H.x_pos _ theorem spike_one : X^(-1010 : ℝ) ≤ 1 := rpow_le_one_of_one_le_of_nonpos H.x_one (by norm_num) theorem shear_pos : 0 < X^1000 := pow_pos H.x_pos _ omit H in theorem nextRadius_pos : 0 < supportScale J X 0 := exp_pos _ theorem nextRadius_one : supportScale J X 0 ≤ 1 := by unfold supportScale apply exp_le_one_iff.mpr exact div_nonpos_of_nonpos_of_nonneg (neg_nonpos.mpr H.x_pos.le) (rpow_nonneg (Nat.cast_nonneg _) _) def packet (hJ : 1 ≤ J) : FirstPacketChoice (X^(-2 : ℝ)) H.tilt_bound (baseRadius X) H.core_pos H.core_one (baseHorizon J X) (H.time_pos hJ) H.local_time (X^(-1010 : ℝ)) H.spike_pos (X^1000) (X^D) H.frequency (supportScale J X 0) nextRadius_pos H.nextRadius_one := Classical.choice (exists_firstPacketChoice (X^(-2 : ℝ)) H.tilt_bound (baseRadius X) H.core_pos H.core_one (baseHorizon J X) (H.time_pos hJ) H.local_time (X^(-1010 : ℝ)) H.spike_pos (X^1000) (X^D) H.frequency (supportScale J X 0) nextRadius_pos H.nextRadius_one H.spike_one H.shear_pos H.source_frequency H.label_frequency H.radius_frequency) def parent (hJ : 1 ≤ J) : Parent := (H.packet hJ).parent def state (hJ : 1 ≤ J) : SmoothState (H.parent hJ) := (H.packet hJ).state theorem state_label (hJ : 1 ≤ J) : (H.state hJ).labels.K=(X^D)^80 := (H.packet hJ).state_label_constant def lowBounds (hJ : 1 ≤ J) : LowBounds (H.parent hJ) := FirstPacketChoice.lowBounds (X^(-2 : ℝ)) H.tilt_bound (baseRadius X) H.core_pos H.core_one (baseHorizon J X) (H.time_pos hJ) H.local_time (X^(-1010 : ℝ)) H.spike_pos (X^1000) (X^D) H.frequency (supportScale J X 0) nextRadius_pos H.nextRadius_one (H.packet hJ) H.radius_small H.spike_one H.shear_pos.le (by simpa only [literalInitialPressureCost,literalInitialError,← add_assoc] using H.localized) theorem lowBounds_values (hJ : 1 ≤ J) : (H.lowBounds hJ).Be=initialCoefficientCost ∧ (H.lowBounds hJ).Bc=initialCoefficientCost+X^1000*firstRatio+literalInitialError D X ∧ (H.lowBounds hJ).r=baseRadius X ∧ (H.lowBounds hJ).K=initialCoefficientCost+literalInitialPressureCost D X := by refine ⟨rfl,rfl,rfl,?_⟩ change initialCoefficientCost+2*initialCoefficientCost*X^(-1010 : ℝ)*(X^1000*firstRatio)+ (X^D)^(-(1/4 : ℝ))=initialCoefficientCost+literalInitialPressureCost D X unfold literalInitialPressureCost literalInitialError ring end EulerBaseDatum.FirstScaleGuards end end noncomputable section namespace EulerPacketInductionScales.Scales open Set Finset Real InnerProductSpace EulerSmoothLimit EulerParentPacketFrames EulerBaseDatum EulerPacketSupport EulerPacketSourceGeometry EulerPacketNormalizedPrimary EulerPacketLowConstants EulerPacketInduction EulerPacketSourceScaleChoice EulerPacketSourceScaleSequence EulerPacketSourceScaleActual EulerPacketBaseGuardScales EulerParentRenewalScale EulerMeanHarmonic -- Limit elaboration of the concrete flow only within this namespace scope. attribute [local irreducible] initialParent variable {c B : ℝ} (S : Scales c B) def firstStage : Stage S 0 := by let F := S.first.packet S.j_one let P := F.initialFrame firstNormal firstNormal_unit firstFrame support compact have hparam := F.initialFrame_parameters firstNormal firstNormal_unit firstFrame support compact have hcost := F.initialFrame_costs firstNormal firstNormal_unit firstFrame support compact have hlow := S.first.lowBounds_values S.j_one have hbounds := initial_bounds (S.X^1000) (literalInitialError S.D S.X) (one_le_pow₀ S.x_one) S.first.error_small have htilt : P.sigma^2*S.X^2=1 := by rw [show P.sigma=sqrt (S.X^(-2 : ℝ)) from hparam.2.1, sq_sqrt (rpow_nonneg S.x_pos.le _),rpow_neg S.x_pos.le] norm_num only [rpow_ofNat] exact inv_mul_cancel₀ (pow_ne_zero _ S.x_pos.ne') refine { parent := S.first.parent S.j_one state := S.first.state S.j_one low := S.first.lowBounds S.j_one time := 0 time_nonneg := le_rfl time_zero := fun _ => rfl time_lower := fun h => (h rfl).elim horizon_eq := ?_ horizon_le := le_rfl scale_eq := rfl label_eq := S.first.state_label S.j_one gradient_bound := ?_ hessian_bound := ?_ exterior_bound := ?_ core_bound := ?_ pressure_bound := ?_ boundary_eq := rfl radius_eq := hlow.2.2.1 frame := P frame_shear := hparam.2.2 frame_bound := ?_ frame_error := ?_ coupling_error := ?_ tilt_lower := ?_ tilt_upper := ?_ compression := fun h => (h rfl).elim } · change baseHorizon S.J S.X=0+2*timeWidth S.J S.X 0 rw [zero_add,baseHorizon_eq_timeWidth S.J S.x_pos] · intro t x have h := (F.physical_bounds S.first.spike_one S.first.shear_pos.le t x).1 dsimp only [FirstScaleGuards.state, previousShear] exact h.trans hbounds.1 · intro t x have h := (F.physical_bounds S.first.spike_one S.first.shear_pos.le t x).2 dsimp only [FirstScaleGuards.state, previousShear, olderShear] simpa only [mul_one] using h.trans hbounds.2 · rw [hlow.1] simp only [sum_range_zero,add_zero,le_refl] · rw [hlow.2.1] simpa only [sum_range_zero,add_zero] using hbounds.1 · rw [hlow.2.2.2] simp only [sum_range_zero,add_zero,le_refl] · change P.G ≤ frameConstant*(1+1) rw [show P.G=1+initialCoefficientCost from hcost.1] have hf := EulerPacketFirstLowBounds.firstRatio_pos have hm := gradient_properties.2.1 have hc := frame_properties.2.1 have h0 := frame_properties.1 linarith only [hf,hm,hc,h0] · exact le_of_eq hcost.2 · change |P.a-1| ≤ 2*∑ i ∈ range 0, renewalCost S.J S.D 4 c frameConstant S.X i rw [show P.a=1 from hparam.1] simp only [sub_self,abs_zero,sum_range_zero,mul_zero,le_refl] · change 1/2 ≤ P.sigma^2*S.X^2 rw [htilt] norm_num · change P.sigma^2*S.X^2 ≤ 2 rw [htilt] norm_num end EulerPacketInductionScales.Scales