@[instance]
Equations
Equations
- int.sub_nat_nat m n = int.sub_nat_nat._match_1 m n (n - m)
- int.sub_nat_nat._match_1 m n k.succ = -[1+ k]
- int.sub_nat_nat._match_1 m n 0 = int.of_nat (m - n)
Equations
- -[1+ m].add -[1+ n] = -[1+ (m + n).succ]
- -[1+ m].add (int.of_nat n) = int.sub_nat_nat n m.succ
- (int.of_nat m).add -[1+ n] = int.sub_nat_nat m n.succ
- (int.of_nat m).add (int.of_nat n) = int.of_nat (m + n)
Equations
- -[1+ m].mul -[1+ n] = int.of_nat (m.succ * n.succ)
- -[1+ m].mul (int.of_nat n) = int.neg_of_nat (m.succ * n)
- (int.of_nat m).mul -[1+ n] = int.neg_of_nat (m * n.succ)
- (int.of_nat m).mul (int.of_nat n) = int.of_nat (m * n)
theorem
int.sub_nat_nat_elim
(m n : ℕ)
(P : ℕ → ℕ → ℤ → Prop) :
(∀ (i n : ℕ), P (n + i) n (int.of_nat i)) → (∀ (i m : ℕ), P m (m + i + 1) -[1+ i]) → P m n (int.sub_nat_nat m n)
Equations
- -[1+ m].quot -[1+ n] = int.of_nat (m.succ / n.succ)
- -[1+ m].quot (int.of_nat n) = -int.of_nat (m.succ / n)
- (int.of_nat m).quot -[1+ n] = -int.of_nat (m / n.succ)
- (int.of_nat m).quot (int.of_nat n) = int.of_nat (m / n)
Equations
- -[1+ m].rem -[1+ n] = -int.of_nat (m.succ % n.succ)
- -[1+ m].rem (int.of_nat n) = -int.of_nat (m.succ % n)
- (int.of_nat m).rem -[1+ n] = int.of_nat (m % n.succ)
- (int.of_nat m).rem (int.of_nat n) = int.of_nat (m % n)