Axiom allows the user to dynamically create dependent=
types.

For example, matrix(3,3) is a 3x3 matrix. This may

<=
div>seem trivial but it is not.Consider that to c=
onstruct the "domain" (as it is called

in Axiom) of 3x3=
matrices you need to evaluate the

arguments. Again, in this case=
it is trivial but, in general,

it is not. Among other things it =
defines what functions

are available to manipulate 3x3 matrices, =
e.g. inverse.

Several issues arise. One is the=
"representation" (aka

"carriers" in logic-sp=
eak). There is no reason to assume

that the entries are inte=
gers. In the new Axiom (aka SANE)

the "representation" =
is orthogonal to the domain and can

be specified at construction.=

Axiom allows matrices that contain anything. =
When

constructing a new matrix, e.g. [[2.3,...],[4.4,...]..] the<=
/div>

in CLOS (Common Lisp Object System) which allows me

entries may be from other "domains", in this case the

could be functors, for example.

floats. But they could just as well be polynomials. So

f=
rom matrix(3,3) you need to dynamically construct

matrix(3,3,FLOA=
T).

Another issue is inheriting theorems and d=
efinitions that

support the newly constructed domain. In the new =
Axiom,

the theorems and definitions are associated with the

=
"category hierarchy". They are inherited based on the

dynamically constructed domain. These are available to

p=
rove functions in the constructed domain.

A ma=
trix(3,3) is commutative but matrix(3,4) is not. The

property of =
commutativity is inherited from the hierarchy

but only for square=
matrices. This has to be decided at

the time the domain is const=
ructed.

This allows proofs of functions in the=
3x3 domain to use

the commutative theorems of square matrices. T=
hese

are not available for functions in the 3x4 domain.

=
So, clearly, we need to evaluate the arguments when

construc=
ting the domain.

Ah, but evaluating the arguments =
of a dependent type is

NOT trivial in general. You could, for exa=
mple, construct

domains which contain themselves in the argument,=

such as matrix(matrix(...

More fun=
exists because one could, for example, introduce

a new "cat=
egory" into the hierarchy that has additional

definitions an=
d theorems related to square matrices over

some new domain. These=
have to be dynamically inherited

in particular cases.

<=
div>Worse yet, the elements don't have to be PROP but

could be anywhere in the type hierarchy. The elements

I've spe=
nt a great deal of time pondering these problems.

=
My current "solution path" involves constructing objects

to achieve =
very fine-grained control due to the MOP

(Meta Object Protocol). =
In addition, I'm trying to make the

domains as "declarat=
ive" as possible so that most of the

details are not hidden =
in obscure code.

CLOS allows both dynamic con=
struction and dynamic

re-shaping. I have no idea how LEAN4 w=
ill handle these

without the MOP.

the=
se questions?

> Are you aware of any LEAN4 design documents that addr=
esses these questions?

No. The best reference for Lean&#=
39;s type system is Theorem Proving in Lean; a version has been ported to L=
ean 4.

Jeremy

On Fri, Dec 3, 2021 at 12:04 PM=
Tim Daly <axiomcas@gmail.com&=
gt; wrote:

Axiom allows the user to dynamically create dependent type= s.For example, matrix(3,3) is a 3x3 matrix. This mays= eem trivial but it is not.Consider that to constr= uct the "domain" (as it is calledin Axiom) of 3x3 matr= ices you need to evaluate thearguments. Again, in this case it i= s trivial but, in general,it is not. Among other things it defin= es what functionsare available to manipulate 3x3 matrices, e.g. = inverse.Several issues arise. One is the &quo= t;representation" (aka"carriers" in logic-speak).= There is no reason to assumethat the entries are integers.= In the new Axiom (aka SANE)the "representation" is or= thogonal to the domain and canbe specified at construction.

<= /div>Axiom allows matrices that contain anything. When<= /div>constructing a new matrix, e.g. [[2.3,...],[4.4,...]..] the=entries may be from other "domains", in this case the<= div>floats. But they could just as well be polynomials. Sofrom m= atrix(3,3) you need to dynamically constructmatrix(3,3,FLOAT).Another issue is inheriting theorems and defini= tions thatsupport the newly constructed domain. In the new Axiom= ,the theorems and definitions are associated with the= "category hierarchy". They are inherited based on the<= div>dynamically constructed domain. These are available toprove = functions in the constructed domain.A matrix(= 3,3) is commutative but matrix(3,4) is not. Theproperty of commu= tativity is inherited from the hierarchybut only for square matr= ices. This has to be decided atthe time the domain is constructe= d.This allows proofs of functions in the 3x3 = domain to usethe commutative theorems of square matrices. These<= /div>are not available for functions in the 3x4 domain.= So, clearly, we need to evaluate the arguments whenconstructing = the domain.Ah, but evaluating the arguments of a = dependent type isNOT trivial in general. You could, for example,= constructdomains which contain themselves in the argument,such as matrix(matrix(...More fun exis= ts because one could, for example, introducea new "category= " into the hierarchy that has additionaldefinitions and the= orems related to square matrices oversome new domain. These have= to be dynamically inheritedin particular cases.<= br>Worse yet, the elements don't have to be PROP butcould be anywhere in the type hierarchy. The elementscou= ld be functors, for example.I've spent a = great deal of time pondering these problems.My cu= rrent "solution path" involves constructing objectsin = CLOS (Common Lisp Object System) which allows meto achieve very = fine-grained control due to the MOP(Meta Object Protocol). In ad= dition, I'm trying to make thedomains as "declarative&q= uot; as possible so that most of thedetails are not hidden in ob= scure code.CLOS allows both dynamic construc= tion and dynamicre-shaping. I have no idea how LEAN4 will h= andle thesewithout the MOP.Ar= e you aware of any LEAN4 design documents that addressesthese qu= estions?

...(snip)...

Common Lisp=
has an "open compiler". That allows the ability

to dee=
ply modify compiler behavior using compiler macros

and macros in =
general. CLOS takes advantage of this to add

typed behavior into =
the compiler in a way that ALLOWS strict

typing such as found in =
constructive type theory and ML.

Judgments, ala Crary, are front-=
and-center.

Whether you USE the discipline aff=
orded is the real question.

Indeed, the Axiom rese=
arch struggle is essentially one of how

to have a disciplined use=
of first-class dependent types. The

struggle raises issues of, f=
or example, compiling a dependent

type whose argument is recursiv=
e in the compiled type. Since

the new type is first-class it can =
be constructed at what you

improperly call "run-time". =
However, it appears that the recursive

type may have to call the =
compiler at each recursion to generate

the next step since in som=
e cases it cannot generate "closed code".

I am embedding proofs (in LEAN language) into the type

hier=
archy so that theorems, which depend on the type hierarchy,

a=
re correctly inherited. The compiler has to check the proofs of functions

at compile time using these. Hacking up nonsense just won't cu=
t it. Think

of the problem of embedding LEAN proofs in ML or ML i=
n LEAN.

(Actually, Jeremy Avigad might find that research interes=
ting.)

So Matrix(3,3,Float) has inverses (assuming=
Float is a

field (cough)). The type inherits this theorem and pr=
oofs of

functions can use this. But Matrix(3,4,Integer) does not =
have

inverses so the proofs cannot use this. The type hierarchy h=
as

to ensure that the proper theorems get inherited.

Making proof technology work at compile time is hard.

(Worse yet, LEAN is a moving target. Sigh.)

On Thu, Nov 25, 2021 at 9:43 AM Tim Daly <axiomcas@gmail.com> wrote:

As you know I've been re-architecting Axiom to= use first classdependent types and proving the algorithms corre= ct. For example,the GCD of natural numbers or the GCD of polynom= ials.The idea involves "boxing up" the = proof with the algorithm (akaproof carrying code) in the ELF fil= e (under a crypto hash so itcan't be changed).Once the code is running on the CPU, the proof is run in parall= elon the field programmable gate array (FPGA). Intel data center=servers have CPUs with built-in FPGAs these days.

=There is a bit of a disconnect, though. The GCD code is compiled=machine code but the proof is LEAN-level.What would be ideal is if the compiler not only compiled the GCD code to machine code, it also compiled the proof to "machine code&q= uot;. That is, for each machine instruction, the FPGA proof check= erwould ensure that the proof was not violated at the individual=instruction level.What does it mea= n to "compile a proof to the machine code level"?

<= /div>The Milawa effort (Myre14.pdf) does incremental proofs in layers.=To quote from the article [0]:=C2= =A0=C2=A0 We begin with a simple proof checker, call it A, which is short=C2=A0=C2=A0 enough to verify by the ``social process'' of= mathematics -- and=C2=A0 more recently with a theorem prover fo= r a more expressive logic.=C2=A0=C2=A0 We then de= velop a series of increasingly powerful proof checkers,=C2=A0 ca= ll the B, C, D, and so on. We show each of these programs only= =C2=A0=C2=A0 accepts the same formulas as A, using A to verify B, and B to = verify=C2=A0=C2=A0 C, and so on. Then, since we trust A, and A s= ays B is trustworthy, we=C2=A0=C2=A0 can trust B. Then, since we= trust B, and B says C is trustworthy, we=C2=A0=C2=A0 can trust = C.This gives a technique for "compiling= the proof" down the the machinecode level. Ideally, the co= mpiler would have judgments for each step ofthe compilation so t= hat each compile step has a justification. I don'tknow of an= y compiler that does this yet. (References welcome).At the machine code level, there are techniques that would allo= wthe FPGA proof to "step in sequence" with the executi= ng code.Some work has been done on using "Hoare Logic f= or RealisticallyModelled Machine Code" (paper attached, Myr= e07a.pdf),"Decompilation into Logic -- Improved (Myre12a.pd= f).So the game is to construct a GCD over some ty= pe (Nats, Polys, etc.Axiom has 22), compile the dependent type G= CD to machine code.In parallel, the proof of the code is compile= d to machine code. Thepair is sent to the CPU/FPGA and, while th= e algorithm runs, the FPGAensures the proof is not violated, ins= truction by instruction.(I'm ignoring machine= architecture issues such pipelining, out-of-order,branch predic= tion, and other machine-level things to ponder. I'm lookinga= t the RISC-V Verilog details by various people to understand better butit is still a "misty fog" for me.)The result is proven code "down to the metal".TimOn Thu, Nov 25, 2021 at 6:05 AM Tim Daly <axiomcas@gmail.com>= wrote:As you know I've been re-architectin= g Axiom to use first classdependent types and proving the algori= thms correct. For example,the GCD of natural numbers or the GCD = of polynomials.The idea involves "boxing up&= quot; the proof with the algorithm (akaproof carrying code) in t= he ELF file (under a crypto hash so itcan't be changed).Once the code is running on the CPU, the proof is run= in parallelon the field programmable gate array (FPGA). Intel d= ata centerservers have CPUs with built-in FPGAs these days.There is a bit of a disconnect, though. The GCD code i= s compiledmachine code but the proof is LEAN-level.What would be ideal is if the compiler not only compiled the G= CDcode to machine code, it also compiled the proof to "mach= ine code".That is, for each machine instruction, the FPGA p= roof checkerwould ensure that the proof was not violated at the = individualinstruction level.What d= oes it mean to "compile a proof to the machine code level"?=The Milawa effort (Myre14.pdf) does incremental proofs = in layers.To quote from the article [0]:=C2=A0=C2=A0 We begin with a simple proof checker, call it A, which i= s short=C2=A0=C2=A0 enough to verify by the ``social process'= ;' of mathematics -- and=C2=A0 more recently with a theorem = prover for a more expressive logic.=C2=A0=C2=A0 W= e then develop a series of increasingly powerful proof checkers,= =C2=A0 call the B, C, D, and so on. We show each of these programs only=C2=A0=C2=A0 accepts the same formulas as A, using A to verify B, an= d B to verify=C2=A0=C2=A0 C, and so on. Then, since we trust A, = and A says B is trustworthy, we=C2=A0=C2=A0 can trust B. Then, s= ince we trust B, and B says C is trustworthy, we=C2=A0=C2=A0 can= trust C.This gives a technique for "co= mpiling the proof" down the the machinecode level. Ideally,= the compiler would have judgments for each step ofthe compilati= on so that each compile step has a justification. I don'tkno= w of any compiler that does this yet. (References welcome).<= div>At the machine code level, there are techniques that wou= ld allowthe FPGA proof to "step in sequence" with the = executing code.Some work has been done on using "Hoare = Logic for RealisticallyModelled Machine Code" (paper attach= ed, Myre07a.pdf),"Decompilation into Logic -- Improved (Myr= e12a.pdf).So the game is to construct a GCD over = some type (Nats, Polys, etc.Axiom has 22), compile the dependent= type GCD to machine code.In parallel, the proof of the code is = compiled to machine code. Thepair is sent to the CPU/FPGA and, w= hile the algorithm runs, the FPGAensures the proof is not violat= ed, instruction by instruction.(I'm ignoring = machine architecture issues such pipelining, out-of-order,branch= prediction, and other machine-level things to ponder. I'm lookingat the RISC-V Verilog details by various people to understand better = butit is still a "misty fog" for me.)The result is proven code "down to the metal".=Tim<= div>[0] https://www.cs.ut= exas.edu/users/moore/acl2/manuals/current/manual/index-seo.php/ACL2____MILA= WAOn Sat, Nov 13, 2021 at 5:28 PM Tim Daly <axiomcas@gmail.com>= ; wrote:Full support for general, first-class dependent types requir= essome changes to the Axiom design. That implies some languagedesign questions.Given that mathematics = is such a general subject with a lot of"local" notatio= n and ideas (witness logical judgment notation)careful thought i= s needed to design a language that is able tohandle a wide range= .Normally language design is a two-level process.= The languagedesigner creates a language and then an implementat= ion. Variousdesign choices affect the final language.<= div>There is "The Metaobject Protocol" (MOP)which encourages a= three-level process. The language designerworks at a Metal= evel to design a family of languages, then thelanguage specializ= ations, then the implementation. A MOP designallows the language= user to optimize the language to their problem.A= simple paper on the subject is "Metaobject Protocols"T= imOn Mon, Oct 25, 2021 at 7:42 PM Tim Daly <axiomcas@gmail.com>= wrote:I have a separate thread of research on Self-Replicating Syst= ems(ref: Kinematics of Self Reproducing Machineswhich= led to watching "Strange Dreams of Stranger Loops" by Will Byrd<= /div>Will referenced a PhD Thesis by Jon Doyle"A Mod= el for Deliberation, Action, and Introspection"I also read the thesis by J.C.G. Sturdy "A Lisp through t= he Looking Glass"Self-replication requires t= he ability to manipulate your ownrepresentation in such a way th= at changes to that representationwill change behavior.This leads to two thoughts in the SANE research.=First, "Declarative Representation". That is, most= of the thingsabout the representation should be declarative rat= her thanprocedural. Applying this idea as much as possible makes= iteasier to understand and manipulate.=Second, "Explicit Call Stack". Function calls form an implic= itcall stack. This can usually be displayed in a running lisp sy= stem.However, having the call stack explicitly available would m= eanthat a system could "introspect" at the first-class= level.These two ideas would make it easy, for ex= ample, to let thesystem "show the work". One of the no= rmal complaints is thata system presents an answer but there is = no way to know howthat answer was derived. These two ideas make = it possible tounderstand, display, and even post-answer manipula= tethe intermediate steps.Having the in= termediate steps also allows proofs to beinserted in a step-by-s= tep fashion. This aids the effort tohave proofs run in parallel = with computation at the hardwarelevel.<= div>Tim

On Thu, Oct 21, 2021 at 9:50 AM Tim Daly <axiomcas@gmail.com> wrote:=So the current struggle involves the categories in Axiom.=The categories and domains constructed using categoriesare dependent types. When are dependent types "equal"?Well, hummmm, that depends on the arguments to theconstruc= tor.But in order to decide(?) equality we have to= evaluatethe arguments (which themselves can be dependent types)= .Indeed, we may, and in general, we must evaluate the=arguments at compile time (well, "construction time" asthere isn't really a compiler / interpreter separation anymore.)<= br>That raises the question of what "equalit= y" means. Thisis not simply a "set equality" rela= tion. It falls into theinfinite-groupoid of homotopy type theory= . In generalit appears that deciding category / domain equivalen= cemight force us to climb the type hierarchy.Beyond that, there is the question of "which proof"<= div>applies to the resulting object. Proofs depend on theirassum= ptions which might be different for differentconstructions. As y= et I have no clue how to "index"proofs based on their = assumptions, nor how toconnect these assumptions to the gro= upoid structure.My brain hurts.TimOn Mon, Oct 18, 2021 at 2:00 AM Tim Daly &l= t;axiomcas@gmail.co= m> wrote:"Birthing Computational Mathematics"=The Axiom SANE project is difficult at a very fundament= allevel. The title "SANE" was chosen due to the variou= swords found in a thesuarus... "rational", "coher= ent","judicious" and "sound".These are very high level, amorphous ideas. But so is=the design of SANE. Breaking away from tradition incomputer= algebra, type theory, and proof assistantsis very difficult. Id= eas tend to fall into standard jargonwhich limits both the frame= of thinking (e.g. dependenttypes) and the content (e.g. notatio= n).Questioning both frame and content is very dif= ficult.It is hard to even recognize when they are accepted="by default" rather than "by choice". What does th= e idea"power tools" mean in a primitive, hand labo= r culture?Christopher Alexander [0] addresses= this problem ina lot of his writing. Specifically, in his book = "Notes onthe Synthesis of Form", in his chapter 5 &quo= t;The SelfconsiousProcess", he addresses this problem direc= tly. This is a"must read" book.Unlike building design and contruction, however, thereare= almost no constraints to use as guides. Alexanderquotes Plato&#= 39;s Phaedrus:=C2=A0 "First, the taking in o= f scattered particulars under=C2=A0=C2=A0 one Idea, so that ever= yone understands what is being=C2=A0=C2=A0 talked about ... Seco= nd, the separation of the Idea=C2=A0=C2=A0 into parts, by dividi= ng it at the joints, as nature=C2=A0=C2=A0 directs, not breaking= any limb in half as a bad=C2=A0=C2=A0 carver might."<= br>Lisp, which has been called "clay for the= mind" canbuild virtually anything that can be thought. The="joints" are also "of one's choosing&quo= t; so one isboth carver and "nature".Clearly the problem is no longer "the tools".<= div>*I* am the problem constraining the solution.Birthing this &= quot;new thing" is slow, difficult, anduncertain at best.Tim[0] Alexander, Christo= pher "Notes on the Synthesisof Form" Harvard Universit= y Press 1964ISBN 0-674-62751-2On Sun, = Oct 10, 2021 at 4:40 PM Tim Daly <axiomcas@gmail.com> wrote:Re: writing a paper... I'm not conn= ected to Academia

so anything I'd write would never make it into print.

"Language level parsing" is still a long way off. The talk

by Guy Steele [2] highlights some of the problems we

currently face using mathematical metanotation.

For example, a professor I know at CCNY (City College

of New York) didn't understand Platzer's "funny

fraction notation" (proof judgements) despite being

an expert in Platzer's differential equations area.

Notation matters and is not widely common.

I spoke to Professor Black (in LTI) about using natural

language in the limited task of a human-robot cooperation

in changing a car tire.=C2=A0 I looked at the current machine

learning efforts. They are no where near anything but

toy systems, taking too long to train and are too fragile.

Instead I ended up using a combination of AIML [3]

(Artificial Intelligence Markup Language), the ALICE

Chatbot [4], Forgy's OPS5 rule based program [5],

and Fahlman's SCONE [6] knowledge base. It was

much less fragile in my limited domain problem.

I have no idea how to extend any system to deal with

even undergraduate mathematics parsing.

Nor do I have any idea how I would embed LEAN

knowledge into a SCONE database, although I

think the combination would be useful and interesting.

I do believe that, in the limited area of computational

mathematics, we are capable of building robust, proven

systems that are quite general and extensible. As you

might have guessed I've given it a lot of thought over

the years :-)

A mathematical language seems to need >6 components

1) We need some sort of a specification language, possibly

somewhat 'propositional' that introduces the assumptions

you mentioned (ref. your discussion of numbers being

abstract and ref. your discussion of relevant choice of

assumptions related to a problem).

This is starting to show up in the hardware area (e.g.

Lamport's TLC[0])

Of course, specifications relate to proving programs

and, as you recall, I got a cold reception from the

LEAN community about using LEAN for program proofs.

2) We need "scaffolding". That is, we need a theory

that can be reduced to some implementable form

that provides concept-level structure.

Axiom uses group theory for this. Axiom's "category"

structure has "Category" things like Ring. Claiming

to be a Ring brings in a lot of "Signatures" of functions

you have to implement to properly be a Ring.

Scaffolding provides a firm mathematical basis for

design. It provides a link between the concept of a

Ring and the expectations you can assume when

you claim your "Domain" "is a Ring". Category

theory might provide similar structural scaffolding

(eventually... I'm still working on that thought garden)

LEAN ought to have a textbook(s?) that structures

the world around some form of mathematics. It isn't

sufficient to say "undergraduate math" is the goal.

There needs to be some coherent organization so

people can bring ideas like Group Theory to the

organization. Which brings me to ...

3) We need "spreading". That is, we need to take

the various definitions and theorems in LEAN and

place them in their proper place in the scaffold.

For example, the Ring category needs the definitions

and theorems for a Ring included in the code for the

Ring category. Similarly, the Commutative category

needs the definitions and theorems that underlie

"commutative" included in the code.

That way, when you claim to be a "Commutative Ring"

you get both sets of definitions and theorems. That is,

the inheritance mechanism will collect up all of the

definitions and theorems and make them available

for proofs.

I am looking at LEAN's definitions and theorems with

an eye to "spreading" them into the group scaffold of

Axiom.

4) We need "carriers" (Axiom calls them representations,

aka "REP"). REPs allow data structures to be defined

independent of the implementation.

For example, Axiom can construct Polynomials that

have their coefficients in various forms of representation.

You can define "dense" (all coefficients in a list),

"sparse" (only non-zero coefficients), "recursive", etc= .

A "dense polynomial" and a "sparse polynomial" work

exactly the same way as far as the user is concerned.

They both implement the same set of functions. There

is only a difference of representation for efficiency and

this only affects the implementation of the functions,

not their use.

Axiom "got this wrong" because it didn't sufficiently

separate the REP from the "Domain". I plan to fix this.

LEAN ought to have a "data structures" subtree that

has all of the definitions and axioms for all of the

existing data structures (e.g. Red-Black trees). This

would be a good undergraduate project.

5) We need "Domains" (in Axiom speak). That is, we

