@prefix owl: . @prefix un: . @prefix math: . @prefix o2: . @prefix : . @prefix ex: . @keywords a, is, of. # numeric multiplication associates with unit multiplication { (?U1 ?S1) un:product ?U2. (?U2 ?S2) un:product ?U3. (?S1 ?S2) math:product ?S3 } => { (?U1 ?S3) un:product ?U3 }. # scalar conversions between units { ?X ?UNIT ?V. (?BASE ?CONVERSION) un:product ?UNIT. (?V ?CONVERSION) math:product ?V2. } => { ?X ?BASE ?V2 }. # property chaining: shortening { ?S ?P1 [ ?P2 ?O]. (?P1 ?P2) o2:chain ?P3 } => { ?S ?P3 ?O }. # normalizing unit chains by expansion: # (hmm... this would work better if derived # units were defined by chaining one property # at the beginning of the list each time, I think). { ?U1 a un:Unit; is o2:chain of (?U2 ?U). ?U2 is o2:chain of (?U3 ?U4). } => { ?U1 is o2:chain of (?U3 ?U4 ?U) }. # pushing conversion factors into chains, one case: { (?BASIC ?CONVERSION) un:product ?DERIVED. (?BASIC ?U1) o2:chain ?UCB. (?DERIVED ?U1) o2:chain ?UCD. } => { (?UCB ?CONVERSION) un:product ?UCD }. # examples... # test for scalar conversions track length [ un:mile 0.25]. # test for inverses (un:foot un:hz) o2:chain fps. bullet speed [ fps 4000 ].