Symbol() creates one symbol. sym_symbols() splits a string on spaces or
commas and returns one symbol or a list of them; ranges such as "x0:3"
expand to x0, x1, x2. sym_var() does the same and assigns the symbols in
the calling environment. Assumptions such as positive = TRUE or
integer = TRUE are recorded on the symbol and drive simplification, as in
SymPy. Symbols with the same name and different assumptions are distinct.
Usage
Symbol(name, ...)
sym_var(names, ..., envir = parent.frame())
sym_symbols(names, ..., cls = NULL)Arguments
- name
Symbol name.
- ...
Assumptions given as
name = TRUEorname = FALSE. Valid names arecommutative,complex,real,rational,irrational,integer,noninteger,even,odd,prime,composite,positive,negative,zero,nonzero,nonnegative,nonpositive,finite,infinite,imaginary,algebraic,transcendental,extended_real,hermitian,antihermitianandpolar, and the Fermi level assumptionsabove_fermiandbelow_fermiused bywicks().- names
A string of names separated by spaces or commas.
- envir
Environment in which
sym_var()assigns.- cls
For
sym_symbols(), the constructor to use instead ofSymbol(), such asDummyor"Dummy".