In engineering analysis, physical quantities such as the length of a beam or the velocity of a body are routinely modeled by variables in equations with numbers as values. While human engineers can interpret these numbers as physical quantities by inferring dimension and units from context, the representation of quantities as numbers leaves implicit other relevant information about physical quantities in engineering models, such as physical dimension and unit of measure. Furthermore, there are many classes of models where the magnitude of a physical quantity is not a simple real number - a vector or higher-order tensor for instance. Our goal here is to extend standard mathematics to include unit and dimension semantics.In this theory, we attempt to define the basic concepts associated with physical quantities. A quantity is a hypothetically measurable amount of something. We refer to those things whose amounts are described by physical-quantities as physical-dimensions (following the terminology used in most introductory Physics texts). Time, length, mass, and energy are examples of physical-dimensions. Comparability is inherently tied to the concept of quantities. Quantities are described in terms of reference quantities called units-of-measure. A meter is an example of an unit-of-measure for quantities of the length physical-dimension.

The physical-quantities theory defines the basic vocabulary for describing physical quantities in a general form, making explicit the relationships between magnitudes of various orders, units of measure and physical dimensions. It defines the general class physical-quantity and a set of algebraic operators that are total over all physical quantities. Specializations of the physical-quantity class and the operators are defined in other theories (which use this theory).

The theory also describes specific language for physical units such as meters, inches, and pounds, and physical dimensions such as length, time, and mass. The theory provides representational vocabulary to compose units and dimensions from basis sets and to describe the basic relationships between units and physical dimensions. This theory helps support the consistent use of units in expressions relating physical quantities, and it also supports conversion of units needed in calculations.

**Source code: physical-quantities.lisp****List of other known theories**

Frame-OntologyKif-RelationsKif-SetsKif-ListsKif-NumbersAbstract-AlgebraFrame-Ontology...

Unary-Scalar-FunctionsCmlThermodynamicsDmeThermodynamicsStandard-UnitsSimple-BikesCml...Vt-DesignSimple-BikesVt-DomainVt-ExampleUnary-Scalar-Functions...Scalar-QuantitiesVt-Design...Vector-Quantities

Orthogonal-Dimension-SetPhysical-DimensionPhysical-QuantityConstant-QuantityNondimensional-Constant-QuantityUnit-Of-MeasureFunction-QuantityZero-QuantityRelation-Extended-To-QuantitiesSystem-Of-Units

**The following constants were used from included theories:**

**Abelian-Group***defined as a***relation***in theory***Abstract-Algebra****Arity***defined as a***function***in theory***Frame-Ontology****Class***defined as a***class***in theory***Frame-Ontology****Defined***defined as a***class***in theory***Kif-Relations****Difference***defined as a***function***in theory***Kif-Sets****Documentation***defined as a***relation***in theory***Frame-Ontology****Domain***defined as a***relation***in theory***Frame-Ontology****Exact-Range***defined as a***function***in theory***Frame-Ontology****Exhaustive-Subclass-Partition***defined as a***relation***in theory***Frame-Ontology****Function***defined as a***class***in theory***Kif-Relations****Function***defined as a***class***in theory***Frame-Ontology****Holds***defined as a***relation***in theory***Kif-Relations****Identity-Element-For***defined as a***relation***in theory***Abstract-Algebra****Individual***defined as a***class***in theory***Kif-Sets****Instance-Of***defined as a***relation***in theory***Frame-Ontology****Item***defined as a***relation***in theory***Kif-Lists****Map***defined as a***function***in theory***Kif-Relations****Member***defined as a***relation***in theory***Kif-Sets****Nth-Domain***defined as a***relation***in theory***Frame-Ontology****Positive***defined as a***class***in theory***Kif-Numbers****Range***defined as a***relation***in theory***Frame-Ontology****Real-Number***defined as a***class***in theory***Kif-Numbers****Relation***defined as a***class***in theory***Kif-Relations****Relation***defined as a***class***in theory***Frame-Ontology****Relation-Universe***defined as a***function***in theory***Frame-Ontology****Set***defined as a***class***in theory***Kif-Sets****Subclass-Of***defined as a***relation***in theory***Frame-Ontology****Superclass-Of***defined as a***relation***in theory***Frame-Ontology****Value-Cardinality***defined as a***function***in theory***Frame-Ontology**

**All constants that were mentioned were defined.**

