### Euler Proof Engine Built-ins -- Jos De Roo
###
### see http://www.w3.org/2000/10/swap/doc/CwmBuiltins
###     http://eulersharp.sourceforge.net/2003/03swap/log-rules.n3
###     http://eulersharp.sourceforge.net/2003/03swap/prolog.n3

@prefix e: <http://eulersharp.sourceforge.net/2003/03swap/log-rules#>.
@prefix fn: <http://www.w3.org/2006/xpath-functions#>.
@prefix crypto: <http://www.w3.org/2000/10/swap/crypto#>.
@prefix list: <http://www.w3.org/2000/10/swap/list#>.
@prefix log: <http://www.w3.org/2000/10/swap/log#>.
@prefix math: <http://www.w3.org/2000/10/swap/math#>.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix string: <http://www.w3.org/2000/10/swap/string#>.
@prefix time: <http://www.w3.org/2000/10/swap/time#>.
@prefix func: <http://www.w3.org/2007/rif-builtin-function#>.
@prefix pred: <http://www.w3.org/2007/rif-builtin-predicate#>.
@prefix prolog: <http://eulersharp.sourceforge.net/2003/03swap/prolog#>.


### Logic Framework Extension Built-ins

e:biconditional a e:Builtin.
e:binaryEntropy a e:Builtin.
e:calculate a e:Builtin.
e:call a e:Builtin.
e:cartesianProduct a e:Builtin.
e:csvTuple a e:Builtin.
e:fail a e:Builtin.
e:finalize a e:Builtin.
e:findall a e:Builtin.
e:format a e:Builtin.
e:graphCopy a e:Builtin.
e:graphDifference a e:Builtin.
e:graphIntersection a e:Builtin.
e:graphList a e:Builtin.
e:hmac-sha a e:Builtin.
e:ignore a e:Builtin.
e:label a e:Builtin.
e:labelvars a e:Builtin.
e:length a e:Builtin.
e:match a e:Builtin.
e:max a e:Builtin.
e:min a e:Builtin.
e:multisetEqualTo a e:Builtin.
e:multisetNotEqualTo a e:Builtin.
e:notLabel a e:Builtin.
e:numeral a e:Builtin.
e:optional a e:Builtin.
e:prefix a e:Builtin.
e:propertyChainExtension a e:Builtin.
e:random a e:Builtin.
e:relabel a e:Builtin.
e:roc a e:Builtin.
e:sha a e:Builtin.
e:sigmoid a e:Builtin.
e:skolem a e:Builtin.
e:sort a e:Builtin.
e:stringEscape a e:Builtin.
e:stringReverse a e:Builtin.
e:stringSplit a e:Builtin.
e:subsequence a e:Builtin.
e:trace a e:Builtin.
e:transaction a e:Builtin.
e:tripleList a e:Builtin.
e:tuple a e:Builtin.
e:unique a e:Builtin.
e:whenGround a e:Builtin.
e:wwwFormEncode a e:Builtin.


### Crypto Built-ins

crypto:sha a e:Builtin.


### List Built-ins

list:append a e:Builtin.
list:first a e:Builtin.
list:in a e:Builtin.
list:last a e:Builtin.
list:member a e:Builtin.
list:rest a e:Builtin.


### Logic Framework Built-ins

log:conclusion a e:Builtin.
log:conjunction a e:Builtin.
log:dtlit a e:Builtin.
log:equalTo a e:Builtin.
log:implies a e:Builtin.
log:includes a e:Builtin.
log:notEqualTo a e:Builtin.
log:notIncludes a e:Builtin.
log:outputString a e:Builtin.
log:rawType a e:Builtin.
log:semantics a e:Builtin.
log:uri a e:Builtin.


### Math Built-ins

