-
-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Differential forms, chain rule, and automatic differentiation with mixedbasis #33
Comments
Indeed, the automatic symbolic differentiation is the final finishing feature I would like to add before finalizing the paper I am writing. Everything is already in place for AD and differential forms, I only need to implement a feature to detect the correct moment to apply the differential operator to the symbolic expression. Due to the abstract generality of the algebra, this requires careful design. You can see some examples on how to work with the Please consider donating at liberapay.org/chakravala if you want to support my work. This is a unique and novel computational implementation that has not been created or studied quite like this before. This is nearly a complete feature, for which I am currently designing the finishing touch for differential calculus with symbolic tensor fields. |
Alright, so I got the feature implemented now, need to register a new version of |
Thank you! I will definitely update and try it. Cheers! |
Thanks for your interest! Discrete Morse Theory is a new book I am interested in. |
It seems only available on ams.org. Do you prefer the electronic version or the print one? Drop me an email (lihongying17 @ google mail). Glad to support this project. :) |
Alright, so the functionality is designed around the concept of differential operators and tensor fields. julia> using Reduce, Grassmann # can also use SymPy or SymEngine, or others if setup
julia> @mixedbasis tangent(ℝ^2,3,2); # 2D space, 3rd order, 2 variables Here we load the 2D geometric algebra having 3rd order differentiability with respect to 2 variables. This gives us some new julia> ∂1 * (:(x1^2+x2^2)*ϵ2)
(2x1)∂₁ϵ²
julia> ∂1 * ans
2∂₁∂₁ϵ²
julia> ∂1 * ans
0vv Roughly speaking, multiplying a differential operator and a tensor field results in the application of that particular differential operator on the tensor field with respect to its indices. This feature is very new and hasn't been completely tested yet. It only correctly applies first order differential operators at the moment, so it will take a few more commits before it's fully correct. |
Repeating this example gives me an error:
I just download Julia 1.2, and installed the packages from GitHub. (And to be honest, I'm still trying to figure out the meaning of the output of |
Are you using the most recent commit from the master branch? with v0.4.1 of Grassmann? |
It is Grassmann 0.3. Here are the details of my installation. I'm not sure whether the way of installation matters.
|
My bad, I am still on v0.3.0 of Grassmann, got the version numbers mixed up in my head. Try using |
After But I met another error in trying the same example. I'm not quite confident in Julia, so please let me know if I can test other cases and provide more useful information. As far as I remember, I've never met this error in using Grassmann days until recent changes.
|
Are you sure you have If you don't have PS, I have registered and tagged v0.3.1 but it has not been merged into the registry yet. |
Really sorry. I do miss out
|
Higher order derivatives are also usable, although there is still a small bug with nested ones. julia> ∂12 * (:(x1^2*x2^2)*ϵ2)
(4 * x1 * x2)∂₁₂ϵ² You can also use |
What's "ϵ2" in the above examples? |
To clarify what the epsilons are, my differential geometric algebra is more complicated than just geometric algebra. The epsilon notation is a new notation I am using to help unify geometric algebra with differential geometry. Basically, the epsilon makes an element a differential form so that differential operators can act on it. By building the meaning of operator and tensor fields into the basis algebra, the overall usage should become more mathematically intuitive: julia> using Reduce,Grassmann
Reduce (Free CSL version, revision 5151), 02-Oct-19 ...
julia> @mixedbasis tangent(ℝ^2,3,2);
julia> (∂1+∂12) * (:(x1^2*x2^2)*ϵ1 + :(sin(x1))*ϵ2)
0.0 + (2 * x1 * x2 ^ 2)∂₁ϵ¹ + (cos(x1))∂₁ϵ² + (4 * x1 * x2)∂₁₂ϵ¹ Currently only linear operators are supported... nonlinear operators will be supported soon. |
Hi @chakravala,
In your JuliaCon paper, I noticed the statement "Mixed-symmetry algebra with
Leibniz.jl
andGrassmann.jl
, having the geometric algebraic product chain rule, yields automatic differ- entiation and...", and I found a related simple example in theREADME.md
file, section"Differential forms and Leibniz tangent algebra"
.Would you mind providing one or two concrete examples on symbolic differentiation using
Grassmann.jl
? For example, with respect to a rotor/versor, or a bivector.I'm thinking that the key part is about a proper setup of a
@mixedbasis tangent ...
. Am I right?I'm reading Chapter 8 of the book "Geometric Algebra for Computer Science", but there are just a few examples of basic functions. I would like to apply vector/multivector differentiation on some more functions, and verify my results.
I'm trying to differentiate a function like
\sum_i weight_i || V Bivector_0 /V \wedge v_i ||^2
with respect to the versorV
.Thank you!
The text was updated successfully, but these errors were encountered: