login  home  contents  what's new  discussion  bug reports     help  links  subscribe  changes  refresh  edit

Edit detail for SandBox Aldor Category Theory 4 revision 1 of 5

1 2 3 4 5
Editor: Bill Page
Time: 2007/11/20 20:26:47 GMT-8
Note:

changed:
-
\begin{aldor}

define AutomorphismCategory(Obj:Category,A:Obj):Category == Groups with
    aut:     (A->A,A->A) -> %  -- create an automorphism from a morphism and it's inverse
    aut: % ->(A->A,A->A)       -- create a morphism and it's inverse from an automorphism

+++
+++  If X is an object in any category, Aut X given below is the group
+++  of automorphisms.  If the category has Set and CountablyInfinite, 
+++  autmorphisms are said to be equal if they have equal values at each
+++  point in their domain.
+++
define Automorphism(Obj:Category):Category == with
    Aut: (A:Obj) -> AutomorphismCategory (Obj,A)
    default
        Aut(A:Obj):AutomorphismCategory(Obj,A) == 
	    WW0:AutomorphismCategory(Obj,A) == add
	        Rep == Record(iso:A->A,isi:A->A); import from Rep
	        1:% == per [(a:A):A +-> a, (a:A):A +-> a]
                (x:%)=(y:%):Boolean == 
                     A has CountablyFinite with Set => 
                         import from A
                         forall? ( ((rep x).iso)(a) = ((rep y).iso)(a) for a in (elements$A)() )
                     error "Equality is not available for these automorphisms."
	        import from o(Obj,A,A,A)
	        (g:%)*(f:%):% == per [ ((rep g).iso) ** ((rep f).iso) , ((rep f).isi) ** ((rep g).isi) ]
	        inv(f:%):% == per [ (rep f).isi, (rep f).iso ]
	        aut(isomorphism:A->A,isomorphismInverse:A->A):% == per [isomorphism,isomorphismInverse]
	        aut(f:%):(A->A,A->A) == explode rep f 
                (t:TextWriter)<<(f:%):TextWriter == t << "[Automorphism]"
	    WW0 add
	    
define EndomorphismCategory(Obj:Category,A:Obj):Category == Monoids with
    end:        (A->A) -> %  -- create an endomorphisms from a morphism
    end:   % -> (A->A)       -- create a morphism from an endomorphism

+++
+++  If X is an object in any category, End X given below is the monoid
+++  of endomorphisms.  If the category has Set and CountablyInfinite,
+++  endomorphisms are computed to be equal if they have equal values at
+++  each point in their domain.
+++
define Endomorphism(Obj:Category):Category == with
    End: (A:Obj) -> EndomorphismCategory(Obj,A) 
    default
        End(A:Obj):EndomorphismCategory(Obj,A) == 
	    WW1:EndomorphismCategory(Obj,A) == add
                Rep ==> A->A
	        1:% == per ( (a:A):A +-> a )
	        import from o(Obj,A,A,A)
                (x:%)=(y:%):Boolean == 
                    A has CountablyFinite with Set => 
                        import from A
                        forall? ( (rep x) a = (rep y) a for a in (elements$A)() )
                    error "Equality is not available for endomorphisms."
	        (g:%)*(f:%):% == per ( (rep g)**(rep f) )
	        end(f:A->A):% == per f
	        end(f:%):(A->A) == rep f
                (t:TextWriter)<<(f:%):TextWriter == t << "[Endomorphism]"
	    WW1 add

define Morphisms(Obj:Category):Category == Automorphism Obj with Endomorphism Obj 
\end{aldor}

aldor
define AutomorphismCategory(Obj:Category,A:Obj):Category == Groups with aut: (A->A,A->A) -> % -- create an automorphism from a morphism and it's inverse aut: % ->(A->A,A->A) -- create a morphism and it's inverse from an automorphism +++ +++ If X is an object in any category, Aut X given below is the group +++ of automorphisms. If the category has Set and CountablyInfinite, +++ autmorphisms are said to be equal if they have equal values at each +++ point in their domain. +++ define Automorphism(Obj:Category):Category == with Aut: (A:Obj) -> AutomorphismCategory (Obj,A) default Aut(A:Obj):AutomorphismCategory(Obj,A) == WW0:AutomorphismCategory(Obj,A) == add Rep == Record(iso:A->A,isi:A->A); import from Rep 1:% == per [(a:A):A +-> a, (a:A):A +-> a] (x:%)=(y:%):Boolean == A has CountablyFinite with Set => import from A forall? ( ((rep x).iso)(a) = ((rep y).iso)(a) for a in (elements$A)() ) error "Equality is not available for these automorphisms." import from o(Obj,A,A,A) (g:%)*(f:%):% == per [ ((rep g).iso) ** ((rep f).iso) , ((rep f).isi) ** ((rep g).isi) ] inv(f:%):% == per [ (rep f).isi, (rep f).iso ] aut(isomorphism:A->A,isomorphismInverse:A->A):% == per [isomorphism,isomorphismInverse] aut(f:%):(A->A,A->A) == explode rep f (t:TextWriter)<<(f:%):TextWriter == t << "[Automorphism]" WW0 add define EndomorphismCategory(Obj:Category,A:Obj):Category == Monoids with end: (A->A) -> % -- create an endomorphisms from a morphism end: % -> (A->A) -- create a morphism from an endomorphism +++ +++ If X is an object in any category, End X given below is the monoid +++ of endomorphisms. If the category has Set and CountablyInfinite, +++ endomorphisms are computed to be equal if they have equal values at +++ each point in their domain. +++ define Endomorphism(Obj:Category):Category == with End: (A:Obj) -> EndomorphismCategory(Obj,A) default End(A:Obj):EndomorphismCategory(Obj,A) == WW1:EndomorphismCategory(Obj,A) == add Rep ==> A->A 1:% == per ( (a:A):A +-> a ) import from o(Obj,A,A,A) (x:%)=(y:%):Boolean == A has CountablyFinite with Set => import from A forall? ( (rep x) a = (rep y) a for a in (elements$A)() ) error "Equality is not available for endomorphisms." (g:%)*(f:%):% == per ( (rep g)**(rep f) ) end(f:A->A):% == per f end(f:%):(A->A) == rep f (t:TextWriter)<<(f:%):TextWriter == t << "[Endomorphism]" WW1 add define Morphisms(Obj:Category):Category == Automorphism Obj with Endomorphism Obj
aldor
   Compiling FriCAS source code from file 
      /var/zope2/var/LatexWiki/4370318316911033792-25px001.as using 
      AXIOM-XL compiler and options 
-O -Fasy -Fao -Flsp -laxiom -Mno-AXL_W_WillObsolete -DAxiom -Y $AXIOM/algebra
      Use the system command )set compiler args to change these 
      options.
#1 (Warning) Deprecated message prefix: use `ALDOR_' instead of `_AXL'
"/var/zope2/var/LatexWiki/4370318316911033792-25px001.as", line 3: 
    aut: % ->(A->A,A->A)       -- create a morphism and it's inverse from an automorphism
....^..^
[L3 C5] #2 (Warning) Suspicious juxtaposition.  Check for missing `;'.
Check indentation if you are using `#pile'.
[L3 C8] #3 (Error) Syntax error.
"/var/zope2/var/LatexWiki/4370318316911033792-25px001.as", line 17: 
                1:% == per [(a:A):A +-> a, (a:A):A +-> a]
................^...^
[L17 C17] #4 (Warning) Suspicious juxtaposition.  Check for missing `;'.
Check indentation if you are using `#pile'.
[L17 C21] #5 (Error) Syntax error.
   The )library system command was not called after compilation.