fix(library/data/prod): make the notation for tuples and product types consistent
This commit is contained in:
parent
a26618e0f2
commit
5c1d5133dd
2 changed files with 6 additions and 1 deletions
|
@ -15,7 +15,7 @@ inductive prod (A B : Type) : Type :=
|
||||||
definition pair := @prod.mk
|
definition pair := @prod.mk
|
||||||
|
|
||||||
namespace prod
|
namespace prod
|
||||||
infixr `×` := prod
|
infixl `×` := prod
|
||||||
|
|
||||||
-- notation for n-ary tuples
|
-- notation for n-ary tuples
|
||||||
notation `(` h `,` t:(foldl `,` (e r, prod.mk r e) h) `)` := t
|
notation `(` h `,` t:(foldl `,` (e r, prod.mk r e) h) `)` := t
|
||||||
|
|
5
tests/lean/run/prod_notation.lean
Normal file
5
tests/lean/run/prod_notation.lean
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
import data.prod data.num
|
||||||
|
open prod
|
||||||
|
|
||||||
|
definition tst1 : num × Prop × num × Prop := (1, true, 2, false)
|
||||||
|
definition tst2 : num × num × num := (1, 2, 3)
|
Loading…
Reference in a new issue