PREFIX math: <http://www.w3.org/2000/10/swap/math#>
PREFIX : <https://eyereasoner.github.io/eye/reasoning#>

CONSTRUCT {
    (0 ?A ?B) :fib ?A.
} WHERE {} ;

CONSTRUCT {
    (1 ?A ?B) :fib ?B.
} WHERE {} ;

CONSTRUCT {
    (?X ?A ?B) :fib ?Y.
} WHERE {
    ?X math:greaterThan 1.
    (?X 1) math:difference ?C.
    (?A ?B) math:sum ?D.
    (?C ?B ?D) :fib ?Y.
} ;

CONSTRUCT {
    (?X) :fibonacci ?Y.
} WHERE {
    (?X 0 1) :fib ?Y.
}
