First, coercion is not in any way essential for polynomial rings. It makes 
some things a bit more cumbersome, but it is certainly workable by putting 
elements in the tropical semiring.

Second, the operations between, e.g., integers and tropical ring elements 
does *not* make sense. What is T(1) + 1? Is it 1 or 2? There's no good way 
to answer this. The case with (integer) 0 under addition is a special case 
that I would like to not have, but changing that would be more work than 
the benefit.

Best,
Travis


On Sunday, March 31, 2024 at 6:45:12 AM UTC+9 anime...@iiits.in wrote:

> I read about Matrix Algebra over Tropical Semiring and found that there is 
> "tropical determinant" for this purpose (Page 3 : Eq 4 
> <http://www.math.uni-konstanz.de/~michalek/may22.pdf>). This formulation 
> does not use (additive) inversion.
>
> I was also trying different operations between tropical elements and other 
> elements(like Integers). It looks like there is a need for implementation 
> of coercion maps between few datatypes and tropical elements. 
> One can check this by running few commands like 
>         sage: T = TropicalSemiring(QQ)
>         sage: a = T(1); b = T(0)
>         sage: a + 0; b + 0
>         sage: a * 0; b * 0
>         sage: a + 1; b + 1
>         sage: a * 1; b * 1
>
> Coercion maps and models are crucial for polynomial element implementation.
> For example : between
> 'Symbolic Ring' and 'Tropical semiring over Rational Field'  
> 'Univariate Polynomial Ring in x over Tropical semiring over Rational 
> Field' and 'Tropical semiring over Rational Field'  
> 'Tropical semiring over Rational Field' and 'Integer Ring'  
> On Friday, March 29, 2024 at 12:16:44 AM UTC+5:30 tcscrims wrote:
>
>> One needs to be *very* careful about what operations mean. -T(2), the 
>> (tropical) additive inverse of 2, is *not* T(-2). There is no way to 
>> have min(2, a) = \infty (note that this is the (tropical) additive unit).
>>
>> I am not sure how (or if) determinants over the tropical semiring are 
>> defined, but one could define it by having the sign included in each term. 
>> So for the 2x2 case, it could be T(a*b) + T(-b*d), but I don’t know if this 
>> makes det a group homomorphism.
>>
>> Best,
>> Travis
>>
>>
>> On Wednesday, March 27, 2024 at 2:17:39 AM UTC+9 anime...@iiits.in wrote:
>>
>>> This problem can be seen clearly if we use *Matrix_generic_dense* as 
>>> element class for matrix space.
>>>
>>>
>>> On Tuesday, March 26, 2024 at 9:42:45 PM UTC+5:30 Animesh Shree wrote:
>>>
>>>> I was going through this code and got error. But I could not understand 
>>>> why this is the case.
>>>>
>>>>
>>>>
>>>>
>>>> sage: T = TropicalSemiring(QQ)
>>>> sage: T(1)
>>>> 1
>>>> sage: T(2)
>>>> 2
>>>> sage: T(-2)
>>>> -2
>>>> sage: -T(2)
>>>>
>>>> ---------------------------------------------------------------------------
>>>> ArithmeticError                           Traceback (most recent call 
>>>> last)
>>>> Cell In[26], line 1
>>>> ----> 1 -T(Integer(2))
>>>>
>>>> File ~/sage/src/sage/rings/semirings/tropical_semiring.pyx:278, in 
>>>> sage.rings.semirings.tropical_semiring.TropicalSemiringElement.__neg__()
>>>>     276     if self._val is None:
>>>>     277         return self
>>>> --> 278     raise ArithmeticError("cannot negate any non-infinite 
>>>> element")
>>>>     279 
>>>>     280 cpdef _mul_(left, right) noexcept:
>>>>
>>>> ArithmeticError: cannot negate any non-infinite element
>>>> sage: 
>>>>
>>>>
>>>> It looks like starting with T(-2) and reaching to -2 from T(2) by 
>>>> comparing with zero(+Inf) are different things.
>>>> T(-2) = -2
>>>> T(2) -T(2) = T.zero(+inf) = T(2)  + (-T(2))
>>>>
>>>> My doubt is : if  we cannot negate the elements, then how can we 
>>>> compute the determinant of a Matrix over Tropical Semiring. 
>>>> For example in 2x2 matrix : [[a,b], [c,d]] the determinant should be ad 
>>>> - bc 
>>>> But can it be expressed as ad + (-bc) -->> min ( add(a,d),   
>>>> -1*add(b,c) )?
>>>>
>>>> In fact we connot even do matrix subtraction directly.
>>>> What can be done in these cases??
>>>> On Thursday, March 21, 2024 at 8:48:26 PM UTC+5:30 Animesh Shree wrote:
>>>>
>>>>> Hello Sir,
>>>>>
>>>>> I have submitted my proposal.
>>>>> Please review it and let me know necessary updates and improvements. 
>>>>>
>>>>> I want to verify soundness of my approach and extend the proposal for 
>>>>> Multivariate Polynomials.
>>>>>
>>>>> Thank You
>>>>> Animesh Shree
>>>>> On Tuesday, March 12, 2024 at 12:26:38 AM UTC+5:30 tcscrims wrote:
>>>>>
>>>>>> Mathematically speaking, you can always weaken axioms. However, there 
>>>>>> are some extra advantages that additive groups have that commutative 
>>>>>> semirings don't have (mainly 0, the additive identity).
>>>>>>
>>>>>> That being said, there isn't anything prevent you from constructing 
>>>>>> the appropriate categories. It would be good to have a more specific 
>>>>>> use-case in mind, but that isn't necessary. However, one should be 
>>>>>> careful 
>>>>>> with the name because it would conflict with what "most" people would 
>>>>>> call 
>>>>>> an algebra (which is why we have MagmaticAlgebras).
>>>>>>
>>>>>> Best,
>>>>>> Travis
>>>>>>
>>>>>>
>>>>>> On Tuesday, March 12, 2024 at 2:57:29 AM UTC+9 anime...@iiits.in 
>>>>>> wrote:
>>>>>>
>>>>>>> Hello Sir,
>>>>>>>
>>>>>>> I was going through "Algebras" and I had a doubt.
>>>>>>> Does MagmaticAlgebra and AssociativeAlgebra have to be implemented 
>>>>>>> over Ring only? 
>>>>>>> I went through internet and google uses rings to define those 
>>>>>>> algebras, but the axioms that those algebra follow (Unital, 
>>>>>>> Associative) 
>>>>>>> are also preserved by commutative semirings.
>>>>>>> Would it be good to define MagmaticAlgebra and AssociativeAlgebra 
>>>>>>> over other objects that follow those axioms too or come-up with 
>>>>>>> alternative 
>>>>>>> Algebra?
>>>>>>>
>>>>>>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-gsoc" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-gsoc+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-gsoc/e0c9c7ba-cf01-47e2-9176-49a30fcf43e6n%40googlegroups.com.

Reply via email to