need a box that holds all of the functions that implement

a "Domain". For example, a "Polynomial Domain" would

hold all of the functions for manipulating polynomials

(e.g polynomial multiplication). The "Domain" box

is a dependent type that:

=C2=A0 A) has an argument list of "Categories" that this "Do= main"

=C2=A0 =C2=A0 =C2=A0 box inherits. Thus, the "Integer Domain" inh= erits

=C2=A0 =C2=A0 =C2=A0 the definitions and axioms from "Commutative"= ;

=C2=A0 =C2=A0 =C2=A0Functions in the "Domain" box can now assume<= br> =C2=A0 =C2=A0 =C2=A0and use the properties of being commutative. Proofs

=C2=A0 =C2=A0 =C2=A0of functions in this domain can use the definitions

=C2=A0 =C2=A0 =C2=A0and proofs about being commutative.

=C2=A0 B) contains an argument that specifies the "REP"

=C2=A0 =C2=A0 =C2=A0 =C2=A0(aka, the carrier). That way you get all of the<= br> =C2=A0 =C2=A0 =C2=A0 =C2=A0functions associated with the data structure

=C2=A0 =C2=A0 =C2=A0 available for use in the implementation.

=C2=A0 =C2=A0 =C2=A0 Functions in the Domain box can use all of

=C2=A0 =C2=A0 =C2=A0 the definitions and axioms about the representation

=C2=A0 =C2=A0 =C2=A0 (e.g. NonNegativeIntegers are always positive)

=C2=A0 C) contains local "spread" definitions and axioms

=C2=A0 =C2=A0 =C2=A0 =C2=A0that can be used in function proofs.

=C2=A0 =C2=A0 =C2=A0 For example, a "Square Matrix" domain would<= br> =C2=A0 =C2=A0 =C2=A0 have local axioms that state that the matrix is

=C2=A0 =C2=A0 =C2=A0 always square. Thus, functions in that box could

=C2=A0 =C2=A0 =C2=A0 use these additional definitions and axioms in

=C2=A0 =C2=A0 =C2=A0 function proofs.

=C2=A0 D) contains local state. A "Square Matrix" domain

=C2=A0 =C2=A0 =C2=A0 =C2=A0would be constructed as a dependent type that

=C2=A0 =C2=A0 =C2=A0 =C2=A0specified the size of the square (e.g. a 2x2

=C2=A0 =C2=A0 =C2=A0 =C2=A0matrix would have '2' as a dependent par= ameter.

=C2=A0 E) contains implementations of inherited functions.

=C2=A0 =C2=A0 =C2=A0 =C2=A0A "Category" could have a signature fo= r a GCD

=C2=A0 =C2=A0 =C2=A0 =C2=A0function and the "Category" could have= a default

=C2=A0 =C2=A0 =C2=A0 =C2=A0implementation. However, the "Domain" = could

=C2=A0 =C2=A0 =C2=A0 =C2=A0have a locally more efficient implementation whi= ch

=C2=A0 =C2=A0 =C2=A0 =C2=A0overrides the inherited implementation.

=C2=A0 =C2=A0 =C2=A0 Axiom has about 20 GCD implementations that

=C2=A0 =C2=A0 =C2=A0 differ locally from the default in the category. They<= br> =C2=A0 =C2=A0 =C2=A0 use properties known locally to be more efficient.

=C2=A0 F) contains local function signatures.

=C2=A0 =C2=A0 =C2=A0 A "Domain" gives the user more and more uniq= ue

=C2=A0 =C2=A0 =C2=A0 functions. The signature have associated

=C2=A0 =C2=A0 =C2=A0 "pre- and post- conditions" that can be used=

=C2=A0 =C2=A0 =C2=A0 as assumptions in the function proofs.

=C2=A0 =C2=A0 =C2=A0 Some of the user-available functions are only

=C2=A0 =C2=A0 =C2=A0 visible if the dependent type would allow them

=C2=A0 =C2=A0 =C2=A0 to exist. For example, a general Matrix domain

=C2=A0 =C2=A0 =C2=A0 would have fewer user functions that a Square

=C2=A0 =C2=A0 =C2=A0 Matrix domain.

=C2=A0 =C2=A0 =C2=A0 In addition, local "helper" functions need t= heir

=C2=A0 =C2=A0 =C2=A0 own signatures that are not user visible.

=C2=A0 G) the function implementation for each signature.

=C2=A0 =C2=A0 =C2=A0 =C2=A0This is obviously where all the magic happens

=C2=A0 H) the proof of each function.

=C2=A0 =C2=A0 =C2=A0 =C2=A0This is where I'm using LEAN.

=C2=A0 =C2=A0 =C2=A0 =C2=A0Every function has a proof. That proof can use=C2=A0 =C2=A0 =C2=A0 =C2=A0all of the definitions and axioms inherited from=

=C2=A0 =C2=A0 =C2=A0 =C2=A0the "Category", "Representation&q= uot;, the "Domain

=C2=A0 =C2=A0 =C2=A0 =C2=A0Local", and the signature pre- and post-

=C2=A0 =C2=A0 =C2=A0 =C2=A0conditions.

=C2=A0 =C2=A0I) literature links. Algorithms must contain a link

=C2=A0 =C2=A0 =C2=A0 to at least one literature reference. Of course,

=C2=A0 =C2=A0 =C2=A0 since everything I do is a Literate Program

=C2=A0 =C2=A0 =C2=A0 this is obviously required. Knuth said so :-)

LEAN ought to have "books" or "pamphlets" that

bring together all of this information for a domain

such as Square Matrices. That way a user can

find all of the related ideas, available functions,

and their corresponding proofs in one place.

6) User level presentation.

=C2=A0 =C2=A0 This is where the systems can differ significantly.

=C2=A0 =C2=A0 Axiom and LEAN both have GCD but they use

=C2=A0 =C2=A0 that for different purposes.

=C2=A0 =C2=A0 I'm trying to connect LEAN's GCD and Axiom's GCD<= br> =C2=A0 =C2=A0 so there is a "computational mathematics" idea that=

=C2=A0 =C2=A0 allows the user to connect proofs and implementations.

7) Trust

Unlike everything else, computational mathematics

can have proven code that gives various guarantees.

I have been working on this aspect for a while.

I refer to it as trust "down to the metal" The idea is

that a proof of the GCD function and the implementation

of the GCD function get packaged into the ELF format.

(proof carrying code). When the GCD algorithm executes

on the CPU, the GCD proof is run through the LEAN

proof checker on an FPGA in parallel.

(I just recently got a PYNQ Xilinx board [1] with a CPU

and FPGA together. I'm trying to implement the LEAN

proof checker on the FPGA).

We are on the cusp of a revolution in computational

mathematics. But the two pillars (proof and computer

algebra) need to get know each other.

Tim

[0] Lamport, Leslie "Chapter on TLA+"

in "Software Specification Methods"

https://www.springer.com/gp/book/9781852333539

(I no longer have CMU library access or I'd send you

the book PDF)

[1] https://www.tul.com.tw/productspynq-z2.html

[2] https://www.youtube.com/watch?v=3DdCuZkaaou0Q

[3] "ARTIFICIAL INTELLIGENCE MARKUP LANGUAGE"

https://arxiv.org/pdf/1307.3091.pdf

[4] ALICE Chatbot

http://www.scielo.org.mx/pdf/cys= /v19n4/1405-5546-cys-19-04-00625.pdf

[5] OPS5 User Manual

https://kilthub.cm= u.edu/articles/journal_contribution/OPS5_user_s_manual/6608090/1

[6] Scott Fahlman "SCONE"

http://www.cs.cmu.edu/~sef/scone/

On 9/27/21, Tim Daly <axiomcas@gmail.com> wrote:

> I have tried to maintain a list of names of people who have

> helped Axiom, going all the way back to the pre-Scratchpad

> days. The names are listed at the beginning of each book.

> I also maintain a bibliography of publications I've read or

> that have had an indirect influence on Axiom.

>

> Credit is "the coin of the realm". It is easy to share and w= rong

> to ignore. It is especially damaging to those in Academia who

> are affected by credit and citations in publications.

>

> Apparently I'm not the only person who feels that way. The ACM

> Turing award seems to have ignored a lot of work:

>

> Scientific Integrity, the 2021 Turing Lecture, and the 2018 Turing

> Award for Deep Learning

> https://pe= ople.idsia.ch/~juergen/scientific-integrity-turing-award-deep-learning.html=

>

> I worked on an AI problem at IBM Research called Ketazolam.

> (https://en.wikipedia.org/wiki/Ketazolam). The idea = was to recognize

> and associated 3D chemical drawings with their drug counterparts.

> I used Rumelhart, and McClelland's books. These books contained

> quite a few ideas that seem to be "new and innovative" among= the

> machine learning crowd... but the books are from 1987. I don't bel= ieve

> I've seen these books mentioned in any recent bibliography.

> https://mitpress.mit.edu= /books/parallel-distributed-processing-volume-1

>

>

>

>

> On 9/27/21, Tim Daly <axiomcas@gmail.com> wrote:

>> Greg Wilson asked "How Reliable is Scientific Software?"=

>> https://ne= verworkintheory.org/2021/09/25/how-reliable-is-scientific-software.html=

>>

>> which is a really interesting read. For example"

>>

>>=C2=A0 [Hatton1994], is now a quarter of a century old, but its con= clusions

>> are still fresh. The authors fed the same data into nine commercia= l

>> geophysical software packages and compared the results; they found=

>> that, "numerical disagreement grows at around the rate of 1% = in

>> average absolute difference per 4000 fines of implemented code, an= d,

>> even worse, the nature of the disagreement is nonrandom" (i.e= ., the

>> authors of different packages make similar mistakes).

