Repository navigation
Tensor space - #1970
Tensor space#1970Tragicus wants to merge 3 commits into
Conversation
|
This looks nice, thank you for making this PR! Could you tell me what the \pi_Q map represents? Could you point me to the universal property for the binary tensor product within the code, so that I can start from here? More generally, happy to help on this PR, tell me what I can do. |
|
If |
|
|
||
| Variable (W : lmodType R). | ||
|
|
||
| Definition tensor_umap (f : U -> V -> W) (t : tensor) : W := |
There was a problem hiding this comment.
This is half of the bijection, which turns a bilinear map from U and V to a linear map from the tensor product (see the instance below).
|
@CohenCyril who is working on this PR? |
|
(doc in progress, changelog to be done) |
| (* : the vector space whose basis is `T` *) | ||
| (* *) | ||
| (* `free_lmod_unit x` or `x%:lmod` *) | ||
| (* : This is the unit of the monad. *) |
There was a problem hiding this comment.
of the monad : which monad ?
There was a problem hiding this comment.
free_lmod_unit and a specialized version of free_lmod_eval make free_lmod a monad.
mkerjean
left a comment
There was a problem hiding this comment.
This looks good, also I have a few suggestions for renaming. I'm also not completely sure I understand everything happening in the quotient part, so it would be good if someone else looked at it.
| (* : with `f : T -> U` and `x` of type `free_lmod` *) | ||
| (* : $\mathrm{eval}_f(x) = \sum_{t : T} x_t f(r)$ where $x=\sum_{t:T}x_t t$ *) | ||
| (* *) | ||
| (* `ker_set f` *) |
There was a problem hiding this comment.
Great this is to be reused in PR#2022, depending on which PR gets merged first
| Elpi lock Definition free_lmod_eval (x : free_lmod) : U := | ||
| \sum_(t <- finsupp x) x t *: f t. | ||
|
|
||
| Lemma free_lmod_eval_linear : linear free_lmod_eval. |
There was a problem hiding this comment.
Should this be a local lemma ?
| rewrite scalerA -scalerDl; apply/eqP; rewrite -subr_eq0 -scalerBl. | ||
| by rewrite free_lmodDE/= free_lmodZE/= subrr scale0r. | ||
| Qed. | ||
| HB.instance Definition _ (f : {bilinear U -> V -> W}) := |
There was a problem hiding this comment.
missing space above this line
| (* `free_lmod_map f u` *) | ||
| (* : `:= free_lmod_eval (free_lmod_unit \o f) u` *) | ||
| (* *) | ||
| (* `Tensor.fiptensor U V ` *) |
There was a problem hiding this comment.
To be described rather as : "the tensor product between finite dimensional vector space" ? Finite tensor product is confusing. Should it be renamed vect_tensor ?
| End span. | ||
| End Tensor. | ||
|
|
||
| Section Biptensor. |
There was a problem hiding this comment.
Shouldn't Biptensor.tensor be documented ?
| (* *) | ||
| (* `ptensor_ideal U_` *) | ||
| (* *) | ||
| (* `ptensor U_` *) |
There was a problem hiding this comment.
When U is a familiy of lmodtype (I was comparing to fiptensor and not understanding)
| Definition to_ptensor (u_ : forall i, U_ i) := \pi_ptensor (u_%:lmod). | ||
| Notation "u %:tensor" := (to_ptensor u) : ring_scope. | ||
|
|
||
| End ProdTensor. |
There was a problem hiding this comment.
Is there something to say to relate the fiptensor, tensor and ptensor ?
Motivation for this change
Binary and indexed product tensor spaces.
@CohenCyril I have little recollection of what we did, so I have no idea what the status of this is. In particular, I see the universal property of the binary tensor space but not the general product one.
@mkerjean FYI
Checklist
CHANGELOG_UNRELEASED.mdReference: How to document
Merge policy
As a rule of thumb:
all compile are preferentially merged into master.
Reminder to reviewers