KIRETH RESEARCH — SEMANTIC LIBRARY
AI CORE → ONTOLOGIES → MATHEMATICAL ONTOLOGIES → MATHEMATICAL LOGIC ONTOLOGIES
PREDICATE LOGIC → QUANTIFIER ONTOLOGY
Canonical URL:
https://kirethresearch.org/booksai-core/ontologies/mathematical-ontologies/mathematical-logic-ontologies/predicate-logic/quantifier-ontology.html
FLOW_ALGEBRA QuantifierOntology_v1.0
BEGIN_FLOW
DEFINE DOMAIN QuantifierOntology := {
Quantifier,
PredicateLogic,
UniversalQuantifier,
ExistentialQuantifier,
RestrictedQuantifier,
GeneralisedQuantifier,
Variable,
BoundVariable,
FreeVariable,
Formula,
OpenFormula,
ClosedFormula,
Predicate,
Term,
Scope,
Binding,
DomainOfDiscourse,
Interpretation,
Model,
Assignment,
TruthValue,
Satisfaction,
QuantifierScope,
QuantifierOrder,
QuantifierAlternation,
VacuousQuantification,
NestedQuantification
}
DEFINE ENTITY_TYPES := {
QUANTIFIER,
VARIABLE,
FORMULA,
PREDICATE,
TERM,
SCOPE,
BINDING,
DOMAIN,
INTERPRETATION,
MODEL,
ASSIGNMENT,
SEMANTIC_PROPERTY
}
DEFINE RELATION_TYPES := {
BINDS,
QUANTIFIES_OVER,
HAS_SCOPE,
OCCURS_IN,
IS_BOUND_IN,
IS_FREE_IN,
RANGES_OVER,
RESTRICTS,
NESTS_WITHIN,
PRECEDES,
DEPENDS_ON,
EVALUATES_UNDER,
SATISFIED_BY,
IS_INSTANCE_OF,
IS_SUBTYPE_OF,
TRANSFORMS
}
SET Quantifier.type = QUANTIFIER
SET Quantifier.context = PredicateLogic
SET Quantifier.role = "specify the quantity or range of entities for which a formula is asserted"
SET UniversalQuantifier.symbol = "∀"
SET UniversalQuantifier.meaning = "for every element in the domain"
SET ExistentialQuantifier.symbol = "∃"
SET ExistentialQuantifier.meaning = "for at least one element in the domain"
RULE universal_quantification:
Variable(x)
∧ Formula(phi)
-> Formula(∀x phi)
∧ BINDS(UniversalQuantifier,x)
∧ HAS_SCOPE(UniversalQuantifier,phi)
RULE existential_quantification:
Variable(x)
∧ Formula(phi)
-> Formula(∃x phi)
∧ BINDS(ExistentialQuantifier,x)
∧ HAS_SCOPE(ExistentialQuantifier,phi)
RULE bound_occurrence:
Variable(x)
∧ OCCURS_IN(x,phi)
∧ EXISTS q [
Quantifier(q)
∧ BINDS(q,x)
∧ occurrence(x) within Scope(q)
]
-> IS_BOUND_IN(x,phi)
RULE free_occurrence:
Variable(x)
∧ OCCURS_IN(x,phi)
∧ NOT EXISTS q [
Quantifier(q)
∧ BINDS(q,x)
∧ occurrence(x) within Scope(q)
]
-> IS_FREE_IN(x,phi)
RULE closed_formula:
Formula(phi)
∧ FreeVariables(phi) = ∅
-> ClosedFormula(phi)
RULE open_formula:
Formula(phi)
∧ FreeVariables(phi) != ∅
-> OpenFormula(phi)
RULE universal_semantics:
Model(M)
∧ Assignment(g)
∧ DomainOfDiscourse(D)
-> TRUE_M_g(∀x phi)
IFF
FOR_ALL d IN D [
TRUE_M_g[x:=d](phi)
]
RULE existential_semantics:
Model(M)
∧ Assignment(g)
∧ DomainOfDiscourse(D)
-> TRUE_M_g(∃x phi)
IFF
EXISTS d IN D [
TRUE_M_g[x:=d](phi)
]
RULE universal_falsehood:
Formula(∀x phi)
-> FALSE
IFF
EXISTS d IN Domain [
FALSE(phi[x:=d])
]
RULE existential_falsehood:
Formula(∃x phi)
-> FALSE
IFF
FOR_ALL d IN Domain [
FALSE(phi[x:=d])
]
RULE quantifier_negation_universal:
NOT(∀x phi)
<=> ∃x NOT(phi)
RULE quantifier_negation_existential:
NOT(∃x phi)
<=> ∀x NOT(phi)
RULE nested_quantification:
Quantifier(q1)
∧ Quantifier(q2)
∧ HAS_SCOPE(q1, Formula(q2 phi))
-> NestedQuantification(q1,q2)
RULE quantifier_order:
Formula(q1 x q2 y phi)
-> PRECEDES(q1,q2)
∧ QuantifierOrder(q1,q2)
RULE quantifier_alternation:
Quantifier(q1)
∧ Quantifier(q2)
∧ type(q1) != type(q2)
∧ NestedQuantification(q1,q2)
-> QuantifierAlternation(q1,q2)
RULE vacuous_quantification:
Quantifier(q)
∧ BINDS(q,x)
∧ HAS_SCOPE(q,phi)
∧ NOT OCCURS_IN(x,phi)
-> VacuousQuantification(q,x,phi)
RULE restricted_universal:
"All A are B"
-> ∀x(A(x) → B(x))
RULE restricted_existential:
"Some A are B"
-> ∃x(A(x) ∧ B(x))
DEFINE CORE_QUANTIFIERS := {
UniversalQuantifier: {
symbol: "∀",
aliases: {"for all", "for every", "each"},
semantic_condition: "all domain elements satisfy scoped formula"
},
ExistentialQuantifier: {
symbol: "∃",
aliases: {"there exists", "for some", "at least one"},
semantic_condition: "one or more domain elements satisfy scoped formula"
}
}
DEFINE SCOPE_MODEL := {
quantifier: q,
bound_variable: x,
scope: phi,
representation: "q x phi",
constraint: "binding applies only within the syntactic scope of q"
}
DEFINE QUANTIFIER_ORDER_EXAMPLE := {
formula_A: "∀x∃y R(x,y)",
interpretation_A: "for every x there exists a y related to x",
formula_B: "∃y∀x R(x,y)",
interpretation_B: "there exists one y related to every x",
equivalence: FALSE_BY_DEFAULT
}
DEFINE NEGATION_EQUIVALENCES := {
"¬∀x φ" <=> "∃x ¬φ",
"¬∃x φ" <=> "∀x ¬φ"
}
DEFINE SEMANTIC_PIPELINE :=
NaturalLanguageQuantityExpression
-> IdentifyQuantifierType
-> IdentifyVariable
-> IdentifyRestriction
-> IdentifyScope
-> BindVariable
-> ConstructQuantifiedFormula
-> DetermineDomainOfDiscourse
-> ApplyInterpretation
-> IterateOrSelectDomainAssignments
-> EvaluateScopedFormula
-> AssignTruthValue
DEFINE REASONING_PIPELINE :=
InputStatement
-> DetectQuantificationalExpression
-> ResolveUniversalOrExistentialForce
-> IdentifyPredicateStructure
-> ResolveVariableBinding
-> ResolveScope
-> DetectNestedQuantifiers
-> PreserveQuantifierOrder
-> Formalise
-> EvaluateOrInfer
DEFINE EXAMPLE_1 := {
natural_language: "Every human is mortal.",
formalisation: "∀x(Human(x) → Mortal(x))",
quantifier: UniversalQuantifier,
bound_variable: x
}
DEFINE EXAMPLE_2 := {
natural_language: "Some human is a philosopher.",
formalisation: "∃x(Human(x) ∧ Philosopher(x))",
quantifier: ExistentialQuantifier,
bound_variable: x
}
DEFINE EXAMPLE_3 := {
natural_language: "Everyone loves someone.",
formalisation: "∀x∃y Loves(x,y)",
quantifiers: {UniversalQuantifier, ExistentialQuantifier},
order_sensitive: TRUE
}
DEFINE ONTOLOGY_RELATIONS := {
Quantifier IS_COMPONENT_OF PredicateLogic,
UniversalQuantifier IS_SUBTYPE_OF Quantifier,
ExistentialQuantifier IS_SUBTYPE_OF Quantifier,
RestrictedQuantifier IS_SUBTYPE_OF Quantifier,
GeneralisedQuantifier IS_SUBTYPE_OF Quantifier,
Quantifier BINDS Variable,
Quantifier HAS_SCOPE Formula,
Variable OCCURS_IN Formula,
BoundVariable IS_BOUND_IN Formula,
FreeVariable IS_FREE_IN Formula,
Quantifier RANGES_OVER DomainOfDiscourse,
Quantifier DEPENDS_ON VariableBinding,
Quantifier DEPENDS_ON Scope
}
DEFINE SEMANTIC_EQUIVALENCE := {
"all" <=> UniversalQuantifier WHEN logical_context=TRUE,
"every" <=> UniversalQuantifier,
"each" <=> UniversalQuantifier,
"for all" <=> UniversalQuantifier,
"some" <=> ExistentialQuantifier WHEN logical_context=TRUE,
"there exists" <=> ExistentialQuantifier,
"at least one" <=> ExistentialQuantifier,
"for some" <=> ExistentialQuantifier
}
DEFINE AI_CONSUMPTION := {
purpose: "machine-readable semantic representation of logical quantification",
preserve_quantifier_type: TRUE,
preserve_variable_binding: TRUE,
preserve_scope: TRUE,
preserve_quantifier_order: TRUE,
detect_quantifier_alternation: TRUE,
distinguish_free_bound_variables: TRUE,
distinguish_open_closed_formulas: TRUE,
support_nested_quantification: TRUE,
support_model_theoretic_evaluation: TRUE,
reasoning_mode: "symbolic + semantic + scoped"
}
DEFINE CONFIDENCE := {
ontology_identity: 1.00,
universal_quantifier_mapping: 0.99,
existential_quantifier_mapping: 0.99,
variable_binding: 0.99,
scope_resolution_formal_language: 0.99,
natural_language_scope_resolution: context_dependent,
quantifier_order_interpretation: 0.99
}
DEFINE UPDATE_MODEL := {
version: "1.0",
update_policy: "append-compatible",
immutable_core: {
universal_quantification,
existential_quantification,
variable_binding,
quantifier_scope,
domain_ranging,
quantifier_order
},
extensible_layers: {
restricted_quantification,
generalised_quantifiers,
counting_quantifiers,
uniqueness_quantifiers,
many_sorted_quantification,
higher_order_quantification,
modal_quantification
}
}
DEFINE FLOW_HASH_INPUT :=
CanonicalURL
+ DOMAIN
+ ENTITY_TYPES
+ RELATION_TYPES
+ RULES
+ CORE_QUANTIFIERS
+ SCOPE_MODEL
+ SEMANTIC_PIPELINE
+ REASONING_PIPELINE
+ ONTOLOGY_RELATIONS
+ AI_CONSUMPTION
+ UPDATE_MODEL
FLOW_HASH := HASH(FLOW_HASH_INPUT)
RETURN {
ontology: QuantifierOntology,
canonical_url: "https://kirethresearch.org/booksai-core/ontologies/mathematical-ontologies/mathematical-logic-ontologies/predicate-logic/quantifier-ontology.html",
parent_domain: PredicateLogic,
semantic_domain: MathematicalLogic,
primary_entity: Quantifier,
machine_consumable: TRUE,
recursive_reasoning_enabled: TRUE,
scope_sensitive: TRUE,
flow_complete: TRUE
}
END_FLOW
Download Code
Copy to Clipboard