Download data/lean/OAI/Analysis/DiamondDistortion/FullDual.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 8.53 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/DiamondDistortion/FullDual.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Analysis/DiamondDistortion/FullDual.lean
-
curl -L -o FullDual.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/DiamondDistortion/FullDual.lean
8.53 kB
| import OAI.Analysis.DiamondDistortion.LpDual | |
| namespace OAI | |
| universe u v | |
| noncomputable section | |
| open scoped BigOperators Classical Topology | |
| open Set | |
| namespace DiamondDistortion | |
| open scoped ENNReal | |
| open scoped Classical | |
| open Filter Topology | |
| namespace RecursiveModel | |
| lemma exponent_real_gt_one (h : β) : 1 < (exponent h).toReal := by | |
| unfold exponent | |
| rw [ENNReal.toReal_add ENNReal.one_ne_top (by simp),ENNReal.toReal_one,ENNReal.toReal_inv] | |
| rw [ENNReal.toReal_add (by simp) ENNReal.one_ne_top] | |
| simp only [ENNReal.toReal_natCast,ENNReal.toReal_one] | |
| have hpos : 0 < (h:β)+1 := by positivity | |
| linarith [inv_pos.mpr hpos] | |
| instance vectorComponentDualSeparable (h : β) : | |
| TopologicalSpace.SeparableSpace (StrongDual β (VectorComponent h)) := by | |
| let : TopologicalSpace.SeparableSpace (StrongDual β (Full (exponent h) (h+1))) := | |
| LpDual.dual_separable (fun _ : Coord (h+1) => β) (exponent h) (exponent_real_gt_one h) | |
| let e := (fullData (exponent h) (exponent_real_pos h) (h+1)).equiv.symm.arrowCongr | |
| (ContinuousLinearEquiv.refl β β) | |
| exact e.surjective.denseRange.separableSpace e.continuous | |
| instance fullVectorDualSeparable : TopologicalSpace.SeparableSpace (StrongDual β FullVectorSpace) := | |
| LpDual.dual_separable VectorComponent 2 (by norm_num) | |
| instance vectorDualSeparable : TopologicalSpace.SeparableSpace (StrongDual β VectorSpace) := by | |
| let e := fullVectorEquiv.symm.toContinuousLinearEquiv.arrowCongr (ContinuousLinearEquiv.refl β β) | |
| exact e.surjective.denseRange.separableSpace e.continuous | |
| end RecursiveModel | |
| namespace CoordinateCompletion.Data | |
| variable {ΞΉ ΞΊ E : Type*} (A : CoordinateCompletion.Data ΞΉ) | |
| [NormedAddCommGroup E] [NormedSpace β E] | |
| lemma coordinate_of_equiv (e : A.Space ββα΅’[β] E) (i : ΞΉ) (c : E βL[β] β) | |
| (hj : β v,c (e (A.embedding v))=v i) (x : A.Space) : c (e x)=A.coordinate i x := by | |
| induction x using UniformSpace.Completion.induction_on with | |
| | hp => exact isClosed_eq (c.continuous.comp e.continuous) (A.coordinate i).continuous | |
| | ih v => | |
| rw [A.coordinate_coe] | |
| change c (e (A.embedding (A.array v))) = _ | |
| exact hj (A.array v) | |
| lemma transported_projection_coordinate (e : A.Space ββα΅’[β] E) (i : ΞΉ) (c : E βL[β] β) | |
| (hj : β v,c (e (A.embedding v))=v i) | |
| (H : ΞΊ β Finset ΞΉ) (hcover : β S : Finset ΞΉ,β h,S β H h) (h : ΞΊ) (x : E) : | |
| c (((A.heads H hcover).transport e).projection h x)=if i β H h then c x else 0 := by | |
| change c (e (A.projection (H h) (e.symm x)))=_ | |
| rw [A.coordinate_of_equiv e i c hj,A.coordinate_projection, | |
| β A.coordinate_of_equiv e i c hj,e.apply_symm_apply] | |
| end CoordinateCompletion.Data | |
| namespace EquivalentNorm.Data | |
| variable {ΞΉ : Type*} {p : ββ₯0β} [Fact (1 β€ p)] | |
| (A : EquivalentNorm.Data (lp (fun _ : ΞΉ => β) p)) | |
| def coordinate (i : ΞΉ) : A.Space βL[β] β := | |
| (lp.evalCLM β (fun _ : ΞΉ => β) p i).comp A.equiv.toContinuousLinearMap | |
| lemma coordinate_apply (i : ΞΉ) (x : A.Space) : A.coordinate i x=A.val x i := rfl | |
| lemma coordinate_embedding (i : ΞΉ) (v : ΞΉ ββ β) : A.coordinate i (A.coordinateEmbedding v)=v i := rfl | |
| end EquivalentNorm.Data | |
| namespace RecursiveModel | |
| variable {E : β β Type*} [β h,NormedAddCommGroup (E h)] [β h,NormedSpace β (E h)] | |
| def outerCoordinate (c : β h,Coord (h+1) β E h βL[β] β) (i : ForestCoord) : lp E 2 βL[β] β := | |
| (c i.1 i.2).comp (lp.evalCLM β E 2 i.1) | |
| lemma outerCoordinate_apply (c : β h,Coord (h+1) β E h βL[β] β) (i : ForestCoord) (x : lp E 2) : | |
| outerCoordinate c i x=c i.1 i.2 (x i.1) := rfl | |
| lemma outerCoordinate_embedding (c : β h,Coord (h+1) β E h βL[β] β) | |
| (j : β h,Vec (h+1) ββ[β] E h) (hc : β h i v,c h i (j h v)=v i) (i : ForestCoord) (v : ForestVec) : | |
| outerCoordinate c i (outerEmbedding j v)=v i := by | |
| rw [outerCoordinate_apply,outerEmbedding_apply,hc,components_apply] | |
| end RecursiveModel | |
| namespace PathModel | |
| open RecursiveModel | |
| def linearFullCoordinate : ForestCoord β FullLinearSpace βL[β] β := | |
| outerCoordinate (fun h => (linearFullData (h+1)).coordinate) | |
| def quadraticFullCoordinate : ForestCoord β FullQuadraticSpace βL[β] β := | |
| outerCoordinate (fun h => (quadraticFullData (h+1)).coordinate) | |
| lemma linearFullCoordinate_equiv (i : ForestCoord) (x : LinearSpace) : | |
| linearFullCoordinate i (linearFullEquiv x)=linearData.coordinate i x := | |
| linearData.coordinate_of_equiv linearFullEquiv i (linearFullCoordinate i) (fun v => by | |
| rw [linearFullEquiv_embedding] | |
| rfl) x | |
| lemma quadraticFullCoordinate_equiv (i : ForestCoord) (x : QuadraticSpace) : | |
| quadraticFullCoordinate i (quadraticFullEquiv x)=quadraticData.coordinate i x := | |
| quadraticData.coordinate_of_equiv quadraticFullEquiv i (quadraticFullCoordinate i) (fun v => by | |
| rw [quadraticFullEquiv_embedding] | |
| rfl) x | |
| lemma linearFullHeads_coordinate (H : ForestHead) (x : FullLinearSpace) (i : ForestCoord) : | |
| linearFullCoordinate i (linearFullHeads.projection H x)=if i β H.val then linearFullCoordinate i x else 0 := by | |
| classical | |
| convert | |
| linearData.transported_projection_coordinate linearFullEquiv i (linearFullCoordinate i) | |
| (fun v => by rw [linearFullEquiv_embedding]; rfl) Subtype.val | |
| (fun S => β¨forestHead S,forestHead_contains Sβ©) H x using 1 | |
| all_goals congr | |
| lemma quadraticFullHeads_coordinate (H : ForestHead) (x : FullQuadraticSpace) (i : ForestCoord) : | |
| quadraticFullCoordinate i (quadraticFullHeads.projection H x)=if i β H.val then quadraticFullCoordinate i x else 0 := by | |
| classical | |
| convert | |
| quadraticData.transported_projection_coordinate quadraticFullEquiv i (quadraticFullCoordinate i) | |
| (fun v => by rw [quadraticFullEquiv_embedding]; rfl) Subtype.val | |
| (fun S => β¨forestHead S,forestHead_contains Sβ©) H x using 1 | |
| all_goals congr | |
| end PathModel | |
| namespace RecursiveModel | |
| def fullVectorCoordinate : ForestCoord β FullVectorSpace βL[β] β := | |
| outerCoordinate (fun h => (fullData (exponent h) (exponent_real_pos h) (h+1)).coordinate) | |
| lemma fullVectorCoordinate_equiv (i : ForestCoord) (x : VectorSpace) : | |
| fullVectorCoordinate i (fullVectorEquiv x)=vectorData.coordinate i x := | |
| vectorData.coordinate_of_equiv fullVectorEquiv i (fullVectorCoordinate i) (fun v => by | |
| rw [fullVectorEquiv_embedding] | |
| rfl) x | |
| lemma fullVectorHeads_coordinate (H : ForestHead) (x : FullVectorSpace) (i : ForestCoord) : | |
| fullVectorCoordinate i (fullVectorHeads.projection H x)=if i β H.val then fullVectorCoordinate i x else 0 := by | |
| classical | |
| convert | |
| vectorData.transported_projection_coordinate fullVectorEquiv i (fullVectorCoordinate i) | |
| (fun v => by rw [fullVectorEquiv_embedding]; rfl) Subtype.val | |
| (fun S => β¨forestHead S,forestHead_contains Sβ©) H x using 1 | |
| all_goals congr | |
| end RecursiveModel | |
| namespace StartModel | |
| open RecursiveModel | |
| def componentCoordinate (h : β) (r : Coord h) : FullComponent h βL[β] β := | |
| (LinearMap.ker (output h)).liftQL (outputCoordinate h r) (by | |
| intro d hd | |
| change output h d r=0 | |
| exact congrFun hd r) | |
| lemma componentCoordinate_rep (h : β) (r : Coord h) (d : Rep h) : | |
| componentCoordinate h r ((LinearMap.ker (output h)).mkQ d)=output h d r := rfl | |
| lemma componentCoordinate_embedding (h : β) (r : Coord h) (v : Vec h) : | |
| componentCoordinate h r (componentEmbedding h v)=v r := by | |
| change output h (finiteSection h v) r=v r | |
| exact congrFun ((relation h).section_output v) r | |
| def fullCoordinate : ForestCoord β FullSpace βL[β] β := | |
| outerCoordinate (fun h => componentCoordinate (h+1)) | |
| lemma fullCoordinate_embedding (i : ForestCoord) (v : ForestVec) : fullCoordinate i (fullEmbedding v)=v i := | |
| outerCoordinate_embedding _ _ (fun h i v => componentCoordinate_embedding (h+1) i v) i v | |
| lemma fullCoordinate_equiv (i : ForestCoord) (x : Space) : | |
| fullCoordinate i (fullEquiv x)=data.coordinate i x := | |
| data.coordinate_of_equiv fullEquiv i (fullCoordinate i) (fun v => by | |
| rw [fullEquiv_embedding,fullCoordinate_embedding]) x | |
| lemma fullHeads_coordinate (H : ForestHead) (x : FullSpace) (i : ForestCoord) : | |
| fullCoordinate i (fullHeads.projection H x)=if i β H.val then fullCoordinate i x else 0 := by | |
| classical | |
| convert | |
| data.transported_projection_coordinate fullEquiv i (fullCoordinate i) | |
| (fun v => by rw [fullEquiv_embedding,fullCoordinate_embedding]) Subtype.val | |
| (fun S => β¨forestHead S,forestHead_contains Sβ©) H x using 1 | |
| all_goals congr | |
| end StartModel | |
| end DiamondDistortion | |
| end | |
| end OAI | |