File: maxima_11.html

package info (click to toggle)
maxima 5.10.0-6
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 44,268 kB
  • ctags: 17,987
  • sloc: lisp: 152,894; fortran: 14,667; perl: 14,204; tcl: 10,103; sh: 3,376; makefile: 2,202; ansic: 471; awk: 7
file content (603 lines) | stat: -rw-r--r-- 22,445 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
<html>
<!-- Created on September, 20 2006 by texi2html 1.76 -->
<!--
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
            Karl Berry  <karl@freefriends.org>
            Olaf Bachmann <obachman@mathematik.uni-kl.de>
            and many others.
Maintained by: Many creative people <dev@texi2html.cvshome.org>
Send bugs and suggestions to <users@texi2html.cvshome.org>

-->
<head>
<title>Maxima Manual: 11. Contexts</title>

<meta name="description" content="Maxima Manual: 11. Contexts">
<meta name="keywords" content="Maxima Manual: 11. Contexts">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="texi2html 1.76">
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
pre.display {font-family: serif}
pre.format {font-family: serif}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: serif; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: serif; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.sansserif {font-family:sans-serif; font-weight:normal;}
ul.toc {list-style: none}
body
{
    color: black;
    background: white; 
    margin-left: 8%;
    margin-right: 13%;
}

h1
{
    margin-left: +8%;
    font-size: 150%;
    font-family: sans-serif
}

h2
{
    font-size: 125%;
    font-family: sans-serif
}

h3
{
    font-size: 100%;
    font-family: sans-serif
}

h2,h3,h4,h5,h6 { margin-left: +4%; }

div.textbox
{
    border: solid;
    border-width: thin;
    /* width: 100%; */
    padding-top: 1em;
    padding-bottom: 1em;
    padding-left: 2em;
    padding-right: 2em
}

div.titlebox
{
    border: none;
    padding-top: 1em;
    padding-bottom: 1em;
    padding-left: 2em;
    padding-right: 2em;
    background: rgb(200,255,255);
    font-family: sans-serif
}

div.synopsisbox
{
    border: none;
    padding-top: 1em;
    padding-bottom: 1em;
    padding-left: 2em;
    padding-right: 2em;
     background: rgb(255,220,255);
    /*background: rgb(200,255,255); */
    /* font-family: fixed */
}

pre.example
{
    border: none;
    padding-top: 1em;
    padding-bottom: 1em;
    padding-left: 1em;
    padding-right: 1em;
    background: rgb(247,242,180); /* kind of sandy */
    /* background: rgb(200,255,255); */ /* sky blue */
    font-family: "Lucida Console", monospace
}

div.spacerbox
{
    border: none;
    padding-top: 2em;
    padding-bottom: 2em
}

div.image
{
    margin: 0;
    padding: 1em;
    text-align: center;
}
-->
</style>

<link rel="icon" href="http://maxima.sourceforge.net/favicon.ico"/>
</head>

<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">

<a name="Contexts"></a>
<a name="SEC42"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="maxima_10.html#SEC41" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC43" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="maxima_10.html#SEC40" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_12.html#SEC44" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_72.html#SEC264" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h1 class="chapter"> 11. Contexts </h1>

<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#SEC43">11.1 Definitions for Contexts</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
</table>

<hr size="6">
<a name="Definitions-for-Contexts"></a>
<a name="SEC43"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC42" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="maxima_12.html#SEC44" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC42" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC42" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_12.html#SEC44" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_72.html#SEC264" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 11.1 Definitions for Contexts </h2>

<dl>
<dt><u>Function:</u> <b>activate</b><i> (<var>context_1</var>, ..., <var>context_n</var>)</i>
<a name="IDX364"></a>
</dt>
<dd><p>Activates the contexts <var>context_1</var>, ..., <var>context_n</var>.
The facts in these contexts are then available to
make deductions and retrieve information.
The facts in these contexts are not listed by <code>facts ()</code>.
</p>
<p>The variable <code>activecontexts</code> is the list
of contexts which are active by way of the <code>activate</code> function.
</p>
</dd></dl>

