Commit 2023-05-08 02:00 3f655f52
View on Github →refactor(data/is_R_or_C,analysis/inner_product_space): review API (#18919)
Drop is_R_or_C.abs
and lemmas about it
Use has_norm.norm
instead. The norm is definitionally equal both to
real.abs
and complex.abs
, so it's easier to specialize generic
theorems to real numbers. Also, we don't have to convert between norm
and is_R_or_C.abs
here and there.
- Drop
is_R_or_C.abs
,is_R_or_C.norm_eq_abs
,is_R_or_C.abs_of_nonneg
,is_R_or_C.abs_zero
,is_R_or_C.abs_one
,is_R_or_C.abs_nonneg
,is_R_or_C.abs_eq_zero
,is_R_or_C.abs_ne_zero
,is_R_or_C.abs_mul
,is_R_or_C.abs_add
,is_R_or_C.is_absolute_value
,is_R_or_C.abs_abs
,is_R_or_C.abs_pos
,is_R_or_C.abs_neg
,is_R_or_C.abs_inv
,is_R_or_C.abs_div
,is_R_or_C.abs_abs_sub_le_abs_sub
,is_R_or_C.norm_sq_eq_abs
,is_R_or_C.abs_to_real
,is_R_or_C.continuous_abs
,is_R_or_C.abs_to_complex
,inner_product_space.core.abs_inner_symm
,abs_inner_le_norm
.
Rename/merge lemmas
is_R_or_C
- Rename
is_R_or_C.of_real_smul
tois_R_or_C.real_smul_of_real
. - Merge
is_R_or_C.norm_real
,is_R_or_C.norm_of_real
, andis_R_or_C.abs_of_real
intois_R_or_C.norm_of_real
. - Merge
is_R_or_C.abs_of_nat
andis_R_or_C.abs_cast_nat
intois_R_or_C.norm_nat_cast
, usehas_norm.norm
, make it asimp, priority 900, is_R_or_C_simps, norm_cast
lemma. - Rename
is_R_or_C.mul_self_abs
tois_R_or_C.mul_self_norm
, usehas_norm.norm
. - Rename
is_R_or_C.abs_two
tois_R_or_C.norm_two
, usehas_norm.norm
. - Rename
is_R_or_C.abs_conj
tois_R_or_C.norm_conj
, usehas_norm.norm
. - Rename
is_R_or_C.abs_re_le_abs
tois_R_or_C.abs_re_le_norm
, usehas_norm.norm
. - Rename
is_R_or_C.abs_im_le_abs
tois_R_or_C.abs_im_le_norm
, usehas_norm.norm
. - Rename
is_R_or_C.re_le_abs
andis_R_or_C.im_le_abs
tois_R_or_C.re_le_norm
andis_R_or_C.im_le_norm
, respectively; usehas_norm.norm
. - Use
has_norm.norm
inis_R_or_C.im_eq_zero_of_le
andis_R_or_C.re_eq_self_of_le
. - Rename
is_R_or_C.abs_re_div_abs_le_one
andis_R_or_C.abs_im_div_abs_le_one
tois_R_or_C.abs_re_div_norm_le_one
andis_R_or_C.abs_im_div_norm_le_one
, respectively; usehas_norm.norm
. - Rename
is_R_or_C.re_eq_abs_of_mul_conj
tois_R_or_C.re_eq_norm_of_mul_conj
, usehas_norm.norm
. - Rename
is_R_or_C.abs_sq_re_add_conj
andis_R_or_C.abs_sq_re_add_conj'
tois_R_or_C.norm_sq_re_add_conj
andis_R_or_C.norm_sq_re_conj_add
, respectively; usehas_norm.norm
. - Use
has_norm.norm
in all lemmas/definitions aboutis_cau_seq
andcau_seq
sequences ofis_R_or_C
numbers. - Rename
is_R_or_C.is_cau_seq_abs
tois_R_or_C.is_cau_seq_norm
, usehas_norm.norm
.
Inner products
- Rename
inner_product_space.core.inner_mul_conj_re_abs
toinner_product_space.core.inner_mul_symm_re_eq_norm
, usehas_norm.norm
. - Do the same in the root NS.
- Rename
inner_self_re_abs
toinner_self_re_eq_norm
, usehas_norm.norm
. - Rename
inner_self_abs_to_K
toinner_self_norm_to_K
, usehas_norm.norm
. - Rename
abs_inner_symm
tonorm_inner_symm
, usehas_norm.norm
. - Rename
abs_inner_div_norm_mul_norm_eq_one_of_ne_zero_of_ne_zero_mul
tonorm_inner_div_norm_mul_norm_eq_one_of_ne_zero_of_ne_zero_mul
, usehas_norm.norm
.
Add lemmas
- Add
is_R_or_C.is_real_tfae
andis_real_tfae.conj_eq_iff_im
. - Add
is_R_or_C.norm_sq_apply
.
Change attributes
is_R_or_C.zero_re'
is no longer asimp
lemmais_R_or_C.norm_conj
is now asimp
lemma.
Misc
- Reorder lemmas here and there to golf.