cast and equality #
not #
and #
or #
distributivity #
Ite #
exists and forall #
theorem
forall_imp
{α : Sort u_1}
{p : α → Prop}
{q : α → Prop}
(h : ∀ (a : α), p a → q a)
:
(∀ (a : α), p a) → ∀ (a : α), q a
@[simp]
theorem
forall_exists_index
{α : Sort u_1}
{p : α → Prop}
{q : (∃ (x : α), p x) → Prop}
:
(∀ (h : ∃ (x : α), p x), q h) ↔ ∀ (x : α) (h : p x), q ⋯
As simp
does not index foralls, this @[simp]
lemma is tried on every forall
expression.
This is not ideal, and likely a performance issue, but it is difficult to remove this attribute at this time.
theorem
Exists.imp
{α : Sort u_1}
{p : α → Prop}
{q : α → Prop}
(h : ∀ (a : α), p a → q a)
:
(∃ (a : α), p a) → ∃ (a : α), q a
theorem
forall₃_congr
{α : Sort u_1}
{β : α → Sort u_2}
{γ : (a : α) → β a → Sort u_3}
{p : (a : α) → (b : β a) → γ a b → Prop}
{q : (a : α) → (b : β a) → γ a b → Prop}
(h : ∀ (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₃_congr
{α : Sort u_1}
{β : α → Sort u_2}
{γ : (a : α) → β a → Sort u_3}
{p : (a : α) → (b : β a) → γ a b → Prop}
{q : (a : α) → (b : β a) → γ a b → Prop}
(h : ∀ (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
forall₄_congr
{α : Sort u_1}
{β : α → Sort u_2}
{γ : (a : α) → β a → Sort u_3}
{δ : (a : α) → (b : β a) → γ a b → Sort u_4}
{p : (a : α) → (b : β a) → (c : γ a b) → δ a b c → Prop}
{q : (a : α) → (b : β a) → (c : γ a b) → δ a b c → Prop}
(h : ∀ (a : α) (b : β a) (c : γ a b) (d : δ a b c), p a b c d ↔ q a b c d)
:
(∀ (a : α) (b : β a) (c : γ a b) (d : δ a b c), p a b c d) ↔ ∀ (a : α) (b : β a) (c : γ a b) (d : δ a b c), q a b c d
theorem
exists₄_congr
{α : Sort u_1}
{β : α → Sort u_2}
{γ : (a : α) → β a → Sort u_3}
{δ : (a : α) → (b : β a) → γ a b → Sort u_4}
{p : (a : α) → (b : β a) → (c : γ a b) → δ a b c → Prop}
{q : (a : α) → (b : β a) → (c : γ a b) → δ a b c → Prop}
(h : ∀ (a : α) (b : β a) (c : γ a b) (d : δ a b c), p a b c d ↔ q a b c d)
:
(∃ (a : α), ∃ (b : β a), ∃ (c : γ a b), ∃ (d : δ a b c), p a b c d) ↔ ∃ (a : α), ∃ (b : β a), ∃ (c : γ a b), ∃ (d : δ a b c), q a b c d
theorem
forall₅_congr
{α : Sort u_1}
{β : α → Sort u_2}
{γ : (a : α) → β a → Sort u_3}
{δ : (a : α) → (b : β a) → γ a b → Sort u_4}
{ε : (a : α) → (b : β a) → (c : γ a b) → δ a b c → Sort u_5}
{p : (a : α) → (b : β a) → (c : γ a b) → (d : δ a b c) → ε a b c d → Prop}
{q : (a : α) → (b : β a) → (c : γ a b) → (d : δ a b c) → ε a b c d → Prop}
(h : ∀ (a : α) (b : β a) (c : γ a b) (d : δ a b c) (e : ε a b c d), p a b c d e ↔ q a b c d e)
:
(∀ (a : α) (b : β a) (c : γ a b) (d : δ a b c) (e : ε a b c d), p a b c d e) ↔ ∀ (a : α) (b : β a) (c : γ a b) (d : δ a b c) (e : ε a b c d), q a b c d e
theorem
exists₅_congr
{α : Sort u_1}
{β : α → Sort u_2}
{γ : (a : α) → β a → Sort u_3}
{δ : (a : α) → (b : β a) → γ a b → Sort u_4}
{ε : (a : α) → (b : β a) → (c : γ a b) → δ a b c → Sort u_5}
{p : (a : α) → (b : β a) → (c : γ a b) → (d : δ a b c) → ε a b c d → Prop}
{q : (a : α) → (b : β a) → (c : γ a b) → (d : δ a b c) → ε a b c d → Prop}
(h : ∀ (a : α) (b : β a) (c : γ a b) (d : δ a b c) (e : ε a b c d), p a b c d e ↔ q a b c d e)
:
(∃ (a : α), ∃ (b : β a), ∃ (c : γ a b), ∃ (d : δ a b c), ∃ (e : ε a b c d), p a b c d e) ↔ ∃ (a : α), ∃ (b : β a), ∃ (c : γ a b), ∃ (d : δ a b c), ∃ (e : ε a b c d), q a b c d e
@[simp]
theorem
exists_apply_eq_apply
{α : Sort u_2}
{β : Sort u_1}
(f : α → β)
(a' : α)
:
∃ (a : α), f a = f a'
Nonempty #
decidable #
@[reducible, inline]
Excluded middle. Added as alias for Decidable.em
Equations
Instances For
instance
exists_prop_decidable
{p : Prop}
(P : p → Prop)
[Decidable p]
[(h : p) → Decidable (P h)]
:
Decidable (∃ (h : p), P h)
Equations
- exists_prop_decidable P = if h : p then decidable_of_decidable_of_iff ⋯ else isFalse ⋯
instance
forall_prop_decidable
{p : Prop}
(P : p → Prop)
[Decidable p]
[(h : p) → Decidable (P h)]
:
Decidable (∀ (h : p), P h)
Equations
- forall_prop_decidable P = if h : p then decidable_of_decidable_of_iff ⋯ else isTrue ⋯
@[inline]
Transfer decidability of b
to decidability of a
, if the propositions are equivalent.
This is the same as decidable_of_iff
but the iff is flipped.
Equations
Instances For
Equations
- Decidable.predToBool p = { coe := fun (b : α) => decide (p b) }
Prove that a
is decidable by constructing a boolean b
and a proof that b ↔ a
.
(This is sometimes taken as an alternate definition of decidability.)