Toumaima commited on
Commit
ca6d5bd
·
verified ·
1 Parent(s): 9cb121a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -11
app.py CHANGED
@@ -34,17 +34,17 @@ class BasicAgent:
34
  'e': {'a': 'd', 'b': 'b', 'c': 'a', 'd': 'd', 'e': 'c'}
35
  }
36
 
37
- def check_commutativity(self):
38
- S = ['a', 'b', 'c', 'd', 'e']
39
- counter_example_elements = set()
40
-
41
- # Check for commutativity violations
42
- for x in S:
43
- for y in S:
44
- if self.operation_table[x][y] != self.operation_table[y][x]:
45
- counter_example_elements.add(x)
46
- counter_example_elements.add(y)
47
- return sorted(counter_example_elements)
48
 
49
  def maybe_reversed(self, text: str) -> bool:
50
  words = text.split()
 
34
  'e': {'a': 'd', 'b': 'b', 'c': 'a', 'd': 'd', 'e': 'c'}
35
  }
36
 
37
+ def check_commutativity(self):
38
+ S = ['a', 'b', 'c', 'd', 'e']
39
+ counter_example_elements = set()
40
+
41
+ # Check for commutativity violations
42
+ for x in S:
43
+ for y in S:
44
+ if self.operation_table[x][y] != self.operation_table[y][x]:
45
+ counter_example_elements.add(x)
46
+ counter_example_elements.add(y)
47
+ return sorted(counter_example_elements)
48
 
49
  def maybe_reversed(self, text: str) -> bool:
50
  words = text.split()