<dl>
<dt><u>System variable:</u> <b>activecontexts</b>
<a name="IDX365"></a>
</dt>
<dd><p>Default value: <code>[]</code>
</p>
<p><code>activecontexts</code> is a list of the contexts which are active
by way of the <code>activate</code> function, as opposed to being active because
they are subcontexts of the current context.
</p>
</dd></dl>


<dl>
<dt><u>Function:</u> <b>assume</b><i> (<var>pred_1</var>, ..., <var>pred_n</var>)</i>
<a name="IDX366"></a>
</dt>
<dd><p>Adds predicates <var>pred_1</var>, ..., <var>pred_n</var> to the current context.
If a predicate is inconsistent or redundant 
with the predicates in the current context,
it is not added to the context.
The context accumulates predicates from each call to <code>assume</code>.
</p>
<p><code>assume</code> returns a list whose elements are the predicates added to the context
or the atoms <code>redundant</code> or <code>inconsistent</code> where applicable.
</p>
<p>The predicates <var>pred_1</var>, ..., <var>pred_n</var> can only be expressions
with the relational operators <code>&lt; &lt;= equal notequal &gt;=</code> and <code>&gt;</code>.
Predicates cannot be literal equality <code>=</code> or literal inequality <code>#</code> expressions,
nor can they be predicate functions such as <code>integerp</code>.
</p>
<p>Compound predicates of the form <code><var>pred_1</var> and ... and <var>pred_n</var></code>
are recognized,
but not <code><var>pred_1</var> or ... or <var>pred_n</var></code>.
<code>not <var>pred_k</var></code> is recognized if <var>pred_k</var> is a relational predicate.
Expressions of the form <code>not (<var>pred_1</var> and <var>pred_2</var>)</code>
and <code>not (<var>pred_1</var> or <var>pred_2</var>)</code>
are not recognized.
</p>
<p>Maxima's deduction mechanism is not very strong;
there are many obvious consequences which cannot be determined by <code>is</code>.
This is a known weakness.
</p>
<p><code>assume</code> evaluates its arguments.
</p>
<p>See also <code>is</code>, <code>facts</code>, <code>forget</code>, <code>context</code>, and <code>declare</code>.
</p>
<p>Examples:
</p>

<table><tr><td>&nbsp;</td><td><pre class="example">(%i1) assume (xx &gt; 0, yy &lt; -1, zz &gt;= 0);
(%o1)              [xx &gt; 0, yy &lt; - 1, zz &gt;= 0]
(%i2) assume (aa &lt; bb and bb &lt; cc);
(%o2)                  [bb &gt; aa, cc &gt; bb]
(%i3) facts ();
(%o3)     [xx &gt; 0, - 1 &gt; yy, zz &gt;= 0, bb &gt; aa, cc &gt; bb]
(%i4) is (xx &gt; yy);
(%o4)                         true
(%i5) is (yy &lt; -yy);
(%o5)                         true
(%i6) is (sinh (bb - aa) &gt; 0);
(%o6)                         true
(%i7) forget (bb &gt; aa);
(%o7)                       [bb &gt; aa]
(%i8) prederror : false;
(%o8)                         false
(%i9) is (sinh (bb - aa) &gt; 0);
(%o9)                        unknown
(%i10) is (bb^2 &lt; cc^2);
(%o10)                       unknown
</pre></td></tr></table>
</dd></dl>

