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

Edit detail for #428 Equation Domain coerce to OutputForm and Boolean revision 4 of 4

1 2 3 4
Editor: gdr
Time: 2008/07/04 09:10:59 GMT-7
Note: Fixed in OpenAxiom

added:

From gdr Fri Jul 4 09:10:59 -0700 2008
From: gdr
Date: Fri, 04 Jul 2008 09:10:59 -0700
Subject: Fixed in OpenAxiom
Message-ID: <20080704091059-0700@axiom-wiki.newsynthesis.org>

Status: open => closed 


Submitted by : Bill Page at: 2008-06-17T14:34:21-07:00 (16 years ago)
Name :
Axiom Version :
Category : Severity : Status :
Optional subject :  
Optional comment :

OpenAxiom displays Equation(Domain) as:

 (3) -> V1=V2

  LISP output:
 (UNPRINTABLE . UNPRINTABLE)
                            Type: Equation Domain
 (4) -> %::Boolean
   Internal Error
   The function = with signature (%,%) -> Boolean is missing from
      domain Domain

and is missing equality.

fricas
(1) -> V1:=DirectProduct(3+4,Integer)

\label{eq1}\hbox{\axiomType{DirectProduct}\ } \left({7, \: \hbox{\axiomType{Integer}\ }}\right)(1)
Type: Type
fricas
V2:=DirectProduct(7,Integer)

\label{eq2}\hbox{\axiomType{DirectProduct}\ } \left({7, \: \hbox{\axiomType{Integer}\ }}\right)(2)
Type: Type
fricas
V1=V2
LISP output: (UNPRINTABLE . UNPRINTABLE)
Type: Equation(Type)
fricas
%::Boolean
>> System error: The value NIL is not of type FUNCTION

Axiom Version: => /usr/local/lib/open-axiom/x86_64-unknown-linux/1.2.0-2008-05-25

Domain in SetCategory? --Bill Page, Tue, 17 Jun 2008 14:56:33 -0700 reply
Putting Domain in SetCategory is one possible solution to this problem:
spad
)abbrev domain DOMAIN Domain
++ Author: Gabriel Dos Reis
++ Date Create: October 18, 2007.
++ Modified: Bill Page
++ Date Last Updated: June 17, 2008.
++ Basic Operations: coerce, reify
++ Related Constructors: Type, Syntax, OutputForm
++ Also See: Type, ConstructorCall
Domain(): Public == Private where
  Public ==> SetCategory with
    reify: % -> ConstructorCall
      ++ reify(d) returns the abstract syntax for the domain `x'.
reflect: ConstructorCall -> % ++ reflect cc returns the domain object designated by the ++ ConstructorCall syntax `cc'. The constructor implied ++ by `cc' must be known to the system since it is instantiated.
showSummary: % -> Void ++ showSummary(d) prints out implementation detail information ++ of domain `d'.
Private ==> add coerce x == outputDomainConstructor(x)$Lisp
x = y == x0 := reify(x) y0 := reify(y) constructorName(x0)=constructorName(y0) and arguments(x0)=arguments(y0)
reify x == devaluate(x)$Lisp @ ConstructorCall
reflect cc == evalDomain(cc)$Lisp @ %
showSummary x == showSummary(x)$Lisp
spad
   Compiling FriCAS source code from file 
      /var/lib/zope2.10/instance/axiom-wiki/var/LatexWiki/6570934237940921533-25px002.spad
      using old system compiler.
   DOMAIN abbreviates domain Domain 
------------------------------------------------------------------------
   initializing NRLIB DOMAIN for Domain 
   compiling into NRLIB DOMAIN 
   compiling exported coerce : % -> OutputForm
      DOMAIN;coerce;%Of;1 is replaced by outputDomainConstructor 
Time: 0 SEC.
compiling exported = : (%,%) -> Boolean ****** comp fails at level 4 with expression: ****** error in function =
(SEQ (|:=| |x0| (|reify| |x|)) (|:=| |y0| (|reify| |y|)) (|:=| (|:| #1=#:G2 (|Boolean|)) (= | << | (|constructorName| |x0|) | >> | (|constructorName| |y0|))) (|exit| 1 (IF #1# (= (|arguments| |x0|) (|arguments| |y0|)) |false|))) ****** level 4 ****** $x:= (constructorName x0) $m:= $EmptyMode $f:= ((((#:G2 #) (|y0| #) (|x0| #) (|y| # #) ...)))
>> Apparent user error: NoValueMode is an unknown mode

fricas
(V1=V2)@Boolean
There are 2 exposed and 10 unexposed library operations named = having 2 argument(s) but none was determined to be applicable. Use HyperDoc Browse, or issue )display op = to learn more about the available operations. Perhaps package-calling the operation or using coercions on the arguments will allow you to apply the operation.
Cannot find a definition or applicable library operation named = with argument type(s) Type Type
Perhaps you should use "@" to indicate the required return type, or "$" to specify which version of the function you need.

fricas
V1=V2
LISP output: (UNPRINTABLE . UNPRINTABLE)
Type: Equation(Type)
fricas
%::Boolean
>> System error: The value NIL is not of type FUNCTION

Status: open => closed