>>

>>

>> On 9/26/21, Tim Daly <axiomcas@gmail.com> wrote:

>>> I should note that the lastest board I've just unboxed

>>> (a PYNQ-Z2) is a Zynq Z-7020 chip from Xilinx (AMD).

>>>

>>> What makes it interesting is that it contains 2 hard

>>> core processors and an FPGA, connected by 9 paths

>>> for communication. The processors can be run

>>> independently so there is the possibility of a parallel

>>> version of some Axiom algorithms (assuming I had

>>> the time, which I don't).

>>>

>>> Previously either the hard (physical) processor was

>>> separate from the FPGA with minimal communication

>>> or the soft core processor had to be created in the FPGA

>>> and was much slower.

>>>

>>> Now the two have been combined in a single chip.

>>> That means that my effort to run a proof checker on

>>> the FPGA and the algorithm on the CPU just got to

>>> the point where coordination is much easier.

>>>

>>> Now all I have to do is figure out how to program this

>>> beast.

>>>

>>> There is no such thing as a simple job.

>>>

>>> Tim

>>>

>>>

>>> On 9/26/21, Tim Daly <axiomcas@gmail.com> wrote:

>>>> I'm familiar with most of the traditional approaches>>>> like Theorema. The bibliography contains most of the

>>>> more interesting sources. [0]

>>>>

>>>> There is a difference between traditional approaches to

>>>> connecting computer algebra and proofs and my approach.

>>>>

>>>> Proving an algorithm, like the GCD, in Axiom is hard.

>>>> There are many GCDs (e.g. NNI vs POLY) and there

>>>> are theorems and proofs passed at runtime in the

>>>> arguments of the newly constructed domains. This

>>>> involves a lot of dependent type theory and issues of

>>>> compile time / runtime argument evaluation. The issues

>>>> that arise are difficult and still being debated in the ty= pe

>>>> theory community.

>>>>

>>>> I am putting the definitions, theorems, and proofs (DTP)>>>> directly into the category/domain hierarchy. Each category=

>>>> will have the DTP specific to it. That way a commutative>>>> domain will inherit a commutative theorem and a

>>>> non-commutative domain will not.

>>>>

>>>> Each domain will have additional DTPs associated with

>>>> the domain (e.g. NNI vs Integer) as well as any DTPs

>>>> it inherits from the category hierarchy. Functions in the<= br> >>>> domain will have associated DTPs.

>>>>

>>>> A function to be proven will then inherit all of the relev= ant

>>>> DTPs. The proof will be attached to the function and

>>>> both will be sent to the hardware (proof-carrying code).>>>>

>>>> The proof checker, running on a field programmable

>>>> gate array (FPGA), will be checked at runtime in

>>>> parallel with the algorithm running on the CPU

>>>> (aka "trust down to the metal"). (Note that Inte= l

>>>> and AMD have built CPU/FPGA combined chips,

>>>> currently only available in the cloud.)

>>>>

>>>>

>>>>

>>>> I am (slowly) making progress on the research.

>>>>

>>>> I have the hardware and nearly have the proof

>>>> checker from LEAN running on my FPGA.

>>>>

>>>> I'm in the process of spreading the DTPs from

>>>> LEAN across the category/domain hierarchy.

>>>>

>>>> The current Axiom build extracts all of the functions

>>>> but does not yet have the DTPs.

>>>>

>>>> I have to restructure the system, including the compiler>>>> and interpreter to parse and inherit the DTPs. I

>>>> have some of that code but only some of the code

>>>> has been pushed to the repository (volume 15) but

>>>> that is rather trivial, out of date, and incomplete.

>>>>

>>>> I'm clearly not smart enough to prove the Risch

>>>> algorithm and its associated machinery but the needed

>>>> definitions and theorems will be available to someone

>>>> who wants to try.

>>>>

>>>> [0] https://github.com/daly/= PDFS/blob/master/bookvolbib.pdf

>>>>

>>>>

>>>> On 8/19/21, Tim Daly <axiomcas@gmail.com> wrote:

>>>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

>>>>>

>>>>> REVIEW (Axiom on WSL2 Windows)

>>>>>

>>>>>

>>>>> So the steps to run Axiom from a Windows desktop

>>>>>

>>>>> 1 Windows) install XMing on Windows for X11 server

>>>>>

>>>>> http://www.straightrunning.com/XmingN= otes/

>>>>>

>>>>> 2 WSL2) Install Axiom in WSL2

>>>>>

>>>>> sudo apt install axiom

>>>>>

>>>>> 3 WSL2) modify /usr/bin/axiom to fix the bug:

>>>>> (someone changed the axiom startup script.

>>>>> It won't work on WSL2. I don't know who or

>>>>> how to get it fixed).

>>>>>

>>>>> sudo emacs /usr/bin/axiom

>>>>>

>>>>> (split the line into 3 and add quote marks)

>>>>>

>>>>> export SPADDEFAULT=3D/usr/local/axiom/mnt/linux

>>>>> export AXIOM=3D/usr/lib/axiom-20170501

>>>>> export "PATH=3D/usr/lib/axiom-20170501/bin:$PATH&= quot;

>>>>>

>>>>> 4 WSL2) create a .axiom.input file to include startup = cmds:

>>>>>

>>>>> emacs .axiom.input

>>>>>

>>>>> )cd "/mnt/c/yourpath"

>>>>> )sys pwd

>>>>>

>>>>> 5 WSL2) create a "myaxiom" command that sets= the

>>>>>=C2=A0 =C2=A0 =C2=A0DISPLAY variable and starts axiom>>>>>

>>>>> emacs myaxiom

>>>>>

>>>>> #! /bin/bash

>>>>> export DISPLAY=3D:0.0

>>>>> axiom

>>>>>

>>>>> 6 WSL2) put it in the /usr/bin directory

>>>>>

>>>>> chmod +x myaxiom

>>>>> sudo cp myaxiom /usr/bin/myaxiom

>>>>>

>>>>> 7 WINDOWS) start the X11 server

>>>>>

>>>>> (XMing XLaunch Icon on your desktop)

>>>>>

>>>>> 8 WINDOWS) run myaxiom from PowerShell

>>>>> (this should start axiom with graphics available)

>>>>>

>>>>> wsl myaxiom

>>>>>

>>>>> 8 WINDOWS) make a PowerShell desktop

>>>>>

>>>>> https://superuser.com/questions/886951/run-powershell-script-when-you= -open-powershell

>>>>>

>>>>> Tim

>>>>>

>>>>> On 8/13/21, Tim Daly <axiomcas@gmail.com> wrote:

>>>>>> A great deal of thought is directed toward making = the SANE version

>>>>>> of Axiom as flexible as possible, decoupling mecha= nism from theory.

>>>>>>

>>>>>> An interesting publication by Brian Cantwell Smith= [0], "Reflection

>>>>>> and Semantics in LISP" seems to contain inter= esting ideas related

>>>>>> to our goal. Of particular interest is the ability= to reason about

>>>>>> and

>>>>>> perform self-referential manipulations. In a depen= dently-typed

>>>>>> system it seems interesting to be able "adapt= " code to handle

>>>>>> run-time computed arguments to dependent functions= . The abstract:

>>>>>>

>>>>>>=C2=A0 =C2=A0 "We show how a computational sys= tem can be constructed to

>>>>>> "reason",

>>>>>> effectively

>>>>>>=C2=A0 =C2=A0 and consequentially, about its own in= ferential processes. The

>>>>>> analysis proceeds in two

>>>>>>=C2=A0 =C2=A0 parts. First, we consider the general= question of computational

>>>>>> semantics, rejecting

>>>>>>=C2=A0 =C2=A0 traditional approaches, and arguing t= hat the declarative and

>>>>>> procedural aspects of

>>>>>>=C2=A0 =C2=A0 computational symbols (what they stan= d for, and what behaviour

>>>>>> they

>>>>>> engender) should be

>>>>>>=C2=A0 =C2=A0 analysed independently, in order that= they may be coherently

>>>>>> related. Second, we

>>>>>>=C2=A0 =C2=A0 investigate self-referential behavior= in computational processes,

>>>>>> and show how to embed an

>>>>>>=C2=A0 =C2=A0 effective procedural model of a compu= tational calculus within that

>>>>>> calculus (a model not

>>>>>>=C2=A0 =C2=A0 unlike a meta-circular interpreter, b= ut connected to the

>>>>>> fundamental operations of the

>>>>>>=C2=A0 =C2=A0 machine in such a way as to provide, = at any point in a

>>>>>> computation,

>>>>>> fully articulated

>>>>>>=C2=A0 =C2=A0 descriptions of the state of that com= putation, for inspection and

>>>>>> possible modification). In

>>>>>>=C2=A0 =C2=A0 terms of the theories that result fro= m these investigations, we

>>>>>> present a general architecture

>>>>>>=C2=A0 =C2=A0 for procedurally reflective processes= , able to shift smoothly

>>>>>> between dealing with a given

>>>>>>=C2=A0 =C2=A0 subject domain, and dealing with thei= r own reasoning processes

>>>>>> over

>>>>>> that domain.

>>>>>>

>>>>>>=C2=A0 =C2=A0 An instance of the general solution i= s worked out in the context

>>>>>> of

>>>>>> an applicative

>>>>>>=C2=A0 =C2=A0 language. Specifically, we present th= ree successive dialects of

>>>>>> LISP: 1-LISP, a distillation of

>>>>>>=C2=A0 =C2=A0 current practice, for comparison purp= oses; 2-LISP, a dialect

>>>>>> constructed in terms of our

>>>>>>=C2=A0 =C2=A0 rationalised semantics, in which the = concept of evaluation is

>>>>>> rejected in favour of

>>>>>>=C2=A0 =C2=A0 independent notions of simplification= and reference, and in which

>>>>>> the respective categories

>>>>>>=C2=A0 =C2=A0 of notation, structure, semantics, an= d behaviour are strictly

>>>>>> aligned; and 3-LISP, an

>>>>>>=C2=A0 =C2=A0 extension of 2-LISP endowed with refl= ective powers."

>>>>>>

>>>>>> Axiom SANE builds dependent types on the fly. The = ability to access

>>>>>> both the refection

>>>>>> of the tower of algebra and the reflection of the = tower of proofs at

>>>>>> the time of construction

>>>>>> makes the construction of a new domain or specific= algorithm easier

>>>>>> and more general.

>>>>>>

>>>>>> This is of particular interest because one of the = efforts is to build

>>>>>> "all the way down to the

>>>>>> metal". If each layer is constructed on top o= f previous proven layers

>>>>>> and the new layer

>>>>>> can "reach below" to lower layers then t= he tower of layers can be

>>>>>> built without duplication.

>>>>>>

>>>>>> Tim

>>>>>>

>>>>>> [0], Smith, Brian Cantwell "Reflection and Se= mantics in LISP"

>>>>>> POPL '84: Proceedings of the 11th ACM SIGACT-S= IGPLAN

>>>>>> ymposium on Principles of programming languagesJan= uary 1

>>>>>> 984 Pages 23=E2=80=9335https://doi.org= /10.1145/800017.800513

>>>>>>

>>>>>> On 6/29/21, Tim Daly <axiomcas@gmail.com> wrote:

>>>>>>> Having spent time playing with hardware it is = perfectly clear that

>>>>>>> future computational mathematics efforts need = to adapt to using

>>>>>>> parallel processing.

>>>>>>>

>>>>>>> I've spent a fair bit of time thinking abo= ut structuring Axiom to

>>>>>>> be parallel. Most past efforts have tried to f= ocus on making a

>>>>>>> particular algorithm parallel, such as a matri= x multiply.

>>>>>>>

>>>>>>> But I think that it might be more effective to= make each domain

>>>>>>> run in parallel. A computation crosses multipl= e domains so a

>>>>>>> particular computation could involve multiple = parallel copies.

>>>>>>>

>>>>>>> For example, computing the Cylindrical Algebra= ic Decomposition

>>>>>>> could recursively decompose the plane. Indeed,= any tree-recursive

>>>>>>> algorithm could be run in parallel "in th= e large" by creating new

>>>>>>> running copies of the domain for each sub-prob= lem.

>>>>>>>

>>>>>>> So the question becomes, how does one manage t= his?

>>>>>>>

>>>>>>> A similar problem occurs in robotics where one= could have multiple

>>>>>>> wheels, arms, propellers, etc. that need to ac= t independently but

>>>>>>> in coordination.

>>>>>>>

>>>>>>> The robot solution uses ROS2. The three ideas = are ROSCORE,

>>>>>>> TOPICS with publish/subscribe, and SERVICES wi= th request/response.

>>>>>>> These are communication paths defined between = processes.

>>>>>>>

>>>>>>> ROS2 has a "roscore" which is basica= lly a phonebook of "topics".

>>>>>>> Any process can create or look up the current = active topics. eq:

>>>>>>>

>>>>>>>=C2=A0 =C2=A0 rosnode list

>>>>>>>

>>>>>>> TOPICS:

>>>>>>>

>>>>>>> Any process can PUBLISH a topic (which is basi= cally a typed data

>>>>>>> structure), e.g the topic /hw with the String = data "Hello World".

>>>>>>> eg:

>>>>>>>

>>>>>>>=C2=A0 =C2=A0 rostopic pub /hw std_msgs/String = "Hello, World"

>>>>>>>

>>>>>>> Any process can SUBSCRIBE to a topic, such as = /hw, and get a

>>>>>>> copy of the data.=C2=A0 eg:

>>>>>>>

>>>>>>>=C2=A0 =C2=A0 rostopic echo /hw=C2=A0 =C2=A0=3D= =3D> "Hello, World"

>>>>>>>

>>>>>>> Publishers talk, subscribers listen.

>>>>>>>

>>>>>>>

>>>>>>> SERVICES:

>>>>>>>

>>>>>>> Any process can make a REQUEST of a SERVICE an= d get a RESPONSE.

>>>>>>> This is basically a remote function call.

>>>>>>>

>>>>>>>

>>>>>>>

>>>>>>> Axiom in parallel?

>>>>>>>

>>>>>>> So domains could run, each in its own process.= It could provide

>>>>>>> services, one for each function. Any other pro= cess could request

>>>>>>> a computation and get the result as a response= . Domains could

>>>>>>> request services from other domains, either wa= iting for responses

>>>>>>> or continuing while the response is being comp= uted.

>>>>>>>

>>>>>>> The output could be sent anywhere, to a termin= al, to a browser,

>>>>>>> to a network, or to another process using the = publish/subscribe

>>>>>>> protocol, potentially all at the same time sin= ce there can be many

>>>>>>> subscribers to a topic.

>>>>>>>

>>>>>>> Available domains could be dynamically added b= y announcing

>>>>>>> themselves as new "topics" and could= be dynamically looked-up

>>>>>>> at runtime.

>>>>>>>

>>>>>>> This structure allows function-level / domain-= level parallelism.

>>>>>>> It is very effective in the robot world and I = think it might be a

>>>>>>> good structuring mechanism to allow computatio= nal mathematics

>>>>>>> to take advantage of multiple processors in a = disciplined fashion.

>>>>>>>

>>>>>>> Axiom has a thousand domains and each could ru= n on its own core.

>>>>>>>

>>>>>>> In addition. notice that each domain is indepe= ndent of the others.

>>>>>>> So if we want to use BLAS Fortran code, it cou= ld just be another

>>>>>>> service node. In fact, any "foreign funct= ion" could transparently

>>>>>>> cooperate in a distributed Axiom.

>>>>>>>

>>>>>>> Another key feature is that proofs can be &quo= t;by node".

>>>>>>>

>>>>>>> Tim

>>>>>>>

>>>>>>>

