Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions src/sage/crypto/boolean_function.pyx
Original file line number Diff line number Diff line change
@@ -847,15 +847,26 @@ cdef class BooleanFunction(SageObject):
sage: B = BooleanFunction("7969817CC5893BA6AC326E47619F5AD0")
sage: B.correlation_immunity()
2
TESTS:
Check if :trac:`28001` is fixed::
sage: from sage.crypto.boolean_function import BooleanFunction
sage: f = [False, False, True, False, False, True, False, False]
sage: f = BooleanFunction(f)
sage: f.correlation_immunity()
1
"""
cdef long c, i
if self._correlation_immunity is None:
c = self._nvariables
W = self.walsh_hadamard_transform()
for i in range(len(W)):
for i in range(1, len(W)):
sig_check()
if W[i]:
c = min(c, hamming_weight(i))
c = hamming_weight(i)
break
self._correlation_immunity = ZZ(c-1)
return self._correlation_immunity

2 changes: 1 addition & 1 deletion src/sage/groups/libgap_wrapper.pyx
Original file line number Diff line number Diff line change
@@ -347,7 +347,7 @@ class ParentLibGAP(SageObject):

def minimal_normal_subgroups(self):
"""
Return the nontrivial minimal normal subgroups ``self``.
Return the nontrivial minimal normal subgroups of ``self``.
EXAMPLES::
2 changes: 1 addition & 1 deletion src/sage/groups/perm_gps/permgroup.py
Original file line number Diff line number Diff line change
@@ -4118,7 +4118,7 @@ def isomorphism_type_info_simple_group(self):

def minimal_normal_subgroups(self):
"""
Return the nontrivial minimal normal subgroups ``self``.
Return the nontrivial minimal normal subgroups of ``self``.
EXAMPLES::