<dl>
<dt><u>Option variable:</u> <b>assumescalar</b>
<a name="IDX367"></a>
</dt>
<dd><p>Default value: <code>true</code>
</p>
<p><code>assumescalar</code> helps govern whether expressions <code>expr</code>
for which <code>nonscalarp (expr)</code> is <code>false</code>
are assumed to behave like scalars
for certain transformations.
</p>
<p>Let <code>expr</code> represent any expression other than a list or a matrix,
and let <code>[1, 2, 3]</code> represent any list or matrix.
Then <code>expr . [1, 2, 3]</code> yields <code>[expr, 2 expr, 3 expr]</code>
if <code>assumescalar</code> is <code>true</code>, or <code>scalarp (expr)</code> is
<code>true</code>, or <code>constantp (expr)</code> is <code>true</code>.
</p>
<p>If <code>assumescalar</code> is <code>true</code>, such
expressions will behave like scalars only for commutative
operators, but not for noncommutative multiplication <code>.</code>.
</p>
<p>When <code>assumescalar</code> is <code>false</code>, such
expressions will behave like non-scalars.
</p>
<p>When <code>assumescalar</code> is <code>all</code>,
such expressions will behave like scalars for all the operators listed
above.
</p>
</dd></dl>


<dl>
<dt><u>Option variable:</u> <b>assume_pos</b>
<a name="IDX368"></a>
</dt>
<dd><p>Default value: <code>false</code>
</p>
<p>When <code>assume_pos</code> is <code>true</code>
and the sign of a parameter <var>x</var> cannot be determined from the current context
or other considerations,
<code>sign</code> and <code>asksign (<var>x</var>)</code> return <code>true</code>.
This may forestall some automatically-generated <code>asksign</code> queries,
such as may arise from <code>integrate</code> or other computations.
</p>
<p>By default, a parameter is <var>x</var> such that <code>symbolp (<var>x</var>)</code>
or <code>subvarp (<var>x</var>)</code>.
The class of expressions considered parameters can be modified to some extent
via the variable <code>assume_pos_pred</code>.
</p>
<p><code>sign</code> and <code>asksign</code> attempt to deduce the sign of expressions
from the sign of operands within the expression.
For example, if <code>a</code> and <code>b</code> are both positive,
then <code>a + b</code> is also positive.
</p>
<p>However, there is no way to bypass all <code>asksign</code> queries.
In particular, when the <code>asksign</code> argument is a
difference <code><var>x</var> - <var>y</var></code> or a logarithm <code>log(<var>x</var>)</code>,
<code>asksign</code> always requests an input from the user,
even when <code>assume_pos</code> is <code>true</code> and <code>assume_pos_pred</code> is
a function which returns <code>true</code> for all arguments.
</p>
</dd></dl>


<dl>
<dt><u>Option variable:</u> <b>assume_pos_pred</b>
<a name="IDX369"></a>
</dt>
<dd><p>Default value: <code>false</code>
</p>
<p>When <code>assume_pos_pred</code> is assigned the name of a function
or a lambda expression of one argument <var>x</var>,
that function is called to determine
whether <var>x</var> is considered a parameter for the purpose of <code>assume_pos</code>.
<code>assume_pos_pred</code> is ignored when <code>assume_pos</code> is <code>false</code>.
</p>
<p>The <code>assume_pos_pred</code> function is called by <code>sign</code> and <code>asksign</code>
with an argument <var>x</var>
which is either an atom, a subscripted variable, or a function call expression.
If the <code>assume_pos_pred</code> function returns <code>true</code>,
<var>x</var> is considered a parameter for the purpose of <code>assume_pos</code>.
</p>
<p>By default, a parameter is <var>x</var> such that <code>symbolp (<var>x</var>)</code>
or <code>subvarp (<var>x</var>)</code>.
</p>
<p>See also <code>assume</code> and <code>assume_pos</code>.
</p>
<p>Examples:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">(%i1) assume_pos: true$
(%i2) assume_pos_pred: symbolp$
(%i3) sign (a);
(%o3)                          pos
(%i4) sign (a[1]);
(%o4)                          pnz
(%i5) assume_pos_pred: lambda ([x], display (x), true)$
(%i6) asksign (a);
                              x = a

(%o6)                          pos
(%i7) asksign (a[1]);
                             x = a
                                  1

(%o7)                          pos
(%i8) asksign (foo (a));
                           x = foo(a)

(%o8)                          pos
(%i9) asksign (foo (a) + bar (b));
                           x = foo(a)

                           x = bar(b)

(%o9)                          pos
(%i10) asksign (log (a));
                              x = a

