#45537 feat(RingTheory/Valuation): more lemmas for ValuativeRel
PR description
- lemma about additive negation
- more lemma about vle and veq
ValuativeRel.vle_one_or_inv_vlt_oneis the counterpart ofValuation.val_le_one_or_val_inv_lt_one
Conversation on GitHub 9
PR summary daa13cca20
Import changes for modified files
No significant changes to the import graph
<details><summary>Import changes for all files</summary>
|Files|Import difference| |-|-|
</details>
<details><summary>
Declarations diff (regex)
</summary>
+ add_vlt_of_vlt_of_vlt
+ div_veq_iff
+ div_veq_one_iff
+ div_vlt_iff
+ div_vlt_one_iff
+ inv_veq_one
+ neg_veq_iff
+ neg_veq_self
+ neg_vle_iff
+ neg_vle_self
+ neg_vlt_iff
+ one_veq_inv
+ one_vlt_div_iff
+ self_vle_neg
+ veq_div_iff
+ veq_neg_iff
+ vle_neg_iff
+ vle_one_or_inv_vle_one
+ vle_one_or_inv_vlt_one
+ vlt_div_iff
+ vlt_neg_iff
<details>
<summary>You can run this locally as follows</summary>
## from your `mathlib4` directory:
git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci
## summary with just the declaration names:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh <optional_commit>
## more verbose report:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh long <optional_commit>
</details>
The doc-module for scripts/pr_summary/declarations_diff.sh in the undefined repository contains some details about this script.
</details>
<details><summary>
Declarations diff (Lean)
</summary>
✅ Lean-aware diff — post-build, computed from the Lean environment (commit
daa13cc).
- +19 new declarations
- −0 removed declarations
+ValuativeRel.add_vlt_of_vlt_of_vlt
+ValuativeRel.div_veq_iff
+ValuativeRel.div_veq_one_iff
+ValuativeRel.div_vlt_iff
+ValuativeRel.div_vlt_one_iff
+ValuativeRel.inv_veq_one
+ValuativeRel.neg_veq_iff
+ValuativeRel.neg_veq_self
+ValuativeRel.neg_vle_iff
+ValuativeRel.neg_vlt_iff
+ValuativeRel.one_veq_inv
+ValuativeRel.one_vlt_div_iff
+ValuativeRel.veq_div_iff
+ValuativeRel.veq_neg_iff
+ValuativeRel.vle_neg_iff
+ValuativeRel.vle_one_or_inv_vle_one
+ValuativeRel.vle_one_or_inv_vlt_one
+ValuativeRel.vlt_div_iff
+ValuativeRel.vlt_neg_iff
</details>
No changes to strong technical debt. No changes to weak technical debt.
Current commit daa13cca20 Reference commit 0d3fb85496
This script lives in the undefined repository. To run it locally, from your mathlib4 directory:
git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci
../mathlib-ci/scripts/reporting/technical-debt-metrics.py pr_summary
- The
relativevalue is the weighted sum of the differences with weight given by the inverse of the current value of the statistic. - The
absolutevalue is therelativevalue divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).
Does this not work for x = 0?
oops, I likely copied things too fast. Let me check
I think this should be private with only neg_veq_self exposed.
I don't agree. We have public vle_refl despite having veq_refl
I don't agree. We have le_refl despite having Eq.refl, but though we have an add_comm we don't have an add_le_comm.
Not having add_le_comm is justified by having rw, but the corresponding grw doesn't quite work for veq yet
Plus neg_vle_self is needed in the source code regardless whether it is private or public, so I don't see why we have to go out of my way to make it private. add_le_comm is something you will need to add after proving add_comm, which makes less sense to do so
We're able to recover the le version from the .1 field of the eq version, so I think this is redundant.
After some thought I think I am ok with the suggestion now. Pushed the changed
Mathlib/RingTheory/Valuation/ValuativeRel/Basic.lean +80 −0
theorem vle_add_cases (x y : R) : x + y ≤ᵥ x ∨ x + y ≤ᵥ y :=lemma vle_div_iff (hc : c ≠ 0) : a ≤ᵥ b / c ↔ a * c ≤ᵥ b := byLikewise here, it should be easier to reason by using veq_comm.
lemma inv_vlt_one (hx : x ≠ 0) : x⁻¹ <ᵥ 1 ↔ 1 <ᵥ x :=I think it might be easier to prove this using inv_veq_one above.