The Following Are Equivalent #
This file allows to state that all propositions in a list are equivalent. It is used by
Mathlib.Tactic.Tfae
.
TFAE l
means ∀ x ∈ l, ∀ y ∈ l, x ↔ y
. This is equivalent to Pairwise (↔) l
.
theorem
List.tfae_of_cycle
{a : Prop}
{b : Prop}
{l : List Prop}
(h_chain : List.Chain (fun (x x_1 : Prop) => x → x_1) a (b :: l))
(h_last : List.getLastD l b → a)
:
theorem
List.forall_tfae
{α : Type u_1}
(l : List (α → Prop))
(H : ∀ (a : α), List.TFAE (List.map (fun (p : α → Prop) => p a) l))
:
If P₁ x ↔ ... ↔ Pₙ x
for all x
, then (∀ x, P₁ x) ↔ ... ↔ (∀ x, Pₙ x)
.
Note: in concrete cases, Lean has trouble finding the list [P₁, ..., Pₙ]
from the list
[(∀ x, P₁ x), ..., (∀ x, Pₙ x)]
, but simply providing a list of underscores with the right
length makes it happier.
Example:
example (P₁ P₂ P₃ : ℕ → Prop) (H : ∀ n, [P₁ n, P₂ n, P₃ n].TFAE) :
[∀ n, P₁ n, ∀ n, P₂ n, ∀ n, P₃ n].TFAE :=
forall_tfae [_, _, _] H
theorem
List.exists_tfae
{α : Type u_1}
(l : List (α → Prop))
(H : ∀ (a : α), List.TFAE (List.map (fun (p : α → Prop) => p a) l))
:
If P₁ x ↔ ... ↔ Pₙ x
for all x
, then (∃ x, P₁ x) ↔ ... ↔ (∃ x, Pₙ x)
.
Note: in concrete cases, Lean has trouble finding the list [P₁, ..., Pₙ]
from the list
[(∃ x, P₁ x), ..., (∃ x, Pₙ x)]
, but simply providing a list of underscores with the right
length makes it happier.
Example:
example (P₁ P₂ P₃ : ℕ → Prop) (H : ∀ n, [P₁ n, P₂ n, P₃ n].TFAE) :
[∃ n, P₁ n, ∃ n, P₂ n, ∃ n, P₃ n].TFAE :=
exists_tfae [_, _, _] H