@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
@prefix time: <http://www.w3.org/2000/10/swap/time#>.
@prefix math: <http://www.w3.org/2000/10/swap/math#>.
@prefix log: <http://www.w3.org/2000/10/swap/log#>.
@prefix : <urn:example:>.

# person data
:patH :birthDay "1944-08-21"^^xsd:date.

# declare components
:ageAbove a log:Component.

# is the age of a person above some duration?
(_:S _:A _:B _:D _:F) log:onNegativeSurface {
    () log:onNegativeSurface {
        _:S :ageAbove _:A.
    }.
    _:S :birthDay _:B.
    "" time:localTime _:D.
    (_:D _:B) math:difference _:F.
    _:F math:greaterThan _:A.
}.

# query
() log:onNegativeSurface {
    :patH :ageAbove "P80Y"^^xsd:duration.
    () log:onNegativeAnswerSurface {
        :patH :ageAbove "P80Y"^^xsd:duration.
    }.
}.
