Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
proper cycle should not have odd length
Browse files Browse the repository at this point in the history
  • Loading branch information
DaveWitteMorris committed Jan 11, 2020
1 parent 31cb54b commit aa21ee1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/sage/quadratic_forms/binary_qf.py
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,10 @@ def cycle(self, proper=False):
# Prop 6.10.5 in Buchmann Vollmer
C = self.cycle(proper=False)
if len(C) % 2:
return C
Cdouble = C + C
for i in range(len(C)):
Cdouble[2*i+1] = Cdouble[2*i+1]._Tau()
return Cdouble
else:
return C[:1] + [q._Tau() for q in C[1:]]
if not hasattr(self, '_cycle_list'):
Expand Down

0 comments on commit aa21ee1

Please sign in to comment.