<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

// Structs for strong typing in a three dimensional real inner product space
// and its Grassmann algebra.
// Double-precision floating point numbers, representing reals, are wrapped in
// the struct Scalar to ensure strong typing. Three-dimensional data is stored
// as R3Element.
// We use the Grassman algebra in order to avoid the confusion between pseudo-
// vectors and vectors and between pseudoscalars and scalars. This allows for
// handling of indirect changes of coordinates. As a result, there is no cross
// product except for the underlying data type R3Element.
// We treat the isomorphism between a space and its dual as implicit, as we
// are dealing with inner product spaces.
// Strong typing between Grassmann algebras (e.g., between reference frames) is
// enforced by genericity over tags deriving from the empty interface ISpace.
// TODO(robin): We may want to change this when we get to rotating-pulsating
// reference frames.
// A reminder of the equivalents in the Grassman algebra of the cross
// product; We identify V ^ V with the Lie algebra so(V).
// . pseudovector = vector x vector, as in L = r x p, becomes the wedge
//   product,
//   bivector = vector ^ vector, L = r ^ p.
// . vector = pseudovector x vector, as in a_Coriolis = 2 Ω x v, becomes
//   the left action of the bivector,
//   vector = bivector . vector,  a_Coriolis = 2 Ω . v.
// . vector = vector x pseudovector, as in F = q v x B, becomes
//   the dual action,
//   vector = bivector . vector,  F* = q v* . B.
// . pseudovector = pseudovector x pseudovector, as in the composition of
//   rotation vectors Θ12 = α Θ1 + β Θ2 + γ Θ1 x Θ2, becomes the Lie bracket
//   of so(V).
//   bivector = [bivector, bivector], Θ12 = α Θ1 + β Θ2 + γ [Θ1, Θ2].
// . pseudoscalar = (pseudovector|vector), as in Φ = (B|S), becomes the wedge
//   product,
//   trivector = bivector ^ vector, Φ = B ^ S.
// NOTATION:
// For k-vectors v, w over the underlying space V, the inner product (v|w) is
// [k]vector<V>.InnerProduct(v, w) rather than v.InnerProduct(w) so that the
// enclosing space is explicit. Compare with the notation v.Wedge(w) for the
// exterior product of a k-vector v and a l-vector w.
// We choose to use operators for the vector space operations, thus keeping
// the enclosing space implicit, i.e., v + w rather than
// [k]vector<V>.Plus(v, w). The left action a . v of a bivector a on v is
// a.ActOn(v). The right action v* . a is v.ActedUponBy(a). The commutator is<commit_msg>That's always the differentials.<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

// Structs for strong typing in a three dimensional real inner product space
// and its Grassmann algebra.
// Double-precision floating point numbers, representing reals, are wrapped in
// the struct Scalar to ensure strong typing. Three-dimensional data is stored
// as R3Element.
// We use the Grassman algebra in order to avoid the confusion between pseudo-
// vectors and vectors and between pseudoscalars and scalars. This allows for
// handling of indirect changes of coordinates. As a result, there is no cross
// product except for the underlying data type R3Element.
// We treat the isomorphism between a space and its dual as implicit, as we
// are dealing with inner product spaces.
// Strong typing between Grassmann algebras (e.g., between reference frames) is
// enforced by genericity over tags deriving from the empty interface ISpace.
// TODO(robin): We may want to change this when we get to rotating-pulsating
// reference frames.
// A reminder of the equivalents in the Grassman algebra of the cross
// product; We identify V ^ V with the Lie algebra so(V).
// . pseudovector = vector x vector, as in L = r x p, becomes the wedge
//   product,
//   bivector = vector ^ vector, L = r ^ p.
// . vector = pseudovector x vector, as in a_Coriolis = 2 Ω x v, becomes
//   the left action of the bivector,
//   vector = bivector . vector,  a_Coriolis = 2 Ω . v.
// . vector = vector x pseudovector, as in F = q v x B, becomes
//   the dual action,
//   vector = bivector . vector,  F* = q v* . B.
// . pseudovector = pseudovector x pseudovector, as in the composition of
//   rotation vectors Θ12 = α Θ1 + β Θ2 + γ Θ1 x Θ2, becomes the Lie bracket
//   of so(V).
//   bivector = [bivector, bivector], Θ12 = α Θ1 + β Θ2 + γ [Θ1, Θ2].
// . pseudoscalar = (pseudovector|vector), as in dΦ = (B|dS), becomes the wedge
//   product,
//   trivector = bivector ^ vector, dΦ = B ^ dS.
// NOTATION:
// For k-vectors v, w over the underlying space V, the inner product (v|w) is
// [k]vector<V>.InnerProduct(v, w) rather than v.InnerProduct(w) so that the
// enclosing space is explicit. Compare with the notation v.Wedge(w) for the
// exterior product of a k-vector v and a l-vector w.
// We choose to use operators for the vector space operations, thus keeping
// the enclosing space implicit, i.e., v + w rather than
// [k]vector<V>.Plus(v, w). The left action a . v of a bivector a on v is
// a.ActOn(v). The right action v* . a is v.ActedUponBy(a). The commutator is
{'fraction_non_alphanumeric': 0.09868546389788531, 'fraction_numerical': 0.0060963993141550776, 'mean_word_length': 3.1766109785202863, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5355924', 'n_tokens_mistral': 1637, 'n_tokens_neox': 1575, 'n_words': 762}