norm_fin #
This file defines functions for dealing with fin n numbers as expressions.
Main definitions #
-
tactic.norm_fin.eval_ineqis anorm_numplugin for normalizing equalities and inequalities of typefin n. -
tactic.interactive.norm_finis a standalone tactic likenorm_numfor normalizingfin nexpressions anywhere in the goal.
normalize_fin n a b means that a : fin n is equivalent to b : ℕ in the modular sense -
that is, ↑a ≡ b (mod n). This is used for translating the algebraic operations: addition,
multiplication, zero and one, which use modulo for reduction.
Equations
- tactic.norm_fin.normalize_fin n a b = (a.val = b % n)
normalize_fin_lt n a b means that a : fin n is equivalent to b : ℕ in the embedding
sense - that is, ↑a = b. This is used for operations that treat fin n as the subset
{0, ..., n-1} of ℕ. For example, fin.succ : fin n → fin (n+1) is thought of as the successor
function, but it does not lift to a map zmod n → zmod (n+1); this addition only makes sense if
the input is strictly less than n.
normalize_fin_lt n a b is equivalent to normalize_fin n a b ∧ b < n.
Equations
- tactic.norm_fin.normalize_fin_lt n a b = (a.val = b)