agent_logic.core.quantifiers

Classes

ExistentialQuantifier(**data)

Represents Existential Quantification: ∃x P(x)

Exists

alias of ExistentialQuantifier

ForAll

alias of UniversalQuantifier

UniversalQuantifier(**data)

Represents Universal Quantification: ∀x P(x)

class agent_logic.core.quantifiers.ExistentialQuantifier(**data)[source]

Bases: BaseModel

Represents Existential Quantification: ∃x P(x)

Parameters:
  • type (Literal['EXISTS'])

  • variable (str)

  • predicate (Any)

depth()[source]
Return type:

int

evaluate(context)[source]

Evaluates ∃x P(x), checking if any value satisfies predicate.

Return type:

bool

Parameters:

context (Dict[str, List[bool]])

classmethod from_dict(data)[source]
Return type:

ExistentialQuantifier

Parameters:

data (Dict)

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

predicate: Any
to_dict()[source]
Return type:

Dict

type: Literal['EXISTS']
variable: str
variables()[source]
Return type:

List[str]

agent_logic.core.quantifiers.Exists

alias of ExistentialQuantifier

agent_logic.core.quantifiers.ForAll

alias of UniversalQuantifier

class agent_logic.core.quantifiers.UniversalQuantifier(**data)[source]

Bases: BaseModel

Represents Universal Quantification: ∀x P(x)

Parameters:
  • type (Literal['FORALL'])

  • variable (str)

  • predicate (Any)

depth()[source]
Return type:

int

evaluate(context)[source]

Evaluates ∀x P(x) over all values in context[variable].

Return type:

bool

Parameters:

context (Dict[str, List[bool]])

classmethod from_dict(data)[source]
Return type:

UniversalQuantifier

Parameters:

data (Dict)

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

predicate: Any
to_dict()[source]
Return type:

Dict

type: Literal['FORALL']
variable: str
variables()[source]
Return type:

List[str]