Mathlib v3 is deprecated. Go to Mathlib v4

Commit 2021-06-02 10:33 b91cdb91

View on Github →

refactor(data/nnreal): rename nnreal.of_real to real.to_nnreal (#7750) I am in the middle of a project involving reals, nnreals, ennreals and ereals. There is a maze of coercions and maps between the 4 of them, with completely incoherent naming scheme (do you think that measurable.nnreal_coe is speaking of the coercion from nnreal to real or to ennreal, or of a coercion into nnreal? currently, it's for the coercion from nnreal to real, and the analogous lemma for the coercion from nnreal to ennreal is called measurable.ennreal_coe!). I'd like to normalize all this to have something coherent:

  • maps are defined from a type to another one, to be able to use dot notation.
  • when there are coercions, all lemmas should be formulated in terms of the coercion, and not of the explicit map
  • when there is an ambiguity, lemmas on coercions should mention both the source and the target (like in measurable.coe_nnreal_real, say). The PR is one first step in this direction, renaming nnreal.of_real to real.to_nnreal (which makes it possible to use dot notation).

Estimated changes

deleted theorem nnreal.coe_of_real
deleted theorem nnreal.coe_of_real_le
deleted theorem nnreal.le_coe_of_real
deleted theorem nnreal.of_real_add
deleted theorem nnreal.of_real_add_le
deleted theorem nnreal.of_real_bit0
deleted theorem nnreal.of_real_bit1
deleted theorem nnreal.of_real_coe
deleted theorem nnreal.of_real_coe_nat
deleted theorem nnreal.of_real_div'
deleted theorem nnreal.of_real_div
deleted theorem nnreal.of_real_eq_zero
deleted theorem nnreal.of_real_inv
deleted theorem nnreal.of_real_le_of_real
deleted theorem nnreal.of_real_mul
deleted theorem nnreal.of_real_of_nonpos
deleted theorem nnreal.of_real_one
deleted theorem nnreal.of_real_pos
deleted theorem nnreal.of_real_zero
modified theorem nnreal.sub_def
added theorem real.coe_to_nnreal'
added theorem real.coe_to_nnreal
added theorem real.coe_to_nnreal_le
added theorem real.le_coe_to_nnreal
modified theorem real.nnabs_of_nonneg
added def real.to_nnreal
added theorem real.to_nnreal_add
added theorem real.to_nnreal_add_le
added theorem real.to_nnreal_bit0
added theorem real.to_nnreal_bit1
added theorem real.to_nnreal_coe
added theorem real.to_nnreal_div'
added theorem real.to_nnreal_div
added theorem real.to_nnreal_eq_zero
added theorem real.to_nnreal_inv
added theorem real.to_nnreal_mul
added theorem real.to_nnreal_one
added theorem real.to_nnreal_pos
added theorem real.to_nnreal_zero