fix(data/int/basic): move decidable theorems
This commit is contained in:
parent
5a2f81e962
commit
235894cec5
1 changed files with 4 additions and 6 deletions
|
@ -115,12 +115,6 @@ cases_on a
|
||||||
(if H : m' = n' then inl (congr_arg neg_succ_of_nat H) else
|
(if H : m' = n' then inl (congr_arg neg_succ_of_nat H) else
|
||||||
inr (take H1, H (neg_succ_of_nat_inj H1)))))
|
inr (take H1, H (neg_succ_of_nat_inj H1)))))
|
||||||
|
|
||||||
definition decidable_nonneg [instance] (a : ℤ) : decidable (nonneg a) := cases_on a _ _
|
|
||||||
|
|
||||||
definition decidable_le [instance] (a b : ℤ) : decidable (a ≤ b) := decidable_nonneg _
|
|
||||||
|
|
||||||
definition decidable_lt [instance] (a b : ℤ) : decidable (a < b) := decidable_nonneg _
|
|
||||||
|
|
||||||
theorem sub_nat_nat_of_ge {m n : ℕ} (H : m ≥ n) : sub_nat_nat m n = of_nat (m - n) :=
|
theorem sub_nat_nat_of_ge {m n : ℕ} (H : m ≥ n) : sub_nat_nat m n = of_nat (m - n) :=
|
||||||
have H1 : n - m = 0, from le_imp_sub_eq_zero H,
|
have H1 : n - m = 0, from le_imp_sub_eq_zero H,
|
||||||
calc
|
calc
|
||||||
|
@ -652,6 +646,10 @@ infix <= := int.le
|
||||||
infix ≤ := int.le
|
infix ≤ := int.le
|
||||||
infix < := int.lt
|
infix < := int.lt
|
||||||
|
|
||||||
|
definition decidable_nonneg [instance] (a : ℤ) : decidable (nonneg a) := cases_on a _ _
|
||||||
|
definition decidable_le [instance] (a b : ℤ) : decidable (a ≤ b) := decidable_nonneg _
|
||||||
|
definition decidable_lt [instance] (a b : ℤ) : decidable (a < b) := decidable_nonneg _
|
||||||
|
|
||||||
/-
|
/-
|
||||||
Other stuff.
|
Other stuff.
|
||||||
TODO: pare down and clean up.
|
TODO: pare down and clean up.
|
||||||
|
|
Loading…
Reference in a new issue