>>>>>>>

>>>>>>>

>>>>>>> On 6/5/21, Tim Daly <axiomcas@gmail.com> wrote:

>>>>>>>> Axiom is based on first-class dependent ty= pes. Deciding when

>>>>>>>> two types are equivalent may involve compu= tation. See

>>>>>>>> Christiansen, David Thrane "Checking = Dependent Types with

>>>>>>>> Normalization by Evaluation" (2019)>>>>>>>>

>>>>>>>> This puts an interesting constraint on bui= lding types. The

>>>>>>>> constructed types has to export a function= to decide if a

>>>>>>>> given type is "equivalent" to it= self.

>>>>>>>>

>>>>>>>> The notion of "equivalence" migh= t involve category ideas

>>>>>>>> of natural transformation and univalence. = Sigh.

>>>>>>>>

>>>>>>>> That's an interesting design point.

>>>>>>>>

>>>>>>>> Tim

>>>>>>>>

>>>>>>>>

>>>>>>>> On 5/5/21, Tim Daly <axiomcas@gmail.com> wrote:

>>>>>>>>> It is interesting that programmer'= s eyes and expectations adapt

>>>>>>>>> to the tools they use. For instance, I= use emacs and expect to

>>>>>>>>> work directly in files and multiple bu= ffers. When I try to use one

>>>>>>>>> of the many IDE tools I find they tend= to "get in the way". I

>>>>>>>>> already

>>>>>>>>> know or can quickly find whatever they= try to tell me. If you use

>>>>>>>>> an

>>>>>>>>> IDE you probably find emacs "too = sparse" for programming.

>>>>>>>>>

>>>>>>>>> Recently I've been working in a sp= arse programming environment.

>>>>>>>>> I'm exploring the question of runn= ing a proof checker in an FPGA.

>>>>>>>>> The FPGA development tools are painful= at best and not intuitive

>>>>>>>>> since you SEEM to be programming but y= ou're actually describing

>>>>>>>>> hardware gates, connections, and timin= g. This is an environment

>>>>>>>>> where everything happens all-at-once a= nd all-the-time (like the

>>>>>>>>> circuits in your computer). It is the = "assembly language of

>>>>>>>>> circuits".

>>>>>>>>> Naturally, my eyes have adapted to thi= s rather raw level.

>>>>>>>>>

>>>>>>>>> That said, I'm normally doing lite= rate programming all the time.

>>>>>>>>> My typical file is a document which is= a mixture of latex and

>>>>>>>>> lisp.

>>>>>>>>> It is something of a shock to return t= o that world. It is clear

>>>>>>>>> why

>>>>>>>>> people who program in Python find lisp= to be a "sea of parens".

>>>>>>>>> Yet as a lisp programmer, I don't = even see the parens, just code.

>>>>>>>>>

>>>>>>>>> It takes a few minutes in a literate d= ocument to adapt vision to

>>>>>>>>> see the latex / lisp combination as na= tural. The latex markup,

>>>>>>>>> like the lisp parens, eventually just = disappears. What remains

>>>>>>>>> is just lisp and natural language text= .

>>>>>>>>>

>>>>>>>>> This seems painful at first but eyes q= uickly adapt. The upside

>>>>>>>>> is that there is always a "finish= ed" document that describes the

>>>>>>>>> state of the code. The overhead of wri= ting a paragraph to

>>>>>>>>> describe a new function or change a pa= ragraph to describe the

>>>>>>>>> changed function is very small.

>>>>>>>>>

>>>>>>>>> Using a Makefile I latex the document = to generate a current PDF

>>>>>>>>> and then I extract, load, and execute = the code. This loop catches

>>>>>>>>> errors in both the latex and the sourc= e code. Keeping an open file

>>>>>>>>> in

>>>>>>>>> my pdf viewer shows all of the changes= in the document after every

>>>>>>>>> run of make. That way I can edit the b= ook as easily as the code.

>>>>>>>>>

>>>>>>>>> Ultimately I find that writing the boo= k while writing the code is

>>>>>>>>> more productive. I don't have to r= emember why I wrote something

>>>>>>>>> since the explanation is already there= .

>>>>>>>>>

>>>>>>>>> We all have our own way of programming= and our own tools.

>>>>>>>>> But I find literate programming to be = a real advance over IDE

>>>>>>>>> style programming and "raw code&q= uot; programming.

>>>>>>>>>

>>>>>>>>> Tim

>>>>>>>>>

>>>>>>>>>

>>>>>>>>> On 2/27/21, Tim Daly <axiomcas@gmail.com> wrote= :

>>>>>>>>>> The systems I use have the interes= ting property of

>>>>>>>>>> "Living within the compiler&q= uot;.

>>>>>>>>>>

>>>>>>>>>> Lisp, Forth, Emacs, and other syst= ems that present themselves

>>>>>>>>>> through the Read-Eval-Print-Loop (= REPL) allow the

>>>>>>>>>> ability to deeply interact with th= e system, shaping it to your

>>>>>>>>>> need.

>>>>>>>>>>

>>>>>>>>>> My current thread of study is soft= ware architecture. See

>>>>>>>>>> https://www.youtube.com/watch?v=3DW2hagw1VhhI&feature=3Dyoutu.= be

>>>>>>>>>> and https://www.geor= gefairbanks.com/videos/

>>>>>>>>>>

>>>>>>>>>> My current thinking on SANE involv= es the ability to

>>>>>>>>>> dynamically define categories, rep= resentations, and functions

>>>>>>>>>> along with "composition funct= ions" that permits choosing a

>>>>>>>>>> combination at the time of use.

>>>>>>>>>>

>>>>>>>>>> You might want a domain for handli= ng polynomials. There are

>>>>>>>>>> a lot of choices, depending on you= r use case. You might want

>>>>>>>>>> different representations. For exa= mple, you might want dense,

>>>>>>>>>> sparse, recursive, or "machin= e compatible fixnums" (e.g. to

>>>>>>>>>> interface with C code). If these d= on't exist it ought to be

>>>>>>>>>> possible

>>>>>>>>>> to create them. Such "lego-li= ke" building blocks require careful

>>>>>>>>>> thought about creating "fully= factored" objects.

>>>>>>>>>>

>>>>>>>>>> Given that goal, the traditional b= arrier of "compiler" vs

>>>>>>>>>> "interpreter"

>>>>>>>>>> does not seem useful. It is better= to "live within the compiler"

>>>>>>>>>> which

>>>>>>>>>> gives the ability to define new th= ings "on the fly".

>>>>>>>>>>

>>>>>>>>>> Of course, the SANE compiler is go= ing to want an associated

>>>>>>>>>> proof of the functions you create = along with the other parts

>>>>>>>>>> such as its category hierarchy and= representation properties.

>>>>>>>>>>

>>>>>>>>>> There is no such thing as a simple= job. :-)

>>>>>>>>>>

>>>>>>>>>> Tim

>>>>>>>>>>

>>>>>>>>>>

>>>>>>>>>> On 2/18/21, Tim Daly <axiomcas@gmail.com>= wrote:

>>>>>>>>>>> The Axiom SANE compiler / inte= rpreter has a few design points.

>>>>>>>>>>>

>>>>>>>>>>> 1) It needs to mix interpreted= and compiled code in the same

>>>>>>>>>>> function.

>>>>>>>>>>> SANE allows dynamic constructi= on of code as well as dynamic type

>>>>>>>>>>> construction at runtime. Both = of these can occur in a runtime

>>>>>>>>>>> object.

>>>>>>>>>>> So there is potentially a mixt= ure of interpreted and compiled

>>>>>>>>>>> code.

>>>>>>>>>>>

>>>>>>>>>>> 2) It needs to perform type re= solution at compile time without

>>>>>>>>>>> overhead

>>>>>>>>>>> where possible. Since this is = not always possible there needs to

>>>>>>>>>>> be

>>>>>>>>>>> a "prefix thunk" tha= t will perform the resolution. Trivially,

>>>>>>>>>>> for

>>>>>>>>>>> example,

>>>>>>>>>>> if we have a + function we nee= d to type-resolve the arguments.

>>>>>>>>>>>

>>>>>>>>>>> However, if we can prove at co= mpile time that the types are both

>>>>>>>>>>> bounded-NNI and the result is = bounded-NNI (i.e. fixnum in lisp)

>>>>>>>>>>> then we can inline a call to += at runtime. If not, we might have

>>>>>>>>>>> + applied to NNI and POLY(FLOA= T), which requires a thunk to

>>>>>>>>>>> resolve types. The thunk could= even "specialize and compile"

>>>>>>>>>>> the code before executing it.<= br> >>>>>>>>>>>

>>>>>>>>>>> It turns out that the Forth im= plementation of

>>>>>>>>>>> "threaded-interpreted&quo= t;

>>>>>>>>>>> languages model provides an ef= ficient and effective way to do

>>>>>>>>>>> this.[0]

>>>>>>>>>>> Type resolution can be "i= nserted" in intermediate thunks.

>>>>>>>>>>> The model also supports dynami= c overloading and tail recursion.

>>>>>>>>>>>

>>>>>>>>>>> Combining high-level CLOS code= with low-level threading gives an

>>>>>>>>>>> easy to understand and robust = design.

>>>>>>>>>>>

>>>>>>>>>>> Tim

>>>>>>>>>>>

>>>>>>>>>>> [0] Loeliger, R.G. "Threa= ded Interpretive Languages" (1981)

>>>>>>>>>>> ISBN 0-07-038360-X

>>>>>>>>>>>

>>>>>>>>>>>

>>>>>>>>>>>

>>>>>>>>>>>

>>>>>>>>>>> On 2/5/21, Tim Daly <axiomcas@gmail.com>= ; wrote:

>>>>>>>>>>>> I've worked hard to ma= ke Axiom depend on almost no other

>>>>>>>>>>>> tools so that it would not= get caught by "code rot" of

>>>>>>>>>>>> libraries.

>>>>>>>>>>>>

>>>>>>>>>>>> However, I'm also tryi= ng to make the new SANE version much

>>>>>>>>>>>> easier to understand and d= ebug.To that end I've been

>>>>>>>>>>>> experimenting

>>>>>>>>>>>> with some ideas.

>>>>>>>>>>>>

>>>>>>>>>>>> It should be possible to v= iew source code, of course. But the

>>>>>>>>>>>> source

>>>>>>>>>>>> code is not the only, nor = possibly the best, representation of

>>>>>>>>>>>> the

>>>>>>>>>>>> ideas.

>>>>>>>>>>>> In particular, source code= gets compiled into data structures.

>>>>>>>>>>>> In

>>>>>>>>>>>> Axiom

>>>>>>>>>>>> these data structures real= ly are a graph of related structures.

>>>>>>>>>>>>

>>>>>>>>>>>> For example, looking at th= e gcd function from NNI, there is the

>>>>>>>>>>>> representation of the gcd = function itself. But there is also a

>>>>>>>>>>>> structure

>>>>>>>>>>>> that is the REP (and, in t= he new system, is separate from the

>>>>>>>>>>>> domain).

>>>>>>>>>>>>

>>>>>>>>>>>> Further, there are associa= ted specification and proof

>>>>>>>>>>>> structures.

>>>>>>>>>>>> Even

>>>>>>>>>>>> further, the domain inheri= ts the category structures, and from

>>>>>>>>>>>> those

>>>>>>>>>>>> it

>>>>>>>>>>>> inherits logical axioms an= d definitions through the proof

>>>>>>>>>>>> structure.

>>>>>>>>>>>>

>>>>>>>>>>>> Clearly the gcd function i= s a node in a much larger graph

>>>>>>>>>>>> structure.

>>>>>>>>>>>>

>>>>>>>>>>>> When trying to decide why = code won't compile it would be useful

>>>>>>>>>>>> to

>>>>>>>>>>>> be able to see and walk th= ese structures. I've thought about

>>>>>>>>>>>> using

>>>>>>>>>>>> the

>>>>>>>>>>>> browser but browsers are t= oo weak. Either everything has to be

>>>>>>>>>>>> "in

>>>>>>>>>>>> a

>>>>>>>>>>>> single tab to show the gra= ph" or "the nodes of the graph are in

>>>>>>>>>>>> different

>>>>>>>>>>>> tabs". Plus, construc= ting dynamic graphs that change as the

>>>>>>>>>>>> software

>>>>>>>>>>>> changes (e.g. by loading a= new spad file or creating a new

>>>>>>>>>>>> function)

>>>>>>>>>>>> represents the huge proble= m of keeping the browser "in sync

>>>>>>>>>>>> with

>>>>>>>>>>>> the

>>>>>>>>>>>> Axiom workspace". So = something more dynamic and embedded is

>>>>>>>>>>>> needed.

>>>>>>>>>>>>

>>>>>>>>>>>> Axiom source gets compiled= into CLOS data structures. Each of

>>>>>>>>>>>> these

>>>>>>>>>>>> new SANE structures has an= associated surface representation,

>>>>>>>>>>>> so

>>>>>>>>>>>> they

>>>>>>>>>>>> can be presented in user-f= riendly form.

>>>>>>>>>>>>

>>>>>>>>>>>> Also, since Axiom is liter= ate software, it should be possible

>>>>>>>>>>>> to

>>>>>>>>>>>> look

>>>>>>>>>>>> at

>>>>>>>>>>>> the code in its literate f= orm with the surrounding explanation.

>>>>>>>>>>>>

>>>>>>>>>>>> Essentially we'd like = to have the ability to "deep dive" into

>>>>>>>>>>>> the

>>>>>>>>>>>> Axiom

>>>>>>>>>>>> workspace, not only for de= bugging, but also for understanding

>>>>>>>>>>>> what

>>>>>>>>>>>> functions are used, where = they come from, what they inherit,

>>>>>>>>>>>> and

>>>>>>>>>>>> how they are used in a com= putation.

>>>>>>>>>>>>

>>>>>>>>>>>> To that end I'm lookin= g at using McClim, a lisp windowing

>>>>>>>>>>>> system.

>>>>>>>>>>>> Since the McClim windows w= ould be part of the lisp image, they

>>>>>>>>>>>> have

>>>>>>>>>>>> access to display (and mod= ify) the Axiom workspace at all

>>>>>>>>>>>> times.

>>>>>>>>>>>>

>>>>>>>>>>>> The only hesitation is tha= t McClim uses quicklisp and drags in

>>>>>>>>>>>> a

>>>>>>>>>>>> lot

>>>>>>>>>>>> of other subsystems. It= 9;s all lisp, of course.

>>>>>>>>>>>>

>>>>>>>>>>>> These ideas aren't new= . They were available on Symbolics

>>>>>>>>>>>> machines,

>>>>>>>>>>>> a truly productive platfor= m and one I sorely miss.

>>>>>>>>>>>>

>>>>>>>>>>>> Tim

>>>>>>>>>>>>

>>>>>>>>>>>>

>>>>>>>>>>>>

>>>>>>>>>>>> On 1/19/21, Tim Daly <<= a href=3D"mailto:axiomcas@gmail.com" target=3D"_blank">axiomcas@gmail.com> wrote:

>>>>>>>>>>>>> Also of interest is th= e talk

>>>>>>>>>>>>> "The Unreasonable= Effectiveness of Dynamic Typing for

>>>>>>>>>>>>> Practical

>>>>>>>>>>>>> Programs"

>>>>>>>>>>>>> https://vimeo.com/743= 54480

>>>>>>>>>>>>> which questions whethe= r static typing really has any benefit.

>>>>>>>>>>>>>

>>>>>>>>>>>>> Tim

>>>>>>>>>>>>>

>>>>>>>>>>>>>

>>>>>>>>>>>>> On 1/19/21, Tim Daly &= lt;axiomcas@gmail.c= om> wrote:

>>>>>>>>>>>>>> Peter Naur wrote a= n article of interest:

>>>>>>>>>>>>>> htt= p://pages.cs.wisc.edu/~remzi/Naur.pdf

>>>>>>>>>>>>>>

>>>>>>>>>>>>>> In particular, it = mirrors my notion that Axiom needs

