fix(library/algebra/interval): rename namespace, and move a theorem

This commit is contained in:
Jeremy Avigad 2016-01-03 18:19:45 -05:00 committed by Leonardo de Moura
parent 31aa256b99
commit 173368801b
3 changed files with 9 additions and 8 deletions

View file

@ -14,11 +14,9 @@ open set
section
open set
theorem mem_singleton_of_eq {A : Type} {x a : A} (H : x = a) : x ∈ '{a} :=
eq.subst (eq.symm H) (mem_singleton a)
end
namespace intervals
namespace interval
section order_pair
variables {A : Type} [order_pair A]
@ -158,4 +156,4 @@ open nat eq.ops
finite_subset this
end nat
end intervals
end interval

View file

@ -71,7 +71,7 @@ end finset
section set
variables {A : Type} [add_comm_monoid A]
open set intervals
open set interval
proposition sum_range_eq_sum_interval_aux (m n : ) (f : → A) :
(∑ i = m...m+n, f i) = (∑ i ∈ '[m, m + n], f i) :=
@ -162,7 +162,7 @@ end finset
section set
variables {A : Type} [comm_monoid A]
open set intervals
open set interval
proposition prod_range_eq_prod_interval_aux (m n : ) (f : → A) :
(∏ i = m...m+n, f i) = (∏ i ∈ '[m, m + n], f i) :=

View file

@ -296,11 +296,14 @@ iff.intro
theorem mem_singleton (a : X) : a ∈ '{a} := !mem_insert
theorem eq_of_mem_singleton {x y : X} : x ∈ insert y ∅ → x = y :=
assume h, or.elim (eq_or_mem_of_mem_insert h)
theorem eq_of_mem_singleton {x y : X} (h : x ∈ '{y}) : x = y :=
or.elim (eq_or_mem_of_mem_insert h)
(suppose x = y, this)
(suppose x ∈ ∅, absurd this !not_mem_empty)
theorem mem_singleton_of_eq {x y : X} (H : x = y) : x ∈ '{y} :=
eq.symm H ▸ mem_singleton y
theorem insert_eq (x : X) (s : set X) : insert x s = '{x} s :=
ext (take y, iff.intro
(suppose y ∈ insert x s,