import Mathlib import OAI.Analysis.Conductivity.Branching.ParentFullEndEnergy import OAI.Analysis.Conductivity.Walls.ChildSeamCutoff namespace OAI noncomputable section namespace ScalarConductivity open Set MeasureTheory Filter Topology theorem centralChild_complement_partition (k : Fin 2) : ∃ (l : ℝ) (η : (Fin 3 → ℝ) → ℝ),-centralThickness centralJoinChildCutoff k z+η z)=ᶠ[𝓝 y] (fun _ => 1)) := by let χ : (Fin 3 → ℝ) → ℝ := centralJoinChildCutoff k let q := fun y => 1-χ y let K := sourceClosedCollarBand (-centralThickness) 0 ∩ tsupport q have hK : IsCompact K := (isCompact_sourceClosedCollarBand (show -(1:ℝ)/100≤-centralThickness by norm_num [centralThickness]) (show (0:ℝ)≤1/100 by norm_num)).inter_right (isClosed_tsupport q) have hKt (y) (hy : y∈K) : -centralThickness ⟨hz.1.le,hz.2.le⟩) obtain ⟨ψ,hψ1,hψ0,hψb⟩ := exists_contMDiffMap_one_nhds_of_subset_interior (modelWithCornersSelf ℝ (Fin 3 → ℝ)) hK.isClosed hi (n:=↑(⊤:ℕ∞)) have hψc : HasCompactSupport ψ := HasCompactSupport.intro hbig hψ0 have hψs : tsupport ψ⊆sourceClosedCollarBand l (centralThickness/2) := by apply closure_minimal _ hbig.isClosed intro y hy by_contra hn exact hy (hψ0 y hn) let η := fun y => q y*ψ y have hηs : tsupport η⊆sourceClosedCollarBand l (centralThickness/2) := tsupport_mul_subset_right.trans hψs refine ⟨l,η,hl,hl₀,(contDiff_const.sub (centralJoinChildCutoff_smooth k)).mul ψ.contMDiff.contDiff, hψc.mul_left,?_,hηs,?_,?_⟩ · intro y have h₀ := centralJoinPartition.nonneg (centralChildPatch k) (sourceChildCoordinates (actualChildSign k) y) have h₁ := centralJoinPartition.le_one (centralChildPatch k) (sourceChildCoordinates (actualChildSign k) y) change 0≤χ y at h₀ change χ y≤1 at h₁ have h₂ := (hψb y).1 have h₃ := (hψb y).2 dsimp only [η,q] rw [abs_of_nonneg (mul_nonneg (sub_nonneg.mpr h₁) h₂)] nlinarith [mul_nonneg h₀ h₂] · intro y hy apply notMem_tsupport_iff_eventuallyEq.mp intro hn have hle := (hηs hn).1 linarith · intro y hy by_cases hk : y∈K · have hψ := hψ1.filter_mono (nhds_le_nhdsSet hk) filter_upwards [hψ] with z hz change centralJoinChildCutoff k z+((1-centralJoinChildCutoff k z)*ψ z)=1 rw [hz] ring · have hq : y∉tsupport q := fun hn => hk ⟨hy,hn⟩ filter_upwards [notMem_tsupport_iff_eventuallyEq.mp hq] with z hz change q z=0 at hz change χ z+q z*ψ z=1 rw [hz,zero_mul,add_zero] dsimp only [q] at hz linarith end ScalarConductivity namespace ScalarConductivity open Set MeasureTheory Filter Topology theorem childAttachedCorrection_exists (s : Fin 3 → ℝ) (hs : ∀ u v : ℝ,(1/2)*(u^2+v^2) ≤ s 0*u^2+2*s 1*u*v+s 2*v^2) {a : ℝ} (ha : 0 mul_pos ha (sub_pos.mpr (hl.trans_le ht.1)) obtain ⟨z,hz,hze⟩ := cut_fullAttachedEnd_H10 s hs (centralT s k.succ p) κ ha.ne' hR (show -centralThickness∈Icc (-(1:ℝ)/100) (1/100) by norm_num [centralThickness]) (show l≤centralThickness/2 by have ht : (0:ℝ)