Download data/lean/OAI/Geometry/KahlerSplitting/CommutingFlows.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 15.6 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/KahlerSplitting/CommutingFlows.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Geometry/KahlerSplitting/CommutingFlows.lean
-
curl -L -o CommutingFlows.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/KahlerSplitting/CommutingFlows.lean
15.6 kB
| import OAI.Geometry.KahlerSplitting.FlowVariation | |
| namespace OAI | |
| noncomputable section | |
| open scoped Manifold ContDiff | |
| open Set Topology Filter Metric | |
| open Set MeasureTheory Metric Filter Topology | |
| open scoped ENNReal | |
| open Set Metric | |
| open scoped ENNReal NNReal | |
| open scoped Manifold ENNReal NNReal | |
| open Complex | |
| open Set Filter Topology | |
| open Set Metric Filter Topology Complex | |
| open Set Metric Filter Topology MeasureTheory Complex | |
| open scoped Manifold ENNReal | |
| open Set | |
| open scoped Manifold | |
| open Set Metric Filter Topology Asymptotics | |
| open Set MeasureTheory | |
| open Set Metric Filter Topology MeasureTheory | |
| open scoped Interval | |
| open Set Metric Filter Topology | |
| open scoped ContDiff | |
| namespace UniversalCoverSplitting | |
| variable {E : Type*} [NormedAddCommGroup E] [NormedSpace β E] | |
| [NormedSpace β E] [IsScalarTower β β E] [CompleteSpace E] | |
| abbrev FlowTimes (n : β) := Fin n β β | |
| def trimFlowTimes (n : β) : FlowTimes (n+1) βL[β] FlowTimes n := | |
| ContinuousLinearMap.pi (fun i β¦ ContinuousLinearMap.proj i.castSucc) | |
| @[simp] theorem trimFlowTimes_apply (n : β) (t : FlowTimes (n+1)) (i : Fin n) : | |
| trimFlowTimes n t i = t i.castSucc := rfl | |
| @[simp] theorem trimFlowTimes_single_castSucc (n : β) (i : Fin n) : | |
| trimFlowTimes n (Pi.single i.castSucc (1 : β)) = Pi.single i 1 := by | |
| ext j | |
| simp [Pi.single_apply] | |
| @[simp] theorem trimFlowTimes_single_last (n : β) : | |
| trimFlowTimes n (Pi.single (Fin.last n) (1 : β)) = 0 := by | |
| ext j | |
| simp | |
| structure CommutingFlowData (n : β) (V : Fin n β C(E,E)) | |
| (D : Fin n β C(E,E βL[β] E)) (U : Set E) (p : E) where | |
| domain : Set (E Γ FlowTimes n) | |
| isOpen_domain : IsOpen domain | |
| base_mem : (p,0) β domain | |
| map : E Γ FlowTimes n β E | |
| contDiff : ContDiffOn β 1 map domain | |
| mapsTo : MapsTo map domain U | |
| zero : β x, (x,0) β domain β map (x,0) = x | |
| time : β q β domain, β i : Fin n, | |
| fderiv β map q (0,Pi.single i 1) = V i (map q) | |
| preserves : β (A : C(E,E)) (DA : E β E βL[β] E), | |
| (β x β U, HasFDerivAt A (DA x) x) β | |
| (β i x, x β U β DA x (V i x) = D i x (A x)) β | |
| β q β domain, fderiv β map q (A q.1,0) = A (map q) | |
| theorem exists_commutingFlowData (n : β) (V : Fin n β C(E,E)) | |
| (D : Fin n β C(E,E βL[β] E)) {U : Set E} (hU : IsOpen U) | |
| (hV : β i x, x β U β HasFDerivAt (V i) (D i x) x) | |
| (hcomm : β i j x, x β U β D j x (V i x) = D i x (V j x)) | |
| {p : E} (hp : p β U) : Nonempty (CommutingFlowData n V D U p) := by | |
| induction n with | |
| | zero => | |
| refine β¨β¨U ΓΛ’ univ,hU.prod isOpen_univ,β¨hp,mem_univ _β©,Prod.fst, | |
| contDiff_fst.contDiffOn,fun q hq β¦ hq.1,fun _ _ β¦ rfl,?_,?_β©β© | |
| Β· intro q hq i | |
| exact Fin.elim0 i | |
| Β· intro A DA hA hcomm q hq | |
| simp [fderiv_fst] | |
| | succ n ih => | |
| obtain β¨Gβ© := ih (fun i β¦ V i.castSucc) (fun i β¦ D i.castSucc) | |
| (fun i β¦ hV i.castSucc) (fun i j β¦ hcomm i.castSucc j.castSucc) | |
| obtain β¨Hβ© := exists_holomorphicFlowData (V (Fin.last n)) (D (Fin.last n)) | |
| hU (hV (Fin.last n)) hp | |
| let pr : E Γ FlowTimes (n+1) βL[β] E Γ FlowTimes n := | |
| (ContinuousLinearMap.fst β E (FlowTimes (n+1))).prod | |
| ((trimFlowTimes n).comp (ContinuousLinearMap.snd β E (FlowTimes (n+1)))) | |
| let last : E Γ FlowTimes (n+1) βL[β] β := | |
| (ContinuousLinearMap.proj (Fin.last n)).comp | |
| (ContinuousLinearMap.snd β E (FlowTimes (n+1))) | |
| let c : E Γ FlowTimes (n+1) β E Γ β := fun q β¦ (G.map (pr q),last q) | |
| let O := pr β»ΒΉ' G.domain β© c β»ΒΉ' H.domain | |
| let F : E Γ FlowTimes (n+1) β E := H.map β c | |
| have hpr : IsOpen (pr β»ΒΉ' G.domain) := G.isOpen_domain.preimage pr.continuous | |
| have hc : ContDiffOn β 1 c (pr β»ΒΉ' G.domain) := | |
| (G.contDiff.comp pr.contDiff.contDiffOn (fun _ hq β¦ hq)).prodMk last.contDiff.contDiffOn | |
| have hO : IsOpen O := hc.continuousOn.isOpen_inter_preimage hpr H.isOpen_domain | |
| have hbase : (p,0) β O := by | |
| have hG0 := G.zero p G.base_mem | |
| constructor | |
| Β· simpa [pr] using G.base_mem | |
| Β· simpa [c,pr,last,hG0] using H.base_mem | |
| have hF : ContDiffOn β 1 F O := H.contDiff.comp (hc.mono inter_subset_left) | |
| (fun q hq β¦ hq.2) | |
| have hFd (q : E Γ FlowTimes (n+1)) (hq : q β O) : | |
| fderiv β F q = (fderiv β H.map (c q)).comp | |
| (((fderiv β G.map (pr q)).comp pr).prod last) := by | |
| have hGq := (G.contDiff.contDiffAt (G.isOpen_domain.mem_nhds hq.1)).differentiableAt (by norm_num) | |
| have hHq := (H.contDiff.contDiffAt (H.isOpen_domain.mem_nhds hq.2)).differentiableAt (by norm_num) | |
| exact (hHq.hasFDerivAt.comp q ((hGq.hasFDerivAt.comp q pr.hasFDerivAt).prodMk | |
| last.hasFDerivAt)).fderiv | |
| refine β¨β¨O,hO,hbase,F,hF,fun q hq β¦ H.mapsTo hq.2,?_,?_,?_β©β© | |
| Β· intro x hx | |
| have hGx : G.map (x,0) = x := G.zero x (by simpa [pr] using hx.1) | |
| have hHx : (x,0) β H.domain := by simpa [c,pr,last,hGx] using hx.2 | |
| simpa [F,c,pr,last,hGx] using H.zero x hHx | |
| Β· intro q hq i | |
| refine Fin.lastCases ?_ (fun j β¦ ?_) i | |
| Β· rw [hFd q hq] | |
| change (fderiv β H.map (c q)) | |
| ((fderiv β G.map (pr q)) (pr (0,Pi.single (Fin.last n) 1)), | |
| last (0,Pi.single (Fin.last n) 1)) = _ | |
| have hpr0 : pr (0,Pi.single (Fin.last n) 1) = 0 := by simp [pr] | |
| have hl1 : last (0,Pi.single (Fin.last n) 1) = 1 := by simp [last] | |
| rw [hpr0,map_zero,hl1] | |
| exact H.time (c q) hq.2 | |
| Β· rw [hFd q hq] | |
| have hGi := G.time (pr q) hq.1 j | |
| have hHi := H.preserves (V j.castSucc) (D j.castSucc) | |
| (hV j.castSucc) (fun x hx β¦ hcomm (Fin.last n) j.castSucc x hx) (c q) hq.2 | |
| change (fderiv β H.map (c q)) | |
| ((fderiv β G.map (pr q)) (pr (0,Pi.single j.castSucc 1)), | |
| last (0,Pi.single j.castSucc 1)) = _ | |
| have hprj : pr (0,Pi.single j.castSucc 1) = (0,Pi.single j 1) := by simp [pr] | |
| have hlj : last (0,Pi.single j.castSucc 1) = 0 := by simp [last] | |
| rw [hprj,hlj,hGi] | |
| exact hHi | |
| Β· intro A DA hA hAC q hq | |
| rw [hFd q hq] | |
| have hGA := G.preserves A DA hA (fun i β¦ hAC i.castSucc) (pr q) hq.1 | |
| have hHA := H.preserves A DA hA (hAC (Fin.last n)) (c q) hq.2 | |
| change (fderiv β H.map (c q)) | |
| ((fderiv β G.map (pr q)) (pr (A q.1,0)),last (A q.1,0)) = _ | |
| have hprA : pr (A q.1,0) = (A (pr q).1,0) := by simp [pr] | |
| have hlA : last (A q.1,0) = 0 := by simp [last] | |
| rw [hprA,hlA,hGA] | |
| exact hHA | |
| end UniversalCoverSplitting | |
| open Set Filter Topology Metric Complex | |
| open scoped ContDiff | |
| namespace UniversalCoverSplitting | |
| variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace β E] | |
| [NormedAddCommGroup F] [NormedSpace β F] | |
| theorem continuousOn_directional_cauchy {U S : Set E} {f : E β F} | |
| (hf : ContinuousOn f U) (e : E) {r : β} (hr : 0 < r) | |
| (hmap : β z β S, β ΞΈ : β, z + circleMap 0 r ΞΈ β’ e β U) : | |
| ContinuousOn (fun z β¦ cderiv r (fun w : β β¦ f (z + w β’ e)) 0) S := by | |
| rw [continuousOn_iff_continuous_domRestrict] | |
| let G : S β β β F := fun z ΞΈ β¦ | |
| (circleMap 0 r ΞΈ * I) β’ (((circleMap 0 r ΞΈ)^2)β»ΒΉ β’ | |
| f (z.val + circleMap 0 r ΞΈ β’ e)) | |
| have hG : Continuous G.uncurry := by | |
| have hc : Continuous (fun p : S Γ β β¦ p.1.val + circleMap 0 r p.2 β’ e) := by | |
| fun_prop | |
| have hm : MapsTo (fun p : S Γ β β¦ p.1.val + circleMap 0 r p.2 β’ e) univ U := | |
| fun p _ β¦ hmap p.1.val p.1.property p.2 | |
| have hcomp := continuousOn_univ.mp (hf.comp hc.continuousOn hm) | |
| have hne (p : S Γ β) : circleMap 0 r p.2 β 0 := | |
| circleMap_ne_mem_ball (mem_ball_self hr) p.2 | |
| dsimp [G, Function.uncurry] | |
| apply Continuous.smul | |
| Β· fun_prop | |
| Β· exact (((continuous_circleMap 0 r).comp continuous_snd).pow 2).invβ | |
| (fun p β¦ pow_ne_zero 2 (hne p)) |>.smul hcomp | |
| have hi := intervalIntegral.continuous_parametric_intervalIntegral_of_continuous' | |
| (ΞΌ := MeasureTheory.volume) hG (aβ := 0) (bβ := 2 * Real.pi) | |
| convert! hi.const_smul ((2 * Real.pi * I : β)β»ΒΉ) using 1 | |
| ext z | |
| simp only [cderiv, circleIntegral, deriv_circleMap, G, circleMap, zero_add, | |
| sub_zero, Pi.smul_apply, Set.domRestrict] | |
| variable [CompleteSpace F] | |
| theorem continuousAt_directional_fderiv {U : Set E} (hU : IsOpen U) | |
| {f : E β F} (hf : DifferentiableOn β f U) {p : E} (hp : p β U) (e : E) : | |
| ContinuousAt (fun z β¦ fderiv β f z e) p := by | |
| obtain β¨d,hd,hdUβ© := Metric.mem_nhds_iff.mp (hU.mem_nhds hp) | |
| let r : β := d / (2 * (βeβ + 1)) | |
| have he : 0 < βeβ + 1 := by positivity | |
| have hr : 0 < r := div_pos hd (by positivity) | |
| have hre : r * βeβ β€ d / 2 := by | |
| have hprod : r * (βeβ + 1) = d / 2 := by | |
| dsimp [r]; field_simp | |
| nlinarith | |
| let S := ball p (d / 2) | |
| have hS : S β π p := ball_mem_nhds _ (by linarith) | |
| have hmap (z : E) (hz : z β S) (w : β) (hw : w β closedBall 0 r) : | |
| z + w β’ e β U := by | |
| apply hdU | |
| rw [Metric.mem_ball, dist_eq_norm] at hz β’ | |
| rw [Metric.mem_closedBall, dist_zero_right] at hw | |
| calc | |
| βz + w β’ e - pβ = β(z-p) + w β’ eβ := by congr 1; abel | |
| _ β€ βz-pβ + βw β’ eβ := norm_add_le _ _ | |
| _ = βz-pβ + βwβ * βeβ := by rw [norm_smul] | |
| _ β€ βz-pβ + r * βeβ := by gcongr | |
| _ < d := by linarith | |
| have hc := continuousOn_directional_cauchy hf.continuousOn e hr | |
| (fun z hz ΞΈ β¦ hmap z hz _ (circleMap_mem_closedBall _ hr.le _)) | |
| have heq : (fun z β¦ cderiv r (fun w : β β¦ f (z + w β’ e)) 0) | |
| =αΆ [π p] (fun z β¦ fderiv β f z e) := by | |
| filter_upwards [hS] with z hz | |
| let V : Set β := (fun w : β β¦ z + w β’ e) β»ΒΉ' U | |
| have hV : IsOpen V := hU.preimage (by fun_prop) | |
| have hline : DifferentiableOn β (fun w : β β¦ f (z + w β’ e)) V := | |
| hf.comp (by fun_prop) (fun _ hw β¦ hw) | |
| rw [cderiv_eq_deriv hV hline hr (hmap z hz)] | |
| have hzU : z β U := by simpa using hmap z hz 0 (mem_closedBall_self hr.le) | |
| have hdline : HasDerivAt (fun w : β β¦ z + w β’ e) e 0 := by | |
| simpa using ((hasDerivAt_id (0 : β)).smul_const e).const_add z | |
| have hdf := (hf.differentiableAt (hU.mem_nhds hzU)).hasFDerivAt | |
| have hh := (show HasFDerivAt f (fderiv β f z) (z + (0 : β) β’ e) by | |
| simpa using hdf).comp_hasDerivAt 0 hdline | |
| simpa only [Function.comp_def] using hh.deriv | |
| exact (hc.continuousAt hS).congr heq | |
| theorem finite_holomorphic_contDiffOn_one [FiniteDimensional β E] | |
| {U : Set E} (hU : IsOpen U) {f : E β F} (hf : DifferentiableOn β f U) : | |
| ContDiffOn β 1 f U := by | |
| rw [show (1 : ββΟ) = 0 + 1 from by simp, contDiffOn_succ_iff_fderiv_of_isOpen hU] | |
| refine β¨hf,by simp,?_β© | |
| rw [contDiffOn_zero] | |
| intro p hp | |
| apply ContinuousAt.continuousWithinAt | |
| rw [continuousAt_clm_apply] | |
| exact continuousAt_directional_fderiv hU hf hp | |
| end UniversalCoverSplitting | |
| open Set Metric Filter Topology | |
| namespace UniversalCoverSplitting | |
| variable {E : Type*} [NormedAddCommGroup E] [NormedSpace β E] | |
| def radialClamp (p : E) (r : β) (x : E) : E := | |
| p + (r / max r βx-pβ) β’ (x-p) | |
| theorem continuous_radialClamp (p : E) {r : β} (hr : 0 < r) : | |
| Continuous (radialClamp p r) := by | |
| have hn (x : E) : max r βx-pβ β 0 := ne_of_gt (lt_of_lt_of_le hr (le_max_left _ _)) | |
| unfold radialClamp | |
| exact continuous_const.add ((continuous_const.div | |
| (continuous_const.max (continuous_id.sub continuous_const).norm) hn).smul | |
| (continuous_id.sub continuous_const)) | |
| theorem radialClamp_eq_self_of_mem_closedBall {p x : E} {r : β} (hr : 0 < r) | |
| (hx : x β closedBall p r) : radialClamp p r x = x := by | |
| rw [mem_closedBall,dist_eq_norm] at hx | |
| simp [radialClamp,max_eq_left hx,div_self (ne_of_gt hr)] | |
| theorem radialClamp_mem_closedBall (p x : E) {r : β} (hr : 0 < r) : | |
| radialClamp p r x β closedBall p r := by | |
| by_cases hx : x β closedBall p r | |
| Β· simpa [radialClamp_eq_self_of_mem_closedBall hr hx] using hx | |
| Β· rw [mem_closedBall,dist_eq_norm] at hx β’ | |
| have hnx : r < βx-pβ := lt_of_not_ge hx | |
| have hnorm : 0 < βx-pβ := hr.trans hnx | |
| rw [radialClamp,add_sub_cancel_left,norm_smul,Real.norm_eq_abs, | |
| max_eq_right hnx.le,abs_of_nonneg (div_nonneg hr.le (norm_nonneg _)), | |
| div_mul_cancelβ _ (ne_of_gt hnorm)] | |
| theorem radialClamp_eventuallyEq_id {p x : E} {r : β} (hr : 0 < r) | |
| (hx : x β ball p r) : radialClamp p r =αΆ [π x] id := by | |
| filter_upwards [isOpen_ball.mem_nhds hx] with y hy | |
| exact radialClamp_eq_self_of_mem_closedBall hr (ball_subset_closedBall hy) | |
| end UniversalCoverSplitting | |
| open Set Metric Filter Topology | |
| namespace UniversalCoverSplitting | |
| variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace β E] | |
| [NormedSpace β E] [IsScalarTower β β E] [FiniteDimensional β E] | |
| [NormedAddCommGroup F] [NormedSpace β F] [CompleteSpace F] | |
| omit [IsScalarTower β β E] in | |
| theorem holomorphic_continuous_representatives {U : Set E} (hU : IsOpen U) | |
| {V : E β F} (hV : DifferentiableOn β V U) {p : E} (hp : p β U) : | |
| β r > 0, β f : C(E,F), β D : C(E,E βL[β] F), | |
| ball p r β U β§ β x β ball p r, | |
| f x = V x β§ D x = fderiv β V x β§ HasFDerivAt f (D x) x := by | |
| obtain β¨d,hd,hdUβ© := Metric.mem_nhds_iff.mp (hU.mem_nhds hp) | |
| let r := d/2 | |
| have hr : 0 < r := half_pos hd | |
| have hcU : closedBall p r β U := | |
| (closedBall_subset_ball (by dsimp [r]; linarith : r < d)).trans hdU | |
| have hclamp := continuous_radialClamp p hr | |
| have hm (x : E) : radialClamp p r x β U := hcU (radialClamp_mem_closedBall p x hr) | |
| have hDV := (finite_holomorphic_contDiffOn_one hU hV).continuousOn_fderiv_of_isOpen hU le_rfl | |
| let f : C(E,F) := β¨V β radialClamp p r, | |
| hV.continuousOn.comp_continuous hclamp (fun x β¦ hm x)β© | |
| let D : C(E,E βL[β] F) := β¨fderiv β V β radialClamp p r, | |
| hDV.comp_continuous hclamp (fun x β¦ hm x)β© | |
| refine β¨r,hr,f,D,ball_subset_closedBall.trans hcU,?_β© | |
| intro x hx | |
| have hid := radialClamp_eq_self_of_mem_closedBall hr (ball_subset_closedBall hx) | |
| have hf : f x = V x := by dsimp [f]; rw [hid] | |
| have hD : D x = fderiv β V x := by dsimp [D]; rw [hid] | |
| refine β¨hf,hD,?_β© | |
| rw [hD] | |
| apply (hV.differentiableAt (hU.mem_nhds (hcU (ball_subset_closedBall hx)))).hasFDerivAt.congr_of_eventuallyEq | |
| filter_upwards [radialClamp_eventuallyEq_id hr hx] with y hy | |
| change V (radialClamp p r y) = V y | |
| rw [hy]; rfl | |
| end UniversalCoverSplitting | |
| open Set Metric Filter Topology | |
| namespace UniversalCoverSplitting | |
| variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace β E] | |
| [NormedSpace β E] [FiniteDimensional β E] | |
| [NormedAddCommGroup F] [NormedSpace β F] [CompleteSpace F] | |
| theorem finite_holomorphic_representatives {ΞΉ : Type*} [Finite ΞΉ] | |
| {U : Set E} (hU : IsOpen U) (V : ΞΉ β E β F) | |
| (hV : β i, DifferentiableOn β (V i) U) {p : E} (hp : p β U) : | |
| β O : Set E, IsOpen O β§ p β O β§ O β U β§ | |
| β f : ΞΉ β C(E,F), β D : ΞΉ β C(E,E βL[β] F), | |
| β i x, x β O β f i x = V i x β§ D i x = fderiv β (V i) x β§ | |
| HasFDerivAt (f i) (D i x) x := by | |
| choose r hr f D hball hrep using fun i β¦ holomorphic_continuous_representatives hU (hV i) hp | |
| let O := U β© β i, ball p (r i) | |
| refine β¨O,hU.inter (isOpen_iInter_of_finite fun i β¦ isOpen_ball), | |
| β¨hp,mem_iInter.mpr (fun i β¦ mem_ball_self (hr i))β©,inter_subset_left,f,D,?_β© | |
| intro i x hx | |
| exact hrep i x (mem_iInter.mp hx.2 i) | |
| end UniversalCoverSplitting | |
| end | |
| end OAI | |