Skip to content

Porting note: dsimp cannot prove this #10675

@pitmonticone

Description

@pitmonticone
-- In Lean 3, `dsimp` would use theorems proved by `Iff.rfl`. 
-- If that were still the case, this would useful as a `@[simp]` lemma,
-- despite the fact that it is provable by `simp` (by not `dsimp`).

Examples

-- Porting note: dsimp can not prove this
@[to_additive (attr := simp, nolint simpNF)]
theorem map_pure (f : α → β) (x) : (f <$> pure x : FreeMagma β) = pure (f x) := rfl
#align free_magma.map_pure FreeMagma.map_pure

-- Porting note: dsimp can not prove this
@[to_additive (attr := simp, nolint simpNF)]
theorem pure_bind (f : α → FreeMagma β) (x) : pure x >>= f = f x := rfl
#align free_magma.pure_bind FreeMagma.pure_bind

@[simp, nolint simpNF] -- Porting note: dsimp can not prove this
theorem ndinsert_zero (a : α) : ndinsert a 0 = {a} :=
rfl
#align multiset.ndinsert_zero Multiset.ndinsert_zero

@[to_additive (attr := simp, nolint simpNF)] -- Porting note: dsimp can not prove this
theorem mem_carrier {s : Subgroup G} {x : G} : x ∈ s.carrier ↔ x ∈ s :=
Iff.rfl
#align subgroup.mem_carrier Subgroup.mem_carrier
#align add_subgroup.mem_carrier AddSubgroup.mem_carrier

Metadata

Metadata

Assignees

No one assigned

    Labels

    porting-notesMathlib3 to Mathlib4 porting notes.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions