Equations
- Fin.ofNat' a h = { val := a % n, isLt := ⋯ }
Instances For
Remark: land/lor can be defined without using (% n), but we are trying to minimize the number of Nat theorems needed to bootstrap Lean.
Equations
- Fin.shiftLeft x✝ x = match x✝, x with | { val := a, isLt := h }, { val := b, isLt := isLt } => { val := a <<< b % n, isLt := ⋯ }
Instances For
Equations
- Fin.shiftRight x✝ x = match x✝, x with | { val := a, isLt := h }, { val := b, isLt := isLt } => { val := a >>> b % n, isLt := ⋯ }
Instances For
Equations
- Fin.instShiftRightFin = { shiftRight := Fin.shiftRight }
@[inline]
castAdd m i
embeds i : Fin n
in Fin (n+m)
. See also Fin.natAdd
and Fin.addNat
.
Equations
- Fin.castAdd m = Fin.castLE ⋯