Skip to content

Commit

Permalink
chore: remove @[simp] from forall_const
Browse files Browse the repository at this point in the history
  • Loading branch information
kim-em committed Sep 11, 2024
1 parent 8f899bf commit c7e5280
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Init/PropLemmas.lean
Original file line number Diff line number Diff line change
Expand Up @@ -303,9 +303,13 @@ theorem exists_or : (∃ x, p x ∨ q x) ↔ (∃ x, p x) ∨ ∃ x, q x :=

@[simp] theorem exists_false : ¬(∃ _a : α, False) := fun ⟨_, h⟩ => h

@[simp] theorem forall_const (α : Sort _) [i : Nonempty α] : (α → b) ↔ b :=
-- This is not a good simp lemma, as it applies to any arrow, and generates a `Nonempty` side goal.
theorem forall_const (α : Sort _) [i : Nonempty α] : (α → b) ↔ b :=
⟨i.elim, fun hb _ => hb⟩

@[simp] theorem not_forall_of_nonempty [Nonempty β] : ((α → β) → False) ↔ False := by
simp [forall_const]

theorem Exists.nonempty : (∃ x, p x) → Nonempty α | ⟨x, _⟩ => ⟨x⟩

theorem not_forall_of_exists_not {p : α → Prop} : (∃ x, ¬p x) → ¬∀ x, p x
Expand Down

0 comments on commit c7e5280

Please sign in to comment.