Docs / Semantics / Tense / Allen

Allen's interval relations

import Linglib.Semantics.Tense.Allen · namespace Allen

This file defines the relations between closed intervals of a linear order Allen 1983, extended to point intervals. How one interval stands to another is the order type of their four endpoints, recorded as the comparisons among them, and the relations are the comparisons that two intervals realize, twenty-six in all. A cell is a set of relations, and cells have converses, composites and chains.

Main definitions

Main results

Implementation notes

A relation records whether each interval is a point; with the four cross comparisons alone composition is not exact. The composite of two cells is read off the intervals among six points, placing a second interval only beside first intervals that stand to it in the first cell, which keeps it small enough for decide +kernel. It and the named cells are irreducible, so that elaboration, which never needs their values, does not compute them.

References

  • Allen 1983, Maintaining Knowledge about Temporal Intervals

Declarations

The comparisons among the endpoints of two intervals: the first interval's start and end against the second's start and end, and each interval's start against its own end, lt for a proper interval and eq for a point.

structure ComparisonsL68–84
  • fstFst : Ordering

    The first interval's start against the second's start.

  • fstSnd : Ordering

    The first interval's start against the second's end.

  • sndFst : Ordering

    The first interval's end against the second's start.

  • sndSnd : Ordering

    The first interval's end against the second's end.

  • firstShape : Ordering

    The first interval's start against its end.

  • secondShape : Ordering

    The second interval's start against its end.

Derives DecidableEq, Repr.

Used by ofEndpoints, Comparisons.swap, Comparisons.swap_swap, realizable, Comparisons.swap_mem_realizable, Relation

L90–93
L115–121

A relation is how one interval of a linear order stands to another: comparisons among the endpoints of two intervals that some two intervals realize.

structure RelationL129–133
extends Comparisons :

Built from ,

Used by Relation.ext, Relation.ext_iff, Relation.instDecidableEq, Relation.equivRealizable, Relation.instFintype, Relation.inv, Relation.inv_inv, card_relation, relation, toSetRel, mem_toSetRel, instDecidableMemProdNonemptyIntervalSetRelToSetRelMk, toSetRel_mono, exists_relation_eq, forall_toSetRel_subset_iff, inv, mem_inv, inv_inv, toSetRel_inv, comp, mem_comp, toSetRel_comp_subset, toSetRel_comp, image_toSetRel_subset_comp, image_toSetRel_comp, precedes, isBefore, le, lt, overlaps, startsWithin, finalSubinterval, nonfinalSubinterval, Relation.position, ofPosition, relation_mem_filter, eq, pure, HoldsAlong, instDecidableHoldsAlong, compAlong, HoldsAlong.mem_compAlong, mem_compAlong_iff

Used in Fragments/Manambu/Clause, Semantics/Aspect/Viewpoint, Semantics/Tense/Perspective, Syntax/Clause/Chaining, AnandToosarvandani2019 and 5 more

L153

There are twenty-six relations: Allen's thirteen between proper intervals, five between a point and a proper interval, five between a proper interval and a point, and three between points.

theorem card_relationL157–160
:
Fintype.card Relation = 26

Built from

The relation of two intervals

The relation of the interval i to the interval j.

def relationL168–170
{T : Type u_1} [LinearOrder T] (i j : NonemptyInterval T) :
  • relation i j = { toComparisons := ofEndpoints i.toProd.1 i.toProd.2 j.toProd.1 j.toProd.2, mem_realizable := ⋯ }

Built from ,

Used by toComparisons_relation, relation_map, toSetRel, mem_toSetRel, exists_relation_eq, inv_relation, relation_eq_of_mem_partialIso, exists_partialIso_of_relation_eq, mem_comp, position_relation, relation_mem_filter, relation_mem_precedes, relation_mem_isBefore, relation_mem_le, relation_mem_lt, relation_mem_overlaps, relation_mem_startsWithin, relation_mem_finalSubinterval, relation_mem_nonfinalSubinterval, relation_mem_ofPosition, relation_mem_eq, relation_mem_pure

Used in Fragments/Manambu/Clause, Aikhenvald2008

The relation of two intervals survives an order embedding.

theorem relation_mapL175–183
{T : Type u_1} [LinearOrder T] {β : Type u_2} [LinearOrder β] (f : T ↪o β) (i j : NonemptyInterval T) :
relation (NonemptyInterval.map f.toOrderHom i) (NonemptyInterval.map f.toOrderHom j) = relation i j

Built from

