Skip to content

Commit

Permalink
feat(data/fin): fin.succ_cast_succ (#8828)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisHughes24 committed Aug 26, 2021
1 parent cb1932d commit bafeccf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/data/fin.lean
Expand Up @@ -695,6 +695,10 @@ begin
exact congr_arg coe (equiv.apply_of_injective_symm _ _ _)
end

lemma succ_cast_succ {n : ℕ} (i : fin n) :
i.cast_succ.succ = i.succ.cast_succ :=
fin.ext (by simp)

/-- `add_nat m i` adds `m` to `i`, generalizes `fin.succ`. -/
def add_nat (m) : fin n ↪o fin (n + m) :=
order_embedding.of_strict_mono (λ i, ⟨(i : ℕ) + m, add_lt_add_right i.2 _⟩) $
Expand Down

0 comments on commit bafeccf

Please sign in to comment.