>>>>>>>>>>>>>> to embrace literat= e programming so that the "theory

>>>>>>>>>>>>>> of the problem&quo= t; is presented as well as the "theory

>>>>>>>>>>>>>> of the solution&qu= ot;. I quote the introduction:

>>>>>>>>>>>>>>

>>>>>>>>>>>>>>

>>>>>>>>>>>>>>

>>>>>>>>>>>>>> This article is, t= o my mind, the most accurate account

>>>>>>>>>>>>>> of what goes on in= designing and coding a program.

>>>>>>>>>>>>>> I refer to it regu= larly when discussing how much

>>>>>>>>>>>>>> documentation to c= reate, how to pass along tacit

>>>>>>>>>>>>>> knowledge, and the= value of the XP's metaphor-setting

>>>>>>>>>>>>>> exercise. It also = provides a way to examine a methodolgy's

>>>>>>>>>>>>>> economic structure= .

>>>>>>>>>>>>>>

>>>>>>>>>>>>>> In the article, wh= ich follows, note that the quality of the

>>>>>>>>>>>>>> designing programm= er's work is related to the quality of

>>>>>>>>>>>>>> the match between = his theory of the problem and his theory

>>>>>>>>>>>>>> of the solution. N= ote that the quality of a later

>>>>>>>>>>>>>> programmer's>>>>>>>>>>>>>> work is related to= the match between his theories and the

>>>>>>>>>>>>>> previous programme= r's theories.

>>>>>>>>>>>>>>

>>>>>>>>>>>>>> Using Naur's i= deas, the designer's job is not to pass along

>>>>>>>>>>>>>> "the design&q= uot; but to pass along "the theories" driving the

>>>>>>>>>>>>>> design.

>>>>>>>>>>>>>> The latter goal is= more useful and more appropriate. It also

>>>>>>>>>>>>>> highlights that kn= owledge of the theory is tacit in the

>>>>>>>>>>>>>> owning,

>>>>>>>>>>>>>> and

>>>>>>>>>>>>>> so passing along t= he thoery requires passing along both

>>>>>>>>>>>>>> explicit

>>>>>>>>>>>>>> and tacit knowledg= e.

>>>>>>>>>>>>>>

>>>>>>>>>>>>>> Tim

>>>>>>>>>>>>>>

>>>>>>>>>>>>>

>>>>>>>>>>>>

>>>>>>>>>>>

>>>>>>>>>>

>>>>>>>>>

>>>>>>>>

>>>>>>>

>>>>>>

>>>>>

>>>>

>>>

>>

>

One of the interesting questions when obtaining a res=
ult

is "what functions were called and what was their return=
value?"

Otherwise known as the "show your work" i=
dea.

There is an idea called the "writer mona=
d" [0], usually

implemented to facilitate logging. We c=
an exploit this

idea to provide "show your work" capabi=
lity. Each function

can provide this information inside the monad=
enabling the

question to be answered at any time.

=

For those unfamiliar with the monad idea, the best explanation

I've found is this video [1].

Tim

=

=

[0] Deriving the writer monad from first principl=
es

[1] The Absolute Best Intro to =
Monads for Software Engineers

On Mon, Dec 13, 2021 at 12:30 AM Tim Daly <axiomcas@gmail.com> wrote:

...(snip)...<= div>Common Lisp has an "open compiler". That allow= s the abilityto deeply modify compiler behavior using compiler m= acrosand macros in general. CLOS takes advantage of this to add<= /div>typed behavior into the compiler in a way that ALLOWS strict<= div>the next step since in some cases it cannot generate "closed code&= quot;.typing such as found in constructive type theory and ML.Ju= dgments, ala Crary, are front-and-center.Whet= her you USE the discipline afforded is the real question.Indeed, the Axiom research struggle is essentially one of how=to have a disciplined use of first-class dependent types. Thestruggle raises issues of, for example, compiling a dependent t= ype whose argument is recursive in the compiled type. Sincethe n= ew type is first-class it can be constructed at what youimproper= ly call "run-time". However, it appears that the recursive<= div>type may have to call the compiler at each recursion to generateI am embedding proofs (in LEAN language= ) into the typehierarchy so that theorems, which depend on the t= ype hierarchy,are correctly inherited. The compiler has to c= heck the proofs of functionsat compile time using these. Hacking= up nonsense just won't cut it. Thinkof the problem of embed= ding LEAN proofs in ML or ML in LEAN.(Actually, Jeremy Avigad mi= ght find that research interesting.)So Matrix(3,3= ,Float) has inverses (assuming Float is afield (cough)). The typ= e inherits this theorem and proofs offunctions can use this. But= Matrix(3,4,Integer) does not haveinverses so the proofs cannot = use this. The type hierarchy hasto ensure that the proper theore= ms get inherited.Making proof technology work= at compile time is hard.(Worse yet, LEAN is a moving target. Si= gh.)

On Thu, Nov 25, 2021 at 9:43 AM Tim Daly &=
lt;axiomcas@gmail.c=
om> wrote:

As= you know I've been re-architecting Axiom to use first class= dependent types and proving the algorithms correct. For example,= the GCD of natural numbers or the GCD of polynomials.<= div>The idea involves "boxing up" the proof with the algorithm (a= kaproof carrying code) in the ELF file (under a crypto hash so i= tcan't be changed).Once the code i= s running on the CPU, the proof is run in parallelon the field p= rogrammable gate array (FPGA). Intel data centerservers have CPU= s with built-in FPGAs these days.There is a bit o= f a disconnect, though. The GCD code is compiledmachine code but= the proof is LEAN-level.What would be ideal is i= f the compiler not only compiled the GCDcode to machine code, it= also compiled the proof to "machine code".That is, fo= r each machine instruction, the FPGA proof checkerwould ensure t= hat the proof was not violated at the individualinstruction leve= l.What does it mean to "compile a proof = to the machine code level"?The Milawa effort= (Myre14.pdf) does incremental proofs in layers.To quote from th= e article [0]:=C2=A0=C2=A0 We begin with a si= mple proof checker, call it A, which is short=C2=A0=C2=A0 enough= to verify by the ``social process'' of mathematics -- and=C2=A0 more recently with a theorem prover for a more expressive logic. =C2=A0=C2=A0 We then develop a series of increasing= ly powerful proof checkers,=C2=A0 call the B, C, D, and so on. W= e show each of these programs only=C2=A0=C2=A0 accepts the same = formulas as A, using A to verify B, and B to verify=C2=A0=C2=A0 = C, and so on. Then, since we trust A, and A says B is trustworthy, we==C2=A0=C2=A0 can trust B. Then, since we trust B, and B says C is trus= tworthy, we=C2=A0=C2=A0 can trust C.This gives a technique for "compiling the proof" down the the = machine code level. Ideally, the compiler would have judgments fo= r each step ofthe compilation so that each compile step has a ju= stification. I don'tknow of any compiler that does this yet.= (References welcome).At the machine cod= e level, there are techniques that would allowthe FPGA proof to = "step in sequence" with the executing code.Some wo= rk has been done on using "Hoare Logic for RealisticallyMod= elled Machine Code" (paper attached, Myre07a.pdf),"Dec= ompilation into Logic -- Improved (Myre12a.pdf).S= o the game is to construct a GCD over some type (Nats, Polys, etc.Axiom has 22), compile the dependent type GCD to machine code. = In parallel, the proof of the code is compiled to machine code. Thepair is sent to the CPU/FPGA and, while the algorithm runs, the FPGA ensures the proof is not violated, instruction by instruction.=(I'm ignoring machine architecture issues such pipe= lining, out-of-order,branch prediction, and other machine-level = things to ponder. I'm lookingat the RISC-V Verilog details b= y various people to understand better butit is still a "mis= ty fog" for me.)The result is proven cod= e "down to the metal".Tim

On Thu,=
Nov 25, 2021 at 6:05 AM Tim Daly <axiomcas@gmail.com> wrote:

=As you know I've been re-architecting Axiom to use first classdependent types and proving the algorithms correct. For example,the GCD of natural numbers or the GCD of polynomials.

=The idea involves "boxing up" the proof with the algor= ithm (akaproof carrying code) in the ELF file (under a crypto ha= sh so itcan't be changed).Once the= code is running on the CPU, the proof is run in parallelon the = field programmable gate array (FPGA). Intel data centerservers h= ave CPUs with built-in FPGAs these days.There is = a bit of a disconnect, though. The GCD code is compiledmachine c= ode but the proof is LEAN-level.What would be ide= al is if the compiler not only compiled the GCDcode to machine c= ode, it also compiled the proof to "machine code".That= is, for each machine instruction, the FPGA proof checkerwould e= nsure that the proof was not violated at the individualinstructi= on level.What does it mean to "compile a= proof to the machine code level"?The Milawa= effort (Myre14.pdf) does incremental proofs in layers.To quote = from the article [0]:=C2=A0=C2=A0 We begin wi= th a simple proof checker, call it A, which is short=C2=A0=C2=A0= enough to verify by the ``social process'' of mathematics -- and=C2=A0 more recently with a theorem prover for a more expressive l= ogic.=C2=A0=C2=A0 We then develop a series of inc= reasingly powerful proof checkers,=C2=A0 call the B, C, D, and s= o on. We show each of these programs only=C2=A0=C2=A0 accepts th= e same formulas as A, using A to verify B, and B to verify=C2=A0= =C2=A0 C, and so on. Then, since we trust A, and A says B is trustworthy, w= e=C2=A0=C2=A0 can trust B. Then, since we trust B, and B says C = is trustworthy, we=C2=A0=C2=A0 can trust C.

<= /div>This gives a technique for "compiling the proof" down t= he the machinecode level. Ideally, the compiler would have judgm= ents for each step ofthe compilation so that each compile step h= as a justification. I don'tknow of any compiler that does th= is yet. (References welcome).At the mach= ine code level, there are techniques that would allowthe FPGA pr= oof to "step in sequence" with the executing code.= Some work has been done on using "Hoare Logic for Realistically<= div>Modelled Machine Code" (paper attached, Myre07a.pdf),&q= uot;Decompilation into Logic -- Improved (Myre12a.pdf).=So the game is to construct a GCD over some type (Nats, Polys, etc.Axiom has 22), compile the dependent type GCD to machine code.In parallel, the proof of the code is compiled to machine code. The<= /div>pair is sent to the CPU/FPGA and, while the algorithm runs, the F= PGAensures the proof is not violated, instruction by instruction= .(I'm ignoring machine architecture issues su= ch pipelining, out-of-order,branch prediction, and other machine= -level things to ponder. I'm lookingat the RISC-V Verilog de= tails by various people to understand better butit is still a &q= uot;misty fog" for me.)The result is pro= ven code "down to the metal".Tim<= div>On Sat= , Nov 13, 2021 at 5:28 PM Tim Daly <axiomcas@gmail.com> wrote:Full support fo= r general, first-class dependent types requiressome changes to t= he Axiom design. That implies some languagedesign questions.=Given that mathematics is such a general subject with= a lot of"local" notation and ideas (witness logical j= udgment notation)careful thought is needed to design a language = that is able tohandle a wide range.Nor= mally language design is a two-level process. The languagedesign= er creates a language and then an implementation. Variousdesign = choices affect the final language.There is &q= uot;The Metaobject Protocol" (MOP)which encourages a three-level process. The lan= guage designerworks at a Metalevel to design a family of la= nguages, then thelanguage specializations, then the implementati= on. A MOP designallows the language user to optimize the languag= e to their problem.A simple paper on the subject = is "Metaobject Protocols"TimOn Mon= , Oct 25, 2021 at 7:42 PM Tim Daly <axiomcas@gmail.com> wrote:I have a separa= te thread of research on Self-Replicating Systems(ref: Kinematic= s of Self Reproducing Machineswhich led to watching "Strang= e Dreams of Stranger Loops" by Will ByrdWill referenced a = PhD Thesis by Jon Doyle"A Model for Deliberation, Action, a= nd Introspection"I also read the thesis by J= .C.G. Sturdy"A Lisp through the Looking Glass" Self-replication requires the ability to manipulate your = ownrepresentation in such a way that changes to that representat= ionwill change behavior.This leads to = two thoughts in the SANE research.First, "De= clarative Representation". That is, most of the thingsabout= the representation should be declarative rather thanprocedural.= Applying this idea as much as possible makes iteasier to unders= tand and manipulate.Second, "Explicit Ca= ll Stack". Function calls form an implicitcall stack. This = can usually be displayed in a running lisp system.However, havin= g the call stack explicitly available would meanthat a system co= uld "introspect" at the first-class level.These two ideas would make it easy, for example, to let the sy= stem "show the work". One of the normal complaints is that<= div>a system presents an answer but there is no way to know howt= hat answer was derived. These two ideas make it possible tounder= stand, display, and even post-answer manipulatethe intermediate = steps.Having the intermediate steps also allows p= roofs to beinserted in a step-by-step fashion. This aids the eff= ort tohave proofs run in parallel with computation at the hardwa= relevel.Tim

On Thu, Oct 21, = 2021 at 9:50 AM Tim Daly <axiomcas@gmail.com> wrote:So the current struggle= involves the categories in Axiom.The categories = and domains constructed using categoriesare dependent types. Whe= n are dependent types "equal"?Well, hummmm, that depen= ds on the arguments to theconstructor.= But in order to decide(?) equality we have to evaluatethe argume= nts (which themselves can be dependent types).Indeed, we may, an= d in general, we must evaluate thearguments at compile time= (well, "construction time" asthere isn't really a= compiler / interpreter separation anymore.)T= hat raises the question of what "equality" means. This= is not simply a "set equality" relation. It falls into the<= div>infinite-groupoid of homotopy type theory. In generalit appe= ars that deciding category / domain equivalencemight force us to= climb the type hierarchy.Beyond that, there is t= he question of "which proof"applies to the resulting o= bject. Proofs depend on theirassumptions which might be differen= t for differentconstructions. As yet I have no clue how to "= ;index"proofs based on their assumptions, nor how toconnect these assumptions to the groupoid structure.My brain hurts.TimOn Mon, Oct 18, 2021 at 2:00 AM Tim Daly <axiomcas@gmail.com> wrote: "B= irthing Computational Mathematics"The Axiom = SANE project is difficult at a very fundamentallevel. The title = "SANE" was chosen due to the variouswords found in a t= hesuarus... "rational", "coherent","jud= icious" and "sound".These are very= high level, amorphous ideas. But so isthe design of SANE. Break= ing away from tradition incomputer algebra, type theory, and pro= of assistantsis very difficult. Ideas tend to fall into standard= jargonwhich limits both the frame of thinking (e.g. dependenttypes) and the content (e.g. notation).Q= uestioning both frame and content is very difficult.It is hard t= o even recognize when they are accepted"by default" ra= ther than "by choice". What does the idea"pow= er tools" mean in a primitive, hand labor culture?

<= /div>Christopher Alexander [0] addresses this problem ina l= ot of his writing. Specifically, in his book "Notes onthe S= ynthesis of Form", in his chapter 5 "The SelfconsiousP= rocess", he addresses this problem directly. This is a"= ;must read" book.Unlike building design = and contruction, however, thereare almost no constraints to use = as guides. Alexanderquotes Plato's Phaedrus:

<= /div>=C2=A0 "First, the taking in of scattered particulars under<= /div>=C2=A0=C2=A0 one Idea, so that everyone understands what is being==C2=A0=C2=A0 talked about ... Second, the separation of the Idea==C2=A0=C2=A0 into parts, by dividing it at the joints, as nature==C2=A0=C2=A0 directs, not breaking any limb in half as a bad=C2=A0=C2=A0 carver might."L= isp, which has been called "clay for the mind" canbuil= d virtually anything that can be thought. The"joints&q= uot; are also "of one's choosing" so one isboth ca= rver and "nature".Clearly the probl= em is no longer "the tools".*I* am the problem constra= ining the solution.Birthing this "new thing" is slow, = difficult, anduncertain at best.Tim[0] Alexander, Christopher "Notes on the Synthe= sisof Form" Harvard University Press 1964IS= BN 0-674-62751-2<= div dir=3D"ltr" class=3D"gmail_attr">On Sun, Oct 10, 2021 at 4:40 PM Tim Da= ly <axiomcas@gma= il.com> wrote:Re: writing a paper... I'm not connected to Academia

so anything I'd write would never make it into print.

"Language level parsing" is still a long way off. The talk

by Guy Steele [2] highlights some of the problems we

currently face using mathematical metanotation.

For example, a professor I know at CCNY (City College

of New York) didn't understand Platzer's "funny

fraction notation" (proof judgements) despite being

an expert in Platzer's differential equations area.

Notation matters and is not widely common.

I spoke to Professor Black (in LTI) about using natural

language in the limited task of a human-robot cooperation

in changing a car tire.=C2=A0 I looked at the current machine

learning efforts. They are no where near anything but

toy systems, taking too long to train and are too fragile.

Instead I ended up using a combination of AIML [3]

(Artificial Intelligence Markup Language), the ALICE

Chatbot [4], Forgy's OPS5 rule based program [5],

and Fahlman's SCONE [6] knowledge base. It was

much less fragile in my limited domain problem.

I have no idea how to extend any system to deal with

even undergraduate mathematics parsing.

Nor do I have any idea how I would embed LEAN

knowledge into a SCONE database, although I

think the combination would be useful and interesting.

I do believe that, in the limited area of computational

mathematics, we are capable of building robust, proven

systems that are quite general and extensible. As you

might have guessed I've given it a lot of thought over

the years :-)

A mathematical language seems to need >6 components

1) We need some sort of a specification language, possibly

