Documentation

Mathlib.Init.Logic

def Implies (a : Prop) (b : Prop) :
Equations
theorem Implies.trans {p : Prop} {q : Prop} {r : Prop} (h₁ : pq) (h₂ : qr) :
pr

Implication →→ is transitive. If P → Q→ Q and Q → R→ R then P → R→ R.

theorem proof_irrel {a : Prop} (h₁ : a) (h₂ : a) :
h₁ = h₂

Alias of proofIrrel.

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

Alias of congrFun.

theorem congr_arg {α : Sort u} {β : Sort v} {a₁ : α} {a₂ : α} (f : αβ) (h : a₁ = a₂) :
f a₁ = f a₂

Alias of congrArg.

theorem trans_rel_left {α : Sort u} {a : α} {b : α} {c : α} (r : ααProp) (h₁ : r a b) (h₂ : b = c) :
r a c
theorem trans_rel_right {α : Sort u} {a : α} {b : α} {c : α} (r : ααProp) (h₁ : a = b) (h₂ : r b c) :
r a c
theorem not_of_eq_false {p : Prop} (h : p = False) :
theorem cast_proof_irrel {α : Sort u_1} {β : Sort u_1} (h₁ : α = β) (h₂ : α = β) (a : α) :
cast h₁ a = cast h₂ a
theorem Ne.def {α : Sort u} (a : α) (b : α) :
(a b) = ¬a = b
theorem eq_rec_heq {α : Sort u} {φ : αSort v} {a : α} {a' : α} (h : a = a') (p : φ a) :
HEq (Eq.recOn h p) p

Alias of eqRec_heq.

