Download data/lean/OAI/Probability/FirstPassage/EndpointGeometry.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 3.79 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/FirstPassage/EndpointGeometry.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Probability/FirstPassage/EndpointGeometry.lean
-
curl -L -o EndpointGeometry.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/FirstPassage/EndpointGeometry.lean
3.79 kB
| import OAI.Probability.FirstPassage.EndpointMesh | |
| import OAI.Probability.FirstPassage.PathConcatenation | |
| namespace OAI | |
| namespace PlanarFPP | |
| noncomputable def endpointVertex (b r : β) (X : β€) : Vertex := (X,βb*X+rβ) | |
| lemma endpointVertex_error (b r : β) (X : β€) : | |
| -1 < transverse b (endpointVertex b r X)-r β§ | |
| transverse b (endpointVertex b r X)-r β€ 0 := by | |
| have hl := Int.floor_le (b*X+r) | |
| have hu := Int.lt_floor_add_one (b*X+r) | |
| dsimp [transverse,endpointVertex] | |
| constructor <;> linarith | |
| lemma endpointVertex_close (b r : β) (X : β€) : | |
| |transverse b (endpointVertex b r X)-r| < 1 := by | |
| have h := endpointVertex_error b r X | |
| exact abs_lt.mpr β¨h.1,by linarith [h.2]β© | |
| lemma endpointVertex_self (b : β) (p : Vertex) : | |
| endpointVertex b (transverse b p) p.1=p := by | |
| apply Prod.ext | |
| Β· rfl | |
| Β· simp [endpointVertex,transverse] | |
| lemma endpointVertex_displacement (b r : β) (X Y : β€) : | |
| |transverse b (endpointVertex b r Y-endpointVertex b r X)| < 1 := by | |
| have hx := endpointVertex_error b r X | |
| have hy := endpointVertex_error b r Y | |
| have he : transverse b (endpointVertex b r Y-endpointVertex b r X) = | |
| transverse b (endpointVertex b r Y)-transverse b (endpointVertex b r X) := by | |
| simp [transverse]; ring | |
| rw [he,abs_lt] | |
| constructor <;> linarith [hx.1,hx.2,hy.1,hy.2] | |
| lemma endpoint_path_defect (w : Edge β β) (b r mβ a E : β) (X Y : β€) | |
| (ds : List Step) | |
| (hd : endpointVertex b r X+displacement ds=endpointVertex b r Y) | |
| (hc : pathCost w (endpointVertex b r X) ds β€ mβ*((Y-X : β€) : β)+E) : | |
| defect w b mβ a (endpointVertex b r X) ds β€ E+|a| := by | |
| have hd' : displacement ds=endpointVertex b r Y-endpointVertex b r X := by | |
| rw [β hd]; abel | |
| have hr := (endpointVertex_displacement b r X Y).le | |
| have hm : |a*transverse b (endpointVertex b r Y-endpointVertex b r X)| β€ |a| := by | |
| rw [abs_mul] | |
| nlinarith [abs_nonneg a] | |
| have hlo := (abs_le.mp hm).1 | |
| unfold defect support | |
| rw [hd'] | |
| have hx : (endpointVertex b r Y-endpointVertex b r X).1=Y-X := rfl | |
| rw [hx] | |
| linarith | |
| lemma negative_defect_reverse_span (w : Edge β β) (hw : β e, 0 β€ w e) | |
| (b mβ a R s Ξ΅ : β) (hm : 0 < mβ) (_hR : 0 β€ R) (hs : 0 β€ s) (hΞ΅ : 0 β€ Ξ΅) | |
| (p z : Vertex) (ds : List Step) (hd : p+displacement ds=z) | |
| (hp : |transverse b p| β€ R*s) (hz : |transverse b z| β€ R*s) | |
| (hc : defect w b mβ a p ds < -Ξ΅*s) : | |
| -2*R*|a| *s/mβ β€ ((z.1-p.1 : β€) : β) := by | |
| have hd' : displacement ds=z-p := by rw [β hd]; abel | |
| have hr : |transverse b (z-p)| β€ 2*R*s := by | |
| have he : transverse b (z-p)=transverse b z-transverse b p := by simp [transverse]; ring | |
| rw [he] | |
| exact (abs_sub _ _).trans (by linarith) | |
| have ha : a*transverse b (z-p) β€ 2*R*|a| *s := by | |
| have hh := mul_le_mul_of_nonneg_left hr (abs_nonneg a) | |
| have hb := le_abs_self (a*transverse b (z-p)) | |
| rw [abs_mul] at hb | |
| nlinarith | |
| have hcost := pathCost_nonneg hw p ds | |
| have heps := mul_nonneg hΞ΅ hs | |
| unfold defect support at hc | |
| rw [hd'] at hc | |
| change pathCost w p ds-(mβ*((z.1-p.1 : β€) : β)+a*transverse b (z-p)) < -Ξ΅*s at hc | |
| apply (div_le_iffβ hm).mpr | |
| nlinarith | |
| lemma extended_columns_span (p z : β€) (m J : β) (C s : β) | |
| (hrev : -C*s β€ ((z-p : β€) : β)) | |
| (hscale : C*s β€ (gridMesh m J : β)) : | |
| (gridMesh m J : β) β€ ((exitColumn z m J-entranceColumn p m J : β€) : β) := by | |
| have hp := entranceColumn_span p m J | |
| have hz := exitColumn_span z m J | |
| have hp' : (gridMesh m J : β) β€ ((p-entranceColumn p m J : β€) : β) := by exact_mod_cast hp.1 | |
| have hz' : (gridMesh m J : β) β€ ((exitColumn z m J-z : β€) : β) := by exact_mod_cast hz.1 | |
| push_cast at hp' hz' hrev β’ | |
| linarith | |
| end PlanarFPP | |
| end OAI | |