math:absoluteValue a e:Builtin.
math:atan2 a e:Builtin.
math:cos a e:Builtin.
math:cosh a e:Builtin.
math:degrees a e:Builtin.
math:difference a e:Builtin.
math:equalTo a e:Builtin.
math:exponentiation a e:Builtin.
math:greaterThan a e:Builtin.
math:integerQuotient a e:Builtin.
math:lessThan a e:Builtin.
math:memberCount a e:Builtin.
math:negation a e:Builtin.
math:notEqualTo a e:Builtin.
math:notGreaterThan a e:Builtin.
math:notLessThan a e:Builtin.
math:product a e:Builtin.
math:quotient a e:Builtin.
math:remainder a e:Builtin.
math:rounded a e:Builtin.
math:sin a e:Builtin.
math:sinh a e:Builtin.
math:sum a e:Builtin.
math:tan a e:Builtin.
math:tanh a e:Builtin.


### RDF Built-ins

rdf:first a e:Builtin.
rdf:rest a e:Builtin.


### String Built-ins

string:concatenation a e:Builtin.
string:contains a e:Builtin.
string:containsIgnoringCase a e:Builtin.
string:endsWith a e:Builtin.
string:equalIgnoringCase a e:Builtin.
string:greaterThan a e:Builtin.
string:lessThan a e:Builtin.
string:matches a e:Builtin.
string:notEqualIgnoringCase a e:Builtin.
string:notGreaterThan a e:Builtin.
string:notLessThan a e:Builtin.
string:notMatches a e:Builtin.
string:replace a e:Builtin.
string:scrape a e:Builtin.
string:search a e:Builtin.
string:startsWith a e:Builtin.


### Time Built-ins

time:day a e:Builtin.
time:month a e:Builtin.
time:year a e:Builtin.


### RIF Built-ins

