Download data/lean/OAI/Analysis/HenonEmden/LayerAssembly.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 10.3 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/HenonEmden/LayerAssembly.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Analysis/HenonEmden/LayerAssembly.lean
-
curl -L -o LayerAssembly.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/HenonEmden/LayerAssembly.lean
10.3 kB
Lean 4 Β· 21
declarations fullstatements
| import OAI.Analysis.HenonEmden.LayerSplit | |
| namespace OAI | |
| universe uZ | |
| section LayerAssembly | |
| open MeasureTheory Set | |
| open scoped ENNReal | |
| namespace HenonLaneEmden.LayerPressure | |
| open LineComponents IntervalGeometry LayerTonelli | |
| variable {Z : Type uZ} [NormedAddCommGroup Z] [MeasurableSpace Z] [BorelSpace Z] [SecondCountableTopology Z] | |
| noncomputable def sourceWeight (f h d : Z Γ β β β) (Ξ΄ : β) (a : (Z Γ β) Γ β) : β := | |
| lineWeight {s | ((a.1.1,a.2),s) β parameterLayer f} (fun s => h (a.1.1,s)) | |
| (fun s => d (a.1.1,s)) Ξ΄ a.1.2 | |
| noncomputable def sourceLower (f : Z Γ β β β) (a : (Z Γ β) Γ β) : Z Γ β := | |
| (a.1.1,lowerEndpoint (parameterLayer f) ((a.1.1,a.2),a.1.2)) | |
| noncomputable def sourceUpper (f : Z Γ β β β) (a : (Z Γ β) Γ β) : Z Γ β := | |
| (a.1.1,upperEndpoint (parameterLayer f) ((a.1.1,a.2),a.1.2)) | |
| omit [SecondCountableTopology Z] in | |
| lemma measurable_sourceWeight {f h d : Z Γ β β β} (hf : IsOpen (parameterLayer f)) | |
| (hh : Continuous h) (hd : Continuous d) (Ξ΄ : β) : Measurable (sourceWeight f h d Ξ΄) := by | |
| let h' : (Z Γ β) Γ β β β := fun z => h (z.1.1,z.2) | |
| let d' : (Z Γ β) Γ β β β := fun z => d (z.1.1,z.2) | |
| have hh' : Continuous h' := hh.comp (continuous_fst.fst.prodMk continuous_snd) | |
| have hd' : Continuous d' := hd.comp (continuous_fst.fst.prodMk continuous_snd) | |
| have he : Measurable (fun p : (Z Γ β) Γ β => | |
| (setWeight (fun s => h' (p.1,s)) (fun s => d' (p.1,s)) Ξ΄ | |
| (connectedComponentIn {s | (p.1,s) β parameterLayer f} p.2)).toReal) := | |
| (measurable_parametric_setWeight hf hh' hd' Ξ΄).ennreal_toReal | |
| have hem := he.comp (tripleSwap : (Z Γ β) Γ β βα΅ (Z Γ β) Γ β).measurable | |
| unfold sourceWeight lineWeight | |
| simpa only [Function.comp_def,tripleSwap_apply,h',d'] using hem | |
| omit [SecondCountableTopology Z] in | |
| lemma measurable_sourceLower {f : Z Γ β β β} (hf : IsOpen (parameterLayer f)) : | |
| Measurable (sourceLower f) := by | |
| exact measurable_fst.fst.prodMk ((measurable_lowerEndpoint hf).comp | |
| (measurable_fst.fst.prodMk measurable_snd |>.prodMk measurable_fst.snd)) | |
| omit [SecondCountableTopology Z] in | |
| lemma measurable_sourceUpper {f : Z Γ β β β} (hf : IsOpen (parameterLayer f)) : | |
| Measurable (sourceUpper f) := by | |
| exact measurable_fst.fst.prodMk ((measurable_upperEndpoint hf).comp | |
| (measurable_fst.fst.prodMk measurable_snd |>.prodMk measurable_fst.snd)) | |
| omit [NormedAddCommGroup Z] [MeasurableSpace Z] [BorelSpace Z] [SecondCountableTopology Z] in | |
| lemma sourceWeight_nonneg (f h d : Z Γ β β β) (Ξ΄ : β) (a : (Z Γ β) Γ β) : | |
| 0 β€ sourceWeight f h d Ξ΄ a := ENNReal.toReal_nonneg | |
| omit [NormedAddCommGroup Z] [MeasurableSpace Z] [BorelSpace Z] [SecondCountableTopology Z] in | |
| lemma sourceWeight_le {f h d : Z Γ β β β} {Ξ΄ : β} {a : (Z Γ β) Γ β} | |
| (ha : a β sourceSubgraph f) (hh : 0 β€ h a.1) : sourceWeight f h d Ξ΄ a β€ h a.1 := | |
| lineWeight_le ha hh | |
| noncomputable def splitKernel (n : β) (C : β) (z : (Z Γ β) Γ (Z Γ β)) : β := | |
| kernel n βz.1.1-z.2.1β C (z.1.2-z.2.2) | |
| noncomputable def splitDirection (z : (Z Γ β) Γ (Z Γ β)) : β := | |
| (z.1.2-z.2.2)^2/(βz.1.1-z.2.1β^2+(z.1.2-z.2.2)^2) | |
| lemma measurable_splitKernel (n : β) (C : β) : Measurable (splitKernel (Z := Z) n C) := by | |
| unfold splitKernel kernel | |
| fun_prop | |
| lemma measurable_splitDirection : Measurable (splitDirection (Z := Z)) := by | |
| unfold splitDirection | |
| fun_prop | |
| noncomputable def pairLeft (n : β) (C : β) (f g h d : Z Γ β β β) (Ξ΄ : β) | |
| (z : ((Z Γ β) Γ β) Γ ((Z Γ β) Γ β)) : β := | |
| (sourceWeight f h d Ξ΄ z.1+sourceWeight g h d Ξ΄ z.2)*splitKernel n C (z.1.1,z.2.1) | |
| noncomputable def pairRight (n : β) (C : β) (f g h d : Z Γ β β β) (Ξ΄ : β) | |
| (z : ((Z Γ β) Γ β) Γ ((Z Γ β) Γ β)) : β := | |
| sourceWeight f h d Ξ΄ z.1 * | |
| ((splitKernel n C (sourceLower f z.1,z.2.1)+splitKernel n C (sourceUpper f z.1,z.2.1))/2) + | |
| sourceWeight g h d Ξ΄ z.2 * | |
| ((splitKernel n C (z.1.1,sourceLower g z.2)+splitKernel n C (z.1.1,sourceUpper g z.2))/2) + | |
| (((n:β)-2)*h z.1.1*splitDirection (z.1.1,z.2.1)+ | |
| |sourceWeight f h d Ξ΄ z.1-sourceWeight g h d Ξ΄ z.2|)*splitKernel n C (z.1.1,z.2.1) | |
| lemma measurable_pairLeft (n : β) (C : β) {f g h d : Z Γ β β β} | |
| (hf : IsOpen (parameterLayer f)) (hg : IsOpen (parameterLayer g)) | |
| (hh : Continuous h) (hd : Continuous d) (Ξ΄ : β) : Measurable (pairLeft n C f g h d Ξ΄) := by | |
| unfold pairLeft | |
| have hΟf := measurable_sourceWeight hf hh hd Ξ΄ | |
| have hΟg := measurable_sourceWeight hg hh hd Ξ΄ | |
| have hk := measurable_splitKernel (Z := Z) n C | |
| fun_prop | |
| lemma measurable_pairRight (n : β) (C : β) {f g h d : Z Γ β β β} | |
| (hf : IsOpen (parameterLayer f)) (hg : IsOpen (parameterLayer g)) | |
| (hh : Continuous h) (hd : Continuous d) (Ξ΄ : β) : Measurable (pairRight n C f g h d Ξ΄) := by | |
| unfold pairRight | |
| have hΟf := measurable_sourceWeight hf hh hd Ξ΄ | |
| have hΟg := measurable_sourceWeight hg hh hd Ξ΄ | |
| have hlof := measurable_sourceLower hf | |
| have hlog := measurable_sourceLower hg | |
| have hhif := measurable_sourceUpper hf | |
| have hhig := measurable_sourceUpper hg | |
| have hk := measurable_splitKernel (Z := Z) n C | |
| have hD := measurable_splitDirection (Z := Z) | |
| fun_prop | |
| omit [MeasurableSpace Z] [BorelSpace Z] [SecondCountableTopology Z] in | |
| lemma weighted_leftAverage_eq {f h d : Z Γ β β β} (hf : IsOpen (parameterLayer f)) | |
| (Ξ΄ : β) {p : Z Γ β} {s : β} (hs : (p,s) β parameterLayer f) | |
| (k : β β β) (y : β) : | |
| lineWeight {s | (p,s) β parameterLayer f} (fun s => h (p.1,s)) (fun s => d (p.1,s)) Ξ΄ s * | |
| leftAverage {s | (p,s) β parameterLayer f} k s y = | |
| lineWeight {s | (p,s) β parameterLayer f} (fun s => h (p.1,s)) (fun s => d (p.1,s)) Ξ΄ s * | |
| ((k (lowerEndpoint (parameterLayer f) (p,s)-y)+k (upperEndpoint (parameterLayer f) (p,s)-y))/2) := by | |
| by_cases hz : lineWeight {s | (p,s) β parameterLayer f} (fun s => h (p.1,s)) | |
| (fun s => d (p.1,s)) Ξ΄ s = 0 | |
| Β· rw [hz,zero_mul,zero_mul] | |
| Β· have he := relative_endpoints_eq_of_weight_pos hf hs | |
| (lt_of_le_of_ne (lineWeight_nonneg _ _ _ _ _) (Ne.symm hz)) | |
| simp only [leftAverage,he.1,he.2] | |
| omit [MeasurableSpace Z] [BorelSpace Z] [SecondCountableTopology Z] in | |
| lemma weighted_rightAverage_eq {g h d : Z Γ β β β} (hg : IsOpen (parameterLayer g)) | |
| (Ξ΄ : β) {p : Z Γ β} {s : β} (hs : (p,s) β parameterLayer g) | |
| (k : β β β) (x : β) : | |
| lineWeight {s | (p,s) β parameterLayer g} (fun s => h (p.1,s)) (fun s => d (p.1,s)) Ξ΄ s * | |
| rightAverage {s | (p,s) β parameterLayer g} k x s = | |
| lineWeight {s | (p,s) β parameterLayer g} (fun s => h (p.1,s)) (fun s => d (p.1,s)) Ξ΄ s * | |
| ((k (x-lowerEndpoint (parameterLayer g) (p,s))+k (x-upperEndpoint (parameterLayer g) (p,s)))/2) := by | |
| by_cases hz : lineWeight {s | (p,s) β parameterLayer g} (fun s => h (p.1,s)) | |
| (fun s => d (p.1,s)) Ξ΄ s = 0 | |
| Β· rw [hz,zero_mul,zero_mul] | |
| Β· have he := relative_endpoints_eq_of_weight_pos hg hs | |
| (lt_of_le_of_ne (lineWeight_nonneg _ _ _ _ _) (Ne.symm hz)) | |
| simp only [rightAverage,he.1,he.2] | |
| omit [MeasurableSpace Z] [BorelSpace Z] [SecondCountableTopology Z] in | |
| lemma pair_line_comparison (n : β) (hn : 3 β€ n) {C : β} (hC : 0 β€ C) | |
| {f g h d : Z Γ β β β} (hf : IsOpen (parameterLayer f)) (hg : IsOpen (parameterLayer g)) | |
| (hhn : β x, 0 β€ h x) (Ξ΄ : β) (p : (Z Γ β) Γ (Z Γ β)) (hp : p.1.1 β p.2.1) : | |
| (β«β» s : β Γ β in {s | (p.1,s) β parameterLayer f} ΓΛ’ {s | (p.2,s) β parameterLayer g}, | |
| ENNReal.ofReal (pairLeft n C f g h d Ξ΄ (((p.1.1,s.1),p.1.2),((p.2.1,s.2),p.2.2)))) β€ | |
| β«β» s : β Γ β in {s | (p.1,s) β parameterLayer f} ΓΛ’ {s | (p.2,s) β parameterLayer g}, | |
| ENNReal.ofReal (pairRight n C f g h d Ξ΄ (((p.1.1,s.1),p.1.2),((p.2.1,s.2),p.2.2))) := by | |
| have hfo := isOpen_section hf p.1 | |
| have hgo := isOpen_section hg p.2 | |
| have hl : 0 < βp.1.1-p.2.1β := norm_pos_iff.mpr (sub_ne_zero.mpr hp) | |
| have hh := weighted_source_layer_comparison n hn hfo hgo | |
| (fun s => h (p.1.1,s)) (fun s => h (p.2.1,s)) | |
| (fun s => d (p.1.1,s)) (fun s => d (p.2.1,s)) Ξ΄ hl hC (fun x _ => hhn _) | |
| change (β«β» s in _, ENNReal.ofReal _) β€ _ at hh | |
| convert hh using 1 | |
| Β· rfl | |
| Β· apply setLIntegral_congr_fun (hfo.measurableSet.prod hgo.measurableSet) | |
| intro s hs | |
| unfold pairRight splitKernel splitDirection sourceLower sourceUpper sourceWeight | |
| dsimp only | |
| rw [weighted_leftAverage_eq hf Ξ΄ hs.1,weighted_rightAverage_eq hg Ξ΄ hs.2] | |
| lemma ae_distinct_transverse (ΞΌ : Measure Z) [SFinite ΞΌ] [NullSingletonClass ΞΌ] : | |
| βα΅ p : (Z Γ β) Γ (Z Γ β) β(ΞΌ.prod volume).prod (ΞΌ.prod volume), p.1.1 β p.2.1 := by | |
| apply (Measure.ae_prod_iff_ae_ae (by measurability)).mpr | |
| apply ae_of_all | |
| intro x | |
| apply (Measure.ae_prod_iff_ae_ae (by measurability)).mpr | |
| filter_upwards [ΞΌ.ae_ne x.1] with z hz | |
| exact ae_of_all _ (fun _ => Ne.symm hz) | |
| /-- The globally integrated nonnegative interval comparison. No source, | |
| endpoint, or energy integrability is assumed; all terms are still extended values. -/ | |
| lemma global_nonnegative_pressure (ΞΌ : Measure Z) [SFinite ΞΌ] [NullSingletonClass ΞΌ] | |
| (n : β) (hn : 3 β€ n) {C : β} (hC : 0 β€ C) | |
| {f g h d : Z Γ β β β} (hf : Measurable f) (hg : Measurable g) | |
| (hfo : IsOpen (parameterLayer f)) (hgo : IsOpen (parameterLayer g)) | |
| (hh : Continuous h) (hd : Continuous d) (hhn : β x, 0 β€ h x) (Ξ΄ : β) : | |
| (β«β» z, ENNReal.ofReal (pairLeft n C f g h d Ξ΄ z) | |
| β(layerMeasure (ΞΌ.prod volume) f).prod (layerMeasure (ΞΌ.prod volume) g)) β€ | |
| β«β» z, ENNReal.ofReal (pairRight n C f g h d Ξ΄ z) | |
| β(layerMeasure (ΞΌ.prod volume) f).prod (layerMeasure (ΞΌ.prod volume) g) := by | |
| rw [lintegral_pair_layer_split ΞΌ hf hg (measurable_pairLeft n C hfo hgo hh hd Ξ΄).ennreal_ofReal, | |
| lintegral_pair_layer_split ΞΌ hf hg (measurable_pairRight n C hfo hgo hh hd Ξ΄).ennreal_ofReal] | |
| apply lintegral_mono_ae | |
| filter_upwards [ae_distinct_transverse ΞΌ] with p hp | |
| exact pair_line_comparison n hn hC hfo hgo hhn Ξ΄ p hp | |
| end HenonLaneEmden.LayerPressure | |
| end LayerAssembly | |
| end OAI | |
Outline
- def
sourceWeight17 - def
sourceLower21 - def
sourceUpper23 - lemma
measurable_sourceWeight27 - lemma
measurable_sourceLower42 - lemma
measurable_sourceUpper47 - lemma
sourceWeight_nonneg53 - lemma
sourceWeight_le57 - def
splitKernel61 - def
splitDirection63 - lemma
measurable_splitKernel66 - lemma
measurable_splitDirection69 - def
pairLeft73 - def
pairRight77 - lemma
measurable_pairLeft86 - lemma
measurable_pairRight95 - lemma
weighted_leftAverage_eq110 - lemma
weighted_rightAverage_eq125 - lemma
pair_line_comparison140 - lemma
ae_distinct_transverse162 - lemma
global_nonnegative_pressure173