Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - feat(data/nat/basic): Add two lemmas two nat/basic which are necessary for the count PR #10001

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/data/nat/basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ instance nat.subtype.semilattice_sup_bot (s : set ℕ) [decidable_pred (∈ s)]
..subtype.linear_order s,
..lattice_of_linear_order }

lemma nat.subtype.coe_bot {s : set ℕ} [decidable_pred (∈ s)]
[h : nonempty s] : ((⊥ : s) : ℕ) = nat.find (nonempty_subtype.1 h) := rfl

theorem nat.nsmul_eq_mul (m n : ℕ) : m • n = m * n :=
rfl

Expand Down Expand Up @@ -510,6 +513,9 @@ begin
exact nat.le_of_pred_lt h', },
end

/-- A version of `nat.sub_succ` in the form `_ - 1` instead of `nat.pred _`. -/
lemma sub_succ' (a b : ℕ) : a - b.succ = a - b - 1 := rfl
SymmetryUnbroken marked this conversation as resolved.
Show resolved Hide resolved

/-! ### `mul` -/

lemma succ_mul_pos (m : ℕ) (hn : 0 < n) : 0 < (succ m) * n :=
Expand Down