feat: basic instances for ULift and PLift (#5112)
This commit is contained in:
parent
a58da122b9
commit
0a8d1bf808
3 changed files with 26 additions and 0 deletions
|
|
@ -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
12
src/Init/Data/PLift.lean
Normal 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
12
src/Init/Data/ULift.lean
Normal 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)
|
||||
Loading…
Add table
Reference in a new issue