Implication →
is transitive. If P → Q
and Q → R
then P → R
.
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
eq_rec_heq
{α : Sort u}
{φ : α → Sort v}
{a a' : α}
(h : a = a')
(p : φ a) :
h.rec_on p == p
theorem
heq_of_eq_rec_left
{α : Sort u}
{φ : α → Sort v}
{a a' : α}
{p₁ : φ a}
{p₂ : φ a'}
(e : a = a')
(h₂ : e.rec_on p₁ = p₂) :
p₁ == p₂
theorem
heq_of_eq_rec_right
{α : Sort u}
{φ : α → Sort v}
{a a' : α}
{p₁ : φ a}
{p₂ : φ a'}
(e : a' = a)
(h₂ : p₁ = e.rec_on p₂) :
p₁ == p₂
theorem
eq_rec_compose
{α β φ : Sort u}
(p₁ : β = φ)
(p₂ : α = β)
(a : α) :
p₁.rec_on (p₂.rec_on a) = _.rec_on a
- intro : ∀ {α : Sort u} {p : α → Prop} (w : α), p w → Exists p
The existential quantifier.
To prove a goal of the form ⊢ ∃ x, p x
, you can provide a witness y
with the tactic existsi y
.
If you are working in a project that depends on mathlib, then we recommend the use
tactic
instead.
You'll then be left with the goal ⊢ p y
.
To extract a witness x
and proof hx : p x
from a hypothesis h : ∃ x, p x
,
use the tactic cases h with x hx
. See also the mathlib tactics obtain
and rcases
.
theorem
exists.elim
{α : Sort u}
{p : α → Prop}
{b : Prop}
(h₁ : ∃ (x : α), p x)
(h₂ : ∀ (a : α), p a → b) :
b
Equations
- exists_unique p = ∃ (x : α), p x ∧ ∀ (y : α), p y → y = x
theorem
exists_unique.intro
{α : Sort u}
{p : α → Prop}
(w : α)
(h₁ : p w)
(h₂ : ∀ (y : α), p y → y = w) :
∃! (x : α), p x
theorem
exists_unique.elim
{α : Sort u}
{p : α → Prop}
{b : Prop}
(h₂ : ∃! (x : α), p x)
(h₁ : ∀ (x : α), p x → (∀ (y : α), p y → y = 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
unique_of_exists_unique
{α : Sort u}
{p : α → Prop}
(h : ∃! (x : α), p x)
{y₁ y₂ : α}
(py₁ : p y₁)
(py₂ : p y₂) :
y₁ = y₂
theorem
forall_congr
{α : Sort u}
{p q : α → Prop}
(h : ∀ (a : α), p a ↔ q a) :
(∀ (a : α), p a) ↔ ∀ (a : α), q a
theorem
exists_imp_exists
{α : Sort u}
{p q : α → Prop}
(h : ∀ (a : α), p a → q a)
(p_1 : ∃ (a : α), p a) :
∃ (a : α), q a
theorem
exists_unique_congr
{α : Sort u}
{p₁ p₂ : α → Prop}
(h : ∀ (x : α), p₁ x ↔ p₂ x) :
exists_unique p₁ ↔ ∃! (x : α), p₂ x
@[protected, instance]
Equations
@[protected, instance]
Equations
def
decidable.rec_on_true
{p : Prop}
[h : decidable p]
{h₁ : p → Sort u}
{h₂ : ¬p → Sort u}
(h₃ : p)
(h₄ : h₁ h₃) :
h.rec_on h₂ h₁
Equations
- decidable.rec_on_true h₃ h₄ = h.rec_on (λ (h : ¬p), false.rec ((is_false h).rec_on h₂ h₁) _) (λ (h : p), h₄)
def
decidable.rec_on_false
{p : Prop}
[h : decidable p]
{h₁ : p → Sort u}
{h₂ : ¬p → Sort u}
(h₃ : ¬p)
(h₄ : h₂ h₃) :
h.rec_on h₂ h₁
Equations
- decidable.rec_on_false h₃ h₄ = h.rec_on (λ (h : ¬p), h₄) (λ (h : p), false.rec ((is_true h).rec_on h₂ h₁) _)
Equations
Equations
@[protected, instance]
def
exists_prop_decidable
{p : Prop}
(P : p → Prop)
[Dp : decidable p]
[DP : Π (h : p), decidable (P h)] :
decidable (∃ (h : p), P h)
Equations
- exists_prop_decidable P = dite p (λ (h : p), decidable_of_decidable_of_iff (DP h) _) (λ (h : ¬p), is_false _)
@[protected, instance]
def
forall_prop_decidable
{p : Prop}
(P : p → Prop)
[Dp : decidable p]
[DP : Π (h : p), decidable (P h)] :
decidable (∀ (h : p), P h)
Equations
- forall_prop_decidable P = dite p (λ (h : p), decidable_of_decidable_of_iff (DP h) _) (λ (h : ¬p), is_true _)
@[protected, instance]
Equations
Equations
- is_dec_refl p = ∀ (x : α), p x x = tt
@[protected, instance]
def
decidable_eq_of_bool_pred
{α : Sort u}
{p : α → α → bool}
(h₁ : is_dec_eq p)
(h₂ : is_dec_refl p) :
@[class]
- default : α
Instances
- unique.inhabited
- prop.inhabited
- pi.inhabited
- bool.inhabited
- true.inhabited
- prod.inhabited
- nat.inhabited
- list.inhabited
- char.inhabited
- string.inhabited
- sum.inhabited_left
- sum.inhabited_right
- name.inhabited
- option.inhabited
- options.inhabited
- format.inhabited
- level.inhabited
- expr.inhabited
- environment.implicit_infer_kind.inhabited
- environment.inhabited
- local_context.inhabited
- occurrences.inhabited
- punit.inhabited
- json.inhabited
- sort.inhabited
- sort.inhabited'
- psum.inhabited_left
- psum.inhabited_right
- vm_decl_kind.inhabited
- vm_obj_kind.inhabited
- tactic.new_goals.inhabited
- tactic.transparency.inhabited
- tactic.apply_cfg.inhabited
- smt_pre_config.inhabited
- ematch_config.inhabited
- cc_config.inhabited
- smt_config.inhabited
- rsimp.config.inhabited
- tactic.dunfold_config.inhabited
- tactic.dsimp_config.inhabited
- tactic.unfold_proj_config.inhabited
- tactic.simp_intros_config.inhabited
- tactic.delta_config.inhabited
- tactic.simp_config.inhabited
- tactic.rewrite_cfg.inhabited
- interactive.loc.inhabited
- tactic.unfold_config.inhabited
- param_info.inhabited
- subsingleton_info.inhabited
- fun_info.inhabited
- format.color.inhabited
- pos.inhabited
- environment.projection_info.inhabited
- reducibility_hints.inhabited
- congr_arg_kind.inhabited
- ulift.inhabited
- plift.inhabited
- string_imp.inhabited
- string.iterator_imp.inhabited
- rbnode.color.inhabited
- ordering.inhabited
- unification_constraint.inhabited
- pprod.inhabited
- unification_hint.inhabited
- doc_category.inhabited
- tactic_doc_entry.inhabited
- bin_tree.inhabited
- unsigned.inhabited
- string.iterator.inhabited
- rbnode.inhabited
- rbtree.inhabited
- rbmap.inhabited
- binder_info.inhabited
- binder.inhabited
- tactic.goal.inhabited
- tactic.proof_state.inhabited
- to_additive.value_type.inhabited
- native.rb_set.inhabited
- native.rb_map.inhabited
- native.rb_lmap.inhabited
- name_set.inhabited
- name_map.inhabited
- lint_verbosity.inhabited
- tactic.rcases_patt.inhabited
- tactic.explode.status.inhabited
- tactic.explode.entries.inhabited
- auto.auto_config.inhabited
- auto.case_option.inhabited
- tactic.itauto.and_kind.inhabited
- tactic.itauto.prop.inhabited
- tactic.itauto.proof.inhabited
- norm_cast.label.inhabited
- norm_cast.norm_cast_cache.inhabited
- projection_data.inhabited
- simps_cfg.inhabited
- functor.const.inhabited
- functor.add_const.inhabited
- functor.comp.inhabited
- applicative_transformation.inhabited
- tactic.suggest.head_symbol_match.inhabited
- quot.inhabited
- quotient.inhabited
- trunc.inhabited
- fin.inhabited
- inhabited_fin_one_add
- units.inhabited
- add_units.inhabited
- monoid.End.inhabited
- add_monoid.End.inhabited
- one_hom.inhabited
- zero_hom.inhabited
- mul_hom.inhabited
- add_hom.inhabited
- monoid_hom.inhabited
- add_monoid_hom.inhabited
- monoid_with_zero_hom.inhabited
- sigma.inhabited
- psigma.inhabited
- equiv.inhabited'
- additive.inhabited
- multiplicative.inhabited
- mul_equiv.inhabited
- add_equiv.inhabited
- order_dual.inhabited
- as_linear_order.inhabited
- with_bot.inhabited
- with_top.inhabited
- set.inhabited
- ring_hom.inhabited
- with_one.inhabited
- with_zero.inhabited
- mul_opposite.inhabited
- add_opposite.inhabited
- rel_embedding.inhabited
- rel_iso.inhabited
- tactic.interactive.mono_cfg.inhabited
- tactic.interactive.mono_selection.inhabited
- order_hom.inhabited
- function.End.inhabited
- int.inhabited
- multiset.inhabited_multiset
- tactic.interactive.rep_arity.inhabited
- expr_lens.dir.inhabited
- finset.inhabited_finset
- vector.inhabited
- d_array.inhabited
- array.inhabited
- prod.lex.inhabited
- sym.inhabited_sym
- sym.inhabited_sym'
- mul_aut.inhabited
- add_aut.inhabited
- pnat.inhabited
- ulower.inhabited
- rat.inhabited
- set.finite.inhabited
- subsemigroup.inhabited
- add_subsemigroup.inhabited
- submonoid.inhabited
- add_submonoid.inhabited
- set.set_semiring.inhabited
- associates.inhabited
- ring_equiv.inhabited
- free_monoid.inhabited
- free_add_monoid.inhabited
- conj_classes.inhabited
- subgroup.inhabited
- add_subgroup.inhabited
- subsemiring.inhabited
- subring.inhabited
- distrib_mul_action_hom.inhabited
- finsupp.inhabited
- tactic.ring.normalize_mode.inhabited
- linarith.ineq.inhabited
- linarith.comp.inhabited
- linarith.comp_source.inhabited
- pos_num.inhabited
- num.inhabited
- znum.inhabited
- tree.inhabited
- ring_aut.inhabited
- linear_map.inhabited
- quotient_group.has_quotient.quotient.inhabited
- quotient_add_group.has_quotient.quotient.inhabited
- con.inhabited
- add_con.inhabited
- con.quotient.inhabited
- add_con.quotient.inhabited
- sub_mul_action.inhabited
- submodule.inhabited
- submodule.inhabited'
- dfinsupp.inhabited_pre
- dfinsupp.inhabited
- tactic.tfae.arrow.inhabited
- part.inhabited
- enat.inhabited
- pilex.inhabited
- omega_complete_partial_order.chain.inhabited
- omega_complete_partial_order.continuous_hom.inhabited
- tactic.abel.normalize_mode.inhabited
- absolute_value.inhabited
- alg_equiv.inhabited
- cardinal.inhabited
- linear_pmap.inhabited
- submodule.quotient.has_quotient.quotient.inhabited
- basis.inhabited
- tensor_product.inhabited
- nat.primes.inhabited_primes
- ideal.quotient.inhabited
- localization.inhabited
- add_localization.inhabited
- tactic.ring_exp.coeff.inhabited
- tactic.ring_exp.ex_type.inhabited
- subalgebra.inhabited
- algebra.subalgebra.inhabited
- non_unital_alg_hom.inhabited
- monoid_algebra.inhabited
- add_monoid_algebra.inhabited
- mv_polynomial.inhabited
- polynomial.inhabited
- unique_factorization_monoid.normalization_monoid.inhabited
- restrict_scalars.inhabited
- matrix.inhabited
- Well_order.inhabited
- ordinal.inhabited
- pequiv.inhabited
- composition_as_set.inhabited
- composition.inhabited
- nat.partition.inhabited
- multilinear_map.inhabited
- alternating_map.inhabited
- opposite.inhabited
- prefunctor.inhabited
- category_theory.functor.inhabited
- category_theory.nat_trans.inhabited
- category_theory.iso.inhabited
- category_theory.equivalence.inhabited
- category_theory.adjunction.inhabited
- Mon.inhabited
- AddMon.inhabited
- CommMon.inhabited
- AddCommMon.inhabited
- category_theory.End.inhabited
- category_theory.Aut.inhabited
- Group.inhabited
- AddGroup.inhabited
- CommGroup.inhabited
- AddCommGroup.inhabited
- SemiRing.inhabited
- Ring.inhabited
- CommSemiRing.inhabited
- CommRing.inhabited
- local_ring.residue_field.inhabited
- top_hom.inhabited
- bot_hom.inhabited
- bounded_order_hom.inhabited
- sup_hom.inhabited
- inf_hom.inhabited
- sup_bot_hom.inhabited
- inf_top_hom.inhabited
- lattice_hom.inhabited
- bounded_lattice_hom.inhabited
- Sup_hom.inhabited
- Inf_hom.inhabited
- frame_hom.inhabited
- complete_lattice_hom.inhabited
- tactic.decl_reducibility.inhabited
- filter.inhabited_mem
- filter.inhabited
- filter_basis.inhabited
- filter.nat.inhabited_countable_filter_basis
- ultrafilter.inhabited
- rel.inhabited
- pfun.inhabited
- inhabited_topological_space
- cofinite_topology.inhabited
- compact_exhaustion.inhabited
- connected_components.inhabited
- continuous_map.inhabited
- topological_space.opens.inhabited
- topological_space.open_nhds_of.inhabited
- fractional_ideal.inhabited
- conj_act.inhabited
- topological_space.closeds.inhabited
- topological_space.clopens.inhabited
- topological_space.compacts.inhabited
- topological_space.nonempty_compacts.inhabited
- topological_space.positive_compacts.inhabited
- topological_space.compact_opens.inhabited
- group_topology.inhabited
- add_group_topology.inhabited
- ring_topology.inhabited
- inhabited_uniform_space
- inhabited_uniform_space_core
- uniform_space.separation_quotient.inhabited
- continuous_linear_map.inhabited
- group_filter_basis.inhabited
- add_group_filter_basis.inhabited
- module_filter_basis.inhabited
- open_subgroup.inhabited
- open_add_subgroup.inhabited
- Cauchy.inhabited
- uniform_space.completion.inhabited
- uniform_space.completion.abstract_completion.inhabited
- maximal_spectrum.adic_completion.inhabited
- R_hat.inhabited
- K_hat.inhabited
- finite_adele_ring'.inhabited
- finite_adele_ring.inhabited
- cau_seq.inhabited
- cau_seq.completion.Cauchy.inhabited
- real.inhabited
- mv_power_series.inhabited
- power_series.inhabited
- hahn_series.inhabited
- hahn_series.summable_family.inhabited
- ratfunc.inhabited
- module.dual.inhabited
- bilin_form.inhabited
- zmod.inhabited
- adjoin_root.inhabited
- polynomial.splitting_field_aux.inhabited
- polynomial.splitting_field.inhabited
- direct_sum.inhabited
- dmatrix.inhabited
- free_group.inhabited
- abelianization.inhabited
- free_abelian_group.inhabited
- free_ring.inhabited
- free_comm_ring.inhabited
- module.direct_limit.inhabited
- add_comm_group.direct_limit.inhabited
- ring.direct_limit.inhabited
- perfect_closure.inhabited
- lift.subfield_with_hom.inhabited
- algebraic_closure.adjoin_monic.inhabited
- algebraic_closure.step.inhabited
- algebraic_closure.inhabited
- subfield.inhabited
- intermediate_field.inhabited
- intermediate_field.lifts.inhabited
- function_field.Fqt_infty.inhabited
- kt_infty.inhabited
- nonneg.inhabited
- nnreal.inhabited
- ennreal.inhabited
- function_field.A_F_f.inhabited
- function_field.A_F.inhabited
- function_field.maximal_spectrum.inhabited
- number_field.A_K_f.inhabited
- number_field.A_K.inhabited
- number_field.maximal_spectrum.inhabited
- class_group.inhabited
- finite_idele_group'.inhabited
- number_field.I_K_f.inhabited
- number_field.I_K.inhabited
- number_field.C_K.inhabited
- zsqrtd.inhabited
- complex.inhabited
- finite_adeles_Z.inhabited
- finite_ideles_Z.inhabited
- finite_adeles_Q.inhabited
- adeles_Q.inhabited
- finite_ideles_Q.inhabited
- ideles_Q.inhabited
- finite_adeles_Zi.inhabited
- finite_ideles_Zi.inhabited
- G_K.inhabited
- G_K_ab.inhabited
- function_field.I_F_f.inhabited
- function_field.I_F.inhabited
- function_field.C_F.inhabited
@[protected, instance]
Equations
- prop.inhabited = {default := true}
@[protected, instance]
def
pi.inhabited
(α : Sort u)
{β : α → Sort v}
[Π (x : α), inhabited (β x)] :
inhabited (Π (x : α), β x)
Equations
- pi.inhabited α = {default := λ (a : α), default}
@[protected, instance]
Equations
- bool.inhabited = {default := ff}
@[protected, instance]
Equations
@[class]
- intro : ∀ {α : Sort u}, α → nonempty α
Instances
- has_zero.nonempty
- has_one.nonempty
- has_Inf_to_nonempty
- has_Sup_to_nonempty
- irreducible_space.to_nonempty
- connected_space.to_nonempty
- has_top_nonempty
- has_bot_nonempty
- nontrivial.to_nonempty
- nonempty_of_inhabited
- prod.nonempty
- order_dual.nonempty
- nonempty_lt
- nonempty_gt
- set.univ.nonempty
- set.has_insert.insert.nonempty
- set.image.nonempty
- set.range.nonempty
- set.nonempty_Ici_subtype
- set.nonempty_Iic_subtype
- set.nonempty_Ioi_subtype
- set.nonempty_Iio_subtype
- finset.has_insert.insert.nonempty
- ordinal.α.nonempty
- cardinal.α.nonempty
- filter_basis.nonempty_sets
- ultrafilter.nonempty
- topological_space.nonempty_compacts.to_nonempty
- topological_space.positive_compacts.nonempty
- Cauchy.nonempty
@[protected]
@[protected, simp, instance]
@[class]
- intro : ∀ {α : Sort u}, (∀ (a b : α), a = b) → subsingleton α
Instances
- is_empty.subsingleton
- unique.subsingleton
- char_p.subsingleton
- subsingleton_prop
- decidable.subsingleton
- pi.subsingleton
- punit.subsingleton
- empty.subsingleton
- subsingleton.prod
- subsingleton_pempty
- quot.subsingleton
- quotient.subsingleton
- trunc.subsingleton
- unique.subsingleton_unique
- equiv.equiv_subsingleton_cod
- equiv.equiv_subsingleton_dom
- order_dual.subsingleton
- set.subsingleton_coe_of_subsingleton
- mul_opposite.subsingleton
- add_opposite.subsingleton
- invertible.subsingleton
- ring_hom.int.subsingleton_ring_hom
- fin.order_iso_subsingleton
- fin.order_iso_subsingleton'
- vector.zero_subsingleton
- sym.subsingleton
- plift.subsingleton
- ulift.subsingleton
- fintype.subsingleton
- rat.subsingleton_ring_hom
- subsingleton_fin_zero
- subsingleton_fin_one
- locally_finite_order.subsingleton
- nat_algebra_subsingleton
- int_algebra_subsingleton
- matrix.subsingleton
- order.succ_order.subsingleton
- order.pred_order.subsingleton
- initial_seg.subsingleton
- principal_seg.subsingleton
- category_theory.subsingleton_of_unop
- hahn_series.subsingleton
- ratfunc.subsingleton
- zmod.subsingleton_units
- zmod.subsingleton_ring_hom
- zmod.subsingleton_ring_equiv
- dmatrix.subsingleton
@[protected]
theorem
subsingleton.helim
{α β : Sort u}
[h : subsingleton α]
(h_1 : α = β)
(a : α)
(b : β) :
a == b
@[protected]
theorem
rec_subsingleton
{p : Prop}
[h : decidable p]
{h₁ : p → Sort u}
{h₂ : ¬p → Sort u}
[h₃ : ∀ (h : p), subsingleton (h₁ h)]
[h₄ : ∀ (h : ¬p), subsingleton (h₂ h)] :
subsingleton (h.rec_on h₂ h₁)
Equations
- transitive r = ∀ ⦃x y z : β⦄, r x y → r y z → r x z
Equations
- equivalence r = (reflexive r ∧ symmetric r ∧ transitive r)
theorem
mk_equivalence
{β : Sort v}
(r : β → β → Prop)
(rfl : reflexive r)
(symm : symmetric r)
(trans : transitive r) :
Equations
- irreflexive r = ∀ (x : β), ¬r x x
Equations
- anti_symmetric r = ∀ ⦃x y : β⦄, r x y → r y x → x = y
Equations
- empty_relation = λ (a₁ a₂ : α), false
Equations
- subrelation q r = ∀ ⦃x y : β⦄, q x y → r x y
theorem
inv_image.trans
{α : Sort u}
{β : Sort v}
(r : β → β → Prop)
(f : α → β)
(h : transitive r) :
transitive (inv_image r f)
theorem
inv_image.irreflexive
{α : Sort u}
{β : Sort v}
(r : β → β → Prop)
(f : α → β)
(h : irreflexive r) :
irreflexive (inv_image r f)
Equations
- commutative f = ∀ (a b : α), f a b = f b a
Equations
- associative f = ∀ (a b c : α), f (f a b) c = f a (f b c)
Equations
- left_identity f one = ∀ (a : α), f one a = a
Equations
- right_identity f one = ∀ (a : α), f a one = a
Equations
- right_inverse f inv one = ∀ (a : α), f a (inv a) = one
Equations
- left_cancelative f = ∀ (a b c : α), f a b = f a c → b = c
Equations
- right_cancelative f = ∀ (a b c : α), f a b = f c b → a = c
Equations
- left_distributive f g = ∀ (a b c : α), f a (g b c) = g (f a b) (f a c)
Equations
- right_distributive f g = ∀ (a b c : α), f (g a b) c = g (f a c) (f b c)
Equations
- right_commutative h = ∀ (b : β) (a₁ a₂ : α), h (h b a₁) a₂ = h (h b a₂) a₁
Equations
- left_commutative h = ∀ (a₁ a₂ : α) (b : β), h a₁ (h a₂ b) = h a₂ (h a₁ b)
theorem
right_comm
{α : Type u}
(f : α → α → α) :
commutative f → associative f → right_commutative f