HepLean Documentation

Batteries.Logic

instance instDecidablePredComp_batteries {α : Sort u_1} {β : Sort u_2} {p : βProp} {f : αβ} [DecidablePred p] :
Equations

id #

theorem Function.id_def {α : Sort u_1} :
id = fun (x : α) => x

decidable #

theorem Decidable.exists_not_of_not_forall {α : Sort u_1} {p : αProp} [Decidable (∃ (x : α), ¬p x)] [(x : α) → Decidable (p x)] :
(¬∀ (x : α), p x)∃ (x : α), ¬p x

Alias of the forward direction of Decidable.not_forall.

classical logic #

theorem Classical.exists_not_of_not_forall {α : Sort u_1} {p : αProp} :
(¬∀ (x : α), p x)∃ (x : α), ¬p x

Alias of the forward direction of Classical.not_forall.

equality #

theorem heq_iff_eq {α✝ : Sort u_1} {a b : α✝} :
HEq a b a = b
@[simp]
theorem eq_rec_constant {α : Sort u_1} {a a' : α} {β : Sort u_2} (y : β) (h : a = a') :
hy = y
theorem congrArg₂ {α : Sort u_1} {β : Sort u_2} {γ : Sort u_3} (f : αβγ) {x x' : α} {y y' : β} (hx : x = x') (hy : y = y') :
f x y = f x' y'
theorem congrFun₂ {α : Sort u_1} {β : αSort u_2} {γ : (a : α) → β aSort u_3} {f g : (a : α) → (b : β a) → γ a b} (h : f = g) (a : α) (b : β a) :
f a b = g a b
theorem congrFun₃ {α : Sort u_1} {β : αSort u_2} {γ : (a : α) → β aSort u_3} {δ : (a : α) → (b : β a) → γ a bSort u_4} {f g : (a : α) → (b : β a) → (c : γ a b) → δ a b c} (h : f = g) (a : α) (b : β a) (c : γ a b) :
f a b c = g a b c
theorem funext₂ {α : Sort u_1} {β : αSort u_2} {γ : (a : α) → β aSort u_3} {f g : (a : α) → (b : β a) → γ a b} (h : ∀ (a : α) (b : β a), f a b = g a b) :
f = g
theorem funext₃ {α : Sort u_1} {β : αSort u_2} {γ : (a : α) → β aSort u_3} {δ : (a : α) → (b : β a) → γ a bSort u_4} {f g : (a : α) → (b : β a) → (c : γ a b) → δ a b c} (h : ∀ (a : α) (b : β a) (c : γ a b), f a b c = g a b c) :
f = g
@[deprecated funext_iff]
theorem Function.funext_iff {α : Sort u} {β : αSort v} {f g : (x : α) → β x} :
f = g ∀ (x : α), f x = g x

Alias of funext_iff.

theorem Eq.congr {α✝ : Sort u_1} {x₁ y₁ x₂ y₂ : α✝} (h₁ : x₁ = y₁) (h₂ : x₂ = y₂) :
x₁ = x₂ y₁ = y₂
theorem Eq.congr_left {α : Sort u_1} {x y z : α} (h : x = y) :
x = z y = z
theorem Eq.congr_right {α : Sort u_1} {x y z : α} (h : x = y) :
z = x z = y
theorem congr_arg {α : Sort u} {β : Sort v} {a₁ a₂ : α} (f : αβ) (h : a₁ = a₂) :
f a₁ = f a₂

Alias of congrArg.


Congruence in the function argument: if a₁ = a₂ then f a₁ = f a₂ for any (nondependent) function f. This is more powerful than it might look at first, because you can also use a lambda expression for f to prove that <something containing a₁> = <something containing a₂>. This function is used internally by tactics like congr and simp to apply equalities inside subterms.

For more information: Equality

theorem congr_arg₂ {α : Sort u_1} {β : Sort u_2} {γ : Sort u_3} (f : αβγ) {x x' : α} {y y' : β} (hx : x = x') (hy : y = y') :
f x y = f x' y'

Alias of congrArg₂.

theorem congr_fun {α : Sort u} {β : αSort v} {f g : (x : α) → β x} (h : f = g) (a : α) :
f a = g a

Alias of congrFun.


Congruence in the function part of an application: If f = g then f a = g a.

theorem congr_fun₂ {α : Sort u_1} {β : αSort u_2} {γ : (a : α) → β aSort u_3} {f g : (a : α) → (b : β a) → γ a b} (h : f = g) (a : α) (b : β a) :
f a b = g a b

Alias of congrFun₂.

theorem congr_fun₃ {α : Sort u_1} {β : αSort u_2} {γ : (a : α) → β aSort u_3} {δ : (a : α) → (b : β a) → γ a bSort u_4} {f g : (a : α) → (b : β a) → (c : γ a b) → δ a b c} (h : f = g) (a : α) (b : β a) (c : γ a b) :
f a b c = g a b c

Alias of congrFun₃.

theorem heq_of_cast_eq {α β : Sort u_1} {a : α} {a' : β} (e : α = β) :
cast e a = a'HEq a a'
theorem cast_eq_iff_heq {a✝ a✝¹ : Sort u_1} {e : a✝ = a✝¹} {a : a✝} {a' : a✝¹} :
cast e a = a' HEq a a'
theorem eqRec_eq_cast {α : Sort u_1} {a : α} {motive : (a' : α) → a = a'Sort u_2} (x : motive a ) {a' : α} (e : a = a') :
ex = cast x
theorem eqRec_heq_self {α : Sort u_1} {a : α} {motive : (a' : α) → a = a'Sort u_2} (x : motive a ) {a' : α} (e : a = a') :
HEq (ex) x
@[simp]
theorem eqRec_heq_iff_heq {α : Sort u_1} {a : α} {motive : (a' : α) → a = a'Sort u_2} {x : motive a } {a' : α} {e : a = a'} {β : Sort u_2} {y : β} :
HEq (ex) y HEq x y
@[simp]
theorem heq_eqRec_iff_heq {α : Sort u_1} {a : α} {motive : (a' : α) → a = a'Sort u_2} {x : motive a } {a' : α} {e : a = a'} {β : Sort u_2} {y : β} :
HEq y (ex) HEq y x

miscellaneous #

theorem subsingleton_of_forall_eq {α : Sort u_1} (x : α) (h : ∀ (y : α), y = x) :

If all points are equal to a given point x, then α is a subsingleton.

theorem subsingleton_iff_forall_eq {α : Sort u_1} (x : α) :
Subsingleton α ∀ (y : α), y = x
theorem congr_eqRec {α : Sort u_1} {γ : Sort u_2} {x x' : α} {β : αSort u_3} (f : (x : α) → β xγ) (h : x = x') (y : β x) :
f x' (hy) = f x y