Equivalence between fin 0
and empty
.
Equations
- fin_zero_equiv = {to_fun := fin_zero_elim (λ (ᾰ : fin 0), empty), inv_fun := empty.elim (fin 0), left_inv := fin_zero_equiv._proof_1, right_inv := fin_zero_equiv._proof_2}
Equivalence between fin 0
and pempty
.
Equations
- fin_zero_equiv' = equiv.equiv_pempty fin_zero_equiv'._proof_1
An equivalence that removes i
and maps it to none
.
This is a version of fin.pred_above
that produces option (fin n)
instead of
mapping both i.cast_succ
and i.succ
to i
.
Equations
- fin_succ_equiv' i = {to_fun := λ (x : fin (n + 1)), ite (x = ⇑fin.cast_succ i) none (some (i.pred_above x)), inv_fun := λ (x : option (fin n)), x.cases_on' (⇑fin.cast_succ i) ⇑((⇑fin.cast_succ i).succ_above), left_inv := _, right_inv := _}
@[simp]
theorem
fin_succ_equiv'_at
{n : ℕ}
(i : fin (n + 1)) :
⇑(fin_succ_equiv' i) (⇑fin.cast_succ i) = none
theorem
fin_succ_equiv'_below
{n : ℕ}
{i m : fin (n + 1)}
(h : m < i) :
⇑(fin_succ_equiv' i) (⇑fin.cast_succ m) = some m
@[simp]
theorem
fin_succ_equiv'_symm_none
{n : ℕ}
(i : fin (n + 1)) :
⇑((fin_succ_equiv' i).symm) none = ⇑fin.cast_succ i
theorem
fin_succ_equiv_symm'_some_below
{n : ℕ}
{i m : fin (n + 1)}
(h : m < i) :
⇑((fin_succ_equiv' i).symm) (some m) = ⇑fin.cast_succ m
theorem
fin_succ_equiv_symm'_coe_below
{n : ℕ}
{i m : fin (n + 1)}
(h : m < i) :
⇑((fin_succ_equiv' i).symm) ↑m = ⇑fin.cast_succ m
@[simp]
@[simp]
@[simp]
The equiv version of fin.pred_above_zero
.
@[simp]
The equivalence between fin (m + n)
and fin (n + m)
which rotates by n
.
Equations
- fin_add_flip = (fin_sum_fin_equiv.symm.trans (equiv.sum_comm (fin m) (fin n))).trans fin_sum_fin_equiv
Rotate fin n
one step to the right.
Equations
- fin_rotate (n + 1) = fin_add_flip.trans (fin_congr _)
- fin_rotate 0 = equiv.refl (fin 0)
@[simp]
@[protected, instance]
fin 0
is a subsingleton.
@[protected, instance]
fin 1
is a subsingleton.