Skip to content

feat: Dyadic is a localization - #43045

Open
plp127 wants to merge 8 commits into
leanprover-community:masterfrom
plp127:aliu/dyadic-localization
Open

feat: Dyadic is a localization#43045
plp127 wants to merge 8 commits into
leanprover-community:masterfrom
plp127:aliu/dyadic-localization

Conversation

@plp127

@plp127 plp127 commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Prove that Dyadic is a localization of the integers generated by inverting 2.


Open in Gitpod

@plp127
plp127 requested a review from vihdzp August 22, 2026 16:37
@github-actions

github-actions Bot commented Aug 22, 2026

Copy link
Copy Markdown

PR summary 2e1e58b42c

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference
Mathlib.Data.Dyadic.OrderedRing (new file) 459
Mathlib.Data.Dyadic.IsLocalization (new file) 844

Declarations diff (regex)

+ half
+ instance : CommRing Dyadic
+ instance : Invertible (2 : Dyadic)
+ instance : IsLocalization (Submonoid.powers (2 : ℤ)) Dyadic
+ instance : IsStrictOrderedRing Dyadic
+ instance : LinearOrder Dyadic
+ intCast_add
+ intCast_natCast
+ intCast_neg
+ intCast_one
+ intCast_zero
+ isUnit_iff_exists_half_pow
+ natCast_add
+ natCast_one
+ natCast_zero
+ toRat_one
+ val_half_eq_ofOdd
+ val_half_zpow_eq_ofOdd
+ val_inv_half

You can run this locally as follows
## 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>

The doc-module for scripts/pr_summary/declarations_diff.sh in the mathlib-ci repository contains some details about this script.

Declarations diff (Lean)

Lean-aware diff — post-build, computed from the Lean environment (commit 2e1e58b).

  • +19 new declarations
  • −0 removed declarations
+Dyadic.half
+Dyadic.instCommRing_1
+Dyadic.instInvertibleOfNat
+Dyadic.instIsLocalizationIntPowersOfNat
+Dyadic.instIsStrictOrderedRing
+Dyadic.instLinearOrder
+Dyadic.intCast_add
+Dyadic.intCast_natCast
+Dyadic.intCast_neg
+Dyadic.intCast_one
+Dyadic.intCast_zero
+Dyadic.isUnit_iff_exists_half_pow
+Dyadic.natCast_add
+Dyadic.natCast_one
+Dyadic.natCast_zero
+Dyadic.toRat_one
+Dyadic.val_half_eq_ofOdd
+Dyadic.val_half_zpow_eq_ofOdd
+Dyadic.val_inv_half

No changes to strong technical debt.
No changes to weak technical debt.

Current commit 2e1e58b42c
Reference commit 23a3216f0e

This script lives in the mathlib-ci 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 relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

@github-actions github-actions Bot added the t-data Data (lists, quotients, numbers, etc) label Aug 22, 2026
@mathlib-dependent-issues mathlib-dependent-issues Bot added the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Aug 22, 2026
@mathlib-dependent-issues

Copy link
Copy Markdown

This PR/issue depends on:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) t-data Data (lists, quotients, numbers, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant