21
21
from sage .categories .graded_algebras_with_basis import GradedAlgebrasWithBasis
22
22
from sage .categories .graded_hopf_algebras_with_basis import GradedHopfAlgebrasWithBasis
23
23
from sage .categories .modules_with_basis import ModuleMorphismByLinearity
24
+ from sage .categories .poor_man_map import PoorManMap
24
25
from sage .rings .all import ZZ
25
26
from sage .modules .free_module import FreeModule , FreeModule_generic
26
27
from sage .matrix .constructor import Matrix
28
+ from sage .matrix .matrix_space import MatrixSpace
27
29
from sage .sets .family import Family
28
30
from sage .combinat .free_module import CombinatorialFreeModule
29
31
from sage .combinat .subset import SubsetsSorted
@@ -1773,15 +1775,15 @@ def lifted_bilinear_form(self, M):
1773
1775
a bilinear form `\Lambda(f) : \Lambda(V) \times
1774
1776
\Lambda(V) \to R` on `\Lambda(V)` can be canonically
1775
1777
defined as follows: For every `n \in \NN`, `m \in \NN`,
1776
- `v_1, v_2, \ldots, v_n \in V` and ` w_1, w_2, \ldots,
1777
- w_m \in W`, we set
1778
+ `v_1, v_2, \ldots, v_n, w_1, w_2, \ldots, w_m \in V` ,
1779
+ we define
1778
1780
1779
1781
.. MATH::
1780
1782
1781
1783
\Lambda(f)
1782
1784
( v_1 \wedge v_2 \wedge \cdots \wedge v_n ,
1783
- w_1 \wedge w_2 \wedge \cdots \wedge v_m )
1784
- = \begin{cases}
1785
+ w_1 \wedge w_2 \wedge \cdots \wedge w_m )
1786
+ : = \begin{cases}
1785
1787
0, &\mbox{if } n \neq m ; \\
1786
1788
\det G, & \mbox{if } n = m \end{cases} ,
1787
1789
@@ -1794,38 +1796,40 @@ def lifted_bilinear_form(self, M):
1794
1796
1795
1797
The bilinear form `\Lambda(f)` is symmetric if `f` is.
1796
1798
1797
- .. NOTE::
1798
-
1799
- This takes a bilinear form on `V` as matrix, and
1800
- returns a bilinear form on ``self`` as a function in
1801
- two arguments. This is one of a myriad possible
1802
- design choices; is it a good one? (I would rather
1803
- not return the bilinear form on ``self`` as matrix,
1804
- since this matrix can be huge and one often needs
1805
- just a particular value. I don't know if it is
1806
- possible to return the bilinear form on ``self`` as
1807
- a bilinear map -- is there a class for bilinear
1808
- maps? -- and, if so, if this is useful thing to do.
1809
-
1810
1799
INPUT:
1811
1800
1812
1801
- ``M`` -- a matrix over the same base ring as ``self``,
1813
1802
whose `(i, j)`-th entry is `f(e_i, e_j)`, where
1814
1803
`(e_1, e_2, \ldots, e_N)` is the standard basis of the
1815
- module `V` for which ``self`` `= \Lambda(V)` (so
1816
- that `` N = self.ngens()`` ), and where `f` is the
1817
- bilinear form which is to be lifted.
1804
+ module `V` for which ``self`` `= \Lambda(V)` (so that
1805
+ ` N = 2^{\dim(V)}` ), and where `f` is the bilinear form
1806
+ which is to be lifted.
1818
1807
1819
1808
OUTPUT:
1820
1809
1821
1810
A bivariate function which takes two elements `p` and
1822
1811
`q` of ``self`` to `\Lambda(f)(p, q)`.
1823
1812
1813
+ .. NOTE::
1814
+
1815
+ This takes a bilinear form on `V` as matrix, and
1816
+ returns a bilinear form on ``self`` as a function in
1817
+ two arguments. We do not return the bilinear form as
1818
+ a matrix since this matrix can be huge and one often
1819
+ needs just a particular value.
1820
+
1821
+ .. TODO::
1822
+
1823
+ Implement a class for bilinear forms and rewrite this
1824
+ method to use that class.
1825
+
1824
1826
EXAMPLES::
1825
1827
1826
1828
sage: E.<x,y,z> = ExteriorAlgebra(QQ)
1827
1829
sage: M = Matrix(QQ, [[1, 2, 3], [2, 3, 4], [3, 4, 5]])
1828
1830
sage: Eform = E.lifted_bilinear_form(M)
1831
+ sage: Eform
1832
+ Bilinear Form from The exterior algebra of rank 3 over Rational Field to Rational Field
1829
1833
sage: Eform(x*y, y*z)
1830
1834
-1
1831
1835
sage: Eform(x*y, y)
@@ -1877,7 +1881,6 @@ def lifted_bilinear_form(self, M):
1877
1881
back are implemented, check if this is faster.
1878
1882
"""
1879
1883
R = self .base_ring ()
1880
- from sage .matrix .matrix_space import MatrixSpace
1881
1884
def lifted_form (x , y ):
1882
1885
result = R .zero ()
1883
1886
for mx , cx in x :
@@ -1897,7 +1900,8 @@ def lifted_form(x, y):
1897
1900
# typing (:trac:`17124`).
1898
1901
result += cx * cy * matr .determinant ()
1899
1902
return result
1900
- return lifted_form
1903
+ return PoorManMap (lifted_form , domain = self , codomain = self .base_ring (),
1904
+ name = "Bilinear Form" )
1901
1905
1902
1906
class Element (CliffordAlgebraElement ):
1903
1907
"""
0 commit comments