Skip to content

NAL 7: Events as Statements

PtrMan edited this page May 10, 2021 · 12 revisions

specification NAL-7

all rules:

rule TV-function
a, b |- a =/> b induction
a, b |- (a &/ b) intersection

------------------------- Temporal deduction/explification ----------------------------------

//Someone enter the room_101 after he open the door_101

<<(*, $x, room_101) --> enter> =\> <(*, $x, door_101) --> open>>. %0.9%

//Someone open the door_101 after he hold the key_101

<<(*, $y, door_101) --> open> =\> <(*, $y, key_101) --> hold>>. %0.8%

100

//If someone enter room_101, he should hold key_101 before

//outputMustContain('<<(*,$1,room_101) --> enter> =\> <(*,$1,key_101) --> hold>>.

//If someone hold key_101, he will enter room_101

//outputMustContain('<<(*,$1,key_101) --> hold> =/> <(*,$1,room_101) --> enter>>.

------------------------------- Temporal induction/comparison -----------------------------

//Someone open door_101 before he enter room_101

<<(*, $x, door_101) --> open> =/> <(*, $x, room_101) --> enter>>. %0.9%

//Someone open door_101 after he hold key_101

<<(*, $y, door_101) --> open> =\> <(*, $y, key_101) --> hold>>. %0.8%

100

//If someone hold key_101, he will enter room_101

//outputMustContain('<<(*,,key_101) --> hold> =/> <(*,,room_101) --> enter>>. %0.90;0.39%')

//If someone enter room_101, he should hold key_101 before

//outputMustContain('<<(*,,room_101) --> enter> =\> <(*,,key_101) --> hold>>. %0.80;0.42%')

//If someone hold key_101, it means he will enter room_101

//outputMustContain('<<(*,,key_101) --> hold> </> <(*,,room_101) --> enter>>. %0.73;0.44%')

--------------------------------------- Inference on tense -------------------------------------

//John hold key_101 before he enter room_101

<<(*,John,key_101) --> hold> =/> <(*,John,room_101) --> enter>>.

//John is holding key_101 now

<(*,John,key_101) --> hold>. :|:

20

//John will enter the room_101

//outputMustContain('<(*,John,room_101) --> enter>. :!5: %1.00;0.81%')

------------------------------- Inference on tense -----------------------------

//John hold key_101 before he enter room_101

<<(*,John,key_101) --> hold> =/> <(*,John,room_101) --> enter>>. %1.00;0.90%

//John entered room_101

<(*,John,room_101) --> enter>. :\: %1.00;0.90%

3

//outputMustContain('<(*,John,key_101) --> hold>. :!-10: %1.00;0.45%')

------------------------------------------- Inference on tense -----------------------------------

//John is opening door_101 now

<(*,John,door_101) --> open>. :|:

6

//John is entering room_101 now

<(*,John,room_101) --> enter>. :|:

10

//John will enter room_101 after he open door_101

//outputMustContain('<<(*,John,room_101) --> enter> =\> (&/,<(*,John,door_101) --> open>,+6)>. :!6: %1.00;0.45%')

-------------------------------- **Induction on events ** -------------------------------------

//John is opening door_101 now

<(*,John,door_101) --> open>. :|:

11

//John is not entering room_101 now

<(*,John,room_101) --> enter>. :|: %0%

10

//If John open the door_101, he will not enter room_101

//outputMustContain('<(&/,<(*,John,door_101) --> open>,+11) =/> <(*,John,room_101) --> enter>>. :!11: %0.00;0.45%')

//If John enter the door_101, it doesn't mean he will enter the room_101

//outputMustContain('<(&/,<(*,John,door_101) --> open>,+11) </> <(*,John,room_101) --> enter>>. :!11: %0.00;0.45%')

//adjusted +3 to +4

//original output (1.3.3):

//OUT: <<(*,John,room_101) --> enter>=\><(*,John,door_101) --> open>>. :\: %1.00;0.45%

//OUT: <<(*,John,door_101) --> open>=/><(*,John,room_101) --> enter>>. :\: %1.00;0.45%

//OUT: <<(*,John,door_101) --> open></><(*,John,room_101) --> enter>>. :\: %1.00;0.45%

//OUT: <<(*,John,room_101) --> enter>=\><(*,John,door_101) --> open>>. %1.00;0.45%

//OUT: <<(*,John,door_101) --> open>=/><(*,John,room_101) --> enter>>. %1.00;0.45%

//OUT: <<(*,John,door_101) --> open></><(*,John,room_101) --> enter>>. %1.00;0.45%

--------------------------------- Induction on events ---------------------------

//John is opening door_101

