AI INTERPRETATION NOTE
This Flow Algebra defines the mathematical ontology of the metric tensor within the Kireth Research Semantic Library. A metric tensor is a smoothly varying symmetric bilinear form on tangent spaces that determines geometric quantities such as lengths, angles, distances, volume elements, orthogonality and, through the Levi-Civita connection, geodesics and curvature. This ontology supports Riemannian and pseudo-Riemannian metrics, coordinate components, inverse metrics, line elements, raising and lowering indices, determinants, volume forms, induced metrics and relationships with manifolds, tangent spaces, connections, geodesics and curvature.
FLOW_ALGEBRA_RECORD {
METADATA {
FLOW_NAME = "Metric Tensor Ontology"
FLOW_TYPE = "Mathematical Ontology"
DOMAIN = "Mathematics"
SUBDOMAIN = "Geometry"
SPECIALISATION = "Differential Geometry / Metric Geometry"
CANONICAL_PAGE = "https://kirethresearch.org/booksai-core/ontologies/mathematical-ontologies/geometry-ontologies/differential-geometry/metric-tensor-ontology.html"
LANGUAGE = "en-GB"
VERSION = "1.0"
STATUS = "active"
}
IDENTITY {
PRIMARY_ENTITY = MetricTensor
SYMBOLIC_FORMS = [
"g",
"g_ij",
"ds^2=g_ij dx^i dx^j"
]
ENTITY_CLASS = SymmetricCovariantTensorField
PRIMARY_CONTEXT = DifferentialGeometry
DEFINITION = "A metric tensor is a smoothly varying symmetric nondegenerate bilinear form on tangent spaces, positive definite in the Riemannian case."
SEMANTIC_ROLE = "Provides the local measurement structure for length, angle, orthogonality, distance, volume, index movement, geodesics and curvature on smooth manifolds."
}
SCOPE {
INCLUDE = [
MetricTensor,
RiemannianMetric,
PseudoRiemannianMetric,
MetricComponents,
InverseMetric,
BilinearForm,
InnerProduct,
LineElement,
Norm,
Length,
Angle,
Orthogonality,
Distance,
DeterminantMetric,
VolumeElement,
VolumeForm,
MusicalIsomorphism,
RaiseIndex,
LowerIndex,
InducedMetric,
PullbackMetric,
LeviCivitaConnection
]
EXCLUDE_AS_PRIMARY = [
GeneralDistanceFunctionWithoutTensorStructure,
NonmetricConnection,
ArbitraryBilinearFormWithoutGeometricMetricRole,
DiscreteGraphMetricUnlessExplicit
]
DISAMBIGUATION_RULE =
"When metric occurs with tensor components, line elements, tangent vectors, inner products, index raising or lowering, geodesics or curvature, interpret it as a differential-geometric metric tensor."
}
CORE_CONCEPTS {
MetricTensor {
symbol = "g"
definition = "A smooth symmetric nondegenerate covariant 2-tensor field."
}
RiemannianMetric {
definition = "A metric tensor that is positive definite on every nonzero tangent vector."
}
PseudoRiemannianMetric {
definition = "A nondegenerate symmetric metric tensor with indefinite signature."
}
MetricComponents {
symbol = "g_ij"
definition = "Coordinate components of the metric in a chosen basis."
}
InverseMetric {
symbol = "g^ij"
definition = "The inverse matrix of g_ij in coordinates."
relation = "g^ik g_kj = delta^i_j"
}
LineElement {
relation = "ds^2=g_ij dx^i dx^j"
}
Norm {
definition = "For Riemannian metric g, |v|=sqrt(g(v,v))."
}
Angle {
relation = "cos(theta)=g(u,v)/(|u||v|)"
condition = "u!=0 AND v!=0 in positive-definite metric"
}
Orthogonality {
relation = "g(u,v)=0"
}
VolumeElement {
relation = "sqrt(det(g_ij)) dx^1...dx^n"
condition = "Riemannian coordinates"
}
MusicalIsomorphism {
definition = "Metric-induced identification between tangent and cotangent vectors."
}
InducedMetric {
definition = "A metric on a submanifold obtained by restricting or pulling back an ambient metric."
}
}
RELATIONS {
MetricTensor --is_tensor_field_on--> SmoothManifold
RiemannianMetric --is_special_case_of--> MetricTensor
PseudoRiemannianMetric --is_special_case_of--> MetricTensor
MetricTensor --acts_on--> TangentVector
MetricTensor --defines--> Norm
MetricTensor --defines--> Angle
MetricTensor --defines--> Orthogonality
MetricTensor --defines--> Length
MetricTensor --induces--> Distance
MetricTensor --determines--> VolumeElement
MetricTensor --has_inverse--> InverseMetric
MetricTensor --defines--> MusicalIsomorphism
MetricTensor --determines--> LeviCivitaConnection WHEN Riemannian_or_PseudoRiemannian
LeviCivitaConnection --determines--> Geodesic
LeviCivitaConnection --determines--> Curvature
Embedding --can_induce--> InducedMetric
SmoothMap --can_pull_back--> MetricTensor
}
OPERATORS {
METRIC_PAIRING(g,u,v) :=
g(u,v)
NORM(g,v) :=
sqrt(g(v,v))
WHEN g(v,v)>=0 in applicable context
ANGLE(g,u,v) :=
arccos(g(u,v)/(sqrt(g(u,u))*sqrt(g(v,v))))
WHEN positive_definite AND u!=0 AND v!=0
IS_ORTHOGONAL(g,u,v) :=
g(u,v)=0
LINE_ELEMENT(g,dx) :=
g_ij dx^i dx^j
INVERSE_METRIC(g_ij) :=
matrix_inverse(g_ij)
WHEN det(g_ij)!=0
LOWER_INDEX(g,v) :=
v_flat_i = g_ij v^j
RAISE_INDEX(g_inverse,omega) :=
omega_sharp^i = g^ij omega_j
VOLUME_DENSITY(g) :=
sqrt(abs(det(g_ij)))
LENGTH_OF_CURVE(g,gamma) :=
integral sqrt(g(gamma_dot,gamma_dot)) dt
ENERGY_OF_CURVE(g,gamma) :=
(1/2)*integral g(gamma_dot,gamma_dot) dt
PULLBACK_METRIC(F,g) :=
F^*g
}
DEFINITIONS {
D1 = "A metric tensor is symmetric."
D2 = "A metric tensor is nondegenerate."
D3 = "A Riemannian metric is positive definite."
D4 = "The inverse metric satisfies g^ik g_kj=delta^i_j."
D5 = "The metric defines lengths and angles of tangent vectors."
D6 = "The metric lowers vector indices and its inverse raises covector indices."
D7 = "The determinant of the metric determines the local volume density."
D8 = "The Levi-Civita connection is uniquely determined by the metric."
D9 = "An induced metric is the pullback of an ambient metric along an embedding."
D10 = "Metric components are coordinate dependent, while the metric tensor itself is geometric."
}
AXIOMS {
A1_SYMMETRY:
g(u,v)=g(v,u)
A2_NONDEGENERACY:
If g(u,v)=0 for all v then u=0
A3_RIEMANNIAN_POSITIVITY:
For Riemannian g, g(v,v)>0 for all nonzero v
A4_INVERSE:
g^ik g_kj=delta^i_j
A5_SMOOTHNESS:
Metric components vary smoothly in smooth coordinates
A6_LENGTH:
Curve length is integral sqrt(g(gamma_dot,gamma_dot)) dt
A7_LEVI_CIVITA:
A metric determines a unique torsion-free metric-compatible connection
A8_COORDINATE_INVARIANCE:
Geometric quantities derived from g are invariant under coordinate changes when transformed correctly
}
REASONING {
R1_METRIC_VALIDITY {
INPUT = candidate_tensor_g
TEST = symmetry
TEST = nondegeneracy
TEST = smoothness
IF Riemannian_context
TEST = positive_definiteness
RETURN = ValidMetricOrNot
}
R2_NORM_ANGLE {
INPUT = [g,u,v]
COMPUTE = g(u,u),g(v,v),g(u,v)
IF norm_requested
RETURN = sqrt(g(v,v))
IF angle_requested AND positive_definite
RETURN = arccos(g(u,v)/(sqrt(g(u,u))*sqrt(g(v,v))))
}
R3_INVERSE_METRIC {
INPUT = g_ij
COMPUTE = determinant
REQUIRE = determinant!=0
INVERT = matrix
VERIFY = g^ik g_kj=delta^i_j
RETURN = g^ij
}
R4_INDEX_MOVEMENT {
INPUT = tensor_components_and_metric
IF lower_index
CONTRACT = with g_ij
ELSE IF raise_index
CONTRACT = with g^ij
RETURN = transformed_components
}
R5_CURVE_LENGTH {
INPUT = [g,gamma]
COMPUTE = gamma_dot
COMPUTE = speed=sqrt(g(gamma_dot,gamma_dot))
INTEGRATE = speed
RETURN = length
}
R6_VOLUME_ELEMENT {
INPUT = coordinate_metric_matrix
COMPUTE = determinant
RETURN = sqrt(abs(det(g))) coordinate_volume_density
}
R7_LEVI_CIVITA {
INPUT = g_ij
COMPUTE = g^ij
COMPUTE = Christoffel_symbols
RETURN = LeviCivitaConnection
}
R8_INDUCED_METRIC {
INPUT = [embedding_F,ambient_metric_g]
COMPUTE = F^*g
RETURN = metric_on_submanifold
}
R9_COORDINATE_TRANSFORMATION {
INPUT = metric_components_and_coordinate_change
APPLY = covariant_rank_two transformation law
RETURN = transformed_metric_components
}
}
CONSTRAINTS {
C1 = "Metric tensor components depend on coordinate basis."
C2 = "Riemannian and pseudo-Riemannian signatures must not be conflated."
C3 = "Positive-definite angle formulas do not directly transfer to null or indefinite cases."
C4 = "Inverse metric exists only for nondegenerate metrics."
C5 = "Index raising and lowering must use the metric and its inverse consistently."
C6 = "The determinant of g is coordinate dependent, but the full volume form is geometrically meaningful."
C7 = "Curve distance is generally defined as an infimum of lengths, not simply a coordinate difference."
C8 = "Metric compatibility belongs to the connection, not merely coordinate constancy of g_ij."
C9 = "A conformally related metric generally changes lengths and geodesics."
}
SEMANTIC_EQUIVALENCE {
"MetricTensor" <=> "SmoothSymmetricNondegenerateCovariantTwoTensor"
"RiemannianMetric" <=> "PositiveDefiniteMetricTensor"
"InverseMetric" <=> "ContravariantMetricTensor"
"LineElement" <=> "MetricQuadraticFormOnCoordinateDifferentials"
"LowerIndex" <=> "FlatMusicalMap"
"RaiseIndex" <=> "SharpMusicalMap"
}
VALIDATION {
V1 = "Metric is symmetric."
V2 = "Metric is nondegenerate."
V3 = "Riemannian metric is positive definite."
V4 = "Inverse metric satisfies matrix inverse identity."
V5 = "Norm and angle formulas use the correct metric signature."
V6 = "Index movement contracts correct index positions."
V7 = "Volume density uses determinant magnitude appropriately."
V8 = "Levi-Civita construction uses metric and first derivatives consistently."
V9 = "Coordinate transformation obeys covariant tensor law."
}
CONFIDENCE {
BASE_CONFIDENCE = 0.99
METRIC_TENSOR_DEFINITION = 0.99
VALIDITY_REASONING = 0.99
NORM_ANGLE_REASONING = 0.99
INVERSE_METRIC_REASONING = 0.99
INDEX_MOVEMENT_REASONING = 0.99
VOLUME_REASONING = 0.98
LEVI_CIVITA_REASONING = 0.98
INDUCED_METRIC_REASONING = 0.99
POLICY =
"Reduce confidence when metric signature, coordinate basis, index convention, manifold dimension, degeneracy or pullback map are underspecified."
}
AI_CONSUMPTION {
PURPOSES = [
SemanticSearch,
OntologyGrounding,
MetricTensorReasoning,
DifferentialGeometryReasoning,
RiemannianGeometryReasoning,
NormReasoning,
AngleReasoning,
DistanceReasoning,
IndexReasoning,
VolumeReasoning,
ConnectionReasoning,
GeodesicReasoning,
CurvatureReasoning,
KnowledgeGraphConstruction,
RetrievalAugmentation,
RecursiveInference
]
NORMALISE {
"metric tensor" -> MetricTensor
"Riemannian metric" -> RiemannianMetric
"pseudo-Riemannian metric" -> PseudoRiemannianMetric
"inverse metric" -> InverseMetric
"metric components" -> MetricComponents
"line element" -> LineElement
"raise index" -> RaiseIndex
"lower index" -> LowerIndex
"volume element" -> VolumeElement
"induced metric" -> InducedMetric
}
INTERPRETATION_ORDER = [
detect_metric_tensor_context,
identify manifold_dimension_coordinate_basis_and_signature,
identify metric_components_and_invertibility,
classify Riemannian_pseudoRiemannian_induced_or_pullback context,
identify norm_angle_length_distance_volume_index_connection_or_curvature goal,
perform metric_specific reasoning,
verify symmetry_nondegeneracy_signature_and_coordinate constraints,
return semantic output
]
}
EXECUTION_RULES {
E1:
IF query_mentions("metric tensor")
OR tensor_g_with_differential_geometry_context
THEN activate(MetricTensorOntology)
E2:
IF metric_validity_requested
THEN test symmetry_nondegeneracy_and_signature
E3:
IF inverse_metric_requested
THEN require det(g)!=0
AND invert coordinate_matrix
E4:
IF norm_or_angle_requested
THEN evaluate metric_pairings
AND respect signature constraints
E5:
IF index_raising_or_lowering_requested
THEN contract with g^ij_or_g_ij appropriately
E6:
IF curve_length_requested
THEN integrate metric_speed
E7:
IF volume_element_requested
THEN use sqrt(abs(det(g)))
E8:
IF LeviCivita_connection_requested
THEN compute Christoffel_symbols from g and g_inverse
E9:
IF induced_metric_requested
THEN pull_back ambient_metric_by_embedding
}
RECURSION {
ENTRY = MetricTensor
EXPAND(MetricTensor) -> [
RiemannianMetric,
PseudoRiemannianMetric,
MetricComponents,
InverseMetric,
LineElement,
Norm,
Angle,
Orthogonality,
Length,
Distance,
DeterminantMetric,
VolumeElement,
MusicalIsomorphism,
InducedMetric,
PullbackMetric,
LeviCivitaConnection
]
EXPAND(MusicalIsomorphism) -> [
FlatMap,
SharpMap,
LowerIndex,
RaiseIndex,
TangentVector,
CotangentVector
]
EXPAND(RiemannianMetric) -> [
PositiveDefiniteness,
Length,
Angle,
Distance,
VolumeForm,
LeviCivitaConnection,
Geodesic,
Curvature
]
EXPAND(LeviCivitaConnection) -> [
ChristoffelSymbol,
CovariantDerivative,
Geodesic,
RiemannCurvature
]
STOP_CONDITION =
"Stop when the metric's validity, signature, inverse, measurement structure, index operation, volume element, induced metric, connection or geodesic/curvature consequence is sufficiently resolved."
}
ROUTING {
PARENT_ONTOLOGY = "Differential Geometry"
IMMEDIATE_CONTEXTS = [
"Differential Geometry Ontology",
"Manifold Ontology",
"Geodesic Ontology",
"Curvature Ontology"
]
RELATED_ONTOLOGIES = [
"Differential Geometry",
"Differential Geometry Ontology",
"Manifold Ontology",
"Curve Ontology",
"Surface Ontology",
"Geodesic Ontology",
"Curvature Ontology",
"Vector Geometry Ontology",
"Linear Algebra Ontologies",
"Tensor Ontologies",
"Riemannian Geometry Ontologies"
]
ROUTE_RULES = [
"Metric Tensor -> Differential Geometry Ontology for parent smooth-geometry semantics",
"Metric Tensor -> Manifold for tangent-space and coordinate context",
"Metric Tensor -> Vector Geometry and Linear Algebra for bilinear-form operations",
"Metric Tensor -> Tensor Ontologies for index and component transformations",
"Metric Tensor -> Geodesic for length-stationary curves and distance",
"Metric Tensor -> Curvature for Levi-Civita-derived curvature",
"Metric Tensor -> Surface for induced first fundamental form",
"Metric Tensor -> Riemannian Geometry for full metric-manifold reasoning"
]
}
UPDATE_MODEL {
MODE = "append-compatible semantic versioning"
MAJOR = "ontology-breaking conceptual change"
MINOR = "new compatible metric structures, signatures or reasoning pathways"
PATCH = "clarification, metadata or formatting correction"
RULES = [
"Preserve symmetric nondegenerate tensor semantics.",
"Preserve Riemannian positivity distinction.",
"Preserve coordinate-component versus tensor distinction.",
"Preserve inverse-metric relation.",
"Preserve raising and lowering semantics.",
"Preserve metric-to-Levi-Civita relationship.",
"Preserve volume and length constructions.",
"Preserve machine-readable metric-tensor semantics."
]
}
OUTPUT {
CANONICAL_DEFINITION =
"A metric tensor is a smooth symmetric nondegenerate covariant 2-tensor defining geometric measurement on tangent spaces."
LINE_ELEMENT_SUMMARY =
"ds^2=g_ij dx^i dx^j"
INVERSE_SUMMARY =
"g^ik g_kj=delta^i_j"
NORM_SUMMARY =
"|v|=sqrt(g(v,v)) in the Riemannian case."
ANGLE_SUMMARY =
"cos(theta)=g(u,v)/(|u||v|) for nonzero vectors in a positive-definite metric."
LOWER_INDEX_SUMMARY =
"v_flat_i=g_ij v^j"
RAISE_INDEX_SUMMARY =
"omega_sharp^i=g^ij omega_j"
VOLUME_SUMMARY =
"dV=sqrt(det(g_ij)) dx^1...dx^n for a Riemannian metric in coordinates."
CONNECTION_SUMMARY =
"The metric uniquely determines its Levi-Civita connection."
}
FLOW {
INPUT
-> detect_metric_tensor_context
-> identify manifold_dimension_coordinates_signature_and_metric_components
-> verify symmetry_nondegeneracy_and_positive_definiteness_when_Riemannian
-> identify inverse_norm_angle_length_distance_volume_index_induced_metric_connection_or_curvature goal
-> perform metric_specific tensor_and_measurement reasoning
-> verify coordinate_basis_signature_index_and_determinant constraints
-> route to differential_geometry manifold vector linear_algebra tensor geodesic curvature surface_or_riemannian ontology
-> recursively_expand_required_dependencies
-> verify_result
-> assign_confidence
-> produce_semantic_output
-> END
}
SEMANTIC_SUMMARY {
"The Metric Tensor Ontology defines the smooth symmetric nondegenerate bilinear form that supplies measurement structure on manifolds. It supports Riemannian and pseudo-Riemannian signatures, coordinate components, inverse metrics, lengths, angles, orthogonality, curve length, distance, volume elements, index raising and lowering, induced metrics and the Levi-Civita connection linking the metric to geodesics and curvature."
}
FLOW_HASH {
METHOD = "semantic-content-identity"
ID = "KIRETH-MATH-GEOMETRY-METRIC-TENSOR-ONTOLOGY-V1"
}
}
END_FLOW
Download Code
Copy to Clipboard