Skip to content

Commit

Permalink
prove the naturals have no zero divisors
Browse files Browse the repository at this point in the history
  • Loading branch information
rigille committed Oct 19, 2021
1 parent 013e480 commit 436b11d
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions base/Nat/mul/equal_zero.kind
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Nat.mul.equal_zero(
n: Nat, m: Nat
Hyp: Equal<Nat>(Nat.mul(n, m), 0)
): Or<Equal<Nat>(n, 0), Equal<Nat>(m, 0)>
case n with Hyp {
zero:
left(refl)
succ:
case m with Hyp {
zero:
right(refl)
succ:
let contra = Nat.succ_neq_zero!(Hyp)
Empty.absurd!(contra)
}!
}!

0 comments on commit 436b11d

Please sign in to comment.