pred:literal-not-identical a e:Builtin.
pred:iri-string a e:Builtin.
pred:numeric-equal a e:Builtin.
pred:numeric-less-than a e:Builtin.
pred:numeric-greater-than a e:Builtin.
pred:numeric-not-equal a e:Builtin.
pred:numeric-less-than-or-equal a e:Builtin.
pred:numeric-greater-than-or-equal a e:Builtin.
func:not a e:Builtin.
pred:boolean-equal a e:Builtin.
pred:boolean-less-than a e:Builtin.
pred:boolean-greater-than a e:Builtin.
func:compare a e:Builtin.
func:concat a e:Builtin.
func:string-join a e:Builtin.
func:substring a e:Builtin.
func:string-length a e:Builtin.
func:upper-case a e:Builtin.
func:lower-case a e:Builtin.
func:encode-for-uri a e:Builtin.
func:substring-before a e:Builtin.
func:substring-after a e:Builtin.
pred:contains a e:Builtin.
pred:starts-with a e:Builtin.
pred:ends-with a e:Builtin.
pred:matches a e:Builtin.
func:year-from-dateTime a e:Builtin.
func:month-from-dateTime a e:Builtin.
func:day-from-dateTime a e:Builtin.
func:hours-from-dateTime a e:Builtin.
func:minutes-from-dateTime a e:Builtin.
func:seconds-from-dateTime a e:Builtin.
func:year-from-date a e:Builtin.
func:month-from-date a e:Builtin.
func:day-from-date a e:Builtin.
func:hours-from-time a e:Builtin.
func:minutes-from-time a e:Builtin.
func:seconds-from-time a e:Builtin.
func:years-from-duration a e:Builtin.
func:months-from-duration a e:Builtin.
func:days-from-duration a e:Builtin.
func:hours-from-duration a e:Builtin.
func:minutes-from-duration a e:Builtin.
func:seconds-from-duration a e:Builtin.
func:timezone-from-dateTime a e:Builtin.
func:timezone-from-date a e:Builtin.
func:timezone-from-time a e:Builtin.
func:subtract-dateTimes a e:Builtin.
func:subtract-dates a e:Builtin.
func:subtract-times a e:Builtin.
func:add-yearMonthDurations a e:Builtin.
func:subtract-yearMonthDurations a e:Builtin.
func:multiply-yearMonthDuration a e:Builtin.
func:divide-yearMonthDuration a e:Builtin.
func:divide-yearMonthDuration-by-yearMonthDuration a e:Builtin.
func:add-dayTimeDurations a e:Builtin.
func:subtract-dayTimeDurations a e:Builtin.
func:multiply-dayTimeDuration a e:Builtin.
func:divide-dayTimeDuration a e:Builtin.
func:divide-dayTimeDuration-by-dayTimeDuration a e:Builtin.
func:add-yearMonthDuration-to-dateTime a e:Builtin.
func:add-yearMonthDuration-to-date a e:Builtin.
func:add-dayTimeDuration-to-dateTime a e:Builtin.
func:add-dayTimeDuration-to-date a e:Builtin.
func:add-dayTimeDuration-to-time a e:Builtin.
func:subtract-yearMonthDuration-from-dateTime a e:Builtin.
func:subtract-yearMonthDuration-from-date a e:Builtin.
func:subtract-dayTimeDuration-from-dateTime a e:Builtin.
func:subtract-dayTimeDuration-from-date a e:Builtin.
func:subtract-dayTimeDuration-from-time a e:Builtin.
pred:dateTime-equal a e:Builtin.
pred:dateTime-less-than a e:Builtin.
pred:dateTime-greater-than a e:Builtin.
pred:date-equal a e:Builtin.
pred:date-less-than a e:Builtin.
pred:date-greater-than a e:Builtin.
pred:time-equal a e:Builtin.
pred:time-less-than a e:Builtin.
pred:time-greater-than a e:Builtin.
pred:duration-equal a e:Builtin.
pred:dayTimeDuration-less-than a e:Builtin.
pred:dayTimeDuration-greater-than a e:Builtin.
pred:yearMonthDuration-less-than a e:Builtin.
pred:yearMonthDuration-greater-than a e:Builtin.
pred:dateTime-not-equal a e:Builtin.
pred:dateTime-less-than-or-equal a e:Builtin.
pred:dateTime-greater-than-or-equal a e:Builtin.
pred:date-not-equal a e:Builtin.
pred:date-less-than-or-equal a e:Builtin.
pred:date-greater-than-or-equal a e:Builtin.
pred:time-not-equal a e:Builtin.
pred:time-less-than-or-equal a e:Builtin.
pred:time-greater-than-or-equal a e:Builtin.
pred:duration-not-equal a e:Builtin.
pred:dayTimeDuration-less-than-or-equal a e:Builtin.
pred:dayTimeDuration-greater-than-or-equal a e:Builtin.
pred:yearMonthDuration-less-than-or-equal a e:Builtin.
pred:yearMonthDuration-greater-than-or-equal a e:Builtin.
func:PlainLiteral-from-string-lang a e:Builtin.
func:string-from-PlainLiteral a e:Builtin.
func:lang-from-PlainLiteral a e:Builtin.
func:PlainLiteral-compare a e:Builtin.
func:PlainLiteral-length a e:Builtin.
pred:matches-language-range a e:Builtin.
pred:is-list a e:Builtin.
pred:list-contains a e:Builtin.
func:make-list a e:Builtin.
func:count a e:Builtin.
func:get a e:Builtin.
func:sublist a e:Builtin.
func:append a e:Builtin.
func:concatenate a e:Builtin.
func:insert-before a e:Builtin.
func:remove a e:Builtin.
func:reverse a e:Builtin.
func:index-of a e:Builtin.
func:union a e:Builtin.
func:distinct-values a e:Builtin.
func:intersect a e:Builtin.
func:except a e:Builtin.


### Prolog Built-ins

