flow "InnerProductOntology" v1.0
# ============================================================
# INNER PRODUCT ONTOLOGY — FLOW ALGEBRA
# ============================================================
SOURCE_URL := "https://kirethresearch.org/booksai-core/ontologies/calculus-analysis-ontologies/functional-analysis/inner-product-ontology.html"
DOMAIN := "Mathematical Ontologies"
CATEGORY := "Calculus and Analysis Ontologies"
SUBCATEGORY := "Functional Analysis"
ENTITY := "Inner Product"
# ---------- CORE ENTITY ----------
INNER_PRODUCT := {
type: MathematicalMapping,
domain: FunctionalAnalysis,
purpose: "Assign a scalar to a pair of vectors in a way that generalises Euclidean dot products and defines length, angle, orthogonality and Hilbert-space geometry."
}
# ---------- CORE CONCEPTS ----------
CONCEPTS := {
INNER_PRODUCT,
VECTOR_SPACE,
SCALAR_FIELD,
LINEARITY,
SESQUILINEARITY,
CONJUGATE_SYMMETRY,
POSITIVE_DEFINITENESS,
NORM,
ANGLE,
ORTHOGONALITY,
HILBERT_SPACE,
CAUCHY_SCHWARZ_INEQUALITY,
PARALLELOGRAM_IDENTITY,
ORTHONORMAL_BASIS
}
# ---------- BASIC DEFINITION ----------
let
V
:= VECTOR_SPACE
over(FIELD F)
INNER_PRODUCT
:= mapping(
V x V -> F
)
(x,y)
-> <x,y>
F
-> REAL_NUMBERS
or(COMPLEX_NUMBERS)
in(STANDARD_CONTEXT)
# ---------- REAL INNER PRODUCT AXIOMS ----------
for real vector space:
SYMMETRY:
<x,y>
=
<y,x>
LINEARITY:
<alpha*x + beta*y, z>
=
alpha*<x,z>
+
beta*<y,z>
POSITIVE_DEFINITENESS:
<x,x> >= 0
and
<x,x> = 0
iff
x = ZERO_VECTOR
# ---------- COMPLEX INNER PRODUCT AXIOMS ----------
for complex vector space:
CONJUGATE_SYMMETRY:
<x,y>
=
conjugate(<y,x>)
SESQUILINEARITY
-> linear_in_one_argument
-> conjugate_linear_in_other_argument
CONVENTION
-> must_specify(WHICH_ARGUMENT_IS_LINEAR)
POSITIVE_DEFINITENESS:
<x,x>
-> REAL_NONNEGATIVE
# ---------- INDUCED NORM ----------
||x||
:= sqrt(<x,x>)
INNER_PRODUCT
-> induces(NORM)
INNER_PRODUCT_NORM
-> satisfies(NORM_AXIOMS)
# ---------- DISTANCE ----------
d(x,y)
:= ||x-y||
INNER_PRODUCT
-> indirectly_induces(METRIC)
METRIC
-> defines(CONVERGENCE_AND_COMPLETENESS)
# ---------- CAUCHY-SCHWARZ ----------
abs(<x,y>)
<=
||x||*||y||
CAUCHY_SCHWARZ_INEQUALITY
-> fundamental_bound_on(INNER_PRODUCT)
equality
-> occurs_when(x_and_y_linearly_dependent)
under(STANDARD_NONZERO_CONTEXT)
# ---------- ANGLE ----------
for real inner-product space
and nonzero x,y:
cos(theta)
:=
<x,y>
/
(||x||*||y||)
ANGLE
-> derived_from(INNER_PRODUCT)
in complex spaces:
geometric_angle
-> requires(CONVENTION_OR_REAL_PART_INTERPRETATION)
# ---------- ORTHOGONALITY ----------
x
-> ORTHOGONAL_TO(y)
iff
<x,y>
= 0
ORTHOGONALITY
-> generalises(PERPENDICULARITY)
# ---------- PYTHAGOREAN IDENTITY ----------
if
<x,y> = 0
then
||x+y||^2
=
||x||^2
+
||y||^2
PYTHAGOREAN_IDENTITY
-> follows_from(ORTHOGONALITY)
# ---------- PARALLELOGRAM IDENTITY ----------
for norm induced by inner product:
||x+y||^2
+
||x-y||^2
=
2||x||^2
+
2||y||^2
PARALLELOGRAM_IDENTITY
-> characterises(INNER_PRODUCT_NORMS)
# ---------- POLARISATION IDENTITY ----------
INNER_PRODUCT
-> recoverable_from(NORM)
when(NORM_SATISFIES_PARALLELOGRAM_LAW)
real case:
<x,y>
=
1/4 * (
||x+y||^2
-
||x-y||^2
)
complex case:
-> uses(COMPLEX_POLARISATION_IDENTITY)
dependent_on(LINEARITY_CONVENTION)
# ---------- EUCLIDEAN INNER PRODUCT ----------
for
x,y in R^n
<x,y>
:=
sum(
x_i*y_i
)
EUCLIDEAN_INNER_PRODUCT
~= DOT_PRODUCT
INDUCED_NORM
-> EUCLIDEAN_NORM
# ---------- COMPLEX VECTOR INNER PRODUCT ----------
for
x,y in C^n
under convention linear_in_first_argument:
<x,y>
:=
sum(
x_i * conjugate(y_i)
)
HERMITIAN_INNER_PRODUCT
-> standard_complex_inner_product
# ---------- WEIGHTED INNER PRODUCT ----------
for positive weights w_i:
<x,y>_w
:=
sum(
w_i*x_i*conjugate(y_i)
)
WEIGHTED_INNER_PRODUCT
-> modifies(GEOMETRY)
WEIGHTS
-> must_support(POSITIVE_DEFINITENESS)
# ---------- FUNCTION SPACE INNER PRODUCT ----------
for functions f,g:
<f,g>
:=
integral(
f(x)
* conjugate(g(x))
* w(x)
dx
)
WEIGHT_FUNCTION
-> defines(WEIGHTED_L2_GEOMETRY)
L2_SPACE
-> INNER_PRODUCT_SPACE
# ---------- HILBERT SPACE ----------
INNER_PRODUCT_SPACE
+ COMPLETENESS
-> HILBERT_SPACE
HILBERT_SPACE
-> complete_under(INNER_PRODUCT_NORM)
INNER_PRODUCT
-> fundamental_structure_of(HILBERT_SPACE)
# ---------- ORTHONORMAL SET ----------
set
{e_i}
-> ORTHONORMAL
iff
<e_i,e_j>
= delta_ij
ORTHONORMAL
-> ORTHOGONAL
-> UNIT_NORM
# ---------- FOURIER COEFFICIENT ----------
for orthonormal system:
c_n
:= <x,e_n>
FOURIER_COEFFICIENT
-> projection_of(x onto e_n)
ORTHONORMAL_BASIS
-> supports(EXPANSION)
x
= sum(
<x,e_n>*e_n
)
under(COMPLETENESS_AND_CONVERGENCE_CONDITIONS)
# ---------- PROJECTION ----------
for nonzero vector u:
projection_of_x_onto_u
:=
(<x,u>/<u,u>) * u
for unit vector e:
projection
=
<x,e>*e
INNER_PRODUCT
-> determines(ORTHOGONAL_PROJECTION)
# ---------- GRAM MATRIX ----------
for vectors
v_1,...,v_n
GRAM_MATRIX
:= [
<v_i,v_j>
]
GRAM_MATRIX
-> positive_semidefinite
GRAM_DETERMINANT
-> detects(LINEAR_DEPENDENCE)
under(FINITE_SET_CONTEXT)
# ---------- ADJOINT RELATION ----------
for operator T on inner-product space:
ADJOINT T_star
-> satisfies
<Tx,y>
=
<x,T_star y>
INNER_PRODUCT
-> defines(ADJOINT_OPERATOR)
SELF_ADJOINT_OPERATOR
-> T = T_star
# ---------- RIESZ REPRESENTATION ----------
for Hilbert space H:
every continuous linear functional f
-> represented_by(inner_product_with_unique_vector)
f(x)
= <x,y>
subject_to
convention
RIESZ_REPRESENTATION
-> connects(INNER_PRODUCT, DUAL_SPACE)
# ---------- APPLICATIONS ----------
INNER_PRODUCT
-> applied_to(GEOMETRY)
-> applied_to(FOURIER_ANALYSIS)
-> applied_to(QUANTUM_MECHANICS)
-> applied_to(LEAST_SQUARES)
-> applied_to(SIGNAL_PROCESSING)
-> applied_to(FUNCTIONAL_ANALYSIS)
-> applied_to(MACHINE_LEARNING)
# ---------- RELATION GRAPH ----------
VECTOR_SPACE
+ INNER_PRODUCT
-> INNER_PRODUCT_SPACE
INNER_PRODUCT
-> induces(NORM)
INNER_PRODUCT
-> defines(ORTHOGONALITY)
INNER_PRODUCT
-> defines(ANGLE)
INNER_PRODUCT_SPACE
+ COMPLETENESS
-> HILBERT_SPACE
ORTHONORMAL_BASIS
-> supports(FOURIER_EXPANSION)
INNER_PRODUCT
-> defines(ADJOINT_OPERATOR)
# ---------- SEMANTIC EQUIVALENCE ----------
SEMANTIC_EQUIVALENCE := {
"inner product" ~= "positive-definite scalar pairing generalising the Euclidean dot product",
"dot product" ~= "standard Euclidean inner product",
"Hermitian inner product" ~= "complex inner product with conjugate symmetry",
"orthogonal" ~= "having zero inner product",
"inner-product norm" ~= "norm defined by square root of self-inner-product",
"orthonormal" ~= "mutually orthogonal with unit norm"
}
# ---------- CONSTRAINTS ----------
CONSTRAINTS := {
inner_product_must_be_positive_definite: true,
complex_inner_product_requires_conjugate_symmetry: true,
complex_linearity_convention_must_be_preserved: true,
inner_product_induces_norm: true,
not_every_norm_is_induced_by_inner_product: true,
angle_formula_requires_nonzero_vectors: true,
projection_formula_requires_nonzero_projection_vector: true
}
# ---------- CONFIDENCE ----------
CONFIDENCE := {
core_definition: 0.99,
axiom_structure: 0.99,
norm_relation: 0.99,
orthogonality_relation: 0.99,
cauchy_schwarz_relation: 0.99,
hilbert_space_relation: 0.99,
semantic_equivalence: 0.97
}
# ---------- RECURSIVE REASONING ----------
RECURSIVE_REASONING(query):
identify(vector_space)
-> identify(candidate_pairing)
-> identify(real_or_complex_scalar_field)
-> verify(linearity_or_sesquilinearity)
-> verify(symmetry_or_conjugate_symmetry)
-> verify(positive_definiteness)
-> classify(as_inner_product_or_invalid_pairing)
-> construct(induced_norm)
-> analyse(angle_orthogonality_or_projection_if_requested)
-> analyse(basis_adjoint_or_hilbert_structure_if_relevant)
-> preserve(complex_linearity_convention)
-> return(semantic_result)
# ---------- AI CONSUMPTION ----------
AI_CONSUMPTION := {
parse_as: "typed inner-product semantic graph",
primary_entity: INNER_PRODUCT,
preserve: [
vector_space,
scalar_field,
linearity_convention,
pairing_formula,
induced_norm,
orthogonality,
weight_function
],
infer_through: [
norms,
metrics,
angles,
projections,
orthonormal_bases,
hilbert_spaces,
adjoint_operators,
riesz_representation
],
avoid: [
treating_arbitrary_bilinear_form_as inner product,
omitting_conjugation_in complex spaces,
switching_linearity convention mid-calculation,
assuming_every_norm_has inner product,
dividing_by_zero_norm_in angle_or_projection,
confusing_inner_product_with norm
]
}
# ---------- UPDATE MODEL ----------
UPDATE_MODEL(new_information):
validate(new_information)
-> identify(inner_product_context)
-> compare(existing_relations)
-> preserve(pairing_axiom_and_convention_invariants)
-> update(affected_entities)
-> update(affected_edges)
-> recompute(CONFIDENCE)
-> regenerate(FLOW_HASH)
# ---------- FLOW HASH ----------
FLOW_HASH := hash(
SOURCE_URL
+ ENTITY
+ CONCEPTS
+ INNER_PRODUCT
+ INNER_PRODUCT_PROPERTIES
+ CAUCHY_SCHWARZ_INEQUALITY
+ ORTHOGONALITY
+ PARALLELOGRAM_IDENTITY
+ ORTHONORMAL_BASIS
+ PROJECTION
+ RIESZ_REPRESENTATION
+ SEMANTIC_EQUIVALENCE
+ CONSTRAINTS
)
# ---------- EXECUTION ----------
INPUT(query)
-> INNER_PRODUCT
-> VECTOR_SPACE_IDENTIFICATION
-> SCALAR_FIELD_IDENTIFICATION
-> PAIRING_IDENTIFICATION
-> AXIOM_VALIDATION
-> INNER_PRODUCT_CLASSIFICATION
-> NORM_CONSTRUCTION
-> ANGLE_ORTHOGONALITY_ANALYSIS
-> PROJECTION_BASIS_ANALYSIS
-> ADJOINT_HILBERT_ANALYSIS
-> CONVENTION_VALIDATION
-> RECURSIVE_REASONING(query)
-> CONFIDENCE
-> OUTPUT(semantic_result)
END FLOW
Download Code
Copy to Clipboard