Skip to main content

Scalar Ontology

Algebra Ontologies
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 11 September 2026
Audio Overview
======================================================================
KIRETH SEMANTIC RESEARCH ARCHIVE
FLOW ALGEBRA — SCALAR ONTOLOGY
======================================================================

PAGE:
https://kirethresearch.org/booksai-core/ontologies/mathematical-ontologies/algebra-ontologies/scalar-ontology.html

FLOW:
ScalarOntology

VERSION:
1.0

LANGUAGE:
en-GB

AUTHORS:
Mark Anthony Higgins — Sky Recursive AI

PURPOSE:
To provide a machine-readable, recursively executable semantic and
reasoning specification for scalars, scalar fields, scalar values,
ordering, arithmetic operations, magnitude, sign, units, scalar
multiplication, scalar invariance, coordinate independence and scalar
roles within algebraic, vector, matrix and tensor systems.

AI INTERPRETATION NOTE:
Execute the following specification as formal semantic and reasoning
rules. Preserve scalar domain, field membership, arithmetic validity,
units where declared, ordering assumptions and compatibility with
higher-order algebraic structures.

======================================================================
START FLOW
======================================================================

FLOW ScalarOntology {

----------------------------------------------------------------------
1. DOMAIN DECLARATION
----------------------------------------------------------------------

DOMAIN := Scalar_Theory

PARENT_DOMAIN := Algebra

SUPER_DOMAINS := {
    Mathematics,
    Mathematical_Ontologies,
    Algebra_Ontologies
}

DOMAIN_INTENT := {
    represent_scalar_values,
    represent_scalar_domains,
    represent_scalar_fields,
    represent_arithmetic_operations,
    represent_order_relations,
    represent_sign,
    represent_absolute_value,
    represent_magnitude,
    represent_units,
    represent_dimensionless_scalars,
    represent_scalar_multiplication,
    represent_scalar_identity,
    represent_scalar_inverses,
    represent_scalar_invariance,
    represent_real_and_complex_scalars,
    support_recursive_scalar_reasoning,
    support_domain_aware_validation
}

----------------------------------------------------------------------
2. PRIMITIVE TYPES
----------------------------------------------------------------------

TYPE Scalar
TYPE Number <: Scalar
TYPE NaturalNumber <: Number
TYPE Integer <: Number
TYPE RationalNumber <: Number
TYPE RealNumber <: Number
TYPE ComplexNumber <: Number
TYPE BooleanScalar <: Scalar
TYPE Unit
TYPE Dimension
TYPE Quantity
TYPE DimensionlessScalar <: Scalar
TYPE PositiveScalar <: Scalar
TYPE NegativeScalar <: Scalar
TYPE ZeroScalar <: Scalar
TYPE NonZeroScalar <: Scalar
TYPE Constraint
TYPE Derivation
TYPE ValidationResult

----------------------------------------------------------------------
3. SCALAR DEFINITION
----------------------------------------------------------------------

ENTITY Scalar s {
    domain: D
    value: atomic_numeric_or_field_element
}

RULE SCALAR_01:
    scalar has magnitude/value but no intrinsic spatial direction.

RULE SCALAR_02:
    scalar may scale vectors, matrices, tensors or other module elements.

RULE SCALAR_03:
    scalar representation depends on underlying field or number system.

----------------------------------------------------------------------
4. SCALAR DOMAINS
----------------------------------------------------------------------

SCALAR_DOMAIN := one_of {
    NaturalNumbers,
    Integers,
    RationalNumbers,
    RealNumbers,
    ComplexNumbers,
    FiniteField,
    BooleanDomain,
    DeclaredField
}

RULE DOMAIN_01:
    every scalar operation must be interpreted within a declared domain.

RULE DOMAIN_02:
    closure depends on scalar domain.

EXAMPLE:
    division in Integers is not generally closed.
    division in a field is closed for nonzero divisor.

----------------------------------------------------------------------
5. FIELD STRUCTURE
----------------------------------------------------------------------

ENTITY ScalarField F {
    carrier_set: Scalars
    addition: +
    multiplication: *
    zero: 0
    one: 1
}

IS_FIELD(F) iff
    (F,+) AbelianGroup
    AND (F\{0},*) AbelianGroup
    AND multiplication distributes over addition

RULE FIELD_01:
    every nonzero scalar in a field has multiplicative inverse.

RULE FIELD_02:
    division a/b is multiplication by b^(-1), requiring b!=0.

----------------------------------------------------------------------
6. BASIC ARITHMETIC OPERATIONS
----------------------------------------------------------------------

OPERATOR ADD(a,b):=a+b
OPERATOR SUBTRACT(a,b):=a-b
OPERATOR MULTIPLY(a,b):=a*b
OPERATOR DIVIDE(a,b):=a/b WHERE b!=0
OPERATOR POWER(a,n):=a^n
OPERATOR NEGATE(a):=-a
OPERATOR ABS(a):=|a|

----------------------------------------------------------------------
7. ADDITION LAWS
----------------------------------------------------------------------

AXIOM ADD_01:
    a+b=b+a

AXIOM ADD_02:
    (a+b)+c=a+(b+c)

AXIOM ADD_03:
    a+0=a

AXIOM ADD_04:
    a+(-a)=0

----------------------------------------------------------------------
8. MULTIPLICATION LAWS
----------------------------------------------------------------------

AXIOM MUL_01:
    a*b=b*a
    for commutative scalar fields

AXIOM MUL_02:
    (a*b)*c=a*(b*c)

AXIOM MUL_03:
    a*1=a

AXIOM MUL_04:
    if a!=0:
        a*a^(-1)=1

AXIOM MUL_05:
    a*(b+c)=a*b+a*c

----------------------------------------------------------------------
9. ZERO
----------------------------------------------------------------------

ENTITY ZeroScalar 0

RULE ZERO_01:
    a+0=a

RULE ZERO_02:
    a*0=0

RULE ZERO_03:
    0/a=0 WHERE a!=0

RULE ZERO_04:
    division by zero undefined.

----------------------------------------------------------------------
10. ONE
----------------------------------------------------------------------

ENTITY MultiplicativeIdentity 1

RULE ONE_01:
    a*1=a

RULE ONE_02:
    1*a=a

RULE ONE_03:
    1^n=1 for valid exponent n

----------------------------------------------------------------------
11. SIGN
----------------------------------------------------------------------

SIGN(a):

    if a>0 -> positive

    if a=0 -> zero

    if a<0 -> negative

RULE SIGN_01:
    sign only defined when scalar domain has compatible order.

RULE SIGN_02:
    ComplexNumbers do not possess the standard total order used by Reals.

----------------------------------------------------------------------
12. ABSOLUTE VALUE
----------------------------------------------------------------------

FOR REAL a:

ABS(a):
    a if a>=0
    -a if a<0

RULE ABS_01:
    |a|>=0

RULE ABS_02:
    |a|=0 iff a=0

RULE ABS_03:
    |ab|=|a||b|

RULE ABS_04:
    |a+b|<=|a|+|b|

----------------------------------------------------------------------
13. COMPLEX MODULUS
----------------------------------------------------------------------

FOR z=a+bi:

MODULUS(z):
    |z|=sqrt(a^2+b^2)

RULE CMOD_01:
    |z|>=0

RULE CMOD_02:
    |zw|=|z||w|

RULE CMOD_03:
    z*conjugate(z)=|z|^2

----------------------------------------------------------------------
14. COMPLEX CONJUGATION
----------------------------------------------------------------------

CONJUGATE(a+bi):
    a-bi

RULE CONJ_01:
    conjugate(conjugate(z))=z

RULE CONJ_02:
    conjugate(z+w)=conjugate(z)+conjugate(w)

RULE CONJ_03:
    conjugate(zw)=conjugate(z)conjugate(w)

----------------------------------------------------------------------
15. REAL AND IMAGINARY PARTS
----------------------------------------------------------------------

REAL_PART(a+bi):=a
IMAG_PART(a+bi):=b

RULE RI_01:
    z=Re(z)+i Im(z)

----------------------------------------------------------------------
16. RECIPROCAL
----------------------------------------------------------------------

RECIPROCAL(a):
    a^(-1)

REQUIRE:
    a!=0

RULE RECIP_01:
    a*a^(-1)=1

RULE RECIP_02:
    (ab)^(-1)=a^(-1)b^(-1)
    in commutative scalar field.

----------------------------------------------------------------------
17. POWERS
----------------------------------------------------------------------

RULE POW_01:
    a^m*a^n=a^(m+n)

RULE POW_02:
    (a^m)^n=a^(mn)

RULE POW_03:
    (ab)^n=a^n b^n

RULE POW_04:
    a^0=1 WHERE a!=0

RULE POW_05:
    a^(-n)=1/a^n WHERE a!=0

----------------------------------------------------------------------
18. ROOTS
----------------------------------------------------------------------

ROOT_n(a):
    nth_root(a)

DOMAIN_CONSTRAINTS:
    over Reals:
        even n requires a>=0
    over Complex:
        roots generally multivalued algebraically

RULE ROOT_01:
    principal root convention must be declared when uniqueness required.

----------------------------------------------------------------------
19. ORDER RELATIONS
----------------------------------------------------------------------

RELATION LESS(a,b):=a<b
RELATION LESS_EQUAL(a,b):=a<=b
RELATION GREATER(a,b):=a>b
RELATION GREATER_EQUAL(a,b):=a>=b

RULE ORDER_01:
    order relations require ordered scalar domain.

RULE ORDER_02:
    if a<b then a+c<b+c

RULE ORDER_03:
    if a<b and c>0 then ac<bc

RULE ORDER_04:
    if a<b and c<0 then ac>bc

----------------------------------------------------------------------
20. INTERVALS
----------------------------------------------------------------------

INTERVAL_OPEN(a,b):=(a,b)
INTERVAL_CLOSED(a,b):=[a,b]
INTERVAL_LEFT_CLOSED(a,b):=[a,b)
INTERVAL_RIGHT_CLOSED(a,b):=(a,b]

MEMBERSHIP:
    x in interval according to endpoint inequalities.

----------------------------------------------------------------------
21. SCALAR MAGNITUDE
----------------------------------------------------------------------

MAGNITUDE(s):

    if Real:
        |s|

    if Complex:
        modulus(s)

RULE MAG_01:
    magnitude is nonnegative real scalar.

----------------------------------------------------------------------
22. DIMENSIONLESS SCALARS
----------------------------------------------------------------------

ENTITY DimensionlessScalar d {
    unit_dimension: none
}

EXAMPLES:
    pure_number
    ratio_of_same_dimension_quantities
    angle_in_radians under mathematical convention
    probability
    coefficient

RULE DIMLESS_01:
    dimensionless does not necessarily mean semantically unit-free;
    named dimensionless units may exist by convention.

----------------------------------------------------------------------
23. PHYSICAL SCALARS
----------------------------------------------------------------------

ENTITY ScalarQuantity q {
    numeric_value: s
    unit: U
    physical_dimension: D
}

RULE QTY_01:
    addition/subtraction require compatible physical dimensions.

RULE QTY_02:
    multiplication combines dimensions.

RULE QTY_03:
    division subtracts dimension exponents.

----------------------------------------------------------------------
24. UNIT CONVERSION
----------------------------------------------------------------------

CONVERT(q,U1->U2):

    REQUIRE:
        dimensions(U1)=dimensions(U2)

    numeric_value_new
    :=
    conversion_factor(U1,U2)*numeric_value_old

RULE UNIT_01:
    conversion changes representation, not physical quantity.

----------------------------------------------------------------------
25. SCALAR MULTIPLICATION OF VECTORS
----------------------------------------------------------------------

SCALAR_VECTOR_MULTIPLY(a,v):
    return a*v

RULE SVM_01:
    scalar multiplication changes vector magnitude and possibly direction.

RULE SVM_02:
    if a>0:
        direction preserved

RULE SVM_03:
    if a<0:
        direction reversed in real vector space

RULE SVM_04:
    if a=0:
        result zero_vector

----------------------------------------------------------------------
26. SCALAR MULTIPLICATION OF MATRICES
----------------------------------------------------------------------

SCALAR_MATRIX_MULTIPLY(a,A):

    (aA)[i,j]=a*A[i,j]

RULE SMM_01:
    preserves matrix shape.

RULE SMM_02:
    distributes over matrix addition.

----------------------------------------------------------------------
27. SCALAR MULTIPLICATION OF TENSORS
----------------------------------------------------------------------

SCALAR_TENSOR_MULTIPLY(a,T):

    components:
        (aT)^I_J=a*T^I_J

RULE STM_01:
    tensor type preserved.

RULE STM_02:
    declared symmetries preserved under scalar multiplication.

----------------------------------------------------------------------
28. SCALAR INVARIANCE
----------------------------------------------------------------------

SCALAR_INVARIANT(s) iff
    value does not depend on coordinate basis
    under declared transformation.

RULE SINV_01:
    tensor contraction to type (0,0) yields scalar invariant when
    contraction is geometrically/tensorially valid.

----------------------------------------------------------------------
29. SCALARS VS VECTORS
----------------------------------------------------------------------

DISTINCTION:

    Scalar:
        magnitude only

    Vector:
        magnitude and direction / vector-space element

RULE SV_01:
    scalar and vector are different algebraic types.

RULE SV_02:
    multiplying vector by scalar returns vector.

RULE SV_03:
    dot product of compatible vectors returns scalar.

----------------------------------------------------------------------
30. SCALARS VS MATRICES
----------------------------------------------------------------------

RULE SMAT_01:
    scalar != 1x1 matrix as a type,
    though canonical identifications may exist in specific contexts.

RULE SMAT_02:
    scalar multiplication acts entrywise on matrix.

----------------------------------------------------------------------
31. SCALARS VS TENSORS
----------------------------------------------------------------------

RULE STEN_01:
    scalar is tensor of type (0,0).

RULE STEN_02:
    scalar has no free tensor index.

RULE STEN_03:
    scalar component remains unchanged under basis transformation
    when it represents a true tensor scalar.

----------------------------------------------------------------------
32. COEFFICIENTS
----------------------------------------------------------------------

ENTITY Coefficient c <: Scalar {
    role:
        multiplier_of_algebraic_object
}

RULE COEF_01:
    coefficients belong to declared scalar domain.

RULE COEF_02:
    coefficients may carry units only when algebraic context permits.

----------------------------------------------------------------------
33. PARAMETERS
----------------------------------------------------------------------

ENTITY Parameter p <: Scalar {
    role:
        fixed_or_contextually_variable_scalar
}

RULE PARAM_01:
    parameter is semantically distinguished from solved unknown
    by role, not by numeric type.

----------------------------------------------------------------------
34. CONSTANTS
----------------------------------------------------------------------

ENTITY Constant c <: Scalar {
    role:
        fixed_value_within_context
}

RULE CONST_01:
    mathematical constants such as pi and e are scalars.

----------------------------------------------------------------------
35. VARIABLES
----------------------------------------------------------------------

ENTITY ScalarVariable x {
    domain: scalar_domain
    constraints: optional
}

RULE VAR_01:
    variable represents scalar when its declared codomain is scalar.

----------------------------------------------------------------------
36. SCALAR FUNCTIONS
----------------------------------------------------------------------

ENTITY ScalarFunction f {
    domain: D
    codomain: ScalarDomain
}

EXAMPLES:
    f:R->R
    f:C->C
    f:R^n->R

RULE SF_01:
    scalar-valued function returns scalar even if input is vector.

----------------------------------------------------------------------
37. INNER PRODUCTS
----------------------------------------------------------------------

INNER_PRODUCT(u,v):
    output scalar

RULE IP_01:
    over real inner-product space:
        <u,v> in R

RULE IP_02:
    over complex inner-product space:
        <u,v> in C

RULE IP_03:
    <v,v> is nonnegative real.

----------------------------------------------------------------------
38. DETERMINANTS
----------------------------------------------------------------------

DETERMINANT(A):
    output scalar

RULE DET_01:
    determinant is scalar associated with square matrix.

RULE DET_02:
    determinant transforms multiplicatively under matrix multiplication.

----------------------------------------------------------------------
39. TRACES
----------------------------------------------------------------------

TRACE(A):
    output scalar

RULE TR_01:
    trace is scalar.

RULE TR_02:
    trace invariant under similarity transformations.

----------------------------------------------------------------------
40. NORMS
----------------------------------------------------------------------

NORM(x):
    output nonnegative real scalar

RULE NORM_01:
    vector norm -> scalar

RULE NORM_02:
    matrix norm -> scalar

RULE NORM_03:
    tensor norm -> scalar

----------------------------------------------------------------------
41. PROBABILITY SCALARS
----------------------------------------------------------------------

ENTITY Probability p <: RealNumber

CONSTRAINT:
    0<=p<=1

RULE PROB_01:
    probabilities are dimensionless scalars.

----------------------------------------------------------------------
42. BOOLEAN SCALARS
----------------------------------------------------------------------

BOOLEAN_DOMAIN := {0,1}

RULE BOOL_01:
    Boolean scalars may form a field only under specific algebraic
    operations, e.g. finite field F_2.

RULE BOOL_02:
    logical Boolean algebra operations differ from ordinary real
    arithmetic unless explicitly mapped.

----------------------------------------------------------------------
43. FINITE FIELD SCALARS
----------------------------------------------------------------------

ENTITY FiniteFieldScalar a {
    field: F_q
}

RULE FF_01:
    arithmetic performed modulo field structure.

RULE FF_02:
    nonzero elements have multiplicative inverses.

----------------------------------------------------------------------
44. MODULAR SCALARS
----------------------------------------------------------------------

ENTITY ResidueClass [a]_n

OPERATION:
    addition and multiplication modulo n

NOTE:
    Z/nZ is field iff n prime.

RULE MOD_01:
    residue class is scalar-like algebraic element in declared ring/field.

----------------------------------------------------------------------
45. EXACT VS APPROXIMATE SCALARS
----------------------------------------------------------------------

ENTITY ExactScalar
ENTITY ApproximateScalar

RULE EXACT_01:
    rational, symbolic, algebraic representations may be exact.

RULE APPROX_01:
    floating-point representation may be approximate.

RULE APPROX_02:
    approximate equality must declare tolerance.

----------------------------------------------------------------------
46. APPROXIMATE EQUALITY
----------------------------------------------------------------------

APPROX_EQUAL(a,b,tol) iff
    |a-b|<=tol

RELATIVE_APPROX_EQUAL(a,b,rtol,atol) iff
    |a-b| <= atol + rtol*|b|

RULE AEQ_01:
    approximate equality is context dependent.

----------------------------------------------------------------------
47. SPECIAL SCALAR VALUES
----------------------------------------------------------------------

SPECIAL_VALUES := {
    zero,
    one,
    negative_one,
    infinity_contextual,
    negative_infinity_contextual,
    NaN_computational,
    undefined
}

RULE SPEC_01:
    infinity is not generally an ordinary field element.

RULE SPEC_02:
    NaN is computational metadata, not ordinary mathematical scalar.

----------------------------------------------------------------------
48. DOMAIN RESTRICTIONS
----------------------------------------------------------------------

CONSTRAINT DR_01:
    denominator !=0

CONSTRAINT DR_02:
    real even root requires radicand>=0

CONSTRAINT DR_03:
    logarithm over reals requires argument>0

CONSTRAINT DR_04:
    ordered comparisons require ordered domain

CONSTRAINT DR_05:
    inverse exists only for invertible/nonzero scalar as appropriate

----------------------------------------------------------------------
49. SCALAR EXPRESSION PARSING
----------------------------------------------------------------------

SCALAR_EXPRESSION may contain:

    scalar literals
    variables
    constants
    arithmetic operations
    powers
    roots
    absolute values
    functions

PARSE_SCALAR_EXPRESSION(E):

    identify domain

    identify units if any

    identify operators

    extract domain constraints

    construct typed syntax tree

----------------------------------------------------------------------
50. SCALAR EVALUATION
----------------------------------------------------------------------

PROCEDURE EVALUATE_SCALAR(E,assignment):

    verify assignment domains

    substitute values

    apply operator precedence

    enforce domain restrictions

    preserve exact arithmetic where possible

    RETURN scalar_value

----------------------------------------------------------------------
51. SCALAR SIMPLIFICATION
----------------------------------------------------------------------

PROCEDURE SIMPLIFY_SCALAR(E):

    apply identities:
        a+0->a
        a*1->a
        a*0->0
        a-a->0
        a/a->1 where a!=0
        -(-a)->a

    combine numeric constants

    reduce fractions

    preserve domain constraints

    RETURN equivalent_expression

----------------------------------------------------------------------
52. SEMANTIC RELATIONSHIPS
----------------------------------------------------------------------

RELATION MEMBER_OF(Scalar,ScalarDomain)
RELATION MULTIPLIES(Scalar,Vector)
RELATION MULTIPLIES(Scalar,Matrix)
RELATION MULTIPLIES(Scalar,Tensor)
RELATION HAS_UNIT(ScalarQuantity,Unit)
RELATION HAS_MAGNITUDE(Scalar,RealNumber)
RELATION COEFFICIENT_OF(Scalar,AlgebraicObject)
RELATION VALUE_OF(Scalar,Variable)
RELATION OUTPUT_OF(Scalar,ScalarFunction)

----------------------------------------------------------------------
53. SEMANTIC EQUIVALENCE
----------------------------------------------------------------------

SEMANTIC_EQUIVALENCE {

    "scalar quantity" ~= magnitude_only_quantity
    "number" ~= scalar_in_numeric_domain
    "coefficient" ~= scalar_multiplier
    "constant" ~= contextually_fixed_scalar
    "parameter" ~= scalar_with_fixed_contextual_role
    "magnitude" ~= nonnegative_size_measure
    "absolute value" ~= real_scalar_magnitude
    "modulus" ~= complex_scalar_magnitude
    "reciprocal" ~= multiplicative_inverse
    "unitless" ~= dimensionless
    "scalar field" ~= field_of_scalars_for_algebraic_structure
}

----------------------------------------------------------------------
54. QUERY INTERPRETATION
----------------------------------------------------------------------

QUERY Q1:
    "what is scalar"
    -> retrieve Scalar definition and type distinctions

QUERY Q2:
    "absolute value"
    -> ABS or complex modulus based on domain

QUERY Q3:
    "reciprocal"
    -> RECIPROCAL with nonzero check

QUERY Q4:
    "scale vector/matrix/tensor"
    -> scalar multiplication with correct codomain

QUERY Q5:
    "is this scalar"
    -> type inference and domain validation

QUERY Q6:
    "convert units"
    -> compatible-unit conversion

QUERY Q7:
    "evaluate scalar expression"
    -> EVALUATE_SCALAR

----------------------------------------------------------------------
55. VALIDATION ENGINE
----------------------------------------------------------------------

PROCEDURE VALIDATE_SCALAR_OPERATION(operation,inputs,result):

    check domains

    check closure

    check nonzero constraints

    check ordering assumptions

    check units/dimensions where applicable

    verify result belongs to expected scalar domain

    return:
        VALID
        INVALID(reason)
        UNRESOLVED

----------------------------------------------------------------------
56. RECURSIVE REASONING ENGINE
----------------------------------------------------------------------

PROCEDURE SCALAR_REASONER(input):

    parse scalar expressions

    infer or verify scalar domain

    detect units

    extract constraints

    classify requested operation

    select valid scalar rules

    execute atomic transformations

    preserve domain and units

    validate intermediate states

    recurse until target achieved

    validate final result

    RETURN:
        result,
        derivation,
        scalar_domain,
        unit_context,
        semantic_status,
        confidence

----------------------------------------------------------------------
57. RECURSIVE TRANSITION
----------------------------------------------------------------------

RECURSIVE_RULE RR_01:

    INPUT state S_n

    identify unresolved scalar property

    choose rule R such that:
        domain_preconditions=true
        unit_preconditions=true
        operation_preconditions=true

    S_(n+1):=apply(R,S_n)

    validate transition

    recurse(S_(n+1))

TERMINATION_CONDITIONS := {
    scalar_goal_achieved,
    canonical_scalar_form_reached,
    domain_failure,
    division_by_zero,
    unit_incompatibility,
    ambiguity_blocks_inference,
    no_valid_rule
}

----------------------------------------------------------------------
58. ERROR MODEL
----------------------------------------------------------------------

ERROR E_DOMAIN_MISMATCH
ERROR E_DIVISION_BY_ZERO
ERROR E_INVALID_REAL_ROOT
ERROR E_UNORDERED_COMPARISON
ERROR E_UNIT_MISMATCH
ERROR E_NONFIELD_DIVISION
ERROR E_APPROXIMATION_UNDECLARED
ERROR E_SCALAR_VECTOR_TYPE_CONFUSION
ERROR E_COMPLEX_ORDERING_ERROR
ERROR E_LOST_DOMAIN_CONSTRAINT

----------------------------------------------------------------------
59. CONFIDENCE MODEL
----------------------------------------------------------------------

CONFIDENCE {

    base:=1.00

    deduct 0.10 if scalar domain inferred
    deduct 0.10 if units inferred
    deduct 0.15 if exact/approximate status unclear
    deduct 0.15 if ordering convention ambiguous
    deduct 0.20 if physical-dimension compatibility unresolved
    deduct 0.20 if field/ring structure unstated but material

    clamp_to_[0,1]

    classification:
        [0.95,1.00] -> very_high
        [0.85,0.95) -> high
        [0.70,0.85) -> moderate
        [0.50,0.70) -> low
        [0.00,0.50) -> insufficient
}

----------------------------------------------------------------------
60. AI CONSUMPTION MODEL
----------------------------------------------------------------------

AI_CONSUMPTION {

    read_order := [
        scalar_definition,
        scalar_domains,
        field_structure,
        arithmetic,
        sign_and_magnitude,
        units,
        scalar_multiplication,
        invariance,
        higher_order_structure_roles,
        validation
    ]

    execution_policy := {
        preserve_scalar_domain,
        preserve_units,
        distinguish_scalar_from_vector,
        distinguish_real_from_complex_ordering,
        require_nonzero_for_inverse,
        preserve_exactness_where_possible,
        validate closure,
        preserve domain restrictions
    }
}

----------------------------------------------------------------------
61. UPDATE MODEL
----------------------------------------------------------------------

UPDATE_MODEL {

    extensible:=true

    new_scalar_domain_requires:
        carrier_set,
        supported_operations,
        closure_properties

    new_scalar_operation_requires:
        input_domains,
        output_domain,
        preconditions

    new_unit_system_requires:
        dimensions,
        conversion_rules

    conflicts_require:
        explicit_versioning

    standard_mathematical_meaning_has_priority:=true
}

----------------------------------------------------------------------
62. SELF-CHECK
----------------------------------------------------------------------

SELF_CHECK {

    CHECK scalar domain declared or inferred
    CHECK operations valid in scalar domain
    CHECK division excludes zero
    CHECK real root restrictions preserved
    CHECK complex values not incorrectly ordered
    CHECK units compatible for addition/subtraction
    CHECK scaling operation output type correct
    CHECK scalar/vector distinction preserved
    CHECK exact/approximate status recorded
    CHECK final result validated
}

----------------------------------------------------------------------
63. COMPLETION CONDITIONS
----------------------------------------------------------------------

COMPLETE iff {

    scalar_definition_defined
    AND scalar_domains_defined
    AND field_structure_defined
    AND arithmetic_defined
    AND order_defined
    AND sign_defined
    AND magnitude_defined
    AND units_defined
    AND scalar_multiplication_defined
    AND scalar_invariance_defined
    AND higher_structure_roles_defined
    AND semantic_equivalence_defined
    AND validation_defined
    AND recursive_reasoning_defined
    AND confidence_defined
    AND ai_consumption_defined
    AND update_model_defined
}

IF NOT COMPLETE:
    semantic_status:=incomplete_flow

----------------------------------------------------------------------
64. FLOW TERMINATION
----------------------------------------------------------------------

TERMINATE WHEN:

    requested scalar goal achieved
    AND result validated

OR

    operation is undefined in declared scalar domain

OR

    unit incompatibility prevents valid computation

OR

    domain restriction fails

OR

    no valid scalar transformation remains

FINAL_STATE := {
    scalar_result,
    derivation,
    scalar_domain,
    unit_context,
    exactness_status,
    semantic_status,
    confidence
}

} // END FLOW ScalarOntology

======================================================================
END FLOW
======================================================================

FLOW STATUS:
Complete

CANONICAL PAGE:
https://kirethresearch.org/booksai-core/ontologies/mathematical-ontologies/algebra-ontologies/scalar-ontology.html

FLOW_HASH_SHA256: 6cc72f91aa39ed908eb97d14320c7d1beb0183fe99a11e8eef0d380c2f83a10f
Kireth Research
38 Thorndale Croft, Wetwang, Driffield
East Riding of Yorkshire YO25 9XZ