|
|
|
last edited 17 years ago by Bill Page |
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ||
|
Editor: Bill Page
Time: 2008/06/18 18:24:49 GMT-7 |
||
| Note: Hom | ||
changed: -)abbrev domain AUTOM Automorph )abbrev domain HOM Hom changed: -++ Automorph R is the domain of automorphisms of R. -Automorph(R:Ring): Join(SetCategory, Eltable(R, R)) with - morphism: (R -> R) -> % ++ Hom(R,S) is the domain of homomorphisms - Mapping(S,R). Hom(R:SetCategory,S:SetCategory): Join(SetCategory, Eltable(R, S)) with morphism: (R -> S) -> % changed: - --Rep := (R -> R) --Rep := (R -> S) changed: - --elt(f, r) == (g := f pretend (R -> R); g(r)) - - Rep := ((R, Integer) -> R) --elt(f, r) == (g := f pretend (R -> S); g(r)) Rep := ((R, Integer) -> S) changed: - elt(f, r) == (g := f pretend ((R, Integer) -> R); g(r, 1)) elt(f, r) == (g := f pretend ((R, Integer) -> S); g(r, 1)) changed: - coerce(f:%):OutputForm == message("S -> S") coerce(f:%):OutputForm == message("R -> S") changed: -p:=morphism((x:Integer):Integer +-> x+1)$Automorph(Integer) p:=morphism((x:Integer):Float +-> x+1.0)$Hom(Integer,Float)
(1) -> <spad>
)abbrev domain MORPH Morphism T ==> SetCategory Morphism(source:T,target:T): with domain:%->T codomain:%->T coerce:(source->target) -> % coerce:%->(source->target) coerce:%->OutputForm --elt:(%, source)->target == (source->target) add Rep == (source->target) domain(p:%):T == source codomain(p:%):T == target coerce(r:(source->target)):% == per(r) coerce(p:%):(source->target) == p pretend (source->target) coerce(p:%):OutputForm == p pretend OutputForm --elt(f, x) == (f::(source->target))(x)</spad>
Compiling FriCAS source code from file
/var/lib/zope2.10/instance/axiom-wiki/var/LatexWiki/2396666756253990559-25px001.spad
using old system compiler.
MORPH abbreviates domain Morphism
------------------------------------------------------------------------
initializing NRLIB MORPH for Morphism
compiling into NRLIB MORPH
************* USER ERROR **********
available signatures for Rep:
NONE
NEED Rep: () -> ?
****** comp fails at level 1 with expression: ******
((DEF (|Rep|) (NIL) (|Mapping| |target| |source|)))
****** level 1 ******
x:= (DEF (Rep) (NIL) (Mapping target source))
m:= $EmptyMode
f:=
((((~= #) (= #) (|coerce| #) (|latex| #) ...)))
>> Apparent user error:
unspecified errorIf we define elt (commented out above), then f(1.1) gives the following:
Error: Caught fatal error [memory may be damaged] Fast links are on: do (si::use-fast-links nil) for debugging Error signalled by RETURN. Broken at APPLY. Type :H for Help. BOOT>> Error: The variable QUIT is unbound. Fast links are on: do (si::use-fast-links nil) for debugging Error signalled by EVALHOOK. Backtrace: system:universal-error-handler > evalhook > lambda > lambda-closure > block > apply > APPLY
But the same coercion works in the interpreter.
)show Morphism(Float,Integer)
Morphism is an unknown constructor and so is unavailable. Did you mean to use -> but type something different instead?
Next let's study how this sort of thing is accomplished in a similar domain.
)abbrev domain HOM Hom ++ Based on Automorphism by: Manuel Bronstein ++ Description: ++ Hom(R,S) is the domain of homomorphisms - Mapping(S, R). Hom(R:SetCategory, S:SetCategory): Join(SetCategory, Eltable(R, S)) with morphism: (R -> S) -> % ++ morphism(f) returns the non-invertible morphism given by f. == add -- Why doesn't this simpler representation work? --Rep := (R -> S) --morphism(f) == f(#1) --elt(f, r) == (g := f pretend (R -> S); g(r))
Rep := ((R,Integer) -> S) morphism(f) == (#2; f(#1)) elt(f, r) == (g := f pretend ((R, Integer) -> S); g(r, 1))
f = g == EQ(f,g)$Lisp coerce(f:%):OutputForm == message("R -> S")
Compiling FriCAS source code from file
/var/lib/zope2.10/instance/axiom-wiki/var/LatexWiki/5332529926464782427-25px003.spad
using old system compiler.
HOM abbreviates domain Hom
------------------------------------------------------------------------
initializing NRLIB HOM for Hom
compiling into NRLIB HOM
compiling exported morphism : R -> S -> %
****** comp fails at level 2 with expression: ******
error in function morphism
(SEQ | << | (|#| 2) | >> | (|exit| 1 (|f| |#1|)))
****** level 2 ******
x:= (# 2)
m:= NoValueMode
f:=
((((|f| # #) (|Rep| #) (~= #) (= #) ...)))
>> Apparent user error:
NoValueMode
is an unknown modep:=morphism((x:Integer):Float +-> x+1.0)$Hom(Integer,Float)
Hom is an unknown constructor and so is unavailable. Did you mean to use -> but type something different instead?