test(tests/lean/run/new_obtain4): test new 'obtain' expression using minimal amount of annotations
This commit is contained in:
parent
64cc710ff7
commit
02662fe489
1 changed files with 14 additions and 0 deletions
14
tests/lean/run/new_obtain4.lean
Normal file
14
tests/lean/run/new_obtain4.lean
Normal file
|
@ -0,0 +1,14 @@
|
|||
import data.set
|
||||
open set function eq.ops
|
||||
|
||||
variables {X Y Z : Type}
|
||||
|
||||
lemma image_compose (f : Y → X) (g : X → Y) (a : set X) : (f ∘ g) '[a] = f '[g '[a]] :=
|
||||
setext (take z,
|
||||
iff.intro
|
||||
(assume Hz,
|
||||
obtain x Hx₁ Hx₂, from Hz,
|
||||
by repeat (apply in_image | assumption | reflexivity))
|
||||
(assume Hz,
|
||||
obtain y [x Hz₁ Hz₂] Hy₂, from Hz,
|
||||
by repeat (apply in_image | assumption | esimp [compose] | rewrite Hz₂)))
|
Loading…
Reference in a new issue