Project

EarthSciAST

The EarthSciML Abstract Syntax Tree format: schema, operators, coupling, and five language bindings.

Contents

This is the documentation for the older version v0.15.1. For the latest release, see v0.17.0.

Closed examples of the canonical unit spelling

Lean module Esm.Units.CanonicalExamples, formal/Esm/Units/CanonicalExamples.lean at 86bed77c797f
Imports Esm.Units.Typeset

Tests, not properties: the theorems quantifying over all inputs are in Esm.Units.Canonical and Esm.Units.Typeset . Each example is checked by the kernel.

def factorsOf (s : String) : List Factor

The two-sided normal form of a unit string (empty when it does not parse).

Spellings that canonicalize alike

Rational exponents, %, kept symbols

No cancellation across the fraction bar

example source
example : canon "bogus^0*s" = "bogus^0*s"

A dropped symbol must still name a unit: bogus does not, so the string is left as written (and keeps failing to resolve).

The dimensionless spellings and unparseable strings

Typeset forms