Fin Sigma Equivalences #
We re-define big-operators sum and product over Fin to have good definitional equalities.
Dependent flatten with unified motive: flattens a nested dependent vector
(i : Fin m) → (j : Fin (n i)) → motive (embedSum i j) into a single dependent vector
(k : Fin (vsum n)) → motive k, preserving element order.
This is meant to replace nested iteration for dependent families with a unified motive.
Instances For
Homogeneous flatten: flattens a nested homogeneous vector
(i : Fin m) → (j : Fin (n i)) → α into a single homogeneous vector Fin (vsum n) → α
by specializing dflatten to the constant-type motive fun _ => α.
Instances For
Functorial flatten: flattens a nested heterogeneous tuple
(i : Fin m) → (j : Fin (n i)) → F (α i j) into a single heterogeneous tuple with type
(k : Fin (vsum n)) → F (vflatten α k) where vflatten operates on the vector of types α.
Unlike dflatten which requires an explicit unified motive, fflatten uses vflatten to
automatically construct the motive from the input type family.
Instances For
Functorial flatten with two arguments: flattens two nested heterogeneous tuple
(i : Fin m) → (j : Fin (n i)) → F (α i j) into a single heterogeneous tuple with type
(k : Fin (vsum n)) → F (vflatten α k) where vflatten operates on the vector of types α.
Unlike dflatten which requires an explicit unified motive, fflatten uses vflatten to
automatically construct the motive from the input type family.
Instances For
Heterogeneous flatten: flattens a nested heterogeneous tuple
(i : Fin m) → (j : Fin (n i)) → α i j into a single heterogeneous tuple with type
(k : Fin (vsum n)) → vflatten α k where vflatten operates on the vector of types α.
Unlike dflatten which requires an explicit unified motive, hflatten uses vflatten to
automatically construct the motive from the input type family.
Instances For
Find the first index i such that k is smaller than ∑ j < i, a j, and return none
otherwise.
This is the dependent version of Fin.divNat.