Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
make documentation ready for random seeds
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Kliem committed Jun 1, 2021
1 parent 6aa4ece commit 0e062d5
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/doc/en/constructions/groups.rst
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ Here's another way, working more directly with GAP::
sage: print(gap.eval("G := SymmetricGroup( 4 )"))
Sym( [ 1 .. 4 ] )
sage: print(gap.eval("normal := NormalSubgroups( G );"))
[ Sym( [ 1 .. 4 ] ), Alt( [ 1 .. 4 ] ), Group([ (1,4)(2,3), (1,2)(3,4) ]),
[ Sym( [ 1 .. 4 ] ), Alt( [ 1 .. 4 ] ), Group([ (1,4)(2,3), ... ]),
Group(()) ]

.. index::
Expand Down Expand Up @@ -252,7 +252,7 @@ Another example of using the small groups database: ``group_id``
gap> G:=Group((4,6,5)(7,8,9),(1,7,2,4,6,9,5,3));
Group([ (4,6,5)(7,8,9), (1,7,2,4,6,9,5,3) ])
gap> StructureDescription(G);
"(C3 x C3) : GL(2,3)"
"(C3 x C3) : GL(2,3)"

Construction instructions for every group of order less than 32
===============================================================
Expand Down
10 changes: 5 additions & 5 deletions src/doc/en/prep/Quickstarts/Linear-Algebra.rst
Original file line number Diff line number Diff line change
Expand Up @@ -330,17 +330,17 @@ We can easily solve linear equations using the backslash, like in Matlab.

::

sage: A=random_matrix(QQ,3) # random
sage: v=vector([2,3,1])
sage: A,v # random
sage: A = random_matrix(QQ, 3, algorithm='unimodular')
sage: v = vector([2,3,1])
sage: A,v # random
(
[ 0 -1 1]
[-1 -1 -1]
[ 0 2 2], (2, 3, 1)
)
sage: x=A\v; x # random
sage: x=A\v; x # random
(-7/2, -3/4, 5/4)
sage: A*x # random
sage: A*x # random
(2, 3, 1)

For *lots* more (concise) information, see the Sage `Linear Algebra
Expand Down
7 changes: 6 additions & 1 deletion src/doc/en/reference/sat/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,12 @@ Sage provides various highlevel functions which make working with Boolean polyno
construct a very small-scale AES system of equations and pass it to a SAT solver::

sage: sr = mq.SR(1,1,1,4,gf2=True,polybori=True)
sage: F,s = sr.polynomial_system()
sage: while True:
....: try:
....: F,s = sr.polynomial_system()
....: break
....: except ZeroDivisionError:
....: pass
sage: from sage.sat.boolean_polynomials import solve as solve_sat # optional - cryptominisat
sage: s = solve_sat(F) # optional - cryptominisat
sage: F.subs(s[0]) # optional - cryptominisat
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ compute its cardinality, which behind the scenes uses SEA.
::

sage: E = EllipticCurve_from_j(k.random_element())
sage: E.cardinality() # less than a second
sage: E.cardinality() # random, less than a second
99999999999371984255

To see how Sage chooses when to use SEA versus other methods, type
Expand Down
2 changes: 1 addition & 1 deletion src/doc/ja/tutorial/tour_groups.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Sageでは,置換群,有限古典群(例えば :math:`SU(n,q)`),有限行
False
sage: G.derived_series() # 結果は変化しがち
[Subgroup generated by [(3,4), (1,2,3)(4,5)] of (Permutation Group with generators [(3,4), (1,2,3)(4,5)]),
Subgroup generated by [(1,3,5), (1,5)(3,4), (1,5)(2,4)] of (Permutation Group with generators [(3,4), (1,2,3)(4,5)])]
Subgroup generated by [...] of (Permutation Group with generators [(3,4), (1,2,3)(4,5)])]
sage: G.center()
Subgroup generated by [()] of (Permutation Group with generators [(3,4), (1,2,3)(4,5)])
sage: G.random_element() # random 出力は変化する
Expand Down

0 comments on commit 0e062d5

Please sign in to comment.