prolog:abolish a e:Builtin.
prolog:abort a e:Builtin.
prolog:abs a e:Builtin.
prolog:absolute_file_name a e:Builtin.
prolog:acos a e:Builtin.
prolog:acosh a e:Builtin.
prolog:acyclic_term a e:Builtin.
prolog:alarm a e:Builtin.
prolog:append a e:Builtin.
prolog:arg a e:Builtin.
prolog:arithmetic_equal a e:Builtin.
prolog:arithmetic_greater_than a e:Builtin.
prolog:arithmetic_greater_than_or_equal a e:Builtin.
prolog:arithmetic_less_than a e:Builtin.
prolog:arithmetic_less_than_or_equal a e:Builtin.
prolog:arithmetic_not_equal a e:Builtin.
prolog:asin a e:Builtin.
prolog:asinh a e:Builtin.
prolog:assert a e:Builtin.
prolog:asserta a e:Builtin.
prolog:assertz a e:Builtin.
prolog:at_end_of_stream a e:Builtin.
prolog:atan a e:Builtin.
prolog:atan2 a e:Builtin.
prolog:atanh a e:Builtin.
prolog:atom a e:Builtin.
prolog:atom_chars a e:Builtin.
prolog:atom_codes a e:Builtin.
prolog:atom_concat a e:Builtin.
prolog:atom_length a e:Builtin.
prolog:atom_number a e:Builtin.
prolog:atomic a e:Builtin.
prolog:atomic_concat a e:Builtin.
prolog:atomic_list_concat a e:Builtin.
prolog:b_getval a e:Builtin.
prolog:b_setval a e:Builtin.
prolog:bagof a e:Builtin.
prolog:between a e:Builtin.
prolog:break a e:Builtin.
prolog:call a e:Builtin.
prolog:call_residue_vars a e:Builtin.
prolog:callable a e:Builtin.
prolog:catch a e:Builtin.
prolog:ceiling a e:Builtin.
prolog:char_code a e:Builtin.
prolog:char_conversion a e:Builtin.
prolog:char_type a e:Builtin.
prolog:character_count a e:Builtin.
prolog:clause a e:Builtin.
prolog:close a e:Builtin.
prolog:code_type a e:Builtin.
prolog:compare a e:Builtin.
prolog:compound a e:Builtin.
prolog:conjunction a e:Builtin.
prolog:copy_term a e:Builtin.
prolog:copy_term_nat a e:Builtin.
prolog:cos a e:Builtin.
prolog:cosh a e:Builtin.
prolog:cputime a e:Builtin.
prolog:create_mutable a e:Builtin.
prolog:create_prolog_flag a e:Builtin.
prolog:current_atom a e:Builtin.
prolog:current_char_conversion a e:Builtin.
prolog:current_input a e:Builtin.
prolog:current_key a e:Builtin.
prolog:current_module a e:Builtin.
prolog:current_op a e:Builtin.
prolog:current_output a e:Builtin.
prolog:current_predicate a e:Builtin.
prolog:current_prolog_flag a e:Builtin.
prolog:cut a e:Builtin.
prolog:cyclic_term a e:Builtin.
prolog:date_time_stamp a e:Builtin.
prolog:date_time_value a e:Builtin.
prolog:day_of_the_week a e:Builtin.
prolog:delete a e:Builtin.
prolog:dif a e:Builtin.
prolog:discontiguous a e:Builtin.
prolog:disjunction a e:Builtin.
prolog:display a e:Builtin.
prolog:div a e:Builtin.
prolog:duplicate_term a e:Builtin.
prolog:dynamic a e:Builtin.
prolog:e a e:Builtin.
prolog:ensure_loaded a e:Builtin.
prolog:environ a e:Builtin.
prolog:epsilon a e:Builtin.
prolog:erase a e:Builtin.
prolog:erf a e:Builtin.
prolog:erfc a e:Builtin.
prolog:exception a e:Builtin.
prolog:exists a e:Builtin.
prolog:exp a e:Builtin.
prolog:fail a e:Builtin.
prolog:false a e:Builtin.
prolog:file_base_name a e:Builtin.
prolog:file_name_extension a e:Builtin.
prolog:findall a e:Builtin.
prolog:flatten a e:Builtin.
prolog:float a e:Builtin.
prolog:float_function a e:Builtin.
prolog:float_fractional_part a e:Builtin.
prolog:float_integer_part a e:Builtin.
prolog:floor a e:Builtin.
prolog:flush_output a e:Builtin.
prolog:forall a e:Builtin.
prolog:format a e:Builtin.
prolog:format_time a e:Builtin.
prolog:freeze a e:Builtin.
prolog:frozen a e:Builtin.
prolog:functor a e:Builtin.
prolog:garbage_collect a e:Builtin.
prolog:garbage_collect_atoms a e:Builtin.
prolog:gc a e:Builtin.
prolog:gcd a e:Builtin.
prolog:get a e:Builtin.
prolog:get_byte a e:Builtin.
prolog:get_char a e:Builtin.
prolog:get_code a e:Builtin.
prolog:get_mutable a e:Builtin.
prolog:get_time a e:Builtin.
prolog:get0 a e:Builtin.
prolog:getcwd a e:Builtin.
prolog:ground a e:Builtin.
prolog:halt a e:Builtin.
prolog:if a e:Builtin.
prolog:if_then a e:Builtin.
prolog:if_then_else a e:Builtin.
prolog:ignore a e:Builtin.
prolog:include a e:Builtin.
prolog:initialization a e:Builtin.
prolog:instance a e:Builtin.
prolog:integer a e:Builtin.
prolog:integer_function a e:Builtin.
prolog:integer_conjunction a e:Builtin.
prolog:integer_disjunction a e:Builtin.
prolog:integer_exclusive_disjunction a e:Builtin.
prolog:integer_left_logical_shift a e:Builtin.
prolog:integer_negation a e:Builtin.
prolog:integer_power a e:Builtin.
prolog:integer_quotient a e:Builtin.
prolog:integer_right_logical_shift a e:Builtin.
prolog:is a e:Builtin.
prolog:is_list a e:Builtin.
prolog:is_stream a e:Builtin.
prolog:keysort a e:Builtin.
prolog:last a e:Builtin.
prolog:length a e:Builtin.
prolog:lgamma a e:Builtin.
prolog:line_count a e:Builtin.
prolog:line_position a e:Builtin.
prolog:listing a e:Builtin.
prolog:log a e:Builtin.
prolog:log10 a e:Builtin.
prolog:lsb a e:Builtin.
prolog:max a e:Builtin.
prolog:max_list a e:Builtin.
prolog:member a e:Builtin.
prolog:memberchk a e:Builtin.
prolog:message_to_string a e:Builtin.
prolog:min a e:Builtin.
prolog:min_list a e:Builtin.
prolog:minus a e:Builtin.
prolog:mod a e:Builtin.
prolog:msb a e:Builtin.
prolog:multifile a e:Builtin.
prolog:name a e:Builtin.
prolog:nb_current a e:Builtin.
prolog:nb_delete a e:Builtin.
prolog:nb_getval a e:Builtin.
prolog:nb_linkarg a e:Builtin.
prolog:nb_linkval a e:Builtin.
prolog:nb_setarg a e:Builtin.
prolog:nb_setval a e:Builtin.
prolog:nl a e:Builtin.
prolog:nonvar a e:Builtin.
prolog:not_provable a e:Builtin.
prolog:not_unifiable a e:Builtin.
prolog:nth a e:Builtin.
prolog:nth_clause a e:Builtin.
prolog:nth0 a e:Builtin.
prolog:nth1 a e:Builtin.
prolog:number a e:Builtin.
prolog:number_chars a e:Builtin.
prolog:number_codes a e:Builtin.
prolog:numbervars a e:Builtin.
prolog:numlist a e:Builtin.
prolog:on_signal a e:Builtin.
prolog:once a e:Builtin.
prolog:op a e:Builtin.
prolog:open a e:Builtin.
prolog:parse_time a e:Builtin.
prolog:peek_byte a e:Builtin.
prolog:peek_char a e:Builtin.
prolog:peek_code a e:Builtin.
prolog:permutation a e:Builtin.
prolog:pi a e:Builtin.
prolog:plus a e:Builtin.
prolog:plus_function a e:Builtin.
prolog:popcount a e:Builtin.
prolog:portray_clause a e:Builtin.
prolog:power a e:Builtin.
prolog:predicate_property a e:Builtin.
prolog:predsort a e:Builtin.
prolog:print a e:Builtin.
prolog:print_message a e:Builtin.
prolog:print_message_lines a e:Builtin.
prolog:product a e:Builtin.
prolog:prolog_flag a e:Builtin.
prolog:prolog_load_context a e:Builtin.
prolog:prompt a e:Builtin.
prolog:put a e:Builtin.
prolog:put_byte a e:Builtin.
prolog:put_char a e:Builtin.
prolog:put_code a e:Builtin.
prolog:quotient a e:Builtin.
prolog:random a e:Builtin.
prolog:rational a e:Builtin.
prolog:rational_function a e:Builtin.
prolog:rationalize a e:Builtin.
prolog:read a e:Builtin.
prolog:read_term a e:Builtin.
prolog:recorda a e:Builtin.
prolog:recorded a e:Builtin.
prolog:recordz a e:Builtin.
prolog:rem a e:Builtin.
prolog:rename_file a e:Builtin.
prolog:repeat a e:Builtin.
prolog:retract a e:Builtin.
prolog:retractall a e:Builtin.
prolog:reverse a e:Builtin.
prolog:round a e:Builtin.
prolog:same_length a e:Builtin.
prolog:see a e:Builtin.
prolog:seeing a e:Builtin.
prolog:seen a e:Builtin.
prolog:select a e:Builtin.
prolog:selectchk a e:Builtin.
prolog:set_input a e:Builtin.
prolog:set_output a e:Builtin.
prolog:set_prolog_flag a e:Builtin.
prolog:set_stream_position a e:Builtin.
prolog:setarg a e:Builtin.
prolog:setof a e:Builtin.
prolog:set_random a e:Builtin.
prolog:sign a e:Builtin.
prolog:simple a e:Builtin.
prolog:sin a e:Builtin.
prolog:sinh a e:Builtin.
prolog:skip a e:Builtin.
prolog:sort a e:Builtin.
prolog:source_file a e:Builtin.
prolog:source_location a e:Builtin.
prolog:sqrt a e:Builtin.
prolog:stamp_date_time a e:Builtin.
prolog:statistics a e:Builtin.
prolog:stream_position a e:Builtin.
prolog:stream_position_data a e:Builtin.
prolog:stream_property a e:Builtin.
prolog:sub_atom a e:Builtin.
prolog:sublist a e:Builtin.
prolog:subsumes_term a e:Builtin.
prolog:succ a e:Builtin.
prolog:sum_list a e:Builtin.
prolog:tab a e:Builtin.
prolog:tan a e:Builtin.
prolog:tanh a e:Builtin.
prolog:tell a e:Builtin.
prolog:telling a e:Builtin.
prolog:term_greater_than a e:Builtin.
prolog:term_greater_than_or_equal a e:Builtin.
prolog:term_hash a e:Builtin.
prolog:term_identical a e:Builtin.
prolog:term_less_than a e:Builtin.
prolog:term_less_than_or_equal a e:Builtin.
prolog:term_not_identical a e:Builtin.
prolog:term_to_atom a e:Builtin.
prolog:term_variables a e:Builtin.
prolog:throw a e:Builtin.
prolog:time a e:Builtin.
prolog:time_file a e:Builtin.
prolog:told a e:Builtin.
prolog:true a e:Builtin.
prolog:truncate a e:Builtin.
prolog:unifiable a e:Builtin.
prolog:unify a e:Builtin.
prolog:unify_with_occurs_check a e:Builtin.
prolog:univ a e:Builtin.
prolog:unknown a e:Builtin.
prolog:update_mutable a e:Builtin.
prolog:var a e:Builtin.
prolog:variant a e:Builtin.
prolog:version a e:Builtin.
prolog:when a e:Builtin.
prolog:with_output_to a e:Builtin.
prolog:write a e:Builtin.
prolog:write_canonical a e:Builtin.
prolog:write_term a e:Builtin.
prolog:writeln a e:Builtin.
prolog:writeq a e:Builtin.