Library prosa.util.nat
From mathcomp Require Import ssreflect ssrbool eqtype ssrnat seq fintype bigop div.
Require Export prosa.util.tactics prosa.util.ssrlia.
Require Export prosa.util.tactics prosa.util.ssrlia.
Additional lemmas about natural numbers.
First, we show that, given m1 ≥ m2 and n1 ≥ n2, an
expression (m1 + n1) - (m2 + n2) can be transformed into
expression (m1 - m2) + (n1 - n2).
Next, we show that m + p ≤ n implies that m ≤ n - p. Note
that this lemma is similar to ssreflect's lemma leq_subRL;
however, the current lemma has no precondition n ≤ p, since it
has only one direction.
We can drop additive terms on the lesser side of an inequality.
For any numbers a, b, and m, either there exists a number
n such that m = a + n × b or m ≠ a + n × b for any n.
The expression n2 × a + b can be written as n1 × a + b + (n2 - n1) × a
for any integer n1 such that n1 ≤ n2.
Given constants a, b, c, z such that b ≤ a, if there is no
constant m such that a = b + m × c, then it holds that there
is no constant n such that a + z × c = b + n × c.
Lemma mul_add_neq:
∀ a b c z,
b ≤ a →
(∀ m, a ≠ b + m × c) →
∀ n, a + z × c ≠ b + n × c.
End NatLemmas.
∀ a b c z,
b ≤ a →
(∀ m, a ≠ b + m × c) →
∀ n, a + z × c ≠ b + n × c.
End NatLemmas.
In this section, we prove a lemma about intervals of natural
numbers.
Trivially, points before the start of an interval, or past the
end of an interval, are not included in the interval.