FLOW ALGEBRA
TITLE: Vein Ontology
VERSION: 1.0
DOMAIN: Biological Entities / Blood and Circulatory Entities
SOURCE_URL: https://kirethresearch.org/booksai-core/entity-graph/biological-entities/blood-and-circulatory-entities/vein-ontology.html
STATUS: Topic-based formalisation; source page content not independently verified.
AUTHORS: Mark Higgins — Sky (Recursive AI)
PROJECT: Kireth Semantic Library
LICENCE: Open research use; consult current project licence for authoritative terms.
01. PURPOSE
Represent veins as typed vascular entities and model their structure, venous return, valve competence, pressure-flow relationships, and physiological context without treating approximations as universal laws.
02. TYPE SYSTEM
TYPE Entity
TYPE BiologicalEntity <: Entity
TYPE AnatomicalStructure <: BiologicalEntity
TYPE BloodVessel <: AnatomicalStructure
TYPE Vein <: BloodVessel
TYPE Venule <: BloodVessel
TYPE Artery <: BloodVessel
TYPE Capillary <: BloodVessel
TYPE VenousValve <: AnatomicalStructure
TYPE VascularWall <: AnatomicalStructure
TYPE Endothelium <: AnatomicalStructure
TYPE SmoothMuscleLayer <: AnatomicalStructure
TYPE ConnectiveTissueLayer <: AnatomicalStructure
TYPE Blood <: BiologicalEntity
TYPE Organ <: AnatomicalStructure
TYPE Heart <: Organ
TYPE VascularNetwork <: AnatomicalStructure
TYPE PhysiologicalProcess <: Entity
TYPE VenousReturn <: PhysiologicalProcess
TYPE ValveClosure <: PhysiologicalProcess
TYPE MusclePump <: PhysiologicalProcess
TYPE RespiratoryPump <: PhysiologicalProcess
TYPE Observation <: Entity
TYPE Evidence <: Entity
TYPE Context <: Entity
03. SUBTYPES
SUBTYPE SuperficialVein <: Vein
SUBTYPE DeepVein <: Vein
SUBTYPE PerforatingVein <: Vein
SUBTYPE SystemicVein <: Vein
SUBTYPE PulmonaryVein <: Vein
SUBTYPE PortalVein <: Vein
SUBTYPE LargeVein <: Vein
SUBTYPE MediumVein <: Vein
NOTE: Classification axes overlap; they are not mutually exclusive partitions.
04. ENTITY ATTRIBUTES
Vein.id: String
Vein.name: String
Vein.anatomical_region: String?
Vein.drainage_territory: AnatomicalStructure?
Vein.destination: AnatomicalStructure?
Vein.lumen_radius: Length?
Vein.wall_thickness: Length?
Vein.valve_count: Integer?
Vein.pressure: Pressure?
Vein.flow_rate: VolumePerTime?
Vein.compliance: VolumePerPressure?
Vein.oxygen_saturation: Fraction?
Vein.context: Context
Vein.evidence: Evidence?
05. RELATIONSHIPS
RELATION is_a(Entity, Entity)
RELATION part_of(AnatomicalStructure, AnatomicalStructure)
RELATION drains_from(Vein, AnatomicalStructure)
RELATION drains_into(BloodVessel, AnatomicalStructure)
RELATION connects_to(BloodVessel, BloodVessel)
RELATION contains(BloodVessel, Blood)
RELATION has_wall(BloodVessel, VascularWall)
RELATION lined_by(BloodVessel, Endothelium)
RELATION contains_valve(Vein, VenousValve)
RELATION supports(VenousValve, VenousReturn)
RELATION influenced_by(PhysiologicalProcess, PhysiologicalProcess)
RELATION measured_by(Entity, Observation)
RELATION supported_by(Entity, Evidence)
06. STRUCTURAL AXIOMS
AXIOM Vein(v) => BloodVessel(v)
AXIOM BloodVessel(v) => AnatomicalStructure(v)
AXIOM contains_valve(v, valve) => Vein(v) AND VenousValve(valve)
AXIOM part_of(wall, v) AND VascularWall(wall) => BloodVessel(v)
RULE R01: DeepVein(v) AND drains_from(v, limb) => contributes_to(v, limb_venous_drainage)
RULE R02: PerforatingVein(v) => MAY_CONNECT(v, superficial_system, deep_system)
RULE R03: contains_valve(v, valve) AND competent(valve) => inhibits_reverse_flow(valve)
NOTE: Not all veins contain valves; many central, visceral and pulmonary veins lack them.
07. DIRECTION AND OXYGENATION
RULE R04: SystemicVein(v) AND normal_circulation(v) => generally_returns_blood_towards(v, right_atrium)
RULE R05: PulmonaryVein(v) AND normal_circulation(v) => returns_blood_towards(v, left_atrium)
RULE R06: PulmonaryVein(v) AND normal_gas_exchange => typically_oxygenated_blood(v)
RULE R07: SystemicVein(v) AND normal_tissue_exchange => typically_lower_oxygen_content(v)
EXCEPTION: Oxygen content is context-dependent; vein classification follows direction of blood flow toward the heart, not oxygenation alone.
08. HEMODYNAMIC VARIABLES
VARIABLE Q: VolumePerTime
VARIABLE deltaP: Pressure
VARIABLE R: PressureTimePerVolume
VARIABLE r: Length
VARIABLE L: Length
VARIABLE mu: DynamicViscosity
VARIABLE C: VolumePerPressure
VARIABLE V: Volume
VARIABLE P: Pressure
VARIABLE t: Time
CONSTRAINT r > 0
CONSTRAINT L > 0
CONSTRAINT mu > 0
CONSTRAINT R > 0
09. FLOW EQUATIONS
EQUATION Q = deltaP / R
EQUATION R_laminar = 8 * mu * L / (pi * r^4)
ASSUMPTIONS: Steady laminar flow, rigid cylindrical tube, Newtonian fluid; not a general description of collapsible veins or pulsatile physiology.
EQUATION C = dV / dP
INTERPRETATION: Venous compliance measures local volume response to transmural pressure changes.
EQUATION P_transmural = P_inside - P_outside
NOTE: Vein geometry, resistance and compliance may vary strongly with transmural pressure.
10. VENOUS RETURN MODEL
STATE VenousReturnState = {adequate, reduced, obstructed, refluxing, unknown}
INPUT right_atrial_pressure: Pressure?
INPUT peripheral_venous_pressure: Pressure?
INPUT muscle_pump_activity: Dimensionless?
INPUT respiratory_pressure_change: Pressure?
INPUT valve_competence: Boolean?
INPUT obstruction: Boolean?
TRANSITION adequate -> reduced WHEN effective_pressure_gradient_decreases OR obstruction_increases
TRANSITION adequate -> refluxing WHEN valve_incompetence AND adverse_pressure_conditions
TRANSITION reduced -> adequate WHEN reversible_impediment_resolves
NOTE: State transitions are qualitative and require clinical context for interpretation.
11. VENOUS VALVE LOGIC
STATE ValveState = {open, closed, incompetent, unknown}
RULE R08: forward_pressure_gradient AND competent(valve) => MAY_OPEN(valve)
RULE R09: reverse_pressure_gradient AND competent(valve) => MAY_CLOSE(valve)
RULE R10: incompetent(valve) AND reverse_pressure_gradient => MAY_PERMIT_REFLUX(valve)
CONSTRAINT: Valve presence and behaviour vary by anatomical site.
12. VASCULAR NETWORK
GRAPH G = (V, E)
NODE_TYPES = {Vein, Venule, Capillary, Heart, Organ}
EDGE_TYPES = {drains_into, connects_to, drains_from}
PATH capillary_bed -> venule -> vein -> central_venous_return -> heart
PATH pulmonary_capillary_bed -> pulmonary_vein -> left_atrium
PATH gastrointestinal_capillaries -> portal_vein -> hepatic_sinusoids
NOTE: These are representative routes, not exhaustive vascular maps.
13. INFERENCE
RULE R11: drains_into(a, b) AND drains_into(b, c) => upstream_of(a, c) [IF directed_path_valid]
RULE R12: measured_flow(v, q) AND measured_pressure_drop(v, dp) AND q != 0 => estimated_resistance(v, dp/q)
RULE R13: documented_valve_failure(v) AND documented_reflux(v) => supports_classification(v, venous_reflux)
RULE R14: pulmonary_vein(v) => Vein(v)
RULE R15: portal_vein(v) => Vein(v)
NON_RULE: vein(v) DOES_NOT_IMPLY deoxygenated_blood(v)
NON_RULE: vein(v) DOES_NOT_IMPLY has_valve(v)
14. SEMANTIC_EQUIVALENCE
CANONICAL: Vein
ALIASES: venous vessel
RELATED_NOT_EQUIVALENT: venule, artery, capillary, lymphatic vessel
CANONICAL: Venous valve
ALIASES: vein valve
RELATED_NOT_EQUIVALENT: cardiac valve
EQUIVALENCE_POLICY: Accept exact synonyms only when referent, anatomical scope and context match.
15. CONFIDENCE
CONFIDENCE_SCALE: 0.0..1.0
CONFIDENCE_FIELDS: source_quality, measurement_quality, context_match, inference_validity
CONFIDENCE_RULE: inferred_confidence <= min(parent_claim_confidences) unless independent corroboration is explicitly documented
MISSING_EVIDENCE: unknown, not false
DISPUTED_EVIDENCE: preserve competing claims and provenance
16. PROVENANCE
PROVENANCE_FIELDS: source_id, source_url, author, observed_at, retrieved_at, method, version, licence
CLAIM_FIELDS: claim_id, subject, predicate, object, context, confidence, evidence_ids
VALIDATION: every numerical observation must include units and measurement context
VALIDATION: every inferred clinical state must retain its assumptions and evidence
17. FLOW_HASH
FLOW_HASH.INPUT = canonicalise(title, version, type_definitions, relations, rules, equations, provenance)
FLOW_HASH.ALGORITHM = SHA-256
FLOW_HASH.VALUE = COMPUTE_AT_INGESTION
NOTE: No hash is asserted until the canonical representation is actually hashed.
18. UPDATE_MODEL
UPDATE_MODEL.TRIGGER = new_evidence OR revised_taxonomy OR corrected_relation OR updated_measurement
UPDATE_MODEL.STEPS = [validate_source, identify_affected_claims, preserve_prior_version, recompute_inferences, reassess_confidence, recompute_flow_hash, publish_revision]
UPDATE_MODEL.CONFLICT_POLICY = retain_provenance_and_flag_conflict
UPDATE_MODEL.REVERSIBILITY = versioned_rollback
19. RECURSIVE_FLOW
FLOW Observe -> Type -> Relate -> Validate -> Infer -> Compare -> Update -> Revalidate
TERMINATION: stable_version OR unresolved_conflict_flag OR resource_limit
INVARIANT: never promote inferred assertions to observed facts without supporting evidence
20. AI_CONSUMPTION
AI_CONSUMPTION.FORMAT = typed_graph_plus_rules
AI_CONSUMPTION.ENTITY_ROOT = Vein
AI_CONSUMPTION.REQUIRED = [canonical_id, entity_type, context, provenance]
AI_CONSUMPTION.OPTIONAL = [measurements, confidence, evidence, version]
AI_CONSUMPTION.REASONING = constrained_inference
AI_CONSUMPTION.SAFETY = do_not_infer_diagnosis_from_ontology_alone
AI_CONSUMPTION.OUTPUT = [typed_entities, relationships, derived_claims, evidence_links, uncertainty_flags]
21. VALIDATION EXAMPLES
TEST T01: PulmonaryVein(v) => Vein(v) [PASS]
TEST T02: Vein(v) => deoxygenated(v) [REJECT]
TEST T03: Vein(v) => contains_valve(v, some_valve) [REJECT]
TEST T04: C = dV/dP with consistent pressure-volume units [PASS]
TEST T05: R_laminar applied to collapsible vein without assumptions [REJECT]
TEST T06: unsupported clinical conclusion from reflux relation [REJECT]
END FLOW ALGEBRA
Download Code
Copy to Clipboard