• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Debugging
    • Projects
      • Apt
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • Proof-checker-array
      • Soft
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Leftist-trees
      • Java
      • Taspi
      • Bitcoin
      • Des
      • Ethereum
      • Sha-2
      • Yul
      • Zcash
        • Jubjub
        • Verify-zcash-r1cs
        • Lift-zcash-r1cs
        • Pedersen-hash
          • Pedersen-segment-scalar
          • Pedersen-segment-point
          • Find-group-hash
          • Pedersen-point
          • Pedersen-enc
          • Group-hash
          • Coordinate-extract
          • Pedersen-segment-addend
          • Pedersen
          • Pedersen-pad
          • Pedersen-hash-injectivity-properties
          • Pedersen-hash-bound-properties
            • Pedersen-segment-scalar-bound
            • Pedersen-segment-scalar-not-zero-proof
            • Pedersen-hash-image-properties
            • *pedersen-c*
          • Zcash-gadgets
          • Bit/byte/integer-conversions
          • Constants
          • Blake2-hash
          • Randomness-beacon
        • Proof-checker-itp13
        • Bigmem
        • Regex
        • ACL2-programming-language
        • C
        • Jfkr
        • X86isa
        • Equational
        • Cryptography
        • Where-do-i-place-my-book
        • Json
        • Execloader
        • Builtins
        • Solidity
        • Paco
        • Concurrent-programs
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Pedersen-hash-bound-properties

    Pedersen-segment-scalar-not-zero-proof

    Proof that pedersen-segment-scalar is not 0.

    This is proved by first proving that the loop function is outside the interval between -2^{4\cdot(j-1)} to 2^{4\cdot(j-1)}, both exclusive. Setting j=1, we have that pedersen-segment-scalar is outside the interval from -1 to 1 exclusive, i.e. it is not 0. To prove the lemma about the loop function, to avoid dealing with a disjunction of inequalities, we introduce a predicate for being outside the interval and we prove some theorems about it. Some of these theorems are currently somewhat specific; perhaps there is a way to improve the form of the proof.

    The fact, mentioned above, that the loop function is outside a certain interval is also useful to prove other properties. Thus, we export a theorem asserting that.

    Definitions and Theorems

    Theorem: pedersen-segment-scalar-loop-outside-interval

    (defthm pedersen-segment-scalar-loop-outside-interval
      (implies (and (posp j)
                    (bit-listp segment)
                    (integerp (/ (len segment) 3))
                    (consp segment))
               (or (<= (pedersen-segment-scalar-loop j segment)
                       (- (expt 2 (+ -4 (* 4 j)))))
                   (<= (expt 2 (+ -4 (* 4 j)))
                       (pedersen-segment-scalar-loop j segment)))))

    Theorem: pedersen-segment-scalar-not-zero

    (defthm pedersen-segment-scalar-not-zero
      (implies (and (bit-listp segment)
                    (integerp (/ (len segment) 3))
                    (consp segment))
               (not (equal (pedersen-segment-scalar segment)
                           0)))
      :rule-classes :type-prescription)