True


True is the affirmative Boolean value.

False is Not[True].


True
[expr] returns True if expr has no assigned value, (and Not[True] otherwise).


If set is a PatternSet, then

True[set]

...is the subPatternSet of all unchanging (unassigned) elements in set.


False[set]

...is the subPatternSet whose elements have assigned values.




See English definition of "true".


True is the affirmative Boolean value.
False is Not[True].



Unchanging True


If expr is any Expression, then...


(1)                    True[expr]

...returns True if expr has no assigned value, and Not[True] otherwise.


When the invocation of "True[expr]" tests expr, this may or may not change the environment. When an ElicitationForm invokes its assignment, the environment changes according to the ElicitationForm's assigned procedure. This is usually what the programmer expects.


On the other hand, incorrectly invoking an ElicitationForm can also change the environment, and this is rarely the programmer's intent. Whether an ElicitationForm changes the environment, ( Name assignments), or whether an ElicitationForm is written to have no effect in its environment, depends on how it is written.


An ElicitationForm that changes the environment without being invoked violates the basic programmingideal that a rejected branch should leave no residue. For this reason, ElicitationForms that leave no after-effects are recommended. Where possible, ElicitationForms should have no environmental consequence. If expr is such an ElicitationForm, then True[expr] executes without changing the environment (aside from the fact of the Boolean result).


Name
s with the " Pattern Attribute" have the characteristic that elicitations have no effect on the environment if they unsuccessfully invoke an assignment. Names with the " Pattern Attribute" enforce a syntax on their argument(s).




True[set] & False[set]



In the following, set is a PatternSet.


(2) True[set]



...is the subPatternSet of all unchanging (unassigned) elements in set.

The above form (2) is the subPatternSet of set, matching unassigned Expressions.


Similarly,

                        Not[True][set]

(3) or

False[set]




...is the subPatternSet of all elements in set that have assigned values (or which change when Reckoned).


False[set] is the PatternSet whose elements have assigned values.

This means, if elis a member of (3), it has an assigned value, and Reckon[False[el]] returns True.


Both (2) and (3) are LogicalPatternSets.



Counterintuitive True[...] constructions



It is possible for something to be assigned to itself. Thus an Expression which is assigned to its own Name would return False even though its evaluation would not apparently change. For example...


                  Name[namedSelf, namedSelf]



...is an an ElicitationForm such that True[namedSelf] returns False.


This is true despite the fact that Reckon[namedSelf] would return namedSelf.



An ElicitationForm, defined as Name[expr, True] would behave as follows:

Reckon[expr] returns True.

True[expr] returns False.




English definition of "true"


trueadj.

1. Steady in adhering to friends, promises, allegiance, or the like; failthful; loyal; not false, or perfidious; as, a true friend, charge, etc.; true to his word.

2. Honest; just; upright; as, a true man. Archaic.

3. To be relied upon; certain; as, a true indication.

4. Conformable to fact; in accordance with the actual state of things; correct; not false, erroneous, inaccurate, or the like; as, a true relation or narration; a true history; a declaration is true when it states the facts; --often used elliptically for it is true, truly, doubtless.

5. Constant in telling the truth; truthful; veracious.

Dare to be true; nothing can need a lie. Herbert.

6. Sincere; unfeigning; void of deceit; as, true love.

7. Properly so called; ideally or typically such; not counterfeit or adulterated; genuine; as, true balsam; a true Christian; true justice.

True piety is cheerful as the day. Cowper.

8. Right; proper; such as it should be; as, presented in their true order and bearings.

9. Legitimate; rightful; as the true owner.

10. Placed, fitted, or formed, accurately; as, the corner of the square is not true.

11. Conformable to a standard, rule, or pattern; exact; accurate; correct; as, a true copy; a true likeness of the original; a gallop is called true when the horse gallops on the right foot when turning to the right, on the left foot in turning to the left.

Making his eye, foot, and hand keep true time. Scott.

12. Conformable to nature or reality; as, true stories.

13. Constant in direction; steady; -- of winds.

14. Biol. Genuine; real; not deviating from the essential characters of a class; as, a lizard is a true reptile; a whale is a true, but not a typical mammal. Cf. TYPICAL, adj., 2.

15. Geog. & Surveying Determined with reference to the earth s axis rather thean the Magnetic Poles; as, true north; true west; a true bearing.

[For many true phrases, see the second word.]

Syn. -Steadfast, unfaltering, devoted; authentic, pure; faithful, precise; lawful; reliable, unerring. See REAL.


Related


Mathematica also has the following related functions:

{BitAnd, BitOr, BitXor}. These functions substitute the interpretation of True/False with 1/0.


Mathematica's True Symbol.


Grok32`

(c) 2004-2007 by

John Van Wie Bergamini.

All rights reserved.



Hosted by www.Geocities.ws

1