Download data/lean/OAI/Probability/LatticeSurface/Geometry/BlockRadial.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 4.88 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/LatticeSurface/Geometry/BlockRadial.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Probability/LatticeSurface/Geometry/BlockRadial.lean
-
curl -L -o BlockRadial.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/LatticeSurface/Geometry/BlockRadial.lean
4.88 kB
| import Mathlib | |
| import OAI.Probability.LatticeSurface.Convexity.RadialExposure | |
| import OAI.Probability.LatticeSurface.Geometry.BlockEdgeGeometry | |
| import OAI.Probability.LatticeSurface.Geometry.BlockFacetGeometry | |
| import OAI.Probability.LatticeSurface.Geometry.BlockVolume | |
| import OAI.Probability.LatticeSurface.Geometry.EdgeCoordinates | |
| import OAI.Probability.LatticeSurface.Geometry.FacetExposure | |
| import OAI.Probability.LatticeSurface.Geometry.TriangularCover | |
| import OAI.Probability.LatticeSurface.Geometry.TriangularGeometry | |
| namespace OAI | |
| open MeasureTheory | |
| open scoped ENNReal | |
| noncomputable section | |
| namespace TriangularLipschitz | |
| end TriangularLipschitz | |
| namespace FacetExposure | |
| end FacetExposure | |
| namespace TriangularLipschitz | |
| end TriangularLipschitz | |
| namespace TriangularLipschitz | |
| end TriangularLipschitz | |
| namespace TriangularLipschitz | |
| end TriangularLipschitz | |
| open MeasureTheory Set | |
| open scoped ENNReal | |
| noncomputable section | |
| namespace EdgeCoordinates | |
| end EdgeCoordinates | |
| namespace EdgeCoordinates | |
| end EdgeCoordinates | |
| namespace EdgeCoordinates | |
| end EdgeCoordinates | |
| namespace TriangularLipschitz | |
| end TriangularLipschitz | |
| namespace TriangularLipschitz | |
| end TriangularLipschitz | |
| namespace TriangularLipschitz | |
| lemma radialPoint_zero (L : β) (side : Fin 4) : radialPoint L side 0=faceCenter L side := by | |
| fin_cases side <;> simp [radialPoint,faceCenter] | |
| lemma radialPoint_center (m : β) (side : Fin 4) : radialPoint (2*m) side m=((m:β€),(m:β€)) := by | |
| fin_cases side <;> simp [radialPoint] <;> omega | |
| lemma radialPoint_mem_box {m k : β} (hk : k β€ m) (side : Fin 4) : | |
| radialPoint (2*m) side k β box (2*m) := by | |
| fin_cases side <;> simp [radialPoint,mem_box] <;> omega | |
| lemma radialPoint_mem_interior {m k : β} (hk0 : 0 < k) (hk : k β€ m) (side : Fin 4) : | |
| radialPoint (2*m) side k β interior (2*m) := by | |
| fin_cases side <;> simp [radialPoint,interior] <;> omega | |
| lemma faceCenter_mem_shell {m : β} (hm : 0 < m) (side : Fin 4) : | |
| faceCenter (2*m) side β shell (2*m) := by | |
| fin_cases side <;> simp [faceCenter,mem_shell,mem_box] <;> omega | |
| lemma radialPoint_fixed_iff {m k : β} (hm : 0 < m) (hk : k β€ m) (side : Fin 4) : | |
| radialPoint (2*m) side k β interior (2*m) β k=0 := by | |
| constructor | |
| Β· intro hi | |
| by_contra h | |
| exact hi (radialPoint_mem_interior (Nat.pos_of_ne_zero h) hk side) | |
| Β· rintro rfl | |
| rw [radialPoint_zero] | |
| exact (shell_eq_box_not_interior.mp (faceCenter_mem_shell hm side)).2 | |
| lemma radialPoint_adj (L k : β) (side : Fin 4) : | |
| Adj (radialPoint L side k) (radialPoint L side (k+1)) := by | |
| fin_cases side <;> simp [radialPoint,Adj] <;> omega | |
| lemma shifted_radial_facet {m k : β} {Ο : β} {h Ο g : Vertex β β} | |
| (hm : 0 < m) (hk : k < m) (side : Fin 4) | |
| (hg : β b β shell (2*m), g b=h b) | |
| (hgrad : |g (radialPoint (2*m) side k)-g (radialPoint (2*m) side (k+1))|=1) : | |
| let x := radialPoint (2*m) side k | |
| let y := radialPoint (2*m) side (k+1) | |
| let Ο := g y-g x | |
| Ο*(filledHeight (2*m) (fun b => h b+Ο*Ο b) | |
| (fun z => g z+Ο*Ο (faceCenter (2*m) side)) y- | |
| filledHeight (2*m) (fun b => h b+Ο*Ο b) | |
| (fun z => g z+Ο*Ο (faceCenter (2*m) side)) x)=1 := by | |
| dsimp only | |
| have hy := radialPoint_mem_interior (by omega : 0 < k+1) (by omega : k+1 β€ m) side | |
| have hgabs : |g (radialPoint (2*m) side (k+1))-g (radialPoint (2*m) side k)|=1 := by | |
| rwa [abs_sub_comm] | |
| have hsquare : (g (radialPoint (2*m) side (k+1))-g (radialPoint (2*m) side k))^2=1 := by | |
| nlinarith [sq_abs (g (radialPoint (2*m) side (k+1))-g (radialPoint (2*m) side k))] | |
| rw [filledHeight, dite_eq_left hy] | |
| by_cases hx : radialPoint (2*m) side k β interior (2*m) | |
| Β· rw [filledHeight,dite_eq_left hx] | |
| nlinarith | |
| Β· have hk0 := (radialPoint_fixed_iff hm (Nat.le_of_lt hk) side).mp hx | |
| subst k | |
| rw [filledHeight,dite_eq_right hx,radialPoint_zero] | |
| have hg0 := hg (faceCenter (2*m) side) (faceCenter_mem_shell hm side) | |
| rw [radialPoint_zero] at hsquare | |
| rw [β hg0] | |
| nlinarith | |
| lemma shifted_shell_error {L : β} {h Ο g : Vertex β β} {Ο Ξ² : β} {v : Vertex} | |
| (_hΞ² : 0 < Ξ²) (hv : v β shell L) | |
| (hg : β b β shell L, g b=h b) | |
| (hplus : 0 < fillingVolume L (fun x => h x+Ο x)) | |
| (hminus : 0 < fillingVolume L (fun x => h x-Ο x)) | |
| (hΟ : |Ο| * (2*(L:β)) β€ Ξ²/4) : | |
| β b β shell L, |(h b+Ο*Ο b)-(g b+Ο*Ο v)| β€ Ξ²/4 := by | |
| intro b hb | |
| rw [hg b hb] | |
| calc | |
| _ = |Ο| * |Ο b-Ο v| := by rw [β abs_mul]; congr 1; ring | |
| _ β€ |Ο| * latticeDist b v := mul_le_mul_of_nonneg_left | |
| (endpoint_shell_difference hplus hminus hb hv) (abs_nonneg Ο) | |
| _ β€ |Ο| * (2*(L:β)) := mul_le_mul_of_nonneg_left | |
| (latticeDist_box_le (shell_eq_box_not_interior.mp hb).1 (shell_eq_box_not_interior.mp hv).1) | |
| (abs_nonneg Ο) | |
| _ β€ Ξ²/4 := hΟ | |
| end TriangularLipschitz | |
| end | |
| end | |
| end OAI | |