On 30 January 2017 at 12:18, Kurt Pagani <[email protected]> wrote:
> Look:
>
> rs:=rule cos(x)*sin(y)-sin(x)*cos(y) == sin(y-x)
> rc:=rule cos(x)*cos(y)-sin(x)*sin(y) == cos(x+y)
>
> t1 := paren(cos(x)*sin(y)-sin(x)*cos(y))
> t2 := paren(cos(x)*cos(y)-sin(x)*sin(y))
> expr := t1*cos(x3) + 5 + tan(q)*tan(w) + t2*w*cos(a)+ t1*t2*r3
>
> rc rs expr -- voilĂ ;-)
>
> more below ...
>
> On Monday, 30 January 2017 15:45:50 UTC+1, Bill Page wrote:
>>
>> Why do you find it interesting? 'box' and 'paren' are just kernels
>> with no automatic simplifications.
>
>
> That's the interesting part (at least to me) when dealing with rules. If I
> had known 'paren' before I wouldn't have suggested the construction using
> equations (see former post).
>
Well, as I admit that it was "of limited value". :) Note that the
argument of paren is of course still evaluated.
>>
>> On output 'box' is invisible but
>
> Indeed, but tex or html output uses parens ... so I'm wondering why not in
> algebraic mode?
>
?? I do not see any parenthesis printed for 'box' in either algebraic
or tex output
(1) -> )set output tex on
(1) -> box(x)
(1) x
$$
x
\leqno(1)
$$
Type: Expression(Integer)
(2) -> paren(x)
(2) (x)
$$
\left(
x
\right)
\leqno(2)
$$
Type: Expression(Integer)
But they do appear when you use paren. As far as I can see they
difference is only in the output formatting. If that is the case then
I think that having two such operators is misguided. There should only
be 'paren'.
>>
>> 'paren' displays as parenthesis. As with all kernels in Expression the
>> arguments of the kernel are themselves members of Expression
>> (recursively). This seems to be of limited usefulness to me - a kind
>> of a hack to avoid some forms of autosimplification. 'distribute' just
>> evaluates 'box' and 'paren' as identities (selectively in the two
>> argument for).
>
>
> It would certainly be of limited use without 'distribute', however, as long
> as we have an 'inverse' it seems to me well defined as any other 'hack' ;-)
>
OK. It still seems like a hack to me since there is no "mathematical"
significance to the use of 'paren' as an operator in Expression.
(4) -> paren(x)=x
(4) (x) = x
Type: Equation(Expression(Integer))
(5) -> test %
(5) false
>>
>> I rather think that it attempts to solve the problem at
>> the wrong level.
>>
>
> Is it a problem at all?
Sorry, I didn't really define what I "problem".
> If you're alluding on symbolic expressions then I'll fully agree.
>
Yes. So then we agree.
--
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.