Class: Hilbert::World::PropositionalLogic::NEG

Inherits:
Object
  • Object
show all
Includes:
Base
Defined in:
lib/hilbert/world/propositional_logic.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Utils

#dpll!, #include?, #is_and?, #is_form?, #is_neg?, #is_or?, #neg?

Methods included from Operator

#*, #+, #<=>, #>=, #~@

Constructor Details

#initialize(p) ⇒ NEG

Returns a new instance of NEG.



117
# File 'lib/hilbert/world/propositional_logic.rb', line 117

def initialize(p); @p = p     end

Instance Attribute Details

#pObject

Returns the value of attribute p.



116
117
118
# File 'lib/hilbert/world/propositional_logic.rb', line 116

def p
  @p
end

Instance Method Details

#!@Object



119
# File 'lib/hilbert/world/propositional_logic.rb', line 119

def !@;             ~(!p)     end

#deepObject



120
# File 'lib/hilbert/world/propositional_logic.rb', line 120

def deep;          p.deep+1   end

#to_sObject



118
# File 'lib/hilbert/world/propositional_logic.rb', line 118

def to_s;          "~#{@p}"   end