Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: don't import Field in Algebra.Ring.Equiv (#11881)
Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
- Loading branch information
1 parent
bfa8843
commit d5a796b
Showing
6 changed files
with
33 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/- | ||
Copyright (c) 2023 Junyan Xu. All rights reserved. | ||
Released under Apache 2.0 license as described in the file LICENSE. | ||
Authors: Junyan Xu | ||
-/ | ||
import Mathlib.Algebra.Field.IsField | ||
import Mathlib.Algebra.GroupWithZero.Hom | ||
|
||
/-! | ||
# If a semiring is a field, any isomorphic semiring is also a field. | ||
This is in a separate file to avoiding need to import `Field` in `Mathlib.Algebra.Ring.Equiv.` | ||
-/ | ||
|
||
namespace MulEquiv | ||
|
||
protected theorem isField {A : Type*} (B : Type*) [Semiring A] [Semiring B] (hB : IsField B) | ||
(e : A ≃* B) : IsField A where | ||
exists_pair_ne := have ⟨x, y, h⟩ := hB.exists_pair_ne; ⟨e.symm x, e.symm y, e.symm.injective.ne h⟩ | ||
mul_comm := fun x y => e.injective <| by rw [map_mul, map_mul, hB.mul_comm] | ||
mul_inv_cancel := fun h => by | ||
obtain ⟨a', he⟩ := hB.mul_inv_cancel ((e.injective.ne h).trans_eq <| map_zero e) | ||
exact ⟨e.symm a', e.injective <| by rw [map_mul, map_one, e.apply_symm_apply, he]⟩ | ||
|
||
end MulEquiv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters