Re: Positive[a] = True ???
- To: mathgroup at smc.vnet.net
- Subject: [mg2530] Re: [mg2518] Positive[a] = True ???
- From: Allan Hayes <hay at haystack.demon.co.uk>
- Date: Thu, 16 Nov 1995 01:46:28 -0500
Frank Domokos <domokos at chaph.usc.edu> in [mg2518] Positive[a] = True ??? asks about the following kind of response IN>> Positive[a] = True; OUT>> Set::write: Tag Positive in Positive[a] is Protected. Frank, Most system functions, like Positive, are protected (have the attribute Protected) to avoid unintentional changes. You cannot make a definition for them ("tagged" by them) without unprotecting them (see later). Here are some ways round this for your example 1.Tag your definition with a instead of f: a. by using UpSet (^=) instead of Set (=): Positive[a]^= True; or, more specifically, b. by using TagSet: a/:Positive[a] = True; Or 2. Unprotect Positive to allow definitions to be tagged by it: Unprotect[Positive]; Positive[a] = True; (eventually re-protecting Positive) Of course if a is protected or is an expression with a protected head then you will need to unprotect either Positive or a or the head of a. Allan Hayes hay at haystack.demon.co.uk