feat: PULift (#8992)
This PR adds `PULift`, a more general form of `ULift` and `PLift` that subsumes both. Needed in #8973
This commit is contained in:
parent
15d1d38bd9
commit
9641a9ac6c
2 changed files with 22 additions and 0 deletions
|
|
@ -1592,6 +1592,7 @@ gen_injective_theorems% MProd
|
|||
gen_injective_theorems% NonScalar
|
||||
gen_injective_theorems% Option
|
||||
gen_injective_theorems% PLift
|
||||
gen_injective_theorems% PULift
|
||||
gen_injective_theorems% PNonScalar
|
||||
gen_injective_theorems% PProd
|
||||
gen_injective_theorems% Prod
|
||||
|
|
|
|||
|
|
@ -890,6 +890,27 @@ theorem ULift.up_down {α : Type u} (b : ULift.{v} α) : Eq (up (down b)) b := r
|
|||
/-- Bijection between `α` and `ULift.{v} α` -/
|
||||
theorem ULift.down_up {α : Type u} (a : α) : Eq (down (up.{v} a)) a := rfl
|
||||
|
||||
/--
|
||||
Lifts a type or proposition to a higher universe level.
|
||||
|
||||
`PULift α` wraps a value of type `α`. It is a generalization of
|
||||
`PLift` that allows lifting values who's type may live in `Sort s`.
|
||||
It also subsumes `PLift`.
|
||||
-/
|
||||
-- The universe variable `r` is written first so that `ULift.{r} α` can be used
|
||||
-- when `s` can be inferred from the type of `α`.
|
||||
structure PULift.{r, s} (α : Sort s) : Sort (max s r 1) where
|
||||
/-- Wraps a value to increase its type's universe level. -/
|
||||
up ::
|
||||
/-- Extracts a wrapped value from a universe-lifted type. -/
|
||||
down : α
|
||||
|
||||
/-- Bijection between `α` and `PULift.{v} α` -/
|
||||
theorem PULift.up_down {α : Sort u} (b : PULift.{v} α) : Eq (up (down b)) b := rfl
|
||||
|
||||
/-- Bijection between `α` and `PULift.{v} α` -/
|
||||
theorem PULift.down_up {α : Sort u} (a : α) : Eq (down (up.{v} a)) a := rfl
|
||||
|
||||
/--
|
||||
Either a proof that `p` is true or a proof that `p` is false. This is equivalent to a `Bool` paired
|
||||
with a proof that the `Bool` is `true` if and only if `p` is true.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue