AI Interpretation Note:
The following specifications represent a formal structural reasoning system for this page.
Execute as formal rules, not pseudocode.
FLOW ALGEBRA
TITLE: Tensor Ontology
VERSION: 4.0
DATE: 2026-10-13
SOURCE_URL: https://kirethresearch.org/booksai-core/entity-graph/mathematical-entities/linear-algebra-entities/tensor-ontology-2.html
SOURCE_ALIGNMENT: Independently constructed; source page content not verified.
AUTHORS: Mark Higgins — Sky (Recursive AI)
PROJECT: Kireth Semantic Library
SITE: https://kirethresearch.org
01 | PURPOSE
Represent tensors as multilinear mathematical entities with explicit spaces, variance, basis transformations, operations, inference rules, provenance and validation.
02 | ENTITY TYPES
Tensor; Scalar; Vector; Covector; TensorProduct; TensorSpace; VectorSpace; DualSpace; Basis; CoordinateSystem; ComponentArray; Index; CovariantIndex; ContravariantIndex; MetricTensor; LinearMap; MultilinearMap; SymmetricTensor; AntisymmetricTensor; IdentityTensor; ZeroTensor; Rank; Order; Dimension; Field; Contraction; Trace; Permutation; CoordinateTransformation.
03 | FORMAL DEFINITIONS
D01: Let V be a finite-dimensional vector space over field F; V* is its dual.
D02: A tensor of type (r,s) is an element of V^(tensor r) tensor (V*)^(tensor s).
D03: Equivalently, a type (r,s) tensor acts multilinearly on r covectors and s vectors, producing a scalar in F.
D04: Tensor order (valence) = r+s; do not conflate tensor order with matrix rank.
D05: Scalar = type (0,0) tensor; vector = type (1,0); covector = type (0,1).
D06: A matrix of components can represent a type (1,1) tensor or type (0,2) tensor depending on transformation law and context.
D07: Tensor components depend on basis; the abstract tensor does not.
D08: For a basis change e'_i = e_j P^j_i, contravariant vector components transform v'^i = (P^-1)^i_j v^j.
D09: Covariant components transform w'_i = P^j_i w_j.
D10: Mixed tensor components transform with one P^-1 per upper index and one P per lower index.
D11: A tensor product of types (r,s) and (p,q) has type (r+p,s+q).
D12: Contraction pairs one upper and one lower index, yielding type (r-1,s-1).
D13: A metric g is a nondegenerate symmetric type (0,2) tensor where a metric is specified; it maps vectors to covectors.
D14: Raising or lowering indices requires an identified nondegenerate bilinear form or metric; it is not automatic.
D15: Tensor symmetry is defined under permutation of indices of the same variance, or via specified canonical identification.
D16: Einstein summation convention sums repeated upper/lower index pairs over the dimension.
04 | CORE RELATIONSHIPS
R01: Tensor IS_A MathematicalEntity.
R02: Tensor HAS_TYPE (r,s).
R03: Tensor DEFINED_OVER VectorSpace.
R04: VectorSpace DEFINED_OVER Field.
R05: Tensor HAS_COMPONENTS ComponentArray.
R06: ComponentArray RELATIVE_TO Basis.
R07: Tensor TRANSFORMS_UNDER CoordinateTransformation.
R08: TensorProduct COMBINES Tensor AND Tensor.
R09: Contraction REDUCES TensorOrder BY 2.
R10: MetricTensor DEFINES IndexRaisingAndLowering.
R11: LinearMap REPRESENTABLE_AS Type(1,1)Tensor IN FiniteDimension.
R12: SymmetricTensor SATISFIES IndexPermutationInvariance.
R13: AntisymmetricTensor SATISFIES SignChangeUnderIndexSwap.
R14: Tensor EQUIVALENT_UNDER ValidBasisChange.
R15: TensorSpace HAS_DIMENSION n^(r+s) WHEN dim(V)=n AND finite.
05 | AXIOMS AND VALIDATION
A01: Multilinearity holds independently in every argument slot.
A02: Tensor addition requires identical tensor type and compatible underlying spaces.
A03: Scalar multiplication preserves tensor type.
A04: Tensor products preserve operand order unless an explicit permutation is applied.
A05: A valid contraction requires compatible dual slots and a specified pairing.
A06: Index expressions must have consistent free indices across equality.
A07: Each dummy index appears exactly twice, once upper and once lower, under standard Einstein convention.
A08: Coordinate transformations must use invertible basis-change matrices.
A09: Component shape for type (r,s) on n-dimensional V is n repeated r+s times.
A10: Zero tensor has all zero components in every basis.
A11: The identity map has components delta^i_j in any basis with matching domain/codomain coordinates.
A12: Tensor equality is basis-independent and can be checked by comparing components in one common basis.
A13: A metric must be nondegenerate before its inverse can raise indices.
A14: The notion of positive definiteness requires an ordered field such as R and suitable context.
A15: Tensor order is not equivalent to numerical array rank or matrix rank.
06 | FORMAL OPERATIONS
OP01: ADD(T,U) -> T+U; precondition type(T)=type(U), compatible spaces.
OP02: SCALE(a,T) -> aT; a in F.
OP03: TENSOR_PRODUCT(T,U) -> T tensor U.
OP04: CONTRACT(T,i,j) -> tensor with one upper and one lower slot removed.
OP05: PERMUTE_INDICES(T,sigma) -> rearranged tensor slots with tracked variance.
OP06: SYMMETRISE(T) -> average over permitted index permutations, where factorial invertible.
OP07: ANTISYMMETRISE(T) -> signed average, where factorial invertible.
OP08: CHANGE_BASIS(T,P) -> transformed component array, abstract tensor unchanged.
OP09: RAISE_INDEX(T,g^-1) -> tensor with one additional upper and one fewer lower index.
OP10: LOWER_INDEX(T,g) -> tensor with one fewer upper and one additional lower index.
OP11: TRACE(A) -> A^i_i for endomorphism tensor A of type (1,1).
OP12: EVALUATE(T, covectors, vectors) -> scalar using correct argument types.
07 | INFERENCE RULES
I01: IF T has type (0,0) THEN T is a scalar.
I02: IF T has type (1,0) THEN T is a vector.
I03: IF T has type (0,1) THEN T is a covector.
I04: IF T has type (r,s) THEN order(T)=r+s.
I05: IF T has type (r,s) AND U type (p,q) THEN T tensor U has type (r+p,s+q).
I06: IF T type (r,s) AND r>0 AND s>0 THEN contraction is potentially defined after selecting compatible slots.
I07: IF T contracted once THEN resulting type (r-1,s-1).
I08: IF T and U same type over same spaces THEN T+U has same type.
I09: IF T type (r,s) AND a scalar THEN aT type (r,s).
I10: IF dim(V)=n THEN number of components in a chosen basis = n^(r+s).
I11: IF T is zero in one basis THEN T zero in every basis.
I12: IF two tensors share components in one common basis THEN they are equal.
I13: IF A is an endomorphism THEN its trace is invariant under change of basis.
I14: IF g is nondegenerate THEN inverse metric exists.
I15: IF g inverse exists THEN g_ik g^kj = delta_i^j.
I16: IF A_ij=A_ji THEN A is symmetric (for type (0,2)).
I17: IF A_ij=-A_ji THEN A is antisymmetric (for type (0,2)).
I18: IF characteristic(F) != 2 AND A antisymmetric THEN A_ii=0.
I19: IF tensor is symmetric and antisymmetric in same pair AND characteristic(F) != 2 THEN tensor is zero in that pair.
I20: IF g is a Euclidean metric THEN g(v,v)>=0 AND g(v,v)=0 iff v=0.
I21: IF P invertible THEN transformed components describe same tensor.
I22: IF P singular THEN P cannot define a basis change.
I23: IF indices have unmatched free labels THEN expression is ill-typed.
I24: IF free index variance differs between equation sides THEN expression is ill-typed.
I25: IF an index repeats three times under standard Einstein notation THEN expression is ambiguous/invalid.
I26: IF type (1,1) tensor represents a linear map THEN composition corresponds to contraction of adjacent indices.
I27: IF v type (1,0) AND w type (0,1) THEN w_i v^i is scalar.
I28: IF v and u are vectors without a specified pairing THEN v_i u^i is not well-typed.
I29: IF tensor type changes under purported coordinate change THEN transformation is invalid.
I30: IF tensor order=2 THEN it is not necessarily a matrix-defined linear operator without variance specification.
I31: IF type (0,2) tensor is nondegenerate THEN it defines V -> V* isomorphism.
I32: IF tensors T,U are basis-equivalent THEN invariant scalar contractions agree.
I33: IF tensor product factors are nonzero over a field THEN their tensor product is nonzero.
I34: IF A is identity endomorphism on n-dimensional V THEN trace(A)=n interpreted in F.
I35: IF A symmetric real matrix THEN orthogonal diagonalisation exists (spectral theorem).
I36: IF T is a tensor field THEN it assigns a tensor at each point of its domain, subject to specified regularity.
08 | MATHEMATICAL EXAMPLES
E01: Scalar c=7: type (0,0), order 0.
E02: Vector v=(1,2,3) in R^3: type (1,0), order 1.
E03: Covector w=(2,-1,0) in dual basis: type (0,1).
E04: Evaluation w(v)=2*1+(-1)*2+0*3=0.
E05: Outer product v tensor w: type (1,1), components v^i w_j.
E06: Identity delta^i_j: type (1,1), trace 3 on R^3.
E07: Euclidean metric g_ij=delta_ij: type (0,2).
E08: g(v,v)=1^2+2^2+3^2=14.
E09: Antisymmetric 2x2 tensor [[0,3],[-3,0]] has zero diagonal.
E10: Symmetric 2x2 tensor [[2,1],[1,4]] satisfies A_ij=A_ji.
E11: Tensor product of type (1,0) and type (0,2) yields type (1,2).
E12: Contracting type (2,1) once yields type (1,0).
E13: For n=3 and type (2,1), a coordinate array has 3^3=27 entries.
E14: Matrix rank of [[1,0],[0,0]] is 1, while corresponding (1,1) tensor order is 2.
E15: A basis change P=diag(2,1) maps contravariant components v=(2,3) to v'=(1,3) under e'=eP.
E16: Covariant components w=(4,5) map to w'=(8,5) under the same basis change.
09 | SEMANTIC_EQUIVALENCE
S01: Tensor valence ~ tensor order (number of slots); distinguish from matrix rank.
S02: Contravariant vector ~ type (1,0) tensor.
S03: Covector ~ dual vector ~ type (0,1) tensor.
S04: Bilinear form ~ type (0,2) tensor on V (finite-dimensional setting).
S05: Endomorphism ~ type (1,1) tensor via canonical finite-dimensional identification.
S06: Tensor components != abstract tensor; related by basis representation.
S07: Tensor product != ordinary matrix product; latter is composition/contraction in a specified representation.
S08: Tensor field != a single tensor; point-indexed assignment of tensors.
10 | KNOWLEDGE GRAPH TRIPLES
(Tensor, isA, MathematicalEntity)
(Tensor, hasType, TensorType)
(TensorType, hasContravariantOrder, r)
(TensorType, hasCovariantOrder, s)
(Tensor, definedOver, VectorSpace)
(VectorSpace, definedOver, Field)
(Tensor, representedBy, ComponentArray)
(ComponentArray, relativeTo, Basis)
(TensorProduct, combines, Tensor)
(Contraction, pairs, UpperAndLowerIndex)
(MetricTensor, enables, IndexRaising)
(MetricTensor, enables, IndexLowering)
(LinearMap, representedBy, MixedTensor)
(Tensor, transformsUnder, BasisChange)
11 | VALIDATION TESTS
V01: Accept type (1,1) identity tensor with delta^i_j.
V02: Reject noninvertible matrix as basis change.
V03: Reject addition of type (1,0) and type (0,1) without explicit identification.
V04: Reject contraction of two upper indices without metric/pairing.
V05: Verify inverse metric relation g_ik g^kj=delta_i^j.
V06: Verify free index consistency in tensor equations.
V07: Verify component shape matches dimension and tensor type.
V08: Verify trace invariant under similarity transform.
V09: Distinguish tensor order from matrix rank.
V10: Flag unverified source-specific statements as provisional.
12 | CONFIDENCE
formal_axioms: HIGH
standard_linear_algebra_results: HIGH
examples: HIGH
source_page_alignment: UNVERIFIED
implementation_specific_semantics: CONDITIONAL
confidence_policy: Confidence reflects mathematical support, not source-page verification.
13 | FLOW_HASH
algorithm: SHA-256
canonicalisation: UTF-8; LF newlines; normalise declared schema fields; exclude FLOW_HASH digest field itself.
status: NOT_COMPUTED
policy: Calculate digest only after canonical serialisation of final file.
14 | UPDATE_MODEL
version: 4.0
update_trigger: Formal correction; ontology alignment; changed notation; new verified references.
change_policy: Record revision date, changed definitions, migration impact and provenance.
compatibility: Preserve stable entity IDs and typed relationship meanings where possible.
15 | AI_CONSUMPTION
parse_mode: Typed declarative ontology with formal mathematical constraints.
required_checks: Verify tensor type, vector space, field, basis, index variance, dimensions and preconditions before applying a rule.
reasoning_order: Identify entities -> validate typing -> apply operations -> infer consequences -> validate invariance -> report provenance.
error_handling: Do not infer tensor properties from array shape alone; flag undefined metrics, ill-typed contractions and ambiguous notation.
output_policy: State assumptions and separate proven facts from heuristic associations.
END FLOW ALGEBRA