Class: Hilbert::World::PropositionalLogic::NEG
- Inherits:
-
Object
- Object
- Hilbert::World::PropositionalLogic::NEG
- Includes:
- Base
- Defined in:
- lib/hilbert/world/propositional_logic.rb
Instance Attribute Summary collapse
-
#p ⇒ Object
Returns the value of attribute p.
Instance Method Summary collapse
- #!@ ⇒ Object
- #deep ⇒ Object
-
#initialize(p) ⇒ NEG
constructor
A new instance of NEG.
- #to_s ⇒ Object
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
#p ⇒ Object
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 |
#deep ⇒ Object
120 |
# File 'lib/hilbert/world/propositional_logic.rb', line 120 def deep; p.deep+1 end |
#to_s ⇒ Object
118 |
# File 'lib/hilbert/world/propositional_logic.rb', line 118 def to_s; "~#{@p}" end |