Compare commits

...

1 Commits

Author SHA1 Message Date
Kim Morrison
fad4eab213 feat: basic instances for ULift and PLift 2024-08-21 21:21:07 +10:00
3 changed files with 26 additions and 0 deletions

View File

@@ -37,3 +37,5 @@ import Init.Data.Cast
import Init.Data.Sum
import Init.Data.BEq
import Init.Data.Subtype
import Init.Data.ULift
import Init.Data.PLift

12
src/Init/Data/PLift.lean Normal file
View File

@@ -0,0 +1,12 @@
/-
Copyright (c) 2024 Lean FRO. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kim Morrison
-/
prelude
import Init.Core
deriving instance DecidableEq for PLift
instance [Subsingleton α] : Subsingleton (PLift α) where
allEq := fun a b => congrArg PLift.up (Subsingleton.elim a b)

12
src/Init/Data/ULift.lean Normal file
View File

@@ -0,0 +1,12 @@
/-
Copyright (c) 2024 Lean FRO. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kim Morrison
-/
prelude
import Init.Core
deriving instance DecidableEq for ULift
instance [Subsingleton α] : Subsingleton (ULift α) where
allEq := fun a b => congrArg ULift.up (Subsingleton.elim a b)