Skip to content

Commit a1ce43f

Browse files
committed
feat(Algebra/Order/Monoid/Unbundled/WithTop): AddEquiv between WithBot (#34756)
It is like `Equiv.withBotCongr` but preserving also addition (`AddEquiv`), for a variant of degree of `MvPolynomial` that maps `0` to `⊥` submitted in #34759.
1 parent 79463c8 commit a1ce43f

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

Mathlib/Algebra/Order/Monoid/Unbundled/WithTop.lean

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ module
77

88
public import Mathlib.Algebra.CharZero.Defs
99
public import Mathlib.Algebra.Group.Hom.Defs
10+
public import Mathlib.Algebra.Group.Equiv.Defs
1011
public import Mathlib.Algebra.Order.Monoid.Unbundled.ExistsOfLE
1112
public import Mathlib.Algebra.Order.ZeroLEOne
1213
public import Mathlib.Order.WithBot
@@ -708,3 +709,37 @@ protected def _root_.AddMonoidHom.withBotMap {M N : Type*} [AddZeroClass M] [Add
708709
{ ZeroHom.withBotMap f.toZeroHom, AddHom.withBotMap f.toAddHom with toFun := WithBot.map f }
709710

710711
end WithBot
712+
713+
namespace AddEquiv
714+
715+
variable {γ : Type*} [Add α] [Add β] [Add γ] (e e₁ : α ≃+ β) (e₂ : β ≃+ γ)
716+
717+
/-- A `AddEquiv` version of `Equiv.withBotCongr`. -/
718+
@[to_dual (attr := simps!) /-- A `AddEquiv` version of `Equiv.withTopCongr`. -/]
719+
def withBotCongr : WithBot α ≃+ WithBot β where
720+
__ := e.toEquiv.withBotCongr
721+
map_add' := e.toAddHom.withBotMap.map_add'
722+
723+
@[to_dual (attr := simp)]
724+
lemma coe_withBotCongr : e.withBotCongr = WithBot.map e := rfl
725+
726+
@[to_dual (attr := simp)]
727+
lemma withBotCongr_toEquiv : e.withBotCongr = (e : α ≃ β).withBotCongr := rfl
728+
729+
@[to_dual (attr := simp)]
730+
lemma withBotCongr_toAddHom : e.withBotCongr = (e : AddHom α β).withBotMap := rfl
731+
732+
@[to_dual (attr := simp)]
733+
lemma withBotCongr_refl : (AddEquiv.refl α).withBotCongr = AddEquiv.refl _ :=
734+
AddEquiv.ext <| congr_fun WithBot.map_id
735+
736+
@[to_dual (attr := simp)]
737+
theorem withBotCongr_symm : e.withBotCongr.symm = e.symm.withBotCongr := rfl
738+
739+
@[to_dual (attr := simp)]
740+
theorem withBotCongr_trans :
741+
(e₁.trans e₂).withBotCongr = e₁.withBotCongr.trans e₂.withBotCongr := by
742+
ext x
743+
simp
744+
745+
end AddEquiv

0 commit comments

Comments
 (0)