somewhat 'propositional' that introduces the assumptions

you mentioned (ref. your discussion of numbers being

abstract and ref. your discussion of relevant choice of

assumptions related to a problem).

This is starting to show up in the hardware area (e.g.

Lamport's TLC[0])

Of course, specifications relate to proving programs

and, as you recall, I got a cold reception from the

LEAN community about using LEAN for program proofs.

2) We need "scaffolding". That is, we need a theory

that can be reduced to some implementable form

that provides concept-level structure.

Axiom uses group theory for this. Axiom's "category"

structure has "Category" things like Ring. Claiming

to be a Ring brings in a lot of "Signatures" of functions

you have to implement to properly be a Ring.

Scaffolding provides a firm mathematical basis for

design. It provides a link between the concept of a

Ring and the expectations you can assume when

you claim your "Domain" "is a Ring". Category

theory might provide similar structural scaffolding

(eventually... I'm still working on that thought garden)

LEAN ought to have a textbook(s?) that structures

the world around some form of mathematics. It isn't

sufficient to say "undergraduate math" is the goal.

There needs to be some coherent organization so

people can bring ideas like Group Theory to the

organization. Which brings me to ...

3) We need "spreading". That is, we need to take

the various definitions and theorems in LEAN and

place them in their proper place in the scaffold.

For example, the Ring category needs the definitions

and theorems for a Ring included in the code for the

Ring category. Similarly, the Commutative category

needs the definitions and theorems that underlie

"commutative" included in the code.

That way, when you claim to be a "Commutative Ring"

you get both sets of definitions and theorems. That is,

the inheritance mechanism will collect up all of the

definitions and theorems and make them available

for proofs.

I am looking at LEAN's definitions and theorems with

an eye to "spreading" them into the group scaffold of

Axiom.

4) We need "carriers" (Axiom calls them representations,

aka "REP"). REPs allow data structures to be defined

independent of the implementation.

For example, Axiom can construct Polynomials that

have their coefficients in various forms of representation.

You can define "dense" (all coefficients in a list),

"sparse" (only non-zero coefficients), "recursive", etc= .

A "dense polynomial" and a "sparse polynomial" work

exactly the same way as far as the user is concerned.

They both implement the same set of functions. There

is only a difference of representation for efficiency and

this only affects the implementation of the functions,

not their use.

Axiom "got this wrong" because it didn't sufficiently

separate the REP from the "Domain". I plan to fix this.

LEAN ought to have a "data structures" subtree that

has all of the definitions and axioms for all of the

existing data structures (e.g. Red-Black trees). This

would be a good undergraduate project.

5) We need "Domains" (in Axiom speak). That is, we

need a box that holds all of the functions that implement

a "Domain". For example, a "Polynomial Domain" would

hold all of the functions for manipulating polynomials

(e.g polynomial multiplication). The "Domain" box

is a dependent type that:

=C2=A0 A) has an argument list of "Categories" that this "Do= main"

=C2=A0 =C2=A0 =C2=A0 box inherits. Thus, the "Integer Domain" inh= erits

=C2=A0 =C2=A0 =C2=A0 the definitions and axioms from "Commutative"= ;

=C2=A0 =C2=A0 =C2=A0Functions in the "Domain" box can now assume<= br> =C2=A0 =C2=A0 =C2=A0and use the properties of being commutative. Proofs

=C2=A0 =C2=A0 =C2=A0of functions in this domain can use the definitions

=C2=A0 =C2=A0 =C2=A0and proofs about being commutative.

=C2=A0 B) contains an argument that specifies the "REP"

=C2=A0 =C2=A0 =C2=A0 =C2=A0(aka, the carrier). That way you get all of the<= br> =C2=A0 =C2=A0 =C2=A0 =C2=A0functions associated with the data structure

=C2=A0 =C2=A0 =C2=A0 available for use in the implementation.

=C2=A0 =C2=A0 =C2=A0 Functions in the Domain box can use all of

=C2=A0 =C2=A0 =C2=A0 the definitions and axioms about the representation

=C2=A0 =C2=A0 =C2=A0 (e.g. NonNegativeIntegers are always positive)

=C2=A0 C) contains local "spread" definitions and axioms

=C2=A0 =C2=A0 =C2=A0 =C2=A0that can be used in function proofs.

=C2=A0 =C2=A0 =C2=A0 For example, a "Square Matrix" domain would<= br> =C2=A0 =C2=A0 =C2=A0 have local axioms that state that the matrix is

=C2=A0 =C2=A0 =C2=A0 always square. Thus, functions in that box could

=C2=A0 =C2=A0 =C2=A0 use these additional definitions and axioms in

=C2=A0 =C2=A0 =C2=A0 function proofs.

=C2=A0 D) contains local state. A "Square Matrix" domain

=C2=A0 =C2=A0 =C2=A0 =C2=A0would be constructed as a dependent type that

=C2=A0 =C2=A0 =C2=A0 =C2=A0specified the size of the square (e.g. a 2x2

=C2=A0 =C2=A0 =C2=A0 =C2=A0matrix would have '2' as a dependent par= ameter.

=C2=A0 E) contains implementations of inherited functions.

=C2=A0 =C2=A0 =C2=A0 =C2=A0A "Category" could have a signature fo= r a GCD

=C2=A0 =C2=A0 =C2=A0 =C2=A0function and the "Category" could have= a default

=C2=A0 =C2=A0 =C2=A0 =C2=A0implementation. However, the "Domain" = could

=C2=A0 =C2=A0 =C2=A0 =C2=A0have a locally more efficient implementation whi= ch

=C2=A0 =C2=A0 =C2=A0 =C2=A0overrides the inherited implementation.

=C2=A0 =C2=A0 =C2=A0 Axiom has about 20 GCD implementations that

=C2=A0 =C2=A0 =C2=A0 differ locally from the default in the category. They<= br> =C2=A0 =C2=A0 =C2=A0 use properties known locally to be more efficient.

=C2=A0 F) contains local function signatures.

=C2=A0 =C2=A0 =C2=A0 A "Domain" gives the user more and more uniq= ue

=C2=A0 =C2=A0 =C2=A0 functions. The signature have associated

=C2=A0 =C2=A0 =C2=A0 "pre- and post- conditions" that can be used=

=C2=A0 =C2=A0 =C2=A0 as assumptions in the function proofs.

=C2=A0 =C2=A0 =C2=A0 Some of the user-available functions are only

=C2=A0 =C2=A0 =C2=A0 visible if the dependent type would allow them

=C2=A0 =C2=A0 =C2=A0 to exist. For example, a general Matrix domain

=C2=A0 =C2=A0 =C2=A0 would have fewer user functions that a Square

=C2=A0 =C2=A0 =C2=A0 Matrix domain.

=C2=A0 =C2=A0 =C2=A0 In addition, local "helper" functions need t= heir

=C2=A0 =C2=A0 =C2=A0 own signatures that are not user visible.

=C2=A0 G) the function implementation for each signature.

=C2=A0 =C2=A0 =C2=A0 =C2=A0This is obviously where all the magic happens

=C2=A0 H) the proof of each function.

=C2=A0 =C2=A0 =C2=A0 =C2=A0This is where I'm using LEAN.

=C2=A0 =C2=A0 =C2=A0 =C2=A0Every function has a proof. That proof can use=C2=A0 =C2=A0 =C2=A0 =C2=A0all of the definitions and axioms inherited from=

=C2=A0 =C2=A0 =C2=A0 =C2=A0the "Category", "Representation&q= uot;, the "Domain

=C2=A0 =C2=A0 =C2=A0 =C2=A0Local", and the signature pre- and post-

=C2=A0 =C2=A0 =C2=A0 =C2=A0conditions.

=C2=A0 =C2=A0I) literature links. Algorithms must contain a link

=C2=A0 =C2=A0 =C2=A0 to at least one literature reference. Of course,

=C2=A0 =C2=A0 =C2=A0 since everything I do is a Literate Program

=C2=A0 =C2=A0 =C2=A0 this is obviously required. Knuth said so :-)

LEAN ought to have "books" or "pamphlets" that

bring together all of this information for a domain

such as Square Matrices. That way a user can

find all of the related ideas, available functions,

and their corresponding proofs in one place.

6) User level presentation.

=C2=A0 =C2=A0 This is where the systems can differ significantly.

=C2=A0 =C2=A0 Axiom and LEAN both have GCD but they use

=C2=A0 =C2=A0 that for different purposes.

=C2=A0 =C2=A0 I'm trying to connect LEAN's GCD and Axiom's GCD<= br> =C2=A0 =C2=A0 so there is a "computational mathematics" idea that=

=C2=A0 =C2=A0 allows the user to connect proofs and implementations.

7) Trust

Unlike everything else, computational mathematics

can have proven code that gives various guarantees.

I have been working on this aspect for a while.

I refer to it as trust "down to the metal" The idea is

that a proof of the GCD function and the implementation

of the GCD function get packaged into the ELF format.

(proof carrying code). When the GCD algorithm executes

on the CPU, the GCD proof is run through the LEAN

proof checker on an FPGA in parallel.

(I just recently got a PYNQ Xilinx board [1] with a CPU

and FPGA together. I'm trying to implement the LEAN

proof checker on the FPGA).

We are on the cusp of a revolution in computational

mathematics. But the two pillars (proof and computer

algebra) need to get know each other.

Tim

[0] Lamport, Leslie "Chapter on TLA+"

in "Software Specification Methods"

https://www.springer.com/gp/book/9781852333539

(I no longer have CMU library access or I'd send you

the book PDF)

[1] https://www.tul.com.tw/productspynq-z2.html

[2] https://www.youtube.com/watch?v=3DdCuZkaaou0Q

[3] "ARTIFICIAL INTELLIGENCE MARKUP LANGUAGE"

https://arxiv.org/pdf/1307.3091.pdf

[4] ALICE Chatbot

http://www.scielo.org.mx/pdf/cys= /v19n4/1405-5546-cys-19-04-00625.pdf

[5] OPS5 User Manual

https://kilthub.cm= u.edu/articles/journal_contribution/OPS5_user_s_manual/6608090/1

[6] Scott Fahlman "SCONE"

http://www.cs.cmu.edu/~sef/scone/

On 9/27/21, Tim Daly <axiomcas@gmail.com> wrote:

> I have tried to maintain a list of names of people who have

> helped Axiom, going all the way back to the pre-Scratchpad

> days. The names are listed at the beginning of each book.

> I also maintain a bibliography of publications I've read or

> that have had an indirect influence on Axiom.

>

> Credit is "the coin of the realm". It is easy to share and w= rong

> to ignore. It is especially damaging to those in Academia who

> are affected by credit and citations in publications.

>

> Apparently I'm not the only person who feels that way. The ACM

> Turing award seems to have ignored a lot of work:

>

> Scientific Integrity, the 2021 Turing Lecture, and the 2018 Turing

> Award for Deep Learning

> https://pe= ople.idsia.ch/~juergen/scientific-integrity-turing-award-deep-learning.html=

>

> I worked on an AI problem at IBM Research called Ketazolam.

> (https://en.wikipedia.org/wiki/Ketazolam). The idea = was to recognize

> and associated 3D chemical drawings with their drug counterparts.

> I used Rumelhart, and McClelland's books. These books contained

> quite a few ideas that seem to be "new and innovative" among= the

> machine learning crowd... but the books are from 1987. I don't bel= ieve

> I've seen these books mentioned in any recent bibliography.

> https://mitpress.mit.edu= /books/parallel-distributed-processing-volume-1

>

>

>

>

> On 9/27/21, Tim Daly <axiomcas@gmail.com> wrote:

>> Greg Wilson asked "How Reliable is Scientific Software?"=

>> https://ne= verworkintheory.org/2021/09/25/how-reliable-is-scientific-software.html=

>>

>> which is a really interesting read. For example"

>>

>>=C2=A0 [Hatton1994], is now a quarter of a century old, but its con= clusions

>> are still fresh. The authors fed the same data into nine commercia= l

>> geophysical software packages and compared the results; they found=

>> that, "numerical disagreement grows at around the rate of 1% = in

>> average absolute difference per 4000 fines of implemented code, an= d,

>> even worse, the nature of the disagreement is nonrandom" (i.e= ., the

>> authors of different packages make similar mistakes).

>>

>>

>> On 9/26/21, Tim Daly <axiomcas@gmail.com> wrote:

>>> I should note that the lastest board I've just unboxed

>>> (a PYNQ-Z2) is a Zynq Z-7020 chip from Xilinx (AMD).

>>>

>>> What makes it interesting is that it contains 2 hard

>>> core processors and an FPGA, connected by 9 paths

>>> for communication. The processors can be run

>>> independently so there is the possibility of a parallel