The relation of a cell relates an interval to the intervals that stand to it in one of the cell's relations, as the relation of a comparison cell relates a perspective time to the reference times its tense allows.

def toSetRelL185–189
{T : Type u_1} [LinearOrder T] (C : Finset Relation) :
SetRel (NonemptyInterval T) (NonemptyInterval T)
  • toSetRel C = {p : NonemptyInterval T × NonemptyInterval T | relation p.2 p.1 ∈ C}

Built from ,

Used by mem_toSetRel, instDecidableMemProdNonemptyIntervalSetRelToSetRelMk, toSetRel_mono, forall_toSetRel_subset_iff, toSetRel_inv, toSetRel_comp_subset, toSetRel_comp, image_toSetRel_subset_comp, image_toSetRel_comp, instIsTransNonemptyIntervalToSetRelPrecedes, toSetRel_precedes_subset_comp_self_iff, toSetRel_precedes_comp_self, HoldsAlong, instDecidableHoldsAlong, HoldsAlong.mem_compAlong, mem_compAlong_iff

Used in Semantics/Aspect/Viewpoint, Semantics/Tense/Perspective, Semantics/Tense/Quantificational, ArreguiKusumoto1998, BonehDoron2013 and 6 more

L193
L202–206

Converse

L231–232

Partial isomorphisms

Mathlib's Order.PartialIso pairs finitely many points of two linear orders that compare alike, so intervals whose endpoints it pairs stand in the same relation.

L252–261
L263–279

The composite of two cells: the relations of an interval to a third compatible with its standing in C to a second that stands in D to the third, read off the intervals among six points. The second interval is placed only beside a first that stands in C to it, so the kernel decides composites of the named cells.

@[irreducible] def compL283–291
(C D : Finset Relation) :
Finset Relation

The definition is too large to print here; read it in the source.

Built from

Used by mem_comp, toSetRel_comp_subset, toSetRel_comp, image_toSetRel_subset_comp, image_toSetRel_comp, comp_precedes_precedes, comp_pure, compAlong

Used in Semantics/Tense/Perspective, Syntax/Clause/Chaining, BonehDoron2013

L293–299

On dense time without endpoints, the composite of two cells' relations is the relation of the composite cell: the middle interval of a configuration of endpoints can be placed between any two intervals that stand as its outer ones do.

theorem toSetRel_compL322–339
{T : Type u_1} [LinearOrder T] {C D : Finset Relation} [DenselyOrdered T] [NoMinOrder T] [NoMaxOrder T] :
(toSetRel C).comp (toSetRel D) = toSetRel (comp D C)

Built from , ,

L341–346

Named cells

The first interval ends before the second starts.

@[irreducible] def precedesL357–359
:
Finset Relation

Built from

Used by comp_precedes_precedes, ofPosition_lt, relation_mem_precedes, instIsTransNonemptyIntervalToSetRelPrecedes, toSetRel_precedes_subset_comp_self_iff, toSetRel_precedes_comp_self

Used in Fragments/Manambu/Clause, Semantics/Tense/Perspective, Semantics/Tense/Quantificational, Aikhenvald2008, AnandToosarvandani2019 and 8 more

L392–395
L421–423
L429–431
L433–435
L437–439
L445–447
L459–461
L463–465

Points

The comparison cells of the tenses are the cells of point intervals.

L502–504
L506–509

Chains

A clause's times form a chain, each related to the one before it by a head's cell.

The intervals tos stand along the cells cs from b: the first stands to b as the first cell says, and each later one to the one before it as the next cell says.

def HoldsAlongL547–552
{T : Type u_1} [LinearOrder T] :
List (Finset Relation) → NonemptyInterval T → List (NonemptyInterval T) → Prop

Built from ,

Used by instDecidableHoldsAlong, HoldsAlong.mem_compAlong, mem_compAlong_iff

Used in Declerck1991, Kratzer1998

L554–562
L575–582

On dense time without endpoints, two times stand in a chain's composite exactly when the chain can be realized from the first to the second.

theorem mem_compAlong_iffL584–601
{T : Type u_1} [LinearOrder T] [DenselyOrdered T] [NoMinOrder T] [NoMaxOrder T] {cs : List (Finset Relation)} {b x : NonemptyInterval T} :
(b, x) ∈ toSetRel (compAlong cs) ↔ ∃ (tos : List (NonemptyInterval T)), HoldsAlong cs b tos ∧ (b :: tos).getLast ⋯ = x

Built from , , ,