theorem heq_of_eq_rec_left {α : Sort u_1} {φ : αSort v} {a : α} {a' : α} {p₁ : φ a} {p₂ : φ a'} (e : a = a') (h₂ : ep₁ = p₂) :
HEq p₁ p₂
theorem heq_of_eq_rec_right {α : Sort u_1} {φ : αSort v} {a : α} {a' : α} {p₁ : φ a} {p₂ : φ a'} (e : a' = a) (h₂ : p₁ = ep₂) :
HEq p₁ p₂
theorem of_heq_true {a : Prop} (h : HEq a True) :
a
theorem eq_rec_compose {α : Sort u} {β : Sort u} {φ : Sort u} (p₁ : β = φ) (p₂ : α = β) (a : α) :
Eq.recOn p₁ (Eq.recOn p₂ a) = Eq.recOn (_ : α = φ) a
def Xor' (a : Prop) (b : Prop) :
Equations
theorem not_of_not_not_not {a : Prop} :
¬¬¬a¬a

Alias of the forward direction of not_not_not.

theorem and_comm' (a : Prop) (b : Prop) :
a b b a
theorem and_assoc' {c : Prop} (a : Prop) (b : Prop) :
(a b) c a b c
theorem and_self_iff (p : Prop) :
p p p
theorem or_comm' (a : Prop) (b : Prop) :
a b b a
theorem or_assoc' {c : Prop} (a : Prop) (b : Prop) :
(a b) c a b c
theorem or_self_iff (p : Prop) :
p p p
theorem not_or_of_not {a : Prop} {b : Prop} :
¬a¬b¬(a b)
theorem iff_true_iff {a : Prop} :
(a True) a
theorem true_iff_iff {a : Prop} :
(True a) a
theorem iff_self_iff (a : Prop) :
(a a) True
def ExistsUnique {α : Sort u_1} (p : αProp) :
Equations
Equations
  • One or more equations did not get rendered due to their size.

Pretty-printing for ExistsUnique, following the same pattern as pretty printing for Exists.

Equations
  • One or more equations did not get rendered due to their size.
theorem ExistsUnique.intro {α : Sort u_1} {p : αProp} (w : α) (h₁ : p w) (h₂ : ∀ (y : α), p yy = w) :
∃! x, p x
theorem ExistsUnique.elim {α : Sort u} {p : αProp} {b : Prop} (h₂ : ∃! x, p x) (h₁ : (x : α) → p x(∀ (y : α), p yy = x) → b) :
b
theorem exists_unique_of_exists_of_unique {α : Sort u} {p : αProp} (hex : x, p x) (hunique : ∀ (y₁ y₂ : α), p y₁p y₂y₁ = y₂) :
∃! x, p x
theorem ExistsUnique.exists {α : Sort u_1} {p : αProp} :
(∃! x, p x) → x, p x
theorem ExistsUnique.unique {α : Sort u} {p : αProp} (h : ∃! x, p x) {y₁ : α} {y₂ : α} (py₁ : p y₁) (py₂ : p y₂) :
y₁ = y₂
theorem exists_unique_congr {α : Sort u_1} {p : αProp} {q : αProp} (h : ∀ (a : α), p a q a) :
(∃! a, p a) ∃! a, q a
def Decidable.recOn_true (p : Prop) [h : Decidable p] {h₁ : pSort u} {h₂ : ¬pSort u} (h₃ : p) (h₄ : h₁ h₃) :
Decidable.recOn h h₂ h₁
Equations
def Decidable.recOn_false (p : Prop) [h : Decidable p] {h₁ : pSort u} {h₂ : ¬pSort u} (h₃ : ¬p) (h₄ : h₂ h₃) :
Decidable.recOn h h₂ h₁
Equations
def Decidable.by_cases {p : Prop} {q : Sort u} [dec : Decidable p] (h1 : pq) (h2 : ¬pq) :
q

Alias of Decidable.byCases.

Equations
theorem Decidable.not_or_iff_and_not (p : Prop) (q : Prop) [inst : Decidable p] [inst : Decidable q] :
¬(p q) ¬p ¬q
def Iff.decidable {p : Prop} {q : Prop} [inst : Decidable p] [inst : Decidable q] :

Alias of instDecidableIff.

Equations
instance instDecidableXor' (p : Prop) {q : Prop} [inst : Decidable p] [inst : Decidable q] :
Equations
def IsDecEq {α : Sort u} (p : ααBool) :
Equations
def IsDecRefl {α : Sort u} (p : ααBool) :
Equations
def decidableEq_of_bool_pred {α : Sort u} {p : ααBool} (h₁ : IsDecEq p) (h₂ : IsDecRefl p) :
Equations
theorem decidableEq_inl_refl {α : Sort u} [h : DecidableEq α] (a : α) :
h a a = isTrue (_ : a = a)
theorem decidableEq_inr_neg {α : Sort u} [h : DecidableEq α] {a : α} {b : α} (n : a b) :
h a b = isFalse n
theorem rec_subsingleton {p : Prop} [h : Decidable p] {h₁ : pSort u} {h₂ : ¬pSort u} [h₃ : ∀ (h : p), Subsingleton (h₁ h)] [h₄ : ∀ (h : ¬p), Subsingleton (h₂ h)] :
theorem if_t_t (c : Prop) [inst : Decidable c] {α : Sort u} (t : α) :
(if c then t else t) = t
theorem imp_of_if_pos {c : Prop} {t : Prop} {e : Prop} [inst : Decidable c] (h : if c then t else e) (hc : c) :
t
theorem imp_of_if_neg {c : Prop} {t : Prop} {e : Prop} [inst : Decidable c] (h : if c then t else e) (hnc : ¬c) :
e
theorem if_ctx_congr {α : Sort u} {b : Prop} {c : Prop} [dec_b : Decidable b] [dec_c : Decidable c] {x : α} {y : α} {u : α} {v : α} (h_c : b c) (h_t : cx = u) (h_e : ¬cy = v) :
(if b then x else y) = if c then u else v
theorem if_congr {α : Sort u} {b : Prop} {c : Prop} [inst : Decidable b] [inst : Decidable c] {x : α} {y : α} {u : α} {v : α} (h_c : b c) (h_t : x = u) (h_e : y = v) :
(if b then x else y) = if c then u else v
theorem if_ctx_congr_prop {b : Prop} {c : Prop} {x : Prop} {y : Prop} {u : Prop} {v : Prop} [dec_b : Decidable b] [dec_c : Decidable c] (h_c : b c) (h_t : c → (x u)) (h_e : ¬c → (y v)) :
(if b then x else y) if c then u else v
theorem if_congr_prop {b : Prop} {c : Prop} {x : Prop} {y : Prop} {u : Prop} {v : Prop} [inst : Decidable b] [inst : Decidable c] (h_c : b c) (h_t : x u) (h_e : y v) :
(if b then x else y) if c then u else v
theorem if_ctx_simp_congr_prop {b : Prop} {c : Prop} {x : Prop} {y : Prop} {u : Prop} {v : Prop} [inst : Decidable b] (h_c : b c) (h_t : c → (x u)) (h_e : ¬c → (y v)) :
(if b then x else y) if c then u else v
theorem if_simp_congr_prop {b : Prop} {c : Prop} {x : Prop} {y : Prop} {u : Prop} {v : Prop} [inst : Decidable b] (h_c : b c) (h_t : x u) (h_e : y v) :
(if b then x else y) if c then u else v
theorem dif_ctx_congr {α : Sort u} {b : Prop} {c : Prop} [dec_b : Decidable b] [dec_c : Decidable c] {x : bα} {u : cα} {y : ¬bα} {v : ¬cα} (h_c : b c) (h_t : ∀ (h : c), x (Iff.mpr h_c h) = u h) (h_e : ∀ (h : ¬c), y (_ : ¬b) = v h) :
dite b x y = dite c u v
theorem dif_ctx_simp_congr {α : Sort u} {b : Prop} {c : Prop} [inst : Decidable b] {x : bα} {u : cα} {y : ¬bα} {v : ¬cα} (h_c : b c) (h_t : ∀ (h : c), x (Iff.mpr h_c h) = u h) (h_e : ∀ (h : ¬c), y (_ : ¬b) = v h) :
dite b x y = dite c u v
def AsTrue (c : Prop) [inst : Decidable c] :
Equations
def AsFalse (c : Prop) [inst : Decidable c] :
Equations
theorem AsTrue.get {c : Prop} [h₁ : Decidable c] :
AsTrue cc
theorem let_value_eq {α : Sort u} {β : Sort v} {a₁ : α} {a₂ : α} (b : αβ) (h : a₁ = a₂) :
(let x := a₁; b x) = let x := a₂; b x
theorem let_value_heq {α : Sort v} {β : αSort u} {a₁ : α} {a₂ : α} (b : (x : α) → β x) (h : a₁ = a₂) :
HEq (let x := a₁; b x) (let x := a₂; b x)
theorem let_body_eq {α : Sort v} {β : αSort u} (a : α) {b₁ : (x : α) → β x} {b₂ : (x : α) → β x} (h : ∀ (x : α), b₁ x = b₂ x) :
(let x := a; b₁ x) = let x := a; b₂ x
theorem let_eq {α : Sort v} {β : Sort u} {a₁ : α} {a₂ : α} {b₁ : αβ} {b₂ : αβ} (h₁ : a₁ = a₂) (h₂ : ∀ (x : α), b₁ x = b₂ x) :
(let x := a₁; b₁ x) = let x := a₂; b₂ x
def Reflexive {β : Sort v} (r : ββProp) :

A reflexive relation relates every element to itself.

Equations
def Symmetric {β : Sort v} (r : ββProp) :

A relation is symmetric if x ≺ y≺ y implies y ≺ x≺ x.

Equations
  • Symmetric r = (x y : β⦄ → r x yr y x)
def Transitive {β : Sort v} (r : ββProp) :

A relation is transitive if x ≺ y≺ y and y ≺ z≺ z together imply x ≺ z≺ z.

Equations
  • Transitive r = (x y z : β⦄ → r x yr y zr x z)
theorem Equivalence.reflexive {β : Sort v} {r : ββProp} (h : Equivalence r) :
theorem Equivalence.symmetric {β : Sort v} {r : ββProp} (h : Equivalence r) :
theorem Equivalence.transitive {β : Sort v} {r : ββProp} (h : Equivalence r) :
def Total {β : Sort v} (r : ββProp) :

A relation is total if for all x and y, either x ≺ y≺ y or y ≺ x≺ x.

Equations
def Irreflexive {β : Sort v} (r : ββProp) :

Irreflexive means "not reflexive".

Equations
def AntiSymmetric {β : Sort v} (r : ββProp) :

A relation is antisymmetric if x ≺ y≺ y and y ≺ x≺ x together imply that x = y.

Equations
def EmptyRelation {α : Sort u} :
ααProp

An empty relation does not relate any elements.

Equations
theorem InvImage.trans {α : Sort u} {β : Sort v} (r : ββProp) (f : αβ) (h : Transitive r) :
theorem InvImage.irreflexive {α : Sort u} {β : Sort v} (r : ββProp) (f : αβ) (h : Irreflexive r) :
def Commutative {α : Type u} (f : ααα) :
Equations
def Associative {α : Type u} (f : ααα) :
Equations
def LeftIdentity {α : Type u} (f : ααα) (one : α) :
Equations
def RightIdentity {α : Type u} (f : ααα) (one : α) :
Equations
def RightInverse {α : Type u} (f : ααα) (inv : αα) (one : α) :
Equations
def LeftCancelative {α : Type u} (f : ααα) :
Equations
def RightCancelative {α : Type u} (f : ααα) :
Equations
def LeftDistributive {α : Type u} (f : ααα) (g : ααα) :
Equations
def RightDistributive {α : Type u} (f : ααα) (g : ααα) :
Equations
def RightCommutative {α : Type u} {β : Type v} (h : βαβ) :
Equations
def LeftCommutative {α : Type u} {β : Type v} (h : αββ) :
Equations
  • LeftCommutative h = ∀ (a₁ a₂ : α) (b : β), h a₁ (h a₂ b) = h a₂ (h a₁ b)
theorem left_comm {α : Type u} (f : ααα) :
theorem right_comm {α : Type u} (f : ααα) :
unsafe def WellFounded.fix'.impl {α : Sort u} {C : αSort v} {r : ααProp} (hwf : WellFounded r) (F : (x : α) → ((y : α) → r y xC y) → C x) (x : α) :
C x
Equations
@[implemented_by WellFounded.fix'.impl]
def WellFounded.fix' {α : Sort u} {C : αSort v} {r : ααProp} (hwf : WellFounded r) (F : (x : α) → ((y : α) → r y xC y) → C x) (x : α) :
C x
Equations