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

#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.



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

def initialize(p); @p = p     end

Instance Attribute Details

#pObject

Returns the value of attribute p.



112
113
114
# File 'lib/hilbert/world/propositional_logic.rb', line 112

def p
  @p
end

Instance Method Details

#!@Object



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

def !@;             ~(!p)     end

#deepObject



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

def deep;          p.deep+1   end

#to_sObject



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

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