lean4-htt/tests/lean/run/specialize1.lean
Scott Morrison d0dc9a2f90
fix: reorder goals after specialize (#1796)
* fix: reorder goals after specialize

* fix test
2022-11-03 06:32:55 -07:00

28 lines
668 B
Text

example (x y z : Prop) (f : x → y → z) (xp : x) (yp : y) : z := by
specialize f xp yp
assumption
example (B C : Prop) (f : forall (A : Prop), A → C) (x : B) : C := by
specialize f _ x
exact f
example (B C : Prop) (f : forall {A : Prop}, A → C) (x : B) : C := by
specialize f x
exact f
example (B C : Prop) (f : forall {A : Prop}, A → C) (x : B) : C := by
specialize @f _ x
exact f
example (X : Type) [Add X] (f : forall {A : Type} [Add A], A → A → A) (x : X) : X := by
specialize f x x
assumption
def ex (f : Nat → Nat → Nat) : Nat := by
specialize f _ _
exact 10
exact 2
exact f
example : ex (· - ·) = 8 :=
rfl