Is  a - 1  positive, negative, or zero?

p;
(%o10)                         pos
(%i11) asksign (a - b);
                              x = a

                              x = b

                              x = a

                              x = b

Is  b - a  positive, negative, or zero?

p;
(%o11)                         neg
</pre></td></tr></table>
</dd></dl>


<dl>
<dt><u>Option variable:</u> <b>context</b>
<a name="IDX370"></a>
</dt>
<dd><p>Default value: <code>initial</code>
</p>
<p><code>context</code> names the collection of facts maintained by <code>assume</code> and <code>forget</code>.
<code>assume</code> adds facts to the collection named by <code>context</code>,
while <code>forget</code> removes facts.
</p>
<p>Binding <code>context</code> to a name <var>foo</var> changes the current context to <var>foo</var>.
If the specified context <var>foo</var> does not yet exist,
it is created automatically by a call to <code>newcontext</code>.
The specified context is activated automatically.
</p>
<p>See <code>contexts</code> for a general description of the context mechanism.
</p>
</dd></dl>

<dl>
<dt><u>Option variable:</u> <b>contexts</b>
<a name="IDX371"></a>
</dt>
<dd><p>Default value: <code>[initial, global]</code>
</p>
<p><code>contexts</code> is a list of the contexts which
currently exist, including the currently active context.
</p>
<p>The context mechanism makes it possible for a user to bind together
and name a collection of facts, called a context.
Once this is done, the user can have Maxima assume or forget large numbers
of facts merely by activating or deactivating their context.
</p>
<p>Any symbolic atom can be a context, and the facts contained in that
context will be retained in storage until destroyed one by one
by calling <code>forget</code> or destroyed as a whole by calling <code>kill</code>
to destroy the context to which they belong.
</p>
<p>Contexts exist in a hierarchy, with the root always being
the context <code>global</code>, which contains information about Maxima that some
functions need.  When in a given context, all the facts in that
context are &quot;active&quot; (meaning that they are used in deductions and
retrievals) as are all the facts in any context which is a subcontext
of the active context.
</p>
<p>When a fresh Maxima is started up, the user is in a
context called <code>initial</code>, which has <code>global</code> as a subcontext.
</p>
<p>See also <code>facts</code>, <code>newcontext</code>,
<code>supcontext</code>, <code>killcontext</code>, <code>activate</code>, <code>deactivate</code>, <code>assume</code>, and <code>forget</code>.
</p>
</dd></dl>

<dl>
<dt><u>Function:</u> <b>deactivate</b><i> (<var>context_1</var>, ..., <var>context_n</var>)</i>
<a name="IDX372"></a>
</dt>
<dd><p>Deactivates the specified contexts <var>context_1</var>, ..., <var>context_n</var>.
</p>
</dd></dl>

<dl>
<dt><u>Function:</u> <b>facts</b><i> (<var>item</var>)</i>
<a name="IDX373"></a>
</dt>
<dt><u>Function:</u> <b>facts</b><i> ()</i>
<a name="IDX374"></a>
</dt>
<dd><p>If <var>item</var> is the name of a context,
<code>facts (<var>item</var>)</code> returns a list
of the facts in the specified context.
</p>
<p>If <var>item</var> is not the name of a context,
<code>facts (<var>item</var>)</code> returns a list of the facts known about <var>item</var> in the current
context.  Facts that are active, but in a different context, are not listed.
</p>
<p><code>facts ()</code> (i.e., without an argument) lists the current context.
</p>
</dd></dl>

