Documentation contents

Script File

basic.at

Source
atlas-scripts/basic.at (2704 lines)
Definitions
820
Loads
nothing
Loaded by
combinatorics.at number_theory.at exp-generating-series.at hermitian.at extParamPol.at complex.at modules.at print_K_types.at galois.at W_reps.at all_finite_order.at hodge_tensor.at K_Nilpotent.at weyltosemisimple.at stable.at GK_dimension.at nilpotent_centralizer.at coherent_irreducible.at truncated_induction.at sub_cells.at sommers.at projectors_using_character_tables.at certificate.at geck_generic.at special_rep.at G2_unitary_dual.at adams_johnson.at speh.at

Definitions in source order

GENERIC TYPE CONSTRUCTORS L1

Pair type

L3
set_type Pair<S,T>   = ( S fst , T snd ) !

Fields: fst, snd

One_of type

L4
set_type One_of<S,T> = ( S fail | T succeed ) !

Fields: fail, succeed

Maybe type

L11
set_type Maybe<T>    = ( void none | T some ) !

Fields: none, some

Often failure needs no extra information; then |One_of| becomes |Maybe|.
It is important that, like in |One_of|, failure is the first alternative, but
calling it |fail| would create an ambiguous overload of that name; therefore
we use a different and in this case more evocative label |none| here.

Iterator type

L21
set_type Iterator<T> = ((->Maybe<T>) get, (->) incr) !

Fields: get, incr

A process producing a stream of |T| can be presented as a |Iterator<T>| value.
In each state (including the initial one) the |get| method tries to produce
a |T| value, but it may find out there are none left. This may or may not have
a side effect, but |get| is not responsible for advancing in the sequence; to
do that, call |incr| which moves beyond the current value (it should only be
called after |get| succeeding). Although usually not done, calling |get| twice
in succession without intervening |incr| should produce the same value.

AffineSubspace type

L26
set_type AffineSubspace = ( vec base_point, int denom, mat tangent_basis )

Fields: base_point, denom, tangent_basis

Give a name |LinearSolution| to the type returned by built-in |linear_solve|.
The type |AffineSubspace| and its field names only serve as documentation.

LinearSolution type

L27
set_type LinearSolution = ( void empty_set | AffineSubspace solution )

Fields: empty_set, solution

auxiliary functions for |One_of<S,T>|: test just the tag and strip failure
L29

succeeds

L31any_type S, Tsucceeds (One_of<S,T> v) = bool

fails

L32any_type S, Tfails (One_of<S,T> v) = bool

as_list

L33any_type S, Tas_list (One_of<S,T> v) = [T]

requisition 2 overloads

L36any_type S, Trequisition (string message) = (One_of<S,T> v) T
insist upon succeeding; don't take |fail| for an answer
L38any_type S, Trequisition = (One_of<S,T>->T)
auxiliary functions for |Maybe<T>| and for |Iterator<T>|
L42

can

L45any_type Tcan (Maybe<T> v) = bool
|can(v)| just means |succeeds(v)|, but |if can(solve(eqn)) then| sounds nice

collect

L49any_type Tcollect ([Maybe<T>] L) = [T]
gather actual items from a list of potential contributions

take

L52any_type Ttake (int n,Iterator<T> (get,incr) ) = [T]
iterate, but bound number of iterations to at most |n|

!

L56any_type T! (Iterator<T> (get,incr)) = void
iterate exhaustively, but only print results without storing them

also in this file at line 91, line 110, line 447

count

L66any_type Tcount (Iterator<T> (get,incr)) = int
iterate exhaustively, but just count the number of iterations
run through iteration, counting
in |int| context, |while| loop counts

also in this file at line 142, line 155

to_list

L70any_type Tto_list (Iterator<T> (get,incr)) = [T]
iterate exhaustively and store all results in a list

TIMING, DIAGNOSTICS, PRINTING, AND TESTING ASSERTIONS L79

time

L82any_type Ttime ((->T)f) = T

where

L84any_type Twhere() = void

prints_lines

L90any_type Tprints_lines ([T] a) = void

!

L91any_type T! = prints_lines@[T]
allow printing any list line-by-line as |list!|

also in this file at line 56, line 110, line 447

seat_belt_on

L94seat_belt_on = true
whether runtime tests are activated

assert 3 overloads

L96assert ((->bool,string)f) = void
the fastest form when disabled
L100assert ((->bool)b,string message) = void
for easier conversion
L104assert ((->bool)b) = void

also in this file at line 2702, line 2703, line 2704

SOME DEFINITIONS USEFUL FOR AVOIDING OR RESOLVING AMBIGUITIES L106

distributing a relation over lists, almost as in |map(rel)(zip(a,b)).all|
L108

!

L110any_type S, T! ((S,T->bool)rel) = ([S] a,[T] b)bool

also in this file at line 56, line 91, line 447

== 2 overloads

L118== = =@(int,int)!
Some concrete instaces of distribution of an equality relation over a list.
Proximity with certain built-in tests forbids calling these |=|, so instead we
use |==| or |===|. WHen safe, using |=| (with implicit conversion) is faster.
make comparison of two |[int]| available as |==|
L119== = =@(vec,vec)!
make comparison of two |[int]| available as |==|

===

L120=== = ==@([int],[int])!
comparison of two |[[int]]| available as |===|

append

L123append = #@ T ([[T]],[T])
one more ambiguity avoiding definition: make an alias for a |#| instance
so |LL append:= []| is unambiguous

ITERATION AND LIST SUPPORT FUNCTIONS L126

minus_1

L128!minus_1 = -1
used to be more efficient than |-1|, now equally efficient

#

L130# (int n) = [int]
[0,1,...,n-1]

also in this file at line 135, line 767, line 768, line 1880; also defined in W_reps.at

indices

L132any_type Tindices ([T]a) = [int]
faster than |for @i in a do i od|

also defined in stable.at

#

L135# (bool b) = int
Iverson symbol

also in this file at line 130, line 767, line 768, line 1880; also defined in W_reps.at

sign

L136sign (bool b) = int
|(-1)^#b|, i.e.:

also in this file at line 317, line 497; also defined in tits_centralizer.at, coherent_irreducible.at

range

L138range (int a, int b) = [int]

^

L140^ = !=@(bool,bool)
simple exclusive or

also in this file at line 771, line 772, line 776, line 827, line 1085, line 1710

count

L142count (int limit,(int->bool) predicate) = int

also in this file at line 66, line 155

all

L145all ([bool] p) = bool

also in this file at line 161, line 174, line 189, line 882

any

L147any ([bool] p) = bool

also in this file at line 163, line 176, line 191, line 883

none

L149none ([bool] p) = bool

also in this file at line 165, line 178, line 193, line 884

first

L151first ([bool] p) = int

also in this file at line 167, line 180, line 195, line 885; also defined in sommers.at

last

L153last ([bool] p) = int

also in this file at line 169, line 182, line 197, line 886; also defined in sommers.at

count

L155count ([bool] p) = int
count (sum) number of truths in list

also in this file at line 66, line 142

XOR

L157XOR ([bool] p) = bool
exclusive or (sum modulo 2) of all truths in list

all

L161all ([(->bool)] p) = bool
if evaluating conditions is expensive, procedure them with '@:' and call:

also in this file at line 145, line 174, line 189, line 882

any

L163any ([(->bool)] p) = bool

also in this file at line 147, line 176, line 191, line 883

none

L165none ([(->bool)] p) = bool

also in this file at line 149, line 178, line 193, line 884

first

L167first ([(->bool)] p) = int

also in this file at line 151, line 180, line 195, line 885; also defined in sommers.at

last

L169last ([(->bool)] p) = int
this is somewhat more efficient than first

also in this file at line 153, line 182, line 197, line 886; also defined in sommers.at

there are no lazy versions of |count| and |XOR|
L171

all

L174all (int limit,(int->bool) predicate) = bool
if cases to test are produced as predicates of an integer, one can use:

also in this file at line 145, line 161, line 189, line 882

any

L176any (int limit,(int->bool) predicate) = bool

also in this file at line 147, line 163, line 191, line 883

none

L178none (int limit,(int->bool) predicate) = bool

also in this file at line 149, line 165, line 193, line 884

first

L180first (int limit,(int->bool) predicate) = int

also in this file at line 151, line 167, line 195, line 885; also defined in sommers.at

last

L182last (int limit,(int->bool) predicate) = int

also in this file at line 153, line 169, line 197, line 886; also defined in sommers.at

With values stored in an array, similar functions can be applied to it.
As the row value already exists, directly looping over it is efficient here.
L185

all

L189any_type Tall ([T] L,(T->bool) predicate) = bool

also in this file at line 145, line 161, line 174, line 882

any

L191any_type Tany ([T] L,(T->bool) predicate) = bool

also in this file at line 147, line 163, line 176, line 883

none

L193any_type Tnone ([T] L,(T->bool) predicate) = bool

also in this file at line 149, line 165, line 178, line 884

first

L195any_type Tfirst ([T] L,(T->bool) predicate) = int

also in this file at line 151, line 167, line 180, line 885; also defined in sommers.at

last

L197any_type Tlast ([T] L,(T->bool) predicate) = int

also in this file at line 153, line 169, line 182, line 886; also defined in sommers.at

get_first

L200any_type Tget_first ([T] L,(T->bool) predicate) = Maybe<T>

also in this file at line 207

get_last

L202any_type Tget_last ([T] L,(T->bool) predicate) = Maybe<T>

also in this file at line 209

get_first

L207any_type S, Tget_first ((T->S) attr, (S,S->bool)eq) = ([T]a, S b) Maybe<T>

also in this file at line 200

get_last

L209any_type S, Tget_last ((T->S) attr, (S,S->bool)eq) = ([T]a, S b) Maybe<T>

also in this file at line 202

for_some

L213any_type S, Tfor_some ((S,T->bool)rel, [T]a) = (S x) bool
test for being in a relation to some/none/all of the elements of a list

for_none

L215any_type S, Tfor_none ((S,T->bool)rel, [T]a) = (S x) bool

for_all

L217any_type S, Tfor_all ((S,T->bool)rel, [T]a) = (S x) bool
Generic functions on any type with a provided total ordering
L222

min

L226any_type Tmin ((T,T->bool)leq) = (T x, T y) T
minimum or maximum of 2 candidates

also in this file at line 322, line 324, line 326, line 509, line 511, line 513

max

L227any_type Tmax ((T,T->bool)leq) = (T x, T y) T

also in this file at line 323, line 325, line 327, line 510, line 512, line 514

min_list

L230any_type Tmin_list ((T,T->bool)leq) = ([T] a) T
extensions of these to lists of any posiitve length

max_list

L233any_type Tmax_list ((T,T->bool)leq) = ([T] a) T

min_init

L238any_type Tmin_init ((T,T->bool)leq) = (T !seed) ([T]->T)
versions seeded with a "limit value" to use in case of an empty list

max_init

L240any_type Tmax_init ((T,T->bool)leq) = (T !seed) ([T]->T)

mindex

L244any_type Tmindex ((T,T->bool)leq) = ([T] a) int
position of first occurrence of minimum, or -1

maxdex

L251any_type Tmaxdex ((T,T->bool)leq) = ([T] a) int

reverse

L258any_type Treverse ([T] r) = [T]

also defined in coherent_irreducible.at

MEMBERSHIP TESTING AND SEARCHING L262

is_member

L265any_type Tis_member ((T,T->bool)eq) = ([T] a) (T->bool)

also in this file at line 419, line 546, line 638, line 1604

isnt_member

L266any_type Tisnt_member ((T,T->bool)eq) = ([T] a) (T->bool)

also in this file at line 420, line 547, line 639, line 1605

binary_search_first

L271binary_search_first ((int->bool)pred, int low, int high) = int
binary search first |i| in [low,high) with |pred(i)|, or |high| if none
of course |pred| is assumed monotonic here: $pred(i)\implies pred(i+1)$

binary_search_in 2 overloads

L277any_type S, Tbinary_search_in ([T] a,(T,T->bool) leq) = (T->Maybe<int>)
L282any_type S, Tbinary_search_in ([S] a,(S->T)f,(T,T->bool) leq) = (T->Maybe<int>)

