lean2/library/data/prod/decl.lean
Leonardo de Moura 46149d0d50 refactor(library/data/prod): break into pieces to reduce dependencies
prod is needed for some automatically generated constructions.
So, it is important it is loaded in the environment as early as possible.
2014-11-08 10:19:29 -08:00

18 lines
504 B
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-- Copyright (c) 2014 Microsoft Corporation. All rights reserved.
-- Released under Apache 2.0 license as described in the file LICENSE.
-- Author: Leonardo de Moura, Jeremy Avigad
import data.unit.decl logic.eq
structure prod (A B : Type) :=
mk :: (pr1 : A) (pr2 : B)
definition pair := @prod.mk
namespace prod
notation A × B := prod A B
notation `pr₁` := pr1
notation `pr₂` := pr2
-- notation for n-ary tuples
notation `(` h `,` t:(foldl `,` (e r, prod.mk r e) h) `)` := t
end prod