Download data/lean/OAI/Dynamics/TriangleBilliards/Model.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 4.92 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Dynamics/TriangleBilliards/Model.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Dynamics/TriangleBilliards/Model.lean
-
curl -L -o Model.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Dynamics/TriangleBilliards/Model.lean
4.92 kB
| import Mathlib | |
| namespace OAI | |
| /-! | |
| The phase space is represented in the ambient plane Γ circle, with measure | |
| supported on the interior of the triangle. Values on side-collision states | |
| at a fixed time are immaterial to the modulo-null-set conclusion. The | |
| trajectories themselves include the collisions and impose specular reflection. | |
| -/ | |
| open MeasureTheory Set | |
| open scoped ENNReal symmDiff | |
| noncomputable section | |
| namespace TriangularBilliards | |
| /-- Three affinely independent vertices in the Euclidean plane. -/ | |
| structure Triangle where | |
| vertex : Fin 3 β β | |
| nondegenerate : AffineIndependent β vertex | |
| namespace Triangle | |
| /-- The open table; the complex plane carries its ordinary real Euclidean metric. -/ | |
| def table (Q : Triangle) : Set β := interior (convexHull β (range Q.vertex)) | |
| /-- The open side from vertex `i` to the next vertex, indexed cyclically. -/ | |
| def side (Q : Triangle) (i : Fin 3) : Set β := | |
| openSegment β (Q.vertex i) (Q.vertex (i + 1)) | |
| /-- A tangent vector to side `i`, with no choice of inward or outward normal. -/ | |
| def tangent (Q : Triangle) (i : Fin 3) : β := Q.vertex (i + 1) - Q.vertex i | |
| /-- Interior angle at vertex `i`. -/ | |
| def angle (Q : Triangle) (i : Fin 3) : β := | |
| InnerProductGeometry.angle (Q.vertex (i + 1) - Q.vertex i) | |
| (Q.vertex (i + 2) - Q.vertex i) | |
| def HasIrrationalAngle (Q : Triangle) : Prop := | |
| β i : Fin 3, Irrational (Q.angle i / Real.pi) | |
| end Triangle | |
| /-- Reflection in the real line spanned by the nonzero tangent `e`. | |
| In coordinates with `e` real this is complex conjugation, preserving the | |
| tangential component and reversing the normal component. -/ | |
| def reflect (e v : β) : β := (e / star e) * star v | |
| instance circleMeasurableSpace : MeasurableSpace Circle := borel Circle | |
| instance circleBorelSpace : BorelSpace Circle := β¨rflβ© | |
| abbrev Phase := β Γ Circle | |
| /-- A complete nonsingular billiard trajectory, indexed by its collisions. | |
| Flight zero contains the initial time strictly. Both ends of the collision | |
| time sequence are unbounded; collisions occur only in open sides, never | |
| vertices. These are geometric conditions, not ergodicity/analytic assumptions. -/ | |
| structure FlightChain (Q : Triangle) (z : Phase) where | |
| time : β€ β β | |
| point : β€ β β | |
| direction : β€ β Circle | |
| wall : β€ β Fin 3 | |
| increasing : StrictMono time | |
| unbounded_below : β t : β, β n : β€, time n < t | |
| unbounded_above : β t : β, β n : β€, t < time n | |
| zero_before : time 0 < 0 | |
| zero_after : 0 < time 1 | |
| on_side : β n : β€, point n β Q.side (wall n) | |
| flight : β n : β€, | |
| point (n + 1) = point n + (time (n + 1) - time n) β’ (direction n : β) | |
| inside : β (n : β€) (t : β), time n < t β t < time (n + 1) β | |
| point n + (t - time n) β’ (direction n : β) β Q.table | |
| start_point : z.1 = point 0 + (-time 0) β’ (direction 0 : β) | |
| start_direction : z.2 = direction 0 | |
| specular : β n : β€, | |
| (direction n : β) = reflect (Q.tangent (wall n)) (direction (n - 1) : β) | |
| /-- The geometric state on a chain, using outgoing velocity at a collision. -/ | |
| def FlightChain.at {Q : Triangle} {z : Phase} (c : FlightChain Q z) (t : β) : Phase := by | |
| classical | |
| exact if h : β n : β€, c.time n β€ t β§ t < c.time (n + 1) then | |
| let n := Classical.choose h | |
| (c.point n + (t - c.time n) β’ (c.direction n : β), c.direction n) | |
| else z | |
| /-- The actual specular flow on complete regular chains. Singular initial | |
| states are assigned their initial state; the theorem must prove these form | |
| a null set. No nonemptiness of the regular set is postulated. -/ | |
| def billiardFlow (Q : Triangle) (t : β) (z : Phase) : Phase := by | |
| classical | |
| exact if h : Nonempty (FlightChain Q z) then (Classical.choice h).at t else z | |
| /-- Uniform angular probability, parameterized by [0,2Ο). -/ | |
| def angularMeasure : Measure Circle := | |
| Measure.map Circle.exp | |
| ((ENNReal.ofReal (2 * Real.pi))β»ΒΉ β’ volume.restrict (Ico 0 (2 * Real.pi))) | |
| /-- Exactly normalized area in the open table times uniform angular measure. -/ | |
| def phaseMeasure (Q : Triangle) : Measure Phase := | |
| ((volume Q.table)β»ΒΉ β’ volume.restrict Q.table).prod angularMeasure | |
| /-- The main conclusion, together with the geometric/nonvacuity guarantees | |
| needed by the concrete definition of the actual two-sided billiard. -/ | |
| def MainConclusion (Q : Triangle) : Prop := | |
| phaseMeasure Q univ = 1 β§ | |
| (βα΅ z βphaseMeasure Q, Nonempty (FlightChain Q z)) β§ | |
| (β (z : Phase) (c d : FlightChain Q z), c = d) β§ | |
| (β t : β, MeasurePreserving (billiardFlow Q t) (phaseMeasure Q) (phaseMeasure Q)) β§ | |
| (β s t : β, billiardFlow Q (s + t) =α΅[phaseMeasure Q] | |
| (billiardFlow Q s β billiardFlow Q t)) β§ | |
| (β A : Set Phase, MeasurableSet A β | |
| (β t : β, phaseMeasure Q (((billiardFlow Q t) β»ΒΉ' A) β A) = 0) β | |
| phaseMeasure Q A = 0 β¨ phaseMeasure Q A = 1) | |
| end TriangularBilliards | |
| end | |
| end OAI | |