Can anyone help me with a bug I see when compiling and running my code?
I don't know if this is a bug in my code or FriCAS code, probably both,
at least the error message could be better.

I can compile and run my code and it works as I want, but if I compile
and run it again (even if I don't change the source) it will compile but
gives an error when I run it. This continues until I do )clear all.

I assume something in the code is corrupting my setup but I don't know
where to look for it.

This bug started happening when I replaced my OpenSet domain with Set
(as you suggested) but there were a lot of changes and it might have
been some other tidy up that I did at the same time. So I can't work out
what change caused it.

This is how to see the bug:

my code is here:
https://github.com/martinbaker/fricasAlgTop/blob/topology/topology.spad

I then type:
)co fricas/topology.spad
source := topoSpaceFiniteLeftOrder(["a","b","c"])
target := topoSpaceFiniteLeftOrder(["d","e"])
h : Homset(source,target) := homset()

This works as I expected (giving all possible continuous maps between
these topological spaces)
but if I type the exact sequence again I get the error message below,
until I type )clear all.

Here it is in detail:

Checking for foreign routines
FRICAS="/usr/local/lib/fricas/target/x86_64-linux-gnu"
spad-lib="/usr/local/lib/fricas/target/x86_64-linux-gnu//lib/libspad.so"
foreign routines found
openServer result 0
                       FriCAS Computer Algebra System
                Version: FriCAS 1.3.11 built with sbcl 1.4.16
                   Timestamp: Sat Jun 29 21:21:31 UTC 2024
-----------------------------------------------------------------------------
   Issue )copyright to view copyright notices.
   Issue )summary for a summary of useful system commands.
   Issue )quit to leave FriCAS and return to shell.
-----------------------------------------------------------------------------


(1) -> )co fricas/topology.spad
<snip>

(1) -> source := topoSpaceFiniteLeftOrder(["a","b","c"])

   (1)  [[a, b, c], topology=[{1}, {1, 2}, {1, 2, 3}]]
                                                        Type:
TopoSpaceFinite
(2) -> target := topoSpaceFiniteLeftOrder(["d","e"])

   (2)  [[d, e], topology=[{1}, {1, 2}]]
                                                        Type:
TopoSpaceFinite
(3) -> h : Homset(source,target) := homset()

   (3)
   homset
     [map image=[1, 1, 1] preimage=[3, 3], map image=[1, 1, 2]
preimage=[2, 3],
      map image=[1, 2, 2] preimage=[1, 3]]
Type:
Homset([[a,b,c],CONCAT(topology=,[BRACE(1),BRACE(1,2),BRACE(1,2,3)])],[[d,e],CONCAT(topology=,[BRACE(1),BRACE(1,2)])])

So far this does exactly what I want (giving all possible continuous
maps between these topological spaces)
but if I type the exact sequence again I get the error message:

(4) -> )co fricas/topology.spad
<snip>

(4) -> source := topoSpaceFiniteLeftOrder(["a","b","c"])

   (4)  [[a, b, c], topology=[{1}, {1, 2}, {1, 2, 3}]]
                                                        Type:
TopoSpaceFinite
(5) -> target := topoSpaceFiniteLeftOrder(["d","e"])

   (5)  [[d, e], topology=[{1}, {1, 2}]]
                                                        Type:
TopoSpaceFinite
(6) -> h : Homset(source,target) := homset()

   You cannot declare h to be of type Homset([[a,b,c],CONCAT(topology=,
      [BRACE(1),BRACE(1,2),BRACE(1,2,3)])],[[d,e],CONCAT(topology=,[
      BRACE(1),BRACE(1,2)])]) because either the declared type of h or
      the type of the value of h is different from Homset([[a,b,c],
      CONCAT(topology=,[BRACE(1),BRACE(1,2),BRACE(1,2,3)])],[[d,e],
      CONCAT(topology=,[BRACE(1),BRACE(1,2)])]) .


--
You received this message because you are subscribed to the Google Groups "FriCAS - 
computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/fricas-devel/67f857aa-706a-494e-86e7-3fe2fec5d6f3%40martinb.com.

Reply via email to