question about N3 inference

Dear all,  I'm not very familiar with the syntax of the N3 EYE, please take a look at the data below:

PREFIX math: <http://www.w3.org/2000/10/swap/math#>

:Bob a :Person ;
       :weight  80 ;            # ( kg )
       :hight   1.78 .           # ( m  )
:Joe a :Person ;
       :weight  70 ;
       :hight   1.7 .

Suppose the rules for calculating body type are as follows:

BodyMassIndex = weight/height^2   # or weight/(height*heightŁ©
if   BodyMassIndex<19   then
      :Person  :bodyType :Thin ;
else if  BodyMassIndex >=19 &&  BodyMassIndex <25 then
      :Person  :bodyType :Medium ;
else                  # BodyMassIndex>=25
      :Person  :bodyType :Fat ;


Therefore, I expect the following inference results:

:Bob  :bodyType :Fat   .            # BodyMassIndex=25.25
:Joe  :bodyType :Medium  .       # BodyMassIndex=24.22

I didn't find an expression for multiplication in http://www.w3.org/2000/10/swap/math, does anyone who can help me with this N3 inference formula? Thanks in advance.

Best,
joylix


W3<http://www.w3.org/2000/10/swap/math>
A math:Function is unique in terms of math:EqualTo. Function The class of things that are DAML lists were all of the members are math:Value items. List a logical operator allows evaluation eihter way, or testing relationship between two values A math:ReverseFunction is unambiguous in terms of math:EqualTo. StrictProperty This is the class of things that are math lists with only two members.
www.w3.org

W3<http://www.w3.org/2000/10/swap/math>
A math:Function is unique in terms of math:EqualTo. Function The class of things that are DAML lists were all of the members are math:Value items. List a logical operator allows evaluation eihter way, or testing relationship between two values A math:ReverseFunction is unambiguous in terms of math:EqualTo. StrictProperty This is the class of things that are math lists with only two members.
www.w3.org

Received on Monday, 13 September 2021 10:22:30 UTC