A physical-quantity is a measure of some quantifiable aspect of the modeled world, such as 'the earth's diameter' (a constant length) and 'the stress in a loaded deformable solid' (a measure of stress, which is a function of three spatial coordinates). The first type is called constant-quantity and the second type is called function-quantity. All physical quantities are either constant-quantities or function-quantities. Although the name and definition of this concept is inspired from physics, physical quantities need not be material. For example, amounts of money are physical quantities. In fact, all real numbers and numeric-valued tensors are special cases of physical quantities. In engineering textbooks, quantities are often called variables.Physical quantities are distinguished from purely numeric entities like a real numbers by their physical dimensions. A physical-dimension is a property that distinguishes types of quantities. Every physical-quantity has exactly one associated physical-dimension. In physics, we talk about dimensions such as length, time, and velocity; again,

nonphysicaldimensions such as currency are also possible. The dimension of purely numeric entities is the identity-dimension.The 'value' of a physical-quantity depends on its type. The value of a constant-quantity is dependent on a unit-of-measure. Physical quantities of the identity-dimension (dimensionless quantities) are just numbers or tensors to start with. Physical quantities of the type function-quantity are functions that map quantities to other quantities (e.g., time-dependent quantities are function-quantities). See the definitions of these other classes and functions for detail.

**Exhaustive-Subclass-Partition:**{Constant-quantity, Function-quantity}

**Quantity.Dimension:***Slot-Cardinality:*1

*Slots Of Instances:*

**Defined in theory: Physical-quantities****Source code: physical-quantities.lisp**

A quantity has a unique physical-dimension. This function maps quantities to physical-dimensions. It is total for all physical quantities (as stated in the definition of physical-quantity).

**Arity:**2**Domain:**Physical-quantity**Range:**Physical-dimension

**Defined in theory: Physical-quantities****Source code: physical-quantities.lisp**

Two physical quantities are compatible if their physical-dimensions are equal. Compatibility constrains how quantities can be compared and combined with algebraic operators.

**Arity:**2**Domain:**Physical-quantity**Range:**Physical-quantity

**Axioms:**

(<=> (Compatible-Quantities ?X ?Y) (And (Physical-Quantity ?X) (Physical-Quantity ?Y) (= (Quantity.Dimension ?X) (Quantity.Dimension ?Y)) ))

**Defined in theory: Physical-quantities****Source code: physical-quantities.lisp**