binary_search_get

L287any_type S, Tbinary_search_get ([S] a,(S->T)f,(T,T->bool) leq) = (T->Maybe<S>)

binary_lookup

L292any_type S, Tbinary_lookup ((T,T->bool) leq) = (T x,[T]a) Maybe<int>

also in this file at line 299, line 300

binary_lookup_by

L294any_type S, Tbinary_lookup_by ((S->T)f,(T,T->bool) leq) = (T x,[S]a) Maybe<int>

binary_lookup 2 overloads

L299binary_lookup = (int,[int]->Maybe<int>)
L300binary_lookup = (string,[string]->Maybe<int>)

also in this file at line 292

locate_sorted

L303locate_sorted ([int] v,int lwb) = int
first index of entry >= |lwb|

from_stops

L307from_stops ([int] stops) = (int->int)
transform "stops" representation of weakly increasing function to function
find first excess, then back up 1
L309

BASIC NON BUILT-IN FUNCTIONALITY FOR SPECIFIC TYPES L312

Integers
L314

abs

L316abs (int k) = int

also in this file at line 499

sign

L317sign (int k) = int

also in this file at line 136, line 497; also defined in tits_centralizer.at, coherent_irreducible.at

is_odd

L319is_odd (int n) = bool

is_even

L320is_even (int n) = bool

min

L322min = min(<=@(int,int))

also in this file at line 226, line 324, line 326, line 509, line 511, line 513

max

L323max = max(<=@(int,int))

also in this file at line 227, line 325, line 327, line 510, line 512, line 514

min

L324min = min_list(<=@(int,int))

also in this file at line 226, line 322, line 326, line 509, line 511, line 513

max

L325max = max_list(<=@(int,int))

also in this file at line 227, line 323, line 327, line 510, line 512, line 514

min

L326min = min_init(<=@(int,int))

also in this file at line 226, line 322, line 324, line 509, line 511, line 513

max

L327max = max_init(<=@(int,int))

also in this file at line 227, line 323, line 325, line 510, line 512, line 514

min_loc

L328min_loc = mindex(<=@(int,int))

also in this file at line 515

max_loc

L329max_loc = maxdex(<=@(int,int))

also in this file at line 516

gcd

L331gcd = (int,int->int)
greatest common divisor; no size limit

also in this file at line 809

gcd_big

L341gcd_big([int] v) = int
the following cannot be called |gcd|: too close to built-in |gcd@vec|

lcm 2 overloads

L344lcm (int a,int b) = int
L346lcm ([int] v) = int

=

L348= ((int,int)(x0,y0),(int,int)(x1,y1)) = bool

also in this file at line 764, line 1816; also defined in combinatorics.at, modules.at

!=

L349!= ((int,int)(x0,y0),(int,int)(x1,y1)) = bool

also defined in combinatorics.at

*

L352* (int c,[int] r) = [int]
scalar multiplication of list (note: *@(vec,int) returning vec is built-in)

also in this file at line 522, line 525, line 550, line 557, line 789, line 980, line 981, line 995, line 1611, line 1612, line 1696, line 1697; also defined in extParamPol.at, complex.at, modules.at, hodge_tensor.at, tits_centralizer.at, stable.at

sum

L355sum ([int] r) = int
sum, product of a list of values

also in this file at line 518, line 650, line 794, line 800, line 915, line 987, line 1098, line 2125, line 2410; also defined in sommers.at

product

L356product ([int] r) = int

also in this file at line 519, line 803, line 1619

half

L358half (int n) = int

also in this file at line 1061, line 2145, line 2427

exact_divide

L359exact_divide (int a, int b) = int

int_format

L362int_format = to_string@int
bitsets encoded as functions (int->bool) together with upper bound |limit|
L364

exp_2

L366exp_2 (int n) = int
2^n, but more efficient

full_bitset

