Skip to main content

OR Gate Ontology

Boolean Logic
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 17 September 2026
Audio Overview
FLOW_ALGEBRA ORGateOntology v1.0

TARGET_URL := "https://kirethresearch.org/booksai-core/ontologies/mathematical-ontologies/mathematical-logic-ontologies/boolean-logic/or-gate-ontology.html"
LANGUAGE := "en-GB"
DOMAIN := MathematicalOntologies > MathematicalLogicOntologies > BooleanLogic > ORGateOntology

BEGIN_FLOW

ENTITY ORGate {
    TYPE := LogicGate
    LOGICAL_ROLE := Disjunction
    MIN_ARITY := 2
    INPUT_DOMAIN := {0,1} ≡ {FALSE,TRUE}
    OUTPUT_DOMAIN := {0,1} ≡ {FALSE,TRUE}
    DEFINITION := "A logic gate whose output is true when at least one of its Boolean inputs is true, and false only when all inputs are false."
}

RELATIONSHIP ORGate --is_a--> LogicGate
RELATIONSHIP ORGate --implements--> BooleanDisjunction
RELATIONSHIP ORGate --implements--> BooleanFunction
RELATIONSHIP ORGate --corresponds_to--> OROperator
RELATIONSHIP ORGate --can_be_represented_by--> BooleanExpression
RELATIONSHIP ORGate --can_be_specified_by--> TruthTable
RELATIONSHIP ORGate --can_be_composed_into--> LogicCircuit

ENTITY OROperator {
    SYMBOLS := {"OR","∨","+"}
    TYPE := BooleanOperator
}

BOOLEAN_FUNCTION {
    BINARY :=
        OR(x,y) := x ∨ y

    NARY :=
        OR(x1,...,xn) :=
            x1 ∨ x2 ∨ ... ∨ xn

    CONDITION :=
        OUTPUT=1 IFF EXISTS xi: xi=1
}

BINARY_TRUTH_TABLE {
    (A=0,B=0) -> Y=0
    (A=0,B=1) -> Y=1
    (A=1,B=0) -> Y=1
    (A=1,B=1) -> Y=1
}

NARY_SEMANTICS {
    INPUTS := x1,...,xn
    n >= 2

    IF EXISTS i IN {1,...,n}:
        xi=1
    THEN
        OUTPUT := 1
    ELSE
        OUTPUT := 0
}

EVALUATE_OR(InputVector X) {
    REQUIRE length(X) >= 2
    REQUIRE FOR_ALL x IN X: x IN {0,1}

    FOR_EACH x IN X {
        IF x=1
            RETURN 1
    }

    RETURN 0
}

ALGEBRAIC_FORM {
    FOR BooleanValues xi IN {0,1}:
        OR(x1,...,xn) =
            1 - PRODUCT(i=1..n, (1-xi))
}

SET_THEORETIC_ANALOGY {
    BooleanDisjunction --corresponds_structurally_to--> SetUnion
    TRUE --corresponds_to--> AtLeastOneConditionSatisfied
    FALSE --corresponds_to--> NoConditionSatisfied
}

PROPOSITIONAL_LOGIC_MAPPING {
    INPUT_A := proposition_P
    INPUT_B := proposition_Q
    OUTPUT := P ∨ Q

    SEMANTICS :=
        P ∨ Q IS TRUE
        IFF P IS TRUE OR Q IS TRUE OR BOTH ARE TRUE
}

BOOLEAN_IDENTITIES {
    IDENTITY :=
        A ∨ 0 ≡ A

    DOMINATION :=
        A ∨ 1 ≡ 1

    IDEMPOTENCE :=
        A ∨ A ≡ A

    COMPLEMENT :=
        A ∨ ¬A ≡ 1

    COMMUTATIVITY :=
        A ∨ B ≡ B ∨ A

    ASSOCIATIVITY :=
        (A ∨ B) ∨ C ≡
        A ∨ (B ∨ C)

    DISTRIBUTIVITY_OVER_AND :=
        A ∨ (B ∧ C) ≡
        (A ∨ B) ∧ (A ∨ C)

    ABSORPTION :=
        A ∨ (A ∧ B) ≡ A
}

DEMORGAN_TRANSFORMATION {
    A ∨ B ≡
        ¬(¬A ∧ ¬B)

    OR(A,B) ≡
        NOT(
            AND(
                NOT(A),
                NOT(B)
            )
        )
}

NOR_IMPLEMENTATION {
    OR(A,B) :=
        NOR(
            NOR(A,B),
            NOR(A,B)
        )
}

NAND_IMPLEMENTATION {
    NOT(A) :=
        NAND(A,A)

    NOT(B) :=
        NAND(B,B)

    OR(A,B) :=
        NAND(
            NAND(A,A),
            NAND(B,B)
        )
}

CIRCUIT_SYMBOL_SEMANTICS {
    INPUT_PORTS := {A,B,...}
    OUTPUT_PORT := Y
    LOGICAL_EQUATION :=
        Y = A ∨ B
        FOR binary_gate
}