>>> version of some Axiom algorithms (assuming I had

>>> the time, which I don't).

>>>

>>> Previously either the hard (physical) processor was

>>> separate from the FPGA with minimal communication

>>> or the soft core processor had to be created in the FPGA

>>> and was much slower.

>>>

>>> Now the two have been combined in a single chip.

>>> That means that my effort to run a proof checker on

>>> the FPGA and the algorithm on the CPU just got to

>>> the point where coordination is much easier.

>>>

>>> Now all I have to do is figure out how to program this

>>> beast.

>>>

>>> There is no such thing as a simple job.

>>>

>>> Tim

>>>

>>>

>>> On 9/26/21, Tim Daly <axiomcas@gmail.com> wrote:

>>>> I'm familiar with most of the traditional approaches>>>> like Theorema. The bibliography contains most of the

>>>> more interesting sources. [0]

>>>>

>>>> There is a difference between traditional approaches to

>>>> connecting computer algebra and proofs and my approach.

>>>>

>>>> Proving an algorithm, like the GCD, in Axiom is hard.

>>>> There are many GCDs (e.g. NNI vs POLY) and there

>>>> are theorems and proofs passed at runtime in the

>>>> arguments of the newly constructed domains. This

>>>> involves a lot of dependent type theory and issues of

>>>> compile time / runtime argument evaluation. The issues

>>>> that arise are difficult and still being debated in the ty= pe

>>>> theory community.

>>>>

>>>> I am putting the definitions, theorems, and proofs (DTP)>>>> directly into the category/domain hierarchy. Each category=

>>>> will have the DTP specific to it. That way a commutative>>>> domain will inherit a commutative theorem and a

>>>> non-commutative domain will not.

>>>>

>>>> Each domain will have additional DTPs associated with

>>>> the domain (e.g. NNI vs Integer) as well as any DTPs

>>>> it inherits from the category hierarchy. Functions in the<= br> >>>> domain will have associated DTPs.

>>>>

>>>> A function to be proven will then inherit all of the relev= ant

>>>> DTPs. The proof will be attached to the function and

>>>> both will be sent to the hardware (proof-carrying code).>>>>

>>>> The proof checker, running on a field programmable

>>>> gate array (FPGA), will be checked at runtime in

>>>> parallel with the algorithm running on the CPU

>>>> (aka "trust down to the metal"). (Note that Inte= l

>>>> and AMD have built CPU/FPGA combined chips,

>>>> currently only available in the cloud.)

>>>>

>>>>

>>>>

>>>> I am (slowly) making progress on the research.

>>>>

>>>> I have the hardware and nearly have the proof

>>>> checker from LEAN running on my FPGA.

>>>>

>>>> I'm in the process of spreading the DTPs from

>>>> LEAN across the category/domain hierarchy.

>>>>

>>>> The current Axiom build extracts all of the functions

>>>> but does not yet have the DTPs.

>>>>

>>>> I have to restructure the system, including the compiler>>>> and interpreter to parse and inherit the DTPs. I

>>>> have some of that code but only some of the code

>>>> has been pushed to the repository (volume 15) but

>>>> that is rather trivial, out of date, and incomplete.

>>>>

>>>> I'm clearly not smart enough to prove the Risch

>>>> algorithm and its associated machinery but the needed

>>>> definitions and theorems will be available to someone

>>>> who wants to try.

>>>>

>>>> [0] https://github.com/daly/= PDFS/blob/master/bookvolbib.pdf

>>>>

>>>>

>>>> On 8/19/21, Tim Daly <axiomcas@gmail.com> wrote:

>>>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

>>>>>

>>>>> REVIEW (Axiom on WSL2 Windows)

>>>>>

>>>>>

>>>>> So the steps to run Axiom from a Windows desktop

>>>>>

>>>>> 1 Windows) install XMing on Windows for X11 server

>>>>>

>>>>> http://www.straightrunning.com/XmingN= otes/

>>>>>

>>>>> 2 WSL2) Install Axiom in WSL2

>>>>>

>>>>> sudo apt install axiom

>>>>>

>>>>> 3 WSL2) modify /usr/bin/axiom to fix the bug:

>>>>> (someone changed the axiom startup script.

>>>>> It won't work on WSL2. I don't know who or

>>>>> how to get it fixed).

>>>>>

>>>>> sudo emacs /usr/bin/axiom

>>>>>

>>>>> (split the line into 3 and add quote marks)

>>>>>

>>>>> export SPADDEFAULT=3D/usr/local/axiom/mnt/linux

>>>>> export AXIOM=3D/usr/lib/axiom-20170501

>>>>> export "PATH=3D/usr/lib/axiom-20170501/bin:$PATH&= quot;

>>>>>

>>>>> 4 WSL2) create a .axiom.input file to include startup = cmds:

>>>>>

>>>>> emacs .axiom.input

>>>>>

>>>>> )cd "/mnt/c/yourpath"

>>>>> )sys pwd

>>>>>

>>>>> 5 WSL2) create a "myaxiom" command that sets= the

>>>>>=C2=A0 =C2=A0 =C2=A0DISPLAY variable and starts axiom>>>>>

>>>>> emacs myaxiom

>>>>>

>>>>> #! /bin/bash

>>>>> export DISPLAY=3D:0.0

>>>>> axiom

>>>>>

>>>>> 6 WSL2) put it in the /usr/bin directory

>>>>>

>>>>> chmod +x myaxiom

>>>>> sudo cp myaxiom /usr/bin/myaxiom

>>>>>

>>>>> 7 WINDOWS) start the X11 server

>>>>>

>>>>> (XMing XLaunch Icon on your desktop)

>>>>>

>>>>> 8 WINDOWS) run myaxiom from PowerShell

>>>>> (this should start axiom with graphics available)

>>>>>

>>>>> wsl myaxiom

>>>>>

>>>>> 8 WINDOWS) make a PowerShell desktop

>>>>>

>>>>> https://superuser.com/questions/886951/run-powershell-script-when-you= -open-powershell

>>>>>

>>>>> Tim

>>>>>

>>>>> On 8/13/21, Tim Daly <axiomcas@gmail.com> wrote:

>>>>>> A great deal of thought is directed toward making = the SANE version

>>>>>> of Axiom as flexible as possible, decoupling mecha= nism from theory.

>>>>>>

>>>>>> An interesting publication by Brian Cantwell Smith= [0], "Reflection

>>>>>> and Semantics in LISP" seems to contain inter= esting ideas related

>>>>>> to our goal. Of particular interest is the ability= to reason about

>>>>>> and

>>>>>> perform self-referential manipulations. In a depen= dently-typed

>>>>>> system it seems interesting to be able "adapt= " code to handle

>>>>>> run-time computed arguments to dependent functions= . The abstract:

>>>>>>

>>>>>>=C2=A0 =C2=A0 "We show how a computational sys= tem can be constructed to

>>>>>> "reason",

>>>>>> effectively

>>>>>>=C2=A0 =C2=A0 and consequentially, about its own in= ferential processes. The

>>>>>> analysis proceeds in two

>>>>>>=C2=A0 =C2=A0 parts. First, we consider the general= question of computational

>>>>>> semantics, rejecting

>>>>>>=C2=A0 =C2=A0 traditional approaches, and arguing t= hat the declarative and

>>>>>> procedural aspects of

>>>>>>=C2=A0 =C2=A0 computational symbols (what they stan= d for, and what behaviour

>>>>>> they

>>>>>> engender) should be

>>>>>>=C2=A0 =C2=A0 analysed independently, in order that= they may be coherently

>>>>>> related. Second, we

>>>>>>=C2=A0 =C2=A0 investigate self-referential behavior= in computational processes,

>>>>>> and show how to embed an

>>>>>>=C2=A0 =C2=A0 effective procedural model of a compu= tational calculus within that

>>>>>> calculus (a model not

>>>>>>=C2=A0 =C2=A0 unlike a meta-circular interpreter, b= ut connected to the

>>>>>> fundamental operations of the

>>>>>>=C2=A0 =C2=A0 machine in such a way as to provide, = at any point in a

>>>>>> computation,

>>>>>> fully articulated

>>>>>>=C2=A0 =C2=A0 descriptions of the state of that com= putation, for inspection and

>>>>>> possible modification). In

>>>>>>=C2=A0 =C2=A0 terms of the theories that result fro= m these investigations, we

>>>>>> present a general architecture

>>>>>>=C2=A0 =C2=A0 for procedurally reflective processes= , able to shift smoothly

>>>>>> between dealing with a given

>>>>>>=C2=A0 =C2=A0 subject domain, and dealing with thei= r own reasoning processes

>>>>>> over

>>>>>> that domain.

>>>>>>

>>>>>>=C2=A0 =C2=A0 An instance of the general solution i= s worked out in the context

>>>>>> of

>>>>>> an applicative

>>>>>>=C2=A0 =C2=A0 language. Specifically, we present th= ree successive dialects of

>>>>>> LISP: 1-LISP, a distillation of

>>>>>>=C2=A0 =C2=A0 current practice, for comparison purp= oses; 2-LISP, a dialect

>>>>>> constructed in terms of our

>>>>>>=C2=A0 =C2=A0 rationalised semantics, in which the = concept of evaluation is

>>>>>> rejected in favour of

>>>>>>=C2=A0 =C2=A0 independent notions of simplification= and reference, and in which

>>>>>> the respective categories

>>>>>>=C2=A0 =C2=A0 of notation, structure, semantics, an= d behaviour are strictly

>>>>>> aligned; and 3-LISP, an

>>>>>>=C2=A0 =C2=A0 extension of 2-LISP endowed with refl= ective powers."

>>>>>>

>>>>>> Axiom SANE builds dependent types on the fly. The = ability to access

>>>>>> both the refection

>>>>>> of the tower of algebra and the reflection of the = tower of proofs at

>>>>>> the time of construction

>>>>>> makes the construction of a new domain or specific= algorithm easier

>>>>>> and more general.

>>>>>>

>>>>>> This is of particular interest because one of the = efforts is to build

>>>>>> "all the way down to the

>>>>>> metal". If each layer is constructed on top o= f previous proven layers

>>>>>> and the new layer

>>>>>> can "reach below" to lower layers then t= he tower of layers can be

>>>>>> built without duplication.

>>>>>>

>>>>>> Tim

>>>>>>

>>>>>> [0], Smith, Brian Cantwell "Reflection and Se= mantics in LISP"

>>>>>> POPL '84: Proceedings of the 11th ACM SIGACT-S= IGPLAN

>>>>>> ymposium on Principles of programming languagesJan= uary 1

>>>>>> 984 Pages 23=E2=80=9335https://doi.org= /10.1145/800017.800513

>>>>>>

>>>>>> On 6/29/21, Tim Daly <axiomcas@gmail.com> wrote:

>>>>>>> Having spent time playing with hardware it is = perfectly clear that

>>>>>>> future computational mathematics efforts need = to adapt to using

>>>>>>> parallel processing.

>>>>>>>

>>>>>>> I've spent a fair bit of time thinking abo= ut structuring Axiom to

>>>>>>> be parallel. Most past efforts have tried to f= ocus on making a

>>>>>>> particular algorithm parallel, such as a matri= x multiply.

>>>>>>>

>>>>>>> But I think that it might be more effective to= make each domain

>>>>>>> run in parallel. A computation crosses multipl= e domains so a

>>>>>>> particular computation could involve multiple = parallel copies.

>>>>>>>

>>>>>>> For example, computing the Cylindrical Algebra= ic Decomposition

>>>>>>> could recursively decompose the plane. Indeed,= any tree-recursive

>>>>>>> algorithm could be run in parallel "in th= e large" by creating new

>>>>>>> running copies of the domain for each sub-prob= lem.

>>>>>>>

>>>>>>> So the question becomes, how does one manage t= his?

>>>>>>>

>>>>>>> A similar problem occurs in robotics where one= could have multiple

>>>>>>> wheels, arms, propellers, etc. that need to ac= t independently but

>>>>>>> in coordination.

>>>>>>>

>>>>>>> The robot solution uses ROS2. The three ideas = are ROSCORE,

>>>>>>> TOPICS with publish/subscribe, and SERVICES wi= th request/response.

>>>>>>> These are communication paths defined between = processes.

>>>>>>>

>>>>>>> ROS2 has a "roscore" which is basica= lly a phonebook of "topics".

>>>>>>> Any process can create or look up the current = active topics. eq:

>>>>>>>

>>>>>>>=C2=A0 =C2=A0 rosnode list

>>>>>>>

>>>>>>> TOPICS:

>>>>>>>

>>>>>>> Any process can PUBLISH a topic (which is basi= cally a typed data

>>>>>>> structure), e.g the topic /hw with the String = data "Hello World".

>>>>>>> eg:

>>>>>>>

>>>>>>>=C2=A0 =C2=A0 rostopic pub /hw std_msgs/String = "Hello, World"

>>>>>>>

>>>>>>> Any process can SUBSCRIBE to a topic, such as = /hw, and get a

>>>>>>> copy of the data.=C2=A0 eg:

>>>>>>>

>>>>>>>=C2=A0 =C2=A0 rostopic echo /hw=C2=A0 =C2=A0=3D= =3D> "Hello, World"

>>>>>>>

>>>>>>> Publishers talk, subscribers listen.

>>>>>>>

>>>>>>>

>>>>>>> SERVICES:

>>>>>>>

>>>>>>> Any process can make a REQUEST of a SERVICE an= d get a RESPONSE.

>>>>>>> This is basically a remote function call.

>>>>>>>

>>>>>>>

>>>>>>>

>>>>>>> Axiom in parallel?

>>>>>>>

>>>>>>> So domains could run, each in its own process.= It could provide

>>>>>>> services, one for each function. Any other pro= cess could request

>>>>>>> a computation and get the result as a response= . Domains could

>>>>>>> request services from other domains, either wa= iting for responses

>>>>>>> or continuing while the response is being comp= uted.

>>>>>>>

>>>>>>> The output could be sent anywhere, to a termin= al, to a browser,

>>>>>>> to a network, or to another process using the = publish/subscribe

>>>>>>> protocol, potentially all at the same time sin= ce there can be many

>>>>>>> subscribers to a topic.

>>>>>>>

>>>>>>> Available domains could be dynamically added b= y announcing

>>>>>>> themselves as new "topics" and could= be dynamically looked-up

>>>>>>> at runtime.

>>>>>>>

>>>>>>> This structure allows function-level / domain-= level parallelism.

>>>>>>> It is very effective in the robot world and I = think it might be a

>>>>>>> good structuring mechanism to allow computatio= nal mathematics

>>>>>>> to take advantage of multiple processors in a = disciplined fashion.

>>>>>>>

>>>>>>> Axiom has a thousand domains and each could ru= n on its own core.

>>>>>>>

>>>>>>> In addition. notice that each domain is indepe= ndent of the others.

>>>>>>> So if we want to use BLAS Fortran code, it cou= ld just be another

>>>>>>> service node. In fact, any "foreign funct= ion" could transparently

>>>>>>> cooperate in a distributed Axiom.

>>>>>>>

>>>>>>> Another key feature is that proofs can be &quo= t;by node".

>>>>>>>

>>>>>>> Tim

>>>>>>>

>>>>>>>

>>>>>>>

>>>>>>>

>>>>>>> On 6/5/21, Tim Daly <axiomcas@gmail.com> wrote:

>>>>>>>> Axiom is based on first-class dependent ty= pes. Deciding when

>>>>>>>> two types are equivalent may involve compu= tation. See

>>>>>>>> Christiansen, David Thrane "Checking = Dependent Types with

>>>>>>>> Normalization by Evaluation" (2019)>>>>>>>>

>>>>>>>> This puts an interesting constraint on bui= lding types. The

>>>>>>>> constructed types has to export a function= to decide if a

>>>>>>>> given type is "equivalent" to it= self.

>>>>>>>>

>>>>>>>> The notion of "equivalence" migh= t involve category ideas

>>>>>>>> of natural transformation and univalence. = Sigh.

>>>>>>>>

>>>>>>>> That's an interesting design point.

>>>>>>>>

>>>>>>>> Tim

>>>>>>>>

>>>>>>>>

>>>>>>>> On 5/5/21, Tim Daly <axiomcas@gmail.com> wrote:

>>>>>>>>> It is interesting that programmer'= s eyes and expectations adapt

>>>>>>>>> to the tools they use. For instance, I= use emacs and expect to

>>>>>>>>> work directly in files and multiple bu= ffers. When I try to use one

>>>>>>>>> of the many IDE tools I find they tend= to "get in the way". I

>>>>>>>>> already

>>>>>>>>> know or can quickly find whatever they= try to tell me. If you use

>>>>>>>>> an

>>>>>>>>> IDE you probably find emacs "too = sparse" for programming.

>>>>>>>>>

>>>>>>>>> Recently I've been working in a sp= arse programming environment.

>>>>>>>>> I'm exploring the question of runn= ing a proof checker in an FPGA.

>>>>>>>>> The FPGA development tools are painful= at best and not intuitive

>>>>>>>>> since you SEEM to be programming but y= ou're actually describing

>>>>>>>>> hardware gates, connections, and timin= g. This is an environment

>>>>>>>>> where everything happens all-at-once a= nd all-the-time (like the

>>>>>>>>> circuits in your computer). It is the = "assembly language of

>>>>>>>>> circuits".

>>>>>>>>> Naturally, my eyes have adapted to thi= s rather raw level.

>>>>>>>>>

>>>>>>>>> That said, I'm normally doing lite= rate programming all the time.

>>>>>>>>> My typical file is a document which is= a mixture of latex and

>>>>>>>>> lisp.

>>>>>>>>> It is something of a shock to return t= o that world. It is clear

