Repository navigation
Conversation
PR summary b1c21b3abcImport changes for modified filesNo significant changes to the import graph Import changes for all files
|
|
This pull request has conflicts, please merge |
|
I think this material should be moved first, out of the |
Can you clarify which material you think should be moved where? And which file is the tactic material going into? |
|
Hmm. I guess it wouldn't make sense to make an ordered ring file where you don't yet prove that dyadic numbers are an ordered ring. The |
| @[simp] protected theorem natCast_zero : (Nat.cast 0 : Dyadic) = 0 := rfl | ||
| @[simp] protected theorem natCast_one : (Nat.cast 1 : Dyadic) = 1 := rfl | ||
|
|
||
| @[norm_cast] | ||
| protected theorem natCast_add (a b : ℕ) : (Nat.cast (a + b) : Dyadic) = a + b := by | ||
| simp [← Dyadic.toRat_inj] | ||
|
|
||
| @[simp] protected theorem intCast_zero : (Int.cast 0 : Dyadic) = 0 := rfl | ||
|
|
||
| @[simp] protected theorem intCast_one : (Int.cast 1 : Dyadic) = 1 := rfl | ||
|
|
||
| @[norm_cast] | ||
| protected theorem intCast_add (a b : ℤ) : (Int.cast (a + b) : Dyadic) = a + b := by | ||
| simp [← Dyadic.toRat_inj] | ||
|
|
||
| @[simp, norm_cast] | ||
| theorem intCast_natCast (n : ℕ) : (Int.cast n : Dyadic) = n := rfl | ||
|
|
||
| @[norm_cast] | ||
| protected theorem intCast_neg (a : Int) : ((-a : Int) : Dyadic) = -(a : Dyadic) := by | ||
| simp [← Dyadic.toRat_inj] |
There was a problem hiding this comment.
Aren't these true in all rings? I think therefore it would make sense for them to be private.
There was a problem hiding this comment.
I just copied what's done for Rat
| mul_lt_mul_of_pos_left := by simp +contextual [← Dyadic.toRat_lt_toRat_iff, Rat.mul_lt_mul_left] | ||
| mul_lt_mul_of_pos_right := by simp +contextual [← Dyadic.toRat_lt_toRat_iff, Rat.mul_lt_mul_right] | ||
| zero_le_one := by decide | ||
| exists_pair_ne := ⟨0, 1, by decide⟩ |
There was a problem hiding this comment.
This could perhaps be a standalone Nontrivial instance
There was a problem hiding this comment.
What's special about Nontrivial that you're singling it out here?
|
This pull request has conflicts, please merge |
Merge PR leanprover-community#43038 and use its order and ring instances. Move the rational coercion API to Data/Dyadic/Basic and compose a real-valued ring homomorphism for the inclusion tactic. Preserve the deprecated real-conversion API.
|
Thanks! bors merge |
|
Pull request successfully merged into master. Build succeeded: |
Dyadic is an ordered ringDyadic is an ordered ring
Prove
Dyadicis a linearly ordered ring, providing instances forLinearOrder,CommRing, andIsStrictOrderedRing. Remove corresponding material fromMathlib/Tactic/Inclusion/Extension/IntervalDyadicReal/Dyadic. Follow-up to #45186.From CGT.