L367full_bitset (int n) = int
to_bitset(#n), but more efficient

is_member_bitset

L369is_member_bitset (int i,int B) = bool

isnt_member_bitset

L370isnt_member_bitset (int i,int B) = bool

is_member_fast

L372is_member_fast (vec L) = (int->bool)

isnt_member_fast

L374isnt_member_fast (vec L) = (int->bool)

list

L377list (int limit, (int->bool) predicate) = [int]

also defined in coherent_irreducible.at

complement 2 overloads

L379complement (int limit,(int->bool) predicate) = [int]
L381complement (int n, vec list) = [int]

sort_u_below

L384sort_u_below (int n) = ([int] L) [int]
sorting lists of relatively small natural numbers can be done fast

is_subset

L386is_subset (vec S,vec L) = bool

is_disjoint

L387is_disjoint (vec S,vec L) = bool

contains 2 overloads

L389contains (vec S) = (vec->bool)
L391contains (int s) = (vec->bool)

is_subset_of

L393is_subset_of (vec L) = (vec->bool)

is_disjoint_from

L395is_disjoint_from (vec L) = (vec->bool)

first_set_bit

L398first_set_bit (int n) = int

unset_first_set_bit

L399unset_first_set_bit (int n) = int

set_bit_positions 2 overloads

L400set_bit_positions (int n) = vec
L403set_bit_positions (int n,int limit) = vec

first_unset_bit

L406first_unset_bit (int n) = int

set_first_unset_bit

L407set_first_unset_bit (int n) = int

unset_bit_positions 2 overloads

L408unset_bit_positions (int n) = vec
L411unset_bit_positions (int n,int limit) = vec

bitwise_intersection

L413bitwise_intersection ([int] ns) = int

bitwise_union

L415bitwise_union ([int] ns) = int

is_member

L419is_member = ([int]->(int->bool))

also in this file at line 265, line 546, line 638, line 1604

isnt_member

L420isnt_member = ([int]->(int->bool))

also in this file at line 266, line 547, line 639, line 1605

is_member_sorted

L423is_member_sorted ([int] v) = (int->bool)
when |v| is known to be sorted (and long), this can be done faster

isnt_member_sorted

L436isnt_member_sorted ([int] v) = (int->bool)

is_subset_of_sorted

L439is_subset_of_sorted ([int] sorted) = ([int]->bool)

is_disjoint_from_sorted

L442is_disjoint_from_sorted ([int] sorted) = ([int]->bool)

factorial

L446factorial (int n) = int

!

L447! = factorial@int
allo conventional factorial notation

also in this file at line 56, line 91, line 110

to_base_poly

L450to_base_poly (int b) = (int->vec)
convert to base n as polynomial: small coef polynomial evaluating to k at n

to_base_fixed_length

L456to_base_fixed_length (int b, int l) = (int->vec )
of length |l|
get |l| finals digits, regardless
L459

to_base

L462to_base (int b, (int->string) digit) = (int->string)

also defined in tits_centralizer.at

binary

L466binary = (int->string)

digits36

L470digits36 = (int->string)
map digits in base up to 36 to a letter

hexadecimal

L474hexadecimal = (int->string)
some transformations of sequences of numbers
L478

cumulate_forward

L480cumulate_forward ([int] seq) = [int]

cumulate_backward

L482cumulate_backward ([int] seq) = [int]

forward_differences

L485forward_differences ([int] seq) = [int]
inverse of |cumulate_forward|

backward_differences

L487backward_differences ([int] seq) = [int]
inverse of |cumulate_backward|
Rational numbers
L491

numer

L493numer (rat a)

also in this file at line 976

denom

L494denom (rat a)

also in this file at line 977

is_integer

L496is_integer (rat r) = bool

also in this file at line 1001

sign

L497sign (rat a) = int
denominator is always positive

also in this file at line 136, line 317; also defined in tits_centralizer.at, coherent_irreducible.at

abs

L499abs (rat a) = rat

also in this file at line 316

\

L501\ ((rat,rat)p) = int

also in this file at line 816, line 1004

\% 2 overloads

L502\% ((rat,int)p) = (int,rat)
shouldn't these two be built-in?
L503\% ((rat,rat)p) = (int,rat)

also in this file at line 1058

floor

L506floor ([rat] v) = vec
these are mostly for ratvec arguments, but [rat] avoids coercion from vec

ceil

L507ceil ([rat] v) = vec

min

L509min = min(<=@(rat,rat))

also in this file at line 226, line 322, line 324, line 326, line 511, line 513

max

L510max = max(<=@(rat,rat))

also in this file at line 227, line 323, line 325, line 327, line 512, line 514

min

L511min = min_list(<=@(rat,rat))

also in this file at line 226, line 322, line 324, line 326, line 509, line 513

max

L512max = max_list(<=@(rat,rat))

also in this file at line 227, line 323, line 325, line 327, line 510, line 514

min

L513min = min_init(<=@(rat,rat))

also in this file at line 226, line 322, line 324, line 326, line 509, line 511

max

L514max = max_init(<=@(rat,rat))

also in this file at line 227, line 323, line 325, line 327, line 510, line 512

min_loc

L515min_loc = mindex(<=@(rat,rat))

also in this file at line 328

max_loc

L516max_loc = maxdex(<=@(rat,rat))

also in this file at line 329

sum

L518sum ([rat] r) = rat

also in this file at line 355, line 650, line 794, line 800, line 915, line 987, line 1098, line 2125, line 2410; also defined in sommers.at

product

L519product ([rat] r) = rat

also in this file at line 356, line 803, line 1619

* 2 overloads

L522* ([rat] v, [rat] w) = rat
extend built-in scalar product of vectors to list of rationals case
L525* ([int] v, [rat] w) = rat

also in this file at line 352, line 550, line 557, line 789, line 980, line 981, line 995, line 1611, line 1612, line 1696, line 1697; also defined in extParamPol.at, complex.at, modules.at, hodge_tensor.at, tits_centralizer.at, stable.at

rat_as_int

L529rat_as_int (rat r) = int
make a rational into an integer if possible

with_decimals

L532with_decimals (int n) = (rat->string)
Strings
L540

new_line

L542!new_line = ASCII(10)
including this in a string passes to a new line

char_index

L544char_index (string c, string s) = int

is_member

L546is_member = ([string]->(string->bool))

also in this file at line 265, line 419, line 638, line 1604

isnt_member

L547isnt_member = ([string]->(string->bool))

also in this file at line 266, line 420, line 639, line 1605

+

L549+ = ##@(string,string)
+ aliases string concatenation "ax" ## "is"

also in this file at line 559, line 560, line 562, line 2121, line 2132, line 2406, line 2417; also defined in extParamPol.at, modules.at

* 2 overloads

L550* = (string,int->string)
repeat string; use recursive doubling
L557* (int n,string s) = string
allow factor to come first

also in this file at line 352, line 522, line 525, line 789, line 980, line 981, line 995, line 1611, line 1612, line 1696, line 1697; also defined in extParamPol.at, complex.at, modules.at, hodge_tensor.at, tits_centralizer.at, stable.at

+ 3 overloads

L559+ (string s, int i) = string
L560+ (int i, string s) = string
L562+ (string s, (int,int)(x,y))

also in this file at line 549, line 2121, line 2132, line 2406, line 2417; also defined in extParamPol.at, modules.at

plural 2 overloads

L564plural (int n) = string
L565plural (int n,string s) = string

concat

L567concat = ##@[string]

join

L568join ([string] elts, string sep, string unit) = string

l_adjust

L573l_adjust (int w, string s) = string

r_adjust

L575r_adjust (int w, string s) = string

c_adjust

L577c_adjust (int w, string s) = string

width

L580width (int n) = int

split

L582split (string S) = [string]

also in this file at line 609

split_lines

L584split_lines (string text) = [string]

is_substring

L590is_substring (string key, string text) = bool

fgrep

L594fgrep (string s, string text) = [string]

compact_string

L597compact_string (ratvec v) = string
Generics
L601

filter

L604any_type S, Tfilter ((T->bool) pred) = ([T]->[T])

map

L607any_type S, Tmap ((S->T) f) = ([S] a) [T]

also in this file at line 2135, line 2137, line 2140, line 2142, line 2421, line 2424; also defined in hermitian.at

split

L609any_type S, Tsplit ([S,T] l) = ([S],[T])

also in this file at line 582

zip

L611any_type S, Tzip ([S] a,[T] b) = [S,T]

unzip

L614any_type S, Tunzip ([S,T] list) = ([S],[T])

transpose

L617any_type S, Ttranspose ([[T]] rr) = [[T]]

also defined in combinatorics.at

matrix_assign

L624any_type S, Tmatrix_assign([[T]] a,int i, int j, T v) = [[T]]
change one entry, in list-of-rows format
Vectors
L629

vector

L631vector (int n,(int->int)f) = vec

also defined in K_Nilpotent.at

identity_row

L634identity_row (int n,int i) = vec
standard basis in rank n

ones

L636ones (int n) = vec

is_member

L638is_member = ([vec]->(vec->bool))

also in this file at line 265, line 419, line 546, line 1604

isnt_member

L639isnt_member = ([vec]->(vec->bool))

also in this file at line 266, line 420, line 547, line 1605

~

L641~ (vec v) = vec

also in this file at line 745, line 1010

lower

L642lower (int k,vec v) = vec

also in this file at line 1011

upper

L643upper (int k,vec v) = vec

also in this file at line 1012

drop_lower

L644drop_lower (int k,vec v) = vec

also in this file at line 1013

drop_upper

L645drop_upper (int k,vec v) = vec

also in this file at line 1014

<=

L647<= (vec v) = bool
anti-dominance (in fundamental weight coords)

also in this file at line 908, line 1017; also defined in combinatorics.at

<

L648< (vec v) = bool
strict anti-dominance

also in this file at line 909, line 1018

sum

L650sum (int l,[vec] list) = vec
sum of vecs of constant length l

also in this file at line 355, line 518, line 794, line 800, line 915, line 987, line 1098, line 2125, line 2410; also defined in sommers.at

for large sums |sum(l#list)|, using |sum@mat|, might be marginally faster
L652

all_words

L655all_words ([vec] alphabets) = mat
all words with letter |i| running over elements of |alphabets[i]|

also in this file at line 669, line 683

convert list of vectors to matrix with |size| rows
L665
we can do the same for other types than integers
L667

all_words

L669any_type Tall_words ([[T]] alphabets) = [[T]]

also in this file at line 655, line 683

if any alphabet is empty, the result is an empty list, forgetting #alphabets
L679

all_words

L683all_words ([int] limits) = mat
all words of length |#limits|, with letter |i| running over |#limits[i]|

also in this file at line 655, line 669

all_0_1_vecs

L686all_0_1_vecs (int n) = [vec]

power_set 2 overloads

L690any_type Trec_fun power_set (int n) = [[int]]
indices where 0_1_vecs have 1
L692any_type Tpower_set ([T] S) = [[T]]

choices_from

L694any_type Tchoices_from ([T] S, int k) = [[T]]
all $k$-subsets of $S$

multiplicity

L707any_type Tmultiplicity ((T,T->bool)eq) = (T,[T]->int)

also defined in sommers.at

all_0_1_vecs_with_sum

L712all_0_1_vecs_with_sum (int n,int k) = [vec]

mixed_radix_nr

L719mixed_radix_nr([int] radix) = (vec->int)
index of |word| in |all_words(radix)|

mixed_radix_word

L723mixed_radix_word([int] radix) = (int->vec)
its inverse, in other words, the function |f=mixed_radix_word(radix)| is
such that |all_words(radix)| is equal to |for i:product(radix) do f(i) od|
number of times n occurs in [int] S
L726

pad

L729pad ([int] v,int N) = vec
add zeros to make total length =N

also in this file at line 2643

Matrices
L733

matrix

L736matrix ((int,int)(r,c),(int,int->int) f) = mat
matrix defined by its dimension and expression for general entry

also in this file at line 1718

n_rows

L739n_rows (mat m) = int

n_columns

L740n_columns = #@mat
this one is built in as a # operator overload

as_column

L742as_column (vec v) = mat
interpret v as single column

as_row

L743as_row = ^@vec
interpret v as single row

~

L745~ (mat A) = mat
reverse rows and reverse columns
transform 45 = 36 + 9, rows&cols reversed

also in this file at line 641, line 1010

block_matrix 2 overloads

L748block_matrix (mat A,mat B) = mat
L752block_matrix ([mat] list) = mat

main_diagonal

L761main_diagonal (mat A) = vec

=

L764= (mat m,int k) = bool
test matrix against a multiple of the identity

also in this file at line 348, line 1816; also defined in combinatorics.at, modules.at

# 2 overloads

L767# (mat m, vec v) = mat
add a column to a matrix, which is not predefined as operator #
require size match
L768# (vec v, mat m) = mat
require size match

also in this file at line 130, line 135, line 1880; also defined in W_reps.at

^ 2 overloads

L771^ (mat m, vec v) = mat
add row to a matrix, which is similar; use operator ^ for it
L772^ (vec v, mat m) = mat

also in this file at line 140, line 776, line 827, line 1085, line 1710

##

L774## (mat A, mat B) = mat
concatenate horizontally, must have same depth

also in this file at line 780, line 984, line 985

^

L776^ (mat A, mat B) = mat
concatenate vertically, must have same width

also in this file at line 140, line 771, line 772, line 827, line 1085, line 1710

##

L780## (int n,[mat] L) = mat
concatenate horizontally a list of matrices; each of n rows

also in this file at line 774, line 984, line 985

map_on

L784map_on (mat m) = ((int->int)->mat)
apply a function to all matrix entries

*

L789* (int c,mat m) = mat
scalar multiplication

also in this file at line 352, line 522, line 525, line 550, line 557, line 980, line 981, line 995, line 1611, line 1612, line 1696, line 1697; also defined in extParamPol.at, complex.at, modules.at, hodge_tensor.at, tits_centralizer.at, stable.at

-

L790- (mat m) = mat
transform 36+128=164: 128 means negate entries

also in this file at line 2110, line 2119, line 2122, line 2133, line 2392, line 2404, line 2407, line 2418; also defined in extParamPol.at, modules.at

sum 2 overloads

L794sum ((int,int) shape, [mat] L) = mat
sum of list of matrices, with given shape for when list is empty
L800sum (int n,[mat] L) = mat
square matrices are frequent, so there is a special case of |sum| for them

also in this file at line 355, line 518, line 650, line 915, line 987, line 1098, line 2125, line 2410; also defined in sommers.at

product

L803product (int n, [mat] L) = mat
product left-to-right of list of square matrices, all square of size |n|

also in this file at line 356, line 519, line 1619

gcd

L809gcd(mat M) = int

also in this file at line 331

\

L816\ (mat m,int d) = mat
integer division

also in this file at line 501, line 1004

%

L819% (mat m,int d) = mat
entrywise modulo

also in this file at line 1064; also defined in extParamPol.at

Smith_basis

L821Smith_basis (mat M) = mat

inv_fact

L822inv_fact (mat M) = vec

image

L824image (mat M) = mat

^

L827^ = (mat,int->mat)
matrix exponentiation

also in this file at line 140, line 771, line 772, line 776, line 1085, line 1710

inverse

L843inverse (mat M) = mat

also in this file at line 1709; also defined in combinatorics.at

/

L847/ = inverse@mat
so |/M| is the same as |M^-1|, but more direct

also in this file at line 1062

rank

L849rank (mat A) = int

also defined in combinatorics.at, sommers.at

det

L851det (mat A) = int

trace

L857trace (mat A) = int

char_poly

L861char_poly (mat A) = vec
characteristic polynomial of integer matrix

cokernel

L873cokernel (mat M)
minimal matrix wose kernel is our image

saturated_span

L875saturated_span (mat M) = bool
whether columns span saturated sublattice
all invariant factors are 1? test last one, if any
L877
test all vectors in a list
L879

all

L882all (mat m,(vec->bool) pred) = bool

also in this file at line 145, line 161, line 174, line 189

any

L883any (mat m,(vec->bool) pred) = bool

also in this file at line 147, line 163, line 176, line 191

none

L884none (mat m,(vec->bool) pred) = bool

also in this file at line 149, line 165, line 178, line 193

first

L885first (mat m,(vec->bool) pred) = int

also in this file at line 151, line 167, line 180, line 195; also defined in sommers.at

last

L886last (mat m,(vec->bool) pred) = int

also in this file at line 153, line 169, line 182, line 197; also defined in sommers.at

columns_with 3 overloads

L888columns_with ((int,vec->bool) p,mat m) = mat
L890columns_with ((vec->bool) p,mat m) = mat
L892columns_with ((int->bool) p,mat m) = mat

a_column_with

L894a_column_with ((vec->bool) p,mat m) = Maybe<vec>

rows_with 3 overloads

L897rows_with ((int,vec->bool) p,mat m) = mat
L899rows_with ((vec->bool) p,mat m) = mat
L901rows_with ((int->bool) p,mat m) = mat

a_row_with

L903a_row_with ((vec->bool) p,mat m) = Maybe<vec>

>=

L906>=([vec] m) = bool
non-negative (dominant) columns only

>

L907>([vec] m) = bool
strictly positive (dominant) columns only

<=

L908<=([vec] m) = bool

also in this file at line 647, line 1017; also defined in combinatorics.at

<

L909<([vec] m) = bool

also in this file at line 648, line 1018

lookup_column

L911lookup_column (vec v,mat m) = int

lookup_row

L912lookup_row (vec v,mat m) = int

sum

L915sum (mat m) = vec
sum of columns of a matrix; this is so neat, avoid calling it sum_columns

also in this file at line 355, line 518, line 650, line 794, line 800, line 987, line 1098, line 2125, line 2410; also defined in sommers.at

solve 2 overloads

L923solve (mat A,vec b) = Maybe<vec>
solve(mat A,vec b): find a |vec| solution x of A*x=b, or indicate none exists
Method:
- write A*C = M using echelon, with C an invertible matrix and, M echelon
- solve M*y = b (possibly finding none); this is easy using the echelon form
- if a solution is found, return x = C*y
L939solve (mat A,mat B) = Maybe<mat>
matrix |X| satisfying |A*X=B|, if any

also in this file at line 1023

required_solution 2 overloads

L961required_solution ((mat,vec) system) = vec
L964required_solution ((mat,mat) system) = mat
system (A,B) means solving AX = B

also in this file at line 1038

order

L967order (mat !M) = int
multiplicative order of a matrix, hangs unless finite

also in this file at line 1622; also defined in all_finite_order.at

Rational vectors
L974

numer

L976numer (ratvec a) = vec

also in this file at line 493

denom

L977denom (ratvec a) = int

also in this file at line 494

* 2 overloads

L980* (int i,ratvec v) = ratvec
allow scalar multiplication form left; from right it is built-in
L981* (rat r,ratvec v) = ratvec

also in this file at line 352, line 522, line 525, line 550, line 557, line 789, line 995, line 1611, line 1612, line 1696, line 1697; also defined in extParamPol.at, complex.at, modules.at, hodge_tensor.at, tits_centralizer.at, stable.at

## 2 overloads

L984## (ratvec a,ratvec b) = ratvec
concatenate ratvec values: use conversion to and from [rat]
L985## ([ratvec] rs) = ratvec

also in this file at line 774, line 780

sum

L987sum (int l,[ratvec] list) = ratvec
sum of ratvecs of constant length l

also in this file at line 355, line 518, line 650, line 794, line 800, line 915, line 1098, line 2125, line 2410; also defined in sommers.at

*

L995* ([ratvec] M,ratvec v) = ratvec
multiply rational matrix represented as list of columns by a rational vector
the m*n matrix M is given as a list of n ratvec values of size m
v is a ratvec of size n, the result is a ratvec of size m

also in this file at line 352, line 522, line 525, line 550, line 557, line 789, line 980, line 981, line 1611, line 1612, line 1696, line 1697; also defined in extParamPol.at, complex.at, modules.at, hodge_tensor.at, tits_centralizer.at, stable.at

is_integer

L1001is_integer (ratvec v) = bool
equivalently =(v%1)

also in this file at line 496

\

L1004\ (ratvec v, int k) = vec
vector floor of quotient by int operation; makes vector from rational vector

also in this file at line 501, line 816

ratvec_as_vec

L1007ratvec_as_vec (ratvec v) = vec
do as |v.numer| (or |\ %v|) would do, but check that denominator is 1

~

L1010~ (ratvec v) = ratvec

also in this file at line 641, line 745

lower

L1011lower (int k,ratvec v) = ratvec

also in this file at line 642

upper

L1012upper (int k,ratvec v) = ratvec

also in this file at line 643

drop_lower

L1013drop_lower (int k,ratvec v) = ratvec

also in this file at line 644

drop_upper

L1014drop_upper (int k,ratvec v) = ratvec

also in this file at line 645

<=

L1017<= (ratvec v) = bool
dominance conditions

also in this file at line 647, line 908; also defined in combinatorics.at

<

L1018< (ratvec v) = bool

also in this file at line 648, line 909

solve

L1023solve (mat A, ratvec b) = Maybe<ratvec>
solve(mat A,ratvec b): find a solution ratvec x of A*x=b, or indicate that
none exists. Solution as in vec case, but exact division requirement is OK.

also in this file at line 923, line 939

required_solution

L1038required_solution ((mat,ratvec) system) = ratvec

also in this file at line 961, line 964

Split integers
L1042

s

L1044!s = Split
! means it is a constant

split_1

L1045!split_1 = Split
do conversion now

split_minus_1

L1046!split_minus_1 = Split

one_minus_s

L1047!one_minus_s = Split

one_plus_s

L1047!one_plus_s = Split
near idempotents

int_part

L1049int_part (Split x) = int

s_part

L1050s_part (Split x) = int

s_to_1

L1052s_to_1 (Split x) = int
let (a,b)=%x in a+b

also in this file at line 2115, line 2400

s_to_minus_1

L1053s_to_minus_1 (Split x) = int
let (a,b)=%x in a-b

also in this file at line 2116, line 2401

times_s

L1054times_s (Split x)

split_as_int

L1056split_as_int (Split x) = int

\%

L1058\% (Split x, int n) = (Split,Split)

also in this file at line 502, line 503

half

L1061half (Split w) = Split
divide Split by integer, quotient of \% but requiring rest to be zero

also in this file at line 358, line 2145, line 2427

/

L1062/ (Split w,int n) = Split

also in this file at line 847

%

L1064% (Split w,int n) = Split

also in this file at line 819; also defined in extParamPol.at

exp_s

L1065exp_s(int n) = Split

is_pure

L1068is_pure (Split w) = bool
a Split coefficient is pure if it has at most one nonzero component
test if product of both components is zero

also in this file at line 2498, line 2504, line 2507

split_format

L1071split_format (Split w) = string
nicer display of Splits

split_factor_format

L1082split_factor_format (Split w) = string
same formatting, but supplying parentheses when necessary if used as factor

^

L1085^ = (Split,int->Split)
exponentiation of split integers

also in this file at line 140, line 771, line 772, line 776, line 827, line 1710

sum

L1098sum ([Split] list) = Split

also in this file at line 355, line 518, line 650, line 794, line 800, line 915, line 987, line 2125, line 2410; also defined in sommers.at

Lie types
L1101

Lie_type

L1103Lie_type (string code, int rank) = LieType

semisimple_rank

L1105semisimple_rank (LieType t) = int

central_torus_rank

L1108central_torus_rank (LieType t) = int

also in this file at line 1167

factors

L1110factors (LieType t) = [string,int]

semisimple

L1114semisimple (LieType t) = LieType

derived_is_simple

L1118derived_is_simple (LieType t) = bool

also in this file at line 1173

is_simple

L1119is_simple (LieType t) = bool

also in this file at line 1174

adjoint_2rho

L1122adjoint_2rho (LieType t) = vec
compute |t.semisimple.adjoint.two_rho| without constructing a |RootDatum|
$2\rho$ on basis of simple roots

simply_connected_2rho_check

L1140simply_connected_2rho_check (LieType t) = vec
similarly $2\check\rho$ on basis of simple coroots

str

L1157str (LieType t) = string
Root data
L1162

root_indices

L1164root_indices (RootDatum rd) = [int]
list of all legal root indices

central_torus_rank

L1167central_torus_rank (RootDatum rd) = int

also in this file at line 1108

dimension

L1169dimension (RootDatum rd) = int

also in this file at line 2006

provide default values for coroot preference when building root data
L1171

derived_is_simple

L1173derived_is_simple(RootDatum rd) = bool

also in this file at line 1118

is_simple

L1174is_simple(RootDatum rd) = bool

also in this file at line 1119

root_datum

L1176root_datum (mat simple_roots, mat simple_coroots) = RootDatum
by default prefer roots

also in this file at line 1182, line 1208, line 1211, line 1215, line 1882, line 2068, line 2101, line 2156, line 2389; also defined in W_reps.at, K_Nilpotent.at, sommers.at

torus_datum

L1179torus_datum (int rank) = RootDatum

root_datum

L1182root_datum (LieType type, mat lattice) = RootDatum
by default prefer roots

also in this file at line 1176, line 1208, line 1211, line 1215, line 1882, line 2068, line 2101, line 2156, line 2389; also defined in W_reps.at, K_Nilpotent.at, sommers.at

simply_connected

L1185simply_connected (LieType type) = RootDatum
by default prefer coroots here

also in this file at line 1191

adjoint

L1188adjoint (LieType type) = RootDatum
by default prefer roots here

also in this file at line 1193

simply_connected

L1191simply_connected (RootDatum rd) = RootDatum

also in this file at line 1185

adjoint

L1193adjoint (RootDatum rd) = RootDatum
change weight basis to simple roots

also in this file at line 1188

sub_datum

L1201sub_datum (RootDatum rd, [int]S) = RootDatum
in |sub_datum| the (co)roots at indices |S| must give a valid Cartan matrix,
but they need not be positive, and will be taken in the order specified.
indices: [-n,...,0,1,...,n-1] where n is the number of positive roots
simple roots are numbered [0,1,...,rank-1]
In particular any subset of simple roots taken in any order will be valid.

also in this file at line 1476

root_datum 3 overloads

L1208root_datum ([vec] simple_roots, [vec] simple_coroots, int r) = RootDatum
backwards compatibility function; used to be the built-in prototype
L1211root_datum (LieType t, [ratvec] gens) = RootDatum
L1215root_datum (LieType t, ratvec gen) = RootDatum
allow single kernel generator in root datum construction

also in this file at line 1176, line 1182, line 1882, line 2068, line 2101, line 2156, line 2389; also defined in W_reps.at, K_Nilpotent.at, sommers.at

all_simples

L1218all_simples (RootDatum rd) = [int]
list of indices of all simple roots or coroots

all_posroots

L1219all_posroots (RootDatum rd) = [int]

all_roots

L1220all_roots (RootDatum rd) = [int]

is_root

L1224is_root ((RootDatum,vec) (rd,):p) = bool
the following uses that root_index(rd,v)=nr_of_posroots(rd) for a non-root v

is_coroot

L1226is_coroot ((RootDatum,vec) (rd,):p) = bool

is_posroot

L1228is_posroot ((RootDatum,vec)(rd,):p) = bool

is_poscoroot

L1230is_poscoroot ((RootDatum,vec)(rd,):p) = bool

is_negroot

L1232is_negroot ((RootDatum,vec)(rd,):p) = bool

is_negcoroot

L1233is_negcoroot ((RootDatum,vec)(rd,):p) = bool

posroot_index

L1235posroot_index ((RootDatum,vec)p) = int
fold roots to positive

poscoroot_index

L1237poscoroot_index ((RootDatum,vec)p) = int
fold coroots to positive

Cartan_matrix

L1241Cartan_matrix (RootDatum rd,[int] simples) = mat
NB strange convention

rho

L1245rho (RootDatum rd) = ratvec

rho_check

L1246rho_check (RootDatum rd) = ratvec
see also rho_i@KGBElt and rho_r@KGBElt defined below
L1247

two_rho

L1249two_rho (RootDatum rd,(int->bool) select) = vec
sum of selected posroots

also in this file at line 1254

two_rho_check

L1251two_rho_check (RootDatum rd,(int->bool) select) = vec

also in this file at line 1258

two_rho

L1254two_rho (RootDatum rd,[int] simples) = vec

also in this file at line 1249

two_rho_check

L1258two_rho_check (RootDatum rd,[int] simples) = vec

also in this file at line 1251

is_positive_root

L1265is_positive_root (RootDatum rd) = (vec->bool)
these functions assume the vec alpha or alphav is a root resp. coroot

also in this file at line 1275

is_positive_coroot

L1267is_positive_coroot (RootDatum rd) = (vec->bool)

also in this file at line 1277

is_negative_root

L1269is_negative_root (RootDatum rd) = (vec->bool)

also in this file at line 1279

is_negative_coroot

L1271is_negative_coroot (RootDatum rd) = (vec->bool)

also in this file at line 1281

is_positive_root

L1275is_positive_root (RootDatum rd,vec alpha) = bool
uncurried versions of the previous four; again being root/coroot is assumed

also in this file at line 1265

is_positive_coroot

L1277is_positive_coroot (RootDatum rd,vec alphav) = bool

also in this file at line 1267

is_negative_root

L1279is_negative_root (RootDatum rd,vec alpha) = bool

also in this file at line 1269

is_negative_coroot

L1281is_negative_coroot (RootDatum rd,vec alphav) = bool

also in this file at line 1271

roots_all_positive

L1285roots_all_positive (RootDatum rd) = (mat->bool)
test whether all columns, being assumed root/coots, are positive
no negative roots

coroots_all_positive

L1287coroots_all_positive (RootDatum rd) = (mat->bool)
no negative coroots

among_posroots

L1292among_posroots (RootDatum rd) = (mat M)bool
the following test rather than assume that columns are roots/cooroots
all columns M posroots?

among_poscoroots

L1294among_poscoroots (RootDatum rd) = (mat M)bool
all columns M poscoroots?

negative_system

L1297negative_system (mat posroots) = mat
the missing half of the root system
172= 36+8+128: reverse cols,neg

roots

L1301roots (RootDatum rd) = mat
having _all_ roots can be useful

coroots

L1303coroots (RootDatum rd) = mat

root

L1307root (RootDatum rd, vec alpha_v) = vec
the correspondence between roots and coroots

coroot

L1308coroot (RootDatum rd, vec alpha) = vec

is_orthogonal 3 overloads

L1310is_orthogonal (RootDatum rd, int i, int j) = bool
L1311is_orthogonal (RootDatum rd, vec alpha, vec beta) = bool
L1313is_orthogonal (RootDatum rd, [int] S, int j) = bool

reflection 2 overloads

L1317reflection (RootDatum rd, int i) = mat
reflection action of roots
i indexes a root/coroot pair
L1319reflection ((RootDatum,vec)(rd,):p) = mat
specify root (not coroot)

reflection_co

L1321reflection_co ((RootDatum,vec)(rd,):p) = mat
specify coroot (not root)

reflect 2 overloads

L1323reflect (RootDatum rd, int i, vec v) = vec
apply reflection(rd,i)*v
more efficient than matrix multiply
L1325reflect (RootDatum rd, vec alpha, vec v) = vec
reflection(rd,alpha)*v

also in this file at line 1332, line 1334

coreflect 2 overloads

L1327coreflect (RootDatum rd, vec v, int i) = vec
apply v*reflection(rd,i)
L1329coreflect (RootDatum rd, vec v, vec alpha) = vec
v*reflection(rd,alpha)

also in this file at line 1336, line 1338

reflect 2 overloads

L1332reflect (RootDatum rd, int i, ratvec v) = ratvec
L1334reflect (RootDatum rd, vec alpha, ratvec v) = ratvec

also in this file at line 1323, line 1325

coreflect 2 overloads

L1336coreflect (RootDatum rd, ratvec v, int i) = ratvec
L1338coreflect (RootDatum rd, ratvec v, vec alpha) = ratvec

also in this file at line 1327, line 1329

left_reflect 2 overloads

L1342left_reflect (RootDatum rd, int i, mat M) = mat
in matrix version reflect becomes left_reflect and coreflect right_reflect
reflection(rd,i)*M
L1344left_reflect (RootDatum rd, vec alpha, mat M) = mat

right_reflect 2 overloads

L1346right_reflect (RootDatum rd, mat M, int i) = mat
M*reflection(rd,i)
L1348right_reflect (RootDatum rd, mat M, vec alpha) = mat

conjugate 2 overloads

L1351conjugate (RootDatum rd, int i, mat M) = mat
r*M*r where r=reflection
L1353conjugate (RootDatum rd, vec alpha, mat M) = mat

root_span_projector

L1358root_span_projector (RootDatum rd ,[int] S) = (mat,int)
orthogonal projection on span of subset of simple roots, a rational matrix

wall_projector

L1368wall_projector ((RootDatum,[int]) arg) = (mat,int)
complementary orthogonal projection, to intersection of walls

singular_simple_indices

L1372singular_simple_indices (RootDatum rd,ratvec v) = [int]
for (anti)dominant |v|, find simple generators of its singular subsystem

is_imaginary

L1375is_imaginary (mat theta) = (vec->bool)

also in this file at line 1941, line 1951, line 2020

is_real

L1376is_real (mat theta) = (vec->bool)

also in this file at line 1940, line 1952, line 2021

is_complex

L1377is_complex (mat theta) = (vec->bool)

also in this file at line 1939, line 1953, line 2022; also defined in complex.at, sub_cells.at

imaginary_roots

L1381imaginary_roots (RootDatum rd, mat theta) = mat
these functions are just for convenience; posroot versions are more useful

real_roots

L1383real_roots (RootDatum rd, mat theta) = mat

imaginary_coroots

L1387imaginary_coroots (RootDatum rd, mat theta) = mat
for coroots we need to use the transpose matrix

real_coroots

L1389real_coroots (RootDatum rd, mat theta) = mat

imaginary_posroots

L1393imaginary_posroots (RootDatum rd,mat theta) = mat
positive (co)roots versions are actually more useful

also in this file at line 1956

real_posroots

L1395real_posroots (RootDatum rd,mat theta) = mat

also in this file at line 1958

imaginary_poscoroots

L1397imaginary_poscoroots (RootDatum rd,mat theta) = mat

also in this file at line 1960

real_poscoroots

L1399real_poscoroots (RootDatum rd,mat theta) = mat

also in this file at line 1962

imaginary_sys

L1401imaginary_sys ((RootDatum,mat)p) = (mat,mat)

also in this file at line 1964

real_sys

L1403real_sys ((RootDatum,mat)p) = (mat,mat)

also in this file at line 1967

is_dominant

L1407is_dominant (RootDatum rd, ratvec v) = bool
whether v is a weakly dominant weight for rd

also in this file at line 1418

is_strictly_dominant

L1409is_strictly_dominant (RootDatum rd, ratvec v) = bool

also in this file at line 1420

is_regular

L1411is_regular (RootDatum rd,ratvec v) = bool
tests all positive coroots

also in this file at line 1422, line 2204

is_integral

L1413is_integral (RootDatum rd, ratvec v) = bool
integral on all coroots

also in this file at line 1424

and |is_integrally_dominant@(RootDatum,ratvec)| is built-in
L1415

is_dominant

L1418is_dominant (ratvec v, RootDatum rd) = bool
reversing order, similar questions about coweight v

also in this file at line 1407

is_strictly_dominant

L1420is_strictly_dominant (ratvec v,RootDatum rd) = bool

also in this file at line 1409

is_regular

L1422is_regular (ratvec v, RootDatum rd) = bool
tests all positive roots

also in this file at line 1411, line 2204

is_integral

L1424is_integral (ratvec v, RootDatum rd) = bool
integral on all roots

also in this file at line 1413

is_integrally_dominant

L1426is_integrally_dominant (ratvec v,RootDatum rd) = bool

also in this file at line 2194

radical_basis

L1430radical_basis (RootDatum rd) = mat
the following should replace the needlessly complicated built-ins they use
columns are coweights
drop coroots part

coradical_basis

L1432coradical_basis (RootDatum rd) = mat
columns are weights
drop roots part

is_semisimple

L1435is_semisimple (RootDatum rd) = bool

derived_is_simply_connected

L1437derived_is_simply_connected (RootDatum rd) = bool

has_connected_center

L1439has_connected_center (RootDatum rd) = bool

is_simply_connected

L1441is_simply_connected (RootDatum rd) = bool

is_adjoint

L1443is_adjoint (RootDatum rd) = bool

derived

L1449derived (RootDatum rd) = RootDatum
the following functions give but partial information; giving a more complete
definition for InnerClass values needs more work (see group_operations.at)

mod_central_torus

L1450mod_central_torus (RootDatum rd) = RootDatum

is_simple_for

L1454is_simple_for (vec dual_two_rho) = (vec->bool)
from appropriate (subsystem) dual 2rho value, deduce test for being simple

simple_system_from_positive

L1458simple_system_from_positive (mat posroots,mat poscoroots) = (mat,mat)
get generating simple system from set of matching posroots and poscoroots

root_datum_from_positive

L1468root_datum_from_positive ( (mat,mat) (posroots,poscoroots):pair, bool prefer_coroots ) = RootDatum

sub_datum

L1476sub_datum(RootDatum rd, (int->bool) select ) = RootDatum
|sub_datum| with predicate argument preserves positivity of (co)roots
from posroot indices

also in this file at line 1201

some code proceeds by "simple factor", isolating a |sub_datum| for each;
functions that expect a specific simple type can call |test_simple_type|
L1484

test_simple_type

L1490test_simple_type(string T, RootDatum rd) = [int]
test |rd| for being of simple type T (a letter in "ABCDEFG"), and return (as
a list of integers) a map from standard diagram labelling to |rd| simple roots

fundamental_weights

L1517fundamental_weights (RootDatum rd) = [ratvec]

fundamental_coweights

L1519fundamental_coweights (RootDatum rd) = [ratvec]

singular_root_datum

L1523singular_root_datum(RootDatum rd,ratvec gamma) = RootDatum
root datum of singular roots

project_to_dominant_cone

L1532project_to_dominant_cone (RootDatum rd, ratvec gamma) = (ratvec,int)
(nearest dominant vector to |gamma|, facet identification nr

(highest_root_indices, highest_coroot_indices)

L1548(highest_root_indices,highest_coroot_indices) = ((RootDatum->[int]),(RootDatum->[int]))

highest_roots

L1574highest_roots (RootDatum rd) = [vec]
list of all highest roots (one for each simple factor)

highest_coroots

L1576highest_coroots (RootDatum rd) = [vec]

lowest_roots

L1578lowest_roots (RootDatum rd) = [vec]

lowest_coroots

L1580lowest_coroots (RootDatum rd) = [vec]

simple_root_labels

L1583simple_root_labels (RootDatum rd) = vec

simple_coroot_labels

L1587simple_coroot_labels (RootDatum rd) = vec

highest_root

L1593highest_root (RootDatum rd) = vec
single highest root, or error if |rd| has not exactly one simple factor
Weyl group
L1602

is_member

L1604is_member = ([WeylElt]->(WeylElt->bool))

also in this file at line 265, line 419, line 546, line 638

isnt_member

L1605isnt_member = ([WeylElt]->(WeylElt->bool))

also in this file at line 266, line 420, line 547, line 639

id_W

L1607id_W (RootDatum rd) = WeylElt

W_gen

L1608W_gen (RootDatum rd, int s)

W_gens

L1609W_gens (RootDatum rd) = [WeylElt]

* 2 overloads

L1611* (WeylElt w,mat theta) = mat
L1612* (mat theta,WeylElt w) = mat

also in this file at line 352, line 522, line 525, line 550, line 557, line 789, line 980, line 981, line 995, line 1696, line 1697; also defined in extParamPol.at, complex.at, modules.at, hodge_tensor.at, tits_centralizer.at, stable.at

for_dual_datum

L1616for_dual_datum(WeylElt w) = WeylElt
morphism W(rd)->W(dual(rd)), involves transpose inverse on matrices

product

L1619product (RootDatum rd, [WeylElt] L) = WeylElt
product of Weyl group elements respects Left (index 0) and Right; compute LtR

also in this file at line 356, line 519, line 803

order

L1622order (WeylElt !w) = int

also in this file at line 967; also defined in all_finite_order.at

rho_diff

L1623rho_diff (WeylElt w) = vec

rho_check_diff

L1624rho_check_diff (WeylElt w) = vec

positive_to_negative

L1628positive_to_negative (WeylElt w) = [int]
the set of posroots that w maps to negative roots, as a bitset

posroot_sum

L1631posroot_sum (RootDatum rd,[int] select) = vec

poscoroot_sum

L1633poscoroot_sum (RootDatum rd,[int] select) = vec

from_dominant 4 overloads

L1637from_dominant (RootDatum rd, [int] S, vec v) = (WeylElt,vec)
make dominant for a Levi subsystem, and find a witness for returning
L1644from_dominant (RootDatum rd, [int] S, ratvec rv) = (WeylElt,ratvec)
L1647from_dominant (vec v, RootDatum rd, [int] S) = (vec,WeylElt)
L1654from_dominant (ratvec rv, RootDatum rd, [int] S) = (ratvec,WeylElt)

also in this file at line 1698, line 1703

chamber

L1657chamber ((RootDatum,vec) rd_lambda) = WeylElt

also in this file at line 1661, line 1666, line 1670, line 1700, line 1705

dominant

L1659dominant ((RootDatum,vec) rd_lambda) = vec

also in this file at line 1663, line 1668, line 1672, line 1701, line 1706

chamber

L1661chamber ((RootDatum,[int],vec) triple) = WeylElt

also in this file at line 1657, line 1666, line 1670, line 1700, line 1705

dominant

L1663dominant ((RootDatum,[int],vec) triple) = vec

also in this file at line 1659, line 1668, line 1672, line 1701, line 1706

chamber

L1666chamber ((vec,RootDatum) lambda_rd) = WeylElt

also in this file at line 1657, line 1661, line 1670, line 1700, line 1705

dominant

L1668dominant ((vec,RootDatum) lambda_rd) = vec

also in this file at line 1659, line 1663, line 1672, line 1701, line 1706

chamber

L1670chamber ((vec,RootDatum,[int]) triple) = WeylElt

also in this file at line 1657, line 1661, line 1666, line 1700, line 1705

dominant

L1672dominant ((vec,RootDatum,[int]) triple) = vec

also in this file at line 1659, line 1663, line 1668, line 1701, line 1706

permuted_root

L1675permuted_root (WeylElt w, int alpha) = int

permuted_coroot

L1678permuted_coroot (int alpha,WeylElt w) = int

from_dominant_root

L1682from_dominant_root(RootDatum rd, [int]S, int alpha) = (WeylElt,int)

w0

L1694w0 (RootDatum rd)

* 2 overloads

L1696* (WeylElt w, ratvec gamma) = ratvec
L1697* (ratvec gamma, WeylElt w) = ratvec

also in this file at line 352, line 522, line 525, line 550, line 557, line 789, line 980, line 981, line 995, line 1611, line 1612; also defined in extParamPol.at, complex.at, modules.at, hodge_tensor.at, tits_centralizer.at, stable.at

from_dominant

L1698from_dominant (RootDatum rd, ratvec gamma) = (WeylElt,ratvec)

also in this file at line 1637, line 1644, line 1647, line 1654, line 1703

chamber

L1700chamber (RootDatum rd, ratvec gamma) = WeylElt

also in this file at line 1657, line 1661, line 1666, line 1670, line 1705

dominant

L1701dominant ((RootDatum,ratvec) rd_gamma) = ratvec

also in this file at line 1659, line 1663, line 1668, line 1672, line 1706

from_dominant

L1703from_dominant (ratvec gamma,RootDatum rd) = (ratvec,WeylElt)

also in this file at line 1637, line 1644, line 1647, line 1654, line 1698

chamber

L1705chamber (ratvec gamma,RootDatum rd) = WeylElt

also in this file at line 1657, line 1661, line 1666, line 1670, line 1700

dominant

L1706dominant ((ratvec,RootDatum) gamma_rd) = ratvec

also in this file at line 1659, line 1663, line 1668, line 1672, line 1701

inverse

L1709inverse (WeylElt w) = WeylElt

also in this file at line 843; also defined in combinatorics.at

^

L1710^ = (WeylElt,int->WeylElt)

also in this file at line 140, line 771, line 772, line 776, line 827, line 1085

matrix

L1718matrix (WeylElt w) = mat

also in this file at line 736

W_elt

L1720W_elt (RootDatum rd, mat M) = WeylElt

W_elt_of_reflection 2 overloads

L1723W_elt_of_reflection(RootDatum rd,int root) = WeylElt
L1725W_elt_of_reflection(RootDatum rd,vec alpha) = WeylElt

convert_to

L1730convert_to (RootDatum rd, WeylElt w) = WeylElt
|convert_to| serves when |rd| differs from |w.root_datum|, but nonetheless
|W_elt(rd,matrix(w)| is defined; it computes that value more efficiently
Inner classes
L1732

involution

L1734involution (LieType lt, string ict) = mat

also in this file at line 2097, line 2202

inner_class

L1740inner_class (RootDatum rd, string ict) = InnerClass
get inner class of G symbolically from root datum and inner class type
Use the complex reductive group given by the root datum, but compute the
distinguished involution from the string describing it symbolically.

also in this file at line 1750, line 1883, line 2069, line 2157

construct inner class from explicit involution
L1748

inner_class

L1750inner_class (LieType lt, [ratvec] gens, string ict) = InnerClass

also in this file at line 1740, line 1883, line 2069, line 2157

twist

L1754twist (InnerClass ic) = vec
automorphism of Dynkin diagram, mapped

dual_integral

L1760dual_integral (InnerClass ic, ratvec gamma) = InnerClass
integrality inner class (dual side) defined by inf. character and involution

big_block

L1763big_block (InnerClass ic) = Block
Cartan classes
L1767

Cartan_classes

L1769Cartan_classes (InnerClass ic) = [CartanClass]

fundamental_Cartan

L1791fundamental_Cartan (InnerClass ic) = CartanClass

most_split_Cartan

L1793most_split_Cartan (InnerClass ic) = CartanClass
implicitly fundamental_Cartan(RealForm f) = fundamental_Cartan(InnerClass:f)
also most_split_Cartan@RealForm is built-in, but is not that of inner class
L1795

compact_rank

L1798compact_rank (CartanClass cc) = int
in the following, Complex factors count as half-compact, half-split

also in this file at line 1803

split_rank

L1800split_rank (CartanClass cc) = int

also in this file at line 1804

compact_rank

L1803compact_rank (InnerClass ic) = int

also in this file at line 1798

split_rank

L1804split_rank (RealForm G) = int

also in this file at line 1800

is_equal_rank

L1806is_equal_rank (InnerClass ic) = bool
whether distinguished_involution=1
implicitly is_equal_rank (RealForm G) = bool: is_equal_rank(InnerClass:G)
L1808

is_split 2 overloads

L1810is_split (RealForm G) = bool
whether most split Cartan has theta = -1
L1813is_split (InnerClass ic) = bool
avoid implicit conversion RealForm->InnerClass: would give wrong answer

=

L1816= (CartanClass H,CartanClass J) = bool
equality of Cartan classes

also in this file at line 348, line 764; also defined in combinatorics.at, modules.at

compare their twisted involutions
L1818

number

L1821number(CartanClass H,RealForm G) = int
number of the Cartan class H in the list of those for the real form G

also in this file at line 1881

Real forms
L1824

form_name

L1826form_name (RealForm f) = string

real_forms

L1828real_forms (InnerClass ic) = [RealForm]

dual_real_forms 2 overloads

L1830dual_real_forms (InnerClass ic) = [RealForm]
L1833dual_real_forms (RealForm G) = [RealForm]

is_quasisplit

L1836is_quasisplit (RealForm G) = bool

is_quasicompact

L1837is_quasicompact (RealForm G) = bool

split_form 2 overloads

L1839split_form (RootDatum r) = RealForm
L1843split_form (LieType t) = RealForm
split form of a Lie type is taken simply connected (times a split torus)

quasicompact_form

L1845quasicompact_form (InnerClass ic) = RealForm
quasisplit_form@InnerClass is built-in
L1846

compact_form

L1848compact_form (RootDatum r) = RealForm

compact_torus

L1851compact_torus (int rank) = RealForm

split_torus

L1853split_torus (int rank) = RealForm

real_complex_torus

L1855real_complex_torus (int complex_rank) = RealForm

torus

L1861torus(CartanClass C) = RealForm

also defined in nilpotent_centralizer.at

is_compatible

L1868is_compatible (RealForm f, RealForm g) = bool

is_compact

L1872is_compact (RealForm G) = bool
real form 0 in equal rank inner class

also in this file at line 1943, line 1986

KGB elements
L1877

real_form

L1879real_form (KGBElt x)

also defined in weak_packets_precomputed_cell_traces.at

#

L1880# (KGBElt x)

also in this file at line 130, line 135, line 767, line 768; also defined in W_reps.at

number

L1881number = #@KGBElt

also in this file at line 1821

root_datum

L1882root_datum (KGBElt x) = RootDatum

also in this file at line 1176, line 1182, line 1208, line 1211, line 1215, line 2068, line 2101, line 2156, line 2389; also defined in W_reps.at, K_Nilpotent.at, sommers.at

inner_class

L1883inner_class (KGBElt x) = InnerClass

also in this file at line 1740, line 1750, line 2069, line 2157

KGB

L1885KGB (RealForm rf) = [KGBElt]

also in this file at line 1892

in_distinguished_fiber

L1887in_distinguished_fiber (KGBElt x) = bool

distinguished_fiber

L1888distinguished_fiber (RealForm G) = [KGBElt]

KGB

L1892KGB (CartanClass H,RealForm G) = [KGBElt]
all KGB elements of G mapping to its Cartan class H

also in this file at line 1885

KGB_elt

L1895KGB_elt ((InnerClass, mat, ratvec) (,theta,v):all) = KGBElt

also in this file at line 1899, line 1904

find KGB element within rf
L1897

KGB_elt 2 overloads

L1899KGB_elt (RootDatum rd, mat theta, ratvec v) = KGBElt
L1904KGB_elt (InnerClass ic, KGBElt x) = KGBElt
transfer to other inner class (or real form) that shares coordinates,
this can be used for instance to embed the KGB set of a Levi subgroup

also in this file at line 1895

Cartan_class

L1907Cartan_class (InnerClass ic, mat theta) = CartanClass

also in this file at line 2082, line 2170

Bruhat_order

L1911Bruhat_order (RealForm G) = (KGBElt,KGBElt->bool)
use the following as follows: |set <= = Bruhat_order(G)|

cross 2 overloads

L1914cross (WeylElt w,KGBElt x) = KGBElt
L1917cross (KGBElt x,WeylElt w) = KGBElt

also in this file at line 1923, line 2220, line 2223; also defined in coherent_irreducible.at

status

L1921status (vec alpha,KGBElt x) = int

also in this file at line 2273, line 2281; also defined in modules.at

cross

L1923cross (vec alpha,KGBElt x) = KGBElt

also in this file at line 1914, line 1917, line 2220, line 2223; also defined in coherent_irreducible.at

Cayley

L1925Cayley (vec alpha,KGBElt x) = KGBElt

W_cross

L1928W_cross (WeylElt w,KGBElt x) = KGBElt

KGB_status_text

L1931KGB_status_text (int i) = string

status_text 2 overloads

L1934status_text ((int,KGBElt)p) = string
L1935status_text ((vec,KGBElt)p) = string

also in this file at line 2289, line 2293

status_texts

L1936status_texts (KGBElt x) = [string]

also in this file at line 2290

is_complex

L1939is_complex ((int,KGBElt)p)

also in this file at line 1377, line 1953, line 2022; also defined in complex.at, sub_cells.at

is_real

L1940is_real ((int,KGBElt)p)

also in this file at line 1376, line 1952, line 2021

is_imaginary

L1941is_imaginary ((int,KGBElt)p)

also in this file at line 1375, line 1951, line 2020

is_noncompact

L1942is_noncompact ((int,KGBElt)p)

also in this file at line 1989

is_compact

L1943is_compact ((int,KGBElt)p)

also in this file at line 1872, line 1986

is_descent

L1944is_descent ((int,KGBElt)p)

also in this file at line 2302, line 2309

is_ascent

L1945is_ascent ((int,KGBElt)p)

also in this file at line 2311, line 2312

is_strict_descent

L1946is_strict_descent ((int,KGBElt)p)
is_descent(p) and not is_compact(p)
status of general roots for a KGBElt (which here just represents its fiber)
L1949

is_imaginary

L1951is_imaginary (KGBElt x) = (vec->bool)

also in this file at line 1375, line 1941, line 2020

is_real

L1952is_real (KGBElt x) = (vec->bool)

also in this file at line 1376, line 1940, line 2021

is_complex

L1953is_complex (KGBElt x) = (vec->bool)

also in this file at line 1377, line 1939, line 2022; also defined in complex.at, sub_cells.at

imaginary_posroots

L1956imaginary_posroots (KGBElt x) = mat

also in this file at line 1393

real_posroots

L1958real_posroots (KGBElt x) = mat

also in this file at line 1395

imaginary_poscoroots

L1960imaginary_poscoroots (KGBElt x) = mat

also in this file at line 1397

real_poscoroots

L1962real_poscoroots (KGBElt x) = mat

also in this file at line 1399

imaginary_sys

L1964imaginary_sys (KGBElt x) = (mat,mat)

also in this file at line 1401

real_sys

L1967real_sys (KGBElt x) = (mat,mat)

also in this file at line 1403

rho_i

L1971rho_i (KGBElt x) = ratvec

also in this file at line 1976

rho_r

L1972rho_r (KGBElt x) = ratvec

also in this file at line 1978

rho_check_i

L1973rho_check_i (KGBElt x) = ratvec

also in this file at line 1980

rho_check_r

L1974rho_check_r (KGBElt x) = ratvec

also in this file at line 1982

rho_i

L1976rho_i ((RootDatum,mat) rd_theta) = ratvec

also in this file at line 1971

rho_r

L1978rho_r ((RootDatum,mat) rd_theta) = ratvec

also in this file at line 1972

rho_check_i

L1980rho_check_i ((RootDatum,mat) rd_theta) = ratvec

also in this file at line 1973

rho_check_r

L1982rho_check_r ((RootDatum,mat) rd_theta) = ratvec

also in this file at line 1974

is_compact

L1986is_compact (KGBElt x) = (vec->bool)
compact/noncompact status for a given KGBElt of general imaginary roots

also in this file at line 1872, line 1943

is_noncompact

L1989is_noncompact (KGBElt x) = (vec->bool)

also in this file at line 1942

is_compact_imaginary

L1994is_compact_imaginary (KGBElt x) = (vec->bool)
for roots not known to be imaginary, use these functions instead

also in this file at line 2023, line 2094, line 2199

is_noncompact_imaginary

L1997is_noncompact_imaginary (KGBElt x) = (vec->bool)

also in this file at line 2024, line 2092, line 2197

compact_posroots

L2001compact_posroots (KGBElt x) = mat

noncompact_posroots

L2003noncompact_posroots (KGBElt x) = mat

dimension

L2006dimension (KGBElt x) = int
dimension as $K$-orbit on $G/B$

also in this file at line 1169

codimension

L2014codimension(KGBElt x) = int
codimension as $K$-orbit on $G/B$

also in this file at line 2171

rho_ci

L2017rho_ci (KGBElt x) = ratvec

rho_nci

L2018rho_nci (KGBElt x) = ratvec

is_imaginary

L2020is_imaginary (vec v,KGBElt x) = bool

also in this file at line 1375, line 1941, line 1951

is_real

L2021is_real (vec v,KGBElt x) = bool

also in this file at line 1376, line 1940, line 1952

is_complex

L2022is_complex (vec v,KGBElt x) = bool

also in this file at line 1377, line 1939, line 1953; also defined in complex.at, sub_cells.at

is_compact_imaginary

L2023is_compact_imaginary (vec v,KGBElt x) = bool

also in this file at line 1994, line 2094, line 2199

is_noncompact_imaginary

L2024is_noncompact_imaginary (vec v,KGBElt x) = bool

also in this file at line 1997, line 2092, line 2197

no_Cminus_roots

L2031no_Cminus_roots (KGBElt x) = bool

no_Cplus_roots

L2033no_Cplus_roots (KGBElt x) = bool
Blocks
L2036

blocks 2 overloads

L2038blocks (RealForm rf) = [Block]
L2044blocks (InnerClass ic) = [Block]

raw_KL

L2054raw_KL ((RealForm,RealForm) p) = (mat,[vec],vec)

dual_KL

L2055dual_KL ((RealForm,RealForm) p) = (mat,[vec],vec)
K-types
L2066

root_datum

L2068root_datum (KType t) = RootDatum

also in this file at line 1176, line 1182, line 1208, line 1211, line 1215, line 1882, line 2101, line 2156, line 2389; also defined in W_reps.at, K_Nilpotent.at, sommers.at

inner_class

L2069inner_class (KType t) = InnerClass

also in this file at line 1740, line 1750, line 1883, line 2157

x

L2071x (KType t) = KGBElt

also in this file at line 2162

lambda_minus_rho

L2072lambda_minus_rho (KType t) = vec

also in this file at line 2163

lambda_rho

L2073lambda_rho = lambda_minus_rho@KType
shorter name allowed

lambda

L2074lambda (KType t) = ratvec

also in this file at line 2164

theta_plus_1_lambda

L2075theta_plus_1_lambda (KType t) = vec

also in this file at line 2166

K_type_lambda

L2079K_type_lambda (KGBElt x, ratvec lambda) = KType
this constructor could be called |K_type|, but that would be confusing

Cartan_class

L2082Cartan_class (KType t) = CartanClass

also in this file at line 1907, line 2170

non_dominant_simples

L2085non_dominant_simples (KType t) = [int]
list or poscoroot indices that exhibit non-dominance of the parameter

also in this file at line 2180

is_noncompact_imaginary

L2092is_noncompact_imaginary (int i,KType t) = bool
questions about status of x component with respect to full datum simple root

also in this file at line 1997, line 2024, line 2197

is_compact_imaginary

L2094is_compact_imaginary (int i,KType t) = bool

also in this file at line 1994, line 2023, line 2199

involution

L2097involution (KType t) = mat

also in this file at line 1734, line 2202

Polynomials in K-types
L2099

root_datum

L2101root_datum (KTypePol P) = RootDatum

also in this file at line 1176, line 1182, line 1208, line 1211, line 1215, line 1882, line 2068, line 2156, line 2389; also defined in W_reps.at, K_Nilpotent.at, sommers.at

K_type_formula

L2103K_type_formula (KType t) = KTypePol
no cutoff

null_module 2 overloads

L2105null_module (KType t) = KTypePol
avoid useless conversion to KTypePol
L2107null_module (KTypePol P) = KTypePol
built-in does this efficiently

also in this file at line 2159, line 2391

null_K_module 2 overloads

L2108null_K_module = null_module@KType
allow more explicit name
L2109null_K_module = null_module@KTypePol
allow more explicit name

-

L2110-(KTypePol P) = KTypePol

also in this file at line 790, line 2119, line 2122, line 2133, line 2392, line 2404, line 2407, line 2418; also defined in extParamPol.at, modules.at

first_K_type

L2112first_K_type (KTypePol P) = KType

last_K_type

L2113last_K_type (KTypePol P) = KType

s_to_1

L2115s_to_1 (KTypePol P) = KTypePol

also in this file at line 1052, line 2400

s_to_minus_1

L2116s_to_minus_1 (KTypePol P) = KTypePol

also in this file at line 1053, line 2401

-

L2119- (KTypePol a, (Split,KType) (c,p)) = KTypePol
counterpart to built-in +@(KTypePol,(Split,KType))

also in this file at line 790, line 2110, line 2122, line 2133, line 2392, line 2404, line 2407, line 2418; also defined in extParamPol.at, modules.at

+

L2121+ (KTypePol P, [KType] ps) = KTypePol

also in this file at line 549, line 559, line 560, line 562, line 2132, line 2406, line 2417; also defined in extParamPol.at, modules.at

-

L2122- (KTypePol P, [KType] ps) = KTypePol

also in this file at line 790, line 2110, line 2119, line 2133, line 2392, line 2404, line 2407, line 2418; also defined in extParamPol.at, modules.at

sum

L2125sum = (RealForm,[KTypePol]->KTypePol)
|KTypePol| summation by divide and conquer to privilege balanced additions

also in this file at line 355, line 518, line 650, line 794, line 800, line 915, line 987, line 1098, line 2410; also defined in sommers.at

+

L2132+ (KTypePol P,[KTypePol] Ps) = KTypePol

also in this file at line 549, line 559, line 560, line 562, line 2121, line 2406, line 2417; also defined in extParamPol.at, modules.at

-

L2133- (KTypePol P,[KTypePol] Ps) = KTypePol

also in this file at line 790, line 2110, line 2119, line 2122, line 2392, line 2404, line 2407, line 2418; also defined in extParamPol.at, modules.at

map 4 overloads

L2135map ((KType->KType)f, KTypePol P) = KTypePol
L2137map ((Param->KType)f, ParamPol P) = KTypePol
L2140map ((KType->KTypePol)f, KTypePol P) = KTypePol
L2142map ((Param->KTypePol)f, ParamPol P) = KTypePol

also in this file at line 607, line 2421, line 2424; also defined in hermitian.at

half

L2145half (KTypePol P) = KTypePol

also in this file at line 358, line 1061, line 2427

divide_by

L2147divide_by (int n, KTypePol P) = KTypePol
inverse of multiplication *@(int,KTypePol); don't confuse with scaling

also in this file at line 2429

as_pol 2 overloads

L2149as_pol (KType p) = KTypePol
for making implicit conversion explicit
L2150as_pol (RealForm G, [KType] ps) = KTypePol

also in this file at line 2431, line 2432; also defined in modules.at

DON'T define as_pol ([KType] pp): cannot be correctly defined when #pp=0
L2152
Module parameters
L2154

root_datum

L2156root_datum (Param p) = RootDatum

also in this file at line 1176, line 1182, line 1208, line 1211, line 1215, line 1882, line 2068, line 2101, line 2389; also defined in W_reps.at, K_Nilpotent.at, sommers.at

inner_class

L2157inner_class (Param p) = InnerClass

also in this file at line 1740, line 1750, line 1883, line 2069

null_module

L2159null_module (Param p) = ParamPol
avoid useless conversion to ParamPol

also in this file at line 2105, line 2107, line 2391

x

L2162x (Param p) = KGBElt

also in this file at line 2071

lambda_minus_rho

L2163lambda_minus_rho (Param p) = vec

also in this file at line 2072

lambda

L2164lambda (Param p) = ratvec

also in this file at line 2074

infinitesimal_character

L2165infinitesimal_character (Param p) = ratvec

also in this file at line 2470; also defined in modules.at, sommers.at

theta_plus_1_lambda

L2166theta_plus_1_lambda (Param p) = vec

also in this file at line 2075

d_lambda

L2168d_lambda (Param p) = ratvec

nu

L2169nu (Param p) = ratvec

Cartan_class

L2170Cartan_class (Param p) = CartanClass

also in this file at line 1907, line 2082

codimension

L2171codimension (Param p) = int

also in this file at line 2014

integrality_datum

L2174integrality_datum (Param p) = RootDatum
root datum whose coroots are those integral on p.infinitesimal_character

integrality_rank

L2176integrality_rank (Param p) = int

non_dominant_simples

L2180non_dominant_simples (Param p) = [int]
list or poscoroot indices that exhibit non-dominance of the parameter

also in this file at line 2085

non_integrally_dominant_simples

L2187non_integrally_dominant_simples (Param p) = [vec]
list of integrally simple poscoroots that exhibit integral-non-dominance

is_integrally_dominant

L2194is_integrally_dominant (Param p) = bool
whether gamma integrally dominant

also in this file at line 1426

is_noncompact_imaginary

L2197is_noncompact_imaginary (int i,Param p) = bool
questions about status of x component with respect to full datum simple root

also in this file at line 1997, line 2024, line 2092

is_compact_imaginary

L2199is_compact_imaginary (int i,Param p) = bool

also in this file at line 1994, line 2023, line 2094

involution

L2202involution (Param p) = mat

also in this file at line 1734, line 2097

is_regular

L2204is_regular (Param p) = bool

also in this file at line 1411, line 1422

is_strongly_regular

L2209is_strongly_regular (Param p) = bool
Test whether (the infinitesimal character of) a parameter is
strongly regular.

survives

L2214survives = (Param->bool)
whether irreducible rpn survives translation functor from regular inf.char.
defined to mean exactly that

x_open

L2216x_open (RealForm G) = KGBElt

trivial

L2217trivial (RealForm G) = Param
parameter for the trivial representation

cross 2 overloads

L2220cross (WeylElt w,Param p) = Param
L2223cross (Param p,WeylElt w) = Param

also in this file at line 1914, line 1917, line 1923; also defined in coherent_irreducible.at

K_type_pol

L2227K_type_pol (Param p) = KTypePol
restrict, implicitly convert

param_pol

L2228param_pol (KType t) = ParamPol

also in this file at line 2394

parameter 2 overloads

L2233parameter (RealForm G,int x,ratvec lambda,ratvec nu) = Param
parameter(G,x,lambda,nu)=param(KGB(G,x),lambda-rho(G),nu), so you can enter
lambda without the rho shift; lambda may have denominator 2 or be a vec
L2235parameter (KGBElt x,ratvec lambda,ratvec nu) = Param

also defined in L_packet.at

parameter_gamma

L2240parameter_gamma (KGBElt x, ratvec lambda, ratvec gamma) = Param
set parameter ensuring (upon success) that the infinitesimal char. is |gamma|;
achieve this by ignoring |(1+theta)*lambda|, replace it by |(1+theta)*gamma|

singular_block

L2246singular_block (Param p) = ([Param],int)
variation of built-in |block@Param| that weeds out non-starred block elts

block_of

L2251block_of (Param p) = [Param]
get just the parameters from a block, just a shortcut to: (params,)=block(p)

singular_block_of

L2252singular_block_of (Param p) = [Param]
status of parameter with respect to integrality generator s, or root alpha
L2255

imaginary_type

L2257imaginary_type (int s, Param p) = int

also in this file at line 2260

real_type

L2258real_type (int s,Param p) = int

also in this file at line 2262

imaginary_type

L2260imaginary_type (vec alpha, Param p) = int

also in this file at line 2257

real_type

L2262real_type (vec alpha, Param p) = int

also in this file at line 2258

is_nonparity

L2265is_nonparity (int s,Param p) = bool

also in this file at line 2268

is_parity

L2266is_parity (int s,Param p) = bool

also in this file at line 2270

is_nonparity

L2268is_nonparity (vec alpha,Param p) = bool

also in this file at line 2265

is_parity

L2270is_parity (vec alpha,Param p) = bool

also in this file at line 2266

status 2 overloads

L2273status (vec alpha,Param p) = int
enum: C-, ic, r1, r2, C+, rn, i1, i2
L2281status (int s,Param p) = int
this is NOT related to status(s,x(p))

also in this file at line 1921; also defined in modules.at

block_status_text

L2284block_status_text (int i) = string

status_text

L2289status_text (int s,Param p) = string

also in this file at line 1934, line 1935, line 2293

status_texts

L2290status_texts (Param p) = [string]

also in this file at line 1936

status_text

L2293status_text ((vec,Param) ap) = string

also in this file at line 1934, line 1935, line 2289

parity_poscoroots

L2295parity_poscoroots (Param p) = mat
set of positive real parity coroots

nonparity_poscoroots

L2298nonparity_poscoroots (Param p) = mat
positive real nonparity coroots

is_descent

L2302is_descent (int s,Param p) = bool

also in this file at line 1944, line 2309

tau_bitset

L2303tau_bitset (Param p) = (int,(int->bool))

tau

L2306tau (Param p) = [int]

also defined in modules.at, sub_cells.at

tau_complement

L2307tau_complement (Param p) = [int]

also defined in modules.at

is_descent

L2309is_descent ((vec,Param) ap) = bool

also in this file at line 1944, line 2302

is_ascent 2 overloads

L2311is_ascent ((int,Param) ip) = bool
L2312is_ascent ((vec,Param) ap) = bool

also in this file at line 1945

orientation_nr_term

L2317orientation_nr_term = (int,Param->Split)
(moved from hermitian.at) orientation_number_term(orientation_nr(p),q) =
s^{[\ell_0(p)-\ell_0(q)]/2} which should be defined and gives 1 or s
Extended blocks
L2324

extended_status_texts

L2326extended_status_texts = [string]
Polynomials in module parameters
L2387

root_datum

L2389root_datum (ParamPol P) = RootDatum

also in this file at line 1176, line 1182, line 1208, line 1211, line 1215, line 1882, line 2068, line 2101, line 2156; also defined in W_reps.at, K_Nilpotent.at, sommers.at

null_module

L2391null_module (ParamPol P) = ParamPol
built-in does this efficiently

also in this file at line 2105, line 2107, line 2159

-

L2392-(ParamPol P) = ParamPol

also in this file at line 790, line 2110, line 2119, line 2122, line 2133, line 2404, line 2407, line 2418; also defined in extParamPol.at, modules.at

param_pol

L2394param_pol (KTypePol P) = ParamPol

also in this file at line 2228

first_param

L2397first_param (ParamPol P) = Param

last_param

L2398last_param (ParamPol P) = Param

s_to_1

L2400s_to_1 (ParamPol P) = ParamPol

also in this file at line 1052, line 2115

s_to_minus_1

L2401s_to_minus_1 (ParamPol P) = ParamPol

also in this file at line 1053, line 2116

-

L2404- (ParamPol a, (Split,Param) (c,p)) = ParamPol
counterpart to built-in +@(ParamPol,(Split,Param))

also in this file at line 790, line 2110, line 2119, line 2122, line 2133, line 2392, line 2407, line 2418; also defined in extParamPol.at, modules.at

+

L2406+ (ParamPol P, [Param] ps) = ParamPol

also in this file at line 549, line 559, line 560, line 562, line 2121, line 2132, line 2417; also defined in extParamPol.at, modules.at

-

L2407- (ParamPol P, [Param] ps) = ParamPol

also in this file at line 790, line 2110, line 2119, line 2122, line 2133, line 2392, line 2404, line 2418; also defined in extParamPol.at, modules.at

sum

L2410sum = (RealForm,[ParamPol]->ParamPol)
|ParamPol| summation by divide and conquer to privilege balanced additions

also in this file at line 355, line 518, line 650, line 794, line 800, line 915, line 987, line 1098, line 2125; also defined in sommers.at

+

L2417+ (ParamPol P,[ParamPol] Ps) = ParamPol

also in this file at line 549, line 559, line 560, line 562, line 2121, line 2132, line 2406; also defined in extParamPol.at, modules.at

-

L2418- (ParamPol P,[ParamPol] Ps) = ParamPol

also in this file at line 790, line 2110, line 2119, line 2122, line 2133, line 2392, line 2404, line 2407; also defined in extParamPol.at, modules.at

map 2 overloads

L2421map ((Param->Param)f, ParamPol P) = ParamPol
L2424map ((Param->ParamPol)f, ParamPol P) = ParamPol

also in this file at line 607, line 2135, line 2137, line 2140, line 2142; also defined in hermitian.at

half

L2427half (ParamPol P) = ParamPol

also in this file at line 358, line 1061, line 2145

divide_by

L2429divide_by (int n, ParamPol P) = ParamPol
inverse of multiplication *@(int,ParamPol); don't confuse with scaling

also in this file at line 2147

as_pol 2 overloads

L2431as_pol (Param p) = ParamPol
for making implicit conversion explicit
L2432as_pol (RealForm G, [Param] ps) = ParamPol

also in this file at line 2149, line 2150; also defined in modules.at

DON'T define as_pol ([Param] pp): cannot be correctly defined when #pp=0
L2434

branch 2 overloads

L2437branch (KTypePol P, KType t) = Split
branch to get only the coefficient of a specific K-type
L2438branch (ParamPol P, KType t) = Split

also defined in modules.at

full_deform

L2440full_deform (ParamPol P) = KTypePol

also defined in extParamPol.at

deform_to_height

L2443deform_to_height (ParamPol P, int height) = KTypePol

pol_format 2 overloads

L2464pol_format (KTypePol P) = string
nice output of KTypePol and ParamPol: split_format the coefficients
L2466pol_format (ParamPol P) = string

infinitesimal_character

L2470infinitesimal_character(ParamPol P) = ratvec
find what should be unique infinitesimal character shared by all terms

also in this file at line 2165; also defined in modules.at, sommers.at

height_split 2 overloads

L2479height_split ((KTypePol,int)(P,):pair) = (KTypePol,KTypePol)
split up a KTypePol or ParamPol into terms below a given height and others
L2481height_split ((ParamPol,int)(P,):pair) = (ParamPol,ParamPol)

separate_by_infinitesimal_character

L2485separate_by_infinitesimal_character (ParamPol P) = [(ratvec,ParamPol)]
more generally, groups terms into different ParamPol, by value of gamma

is_pure_1

L2496is_pure_1 ([Split] L) = bool
whether all coefficients are integer respectively integer multiples of |s|

also in this file at line 2502, line 2505

is_pure_s

L2497is_pure_s ([Split] L) = bool

is_pure

L2498is_pure ([Split] L) = bool

also in this file at line 1068, line 2504, line 2507

is_pure_1

L2502is_pure_1 (KTypePol P) = bool
a module is considered pure if either all coefficients are integer of if all
coefficients are integer multiples of s; stronger than all coefficients pure

also in this file at line 2496, line 2505

is_pure

L2504is_pure (KTypePol P) = bool

also in this file at line 1068, line 2498, line 2507

is_pure_1

L2505is_pure_1 (ParamPol P) = bool

also in this file at line 2496, line 2502

is_pure

L2507is_pure (ParamPol P) = bool

also in this file at line 1068, line 2498, line 2504

purity

L2510purity (KTypePol P) = (int,int,int)
report number of integer, purely s, and mixed terms

monomials 2 overloads

L2522monomials (KTypePol P) = [KType]
moved these earlier to use in no_reps
for user convenience; a ParamPol is an associative array ParamPol->Split
so selecting its monomials (Param values) by position is not reliable, but
allowing so is useful in user sessions to pick terms from a computed result
L2523monomials (ParamPol P) = [Param]

also in this file at line 2671, line 2672, line 2678, line 2686

monomial 2 overloads

L2524monomial (KTypePol P,int i) = KType
L2525monomial (ParamPol P,int i) = Param

also in this file at line 2673, line 2674

Rapid look-up in certain fixed structures
L2528

no_reps 2 overloads

L2531no_reps([vec] L) = [vec]
remove repetitions from a list of vecs, assumed all same size
L2542no_reps([ratvec] L) = [ratvec]
remove repetitions from a list of ratvecs, assumed all same size

index_in 3 overloads

L2552index_in = ([vec]->(vec->int))
L2571index_in ([ratvec] L) = (ratvec->int)
equal size vectors
L2581index_in ([Param] L) = (Param->int)
an efficiency hack:

lookup

L2589lookup (Param p, [Param] block) = int

also defined in hodge_K_type_formula.at

Miscellaneous
L2591
Miscellaneous find functions
L2593
find index of item in list, or -1 if not found; |first| does this
L2595

present_in

L2598any_type S, Tpresent_in ([T]a,(T,T->bool)eq)

find

L2599any_type S, Tfind ((T,T->bool)eq) = ([T] a, T y) int

also in this file at line 2604, line 2605, line 2606, line 2607, line 2608, line 2609; also defined in tits_centralizer.at

find_in

L2600any_type S, Tfind_in ([T] a, (T,T->bool)eq) = (T x) int

delete

L2601any_type S, Tdelete ([T] a, int i) = [T]

also in this file at line 2611, line 2612; also defined in hodge_K_type_formula.at

find 6 overloads

L2604find = find(=@(int,int))
L2605find = find(=@((int,int),(int,int)))
L2606find = find(=@(vec,vec))
L2607find = find(=@(ratvec,ratvec))
L2608find = find(=@(KGBElt,KGBElt))
L2609find = find(=@(Param,Param))

also in this file at line 2599; also defined in tits_centralizer.at

delete 2 overloads

L2611delete (vec v, int i) = vec
L2612delete (mat M, int j) = mat

also in this file at line 2601; also defined in hodge_K_type_formula.at

No version for finding [int] due to potential ambiguity with vec version.
Note that |find(L,x)| has alternative |first(for y in L do x=y od)| which
can be used for all types having =, without separate definition of |find|
L2614

in_string_list

L2619in_string_list (string s,[string] S) = bool

positive_imaginary_roots_and_coroots 2 overloads

L2621positive_imaginary_roots_and_coroots = imaginary_sys@(RootDatum,mat)
L2622positive_imaginary_roots_and_coroots = imaginary_sys@KGBElt

imaginary_roots_and_coroots 2 overloads

L2624imaginary_roots_and_coroots ((RootDatum, mat)p) = (mat,mat)
L2626imaginary_roots_and_coroots (KGBElt x) = (mat,mat)

positive_real_roots_and_coroots 2 overloads

L2629positive_real_roots_and_coroots = real_sys@(RootDatum,mat)
L2630positive_real_roots_and_coroots = real_sys@KGBElt

real_roots_and_coroots 2 overloads

L2632real_roots_and_coroots ((RootDatum, mat)p) = (mat,mat)
L2634real_roots_and_coroots (KGBElt x) = (mat,mat)

complex_posroots 2 overloads

L2637complex_posroots (RootDatum rd,mat theta) = mat
L2639complex_posroots (KGBElt x) = mat

pad

L2643pad (string s,int width) = string
pad string with blanks (for lining up columns in tables)

also in this file at line 729

min_height 2 overloads

L2645min_height (KTypePol P) = Maybe<int>
L2647min_height (ParamPol P) = Maybe<int>

also in this file at line 2660, line 2694

max_height 2 overloads

L2649max_height (KTypePol P) = Maybe<int>
L2651max_height (ParamPol P) = Maybe<int>

height 2 overloads

L2655height (KTypePol P) = int
height of polynomial is that of highest term, or -1 for an empty polynomial
L2657height (ParamPol P) = int

min_height

L2660min_height([Param] params) = [Param]
keep only minimal height terms

also in this file at line 2645, line 2647, line 2694

monomials 2 overloads

L2671monomials (KTypePol P) = [KType]
for user convenience; a ParamPol is an associative array ParamPol->Split
so selecting its monomials (Param values) by position is not reliable, but
allowing so is useful in user sessions to pick terms from a computed result
L2672monomials (ParamPol P) = [Param]

also in this file at line 2522, line 2523, line 2678, line 2686

monomial 2 overloads

L2673monomial (KTypePol P,int i) = KType
L2674monomial (ParamPol P,int i) = Param

also in this file at line 2524, line 2525

monomials 2 overloads

L2678monomials([KTypePol] list) = [KType]
Convert a list of KTypePol into the list of distinct parameters occurring;
careful: don't let terms cancel!
L2686monomials([ParamPol] list) = [Param]

also in this file at line 2522, line 2523, line 2671, line 2672

min_height

L2694min_height([Param] params) = [Param]
keep only minimal height terms

also in this file at line 2645, line 2647, line 2660

assert 3 overloads

L2702assert (bool b,(->string) report) = void
for script backward compatibility, but we should wean off using these:
L2703assert (bool b) = void
default message
L2704assert (bool b,string message) = void

also in this file at line 96, line 100, line 104

Generated from atlas-scripts at commit 7e1b958 (2026-09-17).