ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 22 Jun 2023 22:16:44 +0200¿How do I construct the real numbers from a basic magma?https://ask.sagemath.org/question/69340/how-do-i-construct-the-real-numbers-from-a-basic-magma/I tried for hours and haven't found the way yet.
I invoked a `Magmas()` instance and got a kind of set containing "category of magmas", then I don't remember how, I added another element to it, but still doesn't resemble a magma.
I also tried creating a finite set `A` and a functor acting over it, but when I type
R1.<x> = A[]
I get
TypeError: '<' not supported between instances of 'str' and 'int'
So far so good, it seems that Sage is focused on specific interest areas, like graphs, symmetry groups and all that curricular stuff, but I don't find the way to open up to my means. It seems like it lacks enough modularity and that everything comes pre-constructed. I'm totally new in Sage and may be also in math. I'm still ignorant about the correct syntax of the language also. So please tell me what I'm doing wrong and if it is there any way to achieve what I want in Sage.Wed, 21 Jun 2023 21:26:44 +0200https://ask.sagemath.org/question/69340/how-do-i-construct-the-real-numbers-from-a-basic-magma/Comment by John Palmieri for <p>I tried for hours and haven't found the way yet.
I invoked a <code>Magmas()</code> instance and got a kind of set containing "category of magmas", then I don't remember how, I added another element to it, but still doesn't resemble a magma.</p>
<p>I also tried creating a finite set <code>A</code> and a functor acting over it, but when I type</p>
<pre><code>R1.<x> = A[]
</code></pre>
<p>I get</p>
<pre><code>TypeError: '<' not supported between instances of 'str' and 'int'
</code></pre>
<p>So far so good, it seems that Sage is focused on specific interest areas, like graphs, symmetry groups and all that curricular stuff, but I don't find the way to open up to my means. It seems like it lacks enough modularity and that everything comes pre-constructed. I'm totally new in Sage and may be also in math. I'm still ignorant about the correct syntax of the language also. So please tell me what I'm doing wrong and if it is there any way to achieve what I want in Sage.</p>
https://ask.sagemath.org/question/69340/how-do-i-construct-the-real-numbers-from-a-basic-magma/?comment=69382#post-id-69382Magmas need not have a successor function, just a product operation, at least as far as I understand it. The `product` method defines the operation, although it is maybe not very interesting in this example.Thu, 22 Jun 2023 22:16:44 +0200https://ask.sagemath.org/question/69340/how-do-i-construct-the-real-numbers-from-a-basic-magma/?comment=69382#post-id-69382Comment by Bizarro for <p>I tried for hours and haven't found the way yet.
I invoked a <code>Magmas()</code> instance and got a kind of set containing "category of magmas", then I don't remember how, I added another element to it, but still doesn't resemble a magma.</p>
<p>I also tried creating a finite set <code>A</code> and a functor acting over it, but when I type</p>
<pre><code>R1.<x> = A[]
</code></pre>
<p>I get</p>
<pre><code>TypeError: '<' not supported between instances of 'str' and 'int'
</code></pre>
<p>So far so good, it seems that Sage is focused on specific interest areas, like graphs, symmetry groups and all that curricular stuff, but I don't find the way to open up to my means. It seems like it lacks enough modularity and that everything comes pre-constructed. I'm totally new in Sage and may be also in math. I'm still ignorant about the correct syntax of the language also. So please tell me what I'm doing wrong and if it is there any way to achieve what I want in Sage.</p>
https://ask.sagemath.org/question/69340/how-do-i-construct-the-real-numbers-from-a-basic-magma/?comment=69381#post-id-69381Well that's something concrete, anyway, yet no succesor function, nor operations being defined.Thu, 22 Jun 2023 22:05:54 +0200https://ask.sagemath.org/question/69340/how-do-i-construct-the-real-numbers-from-a-basic-magma/?comment=69381#post-id-69381Comment by John Palmieri for <p>I tried for hours and haven't found the way yet.
I invoked a <code>Magmas()</code> instance and got a kind of set containing "category of magmas", then I don't remember how, I added another element to it, but still doesn't resemble a magma.</p>
<p>I also tried creating a finite set <code>A</code> and a functor acting over it, but when I type</p>
<pre><code>R1.<x> = A[]
</code></pre>
<p>I get</p>
<pre><code>TypeError: '<' not supported between instances of 'str' and 'int'
</code></pre>
<p>So far so good, it seems that Sage is focused on specific interest areas, like graphs, symmetry groups and all that curricular stuff, but I don't find the way to open up to my means. It seems like it lacks enough modularity and that everything comes pre-constructed. I'm totally new in Sage and may be also in math. I'm still ignorant about the correct syntax of the language also. So please tell me what I'm doing wrong and if it is there any way to achieve what I want in Sage.</p>
https://ask.sagemath.org/question/69340/how-do-i-construct-the-real-numbers-from-a-basic-magma/?comment=69354#post-id-69354`Magmas()` does not return a single magma, but rather the category of all such. I don't see many examples of individual magmas created in the Sage library, but perhaps you could use https://doc.sagemath.org/html/en/reference/categories/sage/categories/examples/magmas.html (source code https://github.com/sagemath/sage/blob/develop/src/sage/categories/examples/magmas.py) as a template.Thu, 22 Jun 2023 01:34:08 +0200https://ask.sagemath.org/question/69340/how-do-i-construct-the-real-numbers-from-a-basic-magma/?comment=69354#post-id-69354