# Negacyclic property check in the function "checkInputFunction"

**URL:** <https://openfhe.discourse.group/t/negacyclic-property-check-in-the-function-checkinputfunction/1340>\
**Category:** Library Questions\
**Created:** [June 11, 2024, 10:29pm UTC](https://openfhe.discourse.group/t/negacyclic-property-check-in-the-function-checkinputfunction/1340 "2024-06-11T22:29:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fstasel](https://avatars.discourse-cdn.com/v4/letter/f/b9bd4f/32.png) [@fstasel](https://openfhe.discourse.group/u/fstasel)\
**Post date:** [June 11, 2024, 10:29pm UTC](https://openfhe.discourse.group/t/negacyclic-property-check-in-the-function-checkinputfunction/1340/1 "2024-06-11T22:29:25Z")

</div>

static uint32\_t checkInputFunction(…) (in binfhe-base-scheme.h) basically checks lut[i] = (mod - lut[mid + i]) which is identical to check whether lut[i] + lut[mid + i] = mod. That is for checking whether the 1st half of LUT is negative of the 2nd half. However, a zero (0) in LUT always breaks negacyclic propery even if m=0 (mod m). For instance:  
[0,1,0,3] (mod 4) is not negacyclic w.r.t. checkInputFunction (since 0+0 != 4)  
Is this behaviour correct or does it need to be fixed?