CASCADE_OR_GATES {
    GIVEN inputs x1,...,xn

    y1 := OR(x1,x2)
    y2 := OR(y1,x3)
    ...
    y_final := OR(y_previous,xn)

    BY_ASSOCIATIVITY:
        y_final ≡ OR(x1,...,xn)
}

EXPRESSION_TRANSLATION {
    BooleanExpression:
        A ∨ B

    MAP_TO:
        ORGate(
            input1=A,
            input2=B,
            output=Y
        )
}

REVERSE_TRANSLATION {
    ORGate(A,B)->Y

    MAP_TO BooleanExpression:
        Y := A ∨ B
}

COMPOSITION_EXAMPLE {
    EXPRESSION :=
        (A ∨ B) ∨ C

    NETWORK :=
        G1 := ORGate(A,B)
        G2 := ORGate(output(G1),C)

    OUTPUT :=
        A ∨ B ∨ C
}

TRUTH_TABLE_GENERATION(Arity n) {
    REQUIRE n >= 2

    FOR_EACH X IN {0,1}^n {
        Y := EVALUATE_OR(X)
        EMIT ROW(X,Y)
    }

    PROPERTY :=
        exactly_one_input_vector_has_output_0
        NAMELY (0,0,...,0)
}

LOGICAL_PROPERTIES {
    MONOTONE := TRUE
    ZERO_PRESERVING := TRUE
    ONE_PRESERVING := TRUE
    COMMUTATIVE := TRUE
    ASSOCIATIVE := TRUE
    IDEMPOTENT := TRUE
    SELF_DUAL := FALSE
}

MONOTONICITY {
    FOR BooleanVectors X,Y:

    IF X <= Y componentwise
    THEN
        OR(X) <= OR(Y)
}

SENSITIVITY {
    AT INPUT_VECTOR (0,0,...,0):
        changing_any_single_input_to_1
        changes_output_from_0_to_1

    IF at_least_one_input_already_1:
        changing_other_inputs_may_not_change_output
}

CONTROLLING_VALUE {
    CONTROLLING_INPUT_VALUE := 1
    REASON :=
        any TRUE input forces output TRUE
}

IDENTITY_VALUE {
    IDENTITY_INPUT_VALUE := 0
    REASON :=
        A ∨ 0 = A
}

DUAL_GATE {
    ORGate --dual_of--> ANDGate

    DUALITY_TRANSFORMATION {
        OR <-> AND
        0 <-> 1
    }
}

OR_VS_NOR {
    NOR(A,B) :=
        NOT(OR(A,B))

    RELATIONSHIP ORGate --negated_output_yields--> NORGate
}

OR_VS_AND {
    OR :=
        TRUE if_at_least_one_input_true

    AND :=
        TRUE only_if_all_inputs_true
}

OR_VS_XOR {
    OR(A,B) :=
        TRUE when one_or_both_inputs_true

    XOR(A,B) :=
        TRUE when exactly_one_of_two_inputs_true

    WHEN A=1 AND B=1:
        OR(A,B)=1
        XOR(A,B)=0
}

NORMAL_FORM_ROLE {
    CNF :=
        ORGate combines literals inside sum/maxterm clauses

    DNF :=
        ORGate combines conjunction terms at outer disjunction level

    DIGITAL_IMPLEMENTATION :=
        AND_OR_networks may implement sum-of-products expressions
}

MAXTERM_RELATIONSHIP {
    MAXTERM :=
        disjunction containing each variable exactly once,
        either complemented or uncomplemented

    ORGate --can_implement--> Maxterm
}

COMBINATIONAL_APPLICATIONS {
    ORGate --used_in--> ConditionAggregation
    ORGate --used_in--> AlarmLogic
    ORGate --used_in--> InterruptLogic
    ORGate --used_in--> ControlLogic
    ORGate --used_in--> ArithmeticCircuits
    ORGate --used_in--> ComparatorLogic
    ORGate --used_in--> SelectionLogic
    ORGate --used_in--> BooleanConditionEvaluation
}

ENTITY ConditionAggregation {
    INPUTS := {Condition1,Condition2,...,ConditionN}
    OUTPUT :=
        Condition1 ∨ Condition2 ∨ ... ∨ ConditionN

    INTERPRETATION :=
        output becomes true when any monitored condition is true
}

ENTITY FullAdderCarryCombination {
    INPUT_TERMS := {
        A ∧ B,
        Cin ∧ (A ⊕ B)
    }

    CARRY_OUT :=
        (A ∧ B) ∨
        (Cin ∧ (A ⊕ B))
}

RELATIONSHIP ORGate --combines--> FullAdderCarryTerms

MULTI_INPUT_DECOMPOSITION {
    OR(x1,x2,...,xn) ≡
        OR(
            OR(
                ...OR(x1,x2),
                x3
            ),
            ...,
            xn
        )

    VALID_BY := Associativity
}

EQUIVALENCE_TEST(Expression E, ORNetwork N) {
    VARIABLES := union(inputs(E),inputs(N))

    FOR_ALL assignments A {
        yE := EVALUATE(E,A)
        yN := EVALUATE(N,A)

        IF yE != yN
            RETURN FALSE
    }

    RETURN TRUE
}

