Mathlib v3 is deprecated. Go to Mathlib v4

Commit 2023-01-16 20:04 91288e35

View on Github →

feat(data/fin/tuple): rename fin.append to matrix.vec_append, introduce a new fin.append and fin.repeat. (#10346) We already had fin.append v w h, which combines the append operation with casting. This commit removes the h argument, allowing it to be defeq to fin.add_cases, and moves the previous definition to the name matrix.vec_append matching matrix.vec_cons and similar. Another advantage of dropping h is that it is clearer how to state lemmas like append_assoc, as we only have one proof argument to keep track of instead of four. As it turns out, to implement a gmonoid structure on tuples (under concatenation), fin.append without the h argument is all that's needed. We implement matrix.vec_append in terms of fin.append, but provide a lemma that unfolds it to the old definition so as to avoid having to rewrite all the other proofs. Removing matrix.vec_append entirely is left to investigate in some future PR.

Estimated changes

modified def fin.append
added theorem fin.append_assoc
added theorem fin.append_elim0'
added theorem fin.append_left
added theorem fin.append_left_nil
added theorem fin.append_right
added theorem fin.append_right_nil
added theorem fin.elim0'_append
deleted theorem fin.fin_append_apply_zero
added def fin.repeat
added theorem fin.repeat_add
added theorem fin.repeat_one
added theorem fin.repeat_succ
added theorem fin.repeat_zero