On 13 April 2017 at 22:19, oldk1331 <[email protected]> wrote:
> Bill, just an early thought:
>
> I think the setProperty/property from BasicOperator
> can be useful in such situation, e.g. attach a 'positive'
> property to a constant (nullary operator) 'x', then
> for example 'x>0' can return ture (well, there's no
> '>' in EXPR), or 'sin(x*%pi)' can return 0. But this
> approach will require deep changes from all over
> the place. Maybe doing so in a new Domain over
> EXPR is cleaner. Just an early thought.
>
In fact this is already how pattern matching stores its properties.
The syntax for rules in the interpreter, e.g.
--
int1 := (m:Expression Integer):Boolean+->check(m,'integer)
assumming := rule
sin((n | int1(n))*2*%pi) == 0
cos((n | int1(n))*2*%pi) == 1
--
is just syntactic sugar for
(55) -> ruleset [ _rule(sin(suchThat('n,int1)*2*%pi),0),
_rule(cos(suchThat('n,int1)*2*%pi),1)]
(55) {sin(2 n %pi) == 0, cos(2 n %pi) == 1}
Type: Ruleset(Integer,Integer,Expression(Integer))
where
(56) -> suchThat('n,int1)
(56) n
Type: Expression(Integer)
creates a nullary kernel for the symbol and attaches int1 as a property.
(57) -> properties operator mainKernel %
(57) table(%pmpredicate = NONE,%symbol = NONE)
Type: AssociationList(Symbol,None)
%pmpredicate is the key of the function entry in this table. Besides
%pmpredicate there are some other special purpose pattern matching
properties. The 'assume' operator could do something very similar. But
the way my proof of concept code uses a kernel to propagate the
inference of class membership through other operators requires at
least one other special purpose kernel to carry this inference.
I am in favor of implementing symbolic inequalities in Expression
similar to the way equality is handled now.
There are some preliminary ideas here
http://axiom-wiki.newsynthesis.org/SandBoxInequation
But I am not so certain about whether or not it is a good idea to
embed specific fixed predicate properties on symbols very deeply into
the algebra itself. Right now I am more in favor of implementing this
as a layer on top of the algebra.
Bill.
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.