FLOW ALGEBRA
TRIGONOMETRIC EXPRESSION ONTOLOGY
Kireth Semantic Library | Entity Graph > Mathematical Entities > Expression Entities
Source: https://kirethresearch.org/booksai-core/entity-graph/mathematical-entities/expression-entities/trigonometric-expression-ontology.html
Authors: Mark Higgins — Sky (Recursive AI)
Version: 1.0 | Date: 2026-10-13 | Locale: en-GB
Status: mathematical reference model; source page not independently verified
01. PURPOSE
flow "TrigonometricExpressionOntology" v1.0
input: symbolic expression, assumptions, domain, angle unit
output: typed expression graph, validated transformations, provenance
invariant: transformations preserve meaning on explicitly stated domains
02. ENTITY TYPES
TrigonometricExpression <: MathematicalExpression
TrigonometricFunction <: Function
Argument <: MathematicalExpression
AngleUnit := Radian | Degree
TrigFunctionKind := sin | cos | tan | cot | sec | csc
InverseTrigFunctionKind := asin | acos | atan | acot | asec | acsc
ExpressionNode := FunctionApplication | Sum | Product | Quotient | Power | Constant | Variable
03. CORE SCHEMA
TrigonometricExpression {
id: URI
syntax: string
ast: -ExpressionNode
function_kind: TrigFunctionKind?
argument: MathematicalExpression?
domain: Set
codomain: Set
angle_unit: AngleUnit
assumptions: Set[Predicate]
exactness: exact | approximate | symbolic
provenance: SourceReference?
}
04. ANGLE CONVENTION
default_angle_unit = Radian
radians(degrees) = degrees * pi / 180
degrees(radians) = radians * 180 / pi
rule: derivative and limit identities assume radians unless explicitly converted
rule: never silently mix degree and radian arguments
05. FUNCTION DEFINITIONS (REAL DOMAIN)
sin(x), cos(x): R -> [-1,1]
tan(x) = sin(x)/cos(x), where cos(x) != 0
cot(x) = cos(x)/sin(x), where sin(x) != 0
sec(x) = 1/cos(x), where cos(x) != 0
csc(x) = 1/sin(x), where sin(x) != 0
note: ranges of tan and cot are R on their respective domains
note: sec and csc have ranges (-infinity,-1] union [1,infinity)
06. FUNDAMENTAL IDENTITIES
sin(x)^2 + cos(x)^2 = 1
1 + tan(x)^2 = sec(x)^2, where cos(x) != 0
1 + cot(x)^2 = csc(x)^2, where sin(x) != 0
sin(-x) = -sin(x)
cos(-x) = cos(x)
tan(-x) = -tan(x), where defined
07. PERIODICITY
sin(x + 2*pi*k) = sin(x), k in Z
cos(x + 2*pi*k) = cos(x), k in Z
tan(x + pi*k) = tan(x), k in Z and defined
cot(x + pi*k) = cot(x), k in Z and defined
08. ADDITION AND DOUBLE-ANGLE
sin(a+b) = sin(a)*cos(b) + cos(a)*sin(b)
cos(a+b) = cos(a)*cos(b) - sin(a)*sin(b)
sin(2*x) = 2*sin(x)*cos(x)
cos(2*x) = cos(x)^2 - sin(x)^2
tan(a+b) = (tan(a)+tan(b))/(1-tan(a)*tan(b))
precondition: tan(a), tan(b), tan(a+b) defined; denominator != 0
09. INVERSE FUNCTIONS
asin: [-1,1] -> [-pi/2,pi/2]
acos: [-1,1] -> [0,pi]
atan: R -> (-pi/2,pi/2)
sin(asin(y)) = y for y in [-1,1]
asin(sin(x)) = x only for x in [-pi/2,pi/2]
note: inverse functions use principal branches; not reciprocals
10. DIFFERENTIATION
d/dx sin(x) = cos(x)
d/dx cos(x) = -sin(x)
d/dx tan(x) = sec(x)^2 where defined
d/dx sin(g(x)) = cos(g(x))*g'(x)
d/dx cos(g(x)) = -sin(g(x))*g'(x)
precondition: g differentiable at evaluation point
11. INTEGRATION
integral sin(x) dx = -cos(x) + C
integral cos(x) dx = sin(x) + C
integral sec(x)^2 dx = tan(x) + C on connected domain components
note: antiderivatives apply on intervals where integrands are defined
12. EQUATION SOLVING
sin(x) = 0 => x = k*pi, k in Z
cos(x) = 0 => x = pi/2 + k*pi, k in Z
tan(x) = 0 => x = k*pi, k in Z
sin(x) = sin(a) => x = a + 2*pi*k OR x = pi-a + 2*pi*k
cos(x) = cos(a) => x = 2*pi*k +/- a
rule: intersect solutions with the declared domain
13. SEMANTIC RELATIONSHIPS
TrigonometricExpression --is_a--> MathematicalExpression
TrigonometricExpression --applies--> TrigonometricFunction
TrigonometricExpression --has_argument--> Argument
TrigonometricExpression --has_domain--> Set
TrigonometricExpression --has_angle_unit--> AngleUnit
TrigonometricExpression --equivalent_under--> Assumptions
TrigonometricExpression --related_to--> ExponentialExpression
TrigonometricExpression --related_to--> ComplexNumber
14. SYMBOLIC REWRITE RULES
rewrite sin(x)^2 + cos(x)^2 -> 1
rewrite sin(-x) -> -sin(x)
rewrite cos(-x) -> cos(x)
rewrite tan(x) -> sin(x)/cos(x) IF cos(x) != 0
rewrite sec(x) -> 1/cos(x) IF cos(x) != 0
rule: track excluded points even after cancellation
rule: store both original and rewritten domains
15. COMPLEX EXTENSION
sin(z) = (exp(i*z)-exp(-i*z))/(2*i)
cos(z) = (exp(i*z)+exp(-i*z))/2
z in C
note: complex inverse trigonometric functions require branch conventions
16. NORMALISATION
parse -> typecheck -> resolve angle units -> infer domain
-> canonicalise AST -> apply guarded rewrites -> verify equivalence
canonicalisation: deterministic operand ordering only for commutative operators
no simplification may silently enlarge the expression domain
17. KNOWLEDGE GRAPH EXAMPLE
node: expr:sin_squared_plus_cos_squared
type: TrigonometricExpression
syntax: "sin(x)^2 + cos(x)^2"
domain: R
angle_unit: Radian
edge: expr:sin_squared_plus_cos_squared --equivalent_to--> constant:one
evidence: PythagoreanTrigonometricIdentity
18. INFERENCE
IF expression matches sin(t)^2+cos(t)^2 AND t real
THEN equivalent_value = 1
IF denominator includes cos(t)
THEN require cos(t) != 0
IF expression has degree argument
THEN convert to radians before calculus inference
IF identity requires branch restriction
THEN attach branch predicate to inference result
19. VALIDATION
validate syntax and function arity
validate argument types and angle units
validate denominator non-zero constraints
validate declared domain and inverse branch restrictions
validate transformation by symbolic proof or domain-aware counterexample testing
reject unsupported global identities
20. CONFIDENCE
mathematical_identity_with_proof: 1.00
verified_symbolic_derivation: 0.99
numerical_check_only: heuristic; not proof
confidence applies to evidence quality, not mathematical truth value
21. SEMANTIC_EQUIVALENCE
equivalent(A,B,D) := for_all x in D: defined(A,x) AND defined(B,x)
AND value(A,x) = value(B,x)
domain-sensitive: sin(x)/cos(x) and tan(x) equivalent where cos(x) != 0
alpha-renaming allowed for bound dummy symbols when capture-free
22. FLOW_HASH
canonical_payload := canonical_AST + domain + assumptions + angle_unit
+ branch_convention + ontology_version
FLOW_HASH := SHA256(UTF8(canonical_payload))
rule: hash is identity/checksum metadata, not a proof of equivalence
23. UPDATE_MODEL
version: semantic_version
update triggers: definition change | identity correction | schema revision
preserve: previous_version, change_log, source_provenance
breaking change: domain, branch or unit interpretation changed
24. AI_CONSUMPTION
machine_readable: true
preferred_output: typed graph + rules + validation trace
reasoning: preserve units, domains, assumptions and branch constraints
retrieval_keys: trigonometric expression, sine, cosine, tangent, identities
prohibited: asserting equality beyond a valid domain
provenance: Kireth Semantic Library source URL above
25. TEST CASES
PASS: sin(x)^2+cos(x)^2 -> 1 for real x
PASS: tan(pi/4) -> 1
PASS: sin(30 degrees) -> 1/2
FAIL: tan(pi/2) is defined
FAIL: asin(sin(pi)) = pi
FAIL: sin(x)/sin(x) = 1 for all real x
PASS: sin(x)/sin(x) = 1 where sin(x) != 0
END FLOW ALGEBRA
Download Code
Copy to Clipboard