Skip to content

Commit f5fe987

Browse files
committed
chore(Order/WithBot): golf, clean up (#21274)
* Shorten proofs * Make the `WithBot` and `WithTop` sections analogous * Avoid relying on the defeq `(WithTop α)ᵒᵈ = WithBot αᵒᵈ` * Pull more implicit variables to `variable` statements * Stick to the convention that `a b : α` and `x y : WithBot α`
1 parent e10a914 commit f5fe987

File tree

2 files changed

+329
-558
lines changed

2 files changed

+329
-558
lines changed

Mathlib/Order/Hom/Basic.lean

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -600,11 +600,10 @@ protected theorem wellFoundedGT [WellFoundedGT β] (f : α ↪o β) : WellFounde
600600
@OrderEmbedding.wellFoundedLT αᵒᵈ _ _ _ _ f.dual
601601

602602
/-- A version of `WithBot.map` for order embeddings. -/
603-
@[simps (config := .asFn)]
604-
protected def withBotMap (f : α ↪o β) : WithBot α ↪o WithBot β :=
605-
{ f.toEmbedding.optionMap with
606-
toFun := WithBot.map f,
607-
map_rel_iff' := @fun a b => WithBot.map_le_iff f f.map_rel_iff a b }
603+
@[simps! (config := .asFn)]
604+
protected def withBotMap (f : α ↪o β) : WithBot α ↪o WithBot β where
605+
__ := f.toEmbedding.optionMap
606+
map_rel_iff' := WithBot.map_le_iff f f.map_rel_iff
608607

609608
/-- A version of `WithTop.map` for order embeddings. -/
610609
@[simps (config := .asFn)]

0 commit comments

Comments
 (0)