A constant-quantity is a constant value of some physical-quantity, like 3 meters or 55 miles per hour. Constant quantities are distinguished from function-quantities, which map some quantities to other quantities. For example, the velocity of a particle over some range of time would be represented by a function-quantity mapping values of time (which are constant quantities) to velocity vectors (also constant quantities). All real numbers (and numeric tensors of higher order) are constant quantities whose dimension is the identity-dimension (i.e., the so-called 'dimensionless' or nondimensional-constant-quantity).All constant quantites can be expressed as the product of some nondimensional quantity and a unit of measure. This is what it means to say a quantity `has a magnitude'. For example, 2 meters can be expressed as (* 3 meter), where meter is defined as a unit of measure for length. All units of measure are also constant quantities.

**Subclass-Of:**Physical-quantity

**Axioms:**

(<=> (Constant-Quantity ?X) (And (Physical-Quantity ?X) (Not (Function-Quantity ?X))) )

**Defined in theory: Physical-quantities****Source code: physical-quantities.lisp**

A FUNCTION-QUANTITY is a function that maps from one or more constant-quantities to a constant-quantity. The function must have a fixed arity of at least 1. All elements of the range (ie, values of the function) have the same physical-dimension, which is the dimension of the function-quantity itself.

**Subclass-Of:**Function, Physical-quantity

**Arity:***Slot-Cardinality:*1**Quantity.Dimension:***Slot-Cardinality:*1

*Slots Of Instances:*

**Axioms:**

(<=> (Function-Quantity ?F) (And (Physical-Quantity ?F) (Function ?F) (Value-Cardinality ?F Arity 1) (Subclass-Of (Relation-Universe ?F) Constant-Quantity) (Value-Cardinality ?F Quantity.Dimension 1) (Forall (?Val) (=> (Instance-Of ?Val (Exact-Range ?F)) (= (Quantity.Dimension ?F) (Quantity.Dimension ?Val) )))))

**Defined in theory: Physical-quantities****Source code: physical-quantities.lisp**

Although it sounds contradictory, a nondimensional-constant-quantity is a quantity whose dimension is the identity-dimension. All numeric tensors, including real numbers, are nondimensional quantities.

**Subclass-Of:**Constant-quantity**Superclass-Of:**Real-number

**Quantity.Dimension:**Identity-dimension

*Slots Of Instances:*

**Axioms:**

(<=> (Nondimensional-Constant-Quantity ?X) (And (Constant-Quantity ?X) (= (Quantity.Dimension ?X) Identity-Dimension) ))

**Defined in theory: Physical-quantities****Source code: physical-quantities.lisp**

The magnitude of a constant-quantity is a numeric value for the quantity given in terms of some unit-of-measure. For example, the magnitude of the quantity 2 kilometers in the unit-of-measure meter is the real number 2000. The unit-of-measure and quantity must be of the same physical-dimension, and the resulting value is a nondimensional quantity. The type of the resulting quantity is dependent on the type of the original quantity. The magnitude of a scalar-quantity is a real-number, and the magnitude of a vector-quantity is a numeric-vector. In general, then, the magnitude function converts a quantity with dimension into a normal mathematical object.Units of measure are scalar quantities, and magnitude is defined in terms of scalar multiplication. The magnitude of a quantity in a given unit times that unit is equal to the original quantity. This holds for all kinds of tensors, including real-numbers and vectors. For scalar quantities, one can think of the magnitude as the ratio of a quantity to the unit quantity. See the definition of the multiplication operator * for the various sorts of quantities. The properties of * that hold for all physical-quantities are defined in this theory.

There is no magnitude for a function-quantity. Instead, the value of a function-quantity on some input is a quantity which may in turn be a constant-quantity for which the magnitude function is defined. See the definition of value-at.

**Arity:**3

**Axioms:**

(Nth-Domain Magnitude 3 Nondimensional-Constant-Quantity) (Nth-Domain Magnitude 2 Unit-Of-Measure) (Nth-Domain Magnitude 1 Constant-Quantity) (Forall (?Q ?Unit ?Mag) (=> (And (Constant-Quantity ?Q) (Unit-Of-Measure ?Unit) (Nondimensional-Constant-Quantity ?Mag) (Defined (* ?Mag ?Q)) ) (= (Magnitude (* ?Mag ?Q) ?Unit) (* ?Mag (Magnitude ?Q ?Unit)) ))) (<=> (Magnitude ?Q ?Unit ?Mag) (And (Constant-Quantity ?Q) (Unit-Of-Measure ?Unit) (Nondimensional-Constant-Quantity ?Mag) (Compatible-Quantities ?Q ?Unit) (Defined (* ?Mag ?Unit)) (= (* ?Mag ?Unit) ?Q) ))

**Defined in theory: Physical-quantities****Source code: physical-quantities.lisp**

A zero quantity is one which, when multiplied times any quantity, results in another zero quantity (possibly the same zero). The class of zero quantities includes the number 0, and zero quantities for every physical dimension and order of tensor.

**Subclass-Of:**Physical-quantity

**Axioms:**

(Zero-Quantity 0) (=> (Zero-Quantity ?X) (Forall (?Q) (=> (Physical-Quantity ?Q) (Zero-Quantity (* ?Q ?X))) ))

**Defined in theory: Physical-quantities****Source code: physical-quantities.lisp**

A relation-extended-to-quantities is a relation that,whenit is true on a sequence of arguments that are magnitudes (e.g., real numbers or tensors), then it is also true on a sequence of constant quantites with those magnitudes in some units.For example, the

<relation is extended to quantities. That means that for all pairs of quantities q1 and q2, (<q1 q2) if and only if (<(magnitude q1 ?u) (magnitude q2 ?u)) for all units on which the two magnitudes are defined.There may be relations that are not instances of this class that nonetheless hold for quantity arguments. To be a relation-extended-to-quantities means that the relation holds when all the arguments are of the same physical dimension.

**Subclass-Of:**Relation

**Axioms:**

(<=> (Relation-Extended-To-Quantities ?R) (And (Relation ?R) (Forall (@Args) (<=> (And (Holds ?R @Args) (=> (Item ?Q (Listof @Args)) (And (Constant-Quantity ?Q)) )) (Forall (?Unit ?Q) (=> (And (Unit-Of-Measure ?Unit) (=> (Item ?Q (Listof @Args)) (Compatible-Quantities ?Q ?Unit))) (Member (Map (Lambda (?Q) (Magnitude ?Q ?Unit)) (Listof @Args) ) ?R)))))))

**Defined in theory: Physical-quantities****Source code: physical-quantities.lisp**

A physical dimension is a property we associate with physical quantities for purposes of classification or differentiation. Mass, length, and force are examples of physical dimensions. Composite physical dimensions can be described by composing primitive dimensions. For example, Length/Time ('length over time') is a dimension that can be associated with a velocity.The composition operators for dimensions are * [dimension product] and expt [exponentiation to a real power], which have algebraic properties analogous to their use with real numbers. The product of any two dimensions is a dimension. There is an indentity element for * on dimensions; it is called the identity-dimension. The product of any dimension and the identity-dimension is the original dimension; any other product defines a new dimension. The analogy of division is exponentiation to a negative number.

There is no intrinsic property of a dimension that makes it primitive. A set of primitive dimensions is chosen by convention to define a system of units of measure. However, the relative relationships among dimensions can be established independently of systems of units. For example, the dimension corresponding to velocity is length/time, and therefore the length dimension is the same as velocity * time. This is true regardless of whether the length or velocity dimensions are viewed as the fundamental dimensions in some system, or whether either dimension is denoted by a object constant or a term expression in some theory.

**Subclass-Of:**Individual

***:***Abelian-Group:*Identity-dimension

*Slots Of Instances:*

**Defined in theory: Physical-quantities****Source code: physical-quantities.lisp**

identity-dimension is the identity element for the * operator over physical-dimensions. That means that the product of identity-dimension and any other dimension is that other dimension. Identity-dimension is the dimension of the so-called dimensionless quantities, including the real numbers.

**Instance-Of:**Physical-dimension

**Axioms:**

(Identity-Element-For Identity-Dimension * Physical-Dimension)

**Defined in theory: Physical-quantities****Source code: physical-quantities.lisp**

A unit-of-measure is a constant-quantity that serves as a standard of measurement for some dimension. For example, the meter is a unit-of-measure for the length-dimension, as is the inch. Square-feet is a unit for length*length quantities. Units-of-measure can be defined as primitives or can be defined as products of units or units raised to real exponents.There is no intrisic property of a unit that makes it primitive or fundamental; rather, a system-of-units defines a set of orthogonal dimensions and assigns units for each. Therefore, there is no distinguished class for fundamental unit of measure.

The magnitude of a unit-of-measure is always a positive real number, using any comparable unit. Units are not scales, which have reference origins and can have negative values. Units are like distances between points on scales.

Any composition of units and reals using the * and expt functions is also a unit-of-measure. For example, the quantity 'three meters' is denoted by the expression (* 3 meter). There is an identity-unit that forms and abelian-group with the * operator over units of measure. That means * is commutative and associative for units. It is also commutative for multiplying units and other constant-quantities. This is important for factoring out units from expressions containing tensors or functions.

**Subclass-Of:**Constant-quantity

***:***Abelian-Group:*Identity-unit

*Slots Of Instances:*

**Axioms:**

(=> (And (Unit-Of-Measure ?A) (Constant-Quantity ?B)) (= (* ?A ?B) (* ?B ?A)) ) (=> (And (Unit-Of-Measure ?A) (Real-Number ?B)) (Unit-Of-Measure (Expt ?A ?B)) ) (=> (And (Unit-Of-Measure ?A) (Real-Number ?B)) (Unit-Of-Measure (* ?A ?B)) ) (<=> (Unit-Of-Measure ?U) (And (Constant-Quantity ?U) (Forall (?Other-Unit) (=> (And (Unit-Of-Measure ?Other-Unit) (Compatible-Quantities ?U ?Other-Unit) ) (And (Real-Number (Magnitude ?U ?Other-Unit)) (Positive (Magnitude ?U ?Other-Unit)) )))))

**Defined in theory: Physical-quantities****Source code: physical-quantities.lisp**

The identity unit can be combined with any other unit to produce the same unit. The identity unit is the real number 1. Its dimension is the identity-dimension.

**Axioms:**

(= Identity-Unit 1)

**Defined in theory: Physical-quantities****Source code: physical-quantities.lisp**

A system-of-units is a class of units of measure that defines a standard system of measurement. Each instance of the class is a canonical unit-of-measure for a dimension. The mapping from dimensions to units in the system is provided by the function called standard-unit; since this mapping is functional and total, there is exactly one unit in the system of units per dimension.There is no intrinsic property of a dimension that makes it fundamental or primitive, and neither is there any such property for units of measure. However, each system of units is defined by a basis set of units, from which all other units in the system are composed. The function base-units maps a system-of-units to its basis set. The dimensions of the units in the base-set must be orthogonal (see the definition of fundamental-dimension-set). For each composition of these fundamental dimensions (e.g., length / time) there is a corresponding unique unit in the system-of-units (e.g., meter / second-of-time).

The System International (SI) standard used in physics is a system-of-units based on seven fundamental dimensions and base units. Other systems of units may have different basis sets of differing cardinality, yet share some of the same units as the SI system.

**Subclass-Of:**Class

**Subclass-Of:**Unit-of-measure**Base-Units:***Slot-Cardinality:*1

*Slots Of Instances:*

**Axioms:**

(<=> (System-Of-Units ?System) (And (Class ?System) (Subclass-Of ?System Unit-Of-Measure) (=> (Instance-Of ?Unit ?System) (= (Standard-Unit ?System (Quantity.Dimension ?Unit)) ?Unit)) (Value-Cardinality ?System Base-Units 1) (=> (Member ?Unit (Base-Units ?System)) (Instance-Of ?Unit ?System) ) (Orthogonal-Dimension-Set (Setofall ?Dim (Exists (?Unit) (And (Member ?Unit (Base-Units ?System) ) (= ?Dim (Quantity.Dimension ?Unit) )))))))

**Defined in theory: Physical-quantities****Source code: physical-quantities.lisp**

Defines a set of base units for a system of units.

**Arity:**2**Domain:**System-of-units**Range:**Set

**Axioms:**

(=> (Base-Units ?System-Of-Units ?Set-Of-Units) (=> (Member ?Unit ?Set-Of-Units) (Unit-Of-Measure ?Unit)) )

**Defined in theory: Physical-quantities****Source code: physical-quantities.lisp**

The standard-unit for a given system and dimension is a unit in that system whose dimension is the given dimension.

**Arity:**3

**Axioms:**

(Nth-Domain Standard-Unit 3 Unit-Of-Measure) (Nth-Domain Standard-Unit 2 Physical-Dimension) (Nth-Domain Standard-Unit 1 System-Of-Units) (<=> (Standard-Unit ?System-Of-Units ?Dimension ?Unit) (And (System-Of-Units ?System-Of-Units) (Physical-Dimension ?Dimension) (Unit-Of-Measure ?Unit) (Instance-Of ?Unit ?System-Of-Units) (= (Quantity.Dimension ?Unit) ?Dimension) ))

**Defined in theory: Physical-quantities****Source code: physical-quantities.lisp**

magnitude-in-system-of-units is like magnitude, but it maps a quantity and asystemof units into a nondimensional numeric value. For example, one could ask for the value of 55 miles per hour in the SI system. In SI, the standard-unit for the dimension of miles per hour is meters per second-of-time. So the answer would be about 24 meters per second-of-time.

**Arity:**3

**Axioms:**

(Nth-Domain Magnitude-In-System-Of-Units 3 Nondimensional-Constant-Quantity) (Nth-Domain Magnitude-In-System-Of-Units 2 System-Of-Units) (Nth-Domain Magnitude-In-System-Of-Units 1 Constant-Quantity) (= (Magnitude-In-System-Of-Units ?Q ?System) (Magnitude ?Q (Standard-Unit ?System (Quantity.Dimension ?Q))) )

**Defined in theory: Physical-quantities****Source code: physical-quantities.lisp**

A set of orthogonal dimensions; i.e., dimensions that cannot be composed from each other.

**Subclass-Of:**Set

**Axioms:**

(<=> (Orthogonal-Dimension-Set ?Set-Of-Dimensions) (And (Set ?Set-Of-Dimensions) (=> (Member ?Dim ?Set-Of-Dimensions) (And (Physical-Dimension ?Dim) (Not (Dimension-Composable-From ?Dim (Difference ?Set-Of-Dimensions (Setof ?Dim) )))))))

**Defined in theory: Physical-quantities****Source code: physical-quantities.lisp**

**Arity:**2

**Axioms:**

(<=> (Dimension-Composable-From ?Dim ?Set-Of-Dimensions) (Or (Member ?Dim ?Set-Of-Dimensions) (Exists (?Dim1 ?Dim2) (And (Dimension-Composable-From ?Dim1 ?Set-Of-Dimensions) (Dimension-Composable-From ?Dim2 ?Set-Of-Dimensions) (= ?Dim (* ?Dim1 ?Dim2)) )) (Exists (?Dim1 ?Real) (And (Dimension-Composable-From ?Dim1 ?Set-Of-Dimensions) (Real-Number ?Real) (= ?Dim (Expt ?Dim1 ?Real)) ))))

**Defined in theory: Physical-quantities****Source code: physical-quantities.lisp**

Formatting and translation code was written by