<dl>
<dt><u>Declaration:</u> <b>features</b>
<a name="IDX375"></a>
</dt>
<dd><p>Maxima recognizes certain mathematical properties of functions and variables.
These are called &quot;features&quot;.
</p>
<p><code>declare (<var>x</var>, <var>foo</var>)</code> gives the property <var>foo</var>
to the function or variable <var>x</var>.
</p>
<p><code>declare (<var>foo</var>, feature)</code> declares a new feature <var>foo</var>.
For example,
<code>declare ([red, green, blue], feature)</code>
declares three new features, <code>red</code>, <code>green</code>, and <code>blue</code>.
</p>
<p>The predicate <code>featurep (<var>x</var>, <var>foo</var>)</code>
returns <code>true</code> if <var>x</var> has the <var>foo</var> property,
and <code>false</code> otherwise.
</p>
<p>The infolist <code>features</code> is a list of known features.
These are
<code>integer</code>, <code>noninteger</code>, <code>even</code>, <code>odd</code>, <code>rational</code>,
<code>irrational</code>, <code>real</code>, <code>imaginary</code>, <code>complex</code>,
<code>analytic</code>, <code>increasing</code>, <code>decreasing</code>, <code>oddfun</code>,
<code>evenfun</code>, <code>posfun</code>, <code>commutative</code>, <code>lassociative</code>,
<code>rassociative</code>, <code>symmetric</code>, and <code>antisymmetric</code>,
plus any user-defined features.
</p>
<p><code>features</code> is a list of mathematical features.
There is also a list of non-mathematical, system-dependent features. See <code>status</code>.
</p>
</dd></dl>

<dl>
<dt><u>Function:</u> <b>forget</b><i> (<var>pred_1</var>, ..., <var>pred_n</var>)</i>
<a name="IDX376"></a>
</dt>
<dt><u>Function:</u> <b>forget</b><i> (<var>L</var>)</i>
<a name="IDX377"></a>
</dt>
<dd><p>Removes predicates established by <code>assume</code>.
The predicates may be expressions equivalent to (but not necessarily identical to)
those previously assumed.
</p>
<p><code>forget (<var>L</var>)</code>, where <var>L</var> is a list of predicates,
forgets each item on the list.
</p>
</dd></dl>

<dl>
<dt><u>Function:</u> <b>killcontext</b><i> (<var>context_1</var>, ..., <var>context_n</var>)</i>
<a name="IDX378"></a>
</dt>
<dd><p>Kills the contexts <var>context_1</var>, ..., <var>context_n</var>.
</p>
<p>If one of the contexts is the current context, the new current
context will become the first available subcontext of the current
context which has not been killed.  If the first available unkilled
context is <code>global</code> then <code>initial</code> is used instead.  If the <code>initial</code>
context is killed, a new, empty <code>initial</code> context is created.
</p>
<p><code>killcontext</code> refuses to kill a context which is
currently active, either because it is a subcontext of the current
context, or by use of the function <code>activate</code>.
</p>
<p><code>killcontext</code> evaluates its arguments.
<code>killcontext</code> returns <code>done</code>.
</p>
</dd></dl>

<dl>
<dt><u>Function:</u> <b>newcontext</b><i> (<var>name</var>)</i>
<a name="IDX379"></a>
</dt>
<dd><p>Creates a new, empty context, called <var>name</var>, which
has <code>global</code> as its only subcontext.  The newly-created context
becomes the currently active context.
</p>
<p><code>newcontext</code> evaluates its argument.
<code>newcontext</code> returns <var>name</var>.
</p>
</dd></dl>

<dl>
<dt><u>Function:</u> <b>supcontext</b><i> (<var>name</var>, <var>context</var>)</i>
<a name="IDX380"></a>
</dt>
<dt><u>Function:</u> <b>supcontext</b><i> (<var>name</var>)</i>
<a name="IDX381"></a>
</dt>
<dd><p>Creates a new context, called <var>name</var>,
which has <var>context</var> as a subcontext.
<var>context</var> must exist.
</p>
<p>If <var>context</var> is not specified, the current context is assumed.
</p>
</dd></dl>

<hr size="6">
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC42" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="maxima_12.html#SEC44" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_72.html#SEC264" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<p>
 <font size="-1">
  This document was generated by <em>Robert Dodier</em> on <em>September, 20 2006</em> using <a href="http://texi2html.cvshome.org/"><em>texi2html 1.76</em></a>.
 </font>
 <br>

</p>
</body>
</html>