Documentation

SSA.Projects.FullyHomomorphicEncryption.Statements

theorem Poly.mul_comm {q : } {n : } (a : R q n) (b : R q n) :
a * b = b * a
theorem Poly.add_comm {q : } {n : } (a : R q n) (b : R q n) :
a + b = b + a
@[simp]
theorem Poly.f_eq_zero {q : } {n : } :
(Ideal.Quotient.mk (Ideal.span {f q n})) (f q n) = 0
theorem Poly.mul_f_eq_zero {q : } {n : } (a : R q n) :
a * (Ideal.Quotient.mk (Ideal.span {f q n})) (f q n) = 0
theorem Poly.mul_one_eq {q : } {n : } (a : R q n) :
1 * a = a
theorem Poly.add_f_eq {q : } {n : } (a : R q n) :
a + (Ideal.Quotient.mk (Ideal.span {f q n})) (f q n) = a
theorem Poly.add_zero_eq {a : } :
a + 0 = a
theorem Poly.eq_iff_rep_eq {q : } {n : } [Fact (q > 1)] (a : R q n) (b : R q n) :
theorem Poly.from_poly_zero {n : } {q : } :
R.fromPoly 0 = 0
theorem Poly.rep_zero {q : } {n : } [Fact (q > 1)] :
theorem Poly.monomial_mul_mul {q : } {n : } (x : ) (y : ) :
theorem R.toTensor_getD {q : } {n : } [Fact (q > 1)] (a : R q n) (i : ) :
a.toTensor.getD i 0 = ZMod.toInt q (a.coeff i)
theorem R.toTensor_getD' {q : } {n : } [hqgt1 : Fact (q > 1)] (a : R q n) (i : ) :
(a.toTensor.getD i 0) = a.coeff i
theorem R.monomial_zero_c_eq_zero {q : } {n : } {c : } :
theorem R.fromTensor_eq_concat_zero {q : } {n : } (tensor : List ) :
R.fromTensor tensor = R.fromTensor (tensor ++ [0])
theorem R.fromTensor_eq_concat_zeroes {q : } {n : } (tensor : List ) (k : ) :
@[simp]
theorem R.trimTensor_append_zero_eq (tensor : List ) :
trimTensor (tensor ++ [0]) = trimTensor tensor
@[simp]
theorem R.trimTensor_append_zeroes_eq (tensor : List ) (n : ) :
theorem R.trimTensor_append_not_zero (tensor : List ) (x : ) (hX : x 0) :
trimTensor (tensor ++ [x]) = tensor ++ [x]
theorem R.trimTensor_eq_append_zeros (tensor : List ) :
∃ (n : ), tensor = trimTensor tensor ++ List.replicate n 0
theorem R.trimTensor_getD_0 {i : } (tensor : List ) :
tensor.getD i 0 = (trimTensor tensor).getD i 0
theorem R.trimTensor_toTensor'_eq_trimTensor_toTensor {q : } {n : } [Fact (q > 1)] (a : R q n) :
trimTensor a.toTensor' = trimTensor a.toTensor
theorem Poly.eq_iff_coeff_eq {q : } {n : } [hqgt1 : Fact (q > 1)] (a : R q n) (b : R q n) :
a = b (R.representative q n a).coeff = (R.representative q n b).coeff
theorem Poly.toTensor_length_eq_rep_length {q : } {n : } [Fact (q > 1)] (a : R q n) :
a.toTensor.length = a.repLength
theorem Poly.toTensor_length_eq_f_deg_plus_1 {q : } {n : } [Fact (q > 1)] (a : R q n) :
a.toTensor'.length = 2 ^ n + 1
theorem Poly.toTensor_trimTensor_eq_toTensor {q : } {n : } [Fact (q > 1)] (a : R q n) :
trimTensor a.toTensor = a.toTensor
theorem Poly.R.trim_toTensor'_eq_toTensor {q : } {n : } [hqgt1 : Fact (q > 1)] (a : R q n) :
trimTensor a.toTensor' = a.toTensor
theorem Poly.toTensor_fromTensor {q : } {n : } [hqgt1 : Fact (q > 1)] (tensor : List ) (i : ) (htensorlen : tensor.length < 2 ^ n) :
(R.fromTensor tensor).toTensor.getD i 0 = tensor.getD i 0 % q
theorem Poly.fromTensor_toTensor {q : } {n : } [hqgt1 : Fact (q > 1)] (a : R q n) (adeg : (R.representative q n a).natDegree + 1 < 2 ^ n) :
R.fromTensor a.toTensor = a
theorem Poly.fromTensor_toTensor' {q : } {n : } [hqgt1 : Fact (q > 1)] (a : R q n) (adeg : (R.representative q n a).natDegree + 1 < 2 ^ n) :
R.fromTensor a.toTensor' = a