use crate::HostTypes;
pub trait NormedDivisionAlgebra<H: HostTypes> {
fn algebra_dimension(&self) -> u64;
fn is_commutative(&self) -> bool;
fn is_associative(&self) -> bool;
fn basis_elements(&self) -> &H::HostString;
type MultiplicationTable: MultiplicationTable<H>;
fn algebra_multiplication_table(&self) -> &Self::MultiplicationTable;
}
pub trait CayleyDicksonConstruction<H: HostTypes> {
type NormedDivisionAlgebra: NormedDivisionAlgebra<H>;
fn cayley_dickson_source(&self) -> &Self::NormedDivisionAlgebra;
fn cayley_dickson_target(&self) -> &Self::NormedDivisionAlgebra;
fn adjoined_element(&self) -> &H::HostString;
fn conjugation_rule(&self) -> &H::HostString;
}
pub trait MultiplicationTable<H: HostTypes> {}
pub trait AlgebraCommutator<H: HostTypes> {}
pub trait AlgebraAssociator<H: HostTypes> {}
pub mod real_algebra {
pub const ALGEBRA_DIMENSION: i64 = 1;
pub const BASIS_ELEMENTS: &str = "{1}";
pub const IS_ASSOCIATIVE: bool = true;
pub const IS_COMMUTATIVE: bool = true;
}
pub mod complex_algebra {
pub const ALGEBRA_DIMENSION: i64 = 2;
pub const BASIS_ELEMENTS: &str = "{1, i}";
pub const IS_ASSOCIATIVE: bool = true;
pub const IS_COMMUTATIVE: bool = true;
}
pub mod quaternion_algebra {
pub const ALGEBRA_DIMENSION: i64 = 4;
pub const BASIS_ELEMENTS: &str = "{1, i, j, k}";
pub const IS_ASSOCIATIVE: bool = true;
pub const IS_COMMUTATIVE: bool = false;
}
pub mod octonion_algebra {
pub const ALGEBRA_DIMENSION: i64 = 8;
pub const BASIS_ELEMENTS: &str = "{1, i, j, k, l, il, jl, kl}";
pub const IS_ASSOCIATIVE: bool = false;
pub const IS_COMMUTATIVE: bool = false;
}
pub mod cayley_dickson_r_to_c {
pub const ADJOINED_ELEMENT: &str = "i";
pub const CAYLEY_DICKSON_SOURCE: &str = "https://uor.foundation/division/RealAlgebra";
pub const CAYLEY_DICKSON_TARGET: &str = "https://uor.foundation/division/ComplexAlgebra";
pub const CONJUGATION_RULE: &str = "i² = −1";
}
pub mod cayley_dickson_c_to_h {
pub const ADJOINED_ELEMENT: &str = "j";
pub const CAYLEY_DICKSON_SOURCE: &str = "https://uor.foundation/division/ComplexAlgebra";
pub const CAYLEY_DICKSON_TARGET: &str = "https://uor.foundation/division/QuaternionAlgebra";
pub const CONJUGATION_RULE: &str = "ij = k, ji = −k";
}
pub mod cayley_dickson_h_to_o {
pub const ADJOINED_ELEMENT: &str = "l";
pub const CAYLEY_DICKSON_SOURCE: &str = "https://uor.foundation/division/QuaternionAlgebra";
pub const CAYLEY_DICKSON_TARGET: &str = "https://uor.foundation/division/OctonionAlgebra";
pub const CONJUGATION_RULE: &str = "non-associative Fano plane products";
}