no crypto

This commit is contained in:
Michael Zhang 2024-05-09 04:34:09 -05:00
parent a6d602c0f7
commit b95699f2f0
2 changed files with 0 additions and 75 deletions

View file

@ -1,36 +0,0 @@
{-# OPTIONS --cubical #-}
module Crypto.RSA where
open import Agda.Builtin.Cubical.Path
open import Crypto.RSA.Nat
refl : {A : Set} {x y : A} x y
refl {A} {x} {y} i = x
data Σ (A : Set) (B : A Set) : Set where
⟨_,_⟩ : (x : A) B x Σ A B
: {A : Set} (B : A Set) Set
{A} B = Σ A B
∃-syntax =
syntax ∃-syntax (λ x B) = ∃[ x ] B
record divides (d n : ) : Set where
constructor mkDivides
field
p : ∃[ m ] (d * m n)
-- doesDivide : (d n : ) → Dec (divides d n)
-- doesDivide zero n = yes refl
-- doesDivide (suc d) n = ?
record prime (n : ) : Set where
constructor mkPrime
field
p : (x y : ) ¬ (x * y n)
isPrime : (n : ) Dec (prime n)
isPrime zero = ?
isPrime (suc n) = ?

View file

@ -1,39 +0,0 @@
{-# OPTIONS --cubical #-}
module Crypto.RSA.Nat where
open import Agda.Builtin.Cubical.Path
infixl 6 _+_
infixl 7 _*_
data Bool : Set where
true : Bool
false : Bool
record : Set where
¬_ : Set Set
¬ x =
data Dec (A : Set) : Set where
yes : A Dec A
no : ¬ A Dec A
data : Set where
zero :
suc :
{-# BUILTIN NATURAL #-}
data Fin : Set where
zero : {n : } Fin (suc n)
suc : {n : } (i : Fin n) Fin (suc n)
_+_ :
zero + y = y
suc x + y = suc (x + y)
_*_ :
zero * y = zero
suc x * y = y + x * y