"Source: Text/Aggregates/Assoc.text";
"Line: 126";
"Date: Thu Sep 25 14:47:47 2025";
"Main: Fri Sep 26 14:29:19 2025";
// original file: Text/Aggregates/Assoc.text, line: 126
// Example: H14E1 ()
print "Example: H14E1";
ei := GetEchoInput();
SetEchoInput(true);
A := AssociativeArray();
A[1/2] := 7;             
A[3/8] := "abc";
A[3] := 3/8;
A[1/2];
IsDefined(A, 3);
IsDefined(A, 4);
IsDefined(A, 3/8);
Keys(A);
Values(A);
for x in Keys(A) do x, A[x]; end for;
Remove(~A, 3/8);
IsDefined(A, 3/8);
Keys(A);
Values(A);
Universe(A);
G := Sym(3);
A := AssociativeArray(G);
v := 1; for x in G do A[x] := v; v +:= 1; end for;
A;
Keys(A);
A[G!(1,3,2)];
A := AssociativeArray(: Default := []);
x := 3; y := 5;
Append(~A[x], y);
assert A[x] eq [y];
assert Keys(A) eq {x};
assert Values(A) eq [* [ y ] *];
SetEchoInput(ei);