<John --> (/,open,_,door_101)>. :|:

6

//John is entering room_101

<John --> (/,enter,_,room_101)>. :|:

20

//If John enter room_101, he should open door_101 before

//outputMustContain('<<John --> (/,enter,_,room_101)> =\> (&/,<John --> (/,open,_,door_101)>,+6)>. :!6: %1.00;0.45%')

//new: variable introduction also in time:

//If someone enter room_101, he should open door_101 before

//outputMustContain('<< --> (/,enter,_,room_101)> =\> (&/,< --> (/,open,_,door_101)>,+6)>. :!6: %1.00;0.45%')

//adjusted +2 to +3 in both conditions

----------------------------- Induction on events ------------------------

//John is holding key_101 now

<(*,John,key_101) --> hold>. :|: %1.00;0.90%

6

//irrelevant 'outputMustContain('<John --> (/,hold,_,key_101)>. :\: %1.00;0.90%')

//irrelevant 'outputMustContain('<key_101 --> (/,hold,John,_)>. :\: %1.00;0.90%')

//irrelevant 'outputMustContain('<John --> (/,hold,_,key_101)>. :\: %1.00;0.90%')

//irrelevant 'outputMustContain('<key_101 --> (/,hold,John,_)>. :\: %1.00;0.90%')

//If John open door_101, he will enter room_101

<<(*,John,door_101) --> open> =/> <(*,John,room_101) --> enter>>. :|: %1.00;0.90%

20

//If John hold key_101 and open door_101 (after 6 steps), he will enter room_101

//outputMustContain('<(&/,<(*,John,key_101) --> hold>,+6,<(*,John,door_101) --> open>) =/> <(*,John,room_101) --> enter>>. :!6: %1.00;0.45%')

//changed from +2 to +4 due to changes in interval calculations

//this one is working, just throwing exception

----------------------------- Updating and revision -----------------------------

//John is holding key_101 now

<(*,John,key_101) --> hold>. :|:

6

//John is not holding key_101 now

<(*,John,key_101) --> hold>. :|: %0%

//Is John holding key_101 now?

<(*,John,key_101) --> hold>? :|:

200

//revision on events

//John maybe holding key_101 now

//outputMustContain('<John --> (/,hold,_,key_101)>. :!6: %0.50;0.95%')

//but also looking at it as separate:

//John will not hold key_101 in the future

//outputMustContain('<John --> (/,hold,_,key_101)>. :!6: %0.00;0.90%')

------------------------------- Temporal analogy -------------------------------

//If someone open door_101, he will enter room_101

<<(*, $x, door_101) --> open> =/> <(*, $x, room_101) --> enter>>. %0.95%

//If someone enter room_101, it means he leave corridor_100

<<(*, $x, room_101) --> enter> <|> <(*, $x, corridor_100) --> leave>>.

40

//If someone open door_101, he will leave corridor_100

//outputMustContain('<<(*,,door_101) --> open> =/> <(*,,corridor_100) --> leave>>. %0.95;0.81%')

--------------------------------- Inference on tense -----------------------------

//If someone hold key_101, he will enter room_101 (in 100 steps)

<(&/,<(*, $x, key_101) --> hold>,+100) =/> <(*, $x, room_101) --> enter>>.

//John held the key_101

<(*, John, key_101) --> hold>. :\:

210

//John will enter room_101

//outputMustContain('<(*,John,room_101) --> enter>. :!95: %1.00;0.81%')

//this one is working, but throws an exception

------------------------------------ Inference on tense ---------------------------------

//If someone hold key_101, he will enter room_101 (in 100 steps)

<(&/,<(*, $x, key_101) --> hold>,+100) =/> <(*, $x, room_101) --> enter>>.

//John is entering room_101 now

<(*,John,room_101) --> enter>. :|:

15

//John held the key_101 (105 steps before)

//outputMustContain('<(*,John,key_101) --> hold>. :!-105: %1.00;0.45%')

------------------- Inference on tense -----------------

//If John hold key_101, he will enter room_101

<<(*,John,key_101) --> hold> =/> <(*,John,room_101) --> enter>>.

//John is holding key_101 now

<(*,John,key_101) --> hold>. :|:

20

//John will enter room_101

//outputMustContain('<(*,John,room_101) --> enter>. :!5: %1.00;0.81%')

------------------- Deduction with interval summation -----------------

//a + 1 = b

<(&/, a, +1) =/> b>.

//b + 1 = c

<(&/, b, +1) =/> c>.

10

//a + 2 = c

//outputMustContain('<(&/,a,+2) =/> c>. %1.00;0.81%')

visit #nars (more active) and ##nars on FreeNode

Clone this wiki locally