Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Commit

Permalink
feat(logic/basic): forall_iff_forall_surj (#977)
Browse files Browse the repository at this point in the history
a lemma from the perfectoid project
  • Loading branch information
semorrison authored and mergify[bot] committed May 4, 2019
1 parent b4d483e commit 7dea60b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/logic/basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,13 @@ theorem forall_or_distrib_left {q : Prop} {p : α → Prop} [decidable q] :
⟨λ h, if hq : q then or.inl hq else or.inr $ λ x, (h x).resolve_left hq,
forall_or_of_or_forall⟩

/-- A predicate holds everywhere on the image of a surjective functions iff
it holds everywhere. -/
theorem forall_iff_forall_surj
{α β : Type*} {f : α → β} (h : function.surjective f) {P : β → Prop} :
(∀ a, P (f a)) ↔ ∀ b, P b :=
⟨λ ha b, by cases h b with a hab; rw ←hab; exact ha a, λ hb a, hb $ f a⟩

@[simp] theorem exists_prop {p q : Prop} : (∃ h : p, q) ↔ p ∧ q :=
⟨λ ⟨h₁, h₂⟩, ⟨h₁, h₂⟩, λ ⟨h₁, h₂⟩, ⟨h₁, h₂⟩⟩

Expand Down

0 comments on commit 7dea60b

Please sign in to comment.