The areas / V01. The language of Mathlib
Mathlib.Basic.Logic.Basic
250 declarations and 3 deprecated aliases. Mathlib docs · Source
Basic logic properties
This file is one of the earliest imports in mathlib.
Implementation notes
Theorems that require decidability hypotheses are in the namespace Decidable.
Classical versions are in the namespace Classical.
Declarations about propositional connectives
Declarations about implies
Declarations about not
Declarations about Xor
Declarations about and
Declarations about or
Declarations about iff
De Morgan's laws
Declarations about equality
Declarations about quantifiers
See IsEmpty.exists_iff for the False version of exists_true_left.
Classical lemmas
Declarations about bounded quantifiers
Membership
theorem iff_comm_eq E0 #
∀ (a b : Prop), (a ↔ b) = (b ↔ a)
def eqComm E1 #
Lean.Meta.Simp.Simproc
On a goal of the form of x = y, also try to simplify y = x.
If simplifying y = x gives y' = x' then this simproc returns x' = y' (so that the use of
commutativity is transparent), otherwise it returns the result of simplifying y = x unmodified.
def iffComm E1 #
Lean.Meta.Simp.Simproc
On a goal of the form of x ↔ y, also try to simplify y ↔ x.
If simplifying y ↔ x gives y' ↔ x' then this simproc returns x' ↔ y' (so that the use of
commutativity is transparent), otherwise it returns the result of simplifying y ↔ x unmodified.
instance decidableEq_of_subsingleton E0 #
{α : Sort u_1} → [Subsingleton α] → DecidableEq α
instance instSubsingletonSubtype_mathlib E0 #
∀ {α : Sort u_1} [Subsingleton α] (p : α → Prop), Subsingleton (Subtype p)
theorem Subtype.subsingleton_iff E0 #
∀ {α : Sort u_1} {p : α → Prop}, Subsingleton (Subtype p) ↔ ∀ (a b : α), p a → p b → a = b
theorem congr_heq E1 #
∀ {α β : Sort u_2} {γ : Sort u_3} {f : α → γ} {g : β → γ} {x : α} {y : β}, f ≍ g → x ≍ y → f x = g y
theorem congr_arg_heq E1 #
∀ {α : Sort u_1} {β : α → Sort u_2} (f : (a : α) → β a) {a₁ a₂ : α}, a₁ = a₂ → f a₁ ≍ f a₂
theorem dcongr_heq E1 #
∀ {α₁ α₂ : Sort u} {β₁ : α₁ → Sort v} {β₂ : α₂ → Sort v} {f₁ : (a : α₁) → β₁ a} {f₂ : (a : α₂) → β₂ a} {a₁ : α₁}
{a₂ : α₂}, a₁ ≍ a₂ → (∀ (t₁ : α₁) (t₂ : α₂), t₁ ≍ t₂ → β₁ t₁ = β₂ t₂) → (α₁ = α₂ → β₁ ≍ β₂ → f₁ ≍ f₂) → f₁ a₁ ≍ f₂ a₂
theorem ne_and_eq_iff_right E1 #
∀ {α : Sort u_1} {a b c : α}, b ≠ c → (a ≠ b ∧ a = c ↔ a = c)
class Fact E3 #
Prop → Prop
Wrapper for adding elementary propositions to the type class systems. Warning: this can easily be abused. See the rest of this docstring for details.
Certain propositions should not be treated as a class globally, but sometimes it is very convenient to be able to use the type class system in specific circumstances.
For example, ZMod p is a field if and only if p is a prime number.
In order to be able to find this field instance automatically by type class search,
we have to turn p.Prime into an instance implicit assumption.
On the other hand, making Nat.Prime a class would require a major refactoring of the library,
and it is questionable whether making Nat.Prime a class is desirable at all.
The compromise is to add the assumption [Fact p.Prime] to ZMod.instField.
In particular, this class is not intended for turning the type class system into an automated theorem prover for first-order logic.
ctor Fact.mk E0 #
∀ {p : Prop}, p → Fact p
theorem Fact.out E2 #
∀ {p : Prop} [self : Fact p], p
Fact.out contains the unwrapped witness for the fact represented by the instance of
Fact p.
def LibraryNote.«fact_non-instances» E1 #
Batteries.Util.LibraryNote
In most cases, we should not have global instances of Fact; typeclass search is not an
advanced proof search engine, and adding any such instance has the potential to cause
slowdowns everywhere. We instead declare them as lemmata and make them local instances as required.
theorem Fact.elim E1 #
∀ {p : Prop}, Fact p → p
theorem fact_iff E0 #
∀ {p : Prop}, Fact p ↔ p
instance instDecidableFact E0 #
{p : Prop} → [Decidable p] → Decidable (Fact p)
abbrev Function.swap₂ E1 #
{ι₁ : Sort u_2} →
{ι₂ : Sort u_3} →
{κ₁ : ι₁ → Sort u_4} →
{κ₂ : ι₂ → Sort u_5} →
{φ : (i₁ : ι₁) → κ₁ i₁ → (i₂ : ι₂) → κ₂ i₂ → Sort u_6} →
((i₁ : ι₁) → (j₁ : κ₁ i₁) → (i₂ : ι₂) → (j₂ : κ₂ i₂) → φ i₁ j₁ i₂ j₂) →
(i₂ : ι₂) → (j₂ : κ₂ i₂) → (i₁ : ι₁) → (j₁ : κ₁ i₁) → φ i₁ j₁ i₂ j₂
Swaps two pairs of arguments to a function.
theorem Iff.imp E1 #
∀ {a b c d : Prop}, (a ↔ c) → (b ↔ d) → (a → b ↔ c → d)
Alias of imp_congr.
theorem Function.mt E1 #
∀ {a b : Prop}, (a → b) → ¬b → ¬a
Provide modus tollens (mt) as dot notation for implications.
theorem dec_em E1 #
∀ (p : Prop) [Decidable p], p ∨ ¬p
Alias of Decidable.em.
theorem dec_em' E1 #
∀ (p : Prop) [Decidable p], ¬p ∨ p
theorem em E1 #
∀ (p : Prop), p ∨ ¬p
Alias of Classical.em.
theorem em' E1 #
∀ (p : Prop), ¬p ∨ p
theorem or_not E1 #
∀ {p : Prop}, p ∨ ¬p
theorem Decidable.ne_or_eq E0 #
∀ {α : Sort u_1} (x y : α) [Decidable (x = y)], x ≠ y ∨ x = y
theorem ne_or_eq E0 #
∀ {α : Sort u_1} (x y : α), x ≠ y ∨ x = y
theorem by_contradiction E1 #
∀ {p : Prop}, (¬p → False) → p
theorem by_cases E1 #
∀ {p q : Prop}, (p → q) → (¬p → q) → q
theorem by_contra E1 #
∀ {p : Prop}, (¬p → False) → p
Alias of by_contradiction.
def LibraryNote.decidable_namespace E1 #
Batteries.Util.LibraryNote
In most of mathlib, we use the law of excluded middle (LEM) and the axiom of choice (AC) freely.
The Decidable namespace contains versions of lemmas from the root namespace that explicitly
attempt to avoid the axiom of choice, usually by adding decidability assumptions on the inputs.
You can check if a lemma uses the axiom of choice by using #print axioms foo and seeing if
Classical.choice appears in the list.
def LibraryNote.decidable_arguments E1 #
Batteries.Util.LibraryNote
As mathlib is primarily classical,
if the type signature of a def or lemma does not require any Decidable instances to state,
it is preferable not to introduce any Decidable instances that are needed in the proof
as arguments, but rather to use the classical tactic as needed.
In the other direction, when Decidable instances do appear in the type signature,
it is better to use explicitly introduced ones rather than allowing Lean to automatically infer
classical ones, as these may cause instance mismatch errors later.
Various types that (almost) never have provable decidability, such as ℝ, Set α or Ideal R,
are given global DecidableEq instances, so that no decidable arguments have to be provided.
theorem of_not_not E1 #
∀ {a : Prop}, ¬¬a → a
theorem not_ne_iff E0 #
∀ {α : Sort u_1} {a b : α}, ¬a ≠ b ↔ a = b
theorem of_not_imp E1 #
∀ {a b : Prop}, ¬(a → b) → a
theorem Not.decidable_imp_symm E1 #
∀ {a b : Prop} [Decidable a], (¬a → b) → ¬b → a
Alias of Decidable.not_imp_symm.
theorem Not.imp_symm E1 #
∀ {a b : Prop}, (¬a → b) → ¬b → a
theorem not_imp_comm E1 #
∀ {a b : Prop}, ¬a → b ↔ ¬b → a
theorem not_imp_self E0 #
∀ {a : Prop}, ¬a → a ↔ a
theorem Imp.swap E1 #
∀ {a : Sort u_1} {b : Sort u_2} {c : Prop}, (∀ (a : a) (a : b), c) ↔ ∀ (a_1 : b) (a : a), c
theorem Iff.not E2 #
∀ {a b : Prop}, (a ↔ b) → (¬a ↔ ¬b)
Alias of not_congr.
theorem Iff.not_left E1 #
∀ {a b : Prop}, (a ↔ ¬b) → (¬a ↔ b)
theorem Iff.not_right E1 #
∀ {a b : Prop}, (¬a ↔ b) → (a ↔ ¬b)
theorem Iff.ne E1 #
∀ {α : Sort u_1} {β : Sort u_2} {a b : α} {c d : β}, (a = b ↔ c = d) → (a ≠ b ↔ c ≠ d)
theorem Iff.ne_left E1 #
∀ {α : Sort u_1} {β : Sort u_2} {a b : α} {c d : β}, (a = b ↔ c ≠ d) → (a ≠ b ↔ c = d)
theorem Iff.ne_right E1 #
∀ {α : Sort u_1} {β : Sort u_2} {a b : α} {c d : β}, (a ≠ b ↔ c = d) → (a = b ↔ c ≠ d)
def Xor E1 #
Prop → Prop → Prop
Xor a b is the exclusive-or of propositions.
theorem xor_def E0 #
∀ {a b : Prop}, Xor a b ↔ a ∧ ¬b ∨ b ∧ ¬a
instance instDecidableXor E0 #
{a b : Prop} → [Decidable a] → [Decidable b] → Decidable (Xor a b)
theorem xor_true E0 #
Xor True = Not
theorem xor_false E0 #
Xor False = id
theorem xor_comm E1 #
∀ (a b : Prop), Xor a b = Xor b a
instance instCommutativeXor E0 #
Std.Commutative Xor
instance instSymmXor E0 #
Std.Symm Xor
instance instIrreflXor E0 #
Std.Irrefl Xor
theorem xor_self E0 #
∀ (a : Prop), Xor a a = False
theorem xor_not_left E0 #
∀ {a b : Prop}, Xor (¬a) b ↔ (a ↔ b)
theorem xor_not_right E0 #
∀ {a b : Prop}, Xor a ¬b ↔ (a ↔ b)
theorem xor_not_not E1 #
∀ {a b : Prop}, Xor (¬a) ¬b ↔ Xor a b
theorem Xor.or E1 #
∀ {a b : Prop}, Xor a b → a ∨ b
theorem Iff.and E1 #
∀ {a c b d : Prop}, (a ↔ c) → (b ↔ d) → (a ∧ b ↔ c ∧ d)
Alias of and_congr.
theorem And.rotate E1 #
∀ {a b c : Prop}, a ∧ b ∧ c → b ∧ c ∧ a
Alias of the forward direction of and_rotate.
instance instSymmAnd_mathlib E0 #
Std.Symm And
theorem and_symm_right E1 #
∀ {α : Sort u_1} (a b : α) (p : Prop), p ∧ a = b ↔ p ∧ b = a
theorem and_symm_left E1 #
∀ {α : Sort u_1} (a b : α) (p : Prop), a = b ∧ p ↔ b = a ∧ p
theorem Iff.or E1 #
∀ {a c b d : Prop}, (a ↔ c) → (b ↔ d) → (a ∨ b ↔ c ∨ d)
Alias of or_congr.
theorem Or.rotate E1 #
∀ {a b c : Prop}, a ∨ b ∨ c → b ∨ c ∨ a
Alias of the forward direction of or_rotate.
instance instSymmOr_mathlib E0 #
Std.Symm Or
theorem Or.elim3 E1 #
∀ {a b c d : Prop}, a ∨ b ∨ c → (a → d) → (b → d) → (c → d) → d
theorem Or.imp3 E1 #
∀ {a b d e c f : Prop}, (a → d) → (b → e) → (c → f) → a ∨ b ∨ c → d ∨ e ∨ f
theorem not_or_of_imp E1 #
∀ {a b : Prop}, (a → b) → ¬a ∨ b
theorem Decidable.or_not_of_imp E1 #
∀ {a b : Prop} [Decidable a], (a → b) → b ∨ ¬a
theorem or_not_of_imp E1 #
∀ {a b : Prop}, (a → b) → b ∨ ¬a
theorem imp_iff_not_or E1 #
∀ {a b : Prop}, a → b ↔ ¬a ∨ b
theorem imp_iff_or_not E1 #
∀ {b a : Prop}, b → a ↔ a ∨ ¬b
theorem not_imp_not E1 #
∀ {a b : Prop}, ¬a → ¬b ↔ b → a
theorem Function.mtr E1 #
∀ {a b : Prop}, (¬a → ¬b) → b → a
Provide the reverse of modus tollens (mt) as dot notation for implications.
theorem or_congr_left' E1 #
∀ {c a b : Prop}, (¬c → (a ↔ b)) → (a ∨ c ↔ b ∨ c)
theorem or_congr_right' E1 #
∀ {a b c : Prop}, (¬a → (b ↔ c)) → (a ∨ b ↔ a ∨ c)
theorem Iff.iff E1 #
∀ {p₁ p₂ q₁ q₂ : Prop}, (p₁ ↔ p₂) → (q₁ ↔ q₂) → ((p₁ ↔ q₁) ↔ (p₂ ↔ q₂))
Alias of iff_congr.
theorem iff_mpr_iff_true_intro E1 #
∀ {P : Prop} (h : P), ⋯ = h
theorem imp_or E1 #
∀ {a b c : Prop}, a → b ∨ c ↔ (a → b) ∨ (a → c)
theorem imp_or' E1 #
∀ {a : Sort u_1} {b c : Prop}, (∀ (a : a), b ∨ c) ↔ (∀ (a : a), b) ∨ ∀ (a : a), c
theorem peirce E1 #
∀ (a b : Prop), ((a → b) → a) → a
theorem not_iff_not E1 #
∀ {a b : Prop}, (¬a ↔ ¬b) ↔ (a ↔ b)
theorem not_iff_comm E1 #
∀ {a b : Prop}, (¬a ↔ b) ↔ (¬b ↔ a)
theorem not_iff E0 #
∀ {a b : Prop}, ¬(a ↔ b) ↔ (¬a ↔ b)
theorem iff_not_comm E1 #
∀ {a b : Prop}, (a ↔ ¬b) ↔ (b ↔ ¬a)
theorem iff_iff_and_or_not_and_not E1 #
∀ {a b : Prop}, (a ↔ b) ↔ a ∧ b ∨ ¬a ∧ ¬b
theorem iff_iff_not_or_and_or_not E1 #
∀ {a b : Prop}, (a ↔ b) ↔ (¬a ∨ b) ∧ (a ∨ ¬b)
theorem not_and_not_right E1 #
∀ {a b : Prop}, ¬(a ∧ ¬b) ↔ a → b
theorem not_and_or E1 #
∀ {a b : Prop}, ¬(a ∧ b) ↔ ¬a ∨ ¬b
One of de Morgan's laws: the negation of a conjunction is logically equivalent to the disjunction of the negations.
theorem or_iff_not_and_not E1 #
∀ {a b : Prop}, a ∨ b ↔ ¬(¬a ∧ ¬b)
theorem and_iff_not_or_not E1 #
∀ {a b : Prop}, a ∧ b ↔ ¬(¬a ∨ ¬b)
theorem not_xor E0 #
∀ (P Q : Prop), ¬Xor P Q ↔ (P ↔ Q)
theorem xor_iff_not_iff E0 #
∀ (P Q : Prop), Xor P Q ↔ ¬(P ↔ Q)
theorem xor_iff_iff_not E1 #
∀ {a b : Prop}, Xor a b ↔ (a ↔ ¬b)
theorem xor_iff_not_iff' E1 #
∀ {a b : Prop}, Xor a b ↔ (¬a ↔ b)
theorem xor_iff_or_and_not_and E1 #
∀ (a b : Prop), Xor a b ↔ (a ∨ b) ∧ ¬(a ∧ b)
theorem forall_cond_comm E1 #
∀ {α : Sort u_1} {s : α → Prop} {p : α → α → Prop},
(∀ (a : α), s a → ∀ (b : α), s b → p a b) ↔ ∀ (a b : α), s a → s b → p a b
theorem forall_mem_comm E1 #
∀ {α : Type u_1} {β : Type u_2} [inst : Membership α β] {s : β} {p : α → α → Prop},
(∀ a ∈ s, ∀ b ∈ s, p a b) ↔ ∀ (a b : α), a ∈ s → b ∈ s → p a b
theorem ne_of_eq_of_ne E1 #
∀ {α : Sort u_1} {a b c : α}, a = b → b ≠ c → a ≠ c
theorem ne_of_ne_of_eq E0 #
∀ {α : Sort u_1} {a b c : α}, a ≠ b → b = c → a ≠ c
theorem Eq.trans_ne E1 #
∀ {α : Sort u_1} {a b c : α}, a = b → b ≠ c → a ≠ c
Alias of ne_of_eq_of_ne.
theorem Ne.trans_eq E0 #
∀ {α : Sort u_1} {a b c : α}, a ≠ b → b = c → a ≠ c
Alias of ne_of_ne_of_eq.
theorem congr_refl_left E1 #
∀ {α : Sort u_1} {β : Sort u_2} (f : α → β) {a b : α} (h : a = b), ⋯ = ⋯
theorem congr_refl_right E1 #
∀ {α : Sort u_1} {β : Sort u_2} {f g : α → β} (h : f = g) (a : α), ⋯ = ⋯
theorem congr_arg_refl E1 #
∀ {α : Sort u_1} {β : Sort u_2} (f : α → β) (a : α), ⋯ = ⋯
theorem congr_fun_rfl E1 #
∀ {α : Sort u_1} {β : Sort u_2} (f : α → β) (a : α), ⋯ = ⋯
theorem congr_fun_congr_arg E1 #
∀ {α : Sort u_1} {β : Sort u_2} {γ : Sort u_3} (f : α → β → γ) {a a' : α} (p : a = a') (b : β), ⋯ = ⋯
theorem rec_heq_of_heq E1 #
∀ {α : Sort u_2} {β : Sort u_1} {a b : α} {C : α → Sort u_1} {x : C a} {y : β} (e : a = b), x ≍ y → e ▸ x ≍ y
theorem cast_heq_iff_heq E0 #
∀ {α β γ : Sort u_1} (e : α = β) (a : α) (c : γ), cast e a ≍ c ↔ a ≍ c
theorem heq_cast_iff_heq E0 #
∀ {α β γ : Sort u_1} (e : β = γ) (a : α) (b : β), a ≍ cast e b ↔ a ≍ b
theorem heq_of_eq_cast E1 #
∀ {α β : Sort u} {a : α} {b : β} (e : β = α), a = cast e b → a ≍ b
theorem heq_iff_exists_eq_cast E1 #
∀ {α β : Sort u} {a : α} {b : β}, a ≍ b ↔ ∃ (h : β = α), a = cast h b
theorem heq_iff_exists_cast_eq E0 #
∀ {α β : Sort u} {a : α} {b : β}, a ≍ b ↔ ∃ (h : α = β), cast h a = b
theorem forall₂_imp E1 #
∀ {α : Sort u_1} {β : α → Sort u_2} {p q : (a : α) → β a → Prop},
(∀ (a : α) (b : β a), p a b → q a b) → (∀ (a : α) (b : β a), p a b) → ∀ (a : α) (b : β a), q a b
theorem forall₃_imp E1 #
∀ {α : Sort u_1} {β : α → Sort u_2} {γ : (a : α) → β a → Sort u_3} {p q : (a : α) → (b : β a) → γ a b → Prop},
(∀ (a : α) (b : β a) (c : γ a b), p a b c → q a b c) →
(∀ (a : α) (b : β a) (c : γ a b), p a b c) → ∀ (a : α) (b : β a) (c : γ a b), q a b c
theorem Exists₂.imp E1 #
∀ {α : Sort u_1} {β : α → Sort u_2} {p q : (a : α) → β a → Prop},
(∀ (a : α) (b : β a), p a b → q a b) → (∃ a b, p a b) → ∃ a b, q a b
theorem Exists₃.imp E1 #
∀ {α : Sort u_1} {β : α → Sort u_2} {γ : (a : α) → β a → Sort u_3} {p q : (a : α) → (b : β a) → γ a b → Prop},
(∀ (a : α) (b : β a) (c : γ a b), p a b c → q a b c) → (∃ a b c, p a b c) → ∃ a b c, q a b c
theorem forall₂_comm E1 #
∀ {ι₁ : Sort u_3} {ι₂ : Sort u_4} {κ₁ : ι₁ → Sort u_5} {κ₂ : ι₂ → Sort u_6}
{p : (i₁ : ι₁) → κ₁ i₁ → (i₂ : ι₂) → κ₂ i₂ → Prop},
(∀ (i₁ : ι₁) (j₁ : κ₁ i₁) (i₂ : ι₂) (j₂ : κ₂ i₂), p i₁ j₁ i₂ j₂) ↔
∀ (i₂ : ι₂) (j₂ : κ₂ i₂) (i₁ : ι₁) (j₁ : κ₁ i₁), p i₁ j₁ i₂ j₂
theorem imp_forall_iff E0 #
∀ {α : Type u_3} {p : Prop} {q : α → Prop}, (p → ∀ (x : α), q x) ↔ ∀ (x : α), p → q x
We intentionally restrict the type of α in this lemma so that this is safer to use in simp
than forall_comm.
theorem imp_forall_iff_forall E1 #
∀ (A : Prop) (B : A → Prop), (A → ∀ (h : A), B h) ↔ ∀ (h : A), B h
theorem exists_and_exists_comm E1 #
∀ {α : Sort u_1} {β : Sort u_2} {P : α → Prop} {Q : β → Prop}, ((∃ a, P a) ∧ ∃ b, Q b) ↔ ∃ a b, P a ∧ Q b
theorem not_forall_not E1 #
∀ {α : Sort u_1} {p : α → Prop}, (¬∀ (x : α), ¬p x) ↔ ∃ x, p x
theorem forall_or_exists_not E1 #
∀ {α : Sort u_1} (P : α → Prop), (∀ (a : α), P a) ∨ ∃ a, ¬P a
theorem exists_or_forall_not E1 #
∀ {α : Sort u_1} (P : α → Prop), (∃ a, P a) ∨ ∀ (a : α), ¬P a
theorem forall_imp_iff_exists_imp E1 #
∀ {α : Sort u_3} {p : α → Prop} {b : Prop} [ha : Nonempty α], (∀ (x : α), p x) → b ↔ ∃ x, p x → b
theorem forall_true_iff E0 #
∀ {α : Sort u_1}, (∀ (a : α), True) ↔ True
theorem forall_true_iff' E1 #
∀ {α : Sort u_1} {p : α → Prop}, (∀ (a : α), p a ↔ True) → ((∀ (a : α), p a) ↔ True)
theorem forall₂_true_iff E0 #
∀ {α : Sort u_1} {β : α → Sort u_3}, (∀ (a : α) (a : β a), True) ↔ True
theorem forall₃_true_iff E0 #
∀ {α : Sort u_1} {β : α → Sort u_3} {γ : (a : α) → β a → Sort u_4}, (∀ (a : α) (b : β a) (a : γ a b), True) ↔ True
theorem Decidable.and_forall_ne E1 #
∀ {α : Sort u_1} [DecidableEq α] (a : α) {p : α → Prop}, (p a ∧ ∀ (b : α), b ≠ a → p b) ↔ ∀ (b : α), p b
theorem and_forall_ne E1 #
∀ {α : Sort u_1} {p : α → Prop} (a : α), (p a ∧ ∀ (b : α), b ≠ a → p b) ↔ ∀ (b : α), p b
theorem Ne.ne_or_ne E1 #
∀ {α : Sort u_1} {x y : α} (z : α), x ≠ y → x ≠ z ∨ y ≠ z
theorem exists_apply_eq_apply' E0 #
∀ {α : Sort u_1} {β : Sort u_2} (f : α → β) (a' : α), ∃ a, f a' = f a
theorem exists_apply_eq_apply2 E0 #
∀ {α : Sort u_3} {β : Sort u_4} {γ : Sort u_5} {f : α → β → γ} {a : α} {b : β}, ∃ x y, f x y = f a b
theorem exists_apply_eq_apply2' E0 #
∀ {α : Sort u_3} {β : Sort u_4} {γ : Sort u_5} {f : α → β → γ} {a : α} {b : β}, ∃ x y, f a b = f x y
theorem exists_apply_eq_apply3 E0 #
∀ {α : Sort u_3} {β : Sort u_4} {γ : Sort u_5} {δ : Sort u_6} {f : α → β → γ → δ} {a : α} {b : β} {c : γ},
∃ x y z, f x y z = f a b c
theorem exists_apply_eq_apply3' E0 #
∀ {α : Sort u_3} {β : Sort u_4} {γ : Sort u_5} {δ : Sort u_6} {f : α → β → γ → δ} {a : α} {b : β} {c : γ},
∃ x y z, f a b c = f x y z
theorem exists_apply_eq E0 #
∀ {α : Sort u_1} {β : Sort u_2} (a : α) (b : β), ∃ f, f a = b
The constant function witnesses that there exists a function sending a given term to a given term.
This is sometimes useful in simp to discharge side conditions.
theorem exists_exists_and_eq_and E0 #
∀ {α : Sort u_1} {β : Sort u_2} {f : α → β} {p : α → Prop} {q : β → Prop},
(∃ b, (∃ a, p a ∧ f a = b) ∧ q b) ↔ ∃ a, p a ∧ q (f a)
theorem exists_exists_eq_and E0 #
∀ {α : Sort u_1} {β : Sort u_2} {f : α → β} {p : β → Prop}, (∃ b, (∃ a, f a = b) ∧ p b) ↔ ∃ a, p (f a)
theorem exists_exists_and_exists_and_eq_and E0 #
∀ {α : Type u_3} {β : Type u_4} {γ : Type u_5} {f : α → β → γ} {p : α → Prop} {q : β → Prop} {r : γ → Prop},
(∃ c, (∃ a, p a ∧ ∃ b, q b ∧ f a b = c) ∧ r c) ↔ ∃ a, p a ∧ ∃ b, q b ∧ r (f a b)
theorem exists_exists_exists_and_eq E0 #
∀ {α : Type u_3} {β : Type u_4} {γ : Type u_5} {f : α → β → γ} {p : γ → Prop},
(∃ c, (∃ a b, f a b = c) ∧ p c) ↔ ∃ a b, p (f a b)
theorem forall_apply_eq_imp_iff' E1 #
∀ {α : Sort u_1} {β : Sort u_2} {f : α → β} {p : β → Prop}, (∀ (a : α) (b : β), f a = b → p b) ↔ ∀ (a : α), p (f a)
theorem forall_eq_apply_imp_iff' E1 #
∀ {α : Sort u_1} {β : Sort u_2} {f : α → β} {p : β → Prop}, (∀ (a : α) (b : β), b = f a → p b) ↔ ∀ (a : α), p (f a)
theorem exists₂_comm E1 #
∀ {ι₁ : Sort u_3} {ι₂ : Sort u_4} {κ₁ : ι₁ → Sort u_5} {κ₂ : ι₂ → Sort u_6}
{p : (i₁ : ι₁) → κ₁ i₁ → (i₂ : ι₂) → κ₂ i₂ → Prop}, (∃ i₁ j₁ i₂ j₂, p i₁ j₁ i₂ j₂) ↔ ∃ i₂ j₂ i₁ j₁, p i₁ j₁ i₂ j₂
theorem And.exists E1 #
∀ {p q : Prop} {f : p ∧ q → Prop}, (∃ (h : p ∧ q), f h) ↔ ∃ (hp : p) (hq : q), f ⋯
theorem forall_or_of_or_forall E1 #
∀ {α : Sort u_3} {p : α → Prop} {b : Prop}, (b ∨ ∀ (x : α), p x) → ∀ (x : α), b ∨ p x
theorem Decidable.forall_or_left E1 #
∀ {α : Sort u_1} {q : Prop} {p : α → Prop} [Decidable q], (∀ (x : α), q ∨ p x) ↔ q ∨ ∀ (x : α), p x
theorem forall_or_left E1 #
∀ {α : Sort u_1} {q : Prop} {p : α → Prop}, (∀ (x : α), q ∨ p x) ↔ q ∨ ∀ (x : α), p x
theorem Decidable.forall_or_right E1 #
∀ {α : Sort u_1} {q : Prop} {p : α → Prop} [Decidable q], (∀ (x : α), p x ∨ q) ↔ (∀ (x : α), p x) ∨ q
theorem forall_or_right E1 #
∀ {α : Sort u_1} {q : Prop} {p : α → Prop}, (∀ (x : α), p x ∨ q) ↔ (∀ (x : α), p x) ∨ q
theorem forall_and_index E0 #
∀ {p q : Prop} {r : p ∧ q → Prop}, (∀ (h : p ∧ q), r h) ↔ ∀ (hp : p) (hq : q), r ⋯
theorem forall_and_index' E1 #
∀ {p q : Prop} {r : p → q → Prop}, (∀ (hp : p) (hq : q), r hp hq) ↔ ∀ (h : p ∧ q), r ⋯ ⋯
theorem Exists.fst E1 #
∀ {b : Prop} {p : b → Prop}, Exists p → b
theorem Exists.snd E1 #
∀ {b : Prop} {p : b → Prop} (h : Exists p), p ⋯
theorem Prop.exists E1 #
∀ {p : Prop → Prop}, (∃ h, p h) ↔ p False ∨ p True
theorem Prop.forall E1 #
∀ {p : Prop → Prop}, (∀ (h : Prop), p h) ↔ p False ∧ p True
theorem exists_iff_of_forall E1 #
∀ {p : Prop} {q : p → Prop}, (∀ (h : p), q h) → ((∃ (h : p), q h) ↔ p)
theorem exists_prop_of_false E1 #
∀ {p : Prop} {q : p → Prop}, ¬p → ¬∃ (h' : p), q h'
theorem forall_prop_congr E1 #
∀ {p p' : Prop} {q q' : p → Prop}, (∀ (h : p), q h ↔ q' h) → ∀ (hp : p ↔ p'), (∀ (h : p), q h) ↔ ∀ (h : p'), q' ⋯
theorem forall_prop_congr' E1 #
∀ {p p' : Prop} {q q' : p → Prop}, (∀ (h : p), q h ↔ q' h) → ∀ (hp : p ↔ p'), (∀ (h : p), q h) = ∀ (h : p'), q' ⋯
theorem imp_congr_eq E0 #
∀ {a b c d : Prop}, a = c → b = d → (a → b) = (c → d)
theorem imp_congr_ctx_eq E0 #
∀ {a b c d : Prop}, a = c → (c → b = d) → (a → b) = (c → d)
def Iff.eq E1 #
∀ {a b : Prop}, (a ↔ b) → a = b
Alias of propext.
theorem iff_eq_eq E0 #
∀ {a b : Prop}, (a ↔ b) = (a = b)
theorem forall_true_left E0 #
∀ (p : True → Prop), (∀ (x : True), p x) ↔ p True.intro
See IsEmpty.forall_iff for the False version.
theorem Subsingleton.forall₂_iff E0 #
∀ {ι : Sort u_3} [Subsingleton ι] (P : ι → ι → Prop), (∀ (i j : ι), P i j) ↔ ∀ (i : ι), P i i
def Classical.dec E1 #
(p : Prop) → Decidable p
Any prop p is decidable classically. A shorthand for Classical.propDecidable.
def Classical.decPred E1 #
{α : Sort u_1} → (p : α → Prop) → DecidablePred p
Any predicate p is decidable classically.
def Classical.decRel E1 #
{α : Sort u_1} → (p : α → α → Prop) → DecidableRel p
Any relation p is decidable classically.
def Classical.decEq E1 #
(α : Sort u_2) → DecidableEq α
Any type α has decidable equality classically.
def Classical.existsCases E1 #
{α : Sort u_2} → {C : Sort u_3} → {p : α → Prop} → C → ((a : α) → p a → C) → C
Construct a function from a default value H0, and a function to use if there exists a value
satisfying the predicate.
theorem Classical.some_spec₂ E1 #
∀ {α : Sort u_2} {p : α → Prop} {h : ∃ a, p a} (q : α → Prop), (∀ (a : α), p a → q a) → q (Classical.choose h)
def Classical.byContradiction' E1 #
{α : Sort u_2} → (¬∀ (a : α), False) → α
A version of byContradiction that uses types instead of propositions.
def Classical.choice_of_byContradiction' E1 #
{α : Sort u_2} → ((¬∀ (a : α), False) → α) → Nonempty α → α
Classical.byContradiction' is equivalent to lean's axiom Classical.choice.
theorem Classical.choose_eq E0 #
∀ {α : Sort u_1} (a : α), ⋯.choose = a
theorem Classical.choose_eq' E0 #
∀ {α : Sort u_1} (a : α), ⋯.choose = a
theorem Classical.axiom_of_choice E1 #
∀ {α : Sort u} {β : α → Sort v} {r : (x : α) → β x → Prop}, (∀ (x : α), ∃ y, r x y) → ∃ f, ∀ (x : α), r x (f x)
Alias of Classical.axiomOfChoice.
theorem Classical.by_cases E1 #
∀ {p q : Prop}, (p → q) → (¬p → q) → q
Alias of Classical.byCases.
theorem Classical.by_contradiction E1 #
∀ {p : Prop}, (¬p → False) → p
Alias of Classical.byContradiction.
theorem Classical.prop_complete E1 #
∀ (a : Prop), a = True ∨ a = False
Alias of Classical.propComplete.
def Exists.classicalRecOn E1 #
{α : Sort u_1} → {p : α → Prop} → (∃ a, p a) → {C : Sort u_2} → ((a : α) → p a → C) → C
This function has the same type as Exists.recOn, and can be used to case on an equality,
but Exists.recOn can only eliminate into Prop, while this version eliminates into any universe
using the axiom of choice.
theorem bex_def E0 #
∀ {α : Sort u_1} {p q : α → Prop}, (∃ x, ∃ (_ : p x), q x) ↔ ∃ x, p x ∧ q x
theorem BEx.elim E1 #
∀ {α : Sort u_1} {p : α → Prop} {P : (x : α) → p x → Prop} {b : Prop},
(∃ x, ∃ (h : p x), P x h) → (∀ (a : α) (h : p a), P a h → b) → b
theorem BEx.intro E1 #
∀ {α : Sort u_1} {p : α → Prop} {P : (x : α) → p x → Prop} (a : α) (h₁ : p a), P a h₁ → ∃ x, ∃ (h : p x), P x h
theorem BAll.imp_right E1 #
∀ {α : Sort u_1} {p : α → Prop} {P Q : (x : α) → p x → Prop},
(∀ (x : α) (h : p x), P x h → Q x h) → (∀ (x : α) (h : p x), P x h) → ∀ (x : α) (h : p x), Q x h
theorem BEx.imp_right E1 #
∀ {α : Sort u_1} {p : α → Prop} {P Q : (x : α) → p x → Prop},
(∀ (x : α) (h : p x), P x h → Q x h) → (∃ x, ∃ (h : p x), P x h) → ∃ x, ∃ (h : p x), Q x h
theorem BAll.imp_left E1 #
∀ {α : Sort u_1} {r p q : α → Prop}, (∀ (x : α), p x → q x) → (∀ (x : α), q x → r x) → ∀ (x : α), p x → r x
theorem BEx.imp_left E1 #
∀ {α : Sort u_1} {r p q : α → Prop}, (∀ (x : α), p x → q x) → (∃ x, ∃ (_ : p x), r x) → ∃ x, ∃ (_ : q x), r x
theorem exists_mem_of_exists E1 #
∀ {α : Sort u_1} {p q : α → Prop}, (∀ (x : α), p x) → (∃ x, q x) → ∃ x, ∃ (_ : p x), q x
theorem exists_of_exists_mem E1 #
∀ {α : Sort u_1} {p q : α → Prop}, (∃ x, ∃ (_ : p x), q x) → ∃ x, q x
theorem not_exists_mem E1 #
∀ {α : Sort u_1} {p : α → Prop} {P : (x : α) → p x → Prop}, (¬∃ x, ∃ (h : p x), P x h) ↔ ∀ (x : α) (h : p x), ¬P x h
theorem not_forall₂_of_exists₂_not E1 #
∀ {α : Sort u_1} {p : α → Prop} {P : (x : α) → p x → Prop}, (∃ x, ∃ (h : p x), ¬P x h) → ¬∀ (x : α) (h : p x), P x h
theorem Decidable.not_forall₂ E1 #
∀ {α : Sort u_1} {p : α → Prop} {P : (x : α) → p x → Prop} [Decidable (∃ x, ∃ (h : p x), ¬P x h)]
[(x : α) → (h : p x) → Decidable (P x h)], (¬∀ (x : α) (h : p x), P x h) ↔ ∃ x, ∃ (h : p x), ¬P x h
theorem not_forall₂ E1 #
∀ {α : Sort u_1} {p : α → Prop} {P : (x : α) → p x → Prop}, (¬∀ (x : α) (h : p x), P x h) ↔ ∃ x, ∃ (h : p x), ¬P x h
theorem forall₂_and E1 #
∀ {α : Sort u_1} {p : α → Prop} {P Q : (x : α) → p x → Prop},
(∀ (x : α) (h : p x), P x h ∧ Q x h) ↔ (∀ (x : α) (h : p x), P x h) ∧ ∀ (x : α) (h : p x), Q x h
theorem forall_and_left E1 #
∀ {α : Sort u_1} [Nonempty α] (q : Prop) (p : α → Prop), (∀ (x : α), q ∧ p x) ↔ q ∧ ∀ (x : α), p x
theorem forall_and_right E1 #
∀ {α : Sort u_1} [Nonempty α] (p : α → Prop) (q : Prop), (∀ (x : α), p x ∧ q) ↔ (∀ (x : α), p x) ∧ q
theorem exists_mem_or E1 #
∀ {α : Sort u_1} {p : α → Prop} {P Q : (x : α) → p x → Prop},
(∃ x, ∃ (h : p x), P x h ∨ Q x h) ↔ (∃ x, ∃ (h : p x), P x h) ∨ ∃ x, ∃ (h : p x), Q x h
theorem forall₂_or_left E1 #
∀ {α : Sort u_1} {r p q : α → Prop}, (∀ (x : α), p x ∨ q x → r x) ↔ (∀ (x : α), p x → r x) ∧ ∀ (x : α), q x → r x
theorem exists_mem_or_left E1 #
∀ {α : Sort u_1} {r p q : α → Prop}, (∃ x, ∃ (_ : p x ∨ q x), r x) ↔ (∃ x, ∃ (_ : p x), r x) ∨ ∃ x, ∃ (_ : q x), r x
theorem dite_eq_iff E0 #
∀ {α : Sort u_1} {P : Prop} [inst : Decidable P] {c : α} {A : P → α} {B : ¬P → α},
dite P A B = c ↔ (∃ (h : P), A h = c) ∨ ∃ (h : ¬P), B h = c
theorem ite_eq_iff E0 #
∀ {α : Sort u_1} {P : Prop} [inst : Decidable P] {a b c : α}, (if P then a else b) = c ↔ P ∧ a = c ∨ ¬P ∧ b = c
theorem dite_eq_iff' E1 #
∀ {α : Sort u_1} {P : Prop} [inst : Decidable P] {c : α} {A : P → α} {B : ¬P → α},
dite P A B = c ↔ (∀ (h : P), A h = c) ∧ ∀ (h : ¬P), B h = c
theorem ite_eq_iff' E1 #
∀ {α : Sort u_1} {P : Prop} [inst : Decidable P] {a b c : α}, (if P then a else b) = c ↔ (P → a = c) ∧ (¬P → b = c)
theorem dite_ne_left_iff E0 #
∀ {α : Sort u_1} {P : Prop} [inst : Decidable P] {a : α} {B : ¬P → α}, dite P (fun x ↦ a) B ≠ a ↔ ∃ (h : ¬P), a ≠ B h
theorem dite_ne_right_iff E0 #
∀ {α : Sort u_1} {P : Prop} [inst : Decidable P] {b : α} {A : P → α}, (dite P A fun x ↦ b) ≠ b ↔ ∃ (h : P), A h ≠ b
theorem ite_ne_left_iff E0 #
∀ {α : Sort u_1} {P : Prop} [inst : Decidable P] {a b : α}, (if P then a else b) ≠ a ↔ ¬P ∧ a ≠ b
theorem ite_ne_right_iff E0 #
∀ {α : Sort u_1} {P : Prop} [inst : Decidable P] {a b : α}, (if P then a else b) ≠ b ↔ P ∧ a ≠ b
theorem Ne.dite_eq_left_iff E0 #
∀ {α : Sort u_1} {P : Prop} [inst : Decidable P] {a : α} {B : ¬P → α},
(∀ (h : ¬P), a ≠ B h) → (dite P (fun x ↦ a) B = a ↔ P)
theorem Ne.dite_eq_right_iff E0 #
∀ {α : Sort u_1} {P : Prop} [inst : Decidable P] {b : α} {A : P → α},
(∀ (h : P), A h ≠ b) → ((dite P A fun x ↦ b) = b ↔ ¬P)
theorem Ne.ite_eq_left_iff E0 #
∀ {α : Sort u_1} {P : Prop} [inst : Decidable P] {a b : α}, a ≠ b → ((if P then a else b) = a ↔ P)
theorem Ne.ite_eq_right_iff E0 #
∀ {α : Sort u_1} {P : Prop} [inst : Decidable P] {a b : α}, a ≠ b → ((if P then a else b) = b ↔ ¬P)
theorem Ne.dite_ne_left_iff E0 #
∀ {α : Sort u_1} {P : Prop} [inst : Decidable P] {a : α} {B : ¬P → α},
(∀ (h : ¬P), a ≠ B h) → (dite P (fun x ↦ a) B ≠ a ↔ ¬P)
theorem Ne.dite_ne_right_iff E0 #
∀ {α : Sort u_1} {P : Prop} [inst : Decidable P] {b : α} {A : P → α},
(∀ (h : P), A h ≠ b) → ((dite P A fun x ↦ b) ≠ b ↔ P)
theorem Ne.ite_ne_left_iff E0 #
∀ {α : Sort u_1} {P : Prop} [inst : Decidable P] {a b : α}, a ≠ b → ((if P then a else b) ≠ a ↔ ¬P)
theorem Ne.ite_ne_right_iff E0 #
∀ {α : Sort u_1} {P : Prop} [inst : Decidable P] {a b : α}, a ≠ b → ((if P then a else b) ≠ b ↔ P)
theorem dite_eq_or_eq E0 #
∀ {α : Sort u_1} (P : Prop) [inst : Decidable P] {A : P → α} {B : ¬P → α},
(∃ (h : P), dite P A B = A h) ∨ ∃ (h : ¬P), dite P A B = B h
theorem ite_eq_or_eq E0 #
∀ {α : Sort u_1} (P : Prop) [inst : Decidable P] (a b : α), (if P then a else b) = a ∨ (if P then a else b) = b
theorem apply_dite₂ E1 #
∀ {α : Sort u_3} {β : Sort u_4} {γ : Sort u_5} (f : α → β → γ) (P : Prop) [inst : Decidable P] (a : P → α) (b : ¬P → α)
(c : P → β) (d : ¬P → β), f (dite P a b) (dite P c d) = if h : P then f (a h) (c h) else f (b h) (d h)
A two-argument function applied to two dites is a dite of that two-argument function
applied to each of the branches.
theorem apply_ite₂ E1 #
∀ {α : Sort u_3} {β : Sort u_4} {γ : Sort u_5} (f : α → β → γ) (P : Prop) [inst : Decidable P] (a b : α) (c d : β),
f (if P then a else b) (if P then c else d) = if P then f a c else f b d
A two-argument function applied to two ites is an ite of that two-argument function
applied to each of the branches.
theorem dite_apply E0 #
∀ {α : Sort u_1} {σ : α → Sort u_2} (P : Prop) [inst : Decidable P] (f : P → (a : α) → σ a) (g : ¬P → (a : α) → σ a)
(a : α), dite P f g a = if h : P then f h a else g h a
A dite producing a Pi type Π a, σ a, applied to a value a : α is a dite that applies
either branch to a.
theorem ite_apply E0 #
∀ {α : Sort u_1} {σ : α → Sort u_2} (P : Prop) [inst : Decidable P] (f g : (a : α) → σ a) (a : α),
(if P then f else g) a = if P then f a else g a
An ite producing a Pi type Π a, σ a, applied to a value a : α is an ite that applies
either branch to a.
theorem apply_ite_left E1 #
∀ {α : Sort u_3} {β : Sort u_4} {γ : Sort u_5} (f : α → β → γ) (P : Prop) [inst : Decidable P] (x y : α) (z : β),
f (if P then x else y) z = if P then f x z else f y z
theorem ite_and E1 #
∀ {α : Sort u_1} (P Q : Prop) [inst : Decidable P] (a b : α) [inst_1 : Decidable Q],
(if P ∧ Q then a else b) = if P then if Q then a else b else b
theorem ite_or E1 #
∀ {α : Sort u_1} (P Q : Prop) [inst : Decidable P] (a b : α) [inst_1 : Decidable Q],
(if P ∨ Q then a else b) = if P then a else if Q then a else b
theorem dite_dite_comm E1 #
∀ {α : Sort u_1} (P Q : Prop) [inst : Decidable P] {A : P → α} [inst_1 : Decidable Q] {B : Q → α} {C : ¬P → ¬Q → α},
(P → ¬Q) → (if p : P then A p else if q : Q then B q else C p q) = if q : Q then B q else if p : P then A p else C p q
theorem ite_ite_comm E1 #
∀ {α : Sort u_1} (P Q : Prop) [inst : Decidable P] (a b : α) {c : α} [inst_1 : Decidable Q],
(P → ¬Q) → (if P then a else if Q then b else c) = if Q then b else if P then a else c
theorem ite_prop_iff_or E1 #
∀ {P Q R : Prop} [inst : Decidable P], (if P then Q else R) ↔ P ∧ Q ∨ ¬P ∧ R
theorem dite_prop_iff_or E1 #
∀ {P : Prop} [inst : Decidable P] {Q : P → Prop} {R : ¬P → Prop}, dite P Q R ↔ (∃ (p : P), Q p) ∨ ∃ (p : ¬P), R p
theorem ite_prop_iff_and E1 #
∀ {P Q R : Prop} [inst : Decidable P], (if P then Q else R) ↔ (P → Q) ∧ (¬P → R)
theorem dite_prop_iff_and E1 #
∀ {P : Prop} [inst : Decidable P] {Q : P → Prop} {R : ¬P → Prop}, dite P Q R ↔ (∀ (h : P), Q h) ∧ ∀ (h : ¬P), R h
theorem if_ctx_congr E1 #
∀ {α : Sort u_1} {P Q : Prop} [inst : Decidable P] [inst_1 : Decidable Q] {x y u v : α},
(P ↔ Q) → (Q → x = u) → (¬Q → y = v) → (if P then x else y) = if Q then u else v
theorem if_congr E1 #
∀ {α : Sort u_1} {P Q : Prop} [inst : Decidable P] [inst_1 : Decidable Q] {x y u v : α},
(P ↔ Q) → x = u → y = v → (if P then x else y) = if Q then u else v
theorem Function.Injective.ite E1 #
∀ {α : Sort u_3} {β : Sort u_4} {p : β → Prop} [inst : DecidablePred p] {g : β → α},
Function.Injective g →
∀ {f : β → α},
Function.Injective f → (∀ (x y : β), g x = f y → x = y) → Function.Injective fun x ↦ if p x then g x else f x
theorem Membership.mem.ne_of_notMem E1 #
∀ {α : Type u_1} {β : Type u_2} [inst : Membership α β] {s : β} {a b : α}, a ∈ s → b ∉ s → a ≠ b
Alias of ne_of_mem_of_not_mem.
theorem Membership.mem.ne_of_notMem' E1 #
∀ {α : Type u_1} {β : Type u_2} [inst : Membership α β] {s t : β} {a : α}, a ∈ s → a ∉ t → s ≠ t
Alias of ne_of_mem_of_not_mem'.
theorem mem_dite E0 #
∀ {α : Type u_1} {β : Type u_2} [inst : Membership α β] {p : Prop} [inst_1 : Decidable p] {a : α} {s : p → β}
{t : ¬p → β}, (a ∈ if h : p then s h else t h) ↔ (∀ (h : p), a ∈ s h) ∧ ∀ (h : ¬p), a ∈ t h
theorem dite_mem E1 #
∀ {α : Type u_1} {β : Type u_2} [inst : Membership α β] {p : Prop} [inst_1 : Decidable p] {a : p → α} {b : ¬p → α}
{s : β}, (if h : p then a h else b h) ∈ s ↔ (∀ (h : p), a h ∈ s) ∧ ∀ (h : ¬p), b h ∈ s
theorem mem_ite E0 #
∀ {α : Type u_1} {β : Type u_2} [inst : Membership α β] {p : Prop} [inst_1 : Decidable p] {a : α} {s t : β},
(a ∈ if p then s else t) ↔ (p → a ∈ s) ∧ (¬p → a ∈ t)
theorem ite_mem E1 #
∀ {α : Type u_1} {β : Type u_2} [inst : Membership α β] {p : Prop} [inst_1 : Decidable p] {a b : α} {s : β},
(if p then a else b) ∈ s ↔ (p → a ∈ s) ∧ (¬p → b ∈ s)
theorem not_beq_of_ne E1 #
∀ {α : Type u_1} [inst : BEq α] [LawfulBEq α] {a b : α}, a ≠ b → ¬(a == b) = true
theorem beq_eq_decide E1 #
∀ {α : Type u_1} [inst : BEq α] [LawfulBEq α] [inst_2 : DecidableEq α] (a b : α), (a == b) = decide (a = b)
Alias of Bool.beq_eq_decide_eq.
theorem beq_eq_beq E0 #
∀ {α : Type u_1} {β : Type u_2} [inst : BEq α] [LawfulBEq α] [inst_2 : BEq β] [LawfulBEq β] {a₁ a₂ : α} {b₁ b₂ : β},
(a₁ == a₂) = (b₁ == b₂) ↔ (a₁ = a₂ ↔ b₁ = b₂)
theorem beq_ext E1 #
∀ {α : Type u_1} (inst1 inst2 : BEq α), (∀ (x y : α), (x == y) = (x == y)) → inst1 = inst2
theorem beq_ext_iff E0 #
∀ {α : Type u_1} {inst1 inst2 : BEq α}, inst1 = inst2 ↔ ∀ (x y : α), (x == y) = (x == y)
theorem lawful_beq_subsingleton E1 #
∀ {α : Type u_1} (inst1 inst2 : BEq α) [LawfulBEq α] [LawfulBEq α], inst1 = inst2
Deprecated aliases
| Name | New name | Since |
|---|---|---|
Prop.exists_iff | Prop.exists | 2026-09-02 |
Prop.forall_iff | Prop.forall | 2026-09-02 |