SIMPLIFICATION_RULES {
    OR(A,0) -> A
    OR(A,1) -> 1
    OR(A,A) -> A
    OR(A,NOT(A)) -> 1
    OR(A,AND(A,B)) -> A
}

ONTOLOGY_LINKS {
    PARENT := LogicGateOntology

    ANCESTORS := {
        BooleanLogicOntology,
        MathematicalLogicOntology,
        MathematicalOntology
    }

    RELATED := {
        ANDGateOntology,
        NOTGateOntology,
        NANDGateOntology,
        NORGateOntology,
        XORGateOntology,
        BooleanFunctionOntology,
        BooleanExpressionOntology,
        BooleanAlgebraOntology,
        TruthTableOntology,
        PropositionalLogicOntology
    }
}

SEMANTIC_EQUIVALENCE {
    ORGate ≈ DisjunctionGate
    OROperator ≈ LogicalDisjunction
    OROperator ≈ BooleanAddition
        WHEN "+" denotes Boolean OR rather than arithmetic addition
    A OR B ≈ A ∨ B
    TRUE ≈ 1
    FALSE ≈ 0
}

CONSTRAINTS {
    C1 :=
        every abstract ORGate input MUST belong_to {0,1}

    C2 :=
        ORGate output MUST belong_to {0,1}

    C3 :=
        output MUST equal 0 exactly when all inputs equal 0

    C4 :=
        binary ORGate MUST match the canonical four-row truth table

    C5 :=
        decomposition into multiple OR gates MUST preserve disjunction semantics

    C6 :=
        transformations into NAND/NOR implementations MUST preserve the complete truth table

    C7 :=
        abstract logical semantics MUST remain distinct from implementation-specific electronic behaviour
}

REASONING_CHAIN Query Q {
    IDENTIFY ORGate concept
    IDENTIFY requested representation
    DETERMINE arity
    RESOLVE Boolean aliases
    RESOLVE input_values

    IF evaluation_requested
        THEN EVALUATE_OR

    IF truth_table_requested
        THEN TRUTH_TABLE_GENERATION

    IF expression_requested
        THEN RETURN disjunction_expression

    IF BooleanExpression_provided
        THEN MAP disjunction_nodes_to_ORGates

    IF NOR_only_requested
        THEN APPLY NOR_IMPLEMENTATION

    IF NAND_only_requested
        THEN APPLY NAND_IMPLEMENTATION

    IF simplification_requested
        THEN APPLY SIMPLIFICATION_RULES

    IF equivalence_requested
        THEN EQUIVALENCE_TEST

    VALIDATE canonical_OR_semantics
    RETURN result WITH derivation
}

CONFIDENCE {
    CANONICAL_OR_DEFINITION := 1.00
    BINARY_TRUTH_TABLE := 1.00
    NARY_BOOLEAN_SEMANTICS := 1.00
    BOOLEAN_IDENTITY_DERIVATION := 0.99
    NAND_NOR_TRANSFORMATION :=
        IF truth_table_verified THEN 1.00
        ELSE 0.99
    PHYSICAL_IMPLEMENTATION_CLAIM :=
        REQUIRE implementation_specific_source
}

UPDATE_MODEL {
    IMMUTABLE_CORE := {
        BooleanDomain,
        DisjunctionTruthFunction,
        CanonicalBinaryTruthTable,
        IdentityAndDominationRules
    }

    EXTENSIBLE := {
        CircuitApplications,
        AlternativeImplementations,
        OptimisationMethods,
        HardwareRealisation,
        RelatedOntologies
    }

    ON_NEW_KNOWLEDGE {
        VALIDATE against ORTruthFunction
        VALIDATE arity
        VALIDATE BooleanDomain
        CHECK semantic_consistency
        CHECK truth_table_equivalence
        ADD relationship IF non_contradictory
        UPDATE confidence
    }
}

AI_CONSUMPTION {
    MACHINE_READABLE := TRUE
    HUMAN_INTERPRETABLE := TRUE
    RECURSIVE_REASONING := TRUE
    ENTITY_RESOLUTION := TRUE
    SYMBOL_RESOLUTION := TRUE
    RELATIONSHIP_TRAVERSAL := TRUE
    BOOLEAN_EVALUATION := TRUE
    TRUTH_TABLE_REASONING := TRUE
    CIRCUIT_TRANSLATION := TRUE
    EQUIVALENCE_VALIDATION := TRUE
}

FLOW_HASH {
    TARGET := TARGET_URL
    SUBJECT := "OR Gate Ontology"
    VERSION := "1.0"
    CANONICAL_SIGNATURE :=
        HASH(TARGET + SUBJECT + DOMAIN + VERSION)
}

OUTPUT {
    PRIMARY_ENTITY := ORGate

    INTERPRETATION :=
        "An OR gate implements Boolean disjunction: its output is true when at least one input is true and false only when every input is false. Its truth-functional semantics connect Boolean algebra, propositional disjunction, Boolean expressions and compositional digital logic."
}

END_FLOW
Kireth Research
38 Thorndale Croft, Wetwang, Driffield
East Riding of Yorkshire YO25 9XZ