ASKSAGE: Sage Q&A Forum - Individual question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sat, 11 Apr 2020 14:05:49 -0500Definition of symbolic functions on path algebrahttps://ask.sagemath.org/question/50655/definition-of-symbolic-functions-on-path-algebra/I tried to define a symbolic function on path algbera like that:
G = DiGraph({1:{2:['a']}, 2:{3:['b']}})
P = G.path_semigroup()
A = P.algebra(GF(7))
A.inject_variables()
def ev(self, x): return 2*x
foo = function("foo", nargs=1, eval_func=ev)
foo(a)
But I get an error: TypeError: cannot coerce arguments: no canonical coercion from Path algebra of Multi-digraph on 3 vertices over Finite Field of size 7 to Symbolic Ring. My question how can I define a symbolic function to accept path algebra variables?
Thanks.Fri, 10 Apr 2020 08:54:33 -0500https://ask.sagemath.org/question/50655/definition-of-symbolic-functions-on-path-algebra/Comment by Z3r0 for <p>I tried to define a symbolic function on path algbera like that:</p>
<pre><code>G = DiGraph({1:{2:['a']}, 2:{3:['b']}})
P = G.path_semigroup()
A = P.algebra(GF(7))
A.inject_variables()
def ev(self, x): return 2*x
foo = function("foo", nargs=1, eval_func=ev)
foo(a)
</code></pre>
<p>But I get an error: TypeError: cannot coerce arguments: no canonical coercion from Path algebra of Multi-digraph on 3 vertices over Finite Field of size 7 to Symbolic Ring. My question how can I define a symbolic function to accept path algebra variables?</p>
<p>Thanks.</p>
https://ask.sagemath.org/question/50655/definition-of-symbolic-functions-on-path-algebra/?comment=50693#post-id-50693thank you.Sat, 11 Apr 2020 14:05:49 -0500https://ask.sagemath.org/question/50655/definition-of-symbolic-functions-on-path-algebra/?comment=50693#post-id-50693Comment by rburing for <p>I tried to define a symbolic function on path algbera like that:</p>
<pre><code>G = DiGraph({1:{2:['a']}, 2:{3:['b']}})
P = G.path_semigroup()
A = P.algebra(GF(7))
A.inject_variables()
def ev(self, x): return 2*x
foo = function("foo", nargs=1, eval_func=ev)
foo(a)
</code></pre>
<p>But I get an error: TypeError: cannot coerce arguments: no canonical coercion from Path algebra of Multi-digraph on 3 vertices over Finite Field of size 7 to Symbolic Ring. My question how can I define a symbolic function to accept path algebra variables?</p>
<p>Thanks.</p>
https://ask.sagemath.org/question/50655/definition-of-symbolic-functions-on-path-algebra/?comment=50689#post-id-50689Do I understand correctly that you want a "generic" derivation $d$, not any particular one? (A particular one would be easier.) I'm not an expert on path algebras, but: for an element `a`, you can get its terms by doing `list(a)` (that takes care of linearity), and you should manipulate the QuiverPaths somehow to get the "factors", to implement the product rule.Sat, 11 Apr 2020 08:55:57 -0500https://ask.sagemath.org/question/50655/definition-of-symbolic-functions-on-path-algebra/?comment=50689#post-id-50689Comment by Z3r0 for <p>I tried to define a symbolic function on path algbera like that:</p>
<pre><code>G = DiGraph({1:{2:['a']}, 2:{3:['b']}})
P = G.path_semigroup()
A = P.algebra(GF(7))
A.inject_variables()
def ev(self, x): return 2*x
foo = function("foo", nargs=1, eval_func=ev)
foo(a)
</code></pre>
<p>But I get an error: TypeError: cannot coerce arguments: no canonical coercion from Path algebra of Multi-digraph on 3 vertices over Finite Field of size 7 to Symbolic Ring. My question how can I define a symbolic function to accept path algebra variables?</p>
<p>Thanks.</p>
https://ask.sagemath.org/question/50655/definition-of-symbolic-functions-on-path-algebra/?comment=50688#post-id-50688Do you have any idea from where I can start? I want a linear map "d" that gives d(xy) = d(x)y+xd(y).where x,y in PathAlgebra.Sat, 11 Apr 2020 07:55:20 -0500https://ask.sagemath.org/question/50655/definition-of-symbolic-functions-on-path-algebra/?comment=50688#post-id-50688Comment by rburing for <p>I tried to define a symbolic function on path algbera like that:</p>
<pre><code>G = DiGraph({1:{2:['a']}, 2:{3:['b']}})
P = G.path_semigroup()
A = P.algebra(GF(7))
A.inject_variables()
def ev(self, x): return 2*x
foo = function("foo", nargs=1, eval_func=ev)
foo(a)
</code></pre>
<p>But I get an error: TypeError: cannot coerce arguments: no canonical coercion from Path algebra of Multi-digraph on 3 vertices over Finite Field of size 7 to Symbolic Ring. My question how can I define a symbolic function to accept path algebra variables?</p>
<p>Thanks.</p>
https://ask.sagemath.org/question/50655/definition-of-symbolic-functions-on-path-algebra/?comment=50684#post-id-50684It seems SageMath only has an implementation for [derivations over commutative rings](http://doc.sagemath.org/html/en/reference/rings/sage/rings/derivation.html). I guess you could do something yourself though. Which derivations do you want to create, and what do you want to do with them?Sat, 11 Apr 2020 06:45:13 -0500https://ask.sagemath.org/question/50655/definition-of-symbolic-functions-on-path-algebra/?comment=50684#post-id-50684Comment by Z3r0 for <p>I tried to define a symbolic function on path algbera like that:</p>
<pre><code>G = DiGraph({1:{2:['a']}, 2:{3:['b']}})
P = G.path_semigroup()
A = P.algebra(GF(7))
A.inject_variables()
def ev(self, x): return 2*x
foo = function("foo", nargs=1, eval_func=ev)
foo(a)
</code></pre>
<p>But I get an error: TypeError: cannot coerce arguments: no canonical coercion from Path algebra of Multi-digraph on 3 vertices over Finite Field of size 7 to Symbolic Ring. My question how can I define a symbolic function to accept path algebra variables?</p>
<p>Thanks.</p>
https://ask.sagemath.org/question/50655/definition-of-symbolic-functions-on-path-algebra/?comment=50682#post-id-50682Thanks, I want to create derivations on path algebras.Sat, 11 Apr 2020 05:30:43 -0500https://ask.sagemath.org/question/50655/definition-of-symbolic-functions-on-path-algebra/?comment=50682#post-id-50682Comment by rburing for <p>I tried to define a symbolic function on path algbera like that:</p>
<pre><code>G = DiGraph({1:{2:['a']}, 2:{3:['b']}})
P = G.path_semigroup()
A = P.algebra(GF(7))
A.inject_variables()
def ev(self, x): return 2*x
foo = function("foo", nargs=1, eval_func=ev)
foo(a)
</code></pre>
<p>But I get an error: TypeError: cannot coerce arguments: no canonical coercion from Path algebra of Multi-digraph on 3 vertices over Finite Field of size 7 to Symbolic Ring. My question how can I define a symbolic function to accept path algebra variables?</p>
<p>Thanks.</p>
https://ask.sagemath.org/question/50655/definition-of-symbolic-functions-on-path-algebra/?comment=50676#post-id-50676What do you actually want to achieve? Symbolic functions are probably not the answer.Sat, 11 Apr 2020 03:12:57 -0500https://ask.sagemath.org/question/50655/definition-of-symbolic-functions-on-path-algebra/?comment=50676#post-id-50676