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/fin/interval): add lemmas #11102

Closed
wants to merge 18 commits into from
4 changes: 4 additions & 0 deletions src/data/fin/basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,10 @@ by simp [lt_iff_coe_lt_coe]
lemma eq_last_of_not_lt {i : fin (n+1)} (h : ¬ (i : ℕ) < n) : i = last n :=
le_antisymm (le_last i) (not_lt.1 h)

lemma last_eq_top (n : ℕ) : fin.last n = ⊤ := rfl

lemma zero_eq_bot (n : ℕ) : (0 : fin (n + 1)) = ⊥ := rfl
riccardobrasca marked this conversation as resolved.
Show resolved Hide resolved

section

variables {α : Type*} [preorder α]
Expand Down
4 changes: 0 additions & 4 deletions src/data/fin/interval.lean
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ instance : locally_finite_order (fin n) := subtype.locally_finite_order _

namespace fin

lemma last_eq_top (n : ℕ) : fin.last n = ⊤ := rfl

lemma zero_eq_bot (n : ℕ) : (0 : fin (n + 1)) = ⊥ := rfl

section bounded
variables {n} (a b : fin n)

Expand Down