KIRETH RESEARCH — SEMANTIC LIBRARY
AI CORE → ONTOLOGIES → MATHEMATICAL ONTOLOGIES → MATHEMATICAL LOGIC ONTOLOGIES
PREDICATE LOGIC → PREDICATE LOGIC ONTOLOGY
Canonical URL:
https://kirethresearch.org/booksai-core/ontologies/mathematical-ontologies/mathematical-logic-ontologies/predicate-logic/predicate-logic-ontology.html
FLOW_ALGEBRA PredicateLogicOntology_v1.0
BEGIN_FLOW
DEFINE DOMAIN PredicateLogicOntology := {
PredicateLogic,
FirstOrderLogic,
Predicate,
Proposition,
Individual,
Object,
Variable,
Constant,
Term,
FunctionSymbol,
PredicateSymbol,
Relation,
Formula,
AtomicFormula,
CompoundFormula,
WellFormedFormula,
Quantifier,
UniversalQuantifier,
ExistentialQuantifier,
BoundVariable,
FreeVariable,
Scope,
DomainOfDiscourse,
Interpretation,
Model,
Structure,
Assignment,
TruthValue,
Satisfaction,
Validity,
Satisfiability,
LogicalConsequence,
Equivalence,
Identity,
Equality,
Substitution,
Inference,
Proof,
Axiom,
RuleOfInference,
Syntax,
Semantics
}
DEFINE ENTITY_TYPES := {
LOGICAL_LANGUAGE,
SYMBOL,
TERM,
FORMULA,
QUANTIFIER,
VARIABLE,
INTERPRETATION,
MODEL,
RELATION,
INFERENCE_OBJECT,
SEMANTIC_PROPERTY
}
DEFINE RELATION_TYPES := {
HAS_COMPONENT,
HAS_TERM,
HAS_ARGUMENT,
HAS_PREDICATE,
BINDS,
QUANTIFIES_OVER,
HAS_SCOPE,
OCCURS_IN,
IS_FREE_IN,
IS_BOUND_IN,
REFERS_TO,
DENOTES,
INTERPRETS,
ASSIGNS,
SATISFIES,
MODELS,
ENTAILS,
IMPLIES,
EQUIVALENT_TO,
SUBSTITUTES_FOR,
DERIVES,
INFERRED_FROM,
CONTAINS,
DEPENDS_ON,
IS_INSTANCE_OF,
IS_SUBTYPE_OF
}
SET PredicateLogic.type = LOGICAL_LANGUAGE
SET PredicateLogic.extends = PropositionalLogic
SET PredicateLogic.primary_extension = "internal structure of propositions"
SET PredicateLogic.expresses = {
properties_of_individuals,
relations_between_individuals,
quantified_statements
}
RULE predicate_application:
PredicateSymbol(P) ∧ Term(t)
-> AtomicFormula(P(t))
RULE n_ary_predicate_application:
PredicateSymbol(P) ∧ Terms(t1...tn)
-> AtomicFormula(P(t1,...,tn))
RULE function_application:
FunctionSymbol(f) ∧ Terms(t1...tn)
-> Term(f(t1,...,tn))
RULE universal_quantification:
Formula(phi) ∧ Variable(x)
-> Formula(∀x phi)
∧ BINDS(∀x, x)
∧ HAS_SCOPE(∀x, phi)
RULE existential_quantification:
Formula(phi) ∧ Variable(x)
-> Formula(∃x phi)
∧ BINDS(∃x, x)
∧ HAS_SCOPE(∃x, phi)
RULE free_variable:
OCCURS_IN(x, phi)
∧ NOT EXISTS q [BINDS(q,x) ∧ HAS_SCOPE(q,phi)]
-> IS_FREE_IN(x,phi)
RULE bound_variable:
EXISTS q [BINDS(q,x) ∧ HAS_SCOPE(q,phi)]
-> IS_BOUND_IN(x,phi)
RULE sentence:
Formula(phi)
∧ FreeVariables(phi) = ∅
-> Sentence(phi)
RULE interpretation:
Interpretation(I)
∧ DomainOfDiscourse(D)
-> ASSIGNS(I, ConstantSymbol, Element(D))
∧ ASSIGNS(I, FunctionSymbol, Function(D^n,D))
∧ ASSIGNS(I, PredicateSymbol, Relation(D^n))
RULE satisfaction:
Model(M)
∧ Assignment(g)
∧ Formula(phi)
∧ Evaluate(M,g,phi) = TRUE
-> SATISFIES(M,phi)
RULE validity:
Formula(phi)
∧ FOR_ALL interpretations I [Evaluate(I,phi)=TRUE]
-> Valid(phi)
RULE satisfiability:
Formula(phi)
∧ EXISTS interpretation I [Evaluate(I,phi)=TRUE]
-> Satisfiable(phi)
RULE contradiction:
Formula(phi)
∧ NOT EXISTS interpretation I [Evaluate(I,phi)=TRUE]
-> Unsatisfiable(phi)
RULE logical_consequence:
Premises(Gamma)
∧ Formula(phi)
∧ FOR_ALL models M [SATISFIES(M,Gamma) -> SATISFIES(M,phi)]
-> ENTAILS(Gamma,phi)
RULE logical_equivalence:
Formula(phi)
∧ Formula(psi)
∧ FOR_ALL models M [Evaluate(M,phi)=Evaluate(M,psi)]
-> EQUIVALENT_TO(phi,psi)
RULE substitution:
Formula(phi)
∧ Variable(x)
∧ Term(t)
-> SUBSTITUTE(phi,x,t) = phi[x:=t]
RULE identity:
Terms(a,b)
∧ Interpretation(I)
∧ Denotation(I,a)=Denotation(I,b)
-> TRUE_I(a=b)
DEFINE QUANTIFIER_SEMANTICS := {
"∀x φ" : TRUE iff φ is true for every admissible assignment of x in the domain,
"∃x φ" : TRUE iff φ is true for at least one admissible assignment of x in the domain
}
DEFINE CONNECTIVE_SEMANTICS := {
NOT(phi),
AND(phi,psi),
OR(phi,psi),
IMPLIES(phi,psi),
BICONDITIONAL(phi,psi)
}
DEFINE TERM_GRAMMAR :=
Term ::= Variable
| Constant
| FunctionSymbol "(" TermList ")"
DEFINE FORMULA_GRAMMAR :=
Formula ::= PredicateSymbol "(" TermList ")"
| Term "=" Term
| "¬" Formula
| "(" Formula "∧" Formula ")"
| "(" Formula "∨" Formula ")"
| "(" Formula "→" Formula ")"
| "(" Formula "↔" Formula ")"
| "∀" Variable Formula
| "∃" Variable Formula
DEFINE SEMANTIC_PIPELINE :=
Symbols
-> Terms
-> AtomicFormulas
-> CompoundFormulas
-> QuantifiedFormulas
-> Interpretation
-> VariableAssignment
-> Evaluation
-> TruthValue
-> Satisfaction
-> Entailment
DEFINE REASONING_PIPELINE :=
NaturalLanguageStatement
-> IdentifyIndividuals
-> IdentifyPredicatesAndRelations
-> IdentifyQuantification
-> ConstructFormalFormula
-> ValidateSyntax
-> BindVariables
-> SelectDomainOfDiscourse
-> ApplyInterpretation
-> EvaluateFormula
-> DeriveConsequences
DEFINE EXAMPLE_1 := {
natural_language: "Every human is mortal.",
formalisation: "∀x(Human(x) → Mortal(x))",
entities: {x},
predicates: {Human, Mortal},
quantifier: UniversalQuantifier
}
DEFINE EXAMPLE_2 := {
natural_language: "Some human is a philosopher.",
formalisation: "∃x(Human(x) ∧ Philosopher(x))",
entities: {x},
predicates: {Human, Philosopher},
quantifier: ExistentialQuantifier
}
DEFINE EXAMPLE_3 := {
premises: {
"∀x(Human(x) → Mortal(x))",
"Human(Socrates)"
},
conclusion: "Mortal(Socrates)",
relation: LOGICAL_CONSEQUENCE
}
DEFINE ONTOLOGY_RELATIONS := {
PredicateLogic IS_SUBTYPE_OF MathematicalLogic,
PredicateLogic CONTAINS Predicate,
PredicateLogic CONTAINS Quantifier,
PredicateLogic CONTAINS Variable,
PredicateLogic CONTAINS Term,
PredicateLogic CONTAINS Formula,
PredicateLogic DEPENDS_ON Syntax,
PredicateLogic DEPENDS_ON Semantics,
Quantifier BINDS Variable,
Predicate HAS_ARGUMENT Term,
Formula CONTAINS Term,
Interpretation INTERPRETS LogicalLanguage,
Model SATISFIES Formula,
PremiseSet ENTAILS Conclusion
}
DEFINE AI_CONSUMPTION := {
purpose: "machine-readable semantic representation of predicate logic",
parsing_mode: "typed relational algebra",
preferred_reasoning: "symbolic + semantic",
preserve_quantifier_scope: TRUE,
preserve_variable_binding: TRUE,
distinguish_syntax_semantics: TRUE,
distinguish_validity_satisfiability: TRUE,
allow_recursive_formula_parsing: TRUE,
canonicalise_equivalent_surface_forms: TRUE
}
DEFINE SEMANTIC_EQUIVALENCE := {
"for every" <=> UniversalQuantifier,
"for all" <=> UniversalQuantifier,
"each" <=> UniversalQuantifier,
"there exists" <=> ExistentialQuantifier,
"there is at least one" <=> ExistentialQuantifier,
"some" <=> ExistentialQuantifier,
"predicate logic" <=> "first-order predicate logic" WHEN order=1
}
DEFINE CONFIDENCE := {
ontology_identity: 1.00,
syntax_mapping: 0.99,
quantifier_mapping: 0.99,
semantic_interpretation: 0.98,
natural_language_formalisation: context_dependent
}
DEFINE UPDATE_MODEL := {
version: "1.0",
update_policy: "append-compatible",
immutable_core: {
quantifier_binding,
term_formula_distinction,
syntax_semantics_distinction,
model_satisfaction_relation
},
extensible_layers: {
proof_systems,
equality_theories,
many_sorted_logic,
higher_order_extensions,
modal_extensions,
computational_reasoning
}
}
DEFINE FLOW_HASH_INPUT :=
CanonicalURL
+ DOMAIN
+ ENTITY_TYPES
+ RELATION_TYPES
+ RULES
+ SEMANTIC_PIPELINE
+ REASONING_PIPELINE
+ AI_CONSUMPTION
+ UPDATE_MODEL
FLOW_HASH := HASH(FLOW_HASH_INPUT)
RETURN {
ontology: PredicateLogicOntology,
canonical_url: "https://kirethresearch.org/booksai-core/ontologies/mathematical-ontologies/mathematical-logic-ontologies/predicate-logic/predicate-logic-ontology.html",
semantic_domain: MathematicalLogic,
logical_system: PredicateLogic,
machine_consumable: TRUE,
recursive_reasoning_enabled: TRUE,
flow_complete: TRUE
}
END_FLOW
Download Code
Copy to Clipboard