Module: Hilbert::World::PropositionalLogic::Operator
- Included in:
- Base
- Defined in:
- lib/hilbert/world/propositional_logic.rb
Instance Method Summary collapse
Instance Method Details
#*(q) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/hilbert/world/propositional_logic.rb', line 15 def *(q) case q when Taut then self when UTaut then $utout when self then self else if neg?(q) then $utout else FORM.new([self, q], :*) end end end |
#+(q) ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/hilbert/world/propositional_logic.rb', line 27 def +(q) case q when Taut then $tout when UTaut then self when self then self else if neg?(q) then $tout else FORM.new([self, q], :+) end end end |
#<=>(q) ⇒ Object
43 44 45 |
# File 'lib/hilbert/world/propositional_logic.rb', line 43 def <=>(q) (self >= q) * (q >= self) end |
#>=(q) ⇒ Object
39 40 41 |
# File 'lib/hilbert/world/propositional_logic.rb', line 39 def >=(q) (~self + q) end |