FLOW_ALGEBRA NotGateOntology v1.0
TARGET_URL := "https://kirethresearch.org/booksai-core/ontologies/mathematical-ontologies/mathematical-logic-ontologies/boolean-logic/not-gate-ontology.html"
LANGUAGE := "en-GB"
DOMAIN := MathematicalOntologies > MathematicalLogicOntologies > BooleanLogic > NotGateOntology
BEGIN_FLOW
ENTITY NOTGate {
TYPE := UnaryLogicGate
LOGICAL_ROLE := Negation
ARITY := 1
INPUT_DOMAIN := {0,1} ≡ {FALSE,TRUE}
OUTPUT_DOMAIN := {0,1} ≡ {FALSE,TRUE}
DEFINITION := "A unary logic gate that outputs the Boolean complement of its input."
}
RELATIONSHIP NOTGate --is_a--> LogicGate
RELATIONSHIP NOTGate --implements--> BooleanNegation
RELATIONSHIP NOTGate --implements--> BooleanFunction
RELATIONSHIP NOTGate --corresponds_to--> NOTOperator
RELATIONSHIP NOTGate --can_be_represented_by--> BooleanExpression
RELATIONSHIP NOTGate --can_be_specified_by--> TruthTable
RELATIONSHIP NOTGate --can_be_composed_into--> LogicCircuit
RELATIONSHIP NOTGate --is_also_called--> Inverter
ENTITY NOTOperator {
TYPE := UnaryBooleanOperator
SYMBOLS := {"NOT","¬","~","overbar"}
}
BOOLEAN_FUNCTION {
NOT(x) := ¬x
IF x=0 THEN output=1
IF x=1 THEN output=0
}
TRUTH_TABLE {
(A=0) -> Y=1
(A=1) -> Y=0
}
EVALUATE_NOT(Input x) {
REQUIRE x IN {0,1}
IF x=0
RETURN 1
IF x=1
RETURN 0
}
ALGEBRAIC_FORM {
FOR x IN {0,1}:
NOT(x) = 1 - x
}
PROPOSITIONAL_LOGIC_MAPPING {
INPUT_A := proposition_P
OUTPUT := ¬P
SEMANTICS :=
¬P IS TRUE IFF P IS FALSE
}
BOOLEAN_COMPLEMENT {
COMPLEMENT_OF_0 := 1
COMPLEMENT_OF_1 := 0
NOT(TRUE) := FALSE
NOT(FALSE) := TRUE
}
DOUBLE_NEGATION {
NOT(NOT(A)) ≡ A
RELATIONSHIP :=
NOTGate followed_by NOTGate
--is_logically_equivalent_to-->
BufferGate
}
INVOLUTION_PROPERTY {
FOR_ALL A IN {0,1}:
NOT(NOT(A)) = A
PROPERTY := involutive
}
COMPLEMENT_IDENTITIES {
A ∧ ¬A ≡ 0
A ∨ ¬A ≡ 1
}
DEMORGAN_LAWS {
NOT(A AND B) ≡
NOT(A) OR NOT(B)
NOT(A OR B) ≡
NOT(A) AND NOT(B)
}
GATE_TRANSFORMATIONS {
NAND(A,A) ≡ NOT(A)
NOR(A,A) ≡ NOT(A)
}
NAND_IMPLEMENTATION {
NOT(A) :=
NAND(A,A)
}
NOR_IMPLEMENTATION {
NOT(A) :=
NOR(A,A)
}
CIRCUIT_SYMBOL_SEMANTICS {
INPUT_PORT := A
OUTPUT_PORT := Y
EQUATION := Y = ¬A
}
EXPRESSION_TRANSLATION {
BooleanExpression:
¬A
MAP_TO:
NOTGate(
input=A,
output=Y
)
}
REVERSE_TRANSLATION {
NOTGate(A)->Y
MAP_TO BooleanExpression:
Y := ¬A
}
COMPOSITION_EXAMPLE {
EXPRESSION :=
¬(A ∧ B)
NETWORK :=
G1 := ANDGate(A,B)
G2 := NOTGate(output(G1))
OUTPUT :=
¬(A ∧ B)
SEMANTIC_EQUIVALENCE :=
NAND(A,B)
}
NEGATED_OR_EXAMPLE {
EXPRESSION :=
¬(A ∨ B)
NETWORK :=
G1 := ORGate(A,B)
G2 := NOTGate(output(G1))
OUTPUT :=
¬(A ∨ B)
SEMANTIC_EQUIVALENCE :=
NOR(A,B)
}
LOGICAL_PROPERTIES {
ARITY := 1
INVOLUTIVE := TRUE
MONOTONE := FALSE
ANTITONE := TRUE
ZERO_PRESERVING := FALSE
ONE_PRESERVING := FALSE
SELF_DUAL := TRUE
}
ANTITONICITY {
FOR BooleanValues x,y:
IF x <= y
THEN
NOT(x) >= NOT(y)
}
SELF_DUALITY {
DUAL(NOT)(x) :=
NOT(
NOT(
NOT(x)
)
)
RESULT :=
NOT(x)
PROPERTY := self_dual
}
CONTROLLING_BEHAVIOUR {
INPUT=0 -> OUTPUT=1
INPUT=1 -> OUTPUT=0
INTERPRETATION :=
output always has the opposite Boolean value to input
}
IDENTITY_RELATIONSHIP {
NOTGate o NOTGate ≡ IdentityFunction
}
CASCADE_NOT_GATES(Count n, Input A) {
IF n mod 2 = 0
RETURN A
IF n mod 2 = 1
RETURN ¬A
}
PARITY_OF_INVERSION_CHAIN {
EVEN_NUMBER_OF_NOT_GATES :=
no_net_logical_inversion
ODD_NUMBER_OF_NOT_GATES :=
one_net_logical_inversion
}
BUBBLE_PUSHING_TRANSFORMATION {
USING DeMorgan:
NOT(AND(A,B))
-> OR(NOT(A),NOT(B))
NOT(OR(A,B))
-> AND(NOT(A),NOT(B))
REQUIRE :=
semantic_equivalence_preserved
}
NORMAL_FORM_ROLE {
LITERAL :=
Variable OR NegatedVariable
NOTGate --implements--> NegatedLiteral
DNF :=
negated literals may appear inside conjunction terms
CNF :=
negated literals may appear inside disjunction clauses
}
FUNCTIONAL_COMPLETENESS_ROLE {
{NOT,AND} := functionally_complete
{NOT,OR} := functionally_complete
NOTGate --combines_with--> ANDGate
TO_GENERATE AllBooleanFunctions
NOTGate --combines_with--> ORGate
TO_GENERATE AllBooleanFunctions
}
APPLICATION_RELATIONSHIPS {
NOTGate --used_in--> SignalInversion
NOTGate --used_in--> ComplementGeneration
NOTGate --used_in--> ControlLogic
NOTGate --used_in--> BooleanConditionNegation
NOTGate --used_in--> ArithmeticCircuits
NOTGate --used_in--> DecoderLogic
NOTGate --used_in--> MultiplexerLogic
NOTGate --used_in--> ComparatorLogic
NOTGate --used_in--> UniversalGateConstructions
}
ENTITY SignalInversion {
INPUT := A
OUTPUT := ¬A
}
ENTITY ActiveLowInterpretation {
DEFINITION :=
"A logical convention in which an asserted condition may be represented by the low Boolean level."
NOTE :=
"Active-low notation is a signalling convention and should not be conflated with the abstract NOT function itself."
}
RELATIONSHIP NOTGate --may_support--> ActiveLowSignalTransformations
EQUIVALENCE_TEST(Expression E, NOTNetwork 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 {
NOT(NOT(A)) -> A
NOT(0) -> 1
NOT(1) -> 0
NOT(AND(A,B))
-> OR(NOT(A),NOT(B))
NOT(OR(A,B))
-> AND(NOT(A),NOT(B))
}
ONTOLOGY_LINKS {
PARENT := LogicGateOntology
ANCESTORS := {
BooleanLogicOntology,
MathematicalLogicOntology,
MathematicalOntology
}
RELATED := {
ANDGateOntology,
ORGateOntology,
NANDGateOntology,
NORGateOntology,
XORGateOntology,
XNORGateOntology,
BooleanFunctionOntology,
BooleanExpressionOntology,
BooleanAlgebraOntology,
TruthTableOntology,
PropositionalLogicOntology
}
}
SEMANTIC_EQUIVALENCE {
NOTGate ≈ Inverter
NOTOperator ≈ LogicalNegation
NOTOperator ≈ BooleanComplement
NOT(A) ≈ ¬A
NOT(A) ≈ complement(A)
TRUE ≈ 1
FALSE ≈ 0
}
CONSTRAINTS {
C1 :=
NOTGate MUST have exactly one abstract Boolean input
C2 :=
input MUST belong_to {0,1}
C3 :=
output MUST belong_to {0,1}
C4 :=
output MUST always equal the Boolean complement of input
C5 :=
two consecutive NOT operations MUST equal the identity function
C6 :=
NAND/NOR implementations of NOT MUST preserve the complete unary truth table
C7 :=
abstract Boolean negation MUST remain distinct from implementation-specific voltage or electronic behaviour
}
REASONING_CHAIN Query Q {
IDENTIFY NOTGate concept
IDENTIFY requested representation
RESOLVE negation_aliases
RESOLVE input_value
IF evaluation_requested
THEN EVALUATE_NOT
IF truth_table_requested
THEN RETURN canonical_truth_table
IF expression_requested
THEN RETURN negation_expression
IF BooleanExpression_provided
THEN MAP negation_nodes_to_NOTGates
IF NAND_only_requested
THEN APPLY NAND_IMPLEMENTATION
IF NOR_only_requested
THEN APPLY NOR_IMPLEMENTATION
IF simplification_requested
THEN APPLY SIMPLIFICATION_RULES
IF DeMorgan_transformation_requested
THEN APPLY DEMORGAN_LAWS
IF inversion_chain_requested
THEN APPLY CASCADE_NOT_GATES
IF equivalence_requested
THEN EQUIVALENCE_TEST
VALIDATE canonical_NOT_semantics
RETURN result WITH derivation
}
CONFIDENCE {
CANONICAL_NOT_DEFINITION := 1.00
UNARY_TRUTH_TABLE := 1.00
BOOLEAN_COMPLEMENT_SEMANTICS := 1.00
DOUBLE_NEGATION_DERIVATION := 1.00
DEMORGAN_TRANSFORMATION := 0.99
NAND_NOR_IMPLEMENTATION :=
IF truth_table_verified THEN 1.00
ELSE 0.99
PHYSICAL_IMPLEMENTATION_CLAIM :=
REQUIRE implementation_specific_source
}
UPDATE_MODEL {
IMMUTABLE_CORE := {
BooleanDomain,
NegationTruthFunction,
CanonicalUnaryTruthTable,
DoubleNegation,
ComplementSemantics
}
EXTENSIBLE := {
CircuitApplications,
AlternativeImplementations,
OptimisationMethods,
HardwareRealisation,
SignallingConventions,
RelatedOntologies
}
ON_NEW_KNOWLEDGE {
VALIDATE against NOTTruthFunction
VALIDATE unary_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 := "NOT Gate Ontology"
VERSION := "1.0"
CANONICAL_SIGNATURE :=
HASH(TARGET + SUBJECT + DOMAIN + VERSION)
}
OUTPUT {
PRIMARY_ENTITY := NOTGate
INTERPRETATION :=
"A NOT gate implements Boolean negation: it maps false to true and true to false. As the fundamental inversion operation, it connects Boolean complement, propositional negation, Boolean expressions, De Morgan transformations and digital logic networks."
}
END_FLOW
Download Code
Copy to Clipboard