feat(library/theories/analysis/normed_space): add specializations to modules over the reals, to help the elaborator

This commit is contained in:
Jeremy Avigad 2016-02-20 10:45:07 -05:00 committed by Leonardo de Moura
parent ea42a76dc5
commit 7f1eb76091

View file

@ -18,9 +18,39 @@ namespace analysis
notation `∥`v`∥` := norm v
end analysis
/- real vector spaces -/
-- where is the right place to put this?
structure real_vector_space [class] (V : Type) extends vector_space V
section
variables {V : Type} [real_vector_space V]
-- these specializations help the elaborator when it is hard to infer the ring, e.g. with numerals
proposition smul_left_distrib_real (a : ) (u v : V) : a • (u + v) = a • u + a • v :=
smul_left_distrib a u v
proposition smul_right_distrib_real (a b : ) (u : V) : (a + b) • u = a • u + b • u :=
smul_right_distrib a b u
proposition mul_smul_real (a : ) (b : ) (u : V) : (a * b) • u = a • (b • u) :=
mul_smul a b u
proposition one_smul_real (u : V) : (1 : ) • u = u := one_smul u
proposition zero_smul_real (u : V) : (0 : ) • u = 0 := zero_smul u
proposition smul_zero_real (a : ) : a • (0 : V) = 0 := smul_zero a
proposition neg_smul_real (a : ) (u : V) : (-a) • u = - (a • u) := neg_smul a u
proposition neg_one_smul_real (u : V) : -(1 : ) • u = -u := neg_one_smul u
proposition smul_neg_real (a : ) (u : V) : a • (-u) = -(a • u) := smul_neg a u
end
/- real normed vector spaces -/
structure normed_vector_space [class] (V : Type) extends real_vector_space V, has_norm V :=
(norm_zero : norm zero = 0)
(eq_zero_of_norm_eq_zero : ∀ u : V, norm u = 0 → u = zero)