Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prime factorization #2062

Merged
merged 18 commits into from
Aug 29, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions theories/Spaces/Nat/Division.v
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,22 @@ Class IsPrime (n : nat) : Type0 := {

Definition issig_IsPrime n : _ <~> IsPrime n := ltac:(issig).

Global Instance ishprop_isprime `{Funext} n : IsHProp (IsPrime n).
jdchristensen marked this conversation as resolved.
Show resolved Hide resolved
Proof.
nrapply istrunc_equiv_istrunc.
1: apply issig_IsPrime.
rapply istrunc_sigma.
intros H1.
snrapply istrunc_forall.
intros m.
snrapply istrunc_forall.
intros d.
rapply ishprop_sum.
intros p q.
nrapply (snd neq_iff_lt_or_gt _ (p^ @ q)).
by left.
Defined.

(** [0] is not a prime number. *)
Definition not_isprime_zero : ~ IsPrime 0.
Proof.
Expand Down