diff --git a/src/doc/de/tutorial/interactive_shell.rst b/src/doc/de/tutorial/interactive_shell.rst index d29e7924871..eae174975af 100644 --- a/src/doc/de/tutorial/interactive_shell.rst +++ b/src/doc/de/tutorial/interactive_shell.rst @@ -621,15 +621,25 @@ um eine manpage-artige Hilfe zu bekommen. :: sage: help(VectorSpace) - Help on class VectorSpace ... - - class VectorSpace(__builtin__.object) - | Create a Vector Space. - | - | To create an ambient space over a field with given dimension - | using the calling syntax ... - : - : + Help on function VectorSpace in module sage.modules.free_module: + + VectorSpace(K, dimension_or_basis_keys=None, sparse=False, inner_product_matrix=None, *, + with_basis='standard', dimension=None, basis_keys=None, **args) + EXAMPLES: + + The base can be complicated, as long as it is a field. + + :: + + sage: V = VectorSpace(FractionField(PolynomialRing(ZZ,'x')),3) + sage: V + Vector space of dimension 3 over Fraction Field of Univariate Polynomial Ring in x + over Integer Ring + sage: V.basis() + [ + (1, 0, 0), + (0, 1, 0), + --More-- Wenn Sie ``q`` drücken um das Hilfesystem zu verlassen, kommen Sie genau dahin zurück, wo Sie Ihre Sitzung verlassen haben. Die ``help`` Anzeige diff --git a/src/doc/en/constructions/interface_issues.rst b/src/doc/en/constructions/interface_issues.rst index a46177793a2..c5df32a2a5f 100644 --- a/src/doc/en/constructions/interface_issues.rst +++ b/src/doc/en/constructions/interface_issues.rst @@ -132,34 +132,23 @@ returns .. CODE-BLOCK:: text - Help on function Matrix in module sage.matrix.constructor: - - Matrix(R, nrows, ncols, entries = 0, sparse = False) - Create a matrix. - - INPUT: - R -- ring - nrows -- int; number of rows - ncols -- int; number of columns - entries -- list; entries of the matrix - sparse -- bool (default: False); whether or not to store matrices as sparse - OUTPUT: - a matrix - - EXAMPLES: - sage: Matrix(RationalField(), 2, 2, [1,2,3,4]) - [1 2] - [3 4] - - sage: Matrix(FiniteField(5), 2, 3, range(6)) - [0 1 2] - [3 4 0] - - sage: Matrix(IntegerRing(), 10, 10, range(100)).parent() - Full MatrixSpace of 10 by 10 dense matrices over Integer Ring - - sage: Matrix(IntegerRing(), 10, 10, range(100), sparse = True).parent() - Full MatrixSpace of 10 by 10 sparse matrices over Integer Ring + Help on cython_function_or_method in module sage.matrix.constructor: + + matrix(*args, **kwds) + matrix(*args, **kwds) + File: sage/matrix/constructor.pyx (starting at line 21) + + Create a matrix. + + This implements the ``matrix`` constructor:: + + sage: matrix([[1,2],[3,4]]) + [1 2] + [3 4] + + It also contains methods to create special types of matrices, see + ``matrix.[tab]`` for more options. For example:: + --More-- in a new screen. Type q to return to the Sage screen. diff --git a/src/doc/en/tutorial/interactive_shell.rst b/src/doc/en/tutorial/interactive_shell.rst index 5ab9e6a79a6..bea6a321493 100644 --- a/src/doc/en/tutorial/interactive_shell.rst +++ b/src/doc/en/tutorial/interactive_shell.rst @@ -669,15 +669,25 @@ manpage-like help file about a given class. :: sage: help(VectorSpace) - Help on class VectorSpace ... - - class VectorSpace(__builtin__.object) - | Create a Vector Space. - | - | To create an ambient space over a field with given dimension - | using the calling syntax ... - : - : + Help on function VectorSpace in module sage.modules.free_module: + + VectorSpace(K, dimension_or_basis_keys=None, sparse=False, inner_product_matrix=None, *, + with_basis='standard', dimension=None, basis_keys=None, **args) + EXAMPLES: + + The base can be complicated, as long as it is a field. + + :: + + sage: V = VectorSpace(FractionField(PolynomialRing(ZZ,'x')),3) + sage: V + Vector space of dimension 3 over Fraction Field of Univariate Polynomial Ring in x + over Integer Ring + sage: V.basis() + [ + (1, 0, 0), + (0, 1, 0), + --More-- When you type ``q`` to exit the help system, your session appears just as it was. The help listing does not clutter up your session, diff --git a/src/doc/fr/tutorial/interactive_shell.rst b/src/doc/fr/tutorial/interactive_shell.rst index 1d1703cebea..1b7e2abae20 100644 --- a/src/doc/fr/tutorial/interactive_shell.rst +++ b/src/doc/fr/tutorial/interactive_shell.rst @@ -396,7 +396,7 @@ magiques » : exemple ``.profile``). La commande ``%edit`` à l'invite de Sage ouvrira l'éditeur sélectionné. Vous pouvez alors par exemple saisir une définition de fonction:: - + def some_function(n): return n**2 + 3*n + 2 @@ -679,15 +679,25 @@ classe. :: sage: help(VectorSpace) - Help on class VectorSpace ... - - class VectorSpace(__builtin__.object) - | Create a Vector Space. - | - | To create an ambient space over a field with given dimension - | using the calling syntax ... - : - : + Help on function VectorSpace in module sage.modules.free_module: + + VectorSpace(K, dimension_or_basis_keys=None, sparse=False, inner_product_matrix=None, *, + with_basis='standard', dimension=None, basis_keys=None, **args) + EXAMPLES: + + The base can be complicated, as long as it is a field. + + :: + + sage: V = VectorSpace(FractionField(PolynomialRing(ZZ,'x')),3) + sage: V + Vector space of dimension 3 over Fraction Field of Univariate Polynomial Ring in x + over Integer Ring + sage: V.basis() + [ + (1, 0, 0), + (0, 1, 0), + --More-- Pour quitter la page d'aide, appuyez sur ``q``. Votre session revient à l'écran comme elle était : contrairement à la sortie de ``fonction?``, diff --git a/src/doc/ja/tutorial/interactive_shell.rst b/src/doc/ja/tutorial/interactive_shell.rst index 3d741045b22..044606cba16 100644 --- a/src/doc/ja/tutorial/interactive_shell.rst +++ b/src/doc/ja/tutorial/interactive_shell.rst @@ -154,7 +154,7 @@ IPythonについてもっと知りたければ、Sageプロンプトで ``?`` Sageセッションのロギングと,セッションの保存(:ref:`section-save` 節を参照)は同じことではない. 入力のログをとるには, ``logstart`` コマンドを使う(オプションで出力のログも可能だ). -詳細については ``logstart?`` と入力してみてほしい. +詳細については ``logstart?`` と入力してみてほしい. ``logstart`` を使えば,全ての入力と出力のログを残し,将来のセッション時に(そのログファイルをリロードしてやるだけで)入力を再生することも可能になる. .. skip @@ -379,11 +379,11 @@ IPythonトリック IPythonのクイック レファレンスガイドを見たければ, ``%quickref`` と入力する. -執筆時点(2011年4月)ではSageはIPythonのバージョン0.9.1を採用しており, `documentation for its magic commands +執筆時点(2011年4月)ではSageはIPythonのバージョン0.9.1を採用しており, `documentation for its magic commands `_ はオンラインで読むことができる. マジックコマンドの,ちょっと進んだ機能群についてはIPythonの `ここ -`_ +`_ で文書化されているのが見つかるはずだ. @@ -452,7 +452,7 @@ Sageに戻るには,Ctrl-Dか ``quit`` を入力する. ================================= *遡行検索*: コマンドの冒頭部を打ち込んでから ``Ctrl-p`` (または上向き矢印キー)を押すと,冒頭部が一致する過去の入力行を全て呼び出すことができる. -この機能は,Sageをいったん終了し再起動してからでも有効である. +この機能は,Sageをいったん終了し再起動してからでも有効である. ``Ctrl-r`` を入力すれば,入力ヒストリを逆方向に検索することも可能だ. この入力行の検索と再利用機能は全て ``readline`` パッケージを経由しており,ほとんどのLinux系システム上で利用できるはずだ. @@ -610,15 +610,25 @@ Sageの特長の一つは,総合的なヘルプ機能の装備である. :: sage: help(VectorSpace) - Help on class VectorSpace ... + Help on function VectorSpace in module sage.modules.free_module: - class VectorSpace(__builtin__.object) - | Create a Vector Space. - | - | To create an ambient space over a field with given dimension - | using the calling syntax ... - : - : + VectorSpace(K, dimension_or_basis_keys=None, sparse=False, inner_product_matrix=None, *, + with_basis='standard', dimension=None, basis_keys=None, **args) + EXAMPLES: + + The base can be complicated, as long as it is a field. + + :: + + sage: V = VectorSpace(FractionField(PolynomialRing(ZZ,'x')),3) + sage: V + Vector space of dimension 3 over Fraction Field of Univariate Polynomial Ring in x + over Integer Ring + sage: V.basis() + [ + (1, 0, 0), + (0, 1, 0), + --More-- ``q`` と入力してヘルプを終えると,中断前のセッション画面がそのまま復帰する. @@ -647,10 +657,10 @@ Sageの特長の一つは,総合的なヘルプ機能の装備である. .. #. **Save your Game:** Only support saving and loading of complete sessions (e.g., GAP, Magma). - + #. **Unified Input/Output:** Make every object print in a way that can be read back in (GP/PARI). - + #. **Eval**: Make it easy to evaluate arbitrary code in the interpreter (e.g., Singular, PARI). diff --git a/src/doc/pt/tutorial/interactive_shell.rst b/src/doc/pt/tutorial/interactive_shell.rst index 77fd02870e0..7aa2dc19ee4 100644 --- a/src/doc/pt/tutorial/interactive_shell.rst +++ b/src/doc/pt/tutorial/interactive_shell.rst @@ -36,7 +36,7 @@ subprocessos como GAP ou Singular. (Evite terminar um processo do Sage usando ``kill -9`` a partir de um terminal, pois o Sage pode não terminal seus subprocessos, por -exemplo, subprocessos do Maple, ou limpeza de arquivos temporários em +exemplo, subprocessos do Maple, ou limpeza de arquivos temporários em ``$HOME/.sage/tmp``.) A Sua Sessão no Sage @@ -113,14 +113,14 @@ Você também pode salvar uma lista de comandos em uma macro. :: sage: E - Elliptic Curve defined by y^2 + x*y + 3*y = x^3 + 2*x^2 + 4*x + 5 over + Elliptic Curve defined by y^2 + x*y + 3*y = x^3 + 2*x^2 + 4*x + 5 over Rational Field sage: E = 5 sage: M = None sage: em Executing Macro... sage: E - Elliptic Curve defined by y^2 + x*y + 3*y = x^3 + 2*x^2 + 4*x + 5 over + Elliptic Curve defined by y^2 + x*y + 3*y = x^3 + 2*x^2 + 4*x + 5 over Rational Field Quando se usa a linha de comando, qualquer comando UNIX pode ser @@ -146,7 +146,7 @@ executa a versão incluída no Sage. sage: !gp Reading GPRC: /etc/gprc ...Done. - + GP/PARI CALCULATOR Version 2.2.11 (alpha) i686 running linux (ix86/GMP-4.1.4 kernel) 32-bit version ... @@ -177,7 +177,7 @@ arquivo log). │ SageMath version 9.7, Release Date: 2022-01-10 │ │ Using Python 3.10.4. Type "help()" for help. │ └────────────────────────────────────────────────────────────────────┘ - + sage: logstart setup Activating auto-logging. Current session state plus future input saved. Filename : setup @@ -196,12 +196,12 @@ arquivo log). │ SageMath version 9.7, Release Date: 2022-01-10 │ │ Using Python 3.10.4. Type "help()" for help. │ └────────────────────────────────────────────────────────────────────┘ - + sage: load "setup" Loading log file one line at a time... Finished replaying log file sage: E - Elliptic Curve defined by y^2 + x*y = x^3 - x^2 + 4*x + 3 over Rational + Elliptic Curve defined by y^2 + x*y = x^3 - x^2 + 4*x + 3 over Rational Field sage: x*y x*y @@ -296,7 +296,7 @@ comando ``cputime``, como ilustrado abaixo: sage: b = 1938^99484 sage: c = pari(1938)^pari(99484) sage: cputime(t) # somewhat random output - 0.64 + 0.64 .. skip @@ -425,7 +425,7 @@ exemplo, ZZ(3)_2 ^ SyntaxError: invalid ... - + sage: EllipticCurve([0,infinity]) ------------------------------------------------------------ Traceback (most recent call last): @@ -449,8 +449,8 @@ cima e para baixo. Por exemplo, --------------------------------------------------------------------------- Traceback (most recent call last) ... - - ipdb> + + ipdb> Para uma lista de comandos do debugador, digite ``?`` no prompt ``ipbd>``: @@ -458,20 +458,20 @@ Para uma lista de comandos do debugador, digite ``?`` no prompt :: ipdb> ? - + Documented commands (type help ): ======================================== - EOF break commands debug h l pdef quit tbreak - a bt condition disable help list pdoc r u + EOF break commands debug h l pdef quit tbreak + a bt condition disable help list pdoc r u alias c cont down ignore n pinfo return unalias args cl continue enable j next pp s up b clear d exit jump p q step w whatis where - + Miscellaneous help topics: ========================== exec pdb - + Undocumented commands: ====================== retval rv @@ -496,7 +496,7 @@ tri-dimensional :math:`V=\QQ^3` da seguinte forma: :: sage: V = VectorSpace(QQ,3) - sage: V + sage: V Vector space of dimension 3 over Rational Field Você pode usar a seguinte notação mais compacta: @@ -555,7 +555,7 @@ seguido de ? para ver informações sobre a função. sage: V.coordinates? Type: instancemethod Base Class: - String Form: Namespace: Interactive File: /home/was/s/local/lib/python2.4/site-packages/sage/modules/f @@ -563,13 +563,13 @@ seguido de ? para ver informações sobre a função. Definition: V.coordinates(self, v) Docstring: Write v in terms of the basis for self. - + Returns a list c such that if B is the basis for self, then - + sum c_i B_i = v. - + If v is not in self, raises an ArithmeticError exception. - + EXAMPLES: sage: M = FreeModule(IntegerRing(), 2); M0,M1=M.gens() sage: W = M.submodule([M0 + M1, M0 - 2*M1]) @@ -653,15 +653,25 @@ para ler um arquivo de ajuda sobre determinada classe. :: sage: help(VectorSpace) - Help on class VectorSpace ... - - class VectorSpace(__builtin__.object) - | Create a Vector Space. - | - | To create an ambient space over a field with given dimension - | using the calling syntax ... - : - : + Help on function VectorSpace in module sage.modules.free_module: + + VectorSpace(K, dimension_or_basis_keys=None, sparse=False, inner_product_matrix=None, *, + with_basis='standard', dimension=None, basis_keys=None, **args) + EXAMPLES: + + The base can be complicated, as long as it is a field. + + :: + + sage: V = VectorSpace(FractionField(PolynomialRing(ZZ,'x')),3) + sage: V + Vector space of dimension 3 over Fraction Field of Univariate Polynomial Ring in x + over Integer Ring + sage: V.basis() + [ + (1, 0, 0), + (0, 1, 0), + --More-- Quando você digita ``q`` para sair do sistema de ajuda, a sua sessão aparece na tela da mesma forma que anteriormente. O texto de ajuda não @@ -778,7 +788,7 @@ representações impressas não é permitido. sage: load('a') Traceback (most recent call last): ... - ValueError: The session in which this object was defined is no longer + ValueError: The session in which this object was defined is no longer running. Objetos do GP/PARI também podem ser salvos e carregados pois suas @@ -788,7 +798,7 @@ representações em forma impressa são suficientes para reconstruí-los. :: - sage: a = gp(2) + sage: a = gp(2) sage: a.save('a') sage: load('a') 2 @@ -898,10 +908,10 @@ variável ``b`` não foi redefinida. :: sage: M - Full Modular Symbols space for Gamma_0(37) of weight 2 with sign 0 + Full Modular Symbols space for Gamma_0(37) of weight 2 with sign 0 and dimension 5 over Rational Field sage: E - Elliptic Curve defined by y^2 + y = x^3 - x^2 - 10*x - 20 over Rational + Elliptic Curve defined by y^2 + y = x^3 - x^2 - 10*x - 20 over Rational Field sage: b 19 diff --git a/src/doc/ru/tutorial/interactive_shell.rst b/src/doc/ru/tutorial/interactive_shell.rst index 13ea34f89db..d3bc4e34027 100644 --- a/src/doc/ru/tutorial/interactive_shell.rst +++ b/src/doc/ru/tutorial/interactive_shell.rst @@ -598,15 +598,25 @@ Sage обладает встроенной справочной системой :: sage: help(VectorSpace) - Help on class VectorSpace ... - - class VectorSpace(__builtin__.object) - | Create a Vector Space. - | - | To create an ambient space over a field with given dimension - | using the calling syntax ... - : - : + Help on function VectorSpace in module sage.modules.free_module: + + VectorSpace(K, dimension_or_basis_keys=None, sparse=False, inner_product_matrix=None, *, + with_basis='standard', dimension=None, basis_keys=None, **args) + EXAMPLES: + + The base can be complicated, as long as it is a field. + + :: + + sage: V = VectorSpace(FractionField(PolynomialRing(ZZ,'x')),3) + sage: V + Vector space of dimension 3 over Fraction Field of Univariate Polynomial Ring in x + over Integer Ring + sage: V.basis() + [ + (1, 0, 0), + (0, 1, 0), + --More-- Когда вы вводите ``q`` для выхода из справочной системы, ваша сессия находится в том же состоянии, что и до этого. Справка не захламляет ваш