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

fix definition of InnerProductSpace #17

Merged
merged 2 commits into from
Feb 2, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions interfaces/vectorspace.v
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Require Import
Require Import
MathClasses.interfaces.abstract_algebra MathClasses.interfaces.orders.

(** Scalar multiplication function class *)
Expand All @@ -14,6 +14,7 @@ Notation "(· x )" := (λ y, y · x) (only parsing) : mc_scope.
Class Inproduct K V := inprod : V → V → K.
Instance: Params (@inprod) 3.

Notation "(⟨⟩)" := (inprod) (only parsing) : mc_scope.
Notation "⟨ u , v ⟩" := (inprod u v) (at level 51) : mc_scope.
Notation "⟨ u , ⟩" := (λ v, ⟨u,v⟩) (at level 50, only parsing) : mc_scope.
Notation "⟨ , v ⟩" := (λ u, ⟨u,v⟩) (at level 50, only parsing) : mc_scope.
Expand Down Expand Up @@ -83,12 +84,14 @@ Class InnerProductSpace (K V : Type)
{Ve Vop Vunit Vnegate} (* vector operations *)
{sm : ScalarMult K V} {inp: Inproduct K V} {Kle: Le K}
:=
{ in_vectorspace :>> @VectorSpace K V Ke Kplus Kmult Kzero Kone Knegate
Krecip Ve Vop Vunit Vnegate sm
; in_srorder :>> SemiRingOrder Kle
; in_comm :> Commutative inprod
; in_linear_l : ∀ a u v, ⟨a·u,v⟩ = a*⟨u,v⟩
; in_nonneg :> ∀ v, PropHolds (0 ≤ ⟨v,v⟩) (* TODO Le to strong? *)
{ in_vectorspace :>> @VectorSpace K V Ke Kplus Kmult Kzero Kone Knegate
Krecip Ve Vop Vunit Vnegate sm
; in_srorder :>> SemiRingOrder Kle
; in_comm :> Commutative inprod
; in_linear_l : ∀ a u v, ⟨a·u,v⟩ = a*⟨u,v⟩
; in_nonneg :> ∀ v, PropHolds (0 ≤ ⟨v,v⟩) (* TODO Le to strong? *)
; in_mon_unit_zero :> ∀ v, 0 = ⟨v,v⟩ <-> v = mon_unit
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Slightly offtopic: is there any good example of a module over a ring with something but "+" as the group operation? If not, why do we use a generic AbGroup instead of Add V and AbGroup (Aop := (+))?

; inprod_proper :> Proper ((=) ==> (=) ==> (=)) (⟨⟩)
}.

(* TODO complex conjugate?
Expand Down