login  home  contents  what's new  discussion  bug reports     help  links  subscribe  changes  refresh  edit

fricas
)show QuadraticForm
QuadraticForm(n: PositiveInteger,K: Field) is a domain constructor Abbreviation for QuadraticForm is QFORM This constructor is exposed in this frame. ------------------------------- Operations -------------------------------- ?*? : (Integer,%) -> % ?*? : (PositiveInteger,%) -> % ?+? : (%,%) -> % ?-? : (%,%) -> % -? : % -> % ?=? : (%,%) -> Boolean 0 : () -> % coerce : % -> OutputForm ?.? : (%,DirectProduct(n,K)) -> K hash : % -> SingleInteger latex : % -> String matrix : % -> SquareMatrix(n,K) opposite? : (%,%) -> Boolean sample : () -> % zero? : % -> Boolean ?~=? : (%,%) -> Boolean ?*? : (NonNegativeInteger,%) -> % convert : % -> InputForm if SquareMatrix(n,K) has KONVERT(INFORM) hashUpdate! : (HashState,%) -> HashState quadraticForm : SquareMatrix(n,K) -> % subtractIfCan : (%,%) -> Union(%,"failed")

fricas
parse(s:String):InputForm == ncParseFromString(s)$Lisp pretend InputForm
Function declaration parse : String -> InputForm has been added to workspace.
Type: Void
fricas
parse("Integer")
fricas
Compiling function parse with type String -> InputForm

\label{eq1}\hbox{\axiomType{Integer}\ }(1)
Type: InputForm

Test

fricas
qf := quadraticForm matrix [[1,2],[2,-1]]

\label{eq2}\left[ 
\begin{array}{cc}
1 & 2 
\
2 & - 1 
(2)
Type: QuadraticForm(2,Fraction(Integer))
fricas
qf::InputForm

\label{eq3}\left({quadraticForm \ {\left({squareMatrix \ {\left({matrix \ {\left({
\begin{array}{@{}l}
\displaystyle
construct \  \cdot 
\
\
\displaystyle
{\left({
\begin{array}{@{}l}
\displaystyle
construct \  \cdot 
\
\
\displaystyle
1 \  \cdot 
\
\
\displaystyle
2 
(3)
Type: InputForm
fricas
unparse %

\label{eq4}\verb#"quadraticForm(squareMatrix(matrix([[1,2],[2,-1]])))"#(4)
Type: String
fricas
parse %

\label{eq5}\left({quadraticForm \ {\left({squareMatrix \ {\left({matrix \ {\left({
\begin{array}{@{}l}
\displaystyle
construct \  \cdot 
\
\
\displaystyle
{\left({
\begin{array}{@{}l}
\displaystyle
construct \  \cdot 
\
\
\displaystyle
1 \  \cdot 
\
\
\displaystyle
2 
(5)
Type: InputForm
fricas
interpret(%)$INFORM1(QuadraticForm(2,Fraction Integer))

\label{eq6}\left[ 
\begin{array}{cc}
1 & 2 
\
2 & - 1 
(6)
Type: QuadraticForm(2,Fraction(Integer))




  Subject:   Be Bold !!
  ( 15 subscribers )  
Please rate this page: