Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download
Views: 8800
1
"""
2
Bent functions related to amicability relationships in the real representations of Clifford algebras.
3
4
Paul Leopardi.
5
"""
6
7
#*****************************************************************************
8
# Copyright (C) 2016-2022 Paul Leopardi [email protected]
9
#
10
# Distributed under the terms of the GNU General Public License (GPL)
11
# as published by the Free Software Foundation; either version 2 of
12
# the License, or (at your option) any later version.
13
# http://www.gnu.org/licenses/
14
#*****************************************************************************
15
16
from boolean_cayley_graphs.bent_function import BentFunction
17
from sage.rings.integer import Integer
18
19
base4 = lambda length, num: num.digits(4, padto=length)
20
21
22
def sigma_tau(which, m, x):
23
r"""
24
Given the numbers `which`, $m$ and $x$,
25
`sigma_tau(0,m,x)` returns $\sigma_m(x)$, and
26
`sigma_tau(1,m,x)` returns $\tau_m(x)$,
27
where $\sigma_m$ and $\tau_m$ are
28
two specific bent functions with disjoint support,
29
defined via the properties of real monomial representation matrices
30
of real Clifford algebras.
31
"""
32
xbase4 = base4(Integer(m), Integer(x))
33
nbr1 = xbase4.count(1)
34
nbr2 = xbase4.count(2)
35
return 0 if nbr1 + nbr2 == 0 else (nbr1 + which) % 2
36
37
38
clifford_sign_of_square_sigma = lambda m, x: sigma_tau(0, m, x)
39
clifford_non_diag_symmetry_tau = lambda m, x: sigma_tau(1, m, x)
40
41
42
power_4_truth_table = lambda m, f: [
43
f(m, x)
44
for x in range(4 ** m)]
45
46
47
sigma_list = lambda n: [
48
BentFunction(power_4_truth_table(m, clifford_sign_of_square_sigma))
49
for m in range(n)]
50
r"""
51
The list `sigma_list(n)` contains each `BentFunction`
52
corresponding to $\sigma_m$ for $m$ from 0 to n-1.
53
"""
54
55
56
tau_list = lambda n: [
57
BentFunction(power_4_truth_table(m, clifford_non_diag_symmetry_tau))
58
for m in range(n)]
59
r"""
60
The list `tau_list(n)` contains each `BentFunction`
61
corresponding to $\tau_m$ for $m$ from 0 to n-1.
62
"""
63
64