Documentation

SSA.Projects.FullyHomomorphicEncryption.PaperExamples

theorem RingLemmas.dialect_f_eq_zero {q : } {n : } :
(Ideal.Quotient.mk (Ideal.span {f q n})) (f q n) = 0

In the quotient ring, (f q n) = 0.

theorem RingLemmas.dialect_mul_f_eq_zero {q : } {n : } (a : R q n) :
a * (Ideal.Quotient.mk (Ideal.span {f q n})) (f q n) = 0

Since (f q n) = 0, anything multiplied by it is also zero.

theorem RingLemmas.dialect_add_f_eq {q : } {n : } (a : R q n) :
a + (Ideal.Quotient.mk (Ideal.span {f q n})) (f q n) = a

Since (f q n) = 0, adding it to any element gives the element itself.

def ExampleComm.lhs {q : } {n : } [hq : Fact (q > 1)] :
Com (FHE q n) ((Ctxt.snoc [] Ty.polynomialLike).snoc Ty.polynomialLike) EffectKind.pure Ty.polynomialLike
Equations
Instances For
    def ExampleComm.rhs {q : } {n : } [hq : Fact (q > 1)] :
    Com (FHE q n) ((Ctxt.snoc [] Ty.polynomialLike).snoc Ty.polynomialLike) EffectKind.pure Ty.polynomialLike
    Equations
    Instances For
      noncomputable def ExampleComm.p1 {q : } {n : } [hq : Fact (q > 1)] :
      PeepholeRewrite (FHE q n) [Ty.polynomialLike, Ty.polynomialLike] Ty.polynomialLike
      Equations
      • ExampleComm.p1 = { lhs := ExampleComm.lhs, rhs := ExampleComm.rhs, correct := }
      Instances For
        @[irreducible]
        def irreduciblePow (q : ) (n : ) :
        Equations
        Instances For
          noncomputable def a_plus_generator_eq_a {q : } {n : } [hq : Fact (q > 1)] :
          Com (FHE q n) (Ctxt.snoc [] Ty.polynomialLike) EffectKind.pure Ty.polynomialLike
          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            def rhs {q : } {n : } [hq : Fact (q > 1)] :
            Com (FHE q n) (match match (Ctxt.DerivedCtxt.ofCtxt (Ctxt.DerivedCtxt.ofCtxt ).ctxt).snoc Ty.polynomialLike with | { ctxt := Γ'', diff := diff } => { ctxt := Γ'', diff := (Ctxt.DerivedCtxt.ofCtxt ).diff + diff } with | { ctxt := Γ', diff := diff } => Γ') EffectKind.pure Ty.polynomialLike
            Equations
            Instances For
              noncomputable def p1 {q : } {n : } [hq : Fact (q > 1)] :
              PeepholeRewrite (FHE q n) [Ty.polynomialLike] Ty.polynomialLike
              Equations
              • p1 = { lhs := a_plus_generator_eq_a, rhs := rhs, correct := }
              Instances For