Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[math-classes] Should the inner product be proper with respect to equivalence? #36

Closed
langston-barrett opened this issue Nov 21, 2016 · 2 comments

Comments

@langston-barrett
Copy link
Contributor

In our discussion on #30, we decided that sm should be proper with respect to equiv. Does that same reasoning hold for inprod? My intuition tells me it should, as I need that property to prove the following lemma about orthogonal projections:

Section orthogonal_projection.
  Context `{InnerProductSpace K V}.

  Definition proj (u v : V) : V := (⟨ u , v ⟩ / (⟨ u , u ⟩)) · u.

  Lemma lemma1 : forall (c : K) (u1 u2 v : V), u1 = c · u2 -> proj u1 v = proj u2 v.

Adding the following lines to vectorspace.v allows me to rewrite using the equality hypothesis:

Notation "(⟨⟩)" := (inprod) (only parsing) : mc_scope.
[...]
Class InnerProductSpace (K V : Type)
[...]
   ; inprod_proper  :> Proper ((=) ==> (=) ==> (=)) (⟨⟩)

I'm happy to make a pull request if this seems appropriate!

@spitters
Copy link
Collaborator

Yes! Thanks for spotting that. Please send a PR.

@langston-barrett
Copy link
Contributor Author

Fixed in coq-community/math-classes#17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants