Commit 2021-07-09 12:30 9a4a3ba6

View on Github →

feat(Data/Int): port data.int.basic from the lean3 prelude (#23)

  • port lean3 core's int/basic.lean
  • refactor(Int): undo my strange naming
  • add coe_nat_inj which I apparantly forgot about
  • minor cleanup
  • add missing imports
  • cleanup proofs, implementing kevin's suggestions

Estimated changes

added theorem Int.add_assoc_aux1
added theorem Int.add_assoc_aux2
added theorem Int.eq_x_or_neg
added def Int.fdiv
added def Int.fmod
added def Int.gcd
added def Int.nat_abs
added theorem Int.nat_abs_eq
added theorem Int.nat_abs_mul_self
added theorem Int.nat_abs_neg
added theorem Int.nat_abs_of_nat
added theorem Int.nat_abs_one
added theorem Int.nat_abs_zero
added def Int.nat_mod
added def Int.neg_of_nat
added theorem Int.neg_of_nat_add
added theorem Int.neg_of_nat_of_succ
added theorem Int.neg_of_nat_zero
added theorem Int.neg_succ_of_nat_eq
added def Int.nonneg
added theorem Int.of_nat_add
added theorem Int.of_nat_add_of_nat
added theorem Int.of_nat_eq_coe
added theorem Int.of_nat_mul
added theorem Int.of_nat_mul_of_nat
added theorem Int.of_nat_one
added theorem Int.of_nat_sub
added theorem Int.of_nat_succ
added theorem Int.of_nat_zero
added def Int.quot
added def Int.rem
added def Int.sign
added theorem Int.sign_mul_nat_abs
added theorem Int.sign_neg_one
added theorem Int.sign_one
added theorem Int.sign_zero
added def Int.sub_nat_nat
added theorem Int.sub_nat_nat_add
added theorem Int.sub_nat_nat_elim
added theorem Int.sub_nat_nat_of_le
added theorem Int.sub_nat_nat_of_lt
added theorem Int.sub_nat_nat_sub
added theorem Int.sub_nat_self
added def Int.to_nat
added theorem Int.to_nat_sub