fricas
domains:=empty()$Table(Symbol,BasicOperator)
Type: Table(Symbol,
BasicOperator
?)
fricas
assume(x:Expression Integer,t:Symbol):Expression Integer ==
if not key?(t,domains) then domains.t := operator t
(domains.t) x
Function declaration assume : (Expression(Integer),Symbol) ->
Expression(Integer) has been added to workspace.
Type: Void
fricas
prove := rule
assume(x,'positiveInteger)+(y|integer?(y) and integer(y)>=0) == assume(x+y,'positiveInteger)
assume(x,'positiveInteger)+assume(y,'positiveInteger) == assume(x+y,'positiveInteger)
fricas
Compiling function assume with type (Expression(Integer),Symbol) ->
Expression(Integer)
Type: Ruleset(Integer,Integer,Expression(Integer))
fricas
check(x:Expression Integer,t:Symbol):Boolean ==
k:=retractIfCan(prove x)@Union(Kernel Expression Integer,"failed")
if k case Kernel Expression Integer then is?(k,t) else false
Function declaration check : (Expression(Integer),Symbol) -> Boolean
has been added to workspace.
Type: Void
fricas
assume(x,'positiveInteger)
Type: Expression(Integer)
fricas
prove %
Type: Expression(Integer)
fricas
check(assume(x,'positiveInteger),'positiveInteger)
fricas
Compiling function check with type (Expression(Integer),Symbol) ->
Boolean
Type: Boolean
fricas
check(assume(x,'positiveInteger)+1,'positiveInteger)
Type: Boolean
fricas
check(3,'positiveInteger)
Type: Boolean
fricas
domains
Type: Table(Symbol,
BasicOperator
?)