refactor(library/data): remove folders with a single file
This commit is contained in:
parent
2be83fbff7
commit
e587449a6d
16 changed files with 55 additions and 80 deletions
|
@ -2,7 +2,7 @@
|
|||
Copyright (c) 2014 Microsoft Corporation. All rights reserved.
|
||||
Released under Apache 2.0 license as described in the file LICENSE.
|
||||
|
||||
Module: data.bool.thms
|
||||
Module: data.bool
|
||||
Author: Leonardo de Moura
|
||||
-/
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
/-
|
||||
Copyright (c) 2014 Microsoft Corporation. All rights reserved.
|
||||
Released under Apache 2.0 license as described in the file LICENSE.
|
||||
|
||||
Module: data.bool.default
|
||||
Author: Leonardo de Moura
|
||||
-/
|
||||
|
||||
import data.bool.thms
|
|
@ -7,8 +7,8 @@ Basic types:
|
|||
|
||||
* [empty](empty.lean) : the empty type
|
||||
* [unit](unit.lean) : the singleton type
|
||||
* [bool](bool/bool.md) : the boolean values
|
||||
* [num](num/num.md) : generic numerals
|
||||
* [bool](bool.lean) : the boolean values
|
||||
* [num](num.lean) : generic numerals
|
||||
* [string](string.lean) : ascii strings
|
||||
* [nat](nat/nat.md) : the natural numbers
|
||||
* [fin](fin.lean) : finite ordinals
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
-- Copyright (c) 2014 Microsoft Corporation. All rights reserved.
|
||||
-- Released under Apache 2.0 license as described in the file LICENSE.
|
||||
-- Author: Jeremy Avigad, Floris van Doorn
|
||||
/-
|
||||
Copyright (c) 2014 Microsoft Corporation. All rights reserved.
|
||||
Released under Apache 2.0 license as described in the file LICENSE.
|
||||
|
||||
Module: data.empty
|
||||
Author: Jeremy Avigad, Floris van Doorn
|
||||
-/
|
||||
|
||||
-- Empty type
|
||||
-- ----------
|
||||
import logic.cast logic.subsingleton
|
||||
|
||||
namespace empty
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Copyright (c) 2014 Microsoft Corporation. All rights reserved.
|
||||
Released under Apache 2.0 license as described in the file LICENSE.
|
||||
|
||||
Module: data.num.thms
|
||||
Module: data.num
|
||||
Author: Leonardo de Moura
|
||||
-/
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
/-
|
||||
Copyright (c) 2014 Microsoft Corporation. All rights reserved.
|
||||
Released under Apache 2.0 license as described in the file LICENSE.
|
||||
|
||||
Module: data.num.default
|
||||
Author: Leonardo de Moura
|
||||
-/
|
||||
|
||||
import data.num.thms
|
|
@ -1,6 +1,11 @@
|
|||
-- 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
|
||||
/-
|
||||
Copyright (c) 2014 Microsoft Corporation. All rights reserved.
|
||||
Released under Apache 2.0 license as described in the file LICENSE.
|
||||
|
||||
Module: data.prod
|
||||
Author: Leonardo de Moura, Jeremy Avigad
|
||||
-/
|
||||
|
||||
import logic.eq
|
||||
open inhabited decidable eq.ops
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
-- 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.prod.thms
|
|
@ -1,4 +0,0 @@
|
|||
-- 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, Floris van Doorn
|
||||
import data.sigma.thms
|
|
@ -1,6 +1,11 @@
|
|||
-- Copyright (c) 2014 Microsoft Corporation. All rights reserved.
|
||||
-- Released under Apache 2.0 license as described in the file LICENSE.
|
||||
-- Author: Leonardo de Moura
|
||||
/-
|
||||
Copyright (c) 2014 Microsoft Corporation. All rights reserved.
|
||||
Released under Apache 2.0 license as described in the file LICENSE.
|
||||
|
||||
Module: data.string
|
||||
Author: Leonardo de Moura
|
||||
-/
|
||||
|
||||
import data.bool
|
||||
open bool inhabited
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
-- Copyright (c) 2014 Microsoft Corporation. All rights reserved.
|
||||
-- Released under Apache 2.0 license as described in the file LICENSE.
|
||||
-- Author: Leonardo de Moura
|
||||
import data.string.thms
|
28
library/data/unit.lean
Normal file
28
library/data/unit.lean
Normal file
|
@ -0,0 +1,28 @@
|
|||
/-
|
||||
Copyright (c) 2014 Microsoft Corporation. All rights reserved.
|
||||
Released under Apache 2.0 license as described in the file LICENSE.
|
||||
|
||||
Module: data.unit
|
||||
Author: Leonardo de Moura
|
||||
-/
|
||||
|
||||
import logic.eq logic.subsingleton
|
||||
|
||||
namespace unit
|
||||
notation `⋆` := star
|
||||
|
||||
protected theorem equal (a b : unit) : a = b :=
|
||||
rec_on a (rec_on b rfl)
|
||||
|
||||
theorem eq_star (a : unit) : a = star :=
|
||||
equal a star
|
||||
|
||||
protected theorem subsingleton [instance] : subsingleton unit :=
|
||||
subsingleton.intro (λ a b, equal a b)
|
||||
|
||||
protected definition is_inhabited [instance] : inhabited unit :=
|
||||
inhabited.mk unit.star
|
||||
|
||||
protected definition has_decidable_eq [instance] : decidable_eq unit :=
|
||||
take (a b : unit), decidable.inl (equal a b)
|
||||
end unit
|
|
@ -1,7 +0,0 @@
|
|||
-- Copyright (c) 2014 Microsoft Corporation. All rights reserved.
|
||||
-- Released under Apache 2.0 license as described in the file LICENSE.
|
||||
-- Author: Leonardo de Moura
|
||||
import data.unit.thms data.unit.insts
|
||||
namespace unit
|
||||
notation `⋆` := star
|
||||
end unit
|
|
@ -1,16 +0,0 @@
|
|||
-- Copyright (c) 2014 Microsoft Corporation. All rights reserved.
|
||||
-- Released under Apache 2.0 license as described in the file LICENSE.
|
||||
-- Author: Leonardo de Moura
|
||||
import data.unit.thms logic.subsingleton
|
||||
open decidable
|
||||
|
||||
namespace unit
|
||||
protected theorem subsingleton [instance] : subsingleton unit :=
|
||||
subsingleton.intro (λ a b, equal a b)
|
||||
|
||||
protected definition is_inhabited [instance] : inhabited unit :=
|
||||
inhabited.mk unit.star
|
||||
|
||||
protected definition has_decidable_eq [instance] : decidable_eq unit :=
|
||||
take (a b : unit), inl (equal a b)
|
||||
end unit
|
|
@ -1,12 +0,0 @@
|
|||
-- Copyright (c) 2014 Microsoft Corporation. All rights reserved.
|
||||
-- Released under Apache 2.0 license as described in the file LICENSE.
|
||||
-- Author: Leonardo de Moura
|
||||
import logic.eq
|
||||
|
||||
namespace unit
|
||||
protected theorem equal (a b : unit) : a = b :=
|
||||
rec_on a (rec_on b rfl)
|
||||
|
||||
theorem eq_star (a : unit) : a = star :=
|
||||
equal a star
|
||||
end unit
|
Loading…
Reference in a new issue