test(library): test new 'obtain' expression in the standard library
This commit is contained in:
parent
616f49c2e4
commit
7aa0e466a5
3 changed files with 12 additions and 11 deletions
|
@ -171,8 +171,9 @@ iff.intro
|
|||
have H2 : a ≠ b, from ne.symm (assume H', H1 (H' ▸ !sub_self)),
|
||||
and.intro (nonneg_of_pos H) H2)
|
||||
(assume H : a ≤ b ∧ a ≠ b,
|
||||
have H1 : b - a ≠ 0, from (assume H', and.right H (eq_of_sub_eq_zero H')⁻¹),
|
||||
pos_of_nonneg_of_ne_zero (and.left H) H1)
|
||||
obtain aleb aneb, from H,
|
||||
have H1 : b - a ≠ 0, from (assume H', aneb (eq_of_sub_eq_zero H')⁻¹),
|
||||
pos_of_nonneg_of_ne_zero aleb H1)
|
||||
|
||||
theorem le_iff_lt_or_eq (a b : ℚ) : a ≤ b ↔ a < b ∨ a = b :=
|
||||
iff.intro
|
||||
|
|
|
@ -89,9 +89,9 @@ and.intro (injective_of_equiv H1 (and.left H2)) (surjective_of_equiv H1 (and.rig
|
|||
|
||||
theorem bijective_compose {g : map b c} {f : map a b} (Hg : bijective g) (Hf: bijective f) :
|
||||
bijective (g ∘ f) :=
|
||||
and.intro
|
||||
(injective_compose (and.left Hg) (and.left Hf))
|
||||
(surjective_compose (and.right Hg) (and.right Hf))
|
||||
obtain Hg₁ Hg₂, from Hg,
|
||||
obtain Hf₁ Hf₂, from Hf,
|
||||
and.intro (injective_compose Hg₁ Hf₁) (surjective_compose Hg₂ Hf₂)
|
||||
|
||||
/- left inverse -/
|
||||
|
||||
|
|
|
@ -85,12 +85,12 @@ iff.intro (λH, and.swap H) (λH, and.swap H)
|
|||
|
||||
theorem and.assoc : (a ∧ b) ∧ c ↔ a ∧ (b ∧ c) :=
|
||||
iff.intro
|
||||
(assume H, and.intro
|
||||
(and.elim_left (and.elim_left H))
|
||||
(and.intro (and.elim_right (and.elim_left H)) (and.elim_right H)))
|
||||
(assume H, and.intro
|
||||
(and.intro (and.elim_left H) (and.elim_left (and.elim_right H)))
|
||||
(and.elim_right (and.elim_right H)))
|
||||
(assume H,
|
||||
obtain [Ha Hb] Hc, from H,
|
||||
and.intro Ha (and.intro Hb Hc))
|
||||
(assume H,
|
||||
obtain Ha Hb Hc, from H,
|
||||
and.intro (and.intro Ha Hb) Hc)
|
||||
|
||||
theorem and_true (a : Prop) : a ∧ true ↔ a :=
|
||||
iff.intro (assume H, and.left H) (assume H, and.intro H trivial)
|
||||
|
|
Loading…
Reference in a new issue