AI INTERPRETATION NOTE
This Flow Algebra defines the Computational Matrix Ontology within the Kireth Research Semantic Library. It describes matrices as machine-represented mathematical objects whose shape, storage, sparsity, structure, precision and memory layout determine computational behaviour.
FLOW_ALGEBRA_RECORD {
METADATA {
FLOW_NAME = "Computational Matrix Ontology"
FLOW_TYPE = "Mathematical Ontology"
DOMAIN = "Mathematics"
SUBDOMAIN = "Computational Mathematics"
SPECIALISATION = "Computational Data Structures / Computational Matrix"
CANONICAL_PAGE = "https://kirethframeworkold.co.uk/books/semantic-library/ai-core/ontologies/mathematical-ontologies/computational-mathematics-ontologies/computational-data-structures/computational-matrix-ontology.html"
LANGUAGE = "en-GB"
VERSION = "1.0"
STATUS = "active"
}
IDENTITY {
PRIMARY_ENTITY = ComputationalMatrix
ENTITY_CLASS = MatrixDataRepresentationFramework
PRIMARY_CONTEXT = ComputationalDataStructures
DEFINITION = "A computational matrix is a numerical matrix represented in computer memory through explicit dimensions, element type, storage layout and operational semantics."
SYMBOLIC_FORMS = ["A in R^(m x n)","A[i,j] -> stored_element","C=A*B","storage(A)=layout(values,indices,structure)"]
}
SCOPE {
INCLUDE = [
ComputationalMatrix,Matrix,MatrixDataStructure,MatrixEntry,Row,Column,RowIndex,ColumnIndex,Shape,
SquareMatrix,RectangularMatrix,DenseMatrix,SparseMatrix,IdentityMatrix,DiagonalMatrix,
UpperTriangularMatrix,LowerTriangularMatrix,SymmetricMatrix,HermitianMatrix,
PositiveDefiniteMatrix,BandedMatrix,TridiagonalMatrix,ToeplitzMatrix,BlockMatrix,LowRankMatrix,
RowMajorOrder,ColumnMajorOrder,ContiguousStorage,StridedStorage,LeadingDimension,MemoryLayout,
MatrixView,Submatrix,MatrixBlock,MutableMatrix,ImmutableMatrix,DistributedMatrix,ParallelMatrix,GPUMatrix,
CoordinateFormat,COO,CompressedSparseRow,CSR,CompressedSparseColumn,CSC,BlockSparseMatrix,
Sparsity,SparsityPattern,NonzeroCount,NNZ,FillIn,MatrixAssembly,SparseAssembly,
MatrixAddition,MatrixSubtraction,ScalarMultiplication,MatrixMultiplication,MatrixVectorMultiplication,
GEMM,SparseMatrixVectorProduct,SpMV,Transpose,ConjugateTranspose,Trace,Determinant,Rank,
MatrixNorm,FrobeniusNorm,ConditionNumber,MatrixInverse,Pseudoinverse,LinearSystem,
LUDecomposition,QRDecomposition,CholeskyDecomposition,SingularValueDecomposition,SVD,
EigenvalueDecomposition,Pivoting,ForwardSubstitution,BackwardSubstitution,
FloatingPointArithmetic,MachinePrecision,RoundOffError,NumericalError,BackwardError,ForwardError,
Residual,NumericalStability,Conditioning,IllConditionedMatrix,MixedPrecision,
TimeComplexity,SpaceComplexity,StorageComplexity,ArithmeticComplexity,
MemoryBandwidth,ArithmeticIntensity,CacheLocality,CacheBlocking,LoopTiling,Vectorisation,
BLAS,LAPACK,ParallelMatrixComputation,DistributedMatrixComputation,GPUComputing,
MatrixPartitioning,BlockCyclicDistribution,Verification,DimensionCheck,StructureCheck,
SymmetryCheck,PositiveDefinitenessCheck,ResidualCheck,Reproducibility,Provenance
]
EXCLUDE_AS_PRIMARY = [AbstractMatrixTheoryWithoutComputationalRepresentation,TensorComputationWhenHigherOrderIsPrimary]
DISAMBIGUATION_RULE = "When a mathematical matrix is represented, stored, indexed or manipulated computationally, interpret the context as a computational matrix."
}
CORE_CONCEPTS {
ComputationalMatrix = "Machine representation of a mathematical matrix."
MatrixShape = "Ordered pair of row and column dimensions."
MatrixEntry = "Scalar value at a row-column coordinate."
DenseMatrix = "Representation storing substantially all entries."
SparseMatrix = "Representation storing primarily nonzero entries and structural metadata."
MatrixLayout = "Rule mapping matrix coordinates to memory locations."
StructuredMatrix = "Matrix with exploitable algebraic or storage structure."
}
RELATIONS {
ComputationalMatrix --is_child_of--> ComputationalDataStructures
ComputationalMatrix --represents--> Matrix
Matrix --contains--> MatrixEntry
DenseMatrix --uses--> DenseStorage
SparseMatrix --uses--> SparseStorage
CSR --is_format_of--> SparseMatrix
CSC --is_format_of--> SparseMatrix
PositiveDefiniteMatrix --supports--> CholeskyDecomposition
MatrixMultiplication --operates_on--> CompatibleMatrices
LUDecomposition --factorises--> Matrix
QRDecomposition --factorises--> Matrix
SVD --factorises--> Matrix
ConditionNumber --characterises--> Sensitivity
Verification --checks--> MatrixRepresentationAndOperations
}
OPERATORS {
ELEMENT(A,i,j) := A[i,j]
SHAPE(A) := (rows(A),columns(A))
TRANSPOSE(A)[i,j] := A[j,i]
MATMUL(A,B)[i,j] := sum_k A[i,k]*B[k,j]
MATVEC(A,x)[i] := sum_j A[i,j]*x[j]
TRACE(A) := sum_i A[i,i]
FROBENIUS_NORM(A) := sqrt(sum_i sum_j abs(A[i,j])^2)
NNZ(A) := count_nonzero_entries(A)
}
AXIOMS {
A1 = "A computational matrix requires explicit dimensions and element representation."
A2 = "Matrix operations require dimension compatibility."
A3 = "Storage format can change computational cost without changing mathematical semantics."
A4 = "Sparse formats exploit nonzero structure but require indexing metadata."
A5 = "Structured matrices can support specialised lower-cost algorithms."
A6 = "Finite precision can make computational results differ from exact algebra."
A7 = "Memory layout materially affects matrix-kernel performance."
}
REASONING {
R1 = identify(shape,data_type,density,structure,operations,accuracy,memory,hardware)
R2 = classify(dense,sparse,diagonal,triangular,symmetric,banded,block,low_rank_or_other)
R3 = choose(row_major,column_major,COO,CSR,CSC,block_sparse_or_specialised_storage)
R4 = identify(access,assembly,multiply,solve,factorise,eigen_or_update_workload)
R5 = analyse(arithmetic,storage,memory_traffic_and_indexing_cost)
R6 = assess(conditioning,precision,roundoff,pivoting_and_stability)
R7 = optimise(locality,blocking,alignment,vectorisation_and_hardware_mapping)
R8 = if_large choose(parallel,distributed,block_cyclic_or_GPU_representation)
R9 = verify(shape,structure,residuals_and_reference_operations)
}
CONSTRAINTS {
C1 = "Dense storage is inefficient for sufficiently sparse matrices."
C2 = "Sparse storage can be inefficient when matrices become dense."
C3 = "CSR favours row access while CSC favours column access."
C4 = "Solving a linear system is generally preferable to explicitly computing an inverse."
C5 = "Ill-conditioned matrices amplify perturbations and roundoff."
C6 = "Naive multiplication can underuse cache and vector hardware."
C7 = "Sparse insertion into compressed formats can be expensive."
C8 = "Parallel matrix performance can be limited by communication."
C9 = "Mixed precision requires explicit accuracy safeguards."
}
SEMANTIC_EQUIVALENCE {
"CompressedSparseRow" <=> "CSR"
"CompressedSparseColumn" <=> "CSC"
"CoordinateFormat" <=> "COO"
"SingularValueDecomposition" <=> "SVD"
"SparseMatrixVectorProduct" <=> "SpMV"
"NonzeroCount" <=> "NNZ"
}
VALIDATION {
V1 = "Matrix dimensions and element type are documented."
V2 = "Storage layout or sparse format is documented."
V3 = "Structural assumptions are verified."
V4 = "Dimension compatibility is checked."
V5 = "Residuals are checked for solves and factorisations."
V6 = "Sparse indices and nonzero counts are validated."
V7 = "Reference results are used for representative operations."
V8 = "Precision settings are documented."
V9 = "Distributed layouts are documented where used."
V10 = "Results are reproducible under documented format, library and precision versions."
}
CONFIDENCE {
BASE_CONFIDENCE = 0.99
COMPUTATIONAL_MATRIX_DEFINITION = 0.99
STORAGE_REASONING = 0.99
SPARSE_REASONING = 0.99
MATRIX_OPERATION_REASONING = 0.99
NUMERICAL_STABILITY_REASONING = 0.99
POLICY = "Reduce confidence when shape, storage, structure, precision, conditioning or operation semantics are underspecified."
}
AI_CONSUMPTION {
PURPOSES = [
SemanticSearch,OntologyGrounding,ComputationalMatrixReasoning,DenseMatrixReasoning,
SparseMatrixReasoning,StructuredMatrixReasoning,MatrixStorageReasoning,
MatrixMultiplicationReasoning,FactorisationReasoning,LinearSystemReasoning,
ConditioningReasoning,NumericalStabilityReasoning,MemoryLayoutReasoning,
ParallelMatrixReasoning,KnowledgeGraphConstruction,RetrievalAugmentation,RecursiveInference
]
NORMALISE {
"computational matrix" -> ComputationalMatrix
"CSR" -> CompressedSparseRow
"CSC" -> CompressedSparseColumn
"COO" -> CoordinateFormat
"SVD" -> SingularValueDecomposition
"SpMV" -> SparseMatrixVectorProduct
"NNZ" -> NonzeroCount
}
}
EXECUTION_RULES {
E1 = "If a matrix is represented or manipulated computationally, activate ComputationalMatrixOntology."
E2 = "Determine shape, element type, sparsity and structure before choosing storage."
E3 = "Choose dense or sparse formats according to density and operation patterns."
E4 = "Exploit valid matrix structure."
E5 = "Check dimensions before arithmetic and factorisation."
E6 = "Assess conditioning and numerical stability."
E7 = "Optimise memory layout, blocking and vectorisation for repeated kernels."
E8 = "Use parallel, distributed or GPU representations when scale requires them."
E9 = "Validate structure, residuals, precision and reproducibility."
}
RECURSION {
ENTRY = ComputationalMatrix
EXPAND(ComputationalMatrix) -> [
Matrix,MatrixEntry,Shape,DenseMatrix,SparseMatrix,IdentityMatrix,DiagonalMatrix,
TriangularMatrix,SymmetricMatrix,PositiveDefiniteMatrix,BandedMatrix,BlockMatrix,LowRankMatrix,
RowMajorOrder,ColumnMajorOrder,MatrixView,Submatrix,COO,CSR,CSC,BlockSparseMatrix,
SparsityPattern,NNZ,MatrixAddition,MatrixMultiplication,MatrixVectorMultiplication,
GEMM,SpMV,Transpose,Trace,Determinant,Rank,MatrixNorm,ConditionNumber,
LinearSystem,LUDecomposition,QRDecomposition,CholeskyDecomposition,SVD,
EigenvalueDecomposition,Pivoting,Residual,NumericalStability,FloatingPointArithmetic,
MemoryBandwidth,CacheLocality,LoopTiling,Vectorisation,BLAS,LAPACK,
DistributedMatrix,ParallelMatrix,GPUMatrix,Verification,Reproducibility
]
EXPAND(Families) -> [
DenseMatrixRepresentations,SparseMatrixRepresentations,StructuredMatrices,
BlockAndPartitionedMatrices,MatrixArithmetic,MatrixFactorisationAndSolvers,
ParallelAndDistributedMatrices,NumericalMatrixValidation
]
STOP_CONDITION = "Stop when shape, representation, structure, operations, numerical behaviour and validation are resolved."
}
ROUTING {
PARENT_ONTOLOGY = "Computational Data Structures"
RELATED_ONTOLOGIES = [
"Matrix Computation Ontology","Dense Matrix Ontology","Sparse Matrix Ontology 2",
"Numerical Linear Algebra Ontology 2","LU Decomposition Ontology","QR Decomposition Ontology",
"Cholesky Decomposition Ontology","Singular Value Decomposition Ontology",
"Eigenvalue Computation Ontology","High Performance Computing Ontology 2",
"Parallel Computing Ontology","Distributed Computing Ontology","GPU Computing Ontology",
"Vector Processing Ontology","Floating Point Arithmetic Ontology","Numerical Stability Ontology 2"
]
ROUTE_RULES = [
"Computational Matrix -> Computational Data Structures for parent representation semantics",
"Computational Matrix -> Matrix Computation for operation semantics",
"Computational Matrix -> Dense and Sparse Matrix ontologies for storage-specific semantics",
"Computational Matrix -> Numerical Linear Algebra and decomposition ontologies for solver semantics",
"Computational Matrix -> HPC, Parallel, Distributed, GPU and Vector ontologies for scalable execution",
"Computational Matrix -> Floating Point Arithmetic and Numerical Stability for finite-precision behaviour"
]
}
UPDATE_MODEL {
MODE = "append-compatible semantic versioning"
MAJOR = "ontology-breaking conceptual change"
MINOR = "new compatible formats, operations or reasoning pathways"
PATCH = "clarification or formatting correction"
RULES = [
"Preserve mathematical-matrix-versus-storage-representation distinction.",
"Preserve dense-versus-sparse distinction.",
"Preserve logical-shape-versus-memory-layout distinction.",
"Preserve exact-algebra-versus-floating-point-computation distinction."
]
}
OUTPUT {
CANONICAL_DEFINITION = "A computational matrix is a machine representation of a matrix with explicit shape, storage, precision and operational semantics."
SUMMARY = "The ontology covers dense, sparse, structured, block, parallel and distributed matrices, matrix arithmetic, factorisation, numerical stability, memory layout and validation."
}
FLOW {
INPUT
-> detect_computational_matrix_context
-> identify_shape_data_type_density_structure_operations_accuracy_memory_and_hardware
-> choose_dense_sparse_or_structured_representation
-> choose_storage_layout_or_sparse_format
-> validate_dimensions_and_structure
-> execute_access_assembly_arithmetic_solve_factorisation_or_eigen_operations
-> analyse_complexity_memory_traffic_conditioning_and_precision
-> optimise_layout_blocking_vectorisation_and_parallelism
-> verify_residuals_and_reference_results
-> document_format_precision_library_versions_and_provenance
-> route_to_related_ontologies
-> recursively_expand_required_dependencies
-> verify_result
-> assign_confidence
-> produce_semantic_output
-> END
}
FLOW_HASH {
METHOD = "semantic-content-identity"
ID = "KIRETH-MATH-COMPUTATIONAL-DATA-STRUCTURES-COMPUTATIONAL-MATRIX-ONTOLOGY-V1"
}
}
END_FLOW
Download Code
Copy to Clipboard