lean2/tests/lean/run/record4.lean
Leonardo de Moura 05f27b8f0e feat(frontends/lean/structure): add option for controlling whether we automatically generate eta and projection-over-intro theorems for structures
It seems most of the time these theorems are not used at all.
They are just polluting the namespace.

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-12-09 12:40:09 -08:00

17 lines
343 B
Text

import logic data.unit
set_option structure.eta_thm true
structure point (A : Type) (B : Type) :=
mk :: (x : A) (y : B)
check point.eta
example (p : point num num) : point.mk (point.x p) (point.y p) = p :=
point.eta p
inductive color :=
red, green, blue
structure color_point (A : Type) (B : Type) extends point A B :=
mk :: (c : color)