WAT

WAT

Here I write down some syntax ideas for WAT - Writing And Typing, a programming language with a dependent type system that can very easily be parsed to the standard mathematical syntax you wouldd encounter in physics papers.

In the best case, the type both makes for an interesting mathematical structure (an $\infty$-topos?) or embeds in one (the point is that ist semantics should be easy understandable (“easy” from my POV at least)) and is expressive enough to formalize such structures.

In view of using it as starting point in Outline, one could first do the latter and then explain this aspect of WAT as primary semantic example.

What's a faithful model of (to-be) WAT?
You can start with almost any dependently typed language, even if parts are missing, if you label/deny using/rule out the potentially dangerous possibilites/implementations there. What's left is something simple and right.

So todo: Make a list of what you actually WANT1111!!! –> What's the smallest theory permitting a semantic model that has all the stuff I like?

Motivation

Summary

You must be able to express totally general mathematical spaces, points and funtions, get fully formal types and terms, while everyone who can read LaTeX must still be able to deduce what the code expresses. For Starters, type theory itself will be general/conservative and thus the project really lies in finding familar looking syntax for some Per-Marin-esc language (with Identity type??) and writing the parser into other systems.

Idea

If a scientist today writes a paper or Wiki entries, he must translate his notions (e.g. expressions like $H|\psi\rangle$ or $\sqrt{3}+1$, the later using literally 490 year old syntax) to formal code (e.g. '\sqrt{3}+1' in LaTeX). And when something needs to be simulated or evaluated on a computer, These notions must again be translate to some code in a general purpose programming language (e.g. 'sqrt(3)+1' in Python or MatLab).

Now we have this neat fact:

Beyond this fact, the purpose of WAT can be seen from two angles:

Thoughts and Specification

See Primitive notions . WAT

In view of applications as a language: The primitive notions should be those that will surely stay at the basis the ITT Topic. As tools, I'd like to add features that implement some of the Syntetic Diff Geo (Schreiber)

*In fact, a language with expressive type system like WAT necessarily let's one define data types that concretely contains the information for notions that are reprsented in another language. The data needed to plot a barchart can be expressed natively in WAT in some natural way (e.g. 'data bar = …' would be defined as lists of lists of some numbers or whatever) and the parser, tuned for some language, could infer not to ignore this object when translating the WAT code to a specified language such as MatLab (where bar is exactly translated into the syntactic Expression specifying the data that is Input for a bar-Chart there. Naturally, it would go to far to think about the capabilities of some languages to interact with other parts of the computational enviroment/internet.

Reference


Requirements

Notes on programming languages,

Dependent type theory

Haskell type system,

Martin-Löf type theory