Module: Algebra::OperatorDomain

Included in:
Set
Defined in:
lib/algebra/finite-group.rb

Instance Method Summary collapse

Instance Method Details

#left_act(other) ⇒ Object



19
20
21
# File 'lib/algebra/finite-group.rb', line 19

def left_act(other)
  other.right_act(self)
end

#left_orbit!(other) ⇒ Object



98
99
100
# File 'lib/algebra/finite-group.rb', line 98

def left_orbit!(other)
  other.right_orbit!(self)
end

#left_quotient(other) ⇒ Object Also known as: left_coset



39
40
41
42
43
44
45
46
47
48
49
# File 'lib/algebra/finite-group.rb', line 39

def left_quotient(other)
  s = Set.phi
  remain = cast.dup
  until remain.empty?
    x = remain.shift
    t = Set[x].left_act(other)
    s.push t
    remain -= t
  end
  s
end

#left_representatives(other) ⇒ Object



67
68
69
70
71
72
73
74
75
76
77
# File 'lib/algebra/finite-group.rb', line 67

def left_representatives(other)
  s = Set.phi
  remain = cast.dup
  until remain.empty?
    x = remain.shift
    t = self.class[x].left_act(other)
    s.push x
    remain -= t
  end
  s
end

#right_act(other) ⇒ Object Also known as: act



12
13
14
15
# File 'lib/algebra/finite-group.rb', line 12

def right_act(other)
  cast.product(other.cast) { |x, y| x * y }
  #      product(other, self.class[unity]) {|x, y| x * y}
end

#right_orbit!(other) ⇒ Object Also known as: orbit!



79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# File 'lib/algebra/finite-group.rb', line 79

def right_orbit!(other)
  news = Set.phi
  loop do
    each_product(other) do |x, y|
      z = x * y
      news.push z unless include?(z) || news.include?(z)
    end
    if news.empty?
      break
    else
      concat news
      news = Set.phi
    end
  end
  self
end

#right_quotient(other) ⇒ Object Also known as: quotient, right_coset, coset



23
24
25
26
27
28
29
30
31
32
33
# File 'lib/algebra/finite-group.rb', line 23

def right_quotient(other)
  s = Set.phi
  remain = cast.dup
  until remain.empty?
    x = remain.shift
    t = Set[x].right_act(other)
    s.push t
    remain -= t
  end
  s
end

#right_representatives(other) ⇒ Object Also known as: representatives



53
54
55
56
57
58
59
60
61
62
63
# File 'lib/algebra/finite-group.rb', line 53

def right_representatives(other)
  s = Set.phi
  remain = cast.dup
  until remain.empty?
    x = remain.shift
    t = self.class[x].act(other)
    s.push x
    remain -= t
  end
  s
end