>>>>>>>>> why

>>>>>>>>> people who program in Python find lisp= to be a "sea of parens".

>>>>>>>>> Yet as a lisp programmer, I don't = even see the parens, just code.

>>>>>>>>>

>>>>>>>>> It takes a few minutes in a literate d= ocument to adapt vision to

>>>>>>>>> see the latex / lisp combination as na= tural. The latex markup,

>>>>>>>>> like the lisp parens, eventually just = disappears. What remains

>>>>>>>>> is just lisp and natural language text= .

>>>>>>>>>

>>>>>>>>> This seems painful at first but eyes q= uickly adapt. The upside

>>>>>>>>> is that there is always a "finish= ed" document that describes the

>>>>>>>>> state of the code. The overhead of wri= ting a paragraph to

>>>>>>>>> describe a new function or change a pa= ragraph to describe the

>>>>>>>>> changed function is very small.

>>>>>>>>>

>>>>>>>>> Using a Makefile I latex the document = to generate a current PDF

>>>>>>>>> and then I extract, load, and execute = the code. This loop catches

>>>>>>>>> errors in both the latex and the sourc= e code. Keeping an open file

>>>>>>>>> in

>>>>>>>>> my pdf viewer shows all of the changes= in the document after every

>>>>>>>>> run of make. That way I can edit the b= ook as easily as the code.

>>>>>>>>>

>>>>>>>>> Ultimately I find that writing the boo= k while writing the code is

>>>>>>>>> more productive. I don't have to r= emember why I wrote something

>>>>>>>>> since the explanation is already there= .

>>>>>>>>>

>>>>>>>>> We all have our own way of programming= and our own tools.

>>>>>>>>> But I find literate programming to be = a real advance over IDE

>>>>>>>>> style programming and "raw code&q= uot; programming.

>>>>>>>>>

>>>>>>>>> Tim

>>>>>>>>>

>>>>>>>>>

>>>>>>>>> On 2/27/21, Tim Daly <axiomcas@gmail.com> wrote= :

>>>>>>>>>> The systems I use have the interes= ting property of

>>>>>>>>>> "Living within the compiler&q= uot;.

>>>>>>>>>>

>>>>>>>>>> Lisp, Forth, Emacs, and other syst= ems that present themselves

>>>>>>>>>> through the Read-Eval-Print-Loop (= REPL) allow the

>>>>>>>>>> ability to deeply interact with th= e system, shaping it to your

>>>>>>>>>> need.

>>>>>>>>>>

>>>>>>>>>> My current thread of study is soft= ware architecture. See

>>>>>>>>>> https://www.youtube.com/watch?v=3DW2hagw1VhhI&feature=3Dyoutu.= be

>>>>>>>>>> and https://www.geor= gefairbanks.com/videos/

>>>>>>>>>>

>>>>>>>>>> My current thinking on SANE involv= es the ability to

>>>>>>>>>> dynamically define categories, rep= resentations, and functions

>>>>>>>>>> along with "composition funct= ions" that permits choosing a

>>>>>>>>>> combination at the time of use.

>>>>>>>>>>

>>>>>>>>>> You might want a domain for handli= ng polynomials. There are

>>>>>>>>>> a lot of choices, depending on you= r use case. You might want

>>>>>>>>>> different representations. For exa= mple, you might want dense,

>>>>>>>>>> sparse, recursive, or "machin= e compatible fixnums" (e.g. to

>>>>>>>>>> interface with C code). If these d= on't exist it ought to be

>>>>>>>>>> possible

>>>>>>>>>> to create them. Such "lego-li= ke" building blocks require careful

>>>>>>>>>> thought about creating "fully= factored" objects.

>>>>>>>>>>

>>>>>>>>>> Given that goal, the traditional b= arrier of "compiler" vs

>>>>>>>>>> "interpreter"

>>>>>>>>>> does not seem useful. It is better= to "live within the compiler"

>>>>>>>>>> which

>>>>>>>>>> gives the ability to define new th= ings "on the fly".

>>>>>>>>>>

>>>>>>>>>> Of course, the SANE compiler is go= ing to want an associated

>>>>>>>>>> proof of the functions you create = along with the other parts

>>>>>>>>>> such as its category hierarchy and= representation properties.

>>>>>>>>>>

>>>>>>>>>> There is no such thing as a simple= job. :-)

>>>>>>>>>>

>>>>>>>>>> Tim

>>>>>>>>>>

>>>>>>>>>>

>>>>>>>>>> On 2/18/21, Tim Daly <axiomcas@gmail.com>= wrote:

>>>>>>>>>>> The Axiom SANE compiler / inte= rpreter has a few design points.

>>>>>>>>>>>

>>>>>>>>>>> 1) It needs to mix interpreted= and compiled code in the same

>>>>>>>>>>> function.

>>>>>>>>>>> SANE allows dynamic constructi= on of code as well as dynamic type

>>>>>>>>>>> construction at runtime. Both = of these can occur in a runtime

>>>>>>>>>>> object.

>>>>>>>>>>> So there is potentially a mixt= ure of interpreted and compiled

>>>>>>>>>>> code.

>>>>>>>>>>>

>>>>>>>>>>> 2) It needs to perform type re= solution at compile time without

>>>>>>>>>>> overhead

>>>>>>>>>>> where possible. Since this is = not always possible there needs to

>>>>>>>>>>> be

>>>>>>>>>>> a "prefix thunk" tha= t will perform the resolution. Trivially,

>>>>>>>>>>> for

>>>>>>>>>>> example,

>>>>>>>>>>> if we have a + function we nee= d to type-resolve the arguments.

>>>>>>>>>>>

>>>>>>>>>>> However, if we can prove at co= mpile time that the types are both

>>>>>>>>>>> bounded-NNI and the result is = bounded-NNI (i.e. fixnum in lisp)

>>>>>>>>>>> then we can inline a call to += at runtime. If not, we might have

>>>>>>>>>>> + applied to NNI and POLY(FLOA= T), which requires a thunk to

>>>>>>>>>>> resolve types. The thunk could= even "specialize and compile"

>>>>>>>>>>> the code before executing it.<= br> >>>>>>>>>>>

>>>>>>>>>>> It turns out that the Forth im= plementation of

>>>>>>>>>>> "threaded-interpreted&quo= t;

>>>>>>>>>>> languages model provides an ef= ficient and effective way to do

>>>>>>>>>>> this.[0]

>>>>>>>>>>> Type resolution can be "i= nserted" in intermediate thunks.

>>>>>>>>>>> The model also supports dynami= c overloading and tail recursion.

>>>>>>>>>>>

>>>>>>>>>>> Combining high-level CLOS code= with low-level threading gives an

>>>>>>>>>>> easy to understand and robust = design.

>>>>>>>>>>>

>>>>>>>>>>> Tim

>>>>>>>>>>>

>>>>>>>>>>> [0] Loeliger, R.G. "Threa= ded Interpretive Languages" (1981)

>>>>>>>>>>> ISBN 0-07-038360-X

>>>>>>>>>>>

>>>>>>>>>>>

>>>>>>>>>>>

>>>>>>>>>>>

>>>>>>>>>>> On 2/5/21, Tim Daly <axiomcas@gmail.com>= ; wrote:

>>>>>>>>>>>> I've worked hard to ma= ke Axiom depend on almost no other

>>>>>>>>>>>> tools so that it would not= get caught by "code rot" of

>>>>>>>>>>>> libraries.

>>>>>>>>>>>>

>>>>>>>>>>>> However, I'm also tryi= ng to make the new SANE version much

>>>>>>>>>>>> easier to understand and d= ebug.To that end I've been

>>>>>>>>>>>> experimenting

>>>>>>>>>>>> with some ideas.

>>>>>>>>>>>>

>>>>>>>>>>>> It should be possible to v= iew source code, of course. But the

>>>>>>>>>>>> source

>>>>>>>>>>>> code is not the only, nor = possibly the best, representation of

>>>>>>>>>>>> the

>>>>>>>>>>>> ideas.

>>>>>>>>>>>> In particular, source code= gets compiled into data structures.

>>>>>>>>>>>> In

>>>>>>>>>>>> Axiom

>>>>>>>>>>>> these data structures real= ly are a graph of related structures.

>>>>>>>>>>>>

>>>>>>>>>>>> For example, looking at th= e gcd function from NNI, there is the

>>>>>>>>>>>> representation of the gcd = function itself. But there is also a

>>>>>>>>>>>> structure

>>>>>>>>>>>> that is the REP (and, in t= he new system, is separate from the

>>>>>>>>>>>> domain).

>>>>>>>>>>>>

>>>>>>>>>>>> Further, there are associa= ted specification and proof

>>>>>>>>>>>> structures.

>>>>>>>>>>>> Even

>>>>>>>>>>>> further, the domain inheri= ts the category structures, and from

>>>>>>>>>>>> those

>>>>>>>>>>>> it

>>>>>>>>>>>> inherits logical axioms an= d definitions through the proof

>>>>>>>>>>>> structure.

>>>>>>>>>>>>

>>>>>>>>>>>> Clearly the gcd function i= s a node in a much larger graph

>>>>>>>>>>>> structure.

>>>>>>>>>>>>

>>>>>>>>>>>> When trying to decide why = code won't compile it would be useful

>>>>>>>>>>>> to

>>>>>>>>>>>> be able to see and walk th= ese structures. I've thought about

>>>>>>>>>>>> using

>>>>>>>>>>>> the

>>>>>>>>>>>> browser but browsers are t= oo weak. Either everything has to be

>>>>>>>>>>>> "in

>>>>>>>>>>>> a

>>>>>>>>>>>> single tab to show the gra= ph" or "the nodes of the graph are in

>>>>>>>>>>>> different

>>>>>>>>>>>> tabs". Plus, construc= ting dynamic graphs that change as the

>>>>>>>>>>>> software

>>>>>>>>>>>> changes (e.g. by loading a= new spad file or creating a new

>>>>>>>>>>>> function)

>>>>>>>>>>>> represents the huge proble= m of keeping the browser "in sync

>>>>>>>>>>>> with

>>>>>>>>>>>> the

>>>>>>>>>>>> Axiom workspace". So = something more dynamic and embedded is

>>>>>>>>>>>> needed.

>>>>>>>>>>>>

>>>>>>>>>>>> Axiom source gets compiled= into CLOS data structures. Each of

>>>>>>>>>>>> these

>>>>>>>>>>>> new SANE structures has an= associated surface representation,

>>>>>>>>>>>> so

>>>>>>>>>>>> they

>>>>>>>>>>>> can be presented in user-f= riendly form.

>>>>>>>>>>>>

>>>>>>>>>>>> Also, since Axiom is liter= ate software, it should be possible

>>>>>>>>>>>> to

>>>>>>>>>>>> look

>>>>>>>>>>>> at

>>>>>>>>>>>> the code in its literate f= orm with the surrounding explanation.

>>>>>>>>>>>>

>>>>>>>>>>>> Essentially we'd like = to have the ability to "deep dive" into

>>>>>>>>>>>> the

>>>>>>>>>>>> Axiom

>>>>>>>>>>>> workspace, not only for de= bugging, but also for understanding

>>>>>>>>>>>> what

>>>>>>>>>>>> functions are used, where = they come from, what they inherit,

>>>>>>>>>>>> and

>>>>>>>>>>>> how they are used in a com= putation.

>>>>>>>>>>>>

>>>>>>>>>>>> To that end I'm lookin= g at using McClim, a lisp windowing

>>>>>>>>>>>> system.

>>>>>>>>>>>> Since the McClim windows w= ould be part of the lisp image, they

>>>>>>>>>>>> have

>>>>>>>>>>>> access to display (and mod= ify) the Axiom workspace at all

>>>>>>>>>>>> times.

>>>>>>>>>>>>

>>>>>>>>>>>> The only hesitation is tha= t McClim uses quicklisp and drags in

>>>>>>>>>>>> a

>>>>>>>>>>>> lot

>>>>>>>>>>>> of other subsystems. It= 9;s all lisp, of course.

>>>>>>>>>>>>

>>>>>>>>>>>> These ideas aren't new= . They were available on Symbolics

>>>>>>>>>>>> machines,

>>>>>>>>>>>> a truly productive platfor= m and one I sorely miss.

>>>>>>>>>>>>

>>>>>>>>>>>> Tim

>>>>>>>>>>>>

>>>>>>>>>>>>

>>>>>>>>>>>>

>>>>>>>>>>>> On 1/19/21, Tim Daly <<= a href=3D"mailto:axiomcas@gmail.com" target=3D"_blank">axiomcas@gmail.com> wrote:

>>>>>>>>>>>>> Also of interest is th= e talk

>>>>>>>>>>>>> "The Unreasonable= Effectiveness of Dynamic Typing for

>>>>>>>>>>>>> Practical

>>>>>>>>>>>>> Programs"

>>>>>>>>>>>>> https://vimeo.com/743= 54480

>>>>>>>>>>>>> which questions whethe= r static typing really has any benefit.

>>>>>>>>>>>>>

>>>>>>>>>>>>> Tim

>>>>>>>>>>>>>

>>>>>>>>>>>>>

>>>>>>>>>>>>> On 1/19/21, Tim Daly &= lt;axiomcas@gmail.c= om> wrote:

>>>>>>>>>>>>>> Peter Naur wrote a= n article of interest:

>>>>>>>>>>>>>> htt= p://pages.cs.wisc.edu/~remzi/Naur.pdf

>>>>>>>>>>>>>>

>>>>>>>>>>>>>> In particular, it = mirrors my notion that Axiom needs

>>>>>>>>>>>>>> to embrace literat= e programming so that the "theory

>>>>>>>>>>>>>> of the problem&quo= t; is presented as well as the "theory

>>>>>>>>>>>>>> of the solution&qu= ot;. I quote the introduction:

>>>>>>>>>>>>>>

>>>>>>>>>>>>>>

>>>>>>>>>>>>>>

>>>>>>>>>>>>>> This article is, t= o my mind, the most accurate account

>>>>>>>>>>>>>> of what goes on in= designing and coding a program.

>>>>>>>>>>>>>> I refer to it regu= larly when discussing how much

>>>>>>>>>>>>>> documentation to c= reate, how to pass along tacit

>>>>>>>>>>>>>> knowledge, and the= value of the XP's metaphor-setting

>>>>>>>>>>>>>> exercise. It also = provides a way to examine a methodolgy's

>>>>>>>>>>>>>> economic structure= .

>>>>>>>>>>>>>>

>>>>>>>>>>>>>> In the article, wh= ich follows, note that the quality of the

>>>>>>>>>>>>>> designing programm= er's work is related to the quality of

>>>>>>>>>>>>>> the match between = his theory of the problem and his theory

>>>>>>>>>>>>>> of the solution. N= ote that the quality of a later

>>>>>>>>>>>>>> programmer's>>>>>>>>>>>>>> work is related to= the match between his theories and the

>>>>>>>>>>>>>> previous programme= r's theories.

>>>>>>>>>>>>>>

>>>>>>>>>>>>>> Using Naur's i= deas, the designer's job is not to pass along

>>>>>>>>>>>>>> "the design&q= uot; but to pass along "the theories" driving the

>>>>>>>>>>>>>> design.

>>>>>>>>>>>>>> The latter goal is= more useful and more appropriate. It also

>>>>>>>>>>>>>> highlights that kn= owledge of the theory is tacit in the

>>>>>>>>>>>>>> owning,

>>>>>>>>>>>>>> and

>>>>>>>>>>>>>> so passing along t= he thoery requires passing along both

>>>>>>>>>>>>>> explicit

>>>>>>>>>>>>>> and tacit knowledg= e.

>>>>>>>>>>>>>>

>>>>>>>>>>>>>> Tim

>>>>>>>>>>>>>>

>>>>>>>>>>>>>

>>>>>>>>>>>>

>>>>>>>>>>>

>>>>>>>>>>

>>>>>>>>>

>>>>>>>>

>>>>>>>

>>>>>>

>>>>>

>>>>

>>>

>>

>