Equivalences for fin n
#
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
Π i : fin 2, α i
is equivalent to α 0 × α 1
. See also fin_two_arrow_equiv
for a
non-dependent version and prod_equiv_pi_fin_two
for a version with inputs α β : Type u
.
A product space α × β
is equivalent to the space Π i : fin 2, γ i
, where
γ = fin.cons α (fin.cons β fin_zero_elim)
. See also pi_fin_two_equiv
and
fin_two_arrow_equiv
.
Equations
- prod_equiv_pi_fin_two α β = (pi_fin_two_equiv (fin.cons α (fin.cons β fin_zero_elim))).symm
The space of functions fin 2 → α
is equivalent to α × α
. See also pi_fin_two_equiv
and
prod_equiv_pi_fin_two
.
Π i : fin 2, α i
is order equivalent to α 0 × α 1
. See also order_iso.fin_two_arrow_equiv
for a non-dependent version.
Equations
- order_iso.pi_fin_two_iso α = {to_equiv := pi_fin_two_equiv α, map_rel_iff' := _}
The space of functions fin 2 → α
is order equivalent to α × α
. See also
order_iso.pi_fin_two_iso
.
Equations
- order_iso.fin_two_arrow_iso α = {to_equiv := fin_two_arrow_equiv α, map_rel_iff' := _}
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 := i.insert_nth option.none option.some, inv_fun := λ (x : option (fin n)), x.cases_on' i ⇑(i.succ_above), left_inv := _, right_inv := _}
The equiv version of fin.pred_above_zero
.
succ_above
as an order isomorphism between fin n
and {x : fin (n + 1) // x ≠ p}
.
Equations
- fin_succ_above_equiv p = {to_equiv := {to_fun := (⇑(equiv.option_subtype p) ⟨(fin_succ_equiv' p).symm, _⟩).to_fun, inv_fun := (⇑(equiv.option_subtype p) ⟨(fin_succ_equiv' p).symm, _⟩).inv_fun, left_inv := _, right_inv := _}, map_rel_iff' := _}
Order isomorphism between Π j : fin (n + 1), α j
and
α i × Π j : fin n, α (fin.succ_above i j)
.
Equations
- order_iso.pi_fin_succ_above_iso α i = {to_equiv := equiv.pi_fin_succ_above_equiv α i, map_rel_iff' := _}
Equivalence between fin m ⊕ fin n
and fin (m + n)
Equations
- fin_sum_fin_equiv = {to_fun := sum.elim ⇑(fin.cast_add n) ⇑(fin.nat_add m), inv_fun := λ (i : fin (m + n)), fin.add_cases sum.inl sum.inr i, left_inv := _, right_inv := _}
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)
The equivalence induced by a ↦ (a / n, a % n)
for nonzero n
.
This is like fin_prod_fin_equiv.symm
but with m
infinite.
See nat.div_mod_unique
for a similar propositional statement.
The equivalence induced by a ↦ (a / n, a % n)
for nonzero n
.
See int.div_mod_unique
for a similar propositional statement.
Promote a fin n
into a larger fin m
, as a subtype where the underlying
values are retained. This is the order_iso
version of fin.cast_le
.
fin 0
is a subsingleton.
fin 1
is a subsingleton.