Class: Axiom::Function::Proposition::Contradiction

Inherits:
Axiom::Function::Proposition show all
Includes:
Connective::Negation::Methods
Defined in:
lib/axiom/function/proposition/contradiction.rb

Overview

A class representing a contradiction

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Connective::Negation::Methods

#not

Methods included from Aliasable

#inheritable_alias

Methods inherited from Axiom::Function::Proposition

#call, coerce, #inverse, #rename, type

Methods inherited from Axiom::Function

extract_value, rename_attributes, #type

Methods included from Visitable

#accept

Class Method Details

.callfalse

Evaluate the proposition

Examples:

Contradiction.call  # => false

Returns:

  • (false)


31
32
33
# File 'lib/axiom/function/proposition/contradiction.rb', line 31

def self.call
  false
end

.inverseClass<Tautology>

Return the inverse proposition class

Examples:

Contradiction.inverse  # => Tautology

Returns:



19
20
21
# File 'lib/axiom/function/proposition/contradiction.rb', line 19

def self.inverse
  Tautology
end

Instance Method Details

#and(_other) ⇒ self

Logically AND the proposition with another expression

Examples:

contradiction.and(other)  # => contradiction

Parameters:

Returns:

  • (self)


45
46
47
# File 'lib/axiom/function/proposition/contradiction.rb', line 45

def and(_other)
  self
end

#or(other) ⇒ Function

Logically OR the proposition with another expression

Examples:

contradiction.or(other)  # => other

Parameters:

Returns:



59
60
61
# File 'lib/axiom/function/proposition/contradiction.rb', line 59

def or(other)
  other
end