lean4-htt/tests/lean/run/dsimpNatLitIssue.lean
Kim Morrison 10fdfc54cb
chore: upstream HSMul notation typeclass (#8401)
Upstreaming the `HSMul` notation typeclass, to enable `grind` to process
goals using it.
2025-05-19 12:37:08 +00:00

31 lines
690 B
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

variable {R M : Type}
/-- Typeclass for the `⊥` (`\bot`) notation -/
class Bot (α : Type) where
/-- The bot (`⊥`, `\bot`) element -/
bot : α
/-- The bot (`⊥`, `\bot`) element -/
notation "⊥" => Bot.bot
structure Submodule (R : Type) (M : Type) [Zero M] [SMul R M] where
carrier : M → Prop
zero_mem : carrier (0 : M)
variable [Zero M] [SMul R M]
instance : Bot (Submodule R M) where
bot := ⟨(· = 0), rfl⟩
instance : Zero (Submodule R M) where
zero := ⊥
@[simp]
theorem zero_eq_bot : (0 : Submodule R M) = ⊥ :=
rfl
theorem ohai : (0 : Submodule R M) = ⊥ := by
simp -- works
theorem oops : (0 : Submodule R M) = ⊥ := by
dsimp -- should work