diff options
| author | Georges Gonthier | 2018-12-13 12:55:43 +0100 |
|---|---|---|
| committer | Georges Gonthier | 2018-12-13 12:55:43 +0100 |
| commit | 0b1ea03dafcf36880657ba910eec28ab78ccd018 (patch) | |
| tree | 60a84ff296299226d530dd0b495be24fd7675748 /mathcomp/algebra/vector.v | |
| parent | fa9b7b19fc0409f3fdfa680e08f40a84594e8307 (diff) | |
Adjust implicits of cancellation lemmas
Like injectivity lemmas, instances of cancellation lemmas (whose
conclusion is `cancel ? ?`, `{in ?, cancel ? ?}`, `pcancel`, or
`ocancel`) are passed to
generic lemmas such as `canRL` or `canLR_in`. Thus such lemmas should
not have trailing on-demand implicits _just before_ the `cancel`
conclusion, as these would be inconvenient to insert (requiring
essentially an explicit eta-expansion).
We therefore use `Arguments` or `Prenex Implicits` directives to make
all such arguments maximally inserted implicits. We don’t, however make
other arguments implicit, so as not to spoil direct instantiation of
the lemmas (in, e.g., `rewrite -[y](invmK injf)`).
We have also tried to do this with lemmas whose statement matches a
`cancel`, i.e., ending in `forall x, g (E[x]) = x` (where pattern
unification will pick up `f = fun x => E[x]`).
We also adjusted implicits of a few stray injectivity
lemmas, and defined constants.
We provide a shorthand for reindexing a bigop with a permutation.
Finally we used the new implicit signatures to simplify proofs that
use injectivity or cancellation lemmas.
Diffstat (limited to 'mathcomp/algebra/vector.v')
| -rw-r--r-- | mathcomp/algebra/vector.v | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/mathcomp/algebra/vector.v b/mathcomp/algebra/vector.v index c4c62c3..4766c74 100644 --- a/mathcomp/algebra/vector.v +++ b/mathcomp/algebra/vector.v @@ -1355,6 +1355,8 @@ Proof. by elim/big_rec2: _ => [|i _ f _ <-]; rewrite lfunE. Qed. End LfunZmodType. +Arguments fun_of_lfunK {R aT rT}. + Section LfunVectType. Variables (R : comRingType) (aT rT : vectType R). @@ -1603,6 +1605,7 @@ Arguments lfunPn {K aT rT f g}. Arguments lker0P {K aT rT f}. Arguments eqlfunP {K aT rT f g v}. Arguments eqlfun_inP {K aT rT V f g}. +Arguments limg_lfunVK {K aT rT f} [x] f_x. Section FixedSpace. @@ -1718,6 +1721,8 @@ Qed. End LinearPreimage. +Arguments lpreimK {K aT rT f} [W] fW. + Section LfunAlgebra. (* This section is a bit of a place holder: the instances we build here can't *) (* be canonical because we are missing an interface for proper vectTypes, *) @@ -1944,7 +1949,7 @@ Canonical subvs_vectType := VectType K subvs_of subvs_vectMixin. End SubVector. Prenex Implicits vsval vsproj vsvalK. Arguments subvs_inj {K vT U} [x1 x2]. -Arguments vsprojK {K vT U} [x]. +Arguments vsprojK {K vT U} [x] Ux. Section MatrixVectType. |
