Skip to content

Commit

Permalink
reorganized documentation library
Browse files Browse the repository at this point in the history
  • Loading branch information
chakravala committed Dec 14, 2019
1 parent 673566b commit 0b4b83c
Show file tree
Hide file tree
Showing 10 changed files with 250 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ jobs:
julia: 1.3
os: linux
script:
- julia --project=docs/ -e 'using Pkg; Pkg.add("Documenter"); Pkg.develop(PackageSpec(path=pwd()))'
- julia --project=docs/ -e 'using Pkg; Pkg.add("Documenter"); Pkg.add("DirectSum"); Pkg.add("AbstractTensors"); Pkg.develop(PackageSpec(path=pwd()))'
- julia --project=docs/ docs/make.jl
after_success: skip
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ This `Grassmann` package for the Julia language was created by [github.com/chakr
These projects and repositories were started entirely independently and are available as free software to help spread the ideas to a wider audience.
Please consider donating to show your thanks and appreciation to this project at [liberapay](https://liberapay.com/chakravala), [GitHub Sponsors](https://github.com/sponsors/chakravala), [Patreon](https://patreon.com/dreamscatter), [Tidelift](https://tidelift.com/funding/github/julia/Grassmann), [Bandcamp](https://music.crucialflow.com) or contribute (documentation, tests, examples) in the repositories.

* [Design, code generation](#design-code-generation)
* [TensorAlgebra design, Manifold code generation](#tensoralgebra-design-manifold-code-generation)
* [Requirements](#requirements)
* [Grassmann for enterprise](#grassmann-for-enterprise)
* [Direct-sum yields VectorBundle parametric type polymorphism ⨁](#direct-sum-yields-vectorspace-parametric-type-polymorphism-)
Expand All @@ -39,7 +39,7 @@ Please consider donating to show your thanks and appreciation to this project at
* [Approaching ∞ dimensions with SparseAlgebra and ExtendedAlgebra](#approaching--dimensions-with-sparsealgebra-and-extendedalgebra)
* [References](#references)

#### Design, code generation
#### `TensorAlgebra` design, `Manifold` code generation

Mathematical foundations and definitions specific to the [Grassmann.jl](https://github.com/chakravala/Grassmann.jl) implementation provide an extensible platform for computing with geometric algebra at high dimensions, along with the accompanying support packages.
The design is based on the `TensorAlgebra` abstract type interoperability from [AbstractTensors.jl](https://github.com/chakravala/AbstractTensors.jl) with a `VectorBundle` parameter from [DirectSum.jl](https://github.com/chakravala/DirectSum.jl).
Expand All @@ -61,6 +61,12 @@ streamplot(vectorfield(exp((π/4)*(v12+v∞3)),V(2,3,4),V(1,2,3)),-1.5..1.5,-1.5
```
![paper/img/wave.png](paper/img/wave.png)

Thus, computations involving fully general rotational algebras and Lie bivector groups are possible with a full trigonometric suite.
Conformal geometric algebra is possible with the Minkowski plane, based on the null-basis.
In general, multivalued quantum logic is enabled by the `∧,∨,⋆` Grassmann lattice.
Mixed-symmetry algebra with *Leibniz.jl* and *Grassmann.jl*, having the geometric algebraic product chain rule, yields automatic differentiation and Hodge-DeRahm co/homology as unveiled by Grassmann.
Most importantly, the Dirac-Clifford product yields generalized Hodge-Laplacian and the Betti numbers with Euler characteristic `χ`.

The *Grassmann.jl* package and its accompanying support packages provide an extensible platform for high performance computing with geometric algebra at high dimensions.
This enables the usage of many different types of `TensorAlgebra` along with various `VectorBundle` parameters and interoperability for a wide range of scientific and research applications.

Expand Down
6 changes: 3 additions & 3 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# This file is part of Grassmann.jl. It is licensed under the GPL license
# Grassmann Copyright (C) 2019 Michael Reed

using Documenter, Grassmann
using Documenter, DirectSum, AbstractTensors, Grassmann

makedocs(
# options
modules = [Grassmann],
modules = [DirectSum,AbstractTensors,Grassmann],
doctest = false,
format = Documenter.HTML(prettyurls = get(ENV, "CI", nothing) == "true"),
sitename = "Grassmann.jl",
Expand All @@ -19,7 +19,7 @@ makedocs(
"tutorials/install.md",
"tutorials/quick-start.md",
"tutorials/algebra-of-space.md",
"tutorials/forms.md"
"tutorials/mixed-tensors.md"
],
"References" => "references.md"
]
Expand Down
6 changes: 3 additions & 3 deletions docs/src/algebra.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ julia> using Grassmann; @basis ℝ'⊕ℝ^3 # equivalent to basis"-+++"
(⟨-+++⟩, v, v₁, v₂, v₃, v₄, v₁₂, v₁₃, v₁₄, v₂₃, v₂₄, v₃₄, v₁₂₃, v₁₂₄, v₁₃₄, v₂₃₄, v₁₂₃₄)
```
As a result of this macro, all of the `Basis{V,G}` elements generated by that `VectorBundle` become available in the local workspace with the specified naming.
The first argument provides signature specifications, the second argument is the variable name for the `VectorBundle`, and the third and fourth argument are the the prefixes of the `Basis` vector names (and covector basis names). By default, `V` is assigned the `VectorBundle` and `v` is the prefix for the `Basis` elements.
The first argument provides signature specifications, the second argument is the variable name for the `VectorBundle`, and the third and fourth argument are prefixes of the `Basis` vector names (and covector basis names). By default, `V` is assigned the `VectorBundle` and `v` is the prefix for the `Basis` elements.
```Julia
julia> V # Minkowski spacetime
-+++
Expand Down Expand Up @@ -129,7 +129,7 @@ julia> log(i)
```
The parametric type formalism in `Grassmann` is highly expressive to enable the pre-allocation of geometric algebra computations for specific sparse-subalgebras, including the representation of rotational groups, Lie bivector algebras, and affine projective geometry.

Together with [LightGraphs,jl](https://github.com/JuliaGraphs/LightGraphs.jl), [GraphPlot.jl](https://github.com/JuliaGraphs/GraphPlot.jl), [Cairo.jl](https://github.com/JuliaGraphics/Cairo.jl), [Compose.jl](https://github.com/GiovineItalia/Compose.jl) it is possible to convert `Grassmann` numbers into graphs.
With [LightGraphs,jl](https://github.com/JuliaGraphs/LightGraphs.jl), [GraphPlot.jl](https://github.com/JuliaGraphs/GraphPlot.jl), [Cairo.jl](https://github.com/JuliaGraphics/Cairo.jl), [Compose.jl](https://github.com/GiovineItalia/Compose.jl) it is possible to convert `Grassmann` numbers into graphs.
```Julia
using Grassmann, Compose # environment: LightGraphs, GraphPlot
x = Grassmann.Algebra(ℝ^7).v123
Expand Down Expand Up @@ -343,7 +343,7 @@ Grassmann.generate_algebra(:AbstractAlgebra,:SetElem)
```
where `:SetElem` is the desired scalar field and `:AbstractAlgebra` is the scope which contains the scalar field.

With the usage of `Requires`, symbolic scalar computation with [Reduce.jl](https://github.com/chakravala/Reduce.jl) and other packages is automatically enabled, e.g.
With the usage of `Requires`, symbolic scalar computation with [Reduce.jl](https://github.com/chakravala/Reduce.jl) and other packages is automatically enabled,
```Julia
julia> using Reduce, Grassmann
Reduce (Free CSL version, revision 4590), 11-May-18 ...
Expand Down
8 changes: 7 additions & 1 deletion docs/src/design.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Grassmann.jl design and code generation
# `TensorAlgebra` design, `Manifold` code generation

Mathematical foundations and definitions specific to the [Grassmann.jl](https://github.com/chakravala/Grassmann.jl) implementation provide an extensible platform for computing with geometric algebra at high dimensions, along with the accompanying support packages.
The design is based on the `TensorAlgebra` abstract type interoperability from [AbstractTensors.jl](https://github.com/chakravala/AbstractTensors.jl) with a `VectorBundle` parameter from [DirectSum.jl](https://github.com/chakravala/DirectSum.jl).
Expand All @@ -16,6 +16,12 @@ Mathematics of `Grassmann` can be used to study unitary groups used in quantum c
Applicability of the Grassmann computational package not only maps to quantum computing, but has the potential of impacting countless other engineering and scientific computing applications.
It can be used to work with automatic differentiation and differential geometry, algebraic forms and invariant theory, electric circuits and wave scattering, spacetime geometry and relativity, computer graphics and photogrammetry, and much more.

Thus, computations involving fully general rotational algebras and Lie bivector groups are possible with a full trigonometric suite.
Conformal geometric algebra is possible with the Minkowski plane ``v_{\infty\emptyset}``, based on the null-basis.
In general, multivalued quantum logic is enabled by the ``\wedge,\vee,\star`` Grassmann lattice.
Mixed-symmetry algebra with *Leibniz.jl* and *Grassmann.jl*, having the geometric algebraic product chain rule, yields automatic differentiation and Hodge-DeRahm co/homology as unveiled by Grassmann.
Most importantly, the Dirac-Clifford product yields generalized Hodge-Laplacian and the Betti numbers with Euler characteristic `χ`.

Due to the abstract generality of the product algebra code generation, it is possible to extend the `Grassmann` library to include additional high performance products with few extra definitions.
Operations on ultra-sparse representations for very high dimensional algebras will be gaining further performance enhancements in future updates, along with hybrid optimizations for low-dimensional algebra code generation.
Thanks to the design of the product algebra code generation, any additional optimizations to the type stability will automatically enhance all the different products simultaneously.
Expand Down
6 changes: 3 additions & 3 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@

The [Grassmann.jl](https://github.com/chakravala/Grassmann.jl) package provides tools for doing computations based on multi-linear algebra, differential geometry, and spin groups using the extended tensor algebra known as Leibniz-Grassmann-Clifford-Hestenes geometric algebra.
Combinatorial products include `∧, ∨, ⋅, *, ⋆, ', ~, d, ∂` (which are the exterior, regressive, inner, and geometric products; along with the Hodge star, adjoint, reversal, differential and boundary operators).
The kernelized operations are built up from composite sparse tensor products and Hodge duality, with high dimensional support for up to 62 indices using staged caching and precompilation. Code generation enables concise yet highly extensible definitions.
The [DirectSum.jl](https://github.com/chakravala/DirectSum.jl) multivector parametric type polymorphism is based on tangent bundle vector spaces and conformal projective geometry to make the dispatch highly extensible for many applications.
Additionally, the universal interoperability between different sub-algebras is enabled by [AbstractTensors.jl](https://github.com/chakravala/AbstractTensors.jl), on which the type system is built.
Kernelized operations are built up from composite sparse tensor products and Hodge duality, with high dimensional support for up to 62 indices using staged caching and precompilation. Code generation enables concise yet highly extensible definitions.
[DirectSum.jl](https://github.com/chakravala/DirectSum.jl) multivector parametric type polymorphism is based on tangent bundle vector spaces and conformal projective geometry to make the dispatch highly extensible for many applications.
Additionally, universal interoperability between different sub-algebras is enabled by [AbstractTensors.jl](https://github.com/chakravala/AbstractTensors.jl), on which the type system is built.

```@contents
Pages = ["index.md","design.md","algebra.md","library.md","references.md"]
Expand Down
214 changes: 213 additions & 1 deletion docs/src/library.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Grassmann.jl Library

```@contents
Pages = ["index.md","library.md"]
Pages = ["index.md","design.md","algebra.md","library.md","references.md"]
```

## Index
Expand All @@ -10,8 +10,184 @@ Pages = ["index.md","library.md"]
Pages = ["library.md"]
```

## DirectSum Interface

```@docs
DirectSum.Manifold
```

```@docs
DirectSum.VectorBundle
```

```@docs
DirectSum.Signature
```

```@docs
DirectSum.DiagonalForm
```

```@docs
DirectSum.SubManifold
```

```@docs
DirectSum.vectorspace
```

```@docs
DirectSum.diagonalform
```

```@docs
DirectSum.var"@V_str"
```

```@docs
DirectSum.var"@S_str"
```

```@docs
DirectSum.var"@D_str"
```

```@docs
DirectSum.value
```

```@docs
DirectSum.grade
```

```@docs
DirectSum.tangent
```

```@docs
DirectSum.indices
```

```@docs
DirectSum.printindices
```

```@docs
DirectSum.printlabel
```

```@docs
DirectSum.indexstring
```

```@docs
DirectSum.indexsymbol
```

```@docs
DirectSum.:⊕
```

## AbstractTensors Interface

```@docs
AbstractTensors.TensorAlgebra
```

```@docs
AbstractTensors.interop
```

```@docs
AbstractTensors.interform
```

## Grassmann Interface

```@docs
Grassmann.TensorGraded
```

```@docs
Grassmann.TensorTerm
```

```@docs
Grassmann.TensorMixed
```

```@docs
Grassmann.Basis
```

```@docs
Grassmann.Simplex
```

```@docs
Grassmann.Chain
```

```@docs
Grassmann.MultiVector
```

```@docs
Grasmann.SparseChain
```

```@docs
Grassmann.MultiGrade
```

```@docs
Grassmann.valuetype
```

```@docs
Grassmann.basis
```

```@docs
Grassmann.order
```

```@docs
Grassmann.χ
```

```@docs
Grassmann.gdims
```

```@docs
Grassmann.betti
```

```@docs
Grassmann.scalar
```

```@docs
Grassmann.vector
```

```@docs
Grassmann.volume
```

```@docs
Grassmann.isscalar
```

```@docs
Grassmann.angular
```

```@docs
Grassmann.radial
```

```@docs
Grassmann.complementrighthodge
```
Expand All @@ -20,6 +196,14 @@ Grassmann.complementrighthodge
Grassmann.complementlefthodge
```

```@docs
Grassmann.complementright
```

```@docs
Grassmann.complementleft
```

```@docs
Grassmann.reverse
```
Expand All @@ -28,6 +212,14 @@ Grassmann.reverse
Grassmann.involute
```

```@docs
Grassmann.:∗
```

```@docs
Grassmann.:⊛
```

```@docs
Grassmann.:∧
```
Expand All @@ -36,4 +228,24 @@ Grassmann.:∧
Grassmann.:∨
```

```@docs
Grassmann.contraction
```

```@docs
Grassmann.:⊙
```

```@docs
Grassmann.:⊠
```

```@docs
Grassmann.:⊘
```

```@docs
Grassmann.generate_algebra
```

etc, ...
4 changes: 2 additions & 2 deletions docs/src/tutorials/algebra-of-space.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ julia> basis"3"

Given a three dimensional GA with the orthonormal basis ``v_i\cdot v_j = \delta_{ij}``, the basis consists of scalars, three vectors, three bivectors, and a trivector.
```math
\{\underbrace{v}_{\mbox{scalar}},\qquad\underbrace{v_{1},v_{2},v_{3}}_{\mbox{vectors}},\qquad\underbrace{v_{12},v_{23},v_{13}}_{\mbox{bivectors}},\qquad\underbrace{v_{123}}_{\mbox{trivector}}\}
\{\underbrace{v}{\mbox{scalar}},\qquad\underbrace{v_1,v_2,v_3}{\mbox{vectors}},\qquad\underbrace{v_{12},v_{23},v_{13}}{\mbox{bivectors}},\qquad\underbrace{v_{123}}{\mbox{trivector}}\}
```
The `@basis` macro declares the algebra and assigns the `Basis` elements to local variables. The `Grassmann.Algebra` can also be assigned to `G3` as
```Julia
Expand Down Expand Up @@ -85,7 +85,7 @@ julia> A(1)
julia> A(2)
3v₁₂ + 0v₁₃ + 0v₂₃
```
Using the reversion and grade projection operators, we can define the magnitude of `A` as ``|A|^2 = \langle{\tilde A A\rangle``
Using the reversion and grade projection operators, we can define the magnitude of `A` as ``|A|^2 = \langle\tilde A A\rangle``
```Julia
julia> ~A*A
30 + 4v₁ + 12v₂ + 24v₃
Expand Down
Loading

2 comments on commit 0b4b83c

@chakravala
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request updated: JuliaRegistries/General/6697

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if Julia TagBot is installed, or can be done manually through the github interface, or via:

git tag -a v0.4.0 -m "<description of version>" 0b4b83c9232d3b4542496e8afe4a378ad07e7263
git push origin v0.4.0

Please sign in to comment.