Spatial paths #
A path is a finite sequence of locations, the spatial counterpart of a temporal interval. Zwarts
gives paths an algebra: concatenation, defined only when one path ends where the next starts, the
subpath order, and Krifka's adjacency of paths that share an endpoint. Zwarts's own paths are
continuous curves, mathlib's topological _root_.Path, but he allows sequences of places as
compatible with the algebra, and they keep every operation computable.
Pantcheva classifies paths by where they are inside a region. On any path parametrized by a bounded linear order of positions, a sequence of places or a curve, the positions inside the region form a set, and its order-theoretic shape is the path's: an upper set for a cofinal path (to), a lower set for a coinitial one (from), an interval missing both ends for a transitive one (past), the last position alone for a terminative one (up to). Reparametrizing keeps the shape and reversing the order reverses it, so a source path is a reversed goal path. An event domain's spatial trace sends each event to the path it traverses, as its temporal trace sends it to its run time.
Main definitions #
Spatial.Path: a directed trajectory, a source with later steps, ending atPath.goal.Spatial.Path.IsConcat,Subpath,adjacent,reverse: the path algebra.Spatial.Path.Direction: Place, Goal, Source and Route, in containment order.Spatial.Path.Shape,Shape.direction,Shape.transition: the eight shapes.Spatial.Path.IsCofinal,IsCoinitial,IsTransitive,IsTerminative,IsEgressive,IsProlative,IsApproximative,IsRecessive,HasShape: the shapes of a parametrized path relative to a region.Spatial.Path.toFun: a path's places indexed by their positions.Spatial.Localization: interior, surface or exterior.Event.SpatialTrace: the spatial trace of an event domain.
Main results #
Spatial.Path.Direction.lt_iff_shells_ssubset: the containment order is strict inclusion of head stacks.Spatial.Path.Shape.exists_direction_transition_iff: a direction and a transition combine into a shape exactly when the direction is not Place and a route is not delimited.Spatial.Path.hasShape_comp,hasShape_comp_ofDual: reparametrizing keeps the shape, and traversing the other way reverses it.Spatial.Path.hasShape_reverse: reversing a path reverses its shape.Spatial.Path.IsCofinal.not_isCoinitial: no path is both cofinal and coinitial.
References #
A path is a directed trajectory through space, given by the finite sequence of locations it visits.
- source : Loc
The location the path starts from.
- steps : List Loc
The later locations, which are empty for a constant path.
Instances For
Equations
- Spatial.instDecidableEqPath.decEq { source := a, steps := a_1 } { source := b, steps := b_1 } = if h : a = b then h ▸ if h : a_1 = b_1 then h ▸ isTrue ⋯ else isFalse ⋯ else isFalse ⋯
Instances For
Equations
- Spatial.instReprPath = { reprPrec := Spatial.instReprPath.repr }
Equations
- One or more equations did not get rendered due to their size.
Instances For
The constant path at l visits only l.
Equations
- Spatial.Path.const l = { source := l, steps := [] }
Instances For
Concatenation and subpaths #
p is a subpath of q when concatenating some paths around p yields q.
Equations
- p.Subpath q = ∃ (r : Spatial.Path Loc) (r' : Spatial.Path Loc) (m : Spatial.Path Loc), r.IsConcat p m ∧ m.IsConcat r' q
Instances For
The subpath order is a scoped instance, since paths are also studied under a rival total
lattice sum (the SemilatticeSup (Path Loc) of Studies/GoldbergJackendoff2004.lean).
Activate it with open scoped Spatial.Path.
Equations
- Spatial.Path.instSubpathOrder = { le := Spatial.Path.Subpath, le_refl := ⋯, le_trans := ⋯, lt_iff_le_not_ge := ⋯, le_antisymm := ⋯ }
Instances For
Adjacency #
Reversal #
Directions #
The direction heads of a path, in containment order, Goal built on Place, Source on Goal, and Route on Source.
- place : Direction
Place is static location, the base of the others.
- goal : Direction
Goal is motion to.
- source : Direction
Source is motion from.
- route : Direction
Route is motion via or past.
Instances For
Equations
- Spatial.Path.instDecidableEqDirection x✝ y✝ = if h : x✝.ctorIdx = y✝.ctorIdx then isTrue ⋯ else isFalse ⋯
Equations
- Spatial.Path.instReprDirection = { reprPrec := Spatial.Path.instReprDirection.repr }
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
The number of heads below a direction.
Equations
Instances For
The heads a direction contains, a downward-closed stack.
Instances For
The direction of a path traversed the other way swaps Goal and Source and keeps Place and Route.
Equations
Instances For
Shapes #
How a path relates its run inside the region to its run outside.
- transitional : Transition
The path changes its relation to the region, as to does.
- delimited : Transition
The path changes it at one point, which bounds the motion, as up to does.
- nonTransitional : Transition
The path does not change it, as towards does.
Instances For
Equations
- Spatial.Path.instDecidableEqTransition x✝ y✝ = if h : x✝.ctorIdx = y✝.ctorIdx then isTrue ⋯ else isFalse ⋯
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Spatial.Path.instReprTransition = { reprPrec := Spatial.Path.instReprTransition.repr }
Equations
- One or more equations did not get rendered due to their size.
The eight shapes of a path relative to a region.
- cofinal : Shape
A cofinal path runs outside, then inside, as to does.
- coinitial : Shape
A coinitial path runs inside, then outside, as from does.
- transitive : Shape
A transitive path runs outside, inside and outside, as past does.
- terminative : Shape
A terminative path runs outside up to its goal, which is inside, as up to does.
- egressive : Shape
An egressive path starts inside and runs outside, as starting from does.
- approximative : Shape
An approximative path runs outside, nearer at each point, as towards does.
- recessive : Shape
A recessive path runs outside, farther at each point, as away from does.
- prolative : Shape
A prolative path runs inside throughout, as along does.
Instances For
Equations
- Spatial.Path.instDecidableEqShape x✝ y✝ = if h : x✝.ctorIdx = y✝.ctorIdx then isTrue ⋯ else isFalse ⋯
Equations
- Spatial.Path.instReprShape = { reprPrec := Spatial.Path.instReprShape.repr }
Equations
- One or more equations did not get rendered due to their size.
- Spatial.Path.instReprShape.repr Spatial.Path.Shape.cofinal prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "Spatial.Path.Shape.cofinal")).group prec✝
Instances For
Equations
- Spatial.Path.instFintypeShape = { elems := { val := ↑Spatial.Path.Shape.enumList, nodup := Spatial.Path.Shape.enumList_nodup }, complete := Spatial.Path.instFintypeShape._proof_1 }
The direction of a shape.
Equations
- Spatial.Path.Shape.cofinal.direction = Spatial.Path.Direction.goal
- Spatial.Path.Shape.terminative.direction = Spatial.Path.Direction.goal
- Spatial.Path.Shape.approximative.direction = Spatial.Path.Direction.goal
- Spatial.Path.Shape.coinitial.direction = Spatial.Path.Direction.source
- Spatial.Path.Shape.egressive.direction = Spatial.Path.Direction.source
- Spatial.Path.Shape.recessive.direction = Spatial.Path.Direction.source
- Spatial.Path.Shape.transitive.direction = Spatial.Path.Direction.route
- Spatial.Path.Shape.prolative.direction = Spatial.Path.Direction.route
Instances For
The transition of a shape.
Equations
- Spatial.Path.Shape.cofinal.transition = Spatial.Path.Transition.transitional
- Spatial.Path.Shape.coinitial.transition = Spatial.Path.Transition.transitional
- Spatial.Path.Shape.transitive.transition = Spatial.Path.Transition.transitional
- Spatial.Path.Shape.terminative.transition = Spatial.Path.Transition.delimited
- Spatial.Path.Shape.egressive.transition = Spatial.Path.Transition.delimited
- Spatial.Path.Shape.approximative.transition = Spatial.Path.Transition.nonTransitional
- Spatial.Path.Shape.recessive.transition = Spatial.Path.Transition.nonTransitional
- Spatial.Path.Shape.prolative.transition = Spatial.Path.Transition.nonTransitional
Instances For
A shape is its direction and its transition.
A direction and a transition make a shape exactly when the direction is not Place and a Route is not delimited.
The shape of a path traversed the other way.
Equations
- Spatial.Path.Shape.cofinal.reverse = Spatial.Path.Shape.coinitial
- Spatial.Path.Shape.coinitial.reverse = Spatial.Path.Shape.cofinal
- Spatial.Path.Shape.terminative.reverse = Spatial.Path.Shape.egressive
- Spatial.Path.Shape.egressive.reverse = Spatial.Path.Shape.terminative
- Spatial.Path.Shape.approximative.reverse = Spatial.Path.Shape.recessive
- Spatial.Path.Shape.recessive.reverse = Spatial.Path.Shape.approximative
- x✝.reverse = x✝
Instances For
A shape is bounded when it has a transition, which makes the motion telic.
Equations
Instances For
Equations
- s.instDecidablePredIsBounded = { decide := !decide (s.transition = Spatial.Path.Transition.nonTransitional), reflects_decide := ⋯ }
Shapes relative to a region #
A path parametrized by a bounded linear order of positions, a sequence of places or a curve, has the shape its positions inside a region give it: a cofinal path's form an upper set, a coinitial path's a lower set, a transitive path's an interval inside the path.
A cofinal path starts outside R, ends inside it, and stays inside once in, as a path to
R does.
Equations
- Spatial.Path.IsCofinal R γ = (IsUpperSet (γ ⁻¹' R) ∧ γ ⊥ ∉ R ∧ γ ⊤ ∈ R)
Instances For
A coinitial path starts inside R, ends outside it, and stays outside once out, as a path
from R does.
Equations
- Spatial.Path.IsCoinitial R γ = (IsLowerSet (γ ⁻¹' R) ∧ γ ⊥ ∈ R ∧ γ ⊤ ∉ R)
Instances For
A transitive path starts and ends outside R and is inside it over one stretch, as a path
past R is.
Equations
- Spatial.Path.IsTransitive R γ = ((γ ⁻¹' R).OrdConnected ∧ (γ ⁻¹' R).Nonempty ∧ γ ⊥ ∉ R ∧ γ ⊤ ∉ R)
Instances For
A terminative path is inside R at its end only, as a path up to R is.
Equations
- Spatial.Path.IsTerminative R γ = (γ ⁻¹' R = {⊤} ∧ ⊥ ≠ ⊤)
Instances For
An egressive path is inside R at its start only, as a path starting from R is.
Equations
- Spatial.Path.IsEgressive R γ = (γ ⁻¹' R = {⊥} ∧ ⊥ ≠ ⊤)
Instances For
A prolative path is inside R throughout, as a path along R is.
Equations
- Spatial.Path.IsProlative R γ = ∀ (i : ι), γ i ∈ R
Instances For
An approximative path is outside R throughout and nearer to it by d at each later
position, as a path towards R is.
Equations
- Spatial.Path.IsApproximative R γ d = ((∀ (i : ι), γ i ∉ R) ∧ StrictAnti (d ∘ γ))
Instances For
A recessive path is outside R throughout and farther from it by d at each later position,
as a path away from R is.
Equations
- Spatial.Path.IsRecessive R γ d = ((∀ (i : ι), γ i ∉ R) ∧ StrictMono (d ∘ γ))
Instances For
HasShape d R γ s says that γ has shape s relative to R, d measuring nearness to
it.
Equations
- Spatial.Path.HasShape R γ d Spatial.Path.Shape.cofinal = Spatial.Path.IsCofinal R γ
- Spatial.Path.HasShape R γ d Spatial.Path.Shape.coinitial = Spatial.Path.IsCoinitial R γ
- Spatial.Path.HasShape R γ d Spatial.Path.Shape.transitive = Spatial.Path.IsTransitive R γ
- Spatial.Path.HasShape R γ d Spatial.Path.Shape.terminative = Spatial.Path.IsTerminative R γ
- Spatial.Path.HasShape R γ d Spatial.Path.Shape.egressive = Spatial.Path.IsEgressive R γ
- Spatial.Path.HasShape R γ d Spatial.Path.Shape.approximative = Spatial.Path.IsApproximative R γ d
- Spatial.Path.HasShape R γ d Spatial.Path.Shape.recessive = Spatial.Path.IsRecessive R γ d
- Spatial.Path.HasShape R γ d Spatial.Path.Shape.prolative = Spatial.Path.IsProlative R γ
Instances For
A terminative path is cofinal.
No path is both cofinal and coinitial.
A path keeps its shape under reparametrization by an order isomorphism.
Traversing a path the other way, on the dual order of positions, reverses its shape.
Sequences of places as parametrized paths #
Equations
Localization #
The part of the reference object a spatial expression localizes in, orthogonal to the direction.
- interior : Localization
The interior, as of in, into and out of.
- surface : Localization
The surface, as of on, onto and off.
- exterior : Localization
The exterior, as of at, to and from.
Instances For
Equations
- Spatial.instDecidableEqLocalization x✝ y✝ = if h : x✝.ctorIdx = y✝.ctorIdx then isTrue ⋯ else isFalse ⋯
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Spatial.instReprLocalization = { reprPrec := Spatial.instReprLocalization.repr }
Equations
- Spatial.instFintypeLocalization = { elems := { val := ↑Spatial.Localization.enumList, nodup := Spatial.Localization.enumList_nodup }, complete := Spatial.instFintypeLocalization._proof_1 }
The spatial trace of an event domain E, which sends each event to the path its theme
traverses.
- σ : E → Spatial.Path Loc
The path traversed in an event.