<> A DAML Ontology of Time Jerry R. Hobbs with contributions from George Ferguson, James Allen, Pat Hayes, Drew McDermott, Ian Niles, Adam Pease, Austin Tate, and Mabry Tyson March 2003 1. Introduction A number of sites, DAML contractors and others, have developed ontologies of time (e.g., DAML-S, Cycorp, CMU, Kestrel, Teknowledge). A group of us have decided to collaborate to develop a representative ontology of time for DAML, which could then be used as is or elaborated on by others needing such an ontology. It is hoped that this collaboration will result in an ontology that will be adopted much more widely than any single site's product would be. We envision three aspects to this effort: 1. An abstract characterization of the concepts and their properties, expressed in first-order predicate calculus. 2. A translation of the abstract ontology into DAML code, to whatever extent possible given the current state of DAML expressivity. 3. Mappings between the DAML ontology and individual sites' ontologies. DAML is under development and is thus a moving target, and that is why separating 1 and 2 is desirable. Level 1 can stabilize before DAML does. A mapping in 3 may be an isomorphism, or it may be something more complicated. The reason for 3 is so DAML users can exploit the wide variety of resources for temporal reasoning that are available. Moreover, it will aid the widespread use of the ontology if it can be linked easily to, for example, the temporal portion of Teknowledge's IEEE Standard Upper Ontology effort or to Cycorp's soon-to-be widely used knowledge base. The purposes of the temporal ontology are both for expressing temporal aspects of the contents of web resources and for expressing time-related properties of web services. The following document outlines the principal features of a representative DAML ontology of time. It is informed by ontology efforts at a number of sites and reflects but elaborates on a tentative consensus during discussions at the last DAML meeting. The first three areas are spelled out in significant detail. The last three are just sketches of work to be done. There are a number of places where it is stated that the ontology is silent about some issue. This is done to avoid controversial choices in the ontology where more than one treatment would be reasonable and consistent. Often these issues involve identifying a one-dimensional entity and a zero-dimensional entity with one another. In general, functions are used where they are total and have a unique value; predicates are used otherwise. The order of arguments usually follows the subject-object-object of preposition order in the most natural use in an English sentence (except for "Hath", where topicalization applies). A note on notation: We use an extended version of PDDL called Opt (for Ontology with Polymorphic Types; see [[]]). It's essentially predicate calculus with Lisp syntax, like Kif. It differs from Kif in being strongly typed, and in emphasizing the declaration of named domains. Symbols beginning with upper-case letters are type designators or parts thereof, as in Java. As a simple example of what we're going to need, here is a little domain we'll use for minor set-theoretic machinery: <> ) (:functions (card s - Set) - Integer (singleton x - Obj) (union s1 s2 - Set) (set-union s - Set) ;; s is a set of sets; (set-union s) is their union - Set ) (:axioms (forall (x y) (iff (member y (singleton x)) (= y x))) <> )) >> Opt allows for quantification over higher-order objects such as functions and predicates. (In sections 5 and 6.) At the end of each section there is a subsection on MAPPINGS. These are sketches of the relations between some highly developed temporal ontologies and the one outlined here. 2. Topological Temporal Relations 2.1. Instants and Intervals: There are two subclasses of temporal-entity: instant and interval. <> <> <> <> <> <> <> )) >> _begins_ and _ends_ are relations between instants and temporal entities. <> <> <> >> <> <> <> <> <> )) >> For convenience, we can say that the beginning and end of an instant is itself. <> The beginnings and ends of temporal entities, if they exist, are unique. <> As will be seen in Section 2.4, in one approach to infinite intervals, a positively infinite interval has no end, and a negatively infinite interval has no beginning. Hence, we use the relations "begins" and "ends" in the core ontology, rather than defining functions "beginning-of" and "end-of", since the functions would not be total. They can be defined in an extension of the core ontology that posits instants at positive and negative infinity. _inside_ is a relation between an instant and an interval. <> This concept of inside is not intended to include beginnings and ends of intervals, as will be seen below. It will be useful in characterizing clock and calendar terms to have a relation between instants and intervals that says that the instant is inside or the beginning of the interval. <> <> time-between is a relation among a temporal entity and two instants. <> <> The ontology is silent about whether the time from t to t, if it exists, is identical to the instant t. The ontology is silent about whether intervals _consist of_ instants. The core ontology is silent about whether intervals are uniquely determined by their beginnings and ends. This issue is dealt with in Section 2.4. We can define a proper-interval as one whose beginning and end are not identical. <> A half-infinite or infinite interval, by this definition, is proper. The ontology is silent about whether there are any intervals that are not proper intervals. 2.2. Before: <> <> <> <> <> <> <> )) >> There is a before relation on temporal entities, which gives directionality to time. If temporal-entity T1 is before temporal-entity T2, then the end of T1 is before the beginning of T2. Thus, before can be considered to be basic to instants and derived for intervals. <> <> The before relation is anti-reflexive, anti-symmetric and transitive. <> The end of an interval is not before the beginning of the interval. <> The beginning of a proper interval is before the end of the interval. <> The converse of this is a theorem. (forall (t1 t2 - Instant tv - Interval) (if (and (begins t1 tv) (ends t2 tv) (before t1 t2)) (is Proper-interval tv))) If one instant is before another, there is a time between them. <> The ontology is silent about whether there is a time from t to t. If an instant is inside a proper interval, then the beginning of the interval is before the instant, which is before the end of the interval. This is the principal property of "inside". <> The converse of this condition is called Convexity and is discussed in Section 2.4. The relation "after" is defined in terms of "before". <> The basic ontology is silent about whether time is linearly ordered. Thus it supports theories of time, such as the branching futures theory, which conflate time and possibility or knowledge. This issue is discussed further in Section 2.4. The basic ontology is silent about whether time is dense, that is, whether between any two instants there is a third instant. Thus it supports theories in which time consists of discrete instants. This issue is discussed further in Section 2.4. 2.3. Interval Relations: <> <> <> <> )) >> The relations between intervals defined in Allen's temporal interval calculus (Allen, 1984; Allen and Kautz, 1985; Allen and Hayes, 1989; Allen and Ferguson, 1997) can be defined in a relatively straightforward fashion in terms of "before" and identity on the beginning and end points. It is a bit more complicated than the reader might at first suspect, because allowance has to be made for the possibility of infinite intervals. Where one of the intervals could be infinite, the relation between the end points has to be conditionalized on their existence. <> The standard interval calculus assumes all intervals are proper, and we will do that here too. The definitions of the interval relations in terms of "before" relations among their beginning and end points, when they exist, are given by the following axioms. In these axioms, t1 and t2 are the beginning and end of interval T1; t3 and t4 are the beginning and end of T2. <> The inverse interval relations can be defined in terms of these relations. <> In addition, it will be useful below to have a single predicate for "starts or is during". This is called "starts-or-during". <> It will also be useful to have a single predicate for intervals intersecting in at most an instant. <> So far, the concepts and axioms in the ontology of time would be appropriate for scalar phenomena in general. 2.4. Optional Extensions: In the basic ontology we have tried to remain neutral with respect to controversial issues, while producing a consistent and useable axiomatization. In specific applications one may want to have stronger properties and thus take a stand on some of these issues. In this section, we describe some options, with the axioms that would implement them. These axioms and any subsequent theorems depending on them are prefaced with a 0-argument proposition that says the option is being exercised. Thus the axiom for total ordering is prefaced by the proposition (if (total-order) ...) Then to adopt the option of total ordering, one merely has to assert (total-order) <> Notice that we do not treat the possibility of time being finite (in the past or the future or both). We assume it is infinite in both directions, although, as we well see, there is more than one way to represent these infinities. <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> )) <> >> Total or Linear Ordering: In many applications, if not most, it will be useful to assume that time is linearly or totally ordered. The axiom that expresses this is as follows: <> This eliminates models of time with branching futures and other conflations of time and possibility. In models with branching time, it is often the case that time can branch only into the future: <> It is quite plausible that the past really is totally ordered, unless certain esoteric interpretations of quantum mechanics are correct, but there are idealized domains in which it's useful to relax this assumption. In automated planning, actions that commute may be done in either order, so that (result (result s0 (stack block-1 block-2)) (stack block-3 block-4)) and (result (result s0 (stack block-3 block-4)) (stack block-1 block-2)) are the same Instant. In that case, this Instant has two unordered Instants in its past: (result s0 (stack block-1 block-2)) and (result s0 (stack block-3 block-4)) Infinity: There are two common ways of allowing infinitely long intervals. Both are common enough that it is worth a little effort to construct the time ontology in a way that accommodates both. The statements of the axioms have been complicated modestly in order to localize the difference between the two approaches to the choice between two pairs of simple existence axioms, which are themselves conditioned on 0-argument propositions indicating the choice of that option. In the first approach, one posits time instants at positive and negative infinity. Half-infinite intervals are then intervals that have one of these as an endpoint. Rather than introduce constants for these in the core ontology, we will have two predicates -- "posinf" and "neginf" -- which are true of only these points. The 0-argument proposition corresponding to the choice of this approach will be (pts-at-inf). <> In the second approach, there are distinct intervals that have no beginning and/or end. "posinf-interval(T)" says that T is a half-infinite interval with no end. "neginf-interval(T)" says that T is a half-infinite interval with no beginning. <> Some care must be taken about the meaning of the points at infinity, when there are any. If time is branching, then at many (perhaps all) time instants there are multiple alternative futures. For this statement to have a nontrivial meaning, there must be different facts true at different instants or over different intervals. (See Section 2.5.) Hence there cannot be a single point at infinity that terminates all positive-half-infinite intervals, because there would be no consistent way to assign truth values to propositions at that point. If (totally-ordered-past) is true, then there could in principle be a unique negative infinite point, but we will forgo the opportunity to make such subtle distinctions. <> The principal property of the point at positive infinity is that every other instant is before it. <> The next axiom entails that there are infinitely many instants after any given instant other than a point at positive infinity. <> Note that these two axioms are valid in an approach that does not admit a point at positive infinity; the inner antecedent of Axiom 2.4-4 will never be satisfied, and the antecedent of Axiom 2.4-5 will always be satisfied, guaranteeing that after every instant there will be another instant. The principal property of the point at negative infinity is that it is before every other instant. <> The next axiom entails that there are infinitely many instants before any given instant other than the point at negative infinity. <> Likewise these axioms are valid in an approach that does not admit a point at negative infinity. In the second approach instants at positive and negative infinity are not posited, but intervals can have the properties "posinf-interval" and "neginf-interval". <> An instant inside a positive half-infinite interval has infinitely many instants after it. <> This axiom is valid in the first approach as well, since "posinf-interval" will never be true and the antecedent will never be satisfied. Corresponding to Axiom 2.4-9 is the following axiom for "neginf-interval": <> It may be useful to have two more predicates. An interval is (at least) a half-infinite interval if either "posinf-interval" or "neginf-interval" is true of it. <> An interval is an infinite interval if it is both positively and negatively infinite. <> Finally for the core ontology, we probably want to stipulate that one either uses the "posinf" approach or the "posinf-interval" approach. This is accomplished by the following axiom. <> Similarly, <> Note that this allows us to use one approach for negative infinity and the other for positive infinity. This completes the treatment of infinite time in the core ontology. To specify that we are using the first approach, we would add the following two axioms: <> That is, there are instants out at positive and negative infinity, respectively, when the Points at Infinity approach is taken. Again, to adopt this approach, simply assert (pts-at-inf) When one adopts this approach, one can also, for convenience, extend the language to include the two constants, PositiveInfinity and NegativeInfinity, where <> <> >> One can also extend the language to include the functions "beginning-of" and "end-of", defined as follows: <> <> We stipulated the uniqueness of "begins" and "ends" in Section 2.1, and Axioms 2.4-13 and 2.4-14 rule out intervals with no beginnings or ends, so the functions will be total. We package all this in a sub-domain of 'daml-time'. <> <> (:axioms ;; Axiom "2.4-21" (pts-at-inf) <> ;; Axiom "2.4-22" (not (branching-time)))) >> To specify that we are using the second approach, we would work in the following sub-domain: <> <> Suppose we wish to map between the two ontologies. Suppose the predicates and constants in the theory using the first approach are subscripted with 1 and the predicates in the theory using the second approach are subscripted with 2. The domains of the two theories are the same. All predicates and functions of the two theories are equivalent with the exception of "begin", "ends", "beginning-of", "end-of", "posinf", "neginf", "posinf-interval", and "neginf-interval". These are related by the following two articulation axioms. ;; Axiom "2.4-26" (forall (tv - Interval) (iff (posinf1 (end-of1 tv)) (posinf-interval2 tv))) ;; Axiom "2.4-27" (forall (tv - Interval) (iff (neginf1 (beginning-of1 tv)) (neginf-interval2 tv))) Density: In some applications it is useful to have the property of density, that is, the property that between any two distinct instants there is a third distinct instant. The axiom for this is as follows, where the 0-argument predicate indicating the exercising of this option is "(dense-time)": <> This is weaker than the mathematical property of continuity, which we will not axiomatize here. If time is totally ordered and continuous, it is isomorphic to the real numbers. Convexity: In Section 2.4 we gave axiom 2.2-10: (forall (ts - Instant tv - Interval b e - Instant) (if (inside ts tv) (and (if (begins b tv) (before b ts)) (if (ends e tv) (before ts e))))) The converse of this condition is called Convexity and may be stronger than some users will want if they are modeling time as a partial ordering. (See Esoteric Note below.) To choose the option of Convexity, simply assert the 0-argument proposition "(time-intervals-convex)". <> In the rest of this development anny property that depends on Convexity will be conditioned on the proposition "(time-intervals-convex)". Convexity implies that intervals are contiguous with respect to the before relation, in that an instant between two other instants inside an interval is also inside the interval. (if (time-intervals-convex) (forall (ti1 ti2 ti3 tv) (if (and (before ti1 ti2) (before ti2 ti3) (inside ti1 tv) (inside ti3 tv)) (inside ti2 tv)))) Extensional Collapse: In the standard development of interval calculus, it is assumed that any intervals that are int-equals are identical. That is, intervals are uniquely determined by their beginning and end points. We can call this the property of Extensional Collapse, and indicate it by the 0-argument proposition (time-intervals-extensional). <> If we think of different intervals between the end points as being different ways the beginning can lead to the end, then Extensional Collapse can be seen as collapsing all these into a single "before" relation. In the rest of this development we will point it out whenever any concept or property depends on Extensional Collapse. {< Dissenting remark: The following note is too esoteric for me. It talks about "partially ordered" time, when everywhere else we talk about "branching" time, with the understanding that time might branch into the future. Applications for branching into the past are extremely rare, the only cases being those that arise in the commonsense temporal theories of preliterate peoples. It seems to be an axiom of modern thinking that any two events in the past occurred in some order, though we may never know what it is. I would urge us to drop nonextensionality and nonconvexity as possibilities. -- dvm >} Esoteric Note: Convexity, Extensional Collapse, and Total Ordering are independent properties. This can be seen by considering the following four models based on directed graphs, where the arcs define the before relation: 1. An interval is any subset of the paths between two nodes. (For example, time is partially ordered and an interval is any path from one node to another.) 2. An interval is the complete set of paths between two nodes. 3. An interval consists of the beginning and end nodes and all the arcs between the beginning and end nodes but no intermediate nodes. So (inside ti tv) is never true. (This is a hard model to motivate.) 4. The instants are a set of discrete, linearly ordered nodes. There are multiple arcs between the nodes. The intervals are paths from one node to another, including the nodes. (For example, the instants may be the successive states in the situation calculus and the intervals sequences of actions mapping one state into the next. Different actions can have the same start and end states.) Model 1 has none of the three properties. Model 2 has Convexity and Extensional Collapse, but is not Totally Ordered. Model 3 is Totally Ordered and has Extensional Collapse but not Convexity. Model 4 is Totally Ordered and Convex, but lacks Extensional Collapse. 2.5. Linking Time and Events: The time ontology links to other things in the world through four predicates -- at-time, during, holds, and time-span. We assume that another ontology provides for the description of events -- either a general ontology of event structure abstractly conceived, or specific, domain-dependent ontologies for specific domains. The term "eventuality" will be used to cover events, states, processes, propositions, states of affairs, and anything else that can be located with respect to time. The possible natures of eventualities would be spelled out in the event ontologies. The term "eventuality" in this document is only an expositional convenience and has no formal role in the time ontology. <> ) (:axioms <> <> )) >> The predicate at-time relates an eventuality to an instant, and is intended to say that the eventuality holds, obtains, or is taking place at that time. The predicate during relates an eventuality to an interval, and is intended to say that the eventuality holds, obtains, or is taking place during that interval. If an eventuality obtains during an interval, it obtains at every instant inside the interval. <> Whether a particular process is viewed as instantaneous or as occuring over an interval is a granularity decision that may vary according to the context of use, and is assumed to be provided by the event ontology. <> Often the eventualities in the event ontology are best thought of as propositions, and the relation between these and times is most naturally called "holds". "holds(e,T)" would say that e holds at instant T or during interval T. The predicate "holds" would be part of the event ontology, not part of the time ontology, although its second argument would be be provided by the time ontology. The designers of the event ontology may or may not want to relate "holds" to "at-time" and "during" by axioms such as the following: <> Similarly, the event ontology may provide other ways of linking events with times, for example, by including a time parameter in predications. (p x t) The time ontology provides ways of reasoning about the t's; their use as arguments of predicates from another domain would be a feature of the ontology of the other domain. <> (The type (Alt y1 y2) is the type of objects that are either of type y1 or type y2.) The predicate time-span relates eventualities to instants or intervals. For contiguous states and processes, it tells the entire instant or interval for which the state or process obtains or takes place. In Section 6 we will develop a treatment of discontinuous temporal sequences, and it will be useful to remain open to having these as time spans of eventualities as well. <> Whether the eventuality obtains at the beginning and end points of its time span is a matter for the event ontology to specify. The silence here on this issue is the reason "time-span" is not defined in terms of necessary and sufficient conditions. The event ontology could extend temporal functions and predicates to apply to events in the obvious way, e.g., (forall (ti - Instant tv - Interval e - Eventuality) (iff (ev-begins ti e) (and (time-span tv e) (begins ti tv)))) This would not be part of the time ontology, but would be consistent with it. Different communities have different ways of representing the times and durations of states and events (processes). In one approach, states and events can both have durations, and at least events can be instantaneous. In another approach, events can only be instantaneous and only states can have durations. In the latter approach, events that one might consider as having duration (e.g., heating water) are modeled as a state of the system that is initiated and terminated by instantaneous events. That is, there is the instantaneous event of the beginning of the heating at the beginning of an interval, that transitions the system into a state in which the water is heating. The state continues until another instantaneous event occurs---the stopping of the heating at the end of the interval. These two perspectives on events are straightforwardly interdefinable in terms of the ontology we have provided. This is a matter for the event ontology to specify. This time ontology is neutral with respect to the choice. MAPPINGS: Teknowledge's SUMO has pretty much the same ontology as presented here, though the names are slightly different. An instant is a TimePoint, an interval is a TimeInterval, beginning-of is BeginFn, and so on. SUMO implements the Allen calculus. Cyc has functions #startingPoint and #endingPoint that apply to intervals, but also to eventualities. Cyc implements the Allen calculus. Cyc uses a holdIn predicate to relate events to times, but to other events as well. Cyc defines a very rich set of derived concepts that are not defined here, but could be. For instant Kestrel uses Time-Point, for interval they use Time-Interval, for beginning-of they use start-time-point, and so on. PSL axiomatizes before as a total ordering. 3. Measuring Durations 3.1. Temporal Units: This development assumes ordinary arithmetic is available. <> There are at least two approaches that can be taken toward measuring intervals. The first is to consider units of time as functions from Intervals to Reals. Because of infinite intervals, the range must also include Infinity. <> ) (:functions (seconds int - Interval) (minutes int - Interval) (hours int - Interval) (days int - Interval) (weeks int - Interval) (months int - Interval) (years int - Interval) - Number <> ) <> (:axioms <> <> <> <> <> )) >> So (minutes [5:14,5:17]) = 3 The other approach is to consider temporal units to constitute a set of entities -- call it TemporalUnits -- and have a single function _duration_ mapping Intervals x TemporalUnits into the Reals. <> So (duration [5:14,5:17], *minute*) = 3 The two approaches are interdefinable: <> Ordinarily, the first is more convenient for stating specific facts about particular units. The second is more convenient for stating general facts about all units. The temporal units are as follows: <> The arithmetic relations among the various units are as follows: <> The relation between days and months (and, to a lesser extent, years) will be specified as part of the ontology of clock and calendar below. On their own, however, month and year are legitimate temporal units. In this development durations are treated as functions on intervals and units, and not as first class entities on their own, as in some approaches. In the latter approach, durations are essentially equivalence classes of intervals of the same length, and the length of the duration is the length of the members of the class. The relation between an approach of this sort (indicated by prefix d-) and the one presented here is straightforward. (forall (tv - Interval u - Temporal-unit n - Number) (if (not (= u month)) (iff (= (duration tv u) n) (exists (d - Set) (and (= (d-duration-of tv) d) (forall (t2) (iff (member t2 d) (= (duration d u) n)))))))) {< I've changed this from Jerry's original. For one thing, I don't think his version works for months, which are not all the same length. -- dvm >} At the present level of development of the temporal ontology, this extra layer of representation seems superfluous. It may be more compelling, however, when the ontology is extended to deal with the combined durations of noncontiguous aggregates of intervals. 3.2. Concatenation and Hath: The multiplicative relations above don't tell the whole story of the relations among temporal units. Temporal units are _composed of_ smaller temporal units. A larger temporal unit is a concatenation of smaller temporal units. We will first define a general relation of concatenation between an interval and a set of smaller intervals. Then we will introduce a predicate "Hath" that specifies the number of smaller unit intervals that concatenate to a larger interval. <> Concatenation: A proper interval x is a concatenation of a set S of proper intervals if and only if S covers all of x, and all members of S are subintervals of x and are mutually disjoint. (The third conjunct on the right side of <--> is because begins-or-in covers only beginning-of and inside.) <> <> )) >> The following properties of "concatenation" can be proved as theorems: There are elements in S that start and finish x: <> Except for the first and last elements of S, every element of S has elements that precede and follow it. These theorems depend on the property of Convexity. <> The uniqueness ('exists!') follows from nonoverlap. Hath: The basic predicate used here for expressing the composition of larger intervals out of smaller temporal intervals of unit length is "hath", from statements like "30 days hath September" and "60 minutes hath an hour." Its declaration is <> ) >> meaning "N proper intervals of duration one unit u hath the proper interval x." That is, if (halt n u x) holds, then x is the concatenation of n unit intervals where the unit is u. For example, if x is some month of September then "(hath 30 *day* x)" would be true. "hath" is defined as follows: <> That is, x is the concatenation of a set s of n proper intervals of duration one unit u. This treatment of concatenation will work for scalar phenomena in general. This treatment of 'hath' will work for measurable quantities in general. 3.3. The Structure of Temporal Units: We now define predicates true of intervals that are one temporal unit long. For example, "week" is a predicate true of intervals whose duration is one week. <> <> We are now in a position to state the relations between successive temporal units. <> The relations between months and days are dealt with in Section 4.4. MAPPINGS: Teknowledge's SUMO has some facts about the lengths of temporal units in terms of smaller units. Cyc reifies durations. Cyc's notion of time covering subsets aims at the same concept dealt with here with Hath. Kestrel uses temporal units to specify the granularity of the time representation. PSL reifies and axiomatizes durations. PSL includes a treatment of delays between events. A delay is the interval between the instants at which two events occur. 4. Clock and Calendar <> ) (:objects *am* *pm* - AM/PM) (:predicates <> <> <> <> <> <> <> <> <> <> <> ) (:functions <> <> <> <> <> <> ) (:facts (time-intervals-extensional)) (:axioms <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> )) >> 4.1. Time Zones: What hour of the day an instant is in is relative to the time zone. This is also true of minutes, since there are regions in the world, e.g., central Australia, where the hours are not aligned with GMT hours, but are, e.g., offset half an hour. Probably seconds are not relative to the time zone. Days, weeks, months and years are also relative to the time zone, since, e.g., 2002 began in the Eastern Standard time zone three hours before it began in the Pacific Standard time zone. Thus, predications about all clock and calendar intervals except seconds are relative to a time zone. This can be carried to what seems like a ridiculous extreme, but turns out to yield a very concise treatment. The Common Era (C.E. or A.D.) is also relative to a time zone, since 2002 years ago, it began three hours earlier in what is now the Eastern Standard time zone than in what is now the Pacific Standard time zone. What we think of as the Common Era is in fact 24 (or more) slightly displaced half-infinite intervals. (We leave B.C.E. to specialized ontologies.) The principal functions and predicates will specify a clock or calendar unit interval to be the nth such unit in a larger interval. The time zone need not be specified in this predication if it is already built into the nature of the larger interval. That means that the time zone only needs to be specified in the largest interval, that is, the Common Era; that time zone will be inherited by all smaller intervals. Thus, the Common Era can be considered as a function from time zones (or "time standards", see below) to intervals. <> Fortunately, this counterintuitive conceptualization will usually be invisible and, for example, will not be evident in the most useful expressions for time, in Section 4.5 below. In fact, the common-era predication functions as a good place to hide considerations of time zone when they are not relevant. (The BCE era is similarly time- zone- dependent, although this will almost never be relevant.) Esoteric Aside: Strictly speaking, the use of common-era as a function depends on Extensional Collapse. If we don't want to assume that, then we can use a corresponding predicate -- is-common-era(e,z) -- to mean era e is the Common Era in time zone z. We have been refering to time _zones_, but in fact it is more convenient to work in terms of what we might call the "time standard" that is used in a time zone. That is, it is better to work with *PST* as a legal entity than with the *PST* zone as a geographical region. A time standard is a way of computing the time, relative to a world-wide system of computing time. For each time standard, there is a zone, or geographical region, and a time of the year in which it is used for describing local times. Where and when a time standard is used have to be axiomatized, and this involves interrelating a time ontology and a geographical ontology. These relations can be quite complex. Only the entities like *PST* and *EDT*, the time standards, are part of the _time_ ontology. If we were to conflate time zones (i.e., geographical regions) and time standards, it would likely result in problems in several situations. For example, the Eastern Standard zone and the Eastern Daylight zone are not identical, since most of Indiana is on Eastern Standard time all year. The state of Arizona and the Navajo Indian Reservation, two overlapping geopolitical regions, have different time standards -- one is Pacific and one is Mountain. Time standards that seem equivalent, like Eastern Standard and Central Daylight, should be thought of as separate entities. Whereas they function the same in the time ontology, they do not function the same in the ontology that articulates time and geography. For example, it would be false to say those parts of Indiana shift in April from Eastern Standard to Central Daylight time. In this treatment it will be assumed there is a set of entities called time standards. Some relations among time standards are discussed in Section 4.5. 4.2. Clock and Calendar Units: The aim of this section is to explicate the various standard clock and calendar intervals. A day as a calender interval begins at and includes midnight and goes until but does not include the next midnight. By contrast, a day as a duration is any interval that is 24 hours in length. The day as a duration was dealt with in Section 3. This section deals with the day as a calendar interval. Including the beginning but not the end of a calendar interval in the interval may strike some as arbitrary. But we get a cleaner treatment if, for example, all times of the form 12:xx a.m., including 12:00 a.m. are part of the same hour and day, and all times of the form 10:15:xx, including 10:15:00, are part of the same minute. It is useful to have three ways of saying the same thing: the clock or calendar interval y is the nth clock or calendar interval of type u in a larger interval x. This can be expressed as follows for minutes: (minit y n x) where <> If the property of Extensional Collapse holds, then y is uniquely determined by n and x, it can also be expressed as follows: (= (minitFn n x) y) where <> denotes the nth minute in interval x. For stating general properties about clock intervals, it is useful also to have the following way to express the same thing: <> This predicate says that y is the nth clock interval of type u in x. For example, the proposition "(clock-int 10:03 3 *minute* [10:00,11:00])" holds. Here u can be a member of the set of clock units, that is, one of *second*, *minute*, or *hour*. In addition, there is a calendar unit function with similar structure: <> This says that y is the nth calendar interval of type u in x. For example, the proposition "(cal-int 12Mar2002 12 *day* mar2002)" holds. Here u can be one of the calendar units *day*, *week*, *month*, and *year*. We have several other predicates like "minit": <> <> and these related functions: <> <> and the following relations among various symbols introduced so far: <> Weeks and months are dealt with separately below. We can also make use of the following function <> which denotes the n'th subinterval of size u in interval x, thus generalizing secFn, yrFn, etc. This predicate is described with these axioms: <> The am/pm designation of hours is represented by the function hr12. <> A distinction is made above between clocks and calendars because they differ in how they number their unit intervals. The first minute of an hour is labelled with 0; for example, the first minute of the hour [10:00,11:00) is 10:00. The first day of a month is labelled with 1; the first day of March is March 1. We number minutes for the number just completed; we number days for the day we are working on. Thus, if the larger unit has N smaller units, the argument n in clock-int runs from 0 to N-1, whereas in cal-int n runs from 1 to N. To state properties true of both clock and calendar intervals, we can use the predicate cal-int and relate the two notions with the axiom <> Note that the Common Era is a calendar interval in this sense, since it begins with 1 C.E. and not 0 C.E. In (cal-int y n u x), we allow x to be any interval, not just a calendar interval. When x does not begin at the beginning of a calendar unit of type u, we take y to be the nth _full_ interval of type u in x. Thus, the first year of World War II, in this sense, is 1940, the first full year, and not 1939, the year it began. The first week of the year will be the first full week. We can express this constraint as follows: <> Each of the calendar intervals is that unit long; for example, a calendar year is a year long. <> There are properties relating to the labelling of clock and calendar intervals. If N u's hath x and y is the nth u in x, then n is between 1 and N. <> There is a 1st small interval, and it starts the large interval. <> There is an Nth small interval, and it finishes the large interval. <> All but the last small interval have a small interval that succeeds and is met by it; all but the first small interval have a small interval that precedes and meets it. <> 4.3. Weeks A week is any seven consecutive days. A calendar week, by contrast, according to a commonly adopted convention, starts at midnight, Saturday night, and goes to the next midnight, Saturday night. There are 52 weeks in a year, but there are not usually 52 calendar weeks in a year. Weeks are independent of months and years. However, we can still talk about the nth week in some larger period of time, e.g., the third week of the month or the fifth week of the semester. So the same three modes of representation are appropriate for weeks as well. <> As it happens, the n and x arguments will often be irrelevant, when we only want to say that some period is a calendar week. The day of the week is a calendar interval of type *Day*. The nth day-of-the-week in a week is the nth day in that interval. <> The days of the week have special names in English. <> <> For example, (Sunday y x) says that y is the Sunday of week x. Since a day of the week is also a calendar day, it is a theorem that it is a day long. (forall (y x - Proper-interval n - Integer) (if (dayofweek y n x) (day y))) One correspondence will anchor the cycle of weeks to the rest of the calendar, for example, saying that January 1, 2002 was the Tuesday of some week x. <> We can define weekdays and weekend days as follows: <> <> 4.4. Months and Years The months have special names in English. <> <> The number of days in a month have to be spelled out for individual months. <> The definition of a leap year is as follows: <> <> We leave leap seconds to specialized ontologies. Now the number of days in February can be specified. <> A reasonable approach to defining month as a unit of temporal measure would be to specify that the beginning and end points have to be on the same days of successive months. The following rather ugly axiom captures this. <> The last disjunct takes care of months spanning December and January. So the month as a measure of duration would be related to days as a measure of duration only indirectly, mediated by the calendar. It is possible to prove that months are between 28 and 31 days. To say that July 4 is a holiday in the United States one could write (forall (d m y) (if (and (da d 4 m) (july m y)) (holiday d united-states))) Holidays like Easter can be defined in terms of this ontology coupled with an ontology of the phases of the moon. Other calendar systems could be axiomatized similarly. and the BCE era could also be axiomatized in this framework. These are left as exercises for interested developers. 4.5. Time Stamps: Standard notation for times list the year, month, day, hour, minute, and second. It is useful to define a predication for this. <> <> {< "Alternatively (and not assuming Extensional Collapse), ... " but I have assumed it -- dvm >} For example, an instant ti has the time 5:14:35pm PST, Wednesday, February 6, 2002 if the following properties hold for ti: (time-of ti 2002 2 6 17 14 35 *pst*) (exists (w x) (and (begins-or-in ti w) (wednesday w x))) The second line says that ti is in the Wednesday w of some week x. The relations among time zones can be expressed in terms of the "time-of" predicate. Two examples are as follows: (if (< h 8) (iff (time-of ti y m d h n s *gmt*) (time-of ti y m d-1 (+ h 16) n s *pst*))) (if (>= h 8) (iff (time-of ti y m d h n s *gmt*) (time-of ti y m d h-8 n s *pst*))) (iff (time-of ti y m d h n s *est*) (time-of ti y m d h n s *cdt*)) The "time-of" predicate will be convenient for doing temporal arithmetic. The predicate "time-of" has 8 arguments. It will be convenient in cases where exact times are not known or don't need to be specified to have functions that identify each of the slots of a time description. These functions are also useful for partial implementations of the time ontology in versions of DAML based on description logic, such as DAML+OIL. We introduce functions that allow "time-of" to be expressed as a collection of values of the functions: "second-of", "minute-of", etc. However, these functions cannot be applied to instants directly, since an instant can have many "time-of" predications, one for each time zone and alternate equivalent descriptions involving, for example, 90 minutes versus 1 hour and 30 minutes. Thus, we need an intervening type "Temporal description". <> An instant can have many temporal descriptions, and each temporal description has a unique value for "second-of", "minute-of", etc.Thus, "(time-of ti 2002 2 6 17 14 35 *pst*)", or 5:14:35pm PST, February 6, 2002, would be expressed by asserting of the instant ti the property "(temporal-description-of d ti)", meaning that d is a temporal description of t, and asserting for d the properties "(year-of d) = 2002", "(month-of d) = 2", etc. Coarser granularities on times can be expressed by leaving the finer-grained units unspecified. <> <> These functions can be defined by the following axiom: <> The domain of the function is an entity of type "Temporal-description". The range of the functions is inherited from the constraints on the arguments of "time of". {< I don't know what to make of these axioms. _Every_ term (year-of d1) is equal to _something_, so every temporal description describes an actual time. (a) I don't know if that's actually true. What's the 301st day of the -3rd month of 2003? (b) We can state this axiom much more simply: ;; Axiom "4.5-3" (forall (d - Temporal-description) (exists (ti) (temporal-description-of d ti))) (A d1,y)[year-of(d1) = y --> (E t)[temporal-description(d1,t)]] (A d1,m)[month-of(d1) = m --> (E t)[temporal-description(d1,t)]] (A d1,d)[day-of(d1) = d --> (E t)[temporal-description(d1,t)]] (A d1,h)[hour-of(d1) = h --> (E t)[temporal-description(d1,t)]] (A d1,n)[minute-of(d1) = n --> (E t)[temporal-description(d1,t)]] (A d1,s)[second-of(d1) = s --> (E t)[temporal-description(d1,t)]] (A d1,z)[time-zone-of(d1) = z --> (E t)[temporal-description(d1,t)]] -- dvm >} MAPPINGS: Teknowledge's SUMO distinguishes between durations (e.g., HourFn) and clock and calendar intervals (e.g., Hour). Time zones are treated as geographical regions. The treatment of dates and times via functions follows Cyc's treatment. Kestrel's roundabout attempts to state rather straightforward facts about the clock and calendar are an excellent illustration of the lack of expressivity in DAML+OIL. The ISO standard for dates and times can be represented straightforwardly with the time-of predicate or the unitFn functions. 5. Temporal Granularity Useful background reading for this note includes Bettini et al. (2002), Fikes and Zhou, and Hobbs (1985). Very often in reasoning about the world, we would like to treat an event that has extent as instantaneous, and we would like to express its time only down to a certain level of granularity. For example, we might want to say that the election occurs on November 5, 2002, without specifying the hours, minutes, or seconds. We might want to say that the Thirty Years' War ended in 1648, without specifying the month and day. For the most part, this can be done simply by being silent about the more detailed temporal properties. In Section 2.5 we introduced the predication "(time-span tv e)" relating events to temporal entities, the relation "(temporal-description d tv)" relating a temporal entity to a description of the clock and calendar intervals it is included in, and the functions "(second-of d)", "(minute-of d)", "(hour-of d)", "(day-of d)", "(month-of d)", and "(year-of d)". Suppose we know that an event occurs on a specific day, but we don't know the hour, or it is inappropriate to specify the hour. Then we can specify the day-of, month-of, and year-of properties, but not the hour-of, minute-of, or second-of properties. For example, for the election e, we can say (time-span tx e), (temporal-description d tx), (= (day-of d) 5), (= (month-of d) 11), (= (year-of d) 2002) and no more. We can even remain silent about whether tx is an instant or an interval. Sometimes it may be necessary to talk explicitly about the granularity at which we are viewing the world. For that we need to become clear about what a granularity is, and how it functions in a reasoning system. A granularity G on a set of entities S is defined by an indistinguishability relation, or equivalently, a cover of S, i.e. a set of sets of elements of S such that every element of S is an element of at least one element of the cover. We will identify the granularity G with the cover. <> <> Two elements of S are indistinguishable with respect to G if they are in the same element of G. <> <> ) (:axioms ;; Axiom "5.0-4" (forall (x1 x2 - Object g - Granularity) (iff (indisting x1 x2 g) (exists (s) (and (member s g) (member x1 s) (member x2 s))))) <> <> )) >> A granularity can be a partition of 's', in which case every element of 'g' is an equivalence class. The indistinguishability relation is transitive in this case. A common case of this is where the classes are defined by the values of some given function f. <> <> {< I added the last bit to Jerry's definition, stating that there is a one-to-one correspondence between g and the range of f on s. >} For example, if 's' is the set of descriptions of instants and 'f' is the function "year-of", then 'g' will be a granularity on the time line that does not distinguish between two instants within the same calendar year. The granularities defined by Bettini et al. (2002) are essentially of this nature. They will be discussed further after we have introduced temporal aggregates in Section 6 below. A granularity can also consist of overlapping sets, in which case the indistinguishability relation is not transitive. A common example of this is in domains where there is some distance function d, and any two elements that are closer than a given distance a to each other are indistinguishable. We will suppose d takes two entities and a unit u as its arguments and returns a real number. {< But we haven't defined units in general, only Temporal-units. -- dvm >} <> <> For example, suppose 's' is the set of instants, d is duration of the interval between two instants in units *minute*, and a is 1. Then 'g' will be the granularity on the time line that does not distinguish between instants that are less than a minute apart. Note that this is not transitive, because 9:34:10 is indistinguishable from 9:34:50, which is indistinguishable from 9:35:30, but the first and last are more than a minute apart and are thus distinguishable. Both of these granularities are uniform over the set, but we can imagine wanting variable granularities. Suppose we are planning a robbery. Before the week preceeding the robbery, we may not care what time any events occur. All times are indistinguishable. The week preceeding the robbery we may care only what day events take place on. On the day of the robbery we may care about the hour in which an event occurs, and during the robbery itself we may want to time the events down to ten-second intervals. Such a granularity could be defined as above; the formula would only be more complex. The utility of viewing the world under some granularity is that the task at hand becomes easier to reason about, because distinctions that are possible in the world at large can be ignored in the task. One way of cashing this out in a theorem-proving framework is to treat the relevant indistinguishability relation as equality. This in effect reduces the number of entities in the universe of discourse and makes available rapid theorem-proving techniques for equality such as paramodulation. We can express this assumption with the axiom ;; Axiom "5.0-7" (forall (x1 x2) (if (indisting x1 x2 g) (= x1 x2))) for the relevant g. For a temporal ontology, if 0-length intervals are instants, this axiom has the effect of collapsing some intervals into instants. There are several nearly equivalent ways of viewing the addition of such an axiom -- as a context shift, as a theory mapping, or an an extra antecedent condition. Context shift: In some formalisms, contexts are explicitly represented. A context can be viewed as a set of sentences that are true in that context. Adding axiom 5.0-7 to that set of sentences shifts us to a new context. Theory mapping: We can view each granularity as coinciding with a theory. Within each theory, entities that are indistinguishable with respect to that granularity are viewed as equal, so that, for example, paramodulation can replace equals with equals. To reason about different granularities, there would be a "mediator theory" in which all the constant, function and predicate symbols of the granular theories are subscripted with their granularities. So equality in a granular theory G would appear as the predicate "=_G" in the mediator theory. In the mediator theory paramodulation is allowed with "true" equality, but not with the granular equality relations =_G. However, invariances such as if x =_G y, then [p_G(x) implies p_G(y)] hold in the mediator theory. Extra antecedent condition: Suppose we have a predicate "under-granularity" that takes a granularity as its one argument and is defined as follows: (forall (g) (iff (under-granularity g) (forall (x1 x2) (if (indisting x1 x2 g) (= x1 x2))))) Then we can remain in the theory of the world at large, rather than moving to a subtheory. If we are using a granularity G, rather than proving a theorem P, we prove the theorem under-granularity(g) --> p If the granularity 'g' is transitive, and thus partitions 's', adding axiom 5.0-7 should not get us into any trouble. However, if 'g' is not transitive and consists of overlapping sets, such as the episilon neighborhood granularity, then contradictions can result. When we use 5.0-7 with such a granularity, we are risking contradiction in the hopes of efficiency gains. Such a tradeoff must be judged on a case by case basis, depending on the task and on the reasoning engine used. 6. Aggregates of Temporal Entities 6.1. Describing Aggregates of Temporal Entities In annotating temporal expressions in newspapers, Laurie Gerber encountered a number of problematic examples of temporal aggregates, including expressions like "every 3rd Monday in 2001", "every morning for the last 4 years", "4 consecutive Sundays", "the 1st 9 months of 1997", "3 weekdays after today", "the 1st full day of competition", and "the 4th of 6 days of voting". We have taken these as challenge problems for the representation of temporal aggregates, and attempted to develop convenient means for expressing the possible referents of these expressions. In this section, we will assume the notation of set theory, as described in section 1. Sets and elements of sets will be ordinary individuals, and relations such as "member" will be relations between such individuals. In particular, we will use the relation "member" between an element of a set and the set, and the relation "subset" between two sets. We will use "empty-set" to refer to the empty set. We will use the notation "(singleton x)" for the singleton set containing the element x. The function "card" will map a set into its cardinality. <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> ) (:functions <> ) (:axioms <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> ) ) >> It will be convenient to have a relation "ibefore" that generalizes over several interval and instant relations, covering both "int-before" and "int-meets" for proper intervals. U1 <> <> It will also be useful to have a relation "iinside" that generalizes over all temporal entities and aggregates. We first define a predicate "iinside-1" that generalizes over instants and intervals and covers "int-starts", "int-finishes" and "int-equals" as well as "int-during" for intervals. We break the definition into several cases. <> <> The third disjunct in the definition is for the case of 0-length intervals, should they be allowed and distinct from the corresponding instants. A temporal aggregate is first of all a set of temporal entities, but it has further structure. The relation "ibefore" imposes a natural order on some sets of temporal entities, and we will use the predicate "tseq" to describe those sets. <> That is, a temporal sequence is a set of temporal entities totally ordered by the "ibefore" relation. A temporal sequence has no overlapping temporal entities. It will be useful to have the notion of a temporal sequence whose elements all have a property p. <> <> A uniform temporal sequence is one all of whose members are of equal duration. <> <> The same temporal aggregate can be broken up into a set of intervals in many different ways. Thus it is useful to be able to talk about temporal sequences that are equivalent in the sense that they cover the same regions of time. <> <> That is, s1 and s2 are equivalent temporal sequences when any temporal entity inside one is also inside the other. A minimal temporal sequence is one that is minimal in that its intervals are maximal, so that the number of intervals in minimal. We can view a week as a week or as 7 individual successive days; the first would be minimal. We can go from a nonminimal to a minimal temporal sequence by concatenating intervals that meet. <> <> {< I believe Jerry's version was buggy, and this version is correct. -- dvm >} That is, s is a minimal temporal sequence when any two distinct intervals in s have a temporal entity not in s between them. A temporal sequence s1 is a minimal equivalent temporal sequence to temporal sequence s if s1 is minimal and equivalent to s. <> <> We can now generalize "iinside-1" to the predicate "iinside", which covers both temporal entities and temporal sequences. A temporal entity is "iinside" a temporal sequence if it is "iinside-1" one of the elements of its minimal equivalent temporal sequence. <> <> We can define a notion of "isubset" on the basis of "iinside". <> <> That is, every element of temporal sequence s is inside some element of the minimal equivalent temporal sequence of s0. We can also define a relation of "idisjoint" between two temporal sequences. <> <> That is, temporal sequences s1 and s2 are disjoint if there is no overlap between the elements of one and the elements of the other. {< Actually, the axiom as stated does allow overlap. -- dvm >} The first temporal entity in a temporal sequence is the one that is "ibefore" any of the others. <> <> The predicate "last" is defined similarly. <> <> More generally, we can talk about the nth element of temporal sequence. <> <> That is, the nth element of a temporal sequence has n-1 elements before it. It is a theorem that the first is the nth when n is 1, and that the last is the nth when n is the cardinality of s. (forall (tx s) (iff (first tx s) (nth tx 1 s))) (forall (tx s) (iff (last tx s) (nth tx (card s) s))) Later in this development it will be convenient to have a predicate "nbetw" that says there are n elements in a sequence between two given elements. <> <> It may sometimes be of use to talk about the convex hull of a temporal sequence. <> <> {< I've ruled out the possibility that the convex hull is a non-proper-interval. >} Note,however, that we cannot simply dispense with temporal sequences and talk only about their convex hulls. "Every Monday in 2003" has as its convex hull the interval from January 6 to December 29, 2003, but if we use that interval to represent the phrase, we lose all the important information in the notice "The group will meet every Monday in 2003." The predicate "ngap" will enable us to define "everynthp" below. Essentially, we are after the idea of a temporal sequence s containing every nth element of s0 for which p is true. The predicate "ngap" holds between two elements of s and says that there are n-1 elements between them that are in s0 and not in s for which p is true. <> <= n 0) (exists (s1) (and (= (card s1) (- n 1)) (idisjoint s s1) (forall (tx) (iff (member tx s1) (and (iinside tx s0) (p tx) (ibefore t1 tx) (ibefore tx t2))))))))) >> The predicate "everynthp" says that a temporal sequence s consists of every nth element of the temporal sequence s0 for which property p is true. It will be useful in describing temporal aggregates like "every third Monday in 2001". <> <= n 0) (exists (t1) (and (first t1 s) (not (exists (tx) (and (iinside tx s0) (ngap tx t1 s s0 p n)))))) (exists (t2) (and (last t2 s) (not (exists (tx) (and (iinside tx s0) (ngap t2 tx s s0 p n)))))) (forall (t1) (or (last t1 s) (exists (t2) (ngap t1 t2 s s0 p n))))))) >> That is, the first element in s has no p element n elements before it in s0, the last element in s has no p element n elements after it, and every element but the last has a p element n elements after it. The variable for the temporal sequence s0 is, in a sense, a context parameter. When we say "every other Monday", we are unlikely to mean every other Monday in the history of the Universe. The parameter s0 constrains us to some particular segment of time. (Of course, that segment could in principle be the entire time line.) The definition of "everyp" is simpler. <> <> (forall (s s0 p) (iff (everyp s s0 p) (everynthp s s0 p 1))) We could similarly define "every-other-p", but the resulting simplification from "everynthp(s,s0,p,2)" would not be sufficient to justify it. Now we will consider a number of English expressions for temporal aggregates and show how they would be represented with the machinery we have built up. "Every third Monday in 2001": In Section 4.3, "monday" is a predicate with two arguments, the second being for the week it is in. Let us define "monday1" as describing a Monday in any week. (forall (d) (iff (monday1 d) (exists (w) (monday d w)))) Then the phrase "every third Monday in 2001" describes a temporal sequence S for which the following is true. (exists (y z) (and (yr y 2001 (common-era z)) (everynthp S (singleton y) monday 3))) Note that this could describe any of three temporal sequences, depending on the offset determining the first element of the set. "Every morning for the last four years": Suppose "nowfn" maps a document d into the instant or interval viewed as "now" from the point of view of that document, and suppose D is the document this phrase occurs in. Suppose also the predicate "morning" describes that part of each day that is designated a "morning". Then the phrase describes a temporal sequence S for which the the following is true. (exists (ty tm - Interval) (and (= (duration ty *year*) 4) (ends tm ty) (iinside tm (nowfn D)) (everyp S (singleton ty) morning))) "Four consecutive Mondays": This describes a temporal sequence S for which the following is true. (exists (s0) (and (everyp S s0 Monday1) (= (card S) 4))) "The first nine months of 1997": This describes the temporal sequence S for which the following is true. (exists (z) (iff (member m S) (and (month m n (yrFn 1997 (CD z))) (=< 1 n) (=< n 9)))) Note that this expression is ambiguous between the set of nine individual months, and the interval spanning the nine months. This is a harmless ambiguity because the minimal equivalent temporal sequence of the first is the singleton set consisting of the second. "The first full day of competition": For the convenience of this example, let us assume an ontology where "competition" is a substance or activity type and "full" relates intervals to such types. Then the phrase describes an interval D for which the following is true. (exists (s) (and (forall (d) (iff (member d s) (exists (n tv) (and (day d n tv) (competition c) (full d c))))) (first D s))) "Three weekdays after January 10": Suppose the predicate "weekday1" describes any weekday of any week, similar to "Monday1". Then this phrase describes the temporal aggregate S for which the following is true. (exists (d y tv - Proper-interval) (and (da d 11 (moFn 1 y)) (everyp S (singleton tv) weekday1) (int-starts d tv) (= (card S) 3))) That is, January 11, the day after January 10, starts the interval from which the three successive weekdays are to be taken. The last of these weekdays is the day D for which "last(D,S)" is true. If we know that January 10 is a Friday, we can deduce that the end of S is Wednesday, January 15. "The fourth of six days of voting": Let us, for the sake of the example, say that voting is a substance/activity type and can appear as the first argument of the predicate "during". Then a voting day can be defined as follows: (forall (d) (iff (voting-day d) (exists (v n tv) (and (da d n tv) (voting v) (during v d))))) Then the phrase describes an interval D for which the following is true. (exists (s s0) (and (everyp s s0 voting-day) (= (card s) 6) (nth D 4 s))) Betti et al.'s (19??) concept of granularity is simply a temporal sequence in our terminology. All of the examples they give are uniform temporal sequences. For example, their "hour" granularity within an interval T is the set S such that "everyp(S,T,hr1)", where "hr1" is to "hr" as "monday1" is to "monday". Their notion of one granularity "grouping into" another can be defined for temporal sequences. <> <> That is, temporal sequence s1 groups into temporal sequence s2 if every element of s2 is made up of a concatenation of elements of s1 and nothing else is in s1. Betti et al. also define a notion of "groups-periodically-into", relative to a period characterized by integers r. Essentially, every r instances of a granule in the coarser granularity groups a subset of the same number of granules in the finer granularity. <> <= r 0) (forall (t1 t2 s3) (if (and (member t1 s2) (member t2 s2) (nbetw t1 t2 s2 (- r 1)) (subset s3 s1) (exists (seq1 - Temporal-seq) (and (= (singleton t1) seq1) (groups-into s3 seq1)))) (exists (s4 seq2 - Temporal-seq) (and (subset s4 s1) (= (singleton t2) seq2) (groups-into s4 seq2) (= (card s3) (card s4))))))))) >> To know the time of an event down to a granularity of one clock hour (in the context of S0) is to know which element it occurred during in the set S such that "(everyp S S0 hr1)". A transitive granularity, as defined in Section 5, is a temporal sequence. 6.2. Durations of Temporal Aggregates The concept of "duration", defined in Section 3, can be extended to temporal sequences in a straightforward manner. If a temporal sequence is the empty set, Phi, its duration is zero. <> <> The duration of a singleton set is the duration of the temporal entity in it. <> The duration of the union of two disjoint temporal sequences is the sum of their durations. <> We need to use the predicate "idisjoint" to ensure that there is no overlap between intervals in s1 and intervals in s2. The duration of the convex hull of a temporal sequence is of course not the same as the duration of the temporal sequence. Sometimes one notion is appropriate, sometimes the other. For determining what workers hired on an hourly basis should be paid, we want to know the duration of the temporal sequence of the hours that they worked, whereas for someone on an annual salary, the appropriate measure is the duration of its convex hull. It is a theorem that the duration of the convex hull of a temporal sequence is at least as great as that of the temporal sequence. (forall (tv s u) (if (convex-hull tv s) (>= (duration tv u) (seq-duration s u)))) 6.3. Duration Arithmetic five business days after January 8, 2003. 6.4. Rates .(+ctr 0)%. . Deictic Time Deictic temporal concepts, such as ``now'', ``today'', ``tomorrow night'', and ``last year'', are more common in natural language texts than they will be in descriptions of Web resources, and for that reason we are postponing a development of this domain until the first three are in place. But since most of the content on the Web is in natural language, ultimately it will be necessary for this ontology to be developed. It should, as well, mesh well with the annotation standards used in automatic tagging of text. We expect that the key concept in this area will be a relation _now_ between an instant or interval and an utterance or document. (now t d) The concept of "today" would also be relative to a document, and would be defined as follows: (iff (today tv d) (exists (ti n x) (and (now ti d) (begins-or-in ti tv) (da tv n x)))) That is, tv is today with respect to document d if and only if there is an instant ti in tv that is now with respect to the document and tv is a calendar day (and thus the nth calendar day in some interval x). Present, past and future can be defined in the obvious way in terms of now and before. Another feature of a treatment of deictic time would be an axiomatization of the concepts of last, this, and next on anchored sequences of temporal entities. 7. Vague Temporal Concepts In natural language a very important class of temporal expressions are inherently vague. Included in this category are such terms as "soon", "recently", and "a little while". These require an underlying theory of vagueness, and in any case are probably not immediately critical for the Semantic Web. This area will be postponed for a little while. References Allen, J.F. (1984). Towards a general theory of action and time. Artificial Intelligence 23, pp. 123-154. Allen, James F., and Henry A. Kautz. 1985. ``A Model of Naive Temporal Reasoning'', {\it Formal Theories of the Commonsense World}, ed. by Jerry R. Hobbs and Robert C. Moore, Ablex Publishing Corp., pp. 251-268. Allen, J.F. and P.J. Hayes (1989). Moments and points in an interval-based temporal logic. Computational Intelligence 5, pp. 225-238. Allen, J.F. and G. Ferguson (1997). Actions and events in interval temporal logic. In Oliveiro Stock (ed.), Spatial and Temporal Reasoning, Kluwer Academic Publishers, pp. 205-245. Claudio Bettini, X. Sean Wang, and Sushil Jajodia, "Solving multi-granularity temporal constraint networks", Artificial Intelligence, vol. 140 (2002), pp. 107-152. Richard Fikes and Qing Zhou, "A Reusable Time Ontology" Jerry Hobbs, "Granularity", IJCAI-85, or http://www.ai.sri.com/~hobbs/granularity-web.pdf